diff --git a/cursor-source-map/0.50.5/core/main.js.map b/cursor-source-map/0.50.5/core/main.js.map new file mode 100644 index 0000000..68079ed --- /dev/null +++ b/cursor-source-map/0.50.5/core/main.js.map @@ -0,0 +1,59804 @@ + /*!-------------------------------------------------------- + * Copyright (C) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------*/ + (function () { + try { + var e = typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : {}; + var n = new e.Error().stack; + if (n) { + e._sentryDebugIds = e._sentryDebugIds || {}; + e._sentryDebugIds[n] = "61209153-73c8-5a0b-b208-7e2f4a87ff8d"; + } + } catch (e) {} + })(); + function Lf(t, e) { + Lf = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function (i, s) { + i.__proto__ = s; + } || function (i, s) { + for (var r in s) { + if (Object.prototype.hasOwnProperty.call(s, r)) { + i[r] = s[r]; + } + } + }; + return Lf(t, e); + } + export function __extends(t, e) { + if (typeof e != "function" && e !== null) { + throw new TypeError("Class extends value " + String(e) + " is not a constructor or null"); + } + Lf(t, e); + function i() { + this.constructor = t; + } + t.prototype = e === null ? Object.create(e) : (i.prototype = e.prototype, new i()); + } + export function __assign() { + __assign = Object.assign || function (e) { + var i; + for (var s = 1, r = arguments.length; s < r; s++) { + i = arguments[s]; + for (var n in i) { + if (Object.prototype.hasOwnProperty.call(i, n)) { + e[n] = i[n]; + } + } + } + return e; + }; + return __assign.apply(this, arguments); + } + export function __rest(t, e) { + var i = {}; + for (var s in t) { + if (Object.prototype.hasOwnProperty.call(t, s) && e.indexOf(s) < 0) { + i[s] = t[s]; + } + } + if (t != null && typeof Object.getOwnPropertySymbols == "function") { + for (var r = 0, s = Object.getOwnPropertySymbols(t); r < s.length; r++) { + if (e.indexOf(s[r]) < 0 && Object.prototype.propertyIsEnumerable.call(t, s[r])) { + i[s[r]] = t[s[r]]; + } + } + } + return i; + } + export function __decorate(t, e, i, s) { + var r = arguments.length; + var n = r < 3 ? e : s === null ? s = Object.getOwnPropertyDescriptor(e, i) : s; + var o; + if (typeof Reflect == "object" && typeof Reflect.decorate == "function") { + n = Reflect.decorate(t, e, i, s); + } else { + for (var a = t.length - 1; a >= 0; a--) { + if (o = t[a]) { + n = (r < 3 ? o(n) : r > 3 ? o(e, i, n) : o(e, i)) || n; + } + } + } + if (r > 3 && n) { + Object.defineProperty(e, i, n); + } + return n; + } + export function __param(t, e) { + return function (i, s) { + e(i, s, t); + }; + } + export function __esDecorate(t, e, i, s, r, n) { + function o(b) { + if (b !== undefined && typeof b != "function") { + throw new TypeError("Function expected"); + } + return b; + } + var a = s.kind; + var c = a === "getter" ? "get" : a === "setter" ? "set" : "value"; + var l = !e && t ? s.static ? t : t.prototype : null; + var u = e || (l ? Object.getOwnPropertyDescriptor(l, s.name) : {}); + var d; + var f = false; + for (var p = i.length - 1; p >= 0; p--) { + var w = {}; + for (var m in s) { + w[m] = m === "access" ? {} : s[m]; + } + for (var m in s.access) { + w.access[m] = s.access[m]; + } + w.addInitializer = function (b) { + if (f) { + throw new TypeError("Cannot add initializers after decoration has completed"); + } + n.push(o(b || null)); + }; + var y = (0, i[p])(a === "accessor" ? { + get: u.get, + set: u.set + } : u[c], w); + if (a === "accessor") { + if (y === undefined) { + continue; + } + if (y === null || typeof y != "object") { + throw new TypeError("Object expected"); + } + if (d = o(y.get)) { + u.get = d; + } + if (d = o(y.set)) { + u.set = d; + } + if (d = o(y.init)) { + r.unshift(d); + } + } else if (d = o(y)) { + if (a === "field") { + r.unshift(d); + } else { + u[c] = d; + } + } + } + if (l) { + Object.defineProperty(l, s.name, u); + } + f = true; + } + export function __runInitializers(t, e, i) { + var s = arguments.length > 2; + for (var r = 0; r < e.length; r++) { + i = s ? e[r].call(t, i) : e[r].call(t); + } + if (s) { + return i; + } else { + return undefined; + } + } + export function __propKey(t) { + if (typeof t == "symbol") { + return t; + } else { + return `${t}`; + } + } + export function __setFunctionName(t, e, i) { + if (typeof e == "symbol") { + e = e.description ? `[${e.description}]` : ""; + } + return Object.defineProperty(t, "name", { + configurable: true, + value: i ? `${i} ${e}` : e + }); + } + export function __metadata(t, e) { + if (typeof Reflect == "object" && typeof Reflect.metadata == "function") { + return Reflect.metadata(t, e); + } + } + export function __awaiter(t, e, i, s) { + function r(n) { + if (n instanceof i) { + return n; + } else { + return new i(function (o) { + o(n); + }); + } + } + return new (i ||= Promise)(function (n, o) { + function a(u) { + try { + l(s.next(u)); + } catch (d) { + o(d); + } + } + function c(u) { + try { + l(s.throw(u)); + } catch (d) { + o(d); + } + } + function l(u) { + if (u.done) { + n(u.value); + } else { + r(u.value).then(a, c); + } + } + l((s = s.apply(t, e || [])).next()); + }); + } + export function __generator(t, e) { + var i = { + label: 0, + sent: function () { + if (n[0] & 1) { + throw n[1]; + } + return n[1]; + }, + trys: [], + ops: [] + }; + var s; + var r; + var n; + var o; + o = { + next: a(0), + throw: a(1), + return: a(2) + }; + if (typeof Symbol == "function") { + o[Symbol.iterator] = function () { + return this; + }; + } + return o; + function a(l) { + return function (u) { + return c([l, u]); + }; + } + function c(l) { + if (s) { + throw new TypeError("Generator is already executing."); + } + while (o && (o = 0, l[0] && (i = 0)), i) { + try { + s = 1; + if (r && (n = l[0] & 2 ? r.return : l[0] ? r.throw || ((n = r.return) && n.call(r), 0) : r.next) && !(n = n.call(r, l[1])).done) { + return n; + } + r = 0; + if (n) { + l = [l[0] & 2, n.value]; + } + switch (l[0]) { + case 0: + case 1: + n = l; + break; + case 4: + i.label++; + return { + value: l[1], + done: false + }; + case 5: + i.label++; + r = l[1]; + l = [0]; + continue; + case 7: + l = i.ops.pop(); + i.trys.pop(); + continue; + default: + n = i.trys; + if (!(n = n.length > 0 && n[n.length - 1]) && (l[0] === 6 || l[0] === 2)) { + i = 0; + continue; + } + if (l[0] === 3 && (!n || l[1] > n[0] && l[1] < n[3])) { + i.label = l[1]; + break; + } + if (l[0] === 6 && i.label < n[1]) { + i.label = n[1]; + n = l; + break; + } + if (n && i.label < n[2]) { + i.label = n[2]; + i.ops.push(l); + break; + } + if (n[2]) { + i.ops.pop(); + } + i.trys.pop(); + continue; + } + l = e.call(t, i); + } catch (u) { + l = [6, u]; + r = 0; + } finally { + s = n = 0; + } + } + if (l[0] & 5) { + throw l[1]; + } + return { + value: l[0] ? l[1] : undefined, + done: true + }; + } + } + export var __createBinding = Object.create ? function (t, e, i, s = i) { + var r = Object.getOwnPropertyDescriptor(e, i); + if (!r || ("get" in r ? !e.__esModule : r.writable || r.configurable)) { + r = { + enumerable: true, + get: function () { + return e[i]; + } + }; + } + Object.defineProperty(t, s, r); + } : function (t, e, i, s = i) { + t[s] = e[i]; + }; + export function __exportStar(t, e) { + for (var i in t) { + if (i !== "default" && !Object.prototype.hasOwnProperty.call(e, i)) { + __createBinding(e, t, i); + } + } + } + export function __values(t) { + var e = typeof Symbol == "function" && Symbol.iterator; + var i = e && t[e]; + var s = 0; + if (i) { + return i.call(t); + } + if (t && typeof t.length == "number") { + return { + next: function () { + if (t && s >= t.length) { + t = undefined; + } + return { + value: t && t[s++], + done: !t + }; + } + }; + } + throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined."); + } + export function __read(t, e) { + var i = typeof Symbol == "function" && t[Symbol.iterator]; + if (!i) { + return t; + } + var s = i.call(t); + var r; + var n = []; + var o; + try { + while ((e === undefined || e-- > 0) && !(r = s.next()).done) { + n.push(r.value); + } + } catch (a) { + o = { + error: a + }; + } finally { + try { + if (r && !r.done && (i = s.return)) { + i.call(s); + } + } finally { + if (o) { + throw o.error; + } + } + } + return n; + } + export function __spread() { + var t = []; + for (var e = 0; e < arguments.length; e++) { + t = t.concat(__read(arguments[e])); + } + return t; + } + export function __spreadArrays() { + var t = 0; + for (var e = 0, i = arguments.length; e < i; e++) { + t += arguments[e].length; + } + var s = Array(t); + var r = 0; + for (var e = 0; e < i; e++) { + var n = arguments[e]; + for (var o = 0, a = n.length; o < a; o++, r++) { + s[r] = n[o]; + } + } + return s; + } + export function __spreadArray(t, e, i) { + if (i || arguments.length === 2) { + for (var s = 0, r = e.length, n; s < r; s++) { + if (n || !(s in e)) { + n ||= Array.prototype.slice.call(e, 0, s); + n[s] = e[s]; + } + } + } + return t.concat(n || Array.prototype.slice.call(e)); + } + export function __await(t) { + if (this instanceof __await) { + this.v = t; + return this; + } else { + return new __await(t); + } + } + export function __asyncGenerator(t, e, i) { + if (!Symbol.asyncIterator) { + throw new TypeError("Symbol.asyncIterator is not defined."); + } + var s = i.apply(t, e || []); + var r; + var n = []; + r = {}; + a("next"); + a("throw"); + a("return", o); + r[Symbol.asyncIterator] = function () { + return this; + }; + return r; + function o(p) { + return function (w) { + return Promise.resolve(w).then(p, d); + }; + } + function a(p, w) { + if (s[p]) { + r[p] = function (m) { + return new Promise(function (y, b) { + if (!(n.push([p, m, y, b]) > 1)) { + c(p, m); + } + }); + }; + if (w) { + r[p] = w(r[p]); + } + } + } + function c(p, w) { + try { + l(s[p](w)); + } catch (m) { + f(n[0][3], m); + } + } + function l(p) { + if (p.value instanceof __await) { + Promise.resolve(p.value.v).then(u, d); + } else { + f(n[0][2], p); + } + } + function u(p) { + c("next", p); + } + function d(p) { + c("throw", p); + } + function f(p, w) { + p(w); + n.shift(); + if (n.length) { + c(n[0][0], n[0][1]); + } + } + } + export function __asyncDelegator(t) { + var e; + var i; + e = {}; + s("next"); + s("throw", function (r) { + throw r; + }); + s("return"); + e[Symbol.iterator] = function () { + return this; + }; + return e; + function s(r, n) { + e[r] = t[r] ? function (o) { + if (i = !i) { + return { + value: __await(t[r](o)), + done: false + }; + } else if (n) { + return n(o); + } else { + return o; + } + } : n; + } + } + export function __asyncValues(t) { + if (!Symbol.asyncIterator) { + throw new TypeError("Symbol.asyncIterator is not defined."); + } + var e = t[Symbol.asyncIterator]; + var i; + if (e) { + return e.call(t); + } else { + t = typeof __values == "function" ? __values(t) : t[Symbol.iterator](); + i = {}; + s("next"); + s("throw"); + s("return"); + i[Symbol.asyncIterator] = function () { + return this; + }; + return i; + } + function s(n) { + i[n] = t[n] && function (o) { + return new Promise(function (a, c) { + o = t[n](o); + r(a, c, o.done, o.value); + }); + }; + } + function r(n, o, a, c) { + Promise.resolve(c).then(function (l) { + n({ + value: l, + done: a + }); + }, o); + } + } + export function __makeTemplateObject(t, e) { + if (Object.defineProperty) { + Object.defineProperty(t, "raw", { + value: e + }); + } else { + t.raw = e; + } + return t; + } + var mS = Object.create ? function (t, e) { + Object.defineProperty(t, "default", { + enumerable: true, + value: e + }); + } : function (t, e) { + t.default = e; + }; + export function __importStar(t) { + if (t && t.__esModule) { + return t; + } + var e = {}; + if (t != null) { + for (var i in t) { + if (i !== "default" && Object.prototype.hasOwnProperty.call(t, i)) { + __createBinding(e, t, i); + } + } + } + mS(e, t); + return e; + } + export function __importDefault(t) { + if (t && t.__esModule) { + return t; + } else { + return { + default: t + }; + } + } + export function __classPrivateFieldGet(t, e, i, s) { + if (i === "a" && !s) { + throw new TypeError("Private accessor was defined without a getter"); + } + if (typeof e == "function" ? t !== e || !s : !e.has(t)) { + throw new TypeError("Cannot read private member from an object whose class did not declare it"); + } + if (i === "m") { + return s; + } else if (i === "a") { + return s.call(t); + } else if (s) { + return s.value; + } else { + return e.get(t); + } + } + export function __classPrivateFieldSet(t, e, i, s, r) { + if (s === "m") { + throw new TypeError("Private method is not writable"); + } + if (s === "a" && !r) { + throw new TypeError("Private accessor was defined without a setter"); + } + if (typeof e == "function" ? t !== e || !r : !e.has(t)) { + throw new TypeError("Cannot write private member to an object whose class did not declare it"); + } + if (s === "a") { + r.call(t, i); + } else if (r) { + r.value = i; + } else { + e.set(t, i); + } + return i; + } + export function __classPrivateFieldIn(t, e) { + if (e === null || typeof e != "object" && typeof e != "function") { + throw new TypeError("Cannot use 'in' operator on non-object"); + } + if (typeof t == "function") { + return e === t; + } else { + return t.has(e); + } + } + export function __addDisposableResource(t, e, i) { + if (e != null) { + if (typeof e != "object" && typeof e != "function") { + throw new TypeError("Object expected."); + } + var s; + var r; + if (i) { + if (!Symbol.asyncDispose) { + throw new TypeError("Symbol.asyncDispose is not defined."); + } + s = e[Symbol.asyncDispose]; + } + if (s === undefined) { + if (!Symbol.dispose) { + throw new TypeError("Symbol.dispose is not defined."); + } + s = e[Symbol.dispose]; + if (i) { + r = s; + } + } + if (typeof s != "function") { + throw new TypeError("Object not disposable."); + } + if (r) { + s = function () { + try { + r.call(this); + } catch (n) { + return Promise.reject(n); + } + }; + } + t.stack.push({ + value: e, + dispose: s, + async: i + }); + } else if (i) { + t.stack.push({ + async: true + }); + } + return e; + } + var wS = typeof SuppressedError == "function" ? SuppressedError : function (t, e, i) { + var s = new Error(i); + s.name = "SuppressedError"; + s.error = t; + s.suppressed = e; + return s; + }; + export function __disposeResources(t) { + function e(s) { + t.error = t.hasError ? new wS(s, t.error, "An error was suppressed during disposal.") : s; + t.hasError = true; + } + function i() { + while (t.stack.length) { + var s = t.stack.pop(); + try { + var r = s.dispose && s.dispose.call(s.value); + if (s.async) { + return Promise.resolve(r).then(i, function (n) { + e(n); + return i(); + }); + } + } catch (n) { + e(n); + } + } + if (t.hasError) { + throw t.error; + } + } + return i(); + } + export default { + __extends, + __assign, + __rest, + __decorate, + __param, + __metadata, + __awaiter, + __generator, + __createBinding, + __exportStar, + __values, + __read, + __spread, + __spreadArrays, + __spreadArray, + __await, + __asyncGenerator, + __asyncDelegator, + __asyncValues, + __makeTemplateObject, + __importStar, + __importDefault, + __classPrivateFieldGet, + __classPrivateFieldSet, + __classPrivateFieldIn, + __addDisposableResource, + __disposeResources + }; + var vS = Object.create; + var _0 = Object.defineProperty; + var bS = Object.getOwnPropertyDescriptor; + var Mf = Object.getOwnPropertyNames; + var yS = Object.getPrototypeOf; + var SS = Object.prototype.hasOwnProperty; + var g = (t, e) => function () { + if (t) { + e = (0, t[Mf(t)[0]])(t = 0); + } + return e; + }; + var ES = (t, e) => function () { + if (!e) { + (0, t[Mf(t)[0]])((e = { + exports: {} + }).exports, e); + } + return e.exports; + }; + var kS = (t, e, i, s) => { + if (e && typeof e == "object" || typeof e == "function") { + for (let r of Mf(e)) { + if (!SS.call(t, r) && r !== i) { + _0(t, r, { + get: () => e[r], + enumerable: !(s = bS(e, r)) || s.enumerable + }); + } + } + } + return t; + }; + var R0 = (t, e, i) => { + i = t != null ? vS(yS(t)) : {}; + return kS(e || !t || !t.__esModule ? _0(i, "default", { + value: t, + enumerable: true + }) : i, t); + }; + function Ff(t) { + const e = []; + if (typeof t == "number") { + e.push("code/timeOrigin", t); + } + function i(r, n) { + e.push(r, n?.startTime ?? Date.now()); + } + function s() { + const r = []; + for (let n = 0; n < e.length; n += 2) { + r.push({ + name: e[n], + startTime: e[n + 1] + }); + } + return r; + } + return { + mark: i, + getMarks: s + }; + } + function xS() { + if (typeof performance == "object" && typeof performance.mark == "function" && !performance.nodeTiming) { + if (typeof performance.timeOrigin != "number" && !performance.timing) { + return Ff(); + } else { + return { + mark(t, e) { + performance.mark(t, e); + }, + getMarks() { + let t = performance.timeOrigin; + if (typeof t != "number") { + t = performance.timing.navigationStart || performance.timing.redirectStart || performance.timing.fetchStart; + } + const e = [{ + name: "code/timeOrigin", + startTime: Math.round(t) + }]; + for (const i of performance.getEntriesByType("mark")) { + e.push({ + name: i.name, + startTime: Math.round(t + i.startTime) + }); + } + return e; + } + }; + } + } + if (typeof process == "object") { + const t = performance?.timeOrigin; + return Ff(t); + } else { + console.trace("perf-util loaded in UNKNOWN environment"); + return Ff(); + } + } + function DS(t) { + t.MonacoPerformanceMarks ||= xS(); + return t.MonacoPerformanceMarks; + } + var Nf; + var Ne; + var Wf; + var Hs = g({ + "out-build/vs/base/common/performance.js"() { + "use strict"; + + Nf = DS(globalThis); + Ne = Nf.mark; + Wf = Nf.getMarks; + } + }); + var O0 = ES({ + "node_modules/minimist/index.js"(t, e) { + e.exports = function (n, o) { + o ||= {}; + var a = { + bools: {}, + strings: {}, + unknownFn: null + }; + if (typeof o.unknown == "function") { + a.unknownFn = o.unknown; + } + if (typeof o.boolean == "boolean" && o.boolean) { + a.allBools = true; + } else { + [].concat(o.boolean).filter(Boolean).forEach(function (W) { + a.bools[W] = true; + }); + } + var c = {}; + Object.keys(o.alias || {}).forEach(function (W) { + c[W] = [].concat(o.alias[W]); + c[W].forEach(function (Ee) { + c[Ee] = [W].concat(c[W].filter(function (Ye) { + return Ee !== Ye; + })); + }); + }); + [].concat(o.string).filter(Boolean).forEach(function (W) { + a.strings[W] = true; + if (c[W]) { + a.strings[c[W]] = true; + } + }); + var l = o.default || {}; + var u = { + _: [] + }; + Object.keys(a.bools).forEach(function (W) { + p(W, l[W] === undefined ? false : l[W]); + }); + var d = []; + if (n.indexOf("--") !== -1) { + d = n.slice(n.indexOf("--") + 1); + n = n.slice(0, n.indexOf("--")); + } + function f(W, Ee) { + return a.allBools && /^--[^=]+$/.test(Ee) || a.strings[W] || a.bools[W] || c[W]; + } + function p(W, Ee, Ye) { + if (!Ye || !a.unknownFn || !!f(W, Ye) || a.unknownFn(Ye) !== false) { + var re = !a.strings[W] && s(Ee) ? Number(Ee) : Ee; + w(u, W.split("."), re); + (c[W] || []).forEach(function (St) { + w(u, St.split("."), re); + }); + } + } + function w(W, Ee, Ye) { + var re = W; + for (var St = 0; St < Ee.length - 1; St++) { + var L = Ee[St]; + if (r(re, L)) { + return; + } + if (re[L] === undefined) { + re[L] = {}; + } + if (re[L] === Object.prototype || re[L] === Number.prototype || re[L] === String.prototype) { + re[L] = {}; + } + if (re[L] === Array.prototype) { + re[L] = []; + } + re = re[L]; + } + var L = Ee[Ee.length - 1]; + if (!r(re, L)) { + if (re === Object.prototype || re === Number.prototype || re === String.prototype) { + re = {}; + } + if (re === Array.prototype) { + re = []; + } + if (re[L] === undefined || a.bools[L] || typeof re[L] == "boolean") { + re[L] = Ye; + } else if (Array.isArray(re[L])) { + re[L].push(Ye); + } else { + re[L] = [re[L], Ye]; + } + } + } + function m(W) { + return c[W].some(function (Ee) { + return a.bools[Ee]; + }); + } + for (var y = 0; y < n.length; y++) { + var b = n[y]; + if (/^--.+=/.test(b)) { + var k = b.match(/^--([^=]+)=([\s\S]*)$/); + var A = k[1]; + var C = k[2]; + if (a.bools[A]) { + C = C !== "false"; + } + p(A, C, b); + } else if (/^--no-.+/.test(b)) { + var A = b.match(/^--no-(.+)/)[1]; + p(A, false, b); + } else if (/^--.+/.test(b)) { + var A = b.match(/^--(.+)/)[1]; + var _ = n[y + 1]; + if (_ !== undefined && !/^-/.test(_) && !a.bools[A] && !a.allBools && (!c[A] || !m(A))) { + p(A, _, b); + y++; + } else if (/^(true|false)$/.test(_)) { + p(A, _ === "true", b); + y++; + } else { + p(A, a.strings[A] ? "" : true, b); + } + } else if (/^-[^-]+/.test(b)) { + for (var Z = b.slice(1, -1).split(""), ie = false, me = 0; me < Z.length; me++) { + var _ = b.slice(me + 2); + if (_ === "-") { + p(Z[me], _, b); + continue; + } + if (/[A-Za-z]/.test(Z[me]) && /=/.test(_)) { + p(Z[me], _.split("=")[1], b); + ie = true; + break; + } + if (/[A-Za-z]/.test(Z[me]) && /-?\d+(\.\d*)?(e-?\d+)?$/.test(_)) { + p(Z[me], _, b); + ie = true; + break; + } + if (Z[me + 1] && Z[me + 1].match(/\W/)) { + p(Z[me], b.slice(me + 2), b); + ie = true; + break; + } else { + p(Z[me], a.strings[Z[me]] ? "" : true, b); + } + } + var A = b.slice(-1)[0]; + if (!ie && A !== "-") { + if (n[y + 1] && !/^(-|--)[^-]/.test(n[y + 1]) && !a.bools[A] && (!c[A] || !m(A))) { + p(A, n[y + 1], b); + y++; + } else if (n[y + 1] && /^(true|false)$/.test(n[y + 1])) { + p(A, n[y + 1] === "true", b); + y++; + } else { + p(A, a.strings[A] ? "" : true, b); + } + } + } else { + if (!a.unknownFn || a.unknownFn(b) !== false) { + u._.push(a.strings._ || !s(b) ? b : Number(b)); + } + if (o.stopEarly) { + u._.push.apply(u._, n.slice(y + 1)); + break; + } + } + } + Object.keys(l).forEach(function (W) { + if (!i(u, W.split("."))) { + w(u, W.split("."), l[W]); + (c[W] || []).forEach(function (Ee) { + w(u, Ee.split("."), l[W]); + }); + } + }); + if (o["--"]) { + u["--"] = new Array(); + d.forEach(function (W) { + u["--"].push(W); + }); + } else { + d.forEach(function (W) { + u._.push(W); + }); + } + return u; + }; + function i(n, o) { + var a = n; + o.slice(0, -1).forEach(function (l) { + a = a[l] || {}; + }); + var c = o[o.length - 1]; + return c in a; + } + function s(n) { + if (typeof n == "number" || /^0x[0-9a-f]+$/i.test(n)) { + return true; + } else { + return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(n); + } + } + function r(n, o) { + return o === "constructor" && typeof n[o] == "function" || o === "__proto__"; + } + } + }); + function PS(t) { + return t.replace(M0, function (e, i, s, r, n, o) { + if (r) { + return ""; + } + if (n) { + const a = n.length; + if (n[a - 1] === ` + `) { + if (n[a - 2] === "\r") { + return `\r + `; + } else { + return ` + `; + } + } else { + return ""; + } + } else if (o) { + return e.substring(1); + } else { + return e; + } + }); + } + function L0(t) { + const e = PS(t); + try { + return JSON.parse(e); + } catch { + const s = e.replace(/,\s*([}\]])/g, "$1"); + return JSON.parse(s); + } + } + var M0; + var F0 = g({ + "out-build/vs/base/common/jsonc.js"() { + "use strict"; + + M0 = /("[^"\\]*(?:\\.[^"\\]*)*")|('[^'\\]*(?:\\.[^'\\]*)*')|(\/\*[^\/\*]*(?:(?:\*|\/)[^\/\*]*)*?\*\/)|(\/{2,}.*?(?:(?:\r?\n)|$))|(,\s*[}\]])/g; + } + }); + import * as N0 from "os"; + import * as dr from "path"; + function W0(t, e) { + const i = $S(t, e); + const s = [i]; + if (!dr.isAbsolute(i)) { + s.unshift(T0); + } + return dr.resolve(...s); + } + function $S(t, e) { + if (process.env.VSCODE_DEV) { + e = "code-oss-dev"; + } + const i = process.env.VSCODE_PORTABLE; + if (i) { + return dr.join(i, "user-data"); + } + let s = process.env.VSCODE_APPDATA; + if (s) { + return dr.join(s, e); + } + const r = t["user-data-dir"]; + if (r) { + return r; + } + switch (process.platform) { + case "win32": + s = process.env.APPDATA; + if (!s) { + const n = process.env.USERPROFILE; + if (typeof n != "string") { + throw new Error("Windows: Unexpected undefined %USERPROFILE% environment variable"); + } + s = dr.join(n, "AppData", "Roaming"); + } + break; + case "darwin": + s = dr.join(N0.homedir(), "Library", "Application Support"); + break; + case "linux": + s = process.env.XDG_CONFIG_HOME || dr.join(N0.homedir(), ".config"); + break; + default: + throw new Error("Platform not supported"); + } + return dr.join(s, e); + } + var T0; + var j0 = g({ + "out-build/vs/platform/environment/node/userDataPath.js"() { + "use strict"; + + T0 = process.env.VSCODE_CWD || process.cwd(); + } + }); + function IS() { + const t = U0(); + if (t) { + return Array.from(t); + } else { + return []; + } + } + function U0() { + return process.uncHostAllowlist; + } + function ma(t) { + if (process.platform !== "win32") { + return; + } + const e = U0(); + if (e) { + if (typeof t == "string") { + e.add(t.toLowerCase()); + } else { + for (const i of AS(t)) { + ma(i); + } + } + } + } + function AS(t) { + const e = new Set(); + if (Array.isArray(t)) { + for (const i of t) { + if (typeof i == "string") { + e.add(i); + } + } + } + return Array.from(e); + } + function B0(t) { + if (typeof t != "string") { + return; + } + const e = ["\\\\.\\UNC\\", "\\\\?\\UNC\\", "\\\\"]; + let i; + for (const s of e) { + if (t.indexOf(s) !== 0) { + continue; + } + const n = t.indexOf("\\", s.length); + if (n === -1) { + continue; + } + const o = t.substring(s.length, n); + if (o) { + i = o; + break; + } + } + return i; + } + function CS() { + if (process.platform === "win32") { + process.restrictUNCAccess = false; + } + } + function _S() { + if (process.platform !== "win32") { + return true; + } else { + return process.restrictUNCAccess === false; + } + } + var wa = g({ + "out-build/vs/base/node/unc.js"() { + "use strict"; + } + }); + function qt() { + return globalThis._CURSOR_SENTRY; + } + function RS() { + return { + send: function (e) { + const i = qt().buffer; + if (i.length < 64) { + i.push(e); + } + return Promise.resolve({ + statusCode: 200 + }); + }, + flush: function (e) { + return Promise.resolve(true); + } + }; + } + function OS() { + return { + send: function (t) { + if (qt().enabled) { + return qt().transport.send(t); + } else { + return Promise.resolve({ + statusCode: 200 + }); + } + }, + flush: function (t) { + return qt().transport.flush(t); + } + }; + } + function LS() { + return function (t) { + if (t.attributes?.["sentry.sample_rate"] === undefined) { + return 0; + } else { + return 1; + } + }; + } + function MS() { + return { + defaultIntegrations: [], + dsn: q0, + parentSpanIsAlwaysRootSpan: true, + tracesSampler: LS(), + transport: OS + }; + } + var q0; + var va = g({ + "out-build/vs/platform/tracing/common/global.js"() { + "use strict"; + + q0 = "https://80ec2259ebfad12d8aa2afe6eb4f6dd5@metrics.cursor.sh/4508016051945472"; + if (globalThis._CURSOR_SENTRY === undefined) { + globalThis._CURSOR_SENTRY = { + buffer: [], + enabled: true, + loggerSampleRate: 1, + sentry: undefined, + tracesSampleRate: 0.01, + profilesSampleRate: 0, + jsonStringifySampleRate: 0, + transport: RS() + }; + } + } + }); + function Tf() { + return globalThis._VSCODE_NLS_MESSAGES; + } + function Ll() { + return globalThis._VSCODE_NLS_LANGUAGE; + } + var z0 = g({ + "out-build/vs/nls.messages.js"() { + "use strict"; + } + }); + function Ml(t, e) { + let i; + if (e.length === 0) { + i = t; + } else { + i = t.replace(/\{(\d+)\}/g, (s, r) => { + const n = r[0]; + const o = e[n]; + let a = s; + if (typeof o == "string") { + a = o; + } else if (typeof o == "number" || typeof o == "boolean" || o === undefined || o === null) { + a = String(o); + } + return a; + }); + } + if (G0) { + i = "[" + i.replace(/[aouei]/g, "$&$&") + "]"; + } + return i; + } + function v(t, e, ...i) { + return Ml(typeof t == "number" ? H0(t, e) : e, i); + } + function H0(t, e) { + const i = Tf()?.[t]; + if (typeof i != "string") { + if (typeof e == "string") { + return e; + } + throw new Error(`!!! NLS MISSING: ${t} !!!`); + } + return i; + } + function V0(t, e, ...i) { + let s; + if (typeof t == "number") { + s = H0(t, e); + } else { + s = e; + } + const r = Ml(s, i); + return { + value: r, + original: e === s ? r : Ml(e, i) + }; + } + var G0; + var be = g({ + "out-build/vs/nls.js"() { + "use strict"; + + z0(); + z0(); + G0 = Ll() === "pseudo" || typeof document !== "undefined" && document.location && typeof document.location.hash == "string" && document.location.hash.indexOf("pseudo=true") >= 0; + } + }); + function J0(t) { + switch (t) { + case 0: + return "Web"; + case 1: + return "Mac"; + case 2: + return "Linux"; + case 3: + return "Windows"; + } + } + function FS(t) { + return parseFloat(t) >= 20; + } + var Hr; + var Hn; + var Vn; + var Gn; + var jf; + var Uf; + var Fl; + var K0; + var Bf; + var qf; + var Z0; + var ba; + var ya; + var zf; + var Hf; + var ws; + var vs; + var Xt; + var Vf; + var Y0; + var X0; + var Sa; + var j; + var N; + var Se; + var Gf; + var Jf; + var fr; + var Q0; + var ew; + var tw; + var Ea; + var is; + var Hi; + var iw; + var Kf; + var sw; + var rw; + var nw; + var Wi; + var Zf; + var ow; + var aw; + var cw; + var NS; + var WS; + var TS; + var H = g({ + "out-build/vs/base/common/platform.js"() { + "use strict"; + + be(); + Hr = "en"; + Hn = false; + Vn = false; + Gn = false; + jf = false; + Uf = false; + Fl = false; + K0 = false; + Bf = false; + qf = false; + Z0 = false; + ba = undefined; + ya = Hr; + zf = Hr; + Hf = undefined; + ws = undefined; + vs = globalThis; + Xt = undefined; + if (typeof vs.vscode !== "undefined" && typeof vs.vscode.process !== "undefined") { + Xt = vs.vscode.process; + } else if (typeof process !== "undefined" && typeof process?.versions?.node == "string") { + Xt = process; + } + Vf = typeof Xt?.versions?.electron == "string"; + Y0 = Vf && Xt?.type === "renderer"; + if (typeof Xt == "object") { + Hn = Xt.platform === "win32"; + Vn = Xt.platform === "darwin"; + Gn = Xt.platform === "linux"; + jf = Gn && !!Xt.env.SNAP && !!Xt.env.SNAP_REVISION; + K0 = Vf; + qf = !!Xt.env.CI || !!Xt.env.BUILD_ARTIFACTSTAGINGDIRECTORY; + ba = Hr; + ya = Hr; + const t = Xt.env.VSCODE_NLS_CONFIG; + if (t) { + try { + const e = JSON.parse(t); + ba = e.userLocale; + zf = e.osLocale; + ya = e.resolvedLanguage || Hr; + Hf = e.languagePack?.translationsConfigFile; + } catch {} + } + Uf = true; + } else if (typeof navigator == "object" && !Y0) { + ws = navigator.userAgent; + Hn = ws.indexOf("Windows") >= 0; + Vn = ws.indexOf("Macintosh") >= 0; + Bf = (ws.indexOf("Macintosh") >= 0 || ws.indexOf("iPad") >= 0 || ws.indexOf("iPhone") >= 0) && !!navigator.maxTouchPoints && navigator.maxTouchPoints > 0; + Gn = ws.indexOf("Linux") >= 0; + Z0 = ws?.indexOf("Mobi") >= 0; + Fl = true; + ya = Ll() || Hr; + ba = navigator.language.toLowerCase(); + zf = ba; + } else { + console.error("Unable to resolve platform."); + } + (function (t) { + t[t.Web = 0] = "Web"; + t[t.Mac = 1] = "Mac"; + t[t.Linux = 2] = "Linux"; + t[t.Windows = 3] = "Windows"; + })(X0 ||= {}); + Sa = 0; + if (Vn) { + Sa = 1; + } else if (Hn) { + Sa = 3; + } else if (Gn) { + Sa = 2; + } + j = Hn; + N = Vn; + Se = Gn; + Gf = jf; + Jf = Uf; + fr = Fl; + Q0 = Fl && typeof vs.importScripts == "function"; + ew = Q0 ? vs.origin : undefined; + tw = qf; + Ea = Sa; + is = ws; + Hi = ya; + (function (t) { + function e() { + return Hi; + } + t.value = e; + function i() { + if (Hi.length === 2) { + return Hi === "en"; + } else if (Hi.length >= 3) { + return Hi[0] === "e" && Hi[1] === "n" && Hi[2] === "-"; + } else { + return false; + } + } + t.isDefaultVariant = i; + function s() { + return Hi === "en"; + } + t.isDefault = s; + })(iw ||= {}); + Kf = Hf; + sw = typeof vs.postMessage == "function" && !vs.importScripts; + rw = (() => { + if (sw) { + const t = []; + vs.addEventListener("message", i => { + if (i.data && i.data.vscodeScheduleAsyncWork) { + for (let s = 0, r = t.length; s < r; s++) { + const n = t[s]; + if (n.id === i.data.vscodeScheduleAsyncWork) { + t.splice(s, 1); + n.callback(); + return; + } + } + } + }); + let e = 0; + return i => { + const s = ++e; + t.push({ + id: s, + callback: i + }); + vs.postMessage({ + vscodeScheduleAsyncWork: s + }, "*"); + }; + } + return t => setTimeout(t); + })(); + (function (t) { + t[t.Windows = 1] = "Windows"; + t[t.Macintosh = 2] = "Macintosh"; + t[t.Linux = 3] = "Linux"; + })(nw ||= {}); + Wi = Vn || Bf ? 2 : Hn ? 1 : 3; + Zf = !!is && !!(is.indexOf("Chrome") >= 0); + ow = !!is && !!(is.indexOf("Firefox") >= 0); + aw = !Zf && !!is && !!(is.indexOf("Safari") >= 0); + cw = !!is && !!(is.indexOf("Edg/") >= 0); + NS = !!is && !!(is.indexOf("Android") >= 0); + WS = Xt?.arch; + TS = Xt?.platform; + } + }); + function jS(t, e, i = 0, s = t.length) { + let r = i; + let n = s; + while (r < n) { + const o = Math.floor((r + n) / 2); + if (e(t[o])) { + r = o + 1; + } else { + n = o; + } + } + return r - 1; + } + function US(t, e, i = 0, s = t.length) { + let r = i; + let n = s; + while (r < n) { + const o = Math.floor((r + n) / 2); + if (e(t[o])) { + n = o; + } else { + r = o + 1; + } + } + return r; + } + var BS; + var qS = g({ + "out-build/vs/base/common/arraysFind.js"() { + "use strict"; + + BS = class R3 { + static { + this.assertInvariants = false; + } + constructor(e) { + this.e = e; + this.c = 0; + } + findLastMonotonous(e) { + if (R3.assertInvariants) { + if (this.d) { + for (const s of this.e) { + if (this.d(s) && !e(s)) { + throw new Error("MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate."); + } + } + } + this.d = e; + } + const i = jS(this.e, e, this.c); + this.c = i + 1; + if (i === -1) { + return undefined; + } else { + return this.e[i]; + } + } + }; + } + }); + function lw(t) { + Wl.setUnexpectedErrorHandler(t); + } + function zS(t) { + if (!t || typeof t != "object") { + return false; + } + const e = t; + return e.code === "EPIPE" && e.syscall?.toUpperCase() === "WRITE"; + } + function Ft(t) { + if (!Nl(t)) { + Wl.onUnexpectedError(t); + } + } + function Nl(t) { + if (t instanceof hi) { + return true; + } else { + return t instanceof Error && t.name === ka && t.message === ka; + } + } + function Jn() { + const t = new Error(ka); + t.name = t.message; + return t; + } + function uw(t) { + if (t) { + return new Error(`Illegal state: ${t}`); + } else { + return new Error("Illegal state"); + } + } + function Vi(t) { + if (t) { + if (t.message) { + return t.message; + } else if (t.stack) { + return t.stack.split(` + `)[0]; + } else { + return String(t); + } + } else { + return "Error"; + } + } + var hw; + var Wl; + var ka; + var hi; + var Tl; + var Vs; + var $e = g({ + "out-build/vs/base/common/errors.js"() { + "use strict"; + + hw = class { + constructor() { + this.b = []; + this.a = function (t) { + setTimeout(() => { + throw t.stack ? Vs.isErrorNoTelemetry(t) ? new Vs(`${t.message} + + ${t.stack}`) : new Error(`${t.message} + + ${t.stack}`) : t; + }, 0); + }; + } + addListener(t) { + this.b.push(t); + return () => { + this.d(t); + }; + } + c(t) { + this.b.forEach(e => { + e(t); + }); + } + d(t) { + this.b.splice(this.b.indexOf(t), 1); + } + setUnexpectedErrorHandler(t) { + this.a = t; + } + getUnexpectedErrorHandler() { + return this.a; + } + onUnexpectedError(t) { + this.a(t); + this.c(t); + } + onUnexpectedExternalError(t) { + this.a(t); + } + }; + Wl = new hw(); + ka = "Canceled"; + hi = class extends Error { + constructor() { + super(ka); + this.name = this.message; + } + }; + Tl = class extends Error { + constructor() { + super(...arguments); + this.isExpected = true; + } + }; + Vs = class b0 extends Error { + constructor(e) { + super(e); + this.name = "CodeExpectedError"; + } + static fromError(e) { + if (e instanceof b0) { + return e; + } + const i = new b0(); + i.message = e.message; + i.stack = e.stack; + return i; + } + static isErrorNoTelemetry(e) { + return e.name === "CodeExpectedError"; + } + }; + } + }); + function xa(t, e, i = (s, r) => s === r) { + if (t === e) { + return true; + } + if (!t || !e || t.length !== e.length) { + return false; + } + for (let s = 0, r = t.length; s < r; s++) { + if (!i(t[s], e[s])) { + return false; + } + } + return true; + } + function HS(t, e, i) { + if (i === 0) { + return []; + } + const s = t.slice(0, i).sort(e); + VS(t, e, s, i, t.length); + return s; + } + function VS(t, e, i, s, r) { + for (const n = i.length; s < r; s++) { + const o = t[s]; + if (e(o, i[n - 1]) < 0) { + i.pop(); + const a = US(i, c => e(o, c) < 0); + i.splice(a, 0, o); + } + } + } + function $t(t) { + return t.filter(e => !!e); + } + function ss(t, e = i => i) { + const i = new Set(); + return t.filter(s => { + const r = e(s); + if (i.has(r)) { + return false; + } else { + i.add(r); + return true; + } + }); + } + function dw(t, e) { + t.push(e); + return () => GS(t, e); + } + function GS(t, e) { + const i = t.indexOf(e); + if (i > -1) { + t.splice(i, 1); + return e; + } + } + function fw(t, e) { + let i; + if (typeof e == "number") { + let s = e; + i = () => { + const r = Math.sin(s++) * 179426549; + return r - Math.floor(r); + }; + } else { + i = Math.random; + } + for (let s = t.length - 1; s > 0; s -= 1) { + const r = Math.floor(i() * (s + 1)); + const n = t[s]; + t[s] = t[r]; + t[r] = n; + } + } + function JS(t) { + return t[Math.floor(Math.random() * t.length)]; + } + function KS(t, e) { + return (i, s) => e(t(i), t(s)); + } + var Yf; + var pw; + var ZS; + var zt = g({ + "out-build/vs/base/common/arrays.js"() { + "use strict"; + + qS(); + $e(); + (function (t) { + function e(n) { + return n < 0; + } + t.isLessThan = e; + function i(n) { + return n <= 0; + } + t.isLessThanOrEqual = i; + function s(n) { + return n > 0; + } + t.isGreaterThan = s; + function r(n) { + return n === 0; + } + t.isNeitherLessOrGreaterThan = r; + t.greaterThan = 1; + t.lessThan = -1; + t.neitherLessOrGreaterThan = 0; + })(Yf ||= {}); + pw = (t, e) => t - e; + ZS = class bf { + static { + this.empty = new bf(e => {}); + } + constructor(e) { + this.iterate = e; + } + forEach(e) { + this.iterate(i => { + e(i); + return true; + }); + } + toArray() { + const e = []; + this.iterate(i => { + e.push(i); + return true; + }); + return e; + } + filter(e) { + return new bf(i => this.iterate(s => e(s) ? i(s) : true)); + } + map(e) { + return new bf(i => this.iterate(s => i(e(s)))); + } + some(e) { + let i = false; + this.iterate(s => { + i = e(s); + return !i; + }); + return i; + } + findFirst(e) { + let i; + this.iterate(s => e(s) ? (i = s, false) : true); + return i; + } + findLast(e) { + let i; + this.iterate(s => { + if (e(s)) { + i = s; + } + return true; + }); + return i; + } + findLastMaxBy(e) { + let i; + let s = true; + this.iterate(r => { + if (s || Yf.isGreaterThan(e(r, i))) { + s = false; + i = r; + } + return true; + }); + return i; + } + }; + } + }); + function YS(t, e) { + const i = Object.create(null); + for (const s of t) { + const r = e(s); + let n = i[r]; + n ||= i[r] = []; + n.push(s); + } + return i; + } + var gw; + var XS; + var mw = g({ + "out-build/vs/base/common/collections.js"() { + "use strict"; + + XS = class { + static { + gw = Symbol.toStringTag; + } + constructor(t, e) { + this.b = e; + this.a = new Map(); + this[gw] = "SetWithKey"; + for (const i of t) { + this.add(i); + } + } + get size() { + return this.a.size; + } + add(t) { + const e = this.b(t); + this.a.set(e, t); + return this; + } + delete(t) { + return this.a.delete(this.b(t)); + } + has(t) { + return this.a.has(this.b(t)); + } + *entries() { + for (const t of this.a.values()) { + yield [t, t]; + } + } + keys() { + return this.values(); + } + *values() { + for (const t of this.a.values()) { + yield t; + } + } + clear() { + this.a.clear(); + } + forEach(t, e) { + this.a.forEach(i => t.call(e, i, i, this)); + } + [Symbol.iterator]() { + return this.values(); + } + }; + } + }); + function jl(t, e) { + const i = this; + let s = false; + let r; + return function () { + if (s) { + return r; + } + s = true; + if (e) { + try { + r = t.apply(i, arguments); + } finally { + e(); + } + } else { + r = t.apply(i, arguments); + } + return r; + }; + } + var Ul = g({ + "out-build/vs/base/common/functional.js"() { + "use strict"; + } + }); + function QS(t) { + const e = []; + t.forEach((i, s) => { + e.push(`${s} => ${i}`); + }); + return `Map(${t.size}) {${e.join(", ")}}`; + } + function eE(t) { + const e = []; + t.forEach(i => { + e.push(i); + }); + return `Set(${t.size}) {${e.join(", ")}}`; + } + function tE(t) { + return Array.isArray(t); + } + var ww; + var vw; + var bw; + var yw; + var Ht; + var Sw; + var Ew; + var kw; + var xw; + var Da; + var Dw; + var $i = g({ + "out-build/vs/base/common/map.js"() { + "use strict"; + + yw = class { + constructor(t, e) { + this.uri = t; + this.value = e; + } + }; + Ht = class yl { + static { + this.c = e => e.toString(); + } + constructor(e, i) { + this[ww] = "ResourceMap"; + if (e instanceof yl) { + this.d = new Map(e.d); + this.e = i ?? yl.c; + } else if (tE(e)) { + this.d = new Map(); + this.e = i ?? yl.c; + for (const [s, r] of e) { + this.set(s, r); + } + } else { + this.d = new Map(); + this.e = e ?? yl.c; + } + } + set(e, i) { + this.d.set(this.e(e), new yw(e, i)); + return this; + } + get(e) { + return this.d.get(this.e(e))?.value; + } + has(e) { + return this.d.has(this.e(e)); + } + get size() { + return this.d.size; + } + clear() { + this.d.clear(); + } + delete(e) { + return this.d.delete(this.e(e)); + } + forEach(e, i) { + if (typeof i !== "undefined") { + e = e.bind(i); + } + for (const [s, r] of this.d) { + e(r.value, r.uri, this); + } + } + *values() { + for (const e of this.d.values()) { + yield e.value; + } + } + *keys() { + for (const e of this.d.values()) { + yield e.uri; + } + } + *entries() { + for (const e of this.d.values()) { + yield [e.uri, e.value]; + } + } + *[(ww = Symbol.toStringTag, Symbol.iterator)]() { + for (const [, e] of this.d) { + yield [e.uri, e.value]; + } + } + }; + Sw = class { + constructor(t, e) { + this[vw] = "ResourceSet"; + if (!t || typeof t == "function") { + this.c = new Ht(t); + } else { + this.c = new Ht(e); + t.forEach(this.add, this); + } + } + get size() { + return this.c.size; + } + add(t) { + this.c.set(t, t); + return this; + } + clear() { + this.c.clear(); + } + delete(t) { + return this.c.delete(t); + } + forEach(t, e) { + this.c.forEach((i, s) => t.call(e, s, s, this)); + } + has(t) { + return this.c.has(t); + } + entries() { + return this.c.entries(); + } + keys() { + return this.c.keys(); + } + values() { + return this.c.keys(); + } + [(vw = Symbol.toStringTag, Symbol.iterator)]() { + return this.keys(); + } + }; + (function (t) { + t[t.None = 0] = "None"; + t[t.AsOld = 1] = "AsOld"; + t[t.AsNew = 2] = "AsNew"; + })(Ew ||= {}); + kw = class { + constructor() { + this[bw] = "LinkedMap"; + this.c = new Map(); + this.d = undefined; + this.e = undefined; + this.f = 0; + this.g = 0; + } + clear() { + this.c.clear(); + this.d = undefined; + this.e = undefined; + this.f = 0; + this.g++; + } + isEmpty() { + return !this.d && !this.e; + } + get size() { + return this.f; + } + get first() { + return this.d?.value; + } + get last() { + return this.e?.value; + } + has(t) { + return this.c.has(t); + } + get(t, e = 0) { + const i = this.c.get(t); + if (i) { + if (e !== 0) { + this.m(i, e); + } + return i.value; + } + } + set(t, e, i = 0) { + let s = this.c.get(t); + if (s) { + s.value = e; + if (i !== 0) { + this.m(s, i); + } + } else { + s = { + key: t, + value: e, + next: undefined, + previous: undefined + }; + switch (i) { + case 0: + this.k(s); + break; + case 1: + this.j(s); + break; + case 2: + this.k(s); + break; + default: + this.k(s); + break; + } + this.c.set(t, s); + this.f++; + } + return this; + } + delete(t) { + return !!this.remove(t); + } + remove(t) { + const e = this.c.get(t); + if (e) { + this.c.delete(t); + this.l(e); + this.f--; + return e.value; + } + } + shift() { + if (!this.d && !this.e) { + return; + } + if (!this.d || !this.e) { + throw new Error("Invalid list"); + } + const t = this.d; + this.c.delete(t.key); + this.l(t); + this.f--; + return t.value; + } + forEach(t, e) { + const i = this.g; + let s = this.d; + while (s) { + if (e) { + t.bind(e)(s.value, s.key, this); + } else { + t(s.value, s.key, this); + } + if (this.g !== i) { + throw new Error("LinkedMap got modified during iteration."); + } + s = s.next; + } + } + keys() { + const t = this; + const e = this.g; + let i = this.d; + const s = { + [Symbol.iterator]() { + return s; + }, + next() { + if (t.g !== e) { + throw new Error("LinkedMap got modified during iteration."); + } + if (i) { + const r = { + value: i.key, + done: false + }; + i = i.next; + return r; + } else { + return { + value: undefined, + done: true + }; + } + } + }; + return s; + } + values() { + const t = this; + const e = this.g; + let i = this.d; + const s = { + [Symbol.iterator]() { + return s; + }, + next() { + if (t.g !== e) { + throw new Error("LinkedMap got modified during iteration."); + } + if (i) { + const r = { + value: i.value, + done: false + }; + i = i.next; + return r; + } else { + return { + value: undefined, + done: true + }; + } + } + }; + return s; + } + entries() { + const t = this; + const e = this.g; + let i = this.d; + const s = { + [Symbol.iterator]() { + return s; + }, + next() { + if (t.g !== e) { + throw new Error("LinkedMap got modified during iteration."); + } + if (i) { + const r = { + value: [i.key, i.value], + done: false + }; + i = i.next; + return r; + } else { + return { + value: undefined, + done: true + }; + } + } + }; + return s; + } + [(bw = Symbol.toStringTag, Symbol.iterator)]() { + return this.entries(); + } + h(t) { + if (t >= this.size) { + return; + } + if (t === 0) { + this.clear(); + return; + } + let e = this.d; + let i = this.size; + while (e && i > t) { + this.c.delete(e.key); + e = e.next; + i--; + } + this.d = e; + this.f = i; + if (e) { + e.previous = undefined; + } + this.g++; + } + i(t) { + if (t >= this.size) { + return; + } + if (t === 0) { + this.clear(); + return; + } + let e = this.e; + let i = this.size; + while (e && i > t) { + this.c.delete(e.key); + e = e.previous; + i--; + } + this.e = e; + this.f = i; + if (e) { + e.next = undefined; + } + this.g++; + } + j(t) { + if (!this.d && !this.e) { + this.e = t; + } else if (this.d) { + t.next = this.d; + this.d.previous = t; + } else { + throw new Error("Invalid list"); + } + this.d = t; + this.g++; + } + k(t) { + if (!this.d && !this.e) { + this.d = t; + } else if (this.e) { + t.previous = this.e; + this.e.next = t; + } else { + throw new Error("Invalid list"); + } + this.e = t; + this.g++; + } + l(t) { + if (t === this.d && t === this.e) { + this.d = undefined; + this.e = undefined; + } else if (t === this.d) { + if (!t.next) { + throw new Error("Invalid list"); + } + t.next.previous = undefined; + this.d = t.next; + } else if (t === this.e) { + if (!t.previous) { + throw new Error("Invalid list"); + } + t.previous.next = undefined; + this.e = t.previous; + } else { + const e = t.next; + const i = t.previous; + if (!e || !i) { + throw new Error("Invalid list"); + } + e.previous = i; + i.next = e; + } + t.next = undefined; + t.previous = undefined; + this.g++; + } + m(t, e) { + if (!this.d || !this.e) { + throw new Error("Invalid list"); + } + if (e === 1 || e === 2) { + if (e === 1) { + if (t === this.d) { + return; + } + const i = t.next; + const s = t.previous; + if (t === this.e) { + s.next = undefined; + this.e = s; + } else { + i.previous = s; + s.next = i; + } + t.previous = undefined; + t.next = this.d; + this.d.previous = t; + this.d = t; + this.g++; + } else if (e === 2) { + if (t === this.e) { + return; + } + const i = t.next; + const s = t.previous; + if (t === this.d) { + i.previous = undefined; + this.d = i; + } else { + i.previous = s; + s.next = i; + } + t.next = undefined; + t.previous = this.e; + this.e.next = t; + this.e = t; + this.g++; + } + } + } + toJSON() { + const t = []; + this.forEach((e, i) => { + t.push([i, e]); + }); + return t; + } + fromJSON(t) { + this.clear(); + for (const [e, i] of t) { + this.set(e, i); + } + } + }; + xw = class extends kw { + constructor(t, e = 1) { + super(); + this.n = t; + this.o = Math.min(Math.max(0, e), 1); + } + get limit() { + return this.n; + } + set limit(t) { + this.n = t; + this.p(); + } + get ratio() { + return this.o; + } + set ratio(t) { + this.o = Math.min(Math.max(0, t), 1); + this.p(); + } + get(t, e = 2) { + return super.get(t, e); + } + peek(t) { + return super.get(t, 0); + } + set(t, e) { + super.set(t, e, 2); + return this; + } + p() { + if (this.size > this.n) { + this.q(Math.round(this.n * this.o)); + } + } + }; + Da = class extends xw { + constructor(t, e = 1) { + super(t, e); + } + q(t) { + this.h(t); + } + set(t, e) { + super.set(t, e); + this.p(); + return this; + } + }; + Dw = class { + constructor() { + this.c = new Map(); + } + add(t, e) { + let i = this.c.get(t); + if (!i) { + i = new Set(); + this.c.set(t, i); + } + i.add(e); + } + delete(t, e) { + const i = this.c.get(t); + if (i) { + i.delete(e); + if (i.size === 0) { + this.c.delete(t); + } + } + } + forEach(t, e) { + const i = this.c.get(t); + if (i) { + i.forEach(e); + } + } + get(t) { + const e = this.c.get(t); + return e || new Set(); + } + }; + } + }); + var Vr; + var Bl = g({ + "out-build/vs/base/common/iterator.js"() { + "use strict"; + + (function (t) { + function e(C) { + return C && typeof C == "object" && typeof C[Symbol.iterator] == "function"; + } + t.is = e; + const i = Object.freeze([]); + function s() { + return i; + } + t.empty = s; + function* r(C) { + yield C; + } + t.single = r; + function n(C) { + if (e(C)) { + return C; + } else { + return r(C); + } + } + t.wrap = n; + function o(C) { + return C || i; + } + t.from = o; + function* a(C) { + for (let _ = C.length - 1; _ >= 0; _--) { + yield C[_]; + } + } + t.reverse = a; + function c(C) { + return !C || C[Symbol.iterator]().next().done === true; + } + t.isEmpty = c; + function l(C) { + return C[Symbol.iterator]().next().value; + } + t.first = l; + function u(C, _) { + let Z = 0; + for (const ie of C) { + if (_(ie, Z++)) { + return true; + } + } + return false; + } + t.some = u; + function d(C, _) { + for (const Z of C) { + if (_(Z)) { + return Z; + } + } + } + t.find = d; + function* f(C, _) { + for (const Z of C) { + if (_(Z)) { + yield Z; + } + } + } + t.filter = f; + function* p(C, _) { + let Z = 0; + for (const ie of C) { + yield _(ie, Z++); + } + } + t.map = p; + function* w(C, _) { + let Z = 0; + for (const ie of C) { + yield* _(ie, Z++); + } + } + t.flatMap = w; + function* m(...C) { + for (const _ of C) { + yield* _; + } + } + t.concat = m; + function y(C, _, Z) { + let ie = Z; + for (const me of C) { + ie = _(ie, me); + } + return ie; + } + t.reduce = y; + function* b(C, _, Z = C.length) { + if (_ < -C.length) { + _ = 0; + } + if (_ < 0) { + _ += C.length; + } + if (Z < 0) { + Z += C.length; + } else if (Z > C.length) { + Z = C.length; + } + for (; _ < Z; _++) { + yield C[_]; + } + } + t.slice = b; + function k(C, _ = Number.POSITIVE_INFINITY) { + const Z = []; + if (_ === 0) { + return [Z, C]; + } + const ie = C[Symbol.iterator](); + for (let me = 0; me < _; me++) { + const W = ie.next(); + if (W.done) { + return [Z, t.empty()]; + } + Z.push(W.value); + } + return [Z, { + [Symbol.iterator]() { + return ie; + } + }]; + } + t.consume = k; + async function A(C) { + const _ = []; + for await (const Z of C) { + _.push(Z); + } + return Promise.resolve(_); + } + t.asyncToArray = A; + })(Vr ||= {}); + } + }); + function iE(t) { + Gr = t; + } + function Pa(t) { + Gr?.trackDisposable(t); + return t; + } + function $a(t) { + Gr?.markAsDisposed(t); + } + function Ia(t, e) { + Gr?.setParent(t, e); + } + function sE(t, e) { + if (Gr) { + for (const i of t) { + Gr.setParent(i, e); + } + } + } + function rE(t) { + return typeof t == "object" && t !== null && typeof t.dispose == "function" && t.dispose.length === 0; + } + function Et(t) { + if (Vr.is(t)) { + const e = []; + for (const i of t) { + if (i) { + try { + i.dispose(); + } catch (s) { + e.push(s); + } + } + } + if (e.length === 1) { + throw e[0]; + } + if (e.length > 1) { + throw new AggregateError(e, "Encountered errors while disposing of store"); + } + if (Array.isArray(t)) { + return []; + } else { + return t; + } + } else if (t) { + t.dispose(); + return t; + } + } + function nE(...t) { + const e = xe(() => Et(t)); + sE(t, e); + return e; + } + function xe(t) { + const e = Pa({ + dispose: jl(() => { + $a(e); + t(); + }) + }); + return e; + } + var Pw; + var Gr; + var oE; + var De; + var T; + var pr; + var Xf; + var M = g({ + "out-build/vs/base/common/lifecycle.js"() { + "use strict"; + + zt(); + mw(); + $i(); + Ul(); + Bl(); + Pw = false; + Gr = null; + oE = class O3 { + constructor() { + this.b = new Map(); + } + static { + this.a = 0; + } + c(e) { + let i = this.b.get(e); + if (!i) { + i = { + parent: null, + source: null, + isSingleton: false, + value: e, + idx: O3.a++ + }; + this.b.set(e, i); + } + return i; + } + trackDisposable(e) { + const i = this.c(e); + i.source ||= new Error().stack; + } + setParent(e, i) { + const s = this.c(e); + s.parent = i; + } + markAsDisposed(e) { + this.b.delete(e); + } + markAsSingleton(e) { + this.c(e).isSingleton = true; + } + f(e, i) { + const s = i.get(e); + if (s) { + return s; + } + const r = e.parent ? this.f(this.c(e.parent), i) : e; + i.set(e, r); + return r; + } + getTrackedDisposables() { + const e = new Map(); + return [...this.b.entries()].filter(([, s]) => s.source !== null && !this.f(s, e).isSingleton).flatMap(([s]) => s); + } + computeLeakingDisposables(e = 10, i) { + let s; + if (i) { + s = i; + } else { + const c = new Map(); + const l = [...this.b.values()].filter(d => d.source !== null && !this.f(d, c).isSingleton); + if (l.length === 0) { + return; + } + const u = new Set(l.map(d => d.value)); + s = l.filter(d => !d.parent || !u.has(d.parent)); + if (s.length === 0) { + throw new Error("There are cyclic diposable chains!"); + } + } + if (!s) { + return; + } + function r(c) { + function l(d, f) { + while (d.length > 0 && f.some(p => typeof p == "string" ? p === d[0] : d[0].match(p))) { + d.shift(); + } + } + const u = c.source.split(` + `).map(d => d.trim().replace("at ", "")).filter(d => d !== ""); + l(u, ["Error", /^trackDisposable \(.*\)$/, /^DisposableTracker.trackDisposable \(.*\)$/]); + return u.reverse(); + } + const n = new Dw(); + for (const c of s) { + const l = r(c); + for (let u = 0; u <= l.length; u++) { + n.add(l.slice(0, u).join(` + `), c); + } + } + s.sort(KS(c => c.idx, pw)); + let o = ""; + let a = 0; + for (const c of s.slice(0, e)) { + a++; + const l = r(c); + const u = []; + for (let d = 0; d < l.length; d++) { + let f = l[d]; + f = `(shared with ${n.get(l.slice(0, d + 1).join(` + `)).size}/${s.length} leaks) at ${f}`; + const w = n.get(l.slice(0, d).join(` + `)); + const m = YS([...w].map(y => r(y)[d]), y => y); + delete m[l[d]]; + for (const [y, b] of Object.entries(m)) { + u.unshift(` - stacktraces of ${b.length} other leaks continue with ${y}`); + } + u.unshift(f); + } + o += ` + + + ==================== Leaking disposable ${a}/${s.length}: ${c.value.constructor.name} ==================== + ${u.join(` + `)} + ============================================================ + + `; + } + if (s.length > e) { + o += ` + + + ... and ${s.length - e} more leaking disposables + + `; + } + return { + leaks: s, + details: o + }; + } + }; + if (Pw) { + const t = "__is_disposable_tracked__"; + iE(new class { + trackDisposable(e) { + const i = new Error("Potentially leaked disposable").stack; + setTimeout(() => { + if (!e[t]) { + console.log(i); + } + }, 3000); + } + setParent(e, i) { + if (e && e !== T.None) { + try { + e[t] = true; + } catch {} + } + } + markAsDisposed(e) { + if (e && e !== T.None) { + try { + e[t] = true; + } catch {} + } + } + markAsSingleton(e) {} + }()); + } + De = class L3 { + static { + this.DISABLE_DISPOSED_WARNING = false; + } + constructor() { + this.f = new Set(); + this.g = false; + Pa(this); + } + dispose() { + if (!this.g) { + $a(this); + this.g = true; + this.clear(); + } + } + get isDisposed() { + return this.g; + } + clear() { + if (this.f.size !== 0) { + try { + Et(this.f); + } finally { + this.f.clear(); + } + } + } + add(e) { + if (!e) { + return e; + } + if (e === this) { + throw new Error("Cannot register a disposable on itself!"); + } + Ia(e, this); + if (this.g) { + if (!L3.DISABLE_DISPOSED_WARNING) { + console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack); + } + } else { + this.f.add(e); + } + return e; + } + delete(e) { + if (e) { + if (e === this) { + throw new Error("Cannot dispose a disposable on itself!"); + } + this.f.delete(e); + e.dispose(); + } + } + deleteAndLeak(e) { + if (e && this.f.has(e)) { + this.f.delete(e); + Ia(e, null); + } + } + }; + T = class { + static { + this.None = Object.freeze({ + dispose() {} + }); + } + constructor() { + this.B = new De(); + Pa(this); + Ia(this.B, this); + } + dispose() { + $a(this); + this.B.dispose(); + } + D(t) { + if (t === this) { + throw new Error("Cannot register a disposable on itself!"); + } + return this.B.add(t); + } + }; + pr = class { + constructor() { + this.b = false; + Pa(this); + } + get value() { + if (this.b) { + return undefined; + } else { + return this.a; + } + } + set value(t) { + if (!this.b && t !== this.a) { + this.a?.dispose(); + if (t) { + Ia(t, this); + } + this.a = t; + } + } + clear() { + this.value = undefined; + } + dispose() { + this.b = true; + $a(this); + this.a?.dispose(); + this.a = undefined; + } + clearAndLeak() { + const t = this.a; + this.a = undefined; + if (t) { + Ia(t, null); + } + return t; + } + }; + Xf = class { + constructor() { + this.a = new Map(); + this.b = false; + Pa(this); + } + dispose() { + $a(this); + this.b = true; + this.clearAndDisposeAll(); + } + clearAndDisposeAll() { + if (this.a.size) { + try { + Et(this.a.values()); + } finally { + this.a.clear(); + } + } + } + has(t) { + return this.a.has(t); + } + get size() { + return this.a.size; + } + get(t) { + return this.a.get(t); + } + set(t, e, i = false) { + if (this.b) { + console.warn(new Error("Trying to add a disposable to a DisposableMap that has already been disposed of. The added object will be leaked!").stack); + } + if (!i) { + this.a.get(t)?.dispose(); + } + this.a.set(t, e); + } + deleteAndDispose(t) { + this.a.get(t)?.dispose(); + this.a.delete(t); + } + deleteAndLeak(t) { + const e = this.a.get(t); + this.a.delete(t); + return e; + } + keys() { + return this.a.keys(); + } + values() { + return this.a.values(); + } + [Symbol.iterator]() { + return this.a[Symbol.iterator](); + } + }; + } + }); + var et; + var Qf; + var $w = g({ + "out-build/vs/base/common/linkedList.js"() { + "use strict"; + + et = class yf { + static { + this.Undefined = new yf(undefined); + } + constructor(e) { + this.element = e; + this.next = yf.Undefined; + this.prev = yf.Undefined; + } + }; + Qf = class { + constructor() { + this.a = et.Undefined; + this.b = et.Undefined; + this.c = 0; + } + get size() { + return this.c; + } + get first() { + return this.a; + } + isEmpty() { + return this.a === et.Undefined; + } + clear() { + let t = this.a; + while (t !== et.Undefined) { + const e = t.next; + t.prev = et.Undefined; + t.next = et.Undefined; + t = e; + } + this.a = et.Undefined; + this.b = et.Undefined; + this.c = 0; + } + unshift(t) { + return this.d(t, false); + } + push(t) { + return this.d(t, true); + } + d(t, e) { + const i = new et(t); + if (this.a === et.Undefined) { + this.a = i; + this.b = i; + } else if (e) { + const r = this.b; + this.b = i; + i.prev = r; + r.next = i; + } else { + const r = this.a; + this.a = i; + i.next = r; + r.prev = i; + } + this.c += 1; + let s = false; + return () => { + if (!s) { + s = true; + this.e(i); + } + }; + } + shift() { + if (this.a !== et.Undefined) { + const t = this.a.element; + this.e(this.a); + return t; + } + } + pop() { + if (this.b !== et.Undefined) { + const t = this.b.element; + this.e(this.b); + return t; + } + } + remove(t) { + this.e(t); + } + e(t) { + if (t.prev !== et.Undefined && t.next !== et.Undefined) { + const e = t.prev; + e.next = t.next; + t.next.prev = e; + } else if (t.prev === et.Undefined && t.next === et.Undefined) { + this.a = et.Undefined; + this.b = et.Undefined; + } else if (t.next === et.Undefined) { + this.b = this.b.prev; + this.b.next = et.Undefined; + } else if (t.prev === et.Undefined) { + this.a = this.a.next; + this.a.prev = et.Undefined; + } + this.c -= 1; + } + *[Symbol.iterator]() { + let t = this.a; + while (t !== et.Undefined) { + yield t.element; + t = t.next; + } + } + }; + } + }); + var Iw; + var Jr; + var Kn = g({ + "out-build/vs/base/common/stopwatch.js"() { + "use strict"; + + Iw = globalThis.performance && typeof globalThis.performance.now == "function"; + Jr = class M3 { + static create(e) { + return new M3(e); + } + constructor(e) { + this.c = Iw && e === false ? Date.now : globalThis.performance.now.bind(globalThis.performance); + this.a = this.c(); + this.b = -1; + } + stop() { + this.b = this.c(); + } + reset() { + this.a = this.c(); + this.b = -1; + } + elapsed() { + if (this.b !== -1) { + return this.b - this.a; + } else { + return this.c() - this.a; + } + } + }; + } + }); + var ep; + var Aw; + var x; + var Cw; + var tp; + var _w; + var ql; + var Rw; + var Ow; + var Lw; + var Aa; + var Mw; + var Fw; + var $; + var Nw; + var zl; + var Ww; + var ip; + var B = g({ + "out-build/vs/base/common/event.js"() { + "use strict"; + + mw(); + $e(); + Ul(); + M(); + $w(); + Kn(); + ep = false; + Aw = false; + (function (t) { + t.None = () => T.None; + function e(L) { + if (Aw) { + const { + onDidAddListener: O + } = L; + const G = ql.create(); + let U = 0; + L.onDidAddListener = () => { + if (++U === 2) { + console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here"); + G.print(); + } + O?.(); + }; + } + } + function i(L, O) { + return p(L, () => {}, 0, undefined, true, undefined, O); + } + t.defer = i; + function s(L) { + return (O, G = null, U) => { + let te = false; + let pe; + pe = L(Ce => { + if (!te) { + if (pe) { + pe.dispose(); + } else { + te = true; + } + return O.call(G, Ce); + } + }, null, U); + if (te) { + pe.dispose(); + } + return pe; + }; + } + t.once = s; + function r(L, O) { + return t.once(t.filter(L, O)); + } + t.onceIf = r; + function n(L, O, G) { + return d((U, te = null, pe) => L(Ce => U.call(te, O(Ce)), null, pe), G); + } + t.map = n; + function o(L, O, G) { + return d((U, te = null, pe) => L(Ce => { + O(Ce); + U.call(te, Ce); + }, null, pe), G); + } + t.forEach = o; + function a(L, O, G) { + return d((U, te = null, pe) => L(Ce => O(Ce) && U.call(te, Ce), null, pe), G); + } + t.filter = a; + function c(L) { + return L; + } + t.signal = c; + function l(...L) { + return (O, G = null, U) => { + const te = nE(...L.map(pe => pe(Ce => O.call(G, Ce)))); + return f(te, U); + }; + } + t.any = l; + function u(L, O, G, U) { + let te = G; + return n(L, pe => { + te = O(te, pe); + return te; + }, U); + } + t.reduce = u; + function d(L, O) { + let G; + const U = { + onWillAddFirstListener() { + G = L(te.fire, te); + }, + onDidRemoveLastListener() { + G?.dispose(); + } + }; + if (!O) { + e(U); + } + const te = new $(U); + O?.add(te); + return te.event; + } + function f(L, O) { + if (O instanceof Array) { + O.push(L); + } else if (O) { + O.add(L); + } + return L; + } + function p(L, O, G = 100, U = false, te = false, pe, Ce) { + let rt; + let pt; + let Bs; + let Br = 0; + let qs; + const qn = { + leakWarningThreshold: pe, + onWillAddFirstListener() { + rt = L(Il => { + Br++; + pt = O(pt, Il); + if (U && !Bs) { + gs.fire(pt); + pt = undefined; + } + qs = () => { + const Al = pt; + pt = undefined; + Bs = undefined; + if (!U || Br > 1) { + gs.fire(Al); + } + Br = 0; + }; + if (typeof G == "number") { + clearTimeout(Bs); + Bs = setTimeout(qs, G); + } else if (Bs === undefined) { + Bs = 0; + queueMicrotask(qs); + } + }); + }, + onWillRemoveListener() { + if (te && Br > 0) { + qs?.(); + } + }, + onDidRemoveLastListener() { + qs = undefined; + rt.dispose(); + } + }; + if (!Ce) { + e(qn); + } + const gs = new $(qn); + Ce?.add(gs); + return gs.event; + } + t.debounce = p; + function w(L, O = 0, G) { + return t.debounce(L, (U, te) => U ? (U.push(te), U) : [te], O, undefined, true, undefined, G); + } + t.accumulate = w; + function m(L, O = (U, te) => U === te, G) { + let U = true; + let te; + return a(L, pe => { + const Ce = U || !O(pe, te); + U = false; + te = pe; + return Ce; + }, G); + } + t.latch = m; + function y(L, O, G) { + return [t.filter(L, O, G), t.filter(L, U => !O(U), G)]; + } + t.split = y; + function b(L, O = false, G = [], U) { + let te = G.slice(); + let pe = L(pt => { + if (te) { + te.push(pt); + } else { + rt.fire(pt); + } + }); + if (U) { + U.add(pe); + } + const Ce = () => { + te?.forEach(pt => rt.fire(pt)); + te = null; + }; + const rt = new $({ + onWillAddFirstListener() { + if (!pe) { + pe = L(pt => rt.fire(pt)); + if (U) { + U.add(pe); + } + } + }, + onDidAddFirstListener() { + if (te) { + if (O) { + setTimeout(Ce); + } else { + Ce(); + } + } + }, + onDidRemoveLastListener() { + if (pe) { + pe.dispose(); + } + pe = null; + } + }); + if (U) { + U.add(rt); + } + return rt.event; + } + t.buffer = b; + function k(L, O) { + return (U, te, pe) => { + const Ce = O(new C()); + return L(function (rt) { + const pt = Ce.evaluate(rt); + if (pt !== A) { + U.call(te, pt); + } + }, undefined, pe); + }; + } + t.chain = k; + const A = Symbol("HaltChainable"); + class C { + constructor() { + this.f = []; + } + map(O) { + this.f.push(O); + return this; + } + forEach(O) { + this.f.push(G => { + O(G); + return G; + }); + return this; + } + filter(O) { + this.f.push(G => O(G) ? G : A); + return this; + } + reduce(O, G) { + let U = G; + this.f.push(te => { + U = O(U, te); + return U; + }); + return this; + } + latch(O = (G, U) => G === U) { + let G = true; + let U; + this.f.push(te => { + const pe = G || !O(te, U); + G = false; + U = te; + if (pe) { + return te; + } else { + return A; + } + }); + return this; + } + evaluate(O) { + for (const G of this.f) { + O = G(O); + if (O === A) { + break; + } + } + return O; + } + } + function _(L, O, G = U => U) { + const U = (...rt) => Ce.fire(G(...rt)); + const te = () => L.on(O, U); + const pe = () => L.removeListener(O, U); + const Ce = new $({ + onWillAddFirstListener: te, + onDidRemoveLastListener: pe + }); + return Ce.event; + } + t.fromNodeEventEmitter = _; + function Z(L, O, G = U => U) { + const U = (...rt) => Ce.fire(G(...rt)); + const te = () => L.addEventListener(O, U); + const pe = () => L.removeEventListener(O, U); + const Ce = new $({ + onWillAddFirstListener: te, + onDidRemoveLastListener: pe + }); + return Ce.event; + } + t.fromDOMEventEmitter = Z; + function ie(L) { + return new Promise(O => s(L)(O)); + } + t.toPromise = ie; + function me(L) { + const O = new $(); + L.then(G => { + O.fire(G); + }, () => { + O.fire(undefined); + }).finally(() => { + O.dispose(); + }); + return O.event; + } + t.fromPromise = me; + function W(L, O) { + return L(G => O.fire(G)); + } + t.forward = W; + function Ee(L, O, G) { + O(G); + return L(U => O(U)); + } + t.runAndSubscribe = Ee; + class Ye { + constructor(O, G) { + this._observable = O; + this.f = 0; + this.g = false; + const U = { + onWillAddFirstListener: () => { + O.addObserver(this); + this._observable.reportChanges(); + }, + onDidRemoveLastListener: () => { + O.removeObserver(this); + } + }; + if (!G) { + e(U); + } + this.emitter = new $(U); + if (G) { + G.add(this.emitter); + } + } + beginUpdate(O) { + this.f++; + } + handlePossibleChange(O) {} + handleChange(O, G) { + this.g = true; + } + endUpdate(O) { + this.f--; + if (this.f === 0) { + this._observable.reportChanges(); + if (this.g) { + this.g = false; + this.emitter.fire(this._observable.get()); + } + } + } + } + function re(L, O) { + return new Ye(L, O).emitter.event; + } + t.fromObservable = re; + function St(L) { + return (O, G, U) => { + let te = 0; + let pe = false; + const Ce = { + beginUpdate() { + te++; + }, + endUpdate() { + te--; + if (te === 0) { + L.reportChanges(); + if (pe) { + pe = false; + O.call(G); + } + } + }, + handlePossibleChange() {}, + handleChange() { + pe = true; + } + }; + L.addObserver(Ce); + L.reportChanges(); + const rt = { + dispose() { + L.removeObserver(Ce); + } + }; + if (U instanceof De) { + U.add(rt); + } else if (Array.isArray(U)) { + U.push(rt); + } + return rt; + }; + } + t.fromObservableLight = St; + })(x ||= {}); + Cw = class y0 { + static { + this.all = new Set(); + } + static { + this.f = 0; + } + constructor(e) { + this.listenerCount = 0; + this.invocationCount = 0; + this.elapsedOverall = 0; + this.durations = []; + this.name = `${e}_${y0.f++}`; + y0.all.add(this); + } + start(e) { + this.g = new Jr(); + this.listenerCount = e; + } + stop() { + if (this.g) { + const e = this.g.elapsed(); + this.durations.push(e); + this.elapsedOverall += e; + this.invocationCount += 1; + this.g = undefined; + } + } + }; + tp = -1; + _w = class F3 { + static { + this.f = 1; + } + constructor(e, i, s = (F3.f++).toString(16).padStart(3, "0")) { + this.j = e; + this.threshold = i; + this.name = s; + this.h = 0; + } + dispose() { + this.g?.clear(); + } + check(e, i) { + const s = this.threshold; + if (s <= 0 || i < s) { + return; + } + this.g ||= new Map(); + const r = this.g.get(e.value) || 0; + this.g.set(e.value, r + 1); + this.h -= 1; + if (this.h <= 0) { + this.h = s * 0.5; + const [n, o] = this.getMostFrequentStack(); + const a = `[${this.name}] potential listener LEAK detected, having ${i} listeners already. MOST frequent listener (${o}):`; + console.warn(a); + console.warn(n); + const c = new Rw(a, n); + this.j(c); + } + return () => { + const n = this.g.get(e.value) || 0; + this.g.set(e.value, n - 1); + }; + } + getMostFrequentStack() { + if (!this.g) { + return; + } + let e; + let i = 0; + for (const [s, r] of this.g) { + if (!e || i < r) { + e = [s, r]; + i = r; + } + } + return e; + } + }; + ql = class N3 { + static create() { + const e = new Error(); + return new N3(e.stack ?? ""); + } + constructor(e) { + this.value = e; + } + print() { + console.warn(this.value.split(` + `).slice(2).join(` + `)); + } + }; + Rw = class extends Error { + constructor(t, e) { + super(t); + this.name = "ListenerLeakError"; + this.stack = e; + } + }; + Ow = class extends Error { + constructor(t, e) { + super(t); + this.name = "ListenerRefusalError"; + this.stack = e; + } + }; + Lw = 0; + Aa = class { + constructor(t) { + this.value = t; + this.id = Lw++; + } + }; + Mw = 2; + Fw = (t, e) => { + if (t instanceof Aa) { + e(t); + } else { + for (let i = 0; i < t.length; i++) { + const s = t[i]; + if (s) { + e(s); + } + } + } + }; + $ = class { + constructor(t) { + this.z = 0; + this.f = t; + this.g = tp > 0 || this.f?.leakWarningThreshold ? new _w(t?.onListenerError ?? Ft, this.f?.leakWarningThreshold ?? tp) : undefined; + this.j = this.f?._profName ? new Cw(this.f._profName) : undefined; + this.w = this.f?.deliveryQueue; + } + dispose() { + if (!this.m) { + this.m = true; + if (this.w?.current === this) { + this.w.reset(); + } + if (this.u) { + if (ep) { + const t = this.u; + queueMicrotask(() => { + Fw(t, e => e.stack?.print()); + }); + } + this.u = undefined; + this.z = 0; + } + this.f?.onDidRemoveLastListener?.(); + this.g?.dispose(); + } + } + get event() { + this.q ??= (t, e, i) => { + if (this.g && this.z > this.g.threshold ** 2) { + const a = `[${this.g.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this.z} vs ${this.g.threshold})`; + console.warn(a); + const c = this.g.getMostFrequentStack() ?? ["UNKNOWN stack", -1]; + const l = new Ow(`${a}. HINT: Stack shows most frequent listener (${c[1]}-times)`, c[0]); + (this.f?.onListenerError || Ft)(l); + return T.None; + } + if (this.m) { + return T.None; + } + if (e) { + t = t.bind(e); + } + const s = new Aa(t); + let r; + let n; + if (this.g && this.z >= Math.ceil(this.g.threshold * 0.2)) { + s.stack = ql.create(); + r = this.g.check(s.stack, this.z + 1); + } + if (ep) { + s.stack = n ?? ql.create(); + } + if (this.u) { + if (this.u instanceof Aa) { + this.w ??= new Nw(); + this.u = [this.u, s]; + } else { + this.u.push(s); + } + } else { + this.f?.onWillAddFirstListener?.(this); + this.u = s; + this.f?.onDidAddFirstListener?.(this); + } + this.f?.onDidAddListener?.(this); + this.z++; + const o = xe(() => { + r?.(); + this.A(s); + }); + if (i instanceof De) { + i.add(o); + } else if (Array.isArray(i)) { + i.push(o); + } + return o; + }; + return this.q; + } + A(t) { + this.f?.onWillRemoveListener?.(this); + if (!this.u) { + return; + } + if (this.z === 1) { + this.u = undefined; + this.f?.onDidRemoveLastListener?.(this); + this.z = 0; + return; + } + const e = this.u; + const i = e.indexOf(t); + if (i === -1) { + console.log("disposed?", this.m); + console.log("size?", this.z); + console.log("arr?", JSON.stringify(this.u)); + throw new Error("Attempted to dispose unknown listener"); + } + this.z--; + e[i] = undefined; + const s = this.w.current === this; + if (this.z * Mw <= e.length) { + let r = 0; + for (let n = 0; n < e.length; n++) { + if (e[n]) { + e[r++] = e[n]; + } else if (s && r < this.w.end) { + this.w.end--; + if (r < this.w.i) { + this.w.i--; + } + } + } + e.length = r; + } + } + B(t, e) { + if (!t) { + return; + } + const i = this.f?.onListenerError || Ft; + if (!i) { + t.value(e); + return; + } + try { + t.value(e); + } catch (s) { + i(s); + } + } + C(t) { + const e = t.current.u; + while (t.i < t.end) { + this.B(e[t.i++], t.value); + } + t.reset(); + } + fire(t) { + if (this.w?.current) { + this.C(this.w); + this.j?.stop(); + } + this.j?.start(this.z); + if (this.u) { + if (this.u instanceof Aa) { + this.B(this.u, t); + } else { + const e = this.w; + e.enqueue(this, t, this.u.length); + this.C(e); + } + } + this.j?.stop(); + } + hasListeners() { + return this.z > 0; + } + }; + Nw = class { + constructor() { + this.i = -1; + this.end = 0; + } + enqueue(t, e, i) { + this.i = 0; + this.end = i; + this.current = t; + this.value = e; + } + reset() { + this.i = this.end; + this.current = undefined; + this.value = undefined; + } + }; + zl = class extends $ { + get isPaused() { + return this.h !== 0; + } + constructor(t) { + super(t); + this.h = 0; + this.s = new Qf(); + this.t = t?.merge; + } + pause() { + this.h++; + } + resume() { + if (this.h !== 0 && --this.h === 0) { + if (this.t) { + if (this.s.size > 0) { + const t = Array.from(this.s); + this.s.clear(); + super.fire(this.t(t)); + } + } else { + while (!this.h && this.s.size !== 0) { + super.fire(this.s.shift()); + } + } + } + } + fire(t) { + if (this.z) { + if (this.h !== 0) { + this.s.push(t); + } else { + super.fire(t); + } + } + } + }; + Ww = class { + constructor() { + this.g = false; + this.h = []; + this.f = new $({ + onWillAddFirstListener: () => this.j(), + onDidRemoveLastListener: () => this.k() + }); + } + get event() { + return this.f.event; + } + add(t) { + const e = { + event: t, + listener: null + }; + this.h.push(e); + if (this.g) { + this.m(e); + } + return xe(jl(() => { + if (this.g) { + this.o(e); + } + const s = this.h.indexOf(e); + this.h.splice(s, 1); + })); + } + j() { + this.g = true; + this.h.forEach(t => this.m(t)); + } + k() { + this.g = false; + this.h.forEach(t => this.o(t)); + } + m(t) { + t.listener = t.event(e => this.f.fire(e)); + } + o(t) { + t.listener?.dispose(); + t.listener = null; + } + dispose() { + this.f.dispose(); + for (const t of this.h) { + t.listener?.dispose(); + } + this.h = []; + } + }; + ip = class { + constructor() { + this.f = false; + this.g = x.None; + this.h = T.None; + this.j = new $({ + onDidAddFirstListener: () => { + this.f = true; + this.h = this.g(this.j.fire, this.j); + }, + onDidRemoveLastListener: () => { + this.f = false; + this.h.dispose(); + } + }); + this.event = this.j.event; + } + set input(t) { + this.g = t; + if (this.f) { + this.h.dispose(); + this.h = t(this.j.fire, this.j); + } + } + dispose() { + this.h.dispose(); + this.j.dispose(); + } + }; + } + }); + function wt(t) { + return typeof t == "string"; + } + function Nt(t) { + return typeof t == "object" && t !== null && !Array.isArray(t) && !(t instanceof RegExp) && !(t instanceof Date); + } + function aE(t) { + const e = Object.getPrototypeOf(Uint8Array); + return typeof t == "object" && t instanceof e; + } + function Hl(t) { + return typeof t == "number" && !isNaN(t); + } + function Tw(t) { + return t === true || t === false; + } + function Gs(t) { + return typeof t === "undefined"; + } + function Qt(t) { + return Gs(t) || t === null; + } + function cE(t, e) { + if (!t) { + throw new Error(e ? `Unexpected type, expected '${e}'` : "Unexpected type"); + } + } + function Vl(t) { + if (Qt(t)) { + throw new Error("Assertion Failed: argument is undefined or null"); + } + return t; + } + function sp(t) { + if (!Nt(t)) { + return false; + } + for (const e in t) { + if (Uw.call(t, e)) { + return false; + } + } + return true; + } + function jw(t) { + return typeof t == "function"; + } + function hN(t) { + return t; + } + var Uw; + var _e = g({ + "out-build/vs/base/common/types.js"() { + "use strict"; + + Uw = Object.prototype.hasOwnProperty; + } + }); + var Kr; + var Gl; + var bs; + var Ii; + var rp; + var Bw; + var ys = g({ + "out-build/vs/base/common/process.js"() { + "use strict"; + + H(); + Gl = globalThis.vscode; + if (typeof Gl !== "undefined" && typeof Gl.process !== "undefined") { + const t = Gl.process; + Kr = { + get platform() { + return t.platform; + }, + get arch() { + return t.arch; + }, + get env() { + return t.env; + }, + cwd() { + return t.cwd(); + } + }; + } else if (typeof process !== "undefined" && typeof process?.versions?.node == "string") { + Kr = { + get platform() { + return process.platform; + }, + get arch() { + return process.arch; + }, + get env() { + return process.env; + }, + cwd() { + return process.env.VSCODE_CWD || process.cwd(); + } + }; + } else { + Kr = { + get platform() { + if (j) { + return "win32"; + } else if (N) { + return "darwin"; + } else { + return "linux"; + } + }, + get arch() {}, + get env() { + return {}; + }, + cwd() { + return "/"; + } + }; + } + bs = Kr.cwd; + Ii = Kr.env; + rp = Kr.platform; + Bw = Kr.arch; + } + }); + function lE(t, e) { + if (t === null || typeof t != "object") { + throw new op(e, "Object", t); + } + } + function ut(t, e) { + if (typeof t != "string") { + throw new op(e, "string", t); + } + } + function ge(t) { + return t === It || t === di; + } + function np(t) { + return t === It; + } + function gr(t) { + return t >= zw && t <= Vw || t >= Hw && t <= Gw; + } + function Jl(t, e, i, s) { + let r = ""; + let n = 0; + let o = -1; + let a = 0; + let c = 0; + for (let l = 0; l <= t.length; ++l) { + if (l < t.length) { + c = t.charCodeAt(l); + } else { + if (s(c)) { + break; + } + c = It; + } + if (s(c)) { + if (o !== l - 1 && a !== 1) { + if (a === 2) { + if (r.length < 2 || n !== 2 || r.charCodeAt(r.length - 1) !== Js || r.charCodeAt(r.length - 2) !== Js) { + if (r.length > 2) { + const u = r.lastIndexOf(i); + if (u === -1) { + r = ""; + n = 0; + } else { + r = r.slice(0, u); + n = r.length - 1 - r.lastIndexOf(i); + } + o = l; + a = 0; + continue; + } else if (r.length !== 0) { + r = ""; + n = 0; + o = l; + a = 0; + continue; + } + } + if (e) { + r += r.length > 0 ? `${i}..` : ".."; + n = 2; + } + } else { + if (r.length > 0) { + r += `${i}${t.slice(o + 1, l)}`; + } else { + r = t.slice(o + 1, l); + } + n = l - o - 1; + } + } + o = l; + a = 0; + } else if (c === Js && a !== -1) { + ++a; + } else { + a = -1; + } + } + return r; + } + function uE(t) { + if (t) { + return `${t[0] === "." ? "" : "."}${t}`; + } else { + return ""; + } + } + function qw(t, e) { + lE(e, "pathObject"); + const i = e.dir || e.root; + const s = e.base || `${e.name || ""}${uE(e.ext)}`; + if (i) { + if (i === e.root) { + return `${i}${s}`; + } else { + return `${i}${t}${s}`; + } + } else { + return s; + } + } + var zw; + var Hw; + var Vw; + var Gw; + var Js; + var It; + var di; + var Ks; + var Jw; + var op; + var fi; + var Ge; + var Kw; + var ae; + var pi; + var Zr; + var F; + var Gi; + var Zw; + var Xe; + var Ue; + var Kl; + var hE; + var dE; + var fE; + var Vt; + var Zl; + var we = g({ + "out-build/vs/base/common/path.js"() { + "use strict"; + + ys(); + zw = 65; + Hw = 97; + Vw = 90; + Gw = 122; + Js = 46; + It = 47; + di = 92; + Ks = 58; + Jw = 63; + op = class extends Error { + constructor(t, e, i) { + let s; + if (typeof e == "string" && e.indexOf("not ") === 0) { + s = "must not be"; + e = e.replace(/^not /, ""); + } else { + s = "must be"; + } + const r = t.indexOf(".") !== -1 ? "property" : "argument"; + let n = `The "${t}" ${r} ${s} of type ${e}`; + n += `. Received type ${typeof i}`; + super(n); + this.code = "ERR_INVALID_ARG_TYPE"; + } + }; + fi = rp === "win32"; + Ge = { + resolve(...t) { + let e = ""; + let i = ""; + let s = false; + for (let r = t.length - 1; r >= -1; r--) { + let n; + if (r >= 0) { + n = t[r]; + ut(n, `paths[${r}]`); + if (n.length === 0) { + continue; + } + } else if (e.length === 0) { + n = bs(); + } else { + n = Ii[`=${e}`] || bs(); + if (n === undefined || n.slice(0, 2).toLowerCase() !== e.toLowerCase() && n.charCodeAt(2) === di) { + n = `${e}\\`; + } + } + const o = n.length; + let a = 0; + let c = ""; + let l = false; + const u = n.charCodeAt(0); + if (o === 1) { + if (ge(u)) { + a = 1; + l = true; + } + } else if (ge(u)) { + l = true; + if (ge(n.charCodeAt(1))) { + let d = 2; + let f = d; + while (d < o && !ge(n.charCodeAt(d))) { + d++; + } + if (d < o && d !== f) { + const p = n.slice(f, d); + for (f = d; d < o && ge(n.charCodeAt(d));) { + d++; + } + if (d < o && d !== f) { + for (f = d; d < o && !ge(n.charCodeAt(d));) { + d++; + } + if (d === o || d !== f) { + c = `\\\\${p}\\${n.slice(f, d)}`; + a = d; + } + } + } + } else { + a = 1; + } + } else if (gr(u) && n.charCodeAt(1) === Ks) { + c = n.slice(0, 2); + a = 2; + if (o > 2 && ge(n.charCodeAt(2))) { + l = true; + a = 3; + } + } + if (c.length > 0) { + if (e.length > 0) { + if (c.toLowerCase() !== e.toLowerCase()) { + continue; + } + } else { + e = c; + } + } + if (s) { + if (e.length > 0) { + break; + } + } else { + i = `${n.slice(a)}\\${i}`; + s = l; + if (l && e.length > 0) { + break; + } + } + } + i = Jl(i, !s, "\\", ge); + if (s) { + return `${e}\\${i}`; + } else { + return `${e}${i}` || "."; + } + }, + normalize(t) { + ut(t, "path"); + const e = t.length; + if (e === 0) { + return "."; + } + let i = 0; + let s; + let r = false; + const n = t.charCodeAt(0); + if (e === 1) { + if (np(n)) { + return "\\"; + } else { + return t; + } + } + if (ge(n)) { + r = true; + if (ge(t.charCodeAt(1))) { + let a = 2; + let c = a; + while (a < e && !ge(t.charCodeAt(a))) { + a++; + } + if (a < e && a !== c) { + const l = t.slice(c, a); + for (c = a; a < e && ge(t.charCodeAt(a));) { + a++; + } + if (a < e && a !== c) { + for (c = a; a < e && !ge(t.charCodeAt(a));) { + a++; + } + if (a === e) { + return `\\\\${l}\\${t.slice(c)}\\`; + } + if (a !== c) { + s = `\\\\${l}\\${t.slice(c, a)}`; + i = a; + } + } + } + } else { + i = 1; + } + } else if (gr(n) && t.charCodeAt(1) === Ks) { + s = t.slice(0, 2); + i = 2; + if (e > 2 && ge(t.charCodeAt(2))) { + r = true; + i = 3; + } + } + let o = i < e ? Jl(t.slice(i), !r, "\\", ge) : ""; + if (o.length === 0 && !r) { + o = "."; + } + if (o.length > 0 && ge(t.charCodeAt(e - 1))) { + o += "\\"; + } + if (s === undefined) { + if (r) { + return `\\${o}`; + } else { + return o; + } + } else if (r) { + return `${s}\\${o}`; + } else { + return `${s}${o}`; + } + }, + isAbsolute(t) { + ut(t, "path"); + const e = t.length; + if (e === 0) { + return false; + } + const i = t.charCodeAt(0); + return ge(i) || e > 2 && gr(i) && t.charCodeAt(1) === Ks && ge(t.charCodeAt(2)); + }, + join(...t) { + if (t.length === 0) { + return "."; + } + let e; + let i; + for (let n = 0; n < t.length; ++n) { + const o = t[n]; + ut(o, "path"); + if (o.length > 0) { + if (e === undefined) { + e = i = o; + } else { + e += `\\${o}`; + } + } + } + if (e === undefined) { + return "."; + } + let s = true; + let r = 0; + if (typeof i == "string" && ge(i.charCodeAt(0))) { + ++r; + const n = i.length; + if (n > 1 && ge(i.charCodeAt(1))) { + ++r; + if (n > 2) { + if (ge(i.charCodeAt(2))) { + ++r; + } else { + s = false; + } + } + } + } + if (s) { + while (r < e.length && ge(e.charCodeAt(r))) { + r++; + } + if (r >= 2) { + e = `\\${e.slice(r)}`; + } + } + return Ge.normalize(e); + }, + relative(t, e) { + ut(t, "from"); + ut(e, "to"); + if (t === e) { + return ""; + } + const i = Ge.resolve(t); + const s = Ge.resolve(e); + if (i === s || (t = i.toLowerCase(), e = s.toLowerCase(), t === e)) { + return ""; + } + let r = 0; + while (r < t.length && t.charCodeAt(r) === di) { + r++; + } + let n = t.length; + while (n - 1 > r && t.charCodeAt(n - 1) === di) { + n--; + } + const o = n - r; + let a = 0; + while (a < e.length && e.charCodeAt(a) === di) { + a++; + } + let c = e.length; + while (c - 1 > a && e.charCodeAt(c - 1) === di) { + c--; + } + const l = c - a; + const u = o < l ? o : l; + let d = -1; + let f = 0; + for (; f < u; f++) { + const w = t.charCodeAt(r + f); + if (w !== e.charCodeAt(a + f)) { + break; + } + if (w === di) { + d = f; + } + } + if (f !== u) { + if (d === -1) { + return s; + } + } else { + if (l > u) { + if (e.charCodeAt(a + f) === di) { + return s.slice(a + f + 1); + } + if (f === 2) { + return s.slice(a + f); + } + } + if (o > u) { + if (t.charCodeAt(r + f) === di) { + d = f; + } else if (f === 2) { + d = 3; + } + } + if (d === -1) { + d = 0; + } + } + let p = ""; + for (f = r + d + 1; f <= n; ++f) { + if (f === n || t.charCodeAt(f) === di) { + p += p.length === 0 ? ".." : "\\.."; + } + } + a += d; + if (p.length > 0) { + return `${p}${s.slice(a, c)}`; + } else { + if (s.charCodeAt(a) === di) { + ++a; + } + return s.slice(a, c); + } + }, + toNamespacedPath(t) { + if (typeof t != "string" || t.length === 0) { + return t; + } + const e = Ge.resolve(t); + if (e.length <= 2) { + return t; + } + if (e.charCodeAt(0) === di) { + if (e.charCodeAt(1) === di) { + const i = e.charCodeAt(2); + if (i !== Jw && i !== Js) { + return `\\\\?\\UNC\\${e.slice(2)}`; + } + } + } else if (gr(e.charCodeAt(0)) && e.charCodeAt(1) === Ks && e.charCodeAt(2) === di) { + return `\\\\?\\${e}`; + } + return t; + }, + dirname(t) { + ut(t, "path"); + const e = t.length; + if (e === 0) { + return "."; + } + let i = -1; + let s = 0; + const r = t.charCodeAt(0); + if (e === 1) { + if (ge(r)) { + return t; + } else { + return "."; + } + } + if (ge(r)) { + i = s = 1; + if (ge(t.charCodeAt(1))) { + let a = 2; + let c = a; + while (a < e && !ge(t.charCodeAt(a))) { + a++; + } + if (a < e && a !== c) { + for (c = a; a < e && ge(t.charCodeAt(a));) { + a++; + } + if (a < e && a !== c) { + for (c = a; a < e && !ge(t.charCodeAt(a));) { + a++; + } + if (a === e) { + return t; + } + if (a !== c) { + i = s = a + 1; + } + } + } + } + } else if (gr(r) && t.charCodeAt(1) === Ks) { + i = e > 2 && ge(t.charCodeAt(2)) ? 3 : 2; + s = i; + } + let n = -1; + let o = true; + for (let a = e - 1; a >= s; --a) { + if (ge(t.charCodeAt(a))) { + if (!o) { + n = a; + break; + } + } else { + o = false; + } + } + if (n === -1) { + if (i === -1) { + return "."; + } + n = i; + } + return t.slice(0, n); + }, + basename(t, e) { + if (e !== undefined) { + ut(e, "suffix"); + } + ut(t, "path"); + let i = 0; + let s = -1; + let r = true; + let n; + if (t.length >= 2 && gr(t.charCodeAt(0)) && t.charCodeAt(1) === Ks) { + i = 2; + } + if (e !== undefined && e.length > 0 && e.length <= t.length) { + if (e === t) { + return ""; + } + let o = e.length - 1; + let a = -1; + for (n = t.length - 1; n >= i; --n) { + const c = t.charCodeAt(n); + if (ge(c)) { + if (!r) { + i = n + 1; + break; + } + } else { + if (a === -1) { + r = false; + a = n + 1; + } + if (o >= 0) { + if (c === e.charCodeAt(o)) { + if (--o === -1) { + s = n; + } + } else { + o = -1; + s = a; + } + } + } + } + if (i === s) { + s = a; + } else if (s === -1) { + s = t.length; + } + return t.slice(i, s); + } + for (n = t.length - 1; n >= i; --n) { + if (ge(t.charCodeAt(n))) { + if (!r) { + i = n + 1; + break; + } + } else if (s === -1) { + r = false; + s = n + 1; + } + } + if (s === -1) { + return ""; + } else { + return t.slice(i, s); + } + }, + extname(t) { + ut(t, "path"); + let e = 0; + let i = -1; + let s = 0; + let r = -1; + let n = true; + let o = 0; + if (t.length >= 2 && t.charCodeAt(1) === Ks && gr(t.charCodeAt(0))) { + e = s = 2; + } + for (let a = t.length - 1; a >= e; --a) { + const c = t.charCodeAt(a); + if (ge(c)) { + if (!n) { + s = a + 1; + break; + } + continue; + } + if (r === -1) { + n = false; + r = a + 1; + } + if (c === Js) { + if (i === -1) { + i = a; + } else if (o !== 1) { + o = 1; + } + } else if (i !== -1) { + o = -1; + } + } + if (i === -1 || r === -1 || o === 0 || o === 1 && i === r - 1 && i === s + 1) { + return ""; + } else { + return t.slice(i, r); + } + }, + format: qw.bind(null, "\\"), + parse(t) { + ut(t, "path"); + const e = { + root: "", + dir: "", + base: "", + ext: "", + name: "" + }; + if (t.length === 0) { + return e; + } + const i = t.length; + let s = 0; + let r = t.charCodeAt(0); + if (i === 1) { + if (ge(r)) { + e.root = e.dir = t; + return e; + } else { + e.base = e.name = t; + return e; + } + } + if (ge(r)) { + s = 1; + if (ge(t.charCodeAt(1))) { + let d = 2; + let f = d; + while (d < i && !ge(t.charCodeAt(d))) { + d++; + } + if (d < i && d !== f) { + for (f = d; d < i && ge(t.charCodeAt(d));) { + d++; + } + if (d < i && d !== f) { + for (f = d; d < i && !ge(t.charCodeAt(d));) { + d++; + } + if (d === i) { + s = d; + } else if (d !== f) { + s = d + 1; + } + } + } + } + } else if (gr(r) && t.charCodeAt(1) === Ks) { + if (i <= 2) { + e.root = e.dir = t; + return e; + } + s = 2; + if (ge(t.charCodeAt(2))) { + if (i === 3) { + e.root = e.dir = t; + return e; + } + s = 3; + } + } + if (s > 0) { + e.root = t.slice(0, s); + } + let n = -1; + let o = s; + let a = -1; + let c = true; + let l = t.length - 1; + let u = 0; + for (; l >= s; --l) { + r = t.charCodeAt(l); + if (ge(r)) { + if (!c) { + o = l + 1; + break; + } + continue; + } + if (a === -1) { + c = false; + a = l + 1; + } + if (r === Js) { + if (n === -1) { + n = l; + } else if (u !== 1) { + u = 1; + } + } else if (n !== -1) { + u = -1; + } + } + if (a !== -1) { + if (n === -1 || u === 0 || u === 1 && n === a - 1 && n === o + 1) { + e.base = e.name = t.slice(o, a); + } else { + e.name = t.slice(o, n); + e.base = t.slice(o, a); + e.ext = t.slice(n, a); + } + } + if (o > 0 && o !== s) { + e.dir = t.slice(0, o - 1); + } else { + e.dir = e.root; + } + return e; + }, + sep: "\\", + delimiter: ";", + win32: null, + posix: null + }; + Kw = (() => { + if (fi) { + const t = /\\/g; + return () => { + const e = bs().replace(t, "/"); + return e.slice(e.indexOf("/")); + }; + } + return () => bs(); + })(); + ae = { + resolve(...t) { + let e = ""; + let i = false; + for (let s = t.length - 1; s >= -1 && !i; s--) { + const r = s >= 0 ? t[s] : Kw(); + ut(r, `paths[${s}]`); + if (r.length !== 0) { + e = `${r}/${e}`; + i = r.charCodeAt(0) === It; + } + } + e = Jl(e, !i, "/", np); + if (i) { + return `/${e}`; + } else if (e.length > 0) { + return e; + } else { + return "."; + } + }, + normalize(t) { + ut(t, "path"); + if (t.length === 0) { + return "."; + } + const e = t.charCodeAt(0) === It; + const i = t.charCodeAt(t.length - 1) === It; + t = Jl(t, !e, "/", np); + if (t.length === 0) { + if (e) { + return "/"; + } else if (i) { + return "./"; + } else { + return "."; + } + } else { + if (i) { + t += "/"; + } + if (e) { + return `/${t}`; + } else { + return t; + } + } + }, + isAbsolute(t) { + ut(t, "path"); + return t.length > 0 && t.charCodeAt(0) === It; + }, + join(...t) { + if (t.length === 0) { + return "."; + } + let e; + for (let i = 0; i < t.length; ++i) { + const s = t[i]; + ut(s, "path"); + if (s.length > 0) { + if (e === undefined) { + e = s; + } else { + e += `/${s}`; + } + } + } + if (e === undefined) { + return "."; + } else { + return ae.normalize(e); + } + }, + relative(t, e) { + ut(t, "from"); + ut(e, "to"); + if (t === e || (t = ae.resolve(t), e = ae.resolve(e), t === e)) { + return ""; + } + const i = 1; + const s = t.length; + const r = s - i; + const n = 1; + const o = e.length - n; + const a = r < o ? r : o; + let c = -1; + let l = 0; + for (; l < a; l++) { + const d = t.charCodeAt(i + l); + if (d !== e.charCodeAt(n + l)) { + break; + } + if (d === It) { + c = l; + } + } + if (l === a) { + if (o > a) { + if (e.charCodeAt(n + l) === It) { + return e.slice(n + l + 1); + } + if (l === 0) { + return e.slice(n + l); + } + } else if (r > a) { + if (t.charCodeAt(i + l) === It) { + c = l; + } else if (l === 0) { + c = 0; + } + } + } + let u = ""; + for (l = i + c + 1; l <= s; ++l) { + if (l === s || t.charCodeAt(l) === It) { + u += u.length === 0 ? ".." : "/.."; + } + } + return `${u}${e.slice(n + c)}`; + }, + toNamespacedPath(t) { + return t; + }, + dirname(t) { + ut(t, "path"); + if (t.length === 0) { + return "."; + } + const e = t.charCodeAt(0) === It; + let i = -1; + let s = true; + for (let r = t.length - 1; r >= 1; --r) { + if (t.charCodeAt(r) === It) { + if (!s) { + i = r; + break; + } + } else { + s = false; + } + } + if (i === -1) { + if (e) { + return "/"; + } else { + return "."; + } + } else if (e && i === 1) { + return "//"; + } else { + return t.slice(0, i); + } + }, + basename(t, e) { + if (e !== undefined) { + ut(e, "ext"); + } + ut(t, "path"); + let i = 0; + let s = -1; + let r = true; + let n; + if (e !== undefined && e.length > 0 && e.length <= t.length) { + if (e === t) { + return ""; + } + let o = e.length - 1; + let a = -1; + for (n = t.length - 1; n >= 0; --n) { + const c = t.charCodeAt(n); + if (c === It) { + if (!r) { + i = n + 1; + break; + } + } else { + if (a === -1) { + r = false; + a = n + 1; + } + if (o >= 0) { + if (c === e.charCodeAt(o)) { + if (--o === -1) { + s = n; + } + } else { + o = -1; + s = a; + } + } + } + } + if (i === s) { + s = a; + } else if (s === -1) { + s = t.length; + } + return t.slice(i, s); + } + for (n = t.length - 1; n >= 0; --n) { + if (t.charCodeAt(n) === It) { + if (!r) { + i = n + 1; + break; + } + } else if (s === -1) { + r = false; + s = n + 1; + } + } + if (s === -1) { + return ""; + } else { + return t.slice(i, s); + } + }, + extname(t) { + ut(t, "path"); + let e = -1; + let i = 0; + let s = -1; + let r = true; + let n = 0; + for (let o = t.length - 1; o >= 0; --o) { + const a = t.charCodeAt(o); + if (a === It) { + if (!r) { + i = o + 1; + break; + } + continue; + } + if (s === -1) { + r = false; + s = o + 1; + } + if (a === Js) { + if (e === -1) { + e = o; + } else if (n !== 1) { + n = 1; + } + } else if (e !== -1) { + n = -1; + } + } + if (e === -1 || s === -1 || n === 0 || n === 1 && e === s - 1 && e === i + 1) { + return ""; + } else { + return t.slice(e, s); + } + }, + format: qw.bind(null, "/"), + parse(t) { + ut(t, "path"); + const e = { + root: "", + dir: "", + base: "", + ext: "", + name: "" + }; + if (t.length === 0) { + return e; + } + const i = t.charCodeAt(0) === It; + let s; + if (i) { + e.root = "/"; + s = 1; + } else { + s = 0; + } + let r = -1; + let n = 0; + let o = -1; + let a = true; + let c = t.length - 1; + let l = 0; + for (; c >= s; --c) { + const u = t.charCodeAt(c); + if (u === It) { + if (!a) { + n = c + 1; + break; + } + continue; + } + if (o === -1) { + a = false; + o = c + 1; + } + if (u === Js) { + if (r === -1) { + r = c; + } else if (l !== 1) { + l = 1; + } + } else if (r !== -1) { + l = -1; + } + } + if (o !== -1) { + const u = n === 0 && i ? 1 : n; + if (r === -1 || l === 0 || l === 1 && r === o - 1 && r === n + 1) { + e.base = e.name = t.slice(u, o); + } else { + e.name = t.slice(u, r); + e.base = t.slice(u, o); + e.ext = t.slice(r, o); + } + } + if (n > 0) { + e.dir = t.slice(0, n - 1); + } else if (i) { + e.dir = "/"; + } + return e; + }, + sep: "/", + delimiter: ":", + win32: null, + posix: null + }; + ae.win32 = Ge.win32 = Ge; + ae.posix = Ge.posix = ae; + pi = fi ? Ge.normalize : ae.normalize; + Zr = fi ? Ge.isAbsolute : ae.isAbsolute; + F = fi ? Ge.join : ae.join; + Gi = fi ? Ge.resolve : ae.resolve; + Zw = fi ? Ge.relative : ae.relative; + Xe = fi ? Ge.dirname : ae.dirname; + Ue = fi ? Ge.basename : ae.basename; + Kl = fi ? Ge.extname : ae.extname; + hE = fi ? Ge.format : ae.format; + dE = fi ? Ge.parse : ae.parse; + fE = fi ? Ge.toNamespacedPath : ae.toNamespacedPath; + Vt = fi ? Ge.sep : ae.sep; + Zl = fi ? Ge.delimiter : ae.delimiter; + } + }); + function pE(t, e) { + if (!t.scheme && e) { + throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${t.authority}", path: "${t.path}", query: "${t.query}", fragment: "${t.fragment}"}`); + } + if (t.scheme && !Qw.test(t.scheme)) { + throw new Error("[UriError]: Scheme contains illegal characters."); + } + if (t.path) { + if (t.authority) { + if (!ev.test(t.path)) { + throw new Error("[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash (\"/\") character"); + } + } else if (tv.test(t.path)) { + throw new Error("[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters (\"//\")"); + } + } + } + function gE(t, e) { + if (!t && !e) { + return "file"; + } else { + return t; + } + } + function mE(t, e) { + switch (t) { + case "https": + case "http": + case "file": + if (e) { + if (e[0] !== Ji) { + e = Ji + e; + } + } else { + e = Ji; + } + break; + } + return e; + } + function Yw(t, e, i) { + let s; + let r = -1; + for (let n = 0; n < t.length; n++) { + const o = t.charCodeAt(n); + if (o >= 97 && o <= 122 || o >= 65 && o <= 90 || o >= 48 && o <= 57 || o === 45 || o === 46 || o === 95 || o === 126 || e && o === 47 || i && o === 91 || i && o === 93 || i && o === 58) { + if (r !== -1) { + s += encodeURIComponent(t.substring(r, n)); + r = -1; + } + if (s !== undefined) { + s += t.charAt(n); + } + } else { + if (s === undefined) { + s = t.substr(0, n); + } + const a = lp[o]; + if (a !== undefined) { + if (r !== -1) { + s += encodeURIComponent(t.substring(r, n)); + r = -1; + } + s += a; + } else if (r === -1) { + r = n; + } + } + } + if (r !== -1) { + s += encodeURIComponent(t.substring(r)); + } + if (s !== undefined) { + return s; + } else { + return t; + } + } + function wE(t) { + let e; + for (let i = 0; i < t.length; i++) { + const s = t.charCodeAt(i); + if (s === 35 || s === 63) { + if (e === undefined) { + e = t.substr(0, i); + } + e += lp[s]; + } else if (e !== undefined) { + e += t[i]; + } + } + if (e !== undefined) { + return e; + } else { + return t; + } + } + function Yl(t, e) { + let i; + if (t.authority && t.path.length > 1 && t.scheme === "file") { + i = `//${t.authority}${t.path}`; + } else if (t.path.charCodeAt(0) === 47 && (t.path.charCodeAt(1) >= 65 && t.path.charCodeAt(1) <= 90 || t.path.charCodeAt(1) >= 97 && t.path.charCodeAt(1) <= 122) && t.path.charCodeAt(2) === 58) { + if (e) { + i = t.path.substr(1); + } else { + i = t.path[1].toLowerCase() + t.path.substr(2); + } + } else { + i = t.path; + } + if (j) { + i = i.replace(/\//g, "\\"); + } + return i; + } + function ap(t, e) { + const i = e ? wE : Yw; + let s = ""; + let { + scheme: r, + authority: n, + path: o, + query: a, + fragment: c + } = t; + if (r) { + s += r; + s += ":"; + } + if (n || r === "file") { + s += Ji; + s += Ji; + } + if (n) { + let l = n.indexOf("@"); + if (l !== -1) { + const u = n.substr(0, l); + n = n.substr(l + 1); + l = u.lastIndexOf(":"); + if (l === -1) { + s += i(u, false, false); + } else { + s += i(u.substr(0, l), false, false); + s += ":"; + s += i(u.substr(l + 1), false, true); + } + s += "@"; + } + n = n.toLowerCase(); + l = n.lastIndexOf(":"); + if (l === -1) { + s += i(n, false, true); + } else { + s += i(n.substr(0, l), false, true); + s += n.substr(l); + } + } + if (o) { + if (o.length >= 3 && o.charCodeAt(0) === 47 && o.charCodeAt(2) === 58) { + const l = o.charCodeAt(1); + if (l >= 65 && l <= 90) { + o = `/${String.fromCharCode(l + 32)}:${o.substr(3)}`; + } + } else if (o.length >= 2 && o.charCodeAt(1) === 58) { + const l = o.charCodeAt(0); + if (l >= 65 && l <= 90) { + o = `${String.fromCharCode(l + 32)}:${o.substr(2)}`; + } + } + s += i(o, true, false); + } + if (a) { + s += "?"; + s += i(a, false, false); + } + if (c) { + s += "#"; + s += e ? c : Yw(c, false, false); + } + return s; + } + function Xw(t) { + try { + return decodeURIComponent(t); + } catch { + if (t.length > 3) { + return t.substr(0, 3) + Xw(t.substr(3)); + } else { + return t; + } + } + } + function Xl(t) { + if (t.match(up)) { + return t.replace(up, e => Xw(e)); + } else { + return t; + } + } + var Qw; + var ev; + var tv; + var Be; + var Ji; + var iv; + var P; + var cp; + var Yr; + var lp; + var up; + var se = g({ + "out-build/vs/base/common/uri.js"() { + "use strict"; + + we(); + H(); + Qw = /^\w[\w\d+.-]*$/; + ev = /^\//; + tv = /^\/\//; + Be = ""; + Ji = "/"; + iv = /^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/; + P = class Sf { + static isUri(e) { + if (e instanceof Sf) { + return true; + } else if (e) { + return typeof e.authority == "string" && typeof e.fragment == "string" && typeof e.path == "string" && typeof e.query == "string" && typeof e.scheme == "string" && typeof e.fsPath == "string" && typeof e.with == "function" && typeof e.toString == "function"; + } else { + return false; + } + } + constructor(e, i, s, r, n, o = false) { + if (typeof e == "object") { + this.scheme = e.scheme || Be; + this.authority = e.authority || Be; + this.path = e.path || Be; + this.query = e.query || Be; + this.fragment = e.fragment || Be; + } else { + this.scheme = gE(e, o); + this.authority = i || Be; + this.path = mE(this.scheme, s || Be); + this.query = r || Be; + this.fragment = n || Be; + pE(this, o); + } + } + get fsPath() { + return Yl(this, false); + } + with(e) { + if (!e) { + return this; + } + let { + scheme: i, + authority: s, + path: r, + query: n, + fragment: o + } = e; + if (i === undefined) { + i = this.scheme; + } else if (i === null) { + i = Be; + } + if (s === undefined) { + s = this.authority; + } else if (s === null) { + s = Be; + } + if (r === undefined) { + r = this.path; + } else if (r === null) { + r = Be; + } + if (n === undefined) { + n = this.query; + } else if (n === null) { + n = Be; + } + if (o === undefined) { + o = this.fragment; + } else if (o === null) { + o = Be; + } + if (i === this.scheme && s === this.authority && r === this.path && n === this.query && o === this.fragment) { + return this; + } else { + return new Yr(i, s, r, n, o); + } + } + static parse(e, i = false) { + const s = iv.exec(e); + if (s) { + return new Yr(s[2] || Be, Xl(s[4] || Be), Xl(s[5] || Be), Xl(s[7] || Be), Xl(s[9] || Be), i); + } else { + return new Yr(Be, Be, Be, Be, Be); + } + } + static file(e) { + let i = Be; + if (j) { + e = e.replace(/\\/g, Ji); + } + if (e[0] === Ji && e[1] === Ji) { + const s = e.indexOf(Ji, 2); + if (s === -1) { + i = e.substring(2); + e = Ji; + } else { + i = e.substring(2, s); + e = e.substring(s) || Ji; + } + } + return new Yr("file", i, e, Be, Be); + } + static from(e, i) { + return new Yr(e.scheme, e.authority, e.path, e.query, e.fragment, i); + } + static joinPath(e, ...i) { + if (!e.path) { + throw new Error("[UriError]: cannot call joinPath on URI without path"); + } + let s; + if (j && e.scheme === "file") { + s = Sf.file(Ge.join(Yl(e, true), ...i)).path; + } else { + s = ae.join(e.path, ...i); + } + return e.with({ + path: s + }); + } + toString(e = false) { + return ap(this, e); + } + toJSON() { + return this; + } + static revive(e) { + if (e) { + if (e instanceof Sf) { + return e; + } + { + const i = new Yr(e); + i._formatted = e.external ?? null; + i._fsPath = e._sep === cp ? e.fsPath ?? null : null; + return i; + } + } else { + return e; + } + } + [Symbol.for("debug.description")]() { + return `URI(${this.toString()})`; + } + }; + cp = j ? 1 : undefined; + Yr = class extends P { + constructor() { + super(...arguments); + this._formatted = null; + this._fsPath = null; + } + get fsPath() { + this._fsPath ||= Yl(this, false); + return this._fsPath; + } + toString(t = false) { + if (t) { + return ap(this, true); + } else { + this._formatted ||= ap(this, false); + return this._formatted; + } + } + toJSON() { + const t = { + $mid: 1 + }; + if (this._fsPath) { + t.fsPath = this._fsPath; + t._sep = cp; + } + if (this._formatted) { + t.external = this._formatted; + } + if (this.path) { + t.path = this.path; + } + if (this.scheme) { + t.scheme = this.scheme; + } + if (this.authority) { + t.authority = this.authority; + } + if (this.query) { + t.query = this.query; + } + if (this.fragment) { + t.fragment = this.fragment; + } + return t; + } + }; + lp = { + 58: "%3A", + 47: "%2F", + 63: "%3F", + 35: "%23", + 91: "%5B", + 93: "%5D", + 64: "%40", + 33: "%21", + 36: "%24", + 38: "%26", + 39: "%27", + 40: "%28", + 41: "%29", + 42: "%2A", + 43: "%2B", + 44: "%2C", + 59: "%3B", + 61: "%3D", + 32: "%20" + }; + up = /(%[0-9A-Za-z][0-9A-Za-z])+/g; + } + }); + function vE(t, e, i) { + if (e[rs.DI_TARGET] === e) { + e[rs.DI_DEPENDENCIES].push({ + id: t, + index: i + }); + } else { + e[rs.DI_DEPENDENCIES] = [{ + id: t, + index: i + }]; + e[rs.DI_TARGET] = e; + } + } + function q(t) { + if (rs.serviceIds.has(t)) { + return rs.serviceIds.get(t); + } + const e = function (i, s, r) { + if (arguments.length !== 3) { + throw new Error("@IServiceName-decorator can only be used to decorate a parameter"); + } + vE(e, i, r); + }; + e.toString = () => t; + rs.serviceIds.set(t, e); + return e; + } + function dN(t) { + return t; + } + var rs; + var Ss; + var Y = g({ + "out-build/vs/platform/instantiation/common/instantiation.js"() { + "use strict"; + + (function (t) { + t.serviceIds = new Map(); + t.DI_TARGET = "$di$target"; + t.DI_DEPENDENCIES = "$di$dependencies"; + function e(i) { + return i[t.DI_DEPENDENCIES] || []; + } + t.getServiceDependencies = e; + })(rs ||= {}); + Ss = q("instantiationService"); + } + }); + function hp(t) { + return t && typeof t == "object" && (!t.overrideIdentifier || typeof t.overrideIdentifier == "string") && (!t.resource || t.resource instanceof P); + } + function bE(t) { + return t && typeof t == "object" && (!t.overrideIdentifiers || Array.isArray(t.overrideIdentifiers)) && !t.overrideIdentifier && (!t.resource || t.resource instanceof P); + } + function dp(t, e) { + const i = Object.create(null); + for (const s in t) { + sv(i, s, t[s], e); + } + return i; + } + function sv(t, e, i, s) { + const r = e.split("."); + const n = r.pop(); + let o = t; + for (let a = 0; a < r.length; a++) { + const c = r[a]; + let l = o[c]; + switch (typeof l) { + case "undefined": + l = o[c] = Object.create(null); + break; + case "object": + if (l === null) { + s(`Ignoring ${e} as ${r.slice(0, a + 1).join(".")} is null`); + return; + } + break; + default: + s(`Ignoring ${e} as ${r.slice(0, a + 1).join(".")} is ${JSON.stringify(l)}`); + return; + } + o = l; + } + if (typeof o == "object" && o !== null) { + try { + o[n] = i; + } catch { + s(`Ignoring ${e} as ${r.join(".")} is ${JSON.stringify(o)}`); + } + } else { + s(`Ignoring ${e} as ${r.join(".")} is ${JSON.stringify(o)}`); + } + } + function yE(t, e) { + const i = e.split("."); + rv(t, i); + } + function rv(t, e) { + const i = e.shift(); + if (e.length === 0) { + delete t[i]; + return; + } + if (Object.keys(t).indexOf(i) !== -1) { + const s = t[i]; + if (typeof s == "object" && !Array.isArray(s)) { + rv(s, e); + if (Object.keys(s).length === 0) { + delete t[i]; + } + } + } + } + function Ql(t, e, i) { + function s(o, a) { + let c = o; + for (const l of a) { + if (typeof c != "object" || c === null) { + return; + } + c = c[l]; + } + return c; + } + const r = e.split("."); + const n = s(t, r); + if (typeof n === "undefined") { + return i; + } else { + return n; + } + } + function SE(t) { + return t.replace(/[\[\]]/g, ""); + } + var Je; + var nv; + var Ke = g({ + "out-build/vs/platform/configuration/common/configuration.js"() { + "use strict"; + + _e(); + se(); + Y(); + Je = q("configurationService"); + (function (t) { + t[t.APPLICATION = 1] = "APPLICATION"; + t[t.USER = 2] = "USER"; + t[t.USER_LOCAL = 3] = "USER_LOCAL"; + t[t.USER_REMOTE = 4] = "USER_REMOTE"; + t[t.WORKSPACE = 5] = "WORKSPACE"; + t[t.WORKSPACE_FOLDER = 6] = "WORKSPACE_FOLDER"; + t[t.DEFAULT = 7] = "DEFAULT"; + t[t.MEMORY = 8] = "MEMORY"; + })(nv ||= {}); + } + }); + function EE(t) { + let e = false; + const i = new Map(); + const s = new Map(); + kE(t, u => { + if (t === u) { + return true; + } + const d = JSON.stringify(u); + if (d.length < 30) { + return true; + } + const f = i.get(d); + if (!f) { + const p = { + schemas: [u] + }; + i.set(d, p); + s.set(u, p); + return true; + } + f.schemas.push(u); + s.set(u, f); + e = true; + return false; + }); + i.clear(); + if (!e) { + return JSON.stringify(t); + } + let n = "$defs"; + while (t.hasOwnProperty(n)) { + n += "_"; + } + const o = []; + function a(u) { + return JSON.stringify(u, (d, f) => { + if (f !== u) { + const p = s.get(f); + if (p && p.schemas.length > 1) { + if (!p.id) { + p.id = `_${o.length}`; + o.push(p.schemas[0]); + } + return { + $ref: `#/${n}/${p.id}` + }; + } + } + return f; + }); + } + const c = a(t); + const l = []; + for (let u = 0; u < o.length; u++) { + l.push(`"_${u}":${a(o[u])}`); + } + if (l.length) { + return `${c.substring(0, c.length - 1)},"${n}":{${l.join(",")}}}`; + } else { + return c; + } + } + function Zn(t) { + return typeof t == "object" && t !== null; + } + function kE(t, e) { + if (!t || typeof t != "object") { + return; + } + const i = (...c) => { + for (const l of c) { + if (Zn(l)) { + o.push(l); + } + } + }; + const s = (...c) => { + for (const l of c) { + if (Zn(l)) { + for (const u in l) { + const d = l[u]; + if (Zn(d)) { + o.push(d); + } + } + } + } + }; + const r = (...c) => { + for (const l of c) { + if (Array.isArray(l)) { + for (const u of l) { + if (Zn(u)) { + o.push(u); + } + } + } + } + }; + const n = c => { + if (Array.isArray(c)) { + for (const l of c) { + if (Zn(l)) { + o.push(l); + } + } + } else if (Zn(c)) { + o.push(c); + } + }; + const o = [t]; + let a = o.pop(); + while (a) { + if (e(a)) { + i(a.additionalItems, a.additionalProperties, a.not, a.contains, a.propertyNames, a.if, a.then, a.else, a.unevaluatedItems, a.unevaluatedProperties); + s(a.definitions, a.$defs, a.properties, a.patternProperties, a.dependencies, a.dependentSchemas); + r(a.anyOf, a.allOf, a.oneOf, a.prefixItems); + n(a.items); + } + a = o.pop(); + } + } + var xE = g({ + "out-build/vs/base/common/jsonSchema.js"() { + "use strict"; + } + }); + function fp(t, e) { + if (!t) { + throw new Error(e ? `Assertion failed (${e})` : "Assertion Failed"); + } + } + var DE = g({ + "out-build/vs/base/common/assert.js"() { + "use strict"; + + $e(); + } + }); + var ov; + var Gt; + var Zs = g({ + "out-build/vs/platform/registry/common/platform.js"() { + "use strict"; + + DE(); + _e(); + ov = class { + constructor() { + this.a = new Map(); + } + add(t, e) { + fp(wt(t)); + fp(Nt(e)); + fp(!this.a.has(t), "There is already an extension with this id"); + this.a.set(t, e); + } + knows(t) { + return this.a.has(t); + } + as(t) { + return this.a.get(t) || null; + } + }; + Gt = new ov(); + } + }); + function PE(t) { + if (t.length > 0 && t.charAt(t.length - 1) === "#") { + return t.substring(0, t.length - 1); + } else { + return t; + } + } + var pp; + var av; + var cv; + var $E = g({ + "out-build/vs/platform/jsonschemas/common/jsonContributionRegistry.js"() { + "use strict"; + + B(); + xE(); + Zs(); + pp = { + JSONContribution: "base.contributions.json" + }; + av = class { + constructor() { + this.b = new $(); + this.onDidChangeSchema = this.b.event; + this.a = {}; + } + registerSchema(t, e) { + this.a[PE(t)] = e; + this.b.fire(t); + } + notifySchemaChanged(t) { + this.b.fire(t); + } + getSchemaContributions() { + return { + schemas: this.a + }; + } + getSchemaContent(t) { + const e = this.a[t]; + if (e) { + return EE(e); + } else { + return undefined; + } + } + hasSchemaContent(t) { + return !!this.a[t]; + } + }; + cv = new av(); + Gt.add(pp.JSONContribution, cv); + } + }); + function Ca(t) { + const e = []; + if (Es.test(t)) { + let i = mp.exec(t); + while (i?.length) { + const s = i[1].trim(); + if (s) { + e.push(s); + } + i = mp.exec(t); + } + } + return ss(e); + } + function IE(t) { + return t.reduce((e, i) => `${e}[${i}]`, ""); + } + function AE(t) { + switch (Array.isArray(t) ? t[0] : t) { + case "boolean": + return false; + case "integer": + case "number": + return 0; + case "string": + return ""; + case "array": + return []; + case "object": + return {}; + default: + return null; + } + } + function CE(t, e) { + if (t.trim()) { + if (Es.test(t)) { + return v(1704, null, t); + } else if (Na.getConfigurationProperties()[t] !== undefined) { + return v(1705, null, t); + } else if (e.policy?.name && Na.getPolicyConfigurations().get(e.policy?.name) !== undefined) { + return v(1706, null, t, e.policy?.name, Na.getPolicyConfigurations().get(e.policy?.name)); + } else { + return null; + } + } else { + return v(1703, null); + } + } + var lv; + var Ai; + var uv; + var _a; + var Ra; + var Oa; + var La; + var Ma; + var Yn; + var mr; + var Fa; + var hv; + var gp; + var mp; + var wr; + var Es; + var Na; + var Xr = g({ + "out-build/vs/platform/configuration/common/configurationRegistry.js"() { + "use strict"; + + zt(); + B(); + _e(); + be(); + Ke(); + $E(); + Zs(); + (function (t) { + t.Multiline = "multilineText"; + t.Singleline = "singlelineText"; + })(lv ||= {}); + Ai = { + Configuration: "base.contributions.configuration" + }; + (function (t) { + t[t.APPLICATION = 1] = "APPLICATION"; + t[t.MACHINE = 2] = "MACHINE"; + t[t.WINDOW = 3] = "WINDOW"; + t[t.RESOURCE = 4] = "RESOURCE"; + t[t.LANGUAGE_OVERRIDABLE = 5] = "LANGUAGE_OVERRIDABLE"; + t[t.MACHINE_OVERRIDABLE = 6] = "MACHINE_OVERRIDABLE"; + })(uv ||= {}); + _a = { + properties: {}, + patternProperties: {} + }; + Ra = { + properties: {}, + patternProperties: {} + }; + Oa = { + properties: {}, + patternProperties: {} + }; + La = { + properties: {}, + patternProperties: {} + }; + Ma = { + properties: {}, + patternProperties: {} + }; + Yn = { + properties: {}, + patternProperties: {} + }; + mr = "vscode://schemas/settings/resourceLanguage"; + Fa = Gt.as(pp.JSONContribution); + hv = class { + constructor() { + this.a = []; + this.i = new Set(); + this.j = new $(); + this.onDidSchemaChange = this.j.event; + this.k = new $(); + this.onDidUpdateConfiguration = this.k.event; + this.b = new Map(); + this.c = { + id: "defaultOverrides", + title: v(1697, null), + properties: {} + }; + this.d = [this.c]; + this.h = { + properties: {}, + patternProperties: {}, + additionalProperties: true, + allowTrailingCommas: true, + allowComments: true + }; + this.e = {}; + this.f = new Map(); + this.g = {}; + Fa.registerSchema(mr, this.h); + this.z(); + } + registerConfiguration(t, e = true) { + this.registerConfigurations([t], e); + } + registerConfigurations(t, e = true) { + const i = new Set(); + this.r(t, e, i); + Fa.registerSchema(mr, this.h); + this.j.fire(); + this.k.fire({ + properties: i + }); + } + deregisterConfigurations(t) { + const e = new Set(); + this.s(t, e); + Fa.registerSchema(mr, this.h); + this.j.fire(); + this.k.fire({ + properties: e + }); + } + updateConfigurations({ + add: t, + remove: e + }) { + const i = new Set(); + this.s(e, i); + this.r(t, false, i); + Fa.registerSchema(mr, this.h); + this.j.fire(); + this.k.fire({ + properties: i + }); + } + registerDefaultConfigurations(t) { + const e = new Set(); + this.l(t, e); + this.j.fire(); + this.k.fire({ + properties: e, + defaultsOverrides: true + }); + } + l(t, e) { + this.a.push(...t); + const i = []; + for (const { + overrides: s, + source: r + } of t) { + for (const n in s) { + e.add(n); + const o = this.b.get(n) ?? this.b.set(n, { + configurationDefaultOverrides: [] + }).get(n); + const a = s[n]; + o.configurationDefaultOverrides.push({ + value: a, + source: r + }); + if (Es.test(n)) { + const c = this.o(n, a, r, o.configurationDefaultOverrideValue); + if (!c) { + continue; + } + o.configurationDefaultOverrideValue = c; + this.n(n, c, r); + i.push(...Ca(n)); + } else { + const c = this.p(n, a, r, o.configurationDefaultOverrideValue); + if (!c) { + continue; + } + o.configurationDefaultOverrideValue = c; + const l = this.e[n]; + if (l) { + this.A(n, l); + this.w(n, l); + } + } + } + } + this.q(i); + } + deregisterDefaultConfigurations(t) { + const e = new Set(); + this.m(t, e); + this.j.fire(); + this.k.fire({ + properties: e, + defaultsOverrides: true + }); + } + m(t, e) { + for (const i of t) { + const s = this.a.indexOf(i); + if (s !== -1) { + this.a.splice(s, 1); + } + } + for (const { + overrides: i, + source: s + } of t) { + for (const r in i) { + const n = this.b.get(r); + if (!n) { + continue; + } + const o = n.configurationDefaultOverrides.findIndex(a => s ? a.source?.id === s.id : a.value === i[r]); + if (o !== -1) { + n.configurationDefaultOverrides.splice(o, 1); + if (n.configurationDefaultOverrides.length === 0) { + this.b.delete(r); + } + if (Es.test(r)) { + let a; + for (const c of n.configurationDefaultOverrides) { + a = this.o(r, c.value, c.source, a); + } + if (a && !sp(a.value)) { + n.configurationDefaultOverrideValue = a; + this.n(r, a, s); + } else { + this.b.delete(r); + delete this.e[r]; + delete this.c.properties[r]; + } + } else { + let a; + for (const l of n.configurationDefaultOverrides) { + a = this.p(r, l.value, l.source, a); + } + n.configurationDefaultOverrideValue = a; + const c = this.e[r]; + if (c) { + this.A(r, c); + this.w(r, c); + } + } + e.add(r); + } + } + } + this.y(); + } + n(t, e, i) { + const s = { + type: "object", + default: e.value, + description: v(1698, null, SE(t)), + $ref: mr, + defaultDefaultValue: e.value, + source: i, + defaultValueSource: i + }; + this.e[t] = s; + this.c.properties[t] = s; + } + o(t, e, i, s) { + const r = s?.value || {}; + const n = s?.source ?? new Map(); + if (!(n instanceof Map)) { + console.error("objectConfigurationSources is not a Map"); + return; + } + for (const o of Object.keys(e)) { + const a = e[o]; + if (Nt(a) && (Gs(r[o]) || Nt(r[o]))) { + r[o] = { + ...(r[o] ?? {}), + ...a + }; + if (i) { + for (const l in a) { + n.set(`${o}.${l}`, i); + } + } + } else { + r[o] = a; + if (i) { + n.set(o, i); + } else { + n.delete(o); + } + } + } + return { + value: r, + source: n + }; + } + p(t, e, i, s) { + const r = this.e[t]; + const n = s?.value ?? r?.defaultDefaultValue; + let o = i; + if (Nt(e) && (r !== undefined && r.type === "object" || r === undefined && (Gs(n) || Nt(n)))) { + o = s?.source ?? new Map(); + if (!(o instanceof Map)) { + console.error("defaultValueSource is not a Map"); + return; + } + for (const c in e) { + if (i) { + o.set(`${t}.${c}`, i); + } + } + e = { + ...(Nt(n) ? n : {}), + ...e + }; + } + return { + value: e, + source: o + }; + } + deltaConfiguration(t) { + let e = false; + const i = new Set(); + if (t.removedDefaults) { + this.m(t.removedDefaults, i); + e = true; + } + if (t.addedDefaults) { + this.l(t.addedDefaults, i); + e = true; + } + if (t.removedConfigurations) { + this.s(t.removedConfigurations, i); + } + if (t.addedConfigurations) { + this.r(t.addedConfigurations, false, i); + } + this.j.fire(); + this.k.fire({ + properties: i, + defaultsOverrides: e + }); + } + notifyConfigurationSchemaUpdated(...t) { + this.j.fire(); + } + registerOverrideIdentifiers(t) { + this.q(t); + this.j.fire(); + } + q(t) { + for (const e of t) { + this.i.add(e); + } + this.y(); + } + r(t, e, i) { + t.forEach(s => { + this.u(s, e, s.extensionInfo, s.restrictedProperties, undefined, i); + this.d.push(s); + this.v(s); + }); + } + s(t, e) { + const i = s => { + if (s.properties) { + for (const r in s.properties) { + e.add(r); + const n = this.e[r]; + if (n?.policy?.name) { + this.f.delete(n.policy.name); + } + delete this.e[r]; + this.x(r, s.properties[r]); + } + } + s.allOf?.forEach(r => i(r)); + }; + for (const s of t) { + i(s); + const r = this.d.indexOf(s); + if (r !== -1) { + this.d.splice(r, 1); + } + } + } + u(t, e = true, i, s, r = 3, n) { + r = Qt(t.scope) ? r : t.scope; + const o = t.properties; + if (o) { + for (const c in o) { + const l = o[c]; + if (e && CE(c, l)) { + delete o[c]; + continue; + } + l.source = i; + l.defaultDefaultValue = o[c].default; + this.A(c, l); + if (Es.test(c)) { + l.scope = undefined; + } else { + l.scope = Qt(l.scope) ? r : l.scope; + l.restricted = Qt(l.restricted) ? !!s?.includes(c) : l.restricted; + } + if (o[c].hasOwnProperty("included") && !o[c].included) { + this.g[c] = o[c]; + delete o[c]; + continue; + } else { + this.e[c] = o[c]; + if (o[c].policy?.name) { + this.f.set(o[c].policy.name, c); + } + } + if (!o[c].deprecationMessage && o[c].markdownDeprecationMessage) { + o[c].deprecationMessage = o[c].markdownDeprecationMessage; + } + n.add(c); + } + } + const a = t.allOf; + if (a) { + for (const c of a) { + this.u(c, e, i, s, r, n); + } + } + } + getConfigurations() { + return this.d; + } + getConfigurationProperties() { + return this.e; + } + getPolicyConfigurations() { + return this.f; + } + getExcludedConfigurationProperties() { + return this.g; + } + getRegisteredDefaultConfigurations() { + return [...this.a]; + } + getConfigurationDefaultsOverrides() { + const t = new Map(); + for (const [e, i] of this.b) { + if (i.configurationDefaultOverrideValue) { + t.set(e, i.configurationDefaultOverrideValue); + } + } + return t; + } + v(t) { + const e = i => { + const s = i.properties; + if (s) { + for (const n in s) { + this.w(n, s[n]); + } + } + i.allOf?.forEach(e); + }; + e(t); + } + w(t, e) { + _a.properties[t] = e; + switch (e.scope) { + case 1: + Ra.properties[t] = e; + break; + case 2: + Oa.properties[t] = e; + break; + case 6: + La.properties[t] = e; + break; + case 3: + Ma.properties[t] = e; + break; + case 4: + Yn.properties[t] = e; + break; + case 5: + Yn.properties[t] = e; + this.h.properties[t] = e; + break; + } + } + x(t, e) { + delete _a.properties[t]; + switch (e.scope) { + case 1: + delete Ra.properties[t]; + break; + case 2: + delete Oa.properties[t]; + break; + case 6: + delete La.properties[t]; + break; + case 3: + delete Ma.properties[t]; + break; + case 4: + case 5: + delete Yn.properties[t]; + delete this.h.properties[t]; + break; + } + } + y() { + for (const t of this.i.values()) { + const e = `[${t}]`; + const i = { + type: "object", + description: v(1699, null), + errorMessage: v(1700, null), + $ref: mr + }; + this.A(e, i); + _a.properties[e] = i; + Ra.properties[e] = i; + Oa.properties[e] = i; + La.properties[e] = i; + Ma.properties[e] = i; + Yn.properties[e] = i; + } + } + z() { + const t = { + type: "object", + description: v(1701, null), + errorMessage: v(1702, null), + $ref: mr + }; + _a.patternProperties[wr] = t; + Ra.patternProperties[wr] = t; + Oa.patternProperties[wr] = t; + La.patternProperties[wr] = t; + Ma.patternProperties[wr] = t; + Yn.patternProperties[wr] = t; + this.j.fire(); + } + A(t, e) { + const i = this.b.get(t)?.configurationDefaultOverrideValue; + let s; + let r; + if (i && (!e.disallowConfigurationDefault || !i.source)) { + s = i.value; + r = i.source; + } + if (Gs(s)) { + s = e.defaultDefaultValue; + r = undefined; + } + if (Gs(s)) { + s = AE(e.type); + } + e.default = s; + e.defaultValueSource = r; + } + }; + gp = "\\[([^\\]]+)\\]"; + mp = new RegExp(gp, "g"); + wr = `^(${gp})+$`; + Es = new RegExp(wr); + Na = new hv(); + Gt.add(Ai.Configuration, Na); + } + }); + var dv; + var _E = g({ + "out-build/vs/platform/update/common/update.config.contribution.js"() { + "use strict"; + + H(); + be(); + Xr(); + Zs(); + dv = Gt.as(Ai.Configuration); + dv.registerConfiguration({ + id: "update", + order: 15, + title: v(2474, null), + type: "object", + properties: { + "update.mode": { + type: "string", + enum: ["none", "manual", "start", "default"], + default: "default", + scope: 1, + description: v(2475, null), + tags: ["usesOnlineServices"], + enumDescriptions: [v(2476, null), v(2477, null), v(2478, null), v(2479, null)], + policy: { + name: "UpdateMode", + minimumVersion: "1.67" + } + }, + "update.channel": { + type: "string", + default: "default", + scope: 1, + description: v(2480, null), + deprecationMessage: v(2481, null, "update.mode") + }, + "update.enableWindowsBackgroundUpdates": { + type: "boolean", + default: true, + scope: 1, + title: v(2482, null), + description: v(2483, null), + included: j && !fr + }, + "update.showReleaseNotes": { + type: "boolean", + default: true, + scope: 1, + description: v(2484, null), + tags: ["usesOnlineServices"] + }, + "update.releaseTrack": { + type: "string", + default: "stable", + scope: 1, + description: v(2485, null) + } + } + }); + } + }); + var wp; + var We; + var Wa; + var ns; + var At = g({ + "out-build/vs/base/common/cancellation.js"() { + "use strict"; + + B(); + wp = Object.freeze(function (t, e) { + const i = setTimeout(t.bind(e), 0); + return { + dispose() { + clearTimeout(i); + } + }; + }); + (function (t) { + function e(i) { + if (i === t.None || i === t.Cancelled || i instanceof Wa) { + return true; + } else if (!i || typeof i != "object") { + return false; + } else { + return typeof i.isCancellationRequested == "boolean" && typeof i.onCancellationRequested == "function"; + } + } + t.isCancellationToken = e; + t.None = Object.freeze({ + isCancellationRequested: false, + onCancellationRequested: x.None + }); + t.Cancelled = Object.freeze({ + isCancellationRequested: true, + onCancellationRequested: wp + }); + })(We ||= {}); + Wa = class { + constructor() { + this.a = false; + this.b = null; + } + cancel() { + if (!this.a) { + this.a = true; + if (this.b) { + this.b.fire(undefined); + this.dispose(); + } + } + } + get isCancellationRequested() { + return this.a; + } + get onCancellationRequested() { + if (this.a) { + return wp; + } else { + this.b ||= new $(); + return this.b.event; + } + } + dispose() { + if (this.b) { + this.b.dispose(); + this.b = null; + } + } + }; + ns = class { + constructor(t) { + this.f = undefined; + this.g = undefined; + this.g = t && t.onCancellationRequested(this.cancel, this); + } + get token() { + this.f ||= new Wa(); + return this.f; + } + cancel() { + if (this.f) { + if (this.f instanceof Wa) { + this.f.cancel(); + } + } else { + this.f = We.Cancelled; + } + } + dispose(t = false) { + if (t) { + this.cancel(); + } + this.g?.dispose(); + if (this.f) { + if (this.f instanceof Wa) { + this.f.dispose(); + } + } else { + this.f = We.None; + } + } + }; + } + }); + function RE(t) { + return t; + } + var fv; + var OE = g({ + "out-build/vs/base/common/cache.js"() { + "use strict"; + + At(); + fv = class { + constructor(t, e) { + this.a = undefined; + this.b = undefined; + if (typeof t == "function") { + this.c = t; + this.d = RE; + } else { + this.c = e; + this.d = t.getCacheKey; + } + } + get(t) { + const e = this.d(t); + if (this.b !== e) { + this.b = e; + this.a = this.c(t); + } + return this.a; + } + }; + } + }); + var vr; + var Ta = g({ + "out-build/vs/base/common/lazy.js"() { + "use strict"; + + vr = class { + constructor(t) { + this.d = t; + this.a = false; + } + get hasValue() { + return this.a; + } + get value() { + if (!this.a) { + try { + this.b = this.d(); + } catch (t) { + this.c = t; + } finally { + this.a = true; + } + } + if (this.c) { + throw this.c; + } + return this.b; + } + get rawValue() { + return this.b; + } + }; + } + }); + function LE(t) { + if (!t || typeof t != "string") { + return true; + } else { + return t.trim().length === 0; + } + } + function ja(t) { + return t.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g, "\\$&"); + } + function pv(t, e = " ") { + const i = gv(t, e); + return Qr(i, e); + } + function gv(t, e) { + if (!t || !e) { + return t; + } + const i = e.length; + if (i === 0 || t.length === 0) { + return t; + } + let s = 0; + while (t.indexOf(e, s) === s) { + s = s + i; + } + return t.substring(s); + } + function Qr(t, e) { + if (!t || !e) { + return t; + } + const i = e.length; + const s = t.length; + if (i === 0 || s === 0) { + return t; + } + let r = s; + let n = -1; + while (n = t.lastIndexOf(e, r - 1), n !== -1 && n + i === r) { + if (n === 0) { + return ""; + } + r = n; + } + return t.substring(0, r); + } + function vp(t, e) { + if (t < e) { + return -1; + } else if (t > e) { + return 1; + } else { + return 0; + } + } + function bp(t, e, i = 0, s = t.length, r = 0, n = e.length) { + for (; i < s && r < n; i++, r++) { + const c = t.charCodeAt(i); + const l = e.charCodeAt(r); + if (c < l) { + return -1; + } + if (c > l) { + return 1; + } + } + const o = s - i; + const a = n - r; + if (o < a) { + return -1; + } else if (o > a) { + return 1; + } else { + return 0; + } + } + function yp(t, e) { + return Ua(t, e, 0, t.length, 0, e.length); + } + function Ua(t, e, i = 0, s = t.length, r = 0, n = e.length) { + for (; i < s && r < n; i++, r++) { + let c = t.charCodeAt(i); + let l = e.charCodeAt(r); + if (c === l) { + continue; + } + if (c >= 128 || l >= 128) { + return bp(t.toLowerCase(), e.toLowerCase(), i, s, r, n); + } + if (mv(c)) { + c -= 32; + } + if (mv(l)) { + l -= 32; + } + const u = c - l; + if (u !== 0) { + return u; + } + } + const o = s - i; + const a = n - r; + if (o < a) { + return -1; + } else if (o > a) { + return 1; + } else { + return 0; + } + } + function mv(t) { + return t >= 97 && t <= 122; + } + function wv(t) { + return t >= 65 && t <= 90; + } + function br(t, e) { + return t.length === e.length && Ua(t, e) === 0; + } + function eu(t, e) { + const i = e.length; + if (e.length > t.length) { + return false; + } else { + return Ua(t, e, 0, i) === 0; + } + } + function ME(t) { + return t >= 55296 && t <= 56319; + } + function vv(t) { + return t >= 56320 && t <= 57343; + } + function FE(t, e) { + return (t - 55296 << 10) + (e - 56320) + 65536; + } + function NE() { + return [0, 0, 0, 51229, 51255, 12, 44061, 44087, 12, 127462, 127487, 6, 7083, 7085, 5, 47645, 47671, 12, 54813, 54839, 12, 128678, 128678, 14, 3270, 3270, 5, 9919, 9923, 14, 45853, 45879, 12, 49437, 49463, 12, 53021, 53047, 12, 71216, 71218, 7, 128398, 128399, 14, 129360, 129374, 14, 2519, 2519, 5, 4448, 4519, 9, 9742, 9742, 14, 12336, 12336, 14, 44957, 44983, 12, 46749, 46775, 12, 48541, 48567, 12, 50333, 50359, 12, 52125, 52151, 12, 53917, 53943, 12, 69888, 69890, 5, 73018, 73018, 5, 127990, 127990, 14, 128558, 128559, 14, 128759, 128760, 14, 129653, 129655, 14, 2027, 2035, 5, 2891, 2892, 7, 3761, 3761, 5, 6683, 6683, 5, 8293, 8293, 4, 9825, 9826, 14, 9999, 9999, 14, 43452, 43453, 5, 44509, 44535, 12, 45405, 45431, 12, 46301, 46327, 12, 47197, 47223, 12, 48093, 48119, 12, 48989, 49015, 12, 49885, 49911, 12, 50781, 50807, 12, 51677, 51703, 12, 52573, 52599, 12, 53469, 53495, 12, 54365, 54391, 12, 65279, 65279, 4, 70471, 70472, 7, 72145, 72147, 7, 119173, 119179, 5, 127799, 127818, 14, 128240, 128244, 14, 128512, 128512, 14, 128652, 128652, 14, 128721, 128722, 14, 129292, 129292, 14, 129445, 129450, 14, 129734, 129743, 14, 1476, 1477, 5, 2366, 2368, 7, 2750, 2752, 7, 3076, 3076, 5, 3415, 3415, 5, 4141, 4144, 5, 6109, 6109, 5, 6964, 6964, 5, 7394, 7400, 5, 9197, 9198, 14, 9770, 9770, 14, 9877, 9877, 14, 9968, 9969, 14, 10084, 10084, 14, 43052, 43052, 5, 43713, 43713, 5, 44285, 44311, 12, 44733, 44759, 12, 45181, 45207, 12, 45629, 45655, 12, 46077, 46103, 12, 46525, 46551, 12, 46973, 46999, 12, 47421, 47447, 12, 47869, 47895, 12, 48317, 48343, 12, 48765, 48791, 12, 49213, 49239, 12, 49661, 49687, 12, 50109, 50135, 12, 50557, 50583, 12, 51005, 51031, 12, 51453, 51479, 12, 51901, 51927, 12, 52349, 52375, 12, 52797, 52823, 12, 53245, 53271, 12, 53693, 53719, 12, 54141, 54167, 12, 54589, 54615, 12, 55037, 55063, 12, 69506, 69509, 5, 70191, 70193, 5, 70841, 70841, 7, 71463, 71467, 5, 72330, 72342, 5, 94031, 94031, 5, 123628, 123631, 5, 127763, 127765, 14, 127941, 127941, 14, 128043, 128062, 14, 128302, 128317, 14, 128465, 128467, 14, 128539, 128539, 14, 128640, 128640, 14, 128662, 128662, 14, 128703, 128703, 14, 128745, 128745, 14, 129004, 129007, 14, 129329, 129330, 14, 129402, 129402, 14, 129483, 129483, 14, 129686, 129704, 14, 130048, 131069, 14, 173, 173, 4, 1757, 1757, 1, 2200, 2207, 5, 2434, 2435, 7, 2631, 2632, 5, 2817, 2817, 5, 3008, 3008, 5, 3201, 3201, 5, 3387, 3388, 5, 3542, 3542, 5, 3902, 3903, 7, 4190, 4192, 5, 6002, 6003, 5, 6439, 6440, 5, 6765, 6770, 7, 7019, 7027, 5, 7154, 7155, 7, 8205, 8205, 13, 8505, 8505, 14, 9654, 9654, 14, 9757, 9757, 14, 9792, 9792, 14, 9852, 9853, 14, 9890, 9894, 14, 9937, 9937, 14, 9981, 9981, 14, 10035, 10036, 14, 11035, 11036, 14, 42654, 42655, 5, 43346, 43347, 7, 43587, 43587, 5, 44006, 44007, 7, 44173, 44199, 12, 44397, 44423, 12, 44621, 44647, 12, 44845, 44871, 12, 45069, 45095, 12, 45293, 45319, 12, 45517, 45543, 12, 45741, 45767, 12, 45965, 45991, 12, 46189, 46215, 12, 46413, 46439, 12, 46637, 46663, 12, 46861, 46887, 12, 47085, 47111, 12, 47309, 47335, 12, 47533, 47559, 12, 47757, 47783, 12, 47981, 48007, 12, 48205, 48231, 12, 48429, 48455, 12, 48653, 48679, 12, 48877, 48903, 12, 49101, 49127, 12, 49325, 49351, 12, 49549, 49575, 12, 49773, 49799, 12, 49997, 50023, 12, 50221, 50247, 12, 50445, 50471, 12, 50669, 50695, 12, 50893, 50919, 12, 51117, 51143, 12, 51341, 51367, 12, 51565, 51591, 12, 51789, 51815, 12, 52013, 52039, 12, 52237, 52263, 12, 52461, 52487, 12, 52685, 52711, 12, 52909, 52935, 12, 53133, 53159, 12, 53357, 53383, 12, 53581, 53607, 12, 53805, 53831, 12, 54029, 54055, 12, 54253, 54279, 12, 54477, 54503, 12, 54701, 54727, 12, 54925, 54951, 12, 55149, 55175, 12, 68101, 68102, 5, 69762, 69762, 7, 70067, 70069, 7, 70371, 70378, 5, 70720, 70721, 7, 71087, 71087, 5, 71341, 71341, 5, 71995, 71996, 5, 72249, 72249, 7, 72850, 72871, 5, 73109, 73109, 5, 118576, 118598, 5, 121505, 121519, 5, 127245, 127247, 14, 127568, 127569, 14, 127777, 127777, 14, 127872, 127891, 14, 127956, 127967, 14, 128015, 128016, 14, 128110, 128172, 14, 128259, 128259, 14, 128367, 128368, 14, 128424, 128424, 14, 128488, 128488, 14, 128530, 128532, 14, 128550, 128551, 14, 128566, 128566, 14, 128647, 128647, 14, 128656, 128656, 14, 128667, 128673, 14, 128691, 128693, 14, 128715, 128715, 14, 128728, 128732, 14, 128752, 128752, 14, 128765, 128767, 14, 129096, 129103, 14, 129311, 129311, 14, 129344, 129349, 14, 129394, 129394, 14, 129413, 129425, 14, 129466, 129471, 14, 129511, 129535, 14, 129664, 129666, 14, 129719, 129722, 14, 129760, 129767, 14, 917536, 917631, 5, 13, 13, 2, 1160, 1161, 5, 1564, 1564, 4, 1807, 1807, 1, 2085, 2087, 5, 2307, 2307, 7, 2382, 2383, 7, 2497, 2500, 5, 2563, 2563, 7, 2677, 2677, 5, 2763, 2764, 7, 2879, 2879, 5, 2914, 2915, 5, 3021, 3021, 5, 3142, 3144, 5, 3263, 3263, 5, 3285, 3286, 5, 3398, 3400, 7, 3530, 3530, 5, 3633, 3633, 5, 3864, 3865, 5, 3974, 3975, 5, 4155, 4156, 7, 4229, 4230, 5, 5909, 5909, 7, 6078, 6085, 7, 6277, 6278, 5, 6451, 6456, 7, 6744, 6750, 5, 6846, 6846, 5, 6972, 6972, 5, 7074, 7077, 5, 7146, 7148, 7, 7222, 7223, 5, 7416, 7417, 5, 8234, 8238, 4, 8417, 8417, 5, 9000, 9000, 14, 9203, 9203, 14, 9730, 9731, 14, 9748, 9749, 14, 9762, 9763, 14, 9776, 9783, 14, 9800, 9811, 14, 9831, 9831, 14, 9872, 9873, 14, 9882, 9882, 14, 9900, 9903, 14, 9929, 9933, 14, 9941, 9960, 14, 9974, 9974, 14, 9989, 9989, 14, 10006, 10006, 14, 10062, 10062, 14, 10160, 10160, 14, 11647, 11647, 5, 12953, 12953, 14, 43019, 43019, 5, 43232, 43249, 5, 43443, 43443, 5, 43567, 43568, 7, 43696, 43696, 5, 43765, 43765, 7, 44013, 44013, 5, 44117, 44143, 12, 44229, 44255, 12, 44341, 44367, 12, 44453, 44479, 12, 44565, 44591, 12, 44677, 44703, 12, 44789, 44815, 12, 44901, 44927, 12, 45013, 45039, 12, 45125, 45151, 12, 45237, 45263, 12, 45349, 45375, 12, 45461, 45487, 12, 45573, 45599, 12, 45685, 45711, 12, 45797, 45823, 12, 45909, 45935, 12, 46021, 46047, 12, 46133, 46159, 12, 46245, 46271, 12, 46357, 46383, 12, 46469, 46495, 12, 46581, 46607, 12, 46693, 46719, 12, 46805, 46831, 12, 46917, 46943, 12, 47029, 47055, 12, 47141, 47167, 12, 47253, 47279, 12, 47365, 47391, 12, 47477, 47503, 12, 47589, 47615, 12, 47701, 47727, 12, 47813, 47839, 12, 47925, 47951, 12, 48037, 48063, 12, 48149, 48175, 12, 48261, 48287, 12, 48373, 48399, 12, 48485, 48511, 12, 48597, 48623, 12, 48709, 48735, 12, 48821, 48847, 12, 48933, 48959, 12, 49045, 49071, 12, 49157, 49183, 12, 49269, 49295, 12, 49381, 49407, 12, 49493, 49519, 12, 49605, 49631, 12, 49717, 49743, 12, 49829, 49855, 12, 49941, 49967, 12, 50053, 50079, 12, 50165, 50191, 12, 50277, 50303, 12, 50389, 50415, 12, 50501, 50527, 12, 50613, 50639, 12, 50725, 50751, 12, 50837, 50863, 12, 50949, 50975, 12, 51061, 51087, 12, 51173, 51199, 12, 51285, 51311, 12, 51397, 51423, 12, 51509, 51535, 12, 51621, 51647, 12, 51733, 51759, 12, 51845, 51871, 12, 51957, 51983, 12, 52069, 52095, 12, 52181, 52207, 12, 52293, 52319, 12, 52405, 52431, 12, 52517, 52543, 12, 52629, 52655, 12, 52741, 52767, 12, 52853, 52879, 12, 52965, 52991, 12, 53077, 53103, 12, 53189, 53215, 12, 53301, 53327, 12, 53413, 53439, 12, 53525, 53551, 12, 53637, 53663, 12, 53749, 53775, 12, 53861, 53887, 12, 53973, 53999, 12, 54085, 54111, 12, 54197, 54223, 12, 54309, 54335, 12, 54421, 54447, 12, 54533, 54559, 12, 54645, 54671, 12, 54757, 54783, 12, 54869, 54895, 12, 54981, 55007, 12, 55093, 55119, 12, 55243, 55291, 10, 66045, 66045, 5, 68325, 68326, 5, 69688, 69702, 5, 69817, 69818, 5, 69957, 69958, 7, 70089, 70092, 5, 70198, 70199, 5, 70462, 70462, 5, 70502, 70508, 5, 70750, 70750, 5, 70846, 70846, 7, 71100, 71101, 5, 71230, 71230, 7, 71351, 71351, 5, 71737, 71738, 5, 72000, 72000, 7, 72160, 72160, 5, 72273, 72278, 5, 72752, 72758, 5, 72882, 72883, 5, 73031, 73031, 5, 73461, 73462, 7, 94192, 94193, 7, 119149, 119149, 7, 121403, 121452, 5, 122915, 122916, 5, 126980, 126980, 14, 127358, 127359, 14, 127535, 127535, 14, 127759, 127759, 14, 127771, 127771, 14, 127792, 127793, 14, 127825, 127867, 14, 127897, 127899, 14, 127945, 127945, 14, 127985, 127986, 14, 128000, 128007, 14, 128021, 128021, 14, 128066, 128100, 14, 128184, 128235, 14, 128249, 128252, 14, 128266, 128276, 14, 128335, 128335, 14, 128379, 128390, 14, 128407, 128419, 14, 128444, 128444, 14, 128481, 128481, 14, 128499, 128499, 14, 128526, 128526, 14, 128536, 128536, 14, 128543, 128543, 14, 128556, 128556, 14, 128564, 128564, 14, 128577, 128580, 14, 128643, 128645, 14, 128649, 128649, 14, 128654, 128654, 14, 128660, 128660, 14, 128664, 128664, 14, 128675, 128675, 14, 128686, 128689, 14, 128695, 128696, 14, 128705, 128709, 14, 128717, 128719, 14, 128725, 128725, 14, 128736, 128741, 14, 128747, 128748, 14, 128755, 128755, 14, 128762, 128762, 14, 128981, 128991, 14, 129009, 129023, 14, 129160, 129167, 14, 129296, 129304, 14, 129320, 129327, 14, 129340, 129342, 14, 129356, 129356, 14, 129388, 129392, 14, 129399, 129400, 14, 129404, 129407, 14, 129432, 129442, 14, 129454, 129455, 14, 129473, 129474, 14, 129485, 129487, 14, 129648, 129651, 14, 129659, 129660, 14, 129671, 129679, 14, 129709, 129711, 14, 129728, 129730, 14, 129751, 129753, 14, 129776, 129782, 14, 917505, 917505, 4, 917760, 917999, 5, 10, 10, 3, 127, 159, 4, 768, 879, 5, 1471, 1471, 5, 1536, 1541, 1, 1648, 1648, 5, 1767, 1768, 5, 1840, 1866, 5, 2070, 2073, 5, 2137, 2139, 5, 2274, 2274, 1, 2363, 2363, 7, 2377, 2380, 7, 2402, 2403, 5, 2494, 2494, 5, 2507, 2508, 7, 2558, 2558, 5, 2622, 2624, 7, 2641, 2641, 5, 2691, 2691, 7, 2759, 2760, 5, 2786, 2787, 5, 2876, 2876, 5, 2881, 2884, 5, 2901, 2902, 5, 3006, 3006, 5, 3014, 3016, 7, 3072, 3072, 5, 3134, 3136, 5, 3157, 3158, 5, 3260, 3260, 5, 3266, 3266, 5, 3274, 3275, 7, 3328, 3329, 5, 3391, 3392, 7, 3405, 3405, 5, 3457, 3457, 5, 3536, 3537, 7, 3551, 3551, 5, 3636, 3642, 5, 3764, 3772, 5, 3895, 3895, 5, 3967, 3967, 7, 3993, 4028, 5, 4146, 4151, 5, 4182, 4183, 7, 4226, 4226, 5, 4253, 4253, 5, 4957, 4959, 5, 5940, 5940, 7, 6070, 6070, 7, 6087, 6088, 7, 6158, 6158, 4, 6432, 6434, 5, 6448, 6449, 7, 6679, 6680, 5, 6742, 6742, 5, 6754, 6754, 5, 6783, 6783, 5, 6912, 6915, 5, 6966, 6970, 5, 6978, 6978, 5, 7042, 7042, 7, 7080, 7081, 5, 7143, 7143, 7, 7150, 7150, 7, 7212, 7219, 5, 7380, 7392, 5, 7412, 7412, 5, 8203, 8203, 4, 8232, 8232, 4, 8265, 8265, 14, 8400, 8412, 5, 8421, 8432, 5, 8617, 8618, 14, 9167, 9167, 14, 9200, 9200, 14, 9410, 9410, 14, 9723, 9726, 14, 9733, 9733, 14, 9745, 9745, 14, 9752, 9752, 14, 9760, 9760, 14, 9766, 9766, 14, 9774, 9774, 14, 9786, 9786, 14, 9794, 9794, 14, 9823, 9823, 14, 9828, 9828, 14, 9833, 9850, 14, 9855, 9855, 14, 9875, 9875, 14, 9880, 9880, 14, 9885, 9887, 14, 9896, 9897, 14, 9906, 9916, 14, 9926, 9927, 14, 9935, 9935, 14, 9939, 9939, 14, 9962, 9962, 14, 9972, 9972, 14, 9978, 9978, 14, 9986, 9986, 14, 9997, 9997, 14, 10002, 10002, 14, 10017, 10017, 14, 10055, 10055, 14, 10071, 10071, 14, 10133, 10135, 14, 10548, 10549, 14, 11093, 11093, 14, 12330, 12333, 5, 12441, 12442, 5, 42608, 42610, 5, 43010, 43010, 5, 43045, 43046, 5, 43188, 43203, 7, 43302, 43309, 5, 43392, 43394, 5, 43446, 43449, 5, 43493, 43493, 5, 43571, 43572, 7, 43597, 43597, 7, 43703, 43704, 5, 43756, 43757, 5, 44003, 44004, 7, 44009, 44010, 7, 44033, 44059, 12, 44089, 44115, 12, 44145, 44171, 12, 44201, 44227, 12, 44257, 44283, 12, 44313, 44339, 12, 44369, 44395, 12, 44425, 44451, 12, 44481, 44507, 12, 44537, 44563, 12, 44593, 44619, 12, 44649, 44675, 12, 44705, 44731, 12, 44761, 44787, 12, 44817, 44843, 12, 44873, 44899, 12, 44929, 44955, 12, 44985, 45011, 12, 45041, 45067, 12, 45097, 45123, 12, 45153, 45179, 12, 45209, 45235, 12, 45265, 45291, 12, 45321, 45347, 12, 45377, 45403, 12, 45433, 45459, 12, 45489, 45515, 12, 45545, 45571, 12, 45601, 45627, 12, 45657, 45683, 12, 45713, 45739, 12, 45769, 45795, 12, 45825, 45851, 12, 45881, 45907, 12, 45937, 45963, 12, 45993, 46019, 12, 46049, 46075, 12, 46105, 46131, 12, 46161, 46187, 12, 46217, 46243, 12, 46273, 46299, 12, 46329, 46355, 12, 46385, 46411, 12, 46441, 46467, 12, 46497, 46523, 12, 46553, 46579, 12, 46609, 46635, 12, 46665, 46691, 12, 46721, 46747, 12, 46777, 46803, 12, 46833, 46859, 12, 46889, 46915, 12, 46945, 46971, 12, 47001, 47027, 12, 47057, 47083, 12, 47113, 47139, 12, 47169, 47195, 12, 47225, 47251, 12, 47281, 47307, 12, 47337, 47363, 12, 47393, 47419, 12, 47449, 47475, 12, 47505, 47531, 12, 47561, 47587, 12, 47617, 47643, 12, 47673, 47699, 12, 47729, 47755, 12, 47785, 47811, 12, 47841, 47867, 12, 47897, 47923, 12, 47953, 47979, 12, 48009, 48035, 12, 48065, 48091, 12, 48121, 48147, 12, 48177, 48203, 12, 48233, 48259, 12, 48289, 48315, 12, 48345, 48371, 12, 48401, 48427, 12, 48457, 48483, 12, 48513, 48539, 12, 48569, 48595, 12, 48625, 48651, 12, 48681, 48707, 12, 48737, 48763, 12, 48793, 48819, 12, 48849, 48875, 12, 48905, 48931, 12, 48961, 48987, 12, 49017, 49043, 12, 49073, 49099, 12, 49129, 49155, 12, 49185, 49211, 12, 49241, 49267, 12, 49297, 49323, 12, 49353, 49379, 12, 49409, 49435, 12, 49465, 49491, 12, 49521, 49547, 12, 49577, 49603, 12, 49633, 49659, 12, 49689, 49715, 12, 49745, 49771, 12, 49801, 49827, 12, 49857, 49883, 12, 49913, 49939, 12, 49969, 49995, 12, 50025, 50051, 12, 50081, 50107, 12, 50137, 50163, 12, 50193, 50219, 12, 50249, 50275, 12, 50305, 50331, 12, 50361, 50387, 12, 50417, 50443, 12, 50473, 50499, 12, 50529, 50555, 12, 50585, 50611, 12, 50641, 50667, 12, 50697, 50723, 12, 50753, 50779, 12, 50809, 50835, 12, 50865, 50891, 12, 50921, 50947, 12, 50977, 51003, 12, 51033, 51059, 12, 51089, 51115, 12, 51145, 51171, 12, 51201, 51227, 12, 51257, 51283, 12, 51313, 51339, 12, 51369, 51395, 12, 51425, 51451, 12, 51481, 51507, 12, 51537, 51563, 12, 51593, 51619, 12, 51649, 51675, 12, 51705, 51731, 12, 51761, 51787, 12, 51817, 51843, 12, 51873, 51899, 12, 51929, 51955, 12, 51985, 52011, 12, 52041, 52067, 12, 52097, 52123, 12, 52153, 52179, 12, 52209, 52235, 12, 52265, 52291, 12, 52321, 52347, 12, 52377, 52403, 12, 52433, 52459, 12, 52489, 52515, 12, 52545, 52571, 12, 52601, 52627, 12, 52657, 52683, 12, 52713, 52739, 12, 52769, 52795, 12, 52825, 52851, 12, 52881, 52907, 12, 52937, 52963, 12, 52993, 53019, 12, 53049, 53075, 12, 53105, 53131, 12, 53161, 53187, 12, 53217, 53243, 12, 53273, 53299, 12, 53329, 53355, 12, 53385, 53411, 12, 53441, 53467, 12, 53497, 53523, 12, 53553, 53579, 12, 53609, 53635, 12, 53665, 53691, 12, 53721, 53747, 12, 53777, 53803, 12, 53833, 53859, 12, 53889, 53915, 12, 53945, 53971, 12, 54001, 54027, 12, 54057, 54083, 12, 54113, 54139, 12, 54169, 54195, 12, 54225, 54251, 12, 54281, 54307, 12, 54337, 54363, 12, 54393, 54419, 12, 54449, 54475, 12, 54505, 54531, 12, 54561, 54587, 12, 54617, 54643, 12, 54673, 54699, 12, 54729, 54755, 12, 54785, 54811, 12, 54841, 54867, 12, 54897, 54923, 12, 54953, 54979, 12, 55009, 55035, 12, 55065, 55091, 12, 55121, 55147, 12, 55177, 55203, 12, 65024, 65039, 5, 65520, 65528, 4, 66422, 66426, 5, 68152, 68154, 5, 69291, 69292, 5, 69633, 69633, 5, 69747, 69748, 5, 69811, 69814, 5, 69826, 69826, 5, 69932, 69932, 7, 70016, 70017, 5, 70079, 70080, 7, 70095, 70095, 5, 70196, 70196, 5, 70367, 70367, 5, 70402, 70403, 7, 70464, 70464, 5, 70487, 70487, 5, 70709, 70711, 7, 70725, 70725, 7, 70833, 70834, 7, 70843, 70844, 7, 70849, 70849, 7, 71090, 71093, 5, 71103, 71104, 5, 71227, 71228, 7, 71339, 71339, 5, 71344, 71349, 5, 71458, 71461, 5, 71727, 71735, 5, 71985, 71989, 7, 71998, 71998, 5, 72002, 72002, 7, 72154, 72155, 5, 72193, 72202, 5, 72251, 72254, 5, 72281, 72283, 5, 72344, 72345, 5, 72766, 72766, 7, 72874, 72880, 5, 72885, 72886, 5, 73023, 73029, 5, 73104, 73105, 5, 73111, 73111, 5, 92912, 92916, 5, 94095, 94098, 5, 113824, 113827, 4, 119142, 119142, 7, 119155, 119162, 4, 119362, 119364, 5, 121476, 121476, 5, 122888, 122904, 5, 123184, 123190, 5, 125252, 125258, 5, 127183, 127183, 14, 127340, 127343, 14, 127377, 127386, 14, 127491, 127503, 14, 127548, 127551, 14, 127744, 127756, 14, 127761, 127761, 14, 127769, 127769, 14, 127773, 127774, 14, 127780, 127788, 14, 127796, 127797, 14, 127820, 127823, 14, 127869, 127869, 14, 127894, 127895, 14, 127902, 127903, 14, 127943, 127943, 14, 127947, 127950, 14, 127972, 127972, 14, 127988, 127988, 14, 127992, 127994, 14, 128009, 128011, 14, 128019, 128019, 14, 128023, 128041, 14, 128064, 128064, 14, 128102, 128107, 14, 128174, 128181, 14, 128238, 128238, 14, 128246, 128247, 14, 128254, 128254, 14, 128264, 128264, 14, 128278, 128299, 14, 128329, 128330, 14, 128348, 128359, 14, 128371, 128377, 14, 128392, 128393, 14, 128401, 128404, 14, 128421, 128421, 14, 128433, 128434, 14, 128450, 128452, 14, 128476, 128478, 14, 128483, 128483, 14, 128495, 128495, 14, 128506, 128506, 14, 128519, 128520, 14, 128528, 128528, 14, 128534, 128534, 14, 128538, 128538, 14, 128540, 128542, 14, 128544, 128549, 14, 128552, 128555, 14, 128557, 128557, 14, 128560, 128563, 14, 128565, 128565, 14, 128567, 128576, 14, 128581, 128591, 14, 128641, 128642, 14, 128646, 128646, 14, 128648, 128648, 14, 128650, 128651, 14, 128653, 128653, 14, 128655, 128655, 14, 128657, 128659, 14, 128661, 128661, 14, 128663, 128663, 14, 128665, 128666, 14, 128674, 128674, 14, 128676, 128677, 14, 128679, 128685, 14, 128690, 128690, 14, 128694, 128694, 14, 128697, 128702, 14, 128704, 128704, 14, 128710, 128714, 14, 128716, 128716, 14, 128720, 128720, 14, 128723, 128724, 14, 128726, 128727, 14, 128733, 128735, 14, 128742, 128744, 14, 128746, 128746, 14, 128749, 128751, 14, 128753, 128754, 14, 128756, 128758, 14, 128761, 128761, 14, 128763, 128764, 14, 128884, 128895, 14, 128992, 129003, 14, 129008, 129008, 14, 129036, 129039, 14, 129114, 129119, 14, 129198, 129279, 14, 129293, 129295, 14, 129305, 129310, 14, 129312, 129319, 14, 129328, 129328, 14, 129331, 129338, 14, 129343, 129343, 14, 129351, 129355, 14, 129357, 129359, 14, 129375, 129387, 14, 129393, 129393, 14, 129395, 129398, 14, 129401, 129401, 14, 129403, 129403, 14, 129408, 129412, 14, 129426, 129431, 14, 129443, 129444, 14, 129451, 129453, 14, 129456, 129465, 14, 129472, 129472, 14, 129475, 129482, 14, 129484, 129484, 14, 129488, 129510, 14, 129536, 129647, 14, 129652, 129652, 14, 129656, 129658, 14, 129661, 129663, 14, 129667, 129670, 14, 129680, 129685, 14, 129705, 129708, 14, 129712, 129718, 14, 129723, 129727, 14, 129731, 129733, 14, 129744, 129750, 14, 129754, 129759, 14, 129768, 129775, 14, 129783, 129791, 14, 917504, 917504, 4, 917506, 917535, 4, 917632, 917759, 4, 918000, 921599, 4, 0, 9, 4, 11, 12, 4, 14, 31, 4, 169, 169, 14, 174, 174, 14, 1155, 1159, 5, 1425, 1469, 5, 1473, 1474, 5, 1479, 1479, 5, 1552, 1562, 5, 1611, 1631, 5, 1750, 1756, 5, 1759, 1764, 5, 1770, 1773, 5, 1809, 1809, 5, 1958, 1968, 5, 2045, 2045, 5, 2075, 2083, 5, 2089, 2093, 5, 2192, 2193, 1, 2250, 2273, 5, 2275, 2306, 5, 2362, 2362, 5, 2364, 2364, 5, 2369, 2376, 5, 2381, 2381, 5, 2385, 2391, 5, 2433, 2433, 5, 2492, 2492, 5, 2495, 2496, 7, 2503, 2504, 7, 2509, 2509, 5, 2530, 2531, 5, 2561, 2562, 5, 2620, 2620, 5, 2625, 2626, 5, 2635, 2637, 5, 2672, 2673, 5, 2689, 2690, 5, 2748, 2748, 5, 2753, 2757, 5, 2761, 2761, 7, 2765, 2765, 5, 2810, 2815, 5, 2818, 2819, 7, 2878, 2878, 5, 2880, 2880, 7, 2887, 2888, 7, 2893, 2893, 5, 2903, 2903, 5, 2946, 2946, 5, 3007, 3007, 7, 3009, 3010, 7, 3018, 3020, 7, 3031, 3031, 5, 3073, 3075, 7, 3132, 3132, 5, 3137, 3140, 7, 3146, 3149, 5, 3170, 3171, 5, 3202, 3203, 7, 3262, 3262, 7, 3264, 3265, 7, 3267, 3268, 7, 3271, 3272, 7, 3276, 3277, 5, 3298, 3299, 5, 3330, 3331, 7, 3390, 3390, 5, 3393, 3396, 5, 3402, 3404, 7, 3406, 3406, 1, 3426, 3427, 5, 3458, 3459, 7, 3535, 3535, 5, 3538, 3540, 5, 3544, 3550, 7, 3570, 3571, 7, 3635, 3635, 7, 3655, 3662, 5, 3763, 3763, 7, 3784, 3789, 5, 3893, 3893, 5, 3897, 3897, 5, 3953, 3966, 5, 3968, 3972, 5, 3981, 3991, 5, 4038, 4038, 5, 4145, 4145, 7, 4153, 4154, 5, 4157, 4158, 5, 4184, 4185, 5, 4209, 4212, 5, 4228, 4228, 7, 4237, 4237, 5, 4352, 4447, 8, 4520, 4607, 10, 5906, 5908, 5, 5938, 5939, 5, 5970, 5971, 5, 6068, 6069, 5, 6071, 6077, 5, 6086, 6086, 5, 6089, 6099, 5, 6155, 6157, 5, 6159, 6159, 5, 6313, 6313, 5, 6435, 6438, 7, 6441, 6443, 7, 6450, 6450, 5, 6457, 6459, 5, 6681, 6682, 7, 6741, 6741, 7, 6743, 6743, 7, 6752, 6752, 5, 6757, 6764, 5, 6771, 6780, 5, 6832, 6845, 5, 6847, 6862, 5, 6916, 6916, 7, 6965, 6965, 5, 6971, 6971, 7, 6973, 6977, 7, 6979, 6980, 7, 7040, 7041, 5, 7073, 7073, 7, 7078, 7079, 7, 7082, 7082, 7, 7142, 7142, 5, 7144, 7145, 5, 7149, 7149, 5, 7151, 7153, 5, 7204, 7211, 7, 7220, 7221, 7, 7376, 7378, 5, 7393, 7393, 7, 7405, 7405, 5, 7415, 7415, 7, 7616, 7679, 5, 8204, 8204, 5, 8206, 8207, 4, 8233, 8233, 4, 8252, 8252, 14, 8288, 8292, 4, 8294, 8303, 4, 8413, 8416, 5, 8418, 8420, 5, 8482, 8482, 14, 8596, 8601, 14, 8986, 8987, 14, 9096, 9096, 14, 9193, 9196, 14, 9199, 9199, 14, 9201, 9202, 14, 9208, 9210, 14, 9642, 9643, 14, 9664, 9664, 14, 9728, 9729, 14, 9732, 9732, 14, 9735, 9741, 14, 9743, 9744, 14, 9746, 9746, 14, 9750, 9751, 14, 9753, 9756, 14, 9758, 9759, 14, 9761, 9761, 14, 9764, 9765, 14, 9767, 9769, 14, 9771, 9773, 14, 9775, 9775, 14, 9784, 9785, 14, 9787, 9791, 14, 9793, 9793, 14, 9795, 9799, 14, 9812, 9822, 14, 9824, 9824, 14, 9827, 9827, 14, 9829, 9830, 14, 9832, 9832, 14, 9851, 9851, 14, 9854, 9854, 14, 9856, 9861, 14, 9874, 9874, 14, 9876, 9876, 14, 9878, 9879, 14, 9881, 9881, 14, 9883, 9884, 14, 9888, 9889, 14, 9895, 9895, 14, 9898, 9899, 14, 9904, 9905, 14, 9917, 9918, 14, 9924, 9925, 14, 9928, 9928, 14, 9934, 9934, 14, 9936, 9936, 14, 9938, 9938, 14, 9940, 9940, 14, 9961, 9961, 14, 9963, 9967, 14, 9970, 9971, 14, 9973, 9973, 14, 9975, 9977, 14, 9979, 9980, 14, 9982, 9985, 14, 9987, 9988, 14, 9992, 9996, 14, 9998, 9998, 14, 10000, 10001, 14, 10004, 10004, 14, 10013, 10013, 14, 10024, 10024, 14, 10052, 10052, 14, 10060, 10060, 14, 10067, 10069, 14, 10083, 10083, 14, 10085, 10087, 14, 10145, 10145, 14, 10175, 10175, 14, 11013, 11015, 14, 11088, 11088, 14, 11503, 11505, 5, 11744, 11775, 5, 12334, 12335, 5, 12349, 12349, 14, 12951, 12951, 14, 42607, 42607, 5, 42612, 42621, 5, 42736, 42737, 5, 43014, 43014, 5, 43043, 43044, 7, 43047, 43047, 7, 43136, 43137, 7, 43204, 43205, 5, 43263, 43263, 5, 43335, 43345, 5, 43360, 43388, 8, 43395, 43395, 7, 43444, 43445, 7, 43450, 43451, 7, 43454, 43456, 7, 43561, 43566, 5, 43569, 43570, 5, 43573, 43574, 5, 43596, 43596, 5, 43644, 43644, 5, 43698, 43700, 5, 43710, 43711, 5, 43755, 43755, 7, 43758, 43759, 7, 43766, 43766, 5, 44005, 44005, 5, 44008, 44008, 5, 44012, 44012, 7, 44032, 44032, 11, 44060, 44060, 11, 44088, 44088, 11, 44116, 44116, 11, 44144, 44144, 11, 44172, 44172, 11, 44200, 44200, 11, 44228, 44228, 11, 44256, 44256, 11, 44284, 44284, 11, 44312, 44312, 11, 44340, 44340, 11, 44368, 44368, 11, 44396, 44396, 11, 44424, 44424, 11, 44452, 44452, 11, 44480, 44480, 11, 44508, 44508, 11, 44536, 44536, 11, 44564, 44564, 11, 44592, 44592, 11, 44620, 44620, 11, 44648, 44648, 11, 44676, 44676, 11, 44704, 44704, 11, 44732, 44732, 11, 44760, 44760, 11, 44788, 44788, 11, 44816, 44816, 11, 44844, 44844, 11, 44872, 44872, 11, 44900, 44900, 11, 44928, 44928, 11, 44956, 44956, 11, 44984, 44984, 11, 45012, 45012, 11, 45040, 45040, 11, 45068, 45068, 11, 45096, 45096, 11, 45124, 45124, 11, 45152, 45152, 11, 45180, 45180, 11, 45208, 45208, 11, 45236, 45236, 11, 45264, 45264, 11, 45292, 45292, 11, 45320, 45320, 11, 45348, 45348, 11, 45376, 45376, 11, 45404, 45404, 11, 45432, 45432, 11, 45460, 45460, 11, 45488, 45488, 11, 45516, 45516, 11, 45544, 45544, 11, 45572, 45572, 11, 45600, 45600, 11, 45628, 45628, 11, 45656, 45656, 11, 45684, 45684, 11, 45712, 45712, 11, 45740, 45740, 11, 45768, 45768, 11, 45796, 45796, 11, 45824, 45824, 11, 45852, 45852, 11, 45880, 45880, 11, 45908, 45908, 11, 45936, 45936, 11, 45964, 45964, 11, 45992, 45992, 11, 46020, 46020, 11, 46048, 46048, 11, 46076, 46076, 11, 46104, 46104, 11, 46132, 46132, 11, 46160, 46160, 11, 46188, 46188, 11, 46216, 46216, 11, 46244, 46244, 11, 46272, 46272, 11, 46300, 46300, 11, 46328, 46328, 11, 46356, 46356, 11, 46384, 46384, 11, 46412, 46412, 11, 46440, 46440, 11, 46468, 46468, 11, 46496, 46496, 11, 46524, 46524, 11, 46552, 46552, 11, 46580, 46580, 11, 46608, 46608, 11, 46636, 46636, 11, 46664, 46664, 11, 46692, 46692, 11, 46720, 46720, 11, 46748, 46748, 11, 46776, 46776, 11, 46804, 46804, 11, 46832, 46832, 11, 46860, 46860, 11, 46888, 46888, 11, 46916, 46916, 11, 46944, 46944, 11, 46972, 46972, 11, 47000, 47000, 11, 47028, 47028, 11, 47056, 47056, 11, 47084, 47084, 11, 47112, 47112, 11, 47140, 47140, 11, 47168, 47168, 11, 47196, 47196, 11, 47224, 47224, 11, 47252, 47252, 11, 47280, 47280, 11, 47308, 47308, 11, 47336, 47336, 11, 47364, 47364, 11, 47392, 47392, 11, 47420, 47420, 11, 47448, 47448, 11, 47476, 47476, 11, 47504, 47504, 11, 47532, 47532, 11, 47560, 47560, 11, 47588, 47588, 11, 47616, 47616, 11, 47644, 47644, 11, 47672, 47672, 11, 47700, 47700, 11, 47728, 47728, 11, 47756, 47756, 11, 47784, 47784, 11, 47812, 47812, 11, 47840, 47840, 11, 47868, 47868, 11, 47896, 47896, 11, 47924, 47924, 11, 47952, 47952, 11, 47980, 47980, 11, 48008, 48008, 11, 48036, 48036, 11, 48064, 48064, 11, 48092, 48092, 11, 48120, 48120, 11, 48148, 48148, 11, 48176, 48176, 11, 48204, 48204, 11, 48232, 48232, 11, 48260, 48260, 11, 48288, 48288, 11, 48316, 48316, 11, 48344, 48344, 11, 48372, 48372, 11, 48400, 48400, 11, 48428, 48428, 11, 48456, 48456, 11, 48484, 48484, 11, 48512, 48512, 11, 48540, 48540, 11, 48568, 48568, 11, 48596, 48596, 11, 48624, 48624, 11, 48652, 48652, 11, 48680, 48680, 11, 48708, 48708, 11, 48736, 48736, 11, 48764, 48764, 11, 48792, 48792, 11, 48820, 48820, 11, 48848, 48848, 11, 48876, 48876, 11, 48904, 48904, 11, 48932, 48932, 11, 48960, 48960, 11, 48988, 48988, 11, 49016, 49016, 11, 49044, 49044, 11, 49072, 49072, 11, 49100, 49100, 11, 49128, 49128, 11, 49156, 49156, 11, 49184, 49184, 11, 49212, 49212, 11, 49240, 49240, 11, 49268, 49268, 11, 49296, 49296, 11, 49324, 49324, 11, 49352, 49352, 11, 49380, 49380, 11, 49408, 49408, 11, 49436, 49436, 11, 49464, 49464, 11, 49492, 49492, 11, 49520, 49520, 11, 49548, 49548, 11, 49576, 49576, 11, 49604, 49604, 11, 49632, 49632, 11, 49660, 49660, 11, 49688, 49688, 11, 49716, 49716, 11, 49744, 49744, 11, 49772, 49772, 11, 49800, 49800, 11, 49828, 49828, 11, 49856, 49856, 11, 49884, 49884, 11, 49912, 49912, 11, 49940, 49940, 11, 49968, 49968, 11, 49996, 49996, 11, 50024, 50024, 11, 50052, 50052, 11, 50080, 50080, 11, 50108, 50108, 11, 50136, 50136, 11, 50164, 50164, 11, 50192, 50192, 11, 50220, 50220, 11, 50248, 50248, 11, 50276, 50276, 11, 50304, 50304, 11, 50332, 50332, 11, 50360, 50360, 11, 50388, 50388, 11, 50416, 50416, 11, 50444, 50444, 11, 50472, 50472, 11, 50500, 50500, 11, 50528, 50528, 11, 50556, 50556, 11, 50584, 50584, 11, 50612, 50612, 11, 50640, 50640, 11, 50668, 50668, 11, 50696, 50696, 11, 50724, 50724, 11, 50752, 50752, 11, 50780, 50780, 11, 50808, 50808, 11, 50836, 50836, 11, 50864, 50864, 11, 50892, 50892, 11, 50920, 50920, 11, 50948, 50948, 11, 50976, 50976, 11, 51004, 51004, 11, 51032, 51032, 11, 51060, 51060, 11, 51088, 51088, 11, 51116, 51116, 11, 51144, 51144, 11, 51172, 51172, 11, 51200, 51200, 11, 51228, 51228, 11, 51256, 51256, 11, 51284, 51284, 11, 51312, 51312, 11, 51340, 51340, 11, 51368, 51368, 11, 51396, 51396, 11, 51424, 51424, 11, 51452, 51452, 11, 51480, 51480, 11, 51508, 51508, 11, 51536, 51536, 11, 51564, 51564, 11, 51592, 51592, 11, 51620, 51620, 11, 51648, 51648, 11, 51676, 51676, 11, 51704, 51704, 11, 51732, 51732, 11, 51760, 51760, 11, 51788, 51788, 11, 51816, 51816, 11, 51844, 51844, 11, 51872, 51872, 11, 51900, 51900, 11, 51928, 51928, 11, 51956, 51956, 11, 51984, 51984, 11, 52012, 52012, 11, 52040, 52040, 11, 52068, 52068, 11, 52096, 52096, 11, 52124, 52124, 11, 52152, 52152, 11, 52180, 52180, 11, 52208, 52208, 11, 52236, 52236, 11, 52264, 52264, 11, 52292, 52292, 11, 52320, 52320, 11, 52348, 52348, 11, 52376, 52376, 11, 52404, 52404, 11, 52432, 52432, 11, 52460, 52460, 11, 52488, 52488, 11, 52516, 52516, 11, 52544, 52544, 11, 52572, 52572, 11, 52600, 52600, 11, 52628, 52628, 11, 52656, 52656, 11, 52684, 52684, 11, 52712, 52712, 11, 52740, 52740, 11, 52768, 52768, 11, 52796, 52796, 11, 52824, 52824, 11, 52852, 52852, 11, 52880, 52880, 11, 52908, 52908, 11, 52936, 52936, 11, 52964, 52964, 11, 52992, 52992, 11, 53020, 53020, 11, 53048, 53048, 11, 53076, 53076, 11, 53104, 53104, 11, 53132, 53132, 11, 53160, 53160, 11, 53188, 53188, 11, 53216, 53216, 11, 53244, 53244, 11, 53272, 53272, 11, 53300, 53300, 11, 53328, 53328, 11, 53356, 53356, 11, 53384, 53384, 11, 53412, 53412, 11, 53440, 53440, 11, 53468, 53468, 11, 53496, 53496, 11, 53524, 53524, 11, 53552, 53552, 11, 53580, 53580, 11, 53608, 53608, 11, 53636, 53636, 11, 53664, 53664, 11, 53692, 53692, 11, 53720, 53720, 11, 53748, 53748, 11, 53776, 53776, 11, 53804, 53804, 11, 53832, 53832, 11, 53860, 53860, 11, 53888, 53888, 11, 53916, 53916, 11, 53944, 53944, 11, 53972, 53972, 11, 54000, 54000, 11, 54028, 54028, 11, 54056, 54056, 11, 54084, 54084, 11, 54112, 54112, 11, 54140, 54140, 11, 54168, 54168, 11, 54196, 54196, 11, 54224, 54224, 11, 54252, 54252, 11, 54280, 54280, 11, 54308, 54308, 11, 54336, 54336, 11, 54364, 54364, 11, 54392, 54392, 11, 54420, 54420, 11, 54448, 54448, 11, 54476, 54476, 11, 54504, 54504, 11, 54532, 54532, 11, 54560, 54560, 11, 54588, 54588, 11, 54616, 54616, 11, 54644, 54644, 11, 54672, 54672, 11, 54700, 54700, 11, 54728, 54728, 11, 54756, 54756, 11, 54784, 54784, 11, 54812, 54812, 11, 54840, 54840, 11, 54868, 54868, 11, 54896, 54896, 11, 54924, 54924, 11, 54952, 54952, 11, 54980, 54980, 11, 55008, 55008, 11, 55036, 55036, 11, 55064, 55064, 11, 55092, 55092, 11, 55120, 55120, 11, 55148, 55148, 11, 55176, 55176, 11, 55216, 55238, 9, 64286, 64286, 5, 65056, 65071, 5, 65438, 65439, 5, 65529, 65531, 4, 66272, 66272, 5, 68097, 68099, 5, 68108, 68111, 5, 68159, 68159, 5, 68900, 68903, 5, 69446, 69456, 5, 69632, 69632, 7, 69634, 69634, 7, 69744, 69744, 5, 69759, 69761, 5, 69808, 69810, 7, 69815, 69816, 7, 69821, 69821, 1, 69837, 69837, 1, 69927, 69931, 5, 69933, 69940, 5, 70003, 70003, 5, 70018, 70018, 7, 70070, 70078, 5, 70082, 70083, 1, 70094, 70094, 7, 70188, 70190, 7, 70194, 70195, 7, 70197, 70197, 7, 70206, 70206, 5, 70368, 70370, 7, 70400, 70401, 5, 70459, 70460, 5, 70463, 70463, 7, 70465, 70468, 7, 70475, 70477, 7, 70498, 70499, 7, 70512, 70516, 5, 70712, 70719, 5, 70722, 70724, 5, 70726, 70726, 5, 70832, 70832, 5, 70835, 70840, 5, 70842, 70842, 5, 70845, 70845, 5, 70847, 70848, 5, 70850, 70851, 5, 71088, 71089, 7, 71096, 71099, 7, 71102, 71102, 7, 71132, 71133, 5, 71219, 71226, 5, 71229, 71229, 5, 71231, 71232, 5, 71340, 71340, 7, 71342, 71343, 7, 71350, 71350, 7, 71453, 71455, 5, 71462, 71462, 7, 71724, 71726, 7, 71736, 71736, 7, 71984, 71984, 5, 71991, 71992, 7, 71997, 71997, 7, 71999, 71999, 1, 72001, 72001, 1, 72003, 72003, 5, 72148, 72151, 5, 72156, 72159, 7, 72164, 72164, 7, 72243, 72248, 5, 72250, 72250, 1, 72263, 72263, 5, 72279, 72280, 7, 72324, 72329, 1, 72343, 72343, 7, 72751, 72751, 7, 72760, 72765, 5, 72767, 72767, 5, 72873, 72873, 7, 72881, 72881, 7, 72884, 72884, 7, 73009, 73014, 5, 73020, 73021, 5, 73030, 73030, 1, 73098, 73102, 7, 73107, 73108, 7, 73110, 73110, 7, 73459, 73460, 5, 78896, 78904, 4, 92976, 92982, 5, 94033, 94087, 7, 94180, 94180, 5, 113821, 113822, 5, 118528, 118573, 5, 119141, 119141, 5, 119143, 119145, 5, 119150, 119154, 5, 119163, 119170, 5, 119210, 119213, 5, 121344, 121398, 5, 121461, 121461, 5, 121499, 121503, 5, 122880, 122886, 5, 122907, 122913, 5, 122918, 122922, 5, 123566, 123566, 5, 125136, 125142, 5, 126976, 126979, 14, 126981, 127182, 14, 127184, 127231, 14, 127279, 127279, 14, 127344, 127345, 14, 127374, 127374, 14, 127405, 127461, 14, 127489, 127490, 14, 127514, 127514, 14, 127538, 127546, 14, 127561, 127567, 14, 127570, 127743, 14, 127757, 127758, 14, 127760, 127760, 14, 127762, 127762, 14, 127766, 127768, 14, 127770, 127770, 14, 127772, 127772, 14, 127775, 127776, 14, 127778, 127779, 14, 127789, 127791, 14, 127794, 127795, 14, 127798, 127798, 14, 127819, 127819, 14, 127824, 127824, 14, 127868, 127868, 14, 127870, 127871, 14, 127892, 127893, 14, 127896, 127896, 14, 127900, 127901, 14, 127904, 127940, 14, 127942, 127942, 14, 127944, 127944, 14, 127946, 127946, 14, 127951, 127955, 14, 127968, 127971, 14, 127973, 127984, 14, 127987, 127987, 14, 127989, 127989, 14, 127991, 127991, 14, 127995, 127999, 5, 128008, 128008, 14, 128012, 128014, 14, 128017, 128018, 14, 128020, 128020, 14, 128022, 128022, 14, 128042, 128042, 14, 128063, 128063, 14, 128065, 128065, 14, 128101, 128101, 14, 128108, 128109, 14, 128173, 128173, 14, 128182, 128183, 14, 128236, 128237, 14, 128239, 128239, 14, 128245, 128245, 14, 128248, 128248, 14, 128253, 128253, 14, 128255, 128258, 14, 128260, 128263, 14, 128265, 128265, 14, 128277, 128277, 14, 128300, 128301, 14, 128326, 128328, 14, 128331, 128334, 14, 128336, 128347, 14, 128360, 128366, 14, 128369, 128370, 14, 128378, 128378, 14, 128391, 128391, 14, 128394, 128397, 14, 128400, 128400, 14, 128405, 128406, 14, 128420, 128420, 14, 128422, 128423, 14, 128425, 128432, 14, 128435, 128443, 14, 128445, 128449, 14, 128453, 128464, 14, 128468, 128475, 14, 128479, 128480, 14, 128482, 128482, 14, 128484, 128487, 14, 128489, 128494, 14, 128496, 128498, 14, 128500, 128505, 14, 128507, 128511, 14, 128513, 128518, 14, 128521, 128525, 14, 128527, 128527, 14, 128529, 128529, 14, 128533, 128533, 14, 128535, 128535, 14, 128537, 128537, 14]; + } + var WE; + var bv; + var TE; + var yv; + var jE; + var UE; + var Wt = g({ + "out-build/vs/base/common/strings.js"() { + "use strict"; + + OE(); + Ta(); + WE = ""; + (function (t) { + t[t.Other = 0] = "Other"; + t[t.Prepend = 1] = "Prepend"; + t[t.CR = 2] = "CR"; + t[t.LF = 3] = "LF"; + t[t.Control = 4] = "Control"; + t[t.Extend = 5] = "Extend"; + t[t.Regional_Indicator = 6] = "Regional_Indicator"; + t[t.SpacingMark = 7] = "SpacingMark"; + t[t.L = 8] = "L"; + t[t.V = 9] = "V"; + t[t.T = 10] = "T"; + t[t.LV = 11] = "LV"; + t[t.LVT = 12] = "LVT"; + t[t.ZWJ = 13] = "ZWJ"; + t[t.Extended_Pictographic = 14] = "Extended_Pictographic"; + })(bv ||= {}); + TE = class Sl { + static { + this.c = null; + } + static getInstance() { + Sl.c ||= new Sl(); + return Sl.c; + } + constructor() { + this.d = NE(); + } + getGraphemeBreakType(e) { + if (e < 32) { + if (e === 10) { + return 3; + } else if (e === 13) { + return 2; + } else { + return 4; + } + } + if (e < 127) { + return 0; + } + const i = this.d; + const s = i.length / 3; + let r = 1; + while (r <= s) { + if (e < i[r * 3]) { + r = r * 2; + } else if (e > i[r * 3 + 1]) { + r = r * 2 + 1; + } else { + return i[r * 3 + 2]; + } + } + return 0; + } + }; + (function (t) { + t[t.zwj = 8205] = "zwj"; + t[t.emojiVariantSelector = 65039] = "emojiVariantSelector"; + t[t.enclosingKeyCap = 8419] = "enclosingKeyCap"; + })(yv ||= {}); + jE = class El { + static { + this.c = new vr(() => ({ + _common: [8232, 32, 8233, 32, 5760, 32, 8192, 32, 8193, 32, 8194, 32, 8195, 32, 8196, 32, 8197, 32, 8198, 32, 8200, 32, 8201, 32, 8202, 32, 8287, 32, 8199, 32, 8239, 32, 2042, 95, 65101, 95, 65102, 95, 65103, 95, 8208, 45, 8209, 45, 8210, 45, 65112, 45, 1748, 45, 8259, 45, 727, 45, 8722, 45, 10134, 45, 11450, 45, 1549, 44, 1643, 44, 8218, 44, 184, 44, 42233, 44, 894, 59, 2307, 58, 2691, 58, 1417, 58, 1795, 58, 1796, 58, 5868, 58, 65072, 58, 6147, 58, 6153, 58, 8282, 58, 1475, 58, 760, 58, 42889, 58, 8758, 58, 720, 58, 42237, 58, 451, 33, 11601, 33, 660, 63, 577, 63, 2429, 63, 5038, 63, 42731, 63, 119149, 46, 8228, 46, 1793, 46, 1794, 46, 42510, 46, 68176, 46, 1632, 46, 1776, 46, 42232, 46, 1373, 96, 65287, 96, 8219, 96, 8242, 96, 1370, 96, 1523, 96, 8175, 96, 65344, 96, 900, 96, 8189, 96, 8125, 96, 8127, 96, 8190, 96, 697, 96, 884, 96, 712, 96, 714, 96, 715, 96, 756, 96, 699, 96, 701, 96, 700, 96, 702, 96, 42892, 96, 1497, 96, 2036, 96, 2037, 96, 5194, 96, 5836, 96, 94033, 96, 94034, 96, 65339, 91, 10088, 40, 10098, 40, 12308, 40, 64830, 40, 65341, 93, 10089, 41, 10099, 41, 12309, 41, 64831, 41, 10100, 123, 119060, 123, 10101, 125, 65342, 94, 8270, 42, 1645, 42, 8727, 42, 66335, 42, 5941, 47, 8257, 47, 8725, 47, 8260, 47, 9585, 47, 10187, 47, 10744, 47, 119354, 47, 12755, 47, 12339, 47, 11462, 47, 20031, 47, 12035, 47, 65340, 92, 65128, 92, 8726, 92, 10189, 92, 10741, 92, 10745, 92, 119311, 92, 119355, 92, 12756, 92, 20022, 92, 12034, 92, 42872, 38, 708, 94, 710, 94, 5869, 43, 10133, 43, 66203, 43, 8249, 60, 10094, 60, 706, 60, 119350, 60, 5176, 60, 5810, 60, 5120, 61, 11840, 61, 12448, 61, 42239, 61, 8250, 62, 10095, 62, 707, 62, 119351, 62, 5171, 62, 94015, 62, 8275, 126, 732, 126, 8128, 126, 8764, 126, 65372, 124, 65293, 45, 120784, 50, 120794, 50, 120804, 50, 120814, 50, 120824, 50, 130034, 50, 42842, 50, 423, 50, 1000, 50, 42564, 50, 5311, 50, 42735, 50, 119302, 51, 120785, 51, 120795, 51, 120805, 51, 120815, 51, 120825, 51, 130035, 51, 42923, 51, 540, 51, 439, 51, 42858, 51, 11468, 51, 1248, 51, 94011, 51, 71882, 51, 120786, 52, 120796, 52, 120806, 52, 120816, 52, 120826, 52, 130036, 52, 5070, 52, 71855, 52, 120787, 53, 120797, 53, 120807, 53, 120817, 53, 120827, 53, 130037, 53, 444, 53, 71867, 53, 120788, 54, 120798, 54, 120808, 54, 120818, 54, 120828, 54, 130038, 54, 11474, 54, 5102, 54, 71893, 54, 119314, 55, 120789, 55, 120799, 55, 120809, 55, 120819, 55, 120829, 55, 130039, 55, 66770, 55, 71878, 55, 2819, 56, 2538, 56, 2666, 56, 125131, 56, 120790, 56, 120800, 56, 120810, 56, 120820, 56, 120830, 56, 130040, 56, 547, 56, 546, 56, 66330, 56, 2663, 57, 2920, 57, 2541, 57, 3437, 57, 120791, 57, 120801, 57, 120811, 57, 120821, 57, 120831, 57, 130041, 57, 42862, 57, 11466, 57, 71884, 57, 71852, 57, 71894, 57, 9082, 97, 65345, 97, 119834, 97, 119886, 97, 119938, 97, 119990, 97, 120042, 97, 120094, 97, 120146, 97, 120198, 97, 120250, 97, 120302, 97, 120354, 97, 120406, 97, 120458, 97, 593, 97, 945, 97, 120514, 97, 120572, 97, 120630, 97, 120688, 97, 120746, 97, 65313, 65, 119808, 65, 119860, 65, 119912, 65, 119964, 65, 120016, 65, 120068, 65, 120120, 65, 120172, 65, 120224, 65, 120276, 65, 120328, 65, 120380, 65, 120432, 65, 913, 65, 120488, 65, 120546, 65, 120604, 65, 120662, 65, 120720, 65, 5034, 65, 5573, 65, 42222, 65, 94016, 65, 66208, 65, 119835, 98, 119887, 98, 119939, 98, 119991, 98, 120043, 98, 120095, 98, 120147, 98, 120199, 98, 120251, 98, 120303, 98, 120355, 98, 120407, 98, 120459, 98, 388, 98, 5071, 98, 5234, 98, 5551, 98, 65314, 66, 8492, 66, 119809, 66, 119861, 66, 119913, 66, 120017, 66, 120069, 66, 120121, 66, 120173, 66, 120225, 66, 120277, 66, 120329, 66, 120381, 66, 120433, 66, 42932, 66, 914, 66, 120489, 66, 120547, 66, 120605, 66, 120663, 66, 120721, 66, 5108, 66, 5623, 66, 42192, 66, 66178, 66, 66209, 66, 66305, 66, 65347, 99, 8573, 99, 119836, 99, 119888, 99, 119940, 99, 119992, 99, 120044, 99, 120096, 99, 120148, 99, 120200, 99, 120252, 99, 120304, 99, 120356, 99, 120408, 99, 120460, 99, 7428, 99, 1010, 99, 11429, 99, 43951, 99, 66621, 99, 128844, 67, 71922, 67, 71913, 67, 65315, 67, 8557, 67, 8450, 67, 8493, 67, 119810, 67, 119862, 67, 119914, 67, 119966, 67, 120018, 67, 120174, 67, 120226, 67, 120278, 67, 120330, 67, 120382, 67, 120434, 67, 1017, 67, 11428, 67, 5087, 67, 42202, 67, 66210, 67, 66306, 67, 66581, 67, 66844, 67, 8574, 100, 8518, 100, 119837, 100, 119889, 100, 119941, 100, 119993, 100, 120045, 100, 120097, 100, 120149, 100, 120201, 100, 120253, 100, 120305, 100, 120357, 100, 120409, 100, 120461, 100, 1281, 100, 5095, 100, 5231, 100, 42194, 100, 8558, 68, 8517, 68, 119811, 68, 119863, 68, 119915, 68, 119967, 68, 120019, 68, 120071, 68, 120123, 68, 120175, 68, 120227, 68, 120279, 68, 120331, 68, 120383, 68, 120435, 68, 5024, 68, 5598, 68, 5610, 68, 42195, 68, 8494, 101, 65349, 101, 8495, 101, 8519, 101, 119838, 101, 119890, 101, 119942, 101, 120046, 101, 120098, 101, 120150, 101, 120202, 101, 120254, 101, 120306, 101, 120358, 101, 120410, 101, 120462, 101, 43826, 101, 1213, 101, 8959, 69, 65317, 69, 8496, 69, 119812, 69, 119864, 69, 119916, 69, 120020, 69, 120072, 69, 120124, 69, 120176, 69, 120228, 69, 120280, 69, 120332, 69, 120384, 69, 120436, 69, 917, 69, 120492, 69, 120550, 69, 120608, 69, 120666, 69, 120724, 69, 11577, 69, 5036, 69, 42224, 69, 71846, 69, 71854, 69, 66182, 69, 119839, 102, 119891, 102, 119943, 102, 119995, 102, 120047, 102, 120099, 102, 120151, 102, 120203, 102, 120255, 102, 120307, 102, 120359, 102, 120411, 102, 120463, 102, 43829, 102, 42905, 102, 383, 102, 7837, 102, 1412, 102, 119315, 70, 8497, 70, 119813, 70, 119865, 70, 119917, 70, 120021, 70, 120073, 70, 120125, 70, 120177, 70, 120229, 70, 120281, 70, 120333, 70, 120385, 70, 120437, 70, 42904, 70, 988, 70, 120778, 70, 5556, 70, 42205, 70, 71874, 70, 71842, 70, 66183, 70, 66213, 70, 66853, 70, 65351, 103, 8458, 103, 119840, 103, 119892, 103, 119944, 103, 120048, 103, 120100, 103, 120152, 103, 120204, 103, 120256, 103, 120308, 103, 120360, 103, 120412, 103, 120464, 103, 609, 103, 7555, 103, 397, 103, 1409, 103, 119814, 71, 119866, 71, 119918, 71, 119970, 71, 120022, 71, 120074, 71, 120126, 71, 120178, 71, 120230, 71, 120282, 71, 120334, 71, 120386, 71, 120438, 71, 1292, 71, 5056, 71, 5107, 71, 42198, 71, 65352, 104, 8462, 104, 119841, 104, 119945, 104, 119997, 104, 120049, 104, 120101, 104, 120153, 104, 120205, 104, 120257, 104, 120309, 104, 120361, 104, 120413, 104, 120465, 104, 1211, 104, 1392, 104, 5058, 104, 65320, 72, 8459, 72, 8460, 72, 8461, 72, 119815, 72, 119867, 72, 119919, 72, 120023, 72, 120179, 72, 120231, 72, 120283, 72, 120335, 72, 120387, 72, 120439, 72, 919, 72, 120494, 72, 120552, 72, 120610, 72, 120668, 72, 120726, 72, 11406, 72, 5051, 72, 5500, 72, 42215, 72, 66255, 72, 731, 105, 9075, 105, 65353, 105, 8560, 105, 8505, 105, 8520, 105, 119842, 105, 119894, 105, 119946, 105, 119998, 105, 120050, 105, 120102, 105, 120154, 105, 120206, 105, 120258, 105, 120310, 105, 120362, 105, 120414, 105, 120466, 105, 120484, 105, 618, 105, 617, 105, 953, 105, 8126, 105, 890, 105, 120522, 105, 120580, 105, 120638, 105, 120696, 105, 120754, 105, 1110, 105, 42567, 105, 1231, 105, 43893, 105, 5029, 105, 71875, 105, 65354, 106, 8521, 106, 119843, 106, 119895, 106, 119947, 106, 119999, 106, 120051, 106, 120103, 106, 120155, 106, 120207, 106, 120259, 106, 120311, 106, 120363, 106, 120415, 106, 120467, 106, 1011, 106, 1112, 106, 65322, 74, 119817, 74, 119869, 74, 119921, 74, 119973, 74, 120025, 74, 120077, 74, 120129, 74, 120181, 74, 120233, 74, 120285, 74, 120337, 74, 120389, 74, 120441, 74, 42930, 74, 895, 74, 1032, 74, 5035, 74, 5261, 74, 42201, 74, 119844, 107, 119896, 107, 119948, 107, 120000, 107, 120052, 107, 120104, 107, 120156, 107, 120208, 107, 120260, 107, 120312, 107, 120364, 107, 120416, 107, 120468, 107, 8490, 75, 65323, 75, 119818, 75, 119870, 75, 119922, 75, 119974, 75, 120026, 75, 120078, 75, 120130, 75, 120182, 75, 120234, 75, 120286, 75, 120338, 75, 120390, 75, 120442, 75, 922, 75, 120497, 75, 120555, 75, 120613, 75, 120671, 75, 120729, 75, 11412, 75, 5094, 75, 5845, 75, 42199, 75, 66840, 75, 1472, 108, 8739, 73, 9213, 73, 65512, 73, 1633, 108, 1777, 73, 66336, 108, 125127, 108, 120783, 73, 120793, 73, 120803, 73, 120813, 73, 120823, 73, 130033, 73, 65321, 73, 8544, 73, 8464, 73, 8465, 73, 119816, 73, 119868, 73, 119920, 73, 120024, 73, 120128, 73, 120180, 73, 120232, 73, 120284, 73, 120336, 73, 120388, 73, 120440, 73, 65356, 108, 8572, 73, 8467, 108, 119845, 108, 119897, 108, 119949, 108, 120001, 108, 120053, 108, 120105, 73, 120157, 73, 120209, 73, 120261, 73, 120313, 73, 120365, 73, 120417, 73, 120469, 73, 448, 73, 120496, 73, 120554, 73, 120612, 73, 120670, 73, 120728, 73, 11410, 73, 1030, 73, 1216, 73, 1493, 108, 1503, 108, 1575, 108, 126464, 108, 126592, 108, 65166, 108, 65165, 108, 1994, 108, 11599, 73, 5825, 73, 42226, 73, 93992, 73, 66186, 124, 66313, 124, 119338, 76, 8556, 76, 8466, 76, 119819, 76, 119871, 76, 119923, 76, 120027, 76, 120079, 76, 120131, 76, 120183, 76, 120235, 76, 120287, 76, 120339, 76, 120391, 76, 120443, 76, 11472, 76, 5086, 76, 5290, 76, 42209, 76, 93974, 76, 71843, 76, 71858, 76, 66587, 76, 66854, 76, 65325, 77, 8559, 77, 8499, 77, 119820, 77, 119872, 77, 119924, 77, 120028, 77, 120080, 77, 120132, 77, 120184, 77, 120236, 77, 120288, 77, 120340, 77, 120392, 77, 120444, 77, 924, 77, 120499, 77, 120557, 77, 120615, 77, 120673, 77, 120731, 77, 1018, 77, 11416, 77, 5047, 77, 5616, 77, 5846, 77, 42207, 77, 66224, 77, 66321, 77, 119847, 110, 119899, 110, 119951, 110, 120003, 110, 120055, 110, 120107, 110, 120159, 110, 120211, 110, 120263, 110, 120315, 110, 120367, 110, 120419, 110, 120471, 110, 1400, 110, 1404, 110, 65326, 78, 8469, 78, 119821, 78, 119873, 78, 119925, 78, 119977, 78, 120029, 78, 120081, 78, 120185, 78, 120237, 78, 120289, 78, 120341, 78, 120393, 78, 120445, 78, 925, 78, 120500, 78, 120558, 78, 120616, 78, 120674, 78, 120732, 78, 11418, 78, 42208, 78, 66835, 78, 3074, 111, 3202, 111, 3330, 111, 3458, 111, 2406, 111, 2662, 111, 2790, 111, 3046, 111, 3174, 111, 3302, 111, 3430, 111, 3664, 111, 3792, 111, 4160, 111, 1637, 111, 1781, 111, 65359, 111, 8500, 111, 119848, 111, 119900, 111, 119952, 111, 120056, 111, 120108, 111, 120160, 111, 120212, 111, 120264, 111, 120316, 111, 120368, 111, 120420, 111, 120472, 111, 7439, 111, 7441, 111, 43837, 111, 959, 111, 120528, 111, 120586, 111, 120644, 111, 120702, 111, 120760, 111, 963, 111, 120532, 111, 120590, 111, 120648, 111, 120706, 111, 120764, 111, 11423, 111, 4351, 111, 1413, 111, 1505, 111, 1607, 111, 126500, 111, 126564, 111, 126596, 111, 65259, 111, 65260, 111, 65258, 111, 65257, 111, 1726, 111, 64428, 111, 64429, 111, 64427, 111, 64426, 111, 1729, 111, 64424, 111, 64425, 111, 64423, 111, 64422, 111, 1749, 111, 3360, 111, 4125, 111, 66794, 111, 71880, 111, 71895, 111, 66604, 111, 1984, 79, 2534, 79, 2918, 79, 12295, 79, 70864, 79, 71904, 79, 120782, 79, 120792, 79, 120802, 79, 120812, 79, 120822, 79, 130032, 79, 65327, 79, 119822, 79, 119874, 79, 119926, 79, 119978, 79, 120030, 79, 120082, 79, 120134, 79, 120186, 79, 120238, 79, 120290, 79, 120342, 79, 120394, 79, 120446, 79, 927, 79, 120502, 79, 120560, 79, 120618, 79, 120676, 79, 120734, 79, 11422, 79, 1365, 79, 11604, 79, 4816, 79, 2848, 79, 66754, 79, 42227, 79, 71861, 79, 66194, 79, 66219, 79, 66564, 79, 66838, 79, 9076, 112, 65360, 112, 119849, 112, 119901, 112, 119953, 112, 120005, 112, 120057, 112, 120109, 112, 120161, 112, 120213, 112, 120265, 112, 120317, 112, 120369, 112, 120421, 112, 120473, 112, 961, 112, 120530, 112, 120544, 112, 120588, 112, 120602, 112, 120646, 112, 120660, 112, 120704, 112, 120718, 112, 120762, 112, 120776, 112, 11427, 112, 65328, 80, 8473, 80, 119823, 80, 119875, 80, 119927, 80, 119979, 80, 120031, 80, 120083, 80, 120187, 80, 120239, 80, 120291, 80, 120343, 80, 120395, 80, 120447, 80, 929, 80, 120504, 80, 120562, 80, 120620, 80, 120678, 80, 120736, 80, 11426, 80, 5090, 80, 5229, 80, 42193, 80, 66197, 80, 119850, 113, 119902, 113, 119954, 113, 120006, 113, 120058, 113, 120110, 113, 120162, 113, 120214, 113, 120266, 113, 120318, 113, 120370, 113, 120422, 113, 120474, 113, 1307, 113, 1379, 113, 1382, 113, 8474, 81, 119824, 81, 119876, 81, 119928, 81, 119980, 81, 120032, 81, 120084, 81, 120188, 81, 120240, 81, 120292, 81, 120344, 81, 120396, 81, 120448, 81, 11605, 81, 119851, 114, 119903, 114, 119955, 114, 120007, 114, 120059, 114, 120111, 114, 120163, 114, 120215, 114, 120267, 114, 120319, 114, 120371, 114, 120423, 114, 120475, 114, 43847, 114, 43848, 114, 7462, 114, 11397, 114, 43905, 114, 119318, 82, 8475, 82, 8476, 82, 8477, 82, 119825, 82, 119877, 82, 119929, 82, 120033, 82, 120189, 82, 120241, 82, 120293, 82, 120345, 82, 120397, 82, 120449, 82, 422, 82, 5025, 82, 5074, 82, 66740, 82, 5511, 82, 42211, 82, 94005, 82, 65363, 115, 119852, 115, 119904, 115, 119956, 115, 120008, 115, 120060, 115, 120112, 115, 120164, 115, 120216, 115, 120268, 115, 120320, 115, 120372, 115, 120424, 115, 120476, 115, 42801, 115, 445, 115, 1109, 115, 43946, 115, 71873, 115, 66632, 115, 65331, 83, 119826, 83, 119878, 83, 119930, 83, 119982, 83, 120034, 83, 120086, 83, 120138, 83, 120190, 83, 120242, 83, 120294, 83, 120346, 83, 120398, 83, 120450, 83, 1029, 83, 1359, 83, 5077, 83, 5082, 83, 42210, 83, 94010, 83, 66198, 83, 66592, 83, 119853, 116, 119905, 116, 119957, 116, 120009, 116, 120061, 116, 120113, 116, 120165, 116, 120217, 116, 120269, 116, 120321, 116, 120373, 116, 120425, 116, 120477, 116, 8868, 84, 10201, 84, 128872, 84, 65332, 84, 119827, 84, 119879, 84, 119931, 84, 119983, 84, 120035, 84, 120087, 84, 120139, 84, 120191, 84, 120243, 84, 120295, 84, 120347, 84, 120399, 84, 120451, 84, 932, 84, 120507, 84, 120565, 84, 120623, 84, 120681, 84, 120739, 84, 11430, 84, 5026, 84, 42196, 84, 93962, 84, 71868, 84, 66199, 84, 66225, 84, 66325, 84, 119854, 117, 119906, 117, 119958, 117, 120010, 117, 120062, 117, 120114, 117, 120166, 117, 120218, 117, 120270, 117, 120322, 117, 120374, 117, 120426, 117, 120478, 117, 42911, 117, 7452, 117, 43854, 117, 43858, 117, 651, 117, 965, 117, 120534, 117, 120592, 117, 120650, 117, 120708, 117, 120766, 117, 1405, 117, 66806, 117, 71896, 117, 8746, 85, 8899, 85, 119828, 85, 119880, 85, 119932, 85, 119984, 85, 120036, 85, 120088, 85, 120140, 85, 120192, 85, 120244, 85, 120296, 85, 120348, 85, 120400, 85, 120452, 85, 1357, 85, 4608, 85, 66766, 85, 5196, 85, 42228, 85, 94018, 85, 71864, 85, 8744, 118, 8897, 118, 65366, 118, 8564, 118, 119855, 118, 119907, 118, 119959, 118, 120011, 118, 120063, 118, 120115, 118, 120167, 118, 120219, 118, 120271, 118, 120323, 118, 120375, 118, 120427, 118, 120479, 118, 7456, 118, 957, 118, 120526, 118, 120584, 118, 120642, 118, 120700, 118, 120758, 118, 1141, 118, 1496, 118, 71430, 118, 43945, 118, 71872, 118, 119309, 86, 1639, 86, 1783, 86, 8548, 86, 119829, 86, 119881, 86, 119933, 86, 119985, 86, 120037, 86, 120089, 86, 120141, 86, 120193, 86, 120245, 86, 120297, 86, 120349, 86, 120401, 86, 120453, 86, 1140, 86, 11576, 86, 5081, 86, 5167, 86, 42719, 86, 42214, 86, 93960, 86, 71840, 86, 66845, 86, 623, 119, 119856, 119, 119908, 119, 119960, 119, 120012, 119, 120064, 119, 120116, 119, 120168, 119, 120220, 119, 120272, 119, 120324, 119, 120376, 119, 120428, 119, 120480, 119, 7457, 119, 1121, 119, 1309, 119, 1377, 119, 71434, 119, 71438, 119, 71439, 119, 43907, 119, 71919, 87, 71910, 87, 119830, 87, 119882, 87, 119934, 87, 119986, 87, 120038, 87, 120090, 87, 120142, 87, 120194, 87, 120246, 87, 120298, 87, 120350, 87, 120402, 87, 120454, 87, 1308, 87, 5043, 87, 5076, 87, 42218, 87, 5742, 120, 10539, 120, 10540, 120, 10799, 120, 65368, 120, 8569, 120, 119857, 120, 119909, 120, 119961, 120, 120013, 120, 120065, 120, 120117, 120, 120169, 120, 120221, 120, 120273, 120, 120325, 120, 120377, 120, 120429, 120, 120481, 120, 5441, 120, 5501, 120, 5741, 88, 9587, 88, 66338, 88, 71916, 88, 65336, 88, 8553, 88, 119831, 88, 119883, 88, 119935, 88, 119987, 88, 120039, 88, 120091, 88, 120143, 88, 120195, 88, 120247, 88, 120299, 88, 120351, 88, 120403, 88, 120455, 88, 42931, 88, 935, 88, 120510, 88, 120568, 88, 120626, 88, 120684, 88, 120742, 88, 11436, 88, 11613, 88, 5815, 88, 42219, 88, 66192, 88, 66228, 88, 66327, 88, 66855, 88, 611, 121, 7564, 121, 65369, 121, 119858, 121, 119910, 121, 119962, 121, 120014, 121, 120066, 121, 120118, 121, 120170, 121, 120222, 121, 120274, 121, 120326, 121, 120378, 121, 120430, 121, 120482, 121, 655, 121, 7935, 121, 43866, 121, 947, 121, 8509, 121, 120516, 121, 120574, 121, 120632, 121, 120690, 121, 120748, 121, 1199, 121, 4327, 121, 71900, 121, 65337, 89, 119832, 89, 119884, 89, 119936, 89, 119988, 89, 120040, 89, 120092, 89, 120144, 89, 120196, 89, 120248, 89, 120300, 89, 120352, 89, 120404, 89, 120456, 89, 933, 89, 978, 89, 120508, 89, 120566, 89, 120624, 89, 120682, 89, 120740, 89, 11432, 89, 1198, 89, 5033, 89, 5053, 89, 42220, 89, 94019, 89, 71844, 89, 66226, 89, 119859, 122, 119911, 122, 119963, 122, 120015, 122, 120067, 122, 120119, 122, 120171, 122, 120223, 122, 120275, 122, 120327, 122, 120379, 122, 120431, 122, 120483, 122, 7458, 122, 43923, 122, 71876, 122, 66293, 90, 71909, 90, 65338, 90, 8484, 90, 8488, 90, 119833, 90, 119885, 90, 119937, 90, 119989, 90, 120041, 90, 120197, 90, 120249, 90, 120301, 90, 120353, 90, 120405, 90, 120457, 90, 918, 90, 120493, 90, 120551, 90, 120609, 90, 120667, 90, 120725, 90, 5059, 90, 42204, 90, 71849, 90, 65282, 34, 65284, 36, 65285, 37, 65286, 38, 65290, 42, 65291, 43, 65294, 46, 65295, 47, 65296, 48, 65297, 49, 65298, 50, 65299, 51, 65300, 52, 65301, 53, 65302, 54, 65303, 55, 65304, 56, 65305, 57, 65308, 60, 65309, 61, 65310, 62, 65312, 64, 65316, 68, 65318, 70, 65319, 71, 65324, 76, 65329, 81, 65330, 82, 65333, 85, 65334, 86, 65335, 87, 65343, 95, 65346, 98, 65348, 100, 65350, 102, 65355, 107, 65357, 109, 65358, 110, 65361, 113, 65362, 114, 65364, 116, 65365, 117, 65367, 119, 65370, 122, 65371, 123, 65373, 125, 119846, 109], + _default: [160, 32, 8211, 45, 65374, 126, 65306, 58, 65281, 33, 8216, 96, 8217, 96, 8245, 96, 180, 96, 12494, 47, 1047, 51, 1073, 54, 1072, 97, 1040, 65, 1068, 98, 1042, 66, 1089, 99, 1057, 67, 1077, 101, 1045, 69, 1053, 72, 305, 105, 1050, 75, 921, 73, 1052, 77, 1086, 111, 1054, 79, 1009, 112, 1088, 112, 1056, 80, 1075, 114, 1058, 84, 215, 120, 1093, 120, 1061, 88, 1091, 121, 1059, 89, 65283, 35, 65288, 40, 65289, 41, 65292, 44, 65307, 59, 65311, 63], + cs: [65374, 126, 65306, 58, 65281, 33, 8216, 96, 8217, 96, 8245, 96, 180, 96, 12494, 47, 1047, 51, 1073, 54, 1072, 97, 1040, 65, 1068, 98, 1042, 66, 1089, 99, 1057, 67, 1077, 101, 1045, 69, 1053, 72, 305, 105, 1050, 75, 921, 73, 1052, 77, 1086, 111, 1054, 79, 1009, 112, 1088, 112, 1056, 80, 1075, 114, 1058, 84, 1093, 120, 1061, 88, 1091, 121, 1059, 89, 65283, 35, 65288, 40, 65289, 41, 65292, 44, 65307, 59, 65311, 63], + de: [65374, 126, 65306, 58, 65281, 33, 8216, 96, 8217, 96, 8245, 96, 180, 96, 12494, 47, 1047, 51, 1073, 54, 1072, 97, 1040, 65, 1068, 98, 1042, 66, 1089, 99, 1057, 67, 1077, 101, 1045, 69, 1053, 72, 305, 105, 1050, 75, 921, 73, 1052, 77, 1086, 111, 1054, 79, 1009, 112, 1088, 112, 1056, 80, 1075, 114, 1058, 84, 1093, 120, 1061, 88, 1091, 121, 1059, 89, 65283, 35, 65288, 40, 65289, 41, 65292, 44, 65307, 59, 65311, 63], + es: [8211, 45, 65374, 126, 65306, 58, 65281, 33, 8245, 96, 180, 96, 12494, 47, 1047, 51, 1073, 54, 1072, 97, 1040, 65, 1068, 98, 1042, 66, 1089, 99, 1057, 67, 1077, 101, 1045, 69, 1053, 72, 305, 105, 1050, 75, 1052, 77, 1086, 111, 1054, 79, 1009, 112, 1088, 112, 1056, 80, 1075, 114, 1058, 84, 215, 120, 1093, 120, 1061, 88, 1091, 121, 1059, 89, 65283, 35, 65288, 40, 65289, 41, 65292, 44, 65307, 59, 65311, 63], + fr: [65374, 126, 65306, 58, 65281, 33, 8216, 96, 8245, 96, 12494, 47, 1047, 51, 1073, 54, 1072, 97, 1040, 65, 1068, 98, 1042, 66, 1089, 99, 1057, 67, 1077, 101, 1045, 69, 1053, 72, 305, 105, 1050, 75, 921, 73, 1052, 77, 1086, 111, 1054, 79, 1009, 112, 1088, 112, 1056, 80, 1075, 114, 1058, 84, 215, 120, 1093, 120, 1061, 88, 1091, 121, 1059, 89, 65283, 35, 65288, 40, 65289, 41, 65292, 44, 65307, 59, 65311, 63], + it: [160, 32, 8211, 45, 65374, 126, 65306, 58, 65281, 33, 8216, 96, 8245, 96, 180, 96, 12494, 47, 1047, 51, 1073, 54, 1072, 97, 1040, 65, 1068, 98, 1042, 66, 1089, 99, 1057, 67, 1077, 101, 1045, 69, 1053, 72, 305, 105, 1050, 75, 921, 73, 1052, 77, 1086, 111, 1054, 79, 1009, 112, 1088, 112, 1056, 80, 1075, 114, 1058, 84, 215, 120, 1093, 120, 1061, 88, 1091, 121, 1059, 89, 65283, 35, 65288, 40, 65289, 41, 65292, 44, 65307, 59, 65311, 63], + ja: [8211, 45, 65306, 58, 65281, 33, 8216, 96, 8217, 96, 8245, 96, 180, 96, 1047, 51, 1073, 54, 1072, 97, 1040, 65, 1068, 98, 1042, 66, 1089, 99, 1057, 67, 1077, 101, 1045, 69, 1053, 72, 305, 105, 1050, 75, 921, 73, 1052, 77, 1086, 111, 1054, 79, 1009, 112, 1088, 112, 1056, 80, 1075, 114, 1058, 84, 215, 120, 1093, 120, 1061, 88, 1091, 121, 1059, 89, 65283, 35, 65292, 44, 65307, 59], + ko: [8211, 45, 65374, 126, 65306, 58, 65281, 33, 8245, 96, 180, 96, 12494, 47, 1047, 51, 1073, 54, 1072, 97, 1040, 65, 1068, 98, 1042, 66, 1089, 99, 1057, 67, 1077, 101, 1045, 69, 1053, 72, 305, 105, 1050, 75, 921, 73, 1052, 77, 1086, 111, 1054, 79, 1009, 112, 1088, 112, 1056, 80, 1075, 114, 1058, 84, 215, 120, 1093, 120, 1061, 88, 1091, 121, 1059, 89, 65283, 35, 65288, 40, 65289, 41, 65292, 44, 65307, 59, 65311, 63], + pl: [65374, 126, 65306, 58, 65281, 33, 8216, 96, 8217, 96, 8245, 96, 180, 96, 12494, 47, 1047, 51, 1073, 54, 1072, 97, 1040, 65, 1068, 98, 1042, 66, 1089, 99, 1057, 67, 1077, 101, 1045, 69, 1053, 72, 305, 105, 1050, 75, 921, 73, 1052, 77, 1086, 111, 1054, 79, 1009, 112, 1088, 112, 1056, 80, 1075, 114, 1058, 84, 215, 120, 1093, 120, 1061, 88, 1091, 121, 1059, 89, 65283, 35, 65288, 40, 65289, 41, 65292, 44, 65307, 59, 65311, 63], + "pt-BR": [65374, 126, 65306, 58, 65281, 33, 8216, 96, 8217, 96, 8245, 96, 180, 96, 12494, 47, 1047, 51, 1073, 54, 1072, 97, 1040, 65, 1068, 98, 1042, 66, 1089, 99, 1057, 67, 1077, 101, 1045, 69, 1053, 72, 305, 105, 1050, 75, 921, 73, 1052, 77, 1086, 111, 1054, 79, 1009, 112, 1088, 112, 1056, 80, 1075, 114, 1058, 84, 215, 120, 1093, 120, 1061, 88, 1091, 121, 1059, 89, 65283, 35, 65288, 40, 65289, 41, 65292, 44, 65307, 59, 65311, 63], + "qps-ploc": [160, 32, 8211, 45, 65374, 126, 65306, 58, 65281, 33, 8216, 96, 8217, 96, 8245, 96, 180, 96, 12494, 47, 1047, 51, 1073, 54, 1072, 97, 1040, 65, 1068, 98, 1042, 66, 1089, 99, 1057, 67, 1077, 101, 1045, 69, 1053, 72, 305, 105, 1050, 75, 921, 73, 1052, 77, 1086, 111, 1054, 79, 1088, 112, 1056, 80, 1075, 114, 1058, 84, 215, 120, 1093, 120, 1061, 88, 1091, 121, 1059, 89, 65283, 35, 65288, 40, 65289, 41, 65292, 44, 65307, 59, 65311, 63], + ru: [65374, 126, 65306, 58, 65281, 33, 8216, 96, 8217, 96, 8245, 96, 180, 96, 12494, 47, 305, 105, 921, 73, 1009, 112, 215, 120, 65283, 35, 65288, 40, 65289, 41, 65292, 44, 65307, 59, 65311, 63], + tr: [160, 32, 8211, 45, 65374, 126, 65306, 58, 65281, 33, 8245, 96, 180, 96, 12494, 47, 1047, 51, 1073, 54, 1072, 97, 1040, 65, 1068, 98, 1042, 66, 1089, 99, 1057, 67, 1077, 101, 1045, 69, 1053, 72, 1050, 75, 921, 73, 1052, 77, 1086, 111, 1054, 79, 1009, 112, 1088, 112, 1056, 80, 1075, 114, 1058, 84, 215, 120, 1093, 120, 1061, 88, 1091, 121, 1059, 89, 65283, 35, 65288, 40, 65289, 41, 65292, 44, 65307, 59, 65311, 63], + "zh-hans": [65374, 126, 65306, 58, 65281, 33, 8245, 96, 180, 96, 12494, 47, 1047, 51, 1073, 54, 1072, 97, 1040, 65, 1068, 98, 1042, 66, 1089, 99, 1057, 67, 1077, 101, 1045, 69, 1053, 72, 305, 105, 1050, 75, 921, 73, 1052, 77, 1086, 111, 1054, 79, 1009, 112, 1088, 112, 1056, 80, 1075, 114, 1058, 84, 215, 120, 1093, 120, 1061, 88, 1091, 121, 1059, 89, 65288, 40, 65289, 41], + "zh-hant": [8211, 45, 65374, 126, 180, 96, 12494, 47, 1047, 51, 1073, 54, 1072, 97, 1040, 65, 1068, 98, 1042, 66, 1089, 99, 1057, 67, 1077, 101, 1045, 69, 1053, 72, 305, 105, 1050, 75, 921, 73, 1052, 77, 1086, 111, 1054, 79, 1009, 112, 1088, 112, 1056, 80, 1075, 114, 1058, 84, 215, 120, 1093, 120, 1061, 88, 1091, 121, 1059, 89, 65283, 35, 65307, 59] + })); + } + static { + this.d = new fv({ + getCacheKey: JSON.stringify + }, e => { + function i(u) { + const d = new Map(); + for (let f = 0; f < u.length; f += 2) { + d.set(u[f], u[f + 1]); + } + return d; + } + function s(u, d) { + const f = new Map(u); + for (const [p, w] of d) { + f.set(p, w); + } + return f; + } + function r(u, d) { + if (!u) { + return d; + } + const f = new Map(); + for (const [p, w] of u) { + if (d.has(p)) { + f.set(p, w); + } + } + return f; + } + const n = this.c.value; + let o = e.filter(u => !u.startsWith("_") && u in n); + if (o.length === 0) { + o = ["_default"]; + } + let a; + for (const u of o) { + const d = i(n[u]); + a = r(a, d); + } + const c = i(n._common); + const l = s(c, a); + return new El(l); + }); + } + static getInstance(e) { + return El.d.get(Array.from(e)); + } + static { + this.e = new vr(() => Object.keys(El.c.value).filter(e => !e.startsWith("_"))); + } + static getLocales() { + return El.e.value; + } + constructor(e) { + this.f = e; + } + isAmbiguous(e) { + return this.f.has(e); + } + containsAmbiguousCharacter(e) { + for (let i = 0; i < e.length; i++) { + const s = e.codePointAt(i); + if (typeof s == "number" && this.isAmbiguous(s)) { + return true; + } + } + return false; + } + getPrimaryConfusable(e) { + return this.f.get(e); + } + getConfusableCodePoints() { + return new Set(this.f.keys()); + } + }; + UE = class kl { + static c() { + return [9, 10, 11, 12, 13, 32, 127, 160, 173, 847, 1564, 4447, 4448, 6068, 6069, 6155, 6156, 6157, 6158, 7355, 7356, 8192, 8193, 8194, 8195, 8196, 8197, 8198, 8199, 8200, 8201, 8202, 8203, 8204, 8205, 8206, 8207, 8234, 8235, 8236, 8237, 8238, 8239, 8287, 8288, 8289, 8290, 8291, 8292, 8293, 8294, 8295, 8296, 8297, 8298, 8299, 8300, 8301, 8302, 8303, 10240, 12288, 12644, 65024, 65025, 65026, 65027, 65028, 65029, 65030, 65031, 65032, 65033, 65034, 65035, 65036, 65037, 65038, 65039, 65279, 65440, 65520, 65521, 65522, 65523, 65524, 65525, 65526, 65527, 65528, 65532, 78844, 119155, 119156, 119157, 119158, 119159, 119160, 119161, 119162, 917504, 917505, 917506, 917507, 917508, 917509, 917510, 917511, 917512, 917513, 917514, 917515, 917516, 917517, 917518, 917519, 917520, 917521, 917522, 917523, 917524, 917525, 917526, 917527, 917528, 917529, 917530, 917531, 917532, 917533, 917534, 917535, 917536, 917537, 917538, 917539, 917540, 917541, 917542, 917543, 917544, 917545, 917546, 917547, 917548, 917549, 917550, 917551, 917552, 917553, 917554, 917555, 917556, 917557, 917558, 917559, 917560, 917561, 917562, 917563, 917564, 917565, 917566, 917567, 917568, 917569, 917570, 917571, 917572, 917573, 917574, 917575, 917576, 917577, 917578, 917579, 917580, 917581, 917582, 917583, 917584, 917585, 917586, 917587, 917588, 917589, 917590, 917591, 917592, 917593, 917594, 917595, 917596, 917597, 917598, 917599, 917600, 917601, 917602, 917603, 917604, 917605, 917606, 917607, 917608, 917609, 917610, 917611, 917612, 917613, 917614, 917615, 917616, 917617, 917618, 917619, 917620, 917621, 917622, 917623, 917624, 917625, 917626, 917627, 917628, 917629, 917630, 917631, 917760, 917761, 917762, 917763, 917764, 917765, 917766, 917767, 917768, 917769, 917770, 917771, 917772, 917773, 917774, 917775, 917776, 917777, 917778, 917779, 917780, 917781, 917782, 917783, 917784, 917785, 917786, 917787, 917788, 917789, 917790, 917791, 917792, 917793, 917794, 917795, 917796, 917797, 917798, 917799, 917800, 917801, 917802, 917803, 917804, 917805, 917806, 917807, 917808, 917809, 917810, 917811, 917812, 917813, 917814, 917815, 917816, 917817, 917818, 917819, 917820, 917821, 917822, 917823, 917824, 917825, 917826, 917827, 917828, 917829, 917830, 917831, 917832, 917833, 917834, 917835, 917836, 917837, 917838, 917839, 917840, 917841, 917842, 917843, 917844, 917845, 917846, 917847, 917848, 917849, 917850, 917851, 917852, 917853, 917854, 917855, 917856, 917857, 917858, 917859, 917860, 917861, 917862, 917863, 917864, 917865, 917866, 917867, 917868, 917869, 917870, 917871, 917872, 917873, 917874, 917875, 917876, 917877, 917878, 917879, 917880, 917881, 917882, 917883, 917884, 917885, 917886, 917887, 917888, 917889, 917890, 917891, 917892, 917893, 917894, 917895, 917896, 917897, 917898, 917899, 917900, 917901, 917902, 917903, 917904, 917905, 917906, 917907, 917908, 917909, 917910, 917911, 917912, 917913, 917914, 917915, 917916, 917917, 917918, 917919, 917920, 917921, 917922, 917923, 917924, 917925, 917926, 917927, 917928, 917929, 917930, 917931, 917932, 917933, 917934, 917935, 917936, 917937, 917938, 917939, 917940, 917941, 917942, 917943, 917944, 917945, 917946, 917947, 917948, 917949, 917950, 917951, 917952, 917953, 917954, 917955, 917956, 917957, 917958, 917959, 917960, 917961, 917962, 917963, 917964, 917965, 917966, 917967, 917968, 917969, 917970, 917971, 917972, 917973, 917974, 917975, 917976, 917977, 917978, 917979, 917980, 917981, 917982, 917983, 917984, 917985, 917986, 917987, 917988, 917989, 917990, 917991, 917992, 917993, 917994, 917995, 917996, 917997, 917998, 917999]; + } + static { + this.d = undefined; + } + static e() { + this.d ||= new Set(kl.c()); + return this.d; + } + static isInvisibleCharacter(e) { + return kl.e().has(e); + } + static containsInvisibleCharacter(e) { + for (let i = 0; i < e.length; i++) { + const s = e.codePointAt(i); + if (typeof s == "number" && kl.isInvisibleCharacter(s)) { + return true; + } + } + return false; + } + static get codePoints() { + return kl.e(); + } + }; + } + }); + function yr(t) { + return t === 47 || t === 92; + } + function Xn(t) { + return t.replace(/[\\/]/g, ae.sep); + } + function BE(t) { + if (t.indexOf("/") === -1) { + t = Xn(t); + } + if (/^[a-zA-Z]:(\/|$)/.test(t)) { + t = "/" + t; + } + return t; + } + function Sv(t, e = ae.sep) { + if (!t) { + return ""; + } + const i = t.length; + const s = t.charCodeAt(0); + if (yr(s)) { + if (yr(t.charCodeAt(1)) && !yr(t.charCodeAt(2))) { + let n = 3; + const o = n; + for (; n < i && !yr(t.charCodeAt(n)); n++); + if (o !== n && !yr(t.charCodeAt(n + 1))) { + for (n += 1; n < i; n++) { + if (yr(t.charCodeAt(n))) { + return t.slice(0, n + 1).replace(/[\\/]/g, e); + } + } + } + } + return e; + } else if (Sp(s) && t.charCodeAt(1) === 58) { + if (yr(t.charCodeAt(2))) { + return t.slice(0, 2) + e; + } else { + return t.slice(0, 2); + } + } + let r = t.indexOf("://"); + if (r !== -1) { + for (r += 3; r < i; r++) { + if (yr(t.charCodeAt(r))) { + return t.slice(0, r + 1); + } + } + } + return ""; + } + function qE(t) { + if (!j || !t || t.length < 5) { + return false; + } + let e = t.charCodeAt(0); + if (e !== 92 || (e = t.charCodeAt(1), e !== 92)) { + return false; + } + let i = 2; + const s = i; + for (; i < t.length && (e = t.charCodeAt(i), e !== 92); i++); + return s !== i && !(e = t.charCodeAt(i + 1), isNaN(e) || e === 92); + } + function zE(t, e = j) { + const i = e ? Dv : Pv; + return !!t && t.length !== 0 && !/^\s+$/.test(t) && !(i.lastIndex = 0, i.test(t)) && (!e || !$v.test(t)) && t !== "." && t !== ".." && (!e || t[t.length - 1] !== ".") && (!e || t.length === t.trim().length) && !(t.length > 255); + } + function tu(t, e, i) { + const s = t === e; + if (!i || s) { + return s; + } else if (!t || !e) { + return false; + } else { + return br(t, e); + } + } + function Ba(t, e, i, s = Vt) { + if (t === e) { + return true; + } + if (!t || !e || e.length > t.length) { + return false; + } + if (i) { + if (!eu(t, e)) { + return false; + } + if (e.length === t.length) { + return true; + } + let n = e.length; + if (e.charAt(e.length - 1) === s) { + n--; + } + return t.charAt(n) === s; + } + if (e.charAt(e.length - 1) !== s) { + e += s; + } + return t.indexOf(e) === 0; + } + function Sp(t) { + return t >= 65 && t <= 90 || t >= 97 && t <= 122; + } + function Ev(t, e) { + if (j && t.endsWith(":")) { + t += Vt; + } + if (!Zr(t)) { + t = F(e, t); + } + t = pi(t); + return kv(t); + } + function kv(t) { + if (j) { + t = Qr(t, Vt); + if (t.endsWith(":")) { + t += Vt; + } + } else { + t = Qr(t, Vt); + t ||= Vt; + } + return t; + } + function HE(t) { + const e = pi(t); + if (j) { + if (t.length > 3) { + return false; + } else { + return xv(e) && (t.length === 2 || e.charCodeAt(2) === 92); + } + } else { + return e === ae.sep; + } + } + function xv(t, e = j) { + if (e) { + return Sp(t.charCodeAt(0)) && t.charCodeAt(1) === 58; + } else { + return false; + } + } + function iu(t) { + const e = t.split(":"); + let i; + let s; + let r; + for (const n of e) { + const o = Number(n); + if (Hl(o)) { + if (s === undefined) { + s = o; + } else if (r === undefined) { + r = o; + } + } else { + i = i ? [i, n].join(":") : n; + } + } + if (!i) { + throw new Error("Format for `--goto` should be: `FILE:LINE(:COLUMN)`"); + } + return { + path: i, + line: s !== undefined ? s : undefined, + column: r !== undefined ? r : s !== undefined ? 1 : undefined + }; + } + function qa(t, e, i = 8) { + let s = ""; + for (let n = 0; n < i; n++) { + let o; + if (n === 0 && j && !e && (i === 3 || i === 4)) { + o = Av; + } else { + o = Iv; + } + s += o.charAt(Math.floor(Math.random() * o.length)); + } + let r; + if (e) { + r = `${e}-${s}`; + } else { + r = s; + } + if (t) { + return F(t, r); + } else { + return r; + } + } + var Dv; + var Pv; + var $v; + var Iv; + var Av; + var gi = g({ + "out-build/vs/base/common/extpath.js"() { + "use strict"; + + we(); + H(); + Wt(); + _e(); + Dv = /[\\/:\*\?"<>\|]/g; + Pv = /[/]/g; + $v = /^(con|prn|aux|clock\$|nul|lpt[0-9]|com[0-9])(\.(.*?))?$/i; + Iv = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; + Av = "BDEFGHIJKMOQRSTUVWXYZbdefghijkmoqrstuvwxyz0123456789"; + } + }); + function VE(t, e) { + if (P.isUri(t)) { + return br(t.scheme, e); + } else { + return eu(t, e + ":"); + } + } + function GE(t, ...e) { + return e.some(i => VE(t, i)); + } + function JE(t, e) { + return ae.join(e ?? "/", `${t.quality ?? "oss"}-${t.commit ?? "dev"}`); + } + var R; + var Cv; + var _v; + var Ep; + var za; + var Rv; + var Ct; + var Ov; + var Lv; + var Ha; + var Ie = g({ + "out-build/vs/base/common/network.js"() { + "use strict"; + + $e(); + H(); + Wt(); + se(); + we(); + (function (t) { + t.inMemory = "inmemory"; + t.vscode = "vscode"; + t.internal = "private"; + t.walkThrough = "walkThrough"; + t.walkThroughSnippet = "walkThroughSnippet"; + t.http = "http"; + t.https = "https"; + t.file = "file"; + t.mailto = "mailto"; + t.untitled = "untitled"; + t.data = "data"; + t.command = "command"; + t.vscodeRemote = "vscode-remote"; + t.vscodeRemoteResource = "vscode-remote-resource"; + t.vscodeManagedRemoteResource = "vscode-managed-remote-resource"; + t.vscodeUserData = "vscode-userdata"; + t.vscodeCustomEditor = "vscode-custom-editor"; + t.vscodeNotebook = "vscode-notebook"; + t.vscodeNotebookCell = "vscode-notebook-cell"; + t.vscodeNotebookCellMetadata = "vscode-notebook-cell-metadata"; + t.vscodeNotebookCellMetadataDiff = "vscode-notebook-cell-metadata-diff"; + t.vscodeNotebookCellOutput = "vscode-notebook-cell-output"; + t.vscodeNotebookCellOutputDiff = "vscode-notebook-cell-output-diff"; + t.vscodeNotebookMetadata = "vscode-notebook-metadata"; + t.vscodeInteractiveInput = "vscode-interactive-input"; + t.vscodeSettings = "vscode-settings"; + t.vscodeWorkspaceTrust = "vscode-workspace-trust"; + t.vscodeTerminal = "vscode-terminal"; + t.vscodeChatCodeBlock = "vscode-chat-code-block"; + t.vscodeChatCodeCompareBlock = "vscode-chat-code-compare-block"; + t.vscodeChatSesssion = "vscode-chat-editor"; + t.webviewPanel = "webview-panel"; + t.vscodeWebview = "vscode-webview"; + t.extension = "extension"; + t.aiChat = "cursor.aichat"; + t.notepad = "cursor.notepad"; + t.contextObject = "cursor.context-object"; + t.composer = "cursor.composer"; + t.aiSettings = "cursor.aisettings"; + t.tinderDiffEditor = "cursor.tinderdiffeditor"; + t.vscodeFileResource = "vscode-file"; + t.tmp = "tmp"; + t.vsls = "vsls"; + t.vscodeSourceControl = "vscode-scm"; + t.commentsInput = "comment"; + t.codeSetting = "code-setting"; + t.cursorDev = "cursor-dev"; + t.outputChannel = "output"; + t.accessibleView = "accessible-view"; + t.backgroundComposer = "cursor.backgroundcomposer"; + t.personalEnvironmentJson = "cursor.personalenvironmentjson"; + t.bugbot = "cursor.bugbot"; + t.aiEditorBox = "aiEditorBox"; + })(R ||= {}); + Cv = "tkn"; + _v = class { + constructor() { + this.a = Object.create(null); + this.b = Object.create(null); + this.c = Object.create(null); + this.d = "http"; + this.e = null; + this.f = "/"; + } + setPreferredWebSchema(t) { + this.d = t; + } + setDelegate(t) { + this.e = t; + } + setServerRootPath(t, e) { + this.f = JE(t, e); + } + getServerRootPath() { + return this.f; + } + get g() { + return ae.join(this.f, R.vscodeRemoteResource); + } + set(t, e, i) { + this.a[t] = e; + this.b[t] = i; + } + setConnectionToken(t, e) { + this.c[t] = e; + } + getPreferredWebSchema() { + return this.d; + } + rewrite(t) { + if (this.e) { + try { + return this.e(t); + } catch (o) { + Ft(o); + return t; + } + } + const e = t.authority; + let i = this.a[e]; + if (i && i.indexOf(":") !== -1 && i.indexOf("[") === -1) { + i = `[${i}]`; + } + const s = this.b[e]; + const r = this.c[e]; + let n = `path=${encodeURIComponent(t.path)}`; + if (typeof r == "string") { + n += `&${Cv}=${encodeURIComponent(r)}`; + } + return P.from({ + scheme: fr ? this.d : R.vscodeRemoteResource, + authority: `${i}:${s}`, + path: this.g, + query: n + }); + } + }; + Ep = new _v(); + za = "vscode-app"; + Rv = class Ef { + static { + this.a = za; + } + asBrowserUri(e) { + const i = this.b(e); + return this.uriToBrowserUri(i); + } + uriToBrowserUri(e) { + if (e.scheme === R.vscodeRemote) { + return Ep.rewrite(e); + } else if (e.scheme === R.file && (Jf || ew === `${R.vscodeFileResource}://${Ef.a}`)) { + return e.with({ + scheme: R.vscodeFileResource, + authority: e.authority || Ef.a, + query: null, + fragment: null + }); + } else { + return e; + } + } + asFileUri(e) { + const i = this.b(e); + return this.uriToFileUri(i); + } + uriToFileUri(e) { + if (e.scheme === R.vscodeFileResource) { + return e.with({ + scheme: R.file, + authority: e.authority !== Ef.a ? e.authority : null, + query: null, + fragment: null + }); + } else { + return e; + } + } + b(e, i) { + if (P.isUri(e)) { + return e; + } + if (globalThis._VSCODE_FILE_ROOT) { + const s = globalThis._VSCODE_FILE_ROOT; + if (/^\w[\w\d+.-]*:\/\//.test(s)) { + return P.joinPath(P.parse(s, true), e); + } + const r = F(s, e); + return P.file(r); + } + return P.parse(i.toUrl(e)); + } + }; + Ct = new Rv(); + Ov = Object.freeze({ + "Cache-Control": "no-cache, no-store" + }); + Lv = Object.freeze({ + "Document-Policy": "include-js-call-stacks-in-crash-reports, js-profiling" + }); + (function (t) { + const e = new Map([["1", { + "Cross-Origin-Opener-Policy": "same-origin" + }], ["2", { + "Cross-Origin-Embedder-Policy": "require-corp" + }], ["3", { + "Cross-Origin-Opener-Policy": "same-origin", + "Cross-Origin-Embedder-Policy": "require-corp" + }]]); + t.CoopAndCoep = Object.freeze(e.get("3")); + const i = "vscode-coi"; + function s(n) { + let o; + if (typeof n == "string") { + o = new URL(n).searchParams; + } else if (n instanceof URL) { + o = n.searchParams; + } else if (P.isUri(n)) { + o = new URL(n.toString(true)).searchParams; + } + const a = o?.get(i); + if (a) { + return e.get(a); + } + } + t.getHeadersFromQuery = s; + function r(n, o, a) { + if (!globalThis.crossOriginIsolated) { + return; + } + const c = o && a ? "3" : a ? "2" : "1"; + if (n instanceof URLSearchParams) { + n.set(i, c); + } else { + n[i] = c; + } + } + t.addSearchParam = r; + })(Ha ||= {}); + } + }); + function Ci(t) { + return Yl(t, true); + } + var Va; + var ke; + var tt; + var kp; + var xp; + var Dp; + var KE; + var ZE; + var ks; + var Mv; + var Fv; + var he; + var Pp; + var YE; + var XE; + var Nv; + var mi; + var $p; + var Wv; + var QE; + var Tv; + var nt = g({ + "out-build/vs/base/common/resources.js"() { + "use strict"; + + gi(); + Ie(); + we(); + H(); + Wt(); + se(); + Va = class { + constructor(t) { + this.a = t; + } + compare(t, e, i = false) { + if (t === e) { + return 0; + } else { + return vp(this.getComparisonKey(t, i), this.getComparisonKey(e, i)); + } + } + isEqual(t, e, i = false) { + if (t === e) { + return true; + } else if (!t || !e) { + return false; + } else { + return this.getComparisonKey(t, i) === this.getComparisonKey(e, i); + } + } + getComparisonKey(t, e = false) { + return t.with({ + path: this.a(t) ? t.path.toLowerCase() : undefined, + fragment: e ? null : undefined + }).toString(); + } + ignorePathCasing(t) { + return this.a(t); + } + isEqualOrParent(t, e, i = false) { + if (t.scheme === e.scheme) { + if (t.scheme === R.file) { + return Ba(Ci(t), Ci(e), this.a(t)) && t.query === e.query && (i || t.fragment === e.fragment); + } + if (mi(t.authority, e.authority)) { + return Ba(t.path, e.path, this.a(t), "/") && t.query === e.query && (i || t.fragment === e.fragment); + } + } + return false; + } + joinPath(t, ...e) { + return P.joinPath(t, ...e); + } + basenameOrAuthority(t) { + return ks(t) || t.authority; + } + basename(t) { + return ae.basename(t.path); + } + extname(t) { + return ae.extname(t.path); + } + dirname(t) { + if (t.path.length === 0) { + return t; + } + let e; + if (t.scheme === R.file) { + e = P.file(Xe(Ci(t))).path; + } else { + e = ae.dirname(t.path); + if (t.authority && e.length && e.charCodeAt(0) !== 47) { + console.error(`dirname("${t.toString})) resulted in a relative path`); + e = "/"; + } + } + return t.with({ + path: e + }); + } + normalizePath(t) { + if (!t.path.length) { + return t; + } + let e; + if (t.scheme === R.file) { + e = P.file(pi(Ci(t))).path; + } else { + e = ae.normalize(t.path); + } + return t.with({ + path: e + }); + } + relativePath(t, e) { + if (t.scheme !== e.scheme || !mi(t.authority, e.authority)) { + return; + } + if (t.scheme === R.file) { + const r = Zw(Ci(t), Ci(e)); + if (j) { + return Xn(r); + } else { + return r; + } + } + let i = t.path || "/"; + const s = e.path || "/"; + if (this.a(t)) { + let r = 0; + for (const n = Math.min(i.length, s.length); r < n && (i.charCodeAt(r) === s.charCodeAt(r) || i.charAt(r).toLowerCase() === s.charAt(r).toLowerCase()); r++); + i = s.substr(0, r) + i.substr(r); + } + return ae.relative(i, s); + } + resolvePath(t, e) { + if (t.scheme === R.file) { + const i = P.file(Gi(Ci(t), e)); + return t.with({ + authority: i.authority, + path: i.path + }); + } + e = BE(e); + return t.with({ + path: ae.resolve(t.path, e) + }); + } + isAbsolutePath(t) { + return !!t.path && t.path[0] === "/"; + } + isEqualAuthority(t, e) { + return t === e || t !== undefined && e !== undefined && br(t, e); + } + hasTrailingPathSeparator(t, e = Vt) { + if (t.scheme === R.file) { + const i = Ci(t); + return i.length > Sv(i).length && i[i.length - 1] === e; + } else { + const i = t.path; + return i.length > 1 && i.charCodeAt(i.length - 1) === 47 && !/^[a-zA-Z]:(\/$|\\$)/.test(t.fsPath); + } + } + removeTrailingPathSeparator(t, e = Vt) { + if ($p(t, e)) { + return t.with({ + path: t.path.substr(0, t.path.length - 1) + }); + } else { + return t; + } + } + addTrailingPathSeparator(t, e = Vt) { + let i = false; + if (t.scheme === R.file) { + const s = Ci(t); + i = s !== undefined && s.length === Sv(s).length && s[s.length - 1] === e; + } else { + e = "/"; + const s = t.path; + i = s.length === 1 && s.charCodeAt(s.length - 1) === 47; + } + if (!i && !$p(t, e)) { + return t.with({ + path: t.path + "/" + }); + } else { + return t; + } + } + }; + ke = new Va(() => false); + tt = new Va(t => t.scheme === R.file ? !Se : true); + kp = new Va(t => true); + xp = ke.isEqual.bind(ke); + Dp = ke.isEqualOrParent.bind(ke); + KE = ke.getComparisonKey.bind(ke); + ZE = ke.basenameOrAuthority.bind(ke); + ks = ke.basename.bind(ke); + Mv = ke.extname.bind(ke); + Fv = ke.dirname.bind(ke); + he = ke.joinPath.bind(ke); + Pp = ke.normalizePath.bind(ke); + YE = ke.relativePath.bind(ke); + XE = ke.resolvePath.bind(ke); + Nv = ke.isAbsolutePath.bind(ke); + mi = ke.isEqualAuthority.bind(ke); + $p = ke.hasTrailingPathSeparator.bind(ke); + Wv = ke.removeTrailingPathSeparator.bind(ke); + QE = ke.addTrailingPathSeparator.bind(ke); + (function (t) { + t.META_DATA_LABEL = "label"; + t.META_DATA_DESCRIPTION = "description"; + t.META_DATA_SIZE = "size"; + t.META_DATA_MIME = "mime"; + function e(i) { + const s = new Map(); + i.path.substring(i.path.indexOf(";") + 1, i.path.lastIndexOf(";")).split(";").forEach(o => { + const [a, c] = o.split(":"); + if (a && c) { + s.set(a, c); + } + }); + const n = i.path.substring(0, i.path.indexOf(";")); + if (n) { + s.set(t.META_DATA_MIME, n); + } + return s; + } + t.parseMetaData = e; + })(Tv ||= {}); + } + }); + var jv; + var ek = g({ + "out-build/vs/base/common/symbols.js"() { + "use strict"; + + jv = Symbol("MicrotaskDelay"); + } + }); + function Ip(t) { + return !!t && typeof t.then == "function"; + } + function Qn(t) { + const e = new ns(); + const i = t(e.token); + const s = new Promise((r, n) => { + const o = e.token.onCancellationRequested(() => { + o.dispose(); + n(new hi()); + }); + Promise.resolve(i).then(a => { + o.dispose(); + e.dispose(); + r(a); + }, a => { + o.dispose(); + e.dispose(); + n(a); + }); + }); + return new class { + cancel() { + e.cancel(); + e.dispose(); + } + then(r, n) { + return s.then(r, n); + } + catch(r) { + return this.then(undefined, r); + } + finally(r) { + return s.finally(r); + } + }(); + } + function tk() { + let t; + let e; + return { + promise: new Promise((s, r) => { + t = s; + e = r; + }), + resolve: t, + reject: e + }; + } + function wi(t, e) { + if (e) { + return new Promise((i, s) => { + const r = setTimeout(() => { + n.dispose(); + i(); + }, t); + const n = e.onCancellationRequested(() => { + clearTimeout(r); + n.dispose(); + s(new hi()); + }); + }); + } else { + return Qn(i => wi(t, i)); + } + } + function ik(t, e = 0, i) { + const s = setTimeout(() => { + t(); + if (i) { + r.dispose(); + } + }, e); + const r = xe(() => { + clearTimeout(s); + i?.delete(r); + }); + i?.add(r); + return r; + } + function sk(t, e = s => !!s, i = null) { + let s = 0; + const r = t.length; + const n = () => { + if (s >= r) { + return Promise.resolve(i); + } + const o = t[s++]; + return Promise.resolve(o()).then(c => e(c) ? Promise.resolve(c) : n()); + }; + return n(); + } + async function rk(t, e, i) { + let s; + for (let r = 0; r < i; r++) { + try { + return await t(); + } catch (n) { + s = n; + await wi(e); + } + } + throw s; + } + var Ap; + var Uv; + var Bv; + var su; + var Ys; + var Ga; + var qv; + var eo; + var Cp; + var os; + var zv; + var _p; + var Rp; + var ru; + var Hv; + var Vv; + var Gv; + var Xs; + var Tt; + var Jv; + var nk; + var ce = g({ + "out-build/vs/base/common/async.js"() { + "use strict"; + + At(); + $e(); + B(); + M(); + nt(); + H(); + ek(); + Ta(); + Ap = class { + constructor() { + this.f = false; + this.a = null; + this.b = null; + this.d = null; + } + queue(t) { + if (this.f) { + return Promise.reject(new Error("Throttler is disposed")); + } + if (this.a) { + this.d = t; + if (!this.b) { + const e = () => { + this.b = null; + if (this.f) { + return; + } + const i = this.queue(this.d); + this.d = null; + return i; + }; + this.b = new Promise(i => { + this.a.then(e, e).then(i); + }); + } + return new Promise((e, i) => { + this.b.then(e, i); + }); + } + this.a = t(); + return new Promise((e, i) => { + this.a.then(s => { + this.a = null; + e(s); + }, s => { + this.a = null; + i(s); + }); + }); + } + dispose() { + this.f = true; + } + }; + Uv = (t, e) => { + let i = true; + const s = setTimeout(() => { + i = false; + e(); + }, t); + return { + isTriggered: () => i, + dispose: () => { + clearTimeout(s); + i = false; + } + }; + }; + Bv = t => { + let e = true; + queueMicrotask(() => { + if (e) { + e = false; + t(); + } + }); + return { + isTriggered: () => e, + dispose: () => { + e = false; + } + }; + }; + su = class { + constructor(t) { + this.defaultDelay = t; + this.a = null; + this.b = null; + this.d = null; + this.f = null; + this.g = null; + } + trigger(t, e = this.defaultDelay) { + this.g = t; + this.h(); + this.b ||= new Promise((s, r) => { + this.d = s; + this.f = r; + }).then(() => { + this.b = null; + this.d = null; + if (this.g) { + const s = this.g; + this.g = null; + return s(); + } + }); + const i = () => { + this.a = null; + this.d?.(null); + }; + this.a = e === jv ? Bv(i) : Uv(e, i); + return this.b; + } + isTriggered() { + return !!this.a?.isTriggered(); + } + cancel() { + this.h(); + if (this.b) { + this.f?.(new hi()); + this.b = null; + } + } + h() { + this.a?.dispose(); + this.a = null; + } + dispose() { + this.cancel(); + } + }; + Ys = class { + constructor(t) { + this.a = new su(t); + this.b = new Ap(); + } + trigger(t, e) { + return this.a.trigger(() => this.b.queue(t), e); + } + isTriggered() { + return this.a.isTriggered(); + } + cancel() { + this.a.cancel(); + } + dispose() { + this.a.dispose(); + this.b.dispose(); + } + }; + Ga = class { + constructor() { + this.a = false; + this.b = new Promise((t, e) => { + this.d = t; + }); + } + isOpen() { + return this.a; + } + open() { + this.a = true; + this.d(true); + } + wait() { + return this.b; + } + }; + qv = class { + constructor(t) { + this.a = 0; + this.b = false; + this.f = t; + this.g = []; + this.d = 0; + this.h = new $(); + } + whenIdle() { + if (this.size > 0) { + return x.toPromise(this.onDrained); + } else { + return Promise.resolve(); + } + } + get onDrained() { + return this.h.event; + } + get size() { + return this.a; + } + queue(t) { + if (this.b) { + throw new Error("Object has been disposed"); + } + this.a++; + return new Promise((e, i) => { + this.g.push({ + factory: t, + c: e, + e: i + }); + this.j(); + }); + } + j() { + while (this.g.length && this.d < this.f) { + const t = this.g.shift(); + this.d++; + const e = t.factory(); + e.then(t.c, t.e); + e.then(() => this.k(), () => this.k()); + } + } + k() { + if (!this.b) { + this.d--; + if (--this.a === 0) { + this.h.fire(); + } + if (this.g.length > 0) { + this.j(); + } + } + } + clear() { + if (this.b) { + throw new Error("Object has been disposed"); + } + this.g.length = 0; + this.a = this.d; + } + dispose() { + this.b = true; + this.g.length = 0; + this.a = 0; + this.h.dispose(); + } + }; + eo = class extends qv { + constructor() { + super(1); + } + }; + Cp = class { + constructor() { + this.a = new Map(); + this.b = new Set(); + this.d = undefined; + this.f = 0; + } + async whenDrained() { + if (this.g()) { + return; + } + const t = new Xs(); + this.b.add(t); + return t.p; + } + g() { + for (const [, t] of this.a) { + if (t.size > 0) { + return false; + } + } + return true; + } + queueSize(t, e = ke) { + const i = e.getComparisonKey(t); + return this.a.get(i)?.size ?? 0; + } + queueFor(t, e, i = ke) { + const s = i.getComparisonKey(t); + let r = this.a.get(s); + if (!r) { + r = new eo(); + const n = this.f++; + const o = x.once(r.onDrained)(() => { + r?.dispose(); + this.a.delete(s); + this.h(); + this.d?.deleteAndDispose(n); + if (this.d?.size === 0) { + this.d.dispose(); + this.d = undefined; + } + }); + this.d ||= new Xf(); + this.d.set(n, o); + this.a.set(s, r); + } + return r.queue(e); + } + h() { + if (this.g()) { + this.j(); + } + } + j() { + for (const t of this.b) { + t.complete(); + } + this.b.clear(); + } + dispose() { + for (const [, t] of this.a) { + t.dispose(); + } + this.a.clear(); + this.j(); + this.d?.dispose(); + } + }; + os = class { + constructor(t, e) { + this.b = -1; + this.a = t; + this.d = e; + this.f = this.g.bind(this); + } + dispose() { + this.cancel(); + this.a = null; + } + cancel() { + if (this.isScheduled()) { + clearTimeout(this.b); + this.b = -1; + } + } + schedule(t = this.d) { + this.cancel(); + this.b = setTimeout(this.f, t); + } + get delay() { + return this.d; + } + set delay(t) { + this.d = t; + } + isScheduled() { + return this.b !== -1; + } + flush() { + if (this.isScheduled()) { + this.cancel(); + this.h(); + } + } + g() { + this.b = -1; + if (this.a) { + this.h(); + } + } + h() { + this.a?.(); + } + }; + zv = class extends os { + constructor(t, e) { + super(t, e); + this.j = []; + } + work(t) { + this.j.push(t); + if (!this.isScheduled()) { + this.schedule(); + } + } + h() { + const t = this.j; + this.j = []; + this.a?.(t); + } + dispose() { + this.j = []; + super.dispose(); + } + }; + _p = class extends T { + constructor(t, e) { + super(); + this.h = t; + this.j = e; + this.a = []; + this.b = this.D(new pr()); + this.f = false; + this.g = 0; + } + get pending() { + return this.a.length; + } + work(t) { + if (this.f) { + return false; + } + if (typeof this.h.maxBufferedWork == "number") { + if (this.b.value) { + if (this.pending + t.length > this.h.maxBufferedWork) { + return false; + } + } else if (this.pending + t.length - this.h.maxWorkChunkSize > this.h.maxBufferedWork) { + return false; + } + } + for (const i of t) { + this.a.push(i); + } + const e = Date.now() - this.g; + if (!this.b.value && (!this.h.waitThrottleDelayBetweenWorkUnits || e >= this.h.throttleDelay)) { + this.m(); + } else if (!this.b.value && this.h.waitThrottleDelayBetweenWorkUnits) { + this.q(Math.max(this.h.throttleDelay - e, 0)); + } + return true; + } + m() { + this.g = Date.now(); + this.j(this.a.splice(0, this.h.maxWorkChunkSize)); + if (this.a.length > 0) { + this.q(); + } + } + q(t = this.h.throttleDelay) { + this.b.value = new os(() => { + this.b.clear(); + this.m(); + }, t); + this.b.value.schedule(); + } + dispose() { + super.dispose(); + this.a.length = 0; + this.f = true; + } + }; + (function () { + if (typeof globalThis.requestIdleCallback != "function" || typeof globalThis.cancelIdleCallback != "function") { + ru = (t, e, i) => { + rw(() => { + if (s) { + return; + } + const r = Date.now() + 15; + e(Object.freeze({ + didTimeout: true, + timeRemaining() { + return Math.max(0, r - Date.now()); + } + })); + }); + let s = false; + return { + dispose() { + s ||= true; + } + }; + }; + } else { + ru = (t, e, i) => { + const s = t.requestIdleCallback(e, typeof i == "number" ? { + timeout: i + } : undefined); + let r = false; + return { + dispose() { + if (!r) { + r = true; + t.cancelIdleCallback(s); + } + } + }; + }; + } + Rp = (t, e) => ru(globalThis, t, e); + })(); + Hv = class { + constructor(t, e) { + this.g = false; + this.d = () => { + try { + this.j = e(); + } catch (i) { + this.l = i; + } finally { + this.g = true; + } + }; + this.f = ru(t, () => this.d()); + } + dispose() { + this.f.dispose(); + } + get value() { + if (!this.g) { + this.f.dispose(); + this.d(); + } + if (this.l) { + throw this.l; + } + return this.j; + } + get isInitialized() { + return this.g; + } + }; + Vv = class extends Hv { + constructor(t) { + super(globalThis, t); + } + }; + (function (t) { + t[t.Resolved = 0] = "Resolved"; + t[t.Rejected = 1] = "Rejected"; + })(Gv ||= {}); + Xs = class { + get isRejected() { + return this.d?.outcome === 1; + } + get isResolved() { + return this.d?.outcome === 0; + } + get isSettled() { + return !!this.d; + } + get value() { + if (this.d?.outcome === 0) { + return this.d?.value; + } else { + return undefined; + } + } + constructor() { + this.p = new Promise((t, e) => { + this.a = t; + this.b = e; + }); + } + complete(t) { + return new Promise(e => { + this.a(t); + this.d = { + outcome: 0, + value: t + }; + e(); + }); + } + error(t) { + return new Promise(e => { + this.b(t); + this.d = { + outcome: 1, + value: t + }; + e(); + }); + } + cancel() { + return this.error(new hi()); + } + }; + (function (t) { + async function e(s) { + let r; + const n = await Promise.all(s.map(o => o.then(a => a, a => { + r ||= a; + }))); + if (typeof r !== "undefined") { + throw r; + } + return n; + } + t.settled = e; + function i(s) { + return new Promise(async (r, n) => { + try { + await s(r, n); + } catch (o) { + n(o); + } + }); + } + t.withAsyncBody = i; + })(Tt ||= {}); + (function (t) { + t[t.Initial = 0] = "Initial"; + t[t.DoneOK = 1] = "DoneOK"; + t[t.DoneError = 2] = "DoneError"; + })(Jv ||= {}); + nk = class qi { + static fromArray(e) { + return new qi(i => { + i.emitMany(e); + }); + } + static fromPromise(e) { + return new qi(async i => { + i.emitMany(await e); + }); + } + static fromPromisesResolveOrder(e) { + return new qi(async i => { + await Promise.all(e.map(async s => i.emitOne(await s))); + }); + } + static merge(e) { + return new qi(async i => { + await Promise.all(e.map(async s => { + for await (const r of s) { + i.emitOne(r); + } + })); + }); + } + static { + this.EMPTY = qi.fromArray([]); + } + constructor(e, i) { + this.a = 0; + this.b = []; + this.d = null; + this.f = i; + this.g = new $(); + queueMicrotask(async () => { + const s = { + emitOne: r => this.h(r), + emitMany: r => this.j(r), + reject: r => this.l(r) + }; + try { + await Promise.resolve(e(s)); + this.k(); + } catch (r) { + this.l(r); + } finally { + s.emitOne = undefined; + s.emitMany = undefined; + s.reject = undefined; + } + }); + } + [Symbol.asyncIterator]() { + let e = 0; + return { + next: async () => { + do { + if (this.a === 2) { + throw this.d; + } + if (e < this.b.length) { + return { + done: false, + value: this.b[e++] + }; + } + if (this.a === 1) { + return { + done: true, + value: undefined + }; + } + await x.toPromise(this.g.event); + } while (true); + }, + return: async () => { + this.f?.(); + return { + done: true, + value: undefined + }; + } + }; + } + static map(e, i) { + return new qi(async s => { + for await (const r of e) { + s.emitOne(i(r)); + } + }); + } + map(e) { + return qi.map(this, e); + } + static filter(e, i) { + return new qi(async s => { + for await (const r of e) { + if (i(r)) { + s.emitOne(r); + } + } + }); + } + filter(e) { + return qi.filter(this, e); + } + static coalesce(e) { + return qi.filter(e, i => !!i); + } + coalesce() { + return qi.coalesce(this); + } + static async toPromise(e) { + const i = []; + for await (const s of e) { + i.push(s); + } + return i; + } + toPromise() { + return qi.toPromise(this); + } + h(e) { + if (this.a === 0) { + this.b.push(e); + this.g.fire(); + } + } + j(e) { + if (this.a === 0) { + this.b = this.b.concat(e); + this.g.fire(); + } + } + k() { + if (this.a === 0) { + this.a = 1; + this.g.fire(); + } + } + l(e) { + if (this.a === 0) { + this.a = 2; + this.d = e; + this.g.fire(); + } + } + }; + } + }); + function Op(t, e) { + if (e && (t.stack || t.stacktrace)) { + return v(110, null, Zv(t), Kv(t.stack) || Kv(t.stacktrace)); + } else { + return Zv(t); + } + } + function Kv(t) { + if (Array.isArray(t)) { + return t.join(` + `); + } else { + return t; + } + } + function Zv(t) { + if (t.code === "ERR_UNC_HOST_NOT_ALLOWED") { + return `${t.message}. Please update the 'security.allowedUNCHosts' setting if you want to allow this host.`; + } else if (typeof t.code == "string" && typeof t.errno == "number" && typeof t.syscall == "string") { + return v(111, null, t.message); + } else { + return t.message || v(112, null); + } + } + function Ki(t = null, e = false) { + if (!t) { + return v(113, null); + } + if (Array.isArray(t)) { + const i = $t(t); + const s = Ki(i[0], e); + if (i.length > 1) { + return v(114, null, s, i.length); + } else { + return s; + } + } + if (wt(t)) { + return t; + } + if (t.detail) { + const i = t.detail; + if (i.error) { + return Op(i.error, e); + } + if (i.exception) { + return Op(i.exception, e); + } + } + if (t.stack) { + return Op(t, e); + } else if (t.message) { + return t.message; + } else { + return v(115, null); + } + } + var en = g({ + "out-build/vs/base/common/errorMessage.js"() { + "use strict"; + + zt(); + _e(); + be(); + } + }); + function to(t, e) { + const { + os: i, + tildify: s, + relative: r + } = e; + if (r) { + const a = ok(t, r, i); + if (typeof a == "string") { + return a; + } + } + let n = t.fsPath; + if (i === 1 && !j) { + n = n.replace(/\//g, "\\"); + } else if (i !== 1 && j) { + n = n.replace(/\\/g, "/"); + } + if (i !== 1 && s?.userHome) { + const a = s.userHome.fsPath; + let c; + if (t.scheme !== s.userHome.scheme && t.path[0] === ae.sep && t.path[1] !== ae.sep) { + c = s.userHome.with({ + path: t.path + }).fsPath; + } else { + c = n; + } + n = ak(c, a, i); + } + return (i === 1 ? Ge : ae).normalize(Lp(n, i === 1)); + } + function ok(t, e, i) { + const s = i === 1 ? Ge : ae; + const r = i === 3 ? ke : kp; + const n = e.getWorkspace(); + const o = n.folders.at(0); + if (!o) { + return; + } + if (t.scheme !== o.uri.scheme && t.path[0] === ae.sep && t.path[1] !== ae.sep) { + t = o.uri.with({ + path: t.path + }); + } + const a = e.getWorkspaceFolder(t); + if (!a) { + return; + } + let c; + if (r.isEqual(a.uri, t)) { + c = ""; + } else { + c = r.relativePath(a.uri, t) ?? ""; + } + c &&= s.normalize(c); + if (n.folders.length > 1 && !e.noPrefix) { + const l = a.name ? a.name : r.basenameOrAuthority(a.uri); + c = c ? `${l} \u2022 ${c}` : l; + } + return c; + } + function Lp(t, e = j) { + if (xv(t, e)) { + return t.charAt(0).toUpperCase() + t.slice(1); + } else { + return t; + } + } + function ak(t, e, i = Wi) { + if (i === 1 || !t || !e) { + return t; + } + let s = nu.original === e ? nu.normalized : undefined; + if (!s) { + s = e; + if (j) { + s = Xn(s); + } + s = `${Qr(s, ae.sep)}${ae.sep}`; + nu = { + original: e, + normalized: s + }; + } + let r = t; + if (j) { + r = Xn(r); + } + if (i === 3 ? r.startsWith(s) : eu(r, s)) { + return `~/${r.substr(s.length)}`; + } else { + return t; + } + } + function ck(t, e) { + if (N || e) { + return t.replace(/\(&&\w\)|&&/g, "").replace(/&/g, N ? "&" : "&&"); + } else { + return t.replace(/&&|&/g, i => i === "&" ? "&&" : "&"); + } + } + function Yv(t, e) { + if (N || e) { + return t.replace(/\(&&\w\)|&&/g, ""); + } else if (j) { + return t.replace(/&&|&/g, i => i === "&" ? "&&" : "&"); + } else { + return t.replace(/&&/g, "_"); + } + } + function lk(t) { + if (t.endsWith("]")) { + const e = t.lastIndexOf(" [", t.length - 2); + if (e !== -1) { + const i = Xv(t.substring(0, e)); + const s = t.substring(e); + return { + name: i.name + s, + parentPath: i.parentPath + }; + } + } + return Xv(t); + } + function Xv(t) { + const e = t.indexOf("/") !== -1 ? ae : Ge; + const i = e.basename(t); + const s = e.dirname(t); + if (i.length) { + return { + name: i, + parentPath: s + }; + } else { + return { + name: s, + parentPath: "" + }; + } + } + var nu; + var Qv; + var Sr = g({ + "out-build/vs/base/common/labels.js"() { + "use strict"; + + gi(); + we(); + H(); + nt(); + Wt(); + nu = Object.create(null); + (function (t) { + t[t.TEXT = 0] = "TEXT"; + t[t.VARIABLE = 1] = "VARIABLE"; + t[t.SEPARATOR = 2] = "SEPARATOR"; + })(Qv ||= {}); + } + }); + function io(t) { + return uk(t, "NFC", eb); + } + function uk(t, e, i) { + if (!t) { + return t; + } + const s = i.get(t); + if (s) { + return s; + } + let r; + if (tb.test(t)) { + r = t.normalize(e); + } else { + r = t; + } + i.set(t, r); + return r; + } + var eb; + var hk; + var tb; + var ou = g({ + "out-build/vs/base/common/normalization.js"() { + "use strict"; + + $i(); + eb = new Da(10000); + hk = new Da(10000); + tb = /[^\u0000-\u0080]/; + } + }); + import * as Fe from "fs"; + import { tmpdir as dk } from "os"; + import { promisify as Ja } from "util"; + async function ib(t, e = tn.UNLINK, i) { + if (HE(t)) { + throw new Error("rimraf - will refuse to recursively delete root"); + } + if (e === tn.UNLINK) { + return Mp(t); + } else { + return fk(t, i); + } + } + async function fk(t, e = qa(dk())) { + try { + try { + await Fe.promises.rename(t, e); + } catch (i) { + if (i.code === "ENOENT") { + return undefined; + } else { + return Mp(t); + } + } + Mp(e).catch(i => {}); + } catch (i) { + if (i.code !== "ENOENT") { + throw i; + } + } + } + async function Mp(t) { + return Fe.promises.rm(t, { + recursive: true, + force: true, + maxRetries: 3 + }); + } + async function au(t, e) { + return gk(await (e ? pk(t) : Fe.promises.readdir(t))); + } + async function pk(t) { + try { + return await Fe.promises.readdir(t, { + withFileTypes: true + }); + } catch (s) { + console.warn("[node.js fs] readdir with filetypes failed with error: ", s); + } + const e = []; + const i = await au(t); + for (const s of i) { + let r = false; + let n = false; + let o = false; + try { + const a = await Fe.promises.lstat(F(t, s)); + r = a.isFile(); + n = a.isDirectory(); + o = a.isSymbolicLink(); + } catch (a) { + console.warn("[node.js fs] unexpected error from lstat after readdir: ", a); + } + e.push({ + name: s, + isFile: () => r, + isDirectory: () => n, + isSymbolicLink: () => o + }); + } + return e; + } + function gk(t) { + return t.map(e => typeof e == "string" ? N ? io(e) : e : (e.name = N ? io(e.name) : e.name, e)); + } + async function mk(t) { + const e = await au(t); + const i = []; + for (const s of e) { + if (await jt.existsDirectory(F(t, s))) { + i.push(s); + } + } + return i; + } + function wk(t, e = 1000) { + return new Promise(i => { + let s = false; + const r = setInterval(() => { + if (!s) { + s = true; + Fe.access(t, n => { + s = false; + if (n) { + clearInterval(r); + i(undefined); + } + }); + } + }, e); + }); + } + function vk(t, e, i) { + return ob.queueFor(P.file(t), () => { + const s = Sk(i); + return new Promise((r, n) => yk(t, e, s, o => o ? n(o) : r())); + }, tt); + } + function bk(t) { + Fp = t; + } + function yk(t, e, i, s) { + if (!Fp) { + return Fe.writeFile(t, e, { + mode: i.mode, + flag: i.flag + }, s); + } + Fe.open(t, i.flag, i.mode, (r, n) => { + if (r) { + return s(r); + } + Fe.writeFile(n, e, o => { + if (o) { + return Fe.close(n, () => s(o)); + } + Fe.fdatasync(n, a => { + if (a) { + console.warn("[node.js fs] fdatasync is now disabled for this session because it failed: ", a); + bk(false); + } + return Fe.close(n, c => s(c)); + }); + }); + }); + } + function Sk(t) { + if (t) { + return { + mode: typeof t.mode == "number" ? t.mode : 438, + flag: typeof t.flag == "string" ? t.flag : "w" + }; + } else { + return { + mode: 438, + flag: "w" + }; + } + } + async function Ek(t, e, i = 60000) { + if (t !== e) { + try { + if (j && typeof i == "number") { + await sb(t, e, Date.now(), i); + } else { + await Fe.promises.rename(t, e); + } + } catch (s) { + if (t.toLowerCase() !== e.toLowerCase() && s.code === "EXDEV" || t.endsWith(".")) { + await rb(t, e, { + preserveSymlinks: false + }); + await ib(t, tn.MOVE); + } else { + throw s; + } + } + } + } + async function sb(t, e, i, s, r = 0) { + try { + return await Fe.promises.rename(t, e); + } catch (n) { + if (n.code !== "EACCES" && n.code !== "EPERM" && n.code !== "EBUSY") { + throw n; + } + if (Date.now() - i >= s) { + console.error(`[node.js fs] rename failed after ${r} retries with error: ${n}`); + throw n; + } + if (r === 0) { + let o = false; + try { + const { + stat: a + } = await jt.stat(e); + if (!a.isFile()) { + o = true; + } + } catch {} + if (o) { + throw n; + } + } + await wi(Math.min(100, r * 10)); + return sb(t, e, i, s, r + 1); + } + } + async function rb(t, e, i) { + return nb(t, e, { + root: { + source: t, + target: e + }, + options: i, + handledSourcePaths: new Set() + }); + } + async function nb(t, e, i) { + if (i.handledSourcePaths.has(t)) { + return; + } + i.handledSourcePaths.add(t); + const { + stat: s, + symbolicLink: r + } = await jt.stat(t); + if (r) { + if (i.options.preserveSymlinks) { + try { + return await Dk(t, e, i); + } catch {} + } + if (r.dangling) { + return; + } + } + if (s.isDirectory()) { + return kk(t, e, s.mode & Np, i); + } else { + return xk(t, e, s.mode & Np); + } + } + async function kk(t, e, i, s) { + await Fe.promises.mkdir(e, { + recursive: true, + mode: i + }); + const r = await au(t); + for (const n of r) { + await nb(F(t, n), F(e, n), s); + } + } + async function xk(t, e, i) { + await Fe.promises.copyFile(t, e); + await Fe.promises.chmod(e, i); + } + async function Dk(t, e, i) { + let s = await Fe.promises.readlink(t); + if (Ba(s, i.root.source, !Se)) { + s = F(i.root.target, s.substr(i.root.source.length + 1)); + } + await Fe.promises.symlink(s, e); + } + var tn; + var jt; + var ob; + var Fp; + var Np; + var ee; + var _t = g({ + "out-build/vs/base/node/pfs.js"() { + "use strict"; + + ce(); + gi(); + ou(); + we(); + H(); + nt(); + se(); + (function (t) { + t[t.UNLINK = 0] = "UNLINK"; + t[t.MOVE = 1] = "MOVE"; + })(tn ||= {}); + (function (t) { + async function e(r) { + let n; + try { + n = await Fe.promises.lstat(r); + if (!n.isSymbolicLink()) { + return { + stat: n + }; + } + } catch {} + try { + return { + stat: await Fe.promises.stat(r), + symbolicLink: n?.isSymbolicLink() ? { + dangling: false + } : undefined + }; + } catch (o) { + if (o.code === "ENOENT" && n) { + return { + stat: n, + symbolicLink: { + dangling: true + } + }; + } + if (j && o.code === "EACCES") { + try { + return { + stat: await Fe.promises.stat(await Fe.promises.readlink(r)), + symbolicLink: { + dangling: false + } + }; + } catch (a) { + if (a.code === "ENOENT" && n) { + return { + stat: n, + symbolicLink: { + dangling: true + } + }; + } + throw a; + } + } + throw o; + } + } + t.stat = e; + async function i(r) { + try { + const { + stat: n, + symbolicLink: o + } = await t.stat(r); + return n.isFile() && o?.dangling !== true; + } catch {} + return false; + } + t.existsFile = i; + async function s(r) { + try { + const { + stat: n, + symbolicLink: o + } = await t.stat(r); + return n.isDirectory() && o?.dangling !== true; + } catch {} + return false; + } + t.existsDirectory = s; + })(jt ||= {}); + ob = new Cp(); + Fp = true; + Np = 511; + ee = new class { + get read() { + return (t, e, i, s, r) => new Promise((n, o) => { + Fe.read(t, e, i, s, r, (a, c, l) => a ? o(a) : n({ + bytesRead: c, + buffer: l + })); + }); + } + get write() { + return (t, e, i, s, r) => new Promise((n, o) => { + Fe.write(t, e, i, s, r, (a, c, l) => a ? o(a) : n({ + bytesWritten: c, + buffer: l + })); + }); + } + get fdatasync() { + return Ja(Fe.fdatasync); + } + get open() { + return Ja(Fe.open); + } + get close() { + return Ja(Fe.close); + } + get realpath() { + return Ja(Fe.realpath); + } + get ftruncate() { + return Ja(Fe.ftruncate); + } + async exists(t) { + try { + await Fe.promises.access(t); + return true; + } catch { + return false; + } + } + get readdir() { + return au; + } + get readDirsInDir() { + return mk; + } + get writeFile() { + return vk; + } + get rm() { + return ib; + } + get rename() { + return Ek; + } + get copy() { + return rb; + } + }(); + } + }); + function cu(t) { + const e = t; + if (e) { + return [e.on, e.pause, e.resume, e.destroy].every(i => typeof i == "function"); + } else { + return false; + } + } + function Wp(t) { + const e = t; + if (e) { + return cu(e.stream) && Array.isArray(e.buffer) && typeof e.ended == "boolean"; + } else { + return false; + } + } + function lu(t, e) { + return new lb(t, e); + } + function Pk(t, e) { + const i = []; + let s; + while ((s = t.read()) !== null) { + i.push(s); + } + return e(i); + } + function $k(t, e, i) { + const s = []; + let r; + while ((r = t.read()) !== null && s.length < i) { + s.push(r); + } + if (r === null && s.length > 0) { + return e(s); + } else { + return { + read: () => { + if (s.length > 0) { + return s.shift(); + } + if (typeof r !== "undefined") { + const n = r; + r = undefined; + return n; + } + return t.read(); + } + }; + } + } + function ab(t, e) { + return new Promise((i, s) => { + const r = []; + uu(t, { + onData: n => { + if (e) { + r.push(n); + } + }, + onError: n => { + if (e) { + s(n); + } else { + i(undefined); + } + }, + onEnd: () => { + i(e ? e(r) : undefined); + } + }); + }); + } + function uu(t, e, i) { + t.on("error", s => { + if (!i?.isCancellationRequested) { + e.onError(s); + } + }); + t.on("end", () => { + if (!i?.isCancellationRequested) { + e.onEnd(); + } + }); + t.on("data", s => { + if (!i?.isCancellationRequested) { + e.onData(s); + } + }); + } + function Ik(t, e) { + return new Promise((i, s) => { + const r = new De(); + const n = []; + const o = l => { + n.push(l); + if (n.length > e) { + r.dispose(); + t.pause(); + return i({ + stream: t, + buffer: n, + ended: false + }); + } + }; + const a = l => { + r.dispose(); + return s(l); + }; + const c = () => { + r.dispose(); + return i({ + stream: t, + buffer: n, + ended: true + }); + }; + r.add(xe(() => t.removeListener("error", a))); + t.on("error", a); + r.add(xe(() => t.removeListener("end", c))); + t.on("end", c); + r.add(xe(() => t.removeListener("data", o))); + t.on("data", o); + }); + } + function Ak(t) { + let e = false; + return { + read: () => e ? null : (e = true, t) + }; + } + function cb(t, e, i) { + const s = lu(i); + uu(t, { + onData: r => s.write(e.data(r)), + onError: r => s.error(e.error ? e.error(r) : r), + onEnd: () => s.end() + }); + return s; + } + var lb; + var Ka = g({ + "out-build/vs/base/common/stream.js"() { + "use strict"; + + $e(); + M(); + lb = class { + constructor(t, e) { + this.e = t; + this.f = e; + this.a = { + flowing: false, + ended: false, + destroyed: false + }; + this.b = { + data: [], + error: [] + }; + this.c = { + data: [], + error: [], + end: [] + }; + this.d = []; + } + pause() { + if (!this.a.destroyed) { + this.a.flowing = false; + } + } + resume() { + if (!this.a.destroyed && !this.a.flowing) { + this.a.flowing = true; + this.j(); + this.k(); + this.l(); + } + } + write(t) { + if (!this.a.destroyed) { + if (this.a.flowing) { + this.g(t); + } else { + this.b.data.push(t); + if (typeof this.f?.highWaterMark == "number" && this.b.data.length > this.f.highWaterMark) { + return new Promise(e => this.d.push(e)); + } + } + } + } + error(t) { + if (!this.a.destroyed) { + if (this.a.flowing) { + this.h(t); + } else { + this.b.error.push(t); + } + } + } + end(t) { + if (!this.a.destroyed) { + if (typeof t !== "undefined") { + this.write(t); + } + if (this.a.flowing) { + this.i(); + this.destroy(); + } else { + this.a.ended = true; + } + } + } + g(t) { + this.c.data.slice(0).forEach(e => e(t)); + } + h(t) { + if (this.c.error.length === 0) { + Ft(t); + } else { + this.c.error.slice(0).forEach(e => e(t)); + } + } + i() { + this.c.end.slice(0).forEach(t => t()); + } + on(t, e) { + if (!this.a.destroyed) { + switch (t) { + case "data": + this.c.data.push(e); + this.resume(); + break; + case "end": + this.c.end.push(e); + if (this.a.flowing && this.l()) { + this.destroy(); + } + break; + case "error": + this.c.error.push(e); + if (this.a.flowing) { + this.k(); + } + break; + } + } + } + removeListener(t, e) { + if (this.a.destroyed) { + return; + } + let i; + switch (t) { + case "data": + i = this.c.data; + break; + case "end": + i = this.c.end; + break; + case "error": + i = this.c.error; + break; + } + if (i) { + const s = i.indexOf(e); + if (s >= 0) { + i.splice(s, 1); + } + } + } + j() { + if (this.b.data.length > 0) { + const t = this.e(this.b.data); + this.g(t); + this.b.data.length = 0; + const e = [...this.d]; + this.d.length = 0; + e.forEach(i => i()); + } + } + k() { + if (this.c.error.length > 0) { + for (const t of this.b.error) { + this.h(t); + } + this.b.error.length = 0; + } + } + l() { + if (this.a.ended) { + this.i(); + return this.c.end.length > 0; + } else { + return false; + } + } + destroy() { + if (!this.a.destroyed) { + this.a.destroyed = true; + this.a.ended = true; + this.b.data.length = 0; + this.b.error.length = 0; + this.c.data.length = 0; + this.c.error.length = 0; + this.c.end.length = 0; + this.d.length = 0; + } + } + }; + } + }); + function Ck(t, e, i = 0) { + const s = e.byteLength; + const r = t.byteLength; + if (s === 0) { + return 0; + } + if (s === 1) { + return t.indexOf(e[0]); + } + if (s > r - i) { + return -1; + } + const n = ub.value; + n.fill(e.length); + for (let l = 0; l < e.length; l++) { + n[e[l]] = e.length - l - 1; + } + let o = i + e.length - 1; + let a = o; + let c = -1; + while (o < r) { + if (t[o] === e[a]) { + if (a === 0) { + c = o; + break; + } + o--; + a--; + } else { + o += Math.max(e.length - a, n[t[o]]); + a = e.length - 1; + } + } + return c; + } + function _k(t, e) { + return t[e] * 16777216 + t[e + 1] * 65536 + t[e + 2] * 256 + t[e + 3]; + } + function Rk(t, e, i) { + t[i + 3] = e; + e = e >>> 8; + t[i + 2] = e; + e = e >>> 8; + t[i + 1] = e; + e = e >>> 8; + t[i] = e; + } + function Ok(t, e) { + return t[e + 0] << 0 >>> 0 | t[e + 1] << 8 >>> 0 | t[e + 2] << 16 >>> 0 | t[e + 3] << 24 >>> 0; + } + function Lk(t, e, i) { + t[i + 0] = e & 255; + e = e >>> 8; + t[i + 1] = e & 255; + e = e >>> 8; + t[i + 2] = e & 255; + e = e >>> 8; + t[i + 3] = e & 255; + } + function Mk(t, e) { + return t[e]; + } + function Fk(t, e, i) { + t[i] = e; + } + function Nk(t) { + return Pk(t, e => z.concat(e)); + } + function Wk(t) { + return Ak(t); + } + function Za(t) { + return ab(t, e => z.concat(e)); + } + async function Tk(t) { + if (t.ended) { + return z.concat(t.buffer); + } else { + return z.concat([...t.buffer, await Za(t.stream)]); + } + } + function jk(t) { + return cb(t, { + data: e => typeof e == "string" ? z.fromString(e) : z.wrap(e) + }, e => z.concat(e)); + } + function Uk(t) { + return lu(e => z.concat(e), t); + } + var Ya; + var ub; + var Tp; + var jp; + var z; + var Ze = g({ + "out-build/vs/base/common/buffer.js"() { + "use strict"; + + Ta(); + Ka(); + Ya = typeof Buffer !== "undefined"; + ub = new vr(() => new Uint8Array(256)); + z = class es { + static alloc(e) { + if (Ya) { + return new es(Buffer.allocUnsafe(e)); + } else { + return new es(new Uint8Array(e)); + } + } + static wrap(e) { + if (Ya && !Buffer.isBuffer(e)) { + e = Buffer.from(e.buffer, e.byteOffset, e.byteLength); + } + return new es(e); + } + static fromString(e, i) { + if (!i?.dontUseNodeBuffer && !false && Ya) { + return new es(Buffer.from(e)); + } else { + Tp ||= new TextEncoder(); + return new es(Tp.encode(e)); + } + } + static fromByteArray(e) { + const i = es.alloc(e.length); + for (let s = 0, r = e.length; s < r; s++) { + i.buffer[s] = e[s]; + } + return i; + } + static concat(e, i) { + if (typeof i === "undefined") { + i = 0; + for (let n = 0, o = e.length; n < o; n++) { + i += e[n].byteLength; + } + } + const s = es.alloc(i); + let r = 0; + for (let n = 0, o = e.length; n < o; n++) { + const a = e[n]; + s.set(a, r); + r += a.byteLength; + } + return s; + } + constructor(e) { + this.buffer = e; + this.byteLength = this.buffer.byteLength; + } + clone() { + const e = es.alloc(this.byteLength); + e.set(this); + return e; + } + toString() { + if (Ya) { + return this.buffer.toString(); + } else { + jp ||= new TextDecoder(); + return jp.decode(this.buffer); + } + } + slice(e, i) { + return new es(this.buffer.subarray(e, i)); + } + set(e, i) { + if (e instanceof es) { + this.buffer.set(e.buffer, i); + } else if (e instanceof Uint8Array) { + this.buffer.set(e, i); + } else if (e instanceof ArrayBuffer) { + this.buffer.set(new Uint8Array(e), i); + } else if (ArrayBuffer.isView(e)) { + this.buffer.set(new Uint8Array(e.buffer, e.byteOffset, e.byteLength), i); + } else { + throw new Error("Unknown argument 'array'"); + } + } + readUInt32BE(e) { + return _k(this.buffer, e); + } + writeUInt32BE(e, i) { + Rk(this.buffer, e, i); + } + readUInt32LE(e) { + return Ok(this.buffer, e); + } + writeUInt32LE(e, i) { + Lk(this.buffer, e, i); + } + readUInt8(e) { + return Mk(this.buffer, e); + } + writeUInt8(e, i) { + Fk(this.buffer, e, i); + } + indexOf(e, i = 0) { + return Ck(this.buffer, e instanceof es ? e.buffer : e, i); + } + }; + } + }); + function de(t, e, i) { + let s = null; + let r = null; + if (typeof i.value == "function") { + s = "value"; + r = i.value; + if (r.length !== 0) { + console.warn("Memoize should only be used in functions with zero parameters"); + } + } else if (typeof i.get == "function") { + s = "get"; + r = i.get; + } + if (!r) { + throw new Error("not supported"); + } + const n = `$memoize$${e}`; + i[s] = function (...o) { + if (!this.hasOwnProperty(n)) { + Object.defineProperty(this, n, { + configurable: false, + enumerable: false, + writable: false, + value: r.apply(this, o) + }); + } + return this[n]; + }; + } + var sn = g({ + "out-build/vs/base/common/decorators.js"() { + "use strict"; + } + }); + function Bk(t) { + return JSON.stringify(t, zk); + } + function qk(t) { + let e = JSON.parse(t); + e = Er(e); + return e; + } + function zk(t, e) { + if (e instanceof RegExp) { + return { + $mid: 2, + source: e.source, + flags: e.flags + }; + } else { + return e; + } + } + function Er(t, e = 0) { + if (!t || e > 200) { + return t; + } + if (typeof t == "object") { + switch (t.$mid) { + case 1: + return P.revive(t); + case 2: + return new RegExp(t.source, t.flags); + case 17: + return new Date(t.source); + } + if (t instanceof z || t instanceof Uint8Array) { + return t; + } + if (Array.isArray(t)) { + for (let i = 0; i < t.length; ++i) { + t[i] = Er(t[i], e + 1); + } + } else { + for (const i in t) { + if (Object.hasOwnProperty.call(t, i)) { + t[i] = Er(t[i], e + 1); + } + } + } + } + return t; + } + var hu = g({ + "out-build/vs/base/common/marshalling.js"() { + "use strict"; + + Ze(); + se(); + } + }); + function so(t) { + switch (t) { + case 100: + return "req"; + case 101: + return "cancel"; + case 102: + return "subscribe"; + case 103: + return "unsubscribe"; + } + } + function du(t) { + switch (t) { + case 200: + return "init"; + case 201: + return "reply:"; + case 202: + case 203: + return "replyErr:"; + case 204: + return "event:"; + } + } + function ro(t) { + let e = 0; + for (let i = 0;; i += 7) { + const s = t.read(1); + e |= (s.buffer[0] & 127) << i; + if (!(s.buffer[0] & 128)) { + return e; + } + } + } + function no(t, e) { + if (e === 0) { + t.write(fb); + return; + } + let i = 0; + for (let r = e; r !== 0; r = r >>> 7) { + i++; + } + const s = z.alloc(i); + for (let r = 0; e !== 0; r++) { + s.buffer[r] = e & 127; + e = e >>> 7; + if (e > 0) { + s.buffer[r] |= 128; + } + } + t.write(s); + } + function kr(t) { + const e = z.alloc(1); + e.writeUInt8(t, 0); + return e; + } + function oo(t, e) { + if (typeof e === "undefined") { + t.write(xr.Undefined); + } else if (typeof e == "string") { + const i = z.fromString(e); + t.write(xr.String); + no(t, i.byteLength); + t.write(i); + } else if (pb && Buffer.isBuffer(e)) { + const i = z.wrap(e); + t.write(xr.Buffer); + no(t, i.byteLength); + t.write(i); + } else if (e instanceof z) { + t.write(xr.VSBuffer); + no(t, e.byteLength); + t.write(e); + } else if (Array.isArray(e)) { + t.write(xr.Array); + no(t, e.length); + for (const i of e) { + oo(t, i); + } + } else if (typeof e == "number" && (e | 0) === e) { + t.write(xr.Uint); + no(t, e); + } else { + const i = z.fromString(JSON.stringify(e)); + t.write(xr.Object); + no(t, i.byteLength); + t.write(i); + } + } + function ao(t) { + switch (t.read(1).readUInt8(0)) { + case ei.Undefined: + return; + case ei.String: + return t.read(ro(t)).toString(); + case ei.Buffer: + return t.read(ro(t)).buffer; + case ei.VSBuffer: + return t.read(ro(t)); + case ei.Array: + { + const i = ro(t); + const s = []; + for (let r = 0; r < i; r++) { + s.push(ao(t)); + } + return s; + } + case ei.Object: + return JSON.parse(t.read(ro(t)).toString()); + case ei.Int: + return ro(t); + } + } + function fu(t) { + return { + call(e, i, s) { + return t.then(r => r.call(e, i, s)); + }, + listen(e, i) { + const s = new ip(); + t.then(r => s.input = r.listen(e, i)); + return s.event; + } + }; + } + function Hk(t) { + let e = false; + return { + call(i, s, r) { + if (e) { + return t.call(i, s, r); + } else { + return wi(0).then(() => e = true).then(() => t.call(i, s, r)); + } + }, + listen(i, s) { + if (e) { + return t.listen(i, s); + } + const r = new ip(); + wi(0).then(() => e = true).then(() => r.input = t.listen(i, s)); + return r.event; + } + }; + } + var hb; + var db; + var rn; + var fb; + var pu; + var gu; + var ei; + var xr; + var pb; + var Up; + var gb; + var Xa; + var Bp; + var qp; + var mb; + var ze; + var xs = g({ + "out-build/vs/base/parts/ipc/common/ipc.js"() { + "use strict"; + + zt(); + ce(); + Ze(); + At(); + sn(); + $e(); + B(); + Ul(); + M(); + hu(); + Wt(); + _e(); + (function (t) { + t[t.Promise = 100] = "Promise"; + t[t.PromiseCancel = 101] = "PromiseCancel"; + t[t.EventListen = 102] = "EventListen"; + t[t.EventDispose = 103] = "EventDispose"; + })(hb ||= {}); + (function (t) { + t[t.Initialize = 200] = "Initialize"; + t[t.PromiseSuccess = 201] = "PromiseSuccess"; + t[t.PromiseError = 202] = "PromiseError"; + t[t.PromiseErrorObj = 203] = "PromiseErrorObj"; + t[t.EventFire = 204] = "EventFire"; + })(db ||= {}); + (function (t) { + t[t.Uninitialized = 0] = "Uninitialized"; + t[t.Idle = 1] = "Idle"; + })(rn ||= {}); + fb = kr(0); + pu = class { + constructor(t) { + this.b = t; + this.a = 0; + } + read(t) { + const e = this.b.slice(this.a, this.a + t); + this.a += e.byteLength; + return e; + } + }; + gu = class { + constructor() { + this.a = []; + } + get buffer() { + return z.concat(this.a); + } + write(t) { + this.a.push(t); + } + }; + (function (t) { + t[t.Undefined = 0] = "Undefined"; + t[t.String = 1] = "String"; + t[t.Buffer = 2] = "Buffer"; + t[t.VSBuffer = 3] = "VSBuffer"; + t[t.Array = 4] = "Array"; + t[t.Object = 5] = "Object"; + t[t.Int = 6] = "Int"; + })(ei ||= {}); + xr = { + Undefined: kr(ei.Undefined), + String: kr(ei.String), + Buffer: kr(ei.Buffer), + VSBuffer: kr(ei.VSBuffer), + Array: kr(ei.Array), + Object: kr(ei.Object), + Uint: kr(ei.Int) + }; + pb = typeof Buffer !== "undefined"; + Up = class { + constructor(t, e, i = null, s = 1000) { + this.h = t; + this.j = e; + this.k = i; + this.l = s; + this.b = new Map(); + this.d = new Map(); + this.g = new Map(); + this.f = this.h.onMessage(r => this.q(r)); + this.m({ + type: 200 + }); + } + registerChannel(t, e) { + this.b.set(t, e); + setTimeout(() => this.w(t), 0); + } + m(t) { + switch (t.type) { + case 200: + { + const e = this.o([t.type]); + this.k?.logOutgoing(e, 0, 1, du(t.type)); + return; + } + case 201: + case 202: + case 204: + case 203: + { + const e = this.o([t.type, t.id], t.data); + this.k?.logOutgoing(e, t.id, 1, du(t.type), t.data); + return; + } + } + } + o(t, e = undefined) { + const i = new gu(); + oo(i, t); + oo(i, e); + return this.p(i.buffer); + } + p(t) { + try { + this.h.send(t); + return t.byteLength; + } catch { + return 0; + } + } + q(t) { + const e = new pu(t); + const i = ao(e); + const s = ao(e); + const r = i[0]; + switch (r) { + case 100: + this.k?.logIncoming(t.byteLength, i[1], 1, `${so(r)}: ${i[2]}.${i[3]}`, s); + return this.s({ + type: r, + id: i[1], + channelName: i[2], + name: i[3], + arg: s + }); + case 102: + this.k?.logIncoming(t.byteLength, i[1], 1, `${so(r)}: ${i[2]}.${i[3]}`, s); + return this.t({ + type: r, + id: i[1], + channelName: i[2], + name: i[3], + arg: s + }); + case 101: + this.k?.logIncoming(t.byteLength, i[1], 1, `${so(r)}`); + return this.u({ + type: r, + id: i[1] + }); + case 103: + this.k?.logIncoming(t.byteLength, i[1], 1, `${so(r)}`); + return this.u({ + type: r, + id: i[1] + }); + } + } + s(t) { + const e = this.b.get(t.channelName); + if (!e) { + this.v(t); + return; + } + const i = new ns(); + let s; + try { + s = e.call(this.j, t.name, t.arg, i.token); + } catch (o) { + s = Promise.reject(o); + } + const r = t.id; + s.then(o => { + this.m({ + id: r, + data: o, + type: 201 + }); + }, o => { + if (o instanceof Error) { + this.m({ + id: r, + data: { + message: o.message, + name: o.name, + stack: o.stack ? o.stack.split(` + `) : undefined + }, + type: 202 + }); + } else { + this.m({ + id: r, + data: o, + type: 203 + }); + } + }).finally(() => { + n.dispose(); + this.d.delete(t.id); + }); + const n = xe(() => i.cancel()); + this.d.set(t.id, n); + } + t(t) { + const e = this.b.get(t.channelName); + if (!e) { + this.v(t); + return; + } + const i = t.id; + const r = e.listen(this.j, t.name, t.arg)(n => this.m({ + id: i, + data: n, + type: 204 + })); + this.d.set(t.id, r); + } + u(t) { + const e = this.d.get(t.id); + if (e) { + e.dispose(); + this.d.delete(t.id); + } + } + v(t) { + let e = this.g.get(t.channelName); + if (!e) { + e = []; + this.g.set(t.channelName, e); + } + const i = setTimeout(() => { + console.error(`Unknown channel: ${t.channelName}`); + if (t.type === 100) { + this.m({ + id: t.id, + data: { + name: "Unknown channel", + message: `Channel name '${t.channelName}' timed out after ${this.l}ms`, + stack: undefined + }, + type: 202 + }); + } + }, this.l); + e.push({ + request: t, + timeoutTimer: i + }); + } + w(t) { + const e = this.g.get(t); + if (e) { + for (const i of e) { + clearTimeout(i.timeoutTimer); + switch (i.request.type) { + case 100: + this.s(i.request); + break; + case 102: + this.t(i.request); + break; + } + } + this.g.delete(t); + } + } + dispose() { + if (this.f) { + this.f.dispose(); + this.f = null; + } + Et(this.d.values()); + this.d.clear(); + } + }; + (function (t) { + t[t.LocalSide = 0] = "LocalSide"; + t[t.OtherSide = 1] = "OtherSide"; + })(gb ||= {}); + Xa = class { + constructor(t, e = null) { + this.l = t; + this.a = false; + this.b = rn.Uninitialized; + this.d = new Set(); + this.f = new Map(); + this.g = 0; + this.k = new $(); + this.onDidInitialize = this.k.event; + this.h = this.l.onMessage(i => this.s(i)); + this.j = e; + } + getChannel(t) { + const e = this; + return { + call(i, s, r) { + if (e.a) { + return Promise.reject(new hi()); + } else { + return e.m(t, i, s, r); + } + }, + listen(i, s) { + if (e.a) { + return x.None; + } else { + return e.o(t, i, s); + } + } + }; + } + m(t, e, i, s = We.None) { + const r = this.g++; + const o = { + id: r, + type: 100, + channelName: t, + name: e, + arg: i + }; + if (s.isCancellationRequested) { + return Promise.reject(new hi()); + } + let a; + let c; + return new Promise((u, d) => { + if (s.isCancellationRequested) { + return d(new hi()); + } + const f = () => { + const m = y => { + switch (y.type) { + case 201: + this.f.delete(r); + u(y.data); + break; + case 202: + { + this.f.delete(r); + const b = new Error(y.data.message); + b.stack = Array.isArray(y.data.stack) ? y.data.stack.join(` + `) : y.data.stack; + b.name = y.data.name; + d(b); + break; + } + case 203: + this.f.delete(r); + d(y.data); + break; + } + }; + this.f.set(r, m); + this.p(o); + }; + let p = null; + if (this.b === rn.Idle) { + f(); + } else { + p = Qn(m => this.u()); + p.then(() => { + p = null; + f(); + }); + } + const w = () => { + if (p) { + p.cancel(); + p = null; + } else { + this.p({ + id: r, + type: 101 + }); + } + d(new hi()); + }; + a = s.onCancellationRequested(w); + c = { + dispose: jl(() => { + w(); + a.dispose(); + }) + }; + this.d.add(c); + }).finally(() => { + a.dispose(); + this.d.delete(c); + }); + } + o(t, e, i) { + const s = this.g++; + const n = { + id: s, + type: 102, + channelName: t, + name: e, + arg: i + }; + let o = null; + const a = new $({ + onWillAddFirstListener: () => { + const l = () => { + this.d.add(a); + this.p(n); + }; + if (this.b === rn.Idle) { + l(); + } else { + o = Qn(u => this.u()); + o.then(() => { + o = null; + l(); + }); + } + }, + onDidRemoveLastListener: () => { + if (o) { + o.cancel(); + o = null; + } else { + this.d.delete(a); + this.p({ + id: s, + type: 103 + }); + } + } + }); + const c = l => a.fire(l.data); + this.f.set(s, c); + return a.event; + } + p(t) { + switch (t.type) { + case 100: + case 102: + { + const e = this.q([t.type, t.id, t.channelName, t.name], t.arg); + this.j?.logOutgoing(e, t.id, 0, `${so(t.type)}: ${t.channelName}.${t.name}`, t.arg); + return; + } + case 101: + case 103: + { + const e = this.q([t.type, t.id]); + this.j?.logOutgoing(e, t.id, 0, so(t.type)); + return; + } + } + } + q(t, e = undefined) { + const i = new gu(); + oo(i, t); + oo(i, e); + return this.r(i.buffer); + } + r(t) { + try { + this.l.send(t); + return t.byteLength; + } catch { + return 0; + } + } + s(t) { + const e = new pu(t); + const i = ao(e); + const s = ao(e); + const r = i[0]; + switch (r) { + case 200: + this.j?.logIncoming(t.byteLength, 0, 0, du(r)); + return this.t({ + type: i[0] + }); + case 201: + case 202: + case 204: + case 203: + this.j?.logIncoming(t.byteLength, i[1], 0, du(r), s); + return this.t({ + type: i[0], + id: i[1], + data: s + }); + } + } + t(t) { + if (t.type === 200) { + this.b = rn.Idle; + this.k.fire(); + return; + } + this.f.get(t.id)?.(t); + } + get onDidInitializePromise() { + return x.toPromise(this.onDidInitialize); + } + u() { + if (this.b === rn.Idle) { + return Promise.resolve(); + } else { + return this.onDidInitializePromise; + } + } + dispose() { + this.a = true; + if (this.h) { + this.h.dispose(); + this.h = null; + } + Et(this.d.values()); + this.d.clear(); + } + }; + __decorate([de], Xa.prototype, "onDidInitializePromise", null); + Bp = class { + get connections() { + const t = []; + this.f.forEach(e => t.push(e)); + return t; + } + constructor(t, e, i) { + this.a = new Map(); + this.f = new Set(); + this.g = new $(); + this.onDidAddConnection = this.g.event; + this.h = new $(); + this.onDidRemoveConnection = this.h.event; + this.j = new De(); + this.j.add(t(({ + protocol: s, + onDidClientDisconnect: r + }) => { + const n = x.once(s.onMessage); + this.j.add(n(o => { + const a = new pu(o); + const c = ao(a); + const l = new Up(s, c, e, i); + const u = new Xa(s, e); + this.a.forEach((f, p) => l.registerChannel(p, f)); + const d = { + channelServer: l, + channelClient: u, + ctx: c + }; + this.f.add(d); + this.g.fire(d); + this.j.add(r(() => { + l.dispose(); + u.dispose(); + this.f.delete(d); + this.h.fire(d); + })); + })); + })); + } + getChannel(t, e) { + const i = this; + return { + call(s, r, n) { + let o; + if (jw(e)) { + const c = JS(i.connections.filter(e)); + o = c ? Promise.resolve(c) : x.toPromise(x.filter(i.onDidAddConnection, e)); + } else { + o = e.routeCall(i, s, r); + } + const a = o.then(c => c.channelClient.getChannel(t)); + return fu(a).call(s, r, n); + }, + listen(s, r) { + if (jw(e)) { + return i.k(t, e, s, r); + } + const n = e.routeEvent(i, s, r).then(o => o.channelClient.getChannel(t)); + return fu(n).listen(s, r); + } + }; + } + k(t, e, i, s) { + const r = this; + let n; + const o = new $({ + onWillAddFirstListener: () => { + n = new De(); + const a = new Ww(); + const c = new Map(); + const l = d => { + const p = d.channelClient.getChannel(t).listen(i, s); + const w = a.add(p); + c.set(d, w); + }; + const u = d => { + const f = c.get(d); + if (f) { + f.dispose(); + c.delete(d); + } + }; + r.connections.filter(e).forEach(l); + x.filter(r.onDidAddConnection, e)(l, undefined, n); + r.onDidRemoveConnection(u, undefined, n); + a.event(o.fire, o, n); + n.add(a); + }, + onDidRemoveLastListener: () => { + n?.dispose(); + n = undefined; + } + }); + r.j.add(o); + return o.event; + } + registerChannel(t, e) { + this.a.set(t, e); + for (const i of this.f) { + i.channelServer.registerChannel(t, e); + } + } + dispose() { + this.j.dispose(); + for (const t of this.f) { + t.channelClient.dispose(); + t.channelServer.dispose(); + } + this.f.clear(); + this.a.clear(); + this.g.dispose(); + this.h.dispose(); + } + }; + qp = class { + constructor(t, e, i = null) { + const s = new gu(); + oo(s, e); + t.send(s.buffer); + this.a = new Xa(t, i); + this.d = new Up(t, e, i); + } + getChannel(t) { + return this.a.getChannel(t); + } + registerChannel(t, e) { + this.d.registerChannel(t, e); + } + dispose() { + this.a.dispose(); + this.d.dispose(); + } + }; + mb = class { + constructor(t) { + this.a = t; + } + routeCall(t) { + return this.b(t); + } + routeEvent(t) { + return this.b(t); + } + async b(t) { + for (const e of t.connections) { + if (await Promise.resolve(this.a(e.ctx))) { + return Promise.resolve(e); + } + } + await x.toPromise(t.onDidAddConnection); + return await this.b(t); + } + }; + (function (t) { + function e(n, o, a) { + const c = n; + const l = a && a.disableMarshalling; + const u = new Map(); + for (const d in c) { + if (s(d)) { + u.set(d, x.buffer(c[d], true, undefined, o)); + } + } + return new class { + listen(d, f, p) { + const w = u.get(f); + if (w) { + return w; + } + const m = c[f]; + if (typeof m == "function") { + if (r(f)) { + return m.call(c, p); + } + if (s(f)) { + u.set(f, x.buffer(c[f], true, undefined, o)); + return u.get(f); + } + } + throw new Vs(`Event not found: ${f}`); + } + call(d, f, p) { + const w = c[f]; + if (typeof w == "function") { + if (!l && Array.isArray(p)) { + for (let y = 0; y < p.length; y++) { + p[y] = Er(p[y]); + } + } + let m = w.apply(c, p); + if (!(m instanceof Promise)) { + m = Promise.resolve(m); + } + return m; + } + throw new Vs(`Method not found: ${f}`); + } + }(); + } + t.fromService = e; + function i(n, o) { + const a = o && o.disableMarshalling; + return new Proxy({}, { + get(c, l) { + if (typeof l == "string") { + if (o?.properties?.has(l)) { + return o.properties.get(l); + } else if (r(l)) { + return function (u) { + return n.listen(l, u); + }; + } else if (s(l)) { + return n.listen(l); + } else { + return async function (...u) { + let d; + if (o && !Qt(o.context)) { + d = [o.context, ...u]; + } else { + d = u; + } + const f = await n.call(l, d); + if (a) { + return f; + } else { + return Er(f); + } + }; + } + } + throw new Vs(`Property not found: ${String(l)}`); + } + }); + } + t.toService = i; + function s(n) { + return n[0] === "o" && n[1] === "n" && wv(n.charCodeAt(2)); + } + function r(n) { + return /^onDynamic/.test(n) && wv(n.charCodeAt(9)); + } + })(ze ||= {}); + } + }); + function Vk(t) { + return wb.test(t); + } + var wb; + var ti; + var _i = g({ + "out-build/vs/base/common/uuid.js"() { + "use strict"; + + wb = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i; + ti = function () { + if (typeof crypto == "object" && typeof crypto.randomUUID == "function") { + return crypto.randomUUID.bind(crypto); + } + let t; + if (typeof crypto == "object" && typeof crypto.getRandomValues == "function") { + t = crypto.getRandomValues.bind(crypto); + } else { + t = function (s) { + for (let r = 0; r < s.length; r++) { + s[r] = Math.floor(Math.random() * 256); + } + return s; + }; + } + const e = new Uint8Array(16); + const i = []; + for (let s = 0; s < 256; s++) { + i.push(s.toString(16).padStart(2, "0")); + } + return function () { + t(e); + e[6] = e[6] & 15 | 64; + e[8] = e[8] & 63 | 128; + let r = 0; + let n = ""; + n += i[e[r++]]; + n += i[e[r++]]; + n += i[e[r++]]; + n += i[e[r++]]; + n += "-"; + n += i[e[r++]]; + n += i[e[r++]]; + n += "-"; + n += i[e[r++]]; + n += i[e[r++]]; + n += "-"; + n += i[e[r++]]; + n += i[e[r++]]; + n += "-"; + n += i[e[r++]]; + n += i[e[r++]]; + n += i[e[r++]]; + n += i[e[r++]]; + n += i[e[r++]]; + n += i[e[r++]]; + return n; + }; + }(); + } + }); + function Dr() { + mu ||= z.alloc(0); + return mu; + } + function vb(t) { + switch (t) { + case 0: + return "None"; + case 1: + return "Regular"; + case 2: + return "Control"; + case 3: + return "Ack"; + case 5: + return "Disconnect"; + case 6: + return "ReplayRequest"; + case 7: + return "PauseWriting"; + case 8: + return "ResumeWriting"; + case 9: + return "KeepAlive"; + } + } + var bb; + var zp; + var yb; + var mu; + var Sb; + var Eb; + var kb; + var Zi; + var wu; + var vu; + var Hp; + var xb; + var co; + var Db; + var Pb; + var $b; + var Ib; + var Ab = g({ + "out-build/vs/base/parts/ipc/common/ipc.net.js"() { + "use strict"; + + Ze(); + B(); + M(); + xs(); + (function (t) { + t.Created = "created"; + t.Read = "read"; + t.Write = "write"; + t.Open = "open"; + t.Error = "error"; + t.Close = "close"; + t.BrowserWebSocketBlobReceived = "browserWebSocketBlobReceived"; + t.NodeEndReceived = "nodeEndReceived"; + t.NodeEndSent = "nodeEndSent"; + t.NodeDrainBegin = "nodeDrainBegin"; + t.NodeDrainEnd = "nodeDrainEnd"; + t.zlibInflateError = "zlibInflateError"; + t.zlibInflateData = "zlibInflateData"; + t.zlibInflateInitialWrite = "zlibInflateInitialWrite"; + t.zlibInflateInitialFlushFired = "zlibInflateInitialFlushFired"; + t.zlibInflateWrite = "zlibInflateWrite"; + t.zlibInflateFlushFired = "zlibInflateFlushFired"; + t.zlibDeflateError = "zlibDeflateError"; + t.zlibDeflateData = "zlibDeflateData"; + t.zlibDeflateWrite = "zlibDeflateWrite"; + t.zlibDeflateFlushFired = "zlibDeflateFlushFired"; + t.WebSocketNodeSocketWrite = "webSocketNodeSocketWrite"; + t.WebSocketNodeSocketPeekedHeader = "webSocketNodeSocketPeekedHeader"; + t.WebSocketNodeSocketReadHeader = "webSocketNodeSocketReadHeader"; + t.WebSocketNodeSocketReadData = "webSocketNodeSocketReadData"; + t.WebSocketNodeSocketUnmaskedData = "webSocketNodeSocketUnmaskedData"; + t.WebSocketNodeSocketDrainBegin = "webSocketNodeSocketDrainBegin"; + t.WebSocketNodeSocketDrainEnd = "webSocketNodeSocketDrainEnd"; + t.ProtocolHeaderRead = "protocolHeaderRead"; + t.ProtocolMessageRead = "protocolMessageRead"; + t.ProtocolHeaderWrite = "protocolHeaderWrite"; + t.ProtocolMessageWrite = "protocolMessageWrite"; + t.ProtocolWrite = "protocolWrite"; + })(bb ||= {}); + (function (t) { + t.enableDiagnostics = false; + t.records = []; + const e = new WeakMap(); + let i = 0; + function s(n, o) { + if (!e.has(n)) { + const a = String(++i); + e.set(n, a); + } + return e.get(n); + } + function r(n, o, a, c) { + if (!t.enableDiagnostics) { + return; + } + const l = s(n, o); + if (c instanceof z || c instanceof Uint8Array || c instanceof ArrayBuffer || ArrayBuffer.isView(c)) { + const u = z.alloc(c.byteLength); + u.set(c); + t.records.push({ + timestamp: Date.now(), + id: l, + label: o, + type: a, + buff: u + }); + } else { + t.records.push({ + timestamp: Date.now(), + id: l, + label: o, + type: a, + data: c + }); + } + } + t.traceSocketEvent = r; + })(zp ||= {}); + (function (t) { + t[t.NodeSocketCloseEvent = 0] = "NodeSocketCloseEvent"; + t[t.WebSocketCloseEvent = 1] = "WebSocketCloseEvent"; + })(yb ||= {}); + mu = null; + Sb = class { + get byteLength() { + return this.b; + } + constructor() { + this.a = []; + this.b = 0; + } + acceptChunk(t) { + this.a.push(t); + this.b += t.byteLength; + } + read(t) { + return this.c(t, true); + } + peek(t) { + return this.c(t, false); + } + c(t, e) { + if (t === 0) { + return Dr(); + } + if (t > this.b) { + throw new Error("Cannot read so many bytes!"); + } + if (this.a[0].byteLength === t) { + const n = this.a[0]; + if (e) { + this.a.shift(); + this.b -= t; + } + return n; + } + if (this.a[0].byteLength > t) { + const n = this.a[0].slice(0, t); + if (e) { + this.a[0] = this.a[0].slice(t); + this.b -= t; + } + return n; + } + const i = z.alloc(t); + let s = 0; + let r = 0; + while (t > 0) { + const n = this.a[r]; + if (n.byteLength > t) { + const o = n.slice(0, t); + i.set(o, s); + s += t; + if (e) { + this.a[r] = n.slice(t); + this.b -= t; + } + t -= t; + } else { + i.set(n, s); + s += n.byteLength; + if (e) { + this.a.shift(); + this.b -= n.byteLength; + } else { + r++; + } + t -= n.byteLength; + } + } + return i; + } + }; + (function (t) { + t[t.None = 0] = "None"; + t[t.Regular = 1] = "Regular"; + t[t.Control = 2] = "Control"; + t[t.Ack = 3] = "Ack"; + t[t.Disconnect = 5] = "Disconnect"; + t[t.ReplayRequest = 6] = "ReplayRequest"; + t[t.Pause = 7] = "Pause"; + t[t.Resume = 8] = "Resume"; + t[t.KeepAlive = 9] = "KeepAlive"; + })(Eb ||= {}); + (function (t) { + t[t.HeaderLength = 13] = "HeaderLength"; + t[t.AcknowledgeTime = 2000] = "AcknowledgeTime"; + t[t.TimeoutTime = 20000] = "TimeoutTime"; + t[t.ReconnectionGraceTime = 10800000] = "ReconnectionGraceTime"; + t[t.ReconnectionShortGraceTime = 300000] = "ReconnectionShortGraceTime"; + t[t.KeepAliveSendTime = 5000] = "KeepAliveSendTime"; + })(kb ||= {}); + Zi = class { + constructor(t, e, i, s) { + this.type = t; + this.id = e; + this.ack = i; + this.data = s; + this.writtenTime = 0; + } + get size() { + return this.data.byteLength; + } + }; + wu = class extends T { + constructor(t) { + super(); + this.f = this.D(new $()); + this.onMessage = this.f.event; + this.g = { + readHead: true, + readLen: 13, + messageType: 0, + id: 0, + ack: 0 + }; + this.a = t; + this.b = false; + this.c = new Sb(); + this.D(this.a.onData(e => this.acceptChunk(e))); + this.lastReadTime = Date.now(); + } + acceptChunk(t) { + if (!!t && t.byteLength !== 0) { + this.lastReadTime = Date.now(); + this.c.acceptChunk(t); + while (this.c.byteLength >= this.g.readLen) { + const e = this.c.read(this.g.readLen); + if (this.g.readHead) { + this.g.readHead = false; + this.g.readLen = e.readUInt32BE(9); + this.g.messageType = e.readUInt8(0); + this.g.id = e.readUInt32BE(1); + this.g.ack = e.readUInt32BE(5); + this.a.traceSocketEvent("protocolHeaderRead", { + messageType: vb(this.g.messageType), + id: this.g.id, + ack: this.g.ack, + messageSize: this.g.readLen + }); + } else { + const i = this.g.messageType; + const s = this.g.id; + const r = this.g.ack; + this.g.readHead = true; + this.g.readLen = 13; + this.g.messageType = 0; + this.g.id = 0; + this.g.ack = 0; + this.a.traceSocketEvent("protocolMessageRead", e); + this.f.fire(new Zi(i, s, r, e)); + if (this.b) { + break; + } + } + } + } + } + readEntireBuffer() { + return this.c.read(this.c.byteLength); + } + dispose() { + this.b = true; + super.dispose(); + } + }; + vu = class { + constructor(t) { + this.k = null; + this.a = false; + this.b = false; + this.c = t; + this.d = []; + this.f = 0; + this.lastWriteTime = 0; + } + dispose() { + try { + this.flush(); + } catch {} + this.a = true; + } + drain() { + this.flush(); + return this.c.drain(); + } + flush() { + this.m(); + } + pause() { + this.b = true; + } + resume() { + this.b = false; + this.l(); + } + write(t) { + if (this.a) { + return; + } + t.writtenTime = Date.now(); + this.lastWriteTime = Date.now(); + const e = z.alloc(13); + e.writeUInt8(t.type, 0); + e.writeUInt32BE(t.id, 1); + e.writeUInt32BE(t.ack, 5); + e.writeUInt32BE(t.data.byteLength, 9); + this.c.traceSocketEvent("protocolHeaderWrite", { + messageType: vb(t.type), + id: t.id, + ack: t.ack, + messageSize: t.data.byteLength + }); + this.c.traceSocketEvent("protocolMessageWrite", t.data); + this.j(e, t.data); + } + g(t, e) { + const i = this.f === 0; + this.d.push(t, e); + this.f += t.byteLength + e.byteLength; + return i; + } + h() { + const t = z.concat(this.d, this.f); + this.d.length = 0; + this.f = 0; + return t; + } + j(t, e) { + if (this.g(t, e)) { + this.l(); + } + } + l() { + this.k ||= setTimeout(() => { + this.k = null; + this.m(); + }); + } + m() { + if (this.f === 0 || this.b) { + return; + } + const t = this.h(); + this.c.traceSocketEvent("protocolWrite", { + byteLength: t.byteLength + }); + this.c.write(t); + } + }; + Hp = class extends T { + constructor(t) { + super(); + this.f = new $(); + this.onMessage = this.f.event; + this.g = new $(); + this.onDidDispose = this.g.event; + this.a = t; + this.b = this.D(new vu(this.a)); + this.c = this.D(new wu(this.a)); + this.D(this.c.onMessage(e => { + if (e.type === 1) { + this.f.fire(e.data); + } + })); + this.D(this.a.onClose(() => this.g.fire())); + } + drain() { + return this.b.drain(); + } + getSocket() { + return this.a; + } + sendDisconnect() {} + send(t) { + this.b.write(new Zi(1, 0, 0, t)); + } + }; + xb = class W3 extends qp { + static fromSocket(e, i) { + return new W3(new Hp(e), i); + } + get onDidDispose() { + return this.b.onDidDispose; + } + constructor(e, i, s = null) { + super(e, i, s); + this.b = e; + } + dispose() { + super.dispose(); + const e = this.b.getSocket(); + this.b.sendDisconnect(); + this.b.dispose(); + e.end(); + } + }; + co = class { + constructor() { + this.b = false; + this.c = false; + this.d = []; + this.a = new $({ + onWillAddFirstListener: () => { + this.b = true; + queueMicrotask(() => this.f()); + }, + onDidRemoveLastListener: () => { + this.b = false; + } + }); + this.event = this.a.event; + } + f() { + if (!this.c) { + for (this.c = true; this.b && this.d.length > 0;) { + this.a.fire(this.d.shift()); + } + this.c = false; + } + } + fire(t) { + if (this.b) { + if (this.d.length > 0) { + this.d.push(t); + } else { + this.a.fire(t); + } + } else { + this.d.push(t); + } + } + flushBuffer() { + this.d = []; + } + }; + Db = class { + constructor(t) { + this.data = t; + this.next = null; + } + }; + Pb = class { + constructor() { + this.a = null; + this.b = null; + } + length() { + let t = 0; + let e = this.a; + while (e) { + e = e.next; + t++; + } + return t; + } + peek() { + if (this.a) { + return this.a.data; + } else { + return null; + } + } + toArray() { + const t = []; + let e = 0; + let i = this.a; + while (i) { + t[e++] = i.data; + i = i.next; + } + return t; + } + pop() { + if (this.a) { + if (this.a === this.b) { + this.a = null; + this.b = null; + return; + } + this.a = this.a.next; + } + } + push(t) { + const e = new Db(t); + if (!this.a) { + this.a = e; + this.b = e; + return; + } + this.b.next = e; + this.b = e; + } + }; + $b = class js { + static { + this.a = 10; + } + static { + this.b = null; + } + static getInstance() { + js.b ||= new js(); + return js.b; + } + constructor() { + this.c = []; + const e = Date.now(); + for (let i = 0; i < js.a; i++) { + this.c[i] = e - i * 1000; + } + setInterval(() => { + for (let i = js.a; i >= 1; i--) { + this.c[i] = this.c[i - 1]; + } + this.c[0] = Date.now(); + }, 1000); + } + d() { + const e = Date.now(); + const i = (1 + js.a) * 1000; + let s = 0; + for (let r = 0; r < js.a; r++) { + if (e - this.c[r] <= i) { + s++; + } + } + return 1 - s / js.a; + } + hasHighLoad() { + return this.d() >= 0.5; + } + }; + Ib = class { + get unacknowledgedCount() { + return this.d - this.f; + } + constructor(t) { + this.v = new co(); + this.onControlMessage = this.v.event; + this.w = new co(); + this.onMessage = this.w.event; + this.x = new co(); + this.onDidDispose = this.x.event; + this.y = new co(); + this.onSocketClose = this.y.event; + this.z = new co(); + this.onSocketTimeout = this.z.event; + this.t = t.loadEstimator ?? $b.getInstance(); + this.u = t.sendKeepAlive ?? true; + this.a = false; + this.c = new Pb(); + this.d = 0; + this.f = 0; + this.g = null; + this.h = 0; + this.j = 0; + this.k = 0; + this.l = null; + this.n = 0; + this.o = Date.now(); + this.s = new De(); + this.p = t.socket; + this.q = this.s.add(new vu(this.p)); + this.r = this.s.add(new wu(this.p)); + this.s.add(this.r.onMessage(e => this.A(e))); + this.s.add(this.p.onClose(e => this.y.fire(e))); + if (t.initialChunk) { + this.r.acceptChunk(t.initialChunk); + } + if (this.u) { + this.m = setInterval(() => { + this.E(); + }, 5000); + } else { + this.m = null; + } + } + dispose() { + if (this.g) { + clearTimeout(this.g); + this.g = null; + } + if (this.l) { + clearTimeout(this.l); + this.l = null; + } + if (this.m) { + clearInterval(this.m); + this.m = null; + } + this.s.dispose(); + } + drain() { + return this.q.drain(); + } + sendDisconnect() { + if (!this.b) { + this.b = true; + const t = new Zi(5, 0, 0, Dr()); + this.q.write(t); + this.q.flush(); + } + } + sendPause() { + const t = new Zi(7, 0, 0, Dr()); + this.q.write(t); + } + sendResume() { + const t = new Zi(8, 0, 0, Dr()); + this.q.write(t); + } + pauseSocketWriting() { + this.q.pause(); + } + getSocket() { + return this.p; + } + getMillisSinceLastIncomingData() { + return Date.now() - this.r.lastReadTime; + } + beginAcceptReconnection(t, e) { + this.a = true; + this.s.dispose(); + this.s = new De(); + this.v.flushBuffer(); + this.y.flushBuffer(); + this.z.flushBuffer(); + this.p.dispose(); + this.n = 0; + this.o = Date.now(); + this.p = t; + this.q = this.s.add(new vu(this.p)); + this.r = this.s.add(new wu(this.p)); + this.s.add(this.r.onMessage(i => this.A(i))); + this.s.add(this.p.onClose(i => this.y.fire(i))); + this.r.acceptChunk(e); + } + endAcceptReconnection() { + this.a = false; + this.j = this.h; + const t = new Zi(3, 0, this.j, Dr()); + this.q.write(t); + const e = this.c.toArray(); + for (let i = 0, s = e.length; i < s; i++) { + this.q.write(e[i]); + } + this.C(); + } + acceptDisconnect() { + this.x.fire(); + } + A(t) { + if (t.ack > this.f) { + this.f = t.ack; + do { + const e = this.c.peek(); + if (e && e.id <= t.ack) { + this.c.pop(); + } else { + break; + } + } while (true); + } + switch (t.type) { + case 0: + break; + case 1: + { + if (t.id > this.h) { + if (t.id !== this.h + 1) { + const e = Date.now(); + if (e - this.n > 10000) { + this.n = e; + this.q.write(new Zi(6, 0, 0, Dr())); + } + } else { + this.h = t.id; + this.k = Date.now(); + this.B(); + this.w.fire(t.data); + } + } + break; + } + case 2: + { + this.v.fire(t.data); + break; + } + case 3: + break; + case 5: + { + this.x.fire(); + break; + } + case 6: + { + const e = this.c.toArray(); + for (let i = 0, s = e.length; i < s; i++) { + this.q.write(e[i]); + } + this.C(); + break; + } + case 7: + { + this.q.pause(); + break; + } + case 8: + { + this.q.resume(); + break; + } + case 9: + break; + } + } + readEntireBuffer() { + return this.r.readEntireBuffer(); + } + flush() { + this.q.flush(); + } + send(t) { + const e = ++this.d; + this.j = this.h; + const i = new Zi(1, e, this.j, t); + this.c.push(i); + if (!this.a) { + this.q.write(i); + this.C(); + } + } + sendControl(t) { + const e = new Zi(2, 0, 0, t); + this.q.write(e); + } + B() { + if (this.h <= this.j || this.l) { + return; + } + const t = Date.now() - this.k; + if (t >= 2000) { + this.D(); + return; + } + this.l = setTimeout(() => { + this.l = null; + this.B(); + }, 2000 - t + 5); + } + C() { + if (this.d <= this.f || this.g || this.a) { + return; + } + const t = this.c.peek(); + const e = Date.now() - t.writtenTime; + const i = Date.now() - this.r.lastReadTime; + const s = Date.now() - this.o; + if (e >= 20000 && i >= 20000 && s >= 20000 && !this.t.hasHighLoad()) { + this.o = Date.now(); + this.z.fire({ + unacknowledgedMsgCount: this.c.length(), + timeSinceOldestUnacknowledgedMsg: e, + timeSinceLastReceivedSomeData: i + }); + return; + } + const r = Math.max(20000 - e, 20000 - i, 20000 - s, 500); + this.g = setTimeout(() => { + this.g = null; + this.C(); + }, r); + } + D() { + if (this.h <= this.j) { + return; + } + this.j = this.h; + const t = new Zi(3, 0, this.j, Dr()); + this.q.write(t); + } + E() { + this.j = this.h; + const t = new Zi(9, 0, this.j, Dr()); + this.q.write(t); + } + }; + } + }); + import { createHash as Gk } from "crypto"; + import { createServer as Jk, createConnection as Kk } from "net"; + import "os"; + import "zlib"; + function Zk(t, e, i) { + const r = Gk("sha256").update(t).digest("hex").substr(0, 8); + if (process.platform === "win32") { + return `\\\\.\\pipe\\${r}-${i}-${e}-sock`; + } + const n = i.substr(0, 4); + const o = e.substr(0, 6); + let a; + if (process.platform !== "darwin" && bu && !process.env.VSCODE_PORTABLE) { + a = F(bu, `vscode-${r}-${n}-${o}.sock`); + } else { + a = F(t, `${n}-${o}.sock`); + } + Yk(a); + return a; + } + function Yk(t) { + const e = Ob[Ea]; + if (typeof e == "number" && t.length >= e) { + console.warn(`WARNING: IPC handle "${t}" is longer than ${e} chars, try a shorter --user-data-dir`); + } + } + function Xk(t) { + return new Promise((e, i) => { + const s = Jk(); + s.on("error", i); + s.listen(t, () => { + s.removeListener("error", i); + e(new Lb(s)); + }); + }); + } + function Qk(t, e) { + return new Promise((i, s) => { + const r = Kk(t, () => { + r.removeListener("error", s); + i(xb.fromSocket(new Qa(r, `ipc-client${e}`), e)); + }); + r.once("error", s); + }); + } + var Cb; + var Qa; + var _b; + var Rb; + var bu; + var Ob; + var Lb; + var Vp = g({ + "out-build/vs/base/parts/ipc/node/ipc.net.js"() { + "use strict"; + + Ze(); + $e(); + B(); + M(); + we(); + H(); + _i(); + xs(); + Ab(); + Cb = 30000; + Qa = class { + traceSocketEvent(t, e) { + zp.traceSocketEvent(this.socket, this.debugLabel, t, e); + } + constructor(t, e = "") { + this.f = true; + this.debugLabel = e; + this.socket = t; + this.traceSocketEvent("created", { + type: "NodeSocket" + }); + this.a = s => { + this.traceSocketEvent("error", { + code: s?.code, + message: s?.message + }); + if (s) { + if (s.code === "EPIPE") { + return; + } + Ft(s); + } + }; + this.socket.on("error", this.a); + let i; + this.b = s => { + this.traceSocketEvent("close", { + hadError: s + }); + this.f = false; + if (i) { + clearTimeout(i); + } + }; + this.socket.on("close", this.b); + this.d = () => { + this.traceSocketEvent("nodeEndReceived"); + this.f = false; + i = setTimeout(() => t.destroy(), Cb); + }; + this.socket.on("end", this.d); + } + dispose() { + this.socket.off("error", this.a); + this.socket.off("close", this.b); + this.socket.off("end", this.d); + this.socket.destroy(); + } + onData(t) { + const e = i => { + this.traceSocketEvent("read", i); + t(z.wrap(i)); + }; + this.socket.on("data", e); + return { + dispose: () => this.socket.off("data", e) + }; + } + onClose(t) { + const e = i => { + t({ + type: 0, + hadError: i, + error: undefined + }); + }; + this.socket.on("close", e); + return { + dispose: () => this.socket.off("close", e) + }; + } + onEnd(t) { + const e = () => { + t(); + }; + this.socket.on("end", e); + return { + dispose: () => this.socket.off("end", e) + }; + } + write(t) { + if (!this.socket.destroyed && !!this.f) { + try { + this.traceSocketEvent("write", t); + this.socket.write(t.buffer, e => { + if (e) { + if (e.code === "EPIPE") { + return; + } + Ft(e); + } + }); + } catch (e) { + if (e.code === "EPIPE") { + return; + } + Ft(e); + } + } + } + end() { + this.traceSocketEvent("nodeEndSent"); + this.socket.end(); + } + drain() { + this.traceSocketEvent("nodeDrainBegin"); + return new Promise((t, e) => { + if (this.socket.bufferSize === 0) { + this.traceSocketEvent("nodeDrainEnd"); + t(); + return; + } + const i = () => { + this.socket.off("close", i); + this.socket.off("end", i); + this.socket.off("error", i); + this.socket.off("timeout", i); + this.socket.off("drain", i); + this.traceSocketEvent("nodeDrainEnd"); + t(); + }; + this.socket.on("close", i); + this.socket.on("end", i); + this.socket.on("error", i); + this.socket.on("timeout", i); + this.socket.on("drain", i); + }); + } + }; + (function (t) { + t[t.MinHeaderByteSize = 2] = "MinHeaderByteSize"; + t[t.MaxWebSocketMessageLength = 262144] = "MaxWebSocketMessageLength"; + })(_b ||= {}); + (function (t) { + t[t.PeekHeader = 1] = "PeekHeader"; + t[t.ReadHeader = 2] = "ReadHeader"; + t[t.ReadBody = 3] = "ReadBody"; + t[t.Fin = 4] = "Fin"; + })(Rb ||= {}); + bu = process.env.XDG_RUNTIME_DIR; + Ob = { + 2: 107, + 1: 103 + }; + Lb = class T3 extends Bp { + static b(e) { + const i = x.fromNodeEventEmitter(e, "connection"); + return x.map(i, s => ({ + protocol: new Hp(new Qa(s, "ipc-server-connection")), + onDidClientDisconnect: x.once(x.fromNodeEventEmitter(s, "close")) + })); + } + constructor(e) { + super(T3.b(e)); + this.d = e; + } + dispose() { + super.dispose(); + if (this.d) { + this.d.close(); + this.d = null; + } + } + }; + } + }); + import ec from "electron"; + var Mb; + var it; + var as = g({ + "out-build/vs/base/parts/ipc/electron-main/ipcMain.js"() { + "use strict"; + + $e(); + Ie(); + Mb = class { + constructor() { + this.a = new WeakMap(); + } + on(t, e) { + const i = (s, ...r) => { + if (this.b(t, s)) { + e(s, ...r); + } + }; + this.a.set(e, i); + ec.ipcMain.on(t, i); + return this; + } + once(t, e) { + ec.ipcMain.once(t, (i, ...s) => { + if (this.b(t, i)) { + e(i, ...s); + } + }); + return this; + } + handle(t, e) { + ec.ipcMain.handle(t, (i, ...s) => this.b(t, i) ? e(i, ...s) : Promise.reject(`Invalid channel '${t}' or sender for ipcMain.handle() usage.`)); + return this; + } + removeHandler(t) { + ec.ipcMain.removeHandler(t); + return this; + } + removeListener(t, e) { + const i = this.a.get(e); + if (i) { + ec.ipcMain.removeListener(t, i); + this.a.delete(e); + } + return this; + } + b(t, e) { + if (!t || !t.startsWith("vscode:") && !t.startsWith("cursor:")) { + Ft(`Refused to handle ipcMain event for channel '${t}' because the channel is unknown.`); + return false; + } + const i = e.senderFrame; + const s = i?.url; + if (!s || s === "about:blank") { + return true; + } + let r = "unknown"; + try { + r = new URL(s).host; + } catch { + Ft(`Refused to handle ipcMain event for channel '${t}' because of a malformed URL '${s}'.`); + return false; + } + if (r !== za) { + Ft(`Refused to handle ipcMain event for channel '${t}' because of a bad origin of '${r}'.`); + return false; + } else if (i?.parent !== null) { + Ft(`Refused to handle ipcMain event for channel '${t}' because sender of origin '${r}' is not a main frame.`); + return false; + } else { + return true; + } + } + }; + it = new Mb(); + } + }); + var Fb; + var Nb; + var ex = g({ + "out-build/vs/base/parts/contextmenu/common/contextmenu.js"() { + "use strict"; + + Fb = "vscode:contextmenu"; + Nb = "vscode:onCloseContextMenu"; + } + }); + import { Menu as tx, MenuItem as Gp, BrowserWindow as ix } from "electron"; + function sx() { + it.on(Fb, (t, e, i, s, r) => { + const n = Wb(t, s, i); + let o = r ? r.x : undefined; + let a = r ? r.y : undefined; + if (typeof o == "number" && typeof a == "number") { + try { + const c = ix.fromWebContents(t.sender); + if (c && c.contentView?.children) { + for (const l of c.contentView.children) { + if (l?.webContents?.id === t.sender.id && typeof l.getBounds == "function") { + const u = l.getBounds(); + o += u.x; + a += u.y; + break; + } + } + } + } catch {} + } + n.popup({ + x: o, + y: a, + positioningItem: r ? r.positioningItem : undefined, + callback: () => { + if (n) { + t.sender.send(Nb, e); + } + } + }); + }); + } + function Wb(t, e, i) { + const s = new tx(); + i.forEach(r => { + let n; + if (r.type === "separator") { + n = new Gp({ + type: r.type + }); + } else if (Array.isArray(r.submenu)) { + n = new Gp({ + submenu: Wb(t, e, r.submenu), + label: r.label + }); + } else { + n = new Gp({ + label: r.label, + type: r.type, + accelerator: r.accelerator, + checked: r.checked, + enabled: r.enabled, + visible: r.visible, + click: (o, a, c) => t.sender.send(e, r.id, c) + }); + } + s.append(n); + }); + return s; + } + var rx = g({ + "out-build/vs/base/parts/contextmenu/electron-main/contextmenu.js"() { + "use strict"; + + as(); + ex(); + } + }); + var Tb; + var nx = g({ + "out-build/vs/base/parts/ipc/common/ipc.electron.js"() { + "use strict"; + + Tb = class { + constructor(t, e) { + this.a = t; + this.onMessage = e; + } + send(t) { + try { + this.a.send("vscode:message", t.buffer); + } catch {} + } + disconnect() { + this.a.send("vscode:disconnect", null); + } + }; + } + }); + function jb(t, e) { + const i = x.fromNodeEventEmitter(it, e, (r, n) => ({ + event: r, + message: n + })); + const s = x.filter(i, ({ + event: r + }) => r.sender.id === t); + return x.map(s, ({ + message: r + }) => r && z.wrap(r)); + } + var Ub; + var ox = g({ + "out-build/vs/base/parts/ipc/electron-main/ipc.electron.js"() { + "use strict"; + + as(); + Ze(); + B(); + M(); + xs(); + nx(); + Ub = class kf extends Bp { + static { + this.b = new Map(); + } + static d() { + const e = x.fromNodeEventEmitter(it, "vscode:hello", ({ + sender: i + }) => i); + return x.map(e, i => { + const s = i.id; + kf.b.get(s)?.dispose(); + const n = new $(); + kf.b.set(s, xe(() => n.fire())); + const o = jb(s, "vscode:message"); + const a = x.any(x.signal(jb(s, "vscode:disconnect")), n.event); + return { + protocol: new Tb(i, o), + onDidClientDisconnect: a + }; + }); + } + constructor() { + super(kf.d()); + } + }; + } + }); + var Bb; + var qb; + var ax = g({ + "out-build/vs/base/parts/ipc/common/ipc.mp.js"() { + "use strict"; + + Ze(); + B(); + xs(); + Bb = class { + constructor(t) { + this.a = t; + this.onMessage = x.fromDOMEventEmitter(this.a, "message", e => e.data ? z.wrap(e.data) : z.alloc(0)); + t.start(); + } + send(t) { + this.a.postMessage(t.buffer); + } + disconnect() { + this.a.close(); + } + }; + qb = class extends qp { + constructor(t, e) { + const i = new Bb(t); + super(i, e); + this.b = i; + } + dispose() { + this.b.disconnect(); + super.dispose(); + } + }; + } + }); + var Jp; + var zb = g({ + "out-build/vs/base/parts/ipc/electron-main/ipc.mp.js"() { + "use strict"; + + as(); + B(); + _i(); + ax(); + Jp = class extends qb { + constructor(t, e) { + super({ + addEventListener: (i, s) => t.addListener(i, s), + removeEventListener: (i, s) => t.removeListener(i, s), + postMessage: i => t.postMessage(i), + start: () => t.start(), + close: () => t.close() + }, e); + } + }; + } + }); + function Ds(t) { + return Kp(t, 0); + } + function Kp(t, e) { + switch (typeof t) { + case "object": + if (t === null) { + return Qs(349, e); + } else if (Array.isArray(t)) { + return lx(t, e); + } else { + return ux(t, e); + } + case "string": + return Hb(t, e); + case "boolean": + return cx(t, e); + case "number": + return Qs(t, e); + case "undefined": + return Qs(937, e); + default: + return Qs(617, e); + } + } + function Qs(t, e) { + return (e << 5) - e + t | 0; + } + function cx(t, e) { + return Qs(t ? 433 : 863, e); + } + function Hb(t, e) { + e = Qs(149417, e); + for (let i = 0, s = t.length; i < s; i++) { + e = Qs(t.charCodeAt(i), e); + } + return e; + } + function lx(t, e) { + e = Qs(104579, e); + return t.reduce((i, s) => Kp(s, i), e); + } + function ux(t, e) { + e = Qs(181387, e); + return Object.keys(t).sort().reduce((i, s) => { + i = Hb(s, i); + return Kp(t[s], i); + }, e); + } + function Zp(t, e, i = 32) { + const s = i - e; + const r = ~((1 << s) - 1); + return (t << e | (r & t) >>> s) >>> 0; + } + function tc(t, e = 32) { + if (t instanceof ArrayBuffer) { + return Array.from(new Uint8Array(t)).map(i => i.toString(16).padStart(2, "0")).join(""); + } else { + return (t >>> 0).toString(16).padStart(e / 4, "0"); + } + } + var Vb; + var hx; + var er = g({ + "out-build/vs/base/common/hash.js"() { + "use strict"; + + Ze(); + Wt(); + (function (t) { + t[t.BLOCK_SIZE = 64] = "BLOCK_SIZE"; + t[t.UNICODE_REPLACEMENT = 65533] = "UNICODE_REPLACEMENT"; + })(Vb ||= {}); + hx = class j3 { + static { + this.g = new DataView(new ArrayBuffer(320)); + } + constructor() { + this.h = 1732584193; + this.l = 4023233417; + this.m = 2562383102; + this.n = 271733878; + this.o = 3285377520; + this.p = new Uint8Array(67); + this.q = new DataView(this.p.buffer); + this.r = 0; + this.t = 0; + this.u = 0; + this.v = false; + } + update(e) { + const i = e.length; + if (i === 0) { + return; + } + const s = this.p; + let r = this.r; + let n = this.u; + let o; + let a; + for (n !== 0 ? (o = n, a = -1, n = 0) : (o = e.charCodeAt(0), a = 0);;) { + let c = o; + if (ME(o)) { + if (a + 1 < i) { + const l = e.charCodeAt(a + 1); + if (vv(l)) { + a++; + c = FE(o, l); + } else { + c = 65533; + } + } else { + n = o; + break; + } + } else if (vv(o)) { + c = 65533; + } + r = this.w(s, r, c); + a++; + if (a < i) { + o = e.charCodeAt(a); + } else { + break; + } + } + this.r = r; + this.u = n; + } + w(e, i, s) { + if (s < 128) { + e[i++] = s; + } else if (s < 2048) { + e[i++] = (s & 1984) >>> 6 | 192; + e[i++] = (s & 63) >>> 0 | 128; + } else if (s < 65536) { + e[i++] = (s & 61440) >>> 12 | 224; + e[i++] = (s & 4032) >>> 6 | 128; + e[i++] = (s & 63) >>> 0 | 128; + } else { + e[i++] = (s & 1835008) >>> 18 | 240; + e[i++] = (s & 258048) >>> 12 | 128; + e[i++] = (s & 4032) >>> 6 | 128; + e[i++] = (s & 63) >>> 0 | 128; + } + if (i >= 64) { + this.y(); + i -= 64; + this.t += 64; + e[0] = e[64]; + e[1] = e[65]; + e[2] = e[66]; + } + return i; + } + digest() { + if (!this.v) { + this.v = true; + if (this.u) { + this.u = 0; + this.r = this.w(this.p, this.r, 65533); + } + this.t += this.r; + this.x(); + } + return tc(this.h) + tc(this.l) + tc(this.m) + tc(this.n) + tc(this.o); + } + x() { + this.p[this.r++] = 128; + this.p.subarray(this.r).fill(0); + if (this.r > 56) { + this.y(); + this.p.fill(0); + } + const e = this.t * 8; + this.q.setUint32(56, Math.floor(e / 4294967296), false); + this.q.setUint32(60, e % 4294967296, false); + this.y(); + } + y() { + const e = j3.g; + const i = this.q; + for (let d = 0; d < 64; d += 4) { + e.setUint32(d, i.getUint32(d, false), false); + } + for (let d = 64; d < 320; d += 4) { + e.setUint32(d, Zp(e.getUint32(d - 12, false) ^ e.getUint32(d - 32, false) ^ e.getUint32(d - 56, false) ^ e.getUint32(d - 64, false), 1), false); + } + let s = this.h; + let r = this.l; + let n = this.m; + let o = this.n; + let a = this.o; + let c; + let l; + let u; + for (let d = 0; d < 80; d++) { + if (d < 20) { + c = r & n | ~r & o; + l = 1518500249; + } else if (d < 40) { + c = r ^ n ^ o; + l = 1859775393; + } else if (d < 60) { + c = r & n | r & o | n & o; + l = 2400959708; + } else { + c = r ^ n ^ o; + l = 3395469782; + } + u = Zp(s, 5) + c + a + l + e.getUint32(d * 4, false) & -1; + a = o; + o = n; + n = Zp(r, 30); + r = s; + s = u; + } + this.h = this.h + s & -1; + this.l = this.l + r & -1; + this.m = this.m + n & -1; + this.n = this.n + o & -1; + this.o = this.o + a & -1; + } + }; + } + }); + var dx; + var yu; + var Gb; + var Jb; + var Kb = g({ + "out-build/vs/platform/encryption/common/encryptionService.js"() { + "use strict"; + + Y(); + dx = q("encryptionService"); + yu = q("encryptionMainService"); + (function (t) { + t.kwallet = "kwallet"; + t.kwallet5 = "kwallet5"; + t.gnomeLibsecret = "gnome-libsecret"; + t.basic = "basic"; + })(Gb ||= {}); + (function (t) { + t.unknown = "unknown"; + t.basicText = "basic_text"; + t.gnomeAny = "gnome_any"; + t.gnomeLibsecret = "gnome_libsecret"; + t.gnomeKeyring = "gnome_keyring"; + t.kwallet = "kwallet"; + t.kwallet5 = "kwallet5"; + t.kwallet6 = "kwallet6"; + t.dplib = "dpapi"; + t.keychainAccess = "keychain_access"; + })(Jb ||= {}); + } + }); + var Yi; + var tr; + var Ri = g({ + "out-build/vs/platform/environment/common/environment.js"() { + "use strict"; + + Y(); + Yi = q("environmentService"); + tr = Yi; + } + }); + function fx(t) { + return t.getFullYear() + "-" + String(t.getMonth() + 1).padStart(2, "0") + "-" + String(t.getDate()).padStart(2, "0") + "T" + String(t.getHours()).padStart(2, "0") + ":" + String(t.getMinutes()).padStart(2, "0") + ":" + String(t.getSeconds()).padStart(2, "0") + "." + (t.getMilliseconds() / 1000).toFixed(3).slice(2, 5) + "Z"; + } + var Zb; + var Yb; + var Su; + var px; + var gx; + var mx; + var wx = g({ + "out-build/vs/base/common/date.js"() { + "use strict"; + + be(); + H(); + Zb = 60; + Yb = Zb * 60; + Su = Yb * 24; + px = Su * 7; + gx = Su * 30; + mx = Su * 365; + } + }); + function vx(t, e) { + return Yp(t["inspect-extensions"], t["inspect-brk-extensions"], 5870, e, t.debugId, t.extensionEnvironment); + } + function Yp(t, e, i, s, r, n) { + const a = Number(e || t) || (s ? null : i); + const c = a ? !!e : false; + let l; + if (n) { + try { + l = JSON.parse(n); + } catch {} + } + return { + port: a, + break: c, + debugId: r, + env: l + }; + } + var Xp; + var Me; + var bx = g({ + "out-build/vs/platform/environment/common/environmentService.js"() { + "use strict"; + + wx(); + sn(); + Ie(); + we(); + ys(); + nt(); + se(); + Xp = /^([^.]+\..+)[:=](.+)$/; + Me = class { + get appRoot() { + return Xe(Ct.asFileUri("").fsPath); + } + get userHome() { + return P.file(this.b.homeDir); + } + get userDataPath() { + return this.b.userDataDir; + } + get appSettingsHome() { + return P.file(F(this.userDataPath, "User")); + } + get tmpDir() { + return P.file(this.b.tmpDir); + } + get cacheHome() { + return P.file(this.userDataPath); + } + get stateResource() { + return he(this.appSettingsHome, "globalStorage", "storage.json"); + } + get userRoamingDataHome() { + return this.appSettingsHome.with({ + scheme: R.vscodeUserData + }); + } + get userDataSyncHome() { + return he(this.appSettingsHome, "sync"); + } + get logsHome() { + if (!this.args.logsPath) { + const t = fx(new Date()).replace(/-|:|\.\d+Z$/g, ""); + this.args.logsPath = F(this.userDataPath, "logs", t); + } + return P.file(this.args.logsPath); + } + get sync() { + return this.args.sync; + } + get machineSettingsResource() { + return he(P.file(F(this.userDataPath, "Machine")), "settings.json"); + } + get workspaceStorageHome() { + return he(this.appSettingsHome, "workspaceStorage"); + } + get localHistoryHome() { + return he(this.appSettingsHome, "History"); + } + get keyboardLayoutResource() { + return he(this.userRoamingDataHome, "keyboardLayout.json"); + } + get argvResource() { + const t = Ii.VSCODE_PORTABLE; + if (t) { + return P.file(F(t, "argv.json")); + } else { + return he(this.userHome, this.c.dataFolderName, "argv.json"); + } + } + get isExtensionDevelopment() { + return !!this.args.extensionDevelopmentPath; + } + get untitledWorkspacesHome() { + return P.file(F(this.userDataPath, "Workspaces")); + } + get builtinExtensionsPath() { + const t = this.args["builtin-extensions-dir"]; + if (t) { + return Gi(t); + } else { + return pi(F(Ct.asFileUri("").fsPath, "..", "extensions")); + } + } + get extensionsDownloadLocation() { + const t = this.args["extensions-download-dir"]; + if (t) { + return P.file(Gi(t)); + } else { + return P.file(F(this.userDataPath, "CachedExtensionVSIXs")); + } + } + get extensionsPath() { + const t = this.args["extensions-dir"]; + if (t) { + return Gi(t); + } + const e = Ii.VSCODE_EXTENSIONS; + if (e) { + return e; + } + const i = Ii.VSCODE_PORTABLE; + if (i) { + return F(i, "extensions"); + } else { + return he(this.userHome, this.c.dataFolderName, "extensions").fsPath; + } + } + get extensionDevelopmentLocationURI() { + const t = this.args.extensionDevelopmentPath; + if (Array.isArray(t)) { + return t.map(e => /^[^:/?#]+?:\/\//.test(e) ? P.parse(e) : P.file(pi(e))); + } + } + get extensionDevelopmentKind() { + return this.args.extensionDevelopmentKind?.map(t => t === "ui" || t === "workspace" || t === "web" ? t : "workspace"); + } + get extensionTestsLocationURI() { + const t = this.args.extensionTestsPath; + if (t) { + if (/^[^:/?#]+?:\/\//.test(t)) { + return P.parse(t); + } else { + return P.file(pi(t)); + } + } + } + get disableExtensions() { + if (this.args["disable-extensions"]) { + return true; + } + const t = this.args["disable-extension"]; + if (t) { + if (typeof t == "string") { + return [t]; + } + if (Array.isArray(t) && t.length > 0) { + return t; + } + } + return false; + } + get debugExtensionHost() { + return vx(this.args, this.isBuilt); + } + get debugRenderer() { + return !!this.args.debugRenderer; + } + get isBuilt() { + return !Ii.VSCODE_DEV; + } + get verbose() { + return !!this.args.verbose; + } + get logLevel() { + return this.args.log?.find(t => !Xp.test(t)); + } + get extensionLogLevel() { + const t = []; + for (const e of this.args.log || []) { + const i = Xp.exec(e); + if (i && i[1] && i[2]) { + t.push([i[1], i[2]]); + } + } + if (t.length) { + return t; + } else { + return undefined; + } + } + get serviceMachineIdResource() { + return he(P.file(this.userDataPath), "machineid"); + } + get crashReporterId() { + return this.args["crash-reporter-id"]; + } + get crashReporterDirectory() { + return this.args["crash-reporter-directory"]; + } + get disableTelemetry() { + return !!this.args["disable-telemetry"]; + } + get disableWorkspaceTrust() { + return !!this.args["disable-workspace-trust"]; + } + get useInMemorySecretStorage() { + return !!this.args["use-inmemory-secretstorage"]; + } + get policyFile() { + if (this.args["__enable-file-policy"]) { + const t = Ii.VSCODE_PORTABLE; + if (t) { + return P.file(F(t, "policy.json")); + } else { + return he(this.userHome, this.c.dataFolderName, "policy.json"); + } + } + } + get editSessionId() { + return this.args.editSessionId; + } + get continueOn() { + return this.args.continueOn; + } + set continueOn(t) { + this.args.continueOn = t; + } + get args() { + return this.a; + } + constructor(t, e, i) { + this.a = t; + this.b = e; + this.c = i; + } + }; + __decorate([de], Me.prototype, "appRoot", null); + __decorate([de], Me.prototype, "userHome", null); + __decorate([de], Me.prototype, "userDataPath", null); + __decorate([de], Me.prototype, "appSettingsHome", null); + __decorate([de], Me.prototype, "tmpDir", null); + __decorate([de], Me.prototype, "cacheHome", null); + __decorate([de], Me.prototype, "stateResource", null); + __decorate([de], Me.prototype, "userRoamingDataHome", null); + __decorate([de], Me.prototype, "userDataSyncHome", null); + __decorate([de], Me.prototype, "sync", null); + __decorate([de], Me.prototype, "machineSettingsResource", null); + __decorate([de], Me.prototype, "workspaceStorageHome", null); + __decorate([de], Me.prototype, "localHistoryHome", null); + __decorate([de], Me.prototype, "keyboardLayoutResource", null); + __decorate([de], Me.prototype, "argvResource", null); + __decorate([de], Me.prototype, "isExtensionDevelopment", null); + __decorate([de], Me.prototype, "untitledWorkspacesHome", null); + __decorate([de], Me.prototype, "builtinExtensionsPath", null); + __decorate([de], Me.prototype, "extensionsPath", null); + __decorate([de], Me.prototype, "extensionDevelopmentLocationURI", null); + __decorate([de], Me.prototype, "extensionDevelopmentKind", null); + __decorate([de], Me.prototype, "extensionTestsLocationURI", null); + __decorate([de], Me.prototype, "debugExtensionHost", null); + __decorate([de], Me.prototype, "logLevel", null); + __decorate([de], Me.prototype, "extensionLogLevel", null); + __decorate([de], Me.prototype, "serviceMachineIdResource", null); + __decorate([de], Me.prototype, "disableTelemetry", null); + __decorate([de], Me.prototype, "disableWorkspaceTrust", null); + __decorate([de], Me.prototype, "useInMemorySecretStorage", null); + __decorate([de], Me.prototype, "policyFile", null); + } + }); + import { homedir as yx, tmpdir as Sx } from "os"; + function Ex(t, e) { + return Yp(t["inspect-ptyhost"], t["inspect-brk-ptyhost"], 5877, e, t.extensionEnvironment); + } + function kx(t, e) { + return Yp(t["inspect-sharedprocess"], t["inspect-brk-sharedprocess"], 5879, e, t.extensionEnvironment); + } + var Xb; + var Qp = g({ + "out-build/vs/platform/environment/node/environmentService.js"() { + "use strict"; + + bx(); + j0(); + Xb = class extends Me { + constructor(t, e) { + super(t, { + homeDir: yx(), + tmpDir: Sx(), + userDataDir: W0(t, e.nameShort) + }, e); + } + }; + } + }); + var ot; + var ir; + var vt = g({ + "out-build/vs/platform/environment/electron-main/environmentMainService.js"() { + "use strict"; + + sn(); + we(); + H(); + Vp(); + Ri(); + Qp(); + Y(); + ot = Yi; + ir = class extends Xb { + constructor() { + super(...arguments); + this.d = {}; + } + get backupHome() { + return F(this.userDataPath, "Backups"); + } + get mainIPCHandle() { + return Zk(this.userDataPath, "main", this.c.version); + } + get mainLockfile() { + return F(this.userDataPath, "code.lock"); + } + get disableUpdates() { + return !!this.args["disable-updates"]; + } + get crossOriginIsolated() { + return !!this.args["enable-coi"]; + } + get codeCachePath() { + return process.env.VSCODE_CODE_CACHE_PATH || undefined; + } + get useCodeCache() { + return !!this.codeCachePath; + } + unsetSnapExportedVariables() { + if (Se) { + for (const t in process.env) { + if (t.endsWith("_VSCODE_SNAP_ORIG")) { + const e = t.slice(0, -17); + if (this.d[e]) { + continue; + } + if (process.env[e]) { + this.d[e] = process.env[e]; + } + if (process.env[t]) { + process.env[e] = process.env[t]; + } else { + delete process.env[e]; + } + } + } + } + } + restoreSnapExportedVariables() { + if (Se) { + for (const t in this.d) { + process.env[t] = this.d[t]; + delete this.d[t]; + } + } + } + }; + __decorate([de], ir.prototype, "backupHome", null); + __decorate([de], ir.prototype, "mainIPCHandle", null); + __decorate([de], ir.prototype, "mainLockfile", null); + __decorate([de], ir.prototype, "disableUpdates", null); + __decorate([de], ir.prototype, "crossOriginIsolated", null); + __decorate([de], ir.prototype, "codeCachePath", null); + __decorate([de], ir.prototype, "useCodeCache", null); + } + }); + function e1(...t) { + switch (t.length) { + case 1: + return v(1728, null, t[0]); + case 2: + return v(1729, null, t[0], t[1]); + case 3: + return v(1730, null, t[0], t[1], t[2]); + default: + return; + } + } + var Qb; + var ey; + var ty; + var lo; + var xx = g({ + "out-build/vs/platform/contextkey/common/scanner.js"() { + "use strict"; + + $e(); + be(); + (function (t) { + t[t.LParen = 0] = "LParen"; + t[t.RParen = 1] = "RParen"; + t[t.Neg = 2] = "Neg"; + t[t.Eq = 3] = "Eq"; + t[t.NotEq = 4] = "NotEq"; + t[t.Lt = 5] = "Lt"; + t[t.LtEq = 6] = "LtEq"; + t[t.Gt = 7] = "Gt"; + t[t.GtEq = 8] = "GtEq"; + t[t.RegexOp = 9] = "RegexOp"; + t[t.RegexStr = 10] = "RegexStr"; + t[t.True = 11] = "True"; + t[t.False = 12] = "False"; + t[t.In = 13] = "In"; + t[t.Not = 14] = "Not"; + t[t.And = 15] = "And"; + t[t.Or = 16] = "Or"; + t[t.Str = 17] = "Str"; + t[t.QuotedStr = 18] = "QuotedStr"; + t[t.Error = 19] = "Error"; + t[t.EOF = 20] = "EOF"; + })(Qb ||= {}); + ey = v(1731, null); + ty = v(1732, null); + lo = class S0 { + constructor() { + this.c = ""; + this.d = 0; + this.e = 0; + this.f = []; + this.g = []; + this.m = /[a-zA-Z0-9_<>\-\./\\:\*\?\+\[\]\^,#@;"%\$\p{L}-]+/uy; + } + static getLexeme(e) { + switch (e.type) { + case 0: + return "("; + case 1: + return ")"; + case 2: + return "!"; + case 3: + if (e.isTripleEq) { + return "==="; + } else { + return "=="; + } + case 4: + if (e.isTripleEq) { + return "!=="; + } else { + return "!="; + } + case 5: + return "<"; + case 6: + return "<="; + case 7: + return ">="; + case 8: + return ">="; + case 9: + return "=~"; + case 10: + return e.lexeme; + case 11: + return "true"; + case 12: + return "false"; + case 13: + return "in"; + case 14: + return "not"; + case 15: + return "&&"; + case 16: + return "||"; + case 17: + return e.lexeme; + case 18: + return e.lexeme; + case 19: + return e.lexeme; + case 20: + return "EOF"; + default: + throw uw(`unhandled token type: ${JSON.stringify(e)}; have you forgotten to add a case?`); + } + } + static { + this.a = new Set(["i", "g", "s", "m", "y", "u"].map(e => e.charCodeAt(0))); + } + static { + this.b = new Map([["not", 14], ["in", 13], ["false", 12], ["true", 11]]); + } + get errors() { + return this.g; + } + reset(e) { + this.c = e; + this.d = 0; + this.e = 0; + this.f = []; + this.g = []; + return this; + } + scan() { + while (!this.r()) { + this.d = this.e; + switch (this.i()) { + case 40: + this.k(0); + break; + case 41: + this.k(1); + break; + case 33: + if (this.h(61)) { + const i = this.h(61); + this.f.push({ + type: 4, + offset: this.d, + isTripleEq: i + }); + } else { + this.k(2); + } + break; + case 39: + this.o(); + break; + case 47: + this.q(); + break; + case 61: + if (this.h(61)) { + const i = this.h(61); + this.f.push({ + type: 3, + offset: this.d, + isTripleEq: i + }); + } else if (this.h(126)) { + this.k(9); + } else { + this.l(e1("==", "=~")); + } + break; + case 60: + this.k(this.h(61) ? 6 : 5); + break; + case 62: + this.k(this.h(61) ? 8 : 7); + break; + case 38: + if (this.h(38)) { + this.k(15); + } else { + this.l(e1("&&")); + } + break; + case 124: + if (this.h(124)) { + this.k(16); + } else { + this.l(e1("||")); + } + break; + case 32: + case 13: + case 9: + case 10: + case 160: + break; + default: + this.n(); + } + } + this.d = this.e; + this.k(20); + return Array.from(this.f); + } + h(e) { + if (this.r() || this.c.charCodeAt(this.e) !== e) { + return false; + } else { + this.e++; + return true; + } + } + i() { + return this.c.charCodeAt(this.e++); + } + j() { + if (this.r()) { + return 0; + } else { + return this.c.charCodeAt(this.e); + } + } + k(e) { + this.f.push({ + type: e, + offset: this.d + }); + } + l(e) { + const i = this.d; + const s = this.c.substring(this.d, this.e); + const r = { + type: 19, + offset: this.d, + lexeme: s + }; + this.g.push({ + offset: i, + lexeme: s, + additionalInfo: e + }); + this.f.push(r); + } + n() { + this.m.lastIndex = this.d; + const e = this.m.exec(this.c); + if (e) { + this.e = this.d + e[0].length; + const i = this.c.substring(this.d, this.e); + const s = S0.b.get(i); + if (s) { + this.k(s); + } else { + this.f.push({ + type: 17, + lexeme: i, + offset: this.d + }); + } + } + } + o() { + while (this.j() !== 39 && !this.r()) { + this.i(); + } + if (this.r()) { + this.l(ey); + return; + } + this.i(); + this.f.push({ + type: 18, + lexeme: this.c.substring(this.d + 1, this.e - 1), + offset: this.d + 1 + }); + } + q() { + let e = this.e; + let i = false; + let s = false; + while (true) { + if (e >= this.c.length) { + this.e = e; + this.l(ty); + return; + } + const n = this.c.charCodeAt(e); + if (i) { + i = false; + } else if (n === 47 && !s) { + e++; + break; + } else if (n === 91) { + s = true; + } else if (n === 92) { + i = true; + } else if (n === 93) { + s = false; + } + e++; + } + while (e < this.c.length && S0.a.has(this.c.charCodeAt(e))) { + e++; + } + this.e = e; + const r = this.c.substring(this.d, this.e); + this.f.push({ + type: 10, + lexeme: r, + offset: this.d + }); + } + r() { + return this.e >= this.c.length; + } + }; + } + }); + function Dx(t, e) { + if (uo.has(t)) { + console.warn(`A context key function with id '${t}' is already registered. Function collisions can lead to unexpected behavior.`); + uo.delete(t); + } + uo.set(t, e); + return { + dispose: () => { + uo.delete(t); + } + }; + } + function iy(t) { + return uo.get(t); + } + function ic(t, e) { + return t.cmp(e); + } + function Eu(t, e) { + if (typeof t == "string") { + const i = parseFloat(t); + if (!isNaN(i)) { + t = i; + } + } + if (typeof t == "string" || typeof t == "number") { + return e(t); + } else { + return ii.INSTANCE; + } + } + function sy(t) { + let e = null; + for (let i = 0, s = t.length; i < s; i++) { + const r = t[i].substituteConstants(); + if (t[i] !== r && e === null) { + e = []; + for (let n = 0; n < i; n++) { + e[n] = t[n]; + } + } + if (e !== null) { + e[i] = r; + } + } + if (e === null) { + return t; + } else { + return e; + } + } + function t1(t, e) { + if (t < e) { + return -1; + } else if (t > e) { + return 1; + } else { + return 0; + } + } + function nn(t, e, i, s) { + if (t < i) { + return -1; + } else if (t > i) { + return 1; + } else if (e < s) { + return -1; + } else if (e > s) { + return 1; + } else { + return 0; + } + } + function ry(t) { + if (t.type === 9) { + return t.expr; + } else { + return [t]; + } + } + var kt; + var uo; + var ny; + var oy; + var ay; + var cy; + var ly; + var uy; + var i1; + var hy; + var dy; + var fy; + var py; + var gy; + var Jt; + var ku; + var ii; + var vi; + var ho; + var xu; + var s1; + var r1; + var Du; + var fo; + var Pu; + var $u; + var Iu; + var Au; + var Cu; + var my; + var n1; + var _u; + var o1; + var Px; + var wy = g({ + "out-build/vs/platform/contextkey/common/contextkey.js"() { + "use strict"; + + H(); + Wt(); + xx(); + Y(); + be(); + $e(); + kt = new Map(); + kt.set("false", false); + kt.set("true", true); + kt.set("isMac", N); + kt.set("isLinux", Se); + kt.set("isWindows", j); + kt.set("isWeb", fr); + kt.set("isMacNative", N && !fr); + kt.set("isEdge", cw); + kt.set("isFirefox", ow); + kt.set("isChrome", Zf); + kt.set("isSafari", aw); + uo = new Map(); + ny = Object.prototype.hasOwnProperty; + (function (t) { + t[t.False = 0] = "False"; + t[t.True = 1] = "True"; + t[t.Defined = 2] = "Defined"; + t[t.Not = 3] = "Not"; + t[t.Equals = 4] = "Equals"; + t[t.NotEquals = 5] = "NotEquals"; + t[t.And = 6] = "And"; + t[t.Regex = 7] = "Regex"; + t[t.NotRegex = 8] = "NotRegex"; + t[t.Or = 9] = "Or"; + t[t.In = 10] = "In"; + t[t.NotIn = 11] = "NotIn"; + t[t.Greater = 12] = "Greater"; + t[t.GreaterEquals = 13] = "GreaterEquals"; + t[t.Smaller = 14] = "Smaller"; + t[t.SmallerEquals = 15] = "SmallerEquals"; + t[t.Function = 16] = "Function"; + })(oy ||= {}); + ay = { + regexParsingWithErrorRecovery: true + }; + cy = v(1708, null); + ly = v(1709, null); + uy = v(1710, null); + i1 = v(1711, null); + hy = v(1712, null); + dy = v(1713, null); + fy = v(1714, null); + py = v(1715, null); + gy = class xl { + static { + this.c = new Error(); + } + get lexingErrors() { + return this.d.errors; + } + get parsingErrors() { + return this.h; + } + constructor(e = ay) { + this.k = e; + this.d = new lo(); + this.f = []; + this.g = 0; + this.h = []; + this.v = /g|y/g; + } + parse(e) { + if (e === "") { + this.h.push({ + message: cy, + offset: 0, + lexeme: "", + additionalInfo: ly + }); + return; + } + this.f = this.d.reset(e).scan(); + this.g = 0; + this.h = []; + try { + const i = this.l(); + if (!this.E()) { + const s = this.D(); + const r = s.type === 17 ? dy : undefined; + this.h.push({ + message: hy, + offset: s.offset, + lexeme: lo.getLexeme(s), + additionalInfo: r + }); + throw xl.c; + } + return i; + } catch (i) { + if (i !== xl.c) { + throw i; + } + return; + } + } + l() { + return this.m(); + } + m() { + const e = [this.o()]; + while (this.y(16)) { + const i = this.o(); + e.push(i); + } + if (e.length === 1) { + return e[0]; + } else { + return Jt.or(...e); + } + } + o() { + const e = [this.s()]; + while (this.y(15)) { + const i = this.s(); + e.push(i); + } + if (e.length === 1) { + return e[0]; + } else { + return Jt.and(...e); + } + } + s() { + if (this.y(2)) { + const e = this.D(); + switch (e.type) { + case 11: + this.z(); + return ii.INSTANCE; + case 12: + this.z(); + return vi.INSTANCE; + case 0: + { + this.z(); + const i = this.l(); + this.A(1, i1); + return i?.negate(); + } + case 17: + this.z(); + return fo.create(e.lexeme); + default: + throw this.B("KEY | true | false | '(' expression ')'", e); + } + } + return this.t(); + } + t() { + const e = this.D(); + switch (e.type) { + case 11: + this.z(); + return Jt.true(); + case 12: + this.z(); + return Jt.false(); + case 0: + { + this.z(); + const i = this.l(); + this.A(1, i1); + return i; + } + case 17: + { + if (e.lexeme.startsWith("@")) { + this.z(); + const r = e.lexeme.substring(1); + if (r.startsWith("!")) { + const o = r.substring(1); + const a = iy(o); + if (a) { + return ku.createWithoutRegistration(r, () => !a()); + } + } + const n = iy(r) || (() => false); + return ku.createWithoutRegistration(r, n); + } + const i = e.lexeme; + this.z(); + if (this.y(9)) { + const r = this.D(); + if (!this.k.regexParsingWithErrorRecovery) { + this.z(); + if (r.type !== 10) { + throw this.B("REGEX", r); + } + const n = r.lexeme; + const o = n.lastIndexOf("/"); + const a = o === n.length - 1 ? undefined : this.w(n.substring(o + 1)); + let c; + try { + c = new RegExp(n.substring(1, o), a); + } catch { + throw this.B("REGEX", r); + } + return Cu.create(i, c); + } + switch (r.type) { + case 10: + case 19: + { + const n = [r.lexeme]; + this.z(); + let o = this.D(); + let a = 0; + for (let f = 0; f < r.lexeme.length; f++) { + if (r.lexeme.charCodeAt(f) === 40) { + a++; + } else if (r.lexeme.charCodeAt(f) === 41) { + a--; + } + } + while (!this.E() && o.type !== 15 && o.type !== 16) { + switch (o.type) { + case 0: + a++; + break; + case 1: + a--; + break; + case 10: + case 18: + for (let f = 0; f < o.lexeme.length; f++) { + if (o.lexeme.charCodeAt(f) === 40) { + a++; + } else if (r.lexeme.charCodeAt(f) === 41) { + a--; + } + } + } + if (a < 0) { + break; + } + n.push(lo.getLexeme(o)); + this.z(); + o = this.D(); + } + const c = n.join(""); + const l = c.lastIndexOf("/"); + const u = l === c.length - 1 ? undefined : this.w(c.substring(l + 1)); + let d; + try { + d = new RegExp(c.substring(1, l), u); + } catch { + throw this.B("REGEX", r); + } + return Jt.regex(i, d); + } + case 18: + { + const n = r.lexeme; + this.z(); + let o = null; + if (!LE(n)) { + const a = n.indexOf("/"); + const c = n.lastIndexOf("/"); + if (a !== c && a >= 0) { + const l = n.slice(a + 1, c); + const u = n[c + 1] === "i" ? "i" : ""; + try { + o = new RegExp(l, u); + } catch { + throw this.B("REGEX", r); + } + } + } + if (o === null) { + throw this.B("REGEX", r); + } + return Cu.create(i, o); + } + default: + throw this.B("REGEX", this.D()); + } + } + if (this.y(14)) { + this.A(13, uy); + const r = this.u(); + return Jt.notIn(i, r); + } + switch (this.D().type) { + case 3: + { + this.z(); + const r = this.u(); + if (this.x().type === 18) { + return Jt.equals(i, r); + } + switch (r) { + case "true": + return Jt.has(i); + case "false": + return Jt.not(i); + default: + return Jt.equals(i, r); + } + } + case 4: + { + this.z(); + const r = this.u(); + if (this.x().type === 18) { + return Jt.notEquals(i, r); + } + switch (r) { + case "true": + return Jt.not(i); + case "false": + return Jt.has(i); + default: + return Jt.notEquals(i, r); + } + } + case 5: + this.z(); + return Iu.create(i, this.u()); + case 6: + this.z(); + return Au.create(i, this.u()); + case 7: + this.z(); + return Pu.create(i, this.u()); + case 8: + this.z(); + return $u.create(i, this.u()); + case 13: + this.z(); + return Jt.in(i, this.u()); + default: + return Jt.has(i); + } + } + case 20: + this.h.push({ + message: fy, + offset: e.offset, + lexeme: "", + additionalInfo: py + }); + throw xl.c; + default: + throw this.B(`true | false | KEY + | KEY '=~' REGEX + | KEY ('==' | '!=' | '<' | '<=' | '>' | '>=' | 'in' | 'not' 'in') value`, this.D()); + } + } + u() { + const e = this.D(); + switch (e.type) { + case 17: + case 18: + this.z(); + return e.lexeme; + case 11: + this.z(); + return "true"; + case 12: + this.z(); + return "false"; + case 13: + this.z(); + return "in"; + default: + return ""; + } + } + w(e) { + return e.replaceAll(this.v, ""); + } + x() { + return this.f[this.g - 1]; + } + y(e) { + if (this.C(e)) { + this.z(); + return true; + } else { + return false; + } + } + z() { + if (!this.E()) { + this.g++; + } + return this.x(); + } + A(e, i) { + if (this.C(e)) { + return this.z(); + } + throw this.B(i, this.D()); + } + B(e, i, s) { + const r = v(1716, null, e, lo.getLexeme(i)); + const n = i.offset; + const o = lo.getLexeme(i); + this.h.push({ + message: r, + offset: n, + lexeme: o, + additionalInfo: s + }); + return xl.c; + } + C(e) { + return this.D().type === e; + } + D() { + return this.f[this.g]; + } + E() { + return this.D().type === 20; + } + }; + Jt = class { + static false() { + return ii.INSTANCE; + } + static true() { + return vi.INSTANCE; + } + static has(t) { + return ho.create(t); + } + static equals(t, e) { + return xu.create(t, e); + } + static notEquals(t, e) { + return Du.create(t, e); + } + static regex(t, e) { + return Cu.create(t, e); + } + static in(t, e) { + return s1.create(t, e); + } + static notIn(t, e) { + return r1.create(t, e); + } + static not(t) { + return fo.create(t); + } + static and(...t) { + return n1.create(t, null, true); + } + static or(...t) { + return _u.create(t, null, true); + } + static greater(t, e) { + return Pu.create(t, e); + } + static greaterEquals(t, e) { + return $u.create(t, e); + } + static smaller(t, e) { + return Iu.create(t, e); + } + static smallerEquals(t, e) { + return Au.create(t, e); + } + static function(t, e) { + return ku.create(t, e); + } + static { + this.c = new gy({ + regexParsingWithErrorRecovery: false + }); + } + static deserialize(t) { + if (t == null) { + return undefined; + } else { + return this.c.parse(t); + } + } + }; + ku = class xf { + static create(e, i) { + Dx(e, i); + return new xf(e, i); + } + static createWithoutRegistration(e, i) { + return new xf(e, i); + } + constructor(e, i) { + this.type = 16; + this.d = e; + this.c = i; + } + cmp(e) { + if (e.type !== this.type) { + return this.type - e.type; + } else { + return t1(this.d, e.d); + } + } + equals(e) { + return e.type === this.type && this.d === e.d; + } + substituteConstants() { + return this; + } + evaluate(e) { + return this.c(); + } + serialize() { + return `@${this.d}`; + } + keys() { + return []; + } + map(e) { + return this; + } + negate() { + return xf.createWithoutRegistration(`!${this.d}`, () => !this.c()); + } + }; + ii = class U3 { + static { + this.INSTANCE = new U3(); + } + constructor() { + this.type = 0; + } + cmp(e) { + return this.type - e.type; + } + equals(e) { + return e.type === this.type; + } + substituteConstants() { + return this; + } + evaluate(e) { + return false; + } + serialize() { + return "false"; + } + keys() { + return []; + } + map(e) { + return this; + } + negate() { + return vi.INSTANCE; + } + }; + vi = class B3 { + static { + this.INSTANCE = new B3(); + } + constructor() { + this.type = 1; + } + cmp(e) { + return this.type - e.type; + } + equals(e) { + return e.type === this.type; + } + substituteConstants() { + return this; + } + evaluate(e) { + return true; + } + serialize() { + return "true"; + } + keys() { + return []; + } + map(e) { + return this; + } + negate() { + return ii.INSTANCE; + } + }; + ho = class q3 { + static create(e, i = null) { + const s = kt.get(e); + if (typeof s == "boolean") { + if (s) { + return vi.INSTANCE; + } else { + return ii.INSTANCE; + } + } else { + return new q3(e, i); + } + } + constructor(e, i) { + this.key = e; + this.c = i; + this.type = 2; + } + cmp(e) { + if (e.type !== this.type) { + return this.type - e.type; + } else { + return t1(this.key, e.key); + } + } + equals(e) { + if (e.type === this.type) { + return this.key === e.key; + } else { + return false; + } + } + substituteConstants() { + const e = kt.get(this.key); + if (typeof e == "boolean") { + if (e) { + return vi.INSTANCE; + } else { + return ii.INSTANCE; + } + } else { + return this; + } + } + evaluate(e) { + return !!e.getValue(this.key); + } + serialize() { + return this.key; + } + keys() { + return [this.key]; + } + map(e) { + return e.mapDefined(this.key); + } + negate() { + this.c ||= fo.create(this.key, this); + return this.c; + } + }; + xu = class z3 { + static create(e, i, s = null) { + if (typeof i == "boolean") { + if (i) { + return ho.create(e, s); + } else { + return fo.create(e, s); + } + } + const r = kt.get(e); + if (typeof r == "boolean") { + if (i === (r ? "true" : "false")) { + return vi.INSTANCE; + } else { + return ii.INSTANCE; + } + } else { + return new z3(e, i, s); + } + } + constructor(e, i, s) { + this.c = e; + this.d = i; + this.f = s; + this.type = 4; + } + cmp(e) { + if (e.type !== this.type) { + return this.type - e.type; + } else { + return nn(this.c, this.d, e.c, e.d); + } + } + equals(e) { + if (e.type === this.type) { + return this.c === e.c && this.d === e.d; + } else { + return false; + } + } + substituteConstants() { + const e = kt.get(this.c); + if (typeof e == "boolean") { + const i = e ? "true" : "false"; + if (this.d === i) { + return vi.INSTANCE; + } else { + return ii.INSTANCE; + } + } + return this; + } + evaluate(e) { + return e.getValue(this.c) == this.d; + } + serialize() { + return `${this.c} == '${this.d}'`; + } + keys() { + return [this.c]; + } + map(e) { + return e.mapEquals(this.c, this.d); + } + negate() { + this.f ||= Du.create(this.c, this.d, this); + return this.f; + } + }; + s1 = class H3 { + static create(e, i) { + return new H3(e, i); + } + constructor(e, i) { + this.d = e; + this.f = i; + this.type = 10; + this.c = null; + } + cmp(e) { + if (e.type !== this.type) { + return this.type - e.type; + } else { + return nn(this.d, this.f, e.d, e.f); + } + } + equals(e) { + if (e.type === this.type) { + return this.d === e.d && this.f === e.f; + } else { + return false; + } + } + substituteConstants() { + return this; + } + evaluate(e) { + const i = e.getValue(this.f); + const s = e.getValue(this.d); + if (Array.isArray(i)) { + return i.includes(s); + } else if (typeof s == "string" && typeof i == "object" && i !== null) { + return ny.call(i, s); + } else { + return false; + } + } + serialize() { + return `${this.d} in '${this.f}'`; + } + keys() { + return [this.d, this.f]; + } + map(e) { + return e.mapIn(this.d, this.f); + } + negate() { + this.c ||= r1.create(this.d, this.f); + return this.c; + } + }; + r1 = class V3 { + static create(e, i) { + return new V3(e, i); + } + constructor(e, i) { + this.d = e; + this.f = i; + this.type = 11; + this.c = s1.create(e, i); + } + cmp(e) { + if (e.type !== this.type) { + return this.type - e.type; + } else { + return this.c.cmp(e.c); + } + } + equals(e) { + if (e.type === this.type) { + return this.c.equals(e.c); + } else { + return false; + } + } + substituteConstants() { + return this; + } + evaluate(e) { + return !this.c.evaluate(e); + } + serialize() { + return `${this.d} not in '${this.f}'`; + } + keys() { + return this.c.keys(); + } + map(e) { + return e.mapNotIn(this.d, this.f); + } + negate() { + return this.c; + } + }; + Du = class G3 { + static create(e, i, s = null) { + if (typeof i == "boolean") { + if (i) { + return fo.create(e, s); + } else { + return ho.create(e, s); + } + } + const r = kt.get(e); + if (typeof r == "boolean") { + if (i === (r ? "true" : "false")) { + return ii.INSTANCE; + } else { + return vi.INSTANCE; + } + } else { + return new G3(e, i, s); + } + } + constructor(e, i, s) { + this.c = e; + this.d = i; + this.f = s; + this.type = 5; + } + cmp(e) { + if (e.type !== this.type) { + return this.type - e.type; + } else { + return nn(this.c, this.d, e.c, e.d); + } + } + equals(e) { + if (e.type === this.type) { + return this.c === e.c && this.d === e.d; + } else { + return false; + } + } + substituteConstants() { + const e = kt.get(this.c); + if (typeof e == "boolean") { + const i = e ? "true" : "false"; + if (this.d === i) { + return ii.INSTANCE; + } else { + return vi.INSTANCE; + } + } + return this; + } + evaluate(e) { + return e.getValue(this.c) != this.d; + } + serialize() { + return `${this.c} != '${this.d}'`; + } + keys() { + return [this.c]; + } + map(e) { + return e.mapNotEquals(this.c, this.d); + } + negate() { + this.f ||= xu.create(this.c, this.d, this); + return this.f; + } + }; + fo = class J3 { + static create(e, i = null) { + const s = kt.get(e); + if (typeof s == "boolean") { + if (s) { + return ii.INSTANCE; + } else { + return vi.INSTANCE; + } + } else { + return new J3(e, i); + } + } + constructor(e, i) { + this.c = e; + this.d = i; + this.type = 3; + } + cmp(e) { + if (e.type !== this.type) { + return this.type - e.type; + } else { + return t1(this.c, e.c); + } + } + equals(e) { + if (e.type === this.type) { + return this.c === e.c; + } else { + return false; + } + } + substituteConstants() { + const e = kt.get(this.c); + if (typeof e == "boolean") { + if (e) { + return ii.INSTANCE; + } else { + return vi.INSTANCE; + } + } else { + return this; + } + } + evaluate(e) { + return !e.getValue(this.c); + } + serialize() { + return `!${this.c}`; + } + keys() { + return [this.c]; + } + map(e) { + return e.mapNot(this.c); + } + negate() { + this.d ||= ho.create(this.c, this); + return this.d; + } + }; + Pu = class K3 { + static create(e, i, s = null) { + return Eu(i, r => new K3(e, r, s)); + } + constructor(e, i, s) { + this.c = e; + this.d = i; + this.f = s; + this.type = 12; + } + cmp(e) { + if (e.type !== this.type) { + return this.type - e.type; + } else { + return nn(this.c, this.d, e.c, e.d); + } + } + equals(e) { + if (e.type === this.type) { + return this.c === e.c && this.d === e.d; + } else { + return false; + } + } + substituteConstants() { + return this; + } + evaluate(e) { + if (typeof this.d == "string") { + return false; + } else { + return parseFloat(e.getValue(this.c)) > this.d; + } + } + serialize() { + return `${this.c} > ${this.d}`; + } + keys() { + return [this.c]; + } + map(e) { + return e.mapGreater(this.c, this.d); + } + negate() { + this.f ||= Au.create(this.c, this.d, this); + return this.f; + } + }; + $u = class Z3 { + static create(e, i, s = null) { + return Eu(i, r => new Z3(e, r, s)); + } + constructor(e, i, s) { + this.c = e; + this.d = i; + this.f = s; + this.type = 13; + } + cmp(e) { + if (e.type !== this.type) { + return this.type - e.type; + } else { + return nn(this.c, this.d, e.c, e.d); + } + } + equals(e) { + if (e.type === this.type) { + return this.c === e.c && this.d === e.d; + } else { + return false; + } + } + substituteConstants() { + return this; + } + evaluate(e) { + if (typeof this.d == "string") { + return false; + } else { + return parseFloat(e.getValue(this.c)) >= this.d; + } + } + serialize() { + return `${this.c} >= ${this.d}`; + } + keys() { + return [this.c]; + } + map(e) { + return e.mapGreaterEquals(this.c, this.d); + } + negate() { + this.f ||= Iu.create(this.c, this.d, this); + return this.f; + } + }; + Iu = class Y3 { + static create(e, i, s = null) { + return Eu(i, r => new Y3(e, r, s)); + } + constructor(e, i, s) { + this.c = e; + this.d = i; + this.f = s; + this.type = 14; + } + cmp(e) { + if (e.type !== this.type) { + return this.type - e.type; + } else { + return nn(this.c, this.d, e.c, e.d); + } + } + equals(e) { + if (e.type === this.type) { + return this.c === e.c && this.d === e.d; + } else { + return false; + } + } + substituteConstants() { + return this; + } + evaluate(e) { + if (typeof this.d == "string") { + return false; + } else { + return parseFloat(e.getValue(this.c)) < this.d; + } + } + serialize() { + return `${this.c} < ${this.d}`; + } + keys() { + return [this.c]; + } + map(e) { + return e.mapSmaller(this.c, this.d); + } + negate() { + this.f ||= $u.create(this.c, this.d, this); + return this.f; + } + }; + Au = class X3 { + static create(e, i, s = null) { + return Eu(i, r => new X3(e, r, s)); + } + constructor(e, i, s) { + this.c = e; + this.d = i; + this.f = s; + this.type = 15; + } + cmp(e) { + if (e.type !== this.type) { + return this.type - e.type; + } else { + return nn(this.c, this.d, e.c, e.d); + } + } + equals(e) { + if (e.type === this.type) { + return this.c === e.c && this.d === e.d; + } else { + return false; + } + } + substituteConstants() { + return this; + } + evaluate(e) { + if (typeof this.d == "string") { + return false; + } else { + return parseFloat(e.getValue(this.c)) <= this.d; + } + } + serialize() { + return `${this.c} <= ${this.d}`; + } + keys() { + return [this.c]; + } + map(e) { + return e.mapSmallerEquals(this.c, this.d); + } + negate() { + this.f ||= Pu.create(this.c, this.d, this); + return this.f; + } + }; + Cu = class Q3 { + static create(e, i) { + return new Q3(e, i); + } + constructor(e, i) { + this.d = e; + this.f = i; + this.type = 7; + this.c = null; + } + cmp(e) { + if (e.type !== this.type) { + return this.type - e.type; + } + if (this.d < e.d) { + return -1; + } + if (this.d > e.d) { + return 1; + } + const i = this.f ? this.f.source : ""; + const s = e.f ? e.f.source : ""; + if (i < s) { + return -1; + } else if (i > s) { + return 1; + } else { + return 0; + } + } + equals(e) { + if (e.type === this.type) { + const i = this.f ? this.f.source : ""; + const s = e.f ? e.f.source : ""; + return this.d === e.d && i === s; + } + return false; + } + substituteConstants() { + return this; + } + evaluate(e) { + const i = e.getValue(this.d); + if (this.f) { + return this.f.test(i); + } else { + return false; + } + } + serialize() { + const e = this.f ? `/${this.f.source}/${this.f.flags}` : "/invalid/"; + return `${this.d} =~ ${e}`; + } + keys() { + return [this.d]; + } + map(e) { + return e.mapRegex(this.d, this.f); + } + negate() { + this.c ||= my.create(this); + return this.c; + } + }; + my = class E0 { + static create(e) { + return new E0(e); + } + constructor(e) { + this.c = e; + this.type = 8; + } + cmp(e) { + if (e.type !== this.type) { + return this.type - e.type; + } else { + return this.c.cmp(e.c); + } + } + equals(e) { + if (e.type === this.type) { + return this.c.equals(e.c); + } else { + return false; + } + } + substituteConstants() { + return this; + } + evaluate(e) { + return !this.c.evaluate(e); + } + serialize() { + return `!(${this.c.serialize()})`; + } + keys() { + return this.c.keys(); + } + map(e) { + return new E0(this.c.map(e)); + } + negate() { + return this.c; + } + }; + n1 = class ha { + static create(e, i, s) { + return ha.d(e, i, s); + } + constructor(e, i) { + this.expr = e; + this.c = i; + this.type = 6; + } + cmp(e) { + if (e.type !== this.type) { + return this.type - e.type; + } + if (this.expr.length < e.expr.length) { + return -1; + } + if (this.expr.length > e.expr.length) { + return 1; + } + for (let i = 0, s = this.expr.length; i < s; i++) { + const r = ic(this.expr[i], e.expr[i]); + if (r !== 0) { + return r; + } + } + return 0; + } + equals(e) { + if (e.type === this.type) { + if (this.expr.length !== e.expr.length) { + return false; + } + for (let i = 0, s = this.expr.length; i < s; i++) { + if (!this.expr[i].equals(e.expr[i])) { + return false; + } + } + return true; + } + return false; + } + substituteConstants() { + const e = sy(this.expr); + if (e === this.expr) { + return this; + } else { + return ha.create(e, this.c, false); + } + } + evaluate(e) { + for (let i = 0, s = this.expr.length; i < s; i++) { + if (!this.expr[i].evaluate(e)) { + return false; + } + } + return true; + } + static d(e, i, s) { + const r = []; + let n = false; + for (const o of e) { + if (o) { + if (o.type === 1) { + n = true; + continue; + } + if (o.type === 0) { + return ii.INSTANCE; + } + if (o.type === 6) { + r.push(...o.expr); + continue; + } + r.push(o); + } + } + if (r.length === 0 && n) { + return vi.INSTANCE; + } + if (r.length !== 0) { + if (r.length === 1) { + return r[0]; + } + r.sort(ic); + for (let o = 1; o < r.length; o++) { + if (r[o - 1].equals(r[o])) { + r.splice(o, 1); + o--; + } + } + if (r.length === 1) { + return r[0]; + } + while (r.length > 1) { + const o = r[r.length - 1]; + if (o.type !== 9) { + break; + } + r.pop(); + const a = r.pop(); + const c = r.length === 0; + const l = _u.create(o.expr.map(u => ha.create([u, a], null, s)), null, c); + if (l) { + r.push(l); + r.sort(ic); + } + } + if (r.length === 1) { + return r[0]; + } + if (s) { + for (let o = 0; o < r.length; o++) { + for (let a = o + 1; a < r.length; a++) { + if (r[o].negate().equals(r[a])) { + return ii.INSTANCE; + } + } + } + if (r.length === 1) { + return r[0]; + } + } + return new ha(r, i); + } + } + serialize() { + return this.expr.map(e => e.serialize()).join(" && "); + } + keys() { + const e = []; + for (const i of this.expr) { + e.push(...i.keys()); + } + return e; + } + map(e) { + return new ha(this.expr.map(i => i.map(e)), null); + } + negate() { + if (!this.c) { + const e = []; + for (const i of this.expr) { + e.push(i.negate()); + } + this.c = _u.create(e, this, true); + } + return this.c; + } + }; + _u = class Tn { + static create(e, i, s) { + return Tn.d(e, i, s); + } + constructor(e, i) { + this.expr = e; + this.c = i; + this.type = 9; + } + cmp(e) { + if (e.type !== this.type) { + return this.type - e.type; + } + if (this.expr.length < e.expr.length) { + return -1; + } + if (this.expr.length > e.expr.length) { + return 1; + } + for (let i = 0, s = this.expr.length; i < s; i++) { + const r = ic(this.expr[i], e.expr[i]); + if (r !== 0) { + return r; + } + } + return 0; + } + equals(e) { + if (e.type === this.type) { + if (this.expr.length !== e.expr.length) { + return false; + } + for (let i = 0, s = this.expr.length; i < s; i++) { + if (!this.expr[i].equals(e.expr[i])) { + return false; + } + } + return true; + } + return false; + } + substituteConstants() { + const e = sy(this.expr); + if (e === this.expr) { + return this; + } else { + return Tn.create(e, this.c, false); + } + } + evaluate(e) { + for (let i = 0, s = this.expr.length; i < s; i++) { + if (this.expr[i].evaluate(e)) { + return true; + } + } + return false; + } + static d(e, i, s) { + let r = []; + let n = false; + if (e) { + for (let o = 0, a = e.length; o < a; o++) { + const c = e[o]; + if (c) { + if (c.type === 0) { + n = true; + continue; + } + if (c.type === 1) { + return vi.INSTANCE; + } + if (c.type === 9) { + r = r.concat(c.expr); + continue; + } + r.push(c); + } + } + if (r.length === 0 && n) { + return ii.INSTANCE; + } + r.sort(ic); + } + if (r.length !== 0) { + if (r.length === 1) { + return r[0]; + } + for (let o = 1; o < r.length; o++) { + if (r[o - 1].equals(r[o])) { + r.splice(o, 1); + o--; + } + } + if (r.length === 1) { + return r[0]; + } + if (s) { + for (let o = 0; o < r.length; o++) { + for (let a = o + 1; a < r.length; a++) { + if (r[o].negate().equals(r[a])) { + return vi.INSTANCE; + } + } + } + if (r.length === 1) { + return r[0]; + } + } + return new Tn(r, i); + } + } + serialize() { + return this.expr.map(e => e.serialize()).join(" || "); + } + keys() { + const e = []; + for (const i of this.expr) { + e.push(...i.keys()); + } + return e; + } + map(e) { + return new Tn(this.expr.map(i => i.map(e)), null); + } + negate() { + if (!this.c) { + const e = []; + for (const i of this.expr) { + e.push(i.negate()); + } + while (e.length > 1) { + const i = e.shift(); + const s = e.shift(); + const r = []; + for (const n of ry(i)) { + for (const o of ry(s)) { + r.push(n1.create([n, o], null, false)); + } + } + e.unshift(Tn.create(r, null, false)); + } + this.c = Tn.create(e, this, true); + } + return this.c; + } + }; + o1 = class Df extends ho { + static { + this.d = []; + } + static all() { + return Df.d.values(); + } + constructor(e, i, s) { + super(e, null); + this.f = i; + if (typeof s == "object") { + Df.d.push({ + ...s, + key: e + }); + } else if (s !== true) { + Df.d.push({ + key: e, + description: s, + type: i != null ? typeof i : undefined + }); + } + } + bindTo(e) { + return e.createKey(this.key, this.f); + } + getValue(e) { + return e.getContextKeyValue(this.key); + } + toNegated() { + return this.negate(); + } + isEqualTo(e) { + return xu.create(this.key, e); + } + notEqualsTo(e) { + return Du.create(this.key, e); + } + }; + Px = q("contextKeyService"); + } + }); + function Ps() { + return new Date().toISOString(); + } + function vy(t) { + return Hl(t); + } + function a1(t, e, i) { + switch (e) { + case J.Trace: + t.trace(i); + break; + case J.Debug: + t.debug(i); + break; + case J.Info: + t.info(i); + break; + case J.Warning: + t.warn(i); + break; + case J.Error: + t.error(i); + break; + case J.Off: + break; + default: + throw new Error(`Invalid log level ${e}`); + } + } + function po(t, e = false) { + let i = ""; + for (let s = 0; s < t.length; s++) { + let r = t[s]; + if (r instanceof Error) { + r = Ki(r, e); + } + if (typeof r == "object") { + try { + r = JSON.stringify(r); + } catch {} + } + i += (s > 0 ? " " : "") + r; + } + return i; + } + function $x(t) { + if (t.verbose) { + return J.Trace; + } + if (typeof t.logLevel == "string") { + const e = Ax(t.logLevel.toLowerCase()); + if (e !== undefined) { + return e; + } + } + return rc; + } + function Ix(t) { + switch (t) { + case J.Trace: + return "trace"; + case J.Debug: + return "debug"; + case J.Info: + return "info"; + case J.Warning: + return "warn"; + case J.Error: + return "error"; + case J.Off: + return "off"; + } + } + function Ax(t) { + switch (t) { + case "trace": + return J.Trace; + case "debug": + return J.Debug; + case "info": + return J.Info; + case "warn": + return J.Warning; + case "error": + return J.Error; + case "critical": + return J.Error; + case "off": + return J.Off; + } + } + var V; + var sc; + var J; + var rc; + var Ru; + var c1; + var by; + var yy; + var Sy; + var Ey; + var ky; + var Cx; + var X = g({ + "out-build/vs/platform/log/common/log.js"() { + "use strict"; + + be(); + en(); + B(); + er(); + M(); + $i(); + H(); + nt(); + _e(); + se(); + wy(); + Y(); + V = q("logService"); + sc = q("loggerService"); + (function (t) { + t[t.Off = 0] = "Off"; + t[t.Trace = 1] = "Trace"; + t[t.Debug = 2] = "Debug"; + t[t.Info = 3] = "Info"; + t[t.Warning = 4] = "Warning"; + t[t.Error = 5] = "Error"; + })(J ||= {}); + rc = J.Info; + Ru = class extends T { + constructor() { + super(...arguments); + this.b = rc; + this.c = this.D(new $()); + this.onDidChangeLogLevel = this.c.event; + } + setLevel(t) { + if (this.b !== t) { + this.b = t; + this.c.fire(this.b); + } + } + getLevel() { + return this.b; + } + f(t) { + return this.b !== J.Off && this.b <= t; + } + g(t) { + if (this.B.isDisposed) { + return false; + } else { + return this.f(t); + } + } + }; + c1 = class extends Ru { + constructor(t) { + super(); + this.h = t; + } + f(t) { + return this.h || super.f(t); + } + trace(t, ...e) { + if (this.g(J.Trace)) { + this.m(J.Trace, po([t, ...e], true)); + } + } + debug(t, ...e) { + if (this.g(J.Debug)) { + this.m(J.Debug, po([t, ...e])); + } + } + info(t, ...e) { + if (this.g(J.Info)) { + this.m(J.Info, po([t, ...e])); + } + } + warn(t, ...e) { + if (this.g(J.Warning)) { + this.m(J.Warning, po([t, ...e])); + } + } + error(t, ...e) { + if (this.g(J.Error)) { + if (t instanceof Error) { + const i = Array.prototype.slice.call(arguments); + i[0] = t.stack; + this.m(J.Error, po(i)); + } else { + this.m(J.Error, po([t, ...e])); + } + } + } + flush() {} + }; + by = class extends Ru { + constructor(t = rc) { + super(); + this.setLevel(t); + this.h = !j; + } + trace(t, ...e) { + if (this.g(J.Trace)) { + if (this.h) { + console.log(`\x1B[90m[main ${Ps()}]\x1B[0m`, t, ...e); + } else { + console.log(`[main ${Ps()}]`, t, ...e); + } + } + } + debug(t, ...e) { + if (this.g(J.Debug)) { + if (this.h) { + console.log(`\x1B[90m[main ${Ps()}]\x1B[0m`, t, ...e); + } else { + console.log(`[main ${Ps()}]`, t, ...e); + } + } + } + info(t, ...e) { + if (this.g(J.Info)) { + if (this.h) { + console.log(`\x1B[90m[main ${Ps()}]\x1B[0m`, t, ...e); + } else { + console.log(`[main ${Ps()}]`, t, ...e); + } + } + } + warn(t, ...e) { + if (this.g(J.Warning)) { + if (this.h) { + console.warn(`\x1B[93m[main ${Ps()}]\x1B[0m`, t, ...e); + } else { + console.warn(`[main ${Ps()}]`, t, ...e); + } + } + } + error(t, ...e) { + if (this.g(J.Error)) { + if (this.h) { + console.error(`\x1B[91m[main ${Ps()}]\x1B[0m`, t, ...e); + } else { + console.error(`[main ${Ps()}]`, t, ...e); + } + } + } + flush() {} + }; + yy = class extends Ru { + constructor(t) { + super(); + this.h = t; + if (t.length) { + this.setLevel(t[0].getLevel()); + } + } + setLevel(t) { + for (const e of this.h) { + e.setLevel(t); + } + super.setLevel(t); + } + trace(t, ...e) { + for (const i of this.h) { + i.trace(t, ...e); + } + } + debug(t, ...e) { + for (const i of this.h) { + i.debug(t, ...e); + } + } + info(t, ...e) { + for (const i of this.h) { + i.info(t, ...e); + } + } + warn(t, ...e) { + for (const i of this.h) { + i.warn(t, ...e); + } + } + error(t, ...e) { + for (const i of this.h) { + i.error(t, ...e); + } + } + flush() { + for (const t of this.h) { + t.flush(); + } + } + dispose() { + for (const t of this.h) { + t.dispose(); + } + super.dispose(); + } + }; + Sy = class extends T { + constructor(t, e, i) { + super(); + this.h = t; + this.j = e; + this.b = new Ht(); + this.c = this.D(new $()); + this.onDidChangeLoggers = this.c.event; + this.f = this.D(new $()); + this.onDidChangeLogLevel = this.f.event; + this.g = this.D(new $()); + this.onDidChangeVisibility = this.g.event; + if (i) { + for (const s of i) { + this.b.set(s.resource, { + logger: undefined, + info: s + }); + } + } + } + m(t) { + if (wt(t)) { + return [...this.b.values()].find(e => e.info.id === t); + } else { + return this.b.get(t); + } + } + getLogger(t) { + return this.m(t)?.logger; + } + createLogger(t, e) { + const i = this.n(t); + const s = wt(t) ? t : e?.id ?? Ds(i.toString()).toString(16); + let r = this.b.get(i)?.logger; + const n = e?.logLevel === "always" ? J.Trace : e?.logLevel; + r ||= this.q(i, n ?? this.getLogLevel(i) ?? this.h, { + ...e, + id: s + }); + const o = { + logger: r, + info: { + resource: i, + id: s, + logLevel: n, + name: e?.name, + hidden: e?.hidden, + extensionId: e?.extensionId, + when: e?.when + } + }; + this.registerLogger(o.info); + this.b.set(i, o); + return r; + } + n(t) { + if (wt(t)) { + return he(this.j, `${t}.log`); + } else { + return t; + } + } + setLogLevel(t, e) { + if (P.isUri(t)) { + const i = t; + const s = e; + const r = this.b.get(i); + if (r && s !== r.info.logLevel) { + r.info.logLevel = s === this.h ? undefined : s; + r.logger?.setLevel(s); + this.b.set(r.info.resource, r); + this.f.fire([i, s]); + } + } else { + this.h = t; + for (const [i, s] of this.b.entries()) { + if (this.b.get(i)?.info.logLevel === undefined) { + s.logger?.setLevel(this.h); + } + } + this.f.fire(this.h); + } + } + setVisibility(t, e) { + const i = this.m(t); + if (i && e !== !i.info.hidden) { + i.info.hidden = !e; + this.b.set(i.info.resource, i); + this.g.fire([i.info.resource, e]); + } + } + getLogLevel(t) { + let e; + if (t) { + e = this.b.get(t)?.info.logLevel; + } + return e ?? this.h; + } + registerLogger(t) { + const e = this.b.get(t.resource); + if (e) { + if (e.info.hidden !== t.hidden) { + this.setVisibility(t.resource, !t.hidden); + } + } else { + this.b.set(t.resource, { + info: t, + logger: undefined + }); + this.c.fire({ + added: [t], + removed: [] + }); + } + } + deregisterLogger(t) { + const e = this.b.get(t); + if (e) { + if (e.logger) { + e.logger.dispose(); + } + this.b.delete(t); + this.c.fire({ + added: [], + removed: [e.info] + }); + } + } + *getRegisteredLoggers() { + for (const t of this.b.values()) { + yield t.info; + } + } + getRegisteredLogger(t) { + return this.b.get(t)?.info; + } + dispose() { + this.b.forEach(t => t.logger?.dispose()); + this.b.clear(); + super.dispose(); + } + }; + Ey = class { + constructor() { + this.onDidChangeLogLevel = new $().event; + } + setLevel(t) {} + getLevel() { + return J.Info; + } + trace(t, ...e) {} + debug(t, ...e) {} + info(t, ...e) {} + warn(t, ...e) {} + error(t, ...e) {} + critical(t, ...e) {} + dispose() {} + flush() {} + }; + ky = class extends Ey {}; + Cx = new o1("logLevel", Ix(J.Info)); + } + }); + var xy; + var Dy; + var l1; + var Py; + var $y; + var nc; + var Iy; + var Pr; + var go = g({ + "out-build/vs/base/common/ternarySearchTree.js"() { + "use strict"; + + zt(); + Wt(); + xy = class { + constructor() { + this.b = ""; + this.c = 0; + } + reset(t) { + this.b = t; + this.c = 0; + return this; + } + next() { + this.c += 1; + return this; + } + hasNext() { + return this.c < this.b.length - 1; + } + cmp(t) { + const e = t.charCodeAt(0); + const i = this.b.charCodeAt(this.c); + return e - i; + } + value() { + return this.b[this.c]; + } + }; + Dy = class { + constructor(t = true) { + this.e = t; + } + reset(t) { + this.b = t; + this.c = 0; + this.d = 0; + return this.next(); + } + hasNext() { + return this.d < this.b.length; + } + next() { + this.c = this.d; + let t = true; + for (; this.d < this.b.length; this.d++) { + if (this.b.charCodeAt(this.d) === 46) { + if (t) { + this.c++; + } else { + break; + } + } else { + t = false; + } + } + return this; + } + cmp(t) { + if (this.e) { + return bp(t, this.b, 0, t.length, this.c, this.d); + } else { + return Ua(t, this.b, 0, t.length, this.c, this.d); + } + } + value() { + return this.b.substring(this.c, this.d); + } + }; + l1 = class { + constructor(t = true, e = true) { + this.f = t; + this.g = e; + } + reset(t) { + this.d = 0; + this.e = 0; + this.b = t; + this.c = t.length; + for (let e = t.length - 1; e >= 0; e--, this.c--) { + const i = this.b.charCodeAt(e); + if (i !== 47 && (!this.f || i !== 92)) { + break; + } + } + return this.next(); + } + hasNext() { + return this.e < this.c; + } + next() { + this.d = this.e; + let t = true; + for (; this.e < this.c; this.e++) { + const e = this.b.charCodeAt(this.e); + if (e === 47 || this.f && e === 92) { + if (t) { + this.d++; + } else { + break; + } + } else { + t = false; + } + } + return this; + } + cmp(t) { + if (this.g) { + return bp(t, this.b, 0, t.length, this.d, this.e); + } else { + return Ua(t, this.b, 0, t.length, this.d, this.e); + } + } + value() { + return this.b.substring(this.d, this.e); + } + }; + (function (t) { + t[t.Scheme = 1] = "Scheme"; + t[t.Authority = 2] = "Authority"; + t[t.Path = 3] = "Path"; + t[t.Query = 4] = "Query"; + t[t.Fragment = 5] = "Fragment"; + })(Py ||= {}); + $y = class { + constructor(t, e) { + this.f = t; + this.g = e; + this.d = []; + this.e = 0; + } + reset(t) { + this.c = t; + this.d = []; + if (this.c.scheme) { + this.d.push(1); + } + if (this.c.authority) { + this.d.push(2); + } + if (this.c.path) { + this.b = new l1(false, !this.f(t)); + this.b.reset(t.path); + if (this.b.value()) { + this.d.push(3); + } + } + if (!this.g(t)) { + if (this.c.query) { + this.d.push(4); + } + if (this.c.fragment) { + this.d.push(5); + } + } + this.e = 0; + return this; + } + next() { + if (this.d[this.e] === 3 && this.b.hasNext()) { + this.b.next(); + } else { + this.e += 1; + } + return this; + } + hasNext() { + return this.d[this.e] === 3 && this.b.hasNext() || this.e < this.d.length - 1; + } + cmp(t) { + if (this.d[this.e] === 1) { + return yp(t, this.c.scheme); + } + if (this.d[this.e] === 2) { + return yp(t, this.c.authority); + } + if (this.d[this.e] === 3) { + return this.b.cmp(t); + } + if (this.d[this.e] === 4) { + return vp(t, this.c.query); + } + if (this.d[this.e] === 5) { + return vp(t, this.c.fragment); + } + throw new Error(); + } + value() { + if (this.d[this.e] === 1) { + return this.c.scheme; + } + if (this.d[this.e] === 2) { + return this.c.authority; + } + if (this.d[this.e] === 3) { + return this.b.value(); + } + if (this.d[this.e] === 4) { + return this.c.query; + } + if (this.d[this.e] === 5) { + return this.c.fragment; + } + throw new Error(); + } + }; + nc = class { + constructor() { + this.height = 1; + } + isEmpty() { + return !this.left && !this.mid && !this.right && !this.value; + } + rotateLeft() { + const t = this.right; + this.right = t.left; + t.left = this; + this.updateHeight(); + t.updateHeight(); + return t; + } + rotateRight() { + const t = this.left; + this.left = t.right; + t.right = this; + this.updateHeight(); + t.updateHeight(); + return t; + } + updateHeight() { + this.height = 1 + Math.max(this.heightLeft, this.heightRight); + } + balanceFactor() { + return this.heightRight - this.heightLeft; + } + get heightLeft() { + return this.left?.height ?? 0; + } + get heightRight() { + return this.right?.height ?? 0; + } + }; + (function (t) { + t[t.Left = -1] = "Left"; + t[t.Mid = 0] = "Mid"; + t[t.Right = 1] = "Right"; + })(Iy ||= {}); + Pr = class Dl { + static forUris(e = () => false, i = () => false) { + return new Dl(new $y(e, i)); + } + static forPaths(e = false) { + return new Dl(new l1(undefined, !e)); + } + static forStrings() { + return new Dl(new xy()); + } + static forConfigKeys() { + return new Dl(new Dy()); + } + constructor(e) { + this.b = e; + } + clear() { + this.c = undefined; + } + fill(e, i) { + if (i) { + const s = i.slice(0); + fw(s); + for (const r of s) { + this.set(r, e); + } + } else { + const s = e.slice(0); + fw(s); + for (const r of s) { + this.set(r[0], r[1]); + } + } + } + set(e, i) { + const s = this.b.reset(e); + let r; + if (!this.c) { + this.c = new nc(); + this.c.segment = s.value(); + } + const n = []; + for (r = this.c;;) { + const a = s.cmp(r.segment); + if (a > 0) { + if (!r.left) { + r.left = new nc(); + r.left.segment = s.value(); + } + n.push([-1, r]); + r = r.left; + } else if (a < 0) { + if (!r.right) { + r.right = new nc(); + r.right.segment = s.value(); + } + n.push([1, r]); + r = r.right; + } else if (s.hasNext()) { + s.next(); + if (!r.mid) { + r.mid = new nc(); + r.mid.segment = s.value(); + } + n.push([0, r]); + r = r.mid; + } else { + break; + } + } + const o = r.value; + r.value = i; + r.key = e; + for (let a = n.length - 1; a >= 0; a--) { + const c = n[a][1]; + c.updateHeight(); + const l = c.balanceFactor(); + if (l < -1 || l > 1) { + const u = n[a][0]; + const d = n[a + 1][0]; + if (u === 1 && d === 1) { + n[a][1] = c.rotateLeft(); + } else if (u === -1 && d === -1) { + n[a][1] = c.rotateRight(); + } else if (u === 1 && d === -1) { + c.right = n[a + 1][1] = n[a + 1][1].rotateRight(); + n[a][1] = c.rotateLeft(); + } else if (u === -1 && d === 1) { + c.left = n[a + 1][1] = n[a + 1][1].rotateLeft(); + n[a][1] = c.rotateRight(); + } else { + throw new Error(); + } + if (a > 0) { + switch (n[a - 1][0]) { + case -1: + n[a - 1][1].left = n[a][1]; + break; + case 1: + n[a - 1][1].right = n[a][1]; + break; + case 0: + n[a - 1][1].mid = n[a][1]; + break; + } + } else { + this.c = n[0][1]; + } + } + } + return o; + } + get(e) { + return this.d(e)?.value; + } + d(e) { + const i = this.b.reset(e); + let s = this.c; + while (s) { + const r = i.cmp(s.segment); + if (r > 0) { + s = s.left; + } else if (r < 0) { + s = s.right; + } else if (i.hasNext()) { + i.next(); + s = s.mid; + } else { + break; + } + } + return s; + } + has(e) { + const i = this.d(e); + return i?.value !== undefined || i?.mid !== undefined; + } + delete(e) { + return this.e(e, false); + } + deleteSuperstr(e) { + return this.e(e, true); + } + e(e, i) { + const s = this.b.reset(e); + const r = []; + let n = this.c; + while (n) { + const o = s.cmp(n.segment); + if (o > 0) { + r.push([-1, n]); + n = n.left; + } else if (o < 0) { + r.push([1, n]); + n = n.right; + } else if (s.hasNext()) { + s.next(); + r.push([0, n]); + n = n.mid; + } else { + break; + } + } + if (n) { + if (i) { + n.left = undefined; + n.mid = undefined; + n.right = undefined; + n.height = 1; + } else { + n.key = undefined; + n.value = undefined; + } + if (!n.mid && !n.value) { + if (n.left && n.right) { + const o = this.f(n.right); + if (o.key) { + const { + key: a, + value: c, + segment: l + } = o; + this.e(o.key, false); + n.key = a; + n.value = c; + n.segment = l; + } + } else { + const o = n.left ?? n.right; + if (r.length > 0) { + const [a, c] = r[r.length - 1]; + switch (a) { + case -1: + c.left = o; + break; + case 0: + c.mid = o; + break; + case 1: + c.right = o; + break; + } + } else { + this.c = o; + } + } + } + for (let o = r.length - 1; o >= 0; o--) { + const a = r[o][1]; + a.updateHeight(); + const c = a.balanceFactor(); + if (c > 1) { + if (!(a.right.balanceFactor() >= 0)) { + a.right = a.right.rotateRight(); + } + r[o][1] = a.rotateLeft(); + } else if (c < -1) { + if (!(a.left.balanceFactor() <= 0)) { + a.left = a.left.rotateLeft(); + } + r[o][1] = a.rotateRight(); + } + if (o > 0) { + switch (r[o - 1][0]) { + case -1: + r[o - 1][1].left = r[o][1]; + break; + case 1: + r[o - 1][1].right = r[o][1]; + break; + case 0: + r[o - 1][1].mid = r[o][1]; + break; + } + } else { + this.c = r[0][1]; + } + } + } + } + f(e) { + while (e.left) { + e = e.left; + } + return e; + } + findSubstr(e) { + const i = this.b.reset(e); + let s = this.c; + let r; + while (s) { + const n = i.cmp(s.segment); + if (n > 0) { + s = s.left; + } else if (n < 0) { + s = s.right; + } else if (i.hasNext()) { + i.next(); + r = s.value || r; + s = s.mid; + } else { + break; + } + } + return s && s.value || r; + } + findSuperstr(e) { + return this.g(e, false); + } + g(e, i) { + const s = this.b.reset(e); + let r = this.c; + while (r) { + const n = s.cmp(r.segment); + if (n > 0) { + r = r.left; + } else if (n < 0) { + r = r.right; + } else if (s.hasNext()) { + s.next(); + r = r.mid; + } else if (r.mid) { + return this.h(r.mid); + } else if (i) { + return r.value; + } else { + return undefined; + } + } + } + hasElementOrSubtree(e) { + return this.g(e, true) !== undefined; + } + forEach(e) { + for (const [i, s] of this) { + e(s, i); + } + } + *[Symbol.iterator]() { + yield* this.h(this.c); + } + h(e) { + const i = []; + this.j(e, i); + return i[Symbol.iterator](); + } + j(e, i) { + if (e) { + if (e.left) { + this.j(e.left, i); + } + if (e.value) { + i.push([e.key, e.value]); + } + if (e.mid) { + this.j(e.mid, i); + } + if (e.right) { + this.j(e.right, i); + } + } + } + _isBalanced() { + const e = i => { + if (!i) { + return true; + } + const s = i.balanceFactor(); + if (s < -1 || s > 1) { + return false; + } else { + return e(i.left) && e(i.right); + } + }; + return e(this.c); + } + }; + } + }); + function mo(t) { + return t.create === true; + } + function Xi(t) { + return !!(t.capabilities & 2); + } + function u1(t) { + return !!(t.capabilities & 8); + } + function Ay(t) { + return !!(t.capabilities & 131072); + } + function $r(t) { + return !!(t.capabilities & 4); + } + function h1(t) { + return !!(t.capabilities & 16); + } + function d1(t) { + if (Xi(t)) { + return !!(t.capabilities & 16384); + } else { + return false; + } + } + function Cy(t) { + if (Xi(t)) { + return !!(t.capabilities & 32768); + } else { + return false; + } + } + function _x(t) { + return !!(t.capabilities & 65536); + } + function cs(t, e) { + return Lu.create(t, e); + } + function on(t) { + return t || cs(v(1914, null), oe.Unknown); + } + function Rx(t, e) { + t.name = e ? `${e} (FileSystemError)` : "FileSystemError"; + return t; + } + function Ou(t) { + if (!t) { + return oe.Unknown; + } + if (t instanceof Lu) { + return t.code; + } + const e = /^(.+) \(FileSystemError\)$/.exec(t.name); + if (!e) { + return oe.Unknown; + } + switch (e[1]) { + case oe.FileExists: + return oe.FileExists; + case oe.FileIsADirectory: + return oe.FileIsADirectory; + case oe.FileNotADirectory: + return oe.FileNotADirectory; + case oe.FileNotFound: + return oe.FileNotFound; + case oe.FileTooLarge: + return oe.FileTooLarge; + case oe.FileWriteLocked: + return oe.FileWriteLocked; + case oe.NoPermissions: + return oe.NoPermissions; + case oe.Unavailable: + return oe.Unavailable; + } + return oe.Unknown; + } + function $s(t) { + if (t instanceof si) { + return t.fileOperationResult; + } + switch (Ou(t)) { + case oe.FileNotFound: + return 1; + case oe.FileIsADirectory: + return 0; + case oe.FileNotADirectory: + return 9; + case oe.FileWriteLocked: + return 5; + case oe.NoPermissions: + return 6; + case oe.FileExists: + return 4; + case oe.FileTooLarge: + return 7; + default: + return 10; + } + } + function Ox(t, e, i) { + if (!t || !e || t === e || e.length > t.length) { + return false; + } else { + if (e.charAt(e.length - 1) !== Vt) { + e += Vt; + } + if (i) { + return eu(t, e); + } else { + return t.indexOf(e) === 0; + } + } + } + function _y(t) { + if (typeof t.size == "number" && typeof t.mtime == "number") { + return t.mtime.toString(29) + t.size.toString(31); + } + } + var at; + var Rt; + var wo; + var Ry; + var Oy; + var oe; + var Lu; + var Ly; + var an; + var My; + var Fy; + var si; + var Mu; + var Fu; + var Ny; + var Nu; + var Wy; + var Wu; + var cn; + var He = g({ + "out-build/vs/platform/files/common/files.js"() { + "use strict"; + + go(); + we(); + Wt(); + _e(); + se(); + be(); + Y(); + H(); + Ie(); + Ta(); + at = q("fileService"); + (function (t) { + t[t.Unknown = 0] = "Unknown"; + t[t.File = 1] = "File"; + t[t.Directory = 2] = "Directory"; + t[t.SymbolicLink = 64] = "SymbolicLink"; + })(Rt ||= {}); + (function (t) { + t[t.Readonly = 1] = "Readonly"; + t[t.Locked = 2] = "Locked"; + })(wo ||= {}); + (function (t) { + t[t.UPDATED = 2] = "UPDATED"; + t[t.ADDED = 4] = "ADDED"; + t[t.DELETED = 8] = "DELETED"; + })(Ry ||= {}); + (function (t) { + t[t.None = 0] = "None"; + t[t.FileReadWrite = 2] = "FileReadWrite"; + t[t.FileOpenReadWriteClose = 4] = "FileOpenReadWriteClose"; + t[t.FileReadStream = 16] = "FileReadStream"; + t[t.FileFolderCopy = 8] = "FileFolderCopy"; + t[t.PathCaseSensitive = 1024] = "PathCaseSensitive"; + t[t.Readonly = 2048] = "Readonly"; + t[t.Trash = 4096] = "Trash"; + t[t.FileWriteUnlock = 8192] = "FileWriteUnlock"; + t[t.FileAtomicRead = 16384] = "FileAtomicRead"; + t[t.FileAtomicWrite = 32768] = "FileAtomicWrite"; + t[t.FileAtomicDelete = 65536] = "FileAtomicDelete"; + t[t.FileClone = 131072] = "FileClone"; + })(Oy ||= {}); + (function (t) { + t.FileExists = "EntryExists"; + t.FileNotFound = "EntryNotFound"; + t.FileNotADirectory = "EntryNotADirectory"; + t.FileIsADirectory = "EntryIsADirectory"; + t.FileExceedsStorageQuota = "EntryExceedsStorageQuota"; + t.FileTooLarge = "EntryTooLarge"; + t.FileWriteLocked = "EntryWriteLocked"; + t.NoPermissions = "NoPermissions"; + t.Unavailable = "Unavailable"; + t.Unknown = "Unknown"; + })(oe ||= {}); + Lu = class eS extends Error { + static create(e, i) { + const s = new eS(e.toString(), i); + Rx(s, i); + return s; + } + constructor(e, i) { + super(e); + this.code = i; + } + }; + (function (t) { + t[t.CREATE = 0] = "CREATE"; + t[t.DELETE = 1] = "DELETE"; + t[t.MOVE = 2] = "MOVE"; + t[t.COPY = 3] = "COPY"; + t[t.WRITE = 4] = "WRITE"; + })(Ly ||= {}); + an = class { + constructor(t, e, i) { + this.resource = t; + this.operation = e; + this.target = i; + } + isOperation(t) { + return this.operation === t; + } + }; + (function (t) { + t[t.UPDATED = 0] = "UPDATED"; + t[t.ADDED = 1] = "ADDED"; + t[t.DELETED = 2] = "DELETED"; + })(My ||= {}); + Fy = class Pf { + static { + this.a = null; + } + constructor(e, i) { + this.c = i; + this.b = undefined; + this.d = new vr(() => { + const s = Pr.forUris(() => this.c); + s.fill(this.rawAdded.map(r => [r, true])); + return s; + }); + this.f = new vr(() => { + const s = Pr.forUris(() => this.c); + s.fill(this.rawUpdated.map(r => [r, true])); + return s; + }); + this.g = new vr(() => { + const s = Pr.forUris(() => this.c); + s.fill(this.rawDeleted.map(r => [r, true])); + return s; + }); + this.rawAdded = []; + this.rawUpdated = []; + this.rawDeleted = []; + for (const s of e) { + switch (s.type) { + case 1: + this.rawAdded.push(s.resource); + break; + case 0: + this.rawUpdated.push(s.resource); + break; + case 2: + this.rawDeleted.push(s.resource); + break; + } + if (this.b !== Pf.a) { + if (typeof s.cId == "number") { + if (this.b === undefined) { + this.b = s.cId; + } else if (this.b !== s.cId) { + this.b = Pf.a; + } + } else if (this.b !== undefined) { + this.b = Pf.a; + } + } + } + } + contains(e, ...i) { + return this.h(e, { + includeChildren: false + }, ...i); + } + affects(e, ...i) { + return this.h(e, { + includeChildren: true + }, ...i); + } + h(e, i, ...s) { + if (!e) { + return false; + } + const r = s.length > 0; + return (!r || !!s.includes(1)) && (!!this.d.value.get(e) || !!i.includeChildren && !!this.d.value.findSuperstr(e)) || (!r || !!s.includes(0)) && (!!this.f.value.get(e) || !!i.includeChildren && !!this.f.value.findSuperstr(e)) || (!r || !!s.includes(2)) && (!!this.g.value.findSubstr(e) || !!i.includeChildren && !!this.g.value.findSuperstr(e)); + } + gotAdded() { + return this.rawAdded.length > 0; + } + gotDeleted() { + return this.rawDeleted.length > 0; + } + gotUpdated() { + return this.rawUpdated.length > 0; + } + correlates(e) { + return this.b === e; + } + hasCorrelation() { + return typeof this.b == "number"; + } + }; + si = class extends Error { + constructor(t, e, i) { + super(t); + this.fileOperationResult = e; + this.options = i; + } + }; + Mu = class extends si { + constructor(t, e, i, s) { + super(t, e, s); + this.fileOperationResult = e; + this.size = i; + } + }; + Fu = class extends si { + constructor(t, e, i) { + super(t, 2, i); + this.stat = e; + } + }; + (function (t) { + t[t.FILE_IS_DIRECTORY = 0] = "FILE_IS_DIRECTORY"; + t[t.FILE_NOT_FOUND = 1] = "FILE_NOT_FOUND"; + t[t.FILE_NOT_MODIFIED_SINCE = 2] = "FILE_NOT_MODIFIED_SINCE"; + t[t.FILE_MODIFIED_SINCE = 3] = "FILE_MODIFIED_SINCE"; + t[t.FILE_MOVE_CONFLICT = 4] = "FILE_MOVE_CONFLICT"; + t[t.FILE_WRITE_LOCKED = 5] = "FILE_WRITE_LOCKED"; + t[t.FILE_PERMISSION_DENIED = 6] = "FILE_PERMISSION_DENIED"; + t[t.FILE_TOO_LARGE = 7] = "FILE_TOO_LARGE"; + t[t.FILE_INVALID_PATH = 8] = "FILE_INVALID_PATH"; + t[t.FILE_NOT_DIRECTORY = 9] = "FILE_NOT_DIRECTORY"; + t[t.FILE_OTHER_ERROR = 10] = "FILE_OTHER_ERROR"; + })(Ny ||= {}); + Nu = { + OFF: "off", + ON_EXIT: "onExit", + ON_EXIT_AND_WINDOW_CLOSE: "onExitAndWindowClose" + }; + (function (t) { + t[t.FILE = 0] = "FILE"; + t[t.FOLDER = 1] = "FOLDER"; + t[t.ROOT_FOLDER = 2] = "ROOT_FOLDER"; + })(Wy ||= {}); + Wu = ""; + cn = class xi { + static { + this.KB = 1024; + } + static { + this.MB = xi.KB * xi.KB; + } + static { + this.GB = xi.MB * xi.KB; + } + static { + this.TB = xi.GB * xi.KB; + } + static formatSize(e) { + if (!Hl(e)) { + e = 0; + } + if (e < xi.KB) { + return v(1915, null, e.toFixed(0)); + } else if (e < xi.MB) { + return v(1916, null, (e / xi.KB).toFixed(2)); + } else if (e < xi.GB) { + return v(1917, null, (e / xi.MB).toFixed(2)); + } else if (e < xi.TB) { + return v(1918, null, (e / xi.GB).toFixed(2)); + } else { + return v(1919, null, (e / xi.TB).toFixed(2)); + } + } + }; + } + }); + var f1; + var Oi; + var Ti = g({ + "out-build/vs/platform/state/node/state.js"() { + "use strict"; + + Y(); + f1 = q("stateReadService"); + Oi = q("stateService"); + } + }); + import ji from "electron"; + var oc; + var Te; + var Ty; + var jy; + var Tu; + var ct = g({ + "out-build/vs/platform/lifecycle/electron-main/lifecycleMainService.js"() { + "use strict"; + + as(); + ce(); + B(); + M(); + H(); + ys(); + _e(); + Y(); + X(); + Ti(); + vt(); + Te = q("lifecycleMainService"); + (function (t) { + t[t.QUIT = 1] = "QUIT"; + t[t.KILL = 2] = "KILL"; + })(Ty ||= {}); + (function (t) { + t[t.Starting = 1] = "Starting"; + t[t.Ready = 2] = "Ready"; + t[t.AfterWindowOpen = 3] = "AfterWindowOpen"; + t[t.Eventually = 4] = "Eventually"; + })(jy ||= {}); + Tu = class extends T { + static { + oc = this; + } + static { + this.b = "lifecycle.quitAndRestart"; + } + get quitRequested() { + return this.j; + } + get wasRestarted() { + return this.m; + } + get phase() { + return this.n; + } + constructor(e, i, s) { + super(); + this.F = e; + this.G = i; + this.H = s; + this.c = this.D(new $()); + this.onBeforeShutdown = this.c.event; + this.f = this.D(new $()); + this.onWillShutdown = this.f.event; + this.g = this.D(new $()); + this.onWillLoadWindow = this.g.event; + this.h = this.D(new $()); + this.onBeforeCloseWindow = this.h.event; + this.j = false; + this.m = false; + this.n = 1; + this.q = new Set(); + this.r = 0; + this.s = 0; + this.t = undefined; + this.u = undefined; + this.w = undefined; + this.y = new Map(); + this.z = new Map(); + this.C = undefined; + this.I(); + this.when(2).then(() => this.J()); + } + I() { + this.m = !!this.G.getItem(oc.b); + if (this.m) { + this.G.removeItem(oc.b); + } + } + J() { + const e = () => { + if (!this.j) { + this.S("Lifecycle#app.on(before-quit)"); + this.j = true; + this.S("Lifecycle#onBeforeShutdown.fire()"); + this.c.fire(); + if (N && this.s === 0) { + this.L(1); + } + } + }; + ji.app.addListener("before-quit", e); + const i = () => { + this.S("Lifecycle#app.on(window-all-closed)"); + if (this.j || !N) { + ji.app.quit(); + } + }; + ji.app.addListener("window-all-closed", i); + ji.app.once("will-quit", s => { + this.S("Lifecycle#app.on(will-quit) - begin"); + s.preventDefault(); + this.L(1).finally(() => { + this.S("Lifecycle#app.on(will-quit) - after fireOnWillShutdown"); + this.O(false); + ji.app.removeListener("before-quit", e); + ji.app.removeListener("window-all-closed", i); + this.S("Lifecycle#app.on(will-quit) - calling app.quit()"); + ji.app.quit(); + }); + }); + } + L(e) { + if (this.w) { + return this.w; + } + const i = this.F; + this.S("Lifecycle#onWillShutdown.fire()"); + const s = []; + this.f.fire({ + reason: e, + join(r, n) { + i.trace(`Lifecycle#onWillShutdown - begin '${r}'`); + s.push(n.finally(() => { + i.trace(`Lifecycle#onWillShutdown - end '${r}'`); + })); + } + }); + this.w = (async () => { + try { + await Tt.settled(s); + } catch (r) { + this.F.error(r); + } + try { + await this.G.close(); + } catch (r) { + this.F.error(r); + } + })(); + return this.w; + } + set phase(e) { + if (e < this.phase) { + throw new Error("Lifecycle cannot go backwards"); + } + if (this.n === e) { + return; + } + this.S(`lifecycle (main): phase changed (value: ${e})`); + this.n = e; + const i = this.z.get(this.n); + if (i) { + i.open(); + this.z.delete(this.n); + } + } + async when(e) { + if (e <= this.n) { + return; + } + let i = this.z.get(e); + if (!i) { + i = new Ga(); + this.z.set(e, i); + } + await i.wait(); + } + registerWindow(e) { + const i = new De(); + this.s++; + i.add(e.onWillLoad(r => this.g.fire({ + window: e, + workspace: r.workspace, + reason: r.reason + }))); + let s = e.win && i.add(x.fromNodeEventEmitter(e.win, "close")(r => { + const n = e.id; + if (this.q.has(n)) { + this.q.delete(n); + return; + } + this.S(`Lifecycle#window.on('close') - window ID ${e.id}`); + r.preventDefault(); + this.unload(e, 1).then(o => { + if (o) { + this.q.delete(n); + return; + } + this.q.add(n); + this.S(`Lifecycle#onBeforeCloseWindow.fire() - window ID ${n}`); + this.h.fire(e); + e.close(); + }); + })); + i.add(e.onDidClose(() => { + this.S(`Lifecycle#window.on('closed') - window ID ${e.id}`); + this.s--; + i.dispose(); + if (this.s === 0 && (!N || this.j)) { + this.L(1); + } + })); + } + registerAuxWindow(e) { + const i = Vl(e.win); + const s = new De(); + s.add(x.fromNodeEventEmitter(i, "close")(r => { + this.S(`Lifecycle#auxWindow.on('close') - window ID ${e.id}`); + if (this.j) { + this.S("Lifecycle#auxWindow.on('close') - preventDefault() because quit requested"); + r.preventDefault(); + } + })); + s.add(x.fromNodeEventEmitter(i, "closed")(() => { + this.S(`Lifecycle#auxWindow.on('closed') - window ID ${e.id}`); + s.dispose(); + })); + } + async reload(e, i) { + if (!(await this.unload(e, 3))) { + e.reload(i); + } + } + unload(e, i) { + const s = this.y.get(e.id); + if (s) { + return s; + } + const r = this.M(e, i).finally(() => { + this.y.delete(e.id); + }); + this.y.set(e.id, r); + return r; + } + async M(e, i) { + if (!e.isReady) { + return false; + } + this.S(`Lifecycle#unload() - window ID ${e.id}`); + const s = this.j ? 2 : i; + const r = await this.P(e, s); + if (r) { + this.S(`Lifecycle#unload() - veto in renderer (window ID ${e.id})`); + return this.N(r); + } else { + await this.Q(e, s); + return false; + } + } + N(e) { + if (e) { + this.O(true); + this.j = false; + return true; + } else { + return false; + } + } + O(e) { + if (this.u) { + this.u(e); + this.u = undefined; + this.t = undefined; + } + } + P(e, i) { + return new Promise(s => { + const r = this.r++; + const n = `vscode:ok${r}`; + const o = `vscode:cancel${r}`; + it.once(n, () => { + s(false); + }); + it.once(o, () => { + s(true); + }); + e.send("vscode:onBeforeUnload", { + okChannel: n, + cancelChannel: o, + reason: i + }); + }); + } + Q(e, i) { + return new Promise(s => { + const n = `vscode:reply${this.r++}`; + it.once(n, () => s()); + e.send("vscode:onWillUnload", { + replyChannel: n, + reason: i + }); + }); + } + quit(e) { + return this.R(e).then(i => { + if (!i && e) { + try { + if (j) { + const s = bs(); + if (s !== process.cwd()) { + process.chdir(s); + } + } + } catch (s) { + this.F.error(s); + } + } + return i; + }); + } + R(e) { + this.S(`Lifecycle#quit() - begin (willRestart: ${e})`); + if (this.t) { + this.S("Lifecycle#quit() - returning pending quit promise"); + return this.t; + } else { + if (e) { + this.G.setItem(oc.b, true); + } + this.t = new Promise(i => { + this.u = i; + this.S("Lifecycle#quit() - calling app.quit()"); + ji.app.quit(); + }); + return this.t; + } + } + S(e) { + if (this.H.args["enable-smoke-test-driver"]) { + this.F.info(e); + } else { + this.F.trace(e); + } + } + setRelaunchHandler(e) { + this.C = e; + } + async relaunch(e) { + this.S("Lifecycle#relaunch()"); + const i = process.argv.slice(1); + if (e?.addArgs) { + i.push(...e.addArgs); + } + if (e?.removeArgs) { + for (const n of e.removeArgs) { + const o = i.indexOf(n); + if (o >= 0) { + i.splice(o, 1); + } + } + } + const s = () => { + if (!this.C?.handleRelaunch(e)) { + this.S("Lifecycle#relaunch() - calling app.relaunch()"); + ji.app.relaunch({ + args: i + }); + } + }; + ji.app.once("quit", s); + if (await this.quit(true)) { + ji.app.removeListener("quit", s); + } + } + async kill(e) { + this.S("Lifecycle#kill()"); + await this.L(2); + await Promise.race([wi(1000), (async () => { + for (const i of ji.BrowserWindow.getAllWindows()) { + if (i && !i.isDestroyed()) { + let s; + if (i.webContents && !i.webContents.isDestroyed()) { + s = new Promise(r => i.once("closed", r)); + } else { + s = Promise.resolve(); + } + i.destroy(); + await s; + } + } + })()]); + ji.app.exit(e); + } + }; + Tu = oc = __decorate([__param(0, V), __param(1, Oi), __param(2, ot)], Tu); + } + }); + var Is; + var bi; + var ac; + var p1; + var Uy = g({ + "out-build/vs/base/parts/storage/common/storage.js"() { + "use strict"; + + ce(); + B(); + M(); + hu(); + _e(); + (function (t) { + t[t.STORAGE_DOES_NOT_EXIST = 0] = "STORAGE_DOES_NOT_EXIST"; + t[t.STORAGE_IN_MEMORY = 1] = "STORAGE_IN_MEMORY"; + })(Is ||= {}); + (function (t) { + t[t.None = 0] = "None"; + t[t.Initialized = 1] = "Initialized"; + t[t.Closed = 2] = "Closed"; + })(bi ||= {}); + ac = class tS extends T { + static { + this.a = 100; + } + constructor(e, i = Object.create(null)) { + super(); + this.q = e; + this.r = i; + this.b = this.D(new zl()); + this.onDidChangeStorage = this.b.event; + this.c = bi.None; + this.f = new Map(); + this.g = this.D(new Ys(tS.a)); + this.h = new Set(); + this.j = new Map(); + this.m = undefined; + this.n = []; + this.s(); + } + s() { + this.D(this.q.onDidChangeItemsExternal(e => this.t(e))); + } + t(e) { + this.b.pause(); + try { + e.changed?.forEach((i, s) => this.u(s, i)); + e.deleted?.forEach(i => this.u(i, undefined)); + } finally { + this.b.resume(); + } + } + u(e, i) { + if (this.c === bi.Closed) { + return; + } + let s = false; + if (Qt(i)) { + s = this.f.delete(e); + } else if (this.f.get(e) !== i) { + this.f.set(e, i); + s = true; + } + if (s) { + this.b.fire({ + key: e, + external: true + }); + } + } + get items() { + return this.f; + } + get size() { + return this.f.size; + } + async init() { + if (this.c === bi.None) { + this.c = bi.Initialized; + if (this.r.hint !== Is.STORAGE_DOES_NOT_EXIST) { + this.f = await this.q.getItems(); + } + } + } + cursorDiskKVGet(e) { + return this.q.cursorDiskKVGet(e); + } + cursorDiskKVSet(e, i) { + return this.q.cursorDiskKVSet(e, i); + } + cursorDiskKVClearPrefix(e) { + return this.q.cursorDiskKVClearPrefix(e); + } + get(e, i) { + const s = this.f.get(e); + if (Qt(s)) { + return i; + } else { + return s; + } + } + getBoolean(e, i) { + const s = this.get(e); + if (Qt(s)) { + return i; + } else { + return s === "true"; + } + } + getNumber(e, i) { + const s = this.get(e); + if (Qt(s)) { + return i; + } else { + return parseInt(s, 10); + } + } + getObject(e, i) { + const s = this.get(e); + if (Qt(s)) { + return i; + } else { + return qk(s); + } + } + async set(e, i, s = false) { + if (this.c === bi.Closed) { + return; + } + if (Qt(i)) { + return this.delete(e, s); + } + const r = Nt(i) || Array.isArray(i) ? Bk(i) : String(i); + if (this.f.get(e) !== r) { + this.f.set(e, r); + this.j.set(e, r); + this.h.delete(e); + this.b.fire({ + key: e, + external: s + }); + return this.C(); + } + } + async delete(e, i = false) { + if (this.c !== bi.Closed && !!this.f.delete(e)) { + if (!this.h.has(e)) { + this.h.add(e); + } + this.j.delete(e); + this.b.fire({ + key: e, + external: i + }); + return this.C(); + } + } + async optimize() { + if (this.c !== bi.Closed) { + await this.flush(0); + return this.q.optimize(); + } + } + async close() { + this.m ||= this.w(); + return this.m; + } + async w() { + this.c = bi.Closed; + try { + await this.C(0); + } catch {} + await this.q.close(() => this.f); + } + get y() { + return this.j.size > 0 || this.h.size > 0; + } + async z() { + if (!this.y) { + return; + } + const e = { + insert: this.j, + delete: this.h + }; + this.h = new Set(); + this.j = new Map(); + return this.q.updateItems(e).finally(() => { + if (!this.y) { + while (this.n.length) { + this.n.pop()?.(); + } + } + }); + } + async flush(e) { + if (this.c !== bi.Closed && !this.m) { + return this.C(e); + } + } + async C(e) { + if (this.r.hint === Is.STORAGE_IN_MEMORY) { + return this.z(); + } else { + return this.g.trigger(() => this.z(), e); + } + } + async whenFlushed() { + if (this.y) { + return new Promise(e => this.n.push(e)); + } + } + isInMemory() { + return this.r.hint === Is.STORAGE_IN_MEMORY; + } + }; + p1 = class { + constructor() { + this.onDidChangeItemsExternal = x.None; + this.a = new Map(); + } + async getItems() { + return this.a; + } + async cursorDiskKVGet(t) {} + async cursorDiskKVSet(t, e) {} + async cursorDiskKVClearPrefix(t) {} + async updateItems(t) { + t.insert?.forEach((e, i) => this.a.set(i, e)); + t.delete?.forEach(e => this.a.delete(e)); + } + async optimize() {} + async close() {} + }; + } + }); + function Li(t) { + const e = t; + return typeof e?.id == "string" && P.isUri(e.uri); + } + function ju(t, e) { + if (typeof t == "string" || typeof t === "undefined") { + if (typeof t == "string") { + return { + id: Ue(t) + }; + } else if (e) { + return qy; + } else { + return zy; + } + } + const i = t; + if (i.configuration) { + return { + id: i.id, + configPath: i.configuration + }; + } else if (i.folders.length === 1) { + return { + id: i.id, + uri: i.folders[0].uri + }; + } else { + return { + id: i.id + }; + } + } + function Kt(t) { + const e = t; + return typeof e?.id == "string" && P.isUri(e.configPath); + } + function Lx(t) { + const e = t; + if (e?.uri) { + return { + id: e.id, + uri: P.revive(e.uri) + }; + } + const i = t; + if (i?.configPath) { + return { + id: i.id, + configPath: P.revive(i.configPath) + }; + } + if (t?.id) { + return { + id: t.id + }; + } + } + function By(t, e) { + return tt.isEqualOrParent(t, e.untitledWorkspacesHome); + } + function ln(t) { + return (typeof t == "string" ? Kl(t) : Mv(t)) === Gy; + } + var Mx; + var qy; + var zy; + var Hy; + var Vy; + var cc; + var Gy; + var Jy; + var g1; + var ri = g({ + "out-build/vs/platform/workspace/common/workspace.js"() { + "use strict"; + + be(); + we(); + go(); + nt(); + se(); + Y(); + Ie(); + Mx = q("contextService"); + qy = { + id: "ext-dev" + }; + zy = { + id: "empty-window" + }; + (function (t) { + t[t.EMPTY = 1] = "EMPTY"; + t[t.FOLDER = 2] = "FOLDER"; + t[t.WORKSPACE = 3] = "WORKSPACE"; + })(Hy ||= {}); + Vy = class { + constructor(t, e) { + this.raw = e; + this.uri = t.uri; + this.index = t.index; + this.name = t.name; + } + toResource(t) { + return he(this.uri, t); + } + toJSON() { + return { + uri: this.uri, + name: this.name, + index: this.index + }; + } + }; + cc = "code-workspace"; + Gy = `.${cc}`; + Jy = [{ + name: v(2533, null), + extensions: [cc] + }]; + g1 = "workspace.json"; + } + }); + var yi; + var As = g({ + "out-build/vs/platform/uriIdentity/common/uriIdentity.js"() { + "use strict"; + + Y(); + yi = q("IUriIdentityService"); + } + }); + function Fx(t) { + const e = t; + return !!e && typeof e == "object" && typeof e.id == "string" && typeof e.isDefault == "boolean" && typeof e.name == "string" && !!P.isUri(e.location) && !!P.isUri(e.globalStorageHome) && !!P.isUri(e.settingsResource) && !!P.isUri(e.keybindingsResource) && !!P.isUri(e.tasksResource) && !!P.isUri(e.snippetsHome) && !!P.isUri(e.extensionsResource); + } + function Uu(t, e, i, s, r, n) { + return { + id: t, + name: e, + location: i, + isDefault: false, + icon: r?.icon, + globalStorageHome: n && r?.useDefaultFlags?.globalState ? n.globalStorageHome : he(i, "globalStorage"), + settingsResource: n && r?.useDefaultFlags?.settings ? n.settingsResource : he(i, "settings.json"), + keybindingsResource: n && r?.useDefaultFlags?.keybindings ? n.keybindingsResource : he(i, "keybindings.json"), + tasksResource: n && r?.useDefaultFlags?.tasks ? n.tasksResource : he(i, "tasks.json"), + snippetsHome: n && r?.useDefaultFlags?.snippets ? n.snippetsHome : he(i, "snippets"), + extensionsResource: n && r?.useDefaultFlags?.extensions ? n.extensionsResource : he(i, "extensions.json"), + cacheHome: he(s, t), + useDefaultFlags: r?.useDefaultFlags, + isTransient: r?.transient, + workspaces: r?.workspaces + }; + } + var Ky; + var Cs; + var Bu; + var _s = g({ + "out-build/vs/platform/userDataProfile/common/userDataProfile.js"() { + "use strict"; + + er(); + B(); + M(); + nt(); + se(); + be(); + Ri(); + He(); + Y(); + X(); + ri(); + As(); + ce(); + _i(); + Wt(); + _e(); + (function (t) { + t.Settings = "settings"; + t.Keybindings = "keybindings"; + t.Snippets = "snippets"; + t.Tasks = "tasks"; + t.Extensions = "extensions"; + t.GlobalState = "globalState"; + })(Ky ||= {}); + Cs = q("IUserDataProfilesService"); + Bu = class extends T { + static { + this.b = "userDataProfiles"; + } + static { + this.c = "profileAssociations"; + } + get defaultProfile() { + return this.profiles[0]; + } + get profiles() { + return [...this.z.profiles, ...this.q.profiles]; + } + constructor(e, i, s, r) { + super(); + this.r = e; + this.s = i; + this.t = s; + this.u = r; + this.g = this.D(new $()); + this.onDidChangeProfiles = this.g.event; + this.h = this.D(new $()); + this.onWillCreateProfile = this.h.event; + this.j = this.D(new $()); + this.onWillRemoveProfile = this.j.event; + this.m = this.D(new $()); + this.onDidResetWorkspaces = this.m.event; + this.n = new Map(); + this.q = { + profiles: [], + emptyWindows: new Map() + }; + this.profilesHome = he(this.r.userRoamingDataHome, "profiles"); + this.f = he(this.r.cacheHome, "CachedProfilesData"); + } + init() { + this.y = undefined; + } + get z() { + if (!this.y) { + const e = this.C(); + const i = [e]; + try { + for (const r of this.N()) { + if (!r.name || !wt(r.name) || !r.location) { + this.u.warn("Skipping the invalid stored profile", r.location || r.name); + continue; + } + i.push(Uu(ks(r.location), r.name, r.location, this.f, { + icon: r.icon, + useDefaultFlags: r.useDefaultFlags + }, e)); + } + } catch (r) { + this.u.error(r); + } + const s = new Map(); + if (i.length) { + try { + const r = this.P(); + if (r.workspaces) { + for (const [n, o] of Object.entries(r.workspaces)) { + const a = P.parse(n); + const c = i.find(l => l.id === o); + if (c) { + const l = c.workspaces ? c.workspaces.slice(0) : []; + l.push(a); + c.workspaces = l; + } + } + } + if (r.emptyWindows) { + for (const [n, o] of Object.entries(r.emptyWindows)) { + const a = i.find(c => c.id === o); + if (a) { + s.set(n, a); + } + } + } + } catch (r) { + this.u.error(r); + } + } + this.y = { + profiles: i, + emptyWindows: s + }; + } + return this.y; + } + C() { + const e = Uu("__default__profile__", v(2486, null), this.r.userRoamingDataHome, this.f); + return { + ...e, + extensionsResource: this.R() ?? e.extensionsResource, + isDefault: true + }; + } + async createTransientProfile(e) { + const i = "Temp"; + const s = new RegExp(`${ja(i)}\\s(\\d+)`); + let r = 0; + for (const o of this.profiles) { + const a = s.exec(o.name); + const c = a ? parseInt(a[1]) : 0; + r = c > r ? c : r; + } + const n = `${i} ${r + 1}`; + return this.createProfile(Ds(ti()).toString(16), n, { + transient: true + }, e); + } + async createNamedProfile(e, i, s) { + return this.createProfile(Ds(ti()).toString(16), e, i, s); + } + async createProfile(e, i, s, r) { + return await this.F(e, i, s, r); + } + async F(e, i, s, r) { + if (!wt(i) || !i) { + throw new Error("Name of the profile is mandatory and must be of type `string`"); + } + let n = this.n.get(i); + if (!n) { + n = (async () => { + try { + if (this.profiles.find(u => u.id === e || !u.isTransient && !s?.transient && u.name === i)) { + throw new Error(`Profile with ${i} name already exists`); + } + const a = r ? this.G(r) : undefined; + if (P.isUri(a)) { + s = { + ...s, + workspaces: [a] + }; + } + const c = Uu(e, i, he(this.profilesHome, e), this.f, s, this.defaultProfile); + await this.s.createFolder(c.location); + const l = []; + this.h.fire({ + profile: c, + join(u) { + l.push(u); + } + }); + await Tt.settled(l); + if (a && !P.isUri(a)) { + this.L(a, c, !!c.isTransient); + } + this.I([c], [], []); + return c; + } finally { + this.n.delete(i); + } + })(); + this.n.set(i, n); + } + return n; + } + async updateProfile(e, i) { + const s = []; + for (const n of this.profiles) { + let o; + if (e.id === n.id) { + if (n.isDefault) { + if (i.workspaces) { + o = n; + o.workspaces = i.workspaces; + } + } else { + o = Uu(n.id, i.name ?? n.name, n.location, this.f, { + icon: i.icon === null ? undefined : i.icon ?? n.icon, + transient: i.transient ?? n.isTransient, + useDefaultFlags: i.useDefaultFlags ?? n.useDefaultFlags, + workspaces: i.workspaces ?? n.workspaces + }, this.defaultProfile); + } + } else if (i.workspaces) { + const a = n.workspaces?.filter(c => !i.workspaces?.some(l => this.t.extUri.isEqual(c, l))); + if (n.workspaces?.length !== a?.length) { + o = n; + o.workspaces = a; + } + } + if (o) { + s.push(o); + } + } + if (!s.length) { + throw e.isDefault ? new Error("Cannot update default profile") : new Error(`Profile '${e.name}' does not exist`); + } + this.I([], [], s); + const r = this.profiles.find(n => n.id === e.id); + if (!r) { + throw new Error(`Profile '${e.name}' was not updated`); + } + return r; + } + async removeProfile(e) { + if (e.isDefault) { + throw new Error("Cannot remove default profile"); + } + const i = this.profiles.find(r => r.id === e.id); + if (!i) { + throw new Error(`Profile '${e.name}' does not exist`); + } + const s = []; + this.j.fire({ + profile: i, + join(r) { + s.push(r); + } + }); + try { + await Promise.allSettled(s); + } catch (r) { + this.u.error(r); + } + this.I([], [i], []); + try { + await this.s.del(i.cacheHome, { + recursive: true + }); + } catch (r) { + if ($s(r) !== 1) { + this.u.error(r); + } + } + } + async setProfileForWorkspace(e, i) { + const s = this.profiles.find(n => n.id === i.id); + if (!s) { + throw new Error(`Profile '${i.name}' does not exist`); + } + const r = this.G(e); + if (P.isUri(r)) { + const n = s.workspaces ? [...s.workspaces] : []; + if (!n.some(o => this.t.extUri.isEqual(o, r))) { + n.push(r); + await this.updateProfile(s, { + workspaces: n + }); + } + } else { + this.L(r, s, false); + this.M(this.profiles); + } + } + unsetWorkspace(e, i = false) { + const s = this.G(e); + if (P.isUri(s)) { + const r = this.getProfileForWorkspace(e); + if (r) { + this.updateProfile(r, { + workspaces: r.workspaces?.filter(n => !this.t.extUri.isEqual(n, s)) + }); + } + } else { + this.L(s, undefined, i); + this.M(this.profiles); + } + } + async resetWorkspaces() { + this.q.emptyWindows.clear(); + this.z.emptyWindows.clear(); + for (const e of this.profiles) { + e.workspaces = undefined; + } + this.I([], [], this.profiles); + this.m.fire(); + } + async cleanUp() { + if (await this.s.exists(this.profilesHome)) { + const e = await this.s.resolve(this.profilesHome); + await Promise.all((e.children || []).filter(i => i.isDirectory && this.profiles.every(s => !this.t.extUri.isEqual(s.location, i.resource))).map(i => this.s.del(i.resource, { + recursive: true + }))); + } + } + async cleanUpTransientProfiles() { + const e = this.q.profiles.filter(i => !this.H(i)); + await Promise.allSettled(e.map(i => this.removeProfile(i))); + } + getProfileForWorkspace(e) { + const i = this.G(e); + if (P.isUri(i)) { + return this.profiles.find(s => s.workspaces?.some(r => this.t.extUri.isEqual(r, i))); + } else { + return this.z.emptyWindows.get(i) ?? this.q.emptyWindows.get(i); + } + } + G(e) { + if (Li(e)) { + return e.uri; + } else if (Kt(e)) { + return e.configPath; + } else { + return e.id; + } + } + H(e) { + return !!e.workspaces?.length || !![...this.z.emptyWindows.values()].some(i => this.t.extUri.isEqual(i.location, e.location)) || !![...this.q.emptyWindows.values()].some(i => this.t.extUri.isEqual(i.location, e.location)); + } + I(e, i, s) { + const r = [...this.profiles, ...e]; + const n = this.q.profiles; + this.q.profiles = []; + const o = []; + for (let a of r) { + if (i.some(c => a.id === c.id)) { + for (const c of [...this.z.emptyWindows.keys()]) { + if (a.id === this.z.emptyWindows.get(c)?.id) { + this.z.emptyWindows.delete(c); + } + } + continue; + } + if (!a.isDefault) { + a = s.find(l => a.id === l.id) ?? a; + const c = n.find(l => a.id === l.id); + if (a.isTransient) { + this.q.profiles.push(a); + } else if (c) { + for (const [l, u] of this.q.emptyWindows.entries()) { + if (a.id === u.id) { + this.q.emptyWindows.delete(l); + this.z.emptyWindows.set(l, a); + break; + } + } + } + } + if (a.workspaces?.length === 0) { + a.workspaces = undefined; + } + o.push(a); + } + this.M(o); + this.J(e, i, s); + } + J(e, i, s) { + this.g.fire({ + added: e, + removed: i, + updated: s, + all: this.profiles + }); + } + L(e, i, s) { + s = i?.isTransient ? true : s; + if (s) { + if (i) { + this.q.emptyWindows.set(e, i); + } else { + this.q.emptyWindows.delete(e); + } + } else { + this.q.emptyWindows.delete(e); + if (i) { + this.z.emptyWindows.set(e, i); + } else { + this.z.emptyWindows.delete(e); + } + } + } + M(e) { + const i = []; + const s = {}; + const r = {}; + for (const n of e) { + if (!n.isTransient && (n.isDefault || i.push({ + location: n.location, + name: n.name, + icon: n.icon, + useDefaultFlags: n.useDefaultFlags + }), n.workspaces)) { + for (const o of n.workspaces) { + s[o.toString()] = n.id; + } + } + } + for (const [n, o] of this.z.emptyWindows.entries()) { + r[n.toString()] = o.id; + } + this.Q({ + workspaces: s, + emptyWindows: r + }); + this.O(i); + this.y = undefined; + } + N() { + return []; + } + O(e) { + throw new Error("not implemented"); + } + P() { + return {}; + } + Q(e) { + throw new Error("not implemented"); + } + R() {} + }; + Bu = __decorate([__param(0, Yi), __param(1, at), __param(2, yi), __param(3, V)], Bu); + } + }); + function m1(t) { + const e = t.get(sr); + if (e) { + try { + return JSON.parse(e); + } catch {} + } + return Object.create(null); + } + function w1(t) { + return t.isDefault || !!t.useDefaultFlags?.globalState; + } + async function Nx(t, e, i, s, r, n) { + const o = m => { + try { + return JSON.parse(m); + } catch { + return m; + } + }; + const a = new Map(); + const c = new Map(); + t.forEach((m, y) => { + a.set(y, m); + c.set(y, o(m)); + }); + const l = new Map(); + const u = new Map(); + e.forEach((m, y) => { + l.set(y, m); + u.set(y, o(m)); + }); + const d = new Map(); + const f = new Map(); + i.forEach((m, y) => { + d.set(y, m); + f.set(y, o(m)); + }); + console.group(s !== r ? `Storage: Application (path: ${s})` : `Storage: Application & Profile (path: ${s}, default profile)`); + const p = []; + a.forEach((m, y) => { + p.push({ + key: y, + value: m + }); + }); + console.table(p); + console.groupEnd(); + console.log(c); + if (s !== r) { + console.group(`Storage: Profile (path: ${r}, profile specific)`); + const m = []; + l.forEach((y, b) => { + m.push({ + key: b, + value: y + }); + }); + console.table(m); + console.groupEnd(); + console.log(u); + } + console.group(`Storage: Workspace (path: ${n})`); + const w = []; + d.forEach((m, y) => { + w.push({ + key: y, + value: m + }); + }); + console.table(w); + console.groupEnd(); + console.log(f); + } + var lc; + var sr; + var Wx; + var vo; + var Zy; + var Yy; + var Xy; + var v1 = g({ + "out-build/vs/platform/storage/common/storage.js"() { + "use strict"; + + ce(); + B(); + M(); + Hs(); + _e(); + Uy(); + Y(); + _s(); + lc = "__$__isNewStorageMarker"; + sr = "__$__targetStorageMarker"; + Wx = q("storageService"); + (function (t) { + t[t.NONE = 0] = "NONE"; + t[t.SHUTDOWN = 1] = "SHUTDOWN"; + })(vo ||= {}); + (function (t) { + t[t.APPLICATION = -1] = "APPLICATION"; + t[t.PROFILE = 0] = "PROFILE"; + t[t.WORKSPACE = 1] = "WORKSPACE"; + })(Zy ||= {}); + (function (t) { + t[t.USER = 0] = "USER"; + t[t.MACHINE = 1] = "MACHINE"; + })(Yy ||= {}); + Xy = class iS extends T { + static { + this.a = 60000; + } + constructor(e = { + flushInterval: iS.a + }) { + super(); + this.n = e; + this.b = this.D(new zl()); + this.f = this.D(new zl()); + this.onDidChangeTarget = this.f.event; + this.g = this.D(new $()); + this.onWillSaveState = this.g.event; + this.j = this.D(new os(() => this.q(), this.n.flushInterval)); + this.m = this.D(new pr()); + this.C = undefined; + this.G = undefined; + this.I = undefined; + this.N = []; + } + onDidChangeValue(e, i, s) { + return x.filter(this.b.event, r => r.scope === e && (i === undefined || r.key === i), s); + } + q() { + this.m.value = Rp(() => { + if (this.r()) { + this.flush(); + } + this.j.schedule(); + }); + } + r() { + return true; + } + t() { + Et([this.m, this.j]); + } + initialize() { + this.h ||= (async () => { + Ne("code/willInitStorage"); + try { + await this.Q(); + } finally { + Ne("code/didInitStorage"); + } + this.j.schedule(); + })(); + return this.h; + } + u(e, i) { + const { + key: s, + external: r + } = i; + if (s === sr) { + switch (e) { + case -1: + this.I = undefined; + break; + case 0: + this.G = undefined; + break; + case 1: + this.C = undefined; + break; + } + this.f.fire({ + scope: e + }); + } else { + this.b.fire({ + scope: e, + key: s, + target: this.L(e)[s], + external: r + }); + } + } + w(e) { + this.g.fire({ + reason: e + }); + } + get(e, i, s) { + return this.R(i)?.get(e, s); + } + getBoolean(e, i, s) { + return this.R(i)?.getBoolean(e, s); + } + getNumber(e, i, s) { + return this.R(i)?.getNumber(e, s); + } + getObject(e, i, s) { + return this.R(i)?.getObject(e, s); + } + storeAll(e, i) { + this.y(() => { + for (const s of e) { + this.store(s.key, s.value, s.scope, s.target, i); + } + }); + } + store(e, i, s, r, n = false) { + if (Qt(i)) { + this.remove(e, s, n); + return; + } + this.y(() => { + this.z(e, s, r); + this.R(s)?.set(e, i, n); + }); + } + remove(e, i, s = false) { + this.y(() => { + this.z(e, i, undefined); + this.R(i)?.delete(e, s); + }); + } + y(e) { + this.b.pause(); + this.f.pause(); + try { + e(); + } finally { + this.b.resume(); + this.f.resume(); + } + } + keys(e, i) { + const s = []; + const r = this.L(e); + for (const n of Object.keys(r)) { + if (r[n] === i) { + s.push(n); + } + } + return s; + } + z(e, i, s, r = false) { + const n = this.L(i); + if (typeof s == "number") { + if (n[e] !== s) { + n[e] = s; + this.R(i)?.set(sr, JSON.stringify(n), r); + } + } else if (typeof n[e] == "number") { + delete n[e]; + this.R(i)?.set(sr, JSON.stringify(n), r); + } + } + get F() { + this.C ||= this.M(1); + return this.C; + } + get H() { + this.G ||= this.M(0); + return this.G; + } + get J() { + this.I ||= this.M(-1); + return this.I; + } + L(e) { + switch (e) { + case -1: + return this.J; + case 0: + return this.H; + default: + return this.F; + } + } + M(e) { + const i = this.R(e); + if (i) { + return m1(i); + } else { + return Object.create(null); + } + } + isNew(e) { + return this.getBoolean(lc, e) === true; + } + async cursorDiskKVGet(e) { + return this.R(-1)?.cursorDiskKVGet(e); + } + async cursorDiskKVSet(e, i) { + return this.R(-1)?.cursorDiskKVSet(e, i); + } + async cursorDiskKVClearPrefix(e) { + return this.R(-1)?.cursorDiskKVClearPrefix(e); + } + cursorDiskKVOnShouldSave(e) { + this.N.push(e); + return { + dispose: () => { + this.N = this.N.filter(i => i !== e); + } + }; + } + async flush(e = vo.NONE) { + this.g.fire({ + reason: e + }); + const i = this.R(-1); + const s = this.R(0); + const r = this.R(1); + switch (e) { + case vo.NONE: + for (const n of this.N) { + try { + n().catch(console.error); + } catch {} + } + await Tt.settled([i?.whenFlushed() ?? Promise.resolve(), s?.whenFlushed() ?? Promise.resolve(), r?.whenFlushed() ?? Promise.resolve()]); + break; + case vo.SHUTDOWN: + for (const n of this.N) { + try { + await n(); + } catch (o) { + console.error(o); + } + } + await Tt.settled([i?.flush(0) ?? Promise.resolve(), s?.flush(0) ?? Promise.resolve(), r?.flush(0) ?? Promise.resolve()]); + break; + } + } + async log() { + const e = this.R(-1)?.items ?? new Map(); + const i = this.R(0)?.items ?? new Map(); + const s = this.R(1)?.items ?? new Map(); + return Nx(e, i, s, this.S(-1) ?? "", this.S(0) ?? "", this.S(1) ?? ""); + } + async optimize(e) { + await this.flush(); + return this.R(e)?.optimize(); + } + async switch(e, i) { + this.w(vo.NONE); + if (Fx(e)) { + return this.U(e, i); + } else { + return this.W(e, i); + } + } + O(e, i) { + return e.id !== i.id && (!w1(i) || !w1(e)); + } + P(e, i, s) { + this.y(() => { + const r = new Set(); + for (const [n, o] of e) { + r.add(n); + if (i.get(n) !== o) { + this.u(s, { + key: n, + external: true + }); + } + } + for (const [n] of i.items) { + if (!r.has(n)) { + this.u(s, { + key: n, + external: true + }); + } + } + }); + } + }; + } + }); + var Tx; + var Qy; + var e4; + var qu; + var jx; + var t4; + var Ux; + var i4; + var s4; + var r4; + var n4; + var b1 = g({ + "out-build/vs/base/common/constants.js"() { + "use strict"; + + Tx = Date.now(); + Qy = false; + e4 = "cursorai.action.windowInWindowDidShow"; + qu = "src.vs.platform.reactivestorage.browser.reactiveStorageServiceImpl.persistentStorage"; + jx = `${qu}.applicationUser`; + t4 = `${qu}.workspaceUser`; + Ux = `${qu}.applicationUser.subscription`; + i4 = "workbench.panel.aichat.view"; + s4 = i4 + ".aichat.chatdata"; + r4 = "composer.composerData"; + n4 = "workbench.bugbot.data"; + } + }); + import * as o4 from "fs"; + var uc; + var a4; + var Bx = g({ + "out-build/vs/base/parts/storage/node/storage.js"() { + "use strict"; + + ce(); + B(); + $i(); + we(); + _t(); + b1(); + uc = class jn { + static { + this.IN_MEMORY_PATH = ":memory:"; + } + get onDidChangeItemsExternal() { + return x.None; + } + static { + this.a = 2000; + } + static { + this.b = 256; + } + constructor(e, i = Object.create(null)) { + this.g = e; + this.h = i; + this.c = Ue(this.g); + this.d = new a4(this.h.logging); + this.f = this.n(this.g); + } + async cursorDiskKVGet(e) { + const i = await this.f; + try { + const s = await this.s(i, "SELECT value FROM cursorDiskKV WHERE key = ?", [e]); + if (!s) { + return; + } + const r = s.value; + if (r == null || typeof r != "string") { + return undefined; + } else { + return r; + } + } catch (s) { + this.d.error(`[storage ${this.c}] cursorDiskKVGet(${e}): ${s}`); + return; + } + } + async cursorDiskKVSet(e, i) { + const s = await this.f; + try { + await this.y(s, "INSERT INTO cursorDiskKV (key, value) VALUES (?, ?)", [e, i]); + } catch (r) { + this.d.error(`[storage ${this.c}] cursorDiskKVSet(${e}): ${r}`); + throw r; + } + } + async cursorDiskKVClearPrefix(e) { + const i = await this.f; + try { + await this.y(i, "DELETE FROM cursorDiskKV WHERE key LIKE ? || '%'", [e]); + } catch (s) { + this.d.error(`[storage ${this.c}] cursorDiskKVClearPrefix(${e}): ${s}`); + throw s; + } + } + async getItems() { + const e = await this.f; + const i = new Map(); + await Promise.allSettled([this.t(e, t4, { + timeout: 10000, + maxSizeBytes: 104857600 + }), this.t(e, s4, { + timeout: 10000, + maxSizeBytes: 104857600 + }), this.t(e, r4, { + timeout: 10000, + maxSizeBytes: 104857600 + }), this.t(e, n4, { + timeout: 10000, + maxSizeBytes: 52428800 + })]); + (await this.v(e, "SELECT * FROM ItemTable")).forEach(r => i.set(r.key, r.value)); + if (this.d.isTracing) { + this.d.trace(`[storage ${this.c}] getItems(): ${i.size} rows`); + } + return i; + } + async updateItems(e) { + const i = await this.f; + return this.j(i, e); + } + j(e, i) { + if (this.d.isTracing) { + this.d.trace(`[storage ${this.c}] updateItems(): insert(${i.insert ? QS(i.insert) : "0"}), delete(${i.delete ? eE(i.delete) : "0"})`); + } + return this.w(e, () => { + const s = i.insert; + const r = i.delete; + if (s && s.size > 0) { + const n = []; + n.push([]); + let o = 0; + s.forEach((a, c) => { + let l = n[o]; + if (l.length > jn.b) { + o++; + l = []; + n.push(l); + } + l.push(c, a); + }); + n.forEach(a => { + this.x(e, `INSERT INTO ItemTable VALUES ${new Array(a.length / 2).fill("(?,?)").join(",")}`, c => c.run(a), () => { + const c = []; + let l = 0; + s.forEach((u, d) => { + c.push(d); + l += u.length; + }); + return `Keys: ${c.join(", ")} Length: ${l}`; + }); + }); + } + if (r && r.size) { + const n = []; + n.push([]); + let o = 0; + r.forEach(a => { + let c = n[o]; + if (c.length > jn.b) { + o++; + c = []; + n.push(c); + } + c.push(a); + }); + n.forEach(a => { + this.x(e, `DELETE FROM ItemTable WHERE key IN (${new Array(a.length).fill("?").join(",")})`, c => c.run(a), () => { + const c = []; + r.forEach(l => { + c.push(l); + }); + return `Keys: ${c.join(", ")}`; + }); + }); + } + }); + } + async optimize() { + this.d.trace(`[storage ${this.c}] vacuum()`); + const e = await this.f; + return this.q(e, "VACUUM"); + } + async close(e) { + this.d.trace(`[storage ${this.c}] close()`); + const i = await this.f; + return this.k(i, e); + } + k(e, i) { + return new Promise((s, r) => { + e.db.close(n => { + if (n) { + this.o(e, `[storage ${this.c}] close(): ${n}`); + } + if (this.g === jn.IN_MEMORY_PATH) { + return s(); + } else if (!e.isErroneous && !e.isInMemory) { + return this.l().then(s, o => { + this.d.error(`[storage ${this.c}] backup(): ${o}`); + return s(); + }); + } else if (typeof i == "function") { + return o4.promises.unlink(this.g).then(() => this.p(this.g).then(o => { + const a = () => this.k(o, undefined); + return this.j(o, { + insert: i() + }).then(() => a(), c => { + a(); + return Promise.reject(c); + }); + })).then(s, r); + } else { + return r(n || new Error("Database has errors or is in-memory without recovery option")); + } + }); + }); + } + l() { + const e = this.m(this.g); + return ee.copy(this.g, e, { + preserveSymlinks: false + }); + } + m(e) { + return `${e}.backup`; + } + async checkIntegrity(e) { + this.d.trace(`[storage ${this.c}] checkIntegrity(full: ${e})`); + const i = await this.f; + const s = await this.r(i, e ? "PRAGMA integrity_check" : "PRAGMA quick_check"); + const r = e ? s.integrity_check : s.quick_check; + if (i.isErroneous) { + return `${r} (last error: ${i.lastError})`; + } else if (i.isInMemory) { + return `${r} (in-memory!)`; + } else { + return r; + } + } + async n(e, i = true) { + this.d.trace(`[storage ${this.c}] open(${e}, retryOnBusy: ${i})`); + try { + return await this.p(e); + } catch (s) { + this.d.error(`[storage ${this.c}] open(): Unable to open DB due to ${s}`); + if (s.code === "SQLITE_BUSY" && i) { + await wi(jn.a); + return this.n(e, false); + } + try { + await o4.promises.unlink(e); + try { + await ee.rename(this.m(e), e, false); + } catch {} + return await this.p(e); + } catch (r) { + this.d.error(`[storage ${this.c}] open(): Unable to use backup due to ${r}`); + return this.p(jn.IN_MEMORY_PATH); + } + } + } + o(e, i) { + e.isErroneous = true; + e.lastError = i; + this.d.error(i); + } + p(e) { + return new Promise((i, s) => { + import("@vscode/sqlite3").then(r => { + const n = this.d.isTracing ? r.default.verbose().Database : r.default.Database; + const o = { + db: new n(e, a => a ? o.db && a.code !== "SQLITE_CANTOPEN" ? o.db.close(() => s(a)) : s(a) : this.q(o, ["PRAGMA user_version = 1;", "CREATE TABLE IF NOT EXISTS ItemTable (key TEXT UNIQUE ON CONFLICT REPLACE, value BLOB);", "CREATE TABLE IF NOT EXISTS cursorDiskKV (key TEXT UNIQUE ON CONFLICT REPLACE, value BLOB);"].join("")).then(() => i(o), c => o.db.close(() => s(c)))), + isInMemory: e === jn.IN_MEMORY_PATH + }; + o.db.on("error", a => this.o(o, `[storage ${this.c}] Error (event): ${a}`)); + if (this.d.isTracing) { + o.db.on("trace", a => this.d.trace(`[storage ${this.c}] Trace (event): ${a}`)); + } + }, s); + }); + } + q(e, i) { + return new Promise((s, r) => { + e.db.exec(i, n => n ? (this.o(e, `[storage ${this.c}] exec(): ${n}`), r(n)) : s()); + }); + } + r(e, i) { + return new Promise((s, r) => { + e.db.get(i, (n, o) => n ? (this.o(e, `[storage ${this.c}] get(): ${n}`), r(n)) : s(o)); + }); + } + s(e, i, s) { + return new Promise((r, n) => { + e.db.get(i, s, (o, a) => o ? (this.o(e, `[storage ${this.c}] getParams(): ${o}`), n(o)) : r(a)); + }); + } + async t(e, i, s) { + if ((await Promise.race([this.u(e, i, s.maxSizeBytes), new Promise((n, o) => setTimeout(() => n(false), s.timeout))])) === false) { + await this.updateItems({ + delete: new Set([i]) + }); + } + } + async u(e, i, s) { + try { + const r = await new Promise((n, o) => { + e.db.all(`SELECT LENGTH(value) as size FROM ItemTable WHERE key = '${i}'`, (a, c) => a ? (this.o(e, `[storage ${this.c}] getSize(${i}): ${a}`), o(a)) : c.length === 0 ? n(0) : c.length !== 1 ? o(new Error(`Unexpected number of rows - ${c.length}`)) : n(c[0].size)); + }); + this.d.trace(`[storage ${this.c}] ${i} is ${r} bytes and can be at most ${s} bytes`); + if (r > s) { + this.d.error(`[storage ${this.c}] ${i} is too large (${r} > ${s}), clearing`); + await this.updateItems({ + delete: new Set([i]) + }); + } + } catch (r) { + this.d.error(`[storage ${this.c}] error checking size of ${i}: ${r}`); + } + } + v(e, i) { + return new Promise((s, r) => { + e.db.all(i, (n, o) => n ? (this.o(e, `[storage ${this.c}] all(): ${n}`), r(n)) : s(o)); + }); + } + w(e, i) { + return new Promise((s, r) => { + e.db.serialize(() => { + e.db.run("BEGIN TRANSACTION"); + i(); + e.db.run("END TRANSACTION", n => n ? (this.o(e, `[storage ${this.c}] transaction(): ${n}`), r(n)) : s()); + }); + }); + } + x(e, i, s, r) { + const n = e.db.prepare(i); + const o = a => { + this.o(e, `[storage ${this.c}] prepare(): ${a} (${i}). Details: ${r()}`); + }; + n.on("error", o); + s(n); + n.finalize(a => { + if (a) { + o(a); + } + n.removeListener("error", o); + }); + } + y(e, i, s) { + return new Promise((r, n) => { + e.db.run(i, s, o => o ? (this.o(e, `[storage ${this.c}] runParams(): ${o}`), n(o)) : r()); + }); + } + }; + a4 = class sS { + static { + this.a = "VSCODE_TRACE_STORAGE"; + } + constructor(e) { + if (e && typeof e.logTrace == "function" && process.env[sS.a]) { + this.b = e.logTrace; + } + if (e && typeof e.logError == "function") { + this.c = e.logError; + } + } + get isTracing() { + return !!this.b; + } + trace(e) { + this.b?.(e); + } + error(e) { + this.c?.(e); + } + }; + } + }); + var Ot; + var qx; + var y1; + var S1; + var c4; + var E1; + var k1; + var x1; + var zu; + var l4; + var Hu; + var D1; + var P1; + var u4; + var h4; + var xt = g({ + "out-build/vs/platform/telemetry/common/telemetry.js"() { + "use strict"; + + Y(); + Ot = q("telemetryService"); + qx = q("customEndpointTelemetryService"); + y1 = "telemetry.currentSessionDate"; + S1 = "telemetry.firstSessionDate"; + c4 = "telemetry.lastSessionDate"; + E1 = "telemetry.machineId"; + k1 = "telemetry.macMachineId"; + x1 = "telemetry.sqmId"; + zu = "telemetry.devDeviceId"; + l4 = "crashReporting"; + Hu = "crashReporting.enabled"; + D1 = "telemetry.enableCrashReporter"; + P1 = "telemetry.enableTelemetry"; + (function (t) { + t[t.NONE = 0] = "NONE"; + t[t.CRASH = 1] = "CRASH"; + t[t.ERROR = 2] = "ERROR"; + t[t.USAGE = 3] = "USAGE"; + })(u4 ||= {}); + (function (t) { + t.OFF = "off"; + t.ON = "all"; + })(h4 ||= {}); + } + }); + function zx(t, e) { + switch (t) { + case 3: + if (e === "x64") { + return "win32-x64"; + } else if (e === "arm64") { + return "win32-arm64"; + } else { + return "unknown"; + } + case 2: + if (e === "x64") { + return "linux-x64"; + } else if (e === "arm64") { + return "linux-arm64"; + } else if (e === "arm") { + return "linux-armhf"; + } else { + return "unknown"; + } + case "alpine": + if (e === "x64") { + return "alpine-x64"; + } else if (e === "arm64") { + return "alpine-arm64"; + } else { + return "unknown"; + } + case 1: + if (e === "x64") { + return "darwin-x64"; + } else if (e === "arm64") { + return "darwin-arm64"; + } else { + return "unknown"; + } + case 0: + return "web"; + } + } + function Hx(t) { + return t && typeof t == "object" && typeof t.id == "string" && (!t.uuid || typeof t.uuid == "string"); + } + var d4; + var Vx; + var f4; + var p4; + var g4; + var m4; + var w4; + var Gx; + var v4; + var b4; + var $1; + var Jx; + var y4; + var Kx; + var Zx; + var Yx; + var Xx; + var Qx; + var Vu = g({ + "out-build/vs/platform/extensionManagement/common/extensionManagement.js"() { + "use strict"; + + be(); + Y(); + d4 = "^([a-z0-9A-Z][a-z0-9-A-Z]*)\\.([a-z0-9A-Z][a-z0-9-A-Z]*)$"; + Vx = new RegExp(d4); + (function (t) { + t.COMMAND = "command"; + t.SETTINGS_SYNC = "settingsSync"; + })(f4 ||= {}); + (function (t) { + t[t.NoneOrRelevance = 0] = "NoneOrRelevance"; + t[t.LastUpdatedDate = 1] = "LastUpdatedDate"; + t[t.Title = 2] = "Title"; + t[t.PublisherName = 3] = "PublisherName"; + t[t.InstallCount = 4] = "InstallCount"; + t[t.PublishedDate = 10] = "PublishedDate"; + t[t.AverageRating = 6] = "AverageRating"; + t[t.WeightedRating = 12] = "WeightedRating"; + })(p4 ||= {}); + (function (t) { + t[t.Default = 0] = "Default"; + t[t.Ascending = 1] = "Ascending"; + t[t.Descending = 2] = "Descending"; + })(g4 ||= {}); + (function (t) { + t.Install = "install"; + t.Uninstall = "uninstall"; + })(m4 ||= {}); + (function (t) { + t[t.None = 1] = "None"; + t[t.Install = 2] = "Install"; + t[t.Update = 3] = "Update"; + t[t.Migrate = 4] = "Migrate"; + })(w4 ||= {}); + Gx = q("extensionGalleryService"); + (function (t) { + t.Timeout = "Timeout"; + t.Cancelled = "Cancelled"; + t.Failed = "Failed"; + t.DownloadFailedWriting = "DownloadFailedWriting"; + t.Offline = "Offline"; + })(v4 ||= {}); + (function (t) { + t.Unsupported = "Unsupported"; + t.Deprecated = "Deprecated"; + t.Malicious = "Malicious"; + t.Incompatible = "Incompatible"; + t.IncompatibleApi = "IncompatibleApi"; + t.IncompatibleTargetPlatform = "IncompatibleTargetPlatform"; + t.ReleaseVersionNotFound = "ReleaseVersionNotFound"; + t.Invalid = "Invalid"; + t.Download = "Download"; + t.DownloadSignature = "DownloadSignature"; + t.DownloadFailedWriting = "DownloadFailedWriting"; + t.UpdateMetadata = "UpdateMetadata"; + t.Extract = "Extract"; + t.Scanning = "Scanning"; + t.ScanningExtension = "ScanningExtension"; + t.ReadUninstalled = "ReadUninstalled"; + t.UnsetUninstalled = "UnsetUninstalled"; + t.Delete = "Delete"; + t.Rename = "Rename"; + t.IntializeDefaultProfile = "IntializeDefaultProfile"; + t.AddToProfile = "AddToProfile"; + t.InstalledExtensionNotFound = "InstalledExtensionNotFound"; + t.PostInstall = "PostInstall"; + t.CorruptZip = "CorruptZip"; + t.IncompleteZip = "IncompleteZip"; + t.PackageNotSigned = "PackageNotSigned"; + t.SignatureVerificationInternal = "SignatureVerificationInternal"; + t.SignatureVerificationFailed = "SignatureVerificationFailed"; + t.NotAllowed = "NotAllowed"; + t.Gallery = "Gallery"; + t.Cancelled = "Cancelled"; + t.Unknown = "Unknown"; + t.Internal = "Internal"; + })(b4 ||= {}); + (function (t) { + t.NotSigned = "NotSigned"; + t.Success = "Success"; + t.RequiredArgumentMissing = "RequiredArgumentMissing"; + t.InvalidArgument = "InvalidArgument"; + t.PackageIsUnreadable = "PackageIsUnreadable"; + t.UnhandledException = "UnhandledException"; + t.SignatureManifestIsMissing = "SignatureManifestIsMissing"; + t.SignatureManifestIsUnreadable = "SignatureManifestIsUnreadable"; + t.SignatureIsMissing = "SignatureIsMissing"; + t.SignatureIsUnreadable = "SignatureIsUnreadable"; + t.CertificateIsUnreadable = "CertificateIsUnreadable"; + t.SignatureArchiveIsUnreadable = "SignatureArchiveIsUnreadable"; + t.FileAlreadyExists = "FileAlreadyExists"; + t.SignatureArchiveIsInvalidZip = "SignatureArchiveIsInvalidZip"; + t.SignatureArchiveHasSameSignatureFile = "SignatureArchiveHasSameSignatureFile"; + t.PackageIntegrityCheckFailed = "PackageIntegrityCheckFailed"; + t.SignatureIsInvalid = "SignatureIsInvalid"; + t.SignatureManifestIsInvalid = "SignatureManifestIsInvalid"; + t.SignatureIntegrityCheckFailed = "SignatureIntegrityCheckFailed"; + t.EntryIsMissing = "EntryIsMissing"; + t.EntryIsTampered = "EntryIsTampered"; + t.Untrusted = "Untrusted"; + t.CertificateRevoked = "CertificateRevoked"; + t.SignatureIsNotValid = "SignatureIsNotValid"; + t.UnknownError = "UnknownError"; + t.PackageIsInvalidZip = "PackageIsInvalidZip"; + t.SignatureArchiveHasTooManyEntries = "SignatureArchiveHasTooManyEntries"; + })($1 ||= {}); + Jx = q("extensionManagementService"); + y4 = "extensionsIdentifiers/disabled"; + Kx = q("IGlobalExtensionEnablementService"); + Zx = q("IExtensionTipsService"); + Yx = q("IAllowedExtensionsService"); + Xx = V0(1824, "Extensions"); + Qx = V0(1825, "Preferences"); + } + }); + import * as eD from "fs"; + var Gu; + var I1; + var S4; + var E4; + var k4; + var A1; + var tD = g({ + "out-build/vs/platform/storage/electron-main/storageMain.js"() { + "use strict"; + + zt(); + ce(); + B(); + M(); + we(); + Kn(); + se(); + _t(); + Uy(); + Bx(); + X(); + v1(); + xt(); + ri(); + Vu(); + Ie(); + Gu = class rS extends T { + static { + this.a = 2000; + } + get storage() { + return this.f; + } + constructor(e, i) { + super(); + this.m = e; + this.n = i; + this.b = this.D(new $()); + this.onDidChangeStorage = this.b.event; + this.c = this.D(new $()); + this.onDidCloseStorage = this.c.event; + this.f = this.D(new ac(new p1(), { + hint: Is.STORAGE_IN_MEMORY + })); + this.g = undefined; + this.h = new Xs(); + this.whenInit = this.h.p; + this.j = bi.None; + } + cursorDiskKVGet(e) { + return this.f.cursorDiskKVGet(e); + } + cursorDiskKVSet(e, i) { + return this.f.cursorDiskKVSet(e, i); + } + cursorDiskKVClearPrefix(e) { + return this.f.cursorDiskKVClearPrefix(e); + } + isInMemory() { + return this.f.isInMemory(); + } + init() { + this.g ||= (async () => { + if (this.j === bi.None) { + try { + const e = this.D(await this.t()); + this.f.dispose(); + this.f = e; + this.D(e.onDidChangeStorage(s => this.b.fire(s))); + await this.s(e); + const i = e.getBoolean(lc); + if (i === undefined) { + e.set(lc, true); + } else if (i) { + e.set(lc, false); + } + this.q(e); + } catch (e) { + this.m.error(`[storage main] initialize(): Unable to init storage due to ${e}`); + } finally { + this.j = bi.Initialized; + this.h.complete(); + } + } + })(); + return this.g; + } + q(e) { + const i = this.vscodePath; + if (!i) { + return; + } + const s = [y4]; + try { + import("@vscode/sqlite3").then(r => { + let n; + try { + let o = false; + n = new r.Database(i, a => { + o = !a; + }); + if (!o) { + return; + } + for (const a of s) { + n.get("SELECT value FROM ItemTable WHERE key = ?", [a], (c, l) => { + try { + if (!c) { + const u = l.value; + e.set(`vscode/${a}`, u); + } + } catch {} + }); + } + } catch {} finally { + try { + if (n) { + n.close(); + } + } catch {} + } + }); + } catch {} + } + r() { + return { + logTrace: this.m.getLevel() === J.Trace ? e => this.m.trace(e) : undefined, + logError: e => this.m.error(e) + }; + } + s(e) { + return e.init(); + } + get items() { + return this.f.items; + } + get(e, i) { + return this.f.get(e, i); + } + set(e, i) { + return this.f.set(e, i); + } + delete(e) { + return this.f.delete(e); + } + optimize() { + return this.f.optimize(); + } + async close() { + const e = new Jr(false); + await this.w(); + e.stop(); + if (e.elapsed() > rS.a) { + await this.u(e); + } + this.c.fire(); + } + async u(e) { + if (this.path) { + try { + const i = HS(Array.from(this.f.items.entries()).map(([r, n]) => ({ + key: r, + length: n.length + })), (r, n) => n.length - r.length, 5).map(r => `${r.key}:${r.length}`).join(", "); + const s = (await this.n.stat(P.file(this.path))).size; + this.m.warn(`[storage main] detected slow close() operation: Time: ${e.elapsed()}ms, DB size: ${s}b, Large Keys: ${i}`); + } catch (i) { + this.m.error("[storage main] figuring out stats for slow DB on close() resulted in an error", i); + } + } + } + async w() { + if (this.g) { + await this.g; + } + this.j = bi.Closed; + await this.f.close(); + } + }; + I1 = class k0 extends Gu { + static { + this.y = "state.vscdb"; + } + get path() { + if (!this.C.useInMemoryStorage) { + return F(this.z.globalStorageHome.with({ + scheme: R.file + }).fsPath, k0.y); + } + } + get vscodePath() { + try { + if (!this.C.useInMemoryStorage) { + return F(Xe(Xe(Xe(this.z.globalStorageHome.fsPath))), "Code", "User", "globalStorage", k0.y); + } + } catch {} + } + constructor(e, i, s, r) { + super(s, r); + this.z = e; + this.C = i; + } + async t() { + return new ac(new uc(this.path ?? uc.IN_MEMORY_PATH, { + logging: this.r() + }), this.path ? undefined : { + hint: Is.STORAGE_IN_MEMORY + }); + } + }; + S4 = class extends I1 { + constructor(t, e, i, s) { + super(t, e, i, s); + } + }; + E4 = class extends I1 { + constructor(t, e, i, s) { + super(e.defaultProfile, t, i, s); + } + async s(t) { + await super.s(t); + this.H(t); + } + H(t) { + if (t.get(S1, undefined) === undefined) { + t.set(S1, new Date().toUTCString()); + } + const i = t.get(y1, undefined); + const s = new Date().toUTCString(); + t.set(c4, typeof i === "undefined" ? null : i); + t.set(y1, s); + } + }; + k4 = class $f extends Gu { + static { + this.y = "state.vscdb"; + } + static { + this.z = "workspace.json"; + } + get path() { + if (!this.F.useInMemoryStorage) { + return F(this.G.workspaceStorageHome.with({ + scheme: R.file + }).fsPath, this.C.id, $f.y); + } + } + get vscodePath() {} + constructor(e, i, s, r, n) { + super(s, n); + this.C = e; + this.F = i; + this.G = r; + } + async t() { + const { + storageFilePath: e, + wasCreated: i + } = await this.I(); + return new ac(new uc(e, { + logging: this.r() + }), { + hint: this.F.useInMemoryStorage ? Is.STORAGE_IN_MEMORY : i ? Is.STORAGE_DOES_NOT_EXIST : undefined + }); + } + async I() { + if (this.F.useInMemoryStorage) { + return { + storageFilePath: uc.IN_MEMORY_PATH, + wasCreated: true + }; + } + const e = F(this.G.workspaceStorageHome.with({ + scheme: R.file + }).fsPath, this.C.id); + const i = F(e, $f.y); + if (await ee.exists(e)) { + return { + storageFilePath: i, + wasCreated: false + }; + } else { + await eD.promises.mkdir(e, { + recursive: true + }); + this.J(e); + return { + storageFilePath: i, + wasCreated: true + }; + } + } + async J(e) { + let i; + if (Li(this.C)) { + i = { + folder: this.C.uri.toString() + }; + } else if (Kt(this.C)) { + i = { + workspace: this.C.configPath.toString() + }; + } + if (i) { + try { + const s = F(e, $f.z); + if (!(await ee.exists(s))) { + await ee.writeFile(s, JSON.stringify(i, undefined, 2)); + } + } catch (s) { + this.m.error(`[storage main] ensureWorkspaceStorageFolderMeta(): Unable to create workspace storage metadata due to ${s}`); + } + } + } + }; + A1 = class extends Gu { + get path() {} + get vscodePath() {} + async t() { + return new ac(new p1(), { + hint: Is.STORAGE_IN_MEMORY + }); + } + }; + } + }); + var x4; + var D4; + var Ju; + var C1; + var P4 = g({ + "out-build/vs/platform/state/node/stateService.js"() { + "use strict"; + + ce(); + Ze(); + M(); + _e(); + Ri(); + He(); + X(); + (function (t) { + t[t.IMMEDIATE = 0] = "IMMEDIATE"; + t[t.DELAYED = 1] = "DELAYED"; + })(x4 ||= {}); + D4 = class extends T { + constructor(t, e, i, s) { + super(); + this.h = t; + this.j = e; + this.m = i; + this.n = s; + this.a = Object.create(null); + this.b = ""; + this.c = this.D(new Ys(this.j === 0 ? 0 : 100)); + this.f = undefined; + this.g = undefined; + } + init() { + this.f ||= this.q(); + return this.f; + } + async q() { + try { + this.b = (await this.n.readFile(this.h)).value.toString(); + this.a = JSON.parse(this.b); + } catch (t) { + if (t.fileOperationResult !== 1) { + this.m.error(t); + } + } + } + getItem(t, e) { + const i = this.a[t]; + if (Qt(i)) { + return e; + } else { + return i; + } + } + setItem(t, e) { + this.setItems([{ + key: t, + data: e + }]); + } + setItems(t) { + let e = false; + for (const { + key: i, + data: s + } of t) { + if (this.a[i] !== s) { + if (Qt(s)) { + if (!Gs(this.a[i])) { + this.a[i] = undefined; + e = true; + } + } else { + this.a[i] = s; + e = true; + } + } + } + if (e) { + this.r(); + } + } + removeItem(t) { + if (!Gs(this.a[t])) { + this.a[t] = undefined; + this.r(); + } + } + async r() { + if (!this.g) { + return this.c.trigger(() => this.s()); + } + } + async s() { + if (!this.f) { + return; + } + await this.f; + const t = JSON.stringify(this.a, null, 4); + if (t !== this.b) { + try { + await this.n.writeFile(this.h, z.fromString(t), { + atomic: { + postfix: ".vsctmp" + } + }); + this.b = t; + } catch (e) { + this.m.error(e); + } + } + } + async close() { + this.g ||= this.c.trigger(() => this.s(), 0); + return this.g; + } + }; + Ju = class extends T { + constructor(e, i, s, r) { + super(); + this.a = this.D(new D4(i.stateResource, e, s, r)); + } + async init() { + await this.a.init(); + } + getItem(e, i) { + return this.a.getItem(e, i); + } + }; + Ju = __decorate([__param(1, Yi), __param(2, V), __param(3, at)], Ju); + C1 = class extends Ju { + setItem(t, e) { + this.a.setItem(t, e); + } + setItems(t) { + this.a.setItems(t); + } + removeItem(t) { + this.a.removeItem(t); + } + close() { + return this.a.close(); + } + }; + } + }); + var Ku; + var bo; + var Zu; + var hc; + var _1; + var iD = g({ + "out-build/vs/platform/userDataProfile/node/userDataProfile.js"() { + "use strict"; + + se(); + Ri(); + He(); + X(); + Ti(); + As(); + _s(); + _e(); + P4(); + Zu = Ku = class extends Bu { + constructor(e, i, s, r, n) { + super(s, r, i, n); + this.a = e; + this.S = s; + } + N() { + return this.a.getItem(Ku.b, []).map(i => ({ + ...i, + location: wt(i.location) ? this.t.extUri.joinPath(this.profilesHome, i.location) : P.revive(i.location) + })); + } + P() { + return this.a.getItem(Ku.c, {}); + } + R() { + return this.t.extUri.joinPath(P.file(this.S.extensionsPath).with({ + scheme: this.profilesHome.scheme + }), "extensions.json"); + } + }; + Zu = Ku = __decorate([__param(0, f1), __param(1, yi), __param(2, tr), __param(3, at), __param(4, V)], Zu); + hc = bo = class extends Zu { + constructor(e, i, s, r, n) { + super(e, i, s, r, n); + this.Y = e; + } + O(e) { + if (e.length) { + this.Y.setItem(bo.b, e.map(i => ({ + ...i, + location: this.t.extUri.basename(i.location) + }))); + } else { + this.Y.removeItem(bo.b); + } + } + Q(e) { + if (e.emptyWindows || e.workspaces) { + this.Y.setItem(bo.c, e); + } else { + this.Y.removeItem(bo.c); + } + } + }; + hc = bo = __decorate([__param(0, Oi), __param(1, yi), __param(2, tr), __param(3, at), __param(4, V)], hc); + _1 = class extends hc { + constructor(e, i, s, r) { + super(new C1(0, i, r, s), e, i, s, r); + } + async init() { + await this.Y.init(); + return super.init(); + } + }; + _1 = __decorate([__param(0, yi), __param(1, tr), __param(2, at), __param(3, V)], _1); + } + }); + var Rs; + var Yu; + var un = g({ + "out-build/vs/platform/userDataProfile/electron-main/userDataProfile.js"() { + "use strict"; + + Ri(); + He(); + Y(); + X(); + As(); + _s(); + iD(); + Ti(); + Rs = Cs; + Yu = class extends hc { + constructor(e, i, s, r, n) { + super(e, i, s, r, n); + } + getAssociatedEmptyWindows() { + const e = []; + for (const i of this.z.emptyWindows.keys()) { + e.push({ + id: i + }); + } + return e; + } + }; + Yu = __decorate([__param(0, Oi), __param(1, yi), __param(2, tr), __param(3, at), __param(4, V)], Yu); + } + }); + var yo; + var Xu; + var dc; + var Qu; + var eh = g({ + "out-build/vs/platform/storage/electron-main/storageMainService.js"() { + "use strict"; + + se(); + B(); + M(); + Ri(); + He(); + Y(); + ct(); + X(); + v1(); + tD(); + _s(); + un(); + As(); + Ie(); + yo = q("storageMainService"); + Xu = class extends T { + constructor(e, i, s, r, n, o) { + super(); + this.c = e; + this.f = i; + this.g = s; + this.h = r; + this.j = n; + this.m = o; + this.a = undefined; + this.b = this.D(new $()); + this.onDidChangeProfileStorage = this.b.event; + this.applicationStorage = this.D(this.r()); + this.s = new Map(); + this.u = new Map(); + this.q(); + } + n() { + return { + useInMemoryStorage: !!this.f.extensionTestsLocationURI + }; + } + q() { + (async () => { + await this.h.when(3); + return this.applicationStorage.init(); + })(); + this.D(this.h.onWillLoadWindow(e => { + if (e.window.profile) { + this.profileStorage(e.window.profile).init(); + } + if (e.workspace) { + this.workspaceStorage(e.workspace).init(); + } + })); + this.D(this.h.onWillShutdown(e => { + this.c.trace("storageMainService#onWillShutdown()"); + this.a = e.reason; + e.join("applicationStorage", this.applicationStorage.close()); + for (const [, i] of this.s) { + e.join("profileStorage", i.close()); + } + for (const [, i] of this.u) { + e.join("workspaceStorage", i.close()); + } + })); + this.D(this.g.onWillCreateProfile(e => { + e.join((async () => { + if (!(await this.j.exists(e.profile.globalStorageHome))) { + await this.j.createFolder(e.profile.globalStorageHome); + } + })()); + })); + this.D(this.g.onWillRemoveProfile(e => { + const i = this.s.get(e.profile.id); + if (i) { + e.join(i.close()); + } + })); + } + r() { + this.c.trace("StorageMainService: creating application storage"); + const e = new E4(this.n(), this.g, this.c, this.j); + this.D(x.once(e.onDidCloseStorage)(() => { + this.c.trace("StorageMainService: closed application storage"); + })); + return e; + } + profileStorage(e) { + if (w1(e)) { + return this.applicationStorage; + } + let i = this.s.get(e.id); + if (!i) { + this.c.trace(`StorageMainService: creating profile storage (${e.name})`); + i = this.D(this.t(e)); + this.s.set(e.id, i); + const s = this.D(i.onDidChangeStorage(r => this.b.fire({ + ...r, + storage: i, + profile: e + }))); + this.D(x.once(i.onDidCloseStorage)(() => { + this.c.trace(`StorageMainService: closed profile storage (${e.name})`); + this.s.delete(e.id); + s.dispose(); + })); + } + return i; + } + t(e) { + if (this.a === 2) { + return new A1(this.c, this.j); + } else { + return new S4(e, this.n(), this.c, this.j); + } + } + workspaceStorage(e) { + let i = this.u.get(e.id); + if (!i) { + this.c.trace(`StorageMainService: creating workspace storage (${e.id})`); + i = this.D(this.w(e)); + this.u.set(e.id, i); + this.D(x.once(i.onDidCloseStorage)(() => { + this.c.trace(`StorageMainService: closed workspace storage (${e.id})`); + this.u.delete(e.id); + })); + } + return i; + } + w(e) { + if (this.a === 2) { + return new A1(this.c, this.j); + } else { + return new k4(e, this.n(), this.c, this.f, this.j); + } + } + isUsed(e) { + const i = P.file(e); + for (const s of [this.applicationStorage, ...this.s.values(), ...this.u.values()]) { + if (s.path && this.m.extUri.isEqualOrParent(P.file(s.path), i)) { + return true; + } + } + return false; + } + }; + Xu = __decorate([__param(0, V), __param(1, Yi), __param(2, Rs), __param(3, Te), __param(4, at), __param(5, yi)], Xu); + dc = q("applicationStorageMainService"); + Qu = class extends Xy { + constructor(e, i) { + super(); + this.s = e; + this.X = i; + this.whenReady = this.X.applicationStorage.whenInit; + } + Q() { + return this.X.applicationStorage.whenInit; + } + R(e) { + if (e === -1) { + return this.X.applicationStorage.storage; + } + } + S(e) { + if (e === -1) { + return this.s.defaultProfile.globalStorageHome.with({ + scheme: R.file + }).fsPath; + } + } + r() { + return false; + } + switch() { + throw new Error("Migrating storage is unsupported from main process"); + } + U() { + throw new Error("Switching storage profile is unsupported from main process"); + } + W() { + throw new Error("Switching storage workspace is unsupported from main process"); + } + hasScope() { + throw new Error("Main process is never profile or workspace scoped"); + } + }; + Qu = __decorate([__param(0, Cs), __param(1, yo)], Qu); + } + }); + function Ir(t, e) { + const i = Math.pow(10, e); + return Math.round(t * i) / i; + } + var E; + var hn; + var fc; + var th; + var sD = g({ + "out-build/vs/base/common/color.js"() { + "use strict"; + + E = class { + constructor(t, e, i, s = 1) { + this._rgbaBrand = undefined; + this.r = Math.min(255, Math.max(0, t)) | 0; + this.g = Math.min(255, Math.max(0, e)) | 0; + this.b = Math.min(255, Math.max(0, i)) | 0; + this.a = Ir(Math.max(Math.min(1, s), 0), 3); + } + static equals(t, e) { + return t.r === e.r && t.g === e.g && t.b === e.b && t.a === e.a; + } + }; + hn = class Pl { + constructor(e, i, s, r) { + this._hslaBrand = undefined; + this.h = Math.max(Math.min(360, e), 0) | 0; + this.s = Ir(Math.max(Math.min(1, i), 0), 3); + this.l = Ir(Math.max(Math.min(1, s), 0), 3); + this.a = Ir(Math.max(Math.min(1, r), 0), 3); + } + static equals(e, i) { + return e.h === i.h && e.s === i.s && e.l === i.l && e.a === i.a; + } + static fromRGBA(e) { + const i = e.r / 255; + const s = e.g / 255; + const r = e.b / 255; + const n = e.a; + const o = Math.max(i, s, r); + const a = Math.min(i, s, r); + let c = 0; + let l = 0; + const u = (a + o) / 2; + const d = o - a; + if (d > 0) { + l = Math.min(u <= 0.5 ? d / (u * 2) : d / (2 - u * 2), 1); + switch (o) { + case i: + c = (s - r) / d + (s < r ? 6 : 0); + break; + case s: + c = (r - i) / d + 2; + break; + case r: + c = (i - s) / d + 4; + break; + } + c *= 60; + c = Math.round(c); + } + return new Pl(c, l, u, n); + } + static i(e, i, s) { + if (s < 0) { + s += 1; + } + if (s > 1) { + s -= 1; + } + if (s < 1 / 6) { + return e + (i - e) * 6 * s; + } else if (s < 1 / 2) { + return i; + } else if (s < 2 / 3) { + return e + (i - e) * (2 / 3 - s) * 6; + } else { + return e; + } + } + static toRGBA(e) { + const i = e.h / 360; + const { + s, + l: r, + a: n + } = e; + let o; + let a; + let c; + if (s === 0) { + o = a = c = r; + } else { + const l = r < 0.5 ? r * (1 + s) : r + s - r * s; + const u = r * 2 - l; + o = Pl.i(u, l, i + 1 / 3); + a = Pl.i(u, l, i); + c = Pl.i(u, l, i - 1 / 3); + } + return new E(Math.round(o * 255), Math.round(a * 255), Math.round(c * 255), n); + } + }; + fc = class nS { + constructor(e, i, s, r) { + this._hsvaBrand = undefined; + this.h = Math.max(Math.min(360, e), 0) | 0; + this.s = Ir(Math.max(Math.min(1, i), 0), 3); + this.v = Ir(Math.max(Math.min(1, s), 0), 3); + this.a = Ir(Math.max(Math.min(1, r), 0), 3); + } + static equals(e, i) { + return e.h === i.h && e.s === i.s && e.v === i.v && e.a === i.a; + } + static fromRGBA(e) { + const i = e.r / 255; + const s = e.g / 255; + const r = e.b / 255; + const n = Math.max(i, s, r); + const o = Math.min(i, s, r); + const a = n - o; + const c = n === 0 ? 0 : a / n; + let l; + if (a === 0) { + l = 0; + } else if (n === i) { + l = ((s - r) / a % 6 + 6) % 6; + } else if (n === s) { + l = (r - i) / a + 2; + } else { + l = (i - s) / a + 4; + } + return new nS(Math.round(l * 60), c, n, e.a); + } + static toRGBA(e) { + const { + h: i, + s, + v: r, + a: n + } = e; + const o = r * s; + const a = o * (1 - Math.abs(i / 60 % 2 - 1)); + const c = r - o; + let [l, u, d] = [0, 0, 0]; + if (i < 60) { + l = o; + u = a; + } else if (i < 120) { + l = a; + u = o; + } else if (i < 180) { + u = o; + d = a; + } else if (i < 240) { + u = a; + d = o; + } else if (i < 300) { + l = a; + d = o; + } else if (i <= 360) { + l = o; + d = a; + } + l = Math.round((l + c) * 255); + u = Math.round((u + c) * 255); + d = Math.round((d + c) * 255); + return new E(l, u, d, n); + } + }; + th = class je { + static fromHex(e) { + return je.Format.CSS.parseHex(e) || je.red; + } + static equals(e, i) { + if (!e && !i) { + return true; + } else if (!e || !i) { + return false; + } else { + return e.equals(i); + } + } + get hsla() { + if (this.i) { + return this.i; + } else { + return hn.fromRGBA(this.rgba); + } + } + get hsva() { + if (this.j) { + return this.j; + } else { + return fc.fromRGBA(this.rgba); + } + } + constructor(e) { + if (e) { + if (e instanceof E) { + this.rgba = e; + } else if (e instanceof hn) { + this.i = e; + this.rgba = hn.toRGBA(e); + } else if (e instanceof fc) { + this.j = e; + this.rgba = fc.toRGBA(e); + } else { + throw new Error("Invalid color ctor argument"); + } + } else { + throw new Error("Color needs a value"); + } + } + equals(e) { + return !!e && E.equals(this.rgba, e.rgba) && hn.equals(this.hsla, e.hsla) && fc.equals(this.hsva, e.hsva); + } + getRelativeLuminance() { + const e = je.k(this.rgba.r); + const i = je.k(this.rgba.g); + const s = je.k(this.rgba.b); + const r = e * 0.2126 + i * 0.7152 + s * 0.0722; + return Ir(r, 4); + } + reduceRelativeLuminace(e, i) { + let { + r: s, + g: r, + b: n + } = e.rgba; + let o = this.getContrastRatio(e); + while (o < i && (s > 0 || r > 0 || n > 0)) { + s -= Math.max(0, Math.ceil(s * 0.1)); + r -= Math.max(0, Math.ceil(r * 0.1)); + n -= Math.max(0, Math.ceil(n * 0.1)); + o = this.getContrastRatio(new je(new E(s, r, n))); + } + return new je(new E(s, r, n)); + } + increaseRelativeLuminace(e, i) { + let { + r: s, + g: r, + b: n + } = e.rgba; + let o = this.getContrastRatio(e); + while (o < i && (s < 255 || r < 255 || n < 255)) { + s = Math.min(255, s + Math.ceil((255 - s) * 0.1)); + r = Math.min(255, r + Math.ceil((255 - r) * 0.1)); + n = Math.min(255, n + Math.ceil((255 - n) * 0.1)); + o = this.getContrastRatio(new je(new E(s, r, n))); + } + return new je(new E(s, r, n)); + } + static k(e) { + const i = e / 255; + if (i <= 0.03928) { + return i / 12.92; + } else { + return Math.pow((i + 0.055) / 1.055, 2.4); + } + } + getContrastRatio(e) { + const i = this.getRelativeLuminance(); + const s = e.getRelativeLuminance(); + if (i > s) { + return (i + 0.05) / (s + 0.05); + } else { + return (s + 0.05) / (i + 0.05); + } + } + isDarker() { + return (this.rgba.r * 299 + this.rgba.g * 587 + this.rgba.b * 114) / 1000 < 128; + } + isLighter() { + return (this.rgba.r * 299 + this.rgba.g * 587 + this.rgba.b * 114) / 1000 >= 128; + } + isLighterThan(e) { + const i = this.getRelativeLuminance(); + const s = e.getRelativeLuminance(); + return i > s; + } + isDarkerThan(e) { + const i = this.getRelativeLuminance(); + const s = e.getRelativeLuminance(); + return i < s; + } + ensureConstrast(e, i) { + const s = this.getRelativeLuminance(); + const r = e.getRelativeLuminance(); + if (this.getContrastRatio(e) < i) { + if (r < s) { + const c = this.reduceRelativeLuminace(e, i); + const l = this.getContrastRatio(c); + if (l < i) { + const u = this.increaseRelativeLuminace(e, i); + const d = this.getContrastRatio(u); + if (l > d) { + return c; + } else { + return u; + } + } + return c; + } + const o = this.increaseRelativeLuminace(e, i); + const a = this.getContrastRatio(o); + if (a < i) { + const c = this.reduceRelativeLuminace(e, i); + const l = this.getContrastRatio(c); + if (a > l) { + return o; + } else { + return c; + } + } + return o; + } + return e; + } + lighten(e) { + return new je(new hn(this.hsla.h, this.hsla.s, this.hsla.l + this.hsla.l * e, this.hsla.a)); + } + darken(e) { + return new je(new hn(this.hsla.h, this.hsla.s, this.hsla.l - this.hsla.l * e, this.hsla.a)); + } + transparent(e) { + const { + r: i, + g: s, + b: r, + a: n + } = this.rgba; + return new je(new E(i, s, r, n * e)); + } + isTransparent() { + return this.rgba.a === 0; + } + isOpaque() { + return this.rgba.a === 1; + } + opposite() { + return new je(new E(255 - this.rgba.r, 255 - this.rgba.g, 255 - this.rgba.b, this.rgba.a)); + } + blend(e) { + const i = e.rgba; + const s = this.rgba.a; + const r = i.a; + const n = s + r * (1 - s); + if (n < 0.000001) { + return je.transparent; + } + const o = this.rgba.r * s / n + i.r * r * (1 - s) / n; + const a = this.rgba.g * s / n + i.g * r * (1 - s) / n; + const c = this.rgba.b * s / n + i.b * r * (1 - s) / n; + return new je(new E(o, a, c, n)); + } + makeOpaque(e) { + if (this.isOpaque() || e.rgba.a !== 1) { + return this; + } + const { + r: i, + g: s, + b: r, + a: n + } = this.rgba; + return new je(new E(e.rgba.r - n * (e.rgba.r - i), e.rgba.g - n * (e.rgba.g - s), e.rgba.b - n * (e.rgba.b - r), 1)); + } + flatten(...e) { + const i = e.reduceRight((s, r) => je.o(r, s)); + return je.o(this, i); + } + static o(e, i) { + const s = 1 - e.rgba.a; + return new je(new E(s * i.rgba.r + e.rgba.a * e.rgba.r, s * i.rgba.g + e.rgba.a * e.rgba.g, s * i.rgba.b + e.rgba.a * e.rgba.b)); + } + toString() { + this.u ||= je.Format.CSS.format(this); + return this.u; + } + toNumber24Bit() { + this.w ||= (this.rgba.r << 24 | this.rgba.g << 16 | this.rgba.b << 8 | this.rgba.a * 255 << 0) >>> 0; + return this.w; + } + static getLighterColor(e, i, s) { + if (e.isLighterThan(i)) { + return e; + } + s = s || 0.5; + const r = e.getRelativeLuminance(); + const n = i.getRelativeLuminance(); + s = s * (n - r) / n; + return e.lighten(s); + } + static getDarkerColor(e, i, s) { + if (e.isDarkerThan(i)) { + return e; + } + s = s || 0.5; + const r = e.getRelativeLuminance(); + const n = i.getRelativeLuminance(); + s = s * (r - n) / r; + return e.darken(s); + } + static { + this.white = new je(new E(255, 255, 255, 1)); + } + static { + this.black = new je(new E(0, 0, 0, 1)); + } + static { + this.red = new je(new E(255, 0, 0, 1)); + } + static { + this.blue = new je(new E(0, 0, 255, 1)); + } + static { + this.green = new je(new E(0, 255, 0, 1)); + } + static { + this.cyan = new je(new E(0, 255, 255, 1)); + } + static { + this.lightgrey = new je(new E(211, 211, 211, 1)); + } + static { + this.transparent = new je(new E(0, 0, 0, 0)); + } + }; + (function (t) { + let e; + (function (i) { + let s; + (function (r) { + function n(b) { + if (b.rgba.a === 1) { + return `rgb(${b.rgba.r}, ${b.rgba.g}, ${b.rgba.b})`; + } else { + return t.Format.CSS.formatRGBA(b); + } + } + r.formatRGB = n; + function o(b) { + return `rgba(${b.rgba.r}, ${b.rgba.g}, ${b.rgba.b}, ${+b.rgba.a.toFixed(2)})`; + } + r.formatRGBA = o; + function a(b) { + if (b.hsla.a === 1) { + return `hsl(${b.hsla.h}, ${(b.hsla.s * 100).toFixed(2)}%, ${(b.hsla.l * 100).toFixed(2)}%)`; + } else { + return t.Format.CSS.formatHSLA(b); + } + } + r.formatHSL = a; + function c(b) { + return `hsla(${b.hsla.h}, ${(b.hsla.s * 100).toFixed(2)}%, ${(b.hsla.l * 100).toFixed(2)}%, ${b.hsla.a.toFixed(2)})`; + } + r.formatHSLA = c; + function l(b) { + const k = b.toString(16); + if (k.length !== 2) { + return "0" + k; + } else { + return k; + } + } + function u(b) { + return `#${l(b.rgba.r)}${l(b.rgba.g)}${l(b.rgba.b)}`; + } + r.formatHex = u; + function d(b, k = false) { + if (k && b.rgba.a === 1) { + return t.Format.CSS.formatHex(b); + } else { + return `#${l(b.rgba.r)}${l(b.rgba.g)}${l(b.rgba.b)}${l(Math.round(b.rgba.a * 255))}`; + } + } + r.formatHexA = d; + function f(b) { + if (b.isOpaque()) { + return t.Format.CSS.formatHex(b); + } else { + return t.Format.CSS.formatRGBA(b); + } + } + r.format = f; + function p(b) { + if (b === "transparent") { + return t.transparent; + } + if (b.startsWith("#")) { + return m(b); + } + if (b.startsWith("rgba(")) { + const k = b.match(/rgba\((?(?:\+|-)?\d+), *(?(?:\+|-)?\d+), *(?(?:\+|-)?\d+), *(?(?:\+|-)?\d+(\.\d+)?)\)/); + if (!k) { + throw new Error("Invalid color format " + b); + } + const A = parseInt(k.groups?.r ?? "0"); + const C = parseInt(k.groups?.g ?? "0"); + const _ = parseInt(k.groups?.b ?? "0"); + const Z = parseFloat(k.groups?.a ?? "0"); + return new t(new E(A, C, _, Z)); + } + if (b.startsWith("rgb(")) { + const k = b.match(/rgb\((?(?:\+|-)?\d+), *(?(?:\+|-)?\d+), *(?(?:\+|-)?\d+)\)/); + if (!k) { + throw new Error("Invalid color format " + b); + } + const A = parseInt(k.groups?.r ?? "0"); + const C = parseInt(k.groups?.g ?? "0"); + const _ = parseInt(k.groups?.b ?? "0"); + return new t(new E(A, C, _)); + } + return w(b); + } + r.parse = p; + function w(b) { + switch (b) { + case "aliceblue": + return new t(new E(240, 248, 255, 1)); + case "antiquewhite": + return new t(new E(250, 235, 215, 1)); + case "aqua": + return new t(new E(0, 255, 255, 1)); + case "aquamarine": + return new t(new E(127, 255, 212, 1)); + case "azure": + return new t(new E(240, 255, 255, 1)); + case "beige": + return new t(new E(245, 245, 220, 1)); + case "bisque": + return new t(new E(255, 228, 196, 1)); + case "black": + return new t(new E(0, 0, 0, 1)); + case "blanchedalmond": + return new t(new E(255, 235, 205, 1)); + case "blue": + return new t(new E(0, 0, 255, 1)); + case "blueviolet": + return new t(new E(138, 43, 226, 1)); + case "brown": + return new t(new E(165, 42, 42, 1)); + case "burlywood": + return new t(new E(222, 184, 135, 1)); + case "cadetblue": + return new t(new E(95, 158, 160, 1)); + case "chartreuse": + return new t(new E(127, 255, 0, 1)); + case "chocolate": + return new t(new E(210, 105, 30, 1)); + case "coral": + return new t(new E(255, 127, 80, 1)); + case "cornflowerblue": + return new t(new E(100, 149, 237, 1)); + case "cornsilk": + return new t(new E(255, 248, 220, 1)); + case "crimson": + return new t(new E(220, 20, 60, 1)); + case "cyan": + return new t(new E(0, 255, 255, 1)); + case "darkblue": + return new t(new E(0, 0, 139, 1)); + case "darkcyan": + return new t(new E(0, 139, 139, 1)); + case "darkgoldenrod": + return new t(new E(184, 134, 11, 1)); + case "darkgray": + return new t(new E(169, 169, 169, 1)); + case "darkgreen": + return new t(new E(0, 100, 0, 1)); + case "darkgrey": + return new t(new E(169, 169, 169, 1)); + case "darkkhaki": + return new t(new E(189, 183, 107, 1)); + case "darkmagenta": + return new t(new E(139, 0, 139, 1)); + case "darkolivegreen": + return new t(new E(85, 107, 47, 1)); + case "darkorange": + return new t(new E(255, 140, 0, 1)); + case "darkorchid": + return new t(new E(153, 50, 204, 1)); + case "darkred": + return new t(new E(139, 0, 0, 1)); + case "darksalmon": + return new t(new E(233, 150, 122, 1)); + case "darkseagreen": + return new t(new E(143, 188, 143, 1)); + case "darkslateblue": + return new t(new E(72, 61, 139, 1)); + case "darkslategray": + return new t(new E(47, 79, 79, 1)); + case "darkslategrey": + return new t(new E(47, 79, 79, 1)); + case "darkturquoise": + return new t(new E(0, 206, 209, 1)); + case "darkviolet": + return new t(new E(148, 0, 211, 1)); + case "deeppink": + return new t(new E(255, 20, 147, 1)); + case "deepskyblue": + return new t(new E(0, 191, 255, 1)); + case "dimgray": + return new t(new E(105, 105, 105, 1)); + case "dimgrey": + return new t(new E(105, 105, 105, 1)); + case "dodgerblue": + return new t(new E(30, 144, 255, 1)); + case "firebrick": + return new t(new E(178, 34, 34, 1)); + case "floralwhite": + return new t(new E(255, 250, 240, 1)); + case "forestgreen": + return new t(new E(34, 139, 34, 1)); + case "fuchsia": + return new t(new E(255, 0, 255, 1)); + case "gainsboro": + return new t(new E(220, 220, 220, 1)); + case "ghostwhite": + return new t(new E(248, 248, 255, 1)); + case "gold": + return new t(new E(255, 215, 0, 1)); + case "goldenrod": + return new t(new E(218, 165, 32, 1)); + case "gray": + return new t(new E(128, 128, 128, 1)); + case "green": + return new t(new E(0, 128, 0, 1)); + case "greenyellow": + return new t(new E(173, 255, 47, 1)); + case "grey": + return new t(new E(128, 128, 128, 1)); + case "honeydew": + return new t(new E(240, 255, 240, 1)); + case "hotpink": + return new t(new E(255, 105, 180, 1)); + case "indianred": + return new t(new E(205, 92, 92, 1)); + case "indigo": + return new t(new E(75, 0, 130, 1)); + case "ivory": + return new t(new E(255, 255, 240, 1)); + case "khaki": + return new t(new E(240, 230, 140, 1)); + case "lavender": + return new t(new E(230, 230, 250, 1)); + case "lavenderblush": + return new t(new E(255, 240, 245, 1)); + case "lawngreen": + return new t(new E(124, 252, 0, 1)); + case "lemonchiffon": + return new t(new E(255, 250, 205, 1)); + case "lightblue": + return new t(new E(173, 216, 230, 1)); + case "lightcoral": + return new t(new E(240, 128, 128, 1)); + case "lightcyan": + return new t(new E(224, 255, 255, 1)); + case "lightgoldenrodyellow": + return new t(new E(250, 250, 210, 1)); + case "lightgray": + return new t(new E(211, 211, 211, 1)); + case "lightgreen": + return new t(new E(144, 238, 144, 1)); + case "lightgrey": + return new t(new E(211, 211, 211, 1)); + case "lightpink": + return new t(new E(255, 182, 193, 1)); + case "lightsalmon": + return new t(new E(255, 160, 122, 1)); + case "lightseagreen": + return new t(new E(32, 178, 170, 1)); + case "lightskyblue": + return new t(new E(135, 206, 250, 1)); + case "lightslategray": + return new t(new E(119, 136, 153, 1)); + case "lightslategrey": + return new t(new E(119, 136, 153, 1)); + case "lightsteelblue": + return new t(new E(176, 196, 222, 1)); + case "lightyellow": + return new t(new E(255, 255, 224, 1)); + case "lime": + return new t(new E(0, 255, 0, 1)); + case "limegreen": + return new t(new E(50, 205, 50, 1)); + case "linen": + return new t(new E(250, 240, 230, 1)); + case "magenta": + return new t(new E(255, 0, 255, 1)); + case "maroon": + return new t(new E(128, 0, 0, 1)); + case "mediumaquamarine": + return new t(new E(102, 205, 170, 1)); + case "mediumblue": + return new t(new E(0, 0, 205, 1)); + case "mediumorchid": + return new t(new E(186, 85, 211, 1)); + case "mediumpurple": + return new t(new E(147, 112, 219, 1)); + case "mediumseagreen": + return new t(new E(60, 179, 113, 1)); + case "mediumslateblue": + return new t(new E(123, 104, 238, 1)); + case "mediumspringgreen": + return new t(new E(0, 250, 154, 1)); + case "mediumturquoise": + return new t(new E(72, 209, 204, 1)); + case "mediumvioletred": + return new t(new E(199, 21, 133, 1)); + case "midnightblue": + return new t(new E(25, 25, 112, 1)); + case "mintcream": + return new t(new E(245, 255, 250, 1)); + case "mistyrose": + return new t(new E(255, 228, 225, 1)); + case "moccasin": + return new t(new E(255, 228, 181, 1)); + case "navajowhite": + return new t(new E(255, 222, 173, 1)); + case "navy": + return new t(new E(0, 0, 128, 1)); + case "oldlace": + return new t(new E(253, 245, 230, 1)); + case "olive": + return new t(new E(128, 128, 0, 1)); + case "olivedrab": + return new t(new E(107, 142, 35, 1)); + case "orange": + return new t(new E(255, 165, 0, 1)); + case "orangered": + return new t(new E(255, 69, 0, 1)); + case "orchid": + return new t(new E(218, 112, 214, 1)); + case "palegoldenrod": + return new t(new E(238, 232, 170, 1)); + case "palegreen": + return new t(new E(152, 251, 152, 1)); + case "paleturquoise": + return new t(new E(175, 238, 238, 1)); + case "palevioletred": + return new t(new E(219, 112, 147, 1)); + case "papayawhip": + return new t(new E(255, 239, 213, 1)); + case "peachpuff": + return new t(new E(255, 218, 185, 1)); + case "peru": + return new t(new E(205, 133, 63, 1)); + case "pink": + return new t(new E(255, 192, 203, 1)); + case "plum": + return new t(new E(221, 160, 221, 1)); + case "powderblue": + return new t(new E(176, 224, 230, 1)); + case "purple": + return new t(new E(128, 0, 128, 1)); + case "rebeccapurple": + return new t(new E(102, 51, 153, 1)); + case "red": + return new t(new E(255, 0, 0, 1)); + case "rosybrown": + return new t(new E(188, 143, 143, 1)); + case "royalblue": + return new t(new E(65, 105, 225, 1)); + case "saddlebrown": + return new t(new E(139, 69, 19, 1)); + case "salmon": + return new t(new E(250, 128, 114, 1)); + case "sandybrown": + return new t(new E(244, 164, 96, 1)); + case "seagreen": + return new t(new E(46, 139, 87, 1)); + case "seashell": + return new t(new E(255, 245, 238, 1)); + case "sienna": + return new t(new E(160, 82, 45, 1)); + case "silver": + return new t(new E(192, 192, 192, 1)); + case "skyblue": + return new t(new E(135, 206, 235, 1)); + case "slateblue": + return new t(new E(106, 90, 205, 1)); + case "slategray": + return new t(new E(112, 128, 144, 1)); + case "slategrey": + return new t(new E(112, 128, 144, 1)); + case "snow": + return new t(new E(255, 250, 250, 1)); + case "springgreen": + return new t(new E(0, 255, 127, 1)); + case "steelblue": + return new t(new E(70, 130, 180, 1)); + case "tan": + return new t(new E(210, 180, 140, 1)); + case "teal": + return new t(new E(0, 128, 128, 1)); + case "thistle": + return new t(new E(216, 191, 216, 1)); + case "tomato": + return new t(new E(255, 99, 71, 1)); + case "turquoise": + return new t(new E(64, 224, 208, 1)); + case "violet": + return new t(new E(238, 130, 238, 1)); + case "wheat": + return new t(new E(245, 222, 179, 1)); + case "white": + return new t(new E(255, 255, 255, 1)); + case "whitesmoke": + return new t(new E(245, 245, 245, 1)); + case "yellow": + return new t(new E(255, 255, 0, 1)); + case "yellowgreen": + return new t(new E(154, 205, 50, 1)); + default: + return null; + } + } + function m(b) { + const k = b.length; + if (k === 0 || b.charCodeAt(0) !== 35) { + return null; + } + if (k === 7) { + const A = y(b.charCodeAt(1)) * 16 + y(b.charCodeAt(2)); + const C = y(b.charCodeAt(3)) * 16 + y(b.charCodeAt(4)); + const _ = y(b.charCodeAt(5)) * 16 + y(b.charCodeAt(6)); + return new t(new E(A, C, _, 1)); + } + if (k === 9) { + const A = y(b.charCodeAt(1)) * 16 + y(b.charCodeAt(2)); + const C = y(b.charCodeAt(3)) * 16 + y(b.charCodeAt(4)); + const _ = y(b.charCodeAt(5)) * 16 + y(b.charCodeAt(6)); + const Z = y(b.charCodeAt(7)) * 16 + y(b.charCodeAt(8)); + return new t(new E(A, C, _, Z / 255)); + } + if (k === 4) { + const A = y(b.charCodeAt(1)); + const C = y(b.charCodeAt(2)); + const _ = y(b.charCodeAt(3)); + return new t(new E(A * 16 + A, C * 16 + C, _ * 16 + _)); + } + if (k === 5) { + const A = y(b.charCodeAt(1)); + const C = y(b.charCodeAt(2)); + const _ = y(b.charCodeAt(3)); + const Z = y(b.charCodeAt(4)); + return new t(new E(A * 16 + A, C * 16 + C, _ * 16 + _, (Z * 16 + Z) / 255)); + } + return null; + } + r.parseHex = m; + function y(b) { + switch (b) { + case 48: + return 0; + case 49: + return 1; + case 50: + return 2; + case 51: + return 3; + case 52: + return 4; + case 53: + return 5; + case 54: + return 6; + case 55: + return 7; + case 56: + return 8; + case 57: + return 9; + case 97: + return 10; + case 65: + return 10; + case 98: + return 11; + case 66: + return 11; + case 99: + return 12; + case 67: + return 12; + case 100: + return 13; + case 68: + return 13; + case 101: + return 14; + case 69: + return 14; + case 102: + return 15; + case 70: + return 15; + } + return 0; + } + })(s = i.CSS ||= {}); + })(e = t.Format ||= {}); + })(th ||= {}); + } + }); + function rD(t, e) { + return P.joinPath(t.userHome, e.dataFolderName, "shadow-workspaces"); + } + var Ve; + var ht = g({ + "out-build/vs/platform/product/common/productService.js"() { + "use strict"; + + se(); + Y(); + Ve = q("productService"); + } + }); + import ni from "electron"; + var $4; + var I4; + var R1; + var O1; + var L1; + var M1; + var F1; + var So; + var Eo; + var ih; + var pc = g({ + "out-build/vs/platform/theme/electron-main/themeMainService.js"() { + "use strict"; + + B(); + M(); + H(); + Ke(); + Y(); + Ti(); + $4 = "#FFFFFF"; + I4 = "#1F1F1F"; + R1 = "#000000"; + O1 = "#FFFFFF"; + L1 = "theme"; + M1 = "themeBackground"; + F1 = "windowSplash"; + (function (t) { + t.DETECT_COLOR_SCHEME = "window.autoDetectColorScheme"; + t.SYSTEM_COLOR_THEME = "window.systemColorTheme"; + })(So ||= {}); + Eo = q("themeMainService"); + ih = class extends T { + constructor(e, i) { + super(); + this.b = e; + this.c = i; + this.a = this.D(new $()); + this.onDidChangeColorScheme = this.a.event; + if (!Se) { + this.D(this.c.onDidChangeConfiguration(s => { + if (s.affectsConfiguration(So.SYSTEM_COLOR_THEME) || s.affectsConfiguration(So.DETECT_COLOR_SCHEME)) { + this.f(); + } + })); + } + this.f(); + this.D(x.fromNodeEventEmitter(ni.nativeTheme, "updated")(() => this.a.fire(this.getColorScheme()))); + } + f() { + if (Se || this.c.getValue(So.DETECT_COLOR_SCHEME)) { + ni.nativeTheme.themeSource = "system"; + } else { + switch (this.c.getValue(So.SYSTEM_COLOR_THEME)) { + case "dark": + ni.nativeTheme.themeSource = "dark"; + break; + case "light": + ni.nativeTheme.themeSource = "light"; + break; + case "auto": + switch (this.g()) { + case "vs": + ni.nativeTheme.themeSource = "light"; + break; + case "vs-dark": + ni.nativeTheme.themeSource = "dark"; + break; + default: + ni.nativeTheme.themeSource = "system"; + } + break; + default: + ni.nativeTheme.themeSource = "system"; + break; + } + } + } + getColorScheme() { + if (j) { + if (ni.nativeTheme.shouldUseHighContrastColors) { + return { + dark: ni.nativeTheme.shouldUseInvertedColorScheme, + highContrast: true + }; + } + } else if (N) { + if (ni.nativeTheme.shouldUseInvertedColorScheme || ni.nativeTheme.shouldUseHighContrastColors) { + return { + dark: ni.nativeTheme.shouldUseDarkColors, + highContrast: true + }; + } + } else if (Se && ni.nativeTheme.shouldUseHighContrastColors) { + return { + dark: true, + highContrast: true + }; + } + return { + dark: ni.nativeTheme.shouldUseDarkColors, + highContrast: false + }; + } + getBackgroundColor() { + const e = this.getColorScheme(); + if (e.highContrast && this.c.getValue("window.autoDetectHighContrast")) { + if (e.dark) { + return R1; + } else { + return O1; + } + } + let i = this.b.getItem(M1, null); + if (!i) { + switch (this.g()) { + case "vs": + i = $4; + break; + case "hc-black": + i = R1; + break; + case "hc-light": + i = O1; + break; + default: + i = I4; + } + } + return i; + } + g() { + switch (this.b.getItem(L1, "vs-dark").split(" ")[0]) { + case "vs": + return "vs"; + case "hc-black": + return "hc-black"; + case "hc-light": + return "hc-light"; + default: + return "vs-dark"; + } + } + saveWindowSplash(e, i) { + this.b.setItems([{ + key: L1, + data: i.baseTheme + }, { + key: M1, + data: i.colorInfo.background + }, { + key: F1, + data: i + }]); + if (typeof e == "number") { + this.h(e, i); + } + this.f(); + } + h(e, i) { + for (const s of ni.BrowserWindow.getAllWindows()) { + if (s.id === e) { + s.setBackgroundColor(i.colorInfo.background); + break; + } + } + } + getWindowSplash() { + return this.b.getItem(F1); + } + }; + ih = __decorate([__param(0, Oi), __param(1, Je)], ih); + } + }); + var Dt; + var sh; + var ko; + var gc = g({ + "out-build/vs/platform/product/common/product.js"() { + "use strict"; + + ys(); + sh = globalThis.vscode; + if (typeof sh !== "undefined" && typeof sh.context !== "undefined") { + const t = sh.context.configuration(); + if (t) { + Dt = t.product; + } else { + throw new Error("Sandbox: unable to resolve product configuration from preload script."); + } + } else if (globalThis._VSCODE_PRODUCT_JSON && globalThis._VSCODE_PACKAGE_JSON) { + Dt = globalThis._VSCODE_PRODUCT_JSON; + if (Ii.VSCODE_DEV) { + Object.assign(Dt, { + nameShort: `${Dt.nameShort} Dev`, + nameLong: `${Dt.nameLong} Dev`, + dataFolderName: `${Dt.dataFolderName}-dev`, + serverDataFolderName: Dt.serverDataFolderName ? `${Dt.serverDataFolderName}-dev` : undefined + }); + } + if (Ii.VSCODE_DEV_ONBOARDING) { + Object.assign(Dt, { + nameShort: `${Dt.nameShort} Onboarding`, + nameLong: `${Dt.nameLong} Onboarding`, + dataFolderName: `${Dt.dataFolderName}-onboarding`, + serverDataFolderName: Dt.serverDataFolderName ? `${Dt.serverDataFolderName}-onboarding` : undefined + }); + } + if (!Dt.version) { + const t = globalThis._VSCODE_PACKAGE_JSON; + Object.assign(Dt, { + version: t.version + }); + } + } else { + Dt = {}; + if (Object.keys(Dt).length === 0) { + Object.assign(Dt, { + version: "1.94.0-dev", + nameShort: "Cursor Dev", + nameLong: "Cursor Dev", + applicationName: "cursor", + dataFolderName: ".cursor", + urlProtocol: "cursor", + reportIssueUrl: "https://github.com/getcursor/cursor/issues/new", + licenseName: "MIT", + licenseUrl: "https://github.com/getcursor/cursor/", + serverLicenseUrl: "https://github.com/getcursor/cursor/" + }); + } + } + ko = Dt; + } + }); + function N1(t) { + return !!t.workspaceUri; + } + function A4(t) { + return !!t.folderUri; + } + function C4(t) { + return !!t.fileUri; + } + function nD(t) { + const e = dn(t); + const i = t.getValue("window.menuBarVisibility"); + if (i === "default" || e && i === "compact" || N && Jf) { + return "classic"; + } else { + return i; + } + } + function dn(t, e) { + e ||= oD(t); + return e === "native"; + } + function oD(t) { + if (fr) { + return "custom"; + } + const e = t.getValue("window"); + if (e) { + if (N && e.nativeTabs === true || N && e.nativeFullScreen === false) { + return "native"; + } + const r = e.titleBarStyle; + if (r === "native" || r === "custom") { + return r; + } + } + if (Se && ko.quality === "stable") { + return "native"; + } else { + return "custom"; + } + } + function W1(t) { + if (N || fr || dn(t)) { + return false; + } + if (Se) { + const e = t.getValue("window.experimentalControlOverlay"); + if (typeof e == "boolean") { + return e; + } + } + return true; + } + function _4(t) { + const e = t.getValue("window"); + if (!e || typeof e.nativeFullScreen != "boolean" || e.nativeTabs) { + return true; + } else { + return e.nativeFullScreen !== false; + } + } + function R4(t = 0) { + return Math.pow(1.2, t); + } + var T1; + var O4; + var L4; + var M4; + var F4; + var fn = g({ + "out-build/vs/platform/window/common/window.js"() { + "use strict"; + + H(); + gc(); + T1 = { + WIDTH: 400, + WIDTH_WITH_VERTICAL_PANEL: 600, + HEIGHT: 270 + }; + (function (t) { + t.TITLE_BAR_STYLE = "window.titleBarStyle"; + t.CUSTOM_TITLE_BAR_VISIBILITY = "window.customTitleBarVisibility"; + })(O4 ||= {}); + (function (t) { + t.NATIVE = "native"; + t.CUSTOM = "custom"; + })(L4 ||= {}); + (function (t) { + t.AUTO = "auto"; + t.WINDOWED = "windowed"; + t.NEVER = "never"; + })(M4 ||= {}); + F4 = 35; + } + }); + import aD from "electron"; + var N4; + var W4; + var Ar; + var T4; + var j4; + var U4; + var mc = g({ + "out-build/vs/platform/window/electron-main/window.js"() { + "use strict"; + + (function (t) { + t[t.INITIAL = 1] = "INITIAL"; + t[t.LOAD = 2] = "LOAD"; + t[t.RELOAD = 3] = "RELOAD"; + })(N4 ||= {}); + (function (t) { + t[t.CLOSE = 1] = "CLOSE"; + t[t.QUIT = 2] = "QUIT"; + t[t.RELOAD = 3] = "RELOAD"; + t[t.LOAD = 4] = "LOAD"; + })(W4 ||= {}); + Ar = function (t = 1) { + return { + width: 1024, + height: 768, + mode: t + }; + }; + T4 = function () { + const i = aD.screen.getPrimaryDisplay().workArea; + const s = Math.max(i.x + i.width / 2 - 400, 0); + const r = Math.max(i.y + i.height / 2 - 300, 0); + return { + x: s, + y: r, + width: 800, + height: 600, + mode: 1 + }; + }; + (function (t) { + t[t.Maximized = 0] = "Maximized"; + t[t.Normal = 1] = "Normal"; + t[t.Minimized = 2] = "Minimized"; + t[t.Fullscreen = 3] = "Fullscreen"; + })(j4 ||= {}); + (function (t) { + t[t.UNRESPONSIVE = 1] = "UNRESPONSIVE"; + t[t.PROCESS_GONE = 2] = "PROCESS_GONE"; + t[t.LOAD = 3] = "LOAD"; + t[t.RESPONSIVE = 4] = "RESPONSIVE"; + })(U4 ||= {}); + } + }); + import B4 from "electron"; + function rh(t, e, i, s) { + const r = t.get(Eo); + const n = t.get(Ve); + const o = t.get(Je); + const a = t.get(ot); + const c = o.getValue("window"); + const l = { + backgroundColor: r.getBackgroundColor(), + minWidth: T1.WIDTH, + minHeight: T1.HEIGHT, + title: n.nameLong, + show: i.hideBecauseShadowWindow === false && e.mode !== 0 && e.mode !== 3, + x: e.x, + y: e.y, + width: e.width, + height: e.height, + webPreferences: { + ...s, + enableWebSQL: false, + spellcheck: false, + zoomFactor: R4(e.zoomLevel ?? c?.zoomLevel), + autoplayPolicy: "user-gesture-required", + enableBlinkFeatures: "HighlightAPI", + sandbox: true, + enableDeprecatedPaste: true + }, + experimentalDarkMode: true + }; + if (Se) { + l.icon = F(a.appRoot, "resources/linux/code.png"); + l.frame = false; + } else if (j && !a.isBuilt) { + l.icon = F(a.appRoot, "resources/win32/code_150x150.png"); + } + if (N) { + l.acceptFirstMouse = true; + if (c?.clickThroughInactive === false) { + l.acceptFirstMouse = false; + } + } + if (i?.disableFullscreen) { + l.fullscreen = false; + } else if (N && !_4(o)) { + l.fullscreenable = false; + } + if (N && c?.nativeTabs === true) { + l.tabbingIdentifier = n.nameShort; + } + if (!dn(o, i?.forceNativeTitlebar ? "native" : undefined) && (l.titleBarStyle = "hidden", N || (l.frame = false), W1(o))) { + const f = r.getWindowSplash()?.colorInfo.titleBarBackground ?? r.getBackgroundColor(); + const p = th.fromHex(f).isDarker() ? "#FFFFFF" : "#000000"; + l.titleBarOverlay = { + height: 29, + color: f, + symbolColor: p + }; + } + return l; + } + function q4(t) { + let e; + let i = Number.MIN_VALUE; + for (const s of t) { + if (s.lastFocusTime > i) { + i = s.lastFocusTime; + e = s; + } + } + return e; + } + var dt; + var z4; + var nh; + var Lt = g({ + "out-build/vs/platform/windows/electron-main/windows.js"() { + "use strict"; + + sD(); + we(); + H(); + Ke(); + vt(); + Y(); + ht(); + pc(); + fn(); + mc(); + dt = q("windowsMainService"); + (function (t) { + t[t.CLI = 0] = "CLI"; + t[t.DOCK = 1] = "DOCK"; + t[t.MENU = 2] = "MENU"; + t[t.DIALOG = 3] = "DIALOG"; + t[t.DESKTOP = 4] = "DESKTOP"; + t[t.API = 5] = "API"; + t[t.LINK = 6] = "LINK"; + })(z4 ||= {}); + (function (t) { + function e(s, r, n = B4.screen.getAllDisplays()) { + s.trace(`window#validateWindowState: validating window state on ${n.length} display(s)`, r); + if (typeof r.x != "number" || typeof r.y != "number" || typeof r.width != "number" || typeof r.height != "number") { + s.trace("window#validateWindowState: unexpected type of state values"); + return; + } + if (r.width <= 0 || r.height <= 0) { + s.trace("window#validateWindowState: unexpected negative values"); + return; + } + if (n.length === 1) { + const l = i(n[0]); + s.trace("window#validateWindowState: single monitor working area", l); + if (l) { + let u = function () { + if (!!r && typeof r.x == "number" && typeof r.y == "number" && !!l) { + if (r.x < l.x) { + r.x = l.x; + } + if (r.y < l.y) { + r.y = l.y; + } + } + }; + var o = u; + u(); + if (r.width > l.width) { + r.width = l.width; + } + if (r.height > l.height) { + r.height = l.height; + } + if (r.x > l.x + l.width - 128) { + r.x = l.x + l.width - r.width; + } + if (r.y > l.y + l.height - 128) { + r.y = l.y + l.height - r.height; + } + u(); + } + return r; + } + if (r.display && r.mode === 3) { + const l = n.find(u => u.id === r.display); + if (l && typeof l.bounds?.x == "number" && typeof l.bounds?.y == "number") { + s.trace("window#validateWindowState: restoring fullscreen to previous display"); + const u = Ar(3); + u.x = l.bounds.x; + u.y = l.bounds.y; + return u; + } + } + let a; + let c; + try { + a = B4.screen.getDisplayMatching({ + x: r.x, + y: r.y, + width: r.width, + height: r.height + }); + c = i(a); + s.trace("window#validateWindowState: multi-monitor working area", c); + } catch (l) { + s.error("window#validateWindowState: error finding display for window state", l); + } + if (a && c && r.x + r.width > c.x && r.y + r.height > c.y && r.x < c.x + c.width && r.y < c.y + c.height) { + return r; + } + s.trace("window#validateWindowState: state is outside of the multi-monitor working area"); + } + t.validateWindowState = e; + function i(s) { + if (s.workArea.width > 0 && s.workArea.height > 0) { + return s.workArea; + } + if (s.bounds.width > 0 && s.bounds.height > 0) { + return s.bounds; + } + } + })(nh ||= {}); + } + }); + import { app as cD } from "electron"; + var oh; + var ah; + var H4 = g({ + "out-build/vs/platform/native/electron-main/auth.js"() { + "use strict"; + + At(); + B(); + er(); + M(); + se(); + _i(); + Ke(); + Kb(); + vt(); + Y(); + X(); + eh(); + Lt(); + oh = q("proxyAuthService"); + ah = class extends T { + constructor(e, i, s, r, n, o) { + super(); + this.h = e; + this.m = i; + this.n = s; + this.q = r; + this.r = n; + this.s = o; + this.a = "proxy-credentials://"; + this.b = new Map(); + this.c = undefined; + this.f = new Set(); + this.g = new Map(); + this.t(); + } + t() { + const e = x.fromNodeEventEmitter(cD, "login", (i, s, r, n, o) => ({ + event: i, + authInfo: { + ...n, + attempt: r.firstAuthAttempt ? 1 : 2 + }, + callback: o + })); + this.D(e(this.u, this)); + } + async lookupAuthorization(e) { + return this.u({ + authInfo: e + }); + } + async u({ + event: e, + authInfo: i, + callback: s + }) { + if (!i.isProxy) { + return; + } + e?.preventDefault(); + const r = String(Ds({ + scheme: i.scheme, + host: i.host, + port: i.port + })); + let n; + let o = this.b.get(r); + if (o) { + this.h.trace("auth#onLogin (proxy) - pending proxy handling found"); + n = await o; + } else { + this.h.trace("auth#onLogin (proxy) - no pending proxy handling found, starting new"); + o = this.w(i, r); + this.b.set(r, o); + try { + n = await o; + } finally { + this.b.delete(r); + } + } + s?.(n?.username, n?.password); + return n; + } + async w(e, i) { + this.h.trace("auth#resolveProxyCredentials (proxy) - enter"); + try { + const s = await this.y(e, i); + if (s) { + this.h.trace("auth#resolveProxyCredentials (proxy) - got credentials"); + return s; + } + this.h.trace("auth#resolveProxyCredentials (proxy) - did not get credentials"); + } finally { + this.h.trace("auth#resolveProxyCredentials (proxy) - exit"); + } + } + async y(e, i) { + this.h.trace("auth#doResolveProxyCredentials - enter", e); + if (this.s.extensionTestsLocationURI) { + const l = this.r.getValue("integration-test.http.proxyAuth"); + if (l) { + const u = l.indexOf(":"); + if (u !== -1) { + return { + username: l.substring(0, u), + password: l.substring(u + 1) + }; + } else { + return { + username: l, + password: "" + }; + } + } + return; + } + const s = (this.r.getValue("http.proxy") || "").trim() || (process.env.https_proxy || process.env.HTTPS_PROXY || process.env.http_proxy || process.env.HTTP_PROXY || "").trim() || undefined; + if (s?.indexOf("@") !== -1) { + const l = P.parse(s); + const u = l.authority.indexOf("@"); + if (u !== -1) { + if (e.attempt > 1) { + this.h.trace("auth#doResolveProxyCredentials (proxy) - exit - ignoring previously used config/envvar credentials"); + return; + } + this.h.trace("auth#doResolveProxyCredentials (proxy) - exit - found config/envvar credentials to use"); + const d = l.authority.substring(0, u); + const f = d.indexOf(":"); + if (f !== -1) { + return { + username: d.substring(0, f), + password: d.substring(f + 1) + }; + } else { + return { + username: d, + password: "" + }; + } + } + } + const r = e.attempt === 1 && this.g.get(i); + if (r) { + this.h.trace("auth#doResolveProxyCredentials (proxy) - exit - found session credentials to use"); + const { + username: l, + password: u + } = r; + return { + username: l, + password: u + }; + } + let n; + let o; + try { + const l = this.q.get(this.a + i, -1); + if (l) { + const u = JSON.parse(await this.n.decrypt(l)); + n = u.username; + o = u.password; + } + } catch (l) { + this.h.error(l); + } + if (e.attempt === 1 && typeof n == "string" && typeof o == "string") { + this.h.trace("auth#doResolveProxyCredentials (proxy) - exit - found stored credentials to use"); + this.g.set(i, { + username: n, + password: o + }); + return { + username: n, + password: o + }; + } + const a = this.c; + const c = this.c = (async () => { + await a; + const l = await this.z(e, i, n, o); + if (this.c === c) { + this.c = undefined; + } + return l; + })(); + return c; + } + async z(e, i, s, r) { + if (this.f.has(i)) { + this.h.trace("auth#doResolveProxyCredentials (proxy) - exit - login dialog was cancelled before, not showing again"); + return; + } + const n = this.m.getFocusedWindow() || this.m.getLastActiveWindow(); + if (!n) { + this.h.trace("auth#doResolveProxyCredentials (proxy) - exit - no opened window found to show dialog in"); + return; + } + this.h.trace(`auth#doResolveProxyCredentials (proxy) - asking window ${n.id} to handle proxy login`); + const o = this.g.get(i); + const a = { + authInfo: e, + username: o?.username ?? s, + password: o?.password ?? r, + replyChannel: `vscode:proxyAuthResponse:${ti()}` + }; + n.sendWhenReady("vscode:openProxyAuthenticationDialog", We.None, a); + const c = await new Promise(l => { + const u = async (d, f, p) => { + if (f === a.replyChannel) { + this.h.trace(`auth#doResolveProxyCredentials - exit - received credentials from window ${n.id}`); + n.win?.webContents.off("ipc-message", u); + if (p) { + const w = { + username: p.username, + password: p.password + }; + try { + if (p.remember) { + const m = await this.n.encrypt(JSON.stringify(w)); + this.q.store(this.a + i, m, -1, 1); + } else { + this.q.remove(this.a + i, -1); + } + } catch (m) { + this.h.error(m); + } + l({ + username: w.username, + password: w.password + }); + } else { + this.f.add(i); + l(undefined); + } + } + }; + n.win?.webContents.on("ipc-message", u); + }); + this.g.set(i, c); + return c; + } + }; + ah = __decorate([__param(0, V), __param(1, dt), __param(2, yu), __param(3, dc), __param(4, Je), __param(5, ot)], ah); + } + }); + var xo; + var wc = g({ + "out-build/vs/platform/backup/electron-main/backup.js"() { + "use strict"; + + Y(); + xo = q("backupMainService"); + } + }); + function lD(t) { + return typeof t?.backupFolder == "string"; + } + function uD(t) { + let e = []; + try { + if (Array.isArray(t.workspaces)) { + e = t.workspaces.map(i => ({ + workspace: { + id: i.id, + configPath: P.parse(i.configURIPath) + }, + remoteAuthority: i.remoteAuthority + })); + } + } catch {} + return e; + } + function hD(t) { + let e = []; + try { + if (Array.isArray(t.folders)) { + e = t.folders.map(i => ({ + folderUri: P.parse(i.folderUri), + remoteAuthority: i.remoteAuthority + })); + } + } catch {} + return e; + } + var dD = g({ + "out-build/vs/platform/backup/node/backup.js"() { + "use strict"; + + se(); + } + }); + function fD(t) { + return t && t.hasOwnProperty("folderUri"); + } + var pD = g({ + "out-build/vs/platform/backup/common/backup.js"() { + "use strict"; + } + }); + import { createHash as j1 } from "crypto"; + function pn(t) { + function e() { + let i = t.scheme === R.file ? Ci(t) : t.toString(); + if (!Se) { + i = i.toLowerCase(); + } + return j1("md5").update(i).digest("hex"); + } + return { + id: e(), + configPath: t + }; + } + function U1(t, e) { + function i() { + if (t.scheme !== R.file) { + return j1("md5").update(t.toString()).digest("hex"); + } + if (!e) { + return; + } + let r; + if (Se) { + r = e.ino; + } else if (N) { + r = e.birthtime.getTime(); + } else if (j) { + if (typeof e.birthtimeMs == "number") { + r = Math.floor(e.birthtimeMs); + } else { + r = e.birthtime.getTime(); + } + } + return j1("md5").update(t.fsPath).update(r ? String(r) : "").digest("hex"); + } + const s = i(); + if (typeof s == "string") { + return { + id: s, + uri: t + }; + } + } + function B1() { + return { + id: (Date.now() + Math.round(Math.random() * 1000)).toString() + }; + } + var gD; + var q1 = g({ + "out-build/vs/platform/workspaces/node/workspaces.js"() { + "use strict"; + + Ie(); + H(); + nt(); + gD = 32; + } + }); + import { createHash as mD } from "crypto"; + var ch; + var lh; + var wD = g({ + "out-build/vs/platform/backup/electron-main/backupMainService.js"() { + "use strict"; + + gi(); + Ie(); + we(); + H(); + nt(); + _t(); + dD(); + Ke(); + vt(); + Ti(); + He(); + X(); + pD(); + ri(); + q1(); + ht(); + lh = class { + static { + ch = this; + } + static { + this.a = "backupWorkspaces"; + } + constructor(e, i, s, r, n) { + this.j = e; + this.k = i; + this.l = s; + this.m = r; + this.n = n; + this.c = this.j.backupHome; + this.d = []; + this.e = []; + this.g = []; + this.h = tt; + this.i = { + isEqual: (o, a) => tu(o, a, !Se) + }; + } + async initialize() { + const e = this.n.getItem(ch.a) ?? { + workspaces: [], + folders: [], + emptyWindows: [] + }; + this.g = await this.x(e.emptyWindows); + this.d = await this.v(uD(e)); + this.e = await this.w(hD(e)); + this.D(); + } + o() { + if (this.s()) { + return []; + } else { + return this.d.slice(0); + } + } + q() { + if (this.s()) { + return []; + } else { + return this.e.slice(0); + } + } + isHotExitEnabled() { + return this.t() !== Nu.OFF; + } + s() { + return this.t() === Nu.ON_EXIT_AND_WINDOW_CLOSE; + } + t() { + return this.k.getValue()?.files?.hotExit || Nu.ON_EXIT; + } + getEmptyWindowBackups() { + return this.g.slice(0); + } + registerWorkspaceBackup(e, i) { + if (!this.d.some(r => e.workspace.id === r.workspace.id)) { + this.d.push(e); + this.D(); + } + const s = F(this.c, e.workspace.id); + if (i) { + return this.u(s, i).then(() => s); + } else { + return s; + } + } + async u(e, i) { + if (await ee.exists(e)) { + await this.A(e); + } + if (await ee.exists(i)) { + try { + await ee.rename(i, e, false); + } catch (s) { + this.m.error(`Backup: Could not move backup folder to new location: ${s.toString()}`); + } + } + } + registerFolderBackup(e) { + if (!this.e.some(i => this.h.isEqual(e.folderUri, i.folderUri))) { + this.e.push(e); + this.D(); + } + return F(this.c, this.E(e)); + } + registerEmptyWindowBackup(e) { + if (!this.g.some(i => !!i.backupFolder && this.i.isEqual(i.backupFolder, e.backupFolder))) { + this.g.push(e); + this.D(); + } + return F(this.c, e.backupFolder); + } + async v(e) { + if (!Array.isArray(e)) { + return []; + } + const i = new Set(); + const s = []; + for (const r of e) { + const n = r.workspace; + if (!Kt(n)) { + return []; + } + const o = rD(this.j, this.l); + if (!n.configPath.fsPath.startsWith(o.fsPath) && !i.has(n.id)) { + i.add(n.id); + const a = F(this.c, n.id); + if (await this.C(a)) { + if (n.configPath.scheme !== R.file || (await ee.exists(n.configPath.fsPath))) { + s.push(r); + } else { + await this.A(a); + } + } else { + await this.y(a); + } + } + } + return s; + } + async w(e) { + if (!Array.isArray(e)) { + return []; + } + const i = []; + const s = new Set(); + for (const r of e) { + const n = r.folderUri; + const o = this.h.getComparisonKey(n); + if (!s.has(o)) { + s.add(o); + const a = F(this.c, this.E(r)); + if (await this.C(a)) { + if (n.scheme !== R.file || (await ee.exists(n.fsPath))) { + i.push(r); + } else { + await this.A(a); + } + } else { + await this.y(a); + } + } + } + return i; + } + async x(e) { + if (!Array.isArray(e)) { + return []; + } + const i = []; + const s = new Set(); + for (const r of e) { + const n = r.backupFolder; + if (typeof n != "string") { + return []; + } + if (!s.has(n)) { + s.add(n); + const o = F(this.c, n); + if (await this.C(o)) { + i.push(r); + } else { + await this.y(o); + } + } + } + return i; + } + async y(e) { + try { + await ee.rm(e, tn.MOVE); + } catch (i) { + this.m.error(`Backup: Could not delete stale backup: ${i.toString()}`); + } + } + z() { + let e = B1(); + while (this.g.some(i => !!i.backupFolder && this.i.isEqual(i.backupFolder, e.id))) { + e = B1(); + } + return { + backupFolder: e.id + }; + } + async A(e) { + const i = this.z(); + const s = F(this.c, i.backupFolder); + try { + await ee.rename(e, s, false); + } catch (r) { + this.m.error(`Backup: Could not rename backup folder: ${r.toString()}`); + return false; + } + this.g.push(i); + return true; + } + async getDirtyWorkspaces() { + const e = []; + for (const i of this.d) { + if (await this.B(i)) { + e.push(i); + } + } + for (const i of this.e) { + if (await this.B(i)) { + e.push(i); + } + } + return e; + } + B(e) { + let i; + if (lD(e)) { + i = F(this.c, e.backupFolder); + } else if (fD(e)) { + i = F(this.c, this.E(e)); + } else { + i = F(this.c, e.workspace.id); + } + return this.C(i); + } + async C(e) { + try { + const i = await ee.readdir(e); + for (const s of i) { + try { + if ((await ee.readdir(F(e, s))).length > 0) { + return true; + } + } catch {} + } + } catch {} + return false; + } + D() { + const e = { + workspaces: this.d.map(({ + workspace: i, + remoteAuthority: s + }) => { + const r = { + id: i.id, + configURIPath: i.configPath.toString() + }; + if (s) { + r.remoteAuthority = s; + } + return r; + }), + folders: this.e.map(({ + folderUri: i, + remoteAuthority: s + }) => { + const r = { + folderUri: i.toString() + }; + if (s) { + r.remoteAuthority = s; + } + return r; + }), + emptyWindows: this.g.map(({ + backupFolder: i, + remoteAuthority: s + }) => { + const r = { + backupFolder: i + }; + if (s) { + r.remoteAuthority = s; + } + return r; + }) + }; + this.n.setItem(ch.a, e); + } + E(e) { + const i = e.folderUri; + let s; + if (i.scheme === R.file) { + s = Se ? i.fsPath : i.fsPath.toLowerCase(); + } else { + s = i.toString().toLowerCase(); + } + return mD("md5").update(s).digest("hex"); + } + }; + lh = ch = __decorate([__param(0, ot), __param(1, Je), __param(2, Ve), __param(3, V), __param(4, Oi)], lh); + } + }); + var V4; + var vD = g({ + "out-build/vs/platform/debug/common/extensionHostDebugIpc.js"() { + "use strict"; + + B(); + M(); + V4 = class { + constructor() { + this.a = new $(); + this.b = new $(); + this.c = new $(); + this.d = new $(); + } + static { + this.ChannelName = "extensionhostdebugservice"; + } + call(t, e, i) { + switch (e) { + case "close": + return Promise.resolve(this.a.fire({ + sessionId: i[0] + })); + case "reload": + return Promise.resolve(this.b.fire({ + sessionId: i[0] + })); + case "terminate": + return Promise.resolve(this.c.fire({ + sessionId: i[0] + })); + case "attach": + return Promise.resolve(this.d.fire({ + sessionId: i[0], + port: i[1], + subId: i[2] + })); + } + throw new Error("Method not implemented."); + } + listen(t, e, i) { + switch (e) { + case "close": + return this.a.event; + case "reload": + return this.b.event; + case "terminate": + return this.c.event; + case "attach": + return this.d.event; + } + throw new Error("Method not implemented."); + } + }; + } + }); + function z1(t, e, i = J4) { + const s = t.find(f => f.length > 0 && f[0] !== "-"); + const r = {}; + const n = ["_"]; + const o = []; + const a = {}; + let c; + for (const f in e) { + const p = e[f]; + if (p.type === "subcommand") { + if (f === s) { + c = p; + } + } else { + if (p.alias) { + r[f] = p.alias; + } + if (p.type === "string" || p.type === "string[]") { + n.push(f); + if (p.deprecates) { + n.push(...p.deprecates); + } + } else if (p.type === "boolean") { + o.push(f); + if (p.deprecates) { + o.push(...p.deprecates); + } + } + if (p.global) { + a[f] = p; + } + } + } + if (c && s) { + const f = a; + for (const y in c.options) { + f[y] = c.options[y]; + } + const p = t.filter(y => y !== s); + const w = i.getSubcommandReporter ? i.getSubcommandReporter(s) : undefined; + const m = z1(p, f, w); + return { + [s]: m, + _: [] + }; + } + const l = (0, G4.default)(t, { + string: n, + boolean: o, + alias: r + }); + const u = {}; + const d = l; + u._ = l._.map(f => String(f)).filter(f => f.length > 0); + delete d._; + for (const f in e) { + const p = e[f]; + if (p.type === "subcommand") { + continue; + } + if (p.alias) { + delete d[p.alias]; + } + let w = d[f]; + if (p.deprecates) { + for (const m of p.deprecates) { + if (d.hasOwnProperty(m)) { + if (!w) { + w = d[m]; + if (w) { + i.onDeprecatedOption(m, p.deprecationMessage || v(1787, null, f)); + } + } + delete d[m]; + } + } + } + if (typeof w !== "undefined") { + if (p.type === "string[]") { + if (!Array.isArray(w)) { + w = [w]; + } + if (!p.allowEmptyValue) { + const m = w.filter(y => y.length > 0); + if (m.length !== w.length) { + i.onEmptyValue(f); + w = m.length > 0 ? m : undefined; + } + } + } else if (p.type === "string") { + if (Array.isArray(w)) { + w = w.pop(); + i.onMultipleValues(f, w); + } else if (!w && !p.allowEmptyValue) { + i.onEmptyValue(f); + w = undefined; + } + } + u[f] = w; + if (p.deprecationMessage) { + i.onDeprecatedOption(f, p.deprecationMessage); + } + } + delete d[f]; + } + for (const f in d) { + i.onUnknownOption(f); + } + return u; + } + var G4; + var bD; + var H1; + var V1; + var J4; + var K4 = g({ + "out-build/vs/platform/environment/node/argv.js"() { + "use strict"; + + G4 = R0(O0(), 1); + H(); + be(); + bD = { + o: v(1748, null), + e: v(1749, null), + t: v(1750, null) + }; + H1 = ["tunnel", "serve-web"]; + V1 = { + tunnel: { + type: "subcommand", + description: "Make the current machine accessible from vscode.dev or other machines through a secure tunnel", + options: { + "cli-data-dir": { + type: "string", + args: "dir", + description: v(1751, null) + }, + "disable-telemetry": { + type: "boolean" + }, + "telemetry-level": { + type: "string" + }, + user: { + type: "subcommand", + options: { + login: { + type: "subcommand", + options: { + provider: { + type: "string" + }, + "access-token": { + type: "string" + } + } + } + } + } + } + }, + "serve-web": { + type: "subcommand", + description: "Run a server that displays the editor UI in browsers.", + options: { + "cli-data-dir": { + type: "string", + args: "dir", + description: v(1752, null) + }, + "disable-telemetry": { + type: "boolean" + }, + "telemetry-level": { + type: "string" + } + } + }, + diff: { + type: "boolean", + cat: "o", + alias: "d", + args: ["file", "file"], + description: v(1753, null) + }, + merge: { + type: "boolean", + cat: "o", + alias: "m", + args: ["path1", "path2", "base", "result"], + description: v(1754, null) + }, + add: { + type: "boolean", + cat: "o", + alias: "a", + args: "folder", + description: v(1755, null) + }, + goto: { + type: "boolean", + cat: "o", + alias: "g", + args: "file:line[:character]", + description: v(1756, null) + }, + "new-window": { + type: "boolean", + cat: "o", + alias: "n", + description: v(1757, null) + }, + "reuse-window": { + type: "boolean", + cat: "o", + alias: "r", + description: v(1758, null) + }, + wait: { + type: "boolean", + cat: "o", + alias: "w", + description: v(1759, null) + }, + waitMarkerFilePath: { + type: "string" + }, + locale: { + type: "string", + cat: "o", + args: "locale", + description: v(1760, null) + }, + "user-data-dir": { + type: "string", + cat: "o", + args: "dir", + description: v(1761, null) + }, + profile: { + type: "string", + cat: "o", + args: "profileName", + description: v(1762, null) + }, + help: { + type: "boolean", + cat: "o", + alias: "h", + description: v(1763, null) + }, + "extensions-dir": { + type: "string", + deprecates: ["extensionHomePath"], + cat: "e", + args: "dir", + description: v(1764, null) + }, + "extensions-download-dir": { + type: "string" + }, + "builtin-extensions-dir": { + type: "string" + }, + "list-extensions": { + type: "boolean", + cat: "e", + description: v(1765, null) + }, + "show-versions": { + type: "boolean", + cat: "e", + description: v(1766, null) + }, + category: { + type: "string", + allowEmptyValue: true, + cat: "e", + description: v(1767, null), + args: "category" + }, + "install-extension": { + type: "string[]", + cat: "e", + args: "ext-id | path", + description: v(1768, null) + }, + "pre-release": { + type: "boolean", + cat: "e", + description: v(1769, null) + }, + "uninstall-extension": { + type: "string[]", + cat: "e", + args: "ext-id", + description: v(1770, null) + }, + "update-extensions": { + type: "boolean", + cat: "e", + description: v(1771, null) + }, + "enable-proposed-api": { + type: "string[]", + allowEmptyValue: true, + cat: "e", + args: "ext-id", + description: v(1772, null) + }, + version: { + type: "boolean", + cat: "t", + alias: "v", + description: v(1773, null) + }, + verbose: { + type: "boolean", + cat: "t", + global: true, + description: v(1774, null) + }, + log: { + type: "string[]", + cat: "t", + args: "level", + global: true, + description: v(1775, null) + }, + status: { + type: "boolean", + alias: "s", + cat: "t", + description: v(1776, null) + }, + "prof-startup": { + type: "boolean", + cat: "t", + description: v(1777, null) + }, + "prof-append-timers": { + type: "string" + }, + "prof-duration-markers": { + type: "string[]" + }, + "prof-duration-markers-file": { + type: "string" + }, + "no-cached-data": { + type: "boolean" + }, + "prof-startup-prefix": { + type: "string" + }, + "prof-v8-extensions": { + type: "boolean" + }, + "disable-extensions": { + type: "boolean", + deprecates: ["disableExtensions"], + cat: "t", + description: v(1778, null) + }, + "disable-extension": { + type: "string[]", + cat: "t", + args: "ext-id", + description: v(1779, null) + }, + sync: { + type: "string", + cat: "t", + description: v(1780, null), + args: ["on | off"] + }, + "inspect-extensions": { + type: "string", + allowEmptyValue: true, + deprecates: ["debugPluginHost"], + args: "port", + cat: "t", + description: v(1781, null) + }, + "inspect-brk-extensions": { + type: "string", + allowEmptyValue: true, + deprecates: ["debugBrkPluginHost"], + args: "port", + cat: "t", + description: v(1782, null) + }, + "disable-lcd-text": { + type: "boolean", + cat: "t", + description: v(1783, null) + }, + "disable-gpu": { + type: "boolean", + cat: "t", + description: v(1784, null) + }, + "disable-chromium-sandbox": { + type: "boolean", + cat: "t", + description: v(1785, null) + }, + sandbox: { + type: "boolean" + }, + telemetry: { + type: "boolean", + cat: "t", + description: v(1786, null) + }, + remote: { + type: "string", + allowEmptyValue: true + }, + "folder-uri": { + type: "string[]", + cat: "o", + args: "uri" + }, + "file-uri": { + type: "string[]", + cat: "o", + args: "uri" + }, + "locate-extension": { + type: "string[]" + }, + extensionDevelopmentPath: { + type: "string[]" + }, + extensionDevelopmentKind: { + type: "string[]" + }, + extensionTestsPath: { + type: "string" + }, + extensionEnvironment: { + type: "string" + }, + debugId: { + type: "string" + }, + debugRenderer: { + type: "boolean" + }, + "inspect-ptyhost": { + type: "string", + allowEmptyValue: true + }, + "inspect-brk-ptyhost": { + type: "string", + allowEmptyValue: true + }, + "inspect-search": { + type: "string", + deprecates: ["debugSearch"], + allowEmptyValue: true + }, + "inspect-brk-search": { + type: "string", + deprecates: ["debugBrkSearch"], + allowEmptyValue: true + }, + "inspect-sharedprocess": { + type: "string", + allowEmptyValue: true + }, + "inspect-brk-sharedprocess": { + type: "string", + allowEmptyValue: true + }, + "export-default-configuration": { + type: "string" + }, + "install-source": { + type: "string" + }, + "enable-smoke-test-driver": { + type: "boolean" + }, + logExtensionHostCommunication: { + type: "boolean" + }, + "skip-release-notes": { + type: "boolean" + }, + "skip-welcome": { + type: "boolean" + }, + "skip-onboarding": { + type: "boolean" + }, + "override-cursor-auth-token": { + type: "string" + }, + "disable-telemetry": { + type: "boolean" + }, + "disable-updates": { + type: "boolean" + }, + "use-inmemory-secretstorage": { + type: "boolean", + deprecates: ["disable-keytar"] + }, + "password-store": { + type: "string" + }, + "disable-workspace-trust": { + type: "boolean" + }, + "disable-crash-reporter": { + type: "boolean" + }, + "crash-reporter-directory": { + type: "string" + }, + "crash-reporter-id": { + type: "string" + }, + "skip-add-to-recently-opened": { + type: "boolean" + }, + "open-url": { + type: "boolean" + }, + "file-write": { + type: "boolean" + }, + "file-chmod": { + type: "boolean" + }, + "install-builtin-extension": { + type: "string[]" + }, + force: { + type: "boolean" + }, + "do-not-sync": { + type: "boolean" + }, + trace: { + type: "boolean" + }, + "trace-memory-infra": { + type: "boolean" + }, + "trace-category-filter": { + type: "string" + }, + "trace-options": { + type: "string" + }, + "preserve-env": { + type: "boolean" + }, + "force-user-env": { + type: "boolean" + }, + "force-disable-user-env": { + type: "boolean" + }, + "open-devtools": { + type: "boolean" + }, + "shadow-window-for-workspace-id": { + type: "string" + }, + "disable-gpu-sandbox": { + type: "boolean" + }, + logsPath: { + type: "string" + }, + "__enable-file-policy": { + type: "boolean" + }, + editSessionId: { + type: "string" + }, + continueOn: { + type: "string" + }, + "locate-shell-integration-path": { + type: "string", + args: ["bash", "pwsh", "zsh", "fish"] + }, + "enable-coi": { + type: "boolean" + }, + "unresponsive-sample-interval": { + type: "string" + }, + "unresponsive-sample-period": { + type: "string" + }, + "no-proxy-server": { + type: "boolean" + }, + "no-sandbox": { + type: "boolean", + alias: "sandbox" + }, + "proxy-server": { + type: "string" + }, + "proxy-bypass-list": { + type: "string" + }, + "proxy-pac-url": { + type: "string" + }, + "js-flags": { + type: "string" + }, + inspect: { + type: "string", + allowEmptyValue: true + }, + "inspect-brk": { + type: "string", + allowEmptyValue: true + }, + nolazy: { + type: "boolean" + }, + "force-device-scale-factor": { + type: "string" + }, + "force-renderer-accessibility": { + type: "boolean" + }, + "ignore-certificate-errors": { + type: "boolean" + }, + "allow-insecure-localhost": { + type: "boolean" + }, + "log-net-log": { + type: "string" + }, + vmodule: { + type: "string" + }, + _urls: { + type: "string[]" + }, + "disable-dev-shm-usage": { + type: "boolean" + }, + "profile-temp": { + type: "boolean" + }, + "ozone-platform": { + type: "string" + }, + "enable-tracing": { + type: "string" + }, + "trace-startup-format": { + type: "string" + }, + "trace-startup-file": { + type: "string" + }, + "trace-startup-duration": { + type: "string" + }, + "xdg-portal-required-version": { + type: "string" + }, + hmr: { + type: "boolean" + }, + _: { + type: "string[]" + } + }; + J4 = { + onUnknownOption: () => {}, + onMultipleValues: () => {}, + onEmptyValue: () => {}, + onDeprecatedOption: () => {} + }; + } + }); + import { createServer as yD } from "net"; + var Z4; + var SD = g({ + "out-build/vs/platform/debug/electron-main/extensionHostDebugIpc.js"() { + "use strict"; + + vD(); + K4(); + Z4 = class extends V4 { + constructor(t) { + super(); + this.f = t; + } + call(t, e, i) { + if (e === "openExtensionDevelopmentHostWindow") { + return this.g(i[0], i[1]); + } else { + return super.call(t, e, i); + } + } + async g(t, e) { + const i = z1(t, V1); + i.debugRenderer = e; + const s = i.extensionDevelopmentPath; + if (!s) { + return { + success: false + }; + } + const [r] = await this.f.openExtensionDevelopmentHostWindow(s, { + context: 5, + cli: i, + forceProfile: i.profile, + forceTempProfile: i["profile-temp"] + }); + if (!e) { + return { + success: true + }; + } + const n = r.win; + if (!n) { + return { + success: true + }; + } + const o = n.webContents.debugger; + let a = o.isAttached() ? Infinity : 0; + const c = yD(l => { + if (a++ === 0) { + o.attach(); + } + let u = false; + const d = w => { + if (!u) { + l.write(JSON.stringify(w) + "\0"); + } + }; + const f = (w, m, y, b) => d({ + method: m, + params: y, + sessionId: b + }); + n.on("close", () => { + o.removeListener("message", f); + l.end(); + u = true; + }); + o.addListener("message", f); + let p = Buffer.alloc(0); + l.on("data", w => { + p = Buffer.concat([p, w]); + for (let m = p.indexOf(0); m !== -1; m = p.indexOf(0)) { + let y; + try { + const b = p.slice(0, m).toString("utf8"); + p = p.slice(m + 1); + y = JSON.parse(b); + } catch (b) { + console.error("error reading cdp line", b); + } + o.sendCommand(y.method, y.params, y.sessionId).then(b => d({ + id: y.id, + sessionId: y.sessionId, + result: b + })).catch(b => d({ + id: y.id, + sessionId: y.sessionId, + error: { + code: 0, + message: b.message + } + })); + } + }); + l.on("error", w => { + console.error("error on cdp pipe:", w); + }); + l.on("close", () => { + u = true; + if (--a === 0) { + o.detach(); + } + }); + }); + await new Promise(l => c.listen(0, l)); + n.on("close", () => c.close()); + return { + rendererDebugPort: c.address().port, + success: true + }; + } + }; + } + }); + function G1(t) { + return !!t.hostName && !!t.errorMessage; + } + var Y4; + var J1; + var K1 = g({ + "out-build/vs/platform/diagnostics/common/diagnostics.js"() { + "use strict"; + + Y(); + Y4 = "diagnosticsService"; + J1 = q(Y4); + } + }); + function X4(t, e = false) { + let i = 0; + const s = t.length; + let r = ""; + let n = 0; + let o = 16; + let a = 0; + function c(m) { + let y = 0; + let b = 0; + while (y < m) { + const k = t.charCodeAt(i); + if (k >= 48 && k <= 57) { + b = b * 16 + k - 48; + } else if (k >= 65 && k <= 70) { + b = b * 16 + k - 65 + 10; + } else if (k >= 97 && k <= 102) { + b = b * 16 + k - 97 + 10; + } else { + break; + } + i++; + y++; + } + if (y < m) { + b = -1; + } + return b; + } + function l(m) { + i = m; + r = ""; + n = 0; + o = 16; + a = 0; + } + function u() { + const m = i; + if (t.charCodeAt(i) === 48) { + i++; + } else { + for (i++; i < t.length && Do(t.charCodeAt(i));) { + i++; + } + } + if (i < t.length && t.charCodeAt(i) === 46) { + i++; + if (i < t.length && Do(t.charCodeAt(i))) { + for (i++; i < t.length && Do(t.charCodeAt(i));) { + i++; + } + } else { + a = 3; + return t.substring(m, i); + } + } + let y = i; + if (i < t.length && (t.charCodeAt(i) === 69 || t.charCodeAt(i) === 101)) { + i++; + if (i < t.length && t.charCodeAt(i) === 43 || t.charCodeAt(i) === 45) { + i++; + } + if (i < t.length && Do(t.charCodeAt(i))) { + for (i++; i < t.length && Do(t.charCodeAt(i));) { + i++; + } + y = i; + } else { + a = 3; + } + } + return t.substring(m, y); + } + function d() { + let m = ""; + let y = i; + while (true) { + if (i >= s) { + m += t.substring(y, i); + a = 2; + break; + } + const b = t.charCodeAt(i); + if (b === 34) { + m += t.substring(y, i); + i++; + break; + } + if (b === 92) { + m += t.substring(y, i); + i++; + if (i >= s) { + a = 2; + break; + } + switch (t.charCodeAt(i++)) { + case 34: + m += "\""; + break; + case 92: + m += "\\"; + break; + case 47: + m += "/"; + break; + case 98: + m += "\b"; + break; + case 102: + m += "\f"; + break; + case 110: + m += ` + `; + break; + case 114: + m += "\r"; + break; + case 116: + m += "\t"; + break; + case 117: + { + const A = c(4); + if (A >= 0) { + m += String.fromCharCode(A); + } else { + a = 4; + } + break; + } + default: + a = 5; + } + y = i; + continue; + } + if (b >= 0 && b <= 31) { + if (uh(b)) { + m += t.substring(y, i); + a = 2; + break; + } else { + a = 6; + } + } + i++; + } + return m; + } + function f() { + r = ""; + a = 0; + n = i; + if (i >= s) { + n = s; + return o = 17; + } + let m = t.charCodeAt(i); + if (Z1(m)) { + do { + i++; + r += String.fromCharCode(m); + m = t.charCodeAt(i); + } while (Z1(m)); + return o = 15; + } + if (uh(m)) { + i++; + r += String.fromCharCode(m); + if (m === 13 && t.charCodeAt(i) === 10) { + i++; + r += ` + `; + } + return o = 14; + } + switch (m) { + case 123: + i++; + return o = 1; + case 125: + i++; + return o = 2; + case 91: + i++; + return o = 3; + case 93: + i++; + return o = 4; + case 58: + i++; + return o = 6; + case 44: + i++; + return o = 5; + case 34: + i++; + r = d(); + return o = 10; + case 47: + { + const y = i - 1; + if (t.charCodeAt(i + 1) === 47) { + for (i += 2; i < s && !uh(t.charCodeAt(i));) { + i++; + } + r = t.substring(y, i); + return o = 12; + } + if (t.charCodeAt(i + 1) === 42) { + i += 2; + const b = s - 1; + let k = false; + while (i < b) { + if (t.charCodeAt(i) === 42 && t.charCodeAt(i + 1) === 47) { + i += 2; + k = true; + break; + } + i++; + } + if (!k) { + i++; + a = 1; + } + r = t.substring(y, i); + return o = 13; + } + r += String.fromCharCode(m); + i++; + return o = 16; + } + case 45: + r += String.fromCharCode(m); + i++; + if (i === s || !Do(t.charCodeAt(i))) { + return o = 16; + } + case 48: + case 49: + case 50: + case 51: + case 52: + case 53: + case 54: + case 55: + case 56: + case 57: + r += u(); + return o = 11; + default: + while (i < s && p(m)) { + i++; + m = t.charCodeAt(i); + } + if (n !== i) { + r = t.substring(n, i); + switch (r) { + case "true": + return o = 8; + case "false": + return o = 9; + case "null": + return o = 7; + } + return o = 16; + } + r += String.fromCharCode(m); + i++; + return o = 16; + } + } + function p(m) { + if (Z1(m) || uh(m)) { + return false; + } + switch (m) { + case 125: + case 93: + case 123: + case 91: + case 34: + case 58: + case 44: + case 47: + return false; + } + return true; + } + function w() { + let m; + do { + m = f(); + } while (m >= 12 && m <= 15); + return m; + } + return { + setPosition: l, + getPosition: () => i, + scan: e ? w : f, + getToken: () => o, + getTokenValue: () => r, + getTokenOffset: () => n, + getTokenLength: () => i - n, + getTokenError: () => a + }; + } + function Z1(t) { + return t === 32 || t === 9 || t === 11 || t === 12 || t === 160 || t === 5760 || t >= 8192 && t <= 8203 || t === 8239 || t === 8287 || t === 12288 || t === 65279; + } + function uh(t) { + return t === 10 || t === 13 || t === 8232 || t === 8233; + } + function Do(t) { + return t >= 48 && t <= 57; + } + function gn(t, e = [], i = vc.DEFAULT) { + let s = null; + let r = []; + const n = []; + function o(c) { + if (Array.isArray(r)) { + r.push(c); + } else if (s !== null) { + r[s] = c; + } + } + hh(t, { + onObjectBegin: () => { + const c = {}; + o(c); + n.push(r); + r = c; + s = null; + }, + onObjectProperty: c => { + s = c; + }, + onObjectEnd: () => { + r = n.pop(); + }, + onArrayBegin: () => { + const c = []; + o(c); + n.push(r); + r = c; + s = null; + }, + onArrayEnd: () => { + r = n.pop(); + }, + onLiteralValue: o, + onError: (c, l, u) => { + e.push({ + error: c, + offset: l, + length: u + }); + } + }, i); + return r[0]; + } + function ED(t, e = [], i = vc.DEFAULT) { + let s = { + type: "array", + offset: -1, + length: -1, + children: [], + parent: undefined + }; + function r(c) { + if (s.type === "property") { + s.length = c - s.offset; + s = s.parent; + } + } + function n(c) { + s.children.push(c); + return c; + } + hh(t, { + onObjectBegin: c => { + s = n({ + type: "object", + offset: c, + length: -1, + parent: s, + children: [] + }); + }, + onObjectProperty: (c, l, u) => { + s = n({ + type: "property", + offset: l, + length: -1, + parent: s, + children: [] + }); + s.children.push({ + type: "string", + value: c, + offset: l, + length: u, + parent: s + }); + }, + onObjectEnd: (c, l) => { + s.length = c + l - s.offset; + s = s.parent; + r(c + l); + }, + onArrayBegin: (c, l) => { + s = n({ + type: "array", + offset: c, + length: -1, + parent: s, + children: [] + }); + }, + onArrayEnd: (c, l) => { + s.length = c + l - s.offset; + s = s.parent; + r(c + l); + }, + onLiteralValue: (c, l, u) => { + n({ + type: Po(c), + offset: l, + length: u, + parent: s, + value: c + }); + r(l + u); + }, + onSeparator: (c, l, u) => { + if (s.type === "property") { + if (c === ":") { + s.colonOffset = l; + } else if (c === ",") { + r(l); + } + } + }, + onError: (c, l, u) => { + e.push({ + error: c, + offset: l, + length: u + }); + } + }, i); + const a = s.children[0]; + if (a) { + delete a.parent; + } + return a; + } + function Q4(t, e) { + if (!t) { + return; + } + let i = t; + for (const s of e) { + if (typeof s == "string") { + if (i.type !== "object" || !Array.isArray(i.children)) { + return; + } + let r = false; + for (const n of i.children) { + if (Array.isArray(n.children) && n.children[0].value === s) { + i = n.children[1]; + r = true; + break; + } + } + if (!r) { + return; + } + } else { + const r = s; + if (i.type !== "array" || r < 0 || !Array.isArray(i.children) || r >= i.children.length) { + return; + } + i = i.children[r]; + } + } + return i; + } + function hh(t, e, i = vc.DEFAULT) { + const s = X4(t, false); + function r(W) { + if (W) { + return () => W(s.getTokenOffset(), s.getTokenLength()); + } else { + return () => true; + } + } + function n(W) { + if (W) { + return Ee => W(Ee, s.getTokenOffset(), s.getTokenLength()); + } else { + return () => true; + } + } + const o = r(e.onObjectBegin); + const a = n(e.onObjectProperty); + const c = r(e.onObjectEnd); + const l = r(e.onArrayBegin); + const u = r(e.onArrayEnd); + const d = n(e.onLiteralValue); + const f = n(e.onSeparator); + const p = r(e.onComment); + const w = n(e.onError); + const m = i && i.disallowComments; + const y = i && i.allowTrailingComma; + function b() { + while (true) { + const W = s.scan(); + switch (s.getTokenError()) { + case 4: + k(14); + break; + case 5: + k(15); + break; + case 3: + k(13); + break; + case 1: + if (!m) { + k(11); + } + break; + case 2: + k(12); + break; + case 6: + k(16); + break; + } + switch (W) { + case 12: + case 13: + if (m) { + k(10); + } else { + p(); + } + break; + case 16: + k(1); + break; + case 15: + case 14: + break; + default: + return W; + } + } + } + function k(W, Ee = [], Ye = []) { + w(W); + if (Ee.length + Ye.length > 0) { + let re = s.getToken(); + while (re !== 17) { + if (Ee.indexOf(re) !== -1) { + b(); + break; + } else if (Ye.indexOf(re) !== -1) { + break; + } + re = b(); + } + } + } + function A(W) { + const Ee = s.getTokenValue(); + if (W) { + d(Ee); + } else { + a(Ee); + } + b(); + return true; + } + function C() { + switch (s.getToken()) { + case 11: + { + let W = 0; + try { + W = JSON.parse(s.getTokenValue()); + if (typeof W != "number") { + k(2); + W = 0; + } + } catch { + k(2); + } + d(W); + break; + } + case 7: + d(null); + break; + case 8: + d(true); + break; + case 9: + d(false); + break; + default: + return false; + } + b(); + return true; + } + function _() { + if (s.getToken() !== 10) { + k(3, [], [2, 5]); + return false; + } else { + A(false); + if (s.getToken() === 6) { + f(":"); + b(); + if (!me()) { + k(4, [], [2, 5]); + } + } else { + k(5, [], [2, 5]); + } + return true; + } + } + function Z() { + o(); + b(); + let W = false; + while (s.getToken() !== 2 && s.getToken() !== 17) { + if (s.getToken() === 5) { + if (!W) { + k(4, [], []); + } + f(","); + b(); + if (s.getToken() === 2 && y) { + break; + } + } else if (W) { + k(6, [], []); + } + if (!_()) { + k(4, [], [2, 5]); + } + W = true; + } + c(); + if (s.getToken() !== 2) { + k(7, [2], []); + } else { + b(); + } + return true; + } + function ie() { + l(); + b(); + let W = false; + while (s.getToken() !== 4 && s.getToken() !== 17) { + if (s.getToken() === 5) { + if (!W) { + k(4, [], []); + } + f(","); + b(); + if (s.getToken() === 4 && y) { + break; + } + } else if (W) { + k(6, [], []); + } + if (!me()) { + k(4, [], [4, 5]); + } + W = true; + } + u(); + if (s.getToken() !== 4) { + k(8, [4], []); + } else { + b(); + } + return true; + } + function me() { + switch (s.getToken()) { + case 3: + return ie(); + case 1: + return Z(); + case 10: + return A(true); + default: + return C(); + } + } + b(); + if (s.getToken() === 17) { + if (i.allowEmptyContent) { + return true; + } else { + k(4, [], []); + return false; + } + } else if (me()) { + if (s.getToken() !== 17) { + k(9, [], []); + } + return true; + } else { + k(4, [], []); + return false; + } + } + function Po(t) { + switch (typeof t) { + case "boolean": + return "boolean"; + case "number": + return "number"; + case "string": + return "string"; + case "object": + { + if (t) { + if (Array.isArray(t)) { + return "array"; + } + } else { + return "null"; + } + return "object"; + } + default: + return "null"; + } + } + var e5; + var t5; + var i5; + var vc; + var s5; + var rr = g({ + "out-build/vs/base/common/json.js"() { + "use strict"; + + (function (t) { + t[t.None = 0] = "None"; + t[t.UnexpectedEndOfComment = 1] = "UnexpectedEndOfComment"; + t[t.UnexpectedEndOfString = 2] = "UnexpectedEndOfString"; + t[t.UnexpectedEndOfNumber = 3] = "UnexpectedEndOfNumber"; + t[t.InvalidUnicode = 4] = "InvalidUnicode"; + t[t.InvalidEscapeCharacter = 5] = "InvalidEscapeCharacter"; + t[t.InvalidCharacter = 6] = "InvalidCharacter"; + })(e5 ||= {}); + (function (t) { + t[t.OpenBraceToken = 1] = "OpenBraceToken"; + t[t.CloseBraceToken = 2] = "CloseBraceToken"; + t[t.OpenBracketToken = 3] = "OpenBracketToken"; + t[t.CloseBracketToken = 4] = "CloseBracketToken"; + t[t.CommaToken = 5] = "CommaToken"; + t[t.ColonToken = 6] = "ColonToken"; + t[t.NullKeyword = 7] = "NullKeyword"; + t[t.TrueKeyword = 8] = "TrueKeyword"; + t[t.FalseKeyword = 9] = "FalseKeyword"; + t[t.StringLiteral = 10] = "StringLiteral"; + t[t.NumericLiteral = 11] = "NumericLiteral"; + t[t.LineCommentTrivia = 12] = "LineCommentTrivia"; + t[t.BlockCommentTrivia = 13] = "BlockCommentTrivia"; + t[t.LineBreakTrivia = 14] = "LineBreakTrivia"; + t[t.Trivia = 15] = "Trivia"; + t[t.Unknown = 16] = "Unknown"; + t[t.EOF = 17] = "EOF"; + })(t5 ||= {}); + (function (t) { + t[t.InvalidSymbol = 1] = "InvalidSymbol"; + t[t.InvalidNumberFormat = 2] = "InvalidNumberFormat"; + t[t.PropertyNameExpected = 3] = "PropertyNameExpected"; + t[t.ValueExpected = 4] = "ValueExpected"; + t[t.ColonExpected = 5] = "ColonExpected"; + t[t.CommaExpected = 6] = "CommaExpected"; + t[t.CloseBraceExpected = 7] = "CloseBraceExpected"; + t[t.CloseBracketExpected = 8] = "CloseBracketExpected"; + t[t.EndOfFileExpected = 9] = "EndOfFileExpected"; + t[t.InvalidCommentToken = 10] = "InvalidCommentToken"; + t[t.UnexpectedEndOfComment = 11] = "UnexpectedEndOfComment"; + t[t.UnexpectedEndOfString = 12] = "UnexpectedEndOfString"; + t[t.UnexpectedEndOfNumber = 13] = "UnexpectedEndOfNumber"; + t[t.InvalidUnicode = 14] = "InvalidUnicode"; + t[t.InvalidEscapeCharacter = 15] = "InvalidEscapeCharacter"; + t[t.InvalidCharacter = 16] = "InvalidCharacter"; + })(i5 ||= {}); + (function (t) { + t.DEFAULT = { + allowTrailingComma: true + }; + })(vc ||= {}); + (function (t) { + t[t.nullCharacter = 0] = "nullCharacter"; + t[t.maxAsciiCharacter = 127] = "maxAsciiCharacter"; + t[t.lineFeed = 10] = "lineFeed"; + t[t.carriageReturn = 13] = "carriageReturn"; + t[t.lineSeparator = 8232] = "lineSeparator"; + t[t.paragraphSeparator = 8233] = "paragraphSeparator"; + t[t.nextLine = 133] = "nextLine"; + t[t.space = 32] = "space"; + t[t.nonBreakingSpace = 160] = "nonBreakingSpace"; + t[t.enQuad = 8192] = "enQuad"; + t[t.emQuad = 8193] = "emQuad"; + t[t.enSpace = 8194] = "enSpace"; + t[t.emSpace = 8195] = "emSpace"; + t[t.threePerEmSpace = 8196] = "threePerEmSpace"; + t[t.fourPerEmSpace = 8197] = "fourPerEmSpace"; + t[t.sixPerEmSpace = 8198] = "sixPerEmSpace"; + t[t.figureSpace = 8199] = "figureSpace"; + t[t.punctuationSpace = 8200] = "punctuationSpace"; + t[t.thinSpace = 8201] = "thinSpace"; + t[t.hairSpace = 8202] = "hairSpace"; + t[t.zeroWidthSpace = 8203] = "zeroWidthSpace"; + t[t.narrowNoBreakSpace = 8239] = "narrowNoBreakSpace"; + t[t.ideographicSpace = 12288] = "ideographicSpace"; + t[t.mathematicalSpace = 8287] = "mathematicalSpace"; + t[t.ogham = 5760] = "ogham"; + t[t._ = 95] = "_"; + t[t.$ = 36] = "$"; + t[t._0 = 48] = "_0"; + t[t._1 = 49] = "_1"; + t[t._2 = 50] = "_2"; + t[t._3 = 51] = "_3"; + t[t._4 = 52] = "_4"; + t[t._5 = 53] = "_5"; + t[t._6 = 54] = "_6"; + t[t._7 = 55] = "_7"; + t[t._8 = 56] = "_8"; + t[t._9 = 57] = "_9"; + t[t.a = 97] = "a"; + t[t.b = 98] = "b"; + t[t.c = 99] = "c"; + t[t.d = 100] = "d"; + t[t.e = 101] = "e"; + t[t.f = 102] = "f"; + t[t.g = 103] = "g"; + t[t.h = 104] = "h"; + t[t.i = 105] = "i"; + t[t.j = 106] = "j"; + t[t.k = 107] = "k"; + t[t.l = 108] = "l"; + t[t.m = 109] = "m"; + t[t.n = 110] = "n"; + t[t.o = 111] = "o"; + t[t.p = 112] = "p"; + t[t.q = 113] = "q"; + t[t.r = 114] = "r"; + t[t.s = 115] = "s"; + t[t.t = 116] = "t"; + t[t.u = 117] = "u"; + t[t.v = 118] = "v"; + t[t.w = 119] = "w"; + t[t.x = 120] = "x"; + t[t.y = 121] = "y"; + t[t.z = 122] = "z"; + t[t.A = 65] = "A"; + t[t.B = 66] = "B"; + t[t.C = 67] = "C"; + t[t.D = 68] = "D"; + t[t.E = 69] = "E"; + t[t.F = 70] = "F"; + t[t.G = 71] = "G"; + t[t.H = 72] = "H"; + t[t.I = 73] = "I"; + t[t.J = 74] = "J"; + t[t.K = 75] = "K"; + t[t.L = 76] = "L"; + t[t.M = 77] = "M"; + t[t.N = 78] = "N"; + t[t.O = 79] = "O"; + t[t.P = 80] = "P"; + t[t.Q = 81] = "Q"; + t[t.R = 82] = "R"; + t[t.S = 83] = "S"; + t[t.T = 84] = "T"; + t[t.U = 85] = "U"; + t[t.V = 86] = "V"; + t[t.W = 87] = "W"; + t[t.X = 88] = "X"; + t[t.Y = 89] = "Y"; + t[t.Z = 90] = "Z"; + t[t.ampersand = 38] = "ampersand"; + t[t.asterisk = 42] = "asterisk"; + t[t.at = 64] = "at"; + t[t.backslash = 92] = "backslash"; + t[t.bar = 124] = "bar"; + t[t.caret = 94] = "caret"; + t[t.closeBrace = 125] = "closeBrace"; + t[t.closeBracket = 93] = "closeBracket"; + t[t.closeParen = 41] = "closeParen"; + t[t.colon = 58] = "colon"; + t[t.comma = 44] = "comma"; + t[t.dot = 46] = "dot"; + t[t.doubleQuote = 34] = "doubleQuote"; + t[t.equals = 61] = "equals"; + t[t.exclamation = 33] = "exclamation"; + t[t.greaterThan = 62] = "greaterThan"; + t[t.lessThan = 60] = "lessThan"; + t[t.minus = 45] = "minus"; + t[t.openBrace = 123] = "openBrace"; + t[t.openBracket = 91] = "openBracket"; + t[t.openParen = 40] = "openParen"; + t[t.percent = 37] = "percent"; + t[t.plus = 43] = "plus"; + t[t.question = 63] = "question"; + t[t.semicolon = 59] = "semicolon"; + t[t.singleQuote = 39] = "singleQuote"; + t[t.slash = 47] = "slash"; + t[t.tilde = 126] = "tilde"; + t[t.backspace = 8] = "backspace"; + t[t.formFeed = 12] = "formFeed"; + t[t.byteOrderMark = 65279] = "byteOrderMark"; + t[t.tab = 9] = "tab"; + t[t.verticalTab = 11] = "verticalTab"; + })(s5 ||= {}); + } + }); + var bc; + var Pe; + var dh = g({ + "out-build/vs/base/common/severity.js"() { + "use strict"; + + Wt(); + (function (t) { + t[t.Ignore = 0] = "Ignore"; + t[t.Info = 1] = "Info"; + t[t.Warning = 2] = "Warning"; + t[t.Error = 3] = "Error"; + t[t.AI = 4] = "AI"; + })(bc ||= {}); + (function (t) { + const e = "error"; + const i = "warning"; + const s = "warn"; + const r = "info"; + const n = "ignore"; + function o(c) { + if (c) { + if (br(e, c)) { + return t.Error; + } else if (br(i, c) || br(s, c)) { + return t.Warning; + } else if (br(r, c)) { + return t.Info; + } else { + return t.Ignore; + } + } else { + return t.Ignore; + } + } + t.fromValue = o; + function a(c) { + switch (c) { + case t.Error: + return e; + case t.Warning: + return i; + case t.Info: + return r; + default: + return n; + } + } + t.toString = a; + })(bc ||= {}); + Pe = bc; + } + }); + function ls(t) { + if (!t || typeof t != "object" || t instanceof RegExp) { + return t; + } + const e = Array.isArray(t) ? [] : {}; + Object.entries(t).forEach(([i, s]) => { + e[i] = s && typeof s == "object" ? ls(s) : s; + }); + return e; + } + function kD(t) { + if (!t || typeof t != "object") { + return t; + } + const e = [t]; + while (e.length > 0) { + const i = e.shift(); + Object.freeze(i); + for (const s in i) { + if (X1.call(i, s)) { + const r = i[s]; + if (typeof r == "object" && !Object.isFrozen(r) && !aE(r)) { + e.push(r); + } + } + } + } + return t; + } + function xD(t, e) { + return Y1(t, e, new Set()); + } + function Y1(t, e, i) { + if (Qt(t)) { + return t; + } + const s = e(t); + if (typeof s !== "undefined") { + return s; + } + if (Array.isArray(t)) { + const r = []; + for (const n of t) { + r.push(Y1(n, e, i)); + } + return r; + } + if (Nt(t)) { + if (i.has(t)) { + throw new Error("Cannot clone recursive data-structure"); + } + i.add(t); + const r = {}; + for (const n in t) { + if (X1.call(t, n)) { + r[n] = Y1(t[n], e, i); + } + } + i.delete(t); + return r; + } + return t; + } + function yc(t, e, i = true) { + if (Nt(t)) { + if (Nt(e)) { + Object.keys(e).forEach(s => { + if (s in t) { + if (i) { + if (Nt(t[s]) && Nt(e[s])) { + yc(t[s], e[s], i); + } else { + t[s] = e[s]; + } + } + } else { + t[s] = e[s]; + } + }); + } + return t; + } else { + return e; + } + } + function Os(t, e) { + if (t === e) { + return true; + } + if (t == null || e === null || e === undefined || typeof t != typeof e || typeof t != "object" || Array.isArray(t) !== Array.isArray(e)) { + return false; + } + let i; + let s; + if (Array.isArray(t)) { + if (t.length !== e.length) { + return false; + } + for (i = 0; i < t.length; i++) { + if (!Os(t[i], e[i])) { + return false; + } + } + } else { + const r = []; + for (s in t) { + r.push(s); + } + r.sort(); + const n = []; + for (s in e) { + n.push(s); + } + n.sort(); + if (!Os(r, n)) { + return false; + } + for (i = 0; i < r.length; i++) { + if (!Os(t[r[i]], e[r[i]])) { + return false; + } + } + } + return true; + } + function DD(t, e) { + const i = e.toLowerCase(); + const s = Object.keys(t).find(r => r.toLowerCase() === i); + if (s) { + return t[s]; + } else { + return t[e]; + } + } + var X1; + var us = g({ + "out-build/vs/base/common/objects.js"() { + "use strict"; + + _e(); + X1 = Object.prototype.hasOwnProperty; + } + }); + function r5(t, e) { + const i = ls(t); + let s = (i.buttons ?? []).map(a => Yv(a)); + let r = (t.buttons || []).map((a, c) => c); + let n = 0; + let o = i.cancelId ?? s.length - 1; + if (s.length > 1) { + const a = typeof o == "number" ? s[o] : undefined; + if (Se || N) { + if (typeof a == "string" && s.length > 1 && o !== 1) { + s.splice(o, 1); + s.splice(1, 0, a); + const c = r[o]; + r.splice(o, 1); + r.splice(1, 0, c); + o = 1; + } + if (Se && s.length > 1) { + s = s.reverse(); + r = r.reverse(); + n = s.length - 1; + if (typeof a == "string") { + o = n - 1; + } + } + } else if (j && typeof a == "string" && s.length > 1 && o !== s.length - 1) { + s.splice(o, 1); + s.push(a); + const c = r[o]; + r.splice(o, 1); + r.push(c); + o = s.length - 1; + } + } + i.buttons = s; + i.defaultId = n; + i.cancelId = o; + i.noLink = true; + i.title = i.title || e.nameLong; + return { + options: i, + buttonIndeces: r + }; + } + var PD; + var n5; + var $D; + var o5; + var a5 = g({ + "out-build/vs/platform/dialogs/common/dialogs.js"() { + "use strict"; + + nt(); + dh(); + be(); + Y(); + Sr(); + H(); + us(); + PD = q("dialogService"); + (function (t) { + t[t.Confirmation = 1] = "Confirmation"; + t[t.Prompt = 2] = "Prompt"; + t[t.Input = 3] = "Input"; + })(n5 ||= {}); + $D = q("fileDialogService"); + (function (t) { + t[t.SAVE = 0] = "SAVE"; + t[t.DONT_SAVE = 1] = "DONT_SAVE"; + t[t.CANCEL = 2] = "CANCEL"; + })(o5 ||= {}); + } + }); + import mn from "electron"; + var nr; + var fh; + var wn = g({ + "out-build/vs/platform/dialogs/electron-main/dialogMainService.js"() { + "use strict"; + + ce(); + er(); + Sr(); + M(); + ou(); + H(); + _t(); + be(); + a5(); + Y(); + X(); + ht(); + ri(); + nr = q("dialogMainService"); + fh = class { + constructor(e, i) { + this.d = e; + this.e = i; + this.a = new Map(); + this.b = new Map(); + this.c = new eo(); + } + pickFileFolder(e, i) { + return this.f({ + ...e, + pickFolders: true, + pickFiles: true, + title: v(1742, null) + }, i); + } + pickFolder(e, i) { + return this.f({ + ...e, + pickFolders: true, + title: v(1743, null) + }, i); + } + pickFile(e, i) { + return this.f({ + ...e, + pickFiles: true, + title: v(1744, null) + }, i); + } + pickWorkspace(e, i) { + const s = v(1745, null); + const r = Yv(v(1746, null)); + const n = Jy; + return this.f({ + ...e, + pickFiles: true, + title: s, + filters: n, + buttonLabel: r + }, i); + } + async f(e, i) { + const s = { + title: e.title, + buttonLabel: e.buttonLabel, + filters: e.filters, + defaultPath: e.defaultPath + }; + if (typeof e.pickFiles == "boolean" || typeof e.pickFolders == "boolean") { + s.properties = undefined; + if (e.pickFiles && e.pickFolders) { + s.properties = ["multiSelections", "openDirectory", "openFile", "createDirectory"]; + } + } + s.properties ||= ["multiSelections", e.pickFolders ? "openDirectory" : "openFile", "createDirectory"]; + if (N) { + s.properties.push("treatPackageAsDirectory"); + } + const r = await this.showOpenDialog(s, (i || mn.BrowserWindow.getFocusedWindow()) ?? undefined); + if (r && r.filePaths && r.filePaths.length > 0) { + return r.filePaths; + } + } + g(e) { + if (e) { + let i = this.b.get(e.id); + if (!i) { + i = new eo(); + this.b.set(e.id, i); + } + return i; + } else { + return this.c; + } + } + showMessageBox(e, i) { + return this.g(i).queue(async () => { + const { + options: s, + buttonIndeces: r + } = r5(e, this.e); + let n; + if (i) { + n = await mn.dialog.showMessageBox(i, s); + } else { + n = await mn.dialog.showMessageBox(s); + } + return { + response: r[n.response], + checkboxChecked: n.checkboxChecked + }; + }); + } + async showSaveDialog(e, i) { + const s = this.j(e, i); + if (!s) { + this.d.error("[DialogMainService]: file save dialog is already or will be showing for the window with the same configuration"); + return { + canceled: true, + filePath: "" + }; + } + try { + return await this.g(i).queue(async () => { + let r; + if (i) { + r = await mn.dialog.showSaveDialog(i, e); + } else { + r = await mn.dialog.showSaveDialog(e); + } + r.filePath = this.h(r.filePath); + return r; + }); + } finally { + Et(s); + } + } + h(e) { + if (e && N) { + e = io(e); + } + return e; + } + i(e) { + return e.map(i => this.h(i)); + } + async showOpenDialog(e, i) { + if (e.defaultPath) { + if (!(await ee.exists(e.defaultPath))) { + e.defaultPath = undefined; + } + } + const s = this.j(e, i); + if (!s) { + this.d.error("[DialogMainService]: file open dialog is already or will be showing for the window with the same configuration"); + return { + canceled: true, + filePaths: [] + }; + } + try { + return await this.g(i).queue(async () => { + let r; + if (i) { + r = await mn.dialog.showOpenDialog(i, e); + } else { + r = await mn.dialog.showOpenDialog(e); + } + r.filePaths = this.i(r.filePaths); + return r; + }); + } finally { + Et(s); + } + } + j(e, i) { + if (!i) { + return T.None; + } + this.d.trace("[DialogMainService]: request to acquire file dialog lock", e); + let s = this.a.get(i.id); + if (!s) { + s = new Set(); + this.a.set(i.id, s); + } + const r = Ds(e); + if (!s.has(r)) { + this.d.trace("[DialogMainService]: new file dialog lock created", e); + s.add(r); + return xe(() => { + this.d.trace("[DialogMainService]: file dialog lock disposed", e); + s?.delete(r); + if (s?.size === 0) { + this.a.delete(i.id); + } + }); + } + } + }; + fh = __decorate([__param(0, V), __param(1, Ve)], fh); + } + }); + async function ID(t, e, i) { + for (const r of t) { + const n = r.openedWorkspace; + if (Kt(n)) { + const o = await i(n); + if (o) { + if (o.folders.some(a => tt.isEqualOrParent(e, a.uri))) { + return r; + } + } else if (tt.isEqualOrParent(e, n.configPath)) { + return r; + } + } + } + const s = t.filter(r => Li(r.openedWorkspace) && tt.isEqualOrParent(e, r.openedWorkspace.uri)); + if (s.length) { + return s.sort((r, n) => -(r.openedWorkspace.uri.path.length - n.openedWorkspace.uri.path.length))[0]; + } + } + function $o(t, e) { + for (const i of t) { + if (Kt(i.openedWorkspace) && tt.isEqual(i.openedWorkspace.configPath, e) || Li(i.openedWorkspace) && tt.isEqual(i.openedWorkspace.uri, e)) { + return i; + } + } + } + function AD(t, e) { + const i = s => e.some(r => tt.isEqual(P.file(r), P.file(s))); + for (const s of t) { + if (s.config?.extensionDevelopmentPath?.some(r => i(r))) { + return s; + } + } + } + var c5 = g({ + "out-build/vs/platform/windows/electron-main/windowsFinder.js"() { + "use strict"; + + nt(); + se(); + ri(); + } + }); + function CD(t, e, i) { + let s; + let r; + let n; + let o; + let a; + if (e) { + o = e.offset; + a = o + e.length; + n = o; + while (n > 0 && !ph(t, n - 1)) { + n--; + } + let A = a; + while (A < t.length && !ph(t, A)) { + A++; + } + r = t.substring(n, A); + s = _D(r, i); + } else { + r = t; + s = 0; + n = 0; + o = 0; + a = t.length; + } + const c = RD(i, t); + let l = false; + let u = 0; + let d; + if (i.insertSpaces) { + d = Q1(" ", i.tabSize || 4); + } else { + d = "\t"; + } + const f = X4(r, false); + let p = false; + function w() { + return c + Q1(d, s + u); + } + function m() { + let A = f.scan(); + for (l = false; A === 15 || A === 14;) { + l = l || A === 14; + A = f.scan(); + } + p = A === 16 || f.getTokenError() !== 0; + return A; + } + const y = []; + function b(A, C, _) { + if (!p && C < a && _ > o && t.substring(C, _) !== A) { + y.push({ + offset: C, + length: _ - C, + content: A + }); + } + } + let k = m(); + if (k !== 17) { + const A = f.getTokenOffset() + n; + const C = Q1(d, s); + b(C, n, A); + } + while (k !== 17) { + let A = f.getTokenOffset() + f.getTokenLength() + n; + let C = m(); + let _ = ""; + while (!l && (C === 12 || C === 13)) { + const ie = f.getTokenOffset() + n; + b(" ", A, ie); + A = f.getTokenOffset() + f.getTokenLength() + n; + _ = C === 12 ? w() : ""; + C = m(); + } + if (C === 2) { + if (k !== 1) { + u--; + _ = w(); + } + } else if (C === 4) { + if (k !== 3) { + u--; + _ = w(); + } + } else { + switch (k) { + case 3: + case 1: + u++; + _ = w(); + break; + case 5: + case 12: + _ = w(); + break; + case 13: + if (l) { + _ = w(); + } else { + _ = " "; + } + break; + case 6: + _ = " "; + break; + case 10: + if (C === 6) { + _ = ""; + break; + } + case 7: + case 8: + case 9: + case 11: + case 2: + case 4: + if (C === 12 || C === 13) { + _ = " "; + } else if (C !== 5 && C !== 17) { + p = true; + } + break; + case 16: + p = true; + break; + } + if (l && (C === 12 || C === 13)) { + _ = w(); + } + } + const Z = f.getTokenOffset() + n; + b(_, A, Z); + k = C; + } + return y; + } + function Q1(t, e) { + let i = ""; + for (let s = 0; s < e; s++) { + i += t; + } + return i; + } + function _D(t, e) { + let i = 0; + let s = 0; + const r = e.tabSize || 4; + while (i < t.length) { + const n = t.charAt(i); + if (n === " ") { + s++; + } else if (n === "\t") { + s += r; + } else { + break; + } + i++; + } + return Math.floor(s / r); + } + function RD(t, e) { + for (let i = 0; i < e.length; i++) { + const s = e.charAt(i); + if (s === "\r") { + if (i + 1 < e.length && e.charAt(i + 1) === ` + `) { + return `\r + `; + } else { + return "\r"; + } + } + if (s === ` + `) { + return ` + `; + } + } + return t && t.eol || ` + `; + } + function ph(t, e) { + return `\r + `.indexOf(t.charAt(e)) !== -1; + } + var OD = g({ + "out-build/vs/base/common/jsonFormatter.js"() { + "use strict"; + + rr(); + } + }); + function LD(t, e, i, s, r) { + const n = e.slice(); + const a = ED(t, []); + let c; + let l; + while (n.length > 0 && (l = n.pop(), c = Q4(a, n), c === undefined && i !== undefined)) { + if (typeof l == "string") { + i = { + [l]: i + }; + } else { + i = [i]; + } + } + if (c) { + if (c.type === "object" && typeof l == "string" && Array.isArray(c.children)) { + const u = Q4(c, [l]); + if (u !== undefined) { + if (i === undefined) { + if (!u.parent) { + throw new Error("Malformed AST"); + } + const d = c.children.indexOf(u.parent); + let f; + let p = u.parent.offset + u.parent.length; + if (d > 0) { + const w = c.children[d - 1]; + f = w.offset + w.length; + } else { + f = c.offset + 1; + if (c.children.length > 1) { + p = c.children[1].offset; + } + } + return Io(t, { + offset: f, + length: p - f, + content: "" + }, s); + } else { + return Io(t, { + offset: u.offset, + length: u.length, + content: JSON.stringify(i) + }, s); + } + } else { + if (i === undefined) { + return []; + } + const d = `${JSON.stringify(l)}: ${JSON.stringify(i)}`; + const f = r ? r(c.children.map(w => w.children[0].value)) : c.children.length; + let p; + if (f > 0) { + const w = c.children[f - 1]; + p = { + offset: w.offset + w.length, + length: 0, + content: "," + d + }; + } else if (c.children.length === 0) { + p = { + offset: c.offset + 1, + length: 0, + content: d + }; + } else { + p = { + offset: c.offset + 1, + length: 0, + content: d + "," + }; + } + return Io(t, p, s); + } + } else if (c.type === "array" && typeof l == "number" && Array.isArray(c.children)) { + if (i !== undefined) { + const u = `${JSON.stringify(i)}`; + let d; + if (c.children.length === 0 || l === 0) { + d = { + offset: c.offset + 1, + length: 0, + content: c.children.length === 0 ? u : u + "," + }; + } else { + const f = l === -1 || l > c.children.length ? c.children.length : l; + const p = c.children[f - 1]; + d = { + offset: p.offset + p.length, + length: 0, + content: "," + u + }; + } + return Io(t, d, s); + } else { + const u = l; + const d = c.children[u]; + let f; + if (c.children.length === 1) { + f = { + offset: c.offset + 1, + length: c.length - 2, + content: "" + }; + } else if (c.children.length - 1 === u) { + const p = c.children[u - 1]; + const w = p.offset + p.length; + const m = c.offset + c.length; + f = { + offset: w, + length: m - 2 - w, + content: "" + }; + } else { + f = { + offset: d.offset, + length: c.children[u + 1].offset - d.offset, + content: "" + }; + } + return Io(t, f, s); + } + } else { + throw new Error(`Can not add ${typeof l != "number" ? "index" : "property"} to parent of type ${c.type}`); + } + } else if (i === undefined) { + return []; + } else { + return Io(t, { + offset: a ? a.offset : 0, + length: a ? a.length : 0, + content: JSON.stringify(i) + }, s); + } + } + function Io(t, e, i) { + let s = eg(t, e); + let r = e.offset; + let n = e.offset + e.content.length; + if (e.length === 0 || e.content.length === 0) { + while (r > 0 && !ph(s, r - 1)) { + r--; + } + while (n < s.length && !ph(s, n)) { + n++; + } + } + const o = CD(s, { + offset: r, + length: n - r + }, i); + for (let c = o.length - 1; c >= 0; c--) { + const l = o[c]; + s = eg(s, l); + r = Math.min(r, l.offset); + n = Math.max(n, l.offset + l.length); + n += l.content.length - l.length; + } + const a = t.length - (s.length - n) - r; + return [{ + offset: r, + length: a, + content: s.substring(r, n) + }]; + } + function eg(t, e) { + return t.substring(0, e.offset) + e.content + t.substring(e.offset + e.length); + } + function MD(t, e) { + const i = e.slice(0).sort((r, n) => { + const o = r.offset - n.offset; + if (o === 0) { + return r.length - n.length; + } else { + return o; + } + }); + let s = t.length; + for (let r = i.length - 1; r >= 0; r--) { + const n = i[r]; + if (n.offset + n.length <= s) { + t = eg(t, n); + } else { + throw new Error("Overlapping edit"); + } + s = n.offset; + } + return t; + } + var l5 = g({ + "out-build/vs/base/common/jsonEdit.js"() { + "use strict"; + + rr(); + OD(); + } + }); + function Ao(t) { + if (t.scheme === R.vscodeRemote) { + return t.authority; + } else { + return undefined; + } + } + var Sc = g({ + "out-build/vs/platform/remote/common/remoteHosts.js"() { + "use strict"; + + Ie(); + } + }); + function tg(t) { + return t.hasOwnProperty("workspace"); + } + function gh(t) { + return t.hasOwnProperty("folderUri"); + } + function FD(t) { + return t.hasOwnProperty("fileUri"); + } + function ND(t) { + return u5(t) || h5(t); + } + function u5(t) { + const e = t; + return typeof e?.path == "string" && (!e.name || typeof e.name == "string"); + } + function h5(t) { + const e = t; + return typeof e?.uri == "string" && (!e.name || typeof e.name == "string"); + } + function WD(t, e, i, s, r) { + if (t.scheme !== s.scheme) { + return { + name: i, + uri: t.toString(true) + }; + } + let n = e ? undefined : r.relativePath(s, t); + if (n !== undefined) { + if (n.length === 0) { + n = "."; + } else if (j) { + n = d5(n); + } + } else if (t.scheme === R.file) { + n = t.fsPath; + if (j) { + n = d5(n); + } + } else if (r.isEqualAuthority(t.authority, s.authority)) { + n = t.path; + } else { + return { + name: i, + uri: t.toString(true) + }; + } + return { + name: i, + path: n + }; + } + function d5(t) { + t = Lp(t); + if (!qE(t)) { + t = Xn(t); + } + return t; + } + function TD(t, e, i) { + const s = []; + const r = new Set(); + const n = i.dirname(e); + for (const o of t) { + let a; + if (u5(o)) { + if (o.path) { + a = i.resolvePath(n, o.path); + } + } else if (h5(o)) { + try { + a = P.parse(o.uri); + if (a.path[0] !== ae.sep) { + a = a.with({ + path: ae.sep + a.path + }); + } + } catch (c) { + console.warn(c); + } + } + if (a) { + const c = i.getComparisonKey(a); + if (!r.has(c)) { + r.add(c); + const l = o.name || i.basenameOrAuthority(a); + s.push(new Vy({ + uri: a, + name: l, + index: s.length + }, o)); + } + } + } + return s; + } + function jD(t) { + return t.workspace && typeof t.workspace == "object" && typeof t.workspace.id == "string" && typeof t.workspace.configPath == "string"; + } + function UD(t) { + return typeof t.folderUri == "string"; + } + function BD(t) { + return typeof t.fileUri == "string"; + } + function qD(t, e) { + const i = { + workspaces: [], + files: [] + }; + if (t) { + const s = function (n, o) { + for (let a = 0; a < n.length; a++) { + try { + o(n[a], a); + } catch (c) { + e.warn(`Error restoring recent entry ${JSON.stringify(n[a])}: ${c.toString()}. Skip entry.`); + } + } + }; + const r = t; + if (Array.isArray(r.entries)) { + s(r.entries, n => { + const o = n.label; + const a = n.remoteAuthority; + if (jD(n)) { + i.workspaces.push({ + label: o, + remoteAuthority: a, + workspace: { + id: n.workspace.id, + configPath: P.parse(n.workspace.configPath) + } + }); + } else if (UD(n)) { + i.workspaces.push({ + label: o, + remoteAuthority: a, + folderUri: P.parse(n.folderUri) + }); + } else if (BD(n)) { + i.files.push({ + label: o, + remoteAuthority: a, + fileUri: P.parse(n.fileUri) + }); + } + }); + } + } + return i; + } + function zD(t) { + const e = { + entries: [] + }; + for (const i of t.workspaces) { + if (gh(i)) { + e.entries.push({ + folderUri: i.folderUri.toString(), + label: i.label, + remoteAuthority: i.remoteAuthority + }); + } else { + e.entries.push({ + workspace: { + id: i.workspace.id, + configPath: i.workspace.configPath.toString() + }, + label: i.label, + remoteAuthority: i.remoteAuthority + }); + } + } + for (const i of t.files) { + e.entries.push({ + fileUri: i.fileUri.toString(), + label: i.label, + remoteAuthority: i.remoteAuthority + }); + } + return e; + } + var ig; + var sg = g({ + "out-build/vs/platform/workspaces/common/workspaces.js"() { + "use strict"; + + gi(); + rr(); + l5(); + Sr(); + Ie(); + we(); + H(); + nt(); + se(); + Y(); + Sc(); + ri(); + ig = q("workspacesService"); + } + }); + import * as f5 from "fs"; + import HD from "electron"; + var Cr; + var mh; + var vn = g({ + "out-build/vs/platform/workspaces/electron-main/workspacesManagementMainService.js"() { + "use strict"; + + B(); + rr(); + M(); + Ie(); + we(); + nt(); + _t(); + be(); + wc(); + wn(); + vt(); + Y(); + X(); + un(); + c5(); + ri(); + sg(); + q1(); + Cr = q("workspacesManagementMainService"); + mh = class extends T { + constructor(e, i, s, r, n) { + super(); + this.g = e; + this.h = i; + this.j = s; + this.m = r; + this.n = n; + this.a = this.D(new $()); + this.onDidDeleteUntitledWorkspace = this.a.event; + this.b = this.D(new $()); + this.onDidEnterWorkspace = this.b.event; + this.c = this.g.untitledWorkspacesHome; + this.f = []; + } + async initialize() { + this.f = []; + try { + const e = (await ee.readdir(this.c.with({ + scheme: R.file + }).fsPath)).map(i => he(this.c, i, g1)); + for (const i of e) { + const s = pn(i); + const r = await this.resolveLocalWorkspace(i); + if (r) { + this.f.push({ + workspace: s, + remoteAuthority: r.remoteAuthority + }); + } else { + await this.deleteUntitledWorkspace(s); + } + } + } catch (e) { + if (e.code !== "ENOENT") { + this.h.warn(`Unable to read folders in ${this.c} (${e}).`); + } + } + } + resolveLocalWorkspace(e) { + return this.q(e, i => f5.promises.readFile(i, "utf8")); + } + q(e, i) { + if (this.r(e) && e.scheme === R.file) { + try { + const s = i(e.fsPath); + if (s instanceof Promise) { + return s.then(r => this.s(e, r), r => {}); + } else { + return this.s(e, s); + } + } catch { + return; + } + } + } + r(e) { + return By(e, this.g) || ln(e); + } + s(e, i) { + try { + const s = this.t(e, i); + const r = pn(e); + return { + id: r.id, + configPath: r.configPath, + folders: TD(s.folders, r.configPath, tt), + remoteAuthority: s.remoteAuthority, + transient: s.transient + }; + } catch (s) { + this.h.warn(s.toString()); + } + } + t(e, i) { + const s = gn(i); + if (s && Array.isArray(s.folders)) { + s.folders = s.folders.filter(r => ND(r)); + } else { + throw new Error(`${e.toString(true)} looks like an invalid workspace file.`); + } + return s; + } + async createUntitledWorkspace(e, i) { + const { + workspace: s, + storedWorkspace: r + } = this.u(e, i); + const n = s.configPath.fsPath; + await f5.promises.mkdir(Xe(n), { + recursive: true + }); + await ee.writeFile(n, JSON.stringify(r, null, "\t")); + this.f.push({ + workspace: s, + remoteAuthority: i + }); + return s; + } + u(e = [], i) { + const s = (Date.now() + Math.round(Math.random() * 1000)).toString(); + const r = he(this.c, s); + const n = he(r, g1); + const o = []; + for (const a of e) { + o.push(WD(a.uri, true, a.name, r, tt)); + } + return { + workspace: pn(n), + storedWorkspace: { + folders: o, + remoteAuthority: i + } + }; + } + async getWorkspaceIdentifier(e) { + return pn(e); + } + isUntitledWorkspace(e) { + return By(e.configPath, this.g); + } + async deleteUntitledWorkspace(e) { + if (this.isUntitledWorkspace(e)) { + await this.w(e); + this.j.unsetWorkspace(e); + this.a.fire(e); + } + } + async w(e) { + const i = Ci(e.configPath); + try { + await ee.rm(Xe(i)); + const s = F(this.g.workspaceStorageHome.with({ + scheme: R.file + }).fsPath, e.id); + if (await ee.exists(s)) { + await ee.writeFile(F(s, "obsolete"), ""); + } + this.f = this.f.filter(r => r.workspace.id !== e.id); + } catch (s) { + this.h.warn(`Unable to delete untitled workspace ${i} (${s}).`); + } + } + getUntitledWorkspaces() { + return this.f; + } + async enterWorkspace(e, i, s) { + if (!e || !e.win || !e.isReady || !(await this.y(e, i, s))) { + return; + } + const n = await this.z(e, pn(s)); + if (n) { + this.b.fire({ + window: e, + workspace: n.workspace + }); + return n; + } + } + async y(e, i, s) { + if (s) { + if (Kt(e.openedWorkspace) && tt.isEqual(e.openedWorkspace.configPath, s)) { + return false; + } else if ($o(i, s)) { + await this.n.showMessageBox({ + type: "info", + buttons: [v(2544, null)], + message: v(2545, null, ks(s)), + detail: v(2546, null) + }, HD.BrowserWindow.getFocusedWindow() ?? undefined); + return false; + } else { + return true; + } + } else { + return true; + } + } + async z(e, i) { + if (!e.config) { + return; + } + e.focus(); + let s; + if (!e.config.extensionDevelopmentPath) { + if (e.config.backupPath) { + s = await this.m.registerWorkspaceBackup({ + workspace: i, + remoteAuthority: e.remoteAuthority + }, e.config.backupPath); + } else { + s = this.m.registerWorkspaceBackup({ + workspace: i, + remoteAuthority: e.remoteAuthority + }); + } + } + if (Kt(e.openedWorkspace) && this.isUntitledWorkspace(e.openedWorkspace)) { + await this.deleteUntitledWorkspace(e.openedWorkspace); + } + e.config.workspace = i; + e.config.backupPath = s; + return { + workspace: i, + backupPath: s + }; + } + }; + mh = __decorate([__param(0, ot), __param(1, V), __param(2, Rs), __param(3, xo), __param(4, nr)], mh); + } + }); + function VD(t, ...e) { + const i = e.reduce((n, o) => { + n[o] = true; + return n; + }, {}); + const s = [/^ELECTRON_.+$/, /^VSCODE_(?!(PORTABLE|SHELL_LOGIN|ENV_REPLACE|ENV_APPEND|ENV_PREPEND)).+$/, /^SNAP(|_.*)$/, /^GDK_PIXBUF_.+$/]; + Object.keys(t).filter(n => !i[n]).forEach(n => { + for (let o = 0; o < s.length; o++) { + if (n.search(s[o]) !== -1) { + delete t[n]; + break; + } + } + }); + } + function p5(t) { + if (t) { + delete t.DEBUG; + if (Se) { + delete t.LD_PRELOAD; + } + } + } + var g5; + var m5; + var wh = g({ + "out-build/vs/base/common/processes.js"() { + "use strict"; + + H(); + (function (t) { + t[t.stdout = 0] = "stdout"; + t[t.stderr = 1] = "stderr"; + })(g5 ||= {}); + (function (t) { + t[t.Success = 0] = "Success"; + t[t.Unknown = 1] = "Unknown"; + t[t.AccessDenied = 2] = "AccessDenied"; + t[t.ProcessNotFound = 3] = "ProcessNotFound"; + })(m5 ||= {}); + } + }); + import { MessageChannelMain as GD, app as JD, utilityProcess as KD } from "electron"; + import { StringDecoder as w5 } from "string_decoder"; + function ZD(t) { + return typeof t.responseWindowId == "number"; + } + var Co; + var _r; + var Ec; + var _o = g({ + "out-build/vs/platform/utilityProcess/electron-main/utilityProcess.js"() { + "use strict"; + + M(); + B(); + X(); + ce(); + Ie(); + Lt(); + dh(); + xt(); + ct(); + wh(); + us(); + H(); + wa(); + _r = class extends T { + static { + Co = this; + } + static { + this.a = 0; + } + static { + this.b = new Map(); + } + static getAll() { + return Array.from(Co.b.values()); + } + constructor(e, i, s) { + super(); + this.t = e; + this.u = i; + this.w = s; + this.c = String(++Co.a); + this.f = this.D(new $()); + this.onStdout = this.f.event; + this.g = this.D(new $()); + this.onStderr = this.g.event; + this.h = this.D(new $()); + this.onMessage = this.h.event; + this.j = this.D(new $()); + this.onSpawn = this.j.event; + this.m = this.D(new $()); + this.onExit = this.m.event; + this.n = this.D(new $()); + this.onCrash = this.n.event; + this.q = undefined; + this.r = undefined; + this.s = undefined; + } + y(e, i) { + let s; + if (this.s?.correlationId) { + s = `[UtilityProcess id: ${this.s?.correlationId}, type: ${this.s?.type}, pid: ${this.r ?? ""}]: ${e}`; + } else { + s = `[UtilityProcess type: ${this.s?.type}, pid: ${this.r ?? ""}]: ${e}`; + } + switch (i) { + case Pe.Error: + this.t.error(s); + break; + case Pe.Warning: + this.t.warn(s); + break; + case Pe.Info: + this.t.trace(s); + break; + } + } + z() { + if (this.q) { + this.y("Cannot start utility process because it is already running...", Pe.Error); + return false; + } else { + return true; + } + } + start(e) { + const i = this.C(e); + if (i && e.payload && this.postMessage(e.payload)) { + this.y("payload sent via postMessage()", Pe.Info); + } + return i; + } + C(e) { + if (!this.z()) { + return false; + } + this.s = e; + const i = `${this.s.type}-${this.c}`; + const s = Ct.asFileUri("bootstrap-fork.js").fsPath; + const r = this.s.args ?? []; + const n = this.s.execArgv ?? []; + const o = this.s.allowLoadingUnsignedLibraries; + const a = this.s.respondToAuthRequestsFromMainProcess; + const c = "pipe"; + const l = this.F(e); + this.y("creating new...", Pe.Info); + this.q = KD.fork(s, r, { + serviceName: i, + env: l, + execArgv: n, + allowLoadingUnsignedLibraries: o, + respondToAuthRequestsFromMainProcess: a, + stdio: c + }); + this.G(this.q, this.s, i); + return true; + } + F(e) { + const i = e.env ? { + ...e.env + } : { + ...ls(process.env) + }; + i.VSCODE_PROCESS_TITLE = e.processTitle; + i.VSCODE_ESM_ENTRYPOINT = e.entryPoint; + if (typeof e.parentLifecycleBound == "number") { + i.VSCODE_PARENT_PID = String(e.parentLifecycleBound); + } + i.VSCODE_CRASH_REPORTER_PROCESS_TYPE = e.type; + if (j) { + if (_S()) { + i.NODE_DISABLE_UNC_ACCESS_CHECKS = "1"; + } else { + i.NODE_UNC_HOST_ALLOWLIST = IS().join("\\"); + } + } + p5(i); + for (const s of Object.keys(i)) { + i[s] = String(i[s]); + } + return i; + } + G(e, i, s) { + if (e.stdout) { + const r = new w5("utf-8"); + this.D(x.fromNodeEventEmitter(e.stdout, "data")(n => this.f.fire(typeof n == "string" ? n : r.write(n)))); + } + if (e.stderr) { + const r = new w5("utf-8"); + this.D(x.fromNodeEventEmitter(e.stderr, "data")(n => this.g.fire(typeof n == "string" ? n : r.write(n)))); + } + this.D(x.fromNodeEventEmitter(e, "message")(r => this.h.fire(r))); + this.D(x.fromNodeEventEmitter(e, "spawn")(() => { + this.r = e.pid; + if (typeof e.pid == "number") { + Co.b.set(e.pid, { + pid: e.pid, + name: ZD(i) ? `${i.type} [${i.responseWindowId}]` : i.type + }); + } + this.y("successfully created", Pe.Info); + this.j.fire(e.pid); + })); + this.D(x.fromNodeEventEmitter(e, "exit")(r => { + this.y(`received exit event with code ${r}`, Pe.Info); + this.m.fire({ + pid: this.r, + code: r, + signal: "unknown" + }); + this.H(); + })); + this.D(x.fromNodeEventEmitter(e, "error", (r, n, o) => ({ + type: r, + location: n, + report: o + }))(({ + type: r, + location: n, + report: o + }) => { + this.y(`crashed due to ${r} from V8 at ${n}`, Pe.Info); + let a = []; + try { + a = JSON.parse(o).sharedObjects.filter(l => l.endsWith(".node")).map(l => { + const u = l.indexOf("extensions") === -1 ? l.indexOf("node_modules") : l.indexOf("extensions"); + return l.substring(u); + }); + } catch {} + this.u.publicLog2("utilityprocessv8error", { + processtype: i.type, + error: r, + location: n, + addons: a + }); + })); + this.D(x.fromNodeEventEmitter(JD, "child-process-gone", (r, n) => ({ + event: r, + details: n + }))(({ + details: r + }) => { + if (r.type === "Utility" && r.name === s) { + this.y(`crashed with code ${r.exitCode} and reason '${r.reason}'`, Pe.Error); + this.u.publicLog2("utilityprocesscrash", { + type: i.type, + reason: r.reason, + code: r.exitCode + }); + this.n.fire({ + pid: this.r, + code: r.exitCode, + reason: r.reason + }); + this.H(); + } + })); + } + once(e, i) { + const s = this.D(this.h.event(r => { + if (r === e) { + s.dispose(); + i(); + } + })); + } + postMessage(e, i) { + if (this.q) { + this.q.postMessage(e, i); + return true; + } else { + return false; + } + } + connect(e) { + const { + port1: i, + port2: s + } = new GD(); + this.postMessage(e, [s]); + return i; + } + enableInspectPort() { + if (!this.q || typeof this.r != "number") { + return false; + } + this.y("enabling inspect port", Pe.Info); + const e = process; + if (typeof e._debugProcess == "function") { + e._debugProcess(this.r); + return true; + } else { + return false; + } + } + kill() { + if (!this.q) { + return; + } + this.y("attempting to kill the process...", Pe.Info); + if (this.q.kill()) { + this.y("successfully killed the process", Pe.Info); + this.H(); + } else { + this.y("unable to kill the process", Pe.Warning); + } + } + H() { + if (typeof this.r == "number") { + Co.b.delete(this.r); + } + this.q = undefined; + } + async waitForExit(e) { + if (this.q) { + this.y("waiting to exit...", Pe.Info); + await Promise.race([x.toPromise(this.onExit), wi(e)]); + if (this.q) { + this.y(`did not exit within ${e}ms, will kill it now...`, Pe.Info); + this.kill(); + } + } + } + }; + _r = Co = __decorate([__param(0, V), __param(1, Ot), __param(2, Te)], _r); + Ec = class extends _r { + constructor(e, i, s, r) { + super(e, s, r); + this.I = i; + } + start(e) { + const i = this.I.getWindowById(e.responseWindowId); + if (i === undefined || i.webContents === undefined || i?.win?.isDestroyed() === true || i?.webContents?.isDestroyed() === true) { + this.y("Refusing to start utility process because requesting window cannot be found or is destroyed...", Pe.Error); + return true; + } + if (!super.C(e)) { + return false; + } + if (i?.win) { + this.J(i.win, e); + } + const r = this.connect(e.payload); + i.webContents.postMessage(e.responseChannel, e.responseNonce, [r]); + return true; + } + J(e, i) { + if (i.windowLifecycleBound) { + this.D(x.filter(this.w.onWillLoadWindow, s => s.window.win === e)(() => this.kill())); + this.D(x.fromNodeEventEmitter(e, "closed")(() => this.kill())); + } + } + }; + Ec = __decorate([__param(0, V), __param(1, dt), __param(2, Ot), __param(3, Te)], Ec); + } + }); + import { app as v5, BrowserWindow as YD } from "electron"; + var b5; + var vh; + var bh; + var y5 = g({ + "out-build/vs/platform/diagnostics/electron-main/diagnosticsMainService.js"() { + "use strict"; + + as(); + At(); + Y(); + Lt(); + ri(); + vn(); + _e(); + X(); + _o(); + b5 = "diagnosticsMainService"; + vh = q(b5); + bh = class { + constructor(e, i, s) { + this.a = e; + this.b = i; + this.c = s; + } + async getRemoteDiagnostics(e) { + const i = this.a.getWindows(); + return (await Promise.all(i.map(async r => { + const n = r.remoteAuthority; + if (!n) { + return; + } + const o = `vscode:getDiagnosticInfoResponse${r.id}`; + const a = { + includeProcesses: e.includeProcesses, + folders: e.includeWorkspaceMetadata ? await this.f(r) : undefined + }; + return new Promise(c => { + r.sendWhenReady("vscode:getDiagnosticInfo", We.None, { + replyChannel: o, + args: a + }); + it.once(o, (l, u) => { + if (!u) { + c({ + hostName: n, + errorMessage: `Unable to resolve connection to '${n}'.` + }); + } + c(u); + }); + setTimeout(() => { + c({ + hostName: n, + errorMessage: `Connection to '${n}' could not be established` + }); + }, 5000); + }); + }))).filter(r => !!r); + } + async getMainDiagnostics() { + this.c.trace("Received request for main process info from other instance."); + const e = []; + for (const s of YD.getAllWindows()) { + const r = this.a.getWindowById(s.id); + if (r) { + e.push(await this.d(r)); + } else { + e.push(this.e(s)); + } + } + const i = []; + for (const { + pid: s, + name: r + } of _r.getAll()) { + i.push({ + pid: s, + name: r + }); + } + return { + mainPID: process.pid, + mainArguments: process.argv.slice(1), + windows: e, + pidToNames: i, + screenReader: !!v5.accessibilitySupportEnabled, + gpuFeatureStatus: v5.getGPUFeatureStatus() + }; + } + async d(e) { + const i = await this.f(e); + const s = Vl(e.win); + return this.e(s, i, e.remoteAuthority); + } + e(e, i = [], s) { + return { + id: e.id, + pid: e.webContents.getOSProcessId(), + title: e.getTitle(), + folderURIs: i, + remoteAuthority: s + }; + } + async f(e) { + const i = []; + const s = e.openedWorkspace; + if (Li(s)) { + i.push(s.uri); + } else if (Kt(s)) { + const r = await this.b.resolveLocalWorkspace(s.configPath); + if (r) { + r.folders.forEach(o => { + i.push(o.uri); + }); + } + } + return i; + } + }; + bh = __decorate([__param(0, dt), __param(1, Cr), __param(2, V)], bh); + } + }); + import { safeStorage as XD, app as QD } from "electron"; + var or; + var yh; + var eP = g({ + "out-build/vs/platform/encryption/electron-main/encryptionMainService.js"() { + "use strict"; + + H(); + X(); + or = XD; + yh = class { + constructor(e) { + this.a = e; + if (QD.commandLine.getSwitchValue("password-store") === "basic") { + this.a.trace("[EncryptionMainService] setting usePlainTextEncryption to true..."); + or.setUsePlainTextEncryption?.(true); + this.a.trace("[EncryptionMainService] set usePlainTextEncryption to true"); + } + } + async encrypt(e) { + this.a.trace("[EncryptionMainService] Encrypting value..."); + try { + const i = JSON.stringify(or.encryptString(e)); + this.a.trace("[EncryptionMainService] Encrypted value."); + return i; + } catch (i) { + this.a.error(i); + throw i; + } + } + async decrypt(e) { + let i; + try { + i = JSON.parse(e); + if (!i.data) { + throw new Error(`[EncryptionMainService] Invalid encrypted value: ${e}`); + } + const s = Buffer.from(i.data); + this.a.trace("[EncryptionMainService] Decrypting value..."); + const r = or.decryptString(s); + this.a.trace("[EncryptionMainService] Decrypted value."); + return r; + } catch (s) { + this.a.error(s); + throw s; + } + } + isEncryptionAvailable() { + this.a.trace("[EncryptionMainService] Checking if encryption is available..."); + const e = or.isEncryptionAvailable(); + this.a.trace("[EncryptionMainService] Encryption is available: ", e); + return Promise.resolve(e); + } + getKeyStorageProvider() { + if (j) { + return Promise.resolve("dpapi"); + } + if (N) { + return Promise.resolve("keychain_access"); + } + if (or.getSelectedStorageBackend) { + try { + this.a.trace("[EncryptionMainService] Getting selected storage backend..."); + const e = or.getSelectedStorageBackend(); + this.a.trace("[EncryptionMainService] Selected storage backend: ", e); + return Promise.resolve(e); + } catch (e) { + this.a.error(e); + } + } + return Promise.resolve("unknown"); + } + async setUsePlainTextEncryption() { + if (j) { + throw new Error("Setting plain text encryption is not supported on Windows."); + } + if (N) { + throw new Error("Setting plain text encryption is not supported on macOS."); + } + if (!or.setUsePlainTextEncryption) { + throw new Error("Setting plain text encryption is not supported."); + } + this.a.trace("[EncryptionMainService] Setting usePlainTextEncryption to true..."); + or.setUsePlainTextEncryption(true); + this.a.trace("[EncryptionMainService] Set usePlainTextEncryption to true"); + } + }; + yh = __decorate([__param(0, V)], yh); + } + }); + import tP from "assert"; + function iP(t, e) { + const i = (c, l) => { + console.warn(v(1796, null, c, l)); + }; + const s = c => { + console.warn(v(1797, null, c)); + }; + const r = (c, l) => { + console.warn(v(1798, null, c, l)); + }; + const n = c => ({ + onUnknownOption: l => { + if (!H1.includes(c)) { + console.warn(v(1799, null, l, c)); + } + }, + onMultipleValues: i, + onEmptyValue: s, + onDeprecatedOption: r, + getSubcommandReporter: H1.includes(c) ? n : undefined + }); + const a = z1(t, V1, e ? { + onUnknownOption: c => { + console.warn(v(1800, null, c)); + }, + onMultipleValues: i, + onEmptyValue: s, + onDeprecatedOption: r, + getSubcommandReporter: n + } : undefined); + if (a.goto) { + a._.forEach(c => tP(/^(\w:)?[^:]+(:\d*){0,2}:?$/.test(c), v(1801, null))); + } + return a; + } + function sP(t) { + const e = t.findIndex(i => !/^-/.test(i)); + if (e > -1) { + return [...t.slice(0, e), ...t.slice(e + 1)]; + } + } + function rP(t) { + let [, ...e] = t; + if (process.env.VSCODE_DEV) { + e = sP(e) || []; + } + const i = !bn(process.env); + return iP(e, i); + } + function nP(t, ...e) { + const i = t.indexOf("--"); + if (i === -1) { + t.push(...e); + } else { + t.splice(i, 0, ...e); + } + return t; + } + function bn(t) { + return t.VSCODE_CLI === "1"; + } + var kc = g({ + "out-build/vs/platform/environment/node/argvHelper.js"() { + "use strict"; + + be(); + K4(); + } + }); + import * as oP from "os"; + function aP({ + useAlternateBitness: t = false + } = {}) { + if (t) { + if (xc === 0) { + return process.env["ProgramFiles(x86)"] || null; + } else { + return Ro === 0 && process.env.ProgramW6432 || null; + } + } else { + return process.env.ProgramFiles || null; + } + } + async function Sh({ + useAlternateBitness: t = false, + findPreview: e = false + } = {}) { + const i = aP({ + useAlternateBitness: t + }); + if (!i) { + return null; + } + const s = F(i, "PowerShell"); + if (!(await jt.existsDirectory(s))) { + return null; + } + let r = -1; + let n = null; + for (const c of await ee.readdir(s)) { + let l = -1; + if (e) { + const d = c.indexOf("-"); + if (d < 0) { + continue; + } + const f = c.substring(0, d); + if (!rg.test(f) || c.substring(d + 1) !== "preview") { + continue; + } + l = parseInt(f, 10); + } else { + if (!rg.test(c)) { + continue; + } + l = parseInt(c, 10); + } + if (l <= r) { + continue; + } + const u = F(s, c, "pwsh.exe"); + if (await jt.existsFile(u)) { + n = u; + r = l; + } + } + if (!n) { + return null; + } + const o = i.includes("x86") ? " (x86)" : ""; + const a = e ? " Preview" : ""; + return new Dc(n, `PowerShell${a}${o}`, true); + } + async function S5({ + findPreview: t + } = {}) { + if (!process.env.LOCALAPPDATA) { + return null; + } + const e = F(process.env.LOCALAPPDATA, "Microsoft", "WindowsApps"); + if (!(await jt.existsDirectory(e))) { + return null; + } + const { + pwshMsixDirRegex: i, + pwshMsixName: s + } = t ? { + pwshMsixDirRegex: x5, + pwshMsixName: "PowerShell Preview (Store)" + } : { + pwshMsixDirRegex: k5, + pwshMsixName: "PowerShell (Store)" + }; + for (const r of await ee.readdir(e)) { + if (i.test(r)) { + const n = F(e, r, "pwsh.exe"); + return new Dc(n, s); + } + } + return null; + } + function cP() { + const t = F(oP.homedir(), ".dotnet", "tools", "pwsh.exe"); + return new Dc(t, ".NET Core PowerShell Global Tool"); + } + function lP() { + const t = F(process.env.windir, xc === 1 && Ro !== 1 ? "SysNative" : "System32", "WindowsPowerShell", "v1.0", "powershell.exe"); + return new Dc(t, "Windows PowerShell", true); + } + async function* uP() { + let t = await Sh(); + if (t) { + yield t; + } + t = await Sh({ + useAlternateBitness: true + }); + if (t) { + yield t; + } + t = await S5(); + if (t) { + yield t; + } + t = cP(); + if (t) { + yield t; + } + t = await Sh({ + findPreview: true + }); + if (t) { + yield t; + } + t = await S5({ + findPreview: true + }); + if (t) { + yield t; + } + t = await Sh({ + useAlternateBitness: true, + findPreview: true + }); + if (t) { + yield t; + } + t = lP(); + if (t) { + yield t; + } + } + async function* E5() { + for await (const t of uP()) { + if (await t.exists()) { + yield t; + } + } + } + async function hP() { + for await (const t of E5()) { + return t; + } + return null; + } + var rg; + var k5; + var x5; + var D5; + var xc; + var Ro; + var Dc; + var P5 = g({ + "out-build/vs/base/node/powershell.js"() { + "use strict"; + + we(); + _t(); + rg = /^\d+$/; + k5 = /^Microsoft.PowerShell_.*/; + x5 = /^Microsoft.PowerShellPreview_.*/; + (function (t) { + t[t.x64 = 0] = "x64"; + t[t.x86 = 1] = "x86"; + t[t.ARM = 2] = "ARM"; + })(D5 ||= {}); + switch (process.arch) { + case "ia32": + xc = 1; + break; + case "arm": + case "arm64": + xc = 2; + break; + default: + xc = 0; + break; + } + if (process.env.PROCESSOR_ARCHITEW6432) { + Ro = process.env.PROCESSOR_ARCHITEW6432 === "ARM64" ? 2 : 0; + } else if (process.env.PROCESSOR_ARCHITECTURE === "ARM64") { + Ro = 2; + } else if (process.env.PROCESSOR_ARCHITECTURE === "X86") { + Ro = 1; + } else { + Ro = 0; + } + Dc = class { + constructor(t, e, i) { + this.exePath = t; + this.displayName = e; + this.a = i; + } + async exists() { + if (this.a === undefined) { + this.a = await jt.existsFile(this.exePath); + } + return this.a; + } + }; + } + }); + import { promises as $5 } from "fs"; + function I5(t = Ii) { + return t.comspec || "cmd.exe"; + } + function dP(t) { + let e = []; + let i = false; + const s = function (r) { + if (i) { + e.push(r); + return; + } + if (!t.send(r, o => { + if (o) { + console.error(o); + } + i = false; + if (e.length > 0) { + const a = e.slice(0); + e = []; + a.forEach(c => s(c)); + } + }) || j) { + i = true; + } + }; + return { + send: s + }; + } + var ng; + var og = g({ + "out-build/vs/base/node/processes.js"() { + "use strict"; + + we(); + H(); + ys(); + wh(); + _e(); + _t(); + (function (t) { + async function e(i, s, r) { + if (Zr(i)) { + return i; + } + if (s === undefined) { + s = bs(); + } + if (Xe(i) !== "." || (r === undefined && wt(Ii.PATH) && (r = Ii.PATH.split(Zl)), r === undefined || r.length === 0)) { + return F(s, i); + } + async function o(a) { + if (await ee.exists(a)) { + let c; + try { + c = await $5.stat(a); + } catch (l) { + if (l.message.startsWith("EACCES")) { + c = await $5.lstat(a); + } + } + if (c) { + return !c.isDirectory(); + } else { + return false; + } + } + return false; + } + for (const a of r) { + let c; + if (Zr(a)) { + c = F(a, i); + } else { + c = F(s, a, i); + } + if (await o(c)) { + return c; + } + let l = c + ".com"; + if ((await o(l)) || (l = c + ".exe", await o(l))) { + return l; + } + } + return F(s, i); + } + t.findExecutable = e; + })(ng ||= {}); + } + }); + import { userInfo as fP } from "os"; + async function A5(t, e) { + if (t === 1) { + if (j) { + return gP(); + } else { + return I5(e); + } + } else { + return pP(t, e); + } + } + function pP(t, e) { + if (Se && t === 2 || N && t === 3) { + return "/bin/bash"; + } + if (!Eh) { + let i; + if (j) { + i = "/bin/bash"; + } else { + i = e.SHELL; + if (!i) { + try { + i = fP().shell; + } catch {} + } + i ||= "sh"; + if (i === "/bin/false") { + i = "/bin/bash"; + } + } + Eh = i; + } + return Eh; + } + async function gP() { + kh ||= (await hP()).exePath; + return kh; + } + var Eh; + var kh; + var C5 = g({ + "out-build/vs/base/node/shell.js"() { + "use strict"; + + H(); + P5(); + og(); + Eh = null; + kh = null; + } + }); + function mP(t, e, i) { + return Math.min(Math.max(t, e), i); + } + var wP = g({ + "out-build/vs/base/common/numbers.js"() { + "use strict"; + } + }); + import { spawn as vP } from "child_process"; + async function ag(t, e, i, s) { + if (i["force-disable-user-env"]) { + e.trace("resolveShellEnv(): skipped (--force-disable-user-env)"); + return {}; + } else if (j) { + e.trace("resolveShellEnv(): skipped (Windows)"); + return {}; + } else if (bn(s) && !i["force-user-env"]) { + e.trace("resolveShellEnv(): skipped (VSCODE_CLI is set)"); + return {}; + } else { + if (bn(s)) { + e.trace("resolveShellEnv(): running (--force-user-env)"); + } else { + e.trace("resolveShellEnv(): running (macOS/Linux)"); + } + xh ||= Tt.withAsyncBody(async (r, n) => { + const o = new ns(); + let a = 10000; + const c = t.getValue("application.shellEnvironmentResolutionTimeout"); + if (typeof c == "number") { + a = mP(c, 1, 120) * 1000; + } + const l = setTimeout(() => { + o.dispose(true); + n(new Error(v(2114, null))); + }, a); + try { + r(await bP(e, o.token)); + } catch (u) { + if (!Nl(u) && !o.token.isCancellationRequested) { + n(new Error(v(2115, null, Ki(u)))); + } else { + r({}); + } + } finally { + clearTimeout(l); + o.dispose(); + } + }); + return xh; + } + } + async function bP(t, e) { + const i = process.env.ELECTRON_RUN_AS_NODE; + t.trace("getUnixShellEnvironment#runAsNode", i); + const s = process.env.ELECTRON_NO_ATTACH_CONSOLE; + t.trace("getUnixShellEnvironment#noAttach", s); + const r = ti().replace(/-/g, "").substr(0, 12); + const n = new RegExp(r + "({.*})" + r); + const o = { + ...process.env, + ELECTRON_RUN_AS_NODE: "1", + ELECTRON_NO_ATTACH_CONSOLE: "1", + VSCODE_RESOLVING_ENVIRONMENT: "1" + }; + t.trace("getUnixShellEnvironment#env", o); + const a = await A5(Wi, o); + t.trace("getUnixShellEnvironment#shell", a); + return new Promise((c, l) => { + if (e.isCancellationRequested) { + return l(new hi()); + } + const u = Ue(a); + let d; + let f; + const p = ""; + if (/^pwsh(-preview)?$/.test(u)) { + d = `& '${process.execPath}' ${p} -p '''${r}'' + JSON.stringify(process.env) + ''${r}'''`; + f = ["-Login", "-Command"]; + } else if (u === "nu") { + d = `^'${process.execPath}' ${p} -p '"${r}" + JSON.stringify(process.env) + "${r}"'`; + f = ["-i", "-l", "-c"]; + } else if (u === "xonsh") { + d = `import os, json; print("${r}", json.dumps(dict(os.environ)), "${r}")`; + f = ["-i", "-l", "-c"]; + } else { + d = `'${process.execPath}' ${p} -p '"${r}" + JSON.stringify(process.env) + "${r}"'`; + if (u === "tcsh" || u === "csh") { + f = ["-ic"]; + } else { + f = ["-i", "-l", "-c"]; + } + } + t.trace("getUnixShellEnvironment#spawn", JSON.stringify(f), d); + const w = vP(a, [...f, d], { + detached: true, + stdio: ["ignore", "pipe", "pipe"], + env: o + }); + e.onCancellationRequested(() => { + w.kill(); + return l(new hi()); + }); + w.on("error", b => { + t.error("getUnixShellEnvironment#errorChildProcess", Ki(b)); + l(b); + }); + const m = []; + w.stdout.on("data", b => m.push(b)); + const y = []; + w.stderr.on("data", b => y.push(b)); + w.on("close", (b, k) => { + const A = Buffer.concat(m).toString("utf8"); + t.trace("getUnixShellEnvironment#raw", A); + const C = Buffer.concat(y).toString("utf8"); + if (C.trim()) { + t.trace("getUnixShellEnvironment#stderr", C); + } + if (b || k) { + return l(new Error(v(2116, null, b, k))); + } + const _ = n.exec(A); + const Z = _ ? _[1] : "{}"; + try { + const ie = JSON.parse(Z); + if (i) { + ie.ELECTRON_RUN_AS_NODE = i; + } else { + delete ie.ELECTRON_RUN_AS_NODE; + } + if (s) { + ie.ELECTRON_NO_ATTACH_CONSOLE = s; + } else { + delete ie.ELECTRON_NO_ATTACH_CONSOLE; + } + delete ie.VSCODE_RESOLVING_ENVIRONMENT; + delete ie.XDG_RUNTIME_DIR; + t.trace("getUnixShellEnvironment#result", ie); + c(ie); + } catch (ie) { + t.error("getUnixShellEnvironment#errorCaught", Ki(ie)); + l(ie); + } + }); + }); + } + var xh; + var cg = g({ + "out-build/vs/platform/shell/node/shellEnv.js"() { + "use strict"; + + we(); + be(); + At(); + en(); + $e(); + H(); + _i(); + C5(); + kc(); + ce(); + wP(); + xh = undefined; + } + }); + var lg; + var _5; + var yP = g({ + "out-build/vs/platform/extensions/common/extensionHostStarter.js"() { + "use strict"; + + Y(); + lg = q("extensionHostStarter"); + _5 = "extensionHostStarter"; + } + }); + var ug; + var Dh; + var SP = g({ + "out-build/vs/platform/extensions/electron-main/extensionHostStarter.js"() { + "use strict"; + + ce(); + $e(); + B(); + M(); + ct(); + X(); + xt(); + _o(); + Lt(); + Dh = class extends T { + static { + ug = this; + } + static { + this.a = 0; + } + constructor(e, i, s, r) { + super(); + this.f = e; + this.g = i; + this.h = s; + this.j = r; + this.b = new Map(); + this.c = false; + this.D(this.g.onWillShutdown(n => { + this.c = true; + n.join("extHostStarter", this._waitForAllExit(6000)); + })); + } + dispose() { + super.dispose(); + } + m(e) { + const i = this.b.get(e); + if (!i) { + throw new Error("Unknown extension host!"); + } + return i; + } + onDynamicStdout(e) { + return this.m(e).onStdout; + } + onDynamicStderr(e) { + return this.m(e).onStderr; + } + onDynamicMessage(e) { + return this.m(e).onMessage; + } + onDynamicExit(e) { + return this.m(e).onExit; + } + async createExtensionHost() { + if (this.c) { + throw Jn(); + } + const e = String(++ug.a); + const i = new Ec(this.f, this.h, this.j, this.g); + this.b.set(e, i); + const s = i.onExit(({ + pid: r, + code: n, + signal: o + }) => { + s.dispose(); + this.f.info(`Extension host with pid ${r} exited with code: ${n}, signal: ${o}.`); + setTimeout(() => { + i.dispose(); + this.b.delete(e); + }); + setTimeout(() => { + try { + process.kill(r, 0); + this.f.error(`Extension host with pid ${r} still exists, forcefully killing it...`); + process.kill(r); + } catch {} + }, 1000); + }); + return { + id: e + }; + } + async start(e, i) { + if (this.c) { + throw Jn(); + } + const s = this.m(e); + s.start({ + ...i, + processTitle: `extension-host [${i.responseWindowId}-${e}]`, + type: "extensionHost", + entryPoint: "vs/workbench/api/node/extensionHostProcess", + args: ["--skipWorkspaceStorageLock"], + execArgv: i.execArgv, + allowLoadingUnsignedLibraries: true, + respondToAuthRequestsFromMainProcess: true, + correlationId: e + }); + return { + pid: await x.toPromise(s.onSpawn) + }; + } + async enableInspectPort(e) { + if (this.c) { + throw Jn(); + } + const i = this.b.get(e); + if (i) { + return i.enableInspectPort(); + } else { + return false; + } + } + async kill(e) { + if (this.c) { + throw Jn(); + } + const i = this.b.get(e); + if (i) { + i.kill(); + } + } + async _killAllNow() { + for (const [, e] of this.b) { + e.kill(); + } + } + async _waitForAllExit(e) { + const i = []; + for (const [, s] of this.b) { + i.push(s.waitForExit(e)); + } + return Tt.settled(i).then(() => {}); + } + }; + Dh = ug = __decorate([__param(0, V), __param(1, Te), __param(2, dt), __param(3, Ot)], Dh); + } + }); + var Pc; + var EP = g({ + "out-build/vs/platform/externalTerminal/electron-main/externalTerminal.js"() { + "use strict"; + + Y(); + Pc = q("externalTerminal"); + } + }); + var kP; + var $c; + var xP = g({ + "out-build/vs/platform/externalTerminal/common/externalTerminal.js"() { + "use strict"; + + Y(); + kP = q("externalTerminal"); + $c = "Terminal.app"; + } + }); + import * as Oo from "child_process"; + function Lo(t) { + const e = { + ...t.env + }; + VD(e); + return e; + } + function hg(t) { + if ("errno" in t && t.errno === "ENOENT" && "path" in t && typeof t.path == "string") { + return new Error(v(1905, null, t.path)); + } else { + return t; + } + } + function DP(t) { + let e = ""; + for (const i of t) { + if (i.indexOf(" ") >= 0) { + e += "\"" + i + "\""; + } else { + e += i; + } + e += " "; + } + return e; + } + var dg; + var Ph; + var $h; + var R5; + var fg; + var PP = g({ + "out-build/vs/platform/externalTerminal/node/externalTerminalService.js"() { + "use strict"; + + sn(); + Ie(); + we(); + H(); + wh(); + _t(); + og(); + be(); + xP(); + dg = v(1900, null); + Ph = class { + async getDefaultTerminalForPlatforms() { + return { + windows: $h.getDefaultTerminalWindows(), + linux: await fg.getDefaultTerminalLinuxReady(), + osx: "xterm" + }; + } + }; + $h = class ur extends Ph { + static { + this.CMD = "cmd.exe"; + } + openTerminal(e, i) { + return this.spawnTerminal(Oo, e, I5(), i); + } + spawnTerminal(e, i, s, r) { + const n = i.windowsExec || ur.getDefaultTerminalWindows(); + if (r && r[1] === ":") { + r = r[0].toUpperCase() + r.substr(1); + } + const o = Ue(n, ".exe").toLowerCase(); + if (o === "cmder") { + e.spawn(n, r ? [r] : undefined); + return Promise.resolve(undefined); + } + const a = ["/c", "start", "/wait"]; + if (n.indexOf(" ") >= 0) { + a.push(n); + } + a.push(n); + if (o === "wt") { + a.push("-d ."); + } + return new Promise((c, l) => { + const u = Lo(process); + const d = e.spawn(s, a, { + cwd: r, + env: u, + detached: true + }); + d.on("error", l); + d.on("exit", () => c()); + }); + } + async runInTerminal(e, i, s, r, n) { + const o = "windowsExec" in n && n.windowsExec ? n.windowsExec : ur.getDefaultTerminalWindows(); + const a = await ur.getWtExePath(); + return new Promise((c, l) => { + const u = `"${i} - ${dg}"`; + const d = `"${s.join("\" \"")}" & pause`; + const f = Object.assign({}, Lo(process), r); + Object.keys(f).filter(b => f[b] === null).forEach(b => delete f[b]); + const p = { + cwd: i, + env: f, + windowsVerbatimArguments: true + }; + let w; + let m; + if (Ue(o, ".exe") === "wt") { + w = o; + m = ["-d", ".", ur.CMD, "/c", d]; + } else if (a) { + w = a; + m = ["-d", ".", o, "/c", d]; + } else { + w = ur.CMD; + m = ["/c", "start", u, "/wait", o, "/c", `"${d}"`]; + } + Oo.spawn(w, m, p).on("error", b => { + l(hg(b)); + }); + c(undefined); + }); + } + static getDefaultTerminalWindows() { + if (!ur._DEFAULT_TERMINAL_WINDOWS) { + const e = !!process.env.hasOwnProperty("PROCESSOR_ARCHITEW6432"); + ur._DEFAULT_TERMINAL_WINDOWS = `${process.env.windir ? process.env.windir : "C:\\Windows"}\\${e ? "Sysnative" : "System32"}\\cmd.exe`; + } + return ur._DEFAULT_TERMINAL_WINDOWS; + } + static async getWtExePath() { + try { + const e = await ng.findExecutable("wt"); + if (await ee.exists(e)) { + return e; + } else { + return undefined; + } + } catch { + return; + } + } + }; + __decorate([de], $h, "getWtExePath", null); + R5 = class oS extends Ph { + static { + this.OSASCRIPT = "/usr/bin/osascript"; + } + openTerminal(e, i) { + return this.spawnTerminal(Oo, e, i); + } + runInTerminal(e, i, s, r, n) { + const o = n.osxExec || $c; + return new Promise((a, c) => { + if (o === $c || o === "iTerm.app") { + const l = o === $c ? "TerminalHelper" : "iTermHelper"; + const d = [Ct.asFileUri(`vs/workbench/contrib/externalTerminal/node/${l}.scpt`).fsPath, "-t", e || dg, "-w", i]; + for (const w of s) { + d.push("-a"); + d.push(w); + } + if (r) { + const w = Object.assign({}, Lo(process), r); + for (const m in w) { + const y = w[m]; + if (y === null) { + d.push("-u"); + d.push(m); + } else { + d.push("-e"); + d.push(`${m}=${y}`); + } + } + } + let f = ""; + const p = Oo.spawn(oS.OSASCRIPT, d); + p.on("error", w => { + c(hg(w)); + }); + p.stderr.on("data", w => { + f += w.toString(); + }); + p.on("exit", w => { + if (w === 0) { + a(undefined); + } else if (f) { + const m = f.split(` + `, 1); + c(new Error(m[0])); + } else { + c(new Error(v(1901, null, l, w))); + } + }); + } else { + c(new Error(v(1902, null, o))); + } + }); + } + spawnTerminal(e, i, s) { + const r = i.osxExec || $c; + return new Promise((n, o) => { + const a = ["-a", r]; + if (s) { + a.push(s); + } + const c = Lo(process); + const l = e.spawn("/usr/bin/open", a, { + cwd: s, + env: c + }); + l.on("error", o); + l.on("exit", () => n()); + }); + } + }; + fg = class Ur extends Ph { + static { + this.WAIT_MESSAGE = v(1903, null); + } + openTerminal(e, i) { + return this.spawnTerminal(Oo, e, i); + } + runInTerminal(e, i, s, r, n) { + const o = n.linuxExec ? Promise.resolve(n.linuxExec) : Ur.getDefaultTerminalLinuxReady(); + return new Promise((a, c) => { + const l = []; + o.then(u => { + if (u.indexOf("gnome-terminal") >= 0) { + l.push("-x"); + } else { + l.push("-e"); + } + l.push("bash"); + l.push("-c"); + const d = `${DP(s)}; echo; read -p "${Ur.WAIT_MESSAGE}" -n1;`; + l.push(`''${d}''`); + const f = Object.assign({}, Lo(process), r); + Object.keys(f).filter(y => f[y] === null).forEach(y => delete f[y]); + const p = { + cwd: i, + env: f + }; + let w = ""; + const m = Oo.spawn(u, l, p); + m.on("error", y => { + c(hg(y)); + }); + m.stderr.on("data", y => { + w += y.toString(); + }); + m.on("exit", y => { + if (y === 0) { + a(undefined); + } else if (w) { + const b = w.split(` + `, 1); + c(new Error(b[0])); + } else { + c(new Error(v(1904, null, u, y))); + } + }); + }); + }); + } + static async getDefaultTerminalLinuxReady() { + if (!Ur._DEFAULT_TERMINAL_LINUX_READY) { + if (!Se) { + Ur._DEFAULT_TERMINAL_LINUX_READY = Promise.resolve("xterm"); + } else { + const e = await ee.exists("/etc/debian_version"); + Ur._DEFAULT_TERMINAL_LINUX_READY = new Promise(i => { + if (e) { + i("x-terminal-emulator"); + } else if (process.env.DESKTOP_SESSION === "gnome" || process.env.DESKTOP_SESSION === "gnome-classic") { + i("gnome-terminal"); + } else if (process.env.DESKTOP_SESSION === "kde-plasma") { + i("konsole"); + } else if (process.env.COLORTERM) { + i(process.env.COLORTERM); + } else if (process.env.TERM) { + i(process.env.TERM); + } else { + i("xterm"); + } + }); + } + } + return Ur._DEFAULT_TERMINAL_LINUX_READY; + } + spawnTerminal(e, i, s) { + const r = i.linuxExec ? Promise.resolve(i.linuxExec) : Ur.getDefaultTerminalLinuxReady(); + return new Promise((n, o) => { + r.then(a => { + const c = Lo(process); + const l = e.spawn(a, [], { + cwd: s, + env: c + }); + l.on("error", o); + l.on("exit", () => n()); + }); + }); + } + }; + } + }); + function O5(t, e) { + switch (t) { + case 0: + return ""; + case 1: + return `${Ac}*?`; + default: + return `(?:${Ic}|${Ac}+${Ic}${e ? `|${Ic}${Ac}+` : ""})*?`; + } + } + function L5(t, e) { + if (!t) { + return []; + } + const i = []; + let s = false; + let r = false; + let n = ""; + for (const o of t) { + switch (o) { + case e: + if (!s && !r) { + i.push(n); + n = ""; + continue; + } + break; + case "{": + s = true; + break; + case "}": + s = false; + break; + case "[": + r = true; + break; + case "]": + r = false; + break; + } + n += o; + } + if (n) { + i.push(n); + } + return i; + } + function M5(t) { + if (!t) { + return ""; + } + let e = ""; + const i = L5(t, mg); + if (i.every(s => s === Mo)) { + e = ".*"; + } else { + let s = false; + i.forEach((r, n) => { + if (r === Mo) { + if (s) { + return; + } + e += O5(2, n === i.length - 1); + } else { + let o = false; + let a = ""; + let c = false; + let l = ""; + for (const u of r) { + if (u !== "}" && o) { + a += u; + continue; + } + if (c && (u !== "]" || !l)) { + let d; + if (u === "-") { + d = u; + } else if ((u === "^" || u === "!") && !l) { + d = "^"; + } else if (u === mg) { + d = ""; + } else { + d = ja(u); + } + l += d; + continue; + } + switch (u) { + case "{": + o = true; + continue; + case "[": + c = true; + continue; + case "}": + { + const f = `(?:${L5(a, ",").map(p => M5(p)).join("|")})`; + e += f; + o = false; + a = ""; + break; + } + case "]": + { + e += "[" + l + "]"; + c = false; + l = ""; + break; + } + case "?": + e += Ac; + continue; + case "*": + e += O5(1); + continue; + default: + e += ja(u); + } + } + if (n < i.length - 1 && (i[n + 1] !== Mo || n + 2 < i.length)) { + e += Ic; + } + } + s = r === Mo; + }); + } + return e; + } + function pg(t, e) { + if (!t) { + return hs; + } + let i; + if (typeof t != "string") { + i = t.pattern; + } else { + i = t; + } + i = i.trim(); + const s = `${i}_${!!e.trimForExclusions}`; + let r = wg.get(s); + if (r) { + return F5(r, t); + } + let n; + if (U5.test(i)) { + r = $P(i.substr(4), i); + } else if (n = B5.exec(gg(i, e))) { + r = IP(n[1], i); + } else if ((e.trimForExclusions ? z5 : q5).test(i)) { + r = AP(i, e); + } else if (n = H5.exec(gg(i, e))) { + r = N5(n[1].substr(1), i, true); + } else if (n = V5.exec(gg(i, e))) { + r = N5(n[1], i, false); + } else { + r = CP(i); + } + wg.set(s, r); + return F5(r, t); + } + function F5(t, e) { + if (typeof e == "string") { + return t; + } + const i = function (s, r) { + if (Ba(s, e.base, !Se)) { + return t(gv(s.substr(e.base.length), Vt), r); + } else { + return null; + } + }; + i.allBasenames = t.allBasenames; + i.allPaths = t.allPaths; + i.basenames = t.basenames; + i.patterns = t.patterns; + return i; + } + function gg(t, e) { + if (e.trimForExclusions && t.endsWith("/**")) { + return t.substr(0, t.length - 2); + } else { + return t; + } + } + function $P(t, e) { + return function (i, s) { + if (typeof i == "string" && i.endsWith(t)) { + return e; + } else { + return null; + } + }; + } + function IP(t, e) { + const i = `/${t}`; + const s = `\\${t}`; + const r = function (o, a) { + if (typeof o != "string") { + return null; + } else if (a) { + if (a === t) { + return e; + } else { + return null; + } + } else if (o === t || o.endsWith(i) || o.endsWith(s)) { + return e; + } else { + return null; + } + }; + const n = [t]; + r.basenames = n; + r.patterns = [e]; + r.allBasenames = n; + return r; + } + function AP(t, e) { + const i = W5(t.slice(1, -1).split(",").map(a => pg(a, e)).filter(a => a !== hs), t); + const s = i.length; + if (!s) { + return hs; + } + if (s === 1) { + return i[0]; + } + const r = function (a, c) { + for (let l = 0, u = i.length; l < u; l++) { + if (i[l](a, c)) { + return t; + } + } + return null; + }; + const n = i.find(a => !!a.allBasenames); + if (n) { + r.allBasenames = n.allBasenames; + } + const o = i.reduce((a, c) => c.allPaths ? a.concat(c.allPaths) : a, []); + if (o.length) { + r.allPaths = o; + } + return r; + } + function N5(t, e, i) { + const s = Vt === ae.sep; + const r = s ? t : t.replace(j5, Vt); + const n = Vt + r; + const o = ae.sep + t; + let a; + if (i) { + a = function (c, l) { + if (typeof c == "string" && (c === r || c.endsWith(n) || !s && (c === t || c.endsWith(o)))) { + return e; + } else { + return null; + } + }; + } else { + a = function (c, l) { + if (typeof c == "string" && (c === r || !s && c === t)) { + return e; + } else { + return null; + } + }; + } + a.allPaths = [(i ? "*/" : "./") + t]; + return a; + } + function CP(t) { + try { + const e = new RegExp(`^${M5(t)}$`); + return function (i) { + e.lastIndex = 0; + if (typeof i == "string" && e.test(i)) { + return t; + } else { + return null; + } + }; + } catch { + return hs; + } + } + function _P(t, e = {}) { + if (!t) { + return vg; + } + if (typeof t == "string" || RP(t)) { + const i = pg(t, e); + if (i === hs) { + return vg; + } + const s = function (r, n) { + return !!i(r, n); + }; + if (i.allBasenames) { + s.allBasenames = i.allBasenames; + } + if (i.allPaths) { + s.allPaths = i.allPaths; + } + return s; + } + return OP(t, e); + } + function RP(t) { + const e = t; + if (e) { + return typeof e.base == "string" && typeof e.pattern == "string"; + } else { + return false; + } + } + function OP(t, e) { + const i = W5(Object.getOwnPropertyNames(t).map(a => LP(a, t[a], e)).filter(a => a !== hs)); + const s = i.length; + if (!s) { + return hs; + } + if (!i.some(a => !!a.requiresSiblings)) { + if (s === 1) { + return i[0]; + } + const a = function (u, d) { + let f; + for (let p = 0, w = i.length; p < w; p++) { + const m = i[p](u, d); + if (typeof m == "string") { + return m; + } + if (Ip(m)) { + f ||= []; + f.push(m); + } + } + if (f) { + return (async () => { + for (const p of f) { + const w = await p; + if (typeof w == "string") { + return w; + } + } + return null; + })(); + } else { + return null; + } + }; + const c = i.find(u => !!u.allBasenames); + if (c) { + a.allBasenames = c.allBasenames; + } + const l = i.reduce((u, d) => d.allPaths ? u.concat(d.allPaths) : u, []); + if (l.length) { + a.allPaths = l; + } + return a; + } + const r = function (a, c, l) { + let u; + let d; + for (let f = 0, p = i.length; f < p; f++) { + const w = i[f]; + if (w.requiresSiblings && l) { + c ||= Ue(a); + u ||= c.substr(0, c.length - Kl(a).length); + } + const m = w(a, c, u, l); + if (typeof m == "string") { + return m; + } + if (Ip(m)) { + d ||= []; + d.push(m); + } + } + if (d) { + return (async () => { + for (const f of d) { + const p = await f; + if (typeof p == "string") { + return p; + } + } + return null; + })(); + } else { + return null; + } + }; + const n = i.find(a => !!a.allBasenames); + if (n) { + r.allBasenames = n.allBasenames; + } + const o = i.reduce((a, c) => c.allPaths ? a.concat(c.allPaths) : a, []); + if (o.length) { + r.allPaths = o; + } + return r; + } + function LP(t, e, i) { + if (e === false) { + return hs; + } + const s = pg(t, i); + if (s === hs) { + return hs; + } + if (typeof e == "boolean") { + return s; + } + if (e) { + const r = e.when; + if (typeof r == "string") { + const n = (o, a, c, l) => { + if (!l || !s(o, a)) { + return null; + } + const u = r.replace("$(basename)", () => c); + const d = l(u); + if (Ip(d)) { + return d.then(f => f ? t : null); + } else if (d) { + return t; + } else { + return null; + } + }; + n.requiresSiblings = true; + return n; + } + } + return s; + } + function W5(t, e) { + const i = t.filter(a => !!a.basenames); + if (i.length < 2) { + return t; + } + const s = i.reduce((a, c) => { + const l = c.basenames; + if (l) { + return a.concat(l); + } else { + return a; + } + }, []); + let r; + if (e) { + r = []; + for (let a = 0, c = s.length; a < c; a++) { + r.push(e); + } + } else { + r = i.reduce((a, c) => { + const l = c.patterns; + if (l) { + return a.concat(l); + } else { + return a; + } + }, []); + } + const n = function (a, c) { + if (typeof a != "string") { + return null; + } + if (!c) { + let u; + for (u = a.length; u > 0; u--) { + const d = a.charCodeAt(u - 1); + if (d === 47 || d === 92) { + break; + } + } + c = a.substr(u); + } + const l = s.indexOf(c); + if (l !== -1) { + return r[l]; + } else { + return null; + } + }; + n.basenames = s; + n.patterns = r; + n.allBasenames = s; + const o = t.filter(a => !a.basenames); + o.push(n); + return o; + } + function T5(t, e) { + return xa(t, e, (i, s) => typeof i == "string" && typeof s == "string" ? i === s : typeof i != "string" && typeof s != "string" ? i.base === s.base && i.pattern === s.pattern : false); + } + var Mo; + var mg; + var Ic; + var Ac; + var j5; + var U5; + var B5; + var q5; + var z5; + var H5; + var V5; + var wg; + var vg; + var hs; + var G5 = g({ + "out-build/vs/base/common/glob.js"() { + "use strict"; + + zt(); + ce(); + gi(); + $i(); + we(); + H(); + Wt(); + Mo = "**"; + mg = "/"; + Ic = "[/\\\\]"; + Ac = "[^/\\\\]"; + j5 = /\//g; + U5 = /^\*\*\/\*\.[\w\.-]+$/; + B5 = /^\*\*\/([\w\.-]+)\/?$/; + q5 = /^{\*\*\/\*?[\w\.-]+\/?(,\*\*\/\*?[\w\.-]+\/?)*}$/; + z5 = /^{\*\*\/\*?[\w\.-]+(\/(\*\*)?)?(,\*\*\/\*?[\w\.-]+(\/(\*\*)?)?)*}$/; + H5 = /^\*\*((\/[\w\.-]+)+)\/?$/; + V5 = /^([\w\.-]+(\/[\w\.-]+)*)\/?$/; + wg = new Da(10000); + vg = function () { + return false; + }; + hs = function () { + return null; + }; + } + }); + function J5(t) { + return typeof t.correlationId == "number"; + } + function MP(t) { + return t.recursive === true; + } + function K5(t) { + return t.map(e => ({ + type: e.type, + resource: P.revive(e.resource), + cId: e.cId + })); + } + function FP(t) { + const e = new Q5(); + for (const i of t) { + e.processEvent(i); + } + return e.coalesce(); + } + function NP(t, e) { + if (typeof e == "string" && !e.startsWith(Mo) && !Zr(e)) { + return { + base: t, + pattern: e + }; + } else { + return e; + } + } + function Z5(t, e) { + const i = []; + for (const s of e) { + i.push(_P(NP(t, s))); + } + return i; + } + function WP(t, e) { + if (typeof e == "number") { + switch (t.type) { + case 1: + return (e & 4) === 0; + case 2: + return (e & 8) === 0; + case 0: + return (e & 2) === 0; + } + } + return false; + } + function TP(t) { + if (typeof t == "number") { + const e = []; + if (t & 4) { + e.push("Added"); + } + if (t & 8) { + e.push("Deleted"); + } + if (t & 2) { + e.push("Updated"); + } + if (e.length === 0) { + return ""; + } else { + return `[${e.join(", ")}]`; + } + } + return ""; + } + var bg; + var Y5; + var X5; + var Q5; + var Fo = g({ + "out-build/vs/platform/files/common/watcher.js"() { + "use strict"; + + G5(); + M(); + we(); + H(); + se(); + He(); + bg = class aS extends T { + static { + this.a = 5; + } + constructor(e, i, s, r) { + super(); + this.h = e; + this.j = i; + this.m = s; + this.n = r; + this.c = this.D(new pr()); + this.f = undefined; + this.g = 0; + } + r() { + const e = new De(); + this.c.value = e; + this.b = this.q(e); + this.b.setVerboseLogging(this.m); + e.add(this.b.onDidChangeFile(i => this.h(i))); + e.add(this.b.onDidLogMessage(i => this.j(i))); + e.add(this.b.onDidError(i => this.s(i.error, i.request))); + } + s(e, i) { + if (this.t(e, i)) { + if (this.g < aS.a && this.f) { + this.w(`restarting watcher after unexpected error: ${e}`); + this.u(this.f); + } else { + this.w(`gave up attempting to restart watcher after unexpected error: ${e}`); + } + } else { + this.w(e); + } + } + t(e, i) { + return !!this.n.restartOnError && !i && e.indexOf("No space left on device") === -1 && e.indexOf("EMFILE") === -1; + } + u(e) { + this.g++; + this.r(); + this.watch(e); + } + async watch(e) { + this.f = e; + await this.b?.watch(e); + } + async setVerboseLogging(e) { + this.m = e; + await this.b?.setVerboseLogging(e); + } + w(e) { + this.j({ + type: "error", + message: `[File Watcher (${this.n.type})] ${e}` + }); + } + y(e) { + this.j({ + type: "trace", + message: `[File Watcher (${this.n.type})] ${e}` + }); + } + dispose() { + this.b = undefined; + return super.dispose(); + } + }; + Y5 = class extends bg { + constructor(t, e, i) { + super(t, e, i, { + type: "node.js", + restartOnError: false + }); + } + }; + X5 = class extends bg { + constructor(t, e, i) { + super(t, e, i, { + type: "universal", + restartOnError: true + }); + } + }; + Q5 = class { + constructor() { + this.a = new Set(); + this.b = new Map(); + } + c(t) { + if (Se) { + return t.resource.fsPath; + } else { + return t.resource.fsPath.toLowerCase(); + } + } + processEvent(t) { + const e = this.b.get(this.c(t)); + let i = false; + if (e) { + const s = e.type; + const r = t.type; + if (e.resource.fsPath !== t.resource.fsPath && (t.type === 2 || t.type === 1)) { + i = true; + } else if (s === 1 && r === 2) { + this.b.delete(this.c(t)); + this.a.delete(e); + } else if (s === 2 && r === 1) { + e.type = 0; + } else if (s !== 1 || r !== 0) { + e.type = r; + } + } else { + i = true; + } + if (i) { + this.a.add(t); + this.b.set(this.c(t), t); + } + } + coalesce() { + const t = []; + const e = []; + return Array.from(this.a).filter(i => i.type !== 2 ? (t.push(i), false) : true).sort((i, s) => i.resource.fsPath.length - s.resource.fsPath.length).filter(i => e.some(s => Ox(i.resource.fsPath, s, !Se)) ? false : (e.push(i.resource.fsPath), true)).concat(t); + } + }; + } + }); + var yg; + var jP = g({ + "out-build/vs/platform/files/common/diskFileSystemProviderClient.js"() { + "use strict"; + + Ze(); + en(); + $e(); + B(); + M(); + Ka(); + _i(); + He(); + Fo(); + yg = "localFilesystem"; + } + }); + async function e2(t, e, i, s, r, n) { + let o; + try { + await UP(t, e, i, s, r, n); + } catch (a) { + o = a; + } finally { + if (o && r.errorTransformer) { + o = r.errorTransformer(o); + } + if (typeof o !== "undefined") { + i.error(o); + } + i.end(); + } + } + async function UP(t, e, i, s, r, n) { + Sg(n); + const o = await t.open(e, { + create: false + }); + try { + Sg(n); + let a = 0; + let c = 0; + let l = r && typeof r.length == "number" ? r.length : undefined; + let u = z.alloc(Math.min(r.bufferSize, typeof l == "number" ? l : r.bufferSize)); + let d = r && typeof r.position == "number" ? r.position : 0; + let f = 0; + do { + c = await t.read(o, d, u.buffer, f, u.byteLength - f); + d += c; + f += c; + a += c; + if (typeof l == "number") { + l -= c; + } + if (f === u.byteLength) { + await i.write(s(u)); + u = z.alloc(Math.min(r.bufferSize, typeof l == "number" ? l : r.bufferSize)); + f = 0; + } + } while (c > 0 && (typeof l != "number" || l > 0) && Sg(n) && BP(a, r)); + if (f > 0) { + let p = f; + if (typeof l == "number") { + p = Math.min(f, l); + } + i.write(s(u.slice(0, p))); + } + } catch (a) { + throw on(a); + } finally { + await t.close(o); + } + } + function Sg(t) { + if (t.isCancellationRequested) { + throw Jn(); + } + return true; + } + function BP(t, e) { + if (typeof e?.limits?.size == "number" && t > e.limits.size) { + throw cs(v(1947, null), oe.FileTooLarge); + } + return true; + } + var t2 = g({ + "out-build/vs/platform/files/common/io.js"() { + "use strict"; + + Ze(); + $e(); + be(); + He(); + } + }); + var i2; + var qP = g({ + "out-build/vs/platform/files/common/diskFileSystemProvider.js"() { + "use strict"; + + zt(); + ce(); + $e(); + B(); + gi(); + M(); + we(); + Fo(); + X(); + i2 = class extends T { + constructor(t, e) { + super(); + this.a = t; + this.b = e; + this.c = this.D(new $()); + this.onDidChangeFile = this.c.event; + this.g = this.D(new $()); + this.onDidWatchError = this.g.event; + this.j = []; + this.m = this.D(new Ys(0)); + this.w = []; + this.y = this.D(new Ys(0)); + } + watch(t, e) { + if (e.recursive || this.b?.watcher?.forceUniversal) { + return this.n(t, e); + } else { + return this.z(t, e); + } + } + n(t, e) { + const i = this.q(t, e); + const s = dw(this.j, i); + this.r(); + return xe(() => { + s(); + this.r(); + }); + } + q(t, e) { + const i = { + path: this.L(t), + excludes: e.excludes, + includes: e.includes, + recursive: e.recursive, + filter: e.filter, + correlationId: e.correlationId + }; + if (MP(i)) { + const s = this.b?.watcher?.recursive?.usePolling; + if (s === true) { + i.pollingInterval = this.b?.watcher?.recursive?.pollingInterval ?? 5000; + } else if (Array.isArray(s) && s.includes(i.path)) { + i.pollingInterval = this.b?.watcher?.recursive?.pollingInterval ?? 5000; + } + } + return i; + } + r() { + this.m.trigger(() => this.s()).catch(t => Ft(t)); + } + s() { + if (!this.h) { + this.h = this.D(this.t(t => this.c.fire(K5(t)), t => this.H(t), this.a.getLevel() === J.Trace)); + this.D(this.a.onDidChangeLogLevel(() => { + this.h?.setVerboseLogging(this.a.getLevel() === J.Trace); + })); + } + return this.h.watch(this.j); + } + z(t, e) { + const i = { + path: this.L(t), + excludes: e.excludes, + includes: e.includes, + recursive: false, + filter: e.filter, + correlationId: e.correlationId + }; + const s = dw(this.w, i); + this.C(); + return xe(() => { + s(); + this.C(); + }); + } + C() { + this.y.trigger(() => this.F()).catch(t => Ft(t)); + } + F() { + if (!this.u) { + this.u = this.D(this.G(t => this.c.fire(K5(t)), t => this.H(t), this.a.getLevel() === J.Trace)); + this.D(this.a.onDidChangeLogLevel(() => { + this.u?.setVerboseLogging(this.a.getLevel() === J.Trace); + })); + } + return this.u.watch(this.w); + } + H(t) { + if (t.type === "error") { + this.g.fire(t.message); + } + this.I(t); + } + I(t) { + this.a[t.type](t.message); + } + J(t) { + return pi(t.fsPath); + } + L(t) { + const e = this.J(t); + return kv(e); + } + }; + } + }); + function zP(t) { + const e = t; + return e && typeof e.type == "string" && typeof e.severity == "string"; + } + function HP(t) { + const e = []; + let i; + try { + const s = JSON.parse(t.arguments); + const r = s[s.length - 1]; + if (r && r.__$stack) { + s.pop(); + i = r.__$stack; + } + e.push(...s); + } catch { + e.push("Unable to log remote console arguments", t.arguments); + } + return { + args: e, + stack: i + }; + } + function VP(t) { + if (!t) { + return t; + } + const e = t.indexOf(` + `); + if (e === -1) { + return t; + } else { + return t.substring(0, e); + } + } + function GP(t, e) { + const { + args: i, + stack: s + } = HP(t); + const r = typeof i[0] == "string" && i.length === 1; + let n = VP(s); + n &&= `(${n.trim()})`; + let o = []; + if (typeof i[0] == "string") { + if (n && r) { + o = [`%c[${e}] %c${i[0]} %c${n}`, No("blue"), No(""), No("grey")]; + } else { + o = [`%c[${e}] %c${i[0]}`, No("blue"), No(""), ...i.slice(1)]; + } + } else { + o = [`%c[${e}]%`, No("blue"), ...i]; + } + if (n && !r) { + o.push(n); + } + if (typeof console[t.severity] != "function") { + throw new Error("Unknown console method"); + } + console[t.severity].apply(console, o); + } + function No(t) { + return `color: ${t}`; + } + var JP = g({ + "out-build/vs/base/common/console.js"() { + "use strict"; + + se(); + } + }); + import { fork as KP } from "child_process"; + var s2; + var ZP = g({ + "out-build/vs/base/parts/ipc/node/ipc.cp.js"() { + "use strict"; + + ce(); + Ze(); + At(); + JP(); + $e(); + B(); + M(); + us(); + og(); + wh(); + xs(); + s2 = class { + constructor(t, e) { + this.i = t; + this.j = e; + this.c = new Set(); + this.g = new Map(); + this.h = new $(); + this.onDidProcessExit = this.h.event; + const i = e && e.timeout ? e.timeout : 60000; + this.b = new su(i); + this.d = null; + this.f = null; + } + getChannel(t) { + const e = this; + return { + call(i, s, r) { + return e.k(t, i, s, r); + }, + listen(i, s) { + return e.l(t, i, s); + } + }; + } + k(t, e, i, s = We.None) { + if (!this.b) { + return Promise.reject(new Error("disposed")); + } + if (s.isCancellationRequested) { + return Promise.reject(Jn()); + } + this.b.cancel(); + const r = this.n(t); + const n = Qn(c => r.call(e, i, c)); + const o = s.onCancellationRequested(() => n.cancel()); + const a = xe(() => n.cancel()); + this.c.add(a); + n.finally(() => { + o.dispose(); + this.c.delete(a); + if (this.c.size === 0 && this.b) { + this.b.trigger(() => this.o()); + } + }); + return n; + } + l(t, e, i) { + if (!this.b) { + return x.None; + } + this.b.cancel(); + let s; + const r = new $({ + onWillAddFirstListener: () => { + s = this.n(t).listen(e, i)(r.fire, r); + this.c.add(s); + }, + onDidRemoveLastListener: () => { + this.c.delete(s); + s.dispose(); + if (this.c.size === 0 && this.b) { + this.b.trigger(() => this.o()); + } + } + }); + return r.event; + } + get m() { + if (!this.f) { + const t = this.j && this.j.args ? this.j.args : []; + const e = Object.create(null); + e.env = { + ...ls(process.env), + VSCODE_PARENT_PID: String(process.pid) + }; + if (this.j && this.j.env) { + e.env = { + ...e.env, + ...this.j.env + }; + } + if (this.j && this.j.freshExecArgv) { + e.execArgv = []; + } + if (this.j && typeof this.j.debug == "number") { + e.execArgv = ["--nolazy", "--inspect=" + this.j.debug]; + } + if (this.j && typeof this.j.debugBrk == "number") { + e.execArgv = ["--nolazy", "--inspect-brk=" + this.j.debugBrk]; + } + if (e.execArgv === undefined) { + e.execArgv = process.execArgv.filter(u => !/^--inspect(-brk)?=/.test(u)).filter(u => !u.startsWith("--vscode-")); + } + p5(e.env); + this.d = KP(this.i, t, e); + const i = new $(); + const r = x.fromNodeEventEmitter(this.d, "message", u => u)(u => { + if (zP(u)) { + GP(u, `IPC Library: ${this.j.serverName}`); + return; + } + i.fire(z.wrap(Buffer.from(u, "base64"))); + }); + const n = this.j.useQueue ? dP(this.d) : this.d; + const o = u => this.d && this.d.connected && n.send(u.buffer.toString("base64")); + const a = i.event; + const c = { + send: o, + onMessage: a + }; + this.f = new Xa(c); + const l = () => this.o(); + process.once("exit", l); + this.d.on("error", u => console.warn("IPC \"" + this.j.serverName + "\" errored with " + u)); + this.d.on("exit", (u, d) => { + process.removeListener("exit", l); + r.dispose(); + this.c.forEach(f => Et(f)); + this.c.clear(); + if (u !== 0 && d !== "SIGTERM") { + console.warn("IPC \"" + this.j.serverName + "\" crashed with exit code " + u + " and signal " + d); + } + this.b?.cancel(); + this.o(); + this.h.fire({ + code: u, + signal: d + }); + }); + } + return this.f; + } + n(t) { + let e = this.g.get(t); + if (!e) { + e = this.m.getChannel(t); + this.g.set(t, e); + } + return e; + } + o() { + if (this.f) { + if (this.d) { + this.d.kill(); + this.d = null; + } + this.f = null; + this.g.clear(); + } + } + dispose() { + this.h.dispose(); + this.b?.cancel(); + this.b = undefined; + this.o(); + this.c.clear(); + } + }; + } + }); + var r2; + var YP = g({ + "out-build/vs/platform/files/node/watcher/watcherClient.js"() { + "use strict"; + + Ie(); + xs(); + ZP(); + Fo(); + r2 = class extends X5 { + constructor(t, e, i) { + super(t, e, i); + this.r(); + } + q(t) { + const e = t.add(new s2(Ct.asFileUri("bootstrap-fork").fsPath, { + serverName: "File Watcher", + args: ["--type=fileWatcher"], + env: { + VSCODE_ESM_ENTRYPOINT: "vs/platform/files/node/watcher/watcherMain", + VSCODE_PIPE_LOGGING: "true", + VSCODE_VERBOSE_LOGGING: "true" + } + })); + t.add(e.onDidProcessExit(({ + code: i, + signal: s + }) => this.s(`terminated by itself with code ${i}, signal: ${s} (ETERM)`))); + return ze.toService(Hk(e.getChannel("watcher"))); + } + }; + } + }); + import { watchFile as XP, unwatchFile as QP } from "fs"; + var n2; + var e$ = g({ + "out-build/vs/platform/files/node/watcher/baseWatcher.js"() { + "use strict"; + + M(); + Fo(); + B(); + se(); + ce(); + er(); + $e(); + n2 = class extends T { + constructor() { + super(); + this.a = this.D(new $()); + this.onDidChangeFile = this.a.event; + this.b = this.D(new $()); + this.onDidLogMessage = this.b.event; + this.c = this.D(new $()); + this.f = this.c.event; + this.g = new Map(); + this.h = new Map(); + this.j = this.D(new Xf()); + this.m = new Set(); + this.n = this.D(new Ys(this.w())); + this.q = 5007; + this.r = new Xs(); + this.R = false; + this.D(this.f(t => this.y({ + id: this.t(t), + correlationId: this.s(t) ? t.correlationId : undefined, + path: t.path + }))); + } + s(t) { + return J5(t); + } + t(t) { + if (this.s(t)) { + return t.correlationId; + } else { + return Ds(t); + } + } + async watch(t) { + if (!this.r.isSettled) { + this.r.complete(); + } + this.r = new Xs(); + try { + this.g.clear(); + this.h.clear(); + for (const e of t) { + if (this.s(e)) { + this.g.set(e.correlationId, e); + } else { + this.h.set(this.t(e), e); + } + } + for (const [e] of this.j) { + if (!this.h.has(e) && !this.g.has(e)) { + this.j.deleteAndDispose(e); + this.m.delete(e); + } + } + return await this.u(false); + } finally { + this.r.complete(); + } + } + u(t) { + const e = []; + for (const [i, s] of [...this.h, ...this.g]) { + if (!this.j.has(i)) { + e.push(s); + } + } + return this.n.trigger(() => this.N(e), t ? this.w() : 0).catch(i => Ft(i)); + } + w() { + return 800; + } + isSuspended(t) { + const e = this.t(t); + if (this.m.has(e)) { + return "polling"; + } else { + return this.j.has(e); + } + } + async y(t) { + if (this.j.has(t.id)) { + return; + } + const e = new De(); + this.j.set(t.id, e); + await this.r.p; + if (!e.isDisposed) { + this.C(t, e); + this.u(true); + } + } + z(t) { + this.j.deleteAndDispose(t.id); + this.m.delete(t.id); + this.u(false); + } + C(t, e) { + if (this.F(t, e)) { + this.P(`reusing an existing recursive watcher to monitor ${t.path}`); + this.m.delete(t.id); + } else { + this.G(t, e); + this.m.add(t.id); + } + } + F(t, e) { + const i = this.O?.subscribe(t.path, (s, r) => { + if (!e.isDisposed) { + if (s) { + this.C(t, e); + } else if (r?.type === 1) { + this.H(t); + } + } + }); + if (i) { + e.add(i); + return true; + } else { + return false; + } + } + G(t, e) { + let i = false; + const s = (r, n) => { + if (e.isDisposed) { + return; + } + const o = this.I(r); + const a = this.I(n); + const c = i; + i = o; + if (!o && (a || c)) { + this.H(t); + } + }; + this.P(`starting fs.watchFile() on ${t.path} (correlationId: ${t.correlationId})`); + try { + XP(t.path, { + persistent: false, + interval: this.q + }, s); + } catch (r) { + this.Q(`fs.watchFile() failed with error ${r} on path ${t.path} (correlationId: ${t.correlationId})`); + } + e.add(xe(() => { + this.P(`stopping fs.watchFile() on ${t.path} (correlationId: ${t.correlationId})`); + try { + QP(t.path, s); + } catch (r) { + this.Q(`fs.unwatchFile() failed with error ${r} on path ${t.path} (correlationId: ${t.correlationId})`); + } + })); + } + H(t) { + this.P(`detected ${t.path} exists again, resuming watcher (correlationId: ${t.correlationId})`); + const e = { + resource: P.file(t.path), + type: 1, + cId: t.correlationId + }; + this.a.fire([e]); + this.J(e, t); + this.z(t); + } + I(t) { + return t.ctimeMs === 0 && t.ino === 0; + } + async stop() { + this.j.clearAndDisposeAll(); + this.m.clear(); + } + J(t, e) { + if (this.R) { + const i = ` >> normalized ${t.type === 1 ? "[ADDED]" : t.type === 2 ? "[DELETED]" : "[CHANGED]"} ${t.resource.fsPath}`; + this.L(i, e); + } + } + L(t, e) { + if (this.R) { + this.P(`${t}${typeof e.correlationId == "number" ? ` <${e.correlationId}> ` : ""}`); + } + } + M(t) { + return `${t.path} (excludes: ${t.excludes.length > 0 ? t.excludes : ""}, includes: ${t.includes && t.includes.length > 0 ? JSON.stringify(t.includes) : ""}, filter: ${TP(t.filter)}, correlationId: ${typeof t.correlationId == "number" ? t.correlationId : ""})`; + } + async setVerboseLogging(t) { + this.R = t; + } + }; + } + }); + import * as o2 from "fs"; + async function Eg(t, e) { + if (Se) { + return t; + } + const i = Xe(t); + if (t === i) { + return t; + } + const s = (Ue(t) || t).toLowerCase(); + try { + if (e?.isCancellationRequested) { + return null; + } + const n = (await ee.readdir(i)).filter(o => o.toLowerCase() === s); + if (n.length === 1) { + const o = await Eg(i, e); + if (o) { + return F(o, n[0]); + } + } else if (n.length > 1) { + const o = n.indexOf(s); + if (o >= 0) { + const a = await Eg(i, e); + if (a) { + return F(a, n[o]); + } + } + } + } catch {} + return null; + } + async function a2(t) { + try { + return await ee.realpath(t); + } catch { + const i = t$(t); + await o2.promises.access(i, o2.constants.R_OK); + return i; + } + } + function t$(t) { + return Qr(pi(t), Vt); + } + var c2 = g({ + "out-build/vs/base/node/extpath.js"() { + "use strict"; + + we(); + H(); + Wt(); + _t(); + } + }); + import { watch as i$, promises as s$ } from "fs"; + var l2; + var r$ = g({ + "out-build/vs/platform/files/node/watcher/nodejs/nodejsWatcherLib.js"() { + "use strict"; + + ce(); + At(); + gi(); + M(); + ou(); + we(); + H(); + nt(); + se(); + c2(); + _t(); + Fo(); + l2 = class If extends T { + static { + this.a = 100; + } + static { + this.b = 75; + } + get isReusingRecursiveWatcher() { + return this.n; + } + get failed() { + return this.q; + } + constructor(e, i, s, r, n, o) { + super(); + this.r = e; + this.s = i; + this.t = s; + this.u = r; + this.w = n; + this.y = o; + this.c = this.D(new _p({ + maxWorkChunkSize: 100, + throttleDelay: 200, + maxBufferedWork: 10000 + }, a => this.t(a))); + this.f = this.D(new zv(a => this.M(a), If.b)); + this.g = Z5(this.r.path, this.r.excludes); + this.h = this.r.includes ? Z5(this.r.path, this.r.includes) : undefined; + this.j = J5(this.r) ? this.r.filter : undefined; + this.m = new ns(); + this.ready = this.z(); + this.n = false; + this.q = false; + } + async z() { + try { + const e = await this.F(this.r); + if (this.m.token.isCancellationRequested) { + return; + } + const i = await s$.stat(e); + if (this.m.token.isCancellationRequested) { + return; + } + this.D(await this.G(e, i.isDirectory())); + } catch (e) { + if (e.code !== "ENOENT") { + this.O(e); + } else { + this.Q(`ignoring a path for watching who's stat info failed to resolve: ${this.r.path} (error: ${e})`); + } + this.C(); + } + } + C() { + this.q = true; + this.u?.(); + } + async F(e) { + let i = e.path; + try { + i = await ee.realpath(e.path); + if (e.path === i) { + i = (await Eg(e.path, this.m.token)) ?? e.path; + } + if (e.path !== i) { + this.Q(`correcting a path to watch that seems to be a symbolic link or wrong casing (original: ${e.path}, real: ${i})`); + } + } catch {} + return i; + } + async G(e, i) { + const s = new De(); + if (this.H(e, i, s)) { + this.Q(`reusing an existing recursive watcher for ${this.r.path}`); + this.n = true; + } else { + this.n = false; + await this.I(e, i, s); + } + return s; + } + H(e, i, s) { + if (i) { + return false; + } + const r = P.file(this.r.path); + const n = this.s?.subscribe(this.r.path, async (o, a) => { + if (!s.isDisposed) { + if (o) { + const c = await this.G(e, i); + if (s.isDisposed) { + c.dispose(); + } else { + s.add(c); + } + } else if (a && (typeof a.cId == "number" || typeof this.r.correlationId == "number")) { + this.L({ + resource: r, + type: a.type, + cId: this.r.correlationId + }, true); + } + } + }); + if (n) { + s.add(n); + return true; + } else { + return false; + } + } + async I(e, i, s) { + if (this.m.token.isCancellationRequested) { + return; + } + if (N && Ba(e, "/Volumes/", true)) { + this.O(`Refusing to watch ${e} for changes using fs.watch() for possibly being a network share where watching is unreliable and unstable.`); + return; + } + const r = new ns(this.m.token); + s.add(xe(() => r.dispose(true))); + const n = new De(); + s.add(n); + try { + const o = P.file(this.r.path); + const a = Ue(e); + const c = i$(e); + n.add(xe(() => { + c.removeAllListeners(); + c.close(); + })); + this.Q(`Started watching: '${e}'`); + const l = new Set(); + if (i) { + try { + for (const d of await ee.readdir(e)) { + l.add(d); + } + } catch (d) { + this.O(d); + } + } + if (r.token.isCancellationRequested) { + return; + } + const u = new Map(); + n.add(xe(() => { + for (const [, d] of u) { + d.dispose(); + } + u.clear(); + })); + c.on("error", (d, f) => { + if (!r.token.isCancellationRequested) { + this.O(`Failed to watch ${e} for changes using fs.watch() (${d}, ${f})`); + this.C(); + } + }); + c.on("change", (d, f) => { + if (r.token.isCancellationRequested) { + return; + } + if (this.y) { + this.R(`[raw] ["${d}"] ${f}`); + } + let p = ""; + if (f) { + p = f.toString(); + if (N) { + p = io(p); + } + } + if (!!p && (d === "change" || d === "rename")) { + if (i) { + if (d === "rename") { + u.get(p)?.dispose(); + const w = setTimeout(async () => { + u.delete(p); + if (p === a && !(await ee.exists(e))) { + this.J(o); + return; + } + if (r.token.isCancellationRequested) { + return; + } + const m = await this.N(F(e, p)); + if (r.token.isCancellationRequested) { + return; + } + let y; + if (m) { + if (l.has(p)) { + y = 0; + } else { + y = 1; + l.add(p); + } + } else { + l.delete(p); + y = 2; + } + this.L({ + resource: he(o, p), + type: y, + cId: this.r.correlationId + }); + }, If.a); + u.set(p, xe(() => clearTimeout(w))); + } else { + let w; + if (l.has(p)) { + w = 0; + } else { + w = 1; + l.add(p); + } + this.L({ + resource: he(o, p), + type: w, + cId: this.r.correlationId + }); + } + } else if (d === "rename" || p !== a) { + const w = setTimeout(async () => { + const m = await ee.exists(e); + if (!r.token.isCancellationRequested) { + if (m) { + this.L({ + resource: o, + type: 0, + cId: this.r.correlationId + }, true); + n.add(await this.G(e, false)); + } else { + this.J(o); + } + } + }, If.a); + n.clear(); + n.add(xe(() => clearTimeout(w))); + } else { + this.L({ + resource: o, + type: 0, + cId: this.r.correlationId + }, true); + } + } + }); + } catch (o) { + if (r.token.isCancellationRequested) { + return; + } + this.O(`Failed to watch ${e} for changes using fs.watch() (${o.toString()})`); + this.C(); + } + } + J(e) { + this.P("Watcher shutdown because watched path got deleted"); + this.L({ + resource: e, + type: 2, + cId: this.r.correlationId + }, true); + this.f.flush(); + this.C(); + } + L(e, i = false) { + if (!this.m.token.isCancellationRequested) { + if (this.y) { + this.R(`${e.type === 1 ? "[ADDED]" : e.type === 2 ? "[DELETED]" : "[CHANGED]"} ${e.resource.fsPath}`); + } + if (!i && this.g.some(s => s(e.resource.fsPath))) { + if (this.y) { + this.R(` >> ignored (excluded) ${e.resource.fsPath}`); + } + } else if (!i && this.h && this.h.length > 0 && !this.h.some(s => s(e.resource.fsPath))) { + if (this.y) { + this.R(` >> ignored (not included) ${e.resource.fsPath}`); + } + } else { + this.f.work(e); + } + } + } + M(e) { + const i = FP(e); + const s = []; + for (const n of i) { + if (WP(n, this.j)) { + if (this.y) { + this.R(` >> ignored (filtered) ${n.resource.fsPath}`); + } + continue; + } + s.push(n); + } + if (s.length === 0) { + return; + } + if (this.y) { + for (const n of s) { + this.R(` >> normalized ${n.type === 1 ? "[ADDED]" : n.type === 2 ? "[DELETED]" : "[CHANGED]"} ${n.resource.fsPath}`); + } + } + if (this.c.work(s)) { + if (this.c.pending > 0) { + this.Q(`started throttling events due to large amount of file change events at once (pending: ${this.c.pending}, most recent change: ${s[0].resource.fsPath}). Use 'files.watcherExclude' setting to exclude folders with lots of changing files (e.g. compilation output).`); + } + } else { + this.P(`started ignoring events due to too many file change events at once (incoming: ${s.length}, most recent change: ${s[0].resource.fsPath}). Use 'files.watcherExclude' setting to exclude folders with lots of changing files (e.g. compilation output).`); + } + } + async N(e) { + if (Se) { + return ee.exists(e); + } + try { + const i = Ue(e); + return (await ee.readdir(Xe(e))).some(r => r === i); + } catch (i) { + this.Q(i); + return false; + } + } + setVerboseLogging(e) { + this.y = e; + } + O(e) { + if (!this.m.token.isCancellationRequested) { + this.w?.({ + type: "error", + message: `[File Watcher (node.js)] ${e}` + }); + } + } + P(e) { + if (!this.m.token.isCancellationRequested) { + this.w?.({ + type: "warn", + message: `[File Watcher (node.js)] ${e}` + }); + } + } + Q(e) { + if (!this.m.token.isCancellationRequested && this.y) { + this.w?.({ + type: "trace", + message: `[File Watcher (node.js)] ${e}` + }); + } + } + R(e) { + if (!this.m.token.isCancellationRequested && this.y) { + this.Q(`${e}${typeof this.r.correlationId == "number" ? ` <${this.r.correlationId}> ` : ""}`); + } + } + dispose() { + this.m.dispose(true); + super.dispose(); + } + }; + } + }); + var u2; + var n$ = g({ + "out-build/vs/platform/files/node/watcher/nodejs/nodejsWatcher.js"() { + "use strict"; + + B(); + G5(); + e$(); + H(); + r$(); + gi(); + ce(); + M(); + u2 = class extends n2 { + constructor(t) { + super(); + this.O = t; + this.onDidError = x.None; + this.watchers = new Set(); + this.S = this.D(new pr()); + } + async N(t) { + t = this.ab(t); + const e = []; + const i = new Set(Array.from(this.watchers)); + for (const s of t) { + const r = this.Y(s); + if (r && T5(r.request.excludes, s.excludes) && T5(r.request.includes, s.includes)) { + i.delete(r); + } else { + e.push(s); + } + } + if (e.length) { + this.P(`Request to start watching: ${e.map(s => this.M(s)).join(",")}`); + } + if (i.size) { + this.P(`Request to stop watching: ${Array.from(i).map(s => this.M(s.request)).join(",")}`); + } + this.S.clear(); + for (const s of i) { + this.$(s); + } + this.X().work(e); + } + X() { + this.S.value = new _p({ + maxWorkChunkSize: 100, + throttleDelay: 100, + maxBufferedWork: Number.MAX_VALUE + }, t => { + for (const e of t) { + this.Z(e); + } + }); + return this.S.value; + } + Y(t) { + for (const e of this.watchers) { + if (typeof t.correlationId == "number" || typeof e.request.correlationId == "number") { + if (e.request.correlationId === t.correlationId) { + return e; + } + } else if (tu(e.request.path, t.path, !Se)) { + return e; + } + } + } + Z(t) { + const e = new l2(t, this.O, s => this.a.fire(s), () => this.c.fire(t), s => this.b.fire(s), this.R); + const i = { + request: t, + instance: e + }; + this.watchers.add(i); + } + async stop() { + await super.stop(); + for (const t of this.watchers) { + this.$(t); + } + } + $(t) { + this.P("stopping file watcher", t); + this.watchers.delete(t); + t.instance.dispose(); + } + ab(t) { + const e = new Map(); + for (const i of t) { + const s = Se ? i.path : i.path.toLowerCase(); + let r = e.get(i.correlationId); + if (!r) { + r = new Map(); + e.set(i.correlationId, r); + } + if (r.has(s)) { + this.P(`ignoring a request for watching who's path is already watched: ${this.M(i)}`); + } + r.set(s, i); + } + return Array.from(e.values()).map(i => Array.from(i.values())).flat(); + } + async setVerboseLogging(t) { + super.setVerboseLogging(t); + for (const e of this.watchers) { + e.instance.setVerboseLogging(t); + } + } + P(t, e) { + if (this.R) { + this.b.fire({ + type: "trace", + message: this.db(t, e) + }); + } + } + Q(t) { + this.b.fire({ + type: "warn", + message: this.db(t) + }); + } + db(t, e) { + if (e) { + return `[File Watcher (node.js)] ${t} (${this.M(e.request)})`; + } else { + return `[File Watcher (node.js)] ${t}`; + } + } + }; + } + }); + var h2; + var o$ = g({ + "out-build/vs/platform/files/node/watcher/nodejs/nodejsClient.js"() { + "use strict"; + + Fo(); + n$(); + h2 = class extends Y5 { + constructor(t, e, i) { + super(t, e, i); + this.r(); + } + q(t) { + return t.add(new u2(undefined)); + } + }; + } + }); + import { promises as yn } from "fs"; + var Ih; + var kg = g({ + "out-build/vs/platform/files/node/diskFileSystemProvider.js"() { + "use strict"; + + ce(); + $i(); + Ze(); + B(); + gi(); + M(); + we(); + H(); + nt(); + Ka(); + _t(); + be(); + He(); + t2(); + qP(); + YP(); + o$(); + Ih = class $l extends i2 { + static { + this.M = false; + } + constructor(e, i) { + super(e, i); + this.onDidChangeCapabilities = x.None; + this.Q = new Ht(s => tt.getComparisonKey(s)); + this.Y = new Map(); + this.Z = new Map(); + this.$ = new Map(); + } + get capabilities() { + if (!this.N) { + this.N = 253982; + if (Se) { + this.N |= 1024; + } + } + return this.N; + } + async stat(e) { + try { + const { + stat: i, + symbolicLink: s + } = await jt.stat(this.J(e)); + return { + type: this.P(i, s), + ctime: i.birthtime.getTime(), + mtime: i.mtime.getTime(), + size: i.size, + permissions: i.mode & 128 ? undefined : wo.Locked + }; + } catch (i) { + throw this.ib(i); + } + } + async O(e) { + try { + return await this.stat(e); + } catch { + return; + } + } + async readdir(e) { + try { + const i = await ee.readdir(this.J(e), { + withFileTypes: true + }); + const s = []; + await Promise.all(i.map(async r => { + try { + let n; + if (r.isSymbolicLink()) { + n = (await this.stat(he(e, r.name))).type; + } else { + n = this.P(r); + } + s.push([r.name, n]); + } catch (n) { + this.a.trace(n); + } + })); + return s; + } catch (i) { + throw this.ib(i); + } + } + P(e, i) { + let s; + if (i?.dangling) { + s = Rt.Unknown; + } else if (e.isFile()) { + s = Rt.File; + } else if (e.isDirectory()) { + s = Rt.Directory; + } else { + s = Rt.Unknown; + } + if (i) { + s |= Rt.SymbolicLink; + } + return s; + } + async R(e) { + const i = this.J(e); + this.S(`[Disk FileSystemProvider]: createResourceLock() - request to acquire resource lock (${i})`); + let s; + while (s = this.Q.get(e)) { + this.S(`[Disk FileSystemProvider]: createResourceLock() - waiting for resource lock to be released (${i})`); + await s.wait(); + } + const r = new Ga(); + this.Q.set(e, r); + this.S(`[Disk FileSystemProvider]: createResourceLock() - new resource lock created (${i})`); + return xe(() => { + this.S(`[Disk FileSystemProvider]: createResourceLock() - resource lock dispose() (${i})`); + if (this.Q.get(e) === r) { + this.S(`[Disk FileSystemProvider]: createResourceLock() - resource lock removed from resource-lock map (${i})`); + this.Q.delete(e); + } + this.S(`[Disk FileSystemProvider]: createResourceLock() - resource lock barrier open() (${i})`); + r.open(); + }); + } + async readFile(e, i) { + let s; + try { + if (i?.atomic) { + this.S(`[Disk FileSystemProvider]: atomic read operation started (${this.J(e)})`); + s = await this.R(e); + } + const r = this.J(e); + return await yn.readFile(r); + } catch (r) { + throw this.ib(r); + } finally { + s?.dispose(); + } + } + S(e) { + if ($l.M) { + this.a.trace(e); + } + } + readFileStream(e, i, s) { + const r = lu(n => z.concat(n.map(o => z.wrap(o))).buffer); + e2(this, e, r, n => n.buffer, { + ...i, + bufferSize: 262144 + }, s); + return r; + } + async writeFile(e, i, s) { + if (s?.atomic !== false && s?.atomic?.postfix && (await this.U(e))) { + return this.W(e, he(Fv(e), `${ks(e)}${s.atomic.postfix}`), i, s); + } else { + return this.X(e, i, s); + } + } + async U(e) { + try { + const i = this.J(e); + const { + symbolicLink: s + } = await jt.stat(i); + if (s) { + return false; + } + } catch {} + return true; + } + async W(e, i, s, r) { + const n = new De(); + try { + n.add(await this.R(e)); + n.add(await this.R(i)); + await this.X(i, s, r, true); + try { + await this.rename(i, e, { + overwrite: true + }); + } catch (o) { + try { + await this.delete(i, { + recursive: false, + useTrash: false, + atomic: false + }); + } catch {} + throw o; + } + } finally { + n.dispose(); + } + } + async X(e, i, s, r) { + let n; + try { + const o = this.J(e); + if (!s.create || !s.overwrite) { + if (await ee.exists(o)) { + if (!s.overwrite) { + throw cs(v(1950, null), oe.FileExists); + } + } else if (!s.create) { + throw cs(v(1951, null), oe.FileNotFound); + } + } + n = await this.open(e, { + create: true, + unlock: s.unlock + }, r); + await this.write(n, 0, i, 0, i.byteLength); + } catch (o) { + throw await this.jb(e, o); + } finally { + if (typeof n == "number") { + await this.close(n); + } + } + } + static { + this.ab = true; + } + static configureFlushOnWrite(e) { + $l.ab = e; + } + async open(e, i, s) { + const r = this.J(e); + let n; + if (mo(i) && !s) { + n = await this.R(e); + } + let o; + try { + if (mo(i) && i.unlock) { + try { + const { + stat: a + } = await jt.stat(r); + if (!(a.mode & 128)) { + await yn.chmod(r, a.mode | 128); + } + } catch (a) { + if (a.code !== "ENOENT") { + this.a.trace(a); + } + } + } + if (j && mo(i)) { + try { + o = await ee.open(r, "r+"); + await ee.ftruncate(o, 0); + } catch (a) { + if (a.code !== "ENOENT") { + this.a.trace(a); + } + if (typeof o == "number") { + try { + await ee.close(o); + } catch (c) { + this.a.trace(c); + } + o = undefined; + } + } + } + if (typeof o != "number") { + o = await ee.open(r, mo(i) ? "w" : "r"); + } + } catch (a) { + n?.dispose(); + throw mo(i) ? await this.jb(e, a) : this.ib(a); + } + this.Y.set(o, 0); + if (mo(i)) { + this.$.set(o, e); + } + if (n) { + const a = this.Z.get(o); + this.S(`[Disk FileSystemProvider]: open() - storing lock for handle ${o} (${r})`); + this.Z.set(o, n); + if (a) { + this.S(`[Disk FileSystemProvider]: open() - disposing a previous lock that was still stored on same handle ${o} (${r})`); + a.dispose(); + } + } + return o; + } + async close(e) { + const i = this.Z.get(e); + try { + this.Y.delete(e); + if (this.$.delete(e) && $l.ab) { + try { + await ee.fdatasync(e); + } catch (s) { + $l.configureFlushOnWrite(false); + this.a.error(s); + } + } + return await ee.close(e); + } catch (s) { + throw this.ib(s); + } finally { + if (i) { + if (this.Z.get(e) === i) { + this.S(`[Disk FileSystemProvider]: close() - resource lock removed from handle-lock map ${e}`); + this.Z.delete(e); + } + this.S(`[Disk FileSystemProvider]: close() - disposing lock for handle ${e}`); + i.dispose(); + } + } + } + async read(e, i, s, r, n) { + const o = this.bb(e, i); + let a = null; + try { + a = (await ee.read(e, s, r, n, o)).bytesRead; + } catch (c) { + throw this.ib(c); + } finally { + this.cb(e, o, a); + } + return a; + } + bb(e, i) { + if (i === this.Y.get(e)) { + return null; + } else { + return i; + } + } + cb(e, i, s) { + const r = this.Y.get(e); + if (typeof r == "number") { + if (typeof i != "number") { + if (typeof s == "number") { + this.Y.set(e, r + s); + } else { + this.Y.delete(e); + } + } + } + } + async write(e, i, s, r, n) { + return rk(() => this.db(e, i, s, r, n), 100, 3); + } + async db(e, i, s, r, n) { + const o = this.bb(e, i); + let a = null; + try { + a = (await ee.write(e, s, r, n, o)).bytesWritten; + } catch (c) { + throw await this.jb(this.$.get(e), c); + } finally { + this.cb(e, o, a); + } + return a; + } + async mkdir(e) { + try { + await yn.mkdir(this.J(e)); + } catch (i) { + throw this.ib(i); + } + } + async delete(e, i) { + try { + const s = this.J(e); + if (i.recursive) { + let r; + if (i?.atomic !== false && i.atomic.postfix) { + r = F(Xe(s), `${Ue(s)}${i.atomic.postfix}`); + } + await ee.rm(s, tn.MOVE, r); + } else { + try { + await yn.unlink(s); + } catch (r) { + if (r.code === "EPERM" || r.code === "EISDIR") { + let n = false; + try { + const { + stat: o, + symbolicLink: a + } = await jt.stat(s); + n = o.isDirectory() && !a; + } catch {} + if (n) { + await yn.rmdir(s); + } else { + throw r; + } + } else { + throw r; + } + } + } + } catch (s) { + throw this.ib(s); + } + } + async rename(e, i, s) { + const r = this.J(e); + const n = this.J(i); + if (r !== n) { + try { + await this.eb(e, i, "move", s.overwrite); + await ee.rename(r, n); + } catch (o) { + if (o.code === "EINVAL" || o.code === "EBUSY" || o.code === "ENAMETOOLONG") { + o = new Error(v(1952, null, Ue(r), Ue(Xe(n)), o.toString())); + } + throw this.ib(o); + } + } + } + async copy(e, i, s) { + const r = this.J(e); + const n = this.J(i); + if (r !== n) { + try { + await this.eb(e, i, "copy", s.overwrite); + await ee.copy(r, n, { + preserveSymlinks: true + }); + } catch (o) { + if (o.code === "EINVAL" || o.code === "EBUSY" || o.code === "ENAMETOOLONG") { + o = new Error(v(1953, null, Ue(r), Ue(Xe(n)), o.toString())); + } + throw this.ib(o); + } + } + } + async eb(e, i, s, r) { + const n = this.J(e); + const o = this.J(i); + let a = false; + if (!(this.capabilities & 1024)) { + a = tu(n, o, true); + } + if (a) { + if (s === "copy") { + throw cs(v(1954, null), oe.FileExists); + } + if (s === "move") { + return; + } + } + const l = await this.O(e); + if (!l) { + throw cs(v(1955, null), oe.FileNotFound); + } + const u = await this.O(i); + if (u) { + if (!r) { + throw cs(v(1956, null), oe.FileExists); + } + if (!(l.type & Rt.File) || !(u.type & Rt.File)) { + await this.delete(i, { + recursive: true, + useTrash: false, + atomic: false + }); + } + } + } + async cloneFile(e, i) { + return this.fb(e, i, false); + } + async fb(e, i, s) { + const r = this.J(e); + const n = this.J(i); + const o = !!(this.capabilities & 1024); + if (tu(r, n, !o)) { + return; + } + const a = new De(); + try { + a.add(await this.R(e)); + a.add(await this.R(i)); + if (s) { + await yn.mkdir(Xe(n), { + recursive: true + }); + } + await yn.copyFile(r, n); + } catch (c) { + if (c.code === "ENOENT" && !s) { + return this.fb(e, i, true); + } + throw this.ib(c); + } finally { + a.dispose(); + } + } + t(e, i, s) { + return new r2(r => e(r), r => i(r), s); + } + G(e, i, s) { + return new h2(r => e(r), r => i(r), s); + } + ib(e) { + if (e instanceof Lu) { + return e; + } + let i = e; + let s; + switch (e.code) { + case "ENOENT": + s = oe.FileNotFound; + break; + case "EISDIR": + s = oe.FileIsADirectory; + break; + case "ENOTDIR": + s = oe.FileNotADirectory; + break; + case "EEXIST": + s = oe.FileExists; + break; + case "EPERM": + case "EACCES": + s = oe.NoPermissions; + break; + case "ERR_UNC_HOST_NOT_ALLOWED": + i = `${e.message}. Please update the 'security.allowedUNCHosts' setting if you want to allow this host.`; + s = oe.Unknown; + break; + default: + s = oe.Unknown; + } + return cs(i, s); + } + async jb(e, i) { + let s = this.ib(i); + if (e && s.code === oe.NoPermissions) { + try { + const { + stat: r + } = await jt.stat(this.J(e)); + if (!(r.mode & 128)) { + s = cs(i, oe.FileWriteLocked); + } + } catch (r) { + this.a.trace(r); + } + } + return s; + } + }; + } + }); + var d2; + var f2; + var a$ = g({ + "out-build/vs/platform/files/node/diskFileSystemProviderServer.js"() { + "use strict"; + + B(); + kg(); + M(); + Ze(); + Ka(); + At(); + d2 = class extends T { + constructor(t, e) { + super(); + this.a = t; + this.b = e; + this.F = new Map(); + this.G = new Map(); + } + call(t, e, i) { + const s = this.c(t); + switch (e) { + case "stat": + return this.g(s, i[0]); + case "readdir": + return this.h(s, i[0]); + case "open": + return this.q(s, i[0], i[1]); + case "close": + return this.r(i[0]); + case "read": + return this.s(i[0], i[1], i[2]); + case "readFile": + return this.j(s, i[0], i[1]); + case "write": + return this.t(i[0], i[1], i[2], i[3], i[4]); + case "writeFile": + return this.n(s, i[0], i[1], i[2]); + case "rename": + return this.y(s, i[0], i[1], i[2]); + case "copy": + return this.z(s, i[0], i[1], i[2]); + case "cloneFile": + return this.C(s, i[0], i[1]); + case "mkdir": + return this.u(s, i[0]); + case "delete": + return this.w(s, i[0], i[1]); + case "watch": + return this.I(s, i[0], i[1], i[2], i[3]); + case "unwatch": + return this.J(i[0], i[1]); + } + throw new Error(`IPC Command ${e} not found`); + } + listen(t, e, i) { + const s = this.c(t); + switch (e) { + case "fileChange": + return this.H(s, i[0]); + case "readFileStream": + return this.m(s, i[0], i[1]); + } + throw new Error(`Unknown event ${e}`); + } + g(t, e) { + const i = this.f(t, e, true); + return this.a.stat(i); + } + h(t, e) { + const i = this.f(t, e); + return this.a.readdir(i); + } + async j(t, e, i) { + const s = this.f(t, e, true); + const r = await this.a.readFile(s, i); + return z.wrap(r); + } + m(t, e, i) { + const s = this.f(t, e, true); + const r = new ns(); + const n = new $({ + onDidRemoveLastListener: () => { + r.cancel(); + } + }); + const o = this.a.readFileStream(s, i, r.token); + uu(o, { + onData: a => n.fire(z.wrap(a)), + onError: a => n.fire(a), + onEnd: () => { + n.fire("end"); + n.dispose(); + r.dispose(); + } + }); + return n.event; + } + n(t, e, i, s) { + const r = this.f(t, e); + return this.a.writeFile(r, i.buffer, s); + } + q(t, e, i) { + const s = this.f(t, e, true); + return this.a.open(s, i); + } + r(t) { + return this.a.close(t); + } + async s(t, e, i) { + const s = z.alloc(i); + const n = await this.a.read(t, e, s.buffer, 0, i); + return [s, n]; + } + t(t, e, i, s, r) { + return this.a.write(t, e, i.buffer, s, r); + } + u(t, e) { + const i = this.f(t, e); + return this.a.mkdir(i); + } + w(t, e, i) { + const s = this.f(t, e); + return this.a.delete(s, i); + } + y(t, e, i, s) { + const r = this.f(t, e); + const n = this.f(t, i); + return this.a.rename(r, n, s); + } + z(t, e, i, s) { + const r = this.f(t, e); + const n = this.f(t, i); + return this.a.copy(r, n, s); + } + C(t, e, i) { + const s = this.f(t, e); + const r = this.f(t, i); + return this.a.cloneFile(s, r); + } + H(t, e) { + const i = new $({ + onWillAddFirstListener: () => { + this.F.set(e, this.L(t, i)); + }, + onDidRemoveLastListener: () => { + Et(this.F.get(e)); + this.F.delete(e); + } + }); + return i.event; + } + async I(t, e, i, s, r) { + const n = this.F.get(e); + if (n) { + const o = this.f(t, s); + const a = n.watch(i, o, r); + this.G.set(e + i, a); + } + } + async J(t, e) { + const i = t + e; + const s = this.G.get(i); + if (s) { + Et(s); + this.G.delete(i); + } + } + dispose() { + super.dispose(); + for (const [, t] of this.G) { + t.dispose(); + } + this.G.clear(); + for (const [, t] of this.F) { + t.dispose(); + } + this.F.clear(); + } + }; + f2 = class extends T { + constructor(t, e, i, s) { + super(); + this.c = t; + this.f = i; + this.g = s; + this.a = new Map(); + this.b = this.D(new Ih(this.f)); + this.h(e); + } + h(t) { + const e = this.D(new $()); + this.D(e.event(i => { + t.fire(i.map(s => ({ + resource: this.c.transformOutgoingURI(s.resource), + type: s.type, + cId: s.cId + }))); + })); + this.D(this.b.onDidChangeFile(i => e.fire(i))); + this.D(this.b.onDidWatchError(i => t.fire(i))); + } + j(t) {} + m(t) {} + watch(t, e, i) { + const s = this.m(this.g); + if (Array.isArray(s)) { + i.excludes = [...i.excludes, ...s]; + } + this.a.set(t, this.b.watch(e, i)); + return xe(() => { + Et(this.a.get(t)); + this.a.delete(t); + }); + } + dispose() { + for (const [, t] of this.a) { + t.dispose(); + } + this.a.clear(); + super.dispose(); + } + }; + } + }); + var p2; + var c$ = g({ + "out-build/vs/base/common/uriIpc.js"() { + "use strict"; + + Ze(); + se(); + p2 = new class { + transformIncoming(t) { + return t; + } + transformOutgoing(t) { + return t; + } + transformOutgoingURI(t) { + return t; + } + transformOutgoingScheme(t) { + return t; + } + }(); + } + }); + import { shell as l$ } from "electron"; + var g2; + var m2; + var u$ = g({ + "out-build/vs/platform/files/electron-main/diskFileSystemProviderServer.js"() { + "use strict"; + + be(); + H(); + se(); + He(); + we(); + a$(); + c$(); + en(); + g2 = class extends d2 { + constructor(t, e, i) { + super(t, e); + this.M = i; + } + c(t) { + return p2; + } + f(t, e) { + return P.revive(e); + } + async w(t, e, i) { + if (!i.useTrash) { + return super.w(t, e, i); + } + const s = this.f(t, e); + const r = pi(s.fsPath); + try { + await l$.trashItem(r); + } catch (n) { + throw cs(v(j ? 1948 : 1949, null, Ue(r), Ki(n)), oe.Unknown); + } + } + L(t, e) { + return new m2(t, e, this.b, this.M); + } + }; + m2 = class extends f2 { + watch(t, e, i) { + if (i.recursive) { + throw cs("Recursive file watching is not supported from main process for performance reasons.", oe.Unavailable); + } + return super.watch(t, e, i); + } + }; + } + }); + var ue; + var Ah = g({ + "out-build/vs/platform/instantiation/common/descriptors.js"() { + "use strict"; + + ue = class { + constructor(t, e = [], i = false) { + this.ctor = t; + this.staticArguments = e; + this.supportsDelayedInstantiation = i; + } + }; + } + }); + var Ch; + var xg = g({ + "out-build/vs/platform/instantiation/common/serviceCollection.js"() { + "use strict"; + + Ch = class { + constructor(...t) { + this.a = new Map(); + for (const [e, i] of t) { + this.set(e, i); + } + } + set(t, e) { + const i = this.a.get(t); + this.a.set(t, e); + return i; + } + has(t) { + return this.a.has(t); + } + get(t) { + return this.a.get(t); + } + }; + } + }); + var w2; + var Dg; + var h$ = g({ + "out-build/vs/platform/process/common/process.js"() { + "use strict"; + + Y(); + (function (t) { + t.VSCode = "vscode"; + t.Extension = "extension"; + t.Marketplace = "marketplace"; + })(w2 ||= {}); + Dg = q("processService"); + } + }); + import { exec as _h } from "child_process"; + function Pg(t) { + return new Promise((e, i) => { + let s; + const r = new Map(); + function n(c, l, u, d, f) { + const p = r.get(l); + if (c === t || p) { + const w = { + name: o(u), + cmd: u, + pid: c, + ppid: l, + load: d, + mem: f + }; + r.set(c, w); + if (c === t) { + s = w; + } + if (p) { + p.children ||= []; + p.children.push(w); + if (p.children.length > 1) { + p.children = p.children.sort((m, y) => m.pid - y.pid); + } + } + } + } + function o(c) { + const l = /--utility-sub-type=network/i; + const u = /--crashes-directory/i; + const d = /\\pipe\\winpty-control/i; + const f = /conhost\.exe.+--headless/i; + const p = /--type=([a-zA-Z-]+)/; + if (u.exec(c)) { + return "electron-crash-reporter"; + } + if (d.exec(c)) { + return "winpty-agent"; + } + if (f.exec(c)) { + return "conpty-agent"; + } + let w = p.exec(c); + if (w && w.length === 2) { + if (w[1] === "renderer") { + return "window"; + } else if (w[1] === "utility") { + if (l.exec(c)) { + return "utility-network-service"; + } else { + return "utility-process"; + } + } else if (w[1] === "extensionHost") { + return "extension-host"; + } else { + return w[1]; + } + } + const m = /[a-zA-Z-]+\.js/g; + let y = ""; + do { + w = m.exec(c); + if (w) { + y += w + " "; + } + } while (w); + if (y && c.indexOf("node ") < 0 && c.indexOf("node.exe") < 0) { + return `electron-nodejs (${y})`; + } else { + return c; + } + } + if (process.platform === "win32") { + const c = l => l.indexOf("\\\\?\\") === 0 || l.indexOf("\\??\\") === 0 ? l.substring(4) : l.indexOf("\"\\\\?\\") === 0 || l.indexOf("\"\\??\\") === 0 ? "\"" + l.substring(5) : l; + import("@vscode/windows-process-tree").then(l => { + l.getProcessList(t, u => { + if (!u) { + i(new Error(`Root process ${t} not found`)); + return; + } + l.getProcessCpuUsage(u, d => { + const f = new Map(); + d.forEach(p => { + const w = c(p.commandLine || ""); + f.set(p.pid, { + name: o(w), + cmd: w, + pid: p.pid, + ppid: p.ppid, + load: p.cpu || 0, + mem: p.memory || 0 + }); + }); + s = f.get(t); + if (s) { + f.forEach(p => { + const w = f.get(p.ppid); + if (w) { + w.children ||= []; + w.children.push(p); + } + }); + f.forEach(p => { + p.children &&= p.children.sort((w, m) => w.pid - m.pid); + }); + e(s); + } else { + i(new Error(`Root process ${t} not found`)); + } + }); + }, l.ProcessDataFlag.CommandLine | l.ProcessDataFlag.Memory); + }); + } else { + let c = function () { + let l = [s]; + const u = []; + while (l.length) { + const f = l.shift(); + if (f) { + u.push(f.pid); + if (f.children) { + l = l.concat(f.children); + } + } + } + let d = JSON.stringify(Ct.asFileUri("vs/base/node/cpuUsage.sh").fsPath); + d += " " + u.join(" "); + _h(d, {}, (f, p, w) => { + if (f || w) { + i(f || new Error(w.toString())); + } else { + const m = p.toString().split(` + `); + for (let y = 0; y < u.length; y++) { + const b = r.get(u[y]); + b.load = parseFloat(m[y]); + } + if (!s) { + i(new Error(`Root process ${t} not found`)); + return; + } + e(s); + } + }); + }; + var a = c; + _h("which ps", {}, (l, u, d) => { + if (l || d) { + if (process.platform !== "linux") { + i(l || new Error(d.toString())); + } else { + const f = JSON.stringify(Ct.asFileUri("vs/base/node/ps.sh").fsPath); + _h(f, {}, (p, w, m) => { + if (p || m) { + i(p || new Error(m.toString())); + } else { + v2(w, n); + c(); + } + }); + } + } else { + const f = u.toString().trim(); + _h(`${f} -ax -o pid=,ppid=,pcpu=,pmem=,command=`, { + maxBuffer: 1024000, + env: { + LC_NUMERIC: "en_US.UTF-8" + } + }, (w, m, y) => { + if (w || y && !y.includes("screen size is bogus")) { + i(w || new Error(y.toString())); + } else { + v2(m, n); + if (process.platform === "linux") { + c(); + } else if (s) { + e(s); + } else { + i(new Error(`Root process ${t} not found`)); + } + } + }); + } + }); + } + }); + } + function v2(t, e) { + const i = /^\s*([0-9]+)\s+([0-9]+)\s+([0-9]+\.[0-9]+)\s+([0-9]+\.[0-9]+)\s+(.+)$/; + const s = t.toString().split(` + `); + for (const r of s) { + const n = i.exec(r.trim()); + if (n && n.length === 6) { + e(parseInt(n[1]), parseInt(n[2]), n[5], parseFloat(n[3]), parseFloat(n[4])); + } + } + } + var b2 = g({ + "out-build/vs/base/node/ps.js"() { + "use strict"; + + Ie(); + } + }); + import { spawn as d$ } from "child_process"; + import { relative as y2, join as S2 } from "path"; + import { createHash as E2 } from "crypto"; + import { promises as k2 } from "fs"; + var Wo; + var Rh; + var Cc = g({ + "out-build/vs/platform/cssDev/node/cssDevService.js"() { + "use strict"; + + Ie(); + Kn(); + Ri(); + Y(); + X(); + B(); + M(); + He(); + se(); + Wo = q("ICSSDevelopmentService"); + Rh = class extends T { + constructor(e, i, s) { + super(); + this.f = e; + this.g = i; + this.h = s; + this.b = new Set(); + this.c = this.D(new $()); + this.onDidChangeCssModules = this.c.event; + if (this.isEnabled) { + this.D(this.h.onDidFilesChange(this.n.bind(this))); + this.m(); + } + } + get isEnabled() { + return !this.f.isBuilt; + } + getCssModules(e) { + if (e) { + this.a = undefined; + } + this.a ??= this.j(); + return this.a; + } + async j() { + if (!this.isEnabled) { + return new Map(); + } + const e = await import("@vscode/ripgrep"); + return await new Promise(i => { + const s = Jr.create(); + const r = []; + const n = new TextDecoder(); + const o = Ct.asFileUri("").fsPath; + const a = d$(e.rgPath, ["-g", "**/*.css", "-g", "!**/fixtures/**", "--files", "--no-ignore", o], {}); + a.stdout.on("data", c => { + const l = n.decode(c, { + stream: true + }); + r.push(l.split(` + `).filter(Boolean)); + }); + a.on("error", c => { + i(new Map()); + }); + a.on("close", async () => { + const c = r.flat().map(u => y2(o, u).replace(/\\/g, "/")).filter(Boolean).sort(); + const l = new Map(); + for (const u of c) { + try { + const d = S2(o, u); + const f = await k2.readFile(d); + const p = E2("sha256").update(f).digest("hex"); + l.set(u, p); + } catch { + l.set(u, Date.now().toString()); + } + } + i(l); + }); + }); + } + async m() { + const e = await this.getCssModules(); + for (const [i] of e) { + const s = P.file(S2(Ct.asFileUri("").fsPath, i)); + this.b.add(i); + this.D(this.h.watch(s)); + } + } + async n(e) { + if (!this.isEnabled) { + return; + } + const i = Ct.asFileUri("").fsPath; + const s = []; + for (const r of e.rawUpdated) { + const n = y2(i, r.fsPath).replace(/\\/g, "/"); + if (this.b.has(n)) { + let o; + try { + const a = await k2.readFile(r.fsPath); + o = E2("sha256").update(a).digest("hex"); + } catch { + continue; + } + s.push({ + path: n, + newHash: o + }); + } + } + if (s.length > 0) { + this.c.fire(new Map(s.map(r => [r.path, r.newHash]))); + this.a = undefined; + } + } + }; + Rh = __decorate([__param(0, Yi), __param(1, V), __param(2, at)], Rh); + } + }); + import { networkInterfaces as f$ } from "os"; + function p$(t) { + const e = t.replace(/\-/g, ":").toLowerCase(); + return !x2.has(e); + } + function g$() { + const t = f$(); + for (const e in t) { + const i = t[e]; + if (i) { + for (const { + mac: s + } of i) { + if (p$(s)) { + return s; + } + } + } + } + throw new Error("Unable to retrieve mac address (unexpected format)"); + } + var x2; + var m$ = g({ + "out-build/vs/base/node/macAddress.js"() { + "use strict"; + + x2 = new Set(["00:00:00:00:00:00", "ff:ff:ff:ff:ff:ff", "ac:de:48:00:11:22"]); + } + }); + import { networkInterfaces as w$ } from "os"; + import { platform as $g } from "process"; + import { execSync as v$ } from "child_process"; + async function b$(t) { + Ig ||= (async () => { + let e; + try { + e = await P2(false); + } catch (i) { + t(i); + } + return e || ti(); + })(); + return Ig; + } + async function D2(t) { + try { + const e = await import("crypto"); + const i = g$(); + return e.createHash("sha256").update(i, "utf8").digest("hex"); + } catch (e) { + t(e); + return; + } + } + function y$() { + if ($g !== "win32") { + return "notdefined"; + } else if (process.arch === "ia32" && process.env.hasOwnProperty("PROCESSOR_ARCHITEW6432")) { + return "mixed"; + } else { + return "native"; + } + } + function S$(t) { + switch ($g) { + case "darwin": + return t.split("IOPlatformUUID")[1].split(` + `)[0].replace(/\=|\s+|\"/ig, "").toLowerCase(); + case "win32": + return t.toString().split("REG_SZ")[1].replace(/\r+|\n+|\s+/ig, "").toLowerCase(); + case "linux": + return t.toString().replace(/\r+|\n+|\s+/ig, "").toLowerCase(); + case "freebsd": + return t.toString().replace(/\r+|\n+|\s+/ig, "").toLowerCase(); + default: + throw new Error(`Unsupported platform: ${process.platform}`); + } + } + async function P2(t) { + let e = S$(v$(A2[$g], { + timeout: 5000 + }).toString()); + let i; + try { + i = (await import("crypto")).createHash("sha256").update(e, "utf8").digest("hex"); + } catch { + i = ti(); + } + if (t) { + return e; + } else { + return i; + } + } + async function E$(t) { + if (j) { + const e = await import("@vscode/windows-registry"); + try { + return e.GetStringRegKey("HKEY_LOCAL_MACHINE", C2, "MachineId") || ""; + } catch (i) { + t(i); + return ""; + } + } + return ""; + } + async function $2(t) { + try { + return await (await import("@vscode/deviceid")).getDeviceId(); + } catch (e) { + t(e); + return ti(); + } + } + var Oh; + var Ig; + var I2; + var A2; + var C2; + var _c = g({ + "out-build/vs/base/node/id.js"() { + "use strict"; + + go(); + _i(); + m$(); + H(); + Oh = new class { + c(t) { + if (!this.a) { + this.a = Pr.forStrings(); + this.a.set("00-50-56", true); + this.a.set("00-0C-29", true); + this.a.set("00-05-69", true); + this.a.set("00-03-FF", true); + this.a.set("00-1C-42", true); + this.a.set("00-16-3E", true); + this.a.set("08-00-27", true); + this.a.set("00:50:56", true); + this.a.set("00:0C:29", true); + this.a.set("00:05:69", true); + this.a.set("00:03:FF", true); + this.a.set("00:1C:42", true); + this.a.set("00:16:3E", true); + this.a.set("08:00:27", true); + } + return !!this.a.findSubstr(t); + } + value() { + if (this.b === undefined) { + let t = 0; + let e = 0; + const i = w$(); + for (const s in i) { + const r = i[s]; + if (r) { + for (const { + mac: n, + internal: o + } of r) { + if (!o) { + e += 1; + if (this.c(n.toUpperCase())) { + t += 1; + } + } + } + } + } + this.b = e > 0 ? t / e : 0; + } + return this.b; + } + }(); + I2 = { + native: "%windir%\\System32", + mixed: "%windir%\\sysnative\\cmd.exe /c %windir%\\System32", + notdefined: "" + }; + A2 = { + darwin: "ioreg -rd1 -c IOPlatformExpertDevice", + win32: `${I2[y$()]}\\REG.exe QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid`, + linux: "( cat /var/lib/dbus/machine-id /etc/machine-id 2> /dev/null || hostname ) | head -n 1 || :", + freebsd: "kenv -q smbios.system.uuid || sysctl -n kern.hostuuid" + }; + C2 = "Software\\Microsoft\\SQMClient"; + } + }); + import * as _2 from "net"; + function k$(t, e, i, s = 1) { + let r = false; + return new Promise(n => { + const o = setTimeout(() => { + if (!r) { + r = true; + return n(0); + } + }, i); + Ag(t, e, s, a => { + if (!r) { + r = true; + clearTimeout(o); + return n(a); + } + }); + }); + } + function Ag(t, e, i, s) { + if (e === 0) { + return s(0); + } + const r = new _2.Socket(); + r.once("connect", () => { + R2(r); + return Ag(t + i, e - 1, i, s); + }); + r.once("data", () => {}); + r.once("error", n => { + R2(r); + if (n.code !== "ECONNREFUSED") { + return Ag(t + i, e - 1, i, s); + } else { + return s(t); + } + }); + r.connect(t, "127.0.0.1"); + } + function x$(t, e, i, s = "127.0.0.1") { + let r = false; + let n; + let o = 1; + const a = _2.createServer({ + pauseOnConnect: true + }); + function c(l, u) { + if (!r) { + r = true; + a.removeAllListeners(); + a.close(); + if (n) { + clearTimeout(n); + } + u(l); + } + } + return new Promise(l => { + n = setTimeout(() => { + c(0, l); + }, i); + a.on("listening", () => { + c(t, l); + }); + a.on("error", u => { + if (u && (u.code === "EADDRINUSE" || u.code === "EACCES") && o < e) { + t++; + o++; + a.listen(t, s); + } else { + c(0, l); + } + }); + a.on("close", () => { + c(0, l); + }); + a.listen(t, s); + }); + } + function R2(t) { + try { + t.removeAllListeners("connect"); + t.removeAllListeners("error"); + t.end(); + t.destroy(); + t.unref(); + } catch (e) { + console.error(e); + } + } + var Cg; + var O2 = g({ + "out-build/vs/base/node/ports.js"() { + "use strict"; + + Cg = { + 1: true, + 7: true, + 9: true, + 11: true, + 13: true, + 15: true, + 17: true, + 19: true, + 20: true, + 21: true, + 22: true, + 23: true, + 25: true, + 37: true, + 42: true, + 43: true, + 53: true, + 69: true, + 77: true, + 79: true, + 87: true, + 95: true, + 101: true, + 102: true, + 103: true, + 104: true, + 109: true, + 110: true, + 111: true, + 113: true, + 115: true, + 117: true, + 119: true, + 123: true, + 135: true, + 137: true, + 139: true, + 143: true, + 161: true, + 179: true, + 389: true, + 427: true, + 465: true, + 512: true, + 513: true, + 514: true, + 515: true, + 526: true, + 530: true, + 531: true, + 532: true, + 540: true, + 548: true, + 554: true, + 556: true, + 563: true, + 587: true, + 601: true, + 636: true, + 989: true, + 990: true, + 993: true, + 995: true, + 1719: true, + 1720: true, + 1723: true, + 2049: true, + 3659: true, + 4045: true, + 5060: true, + 5061: true, + 6000: true, + 6566: true, + 6665: true, + 6666: true, + 6667: true, + 6668: true, + 6669: true, + 6697: true, + 10080: true + }; + } + }); + import * as D$ from "fs"; + import * as P$ from "os"; + import * as $$ from "child_process"; + import * as I$ from "path"; + async function A$(t = false) { + if (_g === undefined || t) { + _g = C$(); + } + return _g; + } + async function C$() { + const t = _$(); + if (t === undefined) { + return false; + } + if (t >= 22000) { + const e = R$(); + if (e) { + return new Promise(i => { + try { + $$.execFile(e, ["--status"], s => i(!s)); + } catch { + i(false); + } + }); + } + } else { + const e = O$(); + if (e) { + try { + if ((await D$.promises.stat(e)).isFile()) { + return true; + } + } catch {} + } + } + return false; + } + function _$() { + const t = /(\d+)\.(\d+)\.(\d+)/g.exec(P$.release()); + if (t) { + return parseInt(t[3]); + } + } + function L2(t) { + const e = process.env.SystemRoot; + if (e) { + const i = process.env.hasOwnProperty("PROCESSOR_ARCHITEW6432"); + return I$.join(e, i ? "Sysnative" : "System32", t); + } + } + function R$() { + return L2("wsl.exe"); + } + function O$() { + return L2("lxss\\LxssManager.dll"); + } + var _g; + var L$ = g({ + "out-build/vs/platform/remote/node/wsl.js"() { + "use strict"; + } + }); + var Lh; + var M$ = g({ + "out-build/vs/platform/profiling/electron-main/windowProfiling.js"() { + "use strict"; + + ce(); + X(); + Lh = class { + constructor(e, i, s) { + this.a = e; + this.b = i; + this.c = s; + } + async inspect(e) { + await this.d(); + const i = this.a.webContents.debugger; + await i.sendCommand("Profiler.start"); + this.c.warn("[perf] profiling STARTED", this.b); + await wi(e); + const s = await i.sendCommand("Profiler.stop"); + this.c.warn("[perf] profiling DONE", this.b); + await this.e(); + return s.profile; + } + async d() { + const e = this.a.webContents.debugger; + e.attach(); + await e.sendCommand("Profiler.enable"); + } + async e() { + const e = this.a.webContents.debugger; + await e.sendCommand("Profiler.disable"); + e.detach(); + } + }; + Lh = __decorate([__param(2, V)], Lh); + } + }); + var To; + var Mh = g({ + "out-build/vs/platform/auxiliaryWindow/electron-main/auxiliaryWindows.js"() { + "use strict"; + + Y(); + To = q("auxiliaryWindowsMainService"); + } + }); + function Fh(t) { + return t.res.statusCode && t.res.statusCode >= 200 && t.res.statusCode < 300 || t.res.statusCode === 1223; + } + function M2(t) { + return t.res.statusCode === 204; + } + async function Rc(t) { + if (!Fh(t)) { + throw new Error("Server returned " + t.res.statusCode); + } + if (M2(t)) { + return null; + } + const i = (await Za(t.stream)).toString(); + try { + return JSON.parse(i); + } catch (s) { + s.message += `: + ${i}`; + throw s; + } + } + function F$(t) { + const e = Gt.as(Ai.Configuration); + const i = Rg; + Rg = { + id: "http", + order: 15, + title: v(2099, null), + type: "object", + scope: t, + properties: { + "http.proxy": { + type: "string", + pattern: "^(https?|socks|socks4a?|socks5h?)://([^:]*(:[^@]*)?@)?([^:]+|\\[[:0-9a-fA-F]+\\])(:\\d+)?/?$|^$", + markdownDescription: v(2100, null), + restricted: true + }, + "http.proxyStrictSSL": { + type: "boolean", + default: true, + description: v(2101, null), + restricted: true + }, + "http.proxyKerberosServicePrincipal": { + type: "string", + markdownDescription: v(2102, null), + restricted: true + }, + "http.noProxy": { + type: "array", + items: { + type: "string" + }, + markdownDescription: v(2103, null), + restricted: true + }, + "http.proxyAuthorization": { + type: ["null", "string"], + default: null, + markdownDescription: v(2104, null), + restricted: true + }, + "http.proxySupport": { + type: "string", + enum: ["off", "on", "fallback", "override"], + enumDescriptions: [v(2105, null), v(2106, null), v(2107, null), v(2108, null)], + default: "override", + description: v(2109, null), + restricted: true + }, + "http.systemCertificates": { + type: "boolean", + default: true, + description: v(2110, null), + restricted: true + }, + "http.experimental.systemCertificatesV2": { + type: "boolean", + tags: ["experimental"], + default: false, + description: v(2111, null), + restricted: true + }, + "http.electronFetch": { + type: "boolean", + default: false, + description: v(2112, null), + restricted: true + }, + "http.fetchAdditionalSupport": { + type: "boolean", + default: true, + markdownDescription: v(2113, null, "`#http.proxySupport#`", "`#http.systemCertificates#`"), + restricted: true + } + } + }; + e.updateConfigurations({ + add: [Rg], + remove: i ? [i] : [] + }); + } + var Sn; + var F2; + var N2; + var Rg; + var En = g({ + "out-build/vs/platform/request/common/request.js"() { + "use strict"; + + Ze(); + $e(); + M(); + be(); + Xr(); + Y(); + Zs(); + Sn = q("requestService"); + F2 = class { + constructor(t) { + this.b = t; + } + toJSON() { + if (!this.a) { + const t = Object.create(null); + for (const e in this.b) { + if (e.toLowerCase() === "authorization" || e.toLowerCase() === "proxy-authorization") { + t[e] = "*****"; + } else { + t[e] = this.b[e]; + } + } + this.a = t; + } + return this.a; + } + }; + N2 = class extends T { + constructor(t) { + super(); + this.b = t; + this.a = 0; + } + async c(t, e) { + const i = `[network] #${++this.a}: ${t.url}`; + this.b.trace(`${i} - begin`, t.type, new F2(t.headers ?? {})); + try { + const s = await e(); + this.b.trace(`${i} - end`, t.type, s.res.statusCode, s.res.headers); + return s; + } catch (s) { + this.b.error(`${i} - error`, t.type, Vi(s)); + throw s; + } + } + }; + F$(1); + } + }); + import { Readable as N$ } from "stream"; + import * as jo from "fs"; + import { exec as Uo, spawn as W$ } from "child_process"; + import { app as Oc, BrowserWindow as Nh, clipboard as Rr, Menu as Lc, powerMonitor as T$, screen as Mc, shell as kn, webContents as j$ } from "electron"; + import { arch as U$, cpus as B$, freemem as q$, loadavg as z$, platform as H$, release as V$, totalmem as G$, type as J$ } from "os"; + import { promisify as Bo } from "util"; + var Or; + var Fc; + var Nc = g({ + "out-build/vs/platform/native/electron-main/nativeHostMainService.js"() { + "use strict"; + + sn(); + B(); + M(); + Ie(); + we(); + H(); + se(); + c2(); + _c(); + _t(); + O2(); + be(); + wn(); + vt(); + Y(); + ct(); + X(); + ht(); + pc(); + mc(); + Lt(); + ri(); + vn(); + Ze(); + L$(); + M$(); + Mh(); + $e(); + Ke(); + H4(); + En(); + gi(); + Cc(); + b1(); + At(); + Or = q("nativeHostMainService"); + Fc = class extends T { + constructor(e, i, s, r, n, o, a, c, l, u, d, f, p, w) { + super(); + this.b = e; + this.c = i; + this.f = s; + this.g = r; + this.h = n; + this.j = o; + this.m = a; + this.n = c; + this.q = l; + this.r = u; + this.s = d; + this.t = f; + this.u = p; + this.z = w; + this.a = this.D(new $()); + this.onDidChangeCssModules = this.a.event; + this.onDidOpenMainWindow = x.map(this.b.onDidOpenWindow, m => m.id); + this.onDidTriggerWindowSystemContextMenu = x.any(x.map(this.b.onDidTriggerSystemContextMenu, ({ + window: m, + x: y, + y: b + }) => ({ + windowId: m.id, + x: y, + y: b + })), x.map(this.c.onDidTriggerSystemContextMenu, ({ + window: m, + x: y, + y: b + }) => ({ + windowId: m.id, + x: y, + y: b + }))); + this.onDidMaximizeWindow = x.any(x.map(this.b.onDidMaximizeWindow, m => m.id), x.map(this.c.onDidMaximizeWindow, m => m.id)); + this.onDidUnmaximizeWindow = x.any(x.map(this.b.onDidUnmaximizeWindow, m => m.id), x.map(this.c.onDidUnmaximizeWindow, m => m.id)); + this.onDidChangeWindowFullScreen = x.any(x.map(this.b.onDidChangeFullScreen, m => ({ + windowId: m.window.id, + fullscreen: m.fullscreen + })), x.map(this.c.onDidChangeFullScreen, m => ({ + windowId: m.window.id, + fullscreen: m.fullscreen + }))); + this.onDidBlurMainWindow = x.filter(x.fromNodeEventEmitter(Oc, "browser-window-blur", (m, y) => y.id), m => !!this.b.getWindowById(m)); + this.onDidFocusMainWindow = x.any(x.map(x.filter(x.map(this.b.onDidChangeWindowsCount, () => this.b.getLastActiveWindow()), m => !!m), m => m.id), x.filter(x.fromNodeEventEmitter(Oc, "browser-window-focus", (m, y) => y.id), m => !!this.b.getWindowById(m))); + this.onDidBlurMainOrAuxiliaryWindow = x.any(this.onDidBlurMainWindow, x.map(x.filter(x.fromNodeEventEmitter(Oc, "browser-window-blur", (m, y) => this.c.getWindowByWebContents(y.webContents)), m => !!m), m => m.id)); + this.onDidFocusMainOrAuxiliaryWindow = x.any(this.onDidFocusMainWindow, x.map(x.filter(x.fromNodeEventEmitter(Oc, "browser-window-focus", (m, y) => this.c.getWindowByWebContents(y.webContents)), m => !!m), m => m.id)); + this.onDidResumeOS = x.fromNodeEventEmitter(T$, "resume"); + this.onDidChangeColorScheme = this.n.onDidChangeColorScheme; + this.C = this.D(new $()); + this.onDidChangePassword = this.C.event; + this.onDidChangeDisplay = x.debounce(x.any(x.filter(x.fromNodeEventEmitter(Mc, "display-metrics-changed", (m, y, b) => b), m => !Array.isArray(m) || m.length !== 1 || m[0] !== "workArea"), x.fromNodeEventEmitter(Mc, "display-added"), x.fromNodeEventEmitter(Mc, "display-removed")), () => {}, 100); + if (w.isEnabled) { + this.D(w.onDidChangeCssModules(m => { + this.a.fire(Object.fromEntries(m)); + })); + } + } + get windowId() { + throw new Error("Not implemented in electron-main"); + } + async getWindows(e, i) { + const s = this.b.getWindows().map(n => ({ + id: n.id, + workspace: n.openedWorkspace ?? ju(n.backupPath, n.isExtensionDevelopmentHost), + title: n.win?.getTitle() ?? "", + filename: n.getRepresentedFilename(), + dirty: n.isDocumentEdited(), + parentWindowId: n.parentWindowId, + remoteAuthority: n.remoteAuthority + })); + const r = []; + if (i.includeAuxiliaryWindows) { + r.push(...this.c.getWindows().map(n => ({ + id: n.id, + parentId: n.parentId, + title: n.win?.getTitle() ?? "", + filename: n.getRepresentedFilename() + }))); + } + return [...s, ...r]; + } + async getWindowCount(e) { + return this.b.getWindowCount(); + } + async getActiveWindowId(e) { + const i = this.b.getFocusedWindow() || this.b.getLastActiveWindow(); + if (i) { + return i.id; + } + } + async getActiveWindowPosition() { + const e = this.b.getFocusedWindow() || this.b.getLastActiveWindow(); + if (e) { + return e.getBounds(); + } + } + async getNativeWindowHandle(e, i) { + const s = this.N(i, e); + if (s?.win) { + return z.wrap(s.win.getNativeWindowHandle()); + } + } + openWindow(e, i, s) { + if (Array.isArray(i)) { + return this.F(e, i, s); + } else { + return this.G(e, i); + } + } + exec2(e, i, s) { + this.j.debug("NativeHostMainService:exec2 called with command", i); + return new Promise((r, n) => { + try { + Uo(i, { + ...s, + encoding: "utf8" + }, (o, a, c) => { + r({ + stdout: a, + stderr: c, + error: o ?? undefined + }); + }); + } catch { + r({ + stdout: "", + stderr: "", + error: { + name: "unknown-error", + message: "Unknown error running command" + } + }); + } + }); + } + async exec4(e, i, s) { + this.j.debug("NativeHostMainService:exec4 called with command", i); + return new Promise((r, n) => { + try { + const o = process.env.SHELL || "/bin/sh"; + const a = W$(o, ["-c", i], s); + let c = ""; + let l = ""; + a.stdout.on("data", u => { + c += u; + }); + a.stderr.on("data", u => { + l += u; + }); + a.on("error", u => { + r({ + stdout: c, + stderr: l, + error: u + }); + }); + a.on("close", u => { + r({ + stdout: c, + stderr: l, + error: u !== 0 ? new Error(`Command exited with code ${u}`) : undefined + }); + }); + } catch { + r({ + stdout: "", + stderr: "", + error: { + name: "unknown-error", + message: "Unknown error running command" + } + }); + } + }); + } + async *exec3(e) { + this.j.debug("NativeHostMainService:exec3 called with command", e); + const i = Uo(e); + const s = new N$({ + read() {} + }); + i.stdout?.on("data", r => { + s.push(r); + }); + i.on("exit", () => { + s.push(null); + }); + for await (const r of s) { + if (r !== null) { + yield r; + } + } + } + async F(e, i, s = Object.create(null)) { + if (i.length > 0) { + return (await this.b.open({ + context: 5, + contextWindowId: e, + urisToOpen: i, + cli: this.h.args, + forceNewWindow: s.forceNewWindow, + forceReuseWindow: s.forceReuseWindow, + preferNewWindow: s.preferNewWindow, + diffMode: s.diffMode, + mergeMode: s.mergeMode, + addMode: s.addMode, + gotoLineMode: s.gotoLineMode, + noRecentEntry: s.noRecentEntry, + waitMarkerFileURI: s.waitMarkerFileURI, + remoteAuthority: s.remoteAuthority || undefined, + forceProfile: s.forceProfile, + forceTempProfile: s.forceTempProfile, + windowInWindow: s.windowInWindow ? this.potentiallyGetParentWindowId(e) : undefined, + windowInWindowBodyClass: s.windowInWindowBodyClass, + shadowWindowForWorkspaceId: s.shadowWindowForWorkspaceId + })).map(r => ({ + windowId: r.id, + parentWindowId: r.parentWindowId + })); + } else { + return []; + } + } + async G(e, i) { + return (await this.b.openEmptyWindow({ + context: 5, + contextWindowId: e + }, i)).map(s => ({ + windowId: s.id, + parentWindowId: s.parentWindowId + })); + } + async isFullScreen(e, i) { + return this.N(i?.targetWindowId, e)?.isFullScreen ?? false; + } + async toggleFullScreen(e, i) { + this.N(i?.targetWindowId, e)?.toggleFullScreen(); + } + async handleTitleDoubleClick(e, i) { + this.N(i?.targetWindowId, e)?.handleTitleDoubleClick(); + } + async getCursorScreenPoint(e) { + const i = Mc.getCursorScreenPoint(); + const s = Mc.getDisplayNearestPoint(i); + return { + point: i, + display: s.bounds + }; + } + async isMaximized(e, i) { + return this.N(i?.targetWindowId, e)?.win?.isMaximized() ?? false; + } + async maximizeWindow(e, i) { + this.N(i?.targetWindowId, e)?.win?.maximize(); + } + async unmaximizeWindow(e, i) { + this.N(i?.targetWindowId, e)?.win?.unmaximize(); + } + async minimizeWindow(e, i) { + this.N(i?.targetWindowId, e)?.win?.minimize(); + } + async moveWindowTop(e, i) { + this.N(i?.targetWindowId, e)?.win?.moveTop(); + } + async positionWindow(e, i, s) { + const r = this.N(s?.targetWindowId, e); + if (r?.win) { + if (r.win.isFullScreen()) { + const n = x.toPromise(x.once(x.fromNodeEventEmitter(r.win, "leave-full-screen"))); + r.win.setFullScreen(false); + await n; + } + r.win.setBounds(i); + } + } + async updateWindowControls(e, i) { + this.N(i?.targetWindowId, e)?.updateWindowControls(i); + } + async focusWindow(e, i) { + const s = this.N(i?.targetWindowId, e); + s?.focus({ + force: i?.force ?? false + }); + if (i?.webContents) { + s?.webContents?.focus(); + } + } + async setMinimumSize(e, i, s) { + const r = this.O(e); + if (r?.win) { + const [n, o] = r.win.getSize(); + const [a, c] = r.win.getMinimumSize(); + const [l, u] = [i ?? a, s ?? c]; + const [d, f] = [Math.max(n, l), Math.max(o, u)]; + if (a !== l || c !== u) { + r.win.setMinimumSize(l, u); + } + if (n !== d || o !== f) { + r.win.setSize(d, f); + } + } + } + async saveWindowSplash(e, i) { + this.n.saveWindowSplash(e, i); + } + async getWindowInWindows(e) { + const i = this.O(e); + const s = this.b.getWindows(); + const r = i?.parentWindowId ? s.find(a => a.id === i.parentWindowId) : i; + if (!r) { + return []; + } + const n = s.filter(a => a.parentWindowId === r.id); + const o = n.some(a => a.isBrowserViewVisible); + return [{ + windowId: r.id, + isRoot: true, + isVisible: !o, + remoteAuthority: r.remoteAuthority, + lastShownAtUnixMs: r.lastShownAtUnixMs + }, ...n.map(a => ({ + windowId: a.id, + isRoot: false, + isVisible: a.isBrowserViewVisible, + remoteAuthority: a.remoteAuthority, + lastShownAtUnixMs: a.lastShownAtUnixMs + }))]; + } + potentiallyGetParentWindowId(e) { + if (false) { + return; + } + const s = this.O(e); + if (s?.parentWindowId) { + return s.parentWindowId; + } else { + return e; + } + } + async showWindowInWindow(e, i) { + const r = (await this.getWindowInWindows(i.windowId)).find(a => a.isVisible); + const n = this.O(i.windowId); + if (n === undefined) { + throw new Error("Window not found"); + } + n.lastShownAtUnixMs = Date.now(); + if (i.explicitBounds && n.browserView) { + n.windowInWindowExplicitBounds = i.explicitBounds; + n.browserView.setBounds(i.explicitBounds); + } + if (n.browserView && n.id !== r?.windowId) { + if (n.parentWindowId) { + const a = this.O(n.parentWindowId); + if (a?.win) { + a.win.contentView.addChildView(n.browserView); + } + if (i.explicitBounds) { + n.windowInWindowExplicitBounds = i.explicitBounds; + n.browserView.setBounds(i.explicitBounds); + } else { + n.windowInWindowExplicitBounds = undefined; + if (a?.win) { + const c = a.win.contentView.getBounds(); + n.browserView.setBounds({ + x: 0, + y: 0, + width: c.width, + height: c.height + }); + } + } + } + n.isBrowserViewVisible = true; + } + if (r && r.windowId !== n.id) { + const a = this.O(r.windowId); + if (a?.browserView) { + if (a.parentWindowId) { + const c = this.O(a.parentWindowId); + if (c?.win) { + c.win.contentView.removeChildView(a.browserView); + } + } + a.isBrowserViewVisible = false; + } + } + if (!i.doNotFocus) { + n.webContents?.focus(); + } + const o = { + id: e4, + from: "menu", + args: [{ + windowId: i.windowId, + forceZoomLevel: i.forceZoomLevel + }] + }; + n.sendWhenReady("vscode:runAction", We.None, o); + } + async runActionInWindow(e, i) { + const s = this.O(i.windowId); + if (s) { + const r = { + id: i.actionId, + from: "menu", + args: [{ + windowId: i.windowId, + ...i.args + }] + }; + s.sendWhenReady("vscode:runAction", We.None, r); + } + } + async replaceShellCommand(e) { + const i = async () => { + const n = Gi(this.h.appRoot, "bin", "code"); + const o = "/usr/local/bin/code"; + if (!(await ee.exists(n))) { + throw new Error(v(2041, null, n)); + } + return { + source: o, + target: n + }; + }; + const { + source: s, + target: r + } = await i(); + try { + const { + symbolicLink: n + } = await jt.stat(s); + if (n && !n.dangling) { + const o = await a2(s); + if (r === o) { + return; + } + } + await jo.promises.unlink(s); + } catch (n) { + if (n.code !== "EACCES" && n.code !== "ENOENT") { + throw n; + } + } + try { + await jo.promises.symlink(r, s); + } catch (n) { + if (n.code !== "EACCES" && n.code !== "ENOENT" && n.code !== "EEXIST") { + throw n; + } + const { + response: o + } = await this.showMessageBox(e, { + type: "info", + message: v(2042, null, this.m.nameShort), + buttons: [v(2043, null), v(2044, null)] + }); + if (o === 0) { + try { + const a = `osascript -e "do shell script \\"mkdir -p /usr/local/bin && ln -sf '${r}' '${s}'\\" with administrator privileges"`; + await Bo(Uo)(a); + } catch { + throw new Error(v(2045, null, s)); + } + } + } + } + async fixWSL() { + try { + const e = Gi(this.h.appRoot); + const i = Gi(this.h.appRoot, "bin"); + const s = i + "\\fixWSLNew.ps1"; + const r = i + "\\server-env-setup"; + console.log(await Bo(Uo)(`powershell.exe -ExecutionPolicy Bypass -File "${s}" -pathToAdd "${e}" -scriptPath "${r}"`)); + } catch (e) { + console.error(e); + } + } + async installShellCommandWindows() { + const e = Gi(this.h.appRoot, "bin"); + try { + const i = process.env.PATH || ""; + const s = j ? ";" : ":"; + const r = await import("@vscode/sudo-prompt"); + const n = e + "\\setPath.ps1"; + if (i.split(s).indexOf(e) === -1) { + console.log(await Bo(r.exec)(`powershell.exe -ExecutionPolicy Bypass -File "${n}" -pathToAdd "${e}"`)); + } + } catch (i) { + console.error(i); + throw new Error(v(2046, null, e)); + } + } + async replaceShellCommandWindows() { + const e = Gi(this.h.appRoot, "bin"); + try { + const i = process.env.PATH || ""; + const s = j ? ";" : ":"; + const r = await import("@vscode/sudo-prompt"); + const n = i.split(s).filter(a => !a.toLowerCase().includes("vs code")).join(s); + const o = e + s + n + s + e; + console.log(process.env); + console.log(process.env.PATH); + console.log(n); + console.log(o); + if (o !== i) { + console.log(await Bo(r.exec)(`setx /M PATH "${o}"`)); + } + } catch (i) { + console.error(i); + throw new Error(v(2047, null)); + } + } + async installShellCommand(e) { + const { + source: i, + target: s + } = await this.H(); + try { + const { + symbolicLink: r + } = await jt.stat(i); + if (r && !r.dangling) { + const n = await a2(i); + if (s === n) { + return; + } + } + await jo.promises.unlink(i); + } catch (r) { + if (r.code !== "EACCES" && r.code !== "ENOENT") { + throw r; + } + } + try { + await jo.promises.symlink(s, i); + } catch (r) { + if (r.code !== "EACCES" && r.code !== "ENOENT" && r.code !== "EEXIST") { + throw r; + } + const { + response: n + } = await this.showMessageBox(e, { + type: "info", + message: v(2048, null, this.m.nameShort), + buttons: [v(2049, null), v(2050, null)] + }); + if (n === 1) { + throw new hi(); + } + try { + const o = `osascript -e "do shell script \\"mkdir -p /usr/local/bin && ln -sf '${s}' '${i}'\\" with administrator privileges"`; + await Bo(Uo)(o); + } catch { + throw new Error(v(2051, null, i)); + } + } + } + async uninstallShellCommand(e) { + const { + source: i + } = await this.H(); + try { + await jo.promises.unlink(i); + } catch (s) { + switch (s.code) { + case "EACCES": + { + const { + response: r + } = await this.showMessageBox(e, { + type: "info", + message: v(2052, null, this.m.nameShort), + buttons: [v(2053, null), v(2054, null)] + }); + if (r === 1) { + throw new hi(); + } + try { + const n = `osascript -e "do shell script \\"rm '${i}'\\" with administrator privileges"`; + await Bo(Uo)(n); + } catch { + throw new Error(v(2055, null, i)); + } + break; + } + case "ENOENT": + break; + default: + throw s; + } + } + } + async H() { + const e = Gi(this.h.appRoot, "bin", "code"); + const i = `/usr/local/bin/${this.m.applicationName}`; + if (!(await ee.exists(e))) { + throw new Error(v(2056, null, e)); + } + return { + source: i, + target: e + }; + } + async showMessageBox(e, i) { + const s = this.N(i?.targetWindowId, e); + let r = s?.win ?? undefined; + if (s && "browserView" in s && s.browserView !== undefined) { + const n = s; + if (n.isBrowserViewVisible) { + const o = this.O(n.parentWindowId); + if (o) { + r = o.win ?? undefined; + } + } else { + throw new Error("Dialogs are skipped in hidden window-in-windows"); + } + } + return this.f.showMessageBox(i, r); + } + async showSaveDialog(e, i) { + const s = this.N(i?.targetWindowId, e); + return this.f.showSaveDialog(i, s?.win ?? undefined); + } + async showOpenDialog(e, i) { + const s = this.N(i?.targetWindowId, e); + return this.f.showOpenDialog(i, s?.win ?? undefined); + } + async pickFileFolderAndOpen(e, i) { + const s = await this.f.pickFileFolder(i); + if (s) { + await this.I(await Promise.all(s.map(async r => (await jt.existsDirectory(r)) ? { + folderUri: P.file(r) + } : { + fileUri: P.file(r) + })), i, e); + } + } + async pickFolderAndOpen(e, i) { + const s = await this.f.pickFolder(i); + if (s) { + await this.I(s.map(r => ({ + folderUri: P.file(r) + })), i, e); + } + } + async pickFolder(e, i) { + return await this.f.pickFolder(i); + } + async pickFileAndOpen(e, i) { + const s = await this.f.pickFile(i); + if (s) { + await this.I(s.map(r => ({ + fileUri: P.file(r) + })), i, e); + } + } + async pickWorkspaceAndOpen(e, i) { + const s = await this.f.pickWorkspace(i); + if (s) { + await this.I(s.map(r => ({ + workspaceUri: P.file(r) + })), i, e); + } + } + async I(e, i, s) { + await this.b.open({ + context: 3, + contextWindowId: s, + cli: this.h.args, + urisToOpen: e, + forceNewWindow: i.forceNewWindow + }); + } + async showItemInFolder(e, i) { + kn.showItemInFolder(i); + } + async setRepresentedFilename(e, i, s) { + this.N(s?.targetWindowId, e)?.setRepresentedFilename(i); + } + async setDocumentEdited(e, i, s) { + this.N(s?.targetWindowId, e)?.setDocumentEdited(i); + } + async openExternal(e, i, s) { + this.h.unsetSnapExportedVariables(); + try { + if (GE(i, R.http, R.https)) { + this.J(i, s); + } else { + kn.openExternal(i); + } + } finally { + this.h.restoreSnapExportedVariables(); + } + return true; + } + async J(e, i) { + const s = i ?? this.r.getValue("workbench.externalBrowser"); + if (!s) { + return kn.openExternal(e); + } + if ((s.includes(ae.sep) || s.includes(Ge.sep)) && !(await ee.exists(s))) { + this.j.error(`Configured external browser path does not exist: ${s}`); + return kn.openExternal(e); + } + try { + const { + default: r + } = await import("open"); + const n = await r(e, { + app: { + name: Object.hasOwn(r.apps, s) ? r.apps[s] : s + } + }); + if (!j) { + n.stderr?.once("data", o => { + this.j.error(`Error openening external URL '${e}' using browser '${s}': ${o.toString()}`); + return kn.openExternal(e); + }); + } + } catch (r) { + this.j.error(`Unable to open external URL '${e}' using browser '${s}' due to ${r}.`); + return kn.openExternal(e); + } + } + moveItemToTrash(e, i) { + return kn.trashItem(i); + } + async isAdmin() { + let e; + if (j) { + e = (await import("native-is-elevated")).default(); + } else { + e = process.getuid?.() === 0; + } + return e; + } + async writeElevated(e, i, s, r) { + const n = await import("@vscode/sudo-prompt"); + const o = qa(this.h.userDataPath, "code-elevated"); + await ee.writeFile(o, JSON.stringify({ + source: i.fsPath, + target: s.fsPath + })); + try { + await new Promise((a, c) => { + const l = [`"${this.L}"`]; + if (r?.unlock) { + l.push("--file-chmod"); + } + l.push("--file-write", `"${o}"`); + const u = { + name: this.m.nameLong.replace("-", ""), + icns: N && this.h.isBuilt ? F(Xe(this.h.appRoot), `${this.m.nameShort}.icns`) : undefined + }; + this.j.trace(`[sudo-prompt] running command: ${l.join(" ")}`); + n.exec(l.join(" "), u, (d, f, p) => { + if (f) { + this.j.trace(`[sudo-prompt] received stdout: ${f}`); + } + if (p) { + this.j.error(`[sudo-prompt] received stderr: ${p}`); + } + if (d) { + c(d); + } else { + a(undefined); + } + }); + }); + } finally { + await jo.promises.unlink(o); + } + } + async isRunningUnderARM64Translation() { + if (Se || j) { + return false; + } else { + return Oc.runningUnderARM64Translation; + } + } + get L() { + if (j) { + if (this.h.isBuilt) { + return F(Xe(process.execPath), "bin", `${this.m.applicationName}.cmd`); + } else { + return F(this.h.appRoot, "scripts", "code-cli.bat"); + } + } else if (Se) { + if (this.h.isBuilt) { + return F(Xe(process.execPath), "bin", `${this.m.applicationName}`); + } else { + return F(this.h.appRoot, "scripts", "code-cli.sh"); + } + } else if (this.h.isBuilt) { + return F(this.h.appRoot, "bin", "code"); + } else { + return F(this.h.appRoot, "scripts", "code-cli.sh"); + } + } + async getOSStatistics() { + return { + totalmem: G$(), + freemem: q$(), + loadavg: z$() + }; + } + async getOSProperties() { + return { + arch: U$(), + platform: H$(), + release: V$(), + type: J$(), + cpus: B$() + }; + } + async getOSVirtualMachineHint() { + return Oh.value(); + } + async getOSColorScheme() { + return this.n.getColorScheme(); + } + async hasWSLFeatureInstalled() { + return j && A$(); + } + async getScreenshot(e, i) { + return (await this.N(i?.targetWindowId, e)?.win?.webContents.capturePage())?.toJPEG(95); + } + async getProcessId(e) { + return this.N(undefined, e)?.win?.webContents.getOSProcessId(); + } + async killProcess(e, i, s) { + process.kill(i, s); + } + async readClipboardText(e, i) { + return Rr.readText(i); + } + async readImage() { + return Rr.readImage().toPNG(); + } + async writeClipboardText(e, i, s) { + return Rr.writeText(i, s); + } + async readClipboardFindText(e) { + return Rr.readFindText(); + } + async writeClipboardFindText(e, i) { + return Rr.writeFindText(i); + } + async writeClipboardBuffer(e, i, s, r) { + return Rr.writeBuffer(i, Buffer.from(s.buffer), r); + } + async readClipboardBuffer(e, i) { + return z.wrap(Rr.readBuffer(i)); + } + async hasClipboard(e, i, s) { + return Rr.has(i, s); + } + async newWindowTab() { + await this.b.open({ + context: 5, + cli: this.h.args, + forceNewTabbedWindow: true, + forceEmpty: true, + remoteAuthority: this.h.args.remote || undefined + }); + } + async showPreviousWindowTab() { + Lc.sendActionToFirstResponder("selectPreviousTab:"); + } + async showNextWindowTab() { + Lc.sendActionToFirstResponder("selectNextTab:"); + } + async moveWindowTabToNewWindow() { + Lc.sendActionToFirstResponder("moveTabToNewWindow:"); + } + async mergeAllWindowTabs() { + Lc.sendActionToFirstResponder("mergeAllWindows:"); + } + async toggleWindowTabsBar() { + Lc.sendActionToFirstResponder("toggleTabBar:"); + } + async updateTouchBar(e, i) { + this.O(e)?.updateTouchBar(i); + } + async notifyReady(e) { + this.O(e)?.setReady(); + } + async relaunch(e, i) { + return this.g.relaunch(i); + } + async reload(e, i) { + const s = this.O(e); + if (s) { + if (Kt(s.openedWorkspace)) { + const r = s.openedWorkspace.configPath; + if (r.scheme === R.file && (await this.q.resolveLocalWorkspace(r))?.transient) { + await this.openWindow(s.id, { + forceReuseWindow: true + }); + return; + } + } + return this.g.reload(s, i?.disableExtensions !== undefined || i?.hmr !== undefined ? { + _: [], + "disable-extensions": i.disableExtensions, + hmr: i.hmr + } : undefined); + } + } + async destroyWindowNoFallback(e, i) { + return this.O(i?.targetWindowId)?.win?.destroy(); + } + async closeWindowNoFallback(e, i) { + return this.O(i?.targetWindowId)?.close(); + } + async closeWindow(e, i) { + return this.N(i?.targetWindowId, e)?.win?.close(); + } + async quit(e) { + const i = this.b.getLastActiveWindow(); + if (i?.isExtensionDevelopmentHost && this.b.getWindowCount() > 1 && i.win) { + i.win.close(); + } else { + this.g.quit(); + } + } + async exit(e, i) { + await this.g.kill(i); + } + async resolveProxy(e, i) { + if (this.h.extensionTestsLocationURI) { + const n = this.r.getValue("integration-test.http.proxy"); + if (n) { + return n; + } + } + return this.O(e)?.win?.webContents?.session?.resolveProxy(i); + } + async lookupAuthorization(e, i) { + return this.t.lookupAuthorization(i); + } + async lookupKerberosAuthorization(e, i) { + return this.s.lookupKerberosAuthorization(i); + } + async loadCertificates(e) { + return this.s.loadCertificates(); + } + findFreePort(e, i, s, r, n = 1) { + return k$(i, s, r, n); + } + async openDevTools(e, i) { + this.N(i?.targetWindowId, e)?.webContents?.openDevTools(i?.mode ? { + mode: i.mode, + activate: i.activate + } : undefined); + } + async toggleDevTools(e, i) { + this.N(i?.targetWindowId, e)?.webContents?.toggleDevTools(); + } + async openGPUInfoWindow(e) { + const i = this.O(e); + if (i) { + if (typeof this.M != "number") { + const s = this.u.invokeFunction(rh, Ar(), { + forceNativeTitlebar: true, + hideBecauseShadowWindow: false + }); + s.backgroundColor = undefined; + const r = new Nh(s); + r.setMenuBarVisibility(false); + r.loadURL("chrome://gpu"); + r.once("ready-to-show", () => r.show()); + r.once("close", () => this.M = undefined); + i.win?.on("close", () => { + if (this.M) { + Nh.fromId(this.M)?.close(); + this.M = undefined; + } + }); + this.M = r.id; + } + if (typeof this.M == "number") { + const s = Nh.fromId(this.M); + if (s?.isMinimized()) { + s?.restore(); + } + s?.focus(); + } + } + } + async openDevToolsWindow(e, i) { + if (!this.O(e)) { + return; + } + const r = this.u.invokeFunction(rh, Ar(), { + forceNativeTitlebar: true, + hideBecauseShadowWindow: false + }); + r.backgroundColor = undefined; + const n = new Nh(r); + n.setMenuBarVisibility(false); + n.loadURL(i); + n.once("ready-to-show", () => n.show()); + } + async reloadWindowCSS(e) { + const i = this.O(e); + if (!i || !i.win) { + throw new Error(); + } + if (!this.z.isEnabled) { + throw new Error("CSS Dev is not enabled"); + } + const s = await this.z.getCssModules(true); + if (i.config) { + i.config.cssModules = s; + } + return Object.fromEntries(s); + } + async profileRenderer(e, i, s) { + const r = this.O(e); + if (!r || !r.win) { + throw new Error(); + } + return await new Lh(r.win, i, this.j).inspect(s); + } + async windowsGetStringRegKey(e, i, s, r) { + if (!j) { + return; + } + const n = await import("@vscode/windows-registry"); + try { + return n.GetStringRegKey(i, s, r); + } catch { + return; + } + } + N(e, i) { + return this.O(e) ?? this.P(e) ?? this.O(i); + } + O(e) { + if (typeof e == "number") { + return this.b.getWindowById(e); + } + } + P(e) { + if (typeof e != "number") { + return; + } + const i = j$.fromId(e); + if (i) { + return this.c.getWindowByWebContents(i); + } + } + }; + __decorate([de], Fc.prototype, "L", null); + Fc = __decorate([__param(0, dt), __param(1, To), __param(2, nr), __param(3, Te), __param(4, ot), __param(5, V), __param(6, Ve), __param(7, Eo), __param(8, Cr), __param(9, Je), __param(10, Sn), __param(11, oh), __param(12, Ss), __param(13, Wo)], Fc); + } + }); + var Wc; + var Wh = g({ + "out-build/vs/platform/protocol/electron-main/protocol.js"() { + "use strict"; + + Y(); + Wc = q("protocolMainService"); + } + }); + import { BrowserWindow as Og, contentTracing as Tc, screen as jc } from "electron"; + function K$(t) { + if (typeof t != "object" || t === null) { + return false; + } else { + return "x" in t && "y" in t && "width" in t && "height" in t; + } + } + var Lg; + var Mg; + var Th; + var Z$ = g({ + "out-build/vs/platform/process/electron-main/processMainService.js"() { + "use strict"; + + gi(); + M(); + Ie(); + H(); + b2(); + as(); + be(); + K1(); + y5(); + wn(); + vt(); + Cc(); + X(); + Nc(); + gc(); + ht(); + Wh(); + Ti(); + _o(); + fn(); + Mg = "issue.processExplorerWindowState"; + Th = class { + static { + Lg = this; + } + static { + this.a = "#1E1E1E"; + } + constructor(e, i, s, r, n, o, a, c, l, u, d) { + this.f = e; + this.g = i; + this.h = s; + this.i = r; + this.j = n; + this.k = o; + this.l = a; + this.m = c; + this.n = l; + this.o = u; + this.p = d; + this.b = null; + this.c = null; + this.d = false; + this.q(); + } + q() { + it.on("vscode:listProcesses", async e => { + const i = []; + try { + i.push({ + name: v(2057, null), + rootProcess: await Pg(process.pid) + }); + (await this.j.getRemoteDiagnostics({ + includeProcesses: true + })).forEach(r => { + if (G1(r)) { + i.push({ + name: r.hostName, + rootProcess: r + }); + } else if (r.processes) { + i.push({ + name: r.hostName, + rootProcess: r.processes + }); + } + }); + } catch (s) { + this.h.error(`Listing processes failed: ${s}`); + } + this.u(e, "vscode:listProcessesResponse", i); + }); + it.on("vscode:workbenchCommand", (e, i) => { + const { + id: s, + from: r, + args: n + } = i; + let o; + switch (r) { + case "processExplorer": + o = this.c; + break; + default: + throw new Error(`Unexpected command source: ${r}`); + } + o?.webContents.send("vscode:runAction", { + id: s, + from: r, + args: n + }); + }); + it.on("vscode:closeProcessExplorer", e => { + this.b?.close(); + }); + it.on("vscode:pidToNameRequest", async e => { + const i = await this.j.getMainDiagnostics(); + const s = []; + for (const r of i.windows) { + s.push([r.pid, `window [${r.id}] (${r.title})`]); + } + for (const { + pid: r, + name: n + } of _r.getAll()) { + s.push([r, n]); + } + this.u(e, "vscode:pidToNameResponse", s); + }); + } + async openProcessExplorer(e) { + if (!this.b && (this.c = Og.getFocusedWindow(), this.c)) { + const i = new De(); + const s = i.add(this.m.createIPCObjectUrl()); + const r = this.o.getItem(Mg, undefined); + const n = K$(r) ? r : this.s(this.c, 800, 500); + this.b = this.t(n, s, { + backgroundColor: e.styles.backgroundColor, + title: v(2058, null), + zoomLevel: e.zoomLevel, + alwaysOnTop: true + }, "process-explorer"); + s.update({ + appRoot: this.g.appRoot, + windowId: this.b.id, + userEnv: this.f, + data: e, + product: ko, + nls: { + messages: Tf(), + language: Ll() + }, + cssModules: this.p.isEnabled ? await this.p.getCssModules() : undefined + }); + this.b.loadURL(Ct.asBrowserUri(`vs/code/electron-sandbox/processExplorer/processExplorer${this.g.isBuilt ? "" : "-dev"}.html`).toString(true)); + this.b.on("close", () => { + this.b = null; + i.dispose(); + }); + this.c.on("close", () => { + if (this.b) { + this.b.close(); + this.b = null; + i.dispose(); + } + }); + const o = () => { + if (!this.b) { + return; + } + const a = this.b.getSize(); + const c = this.b.getPosition(); + if (!a || !c) { + return; + } + const l = { + width: a[0], + height: a[1], + x: c[0], + y: c[1] + }; + this.o.setItem(Mg, l); + }; + this.b.on("moved", o); + this.b.on("resized", o); + } + if (this.b) { + this.r(this.b); + } + } + r(e) { + if (e.isMinimized()) { + e.restore(); + } + e.focus(); + } + s(e, i, s) { + let r; + const n = jc.getAllDisplays(); + if (n.length === 1) { + r = n[0]; + } else { + if (N) { + const c = jc.getCursorScreenPoint(); + r = jc.getDisplayNearestPoint(c); + } + if (!r && e) { + r = jc.getDisplayMatching(e.getBounds()); + } + r ||= jc.getPrimaryDisplay() || n[0]; + } + const o = r.bounds; + const a = { + width: i, + height: s, + x: o.x + o.width / 2 - i / 2, + y: o.y + o.height / 2 - s / 2 + }; + if (o.width > 0 && o.height > 0) { + if (a.x < o.x) { + a.x = o.x; + } + if (a.y < o.y) { + a.y = o.y; + } + if (a.x > o.x + o.width) { + a.x = o.x; + } + if (a.y > o.y + o.height) { + a.y = o.y; + } + if (a.width > o.width) { + a.width = o.width; + } + if (a.height > o.height) { + a.height = o.height; + } + } + return a; + } + async isProfilerRunning() { + return this.d; + } + async startProfilerCPU() { + if (this.d) { + return; + } + this.d = true; + const e = this.g.args; + const i = { + categoryFilter: e["trace-category-filter"] || "-*,disabled-by-default-v8.cpu_profile*", + traceOptions: e["trace-options"] || "record-until-full,enable-sampling" + }; + await Tc.startRecording(i); + } + async startProfilerMemory() { + if (this.d) { + return; + } + this.d = true; + const i = this.g.args["trace-category-filter"]?.split(",") || []; + i.push("disabled-by-default-memory-infra", "disabled-by-default-memory-infra.v8.code_stats"); + const s = { + included_categories: i, + excluded_categories: ["*"], + memory_dump_config: { + allowed_dump_modes: ["light", "detailed"], + triggers: [{ + type: "periodic_interval", + mode: "detailed", + min_time_between_dumps_ms: 10000 + }, { + type: "periodic_interval", + mode: "light", + min_time_between_dumps_ms: 1000 + }] + } + }; + await Tc.startRecording(s); + } + async startProfilerGC() { + if (this.d) { + return; + } + this.d = true; + const e = this.g.args; + const i = { + categoryFilter: e["trace-category-filter"] || "-*,disabled-by-default-v8.gc_stats", + traceOptions: e["trace-options"] || "record-until-full,enable-sampling" + }; + await Tc.startRecording(i); + } + async stopProfiler() { + if (!this.d) { + return; + } + this.d = false; + const e = `${qa(this.g.userHome.fsPath, this.n.applicationName)}-${this.n.commit ?? "dev"}.profile.txt`; + const i = await Tc.stopRecording(e); + this.l.showItemInFolder(undefined, i); + } + async stopTracing() { + if (!this.g.args.trace) { + return; + } + const e = await Tc.stopRecording(`${qa(this.g.userHome.fsPath, this.n.applicationName)}.trace.txt`); + await this.k.showMessageBox({ + type: "info", + message: v(2059, null), + detail: v(2060, null, e), + buttons: [v(2061, null)] + }, Og.getFocusedWindow() ?? undefined); + this.l.showItemInFolder(undefined, e); + } + async getSystemStatus() { + const [e, i] = await Promise.all([this.j.getMainDiagnostics(), this.j.getRemoteDiagnostics({ + includeProcesses: false, + includeWorkspaceMetadata: false + })]); + return this.i.getDiagnostics(e, i); + } + async $getSystemInfo() { + const [e, i] = await Promise.all([this.j.getMainDiagnostics(), this.j.getRemoteDiagnostics({ + includeProcesses: false, + includeWorkspaceMetadata: false + })]); + return await this.i.getSystemInfo(e, i); + } + async $getPerformanceInfo() { + try { + const [e, i] = await Promise.all([this.j.getMainDiagnostics(), this.j.getRemoteDiagnostics({ + includeProcesses: true, + includeWorkspaceMetadata: true + })]); + return await this.i.getPerformanceInfo(e, i); + } catch (e) { + this.h.warn("issueService#getPerformanceInfo ", e.message); + throw e; + } + } + t(e, i, s, r) { + const n = { + fullscreen: false, + skipTaskbar: false, + resizable: true, + width: e.width, + height: e.height, + minWidth: 300, + minHeight: 200, + x: e.x, + y: e.y, + title: s.title, + backgroundColor: s.backgroundColor || Lg.a, + webPreferences: { + preload: Ct.asFileUri("vs/base/parts/sandbox/electron-sandbox/preload.js").fsPath, + additionalArguments: [`--vscode-window-config=${i.resource.toString()}`], + v8CacheOptions: this.g.useCodeCache ? "bypassHeatCheck" : "none", + enableWebSQL: false, + spellcheck: false, + zoomFactor: R4(s.zoomLevel), + sandbox: true + }, + alwaysOnTop: s.alwaysOnTop, + experimentalDarkMode: true + }; + const o = new Og(n); + o.setMenuBarVisibility(false); + return o; + } + u(e, i, ...s) { + if (!e.sender.isDestroyed()) { + e.sender.send(i, ...s); + } + } + async closeProcessExplorer() { + this.b?.close(); + } + }; + Th = Lg = __decorate([__param(1, ot), __param(2, V), __param(3, J1), __param(4, vh), __param(5, nr), __param(6, Or), __param(7, Wc), __param(8, Ve), __param(9, Oi), __param(10, Wo)], Th); + } + }); + function W2(t) { + const e = t.getKeyMap(); + const i = t.getCurrentKeyboardLayout(); + return { + keyboardMapping: e, + keyboardLayoutInfo: i + }; + } + var Fg; + var jh; + var Y$ = g({ + "out-build/vs/platform/keyboardLayout/electron-main/keyboardLayoutMainService.js"() { + "use strict"; + + H(); + B(); + M(); + Y(); + ct(); + Fg = q("keyboardLayoutMainService"); + jh = class extends T { + constructor(e) { + super(); + this.a = this.D(new $()); + this.onDidChangeKeyboardLayout = this.a.event; + this.b = null; + this.c = null; + e.when(3).then(() => this.f()); + } + f() { + this.b ||= this.g(); + return this.b; + } + async g() { + const e = await import("native-keymap"); + this.c = W2(e); + if (!tw) { + e.onDidChangeKeyboardLayout(() => { + this.c = W2(e); + this.a.fire(this.c); + }); + } + } + async getKeyboardLayoutData() { + await this.f(); + return this.c; + } + }; + jh = __decorate([__param(0, Te)], jh); + } + }); + var Uc; + var T2 = g({ + "out-build/vs/platform/url/common/url.js"() { + "use strict"; + + Y(); + Uc = q("urlService"); + } + }); + import { app as X$ } from "electron"; + var j2; + var Ng; + var Uh; + var Q$ = g({ + "out-build/vs/platform/launch/electron-main/launchMainService.js"() { + "use strict"; + + zt(); + H(); + se(); + _t(); + Ke(); + kc(); + Y(); + X(); + T2(); + Lt(); + j2 = "launchMainService"; + Ng = q(j2); + Uh = class { + constructor(e, i, s, r) { + this.a = e; + this.b = i; + this.c = s; + this.d = r; + } + async start(e, i) { + this.a.trace("Received data from other instance: ", e, i); + if (N) { + X$.focus({ + steal: true + }); + } + const s = this.e(e); + if (s.length) { + let r = Promise.resolve(); + if (this.b.getWindowCount() === 0) { + const n = (await this.b.openEmptyWindow({ + context: 4 + })).at(0); + if (n) { + r = n.ready(); + } + } + r.then(() => { + for (const { + uri: n, + originalUrl: o + } of s) { + this.c.open(n, { + originalUrl: o + }); + } + }); + } else { + return this.f(e, i); + } + } + e(e) { + if (e["open-url"] && e._urls && e._urls.length > 0) { + return $t(e._urls.map(i => { + try { + return { + uri: P.parse(i), + originalUrl: i + }; + } catch { + return null; + } + })); + } else { + return []; + } + } + async f(e, i) { + const s = bn(i) ? 0 : 4; + let r = []; + const n = e.wait && e.waitMarkerFilePath ? P.file(e.waitMarkerFilePath) : undefined; + const o = e.remote || undefined; + const a = { + context: s, + cli: e, + userEnv: e["preserve-env"] || s === 0 ? i : undefined, + waitMarkerFileURI: n, + remoteAuthority: o, + forceProfile: e.profile, + forceTempProfile: e["profile-temp"] + }; + if (e.extensionDevelopmentPath) { + await this.b.openExtensionDevelopmentHostWindow(e.extensionDevelopmentPath, a); + } else if (!e._.length && !e["folder-uri"] && !e["file-uri"]) { + let c = false; + if (e["new-window"] || a.forceProfile || a.forceTempProfile) { + c = true; + } else if (e["reuse-window"]) { + c = false; + } else { + switch (this.d.getValue("window")?.openWithoutArgumentsInNewWindow || "default") { + case "on": + c = true; + break; + case "off": + c = false; + break; + default: + c = !N; + } + } + if (c) { + r = await this.b.open({ + ...a, + forceNewWindow: true, + forceEmpty: true + }); + } else { + const l = this.b.getLastActiveWindow(); + if (l) { + this.b.openExistingWindow(l, a); + r = [l]; + } else { + r = await this.b.open({ + ...a, + forceEmpty: true + }); + } + } + } else { + r = await this.b.open({ + ...a, + forceNewWindow: e["new-window"], + preferNewWindow: !e["reuse-window"] && !e.wait, + forceReuseWindow: e["reuse-window"], + diffMode: e.diff, + mergeMode: e.merge, + addMode: e.add, + noRecentEntry: !!e["skip-add-to-recently-opened"], + gotoLineMode: e.goto + }); + } + if (n && r.length === 1 && r[0]) { + return Promise.race([r[0].whenClosedOrLoaded, wk(n.fsPath)]).then(() => {}, () => {}); + } + } + async getMainProcessId() { + this.a.trace("Received request for process ID from other instance."); + return process.pid; + } + }; + Uh = __decorate([__param(0, V), __param(1, dt), __param(2, Uc), __param(3, Je)], Uh); + } + }); + function U2(t) { + return t.submenu !== undefined; + } + function B2(t) { + return t.id === "vscode.menubar.separator"; + } + function q2(t) { + return t.uri !== undefined; + } + function eI(t) { + return !U2(t) && !B2(t) && !q2(t); + } + var tI = g({ + "out-build/vs/platform/menubar/common/menubar.js"() { + "use strict"; + } + }); + var z2; + var H2; + var V2; + var fe; + var xn; + var Lr = g({ + "out-build/vs/platform/update/common/update.js"() { + "use strict"; + + _e(); + Y(); + (function (t) { + t.Uninitialized = "uninitialized"; + t.Idle = "idle"; + t.Disabled = "disabled"; + t.CheckingForUpdates = "checking for updates"; + t.AvailableForDownload = "available for download"; + t.Downloading = "downloading"; + t.Downloaded = "downloaded"; + t.Updating = "updating"; + t.Ready = "ready"; + })(z2 ||= {}); + (function (t) { + t[t.Setup = 0] = "Setup"; + t[t.Archive = 1] = "Archive"; + t[t.Snap = 2] = "Snap"; + })(H2 ||= {}); + (function (t) { + t[t.NotBuilt = 0] = "NotBuilt"; + t[t.DisabledByEnvironment = 1] = "DisabledByEnvironment"; + t[t.ManuallyDisabled = 2] = "ManuallyDisabled"; + t[t.MissingConfiguration = 3] = "MissingConfiguration"; + t[t.InvalidConfiguration = 4] = "InvalidConfiguration"; + t[t.RunningAsAdmin = 5] = "RunningAsAdmin"; + })(V2 ||= {}); + fe = { + Uninitialized: { + type: "uninitialized" + }, + Disabled: t => ({ + type: "disabled", + reason: t + }), + Idle: (t, e) => ({ + type: "idle", + updateType: t, + error: e + }), + CheckingForUpdates: t => ({ + type: "checking for updates", + explicit: t + }), + AvailableForDownload: t => ({ + type: "available for download", + update: t + }), + Downloading: { + type: "downloading" + }, + Downloaded: t => ({ + type: "downloaded", + update: t + }), + Updating: t => ({ + type: "updating", + update: t + }), + Ready: t => ({ + type: "ready", + update: t + }) + }; + xn = q("updateService"); + } + }); + function Bh(t) { + if (!t) { + return; + } + const e = t.split("+"); + if (e.length < 2) { + return; + } + const i = e[0]; + if (!i || i !== "background-composer") { + return; + } + const s = e[1]; + if (s && (!!s.startsWith("bc-") || !!s.startsWith("pod-"))) { + return s; + } + } + var Wg = g({ + "out-build/vs/base/common/bcIdFromAuthority.js"() { + "use strict"; + } + }); + import { app as Dn } from "electron"; + var Ui; + var Bc; + var qh; + var zh = g({ + "out-build/vs/platform/workspaces/electron-main/workspacesHistoryMainService.js"() { + "use strict"; + + zt(); + ce(); + B(); + Sr(); + M(); + Ie(); + H(); + nt(); + se(); + _t(); + be(); + Y(); + ct(); + X(); + eh(); + sg(); + ri(); + vn(); + $i(); + wn(); + Wg(); + Bc = q("workspacesHistoryMainService"); + qh = class extends T { + static { + Ui = this; + } + static { + this.a = 500; + } + static { + this.b = "history.recentlyOpenedPathsList"; + } + constructor(e, i, s, r, n) { + super(); + this.f = e; + this.g = i; + this.h = s; + this.j = r; + this.m = n; + this.c = this.D(new $()); + this.onDidChangeRecentlyOpened = this.c.event; + this.H = this.D(new Ys(800)); + this.n(); + } + n() { + this.h.when(4).then(() => this.I()); + this.D(this.g.onDidEnterWorkspace(e => this.addRecentlyOpened([{ + workspace: e.workspace, + remoteAuthority: e.window.remoteAuthority + }]))); + } + async addRecentlyOpened(e) { + let i = []; + let s = []; + for (const n of e) { + if (Bh(n.remoteAuthority) === undefined) { + if (tg(n)) { + if (!this.g.isUntitledWorkspace(n.workspace) && !this.u(i, n.workspace)) { + i.push(n); + } + } else if (gh(n)) { + if (!this.w(i, n.folderUri)) { + i.push(n); + } + } else { + const o = this.y(s, n.fileUri); + const a = n.fileUri.scheme === R.file && Ui.G.indexOf(ks(n.fileUri)) >= 0; + if (!o && !a) { + s.push(n); + if (j && n.fileUri.scheme === R.file) { + Dn.addRecentDocument(n.fileUri.fsPath); + } + } + } + } + } + const r = await this.q({ + workspaces: i, + files: s + }); + i = r.workspaces; + s = r.files; + if (i.length > Ui.a) { + i.length = Ui.a; + } + if (s.length > Ui.a) { + s.length = Ui.a; + } + await this.s({ + workspaces: i, + files: s + }); + this.c.fire(); + if (N) { + this.H.trigger(() => this.N()); + } + } + async removeRecentlyOpened(e) { + const i = o => { + const a = this.t(o); + for (const c of e) { + if (tt.isEqual(c, a)) { + return false; + } + } + return true; + }; + const s = await this.getRecentlyOpened(); + const r = s.workspaces.filter(i); + const n = s.files.filter(i); + if (r.length !== s.workspaces.length || n.length !== s.files.length) { + await this.s({ + files: n, + workspaces: r + }); + this.c.fire(); + if (N) { + this.H.trigger(() => this.N()); + } + } + } + async clearRecentlyOpened(e) { + if (e?.confirm) { + const { + response: i + } = await this.m.showMessageBox({ + type: "warning", + buttons: [v(2534, null), v(2535, null)], + message: v(2536, null), + detail: v(2537, null), + cancelId: 1 + }); + if (i !== 0) { + return; + } + } + await this.s({ + workspaces: [], + files: [] + }); + Dn.clearRecentDocuments(); + this.c.fire(); + } + async getRecentlyOpened() { + return this.q(); + } + async q(e) { + const i = new Ht(n => tt.getComparisonKey(n)); + if (e?.workspaces) { + for (const n of e.workspaces) { + i.set(this.t(n), n); + } + } + const s = new Ht(n => tt.getComparisonKey(n)); + if (e?.files) { + for (const n of e.files) { + s.set(this.t(n), n); + } + } + const r = await this.r(); + for (const n of r.workspaces) { + if (Bh(n.remoteAuthority) !== undefined) { + continue; + } + const o = i.get(this.t(n)); + if (o) { + o.label = o.label ?? n.label; + } else { + i.set(this.t(n), n); + } + } + for (const n of r.files) { + const o = s.get(this.t(n)); + if (o) { + o.label = o.label ?? n.label; + } else { + s.set(this.t(n), n); + } + } + return { + workspaces: [...i.values()], + files: [...s.values()] + }; + } + async r() { + await this.j.whenReady; + let e; + const i = this.j.get(Ui.b, -1); + if (typeof i == "string") { + try { + e = JSON.parse(i); + } catch (s) { + this.f.error("Unexpected error parsing opened paths list", s); + } + } + return qD(e, this.f); + } + async s(e) { + await this.j.whenReady; + this.j.store(Ui.b, JSON.stringify(zD(e)), -1, 1); + } + t(e) { + if (gh(e)) { + return e.folderUri; + } else if (FD(e)) { + return e.fileUri; + } else { + return e.workspace.configPath; + } + } + u(e, i) { + return !!e.find(s => tg(s) && s.workspace.id === i.id); + } + w(e, i) { + return !!e.find(s => gh(s) && tt.isEqual(s.folderUri, i)); + } + y(e, i) { + return !!e.find(s => tt.isEqual(s.fileUri, i)); + } + static { + this.z = 7; + } + static { + this.C = 10; + } + static { + this.F = 7; + } + static { + this.G = ["COMMIT_EDITMSG", "MERGE_MSG", "git-rebase-todo"]; + } + async I() { + if (j) { + await this.J(); + this.D(this.onDidChangeRecentlyOpened(() => this.J())); + } + } + async J() { + if (!j) { + return; + } + const e = []; + e.push({ + type: "tasks", + items: [{ + type: "task", + title: v(2538, null), + description: v(2539, null), + program: process.execPath, + args: "-n", + iconPath: process.execPath, + iconIndex: 0 + }] + }); + if ((await this.getRecentlyOpened()).workspaces.length > 0) { + const i = []; + for (const n of Dn.getJumpListSettings().removedItems) { + const o = n.args; + if (o) { + const a = /^--(folder|file)-uri\s+"([^"]+)"$/.exec(o); + if (a) { + i.push(P.parse(a[2])); + } + } + } + await this.removeRecentlyOpened(i); + let s = false; + const r = $t((await this.getRecentlyOpened()).workspaces.slice(0, Ui.F).map(n => { + const o = tg(n) ? n.workspace : n.folderUri; + const { + title: a, + description: c + } = this.L(o, n.label); + let l; + if (P.isUri(o)) { + l = `--folder-uri "${o.toString()}"`; + } else { + s = true; + l = `--file-uri "${o.configPath.toString()}"`; + } + return { + type: "task", + title: a.substr(0, 255), + description: c.substr(0, 255), + program: process.execPath, + args: l, + iconPath: "explorer.exe", + iconIndex: 0 + }; + })); + if (r.length > 0) { + e.push({ + type: "custom", + name: v(s ? 2540 : 2541, null), + items: r + }); + } + } + e.push({ + type: "recent" + }); + try { + const i = Dn.setJumpList(e); + if (i && i !== "ok") { + this.f.warn(`updateWindowsJumpList#setJumpList unexpected result: ${i}`); + } + } catch (i) { + this.f.warn("updateWindowsJumpList#setJumpList", i); + } + } + L(e, i) { + if (i) { + return { + title: lk(i).name, + description: i + }; + } + if (P.isUri(e)) { + return { + title: ks(e), + description: this.M(e) + }; + } + if (this.g.isUntitledWorkspace(e)) { + return { + title: v(2542, null), + description: "" + }; + } + let s = ks(e.configPath); + if (s.endsWith(cc)) { + s = s.substr(0, s.length - cc.length - 1); + } + return { + title: v(2543, null, s), + description: this.M(e.configPath) + }; + } + M(e) { + if (e.scheme === "file") { + return Lp(e.fsPath); + } else { + return e.toString(); + } + } + async N() { + if (!N) { + return; + } + Dn.clearRecentDocuments(); + const e = await this.getRecentlyOpened(); + const i = []; + let s = 0; + for (let n = 0; n < e.workspaces.length && s < Ui.z; n++) { + const o = this.t(e.workspaces[n]); + if (o.scheme === R.file) { + const a = Ci(o); + if (await ee.exists(a)) { + i.push(a); + s++; + } + } + } + const r = []; + for (let n = 0; n < e.files.length && s < Ui.C; n++) { + const o = this.t(e.files[n]); + if (o.scheme === R.file) { + const a = Ci(o); + if (Ui.G.includes(ks(o)) || i.includes(a)) { + continue; + } + if (await ee.exists(a)) { + r.push(a); + s++; + } + } + } + r.reverse().forEach(n => Dn.addRecentDocument(n)); + i.reverse().forEach(n => Dn.addRecentDocument(n)); + } + }; + qh = Ui = __decorate([__param(0, V), __param(1, Cr), __param(2, Te), __param(3, dc), __param(4, nr)], qh); + } + }); + import { app as iI, BrowserWindow as Hh, Menu as bt, MenuItem as Re } from "electron"; + function ar() { + return new Re({ + type: "separator" + }); + } + var Vh; + var qc; + var Gh; + var sI = g({ + "out-build/vs/platform/menubar/electron-main/menubar.js"() { + "use strict"; + + ce(); + At(); + Sr(); + H(); + se(); + be(); + Mh(); + Ke(); + vt(); + ct(); + X(); + tI(); + Nc(); + ht(); + Ti(); + xt(); + Lr(); + fn(); + Lt(); + zh(); + M(); + qc = "menu"; + Gh = class extends T { + static { + Vh = this; + } + static { + this.a = "lastKnownMenubarData"; + } + constructor(e, i, s, r, n, o, a, c, l, u, d, f) { + super(); + this.s = e; + this.t = i; + this.u = s; + this.w = r; + this.y = n; + this.z = o; + this.C = a; + this.F = c; + this.G = l; + this.H = u; + this.I = d; + this.J = f; + this.r = Object.create(null); + this.h = new os(() => this.R(), 0); + this.j = new os(() => { + this.m = []; + }, 10000); + this.n = Object.create(null); + this.q = Object.create(null); + if (N || dn(i)) { + this.L(); + } + this.M(); + this.f = false; + this.g = false; + this.m = []; + this.W(); + this.N(); + } + L() { + const e = this.C.getItem(Vh.a); + if (e) { + if (e.menus) { + this.n = e.menus; + } + if (e.keybindings) { + this.q = e.keybindings; + } + } + } + M() { + this.r["workbench.action.files.newUntitledFile"] = (o, a, c) => { + if (!this.lb({ + type: "commandId", + commandId: "workbench.action.files.newUntitledFile" + })) { + this.u.openEmptyWindow({ + context: 2, + contextWindowId: a?.id + }); + } + }; + this.r["workbench.action.newWindow"] = (o, a, c) => this.u.openEmptyWindow({ + context: 2, + contextWindowId: a?.id + }); + this.r["workbench.action.files.openFileFolder"] = (o, a, c) => this.H.pickFileFolderAndOpen(undefined, { + forceNewWindow: this.eb(c), + telemetryExtraData: { + from: qc + } + }); + this.r["workbench.action.files.openFolder"] = (o, a, c) => this.H.pickFolderAndOpen(undefined, { + forceNewWindow: this.eb(c), + telemetryExtraData: { + from: qc + } + }); + this.r["workbench.action.openWorkspace"] = (o, a, c) => this.H.pickWorkspaceAndOpen(undefined, { + forceNewWindow: this.eb(c), + telemetryExtraData: { + from: qc + } + }); + this.r["workbench.action.clearRecentFiles"] = () => this.z.clearRecentlyOpened({ + confirm: true + }); + const e = this.I.youTubeUrl; + if (e) { + this.r["workbench.action.openYouTubeUrl"] = () => this.ob(e, "openYouTubeUrl"); + } + const i = this.I.requestFeatureUrl; + if (i) { + this.r["workbench.action.openRequestFeatureUrl"] = () => this.ob(i, "openUserVoiceUrl"); + } + const s = this.I.reportIssueUrl; + if (s) { + this.r["workbench.action.openIssueReporter"] = () => this.ob(s, "openReportIssues"); + } + const r = this.I.licenseUrl; + if (r) { + this.r["workbench.action.openLicenseUrl"] = () => { + if (Hi) { + const o = r.indexOf("?") > 0 ? "&" : "?"; + this.ob(`${r}${o}lang=${Hi}`, "openLicenseUrl"); + } else { + this.ob(r, "openLicenseUrl"); + } + }; + } + const n = this.I.privacyStatementUrl; + if (n && r) { + this.r["workbench.action.openPrivacyStatementUrl"] = () => { + this.ob(n, "openPrivacyStatement"); + }; + } + } + N() { + this.D(this.F.onWillShutdown(() => this.b = true)); + this.D(this.u.onDidChangeWindowsCount(e => this.S(e))); + this.D(this.H.onDidBlurMainWindow(() => this.U())); + this.D(this.H.onDidFocusMainWindow(() => this.U())); + } + get O() { + return false; + } + get P() { + if (!N) { + return false; + } + const e = this.t.getValue("window.nativeTabs"); + if (typeof e != "boolean") { + return false; + } else { + return e; + } + } + updateMenu(e, i) { + this.n = e.menus; + this.q = e.keybindings; + this.C.setItem(Vh.a, e); + this.Q(); + } + Q() { + this.h.schedule(); + } + R() { + if (!this.b) { + setTimeout(() => { + if (!this.b) { + this.W(); + } + }, 10); + } + } + S(e) { + if (N && (e.oldCount === 0 && e.newCount > 0 || e.oldCount > 0 && e.newCount === 0)) { + this.f = e.newCount === 0; + this.Q(); + } + } + U() { + if (!N) { + return; + } + const e = Hh.getFocusedWindow(); + this.g = !e || !!this.J.getWindowByWebContents(e.webContents); + this.Q(); + } + W() { + const e = bt.getApplicationMenu(); + if (e) { + this.m.push(e); + } + if (Object.keys(this.n).length === 0) { + this.X(N ? new bt() : null); + return; + } + const i = new bt(); + let s; + if (N) { + const n = new bt(); + s = new Re({ + label: this.I.nameShort, + submenu: n + }); + this.Y(n); + i.append(s); + } + if (N && !this.c) { + this.c = true; + const n = new bt(); + n.append(new Re({ + label: this.qb(v(2005, null)), + click: () => this.u.openEmptyWindow({ + context: 1 + }) + })); + iI.dock.setMenu(n); + } + if (this.$("File")) { + const n = new bt(); + const o = new Re({ + label: this.qb(v(2006, null)), + submenu: n + }); + this.bb(n, "File"); + i.append(o); + } + if (this.$("Edit")) { + const n = new bt(); + const o = new Re({ + label: this.qb(v(2007, null)), + submenu: n + }); + this.bb(n, "Edit"); + i.append(o); + } + if (this.$("Selection")) { + const n = new bt(); + const o = new Re({ + label: this.qb(v(2008, null)), + submenu: n + }); + this.bb(n, "Selection"); + i.append(o); + } + if (this.$("View")) { + const n = new bt(); + const o = new Re({ + label: this.qb(v(2009, null)), + submenu: n + }); + this.bb(n, "View"); + i.append(o); + } + if (this.$("Go")) { + const n = new bt(); + const o = new Re({ + label: this.qb(v(2010, null)), + submenu: n + }); + this.bb(n, "Go"); + i.append(o); + } + if (this.$("Run")) { + const n = new bt(); + const o = new Re({ + label: this.qb(v(2011, null)), + submenu: n + }); + this.bb(n, "Run"); + i.append(o); + } + if (this.$("Terminal")) { + const n = new bt(); + const o = new Re({ + label: this.qb(v(2012, null)), + submenu: n + }); + this.bb(n, "Terminal"); + i.append(o); + } + let r; + if (this.$("Window")) { + const n = new bt(); + r = new Re({ + label: this.qb(v(2013, null)), + submenu: n, + role: "window" + }); + this.hb(n); + } + if (r) { + i.append(r); + } + if (this.$("Help")) { + const n = new bt(); + const o = new Re({ + label: this.qb(v(2014, null)), + submenu: n, + role: "help" + }); + this.bb(n, "Help"); + i.append(o); + } + if (i.items && i.items.length > 0) { + this.X(i); + } else { + this.X(null); + } + this.j.schedule(); + } + X(e) { + bt.setApplicationMenu(e); + if (e) { + for (const i of this.J.getWindows()) { + i.win?.setMenu(null); + } + } + } + Y(e) { + const i = this.jb(v(2015, null, this.I.nameLong), "workbench.action.showAboutDialog"); + const s = this.ib(); + let r; + if (this.$("Preferences")) { + const f = new bt(); + this.bb(f, "Preferences"); + r = new Re({ + label: this.qb(v(2016, null)), + submenu: f + }); + } + const n = new bt(); + const o = new Re({ + label: v(2017, null), + role: "services", + submenu: n + }); + const a = new Re({ + label: v(2018, null, this.I.nameLong), + role: "hide", + accelerator: "Command+H" + }); + const c = new Re({ + label: v(2019, null), + role: "hideOthers", + accelerator: "Command+Alt+H" + }); + const l = new Re({ + label: v(2020, null), + role: "unhide" + }); + const u = new Re(this.nb("workbench.action.quit", { + label: v(2021, null, this.I.nameLong), + click: async (f, p, w) => { + const m = this.u.getLastActiveWindow(); + if ((this.u.getWindowCount() === 0 || Hh.getFocusedWindow() || m?.win?.isMinimized()) && (await this.Z(w))) { + this.H.quit(undefined); + } + } + })); + const d = [i]; + d.push(...s); + if (r) { + d.push(ar(), r); + } + d.push(ar(), o, ar(), a, c, l, ar(), u); + d.forEach(f => e.append(f)); + } + async Z(e) { + if (this.u.getWindowCount() === 0) { + return true; + } + const i = this.t.getValue("window.confirmBeforeClose"); + if (i === "always" || i === "keyboardOnly" && this.fb(e)) { + const { + response: s + } = await this.H.showMessageBox(this.u.getFocusedWindow()?.id, { + type: "question", + buttons: [v(2022, null), v(2023, null)], + message: v(2024, null) + }); + return s === 0; + } + return true; + } + $(e) { + if (!N && !dn(this.t)) { + return false; + } + switch (e) { + case "File": + case "Help": + if (N) { + return this.u.getWindowCount() === 0 && this.f || this.u.getWindowCount() > 0 && this.g || !!this.n && !!this.n[e]; + } + case "Window": + if (N) { + return this.u.getWindowCount() === 0 && this.f || this.u.getWindowCount() > 0 && this.g || !!this.n; + } + default: + return this.u.getWindowCount() > 0 && !!this.n && !!this.n[e]; + } + } + ab(e, i) { + i.forEach(s => { + if (B2(s)) { + e.append(ar()); + } else if (U2(s)) { + const r = new bt(); + const n = new Re({ + label: this.qb(s.label), + submenu: r + }); + this.ab(r, s.submenu.items); + e.append(n); + } else if (q2(s)) { + e.append(this.db(s)); + } else if (eI(s)) { + if (s.id === "workbench.action.showAboutDialog") { + this.cb(e); + } + if (N) { + if (this.u.getWindowCount() === 0 && this.f || this.u.getWindowCount() > 0 && this.g) { + if (this.r[s.id]) { + e.append(new Re(this.nb(s.id, { + label: this.qb(s.label), + click: this.r[s.id] + }))); + } else { + e.append(this.jb(s.label, s.id, false, s.checked)); + } + } else { + e.append(this.jb(s.label, s.id, s.enabled !== false, !!s.checked)); + } + } else { + e.append(this.jb(s.label, s.id, s.enabled !== false, !!s.checked)); + } + } + }); + } + bb(e, i) { + if (this.n && this.n[i]) { + this.ab(e, this.n[i].items); + } + } + cb(e) { + const i = this.ib(); + if (i.length) { + i.forEach(s => e.append(s)); + e.append(ar()); + } + } + db(e) { + const i = P.revive(e.uri); + const s = e.id; + const r = s === "openRecentFile" ? { + fileUri: i + } : s === "openRecentWorkspace" ? { + workspaceUri: i + } : { + folderUri: i + }; + return new Re(this.nb(s, { + label: e.label, + click: async (n, o, a) => { + const c = this.eb(a); + if (!((await this.u.open({ + context: 2, + cli: this.w.args, + urisToOpen: [r], + forceNewWindow: c, + gotoLineMode: false, + remoteAuthority: e.remoteAuthority + })).length > 0)) { + await this.z.removeRecentlyOpened([i]); + } + } + }, false)); + } + eb(e) { + return !!e && (!N && (!!e.ctrlKey || !!e.shiftKey) || !!N && (!!e.metaKey || !!e.altKey)); + } + fb(e) { + return !!e.triggeredByAccelerator || !!e.altKey || !!e.ctrlKey || !!e.metaKey || !!e.shiftKey; + } + gb(e, i, s) { + const r = { + label: this.qb(e), + role: s, + enabled: true + }; + return new Re(this.mb(i, r)); + } + hb(e) { + const i = new Re({ + label: v(2025, null), + role: "minimize", + accelerator: "Command+M", + enabled: this.u.getWindowCount() > 0 + }); + const s = new Re({ + label: v(2026, null), + role: "zoom", + enabled: this.u.getWindowCount() > 0 + }); + const r = new Re({ + label: v(2027, null), + role: "front", + enabled: this.u.getWindowCount() > 0 + }); + const n = this.jb(v(2028, null), "workbench.action.switchWindow"); + const o = []; + if (this.P) { + o.push(ar()); + o.push(this.jb(v(2029, null), "workbench.action.newWindowTab")); + o.push(this.gb(v(2030, null), "workbench.action.showPreviousWindowTab", "selectPreviousTab")); + o.push(this.gb(v(2031, null), "workbench.action.showNextWindowTab", "selectNextTab")); + o.push(this.gb(v(2032, null), "workbench.action.moveWindowTabToNewWindow", "moveTabToNewWindow")); + o.push(this.gb(v(2033, null), "workbench.action.mergeAllWindowTabs", "mergeAllWindows")); + } + [i, s, ar(), n, ...o, ar(), r].forEach(a => e.append(a)); + } + ib() { + switch (this.s.state.type) { + case "idle": + return [new Re({ + label: this.qb(v(2034, null)), + click: () => setTimeout(() => { + this.pb("CheckForUpdate"); + this.s.checkForUpdates(true); + }, 0) + })]; + case "checking for updates": + return [new Re({ + label: v(2035, null), + enabled: false + })]; + case "available for download": + return [new Re({ + label: this.qb(v(2036, null)), + click: () => { + this.s.downloadUpdate(); + } + })]; + case "downloading": + return [new Re({ + label: v(2037, null), + enabled: false + })]; + case "downloaded": + if (N) { + return []; + } else { + return [new Re({ + label: this.qb(v(2038, null)), + click: () => { + this.pb("InstallUpdate"); + this.s.applyUpdate(); + } + })]; + } + case "updating": + return [new Re({ + label: v(2039, null), + enabled: false + })]; + case "ready": + return [new Re({ + label: this.qb(v(2040, null)), + click: () => { + this.pb("RestartToUpdate"); + this.s.quitAndInstall(); + } + })]; + default: + return []; + } + } + jb(e, i, s, r) { + const n = this.qb(e); + const o = typeof i == "function" ? i : (d, f, p) => { + const w = d ? d.userSettingsLabel : null; + let m = i; + if (Array.isArray(i)) { + m = this.eb(p) ? i[1] : i[0]; + } + if (w && p.triggeredByAccelerator) { + this.lb({ + type: "keybinding", + userSettingsLabel: w + }); + } else { + this.lb({ + type: "commandId", + commandId: m + }); + } + }; + const a = typeof s == "boolean" ? s : this.u.getWindowCount() > 0; + const c = typeof r == "boolean" ? r : false; + const l = { + label: n, + click: o, + enabled: a + }; + if (c) { + l.type = "checkbox"; + l.checked = c; + } + let u; + if (typeof i == "string") { + u = i; + } else if (Array.isArray(i)) { + u = i[0]; + } + if (N) { + if (u === "editor.action.clipboardCutAction") { + l.role = "cut"; + } else if (u === "editor.action.clipboardCopyAction") { + l.role = "copy"; + } else if (u === "editor.action.clipboardPasteAction") { + l.role = "paste"; + } + if (u === "undo") { + l.click = this.kb(o, { + inDevTools: d => d.undo(), + inNoWindow: () => bt.sendActionToFirstResponder("undo:") + }); + } else if (u === "redo") { + l.click = this.kb(o, { + inDevTools: d => d.redo(), + inNoWindow: () => bt.sendActionToFirstResponder("redo:") + }); + } else if (u === "editor.action.selectAll") { + l.click = this.kb(o, { + inDevTools: d => d.selectAll(), + inNoWindow: () => bt.sendActionToFirstResponder("selectAll:") + }); + } + } + return new Re(this.mb(u, l)); + } + kb(e, i) { + return (s, r, n) => { + const o = Hh.getFocusedWindow(); + if (!o) { + return i.inNoWindow(); + } + if (o.webContents.isDevToolsFocused() && o.webContents.devToolsWebContents) { + return i.inDevTools(o.webContents.devToolsWebContents); + } + e(s, r || o, n); + }; + } + lb(e) { + let i = Hh.getFocusedWindow(); + if (i) { + const r = this.J.getWindowByWebContents(i.webContents); + if (r) { + i = this.u.getWindowById(r.parentId)?.win ?? null; + } + } + if (!i) { + const r = this.u.getLastActiveWindow(); + if (r?.win?.isMinimized()) { + i = r.win; + } + } + const s = i ? this.u.getWindowById(i.id) : undefined; + if (s) { + this.G.trace("menubar#runActionInRenderer", e); + if (N && !this.w.isBuilt && !s.isReady && (e.type === "commandId" && e.commandId === "workbench.action.toggleDevTools" || e.type !== "commandId" && e.userSettingsLabel === "alt+cmd+i")) { + return false; + } + if (e.type === "commandId") { + const r = { + id: e.commandId, + from: "menu" + }; + s.sendWhenReady("vscode:runAction", We.None, r); + } else { + const r = { + userSettingsLabel: e.userSettingsLabel + }; + s.sendWhenReady("vscode:runKeybinding", We.None, r); + } + return true; + } else { + this.G.trace("menubar#runActionInRenderer: no active window found", e); + return false; + } + } + mb(e, i) { + const s = typeof e == "string" ? this.q[e] : undefined; + if (s?.label) { + if (s.isNative !== false) { + i.accelerator = s.label; + i.userSettingsLabel = s.userSettingsLabel; + } else if (typeof i.label == "string") { + const r = i.label.indexOf("["); + if (r >= 0) { + i.label = `${i.label.substr(0, r)} [${s.label}]`; + } else { + i.label = `${i.label} [${s.label}]`; + } + } + } else { + i.accelerator = undefined; + } + return i; + } + nb(e, i, s = !i.accelerator) { + if (s) { + i = this.mb(e, i); + } + const r = i.click; + i.click = (n, o, a) => { + this.pb(e); + r?.(n, o, a); + }; + return i; + } + ob(e, i) { + this.H.openExternal(undefined, e); + this.pb(i); + } + pb(e) { + this.y.publicLog2("workbenchActionExecuted", { + id: e, + from: qc + }); + } + qb(e) { + return ck(e, !this.O); + } + }; + Gh = Vh = __decorate([__param(0, xn), __param(1, Je), __param(2, dt), __param(3, ot), __param(4, Ot), __param(5, Bc), __param(6, Oi), __param(7, Te), __param(8, V), __param(9, Or), __param(10, Ve), __param(11, To)], Gh); + } + }); + var Tg; + var Jh; + var rI = g({ + "out-build/vs/platform/menubar/electron-main/menubarMainService.js"() { + "use strict"; + + Y(); + ct(); + X(); + sI(); + M(); + Tg = q("menubarMainService"); + Jh = class extends T { + constructor(e, i, s) { + super(); + this.b = e; + this.c = i; + this.f = s; + this.a = this.g(); + } + async g() { + await this.c.when(3); + return this.D(this.b.createInstance(Gh)); + } + async updateMenubar(e, i) { + this.f.trace("menubarService#updateMenubar", e); + (await this.a).updateMenu(i, e); + } + }; + Jh = __decorate([__param(0, Ss), __param(1, Te), __param(2, V)], Jh); + } + }); + var Pn; + var jg; + var Ug; + var Ls = g({ + "out-build/vs/platform/policy/common/policy.js"() { + "use strict"; + + B(); + Bl(); + M(); + Y(); + Pn = q("policy"); + jg = class extends T { + constructor() { + super(...arguments); + this.f = {}; + this.g = new Map(); + this.h = this.D(new $()); + this.onDidChange = this.h.event; + } + async updatePolicyDefinitions(t) { + const e = Object.keys(this.f).length; + this.f = { + ...t, + ...this.f + }; + if (e !== Object.keys(this.f).length) { + await this.j(t); + } + return Vr.reduce(this.g.entries(), (i, [s, r]) => ({ + ...i, + [s]: r + }), {}); + } + getPolicyValue(t) { + return this.g.get(t); + } + serialize() { + return Vr.reduce(Object.entries(this.f), (t, [e, i]) => ({ + ...t, + [e]: { + definition: i, + value: this.g.get(e) + } + }), {}); + } + }; + Ug = class { + constructor() { + this.onDidChange = x.None; + } + async updatePolicyDefinitions() { + return {}; + } + getPolicyValue() {} + serialize() {} + }; + } + }); + async function nI(t, e, i, s, r) { + try { + const n = await import("@vscode/spdlog"); + n.setFlushOn(cr.Trace); + const o = await n.createAsyncRotatingLogger(t, e, i, s); + if (r) { + o.clearFormatters(); + } else { + o.setPattern("%Y-%m-%d %H:%M:%S.%e [%l] %v"); + } + return o; + } catch (n) { + console.error(n); + } + return null; + } + function G2(t, e, i) { + switch (e) { + case J.Trace: + t.trace(i); + break; + case J.Debug: + t.debug(i); + break; + case J.Info: + t.info(i); + break; + case J.Warning: + t.warn(i); + break; + case J.Error: + t.error(i); + break; + case J.Off: + break; + default: + throw new Error(`Invalid log level ${e}`); + } + } + function J2(t, e) { + switch (e) { + case J.Trace: + t.setLevel(cr.Trace); + break; + case J.Debug: + t.setLevel(cr.Debug); + break; + case J.Info: + t.setLevel(cr.Info); + break; + case J.Warning: + t.setLevel(cr.Warning); + break; + case J.Error: + t.setLevel(cr.Error); + break; + case J.Off: + t.setLevel(cr.Off); + break; + default: + throw new Error(`Invalid log level ${e}`); + } + } + var cr; + var K2; + var oI = g({ + "out-build/vs/platform/log/node/spdlogLog.js"() { + "use strict"; + + He(); + X(); + (function (t) { + t[t.Trace = 0] = "Trace"; + t[t.Debug = 1] = "Debug"; + t[t.Info = 2] = "Info"; + t[t.Warning = 3] = "Warning"; + t[t.Error = 4] = "Error"; + t[t.Critical = 5] = "Critical"; + t[t.Off = 6] = "Off"; + })(cr ||= {}); + K2 = class extends c1 { + constructor(t, e, i, s, r) { + super(); + this.n = []; + this.setLevel(r); + this.q = this.s(t, e, i, s); + this.D(this.onDidChangeLogLevel(n => { + if (this.r) { + J2(this.r, n); + } + })); + } + async s(t, e, i, s) { + const r = i ? 6 : 1; + const n = 30 / r * cn.MB; + const o = await nI(t, e, n, r, s); + if (o) { + this.r = o; + J2(this.r, this.getLevel()); + for (const { + level: a, + message: c + } of this.n) { + G2(this.r, a, c); + } + this.n = []; + } + } + m(t, e) { + if (this.r) { + G2(this.r, t, e); + } else if (this.getLevel() <= t) { + this.n.push({ + level: t, + message: e + }); + } + } + flush() { + if (this.r) { + this.u(); + } else { + this.q.then(() => this.u()); + } + } + dispose() { + if (this.r) { + this.w(); + } else { + this.q.then(() => this.w()); + } + super.dispose(); + } + u() { + if (this.r) { + this.r.flush(); + } + } + w() { + if (this.r) { + this.r.drop(); + this.r = undefined; + } + } + }; + } + }); + var Z2; + var aI = g({ + "out-build/vs/platform/log/node/loggerService.js"() { + "use strict"; + + _i(); + X(); + oI(); + Z2 = class extends Sy { + q(t, e, i) { + return new K2(ti(), t.fsPath, !i?.donotRotate, !!i?.donotUseFormatters, e); + } + }; + } + }); + var qo; + var Y2; + var zc = g({ + "out-build/vs/platform/log/electron-main/loggerService.js"() { + "use strict"; + + $i(); + B(); + Y(); + X(); + aI(); + qo = sc; + Y2 = class extends Z2 { + constructor() { + super(...arguments); + this.t = new Ht(); + } + createLogger(t, e, i) { + if (i !== undefined) { + this.t.set(this.n(t), i); + } + try { + return super.createLogger(t, e); + } catch (s) { + this.t.delete(this.n(t)); + throw s; + } + } + registerLogger(t, e) { + if (e !== undefined) { + this.t.set(t.resource, e); + } + super.registerLogger(t); + } + deregisterLogger(t) { + this.t.delete(t); + super.deregisterLogger(t); + } + getRegisteredLoggers(t) { + const e = []; + for (const i of super.getRegisteredLoggers()) { + if (t === this.t.get(i.resource)) { + e.push(i); + } + } + return e; + } + getOnDidChangeLogLevelEvent(t) { + return x.filter(this.onDidChangeLogLevel, e => vy(e) || this.u(e[0], t)); + } + getOnDidChangeVisibilityEvent(t) { + return x.filter(this.onDidChangeVisibility, ([e]) => this.u(e, t)); + } + getOnDidChangeLoggersEvent(t) { + return x.filter(x.map(this.onDidChangeLoggers, e => ({ + added: [...e.added].filter(s => this.u(s.resource, t)), + removed: [...e.removed].filter(s => this.u(s.resource, t)) + })), e => e.added.length > 0 || e.removed.length > 0); + } + deregisterLoggers(t) { + for (const [e, i] of this.t) { + if (i === t) { + this.deregisterLogger(e); + } + } + } + u(t, e) { + const i = this.t.get(t); + return i === undefined || i === e; + } + dispose() { + super.dispose(); + this.t.clear(); + } + }; + } + }); + function cI(t) { + if (Ea === 2 && /^penguin(\.|$)/i.test(t)) { + return "chromebook"; + } + } + function lI(t, e, i, s, r, n, o, a, c, l, u) { + const d = Object.create(null); + d["common.machineId"] = n; + d["common.macMachineId"] = o; + d["common.sqmId"] = a; + d["common.devDeviceId"] = c; + d.sessionID = ti() + Date.now(); + d.commitHash = s; + d.version = r; + d["common.platformVersion"] = (t || "").replace(/^(\d+)(\.\d+)?(\.\d+)?(.*)/, "$1$2$3"); + d["common.platform"] = J0(Ea); + d["common.nodePlatform"] = rp; + d["common.nodeArch"] = i; + d["common.product"] = u || "desktop"; + if (l) { + d["common.msftInternal"] = l; + } + let f = 0; + const p = Date.now(); + Object.defineProperties(d, { + timestamp: { + get: () => new Date(), + enumerable: true + }, + "common.timesincesessionstart": { + get: () => Date.now() - p, + enumerable: true + }, + "common.sequence": { + get: () => f++, + enumerable: true + } + }); + if (Gf) { + d["common.snap"] = "true"; + } + const w = cI(e); + if (w) { + d["common.platformDetail"] = w; + } + return d; + } + function uI(t) { + const e = Ii.USERDNSDOMAIN; + if (!e) { + return false; + } + const i = e.toLowerCase(); + return t.some(s => i === s); + } + var X2 = g({ + "out-build/vs/platform/telemetry/common/commonProperties.js"() { + "use strict"; + + H(); + ys(); + _i(); + } + }); + function Q2(t, e) { + if (!e.isBuilt && !e.disableTelemetry) { + return true; + } else { + return !e.disableTelemetry && !!t.enableTelemetry; + } + } + function Bg(t) { + const e = t.getValue(Hu); + const i = t.getValue(D1); + if (t.getValue(P1) === false || i === false) { + return 0; + } + switch (e ?? "all") { + case "all": + return 3; + case "off": + return 0; + } + } + function hI(t, e) { + const i = t.msftInternalDomains || []; + const s = e.getValue("telemetry.internalTesting"); + return uI(i) || s; + } + function dI(t) { + return [t.appRoot, t.extensionsPath, t.userHome.fsPath, t.tmpDir.fsPath, t.userDataPath]; + } + function fI(t, e) { + if (!t || !t.includes("/") && !t.includes("\\")) { + return t; + } + let i = t; + const s = []; + for (const a of e) { + while (true) { + const c = a.exec(t); + if (!c) { + break; + } + s.push([c.index, a.lastIndex]); + } + } + const r = /^[\\\/]?(node_modules|node_modules\.asar)[\\\/]/; + const n = /(file:\/\/)?([a-zA-Z]:(\\\\|\\|\/)|(\\\\|\\|\/))?([\w-\._]+(\\\\|\\|\/))+[\w-\._]*/g; + let o = 0; + for (i = "";;) { + const a = n.exec(t); + if (!a) { + break; + } + const c = s.some(([l, u]) => a.index < u && l < n.lastIndex); + if (!r.test(a[0]) && !c) { + i += t.substring(o, a.index) + ""; + o = n.lastIndex; + } + } + if (o < t.length) { + i += t.substr(o); + } + return i; + } + function pI(t) { + if (!t) { + return t; + } + const e = [{ + label: "Google API Key", + regex: /AIza[A-Za-z0-9_\\\-]{35}/ + }, { + label: "Slack Token", + regex: /xox[pbar]\-[A-Za-z0-9]/ + }, { + label: "GitHub Token", + regex: /(gh[psuro]_[a-zA-Z0-9]{36}|github_pat_[a-zA-Z0-9]{22}_[a-zA-Z0-9]{59})/ + }, { + label: "Generic Secret", + regex: /(key|token|sig|secret|signature|password|passwd|pwd|android:value)[^a-zA-Z0-9]/i + }, { + label: "CLI Credentials", + regex: /((login|psexec|(certutil|psexec)\.exe).{1,50}(\s-u(ser(name)?)?\s+.{3,100})?\s-(admin|user|vm|root)?p(ass(word)?)?\s+["']?[^$\-\/\s]|(^|[\s\r\n\\])net(\.exe)?.{1,5}(user\s+|share\s+\/user:| user -? secrets ? set) \s + [^ $\s \/])/ + }, { + label: "Microsoft Entra ID", + regex: /eyJ(?:0eXAiOiJKV1Qi|hbGci|[a-zA-Z0-9\-_]+\.[a-zA-Z0-9\-_]+\.)/ + }, { + label: "Email", + regex: /@[a-zA-Z0-9-]+\.[a-zA-Z0-9-]+/ + }]; + for (const i of e) { + if (i.regex.test(t)) { + return ``; + } + } + return t; + } + function e6(t, e) { + return xD(t, i => { + if (i instanceof t6 || Object.hasOwnProperty.call(i, "isTrustedTelemetryValue")) { + return i.value; + } + if (typeof i == "string") { + let s = i.replaceAll("%20", " "); + s = fI(s, e); + for (const r of e) { + s = s.replace(r, ""); + } + s = pI(s); + return s; + } + }); + } + var t6; + var i6; + var Hc; + var $n = g({ + "out-build/vs/platform/telemetry/common/telemetryUtils.js"() { + "use strict"; + + us(); + _e(); + Sc(); + X2(); + xt(); + t6 = class { + constructor(t) { + this.value = t; + this.isTrustedTelemetryValue = true; + } + }; + i6 = class { + constructor() { + this.telemetryLevel = 0; + this.sessionId = "someValue.sessionId"; + this.machineId = "someValue.machineId"; + this.macMachineId = "someValue.macMachineId"; + this.sqmId = "someValue.sqmId"; + this.devDeviceId = "someValue.devDeviceId"; + this.firstSessionDate = "someValue.firstSessionDate"; + this.sendErrorTelemetry = false; + } + registerAuthId() {} + publicLog() {} + publicLog2() {} + publicLogError() {} + publicLogError2() {} + publicLogCapture() {} + setExperimentProperty() {} + }; + Hc = new i6(); + } + }); + var Kh; + var qg; + var zg; + var gI = g({ + "out-build/vs/platform/sharedProcess/common/sharedProcess.js"() { + "use strict"; + + Kh = { + exit: "vscode:electron-main->shared-process=exit", + ipcReady: "vscode:shared-process->electron-main=ipc-ready", + initDone: "vscode:shared-process->electron-main=init-done" + }; + qg = { + request: "vscode:createSharedProcessChannelConnection", + response: "vscode:createSharedProcessChannelConnectionResult" + }; + zg = { + request: "vscode:createSharedProcessRawConnection", + response: "vscode:createSharedProcessRawConnectionResult" + }; + } + }); + var Zh; + var mI = g({ + "out-build/vs/platform/sharedProcess/electron-main/sharedProcess.js"() { + "use strict"; + + as(); + ce(); + M(); + vt(); + ct(); + X(); + _s(); + Ls(); + zc(); + _o(); + $n(); + Qp(); + _e(); + gI(); + B(); + Zh = class extends T { + constructor(e, i, s, r, n, o, a, c, l, u) { + super(); + this.g = e; + this.h = i; + this.j = s; + this.m = r; + this.n = n; + this.q = o; + this.r = a; + this.s = c; + this.t = l; + this.u = u; + this.a = new Ga(); + this.b = undefined; + this.c = undefined; + this.f = this.D(new $()); + this.onDidCrash = this.f.event; + this.C = undefined; + this.F = undefined; + this.w(); + } + w() { + it.on(qg.request, (e, i) => this.y(e, i, qg.response)); + it.on(zg.request, (e, i) => this.y(e, i, zg.response)); + this.D(this.r.onWillShutdown(() => this.z())); + } + async y(e, i, s) { + this.s.trace(`[SharedProcess] onWindowConnection for: ${s}`); + if (!this.a.isOpen()) { + this.a.open(); + } + await this.whenReady(); + const r = await this.connect(s); + if (e.sender.isDestroyed()) { + return r.close(); + } + e.sender.postMessage(s, i, [r]); + } + z() { + this.s.trace("[SharedProcess] onWillShutdown"); + this.b?.postMessage(Kh.exit); + this.b = undefined; + } + whenReady() { + this.C ||= (async () => { + await this.G; + const e = new Xs(); + this.b?.once(Kh.initDone, () => e.complete()); + await e.p; + this.c?.dispose(); + this.s.trace("[SharedProcess] Overall ready"); + })(); + return this.C; + } + get G() { + this.F ||= (async () => { + await this.a.wait(); + this.H(); + const e = new Xs(); + this.b?.once(Kh.ipcReady, () => e.complete()); + await e.p; + this.s.trace("[SharedProcess] IPC ready"); + })(); + return this.F; + } + H() { + this.b = this.D(new _r(this.s, Hc, this.r)); + this.c = this.b.onMessage(s => { + if (typeof s.warning == "string") { + this.s.warn(s.warning); + } else if (typeof s.error == "string") { + this.s.error(s.error); + } + }); + const e = kx(this.n.args, this.n.isBuilt); + let i; + if (e.port) { + i = ["--nolazy"]; + if (e.break) { + i.push(`--inspect-brk=${e.port}`); + } else { + i.push(`--inspect=${e.port}`); + } + } + this.b.start({ + processTitle: "shared-process", + type: "shared-process", + entryPoint: "vs/code/electron-utility/sharedProcess/sharedProcessMain", + payload: this.I(), + respondToAuthRequestsFromMainProcess: true, + execArgv: i + }); + this.D(this.b.onCrash(() => this.f.fire())); + } + I() { + return { + machineId: this.g, + macMachineId: this.h, + sqmId: this.j, + devDeviceId: this.m, + codeCachePath: this.n.codeCachePath, + profiles: { + home: this.q.profilesHome, + all: this.q.profiles + }, + args: this.n.args, + logLevel: this.t.getLogLevel(), + loggers: this.t.getRegisteredLoggers(), + policiesData: this.u.serialize() + }; + } + async connect(e) { + await this.G; + return Vl(this.b).connect(e); + } + }; + Zh = __decorate([__param(4, ot), __param(5, Cs), __param(6, Te), __param(7, V), __param(8, qo), __param(9, Pn)], Zh); + } + }); + var s6; + var zo; + var Hg = g({ + "out-build/vs/platform/sign/common/sign.js"() { + "use strict"; + + Y(); + s6 = "signService"; + zo = q(s6); + } + }); + function wI(t) { + return typeof t == "object" && t !== null && "prefix" in t && typeof t.prefix == "string"; + } + var vI = g({ + "out-build/vs/platform/storage/common/storageIpc.js"() { + "use strict"; + + B(); + M(); + } + }); + var r6; + var bI = g({ + "out-build/vs/platform/storage/electron-main/storageIpc.js"() { + "use strict"; + + B(); + M(); + hu(); + vI(); + ri(); + r6 = class cS extends T { + static { + this.a = 100; + } + constructor(e, i) { + super(); + this.f = e; + this.g = i; + this.b = this.D(new $()); + this.c = new Map(); + this.h(i.applicationStorage, this.b); + } + h(e, i) { + this.D(x.debounce(e.onDidChangeStorage, (s, r) => { + if (s) { + s.push(r); + } else { + s = [r]; + } + return s; + }, cS.a)(s => { + if (s.length) { + i.fire(this.j(s, e)); + } + })); + } + j(e, i) { + const s = new Map(); + const r = new Set(); + e.forEach(n => { + const o = i.get(n.key); + if (typeof o == "string") { + s.set(n.key, o); + } else { + r.add(n.key); + } + }); + return { + changed: Array.from(s.entries()), + deleted: Array.from(r.values()) + }; + } + listen(e, i, s) { + switch (i) { + case "onDidChangeStorage": + { + const r = s.profile ? Er(s.profile) : undefined; + if (!r) { + return this.b.event; + } + let n = this.c.get(r.id); + if (!n) { + n = this.D(new $()); + this.h(this.g.profileStorage(r), n); + this.c.set(r.id, n); + } + return n.event; + } + } + throw new Error(`Event not found: ${i}`); + } + async call(e, i, s) { + let r = { + profile: undefined, + workspace: undefined + }; + if (Array.isArray(s)) { + if (i !== "cursorDiskKVGet" && i !== "cursorDiskKVSet") { + throw new Error(`Unexpected array argument for command: ${i}`); + } + const [c, l] = s; + r = { + profile: c, + workspace: l + }; + } else { + r = s; + } + const n = r.profile ? Er(r.profile) : undefined; + const o = Lx(r.workspace); + const a = await this.m(n, o); + if (Array.isArray(s)) { + switch (i) { + case "cursorDiskKVGet": + { + const [,, c] = s; + return a.cursorDiskKVGet(c); + } + case "cursorDiskKVSet": + { + const [,, c, l] = s; + return a.cursorDiskKVSet(c, l); + } + default: + throw new Error(`Call not found: ${i}`); + } + } + switch (i) { + case "getItems": + return Array.from(a.items.entries()); + case "updateItems": + { + const c = r; + if (c.insert) { + for (const [l, u] of c.insert) { + a.set(l, u); + } + } + c.delete?.forEach(l => a.delete(l)); + break; + } + case "optimize": + return a.optimize(); + case "isUsed": + { + const c = r.payload; + if (typeof c == "string") { + return this.g.isUsed(c); + } + } + case "cursorDiskKVClearPrefix": + { + if (!wI(r)) { + throw new Error("Invalid request for cursorDiskKVClearPrefix"); + } + const c = r; + return a.cursorDiskKVClearPrefix(c.prefix); + } + default: + throw new Error(`Call not found: ${i}`); + } + } + async m(e, i) { + let s; + if (i) { + s = this.g.workspaceStorage(i); + } else if (e) { + s = this.g.profileStorage(e); + } else { + s = this.g.applicationStorage; + } + try { + await s.init(); + } catch (r) { + this.f.error(`StorageIPC#init: Unable to init ${i ? "workspace" : e ? "profile" : "application"} storage due to ${r}`); + } + return s; + } + }; + } + }); + var n6; + var yI = g({ + "out-build/vs/platform/telemetry/common/telemetryIpc.js"() { + "use strict"; + + n6 = class { + constructor(t) { + this.b = t; + } + log(t, e) { + this.b.call("log", { + eventName: t, + data: e + }).then(undefined, i => `Failed to log telemetry: ${console.warn(i)}`); + return Promise.resolve(null); + } + flush() { + return Promise.resolve(); + } + registerAuthId(t) { + this.b.call("registerAuthId", { + eventName: "registerAuthId", + data: t + }); + } + capture(t, e) { + this.b.call("capture", { + eventName: t, + data: e + }).then(undefined, i => `Failed to log telemetry: ${console.warn(i)}`); + return Promise.resolve(null); + } + }; + } + }); + function SI() { + const t = v(2118, null, ko.nameLong); + const e = v(2119, null, "https://cursor.com/privacy", "https://cursor.com/security"); + const i = fr ? "" : v(2120, null); + return ` + ${t} ${e} ${i} + `; + } + var Yh; + var EI = g({ + "out-build/vs/platform/telemetry/common/telemetryService.js"() { + "use strict"; + + M(); + us(); + H(); + Wt(); + be(); + Ke(); + Xr(); + gc(); + ht(); + Zs(); + xt(); + $n(); + Yh = class { + static { + this.IDLE_START_EVENT_NAME = "UserIdleStart"; + } + static { + this.IDLE_STOP_EVENT_NAME = "UserIdleStop"; + } + constructor(e, i, s) { + this.k = i; + this.l = s; + this.d = {}; + this.i = new De(); + this.j = []; + this.b = e.appenders; + this.c = e.commonProperties ?? Object.create(null); + this.sessionId = this.c.sessionID; + this.machineId = this.c["common.machineId"]; + this.macMachineId = this.c["common.macMachineId"]; + this.sqmId = this.c["common.sqmId"]; + this.devDeviceId = this.c["common.devDeviceId"]; + this.firstSessionDate = this.c["common.firstSessionDate"]; + this.msftInternal = this.c["common.msftInternal"]; + this.f = e.piiPaths || []; + this.g = 3; + this.h = !!e.sendErrorTelemetry; + this.j = [/(vscode-)?file:\/\/\/.*?\/resources\/app\//gi]; + for (const r of this.f) { + this.j.push(new RegExp(ja(r), "gi")); + if (r.indexOf("\\") >= 0) { + this.j.push(new RegExp(ja(r.replace(/\\/g, "/")), "gi")); + } + } + this.m(); + this.i.add(this.k.onDidChangeConfiguration(r => { + if (r.affectsConfiguration(Hu) || r.affectsConfiguration(P1) || r.affectsConfiguration(D1)) { + this.m(); + } + })); + } + setExperimentProperty(e, i) { + this.d[e] = i; + } + m() { + let e = Bg(this.k); + const i = this.l.enabledTelemetryLevels; + if (i) { + this.h = this.sendErrorTelemetry ? i.error : false; + const s = i.usage ? 3 : i.error ? 2 : 0; + e = Math.min(e, s); + } + this.g = e; + } + get sendErrorTelemetry() { + return this.h; + } + get telemetryLevel() { + return this.g; + } + dispose() { + this.i.dispose(); + } + n(e, i, s) { + if (!(this.g < i)) { + s = yc(s, this.d); + s = e6(s, this.j); + s = yc(s, this.c); + this.b.forEach(r => r.log(e, s)); + } + } + o(e, i, s) { + if (!(this.g < i)) { + s = yc(s, this.d); + s = e6(s, this.j); + s = yc(s, this.c); + this.b.forEach(r => { + r.capture(e, s); + }); + } + } + registerAuthId(e) { + this.b.forEach(i => i.registerAuthId(e)); + } + publicLog(e, i) { + this.n(e, 3, i); + } + publicLog2(e, i) { + this.publicLog(e, i); + } + publicLogError(e, i) { + if (this.h) { + this.n(e, 2, i); + } + } + publicLogError2(e, i) { + this.publicLogError(e, i); + } + publicLogCapture(e, i) { + this.o(e, 3, i); + } + }; + Yh = __decorate([__param(1, Je), __param(2, Ve)], Yh); + Gt.as(Ai.Configuration).registerConfiguration({ + id: l4, + order: 1, + type: "object", + title: "Crash Reporting", + properties: { + [Hu]: { + type: "string", + enum: ["all", "off"], + enumDescriptions: ["Send OS-level crash reports.", "Disable crash reporting."], + markdownDescription: SI(), + default: "all", + restricted: true, + scope: 1 + } + } + }); + } + }); + var o6; + var kI = g({ + "out-build/vs/platform/update/common/updateIpc.js"() { + "use strict"; + + B(); + M(); + Lr(); + o6 = class { + constructor(t) { + this.a = t; + } + listen(t, e) { + switch (e) { + case "onStateChange": + return this.a.onStateChange; + } + throw new Error(`Event not found: ${e}`); + } + call(t, e, i) { + switch (e) { + case "checkForUpdates": + return this.a.checkForUpdates(i); + case "downloadUpdate": + return this.a.downloadUpdate(); + case "applyUpdate": + return this.a.applyUpdate(); + case "quitAndInstall": + return this.a.quitAndInstall(); + case "_getInitialState": + return Promise.resolve(this.a.state); + case "isLatestVersion": + return this.a.isLatestVersion(); + case "_applySpecificUpdate": + return this.a._applySpecificUpdate(i); + } + throw new Error(`Call not found: ${e}`); + } + }; + } + }); + import * as a6 from "original-fs"; + import xI from "path"; + import DI from "os"; + function PI(t) { + return c6.includes(t); + } + var c6; + var Ho; + var Vg = g({ + "out-build/vs/platform/update/electron-main/abstractUpdateService.js"() { + "use strict"; + + ce(); + At(); + B(); + Ke(); + vt(); + ct(); + X(); + ht(); + En(); + Lr(); + c6 = ["stable", "prerelease"]; + Ho = class { + get state() { + return this.c; + } + f(e) { + this.k.info("update#setState", e.type); + this.c = e; + this.d.fire(e); + } + constructor(e, i, s, r, n, o) { + this.g = e; + this.h = i; + this.i = s; + this.j = r; + this.k = n; + this.l = o; + this.c = fe.Uninitialized; + this.d = new $(); + this.onStateChange = this.d.event; + e.when(3).finally(() => this.m()); + } + async m() { + this.F(); + if (!this.i.isBuilt) { + this.f(fe.Disabled(0)); + this.k.info("update#ctor - updates are disabled by the environment"); + return; + } + if (this.i.disableUpdates) { + this.f(fe.Disabled(1)); + this.k.info("update#ctor - updates are disabled by the environment"); + return; + } + if (!this.l.updateUrl || !this.l.commit) { + this.f(fe.Disabled(3)); + this.k.info("update#ctor - updates are disabled as there is no update URL"); + return; + } + const e = this.h.getValue("update.mode"); + const i = this.p(e); + if (!i) { + this.f(fe.Disabled(2)); + this.k.info("update#ctor - updates are disabled by user preference"); + return; + } + this.a = this.n(i, false); + if (!this.a) { + this.f(fe.Disabled(4)); + this.k.info("update#ctor - updates are disabled as the update URL is badly formed"); + return; + } + this.f(fe.Idle(this.z())); + if (e === "manual") { + this.k.info("update#ctor - manual checks only; automatic updates are disabled by user preference"); + return; + } + if (e === "start") { + this.k.info("update#ctor - startup checks only; automatic updates are disabled by user preference"); + setTimeout(() => this.checkForUpdates(false), 30000); + } else { + this.q(30000).then(undefined, s => this.k.error(s)); + } + } + n(e, i) { + const s = this.H(e, i); + if (s) { + try { + if (this.h.getValue("_update.prss")) { + const r = new URL(s); + r.searchParams.set("prss", "true"); + return r.toString(); + } + } catch (r) { + this.k.error("Failed to add update URL params", r); + } + return s; + } + } + o() { + try { + const e = this.h.getValue("update.mode"); + return this.p(e); + } catch (e) { + this.k.error("Failed to get product quality", e); + } + } + p(e) { + if (e === "none") { + return undefined; + } else { + return this.l.quality; + } + } + q(e = 3600000) { + return wi(e).then(() => this.checkForUpdates(false)).then(() => this.q(3600000)); + } + async r() { + return wi(300000).then(() => this.v()).catch(e => this.k.error("update#scheduleCheckForOutdatedUpdates received error", e)); + } + async v() { + const e = this.s(); + if (!e) { + if (this.state.type !== "idle") { + this.r(); + } + return; + } + try { + this.w(); + const i = this.C(); + if (i) { + this.k.debug("update#checkForOutdatedUpdate - checking for outdated update", e); + const s = await this.j.request({ + url: i + }, We.None); + if (Fh(s)) { + const r = await this.t(s); + if (r !== e && this.s() === e) { + this.k.info("update#checkForOutdatedUpdate - found outdated update", e, r); + this.u(e, r); + if (r) { + this.I(false); + } + return; + } + } else { + this.k.warn("update#checkForOutdatedUpdate - error status code when checking for outdated update", s.res.statusCode); + } + } + } catch (i) { + this.k.error("update#checkForOutdatedUpdate - failed to check for outdated update", i); + } + if (this.state.type !== "idle") { + this.r(); + } + } + async checkForUpdates(e) { + this.k.trace("update#checkForUpdates, state = ", this.state.type); + if (this.state.type === "idle") { + this.w(); + this.I(e); + } + } + w() { + const e = this.getReleaseTrack(); + if (this.a && !this.a.includes(e) && this.l.updateUrl) { + const i = this.o(); + if (i) { + const s = this.n(i, false); + if (s) { + this.k.info("update#checkForUpdates - updating to release track", e); + this.a = s; + } + } + } + } + async downloadUpdate() { + this.k.trace("update#downloadUpdate, state = ", this.state.type); + if (this.state.type === "available for download") { + await this.x(this.state); + } + } + async x(e) {} + async applyUpdate() { + this.k.trace("update#applyUpdate, state = ", this.state.type); + if (this.state.type === "downloaded") { + await this.y(); + } + } + async y() {} + quitAndInstall() { + this.k.trace("update#quitAndInstall, state = ", this.state.type); + if (this.state.type === "ready") { + this.k.trace("update#quitAndInstall(): before lifecycle quit()"); + this.g.quit(true).then(e => { + this.k.trace(`update#quitAndInstall(): after lifecycle quit() with veto: ${e}`); + if (!e) { + this.k.trace("update#quitAndInstall(): running raw#quitAndInstall()"); + this.A(); + } + }); + } + return Promise.resolve(undefined); + } + async isLatestVersion() { + if (!this.a) { + return; + } + if (this.h.getValue("update.mode") === "none") { + return false; + } + for (const i of [this.a]) { + if (i) { + try { + const s = await this.j.request({ + url: i + }, We.None); + if (!Fh(s)) { + throw new Error("Server returned " + s.res.statusCode); + } + return s.res.statusCode === 204; + } catch (s) { + this.k.error("update#isLatestVersion(): failed to check for updates"); + this.k.error(s); + return; + } + } + } + } + async _applySpecificUpdate(e) {} + z() { + return 1; + } + A() {} + B(e, i, s, r = false) { + const n = s.nameShort.replace(/ /g, "-").toLowerCase(); + const o = this.getReleaseTrack(); + const a = `${s.updateUrl}/api/update/${e}/${n}/${s.version}/${this.b}/${o}`; + this.k.info("updateURL", a); + return a; + } + C() { + if (!this.a) { + return; + } + const e = new URL(this.a); + e.searchParams.set("isOutdatedCheck", "1"); + return e.toString(); + } + D() { + if (!this.a) { + return; + } + const e = new URL(this.a); + e.searchParams.set("forceUpdate", "1"); + return e.toString(); + } + E(e) { + if (e) { + return new URL(e).searchParams.get("forceUpdate") === "1"; + } else { + return false; + } + } + getReleaseTrack() { + try { + const e = this.h.getValue("update.releaseTrack"); + if (PI(e)) { + return e; + } + this.k.warn("unknown release track", e); + } catch (e) { + this.k.warn("could not fetch release track - using default", e); + } + return "stable"; + } + F() { + try { + if (a6.existsSync(this.G())) { + a6.unlinkSync(this.G()); + } + } catch (e) { + this.k.error("Failed to check for legacy shouldUpdate file", e); + } + } + G() { + const e = this.l.dataFolderName ?? ".cursor"; + return xI.join(DI.homedir(), e, "shouldUpdate"); + } + }; + Ho = __decorate([__param(0, Te), __param(1, Je), __param(2, ot), __param(3, Sn), __param(4, V), __param(5, Ve)], Ho); + } + }); + import * as Ms from "electron"; + var Mr; + var $I = g({ + "out-build/vs/platform/update/electron-main/updateService.darwin.js"() { + "use strict"; + + sn(); + B(); + er(); + M(); + Ke(); + vt(); + ct(); + X(); + ht(); + En(); + xt(); + Lr(); + Vg(); + Mr = class extends Ho { + get K() { + return x.fromNodeEventEmitter(Ms.autoUpdater, "error", (e, i) => i); + } + get L() { + return x.fromNodeEventEmitter(Ms.autoUpdater, "update-not-available"); + } + get M() { + return x.fromNodeEventEmitter(Ms.autoUpdater, "update-available"); + } + get N() { + return x.fromNodeEventEmitter(Ms.autoUpdater, "update-downloaded", (e, i, s, r) => ({ + version: s, + productVersion: s, + timestamp: r + })); + } + constructor(e, i, s, r, n, o, a, c) { + super(i, s, n, o, a, c); + this.b = e; + this.Q = r; + this.J = new De(); + this.O = false; + i.setRelaunchHandler(this); + } + handleRelaunch(e) { + if (e?.addArgs || e?.removeArgs || this.state.type !== "ready") { + return false; + } else { + this.k.trace("update#handleRelaunch(): running raw#quitAndInstall()"); + this.A(); + return true; + } + } + async m() { + await super.m(); + this.K(this.S, this, this.J); + this.M(this.Y, this, this.J); + this.N(this.Z, this, this.J); + this.L(this.$, this, this.J); + } + S(e) { + this.k.info("UpdateService onError()"); + if (!this.O) { + this.Q.publicLog2("update:error", { + messageHash: String(Ds(String(e))) + }); + } + this.k.error("UpdateService (using backup url: " + this.O + ") error:", e); + const i = this.state.type === "checking for updates" && this.state.explicit ? e : undefined; + this.f(fe.Idle(1, i)); + } + H(e, i = false) { + let s; + if (this.l.darwinUniversalAssetId) { + s = this.l.darwinUniversalAssetId; + } else { + s = process.arch === "x64" ? "darwin" : "darwin-arm64"; + } + const r = this.B(s, e, this.l, i); + if (i) { + return r; + } + try { + Ms.autoUpdater.setFeedURL({ + url: r + }); + } catch (n) { + this.k.error("Failed to set update feed URL", n); + return; + } + return r; + } + s() { + if (this.state.type === "ready") { + return this.state.update?.version; + } else { + return undefined; + } + } + async t(e) { + const i = await Rc(e); + if (i?.url) { + return i.name; + } else { + return undefined; + } + } + u(e, i) { + if (!i) { + const s = this.D(); + if (s) { + Ms.autoUpdater.setFeedURL({ + url: s + }); + this.I(false); + return; + } + } + this.f(fe.Idle(1)); + } + I(e) { + this.f(fe.CheckingForUpdates(e)); + Ms.autoUpdater.checkForUpdates(); + } + Y() { + this.k.info("UpdateService onUpdateAvailable()"); + if (this.state.type === "checking for updates") { + this.f(fe.Downloading); + } + } + Z(e) { + this.k.info("UpdateService onUpdateDownloaded()"); + if (this.state.type === "downloading") { + if (this.E(Ms.autoUpdater.getFeedURL()) && this.a) { + this.k.info("update#onUpdateDownloaded() - canceled outdated update"); + Ms.autoUpdater.setFeedURL({ + url: this.a + }); + this.f(fe.Idle(1)); + return; + } + this.f(fe.Downloaded(e)); + this.Q.publicLog2("update:downloaded", { + version: e.version + }); + this.f(fe.Ready(e)); + this.r(); + } + } + $() { + this.k.info("UpdateService onUpdateNotAvailable()"); + if (this.state.type === "checking for updates") { + this.Q.publicLog2("update:notAvailable", { + explicit: this.state.explicit + }); + this.f(fe.Idle(1)); + } + } + A() { + this.k.info("UpdateService doQuitAndInstall()"); + this.k.trace("update#quitAndInstall(): running raw#quitAndInstall()"); + Ms.autoUpdater.quitAndInstall(); + } + dispose() { + this.J.dispose(); + } + }; + __decorate([de], Mr.prototype, "K", null); + __decorate([de], Mr.prototype, "L", null); + __decorate([de], Mr.prototype, "M", null); + __decorate([de], Mr.prototype, "N", null); + Mr = __decorate([__param(1, Te), __param(2, Je), __param(3, Ot), __param(4, ot), __param(5, Sn), __param(6, V), __param(7, Ve)], Mr); + } + }); + import { spawn as II } from "node:child_process"; + var Xh; + var AI = g({ + "out-build/vs/platform/update/electron-main/updateService.linux.js"() { + "use strict"; + + At(); + Ke(); + vt(); + ct(); + X(); + Nc(); + ht(); + En(); + Lr(); + xt(); + Vg(); + we(); + Xh = class extends Ho { + constructor(e, i, s, r, n, o, a, c, l) { + super(i, s, n, o, a, l); + this.b = e; + this.K = r; + this.L = c; + i.setRelaunchHandler(this); + } + H(e, i = false) { + return this.B(`linux-${process.arch}`, e, this.l, i); + } + N() { + return process.env.APPIMAGE !== undefined; + } + handleRelaunch(e) { + if (e?.addArgs || e?.removeArgs || this.state.type !== "ready") { + return false; + } else { + this.k.trace("update#handleRelaunch(): running raw#quitAndInstall()"); + if (this.N()) { + this.A(); + return true; + } else { + this.k.info("Not running in an appimage; cannot auto-update"); + return false; + } + } + } + async O(e, i) { + try { + const s = await this.j.request({ + url: i + }, We.None); + const r = await Rc(s); + if (!r || !r.url || !r.version || !r.productVersion) { + this.K.publicLog2("update:notAvailable", { + explicit: !!e + }); + this.f(fe.Idle(1)); + return false; + } else { + this.a = i; + this.r(); + if (this.N()) { + this.f(fe.Ready(r)); + } else { + this.f(fe.AvailableForDownload(r)); + } + return true; + } + } catch (s) { + this.k.error(s); + const r = e ? s.message || s : undefined; + this.f(fe.Idle(1, r)); + return false; + } + } + s() { + if (this.state.type === "ready") { + return this.state.update?.version; + } else { + return undefined; + } + } + async t(e) { + const i = await Rc(e); + if (i?.url) { + return i.version; + } else { + return undefined; + } + } + u(e, i) { + this.f(fe.Idle(1)); + } + async I(e) { + this.k.debug("UpdateService: doCheckForUpdates"); + this.f(fe.CheckingForUpdates(e)); + for (const i of [this.a]) { + if (i) { + try { + if (await this.O(e, i)) { + return; + } + } catch (s) { + this.k.error("Failed to check for updates:", s); + } + } + } + } + async x(e) { + if (this.l.downloadUrl && this.l.downloadUrl.length > 0) { + this.L.openExternal(undefined, this.l.downloadUrl); + } else if (e.update.url) { + this.L.openExternal(undefined, e.update.url); + } + this.f(fe.Idle(1)); + } + A() { + if (this.state.type !== "ready") { + this.k.info("update#quitAndInstall(): Not ready; skippingupdate"); + return; + } else if (this.N()) { + if (!this.state.update?.url) { + this.k.warn("update#quitAndInstall(): No update url; skipping update"); + return; + } + } else { + this.k.info("update#quitAndInstall(): Unsupported installer type; skipping update"); + return; + } + const e = process.env.APPIMAGE; + this.k.debug("update#quitAndInstall(): updating appImage at " + e); + const s = `${F(process.resourcesPath, "appimageupdatetool.AppImage")} -u "zsync|${this.state.update.url}" -O "${e}"; ${e} &`; + this.k.info("update#quitAndInstall(): starting updater with command " + s); + II(s, { + detached: true, + stdio: "inherit", + shell: true + }); + } + }; + Xh = __decorate([__param(1, Te), __param(2, Je), __param(3, Ot), __param(4, ot), __param(5, Sn), __param(6, V), __param(7, Or), __param(8, Ve)], Xh); + } + }); + import { spawn as CI } from "child_process"; + import { realpath as _I, watch as RI } from "fs"; + var Qh; + var ed; + var OI = g({ + "out-build/vs/platform/update/electron-main/updateService.snap.js"() { + "use strict"; + + ce(); + B(); + we(); + vt(); + ct(); + X(); + xt(); + Lr(); + Qh = class { + get state() { + return this.a; + } + d(e) { + this.g.info("update#setState", e.type); + this.a = e; + this.b.fire(e); + } + constructor(e, i, s) { + this.f = e; + this.g = s; + this.a = fe.Uninitialized; + this.b = new $(); + this.onStateChange = this.b.event; + if (i.disableUpdates) { + this.g.info("update#ctor - updates are disabled"); + return; + } + this.d(fe.Idle(this.k())); + this.h(30000).then(undefined, r => this.g.error(r)); + } + h(e = 3600000) { + return wi(e).then(() => this.checkForUpdates(false)).then(() => this.h(3600000)); + } + async checkForUpdates(e) { + this.g.trace("update#checkForUpdates, state = ", this.state.type); + if (this.state.type === "idle") { + this.m(e); + } + } + async downloadUpdate() { + this.g.trace("update#downloadUpdate, state = ", this.state.type); + if (this.state.type === "available for download") { + await this.i(this.state); + } + } + i(e) { + return Promise.resolve(undefined); + } + async applyUpdate() { + this.g.trace("update#applyUpdate, state = ", this.state.type); + if (this.state.type === "downloaded") { + await this.j(); + } + } + j() { + return Promise.resolve(undefined); + } + quitAndInstall() { + this.g.trace("update#quitAndInstall, state = ", this.state.type); + if (this.state.type === "ready") { + this.g.trace("update#quitAndInstall(): before lifecycle quit()"); + this.f.quit(true).then(e => { + this.g.trace(`update#quitAndInstall(): after lifecycle quit() with veto: ${e}`); + if (!e) { + this.g.trace("update#quitAndInstall(): running raw#quitAndInstall()"); + this.l(); + } + }); + } + return Promise.resolve(undefined); + } + k() { + return 2; + } + l() {} + async _applySpecificUpdate(e) {} + }; + Qh = __decorate([__param(0, Te), __param(1, ot), __param(2, V)], Qh); + ed = class extends Qh { + constructor(e, i, s, r, n, o) { + super(s, r, n); + this.o = e; + this.p = i; + this.q = o; + const a = RI(Xe(this.o)); + const c = x.fromNodeEventEmitter(a, "change", (f, p) => p); + const l = x.filter(c, f => f === "current"); + const d = x.debounce(l, (f, p) => p, 2000)(() => this.checkForUpdates(false)); + s.onWillShutdown(() => { + d.dispose(); + a.close(); + }); + } + m() { + this.d(fe.CheckingForUpdates(false)); + this.u().then(e => { + if (e) { + this.d(fe.Ready({ + version: "something" + })); + } else { + this.q.publicLog2("update:notAvailable", { + explicit: false + }); + this.d(fe.Idle(2)); + } + }, e => { + this.g.error(e); + this.q.publicLog2("update:notAvailable", { + explicit: false + }); + this.d(fe.Idle(2, e.message || e)); + }); + } + l() { + this.g.trace("update#quitAndInstall(): running raw#quitAndInstall()"); + CI("sleep 3 && " + Ue(process.argv[0]), { + shell: true, + detached: true, + stdio: "ignore" + }); + } + async u() { + const e = await new Promise((s, r) => _I(`${Xe(this.o)}/current`, (n, o) => n ? r(n) : s(o))); + const i = Ue(e); + return this.p !== i; + } + isLatestVersion() { + return this.u().then(undefined, e => { + this.g.error("update#checkForSnapUpdate(): Could not get realpath of application."); + }); + } + }; + ed = __decorate([__param(2, Te), __param(3, ot), __param(4, V), __param(5, Ot)], ed); + } + }); + import * as LI from "crypto"; + import * as MI from "fs"; + async function FI(t, e) { + if ((await new Promise((r, n) => { + const o = MI.createReadStream(t); + const a = LI.createHash("sha256"); + o.pipe(a); + const c = jl((l, u) => { + o.removeAllListeners(); + a.removeAllListeners(); + if (l) { + n(l); + } else { + r(u); + } + }); + o.once("error", c); + o.once("end", c); + a.once("error", c); + a.once("data", l => c(undefined, l.toString("hex"))); + })) !== e) { + throw new Error("Hash mismatch"); + } + } + var NI = g({ + "out-build/vs/base/node/crypto.js"() { + "use strict"; + + Ul(); + } + }); + import { spawn as l6 } from "child_process"; + import * as td from "fs"; + import { tmpdir as WI } from "os"; + async function TI(t, e = 1000) { + while (!t()) { + await wi(e); + } + } + function In() { + if (typeof id === "undefined") { + id = [F(Xe(process.execPath), "unins000.exe"), F(Xe(process.execPath), "Uninstall Cursor.exe"), F(Xe(process.execPath), "Uninstall Cursor Nightly.exe"), F(Xe(process.execPath), "Uninstall Cursor Lab.exe")].find(i => { + try { + return td.existsSync(i); + } catch { + return false; + } + }) ? 0 : 1; + } + return id; + } + var id; + var Vc; + var jI = g({ + "out-build/vs/platform/update/electron-main/updateService.win32.js"() { + "use strict"; + + ce(); + At(); + sn(); + er(); + we(); + se(); + NI(); + _t(); + Ke(); + vt(); + He(); + ct(); + X(); + Nc(); + ht(); + En(); + xt(); + Lr(); + Vg(); + id = undefined; + Vc = class extends Ho { + get cachePath() { + const e = Math.random().toString(36).substring(2, 15); + const i = F(WI(), `vscode-${this.l.quality}-${this.l.target}-${process.arch}-${e}`); + return td.promises.mkdir(i, { + recursive: true + }).then(() => i); + } + constructor(e, i, s, r, n, o, a, c, l, u) { + super(i, s, n, o, a, u); + this.b = e; + this.L = r; + this.M = c; + this.N = l; + i.setRelaunchHandler(this); + } + handleRelaunch(e) { + if (e?.addArgs || e?.removeArgs || this.state.type !== "ready" || !this.J) { + return false; + } else { + this.k.trace("update#handleRelaunch(): running raw#quitAndInstall()"); + this.A(); + return true; + } + } + async m() { + if (this.l.target === "user" && (await this.N.isAdmin(undefined))) { + this.f(fe.Disabled(5)); + this.k.info("update#ctor - updates are disabled due to running as Admin in user setup"); + return; + } + await super.m(); + } + H(e, i = false) { + let s = `win32-${process.arch}`; + if (In() === 1) { + s += "-archive"; + } else if (this.l.target === "user") { + s += "-user"; + } + return this.B(s, e, this.l, i); + } + s() { + if (this.state.type === "ready") { + if (this.J?.updateFilePath) { + return undefined; + } else { + return this.state.update?.version; + } + } + if (this.state.type === "downloaded") { + return this.state.update?.version; + } + } + async t(e) { + const i = await Rc(e); + if (i?.url) { + return i.version; + } else { + return undefined; + } + } + u(e, i) { + this.J = undefined; + this.f(fe.Idle(In())); + } + I(e) { + if (this.a) { + this.f(fe.CheckingForUpdates(e)); + this.j.request({ + url: this.a + }, We.None).then(Rc).then(i => { + const s = In(); + if (!i || !i.url || !i.version || !i.productVersion) { + this.L.publicLog2("update:notAvailable", { + explicit: !!e + }); + this.f(fe.Idle(s)); + return Promise.resolve(null); + } else if (s === 1) { + this.f(fe.AvailableForDownload(i)); + return Promise.resolve(null); + } else { + this.f(fe.Downloading); + return this.W(i.version).then(() => this.V(i.version).then(r => ee.exists(r).then(n => { + if (n) { + return Promise.resolve(r); + } + const o = `${r}.tmp`; + return this.j.request({ + url: i.url + }, We.None).then(a => { + if (!Fh(a)) { + throw new Error("Server returned " + a.res.statusCode); + } + if (M2(a)) { + throw new Error("Server returned no content"); + } + return a; + }).then(a => this.M.writeFile(P.file(o), a.stream)).then(i.sha256hash ? () => FI(o, i.sha256hash) : () => {}).then(() => ee.rename(o, r, false)).then(() => r); + })).then(r => { + this.J = { + packagePath: r + }; + this.f(fe.Downloaded(i)); + this.r(); + if (this.h.getValue("update.enableWindowsBackgroundUpdates")) { + if (this.l.target === "user") { + this.y(); + } + } else { + this.f(fe.Ready(i)); + } + })); + } + }).catch(i => { + this.L.publicLog2("update:error", { + messageHash: String(Ds(String(i))) + }); + this.k.error(i); + const s = e ? i.message || i : undefined; + this.f(fe.Idle(In(), s)); + }); + } + } + async x(e) { + if (e.update.url) { + this.N.openExternal(undefined, e.update.url); + } + this.f(fe.Idle(In())); + } + async V(e) { + const i = await this.cachePath; + return F(i, `CodeSetup-${this.l.quality}-${e}.exe`); + } + async W(e = null) { + const i = e ? o => !new RegExp(`${this.l.quality}-${e}\\.exe$`).test(o) : () => true; + const s = await this.cachePath; + const n = (await ee.readdir(s)).filter(i).map(async o => { + try { + await td.promises.unlink(F(s, o)); + } catch {} + }); + await Promise.all(n); + } + async y() { + if (this.state.type !== "downloaded" || !this.J) { + return Promise.resolve(undefined); + } + const e = this.state.update; + this.f(fe.Updating(e)); + const i = await this.cachePath; + this.J.updateFilePath = F(i, `CodeSetup-${this.l.quality}-${e.version}.flag`); + await ee.writeFile(this.J.updateFilePath, "flag"); + l6(this.J.packagePath, ["/verysilent", "/log", `/update="${this.J.updateFilePath}"`, "/nocloseapplications", "/mergetasks=runcode,!desktopicon,!quicklaunchicon"], { + detached: true, + stdio: ["ignore", "ignore", "ignore"], + windowsVerbatimArguments: true + }).once("exit", () => { + this.J = undefined; + this.f(fe.Idle(In())); + }); + const r = `${this.l.win32MutexName}-ready`; + const n = await import("@vscode/windows-mutex"); + TI(() => n.isActive(r)).then(() => { + this.f(fe.Ready(e)); + if (this.l.target !== "user") { + this.quitAndInstall(); + } + }); + } + A() { + if (this.state.type === "ready" && !!this.J) { + this.k.trace("update#quitAndInstall(): running raw#quitAndInstall()"); + if (this.J.updateFilePath) { + td.unlinkSync(this.J.updateFilePath); + } else { + l6(this.J.packagePath, ["/silent", "/log", "/mergetasks=runcode,!desktopicon,!quicklaunchicon"], { + detached: true, + stdio: ["ignore", "ignore", "ignore"] + }); + } + } + } + z() { + return In(); + } + async _applySpecificUpdate(e) { + if (this.state.type !== "idle") { + return; + } + const i = this.h.getValue("update.enableWindowsBackgroundUpdates"); + const s = { + version: "unknown", + productVersion: "unknown" + }; + this.f(fe.Downloading); + this.J = { + packagePath: e + }; + this.f(fe.Downloaded(s)); + if (i) { + if (this.l.target === "user") { + this.y(); + } + } else { + this.f(fe.Ready(s)); + } + } + }; + __decorate([de], Vc.prototype, "cachePath", null); + Vc = __decorate([__param(1, Te), __param(2, Je), __param(3, Ot), __param(4, ot), __param(5, Sn), __param(6, V), __param(7, at), __param(8, Or), __param(9, Ve)], Vc); + } + }); + var u6; + var h6; + var UI = g({ + "out-build/vs/platform/url/common/urlIpc.js"() { + "use strict"; + + se(); + u6 = class { + constructor(t) { + this.a = t; + } + handleURL(t, e) { + return this.a.call("handleURL", [t.toJSON(), e]); + } + }; + h6 = class { + constructor(t, e) { + this.a = t; + this.b = e; + } + async routeCall(t, e, i, s) { + if (e !== "handleURL") { + throw new Error(`Call not found: ${e}`); + } + if (Array.isArray(i) && i.length > 0) { + const r = P.revive(i[0]); + this.b.trace("URLHandlerRouter#routeCall() with URI argument", r.toString(true)); + if (r.query) { + const n = /\bwindowId=(\d+)/.exec(r.query); + if (n) { + const o = n[1]; + this.b.trace(`URLHandlerRouter#routeCall(): found windowId query parameter with value "${o}"`, r.toString(true)); + const a = new RegExp(`window:${o}`); + const c = t.connections.find(l => { + this.b.trace("URLHandlerRouter#routeCall(): testing connection", l.ctx); + return a.test(l.ctx); + }); + if (c) { + this.b.trace("URLHandlerRouter#routeCall(): found a connection to route", r.toString(true)); + return c; + } + this.b.trace("URLHandlerRouter#routeCall(): did not find a connection to route", r.toString(true)); + } else { + this.b.trace("URLHandlerRouter#routeCall(): did not find windowId query parameter", r.toString(true)); + } + } + } else { + this.b.trace("URLHandlerRouter#routeCall() without URI argument"); + } + return this.a.routeCall(t, e, i, s); + } + routeEvent(t, e) { + throw new Error(`Event not found: ${e}`); + } + }; + } + }); + var d6; + var sd; + var BI = g({ + "out-build/vs/platform/url/common/urlService.js"() { + "use strict"; + + ce(); + M(); + se(); + ht(); + d6 = class extends T { + constructor() { + super(...arguments); + this.a = new Set(); + } + open(t, e) { + const i = [...this.a.values()]; + return sk(i.map(s => () => s.handleURL(t, e)), undefined, false).then(s => s || false); + } + registerHandler(t) { + this.a.add(t); + return xe(() => this.a.delete(t)); + } + }; + sd = class extends d6 { + constructor(e) { + super(); + this.b = e; + } + create(e) { + let { + authority: i, + path: s, + query: r, + fragment: n + } = e || { + authority: undefined, + path: undefined, + query: undefined, + fragment: undefined + }; + if (i && s && s.indexOf("/") !== 0) { + s = `/${s}`; + } + return P.from({ + scheme: this.b.urlProtocol, + authority: i, + path: s, + query: r, + fragment: n + }); + } + }; + sd = __decorate([__param(0, Ve)], sd); + } + }); + import { app as f6 } from "electron"; + var p6; + var qI = g({ + "out-build/vs/platform/url/electron-main/electronUrlListener.js"() { + "use strict"; + + ce(); + B(); + M(); + H(); + se(); + p6 = class extends T { + constructor(t, e, i, s, r, n) { + super(); + this.c = e; + this.f = n; + this.a = []; + this.b = 0; + if (t) { + n.trace("ElectronURLListener initialUrisToHandle:", t.map(c => c.originalUrl)); + this.a = t; + } + if (j) { + const c = s.isBuilt ? [] : [`"${s.appRoot}"`]; + c.push("--open-url", "--"); + f6.setAsDefaultProtocolClient(r.urlProtocol, process.execPath, c); + } + const o = x.map(x.fromNodeEventEmitter(f6, "open-url", (c, l) => ({ + event: c, + url: l + })), ({ + event: c, + url: l + }) => { + c.preventDefault(); + return l; + }); + this.D(o(c => { + const l = this.g(c); + if (l) { + this.c.open(l, { + originalUrl: c + }); + } + })); + if (i.getWindows().filter(c => c.isReady).length > 0) { + n.trace("ElectronURLListener: window is ready to handle URLs"); + this.h(); + } else { + n.trace("ElectronURLListener: waiting for window to be ready to handle URLs..."); + this.D(x.once(i.onDidSignalReadyWindow)(() => this.h())); + } + } + g(t) { + try { + return P.parse(t); + } catch { + return; + } + } + async h() { + if (this.b++ > 10) { + this.f.trace("ElectronURLListener#flush(): giving up after 10 retries"); + return; + } + this.f.trace("ElectronURLListener#flush(): flushing URLs"); + const t = []; + for (const e of this.a) { + if (await this.c.open(e.uri, { + originalUrl: e.originalUrl + })) { + this.f.trace("ElectronURLListener#flush(): URL was handled", e.originalUrl); + } else { + this.f.trace("ElectronURLListener#flush(): URL was not yet handled", e.originalUrl); + t.push(e); + } + } + if (t.length !== 0) { + this.a = t; + ik(() => this.h(), 500, this.B); + } + } + }; + } + }); + var Gg; + var zI = g({ + "out-build/vs/platform/webview/common/webviewManagerService.js"() { + "use strict"; + + Y(); + Gg = q("webviewManagerService"); + } + }); + import { protocol as HI } from "electron"; + var g6; + var VI = g({ + "out-build/vs/platform/webview/electron-main/webviewProtocolProvider.js"() { + "use strict"; + + M(); + Ie(); + se(); + g6 = class lS extends T { + static { + this.a = new Map([["/index.html", "index.html"], ["/fake.html", "fake.html"], ["/service-worker.js", "service-worker.js"]]); + } + constructor() { + super(); + const e = this.b.bind(this); + HI.registerFileProtocol(R.vscodeWebview, e); + } + b(e, i) { + try { + const s = P.parse(e.url); + const r = lS.a.get(s.path); + if (typeof r == "string") { + const n = `vs/workbench/contrib/webview/browser/pre/${r}`; + const o = Ct.asFileUri(n); + return i({ + path: o.fsPath, + headers: { + ...Ha.getHeadersFromQuery(e.url), + "Cross-Origin-Resource-Policy": "cross-origin" + } + }); + } else { + return i({ + error: -10 + }); + } + } catch {} + return i({ + error: -2 + }); + } + }; + } + }); + import { webContents as GI } from "electron"; + var rd; + var JI = g({ + "out-build/vs/platform/webview/electron-main/webviewMainService.js"() { + "use strict"; + + B(); + M(); + VI(); + Lt(); + rd = class extends T { + constructor(e) { + super(); + this.b = e; + this.a = this.D(new $()); + this.onFoundInFrame = this.a.event; + this.D(new g6()); + } + async setIgnoreMenuShortcuts(e, i) { + let s; + if (typeof e.windowId == "number") { + const { + windowId: r + } = e; + const n = this.b.getWindowById(r); + if (!n?.win) { + throw new Error(`Invalid windowId: ${r}`); + } + s = n.win.webContents; + } else { + const { + webContentsId: r + } = e; + s = GI.fromId(r); + if (!s) { + throw new Error(`Invalid webContentsId: ${r}`); + } + } + if (!s.isDestroyed()) { + s.setIgnoreMenuShortcuts(i); + } + } + async findInFrame(e, i, s, r) { + const o = this.c(e, i); + if (typeof o.findInFrame == "function") { + o.findInFrame(s, { + findNext: r.findNext, + forward: r.forward + }); + const a = (c, l) => { + if (l.finalUpdate) { + this.a.fire(l); + o.removeListener("found-in-frame", a); + } + }; + o.on("found-in-frame", a); + } + } + async stopFindInFrame(e, i, s) { + const n = this.c(e, i); + if (typeof n.stopFindInFrame == "function") { + n.stopFindInFrame(s.keepSelection ? "keepSelection" : "clearSelection"); + } + } + c(e, i) { + const s = this.b.getWindowById(e.windowId); + if (!s?.win) { + throw new Error(`Invalid windowId: ${e}`); + } + const r = s.win.webContents.mainFrame.framesInSubtree.find(n => n.name === i); + if (!r) { + throw new Error(`Unknown frame: ${i}`); + } + return r; + } + }; + rd = __decorate([__param(0, dt)], rd); + } + }); + async function KI(t, e, i) { + let s = i && i.get("storage.serviceMachineId", -1) || null; + if (s) { + return s; + } + try { + const n = (await e.readFile(t.serviceMachineIdResource)).value.toString(); + s = Vk(n) ? n : null; + } catch { + s = null; + } + if (!s) { + s = ti(); + try { + await e.writeFile(t.serviceMachineIdResource, z.fromString(s)); + } catch {} + } + i?.store("storage.serviceMachineId", s, -1, 1); + return s; + } + var ZI = g({ + "out-build/vs/platform/externalServices/common/serviceMachineId.js"() { + "use strict"; + + Ze(); + _i(); + } + }); + async function YI(t, e, i, s, r, n) { + const o = { + "X-Market-Client-Id": `${Jg(t)} ${m6(t)}`, + "User-Agent": `${Jg(t)} ${m6(t)} (${XI(t)})` + }; + if (Q2(t, e) && Bg(i) === 3) { + const a = await KI(e, s, r); + o["X-Market-User-Id"] = a; + o[`${Jg(t)}-SessionId`] = n.machineId || a; + } + return o; + } + function Jg(t) { + if (t.extensionsGallery?.galleryId === "vscode" || t.extensionsGallery?.galleryId === "cursor") { + return "VSCode"; + } else { + return "Cursor"; + } + } + function m6(t) { + return t.vscodeVersion; + } + function XI(t) { + if (t.extensionsGallery?.galleryId === "vscode" || t.extensionsGallery?.galleryId === "cursor") { + return "Code"; + } else { + return t.nameShort; + } + } + var QI = g({ + "out-build/vs/platform/externalServices/common/marketplace.js"() { + "use strict"; + + ZI(); + $n(); + } + }); + function h(t, e) { + if (wt(e)) { + const i = Kg[e]; + if (i === undefined) { + throw new Error(`${t} references an unknown codicon: ${e}`); + } + e = i; + } + Kg[t] = e; + return { + id: t + }; + } + var Kg; + var w6 = g({ + "out-build/vs/base/common/codiconsUtil.js"() { + "use strict"; + + _e(); + Kg = Object.create(null); + } + }); + var v6; + var eA = g({ + "out-build/vs/base/common/codiconsLibrary.js"() { + "use strict"; + + w6(); + v6 = { + semantic: h("semantic", 62000), + githubCopilot: h("github-copilot", 62001), + plusCircle: h("plus-circle", 62002), + smileySad: h("smiley-sad", 62003), + smileyHappy: h("smiley-happy", 62004), + smileyMedium: h("smiley-medium", 62005), + sparkleStrikethrough: h("sparkle-strikethrough", 62006), + keyPlusSparkle: h("key-plus-sparkle", 62007), + paperclip: h("paperclip", 60500), + atSign: h("at-sign", 60501), + image: h("image", 60502), + logo: h("logo", 60503), + sparkleTwo: h("sparkle-two", 60504), + logoSlash: h("logo-slash", 60505), + add: h("add", 60000), + plus: h("plus", 60000), + gistNew: h("gist-new", 60000), + repoCreate: h("repo-create", 60000), + lightbulb: h("lightbulb", 60001), + lightBulb: h("light-bulb", 60001), + repo: h("repo", 60002), + repoDelete: h("repo-delete", 60002), + gistFork: h("gist-fork", 60003), + repoForked: h("repo-forked", 60003), + gitPullRequest: h("git-pull-request", 60004), + gitPullRequestAbandoned: h("git-pull-request-abandoned", 60004), + recordKeys: h("record-keys", 60005), + keyboard: h("keyboard", 60005), + tag: h("tag", 60006), + gitPullRequestLabel: h("git-pull-request-label", 60006), + tagAdd: h("tag-add", 60006), + tagRemove: h("tag-remove", 60006), + person: h("person", 60007), + personFollow: h("person-follow", 60007), + personOutline: h("person-outline", 60007), + personFilled: h("person-filled", 60007), + gitBranch: h("git-branch", 60008), + gitBranchCreate: h("git-branch-create", 60008), + gitBranchDelete: h("git-branch-delete", 60008), + sourceControl: h("source-control", 60008), + mirror: h("mirror", 60009), + mirrorPublic: h("mirror-public", 60009), + star: h("star", 60010), + starAdd: h("star-add", 60010), + starDelete: h("star-delete", 60010), + starEmpty: h("star-empty", 60010), + comment: h("comment", 60011), + commentAdd: h("comment-add", 60011), + alert: h("alert", 60012), + warning: h("warning", 60012), + search: h("search", 60013), + searchSave: h("search-save", 60013), + logOut: h("log-out", 60014), + signOut: h("sign-out", 60014), + logIn: h("log-in", 60015), + signIn: h("sign-in", 60015), + eye: h("eye", 60016), + eyeUnwatch: h("eye-unwatch", 60016), + eyeWatch: h("eye-watch", 60016), + circleFilled: h("circle-filled", 60017), + primitiveDot: h("primitive-dot", 60017), + closeDirty: h("close-dirty", 60017), + debugBreakpoint: h("debug-breakpoint", 60017), + debugBreakpointDisabled: h("debug-breakpoint-disabled", 60017), + debugHint: h("debug-hint", 60017), + terminalDecorationSuccess: h("terminal-decoration-success", 60017), + primitiveSquare: h("primitive-square", 60018), + edit: h("edit", 60019), + pencil: h("pencil", 60019), + info: h("info", 60020), + issueOpened: h("issue-opened", 60020), + gistPrivate: h("gist-private", 60021), + gitForkPrivate: h("git-fork-private", 60021), + lock: h("lock", 60021), + mirrorPrivate: h("mirror-private", 60021), + close: h("close", 60022), + removeClose: h("remove-close", 60022), + x: h("x", 60022), + repoSync: h("repo-sync", 60023), + sync: h("sync", 60023), + clone: h("clone", 60024), + desktopDownload: h("desktop-download", 60024), + beaker: h("beaker", 60025), + microscope: h("microscope", 60025), + vm: h("vm", 60026), + deviceDesktop: h("device-desktop", 60026), + file: h("file", 60027), + fileText: h("file-text", 60027), + more: h("more", 60028), + ellipsis: h("ellipsis", 60028), + kebabHorizontal: h("kebab-horizontal", 60028), + mailReply: h("mail-reply", 60029), + reply: h("reply", 60029), + organization: h("organization", 60030), + organizationFilled: h("organization-filled", 60030), + organizationOutline: h("organization-outline", 60030), + newFile: h("new-file", 60031), + fileAdd: h("file-add", 60031), + newFolder: h("new-folder", 60032), + fileDirectoryCreate: h("file-directory-create", 60032), + trash: h("trash", 60033), + trashcan: h("trashcan", 60033), + history: h("history", 60034), + clock: h("clock", 60034), + folder: h("folder", 60035), + fileDirectory: h("file-directory", 60035), + symbolFolder: h("symbol-folder", 60035), + logoGithub: h("logo-github", 60036), + markGithub: h("mark-github", 60036), + github: h("github", 60036), + terminal: h("terminal", 60037), + console: h("console", 60037), + repl: h("repl", 60037), + zap: h("zap", 60038), + symbolEvent: h("symbol-event", 60038), + error: h("error", 60039), + stop: h("stop", 60039), + variable: h("variable", 60040), + symbolVariable: h("symbol-variable", 60040), + array: h("array", 60042), + symbolArray: h("symbol-array", 60042), + symbolModule: h("symbol-module", 60043), + symbolPackage: h("symbol-package", 60043), + symbolNamespace: h("symbol-namespace", 60043), + symbolObject: h("symbol-object", 60043), + symbolMethod: h("symbol-method", 60044), + symbolFunction: h("symbol-function", 60044), + symbolConstructor: h("symbol-constructor", 60044), + symbolBoolean: h("symbol-boolean", 60047), + symbolNull: h("symbol-null", 60047), + symbolNumeric: h("symbol-numeric", 60048), + symbolNumber: h("symbol-number", 60048), + symbolStructure: h("symbol-structure", 60049), + symbolStruct: h("symbol-struct", 60049), + symbolParameter: h("symbol-parameter", 60050), + symbolTypeParameter: h("symbol-type-parameter", 60050), + symbolKey: h("symbol-key", 60051), + symbolText: h("symbol-text", 60051), + symbolReference: h("symbol-reference", 60052), + goToFile: h("go-to-file", 60052), + symbolEnum: h("symbol-enum", 60053), + symbolValue: h("symbol-value", 60053), + symbolRuler: h("symbol-ruler", 60054), + symbolUnit: h("symbol-unit", 60054), + activateBreakpoints: h("activate-breakpoints", 60055), + archive: h("archive", 60056), + arrowBoth: h("arrow-both", 60057), + arrowDown: h("arrow-down", 60058), + arrowLeft: h("arrow-left", 60059), + arrowRight: h("arrow-right", 60060), + arrowSmallDown: h("arrow-small-down", 60061), + arrowSmallLeft: h("arrow-small-left", 60062), + arrowSmallRight: h("arrow-small-right", 60063), + arrowSmallUp: h("arrow-small-up", 60064), + arrowUp: h("arrow-up", 60065), + bell: h("bell", 60066), + bold: h("bold", 60067), + book: h("book", 60068), + bookmark: h("bookmark", 60069), + debugBreakpointConditionalUnverified: h("debug-breakpoint-conditional-unverified", 60070), + debugBreakpointConditional: h("debug-breakpoint-conditional", 60071), + debugBreakpointConditionalDisabled: h("debug-breakpoint-conditional-disabled", 60071), + debugBreakpointDataUnverified: h("debug-breakpoint-data-unverified", 60072), + debugBreakpointData: h("debug-breakpoint-data", 60073), + debugBreakpointDataDisabled: h("debug-breakpoint-data-disabled", 60073), + debugBreakpointLogUnverified: h("debug-breakpoint-log-unverified", 60074), + debugBreakpointLog: h("debug-breakpoint-log", 60075), + debugBreakpointLogDisabled: h("debug-breakpoint-log-disabled", 60075), + briefcase: h("briefcase", 60076), + broadcast: h("broadcast", 60077), + browser: h("browser", 60078), + bug: h("bug", 60079), + calendar: h("calendar", 60080), + caseSensitive: h("case-sensitive", 60081), + check: h("check", 60082), + checklist: h("checklist", 60083), + chevronDown: h("chevron-down", 60084), + chevronLeft: h("chevron-left", 60085), + chevronRight: h("chevron-right", 60086), + chevronUp: h("chevron-up", 60087), + chromeClose: h("chrome-close", 60088), + chromeMaximize: h("chrome-maximize", 60089), + chromeMinimize: h("chrome-minimize", 60090), + chromeRestore: h("chrome-restore", 60091), + circleOutline: h("circle-outline", 60092), + circle: h("circle", 60092), + debugBreakpointUnverified: h("debug-breakpoint-unverified", 60092), + terminalDecorationIncomplete: h("terminal-decoration-incomplete", 60092), + circleSlash: h("circle-slash", 60093), + circuitBoard: h("circuit-board", 60094), + clearAll: h("clear-all", 60095), + clippy: h("clippy", 60096), + closeAll: h("close-all", 60097), + cloudDownload: h("cloud-download", 60098), + cloudUpload: h("cloud-upload", 60099), + code: h("code", 60100), + collapseAll: h("collapse-all", 60101), + colorMode: h("color-mode", 60102), + commentDiscussion: h("comment-discussion", 60103), + creditCard: h("credit-card", 60105), + dash: h("dash", 60108), + dashboard: h("dashboard", 60109), + database: h("database", 60110), + debugContinue: h("debug-continue", 60111), + debugDisconnect: h("debug-disconnect", 60112), + debugPause: h("debug-pause", 60113), + debugRestart: h("debug-restart", 60114), + debugStart: h("debug-start", 60115), + debugStepInto: h("debug-step-into", 60116), + debugStepOut: h("debug-step-out", 60117), + debugStepOver: h("debug-step-over", 60118), + debugStop: h("debug-stop", 60119), + debug: h("debug", 60120), + deviceCameraVideo: h("device-camera-video", 60121), + deviceCamera: h("device-camera", 60122), + deviceMobile: h("device-mobile", 60123), + diffAdded: h("diff-added", 60124), + diffIgnored: h("diff-ignored", 60125), + diffModified: h("diff-modified", 60126), + diffRemoved: h("diff-removed", 60127), + diffRenamed: h("diff-renamed", 60128), + diff: h("diff", 60129), + diffSidebyside: h("diff-sidebyside", 60129), + discard: h("discard", 60130), + editorLayout: h("editor-layout", 60131), + emptyWindow: h("empty-window", 60132), + exclude: h("exclude", 60133), + extensions: h("extensions", 60134), + eyeClosed: h("eye-closed", 60135), + fileBinary: h("file-binary", 60136), + fileCode: h("file-code", 60137), + fileMedia: h("file-media", 60138), + filePdf: h("file-pdf", 60139), + fileSubmodule: h("file-submodule", 60140), + fileSymlinkDirectory: h("file-symlink-directory", 60141), + fileSymlinkFile: h("file-symlink-file", 60142), + fileZip: h("file-zip", 60143), + files: h("files", 60144), + filter: h("filter", 60145), + flame: h("flame", 60146), + foldDown: h("fold-down", 60147), + foldUp: h("fold-up", 60148), + fold: h("fold", 60149), + folderActive: h("folder-active", 60150), + folderOpened: h("folder-opened", 60151), + gear: h("gear", 60152), + gift: h("gift", 60153), + gistSecret: h("gist-secret", 60154), + gist: h("gist", 60155), + gitCommit: h("git-commit", 60156), + gitCompare: h("git-compare", 60157), + compareChanges: h("compare-changes", 60157), + gitMerge: h("git-merge", 60158), + githubAction: h("github-action", 60159), + githubAlt: h("github-alt", 60160), + globe: h("globe", 60161), + grabber: h("grabber", 60162), + graph: h("graph", 60163), + gripper: h("gripper", 60164), + heart: h("heart", 60165), + home: h("home", 60166), + horizontalRule: h("horizontal-rule", 60167), + hubot: h("hubot", 60168), + inbox: h("inbox", 60169), + issueReopened: h("issue-reopened", 60171), + issues: h("issues", 60172), + italic: h("italic", 60173), + jersey: h("jersey", 60174), + json: h("json", 60175), + kebabVertical: h("kebab-vertical", 60176), + key: h("key", 60177), + law: h("law", 60178), + lightbulbAutofix: h("lightbulb-autofix", 60179), + linkExternal: h("link-external", 60180), + link: h("link", 60181), + listOrdered: h("list-ordered", 60182), + listUnordered: h("list-unordered", 60183), + liveShare: h("live-share", 60184), + loading: h("loading", 60185), + location: h("location", 60186), + mailRead: h("mail-read", 60187), + mail: h("mail", 60188), + markdown: h("markdown", 60189), + megaphone: h("megaphone", 60190), + mention: h("mention", 60191), + milestone: h("milestone", 60192), + gitPullRequestMilestone: h("git-pull-request-milestone", 60192), + mortarBoard: h("mortar-board", 60193), + move: h("move", 60194), + multipleWindows: h("multiple-windows", 60195), + mute: h("mute", 60196), + noNewline: h("no-newline", 60197), + note: h("note", 60198), + octoface: h("octoface", 60199), + openPreview: h("open-preview", 60200), + package: h("package", 60201), + paintcan: h("paintcan", 60202), + pin: h("pin", 60203), + play: h("play", 60204), + run: h("run", 60204), + plug: h("plug", 60205), + preserveCase: h("preserve-case", 60206), + preview: h("preview", 60207), + project: h("project", 60208), + pulse: h("pulse", 60209), + question: h("question", 60210), + quote: h("quote", 60211), + radioTower: h("radio-tower", 60212), + reactions: h("reactions", 60213), + references: h("references", 60214), + refresh: h("refresh", 60215), + regex: h("regex", 60216), + remoteExplorer: h("remote-explorer", 60217), + remote: h("remote", 60218), + remove: h("remove", 60219), + replaceAll: h("replace-all", 60220), + replace: h("replace", 60221), + repoClone: h("repo-clone", 60222), + repoForcePush: h("repo-force-push", 60223), + repoPull: h("repo-pull", 60224), + repoPush: h("repo-push", 60225), + report: h("report", 60226), + requestChanges: h("request-changes", 60227), + rocket: h("rocket", 60228), + rootFolderOpened: h("root-folder-opened", 60229), + rootFolder: h("root-folder", 60230), + rss: h("rss", 60231), + ruby: h("ruby", 60232), + saveAll: h("save-all", 60233), + saveAs: h("save-as", 60234), + save: h("save", 60235), + screenFull: h("screen-full", 60236), + screenNormal: h("screen-normal", 60237), + searchStop: h("search-stop", 60238), + server: h("server", 60240), + settingsGear: h("settings-gear", 60241), + settings: h("settings", 60242), + shield: h("shield", 60243), + smiley: h("smiley", 60244), + sortPrecedence: h("sort-precedence", 60245), + splitHorizontal: h("split-horizontal", 60246), + splitVertical: h("split-vertical", 60247), + squirrel: h("squirrel", 60248), + starFull: h("star-full", 60249), + starHalf: h("star-half", 60250), + symbolClass: h("symbol-class", 60251), + symbolColor: h("symbol-color", 60252), + symbolConstant: h("symbol-constant", 60253), + symbolEnumMember: h("symbol-enum-member", 60254), + symbolField: h("symbol-field", 60255), + symbolFile: h("symbol-file", 60256), + symbolInterface: h("symbol-interface", 60257), + symbolKeyword: h("symbol-keyword", 60258), + symbolMisc: h("symbol-misc", 60259), + symbolOperator: h("symbol-operator", 60260), + symbolProperty: h("symbol-property", 60261), + wrench: h("wrench", 60261), + wrenchSubaction: h("wrench-subaction", 60261), + symbolSnippet: h("symbol-snippet", 60262), + tasklist: h("tasklist", 60263), + telescope: h("telescope", 60264), + textSize: h("text-size", 60265), + threeBars: h("three-bars", 60266), + thumbsdown: h("thumbsdown", 60267), + thumbsup: h("thumbsup", 60268), + tools: h("tools", 60269), + triangleDown: h("triangle-down", 60270), + triangleLeft: h("triangle-left", 60271), + triangleRight: h("triangle-right", 60272), + triangleUp: h("triangle-up", 60273), + twitter: h("twitter", 60274), + unfold: h("unfold", 60275), + unlock: h("unlock", 60276), + unmute: h("unmute", 60277), + unverified: h("unverified", 60278), + verified: h("verified", 60279), + versions: h("versions", 60280), + vmActive: h("vm-active", 60281), + vmOutline: h("vm-outline", 60282), + vmRunning: h("vm-running", 60283), + watch: h("watch", 60284), + whitespace: h("whitespace", 60285), + wholeWord: h("whole-word", 60286), + window: h("window", 60287), + wordWrap: h("word-wrap", 60288), + zoomIn: h("zoom-in", 60289), + zoomOut: h("zoom-out", 60290), + listFilter: h("list-filter", 60291), + listFlat: h("list-flat", 60292), + listSelection: h("list-selection", 60293), + selection: h("selection", 60293), + listTree: h("list-tree", 60294), + debugBreakpointFunctionUnverified: h("debug-breakpoint-function-unverified", 60295), + debugBreakpointFunction: h("debug-breakpoint-function", 60296), + debugBreakpointFunctionDisabled: h("debug-breakpoint-function-disabled", 60296), + debugStackframeActive: h("debug-stackframe-active", 60297), + circleSmallFilled: h("circle-small-filled", 60298), + debugStackframeDot: h("debug-stackframe-dot", 60298), + terminalDecorationMark: h("terminal-decoration-mark", 60298), + debugStackframe: h("debug-stackframe", 60299), + debugStackframeFocused: h("debug-stackframe-focused", 60299), + debugBreakpointUnsupported: h("debug-breakpoint-unsupported", 60300), + symbolString: h("symbol-string", 60301), + debugReverseContinue: h("debug-reverse-continue", 60302), + debugStepBack: h("debug-step-back", 60303), + debugRestartFrame: h("debug-restart-frame", 60304), + debugAlt: h("debug-alt", 60305), + callIncoming: h("call-incoming", 60306), + callOutgoing: h("call-outgoing", 60307), + menu: h("menu", 60308), + expandAll: h("expand-all", 60309), + feedback: h("feedback", 60310), + gitPullRequestReviewer: h("git-pull-request-reviewer", 60310), + groupByRefType: h("group-by-ref-type", 60311), + ungroupByRefType: h("ungroup-by-ref-type", 60312), + account: h("account", 60313), + gitPullRequestAssignee: h("git-pull-request-assignee", 60313), + bellDot: h("bell-dot", 60314), + debugConsole: h("debug-console", 60315), + library: h("library", 60316), + output: h("output", 60317), + runAll: h("run-all", 60318), + syncIgnored: h("sync-ignored", 60319), + pinned: h("pinned", 60320), + githubInverted: h("github-inverted", 60321), + serverProcess: h("server-process", 60322), + serverEnvironment: h("server-environment", 60323), + pass: h("pass", 60324), + issueClosed: h("issue-closed", 60324), + stopCircle: h("stop-circle", 60325), + playCircle: h("play-circle", 60326), + record: h("record", 60327), + debugAltSmall: h("debug-alt-small", 60328), + vmConnect: h("vm-connect", 60329), + cloud: h("cloud", 60330), + merge: h("merge", 60331), + export: h("export", 60332), + graphLeft: h("graph-left", 60333), + magnet: h("magnet", 60334), + notebook: h("notebook", 60335), + redo: h("redo", 60336), + checkAll: h("check-all", 60337), + pinnedDirty: h("pinned-dirty", 60338), + passFilled: h("pass-filled", 60339), + circleLargeFilled: h("circle-large-filled", 60340), + circleLarge: h("circle-large", 60341), + circleLargeOutline: h("circle-large-outline", 60341), + combine: h("combine", 60342), + gather: h("gather", 60342), + table: h("table", 60343), + variableGroup: h("variable-group", 60344), + typeHierarchy: h("type-hierarchy", 60345), + typeHierarchySub: h("type-hierarchy-sub", 60346), + typeHierarchySuper: h("type-hierarchy-super", 60347), + gitPullRequestCreate: h("git-pull-request-create", 60348), + runAbove: h("run-above", 60349), + runBelow: h("run-below", 60350), + notebookTemplate: h("notebook-template", 60351), + debugRerun: h("debug-rerun", 60352), + workspaceTrusted: h("workspace-trusted", 60353), + workspaceUntrusted: h("workspace-untrusted", 60354), + workspaceUnknown: h("workspace-unknown", 60355), + terminalCmd: h("terminal-cmd", 60356), + terminalDebian: h("terminal-debian", 60357), + terminalLinux: h("terminal-linux", 60358), + terminalPowershell: h("terminal-powershell", 60359), + terminalTmux: h("terminal-tmux", 60360), + terminalUbuntu: h("terminal-ubuntu", 60361), + terminalBash: h("terminal-bash", 60362), + arrowSwap: h("arrow-swap", 60363), + copy: h("copy", 60364), + personAdd: h("person-add", 60365), + filterFilled: h("filter-filled", 60366), + wand: h("wand", 60367), + debugLineByLine: h("debug-line-by-line", 60368), + inspect: h("inspect", 60369), + layers: h("layers", 60370), + layersDot: h("layers-dot", 60371), + layersActive: h("layers-active", 60372), + compass: h("compass", 60373), + compassDot: h("compass-dot", 60374), + compassActive: h("compass-active", 60375), + azure: h("azure", 60376), + issueDraft: h("issue-draft", 60377), + gitPullRequestClosed: h("git-pull-request-closed", 60378), + gitPullRequestDraft: h("git-pull-request-draft", 60379), + debugAll: h("debug-all", 60380), + debugCoverage: h("debug-coverage", 60381), + runErrors: h("run-errors", 60382), + folderLibrary: h("folder-library", 60383), + debugContinueSmall: h("debug-continue-small", 60384), + beakerStop: h("beaker-stop", 60385), + graphLine: h("graph-line", 60386), + graphScatter: h("graph-scatter", 60387), + pieChart: h("pie-chart", 60388), + bracket: h("bracket", 60175), + bracketDot: h("bracket-dot", 60389), + bracketError: h("bracket-error", 60390), + lockSmall: h("lock-small", 60391), + azureDevops: h("azure-devops", 60392), + verifiedFilled: h("verified-filled", 60393), + newline: h("newline", 60394), + layout: h("layout", 60395), + layoutActivitybarLeft: h("layout-activitybar-left", 60396), + layoutActivitybarRight: h("layout-activitybar-right", 60397), + layoutPanelLeft: h("layout-panel-left", 60398), + layoutPanelCenter: h("layout-panel-center", 60399), + layoutPanelJustify: h("layout-panel-justify", 60400), + layoutPanelRight: h("layout-panel-right", 60401), + layoutPanel: h("layout-panel", 60402), + layoutSidebarLeft: h("layout-sidebar-left", 60403), + layoutSidebarRight: h("layout-sidebar-right", 60404), + layoutStatusbar: h("layout-statusbar", 60405), + layoutMenubar: h("layout-menubar", 60406), + layoutCentered: h("layout-centered", 60407), + target: h("target", 60408), + indent: h("indent", 60409), + recordSmall: h("record-small", 60410), + errorSmall: h("error-small", 60411), + terminalDecorationError: h("terminal-decoration-error", 60411), + arrowCircleDown: h("arrow-circle-down", 60412), + arrowCircleLeft: h("arrow-circle-left", 60413), + arrowCircleRight: h("arrow-circle-right", 60414), + arrowCircleUp: h("arrow-circle-up", 60415), + layoutSidebarRightOff: h("layout-sidebar-right-off", 60416), + layoutPanelOff: h("layout-panel-off", 60417), + layoutSidebarLeftOff: h("layout-sidebar-left-off", 60418), + blank: h("blank", 60419), + heartFilled: h("heart-filled", 60420), + map: h("map", 60421), + mapHorizontal: h("map-horizontal", 60421), + foldHorizontal: h("fold-horizontal", 60421), + mapFilled: h("map-filled", 60422), + mapHorizontalFilled: h("map-horizontal-filled", 60422), + foldHorizontalFilled: h("fold-horizontal-filled", 60422), + circleSmall: h("circle-small", 60423), + bellSlash: h("bell-slash", 60424), + bellSlashDot: h("bell-slash-dot", 60425), + commentUnresolved: h("comment-unresolved", 60426), + gitPullRequestGoToChanges: h("git-pull-request-go-to-changes", 60427), + gitPullRequestNewChanges: h("git-pull-request-new-changes", 60428), + searchFuzzy: h("search-fuzzy", 60429), + commentDraft: h("comment-draft", 60430), + send: h("send", 60431), + sparkle: h("sparkle", 60432), + insert: h("insert", 60433), + mic: h("mic", 60434), + thumbsdownFilled: h("thumbsdown-filled", 60435), + thumbsupFilled: h("thumbsup-filled", 60436), + coffee: h("coffee", 60437), + snake: h("snake", 60438), + game: h("game", 60439), + vr: h("vr", 60440), + chip: h("chip", 60441), + piano: h("piano", 60442), + music: h("music", 60443), + micFilled: h("mic-filled", 60444), + repoFetch: h("repo-fetch", 60445), + copilot: h("copilot", 60446), + lightbulbSparkle: h("lightbulb-sparkle", 60447), + robot: h("robot", 60448), + sparkleFilled: h("sparkle-filled", 60449), + diffSingle: h("diff-single", 60450), + diffMultiple: h("diff-multiple", 60451), + surroundWith: h("surround-with", 60452), + share: h("share", 60453), + gitStash: h("git-stash", 60454), + gitStashApply: h("git-stash-apply", 60455), + gitStashPop: h("git-stash-pop", 60456), + vscode: h("vscode", 60457), + vscodeInsiders: h("vscode-insiders", 60458), + codeOss: h("code-oss", 60459), + runCoverage: h("run-coverage", 60460), + runAllCoverage: h("run-all-coverage", 60461), + coverage: h("coverage", 60462), + githubProject: h("github-project", 60463), + mapVertical: h("map-vertical", 60464), + foldVertical: h("fold-vertical", 60464), + mapVerticalFilled: h("map-vertical-filled", 60465), + foldVerticalFilled: h("fold-vertical-filled", 60465), + goToSearch: h("go-to-search", 60466), + percentage: h("percentage", 60467), + sortPercentage: h("sort-percentage", 60467), + attach: h("attach", 60468), + goToEditingSession: h("go-to-editing-session", 60469), + editSession: h("edit-session", 60470), + codeReview: h("code-review", 60471), + copilotWarning: h("copilot-warning", 60472), + python: h("python", 60473), + copilotLarge: h("copilot-large", 60474), + copilotWarningLarge: h("copilot-warning-large", 60475), + terminalTwo: h("terminal-two", 60800), + checkTwo: h("check-two", 60801), + xTwo: h("x-two", 60802), + expander: h("expander", 60803), + restore: h("restore", 60804), + pinTwo: h("pin-two", 60805), + stopTwo: h("stop-two", 60806), + brain: h("brain", 60807), + magnifyingGlass: h("magnifying-glass", 60808), + imageTwo: h("image-two", 60809), + microphone: h("microphone", 60810), + submit: h("submit", 60811), + running: h("running", 60812), + fileAddTwo: h("file-add-two", 60813), + infinity: h("infinity", 60814), + editTwo: h("edit-two", 60815), + stopThree: h("stop-three", 60816), + warningTwo: h("warning-two", 60817), + arrowLeftTwo: h("arrow-left-two", 60818), + redoTwo: h("redo-two", 60819), + infoTwo: h("info-two", 60820), + chat: h("chat", 60821), + thumbsDown: h("thumbs-down", 60822), + thumbsUp: h("thumbs-up", 60823), + thumbsDownFilled: h("thumbs-down-filled", 60824), + thumbsUpFilled: h("thumbs-up-filled", 60825), + copyTwo: h("copy-two", 60826), + ellipsisTwo: h("ellipsis-two", 60827), + eyeTwo: h("eye-two", 60828), + globeTwo: h("globe-two", 60829), + reload: h("reload", 60830), + folderTwo: h("folder-two", 60831), + eraser: h("eraser", 60832), + swirlSparkle: h("swirl-sparkle", 60833), + sendTwo: h("send-two", 60834), + inboxTwo: h("inbox-two", 60835), + fileTwo: h("file-two", 60836), + list: h("list", 60837), + calendarTwo: h("calendar-two", 60838), + openNotebook: h("open-notebook", 60839), + paperWords: h("paper-words", 60840), + mortarboard: h("mortarboard", 60841), + lightning: h("lightning", 60842), + hammer: h("hammer", 60843), + keyboardTwo: h("keyboard-two", 60844), + arrowUpTwo: h("arrow-up-two", 60845), + import: h("import", 60846), + targetTwo: h("target-two", 60847), + tab: h("tab", 60848), + magic: h("magic", 60849), + cloneTwo: h("clone-two", 60850), + brush: h("brush", 60851), + branch: h("branch", 60852), + addTwo: h("add-two", 60853), + historyTwo: h("history-two", 60854), + cloudTwo: h("cloud-two", 60855), + review: h("review", 60856), + plusSquare: h("plus-square", 60857), + checkCircled: h("check-circled", 60858), + dottedCircle: h("dotted-circle", 60859), + warnCircle: h("warn-circle", 60860), + downLocalMachine: h("down-local-machine", 60861), + mergeUpwards: h("merge-upwards", 60862), + asterisk: h("asterisk", 60863), + time: h("time", 60864), + arrowUpRight: h("arrow-up-right", 60865), + arrowUpRightSquare: h("arrow-up-right-square", 60866), + bubbleAndPencil: h("bubble-and-pencil", 60867), + downloadOnSquare: h("download-on-square", 60868), + shippingBox: h("shipping-box", 60869) + }; + } + }); + function b6() { + return Object.values(Si); + } + var y6; + var Si; + var nd = g({ + "out-build/vs/base/common/codicons.js"() { + "use strict"; + + w6(); + eA(); + y6 = { + dialogError: h("dialog-error", "error"), + dialogWarning: h("dialog-warning", "warning"), + dialogInfo: h("dialog-info", "info"), + dialogClose: h("dialog-close", "close"), + treeItemExpanded: h("tree-item-expanded", "chevron-down"), + treeFilterOnTypeOn: h("tree-filter-on-type-on", "list-filter"), + treeFilterOnTypeOff: h("tree-filter-on-type-off", "list-selection"), + treeFilterClear: h("tree-filter-clear", "close"), + treeItemLoading: h("tree-item-loading", "loading"), + menuSelection: h("menu-selection", "check"), + menuSubmenu: h("menu-submenu", "chevron-right"), + menuBarMore: h("menubar-more", "more"), + scrollbarButtonLeft: h("scrollbar-button-left", "triangle-left"), + scrollbarButtonRight: h("scrollbar-button-right", "triangle-right"), + scrollbarButtonUp: h("scrollbar-button-up", "triangle-up"), + scrollbarButtonDown: h("scrollbar-button-down", "triangle-down"), + toolBarMore: h("toolbar-more", "more"), + quickInputBack: h("quick-input-back", "arrow-left"), + dropDownButton: h("drop-down-button", 60084), + symbolCustomColor: h("symbol-customcolor", 60252), + exportIcon: h("export", 60332), + workspaceUnspecified: h("workspace-unspecified", 60355), + newLine: h("newline", 60394), + gitFetch: h("git-fetch", 60445), + lightbulbSparkleAutofix: h("lightbulb-sparkle-autofix", 60447), + debugBreakpointPending: h("debug-breakpoint-pending", 60377) + }; + Si = { + ...v6, + ...y6 + }; + } + }); + var Zg; + var Gc; + var S6 = g({ + "out-build/vs/base/common/themables.js"() { + "use strict"; + + nd(); + (function (t) { + function e(i) { + return i && typeof i == "object" && typeof i.id == "string"; + } + t.isThemeColor = e; + })(Zg ||= {}); + (function (t) { + t.iconNameSegment = "[A-Za-z0-9]+"; + t.iconNameExpression = "[A-Za-z0-9-]+"; + t.iconModifierExpression = "~[A-Za-z]+"; + t.iconNameCharacter = "[A-Za-z0-9~-]"; + const e = new RegExp(`^(${t.iconNameExpression})(${t.iconModifierExpression})?$`); + function i(f) { + const p = e.exec(f.id); + if (!p) { + return i(Si.error); + } + const [, w, m] = p; + const y = ["codicon", "codicon-" + w]; + if (m) { + y.push("codicon-modifier-" + m.substring(1)); + } + return y; + } + t.asClassNameArray = i; + function s(f) { + const p = e.exec(f.id); + if (!p) { + return s(Si.error); + } + const [, w, m] = p; + let y = `codicon codicon-${w}`; + if (m) { + y += ` codicon-modifier-${m.substring(1)}`; + } + return y; + } + t.asClassName = s; + function r(f) { + const p = e.exec(f.id); + if (!p) { + return r(Si.error); + } + const [, w, m] = p; + let y = `.codicon.codicon-${w}`; + if (m) { + y += `.codicon-modifier-${m.substring(1)}`; + } + return y; + } + t.asCSSSelector = r; + function n(f) { + return f && typeof f == "object" && typeof f.id == "string" && (typeof f.color === "undefined" || Zg.isThemeColor(f.color)); + } + t.isThemeIcon = n; + const o = new RegExp(`^\\$\\((${t.iconNameExpression}(?:${t.iconModifierExpression})?)\\)$`); + function a(f) { + const p = o.exec(f); + if (!p) { + return; + } + const [, w] = p; + return { + id: w + }; + } + t.fromString = a; + function c(f) { + return { + id: f + }; + } + t.fromId = c; + function l(f, p) { + let w = f.id; + const m = w.lastIndexOf("~"); + if (m !== -1) { + w = w.substring(0, m); + } + if (p) { + w = `${w}~${p}`; + } + return { + id: w + }; + } + t.modify = l; + function u(f) { + const p = f.id.lastIndexOf("~"); + if (p !== -1) { + return f.id.substring(p + 1); + } + } + t.getModifier = u; + function d(f, p) { + return f.id === p.id && f.color?.id === p.color?.id; + } + t.isEqual = d; + })(Gc ||= {}); + } + }); + import Mi from "electron"; + import { release as tA } from "os"; + var E6; + var Yg; + var Jc; + var k6; + var x6 = g({ + "out-build/vs/platform/windows/electron-main/windowImpl.js"() { + "use strict"; + + ce(); + At(); + en(); + B(); + M(); + Ie(); + Hs(); + H(); + se(); + be(); + wc(); + Ke(); + wn(); + vt(); + kc(); + He(); + ct(); + X(); + ht(); + Wh(); + QI(); + eh(); + xt(); + S6(); + pc(); + fn(); + Lt(); + ri(); + vn(); + mc(); + Ls(); + Ti(); + un(); + zc(); + Y(); + b1(); + Ze(); + Cc(); + $e(); + (function (t) { + t[t.NONE = 0] = "NONE"; + t[t.NAVIGATING = 1] = "NAVIGATING"; + t[t.READY = 2] = "READY"; + })(E6 ||= {}); + Yg = class uS extends T { + get lastFocusTime() { + return this.n; + } + get win() { + return this.q; + } + get webContents() { + return this.r; + } + s(e, i) { + this.q = e; + this.D(x.fromNodeEventEmitter(e, "maximize")(() => this.f.fire())); + this.D(x.fromNodeEventEmitter(e, "unmaximize")(() => this.g.fire())); + this.D(x.fromNodeEventEmitter(e, "closed")(() => { + this.c.fire(); + this.dispose(); + })); + this.D(x.fromNodeEventEmitter(e, "focus")(() => { + this.n = Date.now(); + })); + this.D(x.fromNodeEventEmitter(this.q, "enter-full-screen")(() => this.j.fire())); + this.D(x.fromNodeEventEmitter(this.q, "leave-full-screen")(() => this.m.fire())); + const s = !dn(this.t, i?.titleBarStyle === "hidden" ? "custom" : undefined); + if (N && s) { + e.setSheetOffset(FS(tA()) ? 28 : 22); + } + if (s && (W1(this.t) || N)) { + const r = this.u.getItem(uS.H); + if (r) { + this.updateWindowControls({ + height: r + }); + } else { + this.updateWindowControls({ + height: F4 + }); + } + } + if (j && s) { + e.hookWindowMessage(278, () => { + const [n, o] = e.getPosition(); + const a = Mi.screen.getCursorScreenPoint(); + const c = a.x - n; + const l = a.y - o; + if (!!(c > 30) && !!(l >= 0) && !!(l <= Math.max(e.getBounds().height * 0.15, 35))) { + e.setEnabled(false); + e.setEnabled(true); + this.h.fire({ + x: c, + y: l + }); + } + return 0; + }); + } + if (this.w.args["open-devtools"] === true) { + e.webContents.openDevTools(); + } + if (N) { + this.D(this.onDidEnterFullScreen(() => { + this.L?.complete(true); + })); + this.D(this.onDidLeaveFullScreen(() => { + this.L?.complete(true); + })); + } + } + constructor(e, i, s, r) { + super(); + this.t = e; + this.u = i; + this.w = s; + this.z = r; + this.c = this.D(new $()); + this.onDidClose = this.c.event; + this.f = this.D(new $()); + this.onDidMaximize = this.f.event; + this.g = this.D(new $()); + this.onDidUnmaximize = this.g.event; + this.h = this.D(new $()); + this.onDidTriggerSystemContextMenu = this.h.event; + this.j = this.D(new $()); + this.onDidEnterFullScreen = this.j.event; + this.m = this.D(new $()); + this.onDidLeaveFullScreen = this.m.event; + this.n = Date.now(); + this.q = null; + this.r = undefined; + this.I = W1(this.t); + this.J = undefined; + this.L = undefined; + } + C(e, i, s = Mi.screen.getAllDisplays().length > 0) { + const r = this.t.getValue("window"); + const n = N && r?.nativeTabs === true; + if ((N || j) && s && (!n || Mi.BrowserWindow.getAllWindows().length === 1) && [e.width, e.height, e.x, e.y].every(o => typeof o == "number")) { + this.q?.setBounds({ + width: e.width, + height: e.height, + x: e.x, + y: e.y + }); + } + if ((e.mode === 0 || e.mode === 3) && !i.hideBecauseShadowWindow) { + this.q?.maximize(); + if (e.mode === 3) { + this.M(true, true); + } + this.q?.show(); + } + } + setRepresentedFilename(e) { + if (N) { + this.win?.setRepresentedFilename(e); + } else { + this.F = e; + } + } + getRepresentedFilename() { + if (N) { + return this.win?.getRepresentedFilename(); + } else { + return this.F; + } + } + setDocumentEdited(e) { + if (N) { + this.win?.setDocumentEdited(e); + } + this.G = e; + } + isDocumentEdited() { + if (N) { + return !!this.win?.isDocumentEdited(); + } else { + return !!this.G; + } + } + focus(e) { + if (N && e?.force) { + Mi.app.focus({ + steal: true + }); + } + const i = this.win; + if (i) { + if (i.isMinimized()) { + i.restore(); + } + i.focus(); + } + } + handleTitleDoubleClick() { + const e = this.win; + if (e) { + if (N) { + switch (Mi.systemPreferences.getUserDefault("AppleActionOnDoubleClick", "string")) { + case "Minimize": + e.minimize(); + break; + case "None": + break; + case "Maximize": + default: + if (e.isMaximized()) { + e.unmaximize(); + } else { + e.maximize(); + } + } + } else if (e.isMaximized()) { + e.unmaximize(); + } else { + e.maximize(); + } + } + } + static { + this.H = "windowControlHeight"; + } + updateWindowControls(e) { + const i = this.win; + if (i) { + if (e.height) { + this.u.setItem(Jc.H, e.height); + } + if (this.I) { + i.setTitleBarOverlay({ + color: e.backgroundColor?.trim() === "" ? undefined : e.backgroundColor, + symbolColor: e.foregroundColor?.trim() === "" ? undefined : e.foregroundColor, + height: e.height ? e.height - 1 : undefined + }); + } else if (N && e.height !== undefined) { + const s = (e.height - 15) / 2; + if (s) { + i.setWindowButtonPosition({ + x: s, + y: s + }); + } else { + i.setWindowButtonPosition(null); + } + } + } + } + toggleFullScreen() { + this.M(!this.isFullScreen, false); + } + M(e, i) { + if (_4(this.t)) { + this.N(e, i); + } else { + this.P(e); + } + } + get isFullScreen() { + if (N && typeof this.J == "boolean") { + return this.J; + } + const e = this.win; + const i = e?.isFullScreen(); + const s = e?.isSimpleFullScreen(); + return !!i || !!s; + } + N(e, i) { + const s = this.win; + if (s?.isSimpleFullScreen()) { + s?.setSimpleFullScreen(false); + } + this.O(e, i); + } + O(e, i) { + if (N) { + this.J = e; + const r = this.L = new Xs(); + (async () => { + const n = await Promise.race([r.p, wi(10000).then(() => false)]); + if (this.L === r) { + this.J = undefined; + this.L = undefined; + if (!n && e && i && this.win && !this.win.isFullScreen()) { + this.z.warn("window: native macOS fullscreen transition did not happen within 10s from restoring"); + this.m.fire(); + } + } + })(); + } + this.win?.setFullScreen(e); + } + P(e) { + const i = this.win; + if (i?.isFullScreen()) { + this.O(false, false); + } + i?.setSimpleFullScreen(e); + i?.webContents.focus(); + } + dispose() { + super.dispose(); + this.q = null; + } + }; + Jc = class extends Yg { + get id() { + return this.U; + } + get webContents() { + return this.q?.webContents ?? this.browserView?.webContents; + } + get backupPath() { + return this.X?.backupPath; + } + get openedWorkspace() { + return this.X?.workspace; + } + get profile() { + if (!this.config) { + return; + } + const e = this.ob.profiles.find(i => i.id === this.config?.profiles.profile.id); + if (this.isExtensionDevelopmentHost && e) { + return e; + } else { + return this.ob.getProfileForWorkspace(this.config.workspace ?? ju(this.backupPath, this.isExtensionDevelopmentHost)) ?? this.ob.defaultProfile; + } + } + get remoteAuthority() { + return this.X?.remoteAuthority; + } + get config() { + return this.X; + } + get isExtensionDevelopmentHost() { + return !!this.X?.extensionDevelopmentPath; + } + get isExtensionTestHost() { + return !!this.X?.extensionTestsPath; + } + get isExtensionDevelopmentTestFromCli() { + return this.isExtensionDevelopmentHost && this.isExtensionTestHost && !this.X?.debugId; + } + constructor(e, i, s, r, n, o, a, c, l, u, d, f, p, w, m, y, b, k, A, C, _, Z) { + super(u, C, r, i); + this.mb = s; + this.nb = n; + this.ob = o; + this.pb = a; + this.qb = c; + this.rb = l; + this.sb = d; + this.tb = f; + this.ub = p; + this.vb = w; + this.wb = m; + this.xb = y; + this.yb = b; + this.zb = k; + this.Ab = A; + this.Bb = Z; + this.Q = this.D(new $()); + this.onWillLoad = this.Q.event; + this.R = this.D(new $()); + this.onDidSignalReady = this.R.event; + this.S = this.D(new $()); + this.onDidDestroy = this.S.event; + this.q = null; + this.isBrowserViewVisible = false; + this.lastShownAtUnixMs = undefined; + this.$ = []; + this.ab = []; + this.bb = undefined; + this.db = undefined; + this.eb = undefined; + this.fb = this.D(this.zb.createIPCObjectUrl()); + this.hb = false; + this.Cb = 0; + { + const [W, Ee] = this.Mb(e.state); + this.Y = W; + this.z.trace("window#ctor: using window state", W); + const Ye = e.shadowWindowForWorkspaceId !== undefined && e.shadowWindowForWorkspaceId.length > 0 && !Qy; + const re = _.invokeFunction(rh, this.Y, { + hideBecauseShadowWindow: Ye + }, { + preload: Ct.asFileUri("vs/base/parts/sandbox/electron-sandbox/preload.js").fsPath, + additionalArguments: [`--vscode-window-config=${this.fb.resource.toString()}`], + v8CacheOptions: this.w.useCodeCache ? "bypassHeatCheck" : "none" + }); + Ne("code/willCreateCodeBrowserWindow"); + if (e.windowInWindow === undefined) { + this.q = new Mi.BrowserWindow(re); + this.U = this.q.id; + this.s(this.q, re); + } else { + this.browserView = new Mi.WebContentsView(re); + this.browserView.setBackgroundColor("#00000000"); + let St = 1000 + Math.round(Math.random() * 1000000); + while (this.Ab.getWindowById(St)) { + St = 1000 + Math.round(Math.random() * 1000000); + } + this.U = St; + } + Ne("code/didCreateCodeBrowserWindow"); + this.C(this.Y, { + hideBecauseShadowWindow: Ye + }, Ee); + this.n = Date.now(); + } + let ie = parseInt(this.w.args["unresponsive-sample-interval"] || "1000"); + let me = parseInt(this.w.args["unresponsive-sample-period"] || "15000"); + if (ie <= 0 || me <= 0 || ie > me) { + this.z.warn(`Invalid unresponsive sample interval (${ie}ms) or period (${me}ms), using defaults.`); + ie = 1000; + me = 15000; + } + this.ib = new Map(); + this.jb = Math.round(me / ie); + this.kb = this.D(new su(ie)); + this.lb = this.D(new os(() => { + this.Wb(); + }, me)); + this.Jb(); + this.Sb(); + this.Db(); + } + setReady() { + this.z.trace(`window#load: window reported ready (id: ${this.U})`); + this.Cb = 2; + while (this.$.length) { + this.$.pop()(this); + } + this.R.fire(); + } + ready() { + return new Promise(e => { + if (this.isReady) { + return e(this); + } + this.$.push(e); + }); + } + get isReady() { + return this.Cb === 2; + } + get whenClosedOrLoaded() { + return new Promise(e => { + function i() { + s.dispose(); + r.dispose(); + e(); + } + const s = this.onDidClose(() => i()); + const r = this.onWillLoad(() => i()); + }); + } + registerListener(e) { + this.D(e); + } + Db() { + let e = this.q && this.D(x.fromNodeEventEmitter(this.q, "unresponsive")(() => this.Gb(1))); + e = this.q && this.D(x.fromNodeEventEmitter(this.q, "responsive")(() => this.Gb(4))); + e = this.webContents && this.D(x.fromNodeEventEmitter(this.webContents, "render-process-gone", (s, r) => r)(s => this.Gb(2, { + ...s + }))); + e = this.webContents && this.D(x.fromNodeEventEmitter(this.webContents, "did-fail-load", (s, r, n) => ({ + exitCode: r, + reason: n + }))(({ + exitCode: s, + reason: r + }) => this.Gb(3, { + reason: r, + exitCode: s + }))); + e = this.webContents && this.D(x.fromNodeEventEmitter(this.webContents, "will-prevent-unload")(s => s.preventDefault())); + e = this.webContents && this.D(x.fromNodeEventEmitter(this.webContents, "did-finish-load")(() => { + if (this.gb) { + this.X = this.gb; + this.gb = undefined; + } + })); + this.D(this.onDidMaximize(() => { + if (this.X) { + this.X.maximized = true; + } + })); + this.D(this.onDidUnmaximize(() => { + if (this.X) { + this.X.maximized = false; + } + })); + this.D(this.onDidEnterFullScreen(() => { + this.sendWhenReady("vscode:enterFullScreen", We.None); + })); + this.D(this.onDidLeaveFullScreen(() => { + this.sendWhenReady("vscode:leaveFullScreen", We.None); + })); + this.D(this.t.onDidChangeConfiguration(s => this.Jb(s))); + this.D(this.tb.onDidDeleteUntitledWorkspace(s => this.Ib(s))); + const i = ["https://marketplace.visualstudio.com/*", "https://*.vsassets.io/*", "http://*.cursor.localhost:8001/*", "https://staging-marketplace.cursor.sh/*", "https://marketplace.cursor.sh/*", "https://marketplace.cursorapi.com/*"]; + this.webContents?.session.webRequest.onBeforeSendHeaders({ + urls: i + }, async (s, r) => { + const n = await this.Fb(); + r({ + cancel: false, + requestHeaders: Object.assign(s.requestHeaders, n) + }); + }); + } + Fb() { + this.Eb ||= YI(this.yb, this.w, this.t, this.pb, this.qb, this.vb); + return this.Eb; + } + async Gb(e, i) { + switch (e) { + case 2: + this.z.error(`CodeWindow: renderer process gone (reason: ${i?.reason || ""}, code: ${i?.exitCode || ""})`); + break; + case 1: + this.z.error("CodeWindow: detected unresponsive"); + break; + case 4: + this.z.error("CodeWindow: recovered from unresponsive"); + break; + case 3: + this.z.error(`CodeWindow: failed to load (reason: ${i?.reason || ""}, code: ${i?.exitCode || ""})`); + break; + } + this.vb.publicLog2("windowerror", { + type: e, + reason: i?.reason, + code: i?.exitCode + }); + switch (e) { + case 1: + case 2: + if (this.isExtensionDevelopmentTestFromCli) { + this.xb.kill(1); + return; + } + if (this.w.args["enable-smoke-test-driver"]) { + await this.Hb(false, false); + this.xb.quit(); + return; + } + if (e === 1) { + if (this.isExtensionDevelopmentHost || this.isExtensionTestHost || this.q && this.q.webContents && this.q.webContents.isDevToolsOpened()) { + return; + } + this.kb.trigger(() => this.Vb()); + this.lb.schedule(); + const { + response: s, + checkboxChecked: r + } = await this.wb.showMessageBox({ + type: "warning", + buttons: [v(2507, null), v(2508, null), v(2509, null)], + message: v(2510, null), + detail: v(2511, null), + checkboxLabel: this.X?.workspace ? v(2512, null) : undefined + }, this.q ?? undefined); + if (s !== 2) { + const n = s === 0; + this.Wb(); + await this.Hb(n, r); + } + } else if (e === 2) { + let s; + if (i) { + s = v(2514, null, i.reason, i.exitCode ?? ""); + } else { + s = v(2513, null); + } + const { + response: r, + checkboxChecked: n + } = await this.wb.showMessageBox({ + type: "warning", + buttons: [this.X?.workspace ? v(2515, null) : v(2516, null), v(2517, null)], + message: s, + detail: this.X?.workspace ? v(2518, null) : v(2519, null), + checkboxLabel: this.X?.workspace ? v(2520, null) : undefined + }, this.q ?? undefined); + const o = r === 0; + await this.Hb(o, n); + } + break; + case 4: + this.Wb(); + break; + } + } + async Hb(e, i) { + const s = this.X?.workspace; + if (i && s) { + try { + const r = this.rb.workspaceStorage(s); + await r.init(); + r.delete("memento/workbench.parts.editor"); + await r.close(); + } catch (r) { + this.z.error(r); + } + } + this.S.fire(); + try { + if (e && this.X) { + let r; + let n; + if (Li(s)) { + r = { + folderUri: s.uri + }; + } else if (Kt(s)) { + r = { + workspaceUri: s.configPath + }; + } else { + n = true; + } + (await this.Ab.open({ + context: 5, + userEnv: this.X.userEnv, + cli: { + ...this.w.args, + _: [] + }, + urisToOpen: r ? [r] : undefined, + forceEmpty: n, + forceNewWindow: true, + remoteAuthority: this.remoteAuthority + })).at(0)?.focus(); + } + } finally { + this.q?.destroy(); + } + } + Ib(e) { + if (this.X?.workspace?.id === e.id) { + this.X.workspace = undefined; + } + } + Jb(e) { + if (!e || e.affectsConfiguration("window.menuBarVisibility")) { + const i = this.Ob(); + if (i !== this.Z) { + this.Z = i; + this.Pb(i); + } + } + if (!e || e.affectsConfiguration("http.proxy") || e.affectsConfiguration("http.noProxy")) { + let i = (this.t.getValue("http.proxy") || "").trim() || (process.env.https_proxy || process.env.HTTPS_PROXY || process.env.http_proxy || process.env.HTTP_PROXY || "").trim() || undefined; + if (i?.indexOf("@") !== -1) { + const r = P.parse(i); + const n = r.authority.indexOf("@"); + if (n !== -1) { + i = r.with({ + authority: r.authority.substring(n + 1) + }).toString(); + } + } + if (i?.endsWith("/")) { + i = i.substr(0, i.length - 1); + } + const s = (this.t.getValue("http.noProxy") || []).map(r => r.trim()).join(",") || (process.env.no_proxy || process.env.NO_PROXY || "").trim() || undefined; + if ((i || "").indexOf("@") === -1 && (i !== this.bb || s !== this.db)) { + this.bb = i; + this.db = s; + const r = i || ""; + const n = s ? `${s},` : ""; + this.z.trace(`Setting proxy to '${r}', bypassing '${n}'`); + this.webContents?.session.setProxy({ + proxyRules: r, + proxyBypassRules: n, + pacScript: "" + }); + Mi.app.setProxy({ + proxyRules: r, + proxyBypassRules: n, + pacScript: "" + }); + } + } + } + addTabbedWindow(e) { + if (N && e.win) { + this.q?.addTabbedWindow(e.win); + } + } + load(e, i = Object.create(null)) { + this.z.trace(`window#load: attempt to load window (id: ${this.U})`); + if (this.isDocumentEdited() && (!i.isReload || !this.ub.isHotExitEnabled())) { + this.setDocumentEdited(false); + } + if (!i.isReload) { + if (this.getRepresentedFilename()) { + this.setRepresentedFilename(""); + } + this.q?.setTitle(this.yb.nameLong); + } + this.Kb(e, i); + if (this.Cb === 0) { + this.X = e; + } else { + this.gb = e; + } + this.Cb = 1; + this.webContents?.loadURL(Ct.asBrowserUri(`vs/code/electron-sandbox/workbench/workbench${this.w.isBuilt ? "" : "-dev"}.html`).toString(true)); + const s = this.hb; + this.hb = true; + if (!this.w.isBuilt && !this.w.extensionTestsLocationURI) { + this.D(new os(() => { + if (this.q && !this.q.isVisible() && !this.q.isMinimized() && !e.shadowWindowForWorkspaceId && e.windowInWindow === undefined) { + this.q.show(); + this.focus({ + force: true + }); + this.webContents?.openDevTools(); + } + }, 10000)).schedule(); + } + this.Q.fire({ + workspace: e.workspace, + reason: i.isReload ? 3 : s ? 2 : 1 + }); + } + Kb(e, i) { + const s = (this.X ?? this.gb)?.userEnv; + if (s) { + const r = bn(s) && !bn(e.userEnv); + const n = this.isExtensionDevelopmentHost; + if (r || n) { + e.userEnv = { + ...s, + ...e.userEnv + }; + } + } + if (process.env.CHROME_CRASHPAD_PIPE_NAME) { + Object.assign(e.userEnv, { + CHROME_CRASHPAD_PIPE_NAME: process.env.CHROME_CRASHPAD_PIPE_NAME + }); + } + if (i.disableExtensions !== undefined) { + e["disable-extensions"] = i.disableExtensions; + } + try { + if (this.q) { + e.handle = z.wrap(this.q.getNativeWindowHandle()); + } + } catch (r) { + this.z.error(`Error getting native window handle: ${r}`); + } + e.fullscreen = this.isFullScreen; + e.maximized = this.q?.isMaximized() ?? false; + e.partsSplash = this.sb.getWindowSplash(); + e.zoomLevel = this.Rb(); + e.isCustomZoomLevel = typeof this.eb == "number"; + if (e.isCustomZoomLevel && e.partsSplash) { + e.partsSplash.zoomLevel = e.zoomLevel; + } + Ne("code/willOpenNewWindow"); + e.perfMarks = Wf(); + this.fb.update(e); + } + async reload(e) { + const i = Object.assign({}, this.X); + i.workspace = await this.Lb(i); + delete i.filesToOpenOrCreate; + delete i.filesToDiff; + delete i.filesToMerge; + delete i.filesToWait; + if (this.isExtensionDevelopmentHost && e) { + i.verbose = e.verbose; + i.debugId = e.debugId; + i.extensionEnvironment = e.extensionEnvironment; + i["inspect-extensions"] = e["inspect-extensions"]; + i["inspect-brk-extensions"] = e["inspect-brk-extensions"]; + i["extensions-dir"] = e["extensions-dir"]; + } + i.accessibilitySupport = Mi.app.isAccessibilitySupportEnabled(); + i.isInitialStartup = false; + i.policiesData = this.nb.serialize(); + i.continueOn = this.w.continueOn; + i.profiles = { + all: this.ob.profiles, + profile: this.profile || this.ob.defaultProfile, + home: this.ob.profilesHome + }; + i.logLevel = this.mb.getLogLevel(); + i.loggers = { + window: this.mb.getRegisteredLoggers(this.id), + global: this.mb.getRegisteredLoggers() + }; + i.cssModules = this.Bb.isEnabled ? await this.Bb.getCssModules(true) : undefined; + i.hmr = e?.hmr; + this.load(i, { + isReload: true, + disableExtensions: e?.["disable-extensions"] + }); + } + async Lb(e) { + if (Kt(e.workspace)) { + const i = e.workspace.configPath; + if (i.scheme === R.file && !(await this.pb.exists(i))) { + return; + } + } else if (Li(e.workspace)) { + const i = e.workspace.uri; + if (i.scheme === R.file && !(await this.pb.exists(i))) { + return; + } + } + return e.workspace; + } + serializeWindowState() { + if (!this.q) { + return Ar(); + } + if (this.isFullScreen) { + let s; + try { + s = Mi.screen.getDisplayMatching(this.getBounds()); + } catch {} + const r = Ar(); + return { + mode: 3, + display: s ? s.id : undefined, + width: this.Y.width || r.width, + height: this.Y.height || r.height, + x: this.Y.x || 0, + y: this.Y.y || 0, + zoomLevel: this.eb + }; + } + const e = Object.create(null); + let i; + if (!N && this.q.isMaximized()) { + i = 0; + } else { + i = 1; + } + if (i === 0) { + e.mode = 0; + } else { + e.mode = 1; + } + if (i === 1 || i === 0) { + let s; + if (i === 1) { + s = this.getBounds(); + } else { + s = this.q.getNormalBounds(); + } + e.x = s.x; + e.y = s.y; + e.width = s.width; + e.height = s.height; + } + e.zoomLevel = this.eb; + return e; + } + Mb(e) { + Ne("code/willRestoreCodeWindowState"); + let i = false; + if (e) { + this.eb = e.zoomLevel; + try { + const s = Mi.screen.getAllDisplays(); + i = s.length > 1; + e = nh.validateWindowState(this.z, e, s); + } catch (s) { + this.z.warn(`Unexpected error validating window state: ${s} + ${s.stack}`); + } + } + Ne("code/didRestoreCodeWindowState"); + return [e || Ar(), i]; + } + getBounds() { + if (!this.q) { + return this.browserView?.getBounds() ?? { + x: 0, + y: 0, + width: 0, + height: 0 + }; + } + const [e, i] = this.q.getPosition(); + const [s, r] = this.q.getSize(); + return { + x: e, + y: i, + width: s, + height: r + }; + } + M(e, i) { + super.M(e, i); + this.sendWhenReady(e ? "vscode:enterFullScreen" : "vscode:leaveFullScreen", We.None); + if (this.Z) { + this.Pb(this.Z, false); + } + } + Ob() { + let e = nD(this.t); + if (["visible", "toggle", "hidden"].indexOf(e) < 0) { + e = "classic"; + } + return e; + } + Pb(e, i = true) { + if (!N) { + if (e === "toggle" && i) { + this.send("vscode:showInfoMessage", v(2521, null)); + } + if (e === "hidden") { + setTimeout(() => { + this.Qb(e); + }); + } else { + this.Qb(e); + } + } + } + Qb(e) { + const i = this.isFullScreen; + if (this.q) { + switch (e) { + case "classic": + this.q.setMenuBarVisibility(!i); + this.q.autoHideMenuBar = i; + break; + case "visible": + this.q.setMenuBarVisibility(true); + this.q.autoHideMenuBar = false; + break; + case "toggle": + this.q.setMenuBarVisibility(false); + this.q.autoHideMenuBar = true; + break; + case "hidden": + this.q.setMenuBarVisibility(false); + this.q.autoHideMenuBar = false; + break; + } + } + } + notifyZoomLevel(e) { + this.eb = e; + } + Rb() { + if (typeof this.eb == "number") { + return this.eb; + } else { + return this.t.getValue("window")?.zoomLevel; + } + } + close() { + if (this.q) { + this.q.close(); + } else if (this.browserView) { + try { + this.browserView.webContents.close({ + waitForBeforeUnload: false + }); + } catch (e) { + this.z.warn(`Error closing browser view: ${Ki(e)}`); + } + this.c.fire(); + this.dispose(); + } + } + sendWhenReady(e, i, ...s) { + if (this.isReady) { + this.send(e, ...s); + } else { + this.ready().then(() => { + if (!i.isCancellationRequested) { + this.send(e, ...s); + } + }); + } + } + send(e, ...i) { + if (this.webContents) { + if (this.q?.isDestroyed() || this.webContents.isDestroyed()) { + this.z.warn(`Sending IPC message to channel '${e}' for window that is destroyed`); + return; + } + try { + this.webContents.send(e, ...i); + } catch (s) { + this.z.warn(`Error sending IPC message to channel '${e}' of window ${this.U}: ${Ki(s)}`); + } + } + } + updateTouchBar(e) { + if (N) { + this.ab.forEach((i, s) => { + const r = e[s]; + i.segments = this.Ub(r); + }); + } + } + Sb() { + if (N) { + for (let e = 0; e < 10; e++) { + const i = this.Tb(); + this.ab.push(i); + } + if (this.q) { + this.q.setTouchBar(new Mi.TouchBar({ + items: this.ab + })); + } + } + } + Tb(e = []) { + const i = this.Ub(e); + const s = new Mi.TouchBar.TouchBarSegmentedControl({ + segments: i, + mode: "buttons", + segmentStyle: "automatic", + change: r => { + this.sendWhenReady("vscode:runAction", We.None, { + id: s.segments[r].id, + from: "touchbar" + }); + } + }); + return s; + } + Ub(e = []) { + return e.map(s => { + let r; + if (s.icon && !Gc.isThemeIcon(s.icon) && s.icon?.dark?.scheme === R.file) { + r = Mi.nativeImage.createFromPath(P.revive(s.icon.dark).fsPath); + if (r.isEmpty()) { + r = undefined; + } + } + let n; + if (typeof s.title == "string") { + n = s.title; + } else { + n = s.title.value; + } + return { + id: s.id, + label: r ? undefined : n, + icon: r + }; + }); + } + async Vb() { + if (!this.kb.isTriggered()) { + const e = await this.q?.webContents.mainFrame.collectJavaScriptCallStack(); + if (e) { + const i = this.ib.get(e) || 0; + this.ib.set(e, i + 1); + } + this.kb.trigger(() => this.Vb()); + } + } + Wb() { + this.lb.cancel(); + this.kb.cancel(); + if (this.ib.size) { + let e = `CodeWindow unresponsive samples: + `; + let i = 0; + const s = Array.from(this.ib.entries()).sort((r, n) => n[1] - r[1]); + for (const [r, n] of s) { + i += n; + if (Math.round(n * 100 / this.jb) > 20) { + const o = new k6(r, this.id, this.win?.webContents.getOSProcessId()); + Wl.onUnexpectedError(o); + } + e += `<${n}> ${r} + `; + } + e += `Total Samples: ${i} + `; + e += "For full overview of the unresponsive period, capture cpu profile via https://aka.ms/vscode-tracing-cpu-profile"; + this.z.error(e); + } + this.ib.clear(); + } + matches(e) { + return this.q?.webContents.id === e.id; + } + dispose() { + super.dispose(); + if (this.browserView) { + try { + if (!this.browserView.webContents.isDestroyed()) { + this.browserView.webContents.destroy(); + } + } catch (e) { + this.z.warn(`Error destroying browser view: ${Ki(e)}`); + } + this.browserView = null; + } + this.mb.deregisterLoggers(this.id); + } + }; + Jc = __decorate([__param(1, V), __param(2, qo), __param(3, ot), __param(4, Pn), __param(5, Rs), __param(6, at), __param(7, dc), __param(8, yo), __param(9, Je), __param(10, Eo), __param(11, Cr), __param(12, xo), __param(13, Ot), __param(14, nr), __param(15, Te), __param(16, Ve), __param(17, Wc), __param(18, dt), __param(19, Oi), __param(20, Ss), __param(21, Wo)], Jc); + k6 = class extends Error { + constructor(t, e, i = 0) { + super(`UnresponsiveSampleError: by ${e} from ${i}`); + this.name = "UnresponsiveSampleError"; + this.stack = t; + } + }; + } + }); + import Vo from "electron"; + function iA(t) { + const e = { + openedWindows: [] + }; + const i = t || { + openedWindows: [] + }; + if (i.lastActiveWindow) { + e.lastActiveWindow = Xg(i.lastActiveWindow); + } + if (i.lastPluginDevelopmentHostWindow) { + e.lastPluginDevelopmentHostWindow = Xg(i.lastPluginDevelopmentHostWindow); + } + if (Array.isArray(i.openedWindows)) { + e.openedWindows = i.openedWindows.map(s => Xg(s)); + } + return e; + } + function Xg(t) { + const e = { + uiState: t.uiState + }; + if (t.backupPath) { + e.backupPath = t.backupPath; + } + if (t.remoteAuthority) { + e.remoteAuthority = t.remoteAuthority; + } + if (t.folder) { + e.folderUri = P.parse(t.folder); + } + if (t.workspaceIdentifier) { + e.workspace = { + id: t.workspaceIdentifier.id, + configPath: P.parse(t.workspaceIdentifier.configURIPath) + }; + } + return e; + } + function sA(t) { + return { + lastActiveWindow: t.lastActiveWindow && Qg(t.lastActiveWindow), + lastPluginDevelopmentHostWindow: t.lastPluginDevelopmentHostWindow && Qg(t.lastPluginDevelopmentHostWindow), + openedWindows: t.openedWindows.map(e => Qg(e)) + }; + } + function Qg(t) { + return { + workspaceIdentifier: t.workspace && { + id: t.workspace.id, + configURIPath: t.workspace.configPath.toString() + }, + folder: t.folderUri && t.folderUri.toString(), + backupPath: t.backupPath, + remoteAuthority: t.remoteAuthority, + uiState: t.uiState + }; + } + var od; + var ad; + var rA = g({ + "out-build/vs/platform/windows/electron-main/windowsStateHandler.js"() { + "use strict"; + + M(); + H(); + nt(); + se(); + Ke(); + ct(); + X(); + Ti(); + Lt(); + mc(); + ri(); + ad = class extends T { + static { + od = this; + } + static { + this.a = "windowsState"; + } + get state() { + return this.b; + } + constructor(e, i, s, r, n) { + super(); + this.g = e; + this.h = i; + this.j = s; + this.m = r; + this.n = n; + this.b = iA(this.h.getItem(od.a)); + this.c = undefined; + this.f = false; + this.q(); + } + q() { + Vo.app.on("browser-window-blur", () => { + if (!this.f) { + this.s(); + } + }); + this.D(this.j.onBeforeCloseWindow(e => this.t(e))); + this.D(this.j.onBeforeShutdown(() => this.r())); + this.D(this.g.onDidChangeWindowsCount(e => { + if (e.newCount - e.oldCount > 0) { + this.c = undefined; + } + })); + this.D(this.g.onDidDestroyWindow(e => this.t(e))); + } + r() { + this.f = true; + this.s(); + } + s() { + const e = new Set(); + const i = { + openedWindows: [], + lastPluginDevelopmentHostWindow: this.b.lastPluginDevelopmentHostWindow, + lastActiveWindow: this.c + }; + if (!i.lastActiveWindow) { + let n = this.g.getLastActiveWindow(); + if (!n || n.isExtensionDevelopmentHost || n.config?.shadowWindowForWorkspaceId || n.config?.windowInWindow !== undefined) { + n = this.g.getWindows().find(o => !o.isExtensionDevelopmentHost && !o.config?.shadowWindowForWorkspaceId && o.config?.windowInWindow === undefined); + } + if (n) { + i.lastActiveWindow = this.u(n); + if (i.lastActiveWindow.uiState.mode === 3) { + e.add(i.lastActiveWindow.uiState.display); + } + } + } + const s = this.g.getWindows().find(n => n.isExtensionDevelopmentHost && !n.isExtensionTestHost); + if (s) { + i.lastPluginDevelopmentHostWindow = this.u(s); + if (i.lastPluginDevelopmentHostWindow.uiState.mode === 3) { + if (e.has(i.lastPluginDevelopmentHostWindow.uiState.display)) { + if (N && !s.win?.isSimpleFullScreen()) { + i.lastPluginDevelopmentHostWindow.uiState.mode = 1; + } + } else { + e.add(i.lastPluginDevelopmentHostWindow.uiState.display); + } + } + } + if (this.g.getWindowCount() > 1) { + i.openedWindows = this.g.getWindows().filter(n => !n.isExtensionDevelopmentHost && !n.config?.shadowWindowForWorkspaceId && n.config?.windowInWindow === undefined).map(n => { + const o = this.u(n); + if (o.uiState.mode === 3) { + if (e.has(o.uiState.display)) { + if (N && o.windowId !== i.lastActiveWindow?.windowId && !n.win?.isSimpleFullScreen()) { + o.uiState.mode = 1; + } + } else { + e.add(o.uiState.display); + } + } + return o; + }); + } + const r = sA(i); + this.h.setItem(od.a, r); + if (this.f) { + this.m.trace("[WindowsStateHandler] onBeforeShutdown", r); + } + } + t(e) { + if (this.j.quitRequested) { + return; + } + const i = this.u(e); + if (e.isExtensionDevelopmentHost && !e.isExtensionTestHost) { + this.b.lastPluginDevelopmentHostWindow = i; + } else if (!e.isExtensionDevelopmentHost && e.openedWorkspace && !e.config?.shadowWindowForWorkspaceId && e.config?.windowInWindow === undefined) { + this.b.openedWindows.forEach(s => { + const r = Kt(e.openedWorkspace) && s.workspace?.id === e.openedWorkspace.id; + const n = Li(e.openedWorkspace) && s.folderUri && tt.isEqual(s.folderUri, e.openedWorkspace.uri); + if (r || n) { + s.uiState = i.uiState; + } + }); + } + if (this.g.getWindowCount() === 1) { + this.c = i; + } + } + u(e) { + return { + windowId: e.id, + workspace: Kt(e.openedWorkspace) ? e.openedWorkspace : undefined, + folderUri: Li(e.openedWorkspace) ? e.openedWorkspace.uri : undefined, + backupPath: e.backupPath, + remoteAuthority: e.remoteAuthority, + uiState: e.serializeWindowState() + }; + } + getNewWindowState(e) { + const i = this.w(e); + const s = this.n.getValue("window"); + if (i.mode === 3) { + let r; + if (i.hasDefaultState) { + r = !!s?.newWindowDimensions && !!(["fullscreen", "inherit", "offset"].indexOf(s.newWindowDimensions) >= 0); + } else { + r = !!this.j.wasRestarted || !!s?.restoreFullscreen; + } + if (!r) { + i.mode = 1; + } + } + return i; + } + w(e) { + const i = this.g.getLastActiveWindow(); + if (!e.extensionTestsPath) { + if (e.extensionDevelopmentPath && this.state.lastPluginDevelopmentHostWindow) { + return this.state.lastPluginDevelopmentHostWindow.uiState; + } + const c = e.workspace; + if (Kt(c)) { + const u = this.state.openedWindows.filter(d => d.workspace && d.workspace.id === c.id).map(d => d.uiState); + if (u.length) { + return u[0]; + } + } + if (Li(c)) { + const u = this.state.openedWindows.filter(d => d.folderUri && tt.isEqual(d.folderUri, c.uri)).map(d => d.uiState); + if (u.length) { + return u[0]; + } + } else if (e.backupPath) { + const u = this.state.openedWindows.filter(d => d.backupPath === e.backupPath).map(d => d.uiState); + if (u.length) { + return u[0]; + } + } + const l = this.c || this.state.lastActiveWindow; + if (!i && l) { + return l.uiState; + } + } + let s; + const r = Vo.screen.getAllDisplays(); + if (r.length === 1) { + s = r[0]; + } else { + if (N) { + const c = Vo.screen.getCursorScreenPoint(); + s = Vo.screen.getDisplayNearestPoint(c); + } + if (!s && i) { + s = Vo.screen.getDisplayMatching(i.getBounds()); + } + s ||= Vo.screen.getPrimaryDisplay() || r[0]; + } + let n = Ar(); + n.x = Math.round(s.bounds.x + s.bounds.width / 2 - n.width / 2); + n.y = Math.round(s.bounds.y + s.bounds.height / 2 - n.height / 2); + const o = this.n.getValue("window"); + let a = true; + if (o?.newWindowDimensions) { + if (o.newWindowDimensions === "maximized") { + n.mode = 0; + a = false; + } else if (o.newWindowDimensions === "fullscreen") { + n.mode = 3; + a = false; + } else if ((o.newWindowDimensions === "inherit" || o.newWindowDimensions === "offset") && i) { + const c = i.serializeWindowState(); + if (c.mode === 3) { + n.mode = 3; + } else { + n = { + ...c, + zoomLevel: undefined + }; + } + a = n.mode !== 3 && o.newWindowDimensions === "offset"; + } + } + if (a) { + n = this.z(n); + } + n.hasDefaultState = true; + return n; + } + z(e) { + if (this.g.getWindows().length === 0) { + return e; + } + e.x = typeof e.x == "number" ? e.x : 0; + e.y = typeof e.y == "number" ? e.y : 0; + const i = this.g.getWindows().map(s => s.getBounds()); + while (i.some(s => s.x === e.x || s.y === e.y)) { + e.x += 30; + e.y += 30; + } + return e; + } + }; + ad = od = __decorate([__param(0, dt), __param(1, Oi), __param(2, Te), __param(3, V), __param(4, Je)], ad); + } + }); + import * as nA from "fs"; + import { app as oA, BrowserWindow as cd, shell as aA } from "electron"; + import { hostname as cA, release as lA, arch as uA } from "os"; + function ld(t) { + return Kt(t?.workspace); + } + function Go(t) { + return Li(t?.workspace); + } + var ud; + var hA = g({ + "out-build/vs/platform/windows/electron-main/windowsMainService.js"() { + "use strict"; + + wa(); + zt(); + At(); + B(); + gi(); + Sr(); + M(); + Ie(); + we(); + Hs(); + H(); + ys(); + nt(); + _e(); + se(); + be(); + wc(); + Ke(); + wn(); + vt(); + He(); + Y(); + ct(); + X(); + gc(); + Wh(); + Sc(); + Ti(); + fn(); + x6(); + Lt(); + c5(); + rA(); + ri(); + q1(); + zh(); + vn(); + pc(); + Ls(); + un(); + zc(); + Mh(); + Cc(); + ud = class extends T { + constructor(e, i, s, r, n, o, a, c, l, u, d, f, p, w, m, y, b, k, A, C, _, Z, ie) { + super(); + this.r = e; + this.s = i; + this.t = s; + this.u = r; + this.w = n; + this.z = o; + this.C = a; + this.F = c; + this.G = l; + this.H = u; + this.I = d; + this.J = f; + this.L = p; + this.M = w; + this.N = m; + this.O = y; + this.P = b; + this.Q = k; + this.R = A; + this.S = C; + this.U = _; + this.W = Z; + this.X = ie; + this.a = this.D(new $()); + this.onDidOpenWindow = this.a.event; + this.b = this.D(new $()); + this.onDidSignalReadyWindow = this.b.event; + this.c = this.D(new $()); + this.onDidDestroyWindow = this.c.event; + this.f = this.D(new $()); + this.onDidChangeWindowsCount = this.f.event; + this.g = this.D(new $()); + this.onDidMaximizeWindow = this.g.event; + this.h = this.D(new $()); + this.onDidUnmaximizeWindow = this.h.event; + this.j = this.D(new $()); + this.onDidChangeFullScreen = this.j.event; + this.m = this.D(new $()); + this.onDidTriggerSystemContextMenu = this.m.event; + this.n = new Map(); + this.q = this.D(new ad(this, this.F, this.J, this.z, this.M)); + this.Y(); + } + Y() { + this.D(this.O.onDidEnterWorkspace(e => this.b.fire(e.window))); + this.D(this.onDidSignalReadyWindow(e => { + if (e.config?.extensionDevelopmentPath || e.config?.extensionTestsPath) { + const i = new De(); + i.add(x.any(e.onDidClose, e.onDidDestroy)(() => i.dispose())); + if (e.config.extensionDevelopmentPath) { + for (const s of e.config.extensionDevelopmentPath) { + i.add(this.S.addValidFileRoot(s)); + } + } + if (e.config.extensionTestsPath) { + i.add(this.S.addValidFileRoot(e.config.extensionTestsPath)); + } + } + })); + } + openEmptyWindow(e, i) { + const s = this.H.args; + const r = i?.remoteAuthority || undefined; + const n = true; + const o = i?.forceReuseWindow; + const a = !o; + return this.open({ + ...e, + cli: s, + forceEmpty: n, + forceNewWindow: a, + forceReuseWindow: o, + remoteAuthority: r, + forceTempProfile: i?.forceTempProfile, + forceProfile: i?.forceProfile + }); + } + openExistingWindow(e, i) { + e.focus(); + this.Z(i, [e]); + } + async open(e) { + this.z.trace("windowsManager#open"); + if (e.addMode && (e.initialStartup || !this.getLastActiveWindow())) { + e.addMode = false; + } + const i = []; + const s = []; + const r = []; + const n = []; + const o = []; + let a; + let c = false; + const l = await this.fb(e); + this.z.trace("windowsManager#open pathsToOpen", l); + for (const w of l) { + if (Go(w)) { + if (e.addMode) { + i.push(w); + } else { + s.push(w); + } + } else if (ld(w)) { + r.push(w); + } else if (w.fileUri) { + a ||= { + filesToOpenOrCreate: [], + filesToDiff: [], + filesToMerge: [], + remoteAuthority: w.remoteAuthority + }; + a.filesToOpenOrCreate.push(w); + } else if (w.backupPath) { + o.push({ + backupFolder: Ue(w.backupPath), + remoteAuthority: w.remoteAuthority + }); + } else { + c = true; + } + } + if (e.diffMode && a && a.filesToOpenOrCreate.length >= 2) { + a.filesToDiff = a.filesToOpenOrCreate.slice(0, 2); + a.filesToOpenOrCreate = []; + } + if (e.mergeMode && a && a.filesToOpenOrCreate.length === 4) { + a.filesToMerge = a.filesToOpenOrCreate.slice(0, 4); + a.filesToOpenOrCreate = []; + a.filesToDiff = []; + } + if (a && e.waitMarkerFileURI) { + a.filesToWait = { + paths: $t([...a.filesToDiff, a.filesToMerge[3], ...a.filesToOpenOrCreate]), + waitMarkerFileUri: e.waitMarkerFileURI + }; + } + if (e.initialStartup) { + n.push(...this.O.getUntitledWorkspaces()); + r.push(...n); + o.push(...this.L.getEmptyWindowBackups()); + } else { + o.length = 0; + } + const { + windows: u, + filesOpenedInWindow: d + } = await this.$(e, r, s, o, c, a, i); + this.z.trace(`windowsManager#open used window count ${u.length} (workspacesToOpen: ${r.length}, foldersToOpen: ${s.length}, emptyToRestore: ${o.length}, openOneEmptyWindow: ${c})`); + if (u.length > 1) { + if (d) { + d.focus(); + } else { + const w = this.q.state.lastActiveWindow && !e.forceEmpty && !e.cli._.length && !e.cli["file-uri"] && !e.cli["folder-uri"] && (!e.urisToOpen || !e.urisToOpen.length); + let m = true; + let y = true; + if (w) { + const b = u.filter(k => this.q.state.lastActiveWindow && k.backupPath === this.q.state.lastActiveWindow.backupPath); + if (b.length) { + b[0].focus(); + m = false; + y = false; + } + } + if (m) { + for (let b = u.length - 1; b >= 0; b--) { + const k = u[b]; + if ((!k.openedWorkspace || !n.some(A => k.openedWorkspace && A.workspace.id === k.openedWorkspace.id)) && (!k.backupPath || !o.some(A => k.backupPath && A.backupFolder === Ue(k.backupPath)))) { + k.focus(); + y = false; + break; + } + } + } + if (y) { + u[u.length - 1].focus(); + } + } + } + const f = a && a.filesToDiff.length > 0; + const p = a && a.filesToMerge.length > 0; + if (!u.some(w => w.isExtensionDevelopmentHost) && !f && !p && !e.noRecentEntry) { + const w = []; + for (const m of l) { + if (ld(m) && !m.transient) { + w.push({ + label: m.label, + workspace: m.workspace, + remoteAuthority: m.remoteAuthority + }); + } else if (Go(m)) { + w.push({ + label: m.label, + folderUri: m.workspace.uri, + remoteAuthority: m.remoteAuthority + }); + } else if (m.fileUri) { + w.push({ + label: m.label, + fileUri: m.fileUri, + remoteAuthority: m.remoteAuthority + }); + } + } + this.N.addRecentlyOpened(w); + } + this.Z(e, u); + return u; + } + Z(e, i) { + const s = e.waitMarkerFileURI; + if (e.context === 0 && s && i.length === 1 && i[0]) { + (async () => { + await i[0].whenClosedOrLoaded; + try { + await this.R.del(s); + } catch {} + })(); + } + } + async $(e, i, s, r, n, o, a) { + const c = []; + let l; + function u(b, k) { + c.push(b); + if (k) { + l = b; + o = undefined; + } + } + let { + openFolderInNewWindow: d, + openFilesInNewWindow: f + } = this.rb(e); + if (!e.initialStartup && a.length > 0) { + const b = a[0].remoteAuthority; + const k = this.xb(b); + if (k) { + u(this.cb(k, a.map(A => A.workspace.uri))); + } + } + const p = s.length + i.length + r.length; + if (o && p === 0) { + const b = o.filesToOpenOrCreate[0] || o.filesToDiff[0] || o.filesToMerge[3]; + const k = this.getWindows().filter(C => o && mi(C.remoteAuthority, o.remoteAuthority)); + let A; + if (b?.fileUri && !f) { + if (e.context === 4 || e.context === 0 || e.context === 1 || e.context === 6) { + A = await ID(k, b.fileUri, async C => C.configPath.scheme === R.file ? this.O.resolveLocalWorkspace(C.configPath) : undefined); + } + A ||= this.yb(k); + } + if (A) { + if (Kt(A.openedWorkspace)) { + i.push({ + workspace: A.openedWorkspace, + remoteAuthority: A.remoteAuthority + }); + } else if (Li(A.openedWorkspace)) { + s.push({ + workspace: A.openedWorkspace, + remoteAuthority: A.remoteAuthority + }); + } else { + u(this.ab(e, A, o), true); + } + } else { + u(await this.sb({ + userEnv: e.userEnv, + cli: e.cli, + initialStartup: e.initialStartup, + shadowWindowForWorkspaceId: e.shadowWindowForWorkspaceId, + windowInWindow: e.windowInWindow, + windowInWindowBodyClass: e.windowInWindowBodyClass, + filesToOpen: o, + forceNewWindow: true, + remoteAuthority: o.remoteAuthority, + forceNewTabbedWindow: e.forceNewTabbedWindow, + forceProfile: e.forceProfile, + forceTempProfile: e.forceTempProfile + }), true); + } + } + const w = ss(i, b => b.workspace.id); + if (w.length > 0) { + const b = $t(w.map(k => $o(this.getWindows(), k.workspace.configPath))); + if (b.length > 0) { + const k = b[0]; + const A = mi(o?.remoteAuthority, k.remoteAuthority) ? o : undefined; + u(this.ab(e, k, A), !!A); + d = true; + } + for (const k of w) { + if (b.some(_ => _.openedWorkspace && _.openedWorkspace.id === k.workspace.id)) { + continue; + } + const A = k.remoteAuthority; + const C = mi(o?.remoteAuthority, A) ? o : undefined; + u(await this.eb(e, k, d, C), !!C); + d = true; + } + } + const m = ss(s, b => tt.getComparisonKey(b.workspace.uri)); + if (m.length > 0) { + const b = $t(m.map(k => $o(this.getWindows(), k.workspace.uri))); + if (b.length > 0) { + const k = b[0]; + const A = mi(o?.remoteAuthority, k.remoteAuthority) ? o : undefined; + u(this.ab(e, k, A), !!A); + d = true; + } + for (const k of m) { + if (b.some(_ => Li(_.openedWorkspace) && tt.isEqual(_.openedWorkspace.uri, k.workspace.uri))) { + continue; + } + const A = k.remoteAuthority; + const C = mi(o?.remoteAuthority, A) ? o : undefined; + u(await this.eb(e, k, d, C), !!C); + d = true; + } + } + const y = ss(r, b => b.backupFolder); + if (y.length > 0) { + for (const b of y) { + const k = b.remoteAuthority; + const A = mi(o?.remoteAuthority, k) ? o : undefined; + u(await this.db(e, true, k, A, b), !!A); + d = true; + } + } + if (o || n) { + const b = o ? o.remoteAuthority : e.remoteAuthority; + u(await this.db(e, d, b, o), !!o); + } + return { + windows: ss(c), + filesOpenedInWindow: l + }; + } + ab(e, i, s) { + this.z.trace("windowsManager#doOpenFilesInExistingWindow", { + filesToOpen: s + }); + this.bb(i); + const r = { + filesToOpenOrCreate: s?.filesToOpenOrCreate, + filesToDiff: s?.filesToDiff, + filesToMerge: s?.filesToMerge, + filesToWait: s?.filesToWait, + termProgram: e?.userEnv?.TERM_PROGRAM + }; + i.sendWhenReady("vscode:openFiles", We.None, r); + return i; + } + bb(e) { + let i = e; + const s = cd.getFocusedWindow(); + if (s && s.id !== e.id) { + const r = this.W.getWindowByWebContents(s.webContents); + if (r && r.parentId === e.id) { + i = r; + } + } + i.focus(); + } + cb(e, i) { + this.z.trace("windowsManager#doAddFoldersToExistingWindow", { + foldersToAdd: i + }); + e.focus(); + const s = { + foldersToAdd: i + }; + e.sendWhenReady("vscode:addFolders", We.None, s); + return e; + } + db(e, i, s, r, n) { + this.z.trace("windowsManager#doOpenEmpty", { + restore: !!n, + remoteAuthority: s, + filesToOpen: r, + forceNewWindow: i + }); + let o; + if (!i && typeof e.contextWindowId == "number") { + o = this.getWindowById(e.contextWindowId); + } + return this.sb({ + userEnv: e.userEnv, + cli: e.cli, + initialStartup: e.initialStartup, + remoteAuthority: s, + forceNewWindow: i, + forceNewTabbedWindow: e.forceNewTabbedWindow, + shadowWindowForWorkspaceId: e.shadowWindowForWorkspaceId, + windowInWindow: e.windowInWindow, + windowInWindowBodyClass: e.windowInWindowBodyClass, + filesToOpen: r, + windowToUse: o, + emptyWindowBackupInfo: n, + forceProfile: e.forceProfile, + forceTempProfile: e.forceTempProfile + }); + } + eb(e, i, s, r, n) { + this.z.trace("windowsManager#doOpenFolderOrWorkspace", { + folderOrWorkspace: i, + filesToOpen: r + }); + if (!s && !n && typeof e.contextWindowId == "number") { + n = this.getWindowById(e.contextWindowId); + } + return this.sb({ + workspace: i.workspace, + userEnv: e.userEnv, + cli: e.cli, + initialStartup: e.initialStartup, + remoteAuthority: i.remoteAuthority, + forceNewWindow: s, + forceNewTabbedWindow: e.forceNewTabbedWindow, + filesToOpen: r, + windowToUse: n, + shadowWindowForWorkspaceId: e.shadowWindowForWorkspaceId, + windowInWindow: e.windowInWindow, + windowInWindowBodyClass: e.windowInWindowBodyClass, + forceProfile: e.forceProfile, + forceTempProfile: e.forceTempProfile + }); + } + async fb(e) { + let i; + let s = false; + let r = false; + if (e.urisToOpen && e.urisToOpen.length > 0) { + i = await this.gb(e); + s = true; + } else if (e.forceEmpty) { + i = [Object.create(null)]; + } else if (e.cli._.length || e.cli["folder-uri"] || e.cli["file-uri"]) { + i = await this.hb(e.cli); + if (i.length === 0) { + i.push(Object.create(null)); + } + s = true; + } else { + i = await this.jb(); + if (i.length === 0) { + i.push(Object.create(null)); + } + r = true; + } + if (!e.addMode && s) { + const n = i.filter(o => Go(o)); + if (n.length > 1) { + const o = n[0].remoteAuthority; + if (n.every(a => mi(a.remoteAuthority, o))) { + const a = await this.O.createUntitledWorkspace(n.map(c => ({ + uri: c.workspace.uri + }))); + i.push({ + workspace: a, + remoteAuthority: o + }); + i = i.filter(c => !Go(c)); + } + } + } + if (e.initialStartup && !r && this.M.getValue("window")?.restoreWindows === "preserve") { + const n = await this.jb(); + i.unshift(...n.filter(o => ld(o) || Go(o) || o.backupPath)); + } + return i; + } + async gb(e) { + const i = { + gotoLineMode: e.gotoLineMode, + remoteAuthority: e.remoteAuthority + }; + const s = await Promise.all($t(e.urisToOpen || []).map(async r => { + const n = await this.lb(r, i); + if (n) { + n.label = r.label; + return n; + } + const o = this.nb(r); + this.Q.showMessageBox({ + type: "info", + buttons: [v(2522, null)], + message: o.scheme === R.file ? v(2523, null) : v(2524, null), + detail: o.scheme === R.file ? v(2525, null, to(o, { + os: Wi, + tildify: this.H + })) : v(2526, null, o.toString(true)) + }, cd.getFocusedWindow() ?? undefined); + })); + return $t(s); + } + async hb(e) { + const i = []; + const s = { + ignoreFileNotFound: true, + gotoLineMode: e.goto, + remoteAuthority: e.remote || undefined, + forceOpenWorkspaceAsFile: e.diff && e._.length === 2 || e.merge && e._.length === 4 + }; + const r = e["folder-uri"]; + if (r) { + const a = await Promise.all(r.map(c => { + const l = this.ib(c); + if (l) { + return this.lb({ + folderUri: l + }, s); + } + })); + i.push(...$t(a)); + } + const n = e["file-uri"]; + if (n) { + const a = await Promise.all(n.map(c => { + const l = this.ib(c); + if (l) { + return this.lb(ln(c) ? { + workspaceUri: l + } : { + fileUri: l + }, s); + } + })); + i.push(...$t(a)); + } + const o = await Promise.all(e._.map(a => s.remoteAuthority ? this.qb(a, s) : this.ob(a, s))); + i.push(...$t(o)); + return i; + } + ib(e) { + try { + const i = P.parse(e); + if (!i.scheme) { + this.z.error(`Invalid URI input string, scheme missing: ${e}`); + return; + } + if (i.path) { + return i; + } else { + return i.with({ + path: "/" + }); + } + } catch (i) { + this.z.error(`Invalid URI input string: ${e}, ${i.message}`); + } + } + async jb() { + const e = this.kb(); + switch (e) { + case "none": + return []; + case "one": + case "all": + case "preserve": + case "folders": + { + const i = []; + if (e !== "one") { + i.push(...this.q.state.openedWindows); + } + if (this.q.state.lastActiveWindow) { + i.push(this.q.state.lastActiveWindow); + } + const s = await Promise.all(i.map(async r => { + if (r.workspace) { + const n = await this.lb({ + workspaceUri: r.workspace.configPath + }, { + remoteAuthority: r.remoteAuthority, + rejectTransientWorkspaces: true + }); + if (ld(n)) { + return n; + } + } else if (r.folderUri) { + const n = await this.lb({ + folderUri: r.folderUri + }, { + remoteAuthority: r.remoteAuthority + }); + if (Go(n)) { + return n; + } + } else if (e !== "folders" && r.backupPath) { + return { + backupPath: r.backupPath, + remoteAuthority: r.remoteAuthority + }; + } + })); + return $t(s); + } + } + } + kb() { + let e; + if (this.J.wasRestarted) { + e = "all"; + } else { + e = this.M.getValue("window")?.restoreWindows || "all"; + if (!["preserve", "all", "folders", "one", "none"].includes(e)) { + e = "all"; + } + } + return e; + } + async lb(e, i = Object.create(null)) { + const s = this.nb(e); + if (s.scheme === R.file) { + if (C4(e)) { + i = { + ...i, + forceOpenWorkspaceAsFile: true + }; + } + return this.ob(s.fsPath, i); + } else { + return this.mb(e, i); + } + } + mb(e, i) { + let s = this.nb(e); + const r = Ao(s) || i.remoteAuthority; + s = Wv(Pp(s)); + if (C4(e)) { + if (i.gotoLineMode) { + const { + path: n, + line: o, + column: a + } = iu(s.path); + return { + fileUri: s.with({ + path: n + }), + options: { + selection: o ? { + startLineNumber: o, + startColumn: a || 1 + } : undefined + }, + remoteAuthority: r + }; + } + return { + fileUri: s, + remoteAuthority: r + }; + } else if (N1(e)) { + return { + workspace: pn(s), + remoteAuthority: r + }; + } + return { + workspace: U1(s), + remoteAuthority: r + }; + } + nb(e) { + if (N1(e)) { + return e.workspaceUri; + } else if (A4(e)) { + return e.folderUri; + } else { + return e.fileUri; + } + } + async ob(e, i, s) { + let r; + let n; + if (i.gotoLineMode) { + ({ + path: e, + line: r, + column: n + } = iu(e)); + } + e = Ev(pi(e), bs()); + try { + const o = await nA.promises.stat(e); + if (o.isFile()) { + if (!i.forceOpenWorkspaceAsFile) { + const a = await this.O.resolveLocalWorkspace(P.file(e)); + if (a) { + if (a.transient && i.rejectTransientWorkspaces) { + return undefined; + } else { + return { + workspace: { + id: a.id, + configPath: a.configPath + }, + type: Rt.File, + exists: true, + remoteAuthority: a.remoteAuthority, + transient: a.transient + }; + } + } + } + return { + fileUri: P.file(e), + type: Rt.File, + exists: true, + options: { + selection: r ? { + startLineNumber: r, + startColumn: n || 1 + } : undefined + } + }; + } else { + if (o.isDirectory()) { + return { + workspace: U1(P.file(e), o), + type: Rt.Directory, + exists: true + }; + } + if (!j && e === "/dev/null") { + return { + fileUri: P.file(e), + type: Rt.File, + exists: true + }; + } + } + } catch (o) { + if (o.code === "ERR_UNC_HOST_NOT_ALLOWED" && !s) { + return this.pb(e, i); + } + const a = P.file(e); + this.N.removeRecentlyOpened([a]); + if (i.ignoreFileNotFound) { + return { + fileUri: a, + type: Rt.File, + exists: false + }; + } + } + } + async pb(e, i) { + const s = P.file(e); + const { + response: r, + checkboxChecked: n + } = await this.Q.showMessageBox({ + type: "warning", + buttons: [v(2527, null), v(2528, null), v(2529, null)], + message: v(2530, null, s.authority), + detail: v(2531, null, to(s, { + os: Wi, + tildify: this.H + })), + checkboxLabel: v(2532, null, s.authority), + cancelId: 1 + }); + if (r === 0) { + ma(s.authority); + if (n) { + const o = { + channel: "vscode:configureAllowedUNCHost", + args: s.authority + }; + this.sendToFocused(o.channel, o.args); + this.sendToOpeningWindow(o.channel, o.args); + } + return this.ob(e, i, true); + } + if (r === 2) { + aA.openExternal("https://aka.ms/vscode-windows-unc"); + return this.pb(e, i); + } + } + qb(e, i) { + const s = e.charCodeAt(0); + const r = i.remoteAuthority; + let n; + let o; + if (i.gotoLineMode) { + ({ + path: e, + line: n, + column: o + } = iu(e)); + } + if (s !== 47) { + if (Sp(s) && e.charCodeAt(e.charCodeAt(1)) === 58) { + e = Xn(e); + } + e = `/${e}`; + } + const a = P.from({ + scheme: R.vscodeRemote, + authority: r, + path: e + }); + if (e.charCodeAt(e.length - 1) !== 47) { + if (ln(e)) { + if (i.forceOpenWorkspaceAsFile) { + return { + fileUri: a, + options: { + selection: n ? { + startLineNumber: n, + startColumn: o || 1 + } : undefined + }, + remoteAuthority: i.remoteAuthority + }; + } else { + return { + workspace: pn(a), + remoteAuthority: r + }; + } + } + if (i.gotoLineMode || ae.basename(e).indexOf(".") !== -1) { + return { + fileUri: a, + options: { + selection: n ? { + startLineNumber: n, + startColumn: o || 1 + } : undefined + }, + remoteAuthority: r + }; + } + } + return { + workspace: U1(a), + remoteAuthority: r + }; + } + rb(e) { + const i = this.M.getValue("window"); + const s = i?.openFoldersInNewWindow || "default"; + const r = i?.openFilesInNewWindow || "off"; + let n = (e.preferNewWindow || e.forceNewWindow) && !e.forceReuseWindow; + if (!e.forceNewWindow && !e.forceReuseWindow && (s === "on" || s === "off")) { + n = s === "on"; + } + let o = false; + if (e.forceNewWindow || e.forceReuseWindow) { + o = !!e.forceNewWindow && !e.forceReuseWindow; + } else { + if (N) { + if (e.context === 1) { + o = true; + } + } else if (e.context !== 3 && e.context !== 2 && (!e.userEnv || e.userEnv.TERM_PROGRAM !== "vscode")) { + o = true; + } + if (!e.cli.extensionDevelopmentPath && (r === "on" || r === "off")) { + o = r === "on"; + } + } + return { + openFolderInNewWindow: !!n, + openFilesInNewWindow: o + }; + } + async openExtensionDevelopmentHostWindow(e, i) { + const s = AD(this.getWindows(), e); + if (s) { + this.J.reload(s, i.cli); + s.focus(); + return [s]; + } + let r = i.cli["folder-uri"] || []; + let n = i.cli["file-uri"] || []; + let o = i.cli._; + if (!o.length && !r.length && !n.length && !i.cli.extensionTestsPath) { + const l = this.q.state.lastPluginDevelopmentHostWindow; + const u = l?.workspace ?? l?.folderUri; + if (u) { + if (P.isUri(u)) { + if (u.scheme === R.file) { + o = [u.fsPath]; + } else { + r = [u.toString()]; + } + } else if (u.configPath.scheme === R.file) { + o = [Ci(u.configPath)]; + } else { + n = [u.configPath.toString()]; + } + } + } + let a = i.remoteAuthority; + for (const l of e) { + if (l.match(/^[a-zA-Z][a-zA-Z0-9\+\-\.]+:/)) { + const u = P.parse(l); + const d = Ao(u); + if (d) { + if (a) { + if (!mi(d, a)) { + this.z.error("more than one extension development path authority"); + } + } else { + a = d; + } + } + } + } + o = o.filter(l => { + const u = P.file(l); + if ($o(this.getWindows(), u)) { + return false; + } else { + return mi(Ao(u), a); + } + }); + r = r.filter(l => { + const u = this.ib(l); + if (u && $o(this.getWindows(), u)) { + return false; + } else if (u) { + return mi(Ao(u), a); + } else { + return false; + } + }); + n = n.filter(l => { + const u = this.ib(l); + if (u && $o(this.getWindows(), u)) { + return false; + } else if (u) { + return mi(Ao(u), a); + } else { + return false; + } + }); + i.cli._ = o; + i.cli["folder-uri"] = r; + i.cli["file-uri"] = n; + const c = { + context: i.context, + cli: i.cli, + forceNewWindow: true, + forceEmpty: !o.length && !r.length && !n.length, + userEnv: i.userEnv, + noRecentEntry: true, + waitMarkerFileURI: i.waitMarkerFileURI, + remoteAuthority: a, + forceProfile: i.forceProfile, + forceTempProfile: i.forceTempProfile + }; + return this.open(c); + } + async sb(e) { + const i = this.M.getValue("window"); + const s = this.getLastActiveWindow(); + const n = (i?.newWindowProfile ? this.I.profiles.find(c => c.name === i.newWindowProfile) : undefined) ?? s?.profile ?? this.I.defaultProfile; + let o; + if (!e.forceNewWindow && !e.forceNewTabbedWindow) { + o = e.windowToUse || s; + if (o) { + o.focus(); + } + } + const a = { + ...this.H.args, + ...e.cli, + machineId: this.r, + macMachineId: this.s, + sqmId: this.t, + devDeviceId: this.u, + windowId: -1, + shadowWindowForWorkspaceId: e.shadowWindowForWorkspaceId ?? this.H.args["shadow-window-for-workspace-id"] ?? e.cli?.["shadow-window-for-workspace-id"], + windowInWindow: e.windowInWindow, + windowInWindowBodyClass: e.windowInWindowBodyClass, + windowInWindowParentDimensions: (() => { + if (e.windowInWindow !== undefined) { + const c = this.getWindowById(e.windowInWindow); + if (c) { + const l = c.win?.getBounds(); + if (l) { + return { + width: l.width, + height: l.height + }; + } + } + } + })(), + mainPid: process.pid, + appRoot: this.H.appRoot, + execPath: process.execPath, + codeCachePath: this.H.codeCachePath, + backupPath: e.emptyWindowBackupInfo ? F(this.H.backupHome, e.emptyWindowBackupInfo.backupFolder) : undefined, + profiles: { + home: this.I.profilesHome, + all: this.I.profiles, + profile: n + }, + homeDir: this.H.userHome.with({ + scheme: R.file + }).fsPath, + tmpDir: this.H.tmpDir.with({ + scheme: R.file + }).fsPath, + userDataDir: this.H.userDataPath, + remoteAuthority: e.remoteAuthority, + workspace: e.workspace, + userEnv: { + ...this.w, + ...e.userEnv + }, + nls: { + messages: Tf(), + language: Ll() + }, + filesToOpenOrCreate: e.filesToOpen?.filesToOpenOrCreate, + filesToDiff: e.filesToOpen?.filesToDiff, + filesToMerge: e.filesToOpen?.filesToMerge, + filesToWait: e.filesToOpen?.filesToWait, + logLevel: this.C.getLogLevel(), + loggers: { + window: [], + global: this.C.getRegisteredLoggers() + }, + logsPath: this.H.logsHome.with({ + scheme: R.file + }).fsPath, + product: ko, + isInitialStartup: e.initialStartup, + perfMarks: Wf(), + os: { + release: lA(), + hostname: cA(), + arch: uA() + }, + autoDetectHighContrast: i?.autoDetectHighContrast ?? true, + autoDetectColorScheme: i?.autoDetectColorScheme ?? false, + accessibilitySupport: oA.accessibilitySupportEnabled, + colorScheme: this.U.getColorScheme(), + policiesData: this.G.serialize(), + continueOn: this.H.continueOn, + cssModules: this.X.isEnabled ? await this.X.getCssModules() : undefined + }; + if (o) { + const c = o.config; + if (!a.extensionDevelopmentPath && c?.extensionDevelopmentPath) { + a.extensionDevelopmentPath = c.extensionDevelopmentPath; + a.extensionDevelopmentKind = c.extensionDevelopmentKind; + a["enable-proposed-api"] = c["enable-proposed-api"]; + a.verbose = c.verbose; + a["inspect-extensions"] = c["inspect-extensions"]; + a["inspect-brk-extensions"] = c["inspect-brk-extensions"]; + a.debugId = c.debugId; + a.extensionEnvironment = c.extensionEnvironment; + a["extensions-dir"] = c["extensions-dir"]; + a["disable-extensions"] = c["disable-extensions"]; + } + a.loggers = { + global: a.loggers.global, + window: c?.loggers.window ?? a.loggers.window + }; + } else { + const c = this.q.getNewWindowState(a); + Ne("code/willCreateCodeWindow"); + const l = o = this.P.createInstance(Jc, { + state: c, + extensionDevelopmentPath: a.extensionDevelopmentPath, + isExtensionTestHost: !!a.extensionTestsPath, + shadowWindowForWorkspaceId: a.shadowWindowForWorkspaceId, + windowInWindow: e.windowInWindow + }); + Ne("code/didCreateCodeWindow"); + if (e.forceNewTabbedWindow) { + this.getLastActiveWindow()?.addTabbedWindow(l); + } + if (e.windowInWindow !== undefined) { + const f = this.getWindowById(e.windowInWindow); + if (l.browserView && f && f.win) { + l.parentWindowId = f.id; + const p = f.win.getBounds(); + l.browserView.setBounds({ + x: 0, + y: 0, + width: p.width, + height: p.height + }); + l.registerListener({ + dispose: () => { + if (l.browserView && f && f.win) { + f.win.contentView.removeChildView(l.browserView); + } + } + }); + l.registerListener(x.fromNodeEventEmitter(f.win, "closed")(() => { + l.close(); + })); + l.registerListener(x.fromNodeEventEmitter(f.win, "resize")(() => { + if (!l.browserView || !f.win || l.windowInWindowExplicitBounds !== undefined) { + return; + } + const w = f.win.getBounds(); + l.browserView.setBounds({ + x: 0, + y: 0, + width: w.width, + height: w.height + }); + })); + l.registerListener(x.fromNodeEventEmitter(f.win, "focus")(() => { + if (!!l.browserView && !!f.win) { + if (l.isBrowserViewVisible) { + l.browserView.webContents.focus(); + } + } + })); + } + } + this.n.set(l.id, l); + this.a.fire(l); + this.f.fire({ + oldCount: this.getWindowCount() - 1, + newCount: this.getWindowCount() + }); + const u = new De(); + u.add(l.onDidSignalReady(() => this.b.fire(l))); + u.add(x.once(l.onDidClose)(() => this.vb(l, u))); + u.add(x.once(l.onDidDestroy)(() => this.wb(l))); + u.add(l.onDidMaximize(() => this.g.fire(l))); + u.add(l.onDidUnmaximize(() => this.h.fire(l))); + u.add(l.onDidEnterFullScreen(() => this.j.fire({ + window: l, + fullscreen: true + }))); + u.add(l.onDidLeaveFullScreen(() => this.j.fire({ + window: l, + fullscreen: false + }))); + u.add(l.onDidTriggerSystemContextMenu(({ + x: f, + y: p + }) => this.m.fire({ + window: l, + x: f, + y: p + }))); + const d = Vl(l.webContents); + d.removeAllListeners("devtools-reload-page"); + u.add(x.fromNodeEventEmitter(d, "devtools-reload-page")(() => this.J.reload(l))); + this.J.registerWindow(l); + } + a.windowId = o.id; + if (o.isReady) { + this.J.unload(o, 4).then(async c => { + if (!c) { + await this.tb(o, a, e, n); + } + }); + } else { + await this.tb(o, a, e, n); + } + return o; + } + async tb(e, i, s, r) { + if (!i.extensionDevelopmentPath) { + if (Kt(i.workspace)) { + i.backupPath = this.L.registerWorkspaceBackup({ + workspace: i.workspace, + remoteAuthority: i.remoteAuthority + }); + } else if (Li(i.workspace)) { + i.backupPath = this.L.registerFolderBackup({ + folderUri: i.workspace.uri, + remoteAuthority: i.remoteAuthority + }); + } else { + i.backupPath = this.L.registerEmptyWindowBackup({ + backupFolder: s.emptyWindowBackupInfo?.backupFolder ?? B1().id, + remoteAuthority: i.remoteAuthority + }); + } + } + const n = i.workspace ?? ju(i.backupPath, false); + const o = this.ub(s, n, r); + const a = o instanceof Promise ? await o : o; + i.profiles.profile = a; + if (!i.extensionDevelopmentPath) { + await this.I.setProfileForWorkspace(n, a); + } + e.load(i); + } + ub(e, i, s) { + if (e.forceProfile) { + return this.I.profiles.find(r => r.name === e.forceProfile) ?? this.I.createNamedProfile(e.forceProfile); + } else if (e.forceTempProfile) { + return this.I.createTransientProfile(); + } else { + return this.I.getProfileForWorkspace(i) ?? s; + } + } + vb(e, i) { + this.n.delete(e.id); + this.f.fire({ + oldCount: this.getWindowCount() + 1, + newCount: this.getWindowCount() + }); + i.dispose(); + } + wb(e) { + this.n.delete(e.id); + this.c.fire(e); + } + getFocusedWindow() { + const e = cd.getFocusedWindow(); + if (e) { + return this.getWindowById(e.id); + } + } + getLastActiveWindow() { + return this.yb(this.getWindows().filter(e => !e.config?.shadowWindowForWorkspaceId)); + } + xb(e) { + return this.yb(this.getWindows().filter(i => mi(i.remoteAuthority, e))); + } + yb(e) { + return q4(e); + } + sendToFocused(e, ...i) { + (this.getFocusedWindow() || this.getLastActiveWindow())?.sendWhenReady(e, We.None, ...i); + } + sendToOpeningWindow(e, ...i) { + this.D(x.once(this.onDidSignalReadyWindow)(s => { + s.sendWhenReady(e, We.None, ...i); + })); + } + sendToAll(e, i, s) { + for (const r of this.getWindows()) { + if (!s || !(s.indexOf(r.id) >= 0)) { + r.sendWhenReady(e, We.None, i); + } + } + } + getWindows() { + return Array.from(this.n.values()); + } + getWindowCount() { + return this.n.size; + } + getWindowById(e) { + return this.n.get(e); + } + getWindowByWebContents(e) { + const i = cd.fromWebContents(e); + if (!i) { + return; + } + const s = this.getWindowById(i.id); + if (s?.matches(e)) { + return s; + } else { + return undefined; + } + } + }; + ud = __decorate([__param(5, V), __param(6, qo), __param(7, Oi), __param(8, Pn), __param(9, ot), __param(10, Rs), __param(11, Te), __param(12, xo), __param(13, Je), __param(14, Bc), __param(15, Cr), __param(16, Ss), __param(17, nr), __param(18, at), __param(19, Wc), __param(20, Eo), __param(21, To), __param(22, Wo)], ud); + } + }); + var D6; + var dA = g({ + "out-build/vs/platform/windows/node/windowTracker.js"() { + "use strict"; + + ce(); + B(); + M(); + D6 = class extends T { + constructor({ + onDidOpenMainWindow: t, + onDidFocusMainWindow: e, + getActiveWindowId: i + }) { + super(); + this.a = this.D(new De()); + x.latch(x.any(t, e))(this.f, this, this.a); + this.b = Qn(() => i()); + (async () => { + try { + const r = await this.b; + this.c = typeof this.c == "number" ? this.c : r; + } catch {} finally { + this.b = undefined; + } + })(); + } + f(t) { + if (this.b) { + this.b.cancel(); + this.b = undefined; + } + this.c = t; + } + async getActiveClientId() { + return `window:${this.b ? await this.b : this.c}`; + } + }; + } + }); + var hd; + var fA = g({ + "out-build/vs/platform/workspaces/electron-main/workspacesMainService.js"() { + "use strict"; + + wc(); + Lt(); + zh(); + vn(); + hd = class { + constructor(e, i, s, r) { + this.a = e; + this.b = i; + this.c = s; + this.d = r; + this.onDidChangeRecentlyOpened = this.c.onDidChangeRecentlyOpened; + } + async enterWorkspace(e, i) { + const s = this.b.getWindowById(e); + if (s) { + return this.a.enterWorkspace(s, this.b.getWindows(), i); + } + } + createUntitledWorkspace(e, i, s) { + return this.a.createUntitledWorkspace(i, s); + } + deleteUntitledWorkspace(e, i) { + return this.a.deleteUntitledWorkspace(i); + } + getWorkspaceIdentifier(e, i) { + return this.a.getWorkspaceIdentifier(i); + } + getRecentlyOpened(e) { + return this.c.getRecentlyOpened(); + } + addRecentlyOpened(e, i) { + return this.c.addRecentlyOpened(i); + } + removeRecentlyOpened(e, i) { + return this.c.removeRecentlyOpened(i); + } + clearRecentlyOpened(e) { + return this.c.clearRecentlyOpened(); + } + async getDirtyWorkspaces() { + return this.d.getDirtyWorkspaces(); + } + }; + hd = __decorate([__param(0, Cr), __param(1, dt), __param(2, Bc), __param(3, xo)], hd); + } + }); + var P6; + var pA = g({ + "out-build/vs/platform/policy/common/policyIpc.js"() { + "use strict"; + + B(); + M(); + Ls(); + P6 = class { + constructor(t) { + this.b = t; + this.a = new De(); + } + listen(t, e) { + switch (e) { + case "onDidChange": + return x.map(this.b.onDidChange, i => i.reduce((s, r) => ({ + ...s, + [r]: this.b.getPolicyValue(r) ?? null + }), {}), this.a); + } + throw new Error(`Event not found: ${e}`); + } + call(t, e, i) { + switch (e) { + case "updatePolicyDefinitions": + return this.b.updatePolicyDefinitions(i); + } + throw new Error(`Call not found: ${e}`); + } + dispose() { + this.a.dispose(); + } + }; + } + }); + function gA(t) { + return t.map(e => { + const [i, s] = e.split("@"); + return { + proposalName: i, + version: s ? parseInt(s) : undefined + }; + }); + } + function mA(t) { + return t.map(e => e.split("@")[0]); + } + var $6; + var I6; + var em; + var A6; + var C6; + var Jo; + var _6; + var wA; + var tm = g({ + "out-build/vs/platform/extensions/common/extensions.js"() { + "use strict"; + + Wt(); + Y(); + Sc(); + $6 = "extensions.user.cache"; + I6 = "extensions.builtin.cache"; + em = "undefined_publisher"; + (function (t) { + t[t.System = 0] = "System"; + t[t.User = 1] = "User"; + })(A6 ||= {}); + (function (t) { + t.WIN32_X64 = "win32-x64"; + t.WIN32_ARM64 = "win32-arm64"; + t.LINUX_X64 = "linux-x64"; + t.LINUX_ARM64 = "linux-arm64"; + t.LINUX_ARMHF = "linux-armhf"; + t.ALPINE_X64 = "alpine-x64"; + t.ALPINE_ARM64 = "alpine-arm64"; + t.DARWIN_X64 = "darwin-x64"; + t.DARWIN_ARM64 = "darwin-arm64"; + t.WEB = "web"; + t.UNIVERSAL = "universal"; + t.UNKNOWN = "unknown"; + t.UNDEFINED = "undefined"; + })(C6 ||= {}); + Jo = class { + constructor(t) { + this.value = t; + this._lower = t.toLowerCase(); + } + static equals(t, e) { + if (typeof t === "undefined" || t === null) { + return typeof e === "undefined" || e === null; + } + if (typeof e === "undefined" || e === null) { + return false; + } + if (typeof t == "string" || typeof e == "string") { + const i = typeof t == "string" ? t : t.value; + const s = typeof e == "string" ? e : e.value; + return br(i, s); + } + return t._lower === e._lower; + } + static toKey(t) { + if (typeof t == "string") { + return t.toLowerCase(); + } else { + return t._lower; + } + } + }; + _6 = class { + constructor() { + this.c = new Map(); + } + clear() { + this.c.clear(); + } + delete(t) { + this.c.delete(Jo.toKey(t)); + } + get(t) { + return this.c.get(Jo.toKey(t)); + } + has(t) { + return this.c.has(Jo.toKey(t)); + } + set(t, e) { + this.c.set(Jo.toKey(t), e); + } + values() { + return this.c.values(); + } + forEach(t) { + this.c.forEach(t); + } + [Symbol.iterator]() { + return this.c[Symbol.iterator](); + } + }; + wA = q("IBuiltinExtensionsScannerService"); + } + }); + function Ko(t, e) { + if (t.uuid && e.uuid) { + return t.uuid === e.uuid; + } else if (t.id === e.id) { + return true; + } else { + return yp(t.id, e.id) === 0; + } + } + function vA(t, e) { + return `${t}.${e}`; + } + function bA(t) { + return t.toLowerCase(); + } + function yA(t, e) { + return bA(vA(t ?? em, e)); + } + async function SA(t, e) { + if (!Se) { + return false; + } + let i; + try { + i = (await t.readFile(P.file("/etc/os-release"))).value.toString(); + } catch { + try { + i = (await t.readFile(P.file("/usr/lib/os-release"))).value.toString(); + } catch (r) { + e.debug("Error while getting the os-release file.", Vi(r)); + } + } + return !!i && (i.match(/^ID=([^\u001b\r\n]*)/m) || [])[1] === "alpine"; + } + async function EA(t, e) { + const i = await SA(t, e); + const s = zx(i ? "alpine" : Ea, Bw); + e.debug("ComputeTargetPlatform:", s); + return s; + } + var R6; + var O6; + var kA; + var L6 = g({ + "out-build/vs/platform/extensionManagement/common/extensionManagementUtil.js"() { + "use strict"; + + Wt(); + Vu(); + tm(); + H(); + se(); + $e(); + ys(); + $n(); + R6 = /^([^.]+\..+)-(\d+\.\d+\.\d+)(-(.+))?$/; + O6 = class Af { + static create(e) { + const i = e.manifest ? e.manifest.version : e.version; + const s = e.manifest ? e.targetPlatform : e.properties.targetPlatform; + return new Af(e.identifier, i, s); + } + static parse(e) { + const i = R6.exec(e); + if (i && i[1] && i[2]) { + return new Af({ + id: i[1] + }, i[2], i[4] || undefined); + } else { + return null; + } + } + constructor(e, i, s = "undefined") { + this.identifier = e; + this.version = i; + this.targetPlatform = s; + this.id = e.id; + } + toString() { + return `${this.id}-${this.version}${this.targetPlatform !== "undefined" ? `-${this.targetPlatform}` : ""}`; + } + equals(e) { + if (e instanceof Af) { + return Ko(this, e) && this.version === e.version && this.targetPlatform === e.targetPlatform; + } else { + return false; + } + } + }; + kA = new Jo("pprice.better-merge"); + } + }); + function M6(t) { + return Nt(t) && Hx(t.identifier) && (xA(t.location) || wt(t.location) && t.location) && (Gs(t.relativeLocation) || wt(t.relativeLocation)) && t.version && wt(t.version); + } + function xA(t) { + if (t) { + return wt(t.path) && wt(t.scheme); + } else { + return false; + } + } + var F6; + var Kc; + var Zo; + var dd; + var fd = g({ + "out-build/vs/platform/extensionManagement/common/extensionsProfileScannerService.js"() { + "use strict"; + + ce(); + Ze(); + M(); + B(); + $i(); + se(); + Vu(); + L6(); + He(); + Y(); + X(); + _s(); + As(); + _e(); + $e(); + xt(); + (function (t) { + t.ERROR_PROFILE_NOT_FOUND = "ERROR_PROFILE_NOT_FOUND"; + t.ERROR_INVALID_CONTENT = "ERROR_INVALID_CONTENT"; + })(F6 ||= {}); + Kc = class extends Error { + constructor(t, e) { + super(t); + this.code = e; + } + }; + Zo = q("IExtensionsProfileScannerService"); + dd = class extends T { + constructor(e, i, s, r, n, o) { + super(); + this.j = e; + this.m = i; + this.n = s; + this.q = r; + this.r = n; + this.s = o; + this.b = this.D(new $()); + this.onAddExtensions = this.b.event; + this.c = this.D(new $()); + this.onDidAddExtensions = this.c.event; + this.f = this.D(new $()); + this.onRemoveExtensions = this.f.event; + this.g = this.D(new $()); + this.onDidRemoveExtensions = this.g.event; + this.h = new Ht(); + } + scanProfileExtensions(e, i) { + return this.t(e, undefined, i); + } + async addExtensionsToProfile(e, i, s) { + const r = []; + const n = []; + try { + await this.t(i, o => { + const a = []; + if (s) { + a.push(...o); + } else { + for (const c of o) { + if (e.some(([l]) => Ko(l.identifier, c.identifier) && (l.manifest.version !== c.version || l.location.toString() !== c.location.toString()))) { + r.push(c); + } else { + a.push(c); + } + } + } + for (const [c, l] of e) { + const u = a.findIndex(f => Ko(f.identifier, c.identifier) && f.version === c.manifest.version && f.location.toString() === c.location.toString()); + const d = { + identifier: c.identifier, + version: c.manifest.version, + location: c.location, + metadata: l + }; + if (u === -1) { + n.push(d); + a.push(d); + } else { + a.splice(u, 1, d); + } + } + if (n.length) { + this.b.fire({ + extensions: n, + profileLocation: i + }); + } + if (r.length) { + this.f.fire({ + extensions: r, + profileLocation: i + }); + } + return a; + }); + if (n.length) { + this.c.fire({ + extensions: n, + profileLocation: i + }); + } + if (r.length) { + this.g.fire({ + extensions: r, + profileLocation: i + }); + } + return n; + } catch (o) { + if (n.length) { + this.c.fire({ + extensions: n, + error: o, + profileLocation: i + }); + } + if (r.length) { + this.g.fire({ + extensions: r, + error: o, + profileLocation: i + }); + } + throw o; + } + } + async updateMetadata(e, i) { + const s = []; + await this.t(i, r => { + const n = []; + for (const o of r) { + const a = e.find(([c]) => Ko(c.identifier, o.identifier) && c.manifest.version === o.version); + if (a) { + o.metadata = { + ...o.metadata, + ...a[1] + }; + s.push(o); + } + n.push(o); + } + return n; + }); + return s; + } + async removeExtensionFromProfile(e, i) { + const s = []; + try { + await this.t(i, r => { + const n = []; + for (const o of r) { + if (Ko(o.identifier, e.identifier)) { + s.push(o); + } else { + n.push(o); + } + } + if (s.length) { + this.f.fire({ + extensions: s, + profileLocation: i + }); + } + return n; + }); + if (s.length) { + this.g.fire({ + extensions: s, + profileLocation: i + }); + } + } catch (r) { + if (s.length) { + this.g.fire({ + extensions: s, + error: r, + profileLocation: i + }); + } + throw r; + } + } + async t(e, i, s) { + return this.F(e).queue(async () => { + let r = []; + let n; + try { + const o = await this.m.readFile(e); + n = JSON.parse(o.value.toString().trim() || "[]"); + } catch (o) { + if ($s(o) !== 1) { + throw o; + } + if (this.q.extUri.isEqual(e, this.n.defaultProfile.extensionsResource)) { + n = await this.C(); + } + if (!n && s?.bailOutWhenFileNotFound) { + throw new Kc(Vi(o), "ERROR_PROFILE_NOT_FOUND"); + } + } + if (n) { + if (!Array.isArray(n)) { + this.u(e); + } + let o = false; + for (const a of n) { + if (!M6(a)) { + this.u(e); + } + let c; + if (wt(a.relativeLocation) && a.relativeLocation) { + c = this.y(a.relativeLocation); + } else if (wt(a.location)) { + this.s.warn(`Extensions profile: Ignoring extension with invalid location: ${a.location}`); + continue; + } else { + c = P.revive(a.location); + const l = this.w(c); + if (l) { + o = true; + a.relativeLocation = l; + } + } + if (Gs(a.metadata?.hasPreReleaseVersion) && a.metadata?.preRelease) { + o = true; + a.metadata.hasPreReleaseVersion = true; + } + r.push({ + identifier: a.identifier, + location: c, + version: a.version, + metadata: a.metadata + }); + } + if (o) { + await this.m.writeFile(e, z.fromString(JSON.stringify(n))); + } + } + if (i) { + r = i(r); + const o = r.map(a => ({ + identifier: a.identifier, + version: a.version, + location: a.location.toJSON(), + relativeLocation: this.w(a.location), + metadata: a.metadata + })); + await this.m.writeFile(e, z.fromString(JSON.stringify(o))); + } + return r; + }); + } + u(e) { + const i = new Kc(`Invalid extensions content in ${e.toString()}`, "ERROR_INVALID_CONTENT"); + this.r.publicLogError2("extensionsProfileScanningError", { + code: i.code + }); + throw i; + } + w(e) { + if (this.q.extUri.isEqual(this.q.extUri.dirname(e), this.j)) { + return this.q.extUri.basename(e); + } else { + return undefined; + } + } + y(e) { + return this.q.extUri.joinPath(this.j, e); + } + async C() { + this.z ||= (async () => { + const e = this.q.extUri.joinPath(this.n.defaultProfile.location, "extensions.json"); + const i = this.q.extUri.joinPath(this.j, ".init-default-profile-extensions"); + let s; + try { + s = (await this.m.readFile(e)).value.toString(); + } catch (n) { + if ($s(n) === 1) { + return; + } + throw n; + } + this.s.info("Migrating extensions from old default profile location", e.toString()); + let r; + try { + const n = JSON.parse(s); + if (Array.isArray(n) && n.every(o => M6(o))) { + r = n; + } else { + this.s.warn("Skipping migrating from old default profile locaiton: Found invalid data", n); + } + } catch (n) { + this.s.error(n); + } + if (r) { + try { + await this.m.createFile(this.n.defaultProfile.extensionsResource, z.fromString(JSON.stringify(r)), { + overwrite: false + }); + this.s.info("Migrated extensions from old default profile location to new location", e.toString(), this.n.defaultProfile.extensionsResource.toString()); + } catch (n) { + if ($s(n) === 3) { + this.s.info("Migration from old default profile location to new location is done by another window", e.toString(), this.n.defaultProfile.extensionsResource.toString()); + } else { + throw n; + } + } + } + try { + await this.m.del(e); + } catch (n) { + if ($s(n) !== 1) { + this.s.error(n); + } + } + try { + await this.m.del(i); + } catch (n) { + if ($s(n) !== 1) { + this.s.error(n); + } + } + return r; + })(); + return this.z; + } + F(e) { + let i = this.h.get(e); + if (!i) { + i = new eo(); + this.h.set(e, i); + } + return i; + } + }; + dd = __decorate([__param(1, at), __param(2, Cs), __param(3, yi), __param(4, Ot), __param(5, V)], dd); + } + }); + function im(t) { + switch (t) { + case 1: + return v(116, null); + case 2: + return v(117, null); + case 3: + return v(118, null); + case 4: + return v(119, null); + case 5: + return v(120, null); + case 6: + return v(121, null); + case 7: + return v(122, null); + case 8: + return v(123, null); + case 9: + return v(124, null); + default: + return ""; + } + } + var DA = g({ + "out-build/vs/base/common/jsonErrorMessages.js"() { + "use strict"; + + be(); + } + }); + var Zc; + var ve; + var PA; + var $A; + var N6; + var IA; + var AA; + var CA; + var _A; + var RA; + var OA; + var LA; + var W6; + var MA; + var FA; + var NA; + var T6; + var WA; + var TA; + var jA; + var UA; + var BA; + var qA; + var zA; + var HA; + var VA; + var GA; + var JA; + var KA; + var ZA; + var YA; + var XA; + var QA; + var eC; + var tC; + var iC; + var sC; + var rC; + var nC; + var j6 = g({ + "out-build/vs/base/common/semver/semver.js"() { + "use strict"; + + Zc = {}; + ve = { + exports: Zc + }; + (function (t, e) { + if (typeof Zc == "object" && typeof ve == "object") { + ve.exports = e(); + } else if (typeof define == "function" && define.amd) { + define([], e); + } else { + var i = e(); + for (var s in i) { + (typeof Zc == "object" ? Zc : t)[s] = i[s]; + } + } + })(typeof self !== "undefined" ? self : undefined, function () { + return function (t) { + var e = {}; + function i(s) { + if (e[s]) { + return e[s].exports; + } + var r = e[s] = { + i: s, + l: false, + exports: {} + }; + t[s].call(r.exports, r, r.exports, i); + r.l = true; + return r.exports; + } + i.m = t; + i.c = e; + i.d = function (s, r, n) { + if (!i.o(s, r)) { + Object.defineProperty(s, r, { + enumerable: true, + get: n + }); + } + }; + i.r = function (s) { + if (typeof Symbol !== "undefined" && Symbol.toStringTag) { + Object.defineProperty(s, Symbol.toStringTag, { + value: "Module" + }); + } + Object.defineProperty(s, "__esModule", { + value: true + }); + }; + i.t = function (s, r) { + if (r & 1) { + s = i(s); + } + if (r & 8 || r & 4 && typeof s == "object" && s && s.__esModule) { + return s; + } + var n = Object.create(null); + i.r(n); + Object.defineProperty(n, "default", { + enumerable: true, + value: s + }); + if (r & 2 && typeof s != "string") { + for (var o in s) { + i.d(n, o, function (a) { + return s[a]; + }.bind(null, o)); + } + } + return n; + }; + i.n = function (s) { + var r = s && s.__esModule ? function () { + return s.default; + } : function () { + return s; + }; + i.d(r, "a", r); + return r; + }; + i.o = function (s, r) { + return Object.prototype.hasOwnProperty.call(s, r); + }; + i.p = ""; + return i(i.s = 0); + }([function (t, e, i) { + (function (s) { + var r; + e = t.exports = Oe; + r = typeof s == "object" && s.env && s.env.NODE_DEBUG && /\bsemver\b/i.test(s.env.NODE_DEBUG) ? function () { + var S = Array.prototype.slice.call(arguments, 0); + S.unshift("SEMVER"); + console.log.apply(console, S); + } : function () {}; + e.SEMVER_SPEC_VERSION = "2.0.0"; + var n = 256; + var o = Number.MAX_SAFE_INTEGER || 9007199254740991; + var a = e.re = []; + var c = e.src = []; + var l = 0; + var u = l++; + c[u] = "0|[1-9]\\d*"; + var d = l++; + c[d] = "[0-9]+"; + var f = l++; + c[f] = "\\d*[a-zA-Z-][a-zA-Z0-9-]*"; + var p = l++; + c[p] = "(" + c[u] + ")\\.(" + c[u] + ")\\.(" + c[u] + ")"; + var w = l++; + c[w] = "(" + c[d] + ")\\.(" + c[d] + ")\\.(" + c[d] + ")"; + var m = l++; + c[m] = "(?:" + c[u] + "|" + c[f] + ")"; + var y = l++; + c[y] = "(?:" + c[d] + "|" + c[f] + ")"; + var b = l++; + c[b] = "(?:-(" + c[m] + "(?:\\." + c[m] + ")*))"; + var k = l++; + c[k] = "(?:-?(" + c[y] + "(?:\\." + c[y] + ")*))"; + var A = l++; + c[A] = "[0-9A-Za-z-]+"; + var C = l++; + c[C] = "(?:\\+(" + c[A] + "(?:\\." + c[A] + ")*))"; + var _ = l++; + var Z = "v?" + c[p] + c[b] + "?" + c[C] + "?"; + c[_] = "^" + Z + "$"; + var ie = "[v=\\s]*" + c[w] + c[k] + "?" + c[C] + "?"; + var me = l++; + c[me] = "^" + ie + "$"; + var W = l++; + c[W] = "((?:<|>)?=?)"; + var Ee = l++; + c[Ee] = c[d] + "|x|X|\\*"; + var Ye = l++; + c[Ye] = c[u] + "|x|X|\\*"; + var re = l++; + c[re] = "[v=\\s]*(" + c[Ye] + ")(?:\\.(" + c[Ye] + ")(?:\\.(" + c[Ye] + ")(?:" + c[b] + ")?" + c[C] + "?)?)?"; + var St = l++; + c[St] = "[v=\\s]*(" + c[Ee] + ")(?:\\.(" + c[Ee] + ")(?:\\.(" + c[Ee] + ")(?:" + c[k] + ")?" + c[C] + "?)?)?"; + var L = l++; + c[L] = "^" + c[W] + "\\s*" + c[re] + "$"; + var O = l++; + c[O] = "^" + c[W] + "\\s*" + c[St] + "$"; + var G = l++; + c[G] = "(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])"; + var U = l++; + c[U] = "(?:~>?)"; + var te = l++; + c[te] = "(\\s*)" + c[U] + "\\s+"; + a[te] = new RegExp(c[te], "g"); + var pe = l++; + c[pe] = "^" + c[U] + c[re] + "$"; + var Ce = l++; + c[Ce] = "^" + c[U] + c[St] + "$"; + var rt = l++; + c[rt] = "(?:\\^)"; + var pt = l++; + c[pt] = "(\\s*)" + c[rt] + "\\s+"; + a[pt] = new RegExp(c[pt], "g"); + var Bs = l++; + c[Bs] = "^" + c[rt] + c[re] + "$"; + var Br = l++; + c[Br] = "^" + c[rt] + c[St] + "$"; + var qs = l++; + c[qs] = "^" + c[W] + "\\s*(" + ie + ")$|^$"; + var qn = l++; + c[qn] = "^" + c[W] + "\\s*(" + Z + ")$|^$"; + var gs = l++; + c[gs] = "(\\s*)" + c[W] + "\\s*(" + ie + "|" + c[re] + ")"; + a[gs] = new RegExp(c[gs], "g"); + var Il = l++; + c[Il] = "^\\s*(" + c[re] + ")\\s+-\\s+(" + c[re] + ")\\s*$"; + var Al = l++; + c[Al] = "^\\s*(" + c[St] + ")\\s+-\\s+(" + c[St] + ")\\s*$"; + var $0 = l++; + c[$0] = "(<|>)?=?\\s*\\*"; + for (var qr = 0; qr < 35; qr++) { + r(qr, c[qr]); + a[qr] ||= new RegExp(c[qr]); + } + function zr(S, D) { + if (S instanceof Oe) { + return S; + } + if (typeof S != "string" || S.length > n || !(D ? a[me] : a[_]).test(S)) { + return null; + } + try { + return new Oe(S, D); + } catch { + return null; + } + } + function Oe(S, D) { + if (S instanceof Oe) { + if (S.loose === D) { + return S; + } + S = S.version; + } else if (typeof S != "string") { + throw new TypeError("Invalid Version: " + S); + } + if (S.length > n) { + throw new TypeError("version is longer than " + n + " characters"); + } + if (!(this instanceof Oe)) { + return new Oe(S, D); + } + r("SemVer", S, D); + this.loose = D; + var I = S.trim().match(D ? a[me] : a[_]); + if (!I) { + throw new TypeError("Invalid Version: " + S); + } + this.raw = S; + this.major = +I[1]; + this.minor = +I[2]; + this.patch = +I[3]; + if (this.major > o || this.major < 0) { + throw new TypeError("Invalid major version"); + } + if (this.minor > o || this.minor < 0) { + throw new TypeError("Invalid minor version"); + } + if (this.patch > o || this.patch < 0) { + throw new TypeError("Invalid patch version"); + } + if (I[4]) { + this.prerelease = I[4].split(".").map(function (Q) { + if (/^[0-9]+$/.test(Q)) { + var ne = +Q; + if (ne >= 0 && ne < o) { + return ne; + } + } + return Q; + }); + } else { + this.prerelease = []; + } + this.build = I[5] ? I[5].split(".") : []; + this.format(); + } + e.parse = zr; + e.valid = function (S, D) { + var I = zr(S, D); + if (I) { + return I.version; + } else { + return null; + } + }; + e.clean = function (S, D) { + var I = zr(S.trim().replace(/^[=v]+/, ""), D); + if (I) { + return I.version; + } else { + return null; + } + }; + e.SemVer = Oe; + Oe.prototype.format = function () { + this.version = this.major + "." + this.minor + "." + this.patch; + if (this.prerelease.length) { + this.version += "-" + this.prerelease.join("."); + } + return this.version; + }; + Oe.prototype.toString = function () { + return this.version; + }; + Oe.prototype.compare = function (S) { + r("SemVer.compare", this.version, this.loose, S); + if (!(S instanceof Oe)) { + S = new Oe(S, this.loose); + } + return this.compareMain(S) || this.comparePre(S); + }; + Oe.prototype.compareMain = function (S) { + if (!(S instanceof Oe)) { + S = new Oe(S, this.loose); + } + return zn(this.major, S.major) || zn(this.minor, S.minor) || zn(this.patch, S.patch); + }; + Oe.prototype.comparePre = function (S) { + if (!(S instanceof Oe)) { + S = new Oe(S, this.loose); + } + if (this.prerelease.length && !S.prerelease.length) { + return -1; + } + if (!this.prerelease.length && S.prerelease.length) { + return 1; + } + if (!this.prerelease.length && !S.prerelease.length) { + return 0; + } + var D = 0; + do { + var I = this.prerelease[D]; + var Q = S.prerelease[D]; + r("prerelease compare", D, I, Q); + if (I === undefined && Q === undefined) { + return 0; + } + if (Q === undefined) { + return 1; + } + if (I === undefined) { + return -1; + } + if (I !== Q) { + return zn(I, Q); + } + } while (++D); + }; + Oe.prototype.inc = function (S, D) { + switch (S) { + case "premajor": + this.prerelease.length = 0; + this.patch = 0; + this.minor = 0; + this.major++; + this.inc("pre", D); + break; + case "preminor": + this.prerelease.length = 0; + this.patch = 0; + this.minor++; + this.inc("pre", D); + break; + case "prepatch": + this.prerelease.length = 0; + this.inc("patch", D); + this.inc("pre", D); + break; + case "prerelease": + if (this.prerelease.length === 0) { + this.inc("patch", D); + } + this.inc("pre", D); + break; + case "major": + if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) { + this.major++; + } + this.minor = 0; + this.patch = 0; + this.prerelease = []; + break; + case "minor": + if (this.patch !== 0 || this.prerelease.length === 0) { + this.minor++; + } + this.patch = 0; + this.prerelease = []; + break; + case "patch": + if (this.prerelease.length === 0) { + this.patch++; + } + this.prerelease = []; + break; + case "pre": + if (this.prerelease.length === 0) { + this.prerelease = [0]; + } else { + for (var I = this.prerelease.length; --I >= 0;) { + if (typeof this.prerelease[I] == "number") { + this.prerelease[I]++; + I = -2; + } + } + if (I === -1) { + this.prerelease.push(0); + } + } + if (D) { + if (this.prerelease[0] === D) { + if (isNaN(this.prerelease[1])) { + this.prerelease = [D, 0]; + } + } else { + this.prerelease = [D, 0]; + } + } + break; + default: + throw new Error("invalid increment argument: " + S); + } + this.format(); + this.raw = this.version; + return this; + }; + e.inc = function (S, D, I, Q) { + if (typeof I == "string") { + Q = I; + I = undefined; + } + try { + return new Oe(S, I).inc(D, Q).version; + } catch { + return null; + } + }; + e.diff = function (S, D) { + if (Cf(S, D)) { + return null; + } + var I = zr(S); + var Q = zr(D); + if (I.prerelease.length || Q.prerelease.length) { + for (var ne in I) { + if ((ne === "major" || ne === "minor" || ne === "patch") && I[ne] !== Q[ne]) { + return "pre" + ne; + } + } + return "prerelease"; + } + for (var ne in I) { + if ((ne === "major" || ne === "minor" || ne === "patch") && I[ne] !== Q[ne]) { + return ne; + } + } + }; + e.compareIdentifiers = zn; + var I0 = /^[0-9]+$/; + function zn(S, D) { + var I = I0.test(S); + var Q = I0.test(D); + if (I && Q) { + S = +S; + D = +D; + } + if (I && !Q) { + return -1; + } else if (Q && !I) { + return 1; + } else if (S < D) { + return -1; + } else if (S > D) { + return 1; + } else { + return 0; + } + } + function zs(S, D, I) { + return new Oe(S, I).compare(new Oe(D, I)); + } + function Cl(S, D, I) { + return zs(S, D, I) > 0; + } + function _l(S, D, I) { + return zs(S, D, I) < 0; + } + function Cf(S, D, I) { + return zs(S, D, I) === 0; + } + function A0(S, D, I) { + return zs(S, D, I) !== 0; + } + function _f(S, D, I) { + return zs(S, D, I) >= 0; + } + function Rf(S, D, I) { + return zs(S, D, I) <= 0; + } + function Rl(S, D, I, Q) { + var ne; + switch (D) { + case "===": + if (typeof S == "object") { + S = S.version; + } + if (typeof I == "object") { + I = I.version; + } + ne = S === I; + break; + case "!==": + if (typeof S == "object") { + S = S.version; + } + if (typeof I == "object") { + I = I.version; + } + ne = S !== I; + break; + case "": + case "=": + case "==": + ne = Cf(S, I, Q); + break; + case "!=": + ne = A0(S, I, Q); + break; + case ">": + ne = Cl(S, I, Q); + break; + case ">=": + ne = _f(S, I, Q); + break; + case "<": + ne = _l(S, I, Q); + break; + case "<=": + ne = Rf(S, I, Q); + break; + default: + throw new TypeError("Invalid operator: " + D); + } + return ne; + } + function zi(S, D) { + if (S instanceof zi) { + if (S.loose === D) { + return S; + } + S = S.value; + } + if (!(this instanceof zi)) { + return new zi(S, D); + } + r("comparator", S, D); + this.loose = D; + this.parse(S); + if (this.semver === fa) { + this.value = ""; + } else { + this.value = this.operator + this.semver.version; + } + r("comp", this); + } + e.rcompareIdentifiers = function (S, D) { + return zn(D, S); + }; + e.major = function (S, D) { + return new Oe(S, D).major; + }; + e.minor = function (S, D) { + return new Oe(S, D).minor; + }; + e.patch = function (S, D) { + return new Oe(S, D).patch; + }; + e.compare = zs; + e.compareLoose = function (S, D) { + return zs(S, D, true); + }; + e.rcompare = function (S, D, I) { + return zs(D, S, I); + }; + e.sort = function (S, D) { + return S.sort(function (I, Q) { + return e.compare(I, Q, D); + }); + }; + e.rsort = function (S, D) { + return S.sort(function (I, Q) { + return e.rcompare(I, Q, D); + }); + }; + e.gt = Cl; + e.lt = _l; + e.eq = Cf; + e.neq = A0; + e.gte = _f; + e.lte = Rf; + e.cmp = Rl; + e.Comparator = zi; + var fa = {}; + function lt(S, D) { + if (S instanceof lt) { + if (S.loose === D) { + return S; + } else { + return new lt(S.raw, D); + } + } + if (S instanceof zi) { + return new lt(S.value, D); + } + if (!(this instanceof lt)) { + return new lt(S, D); + } + this.loose = D; + this.raw = S; + this.set = S.split(/\s*\|\|\s*/).map(function (I) { + return this.parseRange(I.trim()); + }, this).filter(function (I) { + return I.length; + }); + if (!this.set.length) { + throw new TypeError("Invalid SemVer Range: " + S); + } + this.format(); + } + function ui(S) { + return !S || S.toLowerCase() === "x" || S === "*"; + } + function pS(S, D, I, Q, ne, Mt, Le, Di, gt, Yt, ms, mt, Ut) { + return ((D = ui(I) ? "" : ui(Q) ? ">=" + I + ".0.0" : ui(ne) ? ">=" + I + "." + Q + ".0" : ">=" + D) + " " + (Di = ui(gt) ? "" : ui(Yt) ? "<" + (+gt + 1) + ".0.0" : ui(ms) ? "<" + gt + "." + (+Yt + 1) + ".0" : mt ? "<=" + gt + "." + Yt + "." + ms + "-" + mt : "<=" + Di)).trim(); + } + function gS(S, D) { + for (var I = 0; I < S.length; I++) { + if (!S[I].test(D)) { + return false; + } + } + if (D.prerelease.length) { + for (I = 0; I < S.length; I++) { + r(S[I].semver); + if (S[I].semver !== fa && S[I].semver.prerelease.length > 0) { + var Q = S[I].semver; + if (Q.major === D.major && Q.minor === D.minor && Q.patch === D.patch) { + return true; + } + } + } + return false; + } + return true; + } + function Ol(S, D, I) { + try { + D = new lt(D, I); + } catch { + return false; + } + return D.test(S); + } + function Of(S, D, I, Q) { + var ne; + var Mt; + var Le; + var Di; + var gt; + S = new Oe(S, Q); + D = new lt(D, Q); + switch (I) { + case ">": + ne = Cl; + Mt = Rf; + Le = _l; + Di = ">"; + gt = ">="; + break; + case "<": + ne = _l; + Mt = _f; + Le = Cl; + Di = "<"; + gt = "<="; + break; + default: + throw new TypeError("Must provide a hilo val of \"<\" or \">\""); + } + if (Ol(S, D, Q)) { + return false; + } + for (var Yt = 0; Yt < D.set.length; ++Yt) { + var ms = D.set[Yt]; + var mt = null; + var Ut = null; + ms.forEach(function (Pi) { + if (Pi.semver === fa) { + Pi = new zi(">=0.0.0"); + } + mt = mt || Pi; + Ut = Ut || Pi; + if (ne(Pi.semver, mt.semver, Q)) { + mt = Pi; + } else if (Le(Pi.semver, Ut.semver, Q)) { + Ut = Pi; + } + }); + if (mt.operator === Di || mt.operator === gt || (!Ut.operator || Ut.operator === Di) && Mt(S, Ut.semver) || Ut.operator === gt && Le(S, Ut.semver)) { + return false; + } + } + return true; + } + zi.prototype.parse = function (S) { + var D = this.loose ? a[qs] : a[qn]; + var I = S.match(D); + if (!I) { + throw new TypeError("Invalid comparator: " + S); + } + this.operator = I[1]; + if (this.operator === "=") { + this.operator = ""; + } + if (I[2]) { + this.semver = new Oe(I[2], this.loose); + } else { + this.semver = fa; + } + }; + zi.prototype.toString = function () { + return this.value; + }; + zi.prototype.test = function (S) { + r("Comparator.test", S, this.loose); + return this.semver === fa || (typeof S == "string" && (S = new Oe(S, this.loose)), Rl(S, this.operator, this.semver, this.loose)); + }; + zi.prototype.intersects = function (S, D) { + if (!(S instanceof zi)) { + throw new TypeError("a Comparator is required"); + } + var I; + if (this.operator === "") { + I = new lt(S.value, D); + return Ol(this.value, I, D); + } + if (S.operator === "") { + I = new lt(this.value, D); + return Ol(S.semver, I, D); + } + var Q = (this.operator === ">=" || this.operator === ">") && (S.operator === ">=" || S.operator === ">"); + var ne = (this.operator === "<=" || this.operator === "<") && (S.operator === "<=" || S.operator === "<"); + var Mt = this.semver.version === S.semver.version; + var Le = (this.operator === ">=" || this.operator === "<=") && (S.operator === ">=" || S.operator === "<="); + var Di = Rl(this.semver, "<", S.semver, D) && (this.operator === ">=" || this.operator === ">") && (S.operator === "<=" || S.operator === "<"); + var gt = Rl(this.semver, ">", S.semver, D) && (this.operator === "<=" || this.operator === "<") && (S.operator === ">=" || S.operator === ">"); + return Q || ne || Mt && Le || Di || gt; + }; + e.Range = lt; + lt.prototype.format = function () { + this.range = this.set.map(function (S) { + return S.join(" ").trim(); + }).join("||").trim(); + return this.range; + }; + lt.prototype.toString = function () { + return this.range; + }; + lt.prototype.parseRange = function (S) { + var D = this.loose; + S = S.trim(); + r("range", S, D); + var I = D ? a[Al] : a[Il]; + S = S.replace(I, pS); + r("hyphen replace", S); + S = S.replace(a[gs], "$1$2$3"); + r("comparator trim", S, a[gs]); + S = (S = (S = S.replace(a[te], "$1~")).replace(a[pt], "$1^")).split(/\s+/).join(" "); + var Q = D ? a[qs] : a[qn]; + var ne = S.split(" ").map(function (Mt) { + return function (Le, Di) { + r("comp", Le); + Le = function (gt, Yt) { + return gt.trim().split(/\s+/).map(function (ms) { + return function (mt, Ut) { + r("caret", mt, Ut); + var Pi = Ut ? a[Br] : a[Bs]; + return mt.replace(Pi, function (ts, le, ye, qe, Qe) { + var Bt; + r("caret", mt, ts, le, ye, qe, Qe); + if (ui(le)) { + Bt = ""; + } else if (ui(ye)) { + Bt = ">=" + le + ".0.0 <" + (+le + 1) + ".0.0"; + } else if (ui(qe)) { + Bt = le === "0" ? ">=" + le + "." + ye + ".0 <" + le + "." + (+ye + 1) + ".0" : ">=" + le + "." + ye + ".0 <" + (+le + 1) + ".0.0"; + } else if (Qe) { + r("replaceCaret pr", Qe); + if (Qe.charAt(0) !== "-") { + Qe = "-" + Qe; + } + Bt = le === "0" ? ye === "0" ? ">=" + le + "." + ye + "." + qe + Qe + " <" + le + "." + ye + "." + (+qe + 1) : ">=" + le + "." + ye + "." + qe + Qe + " <" + le + "." + (+ye + 1) + ".0" : ">=" + le + "." + ye + "." + qe + Qe + " <" + (+le + 1) + ".0.0"; + } else { + r("no pr"); + Bt = le === "0" ? ye === "0" ? ">=" + le + "." + ye + "." + qe + " <" + le + "." + ye + "." + (+qe + 1) : ">=" + le + "." + ye + "." + qe + " <" + le + "." + (+ye + 1) + ".0" : ">=" + le + "." + ye + "." + qe + " <" + (+le + 1) + ".0.0"; + } + r("caret return", Bt); + return Bt; + }); + }(ms, Yt); + }).join(" "); + }(Le, Di); + r("caret", Le); + Le = function (gt, Yt) { + return gt.trim().split(/\s+/).map(function (ms) { + return function (mt, Ut) { + var Pi = Ut ? a[Ce] : a[pe]; + return mt.replace(Pi, function (ts, le, ye, qe, Qe) { + var Bt; + r("tilde", mt, ts, le, ye, qe, Qe); + if (ui(le)) { + Bt = ""; + } else if (ui(ye)) { + Bt = ">=" + le + ".0.0 <" + (+le + 1) + ".0.0"; + } else if (ui(qe)) { + Bt = ">=" + le + "." + ye + ".0 <" + le + "." + (+ye + 1) + ".0"; + } else if (Qe) { + r("replaceTilde pr", Qe); + if (Qe.charAt(0) !== "-") { + Qe = "-" + Qe; + } + Bt = ">=" + le + "." + ye + "." + qe + Qe + " <" + le + "." + (+ye + 1) + ".0"; + } else { + Bt = ">=" + le + "." + ye + "." + qe + " <" + le + "." + (+ye + 1) + ".0"; + } + r("tilde return", Bt); + return Bt; + }); + }(ms, Yt); + }).join(" "); + }(Le, Di); + r("tildes", Le); + Le = function (gt, Yt) { + r("replaceXRanges", gt, Yt); + return gt.split(/\s+/).map(function (ms) { + return function (mt, Ut) { + mt = mt.trim(); + var Pi = Ut ? a[O] : a[L]; + return mt.replace(Pi, function (ts, le, ye, qe, Qe, Bt) { + r("xRange", mt, ts, le, ye, qe, Qe, Bt); + var C0 = ui(ye); + var pa = C0 || ui(qe); + var ga = pa || ui(Qe); + if (le === "=" && ga) { + le = ""; + } + if (C0) { + ts = le === ">" || le === "<" ? "<0.0.0" : "*"; + } else if (le && ga) { + if (pa) { + qe = 0; + } + if (ga) { + Qe = 0; + } + if (le === ">") { + le = ">="; + if (pa) { + ye = +ye + 1; + qe = 0; + Qe = 0; + } else if (ga) { + qe = +qe + 1; + Qe = 0; + } + } else if (le === "<=") { + le = "<"; + if (pa) { + ye = +ye + 1; + } else { + qe = +qe + 1; + } + } + ts = le + ye + "." + qe + "." + Qe; + } else if (pa) { + ts = ">=" + ye + ".0.0 <" + (+ye + 1) + ".0.0"; + } else if (ga) { + ts = ">=" + ye + "." + qe + ".0 <" + ye + "." + (+qe + 1) + ".0"; + } + r("xRange return", ts); + return ts; + }); + }(ms, Yt); + }).join(" "); + }(Le, Di); + r("xrange", Le); + Le = function (gt, Yt) { + r("replaceStars", gt, Yt); + return gt.trim().replace(a[$0], ""); + }(Le, Di); + r("stars", Le); + return Le; + }(Mt, D); + }).join(" ").split(/\s+/); + if (this.loose) { + ne = ne.filter(function (Mt) { + return !!Mt.match(Q); + }); + } + return ne = ne.map(function (Mt) { + return new zi(Mt, D); + }); + }; + lt.prototype.intersects = function (S, D) { + if (!(S instanceof lt)) { + throw new TypeError("a Range is required"); + } + return this.set.some(function (I) { + return I.every(function (Q) { + return S.set.some(function (ne) { + return ne.every(function (Mt) { + return Q.intersects(Mt, D); + }); + }); + }); + }); + }; + e.toComparators = function (S, D) { + return new lt(S, D).set.map(function (I) { + return I.map(function (Q) { + return Q.value; + }).join(" ").trim().split(" "); + }); + }; + lt.prototype.test = function (S) { + if (!S) { + return false; + } + if (typeof S == "string") { + S = new Oe(S, this.loose); + } + for (var D = 0; D < this.set.length; D++) { + if (gS(this.set[D], S)) { + return true; + } + } + return false; + }; + e.satisfies = Ol; + e.maxSatisfying = function (S, D, I) { + var Q = null; + var ne = null; + try { + var Mt = new lt(D, I); + } catch { + return null; + } + S.forEach(function (Le) { + if (Mt.test(Le)) { + if (!Q || ne.compare(Le) === -1) { + ne = new Oe(Q = Le, I); + } + } + }); + return Q; + }; + e.minSatisfying = function (S, D, I) { + var Q = null; + var ne = null; + try { + var Mt = new lt(D, I); + } catch { + return null; + } + S.forEach(function (Le) { + if (Mt.test(Le)) { + if (!Q || ne.compare(Le) === 1) { + ne = new Oe(Q = Le, I); + } + } + }); + return Q; + }; + e.validRange = function (S, D) { + try { + return new lt(S, D).range || "*"; + } catch { + return null; + } + }; + e.ltr = function (S, D, I) { + return Of(S, D, "<", I); + }; + e.gtr = function (S, D, I) { + return Of(S, D, ">", I); + }; + e.outside = Of; + e.prerelease = function (S, D) { + var I = zr(S, D); + if (I && I.prerelease.length) { + return I.prerelease; + } else { + return null; + } + }; + e.intersects = function (S, D, I) { + S = new lt(S, I); + D = new lt(D, I); + return S.intersects(D); + }; + e.coerce = function (S) { + if (S instanceof Oe) { + return S; + } + if (typeof S != "string") { + return null; + } + var D = S.match(a[G]); + if (D == null) { + return null; + } else { + return zr((D[1] || "0") + "." + (D[2] || "0") + "." + (D[3] || "0")); + } + }; + }).call(this, i(1)); + }, function (t, e) { + var i; + var s; + var r = t.exports = {}; + function n() { + throw new Error("setTimeout has not been defined"); + } + function o() { + throw new Error("clearTimeout has not been defined"); + } + function a(y) { + if (i === setTimeout) { + return setTimeout(y, 0); + } + if ((i === n || !i) && setTimeout) { + i = setTimeout; + return setTimeout(y, 0); + } + try { + return i(y, 0); + } catch { + try { + return i.call(null, y, 0); + } catch { + return i.call(this, y, 0); + } + } + } + (function () { + try { + i = typeof setTimeout == "function" ? setTimeout : n; + } catch { + i = n; + } + try { + s = typeof clearTimeout == "function" ? clearTimeout : o; + } catch { + s = o; + } + })(); + var c; + var l = []; + var u = false; + var d = -1; + function f() { + if (u && c) { + u = false; + if (c.length) { + l = c.concat(l); + } else { + d = -1; + } + if (l.length) { + p(); + } + } + } + function p() { + if (!u) { + var y = a(f); + u = true; + for (var b = l.length; b;) { + c = l; + l = []; + while (++d < b) { + if (c) { + c[d].run(); + } + } + d = -1; + b = l.length; + } + c = null; + u = false; + (function (k) { + if (s === clearTimeout) { + return clearTimeout(k); + } + if ((s === o || !s) && clearTimeout) { + s = clearTimeout; + return clearTimeout(k); + } + try { + s(k); + } catch { + try { + return s.call(null, k); + } catch { + return s.call(this, k); + } + } + })(y); + } + } + function w(y, b) { + this.fun = y; + this.array = b; + } + function m() {} + r.nextTick = function (y) { + var b = new Array(arguments.length - 1); + if (arguments.length > 1) { + for (var k = 1; k < arguments.length; k++) { + b[k - 1] = arguments[k]; + } + } + l.push(new w(y, b)); + if (l.length === 1 && !u) { + a(p); + } + }; + w.prototype.run = function () { + this.fun.apply(null, this.array); + }; + r.title = "browser"; + r.browser = true; + r.env = {}; + r.argv = []; + r.version = ""; + r.versions = {}; + r.on = m; + r.addListener = m; + r.once = m; + r.off = m; + r.removeListener = m; + r.removeAllListeners = m; + r.emit = m; + r.prependListener = m; + r.prependOnceListener = m; + r.listeners = function (y) { + return []; + }; + r.binding = function (y) { + throw new Error("process.binding is not supported"); + }; + r.cwd = function () { + return "/"; + }; + r.chdir = function (y) { + throw new Error("process.chdir is not supported"); + }; + r.umask = function () { + return 0; + }; + }]); + }); + PA = ve.exports.SEMVER_SPEC_VERSION; + $A = ve.exports.parse; + N6 = ve.exports.valid; + IA = ve.exports.coerce; + AA = ve.exports.clean; + CA = ve.exports.inc; + _A = ve.exports.major; + RA = ve.exports.minor; + OA = ve.exports.patch; + LA = ve.exports.prerelease; + W6 = ve.exports.gt; + MA = ve.exports.gte; + FA = ve.exports.lt; + NA = ve.exports.lte; + T6 = ve.exports.eq; + WA = ve.exports.neq; + TA = ve.exports.cmp; + jA = ve.exports.compare; + UA = ve.exports.rcompare; + BA = ve.exports.compareIdentifiers; + qA = ve.exports.rcompareIdentifiers; + zA = ve.exports.compareBuild; + HA = ve.exports.sort; + VA = ve.exports.rsort; + GA = ve.exports.diff; + JA = ve.exports.validRange; + KA = ve.exports.satisfies; + ZA = ve.exports.maxSatisfying; + YA = ve.exports.minSatisfying; + XA = ve.exports.minVersion; + QA = ve.exports.gtr; + eC = ve.exports.ltr; + tC = ve.exports.outside; + iC = ve.exports.intersects; + sC = ve.exports.SemVer; + rC = ve.exports.Comparator; + nC = ve.exports.Range; + } + }); + var U6; + var B6; + var oC = g({ + "out-build/vs/platform/extensions/common/extensionsApiProposals.js"() { + "use strict"; + + U6 = { + activeComment: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.activeComment.d.ts" + }, + aiRelatedInformation: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.aiRelatedInformation.d.ts" + }, + aiTextSearchProvider: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.aiTextSearchProvider.d.ts", + version: 2 + }, + authLearnMore: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.authLearnMore.d.ts" + }, + authSession: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.authSession.d.ts" + }, + canonicalUriProvider: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.canonicalUriProvider.d.ts" + }, + chatEditing: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.chatEditing.d.ts" + }, + chatParticipantAdditions: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.chatParticipantAdditions.d.ts" + }, + chatParticipantPrivate: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.chatParticipantPrivate.d.ts", + version: 2 + }, + chatProvider: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.chatProvider.d.ts" + }, + chatReferenceBinaryData: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.chatReferenceBinaryData.d.ts" + }, + chatTab: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.chatTab.d.ts" + }, + chatVariableResolver: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.chatVariableResolver.d.ts" + }, + codeActionAI: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.codeActionAI.d.ts" + }, + codeActionRanges: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.codeActionRanges.d.ts" + }, + codiconDecoration: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.codiconDecoration.d.ts" + }, + commentReactor: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.commentReactor.d.ts" + }, + commentReveal: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.commentReveal.d.ts" + }, + commentThreadApplicability: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.commentThreadApplicability.d.ts" + }, + commentingRangeHint: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.commentingRangeHint.d.ts" + }, + commentsDraftState: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.commentsDraftState.d.ts" + }, + contribAccessibilityHelpContent: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribAccessibilityHelpContent.d.ts" + }, + contribChatParticipantDetection: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribChatParticipantDetection.d.ts" + }, + contribCommentEditorActionsMenu: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribCommentEditorActionsMenu.d.ts" + }, + contribCommentPeekContext: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribCommentPeekContext.d.ts" + }, + contribCommentThreadAdditionalMenu: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribCommentThreadAdditionalMenu.d.ts" + }, + contribCommentsViewThreadMenus: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribCommentsViewThreadMenus.d.ts" + }, + contribDebugCreateConfiguration: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribDebugCreateConfiguration.d.ts" + }, + contribDiffEditorGutterToolBarMenus: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribDiffEditorGutterToolBarMenus.d.ts" + }, + contribEditSessions: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribEditSessions.d.ts" + }, + contribEditorContentMenu: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribEditorContentMenu.d.ts" + }, + contribLabelFormatterWorkspaceTooltip: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribLabelFormatterWorkspaceTooltip.d.ts" + }, + contribMenuBarHome: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribMenuBarHome.d.ts" + }, + contribMergeEditorMenus: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribMergeEditorMenus.d.ts" + }, + contribMultiDiffEditorMenus: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribMultiDiffEditorMenus.d.ts" + }, + contribNotebookStaticPreloads: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribNotebookStaticPreloads.d.ts" + }, + contribRemoteHelp: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribRemoteHelp.d.ts" + }, + contribShareMenu: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribShareMenu.d.ts" + }, + contribSourceControlHistoryItemMenu: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribSourceControlHistoryItemMenu.d.ts" + }, + contribSourceControlHistoryTitleMenu: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribSourceControlHistoryTitleMenu.d.ts" + }, + contribSourceControlInputBoxMenu: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribSourceControlInputBoxMenu.d.ts" + }, + contribSourceControlTitleMenu: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribSourceControlTitleMenu.d.ts" + }, + contribStatusBarItems: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribStatusBarItems.d.ts" + }, + contribViewContainerTitle: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribViewContainerTitle.d.ts" + }, + contribViewsRemote: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribViewsRemote.d.ts" + }, + contribViewsWelcome: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribViewsWelcome.d.ts" + }, + control: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.control.d.ts" + }, + createFileSystemWatcher: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.createFileSystemWatcher.d.ts" + }, + cursor: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.cursor.d.ts" + }, + cursorNoDeps: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.cursorNoDeps.d.ts" + }, + cursorPublic: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.cursorPublic.d.ts" + }, + cursorTracing: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.cursorTracing.d.ts" + }, + customEditorMove: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.customEditorMove.d.ts" + }, + debugVisualization: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.debugVisualization.d.ts" + }, + defaultChatParticipant: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.defaultChatParticipant.d.ts", + version: 2 + }, + diffCommand: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.diffCommand.d.ts" + }, + diffContentOptions: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.diffContentOptions.d.ts" + }, + documentFiltersExclusive: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.documentFiltersExclusive.d.ts" + }, + documentPaste: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.documentPaste.d.ts" + }, + editSessionIdentityProvider: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.editSessionIdentityProvider.d.ts" + }, + editorHoverVerbosityLevel: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.editorHoverVerbosityLevel.d.ts" + }, + editorInsets: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.editorInsets.d.ts" + }, + embeddings: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.embeddings.d.ts" + }, + extensionRuntime: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.extensionRuntime.d.ts" + }, + extensionsAny: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.extensionsAny.d.ts" + }, + externalUriOpener: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.externalUriOpener.d.ts" + }, + fileComments: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.fileComments.d.ts" + }, + fileSearchProvider: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.fileSearchProvider.d.ts" + }, + fileSearchProvider2: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.fileSearchProvider2.d.ts" + }, + findFiles2: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.findFiles2.d.ts", + version: 2 + }, + findTextInFiles: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.findTextInFiles.d.ts" + }, + findTextInFiles2: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.findTextInFiles2.d.ts" + }, + fsChunks: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.fsChunks.d.ts" + }, + idToken: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.idToken.d.ts" + }, + inlineCompletionsAdditions: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.inlineCompletionsAdditions.d.ts" + }, + inlineEdit: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.inlineEdit.d.ts" + }, + interactive: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.interactive.d.ts" + }, + interactiveWindow: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.interactiveWindow.d.ts" + }, + ipc: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.ipc.d.ts" + }, + languageModelSystem: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.languageModelSystem.d.ts" + }, + languageStatusText: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.languageStatusText.d.ts" + }, + mappedEditsProvider: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.mappedEditsProvider.d.ts" + }, + multiDocumentHighlightProvider: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.multiDocumentHighlightProvider.d.ts" + }, + nativeWindowHandle: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.nativeWindowHandle.d.ts" + }, + newSymbolNamesProvider: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.newSymbolNamesProvider.d.ts" + }, + notebookCellExecution: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookCellExecution.d.ts" + }, + notebookCellExecutionState: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookCellExecutionState.d.ts" + }, + notebookControllerAffinityHidden: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookControllerAffinityHidden.d.ts" + }, + notebookDeprecated: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookDeprecated.d.ts" + }, + notebookExecution: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookExecution.d.ts" + }, + notebookKernelSource: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookKernelSource.d.ts" + }, + notebookLiveShare: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookLiveShare.d.ts" + }, + notebookMessaging: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookMessaging.d.ts" + }, + notebookMime: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookMime.d.ts" + }, + notebookReplDocument: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookReplDocument.d.ts" + }, + notebookVariableProvider: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookVariableProvider.d.ts" + }, + portsAttributes: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.portsAttributes.d.ts" + }, + profileContentHandlers: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.profileContentHandlers.d.ts" + }, + quickDiffProvider: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.quickDiffProvider.d.ts" + }, + quickInputButtonLocation: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.quickInputButtonLocation.d.ts" + }, + quickPickItemTooltip: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.quickPickItemTooltip.d.ts" + }, + quickPickSortByLabel: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.quickPickSortByLabel.d.ts" + }, + resolvers: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.resolvers.d.ts" + }, + scmActionButton: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.scmActionButton.d.ts" + }, + scmHistoryProvider: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.scmHistoryProvider.d.ts" + }, + scmMultiDiffEditor: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.scmMultiDiffEditor.d.ts" + }, + scmRemotes: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.scmRemotes.d.ts" + }, + scmSelectedProvider: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.scmSelectedProvider.d.ts" + }, + scmTextDocument: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.scmTextDocument.d.ts" + }, + scmValidation: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.scmValidation.d.ts" + }, + shareProvider: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.shareProvider.d.ts" + }, + showLocal: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.showLocal.d.ts" + }, + speech: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.speech.d.ts" + }, + tabInputMultiDiff: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.tabInputMultiDiff.d.ts" + }, + tabInputTextMerge: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.tabInputTextMerge.d.ts" + }, + taskPresentationGroup: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.taskPresentationGroup.d.ts" + }, + telemetry: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.telemetry.d.ts" + }, + terminalCompletionProvider: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.terminalCompletionProvider.d.ts" + }, + terminalDataWriteEvent: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.terminalDataWriteEvent.d.ts" + }, + terminalDimensions: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.terminalDimensions.d.ts" + }, + terminalExecuteCommandEvent: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.terminalExecuteCommandEvent.d.ts" + }, + terminalQuickFixProvider: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.terminalQuickFixProvider.d.ts" + }, + terminalSelection: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.terminalSelection.d.ts" + }, + testObserver: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.testObserver.d.ts" + }, + testRelatedCode: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.testRelatedCode.d.ts" + }, + textEditorDiffInformation: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.textEditorDiffInformation.d.ts" + }, + textSearchComplete2: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.textSearchComplete2.d.ts" + }, + textSearchProvider: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.textSearchProvider.d.ts" + }, + textSearchProvider2: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.textSearchProvider2.d.ts" + }, + timeline: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.timeline.d.ts" + }, + tokenInformation: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.tokenInformation.d.ts" + }, + treeViewActiveItem: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.treeViewActiveItem.d.ts" + }, + treeViewMarkdownMessage: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.treeViewMarkdownMessage.d.ts" + }, + treeViewReveal: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.treeViewReveal.d.ts" + }, + tunnelFactory: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.tunnelFactory.d.ts" + }, + tunnels: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.tunnels.d.ts" + }, + valueSelectionInQuickPick: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.valueSelectionInQuickPick.d.ts" + }, + workspaceTrust: { + proposal: "https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.workspaceTrust.d.ts" + } + }; + B6 = Object.freeze(U6); + } + }); + function aC(t) { + t = t.trim(); + return t === "*" || nm.test(t); + } + function sm(t) { + if (!aC(t)) { + return null; + } + t = t.trim(); + if (t === "*") { + return { + hasCaret: false, + hasGreaterEquals: false, + majorBase: 0, + majorMustEqual: false, + minorBase: 0, + minorMustEqual: false, + patchBase: 0, + patchMustEqual: false, + preRelease: null + }; + } + const e = t.match(nm); + if (e) { + return { + hasCaret: e[1] === "^", + hasGreaterEquals: e[1] === ">=", + majorBase: e[2] === "x" ? 0 : parseInt(e[2], 10), + majorMustEqual: e[2] !== "x", + minorBase: e[4] === "x" ? 0 : parseInt(e[4], 10), + minorMustEqual: e[4] !== "x", + patchBase: e[6] === "x" ? 0 : parseInt(e[6], 10), + patchMustEqual: e[6] !== "x", + preRelease: e[8] || null + }; + } else { + return null; + } + } + function rm(t) { + if (!t) { + return null; + } + const e = t.majorBase; + const i = t.majorMustEqual; + const s = t.minorBase; + let r = t.minorMustEqual; + const n = t.patchBase; + let o = t.patchMustEqual; + if (t.hasCaret) { + if (e !== 0) { + r = false; + } + o = false; + } + let a = 0; + if (t.preRelease) { + const c = z6.exec(t.preRelease); + if (c) { + const [, l, u, d] = c; + a = Date.UTC(Number(l), Number(u) - 1, Number(d)); + } + } + return { + majorBase: e, + majorMustEqual: i, + minorBase: s, + minorMustEqual: r, + patchBase: n, + patchMustEqual: o, + isMinimum: t.hasGreaterEquals, + notBefore: a + }; + } + function cC(t, e, i) { + let s; + if (typeof t == "string") { + s = rm(sm(t)); + } else { + s = t; + } + let r; + if (e instanceof Date) { + r = e.getTime(); + } else if (typeof e == "string") { + r = new Date(e).getTime(); + } + let n; + if (typeof i == "string") { + n = rm(sm(i)); + } else { + n = i; + } + if (!s || !n) { + return false; + } + const o = s.majorBase; + const a = s.minorBase; + const c = s.patchBase; + let l = n.majorBase; + let u = n.minorBase; + let d = n.patchBase; + const f = n.notBefore; + let p = n.majorMustEqual; + let w = n.minorMustEqual; + let m = n.patchMustEqual; + if (n.isMinimum) { + if (o > l) { + return true; + } else if (o < l) { + return false; + } else if (a > u) { + return true; + } else if (a < u || r && r < f) { + return false; + } else { + return c >= d; + } + } else { + if (o === 1 && l === 0 && (!p || !w || !m)) { + l = 1; + u = 0; + d = 0; + p = true; + w = false; + m = false; + } + if (o < l) { + return false; + } else if (o > l) { + return !p; + } else if (a < u) { + return false; + } else if (a > u) { + return !w; + } else if (c < d) { + return false; + } else if (c > d) { + return !m; + } else { + return !r || !(r < f); + } + } + } + function lC(t, e, i, s, r, n) { + const o = []; + if (typeof s.publisher !== "undefined" && typeof s.publisher != "string") { + o.push([Pe.Error, v(1880, null)]); + return o; + } + if (typeof s.name != "string") { + o.push([Pe.Error, v(1881, null, "name")]); + return o; + } + if (typeof s.version != "string") { + o.push([Pe.Error, v(1882, null, "version")]); + return o; + } + if (!s.engines) { + o.push([Pe.Error, v(1883, null, "engines")]); + return o; + } + if (typeof s.engines.vscode != "string") { + o.push([Pe.Error, v(1884, null, "engines.vscode")]); + return o; + } + if (typeof s.extensionDependencies !== "undefined" && !q6(s.extensionDependencies)) { + o.push([Pe.Error, v(1885, null, "extensionDependencies")]); + return o; + } + if (typeof s.activationEvents !== "undefined") { + if (!q6(s.activationEvents)) { + o.push([Pe.Error, v(1886, null, "activationEvents")]); + return o; + } + if (typeof s.main === "undefined" && typeof s.browser === "undefined") { + o.push([Pe.Error, v(1887, null, "activationEvents", "main", "browser")]); + return o; + } + } + if (typeof s.extensionKind !== "undefined" && typeof s.main === "undefined") { + o.push([Pe.Warning, v(1888, null, "extensionKind")]); + } + if (typeof s.main !== "undefined") { + if (typeof s.main != "string") { + o.push([Pe.Error, v(1889, null, "main")]); + return o; + } + { + const l = he(i, s.main); + if (!Dp(l, i)) { + o.push([Pe.Warning, v(1890, null, l.path, i.path)]); + } + } + } + if (typeof s.browser !== "undefined") { + if (typeof s.browser != "string") { + o.push([Pe.Error, v(1891, null, "browser")]); + return o; + } + { + const l = he(i, s.browser); + if (!Dp(l, i)) { + o.push([Pe.Warning, v(1892, null, l.path, i.path)]); + } + } + } + if (!N6(s.version)) { + o.push([Pe.Error, v(1893, null)]); + return o; + } + const a = []; + if (!uC(t, e, s, r, a)) { + for (const l of a) { + o.push([Pe.Error, l]); + } + } + if (n && s.enabledApiProposals?.length) { + const l = []; + if (!hC([...s.enabledApiProposals], l)) { + for (const u of l) { + o.push([Pe.Error, u]); + } + } + } + return o; + } + function uC(t, e, i, s, r) { + if (s || typeof i.main === "undefined" && typeof i.browser === "undefined") { + return true; + } else { + return dC(t, e, i.engines.vscode, r); + } + } + function hC(t, e) { + if (t.length === 0) { + return true; + } + const i = Array.isArray(e) ? e : undefined; + const s = (i ? undefined : e) ?? B6; + const r = []; + const n = gA(t); + for (const { + proposalName: o, + version: a + } of n) { + if (!a) { + continue; + } + if (s[o]?.version !== a) { + r.push(o); + } + } + if (r.length) { + if (i) { + if (r.length === 1) { + i.push(v(1894, null, r[0])); + } else { + i.push(v(1895, null, r.slice(0, r.length - 1).map(o => `'${o}'`).join(", "), r[r.length - 1])); + } + } + return false; + } else { + return true; + } + } + function dC(t, e, i, s = []) { + const r = rm(sm(i)); + if (!r) { + s.push(v(1896, null, i)); + return false; + } + if (r.majorBase === 0) { + if (!r.majorMustEqual || !r.minorMustEqual) { + s.push(v(1897, null, i)); + return false; + } + } else if (!r.majorMustEqual) { + s.push(v(1898, null, i)); + return false; + } + if (cC(t, e, r)) { + return true; + } else { + s.push(v(1899, null, t, i)); + return false; + } + } + function q6(t) { + if (!Array.isArray(t)) { + return false; + } + for (let e = 0, i = t.length; e < i; e++) { + if (typeof t[e] != "string") { + return false; + } + } + return true; + } + var nm; + var z6; + var fC = g({ + "out-build/vs/platform/extensions/common/extensionValidator.js"() { + "use strict"; + + nt(); + dh(); + be(); + j6(); + tm(); + oC(); + nm = /^(\^|>=)?((\d+)|x)\.((\d+)|x)\.((\d+)|x)(\-.*)?$/; + z6 = /^-(\d{4})(\d{2})(\d{2})$/; + } + }); + function pC(t, e, i, s) { + try { + gC(t, e, i, s); + } catch (r) { + t.error(r?.message ?? r); + } + return e; + } + function gC(t, e, i, s) { + const r = (n, o, a) => { + const c = n[o]; + if (wt(c)) { + const l = c; + const u = l.length; + if (u > 1 && l[0] === "%" && l[u - 1] === "%") { + const d = l.substr(1, u - 2); + let f = i[d]; + if (f === undefined && s) { + f = s[d]; + } + const p = typeof f == "string" ? f : f?.message; + const w = s?.[d]; + const m = typeof w == "string" ? w : w?.message; + if (!p) { + if (!m) { + t.warn(`[${e.name}]: ${v(1858, null, d)}`); + } + return; + } + if (a && (o === "title" || o === "category") && m && m !== p) { + const y = { + value: p, + original: m + }; + n[o] = y; + } else { + n[o] = p; + } + } + } else if (Nt(c)) { + for (const l in c) { + if (c.hasOwnProperty(l)) { + if (l === "commands") { + r(c, l, true); + } else { + r(c, l, a); + } + } + } + } else if (Array.isArray(c)) { + for (let l = 0; l < c.length; l++) { + r(c, l, a); + } + } + }; + for (const n in e) { + if (e.hasOwnProperty(n)) { + r(e, n); + } + } + } + var mC = g({ + "out-build/vs/platform/extensionManagement/common/extensionNls.js"() { + "use strict"; + + _e(); + be(); + } + }); + var om; + var H6; + var pd; + var Yo; + var Yc; + var Xc; + var V6; + var G6 = g({ + "out-build/vs/platform/extensionManagement/common/extensionsScannerService.js"() { + "use strict"; + + zt(); + ce(); + us(); + Ze(); + $e(); + rr(); + DA(); + M(); + Ie(); + we(); + H(); + nt(); + j6(); + dh(); + _e(); + se(); + be(); + Ri(); + L6(); + tm(); + fC(); + He(); + Y(); + X(); + ht(); + B(); + hu(); + fd(); + _s(); + As(); + mC(); + (function (t) { + function e(i, s) { + if (i === s) { + return true; + } + const r = Object.keys(i); + const n = new Set(); + for (const o of Object.keys(s)) { + n.add(o); + } + if (r.length !== n.size) { + return false; + } + for (const o of r) { + if (i[o] !== s[o]) { + return false; + } + n.delete(o); + } + return n.size === 0; + } + t.equals = e; + })(om ||= {}); + H6 = q("IExtensionsScannerService"); + pd = class extends T { + constructor(e, i, s, r, n, o, a, c, l, u, d, f) { + super(); + this.systemExtensionsLocation = e; + this.userExtensionsLocation = i; + this.q = s; + this.r = r; + this.s = n; + this.t = o; + this.u = a; + this.w = c; + this.y = l; + this.z = u; + this.C = d; + this.F = f; + this.g = this.D(new $()); + this.onDidChangeCache = this.g.event; + this.h = he(this.userExtensionsLocation, ".obsolete"); + this.j = this.D(this.F.createInstance(Xc, this.r, this.h)); + this.m = this.D(this.F.createInstance(Xc, this.r, this.h)); + this.n = this.D(this.F.createInstance(Yc, this.h)); + this.H = undefined; + this.D(this.j.onDidChangeCache(() => this.g.fire(0))); + this.D(this.m.onDidChangeCache(() => this.g.fire(1))); + } + getTargetPlatform() { + this.G ||= EA(this.u, this.w); + return this.G; + } + async scanAllExtensions(e, i, s) { + const [r, n] = await Promise.all([this.scanSystemExtensions(e), this.scanUserExtensions(i)]); + const o = s ? await this.scanExtensionsUnderDevelopment(e, [...r, ...n]) : []; + return this.L(r, n, o, await this.getTargetPlatform(), true); + } + async scanSystemExtensions(e) { + const i = []; + i.push(this.M(!!e.useCache, e.language)); + i.push(this.N(e.language, !!e.checkControlFile)); + const [s, r] = await Promise.all(i); + return this.J([...s, ...r], 0, e, false); + } + async scanUserExtensions(e) { + const i = e.profileLocation ?? this.userExtensionsLocation; + this.w.trace("Started scanning user extensions", i); + const s = this.C.extUri.isEqual(e.profileLocation, this.s.defaultProfile.extensionsResource) ? { + bailOutWhenFileNotFound: true + } : undefined; + const r = await this.P(i, !!e.profileLocation, 1, !e.includeUninstalled, e.language, true, s, e.productVersion ?? this.R()); + const n = e.useCache && !r.devMode && r.excludeObsolete ? this.m : this.n; + let o; + try { + o = await n.scanExtensions(r); + } catch (a) { + if (a instanceof Kc && a.code === "ERROR_PROFILE_NOT_FOUND") { + await this.I(); + o = await n.scanExtensions(r); + } else { + throw a; + } + } + o = await this.J(o, 1, e, true); + this.w.trace("Scanned user extensions:", o.length); + return o; + } + async scanExtensionsUnderDevelopment(e, i) { + if (this.y.isExtensionDevelopment && this.y.extensionDevelopmentLocationURI) { + const s = (await Promise.all(this.y.extensionDevelopmentLocationURI.filter(r => r.scheme === R.file).map(async r => { + const n = await this.P(r, false, 1, true, e.language, false, undefined, e.productVersion ?? this.R()); + return (await this.n.scanOneOrMultipleExtensions(n)).map(a => { + a.type = i.find(c => Ko(c.identifier, a.identifier))?.type ?? a.type; + return this.n.validate(a, n); + }); + }))).flat(); + return this.J(s, "development", e, true); + } + return []; + } + async scanExistingExtension(e, i, s) { + const r = await this.P(e, false, i, true, s.language, true, undefined, s.productVersion ?? this.R()); + const n = await this.n.scanExtension(r); + if (!n || !s.includeInvalid && !n.isValid) { + return null; + } else { + return n; + } + } + async scanOneOrMultipleExtensions(e, i, s) { + const r = await this.P(e, false, i, true, s.language, true, undefined, s.productVersion ?? this.R()); + const n = await this.n.scanOneOrMultipleExtensions(r); + return this.J(n, i, s, true); + } + async scanMultipleExtensions(e, i, s) { + const r = []; + await Promise.all(e.map(async n => { + const o = await this.scanOneOrMultipleExtensions(n, i, s); + r.push(...o); + })); + return this.J(r, i, s, true); + } + async scanMetadata(e) { + const i = he(e, "package.json"); + const s = (await this.u.readFile(i)).value.toString(); + return JSON.parse(s).__metadata; + } + async updateMetadata(e, i) { + const s = he(e, "package.json"); + const r = (await this.u.readFile(s)).value.toString(); + const n = JSON.parse(r); + if (i.isMachineScoped === false) { + delete i.isMachineScoped; + } + if (i.isBuiltin === false) { + delete i.isBuiltin; + } + n.__metadata = { + ...n.__metadata, + ...i + }; + await this.u.writeFile(he(e, "package.json"), z.fromString(JSON.stringify(n, null, "\t"))); + } + async initializeDefaultProfileExtensions() { + try { + await this.t.scanProfileExtensions(this.s.defaultProfile.extensionsResource, { + bailOutWhenFileNotFound: true + }); + } catch (e) { + if (e instanceof Kc && e.code === "ERROR_PROFILE_NOT_FOUND") { + await this.I(); + } else { + throw e; + } + } + } + async I() { + this.H ||= (async () => { + try { + this.w.info("Started initializing default profile extensions in extensions installation folder.", this.userExtensionsLocation.toString()); + const e = await this.scanUserExtensions({ + includeInvalid: true + }); + if (e.length) { + await this.t.addExtensionsToProfile(e.map(i => [i, i.metadata]), this.s.defaultProfile.extensionsResource); + } else { + try { + await this.u.createFile(this.s.defaultProfile.extensionsResource, z.fromString(JSON.stringify([]))); + } catch (i) { + if ($s(i) !== 1) { + this.w.warn("Failed to create default profile extensions manifest in extensions installation folder.", this.userExtensionsLocation.toString(), Vi(i)); + } + } + } + this.w.info("Completed initializing default profile extensions in extensions installation folder.", this.userExtensionsLocation.toString()); + } catch (e) { + this.w.error(e); + } finally { + this.H = undefined; + } + })(); + return this.H; + } + async J(e, i, s, r) { + if (!s.includeAllVersions) { + e = this.L(i === 0 ? e : undefined, i === 1 ? e : undefined, i === "development" ? e : undefined, await this.getTargetPlatform(), r); + } + if (!s.includeInvalid) { + e = e.filter(n => n.isValid); + } + return e.sort((n, o) => { + const a = Ue(n.location.fsPath); + const c = Ue(o.location.fsPath); + if (a < c) { + return -1; + } else if (a > c) { + return 1; + } else { + return 0; + } + }); + } + L(e, i, s, r, n) { + const o = (c, l, u) => { + if (c.isValid && !l.isValid) { + return false; + } + if (c.isValid === l.isValid) { + if (n && W6(c.manifest.version, l.manifest.version)) { + this.w.debug(`Skipping extension ${l.location.path} with lower version ${l.manifest.version} in favour of ${c.location.path} with version ${c.manifest.version}`); + return false; + } + if (T6(c.manifest.version, l.manifest.version)) { + if (c.type === 0) { + this.w.debug(`Skipping extension ${l.location.path} in favour of system extension ${c.location.path} with same version`); + return false; + } + if (c.targetPlatform === r) { + this.w.debug(`Skipping extension ${l.location.path} from different target platform ${l.targetPlatform}`); + return false; + } + } + } + if (u) { + this.w.warn(`Overwriting user extension ${c.location.path} with ${l.location.path}.`); + } else { + this.w.debug(`Overwriting user extension ${c.location.path} with ${l.location.path}.`); + } + return true; + }; + const a = new _6(); + e?.forEach(c => { + const l = a.get(c.identifier.id); + if (!l || o(l, c, false)) { + a.set(c.identifier.id, c); + } + }); + i?.forEach(c => { + const l = a.get(c.identifier.id); + if (!l && e && c.type === 0) { + this.w.debug(`Skipping obsolete system extension ${c.location.path}.`); + return; + } + if (!l || o(l, c, false)) { + a.set(c.identifier.id, c); + } + }); + s?.forEach(c => { + const l = a.get(c.identifier.id); + if (!l || o(l, c, true)) { + a.set(c.identifier.id, c); + } + a.set(c.identifier.id, c); + }); + return [...a.values()]; + } + async M(e, i) { + this.w.trace("Started scanning system extensions"); + const s = await this.P(this.systemExtensionsLocation, false, 0, true, i, true, undefined, this.R()); + const n = await (e && !s.devMode ? this.j : this.n).scanExtensions(s); + this.w.trace("Scanned system extensions:", n.length); + return n; + } + async N(e, i) { + const s = this.y.isBuilt ? [] : this.z.builtInExtensions; + if (!s?.length) { + return []; + } + this.w.trace("Started scanning dev system extensions"); + const r = i ? await this.O() : {}; + const n = []; + const o = P.file(pi(F(Ct.asFileUri("").fsPath, "..", ".build", "builtInExtensions"))); + for (const c of s) { + const l = r[c.name] || "marketplace"; + switch (l) { + case "disabled": + break; + case "marketplace": + n.push(he(o, c.name)); + break; + default: + n.push(P.file(l)); + break; + } + } + const a = await Promise.all(n.map(async c => this.n.scanExtension(await this.P(c, false, 0, true, e, true, undefined, this.R())))); + this.w.trace("Scanned dev system extensions:", a.length); + return $t(a); + } + async O() { + try { + const e = await this.u.readFile(this.q); + return JSON.parse(e.value.toString()); + } catch { + return {}; + } + } + async P(e, i, s, r, n, o, a, c) { + const l = await this.f(n ?? Hi); + const u = await this.Q(e); + const d = i && !this.C.extUri.isEqual(e, this.s.defaultProfile.extensionsResource) ? this.s.defaultProfile.extensionsResource : undefined; + const f = d ? await this.Q(d) : undefined; + return new Yo(e, u, d, f, i, a, s, r, o, c.vscodeVersion, c.date, this.z.commit, !this.y.isBuilt, n, l); + } + async Q(e) { + try { + const i = await this.u.stat(e); + if (typeof i.mtime == "number") { + return i.mtime; + } + } catch {} + } + R() { + return { + vscodeVersion: this.z.vscodeVersion, + version: this.z.version, + date: this.z.date + }; + } + }; + pd = __decorate([__param(4, Cs), __param(5, Zo), __param(6, at), __param(7, V), __param(8, Yi), __param(9, Ve), __param(10, yi), __param(11, Ss)], pd); + Yo = class { + constructor(t, e, i, s, r, n, o, a, c, l, u, d, f, p, w) { + this.location = t; + this.mtime = e; + this.applicationExtensionslocation = i; + this.applicationExtensionslocationMtime = s; + this.profile = r; + this.profileScanOptions = n; + this.type = o; + this.excludeObsolete = a; + this.validate = c; + this.productVersion = l; + this.productDate = u; + this.productCommit = d; + this.devMode = f; + this.language = p; + this.translations = w; + } + static createNlsConfiguration(t) { + return { + language: t.language, + pseudo: t.language === "pseudo", + devMode: t.devMode, + translations: t.translations + }; + } + static equals(t, e) { + return xp(t.location, e.location) && t.mtime === e.mtime && xp(t.applicationExtensionslocation, e.applicationExtensionslocation) && t.applicationExtensionslocationMtime === e.applicationExtensionslocationMtime && t.profile === e.profile && Os(t.profileScanOptions, e.profileScanOptions) && t.type === e.type && t.excludeObsolete === e.excludeObsolete && t.validate === e.validate && t.productVersion === e.productVersion && t.productDate === e.productDate && t.productCommit === e.productCommit && t.devMode === e.devMode && t.language === e.language && om.equals(t.translations, e.translations); + } + }; + Yc = class extends T { + constructor(e, i, s, r, n, o, a) { + super(); + this.g = e; + this.h = i; + this.j = s; + this.m = r; + this.n = o; + this.q = a; + this.f = n.extensionsEnabledWithApiProposalVersion?.map(c => c.toLowerCase()) ?? []; + } + async scanExtensions(e) { + const i = e.profile ? await this.s(e) : await this.r(e); + let s = {}; + if (e.excludeObsolete && e.type === 1) { + try { + const r = (await this.m.readFile(this.g)).value.toString(); + s = JSON.parse(r); + } catch {} + } + if (sp(s)) { + return i; + } else { + return i.filter(r => !s[O6.create(r).toString()]); + } + } + async r(e) { + const i = await this.m.resolve(e.location); + if (!i.children?.length) { + return []; + } + const s = await Promise.all(i.children.map(async r => { + if (!r.isDirectory || e.type === 1 && ks(r.resource).indexOf(".") === 0) { + return null; + } + const n = new Yo(r.resource, e.mtime, e.applicationExtensionslocation, e.applicationExtensionslocationMtime, e.profile, e.profileScanOptions, e.type, e.excludeObsolete, e.validate, e.productVersion, e.productDate, e.productCommit, e.devMode, e.language, e.translations); + return this.scanExtension(n); + })); + return $t(s).sort((r, n) => r.location.path < n.location.path ? -1 : 1); + } + async s(e) { + let i = await this.t(e.location, () => true, e); + if (e.applicationExtensionslocation && !this.j.extUri.isEqual(e.location, e.applicationExtensionslocation)) { + i = i.filter(r => !r.metadata?.isApplicationScoped); + const s = await this.t(e.applicationExtensionslocation, r => !!r.metadata?.isBuiltin || !!r.metadata?.isApplicationScoped, e); + i.push(...s); + } + return i; + } + async t(e, i, s) { + const r = await this.h.scanProfileExtensions(e, s.profileScanOptions); + if (!r.length) { + return []; + } + const n = await Promise.all(r.map(async o => { + if (i(o)) { + const a = new Yo(o.location, s.mtime, s.applicationExtensionslocation, s.applicationExtensionslocationMtime, s.profile, s.profileScanOptions, s.type, s.excludeObsolete, s.validate, s.productVersion, s.productDate, s.productCommit, s.devMode, s.language, s.translations); + return this.scanExtension(a, o.metadata); + } + return null; + })); + return $t(n); + } + async scanOneOrMultipleExtensions(e) { + try { + if (await this.m.exists(he(e.location, "package.json"))) { + const i = await this.scanExtension(e); + if (i) { + return [i]; + } else { + return []; + } + } else { + return await this.scanExtensions(e); + } + } catch (i) { + this.q.error(`Error scanning extensions at ${e.location.path}:`, Vi(i)); + return []; + } + } + async scanExtension(e, i) { + try { + let s = await this.u(e.location); + if (s) { + s.publisher ||= em; + i = i ?? s.__metadata; + if (i && !i?.size && s.__metadata?.size) { + i.size = s.__metadata?.size; + } + delete s.__metadata; + const r = yA(s.publisher, s.name); + const n = i?.id ? { + id: r, + uuid: i.id + } : { + id: r + }; + const o = i?.isSystem ? 0 : e.type; + const a = o === 0 || !!i?.isBuiltin; + s = await this.w(e.location, s, Yo.createNlsConfiguration(e)); + let c = { + type: o, + identifier: n, + manifest: s, + location: e.location, + isBuiltin: a, + targetPlatform: i?.targetPlatform ?? "undefined", + publisherDisplayName: i?.publisherDisplayName, + metadata: i, + isValid: true, + validations: [], + preRelease: !!i?.preRelease + }; + if (e.validate) { + c = this.validate(c, e); + } + if (s.enabledApiProposals && (!this.n.isBuilt || this.f.includes(r.toLowerCase()))) { + s.originalEnabledApiProposals = s.enabledApiProposals; + s.enabledApiProposals = mA([...s.enabledApiProposals]); + } + return c; + } + } catch (s) { + if (e.type !== 0) { + this.q.error(s); + } + } + return null; + } + validate(e, i) { + let s = true; + const r = this.n.isBuilt && this.f.includes(e.identifier.id.toLowerCase()); + const n = lC(i.productVersion, i.productDate, i.location, e.manifest, e.isBuiltin, r); + for (const [o, a] of n) { + if (o === Pe.Error) { + s = false; + this.q.error(this.F(i.location, a)); + } + } + e.isValid = s; + e.validations = n; + return e; + } + async u(e) { + const i = he(e, "package.json"); + let s; + try { + s = (await this.m.readFile(i)).value.toString(); + } catch (n) { + if ($s(n) !== 1) { + this.q.error(this.F(e, v(1859, null, i.path, n.message))); + } + return null; + } + let r; + try { + r = JSON.parse(s); + } catch { + const o = []; + gn(s, o); + for (const a of o) { + this.q.error(this.F(e, v(1860, null, i.path, a.offset, a.length, im(a.error)))); + } + return null; + } + if (Po(r) !== "object") { + this.q.error(this.F(e, v(1861, null, i.path))); + return null; + } else { + return r; + } + } + async w(e, i, s) { + const r = await this.y(e, i, s); + if (r) { + try { + const n = []; + const o = await this.z(r.default, n); + if (n.length > 0) { + n.forEach(c => { + this.q.error(this.F(e, v(1862, null, r.default?.path, im(c.error)))); + }); + return i; + } + if (Po(r) !== "object") { + this.q.error(this.F(e, v(1863, null, r.default?.path))); + return i; + } + const a = r.values || Object.create(null); + return pC(this.q, i, a, o); + } catch {} + } + return i; + } + async y(e, i, s) { + const r = he(e, "package.nls.json"); + const n = (l, u) => { + u.forEach(d => { + this.q.error(this.F(e, v(1864, null, l?.path, im(d.error)))); + }); + }; + const o = l => { + this.q.error(this.F(e, v(1865, null, l?.path))); + }; + const a = `${i.publisher}.${i.name}`; + const c = s.translations[a]; + if (c) { + try { + const l = P.file(c); + const u = (await this.m.readFile(l)).value.toString(); + const d = []; + const f = gn(u, d); + if (d.length > 0) { + n(l, d); + return { + values: undefined, + default: r + }; + } else if (Po(f) !== "object") { + o(l); + return { + values: undefined, + default: r + }; + } else { + return { + values: f.contents ? f.contents.package : undefined, + default: r + }; + } + } catch { + return { + values: undefined, + default: r + }; + } + } else { + if (!(await this.m.exists(r))) { + return; + } + let u; + try { + u = await this.C(e, s); + } catch { + return; + } + if (!u.localized) { + return { + values: undefined, + default: u.original + }; + } + try { + const d = (await this.m.readFile(u.localized)).value.toString(); + const f = []; + const p = gn(d, f); + if (f.length > 0) { + n(u.localized, f); + return { + values: undefined, + default: u.original + }; + } else if (Po(p) !== "object") { + o(u.localized); + return { + values: undefined, + default: u.original + }; + } else { + return { + values: p, + default: u.original + }; + } + } catch { + return { + values: undefined, + default: u.original + }; + } + } + } + async z(e, i) { + if (e) { + try { + const s = (await this.m.readFile(e)).value.toString(); + return gn(s, i); + } catch {} + } + } + C(e, i) { + return new Promise((s, r) => { + const n = o => { + const a = he(e, `package.nls.${o}.json`); + this.m.exists(a).then(c => { + if (c) { + s({ + localized: a, + original: he(e, "package.nls.json") + }); + } + const l = o.lastIndexOf("-"); + if (l === -1) { + s({ + localized: he(e, "package.nls.json"), + original: null + }); + } else { + o = o.substring(0, l); + n(o); + } + }); + }; + if (i.devMode || i.pseudo || !i.language) { + return s({ + localized: he(e, "package.nls.json"), + original: null + }); + } + n(i.language); + }); + } + F(e, i) { + return `[${e.path}]: ${i}`; + } + }; + Yc = __decorate([__param(1, Zo), __param(2, yi), __param(3, at), __param(4, Ve), __param(5, Yi), __param(6, V)], Yc); + Xc = class extends Yc { + constructor(e, i, s, r, n, o, a, c, l) { + super(i, r, n, o, a, c, l); + this.J = e; + this.L = s; + this.H = this.D(new Ys(3000)); + this.I = this.D(new $()); + this.onDidChangeCache = this.I.event; + } + async scanExtensions(e) { + const i = this.P(e); + const s = await this.M(i); + this.G = e; + if (s && s.input && Yo.equals(s.input, this.G)) { + this.q.debug("Using cached extensions scan result", e.type === 0 ? "system" : "user", e.location.toString()); + this.H.trigger(() => this.O()); + return s.result.map(n => { + n.location = P.revive(n.location); + return n; + }); + } + const r = await super.scanExtensions(e); + await this.N(i, { + input: e, + result: r + }); + return r; + } + async M(e) { + try { + const i = await this.m.readFile(e); + const s = JSON.parse(i.value.toString()); + return { + result: s.result, + input: Er(s.input) + }; + } catch (i) { + this.q.debug("Error while reading the extension cache file:", e.path, Vi(i)); + } + return null; + } + async N(e, i) { + try { + await this.m.writeFile(e, z.fromString(JSON.stringify(i))); + } catch (s) { + this.q.debug("Error while writing the extension cache file:", e.path, Vi(s)); + } + } + async O() { + if (!this.G) { + return; + } + const e = this.P(this.G); + const i = await this.M(e); + if (!i) { + return; + } + const s = i.result; + const r = JSON.parse(JSON.stringify(await super.scanExtensions(this.G))); + if (!Os(r, s)) { + try { + this.q.info("Invalidating Cache", s, r); + await this.m.del(e); + this.I.fire(); + } catch (n) { + this.q.error(n); + } + } + } + P(e) { + const i = this.Q(e); + return this.j.extUri.joinPath(i.cacheHome, e.type === 0 ? I6 : $6); + } + Q(e) { + if (e.type === 0) { + return this.L.defaultProfile; + } else if (e.profile) { + if (this.j.extUri.isEqual(e.location, this.J.extensionsResource)) { + return this.J; + } else { + return this.L.profiles.find(i => this.j.extUri.isEqual(e.location, i.extensionsResource)) ?? this.J; + } + } else { + return this.L.defaultProfile; + } + } + }; + Xc = __decorate([__param(2, Cs), __param(3, Zo), __param(4, yi), __param(5, at), __param(6, Ve), __param(7, Yi), __param(8, V)], Xc); + V6 = class extends pd { + constructor(t, e, i, s, r, n, o, a, c, l, u, d) { + super(t, e, he(i, ".cursor-dev", "extensions", "control.json"), s, r, n, o, a, c, l, u, d); + this.S = (async () => { + if (Kf) { + try { + const f = await this.u.readFile(P.file(Kf)); + return JSON.parse(f.value.toString()); + } catch {} + } + return Object.create(null); + })(); + } + f(t) { + return this.S; + } + }; + } + }); + var gd; + var wC = g({ + "out-build/vs/platform/extensionManagement/node/extensionsScannerService.js"() { + "use strict"; + + se(); + Ri(); + fd(); + G6(); + He(); + Y(); + X(); + ht(); + As(); + _s(); + gd = class extends V6 { + constructor(e, i, s, r, n, o, a, c) { + super(P.file(n.builtinExtensionsPath), P.file(n.extensionsPath), n.userHome, e.defaultProfile, e, i, s, r, n, o, a, c); + } + }; + gd = __decorate([__param(0, Cs), __param(1, Zo), __param(2, at), __param(3, V), __param(4, tr), __param(5, Ve), __param(6, yi), __param(7, Ss)], gd); + } + }); + var md; + var vC = g({ + "out-build/vs/platform/userDataProfile/electron-main/userDataProfilesHandler.js"() { + "use strict"; + + M(); + ct(); + un(); + ri(); + ce(); + Lt(); + md = class extends T { + constructor(e, i, s) { + super(); + this.a = i; + this.b = s; + this.D(e.onWillLoadWindow(r => { + if (r.reason === 2) { + this.c(r.window); + } + })); + this.D(e.onBeforeCloseWindow(r => this.c(r))); + this.D(new os(() => this.g(), 30000)).schedule(); + } + async c(e) { + const i = this.f(e); + const s = this.a.getProfileForWorkspace(i); + if (s?.isTransient) { + this.a.unsetWorkspace(i, s.isTransient); + if (s.isTransient) { + await this.a.cleanUpTransientProfiles(); + } + } + } + f(e) { + return e.openedWorkspace ?? ju(e.backupPath, e.isExtensionDevelopmentHost); + } + g() { + const e = this.a.getAssociatedEmptyWindows(); + if (e.length === 0) { + return; + } + const i = this.b.getWindows().map(s => this.f(s)); + for (const s of e) { + if (!i.some(r => r.id === s.id)) { + this.a.unsetWorkspace(s, false); + } + } + } + }; + md = __decorate([__param(0, Te), __param(1, Rs), __param(2, dt)], md); + } + }); + var J6; + var bC = g({ + "out-build/vs/platform/userDataProfile/electron-main/userDataProfileStorageIpc.js"() { + "use strict"; + + B(); + M(); + v1(); + J6 = class extends T { + constructor(t, e, i) { + super(); + this.b = t; + this.c = e; + this.f = i; + const s = this.D(new pr()); + this.a = this.D(new $({ + onWillAddFirstListener: () => s.value = this.g(), + onDidRemoveLastListener: () => s.value = undefined + })); + } + g() { + this.f.debug("ProfileStorageChangesListenerChannel#registerStorageChangeListeners"); + const t = new De(); + t.add(x.debounce(this.b.applicationStorage.onDidChangeStorage, (e, i) => { + if (e) { + e.push(i.key); + } else { + e = [i.key]; + } + return e; + }, 100)(e => this.h(e))); + t.add(x.debounce(this.b.onDidChangeProfileStorage, (e, i) => { + e ||= new Map(); + let s = e.get(i.profile.id); + if (!s) { + e.set(i.profile.id, s = { + profile: i.profile, + keys: [], + storage: i.storage + }); + } + s.keys.push(i.key); + return e; + }, 100)(e => this.j(e))); + return t; + } + h(t) { + const e = t.includes(sr) ? [this.c.defaultProfile] : []; + const i = []; + t = t.filter(s => s !== sr); + if (t.length) { + const s = m1(this.b.applicationStorage.storage); + i.push({ + profile: this.c.defaultProfile, + changes: t.map(r => ({ + key: r, + scope: 0, + target: s[r] + })) + }); + } + this.m(e, i); + } + j(t) { + const e = []; + const i = new Map(); + for (const [s, r] of t.entries()) { + if (r.keys.includes(sr)) { + e.push(r.profile); + } + const n = r.keys.filter(o => o !== sr); + if (n.length) { + const o = m1(r.storage.storage); + i.set(s, { + profile: r.profile, + changes: n.map(a => ({ + key: a, + scope: 0, + target: o[a] + })) + }); + } + } + this.m(e, [...i.values()]); + } + m(t, e) { + if (t.length || e.length) { + this.a.fire({ + valueChanges: e, + targetChanges: t + }); + } + } + listen(t, e, i) { + switch (e) { + case "onDidChange": + return this.a.event; + } + throw new Error(`[ProfileStorageChangesListenerChannel] Event not found: ${e}`); + } + async call(t, e) { + throw new Error(`Call not found: ${e}`); + } + }; + } + }); + async function yC(t, e) { + let i = t.getItem(E1); + if (typeof i != "string" || N && i === "6c9d2bc8f91b89624add29c0abeae7fb42bf539fa1cdb2e3e57cd668fa9bcead") { + i = await b$(e.error.bind(e)); + } + return i; + } + async function SC(t, e) { + let i = t.getItem(k1); + if (typeof i != "string") { + i = await D2(e.error.bind(e)); + } + return i; + } + async function EC(t, e) { + let i = t.getItem(x1); + if (typeof i != "string") { + i = await E$(e.error.bind(e)); + } + return i; + } + async function K6(t, e) { + let i = t.getItem(zu); + if (typeof i != "string") { + i = await $2(e.error.bind(e)); + } + return i; + } + var kC = g({ + "out-build/vs/platform/telemetry/node/telemetryUtils.js"() { + "use strict"; + + H(); + _c(); + xt(); + } + }); + async function xC(t, e) { + const i = await yC(t, e); + t.setItem(E1, i); + return i; + } + async function DC(t, e) { + const i = await SC(t, e); + t.setItem(k1, i); + return i; + } + async function PC(t, e) { + const i = await EC(t, e); + t.setItem(x1, i); + return i; + } + async function $C(t, e) { + const i = await K6(t, e); + t.setItem(zu, i); + return i; + } + async function IC(t, e) { + const i = await $2(e.error.bind(e)); + const s = await K6(t, e); + if (i !== s) { + t.setItem(zu, i); + } + } + var AC = g({ + "out-build/vs/platform/telemetry/electron-main/telemetryUtils.js"() { + "use strict"; + + xt(); + kC(); + _c(); + } + }); + var wd; + var CC = g({ + "out-build/vs/platform/extensionManagement/node/extensionsProfileScannerService.js"() { + "use strict"; + + X(); + _s(); + As(); + xt(); + fd(); + He(); + Ri(); + se(); + wd = class extends dd { + constructor(e, i, s, r, n, o) { + super(P.file(e.extensionsPath), i, s, r, n, o); + } + }; + wd = __decorate([__param(0, tr), __param(1, at), __param(2, Cs), __param(3, yi), __param(4, Ot), __param(5, V)], wd); + } + }); + var Z6; + var _C = g({ + "out-build/vs/platform/log/electron-main/logIpc.js"() { + "use strict"; + + $i(); + se(); + X(); + Z6 = class { + constructor(t) { + this.b = t; + this.a = new Ht(); + } + listen(t, e, i) { + switch (e) { + case "onDidChangeLoggers": + if (i) { + return this.b.getOnDidChangeLoggersEvent(i); + } else { + return this.b.onDidChangeLoggers; + } + case "onDidChangeLogLevel": + if (i) { + return this.b.getOnDidChangeLogLevelEvent(i); + } else { + return this.b.onDidChangeLogLevel; + } + case "onDidChangeVisibility": + if (i) { + return this.b.getOnDidChangeVisibilityEvent(i); + } else { + return this.b.onDidChangeVisibility; + } + } + throw new Error(`Event not found: ${e}`); + } + async call(t, e, i) { + switch (e) { + case "createLogger": + this.c(P.revive(i[0]), i[1], i[2]); + return; + case "log": + return this.e(P.revive(i[0]), i[1]); + case "consoleLog": + return this.d(i[0], i[1]); + case "setLogLevel": + if (vy(i[0])) { + return this.b.setLogLevel(i[0]); + } else { + return this.b.setLogLevel(P.revive(i[0]), i[1]); + } + case "setVisibility": + return this.b.setVisibility(P.revive(i[0]), i[1]); + case "registerLogger": + return this.b.registerLogger({ + ...i[0], + resource: P.revive(i[0].resource) + }, i[1]); + case "deregisterLogger": + return this.b.deregisterLogger(P.revive(i[0])); + } + throw new Error(`Call not found: ${e}`); + } + c(t, e, i) { + this.a.set(t, this.b.createLogger(t, e, i)); + } + d(t, e) { + let i = console.log; + switch (t) { + case J.Error: + i = console.error; + break; + case J.Warning: + i = console.warn; + break; + case J.Info: + i = console.info; + break; + } + i.call(console, ...e); + } + e(t, e) { + const i = this.a.get(t); + if (!i) { + throw new Error("Create the logger before logging"); + } + for (const [s, r] of e) { + a1(i, s, r); + } + } + }; + } + }); + var am; + var vd; + var bd; + var RC = g({ + "out-build/vs/platform/utilityProcess/electron-main/utilityProcessWorkerMainService.js"() { + "use strict"; + + M(); + Y(); + X(); + Lt(); + _o(); + xt(); + er(); + B(); + ce(); + ct(); + am = q("utilityProcessWorker"); + vd = class extends T { + constructor(e, i, s, r) { + super(); + this.b = e; + this.c = i; + this.f = s; + this.g = r; + this.a = new Map(); + } + async createWorker(e) { + const i = `window: ${e.reply.windowId}, moduleId: ${e.process.moduleId}`; + this.b.trace(`[UtilityProcessWorker]: createWorker(${i})`); + const s = this.h(e); + if (this.a.has(s)) { + this.b.warn(`[UtilityProcessWorker]: createWorker() found an existing worker that will be terminated (${i})`); + this.disposeWorker(e); + } + const r = new bd(this.b, this.c, this.f, this.g, e); + if (!r.spawn()) { + return { + reason: { + code: 1, + signal: "EINVALID" + } + }; + } + this.a.set(s, r); + const n = new Xs(); + x.once(r.onDidTerminate)(o => { + if (o.code === 0) { + this.b.trace(`[UtilityProcessWorker]: terminated normally with code ${o.code}, signal: ${o.signal}`); + } else { + this.b.error(`[UtilityProcessWorker]: terminated unexpectedly with code ${o.code}, signal: ${o.signal}`); + } + this.a.delete(s); + n.complete({ + reason: o + }); + }); + return n.p; + } + h(e) { + return Ds({ + moduleId: e.process.moduleId, + windowId: e.reply.windowId + }); + } + async disposeWorker(e) { + const i = this.h(e); + const s = this.a.get(i); + if (s) { + this.b.trace(`[UtilityProcessWorker]: disposeWorker(window: ${e.reply.windowId}, moduleId: ${e.process.moduleId})`); + s.kill(); + s.dispose(); + this.a.delete(i); + } + } + }; + vd = __decorate([__param(0, V), __param(1, dt), __param(2, Ot), __param(3, Te)], vd); + bd = class extends T { + constructor(e, i, s, r, n) { + super(); + this.c = e; + this.f = i; + this.g = s; + this.h = r; + this.j = n; + this.a = this.D(new $()); + this.onDidTerminate = this.a.event; + this.b = this.D(new Ec(this.c, this.f, this.g, this.h)); + this.m(); + } + m() { + this.D(this.b.onExit(e => this.a.fire({ + code: e.code, + signal: e.signal + }))); + this.D(this.b.onCrash(e => this.a.fire({ + code: e.code, + signal: "ECRASH" + }))); + } + spawn() { + const i = this.f.getWindowById(this.j.reply.windowId)?.win?.webContents.getOSProcessId(); + return this.b.start({ + processTitle: `${this.j.process.type} [${this.j.reply.windowId}]`, + type: this.j.process.type, + entryPoint: this.j.process.moduleId, + parentLifecycleBound: i, + windowLifecycleBound: true, + correlationId: `${this.j.reply.windowId}`, + responseWindowId: this.j.reply.windowId, + responseChannel: this.j.reply.channel, + responseNonce: this.j.reply.nonce + }); + } + kill() { + this.b.kill(); + } + }; + bd = __decorate([__param(0, V), __param(1, dt), __param(2, Ot), __param(3, Te)], bd); + } + }); + var Y6; + var OC = g({ + "out-build/vs/platform/utilityProcess/common/utilityProcessWorkerService.js"() { + "use strict"; + + Y6 = "utilityProcessWorker"; + } + }); + var LC; + var X6; + var Q6; + var e7; + var t7; + var i7; + var s7; + var Xo; + var r7; + var MC; + var Ei; + var n7; + var o7; + var a7; + var c7; + var l7; + var u7; + var h7; + var d7; + var f7; + var cm; + var FC; + var p7 = g({ + "out-build/vs/platform/terminal/common/terminal.js"() { + "use strict"; + + Y(); + wy(); + Zs(); + LC = new o1("terminalTabFocusMode", false, true); + (function (t) { + t.AutomationProfile = "terminal.integrated.automationProfile."; + t.DefaultProfile = "terminal.integrated.defaultProfile."; + t.Profiles = "terminal.integrated.profiles."; + })(X6 ||= {}); + (function (t) { + t.SendKeybindingsToShell = "terminal.integrated.sendKeybindingsToShell"; + t.AutomationProfileLinux = "terminal.integrated.automationProfile.linux"; + t.AutomationProfileMacOs = "terminal.integrated.automationProfile.osx"; + t.AutomationProfileWindows = "terminal.integrated.automationProfile.windows"; + t.ProfilesWindows = "terminal.integrated.profiles.windows"; + t.ProfilesMacOs = "terminal.integrated.profiles.osx"; + t.ProfilesLinux = "terminal.integrated.profiles.linux"; + t.DefaultProfileLinux = "terminal.integrated.defaultProfile.linux"; + t.DefaultProfileMacOs = "terminal.integrated.defaultProfile.osx"; + t.DefaultProfileWindows = "terminal.integrated.defaultProfile.windows"; + t.UseWslProfiles = "terminal.integrated.useWslProfiles"; + t.TabsDefaultColor = "terminal.integrated.tabs.defaultColor"; + t.TabsDefaultIcon = "terminal.integrated.tabs.defaultIcon"; + t.TabsEnabled = "terminal.integrated.tabs.enabled"; + t.TabsEnableAnimation = "terminal.integrated.tabs.enableAnimation"; + t.TabsHideCondition = "terminal.integrated.tabs.hideCondition"; + t.TabsShowActiveTerminal = "terminal.integrated.tabs.showActiveTerminal"; + t.TabsShowActions = "terminal.integrated.tabs.showActions"; + t.TabsLocation = "terminal.integrated.tabs.location"; + t.TabsFocusMode = "terminal.integrated.tabs.focusMode"; + t.MacOptionIsMeta = "terminal.integrated.macOptionIsMeta"; + t.MacOptionClickForcesSelection = "terminal.integrated.macOptionClickForcesSelection"; + t.AltClickMovesCursor = "terminal.integrated.altClickMovesCursor"; + t.CopyOnSelection = "terminal.integrated.copyOnSelection"; + t.EnableMultiLinePasteWarning = "terminal.integrated.enableMultiLinePasteWarning"; + t.DrawBoldTextInBrightColors = "terminal.integrated.drawBoldTextInBrightColors"; + t.FontFamily = "terminal.integrated.fontFamily"; + t.FontSize = "terminal.integrated.fontSize"; + t.LetterSpacing = "terminal.integrated.letterSpacing"; + t.LineHeight = "terminal.integrated.lineHeight"; + t.MinimumContrastRatio = "terminal.integrated.minimumContrastRatio"; + t.TabStopWidth = "terminal.integrated.tabStopWidth"; + t.FastScrollSensitivity = "terminal.integrated.fastScrollSensitivity"; + t.MouseWheelScrollSensitivity = "terminal.integrated.mouseWheelScrollSensitivity"; + t.BellDuration = "terminal.integrated.bellDuration"; + t.FontWeight = "terminal.integrated.fontWeight"; + t.FontWeightBold = "terminal.integrated.fontWeightBold"; + t.CursorBlinking = "terminal.integrated.cursorBlinking"; + t.CursorStyle = "terminal.integrated.cursorStyle"; + t.CursorStyleInactive = "terminal.integrated.cursorStyleInactive"; + t.CursorWidth = "terminal.integrated.cursorWidth"; + t.Scrollback = "terminal.integrated.scrollback"; + t.DetectLocale = "terminal.integrated.detectLocale"; + t.DefaultLocation = "terminal.integrated.defaultLocation"; + t.GpuAcceleration = "terminal.integrated.gpuAcceleration"; + t.TerminalTitleSeparator = "terminal.integrated.tabs.separator"; + t.TerminalTitle = "terminal.integrated.tabs.title"; + t.TerminalDescription = "terminal.integrated.tabs.description"; + t.RightClickBehavior = "terminal.integrated.rightClickBehavior"; + t.MiddleClickBehavior = "terminal.integrated.middleClickBehavior"; + t.Cwd = "terminal.integrated.cwd"; + t.ConfirmOnExit = "terminal.integrated.confirmOnExit"; + t.ConfirmOnKill = "terminal.integrated.confirmOnKill"; + t.EnableBell = "terminal.integrated.enableBell"; + t.EnableVisualBell = "terminal.integrated.enableVisualBell"; + t.CommandsToSkipShell = "terminal.integrated.commandsToSkipShell"; + t.AllowChords = "terminal.integrated.allowChords"; + t.AllowMnemonics = "terminal.integrated.allowMnemonics"; + t.TabFocusMode = "terminal.integrated.tabFocusMode"; + t.EnvMacOs = "terminal.integrated.env.osx"; + t.EnvLinux = "terminal.integrated.env.linux"; + t.EnvWindows = "terminal.integrated.env.windows"; + t.EnvironmentChangesIndicator = "terminal.integrated.environmentChangesIndicator"; + t.EnvironmentChangesRelaunch = "terminal.integrated.environmentChangesRelaunch"; + t.ExperimentalWindowsUseConptyDll = "terminal.integrated.experimental.windowsUseConptyDll"; + t.ShowExitAlert = "terminal.integrated.showExitAlert"; + t.SplitCwd = "terminal.integrated.splitCwd"; + t.WindowsEnableConpty = "terminal.integrated.windowsEnableConpty"; + t.WordSeparators = "terminal.integrated.wordSeparators"; + t.EnableFileLinks = "terminal.integrated.enableFileLinks"; + t.AllowedLinkSchemes = "terminal.integrated.allowedLinkSchemes"; + t.UnicodeVersion = "terminal.integrated.unicodeVersion"; + t.EnablePersistentSessions = "terminal.integrated.enablePersistentSessions"; + t.PersistentSessionReviveProcess = "terminal.integrated.persistentSessionReviveProcess"; + t.HideOnStartup = "terminal.integrated.hideOnStartup"; + t.CustomGlyphs = "terminal.integrated.customGlyphs"; + t.RescaleOverlappingGlyphs = "terminal.integrated.rescaleOverlappingGlyphs"; + t.PersistentSessionScrollback = "terminal.integrated.persistentSessionScrollback"; + t.InheritEnv = "terminal.integrated.inheritEnv"; + t.ShowLinkHover = "terminal.integrated.showLinkHover"; + t.IgnoreProcessNames = "terminal.integrated.ignoreProcessNames"; + t.ShellIntegrationEnabled = "terminal.integrated.shellIntegration.enabled"; + t.ShellIntegrationShowWelcome = "terminal.integrated.shellIntegration.showWelcome"; + t.ShellIntegrationDecorationsEnabled = "terminal.integrated.shellIntegration.decorationsEnabled"; + t.EnableImages = "terminal.integrated.enableImages"; + t.SmoothScrolling = "terminal.integrated.smoothScrolling"; + t.IgnoreBracketedPasteMode = "terminal.integrated.ignoreBracketedPasteMode"; + t.FocusAfterRun = "terminal.integrated.focusAfterRun"; + t.FontLigatures = "terminal.integrated.fontLigatures"; + t.DeveloperPtyHostLatency = "terminal.integrated.developer.ptyHost.latency"; + t.DeveloperPtyHostStartupDelay = "terminal.integrated.developer.ptyHost.startupDelay"; + t.DevMode = "terminal.integrated.developer.devMode"; + })(Q6 ||= {}); + (function (t) { + t.Bash = "bash"; + t.Fish = "fish"; + t.Sh = "sh"; + t.Csh = "csh"; + t.Ksh = "ksh"; + t.Zsh = "zsh"; + })(e7 ||= {}); + (function (t) { + t.CommandPrompt = "cmd"; + t.Wsl = "wsl"; + t.GitBash = "gitbash"; + })(t7 ||= {}); + (function (t) { + t.PowerShell = "pwsh"; + t.Python = "python"; + t.Julia = "julia"; + t.NuShell = "nu"; + })(i7 ||= {}); + (function (t) { + t[t.Api = 0] = "Api"; + t[t.Process = 1] = "Process"; + t[t.Sequence = 2] = "Sequence"; + t[t.Config = 3] = "Config"; + })(s7 ||= {}); + (function (t) { + t.LocalPty = "localPty"; + t.PtyHost = "ptyHost"; + t.PtyHostWindow = "ptyHostWindow"; + t.Logger = "logger"; + t.Heartbeat = "heartbeat"; + })(Xo ||= {}); + (function (t) { + t.Cwd = "cwd"; + t.InitialCwd = "initialCwd"; + t.FixedDimensions = "fixedDimensions"; + t.Title = "title"; + t.ShellType = "shellType"; + t.HasChildProcesses = "hasChildProcesses"; + t.ResolvedShellLaunchConfig = "resolvedShellLaunchConfig"; + t.OverrideDimensions = "overrideDimensions"; + t.FailedShellIntegrationActivation = "failedShellIntegrationActivation"; + t.UsedShellIntegrationInjection = "usedShellIntegrationInjection"; + })(r7 ||= {}); + MC = q("ptyService"); + (function (t) { + t[t.BeatInterval = 5000] = "BeatInterval"; + t[t.ConnectingBeatInterval = 20000] = "ConnectingBeatInterval"; + t[t.FirstWaitMultiplier = 1.2] = "FirstWaitMultiplier"; + t[t.SecondWaitMultiplier = 1] = "SecondWaitMultiplier"; + t[t.CreateProcessTimeout = 5000] = "CreateProcessTimeout"; + })(Ei ||= {}); + (function (t) { + t[t.Panel = 1] = "Panel"; + t[t.Editor = 2] = "Editor"; + })(n7 ||= {}); + (function (t) { + t.TerminalView = "view"; + t.Editor = "editor"; + })(o7 ||= {}); + (function (t) { + t[t.GraceTime = 60000] = "GraceTime"; + t[t.ShortGraceTime = 6000] = "ShortGraceTime"; + })(a7 ||= {}); + (function (t) { + t[t.HighWatermarkChars = 100000] = "HighWatermarkChars"; + t[t.LowWatermarkChars = 5000] = "LowWatermarkChars"; + t[t.CharCountAckSize = 5000] = "CharCountAckSize"; + })(c7 ||= {}); + (function (t) { + t.GitBash = "Git Bash"; + t.Pwsh = "PowerShell"; + })(l7 ||= {}); + (function (t) { + t[t.Off = 0] = "Off"; + t[t.FinalTerm = 1] = "FinalTerm"; + t[t.VSCode = 2] = "VSCode"; + })(u7 ||= {}); + (function (t) { + t[t.Unknown = 0] = "Unknown"; + t[t.Shutdown = 1] = "Shutdown"; + t[t.Process = 2] = "Process"; + t[t.User = 3] = "User"; + t[t.Extension = 4] = "Extension"; + })(h7 ||= {}); + d7 = { + Backend: "workbench.contributions.terminal.processBackend" + }; + f7 = class { + constructor() { + this.a = new Map(); + } + get backends() { + return this.a; + } + registerTerminalBackend(t) { + const e = this.b(t.remoteAuthority); + if (this.a.has(e)) { + throw new Error(`A terminal backend with remote authority '${e}' was already registered.`); + } + this.a.set(e, t); + } + getTerminalBackend(t) { + return this.a.get(this.b(t)); + } + b(t) { + return t?.toLowerCase() ?? ""; + } + }; + Gt.add(d7.Backend, new f7()); + cm = q("localPtyService"); + FC = q("terminalLogService"); + } + }); + var yd; + var NC = g({ + "out-build/vs/platform/terminal/electron-main/electronPtyHostStarter.js"() { + "use strict"; + + vt(); + Qp(); + ct(); + X(); + $n(); + _o(); + zb(); + as(); + M(); + B(); + us(); + Ke(); + Ie(); + yd = class extends T { + constructor(e, i, s, r, n) { + super(); + this.f = e; + this.g = i; + this.h = s; + this.j = r; + this.m = n; + this.a = undefined; + this.b = new $(); + this.onRequestConnection = this.b.event; + this.c = new $(); + this.onWillShutdown = this.c.event; + this.D(this.j.onWillShutdown(() => this.c.fire())); + it.on("vscode:createPtyHostMessageChannel", (o, a) => this.q(o, a)); + this.D(xe(() => { + it.removeHandler("vscode:createPtyHostMessageChannel"); + })); + } + start() { + this.a = new _r(this.m, Hc, this.j); + const e = Ex(this.h.args, this.h.isBuilt); + const i = e.port ? ["--nolazy", `--inspect${e.break ? "-brk" : ""}=${e.port}`] : undefined; + this.a.start({ + processTitle: "terminal pty-host", + type: "ptyHost", + entryPoint: "vs/platform/terminal/node/ptyHostMain", + execArgv: i, + args: ["--logsPath", this.h.logsHome.with({ + scheme: R.file + }).fsPath], + env: this.n() + }); + const s = this.a.connect(); + const r = new Jp(s, "ptyHost"); + const n = new De(); + n.add(r); + n.add(xe(() => { + this.a?.kill(); + this.a?.dispose(); + this.a = undefined; + })); + return { + client: r, + store: n, + onDidProcessExit: this.a.onExit + }; + } + n() { + this.h.unsetSnapExportedVariables(); + const e = { + ...ls(process.env), + VSCODE_ESM_ENTRYPOINT: "vs/platform/terminal/node/ptyHostMain", + VSCODE_PIPE_LOGGING: "true", + VSCODE_VERBOSE_LOGGING: "true", + VSCODE_RECONNECT_GRACE_TIME: String(this.f.graceTime), + VSCODE_RECONNECT_SHORT_GRACE_TIME: String(this.f.shortGraceTime), + VSCODE_RECONNECT_SCROLLBACK: String(this.f.scrollback) + }; + const i = this.g.getValue("terminal.integrated.developer.ptyHost.latency"); + if (i && typeof i == "number") { + e.VSCODE_LATENCY = String(i); + } + const s = this.g.getValue("terminal.integrated.developer.ptyHost.startupDelay"); + if (s && typeof s == "number") { + e.VSCODE_STARTUP_DELAY = String(s); + } + this.h.restoreSnapExportedVariables(); + return e; + } + q(e, i) { + this.b.fire(); + const s = this.a.connect(); + if (e.sender.isDestroyed()) { + s.close(); + return; + } + e.sender.postMessage("vscode:createPtyHostMessageChannelResult", i, [s]); + } + }; + yd = __decorate([__param(1, Je), __param(2, ot), __param(3, Te), __param(4, V)], yd); + } + }); + var g7; + var WC = g({ + "out-build/vs/platform/log/common/logIpc.js"() { + "use strict"; + + se(); + B(); + X(); + M(); + g7 = class extends T { + constructor(t, e) { + super(); + e.call("setLogLevel", [t.getLogLevel()]); + this.D(t.onDidChangeLogLevel(i => e.call("setLogLevel", [i]))); + e.call("getRegisteredLoggers").then(i => { + for (const s of i) { + t.registerLogger({ + ...s, + resource: P.revive(s.resource) + }); + } + }); + this.D(e.listen("onDidChangeVisibility")(([i, s]) => t.setVisibility(P.revive(i), s))); + this.D(e.listen("onDidChangeLoggers")(({ + added: i, + removed: s + }) => { + for (const r of i) { + t.registerLogger({ + ...r, + resource: P.revive(r.resource) + }); + } + for (const r of s) { + t.deregisterLogger(r.resource); + } + })); + } + }; + } + }); + var Sd; + var TC = g({ + "out-build/vs/platform/terminal/common/requestStore.js"() { + "use strict"; + + ce(); + At(); + B(); + M(); + X(); + Sd = class extends T { + constructor(e, i) { + super(); + this.h = i; + this.a = 0; + this.c = new Map(); + this.f = new Map(); + this.g = this.D(new $()); + this.onCreateRequest = this.g.event; + this.b = e === undefined ? 15000 : e; + this.D(xe(() => { + for (const s of this.f.values()) { + Et(s); + } + })); + } + createRequest(e) { + return new Promise((i, s) => { + const r = ++this.a; + this.c.set(r, i); + this.g.fire({ + requestId: r, + ...e + }); + const n = new ns(); + wi(this.b, n.token).then(() => s(`Request ${r} timed out (${this.b}ms)`)); + this.f.set(r, [xe(() => n.cancel())]); + }); + } + acceptReply(e, i) { + const s = this.c.get(e); + if (s) { + this.c.delete(e); + Et(this.f.get(e) || []); + this.f.delete(e); + s(i); + } else { + this.h.warn(`RequestStore#acceptReply was called without receiving a matching request ${e}`); + } + } + }; + Sd = __decorate([__param(1, V)], Sd); + } + }); + function jC(t, e) { + const i = [{ + name: null, + description: v(2153, null) + }]; + i.push(...t.map(s => ({ + name: s.profileName, + description: UC(s) + }))); + if (e) { + i.push(...e.map(s => ({ + name: s.title, + description: BC(s) + }))); + } + return { + values: i.map(s => s.name), + markdownDescriptions: i.map(s => s.description) + }; + } + function UC(t) { + let e = `$(${Gc.isThemeIcon(t.icon) ? t.icon.id : t.icon ? t.icon : Si.terminal.id}) ${t.profileName} + - path: ${t.path}`; + if (t.args) { + if (typeof t.args == "string") { + e += ` + - args: "${t.args}"`; + } else { + e += ` + - args: [${t.args.length === 0 ? "" : `'${t.args.join("','")}'`}]`; + } + } + if (t.overrideName !== undefined) { + e += ` + - overrideName: ${t.overrideName}`; + } + if (t.color) { + e += ` + - color: ${t.color}`; + } + if (t.env) { + e += ` + - env: ${JSON.stringify(t.env)}`; + } + return e; + } + function BC(t) { + return `$(${Gc.isThemeIcon(t.icon) ? t.icon.id : t.icon ? t.icon : Si.terminal.id}) ${t.title} + - extensionIdentifier: ${t.extensionIdentifier}`; + } + var qC = g({ + "out-build/vs/platform/terminal/common/terminalProfiles.js"() { + "use strict"; + + nd(); + se(); + be(); + S6(); + } + }); + function lm(t) { + const e = t === 2 ? "linux" : t === 1 ? "osx" : "windows"; + return v(2129, null, J0(t), "```json\n\"terminal.integrated.profile." + e + "\": {\n \"bash\": null\n}\n```", "[", "](https://code.visualstudio.com/docs/terminal/profiles)"); + } + function zC() { + Gt.as(Ai.Configuration).registerConfiguration(v7); + HC(); + } + function HC(t, e) { + const i = Gt.as(Ai.Configuration); + let s; + if (t) { + s = jC(t?.profiles, e); + } + const r = um; + um = { + id: "terminal", + order: 100, + title: v(2149, null), + type: "object", + properties: { + "terminal.integrated.defaultProfile.linux": { + restricted: true, + markdownDescription: v(2150, null), + type: ["string", "null"], + default: null, + enum: t?.os === 3 ? s?.values : undefined, + markdownEnumDescriptions: t?.os === 3 ? s?.markdownDescriptions : undefined + }, + "terminal.integrated.defaultProfile.osx": { + restricted: true, + markdownDescription: v(2151, null), + type: ["string", "null"], + default: null, + enum: t?.os === 2 ? s?.values : undefined, + markdownEnumDescriptions: t?.os === 2 ? s?.markdownDescriptions : undefined + }, + "terminal.integrated.defaultProfile.windows": { + restricted: true, + markdownDescription: v(2152, null), + type: ["string", "null"], + default: null, + enum: t?.os === 1 ? s?.values : undefined, + markdownEnumDescriptions: t?.os === 1 ? s?.markdownDescriptions : undefined + } + } + }; + i.updateConfigurations({ + add: [um], + remove: r ? [r] : [] + }); + } + var m7; + var w7; + var An; + var Ed; + var kd; + var v7; + var um; + var VC = g({ + "out-build/vs/platform/terminal/common/terminalPlatformConfiguration.js"() { + "use strict"; + + nd(); + H(); + be(); + Xr(); + Zs(); + qC(); + m7 = { + type: ["string", "null"], + enum: ["terminal.ansiBlack", "terminal.ansiRed", "terminal.ansiGreen", "terminal.ansiYellow", "terminal.ansiBlue", "terminal.ansiMagenta", "terminal.ansiCyan", "terminal.ansiWhite"], + default: null + }; + w7 = { + type: "string", + enum: Array.from(b6(), t => t.id), + markdownEnumDescriptions: Array.from(b6(), t => `$(${t.id})`) + }; + An = { + args: { + description: v(2122, null), + type: "array", + items: { + type: "string" + } + }, + overrideName: { + description: v(2123, null), + type: "boolean" + }, + icon: { + description: v(2124, null), + ...w7 + }, + color: { + description: v(2125, null), + ...m7 + }, + env: { + markdownDescription: v(2126, null), + type: "object", + additionalProperties: { + type: ["string", "null"] + }, + default: {} + } + }; + Ed = { + type: "object", + required: ["path"], + properties: { + path: { + description: v(2127, null), + type: ["string", "array"], + items: { + type: "string" + } + }, + ...An + } + }; + kd = { + type: "object", + required: ["path"], + properties: { + path: { + description: v(2128, null), + type: ["string"], + items: { + type: "string" + } + }, + ...An + } + }; + v7 = { + id: "terminal", + order: 100, + title: v(2130, null), + type: "object", + properties: { + "terminal.integrated.automationProfile.linux": { + restricted: true, + markdownDescription: v(2131, null), + type: ["object", "null"], + default: null, + anyOf: [{ + type: "null" + }, kd], + defaultSnippets: [{ + body: { + path: "${1}", + icon: "${2}" + } + }] + }, + "terminal.integrated.automationProfile.osx": { + restricted: true, + markdownDescription: v(2132, null), + type: ["object", "null"], + default: null, + anyOf: [{ + type: "null" + }, kd], + defaultSnippets: [{ + body: { + path: "${1}", + icon: "${2}" + } + }] + }, + "terminal.integrated.automationProfile.windows": { + restricted: true, + markdownDescription: v(2133, null, "`terminal.integrated.automationShell.windows`"), + type: ["object", "null"], + default: null, + anyOf: [{ + type: "null" + }, kd], + defaultSnippets: [{ + body: { + path: "${1}", + icon: "${2}" + } + }] + }, + "terminal.integrated.profiles.windows": { + restricted: true, + markdownDescription: lm(3), + type: "object", + default: { + PowerShell: { + source: "PowerShell", + icon: "terminal-powershell" + }, + "Command Prompt": { + path: ["${env:windir}\\Sysnative\\cmd.exe", "${env:windir}\\System32\\cmd.exe"], + args: [], + icon: "terminal-cmd" + }, + "Git Bash": { + source: "Git Bash" + } + }, + additionalProperties: { + anyOf: [{ + type: "object", + required: ["source"], + properties: { + source: { + description: v(2134, null), + enum: ["PowerShell", "Git Bash"] + }, + ...An + } + }, { + type: "object", + required: ["extensionIdentifier", "id", "title"], + properties: { + extensionIdentifier: { + description: v(2135, null), + type: "string" + }, + id: { + description: v(2136, null), + type: "string" + }, + title: { + description: v(2137, null), + type: "string" + }, + ...An + } + }, { + type: "null" + }, Ed] + } + }, + "terminal.integrated.profiles.osx": { + restricted: true, + markdownDescription: lm(1), + type: "object", + default: { + bash: { + path: "bash", + args: ["-l"], + icon: "terminal-bash" + }, + zsh: { + path: "zsh", + args: ["-l"] + }, + fish: { + path: "fish", + args: ["-l"] + }, + tmux: { + path: "tmux", + icon: "terminal-tmux" + }, + pwsh: { + path: "pwsh", + icon: "terminal-powershell" + } + }, + additionalProperties: { + anyOf: [{ + type: "object", + required: ["extensionIdentifier", "id", "title"], + properties: { + extensionIdentifier: { + description: v(2138, null), + type: "string" + }, + id: { + description: v(2139, null), + type: "string" + }, + title: { + description: v(2140, null), + type: "string" + }, + ...An + } + }, { + type: "null" + }, Ed] + } + }, + "terminal.integrated.profiles.linux": { + restricted: true, + markdownDescription: lm(2), + type: "object", + default: { + bash: { + path: "bash", + icon: "terminal-bash" + }, + zsh: { + path: "zsh" + }, + fish: { + path: "fish" + }, + tmux: { + path: "tmux", + icon: "terminal-tmux" + }, + pwsh: { + path: "pwsh", + icon: "terminal-powershell" + } + }, + additionalProperties: { + anyOf: [{ + type: "object", + required: ["extensionIdentifier", "id", "title"], + properties: { + extensionIdentifier: { + description: v(2141, null), + type: "string" + }, + id: { + description: v(2142, null), + type: "string" + }, + title: { + description: v(2143, null), + type: "string" + }, + ...An + } + }, { + type: "null" + }, Ed] + } + }, + "terminal.integrated.useWslProfiles": { + description: v(2144, null), + type: "boolean", + default: true + }, + "terminal.integrated.inheritEnv": { + scope: 1, + description: v(2145, null), + type: "boolean", + default: true + }, + "terminal.integrated.persistentSessionScrollback": { + scope: 1, + markdownDescription: v(2146, null), + type: "number", + default: 100 + }, + "terminal.integrated.showLinkHover": { + scope: 1, + description: v(2147, null), + type: "boolean", + default: true + }, + "terminal.integrated.ignoreProcessNames": { + markdownDescription: v(2148, null, "`#terminal.integrated.confirmOnKill#`"), + type: "array", + items: { + type: "string", + uniqueItems: true + }, + default: ["starship", "oh-my-posh", "bash", "zsh"] + } + } + }; + } + }); + var Qc; + var b7 = g({ + "out-build/vs/platform/terminal/common/environmentVariable.js"() { + "use strict"; + + (function (t) { + t[t.Replace = 1] = "Replace"; + t[t.Append = 2] = "Append"; + t[t.Prepend = 3] = "Prepend"; + })(Qc ||= {}); + } + }); + var GC = g({ + "out-build/vs/platform/terminal/common/environmentVariableShared.js"() { + "use strict"; + } + }); + var JC; + var KC = g({ + "out-build/vs/platform/terminal/common/environmentVariableCollection.js"() { + "use strict"; + + H(); + b7(); + JC = new Map([[Qc.Append, "APPEND"], [Qc.Prepend, "PREPEND"], [Qc.Replace, "REPLACE"]]); + } + }); + import * as ZC from "os"; + function YC() { + const t = /(\d+)\.(\d+)\.(\d+)/g.exec(ZC.release()); + let e = 0; + if (t && t.length === 4) { + e = parseInt(t[3]); + } + return e; + } + async function y7(t, e, i, s = Ii, r = ee.exists) { + if (Zr(t)) { + if (await r(t)) { + return t; + } else { + return undefined; + } + } + if (e === undefined) { + e = bs(); + } + if (Xe(t) !== ".") { + const c = F(e, t); + if (await r(c)) { + return c; + } else { + return undefined; + } + } + const o = DD(s, "PATH"); + if (i === undefined && wt(o)) { + i = o.split(Zl); + } + if (i === undefined || i.length === 0) { + const c = F(e, t); + if (await r(c)) { + return c; + } else { + return undefined; + } + } + for (const c of i) { + let l; + if (Zr(c)) { + l = F(c, t); + } else { + l = F(e, c, t); + } + if (await r(l)) { + return l; + } + if (j) { + let u = l + ".com"; + if ((await r(u)) || (u = l + ".exe", await r(u))) { + return u; + } + } + } + const a = F(e, t); + if (await r(a)) { + return a; + } else { + return undefined; + } + } + var ds; + var Fs; + var XC = g({ + "out-build/vs/platform/terminal/node/terminalEnvironment.js"() { + "use strict"; + + Ie(); + us(); + we(); + H(); + ys(); + Wt(); + _e(); + _t(); + b7(); + GC(); + KC(); + (function (t) { + t.WindowsPwsh = "windows-pwsh"; + t.WindowsPwshLogin = "windows-pwsh-login"; + t.Pwsh = "pwsh"; + t.PwshLogin = "pwsh-login"; + t.Zsh = "zsh"; + t.ZshLogin = "zsh-login"; + t.Bash = "bash"; + t.Fish = "fish"; + t.FishLogin = "fish-login"; + })(ds ||= {}); + Fs = new Map(); + Fs.set(ds.WindowsPwsh, ["-noexit", "-command", "try { . \"{0}\\out\\vs\\workbench\\contrib\\terminal\\common\\scripts\\shellIntegration.ps1\" } catch {}{1}"]); + Fs.set(ds.WindowsPwshLogin, ["-l", "-noexit", "-command", "try { . \"{0}\\out\\vs\\workbench\\contrib\\terminal\\common\\scripts\\shellIntegration.ps1\" } catch {}{1}"]); + Fs.set(ds.Pwsh, ["-noexit", "-command", ". \"{0}/out/vs/workbench/contrib/terminal/common/scripts/shellIntegration.ps1\"{1}"]); + Fs.set(ds.PwshLogin, ["-l", "-noexit", "-command", ". \"{0}/out/vs/workbench/contrib/terminal/common/scripts/shellIntegration.ps1\""]); + Fs.set(ds.Zsh, ["-i"]); + Fs.set(ds.ZshLogin, ["-il"]); + Fs.set(ds.Bash, ["--init-file", "{0}/out/vs/workbench/contrib/terminal/common/scripts/shellIntegration-bash.sh"]); + Fs.set(ds.Fish, ["--init-command", "source \"{0}/out/vs/workbench/contrib/terminal/common/scripts/shellIntegration.fish\""]); + Fs.set(ds.FishLogin, ["-l", "--init-command", "source \"{0}/out/vs/workbench/contrib/terminal/common/scripts/shellIntegration.fish\""]); + } + }); + import * as QC from "fs"; + import * as e_ from "child_process"; + import { dirname as t_, resolve as i_ } from "path"; + function s_(t, e, i, s, r = process.env, n, o, a, c) { + n = n || { + existsFile: jt.existsFile, + readFile: QC.promises.readFile + }; + if (j) { + return r_(i, n, r, o, s.getValue("terminal.integrated.useWslProfiles") !== false, t && typeof t == "object" ? { + ...t + } : s.getValue("terminal.integrated.profiles.windows"), typeof e == "string" ? e : s.getValue("terminal.integrated.defaultProfile.windows"), c, a); + } else { + return h_(n, o, i, t && typeof t == "object" ? { + ...t + } : s.getValue(Se ? "terminal.integrated.profiles.linux" : "terminal.integrated.profiles.osx"), typeof e == "string" ? e : s.getValue(Se ? "terminal.integrated.defaultProfile.linux" : "terminal.integrated.defaultProfile.osx"), c, a, r); + } + } + async function r_(t, e, i, s, r, n, o, a, c) { + const l = process.env.hasOwnProperty("PROCESSOR_ARCHITEW6432"); + const u = `${process.env.windir}\\${l ? "Sysnative" : "System32"}`; + let d = false; + if (YC() >= 16299) { + d = true; + } + await o_(a); + const f = new Map(); + if (t) { + f.set("PowerShell", { + source: "PowerShell", + icon: Si.terminalPowershell, + isAutoDetected: true + }); + f.set("Windows PowerShell", { + path: `${u}\\WindowsPowerShell\\v1.0\\powershell.exe`, + icon: Si.terminalPowershell, + isAutoDetected: true + }); + f.set("Git Bash", { + source: "Git Bash", + isAutoDetected: true + }); + f.set("Command Prompt", { + path: `${u}\\cmd.exe`, + icon: Si.terminalCmd, + isAutoDetected: true + }); + f.set("Cygwin", { + path: [{ + path: `${process.env.HOMEDRIVE}\\cygwin64\\bin\\bash.exe`, + isUnsafe: true + }, { + path: `${process.env.HOMEDRIVE}\\cygwin\\bin\\bash.exe`, + isUnsafe: true + }], + args: ["--login"], + isAutoDetected: true + }); + f.set("bash (MSYS2)", { + path: [{ + path: `${process.env.HOMEDRIVE}\\msys64\\usr\\bin\\bash.exe`, + isUnsafe: true + }], + args: ["--login", "-i"], + env: { + CHERE_INVOKING: "1" + }, + icon: Si.terminalBash, + isAutoDetected: true + }); + const w = `${process.env.CMDER_ROOT || `${process.env.HOMEDRIVE}\\cmder`}\\vendor\\bin\\vscode_init.cmd`; + f.set("Cmder", { + path: `${u}\\cmd.exe`, + args: ["/K", w], + requiresPath: process.env.CMDER_ROOT ? w : { + path: w, + isUnsafe: true + }, + isAutoDetected: true + }); + } + k7(n, f); + const p = await S7(f.entries(), o, e, i, s, c); + if (t && r) { + try { + const w = await l_(`${u}\\${d ? "wsl" : "bash"}.exe`, o); + for (const m of w) { + if (!n || !(m.profileName in n)) { + p.push(m); + } + } + } catch { + if (hm) { + s?.trace("WSL is not installed, so could not detect WSL profiles"); + hm = false; + } + } + } + return p; + } + async function S7(t, e, i, s = process.env, r, n) { + const o = []; + for (const [a, c] of t) { + o.push(n_(a, c, e, i, s, r, n)); + } + return (await Promise.all(o)).filter(a => !!a); + } + async function n_(t, e, i, s, r = process.env, n, o) { + if (e === null) { + return; + } + let a; + let c; + let l; + if ("source" in e && !("path" in e)) { + const p = el?.get(e.source); + if (!p) { + return; + } + a = p.paths; + c = e.args || p.args; + if (e.icon) { + l = E7(e.icon); + } else if (p.icon) { + l = p.icon; + } + } else { + a = Array.isArray(e.path) ? e.path : [e.path]; + c = j || Array.isArray(e.args) ? e.args : undefined; + l = E7(e.icon); + } + let u; + if (o) { + const p = a.map(m => typeof m == "string" ? m : m.path); + const w = await o(p); + u = new Array(a.length); + for (let m = 0; m < a.length; m++) { + if (typeof a[m] == "string") { + u[m] = w[m]; + } else { + u[m] = { + path: w[m], + isUnsafe: true + }; + } + } + } else { + u = a.slice(); + } + let d; + if (e.requiresPath) { + let p; + if (wt(e.requiresPath)) { + p = e.requiresPath; + } else { + p = e.requiresPath.path; + if (e.requiresPath.isUnsafe) { + d = p; + } + } + if (!(await s.existsFile(p))) { + return; + } + } + const f = await xd(t, i, u, s, r, c, e.env, e.overrideName, e.isAutoDetected, d); + if (!f) { + n?.debug("Terminal profile not validated", t, a); + return; + } + f.isAutoDetected = e.isAutoDetected; + f.icon = l; + f.color = e.color; + return f; + } + function E7(t) { + if (typeof t == "string") { + return { + id: t + }; + } else { + return t; + } + } + async function o_(t) { + if (el && !t) { + return; + } + const [e, i] = await Promise.all([a_(), t || c_()]); + el = new Map(); + el.set("Git Bash", { + profileName: "Git Bash", + paths: e, + args: ["--login", "-i"] + }); + el.set("PowerShell", { + profileName: "PowerShell", + paths: i, + icon: Si.terminalPowershell + }); + } + async function a_() { + const t = new Set(); + const e = await y7("git.exe"); + if (e) { + const r = t_(e); + t.add(i_(r, "../..")); + } + function i(r, n) { + if (n) { + r.add(n); + } + } + i(t, process.env.ProgramW6432); + i(t, process.env.ProgramFiles); + i(t, process.env["ProgramFiles(X86)"]); + i(t, `${process.env.LocalAppData}\\Program`); + const s = []; + for (const r of t) { + s.push(`${r}\\Git\\bin\\bash.exe`, `${r}\\Git\\usr\\bin\\bash.exe`, `${r}\\usr\\bin\\bash.exe`); + } + s.push(`${process.env.UserProfile}\\scoop\\apps\\git\\current\\bin\\bash.exe`); + s.push(`${process.env.UserProfile}\\scoop\\apps\\git-with-openssh\\current\\bin\\bash.exe`); + return s; + } + async function c_() { + const t = []; + for await (const e of E5()) { + t.push(e.exePath); + } + return t; + } + async function l_(t, e) { + const i = []; + const s = await new Promise((o, a) => { + e_.exec("wsl.exe -l -q", { + encoding: "utf16le", + timeout: 1000 + }, (c, l) => { + if (c) { + return a("Problem occurred when getting wsl distros"); + } + o(l); + }); + }); + if (!s) { + return []; + } + const r = new RegExp(/[\r?\n]/); + const n = s.split(r).filter(o => o.trim().length > 0 && o !== ""); + for (const o of n) { + if (o === "" || o.startsWith("docker-desktop")) { + continue; + } + const a = `${o} (WSL)`; + const c = { + profileName: a, + path: t, + args: ["-d", `${o}`], + isDefault: a === e, + icon: u_(o), + isAutoDetected: false + }; + i.push(c); + } + return i; + } + function u_(t) { + if (t.includes("Ubuntu")) { + return Si.terminalUbuntu; + } else if (t.includes("Debian")) { + return Si.terminalDebian; + } else { + return Si.terminalLinux; + } + } + async function h_(t, e, i, s, r, n, o, a) { + const c = new Map(); + if (i && (await t.existsFile("/etc/shells"))) { + const l = (await t.readFile("/etc/shells")).toString(); + const u = (n || l.split(` + `)).map(f => { + const p = f.indexOf("#"); + if (p === -1) { + return f; + } else { + return f.substring(0, p); + } + }).filter(f => f.trim().length > 0); + const d = new Map(); + for (const f of u) { + let p = Ue(f); + let w = d.get(p) || 0; + w++; + if (w > 1) { + p = `${p} (${w})`; + } + d.set(p, w); + c.set(p, { + path: f, + isAutoDetected: true + }); + } + } + k7(s, c); + return await S7(c.entries(), r, t, a, e, o); + } + function k7(t, e) { + if (t) { + for (const [i, s] of Object.entries(t)) { + if (s === null || typeof s != "object" || !("path" in s) && !("source" in s)) { + e.delete(i); + } else { + s.icon = s.icon || e.get(i)?.icon; + e.set(i, s); + } + } + } + } + async function xd(t, e, i, s, r, n, o, a, c, l) { + if (i.length === 0) { + return Promise.resolve(undefined); + } + const u = i.shift(); + if (u === "") { + return xd(t, e, i, s, r, n, o, a, c); + } + const d = typeof u != "string" && u.isUnsafe; + const f = typeof u == "string" ? u : u.path; + const p = { + profileName: t, + path: f, + args: n, + env: o, + overrideName: a, + isAutoDetected: c, + isDefault: t === e, + isUnsafePath: d, + requiresUnsafePath: l + }; + if (Ue(f) === f) { + const m = r.PATH ? r.PATH.split(Zl) : undefined; + const y = await y7(f, undefined, m, undefined, s.existsFile); + if (y) { + p.path = y; + p.isFromPath = true; + return p; + } else { + return xd(t, e, i, s, r, n); + } + } + if (await s.existsFile(pi(f))) { + return p; + } else { + return xd(t, e, i, s, r, n, o, a, c); + } + } + var x7; + var el; + var hm; + var d_ = g({ + "out-build/vs/platform/terminal/node/terminalProfiles.js"() { + "use strict"; + + nd(); + we(); + H(); + _e(); + _t(); + P5(); + XC(); + (function (t) { + t.UnixShellsPath = "/etc/shells"; + })(x7 ||= {}); + hm = true; + } + }); + var dm; + var Dd; + var f_ = g({ + "out-build/vs/platform/terminal/node/ptyHostService.js"() { + "use strict"; + + B(); + M(); + H(); + xs(); + Ke(); + X(); + WC(); + cg(); + TC(); + p7(); + VC(); + d_(); + C5(); + Kn(); + (function (t) { + t[t.MaxRestarts = 5] = "MaxRestarts"; + })(dm ||= {}); + Dd = class extends T { + get c() { + this.h(); + return this.a; + } + get f() { + this.h(); + return this.b; + } + get g() { + return this.b; + } + h() { + if (!this.a) { + this.U(); + } + } + constructor(e, i, s, r) { + super(); + this.M = e; + this.N = i; + this.O = s; + this.P = r; + this.m = false; + this.n = 0; + this.q = true; + this.t = this.D(new $()); + this.onPtyHostExit = this.t.event; + this.u = this.D(new $()); + this.onPtyHostStart = this.u.event; + this.w = this.D(new $()); + this.onPtyHostUnresponsive = this.w.event; + this.y = this.D(new $()); + this.onPtyHostResponsive = this.y.event; + this.z = this.D(new $()); + this.onPtyHostRequestResolveVariables = this.z.event; + this.C = this.D(new $()); + this.onProcessData = this.C.event; + this.F = this.D(new $()); + this.onProcessReady = this.F.event; + this.G = this.D(new $()); + this.onProcessReplay = this.G.event; + this.H = this.D(new $()); + this.onProcessOrphanQuestion = this.H.event; + this.I = this.D(new $()); + this.onDidRequestDetach = this.I.event; + this.J = this.D(new $()); + this.onDidChangeProperty = this.J.event; + this.L = this.D(new $()); + this.onProcessExit = this.L.event; + zC(); + this.D(this.M); + this.D(xe(() => this.W())); + this.j = this.D(new Sd(undefined, this.O)); + this.D(this.j.onCreateRequest(this.z.fire, this.z)); + if (this.M.onRequestConnection) { + this.D(x.once(this.M.onRequestConnection)(() => this.h())); + } + if (this.M.onWillShutdown) { + this.D(this.M.onWillShutdown(() => this.m = true)); + } + } + get Q() { + return this.N.getValue("terminal.integrated.ignoreProcessNames"); + } + async R() { + return this.g?.refreshIgnoreProcessNames?.(this.Q); + } + async S() { + if (j) { + return process.env; + } + try { + return await ag(this.N, this.O, { + _: [] + }, process.env); + } catch (e) { + this.O.error("ptyHost was unable to resolve shell environment", e); + return {}; + } + } + U() { + const e = this.M.start(); + const i = e.client; + if (this.O.getLevel() === J.Trace) { + this.O.trace("PtyHostService#_startPtyHost", new Error().stack?.replace(/^Error/, "")); + } + ze.toService(i.getChannel(Xo.Heartbeat)).onBeat(() => this.X()); + this.X(true); + this.D(e.onDidProcessExit(n => { + this.t.fire(n.code); + if (!this.m && !this.B.isDisposed) { + if (this.n <= dm.MaxRestarts) { + this.O.error(`ptyHost terminated unexpectedly with code ${n.code}`); + this.n++; + this.restartPtyHost(); + } else { + this.O.error(`ptyHost terminated unexpectedly with code ${n.code}, giving up`); + } + } + })); + const r = ze.toService(i.getChannel(Xo.PtyHost)); + this.D(r.onProcessData(n => this.C.fire(n))); + this.D(r.onProcessReady(n => this.F.fire(n))); + this.D(r.onProcessExit(n => this.L.fire(n))); + this.D(r.onDidChangeProperty(n => this.J.fire(n))); + this.D(r.onProcessReplay(n => this.G.fire(n))); + this.D(r.onProcessOrphanQuestion(n => this.H.fire(n))); + this.D(r.onDidRequestDetach(n => this.I.fire(n))); + this.D(new g7(this.P, i.getChannel(Xo.Logger))); + this.a = e; + this.b = r; + this.u.fire(); + this.D(this.N.onDidChangeConfiguration(async n => { + if (n.affectsConfiguration("terminal.integrated.ignoreProcessNames")) { + await this.R(); + } + })); + this.R(); + return [e, r]; + } + async createProcess(e, i, s, r, n, o, a, c, l, u, d) { + const f = setTimeout(() => this.$(), Ei.CreateProcessTimeout); + const p = await this.f.createProcess(e, i, s, r, n, o, a, c, l, u, d); + clearTimeout(f); + return p; + } + updateTitle(e, i, s) { + return this.f.updateTitle(e, i, s); + } + updateIcon(e, i, s, r) { + return this.f.updateIcon(e, i, s, r); + } + attachToProcess(e) { + return this.f.attachToProcess(e); + } + detachFromProcess(e, i) { + return this.f.detachFromProcess(e, i); + } + shutdownAll() { + return this.f.shutdownAll(); + } + listProcesses() { + return this.f.listProcesses(); + } + async getPerformanceMarks() { + return this.g?.getPerformanceMarks() ?? []; + } + async reduceConnectionGraceTime() { + return this.g?.reduceConnectionGraceTime(); + } + start(e) { + return this.f.start(e); + } + shutdown(e, i) { + return this.f.shutdown(e, i); + } + input(e, i) { + return this.f.input(e, i); + } + processBinary(e, i) { + return this.f.processBinary(e, i); + } + resize(e, i, s) { + return this.f.resize(e, i, s); + } + clearBuffer(e) { + return this.f.clearBuffer(e); + } + acknowledgeDataEvent(e, i) { + return this.f.acknowledgeDataEvent(e, i); + } + setUnicodeVersion(e, i) { + return this.f.setUnicodeVersion(e, i); + } + getInitialCwd(e) { + return this.f.getInitialCwd(e); + } + getCwd(e) { + return this.f.getCwd(e); + } + async getLatency() { + const e = new Jr(); + const i = await this.f.getLatency(); + e.stop(); + return [{ + label: "ptyhostservice<->ptyhost", + latency: e.elapsed() + }, ...i]; + } + orphanQuestionReply(e) { + return this.f.orphanQuestionReply(e); + } + installAutoReply(e, i) { + return this.f.installAutoReply(e, i); + } + uninstallAllAutoReplies() { + return this.f.uninstallAllAutoReplies(); + } + getDefaultSystemShell(e) { + return this.g?.getDefaultSystemShell(e) ?? A5(e ?? Wi, process.env); + } + async getProfiles(e, i, s, r = false) { + const n = await this.S(); + return s_(i, s, r, this.N, n, undefined, this.O, this.bb.bind(this, e)); + } + async getEnvironment() { + if (this.b) { + return this.f.getEnvironment(); + } else { + return { + ...process.env + }; + } + } + getWslPath(e, i) { + return this.f.getWslPath(e, i); + } + getRevivedPtyNewId(e, i) { + return this.f.getRevivedPtyNewId(e, i); + } + setTerminalLayoutInfo(e) { + return this.f.setTerminalLayoutInfo(e); + } + async getTerminalLayoutInfo(e) { + return this.g?.getTerminalLayoutInfo(e); + } + async requestDetachInstance(e, i) { + return this.f.requestDetachInstance(e, i); + } + async acceptDetachInstanceReply(e, i) { + return this.f.acceptDetachInstanceReply(e, i); + } + async freePortKillProcess(e) { + if (!this.f.freePortKillProcess) { + throw new Error("freePortKillProcess does not exist on the pty proxy"); + } + return this.f.freePortKillProcess(e); + } + async serializeTerminalState(e) { + return this.f.serializeTerminalState(e); + } + async reviveTerminalProcesses(e, i, s) { + return this.f.reviveTerminalProcesses(e, i, s); + } + async refreshProperty(e, i) { + return this.f.refreshProperty(e, i); + } + async updateProperty(e, i, s) { + return this.f.updateProperty(e, i, s); + } + async restartPtyHost() { + this.W(); + this.q = true; + this.U(); + } + W() { + this.f.shutdownAll(); + this.c.store.dispose(); + } + X(e) { + this.ab(); + this.r = setTimeout(() => this.Y(), e ? Ei.ConnectingBeatInterval : Ei.BeatInterval * Ei.FirstWaitMultiplier); + if (!this.q) { + this.q = true; + this.y.fire(); + } + } + Y() { + this.O.warn(`No ptyHost heartbeat after ${Ei.BeatInterval * Ei.FirstWaitMultiplier / 1000} seconds`); + this.r = undefined; + this.s = setTimeout(() => this.Z(), Ei.BeatInterval * Ei.SecondWaitMultiplier); + } + Z() { + this.O.error(`No ptyHost heartbeat after ${(Ei.BeatInterval * Ei.FirstWaitMultiplier + Ei.BeatInterval * Ei.FirstWaitMultiplier) / 1000} seconds`); + this.s = undefined; + if (this.q) { + this.q = false; + this.w.fire(); + } + } + $() { + this.ab(); + this.O.error(`No ptyHost response to createProcess after ${Ei.CreateProcessTimeout / 1000} seconds`); + if (this.q) { + this.q = false; + this.w.fire(); + } + } + ab() { + if (this.r) { + clearTimeout(this.r); + this.r = undefined; + } + if (this.s) { + clearTimeout(this.s); + this.s = undefined; + } + } + bb(e, i) { + return this.j.createRequest({ + workspaceId: e, + originalText: i + }); + } + async acceptPtyHostResolvedVariables(e, i) { + this.j.acceptReply(e, i); + } + }; + Dd = __decorate([__param(1, Je), __param(2, V), __param(3, sc)], Dd); + } + }); + var fm; + var D7; + var P7; + var p_ = g({ + "out-build/vs/platform/remote/common/electronRemoteResources.js"() { + "use strict"; + + fm = "request"; + D7 = "remoteResourceHandler"; + P7 = class { + async routeCall(t, e, i) { + if (e !== fm) { + throw new Error(`Call not found: ${e}`); + } + const s = i[0]; + if (s?.authority) { + const r = t.connections.find(n => n.ctx === s.authority); + if (r) { + return r; + } + } + throw new Error("Caller not found"); + } + routeEvent(t, e) { + throw new Error(`Event not found: ${e}`); + } + }; + } + }); + import { BrowserWindow as g_ } from "electron"; + var Pd; + var m_ = g({ + "out-build/vs/platform/auxiliaryWindow/electron-main/auxiliaryWindow.js"() { + "use strict"; + + H(); + Ke(); + vt(); + ct(); + X(); + Ti(); + fn(); + x6(); + Pd = class extends Yg { + get win() { + if (!super.win) { + this.tryClaimWindow(); + } + return super.win; + } + get webContents() { + return this.r; + } + constructor(e, i, s, r, n, o) { + super(r, n, i, s); + this.r = e; + this.S = o; + this.id = this.webContents.id; + this.parentId = -1; + this.Q = false; + this.tryClaimWindow(); + } + tryClaimWindow(e) { + if (!this.B.isDisposed && !this.webContents.isDestroyed()) { + this.U(e); + if (e && !this.Q) { + this.Q = true; + this.C({ + x: e.x, + y: e.y, + width: e.width, + height: e.height, + mode: e.show === false ? 0 : 1 + }, { + hideBecauseShadowWindow: false + }); + } + } + } + U(e) { + if (this.q) { + return; + } + const i = g_.fromWebContents(this.webContents); + if (i) { + this.z.trace("[aux window] Claimed browser window instance"); + this.s(i, e); + i.setMenu(null); + if ((j || Se) && dn(this.t, e?.titleBarStyle === "hidden" ? "custom" : undefined)) { + i.setAutoHideMenuBar(true); + } + this.S.registerAuxWindow(this); + } + } + matches(e) { + return this.webContents.id === e.id; + } + }; + Pd = __decorate([__param(1, ot), __param(2, V), __param(3, Je), __param(4, Oi), __param(5, Te)], Pd); + } + }); + import { BrowserWindow as w_, app as v_ } from "electron"; + var $d; + var b_ = g({ + "out-build/vs/platform/auxiliaryWindow/electron-main/auxiliaryWindowsMainService.js"() { + "use strict"; + + B(); + M(); + Ie(); + as(); + m_(); + Y(); + X(); + mc(); + Lt(); + $d = class extends T { + constructor(e, i) { + super(); + this.h = e; + this.j = i; + this.a = this.D(new $()); + this.onDidMaximizeWindow = this.a.event; + this.b = this.D(new $()); + this.onDidUnmaximizeWindow = this.b.event; + this.c = this.D(new $()); + this.onDidChangeFullScreen = this.c.event; + this.f = this.D(new $()); + this.onDidTriggerSystemContextMenu = this.f.event; + this.g = new Map(); + this.m(); + } + m() { + v_.on("browser-window-created", (e, i) => { + const s = this.getWindowByWebContents(i.webContents); + if (s) { + this.j.trace("[aux window] app.on(\"browser-window-created\"): Trying to claim auxiliary window"); + s.tryClaimWindow(); + } else { + const r = new De(); + r.add(x.fromNodeEventEmitter(i.webContents, "did-create-window", (n, o) => ({ + browserWindow: n, + details: o + }))(({ + browserWindow: n, + details: o + }) => { + const a = this.getWindowByWebContents(n.webContents); + if (a) { + this.j.trace("[aux window] window.on(\"did-create-window\"): Trying to claim auxiliary window"); + a.tryClaimWindow(o.options); + } + })); + r.add(x.fromNodeEventEmitter(i, "closed")(() => r.dispose())); + } + }); + it.handle("vscode:registerAuxiliaryWindow", async (e, i) => { + const s = this.getWindowByWebContents(e.sender); + if (s) { + this.j.trace("[aux window] vscode:registerAuxiliaryWindow: Registering auxiliary window to main window"); + s.parentId = i; + } + return e.sender.id; + }); + } + createWindow(e) { + const { + state: i, + overrides: s + } = this.n(e); + return this.h.invokeFunction(rh, i, s, { + preload: Ct.asFileUri("vs/base/parts/sandbox/electron-sandbox/preload-aux.js").fsPath + }); + } + n(e) { + const i = {}; + const s = { + hideBecauseShadowWindow: false + }; + const r = e.features.split(","); + for (const o of r) { + const [a, c] = o.split("="); + switch (a) { + case "width": + i.width = parseInt(c, 10); + break; + case "height": + i.height = parseInt(c, 10); + break; + case "left": + i.x = parseInt(c, 10); + break; + case "top": + i.y = parseInt(c, 10); + break; + case "window-maximized": + i.mode = 0; + break; + case "window-fullscreen": + i.mode = 3; + break; + case "window-disable-fullscreen": + s.disableFullscreen = true; + break; + case "window-native-titlebar": + s.forceNativeTitlebar = true; + break; + } + } + const n = nh.validateWindowState(this.j, i) ?? T4(); + this.j.trace("[aux window] using window state", n); + return { + state: n, + overrides: s + }; + } + registerWindow(e) { + const i = new De(); + const s = this.h.createInstance(Pd, e); + this.g.set(s.id, s); + i.add(xe(() => this.g.delete(s.id))); + i.add(s.onDidMaximize(() => this.a.fire(s))); + i.add(s.onDidUnmaximize(() => this.b.fire(s))); + i.add(s.onDidEnterFullScreen(() => this.c.fire({ + window: s, + fullscreen: true + }))); + i.add(s.onDidLeaveFullScreen(() => this.c.fire({ + window: s, + fullscreen: false + }))); + i.add(s.onDidTriggerSystemContextMenu(({ + x: r, + y: n + }) => this.f.fire({ + window: s, + x: r, + y: n + }))); + x.once(s.onDidClose)(() => i.dispose()); + } + getWindowByWebContents(e) { + const i = this.g.get(e.id); + if (i?.matches(e)) { + return i; + } else { + return undefined; + } + } + getFocusedWindow() { + const e = w_.getFocusedWindow(); + if (e) { + return this.getWindowByWebContents(e.webContents); + } + } + getLastActiveWindow() { + return q4(Array.from(this.g.values())); + } + getWindows() { + return Array.from(this.g.values()); + } + }; + $d = __decorate([__param(0, Ss), __param(1, V)], $d); + } + }); + function Qo(t) { + switch (gm.call(t)) { + case "[object Error]": + case "[object Exception]": + case "[object DOMException]": + case "[object WebAssembly.Exception]": + return true; + default: + return Cn(t, Error); + } + } + function pm(t, e) { + return gm.call(t) === `[object ${e}]`; + } + function Id(t) { + return pm(t, "String"); + } + function Ad(t) { + return pm(t, "Object"); + } + function y_(t) { + return typeof Event !== "undefined" && Cn(t, Event); + } + function S_(t) { + return typeof Element !== "undefined" && Cn(t, Element); + } + function E_(t) { + return pm(t, "RegExp"); + } + function $7(t) { + return !!t && !!t.then && typeof t.then == "function"; + } + function k_(t) { + return Ad(t) && "nativeEvent" in t && "preventDefault" in t && "stopPropagation" in t; + } + function Cn(t, e) { + try { + return t instanceof e; + } catch { + return false; + } + } + function I7(t) { + return typeof t == "object" && t !== null && (!!t.__isVue || !!t._isVue); + } + var gm; + var fs = g({ + "out-build/external/sentry/utils/is.js"() { + "use strict"; + + gm = Object.prototype.toString; + } + }); + var x_ = g({ + "out-build/external/sentry/utils/vendor/escapeStringForRegex.js"() { + "use strict"; + } + }); + function mm(t, e = 0) { + if (typeof t != "string" || e === 0 || t.length <= e) { + return t; + } else { + return `${t.slice(0, e)}...`; + } + } + function A7(t, e) { + if (!Array.isArray(t)) { + return ""; + } + const i = []; + for (let s = 0; s < t.length; s++) { + const r = t[s]; + try { + if (I7(r)) { + i.push("[VueViewModel]"); + } else { + i.push(String(r)); + } + } catch { + i.push("[value cannot be serialized]"); + } + } + return i.join(e); + } + function D_(t, e, i = false) { + if (Id(t)) { + if (E_(e)) { + return e.test(t); + } else if (Id(e)) { + if (i) { + return t === e; + } else { + return t.includes(e); + } + } else { + return false; + } + } else { + return false; + } + } + function Cd(t, e = [], i = false) { + return e.some(s => D_(t, s, i)); + } + var _d = g({ + "out-build/external/sentry/utils/string.js"() { + "use strict"; + + fs(); + x_(); + } + }); + function P_(t, e, i = 250, s, r, n, o) { + if (!n.exception || !n.exception.values || !o || !Cn(o.originalException, Error)) { + return; + } + const a = n.exception.values.length > 0 ? n.exception.values[n.exception.values.length - 1] : undefined; + if (a) { + n.exception.values = $_(wm(t, e, r, o.originalException, s, n.exception.values, a, 0), i); + } + } + function wm(t, e, i, s, r, n, o, a) { + if (n.length >= i + 1) { + return n; + } + let c = [...n]; + if (Cn(s[r], Error)) { + C7(o, a); + const l = t(e, s[r]); + const u = c.length; + _7(l, r, u, a); + c = wm(t, e, i, s[r], r, [l, ...c], l, u); + } + if (Array.isArray(s.errors)) { + s.errors.forEach((l, u) => { + if (Cn(l, Error)) { + C7(o, a); + const d = t(e, l); + const f = c.length; + _7(d, `errors[${u}]`, f, a); + c = wm(t, e, i, l, r, [d, ...c], d, f); + } + }); + } + return c; + } + function C7(t, e) { + t.mechanism = t.mechanism || { + type: "generic", + handled: true + }; + t.mechanism = { + ...t.mechanism, + ...(t.type === "AggregateError" && { + is_exception_group: true + }), + exception_id: e + }; + } + function _7(t, e, i, s) { + t.mechanism = t.mechanism || { + type: "generic", + handled: true + }; + t.mechanism = { + ...t.mechanism, + type: "chained", + source: e, + exception_id: i, + parent_id: s + }; + } + function $_(t, e) { + return t.map(i => { + i.value &&= mm(i.value, e); + return i; + }); + } + var I_ = g({ + "out-build/external/sentry/utils/aggregate-errors.js"() { + "use strict"; + + fs(); + _d(); + } + }); + var A_ = g({ + "out-build/external/sentry/utils/array.js"() { + "use strict"; + } + }); + var C_ = g({ + "out-build/external/sentry/utils/breadcrumb-log-level.js"() { + "use strict"; + } + }); + var ea; + var R7 = g({ + "out-build/external/sentry/utils/version.js"() { + "use strict"; + + ea = "8.35.0-cursor"; + } + }); + function vm(t, e, i) { + const s = i || yt; + const r = s.__SENTRY__ = s.__SENTRY__ || {}; + const n = r[ea] = r[ea] || {}; + return n[t] ||= e(); + } + var yt; + var Fi = g({ + "out-build/external/sentry/utils/worldwide.js"() { + "use strict"; + + R7(); + yt = globalThis; + } + }); + function __(t, e = {}) { + if (!t) { + return ""; + } + try { + let i = t; + const s = 5; + const r = []; + let n = 0; + let o = 0; + const a = " > "; + const c = a.length; + let l; + const u = Array.isArray(e) ? e : e.keyAttrs; + const d = !Array.isArray(e) && e.maxStringLength || L7; + while (i && n++ < s && (l = R_(i, u), l !== "html" && (!(n > 1) || !(o + r.length * c + l.length >= d)))) { + r.push(l); + o += l.length; + i = i.parentNode; + } + return r.reverse().join(a); + } catch { + return ""; + } + } + function R_(t, e) { + const i = t; + const s = []; + if (!i || !i.tagName) { + return ""; + } + if (O7.HTMLElement && i instanceof HTMLElement && i.dataset) { + if (i.dataset.sentryComponent) { + return i.dataset.sentryComponent; + } + if (i.dataset.sentryElement) { + return i.dataset.sentryElement; + } + } + s.push(i.tagName.toLowerCase()); + const r = e && e.length ? e.filter(o => i.getAttribute(o)).map(o => [o, i.getAttribute(o)]) : null; + if (r && r.length) { + r.forEach(o => { + s.push(`[${o[0]}="${o[1]}"]`); + }); + } else { + if (i.id) { + s.push(`#${i.id}`); + } + const o = i.className; + if (o && Id(o)) { + const a = o.split(/\s+/); + for (const c of a) { + s.push(`.${c}`); + } + } + } + const n = ["aria-label", "type", "name", "title", "alt"]; + for (const o of n) { + const a = i.getAttribute(o); + if (a) { + s.push(`[${o}="${a}"]`); + } + } + return s.join(""); + } + var O7; + var L7; + var M7 = g({ + "out-build/external/sentry/utils/browser.js"() { + "use strict"; + + fs(); + Fi(); + O7 = yt; + L7 = 80; + } + }); + var Rd; + var _n = g({ + "out-build/external/sentry/utils/debug-build.js"() { + "use strict"; + + Rd = false; + } + }); + function F7(t) { + if (!("console" in yt)) { + return t(); + } + const e = yt.console; + const i = {}; + const s = Object.keys(il); + s.forEach(r => { + const n = il[r]; + i[r] = e[r]; + e[r] = n; + }); + try { + return t(); + } finally { + s.forEach(r => { + e[r] = i[r]; + }); + } + } + function O_() { + let t = false; + const e = { + enable: () => { + t = true; + }, + disable: () => { + t = false; + }, + isEnabled: () => t + }; + if (Rd) { + tl.forEach(i => { + e[i] = (...s) => { + if (t) { + F7(() => { + yt.console[i](`${N7}[${i}]:`, ...s); + }); + } + }; + }); + } else { + tl.forEach(i => { + e[i] = () => {}; + }); + } + return e; + } + var N7; + var tl; + var il; + var oi; + var Fr = g({ + "out-build/external/sentry/utils/logger.js"() { + "use strict"; + + _n(); + Fi(); + N7 = "Sentry Logger "; + tl = ["debug", "info", "warn", "error", "log", "assert", "trace"]; + il = {}; + oi = vm("logger", O_); + } + }); + var W7 = g({ + "out-build/external/sentry/utils/dsn.js"() { + "use strict"; + + _n(); + Fr(); + } + }); + var bm; + var ym = g({ + "out-build/external/sentry/utils/error.js"() { + "use strict"; + + bm = class extends Error { + constructor(t, e = "warn") { + super(t); + this.message = t; + this.name = new.target.prototype.constructor.name; + Object.setPrototypeOf(this, new.target.prototype); + this.logLevel = e; + } + }; + } + }); + function L_(t, e, i) { + if (!(e in t)) { + return; + } + const s = t[e]; + const r = i(s); + if (typeof r == "function") { + M_(r, s); + } + t[e] = r; + } + function Sm(t, e, i) { + try { + Object.defineProperty(t, e, { + value: i, + writable: true, + configurable: true + }); + } catch { + if (Rd) { + oi.log(`Failed to add non-enumerable property "${e}" to object`, t); + } + } + } + function M_(t, e) { + try { + const i = e.prototype || {}; + t.prototype = e.prototype = i; + Sm(t, "__sentry_original__", e); + } catch {} + } + function F_(t) { + return t.__sentry_original__; + } + function N_(t) { + return Object.keys(t).map(e => `${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`).join("&"); + } + function W_(t) { + if (Qo(t)) { + return { + message: t.message, + name: t.name, + stack: t.stack, + ...j7(t) + }; + } + if (y_(t)) { + const e = { + type: t.type, + target: T7(t.target), + currentTarget: T7(t.currentTarget), + ...j7(t) + }; + if (typeof CustomEvent !== "undefined" && Cn(t, CustomEvent)) { + e.detail = t.detail; + } + return e; + } else { + return t; + } + } + function T7(t) { + try { + if (S_(t)) { + return __(t); + } else { + return Object.prototype.toString.call(t); + } + } catch { + return ""; + } + } + function j7(t) { + if (typeof t == "object" && t !== null) { + const e = {}; + for (const i in t) { + if (Object.prototype.hasOwnProperty.call(t, i)) { + e[i] = t[i]; + } + } + return e; + } else { + return {}; + } + } + var Nr = g({ + "out-build/external/sentry/utils/object.js"() { + "use strict"; + + M7(); + _n(); + fs(); + Fr(); + _d(); + } + }); + function U7(t) { + try { + if (!t || typeof t != "function") { + return Od; + } else { + return t.name || Od; + } + } catch { + return Od; + } + } + function Em(t) { + const e = t.exception; + if (e) { + const i = []; + try { + e.values.forEach(s => { + if (s.stacktrace.frames) { + i.push(...s.stacktrace.frames); + } + }); + return i; + } catch { + return; + } + } + } + var Od; + var sl = g({ + "out-build/external/sentry/utils/stacktrace.js"() { + "use strict"; + + Od = ""; + } + }); + function T_(t, e) { + rl[t] = rl[t] || []; + rl[t].push(e); + } + function j_(t, e) { + if (!km[t]) { + e(); + km[t] = true; + } + } + function U_(t, e) { + const i = t && rl[t]; + if (i) { + for (const s of i) { + try { + s(e); + } catch (r) { + if (Rd) { + oi.error(`Error while triggering instrumentation handler. + Type: ${t} + Name: ${U7(s)} + Error:`, r); + } + } + } + } + } + var rl; + var km; + var nl = g({ + "out-build/external/sentry/utils/instrument/handlers.js"() { + "use strict"; + + _n(); + Fr(); + sl(); + rl = {}; + km = {}; + } + }); + function B_(t) { + const e = "console"; + T_(e, t); + j_(e, q_); + } + function q_() { + if ("console" in yt) { + tl.forEach(function (t) { + if (t in yt.console) { + L_(yt.console, t, function (e) { + il[t] = e; + return function (...i) { + U_("console", { + args: i, + level: t + }); + const r = il[t]; + if (r) { + r.apply(yt.console, i); + } + }; + }); + } + }); + } + } + var z_ = g({ + "out-build/external/sentry/utils/instrument/console.js"() { + "use strict"; + + Fr(); + Nr(); + Fi(); + nl(); + } + }); + var H_ = g({ + "out-build/external/sentry/utils/vendor/supportsHistory.js"() { + "use strict"; + + Fi(); + } + }); + var B7 = g({ + "out-build/external/sentry/utils/supports.js"() { + "use strict"; + + _n(); + Fr(); + Fi(); + H_(); + } + }); + function q7() { + return Date.now() / xm; + } + function V_() { + const { + performance: t + } = yt; + if (!t || !t.now) { + return q7; + } + const e = Date.now() - t.now(); + const i = t.timeOrigin == null ? e : t.timeOrigin; + return () => (i + t.now()) / xm; + } + var xm; + var Ld; + var Md; + var G_; + var Dm = g({ + "out-build/external/sentry/utils/time.js"() { + "use strict"; + + Fi(); + xm = 1000; + Ld = V_(); + G_ = (() => { + const { + performance: t + } = yt; + if (!t || !t.now) { + Md = "none"; + return; + } + const e = 3600000; + const i = t.now(); + const s = Date.now(); + const r = t.timeOrigin ? Math.abs(t.timeOrigin + i - s) : e; + const n = r < e; + const o = t.timing && t.timing.navigationStart; + const c = typeof o == "number" ? Math.abs(o + i - s) : e; + const l = c < e; + if (n || l) { + if (r <= c) { + Md = "timeOrigin"; + return t.timeOrigin; + } else { + Md = "navigationStart"; + return o; + } + } else { + Md = "dateNow"; + return s; + } + })(); + } + }); + var J_ = g({ + "out-build/external/sentry/utils/instrument/fetch.js"() { + "use strict"; + + fs(); + Nr(); + B7(); + Dm(); + Fi(); + nl(); + } + }); + var K_ = g({ + "out-build/external/sentry/utils/instrument/globalError.js"() { + "use strict"; + + Fi(); + nl(); + } + }); + var Z_ = g({ + "out-build/external/sentry/utils/instrument/globalUnhandledRejection.js"() { + "use strict"; + + Fi(); + nl(); + } + }); + var Y_ = g({ + "out-build/external/sentry/utils/instrument/index.js"() { + "use strict"; + + z_(); + J_(); + K_(); + Z_(); + nl(); + } + }); + var z7 = g({ + "out-build/external/sentry/utils/env.js"() { + "use strict"; + } + }); + var H7 = g({ + "out-build/external/sentry/utils/node.js"() { + "use strict"; + + z7(); + } + }); + var X_ = g({ + "out-build/external/sentry/utils/isBrowser.js"() { + "use strict"; + + H7(); + Fi(); + } + }); + function Q_() { + const t = typeof WeakSet == "function"; + const e = t ? new WeakSet() : []; + function i(r) { + if (t) { + if (e.has(r)) { + return true; + } else { + e.add(r); + return false; + } + } + for (let n = 0; n < e.length; n++) { + if (e[n] === r) { + return true; + } + } + e.push(r); + return false; + } + function s(r) { + if (t) { + e.delete(r); + } else { + for (let n = 0; n < e.length; n++) { + if (e[n] === r) { + e.splice(n, 1); + break; + } + } + } + } + return [i, s]; + } + var V7 = g({ + "out-build/external/sentry/utils/memo.js"() { + "use strict"; + } + }); + function ta() { + const t = yt; + const e = t.crypto || t.msCrypto; + let i = () => Math.random() * 16; + try { + if (e && e.randomUUID) { + return e.randomUUID().replace(/-/g, ""); + } + if (e && e.getRandomValues) { + i = () => { + const s = new Uint8Array(1); + e.getRandomValues(s); + return s[0]; + }; + } + } catch {} + return "10000000100040008000100000000000".replace(/[018]/g, s => (s ^ (i() & 15) >> s / 4).toString(16)); + } + function G7(t) { + if (t.exception && t.exception.values) { + return t.exception.values[0]; + } else { + return undefined; + } + } + function Rn(t) { + const { + message: e, + event_id: i + } = t; + if (e) { + return e; + } + const s = G7(t); + if (s) { + if (s.type && s.value) { + return `${s.type}: ${s.value}`; + } else { + return s.type || s.value || i || ""; + } + } else { + return i || ""; + } + } + function eR(t, e) { + const i = G7(t); + if (!i) { + return; + } + const s = { + type: "generic", + handled: true + }; + const r = i.mechanism; + i.mechanism = { + ...s, + ...r, + ...e + }; + if (e && "data" in e) { + const n = { + ...(r && r.data), + ...e.data + }; + i.mechanism.data = n; + } + } + var ol = g({ + "out-build/external/sentry/utils/misc.js"() { + "use strict"; + + Nr(); + _d(); + Fi(); + } + }); + function J7(t, e = 100, i = Infinity) { + try { + return Pm("", t, e, i); + } catch (s) { + return { + ERROR: `**non-serializable** (${s})` + }; + } + } + function Pm(t, e, i = Infinity, s = Infinity, r = Q_()) { + const [n, o] = r; + if (e == null || ["boolean", "string"].includes(typeof e) || typeof e == "number" && Number.isFinite(e)) { + return e; + } + const a = tR(t, e); + if (!a.startsWith("[object ")) { + return a; + } + if (e.__sentry_skip_normalization__) { + return e; + } + const c = typeof e.__sentry_override_normalization_depth__ == "number" ? e.__sentry_override_normalization_depth__ : i; + if (c === 0) { + return a.replace("object ", ""); + } + if (n(e)) { + return "[Circular ~]"; + } + const l = e; + if (l && typeof l.toJSON == "function") { + try { + const p = l.toJSON(); + return Pm("", p, c - 1, s, r); + } catch {} + } + const u = Array.isArray(e) ? [] : {}; + let d = 0; + const f = W_(e); + for (const p in f) { + if (!Object.prototype.hasOwnProperty.call(f, p)) { + continue; + } + if (d >= s) { + u[p] = "[MaxProperties ~]"; + break; + } + const w = f[p]; + u[p] = Pm(p, w, c - 1, s, r); + d++; + } + o(e); + return u; + } + function tR(t, e) { + try { + if (t === "domain" && e && typeof e == "object" && e._events) { + return "[Domain]"; + } + if (t === "domainEmitter") { + return "[DomainEmitter]"; + } + if (typeof global !== "undefined" && e === global) { + return "[Global]"; + } + if (typeof window !== "undefined" && e === window) { + return "[Window]"; + } + if (typeof document !== "undefined" && e === document) { + return "[Document]"; + } + if (I7(e)) { + return "[VueViewModel]"; + } + if (k_(e)) { + return "[SyntheticEvent]"; + } + if (typeof e == "number" && !Number.isFinite(e)) { + return `[${e}]`; + } + if (typeof e == "function") { + return `[Function: ${U7(e)}]`; + } + if (typeof e == "symbol") { + return `[${String(e)}]`; + } + if (typeof e == "bigint") { + return `[BigInt: ${String(e)}]`; + } + const i = iR(e); + if (/^HTML(\w*)Element$/.test(i)) { + return `[HTMLElement: ${i}]`; + } else { + return `[object ${i}]`; + } + } catch (i) { + return `**non-serializable** (${i})`; + } + } + function iR(t) { + const e = Object.getPrototypeOf(t); + if (e) { + return e.constructor.name; + } else { + return "null prototype"; + } + } + var Fd = g({ + "out-build/external/sentry/utils/normalize.js"() { + "use strict"; + + fs(); + V7(); + Nr(); + sl(); + } + }); + function sR(t, e) { + let i = 0; + for (let s = t.length - 1; s >= 0; s--) { + const r = t[s]; + if (r === ".") { + t.splice(s, 1); + } else if (r === "..") { + t.splice(s, 1); + i++; + } else if (i) { + t.splice(s, 1); + i--; + } + } + if (e) { + for (; i--; i) { + t.unshift(".."); + } + } + return t; + } + function rR(t) { + const e = t.length > 1024 ? `${t.slice(-1024)}` : t; + const i = Y7.exec(e); + if (i) { + return i.slice(1); + } else { + return []; + } + } + function K7(...t) { + let e = ""; + let i = false; + for (let s = t.length - 1; s >= -1 && !i; s--) { + const r = s >= 0 ? t[s] : "/"; + if (r) { + e = `${r}/${e}`; + i = r.charAt(0) === "/"; + } + } + e = sR(e.split("/").filter(s => !!s), !i).join("/"); + return (i ? "/" : "") + e || "."; + } + function Z7(t) { + let e = 0; + for (; e < t.length && t[e] === ""; e++); + let i = t.length - 1; + for (; i >= 0 && t[i] === ""; i--); + if (e > i) { + return []; + } else { + return t.slice(e, i - e + 1); + } + } + function nR(t, e) { + t = K7(t).slice(1); + e = K7(e).slice(1); + const i = Z7(t.split("/")); + const s = Z7(e.split("/")); + const r = Math.min(i.length, s.length); + let n = r; + for (let a = 0; a < r; a++) { + if (i[a] !== s[a]) { + n = a; + break; + } + } + let o = []; + for (let a = n; a < i.length; a++) { + o.push(".."); + } + o = o.concat(s.slice(n)); + return o.join("/"); + } + function oR(t, e) { + let i = rR(t)[2] || ""; + if (e && i.slice(e.length * -1) === e) { + i = i.slice(0, i.length - e.length); + } + return i; + } + var Y7; + var aR = g({ + "out-build/external/sentry/utils/path.js"() { + "use strict"; + + Y7 = /^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/; + } + }); + function cR(t) { + return new Nd(e => { + e(t); + }); + } + function lR(t) { + return new Nd((e, i) => { + i(t); + }); + } + var X7; + var Nd; + var Q7 = g({ + "out-build/external/sentry/utils/syncpromise.js"() { + "use strict"; + + fs(); + (function (t) { + t[t.PENDING = 0] = "PENDING"; + t[t.RESOLVED = 1] = "RESOLVED"; + t[t.REJECTED = 2] = "REJECTED"; + })(X7 ||= {}); + Nd = class x0 { + constructor(e) { + this._resolve = i => { + this._setResult(1, i); + }; + this._reject = i => { + this._setResult(2, i); + }; + this._setResult = (i, s) => { + if (this._state === 0) { + if ($7(s)) { + s.then(this._resolve, this._reject); + return; + } + this._state = i; + this._value = s; + this._executeHandlers(); + } + }; + this._executeHandlers = () => { + if (this._state === 0) { + return; + } + const i = this._handlers.slice(); + this._handlers = []; + i.forEach(s => { + if (!s[0]) { + if (this._state === 1) { + s[1](this._value); + } + if (this._state === 2) { + s[2](this._value); + } + s[0] = true; + } + }); + }; + this._state = 0; + this._handlers = []; + try { + e(this._resolve, this._reject); + } catch (i) { + this._reject(i); + } + } + then(e, i) { + return new x0((s, r) => { + this._handlers.push([false, n => { + if (!e) { + s(n); + } else { + try { + s(e(n)); + } catch (o) { + r(o); + } + } + }, n => { + if (!i) { + r(n); + } else { + try { + s(i(n)); + } catch (o) { + r(o); + } + } + }]); + this._executeHandlers(); + }); + } + catch(e) { + return this.then(i => i, e); + } + finally(e) { + return new x0((i, s) => { + let r; + let n; + return this.then(o => { + n = false; + r = o; + if (e) { + e(); + } + }, o => { + n = true; + r = o; + if (e) { + e(); + } + }).then(() => { + if (n) { + s(r); + return; + } + i(r); + }); + }); + } + }; + } + }); + function uR(t) { + const e = []; + function i() { + return t === undefined || e.length < t; + } + function s(o) { + return e.splice(e.indexOf(o), 1)[0] || Promise.resolve(undefined); + } + function r(o) { + if (!i()) { + return lR(new bm("Not adding Promise because buffer limit was reached.")); + } + const a = o(); + if (e.indexOf(a) === -1) { + e.push(a); + } + a.then(() => s(a)).then(null, () => s(a).then(null, () => {})); + return a; + } + function n(o) { + return new Nd((a, c) => { + let l = e.length; + if (!l) { + return a(true); + } + const u = setTimeout(() => { + if (o && o > 0) { + a(false); + } + }, o); + e.forEach(d => { + cR(d).then(() => { + if (! --l) { + clearTimeout(u); + a(true); + } + }, c); + }); + }); + } + return { + $: e, + add: r, + drain: n + }; + } + var e9 = g({ + "out-build/external/sentry/utils/promisebuffer.js"() { + "use strict"; + + ym(); + Q7(); + } + }); + function hR(t) { + const e = {}; + let i = 0; + while (i < t.length) { + const s = t.indexOf("=", i); + if (s === -1) { + break; + } + let r = t.indexOf(";", i); + if (r === -1) { + r = t.length; + } else if (r < s) { + i = t.lastIndexOf(";", s - 1) + 1; + continue; + } + const n = t.slice(i, s).trim(); + if (e[n] === undefined) { + let o = t.slice(s + 1, r).trim(); + if (o.charCodeAt(0) === 34) { + o = o.slice(1, -1); + } + try { + e[n] = o.indexOf("%") !== -1 ? decodeURIComponent(o) : o; + } catch { + e[n] = o; + } + } + i = r + 1; + } + return e; + } + var dR = g({ + "out-build/external/sentry/utils/cookie.js"() { + "use strict"; + } + }); + function fR(t) { + return t.split(/[?#]/, 1)[0]; + } + var t9 = g({ + "out-build/external/sentry/utils/url.js"() { + "use strict"; + } + }); + function pR(t) { + return $m.map(r => { + const n = t[r]; + const o = Array.isArray(n) ? n.join(";") : n; + if (r === "Forwarded") { + return gR(o); + } else { + return o && o.split(",").map(a => a.trim()); + } + }).reduce((r, n) => n ? r.concat(n) : r, []).find(r => r !== null && mR(r)) || null; + } + function gR(t) { + if (!t) { + return null; + } + for (const e of t.split(";")) { + if (e.startsWith("for=")) { + return e.slice(4); + } + } + return null; + } + function mR(t) { + return /(?:^(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}$)|(?:^(?:(?:[a-fA-F\d]{1,4}:){7}(?:[a-fA-F\d]{1,4}|:)|(?:[a-fA-F\d]{1,4}:){6}(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|:[a-fA-F\d]{1,4}|:)|(?:[a-fA-F\d]{1,4}:){5}(?::(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,2}|:)|(?:[a-fA-F\d]{1,4}:){4}(?:(?::[a-fA-F\d]{1,4}){0,1}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,3}|:)|(?:[a-fA-F\d]{1,4}:){3}(?:(?::[a-fA-F\d]{1,4}){0,2}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,4}|:)|(?:[a-fA-F\d]{1,4}:){2}(?:(?::[a-fA-F\d]{1,4}){0,3}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,5}|:)|(?:[a-fA-F\d]{1,4}:){1}(?:(?::[a-fA-F\d]{1,4}){0,4}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,6}|:)|(?::(?:(?::[a-fA-F\d]{1,4}){0,5}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,7}|:)))(?:%[0-9a-zA-Z]{1,})?$)/.test(t); + } + var $m; + var wR = g({ + "out-build/external/sentry/utils/vendor/getIpAddress.js"() { + "use strict"; + + $m = ["X-Client-IP", "X-Forwarded-For", "Fly-Client-IP", "CF-Connecting-IP", "Fastly-Client-Ip", "True-Client-Ip", "X-Real-IP", "X-Cluster-Client-IP", "X-Forwarded", "Forwarded-For", "Forwarded", "X-Vercel-Forwarded-For"]; + } + }); + function i9(t, e = {}) { + const i = t.method && t.method.toUpperCase(); + let s = ""; + let r = "url"; + if (e.customRoute || t.route) { + s = e.customRoute || `${t.baseUrl || ""}${t.route && t.route.path}`; + r = "route"; + } else if (t.originalUrl || t.url) { + s = fR(t.originalUrl || t.url || ""); + } + let n = ""; + if (e.method && i) { + n += i; + } + if (e.method && e.path) { + n += " "; + } + if (e.path && s) { + n += s; + } + return [n, r]; + } + function vR(t, e) { + switch (e) { + case "path": + return i9(t, { + path: true + })[0]; + case "handler": + return t.route && t.route.stack && t.route.stack[0] && t.route.stack[0].name || ""; + case "methodPath": + default: + { + const i = t._reconstructedRoute ? t._reconstructedRoute : undefined; + return i9(t, { + path: true, + method: true, + customRoute: i + })[0]; + } + } + } + function bR(t, e) { + const i = {}; + (Array.isArray(e) ? e : r9).forEach(r => { + if (t && r in t) { + i[r] = t[r]; + } + }); + return i; + } + function yR(t, e = {}) { + const { + include: i = Im + } = e; + const s = {}; + const r = t.headers || {}; + const n = t.method; + const o = r.host || t.hostname || t.host || ""; + const a = t.protocol === "https" || t.socket && t.socket.encrypted ? "https" : "http"; + const c = t.originalUrl || t.url || ""; + const l = c.startsWith(a) ? c : `${a}://${o}${c}`; + i.forEach(u => { + switch (u) { + case "headers": + { + s.headers = r; + if (!i.includes("cookies")) { + delete s.headers.cookie; + } + if (!i.includes("ip")) { + $m.forEach(d => { + delete s.headers[d]; + }); + } + break; + } + case "method": + { + s.method = n; + break; + } + case "url": + { + s.url = l; + break; + } + case "cookies": + { + s.cookies = t.cookies || r.cookie && hR(r.cookie) || {}; + break; + } + case "query_string": + { + s.query_string = ER(t); + break; + } + case "data": + { + if (n === "GET" || n === "HEAD") { + break; + } + if (t.body !== undefined) { + s.data = Id(t.body) ? t.body : JSON.stringify(J7(t.body)); + } + break; + } + default: + if ({}.hasOwnProperty.call(t, u)) { + s[u] = t[u]; + } + } + }); + return s; + } + function SR(t, e, i) { + const s = { + ...s9, + ...(i && i.include) + }; + if (s.request) { + const r = Array.isArray(s.request) ? [...s.request] : [...Im]; + if (s.ip) { + r.push("ip"); + } + const n = yR(e, { + include: r + }); + t.request = { + ...t.request, + ...n + }; + } + if (s.user) { + const r = e.user && Ad(e.user) ? bR(e.user, s.user) : {}; + if (Object.keys(r).length) { + t.user = { + ...t.user, + ...r + }; + } + } + if (s.ip) { + const r = e.headers && pR(e.headers) || e.ip || e.socket && e.socket.remoteAddress; + if (r) { + t.user = { + ...t.user, + ip_address: r + }; + } + } + if (s.transaction && !t.transaction && t.type === "transaction") { + t.transaction = vR(e, s.transaction); + } + return t; + } + function ER(t) { + let e = t.originalUrl || t.url || ""; + if (e) { + if (e.startsWith("/")) { + e = `http://dogs.are.great${e}`; + } + try { + const i = t.query || new URL(e).search.slice(1); + if (i.length) { + return i; + } else { + return undefined; + } + } catch { + return; + } + } + } + var s9; + var Im; + var r9; + var kR = g({ + "out-build/external/sentry/utils/requestdata.js"() { + "use strict"; + + dR(); + _n(); + fs(); + Fr(); + Fd(); + t9(); + wR(); + s9 = { + ip: false, + request: true, + transaction: true, + user: true + }; + Im = ["cookies", "data", "headers", "method", "query_string", "url"]; + r9 = ["id", "username", "email"]; + } + }); + function xR(t) { + if (t === "warn") { + return "warning"; + } else if (n9.includes(t)) { + return t; + } else { + return "log"; + } + } + var n9; + var DR = g({ + "out-build/external/sentry/utils/severity.js"() { + "use strict"; + + n9 = ["fatal", "error", "warning", "log", "info", "debug"]; + } + }); + var o9 = g({ + "out-build/external/sentry/utils/node-stack-trace.js"() { + "use strict"; + + sl(); + } + }); + var a9 = g({ + "out-build/external/sentry/utils/baggage.js"() { + "use strict"; + + _n(); + fs(); + Fr(); + } + }); + var PR; + var $R = g({ + "out-build/external/sentry/utils/tracing.js"() { + "use strict"; + + a9(); + ol(); + PR = new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$"); + } + }); + function IR(t, e) { + const [i, s] = t; + return [i, [...s, e]]; + } + function Am(t, e) { + const i = t[1]; + for (const s of i) { + const r = s[0].type; + if (e(s, r)) { + return true; + } + } + return false; + } + var Cm = g({ + "out-build/external/sentry/utils/envelope.js"() { + "use strict"; + + W7(); + Fd(); + Nr(); + Fi(); + } + }); + var AR = g({ + "out-build/external/sentry/utils/clientreport.js"() { + "use strict"; + + Cm(); + Dm(); + } + }); + var CR; + var _R = g({ + "out-build/external/sentry/utils/ratelimit.js"() { + "use strict"; + + CR = 60000; + } + }); + var RR = g({ + "out-build/external/sentry/utils/cache.js"() { + "use strict"; + } + }); + function OR(t, e) { + return t(e.stack || "", 1); + } + function LR(t, e) { + const i = { + type: e.name || e.constructor.name, + value: e.message + }; + const s = OR(t, e); + if (s.length) { + i.stacktrace = { + frames: s + }; + } + return i; + } + var MR = g({ + "out-build/external/sentry/utils/eventbuilder.js"() { + "use strict"; + + fs(); + ol(); + Fd(); + Nr(); + } + }); + var FR = g({ + "out-build/external/sentry/utils/anr.js"() { + "use strict"; + + o9(); + Nr(); + sl(); + } + }); + var NR = g({ + "out-build/external/sentry/utils/lru.js"() { + "use strict"; + } + }); + var c9 = g({ + "out-build/external/sentry/utils/buildPolyfills/_nullishCoalesce.js"() { + "use strict"; + } + }); + var WR = g({ + "out-build/external/sentry/utils/buildPolyfills/_asyncNullishCoalesce.js"() { + "use strict"; + + c9(); + } + }); + var l9 = g({ + "out-build/external/sentry/utils/buildPolyfills/_asyncOptionalChain.js"() { + "use strict"; + } + }); + var TR = g({ + "out-build/external/sentry/utils/buildPolyfills/_asyncOptionalChainDelete.js"() { + "use strict"; + + l9(); + } + }); + var u9 = g({ + "out-build/external/sentry/utils/buildPolyfills/_optionalChain.js"() { + "use strict"; + } + }); + var jR = g({ + "out-build/external/sentry/utils/buildPolyfills/_optionalChainDelete.js"() { + "use strict"; + + u9(); + } + }); + var UR = g({ + "out-build/external/sentry/utils/buildPolyfills/index.js"() { + "use strict"; + + WR(); + l9(); + TR(); + c9(); + u9(); + jR(); + } + }); + function h9() { + return { + traceId: ta(), + spanId: ta().substring(16) + }; + } + var BR = g({ + "out-build/external/sentry/utils/propagationContext.js"() { + "use strict"; + + ol(); + } + }); + var qR = g({ + "out-build/external/sentry/utils/vercelWaitUntil.js"() { + "use strict"; + + Fi(); + } + }); + var K = g({ + "out-build/external/sentry/utils/index.js"() { + "use strict"; + + I_(); + A_(); + C_(); + M7(); + W7(); + ym(); + Fi(); + Y_(); + fs(); + X_(); + Fr(); + V7(); + ol(); + H7(); + Fd(); + Nr(); + aR(); + e9(); + kR(); + DR(); + sl(); + o9(); + _d(); + B7(); + Q7(); + Dm(); + $R(); + z7(); + Cm(); + AR(); + _R(); + a9(); + t9(); + RR(); + MR(); + FR(); + NR(); + UR(); + BR(); + qR(); + R7(); + } + }); + var ps; + var Pt = g({ + "out-build/external/sentry/core/debug-build.js"() { + "use strict"; + + ps = false; + } + }); + function al() { + _m(yt); + return yt; + } + function _m(t) { + const e = t.__SENTRY__ = t.__SENTRY__ || {}; + e.version = e.version || ea; + return e[ea] = e[ea] || {}; + } + var On = g({ + "out-build/external/sentry/core/carrier.js"() { + "use strict"; + + K(); + } + }); + function zR(t, e = {}) { + if (e.user) { + if (!t.ipAddress && e.user.ip_address) { + t.ipAddress = e.user.ip_address; + } + if (!t.did && !e.did) { + t.did = e.user.id || e.user.email || e.user.username; + } + } + t.timestamp = e.timestamp || Ld(); + if (e.abnormal_mechanism) { + t.abnormal_mechanism = e.abnormal_mechanism; + } + if (e.ignoreDuration) { + t.ignoreDuration = e.ignoreDuration; + } + if (e.sid) { + t.sid = e.sid.length === 32 ? e.sid : ta(); + } + if (e.init !== undefined) { + t.init = e.init; + } + if (!t.did && e.did) { + t.did = `${e.did}`; + } + if (typeof e.started == "number") { + t.started = e.started; + } + if (t.ignoreDuration) { + t.duration = undefined; + } else if (typeof e.duration == "number") { + t.duration = e.duration; + } else { + const i = t.timestamp - t.started; + t.duration = i >= 0 ? i : 0; + } + if (e.release) { + t.release = e.release; + } + if (e.environment) { + t.environment = e.environment; + } + if (!t.ipAddress && e.ipAddress) { + t.ipAddress = e.ipAddress; + } + if (!t.userAgent && e.userAgent) { + t.userAgent = e.userAgent; + } + if (typeof e.errors == "number") { + t.errors = e.errors; + } + if (e.status) { + t.status = e.status; + } + } + var Wd = g({ + "out-build/external/sentry/core/session.js"() { + "use strict"; + + K(); + } + }); + function d9(t, e) { + if (e) { + Sm(t, Td, e); + } else { + delete t[Td]; + } + } + function Rm(t) { + return t[Td]; + } + var Td; + var cl = g({ + "out-build/external/sentry/core/utils/spanOnScope.js"() { + "use strict"; + + K(); + Td = "_sentrySpan"; + } + }); + var f9; + var p9; + var Ln; + var ll = g({ + "out-build/external/sentry/core/scope.js"() { + "use strict"; + + K(); + Wd(); + cl(); + f9 = 100; + p9 = class hS { + constructor() { + this._notifyingListeners = false; + this._scopeListeners = []; + this._eventProcessors = []; + this._breadcrumbs = []; + this._attachments = []; + this._user = {}; + this._tags = {}; + this._extra = {}; + this._contexts = {}; + this._sdkProcessingMetadata = {}; + this._propagationContext = h9(); + } + clone() { + const e = new hS(); + e._breadcrumbs = [...this._breadcrumbs]; + e._tags = { + ...this._tags + }; + e._extra = { + ...this._extra + }; + e._contexts = { + ...this._contexts + }; + e._user = this._user; + e._level = this._level; + e._session = this._session; + e._transactionName = this._transactionName; + e._fingerprint = this._fingerprint; + e._eventProcessors = [...this._eventProcessors]; + e._requestSession = this._requestSession; + e._attachments = [...this._attachments]; + e._sdkProcessingMetadata = { + ...this._sdkProcessingMetadata + }; + e._propagationContext = { + ...this._propagationContext + }; + e._client = this._client; + e._lastEventId = this._lastEventId; + d9(e, Rm(this)); + return e; + } + setClient(e) { + this._client = e; + } + setLastEventId(e) { + this._lastEventId = e; + } + getClient() { + return this._client; + } + lastEventId() { + return this._lastEventId; + } + addScopeListener(e) { + this._scopeListeners.push(e); + } + addEventProcessor(e) { + this._eventProcessors.push(e); + return this; + } + setUser(e) { + this._user = e || { + email: undefined, + id: undefined, + ip_address: undefined, + username: undefined + }; + if (this._session) { + zR(this._session, { + user: e + }); + } + this._notifyScopeListeners(); + return this; + } + getUser() { + return this._user; + } + getRequestSession() { + return this._requestSession; + } + setRequestSession(e) { + this._requestSession = e; + return this; + } + setTags(e) { + this._tags = { + ...this._tags, + ...e + }; + this._notifyScopeListeners(); + return this; + } + setTag(e, i) { + this._tags = { + ...this._tags, + [e]: i + }; + this._notifyScopeListeners(); + return this; + } + setExtras(e) { + this._extra = { + ...this._extra, + ...e + }; + this._notifyScopeListeners(); + return this; + } + setExtra(e, i) { + this._extra = { + ...this._extra, + [e]: i + }; + this._notifyScopeListeners(); + return this; + } + setFingerprint(e) { + this._fingerprint = e; + this._notifyScopeListeners(); + return this; + } + setLevel(e) { + this._level = e; + this._notifyScopeListeners(); + return this; + } + setTransactionName(e) { + this._transactionName = e; + this._notifyScopeListeners(); + return this; + } + setContext(e, i) { + if (i === null) { + delete this._contexts[e]; + } else { + this._contexts[e] = i; + } + this._notifyScopeListeners(); + return this; + } + setSession(e) { + if (e) { + this._session = e; + } else { + delete this._session; + } + this._notifyScopeListeners(); + return this; + } + getSession() { + return this._session; + } + update(e) { + if (!e) { + return this; + } + const i = typeof e == "function" ? e(this) : e; + const [s, r] = i instanceof Ln ? [i.getScopeData(), i.getRequestSession()] : Ad(i) ? [e, e.requestSession] : []; + const { + tags: n, + extra: o, + user: a, + contexts: c, + level: l, + fingerprint: u = [], + propagationContext: d + } = s || {}; + this._tags = { + ...this._tags, + ...n + }; + this._extra = { + ...this._extra, + ...o + }; + this._contexts = { + ...this._contexts, + ...c + }; + if (a && Object.keys(a).length) { + this._user = a; + } + if (l) { + this._level = l; + } + if (u.length) { + this._fingerprint = u; + } + if (d) { + this._propagationContext = d; + } + if (r) { + this._requestSession = r; + } + return this; + } + clear() { + this._breadcrumbs = []; + this._tags = {}; + this._extra = {}; + this._user = {}; + this._contexts = {}; + this._level = undefined; + this._transactionName = undefined; + this._fingerprint = undefined; + this._requestSession = undefined; + this._session = undefined; + d9(this, undefined); + this._attachments = []; + this._propagationContext = h9(); + this._notifyScopeListeners(); + return this; + } + addBreadcrumb(e, i) { + const s = typeof i == "number" ? i : f9; + if (s <= 0) { + return this; + } + const r = { + timestamp: q7(), + ...e + }; + const n = this._breadcrumbs; + n.push(r); + this._breadcrumbs = n.length > s ? n.slice(-s) : n; + this._notifyScopeListeners(); + return this; + } + getLastBreadcrumb() { + return this._breadcrumbs[this._breadcrumbs.length - 1]; + } + clearBreadcrumbs() { + this._breadcrumbs = []; + this._notifyScopeListeners(); + return this; + } + addAttachment(e) { + this._attachments.push(e); + return this; + } + clearAttachments() { + this._attachments = []; + return this; + } + getScopeData() { + return { + breadcrumbs: this._breadcrumbs, + attachments: this._attachments, + contexts: this._contexts, + tags: this._tags, + extra: this._extra, + user: this._user, + level: this._level, + fingerprint: this._fingerprint || [], + eventProcessors: this._eventProcessors, + propagationContext: this._propagationContext, + sdkProcessingMetadata: this._sdkProcessingMetadata, + transactionName: this._transactionName, + span: Rm(this) + }; + } + setSDKProcessingMetadata(e) { + this._sdkProcessingMetadata = { + ...this._sdkProcessingMetadata, + ...e + }; + return this; + } + setPropagationContext(e) { + this._propagationContext = e; + return this; + } + getPropagationContext() { + return this._propagationContext; + } + captureException(e, i) { + const s = i && i.event_id ? i.event_id : ta(); + if (!this._client) { + oi.warn("No client configured on scope - will not capture exception!"); + return s; + } + const r = new Error("Sentry syntheticException"); + this._client.captureException(e, { + originalException: e, + syntheticException: r, + ...i, + event_id: s + }, this); + return s; + } + captureMessage(e, i, s) { + const r = s && s.event_id ? s.event_id : ta(); + if (!this._client) { + oi.warn("No client configured on scope - will not capture message!"); + return r; + } + const n = new Error(e); + this._client.captureMessage(e, i, { + originalException: e, + syntheticException: n, + ...s, + event_id: r + }, this); + return r; + } + captureEvent(e, i) { + const s = i && i.event_id ? i.event_id : ta(); + if (this._client) { + this._client.captureEvent(e, { + ...i, + event_id: s + }, this); + return s; + } else { + oi.warn("No client configured on scope - will not capture event!"); + return s; + } + } + _notifyScopeListeners() { + if (!this._notifyingListeners) { + this._notifyingListeners = true; + this._scopeListeners.forEach(e => { + e(this); + }); + this._notifyingListeners = false; + } + } + }; + Ln = p9; + } + }); + function HR() { + return vm("defaultCurrentScope", () => new Ln()); + } + function VR() { + return vm("defaultIsolationScope", () => new Ln()); + } + var g9 = g({ + "out-build/external/sentry/core/defaultScopes.js"() { + "use strict"; + + K(); + ll(); + } + }); + function ia() { + const t = al(); + const e = _m(t); + return e.stack = e.stack || new w9(HR(), VR()); + } + function GR(t) { + return ia().withScope(t); + } + function JR(t, e) { + const i = ia(); + return i.withScope(() => { + i.getStackTop().scope = t; + return e(t); + }); + } + function m9(t) { + return ia().withScope(() => t(ia().getIsolationScope())); + } + function KR() { + return { + withIsolationScope: m9, + withScope: GR, + withSetScope: JR, + withSetIsolationScope: (t, e) => m9(e), + getCurrentScope: () => ia().getScope(), + getIsolationScope: () => ia().getIsolationScope() + }; + } + var w9; + var ZR = g({ + "out-build/external/sentry/core/asyncContext/stackStrategy.js"() { + "use strict"; + + K(); + g9(); + ll(); + On(); + w9 = class { + constructor(t, e) { + let i; + if (t) { + i = t; + } else { + i = new Ln(); + } + let s; + if (e) { + s = e; + } else { + s = new Ln(); + } + this._stack = [{ + scope: i + }]; + this._isolationScope = s; + } + withScope(t) { + const e = this._pushScope(); + let i; + try { + i = t(e); + } catch (s) { + this._popScope(); + throw s; + } + if ($7(i)) { + return i.then(s => { + this._popScope(); + return s; + }, s => { + this._popScope(); + throw s; + }); + } else { + this._popScope(); + return i; + } + } + getClient() { + return this.getStackTop().client; + } + getScope() { + return this.getStackTop().scope; + } + getIsolationScope() { + return this._isolationScope; + } + getStackTop() { + return this._stack[this._stack.length - 1]; + } + _pushScope() { + const t = this.getScope().clone(); + this._stack.push({ + client: this.getClient(), + scope: t + }); + return t; + } + _popScope() { + if (this._stack.length <= 1) { + return false; + } else { + return !!this._stack.pop(); + } + } + }; + } + }); + function jd(t) { + const e = _m(t); + if (e.acs) { + return e.acs; + } else { + return KR(); + } + } + var ul = g({ + "out-build/external/sentry/core/asyncContext/index.js"() { + "use strict"; + + On(); + ZR(); + } + }); + function Mn() { + const t = al(); + return jd(t).getCurrentScope(); + } + function Wr() { + const t = al(); + return jd(t).getIsolationScope(); + } + function YR(...t) { + const e = al(); + const i = jd(e); + if (t.length === 2) { + const [s, r] = t; + if (s) { + return i.withSetScope(s, r); + } else { + return i.withScope(r); + } + } + return i.withScope(t[0]); + } + function hl() { + return Mn().getClient(); + } + var st = g({ + "out-build/external/sentry/core/currentScopes.js"() { + "use strict"; + + K(); + ul(); + On(); + ll(); + } + }); + var Om = g({ + "out-build/external/sentry/core/metrics/metric-summary.js"() { + "use strict"; + + K(); + } + }); + var Ns = g({ + "out-build/external/sentry/core/semanticAttributes.js"() { + "use strict"; + } + }); + var v9; + var sa = g({ + "out-build/external/sentry/core/tracing/spanstatus.js"() { + "use strict"; + + v9 = 2; + } + }); + function XR(t) { + return t[b9] || t; + } + function QR() { + const t = al(); + const e = jd(t); + if (e.getActiveSpan) { + return e.getActiveSpan(); + } else { + return Rm(Mn()); + } + } + var b9; + var Zt = g({ + "out-build/external/sentry/core/utils/spanUtils.js"() { + "use strict"; + + K(); + ul(); + On(); + st(); + Om(); + Ns(); + sa(); + cl(); + b9 = "_sentryRootSpan"; + } + }); + function eO() { + const t = QR(); + const e = t && XR(t); + if (e) { + const i = "internal_error"; + if (ps) { + oi.log(`[Tracing] Root span: ${i} -> Global error occured`); + } + e.setStatus({ + code: v9, + message: i + }); + } + } + var y9 = g({ + "out-build/external/sentry/core/tracing/errors.js"() { + "use strict"; + + K(); + Pt(); + Zt(); + sa(); + eO.tag = "sentry_tracingErrorCallback"; + } + }); + var Lm = g({ + "out-build/external/sentry/core/tracing/utils.js"() { + "use strict"; + + K(); + K(); + } + }); + var tO = g({ + "out-build/external/sentry/core/tracing/hubextensions.js"() { + "use strict"; + + y9(); + } + }); + var ra = g({ + "out-build/external/sentry/core/utils/hasTracingEnabled.js"() { + "use strict"; + + st(); + } + }); + var Ud = g({ + "out-build/external/sentry/core/tracing/sentryNonRecordingSpan.js"() { + "use strict"; + + K(); + Zt(); + } + }); + var Mm = g({ + "out-build/external/sentry/core/utils/handleCallbackErrors.js"() { + "use strict"; + + K(); + } + }); + var Bd = g({ + "out-build/external/sentry/core/constants.js"() { + "use strict"; + } + }); + var na = g({ + "out-build/external/sentry/core/tracing/dynamicSamplingContext.js"() { + "use strict"; + + K(); + Bd(); + st(); + Ns(); + ra(); + Zt(); + } + }); + var Fm = g({ + "out-build/external/sentry/core/tracing/logSpans.js"() { + "use strict"; + + K(); + Pt(); + Zt(); + } + }); + var Nm = g({ + "out-build/external/sentry/core/utils/parseSampleRate.js"() { + "use strict"; + + K(); + Pt(); + } + }); + var S9 = g({ + "out-build/external/sentry/core/tracing/sampling.js"() { + "use strict"; + + K(); + Pt(); + ra(); + Nm(); + } + }); + var Wm = g({ + "out-build/external/sentry/core/envelope.js"() { + "use strict"; + + K(); + K(); + na(); + Zt(); + } + }); + var E9 = g({ + "out-build/external/sentry/core/tracing/measurement.js"() { + "use strict"; + + Ns(); + Zt(); + } + }); + var k9 = g({ + "out-build/external/sentry/core/tracing/sentrySpan.js"() { + "use strict"; + + K(); + st(); + Pt(); + Wm(); + Om(); + Ns(); + Zt(); + na(); + Fm(); + E9(); + Lm(); + } + }); + var x9 = g({ + "out-build/external/sentry/core/tracing/trace.js"() { + "use strict"; + + K(); + On(); + st(); + ul(); + Pt(); + Ns(); + Mm(); + ra(); + cl(); + Zt(); + na(); + Fm(); + S9(); + Ud(); + k9(); + sa(); + Lm(); + } + }); + var iO = g({ + "out-build/external/sentry/core/tracing/idleSpan.js"() { + "use strict"; + + K(); + st(); + Pt(); + Ns(); + ra(); + cl(); + Zt(); + Ud(); + sa(); + x9(); + } + }); + var oa = g({ + "out-build/external/sentry/core/tracing/index.js"() { + "use strict"; + + y9(); + Lm(); + tO(); + iO(); + k9(); + Ud(); + sa(); + sa(); + x9(); + na(); + E9(); + S9(); + Fm(); + } + }); + var D9 = g({ + "out-build/external/sentry/core/eventProcessors.js"() { + "use strict"; + + K(); + Pt(); + } + }); + var P9 = g({ + "out-build/external/sentry/core/utils/applyScopeDataToEvent.js"() { + "use strict"; + + K(); + na(); + Zt(); + } + }); + function sO(t) { + if (t) { + if (rO(t)) { + return { + captureContext: t + }; + } else if (nO(t)) { + return { + captureContext: t + }; + } else { + return t; + } + } + } + function rO(t) { + return t instanceof Ln || typeof t == "function"; + } + function nO(t) { + return Object.keys(t).some(e => $9.includes(e)); + } + var $9; + var Tm = g({ + "out-build/external/sentry/core/utils/prepareEvent.js"() { + "use strict"; + + K(); + Bd(); + st(); + D9(); + ll(); + P9(); + $9 = ["user", "level", "extra", "contexts", "tags", "fingerprint", "requestSession", "propagationContext"]; + } + }); + function oO(t, e) { + return Mn().captureException(t, sO(e)); + } + function I9(t, e) { + const i = typeof e == "string" ? e : undefined; + const s = typeof e != "string" ? { + captureContext: e + } : undefined; + return Mn().captureMessage(t, i, s); + } + var dl = g({ + "out-build/external/sentry/core/exports.js"() { + "use strict"; + + K(); + Bd(); + st(); + Pt(); + Wd(); + Tm(); + } + }); + var A9 = g({ + "out-build/external/sentry/core/sessionflusher.js"() { + "use strict"; + + K(); + st(); + } + }); + function aO(t) { + const e = t.protocol ? `${t.protocol}:` : ""; + const i = t.port ? `:${t.port}` : ""; + return `${e}//${t.host}${i}${t.path ? `/${t.path}` : ""}/api/`; + } + function cO(t) { + return `${aO(t)}${t.projectId}/envelope/`; + } + function lO(t, e) { + return N_({ + sentry_key: t.publicKey, + sentry_version: C9, + ...(e && { + sentry_client: `${e.name}/${e.version}` + }) + }); + } + function uO(t, e, i) { + return e || `${cO(t)}?${lO(t, i)}`; + } + var C9; + var jm = g({ + "out-build/external/sentry/core/api.js"() { + "use strict"; + + K(); + C9 = "7"; + } + }); + function RT(t) { + return t; + } + var ai = g({ + "out-build/external/sentry/core/integration.js"() { + "use strict"; + + K(); + st(); + Pt(); + } + }); + var _9 = g({ + "out-build/external/sentry/core/baseclient.js"() { + "use strict"; + + K(); + jm(); + st(); + Pt(); + Wm(); + ai(); + ai(); + Wd(); + na(); + Nm(); + Tm(); + } + }); + var R9 = g({ + "out-build/external/sentry/core/checkin.js"() { + "use strict"; + + K(); + } + }); + var hO = g({ + "out-build/external/sentry/core/server-runtime-client.js"() { + "use strict"; + + K(); + _9(); + R9(); + st(); + Pt(); + A9(); + oa(); + cl(); + Zt(); + } + }); + var dO = g({ + "out-build/external/sentry/core/sdk.js"() { + "use strict"; + + K(); + st(); + Pt(); + } + }); + var fO = g({ + "out-build/external/sentry/core/transports/base.js"() { + "use strict"; + + K(); + Pt(); + } + }); + var pO = g({ + "out-build/external/sentry/core/transports/offline.js"() { + "use strict"; + + K(); + Pt(); + } + }); + var gO = g({ + "out-build/external/sentry/core/transports/multiplexed.js"() { + "use strict"; + + K(); + jm(); + } + }); + var mO = g({ + "out-build/external/sentry/core/utils/isSentryRequestUrl.js"() { + "use strict"; + } + }); + var wO = g({ + "out-build/external/sentry/core/utils/parameterize.js"() { + "use strict"; + } + }); + var vO = g({ + "out-build/external/sentry/core/utils/sdkMetadata.js"() { + "use strict"; + + K(); + } + }); + var O9 = g({ + "out-build/external/sentry/core/utils/traceData.js"() { + "use strict"; + + K(); + ul(); + On(); + st(); + dl(); + oa(); + Zt(); + } + }); + var bO = g({ + "out-build/external/sentry/core/utils/meta.js"() { + "use strict"; + + O9(); + } + }); + var L9 = g({ + "out-build/external/sentry/core/breadcrumbs.js"() { + "use strict"; + + K(); + st(); + } + }); + var M9; + var F9; + var Um; + var N9; + var yO; + var SO = g({ + "out-build/external/sentry/core/integrations/functiontostring.js"() { + "use strict"; + + K(); + st(); + ai(); + F9 = "FunctionToString"; + Um = new WeakMap(); + N9 = () => ({ + name: F9, + setupOnce() { + M9 = Function.prototype.toString; + try { + Function.prototype.toString = function (...t) { + const e = F_(this); + const i = Um.has(hl()) && e !== undefined ? e : this; + return M9.apply(i, t); + }; + } catch {} + }, + setup(t) { + Um.set(t, true); + } + }); + yO = N9; + } + }); + function EO(t = {}, e = {}) { + return { + allowUrls: [...(t.allowUrls || []), ...(e.allowUrls || [])], + denyUrls: [...(t.denyUrls || []), ...(e.denyUrls || [])], + ignoreErrors: [...(t.ignoreErrors || []), ...(e.ignoreErrors || []), ...(t.disableErrorDefaults ? [] : W9)], + ignoreTransactions: [...(t.ignoreTransactions || []), ...(e.ignoreTransactions || [])], + ignoreInternal: t.ignoreInternal !== undefined ? t.ignoreInternal : true + }; + } + function kO(t, e) { + if (e.ignoreInternal && AO(t)) { + if (ps) { + oi.warn(`Event dropped due to being internal Sentry Error. + Event: ${Rn(t)}`); + } + return true; + } else if (xO(t, e.ignoreErrors)) { + if (ps) { + oi.warn(`Event dropped due to being matched by \`ignoreErrors\` option. + Event: ${Rn(t)}`); + } + return true; + } else if (_O(t)) { + if (ps) { + oi.warn(`Event dropped due to not having an error message, error type or stacktrace. + Event: ${Rn(t)}`); + } + return true; + } else if (DO(t, e.ignoreTransactions)) { + if (ps) { + oi.warn(`Event dropped due to being matched by \`ignoreTransactions\` option. + Event: ${Rn(t)}`); + } + return true; + } else if (PO(t, e.denyUrls)) { + if (ps) { + oi.warn(`Event dropped due to being matched by \`denyUrls\` option. + Event: ${Rn(t)}. + Url: ${qd(t)}`); + } + return true; + } else if ($O(t, e.allowUrls)) { + return false; + } else { + if (ps) { + oi.warn(`Event dropped due to not being matched by \`allowUrls\` option. + Event: ${Rn(t)}. + Url: ${qd(t)}`); + } + return true; + } + } + function xO(t, e) { + if (t.type || !e || !e.length) { + return false; + } else { + return IO(t).some(i => Cd(i, e)); + } + } + function DO(t, e) { + if (t.type !== "transaction" || !e || !e.length) { + return false; + } + const i = t.transaction; + if (i) { + return Cd(i, e); + } else { + return false; + } + } + function PO(t, e) { + if (!e || !e.length) { + return false; + } + const i = qd(t); + if (i) { + return Cd(i, e); + } else { + return false; + } + } + function $O(t, e) { + if (!e || !e.length) { + return true; + } + const i = qd(t); + if (i) { + return Cd(i, e); + } else { + return true; + } + } + function IO(t) { + const e = []; + if (t.message) { + e.push(t.message); + } + let i; + try { + i = t.exception.values[t.exception.values.length - 1]; + } catch {} + if (i && i.value) { + e.push(i.value); + if (i.type) { + e.push(`${i.type}: ${i.value}`); + } + } + return e; + } + function AO(t) { + try { + return t.exception.values[0].type === "SentryError"; + } catch {} + return false; + } + function CO(t = []) { + for (let e = t.length - 1; e >= 0; e--) { + const i = t[e]; + if (i && i.filename !== "" && i.filename !== "[native code]") { + return i.filename || null; + } + } + return null; + } + function qd(t) { + try { + let e; + try { + e = t.exception.values[0].stacktrace.frames; + } catch {} + if (e) { + return CO(e); + } else { + return null; + } + } catch { + if (ps) { + oi.error(`Cannot extract url for event ${Rn(t)}`); + } + return null; + } + } + function _O(t) { + if (t.type || !t.exception || !t.exception.values || t.exception.values.length === 0) { + return false; + } else { + return !t.message && !t.exception.values.some(e => e.stacktrace || e.type && e.type !== "Error" || e.value); + } + } + var W9; + var T9; + var j9; + var RO; + var OO = g({ + "out-build/external/sentry/core/integrations/inboundfilters.js"() { + "use strict"; + + K(); + Pt(); + ai(); + W9 = [/^Script error\.?$/, /^Javascript error: Script error\.? on line 0$/, /^ResizeObserver loop completed with undelivered notifications.$/, /^Cannot redefine property: googletag$/, "undefined is not an object (evaluating 'a.L')", `can't redefine non-configurable property "solana"`, "vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)", "Can't find variable: _AutofillCallbackHandler"]; + T9 = "InboundFilters"; + j9 = (t = {}) => ({ + name: T9, + processEvent(e, i, s) { + const r = s.getOptions(); + const n = EO(t, r); + if (kO(e, n)) { + return null; + } else { + return e; + } + } + }); + RO = j9; + } + }); + var U9; + var B9; + var q9; + var z9; + var LO; + var MO = g({ + "out-build/external/sentry/core/integrations/linkederrors.js"() { + "use strict"; + + K(); + ai(); + U9 = "cause"; + B9 = 5; + q9 = "LinkedErrors"; + z9 = (t = {}) => { + const e = t.limit || B9; + const i = t.key || U9; + return { + name: q9, + preprocessEvent(s, r, n) { + const o = n.getOptions(); + P_(LR, o.stackParser, o.maxValueLength, i, e, s, r); + } + }; + }; + LO = z9; + } + }); + function FO(t) { + if (yt._sentryModuleMetadata) { + for (const e of Object.keys(yt._sentryModuleMetadata)) { + const i = yt._sentryModuleMetadata[e]; + if (qm.has(e)) { + continue; + } + qm.add(e); + const s = t(e); + for (const r of s.reverse()) { + if (r.filename) { + Bm.set(r.filename, i); + break; + } + } + } + } + } + function NO(t, e) { + FO(t); + return Bm.get(e); + } + function H9(t, e) { + try { + e.exception.values.forEach(i => { + if (i.stacktrace) { + for (const s of i.stacktrace.frames || []) { + if (!s.filename || s.module_metadata) { + continue; + } + const r = NO(t, s.filename); + if (r) { + s.module_metadata = r; + } + } + } + }); + } catch {} + } + function V9(t) { + try { + t.exception.values.forEach(e => { + if (e.stacktrace) { + for (const i of e.stacktrace.frames || []) { + delete i.module_metadata; + } + } + }); + } catch {} + } + var Bm; + var qm; + var G9 = g({ + "out-build/external/sentry/core/metadata.js"() { + "use strict"; + + K(); + Bm = new Map(); + qm = new Set(); + } + }); + var WO; + var TO = g({ + "out-build/external/sentry/core/integrations/metadata.js"() { + "use strict"; + + K(); + ai(); + G9(); + WO = () => ({ + name: "ModuleMetadata", + setup(t) { + t.on("beforeEnvelope", e => { + Am(e, (i, s) => { + if (s === "event") { + const r = Array.isArray(i) ? i[1] : undefined; + if (r) { + V9(r); + i[1] = r; + } + } + }); + }); + t.on("applyFrameMetadata", e => { + if (e.type) { + return; + } + const i = t.getOptions().stackParser; + H9(i, e); + }); + } + }); + } + }); + function jO(t) { + const { + transactionNamingScheme: e, + include: { + ip: i, + user: s, + ...r + } + } = t; + const n = ["method"]; + for (const [a, c] of Object.entries(r)) { + if (c) { + n.push(a); + } + } + let o; + if (s === undefined) { + o = true; + } else if (typeof s == "boolean") { + o = s; + } else { + const a = []; + for (const [c, l] of Object.entries(s)) { + if (l) { + a.push(c); + } + } + o = a; + } + return { + include: { + ip: i, + user: o, + request: n.length !== 0 ? n : undefined, + transaction: e + } + }; + } + var zd; + var J9; + var K9; + var UO; + var BO = g({ + "out-build/external/sentry/core/integrations/requestdata.js"() { + "use strict"; + + K(); + ai(); + zd = { + include: { + cookies: true, + data: true, + headers: true, + ip: false, + query_string: true, + url: true, + user: { + id: true, + username: true, + email: true + } + }, + transactionNamingScheme: "methodPath" + }; + J9 = "RequestData"; + K9 = (t = {}) => { + const e = { + ...zd, + ...t, + include: { + ...zd.include, + ...t.include, + user: t.include && typeof t.include.user == "boolean" ? t.include.user : { + ...zd.include.user, + ...(t.include || {}).user + } + } + }; + return { + name: J9, + processEvent(i) { + const { + sdkProcessingMetadata: s = {} + } = i; + const r = s.request; + if (!r) { + return i; + } + const n = jO(e); + return SR(i, r, n); + } + }; + }; + UO = K9; + } + }); + function qO(t, e) { + const i = { + level: xR(e), + extra: { + arguments: t + } + }; + YR(s => { + s.addEventProcessor(o => { + o.logger = "console"; + eR(o, { + handled: false, + type: "console" + }); + return o; + }); + if (e === "assert") { + if (!t[0]) { + const o = `Assertion failed: ${A7(t.slice(1), " ") || "console.assert"}`; + s.setExtra("arguments", t.slice(1)); + I9(o, i); + } + return; + } + const r = t.find(o => o instanceof Error); + if (r) { + oO(r, i); + return; + } + const n = A7(t, " "); + I9(n, i); + }); + } + var Z9; + var Y9; + var zO; + var HO = g({ + "out-build/external/sentry/core/integrations/captureconsole.js"() { + "use strict"; + + K(); + st(); + dl(); + ai(); + Z9 = "CaptureConsole"; + Y9 = (t = {}) => { + const e = t.levels || tl; + return { + name: Z9, + setup(i) { + if ("console" in yt) { + B_(({ + args: s, + level: r + }) => { + if (hl() === i && !!e.includes(r)) { + qO(s, r); + } + }); + } + } + }; + }; + zO = Y9; + } + }); + var X9; + var Q9; + var VO; + var GO = g({ + "out-build/external/sentry/core/integrations/debug.js"() { + "use strict"; + + K(); + ai(); + X9 = "Debug"; + Q9 = (t = {}) => { + const e = { + debugger: false, + stringify: false, + ...t + }; + return { + name: X9, + setup(i) { + i.on("beforeSendEvent", (s, r) => { + if (e.debugger) { + debugger; + } + F7(() => { + if (e.stringify) { + console.log(JSON.stringify(s, null, 2)); + if (r && Object.keys(r).length) { + console.log(JSON.stringify(r, null, 2)); + } + } else { + console.log(s); + if (r && Object.keys(r).length) { + console.log(r); + } + } + }); + }); + } + }; + }; + VO = Q9; + } + }); + function JO(t, e) { + if (e) { + return !!KO(t, e) || !!ZO(t, e); + } else { + return false; + } + } + function KO(t, e) { + const i = t.message; + const s = e.message; + return (!!i || !!s) && (!i || !!s) && (!!i || !s) && i === s && !!t8(t, e) && !!e8(t, e); + } + function ZO(t, e) { + const i = i8(e); + const s = i8(t); + return !!i && !!s && i.type === s.type && i.value === s.value && !!t8(t, e) && !!e8(t, e); + } + function e8(t, e) { + let i = Em(t); + let s = Em(e); + if (!i && !s) { + return true; + } + if (i && !s || !i && s || (i = i, s = s, s.length !== i.length)) { + return false; + } + for (let r = 0; r < s.length; r++) { + const n = s[r]; + const o = i[r]; + if (n.filename !== o.filename || n.lineno !== o.lineno || n.colno !== o.colno || n.function !== o.function) { + return false; + } + } + return true; + } + function t8(t, e) { + let i = t.fingerprint; + let s = e.fingerprint; + if (!i && !s) { + return true; + } + if (i && !s || !i && s) { + return false; + } + i = i; + s = s; + try { + return i.join("") === s.join(""); + } catch { + return false; + } + } + function i8(t) { + return t.exception && t.exception.values && t.exception.values[0]; + } + var s8; + var r8; + var YO; + var XO = g({ + "out-build/external/sentry/core/integrations/dedupe.js"() { + "use strict"; + + K(); + ai(); + Pt(); + s8 = "Dedupe"; + r8 = () => { + let t; + return { + name: s8, + processEvent(e) { + if (e.type) { + return e; + } + try { + if (JO(e, t)) { + if (ps) { + oi.warn("Event dropped due to being a duplicate of previously captured event."); + } + return null; + } + } catch {} + return t = e; + } + }; + }; + YO = r8; + } + }); + function QO(t, e = {}, i, s, r) { + if (!e.originalException || !Qo(e.originalException)) { + return t; + } + const n = e.originalException.name || e.originalException.constructor.name; + const o = eL(e.originalException, s, r); + if (o) { + const a = { + ...t.contexts + }; + const c = J7(o, i); + if (Ad(c)) { + Sm(c, "__sentry_skip_normalization__", true); + a[n] = c; + } + return { + ...t, + contexts: a + }; + } + return t; + } + function eL(t, e, i) { + try { + const s = ["name", "message", "stack", "line", "column", "fileName", "lineNumber", "columnNumber", "toJSON"]; + const r = {}; + for (const n of Object.keys(t)) { + if (s.indexOf(n) !== -1) { + continue; + } + const o = t[n]; + r[n] = Qo(o) || typeof o == "string" ? mm(`${o}`, i) : o; + } + if (e && t.cause !== undefined) { + r.cause = Qo(t.cause) ? t.cause.toString() : t.cause; + } + if (typeof t.toJSON == "function") { + const n = t.toJSON(); + for (const o of Object.keys(n)) { + const a = n[o]; + r[o] = Qo(a) ? a.toString() : a; + } + } + return r; + } catch (s) { + if (ps) { + oi.error("Unable to extract extra data from the Error object:", s); + } + } + return null; + } + var n8; + var o8; + var tL; + var iL = g({ + "out-build/external/sentry/core/integrations/extraerrordata.js"() { + "use strict"; + + K(); + ai(); + Pt(); + n8 = "ExtraErrorData"; + o8 = (t = {}) => { + const { + depth: e = 3, + captureErrorCause: i = true + } = t; + return { + name: n8, + processEvent(s, r, n) { + const { + maxValueLength: o = 250 + } = n.getOptions(); + return QO(s, r, e, i, o); + } + }; + }; + tL = o8; + } + }); + function sL({ + isBrowser: t, + root: e, + prefix: i + }) { + return s => { + if (!s.filename) { + return s; + } + const r = /^[a-zA-Z]:\\/.test(s.filename) || s.filename.includes("\\") && !s.filename.includes("/"); + const n = /^\//.test(s.filename); + if (t) { + if (e) { + const o = s.filename; + if (o.indexOf(e) === 0) { + s.filename = o.replace(e, i); + } + } + } else if (r || n) { + const o = r ? s.filename.replace(/^[a-zA-Z]:/, "").replace(/\\/g, "/") : s.filename; + const a = e ? nR(e, o) : oR(o); + s.filename = `${i}${a}`; + } + return s; + }; + } + var a8; + var rL; + var nL = g({ + "out-build/external/sentry/core/integrations/rewriteframes.js"() { + "use strict"; + + K(); + ai(); + a8 = "RewriteFrames"; + rL = (t = {}) => { + const e = t.root; + const i = t.prefix || "app:///"; + const s = "window" in yt && yt.window !== undefined; + const r = t.iteratee || sL({ + isBrowser: s, + root: e, + prefix: i + }); + function n(a) { + try { + return { + ...a, + exception: { + ...a.exception, + values: a.exception.values.map(c => ({ + ...c, + ...(c.stacktrace && { + stacktrace: o(c.stacktrace) + }) + })) + } + }; + } catch { + return a; + } + } + function o(a) { + return { + ...a, + frames: a && a.frames && a.frames.map(c => r(c)) + }; + } + return { + name: a8, + processEvent(a) { + let c = a; + if (a.exception && Array.isArray(a.exception.values)) { + c = n(c); + } + return c; + } + }; + }; + } + }); + var c8; + var l8; + var oL; + var aL = g({ + "out-build/external/sentry/core/integrations/sessiontiming.js"() { + "use strict"; + + K(); + ai(); + c8 = "SessionTiming"; + l8 = () => { + const t = Ld() * 1000; + return { + name: c8, + processEvent(e) { + const i = Ld() * 1000; + return { + ...e, + extra: { + ...e.extra, + "session:start": t, + "session:duration": i - t, + "session:end": i + } + }; + } + }; + }; + oL = l8; + } + }); + function cL(t) { + return Qo(t) && t.name === "ZodError" && Array.isArray(t.errors); + } + function lL(t) { + return { + ...t, + path: "path" in t && Array.isArray(t.path) ? t.path.join(".") : undefined, + keys: "keys" in t ? JSON.stringify(t.keys) : undefined, + unionErrors: "unionErrors" in t ? JSON.stringify(t.unionErrors) : undefined + }; + } + function uL(t) { + const e = new Set(); + for (const s of t.issues) { + if (s.path && s.path[0]) { + e.add(s.path[0]); + } + } + const i = Array.from(e); + return `Failed to validate keys: ${mm(i.join(", "), 100)}`; + } + function hL(t, e, i) { + if (!e.exception || !e.exception.values || !i || !i.originalException || !cL(i.originalException) || i.originalException.issues.length === 0) { + return e; + } else { + return { + ...e, + exception: { + ...e.exception, + values: [{ + ...e.exception.values[0], + value: uL(i.originalException) + }, ...e.exception.values.slice(1)] + }, + extra: { + ...e.extra, + "zoderror.issues": i.originalException.errors.slice(0, t).map(lL) + } + }; + } + } + var u8; + var h8; + var d8; + var dL; + var fL = g({ + "out-build/external/sentry/core/integrations/zoderrors.js"() { + "use strict"; + + K(); + ai(); + u8 = 10; + h8 = "ZodErrors"; + d8 = (t = {}) => { + const e = t.limit || u8; + return { + name: h8, + processEvent(i, s) { + return hL(e, i, s); + } + }; + }; + dL = d8; + } + }); + function pL(t) { + const e = Em(t); + if (e) { + return e.filter(i => !!i.filename).map(i => i.module_metadata ? Object.keys(i.module_metadata).filter(s => s.startsWith(zm)).map(s => s.slice(zm.length)) : []); + } + } + var gL; + var zm; + var mL = g({ + "out-build/external/sentry/core/integrations/third-party-errors-filter.js"() { + "use strict"; + + K(); + ai(); + G9(); + gL = t => ({ + name: "ThirdPartyErrorsFilter", + setup(e) { + e.on("beforeEnvelope", i => { + Am(i, (s, r) => { + if (r === "event") { + const n = Array.isArray(s) ? s[1] : undefined; + if (n) { + V9(n); + s[1] = n; + } + } + }); + }); + e.on("applyFrameMetadata", i => { + if (i.type) { + return; + } + const s = e.getOptions().stackParser; + H9(s, i); + }); + }, + processEvent(e) { + const i = pL(e); + if (i) { + const s = t.behaviour === "drop-error-if-contains-third-party-frames" || t.behaviour === "apply-tag-if-contains-third-party-frames" ? "some" : "every"; + if (i[s](n => !n.some(o => t.filterKeys.includes(o)))) { + if (t.behaviour === "drop-error-if-contains-third-party-frames" || t.behaviour === "drop-error-if-exclusively-contains-third-party-frames") { + return null; + } + e.tags = { + ...e.tags, + third_party_code: true + }; + } + } + return e; + } + }); + zm = "_sentryBundlerPluginAppKey:"; + } + }); + var f8; + var p8; + var g8; + var m8; + var Hd = g({ + "out-build/external/sentry/core/metrics/constants.js"() { + "use strict"; + + f8 = "c"; + p8 = "g"; + g8 = "s"; + m8 = "d"; + } + }); + var w8 = g({ + "out-build/external/sentry/core/metrics/exports.js"() { + "use strict"; + + K(); + st(); + Pt(); + oa(); + Mm(); + Zt(); + Hd(); + } + }); + var wL = g({ + "out-build/external/sentry/core/profiling.js"() { + "use strict"; + + K(); + st(); + Pt(); + } + }); + function vL(t) { + let e = 0; + for (let i = 0; i < t.length; i++) { + const s = t.charCodeAt(i); + e = (e << 5) - e + s; + e &= e; + } + return e >>> 0; + } + var Vd = g({ + "out-build/external/sentry/core/metrics/utils.js"() { + "use strict"; + + K(); + } + }); + var v8 = g({ + "out-build/external/sentry/core/metrics/envelope.js"() { + "use strict"; + + K(); + Vd(); + } + }); + var b8; + var y8; + var S8; + var E8; + var bL; + var k8 = g({ + "out-build/external/sentry/core/metrics/instance.js"() { + "use strict"; + + Hd(); + Vd(); + b8 = class { + constructor(t) { + this._value = t; + } + get weight() { + return 1; + } + add(t) { + this._value += t; + } + toString() { + return `${this._value}`; + } + }; + y8 = class { + constructor(t) { + this._last = t; + this._min = t; + this._max = t; + this._sum = t; + this._count = 1; + } + get weight() { + return 5; + } + add(t) { + this._last = t; + if (t < this._min) { + this._min = t; + } + if (t > this._max) { + this._max = t; + } + this._sum += t; + this._count++; + } + toString() { + return `${this._last}:${this._min}:${this._max}:${this._sum}:${this._count}`; + } + }; + S8 = class { + constructor(t) { + this._value = [t]; + } + get weight() { + return this._value.length; + } + add(t) { + this._value.push(t); + } + toString() { + return this._value.join(":"); + } + }; + E8 = class { + constructor(t) { + this.first = t; + this._value = new Set([t]); + } + get weight() { + return this._value.size; + } + add(t) { + this._value.add(t); + } + toString() { + return Array.from(this._value).map(t => typeof t == "string" ? vL(t) : t).join(":"); + } + }; + bL = { + [f8]: b8, + [p8]: y8, + [m8]: S8, + [g8]: E8 + }; + } + }); + var yL = g({ + "out-build/external/sentry/core/metrics/aggregator.js"() { + "use strict"; + + K(); + Zt(); + Hd(); + v8(); + k8(); + Vd(); + } + }); + var SL = g({ + "out-build/external/sentry/core/metrics/exports-default.js"() { + "use strict"; + + yL(); + w8(); + } + }); + var EL = g({ + "out-build/external/sentry/core/metrics/browser-aggregator.js"() { + "use strict"; + + K(); + Zt(); + Hd(); + v8(); + k8(); + Vd(); + } + }); + var kL = g({ + "out-build/external/sentry/core/fetch.js"() { + "use strict"; + + K(); + st(); + Ns(); + oa(); + Ud(); + ra(); + Zt(); + } + }); + var xL = g({ + "out-build/external/sentry/core/trpc.js"() { + "use strict"; + + K(); + st(); + dl(); + Ns(); + oa(); + } + }); + var DL = g({ + "out-build/external/sentry/core/feedback.js"() { + "use strict"; + + K(); + st(); + } + }); + var PL = g({ + "out-build/external/sentry/core/getCurrentHubShim.js"() { + "use strict"; + + L9(); + st(); + dl(); + } + }); + var $L = g({ + "out-build/external/sentry/core/index.js"() { + "use strict"; + + oa(); + Ns(); + Wm(); + dl(); + st(); + g9(); + ul(); + On(); + Wd(); + A9(); + ll(); + D9(); + jm(); + _9(); + hO(); + dO(); + fO(); + pO(); + gO(); + ai(); + P9(); + Tm(); + R9(); + ra(); + mO(); + Mm(); + wO(); + Zt(); + Nm(); + vO(); + O9(); + bO(); + Bd(); + L9(); + SO(); + OO(); + MO(); + TO(); + BO(); + HO(); + GO(); + XO(); + iL(); + nL(); + aL(); + fL(); + mL(); + w8(); + wL(); + SL(); + EL(); + Om(); + kL(); + xL(); + DL(); + PL(); + K(); + } + }); + function x8(t) { + let e; + const i = []; + let s; + Am(t, (r, n) => { + if (n === "event" || n === "transaction" || n === "feedback") { + e = Array.isArray(r) ? r[1] : undefined; + } else if (n === "attachment") { + const [o, a] = r; + i.push({ + filename: o.filename, + attachmentType: o.attachment_type, + contentType: o.content_type, + data: a + }); + } else if (n === "profile") { + s = r[1]; + } + }); + if (e) { + return [e, i, s]; + } else { + return undefined; + } + } + var IL = g({ + "out-build/external/sentry/electron/common/envelope.js"() { + "use strict"; + + K(); + } + }); + var Hm = g({ + "out-build/vs/platform/tracing/common/sentry.js"() { + "use strict"; + + $L(); + Ns(); + IL(); + Cm(); + ym(); + ol(); + e9(); + } + }); + function AL(t, e) { + return e.onProcessConfigUpdate(i => { + qt().enabled = i.enabled; + qt().loggerSampleRate = i.loggerSampleRate; + qt().tracesSampleRate = i.tracesSampleRate; + qt().profilesSampleRate = i.profilesSampleRate; + qt().jsonStringifySampleRate = i.jsonStringifySampleRate; + }); + } + function CL(t, e, i = uR(64)) { + const s = { + flush: n => i.drain(n), + send: n => i.add(() => e.sendEnvelope(t, n)).then(o => ({ + statusCode: 200 + }), o => { + if (o instanceof bm) { + return {}; + } + throw o; + }) + }; + const r = qt().buffer; + for (const n of r) { + s.send(n); + } + qt().buffer = []; + qt().transport = s; + return T.None; + } + function _L(t, e) { + if (t === "main") { + return T.None; + } + const i = s => { + const r = {}; + if (s.breadcrumbs.length > 0) { + r.breadcrumbs = s.breadcrumbs; + } + if (Object.keys(r).length > 0) { + e.sendScopeUpdate(t, r); + } + }; + Wr().addScopeListener(s => { + i(s.getScopeData()); + Wr().clearBreadcrumbs(); + }); + i(Wr().getScopeData()); + Wr().clearBreadcrumbs(); + return T.None; + } + function RL(t, e) { + const i = new De(); + i.add(AL(t, e)); + i.add(CL(t, e)); + i.add(_L(t, e)); + return i; + } + var OL = g({ + "out-build/vs/platform/tracing/common/register.js"() { + "use strict"; + + M(); + va(); + Hm(); + } + }); + var D8; + var LL = g({ + "out-build/vs/platform/tracing/node/rateLimiter.js"() { + "use strict"; + + D8 = class { + constructor(t) { + this.c = t; + this.a = new Map(); + this.b = this.d(); + } + increment(t, e = 1) { + const i = this.d(); + if (i !== this.b) { + this.a.clear(); + this.b = i; + } + const r = (this.a.get(t) ?? 0) + e; + this.a.set(t, r); + return r; + } + d() { + return Math.floor(Date.now() / this.c); + } + }; + } + }); + import { app as ML, webContents as Vm } from "electron"; + import ci from "fs"; + import FL from "node-fetch"; + import { tmpdir as P8 } from "os"; + import Fn from "path"; + var fl; + var Gd; + var NL = g({ + "out-build/vs/platform/tracing/electron-main/tracingService.js"() { + "use strict"; + + B(); + M(); + $i(); + Ri(); + X(); + ht(); + Lt(); + va(); + OL(); + Hm(); + LL(); + Gd = class extends T { + static { + fl = this; + } + static { + this.a = { + errorRateLimit: 10, + jsonStringifySampleRate: 0, + loggerSampleRate: 1, + minidumpSampleRate: 1, + performanceUnitRateLimit: 100, + profilesSampleRate: 0, + tracesSampleRate: 0.01, + globalSampleRate: 1 + }; + } + static { + this.b = 64; + } + static { + this.c = 128; + } + constructor(e, i, s, r) { + super(); + this.y = e; + this.z = i; + this.C = s; + this.F = r; + this.f = []; + this.g = { + ...fl.a + }; + this.h = null; + this.j = null; + this.m = null; + this.n = null; + this.q = null; + this.r = new Map(); + this.s = []; + this.t = new Da(100); + this.u = new D8(60000); + this.w = new $(); + this.onProcessConfigUpdate = this.w.event; + this.H().then(() => this.D(RL("main", this))).catch(n => this.z.error("TracingService: failed to initialize transport", n)); + } + async captureAndSendDebuggingData(e, i) { + const s = i.uploadUrl ?? this.h; + if (s === null || s === "") { + this.z.warn("TracingService: no upload url found"); + return; + } + const r = (await import("archiver")).default; + const n = P8(); + const o = i.rendererHeapSnapshotFile ?? Fn.join(n, `renderer-${e}-${Date.now()}.heapsnapshot`); + if (i.rendererHeapSnapshotFile === undefined && this.j === false) { + const l = Vm.getAllWebContents().filter(u => u.getOSProcessId() === e)[0]; + if (l !== undefined) { + try { + this.z.info("TracingService: taking heap snapshot"); + await l.takeHeapSnapshot(o); + } catch (u) { + this.z.warn("TracingService: failed to take heap snapshot", u); + } + } + } + const a = Fn.join(n, `metadata-${Date.now()}.json`); + this.z.info("TracingService: writing metadata file"); + try { + await ci.promises.writeFile(a, JSON.stringify({ + debuggerEvent: i.debuggerEvent, + debuggerScripts: i.debuggerScripts, + heapStatistics: i.rendererHeapStatistics, + sentryTraceId: this.j === false ? Mn().getPropagationContext().traceId : undefined, + version: this.C.version, + workspaceId: this.j === false ? i.workspaceId : undefined + }, null, 2)); + } catch (l) { + this.z.warn("TracingService: failed to write metadata file", l); + } + const c = Fn.join(n, `debugging-data-${Date.now()}.zip`); + try { + this.z.info("TracingService: creating debugging data zip"); + await new Promise((l, u) => { + const d = r("zip"); + const f = ci.createWriteStream(c); + f.on("close", () => l()); + d.on("error", y => u(y)); + d.pipe(f); + if (this.j === false && ci.existsSync(o)) { + d.file(o, { + name: "snapshots/renderer.heapsnapshot" + }); + } + const p = ML.getPath("userData"); + const w = Fn.join(p, "logs"); + if (ci.existsSync(w)) { + const y = ci.readdirSync(w).sort().pop(); + if (y !== undefined) { + d.directory(Fn.join(w, y), "logs"); + } + } + const m = Fn.join(p, "User"); + if (this.j === false && ci.existsSync(m)) { + d.directory(m, "user"); + } + if (ci.existsSync(a)) { + d.file(a, { + name: "metadata.json" + }); + } + d.finalize(); + }); + } catch (l) { + this.z.warn("TracingService: failed to create debugging data zip", l); + } + try { + this.z.info("TracingService: uploading debugging data"); + const l = ci.createReadStream(c); + if ((await FL(s, { + method: "PUT", + body: l, + headers: { + "Content-Length": ci.statSync(c).size.toString() + } + })).ok) { + this.z.info("TracingService: successfully uploaded debugging data"); + } + } catch (l) { + this.z.warn("TracingService: failed to upload debugging data", l); + } + if (ci.existsSync(o)) { + await ci.promises.unlink(o); + } + if (ci.existsSync(c)) { + await ci.promises.unlink(c); + } + if (ci.existsSync(a)) { + await ci.promises.unlink(a); + } + } + getIsWatchingForCrashes() { + return Promise.resolve(this.r.size > 0); + } + async sendEnvelope(e, i) { + if (this.j === null) { + if (this.f.length < fl.b) { + this.f.push([e, i]); + } + return; + } + if (e === "main") { + return this.J(i); + } else { + return this.I(e, i); + } + } + async sendScopeUpdate(e, i) { + if (e === "main") { + this.z.warn("TracingService: unexpected scope update from main"); + return; + } + const s = Wr(); + if (i.breadcrumbs !== undefined) { + i.breadcrumbs.forEach(r => s?.addBreadcrumb(r)); + } + } + async setClientTracingConfig(e) { + this.g = { + globalSampleRate: Math.min(1, Math.max(0, e.globalSampleRate)), + tracesSampleRate: Math.min(1, Math.max(0, e.tracesSampleRate)), + loggerSampleRate: Math.min(1, Math.max(0, e.loggerSampleRate)), + minidumpSampleRate: Math.min(1, Math.max(0, e.minidumpSampleRate)), + errorRateLimit: Math.max(0, e.errorRateLimit), + performanceUnitRateLimit: Math.max(0, e.performanceUnitRateLimit), + profilesSampleRate: Math.min(1, Math.max(0, e.profilesSampleRate)), + jsonStringifySampleRate: Math.min(1, Math.max(0, e.jsonStringifySampleRate)) + }; + this.z.debug(`TracingService: set client tracing config to ${JSON.stringify(this.g)}`); + this.G(); + } + async setDebuggingDataUploadUrl(e) { + this.h = e; + } + async setIsPrivacyMode(e) { + const i = this.j; + this.j = e; + if (this.f.length > 0) { + this.z.debug(`TracingService: flushing buffer with ${this.f.length} items`); + this.f.forEach(([s, r]) => this.sendEnvelope(s, r)); + this.f = []; + } + if (i !== this.j) { + this.z.debug(`TracingService: set is privacy mode to ${e}`); + this.G(); + } + } + async setUser(e, i) { + const s = this.n; + const r = this.q; + this.n = e; + this.q = i; + if (this.n !== null || this.q !== null) { + Wr().setUser({ + email: this.n ?? undefined, + id: this.q ?? undefined + }); + } else { + Wr().setUser(null); + } + if (s !== this.n || r !== this.q) { + this.z.debug(`TracingService: set user to ${JSON.stringify(Wr()?.getUser())}`); + } + } + async toggleWatchForCrashes() { + if (this.r.size > 0) { + this.U(); + return false; + } else { + this.S(); + return true; + } + } + G() { + const e = { + enabled: this.j !== true ? this.g.globalSampleRate > 0 : false, + loggerSampleRate: this.j !== true ? this.g.loggerSampleRate : 0, + tracesSampleRate: this.j !== true ? this.g.tracesSampleRate : 0, + profilesSampleRate: this.j !== true ? this.g.profilesSampleRate : 0, + jsonStringifySampleRate: this.j !== true ? this.g.jsonStringifySampleRate : 0 + }; + this.w.fire(e); + this.z.debug(`TracingService: fired process config update ${JSON.stringify(e)}`); + } + async H() { + if (this.m !== null) { + return; + } + const e = hl()?.getDsn(); + if (e === undefined) { + this.z.warn("TracingService: no dsn found"); + return; + } + const i = qt().sentry.makeElectronOfflineTransport; + if (i === undefined || typeof i != "function") { + this.z.warn("TracingService: transport constructor is not available"); + return; + } + this.m = i()({ + bufferSize: fl.c, + url: uO(e, hl()?.getOptions().tunnel, hl()?.getSdkMetadata()?.sdk), + recordDroppedEvent: (s, r) => { + this.z.debug(`TracingService: dropped ${r} event due to ${s}`); + } + }); + this.z.debug("TracingService: created transport"); + } + I(e, i) { + const s = x8(i); + if (s === undefined) { + this.z.warn("TracingService: dropping unsupported envelope"); + return; + } + const [r, n, o] = s; + delete r.environment; + delete r.sdk?.name; + delete r.sdk?.version; + delete r.sdk?.packages; + r.tags = { + ...r.tags, + "event.process": e + }; + if (r.event_id !== undefined && o !== undefined) { + this.t.set(r.event_id, o); + } + Mn()?.captureEvent(r, { + attachments: n + }); + } + J(e) { + const i = x8(e); + if (i === undefined) { + return this.P(e); + } + const [s, r] = i; + if (this.L(s, r)) { + return; + } + const n = s.tags?.["event.process"]; + if (n === undefined || n === "browser") { + s.tags = { + ...s.tags, + "event.process": "main" + }; + } + if (s.event_id !== undefined) { + const o = this.t.get(s.event_id); + if (o !== undefined) { + this.t.remove(s.event_id); + e = IR(e, [{ + type: "profile" + }, o]); + } + } + this.P(e); + } + L(e, i) { + if (this.j !== false && !i.some(s => s.attachmentType === "event.minidump") && this.C.applicationName !== "cursor-nightly") { + return true; + } + if (e.exception?.values !== undefined) { + for (const s of e.exception.values) { + if (this.M(s)) { + return true; + } + } + } + for (const s of i) { + if (this.N(s)) { + return true; + } + } + return this.O(e); + } + M(e) { + return false; + } + N(e) { + if (e.attachmentType === "event.minidump") { + return Math.random() >= this.g.minidumpSampleRate; + } else { + return false; + } + } + O(e) { + const i = this.g.errorRateLimit; + const s = this.g.performanceUnitRateLimit; + if (e.type === "transaction") { + return this.u.increment("performanceUnit", 1) > s; + } else { + return this.u.increment("error", 1) > i; + } + } + P(e) { + if (this.j !== false) { + return; + } + const i = this.g.globalSampleRate; + if (i <= 0 || i < 1 && Math.random() >= i) { + this.z.debug("TracingService: dropping envelope due to global sample rate"); + return; + } + this.m?.send(e); + } + async Q(e) { + const i = Vm.fromId(e); + if (i === undefined || i.getType() !== "window") { + return; + } + const s = i.debugger; + if (s.isAttached()) { + return; + } + const r = []; + this.r.set(i.id, r); + this.z.debug(`TracingService: watching renderer process ${e}`); + const n = i.getOSProcessId(); + const o = Fn.join(P8(), `renderer-${n}-${Date.now()}.heapsnapshot`); + const a = []; + const c = f => { + if (f.reason !== "OOM") { + this.z.debug("TracingService: ignoring non-OOM debugger pause", f); + if (!i.isDevToolsOpened()) { + s.sendCommand("Debugger.resume").catch(() => {}); + } + return; + } + this.z.info("TracingService: paused renderer before crash"); + if (this.j !== false) { + this.captureAndSendDebuggingData(i.getOSProcessId(), { + debuggerEvent: f, + debuggerScripts: a + }).catch(() => {}); + return; + } + this.z.info("TracingService: taking heap snapshot"); + s.sendCommand("HeapProfiler.takeHeapSnapshot").catch(() => {}).finally(() => { + if (!i.isDevToolsOpened()) { + s.sendCommand("Debugger.resume").catch(() => {}); + } + setTimeout(() => { + this.captureAndSendDebuggingData(i.getOSProcessId(), { + debuggerEvent: f, + debuggerScripts: a, + rendererHeapSnapshotFile: o + }).catch(() => {}); + }, 1000); + }); + }; + const l = f => { + a.push({ + scriptId: f?.scriptId, + url: f?.url + }); + }; + const u = f => { + ci.appendFileSync(o, f.chunk); + }; + s.attach(); + r.push({ + dispose: () => s.detach() + }); + this.z.debug(`TracingService: attached to renderer process ${e}`); + const d = (f, p, w) => { + switch (p) { + case "Debugger.paused": + c(w); + break; + case "Debugger.scriptParsed": + l(w); + break; + case "HeapProfiler.addHeapSnapshotChunk": + u(w); + break; + } + }; + s.on("message", d); + r.push({ + dispose: () => s.removeListener("message", d) + }); + await s.sendCommand("Debugger.enable"); + await s.sendCommand("Debugger.setPauseOnExceptions", { + state: "none" + }); + r.push({ + dispose: () => s.sendCommand("Debugger.disable").catch(() => {}) + }); + this.z.debug(`TracingService: enabled debugger for renderer process ${e}`); + } + async R(e) { + const i = this.r.get(e); + if (i !== undefined) { + while (i.length > 0) { + i.pop()?.dispose(); + } + this.r.delete(e); + this.z.debug(`TracingService: unwatching renderer process ${e}`); + } + } + S() { + this.s.push(this.F.onDidChangeWindowsCount(() => { + const e = new Set(this.F.getWindows().map(i => i.id)); + for (const i of [...this.r.keys()]) { + if (!e.has(i)) { + this.R(i).catch(() => {}); + } + } + for (const i of e) { + if (!this.r.has(i)) { + this.Q(i).catch(() => {}); + } + } + })); + this.F.getWindows().forEach(e => { + this.Q(e.id).catch(() => {}); + }); + } + U() { + this.s.forEach(e => e.dispose()); + this.s = []; + for (const e of [...this.r.keys()]) { + this.R(e).catch(() => {}); + } + } + async attemptGarbageCollection(e) { + const i = Vm.getAllWebContents().find(r => r.getOSProcessId() === e); + if (!i) { + this.z.warn(`[TracingService] attemptGarbageCollection: Could not find webContents for pid ${e}`); + return; + } + const s = i.debugger; + if (!s.isAttached()) { + this.z.trace(`[TracingService] attemptGarbageCollection: Debugger not attached for pid ${e}, cannot trigger GC.`); + return; + } + try { + this.z.trace(`[TracingService] attemptGarbageCollection: Sending HeapProfiler.collectGarbage command to pid ${e}`); + await s.sendCommand("HeapProfiler.collectGarbage"); + this.z.trace(`[TracingService] attemptGarbageCollection: Command sent successfully for pid ${e}`); + } catch (r) { + this.z.warn(`[TracingService] attemptGarbageCollection: Error sending command for pid ${e}:`, r); + } + } + }; + Gd = fl = __decorate([__param(0, Yi), __param(1, V), __param(2, Ve), __param(3, dt)], Gd); + } + }); + var Gm; + var WL = g({ + "out-build/vs/platform/tracing/common/tracingService.js"() { + "use strict"; + + Y(); + Gm = q("tracingService"); + } + }); + var Jm; + var TL = g({ + "out-build/vs/platform/abuse/common/abuseService.js"() { + "use strict"; + + Y(); + Jm = q("abuseService"); + } + }); + var Jd; + var jL = g({ + "out-build/vs/platform/abuse/node/abuseService.js"() { + "use strict"; + + _c(); + xt(); + Jd = class { + constructor(e) { + this.c = e; + this.d().then(i => this.a = i).catch(() => {}); + this.e().then(i => this.b = i).catch(() => {}); + } + async getMachineId() { + return this.a ?? this.c.machineId; + } + async getMacMachineId() { + return this.b ?? this.c.macMachineId; + } + async d() { + let e; + try { + e = await P2(true); + } catch { + return; + } + try { + return (await import("crypto")).createHash("sha256").update(e, "utf8").digest("hex"); + } catch { + return; + } + } + async e() { + return D2(() => {}); + } + }; + Jd = __decorate([__param(0, Ot)], Jd); + } + }); + var $8; + var Kd; + var UL = g({ + "out-build/vs/platform/extensionManagement/node/extensionSignatureVerificationService.js"() { + "use strict"; + + $e(); + Y(); + X(); + xt(); + Vu(); + $8 = q("IExtensionSignatureVerificationService"); + Kd = class { + constructor(e, i) { + this.b = e; + this.c = i; + } + d() { + this.a ||= this.f(); + return this.a; + } + async f() { + return import("@vscode/vsce-sign"); + } + async verify(e, i, s, r, n) { + let o; + try { + o = await this.d(); + } catch (u) { + this.b.error("Could not load vsce-sign module", Vi(u)); + this.b.info(`Extension signature verification is not done: ${e}`); + return; + } + const a = new Date().getTime(); + let c; + try { + this.b.trace(`Verifying extension signature for ${e}...`); + c = await o.verify(s, r, this.b.getLevel() === J.Trace); + } catch (u) { + c = { + code: $1.UnknownError, + didExecute: false, + output: Vi(u) + }; + } + const l = new Date().getTime() - a; + this.b.info(`Extension signature verification result for ${e}: ${c.code}. Executed: ${c.didExecute}. Duration: ${l}ms.`); + this.b.trace(`Extension signature verification output for ${e}: + ${c.output}`); + this.c.publicLog2("extensionsignature:verification", { + extensionId: e, + extensionVersion: i, + code: c.code, + internalCode: c.internalCode, + duration: l, + didExecute: c.didExecute, + clientTargetPlatform: n + }); + return { + code: c.code + }; + } + }; + Kd = __decorate([__param(0, V), __param(1, Ot)], Kd); + } + }); + import aa from "fs"; + import { tmpdir as BL } from "os"; + import Km from "path"; + import { createGzip as qL } from "zlib"; + var I8; + var Zd; + var zL = g({ + "out-build/vs/platform/continuousProfiling/electron-main/continuousProfilingService.js"() { + "use strict"; + + B(); + M(); + _i(); + Ri(); + X(); + ht(); + Lt(); + Wg(); + I8 = class { + constructor(t, e, i, s, r, n) { + this.captureId = t; + this.targetId = e; + this.profileTypes = i; + this.processType = s; + this.startTime = Date.now(); + this.duration = r; + this.profileConfig = n; + } + hasConflictWith(t, e) { + if (this.targetId !== t) { + return false; + } else { + return e.some(i => this.profileTypes.includes(i)); + } + } + getDescription() { + return `Profile ${this.captureId} (target: ${this.targetId}, types: ${this.profileTypes.join(", ")}, duration: ${this.duration}s)`; + } + }; + Zd = class extends T { + constructor(e, i, s, r) { + super(); + this.f = e; + this.g = i; + this.h = s; + this.j = r; + this.a = false; + this.b = new Map(); + this.c = new $(); + this.onProfileCaptureStatusChange = this.c.event; + this.g.debug("ContinuousProfilingMainService: initialized in main process"); + } + async captureProfile(e) { + if (this.a) { + this.g.debug("ContinuousProfilingMainService: skipping profile capture due to privacy mode"); + return ""; + } + const i = this.m(e.profileConfig); + if (i.length === 0) { + this.g.warn(`ContinuousProfilingMainService: No profile types (CPU or Heap) configured for capture. (captureId: ${e.captureId})`); + return ""; + } + const s = e.captureId ?? ti(); + let r; + let n; + let o; + try { + if (e.processType === "renderer") { + if (typeof e.windowId != "number") { + throw new Error("windowId must be provided for renderer profiling"); + } + const u = this.j.getWindowById(e.windowId); + if (!u?.win?.webContents) { + throw new Error(`Could not find webContents for windowId ${e.windowId}`); + } + r = u.win.webContents; + n = r.id; + o = u.remoteAuthority ? Bh(u.remoteAuthority) : undefined; + } else { + throw e.processType === "main" ? new Error("Main process profiling not yet implemented") : new Error(`Unknown process type: ${e.processType}`); + } + if (!r || typeof n != "number") { + throw new Error("Target webContents could not be determined."); + } + let a = false; + if (r.debugger.isAttached()) { + this.g.debug(`ContinuousProfilingMainService: Debugger already attached to target ${n}. Reusing existing attachment for capture ${s}.`); + a = false; + } else { + try { + r.debugger.attach("1.3"); + a = true; + this.g.debug(`ContinuousProfilingMainService: Successfully attached debugger to target ${n} for capture ${s}.`); + } catch (u) { + const d = `Failed to attach debugger to target ${n} for capture ${s}. Error: ${u.message}`; + this.g.debug(`ContinuousProfilingMainService: ${d}`); + this.c.fire({ + state: "error", + captureId: s, + error: d, + cause: "DEBUGGER_ATTACH_FAILED" + }); + return ""; + } + } + this.g.debug(`ContinuousProfilingMainService: starting profile capture ${s} (types: ${i.join(", ")}, targetId: ${n}, duration: ${e.duration}s)`); + const c = new I8(s, n, i, e.processType, e.duration, e.profileConfig); + this.b.set(s, c); + this.g.debug(`ContinuousProfilingMainService: Created session for ${c.getDescription()}`); + const l = { + state: "started", + captureId: s + }; + this.c.fire(l); + e._internals = { + didAttachDebugger: a + }; + await this.n(s, r, e, o); + return s; + } catch (a) { + this.g.debug(`ContinuousProfilingMainService: failed to capture profile ${s}`, a); + const c = { + state: "error", + captureId: s, + error: String(a) + }; + this.c.fire(c); + this.r(s); + if (r?.debugger.isAttached()) { + try { + r.debugger.detach(); + } catch {} + } + return s; + } + } + async setIsPrivacyMode(e) { + this.a = e; + this.g.debug(`ContinuousProfilingMainService: set privacy mode to ${e}`); + } + async cancelProfile(e, i = "Canceled by user or configuration change") { + const s = this.b.get(e); + if (!s) { + this.g.debug(`ContinuousProfilingMainService: No active profile found for ID ${e} during cancellation`); + return; + } + this.g.debug(`ContinuousProfilingMainService: Canceling ${s.getDescription()} with reason: ${i}`); + let r = false; + const n = this.j.getWindows().flatMap(c => c.win?.webContents).find(c => c && !c.isDestroyed() && c.id === s.targetId); + if (n && n.debugger.isAttached()) { + try { + n.debugger.detach(); + r = true; + this.g.debug(`ContinuousProfilingMainService: Detached debugger during cancel for session ${e}.`); + } catch (c) { + this.g.warn(`ContinuousProfilingMainService: Failed to detach debugger during cancel for session ${e}`, c); + } + } else { + this.g.debug(`ContinuousProfilingMainService: Target webContents ${s.targetId} not found or debugger not attached during cancel for session ${e}.`); + } + const o = this.r(e); + this.g.debug(`ContinuousProfilingMainService: Session entry for ${e} removed during cancel: ${o}. Debugger detached: ${r}.`); + const a = { + state: "canceled", + captureId: e, + reason: i + }; + this.c.fire(a); + } + async cancelAllProfiles() { + const e = Array.from(this.b.values()); + if (e.length !== 0) { + this.g.debug(`ContinuousProfilingMainService: Canceling all ${e.length} active profiles`); + for (const i of e) { + await this.cancelProfile(i.captureId); + } + } + } + m(e) { + const i = []; + if (e.cpu) { + i.push("cpu"); + } + if (e.heap) { + i.push("heap"); + } + return i; + } + async n(e, i, s, r) { + const n = i.id; + const o = this.b.get(e); + const a = s._internals?.didAttachDebugger ?? false; + if (!o) { + this.g.warn(`ContinuousProfilingMainService: No session found for ${e} at start of _captureAndCompressProfile. Attempting cleanup.`); + if (a && i.debugger.isAttached()) { + try { + i.debugger.detach(); + } catch (u) { + this.g.warn(`Cleanup detach failed: ${u}`); + } + } + return; + } + const c = Km.join(BL(), `vscode-profile-${e}`); + const l = []; + try { + await aa.promises.mkdir(c, { + recursive: true + }); + if (o.profileConfig.cpu) { + const d = Km.join(c, "profile.cpuprofile"); + await i.debugger.sendCommand("Profiler.enable"); + const f = o.profileConfig.cpu.interval ?? 1000; + await i.debugger.sendCommand("Profiler.setSamplingInterval", { + interval: f + }); + await i.debugger.sendCommand("Profiler.start"); + this.g.debug(`ContinuousProfilingMainService: CPU Profiler started on wc ${i.id}, duration ${o.duration}s`); + l.push({ + type: "cpu", + file: d + }); + } + if (o.profileConfig.heap) { + const d = Km.join(c, "profile.heapprofile"); + await i.debugger.sendCommand("HeapProfiler.enable"); + const f = o.profileConfig.heap.samplingInterval ?? 32768; + const p = o.profileConfig.heap.includeObjectsCollectedByMajorGC ?? false; + const w = o.profileConfig.heap.includeObjectsCollectedByMinorGC ?? false; + await i.debugger.sendCommand("HeapProfiler.startSampling", { + samplingInterval: f, + includeObjectsCollectedByMajorGC: p, + includeObjectsCollectedByMinorGC: w + }); + this.g.debug(`ContinuousProfilingMainService: Heap Profiler started on wc ${i.id}, duration ${o.duration}s, samplingInterval: ${f}`); + l.push({ + type: "heap", + file: d + }); + } + if (l.length === 0) { + throw new Error("No profile types configured for capture"); + } + await new Promise(d => setTimeout(d, o.duration * 1000)); + if (i.isDestroyed()) { + this.g.warn(`ContinuousProfilingMainService: Target webContents ${n} destroyed before profile ${e} could be stopped/saved.`); + } else { + for (const d of l) { + if (d.type === "cpu") { + try { + const f = await i.debugger.sendCommand("Profiler.stop"); + await i.debugger.sendCommand("Profiler.disable"); + this.g.debug(`ContinuousProfilingMainService: CPU Profiler stopped on wc ${n}`); + await aa.promises.writeFile(d.file, JSON.stringify(f.profile)); + this.g.debug(`ContinuousProfilingMainService: CPU Profile saved to ${d.file}`); + } catch (f) { + this.g.error(`ContinuousProfilingMainService: Error stopping/saving CPU profile for ${e}`, f); + } + } else if (d.type === "heap") { + try { + const f = await i.debugger.sendCommand("HeapProfiler.stopSampling"); + await i.debugger.sendCommand("HeapProfiler.disable"); + this.g.debug(`ContinuousProfilingMainService: Heap Profiler stopped on wc ${n}`); + await aa.promises.writeFile(d.file, JSON.stringify(f.profile)); + this.g.debug(`ContinuousProfilingMainService: Heap Profile saved to ${d.file}`); + } catch (f) { + this.g.error(`ContinuousProfilingMainService: Error stopping/saving Heap profile for ${e}`, f); + } + } + } + } + const u = []; + for (const d of l) { + try { + if (await aa.promises.stat(d.file)) { + const f = `${d.file}.gz`; + await this.q(d.file, f); + this.g.debug(`ContinuousProfilingMainService: Profile compressed to ${f}`); + u.push(f); + } else { + this.g.warn(`ContinuousProfilingMainService: Raw profile file ${d.file} not found for compression.`); + } + } catch (f) { + if (f.code !== "ENOENT") { + this.g.error(`ContinuousProfilingMainService: Error compressing profile file ${d.file}`, f); + } + } + } + for (const d of u) { + const f = { + state: "completed", + captureId: e, + filePath: d, + timestamp: Date.now(), + duration: o.duration * 1000, + profileConfig: o.profileConfig, + bcId: r + }; + this.c.fire(f); + } + } catch (u) { + this.g.debug(`ContinuousProfilingMainService: Error during profile capture ${e}`, u); + const d = { + state: "error", + captureId: e, + error: String(u) + }; + this.c.fire(d); + } finally { + this.g.debug(`ContinuousProfilingMainService: Entering finally block for capture ${e}. Attempting cleanup.`); + let u = false; + if (a && !i.isDestroyed() && i.debugger.isAttached()) { + try { + i.debugger.detach(); + u = true; + this.g.debug(`ContinuousProfilingMainService: Detached debugger during cleanup for capture ${e}.`); + } catch (d) { + this.g.debug(`ContinuousProfilingMainService: Error during cleanup for capture ${e}`, d); + } + } + } + } + async q(e, i) { + return new Promise((s, r) => { + const n = qL(); + const o = aa.createReadStream(e); + const a = aa.createWriteStream(i); + o.pipe(n).pipe(a); + a.on("finish", () => { + s(); + }); + a.on("error", c => { + r(c); + }); + }); + } + r(e) { + const i = this.b.get(e); + if (i) { + const s = this.b.delete(e); + if (s) { + this.g.debug(`ContinuousProfilingMainService: Successfully ended session for ${i.getDescription()}`); + } else { + this.g.warn(`ContinuousProfilingMainService: Failed to delete session entry for ${e} after finding it.`); + } + return s; + } else { + this.g.debug(`ContinuousProfilingMainService: No active session found for ${e} during _endSession.`); + return false; + } + } + dispose() { + this.cancelAllProfiles(); + super.dispose(); + } + }; + Zd = __decorate([__param(0, Yi), __param(1, V), __param(2, Ve), __param(3, dt)], Zd); + } + }); + function HL(t, e, i, s) { + try { + const r = t.get(ot); + const n = t.get(V); + const o = t.get(Ve); + const a = t.get(dt); + const c = new Zd(r, n, o, a); + const l = ze.fromService(c, s); + e.registerChannel("continuousProfiling", l); + i.then(u => { + u.registerChannel("continuousProfiling", l); + }); + } catch (r) { + console.error("Failed to initialize continuous profiling service:", r); + } + } + var VL = g({ + "out-build/vs/platform/continuousProfiling/electron-main/initializeMain.js"() { + "use strict"; + + xs(); + zL(); + vt(); + X(); + ht(); + Lt(); + } + }); + import { app as Nn, BrowserWindow as GL, protocol as A8, session as ca, systemPreferences as C8 } from "electron"; + import { hostname as JL, release as KL } from "os"; + var Zm; + var Yd; + var ZL = g({ + "out-build/vs/code/electron-main/app.js"() { + "use strict"; + + wa(); + as(); + Ze(); + en(); + $e(); + B(); + F0(); + Sr(); + M(); + Ie(); + we(); + H(); + _e(); + se(); + _i(); + rx(); + xs(); + ox(); + zb(); + H4(); + be(); + wc(); + wD(); + Ke(); + SD(); + K1(); + y5(); + wn(); + Kb(); + eP(); + vt(); + kc(); + cg(); + yP(); + SP(); + EP(); + PP(); + jP(); + He(); + u$(); + kg(); + Ah(); + Y(); + xg(); + h$(); + Z$(); + Y$(); + Q$(); + ct(); + X(); + rI(); + Nc(); + ht(); + Sc(); + mI(); + Hg(); + Ti(); + bI(); + eh(); + X2(); + xt(); + yI(); + EI(); + $n(); + Lr(); + kI(); + $I(); + AI(); + OI(); + jI(); + T2(); + UI(); + BI(); + qI(); + zI(); + JI(); + fn(); + Lt(); + hA(); + dA(); + ri(); + sg(); + zh(); + fA(); + vn(); + Ls(); + pA(); + un(); + fd(); + G6(); + wC(); + vC(); + bC(); + ce(); + AC(); + CC(); + _C(); + zc(); + RC(); + OC(); + p7(); + NC(); + f_(); + p_(); + Ta(); + Mh(); + b_(); + ou(); + Cc(); + NL(); + WL(); + TL(); + jL(); + UL(); + VL(); + Yd = class extends T { + static { + Zm = this; + } + static { + this.a = { + [R.file]: "security.promptForLocalFileProtocolHandling", + [R.vscodeRemote]: "security.promptForRemoteFileProtocolHandling" + }; + } + constructor(e, i, s, r, n, o, a, c, l, u, d, f) { + super(); + this.g = e; + this.h = i; + this.j = s; + this.m = r; + this.n = n; + this.q = o; + this.s = a; + this.t = c; + this.u = l; + this.w = u; + this.y = d; + this.z = f; + this.C(); + this.F(); + } + C() { + const e = f => f?.startsWith(`${R.vscodeFileResource}://${za}`); + const i = f => f?.startsWith(`${R.vscodeWebview}://`); + const s = new Set(["pointerLock"]); + const r = new Set([...s, "clipboard-read", "clipboard-sanitized-write", "deprecated-sync-clipboard-read"]); + const n = new Set([...s, "media", "local-fonts", "deprecated-sync-clipboard-read"]); + ca.defaultSession.setPermissionRequestHandler((f, p, w, m) => i(m.requestingUrl) ? w(r.has(p)) : e(m.requestingUrl) ? w(n.has(p)) : w(false)); + ca.defaultSession.setPermissionCheckHandler((f, p, w, m) => i(m.requestingUrl) ? r.has(p) : e(m.requestingUrl) ? n.has(p) : false); + const o = new Set([R.file, R.vscodeFileResource, R.vscodeRemoteResource, R.vscodeManagedRemoteResource, "devtools"]); + const a = f => { + for (let p = f; p; p = p.parent) { + if (p.url.startsWith(`${R.vscodeWebview}://`)) { + return true; + } + } + return false; + }; + const c = f => f.resourceType === "xhr" || a(f.frame); + const l = f => { + const p = f.frame; + if (!p || !this.b) { + return false; + } + const w = GL.getAllWindows(); + for (const y of w) { + if (p.processId === y.webContents.mainFrame.processId) { + return true; + } + } + const m = this.b.getWindows(); + for (const y of m) { + const b = y.webContents; + if (b !== undefined && p.processId === b.mainFrame.processId) { + return true; + } + } + return false; + }; + const u = (f, p) => { + if (f.path !== "/index.html") { + return true; + } + const w = p.frame; + if (!w || !this.b) { + return false; + } + for (const m of this.b.getWindows()) { + if (m.win && w.processId === m.win.webContents.mainFrame.processId) { + return true; + } + } + return false; + }; + ca.defaultSession.webRequest.onBeforeRequest((f, p) => { + const w = P.parse(f.url); + if (w.scheme === R.vscodeWebview && !u(w, f)) { + this.m.error("Blocked vscode-webview request", f.url); + return p({ + cancel: true + }); + } else if (w.scheme === R.vscodeFileResource && !l(f)) { + this.m.error("Blocked vscode-file request", f.url); + return p({ + cancel: true + }); + } else if (w.path.endsWith(".svg") && !o.has(w.scheme)) { + return p({ + cancel: !c(f) + }); + } else { + return p({ + cancel: false + }); + } + }); + ca.defaultSession.webRequest.onHeadersReceived((f, p) => { + const w = f.responseHeaders; + const m = w["content-type"] || w["Content-Type"]; + if (m && Array.isArray(m)) { + const y = P.parse(f.url); + if (y.path.endsWith(".svg") && o.has(y.scheme)) { + w["Content-Type"] = ["image/svg+xml"]; + return p({ + cancel: false, + responseHeaders: w + }); + } + if (!y.path.endsWith(R.vscodeRemoteResource) && m.some(b => b.toLowerCase().includes("image/svg"))) { + return p({ + cancel: !c(f) + }); + } + } + return p({ + cancel: false + }); + }); + ca.defaultSession.webRequest.onHeadersReceived((f, p) => { + if (f.url.startsWith("https://vscode.download.prss.microsoft.com/")) { + const w = f.responseHeaders ?? Object.create(null); + if (w["Access-Control-Allow-Origin"] === undefined) { + w["Access-Control-Allow-Origin"] = ["*"]; + return p({ + cancel: false, + responseHeaders: w + }); + } + } + return p({ + cancel: false + }); + }); + const d = ca.defaultSession; + if (typeof d.setCodeCachePath == "function" && this.q.codeCachePath) { + d.setCodeCachePath(F(this.q.codeCachePath, "chrome")); + } + if (j) { + if (this.t.getValue("security.restrictUNCAccess") === false) { + CS(); + } else { + ma(this.t.getValue("security.allowedUNCHosts")); + } + } + } + F() { + lw(s => this.G(s)); + process.on("uncaughtException", s => { + if (!zS(s)) { + Ft(s); + } + }); + process.on("unhandledRejection", s => Ft(s)); + x.once(this.s.onWillShutdown)(() => this.dispose()); + sx(); + Nn.on("accessibility-support-changed", (s, r) => { + this.b?.sendToAll("vscode:accessibilitySupportChanged", r); + }); + Nn.on("activate", async (s, r) => { + this.m.trace("app#activate"); + if (!r) { + await this.b?.openEmptyWindow({ + context: 1 + }); + } + }); + Nn.on("web-contents-created", (s, r) => { + if (r?.opener?.url.startsWith(`${R.vscodeFileResource}://${za}/`)) { + this.m.trace("[aux window] app.on(\"web-contents-created\"): Registering auxiliary window"); + this.c?.registerWindow(r); + } + r.on("will-navigate", n => { + this.m.error("webContents#will-navigate: Prevented webcontent navigation"); + n.preventDefault(); + }); + r.setWindowOpenHandler(n => n.url === "about:blank" ? (this.m.trace("[aux window] webContents#setWindowOpenHandler: Allowing auxiliary window to open on about:blank"), { + action: "allow", + overrideBrowserWindowOptions: this.c?.createWindow(n) + }) : (this.m.trace(`webContents#setWindowOpenHandler: Prevented opening window with URL ${n.url}}`), this.f?.openExternal(undefined, n.url), { + action: "deny" + })); + }); + let e = []; + let i; + Nn.on("open-file", (s, r) => { + r = io(r); + this.m.trace("app#open-file: ", r); + s.preventDefault(); + e.push(ln(r) ? { + workspaceUri: P.file(r) + } : { + fileUri: P.file(r) + }); + if (i !== undefined) { + clearTimeout(i); + i = undefined; + } + i = setTimeout(async () => { + await this.b?.open({ + context: 1, + cli: this.q.args, + urisToOpen: e, + gotoLineMode: false, + preferNewWindow: true + }); + e = []; + i = undefined; + }, 100); + }); + Nn.on("new-window-for-tab", async () => { + await this.b?.openEmptyWindow({ + context: 4 + }); + }); + it.handle("vscode:fetchShellEnv", s => { + const r = this.b?.getWindowByWebContents(s.sender); + let n; + let o; + if (r?.config) { + n = r.config; + o = { + ...process.env, + ...r.config.userEnv + }; + } else { + n = this.q.args; + o = process.env; + } + return this.W(n, o, false); + }); + it.on("vscode:toggleDevTools", s => s.sender.toggleDevTools()); + it.on("vscode:openDevTools", s => s.sender.openDevTools()); + it.on("vscode:reloadWindow", s => s.sender.reload()); + it.handle("vscode:notifyZoomLevel", async (s, r) => { + const n = this.b?.getWindowByWebContents(s.sender); + if (n) { + n.notifyZoomLevel(r); + } + }); + } + G(e) { + if (e) { + const i = { + message: `[uncaught exception in main]: ${e.message}`, + stack: e.stack + }; + this.b?.sendToFocused("vscode:reportError", JSON.stringify(i)); + } + this.m.error(`[uncaught exception in main]: ${e}`, e); + } + async startup() { + this.m.debug("Starting VS Code"); + this.m.debug(`from: ${this.q.appRoot}`); + this.m.debug("args:", this.q.args); + const e = this.y.win32AppUserModelId; + if (j && e) { + Nn.setAppUserModelId(e); + } + try { + if (N && this.t.getValue("window.nativeTabs") === true && !C8.getUserDefault("NSUseImprovedLayoutPass", "boolean")) { + C8.setUserDefault("NSUseImprovedLayoutPass", "boolean", true); + } + } catch (f) { + this.m.error(f); + } + const i = new Ub(); + x.once(this.s.onWillShutdown)(f => { + if (f.reason === 2) { + i.dispose(); + } + }); + this.m.trace("Resolving machine identifier..."); + const [s, r, n, o] = await Promise.all([xC(this.u, this.m), DC(this.u, this.m), PC(this.u, this.m), $C(this.u, this.m)]); + this.m.trace(`Resolved machine identifier: ${s}`); + const { + sharedProcessReady: a, + sharedProcessClient: c + } = this.O(s, r, n, o); + const l = await this.P(s, r, n, o, a); + l.invokeFunction(f => f.get(oh)); + this.D(l.createInstance(md)); + l.invokeFunction(f => this.Q(f, i, c)); + const u = await l.invokeFunction(f => this.H(f, i)); + this.I(i); + this.s.phase = 2; + await l.invokeFunction(f => this.R(f, u)); + this.s.phase = 3; + this.S(); + this.D(new os(() => { + this.D(Rp(() => { + this.s.phase = 4; + this.Y(); + }, 2500)); + }, 2500)).schedule(); + } + async H(e, i) { + const s = this.b = e.get(dt); + const r = e.get(Uc); + const n = this.f = e.get(Or); + const o = e.get(nr); + const a = this; + r.registerHandler({ + async handleURL(p, w) { + return a.N(s, o, r, p, w); + } + }); + const c = this.D(new D6({ + onDidOpenMainWindow: n.onDidOpenMainWindow, + onDidFocusMainWindow: n.onDidFocusMainWindow, + getActiveWindowId: () => n.getActiveWindowId(-1) + })); + const l = new mb(p => c.getActiveClientId().then(w => p === w)); + const u = new h6(l, this.m); + const d = i.getChannel("urlHandler", u); + r.registerHandler(new u6(d)); + const f = await this.J(s, o); + this.D(new p6(f?.urls, r, s, this.q, this.y, this.m)); + return f; + } + I(e) { + const i = () => ({ + statusCode: 404, + data: "Not found" + }); + const s = new vr(() => e.getChannel(D7, new P7())); + A8.registerBufferProtocol(R.vscodeManagedRemoteResource, (r, n) => { + const o = P.parse(r.url); + if (!o.authority.startsWith("window:")) { + return n(i()); + } + s.value.call(fm, [o]).then(a => n({ + ...a, + data: Buffer.from(a.body, "base64") + }), a => { + this.m.warn("error dispatching remote resource call", a); + n({ + statusCode: 500, + data: String(a) + }); + }); + }); + } + async J(e, i) { + const s = this.q.args["open-url"] ? this.q.args._urls || [] : []; + if (s.length > 0) { + this.m.trace("app#resolveInitialProtocolUrls() protocol urls from command line:", s); + } + const r = global.getOpenUrls() || []; + if (r.length > 0) { + this.m.trace("app#resolveInitialProtocolUrls() protocol urls from macOS 'open-url' event:", r); + } + if (s.length + r.length === 0) { + return; + } + const n = [...s, ...r].map(c => { + try { + return { + uri: P.parse(c), + originalUrl: c + }; + } catch { + this.m.trace("app#resolveInitialProtocolUrls() protocol url failed to parse:", c); + return; + } + }); + const o = []; + const a = []; + for (const c of n) { + if (!c) { + continue; + } + const l = this.M(c.uri); + if (l) { + if (await this.L(l, e, i)) { + this.m.trace("app#resolveInitialProtocolUrls() protocol url was blocked:", c.uri.toString(true)); + continue; + } else { + this.m.trace("app#resolveInitialProtocolUrls() protocol url will be handled as window to open:", c.uri.toString(true), l); + o.push(l); + } + } else { + this.m.trace("app#resolveInitialProtocolUrls() protocol url will be passed to active window for handling:", c.uri.toString(true)); + a.push(c); + } + } + return { + urls: a, + openables: o + }; + } + async L(e, i, s) { + let r; + let n; + if (N1(e)) { + r = e.workspaceUri; + n = v(148, null, r.scheme === R.file ? to(r, { + os: Wi, + tildify: this.q + }) : r.toString(true), this.y.nameShort); + } else if (A4(e)) { + r = e.folderUri; + n = v(149, null, r.scheme === R.file ? to(r, { + os: Wi, + tildify: this.q + }) : r.toString(true), this.y.nameShort); + } else { + r = e.fileUri; + n = v(150, null, r.scheme === R.file ? to(r, { + os: Wi, + tildify: this.q + }) : r.toString(true), this.y.nameShort); + } + if (r.scheme !== R.file && r.scheme !== R.vscodeRemote || this.t.getValue(Zm.a[r.scheme]) === false) { + return false; + } + const { + response: a, + checkboxChecked: c + } = await s.showMessageBox({ + type: "warning", + buttons: [v(151, null), v(152, null)], + message: n, + detail: v(153, null), + checkboxLabel: r.scheme === R.file ? v(154, null) : v(155, null), + cancelId: 1 + }); + if (a !== 0) { + return true; + } + if (c) { + const l = { + channel: "vscode:disablePromptForProtocolHandling", + args: r.scheme === R.file ? "local" : "remote" + }; + i.sendToFocused(l.channel, l.args); + i.sendToOpeningWindow(l.channel, l.args); + } + return false; + } + M(e) { + if (e.path) { + if (e.authority === R.file) { + const i = P.file(e.fsPath); + if (ln(i)) { + return { + workspaceUri: i + }; + } else { + return { + fileUri: i + }; + } + } else if (e.authority === R.vscodeRemote) { + const i = e.path.indexOf(ae.sep, 1); + let s; + let r; + if (i !== -1) { + s = e.path.substring(1, i); + r = e.path.substring(i); + } else { + s = e.path.substring(1); + r = "/"; + } + let n = e.query; + const o = new URLSearchParams(e.query); + if (o.get("windowId") === "_blank") { + o.delete("windowId"); + n = o.toString(); + } + const a = P.from({ + scheme: R.vscodeRemote, + authority: s, + path: r, + query: n, + fragment: e.fragment + }); + if (ln(r)) { + return { + workspaceUri: a + }; + } else if (/:[\d]+$/.test(r)) { + return { + fileUri: a + }; + } else { + return { + folderUri: a + }; + } + } + } + } + async N(e, i, s, r, n) { + this.m.trace("app#handleProtocolUrl():", r.toString(true), n); + if (r.scheme === this.y.urlProtocol && r.path === "workspace") { + r = r.with({ + authority: "file", + path: P.parse(r.query).path, + query: "" + }); + } + let o = false; + const a = new URLSearchParams(r.query); + if (a.get("windowId") === "_blank") { + this.m.trace("app#handleProtocolUrl() found 'windowId=_blank' as parameter, setting shouldOpenInNewWindow=true:", r.toString(true)); + a.delete("windowId"); + r = r.with({ + query: a.toString() + }); + o = true; + } else if (N && e.getWindowCount() === 0) { + this.m.trace("app#handleProtocolUrl() running on macOS with no window open, setting shouldOpenInNewWindow=true:", r.toString(true)); + o = true; + } + const c = a.get("continueOn"); + if (c !== null) { + this.m.trace("app#handleProtocolUrl() found 'continueOn' as parameter:", r.toString(true)); + a.delete("continueOn"); + r = r.with({ + query: a.toString() + }); + this.q.continueOn = c ?? undefined; + } + const l = this.M(r); + if (l) { + if (await this.L(l, e, i)) { + this.m.trace("app#handleProtocolUrl() protocol url was blocked:", r.toString(true)); + return true; + } else { + this.m.trace("app#handleProtocolUrl() opening protocol url as window:", l, r.toString(true)); + (await e.open({ + context: 6, + cli: { + ...this.q.args + }, + urisToOpen: [l], + forceNewWindow: o, + gotoLineMode: true + })).at(0)?.focus(); + return true; + } + } else if (o) { + this.m.trace("app#handleProtocolUrl() opening empty window and passing in protocol url:", r.toString(true)); + await (await e.open({ + context: 6, + cli: { + ...this.q.args + }, + forceNewWindow: true, + forceEmpty: true, + gotoLineMode: true, + remoteAuthority: Ao(r) + })).at(0)?.ready(); + return s.open(r, n); + } else { + this.m.trace("app#handleProtocolUrl(): not handled", r.toString(true), n); + return false; + } + } + O(e, i, s, r) { + const n = this.D(this.j.createInstance(Zh, e, i, s, r)); + this.D(n.onDidCrash(() => this.b?.sendToFocused("vscode:reportSharedProcessCrash"))); + const o = (async () => { + this.m.trace("Main->SharedProcess#connect"); + const c = await n.connect(); + this.m.trace("Main->SharedProcess#connect: connection established"); + return new Jp(c, "main"); + })(); + return { + sharedProcessReady: (async () => { + await n.whenReady(); + return o; + })(), + sharedProcessClient: o + }; + } + async P(e, i, s, r, n) { + const o = new Ch(); + switch (process.platform) { + case "win32": + o.set(xn, new ue(Vc, [e])); + break; + case "linux": + if (Gf) { + o.set(xn, new ue(ed, [process.env.SNAP, process.env.SNAP_REVISION])); + } else { + o.set(xn, new ue(Xh, [e])); + } + break; + case "darwin": + o.set(xn, new ue(Mr, [e])); + break; + } + o.set(dt, new ue(ud, [e, i, s, r, this.h], false)); + o.set(To, new ue($d, undefined, false)); + const a = new fh(this.m, this.y); + o.set(nr, a); + o.set(Ng, new ue(Uh, undefined, false)); + o.set(vh, new ue(bh, undefined, false)); + o.set(J1, ze.toService(fu(n.then(f => f.getChannel("diagnostics"))))); + o.set(Dg, new ue(Th, [this.h])); + o.set(yu, new ue(yh)); + o.set(Fg, new ue(jh)); + o.set(Or, new ue(Fc, undefined, false)); + o.set(Gg, new ue(rd)); + o.set(Tg, new ue(Jh)); + o.set(lg, new ue(Dh)); + o.set(yo, new ue(Xu)); + o.set(dc, new ue(Qu)); + const c = new yd({ + graceTime: 60000, + shortGraceTime: 6000, + scrollback: this.t.getValue("terminal.integrated.persistentSessionScrollback") ?? 100 + }, this.t, this.q, this.s, this.m); + const l = new Dd(c, this.t, this.m, this.n); + o.set(cm, l); + if (j) { + o.set(Pc, new ue($h)); + } else if (N) { + o.set(Pc, new ue(R5)); + } else if (Se) { + o.set(Pc, new ue(fg)); + } + const u = new lh(this.q, this.t, this.y, this.m, this.u); + o.set(xo, u); + const d = new mh(this.q, this.m, this.z, u, a); + o.set(Cr, d); + o.set(ig, new ue(hd, undefined, false)); + o.set(Bc, new ue(qh, undefined, false)); + o.set(Uc, new ue(sd, undefined, false)); + if (Q2(this.y, this.q)) { + const f = hI(this.y, this.t); + const p = fu(n.then(k => k.getChannel("telemetryAppender"))); + const w = new n6(p); + const m = lI(KL(), JL(), process.arch, this.y.commit, this.y.version, e, i, s, r, f); + const y = dI(this.q); + const b = { + appenders: [w], + commonProperties: m, + piiPaths: y, + sendErrorTelemetry: true + }; + o.set(Ot, new ue(Yh, [b], false)); + } else { + o.set(Ot, Hc); + } + o.set(Zo, new ue(wd, undefined, true)); + o.set(H6, new ue(gd, undefined, true)); + o.set(am, new ue(vd, undefined, true)); + o.set(oh, new ue(ah)); + o.set(Wo, new ue(Rh, undefined, true)); + o.set(Gm, new ue(Gd)); + o.set(Jm, new ue(Jd)); + if (this.y.quality !== "stable") { + o.set($8, new ue(Kd, undefined, true)); + } + await Tt.settled([u.initialize(), d.initialize()]); + return this.j.createChild(o); + } + Q(e, i, s) { + const r = this.D(new De()); + const n = ze.fromService(e.get(Ng), r, { + disableMarshalling: true + }); + this.g.registerChannel("launch", n); + const o = ze.fromService(e.get(vh), r, { + disableMarshalling: true + }); + this.g.registerChannel("diagnostics", o); + const a = ze.fromService(e.get(Gm), r); + i.registerChannel("tracing", a); + s.then(O => O.registerChannel("tracing", a)); + HL(e, i, s, r); + const c = ze.fromService(e.get(Jm), r); + i.registerChannel("abuse", c); + const l = r.add(new P6(e.get(Pn))); + i.registerChannel("policy", l); + s.then(O => O.registerChannel("policy", l)); + const u = this.w.getProvider(R.file); + cE(u instanceof Ih); + const d = r.add(new g2(u, this.m, this.q)); + i.registerChannel(yg, d); + s.then(O => O.registerChannel(yg, d)); + const f = ze.fromService(e.get(Rs), r); + i.registerChannel("userDataProfiles", f); + s.then(O => O.registerChannel("userDataProfiles", f)); + const p = new o6(e.get(xn)); + i.registerChannel("update", p); + const w = ze.fromService(e.get(Dg), r); + i.registerChannel("process", w); + const m = ze.fromService(e.get(yu), r); + i.registerChannel("encryption", m); + const y = ze.fromService(e.get(zo), r); + i.registerChannel("sign", y); + const b = ze.fromService(e.get(Fg), r); + i.registerChannel("keyboardLayout", b); + this.f = e.get(Or); + const k = ze.fromService(this.f, r); + i.registerChannel("nativeHost", k); + s.then(O => O.registerChannel("nativeHost", k)); + const A = ze.fromService(e.get(ig), r); + i.registerChannel("workspaces", A); + const C = ze.fromService(e.get(Tg), r); + i.registerChannel("menubar", C); + const _ = ze.fromService(e.get(Uc), r); + i.registerChannel("url", _); + const Z = ze.fromService(e.get(Gg), r); + i.registerChannel("webview", Z); + const ie = r.add(new r6(this.m, e.get(yo))); + i.registerChannel("storage", ie); + s.then(O => O.registerChannel("storage", ie)); + const me = r.add(new J6(e.get(yo), e.get(Rs), this.m)); + s.then(O => O.registerChannel("profileStorageListener", me)); + const W = ze.fromService(e.get(cm), r); + i.registerChannel(Xo.LocalPty, W); + const Ee = ze.fromService(e.get(Pc), r); + i.registerChannel("externalTerminal", Ee); + const Ye = new Z6(e.get(qo)); + i.registerChannel("logger", Ye); + s.then(O => O.registerChannel("logger", Ye)); + const re = new Z4(e.get(dt)); + i.registerChannel("extensionhostdebugservice", re); + const St = ze.fromService(e.get(lg), r); + i.registerChannel(_5, St); + const L = ze.fromService(e.get(am), r); + i.registerChannel(Y6, L); + } + async R(e, i) { + const s = this.b = e.get(dt); + this.c = e.get(To); + const r = bn(process.env) ? 0 : 4; + const n = this.q.args; + if (i) { + if (i.openables.length > 0) { + return s.open({ + context: r, + cli: n, + urisToOpen: i.openables, + gotoLineMode: true, + initialStartup: true + }); + } + if (i.urls.length > 0) { + for (const m of i.urls) { + const y = new URLSearchParams(m.uri.query); + if (y.get("windowId") === "_blank") { + y.delete("windowId"); + m.originalUrl = m.uri.toString(true); + m.uri = m.uri.with({ + query: y.toString() + }); + return s.open({ + context: r, + cli: n, + forceNewWindow: true, + forceEmpty: true, + gotoLineMode: true, + initialStartup: true + }); + } + } + } + } + const o = global.macOpenFiles; + const a = n._.length; + const c = !!n["folder-uri"]; + const l = !!n["file-uri"]; + const u = n["skip-add-to-recently-opened"] === true; + const d = n.wait && n.waitMarkerFilePath ? P.file(n.waitMarkerFilePath) : undefined; + const f = n.remote || undefined; + const p = n.profile; + const w = n["profile-temp"]; + if (!a && !c && !l) { + if (n["new-window"] || p || w) { + return s.open({ + context: r, + cli: n, + forceNewWindow: true, + forceEmpty: true, + noRecentEntry: u, + waitMarkerFileURI: d, + initialStartup: true, + remoteAuthority: f, + forceProfile: p, + forceTempProfile: w + }); + } + if (o.length) { + return s.open({ + context: 1, + cli: n, + urisToOpen: o.map(m => { + m = io(m); + if (ln(m)) { + return { + workspaceUri: P.file(m) + }; + } else { + return { + fileUri: P.file(m) + }; + } + }), + noRecentEntry: u, + waitMarkerFileURI: d, + initialStartup: true + }); + } + } + return s.open({ + context: r, + cli: n, + forceNewWindow: n["new-window"], + diffMode: n.diff, + mergeMode: n.merge, + noRecentEntry: u, + waitMarkerFileURI: d, + gotoLineMode: n.goto, + initialStartup: true, + remoteAuthority: f, + forceProfile: p, + forceTempProfile: w + }); + } + S() { + this.U(); + A8.registerHttpProtocol(R.vscodeRemoteResource, (e, i) => { + i({ + url: e.url.replace(/^vscode-remote-resource:/, "http:"), + method: e.method + }); + }); + this.W(this.q.args, process.env, true); + this.X(); + if (N && Nn.runningUnderARM64Translation) { + this.b?.sendToFocused("vscode:showTranslatedBuildWarning"); + } + } + async U() { + const e = this.y.win32MutexName; + if (j && e) { + try { + const i = await import("@vscode/windows-mutex"); + const s = new i.Mutex(e); + x.once(this.s.onWillShutdown)(() => s.release()); + } catch (i) { + this.m.error(i); + } + } + } + async W(e, i, s) { + try { + return await ag(this.t, this.m, e, i); + } catch (r) { + const n = Ki(r); + if (s) { + this.b?.sendToFocused("vscode:showResolveShellEnvError", n); + } else { + this.m.error(n); + } + } + return {}; + } + async X() { + try { + const i = (await this.w.readFile(this.q.argvResource)).value.toString(); + const s = L0(i); + const n = Bg(this.t) >= 1; + if (s["enable-crash-reporter"] === undefined) { + const o = ["", "\t// Allows to disable crash reporting.", "\t// Should restart the app if the value is changed.", ` "enable-crash-reporter": ${n},`, "", "\t// Unique id used for correlating crash reports sent from this instance.", "\t// Do not edit this value.", ` "crash-reporter-id": "${ti()}"`, "}"]; + const a = i.substring(0, i.length - 2).concat(`, + `, o.join(` + `)); + await this.w.writeFile(this.q.argvResource, z.fromString(a)); + } else { + const o = i.replace(/"enable-crash-reporter": .*,/, `"enable-crash-reporter": ${n},`); + if (o !== i) { + await this.w.writeFile(this.q.argvResource, z.fromString(o)); + } + } + } catch (e) { + this.m.error(e); + this.b?.sendToFocused("vscode:showArgvParseWarning"); + } + } + Y() { + IC(this.u, this.m); + } + }; + Yd = Zm = __decorate([__param(2, Ss), __param(3, V), __param(4, sc), __param(5, ot), __param(6, Te), __param(7, Je), __param(8, Oi), __param(9, at), __param(10, Ve), __param(11, Rs)], Yd); + } + }); + function pl(t) { + if (Object.isFrozen(t)) { + return t; + } else { + return kD(t); + } + } + function Tr(t, e) { + const { + added: i, + removed: s, + updated: r + } = _8(e?.rawConfiguration, t?.rawConfiguration); + const n = []; + const o = t?.getAllOverrideIdentifiers() || []; + const a = e?.getAllOverrideIdentifiers() || []; + if (e) { + const c = a.filter(l => !o.includes(l)); + for (const l of c) { + n.push([l, e.getKeysForOverrideIdentifier(l)]); + } + } + if (t) { + const c = o.filter(l => !a.includes(l)); + for (const l of c) { + n.push([l, t.getKeysForOverrideIdentifier(l)]); + } + } + if (e && t) { + for (const c of o) { + if (a.includes(c)) { + const l = _8({ + contents: t.getOverrideValue(undefined, c) || {}, + keys: t.getKeysForOverrideIdentifier(c) + }, { + contents: e.getOverrideValue(undefined, c) || {}, + keys: e.getKeysForOverrideIdentifier(c) + }); + n.push([c, [...l.added, ...l.removed, ...l.updated]]); + } + } + } + return { + added: i, + removed: s, + updated: r, + overrides: n + }; + } + function _8(t, e) { + const i = t ? e ? t.keys.filter(n => e.keys.indexOf(n) === -1) : [...t.keys] : []; + const s = e ? t ? e.keys.filter(n => t.keys.indexOf(n) === -1) : [...e.keys] : []; + const r = []; + if (t && e) { + for (const n of e.keys) { + if (t.keys.indexOf(n) !== -1) { + const o = Ql(e.contents, n); + const a = Ql(t.contents, n); + if (!Os(o, a)) { + r.push(n); + } + } + } + } + return { + added: i, + removed: s, + updated: r + }; + } + var ft; + var Ym; + var R8; + var O8; + var Xd; + var L8; + var M8 = g({ + "out-build/vs/platform/configuration/common/configurationModels.js"() { + "use strict"; + + zt(); + B(); + rr(); + M(); + $i(); + us(); + _e(); + se(); + Ke(); + Xr(); + Zs(); + ft = class Un { + static createEmptyModel(e) { + return new Un({}, [], [], undefined, e); + } + constructor(e, i, s, r, n) { + this.b = e; + this.c = i; + this.d = s; + this.raw = r; + this.f = n; + this.a = new Map(); + } + get rawConfiguration() { + if (!this.g) { + if (this.raw?.length) { + const e = this.raw.map(i => { + if (i instanceof Un) { + return i; + } + const s = new Ym("", this.f); + s.parseRaw(i); + return s.configurationModel; + }); + this.g = e.reduce((i, s) => s === i ? s : i.merge(s), e[0]); + } else { + this.g = this; + } + } + return this.g; + } + get contents() { + return this.b; + } + get overrides() { + return this.d; + } + get keys() { + return this.c; + } + isEmpty() { + return this.c.length === 0 && Object.keys(this.b).length === 0 && this.d.length === 0; + } + getValue(e) { + if (e) { + return Ql(this.contents, e); + } else { + return this.contents; + } + } + inspect(e, i) { + const s = this; + return { + get value() { + return pl(s.rawConfiguration.getValue(e)); + }, + get override() { + if (i) { + return pl(s.rawConfiguration.getOverrideValue(e, i)); + } else { + return undefined; + } + }, + get merged() { + return pl(i ? s.rawConfiguration.override(i).getValue(e) : s.rawConfiguration.getValue(e)); + }, + get overrides() { + const r = []; + for (const { + contents: n, + identifiers: o, + keys: a + } of s.rawConfiguration.overrides) { + const c = new Un(n, a, [], undefined, s.f).getValue(e); + if (c !== undefined) { + r.push({ + identifiers: o, + value: c + }); + } + } + if (r.length) { + return pl(r); + } else { + return undefined; + } + } + }; + } + getOverrideValue(e, i) { + const s = this.j(i); + if (s) { + if (e) { + return Ql(s, e); + } else { + return s; + } + } else { + return undefined; + } + } + getKeysForOverrideIdentifier(e) { + const i = []; + for (const s of this.overrides) { + if (s.identifiers.includes(e)) { + i.push(...s.keys); + } + } + return ss(i); + } + getAllOverrideIdentifiers() { + const e = []; + for (const i of this.overrides) { + e.push(...i.identifiers); + } + return ss(e); + } + override(e) { + let i = this.a.get(e); + if (!i) { + i = this.h(e); + this.a.set(e, i); + } + return i; + } + merge(...e) { + const i = ls(this.contents); + const s = ls(this.overrides); + const r = [...this.keys]; + const n = this.raw?.length ? [...this.raw] : [this]; + for (const o of e) { + n.push(...(o.raw?.length ? o.raw : [o])); + if (!o.isEmpty()) { + this.i(i, o.contents); + for (const a of o.overrides) { + const [c] = s.filter(l => xa(l.identifiers, a.identifiers)); + if (c) { + this.i(c.contents, a.contents); + c.keys.push(...a.keys); + c.keys = ss(c.keys); + } else { + s.push(ls(a)); + } + } + for (const a of o.keys) { + if (r.indexOf(a) === -1) { + r.push(a); + } + } + } + } + return new Un(i, r, s, n.every(o => o instanceof Un) ? undefined : n, this.f); + } + h(e) { + const i = this.j(e); + if (!i || typeof i != "object" || !Object.keys(i).length) { + return this; + } + const s = {}; + for (const r of ss([...Object.keys(this.contents), ...Object.keys(i)])) { + let n = this.contents[r]; + const o = i[r]; + if (o) { + if (typeof n == "object" && typeof o == "object") { + n = ls(n); + this.i(n, o); + } else { + n = o; + } + } + s[r] = n; + } + return new Un(s, this.keys, this.overrides, undefined, this.f); + } + i(e, i) { + for (const s of Object.keys(i)) { + if (s in e && Nt(e[s]) && Nt(i[s])) { + this.i(e[s], i[s]); + continue; + } + e[s] = ls(i[s]); + } + } + j(e) { + let i = null; + let s = null; + const r = n => { + if (n) { + if (s) { + this.i(s, n); + } else { + s = ls(n); + } + } + }; + for (const n of this.overrides) { + if (n.identifiers.length === 1 && n.identifiers[0] === e) { + i = n.contents; + } else if (n.identifiers.includes(e)) { + r(n.contents); + } + } + r(i); + return s; + } + toJSON() { + return { + contents: this.contents, + overrides: this.overrides, + keys: this.keys + }; + } + addValue(e, i) { + this.k(e, i, true); + } + setValue(e, i) { + this.k(e, i, false); + } + removeValue(e) { + const i = this.keys.indexOf(e); + if (i !== -1) { + this.keys.splice(i, 1); + yE(this.contents, e); + if (Es.test(e)) { + this.overrides.splice(this.overrides.findIndex(s => xa(s.identifiers, Ca(e))), 1); + } + } + } + k(e, i, s) { + sv(this.contents, e, i, r => this.f.error(r)); + s = s || this.keys.indexOf(e) === -1; + if (s) { + this.keys.push(e); + } + if (Es.test(e)) { + const r = Ca(e); + const n = { + identifiers: r, + keys: Object.keys(this.contents[e]), + contents: dp(this.contents[e], a => this.f.error(a)) + }; + const o = this.overrides.findIndex(a => xa(a.identifiers, r)); + if (o !== -1) { + this.overrides[o] = n; + } else { + this.overrides.push(n); + } + } + } + }; + Ym = class { + constructor(t, e) { + this.f = t; + this.g = e; + this.a = null; + this.b = null; + this.c = []; + this.d = []; + } + get configurationModel() { + return this.b || ft.createEmptyModel(this.g); + } + get restrictedConfigurations() { + return this.c; + } + get errors() { + return this.d; + } + parse(t, e) { + if (!Qt(t)) { + const i = this.h(t); + this.parseRaw(i, e); + } + } + reparse(t) { + if (this.a) { + this.parseRaw(this.a, t); + } + } + parseRaw(t, e) { + this.a = t; + const { + contents: i, + keys: s, + overrides: r, + restricted: n, + hasExcludedProperties: o + } = this.i(t, e); + this.b = new ft(i, s, r, o ? [t] : undefined, this.g); + this.c = n || []; + } + h(t) { + let e = {}; + let i = null; + let s = []; + const r = []; + const n = []; + function o(c) { + if (Array.isArray(s)) { + s.push(c); + } else if (i !== null) { + s[i] = c; + } + } + const a = { + onObjectBegin: () => { + const c = {}; + o(c); + r.push(s); + s = c; + i = null; + }, + onObjectProperty: c => { + i = c; + }, + onObjectEnd: () => { + s = r.pop(); + }, + onArrayBegin: () => { + const c = []; + o(c); + r.push(s); + s = c; + i = null; + }, + onArrayEnd: () => { + s = r.pop(); + }, + onLiteralValue: o, + onError: (c, l, u) => { + n.push({ + error: c, + offset: l, + length: u + }); + } + }; + if (t) { + try { + hh(t, a); + e = s[0] || {}; + } catch (c) { + this.g.error(`Error while parsing settings file ${this.f}: ${c}`); + this.d = [c]; + } + } + return e; + } + i(t, e) { + const i = Gt.as(Ai.Configuration).getConfigurationProperties(); + const s = this.j(t, i, true, e); + t = s.raw; + const r = dp(t, a => this.g.error(`Conflict in settings file ${this.f}: ${a}`)); + const n = Object.keys(t); + const o = this.m(t, a => this.g.error(`Conflict in settings file ${this.f}: ${a}`)); + return { + contents: r, + keys: n, + overrides: o, + restricted: s.restricted, + hasExcludedProperties: s.hasExcludedProperties + }; + } + j(t, e, i, s) { + let r = false; + if (!s?.scopes && !s?.skipRestricted && !s?.exclude?.length) { + return { + raw: t, + restricted: [], + hasExcludedProperties: r + }; + } + const n = {}; + const o = []; + for (const a in t) { + if (Es.test(a) && i) { + const c = this.j(t[a], e, false, s); + n[a] = c.raw; + r = r || c.hasExcludedProperties; + o.push(...c.restricted); + } else { + const c = e[a]; + if (c?.restricted) { + o.push(a); + } + if (this.l(a, c, s)) { + n[a] = t[a]; + } else { + r = true; + } + } + } + return { + raw: n, + restricted: o, + hasExcludedProperties: r + }; + } + l(t, e, i) { + if (i.exclude?.includes(t)) { + return false; + } + if (i.include?.includes(t)) { + return true; + } + if (i.skipRestricted && e?.restricted || i.skipUnregistered && !e) { + return false; + } + const s = e ? typeof e.scope !== "undefined" ? e.scope : 3 : undefined; + if (s === undefined || i.scopes === undefined) { + return true; + } else { + return i.scopes.includes(s); + } + } + m(t, e) { + const i = []; + for (const s of Object.keys(t)) { + if (Es.test(s)) { + const r = {}; + for (const n in t[s]) { + r[n] = t[s][n]; + } + i.push({ + identifiers: Ca(s), + keys: Object.keys(r), + contents: dp(r, e) + }); + } + } + return i; + } + }; + R8 = class extends T { + constructor(t, e, i, s, r) { + super(); + this.c = t; + this.f = e; + this.g = s; + this.h = r; + this.b = this.D(new $()); + this.onDidChange = this.b.event; + this.a = new Ym(this.c.toString(), r); + this.D(this.g.watch(i.dirname(this.c))); + this.D(this.g.watch(this.c)); + this.D(x.any(x.filter(this.g.onDidFilesChange, n => n.contains(this.c)), x.filter(this.g.onDidRunOperation, n => (n.isOperation(0) || n.isOperation(3) || n.isOperation(1) || n.isOperation(4)) && i.isEqual(n.resource, t)))(() => this.b.fire())); + } + async loadConfiguration() { + try { + const t = await this.g.readFile(this.c); + this.a.parse(t.value.toString() || "{}", this.f); + return this.a.configurationModel; + } catch { + return ft.createEmptyModel(this.h); + } + } + reparse(t) { + if (t) { + this.f = t; + } + this.a.reparse(this.f); + return this.a.configurationModel; + } + getRestrictedSettings() { + return this.a.restrictedConfigurations; + } + }; + O8 = class { + constructor(t, e, i, s, r, n, o, a, c, l, u, d, f) { + this.a = t; + this.b = e; + this.c = i; + this.overrideIdentifiers = s; + this.d = r; + this.f = n; + this.g = o; + this.h = a; + this.i = c; + this.j = l; + this.k = u; + this.l = d; + this.m = f; + } + get value() { + return pl(this.c); + } + n(t) { + if (t?.value !== undefined || t?.override !== undefined || t?.overrides !== undefined) { + return t; + } else { + return undefined; + } + } + get q() { + this.p ||= this.d.inspect(this.a, this.b.overrideIdentifier); + return this.p; + } + get defaultValue() { + return this.q.merged; + } + get default() { + return this.n(this.q); + } + get s() { + if (this.r === undefined) { + this.r = this.f ? this.f.inspect(this.a) : null; + } + return this.r; + } + get policyValue() { + return this.s?.merged; + } + get policy() { + if (this.s?.value !== undefined) { + return { + value: this.s.value + }; + } else { + return undefined; + } + } + get u() { + if (this.t === undefined) { + this.t = this.g ? this.g.inspect(this.a) : null; + } + return this.t; + } + get applicationValue() { + return this.u?.merged; + } + get application() { + return this.n(this.u); + } + get w() { + this.v ||= this.h.inspect(this.a, this.b.overrideIdentifier); + return this.v; + } + get userValue() { + return this.w.merged; + } + get user() { + return this.n(this.w); + } + get y() { + this.x ||= this.i.inspect(this.a, this.b.overrideIdentifier); + return this.x; + } + get userLocalValue() { + return this.y.merged; + } + get userLocal() { + return this.n(this.y); + } + get A() { + this.z ||= this.j.inspect(this.a, this.b.overrideIdentifier); + return this.z; + } + get userRemoteValue() { + return this.A.merged; + } + get userRemote() { + return this.n(this.A); + } + get D() { + if (this.B === undefined) { + this.B = this.k ? this.k.inspect(this.a, this.b.overrideIdentifier) : null; + } + return this.B; + } + get workspaceValue() { + return this.D?.merged; + } + get workspace() { + return this.n(this.D); + } + get F() { + if (this.E === undefined) { + this.E = this.l ? this.l.inspect(this.a, this.b.overrideIdentifier) : null; + } + return this.E; + } + get workspaceFolderValue() { + return this.F?.merged; + } + get workspaceFolder() { + return this.n(this.F); + } + get H() { + if (this.G === undefined) { + this.G = this.m.inspect(this.a, this.b.overrideIdentifier); + } + return this.G; + } + get memoryValue() { + return this.H.merged; + } + get memory() { + return this.n(this.H); + } + }; + Xd = class dS { + constructor(e, i, s, r, n, o, a, c, l, u) { + this.j = e; + this.l = i; + this.m = s; + this.n = r; + this.p = n; + this.q = o; + this.r = a; + this.s = c; + this.t = l; + this.u = u; + this.h = null; + this.i = new Ht(); + this.v = null; + } + getValue(e, i, s) { + return this.w(e, i, s).getValue(e); + } + updateValue(e, i, s = {}) { + let r; + if (s.resource) { + r = this.t.get(s.resource); + if (!r) { + r = ft.createEmptyModel(this.u); + this.t.set(s.resource, r); + } + } else { + r = this.s; + } + if (i === undefined) { + r.removeValue(e); + } else { + r.setValue(e, i); + } + if (!s.resource) { + this.h = null; + } + } + inspect(e, i, s) { + const r = this.w(e, i, s); + const n = this.A(i.resource, s); + const o = i.resource ? this.t.get(i.resource) || this.s : this.s; + const a = new Set(); + for (const c of r.overrides) { + for (const l of c.identifiers) { + if (r.getOverrideValue(e, l) !== undefined) { + a.add(l); + } + } + } + return new O8(e, i, r.getValue(e), a.size ? [...a] : undefined, this.j, this.l.isEmpty() ? undefined : this.l, this.applicationConfiguration.isEmpty() ? undefined : this.applicationConfiguration, this.userConfiguration, this.localUserConfiguration, this.remoteUserConfiguration, s ? this.q : undefined, n || undefined, o); + } + keys(e) { + const i = this.A(undefined, e); + return { + default: this.j.keys.slice(0), + user: this.userConfiguration.keys.slice(0), + workspace: this.q.keys.slice(0), + workspaceFolder: i ? i.keys.slice(0) : [] + }; + } + updateDefaultConfiguration(e) { + this.j = e; + this.h = null; + this.i.clear(); + } + updatePolicyConfiguration(e) { + this.l = e; + } + updateApplicationConfiguration(e) { + this.m = e; + this.h = null; + this.i.clear(); + } + updateLocalUserConfiguration(e) { + this.n = e; + this.v = null; + this.h = null; + this.i.clear(); + } + updateRemoteUserConfiguration(e) { + this.p = e; + this.v = null; + this.h = null; + this.i.clear(); + } + updateWorkspaceConfiguration(e) { + this.q = e; + this.h = null; + this.i.clear(); + } + updateFolderConfiguration(e, i) { + this.r.set(e, i); + this.i.delete(e); + } + deleteFolderConfiguration(e) { + this.folderConfigurations.delete(e); + this.i.delete(e); + } + compareAndUpdateDefaultConfiguration(e, i) { + const s = []; + if (!i) { + const { + added: r, + updated: n, + removed: o + } = Tr(this.j, e); + i = [...r, ...n, ...o]; + } + for (const r of i) { + for (const n of Ca(r)) { + const o = this.j.getKeysForOverrideIdentifier(n); + const a = e.getKeysForOverrideIdentifier(n); + const c = [...a.filter(l => o.indexOf(l) === -1), ...o.filter(l => a.indexOf(l) === -1), ...o.filter(l => !Os(this.j.override(n).getValue(l), e.override(n).getValue(l)))]; + s.push([n, c]); + } + } + this.updateDefaultConfiguration(e); + return { + keys: i, + overrides: s + }; + } + compareAndUpdatePolicyConfiguration(e) { + const { + added: i, + updated: s, + removed: r + } = Tr(this.l, e); + const n = [...i, ...s, ...r]; + if (n.length) { + this.updatePolicyConfiguration(e); + } + return { + keys: n, + overrides: [] + }; + } + compareAndUpdateApplicationConfiguration(e) { + const { + added: i, + updated: s, + removed: r, + overrides: n + } = Tr(this.applicationConfiguration, e); + const o = [...i, ...s, ...r]; + if (o.length) { + this.updateApplicationConfiguration(e); + } + return { + keys: o, + overrides: n + }; + } + compareAndUpdateLocalUserConfiguration(e) { + const { + added: i, + updated: s, + removed: r, + overrides: n + } = Tr(this.localUserConfiguration, e); + const o = [...i, ...s, ...r]; + if (o.length) { + this.updateLocalUserConfiguration(e); + } + return { + keys: o, + overrides: n + }; + } + compareAndUpdateRemoteUserConfiguration(e) { + const { + added: i, + updated: s, + removed: r, + overrides: n + } = Tr(this.remoteUserConfiguration, e); + const o = [...i, ...s, ...r]; + if (o.length) { + this.updateRemoteUserConfiguration(e); + } + return { + keys: o, + overrides: n + }; + } + compareAndUpdateWorkspaceConfiguration(e) { + const { + added: i, + updated: s, + removed: r, + overrides: n + } = Tr(this.workspaceConfiguration, e); + const o = [...i, ...s, ...r]; + if (o.length) { + this.updateWorkspaceConfiguration(e); + } + return { + keys: o, + overrides: n + }; + } + compareAndUpdateFolderConfiguration(e, i) { + const s = this.folderConfigurations.get(e); + const { + added: r, + updated: n, + removed: o, + overrides: a + } = Tr(s, i); + const c = [...r, ...n, ...o]; + if (c.length || !s) { + this.updateFolderConfiguration(e, i); + } + return { + keys: c, + overrides: a + }; + } + compareAndDeleteFolderConfiguration(e) { + const i = this.folderConfigurations.get(e); + if (!i) { + throw new Error("Unknown folder"); + } + this.deleteFolderConfiguration(e); + const { + added: s, + updated: r, + removed: n, + overrides: o + } = Tr(i, undefined); + return { + keys: [...s, ...r, ...n], + overrides: o + }; + } + get defaults() { + return this.j; + } + get applicationConfiguration() { + return this.m; + } + get userConfiguration() { + this.v ||= this.p.isEmpty() ? this.n : this.n.merge(this.p); + return this.v; + } + get localUserConfiguration() { + return this.n; + } + get remoteUserConfiguration() { + return this.p; + } + get workspaceConfiguration() { + return this.q; + } + get folderConfigurations() { + return this.r; + } + w(e, i, s) { + let r = this.x(i, s); + if (i.overrideIdentifier) { + r = r.override(i.overrideIdentifier); + } + if (!this.l.isEmpty() && this.l.getValue(e) !== undefined) { + r = r.merge(this.l); + } + return r; + } + x({ + resource: e + }, i) { + let s = this.y(); + if (i && e) { + const r = i.getFolder(e); + if (r) { + s = this.z(r.uri) || s; + } + const n = this.t.get(e); + if (n) { + s = s.merge(n); + } + } + return s; + } + y() { + this.h ||= this.j.merge(this.applicationConfiguration, this.userConfiguration, this.q, this.s); + return this.h; + } + z(e) { + let i = this.i.get(e); + if (!i) { + const s = this.y(); + const r = this.r.get(e); + if (r) { + i = s.merge(r); + this.i.set(e, i); + } else { + i = s; + } + } + return i; + } + A(e, i) { + if (i && e) { + const s = i.getFolder(e); + if (s) { + return this.r.get(s.uri); + } + } + } + toData() { + return { + defaults: { + contents: this.j.contents, + overrides: this.j.overrides, + keys: this.j.keys + }, + policy: { + contents: this.l.contents, + overrides: this.l.overrides, + keys: this.l.keys + }, + application: { + contents: this.applicationConfiguration.contents, + overrides: this.applicationConfiguration.overrides, + keys: this.applicationConfiguration.keys + }, + user: { + contents: this.userConfiguration.contents, + overrides: this.userConfiguration.overrides, + keys: this.userConfiguration.keys + }, + workspace: { + contents: this.q.contents, + overrides: this.q.overrides, + keys: this.q.keys + }, + folders: [...this.r.keys()].reduce((e, i) => { + const { + contents: s, + overrides: r, + keys: n + } = this.r.get(i); + e.push([i, { + contents: s, + overrides: r, + keys: n + }]); + return e; + }, []) + }; + } + allKeys() { + const e = new Set(); + this.j.keys.forEach(i => e.add(i)); + this.userConfiguration.keys.forEach(i => e.add(i)); + this.q.keys.forEach(i => e.add(i)); + this.r.forEach(i => i.keys.forEach(s => e.add(s))); + return [...e.values()]; + } + B() { + const e = new Set(); + this.j.getAllOverrideIdentifiers().forEach(i => e.add(i)); + this.userConfiguration.getAllOverrideIdentifiers().forEach(i => e.add(i)); + this.q.getAllOverrideIdentifiers().forEach(i => e.add(i)); + this.r.forEach(i => i.getAllOverrideIdentifiers().forEach(s => e.add(s))); + return [...e.values()]; + } + D(e) { + const i = new Set(); + this.j.getKeysForOverrideIdentifier(e).forEach(s => i.add(s)); + this.userConfiguration.getKeysForOverrideIdentifier(e).forEach(s => i.add(s)); + this.q.getKeysForOverrideIdentifier(e).forEach(s => i.add(s)); + this.r.forEach(s => s.getKeysForOverrideIdentifier(e).forEach(r => i.add(r))); + return [...i.values()]; + } + static parse(e, i) { + const s = this.E(e.defaults, i); + const r = this.E(e.policy, i); + const n = this.E(e.application, i); + const o = this.E(e.user, i); + const a = this.E(e.workspace, i); + const c = e.folders.reduce((l, u) => { + l.set(P.revive(u[0]), this.E(u[1], i)); + return l; + }, new Ht()); + return new dS(s, r, n, o, ft.createEmptyModel(i), a, c, ft.createEmptyModel(i), new Ht(), i); + } + static E(e, i) { + return new ft(e.contents, e.keys, e.overrides, undefined, i); + } + }; + L8 = class { + constructor(t, e, i, s, r) { + this.change = t; + this.f = e; + this.g = i; + this.h = s; + this.i = r; + this.a = ` + `; + this.b = this.a.charCodeAt(0); + this.c = 46; + this.affectedKeys = new Set(); + this.j = undefined; + for (const n of t.keys) { + this.affectedKeys.add(n); + } + for (const [, n] of t.overrides) { + for (const o of n) { + this.affectedKeys.add(o); + } + } + this.d = this.a; + for (const n of this.affectedKeys) { + this.d += n + this.a; + } + } + get previousConfiguration() { + if (!this.j && this.f) { + this.j = Xd.parse(this.f.data, this.i); + } + return this.j; + } + affectsConfiguration(t, e) { + const i = this.a + t; + const s = this.d.indexOf(i); + if (s < 0) { + return false; + } + const r = s + i.length; + if (r >= this.d.length) { + return false; + } + const n = this.d.charCodeAt(r); + if (n !== this.b && n !== this.c) { + return false; + } + if (e) { + const o = this.previousConfiguration ? this.previousConfiguration.getValue(t, e, this.f?.workspace) : undefined; + const a = this.g.getValue(t, e, this.h); + return !Os(o, a); + } + return true; + } + }; + } + }); + var F8; + var N8; + var Qd; + var YL = g({ + "out-build/vs/platform/configuration/common/configurations.js"() { + "use strict"; + + zt(); + B(); + M(); + us(); + _e(); + M8(); + Xr(); + X(); + Ls(); + Zs(); + $e(); + rr(); + F8 = class extends T { + get configurationModel() { + return this.b; + } + constructor(t) { + super(); + this.c = t; + this.a = this.D(new $()); + this.onDidChangeConfiguration = this.a.event; + this.b = ft.createEmptyModel(this.c); + } + async initialize() { + this.h(); + this.D(Gt.as(Ai.Configuration).onDidUpdateConfiguration(({ + properties: t, + defaultsOverrides: e + }) => this.f(Array.from(t), e))); + return this.configurationModel; + } + reload() { + this.h(); + return this.configurationModel; + } + f(t, e) { + this.j(t, Gt.as(Ai.Configuration).getConfigurationProperties()); + this.a.fire({ + defaults: this.configurationModel, + properties: t + }); + } + g() { + return {}; + } + h() { + this.b = ft.createEmptyModel(this.c); + const t = Gt.as(Ai.Configuration).getConfigurationProperties(); + this.j(Object.keys(t), t); + } + j(t, e) { + const i = this.g(); + for (const s of t) { + const r = i[s]; + const n = e[s]; + if (r !== undefined) { + this.b.setValue(s, r); + } else if (n) { + this.b.setValue(s, n.default); + } else { + this.b.removeValue(s); + } + } + } + }; + N8 = class { + constructor() { + this.onDidChangeConfiguration = x.None; + this.configurationModel = ft.createEmptyModel(new ky()); + } + async initialize() { + return this.configurationModel; + } + }; + Qd = class extends T { + get configurationModel() { + return this.b; + } + constructor(e, i, s) { + super(); + this.c = e; + this.f = i; + this.g = s; + this.a = this.D(new $()); + this.onDidChangeConfiguration = this.a.event; + this.b = ft.createEmptyModel(this.g); + } + async initialize() { + this.g.trace("PolicyConfiguration#initialize"); + this.m(await this.h(this.c.configurationModel.keys), false); + this.D(this.f.onDidChange(e => this.j(e))); + this.D(this.c.onDidChangeConfiguration(async ({ + properties: e + }) => this.m(await this.h(e), true))); + return this.b; + } + async h(e) { + this.g.trace("PolicyConfiguration#updatePolicyDefinitions", e); + const i = {}; + const s = []; + const r = Gt.as(Ai.Configuration).getConfigurationProperties(); + for (const n of e) { + const o = r[n]; + if (!o) { + s.push(n); + continue; + } + if (o.policy) { + if (o.type !== "string" && o.type !== "number" && o.type !== "array" && o.type !== "object") { + this.g.warn(`Policy ${o.policy.name} has unsupported type ${o.type}`); + continue; + } + s.push(n); + i[o.policy.name] = { + type: o.type === "number" ? "number" : "string" + }; + } + } + if (!sp(i)) { + await this.f.updatePolicyDefinitions(i); + } + return s; + } + j(e) { + this.g.trace("PolicyConfiguration#onDidChangePolicies", e); + const i = Gt.as(Ai.Configuration).getPolicyConfigurations(); + const s = $t(e.map(r => i.get(r))); + this.m(s, true); + } + m(e, i) { + this.g.trace("PolicyConfiguration#update", e); + const s = Gt.as(Ai.Configuration).getConfigurationProperties(); + const r = []; + const n = this.b.isEmpty(); + for (const o of e) { + const a = s[o]; + const c = a?.policy?.name; + if (c) { + let l = this.f.getPolicyValue(c); + if (wt(l) && a.type !== "string") { + try { + l = this.n(l); + } catch (u) { + this.g.error(`Error parsing policy value ${c}:`, Vi(u)); + continue; + } + } + if (n ? l !== undefined : !Os(this.b.getValue(o), l)) { + r.push([o, l]); + } + } else if (this.b.getValue(o) !== undefined) { + r.push([o, undefined]); + } + } + if (r.length) { + this.g.trace("PolicyConfiguration#changed", r); + const o = this.b; + this.b = ft.createEmptyModel(this.g); + for (const a of o.keys) { + this.b.setValue(a, o.getValue(a)); + } + for (const [a, c] of r) { + if (c === undefined) { + this.b.removeValue(a); + } else { + this.b.setValue(a, c); + } + } + if (i) { + this.a.fire(this.b); + } + } + } + n(e) { + let i = {}; + let s = null; + let r = []; + const n = []; + const o = []; + function a(l) { + if (Array.isArray(r)) { + r.push(l); + } else if (s !== null) { + if (r[s] !== undefined) { + throw new Error(`Duplicate property found: ${s}`); + } + r[s] = l; + } + } + if (e) { + hh(e, { + onObjectBegin: () => { + const l = {}; + a(l); + n.push(r); + r = l; + s = null; + }, + onObjectProperty: l => { + s = l; + }, + onObjectEnd: () => { + r = n.pop(); + }, + onArrayBegin: () => { + const l = []; + a(l); + n.push(r); + r = l; + s = null; + }, + onArrayEnd: () => { + r = n.pop(); + }, + onLiteralValue: a, + onError: (l, u, d) => { + o.push({ + error: l, + offset: u, + length: d + }); + } + }); + i = r[0] || {}; + } + if (o.length > 0) { + throw new Error(o.map(l => Vi(l.error)).join(` + `)); + } + return i; + } + }; + Qd = __decorate([__param(1, Pn), __param(2, V)], Qd); + } + }); + var W8; + var T8; + var XL = g({ + "out-build/vs/platform/configuration/common/configurationService.js"() { + "use strict"; + + zt(); + ce(); + Ze(); + B(); + rr(); + l5(); + M(); + $i(); + us(); + H(); + nt(); + Ke(); + M8(); + Xr(); + YL(); + Ls(); + W8 = class extends T { + constructor(t, e, i, s) { + super(); + this.m = t; + this.n = s; + this.h = this.D(new $()); + this.onDidChangeConfiguration = this.h.event; + this.b = this.D(new F8(s)); + this.c = i instanceof Ug ? new N8() : this.D(new Qd(this.b, i, s)); + this.f = this.D(new R8(this.m, {}, tt, e, s)); + this.a = new Xd(this.b.configurationModel, this.c.configurationModel, ft.createEmptyModel(s), ft.createEmptyModel(s), ft.createEmptyModel(s), ft.createEmptyModel(s), new Ht(), ft.createEmptyModel(s), new Ht(), s); + this.j = new T8(t, e, this); + this.g = this.D(new os(() => this.reloadConfiguration(), 50)); + this.D(this.b.onDidChangeConfiguration(({ + defaults: r, + properties: n + }) => this.r(r, n))); + this.D(this.c.onDidChangeConfiguration(r => this.s(r))); + this.D(this.f.onDidChange(() => this.g.schedule())); + } + async initialize() { + const [t, e, i] = await Promise.all([this.b.initialize(), this.c.initialize(), this.f.loadConfiguration()]); + this.a = new Xd(t, e, ft.createEmptyModel(this.n), i, ft.createEmptyModel(this.n), ft.createEmptyModel(this.n), new Ht(), ft.createEmptyModel(this.n), new Ht(), this.n); + } + getConfigurationData() { + return this.a.toData(); + } + getValue(t, e) { + const i = typeof t == "string" ? t : undefined; + const s = hp(t) ? t : hp(e) ? e : {}; + return this.a.getValue(i, s, undefined); + } + async updateValue(t, e, i, s, r) { + const n = bE(i) ? i : hp(i) ? { + resource: i.resource, + overrideIdentifiers: i.overrideIdentifier ? [i.overrideIdentifier] : undefined + } : undefined; + const o = n ? s : i; + if (o !== undefined && o !== 3 && o !== 2) { + throw new Error(`Unable to write ${t} to target ${o}.`); + } + if (n?.overrideIdentifiers) { + n.overrideIdentifiers = ss(n.overrideIdentifiers); + n.overrideIdentifiers = n.overrideIdentifiers.length ? n.overrideIdentifiers : undefined; + } + const a = this.inspect(t, { + resource: n?.resource, + overrideIdentifier: n?.overrideIdentifiers ? n.overrideIdentifiers[0] : undefined + }); + if (a.policyValue !== undefined) { + throw new Error(`Unable to write ${t} because it is configured in system policy.`); + } + if (Os(e, a.defaultValue)) { + e = undefined; + } + if (n?.overrideIdentifiers?.length && n.overrideIdentifiers.length > 1) { + const l = n.overrideIdentifiers.sort(); + const u = this.a.localUserConfiguration.overrides.find(d => xa([...d.identifiers].sort(), l)); + if (u) { + n.overrideIdentifiers = u.identifiers; + } + } + const c = n?.overrideIdentifiers?.length ? [IE(n.overrideIdentifiers), t] : [t]; + await this.j.write(c, e); + await this.reloadConfiguration(); + } + inspect(t, e = {}) { + return this.a.inspect(t, e, undefined); + } + keys() { + return this.a.keys(undefined); + } + async reloadConfiguration() { + const t = await this.f.loadConfiguration(); + this.q(t); + } + q(t) { + const e = this.a.toData(); + const i = this.a.compareAndUpdateLocalUserConfiguration(t); + this.t(i, e, 2); + } + r(t, e) { + const i = this.a.toData(); + const s = this.a.compareAndUpdateDefaultConfiguration(t, e); + this.t(s, i, 7); + } + s(t) { + const e = this.a.toData(); + const i = this.a.compareAndUpdatePolicyConfiguration(t); + this.t(i, e, 7); + } + t(t, e, i) { + const s = new L8(t, { + data: e + }, this.a, undefined, this.n); + s.source = i; + this.h.fire(s); + } + }; + T8 = class { + constructor(t, e, i) { + this.b = t; + this.c = e; + this.d = i; + this.a = new eo(); + } + write(t, e) { + return this.a.queue(() => this.e(t, e)); + } + async e(t, e) { + let i; + try { + i = (await this.c.readFile(this.b)).value.toString(); + } catch (n) { + if (n.fileOperationResult === 1) { + i = "{}"; + } else { + throw n; + } + } + const s = []; + gn(i, s, { + allowTrailingComma: true, + allowEmptyContent: true + }); + if (s.length > 0) { + throw new Error("Unable to write into the settings file. Please open the file to correct errors/warnings in the file and try again."); + } + const r = this.f(i, t, e); + i = MD(i, r); + await this.c.writeFile(this.b, z.fromString(i)); + } + f(t, e, i) { + const { + tabSize: s, + insertSpaces: r, + eol: n + } = this.h; + if (!e.length) { + const o = JSON.stringify(i, null, r ? " ".repeat(s) : "\t"); + return [{ + content: o, + length: o.length, + offset: 0 + }]; + } + return LD(t, e, i, { + tabSize: s, + insertSpaces: r, + eol: n + }); + } + get h() { + if (!this.g) { + let t = Wi === 3 || Wi === 2 ? ` + ` : `\r + `; + const e = this.d.getValue("files.eol", { + overrideIdentifier: "jsonc" + }); + if (e && typeof e == "string" && e !== "auto") { + t = e; + } + this.g = { + eol: t, + insertSpaces: !!this.d.getValue("editor.insertSpaces", { + overrideIdentifier: "jsonc" + }), + tabSize: this.d.getValue("editor.tabSize", { + overrideIdentifier: "jsonc" + }) + }; + } + return this.g; + } + }; + } + }); + import * as QL from "fs"; + import * as ki from "os"; + async function Xm(t, e) { + const i = `${t}::${e.join(":")}`; + const s = e0.get(i); + if (s) { + return s; + } + const r = [{ + tag: "grunt.js", + filePattern: /^gruntfile\.js$/i + }, { + tag: "gulp.js", + filePattern: /^gulpfile\.js$/i + }, { + tag: "tsconfig.json", + filePattern: /^tsconfig\.json$/i + }, { + tag: "package.json", + filePattern: /^package\.json$/i + }, { + tag: "jsconfig.json", + filePattern: /^jsconfig\.json$/i + }, { + tag: "tslint.json", + filePattern: /^tslint\.json$/i + }, { + tag: "eslint.json", + filePattern: /^eslint\.json$/i + }, { + tag: "tasks.json", + filePattern: /^tasks\.json$/i + }, { + tag: "launch.json", + filePattern: /^launch\.json$/i + }, { + tag: "settings.json", + filePattern: /^settings\.json$/i + }, { + tag: "webpack.config.js", + filePattern: /^webpack\.config\.js$/i + }, { + tag: "project.json", + filePattern: /^project\.json$/i + }, { + tag: "makefile", + filePattern: /^makefile$/i + }, { + tag: "sln", + filePattern: /^.+\.sln$/i + }, { + tag: "csproj", + filePattern: /^.+\.csproj$/i + }, { + tag: "cmake", + filePattern: /^.+\.cmake$/i + }, { + tag: "github-actions", + filePattern: /^.+\.ya?ml$/i, + relativePathPattern: /^\.github(?:\/|\\)workflows$/i + }, { + tag: "devcontainer.json", + filePattern: /^devcontainer\.json$/i + }, { + tag: "dockerfile", + filePattern: /^(dockerfile|docker\-compose\.ya?ml)$/i + }, { + tag: "cursorrules", + filePattern: /^\.cursorrules$/i + }]; + const n = new Map(); + const o = new Map(); + const a = 20000; + function c(u, d, f, p) { + const w = d.substring(u.length + 1); + return Tt.withAsyncBody(async m => { + let y; + p.readdirCount++; + try { + y = await ee.readdir(d, { + withFileTypes: true + }); + } catch { + m(); + return; + } + if (p.count >= a) { + p.count += y.length; + p.maxReached = true; + m(); + return; + } + let b = y.length; + if (b === 0) { + m(); + return; + } + let k = y; + if (p.count + y.length > a) { + p.maxReached = true; + b = a - p.count; + k = y.slice(0, b); + } + p.count += y.length; + for (const A of k) { + if (A.isDirectory()) { + if (!f.includes(A.name)) { + await c(u, F(d, A.name), f, p); + } + if (--b === 0) { + m(); + return; + } + } else { + const C = A.name.lastIndexOf("."); + if (C >= 0) { + const _ = A.name.substring(C + 1); + if (_) { + n.set(_, (n.get(_) ?? 0) + 1); + } + } + for (const _ of r) { + if (_.relativePathPattern?.test(w) !== false && _.filePattern.test(A.name)) { + o.set(_.tag, (o.get(_.tag) ?? 0) + 1); + } + } + if (--b === 0) { + m(); + return; + } + } + } + }); + } + const l = Tt.withAsyncBody(async u => { + const d = { + count: 0, + maxReached: false, + readdirCount: 0 + }; + const f = new Jr(true); + await c(t, t, e, d); + const p = await tM(t); + u({ + configFiles: Qm(o), + fileTypes: Qm(n), + fileCount: d.count, + maxFilesReached: d.maxReached, + launchConfigFiles: p, + totalScanTime: f.elapsed(), + totalReaddirCount: d.readdirCount + }); + }); + e0.set(i, l); + return l; + } + function Qm(t) { + return Array.from(t.entries(), ([e, i]) => ({ + name: e, + count: i + })).sort((e, i) => i.count - e.count); + } + function eM() { + const t = { + os: `${ki.type()} ${ki.arch()} ${ki.release()}`, + memory: `${(ki.totalmem() / cn.GB).toFixed(2)}GB (${(ki.freemem() / cn.GB).toFixed(2)}GB free)`, + vmHint: `${Math.round(Oh.value() * 100)}%` + }; + const e = ki.cpus(); + if (e && e.length > 0) { + t.cpus = `${e[0].model} (${e.length} x ${e[0].speed})`; + } + return t; + } + async function tM(t) { + try { + const e = new Map(); + const i = F(t, ".vscode", "launch.json"); + const s = await QL.promises.readFile(i); + const r = []; + const n = gn(s.toString(), r); + if (r.length) { + console.log(`Unable to parse ${i}`); + return []; + } + if (Po(n) === "object" && n.configurations) { + for (const o of n.configurations) { + const a = o.type; + if (a) { + if (e.has(a)) { + e.set(a, e.get(a) + 1); + } else { + e.set(a, 1); + } + } + } + } + return Qm(e); + } catch { + return []; + } + } + var e0; + var ef; + var iM = g({ + "out-build/vs/platform/diagnostics/node/diagnosticsService.js"() { + "use strict"; + + ce(); + rr(); + Ie(); + we(); + H(); + Kn(); + se(); + _c(); + _t(); + b2(); + K1(); + He(); + ht(); + xt(); + e0 = new Map(); + ef = class { + constructor(e, i) { + this.c = e; + this.d = i; + } + f(e) { + const i = []; + i.push(`OS Version: ${e.os}`); + i.push(`CPUs: ${e.cpus}`); + i.push(`Memory (System): ${e.memory}`); + i.push(`VM: ${e.vmHint}`); + return i.join(` + `); + } + g(e) { + const i = []; + i.push(`Version: ${this.d.nameShort} ${this.d.version} (${this.d.commit || "Commit unknown"}, ${this.d.date || "Date unknown"})`); + i.push(`OS Version: ${ki.type()} ${ki.arch()} ${ki.release()}`); + const s = ki.cpus(); + if (s && s.length > 0) { + i.push(`CPUs: ${s[0].model} (${s.length} x ${s[0].speed})`); + } + i.push(`Memory (System): ${(ki.totalmem() / cn.GB).toFixed(2)}GB (${(ki.freemem() / cn.GB).toFixed(2)}GB free)`); + if (!j) { + i.push(`Load (avg): ${ki.loadavg().map(r => Math.round(r)).join(", ")}`); + } + i.push(`VM: ${Math.round(Oh.value() * 100)}%`); + i.push(`Screen Reader: ${e.screenReader ? "yes" : "no"}`); + i.push(`Process Argv: ${e.mainArguments.join(" ")}`); + i.push(`GPU Status: ${this.j(e.gpuFeatureStatus)}`); + return i.join(` + `); + } + async getPerformanceInfo(e, i) { + return Promise.all([Pg(e.mainPID), this.k(e)]).then(async s => { + let [r, n] = s; + let o = this.m(e, r); + i.forEach(a => { + if (G1(a)) { + o += ` + ${a.errorMessage}`; + n += ` + ${a.errorMessage}`; + } else { + o += ` + + Remote: ${a.hostName}`; + if (a.processes) { + o += ` + ${this.m(e, a.processes)}`; + } + if (a.workspaceMetadata) { + n += ` + | Remote: ${a.hostName}`; + for (const c of Object.keys(a.workspaceMetadata)) { + const l = a.workspaceMetadata[c]; + let u = `${l.fileCount} files`; + if (l.maxFilesReached) { + u = `more than ${u}`; + } + n += `| Folder (${c}): ${u}`; + n += this.h(l); + } + } + } + }); + return { + processInfo: o, + workspaceInfo: n + }; + }); + } + async getSystemInfo(e, i) { + const { + memory: s, + vmHint: r, + os: n, + cpus: o + } = eM(); + const a = { + os: n, + memory: s, + cpus: o, + vmHint: r, + processArgs: `${e.mainArguments.join(" ")}`, + gpuStatus: e.gpuFeatureStatus, + screenReader: `${e.screenReader ? "yes" : "no"}`, + remoteData: i + }; + if (!j) { + a.load = `${ki.loadavg().map(c => Math.round(c)).join(", ")}`; + } + if (Se) { + a.linuxEnv = { + desktopSession: process.env.DESKTOP_SESSION, + xdgSessionDesktop: process.env.XDG_SESSION_DESKTOP, + xdgCurrentDesktop: process.env.XDG_CURRENT_DESKTOP, + xdgSessionType: process.env.XDG_SESSION_TYPE + }; + } + return Promise.resolve(a); + } + async getDiagnostics(e, i) { + const s = []; + return Pg(e.mainPID).then(async r => { + s.push(""); + s.push(this.g(e)); + s.push(""); + s.push(this.m(e, r)); + if (e.windows.some(n => n.folderURIs && n.folderURIs.length > 0 && !n.remoteAuthority)) { + s.push(""); + s.push("Workspace Stats: "); + s.push(await this.k(e)); + } + i.forEach(n => { + if (G1(n)) { + s.push(` + ${n.errorMessage}`); + } else { + s.push(` + + `); + s.push(`Remote: ${n.hostName}`); + s.push(this.f(n.machineInfo)); + if (n.processes) { + s.push(this.m(e, n.processes)); + } + if (n.workspaceMetadata) { + for (const o of Object.keys(n.workspaceMetadata)) { + const a = n.workspaceMetadata[o]; + let c = `${a.fileCount} files`; + if (a.maxFilesReached) { + c = `more than ${c}`; + } + s.push(`Folder (${o}): ${c}`); + s.push(this.h(a)); + } + } + } + }); + s.push(""); + s.push(""); + return s.join(` + `); + }); + } + h(e) { + const i = []; + let r = 0; + const n = (l, u) => { + const d = ` ${l}(${u})`; + if (r + d.length > 60) { + i.push(o); + o = "| "; + r = o.length; + } else { + r += d.length; + } + o += d; + }; + let o = "| File types:"; + const a = 10; + const c = e.fileTypes.length > a ? a : e.fileTypes.length; + for (let l = 0; l < c; l++) { + const u = e.fileTypes[l]; + n(u.name, u.count); + } + i.push(o); + if (e.configFiles.length >= 0) { + o = "| Conf files:"; + r = 0; + e.configFiles.forEach(l => { + n(l.name, l.count); + }); + i.push(o); + } + if (e.launchConfigFiles.length > 0) { + let l = "| Launch Configs:"; + e.launchConfigFiles.forEach(u => { + const d = u.count > 1 ? ` ${u.name}(${u.count})` : ` ${u.name}`; + l += d; + }); + i.push(l); + } + return i.join(` + `); + } + j(e) { + const i = Math.max(...Object.keys(e).map(s => s.length)); + return Object.keys(e).map(s => `${s}: ${" ".repeat(i - s.length)} ${e[s]}`).join(` + `); + } + k(e) { + const i = []; + const s = []; + e.windows.forEach(r => { + if (r.folderURIs.length !== 0 && !r.remoteAuthority) { + i.push(`| Window (${r.title})`); + r.folderURIs.forEach(n => { + const o = P.revive(n); + if (o.scheme === R.file) { + const a = o.fsPath; + s.push(Xm(a, ["node_modules", ".git"]).then(c => { + let l = `${c.fileCount} files`; + if (c.maxFilesReached) { + l = `more than ${l}`; + } + i.push(`| Folder (${Ue(a)}): ${l}`); + i.push(this.h(c)); + }).catch(c => { + i.push(`| Error: Unable to collect workspace stats for folder ${a} (${c.toString()})`); + })); + } else { + i.push(`| Folder (${o.toString()}): Workspace stats not available.`); + } + }); + } + }); + return Promise.all(s).then(r => i.join(` + `)).catch(r => `Unable to collect workspace stats: ${r}`); + } + m(e, i) { + const s = new Map(); + e.windows.forEach(n => s.set(n.pid, `window [${n.id}] (${n.title})`)); + e.pidToNames.forEach(({ + pid: n, + name: o + }) => s.set(n, o)); + const r = []; + r.push("CPU %\tMem MB\t PID\tProcess"); + if (i) { + this.n(e.mainPID, s, r, i, 0); + } + return r.join(` + `); + } + n(e, i, s, r, n) { + const o = n === 0; + let a; + if (o) { + a = r.pid === e ? `${this.d.applicationName} main` : "remote agent"; + } else if (i.has(r.pid)) { + a = i.get(r.pid); + } else { + a = `${" ".repeat(n)} ${r.name}`; + } + const c = process.platform === "win32" ? r.mem : ki.totalmem() * (r.mem / 100); + s.push(`${r.load.toFixed(0).padStart(5, " ")} ${(c / cn.MB).toFixed(0).padStart(6, " ")} ${r.pid.toFixed(0).padStart(6, " ")} ${a}`); + if (Array.isArray(r.children)) { + r.children.forEach(l => this.n(e, i, s, l, n + 1)); + } + } + async getWorkspaceFileExtensions(e) { + const i = new Set(); + for (const { + uri: s + } of e.folders) { + const r = P.revive(s); + if (r.scheme !== R.file) { + continue; + } + const n = r.fsPath; + try { + (await Xm(n, ["node_modules", ".git"])).fileTypes.forEach(a => i.add(a.name)); + } catch {} + } + return { + extensions: [...i] + }; + } + async reportWorkspaceStats(e) { + for (const { + uri: i + } of e.folders) { + const s = P.revive(i); + if (s.scheme !== R.file) { + continue; + } + const r = s.fsPath; + try { + const n = await Xm(r, ["node_modules", ".git"]); + this.c.publicLog2("workspace.stats", { + "workspace.id": e.telemetryId, + rendererSessionId: e.rendererSessionId + }); + n.fileTypes.forEach(o => { + this.c.publicLog2("workspace.stats.file", { + rendererSessionId: e.rendererSessionId, + type: o.name, + count: o.count + }); + }); + n.launchConfigFiles.forEach(o => { + this.c.publicLog2("workspace.stats.launchConfigFile", { + rendererSessionId: e.rendererSessionId, + type: o.name, + count: o.count + }); + }); + n.configFiles.forEach(o => { + this.c.publicLog2("workspace.stats.configFiles", { + rendererSessionId: e.rendererSessionId, + type: o.name, + count: o.count + }); + }); + this.c.publicLog2("workspace.stats.metadata", { + duration: n.totalScanTime, + reachedLimit: n.maxFilesReached, + fileCount: n.fileCount, + readdirCount: n.totalReaddirCount + }); + } catch {} + } + } + }; + ef = __decorate([__param(0, Ot), __param(1, Ve)], ef); + } + }); + import { writeFileSync as sM } from "fs"; + import { tmpdir as rM } from "os"; + function nM(t) { + const e = qa(rM()); + try { + sM(e, ""); + if (t) { + console.log(`Marker file for --wait created: ${e}`); + } + return e; + } catch (i) { + if (t) { + console.error(`Failed to create marker file for --wait: ${i}`); + } + return; + } + } + var oM = g({ + "out-build/vs/platform/environment/node/wait.js"() { + "use strict"; + + gi(); + } + }); + function aM(t) { + return (t.scheme === "file" || t.scheme === "vscode-remote") && t.path.endsWith(".mdc"); + } + var j8; + var cM = g({ + "out-build/vs/base/common/mdc.js"() { + "use strict"; + + Ie(); + j8 = `--- + description: + globs: + alwaysApply: false + --- + `; + } + }); + var t0; + var tf; + var lM = g({ + "out-build/vs/platform/files/common/fileService.js"() { + "use strict"; + + zt(); + ce(); + Ze(); + At(); + B(); + er(); + Bl(); + M(); + go(); + Ie(); + Hs(); + nt(); + Ka(); + be(); + He(); + t2(); + X(); + $e(); + cM(); + tf = class extends T { + static { + t0 = this; + } + constructor(e) { + super(); + this.b = e; + this.a = 262144; + this.c = this.D(new $()); + this.onDidChangeFileSystemProviderRegistrations = this.c.event; + this.f = this.D(new $()); + this.onWillActivateFileSystemProvider = this.f.event; + this.g = this.D(new $()); + this.onDidChangeFileSystemProviderCapabilities = this.g.event; + this.h = new Map(); + this.q = this.D(new $()); + this.onDidRunOperation = this.q.event; + this.X = this.D(new $()); + this.Y = this.D(new $()); + this.onDidFilesChange = this.Y.event; + this.Z = this.D(new $()); + this.onDidWatchError = this.Z.event; + this.$ = new Map(); + this.cb = this.D(new Cp()); + } + registerProvider(e, i) { + if (this.h.has(e)) { + throw new Error(`A filesystem provider for the scheme '${e}' is already registered.`); + } + Ne(`code/registerFilesystem/${e}`); + const s = new De(); + this.h.set(e, i); + this.c.fire({ + added: true, + scheme: e, + provider: i + }); + s.add(i.onDidChangeFile(r => { + const n = new Fy(r, !this.S(i)); + this.X.fire(n); + if (!n.hasCorrelation()) { + this.Y.fire(n); + } + })); + if (typeof i.onDidWatchError == "function") { + s.add(i.onDidWatchError(r => this.Z.fire(new Error(r)))); + } + s.add(i.onDidChangeCapabilities(() => this.g.fire({ + provider: i, + scheme: e + }))); + return xe(() => { + this.c.fire({ + added: false, + scheme: e, + provider: i + }); + this.h.delete(e); + Et(s); + }); + } + getProvider(e) { + return this.h.get(e); + } + async activateProvider(e) { + const i = []; + this.f.fire({ + scheme: e, + join(s) { + i.push(s); + } + }); + if (!this.h.has(e)) { + await Tt.settled(i); + } + } + async canHandleResource(e) { + await this.activateProvider(e.scheme); + return this.hasProvider(e); + } + hasProvider(e) { + return this.h.has(e.scheme); + } + hasCapability(e, i) { + const s = this.h.get(e.scheme); + return !!s && !!(s.capabilities & i); + } + listCapabilities() { + return Vr.map(this.h, ([e, i]) => ({ + scheme: e, + capabilities: i.capabilities + })); + } + async j(e) { + if (!Nv(e)) { + throw new si(v(1920, null, this.sb(e)), 8); + } + await this.activateProvider(e.scheme); + const i = this.h.get(e.scheme); + if (!i) { + const s = new Vs(); + s.message = v(1921, null, e.toString()); + throw s; + } + return i; + } + async m(e) { + const i = await this.j(e); + if ($r(i) || Xi(i) || h1(i)) { + return i; + } + throw new Error(`Filesystem provider for scheme '${e.scheme}' neither has FileReadWrite, FileReadStream nor FileOpenReadWriteClose capability which is needed for the read operation.`); + } + async n(e) { + const i = await this.j(e); + if ($r(i) || Xi(i)) { + return i; + } + throw new Error(`Filesystem provider for scheme '${e.scheme}' neither has FileReadWrite nor FileOpenReadWriteClose capability which is needed for the write operation.`); + } + async resolve(e, i) { + try { + return await this.r(e, i); + } catch (s) { + throw Ou(s) === oe.FileNotFound ? new si(v(1922, null, this.sb(e)), 1) : on(s); + } + } + async r(e, i) { + const s = await this.j(e); + const r = this.S(s); + const n = i?.resolveTo; + const o = i?.resolveSingleChildDescendants; + const a = i?.resolveMetadata; + const c = await s.stat(e); + let l; + return this.s(s, e, c, undefined, !!a, (u, d) => { + if (!l) { + l = Pr.forUris(() => !r); + l.set(e, true); + if (n) { + l.fill(true, n); + } + } + if (l.get(u.resource) || l.findSuperstr(u.resource.with({ + query: null, + fragment: null + }))) { + return true; + } else if (u.isDirectory && o) { + return d === 1; + } else { + return false; + } + }); + } + async s(e, i, s, r, n, o) { + const { + providerExtUri: a + } = this.R(e); + const c = { + resource: i, + name: a.basename(i), + isFile: (s.type & Rt.File) !== 0, + isDirectory: (s.type & Rt.Directory) !== 0, + isSymbolicLink: (s.type & Rt.SymbolicLink) !== 0, + mtime: s.mtime, + ctime: s.ctime, + size: s.size, + readonly: !!((s.permissions ?? 0) & wo.Readonly) || !!(e.capabilities & 2048), + locked: !!((s.permissions ?? 0) & wo.Locked), + etag: _y({ + mtime: s.mtime, + size: s.size + }), + children: undefined + }; + if (c.isDirectory && o(c, r)) { + try { + const l = await e.readdir(i); + const u = await Tt.settled(l.map(async ([d, f]) => { + try { + const p = a.joinPath(i, d); + const w = n ? await e.stat(p) : { + type: f + }; + return await this.s(e, p, w, l.length, n, o); + } catch (p) { + this.b.trace(p); + return null; + } + })); + c.children = $t(u); + } catch (l) { + this.b.trace(l); + c.children = []; + } + return c; + } + return c; + } + async resolveAll(e) { + return Tt.settled(e.map(async i => { + try { + return { + stat: await this.r(i.resource, i.options), + success: true + }; + } catch (s) { + this.b.trace(s); + return { + stat: undefined, + success: false + }; + } + })); + } + async stat(e) { + const i = await this.j(e); + const s = await i.stat(e); + return this.s(i, e, s, undefined, true, () => false); + } + async exists(e) { + const i = await this.j(e); + try { + return !!(await i.stat(e)); + } catch { + return false; + } + } + async canCreateFile(e, i) { + try { + await this.t(e, i); + } catch (s) { + return s; + } + return true; + } + async t(e, i) { + if (!i?.overwrite && (await this.exists(e))) { + throw new si(v(1923, null, this.sb(e)), 3, i); + } + } + async createFile(e, i = z.fromString(""), s) { + if (aM(e) && i.toString().trim() === "") { + i = z.fromString(j8); + } + await this.t(e, s); + const r = await this.writeFile(e, i); + this.q.fire(new an(e, 0, r)); + return r; + } + async writeFile(e, i, s) { + const r = this.qb(await this.n(e), e); + const { + providerExtUri: n + } = this.R(r); + let o = s; + if (Cy(r) && !o?.atomic) { + const a = r.enforceAtomicWriteFile?.(e); + if (a) { + o = { + ...s, + atomic: a + }; + } + } + try { + if (!(await this.u(r, e, o))) { + await this.U(r, n.dirname(e)); + } + let c; + if (Xi(r) && !(i instanceof z)) { + if (cu(i)) { + const l = await Ik(i, 3); + if (l.ended) { + c = z.concat(l.buffer); + } else { + c = l; + } + } else { + c = $k(i, l => z.concat(l), 3); + } + } else { + c = i; + } + if (!$r(r) || Xi(r) && c instanceof z || Xi(r) && Cy(r) && o?.atomic) { + await this.hb(r, e, o, c); + } else { + await this.db(r, e, o, c instanceof z ? Wk(c) : c); + } + this.q.fire(new an(e, 4)); + } catch (a) { + throw new si(v(1924, null, this.sb(e), on(a).toString()), $s(a), o); + } + return this.resolve(e, { + resolveMetadata: true + }); + } + async u(e, i, s) { + const r = !!s?.unlock; + if (r && !(e.capabilities & 8192)) { + throw new Error(v(1925, null, this.sb(i))); + } + if (s?.atomic) { + if (!(e.capabilities & 32768)) { + throw new Error(v(1926, null, this.sb(i))); + } + if (!(e.capabilities & 2)) { + throw new Error(v(1927, null, this.sb(i))); + } + if (r) { + throw new Error(v(1928, null, this.sb(i))); + } + } + let o; + try { + o = await e.stat(i); + } catch { + return; + } + if (o.type & Rt.Directory) { + throw new si(v(1929, null, this.sb(i)), 0, s); + } + this.rb(i, o); + if (typeof s?.mtime == "number" && typeof s.etag == "string" && s.etag !== Wu && typeof o.mtime == "number" && typeof o.size == "number" && s.mtime < o.mtime && s.etag !== _y({ + mtime: s.mtime, + size: o.size + })) { + throw new si(v(1930, null), 3, s); + } + return o; + } + async readFile(e, i, s) { + const r = await this.m(e); + if (i?.atomic) { + return this.w(r, e, i, s); + } else { + return this.z(r, e, i, s); + } + } + async w(e, i, s, r) { + return new Promise((n, o) => { + this.cb.queueFor(i, async () => { + try { + const a = await this.z(e, i, s, r); + n(a); + } catch (a) { + o(a); + } + }, this.R(e).providerExtUri); + }); + } + async z(e, i, s, r) { + const n = await this.C(e, i, { + ...s, + preferUnbuffered: true + }, r); + return { + ...n, + value: await Za(n.value) + }; + } + async readFileStream(e, i, s) { + const r = await this.m(e); + return this.C(r, e, i, s); + } + async C(e, i, s, r) { + const n = new ns(r); + let o = s; + if (d1(e) && e.enforceAtomicReadFile?.(i)) { + o = { + ...s, + atomic: true + }; + } + const a = this.J(i, o).then(l => l, l => { + n.dispose(true); + throw l; + }); + let c; + try { + if (typeof o?.etag == "string" && o.etag !== Wu) { + await a; + } + if (o?.atomic && d1(e) || !$r(e) && !h1(e) || Xi(e) && o?.preferUnbuffered) { + c = this.I(e, i, o); + } else if (h1(e)) { + c = this.G(e, i, n.token, o); + } else { + c = this.H(e, i, n.token, o); + } + c.on("end", () => n.dispose()); + c.on("error", () => n.dispose()); + return { + ...(await a), + value: c + }; + } catch (l) { + if (c) { + await ab(c); + } + throw this.F(l, i, o); + } + } + F(e, i, s) { + const r = v(1931, null, this.sb(i), on(e).toString()); + if (e instanceof Fu) { + return new Fu(r, e.stat, s); + } else if (e instanceof Mu) { + return new Mu(r, e.fileOperationResult, e.size, e.options); + } else { + return new si(r, $s(e), s); + } + } + G(e, i, s, r = Object.create(null)) { + const n = e.readFileStream(i, r, s); + return cb(n, { + data: o => o instanceof z ? o : z.wrap(o), + error: o => this.F(o, i, r) + }, o => z.concat(o)); + } + H(e, i, s, r = Object.create(null)) { + const n = Uk(); + e2(e, i, n, o => o, { + ...r, + bufferSize: this.a, + errorTransformer: o => this.F(o, i, r) + }, s); + return n; + } + I(e, i, s) { + const r = lu(n => z.concat(n)); + (async () => { + try { + let n; + if (s?.atomic && d1(e)) { + n = await e.readFile(i, { + atomic: true + }); + } else { + n = await e.readFile(i); + } + if (typeof s?.position == "number") { + n = n.slice(s.position); + } + if (typeof s?.length == "number") { + n = n.slice(0, s.length); + } + this.L(i, n.byteLength, s); + r.end(z.wrap(n)); + } catch (n) { + r.error(n); + r.end(); + } + })(); + return r; + } + async J(e, i) { + const s = await this.resolve(e, { + resolveMetadata: true + }); + if (s.isDirectory) { + throw new si(v(1932, null, this.sb(e)), 0, i); + } + if (typeof i?.etag == "string" && i.etag !== Wu && i.etag === s.etag) { + throw new Fu(v(1933, null), s, i); + } + this.L(e, s.size, i); + return s; + } + L(e, i, s) { + if (typeof s?.limits?.size == "number" && i > s.limits.size) { + throw new Mu(v(1934, null, this.sb(e)), 7, i, s); + } + } + async canMove(e, i, s) { + return this.M(e, i, "move", s); + } + async canCopy(e, i, s) { + return this.M(e, i, "copy", s); + } + async M(e, i, s, r) { + if (e.toString() !== i.toString()) { + try { + const n = s === "move" ? this.qb(await this.n(e), e) : await this.m(e); + const o = this.qb(await this.n(i), i); + await this.Q(n, e, o, i, s, r); + } catch (n) { + return n; + } + } + return true; + } + async move(e, i, s) { + const r = this.qb(await this.n(e), e); + const n = this.qb(await this.n(i), i); + const o = await this.N(r, e, n, i, "move", !!s); + const a = await this.resolve(i, { + resolveMetadata: true + }); + this.q.fire(new an(e, o === "move" ? 2 : 3, a)); + return a; + } + async copy(e, i, s) { + const r = await this.m(e); + const n = this.qb(await this.n(i), i); + const o = await this.N(r, e, n, i, "copy", !!s); + const a = await this.resolve(i, { + resolveMetadata: true + }); + this.q.fire(new an(e, o === "copy" ? 3 : 2, a)); + return a; + } + async N(e, i, s, r, n, o) { + if (i.toString() === r.toString()) { + return n; + } + const { + exists: a, + isSameResourceWithDifferentPathCase: c + } = await this.Q(e, i, s, r, n, o); + if (a && !c && o) { + await this.del(r, { + recursive: true + }); + } + await this.U(s, this.R(s).providerExtUri.dirname(r)); + if (n === "copy") { + if (e === s && u1(e)) { + await e.copy(i, r, { + overwrite: o + }); + } else { + const l = await this.resolve(i); + if (l.isDirectory) { + await this.P(e, l, s, r); + } else { + await this.O(e, i, s, r); + } + } + return n; + } else if (e === s) { + await e.rename(i, r, { + overwrite: o + }); + return n; + } else { + await this.N(e, i, s, r, "copy", o); + await this.del(i, { + recursive: true + }); + return "copy"; + } + } + async O(e, i, s, r) { + if ($r(e) && $r(s)) { + return this.jb(e, i, s, r); + } + if ($r(e) && Xi(s)) { + return this.pb(e, i, s, r); + } + if (Xi(e) && $r(s)) { + return this.nb(e, i, s, r); + } + if (Xi(e) && Xi(s)) { + return this.lb(e, i, s, r); + } + } + async P(e, i, s, r) { + await s.mkdir(r); + if (Array.isArray(i.children)) { + await Tt.settled(i.children.map(async n => { + const o = this.R(s).providerExtUri.joinPath(r, n.name); + if (n.isDirectory) { + return this.P(e, await this.resolve(n.resource), s, o); + } else { + return this.O(e, n.resource, s, o); + } + })); + } + } + async Q(e, i, s, r, n, o) { + let a = false; + if (e === s) { + const { + providerExtUri: l, + isPathCaseSensitive: u + } = this.R(e); + if (!u) { + a = l.isEqual(i, r); + } + if (a && n === "copy") { + throw new Error(v(1935, null, this.sb(i), this.sb(r))); + } + if (!a && l.isEqualOrParent(r, i)) { + throw new Error(v(1936, null, this.sb(i), this.sb(r))); + } + } + const c = await this.exists(r); + if (c && !a) { + if (!o) { + throw new si(v(1937, null, this.sb(i), this.sb(r)), 4); + } + if (e === s) { + const { + providerExtUri: l + } = this.R(e); + if (l.isEqualOrParent(i, r)) { + throw new Error(v(1938, null, this.sb(i), this.sb(r))); + } + } + } + return { + exists: c, + isSameResourceWithDifferentPathCase: a + }; + } + R(e) { + const i = this.S(e); + return { + providerExtUri: i ? ke : kp, + isPathCaseSensitive: i + }; + } + S(e) { + return !!(e.capabilities & 1024); + } + async createFolder(e) { + const i = this.qb(await this.j(e), e); + await this.U(i, e); + const s = await this.resolve(e, { + resolveMetadata: true + }); + this.q.fire(new an(e, 0, s)); + return s; + } + async U(e, i) { + const s = []; + const { + providerExtUri: r + } = this.R(e); + while (!r.isEqual(i, r.dirname(i))) { + try { + if (!((await e.stat(i)).type & Rt.Directory)) { + throw new Error(v(1939, null, this.sb(i))); + } + break; + } catch (n) { + if (Ou(n) !== oe.FileNotFound) { + throw n; + } + s.push(r.basename(i)); + i = r.dirname(i); + } + } + for (let n = s.length - 1; n >= 0; n--) { + i = r.joinPath(i, s[n]); + try { + await e.mkdir(i); + } catch (o) { + if (Ou(o) !== oe.FileExists) { + throw o; + } + } + } + } + async canDelete(e, i) { + try { + await this.W(e, i); + } catch (s) { + return s; + } + return true; + } + async W(e, i) { + const s = this.qb(await this.j(e), e); + const r = !!i?.useTrash; + if (r && !(s.capabilities & 4096)) { + throw new Error(v(1940, null, this.sb(e))); + } + const n = i?.atomic; + if (n && !(s.capabilities & 65536)) { + throw new Error(v(1941, null, this.sb(e))); + } + if (r && n) { + throw new Error(v(1942, null, this.sb(e))); + } + let o; + try { + o = await s.stat(e); + } catch {} + if (o) { + this.rb(e, o); + } else { + throw new si(v(1943, null, this.sb(e)), 1); + } + if (!i?.recursive) { + const c = await this.resolve(e); + if (c.isDirectory && Array.isArray(c.children) && c.children.length > 0) { + throw new Error(v(1944, null, this.sb(e))); + } + } + return s; + } + async del(e, i) { + const s = await this.W(e, i); + let r = i; + if (_x(s) && !r?.atomic) { + const c = s.enforceAtomicDelete?.(e); + if (c) { + r = { + ...i, + atomic: c + }; + } + } + const n = !!r?.useTrash; + const o = !!r?.recursive; + const a = r?.atomic ?? false; + await s.delete(e, { + recursive: o, + useTrash: n, + atomic: a + }); + this.q.fire(new an(e, 1)); + } + async cloneFile(e, i) { + const s = await this.j(e); + const r = this.qb(await this.n(i), i); + if (s !== r || !this.R(s).providerExtUri.isEqual(e, i)) { + if (s === r && Ay(s)) { + return s.cloneFile(e, i); + } else { + await this.U(r, this.R(r).providerExtUri.dirname(i)); + if (s === r && u1(s)) { + return this.cb.queueFor(e, () => s.copy(e, i, { + overwrite: true + }), this.R(s).providerExtUri); + } else { + return this.cb.queueFor(e, () => this.O(s, e, r, i), this.R(s).providerExtUri); + } + } + } + } + static { + this.ab = 0; + } + createWatcher(e, i) { + return this.watch(e, { + ...i, + correlationId: t0.ab++ + }); + } + watch(e, i = { + recursive: false, + excludes: [] + }) { + const s = new De(); + let r = false; + let n = () => { + r = true; + }; + s.add(xe(() => n())); + (async () => { + try { + const a = await this.bb(e, i); + if (r) { + Et(a); + } else { + n = () => Et(a); + } + } catch (a) { + this.b.error(a); + } + })(); + const o = i.correlationId; + if (typeof o == "number") { + const a = s.add(new $()); + s.add(this.X.event(l => { + if (l.correlates(o)) { + a.fire(l); + } + })); + return { + onDidChange: a.event, + dispose: () => s.dispose() + }; + } + return s; + } + async bb(e, i) { + const s = await this.j(e); + const r = Ds([this.R(s).providerExtUri.getComparisonKey(e), i]); + let n = this.$.get(r); + if (!n) { + n = { + count: 0, + disposable: s.watch(e, i) + }; + this.$.set(r, n); + } + n.count += 1; + return xe(() => { + if (n) { + n.count--; + if (n.count === 0) { + Et(n.disposable); + this.$.delete(r); + } + } + }); + } + dispose() { + super.dispose(); + for (const [, e] of this.$) { + Et(e.disposable); + } + this.$.clear(); + } + async db(e, i, s, r) { + return this.cb.queueFor(i, async () => { + const n = await e.open(i, { + create: true, + unlock: s?.unlock ?? false + }); + try { + if (cu(r) || Wp(r)) { + await this.eb(e, n, r); + } else { + await this.fb(e, n, r); + } + } catch (o) { + throw on(o); + } finally { + await e.close(n); + } + }, this.R(e).providerExtUri); + } + async eb(e, i, s) { + let r = 0; + let n; + if (Wp(s)) { + if (s.buffer.length > 0) { + const o = z.concat(s.buffer); + await this.gb(e, i, o, o.byteLength, r, 0); + r += o.byteLength; + } + if (s.ended) { + return; + } + n = s.stream; + } else { + n = s; + } + return new Promise((o, a) => { + uu(n, { + onData: async c => { + n.pause(); + try { + await this.gb(e, i, c, c.byteLength, r, 0); + } catch (l) { + return a(l); + } + r += c.byteLength; + setTimeout(() => n.resume()); + }, + onError: c => a(c), + onEnd: () => o() + }); + }); + } + async fb(e, i, s) { + let r = 0; + let n; + while ((n = s.read()) !== null) { + await this.gb(e, i, n, n.byteLength, r, 0); + r += n.byteLength; + } + } + async gb(e, i, s, r, n, o) { + let a = 0; + while (a < r) { + const c = await e.write(i, n + a, s.buffer, o + a, r - a); + a += c; + } + } + async hb(e, i, s, r) { + return this.cb.queueFor(i, () => this.ib(e, i, s, r), this.R(e).providerExtUri); + } + async ib(e, i, s, r) { + let n; + if (r instanceof z) { + n = r; + } else if (cu(r)) { + n = await Za(r); + } else if (Wp(r)) { + n = await Tk(r); + } else { + n = Nk(r); + } + await e.writeFile(i, n.buffer, { + create: true, + overwrite: true, + unlock: s?.unlock ?? false, + atomic: s?.atomic ?? false + }); + } + async jb(e, i, s, r) { + return this.cb.queueFor(r, () => this.kb(e, i, s, r), this.R(s).providerExtUri); + } + async kb(e, i, s, r) { + let n; + let o; + try { + n = await e.open(i, { + create: false + }); + o = await s.open(r, { + create: true, + unlock: false + }); + const a = z.alloc(this.a); + let c = 0; + let l = 0; + let u = 0; + do { + u = await e.read(n, c, a.buffer, l, a.byteLength - l); + await this.gb(s, o, a, u, c, l); + c += u; + l += u; + if (l === a.byteLength) { + l = 0; + } + } while (u > 0); + } catch (a) { + throw on(a); + } finally { + await Tt.settled([typeof n == "number" ? e.close(n) : Promise.resolve(), typeof o == "number" ? s.close(o) : Promise.resolve()]); + } + } + async lb(e, i, s, r) { + return this.cb.queueFor(r, () => this.mb(e, i, s, r), this.R(s).providerExtUri); + } + async mb(e, i, s, r) { + return s.writeFile(r, await e.readFile(i), { + create: true, + overwrite: true, + unlock: false, + atomic: false + }); + } + async nb(e, i, s, r) { + return this.cb.queueFor(r, () => this.ob(e, i, s, r), this.R(s).providerExtUri); + } + async ob(e, i, s, r) { + const n = await s.open(r, { + create: true, + unlock: false + }); + try { + const o = await e.readFile(i); + await this.gb(s, n, z.wrap(o), o.byteLength, 0, 0); + } catch (o) { + throw on(o); + } finally { + await s.close(n); + } + } + async pb(e, i, s, r) { + const n = await Za(this.H(e, i, We.None)); + await this.hb(s, r, undefined, n); + } + qb(e, i) { + if (e.capabilities & 2048) { + throw new si(v(1945, null, this.sb(i)), 6); + } + return e; + } + rb(e, i) { + if ((i.permissions ?? 0) & wo.Readonly) { + throw new si(v(1946, null, this.sb(e)), 6); + } + } + sb(e) { + if (e.scheme === R.file) { + return e.fsPath; + } else { + return e.toString(true); + } + } + }; + tf = t0 = __decorate([__param(0, V)], tf); + } + }); + var U8; + var i0; + var uM = g({ + "out-build/vs/platform/instantiation/common/graph.js"() { + "use strict"; + + U8 = class { + constructor(t, e) { + this.key = t; + this.data = e; + this.incoming = new Map(); + this.outgoing = new Map(); + } + }; + i0 = class { + constructor(t) { + this.b = t; + this.a = new Map(); + } + roots() { + const t = []; + for (const e of this.a.values()) { + if (e.outgoing.size === 0) { + t.push(e); + } + } + return t; + } + insertEdge(t, e) { + const i = this.lookupOrInsertNode(t); + const s = this.lookupOrInsertNode(e); + i.outgoing.set(s.key, s); + s.incoming.set(i.key, i); + } + removeNode(t) { + const e = this.b(t); + this.a.delete(e); + for (const i of this.a.values()) { + i.outgoing.delete(e); + i.incoming.delete(e); + } + } + lookupOrInsertNode(t) { + const e = this.b(t); + let i = this.a.get(e); + if (!i) { + i = new U8(e, t); + this.a.set(e, i); + } + return i; + } + lookup(t) { + return this.a.get(this.b(t)); + } + isEmpty() { + return this.a.size === 0; + } + toString() { + const t = []; + for (const [e, i] of this.a) { + t.push(`${e} + (-> incoming)[${[...i.incoming.keys()].join(", ")}] + (outgoing ->)[${[...i.outgoing.keys()].join(",")}] + `); + } + return t.join(` + `); + } + findCycleSlow() { + for (const [t, e] of this.a) { + const i = new Set([t]); + const s = this.c(e, i); + if (s) { + return s; + } + } + } + c(t, e) { + for (const [i, s] of t.outgoing) { + if (e.has(i)) { + return [...e, i].join(" -> "); + } + e.add(i); + const r = this.c(s, e); + if (r) { + return r; + } + e.delete(i); + } + } + }; + } + }); + var B8; + var s0; + var q8; + var z8; + var sf; + var hM = g({ + "out-build/vs/platform/instantiation/common/instantiationService.js"() { + "use strict"; + + ce(); + $e(); + M(); + Ah(); + uM(); + Y(); + xg(); + $w(); + B8 = false; + s0 = class extends Error { + constructor(t, e) { + super("cyclic dependency between services"); + this.message = `REASON: ${e} + ${t.findCycleSlow() ?? `UNABLE to detect cycle, dumping graph: + ${t.toString()}`}`; + } + }; + q8 = class D0 { + constructor(e = new Ch(), i = false, s, r = B8) { + this.i = e; + this.j = i; + this.k = s; + this.l = r; + this.f = false; + this.g = new Set(); + this.h = new Set(); + this.t = new Set(); + this.i.set(Ss, this); + this._globalGraph = r ? s?._globalGraph ?? new i0(n => n) : undefined; + } + dispose() { + if (!this.f) { + this.f = true; + Et(this.h); + this.h.clear(); + for (const e of this.g) { + if (rE(e)) { + e.dispose(); + } + } + this.g.clear(); + } + } + m() { + if (this.f) { + throw new Error("InstantiationService has been disposed"); + } + } + createChild(e, i) { + this.m(); + const s = this; + const r = new class extends D0 { + dispose() { + s.h.delete(r); + super.dispose(); + } + }(e, this.j, this, this.l); + this.h.add(r); + i?.add(r); + return r; + } + invokeFunction(e, ...i) { + this.m(); + const s = sf.traceInvocation(this.l, e); + let r = false; + try { + return e({ + get: o => { + if (r) { + throw uw("service accessor is only valid during the invocation of its target method"); + } + const a = this.s(o, s); + if (!a) { + throw new Error(`[invokeFunction] unknown service '${o}'`); + } + return a; + } + }, ...i); + } finally { + r = true; + s.stop(); + } + } + createInstance(e, ...i) { + this.m(); + let s; + let r; + if (e instanceof ue) { + s = sf.traceCreation(this.l, e.ctor); + r = this.o(e.ctor, e.staticArguments.concat(i), s); + } else { + s = sf.traceCreation(this.l, e); + r = this.o(e, i, s); + } + s.stop(); + return r; + } + o(e, i = [], s) { + const r = rs.getServiceDependencies(e).sort((a, c) => a.index - c.index); + const n = []; + for (const a of r) { + const c = this.s(a.id, s); + if (!c) { + this.y(`[createInstance] ${e.name} depends on UNKNOWN service ${a.id}.`, false); + } + n.push(c); + } + const o = r.length > 0 ? r[0].index : i.length; + if (i.length !== o) { + console.trace(`[createInstance] First service dependency of ${e.name} at position ${o + 1} conflicts with ${i.length} static arguments`); + const a = o - i.length; + if (a > 0) { + i = i.concat(new Array(a)); + } else { + i = i.slice(0, o); + } + } + return Reflect.construct(e, i.concat(n)); + } + q(e, i) { + if (this.i.get(e) instanceof ue) { + this.i.set(e, i); + } else if (this.k) { + this.k.q(e, i); + } else { + throw new Error("illegalState - setting UNKNOWN service instance"); + } + } + r(e) { + const i = this.i.get(e); + if (!i && this.k) { + return this.k.r(e); + } else { + return i; + } + } + s(e, i) { + if (this._globalGraph && this.c) { + this._globalGraph.insertEdge(this.c, String(e)); + } + const s = this.r(e); + if (s instanceof ue) { + return this.u(e, s, i.branch(e, true)); + } else { + i.branch(e, false); + return s; + } + } + u(e, i, s) { + if (this.t.has(e)) { + throw new Error(`illegal state - RECURSIVELY instantiating service '${e}'`); + } + this.t.add(e); + try { + return this.v(e, i, s); + } finally { + this.t.delete(e); + } + } + v(e, i, s) { + const r = new i0(c => c.id.toString()); + let n = 0; + const o = [{ + id: e, + desc: i, + _trace: s + }]; + const a = new Set(); + while (o.length) { + const c = o.pop(); + if (!a.has(String(c.id))) { + a.add(String(c.id)); + r.lookupOrInsertNode(c); + if (n++ > 10000) { + throw new s0(r, "cycle count more than 1000"); + } + for (const l of rs.getServiceDependencies(c.desc.ctor)) { + const u = this.r(l.id); + if (!u) { + this.y(`[createInstance] ${e} depends on ${l.id} which is NOT registered.`, true); + } + this._globalGraph?.insertEdge(String(c.id), String(l.id)); + if (u instanceof ue) { + const d = { + id: l.id, + desc: u, + _trace: c._trace.branch(l.id, true) + }; + r.insertEdge(c, d); + o.push(d); + } + } + } + } + while (true) { + const c = r.roots(); + if (c.length === 0) { + if (!r.isEmpty()) { + throw new s0(r, "no more roots but still nodes in the graph"); + } + break; + } + for (const { + data: l + } of c) { + if (this.r(l.id) instanceof ue) { + const d = this.w(l.id, l.desc.ctor, l.desc.staticArguments, l.desc.supportsDelayedInstantiation, l._trace); + this.q(l.id, d); + } + r.removeNode(l); + } + } + return this.r(e); + } + w(e, i, s = [], r, n) { + if (this.i.get(e) instanceof ue) { + return this.x(e, i, s, r, n, this.g); + } + if (this.k) { + return this.k.w(e, i, s, r, n); + } + throw new Error(`illegalState - creating UNKNOWN service instance ${i.name}`); + } + x(e, i, s = [], r, n, o) { + if (r) { + const a = new D0(undefined, this.j, this, this.l); + a.c = String(e); + const c = new Map(); + const l = new Vv(() => { + const u = a.o(i, s, n); + for (const [d, f] of c) { + const p = u[d]; + if (typeof p == "function") { + for (const w of f) { + w.disposable = p.apply(u, w.listener); + } + } + } + c.clear(); + o.add(u); + return u; + }); + return new Proxy(Object.create(null), { + get(u, d) { + if (!l.isInitialized && typeof d == "string" && (d.startsWith("onDid") || d.startsWith("onWill"))) { + let w = c.get(d); + if (!w) { + w = new Qf(); + c.set(d, w); + } + return (y, b, k) => { + if (l.isInitialized) { + return l.value[d](y, b, k); + } + { + const A = { + listener: [y, b, k], + disposable: undefined + }; + const C = w.push(A); + return xe(() => { + C(); + A.disposable?.dispose(); + }); + } + }; + } + if (d in u) { + return u[d]; + } + const f = l.value; + let p = f[d]; + if (typeof p == "function") { + p = p.bind(f); + u[d] = p; + } + return p; + }, + set(u, d, f) { + l.value[d] = f; + return true; + }, + getPrototypeOf(u) { + return i.prototype; + } + }); + } else { + const a = this.o(i, s, n); + o.add(a); + return a; + } + } + y(e, i) { + if (i) { + console.warn(e); + } + if (this.j) { + throw new Error(e); + } + } + }; + (function (t) { + t[t.None = 0] = "None"; + t[t.Creation = 1] = "Creation"; + t[t.Invocation = 2] = "Invocation"; + t[t.Branch = 3] = "Branch"; + })(z8 ||= {}); + sf = class Us { + static { + this.all = new Set(); + } + static { + this.c = new class extends Us { + constructor() { + super(0, null); + } + stop() {} + branch() { + return this; + } + }(); + } + static traceInvocation(e, i) { + if (e) { + return new Us(2, i.name || new Error().stack.split(` + `).slice(3, 4).join(` + `)); + } else { + return Us.c; + } + } + static traceCreation(e, i) { + if (e) { + return new Us(1, i.name); + } else { + return Us.c; + } + } + static { + this.f = 0; + } + constructor(e, i) { + this.type = e; + this.name = i; + this.g = Date.now(); + this.h = []; + } + branch(e, i) { + const s = new Us(3, e.toString()); + this.h.push([e, i, s]); + return s; + } + stop() { + const e = Date.now() - this.g; + Us.f += e; + let i = false; + function s(n, o) { + const a = []; + const c = new Array(n + 1).join("\t"); + for (const [l, u, d] of o.h) { + if (u && d) { + i = true; + a.push(`${c}CREATES -> ${l}`); + const f = s(n + 1, d); + if (f) { + a.push(f); + } + } else { + a.push(`${c}uses -> ${l}`); + } + } + return a.join(` + `); + } + const r = [`${this.type === 1 ? "CREATE" : "CALL"} ${this.name}`, `${s(1, this)}`, `DONE, took ${e.toFixed(2)}ms (grand total ${Us.f.toFixed(2)}ms)`]; + if (e > 2 || i) { + Us.all.add(r.join(` + `)); + } + } + }; + } + }); + var H8; + var dM = g({ + "out-build/vs/platform/log/common/bufferLog.js"() { + "use strict"; + + M(); + X(); + H8 = class extends c1 { + constructor(t = rc) { + super(); + this.n = []; + this.q = undefined; + this.r = this.D(new pr()); + this.setLevel(t); + } + set logger(t) { + this.q = t; + this.setLevel(t.getLevel()); + this.r.value = t.onDidChangeLogLevel(this.setLevel, this); + for (const { + level: e, + message: i + } of this.n) { + a1(t, e, i); + } + this.n = []; + } + m(t, e) { + if (this.q) { + a1(this.q, t, e); + } else if (this.getLevel() <= t) { + this.n.push({ + level: t, + message: e + }); + } + } + dispose() { + this.q?.dispose(); + super.dispose(); + } + flush() { + this.q?.flush(); + } + }; + } + }); + import { session as fM } from "electron"; + var rf; + var pM = g({ + "out-build/vs/platform/protocol/electron-main/protocolMainService.js"() { + "use strict"; + + M(); + Ie(); + we(); + H(); + go(); + se(); + _i(); + as(); + Ri(); + X(); + _s(); + rf = class extends T { + constructor(e, i, s) { + super(); + this.c = e; + this.f = s; + this.a = Pr.forPaths(!Se); + this.b = new Set([".svg", ".png", ".jpg", ".jpeg", ".gif", ".bmp", ".webp", ".mp4", ".otf", ".ttf"]); + this.addValidFileRoot(e.appRoot); + this.addValidFileRoot(e.extensionsPath); + this.addValidFileRoot(i.defaultProfile.globalStorageHome.with({ + scheme: R.file + }).fsPath); + this.addValidFileRoot(e.workspaceStorageHome.with({ + scheme: R.file + }).fsPath); + this.g(); + } + g() { + const { + defaultSession: e + } = fM; + e.protocol.registerFileProtocol(R.vscodeFileResource, (i, s) => this.j(i, s)); + e.protocol.interceptFileProtocol(R.file, (i, s) => this.h(i, s)); + this.D(xe(() => { + e.protocol.unregisterProtocol(R.vscodeFileResource); + e.protocol.uninterceptProtocol(R.file); + })); + } + addValidFileRoot(e) { + const i = pi(e); + if (this.a.get(i)) { + return T.None; + } else { + this.a.set(i, true); + return xe(() => this.a.delete(i)); + } + } + h(e, i) { + const s = P.parse(e.url); + this.f.error(`Refused to load resource ${s.fsPath} from ${R.file}: protocol (original URL: ${e.url})`); + return i({ + error: -3 + }); + } + j(e, i) { + const s = this.m(e); + const r = Ue(s); + let n; + if (this.c.crossOriginIsolated) { + if (r === "workbench.html" || r === "workbench-dev.html") { + n = Ha.CoopAndCoep; + } else { + n = Ha.getHeadersFromQuery(e.url); + } + } + if (!this.c.isBuilt) { + n = { + ...n, + ...Ov + }; + } + if (r === "workbench.html" || r === "workbench-dev.html") { + n = { + ...n, + ...Lv + }; + } + if (this.a.findSubstr(s)) { + return i({ + path: s, + headers: n + }); + } else if (this.b.has(Kl(s).toLowerCase())) { + return i({ + path: s, + headers: n + }); + } else { + this.f.error(`${R.vscodeFileResource}: Refused to load resource ${s} from ${R.vscodeFileResource}: protocol (original URL: ${e.url})`); + return i({ + error: -3 + }); + } + } + m(e) { + const i = P.parse(e.url); + const s = Ct.uriToFileUri(i); + return pi(s.fsPath); + } + createIPCObjectUrl() { + let e; + const i = P.from({ + scheme: "vscode", + path: ti() + }); + const s = i.toString(); + const r = async () => e; + it.handle(s, r); + this.f.trace(`IPC Object URL: Registered new channel ${s}.`); + return { + resource: i, + update: n => e = n, + dispose: () => { + this.f.trace(`IPC Object URL: Removed channel ${s}.`); + it.removeHandler(s); + } + }; + } + }; + rf = __decorate([__param(0, tr), __param(1, Cs), __param(2, V)], rf); + } + }); + function gM(t) { + return !!t.forwardPort; + } + function mM(t) { + if (t.scheme !== "http" && t.scheme !== "https") { + return; + } + const e = /^(localhost|127\.0\.0\.1|0\.0\.0\.0):(\d+)$/.exec(t.authority); + if (e) { + return { + address: e[1], + port: +e[2] + }; + } + } + function r0(t) { + return of.indexOf(t) >= 0; + } + function gl(t) { + return af.indexOf(t) >= 0; + } + function wM(t, e, i, s) { + if (i === 1) { + return false; + } + if (i === 2 && gl(e)) { + const r = /(\d+)\.(\d+)\.(\d+)/g.exec(s); + if (r?.length === 4 && parseInt(r[1]) >= 18) { + return false; + } + } + return t < 1024; + } + var V8; + var vM; + var G8; + var nf; + var J8; + var of; + var af; + var cf; + var K8 = g({ + "out-build/vs/platform/tunnel/common/tunnel.js"() { + "use strict"; + + B(); + M(); + se(); + Ke(); + Y(); + X(); + V8 = q("tunnelService"); + vM = q("sharedTunnelsService"); + (function (t) { + t.Http = "http"; + t.Https = "https"; + })(G8 ||= {}); + (function (t) { + t.ConstantPrivate = "constantPrivate"; + t.Private = "private"; + t.Public = "public"; + })(nf ||= {}); + (function (t) { + t[t.Notify = 1] = "Notify"; + t[t.OpenBrowser = 2] = "OpenBrowser"; + t[t.OpenPreview = 3] = "OpenPreview"; + t[t.Silent = 4] = "Silent"; + t[t.Ignore = 5] = "Ignore"; + t[t.OpenBrowserOnce = 6] = "OpenBrowserOnce"; + })(J8 ||= {}); + of = ["localhost", "127.0.0.1", "0:0:0:0:0:0:0:1", "::1"]; + af = ["0.0.0.0", "0:0:0:0:0:0:0:0", "::"]; + cf = class extends T { + constructor(e, i) { + super(); + this.q = e; + this.r = i; + this.a = new $(); + this.onTunnelOpened = this.a.event; + this.b = new $(); + this.onTunnelClosed = this.b.event; + this.c = new $(); + this.onAddedTunnelProvider = this.c.event; + this.f = new Map(); + this.h = false; + this.j = true; + this.m = []; + this.n = new Set(); + } + get hasTunnelProvider() { + return !!this.g; + } + get s() { + const e = this.r.getValue("remote.localPortHost"); + if (!e || e === "localhost") { + return "127.0.0.1"; + } else { + return "0.0.0.0"; + } + } + setTunnelProvider(e) { + this.g = e; + if (e) { + this.c.fire(); + return { + dispose: () => { + this.g = undefined; + this.h = false; + this.m = []; + } + }; + } else { + this.h = false; + this.m = []; + this.c.fire(); + return { + dispose: () => {} + }; + } + } + setTunnelFeatures(e) { + this.h = e.elevation; + this.m = e.privacyOptions; + this.j = e.protocol; + } + get canChangeProtocol() { + return this.j; + } + get canElevate() { + return this.h; + } + get canChangePrivacy() { + return this.m.length > 0; + } + get privacyOptions() { + return this.m; + } + get tunnels() { + return this.t(); + } + async t() { + const e = []; + const i = Array.from(this.f.values()); + for (const s of i) { + const r = Array.from(s.values()); + for (const n of r) { + const o = await n.value; + if (o && typeof o != "string") { + e.push(o); + } + } + } + return e; + } + async dispose() { + super.dispose(); + for (const e of this.f.values()) { + for (const { + value: i + } of e.values()) { + await i.then(s => typeof s != "string" ? s?.dispose() : undefined); + } + e.clear(); + } + this.f.clear(); + } + setEnvironmentTunnel(e, i, s, r, n) { + this.y(e, i, Promise.resolve({ + tunnelRemoteHost: e, + tunnelRemotePort: i, + localAddress: s, + privacy: r, + protocol: n, + dispose: () => Promise.resolve() + })); + } + async getExistingTunnel(e, i) { + if (gl(e) || r0(e)) { + e = of[0]; + } + const s = this.C(e, i); + if (s) { + ++s.refcount; + return s.value; + } + } + openTunnel(e, i, s, r, n, o = false, a, c) { + this.q.trace(`ForwardedPorts: (TunnelService) openTunnel request for ${i}:${s} on local port ${n}.`); + const l = this.g ?? e; + if (!l) { + return; + } + i ||= "localhost"; + r ||= this.s; + if (this.g && this.n.has(s)) { + this.q.debug("ForwardedPorts: (TunnelService) Another call to create a tunnel with the same address has occurred before the last one completed. This call will be ignored."); + return; + } + const u = this.F(l, i, s, r, n, o, a, c); + if (u) { + return u.then(d => { + if (d) { + if (typeof d == "string") { + this.q.trace("ForwardedPorts: (TunnelService) The tunnel provider returned an error when creating the tunnel."); + this.z(i, s); + return d; + } + } else { + this.q.trace("ForwardedPorts: (TunnelService) New tunnel is undefined."); + this.z(i, s); + return; + } + this.q.trace("ForwardedPorts: (TunnelService) New tunnel established."); + const f = this.u(d); + if (d.tunnelRemoteHost !== i || d.tunnelRemotePort !== s) { + this.q.warn("ForwardedPorts: (TunnelService) Created tunnel does not match requirements of requested tunnel. Host or port mismatch."); + } + if (a && d.privacy !== a) { + this.q.warn("ForwardedPorts: (TunnelService) Created tunnel does not match requirements of requested tunnel. Privacy mismatch."); + } + this.a.fire(f); + return f; + }); + } else { + this.q.trace("ForwardedPorts: (TunnelService) Tunnel was not created."); + return u; + } + } + u(e) { + return { + tunnelRemotePort: e.tunnelRemotePort, + tunnelRemoteHost: e.tunnelRemoteHost, + tunnelLocalPort: e.tunnelLocalPort, + localAddress: e.localAddress, + privacy: e.privacy, + protocol: e.protocol, + dispose: async () => { + this.q.trace(`ForwardedPorts: (TunnelService) dispose request for ${e.tunnelRemoteHost}:${e.tunnelRemotePort} `); + const i = this.f.get(e.tunnelRemoteHost); + if (i) { + const s = i.get(e.tunnelRemotePort); + if (s) { + s.refcount--; + await this.w(e.tunnelRemoteHost, e.tunnelRemotePort, s); + } + } + } + }; + } + async w(e, i, s) { + if (s.refcount <= 0) { + this.q.trace(`ForwardedPorts: (TunnelService) Tunnel is being disposed ${e}:${i}.`); + const r = s.value.then(async n => { + if (n && typeof n != "string") { + await n.dispose(true); + this.b.fire({ + host: n.tunnelRemoteHost, + port: n.tunnelRemotePort + }); + } + }); + if (this.f.has(e)) { + this.f.get(e).delete(i); + } + return r; + } + } + async closeTunnel(e, i) { + this.q.trace(`ForwardedPorts: (TunnelService) close request for ${e}:${i} `); + const s = this.f.get(e); + if (s && s.has(i)) { + const r = s.get(i); + r.refcount = 0; + await this.w(e, i, r); + } + } + y(e, i, s) { + if (!this.f.has(e)) { + this.f.set(e, new Map()); + } + this.f.get(e).set(i, { + refcount: 1, + value: s + }); + } + async z(e, i) { + const s = this.f.get(e); + if (s) { + const r = s.get(i); + const n = r ? await r.value : undefined; + if (!n || typeof n == "string") { + s.delete(i); + } + if (s.size === 0) { + this.f.delete(e); + } + } + } + C(e, i) { + const s = [e]; + if (r0(e)) { + s.push(...of); + s.push(...af); + } else if (gl(e)) { + s.push(...af); + } + const r = s.map(n => this.f.get(n)); + for (const n of r) { + const o = n?.get(i); + if (o) { + return o; + } + } + } + canTunnel(e) { + return !!mM(e); + } + G(e, i, s, r, n, o, a) { + this.q.trace(`ForwardedPorts: (TunnelService) Creating tunnel with provider ${i}:${s} on local port ${r}.`); + const c = s; + this.n.add(c); + const l = r === undefined ? s : r; + const u = { + elevationRequired: n ? this.isPortPrivileged(l) : false + }; + const d = { + remoteAddress: { + host: i, + port: s + }, + localAddressPort: r, + privacy: o, + public: o ? o !== nf.Private : undefined, + protocol: a + }; + const f = e.forwardPort(d, u); + if (f) { + this.y(i, s, f); + f.finally(() => { + this.q.trace("ForwardedPorts: (TunnelService) Tunnel created by provider."); + this.n.delete(c); + }); + } else { + this.n.delete(c); + } + return f; + } + }; + cf = __decorate([__param(0, V), __param(1, Je)], cf); + } + }); + var bM; + var Z8; + var jr; + var lf; + var yM = g({ + "out-build/vs/platform/remote/common/remoteAuthorityResolver.js"() { + "use strict"; + + $e(); + Y(); + bM = q("remoteAuthorityResolverService"); + (function (t) { + t[t.WebSocket = 0] = "WebSocket"; + t[t.Managed = 1] = "Managed"; + })(Z8 ||= {}); + (function (t) { + t.Unknown = "Unknown"; + t.NotAvailable = "NotAvailable"; + t.TemporarilyNotAvailable = "TemporarilyNotAvailable"; + t.NoResolverFound = "NoResolverFound"; + t.InvalidAuthority = "InvalidAuthority"; + })(jr ||= {}); + lf = class Bn extends Vs { + static isNotAvailable(e) { + return e instanceof Bn && e._code === jr.NotAvailable; + } + static isTemporarilyNotAvailable(e) { + return e instanceof Bn && e._code === jr.TemporarilyNotAvailable; + } + static isNoResolverFound(e) { + return e instanceof Bn && e._code === jr.NoResolverFound; + } + static isInvalidAuthority(e) { + return e instanceof Bn && e._code === jr.InvalidAuthority; + } + static isHandled(e) { + return e instanceof Bn && e.isHandled; + } + constructor(e, i = jr.Unknown, s) { + super(e); + this._message = e; + this._code = i; + this._detail = s; + this.isHandled = i === jr.NotAvailable && s === true; + Object.setPrototypeOf(this, Bn.prototype); + } + }; + } + }); + function n0(t) { + switch (t) { + case 1: + return "Management"; + case 2: + return "ExtensionHost"; + case 3: + return "Tunnel"; + } + } + function Y8(t) { + const e = new ns(); + setTimeout(() => e.cancel(), t); + return e.token; + } + function SM(t, e) { + if (t.isCancellationRequested || e.isCancellationRequested) { + return We.Cancelled; + } + const i = new ns(); + t.onCancellationRequested(() => i.cancel()); + e.onCancellationRequested(() => i.cancel()); + return i.token; + } + function EM(t, e) { + const i = new hf(e); + i.registerDisposable(t.onControlMessage(s => { + const r = JSON.parse(s.toString()); + const n = IM(r); + if (n) { + i.reject(n); + } else { + i.resolve(r); + } + })); + return i.promise; + } + function kM(t, e, i, s, r, n, o, a) { + const c = new hf(a); + const l = Jr.create(false); + t.info(`Creating a socket (${o})...`); + Ne(`code/willCreateSocket/${n}`); + e.connect(i, s, r, o).then(u => { + if (c.didTimeout) { + Ne(`code/didCreateSocketError/${n}`); + t.info(`Creating a socket (${o}) finished after ${l.elapsed()} ms, but this is too late and has timed out already.`); + u?.dispose(); + } else { + Ne(`code/didCreateSocketOK/${n}`); + t.info(`Creating a socket (${o}) was successful after ${l.elapsed()} ms.`); + c.resolve(u); + } + }, u => { + Ne(`code/didCreateSocketError/${n}`); + t.info(`Creating a socket (${o}) returned an error after ${l.elapsed()} ms.`); + t.error(u); + c.reject(u); + }); + return c.promise; + } + function o0(t, e) { + const i = new hf(e); + t.then(s => { + if (!i.didTimeout) { + i.resolve(s); + } + }, s => { + if (!i.didTimeout) { + i.reject(s); + } + }); + return i.promise; + } + async function xM(t, e, i, s) { + const r = e3(t, e); + t.logService.trace(`${r} 1/6. invoking socketFactory.connect().`); + let n; + try { + n = await kM(t.logService, t.remoteSocketFactoryService, t.connectTo, Ep.getServerRootPath(), `reconnectionToken=${t.reconnectionToken}&reconnection=${t.reconnectionProtocol ? "true" : "false"}`, n0(e), `renderer-${n0(e)}-${t.reconnectionToken}`, s); + } catch (u) { + t.logService.error(`${r} socketFactory.connect() failed or timed out. Error:`); + t.logService.error(u); + throw u; + } + t.logService.trace(`${r} 2/6. socketFactory.connect() was successful.`); + let o; + let a; + if (t.reconnectionProtocol) { + t.reconnectionProtocol.beginAcceptReconnection(n, null); + o = t.reconnectionProtocol; + a = false; + } else { + o = new Ib({ + socket: n + }); + a = true; + } + t.logService.trace(`${r} 3/6. sending AuthRequest control message.`); + const c = await o0(t.signService.createNewMessage(ti()), s); + const l = { + type: "auth", + auth: t.connectionToken || "00000000000000000000", + data: c.data + }; + o.sendControl(z.fromString(JSON.stringify(l))); + try { + const u = await EM(o, SM(s, Y8(10000))); + if (u.type !== "sign" || typeof u.data != "string") { + const w = new Error("Unexpected handshake message"); + w.code = "VSCODE_CONNECTION_ERROR"; + throw w; + } + t.logService.trace(`${r} 4/6. received SignRequest control message.`); + if (!(await o0(t.signService.validate(c, u.signedData), s))) { + const w = new Error("Refused to connect to unsupported server"); + w.code = "VSCODE_CONNECTION_ERROR"; + throw w; + } + const f = await o0(t.signService.sign(u.data), s); + const p = { + type: "connectionType", + commit: t.commit, + signedData: f, + desiredConnectionType: e + }; + if (i) { + p.args = i; + } + t.logService.trace(`${r} 5/6. sending ConnectionTypeRequest control message.`); + o.sendControl(z.fromString(JSON.stringify(p))); + return { + protocol: o, + ownsProtocol: a + }; + } catch (u) { + if (u && u.code === "ETIMEDOUT") { + t.logService.error(`${r} the handshake timed out. Error:`); + t.logService.error(u); + } + if (u && u.code === "VSCODE_CONNECTION_ERROR") { + t.logService.error(`${r} received error control message when negotiating connection. Error:`); + t.logService.error(u); + } + if (a) { + Q8(o); + } + throw u; + } + } + async function DM(t, e, i) { + const s = Date.now(); + const r = e3(t, 3); + const { + protocol: n + } = await xM(t, 3, e, i); + t.logService.trace(`${r} 6/6. handshake finished, connection is up and running after ${_M(s)}!`); + return n; + } + async function X8(t, e, i) { + const { + connectTo: s, + connectionToken: r + } = await t.addressProvider.getAddress(); + return { + commit: t.commit, + quality: t.quality, + connectTo: s, + connectionToken: r, + reconnectionToken: e, + reconnectionProtocol: i, + remoteSocketFactoryService: t.remoteSocketFactoryService, + signService: t.signService, + logService: t.logService + }; + } + async function PM(t, e, i) { + const s = await X8(t, ti(), null); + return await DM(s, { + host: e, + port: i + }, We.None); + } + function $M(t) { + return Qn(e => new Promise((i, s) => { + const r = setTimeout(i, t * 1000); + e.onCancellationRequested(() => { + clearTimeout(r); + i(); + }); + })); + } + function Q8(t) { + try { + t.acceptDisconnect(); + const e = t.getSocket(); + t.dispose(); + e.dispose(); + } catch (e) { + Ft(e); + } + } + function IM(t) { + if (t && t.type === "error") { + const e = new Error(`Connection error: ${t.reason}`); + e.code = "VSCODE_CONNECTION_ERROR"; + return e; + } + return null; + } + function AM(t, e) { + while (t.length < e) { + t += " "; + } + return t; + } + function CM(t, e) { + return `[remote-connection][${AM(n0(t), 13)}][${e.substr(0, 5)}\u2026]`; + } + function uf(t, e, i) { + return `${CM(t, e)}[${i ? "reconnect" : "initial"}]`; + } + function e3(t, e) { + return `${uf(e, t.reconnectionToken, !!t.reconnectionProtocol)}[${t.connectTo}]`; + } + function _M(t) { + return `${Date.now() - t} ms`; + } + var t3; + var i3; + var hf; + var s3; + var r3; + var n3; + var o3; + var a0; + var a3; + var RM; + var OM = g({ + "out-build/vs/platform/remote/common/remoteAgentConnection.js"() { + "use strict"; + + ce(); + Ze(); + At(); + $e(); + B(); + M(); + Ie(); + Hs(); + Kn(); + _i(); + Ab(); + yM(); + Wg(); + t3 = 30000; + (function (t) { + t[t.Management = 1] = "Management"; + t[t.ExtensionHost = 2] = "ExtensionHost"; + t[t.Tunnel = 3] = "Tunnel"; + })(i3 ||= {}); + hf = class { + get didTimeout() { + return this.c === "timedout"; + } + constructor(t) { + this.c = "pending"; + this.d = new De(); + ({ + promise: this.promise, + resolve: this.f, + reject: this.g + } = tk()); + if (t.isCancellationRequested) { + this.h(); + } else { + this.d.add(t.onCancellationRequested(() => this.h())); + } + } + registerDisposable(t) { + if (this.c === "pending") { + this.d.add(t); + } else { + t.dispose(); + } + } + h() { + if (this.c === "pending") { + this.d.dispose(); + this.c = "timedout"; + this.g(this.i()); + } + } + i() { + const t = new Error("Time limit reached"); + t.code = "ETIMEDOUT"; + t.syscall = "connect"; + return t; + } + resolve(t) { + if (this.c === "pending") { + this.d.dispose(); + this.c = "resolved"; + this.f(t); + } + } + reject(t) { + if (this.c === "pending") { + this.d.dispose(); + this.c = "rejected"; + this.g(t); + } + } + }; + (function (t) { + t[t.ConnectionLost = 0] = "ConnectionLost"; + t[t.ReconnectionWait = 1] = "ReconnectionWait"; + t[t.ReconnectionRunning = 2] = "ReconnectionRunning"; + t[t.ReconnectionPermanentFailure = 3] = "ReconnectionPermanentFailure"; + t[t.ConnectionGain = 4] = "ConnectionGain"; + })(s3 ||= {}); + r3 = class { + constructor(t, e) { + this.reconnectionToken = t; + this.millisSinceLastIncomingData = e; + this.type = 0; + } + }; + n3 = class { + constructor(t, e, i, s) { + this.reconnectionToken = t; + this.millisSinceLastIncomingData = e; + this.durationSeconds = i; + this.c = s; + this.type = 1; + } + skipWait() { + this.c.cancel(); + } + }; + o3 = class { + constructor(t, e, i) { + this.reconnectionToken = t; + this.millisSinceLastIncomingData = e; + this.attempt = i; + this.type = 2; + } + }; + a0 = class { + constructor(t, e, i) { + this.reconnectionToken = t; + this.millisSinceLastIncomingData = e; + this.attempt = i; + this.type = 4; + } + }; + a3 = class { + constructor(t, e, i, s) { + this.reconnectionToken = t; + this.millisSinceLastIncomingData = e; + this.attempt = i; + this.handled = s; + this.type = 3; + } + }; + RM = class hr extends T { + static triggerPermanentFailure(e, i, s) { + this._permanentFailure = true; + this.f = e; + this.g = i; + this.h = s; + this.j.forEach(r => r.F(this.f, this.g, this.h)); + } + static debugTriggerReconnection() { + this.j.forEach(e => e.w()); + } + static debugPauseSocketWriting() { + this.j.forEach(e => e.G()); + } + static { + this._permanentFailure = false; + } + static { + this.f = 0; + } + static { + this.g = 0; + } + static { + this.h = false; + } + static { + this.j = []; + } + get n() { + return this.c || hr._permanentFailure; + } + constructor(e, i, s, r, n) { + super(); + this.s = e; + this.t = i; + this.reconnectionToken = s; + this.protocol = r; + this.u = n; + this.m = this.D(new $()); + this.onDidStateChange = this.m.event; + this.c = false; + this.q = false; + this.r = false; + this.m.fire(new a0(this.reconnectionToken, 0, 0)); + this.D(r.onSocketClose(o => { + const a = uf(this.s, this.reconnectionToken, true); + if (o) { + if (o.type === 0) { + this.t.logService.info(`${a} received socket close event (hadError: ${o.hadError}).`); + if (o.error) { + this.t.logService.error(o.error); + } + } else { + this.t.logService.info(`${a} received socket close event (wasClean: ${o.wasClean}, code: ${o.code}, reason: ${o.reason}).`); + if (o.event) { + this.t.logService.error(o.event); + } + } + } else { + this.t.logService.info(`${a} received socket close event.`); + } + this.w(); + })); + this.D(r.onSocketTimeout(o => { + const a = uf(this.s, this.reconnectionToken, true); + this.t.logService.info(`${a} received socket timeout event (unacknowledgedMsgCount: ${o.unacknowledgedMsgCount}, timeSinceOldestUnacknowledgedMsg: ${o.timeSinceOldestUnacknowledgedMsg}, timeSinceLastReceivedSomeData: ${o.timeSinceLastReceivedSomeData}).`); + this.w(); + })); + hr.j.push(this); + this.D(xe(() => { + const o = hr.j.indexOf(this); + if (o >= 0) { + hr.j.splice(o, 1); + } + })); + if (this.n) { + this.F(hr.f, hr.g, hr.h); + } + } + dispose() { + super.dispose(); + this.r = true; + } + async w() { + if (!this.q) { + try { + this.q = true; + await this.z(); + } finally { + this.q = false; + } + } + } + y() { + const e = this.getRemoteAuthority(); + return !!e && Bh(e) !== undefined; + } + async z() { + if (this.n || this.r) { + return; + } + const e = uf(this.s, this.reconnectionToken, true); + this.t.logService.info(`${e} starting reconnecting loop. You can get more information with the trace log level.`); + this.m.fire(new r3(this.reconnectionToken, this.protocol.getMillisSinceLastIncomingData())); + const i = [0, 5, 5, 10, 10, 10, 10, 10, 30]; + let s = -1; + do { + s++; + const r = s < i.length ? i[s] : i[i.length - 1]; + try { + if (r > 0) { + const o = $M(r); + this.m.fire(new n3(this.reconnectionToken, this.protocol.getMillisSinceLastIncomingData(), r, o)); + this.t.logService.info(`${e} waiting for ${r} seconds before reconnecting...`); + try { + await o; + } catch {} + } + if (this.n) { + this.t.logService.error(`${e} permanent failure occurred while running the reconnecting loop.`); + break; + } + this.m.fire(new o3(this.reconnectionToken, this.protocol.getMillisSinceLastIncomingData(), s + 1)); + this.t.logService.info(`${e} resolving connection...`); + const n = await X8(this.t, this.reconnectionToken, this.protocol); + this.t.logService.info(`${e} connecting to ${n.connectTo}...`); + await this.H(n, Y8(t3)); + this.t.logService.info(`${e} reconnected!`); + this.m.fire(new a0(this.reconnectionToken, this.protocol.getMillisSinceLastIncomingData(), s + 1)); + break; + } catch (n) { + const o = this.y(); + if (n.code === "VSCODE_CONNECTION_ERROR") { + this.t.logService.error(`${e} A permanent error occurred in the reconnecting loop! Will give up now! Error:`); + this.t.logService.error(n); + if (o) { + this.t.logService.info(`${e} A permanent error occurred in the reconnecting loop! For background composer, we should ideally try to reconnect, but we're not doing that for now...`); + } + this.C(this.protocol.getMillisSinceLastIncomingData(), s + 1, false); + break; + } + if (s > 360 && !o) { + this.t.logService.error(`${e} An error occurred while reconnecting, but it will be treated as a permanent error because the reconnection grace time has expired! Will give up now! Error:`); + this.t.logService.error(n); + this.C(this.protocol.getMillisSinceLastIncomingData(), s + 1, false); + break; + } + if (lf.isTemporarilyNotAvailable(n)) { + this.t.logService.info(`${e} A temporarily not available error occurred while trying to reconnect, will try again...`); + this.t.logService.trace(n); + continue; + } + if ((n.code === "ETIMEDOUT" || n.code === "ENETUNREACH" || n.code === "ECONNREFUSED" || n.code === "ECONNRESET") && n.syscall === "connect") { + this.t.logService.info(`${e} A network error occurred while trying to reconnect, will try again...`); + this.t.logService.trace(n); + continue; + } + if (Nl(n)) { + this.t.logService.info(`${e} A promise cancelation error occurred while trying to reconnect, will try again...`); + this.t.logService.trace(n); + continue; + } + if (n instanceof lf) { + this.t.logService.error(`${e} A RemoteAuthorityResolverError occurred while trying to reconnect. Will give up now! Error:`); + this.t.logService.error(n); + if (o) { + this.t.logService.info(`${e} A RemoteAuthorityResolverError occurred while trying to reconnect. For background composer, we should ideally try to reconnect, but we're not doing that for now...`); + } + this.C(this.protocol.getMillisSinceLastIncomingData(), s + 1, lf.isHandled(n)); + break; + } + this.t.logService.error(`${e} An unknown error occurred while trying to reconnect, since this is an unknown case, it will be treated as a permanent error! Will give up now! Error:`); + this.t.logService.error(n); + if (o) { + if ("_code" in n && n._code === "TemporarilyNotAvailable" || "code" in n && n.code === "TemporarilyNotAvailable") { + this.t.logService.info(`${e} Temporarily not available error in background composer, will try again...`); + continue; + } + this.t.logService.info(`${e} An unknown error occurred while trying to reconnect. For background composer, we should ideally try to reconnect, but we're not doing that for now...`); + } + this.C(this.protocol.getMillisSinceLastIncomingData(), s + 1, false); + break; + } + } while (!this.n && !this.r); + } + C(e, i, s) { + if (this.u) { + hr.triggerPermanentFailure(e, i, s); + } else { + this.F(e, i, s); + } + } + F(e, i, s) { + this.m.fire(new a3(this.reconnectionToken, e, i, s)); + Q8(this.protocol); + } + G() { + this.protocol.pauseSocketWriting(); + } + }; + } + }); + var df; + var LM = g({ + "out-build/vs/platform/remote/common/remoteSocketFactoryService.js"() { + "use strict"; + + M(); + Y(); + df = q("remoteSocketFactoryService"); + } + }); + import * as MM from "net"; + import * as FM from "os"; + async function NM(t, e, i, s, r) { + let n; + for (let o = 3; o && (n?.dispose(), n = await new c3(t, e, i, s, r).waitForReady(), (!r || !Cg[r]) && !!Cg[n.tunnelLocalPort]); o--); + return n; + } + var c3; + var ff; + var ml; + var c0; + var WM = g({ + "out-build/vs/platform/tunnel/node/tunnelService.js"() { + "use strict"; + + O2(); + Vp(); + ce(); + M(); + H(); + Ke(); + X(); + ht(); + OM(); + LM(); + Hg(); + K8(); + Ze(); + c3 = class extends T { + constructor(t, e, i, s, r) { + super(); + this.m = e; + this.n = r; + this.privacy = nf.Private; + this.j = new Map(); + this.a = t; + this.b = MM.createServer(); + this.c = new Ga(); + this.f = () => this.c.open(); + this.b.on("listening", this.f); + this.g = n => this.q(n); + this.b.on("connection", this.g); + this.h = () => {}; + this.b.on("error", this.h); + this.tunnelRemotePort = s; + this.tunnelRemoteHost = i; + } + async dispose() { + super.dispose(); + this.b.removeListener("listening", this.f); + this.b.removeListener("connection", this.g); + this.b.removeListener("error", this.h); + this.b.close(); + Array.from(this.j.values()).forEach(e => { + e(); + }); + } + async waitForReady() { + const t = this.n ?? this.tunnelRemotePort; + const e = gl(this.m) ? "0.0.0.0" : "127.0.0.1"; + let i = await x$(t, 2, 1000, e); + let s = null; + this.b.listen(i, this.m); + await this.c.wait(); + s = this.b.address(); + if (!s) { + i = 0; + this.b.listen(i, this.m); + await this.c.wait(); + s = this.b.address(); + } + this.tunnelLocalPort = s.port; + this.localAddress = `${this.tunnelRemoteHost === "127.0.0.1" ? "127.0.0.1" : "localhost"}:${s.port}`; + return this; + } + async q(t) { + t.pause(); + const e = r0(this.tunnelRemoteHost) || gl(this.tunnelRemoteHost) ? "localhost" : this.tunnelRemoteHost; + const i = await PM(this.a, e, this.tunnelRemotePort); + const s = i.getSocket(); + const r = i.readEntireBuffer(); + i.dispose(); + if (r.byteLength > 0) { + t.write(r.buffer); + } + t.on("end", () => { + if (t.localAddress) { + this.j.delete(t.localAddress); + } + s.end(); + }); + t.on("close", () => s.end()); + t.on("error", () => { + if (t.localAddress) { + this.j.delete(t.localAddress); + } + if (s instanceof Qa) { + s.socket.destroy(); + } else { + s.end(); + } + }); + if (s instanceof Qa) { + this.s(t, s); + } else { + this.r(t, s); + } + if (t.localAddress) { + this.j.set(t.localAddress, () => { + t.end(); + s.end(); + }); + } + } + r(t, e) { + e.onClose(() => t.destroy()); + e.onEnd(() => t.end()); + e.onData(i => t.write(i.buffer)); + t.on("data", i => e.write(z.wrap(i))); + t.resume(); + } + s(t, e) { + const i = e.socket; + i.on("end", () => t.end()); + i.on("close", () => t.end()); + i.on("error", () => { + t.destroy(); + }); + i.pipe(t); + t.pipe(i); + } + }; + ff = class extends cf { + constructor(e, i, s, r, n) { + super(i, n); + this.H = e; + this.I = s; + this.J = r; + } + isPortPrivileged(e) { + return wM(e, this.s, Wi, FM.release()); + } + F(e, i, s, r, n, o, a, c) { + const l = this.C(i, s); + if (l) { + ++l.refcount; + return l.value; + } + if (gM(e)) { + return this.G(e, i, s, n, o, a, c); + } + { + this.q.trace(`ForwardedPorts: (TunnelService) Creating tunnel without provider ${i}:${s} on local port ${n}.`); + const u = { + commit: this.J.commit, + quality: this.J.quality, + addressProvider: e, + remoteSocketFactoryService: this.H, + signService: this.I, + logService: this.q, + ipcLogger: null + }; + const d = NM(u, r, i, s, n); + this.q.trace("ForwardedPorts: (TunnelService) Tunnel created without provider."); + this.y(i, s, d); + return d; + } + } + }; + ff = __decorate([__param(0, df), __param(1, V), __param(2, zo), __param(3, Ve), __param(4, Je)], ff); + ml = class extends ff { + constructor(e, i, s, r, n) { + super(e, i, s, r, n); + } + }; + ml = __decorate([__param(0, df), __param(1, V), __param(2, zo), __param(3, Ve), __param(4, Je)], ml); + c0 = class extends T { + constructor(e, i, s, r, n) { + super(); + this.b = e; + this.c = i; + this.f = s; + this.g = r; + this.h = n; + this.a = new Map(); + } + async openTunnel(e, i, s, r, n, o, a, c, l) { + this.c.trace(`ForwardedPorts: (SharedTunnelService) openTunnel request for ${s}:${r} on local port ${o}.`); + if (!this.a.has(e)) { + const u = new ml(this.b, this.c, this.g, this.f, this.h); + this.D(u); + this.a.set(e, u); + u.onTunnelClosed(async () => { + if ((await u.tunnels).length === 0) { + u.dispose(); + this.a.delete(e); + } + }); + } + return this.a.get(e).openTunnel(i, s, r, n, o, a, c, l); + } + }; + c0 = __decorate([__param(0, df), __param(1, V), __param(2, Ve), __param(3, zo), __param(4, Je)], c0); + } + }); + import { parse as l3 } from "url"; + function TM(t, e) { + if (t.protocol === "http:") { + return e.HTTP_PROXY || e.http_proxy || null; + } else { + return t.protocol === "https:" && (e.HTTPS_PROXY || e.https_proxy || e.HTTP_PROXY || e.http_proxy) || null; + } + } + async function jM(t, e, i = {}) { + const s = l3(t); + const r = i.proxyUrl || TM(s, e); + if (!r) { + return null; + } + const n = l3(r); + if (!/^https?:$/.test(n.protocol || "")) { + return null; + } + const o = { + host: n.hostname || "", + port: (n.port ? +n.port : 0) || (n.protocol === "https" ? 443 : 80), + auth: n.auth, + rejectUnauthorized: Tw(i.strictSSL) ? i.strictSSL : true + }; + if (s.protocol === "http:") { + const { + default: a + } = await import("http-proxy-agent"); + return new a.HttpProxyAgent(r, o); + } else { + const { + default: a + } = await import("https-proxy-agent"); + return new a.HttpsProxyAgent(r, o); + } + } + var UM = g({ + "out-build/vs/platform/request/node/proxy.js"() { + "use strict"; + + _e(); + } + }); + import { parse as u3 } from "url"; + import { createGunzip as BM } from "zlib"; + async function qM(t, e, i, s) { + const r = await import("kerberos"); + const n = r.default || r; + const o = new URL(t); + const a = e || (process.platform === "win32" ? `HTTP/${o.hostname}` : `HTTP@${o.hostname}`); + i.debug(`${s} Kerberos authentication lookup`, `proxyURL:${o}`, `spn:${a}`); + return (await n.initializeClient(a)).step(""); + } + async function zM(t) { + return (u3(t.url).protocol === "https:" ? await import("https") : await import("http")).request; + } + async function l0(t, e) { + return Tt.withAsyncBody(async (i, s) => { + const r = u3(t.url); + const n = t.getRawRequest ? t.getRawRequest(t) : await zM(t); + const o = { + hostname: r.hostname, + port: r.port ? parseInt(r.port) : r.protocol === "https:" ? 443 : 80, + protocol: r.protocol, + path: r.path, + method: t.type || "GET", + headers: t.headers, + agent: t.agent, + rejectUnauthorized: Tw(t.strictSSL) ? t.strictSSL : true + }; + if (t.user && t.password) { + o.auth = t.user + ":" + t.password; + } + const a = n(o, c => { + const l = Hl(t.followRedirects) ? t.followRedirects : 3; + if (c.statusCode && c.statusCode >= 300 && c.statusCode < 400 && l > 0 && c.headers.location) { + if (c.statusCode === 303) { + l0({ + ...t, + url: c.headers.location, + type: "GET", + followRedirects: l - 1 + }, e).then(i, s); + } else { + l0({ + ...t, + url: c.headers.location, + followRedirects: l - 1 + }, e).then(i, s); + } + } else { + let u = c; + if (!t.isChromiumNetwork && c.headers["content-encoding"] === "gzip") { + u = c.pipe(BM()); + } + i({ + res: c, + stream: jk(u) + }); + } + }); + a.on("error", s); + if (t.timeout) { + a.setTimeout(t.timeout); + } + if (t.isChromiumNetwork) { + a.removeHeader("Content-Length"); + } + if (t.data && typeof t.data == "string") { + a.write(t.data); + } + a.end(); + e.onCancellationRequested(() => { + a.abort(); + s(new hi()); + }); + }); + } + var pf; + var HM = g({ + "out-build/vs/platform/request/node/requestService.js"() { + "use strict"; + + ce(); + Ze(); + $e(); + _e(); + Ke(); + Ri(); + cg(); + X(); + En(); + UM(); + pf = class extends N2 { + constructor(e, i, s) { + super(s); + this.m = e; + this.n = i; + this.q(); + this.D(e.onDidChangeConfiguration(r => { + if (r.affectsConfiguration("http")) { + this.q(); + } + })); + } + q() { + const e = this.m.getValue("http"); + this.f = e?.proxy; + this.g = !!e?.proxyStrictSSL; + this.h = e?.proxyAuthorization; + } + async request(e, i) { + const { + f: s, + g: r + } = this; + let n; + try { + n = await ag(this.m, this.b, this.n.args, process.env); + } catch (c) { + if (!this.j) { + this.j = true; + this.b.error("resolving shell environment failed", Vi(c)); + } + } + const o = { + ...process.env, + ...n + }; + const a = e.agent ? e.agent : await jM(e.url || "", o, { + proxyUrl: s, + strictSSL: r + }); + e.agent = a; + e.strictSSL = r; + if (this.h) { + e.headers = { + ...(e.headers || {}), + "Proxy-Authorization": this.h + }; + } + return this.c(e, () => l0(e, i)); + } + async resolveProxy(e) {} + async lookupAuthorization(e) {} + async lookupKerberosAuthorization(e) { + try { + const i = this.m.getValue("http.proxyKerberosServicePrincipal"); + return "Negotiate " + (await qM(e, i, this.b, "RequestService#lookupKerberosAuthorization")); + } catch (i) { + this.b.debug("RequestService#lookupKerberosAuthorization Kerberos authentication failed", i); + return; + } + } + async loadCertificates() { + return (await import("@vscode/proxy-agent")).loadSystemCertificates({ + log: this.b + }); + } + }; + pf = __decorate([__param(0, Je), __param(1, tr), __param(2, V)], pf); + } + }); + import { net as VM } from "electron"; + function GM(t) { + return VM.request; + } + var h3; + var JM = g({ + "out-build/vs/platform/request/electron-utility/requestService.js"() { + "use strict"; + + HM(); + h3 = class extends pf { + request(t, e) { + return super.request({ + ...(t || {}), + getRawRequest: GM, + isChromiumNetwork: true + }, e); + } + }; + } + }); + var d3; + var KM = g({ + "out-build/vs/platform/sign/common/abstractSignService.js"() { + "use strict"; + + d3 = class fS { + constructor() { + this.b = new Map(); + } + static { + this.a = 1; + } + async createNewMessage(e) { + try { + const i = await this.c(); + if (i) { + const s = String(fS.a++); + this.b.set(s, i); + return { + id: s, + data: i.createNewMessage(e) + }; + } + } catch {} + return { + id: "", + data: e + }; + } + async validate(e, i) { + if (!e.id) { + return true; + } + const s = this.b.get(e.id); + if (!s) { + return false; + } + this.b.delete(e.id); + try { + return s.validate(i) === "ok"; + } catch { + return false; + } finally { + s.dispose?.(); + } + } + async sign(e) { + try { + return await this.d(e); + } catch {} + return e; + } + }; + } + }); + var f3; + var ZM = g({ + "out-build/vs/platform/sign/node/signService.js"() { + "use strict"; + + KM(); + f3 = class extends d3 { + c() { + return this.h().then(t => new t.validator()); + } + d(t) { + return this.h().then(e => new e.signer().sign(t)); + } + async h() { + const t = "vsda"; + const { + default: e + } = await import(t); + return e; + } + }; + } + }); + var gf; + var YM = g({ + "out-build/vs/platform/policy/node/nativePolicyService.js"() { + "use strict"; + + Ls(); + ce(); + M(); + X(); + gf = class extends jg { + constructor(e, i) { + super(); + this.m = e; + this.n = i; + this.a = new Ap(); + this.b = this.D(new pr()); + } + async j(e) { + this.m.trace(`NativePolicyService#_updatePolicyDefinitions - Found ${Object.keys(e).length} policy definitions`); + const { + createWatcher: i + } = await import("@vscode/policy-watcher"); + await this.a.queue(() => new Promise((s, r) => { + try { + this.b.value = i(this.n, e, n => { + this.s(n); + s(); + }); + } catch (n) { + this.m.error("NativePolicyService#_updatePolicyDefinitions - Error creating watcher:", n); + r(n); + } + })); + } + s(e) { + this.m.trace(`NativePolicyService#_onDidPolicyChange - Updated policy values: ${JSON.stringify(e)}`); + for (const i in e) { + const s = e[i]; + if (s === undefined) { + this.g.delete(i); + } else { + this.g.set(i, s); + } + } + this.h.fire(Object.keys(e)); + } + }; + gf = __decorate([__param(0, V)], gf); + } + }); + function XM(t, e) { + const i = []; + for (const s of new Set(Vr.concat(t.keys(), e.keys()))) { + if (t.get(s) !== e.get(s)) { + i.push(s); + } + } + return i; + } + var mf; + var QM = g({ + "out-build/vs/platform/policy/common/filePolicyService.js"() { + "use strict"; + + ce(); + B(); + Bl(); + _e(); + He(); + X(); + Ls(); + mf = class extends jg { + constructor(e, i, s) { + super(); + this.m = e; + this.n = i; + this.q = s; + this.c = this.D(new Ys(500)); + const r = x.filter(i.onDidFilesChange, n => n.affects(e)); + this.D(i.watch(e)); + this.D(r(() => this.c.trigger(() => this.u()))); + } + async j() { + await this.u(); + } + async t() { + const e = new Map(); + try { + const i = await this.n.readFile(this.m); + const s = JSON.parse(i.value.toString()); + if (!Nt(s)) { + throw new Error("Policy file isn't a JSON object"); + } + for (const r of Object.keys(s)) { + if (this.f[r]) { + e.set(r, s[r]); + } + } + } catch (i) { + if (i.fileOperationResult !== 1) { + this.q.error("[FilePolicyService] Failed to read policies", i); + } + } + return e; + } + async u() { + const e = await this.t(); + const i = XM(this.g, e); + this.g = e; + if (i.length > 0) { + this.h.fire(i); + } + } + }; + mf = __decorate([__param(1, at), __param(2, V)], mf); + } + }); + function eF(t, e, i) { + if (!(e instanceof ue)) { + e = new ue(e, [], !!i); + } + p3.push([t, e]); + } + var p3; + var g3; + var tF = g({ + "out-build/vs/platform/instantiation/common/extensions.js"() { + "use strict"; + + Ah(); + p3 = []; + (function (t) { + t[t.Eager = 0] = "Eager"; + t[t.Delayed = 1] = "Delayed"; + })(g3 ||= {}); + } + }); + var m3; + var wf; + var la; + var w3; + var iF = g({ + "out-build/vs/base/common/skipList.js"() { + "use strict"; + + wf = class { + constructor(t, e, i) { + this.level = t; + this.key = e; + this.value = i; + this.forward = []; + } + }; + la = undefined; + w3 = class da { + constructor(e, i = 65536) { + this.comparator = e; + this[m3] = "SkipList"; + this.d = 0; + this.f = 0; + this.c = Math.max(1, Math.log2(i) | 0); + this.e = new wf(this.c, la, la); + } + get size() { + return this.f; + } + clear() { + this.e = new wf(this.c, la, la); + this.f = 0; + } + has(e) { + return !!da.g(this, e, this.comparator); + } + get(e) { + return da.g(this, e, this.comparator)?.value; + } + set(e, i) { + if (da.h(this, e, i, this.comparator)) { + this.f += 1; + } + return this; + } + delete(e) { + const i = da.k(this, e, this.comparator); + if (i) { + this.f -= 1; + } + return i; + } + forEach(e, i) { + let s = this.e.forward[0]; + while (s) { + e.call(i, s.value, s.key, this); + s = s.forward[0]; + } + } + [(m3 = Symbol.toStringTag, Symbol.iterator)]() { + return this.entries(); + } + *entries() { + let e = this.e.forward[0]; + while (e) { + yield [e.key, e.value]; + e = e.forward[0]; + } + } + *keys() { + let e = this.e.forward[0]; + while (e) { + yield e.key; + e = e.forward[0]; + } + } + *values() { + let e = this.e.forward[0]; + while (e) { + yield e.value; + e = e.forward[0]; + } + } + toString() { + let e = "[SkipList]:"; + let i = this.e.forward[0]; + while (i) { + e += `node(${i.key}, ${i.value}, lvl:${i.level})`; + i = i.forward[0]; + } + return e; + } + static g(e, i, s) { + let r = e.e; + for (let n = e.d - 1; n >= 0; n--) { + while (r.forward[n] && s(r.forward[n].key, i) < 0) { + r = r.forward[n]; + } + } + r = r.forward[0]; + if (r && s(r.key, i) === 0) { + return r; + } + } + static h(e, i, s, r) { + const n = []; + let o = e.e; + for (let a = e.d - 1; a >= 0; a--) { + while (o.forward[a] && r(o.forward[a].key, i) < 0) { + o = o.forward[a]; + } + n[a] = o; + } + o = o.forward[0]; + if (o && r(o.key, i) === 0) { + o.value = s; + return false; + } + { + const a = da.j(e); + if (a > e.d) { + for (let c = e.d; c < a; c++) { + n[c] = e.e; + } + e.d = a; + } + o = new wf(a, i, s); + for (let c = 0; c < a; c++) { + o.forward[c] = n[c].forward[c]; + n[c].forward[c] = o; + } + return true; + } + } + static j(e, i = 0.5) { + let s = 1; + while (Math.random() < i && s < e.c) { + s += 1; + } + return s; + } + static k(e, i, s) { + const r = []; + let n = e.e; + for (let o = e.d - 1; o >= 0; o--) { + while (n.forward[o] && s(n.forward[o].key, i) < 0) { + n = n.forward[o]; + } + r[o] = n; + } + n = n.forward[0]; + if (!n || s(n.key, i) !== 0) { + return false; + } + for (let o = 0; o < e.d && r[o].forward[o] === n; o++) { + r[o].forward[o] = n.forward[o]; + } + while (e.d > 0 && e.e.forward[e.d - 1] === la) { + e.d -= 1; + } + return true; + } + }; + } + }); + var u0; + var wl; + var sF = g({ + "out-build/vs/platform/uriIdentity/common/uriIdentityService.js"() { + "use strict"; + + As(); + tF(); + He(); + nt(); + iF(); + B(); + M(); + u0 = class P0 { + static { + this._clock = 0; + } + constructor(e) { + this.uri = e; + this.time = P0._clock++; + } + touch() { + this.time = P0._clock++; + return this; + } + }; + wl = class { + constructor(e) { + this.g = e; + this.c = new De(); + this.f = 65536; + const i = new Map(); + const s = r => { + let n = i.get(r.scheme); + if (n === undefined) { + n = e.hasProvider(r) && !this.g.hasCapability(r, 1024); + i.set(r.scheme, n); + } + return n; + }; + this.c.add(x.any(e.onDidChangeFileSystemProviderRegistrations, e.onDidChangeFileSystemProviderCapabilities)(r => { + i.delete(r.scheme); + })); + this.extUri = new Va(s); + this.d = new w3((r, n) => this.extUri.compare(r, n, true), this.f); + } + dispose() { + this.c.dispose(); + this.d.clear(); + } + asCanonicalUri(e) { + if (this.g.hasProvider(e)) { + e = Pp(e); + } + const i = this.d.get(e); + if (i) { + return i.touch().uri.with({ + fragment: e.fragment + }); + } else { + this.d.set(e, new u0(e)); + this.h(); + return e; + } + } + h() { + if (this.d.size < this.f) { + return; + } + const e = [...this.d.entries()].sort((s, r) => s[1].time < r[1].time ? 1 : s[1].time > r[1].time ? -1 : 0); + u0._clock = 0; + this.d.clear(); + const i = this.f * 0.5; + for (let s = 0; s < i; s++) { + this.d.set(e[s][0], e[s][1].touch()); + } + } + }; + wl = __decorate([__param(0, at)], wl); + eF(yi, wl, 1); + } + }); + var v3; + var rF = g({ + "out-build/vs/platform/log/common/logService.js"() { + "use strict"; + + M(); + X(); + v3 = class extends T { + constructor(t, e = []) { + super(); + this.a = new yy([t, ...e]); + this.D(t.onDidChangeLogLevel(i => this.setLevel(i))); + } + get onDidChangeLogLevel() { + return this.a.onDidChangeLogLevel; + } + setLevel(t) { + this.a.setLevel(t); + } + getLevel() { + return this.a.getLevel(); + } + trace(t, ...e) { + this.a.trace(t, ...e); + } + debug(t, ...e) { + this.a.debug(t, ...e); + } + info(t, ...e) { + this.a.info(t, ...e); + } + warn(t, ...e) { + this.a.warn(t, ...e); + } + error(t, ...e) { + this.a.error(t, ...e); + } + flush() { + this.a.flush(); + } + }; + } + }); + var b3; + var nF = g({ + "out-build/vs/platform/userData/common/fileUserDataProvider.js"() { + "use strict"; + + B(); + M(); + He(); + go(); + $i(); + b3 = class extends T { + constructor(t, e, i, s, r, n) { + super(); + this.f = t; + this.g = e; + this.h = i; + this.j = s; + this.m = r; + this.n = n; + this.capabilities = this.g.capabilities; + this.onDidChangeCapabilities = this.g.onDidChangeCapabilities; + this.a = this.D(new $()); + this.onDidChangeFile = this.a.event; + this.b = Pr.forUris(() => !(this.capabilities & 1024)); + this.c = new Sw(o => this.m.extUri.getComparisonKey(this.s(o))); + this.q(); + this.D(s.onDidChangeProfiles(() => this.q())); + this.D(this.g.onDidChangeFile(o => this.r(o))); + } + q() { + this.c.clear(); + for (const t of this.j.profiles) { + this.c.add(t.settingsResource); + this.c.add(t.keybindingsResource); + this.c.add(t.tasksResource); + this.c.add(t.extensionsResource); + } + } + open(t, e) { + return this.g.open(this.s(t), e); + } + close(t) { + return this.g.close(t); + } + read(t, e, i, s, r) { + return this.g.read(t, e, i, s, r); + } + write(t, e, i, s, r) { + return this.g.write(t, e, i, s, r); + } + watch(t, e) { + this.b.set(t, t); + const i = this.g.watch(this.s(t), e); + return xe(() => { + this.b.delete(t); + i.dispose(); + }); + } + stat(t) { + return this.g.stat(this.s(t)); + } + mkdir(t) { + return this.g.mkdir(this.s(t)); + } + rename(t, e, i) { + return this.g.rename(this.s(t), this.s(e), i); + } + readFile(t, e) { + return this.g.readFile(this.s(t), e); + } + readFileStream(t, e, i) { + return this.g.readFileStream(this.s(t), e, i); + } + readdir(t) { + return this.g.readdir(this.s(t)); + } + enforceAtomicReadFile(t) { + return this.c.has(t); + } + writeFile(t, e, i) { + return this.g.writeFile(this.s(t), e, i); + } + enforceAtomicWriteFile(t) { + if (this.c.has(t)) { + return { + postfix: ".vsctmp" + }; + } else { + return false; + } + } + delete(t, e) { + return this.g.delete(this.s(t), e); + } + copy(t, e, i) { + if (u1(this.g)) { + return this.g.copy(this.s(t), this.s(e), i); + } + throw new Error("copy not supported"); + } + cloneFile(t, e) { + if (Ay(this.g)) { + return this.g.cloneFile(this.s(t), this.s(e)); + } + throw new Error("clone not supported"); + } + r(t) { + const e = []; + for (const i of t) { + if (i.resource.scheme !== this.f) { + continue; + } + const s = this.t(i.resource); + if (this.b.findSubstr(s)) { + e.push({ + resource: s, + type: i.type, + cId: i.cId + }); + } + } + if (e.length) { + this.n.debug("User data changed"); + this.a.fire(e); + } + } + s(t) { + return t.with({ + scheme: this.f + }); + } + t(t) { + return t.with({ + scheme: this.h + }); + } + }; + } + }); + function oF() { + return !qt().enabled; + } + function y3(t) { + if (!oF() && !Nl(t) && !Vs.isErrorNoTelemetry(t)) { + Mn().captureException(t); + } + } + var aF = g({ + "out-build/vs/platform/tracing/common/tracing.js"() { + "use strict"; + + ce(); + $e(); + va(); + Hm(); + if (typeof Symbol.dispose != "symbol") { + Object.defineProperty(Symbol, "dispose", { + value: Symbol("Symbol.dispose") + }); + } + if (typeof Symbol.asyncDispose != "symbol") { + Object.defineProperty(Symbol, "asyncDispose", { + value: Symbol("Symbol.asyncDispose") + }); + } + } + }); + var S3; + var cF = g({ + "out-build/vs/platform/tracing/common/logger.js"() { + "use strict"; + + va(); + aF(); + S3 = class { + constructor(t) { + this.a = t; + this.onDidChangeLogLevel = this.a.onDidChangeLogLevel; + } + getLevel() { + return this.a.getLevel(); + } + setLevel(t) { + this.a.setLevel(t); + } + trace(t, ...e) { + this.a.trace(t, ...e); + } + debug(t, ...e) { + this.a.debug(t, ...e); + } + info(t, ...e) { + this.a.info(t, ...e); + } + warn(t, ...e) { + this.a.warn(t, ...e); + } + error(t, ...e) { + this.a.error(t, ...e); + if (!!qt().enabled && !(Math.random() >= qt().loggerSampleRate)) { + if (t instanceof Error) { + y3(t); + return; + } + for (const i of e) { + if (i instanceof Error) { + y3(i); + return; + } + } + } + } + flush() { + this.a.flush(); + } + dispose() { + this.a.dispose(); + } + }; + } + }); + var lF = {}; + import { app as uF, dialog as hF } from "electron"; + import { unlinkSync as dF, promises as E3 } from "fs"; + var k3; + var x3; + var fF = g({ + "out-build/vs/code/electron-main/main.js"() { + "use strict"; + + _E(); + se(); + zt(); + ce(); + en(); + $e(); + gi(); + B(); + Sr(); + Ie(); + we(); + Hs(); + H(); + ys(); + Wt(); + _t(); + xs(); + Vp(); + ZL(); + be(); + Ke(); + XL(); + iM(); + vt(); + kc(); + oM(); + He(); + lM(); + kg(); + Ah(); + hM(); + xg(); + ct(); + dM(); + X(); + gc(); + ht(); + Wh(); + pM(); + K8(); + WM(); + En(); + JM(); + Hg(); + ZM(); + Ti(); + $n(); + pc(); + un(); + Ls(); + YM(); + QM(); + M(); + As(); + sF(); + zc(); + rF(); + a5(); + P4(); + nF(); + wa(); + cF(); + k3 = class { + main() { + try { + this.a(); + } catch (t) { + console.error(t.message); + uF.exit(1); + } + } + async a() { + lw(c => console.error(c)); + const [t, e, i, s, r, n, o, a] = this.b(); + try { + try { + await this.d(i, a, s, r, o); + } catch (c) { + this.g(i, o, c); + throw c; + } + await t.invokeFunction(async c => { + const l = c.get(V); + const u = c.get(Te); + const d = c.get(at); + const f = c.get(sc); + const p = await this.f(l, i, u, t, o, true); + ee.writeFile(i.mainLockfile, String(process.pid)).catch(m => { + l.warn(`app#startup(): Error writing main lockfile: ${m.stack}`); + }); + const w = f.createLogger("main", { + name: v(156, null) + }); + n.logger = new S3(w); + x.once(u.onWillShutdown)(m => { + d.dispose(); + s.dispose(); + m.join("instanceLockfile", E3.unlink(i.mainLockfile).catch(() => {})); + }); + return t.createInstance(Yd, p, e).startup(); + }); + } catch (c) { + t.invokeFunction(this.j, c); + } + } + b() { + const t = new Ch(); + const e = new De(); + process.once("exit", () => e.dispose()); + const i = { + _serviceBrand: undefined, + ...ko + }; + t.set(Ve, i); + const s = new ir(this.k(), i); + const r = this.c(s); + t.set(ot, s); + const n = new Y2($x(s), s.logsHome); + t.set(qo, n); + const o = new H8(n.getLogLevel()); + const a = e.add(new v3(o, [new by(n.getLogLevel())])); + t.set(V, a); + const c = new tf(a); + t.set(at, c); + const l = new Ih(a); + c.registerProvider(R.file, l); + const u = new wl(c); + t.set(yi, u); + const d = new C1(1, s, a, c); + t.set(f1, d); + t.set(Oi, d); + const f = new Yu(d, u, s, c, a); + t.set(Rs, f); + c.registerProvider(R.vscodeUserData, new b3(R.file, l, R.vscodeUserData, f, u, a)); + const p = j && i.win32RegValueName ? e.add(new gf(a, i.win32RegValueName)) : s.policyFile ? e.add(new mf(s.policyFile, c, a)) : new Ug(); + t.set(Pn, p); + const w = new W8(f.defaultProfile.settingsResource, c, p, a); + t.set(Je, w); + t.set(Te, new ue(Tu, undefined, false)); + t.set(Sn, new ue(h3, undefined, true)); + t.set(Eo, new ue(ih)); + t.set(zo, new ue(f3, undefined, false)); + t.set(V8, new ue(ml)); + t.set(Wc, new rf(s, f, a)); + return [new q8(t, true), r, s, w, d, o, i, f]; + } + c(t) { + const e = { + VSCODE_IPC_HOOK: t.mainIPCHandle + }; + ["VSCODE_NLS_CONFIG", "VSCODE_PORTABLE"].forEach(i => { + const s = process.env[i]; + if (typeof s == "string") { + e[i] = s; + } + }); + Object.assign(process.env, e); + return e; + } + async d(t, e, i, s, r) { + await Tt.settled([Promise.all([this.e(t.extensionsPath), t.codeCachePath, t.logsHome.with({ + scheme: R.file + }).fsPath, e.defaultProfile.globalStorageHome.with({ + scheme: R.file + }).fsPath, t.workspaceStorageHome.with({ + scheme: R.file + }).fsPath, t.localHistoryHome.with({ + scheme: R.file + }).fsPath, t.backupHome].map(n => n ? E3.mkdir(n, { + recursive: true + }) : undefined)), s.init(), i.initialize()]); + e.init(); + } + e(t) { + if (j) { + const e = B0(t); + if (e) { + ma(e); + } + } + return t; + } + async f(t, e, i, s, r, n) { + let o; + try { + Ne("code/willStartMainServer"); + o = await Xk(e.mainIPCHandle); + Ne("code/didStartMainServer"); + x.once(i.onWillShutdown)(() => o.dispose()); + } catch (a) { + if (a.code !== "EADDRINUSE") { + this.g(e, r, a); + throw a; + } + let c; + try { + c = await Qk(e.mainIPCHandle, "main"); + } catch (f) { + if (!n || j || f.code !== "ECONNREFUSED") { + if (f.code === "EPERM") { + this.h(v(157, null, r.nameShort), v(158, null), r); + } + throw f; + } + try { + dF(e.mainIPCHandle); + } catch (p) { + t.warn("Could not delete obsolete instance handle", p); + throw p; + } + return this.f(t, e, i, s, r, false); + } + if (e.extensionTestsLocationURI && !e.debugExtensionHost.break) { + const f = `Running extension tests from the command line is currently only supported if no other instance of ${r.nameShort} is running.`; + t.error(f); + c.dispose(); + throw new Error(f); + } + let l; + if (!e.args.wait && !e.args.status) { + l = setTimeout(() => { + this.h(v(159, null, r.nameShort), v(160, null), r); + }, 10000); + } + const u = ze.toService(c.getChannel("launch"), { + disableMarshalling: true + }); + const d = ze.toService(c.getChannel("diagnostics"), { + disableMarshalling: true + }); + if (e.args.status) { + return s.invokeFunction(async () => { + const f = new ef(Hc, r); + const p = await d.getMainDiagnostics(); + const w = await d.getRemoteDiagnostics({ + includeProcesses: true, + includeWorkspaceMetadata: true + }); + const m = await f.getDiagnostics(p, w); + console.log(m); + throw new Tl(); + }); + } + if (j) { + await this.i(u, t); + } + t.trace("Sending env to running instance..."); + await u.start(e.args, process.env); + c.dispose(); + if (l) { + clearTimeout(l); + } + throw new Tl("Sent env to running instance. Terminating..."); + } + if (e.args.status) { + console.log(v(161, null, r.nameShort)); + throw new Tl("Terminating..."); + } + process.env.VSCODE_PID = String(process.pid); + return o; + } + g(t, e, i) { + if (i.code === "EACCES" || i.code === "EPERM") { + const s = $t([t.userDataPath, t.extensionsPath, bu]).map(r => to(P.file(r), { + os: Wi, + tildify: t + })); + this.h(v(162, null), v(163, null, Ki(i), s.join(` + `)), e); + } + } + h(t, e, i) { + hF.showMessageBoxSync(r5({ + type: "warning", + buttons: [v(164, null)], + message: t, + detail: e + }, i).options); + } + async i(t, e) { + if (j) { + const i = await t.getMainProcessId(); + e.trace("Sending some foreground love to the running instance:", i); + try { + (await import("windows-foreground-love")).allowSetForegroundWindow(i); + } catch (s) { + e.error(s); + } + } + } + j(t, e) { + const i = t.get(V); + const s = t.get(Te); + let r = 0; + if (e) { + if (e.isExpected) { + if (e.message) { + i.trace(e.message); + } + } else { + r = 1; + if (e.stack) { + i.error(e.stack); + } else { + i.error(`Startup error: ${e.toString()}`); + } + } + } + s.kill(r); + } + k() { + const t = this.l(rP(process.argv)); + if (t.wait && !t.waitMarkerFilePath) { + const e = nM(t.verbose); + if (e) { + nP(process.argv, "--waitMarkerFilePath", e); + t.waitMarkerFilePath = e; + } + } + return t; + } + l(t) { + if (t["open-url"]) { + t._urls = t._; + t._ = []; + } + if (!t.remote) { + const e = this.m(t._, t.goto); + t._ = e; + } + return t; + } + m(t, e) { + const i = bs(); + const s = t.map(o => { + let a = String(o); + let c; + if (e) { + c = iu(a); + a = c.path; + } + a &&= this.n(i, a); + const l = Ev(a, i); + const u = Ue(l); + if (u && !zE(u)) { + return null; + } else if (e && c) { + c.path = l; + return this.o(c); + } else { + return l; + } + }); + const r = j || N; + const n = ss(s, o => o && r ? o.toLowerCase() : o || ""); + return $t(n); + } + n(t, e) { + if (j) { + e = Qr(e, "\""); + } + e = pv(pv(e, " "), "\t"); + if (j) { + e = Gi(t, e); + e = Qr(e, "."); + } + return e; + } + o(t) { + const e = [t.path]; + if (typeof t.line == "number") { + e.push(String(t.line)); + } + if (typeof t.column == "number") { + e.push(String(t.column)); + } + return e.join(":"); + } + }; + x3 = new k3(); + x3.main(); + } + }); + import * as lr from "path"; + import * as Wn from "original-fs"; + import * as pF from "os"; + import { performance as gF } from "perf_hooks"; + import * as Qi from "path"; + import * as D3 from "fs"; + import { fileURLToPath as mF } from "url"; + import { createRequire as wF } from "node:module"; + var bj = wF(import.meta.url); + var vF = Qi.dirname(mF(import.meta.url)); + Error.stackTraceLimit = 100; + if (!process.env.VSCODE_HANDLES_SIGPIPE) { + let t = false; + process.on("SIGPIPE", () => { + if (!t) { + t = true; + console.error(new Error("Unexpected SIGPIPE")); + } + }); + } + function bF() { + try { + if (typeof process.env.VSCODE_CWD != "string") { + process.env.VSCODE_CWD = process.cwd(); + } + if (process.platform === "win32") { + process.chdir(Qi.dirname(process.execPath)); + } + } catch (t) { + console.error(t); + } + } + bF(); + function yF(t) { + const e = Qi.dirname(vF); + function i() { + if (process.env.VSCODE_DEV) { + return e; + } else if (process.platform === "darwin") { + return Qi.dirname(Qi.dirname(Qi.dirname(e))); + } else { + return Qi.dirname(Qi.dirname(e)); + } + } + function s() { + if (process.env.VSCODE_PORTABLE) { + return process.env.VSCODE_PORTABLE; + } + if (process.platform === "win32" || process.platform === "linux") { + return Qi.join(i(), "data"); + } + const c = t.portable || `${t.applicationName}-portable-data`; + return Qi.join(Qi.dirname(i()), c); + } + const r = s(); + const n = !("target" in t) && D3.existsSync(r); + const o = Qi.join(r, "tmp"); + const a = n && D3.existsSync(o); + if (n) { + process.env.VSCODE_PORTABLE = r; + } else { + delete process.env.VSCODE_PORTABLE; + } + if (a) { + if (process.platform === "win32") { + process.env.TMP = o; + process.env.TEMP = o; + } else { + process.env.TMPDIR = o; + } + } + return { + portableDataPath: r, + isPortable: n + }; + } + import * as SF from "path"; + import * as h0 from "fs"; + import { fileURLToPath as EF } from "url"; + import { createRequire as kF, register as xF } from "node:module"; + import { createRequire as DF } from "node:module"; + var P3 = DF(import.meta.url); + var d0 = { + BUILD_INSERT_PRODUCT_CONFIGURATION: "BUILD_INSERT_PRODUCT_CONFIGURATION" + }; + if (d0.BUILD_INSERT_PRODUCT_CONFIGURATION) { + d0 = P3("../product.json"); + } + var f0 = { + name: "Cursor", + version: "0.50.5", + distro: "034ea95a21e3eb734fd22bf565a1e2e80d62ea9b", + author: { + name: "Anysphere, Inc." + }, + engines: { + pnpm: "please-use-npm", + yarn: "please-use-npm", + node: ">= 20.11.0 < 21.0.0" + }, + main: "./out/main.js", + type: "module", + private: true, + scripts: { + test: "echo Please run any of the test scripts from the scripts folder.", + "test-browser": "npx playwright install && node test/unit/browser/index.js", + "test-browser-amd": "npx playwright install && node test/unit/browser/index.amd.js", + "test-browser-no-install": "node test/unit/browser/index.js", + "test-browser-amd-no-install": "node test/unit/browser/index.amd.js", + "test-node": "mocha test/unit/node/index.mjs --delay --ui=tdd --timeout=5000 --exit", + "test-node-amd": "mocha test/unit/node/index.amd.js --delay --ui=tdd --timeout=5000 --exit", + "test-extension": "vscode-test", + preinstall: "node build/npm/preinstall.js", + postinstall: "patch-package && node build/npm/postinstall.js", + "ravi-build-linux-arm64": "cross-env VSCODE_MANGLE_DISABLE=true node --max-old-space-size=8192 ./node_modules/gulp/bin/gulp.js vscode-linux-arm64-min", + "ravi-build-linux-arm64-deb": "cross-env VSCODE_MANGLE_DISABLE=true node --max-old-space-size=8192 ./node_modules/gulp/bin/gulp.js vscode-linux-arm64-prepare-deb && node --max-old-space-size=8192 ./node_modules/gulp/bin/gulp.js vscode-linux-arm64-build-deb", + "ravi-build-linux-x64": "cross-env VSCODE_MANGLE_DISABLE=true node --max-old-space-size=8192 ./node_modules/gulp/bin/gulp.js vscode-linux-x64-min", + "ravi-build-linux-x64-deb": "cross-env VSCODE_MANGLE_DISABLE=true node --max-old-space-size=8192 ./node_modules/gulp/bin/gulp.js vscode-linux-x64-prepare-deb && node --max-old-space-size=8192 ./node_modules/gulp/bin/gulp.js vscode-linux-x64-build-deb", + compile: "node --max-old-space-size=8192 ./node_modules/gulp/bin/gulp.js compile", + "compile-extensions": "node --max-old-space-size=4095 ./node_modules/gulp/bin/gulp.js compile-extensions", + "compile-retrieval": "node --max-old-space-size=4095 ./node_modules/gulp/bin/gulp.js compile-extension:cursor-retrieval", + watch: "bash ./configure-product-json.sh products/product-debug.jsonc && cross-env VSCODE_DEV_CACHE=1 NODE_OPTIONS=--inspect-port=0 npm run watch-without-configuring-product-json", + "watch-trace": "bash ./configure-product-json.sh products/product-debug.jsonc && cross-env VSCODE_DEV_CACHE=trace NODE_OPTIONS=--inspect-port=0 npm run watch-without-configuring-product-json", + "watch-clean": "rm -rf out out-ts", + "watch-nocache": "bash ./configure-product-json.sh products/product-debug.jsonc && cross-env NODE_OPTIONS=--inspect-port=0 npm run watch-without-configuring-product-json", + "watch-esm": "bash ./configure-product-json.sh products/product-debug.jsonc && cross-env NODE_OPTIONS=--inspect-port=0 npm run watch-without-configuring-product-json-esm", + "watch-nightly": "bash ./configure-product-json.sh products/product-nightly-todesktop.jsonc && cross-env VSCODE_DEV_CACHE=1 npm run watch-without-configuring-product-json", + "watch-prod": "bash ./configure-product-json.sh products/product-prod-todesktop.jsonc && cross-env VSCODE_DEV_CACHE=1 npm run watch-without-configuring-product-json", + "watch-prod-ssh": "bash ./configure-product-json.sh products/product-prod-sshfuzz.jsonc && cross-env VSCODE_DEV_CACHE=1 npm run watch-without-configuring-product-json", + "watch-debug-ssh": "bash ./configure-product-json.sh products/product-debug-ssh.jsonc && cross-env VSCODE_DEV_CACHE=1 npm run watch-without-configuring-product-json", + "watch-debug-ssh-swc": "bash ./configure-product-json.sh products/product-debug-ssh.jsonc && npm run watch-without-configuring-product-json-swc", + "watch-prod-swc": "bash ./configure-product-json.sh products/product-prod-todesktop.jsonc && npm run watch-without-configuring-product-json-swc", + "watch-swc": "echo 'watch-swc is banned for now because it is causing bugs that we are confusing with real bugs. it also dies more often.' && exit 1 && bash ./configure-product-json.sh products/product-debug.jsonc && npm run watch-without-configuring-product-json-swc", + "sualeh:watch-swc": "bash ./configure-product-json.sh products/product-debug.jsonc && npm run watch-without-configuring-product-json-swc", + "watch-windows": "cross-env VSCODE_DEV_CACHE=1 npm run buf:generate && cross-env VSCODE_DEV_CACHE=1 npm run compile-extensions && cross-env VSCODE_DEV_CACHE=1 npm-run-all -lp buf:generate watch-client watch-extensions watch-cpp-utils copy-cpp-utils watch-proto-windows", + "watch-without-configuring-product-json": "(npm run buf:generate || echo 'failed to generate proto') && npm-run-all -lp watch-client watch-extensions watch-proto watch-rust watch-cpp-utils copy-cpp-utils watch-rcp-ts", + "watch-without-configuring-product-json-esm": "(npm run buf:generate || echo 'failed to generate proto') && npm-run-all -lp watch-client-esm watch-extensions watch-proto watch-rust watch-cpp-utils copy-cpp-utils", + "watch-without-configuring-product-json-swc": "(npm run buf:generate || echo 'failed to generate proto') && npm-run-all -lp watch-client-swc watch-extensions-swc watch-proto watch-rust watch-cpp-utils copy-cpp-utils", + "watch-just-cursor-retrieval": "(npm run buf:generate || echo 'failed to generate proto') && npm-run-all -lp 'gulp watch-extension:cursor-retrieval' watch-proto", + "watch-just-client": "(npm run buf:generate || echo 'failed to generate proto') && npm-run-all -lp 'gulp watch-just-client' watch-proto", + "watch-proto": "nodemon --on-change-only --watch '../schema/**/*' --ext proto --exec 'bash ./scripts/buf-generate-with-error-handling.sh'", + "watch-proto-windows": "nodemon --on-change-only --watch '../schema/**/*' --ext proto --exec 'npm run buf:generate'", + "watch-cpp-utils": "nodemon --on-change-only --watch 'extensions/cursor-always-local/src/commands/cppUtils/**/*.ts' --ext ts --exec 'npm run copy-cpp-utils'", + "copy-cpp-utils": "npm run copy-cpp-utils-to-renderer && npm run copy-cpp-utils-to-backend", + "copy-cpp-utils-to-renderer": "node ../backend/server/scripts/copyCppUtils.js ./src/vs/base/common/cppUtils ./extensions/cursor-always-local/src/commands/cppUtils src/proto true", + "copy-cpp-utils-to-backend": "node ../backend/server/scripts/copyCppUtils.js ../backend/server/src/cppUtils ./extensions/cursor-always-local/src/commands/cppUtils false true", + "watch-rust": "cd extensions/cursor-retrieval && npm run watch:rust", + watchd: "deemon npm run watch", + "watch-webd": "deemon npm run watch-web", + "kill-watchd": "deemon --kill npm run watch", + "kill-watch-webd": "deemon --kill npm run watch-web", + "restart-watchd": "deemon --restart npm run watch", + "restart-watch-webd": "deemon --restart npm run watch-web", + "watch-client": "node --max-old-space-size=8192 ./node_modules/gulp/bin/gulp.js watch-client", + "watch-client-bun": "bun ./node_modules/gulp/bin/gulp.js watch-client", + "watch-client-swc": "node --max-old-space-size=8192 ./node_modules/gulp/bin/gulp.js watch-client-swc", + "watch-client-amd": "node --max-old-space-size=4095 ./node_modules/gulp/bin/gulp.js watch-client-amd", + "watch-clientd": "deemon npm run watch-client", + "kill-watch-clientd": "deemon --kill npm run watch-client", + "watch-extensions": "node --max-old-space-size=8192 ./node_modules/gulp/bin/gulp.js watch-extensions watch-extension-media", + "watch-extensions-bun": "bun ./node_modules/gulp/bin/gulp.js watch-extensions watch-extension-media", + "watch-extensions-swc": "node --max-old-space-size=8192 -- ./node_modules/gulp/bin/gulp.js watch-extensions-swc watch-extension-media", + "watch-extensionsd": "deemon npm run watch-extensions", + "watch-rcp-ts": "cd cursor-rcp-ts && npm run watch", + "kill-watch-extensionsd": "deemon --kill npm run watch-extensions", + gulp: "node --max-old-space-size=10000 ./node_modules/gulp/bin/gulp.js", + precommit: "node build/hygiene.js", + electron: "node build/lib/electron", + "7z": "7z", + "update-grammars": "node build/npm/update-all-grammars.mjs", + "update-localization-extension": "node build/npm/update-localization-extension.js", + smoketest: "node build/lib/preLaunch.js && cd test/smoke && npm run compile && node test/index.js", + "smoketest-no-compile": "cd test/smoke && node test/index.js", + "download-builtin-extensions": "node build/lib/builtInExtensions.js", + "download-builtin-extensions-cg": "node build/lib/builtInExtensionsCG.js", + "monaco-compile-check": "tsc -p src/tsconfig.monaco.json --noEmit", + "tsec-compile-check": "node --max-old-space-size=8192 node_modules/tsec/bin/tsec -p src/tsconfig.tsec.json", + "tsec-compile-post-compile-ts": "npm run gulp precompile-tsx-only && node --max-old-space-size=8192 node_modules/tsec/bin/tsec -p out-ts2/tsconfig.tsec.json", + "vscode-dts-compile-check": "tsc -p src/tsconfig.vscode-dts.json && tsc -p src/tsconfig.vscode-proposed-dts.json", + "valid-layers-check": "node --max-old-space-size=4096 build/lib/layersChecker.js", + "update-distro": "node build/npm/update-distro.mjs", + web: "echo 'npm run web' is replaced by './scripts/code-server' or './scripts/code-web'", + "compile-cli": "gulp compile-cli", + "compile-web": "node ./node_modules/gulp/bin/gulp.js compile-web", + "watch-web": "node --max-old-space-size=8192 ./node_modules/gulp/bin/gulp.js watch-web", + "watch-cli": "node ./node_modules/gulp/bin/gulp.js watch-cli", + eslint: "node build/eslint", + stylelint: "node build/stylelint", + "playwright-install": "npm exec playwright install", + "compile-build": "node ./node_modules/gulp/bin/gulp.js compile-build", + "compile-extensions-build": "node ./node_modules/gulp/bin/gulp.js compile-extensions-build", + "minify-vscode": "node ./node_modules/gulp/bin/gulp.js minify-vscode", + "minify-vscode-reh": "node ./node_modules/gulp/bin/gulp.js minify-vscode-reh", + "minify-vscode-reh-web": "node ./node_modules/gulp/bin/gulp.js minify-vscode-reh-web", + hygiene: "node ./node_modules/gulp/bin/gulp.js hygiene", + "core-ci": "node ./node_modules/gulp/bin/gulp.js core-ci", + "core-ci-pr": "node ./node_modules/gulp/bin/gulp.js core-ci-pr", + "extensions-ci": "node ./node_modules/gulp/bin/gulp.js extensions-ci", + "extensions-ci-pr": "node ./node_modules/gulp/bin/gulp.js extensions-ci-pr", + perf: "node scripts/code-perf.js", + "webview-generate-csp-hash": "npx github:apaatsio/csp-hash-from-html csp-hash ./src/vs/workbench/contrib/webview/browser/pre/index.html", + "buf:onlygenerate": "buf generate ../schema && buf generate ../anyrun/proto", + "buf:generate:schema": "buf generate ../schema && buf generate ../anyrun/proto", + "buf:generate:vscode": "npm run buf:generate:schema && npm run buf:cleanpaths", + "buf:generate:retrieval": "cd extensions/cursor-retrieval && npm run buf:generate", + "buf:generate:experiments": "cd extensions/cursor-experiments && npm run buf:generate", + "buf:generate:always-local": "cd extensions/cursor-always-local && npm run buf:generate", + "buf:generate:browser": "cd extensions/cursor-browser && npm run buf:generate", + "buf:generate:shadow-workspace": "cd extensions/cursor-shadow-workspace && npm run buf:generate", + "buf:generate:deeplink": "cd extensions/cursor-deeplink && npm run buf:generate", + "buf:generate": "npm-run-all -lp buf:generate:vscode buf:generate:retrieval buf:generate:experiments buf:generate:always-local buf:generate:browser buf:generate:shadow-workspace buf:generate:deeplink", + "buf:cleanpaths": "node build/lib/cleanpaths.js src/proto", + "update-build-ts-version": "npm install typescript@next && tsc -p ./build/tsconfig.build.json" + }, + dependencies: { + "@anysphere/file-service": "^0.0.0-b344d630", + "@connectrpc/connect": "^1.6.1", + "@connectrpc/connect-node": "^1.5.0", + "@electron/asar": "^3.2.3", + "@microsoft/1ds-core-js": "^3.2.13", + "@microsoft/1ds-post-js": "^3.2.13", + "@parcel/watcher": "2.5.0", + "@sentry/electron": "5.7.0", + "@sentry/node": "8.35.0", + "@todesktop/runtime": "^1.6.1", + "@types/semver": "^7.5.8", + "@vscode/deviceid": "^0.1.1", + "@vscode/iconv-lite-umd": "0.7.0", + "@vscode/policy-watcher": "^1.1.8", + "@vscode/proxy-agent": "^0.27.0", + "@vscode/ripgrep": "^1.15.10", + "@vscode/spdlog": "^0.15.1", + "@vscode/sqlite3": "5.1.8-vscode", + "@vscode/sudo-prompt": "9.3.1", + "@vscode/tree-sitter-wasm": "^0.0.4", + "@vscode/vscode-languagedetection": "1.0.21", + "@vscode/windows-mutex": "^0.5.0", + "@vscode/windows-process-tree": "^0.6.0", + "@vscode/windows-registry": "^1.1.0", + "@xterm/addon-clipboard": "^0.2.0-beta.53", + "@xterm/addon-image": "^0.9.0-beta.70", + "@xterm/addon-ligatures": "^0.10.0-beta.70", + "@xterm/addon-search": "^0.16.0-beta.70", + "@xterm/addon-serialize": "^0.14.0-beta.70", + "@xterm/addon-unicode11": "^0.9.0-beta.70", + "@xterm/addon-webgl": "^0.19.0-beta.70", + "@xterm/headless": "^5.6.0-beta.70", + "@xterm/xterm": "^5.6.0-beta.70", + archiver: "^7.0.1", + "fast-jwt": "^6.0.1", + "http-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.2", + jschardet: "3.1.4", + kerberos: "2.1.1", + minimist: "^1.2.6", + multiformats: "^13.3.1", + "native-is-elevated": "0.7.0", + "native-keymap": "^3.3.5", + "native-watchdog": "^1.4.1", + "node-fetch": "2.7.0", + "node-pty": "1.1.0-beta22", + open: "^8.4.2", + "tas-client-umd": "0.2.0", + "v8-inspect-profiler": "^0.1.1", + "vscode-oniguruma": "1.7.0", + "vscode-regexpp": "^3.1.0", + "vscode-textmate": "9.1.0", + yauzl: "^3.0.0", + yazl: "^2.4.3" + }, + devDependencies: { + "@babel/plugin-proposal-decorators": "^7.21.0", + "@babel/plugin-proposal-explicit-resource-management": "^7.25.9", + "@babel/plugin-syntax-decorators": "^7.21.0", + "@babel/plugin-syntax-explicit-resource-management": "^7.25.9", + "@babel/plugin-syntax-jsx": "^7.18.6", + "@babel/plugin-syntax-typescript": "^7.20.0", + "@bufbuild/buf": "^1.47.2", + "@bufbuild/protoc-gen-connect-web": "^0.11.0", + "@bufbuild/protoc-gen-es": "^1.10.0", + "@bufbuild/protoplugin": "^2.2.5", + "@playwright/test": "^1.46.1", + "@sentry/cli": "^2.39.1", + "@solid-devtools/overlay": "^0.33.0", + "@stylistic/eslint-plugin-ts": "^2.8.0", + "@swc/core": "^1.3.85", + "@types/archiver": "^6.0.3", + "@types/cookie": "^0.3.3", + "@types/debug": "^4.1.5", + "@types/eslint": "^9.6.1", + "@types/gulp-svgmin": "^1.2.1", + "@types/http-proxy-agent": "^2.0.1", + "@types/kerberos": "^1.1.2", + "@types/minimist": "^1.2.1", + "@types/mocha": "^9.1.1", + "@types/node": "20.x", + "@types/sinon": "^10.0.2", + "@types/sinon-test": "^2.4.2", + "@types/tmp": "^0.2.3", + "@types/trusted-types": "^1.0.6", + "@types/vscode-notebook-renderer": "^1.72.0", + "@types/webpack": "^5.28.5", + "@types/wicg-file-system-access": "^2020.9.6", + "@types/windows-foreground-love": "^0.3.0", + "@types/winreg": "^1.2.30", + "@types/yauzl": "^2.10.0", + "@types/yazl": "^2.4.2", + "@typescript-eslint/typescript-estree": "^8.19.0", + "@typescript-eslint/utils": "^8.8.0", + "@vscode/gulp-electron": "^1.36.0", + "@vscode/l10n-dev": "0.0.35", + "@vscode/telemetry-extractor": "^1.10.2", + "@vscode/test-cli": "^0.0.6", + "@vscode/test-electron": "^2.4.0", + "@vscode/test-web": "^0.0.62", + "@vscode/v8-heap-parser": "^0.1.0", + "@vscode/vscode-perf": "^0.0.19", + "@webgpu/types": "^0.1.44", + "ansi-colors": "^3.2.3", + asar: "^3.0.3", + autoprefixer: "^10.4.20", + "babel-plugin-parameter-decorator": "^1.0.16", + "babel-preset-solid": "^1.7.4", + "chokidar-cli": "^3.0.0", + "chromium-pickle-js": "^0.2.0", + cookie: "^0.7.2", + "copy-webpack-plugin": "^11.0.0", + "cross-env": "^7.0.3", + "css-loader": "^6.9.1", + cssnano: "^6.0.3", + debounce: "^1.0.0", + deemon: "^1.8.0", + electron: "34.3.4", + eslint: "^9.17.0", + "eslint-config-prettier": "^6.15.0", + "eslint-formatter-compact": "^8.40.0", + "eslint-plugin-header": "3.1.1", + "eslint-plugin-import": "^2.31.0", + "eslint-plugin-jsdoc": "^50.3.1", + "eslint-plugin-local": "^6.0.0", + "eslint-plugin-no-null": "^1.0.2", + "eslint-plugin-no-only-tests": "^2.6.0", + "eslint-plugin-prefer-arrow": "^1.2.2", + "eslint-plugin-prettier": "^3.1.2", + "eslint-plugin-react": "^7.37.3", + "eslint-plugin-react-hooks": "^5.1.0", + "eslint-plugin-solid": "^0.14.5", + "eslint-plugin-unused-imports": "^4.1.4", + "event-stream": "3.3.4", + "fancy-log": "^1.3.3", + "fast-glob": "^3.3.2", + "file-loader": "^6.2.0", + glob: "^5.0.13", + gulp: "^4.0.0", + "gulp-azure-storage": "^0.12.1", + "gulp-bom": "^3.0.0", + "gulp-buffer": "0.0.2", + "gulp-clone": "^2.0.1", + "gulp-concat": "^2.6.1", + "gulp-filter": "^5.1.0", + "gulp-flatmap": "^1.0.2", + "gulp-gunzip": "^1.0.0", + "gulp-gzip": "^1.4.2", + "gulp-json-editor": "^2.5.0", + "gulp-plumber": "^1.2.0", + "gulp-rename": "^1.2.0", + "gulp-replace": "^1.1.4", + "gulp-sourcemaps": "^3.0.0", + "gulp-svgmin": "^4.1.0", + "gulp-untar": "^0.0.7", + "gulp-vinyl-zip": "^2.1.2", + "http-server": "^14.1.1", + innosetup: "6.0.5", + "istanbul-lib-coverage": "^3.2.0", + "istanbul-lib-instrument": "^6.0.1", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.1", + "istanbul-reports": "^3.1.5", + "lazy.js": "^0.4.2", + "merge-options": "^1.0.1", + mime: "^1.4.1", + minimatch: "^3.0.4", + minimist: "^1.2.6", + mocha: "^10.2.0", + "mocha-junit-reporter": "^2.2.1", + "mocha-multi-reporters": "^1.5.1", + nodemon: "^2.0.22", + "npm-run-all": "^4.1.5", + opn: "^6.0.0", + "os-browserify": "^0.3.0", + "p-all": "^1.0.0", + "patch-package": "^8.0.0", + "path-browserify": "^1.0.1", + postcss: "^8.4.33", + "postcss-nesting": "^12.0.2", + prettier: "^3.3.3", + pump: "^1.0.1", + rcedit: "^1.1.0", + rimraf: "^2.2.8", + sinon: "^12.0.1", + "sinon-test": "^3.1.3", + "solid-devtools": "^0.33.0", + "solid-refresh": "^0.7.5", + "source-map": "0.6.1", + "source-map-support": "^0.3.2", + "strip-json-comments-cli": "^3.0.0", + "style-loader": "^3.3.2", + tailwindcss: "^3.4.17", + "ts-loader": "^9.5.1", + "ts-node": "^10.9.1", + tsec: "0.2.7", + tslib: "^2.6.3", + typescript: "5.8.0-dev.20241202", + "typescript-eslint": "^8.8.0", + util: "^0.12.4", + vite: "^6.0.7", + webpack: "^5.94.0", + "webpack-cli": "^5.1.4", + "webpack-stream": "^7.0.0", + xml2js: "^0.5.0", + yaserver: "^0.4.0" + }, + overrides: { + "typescript-eslint": { + typescript: "$typescript" + }, + "@typescript-eslint/typescript-estree": { + typescript: "$typescript" + }, + "@typescript-eslint/utils": { + typescript: "$typescript" + }, + tsec: { + typescript: "$typescript" + }, + "eslint-config-airbnb": { + eslint: "$eslint" + }, + "ts-node": { + typescript: "$typescript" + }, + "eslint-plugin-solid": { + typescript: "$typescript" + }, + "node-gyp-build": "4.8.4", + diff: "^5.2.0", + "@parcel/watcher": "2.5.0", + "kerberos@2.1.1": { + "node-addon-api": "7.1.0" + }, + "@parcel/watcher@2.5.0": { + "node-addon-api": "7.1.0" + } + }, + repository: { + type: "git", + url: "https://github.com/microsoft/vscode.git" + }, + bugs: { + url: "https://github.com/microsoft/vscode/issues" + }, + optionalDependencies: { + "@vscode/windows-ca-certs": "^0.3.3", + "windows-foreground-love": "0.5.0" + } + }; + if (f0.BUILD_INSERT_PACKAGE_CONFIGURATION) { + f0 = P3("../package.json"); + } + var li = d0; + var PF = f0; + Hs(); + var $F = kF(import.meta.url); + var IF = SF.dirname(EF(import.meta.url)); + if (process.env.ELECTRON_RUN_AS_NODE || process.versions.electron) { + xF(`data:text/javascript;base64,${Buffer.from(` + export async function resolve(specifier, context, nextResolve) { + if (specifier === 'fs') { + return { + format: 'builtin', + shortCircuit: true, + url: 'node:original-fs' + }; + } + + // Defer to the next hook in the chain, which would be the + // Node.js default resolve if this is the last user-specified loader. + return nextResolve(specifier, context); + }`).toString("base64")}`, import.meta.url); + } + globalThis._VSCODE_PRODUCT_JSON = { + ...li + }; + if (process.env.VSCODE_DEV) { + try { + const t = $F("../product.overrides.json"); + globalThis._VSCODE_PRODUCT_JSON = Object.assign(globalThis._VSCODE_PRODUCT_JSON, t); + } catch {} + } + globalThis._VSCODE_PACKAGE_JSON = { + ...PF + }; + globalThis._VSCODE_FILE_ROOT = IF; + var p0 = undefined; + function AF() { + p0 ||= CF(); + return p0; + } + async function CF() { + Ne("code/willLoadNls"); + let t; + let e; + if (process.env.VSCODE_NLS_CONFIG) { + try { + t = JSON.parse(process.env.VSCODE_NLS_CONFIG); + if (t?.languagePack?.messagesFile) { + e = t.languagePack.messagesFile; + } else if (t?.defaultMessagesFile) { + e = t.defaultMessagesFile; + } + globalThis._VSCODE_NLS_LANGUAGE = t?.resolvedLanguage; + } catch (i) { + console.error(`Error reading VSCODE_NLS_CONFIG from environment: ${i}`); + } + } + if (!process.env.VSCODE_DEV && !!e) { + try { + globalThis._VSCODE_NLS_MESSAGES = JSON.parse((await h0.promises.readFile(e)).toString()); + } catch (i) { + console.error(`Error reading NLS messages file ${e}: ${i}`); + if (t?.languagePack?.corruptMarkerFile) { + try { + await h0.promises.writeFile(t.languagePack.corruptMarkerFile, "corrupted"); + } catch (s) { + console.error(`Error writing corrupted NLS marker file: ${s}`); + } + } + if (t?.defaultMessagesFile && t.defaultMessagesFile !== e) { + try { + globalThis._VSCODE_NLS_MESSAGES = JSON.parse((await h0.promises.readFile(t.defaultMessagesFile)).toString()); + } catch (s) { + console.error(`Error reading default NLS messages file ${t.defaultMessagesFile}: ${s}`); + } + } + } + Ne("code/didLoadNls"); + return t; + } + } + async function _F() { + await AF(); + } + var RF = R0(O0(), 1); + import { fileURLToPath as OF } from "url"; + import { app as Ae, protocol as LF, crashReporter as MF, Menu as FF, contentTracing as NF } from "electron"; + import { networkInterfaces as WF } from "os"; + import { createHash as TF, randomUUID as jF } from "crypto"; + import "node-fetch"; + var UF = new Set(["00:00:00:00:00:00", "ff:ff:ff:ff:ff:ff", "ac:de:48:00:11:22"]); + function BF(t) { + const e = t.replace(/\-/g, ":").toLowerCase(); + return !UF.has(e); + } + function qF() { + const t = WF(); + for (const e in t) { + const i = t[e]; + if (i) { + for (const { + mac: s + } of i) { + if (BF(s)) { + return s; + } + } + } + } + throw new Error("Unable to retrieve mac address (unexpected format)"); + } + function zF(t) { + try { + const e = qF(); + return TF("sha256").update(e, "utf8").digest("hex"); + } catch (e) { + t(e); + return jF(); + } + } + F0(); + j0(); + Hs(); + Hs(); + import * as Ws from "path"; + import * as Ts from "fs"; + async function $3({ + userLocale: t, + osLocale: e, + userDataPath: i, + commit: s, + nlsMetadataPath: r + }) { + Ne("code/willGenerateNls"); + if (process.env.VSCODE_DEV || t === "pseudo" || t.startsWith("en") || !s || !i) { + return vl(t, e, r); + } + try { + const n = await HF(i); + if (!n) { + return vl(t, e, r); + } + const o = VF(n, t); + if (!o) { + return vl(t, e, r); + } + const a = n[o]; + const c = a?.translations?.vscode; + if (!a || typeof a.hash != "string" || !a.translations || typeof c != "string" || !(await g0(c))) { + return vl(t, e, r); + } + const l = `${a.hash}.${o}`; + const u = Ws.join(i, "clp", l); + const d = Ws.join(u, s); + const f = Ws.join(d, "nls.messages.json"); + const p = Ws.join(u, "tcf.json"); + const w = Ws.join(u, "corrupted.info"); + if (await g0(w)) { + await Ts.promises.rm(u, { + recursive: true, + force: true, + maxRetries: 3 + }); + } + const m = { + userLocale: t, + osLocale: e, + resolvedLanguage: o, + defaultMessagesFile: Ws.join(r, "nls.messages.json"), + languagePack: { + translationsConfigFile: p, + messagesFile: f, + corruptMarkerFile: w + }, + locale: t, + availableLanguages: { + "*": o + }, + _languagePackId: l, + _languagePackSupport: true, + _translationsConfigFile: p, + _cacheRoot: u, + _resolvedLanguagePackCoreLocation: d, + _corruptedFile: w + }; + if (await g0(d)) { + GF(d).catch(() => {}); + Ne("code/didGenerateNls"); + return m; + } + const [, y, b, k] = await Promise.all([Ts.promises.mkdir(d, { + recursive: true + }), JSON.parse(await Ts.promises.readFile(Ws.join(r, "nls.keys.json"), "utf-8")), JSON.parse(await Ts.promises.readFile(Ws.join(r, "nls.messages.json"), "utf-8")), JSON.parse(await Ts.promises.readFile(c, "utf-8"))]); + const A = []; + let C = 0; + for (const [_, Z] of y) { + const ie = k.contents[_]; + for (const me of Z) { + A.push(ie?.[me] || b[C]); + C++; + } + } + await Promise.all([Ts.promises.writeFile(f, JSON.stringify(A), "utf-8"), Ts.promises.writeFile(p, JSON.stringify(a.translations), "utf-8")]); + Ne("code/didGenerateNls"); + return m; + } catch (n) { + console.error("Generating translation files failed.", n); + } + return vl(t, e, r); + } + async function HF(t) { + const e = Ws.join(t, "languagepacks.json"); + try { + return JSON.parse(await Ts.promises.readFile(e, "utf-8")); + } catch { + return; + } + } + function VF(t, e) { + try { + while (e) { + if (t[e]) { + return e; + } + const i = e.lastIndexOf("-"); + if (i > 0) { + e = e.substring(0, i); + } else { + return; + } + } + } catch (i) { + console.error("Resolving language pack configuration failed.", i); + } + } + function vl(t, e, i) { + Ne("code/didGenerateNls"); + return { + userLocale: t, + osLocale: e, + resolvedLanguage: "en", + defaultMessagesFile: Ws.join(i, "nls.messages.json"), + locale: t, + availableLanguages: {} + }; + } + async function g0(t) { + try { + await Ts.promises.access(t); + return true; + } catch { + return false; + } + } + function GF(t) { + const e = new Date(); + return Ts.promises.utimes(t, e, e); + } + wa(); + import { createRequire as JF } from "module"; + va(); + import * as Ni from "@sentry/electron/main"; + import KF from "electron"; + function ZF() { + try { + Ni.init({ + ...MS(), + environment: KF.app.isPackaged ? globalThis._VSCODE_PRODUCT_JSON.applicationName : "development", + integrations: [Ni.sentryMinidumpIntegration(), Ni.electronContextIntegration(), Ni.normalizePathsIntegration(), Ni.additionalContextIntegration(), Ni.inboundFiltersIntegration(), Ni.functionToStringIntegration(), Ni.linkedErrorsIntegration(), Ni.dedupeIntegration(), Ni.nodeContextIntegration({ + cloudResource: false + }), Ni.mainProcessSessionIntegration({ + sendOnCreate: true + })], + beforeSend: t => { + Ni.startSpan({ + name: "error-span", + attributes: { + "error.message": t.message, + "error.trace_id": t.contexts?.trace?.trace_id, + "error.event_id": t.event_id + } + }, () => {}); + return t; + } + }); + qt().sentry = Ni; + process.env.CURSOR_TRACE_ID = Ni.getCurrentScope().getPropagationContext().traceId; + } catch (t) { + console.error("Failed to initialize tracing in main process", t); + } + } + ZF(); + var _j = JF(import.meta.url); + var m0 = lr.dirname(OF(import.meta.url)); + Ne("code/didStartMain"); + Ne("code/willLoadMainBundle", { + startTime: Math.floor(gF.timeOrigin) + }); + Ne("code/didLoadMainBundle"); + var I3 = yF(li); + var Rj = zF(console.error); + var Oj = li.dataFolderName ?? ".cursor"; + var Bi = rN(); + var vf = XF(Bi); + if (Bi.sandbox && !Bi["disable-chromium-sandbox"] && !vf["disable-chromium-sandbox"]) { + Ae.enableSandbox(); + } else if (Ae.commandLine.hasSwitch("no-sandbox") && !Ae.commandLine.hasSwitch("disable-gpu-sandbox")) { + Ae.commandLine.appendSwitch("disable-gpu-sandbox"); + } else { + Ae.commandLine.appendSwitch("no-sandbox"); + Ae.commandLine.appendSwitch("disable-gpu-sandbox"); + } + Ae.commandLine.appendSwitch("force-gpu-mem-available-mb", "1024"); + var ua = W0(Bi, li.nameShort ?? "code-oss-dev"); + if (process.platform === "win32") { + const t = B0(ua); + if (t) { + ma(t); + } + } + Ae.setPath("userData", ua); + var A3 = oN(); + FF.setApplicationMenu(null); + Ne("code/willStartCrashReporter"); + if (Bi["crash-reporter-directory"] || vf["enable-crash-reporter"] && !Bi["disable-crash-reporter"]) { + iN(); + } + Ne("code/didStartCrashReporter"); + if (I3 && I3.isPortable) { + Ae.setAppLogsPath(lr.join(ua, "logs")); + } + LF.registerSchemesAsPrivileged([{ + scheme: "vscode-webview", + privileges: { + standard: true, + secure: true, + supportFetchAPI: true, + corsEnabled: true, + allowServiceWorkers: true, + codeCache: true + } + }, { + scheme: "vscode-file", + privileges: { + secure: true, + standard: true, + supportFetchAPI: true, + corsEnabled: true, + codeCache: true + } + }]); + nN(); + var w0 = undefined; + var v0 = _3((Ae.getPreferredSystemLanguages()?.[0] ?? "en").toLowerCase()); + var bl = lN(vf); + if (bl) { + w0 = $3({ + userLocale: bl, + osLocale: v0, + commit: li.commit, + userDataPath: ua, + nlsMetadataPath: m0 + }); + } + if (process.platform === "win32" || process.platform === "linux") { + const t = !bl || bl === "qps-ploc" ? "en" : bl; + Ae.commandLine.appendSwitch("lang", t); + } + Ae.once("ready", function () { + if (Bi.trace) { + let t; + if (Bi["trace-memory-infra"]) { + const e = Bi["trace-category-filter"]?.split(",") || []; + e.push("disabled-by-default-memory-infra", "disabled-by-default-memory-infra.v8.code_stats"); + t = { + included_categories: e, + excluded_categories: ["*"], + memory_dump_config: { + allowed_dump_modes: ["light", "detailed"], + triggers: [{ + type: "periodic_interval", + mode: "detailed", + min_time_between_dumps_ms: 10000 + }, { + type: "periodic_interval", + mode: "light", + min_time_between_dumps_ms: 1000 + }] + } + }; + } else { + t = { + categoryFilter: Bi["trace-category-filter"] || "*", + traceOptions: Bi["trace-options"] || "record-until-full,enable-sampling" + }; + } + NF.startRecording(t).finally(() => C3()); + } else { + C3(); + } + }); + async function C3() { + Ne("code/mainAppReady"); + try { + const [, t] = await Promise.all([aN(A3), cN()]); + await YF(A3, t); + } catch (t) { + console.error(t); + } + } + async function YF(t, e) { + process.env.VSCODE_NLS_CONFIG = JSON.stringify(e); + process.env.VSCODE_CODE_CACHE_PATH = t || ""; + await _F(); + await Promise.resolve().then(() => { + fF(); + return lF; + }); + Ne("code/didRunMainBundle"); + } + function XF(t) { + const e = ["disable-hardware-acceleration", "force-color-profile", "disable-lcd-text", "proxy-bypass-list"]; + if (process.platform === "linux") { + e.push("force-renderer-accessibility"); + e.push("password-store"); + } + const i = ["enable-proposed-api", "log-level", "use-inmemory-secretstorage"]; + const s = QF(); + Object.keys(s).forEach(c => { + const l = s[c]; + if (e.indexOf(c) !== -1) { + if (l === true || l === "true") { + if (c === "disable-hardware-acceleration") { + Ae.disableHardwareAcceleration(); + } else { + Ae.commandLine.appendSwitch(c); + } + } else if (typeof l == "string" && l) { + if (c === "password-store") { + let u = l; + if (l === "gnome" || l === "gnome-keyring") { + u = "gnome-libsecret"; + } + Ae.commandLine.appendSwitch(c, u); + } else { + Ae.commandLine.appendSwitch(c, l); + } + } + } else if (i.indexOf(c) !== -1) { + switch (c) { + case "enable-proposed-api": + if (Array.isArray(l)) { + l.forEach(u => u && typeof u == "string" && process.argv.push("--enable-proposed-api", u)); + } else { + console.error("Unexpected value for `enable-proposed-api` in argv.json. Expected array of extension ids."); + } + break; + case "log-level": + if (typeof l == "string") { + process.argv.push("--log", l); + } else if (Array.isArray(l)) { + for (const u of l) { + process.argv.push("--log", u); + } + } + break; + case "use-inmemory-secretstorage": + if (l) { + process.argv.push("--use-inmemory-secretstorage"); + } + break; + } + } + }); + const r = `DocumentPolicyIncludeJSCallStacksInCrashReports, ${Ae.commandLine.getSwitchValue("enable-features")}`; + Ae.commandLine.appendSwitch("enable-features", r); + const n = `CalculateNativeWinOcclusion,PlzDedicatedWorker,${Ae.commandLine.getSwitchValue("disable-features")}`; + Ae.commandLine.appendSwitch("disable-features", n); + const o = `FontMatchingCTMigration,StandardizedBrowserZoom,${Ae.commandLine.getSwitchValue("disable-blink-features")}`; + Ae.commandLine.appendSwitch("disable-blink-features", o); + const a = sN(t); + if (a) { + Ae.commandLine.appendSwitch("js-flags", a); + } + Ae.commandLine.appendSwitch("xdg-portal-required-version", "4"); + return s; + } + function QF() { + const t = tN(); + let e; + try { + e = L0(Wn.readFileSync(t).toString()); + } catch (i) { + if (i && i.code === "ENOENT") { + eN(t); + } else { + console.warn(`Unable to read argv.json configuration file in ${t}, falling back to defaults (${i})`); + } + } + e ||= {}; + return e; + } + function eN(t) { + try { + const e = lr.dirname(t); + if (!Wn.existsSync(e)) { + Wn.mkdirSync(e); + } + const i = ["// This configuration file allows you to pass permanent command line arguments to VS Code.", "// Only a subset of arguments is currently supported to reduce the likelihood of breaking", "// the installation.", "//", "// PLEASE DO NOT CHANGE WITHOUT UNDERSTANDING THE IMPACT", "//", "// NOTE: Changing this file requires a restart of VS Code.", "{", "\t// Use software rendering instead of hardware accelerated rendering.", "\t// This can help in cases where you see rendering issues in VS Code.", "\t// \"disable-hardware-acceleration\": true", "}"]; + Wn.writeFileSync(t, i.join(` + `)); + } catch (e) { + console.error(`Unable to create argv.json configuration file in ${t}, falling back to defaults (${e})`); + } + } + function tN() { + const t = process.env.VSCODE_PORTABLE; + if (t) { + return lr.join(t, "argv.json"); + } + let e = li.dataFolderName; + if (process.env.VSCODE_DEV) { + e = `${e}-dev`; + } + return lr.join(pF.homedir(), e, "argv.json"); + } + function iN() { + let t = Bi["crash-reporter-directory"]; + let e = ""; + if (t) { + t = lr.normalize(t); + if (!lr.isAbsolute(t)) { + console.error(`The path '${t}' specified for --crash-reporter-directory must be absolute.`); + Ae.exit(1); + } + if (!Wn.existsSync(t)) { + try { + Wn.mkdirSync(t, { + recursive: true + }); + } catch { + console.error(`The path '${t}' specified for --crash-reporter-directory does not seem to exist or cannot be created.`); + Ae.exit(1); + } + } + console.log(`Found --crash-reporter-directory argument. Setting crashDumps directory to be '${t}'`); + Ae.setPath("crashDumps", t); + } else { + const r = li.appCenter; + if (r) { + const n = process.platform === "win32"; + const o = process.platform === "linux"; + const a = process.platform === "darwin"; + const c = vf["crash-reporter-id"]; + if (c && /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(c)) { + if (n) { + switch (process.arch) { + case "x64": + e = r["win32-x64"]; + break; + case "arm64": + e = r["win32-arm64"]; + break; + } + } else if (a) { + if (li.darwinUniversalAssetId) { + e = r["darwin-universal"]; + } else { + switch (process.arch) { + case "x64": + e = r.darwin; + break; + case "arm64": + e = r["darwin-arm64"]; + break; + } + } + } else if (o) { + e = r["linux-x64"]; + } + e = e.concat("&uid=", c, "&iid=", c, "&sid=", c); + const u = process.argv; + const d = u.indexOf("--"); + if (d === -1) { + u.push("--crash-reporter-id", c); + } else { + u.splice(d, 0, "--crash-reporter-id", c); + } + } + } + } + const i = (li.crashReporter ? li.crashReporter.productName : undefined) || li.nameShort; + const s = (li.crashReporter ? li.crashReporter.companyName : undefined) || "Anysphere"; + MF.start({ + companyName: s, + productName: process.env.VSCODE_DEV ? `${i} Dev` : i, + submitURL: e, + uploadToServer: false, + ignoreSystemCrashHandler: false, + extra: { + platform: process.platform + }, + compress: true + }); + } + function sN(t) { + const e = []; + if (t["js-flags"]) { + e.push(t["js-flags"]); + } + if (e.length > 0) { + return e.join(" "); + } else { + return null; + } + } + function rN() { + return (0, RF.default)(process.argv, { + string: ["user-data-dir", "locale", "js-flags", "crash-reporter-directory"], + boolean: ["disable-chromium-sandbox"], + default: { + sandbox: true + }, + alias: { + "no-sandbox": "sandbox" + } + }); + } + function nN() { + const t = []; + globalThis.macOpenFiles = t; + Ae.on("open-file", function (s, r) { + t.push(r); + }); + const e = []; + const i = function (s, r) { + s.preventDefault(); + e.push(r); + }; + Ae.on("will-finish-launching", function () { + if (process.platform === "darwin" && process.env.VSCODE_DEV) { + const s = li.urlProtocol; + if (s) { + if (!Ae.isDefaultProtocolClient(s) && !Ae.setAsDefaultProtocolClient(s, process.execPath, [])) { + console.error(`Failed to register '${s}' protocol handler.`); + } + } else { + console.warn("No urlProtocol found in product configuration for development registration."); + } + } + Ae.on("open-url", i); + }); + globalThis.getOpenUrls = function () { + Ae.removeListener("open-url", i); + return e; + }; + } + function oN() { + if (process.argv.indexOf("--no-cached-data") > 0 || process.env.VSCODE_DEV) { + return; + } + const t = li.commit; + if (t) { + return lr.join(ua, "CachedData", t); + } + } + async function aN(t) { + if (typeof t == "string") { + try { + await Wn.promises.mkdir(t, { + recursive: true + }); + return t; + } catch {} + } + } + function _3(t) { + if (t.startsWith("zh")) { + const e = t.split("-")[1]; + if (["hans", "cn", "sg", "my"].includes(e)) { + return "zh-cn"; + } else { + return "zh-tw"; + } + } + return t; + } + async function cN() { + const t = w0 ? await w0 : undefined; + if (t) { + return t; + } + let e = Ae.getLocale(); + if (e) { + e = _3(e.toLowerCase()); + return $3({ + userLocale: e, + osLocale: v0, + commit: li.commit, + userDataPath: ua, + nlsMetadataPath: m0 + }); + } else { + return { + userLocale: "en", + osLocale: v0, + resolvedLanguage: "en", + defaultMessagesFile: lr.join(m0, "nls.messages.json"), + locale: "en", + availableLanguages: {} + }; + } + } + function lN(t) { + const e = Bi.locale; + if (e) { + return e.toLowerCase(); + } else if (typeof t?.locale == "string") { + return t.locale.toLowerCase(); + } else { + return undefined; + } + } + + //# sourceMappingURL=https://cursor-sourcemaps.s3.amazonaws.com/sourcemaps/96e5b01ca25f8fbd4c4c10bc69b15f6228c80770/core/main.js.map + + //# debugId=61209153-73c8-5a0b-b208-7e2f4a87ff8d \ No newline at end of file diff --git a/cursor-source-map/0.50.5/core/vs/workbench/workbench.desktop.main.js.map b/cursor-source-map/0.50.5/core/vs/workbench/workbench.desktop.main.js.map new file mode 100644 index 0000000..60590fe --- /dev/null +++ b/cursor-source-map/0.50.5/core/vs/workbench/workbench.desktop.main.js.map @@ -0,0 +1,971088 @@ +/*!-------------------------------------------------------- + * Copyright (C) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------*/ +(function () { + try { + var e = typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : {}; + var n = new e.Error().stack; + if (n) { + e._sentryDebugIds = e._sentryDebugIds || {}; + e._sentryDebugIds[n] = "9bf5997f-d35c-54c5-8bbc-74db69f6198e"; + } + } catch (e) {} +})(); +function b_t(i, e) { + b_t = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function (t, s) { + t.__proto__ = s; + } || function (t, s) { + for (var n in s) { + if (Object.prototype.hasOwnProperty.call(s, n)) { + t[n] = s[n]; + } + } + }; + return b_t(i, e); +} +export function __extends(i, e) { + if (typeof e != "function" && e !== null) { + throw new TypeError("Class extends value " + String(e) + " is not a constructor or null"); + } + b_t(i, e); + function t() { + this.constructor = i; + } + i.prototype = e === null ? Object.create(e) : (t.prototype = e.prototype, new t()); +} +export function __assign() { + __assign = Object.assign || function (e) { + var t; + for (var s = 1, n = arguments.length; s < n; s++) { + t = arguments[s]; + for (var r in t) { + if (Object.prototype.hasOwnProperty.call(t, r)) { + e[r] = t[r]; + } + } + } + return e; + }; + return __assign.apply(this, arguments); +} +export function __rest(i, e) { + var t = {}; + for (var s in i) { + if (Object.prototype.hasOwnProperty.call(i, s) && e.indexOf(s) < 0) { + t[s] = i[s]; + } + } + if (i != null && typeof Object.getOwnPropertySymbols == "function") { + for (var n = 0, s = Object.getOwnPropertySymbols(i); n < s.length; n++) { + if (e.indexOf(s[n]) < 0 && Object.prototype.propertyIsEnumerable.call(i, s[n])) { + t[s[n]] = i[s[n]]; + } + } + } + return t; +} +export function __decorate(i, e, t, s) { + var n = arguments.length; + var r = n < 3 ? e : s === null ? s = Object.getOwnPropertyDescriptor(e, t) : s; + var o; + if (typeof Reflect == "object" && typeof Reflect.decorate == "function") { + r = Reflect.decorate(i, e, t, s); + } else { + for (var a = i.length - 1; a >= 0; a--) { + if (o = i[a]) { + r = (n < 3 ? o(r) : n > 3 ? o(e, t, r) : o(e, t)) || r; + } + } + } + if (n > 3 && r) { + Object.defineProperty(e, t, r); + } + return r; +} +export function __param(i, e) { + return function (t, s) { + e(t, s, i); + }; +} +export function __esDecorate(i, e, t, s, n, r) { + function o(y) { + if (y !== undefined && typeof y != "function") { + throw new TypeError("Function expected"); + } + return y; + } + var a = s.kind; + var l = a === "getter" ? "get" : a === "setter" ? "set" : "value"; + var c = !e && i ? s.static ? i : i.prototype : null; + var u = e || (c ? Object.getOwnPropertyDescriptor(c, s.name) : {}); + var d; + var h = false; + for (var g = t.length - 1; g >= 0; g--) { + var p = {}; + for (var b in s) { + p[b] = b === "access" ? {} : s[b]; + } + for (var b in s.access) { + p.access[b] = s.access[b]; + } + p.addInitializer = function (y) { + if (h) { + throw new TypeError("Cannot add initializers after decoration has completed"); + } + r.push(o(y || null)); + }; + var v = (0, t[g])(a === "accessor" ? { + get: u.get, + set: u.set + } : u[l], p); + if (a === "accessor") { + if (v === undefined) { + continue; + } + if (v === null || typeof v != "object") { + throw new TypeError("Object expected"); + } + if (d = o(v.get)) { + u.get = d; + } + if (d = o(v.set)) { + u.set = d; + } + if (d = o(v.init)) { + n.unshift(d); + } + } else if (d = o(v)) { + if (a === "field") { + n.unshift(d); + } else { + u[l] = d; + } + } + } + if (c) { + Object.defineProperty(c, s.name, u); + } + h = true; +} +export function __runInitializers(i, e, t) { + var s = arguments.length > 2; + for (var n = 0; n < e.length; n++) { + t = s ? e[n].call(i, t) : e[n].call(i); + } + if (s) { + return t; + } else { + return undefined; + } +} +export function __propKey(i) { + if (typeof i == "symbol") { + return i; + } else { + return `${i}`; + } +} +export function __setFunctionName(i, e, t) { + if (typeof e == "symbol") { + e = e.description ? `[${e.description}]` : ""; + } + return Object.defineProperty(i, "name", { + configurable: true, + value: t ? `${t} ${e}` : e + }); +} +export function __metadata(i, e) { + if (typeof Reflect == "object" && typeof Reflect.metadata == "function") { + return Reflect.metadata(i, e); + } +} +export function __awaiter(i, e, t, s) { + function n(r) { + if (r instanceof t) { + return r; + } else { + return new t(function (o) { + o(r); + }); + } + } + return new (t ||= Promise)(function (r, o) { + function a(u) { + try { + c(s.next(u)); + } catch (d) { + o(d); + } + } + function l(u) { + try { + c(s.throw(u)); + } catch (d) { + o(d); + } + } + function c(u) { + if (u.done) { + r(u.value); + } else { + n(u.value).then(a, l); + } + } + c((s = s.apply(i, e || [])).next()); + }); +} +export function __generator(i, e) { + var t = { + label: 0, + sent: function () { + if (r[0] & 1) { + throw r[1]; + } + return r[1]; + }, + trys: [], + ops: [] + }; + var s; + var n; + var r; + var o; + o = { + next: a(0), + throw: a(1), + return: a(2) + }; + if (typeof Symbol == "function") { + o[Symbol.iterator] = function () { + return this; + }; + } + return o; + function a(c) { + return function (u) { + return l([c, u]); + }; + } + function l(c) { + if (s) { + throw new TypeError("Generator is already executing."); + } + while (o && (o = 0, c[0] && (t = 0)), t) { + try { + s = 1; + if (n && (r = c[0] & 2 ? n.return : c[0] ? n.throw || ((r = n.return) && r.call(n), 0) : n.next) && !(r = r.call(n, c[1])).done) { + return r; + } + n = 0; + if (r) { + c = [c[0] & 2, r.value]; + } + switch (c[0]) { + case 0: + case 1: + r = c; + break; + case 4: + t.label++; + return { + value: c[1], + done: false + }; + case 5: + t.label++; + n = c[1]; + c = [0]; + continue; + case 7: + c = t.ops.pop(); + t.trys.pop(); + continue; + default: + r = t.trys; + if (!(r = r.length > 0 && r[r.length - 1]) && (c[0] === 6 || c[0] === 2)) { + t = 0; + continue; + } + if (c[0] === 3 && (!r || c[1] > r[0] && c[1] < r[3])) { + t.label = c[1]; + break; + } + if (c[0] === 6 && t.label < r[1]) { + t.label = r[1]; + r = c; + break; + } + if (r && t.label < r[2]) { + t.label = r[2]; + t.ops.push(c); + break; + } + if (r[2]) { + t.ops.pop(); + } + t.trys.pop(); + continue; + } + c = e.call(i, t); + } catch (u) { + c = [6, u]; + n = 0; + } finally { + s = r = 0; + } + } + if (c[0] & 5) { + throw c[1]; + } + return { + value: c[0] ? c[1] : undefined, + done: true + }; + } +} +export var __createBinding = Object.create ? function (i, e, t, s = t) { + var n = Object.getOwnPropertyDescriptor(e, t); + if (!n || ("get" in n ? !e.__esModule : n.writable || n.configurable)) { + n = { + enumerable: true, + get: function () { + return e[t]; + } + }; + } + Object.defineProperty(i, s, n); +} : function (i, e, t, s = t) { + i[s] = e[t]; +}; +export function __exportStar(i, e) { + for (var t in i) { + if (t !== "default" && !Object.prototype.hasOwnProperty.call(e, t)) { + __createBinding(e, i, t); + } + } +} +export function __values(i) { + var e = typeof Symbol == "function" && Symbol.iterator; + var t = e && i[e]; + var s = 0; + if (t) { + return t.call(i); + } + if (i && typeof i.length == "number") { + return { + next: function () { + if (i && s >= i.length) { + i = undefined; + } + return { + value: i && i[s++], + done: !i + }; + } + }; + } + throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined."); +} +export function __read(i, e) { + var t = typeof Symbol == "function" && i[Symbol.iterator]; + if (!t) { + return i; + } + var s = t.call(i); + var n; + var r = []; + var o; + try { + while ((e === undefined || e-- > 0) && !(n = s.next()).done) { + r.push(n.value); + } + } catch (a) { + o = { + error: a + }; + } finally { + try { + if (n && !n.done && (t = s.return)) { + t.call(s); + } + } finally { + if (o) { + throw o.error; + } + } + } + return r; +} +export function __spread() { + var i = []; + for (var e = 0; e < arguments.length; e++) { + i = i.concat(__read(arguments[e])); + } + return i; +} +export function __spreadArrays() { + var i = 0; + for (var e = 0, t = arguments.length; e < t; e++) { + i += arguments[e].length; + } + var s = Array(i); + var n = 0; + for (var e = 0; e < t; e++) { + var r = arguments[e]; + for (var o = 0, a = r.length; o < a; o++, n++) { + s[n] = r[o]; + } + } + return s; +} +export function __spreadArray(i, e, t) { + if (t || arguments.length === 2) { + for (var s = 0, n = e.length, r; s < n; s++) { + if (r || !(s in e)) { + r ||= Array.prototype.slice.call(e, 0, s); + r[s] = e[s]; + } + } + } + return i.concat(r || Array.prototype.slice.call(e)); +} +export function __await(i) { + if (this instanceof __await) { + this.v = i; + return this; + } else { + return new __await(i); + } +} +export function __asyncGenerator(i, e, t) { + if (!Symbol.asyncIterator) { + throw new TypeError("Symbol.asyncIterator is not defined."); + } + var s = t.apply(i, e || []); + var n; + var r = []; + n = {}; + a("next"); + a("throw"); + a("return", o); + n[Symbol.asyncIterator] = function () { + return this; + }; + return n; + function o(g) { + return function (p) { + return Promise.resolve(p).then(g, d); + }; + } + function a(g, p) { + if (s[g]) { + n[g] = function (b) { + return new Promise(function (v, y) { + if (!(r.push([g, b, v, y]) > 1)) { + l(g, b); + } + }); + }; + if (p) { + n[g] = p(n[g]); + } + } + } + function l(g, p) { + try { + c(s[g](p)); + } catch (b) { + h(r[0][3], b); + } + } + function c(g) { + if (g.value instanceof __await) { + Promise.resolve(g.value.v).then(u, d); + } else { + h(r[0][2], g); + } + } + function u(g) { + l("next", g); + } + function d(g) { + l("throw", g); + } + function h(g, p) { + g(p); + r.shift(); + if (r.length) { + l(r[0][0], r[0][1]); + } + } +} +export function __asyncDelegator(i) { + var e; + var t; + e = {}; + s("next"); + s("throw", function (n) { + throw n; + }); + s("return"); + e[Symbol.iterator] = function () { + return this; + }; + return e; + function s(n, r) { + e[n] = i[n] ? function (o) { + if (t = !t) { + return { + value: __await(i[n](o)), + done: false + }; + } else if (r) { + return r(o); + } else { + return o; + } + } : r; + } +} +export function __asyncValues(i) { + if (!Symbol.asyncIterator) { + throw new TypeError("Symbol.asyncIterator is not defined."); + } + var e = i[Symbol.asyncIterator]; + var t; + if (e) { + return e.call(i); + } else { + i = typeof __values == "function" ? __values(i) : i[Symbol.iterator](); + t = {}; + s("next"); + s("throw"); + s("return"); + t[Symbol.asyncIterator] = function () { + return this; + }; + return t; + } + function s(r) { + t[r] = i[r] && function (o) { + return new Promise(function (a, l) { + o = i[r](o); + n(a, l, o.done, o.value); + }); + }; + } + function n(r, o, a, l) { + Promise.resolve(l).then(function (c) { + r({ + value: c, + done: a + }); + }, o); + } +} +export function __makeTemplateObject(i, e) { + if (Object.defineProperty) { + Object.defineProperty(i, "raw", { + value: e + }); + } else { + i.raw = e; + } + return i; +} +var X3n = Object.create ? function (i, e) { + Object.defineProperty(i, "default", { + enumerable: true, + value: e + }); +} : function (i, e) { + i.default = e; +}; +export function __importStar(i) { + if (i && i.__esModule) { + return i; + } + var e = {}; + if (i != null) { + for (var t in i) { + if (t !== "default" && Object.prototype.hasOwnProperty.call(i, t)) { + __createBinding(e, i, t); + } + } + } + X3n(e, i); + return e; +} +export function __importDefault(i) { + if (i && i.__esModule) { + return i; + } else { + return { + default: i + }; + } +} +export function __classPrivateFieldGet(i, e, t, s) { + if (t === "a" && !s) { + throw new TypeError("Private accessor was defined without a getter"); + } + if (typeof e == "function" ? i !== e || !s : !e.has(i)) { + throw new TypeError("Cannot read private member from an object whose class did not declare it"); + } + if (t === "m") { + return s; + } else if (t === "a") { + return s.call(i); + } else if (s) { + return s.value; + } else { + return e.get(i); + } +} +export function __classPrivateFieldSet(i, e, t, s, n) { + if (s === "m") { + throw new TypeError("Private method is not writable"); + } + if (s === "a" && !n) { + throw new TypeError("Private accessor was defined without a setter"); + } + if (typeof e == "function" ? i !== e || !n : !e.has(i)) { + throw new TypeError("Cannot write private member to an object whose class did not declare it"); + } + if (s === "a") { + n.call(i, t); + } else if (n) { + n.value = t; + } else { + e.set(i, t); + } + return t; +} +export function __classPrivateFieldIn(i, e) { + if (e === null || typeof e != "object" && typeof e != "function") { + throw new TypeError("Cannot use 'in' operator on non-object"); + } + if (typeof i == "function") { + return e === i; + } else { + return i.has(e); + } +} +export function __addDisposableResource(i, e, t) { + if (e != null) { + if (typeof e != "object" && typeof e != "function") { + throw new TypeError("Object expected."); + } + var s; + var n; + if (t) { + if (!Symbol.asyncDispose) { + throw new TypeError("Symbol.asyncDispose is not defined."); + } + s = e[Symbol.asyncDispose]; + } + if (s === undefined) { + if (!Symbol.dispose) { + throw new TypeError("Symbol.dispose is not defined."); + } + s = e[Symbol.dispose]; + if (t) { + n = s; + } + } + if (typeof s != "function") { + throw new TypeError("Object not disposable."); + } + if (n) { + s = function () { + try { + n.call(this); + } catch (r) { + return Promise.reject(r); + } + }; + } + i.stack.push({ + value: e, + dispose: s, + async: t + }); + } else if (t) { + i.stack.push({ + async: true + }); + } + return e; +} +var Q3n = typeof SuppressedError == "function" ? SuppressedError : function (i, e, t) { + var s = new Error(t); + s.name = "SuppressedError"; + s.error = i; + s.suppressed = e; + return s; +}; +export function __disposeResources(i) { + function e(s) { + i.error = i.hasError ? new Q3n(s, i.error, "An error was suppressed during disposal.") : s; + i.hasError = true; + } + function t() { + while (i.stack.length) { + var s = i.stack.pop(); + try { + var n = s.dispose && s.dispose.call(s.value); + if (s.async) { + return Promise.resolve(n).then(t, function (r) { + e(r); + return t(); + }); + } + } catch (r) { + e(r); + } + } + if (i.hasError) { + throw i.error; + } + } + return t(); +} +export default { + __extends, + __assign, + __rest, + __decorate, + __param, + __metadata, + __awaiter, + __generator, + __createBinding, + __exportStar, + __values, + __read, + __spread, + __spreadArrays, + __spreadArray, + __await, + __asyncGenerator, + __asyncDelegator, + __asyncValues, + __makeTemplateObject, + __importStar, + __importDefault, + __classPrivateFieldGet, + __classPrivateFieldSet, + __classPrivateFieldIn, + __addDisposableResource, + __disposeResources +}; +var Z3n = Object.defineProperty; +var e9n = Object.getOwnPropertyNames; +var ue = (i, e) => function () { + if (i) { + e = (0, i[e9n(i)[0]])(i = 0); + } + return e; +}; +var MUi = (i, e) => { + for (var t in e) { + Z3n(i, t, { + get: e[t], + enumerable: true + }); + } +}; +function B3(i) { + switch (w_t.call(i)) { + case "[object Error]": + case "[object Exception]": + case "[object DOMException]": + case "[object WebAssembly.Exception]": + return true; + default: + return SB(i, Error); + } +} +function uZ(i, e) { + return w_t.call(i) === `[object ${e}]`; +} +function AUi(i) { + return uZ(i, "ErrorEvent"); +} +function $Ui(i) { + return uZ(i, "DOMError"); +} +function t9n(i) { + return uZ(i, "DOMException"); +} +function L2(i) { + return uZ(i, "String"); +} +function v_t(i) { + return typeof i == "object" && i !== null && "__sentry_template_string__" in i && "__sentry_template_values__" in i; +} +function y_t(i) { + return i === null || v_t(i) || typeof i != "object" && typeof i != "function"; +} +function U3(i) { + return uZ(i, "Object"); +} +function Nst(i) { + return typeof Event !== "undefined" && SB(i, Event); +} +function i9n(i) { + return typeof Element !== "undefined" && SB(i, Element); +} +function s9n(i) { + return uZ(i, "RegExp"); +} +function bhe(i) { + return !!i && !!i.then && typeof i.then == "function"; +} +function n9n(i) { + return U3(i) && "nativeEvent" in i && "preventDefault" in i && "stopPropagation" in i; +} +function SB(i, e) { + try { + return i instanceof e; + } catch { + return false; + } +} +function FUi(i) { + return typeof i == "object" && i !== null && (!!i.__isVue || !!i._isVue); +} +var w_t; +var nM = ue({ + "out-build/external/sentry/utils/is.js"() { + "use strict"; + + w_t = Object.prototype.toString; + } +}); +var r9n = ue({ + "out-build/external/sentry/utils/vendor/escapeStringForRegex.js"() { + "use strict"; + } +}); +function W3(i, e = 0) { + if (typeof i != "string" || e === 0 || i.length <= e) { + return i; + } else { + return `${i.slice(0, e)}...`; + } +} +function C_t(i, e) { + let t = i; + const s = t.length; + if (s <= 150) { + return t; + } + if (e > s) { + e = s; + } + let n = Math.max(e - 60, 0); + if (n < 5) { + n = 0; + } + let r = Math.min(n + 140, s); + if (r > s - 5) { + r = s; + } + if (r === s) { + n = Math.max(r - 140, 0); + } + t = t.slice(n, r); + if (n > 0) { + t = `'{snip} ${t}`; + } + if (r < s) { + t += " {snip}"; + } + return t; +} +function Mst(i, e) { + if (!Array.isArray(i)) { + return ""; + } + const t = []; + for (let s = 0; s < i.length; s++) { + const n = i[s]; + try { + if (FUi(n)) { + t.push("[VueViewModel]"); + } else { + t.push(String(n)); + } + } catch { + t.push("[value cannot be serialized]"); + } + } + return t.join(e); +} +function o9n(i, e, t = false) { + if (L2(i)) { + if (s9n(e)) { + return e.test(i); + } else if (L2(e)) { + if (t) { + return i === e; + } else { + return i.includes(e); + } + } else { + return false; + } + } else { + return false; + } +} +function gq(i, e = [], t = false) { + return e.some(s => o9n(i, s, t)); +} +var Ast = ue({ + "out-build/external/sentry/utils/string.js"() { + "use strict"; + + nM(); + r9n(); + } +}); +function OUi(i, e, t = 250, s, n, r, o) { + if (!r.exception || !r.exception.values || !o || !SB(o.originalException, Error)) { + return; + } + const a = r.exception.values.length > 0 ? r.exception.values[r.exception.values.length - 1] : undefined; + if (a) { + r.exception.values = a9n(S_t(i, e, n, o.originalException, s, r.exception.values, a, 0), t); + } +} +function S_t(i, e, t, s, n, r, o, a) { + if (r.length >= t + 1) { + return r; + } + let l = [...r]; + if (SB(s[n], Error)) { + _Ui(o, a); + const c = i(e, s[n]); + const u = l.length; + BUi(c, n, u, a); + l = S_t(i, e, t, s[n], n, [c, ...l], c, u); + } + if (Array.isArray(s.errors)) { + s.errors.forEach((c, u) => { + if (SB(c, Error)) { + _Ui(o, a); + const d = i(e, c); + const h = l.length; + BUi(d, `errors[${u}]`, h, a); + l = S_t(i, e, t, c, n, [d, ...l], d, h); + } + }); + } + return l; +} +function _Ui(i, e) { + i.mechanism = i.mechanism || { + type: "generic", + handled: true + }; + i.mechanism = { + ...i.mechanism, + ...(i.type === "AggregateError" && { + is_exception_group: true + }), + exception_id: e + }; +} +function BUi(i, e, t, s) { + i.mechanism = i.mechanism || { + type: "generic", + handled: true + }; + i.mechanism = { + ...i.mechanism, + type: "chained", + source: e, + exception_id: t, + parent_id: s + }; +} +function a9n(i, e) { + return i.map(t => { + t.value &&= W3(t.value, e); + return t; + }); +} +var l9n = ue({ + "out-build/external/sentry/utils/aggregate-errors.js"() { + "use strict"; + + nM(); + Ast(); + } +}); +var c9n = ue({ + "out-build/external/sentry/utils/array.js"() { + "use strict"; + } +}); +function UUi(i) { + if (i !== undefined) { + if (i >= 400 && i < 500) { + return "warning"; + } else if (i >= 500) { + return "error"; + } else { + return undefined; + } + } +} +var u9n = ue({ + "out-build/external/sentry/utils/breadcrumb-log-level.js"() { + "use strict"; + } +}); +var V3; +var WUi = ue({ + "out-build/external/sentry/utils/version.js"() { + "use strict"; + + V3 = "8.35.0-cursor"; + } +}); +function vhe(i, e, t) { + const s = t || Bu; + const n = s.__SENTRY__ = s.__SENTRY__ || {}; + const r = n[V3] = n[V3] || {}; + return r[i] ||= e(); +} +var Bu; +var gI = ue({ + "out-build/external/sentry/utils/worldwide.js"() { + "use strict"; + + WUi(); + Bu = globalThis; + } +}); +function pq(i, e = {}) { + if (!i) { + return ""; + } + try { + let t = i; + const s = 5; + const n = []; + let r = 0; + let o = 0; + const a = " > "; + const l = a.length; + let c; + const u = Array.isArray(e) ? e : e.keyAttrs; + const d = !Array.isArray(e) && e.maxStringLength || HUi; + while (t && r++ < s && (c = d9n(t, u), c !== "html" && (!(r > 1) || !(o + n.length * l + c.length >= d)))) { + n.push(c); + o += c.length; + t = t.parentNode; + } + return n.reverse().join(a); + } catch { + return ""; + } +} +function d9n(i, e) { + const t = i; + const s = []; + if (!t || !t.tagName) { + return ""; + } + if (mq.HTMLElement && t instanceof HTMLElement && t.dataset) { + if (t.dataset.sentryComponent) { + return t.dataset.sentryComponent; + } + if (t.dataset.sentryElement) { + return t.dataset.sentryElement; + } + } + s.push(t.tagName.toLowerCase()); + const n = e && e.length ? e.filter(o => t.getAttribute(o)).map(o => [o, t.getAttribute(o)]) : null; + if (n && n.length) { + n.forEach(o => { + s.push(`[${o[0]}="${o[1]}"]`); + }); + } else { + if (t.id) { + s.push(`#${t.id}`); + } + const o = t.className; + if (o && L2(o)) { + const a = o.split(/\s+/); + for (const l of a) { + s.push(`.${l}`); + } + } + } + const r = ["aria-label", "type", "name", "title", "alt"]; + for (const o of r) { + const a = t.getAttribute(o); + if (a) { + s.push(`[${o}="${a}"]`); + } + } + return s.join(""); +} +function h9n() { + try { + return mq.document.location.href; + } catch { + return ""; + } +} +function f9n(i) { + if (mq.document && mq.document.querySelector) { + return mq.document.querySelector(i); + } else { + return null; + } +} +function VUi(i) { + if (!mq.HTMLElement) { + return null; + } + let e = i; + const t = 5; + for (let s = 0; s < t; s++) { + if (!e) { + return null; + } + if (e instanceof HTMLElement) { + if (e.dataset.sentryComponent) { + return e.dataset.sentryComponent; + } + if (e.dataset.sentryElement) { + return e.dataset.sentryElement; + } + } + e = e.parentNode; + } + return null; +} +var mq; +var HUi; +var qUi = ue({ + "out-build/external/sentry/utils/browser.js"() { + "use strict"; + + nM(); + gI(); + mq = Bu; + HUi = 80; + } +}); +var bq; +var vq = ue({ + "out-build/external/sentry/utils/debug-build.js"() { + "use strict"; + + bq = false; + } +}); +function dZ(i) { + if (!("console" in Bu)) { + return i(); + } + const e = Bu.console; + const t = {}; + const s = Object.keys(whe); + s.forEach(n => { + const r = whe[n]; + t[n] = e[n]; + e[n] = r; + }); + try { + return i(); + } finally { + s.forEach(n => { + e[n] = t[n]; + }); + } +} +function g9n() { + let i = false; + const e = { + enable: () => { + i = true; + }, + disable: () => { + i = false; + }, + isEnabled: () => i + }; + if (bq) { + yhe.forEach(t => { + e[t] = (...s) => { + if (i) { + dZ(() => { + Bu.console[t](`${jUi}[${t}]:`, ...s); + }); + } + }; + }); + } else { + yhe.forEach(t => { + e[t] = () => {}; + }); + } + return e; +} +var jUi; +var yhe; +var whe; +var tr; +var H3 = ue({ + "out-build/external/sentry/utils/logger.js"() { + "use strict"; + + vq(); + gI(); + jUi = "Sentry Logger "; + yhe = ["debug", "info", "warn", "error", "log", "assert", "trace"]; + whe = {}; + tr = vhe("logger", g9n); + } +}); +function p9n(i) { + return i === "http" || i === "https"; +} +function hZ(i, e = false) { + const { + host: t, + path: s, + pass: n, + port: r, + projectId: o, + protocol: a, + publicKey: l + } = i; + return `${a}://${l}${e && n ? `:${n}` : ""}@${t}${r ? `:${r}` : ""}/${s && `${s}/`}${o}`; +} +function m9n(i) { + const e = GUi.exec(i); + if (!e) { + dZ(() => { + console.error(`Invalid Sentry Dsn: ${i}`); + }); + return; + } + const [t, s, n = "", r = "", o = "", a = ""] = e.slice(1); + let l = ""; + let c = a; + const u = c.split("/"); + if (u.length > 1) { + l = u.slice(0, -1).join("/"); + c = u.pop(); + } + if (c) { + const d = c.match(/^\d+/); + if (d) { + c = d[0]; + } + } + return zUi({ + host: r, + pass: n, + path: l, + projectId: c, + port: o, + protocol: t, + publicKey: s + }); +} +function zUi(i) { + return { + protocol: i.protocol, + publicKey: i.publicKey || "", + pass: i.pass || "", + host: i.host, + port: i.port || "", + path: i.path || "", + projectId: i.projectId + }; +} +function b9n(i) { + if (!bq) { + return true; + } + const { + port: e, + projectId: t, + protocol: s + } = i; + if (["protocol", "publicKey", "host", "projectId"].find(o => i[o] ? false : (tr.error(`Invalid Sentry Dsn: ${o} missing`), true))) { + return false; + } else if (t.match(/^\d+$/)) { + if (p9n(s)) { + if (e && isNaN(parseInt(e, 10))) { + tr.error(`Invalid Sentry Dsn: Invalid port ${e}`); + return false; + } else { + return true; + } + } else { + tr.error(`Invalid Sentry Dsn: Invalid protocol ${s}`); + return false; + } + } else { + tr.error(`Invalid Sentry Dsn: Invalid projectId ${t}`); + return false; + } +} +function JUi(i) { + const e = typeof i == "string" ? m9n(i) : zUi(i); + if (!!e && !!b9n(e)) { + return e; + } +} +var GUi; +var KUi = ue({ + "out-build/external/sentry/utils/dsn.js"() { + "use strict"; + + vq(); + H3(); + GUi = /^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/; + } +}); +var yL; +var x_t = ue({ + "out-build/external/sentry/utils/error.js"() { + "use strict"; + + yL = class extends Error { + constructor(i, e = "warn") { + super(i); + this.message = i; + this.name = new.target.prototype.constructor.name; + Object.setPrototypeOf(this, new.target.prototype); + this.logLevel = e; + } + }; + } +}); +function gT(i, e, t) { + if (!(e in i)) { + return; + } + const s = i[e]; + const n = t(s); + if (typeof n == "function") { + YUi(n, s); + } + i[e] = n; +} +function pT(i, e, t) { + try { + Object.defineProperty(i, e, { + value: t, + writable: true, + configurable: true + }); + } catch { + if (bq) { + tr.log(`Failed to add non-enumerable property "${e}" to object`, i); + } + } +} +function YUi(i, e) { + try { + const t = e.prototype || {}; + i.prototype = e.prototype = t; + pT(i, "__sentry_original__", e); + } catch {} +} +function k_t(i) { + return i.__sentry_original__; +} +function v9n(i) { + return Object.keys(i).map(e => `${encodeURIComponent(e)}=${encodeURIComponent(i[e])}`).join("&"); +} +function XUi(i) { + if (B3(i)) { + return { + message: i.message, + name: i.name, + stack: i.stack, + ...ZUi(i) + }; + } + if (Nst(i)) { + const e = { + type: i.type, + target: QUi(i.target), + currentTarget: QUi(i.currentTarget), + ...ZUi(i) + }; + if (typeof CustomEvent !== "undefined" && SB(i, CustomEvent)) { + e.detail = i.detail; + } + return e; + } else { + return i; + } +} +function QUi(i) { + try { + if (i9n(i)) { + return pq(i); + } else { + return Object.prototype.toString.call(i); + } + } catch { + return ""; + } +} +function ZUi(i) { + if (typeof i == "object" && i !== null) { + const e = {}; + for (const t in i) { + if (Object.prototype.hasOwnProperty.call(i, t)) { + e[t] = i[t]; + } + } + return e; + } else { + return {}; + } +} +function y9n(i, e = 40) { + const t = Object.keys(XUi(i)); + t.sort(); + const s = t[0]; + if (!s) { + return "[object has no keys]"; + } + if (s.length >= e) { + return W3(s, e); + } + for (let n = t.length; n > 0; n--) { + const r = t.slice(0, n).join(", "); + if (!(r.length > e)) { + if (n === t.length) { + return r; + } else { + return W3(r, e); + } + } + } + return ""; +} +function N0(i) { + return E_t(i, new Map()); +} +function E_t(i, e) { + if (w9n(i)) { + const t = e.get(i); + if (t !== undefined) { + return t; + } + const s = {}; + e.set(i, s); + for (const n of Object.getOwnPropertyNames(i)) { + if (typeof i[n] !== "undefined") { + s[n] = E_t(i[n], e); + } + } + return s; + } + if (Array.isArray(i)) { + const t = e.get(i); + if (t !== undefined) { + return t; + } + const s = []; + e.set(i, s); + i.forEach(n => { + s.push(E_t(n, e)); + }); + return s; + } + return i; +} +function w9n(i) { + if (!U3(i)) { + return false; + } + try { + const e = Object.getPrototypeOf(i).constructor.name; + return !e || e === "Object"; + } catch { + return true; + } +} +var q3 = ue({ + "out-build/external/sentry/utils/object.js"() { + "use strict"; + + qUi(); + vq(); + nM(); + H3(); + Ast(); + } +}); +function eWi(...i) { + const e = i.sort((t, s) => t[0] - s[0]).map(t => t[1]); + return (t, s = 0, n = 0) => { + const r = []; + const o = t.split(` +`); + for (let a = s; a < o.length; a++) { + const l = o[a]; + if (l.length > 1024) { + continue; + } + const c = T_t.test(l) ? l.replace(T_t, "$1") : l; + if (!c.match(/\S*Error: /)) { + for (const u of e) { + const d = u(c); + if (d) { + r.push(d); + break; + } + } + if (r.length >= D_t + n) { + break; + } + } + } + return tWi(r.slice(n)); + }; +} +function C9n(i) { + if (Array.isArray(i)) { + return eWi(...i); + } else { + return i; + } +} +function tWi(i) { + if (!i.length) { + return []; + } + const e = Array.from(i); + if (/sentryWrapped/.test($st(e).function || "")) { + e.pop(); + } + e.reverse(); + if (P_t.test($st(e).function || "")) { + e.pop(); + if (P_t.test($st(e).function || "")) { + e.pop(); + } + } + return e.slice(0, D_t).map(t => ({ + ...t, + filename: t.filename || $st(e).filename, + function: t.function || kB + })); +} +function $st(i) { + return i[i.length - 1] || {}; +} +function xB(i) { + try { + if (!i || typeof i != "function") { + return Fst; + } else { + return i.name || Fst; + } + } catch { + return Fst; + } +} +function I_t(i) { + const e = i.exception; + if (e) { + const t = []; + try { + e.values.forEach(s => { + if (s.stacktrace.frames) { + t.push(...s.stacktrace.frames); + } + }); + return t; + } catch { + return; + } + } +} +var D_t; +var kB; +var T_t; +var P_t; +var Fst; +var Che = ue({ + "out-build/external/sentry/utils/stacktrace.js"() { + "use strict"; + + D_t = 50; + kB = "?"; + T_t = /\(error: (.*)\)/; + P_t = /captureMessage|captureException/; + Fst = ""; + } +}); +function j3(i, e) { + She[i] = She[i] || []; + She[i].push(e); +} +function z3(i, e) { + if (!L_t[i]) { + e(); + L_t[i] = true; + } +} +function wL(i, e) { + const t = i && She[i]; + if (t) { + for (const s of t) { + try { + s(e); + } catch (n) { + if (bq) { + tr.error(`Error while triggering instrumentation handler. +Type: ${i} +Name: ${xB(s)} +Error:`, n); + } + } + } + } +} +var She; +var L_t; +var xhe = ue({ + "out-build/external/sentry/utils/instrument/handlers.js"() { + "use strict"; + + vq(); + H3(); + Che(); + She = {}; + L_t = {}; + } +}); +function iWi(i) { + const e = "console"; + j3(e, i); + z3(e, S9n); +} +function S9n() { + if ("console" in Bu) { + yhe.forEach(function (i) { + if (i in Bu.console) { + gT(Bu.console, i, function (e) { + whe[i] = e; + return function (...t) { + wL("console", { + args: t, + level: i + }); + const n = whe[i]; + if (n) { + n.apply(Bu.console, t); + } + }; + }); + } + }); + } +} +var x9n = ue({ + "out-build/external/sentry/utils/instrument/console.js"() { + "use strict"; + + H3(); + q3(); + gI(); + xhe(); + } +}); +function k9n() { + const i = khe.chrome; + const e = i && i.app && i.app.runtime; + const t = "history" in khe && !!khe.history.pushState && !!khe.history.replaceState; + return !e && t; +} +var khe; +var E9n = ue({ + "out-build/external/sentry/utils/vendor/supportsHistory.js"() { + "use strict"; + + gI(); + khe = Bu; + } +}); +function sWi() { + if (!("fetch" in Ehe)) { + return false; + } + try { + new Headers(); + new Request("http://www.example.com"); + new Response(); + return true; + } catch { + return false; + } +} +function R_t(i) { + return i && /^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(i.toString()); +} +function nWi() { + if (typeof EdgeRuntime == "string") { + return true; + } + if (!sWi()) { + return false; + } + if (R_t(Ehe.fetch)) { + return true; + } + let i = false; + const e = Ehe.document; + if (e && typeof e.createElement == "function") { + try { + const t = e.createElement("iframe"); + t.hidden = true; + e.head.appendChild(t); + if (t.contentWindow && t.contentWindow.fetch) { + i = R_t(t.contentWindow.fetch); + } + e.head.removeChild(t); + } catch (t) { + if (bq) { + tr.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ", t); + } + } + } + return i; +} +function I9n() { + return "ReportingObserver" in Ehe; +} +var Ehe; +var rWi = ue({ + "out-build/external/sentry/utils/supports.js"() { + "use strict"; + + vq(); + H3(); + gI(); + E9n(); + Ehe = Bu; + } +}); +function Ihe() { + return Date.now() / N_t; +} +function D9n() { + const { + performance: i + } = Bu; + if (!i || !i.now) { + return Ihe; + } + const e = Date.now() - i.now(); + const t = i.timeOrigin == null ? e : i.timeOrigin; + return () => (t + i.now()) / N_t; +} +var N_t; +var Hb; +var Ost; +var GS; +var M_t = ue({ + "out-build/external/sentry/utils/time.js"() { + "use strict"; + + gI(); + N_t = 1000; + Hb = D9n(); + GS = (() => { + const { + performance: i + } = Bu; + if (!i || !i.now) { + Ost = "none"; + return; + } + const e = 3600000; + const t = i.now(); + const s = Date.now(); + const n = i.timeOrigin ? Math.abs(i.timeOrigin + t - s) : e; + const r = n < e; + const o = i.timing && i.timing.navigationStart; + const l = typeof o == "number" ? Math.abs(o + t - s) : e; + const c = l < e; + if (r || c) { + if (n <= l) { + Ost = "timeOrigin"; + return i.timeOrigin; + } else { + Ost = "navigationStart"; + return o; + } + } else { + Ost = "dateNow"; + return s; + } + })(); + } +}); +function A_t(i, e) { + const t = "fetch"; + j3(t, i); + z3(t, () => oWi(undefined, e)); +} +function T9n(i) { + const e = "fetch-body-resolved"; + j3(e, i); + z3(e, () => oWi(L9n)); +} +function oWi(i, e = false) { + if (!e || !!nWi()) { + gT(Bu, "fetch", function (t) { + return function (...s) { + const { + method: n, + url: r + } = R9n(s); + const o = { + args: s, + fetchData: { + method: n, + url: r + }, + startTimestamp: Hb() * 1000 + }; + if (!i) { + wL("fetch", { + ...o + }); + } + const a = new Error().stack; + return t.apply(Bu, s).then(async l => { + if (i) { + i(l); + } else { + wL("fetch", { + ...o, + endTimestamp: Hb() * 1000, + response: l + }); + } + return l; + }, l => { + wL("fetch", { + ...o, + endTimestamp: Hb() * 1000, + error: l + }); + if (B3(l) && l.stack === undefined) { + l.stack = a; + pT(l, "framesToPop", 1); + } + throw l; + }); + }; + }); + } +} +async function P9n(i, e) { + if (i && i.body) { + const t = i.body; + const s = t.getReader(); + const n = setTimeout(() => { + t.cancel().then(null, () => {}); + }, 90000); + let r = true; + while (r) { + let o; + try { + o = setTimeout(() => { + t.cancel().then(null, () => {}); + }, 5000); + const { + done: a + } = await s.read(); + clearTimeout(o); + if (a) { + e(); + r = false; + } + } catch { + r = false; + } finally { + clearTimeout(o); + } + } + clearTimeout(n); + s.releaseLock(); + t.cancel().then(null, () => {}); + } +} +function L9n(i) { + let e; + try { + e = i.clone(); + } catch { + return; + } + P9n(e, () => { + wL("fetch-body-resolved", { + endTimestamp: Hb() * 1000, + response: i + }); + }); +} +function $_t(i, e) { + return !!i && typeof i == "object" && !!i[e]; +} +function aWi(i) { + if (typeof i == "string") { + return i; + } else if (i) { + if ($_t(i, "url")) { + return i.url; + } else if (i.toString) { + return i.toString(); + } else { + return ""; + } + } else { + return ""; + } +} +function R9n(i) { + if (i.length === 0) { + return { + method: "GET", + url: "" + }; + } + if (i.length === 2) { + const [t, s] = i; + return { + url: aWi(t), + method: $_t(s, "method") ? String(s.method).toUpperCase() : "GET" + }; + } + const e = i[0]; + return { + url: aWi(e), + method: $_t(e, "method") ? String(e.method).toUpperCase() : "GET" + }; +} +var N9n = ue({ + "out-build/external/sentry/utils/instrument/fetch.js"() { + "use strict"; + + nM(); + q3(); + rWi(); + M_t(); + gI(); + xhe(); + } +}); +function lWi(i) { + const e = "error"; + j3(e, i); + z3(e, M9n); +} +function M9n() { + Dhe = Bu.onerror; + Bu.onerror = function (i, e, t, s, n) { + wL("error", { + column: s, + error: n, + line: t, + msg: i, + url: e + }); + if (Dhe && !Dhe.__SENTRY_LOADER__) { + return Dhe.apply(this, arguments); + } else { + return false; + } + }; + Bu.onerror.__SENTRY_INSTRUMENTED__ = true; +} +var Dhe; +var A9n = ue({ + "out-build/external/sentry/utils/instrument/globalError.js"() { + "use strict"; + + gI(); + xhe(); + Dhe = null; + } +}); +function cWi(i) { + const e = "unhandledrejection"; + j3(e, i); + z3(e, $9n); +} +function $9n() { + The = Bu.onunhandledrejection; + Bu.onunhandledrejection = function (i) { + wL("unhandledrejection", i); + if (The && !The.__SENTRY_LOADER__) { + return The.apply(this, arguments); + } else { + return true; + } + }; + Bu.onunhandledrejection.__SENTRY_INSTRUMENTED__ = true; +} +var The; +var F9n = ue({ + "out-build/external/sentry/utils/instrument/globalUnhandledRejection.js"() { + "use strict"; + + gI(); + xhe(); + The = null; + } +}); +var O9n = ue({ + "out-build/external/sentry/utils/instrument/index.js"() { + "use strict"; + + x9n(); + N9n(); + A9n(); + F9n(); + xhe(); + } +}); +function _9n() { + return "npm"; +} +var uWi = ue({ + "out-build/external/sentry/utils/env.js"() { + "use strict"; + } +}); +var dWi = ue({ + "out-build/external/sentry/utils/node.js"() { + "use strict"; + + uWi(); + } +}); +var B9n = ue({ + "out-build/external/sentry/utils/isBrowser.js"() { + "use strict"; + + dWi(); + gI(); + } +}); +function U9n() { + const i = typeof WeakSet == "function"; + const e = i ? new WeakSet() : []; + function t(n) { + if (i) { + if (e.has(n)) { + return true; + } else { + e.add(n); + return false; + } + } + for (let r = 0; r < e.length; r++) { + if (e[r] === n) { + return true; + } + } + e.push(n); + return false; + } + function s(n) { + if (i) { + e.delete(n); + } else { + for (let r = 0; r < e.length; r++) { + if (e[r] === n) { + e.splice(r, 1); + break; + } + } + } + } + return [t, s]; +} +var hWi = ue({ + "out-build/external/sentry/utils/memo.js"() { + "use strict"; + } +}); +function Vp() { + const i = Bu; + const e = i.crypto || i.msCrypto; + let t = () => Math.random() * 16; + try { + if (e && e.randomUUID) { + return e.randomUUID().replace(/-/g, ""); + } + if (e && e.getRandomValues) { + t = () => { + const s = new Uint8Array(1); + e.getRandomValues(s); + return s[0]; + }; + } + } catch {} + return "10000000100040008000100000000000".replace(/[018]/g, s => (s ^ (t() & 15) >> s / 4).toString(16)); +} +function fWi(i) { + if (i.exception && i.exception.values) { + return i.exception.values[0]; + } else { + return undefined; + } +} +function J3(i) { + const { + message: e, + event_id: t + } = i; + if (e) { + return e; + } + const s = fWi(i); + if (s) { + if (s.type && s.value) { + return `${s.type}: ${s.value}`; + } else { + return s.type || s.value || t || ""; + } + } else { + return t || ""; + } +} +function F_t(i, e, t) { + const s = i.exception = i.exception || {}; + const n = s.values = s.values || []; + const r = n[0] = n[0] || {}; + r.value ||= e || ""; + r.type ||= t || "Error"; +} +function yq(i, e) { + const t = fWi(i); + if (!t) { + return; + } + const s = { + type: "generic", + handled: true + }; + const n = t.mechanism; + t.mechanism = { + ...s, + ...n, + ...e + }; + if (e && "data" in e) { + const r = { + ...(n && n.data), + ...e.data + }; + t.mechanism.data = r; + } +} +function W9n(i, e, t = 5) { + if (e.lineno === undefined) { + return; + } + const s = i.length; + const n = Math.max(Math.min(s - 1, e.lineno - 1), 0); + e.pre_context = i.slice(Math.max(0, n - t), n).map(o => C_t(o, 0)); + const r = Math.min(s - 1, n); + e.context_line = C_t(i[r], e.colno || 0); + e.post_context = i.slice(Math.min(n + 1, s), n + 1 + t).map(o => C_t(o, 0)); +} +function gWi(i) { + if (i && i.__sentry_captured__) { + return true; + } + try { + pT(i, "__sentry_captured__", true); + } catch {} + return false; +} +function pWi(i) { + if (Array.isArray(i)) { + return i; + } else { + return [i]; + } +} +var Phe = ue({ + "out-build/external/sentry/utils/misc.js"() { + "use strict"; + + q3(); + Ast(); + gI(); + } +}); +function rM(i, e = 100, t = Infinity) { + try { + return O_t("", i, e, t); + } catch (s) { + return { + ERROR: `**non-serializable** (${s})` + }; + } +} +function mWi(i, e = 3, t = 102400) { + const s = rM(i, e); + if (j9n(s) > t) { + return mWi(i, e - 1, t); + } else { + return s; + } +} +function O_t(i, e, t = Infinity, s = Infinity, n = U9n()) { + const [r, o] = n; + if (e == null || ["boolean", "string"].includes(typeof e) || typeof e == "number" && Number.isFinite(e)) { + return e; + } + const a = V9n(i, e); + if (!a.startsWith("[object ")) { + return a; + } + if (e.__sentry_skip_normalization__) { + return e; + } + const l = typeof e.__sentry_override_normalization_depth__ == "number" ? e.__sentry_override_normalization_depth__ : t; + if (l === 0) { + return a.replace("object ", ""); + } + if (r(e)) { + return "[Circular ~]"; + } + const c = e; + if (c && typeof c.toJSON == "function") { + try { + const g = c.toJSON(); + return O_t("", g, l - 1, s, n); + } catch {} + } + const u = Array.isArray(e) ? [] : {}; + let d = 0; + const h = XUi(e); + for (const g in h) { + if (!Object.prototype.hasOwnProperty.call(h, g)) { + continue; + } + if (d >= s) { + u[g] = "[MaxProperties ~]"; + break; + } + const p = h[g]; + u[g] = O_t(g, p, l - 1, s, n); + d++; + } + o(e); + return u; +} +function V9n(i, e) { + try { + if (i === "domain" && e && typeof e == "object" && e._events) { + return "[Domain]"; + } + if (i === "domainEmitter") { + return "[DomainEmitter]"; + } + if (typeof global !== "undefined" && e === global) { + return "[Global]"; + } + if (typeof window !== "undefined" && e === window) { + return "[Window]"; + } + if (typeof document !== "undefined" && e === document) { + return "[Document]"; + } + if (FUi(e)) { + return "[VueViewModel]"; + } + if (n9n(e)) { + return "[SyntheticEvent]"; + } + if (typeof e == "number" && !Number.isFinite(e)) { + return `[${e}]`; + } + if (typeof e == "function") { + return `[Function: ${xB(e)}]`; + } + if (typeof e == "symbol") { + return `[${String(e)}]`; + } + if (typeof e == "bigint") { + return `[BigInt: ${String(e)}]`; + } + const t = H9n(e); + if (/^HTML(\w*)Element$/.test(t)) { + return `[HTMLElement: ${t}]`; + } else { + return `[object ${t}]`; + } + } catch (t) { + return `**non-serializable** (${t})`; + } +} +function H9n(i) { + const e = Object.getPrototypeOf(i); + if (e) { + return e.constructor.name; + } else { + return "null prototype"; + } +} +function q9n(i) { + return ~-encodeURI(i).split(/%..|./).length; +} +function j9n(i) { + return q9n(JSON.stringify(i)); +} +var _st = ue({ + "out-build/external/sentry/utils/normalize.js"() { + "use strict"; + + nM(); + hWi(); + q3(); + Che(); + } +}); +function z9n(i, e) { + let t = 0; + for (let s = i.length - 1; s >= 0; s--) { + const n = i[s]; + if (n === ".") { + i.splice(s, 1); + } else if (n === "..") { + i.splice(s, 1); + t++; + } else if (t) { + i.splice(s, 1); + t--; + } + } + if (e) { + for (; t--; t) { + i.unshift(".."); + } + } + return i; +} +function J9n(i) { + const e = i.length > 1024 ? `${i.slice(-1024)}` : i; + const t = yWi.exec(e); + if (t) { + return t.slice(1); + } else { + return []; + } +} +function bWi(...i) { + let e = ""; + let t = false; + for (let s = i.length - 1; s >= -1 && !t; s--) { + const n = s >= 0 ? i[s] : "/"; + if (n) { + e = `${n}/${e}`; + t = n.charAt(0) === "/"; + } + } + e = z9n(e.split("/").filter(s => !!s), !t).join("/"); + return (t ? "/" : "") + e || "."; +} +function vWi(i) { + let e = 0; + for (; e < i.length && i[e] === ""; e++); + let t = i.length - 1; + for (; t >= 0 && i[t] === ""; t--); + if (e > t) { + return []; + } else { + return i.slice(e, t - e + 1); + } +} +function G9n(i, e) { + i = bWi(i).slice(1); + e = bWi(e).slice(1); + const t = vWi(i.split("/")); + const s = vWi(e.split("/")); + const n = Math.min(t.length, s.length); + let r = n; + for (let a = 0; a < n; a++) { + if (t[a] !== s[a]) { + r = a; + break; + } + } + let o = []; + for (let a = r; a < t.length; a++) { + o.push(".."); + } + o = o.concat(s.slice(r)); + return o.join("/"); +} +function K9n(i, e) { + let t = J9n(i)[2] || ""; + if (e && t.slice(e.length * -1) === e) { + t = t.slice(0, t.length - e.length); + } + return t; +} +var yWi; +var Y9n = ue({ + "out-build/external/sentry/utils/path.js"() { + "use strict"; + + yWi = /^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/; + } +}); +function wq(i) { + return new fZ(e => { + e(i); + }); +} +function Bst(i) { + return new fZ((e, t) => { + t(i); + }); +} +var wWi; +var fZ; +var CWi = ue({ + "out-build/external/sentry/utils/syncpromise.js"() { + "use strict"; + + nM(); + (function (i) { + i[i.PENDING = 0] = "PENDING"; + i[i.RESOLVED = 1] = "RESOLVED"; + i[i.REJECTED = 2] = "REJECTED"; + })(wWi ||= {}); + fZ = class f3i { + constructor(e) { + this._resolve = t => { + this._setResult(1, t); + }; + this._reject = t => { + this._setResult(2, t); + }; + this._setResult = (t, s) => { + if (this._state === 0) { + if (bhe(s)) { + s.then(this._resolve, this._reject); + return; + } + this._state = t; + this._value = s; + this._executeHandlers(); + } + }; + this._executeHandlers = () => { + if (this._state === 0) { + return; + } + const t = this._handlers.slice(); + this._handlers = []; + t.forEach(s => { + if (!s[0]) { + if (this._state === 1) { + s[1](this._value); + } + if (this._state === 2) { + s[2](this._value); + } + s[0] = true; + } + }); + }; + this._state = 0; + this._handlers = []; + try { + e(this._resolve, this._reject); + } catch (t) { + this._reject(t); + } + } + then(e, t) { + return new f3i((s, n) => { + this._handlers.push([false, r => { + if (!e) { + s(r); + } else { + try { + s(e(r)); + } catch (o) { + n(o); + } + } + }, r => { + if (!t) { + n(r); + } else { + try { + s(t(r)); + } catch (o) { + n(o); + } + } + }]); + this._executeHandlers(); + }); + } + catch(e) { + return this.then(t => t, e); + } + finally(e) { + return new f3i((t, s) => { + let n; + let r; + return this.then(o => { + r = false; + n = o; + if (e) { + e(); + } + }, o => { + r = true; + n = o; + if (e) { + e(); + } + }).then(() => { + if (r) { + s(n); + return; + } + t(n); + }); + }); + } + }; + } +}); +function SWi(i) { + const e = []; + function t() { + return i === undefined || e.length < i; + } + function s(o) { + return e.splice(e.indexOf(o), 1)[0] || Promise.resolve(undefined); + } + function n(o) { + if (!t()) { + return Bst(new yL("Not adding Promise because buffer limit was reached.")); + } + const a = o(); + if (e.indexOf(a) === -1) { + e.push(a); + } + a.then(() => s(a)).then(null, () => s(a).then(null, () => {})); + return a; + } + function r(o) { + return new fZ((a, l) => { + let c = e.length; + if (!c) { + return a(true); + } + const u = setTimeout(() => { + if (o && o > 0) { + a(false); + } + }, o); + e.forEach(d => { + wq(d).then(() => { + if (! --c) { + clearTimeout(u); + a(true); + } + }, l); + }); + }); + } + return { + $: e, + add: n, + drain: r + }; +} +var xWi = ue({ + "out-build/external/sentry/utils/promisebuffer.js"() { + "use strict"; + + x_t(); + CWi(); + } +}); +function X9n(i) { + const e = {}; + let t = 0; + while (t < i.length) { + const s = i.indexOf("=", t); + if (s === -1) { + break; + } + let n = i.indexOf(";", t); + if (n === -1) { + n = i.length; + } else if (n < s) { + t = i.lastIndexOf(";", s - 1) + 1; + continue; + } + const r = i.slice(t, s).trim(); + if (e[r] === undefined) { + let o = i.slice(s + 1, n).trim(); + if (o.charCodeAt(0) === 34) { + o = o.slice(1, -1); + } + try { + e[r] = o.indexOf("%") !== -1 ? decodeURIComponent(o) : o; + } catch { + e[r] = o; + } + } + t = n + 1; + } + return e; +} +var Q9n = ue({ + "out-build/external/sentry/utils/cookie.js"() { + "use strict"; + } +}); +function Cq(i) { + if (!i) { + return {}; + } + const e = i.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/); + if (!e) { + return {}; + } + const t = e[6] || ""; + const s = e[8] || ""; + return { + host: e[4], + path: e[5], + protocol: e[2], + search: t, + hash: s, + relative: e[5] + t + s + }; +} +function kWi(i) { + return i.split(/[?#]/, 1)[0]; +} +var EWi = ue({ + "out-build/external/sentry/utils/url.js"() { + "use strict"; + } +}); +function Z9n(i) { + return __t.map(n => { + const r = i[n]; + const o = Array.isArray(r) ? r.join(";") : r; + if (n === "Forwarded") { + return e7n(o); + } else { + return o && o.split(",").map(a => a.trim()); + } + }).reduce((n, r) => r ? n.concat(r) : n, []).find(n => n !== null && t7n(n)) || null; +} +function e7n(i) { + if (!i) { + return null; + } + for (const e of i.split(";")) { + if (e.startsWith("for=")) { + return e.slice(4); + } + } + return null; +} +function t7n(i) { + return /(?:^(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}$)|(?:^(?:(?:[a-fA-F\d]{1,4}:){7}(?:[a-fA-F\d]{1,4}|:)|(?:[a-fA-F\d]{1,4}:){6}(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|:[a-fA-F\d]{1,4}|:)|(?:[a-fA-F\d]{1,4}:){5}(?::(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,2}|:)|(?:[a-fA-F\d]{1,4}:){4}(?:(?::[a-fA-F\d]{1,4}){0,1}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,3}|:)|(?:[a-fA-F\d]{1,4}:){3}(?:(?::[a-fA-F\d]{1,4}){0,2}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,4}|:)|(?:[a-fA-F\d]{1,4}:){2}(?:(?::[a-fA-F\d]{1,4}){0,3}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,5}|:)|(?:[a-fA-F\d]{1,4}:){1}(?:(?::[a-fA-F\d]{1,4}){0,4}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,6}|:)|(?::(?:(?::[a-fA-F\d]{1,4}){0,5}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,7}|:)))(?:%[0-9a-zA-Z]{1,})?$)/.test(i); +} +var __t; +var i7n = ue({ + "out-build/external/sentry/utils/vendor/getIpAddress.js"() { + "use strict"; + + __t = ["X-Client-IP", "X-Forwarded-For", "Fly-Client-IP", "CF-Connecting-IP", "Fastly-Client-Ip", "True-Client-Ip", "X-Real-IP", "X-Cluster-Client-IP", "X-Forwarded", "Forwarded-For", "Forwarded", "X-Vercel-Forwarded-For"]; + } +}); +function IWi(i, e = {}) { + const t = i.method && i.method.toUpperCase(); + let s = ""; + let n = "url"; + if (e.customRoute || i.route) { + s = e.customRoute || `${i.baseUrl || ""}${i.route && i.route.path}`; + n = "route"; + } else if (i.originalUrl || i.url) { + s = kWi(i.originalUrl || i.url || ""); + } + let r = ""; + if (e.method && t) { + r += t; + } + if (e.method && e.path) { + r += " "; + } + if (e.path && s) { + r += s; + } + return [r, n]; +} +function s7n(i, e) { + switch (e) { + case "path": + return IWi(i, { + path: true + })[0]; + case "handler": + return i.route && i.route.stack && i.route.stack[0] && i.route.stack[0].name || ""; + case "methodPath": + default: + { + const t = i._reconstructedRoute ? i._reconstructedRoute : undefined; + return IWi(i, { + path: true, + method: true, + customRoute: t + })[0]; + } + } +} +function n7n(i, e) { + const t = {}; + (Array.isArray(e) ? e : TWi).forEach(n => { + if (i && n in i) { + t[n] = i[n]; + } + }); + return t; +} +function r7n(i, e = {}) { + const { + include: t = B_t + } = e; + const s = {}; + const n = i.headers || {}; + const r = i.method; + const o = n.host || i.hostname || i.host || ""; + const a = i.protocol === "https" || i.socket && i.socket.encrypted ? "https" : "http"; + const l = i.originalUrl || i.url || ""; + const c = l.startsWith(a) ? l : `${a}://${o}${l}`; + t.forEach(u => { + switch (u) { + case "headers": + { + s.headers = n; + if (!t.includes("cookies")) { + delete s.headers.cookie; + } + if (!t.includes("ip")) { + __t.forEach(d => { + delete s.headers[d]; + }); + } + break; + } + case "method": + { + s.method = r; + break; + } + case "url": + { + s.url = c; + break; + } + case "cookies": + { + s.cookies = i.cookies || n.cookie && X9n(n.cookie) || {}; + break; + } + case "query_string": + { + s.query_string = a7n(i); + break; + } + case "data": + { + if (r === "GET" || r === "HEAD") { + break; + } + if (i.body !== undefined) { + s.data = L2(i.body) ? i.body : JSON.stringify(rM(i.body)); + } + break; + } + default: + if ({}.hasOwnProperty.call(i, u)) { + s[u] = i[u]; + } + } + }); + return s; +} +function o7n(i, e, t) { + const s = { + ...DWi, + ...(t && t.include) + }; + if (s.request) { + const n = Array.isArray(s.request) ? [...s.request] : [...B_t]; + if (s.ip) { + n.push("ip"); + } + const r = r7n(e, { + include: n + }); + i.request = { + ...i.request, + ...r + }; + } + if (s.user) { + const n = e.user && U3(e.user) ? n7n(e.user, s.user) : {}; + if (Object.keys(n).length) { + i.user = { + ...i.user, + ...n + }; + } + } + if (s.ip) { + const n = e.headers && Z9n(e.headers) || e.ip || e.socket && e.socket.remoteAddress; + if (n) { + i.user = { + ...i.user, + ip_address: n + }; + } + } + if (s.transaction && !i.transaction && i.type === "transaction") { + i.transaction = s7n(e, s.transaction); + } + return i; +} +function a7n(i) { + let e = i.originalUrl || i.url || ""; + if (e) { + if (e.startsWith("/")) { + e = `http://dogs.are.great${e}`; + } + try { + const t = i.query || new URL(e).search.slice(1); + if (t.length) { + return t; + } else { + return undefined; + } + } catch { + return; + } + } +} +var DWi; +var B_t; +var TWi; +var l7n = ue({ + "out-build/external/sentry/utils/requestdata.js"() { + "use strict"; + + Q9n(); + vq(); + nM(); + H3(); + _st(); + EWi(); + i7n(); + DWi = { + ip: false, + request: true, + transaction: true, + user: true + }; + B_t = ["cookies", "data", "headers", "method", "query_string", "url"]; + TWi = ["id", "username", "email"]; + } +}); +function PWi(i) { + if (i === "warn") { + return "warning"; + } else if (LWi.includes(i)) { + return i; + } else { + return "log"; + } +} +var LWi; +var c7n = ue({ + "out-build/external/sentry/utils/severity.js"() { + "use strict"; + + LWi = ["fatal", "error", "warning", "log", "info", "debug"]; + } +}); +function u7n(i, e = false) { + return !e && (!i || !!i.startsWith("/") || !!i.match(/^[A-Z]:/) || !!i.startsWith(".") || !!i.match(/^[a-zA-Z]([a-zA-Z0-9.\-+])*:\/\//)) && i !== undefined && !i.includes("node_modules/"); +} +function d7n(i) { + const e = /^\s*[-]{4,}$/; + const t = /at (?:async )?(?:(.+?)\s+\()?(?:(.+):(\d+):(\d+)?|([^)]+))\)?/; + return s => { + const n = s.match(t); + if (n) { + let r; + let o; + let a; + let l; + let c; + if (n[1]) { + a = n[1]; + let h = a.lastIndexOf("."); + if (a[h - 1] === ".") { + h--; + } + if (h > 0) { + r = a.slice(0, h); + o = a.slice(h + 1); + const g = r.indexOf(".Module"); + if (g > 0) { + a = a.slice(g + 1); + r = r.slice(0, g); + } + } + l = undefined; + } + if (o) { + l = r; + c = o; + } + if (o === "") { + c = undefined; + a = undefined; + } + if (a === undefined) { + c = c || kB; + a = l ? `${l}.${c}` : c; + } + let u = n[2] && n[2].startsWith("file://") ? n[2].slice(7) : n[2]; + const d = n[5] === "native"; + if (u && u.match(/\/[A-Z]:/)) { + u = u.slice(1); + } + if (!u && n[5] && !d) { + u = n[5]; + } + return { + filename: u, + module: i ? i(u) : undefined, + function: a, + lineno: RWi(n[3]), + colno: RWi(n[4]), + in_app: u7n(u || "", d) + }; + } + if (s.match(e)) { + return { + filename: s + }; + } + }; +} +function h7n(i) { + return [90, d7n(i)]; +} +function RWi(i) { + return parseInt(i || "", 10) || undefined; +} +var NWi = ue({ + "out-build/external/sentry/utils/node-stack-trace.js"() { + "use strict"; + + Che(); + } +}); +function MWi(i) { + const e = f7n(i); + if (!e) { + return; + } + const t = Object.entries(e).reduce((s, [n, r]) => { + if (n.match($Wi)) { + const o = n.slice(Ust.length); + s[o] = r; + } + return s; + }, {}); + if (Object.keys(t).length > 0) { + return t; + } +} +function U_t(i) { + if (!i) { + return; + } + const e = Object.entries(i).reduce((t, [s, n]) => { + if (n) { + t[`${Ust}${s}`] = n; + } + return t; + }, {}); + return g7n(e); +} +function f7n(i) { + if (!!i && (!!L2(i) || !!Array.isArray(i))) { + if (Array.isArray(i)) { + return i.reduce((e, t) => { + const s = AWi(t); + Object.entries(s).forEach(([n, r]) => { + e[n] = r; + }); + return e; + }, {}); + } else { + return AWi(i); + } + } +} +function AWi(i) { + return i.split(",").map(e => e.split("=").map(t => decodeURIComponent(t.trim()))).reduce((e, [t, s]) => { + if (t && s) { + e[t] = s; + } + return e; + }, {}); +} +function g7n(i) { + if (Object.keys(i).length !== 0) { + return Object.entries(i).reduce((e, [t, s], n) => { + const r = `${encodeURIComponent(t)}=${encodeURIComponent(s)}`; + const o = n === 0 ? r : `${e},${r}`; + if (o.length > FWi) { + if (bq) { + tr.warn(`Not adding key: ${t} with val: ${s} to baggage header due to exceeding baggage size limits.`); + } + return e; + } else { + return o; + } + }, ""); + } +} +var Sq; +var Ust; +var $Wi; +var FWi; +var OWi = ue({ + "out-build/external/sentry/utils/baggage.js"() { + "use strict"; + + vq(); + nM(); + H3(); + Sq = "baggage"; + Ust = "sentry-"; + $Wi = /^sentry-/; + FWi = 8192; + } +}); +function p7n(i) { + if (!i) { + return; + } + const e = i.match(BWi); + if (!e) { + return; + } + let t; + if (e[3] === "1") { + t = true; + } else if (e[3] === "0") { + t = false; + } + return { + traceId: e[1], + parentSampled: t, + parentSpanId: e[2] + }; +} +function _Wi(i, e) { + const t = p7n(i); + const s = MWi(e); + const { + traceId: n, + parentSpanId: r, + parentSampled: o + } = t || {}; + if (t) { + return { + traceId: n || Vp(), + parentSpanId: r || Vp().substring(16), + spanId: Vp().substring(16), + sampled: o, + dsc: s || {} + }; + } else { + return { + traceId: n || Vp(), + spanId: Vp().substring(16) + }; + } +} +function W_t(i = Vp(), e = Vp().substring(16), t) { + let s = ""; + if (t !== undefined) { + s = t ? "-1" : "-0"; + } + return `${i}-${e}${s}`; +} +var BWi; +var m7n = ue({ + "out-build/external/sentry/utils/tracing.js"() { + "use strict"; + + OWi(); + Phe(); + BWi = new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$"); + } +}); +function gZ(i, e = []) { + return [i, e]; +} +function b7n(i, e) { + const [t, s] = i; + return [t, [...s, e]]; +} +function Lhe(i, e) { + const t = i[1]; + for (const s of t) { + const n = s[0].type; + if (e(s, n)) { + return true; + } + } + return false; +} +function V_t(i) { + if (Bu.__SENTRY__ && Bu.__SENTRY__.encodePolyfill) { + return Bu.__SENTRY__.encodePolyfill(i); + } else { + return new TextEncoder().encode(i); + } +} +function v7n(i) { + const [e, t] = i; + let s = JSON.stringify(e); + function n(r) { + if (typeof s == "string") { + s = typeof r == "string" ? s + r : [V_t(s), r]; + } else { + s.push(typeof r == "string" ? V_t(r) : r); + } + } + for (const r of t) { + const [o, a] = r; + n(` +${JSON.stringify(o)} +`); + if (typeof a == "string" || a instanceof Uint8Array) { + n(a); + } else { + let l; + try { + l = JSON.stringify(a); + } catch { + l = JSON.stringify(rM(a)); + } + n(l); + } + } + if (typeof s == "string") { + return s; + } else { + return y7n(s); + } +} +function y7n(i) { + const e = i.reduce((n, r) => n + r.length, 0); + const t = new Uint8Array(e); + let s = 0; + for (const n of i) { + t.set(n, s); + s += n.length; + } + return t; +} +function w7n(i) { + return [{ + type: "span" + }, i]; +} +function C7n(i) { + const e = typeof i.data == "string" ? V_t(i.data) : i.data; + return [N0({ + type: "attachment", + length: e.length, + filename: i.filename, + content_type: i.contentType, + attachment_type: i.attachmentType + }), e]; +} +function UWi(i) { + return VWi[i]; +} +function WWi(i) { + if (!i || !i.sdk) { + return; + } + const { + name: e, + version: t + } = i.sdk; + return { + name: e, + version: t + }; +} +function S7n(i, e, t, s) { + const n = i.sdkProcessingMetadata && i.sdkProcessingMetadata.dynamicSamplingContext; + return { + event_id: i.event_id, + sent_at: new Date().toISOString(), + ...(e && { + sdk: e + }), + ...(!!t && s && { + dsn: hZ(s) + }), + ...(n && { + trace: N0({ + ...n + }) + }) + }; +} +var VWi; +var H_t = ue({ + "out-build/external/sentry/utils/envelope.js"() { + "use strict"; + + KUi(); + _st(); + q3(); + gI(); + VWi = { + session: "session", + sessions: "session", + attachment: "attachment", + transaction: "transaction", + event: "error", + client_report: "internal", + user_report: "default", + profile: "profile", + profile_chunk: "profile", + replay_event: "replay", + replay_recording: "replay", + check_in: "monitor", + feedback: "feedback", + span: "span", + statsd: "metric_bucket" + }; + } +}); +function x7n(i, e, t) { + const s = [{ + type: "client_report" + }, { + timestamp: t || Ihe(), + discarded_events: i + }]; + return gZ(e ? { + dsn: e + } : {}, [s]); +} +var k7n = ue({ + "out-build/external/sentry/utils/clientreport.js"() { + "use strict"; + + H_t(); + M_t(); + } +}); +function E7n(i, e = Date.now()) { + const t = parseInt(`${i}`, 10); + if (!isNaN(t)) { + return t * 1000; + } + const s = Date.parse(`${i}`); + if (isNaN(s)) { + return HWi; + } else { + return s - e; + } +} +function I7n(i, e) { + return i[e] || i.all || 0; +} +function D7n(i, e, t = Date.now()) { + return I7n(i, e) > t; +} +function T7n(i, { + statusCode: e, + headers: t +}, s = Date.now()) { + const n = { + ...i + }; + const r = t && t["x-sentry-rate-limits"]; + const o = t && t["retry-after"]; + if (r) { + for (const a of r.trim().split(",")) { + const [l, c,,, u] = a.split(":", 5); + const d = parseInt(l, 10); + const h = (isNaN(d) ? 60 : d) * 1000; + if (!c) { + n.all = s + h; + } else { + for (const g of c.split(";")) { + if (g === "metric_bucket") { + if (!u || u.split(";").includes("custom")) { + n[g] = s + h; + } + } else { + n[g] = s + h; + } + } + } + } + } else if (o) { + n.all = s + E7n(o, s); + } else if (e === 429) { + n.all = s + 60000; + } + return n; +} +var HWi; +var P7n = ue({ + "out-build/external/sentry/utils/ratelimit.js"() { + "use strict"; + + HWi = 60000; + } +}); +var L7n = ue({ + "out-build/external/sentry/utils/cache.js"() { + "use strict"; + } +}); +function R7n(i, e) { + return i(e.stack || "", 1); +} +function N7n(i, e) { + const t = { + type: e.name || e.constructor.name, + value: e.message + }; + const s = R7n(i, e); + if (s.length) { + t.stacktrace = { + frames: s + }; + } + return t; +} +var M7n = ue({ + "out-build/external/sentry/utils/eventbuilder.js"() { + "use strict"; + + nM(); + Phe(); + _st(); + q3(); + } +}); +var A7n = ue({ + "out-build/external/sentry/utils/anr.js"() { + "use strict"; + + NWi(); + q3(); + Che(); + } +}); +var $7n = ue({ + "out-build/external/sentry/utils/lru.js"() { + "use strict"; + } +}); +var qWi = ue({ + "out-build/external/sentry/utils/buildPolyfills/_nullishCoalesce.js"() { + "use strict"; + } +}); +var F7n = ue({ + "out-build/external/sentry/utils/buildPolyfills/_asyncNullishCoalesce.js"() { + "use strict"; + + qWi(); + } +}); +var jWi = ue({ + "out-build/external/sentry/utils/buildPolyfills/_asyncOptionalChain.js"() { + "use strict"; + } +}); +var O7n = ue({ + "out-build/external/sentry/utils/buildPolyfills/_asyncOptionalChainDelete.js"() { + "use strict"; + + jWi(); + } +}); +var zWi = ue({ + "out-build/external/sentry/utils/buildPolyfills/_optionalChain.js"() { + "use strict"; + } +}); +var _7n = ue({ + "out-build/external/sentry/utils/buildPolyfills/_optionalChainDelete.js"() { + "use strict"; + + zWi(); + } +}); +var B7n = ue({ + "out-build/external/sentry/utils/buildPolyfills/index.js"() { + "use strict"; + + F7n(); + jWi(); + O7n(); + qWi(); + zWi(); + _7n(); + } +}); +function Rhe() { + return { + traceId: Vp(), + spanId: Vp().substring(16) + }; +} +var U7n = ue({ + "out-build/external/sentry/utils/propagationContext.js"() { + "use strict"; + + Phe(); + } +}); +var W7n = ue({ + "out-build/external/sentry/utils/vercelWaitUntil.js"() { + "use strict"; + + gI(); + } +}); +var qr = ue({ + "out-build/external/sentry/utils/index.js"() { + "use strict"; + + l9n(); + c9n(); + u9n(); + qUi(); + KUi(); + x_t(); + gI(); + O9n(); + nM(); + B9n(); + H3(); + hWi(); + Phe(); + dWi(); + _st(); + q3(); + Y9n(); + xWi(); + l7n(); + c7n(); + Che(); + NWi(); + Ast(); + rWi(); + CWi(); + M_t(); + m7n(); + uWi(); + H_t(); + k7n(); + P7n(); + OWi(); + EWi(); + L7n(); + M7n(); + A7n(); + $7n(); + B7n(); + U7n(); + W7n(); + WUi(); + } +}); +var Jc; +var xw = ue({ + "out-build/external/sentry/core/debug-build.js"() { + "use strict"; + + Jc = false; + } +}); +function xq() { + q_t(Bu); + return Bu; +} +function q_t(i) { + const e = i.__SENTRY__ = i.__SENTRY__ || {}; + e.version = e.version || V3; + return e[V3] = e[V3] || {}; +} +var kq = ue({ + "out-build/external/sentry/core/carrier.js"() { + "use strict"; + + qr(); + } +}); +function V7n(i) { + const e = Hb(); + const t = { + sid: Vp(), + init: true, + timestamp: e, + started: e, + duration: 0, + status: "ok", + errors: 0, + ignoreDuration: false, + toJSON: () => q7n(t) + }; + if (i) { + pZ(t, i); + } + return t; +} +function pZ(i, e = {}) { + if (e.user) { + if (!i.ipAddress && e.user.ip_address) { + i.ipAddress = e.user.ip_address; + } + if (!i.did && !e.did) { + i.did = e.user.id || e.user.email || e.user.username; + } + } + i.timestamp = e.timestamp || Hb(); + if (e.abnormal_mechanism) { + i.abnormal_mechanism = e.abnormal_mechanism; + } + if (e.ignoreDuration) { + i.ignoreDuration = e.ignoreDuration; + } + if (e.sid) { + i.sid = e.sid.length === 32 ? e.sid : Vp(); + } + if (e.init !== undefined) { + i.init = e.init; + } + if (!i.did && e.did) { + i.did = `${e.did}`; + } + if (typeof e.started == "number") { + i.started = e.started; + } + if (i.ignoreDuration) { + i.duration = undefined; + } else if (typeof e.duration == "number") { + i.duration = e.duration; + } else { + const t = i.timestamp - i.started; + i.duration = t >= 0 ? t : 0; + } + if (e.release) { + i.release = e.release; + } + if (e.environment) { + i.environment = e.environment; + } + if (!i.ipAddress && e.ipAddress) { + i.ipAddress = e.ipAddress; + } + if (!i.userAgent && e.userAgent) { + i.userAgent = e.userAgent; + } + if (typeof e.errors == "number") { + i.errors = e.errors; + } + if (e.status) { + i.status = e.status; + } +} +function H7n(i, e) { + let t = {}; + if (e) { + t = { + status: e + }; + } else if (i.status === "ok") { + t = { + status: "exited" + }; + } + pZ(i, t); +} +function q7n(i) { + return N0({ + sid: `${i.sid}`, + init: i.init, + started: new Date(i.started * 1000).toISOString(), + timestamp: new Date(i.timestamp * 1000).toISOString(), + status: i.status, + errors: i.errors, + did: typeof i.did == "number" || typeof i.did == "string" ? `${i.did}` : undefined, + duration: i.duration, + abnormal_mechanism: i.abnormal_mechanism, + attrs: { + release: i.release, + environment: i.environment, + ip_address: i.ipAddress, + user_agent: i.userAgent + } + }); +} +var Wst = ue({ + "out-build/external/sentry/core/session.js"() { + "use strict"; + + qr(); + } +}); +function Eq(i, e) { + if (e) { + pT(i, Hst, e); + } else { + delete i[Hst]; + } +} +function Vst(i) { + return i[Hst]; +} +var Hst; +var Nhe = ue({ + "out-build/external/sentry/core/utils/spanOnScope.js"() { + "use strict"; + + qr(); + Hst = "_sentrySpan"; + } +}); +var JWi; +var GWi; +var R2; +var Mhe = ue({ + "out-build/external/sentry/core/scope.js"() { + "use strict"; + + qr(); + Wst(); + Nhe(); + JWi = 100; + GWi = class G2n { + constructor() { + this._notifyingListeners = false; + this._scopeListeners = []; + this._eventProcessors = []; + this._breadcrumbs = []; + this._attachments = []; + this._user = {}; + this._tags = {}; + this._extra = {}; + this._contexts = {}; + this._sdkProcessingMetadata = {}; + this._propagationContext = Rhe(); + } + clone() { + const e = new G2n(); + e._breadcrumbs = [...this._breadcrumbs]; + e._tags = { + ...this._tags + }; + e._extra = { + ...this._extra + }; + e._contexts = { + ...this._contexts + }; + e._user = this._user; + e._level = this._level; + e._session = this._session; + e._transactionName = this._transactionName; + e._fingerprint = this._fingerprint; + e._eventProcessors = [...this._eventProcessors]; + e._requestSession = this._requestSession; + e._attachments = [...this._attachments]; + e._sdkProcessingMetadata = { + ...this._sdkProcessingMetadata + }; + e._propagationContext = { + ...this._propagationContext + }; + e._client = this._client; + e._lastEventId = this._lastEventId; + Eq(e, Vst(this)); + return e; + } + setClient(e) { + this._client = e; + } + setLastEventId(e) { + this._lastEventId = e; + } + getClient() { + return this._client; + } + lastEventId() { + return this._lastEventId; + } + addScopeListener(e) { + this._scopeListeners.push(e); + } + addEventProcessor(e) { + this._eventProcessors.push(e); + return this; + } + setUser(e) { + this._user = e || { + email: undefined, + id: undefined, + ip_address: undefined, + username: undefined + }; + if (this._session) { + pZ(this._session, { + user: e + }); + } + this._notifyScopeListeners(); + return this; + } + getUser() { + return this._user; + } + getRequestSession() { + return this._requestSession; + } + setRequestSession(e) { + this._requestSession = e; + return this; + } + setTags(e) { + this._tags = { + ...this._tags, + ...e + }; + this._notifyScopeListeners(); + return this; + } + setTag(e, t) { + this._tags = { + ...this._tags, + [e]: t + }; + this._notifyScopeListeners(); + return this; + } + setExtras(e) { + this._extra = { + ...this._extra, + ...e + }; + this._notifyScopeListeners(); + return this; + } + setExtra(e, t) { + this._extra = { + ...this._extra, + [e]: t + }; + this._notifyScopeListeners(); + return this; + } + setFingerprint(e) { + this._fingerprint = e; + this._notifyScopeListeners(); + return this; + } + setLevel(e) { + this._level = e; + this._notifyScopeListeners(); + return this; + } + setTransactionName(e) { + this._transactionName = e; + this._notifyScopeListeners(); + return this; + } + setContext(e, t) { + if (t === null) { + delete this._contexts[e]; + } else { + this._contexts[e] = t; + } + this._notifyScopeListeners(); + return this; + } + setSession(e) { + if (e) { + this._session = e; + } else { + delete this._session; + } + this._notifyScopeListeners(); + return this; + } + getSession() { + return this._session; + } + update(e) { + if (!e) { + return this; + } + const t = typeof e == "function" ? e(this) : e; + const [s, n] = t instanceof R2 ? [t.getScopeData(), t.getRequestSession()] : U3(t) ? [e, e.requestSession] : []; + const { + tags: r, + extra: o, + user: a, + contexts: l, + level: c, + fingerprint: u = [], + propagationContext: d + } = s || {}; + this._tags = { + ...this._tags, + ...r + }; + this._extra = { + ...this._extra, + ...o + }; + this._contexts = { + ...this._contexts, + ...l + }; + if (a && Object.keys(a).length) { + this._user = a; + } + if (c) { + this._level = c; + } + if (u.length) { + this._fingerprint = u; + } + if (d) { + this._propagationContext = d; + } + if (n) { + this._requestSession = n; + } + return this; + } + clear() { + this._breadcrumbs = []; + this._tags = {}; + this._extra = {}; + this._user = {}; + this._contexts = {}; + this._level = undefined; + this._transactionName = undefined; + this._fingerprint = undefined; + this._requestSession = undefined; + this._session = undefined; + Eq(this, undefined); + this._attachments = []; + this._propagationContext = Rhe(); + this._notifyScopeListeners(); + return this; + } + addBreadcrumb(e, t) { + const s = typeof t == "number" ? t : JWi; + if (s <= 0) { + return this; + } + const n = { + timestamp: Ihe(), + ...e + }; + const r = this._breadcrumbs; + r.push(n); + this._breadcrumbs = r.length > s ? r.slice(-s) : r; + this._notifyScopeListeners(); + return this; + } + getLastBreadcrumb() { + return this._breadcrumbs[this._breadcrumbs.length - 1]; + } + clearBreadcrumbs() { + this._breadcrumbs = []; + this._notifyScopeListeners(); + return this; + } + addAttachment(e) { + this._attachments.push(e); + return this; + } + clearAttachments() { + this._attachments = []; + return this; + } + getScopeData() { + return { + breadcrumbs: this._breadcrumbs, + attachments: this._attachments, + contexts: this._contexts, + tags: this._tags, + extra: this._extra, + user: this._user, + level: this._level, + fingerprint: this._fingerprint || [], + eventProcessors: this._eventProcessors, + propagationContext: this._propagationContext, + sdkProcessingMetadata: this._sdkProcessingMetadata, + transactionName: this._transactionName, + span: Vst(this) + }; + } + setSDKProcessingMetadata(e) { + this._sdkProcessingMetadata = { + ...this._sdkProcessingMetadata, + ...e + }; + return this; + } + setPropagationContext(e) { + this._propagationContext = e; + return this; + } + getPropagationContext() { + return this._propagationContext; + } + captureException(e, t) { + const s = t && t.event_id ? t.event_id : Vp(); + if (!this._client) { + tr.warn("No client configured on scope - will not capture exception!"); + return s; + } + const n = new Error("Sentry syntheticException"); + this._client.captureException(e, { + originalException: e, + syntheticException: n, + ...t, + event_id: s + }, this); + return s; + } + captureMessage(e, t, s) { + const n = s && s.event_id ? s.event_id : Vp(); + if (!this._client) { + tr.warn("No client configured on scope - will not capture message!"); + return n; + } + const r = new Error(e); + this._client.captureMessage(e, t, { + originalException: e, + syntheticException: r, + ...s, + event_id: n + }, this); + return n; + } + captureEvent(e, t) { + const s = t && t.event_id ? t.event_id : Vp(); + if (this._client) { + this._client.captureEvent(e, { + ...t, + event_id: s + }, this); + return s; + } else { + tr.warn("No client configured on scope - will not capture event!"); + return s; + } + } + _notifyScopeListeners() { + if (!this._notifyingListeners) { + this._notifyingListeners = true; + this._scopeListeners.forEach(e => { + e(this); + }); + this._notifyingListeners = false; + } + } + }; + R2 = GWi; + } +}); +function j7n() { + return vhe("defaultCurrentScope", () => new R2()); +} +function z7n() { + return vhe("defaultIsolationScope", () => new R2()); +} +var KWi = ue({ + "out-build/external/sentry/core/defaultScopes.js"() { + "use strict"; + + qr(); + Mhe(); + } +}); +function mZ() { + const i = xq(); + const e = q_t(i); + return e.stack = e.stack || new XWi(j7n(), z7n()); +} +function J7n(i) { + return mZ().withScope(i); +} +function G7n(i, e) { + const t = mZ(); + return t.withScope(() => { + t.getStackTop().scope = i; + return e(i); + }); +} +function YWi(i) { + return mZ().withScope(() => i(mZ().getIsolationScope())); +} +function K7n() { + return { + withIsolationScope: YWi, + withScope: J7n, + withSetScope: G7n, + withSetIsolationScope: (i, e) => YWi(e), + getCurrentScope: () => mZ().getScope(), + getIsolationScope: () => mZ().getIsolationScope() + }; +} +var XWi; +var Y7n = ue({ + "out-build/external/sentry/core/asyncContext/stackStrategy.js"() { + "use strict"; + + qr(); + KWi(); + Mhe(); + kq(); + XWi = class { + constructor(i, e) { + let t; + if (i) { + t = i; + } else { + t = new R2(); + } + let s; + if (e) { + s = e; + } else { + s = new R2(); + } + this._stack = [{ + scope: t + }]; + this._isolationScope = s; + } + withScope(i) { + const e = this._pushScope(); + let t; + try { + t = i(e); + } catch (s) { + this._popScope(); + throw s; + } + if (bhe(t)) { + return t.then(s => { + this._popScope(); + return s; + }, s => { + this._popScope(); + throw s; + }); + } else { + this._popScope(); + return t; + } + } + getClient() { + return this.getStackTop().client; + } + getScope() { + return this.getStackTop().scope; + } + getIsolationScope() { + return this._isolationScope; + } + getStackTop() { + return this._stack[this._stack.length - 1]; + } + _pushScope() { + const i = this.getScope().clone(); + this._stack.push({ + client: this.getClient(), + scope: i + }); + return i; + } + _popScope() { + if (this._stack.length <= 1) { + return false; + } else { + return !!this._stack.pop(); + } + } + }; + } +}); +function bZ(i) { + const e = q_t(i); + if (e.acs) { + return e.acs; + } else { + return K7n(); + } +} +var Ahe = ue({ + "out-build/external/sentry/core/asyncContext/index.js"() { + "use strict"; + + kq(); + Y7n(); + } +}); +function ju() { + const i = xq(); + return bZ(i).getCurrentScope(); +} +function gm() { + const i = xq(); + return bZ(i).getIsolationScope(); +} +function QWi() { + return vhe("globalScope", () => new R2()); +} +function CL(...i) { + const e = xq(); + const t = bZ(e); + if (i.length === 2) { + const [s, n] = i; + if (s) { + return t.withSetScope(s, n); + } else { + return t.withScope(n); + } + } + return t.withScope(i[0]); +} +function X7n(...i) { + const e = xq(); + const t = bZ(e); + if (i.length === 2) { + const [s, n] = i; + if (s) { + return t.withSetIsolationScope(s, n); + } else { + return t.withIsolationScope(n); + } + } + return t.withIsolationScope(i[0]); +} +function ru() { + return ju().getClient(); +} +var ub = ue({ + "out-build/external/sentry/core/currentScopes.js"() { + "use strict"; + + qr(); + Ahe(); + kq(); + Mhe(); + } +}); +function j_t(i) { + const e = i[ZWi]; + if (!e) { + return; + } + const t = {}; + for (const [, [s, n]] of e) { + (t[s] ||= []).push(N0(n)); + } + return t; +} +var ZWi; +var z_t = ue({ + "out-build/external/sentry/core/metrics/metric-summary.js"() { + "use strict"; + + qr(); + ZWi = "_sentryMetrics"; + } +}); +var N2; +var $he; +var EB; +var kw; +var qst; +var Fhe; +var Ohe; +var eVi; +var jst; +var M2 = ue({ + "out-build/external/sentry/core/semanticAttributes.js"() { + "use strict"; + + N2 = "sentry.source"; + $he = "sentry.sample_rate"; + EB = "sentry.op"; + kw = "sentry.origin"; + qst = "sentry.idle_span_finish_reason"; + Fhe = "sentry.measurement_unit"; + Ohe = "sentry.measurement_value"; + eVi = "sentry.profile_id"; + jst = "sentry.exclusive_time"; + } +}); +function tVi(i) { + if (i < 400 && i >= 100) { + return { + code: G_t + }; + } + if (i >= 400 && i < 500) { + switch (i) { + case 401: + return { + code: Ty, + message: "unauthenticated" + }; + case 403: + return { + code: Ty, + message: "permission_denied" + }; + case 404: + return { + code: Ty, + message: "not_found" + }; + case 409: + return { + code: Ty, + message: "already_exists" + }; + case 413: + return { + code: Ty, + message: "failed_precondition" + }; + case 429: + return { + code: Ty, + message: "resource_exhausted" + }; + case 499: + return { + code: Ty, + message: "cancelled" + }; + default: + return { + code: Ty, + message: "invalid_argument" + }; + } + } + if (i >= 500 && i < 600) { + switch (i) { + case 501: + return { + code: Ty, + message: "unimplemented" + }; + case 503: + return { + code: Ty, + message: "unavailable" + }; + case 504: + return { + code: Ty, + message: "deadline_exceeded" + }; + default: + return { + code: Ty, + message: "internal_error" + }; + } + } + return { + code: Ty, + message: "unknown_error" + }; +} +function J_t(i, e) { + i.setAttribute("http.response.status_code", e); + const t = tVi(e); + if (t.message !== "unknown_error") { + i.setStatus(t); + } +} +var iVi; +var G_t; +var Ty; +var vZ = ue({ + "out-build/external/sentry/core/tracing/spanstatus.js"() { + "use strict"; + + iVi = 0; + G_t = 1; + Ty = 2; + } +}); +function Q7n(i) { + const { + spanId: e, + traceId: t + } = i.spanContext(); + const { + data: s, + op: n, + parent_span_id: r, + status: o, + origin: a + } = ed(i); + return N0({ + parent_span_id: r, + span_id: e, + trace_id: t, + data: s, + op: n, + status: o, + origin: a + }); +} +function Z7n(i) { + const { + spanId: e, + traceId: t + } = i.spanContext(); + const { + parent_span_id: s + } = ed(i); + return N0({ + parent_span_id: s, + span_id: e, + trace_id: t + }); +} +function K_t(i) { + const { + traceId: e, + spanId: t + } = i.spanContext(); + const s = Dq(i); + return W_t(e, t, s); +} +function Iq(i) { + if (typeof i == "number") { + return sVi(i); + } else if (Array.isArray(i)) { + return i[0] + i[1] / 1000000000; + } else if (i instanceof Date) { + return sVi(i.getTime()); + } else { + return Hb(); + } +} +function sVi(i) { + if (i > 9999999999) { + return i / 1000; + } else { + return i; + } +} +function ed(i) { + if (tUn(i)) { + return i.getSpanJSON(); + } + try { + const { + spanId: e, + traceId: t + } = i.spanContext(); + if (eUn(i)) { + const { + attributes: s, + startTime: n, + name: r, + endTime: o, + parentSpanId: a, + status: l + } = i; + return N0({ + span_id: e, + trace_id: t, + data: s, + description: r, + parent_span_id: a, + start_timestamp: Iq(n), + timestamp: Iq(o) || undefined, + status: nVi(l), + op: s[EB], + origin: s[kw], + _metrics_summary: j_t(i) + }); + } + return { + span_id: e, + trace_id: t + }; + } catch { + return {}; + } +} +function eUn(i) { + const e = i; + return !!e.attributes && !!e.startTime && !!e.name && !!e.endTime && !!e.status; +} +function tUn(i) { + return typeof i.getSpanJSON == "function"; +} +function Dq(i) { + const { + traceFlags: e + } = i.spanContext(); + return e === X_t; +} +function nVi(i) { + if (!!i && i.code !== iVi) { + if (i.code === G_t) { + return "ok"; + } else { + return i.message || "unknown_error"; + } + } +} +function rVi(i, e) { + const t = i[zst] || i; + pT(e, zst, t); + if (i[G3]) { + i[G3].add(e); + } else { + pT(i, G3, new Set([e])); + } +} +function iUn(i, e) { + if (i[G3]) { + i[G3].delete(e); + } +} +function _he(i) { + const e = new Set(); + function t(s) { + if (!e.has(s) && Dq(s)) { + e.add(s); + const n = s[G3] ? Array.from(s[G3]) : []; + for (const r of n) { + t(r); + } + } + } + t(i); + return Array.from(e); +} +function Ew(i) { + return i[zst] || i; +} +function WC() { + const i = xq(); + const e = bZ(i); + if (e.getActiveSpan) { + return e.getActiveSpan(); + } else { + return Vst(ju()); + } +} +var Y_t; +var X_t; +var G3; +var zst; +var KS = ue({ + "out-build/external/sentry/core/utils/spanUtils.js"() { + "use strict"; + + qr(); + Ahe(); + kq(); + ub(); + z_t(); + M2(); + vZ(); + Nhe(); + Y_t = 0; + X_t = 1; + G3 = "_sentryChildSpans"; + zst = "_sentryRootSpan"; + } +}); +function Q_t() { + if (!eBt) { + eBt = true; + lWi(Z_t); + cWi(Z_t); + } +} +function Z_t() { + const i = WC(); + const e = i && Ew(i); + if (e) { + const t = "internal_error"; + if (Jc) { + tr.log(`[Tracing] Root span: ${t} -> Global error occured`); + } + e.setStatus({ + code: Ty, + message: t + }); + } +} +var eBt; +var oVi = ue({ + "out-build/external/sentry/core/tracing/errors.js"() { + "use strict"; + + qr(); + xw(); + KS(); + vZ(); + eBt = false; + Z_t.tag = "sentry_tracingErrorCallback"; + } +}); +function sUn(i, e, t) { + if (i) { + pT(i, iBt, t); + pT(i, tBt, e); + } +} +function aVi(i) { + return { + scope: i[tBt], + isolationScope: i[iBt] + }; +} +var tBt; +var iBt; +var sBt = ue({ + "out-build/external/sentry/core/tracing/utils.js"() { + "use strict"; + + qr(); + qr(); + tBt = "_sentryScope"; + iBt = "_sentryIsolationScope"; + } +}); +function nUn() { + Q_t(); +} +var rUn = ue({ + "out-build/external/sentry/core/tracing/hubextensions.js"() { + "use strict"; + + oVi(); + } +}); +function IB(i) { + if (typeof __SENTRY_TRACING__ == "boolean" && !__SENTRY_TRACING__) { + return false; + } + const e = ru(); + const t = i || e && e.getOptions(); + return !!t && (t.enableTracing || "tracesSampleRate" in t || "tracesSampler" in t); +} +var yZ = ue({ + "out-build/external/sentry/core/utils/hasTracingEnabled.js"() { + "use strict"; + + ub(); + } +}); +var DB; +var Jst = ue({ + "out-build/external/sentry/core/tracing/sentryNonRecordingSpan.js"() { + "use strict"; + + qr(); + KS(); + DB = class { + constructor(i = {}) { + this._traceId = i.traceId || Vp(); + this._spanId = i.spanId || Vp().substring(16); + } + spanContext() { + return { + spanId: this._spanId, + traceId: this._traceId, + traceFlags: Y_t + }; + } + end(i) {} + setAttribute(i, e) { + return this; + } + setAttributes(i) { + return this; + } + setStatus(i) { + return this; + } + updateName(i) { + return this; + } + isRecording() { + return false; + } + addEvent(i, e, t) { + return this; + } + addLink(i) { + return this; + } + addLinks(i) { + return this; + } + recordException(i, e) {} + }; + } +}); +function nBt(i, e, t = () => {}) { + let s; + try { + s = i(); + } catch (n) { + e(n); + t(); + throw n; + } + return oUn(s, e, t); +} +function oUn(i, e, t) { + if (bhe(i)) { + return i.then(s => { + t(); + return s; + }, s => { + e(s); + t(); + throw s; + }); + } else { + t(); + return i; + } +} +var rBt = ue({ + "out-build/external/sentry/core/utils/handleCallbackErrors.js"() { + "use strict"; + + qr(); + } +}); +var Bhe; +var Gst = ue({ + "out-build/external/sentry/core/constants.js"() { + "use strict"; + + Bhe = "production"; + } +}); +function lVi(i, e) { + pT(i, oBt, e); +} +function Kst(i, e) { + const t = e.getOptions(); + const { + publicKey: s + } = e.getDsn() || {}; + const n = N0({ + environment: t.environment || Bhe, + release: t.release, + public_key: s, + trace_id: i + }); + e.emit("createDsc", n); + return n; +} +function K3(i) { + const e = ru(); + if (!e) { + return {}; + } + const t = Kst(ed(i).trace_id || "", e); + const s = Ew(i); + const n = s[oBt]; + if (n) { + return n; + } + const r = s.spanContext().traceState; + const o = r && r.get("sentry.dsc"); + const a = o && MWi(o); + if (a) { + return a; + } + const l = ed(s); + const c = l.data || {}; + const u = c[$he]; + if (u != null) { + t.sample_rate = `${u}`; + } + const d = c[N2]; + const h = l.description; + if (d !== "url" && h) { + t.transaction = h; + } + if (IB()) { + t.sampled = String(Dq(s)); + } + e.emit("createDsc", t, s); + return t; +} +function aUn(i) { + const e = K3(i); + return U_t(e); +} +var oBt; +var wZ = ue({ + "out-build/external/sentry/core/tracing/dynamicSamplingContext.js"() { + "use strict"; + + qr(); + Gst(); + ub(); + M2(); + yZ(); + KS(); + oBt = "_frozenDsc"; + } +}); +function lUn(i) { + if (!Jc) { + return; + } + const { + description: e = "< unknown name >", + op: t = "< unknown op >", + parent_span_id: s + } = ed(i); + const { + spanId: n + } = i.spanContext(); + const r = Dq(i); + const o = Ew(i); + const a = o === i; + const l = `[Tracing] Starting ${r ? "sampled" : "unsampled"} ${a ? "root " : ""}span`; + const c = [`op: ${t}`, `name: ${e}`, `ID: ${n}`]; + if (s) { + c.push(`parent ID: ${s}`); + } + if (!a) { + const { + op: u, + description: d + } = ed(o); + c.push(`root ID: ${o.spanContext().spanId}`); + if (u) { + c.push(`root op: ${u}`); + } + if (d) { + c.push(`root description: ${d}`); + } + } + tr.log(`${l} + ${c.join(` + `)}`); +} +function cUn(i) { + if (!Jc) { + return; + } + const { + description: e = "< unknown name >", + op: t = "< unknown op >" + } = ed(i); + const { + spanId: s + } = i.spanContext(); + const r = Ew(i) === i; + const o = `[Tracing] Finishing "${t}" ${r ? "root " : ""}span "${e}" with ID ${s}`; + tr.log(o); +} +var aBt = ue({ + "out-build/external/sentry/core/tracing/logSpans.js"() { + "use strict"; + + qr(); + xw(); + KS(); + } +}); +function cVi(i) { + if (typeof i == "boolean") { + return Number(i); + } + const e = typeof i == "string" ? parseFloat(i) : i; + if (typeof e != "number" || isNaN(e) || e < 0 || e > 1) { + if (Jc) { + tr.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(i)} of type ${JSON.stringify(typeof i)}.`); + } + return; + } + return e; +} +var lBt = ue({ + "out-build/external/sentry/core/utils/parseSampleRate.js"() { + "use strict"; + + qr(); + xw(); + } +}); +function uUn(i, e) { + if (!IB(i)) { + return [false]; + } + let t; + if (typeof i.tracesSampler == "function") { + t = i.tracesSampler(e); + } else if (e.parentSampled !== undefined) { + t = e.parentSampled; + } else if (typeof i.tracesSampleRate !== "undefined") { + t = i.tracesSampleRate; + } else { + t = 1; + } + const s = cVi(t); + if (s === undefined) { + if (Jc) { + tr.warn("[Tracing] Discarding transaction because of invalid sample rate."); + } + return [false]; + } else if (s) { + if (Math.random() < s) { + return [true, s]; + } else { + if (Jc) { + tr.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(t)})`); + } + return [false, s]; + } + } else { + if (Jc) { + tr.log(`[Tracing] Discarding transaction because ${typeof i.tracesSampler == "function" ? "tracesSampler returned 0 or false" : "a negative sampling decision was inherited or tracesSampleRate is set to 0"}`); + } + return [false, s]; + } +} +var uVi = ue({ + "out-build/external/sentry/core/tracing/sampling.js"() { + "use strict"; + + qr(); + xw(); + yZ(); + lBt(); + } +}); +function dUn(i, e) { + if (e) { + i.sdk = i.sdk || {}; + i.sdk.name = i.sdk.name || e.name; + i.sdk.version = i.sdk.version || e.version; + i.sdk.integrations = [...(i.sdk.integrations || []), ...(e.integrations || [])]; + i.sdk.packages = [...(i.sdk.packages || []), ...(e.packages || [])]; + } + return i; +} +function hUn(i, e, t, s) { + const n = WWi(t); + const r = { + sent_at: new Date().toISOString(), + ...(n && { + sdk: n + }), + ...(!!s && e && { + dsn: hZ(e) + }) + }; + const o = "aggregates" in i ? [{ + type: "sessions" + }, i] : [{ + type: "session" + }, i.toJSON()]; + return gZ(r, [o]); +} +function fUn(i, e, t, s) { + const n = WWi(t); + const r = i.type && i.type !== "replay_event" ? i.type : "event"; + dUn(i, t && t.sdk); + const o = S7n(i, n, s, e); + delete i.sdkProcessingMetadata; + return gZ(o, [[{ + type: r + }, i]]); +} +function gUn(i, e) { + function t(u) { + return !!u.trace_id && !!u.public_key; + } + const s = K3(i[0]); + const n = e && e.getDsn(); + const r = e && e.getOptions().tunnel; + const o = { + sent_at: new Date().toISOString(), + ...(t(s) && { + trace: s + }), + ...(!!r && n && { + dsn: hZ(n) + }) + }; + const a = e && e.getOptions().beforeSendSpan; + const l = a ? u => a(ed(u)) : u => ed(u); + const c = []; + for (const u of i) { + const d = l(u); + if (d) { + c.push(w7n(d)); + } + } + return gZ(o, c); +} +var cBt = ue({ + "out-build/external/sentry/core/envelope.js"() { + "use strict"; + + qr(); + qr(); + wZ(); + KS(); + } +}); +function dVi(i, e, t, s = WC()) { + const n = s && Ew(s); + if (n) { + n.addEvent(i, { + [Ohe]: e, + [Fhe]: t + }); + } +} +function hVi(i) { + if (!i || i.length === 0) { + return; + } + const e = {}; + i.forEach(t => { + const s = t.attributes || {}; + const n = s[Fhe]; + const r = s[Ohe]; + if (typeof n == "string" && typeof r == "number") { + e[t.name] = { + value: r, + unit: n + }; + } + }); + return e; +} +var fVi = ue({ + "out-build/external/sentry/core/tracing/measurement.js"() { + "use strict"; + + M2(); + KS(); + } +}); +function gVi(i) { + return i && typeof i == "number" || i instanceof Date || Array.isArray(i); +} +function pVi(i) { + return !!i.start_timestamp && !!i.timestamp && !!i.span_id && !!i.trace_id; +} +function pUn(i) { + return i instanceof Yst && i.isStandaloneSpan(); +} +function mUn(i) { + const e = ru(); + if (!e) { + return; + } + const t = i[1]; + if (!t || t.length === 0) { + e.recordDroppedEvent("before_send", "span"); + return; + } + const s = e.getTransport(); + if (s) { + s.send(i).then(null, n => { + if (Jc) { + tr.error("Error while sending span:", n); + } + }); + } +} +var uBt; +var Yst; +var mVi = ue({ + "out-build/external/sentry/core/tracing/sentrySpan.js"() { + "use strict"; + + qr(); + ub(); + xw(); + cBt(); + z_t(); + M2(); + KS(); + wZ(); + aBt(); + fVi(); + sBt(); + uBt = 1000; + Yst = class { + constructor(i = {}) { + this._traceId = i.traceId || Vp(); + this._spanId = i.spanId || Vp().substring(16); + this._startTime = i.startTimestamp || Hb(); + this._attributes = {}; + this.setAttributes({ + [kw]: "manual", + [EB]: i.op, + ...i.attributes + }); + this._name = i.name; + if (i.parentSpanId) { + this._parentSpanId = i.parentSpanId; + } + if ("sampled" in i) { + this._sampled = i.sampled; + } + if (i.endTimestamp) { + this._endTime = i.endTimestamp; + } + this._events = []; + this._isStandaloneSpan = i.isStandalone; + if (this._endTime) { + this._onSpanEnded(); + } + } + addLink(i) { + return this; + } + addLinks(i) { + return this; + } + recordException(i, e) {} + spanContext() { + const { + _spanId: i, + _traceId: e, + _sampled: t + } = this; + return { + spanId: i, + traceId: e, + traceFlags: t ? X_t : Y_t + }; + } + setAttribute(i, e) { + if (e === undefined) { + delete this._attributes[i]; + } else { + this._attributes[i] = e; + } + return this; + } + setAttributes(i) { + Object.keys(i).forEach(e => this.setAttribute(e, i[e])); + return this; + } + updateStartTime(i) { + this._startTime = Iq(i); + } + setStatus(i) { + this._status = i; + return this; + } + updateName(i) { + this._name = i; + return this; + } + end(i) { + if (!this._endTime) { + this._endTime = Iq(i); + cUn(this); + this._onSpanEnded(); + } + } + getSpanJSON() { + return N0({ + data: this._attributes, + description: this._name, + op: this._attributes[EB], + parent_span_id: this._parentSpanId, + span_id: this._spanId, + start_timestamp: this._startTime, + status: nVi(this._status), + timestamp: this._endTime, + trace_id: this._traceId, + origin: this._attributes[kw], + _metrics_summary: j_t(this), + profile_id: this._attributes[eVi], + exclusive_time: this._attributes[jst], + measurements: hVi(this._events), + is_segment: this._isStandaloneSpan && Ew(this) === this || undefined, + segment_id: this._isStandaloneSpan ? Ew(this).spanContext().spanId : undefined + }); + } + isRecording() { + return !this._endTime && !!this._sampled; + } + addEvent(i, e, t) { + if (Jc) { + tr.log("[Tracing] Adding an event to span:", i); + } + const s = gVi(e) ? e : t || Hb(); + const n = gVi(e) ? {} : e || {}; + const r = { + name: i, + time: Iq(s), + attributes: n + }; + this._events.push(r); + return this; + } + isStandaloneSpan() { + return !!this._isStandaloneSpan; + } + _onSpanEnded() { + const i = ru(); + if (i) { + i.emit("spanEnd", this); + } + if (!this._isStandaloneSpan && this !== Ew(this)) { + return; + } + if (this._isStandaloneSpan) { + if (this._sampled) { + mUn(gUn([this], i)); + } else { + if (Jc) { + tr.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."); + } + if (i) { + i.recordDroppedEvent("sample_rate", "span"); + } + } + return; + } + const t = this._convertSpanToTransaction(); + if (t) { + (aVi(this).scope || ju()).captureEvent(t); + } + } + _convertSpanToTransaction() { + if (!pVi(ed(this))) { + return; + } + if (!this._name) { + if (Jc) { + tr.warn("Transaction has no name, falling back to ``."); + } + this._name = ""; + } + const { + scope: i, + isolationScope: e + } = aVi(this); + const s = (i || ju()).getClient() || ru(); + if (this._sampled !== true) { + if (Jc) { + tr.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."); + } + if (s) { + s.recordDroppedEvent("sample_rate", "transaction"); + } + return; + } + const r = _he(this).filter(u => u !== this && !pUn(u)).map(u => ed(u)).filter(pVi); + const o = this._attributes[N2]; + const a = { + contexts: { + trace: Q7n(this) + }, + spans: r.length > uBt ? r.sort((u, d) => u.start_timestamp - d.start_timestamp).slice(0, uBt) : r, + start_timestamp: this._startTime, + timestamp: this._endTime, + transaction: this._name, + type: "transaction", + sdkProcessingMetadata: { + capturedSpanScope: i, + capturedSpanIsolationScope: e, + ...N0({ + dynamicSamplingContext: K3(this) + }) + }, + _metrics_summary: j_t(this), + ...(o && { + transaction_info: { + source: o + } + }) + }; + const l = hVi(this._events); + if (l && Object.keys(l).length) { + if (Jc) { + tr.log("[Measurements] Adding measurements to transaction event", JSON.stringify(l, undefined, 2)); + } + a.measurements = l; + } + return a; + } + }; + } +}); +function bUn(i, e) { + const t = Whe(); + if (t.startSpan) { + return t.startSpan(i, e); + } + const s = fBt(i); + const { + forceTransaction: n, + parentSpan: r + } = i; + return CL(i.scope, () => vVi(r)(() => { + const a = ju(); + const l = gBt(a); + const u = i.onlyIfParent && !l ? new DB() : hBt({ + parentSpan: l, + spanArguments: s, + forceTransaction: n, + scope: a + }); + Eq(a, u); + return nBt(() => e(u), () => { + const { + status: d + } = ed(u); + if (u.isRecording() && (!d || d === "ok")) { + u.setStatus({ + code: Ty, + message: "internal_error" + }); + } + }, () => u.end()); + })); +} +function dBt(i, e) { + const t = Whe(); + if (t.startSpanManual) { + return t.startSpanManual(i, e); + } + const s = fBt(i); + const { + forceTransaction: n, + parentSpan: r + } = i; + return CL(i.scope, () => vVi(r)(() => { + const a = ju(); + const l = gBt(a); + const u = i.onlyIfParent && !l ? new DB() : hBt({ + parentSpan: l, + spanArguments: s, + forceTransaction: n, + scope: a + }); + Eq(a, u); + function d() { + u.end(); + } + return nBt(() => e(u, d), () => { + const { + status: h + } = ed(u); + if (u.isRecording() && (!h || h === "ok")) { + u.setStatus({ + code: Ty, + message: "internal_error" + }); + } + }); + })); +} +function TB(i) { + const e = Whe(); + if (e.startInactiveSpan) { + return e.startInactiveSpan(i); + } + const t = fBt(i); + const { + forceTransaction: s, + parentSpan: n + } = i; + return (i.scope ? o => CL(i.scope, o) : n !== undefined ? o => Uhe(n, o) : o => o())(() => { + const o = ju(); + const a = gBt(o); + if (i.onlyIfParent && !a) { + return new DB(); + } else { + return hBt({ + parentSpan: a, + spanArguments: t, + forceTransaction: s, + scope: o + }); + } + }); +} +function Uhe(i, e) { + const t = Whe(); + if (t.withActiveSpan) { + return t.withActiveSpan(i, e); + } else { + return CL(s => { + Eq(s, i || undefined); + return e(s); + }); + } +} +function vUn(i) { + const e = Whe(); + if (e.suppressTracing) { + return e.suppressTracing(i); + } else { + return CL(t => { + t.setSDKProcessingMetadata({ + [Xst]: true + }); + return i(); + }); + } +} +function yUn(i) { + return CL(e => { + e.setPropagationContext(Rhe()); + if (Jc) { + tr.info(`Starting a new trace with id ${e.getPropagationContext().traceId}`); + } + return Uhe(null, i); + }); +} +function hBt({ + parentSpan: i, + spanArguments: e, + forceTransaction: t, + scope: s +}) { + if (!IB()) { + return new DB(); + } + const n = gm(); + let r; + if (i && !t) { + r = wUn(i, s, e); + rVi(i, r); + } else if (i) { + const o = K3(i); + const { + traceId: a, + spanId: l + } = i.spanContext(); + const c = Dq(i); + r = bVi({ + traceId: a, + parentSpanId: l, + ...e + }, s, c); + lVi(r, o); + } else { + const { + traceId: o, + dsc: a, + parentSpanId: l, + sampled: c + } = { + ...n.getPropagationContext(), + ...s.getPropagationContext() + }; + r = bVi({ + traceId: o, + parentSpanId: l, + ...e + }, s, c); + if (a) { + lVi(r, a); + } + } + lUn(r); + sUn(r, s, n); + return r; +} +function fBt(i) { + const t = { + isStandalone: (i.experimental || {}).standalone, + ...i + }; + if (i.startTime) { + const s = { + ...t + }; + s.startTimestamp = Iq(i.startTime); + delete s.startTime; + return s; + } + return t; +} +function Whe() { + const i = xq(); + return bZ(i); +} +function bVi(i, e, t) { + const s = ru(); + const n = s && s.getOptions() || {}; + const { + name: r = "", + attributes: o + } = i; + const [a, l] = e.getScopeData().sdkProcessingMetadata[Xst] ? [false] : uUn(n, { + name: r, + parentSampled: t, + attributes: o, + transactionContext: { + name: r, + parentSampled: t + } + }); + const c = new Yst({ + ...i, + attributes: { + [N2]: "custom", + ...i.attributes + }, + sampled: a + }); + if (l !== undefined) { + c.setAttribute($he, l); + } + if (s) { + s.emit("spanStart", c); + } + return c; +} +function wUn(i, e, t) { + const { + spanId: s, + traceId: n + } = i.spanContext(); + const r = e.getScopeData().sdkProcessingMetadata[Xst] ? false : Dq(i); + const o = r ? new Yst({ + ...t, + parentSpanId: s, + traceId: n, + sampled: r + }) : new DB({ + traceId: n + }); + rVi(i, o); + const a = ru(); + if (a) { + a.emit("spanStart", o); + if (t.endTimestamp) { + a.emit("spanEnd", o); + } + } + return o; +} +function gBt(i) { + const e = Vst(i); + if (!e) { + return; + } + const t = ru(); + if ((t ? t.getOptions() : {}).parentSpanIsAlwaysRootSpan) { + return Ew(e); + } else { + return e; + } +} +function vVi(i) { + if (i !== undefined) { + return e => Uhe(i, e); + } else { + return e => e(); + } +} +var Xst; +var yVi; +var wVi = ue({ + "out-build/external/sentry/core/tracing/trace.js"() { + "use strict"; + + qr(); + kq(); + ub(); + Ahe(); + xw(); + M2(); + rBt(); + yZ(); + Nhe(); + KS(); + wZ(); + aBt(); + uVi(); + Jst(); + mVi(); + vZ(); + sBt(); + Xst = "__SENTRY_SUPPRESS_TRACING__"; + yVi = ({ + sentryTrace: i, + baggage: e + }, t) => CL(s => { + const n = _Wi(i, e); + s.setPropagationContext(n); + return t(); + }); + } +}); +function CVi(i, e = {}) { + const t = new Map(); + let s = false; + let n; + let r; + let o = EVi; + let a = !e.disableAutoFinish; + const l = []; + const { + idleTimeout: c = Vhe.idleTimeout, + finalTimeout: u = Vhe.finalTimeout, + childSpanTimeout: d = Vhe.childSpanTimeout, + beforeSpanEnd: h + } = e; + const g = ru(); + if (!g || !IB()) { + return new DB(); + } + const p = ju(); + const b = WC(); + const v = CUn(i); + v.end = new Proxy(v.end, { + apply(D, P, R) { + if (h) { + h(v); + } + const [L, ...F] = R; + const O = L || Hb(); + const U = Iq(O); + const j = _he(v).filter(ge => ge !== v); + if (!j.length) { + E(U); + return Reflect.apply(D, P, [U, ...F]); + } + const ie = j.map(ge => ed(ge).timestamp).filter(ge => !!ge); + const ee = ie.length ? Math.max(...ie) : undefined; + const ne = ed(v).start_timestamp; + const be = Math.min(ne ? ne + u / 1000 : Infinity, Math.max(ne || -Infinity, Math.min(U, ee || Infinity))); + E(be); + return Reflect.apply(D, P, [be, ...F]); + } + }); + function y() { + if (n) { + clearTimeout(n); + n = undefined; + } + } + function w() { + if (r) { + clearTimeout(r); + r = undefined; + } + } + function C(D) { + y(); + n = setTimeout(() => { + if (!s && t.size === 0 && a) { + o = xVi; + v.end(D); + } + }, c); + } + function S(D) { + w(); + n = setTimeout(() => { + if (!s && a) { + o = SVi; + v.end(D); + } + }, d); + } + function x(D) { + y(); + t.set(D, true); + const P = Hb(); + S(P + d / 1000); + } + function k(D) { + if (t.has(D)) { + t.delete(D); + } + if (t.size === 0) { + const P = Hb(); + C(P + c / 1000); + w(); + } + } + function E(D) { + s = true; + t.clear(); + l.forEach(U => U()); + Eq(p, b); + const P = ed(v); + const { + start_timestamp: R + } = P; + if (!R) { + return; + } + if (!(P.data || {})[qst]) { + v.setAttribute(qst, o); + } + tr.log(`[Tracing] Idle span "${P.op}" finished`); + const F = _he(v).filter(U => U !== v); + let O = 0; + F.forEach(U => { + if (U.isRecording()) { + U.setStatus({ + code: Ty, + message: "cancelled" + }); + U.end(D); + if (Jc) { + tr.log("[Tracing] Cancelling span since span ended early", JSON.stringify(U, undefined, 2)); + } + } + const j = ed(U); + const { + timestamp: ie = 0, + start_timestamp: ee = 0 + } = j; + const ne = ee <= D; + const be = (u + c) / 1000; + const ge = ie - ee <= be; + if (Jc) { + const ce = JSON.stringify(U, undefined, 2); + if (ne) { + if (!ge) { + tr.log("[Tracing] Discarding span since it finished after idle span final timeout", ce); + } + } else { + tr.log("[Tracing] Discarding span since it happened after idle span was finished", ce); + } + } + if (!ge || !ne) { + iUn(v, U); + O++; + } + }); + if (O > 0) { + v.setAttribute("sentry.idle_span_discarded_spans", O); + } + } + l.push(g.on("spanStart", D => { + if (s || D === v || ed(D).timestamp) { + return; + } + if (_he(v).includes(D)) { + x(D.spanContext().spanId); + } + })); + l.push(g.on("spanEnd", D => { + if (!s) { + k(D.spanContext().spanId); + } + })); + l.push(g.on("idleSpanEnableAutoFinish", D => { + if (D === v) { + a = true; + C(); + if (t.size) { + S(); + } + } + })); + if (!e.disableAutoFinish) { + C(); + } + setTimeout(() => { + if (!s) { + v.setStatus({ + code: Ty, + message: "deadline_exceeded" + }); + o = kVi; + v.end(); + } + }, u); + return v; +} +function CUn(i) { + const e = TB(i); + Eq(ju(), e); + if (Jc) { + tr.log("[Tracing] Started span is an idle span"); + } + return e; +} +var Vhe; +var SVi; +var xVi; +var kVi; +var EVi; +var SUn = ue({ + "out-build/external/sentry/core/tracing/idleSpan.js"() { + "use strict"; + + qr(); + ub(); + xw(); + M2(); + yZ(); + Nhe(); + KS(); + Jst(); + vZ(); + wVi(); + Vhe = { + idleTimeout: 1000, + finalTimeout: 30000, + childSpanTimeout: 15000 + }; + SVi = "heartbeatFailed"; + xVi = "idleTimeout"; + kVi = "finalTimeout"; + EVi = "externalFinish"; + } +}); +var CZ = ue({ + "out-build/external/sentry/core/tracing/index.js"() { + "use strict"; + + oVi(); + sBt(); + rUn(); + SUn(); + mVi(); + Jst(); + vZ(); + vZ(); + wVi(); + wZ(); + fVi(); + uVi(); + aBt(); + } +}); +function pBt(i, e, t, s = 0) { + return new fZ((n, r) => { + const o = i[s]; + if (e === null || typeof o != "function") { + n(e); + } else { + const a = o({ + ...e + }, t); + if (Jc && o.id && a === null) { + tr.log(`Event processor "${o.id}" dropped event`); + } + if (bhe(a)) { + a.then(l => pBt(i, l, t, s + 1).then(n)).then(null, r); + } else { + pBt(i, a, t, s + 1).then(n).then(null, r); + } + } + }); +} +var IVi = ue({ + "out-build/external/sentry/core/eventProcessors.js"() { + "use strict"; + + qr(); + xw(); + } +}); +function xUn(i, e) { + const { + fingerprint: t, + span: s, + breadcrumbs: n, + sdkProcessingMetadata: r + } = e; + kUn(i, e); + if (s) { + DUn(i, s); + } + TUn(i, t); + EUn(i, n); + IUn(i, r); +} +function mBt(i, e) { + const { + extra: t, + tags: s, + user: n, + contexts: r, + level: o, + sdkProcessingMetadata: a, + breadcrumbs: l, + fingerprint: c, + eventProcessors: u, + attachments: d, + propagationContext: h, + transactionName: g, + span: p + } = e; + Hhe(i, "extra", t); + Hhe(i, "tags", s); + Hhe(i, "user", n); + Hhe(i, "contexts", r); + Hhe(i, "sdkProcessingMetadata", a); + if (o) { + i.level = o; + } + if (g) { + i.transactionName = g; + } + if (p) { + i.span = p; + } + if (l.length) { + i.breadcrumbs = [...i.breadcrumbs, ...l]; + } + if (c.length) { + i.fingerprint = [...i.fingerprint, ...c]; + } + if (u.length) { + i.eventProcessors = [...i.eventProcessors, ...u]; + } + if (d.length) { + i.attachments = [...i.attachments, ...d]; + } + i.propagationContext = { + ...i.propagationContext, + ...h + }; +} +function Hhe(i, e, t) { + if (t && Object.keys(t).length) { + i[e] = { + ...i[e] + }; + for (const s in t) { + if (Object.prototype.hasOwnProperty.call(t, s)) { + i[e][s] = t[s]; + } + } + } +} +function kUn(i, e) { + const { + extra: t, + tags: s, + user: n, + contexts: r, + level: o, + transactionName: a + } = e; + const l = N0(t); + if (l && Object.keys(l).length) { + i.extra = { + ...l, + ...i.extra + }; + } + const c = N0(s); + if (c && Object.keys(c).length) { + i.tags = { + ...c, + ...i.tags + }; + } + const u = N0(n); + if (u && Object.keys(u).length) { + i.user = { + ...u, + ...i.user + }; + } + const d = N0(r); + if (d && Object.keys(d).length) { + i.contexts = { + ...d, + ...i.contexts + }; + } + if (o) { + i.level = o; + } + if (a && i.type !== "transaction") { + i.transaction = a; + } +} +function EUn(i, e) { + const t = [...(i.breadcrumbs || []), ...e]; + i.breadcrumbs = t.length ? t : undefined; +} +function IUn(i, e) { + i.sdkProcessingMetadata = { + ...i.sdkProcessingMetadata, + ...e + }; +} +function DUn(i, e) { + i.contexts = { + trace: Z7n(e), + ...i.contexts + }; + i.sdkProcessingMetadata = { + dynamicSamplingContext: K3(e), + ...i.sdkProcessingMetadata + }; + const t = Ew(e); + const s = ed(t).description; + if (s && !i.transaction && i.type === "transaction") { + i.transaction = s; + } +} +function TUn(i, e) { + i.fingerprint = i.fingerprint ? pWi(i.fingerprint) : []; + if (e) { + i.fingerprint = i.fingerprint.concat(e); + } + if (i.fingerprint && !i.fingerprint.length) { + delete i.fingerprint; + } +} +var DVi = ue({ + "out-build/external/sentry/core/utils/applyScopeDataToEvent.js"() { + "use strict"; + + qr(); + wZ(); + KS(); + } +}); +function PUn(i, e, t, s, n, r) { + const { + normalizeDepth: o = 3, + normalizeMaxBreadth: a = 1000 + } = i; + const l = { + ...e, + event_id: e.event_id || t.event_id || Vp(), + timestamp: e.timestamp || Ihe() + }; + const c = t.integrations || i.integrations.map(v => v.name); + LUn(l, i); + MUn(l, c); + if (n) { + n.emit("applyFrameMetadata", e); + } + if (e.type === undefined) { + RUn(l, i.stackParser); + } + const u = $Un(s, t.captureContext); + if (t.mechanism) { + yq(l, t.mechanism); + } + const d = n ? n.getEventProcessors() : []; + const h = QWi().getScopeData(); + if (r) { + const v = r.getScopeData(); + mBt(h, v); + } + if (u) { + const v = u.getScopeData(); + mBt(h, v); + } + const g = [...(t.attachments || []), ...h.attachments]; + if (g.length) { + t.attachments = g; + } + xUn(l, h); + const p = [...d, ...h.eventProcessors]; + return pBt(p, l, t).then(v => { + if (v) { + NUn(v); + } + if (typeof o == "number" && o > 0) { + return AUn(v, o, a); + } else { + return v; + } + }); +} +function LUn(i, e) { + const { + environment: t, + release: s, + dist: n, + maxValueLength: r = 250 + } = e; + if (!("environment" in i)) { + i.environment = "environment" in e ? t : Bhe; + } + if (i.release === undefined && s !== undefined) { + i.release = s; + } + if (i.dist === undefined && n !== undefined) { + i.dist = n; + } + i.message &&= W3(i.message, r); + const o = i.exception && i.exception.values && i.exception.values[0]; + if (o && o.value) { + o.value = W3(o.value, r); + } + const a = i.request; + if (a && a.url) { + a.url = W3(a.url, r); + } +} +function RUn(i, e) { + const t = Bu._sentryDebugIds; + if (!t) { + return; + } + let s; + const n = bBt.get(e); + if (n) { + s = n; + } else { + s = new Map(); + bBt.set(e, s); + } + const r = Object.entries(t).reduce((o, [a, l]) => { + let c; + const u = s.get(a); + if (u) { + c = u; + } else { + c = e(a); + s.set(a, c); + } + for (let d = c.length - 1; d >= 0; d--) { + const h = c[d]; + if (h.filename) { + o[h.filename] = l; + break; + } + } + return o; + }, {}); + try { + i.exception.values.forEach(o => { + o.stacktrace.frames.forEach(a => { + if (a.filename) { + a.debug_id = r[a.filename]; + } + }); + }); + } catch {} +} +function NUn(i) { + const e = {}; + try { + i.exception.values.forEach(s => { + s.stacktrace.frames.forEach(n => { + if (n.debug_id) { + if (n.abs_path) { + e[n.abs_path] = n.debug_id; + } else if (n.filename) { + e[n.filename] = n.debug_id; + } + delete n.debug_id; + } + }); + }); + } catch {} + if (Object.keys(e).length === 0) { + return; + } + i.debug_meta = i.debug_meta || {}; + i.debug_meta.images = i.debug_meta.images || []; + const t = i.debug_meta.images; + Object.entries(e).forEach(([s, n]) => { + t.push({ + type: "sourcemap", + code_file: s, + debug_id: n + }); + }); +} +function MUn(i, e) { + if (e.length > 0) { + i.sdk = i.sdk || {}; + i.sdk.integrations = [...(i.sdk.integrations || []), ...e]; + } +} +function AUn(i, e, t) { + if (!i) { + return null; + } + const s = { + ...i, + ...(i.breadcrumbs && { + breadcrumbs: i.breadcrumbs.map(n => ({ + ...n, + ...(n.data && { + data: rM(n.data, e, t) + }) + })) + }), + ...(i.user && { + user: rM(i.user, e, t) + }), + ...(i.contexts && { + contexts: rM(i.contexts, e, t) + }), + ...(i.extra && { + extra: rM(i.extra, e, t) + }) + }; + if (i.contexts && i.contexts.trace && s.contexts) { + s.contexts.trace = i.contexts.trace; + if (i.contexts.trace.data) { + s.contexts.trace.data = rM(i.contexts.trace.data, e, t); + } + } + if (i.spans) { + s.spans = i.spans.map(n => ({ + ...n, + ...(n.data && { + data: rM(n.data, e, t) + }) + })); + } + return s; +} +function $Un(i, e) { + if (!e) { + return i; + } + const t = i ? i.clone() : new R2(); + t.update(e); + return t; +} +function FUn(i) { + if (i) { + if (OUn(i)) { + return { + captureContext: i + }; + } else if (_Un(i)) { + return { + captureContext: i + }; + } else { + return i; + } + } +} +function OUn(i) { + return i instanceof R2 || typeof i == "function"; +} +function _Un(i) { + return Object.keys(i).some(e => TVi.includes(e)); +} +var bBt; +var TVi; +var vBt = ue({ + "out-build/external/sentry/core/utils/prepareEvent.js"() { + "use strict"; + + qr(); + Gst(); + ub(); + IVi(); + Mhe(); + DVi(); + bBt = new WeakMap(); + TVi = ["user", "level", "extra", "contexts", "tags", "fingerprint", "requestSession", "propagationContext"]; + } +}); +function yBt(i, e) { + return ju().captureException(i, FUn(e)); +} +function Qst(i, e) { + const t = typeof e == "string" ? e : undefined; + const s = typeof e != "string" ? { + captureContext: e + } : undefined; + return ju().captureMessage(i, t, s); +} +function SZ(i, e) { + return ju().captureEvent(i, e); +} +function PVi(i, e) { + gm().setContext(i, e); +} +function LVi(i) { + gm().setExtras(i); +} +function RVi(i, e) { + gm().setExtra(i, e); +} +function NVi(i) { + gm().setTags(i); +} +function MVi(i, e) { + gm().setTag(i, e); +} +function AVi(i) { + gm().setUser(i); +} +function $Vi() { + return gm().lastEventId(); +} +function BUn() { + return !!ru(); +} +function UUn(i) { + gm().addEventProcessor(i); +} +function Zst(i) { + const e = ru(); + const t = gm(); + const s = ju(); + const { + release: n, + environment: r = Bhe + } = e && e.getOptions() || {}; + const { + userAgent: o + } = Bu.navigator || {}; + const a = V7n({ + release: n, + environment: r, + user: s.getUser() || t.getUser(), + ...(o && { + userAgent: o + }), + ...i + }); + const l = t.getSession(); + if (l && l.status === "ok") { + pZ(l, { + status: "exited" + }); + } + qhe(); + t.setSession(a); + s.setSession(a); + return a; +} +function qhe() { + const i = gm(); + const e = ju(); + const t = e.getSession() || i.getSession(); + if (t) { + H7n(t); + } + FVi(); + i.setSession(); + e.setSession(); +} +function FVi() { + const i = gm(); + const e = ju(); + const t = ru(); + const s = e.getSession() || i.getSession(); + if (s && t) { + t.captureSession(s); + } +} +function wBt(i = false) { + if (i) { + qhe(); + return; + } + FVi(); +} +var jhe = ue({ + "out-build/external/sentry/core/exports.js"() { + "use strict"; + + qr(); + Gst(); + ub(); + xw(); + Wst(); + vBt(); + } +}); +var OVi = ue({ + "out-build/external/sentry/core/sessionflusher.js"() { + "use strict"; + + qr(); + ub(); + } +}); +function _Vi(i) { + const e = i.protocol ? `${i.protocol}:` : ""; + const t = i.port ? `:${i.port}` : ""; + return `${e}//${i.host}${t}${i.path ? `/${i.path}` : ""}/api/`; +} +function WUn(i) { + return `${_Vi(i)}${i.projectId}/envelope/`; +} +function VUn(i, e) { + return v9n({ + sentry_key: i.publicKey, + sentry_version: BVi, + ...(e && { + sentry_client: `${e.name}/${e.version}` + }) + }); +} +function HUn(i, e, t) { + return e || `${WUn(i)}?${VUn(i, t)}`; +} +function qUn(i, e) { + const t = JUi(i); + if (!t) { + return ""; + } + const s = `${_Vi(t)}embed/error-page/`; + let n = `dsn=${hZ(t)}`; + for (const r in e) { + if (r !== "dsn" && r !== "onClose") { + if (r === "user") { + const o = e.user; + if (!o) { + continue; + } + if (o.name) { + n += `&name=${encodeURIComponent(o.name)}`; + } + if (o.email) { + n += `&email=${encodeURIComponent(o.email)}`; + } + } else { + n += `&${encodeURIComponent(r)}=${encodeURIComponent(e[r])}`; + } + } + } + return `${s}?${n}`; +} +var BVi; +var CBt = ue({ + "out-build/external/sentry/core/api.js"() { + "use strict"; + + qr(); + BVi = "7"; + } +}); +function jUn(i) { + const e = {}; + i.forEach(t => { + const { + name: s + } = t; + const n = e[s]; + if (!n || !!n.isDefaultInstance || !t.isDefaultInstance) { + e[s] = t; + } + }); + return Object.values(e); +} +function zUn(i) { + const e = i.defaultIntegrations || []; + const t = i.integrations; + e.forEach(o => { + o.isDefaultInstance = true; + }); + let s; + if (Array.isArray(t)) { + s = [...e, ...t]; + } else if (typeof t == "function") { + s = pWi(t(e)); + } else { + s = e; + } + const n = jUn(s); + const r = n.findIndex(o => o.name === "Debug"); + if (r > -1) { + const [o] = n.splice(r, 1); + n.push(o); + } + return n; +} +function JUn(i, e) { + const t = {}; + e.forEach(s => { + if (s) { + WVi(i, s, t); + } + }); + return t; +} +function UVi(i, e) { + for (const t of e) { + if (t && t.afterAllSetup) { + t.afterAllSetup(i); + } + } +} +function WVi(i, e, t) { + if (t[e.name]) { + if (Jc) { + tr.log(`Integration skipped because it was already installed: ${e.name}`); + } + return; + } + t[e.name] = e; + if (SBt.indexOf(e.name) === -1 && typeof e.setupOnce == "function") { + e.setupOnce(); + SBt.push(e.name); + } + if (e.setup && typeof e.setup == "function") { + e.setup(i); + } + if (typeof e.preprocessEvent == "function") { + const s = e.preprocessEvent.bind(e); + i.on("preprocessEvent", (n, r) => s(n, r, i)); + } + if (typeof e.processEvent == "function") { + const s = e.processEvent.bind(e); + const n = Object.assign((r, o) => s(r, o, i), { + id: e.name + }); + i.addEventProcessor(n); + } + if (Jc) { + tr.log(`Integration installed: ${e.name}`); + } +} +function GUn(i) { + const e = ru(); + if (!e) { + if (Jc) { + tr.warn(`Cannot add integration "${i.name}" because no SDK Client is available.`); + } + return; + } + e.addIntegration(i); +} +function vta(i) { + return i; +} +var SBt; +var lx = ue({ + "out-build/external/sentry/core/integration.js"() { + "use strict"; + + qr(); + ub(); + xw(); + SBt = []; + } +}); +function KUn(i, e) { + const t = `${e} must return \`null\` or a valid event.`; + if (bhe(i)) { + return i.then(s => { + if (!U3(s) && s !== null) { + throw new yL(t); + } + return s; + }, s => { + throw new yL(`${e} rejected with ${s}`); + }); + } + if (!U3(i) && i !== null) { + throw new yL(t); + } + return i; +} +function YUn(i, e, t, s) { + const { + beforeSend: n, + beforeSendTransaction: r, + beforeSendSpan: o + } = e; + if (VVi(t) && n) { + return n(t, s); + } + if (HVi(t)) { + if (t.spans && o) { + const a = []; + for (const l of t.spans) { + const c = o(l); + if (c) { + a.push(c); + } else { + i.recordDroppedEvent("before_send", "span"); + } + } + t.spans = a; + } + if (r) { + if (t.spans) { + const a = t.spans.length; + t.sdkProcessingMetadata = { + ...t.sdkProcessingMetadata, + spanCountBeforeProcessing: a + }; + } + return r(t, s); + } + } + return t; +} +function VVi(i) { + return i.type === undefined; +} +function HVi(i) { + return i.type === "transaction"; +} +var xBt; +var qVi; +var jVi = ue({ + "out-build/external/sentry/core/baseclient.js"() { + "use strict"; + + qr(); + CBt(); + ub(); + xw(); + cBt(); + lx(); + lx(); + Wst(); + wZ(); + lBt(); + vBt(); + xBt = "Not capturing exception because it's already been captured."; + qVi = class { + constructor(i) { + this._options = i; + this._integrations = {}; + this._numProcessing = 0; + this._outcomes = {}; + this._hooks = {}; + this._eventProcessors = []; + if (i.dsn) { + this._dsn = JUi(i.dsn); + } else if (Jc) { + tr.warn("No DSN provided, client will not send events."); + } + if (this._dsn) { + const e = HUn(this._dsn, i.tunnel, i._metadata ? i._metadata.sdk : undefined); + this._transport = i.transport({ + tunnel: this._options.tunnel, + recordDroppedEvent: this.recordDroppedEvent.bind(this), + ...i.transportOptions, + url: e + }); + } + } + captureException(i, e, t) { + const s = Vp(); + if (gWi(i)) { + if (Jc) { + tr.log(xBt); + } + return s; + } + const n = { + event_id: s, + ...e + }; + this._process(this.eventFromException(i, n).then(r => this._captureEvent(r, n, t))); + return n.event_id; + } + captureMessage(i, e, t, s) { + const n = { + event_id: Vp(), + ...t + }; + const r = v_t(i) ? i : String(i); + const o = y_t(i) ? this.eventFromMessage(r, e, n) : this.eventFromException(i, n); + this._process(o.then(a => this._captureEvent(a, n, s))); + return n.event_id; + } + captureEvent(i, e, t) { + const s = Vp(); + if (e && e.originalException && gWi(e.originalException)) { + if (Jc) { + tr.log(xBt); + } + return s; + } + const n = { + event_id: s, + ...e + }; + const o = (i.sdkProcessingMetadata || {}).capturedSpanScope; + this._process(this._captureEvent(i, n, o || t)); + return n.event_id; + } + captureSession(i) { + if (typeof i.release != "string") { + if (Jc) { + tr.warn("Discarded session because of missing or non-string release"); + } + } else { + this.sendSession(i); + pZ(i, { + init: false + }); + } + } + getDsn() { + return this._dsn; + } + getOptions() { + return this._options; + } + getSdkMetadata() { + return this._options._metadata; + } + getTransport() { + return this._transport; + } + flush(i) { + const e = this._transport; + if (e) { + this.emit("flush"); + return this._isClientDoneProcessing(i).then(t => e.flush(i).then(s => t && s)); + } else { + return wq(true); + } + } + close(i) { + return this.flush(i).then(e => { + this.getOptions().enabled = false; + this.emit("close"); + return e; + }); + } + getEventProcessors() { + return this._eventProcessors; + } + addEventProcessor(i) { + this._eventProcessors.push(i); + } + init() { + if (this._isEnabled() || this._options.integrations.some(({ + name: i + }) => i.startsWith("Spotlight"))) { + this._setupIntegrations(); + } + } + getIntegrationByName(i) { + return this._integrations[i]; + } + addIntegration(i) { + const e = this._integrations[i.name]; + WVi(this, i, this._integrations); + if (!e) { + UVi(this, [i]); + } + } + sendEvent(i, e = {}) { + this.emit("beforeSendEvent", i, e); + let t = fUn(i, this._dsn, this._options._metadata, this._options.tunnel); + for (const n of e.attachments || []) { + t = b7n(t, C7n(n)); + } + const s = this.sendEnvelope(t); + if (s) { + s.then(n => this.emit("afterSendEvent", i, n), null); + } + } + sendSession(i) { + const e = hUn(i, this._dsn, this._options._metadata, this._options.tunnel); + this.sendEnvelope(e); + } + recordDroppedEvent(i, e, t) { + if (this._options.sendClientReports) { + const s = typeof t == "number" ? t : 1; + const n = `${i}:${e}`; + if (Jc) { + tr.log(`Recording outcome: "${n}"${s > 1 ? ` (${s} times)` : ""}`); + } + this._outcomes[n] = (this._outcomes[n] || 0) + s; + } + } + on(i, e) { + const t = this._hooks[i] = this._hooks[i] || []; + t.push(e); + return () => { + const s = t.indexOf(e); + if (s > -1) { + t.splice(s, 1); + } + }; + } + emit(i, ...e) { + const t = this._hooks[i]; + if (t) { + t.forEach(s => s(...e)); + } + } + sendEnvelope(i) { + this.emit("beforeEnvelope", i); + if (this._isEnabled() && this._transport) { + return this._transport.send(i).then(null, e => { + if (Jc) { + tr.error("Error while sending event:", e); + } + return e; + }); + } else { + if (Jc) { + tr.error("Transport disabled"); + } + return wq({}); + } + } + _setupIntegrations() { + const { + integrations: i + } = this._options; + this._integrations = JUn(this, i); + UVi(this, i); + } + _updateSessionFromEvent(i, e) { + let t = false; + let s = false; + const n = e.exception && e.exception.values; + if (n) { + s = true; + for (const a of n) { + const l = a.mechanism; + if (l && l.handled === false) { + t = true; + break; + } + } + } + const r = i.status === "ok"; + if (r && i.errors === 0 || r && t) { + pZ(i, { + ...(t && { + status: "crashed" + }), + errors: i.errors || Number(s || t) + }); + this.captureSession(i); + } + } + _isClientDoneProcessing(i) { + return new fZ(e => { + let t = 0; + const s = 1; + const n = setInterval(() => { + if (this._numProcessing == 0) { + clearInterval(n); + e(true); + } else { + t += s; + if (i && t >= i) { + clearInterval(n); + e(false); + } + } + }, s); + }); + } + _isEnabled() { + return this.getOptions().enabled !== false && this._transport !== undefined; + } + _prepareEvent(i, e, t, s = gm()) { + const n = this.getOptions(); + const r = Object.keys(this._integrations); + if (!e.integrations && r.length > 0) { + e.integrations = r; + } + this.emit("preprocessEvent", i, e); + if (!i.type) { + s.setLastEventId(i.event_id || e.event_id); + } + return PUn(n, i, e, t, this, s).then(o => { + if (o === null) { + return o; + } + const a = { + ...s.getPropagationContext(), + ...(t ? t.getPropagationContext() : undefined) + }; + if ((!o.contexts || !o.contexts.trace) && a) { + const { + traceId: c, + spanId: u, + parentSpanId: d, + dsc: h + } = a; + o.contexts = { + trace: N0({ + trace_id: c, + span_id: u, + parent_span_id: d + }), + ...o.contexts + }; + const g = h || Kst(c, this); + o.sdkProcessingMetadata = { + dynamicSamplingContext: g, + ...o.sdkProcessingMetadata + }; + } + return o; + }); + } + _captureEvent(i, e = {}, t) { + return this._processEvent(i, e, t).then(s => s.event_id, s => { + if (Jc) { + const n = s; + if (n.logLevel === "log") { + tr.log(n.message); + } else { + tr.warn(n); + } + } + }); + } + _processEvent(i, e, t) { + const s = this.getOptions(); + const { + sampleRate: n + } = s; + const r = HVi(i); + const o = VVi(i); + const a = i.type || "error"; + const l = `before send for type \`${a}\``; + const c = typeof n === "undefined" ? undefined : cVi(n); + if (o && typeof c == "number" && Math.random() > c) { + this.recordDroppedEvent("sample_rate", "error", i); + return Bst(new yL(`Discarding event because it's not included in the random sample (sampling rate = ${n})`, "log")); + } + const u = a === "replay_event" ? "replay" : a; + const h = (i.sdkProcessingMetadata || {}).capturedSpanIsolationScope; + return this._prepareEvent(i, e, t, h).then(g => { + if (g === null) { + this.recordDroppedEvent("event_processor", u, i); + throw new yL("An event processor returned `null`, will not send event.", "log"); + } + if (e.data && e.data.__sentry__ === true) { + return g; + } + const b = YUn(this, s, g, e); + return KUn(b, l); + }).then(g => { + if (g === null) { + this.recordDroppedEvent("before_send", u, i); + if (r) { + const y = 1 + (i.spans || []).length; + this.recordDroppedEvent("before_send", "span", y); + } + throw new yL(`${l} returned \`null\`, will not send event.`, "log"); + } + const p = t && t.getSession(); + if (!r && p) { + this._updateSessionFromEvent(p, g); + } + if (r) { + const v = g.sdkProcessingMetadata && g.sdkProcessingMetadata.spanCountBeforeProcessing || 0; + const y = g.spans ? g.spans.length : 0; + const w = v - y; + if (w > 0) { + this.recordDroppedEvent("before_send", "span", w); + } + } + const b = g.transaction_info; + if (r && b && g.transaction !== i.transaction) { + const v = "custom"; + g.transaction_info = { + ...b, + source: v + }; + } + this.sendEvent(g, e); + return g; + }).then(null, g => { + throw g instanceof yL ? g : (this.captureException(g, { + data: { + __sentry__: true + }, + originalException: g + }), new yL(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event. +Reason: ${g}`)); + }); + } + _process(i) { + this._numProcessing++; + i.then(e => { + this._numProcessing--; + return e; + }, e => { + this._numProcessing--; + return e; + }); + } + _clearOutcomes() { + const i = this._outcomes; + this._outcomes = {}; + return Object.entries(i).map(([e, t]) => { + const [s, n] = e.split(":"); + return { + reason: s, + category: n, + quantity: t + }; + }); + } + _flushOutcomes() { + if (Jc) { + tr.log("Flushing outcomes..."); + } + const i = this._clearOutcomes(); + if (i.length === 0) { + if (Jc) { + tr.log("No outcomes to send"); + } + return; + } + if (!this._dsn) { + if (Jc) { + tr.log("No dsn provided, will not send outcomes"); + } + return; + } + if (Jc) { + tr.log("Sending outcomes:", i); + } + const e = x7n(i, this._options.tunnel && hZ(this._dsn)); + this.sendEnvelope(e); + } + }; + } +}); +var zVi = ue({ + "out-build/external/sentry/core/checkin.js"() { + "use strict"; + + qr(); + } +}); +var XUn = ue({ + "out-build/external/sentry/core/server-runtime-client.js"() { + "use strict"; + + qr(); + jVi(); + zVi(); + ub(); + xw(); + OVi(); + CZ(); + Nhe(); + KS(); + } +}); +function QUn(i, e) { + if (e.debug === true) { + if (Jc) { + tr.enable(); + } else { + dZ(() => { + console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle."); + }); + } + } + ju().update(e.initialScope); + const s = new i(e); + JVi(s); + s.init(); + return s; +} +function JVi(i) { + ju().setClient(i); +} +var ZUn = ue({ + "out-build/external/sentry/core/sdk.js"() { + "use strict"; + + qr(); + ub(); + xw(); + } +}); +function kBt(i, e, t = SWi(i.bufferSize || KVi)) { + let s = {}; + const n = o => t.drain(o); + function r(o) { + const a = []; + Lhe(o, (d, h) => { + const g = UWi(h); + if (D7n(s, g)) { + const p = GVi(d, h); + i.recordDroppedEvent("ratelimit_backoff", g, p); + } else { + a.push(d); + } + }); + if (a.length === 0) { + return wq({}); + } + const l = gZ(o[0], a); + const c = d => { + Lhe(l, (h, g) => { + const p = GVi(h, g); + i.recordDroppedEvent(d, UWi(g), p); + }); + }; + const u = () => e({ + body: v7n(l) + }).then(d => { + if (d.statusCode !== undefined && (d.statusCode < 200 || d.statusCode >= 300) && Jc) { + tr.warn(`Sentry responded with status code ${d.statusCode} to sent event.`); + } + s = T7n(s, d); + return d; + }, d => { + c("network_error"); + throw d; + }); + return t.add(u).then(d => d, d => { + if (d instanceof yL) { + if (Jc) { + tr.error("Skipped sending event because buffer is full."); + } + c("queue_overflow"); + return wq({}); + } + throw d; + }); + } + return { + send: r, + flush: n + }; +} +function GVi(i, e) { + if (e === "event" || e === "transaction") { + if (Array.isArray(i)) { + return i[1]; + } else { + return undefined; + } + } +} +var KVi; +var eWn = ue({ + "out-build/external/sentry/core/transports/base.js"() { + "use strict"; + + qr(); + xw(); + KVi = 64; + } +}); +var tWn = ue({ + "out-build/external/sentry/core/transports/offline.js"() { + "use strict"; + + qr(); + xw(); + } +}); +var iWn = ue({ + "out-build/external/sentry/core/transports/multiplexed.js"() { + "use strict"; + + qr(); + CBt(); + } +}); +function sWn(i, e) { + const t = e && e.getDsn(); + const s = e && e.getOptions().tunnel; + return rWn(i, t) || nWn(i, s); +} +function nWn(i, e) { + if (e) { + return YVi(i) === YVi(e); + } else { + return false; + } +} +function rWn(i, e) { + if (e) { + return i.includes(e.host); + } else { + return false; + } +} +function YVi(i) { + if (i[i.length - 1] === "/") { + return i.slice(0, -1); + } else { + return i; + } +} +var oWn = ue({ + "out-build/external/sentry/core/utils/isSentryRequestUrl.js"() { + "use strict"; + } +}); +function aWn(i, ...e) { + const t = new String(String.raw(i, ...e)); + t.__sentry_template_string__ = i.join("\0").replace(/%/g, "%%").replace(/\0/g, "%s"); + t.__sentry_template_values__ = e; + return t; +} +var lWn = ue({ + "out-build/external/sentry/core/utils/parameterize.js"() { + "use strict"; + } +}); +function cWn(i, e, t = [e], s = "npm") { + const n = i._metadata || {}; + n.sdk ||= { + name: `sentry.javascript.${e}`, + packages: t.map(r => ({ + name: `${s}:@sentry/${r}`, + version: V3 + })), + version: V3 + }; + i._metadata = n; +} +var uWn = ue({ + "out-build/external/sentry/core/utils/sdkMetadata.js"() { + "use strict"; + + qr(); + } +}); +var XVi = ue({ + "out-build/external/sentry/core/utils/traceData.js"() { + "use strict"; + + qr(); + Ahe(); + kq(); + ub(); + jhe(); + CZ(); + KS(); + } +}); +var dWn = ue({ + "out-build/external/sentry/core/utils/meta.js"() { + "use strict"; + + XVi(); + } +}); +function PB(i, e) { + const t = ru(); + const s = gm(); + if (!t) { + return; + } + const { + beforeBreadcrumb: n = null, + maxBreadcrumbs: r = QVi + } = t.getOptions(); + if (r <= 0) { + return; + } + const a = { + timestamp: Ihe(), + ...i + }; + const l = n ? dZ(() => n(a, e)) : a; + if (l !== null) { + if (t.emit) { + t.emit("beforeAddBreadcrumb", l, e); + } + s.addBreadcrumb(l, r); + } +} +var QVi; +var ZVi = ue({ + "out-build/external/sentry/core/breadcrumbs.js"() { + "use strict"; + + qr(); + ub(); + QVi = 100; + } +}); +var eHi; +var tHi; +var EBt; +var iHi; +var ent; +var hWn = ue({ + "out-build/external/sentry/core/integrations/functiontostring.js"() { + "use strict"; + + qr(); + ub(); + lx(); + tHi = "FunctionToString"; + EBt = new WeakMap(); + iHi = () => ({ + name: tHi, + setupOnce() { + eHi = Function.prototype.toString; + try { + Function.prototype.toString = function (...i) { + const e = k_t(this); + const t = EBt.has(ru()) && e !== undefined ? e : this; + return eHi.apply(t, i); + }; + } catch {} + }, + setup(i) { + EBt.set(i, true); + } + }); + ent = iHi; + } +}); +function fWn(i = {}, e = {}) { + return { + allowUrls: [...(i.allowUrls || []), ...(e.allowUrls || [])], + denyUrls: [...(i.denyUrls || []), ...(e.denyUrls || [])], + ignoreErrors: [...(i.ignoreErrors || []), ...(e.ignoreErrors || []), ...(i.disableErrorDefaults ? [] : sHi)], + ignoreTransactions: [...(i.ignoreTransactions || []), ...(e.ignoreTransactions || [])], + ignoreInternal: i.ignoreInternal !== undefined ? i.ignoreInternal : true + }; +} +function gWn(i, e) { + if (e.ignoreInternal && wWn(i)) { + if (Jc) { + tr.warn(`Event dropped due to being internal Sentry Error. +Event: ${J3(i)}`); + } + return true; + } else if (pWn(i, e.ignoreErrors)) { + if (Jc) { + tr.warn(`Event dropped due to being matched by \`ignoreErrors\` option. +Event: ${J3(i)}`); + } + return true; + } else if (SWn(i)) { + if (Jc) { + tr.warn(`Event dropped due to not having an error message, error type or stacktrace. +Event: ${J3(i)}`); + } + return true; + } else if (mWn(i, e.ignoreTransactions)) { + if (Jc) { + tr.warn(`Event dropped due to being matched by \`ignoreTransactions\` option. +Event: ${J3(i)}`); + } + return true; + } else if (bWn(i, e.denyUrls)) { + if (Jc) { + tr.warn(`Event dropped due to being matched by \`denyUrls\` option. +Event: ${J3(i)}. +Url: ${tnt(i)}`); + } + return true; + } else if (vWn(i, e.allowUrls)) { + return false; + } else { + if (Jc) { + tr.warn(`Event dropped due to not being matched by \`allowUrls\` option. +Event: ${J3(i)}. +Url: ${tnt(i)}`); + } + return true; + } +} +function pWn(i, e) { + if (i.type || !e || !e.length) { + return false; + } else { + return yWn(i).some(t => gq(t, e)); + } +} +function mWn(i, e) { + if (i.type !== "transaction" || !e || !e.length) { + return false; + } + const t = i.transaction; + if (t) { + return gq(t, e); + } else { + return false; + } +} +function bWn(i, e) { + if (!e || !e.length) { + return false; + } + const t = tnt(i); + if (t) { + return gq(t, e); + } else { + return false; + } +} +function vWn(i, e) { + if (!e || !e.length) { + return true; + } + const t = tnt(i); + if (t) { + return gq(t, e); + } else { + return true; + } +} +function yWn(i) { + const e = []; + if (i.message) { + e.push(i.message); + } + let t; + try { + t = i.exception.values[i.exception.values.length - 1]; + } catch {} + if (t && t.value) { + e.push(t.value); + if (t.type) { + e.push(`${t.type}: ${t.value}`); + } + } + return e; +} +function wWn(i) { + try { + return i.exception.values[0].type === "SentryError"; + } catch {} + return false; +} +function CWn(i = []) { + for (let e = i.length - 1; e >= 0; e--) { + const t = i[e]; + if (t && t.filename !== "" && t.filename !== "[native code]") { + return t.filename || null; + } + } + return null; +} +function tnt(i) { + try { + let e; + try { + e = i.exception.values[0].stacktrace.frames; + } catch {} + if (e) { + return CWn(e); + } else { + return null; + } + } catch { + if (Jc) { + tr.error(`Cannot extract url for event ${J3(i)}`); + } + return null; + } +} +function SWn(i) { + if (i.type || !i.exception || !i.exception.values || i.exception.values.length === 0) { + return false; + } else { + return !i.message && !i.exception.values.some(e => e.stacktrace || e.type && e.type !== "Error" || e.value); + } +} +var sHi; +var nHi; +var rHi; +var int; +var xWn = ue({ + "out-build/external/sentry/core/integrations/inboundfilters.js"() { + "use strict"; + + qr(); + xw(); + lx(); + sHi = [/^Script error\.?$/, /^Javascript error: Script error\.? on line 0$/, /^ResizeObserver loop completed with undelivered notifications.$/, /^Cannot redefine property: googletag$/, "undefined is not an object (evaluating 'a.L')", `can't redefine non-configurable property "solana"`, "vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)", "Can't find variable: _AutofillCallbackHandler"]; + nHi = "InboundFilters"; + rHi = (i = {}) => ({ + name: nHi, + processEvent(e, t, s) { + const n = s.getOptions(); + const r = fWn(i, n); + if (gWn(e, r)) { + return null; + } else { + return e; + } + } + }); + int = rHi; + } +}); +var oHi; +var aHi; +var lHi; +var cHi; +var kWn; +var EWn = ue({ + "out-build/external/sentry/core/integrations/linkederrors.js"() { + "use strict"; + + qr(); + lx(); + oHi = "cause"; + aHi = 5; + lHi = "LinkedErrors"; + cHi = (i = {}) => { + const e = i.limit || aHi; + const t = i.key || oHi; + return { + name: lHi, + preprocessEvent(s, n, r) { + const o = r.getOptions(); + OUi(N7n, o.stackParser, o.maxValueLength, t, e, s, n); + } + }; + }; + kWn = cHi; + } +}); +function IWn(i) { + if (Bu._sentryModuleMetadata) { + for (const e of Object.keys(Bu._sentryModuleMetadata)) { + const t = Bu._sentryModuleMetadata[e]; + if (DBt.has(e)) { + continue; + } + DBt.add(e); + const s = i(e); + for (const n of s.reverse()) { + if (n.filename) { + IBt.set(n.filename, t); + break; + } + } + } + } +} +function DWn(i, e) { + IWn(i); + return IBt.get(e); +} +function uHi(i, e) { + try { + e.exception.values.forEach(t => { + if (t.stacktrace) { + for (const s of t.stacktrace.frames || []) { + if (!s.filename || s.module_metadata) { + continue; + } + const n = DWn(i, s.filename); + if (n) { + s.module_metadata = n; + } + } + } + }); + } catch {} +} +function dHi(i) { + try { + i.exception.values.forEach(e => { + if (e.stacktrace) { + for (const t of e.stacktrace.frames || []) { + delete t.module_metadata; + } + } + }); + } catch {} +} +var IBt; +var DBt; +var hHi = ue({ + "out-build/external/sentry/core/metadata.js"() { + "use strict"; + + qr(); + IBt = new Map(); + DBt = new Set(); + } +}); +var fHi; +var TWn = ue({ + "out-build/external/sentry/core/integrations/metadata.js"() { + "use strict"; + + qr(); + lx(); + hHi(); + fHi = () => ({ + name: "ModuleMetadata", + setup(i) { + i.on("beforeEnvelope", e => { + Lhe(e, (t, s) => { + if (s === "event") { + const n = Array.isArray(t) ? t[1] : undefined; + if (n) { + dHi(n); + t[1] = n; + } + } + }); + }); + i.on("applyFrameMetadata", e => { + if (e.type) { + return; + } + const t = i.getOptions().stackParser; + uHi(t, e); + }); + } + }); + } +}); +function PWn(i) { + const { + transactionNamingScheme: e, + include: { + ip: t, + user: s, + ...n + } + } = i; + const r = ["method"]; + for (const [a, l] of Object.entries(n)) { + if (l) { + r.push(a); + } + } + let o; + if (s === undefined) { + o = true; + } else if (typeof s == "boolean") { + o = s; + } else { + const a = []; + for (const [l, c] of Object.entries(s)) { + if (c) { + a.push(l); + } + } + o = a; + } + return { + include: { + ip: t, + user: o, + request: r.length !== 0 ? r : undefined, + transaction: e + } + }; +} +var snt; +var gHi; +var pHi; +var LWn; +var RWn = ue({ + "out-build/external/sentry/core/integrations/requestdata.js"() { + "use strict"; + + qr(); + lx(); + snt = { + include: { + cookies: true, + data: true, + headers: true, + ip: false, + query_string: true, + url: true, + user: { + id: true, + username: true, + email: true + } + }, + transactionNamingScheme: "methodPath" + }; + gHi = "RequestData"; + pHi = (i = {}) => { + const e = { + ...snt, + ...i, + include: { + ...snt.include, + ...i.include, + user: i.include && typeof i.include.user == "boolean" ? i.include.user : { + ...snt.include.user, + ...(i.include || {}).user + } + } + }; + return { + name: gHi, + processEvent(t) { + const { + sdkProcessingMetadata: s = {} + } = t; + const n = s.request; + if (!n) { + return t; + } + const r = PWn(e); + return o7n(t, n, r); + } + }; + }; + LWn = pHi; + } +}); +function NWn(i, e) { + const t = { + level: PWi(e), + extra: { + arguments: i + } + }; + CL(s => { + s.addEventProcessor(o => { + o.logger = "console"; + yq(o, { + handled: false, + type: "console" + }); + return o; + }); + if (e === "assert") { + if (!i[0]) { + const o = `Assertion failed: ${Mst(i.slice(1), " ") || "console.assert"}`; + s.setExtra("arguments", i.slice(1)); + Qst(o, t); + } + return; + } + const n = i.find(o => o instanceof Error); + if (n) { + yBt(n, t); + return; + } + const r = Mst(i, " "); + Qst(r, t); + }); +} +var mHi; +var bHi; +var vHi; +var MWn = ue({ + "out-build/external/sentry/core/integrations/captureconsole.js"() { + "use strict"; + + qr(); + ub(); + jhe(); + lx(); + mHi = "CaptureConsole"; + bHi = (i = {}) => { + const e = i.levels || yhe; + return { + name: mHi, + setup(t) { + if ("console" in Bu) { + iWi(({ + args: s, + level: n + }) => { + if (ru() === t && !!e.includes(n)) { + NWn(s, n); + } + }); + } + } + }; + }; + vHi = bHi; + } +}); +var yHi; +var wHi; +var CHi; +var AWn = ue({ + "out-build/external/sentry/core/integrations/debug.js"() { + "use strict"; + + qr(); + lx(); + yHi = "Debug"; + wHi = (i = {}) => { + const e = { + debugger: false, + stringify: false, + ...i + }; + return { + name: yHi, + setup(t) { + t.on("beforeSendEvent", (s, n) => { + if (e.debugger) { + debugger; + } + dZ(() => { + if (e.stringify) { + console.log(JSON.stringify(s, null, 2)); + if (n && Object.keys(n).length) { + console.log(JSON.stringify(n, null, 2)); + } + } else { + console.log(s); + if (n && Object.keys(n).length) { + console.log(n); + } + } + }); + }); + } + }; + }; + CHi = wHi; + } +}); +function $Wn(i, e) { + if (e) { + return !!FWn(i, e) || !!OWn(i, e); + } else { + return false; + } +} +function FWn(i, e) { + const t = i.message; + const s = e.message; + return (!!t || !!s) && (!t || !!s) && (!!t || !s) && t === s && !!xHi(i, e) && !!SHi(i, e); +} +function OWn(i, e) { + const t = kHi(e); + const s = kHi(i); + return !!t && !!s && t.type === s.type && t.value === s.value && !!xHi(i, e) && !!SHi(i, e); +} +function SHi(i, e) { + let t = I_t(i); + let s = I_t(e); + if (!t && !s) { + return true; + } + if (t && !s || !t && s || (t = t, s = s, s.length !== t.length)) { + return false; + } + for (let n = 0; n < s.length; n++) { + const r = s[n]; + const o = t[n]; + if (r.filename !== o.filename || r.lineno !== o.lineno || r.colno !== o.colno || r.function !== o.function) { + return false; + } + } + return true; +} +function xHi(i, e) { + let t = i.fingerprint; + let s = e.fingerprint; + if (!t && !s) { + return true; + } + if (t && !s || !t && s) { + return false; + } + t = t; + s = s; + try { + return t.join("") === s.join(""); + } catch { + return false; + } +} +function kHi(i) { + return i.exception && i.exception.values && i.exception.values[0]; +} +var EHi; +var IHi; +var nnt; +var _Wn = ue({ + "out-build/external/sentry/core/integrations/dedupe.js"() { + "use strict"; + + qr(); + lx(); + xw(); + EHi = "Dedupe"; + IHi = () => { + let i; + return { + name: EHi, + processEvent(e) { + if (e.type) { + return e; + } + try { + if ($Wn(e, i)) { + if (Jc) { + tr.warn("Event dropped due to being a duplicate of previously captured event."); + } + return null; + } + } catch {} + return i = e; + } + }; + }; + nnt = IHi; + } +}); +function BWn(i, e = {}, t, s, n) { + if (!e.originalException || !B3(e.originalException)) { + return i; + } + const r = e.originalException.name || e.originalException.constructor.name; + const o = UWn(e.originalException, s, n); + if (o) { + const a = { + ...i.contexts + }; + const l = rM(o, t); + if (U3(l)) { + pT(l, "__sentry_skip_normalization__", true); + a[r] = l; + } + return { + ...i, + contexts: a + }; + } + return i; +} +function UWn(i, e, t) { + try { + const s = ["name", "message", "stack", "line", "column", "fileName", "lineNumber", "columnNumber", "toJSON"]; + const n = {}; + for (const r of Object.keys(i)) { + if (s.indexOf(r) !== -1) { + continue; + } + const o = i[r]; + n[r] = B3(o) || typeof o == "string" ? W3(`${o}`, t) : o; + } + if (e && i.cause !== undefined) { + n.cause = B3(i.cause) ? i.cause.toString() : i.cause; + } + if (typeof i.toJSON == "function") { + const r = i.toJSON(); + for (const o of Object.keys(r)) { + const a = r[o]; + n[o] = B3(a) ? a.toString() : a; + } + } + return n; + } catch (s) { + if (Jc) { + tr.error("Unable to extract extra data from the Error object:", s); + } + } + return null; +} +var DHi; +var THi; +var PHi; +var WWn = ue({ + "out-build/external/sentry/core/integrations/extraerrordata.js"() { + "use strict"; + + qr(); + lx(); + xw(); + DHi = "ExtraErrorData"; + THi = (i = {}) => { + const { + depth: e = 3, + captureErrorCause: t = true + } = i; + return { + name: DHi, + processEvent(s, n, r) { + const { + maxValueLength: o = 250 + } = r.getOptions(); + return BWn(s, n, e, t, o); + } + }; + }; + PHi = THi; + } +}); +function VWn({ + isBrowser: i, + root: e, + prefix: t +}) { + return s => { + if (!s.filename) { + return s; + } + const n = /^[a-zA-Z]:\\/.test(s.filename) || s.filename.includes("\\") && !s.filename.includes("/"); + const r = /^\//.test(s.filename); + if (i) { + if (e) { + const o = s.filename; + if (o.indexOf(e) === 0) { + s.filename = o.replace(e, t); + } + } + } else if (n || r) { + const o = n ? s.filename.replace(/^[a-zA-Z]:/, "").replace(/\\/g, "/") : s.filename; + const a = e ? G9n(e, o) : K9n(o); + s.filename = `${t}${a}`; + } + return s; + }; +} +var LHi; +var RHi; +var HWn = ue({ + "out-build/external/sentry/core/integrations/rewriteframes.js"() { + "use strict"; + + qr(); + lx(); + LHi = "RewriteFrames"; + RHi = (i = {}) => { + const e = i.root; + const t = i.prefix || "app:///"; + const s = "window" in Bu && Bu.window !== undefined; + const n = i.iteratee || VWn({ + isBrowser: s, + root: e, + prefix: t + }); + function r(a) { + try { + return { + ...a, + exception: { + ...a.exception, + values: a.exception.values.map(l => ({ + ...l, + ...(l.stacktrace && { + stacktrace: o(l.stacktrace) + }) + })) + } + }; + } catch { + return a; + } + } + function o(a) { + return { + ...a, + frames: a && a.frames && a.frames.map(l => n(l)) + }; + } + return { + name: LHi, + processEvent(a) { + let l = a; + if (a.exception && Array.isArray(a.exception.values)) { + l = r(l); + } + return l; + } + }; + }; + } +}); +var NHi; +var MHi; +var AHi; +var qWn = ue({ + "out-build/external/sentry/core/integrations/sessiontiming.js"() { + "use strict"; + + qr(); + lx(); + NHi = "SessionTiming"; + MHi = () => { + const i = Hb() * 1000; + return { + name: NHi, + processEvent(e) { + const t = Hb() * 1000; + return { + ...e, + extra: { + ...e.extra, + "session:start": i, + "session:duration": t - i, + "session:end": t + } + }; + } + }; + }; + AHi = MHi; + } +}); +function jWn(i) { + return B3(i) && i.name === "ZodError" && Array.isArray(i.errors); +} +function zWn(i) { + return { + ...i, + path: "path" in i && Array.isArray(i.path) ? i.path.join(".") : undefined, + keys: "keys" in i ? JSON.stringify(i.keys) : undefined, + unionErrors: "unionErrors" in i ? JSON.stringify(i.unionErrors) : undefined + }; +} +function JWn(i) { + const e = new Set(); + for (const s of i.issues) { + if (s.path && s.path[0]) { + e.add(s.path[0]); + } + } + const t = Array.from(e); + return `Failed to validate keys: ${W3(t.join(", "), 100)}`; +} +function GWn(i, e, t) { + if (!e.exception || !e.exception.values || !t || !t.originalException || !jWn(t.originalException) || t.originalException.issues.length === 0) { + return e; + } else { + return { + ...e, + exception: { + ...e.exception, + values: [{ + ...e.exception.values[0], + value: JWn(t.originalException) + }, ...e.exception.values.slice(1)] + }, + extra: { + ...e.extra, + "zoderror.issues": t.originalException.errors.slice(0, i).map(zWn) + } + }; + } +} +var $Hi; +var FHi; +var OHi; +var _Hi; +var KWn = ue({ + "out-build/external/sentry/core/integrations/zoderrors.js"() { + "use strict"; + + qr(); + lx(); + $Hi = 10; + FHi = "ZodErrors"; + OHi = (i = {}) => { + const e = i.limit || $Hi; + return { + name: FHi, + processEvent(t, s) { + return GWn(e, t, s); + } + }; + }; + _Hi = OHi; + } +}); +function YWn(i) { + const e = I_t(i); + if (e) { + return e.filter(t => !!t.filename).map(t => t.module_metadata ? Object.keys(t.module_metadata).filter(s => s.startsWith(TBt)).map(s => s.slice(TBt.length)) : []); + } +} +var BHi; +var TBt; +var XWn = ue({ + "out-build/external/sentry/core/integrations/third-party-errors-filter.js"() { + "use strict"; + + qr(); + lx(); + hHi(); + BHi = i => ({ + name: "ThirdPartyErrorsFilter", + setup(e) { + e.on("beforeEnvelope", t => { + Lhe(t, (s, n) => { + if (n === "event") { + const r = Array.isArray(s) ? s[1] : undefined; + if (r) { + dHi(r); + s[1] = r; + } + } + }); + }); + e.on("applyFrameMetadata", t => { + if (t.type) { + return; + } + const s = e.getOptions().stackParser; + uHi(s, t); + }); + }, + processEvent(e) { + const t = YWn(e); + if (t) { + const s = i.behaviour === "drop-error-if-contains-third-party-frames" || i.behaviour === "apply-tag-if-contains-third-party-frames" ? "some" : "every"; + if (t[s](r => !r.some(o => i.filterKeys.includes(o)))) { + if (i.behaviour === "drop-error-if-contains-third-party-frames" || i.behaviour === "drop-error-if-exclusively-contains-third-party-frames") { + return null; + } + e.tags = { + ...e.tags, + third_party_code: true + }; + } + } + return e; + } + }); + TBt = "_sentryBundlerPluginAppKey:"; + } +}); +var PBt; +var LBt; +var RBt; +var NBt; +var rnt = ue({ + "out-build/external/sentry/core/metrics/constants.js"() { + "use strict"; + + PBt = "c"; + LBt = "g"; + RBt = "s"; + NBt = "d"; + } +}); +function UHi(i, e) { + const t = vhe("globalMetricsAggregators", () => new WeakMap()); + const s = t.get(i); + if (s) { + return s; + } + const n = new e(i); + i.on("flush", () => n.flush()); + i.on("close", () => n.close()); + t.set(i, n); + return n; +} +function ont(i, e, t, s, n = {}) { + const r = n.client || ru(); + if (!r) { + return; + } + const o = WC(); + const a = o ? Ew(o) : undefined; + const l = a && ed(a).description; + const { + unit: c, + tags: u, + timestamp: d + } = n; + const { + release: h, + environment: g + } = r.getOptions(); + const p = {}; + if (h) { + p.release = h; + } + if (g) { + p.environment = g; + } + if (l) { + p.transaction = l; + } + if (Jc) { + tr.log(`Adding value of ${s} to ${e} metric ${t}`); + } + UHi(r, i).add(e, t, s, c, { + ...p, + ...u + }, d); +} +function QWn(i, e, t = 1, s) { + ont(i, PBt, e, ABt(t), s); +} +function MBt(i, e, t, s) { + ont(i, NBt, e, ABt(t), s); +} +function ZWn(i, e, t, s = "second", n) { + if (typeof t == "function") { + const r = Hb(); + return dBt({ + op: "metrics.timing", + name: e, + startTime: r, + onlyIfParent: true + }, o => nBt(() => t(), () => {}, () => { + const a = Hb(); + const l = a - r; + MBt(i, e, l, { + ...n, + unit: "second" + }); + o.end(a); + })); + } + MBt(i, e, t, { + ...n, + unit: s + }); +} +function eVn(i, e, t, s) { + ont(i, RBt, e, t, s); +} +function tVn(i, e, t, s) { + ont(i, LBt, e, ABt(t), s); +} +function ABt(i) { + if (typeof i == "string") { + return parseInt(i); + } else { + return i; + } +} +var xZ; +var WHi = ue({ + "out-build/external/sentry/core/metrics/exports.js"() { + "use strict"; + + qr(); + ub(); + xw(); + CZ(); + rBt(); + KS(); + rnt(); + xZ = { + increment: QWn, + distribution: MBt, + set: eVn, + gauge: tVn, + timing: ZWn, + getMetricsAggregatorForClient: UHi + }; + } +}); +var iVn = ue({ + "out-build/external/sentry/core/profiling.js"() { + "use strict"; + + qr(); + ub(); + xw(); + } +}); +function sVn(i) { + let e = 0; + for (let t = 0; t < i.length; t++) { + const s = i.charCodeAt(t); + e = (e << 5) - e + s; + e &= e; + } + return e >>> 0; +} +var ant = ue({ + "out-build/external/sentry/core/metrics/utils.js"() { + "use strict"; + + qr(); + } +}); +var VHi = ue({ + "out-build/external/sentry/core/metrics/envelope.js"() { + "use strict"; + + qr(); + ant(); + } +}); +var HHi; +var qHi; +var jHi; +var zHi; +var nVn; +var JHi = ue({ + "out-build/external/sentry/core/metrics/instance.js"() { + "use strict"; + + rnt(); + ant(); + HHi = class { + constructor(i) { + this._value = i; + } + get weight() { + return 1; + } + add(i) { + this._value += i; + } + toString() { + return `${this._value}`; + } + }; + qHi = class { + constructor(i) { + this._last = i; + this._min = i; + this._max = i; + this._sum = i; + this._count = 1; + } + get weight() { + return 5; + } + add(i) { + this._last = i; + if (i < this._min) { + this._min = i; + } + if (i > this._max) { + this._max = i; + } + this._sum += i; + this._count++; + } + toString() { + return `${this._last}:${this._min}:${this._max}:${this._sum}:${this._count}`; + } + }; + jHi = class { + constructor(i) { + this._value = [i]; + } + get weight() { + return this._value.length; + } + add(i) { + this._value.push(i); + } + toString() { + return this._value.join(":"); + } + }; + zHi = class { + constructor(i) { + this.first = i; + this._value = new Set([i]); + } + get weight() { + return this._value.size; + } + add(i) { + this._value.add(i); + } + toString() { + return Array.from(this._value).map(i => typeof i == "string" ? sVn(i) : i).join(":"); + } + }; + nVn = { + [PBt]: HHi, + [LBt]: qHi, + [NBt]: jHi, + [RBt]: zHi + }; + } +}); +var rVn = ue({ + "out-build/external/sentry/core/metrics/aggregator.js"() { + "use strict"; + + qr(); + KS(); + rnt(); + VHi(); + JHi(); + ant(); + } +}); +var oVn = ue({ + "out-build/external/sentry/core/metrics/exports-default.js"() { + "use strict"; + + rVn(); + WHi(); + } +}); +var aVn = ue({ + "out-build/external/sentry/core/metrics/browser-aggregator.js"() { + "use strict"; + + qr(); + KS(); + rnt(); + VHi(); + JHi(); + ant(); + } +}); +function lVn(i, e, t, s, n = "auto.http.browser") { + if (!i.fetchData) { + return; + } + const r = IB() && e(i.fetchData.url); + if (i.endTimestamp && r) { + const p = i.fetchData.__span; + if (!p) { + return; + } + const b = s[p]; + if (b) { + dVn(b, i); + delete s[p]; + } + return; + } + const o = ju(); + const a = ru(); + const { + method: l, + url: c + } = i.fetchData; + const u = uVn(c); + const d = u ? Cq(u).host : undefined; + const h = !!WC(); + const g = r && h ? TB({ + name: `${l} ${c}`, + attributes: { + url: c, + type: "fetch", + "http.method": l, + "http.url": u, + "server.address": d, + [kw]: n, + [EB]: "http.client" + } + }) : new DB(); + i.fetchData.__span = g.spanContext().spanId; + s[g.spanContext().spanId] = g; + if (t(i.fetchData.url) && a) { + const p = i.args[0]; + i.args[1] = i.args[1] || {}; + const b = i.args[1]; + b.headers = cVn(p, a, o, b, IB() && h ? g : undefined); + } + return g; +} +function cVn(i, e, t, s, n) { + const r = gm(); + const { + traceId: o, + spanId: a, + sampled: l, + dsc: c + } = { + ...r.getPropagationContext(), + ...t.getPropagationContext() + }; + const u = n ? K_t(n) : W_t(o, a, l); + const d = U_t(c || (n ? K3(n) : Kst(o, e))); + const h = s.headers || (typeof Request !== "undefined" && SB(i, Request) ? i.headers : undefined); + if (h) { + if (typeof Headers !== "undefined" && SB(h, Headers)) { + const g = new Headers(h); + g.set("sentry-trace", u); + if (d) { + const p = g.get(Sq); + if (p) { + const b = lnt(p); + g.set(Sq, b ? `${b},${d}` : d); + } else { + g.set(Sq, d); + } + } + return g; + } else if (Array.isArray(h)) { + const g = [...h.filter(p => !Array.isArray(p) || p[0] !== "sentry-trace").map(p => { + if (Array.isArray(p) && p[0] === Sq && typeof p[1] == "string") { + const [b, v, ...y] = p; + return [b, lnt(v), ...y]; + } else { + return p; + } + }), ["sentry-trace", u]]; + if (d) { + g.push([Sq, d]); + } + return g; + } else { + const g = "baggage" in h ? h.baggage : undefined; + let p = []; + if (Array.isArray(g)) { + p = g.map(b => typeof b == "string" ? lnt(b) : b).filter(b => b === ""); + } else if (g) { + p.push(lnt(g)); + } + if (d) { + p.push(d); + } + return { + ...h, + "sentry-trace": u, + baggage: p.length > 0 ? p.join(",") : undefined + }; + } + } else { + return { + "sentry-trace": u, + baggage: d + }; + } +} +function uVn(i) { + try { + return new URL(i).href; + } catch { + return; + } +} +function dVn(i, e) { + if (e.response) { + J_t(i, e.response.status); + const t = e.response && e.response.headers && e.response.headers.get("content-length"); + if (t) { + const s = parseInt(t); + if (s > 0) { + i.setAttribute("http.response_content_length", s); + } + } + } else if (e.error) { + i.setStatus({ + code: Ty, + message: "internal_error" + }); + } + i.end(); +} +function lnt(i) { + return i.split(",").filter(e => !e.split("=")[0].startsWith(Ust)).join(","); +} +var hVn = ue({ + "out-build/external/sentry/core/fetch.js"() { + "use strict"; + + qr(); + ub(); + M2(); + CZ(); + Jst(); + yZ(); + KS(); + } +}); +var fVn = ue({ + "out-build/external/sentry/core/trpc.js"() { + "use strict"; + + qr(); + ub(); + jhe(); + M2(); + CZ(); + } +}); +function gVn(i, e = {}, t = ju()) { + const { + message: s, + name: n, + email: r, + url: o, + source: a, + associatedEventId: l, + tags: c + } = i; + const u = { + contexts: { + feedback: N0({ + contact_email: r, + name: n, + message: s, + url: o, + source: a, + associated_event_id: l + }) + }, + type: "feedback", + level: "info", + tags: c + }; + const d = t && t.getClient() || ru(); + if (d) { + d.emit("beforeSendFeedback", u, e); + } + return t.captureEvent(u, e); +} +var pVn = ue({ + "out-build/external/sentry/core/feedback.js"() { + "use strict"; + + qr(); + ub(); + } +}); +function mVn() { + return { + bindClient(i) { + ju().setClient(i); + }, + withScope: CL, + getClient: () => ru(), + getScope: ju, + getIsolationScope: gm, + captureException: (i, e) => ju().captureException(i, e), + captureMessage: (i, e, t) => ju().captureMessage(i, e, t), + captureEvent: SZ, + addBreadcrumb: PB, + setUser: AVi, + setTags: NVi, + setTag: MVi, + setExtra: RVi, + setExtras: LVi, + setContext: PVi, + getIntegration(i) { + const e = ru(); + return e && e.getIntegrationByName(i.id) || null; + }, + startSession: Zst, + endSession: qhe, + captureSession(i) { + if (i) { + return qhe(); + } + bVn(); + } + }; +} +function bVn() { + const i = ju(); + const e = ru(); + const t = i.getSession(); + if (e && t) { + e.captureSession(t); + } +} +var GHi; +var vVn = ue({ + "out-build/external/sentry/core/getCurrentHubShim.js"() { + "use strict"; + + ZVi(); + ub(); + jhe(); + GHi = mVn; + } +}); +var zu = ue({ + "out-build/external/sentry/core/index.js"() { + "use strict"; + + CZ(); + M2(); + cBt(); + jhe(); + ub(); + KWi(); + Ahe(); + kq(); + Wst(); + OVi(); + Mhe(); + IVi(); + CBt(); + jVi(); + XUn(); + ZUn(); + eWn(); + tWn(); + iWn(); + lx(); + DVi(); + vBt(); + zVi(); + yZ(); + oWn(); + rBt(); + lWn(); + KS(); + lBt(); + uWn(); + XVi(); + dWn(); + Gst(); + ZVi(); + hWn(); + xWn(); + EWn(); + TWn(); + RWn(); + MWn(); + AWn(); + _Wn(); + WWn(); + HWn(); + qWn(); + KWn(); + XWn(); + WHi(); + iVn(); + oVn(); + aVn(); + z_t(); + hVn(); + fVn(); + pVn(); + vVn(); + qr(); + } +}); +function M0() { + return globalThis._CURSOR_SENTRY; +} +function yVn() { + return { + send: function (e) { + const t = M0().buffer; + if (t.length < 64) { + t.push(e); + } + return Promise.resolve({ + statusCode: 200 + }); + }, + flush: function (e) { + return Promise.resolve(true); + } + }; +} +function wVn() { + return { + send: function (i) { + if (M0().enabled) { + return M0().transport.send(i); + } else { + return Promise.resolve({ + statusCode: 200 + }); + } + }, + flush: function (i) { + return M0().transport.flush(i); + } + }; +} +function CVn() { + return function (i) { + if (i.attributes?.["sentry.sample_rate"] === undefined) { + return 0; + } else { + return 1; + } + }; +} +function SVn() { + return { + defaultIntegrations: [], + dsn: KHi, + parentSpanIsAlwaysRootSpan: true, + tracesSampler: CVn(), + transport: wVn + }; +} +var KHi; +var cnt = ue({ + "out-build/vs/platform/tracing/common/global.js"() { + "use strict"; + + KHi = "https://80ec2259ebfad12d8aa2afe6eb4f6dd5@metrics.cursor.sh/4508016051945472"; + if (globalThis._CURSOR_SENTRY === undefined) { + globalThis._CURSOR_SENTRY = { + buffer: [], + enabled: true, + loggerSampleRate: 1, + sentry: undefined, + tracesSampleRate: 0.01, + profilesSampleRate: 0, + jsonStringifySampleRate: 0, + transport: yVn() + }; + } + } +}); +function Tq(i, e) { + const t = Object.create(null); + for (const s of i) { + const n = e(s); + let r = t[n]; + r ||= t[n] = []; + r.push(s); + } + return t; +} +function zhe(i, e) { + const t = []; + const s = []; + for (const n of i) { + if (!e.has(n)) { + t.push(n); + } + } + for (const n of e) { + if (!i.has(n)) { + s.push(n); + } + } + return { + removed: t, + added: s + }; +} +function $Bt(i, e) { + const t = []; + const s = []; + for (const [n, r] of i) { + if (!e.has(n)) { + t.push(r); + } + } + for (const [n, r] of e) { + if (!i.has(n)) { + s.push(r); + } + } + return { + removed: t, + added: s + }; +} +function xVn(i, e) { + const t = new Set(); + for (const s of e) { + if (i.has(s)) { + t.add(s); + } + } + return t; +} +var YHi; +var XHi; +var mT = ue({ + "out-build/vs/base/common/collections.js"() { + "use strict"; + + XHi = class { + static { + YHi = Symbol.toStringTag; + } + constructor(i, e) { + this.b = e; + this.a = new Map(); + this[YHi] = "SetWithKey"; + for (const t of i) { + this.add(t); + } + } + get size() { + return this.a.size; + } + add(i) { + const e = this.b(i); + this.a.set(e, i); + return this; + } + delete(i) { + return this.a.delete(this.b(i)); + } + has(i) { + return this.a.has(this.b(i)); + } + *entries() { + for (const i of this.a.values()) { + yield [i, i]; + } + } + keys() { + return this.values(); + } + *values() { + for (const i of this.a.values()) { + yield i; + } + } + clear() { + this.a.clear(); + } + forEach(i, e) { + this.a.forEach(t => i.call(e, t, t, this)); + } + [Symbol.iterator]() { + return this.values(); + } + }; + } +}); +function kVn(i) { + Pq.setUnexpectedErrorHandler(i); +} +function unt(i) { + Pq.onUnexpectedError(i); +} +function xs(i) { + if (!ca(i)) { + Pq.onUnexpectedError(i); + } +} +function uh(i) { + if (!ca(i)) { + Pq.onUnexpectedExternalError(i); + } +} +function Jhe(i) { + if (i instanceof Error) { + const { + name: e, + message: t + } = i; + const s = i.stacktrace || i.stack; + return { + $isError: true, + name: e, + message: t, + stack: s, + noTelemetry: uf.isErrorNoTelemetry(i) + }; + } + return i; +} +function dnt(i) { + let e; + if (i.noTelemetry) { + e = new uf(); + } else { + e = new Error(); + e.name = i.name; + } + e.message = i.message; + e.stack = i.stack; + return e; +} +function ca(i) { + if (i instanceof fl) { + return true; + } else { + return i instanceof Error && i.name === Ghe && i.message === Ghe; + } +} +function SL() { + const i = new Error(Ghe); + i.name = i.message; + return i; +} +function Hl(i) { + if (i) { + return new Error(`Illegal argument: ${i}`); + } else { + return new Error("Illegal argument"); + } +} +function FBt(i) { + if (i) { + return new Error(`Illegal state: ${i}`); + } else { + return new Error("Illegal state"); + } +} +function cc(i) { + if (i) { + if (i.message) { + return i.message; + } else if (i.stack) { + return i.stack.split(` +`)[0]; + } else { + return String(i); + } + } else { + return "Error"; + } +} +var QHi; +var Pq; +var Ghe; +var fl; +var Khe; +var uf; +var co; +var Ut = ue({ + "out-build/vs/base/common/errors.js"() { + "use strict"; + + QHi = class { + constructor() { + this.b = []; + this.a = function (i) { + setTimeout(() => { + throw i.stack ? uf.isErrorNoTelemetry(i) ? new uf(`${i.message} + +${i.stack}`) : new Error(`${i.message} + +${i.stack}`) : i; + }, 0); + }; + } + addListener(i) { + this.b.push(i); + return () => { + this.d(i); + }; + } + c(i) { + this.b.forEach(e => { + e(i); + }); + } + d(i) { + this.b.splice(this.b.indexOf(i), 1); + } + setUnexpectedErrorHandler(i) { + this.a = i; + } + getUnexpectedErrorHandler() { + return this.a; + } + onUnexpectedError(i) { + this.a(i); + this.c(i); + } + onUnexpectedExternalError(i) { + this.a(i); + } + }; + Pq = new QHi(); + Ghe = "Canceled"; + fl = class extends Error { + constructor() { + super(Ghe); + this.name = this.message; + } + }; + Khe = class extends Error { + constructor(i) { + super("NotSupported"); + if (i) { + this.message = i; + } + } + }; + uf = class g3i extends Error { + constructor(e) { + super(e); + this.name = "CodeExpectedError"; + } + static fromError(e) { + if (e instanceof g3i) { + return e; + } + const t = new g3i(); + t.message = e.message; + t.stack = e.stack; + return t; + } + static isErrorNoTelemetry(e) { + return e.name === "CodeExpectedError"; + } + }; + co = class K2n extends Error { + constructor(e) { + super(e || "An unexpected bug occurred."); + Object.setPrototypeOf(this, K2n.prototype); + } + }; + } +}); +function Py(i, e) { + const t = this; + let s = false; + let n; + return function () { + if (s) { + return n; + } + s = true; + if (e) { + try { + n = i.apply(t, arguments); + } finally { + e(); + } + } else { + n = i.apply(t, arguments); + } + return n; + }; +} +var A0 = ue({ + "out-build/vs/base/common/functional.js"() { + "use strict"; + } +}); +function oM(i, e) { + const t = OBt(i, e); + if (t !== -1) { + return i[t]; + } +} +function OBt(i, e, t = i.length - 1) { + for (let s = t; s >= 0; s--) { + const n = i[s]; + if (e(n)) { + return s; + } + } + return -1; +} +function kZ(i, e) { + const t = EZ(i, e); + if (t === -1) { + return undefined; + } else { + return i[t]; + } +} +function EZ(i, e, t = 0, s = i.length) { + let n = t; + let r = s; + while (n < r) { + const o = Math.floor((n + r) / 2); + if (e(i[o])) { + n = o + 1; + } else { + r = o; + } + } + return n - 1; +} +function EVn(i, e) { + const t = aM(i, e); + if (t === i.length) { + return undefined; + } else { + return i[t]; + } +} +function aM(i, e, t = 0, s = i.length) { + let n = t; + let r = s; + while (n < r) { + const o = Math.floor((n + r) / 2); + if (e(i[o])) { + r = o; + } else { + n = o + 1; + } + } + return n; +} +function _Bt(i, e) { + if (i.length === 0) { + return; + } + let t = i[0]; + for (let s = 1; s < i.length; s++) { + const n = i[s]; + if (e(n, t) > 0) { + t = n; + } + } + return t; +} +function IVn(i, e) { + if (i.length === 0) { + return; + } + let t = i[0]; + for (let s = 1; s < i.length; s++) { + const n = i[s]; + if (e(n, t) >= 0) { + t = n; + } + } + return t; +} +function ZHi(i, e) { + return _Bt(i, (t, s) => -e(t, s)); +} +function DVn(i, e) { + if (i.length === 0) { + return -1; + } + let t = 0; + for (let s = 1; s < i.length; s++) { + const n = i[s]; + if (e(n, i[t]) > 0) { + t = s; + } + } + return t; +} +function hnt(i, e) { + for (const t of i) { + const s = e(t); + if (s !== undefined) { + return s; + } + } +} +var BBt; +var qg = ue({ + "out-build/vs/base/common/arraysFind.js"() { + "use strict"; + + BBt = class Y2n { + static { + this.assertInvariants = false; + } + constructor(e) { + this.e = e; + this.c = 0; + } + findLastMonotonous(e) { + if (Y2n.assertInvariants) { + if (this.d) { + for (const s of this.e) { + if (this.d(s) && !e(s)) { + throw new Error("MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate."); + } + } + } + this.d = e; + } + const t = EZ(this.e, e, this.c); + this.c = t + 1; + if (t === -1) { + return undefined; + } else { + return this.e[t]; + } + } + }; + } +}); +function qb(i) { + if (i.length === 0) { + throw new Error("Invalid tail call"); + } + return [i.slice(0, i.length - 1), i[i.length - 1]]; +} +function Go(i, e, t = (s, n) => s === n) { + if (i === e) { + return true; + } + if (!i || !e || i.length !== e.length) { + return false; + } + for (let s = 0, n = i.length; s < n; s++) { + if (!t(i[s], e[s])) { + return false; + } + } + return true; +} +function TVn(i, e) { + const t = i.length - 1; + if (e < t) { + i[e] = i[t]; + } + i.pop(); +} +function LB(i, e, t) { + return fnt(i.length, s => t(i[s], e)); +} +function fnt(i, e) { + let t = 0; + let s = i - 1; + while (t <= s) { + const n = (t + s) / 2 | 0; + const r = e(n); + if (r < 0) { + t = n + 1; + } else if (r > 0) { + s = n - 1; + } else { + return n; + } + } + return -(t + 1); +} +function gnt(i, e, t) { + i = i | 0; + if (i >= e.length) { + throw new TypeError("invalid index"); + } + const s = e[Math.floor(e.length * Math.random())]; + const n = []; + const r = []; + const o = []; + for (const a of e) { + const l = t(a, s); + if (l < 0) { + n.push(a); + } else if (l > 0) { + r.push(a); + } else { + o.push(a); + } + } + if (i < n.length) { + return gnt(i, n, t); + } else if (i < n.length + o.length) { + return o[0]; + } else { + return gnt(i - (n.length + o.length), r, t); + } +} +function pI(i, e) { + const t = []; + let s; + for (const n of i.slice(0).sort(e)) { + if (!s || e(s[0], n) !== 0) { + s = [n]; + t.push(s); + } else { + s.push(n); + } + } + return t; +} +function* pnt(i, e) { + let t; + let s; + for (const n of i) { + if (s !== undefined && e(s, n)) { + t.push(n); + } else { + if (t) { + yield t; + } + t = [n]; + } + s = n; + } + if (t) { + yield t; + } +} +function eqi(i, e) { + for (let t = 0; t <= i.length; t++) { + e(t === 0 ? undefined : i[t - 1], t === i.length ? undefined : i[t]); + } +} +function PVn(i, e) { + for (let t = 0; t < i.length; t++) { + e(t === 0 ? undefined : i[t - 1], i[t], t + 1 === i.length ? undefined : i[t + 1]); + } +} +function tqi(i, e, t) { + const s = []; + function n(a, l, c) { + if (l === 0 && c.length === 0) { + return; + } + const u = s[s.length - 1]; + if (u && u.start + u.deleteCount === a) { + u.deleteCount += l; + u.toInsert.push(...c); + } else { + s.push({ + start: a, + deleteCount: l, + toInsert: c + }); + } + } + let r = 0; + let o = 0; + while (true) { + if (r === i.length) { + n(r, 0, e.slice(o)); + break; + } + if (o === e.length) { + n(r, i.length - r, []); + break; + } + const a = i[r]; + const l = e[o]; + const c = t(a, l); + if (c === 0) { + r += 1; + o += 1; + } else if (c < 0) { + n(r, 1, []); + r += 1; + } else if (c > 0) { + n(r, 0, [l]); + o += 1; + } + } + return s; +} +function RB(i, e, t) { + const s = tqi(i, e, t); + const n = []; + const r = []; + for (const o of s) { + n.push(...i.slice(o.start, o.start + o.deleteCount)); + r.push(...o.toInsert); + } + return { + removed: n, + added: r + }; +} +function dr(i) { + return i.filter(e => !!e); +} +function Y3(i) { + let e = 0; + for (let t = 0; t < i.length; t++) { + if (i[t]) { + i[e] = i[t]; + e += 1; + } + } + i.length = e; +} +function LVn(i, e, t) { + i.splice(t, 0, i.splice(e, 1)[0]); +} +function mnt(i) { + return !Array.isArray(i) || i.length === 0; +} +function Ac(i) { + return Array.isArray(i) && i.length > 0; +} +function Ea(i, e = t => t) { + const t = new Set(); + return i.filter(s => { + const n = e(s); + if (t.has(n)) { + return false; + } else { + t.add(n); + return true; + } + }); +} +function RVn(i) { + const e = new Set(); + return t => { + const s = i(t); + if (e.has(s)) { + return false; + } else { + e.add(s); + return true; + } + }; +} +function NVn(i, e, t = (s, n) => s === n) { + let s = 0; + for (let n = 0, r = Math.min(i.length, e.length); n < r && t(i[n], e[n]); n++) { + s++; + } + return s; +} +function $0(i, e) { + let t = typeof e == "number" ? i : 0; + if (typeof e == "number") { + t = i; + } else { + t = 0; + e = i; + } + const s = []; + if (t <= e) { + for (let n = t; n < e; n++) { + s.push(n); + } + } else { + for (let n = t; n > e; n--) { + s.push(n); + } + } + return s; +} +function Yhe(i, e, t) { + return i.reduce((s, n) => { + s[e(n)] = t ? t(n) : n; + return s; + }, Object.create(null)); +} +function xL(i, e) { + i.push(e); + return () => iqi(i, e); +} +function iqi(i, e) { + const t = i.indexOf(e); + if (t > -1) { + i.splice(t, 1); + return e; + } +} +function Xhe(i, e, t) { + const s = i.slice(0, e); + const n = i.slice(e); + return s.concat(t, n); +} +function bnt(i, e) { + let t; + if (typeof e == "number") { + let s = e; + t = () => { + const n = Math.sin(s++) * 179426549; + return n - Math.floor(n); + }; + } else { + t = Math.random; + } + for (let s = i.length - 1; s > 0; s -= 1) { + const n = Math.floor(t() * (s + 1)); + const r = i[s]; + i[s] = i[n]; + i[n] = r; + } +} +function UBt(i, e) { + const t = i.indexOf(e); + if (t > -1) { + i.splice(t, 1); + i.unshift(e); + } +} +function vnt(i, e) { + const t = i.indexOf(e); + if (t > -1) { + i.splice(t, 1); + i.push(e); + } +} +function WBt(i, e) { + for (const t of e) { + i.push(t); + } +} +function MVn(i, e) { + if (Array.isArray(i)) { + return i.map(e); + } else { + return e(i); + } +} +function VC(i) { + if (Array.isArray(i)) { + return i; + } else { + return [i]; + } +} +function sqi(i, e, t) { + const s = nqi(i, e); + const n = i.length; + const r = t.length; + i.length = n + r; + for (let o = n - 1; o >= s; o--) { + i[o + r] = i[o]; + } + for (let o = 0; o < r; o++) { + i[o + s] = t[o]; + } +} +function VBt(i, e, t, s) { + const n = nqi(i, e); + let r = i.splice(n, t); + if (r === undefined) { + r = []; + } + sqi(i, n, s); + return r; +} +function nqi(i, e) { + if (e < 0) { + return Math.max(e + i.length, 0); + } else { + return Math.min(e, i.length); + } +} +function jg(i, e) { + return (t, s) => e(i(t), i(s)); +} +function rqi(...i) { + return (e, t) => { + for (const s of i) { + const n = s(e, t); + if (!kL.isNeitherLessOrGreaterThan(n)) { + return n; + } + } + return kL.neitherLessOrGreaterThan; + }; +} +function oqi(i) { + return (e, t) => -i(e, t); +} +async function AVn(i, e) { + return (await Promise.all(i.map(async (s, n) => ({ + element: s, + ok: await e(s, n) + })))).find(s => s.ok)?.element; +} +var kL; +var Ly; +var aqi; +var EL; +var IZ; +var lqi; +var Jt = ue({ + "out-build/vs/base/common/arrays.js"() { + "use strict"; + + qg(); + Ut(); + (function (i) { + function e(r) { + return r < 0; + } + i.isLessThan = e; + function t(r) { + return r <= 0; + } + i.isLessThanOrEqual = t; + function s(r) { + return r > 0; + } + i.isGreaterThan = s; + function n(r) { + return r === 0; + } + i.isNeitherLessOrGreaterThan = n; + i.greaterThan = 1; + i.lessThan = -1; + i.neitherLessOrGreaterThan = 0; + })(kL ||= {}); + Ly = (i, e) => i - e; + aqi = (i, e) => Ly(i ? 1 : 0, e ? 1 : 0); + EL = class { + constructor(i) { + this.g = i; + this.c = 0; + this.d = this.g.length - 1; + } + get length() { + return this.d - this.c + 1; + } + takeWhile(i) { + let e = this.c; + while (e < this.g.length && i(this.g[e])) { + e++; + } + const t = e === this.c ? null : this.g.slice(this.c, e); + this.c = e; + return t; + } + takeFromEndWhile(i) { + let e = this.d; + while (e >= 0 && i(this.g[e])) { + e--; + } + const t = e === this.d ? null : this.g.slice(e + 1, this.d + 1); + this.d = e; + return t; + } + peek() { + if (this.length !== 0) { + return this.g[this.c]; + } + } + peekLast() { + if (this.length !== 0) { + return this.g[this.d]; + } + } + dequeue() { + const i = this.g[this.c]; + this.c++; + return i; + } + removeLast() { + const i = this.g[this.d]; + this.d--; + return i; + } + takeCount(i) { + const e = this.g.slice(this.c, this.c + i); + this.c += i; + return e; + } + }; + IZ = class nFt { + static { + this.empty = new nFt(e => {}); + } + constructor(e) { + this.iterate = e; + } + forEach(e) { + this.iterate(t => { + e(t); + return true; + }); + } + toArray() { + const e = []; + this.iterate(t => { + e.push(t); + return true; + }); + return e; + } + filter(e) { + return new nFt(t => this.iterate(s => e(s) ? t(s) : true)); + } + map(e) { + return new nFt(t => this.iterate(s => t(e(s)))); + } + some(e) { + let t = false; + this.iterate(s => { + t = e(s); + return !t; + }); + return t; + } + findFirst(e) { + let t; + this.iterate(s => e(s) ? (t = s, false) : true); + return t; + } + findLast(e) { + let t; + this.iterate(s => { + if (e(s)) { + t = s; + } + return true; + }); + return t; + } + findLastMaxBy(e) { + let t; + let s = true; + this.iterate(n => { + if (s || kL.isGreaterThan(e(n, t))) { + s = false; + t = n; + } + return true; + }); + return t; + } + }; + lqi = class p3i { + constructor(e) { + this.c = e; + } + static createSortPermutation(e, t) { + const s = Array.from(e.keys()).sort((n, r) => t(e[n], e[r])); + return new p3i(s); + } + apply(e) { + return e.map((t, s) => e[this.c[s]]); + } + inverse() { + const e = this.c.slice(); + for (let t = 0; t < this.c.length; t++) { + e[this.c[t]] = t; + } + return new p3i(e); + } + }; + } +}); +function Lq(i, e, t) { + let s = i.get(e); + if (s === undefined) { + s = t; + i.set(e, s); + } + return s; +} +function $Vn(i) { + return Array.isArray(i); +} +function FVn(i, e) { + if (i === e) { + return true; + } + if (i.size !== e.size) { + return false; + } + for (const [t, s] of i) { + if (!e.has(t) || e.get(t) !== s) { + return false; + } + } + for (const [t] of e) { + if (!i.has(t)) { + return false; + } + } + return true; +} +var cqi; +var uqi; +var dqi; +var hqi; +var dn; +var Yf; +var fqi; +var DZ; +var HBt; +var vc; +var gqi; +var qBt; +var pqi; +var TZ; +var ynt; +var jBt; +var In = ue({ + "out-build/vs/base/common/map.js"() { + "use strict"; + + hqi = class { + constructor(i, e) { + this.uri = i; + this.value = e; + } + }; + dn = class $Pe { + static { + this.c = e => e.toString(); + } + constructor(e, t) { + this[cqi] = "ResourceMap"; + if (e instanceof $Pe) { + this.d = new Map(e.d); + this.e = t ?? $Pe.c; + } else if ($Vn(e)) { + this.d = new Map(); + this.e = t ?? $Pe.c; + for (const [s, n] of e) { + this.set(s, n); + } + } else { + this.d = new Map(); + this.e = e ?? $Pe.c; + } + } + set(e, t) { + this.d.set(this.e(e), new hqi(e, t)); + return this; + } + get(e) { + return this.d.get(this.e(e))?.value; + } + has(e) { + return this.d.has(this.e(e)); + } + get size() { + return this.d.size; + } + clear() { + this.d.clear(); + } + delete(e) { + return this.d.delete(this.e(e)); + } + forEach(e, t) { + if (typeof t !== "undefined") { + e = e.bind(t); + } + for (const [s, n] of this.d) { + e(n.value, n.uri, this); + } + } + *values() { + for (const e of this.d.values()) { + yield e.value; + } + } + *keys() { + for (const e of this.d.values()) { + yield e.uri; + } + } + *entries() { + for (const e of this.d.values()) { + yield [e.uri, e.value]; + } + } + *[(cqi = Symbol.toStringTag, Symbol.iterator)]() { + for (const [, e] of this.d) { + yield [e.uri, e.value]; + } + } + }; + Yf = class { + constructor(i, e) { + this[uqi] = "ResourceSet"; + if (!i || typeof i == "function") { + this.c = new dn(i); + } else { + this.c = new dn(e); + i.forEach(this.add, this); + } + } + get size() { + return this.c.size; + } + add(i) { + this.c.set(i, i); + return this; + } + clear() { + this.c.clear(); + } + delete(i) { + return this.c.delete(i); + } + forEach(i, e) { + this.c.forEach((t, s) => i.call(e, s, s, this)); + } + has(i) { + return this.c.has(i); + } + entries() { + return this.c.entries(); + } + keys() { + return this.c.keys(); + } + values() { + return this.c.keys(); + } + [(uqi = Symbol.toStringTag, Symbol.iterator)]() { + return this.keys(); + } + }; + (function (i) { + i[i.None = 0] = "None"; + i[i.AsOld = 1] = "AsOld"; + i[i.AsNew = 2] = "AsNew"; + })(fqi ||= {}); + DZ = class { + constructor() { + this[dqi] = "LinkedMap"; + this.c = new Map(); + this.d = undefined; + this.e = undefined; + this.f = 0; + this.g = 0; + } + clear() { + this.c.clear(); + this.d = undefined; + this.e = undefined; + this.f = 0; + this.g++; + } + isEmpty() { + return !this.d && !this.e; + } + get size() { + return this.f; + } + get first() { + return this.d?.value; + } + get last() { + return this.e?.value; + } + has(i) { + return this.c.has(i); + } + get(i, e = 0) { + const t = this.c.get(i); + if (t) { + if (e !== 0) { + this.m(t, e); + } + return t.value; + } + } + set(i, e, t = 0) { + let s = this.c.get(i); + if (s) { + s.value = e; + if (t !== 0) { + this.m(s, t); + } + } else { + s = { + key: i, + value: e, + next: undefined, + previous: undefined + }; + switch (t) { + case 0: + this.k(s); + break; + case 1: + this.j(s); + break; + case 2: + this.k(s); + break; + default: + this.k(s); + break; + } + this.c.set(i, s); + this.f++; + } + return this; + } + delete(i) { + return !!this.remove(i); + } + remove(i) { + const e = this.c.get(i); + if (e) { + this.c.delete(i); + this.l(e); + this.f--; + return e.value; + } + } + shift() { + if (!this.d && !this.e) { + return; + } + if (!this.d || !this.e) { + throw new Error("Invalid list"); + } + const i = this.d; + this.c.delete(i.key); + this.l(i); + this.f--; + return i.value; + } + forEach(i, e) { + const t = this.g; + let s = this.d; + while (s) { + if (e) { + i.bind(e)(s.value, s.key, this); + } else { + i(s.value, s.key, this); + } + if (this.g !== t) { + throw new Error("LinkedMap got modified during iteration."); + } + s = s.next; + } + } + keys() { + const i = this; + const e = this.g; + let t = this.d; + const s = { + [Symbol.iterator]() { + return s; + }, + next() { + if (i.g !== e) { + throw new Error("LinkedMap got modified during iteration."); + } + if (t) { + const n = { + value: t.key, + done: false + }; + t = t.next; + return n; + } else { + return { + value: undefined, + done: true + }; + } + } + }; + return s; + } + values() { + const i = this; + const e = this.g; + let t = this.d; + const s = { + [Symbol.iterator]() { + return s; + }, + next() { + if (i.g !== e) { + throw new Error("LinkedMap got modified during iteration."); + } + if (t) { + const n = { + value: t.value, + done: false + }; + t = t.next; + return n; + } else { + return { + value: undefined, + done: true + }; + } + } + }; + return s; + } + entries() { + const i = this; + const e = this.g; + let t = this.d; + const s = { + [Symbol.iterator]() { + return s; + }, + next() { + if (i.g !== e) { + throw new Error("LinkedMap got modified during iteration."); + } + if (t) { + const n = { + value: [t.key, t.value], + done: false + }; + t = t.next; + return n; + } else { + return { + value: undefined, + done: true + }; + } + } + }; + return s; + } + [(dqi = Symbol.toStringTag, Symbol.iterator)]() { + return this.entries(); + } + h(i) { + if (i >= this.size) { + return; + } + if (i === 0) { + this.clear(); + return; + } + let e = this.d; + let t = this.size; + while (e && t > i) { + this.c.delete(e.key); + e = e.next; + t--; + } + this.d = e; + this.f = t; + if (e) { + e.previous = undefined; + } + this.g++; + } + i(i) { + if (i >= this.size) { + return; + } + if (i === 0) { + this.clear(); + return; + } + let e = this.e; + let t = this.size; + while (e && t > i) { + this.c.delete(e.key); + e = e.previous; + t--; + } + this.e = e; + this.f = t; + if (e) { + e.next = undefined; + } + this.g++; + } + j(i) { + if (!this.d && !this.e) { + this.e = i; + } else if (this.d) { + i.next = this.d; + this.d.previous = i; + } else { + throw new Error("Invalid list"); + } + this.d = i; + this.g++; + } + k(i) { + if (!this.d && !this.e) { + this.d = i; + } else if (this.e) { + i.previous = this.e; + this.e.next = i; + } else { + throw new Error("Invalid list"); + } + this.e = i; + this.g++; + } + l(i) { + if (i === this.d && i === this.e) { + this.d = undefined; + this.e = undefined; + } else if (i === this.d) { + if (!i.next) { + throw new Error("Invalid list"); + } + i.next.previous = undefined; + this.d = i.next; + } else if (i === this.e) { + if (!i.previous) { + throw new Error("Invalid list"); + } + i.previous.next = undefined; + this.e = i.previous; + } else { + const e = i.next; + const t = i.previous; + if (!e || !t) { + throw new Error("Invalid list"); + } + e.previous = t; + t.next = e; + } + i.next = undefined; + i.previous = undefined; + this.g++; + } + m(i, e) { + if (!this.d || !this.e) { + throw new Error("Invalid list"); + } + if (e === 1 || e === 2) { + if (e === 1) { + if (i === this.d) { + return; + } + const t = i.next; + const s = i.previous; + if (i === this.e) { + s.next = undefined; + this.e = s; + } else { + t.previous = s; + s.next = t; + } + i.previous = undefined; + i.next = this.d; + this.d.previous = i; + this.d = i; + this.g++; + } else if (e === 2) { + if (i === this.e) { + return; + } + const t = i.next; + const s = i.previous; + if (i === this.d) { + t.previous = undefined; + this.d = t; + } else { + t.previous = s; + s.next = t; + } + i.next = undefined; + i.previous = this.e; + this.e.next = i; + this.e = i; + this.g++; + } + } + } + toJSON() { + const i = []; + this.forEach((e, t) => { + i.push([t, e]); + }); + return i; + } + fromJSON(i) { + this.clear(); + for (const [e, t] of i) { + this.set(e, t); + } + } + }; + HBt = class extends DZ { + constructor(i, e = 1) { + super(); + this.n = i; + this.o = Math.min(Math.max(0, e), 1); + } + get limit() { + return this.n; + } + set limit(i) { + this.n = i; + this.p(); + } + get ratio() { + return this.o; + } + set ratio(i) { + this.o = Math.min(Math.max(0, i), 1); + this.p(); + } + get(i, e = 2) { + return super.get(i, e); + } + peek(i) { + return super.get(i, 0); + } + set(i, e) { + super.set(i, e, 2); + return this; + } + p() { + if (this.size > this.n) { + this.q(Math.round(this.n * this.o)); + } + } + }; + vc = class extends HBt { + constructor(i, e = 1) { + super(i, e); + } + q(i) { + this.h(i); + } + set(i, e) { + super.set(i, e); + this.p(); + return this; + } + }; + gqi = class extends HBt { + constructor(i, e = 1) { + super(i, e); + } + q(i) { + this.i(i); + } + set(i, e) { + if (this.n <= this.size && !this.has(i)) { + this.q(Math.round(this.n * this.o) - 1); + } + super.set(i, e); + return this; + } + }; + qBt = class { + constructor() { + this.c = new Map(); + } + add(i) { + this.c.set(i, (this.c.get(i) || 0) + 1); + return this; + } + delete(i) { + let e = this.c.get(i) || 0; + if (e === 0) { + return false; + } else { + e--; + if (e === 0) { + this.c.delete(i); + } else { + this.c.set(i, e); + } + return true; + } + } + has(i) { + return this.c.has(i); + } + }; + pqi = class { + constructor(i) { + this.c = new Map(); + this.d = new Map(); + if (i) { + for (const [e, t] of i) { + this.set(e, t); + } + } + } + clear() { + this.c.clear(); + this.d.clear(); + } + set(i, e) { + this.c.set(i, e); + this.d.set(e, i); + } + get(i) { + return this.c.get(i); + } + getKey(i) { + return this.d.get(i); + } + delete(i) { + const e = this.c.get(i); + if (e === undefined) { + return false; + } else { + this.c.delete(i); + this.d.delete(e); + return true; + } + } + forEach(i, e) { + this.c.forEach((t, s) => { + i.call(e, t, s, this); + }); + } + keys() { + return this.c.keys(); + } + values() { + return this.c.values(); + } + }; + TZ = class { + constructor() { + this.c = new Map(); + } + add(i, e) { + let t = this.c.get(i); + if (!t) { + t = new Set(); + this.c.set(i, t); + } + t.add(e); + } + delete(i, e) { + const t = this.c.get(i); + if (t) { + t.delete(e); + if (t.size === 0) { + this.c.delete(i); + } + } + } + forEach(i, e) { + const t = this.c.get(i); + if (t) { + t.forEach(e); + } + } + get(i) { + const e = this.c.get(i); + return e || new Set(); + } + }; + ynt = class { + constructor() { + this.c = {}; + } + set(i, e, t) { + this.c[i] ||= {}; + this.c[i][e] = t; + } + get(i, e) { + return this.c[i]?.[e]; + } + clear() { + this.c = {}; + } + *values() { + for (const i in this.c) { + for (const e in this.c[i]) { + const t = this.c[i][e]; + if (t) { + yield t; + } + } + } + } + }; + jBt = class { + constructor() { + this.c = new ynt(); + } + set(i, e, t, s, n) { + if (!this.c.get(i, e)) { + this.c.set(i, e, new ynt()); + } + this.c.get(i, e).set(t, s, n); + } + get(i, e, t, s) { + return this.c.get(i, e)?.get(t, s); + } + clear() { + this.c.clear(); + } + }; + } +}); +var Ws; +var sa = ue({ + "out-build/vs/base/common/iterator.js"() { + "use strict"; + + (function (i) { + function e(S) { + return S && typeof S == "object" && typeof S[Symbol.iterator] == "function"; + } + i.is = e; + const t = Object.freeze([]); + function s() { + return t; + } + i.empty = s; + function* n(S) { + yield S; + } + i.single = n; + function r(S) { + if (e(S)) { + return S; + } else { + return n(S); + } + } + i.wrap = r; + function o(S) { + return S || t; + } + i.from = o; + function* a(S) { + for (let x = S.length - 1; x >= 0; x--) { + yield S[x]; + } + } + i.reverse = a; + function l(S) { + return !S || S[Symbol.iterator]().next().done === true; + } + i.isEmpty = l; + function c(S) { + return S[Symbol.iterator]().next().value; + } + i.first = c; + function u(S, x) { + let k = 0; + for (const E of S) { + if (x(E, k++)) { + return true; + } + } + return false; + } + i.some = u; + function d(S, x) { + for (const k of S) { + if (x(k)) { + return k; + } + } + } + i.find = d; + function* h(S, x) { + for (const k of S) { + if (x(k)) { + yield k; + } + } + } + i.filter = h; + function* g(S, x) { + let k = 0; + for (const E of S) { + yield x(E, k++); + } + } + i.map = g; + function* p(S, x) { + let k = 0; + for (const E of S) { + yield* x(E, k++); + } + } + i.flatMap = p; + function* b(...S) { + for (const x of S) { + yield* x; + } + } + i.concat = b; + function v(S, x, k) { + let E = k; + for (const D of S) { + E = x(E, D); + } + return E; + } + i.reduce = v; + function* y(S, x, k = S.length) { + if (x < -S.length) { + x = 0; + } + if (x < 0) { + x += S.length; + } + if (k < 0) { + k += S.length; + } else if (k > S.length) { + k = S.length; + } + for (; x < k; x++) { + yield S[x]; + } + } + i.slice = y; + function w(S, x = Number.POSITIVE_INFINITY) { + const k = []; + if (x === 0) { + return [k, S]; + } + const E = S[Symbol.iterator](); + for (let D = 0; D < x; D++) { + const P = E.next(); + if (P.done) { + return [k, i.empty()]; + } + k.push(P.value); + } + return [k, { + [Symbol.iterator]() { + return E; + } + }]; + } + i.consume = w; + async function C(S) { + const x = []; + for await (const k of S) { + x.push(k); + } + return Promise.resolve(x); + } + i.asyncToArray = C; + })(Ws ||= {}); + } +}); +function wnt(i) { + X3 = i; +} +function PZ(i) { + X3?.trackDisposable(i); + return i; +} +function LZ(i) { + X3?.markAsDisposed(i); +} +function Qhe(i, e) { + X3?.setParent(i, e); +} +function OVn(i, e) { + if (X3) { + for (const t of i) { + X3.setParent(t, e); + } + } +} +function IL(i) { + X3?.markAsSingleton(i); + return i; +} +function bT(i) { + return typeof i == "object" && i !== null && typeof i.dispose == "function" && i.dispose.length === 0; +} +function si(i) { + if (Ws.is(i)) { + const e = []; + for (const t of i) { + if (t) { + try { + t.dispose(); + } catch (s) { + e.push(s); + } + } + } + if (e.length === 1) { + throw e[0]; + } + if (e.length > 1) { + throw new AggregateError(e, "Encountered errors while disposing of store"); + } + if (Array.isArray(i)) { + return []; + } else { + return i; + } + } else if (i) { + i.dispose(); + return i; + } +} +function zBt(i) { + for (const e of i) { + if (bT(e)) { + e.dispose(); + } + } + return []; +} +function Gc(...i) { + const e = Ue(() => si(i)); + OVn(i, e); + return e; +} +function Ue(i) { + const e = PZ({ + dispose: Py(() => { + LZ(e); + i(); + }) + }); + return e; +} +var JBt; +var mqi; +var bqi; +var vqi; +var X3; +var yqi; +var wqi; +var Q; +var H; +var ki; +var GBt; +var Zhe; +var Rq; +var KBt; +var Cqi; +var Bo; +var q = ue({ + "out-build/vs/base/common/lifecycle.js"() { + "use strict"; + + Jt(); + mT(); + In(); + A0(); + sa(); + JBt = false; + mqi = i => { + JBt = i; + }; + bqi = () => JBt; + vqi = false; + X3 = null; + yqi = class { + constructor() { + this.a = new FinalizationRegistry(i => { + if (bqi()) { + console.warn(`[LEAKED DISPOSABLE] ${i}`); + } + }); + } + trackDisposable(i) { + const e = new Error("CREATED via:").stack; + this.a.register(i, e, i); + } + setParent(i, e) { + if (e) { + this.a.unregister(i); + } else { + this.trackDisposable(i); + } + } + markAsDisposed(i) { + this.a.unregister(i); + } + markAsSingleton(i) { + this.a.unregister(i); + } + }; + wqi = class X2n { + constructor() { + this.b = new Map(); + } + static { + this.a = 0; + } + c(e) { + let t = this.b.get(e); + if (!t) { + t = { + parent: null, + source: null, + isSingleton: false, + value: e, + idx: X2n.a++ + }; + this.b.set(e, t); + } + return t; + } + trackDisposable(e) { + const t = this.c(e); + t.source ||= new Error().stack; + } + setParent(e, t) { + const s = this.c(e); + s.parent = t; + } + markAsDisposed(e) { + this.b.delete(e); + } + markAsSingleton(e) { + this.c(e).isSingleton = true; + } + f(e, t) { + const s = t.get(e); + if (s) { + return s; + } + const n = e.parent ? this.f(this.c(e.parent), t) : e; + t.set(e, n); + return n; + } + getTrackedDisposables() { + const e = new Map(); + return [...this.b.entries()].filter(([, s]) => s.source !== null && !this.f(s, e).isSingleton).flatMap(([s]) => s); + } + computeLeakingDisposables(e = 10, t) { + let s; + if (t) { + s = t; + } else { + const l = new Map(); + const c = [...this.b.values()].filter(d => d.source !== null && !this.f(d, l).isSingleton); + if (c.length === 0) { + return; + } + const u = new Set(c.map(d => d.value)); + s = c.filter(d => !d.parent || !u.has(d.parent)); + if (s.length === 0) { + throw new Error("There are cyclic diposable chains!"); + } + } + if (!s) { + return; + } + function n(l) { + function c(d, h) { + while (d.length > 0 && h.some(g => typeof g == "string" ? g === d[0] : d[0].match(g))) { + d.shift(); + } + } + const u = l.source.split(` +`).map(d => d.trim().replace("at ", "")).filter(d => d !== ""); + c(u, ["Error", /^trackDisposable \(.*\)$/, /^DisposableTracker.trackDisposable \(.*\)$/]); + return u.reverse(); + } + const r = new TZ(); + for (const l of s) { + const c = n(l); + for (let u = 0; u <= c.length; u++) { + r.add(c.slice(0, u).join(` +`), l); + } + } + s.sort(jg(l => l.idx, Ly)); + let o = ""; + let a = 0; + for (const l of s.slice(0, e)) { + a++; + const c = n(l); + const u = []; + for (let d = 0; d < c.length; d++) { + let h = c[d]; + h = `(shared with ${r.get(c.slice(0, d + 1).join(` +`)).size}/${s.length} leaks) at ${h}`; + const p = r.get(c.slice(0, d).join(` +`)); + const b = Tq([...p].map(v => n(v)[d]), v => v); + delete b[c[d]]; + for (const [v, y] of Object.entries(b)) { + u.unshift(` - stacktraces of ${y.length} other leaks continue with ${v}`); + } + u.unshift(h); + } + o += ` + + +==================== Leaking disposable ${a}/${s.length}: ${l.value.constructor.name} ==================== +${u.join(` +`)} +============================================================ + +`; + } + if (s.length > e) { + o += ` + + +... and ${s.length - e} more leaking disposables + +`; + } + return { + leaks: s, + details: o + }; + } + }; + if (vqi) { + const i = "__is_disposable_tracked__"; + wnt(new class { + trackDisposable(e) { + const t = new Error("Potentially leaked disposable").stack; + setTimeout(() => { + if (!e[i]) { + console.log(t); + } + }, 3000); + } + setParent(e, t) { + if (e && e !== H.None) { + try { + e[i] = true; + } catch {} + } + } + markAsDisposed(e) { + if (e && e !== H.None) { + try { + e[i] = true; + } catch {} + } + } + markAsSingleton(e) {} + }()); + } + Q = class Q2n { + static { + this.DISABLE_DISPOSED_WARNING = false; + } + constructor() { + this.f = new Set(); + this.g = false; + PZ(this); + } + dispose() { + if (!this.g) { + LZ(this); + this.g = true; + this.clear(); + } + } + get isDisposed() { + return this.g; + } + clear() { + if (this.f.size !== 0) { + try { + si(this.f); + } finally { + this.f.clear(); + } + } + } + add(e) { + if (!e) { + return e; + } + if (e === this) { + throw new Error("Cannot register a disposable on itself!"); + } + Qhe(e, this); + if (this.g) { + if (!Q2n.DISABLE_DISPOSED_WARNING) { + console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack); + } + } else { + this.f.add(e); + } + return e; + } + delete(e) { + if (e) { + if (e === this) { + throw new Error("Cannot dispose a disposable on itself!"); + } + this.f.delete(e); + e.dispose(); + } + } + deleteAndLeak(e) { + if (e && this.f.has(e)) { + this.f.delete(e); + Qhe(e, null); + } + } + }; + H = class { + static { + this.None = Object.freeze({ + dispose() {} + }); + } + constructor() { + this.B = new Q(); + PZ(this); + Qhe(this.B, this); + } + dispose() { + LZ(this); + this.B.dispose(); + } + D(i) { + if (i === this) { + throw new Error("Cannot register a disposable on itself!"); + } + return this.B.add(i); + } + }; + ki = class { + constructor() { + this.b = false; + PZ(this); + } + get value() { + if (this.b) { + return undefined; + } else { + return this.a; + } + } + set value(i) { + if (!this.b && i !== this.a) { + this.a?.dispose(); + if (i) { + Qhe(i, this); + } + this.a = i; + } + } + clear() { + this.value = undefined; + } + dispose() { + this.b = true; + LZ(this); + this.a?.dispose(); + this.a = undefined; + } + clearAndLeak() { + const i = this.a; + this.a = undefined; + if (i) { + Qhe(i, null); + } + return i; + } + }; + GBt = class { + constructor(i) { + this.a = new ki(); + this.b = false; + this.a.value = i; + } + get value() { + return this.a.value; + } + set value(i) { + if (!this.b && i !== this.a.value) { + this.a.value = i; + } + } + dispose() { + this.b = true; + this.a.dispose(); + } + }; + Zhe = class { + constructor(i) { + this.b = i; + this.a = 1; + } + acquire() { + this.a++; + return this; + } + release() { + if (--this.a === 0) { + this.b.dispose(); + } + return this; + } + }; + Rq = class { + constructor() { + this.a = new Map(); + } + acquire(i, ...e) { + let t = this.a.get(i); + if (!t) { + t = { + counter: 0, + object: this.b(i, ...e) + }; + this.a.set(i, t); + } + const { + object: s + } = t; + const n = Py(() => { + if (--t.counter === 0) { + this.c(i, t.object); + this.a.delete(i); + } + }); + t.counter++; + return { + object: s, + dispose: n + }; + } + }; + KBt = class { + constructor(i) { + this.a = i; + } + async acquire(i, ...e) { + const t = this.a.acquire(i, ...e); + try { + return { + object: await t.object, + dispose: () => t.dispose() + }; + } catch (s) { + t.dispose(); + throw s; + } + } + }; + Cqi = class { + constructor(i) { + this.object = i; + } + dispose() {} + }; + Bo = class { + constructor() { + this.a = new Map(); + this.b = false; + PZ(this); + } + dispose() { + LZ(this); + this.b = true; + this.clearAndDisposeAll(); + } + clearAndDisposeAll() { + if (this.a.size) { + try { + si(this.a.values()); + } finally { + this.a.clear(); + } + } + } + has(i) { + return this.a.has(i); + } + get size() { + return this.a.size; + } + get(i) { + return this.a.get(i); + } + set(i, e, t = false) { + if (this.b) { + console.warn(new Error("Trying to add a disposable to a DisposableMap that has already been disposed of. The added object will be leaked!").stack); + } + if (!t) { + this.a.get(i)?.dispose(); + } + this.a.set(i, e); + } + deleteAndDispose(i) { + this.a.get(i)?.dispose(); + this.a.delete(i); + } + deleteAndLeak(i) { + const e = this.a.get(i); + this.a.delete(i); + return e; + } + keys() { + return this.a.keys(); + } + values() { + return this.a.values(); + } + [Symbol.iterator]() { + return this.a[Symbol.iterator](); + } + }; + } +}); +var db; +var hp; +var Av = ue({ + "out-build/vs/base/common/linkedList.js"() { + "use strict"; + + db = class rFt { + static { + this.Undefined = new rFt(undefined); + } + constructor(e) { + this.element = e; + this.next = rFt.Undefined; + this.prev = rFt.Undefined; + } + }; + hp = class { + constructor() { + this.a = db.Undefined; + this.b = db.Undefined; + this.c = 0; + } + get size() { + return this.c; + } + get first() { + return this.a; + } + isEmpty() { + return this.a === db.Undefined; + } + clear() { + let i = this.a; + while (i !== db.Undefined) { + const e = i.next; + i.prev = db.Undefined; + i.next = db.Undefined; + i = e; + } + this.a = db.Undefined; + this.b = db.Undefined; + this.c = 0; + } + unshift(i) { + return this.d(i, false); + } + push(i) { + return this.d(i, true); + } + d(i, e) { + const t = new db(i); + if (this.a === db.Undefined) { + this.a = t; + this.b = t; + } else if (e) { + const n = this.b; + this.b = t; + t.prev = n; + n.next = t; + } else { + const n = this.a; + this.a = t; + t.next = n; + n.prev = t; + } + this.c += 1; + let s = false; + return () => { + if (!s) { + s = true; + this.e(t); + } + }; + } + shift() { + if (this.a !== db.Undefined) { + const i = this.a.element; + this.e(this.a); + return i; + } + } + pop() { + if (this.b !== db.Undefined) { + const i = this.b.element; + this.e(this.b); + return i; + } + } + remove(i) { + this.e(i); + } + e(i) { + if (i.prev !== db.Undefined && i.next !== db.Undefined) { + const e = i.prev; + e.next = i.next; + i.next.prev = e; + } else if (i.prev === db.Undefined && i.next === db.Undefined) { + this.a = db.Undefined; + this.b = db.Undefined; + } else if (i.next === db.Undefined) { + this.b = this.b.prev; + this.b.next = db.Undefined; + } else if (i.prev === db.Undefined) { + this.a = this.a.next; + this.a.prev = db.Undefined; + } + this.c -= 1; + } + *[Symbol.iterator]() { + let i = this.a; + while (i !== db.Undefined) { + yield i.element; + i = i.next; + } + } + }; + } +}); +var Sqi; +var ic; +var fd = ue({ + "out-build/vs/base/common/stopwatch.js"() { + "use strict"; + + Sqi = globalThis.performance && typeof globalThis.performance.now == "function"; + ic = class Z2n { + static create(e) { + return new Z2n(e); + } + constructor(e) { + this.c = Sqi && e === false ? Date.now : globalThis.performance.now.bind(globalThis.performance); + this.a = this.c(); + this.b = -1; + } + stop() { + this.b = this.c(); + } + reset() { + this.a = this.c(); + this.b = -1; + } + elapsed() { + if (this.b !== -1) { + return this.b - this.a; + } else { + return this.c() - this.a; + } + } + }; + } +}); +function _Vn(i) { + const e = RZ; + RZ = i; + return { + dispose() { + RZ = e; + } + }; +} +function BVn(i, e, t) { + const s = new Bo(); + let n = new Set(i()); + for (const o of n) { + s.set(o, t(o)); + } + const r = new Q(); + r.add(e(() => { + const o = i(); + const a = zhe(n, o); + for (const l of a.removed) { + s.deleteAndDispose(l); + } + for (const l of a.added) { + s.set(l, t(l)); + } + n = new Set(o); + })); + r.add(s); + return r; +} +var YBt; +var xqi; +var de; +var Cnt; +var RZ; +var kqi; +var Snt; +var Eqi; +var Iqi; +var Dqi; +var efe; +var Tqi; +var XBt; +var B; +var Pqi; +var QBt; +var tfe; +var cx; +var xnt; +var Lqi; +var mI; +var knt; +var NZ; +var F0; +var Rqi; +var Nqi; +var pe = ue({ + "out-build/vs/base/common/event.js"() { + "use strict"; + + mT(); + Ut(); + A0(); + q(); + Av(); + fd(); + YBt = false; + xqi = false; + (function (i) { + i.None = () => H.None; + function e(U) { + if (xqi) { + const { + onDidAddListener: j + } = U; + const ie = Snt.create(); + let ee = 0; + U.onDidAddListener = () => { + if (++ee === 2) { + console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here"); + ie.print(); + } + j?.(); + }; + } + } + function t(U, j) { + return g(U, () => {}, 0, undefined, true, undefined, j); + } + i.defer = t; + function s(U) { + return (j, ie = null, ee) => { + let ne = false; + let be; + be = U(ge => { + if (!ne) { + if (be) { + be.dispose(); + } else { + ne = true; + } + return j.call(ie, ge); + } + }, null, ee); + if (ne) { + be.dispose(); + } + return be; + }; + } + i.once = s; + function n(U, j) { + return i.once(i.filter(U, j)); + } + i.onceIf = n; + function r(U, j, ie) { + return d((ee, ne = null, be) => U(ge => ee.call(ne, j(ge)), null, be), ie); + } + i.map = r; + function o(U, j, ie) { + return d((ee, ne = null, be) => U(ge => { + j(ge); + ee.call(ne, ge); + }, null, be), ie); + } + i.forEach = o; + function a(U, j, ie) { + return d((ee, ne = null, be) => U(ge => j(ge) && ee.call(ne, ge), null, be), ie); + } + i.filter = a; + function l(U) { + return U; + } + i.signal = l; + function c(...U) { + return (j, ie = null, ee) => { + const ne = Gc(...U.map(be => be(ge => j.call(ie, ge)))); + return h(ne, ee); + }; + } + i.any = c; + function u(U, j, ie, ee) { + let ne = ie; + return r(U, be => { + ne = j(ne, be); + return ne; + }, ee); + } + i.reduce = u; + function d(U, j) { + let ie; + const ee = { + onWillAddFirstListener() { + ie = U(ne.fire, ne); + }, + onDidRemoveLastListener() { + ie?.dispose(); + } + }; + if (!j) { + e(ee); + } + const ne = new B(ee); + j?.add(ne); + return ne.event; + } + function h(U, j) { + if (j instanceof Array) { + j.push(U); + } else if (j) { + j.add(U); + } + return U; + } + function g(U, j, ie = 100, ee = false, ne = false, be, ge) { + let ce; + let Se; + let $e; + let qe = 0; + let Ae; + const et = { + leakWarningThreshold: be, + onWillAddFirstListener() { + ce = U(Mi => { + qe++; + Se = j(Se, Mi); + if (ee && !$e) { + _t.fire(Se); + Se = undefined; + } + Ae = () => { + const Vt = Se; + Se = undefined; + $e = undefined; + if (!ee || qe > 1) { + _t.fire(Vt); + } + qe = 0; + }; + if (typeof ie == "number") { + clearTimeout($e); + $e = setTimeout(Ae, ie); + } else if ($e === undefined) { + $e = 0; + queueMicrotask(Ae); + } + }); + }, + onWillRemoveListener() { + if (ne && qe > 0) { + Ae?.(); + } + }, + onDidRemoveLastListener() { + Ae = undefined; + ce.dispose(); + } + }; + if (!ge) { + e(et); + } + const _t = new B(et); + ge?.add(_t); + return _t.event; + } + i.debounce = g; + function p(U, j = 0, ie) { + return i.debounce(U, (ee, ne) => ee ? (ee.push(ne), ee) : [ne], j, undefined, true, undefined, ie); + } + i.accumulate = p; + function b(U, j = (ee, ne) => ee === ne, ie) { + let ee = true; + let ne; + return a(U, be => { + const ge = ee || !j(be, ne); + ee = false; + ne = be; + return ge; + }, ie); + } + i.latch = b; + function v(U, j, ie) { + return [i.filter(U, j, ie), i.filter(U, ee => !j(ee), ie)]; + } + i.split = v; + function y(U, j = false, ie = [], ee) { + let ne = ie.slice(); + let be = U(Se => { + if (ne) { + ne.push(Se); + } else { + ce.fire(Se); + } + }); + if (ee) { + ee.add(be); + } + const ge = () => { + ne?.forEach(Se => ce.fire(Se)); + ne = null; + }; + const ce = new B({ + onWillAddFirstListener() { + if (!be) { + be = U(Se => ce.fire(Se)); + if (ee) { + ee.add(be); + } + } + }, + onDidAddFirstListener() { + if (ne) { + if (j) { + setTimeout(ge); + } else { + ge(); + } + } + }, + onDidRemoveLastListener() { + if (be) { + be.dispose(); + } + be = null; + } + }); + if (ee) { + ee.add(ce); + } + return ce.event; + } + i.buffer = y; + function w(U, j) { + return (ee, ne, be) => { + const ge = j(new S()); + return U(function (ce) { + const Se = ge.evaluate(ce); + if (Se !== C) { + ee.call(ne, Se); + } + }, undefined, be); + }; + } + i.chain = w; + const C = Symbol("HaltChainable"); + class S { + constructor() { + this.f = []; + } + map(j) { + this.f.push(j); + return this; + } + forEach(j) { + this.f.push(ie => { + j(ie); + return ie; + }); + return this; + } + filter(j) { + this.f.push(ie => j(ie) ? ie : C); + return this; + } + reduce(j, ie) { + let ee = ie; + this.f.push(ne => { + ee = j(ee, ne); + return ee; + }); + return this; + } + latch(j = (ie, ee) => ie === ee) { + let ie = true; + let ee; + this.f.push(ne => { + const be = ie || !j(ne, ee); + ie = false; + ee = ne; + if (be) { + return ne; + } else { + return C; + } + }); + return this; + } + evaluate(j) { + for (const ie of this.f) { + j = ie(j); + if (j === C) { + break; + } + } + return j; + } + } + function x(U, j, ie = ee => ee) { + const ee = (...ce) => ge.fire(ie(...ce)); + const ne = () => U.on(j, ee); + const be = () => U.removeListener(j, ee); + const ge = new B({ + onWillAddFirstListener: ne, + onDidRemoveLastListener: be + }); + return ge.event; + } + i.fromNodeEventEmitter = x; + function k(U, j, ie = ee => ee) { + const ee = (...ce) => ge.fire(ie(...ce)); + const ne = () => U.addEventListener(j, ee); + const be = () => U.removeEventListener(j, ee); + const ge = new B({ + onWillAddFirstListener: ne, + onDidRemoveLastListener: be + }); + return ge.event; + } + i.fromDOMEventEmitter = k; + function E(U) { + return new Promise(j => s(U)(j)); + } + i.toPromise = E; + function D(U) { + const j = new B(); + U.then(ie => { + j.fire(ie); + }, () => { + j.fire(undefined); + }).finally(() => { + j.dispose(); + }); + return j.event; + } + i.fromPromise = D; + function P(U, j) { + return U(ie => j.fire(ie)); + } + i.forward = P; + function R(U, j, ie) { + j(ie); + return U(ee => j(ee)); + } + i.runAndSubscribe = R; + class L { + constructor(j, ie) { + this._observable = j; + this.f = 0; + this.g = false; + const ee = { + onWillAddFirstListener: () => { + j.addObserver(this); + this._observable.reportChanges(); + }, + onDidRemoveLastListener: () => { + j.removeObserver(this); + } + }; + if (!ie) { + e(ee); + } + this.emitter = new B(ee); + if (ie) { + ie.add(this.emitter); + } + } + beginUpdate(j) { + this.f++; + } + handlePossibleChange(j) {} + handleChange(j, ie) { + this.g = true; + } + endUpdate(j) { + this.f--; + if (this.f === 0) { + this._observable.reportChanges(); + if (this.g) { + this.g = false; + this.emitter.fire(this._observable.get()); + } + } + } + } + function F(U, j) { + return new L(U, j).emitter.event; + } + i.fromObservable = F; + function O(U) { + return (j, ie, ee) => { + let ne = 0; + let be = false; + const ge = { + beginUpdate() { + ne++; + }, + endUpdate() { + ne--; + if (ne === 0) { + U.reportChanges(); + if (be) { + be = false; + j.call(ie); + } + } + }, + handlePossibleChange() {}, + handleChange() { + be = true; + } + }; + U.addObserver(ge); + U.reportChanges(); + const ce = { + dispose() { + U.removeObserver(ge); + } + }; + if (ee instanceof Q) { + ee.add(ce); + } else if (Array.isArray(ee)) { + ee.push(ce); + } + return ce; + }; + } + i.fromObservableLight = O; + })(de ||= {}); + Cnt = class m3i { + static { + this.all = new Set(); + } + static { + this.f = 0; + } + constructor(e) { + this.listenerCount = 0; + this.invocationCount = 0; + this.elapsedOverall = 0; + this.durations = []; + this.name = `${e}_${m3i.f++}`; + m3i.all.add(this); + } + start(e) { + this.g = new ic(); + this.listenerCount = e; + } + stop() { + if (this.g) { + const e = this.g.elapsed(); + this.durations.push(e); + this.elapsedOverall += e; + this.invocationCount += 1; + this.g = undefined; + } + } + }; + RZ = -1; + kqi = class eFn { + static { + this.f = 1; + } + constructor(e, t, s = (eFn.f++).toString(16).padStart(3, "0")) { + this.j = e; + this.threshold = t; + this.name = s; + this.h = 0; + } + dispose() { + this.g?.clear(); + } + check(e, t) { + const s = this.threshold; + if (s <= 0 || t < s) { + return; + } + this.g ||= new Map(); + const n = this.g.get(e.value) || 0; + this.g.set(e.value, n + 1); + this.h -= 1; + if (this.h <= 0) { + this.h = s * 0.5; + const [r, o] = this.getMostFrequentStack(); + const a = `[${this.name}] potential listener LEAK detected, having ${t} listeners already. MOST frequent listener (${o}):`; + console.warn(a); + console.warn(r); + const l = new Eqi(a, r); + this.j(l); + } + return () => { + const r = this.g.get(e.value) || 0; + this.g.set(e.value, r - 1); + }; + } + getMostFrequentStack() { + if (!this.g) { + return; + } + let e; + let t = 0; + for (const [s, n] of this.g) { + if (!e || t < n) { + e = [s, n]; + t = n; + } + } + return e; + } + }; + Snt = class tFn { + static create() { + const e = new Error(); + return new tFn(e.stack ?? ""); + } + constructor(e) { + this.value = e; + } + print() { + console.warn(this.value.split(` +`).slice(2).join(` +`)); + } + }; + Eqi = class extends Error { + constructor(i, e) { + super(i); + this.name = "ListenerLeakError"; + this.stack = e; + } + }; + Iqi = class extends Error { + constructor(i, e) { + super(i); + this.name = "ListenerRefusalError"; + this.stack = e; + } + }; + Dqi = 0; + efe = class { + constructor(i) { + this.value = i; + this.id = Dqi++; + } + }; + Tqi = 2; + XBt = (i, e) => { + if (i instanceof efe) { + e(i); + } else { + for (let t = 0; t < i.length; t++) { + const s = i[t]; + if (s) { + e(s); + } + } + } + }; + B = class { + constructor(i) { + this.z = 0; + this.f = i; + this.g = RZ > 0 || this.f?.leakWarningThreshold ? new kqi(i?.onListenerError ?? xs, this.f?.leakWarningThreshold ?? RZ) : undefined; + this.j = this.f?._profName ? new Cnt(this.f._profName) : undefined; + this.w = this.f?.deliveryQueue; + } + dispose() { + if (!this.m) { + this.m = true; + if (this.w?.current === this) { + this.w.reset(); + } + if (this.u) { + if (YBt) { + const i = this.u; + queueMicrotask(() => { + XBt(i, e => e.stack?.print()); + }); + } + this.u = undefined; + this.z = 0; + } + this.f?.onDidRemoveLastListener?.(); + this.g?.dispose(); + } + } + get event() { + this.q ??= (i, e, t) => { + if (this.g && this.z > this.g.threshold ** 2) { + const a = `[${this.g.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this.z} vs ${this.g.threshold})`; + console.warn(a); + const l = this.g.getMostFrequentStack() ?? ["UNKNOWN stack", -1]; + const c = new Iqi(`${a}. HINT: Stack shows most frequent listener (${l[1]}-times)`, l[0]); + (this.f?.onListenerError || xs)(c); + return H.None; + } + if (this.m) { + return H.None; + } + if (e) { + i = i.bind(e); + } + const s = new efe(i); + let n; + let r; + if (this.g && this.z >= Math.ceil(this.g.threshold * 0.2)) { + s.stack = Snt.create(); + n = this.g.check(s.stack, this.z + 1); + } + if (YBt) { + s.stack = r ?? Snt.create(); + } + if (this.u) { + if (this.u instanceof efe) { + this.w ??= new QBt(); + this.u = [this.u, s]; + } else { + this.u.push(s); + } + } else { + this.f?.onWillAddFirstListener?.(this); + this.u = s; + this.f?.onDidAddFirstListener?.(this); + } + this.f?.onDidAddListener?.(this); + this.z++; + const o = Ue(() => { + n?.(); + this.A(s); + }); + if (t instanceof Q) { + t.add(o); + } else if (Array.isArray(t)) { + t.push(o); + } + return o; + }; + return this.q; + } + A(i) { + this.f?.onWillRemoveListener?.(this); + if (!this.u) { + return; + } + if (this.z === 1) { + this.u = undefined; + this.f?.onDidRemoveLastListener?.(this); + this.z = 0; + return; + } + const e = this.u; + const t = e.indexOf(i); + if (t === -1) { + console.log("disposed?", this.m); + console.log("size?", this.z); + console.log("arr?", JSON.stringify(this.u)); + throw new Error("Attempted to dispose unknown listener"); + } + this.z--; + e[t] = undefined; + const s = this.w.current === this; + if (this.z * Tqi <= e.length) { + let n = 0; + for (let r = 0; r < e.length; r++) { + if (e[r]) { + e[n++] = e[r]; + } else if (s && n < this.w.end) { + this.w.end--; + if (n < this.w.i) { + this.w.i--; + } + } + } + e.length = n; + } + } + B(i, e) { + if (!i) { + return; + } + const t = this.f?.onListenerError || xs; + if (!t) { + i.value(e); + return; + } + try { + i.value(e); + } catch (s) { + t(s); + } + } + C(i) { + const e = i.current.u; + while (i.i < i.end) { + this.B(e[i.i++], i.value); + } + i.reset(); + } + fire(i) { + if (this.w?.current) { + this.C(this.w); + this.j?.stop(); + } + this.j?.start(this.z); + if (this.u) { + if (this.u instanceof efe) { + this.B(this.u, i); + } else { + const e = this.w; + e.enqueue(this, i, this.u.length); + this.C(e); + } + } + this.j?.stop(); + } + hasListeners() { + return this.z > 0; + } + }; + Pqi = () => new QBt(); + QBt = class { + constructor() { + this.i = -1; + this.end = 0; + } + enqueue(i, e, t) { + this.i = 0; + this.end = t; + this.current = i; + this.value = e; + } + reset() { + this.i = this.end; + this.current = undefined; + this.value = undefined; + } + }; + tfe = class extends B { + async fireAsync(i, e, t) { + if (this.u) { + this.h ||= new hp(); + XBt(this.u, s => this.h.push([s.value, i])); + while (this.h.size > 0 && !e.isCancellationRequested) { + const [s, n] = this.h.shift(); + const r = []; + const o = { + ...n, + token: e, + waitUntil: a => { + if (Object.isFrozen(r)) { + throw new Error("waitUntil can NOT be called asynchronous"); + } + if (t) { + a = t(a, s); + } + r.push(a); + } + }; + try { + s(o); + } catch (a) { + xs(a); + continue; + } + Object.freeze(r); + await Promise.allSettled(r).then(a => { + for (const l of a) { + if (l.status === "rejected") { + xs(l.reason); + } + } + }); + } + } + } + }; + cx = class extends B { + get isPaused() { + return this.h !== 0; + } + constructor(i) { + super(i); + this.h = 0; + this.s = new hp(); + this.t = i?.merge; + } + pause() { + this.h++; + } + resume() { + if (this.h !== 0 && --this.h === 0) { + if (this.t) { + if (this.s.size > 0) { + const i = Array.from(this.s); + this.s.clear(); + super.fire(this.t(i)); + } + } else { + while (!this.h && this.s.size !== 0) { + super.fire(this.s.shift()); + } + } + } + } + fire(i) { + if (this.z) { + if (this.h !== 0) { + this.s.push(i); + } else { + super.fire(i); + } + } + } + }; + xnt = class extends cx { + constructor(i) { + super(i); + this.k = i.delay ?? 100; + } + fire(i) { + if (!this.o) { + this.pause(); + this.o = setTimeout(() => { + this.o = undefined; + this.resume(); + }, this.k); + } + super.fire(i); + } + }; + Lqi = class extends B { + constructor(i) { + super(i); + this.h = []; + this.k = i?.merge; + } + fire(i) { + if (this.hasListeners()) { + this.h.push(i); + if (this.h.length === 1) { + queueMicrotask(() => { + if (this.k) { + super.fire(this.k(this.h)); + } else { + this.h.forEach(e => super.fire(e)); + } + this.h = []; + }); + } + } + } + }; + mI = class { + constructor() { + this.g = false; + this.h = []; + this.f = new B({ + onWillAddFirstListener: () => this.j(), + onDidRemoveLastListener: () => this.k() + }); + } + get event() { + return this.f.event; + } + add(i) { + const e = { + event: i, + listener: null + }; + this.h.push(e); + if (this.g) { + this.m(e); + } + return Ue(Py(() => { + if (this.g) { + this.o(e); + } + const s = this.h.indexOf(e); + this.h.splice(s, 1); + })); + } + j() { + this.g = true; + this.h.forEach(i => this.m(i)); + } + k() { + this.g = false; + this.h.forEach(i => this.o(i)); + } + m(i) { + i.listener = i.event(e => this.f.fire(e)); + } + o(i) { + i.listener?.dispose(); + i.listener = null; + } + dispose() { + this.f.dispose(); + for (const i of this.h) { + i.listener?.dispose(); + } + this.h = []; + } + }; + knt = class { + constructor(i, e, t, s) { + this.f = new Q(); + const n = this.f.add(new mI()); + const r = this.f.add(new Bo()); + function o(a) { + r.set(a, n.add(s(a))); + } + for (const a of i) { + o(a); + } + this.f.add(e(a => { + o(a); + })); + this.f.add(t(a => { + r.deleteAndDispose(a); + })); + this.event = n.event; + } + dispose() { + this.f.dispose(); + } + }; + NZ = class { + constructor() { + this.f = []; + } + wrapEvent(i, e, t) { + return (s, n, r) => i(o => { + const a = this.f[this.f.length - 1]; + if (!e) { + if (a) { + a.buffers.push(() => s.call(n, o)); + } else { + s.call(n, o); + } + return; + } + const l = a; + if (!l) { + s.call(n, e(t, o)); + return; + } + l.items ??= []; + l.items.push(o); + if (l.buffers.length === 0) { + a.buffers.push(() => { + l.reducedResult ??= t ? l.items.reduce(e, t) : l.items.reduce(e); + s.call(n, l.reducedResult); + }); + } + }, undefined, r); + } + bufferEvents(i) { + const e = { + buffers: new Array() + }; + this.f.push(e); + const t = i(); + this.f.pop(); + e.buffers.forEach(s => s()); + return t; + } + }; + F0 = class { + constructor() { + this.f = false; + this.g = de.None; + this.h = H.None; + this.j = new B({ + onDidAddFirstListener: () => { + this.f = true; + this.h = this.g(this.j.fire, this.j); + }, + onDidRemoveLastListener: () => { + this.f = false; + this.h.dispose(); + } + }); + this.event = this.j.event; + } + set input(i) { + this.g = i; + if (this.f) { + this.h.dispose(); + this.h = i(this.j.fire, this.j); + } + } + dispose() { + this.h.dispose(); + this.j.dispose(); + } + }; + Rqi = class { + static const(i) { + return new Nqi(i); + } + constructor(i) { + this.g = i; + this.f = new B(); + this.onDidChange = this.f.event; + } + get value() { + return this.g; + } + set value(i) { + if (i !== this.g) { + this.g = i; + this.f.fire(undefined); + } + } + }; + Nqi = class { + constructor(i) { + this.value = i; + this.onDidChange = de.None; + } + }; + } +}); +function ZBt(i) { + const e = new Xi(); + i.add({ + dispose() { + e.cancel(); + } + }); + return e.token; +} +var e4t; +var mt; +var ife; +var Xi; +var ri = ue({ + "out-build/vs/base/common/cancellation.js"() { + "use strict"; + + pe(); + e4t = Object.freeze(function (i, e) { + const t = setTimeout(i.bind(e), 0); + return { + dispose() { + clearTimeout(t); + } + }; + }); + (function (i) { + function e(t) { + if (t === i.None || t === i.Cancelled || t instanceof ife) { + return true; + } else if (!t || typeof t != "object") { + return false; + } else { + return typeof t.isCancellationRequested == "boolean" && typeof t.onCancellationRequested == "function"; + } + } + i.isCancellationToken = e; + i.None = Object.freeze({ + isCancellationRequested: false, + onCancellationRequested: de.None + }); + i.Cancelled = Object.freeze({ + isCancellationRequested: true, + onCancellationRequested: e4t + }); + })(mt ||= {}); + ife = class { + constructor() { + this.a = false; + this.b = null; + } + cancel() { + if (!this.a) { + this.a = true; + if (this.b) { + this.b.fire(undefined); + this.dispose(); + } + } + } + get isCancellationRequested() { + return this.a; + } + get onCancellationRequested() { + if (this.a) { + return e4t; + } else { + this.b ||= new B(); + return this.b.event; + } + } + dispose() { + if (this.b) { + this.b.dispose(); + this.b = null; + } + } + }; + Xi = class { + constructor(i) { + this.f = undefined; + this.g = undefined; + this.g = i && i.onCancellationRequested(this.cancel, this); + } + get token() { + this.f ||= new ife(); + return this.f; + } + cancel() { + if (this.f) { + if (this.f instanceof ife) { + this.f.cancel(); + } + } else { + this.f = mt.Cancelled; + } + } + dispose(i = false) { + if (i) { + this.cancel(); + } + this.g?.dispose(); + if (this.f) { + if (this.f instanceof ife) { + this.f.dispose(); + } + } else { + this.f = mt.None; + } + } + }; + } +}); +function t4t() { + return globalThis._VSCODE_NLS_MESSAGES; +} +function Ent() { + return globalThis._VSCODE_NLS_LANGUAGE; +} +var Mqi = ue({ + "out-build/vs/nls.messages.js"() { + "use strict"; + } +}); +function Int(i, e) { + let t; + if (e.length === 0) { + t = i; + } else { + t = i.replace(/\{(\d+)\}/g, (s, n) => { + const r = n[0]; + const o = e[r]; + let a = s; + if (typeof o == "string") { + a = o; + } else if (typeof o == "number" || typeof o == "boolean" || o === undefined || o === null) { + a = String(o); + } + return a; + }); + } + if ($qi) { + t = "[" + t.replace(/[aouei]/g, "$&$&") + "]"; + } + return t; +} +function f(i, e, ...t) { + return Int(typeof i == "number" ? Aqi(i, e) : e, t); +} +function Aqi(i, e) { + const t = t4t()?.[i]; + if (typeof t != "string") { + if (typeof e == "string") { + return e; + } + throw new Error(`!!! NLS MISSING: ${i} !!!`); + } + return t; +} +function W(i, e, ...t) { + let s; + if (typeof i == "number") { + s = Aqi(i, e); + } else { + s = e; + } + const n = Int(s, t); + return { + value: n, + original: e === s ? n : Int(e, t) + }; +} +var $qi; +var X = ue({ + "out-build/vs/nls.js"() { + "use strict"; + + Mqi(); + Mqi(); + $qi = Ent() === "pseudo" || typeof document !== "undefined" && document.location && typeof document.location.hash == "string" && document.location.hash.indexOf("pseudo=true") >= 0; + } +}); +function Nq(i) { + switch (i) { + case 0: + return "Web"; + case 1: + return "Mac"; + case 2: + return "Linux"; + case 3: + return "Windows"; + } +} +function i4t() { + if (!g4t) { + g4t = true; + const i = new Uint8Array(2); + i[0] = 1; + i[1] = 2; + f4t = new Uint16Array(i.buffer)[0] === 513; + } + return f4t; +} +function Fqi(i) { + return parseFloat(i) >= 20; +} +var NB; +var MZ; +var AZ; +var $Z; +var s4t; +var n4t; +var Dnt; +var r4t; +var Tnt; +var o4t; +var a4t; +var FZ; +var sfe; +var Pnt; +var l4t; +var A2; +var $2; +var ux; +var c4t; +var Oqi; +var _qi; +var nfe; +var ln; +var Gt; +var yl; +var rfe; +var sc; +var Bqi; +var tn; +var Uqi; +var Wqi; +var fp; +var u4t; +var Ry; +var dx; +var lM; +var Uu; +var Wk; +var d4t; +var Vqi; +var h4t; +var Hqi; +var OZ; +var qqi; +var Ia; +var f4t; +var g4t; +var Mq; +var Lnt; +var Rnt; +var Nnt; +var p4t; +var jqi; +var zqi; +var rt = ue({ + "out-build/vs/base/common/platform.js"() { + "use strict"; + + X(); + NB = "en"; + MZ = false; + AZ = false; + $Z = false; + s4t = false; + n4t = false; + Dnt = false; + r4t = false; + Tnt = false; + o4t = false; + a4t = false; + FZ = undefined; + sfe = NB; + Pnt = NB; + l4t = undefined; + A2 = undefined; + $2 = globalThis; + ux = undefined; + if (typeof $2.vscode !== "undefined" && typeof $2.vscode.process !== "undefined") { + ux = $2.vscode.process; + } else if (typeof process !== "undefined" && typeof process?.versions?.node == "string") { + ux = process; + } + c4t = typeof ux?.versions?.electron == "string"; + Oqi = c4t && ux?.type === "renderer"; + if (typeof ux == "object") { + MZ = ux.platform === "win32"; + AZ = ux.platform === "darwin"; + $Z = ux.platform === "linux"; + s4t = $Z && !!ux.env.SNAP && !!ux.env.SNAP_REVISION; + r4t = c4t; + o4t = !!ux.env.CI || !!ux.env.BUILD_ARTIFACTSTAGINGDIRECTORY; + FZ = NB; + sfe = NB; + const i = ux.env.VSCODE_NLS_CONFIG; + if (i) { + try { + const e = JSON.parse(i); + FZ = e.userLocale; + Pnt = e.osLocale; + sfe = e.resolvedLanguage || NB; + l4t = e.languagePack?.translationsConfigFile; + } catch {} + } + n4t = true; + } else if (typeof navigator == "object" && !Oqi) { + A2 = navigator.userAgent; + MZ = A2.indexOf("Windows") >= 0; + AZ = A2.indexOf("Macintosh") >= 0; + Tnt = (A2.indexOf("Macintosh") >= 0 || A2.indexOf("iPad") >= 0 || A2.indexOf("iPhone") >= 0) && !!navigator.maxTouchPoints && navigator.maxTouchPoints > 0; + $Z = A2.indexOf("Linux") >= 0; + a4t = A2?.indexOf("Mobi") >= 0; + Dnt = true; + sfe = Ent() || NB; + FZ = navigator.language.toLowerCase(); + Pnt = FZ; + } else { + console.error("Unable to resolve platform."); + } + (function (i) { + i[i.Web = 0] = "Web"; + i[i.Mac = 1] = "Mac"; + i[i.Linux = 2] = "Linux"; + i[i.Windows = 3] = "Windows"; + })(_qi ||= {}); + nfe = 0; + if (AZ) { + nfe = 1; + } else if (MZ) { + nfe = 3; + } else if ($Z) { + nfe = 2; + } + ln = MZ; + Gt = AZ; + yl = $Z; + rfe = s4t; + sc = n4t; + Bqi = r4t; + tn = Dnt; + Uqi = Dnt && typeof $2.importScripts == "function"; + Wqi = Uqi ? $2.origin : undefined; + fp = Tnt; + u4t = a4t; + Ry = o4t; + dx = nfe; + lM = A2; + Uu = sfe; + (function (i) { + function e() { + return Uu; + } + i.value = e; + function t() { + if (Uu.length === 2) { + return Uu === "en"; + } else if (Uu.length >= 3) { + return Uu[0] === "e" && Uu[1] === "n" && Uu[2] === "-"; + } else { + return false; + } + } + i.isDefaultVariant = t; + function s() { + return Uu === "en"; + } + i.isDefault = s; + })(Wk ||= {}); + d4t = FZ; + Vqi = Pnt; + h4t = l4t; + Hqi = typeof $2.postMessage == "function" && !$2.importScripts; + OZ = (() => { + if (Hqi) { + const i = []; + $2.addEventListener("message", t => { + if (t.data && t.data.vscodeScheduleAsyncWork) { + for (let s = 0, n = i.length; s < n; s++) { + const r = i[s]; + if (r.id === t.data.vscodeScheduleAsyncWork) { + i.splice(s, 1); + r.callback(); + return; + } + } + } + }); + let e = 0; + return t => { + const s = ++e; + i.push({ + id: s, + callback: t + }); + $2.postMessage({ + vscodeScheduleAsyncWork: s + }, "*"); + }; + } + return i => setTimeout(i); + })(); + (function (i) { + i[i.Windows = 1] = "Windows"; + i[i.Macintosh = 2] = "Macintosh"; + i[i.Linux = 3] = "Linux"; + })(qqi ||= {}); + Ia = AZ || Tnt ? 2 : MZ ? 1 : 3; + f4t = true; + g4t = false; + Mq = !!lM && !!(lM.indexOf("Chrome") >= 0); + Lnt = !!lM && !!(lM.indexOf("Firefox") >= 0); + Rnt = !Mq && !!lM && !!(lM.indexOf("Safari") >= 0); + Nnt = !!lM && !!(lM.indexOf("Edg/") >= 0); + p4t = !!lM && !!(lM.indexOf("Android") >= 0); + jqi = ux?.arch; + zqi = ux?.platform; + } +}); +var Aq; +var Mnt; +var _Z; +var Ny; +var Q3; +var Ant; +var hx = ue({ + "out-build/vs/base/common/process.js"() { + "use strict"; + + rt(); + Mnt = globalThis.vscode; + if (typeof Mnt !== "undefined" && typeof Mnt.process !== "undefined") { + const i = Mnt.process; + Aq = { + get platform() { + return i.platform; + }, + get arch() { + return i.arch; + }, + get env() { + return i.env; + }, + cwd() { + return i.cwd(); + } + }; + } else if (typeof process !== "undefined" && typeof process?.versions?.node == "string") { + Aq = { + get platform() { + return process.platform; + }, + get arch() { + return process.arch; + }, + get env() { + return process.env; + }, + cwd() { + return process.env.VSCODE_CWD || process.cwd(); + } + }; + } else { + Aq = { + get platform() { + if (ln) { + return "win32"; + } else if (Gt) { + return "darwin"; + } else { + return "linux"; + } + }, + get arch() {}, + get env() { + return {}; + }, + cwd() { + return "/"; + } + }; + } + _Z = Aq.cwd; + Ny = Aq.env; + Q3 = Aq.platform; + Ant = Aq.arch; + } +}); +function UVn(i, e) { + if (i === null || typeof i != "object") { + throw new b4t(e, "Object", i); + } +} +function $v(i, e) { + if (typeof i != "string") { + throw new b4t(e, "string", i); + } +} +function td(i) { + return i === O0 || i === Vk; +} +function m4t(i) { + return i === O0; +} +function Z3(i) { + return i >= Gqi && i <= Yqi || i >= Kqi && i <= Xqi; +} +function $nt(i, e, t, s) { + let n = ""; + let r = 0; + let o = -1; + let a = 0; + let l = 0; + for (let c = 0; c <= i.length; ++c) { + if (c < i.length) { + l = i.charCodeAt(c); + } else { + if (s(l)) { + break; + } + l = O0; + } + if (s(l)) { + if (o !== c - 1 && a !== 1) { + if (a === 2) { + if (n.length < 2 || r !== 2 || n.charCodeAt(n.length - 1) !== MB || n.charCodeAt(n.length - 2) !== MB) { + if (n.length > 2) { + const u = n.lastIndexOf(t); + if (u === -1) { + n = ""; + r = 0; + } else { + n = n.slice(0, u); + r = n.length - 1 - n.lastIndexOf(t); + } + o = c; + a = 0; + continue; + } else if (n.length !== 0) { + n = ""; + r = 0; + o = c; + a = 0; + continue; + } + } + if (e) { + n += n.length > 0 ? `${t}..` : ".."; + r = 2; + } + } else { + if (n.length > 0) { + n += `${t}${i.slice(o + 1, c)}`; + } else { + n = i.slice(o + 1, c); + } + r = c - o - 1; + } + } + o = c; + a = 0; + } else if (l === MB && a !== -1) { + ++a; + } else { + a = -1; + } + } + return n; +} +function WVn(i) { + if (i) { + return `${i[0] === "." ? "" : "."}${i}`; + } else { + return ""; + } +} +function Jqi(i, e) { + UVn(e, "pathObject"); + const t = e.dir || e.root; + const s = e.base || `${e.name || ""}${WVn(e.ext)}`; + if (t) { + if (t === e.root) { + return `${t}${s}`; + } else { + return `${t}${i}${s}`; + } + } else { + return s; + } +} +var Gqi; +var Kqi; +var Yqi; +var Xqi; +var MB; +var O0; +var Vk; +var AB; +var Qqi; +var b4t; +var Hk; +var Sh; +var Zqi; +var ao; +var My; +var HC; +var id; +var $q; +var DL; +var pm; +var ir; +var Iw; +var VVn; +var Fq; +var HVn; +var _h; +var eji; +var pn = ue({ + "out-build/vs/base/common/path.js"() { + "use strict"; + + hx(); + Gqi = 65; + Kqi = 97; + Yqi = 90; + Xqi = 122; + MB = 46; + O0 = 47; + Vk = 92; + AB = 58; + Qqi = 63; + b4t = class extends Error { + constructor(i, e, t) { + let s; + if (typeof e == "string" && e.indexOf("not ") === 0) { + s = "must not be"; + e = e.replace(/^not /, ""); + } else { + s = "must be"; + } + const n = i.indexOf(".") !== -1 ? "property" : "argument"; + let r = `The "${i}" ${n} ${s} of type ${e}`; + r += `. Received type ${typeof t}`; + super(r); + this.code = "ERR_INVALID_ARG_TYPE"; + } + }; + Hk = Q3 === "win32"; + Sh = { + resolve(...i) { + let e = ""; + let t = ""; + let s = false; + for (let n = i.length - 1; n >= -1; n--) { + let r; + if (n >= 0) { + r = i[n]; + $v(r, `paths[${n}]`); + if (r.length === 0) { + continue; + } + } else if (e.length === 0) { + r = _Z(); + } else { + r = Ny[`=${e}`] || _Z(); + if (r === undefined || r.slice(0, 2).toLowerCase() !== e.toLowerCase() && r.charCodeAt(2) === Vk) { + r = `${e}\\`; + } + } + const o = r.length; + let a = 0; + let l = ""; + let c = false; + const u = r.charCodeAt(0); + if (o === 1) { + if (td(u)) { + a = 1; + c = true; + } + } else if (td(u)) { + c = true; + if (td(r.charCodeAt(1))) { + let d = 2; + let h = d; + while (d < o && !td(r.charCodeAt(d))) { + d++; + } + if (d < o && d !== h) { + const g = r.slice(h, d); + for (h = d; d < o && td(r.charCodeAt(d));) { + d++; + } + if (d < o && d !== h) { + for (h = d; d < o && !td(r.charCodeAt(d));) { + d++; + } + if (d === o || d !== h) { + l = `\\\\${g}\\${r.slice(h, d)}`; + a = d; + } + } + } + } else { + a = 1; + } + } else if (Z3(u) && r.charCodeAt(1) === AB) { + l = r.slice(0, 2); + a = 2; + if (o > 2 && td(r.charCodeAt(2))) { + c = true; + a = 3; + } + } + if (l.length > 0) { + if (e.length > 0) { + if (l.toLowerCase() !== e.toLowerCase()) { + continue; + } + } else { + e = l; + } + } + if (s) { + if (e.length > 0) { + break; + } + } else { + t = `${r.slice(a)}\\${t}`; + s = c; + if (c && e.length > 0) { + break; + } + } + } + t = $nt(t, !s, "\\", td); + if (s) { + return `${e}\\${t}`; + } else { + return `${e}${t}` || "."; + } + }, + normalize(i) { + $v(i, "path"); + const e = i.length; + if (e === 0) { + return "."; + } + let t = 0; + let s; + let n = false; + const r = i.charCodeAt(0); + if (e === 1) { + if (m4t(r)) { + return "\\"; + } else { + return i; + } + } + if (td(r)) { + n = true; + if (td(i.charCodeAt(1))) { + let a = 2; + let l = a; + while (a < e && !td(i.charCodeAt(a))) { + a++; + } + if (a < e && a !== l) { + const c = i.slice(l, a); + for (l = a; a < e && td(i.charCodeAt(a));) { + a++; + } + if (a < e && a !== l) { + for (l = a; a < e && !td(i.charCodeAt(a));) { + a++; + } + if (a === e) { + return `\\\\${c}\\${i.slice(l)}\\`; + } + if (a !== l) { + s = `\\\\${c}\\${i.slice(l, a)}`; + t = a; + } + } + } + } else { + t = 1; + } + } else if (Z3(r) && i.charCodeAt(1) === AB) { + s = i.slice(0, 2); + t = 2; + if (e > 2 && td(i.charCodeAt(2))) { + n = true; + t = 3; + } + } + let o = t < e ? $nt(i.slice(t), !n, "\\", td) : ""; + if (o.length === 0 && !n) { + o = "."; + } + if (o.length > 0 && td(i.charCodeAt(e - 1))) { + o += "\\"; + } + if (s === undefined) { + if (n) { + return `\\${o}`; + } else { + return o; + } + } else if (n) { + return `${s}\\${o}`; + } else { + return `${s}${o}`; + } + }, + isAbsolute(i) { + $v(i, "path"); + const e = i.length; + if (e === 0) { + return false; + } + const t = i.charCodeAt(0); + return td(t) || e > 2 && Z3(t) && i.charCodeAt(1) === AB && td(i.charCodeAt(2)); + }, + join(...i) { + if (i.length === 0) { + return "."; + } + let e; + let t; + for (let r = 0; r < i.length; ++r) { + const o = i[r]; + $v(o, "path"); + if (o.length > 0) { + if (e === undefined) { + e = t = o; + } else { + e += `\\${o}`; + } + } + } + if (e === undefined) { + return "."; + } + let s = true; + let n = 0; + if (typeof t == "string" && td(t.charCodeAt(0))) { + ++n; + const r = t.length; + if (r > 1 && td(t.charCodeAt(1))) { + ++n; + if (r > 2) { + if (td(t.charCodeAt(2))) { + ++n; + } else { + s = false; + } + } + } + } + if (s) { + while (n < e.length && td(e.charCodeAt(n))) { + n++; + } + if (n >= 2) { + e = `\\${e.slice(n)}`; + } + } + return Sh.normalize(e); + }, + relative(i, e) { + $v(i, "from"); + $v(e, "to"); + if (i === e) { + return ""; + } + const t = Sh.resolve(i); + const s = Sh.resolve(e); + if (t === s || (i = t.toLowerCase(), e = s.toLowerCase(), i === e)) { + return ""; + } + let n = 0; + while (n < i.length && i.charCodeAt(n) === Vk) { + n++; + } + let r = i.length; + while (r - 1 > n && i.charCodeAt(r - 1) === Vk) { + r--; + } + const o = r - n; + let a = 0; + while (a < e.length && e.charCodeAt(a) === Vk) { + a++; + } + let l = e.length; + while (l - 1 > a && e.charCodeAt(l - 1) === Vk) { + l--; + } + const c = l - a; + const u = o < c ? o : c; + let d = -1; + let h = 0; + for (; h < u; h++) { + const p = i.charCodeAt(n + h); + if (p !== e.charCodeAt(a + h)) { + break; + } + if (p === Vk) { + d = h; + } + } + if (h !== u) { + if (d === -1) { + return s; + } + } else { + if (c > u) { + if (e.charCodeAt(a + h) === Vk) { + return s.slice(a + h + 1); + } + if (h === 2) { + return s.slice(a + h); + } + } + if (o > u) { + if (i.charCodeAt(n + h) === Vk) { + d = h; + } else if (h === 2) { + d = 3; + } + } + if (d === -1) { + d = 0; + } + } + let g = ""; + for (h = n + d + 1; h <= r; ++h) { + if (h === r || i.charCodeAt(h) === Vk) { + g += g.length === 0 ? ".." : "\\.."; + } + } + a += d; + if (g.length > 0) { + return `${g}${s.slice(a, l)}`; + } else { + if (s.charCodeAt(a) === Vk) { + ++a; + } + return s.slice(a, l); + } + }, + toNamespacedPath(i) { + if (typeof i != "string" || i.length === 0) { + return i; + } + const e = Sh.resolve(i); + if (e.length <= 2) { + return i; + } + if (e.charCodeAt(0) === Vk) { + if (e.charCodeAt(1) === Vk) { + const t = e.charCodeAt(2); + if (t !== Qqi && t !== MB) { + return `\\\\?\\UNC\\${e.slice(2)}`; + } + } + } else if (Z3(e.charCodeAt(0)) && e.charCodeAt(1) === AB && e.charCodeAt(2) === Vk) { + return `\\\\?\\${e}`; + } + return i; + }, + dirname(i) { + $v(i, "path"); + const e = i.length; + if (e === 0) { + return "."; + } + let t = -1; + let s = 0; + const n = i.charCodeAt(0); + if (e === 1) { + if (td(n)) { + return i; + } else { + return "."; + } + } + if (td(n)) { + t = s = 1; + if (td(i.charCodeAt(1))) { + let a = 2; + let l = a; + while (a < e && !td(i.charCodeAt(a))) { + a++; + } + if (a < e && a !== l) { + for (l = a; a < e && td(i.charCodeAt(a));) { + a++; + } + if (a < e && a !== l) { + for (l = a; a < e && !td(i.charCodeAt(a));) { + a++; + } + if (a === e) { + return i; + } + if (a !== l) { + t = s = a + 1; + } + } + } + } + } else if (Z3(n) && i.charCodeAt(1) === AB) { + t = e > 2 && td(i.charCodeAt(2)) ? 3 : 2; + s = t; + } + let r = -1; + let o = true; + for (let a = e - 1; a >= s; --a) { + if (td(i.charCodeAt(a))) { + if (!o) { + r = a; + break; + } + } else { + o = false; + } + } + if (r === -1) { + if (t === -1) { + return "."; + } + r = t; + } + return i.slice(0, r); + }, + basename(i, e) { + if (e !== undefined) { + $v(e, "suffix"); + } + $v(i, "path"); + let t = 0; + let s = -1; + let n = true; + let r; + if (i.length >= 2 && Z3(i.charCodeAt(0)) && i.charCodeAt(1) === AB) { + t = 2; + } + if (e !== undefined && e.length > 0 && e.length <= i.length) { + if (e === i) { + return ""; + } + let o = e.length - 1; + let a = -1; + for (r = i.length - 1; r >= t; --r) { + const l = i.charCodeAt(r); + if (td(l)) { + if (!n) { + t = r + 1; + break; + } + } else { + if (a === -1) { + n = false; + a = r + 1; + } + if (o >= 0) { + if (l === e.charCodeAt(o)) { + if (--o === -1) { + s = r; + } + } else { + o = -1; + s = a; + } + } + } + } + if (t === s) { + s = a; + } else if (s === -1) { + s = i.length; + } + return i.slice(t, s); + } + for (r = i.length - 1; r >= t; --r) { + if (td(i.charCodeAt(r))) { + if (!n) { + t = r + 1; + break; + } + } else if (s === -1) { + n = false; + s = r + 1; + } + } + if (s === -1) { + return ""; + } else { + return i.slice(t, s); + } + }, + extname(i) { + $v(i, "path"); + let e = 0; + let t = -1; + let s = 0; + let n = -1; + let r = true; + let o = 0; + if (i.length >= 2 && i.charCodeAt(1) === AB && Z3(i.charCodeAt(0))) { + e = s = 2; + } + for (let a = i.length - 1; a >= e; --a) { + const l = i.charCodeAt(a); + if (td(l)) { + if (!r) { + s = a + 1; + break; + } + continue; + } + if (n === -1) { + r = false; + n = a + 1; + } + if (l === MB) { + if (t === -1) { + t = a; + } else if (o !== 1) { + o = 1; + } + } else if (t !== -1) { + o = -1; + } + } + if (t === -1 || n === -1 || o === 0 || o === 1 && t === n - 1 && t === s + 1) { + return ""; + } else { + return i.slice(t, n); + } + }, + format: Jqi.bind(null, "\\"), + parse(i) { + $v(i, "path"); + const e = { + root: "", + dir: "", + base: "", + ext: "", + name: "" + }; + if (i.length === 0) { + return e; + } + const t = i.length; + let s = 0; + let n = i.charCodeAt(0); + if (t === 1) { + if (td(n)) { + e.root = e.dir = i; + return e; + } else { + e.base = e.name = i; + return e; + } + } + if (td(n)) { + s = 1; + if (td(i.charCodeAt(1))) { + let d = 2; + let h = d; + while (d < t && !td(i.charCodeAt(d))) { + d++; + } + if (d < t && d !== h) { + for (h = d; d < t && td(i.charCodeAt(d));) { + d++; + } + if (d < t && d !== h) { + for (h = d; d < t && !td(i.charCodeAt(d));) { + d++; + } + if (d === t) { + s = d; + } else if (d !== h) { + s = d + 1; + } + } + } + } + } else if (Z3(n) && i.charCodeAt(1) === AB) { + if (t <= 2) { + e.root = e.dir = i; + return e; + } + s = 2; + if (td(i.charCodeAt(2))) { + if (t === 3) { + e.root = e.dir = i; + return e; + } + s = 3; + } + } + if (s > 0) { + e.root = i.slice(0, s); + } + let r = -1; + let o = s; + let a = -1; + let l = true; + let c = i.length - 1; + let u = 0; + for (; c >= s; --c) { + n = i.charCodeAt(c); + if (td(n)) { + if (!l) { + o = c + 1; + break; + } + continue; + } + if (a === -1) { + l = false; + a = c + 1; + } + if (n === MB) { + if (r === -1) { + r = c; + } else if (u !== 1) { + u = 1; + } + } else if (r !== -1) { + u = -1; + } + } + if (a !== -1) { + if (r === -1 || u === 0 || u === 1 && r === a - 1 && r === o + 1) { + e.base = e.name = i.slice(o, a); + } else { + e.name = i.slice(o, r); + e.base = i.slice(o, a); + e.ext = i.slice(r, a); + } + } + if (o > 0 && o !== s) { + e.dir = i.slice(0, o - 1); + } else { + e.dir = e.root; + } + return e; + }, + sep: "\\", + delimiter: ";", + win32: null, + posix: null + }; + Zqi = (() => { + if (Hk) { + const i = /\\/g; + return () => { + const e = _Z().replace(i, "/"); + return e.slice(e.indexOf("/")); + }; + } + return () => _Z(); + })(); + ao = { + resolve(...i) { + let e = ""; + let t = false; + for (let s = i.length - 1; s >= -1 && !t; s--) { + const n = s >= 0 ? i[s] : Zqi(); + $v(n, `paths[${s}]`); + if (n.length !== 0) { + e = `${n}/${e}`; + t = n.charCodeAt(0) === O0; + } + } + e = $nt(e, !t, "/", m4t); + if (t) { + return `/${e}`; + } else if (e.length > 0) { + return e; + } else { + return "."; + } + }, + normalize(i) { + $v(i, "path"); + if (i.length === 0) { + return "."; + } + const e = i.charCodeAt(0) === O0; + const t = i.charCodeAt(i.length - 1) === O0; + i = $nt(i, !e, "/", m4t); + if (i.length === 0) { + if (e) { + return "/"; + } else if (t) { + return "./"; + } else { + return "."; + } + } else { + if (t) { + i += "/"; + } + if (e) { + return `/${i}`; + } else { + return i; + } + } + }, + isAbsolute(i) { + $v(i, "path"); + return i.length > 0 && i.charCodeAt(0) === O0; + }, + join(...i) { + if (i.length === 0) { + return "."; + } + let e; + for (let t = 0; t < i.length; ++t) { + const s = i[t]; + $v(s, "path"); + if (s.length > 0) { + if (e === undefined) { + e = s; + } else { + e += `/${s}`; + } + } + } + if (e === undefined) { + return "."; + } else { + return ao.normalize(e); + } + }, + relative(i, e) { + $v(i, "from"); + $v(e, "to"); + if (i === e || (i = ao.resolve(i), e = ao.resolve(e), i === e)) { + return ""; + } + const t = 1; + const s = i.length; + const n = s - t; + const r = 1; + const o = e.length - r; + const a = n < o ? n : o; + let l = -1; + let c = 0; + for (; c < a; c++) { + const d = i.charCodeAt(t + c); + if (d !== e.charCodeAt(r + c)) { + break; + } + if (d === O0) { + l = c; + } + } + if (c === a) { + if (o > a) { + if (e.charCodeAt(r + c) === O0) { + return e.slice(r + c + 1); + } + if (c === 0) { + return e.slice(r + c); + } + } else if (n > a) { + if (i.charCodeAt(t + c) === O0) { + l = c; + } else if (c === 0) { + l = 0; + } + } + } + let u = ""; + for (c = t + l + 1; c <= s; ++c) { + if (c === s || i.charCodeAt(c) === O0) { + u += u.length === 0 ? ".." : "/.."; + } + } + return `${u}${e.slice(r + l)}`; + }, + toNamespacedPath(i) { + return i; + }, + dirname(i) { + $v(i, "path"); + if (i.length === 0) { + return "."; + } + const e = i.charCodeAt(0) === O0; + let t = -1; + let s = true; + for (let n = i.length - 1; n >= 1; --n) { + if (i.charCodeAt(n) === O0) { + if (!s) { + t = n; + break; + } + } else { + s = false; + } + } + if (t === -1) { + if (e) { + return "/"; + } else { + return "."; + } + } else if (e && t === 1) { + return "//"; + } else { + return i.slice(0, t); + } + }, + basename(i, e) { + if (e !== undefined) { + $v(e, "ext"); + } + $v(i, "path"); + let t = 0; + let s = -1; + let n = true; + let r; + if (e !== undefined && e.length > 0 && e.length <= i.length) { + if (e === i) { + return ""; + } + let o = e.length - 1; + let a = -1; + for (r = i.length - 1; r >= 0; --r) { + const l = i.charCodeAt(r); + if (l === O0) { + if (!n) { + t = r + 1; + break; + } + } else { + if (a === -1) { + n = false; + a = r + 1; + } + if (o >= 0) { + if (l === e.charCodeAt(o)) { + if (--o === -1) { + s = r; + } + } else { + o = -1; + s = a; + } + } + } + } + if (t === s) { + s = a; + } else if (s === -1) { + s = i.length; + } + return i.slice(t, s); + } + for (r = i.length - 1; r >= 0; --r) { + if (i.charCodeAt(r) === O0) { + if (!n) { + t = r + 1; + break; + } + } else if (s === -1) { + n = false; + s = r + 1; + } + } + if (s === -1) { + return ""; + } else { + return i.slice(t, s); + } + }, + extname(i) { + $v(i, "path"); + let e = -1; + let t = 0; + let s = -1; + let n = true; + let r = 0; + for (let o = i.length - 1; o >= 0; --o) { + const a = i.charCodeAt(o); + if (a === O0) { + if (!n) { + t = o + 1; + break; + } + continue; + } + if (s === -1) { + n = false; + s = o + 1; + } + if (a === MB) { + if (e === -1) { + e = o; + } else if (r !== 1) { + r = 1; + } + } else if (e !== -1) { + r = -1; + } + } + if (e === -1 || s === -1 || r === 0 || r === 1 && e === s - 1 && e === t + 1) { + return ""; + } else { + return i.slice(e, s); + } + }, + format: Jqi.bind(null, "/"), + parse(i) { + $v(i, "path"); + const e = { + root: "", + dir: "", + base: "", + ext: "", + name: "" + }; + if (i.length === 0) { + return e; + } + const t = i.charCodeAt(0) === O0; + let s; + if (t) { + e.root = "/"; + s = 1; + } else { + s = 0; + } + let n = -1; + let r = 0; + let o = -1; + let a = true; + let l = i.length - 1; + let c = 0; + for (; l >= s; --l) { + const u = i.charCodeAt(l); + if (u === O0) { + if (!a) { + r = l + 1; + break; + } + continue; + } + if (o === -1) { + a = false; + o = l + 1; + } + if (u === MB) { + if (n === -1) { + n = l; + } else if (c !== 1) { + c = 1; + } + } else if (n !== -1) { + c = -1; + } + } + if (o !== -1) { + const u = r === 0 && t ? 1 : r; + if (n === -1 || c === 0 || c === 1 && n === o - 1 && n === r + 1) { + e.base = e.name = i.slice(u, o); + } else { + e.name = i.slice(u, n); + e.base = i.slice(u, o); + e.ext = i.slice(n, o); + } + } + if (r > 0) { + e.dir = i.slice(0, r - 1); + } else if (t) { + e.dir = "/"; + } + return e; + }, + sep: "/", + delimiter: ":", + win32: null, + posix: null + }; + ao.win32 = Sh.win32 = Sh; + ao.posix = Sh.posix = ao; + My = Hk ? Sh.normalize : ao.normalize; + HC = Hk ? Sh.isAbsolute : ao.isAbsolute; + id = Hk ? Sh.join : ao.join; + $q = Hk ? Sh.resolve : ao.resolve; + DL = Hk ? Sh.relative : ao.relative; + pm = Hk ? Sh.dirname : ao.dirname; + ir = Hk ? Sh.basename : ao.basename; + Iw = Hk ? Sh.extname : ao.extname; + VVn = Hk ? Sh.format : ao.format; + Fq = Hk ? Sh.parse : ao.parse; + HVn = Hk ? Sh.toNamespacedPath : ao.toNamespacedPath; + _h = Hk ? Sh.sep : ao.sep; + eji = Hk ? Sh.delimiter : ao.delimiter; + } +}); +function tji(i) { + return i; +} +var Fnt; +var Ont; +var BZ; +var UZ = ue({ + "out-build/vs/base/common/cache.js"() { + "use strict"; + + ri(); + Fnt = class { + constructor(i) { + this.b = i; + this.a = null; + } + get() { + if (this.a) { + return this.a; + } + const i = new Xi(); + const e = this.b(i.token); + this.a = { + promise: e, + dispose: () => { + this.a = null; + i.cancel(); + i.dispose(); + } + }; + return this.a; + } + }; + Ont = class { + constructor(i, e) { + this.a = undefined; + this.b = undefined; + if (typeof i == "function") { + this.c = i; + this.d = tji; + } else { + this.c = e; + this.d = i.getCacheKey; + } + } + get(i) { + const e = this.d(i); + if (this.b !== e) { + this.b = e; + this.a = this.c(i); + } + return this.a; + } + }; + BZ = class { + get cachedValues() { + return this.a; + } + constructor(i, e) { + this.a = new Map(); + this.b = new Map(); + if (typeof i == "function") { + this.c = i; + this.d = tji; + } else { + this.c = e; + this.d = i.getCacheKey; + } + } + get(i) { + const e = this.d(i); + if (this.b.has(e)) { + return this.b.get(e); + } + const t = this.c(i); + this.a.set(i, t); + this.b.set(e, t); + return t; + } + }; + } +}); +var ol; +var pu = ue({ + "out-build/vs/base/common/lazy.js"() { + "use strict"; + + ol = class { + constructor(i) { + this.d = i; + this.a = false; + } + get hasValue() { + return this.a; + } + get value() { + if (!this.a) { + try { + this.b = this.d(); + } catch (i) { + this.c = i; + } finally { + this.a = true; + } + } + if (this.c) { + throw this.c; + } + return this.b; + } + get rawValue() { + return this.b; + } + }; + } +}); +function Ay(i) { + if (!i || typeof i != "string") { + return true; + } else { + return i.trim().length === 0; + } +} +function Fv(i, ...e) { + if (e.length === 0) { + return i; + } else { + return i.replace(dji, function (t, s) { + const n = parseInt(s, 10); + if (isNaN(n) || n < 0 || n >= e.length) { + return t; + } else { + return e[n]; + } + }); + } +} +function iji(i, e) { + if (Object.keys(e).length === 0) { + return i; + } else { + return i.replace(hji, (t, s) => e[s] ?? t); + } +} +function qVn(i) { + return i.replace(/[<>"'&]/g, e => { + switch (e) { + case "<": + return "<"; + case ">": + return ">"; + case "\"": + return """; + case "'": + return "'"; + case "&": + return "&"; + } + return e; + }); +} +function Ol(i) { + return i.replace(/[<>&]/g, function (e) { + switch (e) { + case "<": + return "<"; + case ">": + return ">"; + case "&": + return "&"; + default: + return e; + } + }); +} +function zg(i) { + return i.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g, "\\$&"); +} +function v4t(i, e) { + let t = 0; + let s = i.indexOf(e); + while (s !== -1) { + t++; + s = i.indexOf(e, s + e.length); + } + return t; +} +function WZ(i, e, t = "…") { + if (i.length <= e) { + return i; + } else { + return `${i.substr(0, e)}${t}`; + } +} +function y4t(i, e, t = "…") { + if (i.length <= e) { + return i; + } + const s = Math.ceil(e / 2) - t.length / 2; + const n = Math.floor(e / 2) - t.length / 2; + return `${i.substr(0, s)}${t}${i.substr(i.length - n)}`; +} +function $B(i, e = " ") { + const t = F2(i, e); + return _0(t, e); +} +function F2(i, e) { + if (!i || !e) { + return i; + } + const t = e.length; + if (t === 0 || i.length === 0) { + return i; + } + let s = 0; + while (i.indexOf(e, s) === s) { + s = s + t; + } + return i.substring(s); +} +function _0(i, e) { + if (!i || !e) { + return i; + } + const t = e.length; + const s = i.length; + if (t === 0 || s === 0) { + return i; + } + let n = s; + let r = -1; + while (r = i.lastIndexOf(e, n - 1), r !== -1 && r + t === n) { + if (r === 0) { + return ""; + } + n = r; + } + return i.substring(0, n); +} +function jVn(i) { + return i.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g, "\\$&").replace(/[\*]/g, ".*"); +} +function zVn(i) { + return i.replace(/\*/g, ""); +} +function ofe(i, e, t = {}) { + if (!i) { + throw new Error("Cannot create regex from empty string"); + } + if (!e) { + i = zg(i); + } + if (t.wholeWord) { + if (!/\B/.test(i.charAt(0))) { + i = "\\b" + i; + } + if (!/\B/.test(i.charAt(i.length - 1))) { + i = i + "\\b"; + } + } + let s = ""; + if (t.global) { + s += "g"; + } + if (!t.matchCase) { + s += "i"; + } + if (t.multiline) { + s += "m"; + } + if (t.unicode) { + s += "u"; + } + return new RegExp(i, s); +} +function JVn(i) { + if (i.source === "^" || i.source === "^$" || i.source === "$" || i.source === "^\\s*$") { + return false; + } else { + return !!i.exec("") && i.lastIndex === 0; + } +} +function GVn(i, e) { + return i.filter(t => t != null && t !== false).join(e); +} +function Ov(i) { + return i.split(/\r\n|\r|\n/); +} +function sji(i) { + const e = []; + const t = i.split(/(\r\n|\r|\n)/); + for (let s = 0; s < Math.ceil(t.length / 2); s++) { + e.push(t[s * 2] + (t[s * 2 + 1] ?? "")); + } + return e; +} +function B0(i) { + for (let e = 0, t = i.length; e < t; e++) { + const s = i.charCodeAt(e); + if (s !== 32 && s !== 9) { + return e; + } + } + return -1; +} +function Jd(i, e = 0, t = i.length) { + for (let s = e; s < t; s++) { + const n = i.charCodeAt(s); + if (n !== 32 && n !== 9) { + return i.substring(e, s); + } + } + return i.substring(e, t); +} +function TL(i, e = i.length - 1) { + for (let t = e; t >= 0; t--) { + const s = i.charCodeAt(t); + if (s !== 32 && s !== 9) { + return t; + } + } + return -1; +} +function KVn(i) { + const e = B0(i); + if (e === -1) { + return i.length; + } else { + return e; + } +} +function YVn(i, e, t) { + const s = []; + let n = 0; + for (const r of i.matchAll(e)) { + s.push(i.slice(n, r.index)); + if (r.index === undefined) { + throw new Error("match.index should be defined"); + } + n = r.index + r[0].length; + s.push(t(r[0], ...r.slice(1), r.index, i, r.groups)); + } + s.push(i.slice(n)); + return Promise.all(s).then(r => r.join("")); +} +function _m(i, e) { + if (i < e) { + return -1; + } else if (i > e) { + return 1; + } else { + return 0; + } +} +function _nt(i, e, t = 0, s = i.length, n = 0, r = e.length) { + for (; t < s && n < r; t++, n++) { + const l = i.charCodeAt(t); + const c = e.charCodeAt(n); + if (l < c) { + return -1; + } + if (l > c) { + return 1; + } + } + const o = s - t; + const a = r - n; + if (o < a) { + return -1; + } else if (o > a) { + return 1; + } else { + return 0; + } +} +function cM(i, e) { + return afe(i, e, 0, i.length, 0, e.length); +} +function afe(i, e, t = 0, s = i.length, n = 0, r = e.length) { + for (; t < s && n < r; t++, n++) { + let l = i.charCodeAt(t); + let c = e.charCodeAt(n); + if (l === c) { + continue; + } + if (l >= 128 || c >= 128) { + return _nt(i.toLowerCase(), e.toLowerCase(), t, s, n, r); + } + if (e9(l)) { + l -= 32; + } + if (e9(c)) { + c -= 32; + } + const u = l - c; + if (u !== 0) { + return u; + } + } + const o = s - t; + const a = r - n; + if (o < a) { + return -1; + } else if (o > a) { + return 1; + } else { + return 0; + } +} +function Bnt(i) { + return i >= 48 && i <= 57; +} +function e9(i) { + return i >= 97 && i <= 122; +} +function PL(i) { + return i >= 65 && i <= 90; +} +function $c(i, e) { + return i.length === e.length && afe(i, e) === 0; +} +function Oq(i, e) { + const t = e.length; + if (e.length > i.length) { + return false; + } else { + return afe(i, e, 0, t) === 0; + } +} +function LL(i, e) { + const t = Math.min(i.length, e.length); + let s; + for (s = 0; s < t; s++) { + if (i.charCodeAt(s) !== e.charCodeAt(s)) { + return s; + } + } + return t; +} +function VZ(i, e) { + const t = Math.min(i.length, e.length); + let s; + const n = i.length - 1; + const r = e.length - 1; + for (s = 0; s < t; s++) { + if (i.charCodeAt(n - s) !== e.charCodeAt(r - s)) { + return s; + } + } + return t; +} +function jb(i) { + return i >= 55296 && i <= 56319; +} +function _q(i) { + return i >= 56320 && i <= 57343; +} +function w4t(i, e) { + return (i - 55296 << 10) + (e - 56320) + 65536; +} +function Unt(i, e, t) { + const s = i.charCodeAt(t); + if (jb(s) && t + 1 < e) { + const n = i.charCodeAt(t + 1); + if (_q(n)) { + return w4t(s, n); + } + } + return s; +} +function XVn(i, e) { + const t = i.charCodeAt(e - 1); + if (_q(t) && e > 1) { + const s = i.charCodeAt(e - 2); + if (jb(s)) { + return w4t(s, t); + } + } + return t; +} +function C4t(i, e) { + return new HZ(i, e).nextGraphemeLength(); +} +function nji(i, e) { + return new HZ(i, e).prevGraphemeLength(); +} +function rji(i, e) { + if (e > 0 && _q(i.charCodeAt(e))) { + e--; + } + const t = e + C4t(i, e); + return [t - nji(i, t), t]; +} +function QVn() { + return /(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA\u07FE-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u088E\u08A0-\u08C9\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDC7\uFDF0-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE35\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDD23\uDE80-\uDEA9\uDEAD-\uDF45\uDF51-\uDF81\uDF86-\uDFF6]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD4B-\uDFFF]|\uD83B[\uDC00-\uDEBB])/; +} +function t9(i) { + Vnt ||= QVn(); + return Vnt.test(i); +} +function Bq(i) { + return fji.test(i); +} +function oji(i) { + return E4t.test(i); +} +function i9(i) { + return i >= 11904 && i <= 55215 || i >= 63744 && i <= 64255 || i >= 65281 && i <= 65374; +} +function S4t(i) { + return i >= 127462 && i <= 127487 || i === 8986 || i === 8987 || i === 9200 || i === 9203 || i >= 9728 && i <= 10175 || i === 11088 || i === 11093 || i >= 127744 && i <= 128591 || i >= 128640 && i <= 128764 || i >= 128992 && i <= 129008 || i >= 129280 && i <= 129535 || i >= 129648 && i <= 129782; +} +function ZVn(i, e, t = "") { + const s = i.trimStart(); + if (s.length < e) { + return s; + } + const n = /\b/g; + let r = 0; + while (n.test(s) && !(s.length - n.lastIndex < e)) { + r = n.lastIndex; + n.lastIndex += 1; + } + if (r === 0) { + return s; + } else { + return t + s.substring(r).trimStart(); + } +} +function* eHn(i) { + let e = 0; + for (const t of i.matchAll(I4t)) { + if (e !== t.index) { + yield { + isCode: false, + str: i.substring(e, t.index) + }; + } + yield { + isCode: true, + str: t[0] + }; + e = t.index + t[0].length; + } + if (e !== i.length) { + yield { + isCode: false, + str: i.substring(e) + }; + } +} +function O2(i) { + i &&= i.replace(I4t, ""); + return i; +} +function tHn(i) { + return O2(i).replace(gji, ""); +} +function aji(i) { + return !!i && !!(i.length > 0) && i.charCodeAt(0) === 65279; +} +function lji(i, e) { + if (!i || !e || i.length < e.length) { + return false; + } + const t = e.length; + const s = i.toLowerCase(); + let n = 0; + let r = -1; + while (n < t) { + const o = s.indexOf(e[n], r + 1); + if (o < 0) { + return false; + } + r = o; + n++; + } + return true; +} +function x4t(i, e = false) { + if (i) { + if (e) { + i = i.replace(/\\./g, ""); + } + return i.toLowerCase() !== i; + } else { + return false; + } +} +function cji(i) { + return i.charAt(0).toUpperCase() + i.slice(1); +} +function iHn(i, e = 1) { + if (e === 0) { + return ""; + } + let t = -1; + do { + t = i.indexOf(` +`, t + 1); + e--; + } while (e > 0 && t >= 0); + if (t === -1) { + return i; + } else { + if (i[t - 1] === "\r") { + t--; + } + return i.substr(0, t); + } +} +function k4t(i) { + i = i % 52; + if (i < 26) { + return String.fromCharCode(97 + i); + } else { + return String.fromCharCode(65 + i - 26); + } +} +function uji(i, e) { + if (i === 0) { + return e !== 5 && e !== 7; + } else if (i === 2 && e === 3) { + return false; + } else if (i === 4 || i === 2 || i === 3 || e === 4 || e === 2 || e === 3) { + return true; + } else { + return (i !== 8 || e !== 8 && e !== 9 && e !== 11 && e !== 12) && (i !== 11 && i !== 9 || e !== 9 && e !== 10) && (i !== 12 && i !== 10 || e !== 10) && e !== 5 && e !== 13 && e !== 7 && i !== 1 && (i !== 13 || e !== 14) && (i !== 6 || e !== 6); + } +} +function sHn() { + return [0, 0, 0, 51229, 51255, 12, 44061, 44087, 12, 127462, 127487, 6, 7083, 7085, 5, 47645, 47671, 12, 54813, 54839, 12, 128678, 128678, 14, 3270, 3270, 5, 9919, 9923, 14, 45853, 45879, 12, 49437, 49463, 12, 53021, 53047, 12, 71216, 71218, 7, 128398, 128399, 14, 129360, 129374, 14, 2519, 2519, 5, 4448, 4519, 9, 9742, 9742, 14, 12336, 12336, 14, 44957, 44983, 12, 46749, 46775, 12, 48541, 48567, 12, 50333, 50359, 12, 52125, 52151, 12, 53917, 53943, 12, 69888, 69890, 5, 73018, 73018, 5, 127990, 127990, 14, 128558, 128559, 14, 128759, 128760, 14, 129653, 129655, 14, 2027, 2035, 5, 2891, 2892, 7, 3761, 3761, 5, 6683, 6683, 5, 8293, 8293, 4, 9825, 9826, 14, 9999, 9999, 14, 43452, 43453, 5, 44509, 44535, 12, 45405, 45431, 12, 46301, 46327, 12, 47197, 47223, 12, 48093, 48119, 12, 48989, 49015, 12, 49885, 49911, 12, 50781, 50807, 12, 51677, 51703, 12, 52573, 52599, 12, 53469, 53495, 12, 54365, 54391, 12, 65279, 65279, 4, 70471, 70472, 7, 72145, 72147, 7, 119173, 119179, 5, 127799, 127818, 14, 128240, 128244, 14, 128512, 128512, 14, 128652, 128652, 14, 128721, 128722, 14, 129292, 129292, 14, 129445, 129450, 14, 129734, 129743, 14, 1476, 1477, 5, 2366, 2368, 7, 2750, 2752, 7, 3076, 3076, 5, 3415, 3415, 5, 4141, 4144, 5, 6109, 6109, 5, 6964, 6964, 5, 7394, 7400, 5, 9197, 9198, 14, 9770, 9770, 14, 9877, 9877, 14, 9968, 9969, 14, 10084, 10084, 14, 43052, 43052, 5, 43713, 43713, 5, 44285, 44311, 12, 44733, 44759, 12, 45181, 45207, 12, 45629, 45655, 12, 46077, 46103, 12, 46525, 46551, 12, 46973, 46999, 12, 47421, 47447, 12, 47869, 47895, 12, 48317, 48343, 12, 48765, 48791, 12, 49213, 49239, 12, 49661, 49687, 12, 50109, 50135, 12, 50557, 50583, 12, 51005, 51031, 12, 51453, 51479, 12, 51901, 51927, 12, 52349, 52375, 12, 52797, 52823, 12, 53245, 53271, 12, 53693, 53719, 12, 54141, 54167, 12, 54589, 54615, 12, 55037, 55063, 12, 69506, 69509, 5, 70191, 70193, 5, 70841, 70841, 7, 71463, 71467, 5, 72330, 72342, 5, 94031, 94031, 5, 123628, 123631, 5, 127763, 127765, 14, 127941, 127941, 14, 128043, 128062, 14, 128302, 128317, 14, 128465, 128467, 14, 128539, 128539, 14, 128640, 128640, 14, 128662, 128662, 14, 128703, 128703, 14, 128745, 128745, 14, 129004, 129007, 14, 129329, 129330, 14, 129402, 129402, 14, 129483, 129483, 14, 129686, 129704, 14, 130048, 131069, 14, 173, 173, 4, 1757, 1757, 1, 2200, 2207, 5, 2434, 2435, 7, 2631, 2632, 5, 2817, 2817, 5, 3008, 3008, 5, 3201, 3201, 5, 3387, 3388, 5, 3542, 3542, 5, 3902, 3903, 7, 4190, 4192, 5, 6002, 6003, 5, 6439, 6440, 5, 6765, 6770, 7, 7019, 7027, 5, 7154, 7155, 7, 8205, 8205, 13, 8505, 8505, 14, 9654, 9654, 14, 9757, 9757, 14, 9792, 9792, 14, 9852, 9853, 14, 9890, 9894, 14, 9937, 9937, 14, 9981, 9981, 14, 10035, 10036, 14, 11035, 11036, 14, 42654, 42655, 5, 43346, 43347, 7, 43587, 43587, 5, 44006, 44007, 7, 44173, 44199, 12, 44397, 44423, 12, 44621, 44647, 12, 44845, 44871, 12, 45069, 45095, 12, 45293, 45319, 12, 45517, 45543, 12, 45741, 45767, 12, 45965, 45991, 12, 46189, 46215, 12, 46413, 46439, 12, 46637, 46663, 12, 46861, 46887, 12, 47085, 47111, 12, 47309, 47335, 12, 47533, 47559, 12, 47757, 47783, 12, 47981, 48007, 12, 48205, 48231, 12, 48429, 48455, 12, 48653, 48679, 12, 48877, 48903, 12, 49101, 49127, 12, 49325, 49351, 12, 49549, 49575, 12, 49773, 49799, 12, 49997, 50023, 12, 50221, 50247, 12, 50445, 50471, 12, 50669, 50695, 12, 50893, 50919, 12, 51117, 51143, 12, 51341, 51367, 12, 51565, 51591, 12, 51789, 51815, 12, 52013, 52039, 12, 52237, 52263, 12, 52461, 52487, 12, 52685, 52711, 12, 52909, 52935, 12, 53133, 53159, 12, 53357, 53383, 12, 53581, 53607, 12, 53805, 53831, 12, 54029, 54055, 12, 54253, 54279, 12, 54477, 54503, 12, 54701, 54727, 12, 54925, 54951, 12, 55149, 55175, 12, 68101, 68102, 5, 69762, 69762, 7, 70067, 70069, 7, 70371, 70378, 5, 70720, 70721, 7, 71087, 71087, 5, 71341, 71341, 5, 71995, 71996, 5, 72249, 72249, 7, 72850, 72871, 5, 73109, 73109, 5, 118576, 118598, 5, 121505, 121519, 5, 127245, 127247, 14, 127568, 127569, 14, 127777, 127777, 14, 127872, 127891, 14, 127956, 127967, 14, 128015, 128016, 14, 128110, 128172, 14, 128259, 128259, 14, 128367, 128368, 14, 128424, 128424, 14, 128488, 128488, 14, 128530, 128532, 14, 128550, 128551, 14, 128566, 128566, 14, 128647, 128647, 14, 128656, 128656, 14, 128667, 128673, 14, 128691, 128693, 14, 128715, 128715, 14, 128728, 128732, 14, 128752, 128752, 14, 128765, 128767, 14, 129096, 129103, 14, 129311, 129311, 14, 129344, 129349, 14, 129394, 129394, 14, 129413, 129425, 14, 129466, 129471, 14, 129511, 129535, 14, 129664, 129666, 14, 129719, 129722, 14, 129760, 129767, 14, 917536, 917631, 5, 13, 13, 2, 1160, 1161, 5, 1564, 1564, 4, 1807, 1807, 1, 2085, 2087, 5, 2307, 2307, 7, 2382, 2383, 7, 2497, 2500, 5, 2563, 2563, 7, 2677, 2677, 5, 2763, 2764, 7, 2879, 2879, 5, 2914, 2915, 5, 3021, 3021, 5, 3142, 3144, 5, 3263, 3263, 5, 3285, 3286, 5, 3398, 3400, 7, 3530, 3530, 5, 3633, 3633, 5, 3864, 3865, 5, 3974, 3975, 5, 4155, 4156, 7, 4229, 4230, 5, 5909, 5909, 7, 6078, 6085, 7, 6277, 6278, 5, 6451, 6456, 7, 6744, 6750, 5, 6846, 6846, 5, 6972, 6972, 5, 7074, 7077, 5, 7146, 7148, 7, 7222, 7223, 5, 7416, 7417, 5, 8234, 8238, 4, 8417, 8417, 5, 9000, 9000, 14, 9203, 9203, 14, 9730, 9731, 14, 9748, 9749, 14, 9762, 9763, 14, 9776, 9783, 14, 9800, 9811, 14, 9831, 9831, 14, 9872, 9873, 14, 9882, 9882, 14, 9900, 9903, 14, 9929, 9933, 14, 9941, 9960, 14, 9974, 9974, 14, 9989, 9989, 14, 10006, 10006, 14, 10062, 10062, 14, 10160, 10160, 14, 11647, 11647, 5, 12953, 12953, 14, 43019, 43019, 5, 43232, 43249, 5, 43443, 43443, 5, 43567, 43568, 7, 43696, 43696, 5, 43765, 43765, 7, 44013, 44013, 5, 44117, 44143, 12, 44229, 44255, 12, 44341, 44367, 12, 44453, 44479, 12, 44565, 44591, 12, 44677, 44703, 12, 44789, 44815, 12, 44901, 44927, 12, 45013, 45039, 12, 45125, 45151, 12, 45237, 45263, 12, 45349, 45375, 12, 45461, 45487, 12, 45573, 45599, 12, 45685, 45711, 12, 45797, 45823, 12, 45909, 45935, 12, 46021, 46047, 12, 46133, 46159, 12, 46245, 46271, 12, 46357, 46383, 12, 46469, 46495, 12, 46581, 46607, 12, 46693, 46719, 12, 46805, 46831, 12, 46917, 46943, 12, 47029, 47055, 12, 47141, 47167, 12, 47253, 47279, 12, 47365, 47391, 12, 47477, 47503, 12, 47589, 47615, 12, 47701, 47727, 12, 47813, 47839, 12, 47925, 47951, 12, 48037, 48063, 12, 48149, 48175, 12, 48261, 48287, 12, 48373, 48399, 12, 48485, 48511, 12, 48597, 48623, 12, 48709, 48735, 12, 48821, 48847, 12, 48933, 48959, 12, 49045, 49071, 12, 49157, 49183, 12, 49269, 49295, 12, 49381, 49407, 12, 49493, 49519, 12, 49605, 49631, 12, 49717, 49743, 12, 49829, 49855, 12, 49941, 49967, 12, 50053, 50079, 12, 50165, 50191, 12, 50277, 50303, 12, 50389, 50415, 12, 50501, 50527, 12, 50613, 50639, 12, 50725, 50751, 12, 50837, 50863, 12, 50949, 50975, 12, 51061, 51087, 12, 51173, 51199, 12, 51285, 51311, 12, 51397, 51423, 12, 51509, 51535, 12, 51621, 51647, 12, 51733, 51759, 12, 51845, 51871, 12, 51957, 51983, 12, 52069, 52095, 12, 52181, 52207, 12, 52293, 52319, 12, 52405, 52431, 12, 52517, 52543, 12, 52629, 52655, 12, 52741, 52767, 12, 52853, 52879, 12, 52965, 52991, 12, 53077, 53103, 12, 53189, 53215, 12, 53301, 53327, 12, 53413, 53439, 12, 53525, 53551, 12, 53637, 53663, 12, 53749, 53775, 12, 53861, 53887, 12, 53973, 53999, 12, 54085, 54111, 12, 54197, 54223, 12, 54309, 54335, 12, 54421, 54447, 12, 54533, 54559, 12, 54645, 54671, 12, 54757, 54783, 12, 54869, 54895, 12, 54981, 55007, 12, 55093, 55119, 12, 55243, 55291, 10, 66045, 66045, 5, 68325, 68326, 5, 69688, 69702, 5, 69817, 69818, 5, 69957, 69958, 7, 70089, 70092, 5, 70198, 70199, 5, 70462, 70462, 5, 70502, 70508, 5, 70750, 70750, 5, 70846, 70846, 7, 71100, 71101, 5, 71230, 71230, 7, 71351, 71351, 5, 71737, 71738, 5, 72000, 72000, 7, 72160, 72160, 5, 72273, 72278, 5, 72752, 72758, 5, 72882, 72883, 5, 73031, 73031, 5, 73461, 73462, 7, 94192, 94193, 7, 119149, 119149, 7, 121403, 121452, 5, 122915, 122916, 5, 126980, 126980, 14, 127358, 127359, 14, 127535, 127535, 14, 127759, 127759, 14, 127771, 127771, 14, 127792, 127793, 14, 127825, 127867, 14, 127897, 127899, 14, 127945, 127945, 14, 127985, 127986, 14, 128000, 128007, 14, 128021, 128021, 14, 128066, 128100, 14, 128184, 128235, 14, 128249, 128252, 14, 128266, 128276, 14, 128335, 128335, 14, 128379, 128390, 14, 128407, 128419, 14, 128444, 128444, 14, 128481, 128481, 14, 128499, 128499, 14, 128526, 128526, 14, 128536, 128536, 14, 128543, 128543, 14, 128556, 128556, 14, 128564, 128564, 14, 128577, 128580, 14, 128643, 128645, 14, 128649, 128649, 14, 128654, 128654, 14, 128660, 128660, 14, 128664, 128664, 14, 128675, 128675, 14, 128686, 128689, 14, 128695, 128696, 14, 128705, 128709, 14, 128717, 128719, 14, 128725, 128725, 14, 128736, 128741, 14, 128747, 128748, 14, 128755, 128755, 14, 128762, 128762, 14, 128981, 128991, 14, 129009, 129023, 14, 129160, 129167, 14, 129296, 129304, 14, 129320, 129327, 14, 129340, 129342, 14, 129356, 129356, 14, 129388, 129392, 14, 129399, 129400, 14, 129404, 129407, 14, 129432, 129442, 14, 129454, 129455, 14, 129473, 129474, 14, 129485, 129487, 14, 129648, 129651, 14, 129659, 129660, 14, 129671, 129679, 14, 129709, 129711, 14, 129728, 129730, 14, 129751, 129753, 14, 129776, 129782, 14, 917505, 917505, 4, 917760, 917999, 5, 10, 10, 3, 127, 159, 4, 768, 879, 5, 1471, 1471, 5, 1536, 1541, 1, 1648, 1648, 5, 1767, 1768, 5, 1840, 1866, 5, 2070, 2073, 5, 2137, 2139, 5, 2274, 2274, 1, 2363, 2363, 7, 2377, 2380, 7, 2402, 2403, 5, 2494, 2494, 5, 2507, 2508, 7, 2558, 2558, 5, 2622, 2624, 7, 2641, 2641, 5, 2691, 2691, 7, 2759, 2760, 5, 2786, 2787, 5, 2876, 2876, 5, 2881, 2884, 5, 2901, 2902, 5, 3006, 3006, 5, 3014, 3016, 7, 3072, 3072, 5, 3134, 3136, 5, 3157, 3158, 5, 3260, 3260, 5, 3266, 3266, 5, 3274, 3275, 7, 3328, 3329, 5, 3391, 3392, 7, 3405, 3405, 5, 3457, 3457, 5, 3536, 3537, 7, 3551, 3551, 5, 3636, 3642, 5, 3764, 3772, 5, 3895, 3895, 5, 3967, 3967, 7, 3993, 4028, 5, 4146, 4151, 5, 4182, 4183, 7, 4226, 4226, 5, 4253, 4253, 5, 4957, 4959, 5, 5940, 5940, 7, 6070, 6070, 7, 6087, 6088, 7, 6158, 6158, 4, 6432, 6434, 5, 6448, 6449, 7, 6679, 6680, 5, 6742, 6742, 5, 6754, 6754, 5, 6783, 6783, 5, 6912, 6915, 5, 6966, 6970, 5, 6978, 6978, 5, 7042, 7042, 7, 7080, 7081, 5, 7143, 7143, 7, 7150, 7150, 7, 7212, 7219, 5, 7380, 7392, 5, 7412, 7412, 5, 8203, 8203, 4, 8232, 8232, 4, 8265, 8265, 14, 8400, 8412, 5, 8421, 8432, 5, 8617, 8618, 14, 9167, 9167, 14, 9200, 9200, 14, 9410, 9410, 14, 9723, 9726, 14, 9733, 9733, 14, 9745, 9745, 14, 9752, 9752, 14, 9760, 9760, 14, 9766, 9766, 14, 9774, 9774, 14, 9786, 9786, 14, 9794, 9794, 14, 9823, 9823, 14, 9828, 9828, 14, 9833, 9850, 14, 9855, 9855, 14, 9875, 9875, 14, 9880, 9880, 14, 9885, 9887, 14, 9896, 9897, 14, 9906, 9916, 14, 9926, 9927, 14, 9935, 9935, 14, 9939, 9939, 14, 9962, 9962, 14, 9972, 9972, 14, 9978, 9978, 14, 9986, 9986, 14, 9997, 9997, 14, 10002, 10002, 14, 10017, 10017, 14, 10055, 10055, 14, 10071, 10071, 14, 10133, 10135, 14, 10548, 10549, 14, 11093, 11093, 14, 12330, 12333, 5, 12441, 12442, 5, 42608, 42610, 5, 43010, 43010, 5, 43045, 43046, 5, 43188, 43203, 7, 43302, 43309, 5, 43392, 43394, 5, 43446, 43449, 5, 43493, 43493, 5, 43571, 43572, 7, 43597, 43597, 7, 43703, 43704, 5, 43756, 43757, 5, 44003, 44004, 7, 44009, 44010, 7, 44033, 44059, 12, 44089, 44115, 12, 44145, 44171, 12, 44201, 44227, 12, 44257, 44283, 12, 44313, 44339, 12, 44369, 44395, 12, 44425, 44451, 12, 44481, 44507, 12, 44537, 44563, 12, 44593, 44619, 12, 44649, 44675, 12, 44705, 44731, 12, 44761, 44787, 12, 44817, 44843, 12, 44873, 44899, 12, 44929, 44955, 12, 44985, 45011, 12, 45041, 45067, 12, 45097, 45123, 12, 45153, 45179, 12, 45209, 45235, 12, 45265, 45291, 12, 45321, 45347, 12, 45377, 45403, 12, 45433, 45459, 12, 45489, 45515, 12, 45545, 45571, 12, 45601, 45627, 12, 45657, 45683, 12, 45713, 45739, 12, 45769, 45795, 12, 45825, 45851, 12, 45881, 45907, 12, 45937, 45963, 12, 45993, 46019, 12, 46049, 46075, 12, 46105, 46131, 12, 46161, 46187, 12, 46217, 46243, 12, 46273, 46299, 12, 46329, 46355, 12, 46385, 46411, 12, 46441, 46467, 12, 46497, 46523, 12, 46553, 46579, 12, 46609, 46635, 12, 46665, 46691, 12, 46721, 46747, 12, 46777, 46803, 12, 46833, 46859, 12, 46889, 46915, 12, 46945, 46971, 12, 47001, 47027, 12, 47057, 47083, 12, 47113, 47139, 12, 47169, 47195, 12, 47225, 47251, 12, 47281, 47307, 12, 47337, 47363, 12, 47393, 47419, 12, 47449, 47475, 12, 47505, 47531, 12, 47561, 47587, 12, 47617, 47643, 12, 47673, 47699, 12, 47729, 47755, 12, 47785, 47811, 12, 47841, 47867, 12, 47897, 47923, 12, 47953, 47979, 12, 48009, 48035, 12, 48065, 48091, 12, 48121, 48147, 12, 48177, 48203, 12, 48233, 48259, 12, 48289, 48315, 12, 48345, 48371, 12, 48401, 48427, 12, 48457, 48483, 12, 48513, 48539, 12, 48569, 48595, 12, 48625, 48651, 12, 48681, 48707, 12, 48737, 48763, 12, 48793, 48819, 12, 48849, 48875, 12, 48905, 48931, 12, 48961, 48987, 12, 49017, 49043, 12, 49073, 49099, 12, 49129, 49155, 12, 49185, 49211, 12, 49241, 49267, 12, 49297, 49323, 12, 49353, 49379, 12, 49409, 49435, 12, 49465, 49491, 12, 49521, 49547, 12, 49577, 49603, 12, 49633, 49659, 12, 49689, 49715, 12, 49745, 49771, 12, 49801, 49827, 12, 49857, 49883, 12, 49913, 49939, 12, 49969, 49995, 12, 50025, 50051, 12, 50081, 50107, 12, 50137, 50163, 12, 50193, 50219, 12, 50249, 50275, 12, 50305, 50331, 12, 50361, 50387, 12, 50417, 50443, 12, 50473, 50499, 12, 50529, 50555, 12, 50585, 50611, 12, 50641, 50667, 12, 50697, 50723, 12, 50753, 50779, 12, 50809, 50835, 12, 50865, 50891, 12, 50921, 50947, 12, 50977, 51003, 12, 51033, 51059, 12, 51089, 51115, 12, 51145, 51171, 12, 51201, 51227, 12, 51257, 51283, 12, 51313, 51339, 12, 51369, 51395, 12, 51425, 51451, 12, 51481, 51507, 12, 51537, 51563, 12, 51593, 51619, 12, 51649, 51675, 12, 51705, 51731, 12, 51761, 51787, 12, 51817, 51843, 12, 51873, 51899, 12, 51929, 51955, 12, 51985, 52011, 12, 52041, 52067, 12, 52097, 52123, 12, 52153, 52179, 12, 52209, 52235, 12, 52265, 52291, 12, 52321, 52347, 12, 52377, 52403, 12, 52433, 52459, 12, 52489, 52515, 12, 52545, 52571, 12, 52601, 52627, 12, 52657, 52683, 12, 52713, 52739, 12, 52769, 52795, 12, 52825, 52851, 12, 52881, 52907, 12, 52937, 52963, 12, 52993, 53019, 12, 53049, 53075, 12, 53105, 53131, 12, 53161, 53187, 12, 53217, 53243, 12, 53273, 53299, 12, 53329, 53355, 12, 53385, 53411, 12, 53441, 53467, 12, 53497, 53523, 12, 53553, 53579, 12, 53609, 53635, 12, 53665, 53691, 12, 53721, 53747, 12, 53777, 53803, 12, 53833, 53859, 12, 53889, 53915, 12, 53945, 53971, 12, 54001, 54027, 12, 54057, 54083, 12, 54113, 54139, 12, 54169, 54195, 12, 54225, 54251, 12, 54281, 54307, 12, 54337, 54363, 12, 54393, 54419, 12, 54449, 54475, 12, 54505, 54531, 12, 54561, 54587, 12, 54617, 54643, 12, 54673, 54699, 12, 54729, 54755, 12, 54785, 54811, 12, 54841, 54867, 12, 54897, 54923, 12, 54953, 54979, 12, 55009, 55035, 12, 55065, 55091, 12, 55121, 55147, 12, 55177, 55203, 12, 65024, 65039, 5, 65520, 65528, 4, 66422, 66426, 5, 68152, 68154, 5, 69291, 69292, 5, 69633, 69633, 5, 69747, 69748, 5, 69811, 69814, 5, 69826, 69826, 5, 69932, 69932, 7, 70016, 70017, 5, 70079, 70080, 7, 70095, 70095, 5, 70196, 70196, 5, 70367, 70367, 5, 70402, 70403, 7, 70464, 70464, 5, 70487, 70487, 5, 70709, 70711, 7, 70725, 70725, 7, 70833, 70834, 7, 70843, 70844, 7, 70849, 70849, 7, 71090, 71093, 5, 71103, 71104, 5, 71227, 71228, 7, 71339, 71339, 5, 71344, 71349, 5, 71458, 71461, 5, 71727, 71735, 5, 71985, 71989, 7, 71998, 71998, 5, 72002, 72002, 7, 72154, 72155, 5, 72193, 72202, 5, 72251, 72254, 5, 72281, 72283, 5, 72344, 72345, 5, 72766, 72766, 7, 72874, 72880, 5, 72885, 72886, 5, 73023, 73029, 5, 73104, 73105, 5, 73111, 73111, 5, 92912, 92916, 5, 94095, 94098, 5, 113824, 113827, 4, 119142, 119142, 7, 119155, 119162, 4, 119362, 119364, 5, 121476, 121476, 5, 122888, 122904, 5, 123184, 123190, 5, 125252, 125258, 5, 127183, 127183, 14, 127340, 127343, 14, 127377, 127386, 14, 127491, 127503, 14, 127548, 127551, 14, 127744, 127756, 14, 127761, 127761, 14, 127769, 127769, 14, 127773, 127774, 14, 127780, 127788, 14, 127796, 127797, 14, 127820, 127823, 14, 127869, 127869, 14, 127894, 127895, 14, 127902, 127903, 14, 127943, 127943, 14, 127947, 127950, 14, 127972, 127972, 14, 127988, 127988, 14, 127992, 127994, 14, 128009, 128011, 14, 128019, 128019, 14, 128023, 128041, 14, 128064, 128064, 14, 128102, 128107, 14, 128174, 128181, 14, 128238, 128238, 14, 128246, 128247, 14, 128254, 128254, 14, 128264, 128264, 14, 128278, 128299, 14, 128329, 128330, 14, 128348, 128359, 14, 128371, 128377, 14, 128392, 128393, 14, 128401, 128404, 14, 128421, 128421, 14, 128433, 128434, 14, 128450, 128452, 14, 128476, 128478, 14, 128483, 128483, 14, 128495, 128495, 14, 128506, 128506, 14, 128519, 128520, 14, 128528, 128528, 14, 128534, 128534, 14, 128538, 128538, 14, 128540, 128542, 14, 128544, 128549, 14, 128552, 128555, 14, 128557, 128557, 14, 128560, 128563, 14, 128565, 128565, 14, 128567, 128576, 14, 128581, 128591, 14, 128641, 128642, 14, 128646, 128646, 14, 128648, 128648, 14, 128650, 128651, 14, 128653, 128653, 14, 128655, 128655, 14, 128657, 128659, 14, 128661, 128661, 14, 128663, 128663, 14, 128665, 128666, 14, 128674, 128674, 14, 128676, 128677, 14, 128679, 128685, 14, 128690, 128690, 14, 128694, 128694, 14, 128697, 128702, 14, 128704, 128704, 14, 128710, 128714, 14, 128716, 128716, 14, 128720, 128720, 14, 128723, 128724, 14, 128726, 128727, 14, 128733, 128735, 14, 128742, 128744, 14, 128746, 128746, 14, 128749, 128751, 14, 128753, 128754, 14, 128756, 128758, 14, 128761, 128761, 14, 128763, 128764, 14, 128884, 128895, 14, 128992, 129003, 14, 129008, 129008, 14, 129036, 129039, 14, 129114, 129119, 14, 129198, 129279, 14, 129293, 129295, 14, 129305, 129310, 14, 129312, 129319, 14, 129328, 129328, 14, 129331, 129338, 14, 129343, 129343, 14, 129351, 129355, 14, 129357, 129359, 14, 129375, 129387, 14, 129393, 129393, 14, 129395, 129398, 14, 129401, 129401, 14, 129403, 129403, 14, 129408, 129412, 14, 129426, 129431, 14, 129443, 129444, 14, 129451, 129453, 14, 129456, 129465, 14, 129472, 129472, 14, 129475, 129482, 14, 129484, 129484, 14, 129488, 129510, 14, 129536, 129647, 14, 129652, 129652, 14, 129656, 129658, 14, 129661, 129663, 14, 129667, 129670, 14, 129680, 129685, 14, 129705, 129708, 14, 129712, 129718, 14, 129723, 129727, 14, 129731, 129733, 14, 129744, 129750, 14, 129754, 129759, 14, 129768, 129775, 14, 129783, 129791, 14, 917504, 917504, 4, 917506, 917535, 4, 917632, 917759, 4, 918000, 921599, 4, 0, 9, 4, 11, 12, 4, 14, 31, 4, 169, 169, 14, 174, 174, 14, 1155, 1159, 5, 1425, 1469, 5, 1473, 1474, 5, 1479, 1479, 5, 1552, 1562, 5, 1611, 1631, 5, 1750, 1756, 5, 1759, 1764, 5, 1770, 1773, 5, 1809, 1809, 5, 1958, 1968, 5, 2045, 2045, 5, 2075, 2083, 5, 2089, 2093, 5, 2192, 2193, 1, 2250, 2273, 5, 2275, 2306, 5, 2362, 2362, 5, 2364, 2364, 5, 2369, 2376, 5, 2381, 2381, 5, 2385, 2391, 5, 2433, 2433, 5, 2492, 2492, 5, 2495, 2496, 7, 2503, 2504, 7, 2509, 2509, 5, 2530, 2531, 5, 2561, 2562, 5, 2620, 2620, 5, 2625, 2626, 5, 2635, 2637, 5, 2672, 2673, 5, 2689, 2690, 5, 2748, 2748, 5, 2753, 2757, 5, 2761, 2761, 7, 2765, 2765, 5, 2810, 2815, 5, 2818, 2819, 7, 2878, 2878, 5, 2880, 2880, 7, 2887, 2888, 7, 2893, 2893, 5, 2903, 2903, 5, 2946, 2946, 5, 3007, 3007, 7, 3009, 3010, 7, 3018, 3020, 7, 3031, 3031, 5, 3073, 3075, 7, 3132, 3132, 5, 3137, 3140, 7, 3146, 3149, 5, 3170, 3171, 5, 3202, 3203, 7, 3262, 3262, 7, 3264, 3265, 7, 3267, 3268, 7, 3271, 3272, 7, 3276, 3277, 5, 3298, 3299, 5, 3330, 3331, 7, 3390, 3390, 5, 3393, 3396, 5, 3402, 3404, 7, 3406, 3406, 1, 3426, 3427, 5, 3458, 3459, 7, 3535, 3535, 5, 3538, 3540, 5, 3544, 3550, 7, 3570, 3571, 7, 3635, 3635, 7, 3655, 3662, 5, 3763, 3763, 7, 3784, 3789, 5, 3893, 3893, 5, 3897, 3897, 5, 3953, 3966, 5, 3968, 3972, 5, 3981, 3991, 5, 4038, 4038, 5, 4145, 4145, 7, 4153, 4154, 5, 4157, 4158, 5, 4184, 4185, 5, 4209, 4212, 5, 4228, 4228, 7, 4237, 4237, 5, 4352, 4447, 8, 4520, 4607, 10, 5906, 5908, 5, 5938, 5939, 5, 5970, 5971, 5, 6068, 6069, 5, 6071, 6077, 5, 6086, 6086, 5, 6089, 6099, 5, 6155, 6157, 5, 6159, 6159, 5, 6313, 6313, 5, 6435, 6438, 7, 6441, 6443, 7, 6450, 6450, 5, 6457, 6459, 5, 6681, 6682, 7, 6741, 6741, 7, 6743, 6743, 7, 6752, 6752, 5, 6757, 6764, 5, 6771, 6780, 5, 6832, 6845, 5, 6847, 6862, 5, 6916, 6916, 7, 6965, 6965, 5, 6971, 6971, 7, 6973, 6977, 7, 6979, 6980, 7, 7040, 7041, 5, 7073, 7073, 7, 7078, 7079, 7, 7082, 7082, 7, 7142, 7142, 5, 7144, 7145, 5, 7149, 7149, 5, 7151, 7153, 5, 7204, 7211, 7, 7220, 7221, 7, 7376, 7378, 5, 7393, 7393, 7, 7405, 7405, 5, 7415, 7415, 7, 7616, 7679, 5, 8204, 8204, 5, 8206, 8207, 4, 8233, 8233, 4, 8252, 8252, 14, 8288, 8292, 4, 8294, 8303, 4, 8413, 8416, 5, 8418, 8420, 5, 8482, 8482, 14, 8596, 8601, 14, 8986, 8987, 14, 9096, 9096, 14, 9193, 9196, 14, 9199, 9199, 14, 9201, 9202, 14, 9208, 9210, 14, 9642, 9643, 14, 9664, 9664, 14, 9728, 9729, 14, 9732, 9732, 14, 9735, 9741, 14, 9743, 9744, 14, 9746, 9746, 14, 9750, 9751, 14, 9753, 9756, 14, 9758, 9759, 14, 9761, 9761, 14, 9764, 9765, 14, 9767, 9769, 14, 9771, 9773, 14, 9775, 9775, 14, 9784, 9785, 14, 9787, 9791, 14, 9793, 9793, 14, 9795, 9799, 14, 9812, 9822, 14, 9824, 9824, 14, 9827, 9827, 14, 9829, 9830, 14, 9832, 9832, 14, 9851, 9851, 14, 9854, 9854, 14, 9856, 9861, 14, 9874, 9874, 14, 9876, 9876, 14, 9878, 9879, 14, 9881, 9881, 14, 9883, 9884, 14, 9888, 9889, 14, 9895, 9895, 14, 9898, 9899, 14, 9904, 9905, 14, 9917, 9918, 14, 9924, 9925, 14, 9928, 9928, 14, 9934, 9934, 14, 9936, 9936, 14, 9938, 9938, 14, 9940, 9940, 14, 9961, 9961, 14, 9963, 9967, 14, 9970, 9971, 14, 9973, 9973, 14, 9975, 9977, 14, 9979, 9980, 14, 9982, 9985, 14, 9987, 9988, 14, 9992, 9996, 14, 9998, 9998, 14, 10000, 10001, 14, 10004, 10004, 14, 10013, 10013, 14, 10024, 10024, 14, 10052, 10052, 14, 10060, 10060, 14, 10067, 10069, 14, 10083, 10083, 14, 10085, 10087, 14, 10145, 10145, 14, 10175, 10175, 14, 11013, 11015, 14, 11088, 11088, 14, 11503, 11505, 5, 11744, 11775, 5, 12334, 12335, 5, 12349, 12349, 14, 12951, 12951, 14, 42607, 42607, 5, 42612, 42621, 5, 42736, 42737, 5, 43014, 43014, 5, 43043, 43044, 7, 43047, 43047, 7, 43136, 43137, 7, 43204, 43205, 5, 43263, 43263, 5, 43335, 43345, 5, 43360, 43388, 8, 43395, 43395, 7, 43444, 43445, 7, 43450, 43451, 7, 43454, 43456, 7, 43561, 43566, 5, 43569, 43570, 5, 43573, 43574, 5, 43596, 43596, 5, 43644, 43644, 5, 43698, 43700, 5, 43710, 43711, 5, 43755, 43755, 7, 43758, 43759, 7, 43766, 43766, 5, 44005, 44005, 5, 44008, 44008, 5, 44012, 44012, 7, 44032, 44032, 11, 44060, 44060, 11, 44088, 44088, 11, 44116, 44116, 11, 44144, 44144, 11, 44172, 44172, 11, 44200, 44200, 11, 44228, 44228, 11, 44256, 44256, 11, 44284, 44284, 11, 44312, 44312, 11, 44340, 44340, 11, 44368, 44368, 11, 44396, 44396, 11, 44424, 44424, 11, 44452, 44452, 11, 44480, 44480, 11, 44508, 44508, 11, 44536, 44536, 11, 44564, 44564, 11, 44592, 44592, 11, 44620, 44620, 11, 44648, 44648, 11, 44676, 44676, 11, 44704, 44704, 11, 44732, 44732, 11, 44760, 44760, 11, 44788, 44788, 11, 44816, 44816, 11, 44844, 44844, 11, 44872, 44872, 11, 44900, 44900, 11, 44928, 44928, 11, 44956, 44956, 11, 44984, 44984, 11, 45012, 45012, 11, 45040, 45040, 11, 45068, 45068, 11, 45096, 45096, 11, 45124, 45124, 11, 45152, 45152, 11, 45180, 45180, 11, 45208, 45208, 11, 45236, 45236, 11, 45264, 45264, 11, 45292, 45292, 11, 45320, 45320, 11, 45348, 45348, 11, 45376, 45376, 11, 45404, 45404, 11, 45432, 45432, 11, 45460, 45460, 11, 45488, 45488, 11, 45516, 45516, 11, 45544, 45544, 11, 45572, 45572, 11, 45600, 45600, 11, 45628, 45628, 11, 45656, 45656, 11, 45684, 45684, 11, 45712, 45712, 11, 45740, 45740, 11, 45768, 45768, 11, 45796, 45796, 11, 45824, 45824, 11, 45852, 45852, 11, 45880, 45880, 11, 45908, 45908, 11, 45936, 45936, 11, 45964, 45964, 11, 45992, 45992, 11, 46020, 46020, 11, 46048, 46048, 11, 46076, 46076, 11, 46104, 46104, 11, 46132, 46132, 11, 46160, 46160, 11, 46188, 46188, 11, 46216, 46216, 11, 46244, 46244, 11, 46272, 46272, 11, 46300, 46300, 11, 46328, 46328, 11, 46356, 46356, 11, 46384, 46384, 11, 46412, 46412, 11, 46440, 46440, 11, 46468, 46468, 11, 46496, 46496, 11, 46524, 46524, 11, 46552, 46552, 11, 46580, 46580, 11, 46608, 46608, 11, 46636, 46636, 11, 46664, 46664, 11, 46692, 46692, 11, 46720, 46720, 11, 46748, 46748, 11, 46776, 46776, 11, 46804, 46804, 11, 46832, 46832, 11, 46860, 46860, 11, 46888, 46888, 11, 46916, 46916, 11, 46944, 46944, 11, 46972, 46972, 11, 47000, 47000, 11, 47028, 47028, 11, 47056, 47056, 11, 47084, 47084, 11, 47112, 47112, 11, 47140, 47140, 11, 47168, 47168, 11, 47196, 47196, 11, 47224, 47224, 11, 47252, 47252, 11, 47280, 47280, 11, 47308, 47308, 11, 47336, 47336, 11, 47364, 47364, 11, 47392, 47392, 11, 47420, 47420, 11, 47448, 47448, 11, 47476, 47476, 11, 47504, 47504, 11, 47532, 47532, 11, 47560, 47560, 11, 47588, 47588, 11, 47616, 47616, 11, 47644, 47644, 11, 47672, 47672, 11, 47700, 47700, 11, 47728, 47728, 11, 47756, 47756, 11, 47784, 47784, 11, 47812, 47812, 11, 47840, 47840, 11, 47868, 47868, 11, 47896, 47896, 11, 47924, 47924, 11, 47952, 47952, 11, 47980, 47980, 11, 48008, 48008, 11, 48036, 48036, 11, 48064, 48064, 11, 48092, 48092, 11, 48120, 48120, 11, 48148, 48148, 11, 48176, 48176, 11, 48204, 48204, 11, 48232, 48232, 11, 48260, 48260, 11, 48288, 48288, 11, 48316, 48316, 11, 48344, 48344, 11, 48372, 48372, 11, 48400, 48400, 11, 48428, 48428, 11, 48456, 48456, 11, 48484, 48484, 11, 48512, 48512, 11, 48540, 48540, 11, 48568, 48568, 11, 48596, 48596, 11, 48624, 48624, 11, 48652, 48652, 11, 48680, 48680, 11, 48708, 48708, 11, 48736, 48736, 11, 48764, 48764, 11, 48792, 48792, 11, 48820, 48820, 11, 48848, 48848, 11, 48876, 48876, 11, 48904, 48904, 11, 48932, 48932, 11, 48960, 48960, 11, 48988, 48988, 11, 49016, 49016, 11, 49044, 49044, 11, 49072, 49072, 11, 49100, 49100, 11, 49128, 49128, 11, 49156, 49156, 11, 49184, 49184, 11, 49212, 49212, 11, 49240, 49240, 11, 49268, 49268, 11, 49296, 49296, 11, 49324, 49324, 11, 49352, 49352, 11, 49380, 49380, 11, 49408, 49408, 11, 49436, 49436, 11, 49464, 49464, 11, 49492, 49492, 11, 49520, 49520, 11, 49548, 49548, 11, 49576, 49576, 11, 49604, 49604, 11, 49632, 49632, 11, 49660, 49660, 11, 49688, 49688, 11, 49716, 49716, 11, 49744, 49744, 11, 49772, 49772, 11, 49800, 49800, 11, 49828, 49828, 11, 49856, 49856, 11, 49884, 49884, 11, 49912, 49912, 11, 49940, 49940, 11, 49968, 49968, 11, 49996, 49996, 11, 50024, 50024, 11, 50052, 50052, 11, 50080, 50080, 11, 50108, 50108, 11, 50136, 50136, 11, 50164, 50164, 11, 50192, 50192, 11, 50220, 50220, 11, 50248, 50248, 11, 50276, 50276, 11, 50304, 50304, 11, 50332, 50332, 11, 50360, 50360, 11, 50388, 50388, 11, 50416, 50416, 11, 50444, 50444, 11, 50472, 50472, 11, 50500, 50500, 11, 50528, 50528, 11, 50556, 50556, 11, 50584, 50584, 11, 50612, 50612, 11, 50640, 50640, 11, 50668, 50668, 11, 50696, 50696, 11, 50724, 50724, 11, 50752, 50752, 11, 50780, 50780, 11, 50808, 50808, 11, 50836, 50836, 11, 50864, 50864, 11, 50892, 50892, 11, 50920, 50920, 11, 50948, 50948, 11, 50976, 50976, 11, 51004, 51004, 11, 51032, 51032, 11, 51060, 51060, 11, 51088, 51088, 11, 51116, 51116, 11, 51144, 51144, 11, 51172, 51172, 11, 51200, 51200, 11, 51228, 51228, 11, 51256, 51256, 11, 51284, 51284, 11, 51312, 51312, 11, 51340, 51340, 11, 51368, 51368, 11, 51396, 51396, 11, 51424, 51424, 11, 51452, 51452, 11, 51480, 51480, 11, 51508, 51508, 11, 51536, 51536, 11, 51564, 51564, 11, 51592, 51592, 11, 51620, 51620, 11, 51648, 51648, 11, 51676, 51676, 11, 51704, 51704, 11, 51732, 51732, 11, 51760, 51760, 11, 51788, 51788, 11, 51816, 51816, 11, 51844, 51844, 11, 51872, 51872, 11, 51900, 51900, 11, 51928, 51928, 11, 51956, 51956, 11, 51984, 51984, 11, 52012, 52012, 11, 52040, 52040, 11, 52068, 52068, 11, 52096, 52096, 11, 52124, 52124, 11, 52152, 52152, 11, 52180, 52180, 11, 52208, 52208, 11, 52236, 52236, 11, 52264, 52264, 11, 52292, 52292, 11, 52320, 52320, 11, 52348, 52348, 11, 52376, 52376, 11, 52404, 52404, 11, 52432, 52432, 11, 52460, 52460, 11, 52488, 52488, 11, 52516, 52516, 11, 52544, 52544, 11, 52572, 52572, 11, 52600, 52600, 11, 52628, 52628, 11, 52656, 52656, 11, 52684, 52684, 11, 52712, 52712, 11, 52740, 52740, 11, 52768, 52768, 11, 52796, 52796, 11, 52824, 52824, 11, 52852, 52852, 11, 52880, 52880, 11, 52908, 52908, 11, 52936, 52936, 11, 52964, 52964, 11, 52992, 52992, 11, 53020, 53020, 11, 53048, 53048, 11, 53076, 53076, 11, 53104, 53104, 11, 53132, 53132, 11, 53160, 53160, 11, 53188, 53188, 11, 53216, 53216, 11, 53244, 53244, 11, 53272, 53272, 11, 53300, 53300, 11, 53328, 53328, 11, 53356, 53356, 11, 53384, 53384, 11, 53412, 53412, 11, 53440, 53440, 11, 53468, 53468, 11, 53496, 53496, 11, 53524, 53524, 11, 53552, 53552, 11, 53580, 53580, 11, 53608, 53608, 11, 53636, 53636, 11, 53664, 53664, 11, 53692, 53692, 11, 53720, 53720, 11, 53748, 53748, 11, 53776, 53776, 11, 53804, 53804, 11, 53832, 53832, 11, 53860, 53860, 11, 53888, 53888, 11, 53916, 53916, 11, 53944, 53944, 11, 53972, 53972, 11, 54000, 54000, 11, 54028, 54028, 11, 54056, 54056, 11, 54084, 54084, 11, 54112, 54112, 11, 54140, 54140, 11, 54168, 54168, 11, 54196, 54196, 11, 54224, 54224, 11, 54252, 54252, 11, 54280, 54280, 11, 54308, 54308, 11, 54336, 54336, 11, 54364, 54364, 11, 54392, 54392, 11, 54420, 54420, 11, 54448, 54448, 11, 54476, 54476, 11, 54504, 54504, 11, 54532, 54532, 11, 54560, 54560, 11, 54588, 54588, 11, 54616, 54616, 11, 54644, 54644, 11, 54672, 54672, 11, 54700, 54700, 11, 54728, 54728, 11, 54756, 54756, 11, 54784, 54784, 11, 54812, 54812, 11, 54840, 54840, 11, 54868, 54868, 11, 54896, 54896, 11, 54924, 54924, 11, 54952, 54952, 11, 54980, 54980, 11, 55008, 55008, 11, 55036, 55036, 11, 55064, 55064, 11, 55092, 55092, 11, 55120, 55120, 11, 55148, 55148, 11, 55176, 55176, 11, 55216, 55238, 9, 64286, 64286, 5, 65056, 65071, 5, 65438, 65439, 5, 65529, 65531, 4, 66272, 66272, 5, 68097, 68099, 5, 68108, 68111, 5, 68159, 68159, 5, 68900, 68903, 5, 69446, 69456, 5, 69632, 69632, 7, 69634, 69634, 7, 69744, 69744, 5, 69759, 69761, 5, 69808, 69810, 7, 69815, 69816, 7, 69821, 69821, 1, 69837, 69837, 1, 69927, 69931, 5, 69933, 69940, 5, 70003, 70003, 5, 70018, 70018, 7, 70070, 70078, 5, 70082, 70083, 1, 70094, 70094, 7, 70188, 70190, 7, 70194, 70195, 7, 70197, 70197, 7, 70206, 70206, 5, 70368, 70370, 7, 70400, 70401, 5, 70459, 70460, 5, 70463, 70463, 7, 70465, 70468, 7, 70475, 70477, 7, 70498, 70499, 7, 70512, 70516, 5, 70712, 70719, 5, 70722, 70724, 5, 70726, 70726, 5, 70832, 70832, 5, 70835, 70840, 5, 70842, 70842, 5, 70845, 70845, 5, 70847, 70848, 5, 70850, 70851, 5, 71088, 71089, 7, 71096, 71099, 7, 71102, 71102, 7, 71132, 71133, 5, 71219, 71226, 5, 71229, 71229, 5, 71231, 71232, 5, 71340, 71340, 7, 71342, 71343, 7, 71350, 71350, 7, 71453, 71455, 5, 71462, 71462, 7, 71724, 71726, 7, 71736, 71736, 7, 71984, 71984, 5, 71991, 71992, 7, 71997, 71997, 7, 71999, 71999, 1, 72001, 72001, 1, 72003, 72003, 5, 72148, 72151, 5, 72156, 72159, 7, 72164, 72164, 7, 72243, 72248, 5, 72250, 72250, 1, 72263, 72263, 5, 72279, 72280, 7, 72324, 72329, 1, 72343, 72343, 7, 72751, 72751, 7, 72760, 72765, 5, 72767, 72767, 5, 72873, 72873, 7, 72881, 72881, 7, 72884, 72884, 7, 73009, 73014, 5, 73020, 73021, 5, 73030, 73030, 1, 73098, 73102, 7, 73107, 73108, 7, 73110, 73110, 7, 73459, 73460, 5, 78896, 78904, 4, 92976, 92982, 5, 94033, 94087, 7, 94180, 94180, 5, 113821, 113822, 5, 118528, 118573, 5, 119141, 119141, 5, 119143, 119145, 5, 119150, 119154, 5, 119163, 119170, 5, 119210, 119213, 5, 121344, 121398, 5, 121461, 121461, 5, 121499, 121503, 5, 122880, 122886, 5, 122907, 122913, 5, 122918, 122922, 5, 123566, 123566, 5, 125136, 125142, 5, 126976, 126979, 14, 126981, 127182, 14, 127184, 127231, 14, 127279, 127279, 14, 127344, 127345, 14, 127374, 127374, 14, 127405, 127461, 14, 127489, 127490, 14, 127514, 127514, 14, 127538, 127546, 14, 127561, 127567, 14, 127570, 127743, 14, 127757, 127758, 14, 127760, 127760, 14, 127762, 127762, 14, 127766, 127768, 14, 127770, 127770, 14, 127772, 127772, 14, 127775, 127776, 14, 127778, 127779, 14, 127789, 127791, 14, 127794, 127795, 14, 127798, 127798, 14, 127819, 127819, 14, 127824, 127824, 14, 127868, 127868, 14, 127870, 127871, 14, 127892, 127893, 14, 127896, 127896, 14, 127900, 127901, 14, 127904, 127940, 14, 127942, 127942, 14, 127944, 127944, 14, 127946, 127946, 14, 127951, 127955, 14, 127968, 127971, 14, 127973, 127984, 14, 127987, 127987, 14, 127989, 127989, 14, 127991, 127991, 14, 127995, 127999, 5, 128008, 128008, 14, 128012, 128014, 14, 128017, 128018, 14, 128020, 128020, 14, 128022, 128022, 14, 128042, 128042, 14, 128063, 128063, 14, 128065, 128065, 14, 128101, 128101, 14, 128108, 128109, 14, 128173, 128173, 14, 128182, 128183, 14, 128236, 128237, 14, 128239, 128239, 14, 128245, 128245, 14, 128248, 128248, 14, 128253, 128253, 14, 128255, 128258, 14, 128260, 128263, 14, 128265, 128265, 14, 128277, 128277, 14, 128300, 128301, 14, 128326, 128328, 14, 128331, 128334, 14, 128336, 128347, 14, 128360, 128366, 14, 128369, 128370, 14, 128378, 128378, 14, 128391, 128391, 14, 128394, 128397, 14, 128400, 128400, 14, 128405, 128406, 14, 128420, 128420, 14, 128422, 128423, 14, 128425, 128432, 14, 128435, 128443, 14, 128445, 128449, 14, 128453, 128464, 14, 128468, 128475, 14, 128479, 128480, 14, 128482, 128482, 14, 128484, 128487, 14, 128489, 128494, 14, 128496, 128498, 14, 128500, 128505, 14, 128507, 128511, 14, 128513, 128518, 14, 128521, 128525, 14, 128527, 128527, 14, 128529, 128529, 14, 128533, 128533, 14, 128535, 128535, 14, 128537, 128537, 14]; +} +function nHn(i, e) { + if (i === 0) { + return 0; + } + const t = rHn(i, e); + if (t !== undefined) { + return t; + } + const s = new lfe(e, i); + s.prevCodePoint(); + return s.offset; +} +function rHn(i, e) { + const t = new lfe(e, i); + let s = t.prevCodePoint(); + while (oHn(s) || s === 65039 || s === 8419) { + if (t.offset === 0) { + return; + } + s = t.prevCodePoint(); + } + if (!S4t(s)) { + return; + } + let n = t.offset; + if (n > 0 && t.prevCodePoint() === 8205) { + n = t.offset; + } + return n; +} +function oHn(i) { + return i >= 127995 && i <= 127999; +} +function Wnt(i, e) { + return i && i.replace(/\r\n|\n|\r/g, e); +} +var dji; +var hji; +var lfe; +var HZ; +var Vnt; +var fji; +var E4t; +var I4t; +var gji; +var pji; +var mji; +var D4t; +var bji; +var s9; +var cfe; +var Uq; +var $i = ue({ + "out-build/vs/base/common/strings.js"() { + "use strict"; + + UZ(); + pu(); + dji = /{(\d+)}/g; + hji = /{([^}]+)}/g; + lfe = class { + get offset() { + return this.e; + } + constructor(i, e = 0) { + this.c = i; + this.d = i.length; + this.e = e; + } + setOffset(i) { + this.e = i; + } + prevCodePoint() { + const i = XVn(this.c, this.e); + this.e -= i >= 65536 ? 2 : 1; + return i; + } + nextCodePoint() { + const i = Unt(this.c, this.d, this.e); + this.e += i >= 65536 ? 2 : 1; + return i; + } + eol() { + return this.e >= this.d; + } + }; + HZ = class { + get offset() { + return this.c.offset; + } + constructor(i, e = 0) { + this.c = new lfe(i, e); + } + nextGraphemeLength() { + const i = D4t.getInstance(); + const e = this.c; + const t = e.offset; + let s = i.getGraphemeBreakType(e.nextCodePoint()); + while (!e.eol()) { + const n = e.offset; + const r = i.getGraphemeBreakType(e.nextCodePoint()); + if (uji(s, r)) { + e.setOffset(n); + break; + } + s = r; + } + return e.offset - t; + } + prevGraphemeLength() { + const i = D4t.getInstance(); + const e = this.c; + const t = e.offset; + let s = i.getGraphemeBreakType(e.prevCodePoint()); + while (e.offset > 0) { + const n = e.offset; + const r = i.getGraphemeBreakType(e.prevCodePoint()); + if (uji(r, s)) { + e.setOffset(n); + break; + } + s = r; + } + return t - e.offset; + } + eol() { + return this.c.eol(); + } + }; + Vnt = undefined; + fji = /^[\t\n\r\x20-\x7E]*$/; + E4t = /[\u2028\u2029]/; + I4t = /(?:(?:\x1b\[|\x9B)[=?>!]?[\d;:]*["$#'* ]?[a-zA-Z@^`{}|~])|(:?\x1b\].*?\x07)/g; + gji = /\\\[.*?\\\]/g; + pji = ""; + (function (i) { + i[i.Other = 0] = "Other"; + i[i.Prepend = 1] = "Prepend"; + i[i.CR = 2] = "CR"; + i[i.LF = 3] = "LF"; + i[i.Control = 4] = "Control"; + i[i.Extend = 5] = "Extend"; + i[i.Regional_Indicator = 6] = "Regional_Indicator"; + i[i.SpacingMark = 7] = "SpacingMark"; + i[i.L = 8] = "L"; + i[i.V = 9] = "V"; + i[i.T = 10] = "T"; + i[i.LV = 11] = "LV"; + i[i.LVT = 12] = "LVT"; + i[i.ZWJ = 13] = "ZWJ"; + i[i.Extended_Pictographic = 14] = "Extended_Pictographic"; + })(mji ||= {}); + D4t = class FPe { + static { + this.c = null; + } + static getInstance() { + FPe.c ||= new FPe(); + return FPe.c; + } + constructor() { + this.d = sHn(); + } + getGraphemeBreakType(e) { + if (e < 32) { + if (e === 10) { + return 3; + } else if (e === 13) { + return 2; + } else { + return 4; + } + } + if (e < 127) { + return 0; + } + const t = this.d; + const s = t.length / 3; + let n = 1; + while (n <= s) { + if (e < t[n * 3]) { + n = n * 2; + } else if (e > t[n * 3 + 1]) { + n = n * 2 + 1; + } else { + return t[n * 3 + 2]; + } + } + return 0; + } + }; + (function (i) { + i[i.zwj = 8205] = "zwj"; + i[i.emojiVariantSelector = 65039] = "emojiVariantSelector"; + i[i.enclosingKeyCap = 8419] = "enclosingKeyCap"; + })(bji ||= {}); + s9 = "\xA0"; + cfe = class OPe { + static { + this.c = new ol(() => ({ + _common: [8232, 32, 8233, 32, 5760, 32, 8192, 32, 8193, 32, 8194, 32, 8195, 32, 8196, 32, 8197, 32, 8198, 32, 8200, 32, 8201, 32, 8202, 32, 8287, 32, 8199, 32, 8239, 32, 2042, 95, 65101, 95, 65102, 95, 65103, 95, 8208, 45, 8209, 45, 8210, 45, 65112, 45, 1748, 45, 8259, 45, 727, 45, 8722, 45, 10134, 45, 11450, 45, 1549, 44, 1643, 44, 8218, 44, 184, 44, 42233, 44, 894, 59, 2307, 58, 2691, 58, 1417, 58, 1795, 58, 1796, 58, 5868, 58, 65072, 58, 6147, 58, 6153, 58, 8282, 58, 1475, 58, 760, 58, 42889, 58, 8758, 58, 720, 58, 42237, 58, 451, 33, 11601, 33, 660, 63, 577, 63, 2429, 63, 5038, 63, 42731, 63, 119149, 46, 8228, 46, 1793, 46, 1794, 46, 42510, 46, 68176, 46, 1632, 46, 1776, 46, 42232, 46, 1373, 96, 65287, 96, 8219, 96, 8242, 96, 1370, 96, 1523, 96, 8175, 96, 65344, 96, 900, 96, 8189, 96, 8125, 96, 8127, 96, 8190, 96, 697, 96, 884, 96, 712, 96, 714, 96, 715, 96, 756, 96, 699, 96, 701, 96, 700, 96, 702, 96, 42892, 96, 1497, 96, 2036, 96, 2037, 96, 5194, 96, 5836, 96, 94033, 96, 94034, 96, 65339, 91, 10088, 40, 10098, 40, 12308, 40, 64830, 40, 65341, 93, 10089, 41, 10099, 41, 12309, 41, 64831, 41, 10100, 123, 119060, 123, 10101, 125, 65342, 94, 8270, 42, 1645, 42, 8727, 42, 66335, 42, 5941, 47, 8257, 47, 8725, 47, 8260, 47, 9585, 47, 10187, 47, 10744, 47, 119354, 47, 12755, 47, 12339, 47, 11462, 47, 20031, 47, 12035, 47, 65340, 92, 65128, 92, 8726, 92, 10189, 92, 10741, 92, 10745, 92, 119311, 92, 119355, 92, 12756, 92, 20022, 92, 12034, 92, 42872, 38, 708, 94, 710, 94, 5869, 43, 10133, 43, 66203, 43, 8249, 60, 10094, 60, 706, 60, 119350, 60, 5176, 60, 5810, 60, 5120, 61, 11840, 61, 12448, 61, 42239, 61, 8250, 62, 10095, 62, 707, 62, 119351, 62, 5171, 62, 94015, 62, 8275, 126, 732, 126, 8128, 126, 8764, 126, 65372, 124, 65293, 45, 120784, 50, 120794, 50, 120804, 50, 120814, 50, 120824, 50, 130034, 50, 42842, 50, 423, 50, 1000, 50, 42564, 50, 5311, 50, 42735, 50, 119302, 51, 120785, 51, 120795, 51, 120805, 51, 120815, 51, 120825, 51, 130035, 51, 42923, 51, 540, 51, 439, 51, 42858, 51, 11468, 51, 1248, 51, 94011, 51, 71882, 51, 120786, 52, 120796, 52, 120806, 52, 120816, 52, 120826, 52, 130036, 52, 5070, 52, 71855, 52, 120787, 53, 120797, 53, 120807, 53, 120817, 53, 120827, 53, 130037, 53, 444, 53, 71867, 53, 120788, 54, 120798, 54, 120808, 54, 120818, 54, 120828, 54, 130038, 54, 11474, 54, 5102, 54, 71893, 54, 119314, 55, 120789, 55, 120799, 55, 120809, 55, 120819, 55, 120829, 55, 130039, 55, 66770, 55, 71878, 55, 2819, 56, 2538, 56, 2666, 56, 125131, 56, 120790, 56, 120800, 56, 120810, 56, 120820, 56, 120830, 56, 130040, 56, 547, 56, 546, 56, 66330, 56, 2663, 57, 2920, 57, 2541, 57, 3437, 57, 120791, 57, 120801, 57, 120811, 57, 120821, 57, 120831, 57, 130041, 57, 42862, 57, 11466, 57, 71884, 57, 71852, 57, 71894, 57, 9082, 97, 65345, 97, 119834, 97, 119886, 97, 119938, 97, 119990, 97, 120042, 97, 120094, 97, 120146, 97, 120198, 97, 120250, 97, 120302, 97, 120354, 97, 120406, 97, 120458, 97, 593, 97, 945, 97, 120514, 97, 120572, 97, 120630, 97, 120688, 97, 120746, 97, 65313, 65, 119808, 65, 119860, 65, 119912, 65, 119964, 65, 120016, 65, 120068, 65, 120120, 65, 120172, 65, 120224, 65, 120276, 65, 120328, 65, 120380, 65, 120432, 65, 913, 65, 120488, 65, 120546, 65, 120604, 65, 120662, 65, 120720, 65, 5034, 65, 5573, 65, 42222, 65, 94016, 65, 66208, 65, 119835, 98, 119887, 98, 119939, 98, 119991, 98, 120043, 98, 120095, 98, 120147, 98, 120199, 98, 120251, 98, 120303, 98, 120355, 98, 120407, 98, 120459, 98, 388, 98, 5071, 98, 5234, 98, 5551, 98, 65314, 66, 8492, 66, 119809, 66, 119861, 66, 119913, 66, 120017, 66, 120069, 66, 120121, 66, 120173, 66, 120225, 66, 120277, 66, 120329, 66, 120381, 66, 120433, 66, 42932, 66, 914, 66, 120489, 66, 120547, 66, 120605, 66, 120663, 66, 120721, 66, 5108, 66, 5623, 66, 42192, 66, 66178, 66, 66209, 66, 66305, 66, 65347, 99, 8573, 99, 119836, 99, 119888, 99, 119940, 99, 119992, 99, 120044, 99, 120096, 99, 120148, 99, 120200, 99, 120252, 99, 120304, 99, 120356, 99, 120408, 99, 120460, 99, 7428, 99, 1010, 99, 11429, 99, 43951, 99, 66621, 99, 128844, 67, 71922, 67, 71913, 67, 65315, 67, 8557, 67, 8450, 67, 8493, 67, 119810, 67, 119862, 67, 119914, 67, 119966, 67, 120018, 67, 120174, 67, 120226, 67, 120278, 67, 120330, 67, 120382, 67, 120434, 67, 1017, 67, 11428, 67, 5087, 67, 42202, 67, 66210, 67, 66306, 67, 66581, 67, 66844, 67, 8574, 100, 8518, 100, 119837, 100, 119889, 100, 119941, 100, 119993, 100, 120045, 100, 120097, 100, 120149, 100, 120201, 100, 120253, 100, 120305, 100, 120357, 100, 120409, 100, 120461, 100, 1281, 100, 5095, 100, 5231, 100, 42194, 100, 8558, 68, 8517, 68, 119811, 68, 119863, 68, 119915, 68, 119967, 68, 120019, 68, 120071, 68, 120123, 68, 120175, 68, 120227, 68, 120279, 68, 120331, 68, 120383, 68, 120435, 68, 5024, 68, 5598, 68, 5610, 68, 42195, 68, 8494, 101, 65349, 101, 8495, 101, 8519, 101, 119838, 101, 119890, 101, 119942, 101, 120046, 101, 120098, 101, 120150, 101, 120202, 101, 120254, 101, 120306, 101, 120358, 101, 120410, 101, 120462, 101, 43826, 101, 1213, 101, 8959, 69, 65317, 69, 8496, 69, 119812, 69, 119864, 69, 119916, 69, 120020, 69, 120072, 69, 120124, 69, 120176, 69, 120228, 69, 120280, 69, 120332, 69, 120384, 69, 120436, 69, 917, 69, 120492, 69, 120550, 69, 120608, 69, 120666, 69, 120724, 69, 11577, 69, 5036, 69, 42224, 69, 71846, 69, 71854, 69, 66182, 69, 119839, 102, 119891, 102, 119943, 102, 119995, 102, 120047, 102, 120099, 102, 120151, 102, 120203, 102, 120255, 102, 120307, 102, 120359, 102, 120411, 102, 120463, 102, 43829, 102, 42905, 102, 383, 102, 7837, 102, 1412, 102, 119315, 70, 8497, 70, 119813, 70, 119865, 70, 119917, 70, 120021, 70, 120073, 70, 120125, 70, 120177, 70, 120229, 70, 120281, 70, 120333, 70, 120385, 70, 120437, 70, 42904, 70, 988, 70, 120778, 70, 5556, 70, 42205, 70, 71874, 70, 71842, 70, 66183, 70, 66213, 70, 66853, 70, 65351, 103, 8458, 103, 119840, 103, 119892, 103, 119944, 103, 120048, 103, 120100, 103, 120152, 103, 120204, 103, 120256, 103, 120308, 103, 120360, 103, 120412, 103, 120464, 103, 609, 103, 7555, 103, 397, 103, 1409, 103, 119814, 71, 119866, 71, 119918, 71, 119970, 71, 120022, 71, 120074, 71, 120126, 71, 120178, 71, 120230, 71, 120282, 71, 120334, 71, 120386, 71, 120438, 71, 1292, 71, 5056, 71, 5107, 71, 42198, 71, 65352, 104, 8462, 104, 119841, 104, 119945, 104, 119997, 104, 120049, 104, 120101, 104, 120153, 104, 120205, 104, 120257, 104, 120309, 104, 120361, 104, 120413, 104, 120465, 104, 1211, 104, 1392, 104, 5058, 104, 65320, 72, 8459, 72, 8460, 72, 8461, 72, 119815, 72, 119867, 72, 119919, 72, 120023, 72, 120179, 72, 120231, 72, 120283, 72, 120335, 72, 120387, 72, 120439, 72, 919, 72, 120494, 72, 120552, 72, 120610, 72, 120668, 72, 120726, 72, 11406, 72, 5051, 72, 5500, 72, 42215, 72, 66255, 72, 731, 105, 9075, 105, 65353, 105, 8560, 105, 8505, 105, 8520, 105, 119842, 105, 119894, 105, 119946, 105, 119998, 105, 120050, 105, 120102, 105, 120154, 105, 120206, 105, 120258, 105, 120310, 105, 120362, 105, 120414, 105, 120466, 105, 120484, 105, 618, 105, 617, 105, 953, 105, 8126, 105, 890, 105, 120522, 105, 120580, 105, 120638, 105, 120696, 105, 120754, 105, 1110, 105, 42567, 105, 1231, 105, 43893, 105, 5029, 105, 71875, 105, 65354, 106, 8521, 106, 119843, 106, 119895, 106, 119947, 106, 119999, 106, 120051, 106, 120103, 106, 120155, 106, 120207, 106, 120259, 106, 120311, 106, 120363, 106, 120415, 106, 120467, 106, 1011, 106, 1112, 106, 65322, 74, 119817, 74, 119869, 74, 119921, 74, 119973, 74, 120025, 74, 120077, 74, 120129, 74, 120181, 74, 120233, 74, 120285, 74, 120337, 74, 120389, 74, 120441, 74, 42930, 74, 895, 74, 1032, 74, 5035, 74, 5261, 74, 42201, 74, 119844, 107, 119896, 107, 119948, 107, 120000, 107, 120052, 107, 120104, 107, 120156, 107, 120208, 107, 120260, 107, 120312, 107, 120364, 107, 120416, 107, 120468, 107, 8490, 75, 65323, 75, 119818, 75, 119870, 75, 119922, 75, 119974, 75, 120026, 75, 120078, 75, 120130, 75, 120182, 75, 120234, 75, 120286, 75, 120338, 75, 120390, 75, 120442, 75, 922, 75, 120497, 75, 120555, 75, 120613, 75, 120671, 75, 120729, 75, 11412, 75, 5094, 75, 5845, 75, 42199, 75, 66840, 75, 1472, 108, 8739, 73, 9213, 73, 65512, 73, 1633, 108, 1777, 73, 66336, 108, 125127, 108, 120783, 73, 120793, 73, 120803, 73, 120813, 73, 120823, 73, 130033, 73, 65321, 73, 8544, 73, 8464, 73, 8465, 73, 119816, 73, 119868, 73, 119920, 73, 120024, 73, 120128, 73, 120180, 73, 120232, 73, 120284, 73, 120336, 73, 120388, 73, 120440, 73, 65356, 108, 8572, 73, 8467, 108, 119845, 108, 119897, 108, 119949, 108, 120001, 108, 120053, 108, 120105, 73, 120157, 73, 120209, 73, 120261, 73, 120313, 73, 120365, 73, 120417, 73, 120469, 73, 448, 73, 120496, 73, 120554, 73, 120612, 73, 120670, 73, 120728, 73, 11410, 73, 1030, 73, 1216, 73, 1493, 108, 1503, 108, 1575, 108, 126464, 108, 126592, 108, 65166, 108, 65165, 108, 1994, 108, 11599, 73, 5825, 73, 42226, 73, 93992, 73, 66186, 124, 66313, 124, 119338, 76, 8556, 76, 8466, 76, 119819, 76, 119871, 76, 119923, 76, 120027, 76, 120079, 76, 120131, 76, 120183, 76, 120235, 76, 120287, 76, 120339, 76, 120391, 76, 120443, 76, 11472, 76, 5086, 76, 5290, 76, 42209, 76, 93974, 76, 71843, 76, 71858, 76, 66587, 76, 66854, 76, 65325, 77, 8559, 77, 8499, 77, 119820, 77, 119872, 77, 119924, 77, 120028, 77, 120080, 77, 120132, 77, 120184, 77, 120236, 77, 120288, 77, 120340, 77, 120392, 77, 120444, 77, 924, 77, 120499, 77, 120557, 77, 120615, 77, 120673, 77, 120731, 77, 1018, 77, 11416, 77, 5047, 77, 5616, 77, 5846, 77, 42207, 77, 66224, 77, 66321, 77, 119847, 110, 119899, 110, 119951, 110, 120003, 110, 120055, 110, 120107, 110, 120159, 110, 120211, 110, 120263, 110, 120315, 110, 120367, 110, 120419, 110, 120471, 110, 1400, 110, 1404, 110, 65326, 78, 8469, 78, 119821, 78, 119873, 78, 119925, 78, 119977, 78, 120029, 78, 120081, 78, 120185, 78, 120237, 78, 120289, 78, 120341, 78, 120393, 78, 120445, 78, 925, 78, 120500, 78, 120558, 78, 120616, 78, 120674, 78, 120732, 78, 11418, 78, 42208, 78, 66835, 78, 3074, 111, 3202, 111, 3330, 111, 3458, 111, 2406, 111, 2662, 111, 2790, 111, 3046, 111, 3174, 111, 3302, 111, 3430, 111, 3664, 111, 3792, 111, 4160, 111, 1637, 111, 1781, 111, 65359, 111, 8500, 111, 119848, 111, 119900, 111, 119952, 111, 120056, 111, 120108, 111, 120160, 111, 120212, 111, 120264, 111, 120316, 111, 120368, 111, 120420, 111, 120472, 111, 7439, 111, 7441, 111, 43837, 111, 959, 111, 120528, 111, 120586, 111, 120644, 111, 120702, 111, 120760, 111, 963, 111, 120532, 111, 120590, 111, 120648, 111, 120706, 111, 120764, 111, 11423, 111, 4351, 111, 1413, 111, 1505, 111, 1607, 111, 126500, 111, 126564, 111, 126596, 111, 65259, 111, 65260, 111, 65258, 111, 65257, 111, 1726, 111, 64428, 111, 64429, 111, 64427, 111, 64426, 111, 1729, 111, 64424, 111, 64425, 111, 64423, 111, 64422, 111, 1749, 111, 3360, 111, 4125, 111, 66794, 111, 71880, 111, 71895, 111, 66604, 111, 1984, 79, 2534, 79, 2918, 79, 12295, 79, 70864, 79, 71904, 79, 120782, 79, 120792, 79, 120802, 79, 120812, 79, 120822, 79, 130032, 79, 65327, 79, 119822, 79, 119874, 79, 119926, 79, 119978, 79, 120030, 79, 120082, 79, 120134, 79, 120186, 79, 120238, 79, 120290, 79, 120342, 79, 120394, 79, 120446, 79, 927, 79, 120502, 79, 120560, 79, 120618, 79, 120676, 79, 120734, 79, 11422, 79, 1365, 79, 11604, 79, 4816, 79, 2848, 79, 66754, 79, 42227, 79, 71861, 79, 66194, 79, 66219, 79, 66564, 79, 66838, 79, 9076, 112, 65360, 112, 119849, 112, 119901, 112, 119953, 112, 120005, 112, 120057, 112, 120109, 112, 120161, 112, 120213, 112, 120265, 112, 120317, 112, 120369, 112, 120421, 112, 120473, 112, 961, 112, 120530, 112, 120544, 112, 120588, 112, 120602, 112, 120646, 112, 120660, 112, 120704, 112, 120718, 112, 120762, 112, 120776, 112, 11427, 112, 65328, 80, 8473, 80, 119823, 80, 119875, 80, 119927, 80, 119979, 80, 120031, 80, 120083, 80, 120187, 80, 120239, 80, 120291, 80, 120343, 80, 120395, 80, 120447, 80, 929, 80, 120504, 80, 120562, 80, 120620, 80, 120678, 80, 120736, 80, 11426, 80, 5090, 80, 5229, 80, 42193, 80, 66197, 80, 119850, 113, 119902, 113, 119954, 113, 120006, 113, 120058, 113, 120110, 113, 120162, 113, 120214, 113, 120266, 113, 120318, 113, 120370, 113, 120422, 113, 120474, 113, 1307, 113, 1379, 113, 1382, 113, 8474, 81, 119824, 81, 119876, 81, 119928, 81, 119980, 81, 120032, 81, 120084, 81, 120188, 81, 120240, 81, 120292, 81, 120344, 81, 120396, 81, 120448, 81, 11605, 81, 119851, 114, 119903, 114, 119955, 114, 120007, 114, 120059, 114, 120111, 114, 120163, 114, 120215, 114, 120267, 114, 120319, 114, 120371, 114, 120423, 114, 120475, 114, 43847, 114, 43848, 114, 7462, 114, 11397, 114, 43905, 114, 119318, 82, 8475, 82, 8476, 82, 8477, 82, 119825, 82, 119877, 82, 119929, 82, 120033, 82, 120189, 82, 120241, 82, 120293, 82, 120345, 82, 120397, 82, 120449, 82, 422, 82, 5025, 82, 5074, 82, 66740, 82, 5511, 82, 42211, 82, 94005, 82, 65363, 115, 119852, 115, 119904, 115, 119956, 115, 120008, 115, 120060, 115, 120112, 115, 120164, 115, 120216, 115, 120268, 115, 120320, 115, 120372, 115, 120424, 115, 120476, 115, 42801, 115, 445, 115, 1109, 115, 43946, 115, 71873, 115, 66632, 115, 65331, 83, 119826, 83, 119878, 83, 119930, 83, 119982, 83, 120034, 83, 120086, 83, 120138, 83, 120190, 83, 120242, 83, 120294, 83, 120346, 83, 120398, 83, 120450, 83, 1029, 83, 1359, 83, 5077, 83, 5082, 83, 42210, 83, 94010, 83, 66198, 83, 66592, 83, 119853, 116, 119905, 116, 119957, 116, 120009, 116, 120061, 116, 120113, 116, 120165, 116, 120217, 116, 120269, 116, 120321, 116, 120373, 116, 120425, 116, 120477, 116, 8868, 84, 10201, 84, 128872, 84, 65332, 84, 119827, 84, 119879, 84, 119931, 84, 119983, 84, 120035, 84, 120087, 84, 120139, 84, 120191, 84, 120243, 84, 120295, 84, 120347, 84, 120399, 84, 120451, 84, 932, 84, 120507, 84, 120565, 84, 120623, 84, 120681, 84, 120739, 84, 11430, 84, 5026, 84, 42196, 84, 93962, 84, 71868, 84, 66199, 84, 66225, 84, 66325, 84, 119854, 117, 119906, 117, 119958, 117, 120010, 117, 120062, 117, 120114, 117, 120166, 117, 120218, 117, 120270, 117, 120322, 117, 120374, 117, 120426, 117, 120478, 117, 42911, 117, 7452, 117, 43854, 117, 43858, 117, 651, 117, 965, 117, 120534, 117, 120592, 117, 120650, 117, 120708, 117, 120766, 117, 1405, 117, 66806, 117, 71896, 117, 8746, 85, 8899, 85, 119828, 85, 119880, 85, 119932, 85, 119984, 85, 120036, 85, 120088, 85, 120140, 85, 120192, 85, 120244, 85, 120296, 85, 120348, 85, 120400, 85, 120452, 85, 1357, 85, 4608, 85, 66766, 85, 5196, 85, 42228, 85, 94018, 85, 71864, 85, 8744, 118, 8897, 118, 65366, 118, 8564, 118, 119855, 118, 119907, 118, 119959, 118, 120011, 118, 120063, 118, 120115, 118, 120167, 118, 120219, 118, 120271, 118, 120323, 118, 120375, 118, 120427, 118, 120479, 118, 7456, 118, 957, 118, 120526, 118, 120584, 118, 120642, 118, 120700, 118, 120758, 118, 1141, 118, 1496, 118, 71430, 118, 43945, 118, 71872, 118, 119309, 86, 1639, 86, 1783, 86, 8548, 86, 119829, 86, 119881, 86, 119933, 86, 119985, 86, 120037, 86, 120089, 86, 120141, 86, 120193, 86, 120245, 86, 120297, 86, 120349, 86, 120401, 86, 120453, 86, 1140, 86, 11576, 86, 5081, 86, 5167, 86, 42719, 86, 42214, 86, 93960, 86, 71840, 86, 66845, 86, 623, 119, 119856, 119, 119908, 119, 119960, 119, 120012, 119, 120064, 119, 120116, 119, 120168, 119, 120220, 119, 120272, 119, 120324, 119, 120376, 119, 120428, 119, 120480, 119, 7457, 119, 1121, 119, 1309, 119, 1377, 119, 71434, 119, 71438, 119, 71439, 119, 43907, 119, 71919, 87, 71910, 87, 119830, 87, 119882, 87, 119934, 87, 119986, 87, 120038, 87, 120090, 87, 120142, 87, 120194, 87, 120246, 87, 120298, 87, 120350, 87, 120402, 87, 120454, 87, 1308, 87, 5043, 87, 5076, 87, 42218, 87, 5742, 120, 10539, 120, 10540, 120, 10799, 120, 65368, 120, 8569, 120, 119857, 120, 119909, 120, 119961, 120, 120013, 120, 120065, 120, 120117, 120, 120169, 120, 120221, 120, 120273, 120, 120325, 120, 120377, 120, 120429, 120, 120481, 120, 5441, 120, 5501, 120, 5741, 88, 9587, 88, 66338, 88, 71916, 88, 65336, 88, 8553, 88, 119831, 88, 119883, 88, 119935, 88, 119987, 88, 120039, 88, 120091, 88, 120143, 88, 120195, 88, 120247, 88, 120299, 88, 120351, 88, 120403, 88, 120455, 88, 42931, 88, 935, 88, 120510, 88, 120568, 88, 120626, 88, 120684, 88, 120742, 88, 11436, 88, 11613, 88, 5815, 88, 42219, 88, 66192, 88, 66228, 88, 66327, 88, 66855, 88, 611, 121, 7564, 121, 65369, 121, 119858, 121, 119910, 121, 119962, 121, 120014, 121, 120066, 121, 120118, 121, 120170, 121, 120222, 121, 120274, 121, 120326, 121, 120378, 121, 120430, 121, 120482, 121, 655, 121, 7935, 121, 43866, 121, 947, 121, 8509, 121, 120516, 121, 120574, 121, 120632, 121, 120690, 121, 120748, 121, 1199, 121, 4327, 121, 71900, 121, 65337, 89, 119832, 89, 119884, 89, 119936, 89, 119988, 89, 120040, 89, 120092, 89, 120144, 89, 120196, 89, 120248, 89, 120300, 89, 120352, 89, 120404, 89, 120456, 89, 933, 89, 978, 89, 120508, 89, 120566, 89, 120624, 89, 120682, 89, 120740, 89, 11432, 89, 1198, 89, 5033, 89, 5053, 89, 42220, 89, 94019, 89, 71844, 89, 66226, 89, 119859, 122, 119911, 122, 119963, 122, 120015, 122, 120067, 122, 120119, 122, 120171, 122, 120223, 122, 120275, 122, 120327, 122, 120379, 122, 120431, 122, 120483, 122, 7458, 122, 43923, 122, 71876, 122, 66293, 90, 71909, 90, 65338, 90, 8484, 90, 8488, 90, 119833, 90, 119885, 90, 119937, 90, 119989, 90, 120041, 90, 120197, 90, 120249, 90, 120301, 90, 120353, 90, 120405, 90, 120457, 90, 918, 90, 120493, 90, 120551, 90, 120609, 90, 120667, 90, 120725, 90, 5059, 90, 42204, 90, 71849, 90, 65282, 34, 65284, 36, 65285, 37, 65286, 38, 65290, 42, 65291, 43, 65294, 46, 65295, 47, 65296, 48, 65297, 49, 65298, 50, 65299, 51, 65300, 52, 65301, 53, 65302, 54, 65303, 55, 65304, 56, 65305, 57, 65308, 60, 65309, 61, 65310, 62, 65312, 64, 65316, 68, 65318, 70, 65319, 71, 65324, 76, 65329, 81, 65330, 82, 65333, 85, 65334, 86, 65335, 87, 65343, 95, 65346, 98, 65348, 100, 65350, 102, 65355, 107, 65357, 109, 65358, 110, 65361, 113, 65362, 114, 65364, 116, 65365, 117, 65367, 119, 65370, 122, 65371, 123, 65373, 125, 119846, 109], + _default: [160, 32, 8211, 45, 65374, 126, 65306, 58, 65281, 33, 8216, 96, 8217, 96, 8245, 96, 180, 96, 12494, 47, 1047, 51, 1073, 54, 1072, 97, 1040, 65, 1068, 98, 1042, 66, 1089, 99, 1057, 67, 1077, 101, 1045, 69, 1053, 72, 305, 105, 1050, 75, 921, 73, 1052, 77, 1086, 111, 1054, 79, 1009, 112, 1088, 112, 1056, 80, 1075, 114, 1058, 84, 215, 120, 1093, 120, 1061, 88, 1091, 121, 1059, 89, 65283, 35, 65288, 40, 65289, 41, 65292, 44, 65307, 59, 65311, 63], + cs: [65374, 126, 65306, 58, 65281, 33, 8216, 96, 8217, 96, 8245, 96, 180, 96, 12494, 47, 1047, 51, 1073, 54, 1072, 97, 1040, 65, 1068, 98, 1042, 66, 1089, 99, 1057, 67, 1077, 101, 1045, 69, 1053, 72, 305, 105, 1050, 75, 921, 73, 1052, 77, 1086, 111, 1054, 79, 1009, 112, 1088, 112, 1056, 80, 1075, 114, 1058, 84, 1093, 120, 1061, 88, 1091, 121, 1059, 89, 65283, 35, 65288, 40, 65289, 41, 65292, 44, 65307, 59, 65311, 63], + de: [65374, 126, 65306, 58, 65281, 33, 8216, 96, 8217, 96, 8245, 96, 180, 96, 12494, 47, 1047, 51, 1073, 54, 1072, 97, 1040, 65, 1068, 98, 1042, 66, 1089, 99, 1057, 67, 1077, 101, 1045, 69, 1053, 72, 305, 105, 1050, 75, 921, 73, 1052, 77, 1086, 111, 1054, 79, 1009, 112, 1088, 112, 1056, 80, 1075, 114, 1058, 84, 1093, 120, 1061, 88, 1091, 121, 1059, 89, 65283, 35, 65288, 40, 65289, 41, 65292, 44, 65307, 59, 65311, 63], + es: [8211, 45, 65374, 126, 65306, 58, 65281, 33, 8245, 96, 180, 96, 12494, 47, 1047, 51, 1073, 54, 1072, 97, 1040, 65, 1068, 98, 1042, 66, 1089, 99, 1057, 67, 1077, 101, 1045, 69, 1053, 72, 305, 105, 1050, 75, 1052, 77, 1086, 111, 1054, 79, 1009, 112, 1088, 112, 1056, 80, 1075, 114, 1058, 84, 215, 120, 1093, 120, 1061, 88, 1091, 121, 1059, 89, 65283, 35, 65288, 40, 65289, 41, 65292, 44, 65307, 59, 65311, 63], + fr: [65374, 126, 65306, 58, 65281, 33, 8216, 96, 8245, 96, 12494, 47, 1047, 51, 1073, 54, 1072, 97, 1040, 65, 1068, 98, 1042, 66, 1089, 99, 1057, 67, 1077, 101, 1045, 69, 1053, 72, 305, 105, 1050, 75, 921, 73, 1052, 77, 1086, 111, 1054, 79, 1009, 112, 1088, 112, 1056, 80, 1075, 114, 1058, 84, 215, 120, 1093, 120, 1061, 88, 1091, 121, 1059, 89, 65283, 35, 65288, 40, 65289, 41, 65292, 44, 65307, 59, 65311, 63], + it: [160, 32, 8211, 45, 65374, 126, 65306, 58, 65281, 33, 8216, 96, 8245, 96, 180, 96, 12494, 47, 1047, 51, 1073, 54, 1072, 97, 1040, 65, 1068, 98, 1042, 66, 1089, 99, 1057, 67, 1077, 101, 1045, 69, 1053, 72, 305, 105, 1050, 75, 921, 73, 1052, 77, 1086, 111, 1054, 79, 1009, 112, 1088, 112, 1056, 80, 1075, 114, 1058, 84, 215, 120, 1093, 120, 1061, 88, 1091, 121, 1059, 89, 65283, 35, 65288, 40, 65289, 41, 65292, 44, 65307, 59, 65311, 63], + ja: [8211, 45, 65306, 58, 65281, 33, 8216, 96, 8217, 96, 8245, 96, 180, 96, 1047, 51, 1073, 54, 1072, 97, 1040, 65, 1068, 98, 1042, 66, 1089, 99, 1057, 67, 1077, 101, 1045, 69, 1053, 72, 305, 105, 1050, 75, 921, 73, 1052, 77, 1086, 111, 1054, 79, 1009, 112, 1088, 112, 1056, 80, 1075, 114, 1058, 84, 215, 120, 1093, 120, 1061, 88, 1091, 121, 1059, 89, 65283, 35, 65292, 44, 65307, 59], + ko: [8211, 45, 65374, 126, 65306, 58, 65281, 33, 8245, 96, 180, 96, 12494, 47, 1047, 51, 1073, 54, 1072, 97, 1040, 65, 1068, 98, 1042, 66, 1089, 99, 1057, 67, 1077, 101, 1045, 69, 1053, 72, 305, 105, 1050, 75, 921, 73, 1052, 77, 1086, 111, 1054, 79, 1009, 112, 1088, 112, 1056, 80, 1075, 114, 1058, 84, 215, 120, 1093, 120, 1061, 88, 1091, 121, 1059, 89, 65283, 35, 65288, 40, 65289, 41, 65292, 44, 65307, 59, 65311, 63], + pl: [65374, 126, 65306, 58, 65281, 33, 8216, 96, 8217, 96, 8245, 96, 180, 96, 12494, 47, 1047, 51, 1073, 54, 1072, 97, 1040, 65, 1068, 98, 1042, 66, 1089, 99, 1057, 67, 1077, 101, 1045, 69, 1053, 72, 305, 105, 1050, 75, 921, 73, 1052, 77, 1086, 111, 1054, 79, 1009, 112, 1088, 112, 1056, 80, 1075, 114, 1058, 84, 215, 120, 1093, 120, 1061, 88, 1091, 121, 1059, 89, 65283, 35, 65288, 40, 65289, 41, 65292, 44, 65307, 59, 65311, 63], + "pt-BR": [65374, 126, 65306, 58, 65281, 33, 8216, 96, 8217, 96, 8245, 96, 180, 96, 12494, 47, 1047, 51, 1073, 54, 1072, 97, 1040, 65, 1068, 98, 1042, 66, 1089, 99, 1057, 67, 1077, 101, 1045, 69, 1053, 72, 305, 105, 1050, 75, 921, 73, 1052, 77, 1086, 111, 1054, 79, 1009, 112, 1088, 112, 1056, 80, 1075, 114, 1058, 84, 215, 120, 1093, 120, 1061, 88, 1091, 121, 1059, 89, 65283, 35, 65288, 40, 65289, 41, 65292, 44, 65307, 59, 65311, 63], + "qps-ploc": [160, 32, 8211, 45, 65374, 126, 65306, 58, 65281, 33, 8216, 96, 8217, 96, 8245, 96, 180, 96, 12494, 47, 1047, 51, 1073, 54, 1072, 97, 1040, 65, 1068, 98, 1042, 66, 1089, 99, 1057, 67, 1077, 101, 1045, 69, 1053, 72, 305, 105, 1050, 75, 921, 73, 1052, 77, 1086, 111, 1054, 79, 1088, 112, 1056, 80, 1075, 114, 1058, 84, 215, 120, 1093, 120, 1061, 88, 1091, 121, 1059, 89, 65283, 35, 65288, 40, 65289, 41, 65292, 44, 65307, 59, 65311, 63], + ru: [65374, 126, 65306, 58, 65281, 33, 8216, 96, 8217, 96, 8245, 96, 180, 96, 12494, 47, 305, 105, 921, 73, 1009, 112, 215, 120, 65283, 35, 65288, 40, 65289, 41, 65292, 44, 65307, 59, 65311, 63], + tr: [160, 32, 8211, 45, 65374, 126, 65306, 58, 65281, 33, 8245, 96, 180, 96, 12494, 47, 1047, 51, 1073, 54, 1072, 97, 1040, 65, 1068, 98, 1042, 66, 1089, 99, 1057, 67, 1077, 101, 1045, 69, 1053, 72, 1050, 75, 921, 73, 1052, 77, 1086, 111, 1054, 79, 1009, 112, 1088, 112, 1056, 80, 1075, 114, 1058, 84, 215, 120, 1093, 120, 1061, 88, 1091, 121, 1059, 89, 65283, 35, 65288, 40, 65289, 41, 65292, 44, 65307, 59, 65311, 63], + "zh-hans": [65374, 126, 65306, 58, 65281, 33, 8245, 96, 180, 96, 12494, 47, 1047, 51, 1073, 54, 1072, 97, 1040, 65, 1068, 98, 1042, 66, 1089, 99, 1057, 67, 1077, 101, 1045, 69, 1053, 72, 305, 105, 1050, 75, 921, 73, 1052, 77, 1086, 111, 1054, 79, 1009, 112, 1088, 112, 1056, 80, 1075, 114, 1058, 84, 215, 120, 1093, 120, 1061, 88, 1091, 121, 1059, 89, 65288, 40, 65289, 41], + "zh-hant": [8211, 45, 65374, 126, 180, 96, 12494, 47, 1047, 51, 1073, 54, 1072, 97, 1040, 65, 1068, 98, 1042, 66, 1089, 99, 1057, 67, 1077, 101, 1045, 69, 1053, 72, 305, 105, 1050, 75, 921, 73, 1052, 77, 1086, 111, 1054, 79, 1009, 112, 1088, 112, 1056, 80, 1075, 114, 1058, 84, 215, 120, 1093, 120, 1061, 88, 1091, 121, 1059, 89, 65283, 35, 65307, 59] + })); + } + static { + this.d = new Ont({ + getCacheKey: JSON.stringify + }, e => { + function t(u) { + const d = new Map(); + for (let h = 0; h < u.length; h += 2) { + d.set(u[h], u[h + 1]); + } + return d; + } + function s(u, d) { + const h = new Map(u); + for (const [g, p] of d) { + h.set(g, p); + } + return h; + } + function n(u, d) { + if (!u) { + return d; + } + const h = new Map(); + for (const [g, p] of u) { + if (d.has(g)) { + h.set(g, p); + } + } + return h; + } + const r = this.c.value; + let o = e.filter(u => !u.startsWith("_") && u in r); + if (o.length === 0) { + o = ["_default"]; + } + let a; + for (const u of o) { + const d = t(r[u]); + a = n(a, d); + } + const l = t(r._common); + const c = s(l, a); + return new OPe(c); + }); + } + static getInstance(e) { + return OPe.d.get(Array.from(e)); + } + static { + this.e = new ol(() => Object.keys(OPe.c.value).filter(e => !e.startsWith("_"))); + } + static getLocales() { + return OPe.e.value; + } + constructor(e) { + this.f = e; + } + isAmbiguous(e) { + return this.f.has(e); + } + containsAmbiguousCharacter(e) { + for (let t = 0; t < e.length; t++) { + const s = e.codePointAt(t); + if (typeof s == "number" && this.isAmbiguous(s)) { + return true; + } + } + return false; + } + getPrimaryConfusable(e) { + return this.f.get(e); + } + getConfusableCodePoints() { + return new Set(this.f.keys()); + } + }; + Uq = class _Pe { + static c() { + return [9, 10, 11, 12, 13, 32, 127, 160, 173, 847, 1564, 4447, 4448, 6068, 6069, 6155, 6156, 6157, 6158, 7355, 7356, 8192, 8193, 8194, 8195, 8196, 8197, 8198, 8199, 8200, 8201, 8202, 8203, 8204, 8205, 8206, 8207, 8234, 8235, 8236, 8237, 8238, 8239, 8287, 8288, 8289, 8290, 8291, 8292, 8293, 8294, 8295, 8296, 8297, 8298, 8299, 8300, 8301, 8302, 8303, 10240, 12288, 12644, 65024, 65025, 65026, 65027, 65028, 65029, 65030, 65031, 65032, 65033, 65034, 65035, 65036, 65037, 65038, 65039, 65279, 65440, 65520, 65521, 65522, 65523, 65524, 65525, 65526, 65527, 65528, 65532, 78844, 119155, 119156, 119157, 119158, 119159, 119160, 119161, 119162, 917504, 917505, 917506, 917507, 917508, 917509, 917510, 917511, 917512, 917513, 917514, 917515, 917516, 917517, 917518, 917519, 917520, 917521, 917522, 917523, 917524, 917525, 917526, 917527, 917528, 917529, 917530, 917531, 917532, 917533, 917534, 917535, 917536, 917537, 917538, 917539, 917540, 917541, 917542, 917543, 917544, 917545, 917546, 917547, 917548, 917549, 917550, 917551, 917552, 917553, 917554, 917555, 917556, 917557, 917558, 917559, 917560, 917561, 917562, 917563, 917564, 917565, 917566, 917567, 917568, 917569, 917570, 917571, 917572, 917573, 917574, 917575, 917576, 917577, 917578, 917579, 917580, 917581, 917582, 917583, 917584, 917585, 917586, 917587, 917588, 917589, 917590, 917591, 917592, 917593, 917594, 917595, 917596, 917597, 917598, 917599, 917600, 917601, 917602, 917603, 917604, 917605, 917606, 917607, 917608, 917609, 917610, 917611, 917612, 917613, 917614, 917615, 917616, 917617, 917618, 917619, 917620, 917621, 917622, 917623, 917624, 917625, 917626, 917627, 917628, 917629, 917630, 917631, 917760, 917761, 917762, 917763, 917764, 917765, 917766, 917767, 917768, 917769, 917770, 917771, 917772, 917773, 917774, 917775, 917776, 917777, 917778, 917779, 917780, 917781, 917782, 917783, 917784, 917785, 917786, 917787, 917788, 917789, 917790, 917791, 917792, 917793, 917794, 917795, 917796, 917797, 917798, 917799, 917800, 917801, 917802, 917803, 917804, 917805, 917806, 917807, 917808, 917809, 917810, 917811, 917812, 917813, 917814, 917815, 917816, 917817, 917818, 917819, 917820, 917821, 917822, 917823, 917824, 917825, 917826, 917827, 917828, 917829, 917830, 917831, 917832, 917833, 917834, 917835, 917836, 917837, 917838, 917839, 917840, 917841, 917842, 917843, 917844, 917845, 917846, 917847, 917848, 917849, 917850, 917851, 917852, 917853, 917854, 917855, 917856, 917857, 917858, 917859, 917860, 917861, 917862, 917863, 917864, 917865, 917866, 917867, 917868, 917869, 917870, 917871, 917872, 917873, 917874, 917875, 917876, 917877, 917878, 917879, 917880, 917881, 917882, 917883, 917884, 917885, 917886, 917887, 917888, 917889, 917890, 917891, 917892, 917893, 917894, 917895, 917896, 917897, 917898, 917899, 917900, 917901, 917902, 917903, 917904, 917905, 917906, 917907, 917908, 917909, 917910, 917911, 917912, 917913, 917914, 917915, 917916, 917917, 917918, 917919, 917920, 917921, 917922, 917923, 917924, 917925, 917926, 917927, 917928, 917929, 917930, 917931, 917932, 917933, 917934, 917935, 917936, 917937, 917938, 917939, 917940, 917941, 917942, 917943, 917944, 917945, 917946, 917947, 917948, 917949, 917950, 917951, 917952, 917953, 917954, 917955, 917956, 917957, 917958, 917959, 917960, 917961, 917962, 917963, 917964, 917965, 917966, 917967, 917968, 917969, 917970, 917971, 917972, 917973, 917974, 917975, 917976, 917977, 917978, 917979, 917980, 917981, 917982, 917983, 917984, 917985, 917986, 917987, 917988, 917989, 917990, 917991, 917992, 917993, 917994, 917995, 917996, 917997, 917998, 917999]; + } + static { + this.d = undefined; + } + static e() { + this.d ||= new Set(_Pe.c()); + return this.d; + } + static isInvisibleCharacter(e) { + return _Pe.e().has(e); + } + static containsInvisibleCharacter(e) { + for (let t = 0; t < e.length; t++) { + const s = e.codePointAt(t); + if (typeof s == "number" && _Pe.isInvisibleCharacter(s)) { + return true; + } + } + return false; + } + static get codePoints() { + return _Pe.e(); + } + }; + } +}); +function yi(i) { + return typeof i == "string"; +} +function _2(i) { + return Array.isArray(i) && i.every(e => yi(e)); +} +function xo(i) { + return typeof i == "object" && i !== null && !Array.isArray(i) && !(i instanceof RegExp) && !(i instanceof Date); +} +function aHn(i) { + const e = Object.getPrototypeOf(Uint8Array); + return typeof i == "object" && i instanceof e; +} +function Od(i) { + return typeof i == "number" && !isNaN(i); +} +function vji(i) { + return !!i && typeof i[Symbol.iterator] == "function"; +} +function df(i) { + return i === true || i === false; +} +function qo(i) { + return typeof i === "undefined"; +} +function to(i) { + return !Ga(i); +} +function Ga(i) { + return qo(i) || i === null; +} +function yr(i, e) { + if (!i) { + throw new Error(e ? `Unexpected type, expected '${e}'` : "Unexpected type"); + } +} +function Tn(i) { + if (Ga(i)) { + throw new Error("Assertion Failed: argument is undefined or null"); + } + return i; +} +function vT(...i) { + const e = []; + for (let t = 0; t < i.length; t++) { + const s = i[t]; + if (Ga(s)) { + throw new Error(`Assertion Failed: argument at index ${t} is undefined or null`); + } + e.push(s); + } + return e; +} +function RL(i) { + if (!xo(i)) { + return false; + } + for (const e in i) { + if (wji.call(i, e)) { + return false; + } + } + return true; +} +function Wq(i) { + return typeof i == "function"; +} +function yji(...i) { + return i.length > 0 && i.every(Wq); +} +function lHn(i, e) { + const t = Math.min(i.length, e.length); + for (let s = 0; s < t; s++) { + cHn(i[s], e[s]); + } +} +function cHn(i, e) { + if (yi(e)) { + if (typeof i !== e) { + throw new Error(`argument does not match constraint: typeof ${e}`); + } + } else if (Wq(e)) { + try { + if (i instanceof e) { + return; + } + } catch {} + if (!Ga(i) && i.constructor === e || e.length === 1 && e.call(undefined, i) === true) { + return; + } + throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true"); + } +} +function yta(i) { + return i; +} +var wji; +var zt = ue({ + "out-build/vs/base/common/types.js"() { + "use strict"; + + wji = Object.prototype.hasOwnProperty; + } +}); +function n9(i) { + return i === 47 || i === 92; +} +function qZ(i) { + return i.replace(/[\\/]/g, ao.sep); +} +function Cji(i) { + if (i.indexOf("/") === -1) { + i = qZ(i); + } + if (/^[a-zA-Z]:(\/|$)/.test(i)) { + i = "/" + i; + } + return i; +} +function Sji(i, e = ao.sep) { + if (!i) { + return ""; + } + const t = i.length; + const s = i.charCodeAt(0); + if (n9(s)) { + if (n9(i.charCodeAt(1)) && !n9(i.charCodeAt(2))) { + let r = 3; + const o = r; + for (; r < t && !n9(i.charCodeAt(r)); r++); + if (o !== r && !n9(i.charCodeAt(r + 1))) { + for (r += 1; r < t; r++) { + if (n9(i.charCodeAt(r))) { + return i.slice(0, r + 1).replace(/[\\/]/g, e); + } + } + } + } + return e; + } else if (xji(s) && i.charCodeAt(1) === 58) { + if (n9(i.charCodeAt(2))) { + return i.slice(0, 2) + e; + } else { + return i.slice(0, 2); + } + } + let n = i.indexOf("://"); + if (n !== -1) { + for (n += 3; n < t; n++) { + if (n9(i.charCodeAt(n))) { + return i.slice(0, n + 1); + } + } + } + return ""; +} +function jZ(i) { + if (!ln || !i || i.length < 5) { + return false; + } + let e = i.charCodeAt(0); + if (e !== 92 || (e = i.charCodeAt(1), e !== 92)) { + return false; + } + let t = 2; + const s = t; + for (; t < i.length && (e = i.charCodeAt(t), e !== 92); t++); + return s !== t && !(e = i.charCodeAt(t + 1), isNaN(e) || e === 92); +} +function T4t(i, e = ln) { + const t = e ? kji : Eji; + return !!i && i.length !== 0 && !/^\s+$/.test(i) && !(t.lastIndex = 0, t.test(i)) && (!e || !Iji.test(i)) && i !== "." && i !== ".." && (!e || i[i.length - 1] !== ".") && (!e || i.length === i.trim().length) && !(i.length > 255); +} +function uHn(i, e, t) { + const s = i === e; + if (!t || s) { + return s; + } else if (!i || !e) { + return false; + } else { + return $c(i, e); + } +} +function Hnt(i, e, t, s = _h) { + if (i === e) { + return true; + } + if (!i || !e || e.length > i.length) { + return false; + } + if (t) { + if (!Oq(i, e)) { + return false; + } + if (e.length === i.length) { + return true; + } + let r = e.length; + if (e.charAt(e.length - 1) === s) { + r--; + } + return i.charAt(r) === s; + } + if (e.charAt(e.length - 1) !== s) { + e += s; + } + return i.indexOf(e) === 0; +} +function xji(i) { + return i >= 65 && i <= 90 || i >= 97 && i <= 122; +} +function dHn(i) { + if (ln) { + i = _0(i, _h); + if (i.endsWith(":")) { + i += _h; + } + } else { + i = _0(i, _h); + i ||= _h; + } + return i; +} +function ufe(i, e = ln) { + if (e) { + return xji(i.charCodeAt(0)) && i.charCodeAt(1) === 58; + } else { + return false; + } +} +function P4t(i, e = ln) { + if (ufe(i, e)) { + return i[0]; + } else { + return undefined; + } +} +function L4t(i, e, t) { + if (e.length > i.length) { + return -1; + } else if (i === e) { + return 0; + } else { + if (t) { + i = i.toLowerCase(); + e = e.toLowerCase(); + } + return i.indexOf(e); + } +} +function hHn(i) { + const e = i.split(":"); + let t; + let s; + let n; + for (const r of e) { + const o = Number(r); + if (Od(o)) { + if (s === undefined) { + s = o; + } else if (n === undefined) { + n = o; + } + } else { + t = t ? [t, r].join(":") : r; + } + } + if (!t) { + throw new Error("Format for `--goto` should be: `FILE:LINE(:COLUMN)`"); + } + return { + path: t, + line: s !== undefined ? s : undefined, + column: n !== undefined ? n : s !== undefined ? 1 : undefined + }; +} +function R4t(i, e, t = 8) { + let s = ""; + for (let r = 0; r < t; r++) { + let o; + if (r === 0 && ln && !e && (t === 3 || t === 4)) { + o = Tji; + } else { + o = Dji; + } + s += o.charAt(Math.floor(Math.random() * o.length)); + } + let n; + if (e) { + n = `${e}-${s}`; + } else { + n = s; + } + if (i) { + return id(i, n); + } else { + return n; + } +} +var kji; +var Eji; +var Iji; +var Dji; +var Tji; +var zb = ue({ + "out-build/vs/base/common/extpath.js"() { + "use strict"; + + pn(); + rt(); + $i(); + zt(); + kji = /[\\/:\*\?"<>\|]/g; + Eji = /[/]/g; + Iji = /^(con|prn|aux|clock\$|nul|lpt[0-9]|com[0-9])(\.(.*?))?$/i; + Dji = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; + Tji = "BDEFGHIJKMOQRSTUVWXYZbdefghijkmoqrstuvwxyz0123456789"; + } +}); +function fHn(i, e) { + if (!i.scheme && e) { + throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${i.authority}", path: "${i.path}", query: "${i.query}", fragment: "${i.fragment}"}`); + } + if (i.scheme && !Rji.test(i.scheme)) { + throw new Error("[UriError]: Scheme contains illegal characters."); + } + if (i.path) { + if (i.authority) { + if (!Nji.test(i.path)) { + throw new Error("[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash (\"/\") character"); + } + } else if (Mji.test(i.path)) { + throw new Error("[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters (\"//\")"); + } + } +} +function gHn(i, e) { + if (!i && !e) { + return "file"; + } else { + return i; + } +} +function pHn(i, e) { + switch (i) { + case "https": + case "http": + case "file": + if (e) { + if (e[0] !== NL) { + e = NL + e; + } + } else { + e = NL; + } + break; + } + return e; +} +function hb(i, e) { + return i.path === e.path && (i.scheme ?? "") === (e.scheme ?? "") && (i.query ?? "") === (e.query ?? "") && (i.fragment ?? "") === (e.fragment ?? ""); +} +function qnt(i) { + if (!i || typeof i != "object") { + return false; + } else { + return typeof i.scheme == "string" && (typeof i.authority == "string" || typeof i.authority === "undefined") && (typeof i.path == "string" || typeof i.path === "undefined") && (typeof i.query == "string" || typeof i.query === "undefined") && (typeof i.fragment == "string" || typeof i.fragment === "undefined"); + } +} +function Pji(i, e, t) { + let s; + let n = -1; + for (let r = 0; r < i.length; r++) { + const o = i.charCodeAt(r); + if (o >= 97 && o <= 122 || o >= 65 && o <= 90 || o >= 48 && o <= 57 || o === 45 || o === 46 || o === 95 || o === 126 || e && o === 47 || t && o === 91 || t && o === 93 || t && o === 58) { + if (n !== -1) { + s += encodeURIComponent(i.substring(n, r)); + n = -1; + } + if (s !== undefined) { + s += i.charAt(r); + } + } else { + if (s === undefined) { + s = i.substr(0, r); + } + const a = A4t[o]; + if (a !== undefined) { + if (n !== -1) { + s += encodeURIComponent(i.substring(n, r)); + n = -1; + } + s += a; + } else if (n === -1) { + n = r; + } + } + } + if (n !== -1) { + s += encodeURIComponent(i.substring(n)); + } + if (s !== undefined) { + return s; + } else { + return i; + } +} +function mHn(i) { + let e; + for (let t = 0; t < i.length; t++) { + const s = i.charCodeAt(t); + if (s === 35 || s === 63) { + if (e === undefined) { + e = i.substr(0, t); + } + e += A4t[s]; + } else if (e !== undefined) { + e += i[t]; + } + } + if (e !== undefined) { + return e; + } else { + return i; + } +} +function jnt(i, e) { + let t; + if (i.authority && i.path.length > 1 && i.scheme === "file") { + t = `//${i.authority}${i.path}`; + } else if (i.path.charCodeAt(0) === 47 && (i.path.charCodeAt(1) >= 65 && i.path.charCodeAt(1) <= 90 || i.path.charCodeAt(1) >= 97 && i.path.charCodeAt(1) <= 122) && i.path.charCodeAt(2) === 58) { + if (e) { + t = i.path.substr(1); + } else { + t = i.path[1].toLowerCase() + i.path.substr(2); + } + } else { + t = i.path; + } + if (ln) { + t = t.replace(/\//g, "\\"); + } + return t; +} +function N4t(i, e) { + const t = e ? mHn : Pji; + let s = ""; + let { + scheme: n, + authority: r, + path: o, + query: a, + fragment: l + } = i; + if (n) { + s += n; + s += ":"; + } + if (r || n === "file") { + s += NL; + s += NL; + } + if (r) { + let c = r.indexOf("@"); + if (c !== -1) { + const u = r.substr(0, c); + r = r.substr(c + 1); + c = u.lastIndexOf(":"); + if (c === -1) { + s += t(u, false, false); + } else { + s += t(u.substr(0, c), false, false); + s += ":"; + s += t(u.substr(c + 1), false, true); + } + s += "@"; + } + r = r.toLowerCase(); + c = r.lastIndexOf(":"); + if (c === -1) { + s += t(r, false, true); + } else { + s += t(r.substr(0, c), false, true); + s += r.substr(c); + } + } + if (o) { + if (o.length >= 3 && o.charCodeAt(0) === 47 && o.charCodeAt(2) === 58) { + const c = o.charCodeAt(1); + if (c >= 65 && c <= 90) { + o = `/${String.fromCharCode(c + 32)}:${o.substr(3)}`; + } + } else if (o.length >= 2 && o.charCodeAt(1) === 58) { + const c = o.charCodeAt(0); + if (c >= 65 && c <= 90) { + o = `${String.fromCharCode(c + 32)}:${o.substr(2)}`; + } + } + s += t(o, true, false); + } + if (a) { + s += "?"; + s += t(a, false, false); + } + if (l) { + s += "#"; + s += e ? l : Pji(l, false, false); + } + return s; +} +function Lji(i) { + try { + return decodeURIComponent(i); + } catch { + if (i.length > 3) { + return i.substr(0, 3) + Lji(i.substr(3)); + } else { + return i; + } + } +} +function znt(i) { + if (i.match($4t)) { + return i.replace($4t, e => Lji(e)); + } else { + return i; + } +} +var Rji; +var Nji; +var Mji; +var gp; +var NL; +var Aji; +var V; +var M4t; +var Vq; +var A4t; +var $4t; +var Le = ue({ + "out-build/vs/base/common/uri.js"() { + "use strict"; + + pn(); + rt(); + Rji = /^\w[\w\d+.-]*$/; + Nji = /^\//; + Mji = /^\/\//; + gp = ""; + NL = "/"; + Aji = /^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/; + V = class oFt { + static isUri(e) { + if (e instanceof oFt) { + return true; + } else if (e) { + return typeof e.authority == "string" && typeof e.fragment == "string" && typeof e.path == "string" && typeof e.query == "string" && typeof e.scheme == "string" && typeof e.fsPath == "string" && typeof e.with == "function" && typeof e.toString == "function"; + } else { + return false; + } + } + constructor(e, t, s, n, r, o = false) { + if (typeof e == "object") { + this.scheme = e.scheme || gp; + this.authority = e.authority || gp; + this.path = e.path || gp; + this.query = e.query || gp; + this.fragment = e.fragment || gp; + } else { + this.scheme = gHn(e, o); + this.authority = t || gp; + this.path = pHn(this.scheme, s || gp); + this.query = n || gp; + this.fragment = r || gp; + fHn(this, o); + } + } + get fsPath() { + return jnt(this, false); + } + with(e) { + if (!e) { + return this; + } + let { + scheme: t, + authority: s, + path: n, + query: r, + fragment: o + } = e; + if (t === undefined) { + t = this.scheme; + } else if (t === null) { + t = gp; + } + if (s === undefined) { + s = this.authority; + } else if (s === null) { + s = gp; + } + if (n === undefined) { + n = this.path; + } else if (n === null) { + n = gp; + } + if (r === undefined) { + r = this.query; + } else if (r === null) { + r = gp; + } + if (o === undefined) { + o = this.fragment; + } else if (o === null) { + o = gp; + } + if (t === this.scheme && s === this.authority && n === this.path && r === this.query && o === this.fragment) { + return this; + } else { + return new Vq(t, s, n, r, o); + } + } + static parse(e, t = false) { + const s = Aji.exec(e); + if (s) { + return new Vq(s[2] || gp, znt(s[4] || gp), znt(s[5] || gp), znt(s[7] || gp), znt(s[9] || gp), t); + } else { + return new Vq(gp, gp, gp, gp, gp); + } + } + static file(e) { + let t = gp; + if (ln) { + e = e.replace(/\\/g, NL); + } + if (e[0] === NL && e[1] === NL) { + const s = e.indexOf(NL, 2); + if (s === -1) { + t = e.substring(2); + e = NL; + } else { + t = e.substring(2, s); + e = e.substring(s) || NL; + } + } + return new Vq("file", t, e, gp, gp); + } + static from(e, t) { + return new Vq(e.scheme, e.authority, e.path, e.query, e.fragment, t); + } + static joinPath(e, ...t) { + if (!e.path) { + throw new Error("[UriError]: cannot call joinPath on URI without path"); + } + let s; + if (ln && e.scheme === "file") { + s = oFt.file(Sh.join(jnt(e, true), ...t)).path; + } else { + s = ao.join(e.path, ...t); + } + return e.with({ + path: s + }); + } + toString(e = false) { + return N4t(this, e); + } + toJSON() { + return this; + } + static revive(e) { + if (e) { + if (e instanceof oFt) { + return e; + } + { + const t = new Vq(e); + t._formatted = e.external ?? null; + t._fsPath = e._sep === M4t ? e.fsPath ?? null : null; + return t; + } + } else { + return e; + } + } + [Symbol.for("debug.description")]() { + return `URI(${this.toString()})`; + } + }; + M4t = ln ? 1 : undefined; + Vq = class extends V { + constructor() { + super(...arguments); + this._formatted = null; + this._fsPath = null; + } + get fsPath() { + this._fsPath ||= jnt(this, false); + return this._fsPath; + } + toString(i = false) { + if (i) { + return N4t(this, true); + } else { + this._formatted ||= N4t(this, false); + return this._formatted; + } + } + toJSON() { + const i = { + $mid: 1 + }; + if (this._fsPath) { + i.fsPath = this._fsPath; + i._sep = M4t; + } + if (this._formatted) { + i.external = this._formatted; + } + if (this.path) { + i.path = this.path; + } + if (this.scheme) { + i.scheme = this.scheme; + } + if (this.authority) { + i.authority = this.authority; + } + if (this.query) { + i.query = this.query; + } + if (this.fragment) { + i.fragment = this.fragment; + } + return i; + } + }; + A4t = { + 58: "%3A", + 47: "%2F", + 63: "%3F", + 35: "%23", + 91: "%5B", + 93: "%5D", + 64: "%40", + 33: "%21", + 36: "%24", + 38: "%26", + 39: "%27", + 40: "%28", + 41: "%29", + 42: "%2A", + 43: "%2B", + 44: "%2C", + 59: "%3B", + 61: "%3D", + 32: "%20" + }; + $4t = /(%[0-9A-Za-z][0-9A-Za-z])+/g; + } +}); +function _v(i, e) { + if (V.isUri(i)) { + return $c(i.scheme, e); + } else { + return Oq(i, e + ":"); + } +} +function zZ(i, ...e) { + return e.some(t => _v(i, t)); +} +function bHn(i, e) { + return ao.join(e ?? "/", `${i.quality ?? "oss"}-${i.commit ?? "dev"}`); +} +var me; +var $ji; +var Fji; +var uM; +var Oji; +var r9; +var JZ; +var F4t; +var O4t; +var _ji; +var Na; +var vHn; +var yHn; +var dfe; +var At = ue({ + "out-build/vs/base/common/network.js"() { + "use strict"; + + Ut(); + rt(); + $i(); + Le(); + pn(); + (function (i) { + i.inMemory = "inmemory"; + i.vscode = "vscode"; + i.internal = "private"; + i.walkThrough = "walkThrough"; + i.walkThroughSnippet = "walkThroughSnippet"; + i.http = "http"; + i.https = "https"; + i.file = "file"; + i.mailto = "mailto"; + i.untitled = "untitled"; + i.data = "data"; + i.command = "command"; + i.vscodeRemote = "vscode-remote"; + i.vscodeRemoteResource = "vscode-remote-resource"; + i.vscodeManagedRemoteResource = "vscode-managed-remote-resource"; + i.vscodeUserData = "vscode-userdata"; + i.vscodeCustomEditor = "vscode-custom-editor"; + i.vscodeNotebook = "vscode-notebook"; + i.vscodeNotebookCell = "vscode-notebook-cell"; + i.vscodeNotebookCellMetadata = "vscode-notebook-cell-metadata"; + i.vscodeNotebookCellMetadataDiff = "vscode-notebook-cell-metadata-diff"; + i.vscodeNotebookCellOutput = "vscode-notebook-cell-output"; + i.vscodeNotebookCellOutputDiff = "vscode-notebook-cell-output-diff"; + i.vscodeNotebookMetadata = "vscode-notebook-metadata"; + i.vscodeInteractiveInput = "vscode-interactive-input"; + i.vscodeSettings = "vscode-settings"; + i.vscodeWorkspaceTrust = "vscode-workspace-trust"; + i.vscodeTerminal = "vscode-terminal"; + i.vscodeChatCodeBlock = "vscode-chat-code-block"; + i.vscodeChatCodeCompareBlock = "vscode-chat-code-compare-block"; + i.vscodeChatSesssion = "vscode-chat-editor"; + i.webviewPanel = "webview-panel"; + i.vscodeWebview = "vscode-webview"; + i.extension = "extension"; + i.aiChat = "cursor.aichat"; + i.notepad = "cursor.notepad"; + i.contextObject = "cursor.context-object"; + i.composer = "cursor.composer"; + i.aiSettings = "cursor.aisettings"; + i.tinderDiffEditor = "cursor.tinderdiffeditor"; + i.vscodeFileResource = "vscode-file"; + i.tmp = "tmp"; + i.vsls = "vsls"; + i.vscodeSourceControl = "vscode-scm"; + i.commentsInput = "comment"; + i.codeSetting = "code-setting"; + i.cursorDev = "cursor-dev"; + i.outputChannel = "output"; + i.accessibleView = "accessible-view"; + i.backgroundComposer = "cursor.backgroundcomposer"; + i.personalEnvironmentJson = "cursor.personalenvironmentjson"; + i.bugbot = "cursor.bugbot"; + i.aiEditorBox = "aiEditorBox"; + })(me ||= {}); + $ji = "tkn"; + Fji = class { + constructor() { + this.a = Object.create(null); + this.b = Object.create(null); + this.c = Object.create(null); + this.d = "http"; + this.e = null; + this.f = "/"; + } + setPreferredWebSchema(i) { + this.d = i; + } + setDelegate(i) { + this.e = i; + } + setServerRootPath(i, e) { + this.f = bHn(i, e); + } + getServerRootPath() { + return this.f; + } + get g() { + return ao.join(this.f, me.vscodeRemoteResource); + } + set(i, e, t) { + this.a[i] = e; + this.b[i] = t; + } + setConnectionToken(i, e) { + this.c[i] = e; + } + getPreferredWebSchema() { + return this.d; + } + rewrite(i) { + if (this.e) { + try { + return this.e(i); + } catch (o) { + xs(o); + return i; + } + } + const e = i.authority; + let t = this.a[e]; + if (t && t.indexOf(":") !== -1 && t.indexOf("[") === -1) { + t = `[${t}]`; + } + const s = this.b[e]; + const n = this.c[e]; + let r = `path=${encodeURIComponent(i.path)}`; + if (typeof n == "string") { + r += `&${$ji}=${encodeURIComponent(n)}`; + } + return V.from({ + scheme: tn ? this.d : me.vscodeRemoteResource, + authority: `${t}:${s}`, + path: this.g, + query: r + }); + } + }; + uM = new Fji(); + Oji = "vs/../../extensions"; + r9 = "vs/../../node_modules"; + JZ = "vs/../../node_modules.asar"; + F4t = "vs/../../node_modules.asar.unpacked"; + O4t = "vscode-app"; + _ji = class aFt { + static { + this.a = O4t; + } + asBrowserUri(e) { + const t = this.b(e); + return this.uriToBrowserUri(t); + } + uriToBrowserUri(e) { + if (e.scheme === me.vscodeRemote) { + return uM.rewrite(e); + } else if (e.scheme === me.file && (sc || Wqi === `${me.vscodeFileResource}://${aFt.a}`)) { + return e.with({ + scheme: me.vscodeFileResource, + authority: e.authority || aFt.a, + query: null, + fragment: null + }); + } else { + return e; + } + } + asFileUri(e) { + const t = this.b(e); + return this.uriToFileUri(t); + } + uriToFileUri(e) { + if (e.scheme === me.vscodeFileResource) { + return e.with({ + scheme: me.file, + authority: e.authority !== aFt.a ? e.authority : null, + query: null, + fragment: null + }); + } else { + return e; + } + } + b(e, t) { + if (V.isUri(e)) { + return e; + } + if (globalThis._VSCODE_FILE_ROOT) { + const s = globalThis._VSCODE_FILE_ROOT; + if (/^\w[\w\d+.-]*:\/\//.test(s)) { + return V.joinPath(V.parse(s, true), e); + } + const n = id(s, e); + return V.file(n); + } + return V.parse(t.toUrl(e)); + } + }; + Na = new _ji(); + vHn = Object.freeze({ + "Cache-Control": "no-cache, no-store" + }); + yHn = Object.freeze({ + "Document-Policy": "include-js-call-stacks-in-crash-reports, js-profiling" + }); + (function (i) { + const e = new Map([["1", { + "Cross-Origin-Opener-Policy": "same-origin" + }], ["2", { + "Cross-Origin-Embedder-Policy": "require-corp" + }], ["3", { + "Cross-Origin-Opener-Policy": "same-origin", + "Cross-Origin-Embedder-Policy": "require-corp" + }]]); + i.CoopAndCoep = Object.freeze(e.get("3")); + const t = "vscode-coi"; + function s(r) { + let o; + if (typeof r == "string") { + o = new URL(r).searchParams; + } else if (r instanceof URL) { + o = r.searchParams; + } else if (V.isUri(r)) { + o = new URL(r.toString(true)).searchParams; + } + const a = o?.get(t); + if (a) { + return e.get(a); + } + } + i.getHeadersFromQuery = s; + function n(r, o, a) { + if (!globalThis.crossOriginIsolated) { + return; + } + const l = o && a ? "3" : a ? "2" : "1"; + if (r instanceof URLSearchParams) { + r.set(t, l); + } else { + r[t] = l; + } + } + i.addSearchParam = n; + })(dfe ||= {}); + } +}); +function B2(i) { + return jnt(i, true); +} +function _4t(i, e) { + const t = []; + for (let s = 0; s < i.length; s++) { + const n = e(i[s]); + if (!i.some((r, o) => o === s ? false : Dw(n, e(r)))) { + t.push(i[s]); + } + } + return t; +} +function bI(i, e, t) { + if (e) { + let s = i.path; + if (s && s[0] !== ao.sep) { + s = ao.sep + s; + } + return i.with({ + scheme: t, + authority: e, + path: s + }); + } + return i.with({ + scheme: t + }); +} +var hfe; +var sr; +var Bji; +var dM; +var Ls; +var Dw; +var wHn; +var gg; +var ji; +var _d; +var Ir; +var Li; +var Jnt; +var fb; +var B4t; +var U4t; +var o9; +var ffe; +var GZ; +var FB; +var a9; +var Et = ue({ + "out-build/vs/base/common/resources.js"() { + "use strict"; + + zb(); + At(); + pn(); + rt(); + $i(); + Le(); + hfe = class { + constructor(i) { + this.a = i; + } + compare(i, e, t = false) { + if (i === e) { + return 0; + } else { + return _m(this.getComparisonKey(i, t), this.getComparisonKey(e, t)); + } + } + isEqual(i, e, t = false) { + if (i === e) { + return true; + } else if (!i || !e) { + return false; + } else { + return this.getComparisonKey(i, t) === this.getComparisonKey(e, t); + } + } + getComparisonKey(i, e = false) { + return i.with({ + path: this.a(i) ? i.path.toLowerCase() : undefined, + fragment: e ? null : undefined + }).toString(); + } + ignorePathCasing(i) { + return this.a(i); + } + isEqualOrParent(i, e, t = false) { + if (i.scheme === e.scheme) { + if (i.scheme === me.file) { + return Hnt(B2(i), B2(e), this.a(i)) && i.query === e.query && (t || i.fragment === e.fragment); + } + if (o9(i.authority, e.authority)) { + return Hnt(i.path, e.path, this.a(i), "/") && i.query === e.query && (t || i.fragment === e.fragment); + } + } + return false; + } + joinPath(i, ...e) { + return V.joinPath(i, ...e); + } + basenameOrAuthority(i) { + return ji(i) || i.authority; + } + basename(i) { + return ao.basename(i.path); + } + extname(i) { + return ao.extname(i.path); + } + dirname(i) { + if (i.path.length === 0) { + return i; + } + let e; + if (i.scheme === me.file) { + e = V.file(pm(B2(i))).path; + } else { + e = ao.dirname(i.path); + if (i.authority && e.length && e.charCodeAt(0) !== 47) { + console.error(`dirname("${i.toString})) resulted in a relative path`); + e = "/"; + } + } + return i.with({ + path: e + }); + } + normalizePath(i) { + if (!i.path.length) { + return i; + } + let e; + if (i.scheme === me.file) { + e = V.file(My(B2(i))).path; + } else { + e = ao.normalize(i.path); + } + return i.with({ + path: e + }); + } + relativePath(i, e) { + if (i.scheme !== e.scheme || !o9(i.authority, e.authority)) { + return; + } + if (i.scheme === me.file) { + const n = DL(B2(i), B2(e)); + if (ln) { + return qZ(n); + } else { + return n; + } + } + let t = i.path || "/"; + const s = e.path || "/"; + if (this.a(i)) { + let n = 0; + for (const r = Math.min(t.length, s.length); n < r && (t.charCodeAt(n) === s.charCodeAt(n) || t.charAt(n).toLowerCase() === s.charAt(n).toLowerCase()); n++); + t = s.substr(0, n) + t.substr(n); + } + return ao.relative(t, s); + } + resolvePath(i, e) { + if (i.scheme === me.file) { + const t = V.file($q(B2(i), e)); + return i.with({ + authority: t.authority, + path: t.path + }); + } + e = Cji(e); + return i.with({ + path: ao.resolve(i.path, e) + }); + } + isAbsolutePath(i) { + return !!i.path && i.path[0] === "/"; + } + isEqualAuthority(i, e) { + return i === e || i !== undefined && e !== undefined && $c(i, e); + } + hasTrailingPathSeparator(i, e = _h) { + if (i.scheme === me.file) { + const t = B2(i); + return t.length > Sji(t).length && t[t.length - 1] === e; + } else { + const t = i.path; + return t.length > 1 && t.charCodeAt(t.length - 1) === 47 && !/^[a-zA-Z]:(\/$|\\$)/.test(i.fsPath); + } + } + removeTrailingPathSeparator(i, e = _h) { + if (ffe(i, e)) { + return i.with({ + path: i.path.substr(0, i.path.length - 1) + }); + } else { + return i; + } + } + addTrailingPathSeparator(i, e = _h) { + let t = false; + if (i.scheme === me.file) { + const s = B2(i); + t = s !== undefined && s.length === Sji(s).length && s[s.length - 1] === e; + } else { + e = "/"; + const s = i.path; + t = s.length === 1 && s.charCodeAt(s.length - 1) === 47; + } + if (!t && !ffe(i, e)) { + return i.with({ + path: i.path + "/" + }); + } else { + return i; + } + } + }; + sr = new hfe(() => false); + Bji = new hfe(i => i.scheme === me.file ? !yl : true); + dM = new hfe(i => true); + Ls = sr.isEqual.bind(sr); + Dw = sr.isEqualOrParent.bind(sr); + wHn = sr.getComparisonKey.bind(sr); + gg = sr.basenameOrAuthority.bind(sr); + ji = sr.basename.bind(sr); + _d = sr.extname.bind(sr); + Ir = sr.dirname.bind(sr); + Li = sr.joinPath.bind(sr); + Jnt = sr.normalizePath.bind(sr); + fb = sr.relativePath.bind(sr); + B4t = sr.resolvePath.bind(sr); + U4t = sr.isAbsolutePath.bind(sr); + o9 = sr.isEqualAuthority.bind(sr); + ffe = sr.hasTrailingPathSeparator.bind(sr); + GZ = sr.removeTrailingPathSeparator.bind(sr); + FB = sr.addTrailingPathSeparator.bind(sr); + (function (i) { + i.META_DATA_LABEL = "label"; + i.META_DATA_DESCRIPTION = "description"; + i.META_DATA_SIZE = "size"; + i.META_DATA_MIME = "mime"; + function e(t) { + const s = new Map(); + t.path.substring(t.path.indexOf(";") + 1, t.path.lastIndexOf(";")).split(";").forEach(o => { + const [a, l] = o.split(":"); + if (a && l) { + s.set(a, l); + } + }); + const r = t.path.substring(0, t.path.indexOf(";")); + if (r) { + s.set(i.META_DATA_MIME, r); + } + return s; + } + i.parseMetaData = e; + })(a9 ||= {}); + } +}); +var Hq; +var KZ = ue({ + "out-build/vs/base/common/symbols.js"() { + "use strict"; + + Hq = Symbol("MicrotaskDelay"); + } +}); +function YZ(i) { + return !!i && typeof i.then == "function"; +} +function ql(i) { + const e = new Xi(); + const t = i(e.token); + const s = new Promise((n, r) => { + const o = e.token.onCancellationRequested(() => { + o.dispose(); + r(new fl()); + }); + Promise.resolve(t).then(a => { + o.dispose(); + e.dispose(); + n(a); + }, a => { + o.dispose(); + e.dispose(); + r(a); + }); + }); + return new class { + cancel() { + e.cancel(); + e.dispose(); + } + then(n, r) { + return s.then(n, r); + } + catch(n) { + return this.then(undefined, n); + } + finally(n) { + return s.finally(n); + } + }(); +} +function mm(i, e, t) { + return new Promise((s, n) => { + const r = e.onCancellationRequested(() => { + r.dispose(); + s(t); + }); + i.then(s, n).finally(() => r.dispose()); + }); +} +function gfe(i, e) { + return new Promise((t, s) => { + const n = e.onCancellationRequested(() => { + n.dispose(); + s(new fl()); + }); + i.then(t, s).finally(() => n.dispose()); + }); +} +async function Uji(i) { + let e = -1; + const t = i.map((s, n) => s.then(r => { + e = n; + return r; + })); + try { + return await Promise.race(t); + } finally { + i.forEach((s, n) => { + if (n !== e) { + s.cancel(); + } + }); + } +} +function ML(i, e, t) { + let s; + const n = setTimeout(() => { + s?.(undefined); + t?.(); + }, e); + return Promise.race([i.finally(() => clearTimeout(n)), new Promise(r => s = r)]); +} +function U2() { + let i; + let e; + return { + promise: new Promise((s, n) => { + i = s; + e = n; + }), + resolve: i, + reject: e + }; +} +function Da(i, e) { + if (e) { + return new Promise((t, s) => { + const n = setTimeout(() => { + r.dispose(); + t(); + }, i); + const r = e.onCancellationRequested(() => { + clearTimeout(n); + r.dispose(); + s(new fl()); + }); + }); + } else { + return ql(t => Da(i, t)); + } +} +function Gd(i, e = 0, t) { + const s = setTimeout(() => { + i(); + if (t) { + n.dispose(); + } + }, e); + const n = Ue(() => { + clearTimeout(s); + t?.delete(n); + }); + t?.add(n); + return n; +} +function Wji(i) { + const e = []; + let t = 0; + const s = i.length; + function n() { + if (t < s) { + return i[t++](); + } else { + return null; + } + } + function r(o) { + if (o != null) { + e.push(o); + } + const a = n(); + if (a) { + return a.then(r); + } else { + return Promise.resolve(e); + } + } + return Promise.resolve(null).then(r); +} +function Gnt(i, e = s => !!s, t = null) { + let s = 0; + const n = i.length; + const r = () => { + if (s >= n) { + return Promise.resolve(t); + } + const o = i[s++]; + return Promise.resolve(o()).then(l => e(l) ? Promise.resolve(l) : r()); + }; + return r(); +} +async function CHn(i, e, t) { + let s; + for (let n = 0; n < t; n++) { + try { + return await i(); + } catch (r) { + s = r; + await Da(e); + } + } + throw s; +} +function SHn(i) { + const e = new Xi(); + const t = i(e.token); + return new Kji(e, async s => { + const n = e.token.onCancellationRequested(() => { + n.dispose(); + e.dispose(); + s.reject(new fl()); + }); + try { + for await (const r of t) { + if (e.token.isCancellationRequested) { + return; + } + s.emitOne(r); + } + n.dispose(); + e.dispose(); + } catch (r) { + n.dispose(); + e.dispose(); + s.reject(r); + } + }); +} +var AL; +var W2; +var pfe; +var Vji; +var Hji; +var gl; +var Bm; +var YS; +var mfe; +var yT; +var wT; +var bfe; +var qC; +var XZ; +var Vn; +var QZ; +var qq; +var vfe; +var W4t; +var yfe; +var V4t; +var qji; +var jji; +var uc; +var Ko; +var zji; +var Jji; +var Gji; +var Tw; +var Kji; +var wfe; +var H4t; +var nt = ue({ + "out-build/vs/base/common/async.js"() { + "use strict"; + + ri(); + Ut(); + pe(); + q(); + Et(); + rt(); + KZ(); + pu(); + AL = class { + constructor() { + this.f = false; + this.a = null; + this.b = null; + this.d = null; + } + queue(i) { + if (this.f) { + return Promise.reject(new Error("Throttler is disposed")); + } + if (this.a) { + this.d = i; + if (!this.b) { + const e = () => { + this.b = null; + if (this.f) { + return; + } + const t = this.queue(this.d); + this.d = null; + return t; + }; + this.b = new Promise(t => { + this.a.then(e, e).then(t); + }); + } + return new Promise((e, t) => { + this.b.then(e, t); + }); + } + this.a = i(); + return new Promise((e, t) => { + this.a.then(s => { + this.a = null; + e(s); + }, s => { + this.a = null; + t(s); + }); + }); + } + dispose() { + this.f = true; + } + }; + W2 = class { + constructor() { + this.a = Promise.resolve(null); + } + queue(i) { + return this.a = this.a.then(() => i(), () => i()); + } + }; + pfe = class { + constructor() { + this.a = new Map(); + } + queue(i, e) { + const s = (this.a.get(i) ?? Promise.resolve()).catch(() => {}).then(e).finally(() => { + if (this.a.get(i) === s) { + this.a.delete(i); + } + }); + this.a.set(i, s); + return s; + } + }; + Vji = (i, e) => { + let t = true; + const s = setTimeout(() => { + t = false; + e(); + }, i); + return { + isTriggered: () => t, + dispose: () => { + clearTimeout(s); + t = false; + } + }; + }; + Hji = i => { + let e = true; + queueMicrotask(() => { + if (e) { + e = false; + i(); + } + }); + return { + isTriggered: () => e, + dispose: () => { + e = false; + } + }; + }; + gl = class { + constructor(i) { + this.defaultDelay = i; + this.a = null; + this.b = null; + this.d = null; + this.f = null; + this.g = null; + } + trigger(i, e = this.defaultDelay) { + this.g = i; + this.h(); + this.b ||= new Promise((s, n) => { + this.d = s; + this.f = n; + }).then(() => { + this.b = null; + this.d = null; + if (this.g) { + const s = this.g; + this.g = null; + return s(); + } + }); + const t = () => { + this.a = null; + this.d?.(null); + }; + this.a = e === Hq ? Hji(t) : Vji(e, t); + return this.b; + } + isTriggered() { + return !!this.a?.isTriggered(); + } + cancel() { + this.h(); + if (this.b) { + this.f?.(new fl()); + this.b = null; + } + } + h() { + this.a?.dispose(); + this.a = null; + } + dispose() { + this.cancel(); + } + }; + Bm = class { + constructor(i) { + this.a = new gl(i); + this.b = new AL(); + } + trigger(i, e) { + return this.a.trigger(() => this.b.queue(i), e); + } + isTriggered() { + return this.a.isTriggered(); + } + cancel() { + this.a.cancel(); + } + dispose() { + this.a.dispose(); + this.b.dispose(); + } + }; + YS = class { + constructor() { + this.a = false; + this.b = new Promise((i, e) => { + this.d = i; + }); + } + isOpen() { + return this.a; + } + open() { + this.a = true; + this.d(true); + } + wait() { + return this.b; + } + }; + mfe = class extends YS { + constructor(i) { + super(); + this.f = setTimeout(() => this.open(), i); + } + open() { + clearTimeout(this.f); + super.open(); + } + }; + yT = class { + constructor(i) { + this.a = 0; + this.b = false; + this.f = i; + this.g = []; + this.d = 0; + this.h = new B(); + } + whenIdle() { + if (this.size > 0) { + return de.toPromise(this.onDrained); + } else { + return Promise.resolve(); + } + } + get onDrained() { + return this.h.event; + } + get size() { + return this.a; + } + queue(i) { + if (this.b) { + throw new Error("Object has been disposed"); + } + this.a++; + return new Promise((e, t) => { + this.g.push({ + factory: i, + c: e, + e: t + }); + this.j(); + }); + } + j() { + while (this.g.length && this.d < this.f) { + const i = this.g.shift(); + this.d++; + const e = i.factory(); + e.then(i.c, i.e); + e.then(() => this.k(), () => this.k()); + } + } + k() { + if (!this.b) { + this.d--; + if (--this.a === 0) { + this.h.fire(); + } + if (this.g.length > 0) { + this.j(); + } + } + } + clear() { + if (this.b) { + throw new Error("Object has been disposed"); + } + this.g.length = 0; + this.a = this.d; + } + dispose() { + this.b = true; + this.g.length = 0; + this.a = 0; + this.h.dispose(); + } + }; + wT = class extends yT { + constructor() { + super(1); + } + }; + bfe = class { + constructor() { + this.a = new Map(); + this.b = new Set(); + this.d = undefined; + this.f = 0; + } + async whenDrained() { + if (this.g()) { + return; + } + const i = new uc(); + this.b.add(i); + return i.p; + } + g() { + for (const [, i] of this.a) { + if (i.size > 0) { + return false; + } + } + return true; + } + queueSize(i, e = sr) { + const t = e.getComparisonKey(i); + return this.a.get(t)?.size ?? 0; + } + queueFor(i, e, t = sr) { + const s = t.getComparisonKey(i); + let n = this.a.get(s); + if (!n) { + n = new wT(); + const r = this.f++; + const o = de.once(n.onDrained)(() => { + n?.dispose(); + this.a.delete(s); + this.h(); + this.d?.deleteAndDispose(r); + if (this.d?.size === 0) { + this.d.dispose(); + this.d = undefined; + } + }); + this.d ||= new Bo(); + this.d.set(r, o); + this.a.set(s, n); + } + return n.queue(e); + } + h() { + if (this.g()) { + this.j(); + } + } + j() { + for (const i of this.b) { + i.complete(); + } + this.b.clear(); + } + dispose() { + for (const [, i] of this.a) { + i.dispose(); + } + this.a.clear(); + this.j(); + this.d?.dispose(); + } + }; + qC = class { + constructor(i, e) { + this.b = false; + this.a = -1; + if (typeof i == "function" && typeof e == "number") { + this.setIfNotSet(i, e); + } + } + dispose() { + this.cancel(); + this.b = true; + } + cancel() { + if (this.a !== -1) { + clearTimeout(this.a); + this.a = -1; + } + } + cancelAndSet(i, e) { + if (this.b) { + throw new co("Calling 'cancelAndSet' on a disposed TimeoutTimer"); + } + this.cancel(); + this.a = setTimeout(() => { + this.a = -1; + i(); + }, e); + } + setIfNotSet(i, e) { + if (this.b) { + throw new co("Calling 'setIfNotSet' on a disposed TimeoutTimer"); + } + if (this.a === -1) { + this.a = setTimeout(() => { + this.a = -1; + i(); + }, e); + } + } + }; + XZ = class { + constructor() { + this.d = undefined; + this.f = false; + } + cancel() { + this.d?.dispose(); + this.d = undefined; + } + cancelAndSet(i, e, t = globalThis) { + if (this.f) { + throw new co("Calling 'cancelAndSet' on a disposed IntervalTimer"); + } + this.cancel(); + const s = t.setInterval(() => { + i(); + }, e); + this.d = Ue(() => { + t.clearInterval(s); + this.d = undefined; + }); + } + dispose() { + this.cancel(); + this.f = true; + } + }; + Vn = class { + constructor(i, e) { + this.b = -1; + this.a = i; + this.d = e; + this.f = this.g.bind(this); + } + dispose() { + this.cancel(); + this.a = null; + } + cancel() { + if (this.isScheduled()) { + clearTimeout(this.b); + this.b = -1; + } + } + schedule(i = this.d) { + this.cancel(); + this.b = setTimeout(this.f, i); + } + get delay() { + return this.d; + } + set delay(i) { + this.d = i; + } + isScheduled() { + return this.b !== -1; + } + flush() { + if (this.isScheduled()) { + this.cancel(); + this.h(); + } + } + g() { + this.b = -1; + if (this.a) { + this.h(); + } + } + h() { + this.a?.(); + } + }; + QZ = class extends Vn { + constructor(i, e) { + super(i, e); + this.j = []; + } + work(i) { + this.j.push(i); + if (!this.isScheduled()) { + this.schedule(); + } + } + h() { + const i = this.j; + this.j = []; + this.a?.(i); + } + dispose() { + this.j = []; + super.dispose(); + } + }; + (function () { + if (typeof globalThis.requestIdleCallback != "function" || typeof globalThis.cancelIdleCallback != "function") { + vfe = (i, e, t) => { + OZ(() => { + if (s) { + return; + } + const n = Date.now() + 15; + e(Object.freeze({ + didTimeout: true, + timeRemaining() { + return Math.max(0, n - Date.now()); + } + })); + }); + let s = false; + return { + dispose() { + s ||= true; + } + }; + }; + } else { + vfe = (i, e, t) => { + const s = i.requestIdleCallback(e, typeof t == "number" ? { + timeout: t + } : undefined); + let n = false; + return { + dispose() { + if (!n) { + n = true; + i.cancelIdleCallback(s); + } + } + }; + }; + } + qq = (i, e) => vfe(globalThis, i, e); + })(); + W4t = class { + constructor(i, e) { + this.g = false; + this.d = () => { + try { + this.j = e(); + } catch (t) { + this.l = t; + } finally { + this.g = true; + } + }; + this.f = vfe(i, () => this.d()); + } + dispose() { + this.f.dispose(); + } + get value() { + if (!this.g) { + this.f.dispose(); + this.d(); + } + if (this.l) { + throw this.l; + } + return this.j; + } + get isInitialized() { + return this.g; + } + }; + yfe = class extends W4t { + constructor(i) { + super(globalThis, i); + } + }; + V4t = class { + isRunning(i) { + if (typeof i == "number") { + return this.a?.taskId === i; + } else { + return !!this.a; + } + } + get running() { + return this.a?.promise; + } + cancelRunning() { + this.a?.cancel(); + } + run(i, e, t) { + this.a = { + taskId: i, + cancel: () => t?.(), + promise: e + }; + e.then(() => this.d(i), () => this.d(i)); + return e; + } + d(i) { + if (this.a && i === this.a.taskId) { + this.a = undefined; + this.f(); + } + } + f() { + if (this.b) { + const i = this.b; + this.b = undefined; + i.run().then(i.promiseResolve, i.promiseReject); + } + } + queue(i) { + if (this.b) { + this.b.run = i; + } else { + const { + promise: e, + resolve: t, + reject: s + } = U2(); + this.b = { + run: i, + promise: e, + promiseResolve: t, + promiseReject: s + }; + } + return this.b.promise; + } + hasQueued() { + return !!this.b; + } + async join() { + return this.b?.promise ?? this.a?.promise; + } + }; + qji = class { + constructor(i, e = () => Date.now()) { + this.d = i; + this.f = e; + this.a = 0; + this.b = 0; + } + increment() { + const i = this.f(); + if (i - this.a > this.d) { + this.a = i; + this.b = 0; + } + this.b++; + return this.b; + } + }; + (function (i) { + i[i.Resolved = 0] = "Resolved"; + i[i.Rejected = 1] = "Rejected"; + })(jji ||= {}); + uc = class { + get isRejected() { + return this.d?.outcome === 1; + } + get isResolved() { + return this.d?.outcome === 0; + } + get isSettled() { + return !!this.d; + } + get value() { + if (this.d?.outcome === 0) { + return this.d?.value; + } else { + return undefined; + } + } + constructor() { + this.p = new Promise((i, e) => { + this.a = i; + this.b = e; + }); + } + complete(i) { + return new Promise(e => { + this.a(i); + this.d = { + outcome: 0, + value: i + }; + e(); + }); + } + error(i) { + return new Promise(e => { + this.b(i); + this.d = { + outcome: 1, + value: i + }; + e(); + }); + } + cancel() { + return this.error(new fl()); + } + }; + (function (i) { + async function e(s) { + let n; + const r = await Promise.all(s.map(o => o.then(a => a, a => { + n ||= a; + }))); + if (typeof n !== "undefined") { + throw n; + } + return r; + } + i.settled = e; + function t(s) { + return new Promise(async (n, r) => { + try { + await s(n, r); + } catch (o) { + r(o); + } + }); + } + i.withAsyncBody = t; + })(Ko ||= {}); + zji = class { + get value() { + return this.a; + } + get error() { + return this.b; + } + get isResolved() { + return this.d; + } + constructor(i) { + this.a = undefined; + this.b = undefined; + this.d = false; + this.promise = i.then(e => { + this.a = e; + this.d = true; + return e; + }, e => { + this.b = e; + this.d = true; + throw e; + }); + } + requireValue() { + if (!this.d) { + throw new co("Promise is not resolved yet"); + } + if (this.b) { + throw this.b; + } + return this.a; + } + }; + Jji = class { + constructor(i) { + this.b = i; + this.a = new ol(() => new zji(this.b())); + } + requireValue() { + return this.a.value.requireValue(); + } + getPromise() { + return this.a.value.promise; + } + get currentValue() { + return this.a.rawValue?.value; + } + }; + (function (i) { + i[i.Initial = 0] = "Initial"; + i[i.DoneOK = 1] = "DoneOK"; + i[i.DoneError = 2] = "DoneError"; + })(Gji ||= {}); + Tw = class mL { + static fromArray(e) { + return new mL(t => { + t.emitMany(e); + }); + } + static fromPromise(e) { + return new mL(async t => { + t.emitMany(await e); + }); + } + static fromPromisesResolveOrder(e) { + return new mL(async t => { + await Promise.all(e.map(async s => t.emitOne(await s))); + }); + } + static merge(e) { + return new mL(async t => { + await Promise.all(e.map(async s => { + for await (const n of s) { + t.emitOne(n); + } + })); + }); + } + static { + this.EMPTY = mL.fromArray([]); + } + constructor(e, t) { + this.a = 0; + this.b = []; + this.d = null; + this.f = t; + this.g = new B(); + queueMicrotask(async () => { + const s = { + emitOne: n => this.h(n), + emitMany: n => this.j(n), + reject: n => this.l(n) + }; + try { + await Promise.resolve(e(s)); + this.k(); + } catch (n) { + this.l(n); + } finally { + s.emitOne = undefined; + s.emitMany = undefined; + s.reject = undefined; + } + }); + } + [Symbol.asyncIterator]() { + let e = 0; + return { + next: async () => { + do { + if (this.a === 2) { + throw this.d; + } + if (e < this.b.length) { + return { + done: false, + value: this.b[e++] + }; + } + if (this.a === 1) { + return { + done: true, + value: undefined + }; + } + await de.toPromise(this.g.event); + } while (true); + }, + return: async () => { + this.f?.(); + return { + done: true, + value: undefined + }; + } + }; + } + static map(e, t) { + return new mL(async s => { + for await (const n of e) { + s.emitOne(t(n)); + } + }); + } + map(e) { + return mL.map(this, e); + } + static filter(e, t) { + return new mL(async s => { + for await (const n of e) { + if (t(n)) { + s.emitOne(n); + } + } + }); + } + filter(e) { + return mL.filter(this, e); + } + static coalesce(e) { + return mL.filter(e, t => !!t); + } + coalesce() { + return mL.coalesce(this); + } + static async toPromise(e) { + const t = []; + for await (const s of e) { + t.push(s); + } + return t; + } + toPromise() { + return mL.toPromise(this); + } + h(e) { + if (this.a === 0) { + this.b.push(e); + this.g.fire(); + } + } + j(e) { + if (this.a === 0) { + this.b = this.b.concat(e); + this.g.fire(); + } + } + k() { + if (this.a === 0) { + this.a = 1; + this.g.fire(); + } + } + l(e) { + if (this.a === 0) { + this.a = 2; + this.d = e; + this.g.fire(); + } + } + }; + Kji = class extends Tw { + constructor(i, e) { + super(e); + this.m = i; + } + cancel() { + this.m.cancel(); + } + }; + wfe = class { + constructor(i) { + this.a = new uc(); + this.b = new Tw(s => { + if (e) { + s.reject(e); + return; + } + if (t) { + s.emitMany(t); + } + this.d = n => s.reject(n); + this.f = n => s.emitOne(n); + return this.a.p; + }, i); + let e; + let t; + this.f = s => { + t ||= []; + t.push(s); + }; + this.d = s => { + e ||= s; + }; + } + get asyncIterable() { + return this.b; + } + resolve() { + this.a.complete(); + } + reject(i) { + this.d(i); + this.a.complete(); + } + emitOne(i) { + this.f(i); + } + }; + H4t = class { + constructor(i) { + this.a = new AL(); + this.d = undefined; + this.f = null; + this.g = null; + this.b = i; + } + setDelay(i) { + this.b = i; + } + trigger(i, e = this.b) { + if (this.d === undefined) { + const t = this.a.queue(i); + this.k(e); + return t; + } + this.f = i; + this.g ||= new Promise((t, s) => { + this.h = t; + this.j = s; + }); + return this.g; + } + cancel() { + if (this.d !== undefined) { + clearTimeout(this.d); + this.d = undefined; + } + this.f = null; + if (this.g) { + this.j(new fl()); + this.g = null; + } + } + dispose() { + this.cancel(); + this.a.dispose(); + } + k(i) { + this.d = setTimeout(() => this.l(i), i); + } + l(i) { + this.d = undefined; + if (!this.f) { + return; + } + const e = this.f; + this.f = null; + this.a.queue(e).then(this.h, this.j).finally(() => { + this.g = null; + }); + this.k(i); + } + }; + } +}); +var xHn = ue({ + "out-build/external/sentry/electron/common/envelope.js"() { + "use strict"; + + qr(); + } +}); +var Yji = ue({ + "out-build/vs/platform/tracing/common/sentry.js"() { + "use strict"; + + zu(); + M2(); + xHn(); + H_t(); + x_t(); + Phe(); + xWi(); + } +}); +function q4t() { + return !M0().enabled; +} +function Kc(i, e) { + if (q4t()) { + return new z4t(undefined); + } + if (e === undefined) { + e = M0().tracesSampleRate; + } + const t = { + [$he]: e + }; + let s; + if (Math.random() < e) { + dBt({ + name: i, + attributes: t, + parentSpan: null + }, n => { + s = n; + s.setAttributes(t); + }); + } + return new z4t(s); +} +function $L(i, e) { + const t = Kc(i); + try { + const s = e(t); + if (YZ(s)) { + return Promise.resolve(s).catch(n => { + t.setError(); + throw n; + }).finally(() => { + t.end(); + }); + } else { + t.end(); + return s; + } + } catch (s) { + t.setError(); + t.end(); + throw s; + } +} +function Xt(i) { + return function (e, t, s) { + const n = s.value; + s.value = function (...r) { + return $L(i, () => n.apply(this, r)); + }; + return s; + }; +} +function Knt(i) { + if (!q4t()) { + gm().addBreadcrumb(i); + } +} +function j4t(i) { + if (!q4t() && !ca(i) && !uf.isErrorNoTelemetry(i)) { + ju().captureException(i); + } +} +function ZZ(i) { + const e = i?.spanContext(); + const t = e?.traceId ?? ju().getPropagationContext().traceId; + const s = e?.spanId ?? Vp().substring(16); + const n = e?.traceFlags === 1 ? "01" : "00"; + return `00-${t}-${s}-${n}`; +} +function kHn(i) { + if (i !== undefined && i !== "") { + ju().setPropagationContext({ + ...ju().getPropagationContext(), + traceId: i + }); + } +} +var jq; +var z4t; +var dc = ue({ + "out-build/vs/platform/tracing/common/tracing.js"() { + "use strict"; + + nt(); + Ut(); + cnt(); + Yji(); + if (typeof Symbol.dispose != "symbol") { + Object.defineProperty(Symbol, "dispose", { + value: Symbol("Symbol.dispose") + }); + } + if (typeof Symbol.asyncDispose != "symbol") { + Object.defineProperty(Symbol, "asyncDispose", { + value: Symbol("Symbol.asyncDispose") + }); + } + jq = "traceparent"; + z4t = class { + constructor(i) { + this.a = false; + this.b = i; + } + end() { + if (!this.a) { + this.b?.end(); + this.a = true; + } + } + spanContext() { + return this.b?.spanContext(); + } + setAttribute(i, e) { + this.b?.setAttribute(i, e); + } + setError(i) { + this.b?.setStatus({ + code: 2, + message: i ?? "internal_error" + }); + } + [Symbol.dispose]() { + this.end(); + } + }; + } +}); +function Xji(i, e) { + const t = i; + if (typeof t.vscodeWindowId != "number") { + Object.defineProperty(t, "vscodeWindowId", { + get: () => e + }); + } +} +function Cfe(i) { + if (i === xt) { + return false; + } else { + return typeof i?.vscodeWindowId == "number"; + } +} +var xt; +var fr = ue({ + "out-build/vs/base/browser/window.js"() { + "use strict"; + + xt = window; + } +}); +function EHn(i, e, t) { + if (typeof e == "string") { + e = i.matchMedia(e); + } + e.addEventListener("change", t); +} +function IHn(i, e) { + OB.INSTANCE.setZoomLevel(i, e); +} +function qk(i) { + return OB.INSTANCE.getZoomLevel(i); +} +function vI(i) { + return OB.INSTANCE.getZoomFactor(i); +} +function DHn(i, e) { + OB.INSTANCE.setZoomFactor(i, e); +} +function Sfe(i, e) { + OB.INSTANCE.setFullscreen(i, e); +} +function CT(i) { + return OB.INSTANCE.isFullscreen(i); +} +function J4t() { + return Efe; +} +function xfe() { + return navigator?.windowControlsOverlay?.visible; +} +function THn(i) { + return i.navigator?.windowControlsOverlay?.getTitlebarAreaRect(); +} +var OB; +var kfe; +var l9; +var zq; +var Bv; +var c9; +var Jq; +var yI; +var Qji; +var PHn; +var G4t; +var Efe; +var hc = ue({ + "out-build/vs/base/browser/browser.js"() { + "use strict"; + + fr(); + pe(); + OB = class iFn { + constructor() { + this.a = new Map(); + this.b = new B(); + this.onDidChangeZoomLevel = this.b.event; + this.c = new Map(); + this.d = new B(); + this.onDidChangeFullscreen = this.d.event; + this.e = new Map(); + } + static { + this.INSTANCE = new iFn(); + } + getZoomLevel(e) { + return this.a.get(this.f(e)) ?? 0; + } + setZoomLevel(e, t) { + if (this.getZoomLevel(t) === e) { + return; + } + const s = this.f(t); + this.a.set(s, e); + this.b.fire(s); + } + getZoomFactor(e) { + return this.c.get(this.f(e)) ?? 1; + } + setZoomFactor(e, t) { + this.c.set(this.f(t), e); + } + setFullscreen(e, t) { + if (this.isFullscreen(t) === e) { + return; + } + const s = this.f(t); + this.e.set(s, e); + this.d.fire(s); + } + isFullscreen(e) { + return !!this.e.get(this.f(e)); + } + f(e) { + return e.vscodeWindowId; + } + }; + kfe = OB.INSTANCE.onDidChangeZoomLevel; + l9 = OB.INSTANCE.onDidChangeFullscreen; + zq = navigator.userAgent; + Bv = zq.indexOf("Firefox") >= 0; + c9 = zq.indexOf("AppleWebKit") >= 0; + Jq = zq.indexOf("Chrome") >= 0; + yI = !Jq && zq.indexOf("Safari") >= 0; + Qji = !Jq && !yI && c9; + PHn = zq.indexOf("Electron/") >= 0; + G4t = zq.indexOf("Android") >= 0; + Efe = false; + if (typeof xt.matchMedia == "function") { + const i = xt.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"); + const e = xt.matchMedia("(display-mode: fullscreen)"); + Efe = i.matches; + EHn(xt, i, ({ + matches: t + }) => { + if (!Efe || !e.matches) { + Efe = t; + } + }); + } + } +}); +var Zji; +var jC; +var V2 = ue({ + "out-build/vs/base/browser/canIUse.js"() { + "use strict"; + + hc(); + fr(); + rt(); + (function (i) { + i[i.Always = 0] = "Always"; + i[i.FullScreen = 1] = "FullScreen"; + i[i.None = 2] = "None"; + })(Zji ||= {}); + jC = { + clipboard: { + writeText: sc || document.queryCommandSupported && document.queryCommandSupported("copy") || !!navigator && !!navigator.clipboard && !!navigator.clipboard.writeText, + readText: sc || !!navigator && !!navigator.clipboard && !!navigator.clipboard.readText + }, + keyboard: sc || J4t() ? 0 : navigator.keyboard || yI ? 1 : 2, + touch: "ontouchstart" in xt || navigator.maxTouchPoints > 0, + pointerEvents: xt.PointerEvent && ("ontouchstart" in xt || navigator.maxTouchPoints > 0) + }; + } +}); +function Ai(i, e) { + const t = (e & 65535) << 16 >>> 0; + return (i | t) >>> 0; +} +var ezi; +var tzi; +var Ynt; +var Ife; +var Xnt; +var Qnt; +var K4t; +var Znt; +var Y4t; +var X4t; +var Q4t; +var XS; +var fx; +var eee; +var Hp; +var izi; +var _r; +var Xr; +var Yc = ue({ + "out-build/vs/base/common/keyCodes.js"() { + "use strict"; + + (function (i) { + i[i.DependsOnKbLayout = -1] = "DependsOnKbLayout"; + i[i.Unknown = 0] = "Unknown"; + i[i.Backspace = 1] = "Backspace"; + i[i.Tab = 2] = "Tab"; + i[i.Enter = 3] = "Enter"; + i[i.Shift = 4] = "Shift"; + i[i.Ctrl = 5] = "Ctrl"; + i[i.Alt = 6] = "Alt"; + i[i.PauseBreak = 7] = "PauseBreak"; + i[i.CapsLock = 8] = "CapsLock"; + i[i.Escape = 9] = "Escape"; + i[i.Space = 10] = "Space"; + i[i.PageUp = 11] = "PageUp"; + i[i.PageDown = 12] = "PageDown"; + i[i.End = 13] = "End"; + i[i.Home = 14] = "Home"; + i[i.LeftArrow = 15] = "LeftArrow"; + i[i.UpArrow = 16] = "UpArrow"; + i[i.RightArrow = 17] = "RightArrow"; + i[i.DownArrow = 18] = "DownArrow"; + i[i.Insert = 19] = "Insert"; + i[i.Delete = 20] = "Delete"; + i[i.Digit0 = 21] = "Digit0"; + i[i.Digit1 = 22] = "Digit1"; + i[i.Digit2 = 23] = "Digit2"; + i[i.Digit3 = 24] = "Digit3"; + i[i.Digit4 = 25] = "Digit4"; + i[i.Digit5 = 26] = "Digit5"; + i[i.Digit6 = 27] = "Digit6"; + i[i.Digit7 = 28] = "Digit7"; + i[i.Digit8 = 29] = "Digit8"; + i[i.Digit9 = 30] = "Digit9"; + i[i.KeyA = 31] = "KeyA"; + i[i.KeyB = 32] = "KeyB"; + i[i.KeyC = 33] = "KeyC"; + i[i.KeyD = 34] = "KeyD"; + i[i.KeyE = 35] = "KeyE"; + i[i.KeyF = 36] = "KeyF"; + i[i.KeyG = 37] = "KeyG"; + i[i.KeyH = 38] = "KeyH"; + i[i.KeyI = 39] = "KeyI"; + i[i.KeyJ = 40] = "KeyJ"; + i[i.KeyK = 41] = "KeyK"; + i[i.KeyL = 42] = "KeyL"; + i[i.KeyM = 43] = "KeyM"; + i[i.KeyN = 44] = "KeyN"; + i[i.KeyO = 45] = "KeyO"; + i[i.KeyP = 46] = "KeyP"; + i[i.KeyQ = 47] = "KeyQ"; + i[i.KeyR = 48] = "KeyR"; + i[i.KeyS = 49] = "KeyS"; + i[i.KeyT = 50] = "KeyT"; + i[i.KeyU = 51] = "KeyU"; + i[i.KeyV = 52] = "KeyV"; + i[i.KeyW = 53] = "KeyW"; + i[i.KeyX = 54] = "KeyX"; + i[i.KeyY = 55] = "KeyY"; + i[i.KeyZ = 56] = "KeyZ"; + i[i.Meta = 57] = "Meta"; + i[i.ContextMenu = 58] = "ContextMenu"; + i[i.F1 = 59] = "F1"; + i[i.F2 = 60] = "F2"; + i[i.F3 = 61] = "F3"; + i[i.F4 = 62] = "F4"; + i[i.F5 = 63] = "F5"; + i[i.F6 = 64] = "F6"; + i[i.F7 = 65] = "F7"; + i[i.F8 = 66] = "F8"; + i[i.F9 = 67] = "F9"; + i[i.F10 = 68] = "F10"; + i[i.F11 = 69] = "F11"; + i[i.F12 = 70] = "F12"; + i[i.F13 = 71] = "F13"; + i[i.F14 = 72] = "F14"; + i[i.F15 = 73] = "F15"; + i[i.F16 = 74] = "F16"; + i[i.F17 = 75] = "F17"; + i[i.F18 = 76] = "F18"; + i[i.F19 = 77] = "F19"; + i[i.F20 = 78] = "F20"; + i[i.F21 = 79] = "F21"; + i[i.F22 = 80] = "F22"; + i[i.F23 = 81] = "F23"; + i[i.F24 = 82] = "F24"; + i[i.NumLock = 83] = "NumLock"; + i[i.ScrollLock = 84] = "ScrollLock"; + i[i.Semicolon = 85] = "Semicolon"; + i[i.Equal = 86] = "Equal"; + i[i.Comma = 87] = "Comma"; + i[i.Minus = 88] = "Minus"; + i[i.Period = 89] = "Period"; + i[i.Slash = 90] = "Slash"; + i[i.Backquote = 91] = "Backquote"; + i[i.BracketLeft = 92] = "BracketLeft"; + i[i.Backslash = 93] = "Backslash"; + i[i.BracketRight = 94] = "BracketRight"; + i[i.Quote = 95] = "Quote"; + i[i.OEM_8 = 96] = "OEM_8"; + i[i.IntlBackslash = 97] = "IntlBackslash"; + i[i.Numpad0 = 98] = "Numpad0"; + i[i.Numpad1 = 99] = "Numpad1"; + i[i.Numpad2 = 100] = "Numpad2"; + i[i.Numpad3 = 101] = "Numpad3"; + i[i.Numpad4 = 102] = "Numpad4"; + i[i.Numpad5 = 103] = "Numpad5"; + i[i.Numpad6 = 104] = "Numpad6"; + i[i.Numpad7 = 105] = "Numpad7"; + i[i.Numpad8 = 106] = "Numpad8"; + i[i.Numpad9 = 107] = "Numpad9"; + i[i.NumpadMultiply = 108] = "NumpadMultiply"; + i[i.NumpadAdd = 109] = "NumpadAdd"; + i[i.NUMPAD_SEPARATOR = 110] = "NUMPAD_SEPARATOR"; + i[i.NumpadSubtract = 111] = "NumpadSubtract"; + i[i.NumpadDecimal = 112] = "NumpadDecimal"; + i[i.NumpadDivide = 113] = "NumpadDivide"; + i[i.KEY_IN_COMPOSITION = 114] = "KEY_IN_COMPOSITION"; + i[i.ABNT_C1 = 115] = "ABNT_C1"; + i[i.ABNT_C2 = 116] = "ABNT_C2"; + i[i.AudioVolumeMute = 117] = "AudioVolumeMute"; + i[i.AudioVolumeUp = 118] = "AudioVolumeUp"; + i[i.AudioVolumeDown = 119] = "AudioVolumeDown"; + i[i.BrowserSearch = 120] = "BrowserSearch"; + i[i.BrowserHome = 121] = "BrowserHome"; + i[i.BrowserBack = 122] = "BrowserBack"; + i[i.BrowserForward = 123] = "BrowserForward"; + i[i.MediaTrackNext = 124] = "MediaTrackNext"; + i[i.MediaTrackPrevious = 125] = "MediaTrackPrevious"; + i[i.MediaStop = 126] = "MediaStop"; + i[i.MediaPlayPause = 127] = "MediaPlayPause"; + i[i.LaunchMediaPlayer = 128] = "LaunchMediaPlayer"; + i[i.LaunchMail = 129] = "LaunchMail"; + i[i.LaunchApp2 = 130] = "LaunchApp2"; + i[i.Clear = 131] = "Clear"; + i[i.MAX_VALUE = 132] = "MAX_VALUE"; + })(ezi ||= {}); + (function (i) { + i[i.DependsOnKbLayout = -1] = "DependsOnKbLayout"; + i[i.None = 0] = "None"; + i[i.Hyper = 1] = "Hyper"; + i[i.Super = 2] = "Super"; + i[i.Fn = 3] = "Fn"; + i[i.FnLock = 4] = "FnLock"; + i[i.Suspend = 5] = "Suspend"; + i[i.Resume = 6] = "Resume"; + i[i.Turbo = 7] = "Turbo"; + i[i.Sleep = 8] = "Sleep"; + i[i.WakeUp = 9] = "WakeUp"; + i[i.KeyA = 10] = "KeyA"; + i[i.KeyB = 11] = "KeyB"; + i[i.KeyC = 12] = "KeyC"; + i[i.KeyD = 13] = "KeyD"; + i[i.KeyE = 14] = "KeyE"; + i[i.KeyF = 15] = "KeyF"; + i[i.KeyG = 16] = "KeyG"; + i[i.KeyH = 17] = "KeyH"; + i[i.KeyI = 18] = "KeyI"; + i[i.KeyJ = 19] = "KeyJ"; + i[i.KeyK = 20] = "KeyK"; + i[i.KeyL = 21] = "KeyL"; + i[i.KeyM = 22] = "KeyM"; + i[i.KeyN = 23] = "KeyN"; + i[i.KeyO = 24] = "KeyO"; + i[i.KeyP = 25] = "KeyP"; + i[i.KeyQ = 26] = "KeyQ"; + i[i.KeyR = 27] = "KeyR"; + i[i.KeyS = 28] = "KeyS"; + i[i.KeyT = 29] = "KeyT"; + i[i.KeyU = 30] = "KeyU"; + i[i.KeyV = 31] = "KeyV"; + i[i.KeyW = 32] = "KeyW"; + i[i.KeyX = 33] = "KeyX"; + i[i.KeyY = 34] = "KeyY"; + i[i.KeyZ = 35] = "KeyZ"; + i[i.Digit1 = 36] = "Digit1"; + i[i.Digit2 = 37] = "Digit2"; + i[i.Digit3 = 38] = "Digit3"; + i[i.Digit4 = 39] = "Digit4"; + i[i.Digit5 = 40] = "Digit5"; + i[i.Digit6 = 41] = "Digit6"; + i[i.Digit7 = 42] = "Digit7"; + i[i.Digit8 = 43] = "Digit8"; + i[i.Digit9 = 44] = "Digit9"; + i[i.Digit0 = 45] = "Digit0"; + i[i.Enter = 46] = "Enter"; + i[i.Escape = 47] = "Escape"; + i[i.Backspace = 48] = "Backspace"; + i[i.Tab = 49] = "Tab"; + i[i.Space = 50] = "Space"; + i[i.Minus = 51] = "Minus"; + i[i.Equal = 52] = "Equal"; + i[i.BracketLeft = 53] = "BracketLeft"; + i[i.BracketRight = 54] = "BracketRight"; + i[i.Backslash = 55] = "Backslash"; + i[i.IntlHash = 56] = "IntlHash"; + i[i.Semicolon = 57] = "Semicolon"; + i[i.Quote = 58] = "Quote"; + i[i.Backquote = 59] = "Backquote"; + i[i.Comma = 60] = "Comma"; + i[i.Period = 61] = "Period"; + i[i.Slash = 62] = "Slash"; + i[i.CapsLock = 63] = "CapsLock"; + i[i.F1 = 64] = "F1"; + i[i.F2 = 65] = "F2"; + i[i.F3 = 66] = "F3"; + i[i.F4 = 67] = "F4"; + i[i.F5 = 68] = "F5"; + i[i.F6 = 69] = "F6"; + i[i.F7 = 70] = "F7"; + i[i.F8 = 71] = "F8"; + i[i.F9 = 72] = "F9"; + i[i.F10 = 73] = "F10"; + i[i.F11 = 74] = "F11"; + i[i.F12 = 75] = "F12"; + i[i.PrintScreen = 76] = "PrintScreen"; + i[i.ScrollLock = 77] = "ScrollLock"; + i[i.Pause = 78] = "Pause"; + i[i.Insert = 79] = "Insert"; + i[i.Home = 80] = "Home"; + i[i.PageUp = 81] = "PageUp"; + i[i.Delete = 82] = "Delete"; + i[i.End = 83] = "End"; + i[i.PageDown = 84] = "PageDown"; + i[i.ArrowRight = 85] = "ArrowRight"; + i[i.ArrowLeft = 86] = "ArrowLeft"; + i[i.ArrowDown = 87] = "ArrowDown"; + i[i.ArrowUp = 88] = "ArrowUp"; + i[i.NumLock = 89] = "NumLock"; + i[i.NumpadDivide = 90] = "NumpadDivide"; + i[i.NumpadMultiply = 91] = "NumpadMultiply"; + i[i.NumpadSubtract = 92] = "NumpadSubtract"; + i[i.NumpadAdd = 93] = "NumpadAdd"; + i[i.NumpadEnter = 94] = "NumpadEnter"; + i[i.Numpad1 = 95] = "Numpad1"; + i[i.Numpad2 = 96] = "Numpad2"; + i[i.Numpad3 = 97] = "Numpad3"; + i[i.Numpad4 = 98] = "Numpad4"; + i[i.Numpad5 = 99] = "Numpad5"; + i[i.Numpad6 = 100] = "Numpad6"; + i[i.Numpad7 = 101] = "Numpad7"; + i[i.Numpad8 = 102] = "Numpad8"; + i[i.Numpad9 = 103] = "Numpad9"; + i[i.Numpad0 = 104] = "Numpad0"; + i[i.NumpadDecimal = 105] = "NumpadDecimal"; + i[i.IntlBackslash = 106] = "IntlBackslash"; + i[i.ContextMenu = 107] = "ContextMenu"; + i[i.Power = 108] = "Power"; + i[i.NumpadEqual = 109] = "NumpadEqual"; + i[i.F13 = 110] = "F13"; + i[i.F14 = 111] = "F14"; + i[i.F15 = 112] = "F15"; + i[i.F16 = 113] = "F16"; + i[i.F17 = 114] = "F17"; + i[i.F18 = 115] = "F18"; + i[i.F19 = 116] = "F19"; + i[i.F20 = 117] = "F20"; + i[i.F21 = 118] = "F21"; + i[i.F22 = 119] = "F22"; + i[i.F23 = 120] = "F23"; + i[i.F24 = 121] = "F24"; + i[i.Open = 122] = "Open"; + i[i.Help = 123] = "Help"; + i[i.Select = 124] = "Select"; + i[i.Again = 125] = "Again"; + i[i.Undo = 126] = "Undo"; + i[i.Cut = 127] = "Cut"; + i[i.Copy = 128] = "Copy"; + i[i.Paste = 129] = "Paste"; + i[i.Find = 130] = "Find"; + i[i.AudioVolumeMute = 131] = "AudioVolumeMute"; + i[i.AudioVolumeUp = 132] = "AudioVolumeUp"; + i[i.AudioVolumeDown = 133] = "AudioVolumeDown"; + i[i.NumpadComma = 134] = "NumpadComma"; + i[i.IntlRo = 135] = "IntlRo"; + i[i.KanaMode = 136] = "KanaMode"; + i[i.IntlYen = 137] = "IntlYen"; + i[i.Convert = 138] = "Convert"; + i[i.NonConvert = 139] = "NonConvert"; + i[i.Lang1 = 140] = "Lang1"; + i[i.Lang2 = 141] = "Lang2"; + i[i.Lang3 = 142] = "Lang3"; + i[i.Lang4 = 143] = "Lang4"; + i[i.Lang5 = 144] = "Lang5"; + i[i.Abort = 145] = "Abort"; + i[i.Props = 146] = "Props"; + i[i.NumpadParenLeft = 147] = "NumpadParenLeft"; + i[i.NumpadParenRight = 148] = "NumpadParenRight"; + i[i.NumpadBackspace = 149] = "NumpadBackspace"; + i[i.NumpadMemoryStore = 150] = "NumpadMemoryStore"; + i[i.NumpadMemoryRecall = 151] = "NumpadMemoryRecall"; + i[i.NumpadMemoryClear = 152] = "NumpadMemoryClear"; + i[i.NumpadMemoryAdd = 153] = "NumpadMemoryAdd"; + i[i.NumpadMemorySubtract = 154] = "NumpadMemorySubtract"; + i[i.NumpadClear = 155] = "NumpadClear"; + i[i.NumpadClearEntry = 156] = "NumpadClearEntry"; + i[i.ControlLeft = 157] = "ControlLeft"; + i[i.ShiftLeft = 158] = "ShiftLeft"; + i[i.AltLeft = 159] = "AltLeft"; + i[i.MetaLeft = 160] = "MetaLeft"; + i[i.ControlRight = 161] = "ControlRight"; + i[i.ShiftRight = 162] = "ShiftRight"; + i[i.AltRight = 163] = "AltRight"; + i[i.MetaRight = 164] = "MetaRight"; + i[i.BrightnessUp = 165] = "BrightnessUp"; + i[i.BrightnessDown = 166] = "BrightnessDown"; + i[i.MediaPlay = 167] = "MediaPlay"; + i[i.MediaRecord = 168] = "MediaRecord"; + i[i.MediaFastForward = 169] = "MediaFastForward"; + i[i.MediaRewind = 170] = "MediaRewind"; + i[i.MediaTrackNext = 171] = "MediaTrackNext"; + i[i.MediaTrackPrevious = 172] = "MediaTrackPrevious"; + i[i.MediaStop = 173] = "MediaStop"; + i[i.Eject = 174] = "Eject"; + i[i.MediaPlayPause = 175] = "MediaPlayPause"; + i[i.MediaSelect = 176] = "MediaSelect"; + i[i.LaunchMail = 177] = "LaunchMail"; + i[i.LaunchApp2 = 178] = "LaunchApp2"; + i[i.LaunchApp1 = 179] = "LaunchApp1"; + i[i.SelectTask = 180] = "SelectTask"; + i[i.LaunchScreenSaver = 181] = "LaunchScreenSaver"; + i[i.BrowserSearch = 182] = "BrowserSearch"; + i[i.BrowserHome = 183] = "BrowserHome"; + i[i.BrowserBack = 184] = "BrowserBack"; + i[i.BrowserForward = 185] = "BrowserForward"; + i[i.BrowserStop = 186] = "BrowserStop"; + i[i.BrowserRefresh = 187] = "BrowserRefresh"; + i[i.BrowserFavorites = 188] = "BrowserFavorites"; + i[i.ZoomToggle = 189] = "ZoomToggle"; + i[i.MailReply = 190] = "MailReply"; + i[i.MailForward = 191] = "MailForward"; + i[i.MailSend = 192] = "MailSend"; + i[i.MAX_VALUE = 193] = "MAX_VALUE"; + })(tzi ||= {}); + Ynt = class { + constructor() { + this._keyCodeToStr = []; + this._strToKeyCode = Object.create(null); + } + define(i, e) { + this._keyCodeToStr[i] = e; + this._strToKeyCode[e.toLowerCase()] = i; + } + keyCodeToStr(i) { + return this._keyCodeToStr[i]; + } + strToKeyCode(i) { + return this._strToKeyCode[i.toLowerCase()] || 0; + } + }; + Ife = new Ynt(); + Xnt = new Ynt(); + Qnt = new Ynt(); + K4t = new Array(230); + Znt = {}; + Y4t = []; + X4t = Object.create(null); + Q4t = Object.create(null); + XS = { + lowerCaseToEnum: i => Q4t[i] || 0, + toEnum: i => X4t[i] || 0, + toString: i => Y4t[i] || "None" + }; + fx = []; + eee = []; + for (let i = 0; i <= 193; i++) { + fx[i] = -1; + } + for (let i = 0; i <= 132; i++) { + eee[i] = -1; + } + (function () { + const i = ""; + const e = [[1, 0, "None", 0, "unknown", 0, "VK_UNKNOWN", i, i], [1, 1, "Hyper", 0, i, 0, i, i, i], [1, 2, "Super", 0, i, 0, i, i, i], [1, 3, "Fn", 0, i, 0, i, i, i], [1, 4, "FnLock", 0, i, 0, i, i, i], [1, 5, "Suspend", 0, i, 0, i, i, i], [1, 6, "Resume", 0, i, 0, i, i, i], [1, 7, "Turbo", 0, i, 0, i, i, i], [1, 8, "Sleep", 0, i, 0, "VK_SLEEP", i, i], [1, 9, "WakeUp", 0, i, 0, i, i, i], [0, 10, "KeyA", 31, "A", 65, "VK_A", i, i], [0, 11, "KeyB", 32, "B", 66, "VK_B", i, i], [0, 12, "KeyC", 33, "C", 67, "VK_C", i, i], [0, 13, "KeyD", 34, "D", 68, "VK_D", i, i], [0, 14, "KeyE", 35, "E", 69, "VK_E", i, i], [0, 15, "KeyF", 36, "F", 70, "VK_F", i, i], [0, 16, "KeyG", 37, "G", 71, "VK_G", i, i], [0, 17, "KeyH", 38, "H", 72, "VK_H", i, i], [0, 18, "KeyI", 39, "I", 73, "VK_I", i, i], [0, 19, "KeyJ", 40, "J", 74, "VK_J", i, i], [0, 20, "KeyK", 41, "K", 75, "VK_K", i, i], [0, 21, "KeyL", 42, "L", 76, "VK_L", i, i], [0, 22, "KeyM", 43, "M", 77, "VK_M", i, i], [0, 23, "KeyN", 44, "N", 78, "VK_N", i, i], [0, 24, "KeyO", 45, "O", 79, "VK_O", i, i], [0, 25, "KeyP", 46, "P", 80, "VK_P", i, i], [0, 26, "KeyQ", 47, "Q", 81, "VK_Q", i, i], [0, 27, "KeyR", 48, "R", 82, "VK_R", i, i], [0, 28, "KeyS", 49, "S", 83, "VK_S", i, i], [0, 29, "KeyT", 50, "T", 84, "VK_T", i, i], [0, 30, "KeyU", 51, "U", 85, "VK_U", i, i], [0, 31, "KeyV", 52, "V", 86, "VK_V", i, i], [0, 32, "KeyW", 53, "W", 87, "VK_W", i, i], [0, 33, "KeyX", 54, "X", 88, "VK_X", i, i], [0, 34, "KeyY", 55, "Y", 89, "VK_Y", i, i], [0, 35, "KeyZ", 56, "Z", 90, "VK_Z", i, i], [0, 36, "Digit1", 22, "1", 49, "VK_1", i, i], [0, 37, "Digit2", 23, "2", 50, "VK_2", i, i], [0, 38, "Digit3", 24, "3", 51, "VK_3", i, i], [0, 39, "Digit4", 25, "4", 52, "VK_4", i, i], [0, 40, "Digit5", 26, "5", 53, "VK_5", i, i], [0, 41, "Digit6", 27, "6", 54, "VK_6", i, i], [0, 42, "Digit7", 28, "7", 55, "VK_7", i, i], [0, 43, "Digit8", 29, "8", 56, "VK_8", i, i], [0, 44, "Digit9", 30, "9", 57, "VK_9", i, i], [0, 45, "Digit0", 21, "0", 48, "VK_0", i, i], [1, 46, "Enter", 3, "Enter", 13, "VK_RETURN", i, i], [1, 47, "Escape", 9, "Escape", 27, "VK_ESCAPE", i, i], [1, 48, "Backspace", 1, "Backspace", 8, "VK_BACK", i, i], [1, 49, "Tab", 2, "Tab", 9, "VK_TAB", i, i], [1, 50, "Space", 10, "Space", 32, "VK_SPACE", i, i], [0, 51, "Minus", 88, "-", 189, "VK_OEM_MINUS", "-", "OEM_MINUS"], [0, 52, "Equal", 86, "=", 187, "VK_OEM_PLUS", "=", "OEM_PLUS"], [0, 53, "BracketLeft", 92, "[", 219, "VK_OEM_4", "[", "OEM_4"], [0, 54, "BracketRight", 94, "]", 221, "VK_OEM_6", "]", "OEM_6"], [0, 55, "Backslash", 93, "\\", 220, "VK_OEM_5", "\\", "OEM_5"], [0, 56, "IntlHash", 0, i, 0, i, i, i], [0, 57, "Semicolon", 85, ";", 186, "VK_OEM_1", ";", "OEM_1"], [0, 58, "Quote", 95, "'", 222, "VK_OEM_7", "'", "OEM_7"], [0, 59, "Backquote", 91, "`", 192, "VK_OEM_3", "`", "OEM_3"], [0, 60, "Comma", 87, ",", 188, "VK_OEM_COMMA", ",", "OEM_COMMA"], [0, 61, "Period", 89, ".", 190, "VK_OEM_PERIOD", ".", "OEM_PERIOD"], [0, 62, "Slash", 90, "/", 191, "VK_OEM_2", "/", "OEM_2"], [1, 63, "CapsLock", 8, "CapsLock", 20, "VK_CAPITAL", i, i], [1, 64, "F1", 59, "F1", 112, "VK_F1", i, i], [1, 65, "F2", 60, "F2", 113, "VK_F2", i, i], [1, 66, "F3", 61, "F3", 114, "VK_F3", i, i], [1, 67, "F4", 62, "F4", 115, "VK_F4", i, i], [1, 68, "F5", 63, "F5", 116, "VK_F5", i, i], [1, 69, "F6", 64, "F6", 117, "VK_F6", i, i], [1, 70, "F7", 65, "F7", 118, "VK_F7", i, i], [1, 71, "F8", 66, "F8", 119, "VK_F8", i, i], [1, 72, "F9", 67, "F9", 120, "VK_F9", i, i], [1, 73, "F10", 68, "F10", 121, "VK_F10", i, i], [1, 74, "F11", 69, "F11", 122, "VK_F11", i, i], [1, 75, "F12", 70, "F12", 123, "VK_F12", i, i], [1, 76, "PrintScreen", 0, i, 0, i, i, i], [1, 77, "ScrollLock", 84, "ScrollLock", 145, "VK_SCROLL", i, i], [1, 78, "Pause", 7, "PauseBreak", 19, "VK_PAUSE", i, i], [1, 79, "Insert", 19, "Insert", 45, "VK_INSERT", i, i], [1, 80, "Home", 14, "Home", 36, "VK_HOME", i, i], [1, 81, "PageUp", 11, "PageUp", 33, "VK_PRIOR", i, i], [1, 82, "Delete", 20, "Delete", 46, "VK_DELETE", i, i], [1, 83, "End", 13, "End", 35, "VK_END", i, i], [1, 84, "PageDown", 12, "PageDown", 34, "VK_NEXT", i, i], [1, 85, "ArrowRight", 17, "RightArrow", 39, "VK_RIGHT", "Right", i], [1, 86, "ArrowLeft", 15, "LeftArrow", 37, "VK_LEFT", "Left", i], [1, 87, "ArrowDown", 18, "DownArrow", 40, "VK_DOWN", "Down", i], [1, 88, "ArrowUp", 16, "UpArrow", 38, "VK_UP", "Up", i], [1, 89, "NumLock", 83, "NumLock", 144, "VK_NUMLOCK", i, i], [1, 90, "NumpadDivide", 113, "NumPad_Divide", 111, "VK_DIVIDE", i, i], [1, 91, "NumpadMultiply", 108, "NumPad_Multiply", 106, "VK_MULTIPLY", i, i], [1, 92, "NumpadSubtract", 111, "NumPad_Subtract", 109, "VK_SUBTRACT", i, i], [1, 93, "NumpadAdd", 109, "NumPad_Add", 107, "VK_ADD", i, i], [1, 94, "NumpadEnter", 3, i, 0, i, i, i], [1, 95, "Numpad1", 99, "NumPad1", 97, "VK_NUMPAD1", i, i], [1, 96, "Numpad2", 100, "NumPad2", 98, "VK_NUMPAD2", i, i], [1, 97, "Numpad3", 101, "NumPad3", 99, "VK_NUMPAD3", i, i], [1, 98, "Numpad4", 102, "NumPad4", 100, "VK_NUMPAD4", i, i], [1, 99, "Numpad5", 103, "NumPad5", 101, "VK_NUMPAD5", i, i], [1, 100, "Numpad6", 104, "NumPad6", 102, "VK_NUMPAD6", i, i], [1, 101, "Numpad7", 105, "NumPad7", 103, "VK_NUMPAD7", i, i], [1, 102, "Numpad8", 106, "NumPad8", 104, "VK_NUMPAD8", i, i], [1, 103, "Numpad9", 107, "NumPad9", 105, "VK_NUMPAD9", i, i], [1, 104, "Numpad0", 98, "NumPad0", 96, "VK_NUMPAD0", i, i], [1, 105, "NumpadDecimal", 112, "NumPad_Decimal", 110, "VK_DECIMAL", i, i], [0, 106, "IntlBackslash", 97, "OEM_102", 226, "VK_OEM_102", i, i], [1, 107, "ContextMenu", 58, "ContextMenu", 93, i, i, i], [1, 108, "Power", 0, i, 0, i, i, i], [1, 109, "NumpadEqual", 0, i, 0, i, i, i], [1, 110, "F13", 71, "F13", 124, "VK_F13", i, i], [1, 111, "F14", 72, "F14", 125, "VK_F14", i, i], [1, 112, "F15", 73, "F15", 126, "VK_F15", i, i], [1, 113, "F16", 74, "F16", 127, "VK_F16", i, i], [1, 114, "F17", 75, "F17", 128, "VK_F17", i, i], [1, 115, "F18", 76, "F18", 129, "VK_F18", i, i], [1, 116, "F19", 77, "F19", 130, "VK_F19", i, i], [1, 117, "F20", 78, "F20", 131, "VK_F20", i, i], [1, 118, "F21", 79, "F21", 132, "VK_F21", i, i], [1, 119, "F22", 80, "F22", 133, "VK_F22", i, i], [1, 120, "F23", 81, "F23", 134, "VK_F23", i, i], [1, 121, "F24", 82, "F24", 135, "VK_F24", i, i], [1, 122, "Open", 0, i, 0, i, i, i], [1, 123, "Help", 0, i, 0, i, i, i], [1, 124, "Select", 0, i, 0, i, i, i], [1, 125, "Again", 0, i, 0, i, i, i], [1, 126, "Undo", 0, i, 0, i, i, i], [1, 127, "Cut", 0, i, 0, i, i, i], [1, 128, "Copy", 0, i, 0, i, i, i], [1, 129, "Paste", 0, i, 0, i, i, i], [1, 130, "Find", 0, i, 0, i, i, i], [1, 131, "AudioVolumeMute", 117, "AudioVolumeMute", 173, "VK_VOLUME_MUTE", i, i], [1, 132, "AudioVolumeUp", 118, "AudioVolumeUp", 175, "VK_VOLUME_UP", i, i], [1, 133, "AudioVolumeDown", 119, "AudioVolumeDown", 174, "VK_VOLUME_DOWN", i, i], [1, 134, "NumpadComma", 110, "NumPad_Separator", 108, "VK_SEPARATOR", i, i], [0, 135, "IntlRo", 115, "ABNT_C1", 193, "VK_ABNT_C1", i, i], [1, 136, "KanaMode", 0, i, 0, i, i, i], [0, 137, "IntlYen", 0, i, 0, i, i, i], [1, 138, "Convert", 0, i, 0, i, i, i], [1, 139, "NonConvert", 0, i, 0, i, i, i], [1, 140, "Lang1", 0, i, 0, i, i, i], [1, 141, "Lang2", 0, i, 0, i, i, i], [1, 142, "Lang3", 0, i, 0, i, i, i], [1, 143, "Lang4", 0, i, 0, i, i, i], [1, 144, "Lang5", 0, i, 0, i, i, i], [1, 145, "Abort", 0, i, 0, i, i, i], [1, 146, "Props", 0, i, 0, i, i, i], [1, 147, "NumpadParenLeft", 0, i, 0, i, i, i], [1, 148, "NumpadParenRight", 0, i, 0, i, i, i], [1, 149, "NumpadBackspace", 0, i, 0, i, i, i], [1, 150, "NumpadMemoryStore", 0, i, 0, i, i, i], [1, 151, "NumpadMemoryRecall", 0, i, 0, i, i, i], [1, 152, "NumpadMemoryClear", 0, i, 0, i, i, i], [1, 153, "NumpadMemoryAdd", 0, i, 0, i, i, i], [1, 154, "NumpadMemorySubtract", 0, i, 0, i, i, i], [1, 155, "NumpadClear", 131, "Clear", 12, "VK_CLEAR", i, i], [1, 156, "NumpadClearEntry", 0, i, 0, i, i, i], [1, 0, i, 5, "Ctrl", 17, "VK_CONTROL", i, i], [1, 0, i, 4, "Shift", 16, "VK_SHIFT", i, i], [1, 0, i, 6, "Alt", 18, "VK_MENU", i, i], [1, 0, i, 57, "Meta", 91, "VK_COMMAND", i, i], [1, 157, "ControlLeft", 5, i, 0, "VK_LCONTROL", i, i], [1, 158, "ShiftLeft", 4, i, 0, "VK_LSHIFT", i, i], [1, 159, "AltLeft", 6, i, 0, "VK_LMENU", i, i], [1, 160, "MetaLeft", 57, i, 0, "VK_LWIN", i, i], [1, 161, "ControlRight", 5, i, 0, "VK_RCONTROL", i, i], [1, 162, "ShiftRight", 4, i, 0, "VK_RSHIFT", i, i], [1, 163, "AltRight", 6, i, 0, "VK_RMENU", i, i], [1, 164, "MetaRight", 57, i, 0, "VK_RWIN", i, i], [1, 165, "BrightnessUp", 0, i, 0, i, i, i], [1, 166, "BrightnessDown", 0, i, 0, i, i, i], [1, 167, "MediaPlay", 0, i, 0, i, i, i], [1, 168, "MediaRecord", 0, i, 0, i, i, i], [1, 169, "MediaFastForward", 0, i, 0, i, i, i], [1, 170, "MediaRewind", 0, i, 0, i, i, i], [1, 171, "MediaTrackNext", 124, "MediaTrackNext", 176, "VK_MEDIA_NEXT_TRACK", i, i], [1, 172, "MediaTrackPrevious", 125, "MediaTrackPrevious", 177, "VK_MEDIA_PREV_TRACK", i, i], [1, 173, "MediaStop", 126, "MediaStop", 178, "VK_MEDIA_STOP", i, i], [1, 174, "Eject", 0, i, 0, i, i, i], [1, 175, "MediaPlayPause", 127, "MediaPlayPause", 179, "VK_MEDIA_PLAY_PAUSE", i, i], [1, 176, "MediaSelect", 128, "LaunchMediaPlayer", 181, "VK_MEDIA_LAUNCH_MEDIA_SELECT", i, i], [1, 177, "LaunchMail", 129, "LaunchMail", 180, "VK_MEDIA_LAUNCH_MAIL", i, i], [1, 178, "LaunchApp2", 130, "LaunchApp2", 183, "VK_MEDIA_LAUNCH_APP2", i, i], [1, 179, "LaunchApp1", 0, i, 0, "VK_MEDIA_LAUNCH_APP1", i, i], [1, 180, "SelectTask", 0, i, 0, i, i, i], [1, 181, "LaunchScreenSaver", 0, i, 0, i, i, i], [1, 182, "BrowserSearch", 120, "BrowserSearch", 170, "VK_BROWSER_SEARCH", i, i], [1, 183, "BrowserHome", 121, "BrowserHome", 172, "VK_BROWSER_HOME", i, i], [1, 184, "BrowserBack", 122, "BrowserBack", 166, "VK_BROWSER_BACK", i, i], [1, 185, "BrowserForward", 123, "BrowserForward", 167, "VK_BROWSER_FORWARD", i, i], [1, 186, "BrowserStop", 0, i, 0, "VK_BROWSER_STOP", i, i], [1, 187, "BrowserRefresh", 0, i, 0, "VK_BROWSER_REFRESH", i, i], [1, 188, "BrowserFavorites", 0, i, 0, "VK_BROWSER_FAVORITES", i, i], [1, 189, "ZoomToggle", 0, i, 0, i, i, i], [1, 190, "MailReply", 0, i, 0, i, i, i], [1, 191, "MailForward", 0, i, 0, i, i, i], [1, 192, "MailSend", 0, i, 0, i, i, i], [1, 0, i, 114, "KeyInComposition", 229, i, i, i], [1, 0, i, 116, "ABNT_C2", 194, "VK_ABNT_C2", i, i], [1, 0, i, 96, "OEM_8", 223, "VK_OEM_8", i, i], [1, 0, i, 0, i, 0, "VK_KANA", i, i], [1, 0, i, 0, i, 0, "VK_HANGUL", i, i], [1, 0, i, 0, i, 0, "VK_JUNJA", i, i], [1, 0, i, 0, i, 0, "VK_FINAL", i, i], [1, 0, i, 0, i, 0, "VK_HANJA", i, i], [1, 0, i, 0, i, 0, "VK_KANJI", i, i], [1, 0, i, 0, i, 0, "VK_CONVERT", i, i], [1, 0, i, 0, i, 0, "VK_NONCONVERT", i, i], [1, 0, i, 0, i, 0, "VK_ACCEPT", i, i], [1, 0, i, 0, i, 0, "VK_MODECHANGE", i, i], [1, 0, i, 0, i, 0, "VK_SELECT", i, i], [1, 0, i, 0, i, 0, "VK_PRINT", i, i], [1, 0, i, 0, i, 0, "VK_EXECUTE", i, i], [1, 0, i, 0, i, 0, "VK_SNAPSHOT", i, i], [1, 0, i, 0, i, 0, "VK_HELP", i, i], [1, 0, i, 0, i, 0, "VK_APPS", i, i], [1, 0, i, 0, i, 0, "VK_PROCESSKEY", i, i], [1, 0, i, 0, i, 0, "VK_PACKET", i, i], [1, 0, i, 0, i, 0, "VK_DBE_SBCSCHAR", i, i], [1, 0, i, 0, i, 0, "VK_DBE_DBCSCHAR", i, i], [1, 0, i, 0, i, 0, "VK_ATTN", i, i], [1, 0, i, 0, i, 0, "VK_CRSEL", i, i], [1, 0, i, 0, i, 0, "VK_EXSEL", i, i], [1, 0, i, 0, i, 0, "VK_EREOF", i, i], [1, 0, i, 0, i, 0, "VK_PLAY", i, i], [1, 0, i, 0, i, 0, "VK_ZOOM", i, i], [1, 0, i, 0, i, 0, "VK_NONAME", i, i], [1, 0, i, 0, i, 0, "VK_PA1", i, i], [1, 0, i, 0, i, 0, "VK_OEM_CLEAR", i, i]]; + const t = []; + const s = []; + for (const n of e) { + const [r, o, a, l, c, u, d, h, g] = n; + if (!s[o]) { + s[o] = true; + Y4t[o] = a; + X4t[a] = o; + Q4t[a.toLowerCase()] = o; + if (r) { + fx[o] = l; + if (l !== 0 && l !== 3 && l !== 5 && l !== 4 && l !== 6 && l !== 57) { + eee[l] = o; + } + } + } + if (!t[l]) { + t[l] = true; + if (!c) { + throw new Error(`String representation missing for key code ${l} around scan code ${a}`); + } + Ife.define(l, c); + Xnt.define(l, h || c); + Qnt.define(l, g || h || c); + } + if (u) { + K4t[u] = l; + } + if (d) { + Znt[d] = l; + } + } + eee[3] = 46; + })(); + (function (i) { + function e(a) { + return Ife.keyCodeToStr(a); + } + i.toString = e; + function t(a) { + return Ife.strToKeyCode(a); + } + i.fromString = t; + function s(a) { + return Xnt.keyCodeToStr(a); + } + i.toUserSettingsUS = s; + function n(a) { + return Qnt.keyCodeToStr(a); + } + i.toUserSettingsGeneral = n; + function r(a) { + return Xnt.strToKeyCode(a) || Qnt.strToKeyCode(a); + } + i.fromUserSettings = r; + function o(a) { + if (a >= 98 && a <= 113) { + return null; + } + switch (a) { + case 16: + return "Up"; + case 18: + return "Down"; + case 15: + return "Left"; + case 17: + return "Right"; + } + return Ife.keyCodeToStr(a); + } + i.toElectronAccelerator = o; + })(Hp ||= {}); + (function (i) { + i[i.CtrlCmd = 2048] = "CtrlCmd"; + i[i.Shift = 1024] = "Shift"; + i[i.Alt = 512] = "Alt"; + i[i.WinCtrl = 256] = "WinCtrl"; + })(izi ||= {}); + _r = 2091; + Xr = 2096; + } +}); +function tee(i, e) { + if (typeof i == "number") { + if (i === 0) { + return null; + } + const t = (i & 65535) >>> 0; + const s = (i & -65536) >>> 16; + if (s !== 0) { + return new Gq([ert(t, e), ert(s, e)]); + } else { + return new Gq([ert(t, e)]); + } + } else { + const t = []; + for (let s = 0; s < i.length; s++) { + t.push(ert(i[s], e)); + } + return new Gq(t); + } +} +function ert(i, e) { + const t = !!(i & 2048); + const s = !!(i & 256); + const n = e === 2 ? s : t; + const r = !!(i & 1024); + const o = !!(i & 512); + const a = e === 2 ? t : s; + const l = i & 255; + return new gx(n, r, o, a, l); +} +var szi; +var gx; +var _B; +var Gq; +var nzi; +var Z4t; +var wI = ue({ + "out-build/vs/base/common/keybindings.js"() { + "use strict"; + + Ut(); + (function (i) { + i[i.CtrlCmd = 2048] = "CtrlCmd"; + i[i.Shift = 1024] = "Shift"; + i[i.Alt = 512] = "Alt"; + i[i.WinCtrl = 256] = "WinCtrl"; + i[i.KeyCode = 255] = "KeyCode"; + })(szi ||= {}); + gx = class sFn { + constructor(e, t, s, n, r) { + this.ctrlKey = e; + this.shiftKey = t; + this.altKey = s; + this.metaKey = n; + this.keyCode = r; + } + equals(e) { + return e instanceof sFn && this.ctrlKey === e.ctrlKey && this.shiftKey === e.shiftKey && this.altKey === e.altKey && this.metaKey === e.metaKey && this.keyCode === e.keyCode; + } + getHashCode() { + const e = this.ctrlKey ? "1" : "0"; + const t = this.shiftKey ? "1" : "0"; + const s = this.altKey ? "1" : "0"; + const n = this.metaKey ? "1" : "0"; + return `K${e}${t}${s}${n}${this.keyCode}`; + } + isModifierKey() { + return this.keyCode === 0 || this.keyCode === 5 || this.keyCode === 57 || this.keyCode === 6 || this.keyCode === 4; + } + toKeybinding() { + return new Gq([this]); + } + isDuplicateModifierCase() { + return this.ctrlKey && this.keyCode === 5 || this.shiftKey && this.keyCode === 4 || this.altKey && this.keyCode === 6 || this.metaKey && this.keyCode === 57; + } + }; + _B = class nFn { + constructor(e, t, s, n, r) { + this.ctrlKey = e; + this.shiftKey = t; + this.altKey = s; + this.metaKey = n; + this.scanCode = r; + } + equals(e) { + return e instanceof nFn && this.ctrlKey === e.ctrlKey && this.shiftKey === e.shiftKey && this.altKey === e.altKey && this.metaKey === e.metaKey && this.scanCode === e.scanCode; + } + getHashCode() { + const e = this.ctrlKey ? "1" : "0"; + const t = this.shiftKey ? "1" : "0"; + const s = this.altKey ? "1" : "0"; + const n = this.metaKey ? "1" : "0"; + return `S${e}${t}${s}${n}${this.scanCode}`; + } + isDuplicateModifierCase() { + return this.ctrlKey && (this.scanCode === 157 || this.scanCode === 161) || this.shiftKey && (this.scanCode === 158 || this.scanCode === 162) || this.altKey && (this.scanCode === 159 || this.scanCode === 163) || this.metaKey && (this.scanCode === 160 || this.scanCode === 164); + } + }; + Gq = class { + constructor(i) { + if (i.length === 0) { + throw Hl("chords"); + } + this.chords = i; + } + getHashCode() { + let i = ""; + for (let e = 0, t = this.chords.length; e < t; e++) { + if (e !== 0) { + i += ";"; + } + i += this.chords[e].getHashCode(); + } + return i; + } + equals(i) { + if (i === null || this.chords.length !== i.chords.length) { + return false; + } + for (let e = 0; e < this.chords.length; e++) { + if (!this.chords[e].equals(i.chords[e])) { + return false; + } + } + return true; + } + }; + nzi = class { + constructor(i, e, t, s, n, r) { + this.ctrlKey = i; + this.shiftKey = e; + this.altKey = t; + this.metaKey = s; + this.keyLabel = n; + this.keyAriaLabel = r; + } + }; + Z4t = class {}; + } +}); +function LHn(i) { + if (i.charCode) { + const t = String.fromCharCode(i.charCode).toUpperCase(); + return Hp.fromString(t); + } + const e = i.keyCode; + if (e === 3) { + return 7; + } + if (Bv) { + switch (e) { + case 59: + return 85; + case 60: + if (yl) { + return 97; + } + break; + case 61: + return 86; + case 107: + return 109; + case 109: + return 111; + case 173: + return 88; + case 224: + if (Gt) { + return 57; + } + break; + } + } else if (c9) { + if (Gt && e === 93) { + return 57; + } + if (!Gt && e === 92) { + return 57; + } + } + return K4t[e] || 0; +} +function RHn(i) { + const e = []; + if (i.ctrlKey) { + e.push("ctrl"); + } + if (i.shiftKey) { + e.push("shift"); + } + if (i.altKey) { + e.push("alt"); + } + if (i.metaKey) { + e.push("meta"); + } + return `modifiers: [${e.join(",")}], code: ${i.code}, keyCode: ${i.keyCode}, key: ${i.key}`; +} +function NHn(i) { + const e = []; + if (i.ctrlKey) { + e.push("ctrl"); + } + if (i.shiftKey) { + e.push("shift"); + } + if (i.altKey) { + e.push("alt"); + } + if (i.metaKey) { + e.push("meta"); + } + return `modifiers: [${e.join(",")}], code: ${i.code}, keyCode: ${i.keyCode} ('${Hp.toString(i.keyCode)}')`; +} +var rzi; +var ozi; +var azi; +var lzi; +var wr; +var _a = ue({ + "out-build/vs/base/browser/keyboardEvent.js"() { + "use strict"; + + hc(); + Yc(); + wI(); + rt(); + rzi = Gt ? 256 : 2048; + ozi = 512; + azi = 1024; + lzi = Gt ? 2048 : 256; + wr = class { + constructor(i) { + this._standardKeyboardEventBrand = true; + const e = i; + this.browserEvent = e; + this.target = e.target; + this.ctrlKey = e.ctrlKey; + this.shiftKey = e.shiftKey; + this.altKey = e.altKey; + this.metaKey = e.metaKey; + this.altGraphKey = e.getModifierState?.("AltGraph"); + this.keyCode = LHn(e); + this.code = e.code; + this.ctrlKey = this.ctrlKey || this.keyCode === 5; + this.altKey = this.altKey || this.keyCode === 6; + this.shiftKey = this.shiftKey || this.keyCode === 4; + this.metaKey = this.metaKey || this.keyCode === 57; + this.a = this.c(); + this.b = this.d(); + } + preventDefault() { + if (this.browserEvent && this.browserEvent.preventDefault) { + this.browserEvent.preventDefault(); + } + } + stopPropagation() { + if (this.browserEvent && this.browserEvent.stopPropagation) { + this.browserEvent.stopPropagation(); + } + } + toKeyCodeChord() { + return this.b; + } + equals(i) { + return this.a === i; + } + c() { + let i = 0; + if (this.keyCode !== 5 && this.keyCode !== 4 && this.keyCode !== 6 && this.keyCode !== 57) { + i = this.keyCode; + } + let e = 0; + if (this.ctrlKey) { + e |= rzi; + } + if (this.altKey) { + e |= ozi; + } + if (this.shiftKey) { + e |= azi; + } + if (this.metaKey) { + e |= lzi; + } + e |= i; + return e; + } + d() { + let i = 0; + if (this.keyCode !== 5 && this.keyCode !== 4 && this.keyCode !== 6 && this.keyCode !== 57) { + i = this.keyCode; + } + return new gx(this.ctrlKey, this.shiftKey, this.altKey, this.metaKey, i); + } + }; + } +}); +function MHn(i) { + if (!i.parent || i.parent === i) { + return null; + } + try { + const e = i.location; + const t = i.parent.location; + if (e.origin !== "null" && t.origin !== "null" && e.origin !== t.origin) { + return null; + } + } catch { + return null; + } + return i.parent; +} +async function czi(i, e) { + if (!crypto.subtle) { + throw new Error("'crypto.subtle' is not available so webviews will not work. This is likely because the editor is not running in a secure context (https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts)."); + } + const t = JSON.stringify({ + parentOrigin: i, + salt: e + }); + const n = new TextEncoder().encode(t); + const r = await crypto.subtle.digest("sha-256", n); + return AHn(r); +} +function AHn(i) { + const t = Array.from(new Uint8Array(i)).map(s => s.toString(16).padStart(2, "0")).join(""); + return BigInt(`0x${t}`).toString(32).padStart(52, "0"); +} +var e5t; +var uzi; +var t5t = ue({ + "out-build/vs/base/browser/iframe.js"() { + "use strict"; + + e5t = new WeakMap(); + uzi = class { + static a(i) { + let e = e5t.get(i); + if (!e) { + e = []; + e5t.set(i, e); + let t = i; + let s; + do { + s = MHn(t); + if (s) { + e.push({ + window: new WeakRef(t), + iframeElement: t.frameElement || null + }); + } else { + e.push({ + window: new WeakRef(t), + iframeElement: null + }); + } + t = s; + } while (t); + } + return e.slice(0); + } + static getPositionOfChildWindowRelativeToAncestorWindow(i, e) { + if (!e || i === e) { + return { + top: 0, + left: 0 + }; + } + let t = 0; + let s = 0; + const n = this.a(i); + for (const r of n) { + const o = r.window.deref(); + t += o?.scrollY ?? 0; + s += o?.scrollX ?? 0; + if (o === e || !r.iframeElement) { + break; + } + const a = r.iframeElement.getBoundingClientRect(); + t += a.top; + s += a.left; + } + return { + top: t, + left: s + }; + } + }; + } +}); +var Xc; +var BB; +var gd = ue({ + "out-build/vs/base/browser/mouseEvent.js"() { + "use strict"; + + hc(); + t5t(); + rt(); + Xc = class { + constructor(i, e) { + this.timestamp = Date.now(); + this.browserEvent = e; + this.leftButton = e.button === 0; + this.middleButton = e.button === 1; + this.rightButton = e.button === 2; + this.buttons = e.buttons; + this.target = e.target; + this.detail = e.detail || 1; + if (e.type === "dblclick") { + this.detail = 2; + } + this.ctrlKey = e.ctrlKey; + this.shiftKey = e.shiftKey; + this.altKey = e.altKey; + this.metaKey = e.metaKey; + if (typeof e.pageX == "number") { + this.posx = e.pageX; + this.posy = e.pageY; + } else { + this.posx = e.clientX + this.target.ownerDocument.body.scrollLeft + this.target.ownerDocument.documentElement.scrollLeft; + this.posy = e.clientY + this.target.ownerDocument.body.scrollTop + this.target.ownerDocument.documentElement.scrollTop; + } + const t = uzi.getPositionOfChildWindowRelativeToAncestorWindow(i, e.view); + this.posx -= t.left; + this.posy -= t.top; + } + preventDefault() { + this.browserEvent.preventDefault(); + } + stopPropagation() { + this.browserEvent.stopPropagation(); + } + }; + BB = class { + constructor(i, e = 0, t = 0) { + this.browserEvent = i || null; + this.target = i ? i.target || i.targetNode || i.srcElement : null; + this.deltaY = t; + this.deltaX = e; + let s = false; + if (Jq) { + const n = navigator.userAgent.match(/Chrome\/(\d+)/); + s = (n ? parseInt(n[1]) : 123) <= 122; + } + if (i) { + const n = i; + const r = i; + const o = i.view?.devicePixelRatio || 1; + if (typeof n.wheelDeltaY !== "undefined") { + if (s) { + this.deltaY = n.wheelDeltaY / (o * 120); + } else { + this.deltaY = n.wheelDeltaY / 120; + } + } else if (typeof r.VERTICAL_AXIS !== "undefined" && r.axis === r.VERTICAL_AXIS) { + this.deltaY = -r.detail / 3; + } else if (i.type === "wheel") { + const a = i; + if (a.deltaMode === a.DOM_DELTA_LINE) { + if (Bv && !Gt) { + this.deltaY = -i.deltaY / 3; + } else { + this.deltaY = -i.deltaY; + } + } else { + this.deltaY = -i.deltaY / 40; + } + } + if (typeof n.wheelDeltaX !== "undefined") { + if (yI && ln) { + this.deltaX = -(n.wheelDeltaX / 120); + } else if (s) { + this.deltaX = n.wheelDeltaX / (o * 120); + } else { + this.deltaX = n.wheelDeltaX / 120; + } + } else if (typeof r.HORIZONTAL_AXIS !== "undefined" && r.axis === r.HORIZONTAL_AXIS) { + this.deltaX = -i.detail / 3; + } else if (i.type === "wheel") { + const a = i; + if (a.deltaMode === a.DOM_DELTA_LINE) { + if (Bv && !Gt) { + this.deltaX = -i.deltaX / 3; + } else { + this.deltaX = -i.deltaX; + } + } else { + this.deltaX = -i.deltaX / 40; + } + } + if (this.deltaY === 0 && this.deltaX === 0 && i.wheelDelta) { + if (s) { + this.deltaY = i.wheelDelta / (o * 120); + } else { + this.deltaY = i.wheelDelta / 120; + } + } + } + } + preventDefault() { + this.browserEvent?.preventDefault(); + } + stopPropagation() { + this.browserEvent?.stopPropagation(); + } + }; + } +}); +function ST(i) { + return function (e) { + for (var t = arguments.length, s = new Array(t > 1 ? t - 1 : 0), n = 1; n < t; n++) { + s[n - 1] = arguments[n]; + } + return trt(i, e, s); + }; +} +function $Hn(i) { + return function () { + for (var e = arguments.length, t = new Array(e), s = 0; s < e; s++) { + t[s] = arguments[s]; + } + return irt(i, t); + }; +} +function dh(i, e, t = Pfe) { + if (s5t) { + s5t(i, null); + } + let s = e.length; + while (s--) { + let n = e[s]; + if (typeof n == "string") { + const r = t(n); + if (r !== n) { + if (!hzi(e)) { + e[s] = r; + } + n = r; + } + } + i[n] = true; + } + return i; +} +function FHn(i) { + for (let e = 0; e < i.length; e++) { + if (!FL(i, e)) { + i[e] = null; + } + } + return i; +} +function Kq(i) { + const e = n5t(null); + for (const [t, s] of i5t(i)) { + if (FL(i, t)) { + if (Array.isArray(s)) { + e[t] = FHn(s); + } else if (s && typeof s == "object" && s.constructor === Object) { + e[t] = Kq(s); + } else { + e[t] = s; + } + } + } + return e; +} +function Dfe(i, e) { + while (i !== null) { + const s = gzi(i, e); + if (s) { + if (s.get) { + return ST(s.get); + } + if (typeof s.value == "function") { + return ST(s.value); + } + } + i = fzi(i); + } + function t() { + return null; + } + return t; +} +function dzi(i = Dzi()) { + const e = on => dzi(on); + e.version = "3.1.7"; + e.removed = []; + if (!i || !i.document || i.document.nodeType !== ree.document) { + e.isSupported = false; + return e; + } + let { + document: t + } = i; + const s = t; + const n = s.currentScript; + const { + DocumentFragment: r, + HTMLTemplateElement: o, + Node: a, + Element: l, + NodeFilter: c, + NamedNodeMap: u = i.NamedNodeMap || i.MozNamedAttrMap, + HTMLFormElement: d, + DOMParser: h, + trustedTypes: g + } = i; + const p = l.prototype; + const b = Dfe(p, "cloneNode"); + const v = Dfe(p, "remove"); + const y = Dfe(p, "nextSibling"); + const w = Dfe(p, "childNodes"); + const C = Dfe(p, "parentNode"); + if (typeof o == "function") { + const on = t.createElement("template"); + if (on.content && on.content.ownerDocument) { + t = on.content.ownerDocument; + } + } + let S; + let x = ""; + const { + implementation: k, + createNodeIterator: E, + createDocumentFragment: D, + getElementsByTagName: P + } = t; + const { + importNode: R + } = s; + let L = {}; + e.isSupported = typeof i5t == "function" && typeof C == "function" && k && k.createHTMLDocument !== undefined; + const { + MUSTACHE_EXPR: F, + ERB_EXPR: O, + TMPLIT_EXPR: U, + DATA_ATTR: j, + ARIA_ATTR: ie, + IS_SCRIPT_OR_DATA: ee, + ATTR_WHITESPACE: ne, + CUSTOM_ELEMENT: be + } = f5t; + let { + IS_ALLOWED_URI: ge + } = f5t; + let ce = null; + const Se = dh({}, [...a5t, ...nrt, ...rrt, ...ort, ...l5t]); + let $e = null; + const qe = dh({}, [...c5t, ...art, ...u5t, ...Lfe]); + let Ae = Object.seal(n5t(null, { + tagNameCheck: { + writable: true, + configurable: false, + enumerable: true, + value: null + }, + attributeNameCheck: { + writable: true, + configurable: false, + enumerable: true, + value: null + }, + allowCustomizedBuiltInElements: { + writable: true, + configurable: false, + enumerable: true, + value: false + } + })); + let et = null; + let _t = null; + let Mi = true; + let Vt = true; + let li = false; + let wi = true; + let lt = false; + let St = true; + let Ni = false; + let Di = false; + let ct = false; + let ze = false; + let Dt = false; + let pi = false; + let Ye = true; + let $t = false; + const di = "user-content-"; + let vs = true; + let bs = false; + let Bn = {}; + let tt = null; + const jt = dh({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]); + let _e = null; + const Vi = dh({}, ["audio", "video", "img", "source", "image", "track"]); + let Zi = null; + const Ds = dh({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]); + const st = "http://www.w3.org/1998/Math/MathML"; + const Mt = "http://www.w3.org/2000/svg"; + const Ei = "http://www.w3.org/1999/xhtml"; + let bi = Ei; + let ft = false; + let ls = null; + const qi = dh({}, [st, Mt, Ei], srt); + let fs = null; + const zn = ["application/xhtml+xml", "text/html"]; + const ot = "text/html"; + let De = null; + let Ke = null; + const Pt = t.createElement("form"); + const mi = function (xi) { + return xi instanceof RegExp || xi instanceof Function; + }; + const qs = function (xi = {}) { + if (!Ke || Ke !== xi) { + if (!xi || typeof xi != "object") { + xi = {}; + } + xi = Kq(xi); + fs = zn.indexOf(xi.PARSER_MEDIA_TYPE) === -1 ? ot : xi.PARSER_MEDIA_TYPE; + De = fs === "application/xhtml+xml" ? srt : Pfe; + ce = FL(xi, "ALLOWED_TAGS") ? dh({}, xi.ALLOWED_TAGS, De) : Se; + $e = FL(xi, "ALLOWED_ATTR") ? dh({}, xi.ALLOWED_ATTR, De) : qe; + ls = FL(xi, "ALLOWED_NAMESPACES") ? dh({}, xi.ALLOWED_NAMESPACES, srt) : qi; + Zi = FL(xi, "ADD_URI_SAFE_ATTR") ? dh(Kq(Ds), xi.ADD_URI_SAFE_ATTR, De) : Ds; + _e = FL(xi, "ADD_DATA_URI_TAGS") ? dh(Kq(Vi), xi.ADD_DATA_URI_TAGS, De) : Vi; + tt = FL(xi, "FORBID_CONTENTS") ? dh({}, xi.FORBID_CONTENTS, De) : jt; + et = FL(xi, "FORBID_TAGS") ? dh({}, xi.FORBID_TAGS, De) : {}; + _t = FL(xi, "FORBID_ATTR") ? dh({}, xi.FORBID_ATTR, De) : {}; + Bn = FL(xi, "USE_PROFILES") ? xi.USE_PROFILES : false; + Mi = xi.ALLOW_ARIA_ATTR !== false; + Vt = xi.ALLOW_DATA_ATTR !== false; + li = xi.ALLOW_UNKNOWN_PROTOCOLS || false; + wi = xi.ALLOW_SELF_CLOSE_IN_ATTR !== false; + lt = xi.SAFE_FOR_TEMPLATES || false; + St = xi.SAFE_FOR_XML !== false; + Ni = xi.WHOLE_DOCUMENT || false; + ze = xi.RETURN_DOM || false; + Dt = xi.RETURN_DOM_FRAGMENT || false; + pi = xi.RETURN_TRUSTED_TYPE || false; + ct = xi.FORCE_BODY || false; + Ye = xi.SANITIZE_DOM !== false; + $t = xi.SANITIZE_NAMED_PROPS || false; + vs = xi.KEEP_CONTENT !== false; + bs = xi.IN_PLACE || false; + ge = xi.ALLOWED_URI_REGEXP || d5t; + bi = xi.NAMESPACE || Ei; + Ae = xi.CUSTOM_ELEMENT_HANDLING || {}; + if (xi.CUSTOM_ELEMENT_HANDLING && mi(xi.CUSTOM_ELEMENT_HANDLING.tagNameCheck)) { + Ae.tagNameCheck = xi.CUSTOM_ELEMENT_HANDLING.tagNameCheck; + } + if (xi.CUSTOM_ELEMENT_HANDLING && mi(xi.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)) { + Ae.attributeNameCheck = xi.CUSTOM_ELEMENT_HANDLING.attributeNameCheck; + } + if (xi.CUSTOM_ELEMENT_HANDLING && typeof xi.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean") { + Ae.allowCustomizedBuiltInElements = xi.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements; + } + if (lt) { + Vt = false; + } + if (Dt) { + ze = true; + } + if (Bn) { + ce = dh({}, l5t); + $e = []; + if (Bn.html === true) { + dh(ce, a5t); + dh($e, c5t); + } + if (Bn.svg === true) { + dh(ce, nrt); + dh($e, art); + dh($e, Lfe); + } + if (Bn.svgFilters === true) { + dh(ce, rrt); + dh($e, art); + dh($e, Lfe); + } + if (Bn.mathMl === true) { + dh(ce, ort); + dh($e, u5t); + dh($e, Lfe); + } + } + if (xi.ADD_TAGS) { + if (ce === Se) { + ce = Kq(ce); + } + dh(ce, xi.ADD_TAGS, De); + } + if (xi.ADD_ATTR) { + if ($e === qe) { + $e = Kq($e); + } + dh($e, xi.ADD_ATTR, De); + } + if (xi.ADD_URI_SAFE_ATTR) { + dh(Zi, xi.ADD_URI_SAFE_ATTR, De); + } + if (xi.FORBID_CONTENTS) { + if (tt === jt) { + tt = Kq(tt); + } + dh(tt, xi.FORBID_CONTENTS, De); + } + if (vs) { + ce["#text"] = true; + } + if (Ni) { + dh(ce, ["html", "head", "body"]); + } + if (ce.table) { + dh(ce, ["tbody"]); + delete et.tbody; + } + if (xi.TRUSTED_TYPES_POLICY) { + if (typeof xi.TRUSTED_TYPES_POLICY.createHTML != "function") { + throw nee("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook."); + } + if (typeof xi.TRUSTED_TYPES_POLICY.createScriptURL != "function") { + throw nee("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook."); + } + S = xi.TRUSTED_TYPES_POLICY; + x = S.createHTML(""); + } else { + if (S === undefined) { + S = Tzi(g, n); + } + if (S !== null && typeof x == "string") { + x = S.createHTML(""); + } + } + if (px) { + px(xi); + } + Ke = xi; + } + }; + const Ri = dh({}, ["mi", "mo", "mn", "ms", "mtext"]); + const bn = dh({}, ["annotation-xml"]); + const Pr = dh({}, ["title", "style", "font", "a", "script"]); + const Gi = dh({}, [...nrt, ...rrt, ...bzi]); + const Ys = dh({}, [...ort, ...vzi]); + const Ss = function (xi) { + let an = C(xi); + if (!an || !an.tagName) { + an = { + namespaceURI: bi, + tagName: "template" + }; + } + const Fr = Pfe(xi.tagName); + const Nl = Pfe(an.tagName); + if (ls[xi.namespaceURI]) { + if (xi.namespaceURI === Mt) { + if (an.namespaceURI === Ei) { + return Fr === "svg"; + } else if (an.namespaceURI === st) { + return Fr === "svg" && (Nl === "annotation-xml" || Ri[Nl]); + } else { + return !!Gi[Fr]; + } + } else if (xi.namespaceURI === st) { + if (an.namespaceURI === Ei) { + return Fr === "math"; + } else if (an.namespaceURI === Mt) { + return Fr === "math" && bn[Nl]; + } else { + return !!Ys[Fr]; + } + } else if (xi.namespaceURI === Ei) { + if (an.namespaceURI === Mt && !bn[Nl] || an.namespaceURI === st && !Ri[Nl]) { + return false; + } else { + return !Ys[Fr] && (Pr[Fr] || !Gi[Fr]); + } + } else { + return fs === "application/xhtml+xml" && !!ls[xi.namespaceURI]; + } + } else { + return false; + } + }; + const Us = function (xi) { + iee(e.removed, { + element: xi + }); + try { + C(xi).removeChild(xi); + } catch { + v(xi); + } + }; + const hr = function (xi, an) { + try { + iee(e.removed, { + attribute: an.getAttributeNode(xi), + from: an + }); + } catch { + iee(e.removed, { + attribute: null, + from: an + }); + } + an.removeAttribute(xi); + if (xi === "is" && !$e[xi]) { + if (ze || Dt) { + try { + Us(an); + } catch {} + } else { + try { + an.setAttribute(xi, ""); + } catch {} + } + } + }; + const Vo = function (xi) { + let an = null; + let Fr = null; + if (ct) { + xi = "" + xi; + } else { + const hl = o5t(xi, /^[\r\n\t ]+/); + Fr = hl && hl[0]; + } + if (fs === "application/xhtml+xml" && bi === Ei) { + xi = "" + xi + ""; + } + const Nl = S ? S.createHTML(xi) : xi; + if (bi === Ei) { + try { + an = new h().parseFromString(Nl, fs); + } catch {} + } + if (!an || !an.documentElement) { + an = k.createDocument(bi, "template", null); + try { + an.documentElement.innerHTML = ft ? x : Nl; + } catch {} + } + const Ja = an.body || an.documentElement; + if (xi && Fr) { + Ja.insertBefore(t.createTextNode(Fr), Ja.childNodes[0] || null); + } + if (bi === Ei) { + return P.call(an, Ni ? "html" : "body")[0]; + } else if (Ni) { + return an.documentElement; + } else { + return Ja; + } + }; + const Ic = function (xi) { + return E.call(xi.ownerDocument || xi, xi, c.SHOW_ELEMENT | c.SHOW_COMMENT | c.SHOW_TEXT | c.SHOW_PROCESSING_INSTRUCTION | c.SHOW_CDATA_SECTION, null); + }; + const Eu = function (xi) { + return xi instanceof d && (typeof xi.nodeName != "string" || typeof xi.textContent != "string" || typeof xi.removeChild != "function" || !(xi.attributes instanceof u) || typeof xi.removeAttribute != "function" || typeof xi.setAttribute != "function" || typeof xi.namespaceURI != "string" || typeof xi.insertBefore != "function" || typeof xi.hasChildNodes != "function"); + }; + const Pi = function (xi) { + return typeof a == "function" && xi instanceof a; + }; + const Ji = function (xi, an, Fr) { + if (L[xi]) { + Tfe(L[xi], Nl => { + Nl.call(e, an, Fr, Ke); + }); + } + }; + const vn = function (xi) { + let an = null; + Ji("beforeSanitizeElements", xi, null); + if (Eu(xi)) { + Us(xi); + return true; + } + const Fr = De(xi.nodeName); + Ji("uponSanitizeElement", xi, { + tagName: Fr, + allowedTags: ce + }); + if (xi.hasChildNodes() && !Pi(xi.firstElementChild) && mx(/<[/\w]/g, xi.innerHTML) && mx(/<[/\w]/g, xi.textContent) || xi.nodeType === ree.progressingInstruction || St && xi.nodeType === ree.comment && mx(/<[/\w]/g, xi.data)) { + Us(xi); + return true; + } + if (!ce[Fr] || et[Fr]) { + if (!et[Fr] && Jn(Fr) && (Ae.tagNameCheck instanceof RegExp && mx(Ae.tagNameCheck, Fr) || Ae.tagNameCheck instanceof Function && Ae.tagNameCheck(Fr))) { + return false; + } + if (vs && !tt[Fr]) { + const Nl = C(xi) || xi.parentNode; + const Ja = w(xi) || xi.childNodes; + if (Ja && Nl) { + const hl = Ja.length; + for (let Jl = hl - 1; Jl >= 0; --Jl) { + const zd = b(Ja[Jl], true); + zd.__removalCount = (xi.__removalCount || 0) + 1; + Nl.insertBefore(zd, y(xi)); + } + } + } + Us(xi); + return true; + } + if (xi instanceof l && !Ss(xi) || (Fr === "noscript" || Fr === "noembed" || Fr === "noframes") && mx(/<\/no(script|embed|frames)/i, xi.innerHTML)) { + Us(xi); + return true; + } else { + if (lt && xi.nodeType === ree.text) { + an = xi.textContent; + Tfe([F, O, U], Nl => { + an = see(an, Nl, " "); + }); + if (xi.textContent !== an) { + iee(e.removed, { + element: xi.cloneNode() + }); + xi.textContent = an; + } + } + Ji("afterSanitizeElements", xi, null); + return false; + } + }; + const hn = function (xi, an, Fr) { + if (Ye && (an === "id" || an === "name") && (Fr in t || Fr in Pt)) { + return false; + } + if (!Vt || !!_t[an] || !mx(j, an)) { + if (!Mi || !mx(ie, an)) { + if (!$e[an] || _t[an]) { + if ((!Jn(xi) || (!(Ae.tagNameCheck instanceof RegExp) || !mx(Ae.tagNameCheck, xi)) && (!(Ae.tagNameCheck instanceof Function) || !Ae.tagNameCheck(xi)) || (!(Ae.attributeNameCheck instanceof RegExp) || !mx(Ae.attributeNameCheck, an)) && (!(Ae.attributeNameCheck instanceof Function) || !Ae.attributeNameCheck(an))) && (an !== "is" || !Ae.allowCustomizedBuiltInElements || (!(Ae.tagNameCheck instanceof RegExp) || !mx(Ae.tagNameCheck, Fr)) && (!(Ae.tagNameCheck instanceof Function) || !Ae.tagNameCheck(Fr)))) { + return false; + } + } else if (!Zi[an]) { + if (!mx(ge, see(Fr, ne, ""))) { + if (an !== "src" && an !== "xlink:href" && an !== "href" || xi === "script" || pzi(Fr, "data:") !== 0 || !_e[xi]) { + if (!li || !!mx(ee, see(Fr, ne, ""))) { + if (Fr) { + return false; + } + } + } + } + } + } + } + return true; + }; + const Jn = function (xi) { + return xi !== "annotation-xml" && o5t(xi, be); + }; + const ka = function (xi) { + Ji("beforeSanitizeAttributes", xi, null); + const { + attributes: an + } = xi; + if (!an) { + return; + } + const Fr = { + attrName: "", + attrValue: "", + keepAttr: true, + allowedAttributes: $e + }; + let Nl = an.length; + while (Nl--) { + const Ja = an[Nl]; + const { + name: hl, + namespaceURI: Jl, + value: zd + } = Ja; + const Mc = De(hl); + let ci = hl === "value" ? zd : mzi(zd); + Fr.attrName = Mc; + Fr.attrValue = ci; + Fr.keepAttr = true; + Fr.forceKeepAttr = undefined; + Ji("uponSanitizeAttribute", xi, Fr); + ci = Fr.attrValue; + if (Fr.forceKeepAttr || (hr(hl, xi), !Fr.keepAttr)) { + continue; + } + if (!wi && mx(/\/>/i, ci)) { + hr(hl, xi); + continue; + } + if (lt) { + Tfe([F, O, U], hi => { + ci = see(ci, hi, " "); + }); + } + const ms = De(xi.nodeName); + if (hn(ms, Mc, ci)) { + if ($t && (Mc === "id" || Mc === "name")) { + hr(hl, xi); + ci = di + ci; + } + if (St && mx(/((--!?|])>)|<\/(style|title)/i, ci)) { + hr(hl, xi); + continue; + } + if (S && typeof g == "object" && typeof g.getAttributeType == "function" && !Jl) { + switch (g.getAttributeType(ms, Mc)) { + case "TrustedHTML": + { + ci = S.createHTML(ci); + break; + } + case "TrustedScriptURL": + { + ci = S.createScriptURL(ci); + break; + } + } + } + try { + if (Jl) { + xi.setAttributeNS(Jl, hl, ci); + } else { + xi.setAttribute(hl, ci); + } + if (Eu(xi)) { + Us(xi); + } else { + r5t(e.removed); + } + } catch {} + } + } + Ji("afterSanitizeAttributes", xi, null); + }; + const Ao = function on(xi) { + let an = null; + const Fr = Ic(xi); + for (Ji("beforeSanitizeShadowDOM", xi, null); an = Fr.nextNode();) { + Ji("uponSanitizeShadowNode", an, null); + if (!vn(an)) { + if (an.content instanceof r) { + on(an.content); + } + ka(an); + } + } + Ji("afterSanitizeShadowDOM", xi, null); + }; + e.sanitize = function (on, xi = {}) { + let an = null; + let Fr = null; + let Nl = null; + let Ja = null; + ft = !on; + if (ft) { + on = ""; + } + if (typeof on != "string" && !Pi(on)) { + if (typeof on.toString == "function") { + on = on.toString(); + if (typeof on != "string") { + throw nee("dirty is not a string, aborting"); + } + } else { + throw nee("toString is not a function"); + } + } + if (!e.isSupported) { + return on; + } + if (!Di) { + qs(xi); + } + e.removed = []; + if (typeof on == "string") { + bs = false; + } + if (bs) { + if (on.nodeName) { + const zd = De(on.nodeName); + if (!ce[zd] || et[zd]) { + throw nee("root node is forbidden and cannot be sanitized in-place"); + } + } + } else if (on instanceof a) { + an = Vo(""); + Fr = an.ownerDocument.importNode(on, true); + if (Fr.nodeType === ree.element && Fr.nodeName === "BODY" || Fr.nodeName === "HTML") { + an = Fr; + } else { + an.appendChild(Fr); + } + } else { + if (!ze && !lt && !Ni && on.indexOf("<") === -1) { + if (S && pi) { + return S.createHTML(on); + } else { + return on; + } + } + an = Vo(on); + if (!an) { + if (ze) { + return null; + } else if (pi) { + return x; + } else { + return ""; + } + } + } + if (an && ct) { + Us(an.firstChild); + } + const hl = Ic(bs ? on : an); + while (Nl = hl.nextNode()) { + if (!vn(Nl)) { + if (Nl.content instanceof r) { + Ao(Nl.content); + } + ka(Nl); + } + } + if (bs) { + return on; + } + if (ze) { + if (Dt) { + for (Ja = D.call(an.ownerDocument); an.firstChild;) { + Ja.appendChild(an.firstChild); + } + } else { + Ja = an; + } + if ($e.shadowroot || $e.shadowrootmode) { + Ja = R.call(s, Ja, true); + } + return Ja; + } + let Jl = Ni ? an.outerHTML : an.innerHTML; + if (Ni && ce["!doctype"] && an.ownerDocument && an.ownerDocument.doctype && an.ownerDocument.doctype.name && mx(h5t, an.ownerDocument.doctype.name)) { + Jl = `${" +${Jl}`; + } + if (lt) { + Tfe([F, O, U], zd => { + Jl = see(Jl, zd, " "); + }); + } + if (S && pi) { + return S.createHTML(Jl); + } else { + return Jl; + } + }; + e.setConfig = function (on = {}) { + qs(on); + Di = true; + }; + e.clearConfig = function () { + Ke = null; + Di = false; + }; + e.isValidAttribute = function (on, xi, an) { + if (!Ke) { + qs({}); + } + const Fr = De(on); + const Nl = De(xi); + return hn(Fr, Nl, an); + }; + e.addHook = function (on, xi) { + if (typeof xi == "function") { + L[on] = L[on] || []; + iee(L[on], xi); + } + }; + e.removeHook = function (on) { + if (L[on]) { + return r5t(L[on]); + } + }; + e.removeHooks = function (on) { + L[on] &&= []; + }; + e.removeAllHooks = function () { + L = {}; + }; + return e; +} +var i5t; +var s5t; +var hzi; +var fzi; +var gzi; +var px; +var xT; +var n5t; +var trt; +var irt; +var Tfe; +var r5t; +var iee; +var Pfe; +var srt; +var o5t; +var see; +var pzi; +var mzi; +var FL; +var mx; +var nee; +var a5t; +var nrt; +var rrt; +var bzi; +var ort; +var vzi; +var l5t; +var c5t; +var art; +var u5t; +var Lfe; +var yzi; +var wzi; +var Czi; +var Szi; +var xzi; +var d5t; +var kzi; +var Ezi; +var h5t; +var Izi; +var f5t; +var ree; +var Dzi; +var Tzi; +var H2; +var Rfe = ue({ + "out-build/vs/base/browser/dompurify/dompurify.js"() { + "use strict"; + + ({ + entries: i5t, + setPrototypeOf: s5t, + isFrozen: hzi, + getPrototypeOf: fzi, + getOwnPropertyDescriptor: gzi + } = Object); + ({ + freeze: px, + seal: xT, + create: n5t + } = Object); + ({ + apply: trt, + construct: irt + } = typeof Reflect !== "undefined" && Reflect); + px ||= function (e) { + return e; + }; + xT ||= function (e) { + return e; + }; + trt ||= function (e, t, s) { + return e.apply(t, s); + }; + irt ||= function (e, t) { + return new e(...t); + }; + Tfe = ST(Array.prototype.forEach); + r5t = ST(Array.prototype.pop); + iee = ST(Array.prototype.push); + Pfe = ST(String.prototype.toLowerCase); + srt = ST(String.prototype.toString); + o5t = ST(String.prototype.match); + see = ST(String.prototype.replace); + pzi = ST(String.prototype.indexOf); + mzi = ST(String.prototype.trim); + FL = ST(Object.prototype.hasOwnProperty); + mx = ST(RegExp.prototype.test); + nee = $Hn(TypeError); + a5t = px(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "section", "select", "shadow", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]); + nrt = px(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]); + rrt = px(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]); + bzi = px(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]); + ort = px(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]); + vzi = px(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]); + l5t = px(["#text"]); + c5t = px(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]); + art = px(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]); + u5t = px(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]); + Lfe = px(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]); + yzi = xT(/\{\{[\w\W]*|[\w\W]*\}\}/gm); + wzi = xT(/<%[\w\W]*|[\w\W]*%>/gm); + Czi = xT(/\${[\w\W]*}/gm); + Szi = xT(/^data-[\-\w.\u00B7-\uFFFF]/); + xzi = xT(/^aria-[\-\w]+$/); + d5t = xT(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i); + kzi = xT(/^(?:\w+script|data):/i); + Ezi = xT(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g); + h5t = xT(/^html$/i); + Izi = xT(/^[a-z][.\w]*(-[.\w]+)+$/i); + f5t = Object.freeze({ + __proto__: null, + MUSTACHE_EXPR: yzi, + ERB_EXPR: wzi, + TMPLIT_EXPR: Czi, + DATA_ATTR: Szi, + ARIA_ATTR: xzi, + IS_ALLOWED_URI: d5t, + IS_SCRIPT_OR_DATA: kzi, + ATTR_WHITESPACE: Ezi, + DOCTYPE_NAME: h5t, + CUSTOM_ELEMENT: Izi + }); + ree = { + element: 1, + attribute: 2, + text: 3, + cdataSection: 4, + entityReference: 5, + entityNode: 6, + progressingInstruction: 7, + comment: 8, + document: 9, + documentType: 10, + documentFragment: 11, + notation: 12 + }; + Dzi = function () { + if (typeof window === "undefined") { + return null; + } else { + return window; + } + }; + Tzi = function (e, t) { + if (typeof e != "object" || typeof e.createPolicy != "function") { + return null; + } + let s = null; + const n = "data-tt-policy-suffix"; + if (t && t.hasAttribute(n)) { + s = t.getAttribute(n); + } + const r = "dompurify" + (s ? "#" + s : ""); + try { + return e.createPolicy(r, { + createHTML(o) { + return o; + }, + createScriptURL(o) { + return o; + } + }); + } catch { + console.warn("TrustedTypes policy " + r + " could not be created."); + return null; + } + }; + H2 = dzi(); + } +}); +function oee(i) { + const e = i; + if (e) { + return [e.on, e.pause, e.resume, e.destroy].every(t => typeof t == "function"); + } else { + return false; + } +} +function g5t(i) { + const e = i; + if (e) { + return oee(e.stream) && Array.isArray(e.buffer) && typeof e.ended == "boolean"; + } else { + return false; + } +} +function q2(i, e) { + return new Lzi(i, e); +} +function OHn(i, e) { + const t = []; + let s; + while ((s = i.read()) !== null) { + t.push(s); + } + return e(t); +} +function _Hn(i, e, t) { + const s = []; + let n; + while ((n = i.read()) !== null && s.length < t) { + s.push(n); + } + if (n === null && s.length > 0) { + return e(s); + } else { + return { + read: () => { + if (s.length > 0) { + return s.shift(); + } + if (typeof n !== "undefined") { + const r = n; + n = undefined; + return r; + } + return i.read(); + } + }; + } +} +function lrt(i, e) { + return new Promise((t, s) => { + const n = []; + Yq(i, { + onData: r => { + if (e) { + n.push(r); + } + }, + onError: r => { + if (e) { + s(r); + } else { + t(undefined); + } + }, + onEnd: () => { + t(e ? e(n) : undefined); + } + }); + }); +} +function Yq(i, e, t) { + i.on("error", s => { + if (!t?.isCancellationRequested) { + e.onError(s); + } + }); + i.on("end", () => { + if (!t?.isCancellationRequested) { + e.onEnd(); + } + }); + i.on("data", s => { + if (!t?.isCancellationRequested) { + e.onData(s); + } + }); +} +function Pzi(i, e) { + return new Promise((t, s) => { + const n = new Q(); + const r = []; + const o = c => { + r.push(c); + if (r.length > e) { + n.dispose(); + i.pause(); + return t({ + stream: i, + buffer: r, + ended: false + }); + } + }; + const a = c => { + n.dispose(); + return s(c); + }; + const l = () => { + n.dispose(); + return t({ + stream: i, + buffer: r, + ended: true + }); + }; + n.add(Ue(() => i.removeListener("error", a))); + i.on("error", a); + n.add(Ue(() => i.removeListener("end", l))); + i.on("end", l); + n.add(Ue(() => i.removeListener("data", o))); + i.on("data", o); + }); +} +function BHn(i, e) { + const t = q2(e); + t.end(i); + return t; +} +function UHn() { + const i = q2(() => { + throw new Error("not supported"); + }); + i.end(); + return i; +} +function WHn(i) { + let e = false; + return { + read: () => e ? null : (e = true, i) + }; +} +function VHn(i, e, t) { + const s = q2(t); + Yq(i, { + onData: n => s.write(e.data(n)), + onError: n => s.error(e.error ? e.error(n) : n), + onEnd: () => s.end() + }); + return s; +} +function HHn(i, e, t) { + let s = false; + return { + read: () => { + const n = e.read(); + if (s) { + return n; + } else { + s = true; + if (n !== null) { + return t([i, n]); + } else { + return i; + } + } + } + }; +} +function qHn(i, e, t) { + let s = false; + const n = q2(t); + Yq(e, { + onData: r => s ? n.write(r) : (s = true, n.write(t([i, r]))), + onError: r => n.error(r), + onEnd: () => { + if (!s) { + s = true; + n.write(i); + } + n.end(); + } + }); + return n; +} +var Lzi; +var OL = ue({ + "out-build/vs/base/common/stream.js"() { + "use strict"; + + Ut(); + q(); + Lzi = class { + constructor(i, e) { + this.e = i; + this.f = e; + this.a = { + flowing: false, + ended: false, + destroyed: false + }; + this.b = { + data: [], + error: [] + }; + this.c = { + data: [], + error: [], + end: [] + }; + this.d = []; + } + pause() { + if (!this.a.destroyed) { + this.a.flowing = false; + } + } + resume() { + if (!this.a.destroyed && !this.a.flowing) { + this.a.flowing = true; + this.j(); + this.k(); + this.l(); + } + } + write(i) { + if (!this.a.destroyed) { + if (this.a.flowing) { + this.g(i); + } else { + this.b.data.push(i); + if (typeof this.f?.highWaterMark == "number" && this.b.data.length > this.f.highWaterMark) { + return new Promise(e => this.d.push(e)); + } + } + } + } + error(i) { + if (!this.a.destroyed) { + if (this.a.flowing) { + this.h(i); + } else { + this.b.error.push(i); + } + } + } + end(i) { + if (!this.a.destroyed) { + if (typeof i !== "undefined") { + this.write(i); + } + if (this.a.flowing) { + this.i(); + this.destroy(); + } else { + this.a.ended = true; + } + } + } + g(i) { + this.c.data.slice(0).forEach(e => e(i)); + } + h(i) { + if (this.c.error.length === 0) { + xs(i); + } else { + this.c.error.slice(0).forEach(e => e(i)); + } + } + i() { + this.c.end.slice(0).forEach(i => i()); + } + on(i, e) { + if (!this.a.destroyed) { + switch (i) { + case "data": + this.c.data.push(e); + this.resume(); + break; + case "end": + this.c.end.push(e); + if (this.a.flowing && this.l()) { + this.destroy(); + } + break; + case "error": + this.c.error.push(e); + if (this.a.flowing) { + this.k(); + } + break; + } + } + } + removeListener(i, e) { + if (this.a.destroyed) { + return; + } + let t; + switch (i) { + case "data": + t = this.c.data; + break; + case "end": + t = this.c.end; + break; + case "error": + t = this.c.error; + break; + } + if (t) { + const s = t.indexOf(e); + if (s >= 0) { + t.splice(s, 1); + } + } + } + j() { + if (this.b.data.length > 0) { + const i = this.e(this.b.data); + this.g(i); + this.b.data.length = 0; + const e = [...this.d]; + this.d.length = 0; + e.forEach(t => t()); + } + } + k() { + if (this.c.error.length > 0) { + for (const i of this.b.error) { + this.h(i); + } + this.b.error.length = 0; + } + } + l() { + if (this.a.ended) { + this.i(); + return this.c.end.length > 0; + } else { + return false; + } + } + destroy() { + if (!this.a.destroyed) { + this.a.destroyed = true; + this.a.ended = true; + this.b.data.length = 0; + this.b.error.length = 0; + this.c.data.length = 0; + this.c.error.length = 0; + this.c.end.length = 0; + this.d.length = 0; + } + } + }; + } +}); +function jHn(i, e, t = 0) { + const s = e.byteLength; + const n = i.byteLength; + if (s === 0) { + return 0; + } + if (s === 1) { + return i.indexOf(e[0]); + } + if (s > n - t) { + return -1; + } + const r = Mzi.value; + r.fill(e.length); + for (let c = 0; c < e.length; c++) { + r[e[c]] = e.length - c - 1; + } + let o = t + e.length - 1; + let a = o; + let l = -1; + while (o < n) { + if (i[o] === e[a]) { + if (a === 0) { + l = o; + break; + } + o--; + a--; + } else { + o += Math.max(e.length - a, r[i[o]]); + a = e.length - 1; + } + } + return l; +} +function zHn(i, e) { + return i[e + 0] << 0 >>> 0 | i[e + 1] << 8 >>> 0; +} +function JHn(i, e, t) { + i[t + 0] = e & 255; + e = e >>> 8; + i[t + 1] = e & 255; +} +function bx(i, e) { + return i[e] * 16777216 + i[e + 1] * 65536 + i[e + 2] * 256 + i[e + 3]; +} +function vx(i, e, t) { + i[t + 3] = e; + e = e >>> 8; + i[t + 2] = e; + e = e >>> 8; + i[t + 1] = e; + e = e >>> 8; + i[t] = e; +} +function GHn(i, e) { + return i[e + 0] << 0 >>> 0 | i[e + 1] << 8 >>> 0 | i[e + 2] << 16 >>> 0 | i[e + 3] << 24 >>> 0; +} +function KHn(i, e, t) { + i[t + 0] = e & 255; + e = e >>> 8; + i[t + 1] = e & 255; + e = e >>> 8; + i[t + 2] = e & 255; + e = e >>> 8; + i[t + 3] = e & 255; +} +function p5t(i, e) { + return i[e]; +} +function m5t(i, e, t) { + i[t] = e; +} +function Rzi(i) { + return OHn(i, e => Ii.concat(e)); +} +function crt(i) { + return WHn(i); +} +function kT(i) { + return lrt(i, e => Ii.concat(e)); +} +async function YHn(i) { + if (i.ended) { + return Ii.concat(i.buffer); + } else { + return Ii.concat([...i.buffer, await kT(i.stream)]); + } +} +function UB(i) { + return BHn(i, e => Ii.concat(e)); +} +function b5t(i) { + return q2(e => Ii.concat(e), i); +} +function XHn(i, e) { + return HHn(i, e, t => Ii.concat(t)); +} +function Nzi(i, e) { + return qHn(i, e, t => Ii.concat(t)); +} +function Xq(i) { + let e = 0; + let t = 0; + let s = 0; + const n = new Uint8Array(Math.floor(i.length / 4 * 3)); + const r = a => { + switch (t) { + case 3: + n[s++] = e | a; + t = 0; + break; + case 2: + n[s++] = e | a >>> 2; + e = a << 6; + t = 3; + break; + case 1: + n[s++] = e | a >>> 4; + e = a << 4; + t = 2; + break; + default: + e = a << 2; + t = 1; + } + }; + for (let a = 0; a < i.length; a++) { + const l = i.charCodeAt(a); + if (l >= 65 && l <= 90) { + r(l - 65); + } else if (l >= 97 && l <= 122) { + r(l - 97 + 26); + } else if (l >= 48 && l <= 57) { + r(l - 48 + 52); + } else if (l === 43 || l === 45) { + r(62); + } else if (l === 47 || l === 95) { + r(63); + } else { + if (l === 61) { + break; + } + throw new SyntaxError(`Unexpected base64 character ${i[a]}`); + } + } + const o = s; + while (t > 0) { + r(0); + } + return Ii.wrap(n).slice(0, o); +} +function aee(i) { + const e = i.split(".")[1]; + const t = Xq(e); + return JSON.parse(t.toString()); +} +function ET({ + buffer: i +}, e = true, t = false) { + const s = t ? $zi : Azi; + let n = ""; + const r = i.byteLength % 3; + let o = 0; + for (; o < i.byteLength - r; o += 3) { + const a = i[o + 0]; + const l = i[o + 1]; + const c = i[o + 2]; + n += s[a >>> 2]; + n += s[(a << 4 | l >>> 4) & 63]; + n += s[(l << 2 | c >>> 6) & 63]; + n += s[c & 63]; + } + if (r === 1) { + const a = i[o + 0]; + n += s[a >>> 2]; + n += s[a << 4 & 63]; + if (e) { + n += "=="; + } + } else if (r === 2) { + const a = i[o + 0]; + const l = i[o + 1]; + n += s[a >>> 2]; + n += s[(a << 4 | l >>> 4) & 63]; + n += s[l << 2 & 63]; + if (e) { + n += "="; + } + } + return n; +} +var Nfe; +var Mzi; +var v5t; +var y5t; +var Ii; +var Azi; +var $zi; +var nr = ue({ + "out-build/vs/base/common/buffer.js"() { + "use strict"; + + pu(); + OL(); + Nfe = typeof Buffer !== "undefined"; + Mzi = new ol(() => new Uint8Array(256)); + Ii = class ZN { + static alloc(e) { + if (Nfe) { + return new ZN(Buffer.allocUnsafe(e)); + } else { + return new ZN(new Uint8Array(e)); + } + } + static wrap(e) { + if (Nfe && !Buffer.isBuffer(e)) { + e = Buffer.from(e.buffer, e.byteOffset, e.byteLength); + } + return new ZN(e); + } + static fromString(e, t) { + if (!t?.dontUseNodeBuffer && !false && Nfe) { + return new ZN(Buffer.from(e)); + } else { + v5t ||= new TextEncoder(); + return new ZN(v5t.encode(e)); + } + } + static fromByteArray(e) { + const t = ZN.alloc(e.length); + for (let s = 0, n = e.length; s < n; s++) { + t.buffer[s] = e[s]; + } + return t; + } + static concat(e, t) { + if (typeof t === "undefined") { + t = 0; + for (let r = 0, o = e.length; r < o; r++) { + t += e[r].byteLength; + } + } + const s = ZN.alloc(t); + let n = 0; + for (let r = 0, o = e.length; r < o; r++) { + const a = e[r]; + s.set(a, n); + n += a.byteLength; + } + return s; + } + constructor(e) { + this.buffer = e; + this.byteLength = this.buffer.byteLength; + } + clone() { + const e = ZN.alloc(this.byteLength); + e.set(this); + return e; + } + toString() { + if (Nfe) { + return this.buffer.toString(); + } else { + y5t ||= new TextDecoder(); + return y5t.decode(this.buffer); + } + } + slice(e, t) { + return new ZN(this.buffer.subarray(e, t)); + } + set(e, t) { + if (e instanceof ZN) { + this.buffer.set(e.buffer, t); + } else if (e instanceof Uint8Array) { + this.buffer.set(e, t); + } else if (e instanceof ArrayBuffer) { + this.buffer.set(new Uint8Array(e), t); + } else if (ArrayBuffer.isView(e)) { + this.buffer.set(new Uint8Array(e.buffer, e.byteOffset, e.byteLength), t); + } else { + throw new Error("Unknown argument 'array'"); + } + } + readUInt32BE(e) { + return bx(this.buffer, e); + } + writeUInt32BE(e, t) { + vx(this.buffer, e, t); + } + readUInt32LE(e) { + return GHn(this.buffer, e); + } + writeUInt32LE(e, t) { + KHn(this.buffer, e, t); + } + readUInt8(e) { + return p5t(this.buffer, e); + } + writeUInt8(e, t) { + m5t(this.buffer, e, t); + } + indexOf(e, t = 0) { + return jHn(this.buffer, e instanceof ZN ? e.buffer : e, t); + } + }; + Azi = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + $zi = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"; + } +}); +function Qc(i) { + return urt(i, 0); +} +function urt(i, e) { + switch (typeof i) { + case "object": + if (i === null) { + return WB(349, e); + } else if (Array.isArray(i)) { + return ZHn(i, e); + } else { + return eqn(i, e); + } + case "string": + return drt(i, e); + case "boolean": + return QHn(i, e); + case "number": + return WB(i, e); + case "undefined": + return WB(937, e); + default: + return WB(617, e); + } +} +function WB(i, e) { + return (e << 5) - e + i | 0; +} +function QHn(i, e) { + return WB(i ? 433 : 863, e); +} +function drt(i, e) { + e = WB(149417, e); + for (let t = 0, s = i.length; t < s; t++) { + e = WB(i.charCodeAt(t), e); + } + return e; +} +function ZHn(i, e) { + e = WB(104579, e); + return i.reduce((t, s) => urt(s, t), e); +} +function eqn(i, e) { + e = WB(181387, e); + return Object.keys(i).sort().reduce((t, s) => { + t = drt(s, t); + return urt(i[s], t); + }, e); +} +function w5t(i, e, t = 32) { + const s = t - e; + const n = ~((1 << s) - 1); + return (i << e | (n & i) >>> s) >>> 0; +} +function u9(i, e = 32) { + if (i instanceof ArrayBuffer) { + return Array.from(new Uint8Array(i)).map(t => t.toString(16).padStart(2, "0")).join(""); + } else { + return (i >>> 0).toString(16).padStart(e / 4, "0"); + } +} +async function hrt(i) { + if (globalThis?.crypto?.subtle) { + const e = Ii.fromString(i, { + dontUseNodeBuffer: true + }).buffer; + const t = await globalThis.crypto.subtle.digest({ + name: "sha-1" + }, e); + return u9(t); + } else { + const e = new j2(); + e.update(i); + return e.digest(); + } +} +async function lee(i) { + const t = new TextEncoder().encode(i); + const s = await crypto.subtle.digest("SHA-256", t); + return u9(s); +} +var Mfe; +var Fzi; +var j2; +var Gl = ue({ + "out-build/vs/base/common/hash.js"() { + "use strict"; + + nr(); + $i(); + Mfe = i => { + if (typeof i == "string" && i.length < 250) { + const t = new j2(); + t.update(i); + return Promise.resolve(t.digest()); + } + let e; + if (typeof i == "string") { + e = new TextEncoder().encode(i); + } else if (i instanceof Ii) { + e = i.buffer; + } else { + e = i; + } + return crypto.subtle.digest("sha-1", e).then(u9); + }; + (function (i) { + i[i.BLOCK_SIZE = 64] = "BLOCK_SIZE"; + i[i.UNICODE_REPLACEMENT = 65533] = "UNICODE_REPLACEMENT"; + })(Fzi ||= {}); + j2 = class rFn { + static { + this.g = new DataView(new ArrayBuffer(320)); + } + constructor() { + this.h = 1732584193; + this.l = 4023233417; + this.m = 2562383102; + this.n = 271733878; + this.o = 3285377520; + this.p = new Uint8Array(67); + this.q = new DataView(this.p.buffer); + this.r = 0; + this.t = 0; + this.u = 0; + this.v = false; + } + update(e) { + const t = e.length; + if (t === 0) { + return; + } + const s = this.p; + let n = this.r; + let r = this.u; + let o; + let a; + for (r !== 0 ? (o = r, a = -1, r = 0) : (o = e.charCodeAt(0), a = 0);;) { + let l = o; + if (jb(o)) { + if (a + 1 < t) { + const c = e.charCodeAt(a + 1); + if (_q(c)) { + a++; + l = w4t(o, c); + } else { + l = 65533; + } + } else { + r = o; + break; + } + } else if (_q(o)) { + l = 65533; + } + n = this.w(s, n, l); + a++; + if (a < t) { + o = e.charCodeAt(a); + } else { + break; + } + } + this.r = n; + this.u = r; + } + w(e, t, s) { + if (s < 128) { + e[t++] = s; + } else if (s < 2048) { + e[t++] = (s & 1984) >>> 6 | 192; + e[t++] = (s & 63) >>> 0 | 128; + } else if (s < 65536) { + e[t++] = (s & 61440) >>> 12 | 224; + e[t++] = (s & 4032) >>> 6 | 128; + e[t++] = (s & 63) >>> 0 | 128; + } else { + e[t++] = (s & 1835008) >>> 18 | 240; + e[t++] = (s & 258048) >>> 12 | 128; + e[t++] = (s & 4032) >>> 6 | 128; + e[t++] = (s & 63) >>> 0 | 128; + } + if (t >= 64) { + this.y(); + t -= 64; + this.t += 64; + e[0] = e[64]; + e[1] = e[65]; + e[2] = e[66]; + } + return t; + } + digest() { + if (!this.v) { + this.v = true; + if (this.u) { + this.u = 0; + this.r = this.w(this.p, this.r, 65533); + } + this.t += this.r; + this.x(); + } + return u9(this.h) + u9(this.l) + u9(this.m) + u9(this.n) + u9(this.o); + } + x() { + this.p[this.r++] = 128; + this.p.subarray(this.r).fill(0); + if (this.r > 56) { + this.y(); + this.p.fill(0); + } + const e = this.t * 8; + this.q.setUint32(56, Math.floor(e / 4294967296), false); + this.q.setUint32(60, e % 4294967296, false); + this.y(); + } + y() { + const e = rFn.g; + const t = this.q; + for (let d = 0; d < 64; d += 4) { + e.setUint32(d, t.getUint32(d, false), false); + } + for (let d = 64; d < 320; d += 4) { + e.setUint32(d, w5t(e.getUint32(d - 12, false) ^ e.getUint32(d - 32, false) ^ e.getUint32(d - 56, false) ^ e.getUint32(d - 64, false), 1), false); + } + let s = this.h; + let n = this.l; + let r = this.m; + let o = this.n; + let a = this.o; + let l; + let c; + let u; + for (let d = 0; d < 80; d++) { + if (d < 20) { + l = n & r | ~n & o; + c = 1518500249; + } else if (d < 40) { + l = n ^ r ^ o; + c = 1859775393; + } else if (d < 60) { + l = n & r | n & o | r & o; + c = 2400959708; + } else { + l = n ^ r ^ o; + c = 3395469782; + } + u = w5t(s, 5) + l + a + c + e.getUint32(d * 4, false) & -1; + a = o; + o = r; + r = w5t(n, 30); + n = s; + s = u; + } + this.h = this.h + s & -1; + this.l = this.l + n & -1; + this.m = this.m + r & -1; + this.n = this.n + o & -1; + this.o = this.o + a & -1; + } + }; + } +}); +function yc(i, e, t) { + return Math.min(Math.max(i, e), t); +} +function Qq(i, e) { + return (e + i % e) % e; +} +function tqn(i, e, t, s, n, r, o, a) { + const l = o - t; + const c = a - s; + const u = n - t; + const d = r - s; + const h = i - t; + const g = e - s; + const p = l * l + c * c; + const b = l * u + c * d; + const v = l * h + c * g; + const y = u * u + d * d; + const w = u * h + d * g; + const C = 1 / (p * y - b * b); + const S = (y * v - b * w) * C; + const x = (p * w - b * v) * C; + return S >= 0 && x >= 0 && S + x < 1; +} +var Afe; +var Ozi; +var Xf = ue({ + "out-build/vs/base/common/numbers.js"() { + "use strict"; + + Afe = class { + constructor() { + this.a = 1; + this.b = 0; + } + update(i) { + this.b = this.b + (i - this.b) / this.a; + this.a += 1; + return this.b; + } + get value() { + return this.b; + } + }; + Ozi = class { + constructor(i) { + this.a = 0; + this.b = 0; + this.c = []; + this.d = 0; + this.e = 0; + this.c = new Array(i); + this.c.fill(0, 0, i); + } + update(i) { + const e = this.c[this.d]; + this.c[this.d] = i; + this.d = (this.d + 1) % this.c.length; + this.e -= e; + this.e += i; + if (this.a < this.c.length) { + this.a += 1; + } + this.b = this.e / this.a; + return this.b; + } + get value() { + return this.b; + } + }; + } +}); +var _zi; +var Bzi; +var IT; +var C5t; +var S5t; +var Uzi; +var z2; +var Wzi; +var x5t; +var Vzi; +var Hzi; +var qzi; +var J2; +var $fe; +var k5t; +var Ffe; +var jzi; +var E5t; +var Ofe; +var _fe; +var I5t; +var D5t; +var T5t; +var Pw; +var frt; +var P5t; +var VB; +var grt; +var L5t; +var R5t; +var zzi; +var N5t; +var Jzi; +var prt; +var M5t; +var Bfe; +var mrt; +var cee; +var A5t; +var Ufe; +var Wfe; +var Gzi; +var $5t; +var Kzi; +var Yzi; +var hM; +var Vfe; +var Xzi; +var brt; +var G2; +var uee; +var dee; +var Hfe; +var vrt; +var qfe; +var F5t; +var Qzi; +var O5t; +var yrt; +var wrt; +var _5t; +var hee; +var Crt; +var Srt; +var fee; +var xrt; +var B5t; +var jfe; +var HB; +var U5t; +var W5t; +var zfe; +var krt; +var Zzi; +var Ert; +var eJi; +var tJi; +var iJi; +var sJi; +var V5t; +var nJi; +var rJi; +var H5t; +var q5t; +var oJi; +var Jfe; +var j5t; +var Gfe; +var z5t; +var aJi; +var lJi; +var cJi; +var uJi; +var J5t; +var G5t; +var Irt; +var K5t; +var dJi; +var Y5t; +var Drt; +var gee; +var Kfe; +var iqn; +var X5t; +var sqn; +var hJi; +var Q5t; +var Yfe; +var Xfe; +var Lw; +var pee; +var fJi; +var gJi; +var Trt; +var Z5t; +var Prt; +var fM; +var e6t; +var Lrt; +var Qfe; +var Zfe; +var d9; +var t6t; +var i6t; +var s6t; +var n6t; +var Rrt; +var ege; +var r6t; +var o6t; +var Nrt; +var a6t; +var l6t; +var c6t; +var u6t; +var pJi; +var tge; +var mee; +var ige; +var d6t; +var Mrt; +var bee; +var vee; +var h6t; +var f6t; +var mJi; +var sge; +var Pn = ue({ + "out-build/vs/base/common/constants.js"() { + "use strict"; + + _zi = "editor.action.marker.next"; + Bzi = "editor.action.marker.this"; + IT = "hi@cursor.com"; + C5t = 420; + S5t = 320; + Uzi = "aichat.doAdvancedCodebaseQuery"; + z2 = "workbench.view.backgroundAgent"; + Wzi = "marker-decoration"; + x5t = "aichat.action.goToDefinitionFromChatResponse"; + Vzi = "XYZ"; + Hzi = "cursor.execterminalaction"; + qzi = 1000000; + J2 = "composer.createNew"; + $fe = "composer.createNewWithPrevContext"; + k5t = "cursorai.action.setQueryOnlyIndex"; + Ffe = "workbench.contrib.onboarding.browser.gettingStarted.contribution.ts.firsttime"; + jzi = "workbench.contrib.onboarding.browser.changeManagement.03122025.shown"; + E5t = "workbench.contrib.onboarding.browser.changeManagement.03262025.shown"; + Ofe = "workbench.contrib.onboarding.browser.changeManagement.05052025.shown"; + _fe = "workbench.contrib.onboarding.browser.changePopup.03292025.shown"; + I5t = "workbench.contrib.onboarding.browser.changeRemainingCmdBackspaceKeybindings.04012025.shown"; + D5t = "cursor.showTooltipActionId"; + T5t = "tooltip.close.register"; + Pw = "aiSettings.action.open"; + frt = "cursor.preferNotificationsSameAsChat"; + P5t = Date.now(); + VB = { + parentWindowId: undefined, + parentWindowDimensions: undefined + }; + grt = { + isBcIdWindow: false + }; + L5t = 15; + R5t = "all-extensions-"; + zzi = i => { + if (!i) { + return L5t; + } + const e = /destroy-after-(\d+)-minutes/; + const t = i.match(e); + if (t) { + return parseInt(t[1], 10); + } else { + return L5t; + } + }; + N5t = ["vscode.bat", "vscode.clojure", "vscode.coffeescript", "vscode.configuration-editing", "vscode.cpp", "vscode.csharp", "vscode.css", "vscode.css-language-features", "vscode.dart", "vscode.diff", "vscode.docker", "vscode.fsharp", "vscode.go", "vscode.groovy", "vscode.handlebars", "vscode.hlsl", "vscode.html", "vscode.html-language-features", "vscode.ini", "vscode.ipynb", "vscode.java", "vscode.javascript", "vscode.json", "vscode.json-language-features", "vscode.julia", "vscode.latex", "vscode.less", "vscode.log", "vscode.lua", "vscode.make", "vscode.markdown", "vscode.notebook-renderers", "vscode.objective-c", "vscode.ocaml", "vscode.perl", "vscode.php", "vscode.php-language-features", "vscode.powershell", "vscode.pug", "vscode.python", "vscode.r", "vscode.razor", "vscode.restructuredtext", "vscode.ruby", "vscode.rust", "vscode.scss", "vscode.shaderlab", "vscode.shellscript", "vscode.sql", "vscode.swift", "vscode.typescript", "vscode.typescript-language-features", "vscode.vb", "vscode.xml", "vscode.yaml", "ms-python.python", "ms-python.vscode-pylance", "golang.go", "Prisma.prisma", "dbaeumer.vscode-eslint", "charliermarsh.ruff", "anysphere.cursor-shadow-workspace"]; + Jzi = "aiSettings.action.toggleModel"; + prt = "cursorai.action.switchToModel"; + M5t = "cursorai.action.addModelToSwitcher"; + Bfe = "cursorai.action.generateInTerminal"; + mrt = "cursorai.action.hideGenerateInTerminal"; + cee = "cursorai.action.cancelGenerateInTerminal"; + A5t = "cursorai.action.acceptGenerateInTerminal"; + Ufe = "cursorai.action.acceptAndRunGenerateInTerminal"; + Wfe = "cursorai.action.rejectGenerateInTerminal"; + Gzi = "cursorai.action.windowInWindowDidShow"; + $5t = "cursorai.action.windowInWindowSetZoomLevel"; + Kzi = "aipopup.action.createInBackground"; + Yzi = "aipopup.action.addContextToBackgroundForCmdK"; + hM = "aipopup.action.focusEdit"; + Vfe = "aipopup.action.cmdKRemoveFollowup"; + Xzi = "cursor.chat.smoothStreaming"; + brt = "cursor.cmdk.autoSelect"; + G2 = "cursor.cmdk.useThemedDiffBackground2"; + uee = "cursor.diffs.useCharacterLevelDiffs"; + dee = "cursor.chat.terminalShowHoverHint"; + Hfe = "cursor.terminal.usePreviewBox"; + vrt = false; + qfe = "cursor.cpp.enablePartialAccepts"; + F5t = "cursor.aipreview.enabled"; + Qzi = "cursor.composer.cmdPFilePicker2"; + O5t = "cursor.composer.showSuggestedFiles"; + yrt = "cursor.composer.collapsePaneInputBoxPills"; + wrt = "cursor.composer.shouldAutoScrollToBottom"; + _5t = "cursor.composer.shouldShowMarkdownHoverParticipantActions2"; + hee = "cursor.composer.shouldAutoSaveNonAgent"; + Crt = "cursor.composer.shouldChimeAfterChatFinishes"; + Srt = "cursor.composer.shouldAllowCustomModes"; + fee = "cursor.composer.shouldQueueWhenGenerating"; + xrt = "cursor.composer.shouldAutoAcceptDiffs"; + B5t = -1234321; + jfe = "cursor.general.enableShadowWorkspace"; + HB = "workbench.activityBar.orientation"; + U5t = "editor.action.undoLexical"; + W5t = "editor.action.redoLexical"; + zfe = "editor.action.renderViewZone"; + krt = "aipopup.action.closePromptBar"; + Zzi = "editor.action.inlineDiffs.submitFix"; + Ert = "cursorai.action.dismissBugBotLint"; + eJi = "cursorai.action.reportBadCmdK"; + tJi = "cursorai.action.reportGoodCmdK"; + iJi = "cursorai.action.reportBadAIAction"; + sJi = "cursorai.action.reportGoodAIAction"; + V5t = "cursorai.action.showUsagePricingModal"; + nJi = "cursorai.action.showAddFastRequestsModal"; + rJi = "cursorai.action.openAccountSettings"; + H5t = "aipopup.action.acceptPromptBar"; + q5t = "aipopup.action.rejectPromptBar"; + oJi = "aipopup.action.cancelPromptBar"; + Jfe = "editor.action.inlineDiffs.cancelPromptBar"; + j5t = "aipopup.action.nextPromptBar"; + Gfe = "cursorai.action.importvscode"; + z5t = "cursorai.action.cppAfterOnboarding"; + aJi = "cursorai.action.repo.indexMainRepository"; + lJi = "cursorai.action.disableFallbackModels"; + cJi = "cursorai.action.incrementShownModelFallbacksWarningCount"; + uJi = "aichat-container"; + J5t = "aichat.newchataction"; + G5t = 1; + Irt = "aiFeedback.action.reportBugs"; + K5t = "aiFeedback.action.open"; + dJi = "cursorai.action.takeInterpreterAction"; + Y5t = "cursor-unique-ide-action-identifier-31972ee0d628"; + Drt = "src.vs.platform.reactivestorage.browser.reactiveStorageServiceImpl.persistentStorage"; + gee = `${Drt}.applicationUser`; + Kfe = `${Drt}.workspaceUser`; + iqn = `${Drt}.applicationUser.subscription`; + X5t = "workbench.panel.aichat.view"; + sqn = X5t + ".aichat.chatdata"; + hJi = "composer.composerData"; + Q5t = "workbench.bugbot.data"; + Yfe = "workbench.backgroundComposer.persistentData"; + Xfe = "workbench.backgroundComposer.workspacePersistentData"; + Lw = X5t; + pee = "workbench.panel.aichat"; + fJi = "editor.action.updateGhostText"; + gJi = "editor.action.updateHintLine"; + Trt = "THIS_IS_A_VIEW_AND_NOT_A_VIEW_CONTAINER12xpQ3:"; + Z5t = "THIS_IS_A_VIEW_AND_NOT_A_VIEW_CONTAINERSLKDJFHS"; + Prt = "editor.action.enableCppGlobally"; + fM = "editor.action.acceptCursorTabSuggestion"; + e6t = "workbench.action.disableAutocompletes"; + Lrt = 100000; + Qfe = "cursorai.action.hideNotificationsForMs"; + Zfe = "cursorPrediction"; + d9 = "auto (default)"; + t6t = "workbench.action.webview.doNotIgnoreMenuShortcuts"; + i6t = "workbench.action.backgroundComposer.showBcIdInThisWindow"; + s6t = "dataPrivacyOnboarding"; + n6t = "cursor.featureStatus.dataPrivacyOnboarding"; + Rrt = "cursor.general.globalCursorIgnoreList"; + ege = "cursorai.action.getTextModelUriFromDecorated"; + r6t = "Open in External Window"; + o6t = "Refresh Github Authentication"; + Nrt = "Open"; + a6t = "Already Opened In This Window"; + l6t = "Import to Local Chat"; + c6t = "Import to Chat"; + u6t = "Rename"; + pJi = "Send Follow-Up"; + tge = "Checkout Locally"; + mee = "Create Pull Request"; + ige = "Copy Request ID"; + d6t = "Copy Branch Name"; + Mrt = "Try Again"; + bee = "Archive"; + vee = "Unarchive"; + h6t = "Cancel"; + f6t = "Show Build Logs"; + mJi = "cursor.general.leakDetectionEnabled"; + sge = "cursor.composer.textSizeScale"; + } +}); +function Lr(i) { + while (i.firstChild) { + i.firstChild.remove(); + } +} +function Ce(i, e, t, s) { + return new MJi(i, e, t, s); +} +function g6t(i, e) { + return function (t) { + return e(new Xc(i, t)); + }; +} +function nqn(i) { + return function (e) { + return i(new wr(e)); + }; +} +function p6t(i, e, t) { + return Ce(i, fp && jC.pointerEvents ? Oe.POINTER_DOWN : Oe.MOUSE_DOWN, e, t); +} +function rqn(i, e, t) { + return Ce(i, fp && jC.pointerEvents ? Oe.POINTER_MOVE : Oe.MOUSE_MOVE, e, t); +} +function m6t(i, e, t) { + return Ce(i, fp && jC.pointerEvents ? Oe.POINTER_UP : Oe.MOUSE_UP, e, t); +} +function jk(i, e, t) { + return vfe(i, e, t); +} +function qB(i, e, t, s) { + let n = 0; + const r = i.setInterval(() => { + n++; + if (typeof s == "number" && n >= s || e() === true) { + o.dispose(); + } + }, t); + const o = Ue(() => { + i.clearInterval(r); + }); + return o; +} +function bJi(i, e) { + return Zc(i, e, 10000); +} +function nge(i, e) { + return Zc(i, e, -10000); +} +function yee(i) { + return Kt(i).getComputedStyle(i, null); +} +function zk(i, e) { + const t = Kt(i); + const s = t.document; + if (i !== s.body) { + return new Ln(i.clientWidth, i.clientHeight); + } + if (fp && t?.visualViewport) { + return new Ln(t.visualViewport.width, t.visualViewport.height); + } + if (t?.innerWidth && t.innerHeight) { + return new Ln(t.innerWidth, t.innerHeight); + } + if (s.body && s.body.clientWidth && s.body.clientHeight) { + return new Ln(s.body.clientWidth, s.body.clientHeight); + } + if (s.documentElement && s.documentElement.clientWidth && s.documentElement.clientHeight) { + return new Ln(s.documentElement.clientWidth, s.documentElement.clientHeight); + } + if (e) { + return zk(e); + } + if (VB.parentWindowId !== undefined) { + if (VB.parentWindowDimensions !== undefined) { + return new Ln(VB.parentWindowDimensions.width, VB.parentWindowDimensions.height); + } else { + return new Ln(1024, 768); + } + } + throw new Error("Unable to figure out browser width and height"); +} +function h9(i) { + let e = i.offsetParent; + let t = i.offsetTop; + let s = i.offsetLeft; + while ((i = i.parentNode) !== null && i !== i.ownerDocument.body && i !== i.ownerDocument.documentElement) { + t -= i.scrollTop; + const n = yJi(i) ? null : yee(i); + if (n) { + s -= n.direction !== "rtl" ? i.scrollLeft : -i.scrollLeft; + } + if (i === e) { + s += e1.getBorderLeftWidth(i); + t += e1.getBorderTopWidth(i); + t += i.offsetTop; + s += i.offsetLeft; + e = i.offsetParent; + } + } + return { + left: s, + top: t + }; +} +function wee(i, e, t) { + if (typeof e == "number") { + i.style.width = `${e}px`; + } + if (typeof t == "number") { + i.style.height = `${t}px`; + } +} +function vJi(i, e, t, s, n, r = "absolute") { + if (typeof e == "number") { + i.style.top = `${e}px`; + } + if (typeof t == "number") { + i.style.right = `${t}px`; + } + if (typeof s == "number") { + i.style.bottom = `${s}px`; + } + if (typeof n == "number") { + i.style.left = `${n}px`; + } + i.style.position = r; +} +function sd(i) { + const e = i.getBoundingClientRect(); + const t = Kt(i); + return { + left: e.left + t.scrollX, + top: e.top + t.scrollY, + width: e.width, + height: e.height + }; +} +function Art(i) { + let e = i; + let t = 1; + do { + const s = yee(e).zoom; + if (s != null && s !== "1") { + t *= s; + } + e = e.parentElement; + } while (e !== null && e !== e.ownerDocument.documentElement); + return t; +} +function qp(i) { + const e = e1.getMarginLeft(i) + e1.getMarginRight(i); + return i.offsetWidth + e; +} +function rge(i) { + const e = e1.getBorderLeftWidth(i) + e1.getBorderRightWidth(i); + const t = e1.getPaddingLeft(i) + e1.getPaddingRight(i); + return i.offsetWidth - e - t; +} +function oqn(i) { + const e = e1.getMarginLeft(i) + e1.getMarginRight(i); + return i.scrollWidth + e; +} +function b6t(i) { + const e = e1.getBorderTopWidth(i) + e1.getBorderBottomWidth(i); + const t = e1.getPaddingTop(i) + e1.getPaddingBottom(i); + return i.offsetHeight - e - t; +} +function U0(i) { + const e = e1.getMarginTop(i) + e1.getMarginBottom(i); + return i.offsetHeight + e; +} +function aqn(i, e) { + if (i === null) { + return 0; + } + const t = h9(i); + const s = h9(e); + return t.left - s.left; +} +function v6t(i, e) { + const t = e.map(n => Math.max(oqn(n), qp(n)) + aqn(n, i) || 0); + return Math.max(...t); +} +function Kd(i, e) { + return !!e?.contains(i); +} +function y6t(i, e) { + i.dataset[T6t] = e.id; +} +function lqn(i) { + const e = i.dataset[T6t]; + if (typeof e == "string") { + return i.ownerDocument.getElementById(e); + } else { + return null; + } +} +function cqn(i, e) { + let t = i; + while (t) { + if (t === e) { + return true; + } + if (Bl(t)) { + const s = lqn(t); + if (s) { + t = s; + continue; + } + } + t = t.parentNode; + } + return false; +} +function CI(i, e, t) { + while (i && i.nodeType === i.ELEMENT_NODE) { + if (i.classList.contains(e)) { + return i; + } + if (t) { + if (typeof t == "string") { + if (i.classList.contains(t)) { + return null; + } + } else if (i === t) { + return null; + } + } + i = i.parentNode; + } + return null; +} +function $rt(i, e, t) { + return !!CI(i, e, t); +} +function yJi(i) { + return i && !!i.host && !!i.mode; +} +function oge(i) { + return !!Zq(i); +} +function Zq(i) { + while (i.parentNode) { + if (i === i.ownerDocument?.body) { + return null; + } + i = i.parentNode; + } + if (yJi(i)) { + return i; + } else { + return null; + } +} +function Tu() { + let i = hf().activeElement; + while (i?.shadowRoot) { + i = i.shadowRoot.activeElement; + } + return i; +} +function Jg(i) { + return Tu() === i; +} +function pg(i) { + return Kd(Tu(), i); +} +function wJi(i) { + return i.ownerDocument === hf(); +} +function hf() { + if (lge() <= 1) { + return xt.document; + } else { + return Array.from(Jk()).map(({ + window: e + }) => e.document).find(e => e.hasFocus()) ?? xt.document; + } +} +function js() { + return hf().defaultView?.window ?? xt; +} +function CJi(i = xt.document.head) { + return SJi("meta", i); +} +function uqn(i = xt.document.head) { + return SJi("link", i); +} +function SJi(i, e = xt.document.head) { + const t = document.createElement(i); + e.appendChild(t); + return t; +} +function Bl(i) { + return i instanceof HTMLElement || i instanceof Kt(i).HTMLElement; +} +function w6t(i) { + return i instanceof HTMLAnchorElement || i instanceof Kt(i).HTMLAnchorElement; +} +function C6t(i) { + return i instanceof HTMLTextAreaElement || i instanceof Kt(i).HTMLTextAreaElement; +} +function S6t(i) { + return i instanceof HTMLInputElement || i instanceof Kt(i).HTMLInputElement; +} +function dqn(i) { + return i instanceof HTMLButtonElement || i instanceof Kt(i).HTMLButtonElement; +} +function hqn(i) { + return i instanceof SVGElement || i instanceof Kt(i).SVGElement; +} +function W0(i) { + return i instanceof MouseEvent || i instanceof Kt(i).MouseEvent; +} +function QS(i) { + return i instanceof KeyboardEvent || i instanceof Kt(i).KeyboardEvent; +} +function xJi(i) { + return i instanceof PointerEvent || i instanceof Kt(i).PointerEvent; +} +function fqn(i) { + return i instanceof DragEvent || i instanceof Kt(i).DragEvent; +} +function kJi(i) { + const e = i; + return !!e && typeof e.preventDefault == "function" && typeof e.stopPropagation == "function"; +} +function gqn(i) { + const e = []; + for (let t = 0; i && i.nodeType === i.ELEMENT_NODE; t++) { + e[t] = i.scrollTop; + i = i.parentNode; + } + return e; +} +function pqn(i, e) { + for (let t = 0; i && i.nodeType === i.ELEMENT_NODE; t++) { + if (i.scrollTop !== e[t]) { + i.scrollTop = e[t]; + } + i = i.parentNode; + } +} +function Pu(i) { + return new AJi(i); +} +function EJi(i, e) { + i.after(e); + return e; +} +function z(i, ...e) { + i.append(...e); + if (e.length === 1 && typeof e[0] != "string") { + return e[0]; + } +} +function K2(i, e) { + i.insertBefore(e, i.firstChild); + return e; +} +function mo(i, ...e) { + i.innerText = ""; + z(i, ...e); +} +function IJi(i, e, t, ...s) { + const n = $Ji.exec(e); + if (!n) { + throw new Error("Bad use of emmet"); + } + const r = n[1] || "div"; + let o; + if (i !== cge.HTML) { + o = document.createElementNS(i, r); + } else { + o = document.createElement(r); + } + if (n[3]) { + o.id = n[3]; + } + if (n[4]) { + o.className = n[4].replace(/\./g, " ").trim(); + } + if (t) { + Object.entries(t).forEach(([a, l]) => { + if (typeof l !== "undefined") { + if (/^on\w+$/.test(a)) { + o[a] = l; + } else if (a === "selected") { + if (l) { + o.setAttribute(a, "true"); + } + } else { + o.setAttribute(a, l); + } + } + }); + } + o.append(...s); + return o; +} +function G(i, e, ...t) { + return IJi(cge.HTML, i, e, ...t); +} +function gM(i, ...e) { + if (i) { + Ka(...e); + } else { + Qo(...e); + } +} +function Ka(...i) { + for (const e of i) { + e.style.display = ""; + e.removeAttribute("aria-hidden"); + } +} +function Qo(...i) { + for (const e of i) { + e.style.display = "none"; + e.setAttribute("aria-hidden", "true"); + } +} +function DJi(i) { + return e => { + e.preventDefault(); + e.stopPropagation(); + i(e); + }; +} +function mqn(i) { + return new Promise(e => { + if (i.document.readyState === "complete" || i.document && i.document.body !== null) { + e(undefined); + } else { + const s = () => { + i.window.removeEventListener("DOMContentLoaded", s, false); + e(); + }; + i.window.addEventListener("DOMContentLoaded", s, false); + } + }); +} +function Frt(i, e) { + const t = i.devicePixelRatio * e; + return Math.max(1, Math.floor(t)) / i.devicePixelRatio; +} +function age(i) { + xt.open(i, "_blank", "noopener"); +} +function TJi(i) { + const e = Math.floor(xt.screenLeft + xt.innerWidth / 2 - P6t / 2); + const t = Math.floor(xt.screenTop + xt.innerHeight / 2 - L6t / 2); + xt.open(i, "_blank", `width=${P6t},height=${L6t},top=${t},left=${e}`); +} +function bqn(i, e = true) { + const t = xt.open(); + if (t) { + if (e) { + t.opener = null; + } + t.location.href = i; + return true; + } else { + return false; + } +} +function vqn(i, e) { + const t = () => { + e(); + s = Zc(i, t); + }; + let s = Zc(i, t); + return Ue(() => s.dispose()); +} +function yqn(i, e) { + let t; + if (V.isUri(i)) { + t = i.toString(true); + } else { + const r = new Blob([i]); + t = URL.createObjectURL(r); + setTimeout(() => URL.revokeObjectURL(t)); + } + const s = js(); + const n = document.createElement("a"); + s.document.body.appendChild(n); + n.download = e; + n.href = t; + n.click(); + setTimeout(() => n.remove()); +} +function wqn() { + return new Promise(i => { + const e = js(); + const t = document.createElement("input"); + e.document.body.appendChild(t); + t.type = "file"; + t.multiple = true; + de.once(de.fromDOMEventEmitter(t, "input"))(() => { + i(t.files ?? undefined); + }); + t.click(); + setTimeout(() => t.remove()); + }); +} +function x6t(i, e = false) { + const t = document.createElement("a"); + H2.addHook("afterSanitizeAttributes", s => { + for (const n of ["href", "src"]) { + if (s.hasAttribute(n)) { + const r = s.getAttribute(n); + if (n === "href" && r.startsWith("#")) { + continue; + } + t.href = r; + if (!i.includes(t.protocol.replace(/:$/, ""))) { + if (e && n === "src" && t.href.startsWith("data:")) { + continue; + } + s.removeAttribute(n); + } + } + } + }); + return Ue(() => { + H2.removeHook("afterSanitizeAttributes"); + }); +} +function ej(i, e, t) { + const s = x6t(OJi); + try { + const n = H2.sanitize(e, { + ..._Ji, + ...t + }); + i.innerHTML = n; + } finally { + s.dispose(); + } +} +function Cqn(i) { + const e = new Uint16Array(i.length); + for (let n = 0; n < e.length; n++) { + e[n] = i.charCodeAt(n); + } + let t = ""; + const s = new Uint8Array(e.buffer); + for (let n = 0; n < s.length; n++) { + t += String.fromCharCode(s[n]); + } + return t; +} +function tj(i) { + return btoa(Cqn(i)); +} +function Ts(i, ...e) { + let t; + let s; + if (Array.isArray(e[0])) { + t = {}; + s = e[0]; + } else { + t = e[0] || {}; + s = e[1]; + } + const n = N6t.exec(i); + if (!n || !n.groups) { + throw new Error("Bad use of h"); + } + const r = n.groups.tag || "div"; + const o = document.createElement(r); + if (n.groups.id) { + o.id = n.groups.id; + } + const a = []; + if (n.groups.class) { + for (const c of n.groups.class.split(".")) { + if (c !== "") { + a.push(c); + } + } + } + if (t.className !== undefined) { + for (const c of t.className.split(".")) { + if (c !== "") { + a.push(c); + } + } + } + if (a.length > 0) { + o.className = a.join(" "); + } + const l = {}; + if (n.groups.name) { + l[n.groups.name] = o; + } + if (s) { + for (const c of s) { + if (Bl(c)) { + o.appendChild(c); + } else if (typeof c == "string") { + o.append(c); + } else if ("root" in c) { + Object.assign(l, c); + o.appendChild(c.root); + } + } + } + for (const [c, u] of Object.entries(t)) { + if (c !== "className") { + if (c === "style") { + for (const [d, h] of Object.entries(u)) { + o.style.setProperty(Ort(d), typeof h == "number" ? h + "px" : "" + h); + } + } else if (c === "tabIndex") { + o.tabIndex = u; + } else { + o.setAttribute(Ort(c), u.toString()); + } + } + } + l.root = o; + return l; +} +function k6t(i, ...e) { + let t; + let s; + if (Array.isArray(e[0])) { + t = {}; + s = e[0]; + } else { + t = e[0] || {}; + s = e[1]; + } + const n = N6t.exec(i); + if (!n || !n.groups) { + throw new Error("Bad use of h"); + } + const r = n.groups.tag || "div"; + const o = document.createElementNS("http://www.w3.org/2000/svg", r); + if (n.groups.id) { + o.id = n.groups.id; + } + const a = []; + if (n.groups.class) { + for (const c of n.groups.class.split(".")) { + if (c !== "") { + a.push(c); + } + } + } + if (t.className !== undefined) { + for (const c of t.className.split(".")) { + if (c !== "") { + a.push(c); + } + } + } + if (a.length > 0) { + o.className = a.join(" "); + } + const l = {}; + if (n.groups.name) { + l[n.groups.name] = o; + } + if (s) { + for (const c of s) { + if (Bl(c)) { + o.appendChild(c); + } else if (typeof c == "string") { + o.append(c); + } else if ("root" in c) { + Object.assign(l, c); + o.appendChild(c.root); + } + } + } + for (const [c, u] of Object.entries(t)) { + if (c !== "className") { + if (c === "style") { + for (const [d, h] of Object.entries(u)) { + o.style.setProperty(Ort(d), typeof h == "number" ? h + "px" : "" + h); + } + } else if (c === "tabIndex") { + o.tabIndex = u; + } else { + o.setAttribute(Ort(c), u.toString()); + } + } + } + l.root = o; + return l; +} +function Ort(i) { + return i.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase(); +} +function E6t(i, e, t) { + for (const { + name: s, + value: n + } of i.attributes) { + if (!t || t.includes(s)) { + e.setAttribute(s, n); + } + } +} +function Sqn(i, e, t) { + const s = i.getAttribute(t); + if (s) { + e.setAttribute(t, s); + } else { + e.removeAttribute(t); + } +} +function I6t(i, e, t) { + E6t(i, e, t); + const s = new Q(); + s.add(Brt.observe(i, s, { + attributes: true, + attributeFilter: t + })(n => { + for (const r of n) { + if (r.type === "attributes" && r.attributeName) { + Sqn(i, e, r.attributeName); + } + } + })); + return s; +} +function ZS(i) { + return i.tagName.toLowerCase() === "input" || i.tagName.toLowerCase() === "textarea" || Bl(i) && !!i.editContext; +} +var PJi; +var Kt; +var LJi; +var Jk; +var lge; +var yx; +var SI; +var ij; +var xI; +var RJi; +var NJi; +var MJi; +var ko; +var jB; +var D6t; +var zB; +var f9; +var Zc; +var JB; +var _rt; +var e1; +var Ln; +var T6t; +var Brt; +var Oe; +var yn; +var AJi; +var $Ji; +var cge; +var P6t; +var L6t; +var FJi; +var OJi; +var R6t; +var _Ji; +var Y2; +var Gk; +var N6t; +var M6t; +var xe = ue({ + "out-build/vs/base/browser/dom.js"() { + "use strict"; + + hc(); + V2(); + _a(); + gd(); + nt(); + Ut(); + pe(); + Rfe(); + q(); + At(); + rt(); + Le(); + Gl(); + fr(); + Xf(); + Pn(); + ({ + registerWindow: PJi, + getWindow: Kt, + getDocument: LJi, + getWindows: Jk, + getWindowsCount: lge, + getWindowId: yx, + getWindowById: SI, + hasWindow: ij, + onDidRegisterWindow: xI, + onWillUnregisterWindow: RJi, + onDidUnregisterWindow: NJi + } = function () { + const i = new Map(); + Xji(xt, 1); + const e = { + window: xt, + disposables: new Q() + }; + i.set(xt.vscodeWindowId, e); + const t = new B(); + const s = new B(); + const n = new B(); + function r(o, a) { + return (typeof o == "number" ? i.get(o) : undefined) ?? (a ? e : undefined); + } + return { + onDidRegisterWindow: t.event, + onWillUnregisterWindow: n.event, + onDidUnregisterWindow: s.event, + registerWindow(o) { + if (i.has(o.vscodeWindowId)) { + return H.None; + } + const a = new Q(); + const l = { + window: o, + disposables: a.add(new Q()) + }; + i.set(o.vscodeWindowId, l); + a.add(Ue(() => { + i.delete(o.vscodeWindowId); + s.fire(o); + })); + a.add(Ce(o, Oe.BEFORE_UNLOAD, () => { + n.fire(o); + })); + t.fire(l); + return a; + }, + getWindows() { + return i.values(); + }, + getWindowsCount() { + return i.size; + }, + getWindowId(o) { + return o.vscodeWindowId; + }, + hasWindow(o) { + return i.has(o); + }, + getWindowById: r, + getWindow(o) { + const a = o; + if (a?.ownerDocument?.defaultView) { + return a.ownerDocument.defaultView.window; + } + const l = o; + if (l?.view) { + return l.view.window; + } else { + return xt; + } + }, + getDocument(o) { + return Kt(o).document; + } + }; + }()); + MJi = class { + constructor(i, e, t, s) { + this.f = i; + this.g = e; + this.d = t; + this.j = s || false; + this.f.addEventListener(this.g, this.d, this.j); + } + dispose() { + if (this.d) { + this.f.removeEventListener(this.g, this.d, this.j); + this.f = null; + this.d = null; + } + } + }; + ko = function (e, t, s, n) { + let r = s; + if (t === "click" || t === "mousedown" || t === "contextmenu") { + r = g6t(Kt(e), s); + } else if (t === "keydown" || t === "keypress" || t === "keyup") { + r = nqn(s); + } + return Ce(e, t, r, n); + }; + jB = function (e, t, s) { + const n = g6t(Kt(e), t); + return p6t(e, n, s); + }; + D6t = function (e, t, s) { + const n = g6t(Kt(e), t); + return m6t(e, n, s); + }; + zB = class extends W4t { + constructor(i, e) { + super(i, e); + } + }; + JB = class extends XZ { + constructor(i) { + super(); + this.g = i && Kt(i); + } + cancelAndSet(i, e, t) { + return super.cancelAndSet(i, e, t ?? this.g); + } + }; + _rt = class { + constructor(i, e = 0) { + this.d = i; + this.priority = e; + this.f = false; + } + dispose() { + this.f = true; + } + execute() { + if (!this.f) { + try { + this.d(); + } catch (i) { + xs(i); + } + } + } + static sort(i, e) { + return e.priority - i.priority; + } + }; + (function () { + const i = new Map(); + const e = new Map(); + const t = new Map(); + const s = new Map(); + const n = r => { + t.set(r, false); + const o = i.get(r) ?? []; + e.set(r, o); + i.set(r, []); + s.set(r, true); + while (o.length > 0) { + o.sort(_rt.sort); + o.shift().execute(); + } + s.set(r, false); + }; + Zc = (r, o, a = 0) => { + const l = yx(r); + const c = new _rt(o, a); + let u = i.get(l); + if (!u) { + u = []; + i.set(l, u); + } + u.push(c); + if (!t.get(l)) { + t.set(l, true); + r.requestAnimationFrame(() => n(l)); + } + return c; + }; + f9 = (r, o, a) => { + const l = yx(r); + if (s.get(l)) { + const c = new _rt(o, a); + let u = e.get(l); + if (!u) { + u = []; + e.set(l, u); + } + u.push(c); + return c; + } else { + return Zc(r, o, a); + } + }; + })(); + e1 = class fT { + static d(e, t) { + return parseFloat(t) || 0; + } + static f(e, t, s) { + const n = yee(e); + const r = n ? n.getPropertyValue(t) : "0"; + return fT.d(e, r); + } + static getBorderLeftWidth(e) { + return fT.f(e, "border-left-width", "borderLeftWidth"); + } + static getBorderRightWidth(e) { + return fT.f(e, "border-right-width", "borderRightWidth"); + } + static getBorderTopWidth(e) { + return fT.f(e, "border-top-width", "borderTopWidth"); + } + static getBorderBottomWidth(e) { + return fT.f(e, "border-bottom-width", "borderBottomWidth"); + } + static getPaddingLeft(e) { + return fT.f(e, "padding-left", "paddingLeft"); + } + static getPaddingRight(e) { + return fT.f(e, "padding-right", "paddingRight"); + } + static getPaddingTop(e) { + return fT.f(e, "padding-top", "paddingTop"); + } + static getPaddingBottom(e) { + return fT.f(e, "padding-bottom", "paddingBottom"); + } + static getMarginLeft(e) { + return fT.f(e, "margin-left", "marginLeft"); + } + static getMarginTop(e) { + return fT.f(e, "margin-top", "marginTop"); + } + static getMarginRight(e) { + return fT.f(e, "margin-right", "marginRight"); + } + static getMarginBottom(e) { + return fT.f(e, "margin-bottom", "marginBottom"); + } + }; + Ln = class BPe { + static { + this.None = new BPe(0, 0); + } + constructor(e, t) { + this.width = e; + this.height = t; + } + with(e = this.width, t = this.height) { + if (e !== this.width || t !== this.height) { + return new BPe(e, t); + } else { + return this; + } + } + static is(e) { + return typeof e == "object" && typeof e.height == "number" && typeof e.width == "number"; + } + static lift(e) { + if (e instanceof BPe) { + return e; + } else { + return new BPe(e.width, e.height); + } + } + static equals(e, t) { + if (e === t) { + return true; + } else if (!e || !t) { + return false; + } else { + return e.width === t.width && e.height === t.height; + } + } + }; + T6t = "parentFlowToElementId"; + Brt = new class { + constructor() { + this.mutationObservers = new Map(); + } + observe(i, e, t) { + let s = this.mutationObservers.get(i); + if (!s) { + s = new Map(); + this.mutationObservers.set(i, s); + } + const n = Qc(t); + let r = s.get(n); + if (r) { + r.users += 1; + } else { + const o = new B(); + const a = new MutationObserver(c => o.fire(c)); + a.observe(i, t); + const l = r = { + users: 1, + observer: a, + onDidMutate: o.event + }; + e.add(Ue(() => { + l.users -= 1; + if (l.users === 0) { + o.dispose(); + a.disconnect(); + s?.delete(n); + if (s?.size === 0) { + this.mutationObservers.delete(i); + } + } + })); + s.set(n, r); + } + return r.onDidMutate; + } + }(); + Oe = { + CLICK: "click", + AUXCLICK: "auxclick", + DBLCLICK: "dblclick", + MOUSE_UP: "mouseup", + MOUSE_DOWN: "mousedown", + MOUSE_OVER: "mouseover", + MOUSE_MOVE: "mousemove", + MOUSE_OUT: "mouseout", + MOUSE_ENTER: "mouseenter", + MOUSE_LEAVE: "mouseleave", + MOUSE_WHEEL: "wheel", + POINTER_UP: "pointerup", + POINTER_DOWN: "pointerdown", + POINTER_MOVE: "pointermove", + POINTER_LEAVE: "pointerleave", + CONTEXT_MENU: "contextmenu", + WHEEL: "wheel", + KEY_DOWN: "keydown", + KEY_PRESS: "keypress", + KEY_UP: "keyup", + LOAD: "load", + BEFORE_UNLOAD: "beforeunload", + UNLOAD: "unload", + PAGE_SHOW: "pageshow", + PAGE_HIDE: "pagehide", + PASTE: "paste", + ABORT: "abort", + ERROR: "error", + RESIZE: "resize", + SCROLL: "scroll", + FULLSCREEN_CHANGE: "fullscreenchange", + WK_FULLSCREEN_CHANGE: "webkitfullscreenchange", + SELECT: "select", + CHANGE: "change", + SUBMIT: "submit", + RESET: "reset", + FOCUS: "focus", + FOCUS_IN: "focusin", + FOCUS_OUT: "focusout", + BLUR: "blur", + INPUT: "input", + STORAGE: "storage", + DRAG_START: "dragstart", + DRAG: "drag", + DRAG_ENTER: "dragenter", + DRAG_LEAVE: "dragleave", + DRAG_OVER: "dragover", + DROP: "drop", + DRAG_END: "dragend", + ANIMATION_START: c9 ? "webkitAnimationStart" : "animationstart", + ANIMATION_END: c9 ? "webkitAnimationEnd" : "animationend", + ANIMATION_ITERATION: c9 ? "webkitAnimationIteration" : "animationiteration" + }; + yn = { + stop: (i, e) => { + i.preventDefault(); + if (e) { + i.stopPropagation(); + } + return i; + } + }; + AJi = class b3i extends H { + static m(e) { + if (Bl(e)) { + const t = Zq(e); + const s = t ? t.activeElement : e.ownerDocument.activeElement; + return Kd(s, e); + } else { + const t = e; + return Kd(t.document.activeElement, t.document); + } + } + constructor(e) { + super(); + this.f = this.D(new B()); + this.onDidFocus = this.f.event; + this.g = this.D(new B()); + this.onDidBlur = this.g.event; + let t = b3i.m(e); + let s = false; + const n = () => { + s = false; + if (!t) { + t = true; + this.f.fire(); + } + }; + const r = () => { + if (t) { + s = true; + (Bl(e) ? Kt(e) : e).setTimeout(() => { + if (s) { + s = false; + t = false; + this.g.fire(); + } + }, 0); + } + }; + this.j = () => { + if (b3i.m(e) !== t) { + if (t) { + r(); + } else { + n(); + } + } + }; + this.D(Ce(e, Oe.FOCUS, n, true)); + this.D(Ce(e, Oe.BLUR, r, true)); + if (Bl(e)) { + this.D(Ce(e, Oe.FOCUS_IN, () => this.j())); + this.D(Ce(e, Oe.FOCUS_OUT, () => this.j())); + } + } + refreshState() { + this.j(); + } + }; + $Ji = /([\w\-]+)?(#([\w\-]+))?((\.([\w\-]+))*)/; + (function (i) { + i.HTML = "http://www.w3.org/1999/xhtml"; + i.SVG = "http://www.w3.org/2000/svg"; + })(cge ||= {}); + G.SVG = function (i, e, ...t) { + return IJi(cge.SVG, i, e, ...t); + }; + P6t = 780; + L6t = 640; + uM.setPreferredWebSchema(/^https:/.test(xt.location.href) ? "https" : "http"); + (function (i) { + i[i.DOCUMENT = 1] = "DOCUMENT"; + i[i.BROWSER = 2] = "BROWSER"; + })(FJi ||= {}); + OJi = [me.http, me.https, me.command]; + R6t = Object.freeze(["a", "abbr", "b", "bdo", "blockquote", "br", "caption", "cite", "code", "col", "colgroup", "dd", "del", "details", "dfn", "div", "dl", "dt", "em", "figcaption", "figure", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "i", "img", "input", "ins", "kbd", "label", "li", "mark", "ol", "p", "pre", "q", "rp", "rt", "ruby", "samp", "small", "small", "source", "span", "strike", "strong", "sub", "summary", "sup", "table", "tbody", "td", "tfoot", "th", "thead", "time", "tr", "tt", "u", "ul", "var", "video", "wbr"]); + _Ji = Object.freeze({ + ALLOWED_TAGS: ["a", "button", "blockquote", "code", "div", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "input", "label", "li", "p", "pre", "select", "small", "span", "strong", "textarea", "ul", "ol"], + ALLOWED_ATTR: ["href", "data-href", "data-command", "target", "title", "name", "src", "alt", "class", "id", "role", "tabindex", "style", "data-code", "width", "height", "align", "x-dispatch", "required", "checked", "placeholder", "type", "start"], + RETURN_DOM: false, + RETURN_DOM_FRAGMENT: false, + RETURN_TRUSTED_TYPE: true + }); + Y2 = class UPe extends B { + constructor() { + super(); + this.o = new Q(); + this.s = { + altKey: false, + shiftKey: false, + ctrlKey: false, + metaKey: false + }; + this.o.add(de.runAndSubscribe(xI, ({ + window: e, + disposables: t + }) => this.F(e, t), { + window: xt, + disposables: this.o + })); + } + F(e, t) { + t.add(Ce(e, "keydown", s => { + if (s.defaultPrevented) { + return; + } + const n = new wr(s); + if (n.keyCode !== 6 || !s.repeat) { + if (s.altKey && !this.s.altKey) { + this.s.lastKeyPressed = "alt"; + } else if (s.ctrlKey && !this.s.ctrlKey) { + this.s.lastKeyPressed = "ctrl"; + } else if (s.metaKey && !this.s.metaKey) { + this.s.lastKeyPressed = "meta"; + } else if (s.shiftKey && !this.s.shiftKey) { + this.s.lastKeyPressed = "shift"; + } else if (n.keyCode !== 6) { + this.s.lastKeyPressed = undefined; + } else { + return; + } + this.s.altKey = s.altKey; + this.s.ctrlKey = s.ctrlKey; + this.s.metaKey = s.metaKey; + this.s.shiftKey = s.shiftKey; + if (this.s.lastKeyPressed) { + this.s.event = s; + this.fire(this.s); + } + } + }, true)); + t.add(Ce(e, "keyup", s => { + if (!s.defaultPrevented) { + if (!s.altKey && this.s.altKey) { + this.s.lastKeyReleased = "alt"; + } else if (!s.ctrlKey && this.s.ctrlKey) { + this.s.lastKeyReleased = "ctrl"; + } else if (!s.metaKey && this.s.metaKey) { + this.s.lastKeyReleased = "meta"; + } else if (!s.shiftKey && this.s.shiftKey) { + this.s.lastKeyReleased = "shift"; + } else { + this.s.lastKeyReleased = undefined; + } + if (this.s.lastKeyPressed !== this.s.lastKeyReleased) { + this.s.lastKeyPressed = undefined; + } + this.s.altKey = s.altKey; + this.s.ctrlKey = s.ctrlKey; + this.s.metaKey = s.metaKey; + this.s.shiftKey = s.shiftKey; + if (this.s.lastKeyReleased) { + this.s.event = s; + this.fire(this.s); + } + } + }, true)); + t.add(Ce(e.document.body, "mousedown", () => { + this.s.lastKeyPressed = undefined; + }, true)); + t.add(Ce(e.document.body, "mouseup", () => { + this.s.lastKeyPressed = undefined; + }, true)); + t.add(Ce(e.document.body, "mousemove", s => { + if (s.buttons) { + this.s.lastKeyPressed = undefined; + } + }, true)); + t.add(Ce(e, "blur", () => { + this.resetKeyStatus(); + })); + } + get keyStatus() { + return this.s; + } + get isModifierPressed() { + return this.s.altKey || this.s.ctrlKey || this.s.metaKey || this.s.shiftKey; + } + resetKeyStatus() { + this.G(); + this.fire(this.s); + } + G() { + this.s = { + altKey: false, + shiftKey: false, + ctrlKey: false, + metaKey: false + }; + } + static getInstance() { + UPe.D ||= new UPe(); + return UPe.D; + } + dispose() { + super.dispose(); + this.o.dispose(); + } + }; + Gk = class extends H { + constructor(i, e) { + super(); + this.j = i; + this.m = e; + this.f = 0; + this.g = 0; + this.n(); + } + n() { + if (this.m.onDragStart) { + this.D(Ce(this.j, Oe.DRAG_START, i => { + this.m.onDragStart?.(i); + })); + } + if (this.m.onDrag) { + this.D(Ce(this.j, Oe.DRAG, i => { + this.m.onDrag?.(i); + })); + } + this.D(Ce(this.j, Oe.DRAG_ENTER, i => { + this.f++; + this.g = i.timeStamp; + this.m.onDragEnter?.(i); + })); + this.D(Ce(this.j, Oe.DRAG_OVER, i => { + i.preventDefault(); + this.m.onDragOver?.(i, i.timeStamp - this.g); + })); + this.D(Ce(this.j, Oe.DRAG_LEAVE, i => { + this.f--; + if (this.f === 0) { + this.g = 0; + this.m.onDragLeave?.(i); + } + })); + this.D(Ce(this.j, Oe.DRAG_END, i => { + this.f = 0; + this.g = 0; + this.m.onDragEnd?.(i); + })); + this.D(Ce(this.j, Oe.DROP, i => { + this.f = 0; + this.g = 0; + this.m.onDrop?.(i); + })); + } + }; + N6t = /(?[\w\-]+)?(?:#(?[\w\-]+))?(?(?:\.(?:[\w\-]+))*)(?:@(?(?:[\w\_])+))?/; + M6t = class { + constructor(i, e, t) { + this.f = i; + this.g = e; + this.d = new Int16Array(8); + const { + top: s, + left: n, + right: r, + bottom: o + } = t.getBoundingClientRect(); + const a = this.d; + let l = 0; + a[l++] = n; + a[l++] = s; + a[l++] = r; + a[l++] = s; + a[l++] = n; + a[l++] = o; + a[l++] = r; + a[l++] = o; + } + contains(i, e) { + const { + d: t, + f: s, + g: n + } = this; + for (let r = 0; r < 4; r++) { + const o = r * 2; + const a = (r + 1) % 4 * 2; + if (tqn(i, e, s, n, t[o], t[o + 1], t[a], t[a + 1])) { + return true; + } + } + return false; + } + }; + } +}); +var xqn = ue({ + "out-build/vs/base/browser/ui/aria/aria.css"() {} +}); +function kqn(i) { + sj = document.createElement("div"); + sj.className = "monaco-aria-container"; + const e = () => { + const s = document.createElement("div"); + s.className = "monaco-alert"; + s.setAttribute("role", "alert"); + s.setAttribute("aria-atomic", "true"); + sj.appendChild(s); + return s; + }; + Wrt = e(); + $6t = e(); + const t = () => { + const s = document.createElement("div"); + s.className = "monaco-status"; + s.setAttribute("aria-live", "polite"); + s.setAttribute("aria-atomic", "true"); + sj.appendChild(s); + return s; + }; + Vrt = t(); + F6t = t(); + i.appendChild(sj); +} +function Fc(i) { + if (sj) { + if (Wrt.textContent !== i) { + Lr($6t); + Urt(Wrt, i); + } else { + Lr(Wrt); + Urt($6t, i); + } + } +} +function Bh(i) { + if (sj) { + if (Vrt.textContent !== i) { + Lr(F6t); + Urt(Vrt, i); + } else { + Lr(Vrt); + Urt(F6t, i); + } + } +} +function Urt(i, e) { + Lr(i); + if (e.length > A6t) { + e = e.substr(0, A6t); + } + i.textContent = e; + i.style.visibility = "hidden"; + i.style.visibility = "visible"; +} +var A6t; +var sj; +var Wrt; +var $6t; +var Vrt; +var F6t; +var wc = ue({ + "out-build/vs/base/browser/ui/aria/aria.js"() { + "use strict"; + + xe(); + xqn(); + A6t = 20000; + } +}); +function Eqn(i, e, t) { + if (e[pM.DI_TARGET] === e) { + e[pM.DI_DEPENDENCIES].push({ + id: i, + index: t + }); + } else { + e[pM.DI_DEPENDENCIES] = [{ + id: i, + index: t + }]; + e[pM.DI_TARGET] = e; + } +} +function Ve(i) { + if (pM.serviceIds.has(i)) { + return pM.serviceIds.get(i); + } + const e = function (t, s, n) { + if (arguments.length !== 3) { + throw new Error("@IServiceName-decorator can only be used to decorate a parameter"); + } + Eqn(e, t, n); + }; + e.toString = () => i; + pM.serviceIds.set(i, e); + return e; +} +function wta(i) { + return i; +} +var pM; +var re; +var te = ue({ + "out-build/vs/platform/instantiation/common/instantiation.js"() { + "use strict"; + + (function (i) { + i.serviceIds = new Map(); + i.DI_TARGET = "$di$target"; + i.DI_DEPENDENCIES = "$di$dependencies"; + function e(t) { + return t[i.DI_DEPENDENCIES] || []; + } + i.getServiceDependencies = e; + })(pM ||= {}); + re = Ve("instantiationService"); + } +}); +var ps; +var Xn = ue({ + "out-build/vs/editor/browser/services/codeEditorService.js"() { + "use strict"; + + te(); + ps = Ve("codeEditorService"); + } +}); +var je; +var Rs = ue({ + "out-build/vs/editor/common/core/position.js"() { + "use strict"; + + je = class XQ { + constructor(e, t) { + this.lineNumber = e; + this.column = t; + } + with(e = this.lineNumber, t = this.column) { + if (e === this.lineNumber && t === this.column) { + return this; + } else { + return new XQ(e, t); + } + } + delta(e = 0, t = 0) { + return this.with(this.lineNumber + e, this.column + t); + } + equals(e) { + return XQ.equals(this, e); + } + static equals(e, t) { + if (!e && !t) { + return true; + } else { + return !!e && !!t && e.lineNumber === t.lineNumber && e.column === t.column; + } + } + isBefore(e) { + return XQ.isBefore(this, e); + } + static isBefore(e, t) { + if (e.lineNumber < t.lineNumber) { + return true; + } else if (t.lineNumber < e.lineNumber) { + return false; + } else { + return e.column < t.column; + } + } + isBeforeOrEqual(e) { + return XQ.isBeforeOrEqual(this, e); + } + static isBeforeOrEqual(e, t) { + if (e.lineNumber < t.lineNumber) { + return true; + } else if (t.lineNumber < e.lineNumber) { + return false; + } else { + return e.column <= t.column; + } + } + static compare(e, t) { + const s = e.lineNumber | 0; + const n = t.lineNumber | 0; + if (s === n) { + const r = e.column | 0; + const o = t.column | 0; + return r - o; + } + return s - n; + } + clone() { + return new XQ(this.lineNumber, this.column); + } + toString() { + return "(" + this.lineNumber + "," + this.column + ")"; + } + static lift(e) { + return new XQ(e.lineNumber, e.column); + } + static isIPosition(e) { + return e && typeof e.lineNumber == "number" && typeof e.column == "number"; + } + toJSON() { + return { + lineNumber: this.lineNumber, + column: this.column + }; + } + }; + } +}); +var $s; +var Rn = ue({ + "out-build/vs/editor/common/services/model.js"() { + "use strict"; + + te(); + $s = Ve("modelService"); + } +}); +function Iqn(i) { + return !!i.textEditorModel; +} +var ns; +var Ms = ue({ + "out-build/vs/editor/common/services/resolverService.js"() { + "use strict"; + + te(); + ns = Ve("textModelService"); + } +}); +function Ba(i) { + return { + id: i.id, + label: i.label, + tooltip: i.tooltip ?? i.label, + class: i.class, + enabled: i.enabled ?? true, + checked: i.checked, + run: async (...e) => i.run(...e) + }; +} +var Yt; +var ff; +var gr; +var mg; +var BJi; +var Fs = ue({ + "out-build/vs/base/common/actions.js"() { + "use strict"; + + pe(); + q(); + X(); + Yt = class extends H { + constructor(i, e = "", t = "", s = true, n) { + super(); + this.j = this.D(new B()); + this.onDidChange = this.j.event; + this.w = true; + this.m = i; + this.n = e; + this.u = t; + this.w = s; + this.C = n; + } + get id() { + return this.m; + } + get label() { + return this.n; + } + set label(i) { + this.F(i); + } + F(i) { + if (this.n !== i) { + this.n = i; + this.j.fire({ + label: i + }); + } + } + get tooltip() { + return this.q || ""; + } + set tooltip(i) { + this.G(i); + } + G(i) { + if (this.q !== i) { + this.q = i; + this.j.fire({ + tooltip: i + }); + } + } + get class() { + return this.u; + } + set class(i) { + this.H(i); + } + H(i) { + if (this.u !== i) { + this.u = i; + this.j.fire({ + class: i + }); + } + } + get enabled() { + return this.w; + } + set enabled(i) { + this.I(i); + } + I(i) { + if (this.w !== i) { + this.w = i; + this.j.fire({ + enabled: i + }); + } + } + get checked() { + return this.z; + } + set checked(i) { + this.J(i); + } + J(i) { + if (this.z !== i) { + this.z = i; + this.j.fire({ + checked: i + }); + } + } + async run(i, e) { + if (this.C) { + await this.C(i); + } + } + }; + ff = class extends H { + constructor() { + super(...arguments); + this.f = this.D(new B()); + this.onWillRun = this.f.event; + this.m = this.D(new B()); + this.onDidRun = this.m.event; + } + async run(i, e) { + if (!i.enabled) { + return; + } + this.f.fire({ + action: i + }); + let t; + try { + await this.q(i, e); + } catch (s) { + t = s; + } + this.m.fire({ + action: i, + error: t + }); + } + async q(i, e) { + await i.run(e); + } + }; + gr = class v3i { + constructor() { + this.id = v3i.ID; + this.label = ""; + this.tooltip = ""; + this.class = "separator"; + this.enabled = false; + this.checked = false; + } + static join(...e) { + let t = []; + for (const s of e) { + if (s.length) { + if (t.length) { + t = [...t, new v3i(), ...s]; + } else { + t = s; + } + } + } + return t; + } + static { + this.ID = "vs.actions.separator"; + } + async run() {} + }; + mg = class { + get actions() { + return this.a; + } + constructor(i, e, t, s) { + this.tooltip = ""; + this.enabled = true; + this.checked = undefined; + this.id = i; + this.label = e; + this.class = s; + this.a = t; + } + async run() {} + }; + BJi = class oFn extends Yt { + static { + this.ID = "vs.actions.empty"; + } + constructor() { + super(oFn.ID, f(44, null), undefined, false); + } + }; + } +}); +function ye(i, e) { + if (yi(e)) { + const t = Hrt[e]; + if (t === undefined) { + throw new Error(`${i} references an unknown codicon: ${e}`); + } + e = t; + } + Hrt[i] = e; + return { + id: i + }; +} +function UJi() { + return Hrt; +} +var Hrt; +var qrt = ue({ + "out-build/vs/base/common/codiconsUtil.js"() { + "use strict"; + + zt(); + Hrt = Object.create(null); + } +}); +var uge; +var O6t = ue({ + "out-build/vs/base/common/codiconsLibrary.js"() { + "use strict"; + + qrt(); + uge = { + semantic: ye("semantic", 62000), + githubCopilot: ye("github-copilot", 62001), + plusCircle: ye("plus-circle", 62002), + smileySad: ye("smiley-sad", 62003), + smileyHappy: ye("smiley-happy", 62004), + smileyMedium: ye("smiley-medium", 62005), + sparkleStrikethrough: ye("sparkle-strikethrough", 62006), + keyPlusSparkle: ye("key-plus-sparkle", 62007), + paperclip: ye("paperclip", 60500), + atSign: ye("at-sign", 60501), + image: ye("image", 60502), + logo: ye("logo", 60503), + sparkleTwo: ye("sparkle-two", 60504), + logoSlash: ye("logo-slash", 60505), + add: ye("add", 60000), + plus: ye("plus", 60000), + gistNew: ye("gist-new", 60000), + repoCreate: ye("repo-create", 60000), + lightbulb: ye("lightbulb", 60001), + lightBulb: ye("light-bulb", 60001), + repo: ye("repo", 60002), + repoDelete: ye("repo-delete", 60002), + gistFork: ye("gist-fork", 60003), + repoForked: ye("repo-forked", 60003), + gitPullRequest: ye("git-pull-request", 60004), + gitPullRequestAbandoned: ye("git-pull-request-abandoned", 60004), + recordKeys: ye("record-keys", 60005), + keyboard: ye("keyboard", 60005), + tag: ye("tag", 60006), + gitPullRequestLabel: ye("git-pull-request-label", 60006), + tagAdd: ye("tag-add", 60006), + tagRemove: ye("tag-remove", 60006), + person: ye("person", 60007), + personFollow: ye("person-follow", 60007), + personOutline: ye("person-outline", 60007), + personFilled: ye("person-filled", 60007), + gitBranch: ye("git-branch", 60008), + gitBranchCreate: ye("git-branch-create", 60008), + gitBranchDelete: ye("git-branch-delete", 60008), + sourceControl: ye("source-control", 60008), + mirror: ye("mirror", 60009), + mirrorPublic: ye("mirror-public", 60009), + star: ye("star", 60010), + starAdd: ye("star-add", 60010), + starDelete: ye("star-delete", 60010), + starEmpty: ye("star-empty", 60010), + comment: ye("comment", 60011), + commentAdd: ye("comment-add", 60011), + alert: ye("alert", 60012), + warning: ye("warning", 60012), + search: ye("search", 60013), + searchSave: ye("search-save", 60013), + logOut: ye("log-out", 60014), + signOut: ye("sign-out", 60014), + logIn: ye("log-in", 60015), + signIn: ye("sign-in", 60015), + eye: ye("eye", 60016), + eyeUnwatch: ye("eye-unwatch", 60016), + eyeWatch: ye("eye-watch", 60016), + circleFilled: ye("circle-filled", 60017), + primitiveDot: ye("primitive-dot", 60017), + closeDirty: ye("close-dirty", 60017), + debugBreakpoint: ye("debug-breakpoint", 60017), + debugBreakpointDisabled: ye("debug-breakpoint-disabled", 60017), + debugHint: ye("debug-hint", 60017), + terminalDecorationSuccess: ye("terminal-decoration-success", 60017), + primitiveSquare: ye("primitive-square", 60018), + edit: ye("edit", 60019), + pencil: ye("pencil", 60019), + info: ye("info", 60020), + issueOpened: ye("issue-opened", 60020), + gistPrivate: ye("gist-private", 60021), + gitForkPrivate: ye("git-fork-private", 60021), + lock: ye("lock", 60021), + mirrorPrivate: ye("mirror-private", 60021), + close: ye("close", 60022), + removeClose: ye("remove-close", 60022), + x: ye("x", 60022), + repoSync: ye("repo-sync", 60023), + sync: ye("sync", 60023), + clone: ye("clone", 60024), + desktopDownload: ye("desktop-download", 60024), + beaker: ye("beaker", 60025), + microscope: ye("microscope", 60025), + vm: ye("vm", 60026), + deviceDesktop: ye("device-desktop", 60026), + file: ye("file", 60027), + fileText: ye("file-text", 60027), + more: ye("more", 60028), + ellipsis: ye("ellipsis", 60028), + kebabHorizontal: ye("kebab-horizontal", 60028), + mailReply: ye("mail-reply", 60029), + reply: ye("reply", 60029), + organization: ye("organization", 60030), + organizationFilled: ye("organization-filled", 60030), + organizationOutline: ye("organization-outline", 60030), + newFile: ye("new-file", 60031), + fileAdd: ye("file-add", 60031), + newFolder: ye("new-folder", 60032), + fileDirectoryCreate: ye("file-directory-create", 60032), + trash: ye("trash", 60033), + trashcan: ye("trashcan", 60033), + history: ye("history", 60034), + clock: ye("clock", 60034), + folder: ye("folder", 60035), + fileDirectory: ye("file-directory", 60035), + symbolFolder: ye("symbol-folder", 60035), + logoGithub: ye("logo-github", 60036), + markGithub: ye("mark-github", 60036), + github: ye("github", 60036), + terminal: ye("terminal", 60037), + console: ye("console", 60037), + repl: ye("repl", 60037), + zap: ye("zap", 60038), + symbolEvent: ye("symbol-event", 60038), + error: ye("error", 60039), + stop: ye("stop", 60039), + variable: ye("variable", 60040), + symbolVariable: ye("symbol-variable", 60040), + array: ye("array", 60042), + symbolArray: ye("symbol-array", 60042), + symbolModule: ye("symbol-module", 60043), + symbolPackage: ye("symbol-package", 60043), + symbolNamespace: ye("symbol-namespace", 60043), + symbolObject: ye("symbol-object", 60043), + symbolMethod: ye("symbol-method", 60044), + symbolFunction: ye("symbol-function", 60044), + symbolConstructor: ye("symbol-constructor", 60044), + symbolBoolean: ye("symbol-boolean", 60047), + symbolNull: ye("symbol-null", 60047), + symbolNumeric: ye("symbol-numeric", 60048), + symbolNumber: ye("symbol-number", 60048), + symbolStructure: ye("symbol-structure", 60049), + symbolStruct: ye("symbol-struct", 60049), + symbolParameter: ye("symbol-parameter", 60050), + symbolTypeParameter: ye("symbol-type-parameter", 60050), + symbolKey: ye("symbol-key", 60051), + symbolText: ye("symbol-text", 60051), + symbolReference: ye("symbol-reference", 60052), + goToFile: ye("go-to-file", 60052), + symbolEnum: ye("symbol-enum", 60053), + symbolValue: ye("symbol-value", 60053), + symbolRuler: ye("symbol-ruler", 60054), + symbolUnit: ye("symbol-unit", 60054), + activateBreakpoints: ye("activate-breakpoints", 60055), + archive: ye("archive", 60056), + arrowBoth: ye("arrow-both", 60057), + arrowDown: ye("arrow-down", 60058), + arrowLeft: ye("arrow-left", 60059), + arrowRight: ye("arrow-right", 60060), + arrowSmallDown: ye("arrow-small-down", 60061), + arrowSmallLeft: ye("arrow-small-left", 60062), + arrowSmallRight: ye("arrow-small-right", 60063), + arrowSmallUp: ye("arrow-small-up", 60064), + arrowUp: ye("arrow-up", 60065), + bell: ye("bell", 60066), + bold: ye("bold", 60067), + book: ye("book", 60068), + bookmark: ye("bookmark", 60069), + debugBreakpointConditionalUnverified: ye("debug-breakpoint-conditional-unverified", 60070), + debugBreakpointConditional: ye("debug-breakpoint-conditional", 60071), + debugBreakpointConditionalDisabled: ye("debug-breakpoint-conditional-disabled", 60071), + debugBreakpointDataUnverified: ye("debug-breakpoint-data-unverified", 60072), + debugBreakpointData: ye("debug-breakpoint-data", 60073), + debugBreakpointDataDisabled: ye("debug-breakpoint-data-disabled", 60073), + debugBreakpointLogUnverified: ye("debug-breakpoint-log-unverified", 60074), + debugBreakpointLog: ye("debug-breakpoint-log", 60075), + debugBreakpointLogDisabled: ye("debug-breakpoint-log-disabled", 60075), + briefcase: ye("briefcase", 60076), + broadcast: ye("broadcast", 60077), + browser: ye("browser", 60078), + bug: ye("bug", 60079), + calendar: ye("calendar", 60080), + caseSensitive: ye("case-sensitive", 60081), + check: ye("check", 60082), + checklist: ye("checklist", 60083), + chevronDown: ye("chevron-down", 60084), + chevronLeft: ye("chevron-left", 60085), + chevronRight: ye("chevron-right", 60086), + chevronUp: ye("chevron-up", 60087), + chromeClose: ye("chrome-close", 60088), + chromeMaximize: ye("chrome-maximize", 60089), + chromeMinimize: ye("chrome-minimize", 60090), + chromeRestore: ye("chrome-restore", 60091), + circleOutline: ye("circle-outline", 60092), + circle: ye("circle", 60092), + debugBreakpointUnverified: ye("debug-breakpoint-unverified", 60092), + terminalDecorationIncomplete: ye("terminal-decoration-incomplete", 60092), + circleSlash: ye("circle-slash", 60093), + circuitBoard: ye("circuit-board", 60094), + clearAll: ye("clear-all", 60095), + clippy: ye("clippy", 60096), + closeAll: ye("close-all", 60097), + cloudDownload: ye("cloud-download", 60098), + cloudUpload: ye("cloud-upload", 60099), + code: ye("code", 60100), + collapseAll: ye("collapse-all", 60101), + colorMode: ye("color-mode", 60102), + commentDiscussion: ye("comment-discussion", 60103), + creditCard: ye("credit-card", 60105), + dash: ye("dash", 60108), + dashboard: ye("dashboard", 60109), + database: ye("database", 60110), + debugContinue: ye("debug-continue", 60111), + debugDisconnect: ye("debug-disconnect", 60112), + debugPause: ye("debug-pause", 60113), + debugRestart: ye("debug-restart", 60114), + debugStart: ye("debug-start", 60115), + debugStepInto: ye("debug-step-into", 60116), + debugStepOut: ye("debug-step-out", 60117), + debugStepOver: ye("debug-step-over", 60118), + debugStop: ye("debug-stop", 60119), + debug: ye("debug", 60120), + deviceCameraVideo: ye("device-camera-video", 60121), + deviceCamera: ye("device-camera", 60122), + deviceMobile: ye("device-mobile", 60123), + diffAdded: ye("diff-added", 60124), + diffIgnored: ye("diff-ignored", 60125), + diffModified: ye("diff-modified", 60126), + diffRemoved: ye("diff-removed", 60127), + diffRenamed: ye("diff-renamed", 60128), + diff: ye("diff", 60129), + diffSidebyside: ye("diff-sidebyside", 60129), + discard: ye("discard", 60130), + editorLayout: ye("editor-layout", 60131), + emptyWindow: ye("empty-window", 60132), + exclude: ye("exclude", 60133), + extensions: ye("extensions", 60134), + eyeClosed: ye("eye-closed", 60135), + fileBinary: ye("file-binary", 60136), + fileCode: ye("file-code", 60137), + fileMedia: ye("file-media", 60138), + filePdf: ye("file-pdf", 60139), + fileSubmodule: ye("file-submodule", 60140), + fileSymlinkDirectory: ye("file-symlink-directory", 60141), + fileSymlinkFile: ye("file-symlink-file", 60142), + fileZip: ye("file-zip", 60143), + files: ye("files", 60144), + filter: ye("filter", 60145), + flame: ye("flame", 60146), + foldDown: ye("fold-down", 60147), + foldUp: ye("fold-up", 60148), + fold: ye("fold", 60149), + folderActive: ye("folder-active", 60150), + folderOpened: ye("folder-opened", 60151), + gear: ye("gear", 60152), + gift: ye("gift", 60153), + gistSecret: ye("gist-secret", 60154), + gist: ye("gist", 60155), + gitCommit: ye("git-commit", 60156), + gitCompare: ye("git-compare", 60157), + compareChanges: ye("compare-changes", 60157), + gitMerge: ye("git-merge", 60158), + githubAction: ye("github-action", 60159), + githubAlt: ye("github-alt", 60160), + globe: ye("globe", 60161), + grabber: ye("grabber", 60162), + graph: ye("graph", 60163), + gripper: ye("gripper", 60164), + heart: ye("heart", 60165), + home: ye("home", 60166), + horizontalRule: ye("horizontal-rule", 60167), + hubot: ye("hubot", 60168), + inbox: ye("inbox", 60169), + issueReopened: ye("issue-reopened", 60171), + issues: ye("issues", 60172), + italic: ye("italic", 60173), + jersey: ye("jersey", 60174), + json: ye("json", 60175), + kebabVertical: ye("kebab-vertical", 60176), + key: ye("key", 60177), + law: ye("law", 60178), + lightbulbAutofix: ye("lightbulb-autofix", 60179), + linkExternal: ye("link-external", 60180), + link: ye("link", 60181), + listOrdered: ye("list-ordered", 60182), + listUnordered: ye("list-unordered", 60183), + liveShare: ye("live-share", 60184), + loading: ye("loading", 60185), + location: ye("location", 60186), + mailRead: ye("mail-read", 60187), + mail: ye("mail", 60188), + markdown: ye("markdown", 60189), + megaphone: ye("megaphone", 60190), + mention: ye("mention", 60191), + milestone: ye("milestone", 60192), + gitPullRequestMilestone: ye("git-pull-request-milestone", 60192), + mortarBoard: ye("mortar-board", 60193), + move: ye("move", 60194), + multipleWindows: ye("multiple-windows", 60195), + mute: ye("mute", 60196), + noNewline: ye("no-newline", 60197), + note: ye("note", 60198), + octoface: ye("octoface", 60199), + openPreview: ye("open-preview", 60200), + package: ye("package", 60201), + paintcan: ye("paintcan", 60202), + pin: ye("pin", 60203), + play: ye("play", 60204), + run: ye("run", 60204), + plug: ye("plug", 60205), + preserveCase: ye("preserve-case", 60206), + preview: ye("preview", 60207), + project: ye("project", 60208), + pulse: ye("pulse", 60209), + question: ye("question", 60210), + quote: ye("quote", 60211), + radioTower: ye("radio-tower", 60212), + reactions: ye("reactions", 60213), + references: ye("references", 60214), + refresh: ye("refresh", 60215), + regex: ye("regex", 60216), + remoteExplorer: ye("remote-explorer", 60217), + remote: ye("remote", 60218), + remove: ye("remove", 60219), + replaceAll: ye("replace-all", 60220), + replace: ye("replace", 60221), + repoClone: ye("repo-clone", 60222), + repoForcePush: ye("repo-force-push", 60223), + repoPull: ye("repo-pull", 60224), + repoPush: ye("repo-push", 60225), + report: ye("report", 60226), + requestChanges: ye("request-changes", 60227), + rocket: ye("rocket", 60228), + rootFolderOpened: ye("root-folder-opened", 60229), + rootFolder: ye("root-folder", 60230), + rss: ye("rss", 60231), + ruby: ye("ruby", 60232), + saveAll: ye("save-all", 60233), + saveAs: ye("save-as", 60234), + save: ye("save", 60235), + screenFull: ye("screen-full", 60236), + screenNormal: ye("screen-normal", 60237), + searchStop: ye("search-stop", 60238), + server: ye("server", 60240), + settingsGear: ye("settings-gear", 60241), + settings: ye("settings", 60242), + shield: ye("shield", 60243), + smiley: ye("smiley", 60244), + sortPrecedence: ye("sort-precedence", 60245), + splitHorizontal: ye("split-horizontal", 60246), + splitVertical: ye("split-vertical", 60247), + squirrel: ye("squirrel", 60248), + starFull: ye("star-full", 60249), + starHalf: ye("star-half", 60250), + symbolClass: ye("symbol-class", 60251), + symbolColor: ye("symbol-color", 60252), + symbolConstant: ye("symbol-constant", 60253), + symbolEnumMember: ye("symbol-enum-member", 60254), + symbolField: ye("symbol-field", 60255), + symbolFile: ye("symbol-file", 60256), + symbolInterface: ye("symbol-interface", 60257), + symbolKeyword: ye("symbol-keyword", 60258), + symbolMisc: ye("symbol-misc", 60259), + symbolOperator: ye("symbol-operator", 60260), + symbolProperty: ye("symbol-property", 60261), + wrench: ye("wrench", 60261), + wrenchSubaction: ye("wrench-subaction", 60261), + symbolSnippet: ye("symbol-snippet", 60262), + tasklist: ye("tasklist", 60263), + telescope: ye("telescope", 60264), + textSize: ye("text-size", 60265), + threeBars: ye("three-bars", 60266), + thumbsdown: ye("thumbsdown", 60267), + thumbsup: ye("thumbsup", 60268), + tools: ye("tools", 60269), + triangleDown: ye("triangle-down", 60270), + triangleLeft: ye("triangle-left", 60271), + triangleRight: ye("triangle-right", 60272), + triangleUp: ye("triangle-up", 60273), + twitter: ye("twitter", 60274), + unfold: ye("unfold", 60275), + unlock: ye("unlock", 60276), + unmute: ye("unmute", 60277), + unverified: ye("unverified", 60278), + verified: ye("verified", 60279), + versions: ye("versions", 60280), + vmActive: ye("vm-active", 60281), + vmOutline: ye("vm-outline", 60282), + vmRunning: ye("vm-running", 60283), + watch: ye("watch", 60284), + whitespace: ye("whitespace", 60285), + wholeWord: ye("whole-word", 60286), + window: ye("window", 60287), + wordWrap: ye("word-wrap", 60288), + zoomIn: ye("zoom-in", 60289), + zoomOut: ye("zoom-out", 60290), + listFilter: ye("list-filter", 60291), + listFlat: ye("list-flat", 60292), + listSelection: ye("list-selection", 60293), + selection: ye("selection", 60293), + listTree: ye("list-tree", 60294), + debugBreakpointFunctionUnverified: ye("debug-breakpoint-function-unverified", 60295), + debugBreakpointFunction: ye("debug-breakpoint-function", 60296), + debugBreakpointFunctionDisabled: ye("debug-breakpoint-function-disabled", 60296), + debugStackframeActive: ye("debug-stackframe-active", 60297), + circleSmallFilled: ye("circle-small-filled", 60298), + debugStackframeDot: ye("debug-stackframe-dot", 60298), + terminalDecorationMark: ye("terminal-decoration-mark", 60298), + debugStackframe: ye("debug-stackframe", 60299), + debugStackframeFocused: ye("debug-stackframe-focused", 60299), + debugBreakpointUnsupported: ye("debug-breakpoint-unsupported", 60300), + symbolString: ye("symbol-string", 60301), + debugReverseContinue: ye("debug-reverse-continue", 60302), + debugStepBack: ye("debug-step-back", 60303), + debugRestartFrame: ye("debug-restart-frame", 60304), + debugAlt: ye("debug-alt", 60305), + callIncoming: ye("call-incoming", 60306), + callOutgoing: ye("call-outgoing", 60307), + menu: ye("menu", 60308), + expandAll: ye("expand-all", 60309), + feedback: ye("feedback", 60310), + gitPullRequestReviewer: ye("git-pull-request-reviewer", 60310), + groupByRefType: ye("group-by-ref-type", 60311), + ungroupByRefType: ye("ungroup-by-ref-type", 60312), + account: ye("account", 60313), + gitPullRequestAssignee: ye("git-pull-request-assignee", 60313), + bellDot: ye("bell-dot", 60314), + debugConsole: ye("debug-console", 60315), + library: ye("library", 60316), + output: ye("output", 60317), + runAll: ye("run-all", 60318), + syncIgnored: ye("sync-ignored", 60319), + pinned: ye("pinned", 60320), + githubInverted: ye("github-inverted", 60321), + serverProcess: ye("server-process", 60322), + serverEnvironment: ye("server-environment", 60323), + pass: ye("pass", 60324), + issueClosed: ye("issue-closed", 60324), + stopCircle: ye("stop-circle", 60325), + playCircle: ye("play-circle", 60326), + record: ye("record", 60327), + debugAltSmall: ye("debug-alt-small", 60328), + vmConnect: ye("vm-connect", 60329), + cloud: ye("cloud", 60330), + merge: ye("merge", 60331), + export: ye("export", 60332), + graphLeft: ye("graph-left", 60333), + magnet: ye("magnet", 60334), + notebook: ye("notebook", 60335), + redo: ye("redo", 60336), + checkAll: ye("check-all", 60337), + pinnedDirty: ye("pinned-dirty", 60338), + passFilled: ye("pass-filled", 60339), + circleLargeFilled: ye("circle-large-filled", 60340), + circleLarge: ye("circle-large", 60341), + circleLargeOutline: ye("circle-large-outline", 60341), + combine: ye("combine", 60342), + gather: ye("gather", 60342), + table: ye("table", 60343), + variableGroup: ye("variable-group", 60344), + typeHierarchy: ye("type-hierarchy", 60345), + typeHierarchySub: ye("type-hierarchy-sub", 60346), + typeHierarchySuper: ye("type-hierarchy-super", 60347), + gitPullRequestCreate: ye("git-pull-request-create", 60348), + runAbove: ye("run-above", 60349), + runBelow: ye("run-below", 60350), + notebookTemplate: ye("notebook-template", 60351), + debugRerun: ye("debug-rerun", 60352), + workspaceTrusted: ye("workspace-trusted", 60353), + workspaceUntrusted: ye("workspace-untrusted", 60354), + workspaceUnknown: ye("workspace-unknown", 60355), + terminalCmd: ye("terminal-cmd", 60356), + terminalDebian: ye("terminal-debian", 60357), + terminalLinux: ye("terminal-linux", 60358), + terminalPowershell: ye("terminal-powershell", 60359), + terminalTmux: ye("terminal-tmux", 60360), + terminalUbuntu: ye("terminal-ubuntu", 60361), + terminalBash: ye("terminal-bash", 60362), + arrowSwap: ye("arrow-swap", 60363), + copy: ye("copy", 60364), + personAdd: ye("person-add", 60365), + filterFilled: ye("filter-filled", 60366), + wand: ye("wand", 60367), + debugLineByLine: ye("debug-line-by-line", 60368), + inspect: ye("inspect", 60369), + layers: ye("layers", 60370), + layersDot: ye("layers-dot", 60371), + layersActive: ye("layers-active", 60372), + compass: ye("compass", 60373), + compassDot: ye("compass-dot", 60374), + compassActive: ye("compass-active", 60375), + azure: ye("azure", 60376), + issueDraft: ye("issue-draft", 60377), + gitPullRequestClosed: ye("git-pull-request-closed", 60378), + gitPullRequestDraft: ye("git-pull-request-draft", 60379), + debugAll: ye("debug-all", 60380), + debugCoverage: ye("debug-coverage", 60381), + runErrors: ye("run-errors", 60382), + folderLibrary: ye("folder-library", 60383), + debugContinueSmall: ye("debug-continue-small", 60384), + beakerStop: ye("beaker-stop", 60385), + graphLine: ye("graph-line", 60386), + graphScatter: ye("graph-scatter", 60387), + pieChart: ye("pie-chart", 60388), + bracket: ye("bracket", 60175), + bracketDot: ye("bracket-dot", 60389), + bracketError: ye("bracket-error", 60390), + lockSmall: ye("lock-small", 60391), + azureDevops: ye("azure-devops", 60392), + verifiedFilled: ye("verified-filled", 60393), + newline: ye("newline", 60394), + layout: ye("layout", 60395), + layoutActivitybarLeft: ye("layout-activitybar-left", 60396), + layoutActivitybarRight: ye("layout-activitybar-right", 60397), + layoutPanelLeft: ye("layout-panel-left", 60398), + layoutPanelCenter: ye("layout-panel-center", 60399), + layoutPanelJustify: ye("layout-panel-justify", 60400), + layoutPanelRight: ye("layout-panel-right", 60401), + layoutPanel: ye("layout-panel", 60402), + layoutSidebarLeft: ye("layout-sidebar-left", 60403), + layoutSidebarRight: ye("layout-sidebar-right", 60404), + layoutStatusbar: ye("layout-statusbar", 60405), + layoutMenubar: ye("layout-menubar", 60406), + layoutCentered: ye("layout-centered", 60407), + target: ye("target", 60408), + indent: ye("indent", 60409), + recordSmall: ye("record-small", 60410), + errorSmall: ye("error-small", 60411), + terminalDecorationError: ye("terminal-decoration-error", 60411), + arrowCircleDown: ye("arrow-circle-down", 60412), + arrowCircleLeft: ye("arrow-circle-left", 60413), + arrowCircleRight: ye("arrow-circle-right", 60414), + arrowCircleUp: ye("arrow-circle-up", 60415), + layoutSidebarRightOff: ye("layout-sidebar-right-off", 60416), + layoutPanelOff: ye("layout-panel-off", 60417), + layoutSidebarLeftOff: ye("layout-sidebar-left-off", 60418), + blank: ye("blank", 60419), + heartFilled: ye("heart-filled", 60420), + map: ye("map", 60421), + mapHorizontal: ye("map-horizontal", 60421), + foldHorizontal: ye("fold-horizontal", 60421), + mapFilled: ye("map-filled", 60422), + mapHorizontalFilled: ye("map-horizontal-filled", 60422), + foldHorizontalFilled: ye("fold-horizontal-filled", 60422), + circleSmall: ye("circle-small", 60423), + bellSlash: ye("bell-slash", 60424), + bellSlashDot: ye("bell-slash-dot", 60425), + commentUnresolved: ye("comment-unresolved", 60426), + gitPullRequestGoToChanges: ye("git-pull-request-go-to-changes", 60427), + gitPullRequestNewChanges: ye("git-pull-request-new-changes", 60428), + searchFuzzy: ye("search-fuzzy", 60429), + commentDraft: ye("comment-draft", 60430), + send: ye("send", 60431), + sparkle: ye("sparkle", 60432), + insert: ye("insert", 60433), + mic: ye("mic", 60434), + thumbsdownFilled: ye("thumbsdown-filled", 60435), + thumbsupFilled: ye("thumbsup-filled", 60436), + coffee: ye("coffee", 60437), + snake: ye("snake", 60438), + game: ye("game", 60439), + vr: ye("vr", 60440), + chip: ye("chip", 60441), + piano: ye("piano", 60442), + music: ye("music", 60443), + micFilled: ye("mic-filled", 60444), + repoFetch: ye("repo-fetch", 60445), + copilot: ye("copilot", 60446), + lightbulbSparkle: ye("lightbulb-sparkle", 60447), + robot: ye("robot", 60448), + sparkleFilled: ye("sparkle-filled", 60449), + diffSingle: ye("diff-single", 60450), + diffMultiple: ye("diff-multiple", 60451), + surroundWith: ye("surround-with", 60452), + share: ye("share", 60453), + gitStash: ye("git-stash", 60454), + gitStashApply: ye("git-stash-apply", 60455), + gitStashPop: ye("git-stash-pop", 60456), + vscode: ye("vscode", 60457), + vscodeInsiders: ye("vscode-insiders", 60458), + codeOss: ye("code-oss", 60459), + runCoverage: ye("run-coverage", 60460), + runAllCoverage: ye("run-all-coverage", 60461), + coverage: ye("coverage", 60462), + githubProject: ye("github-project", 60463), + mapVertical: ye("map-vertical", 60464), + foldVertical: ye("fold-vertical", 60464), + mapVerticalFilled: ye("map-vertical-filled", 60465), + foldVerticalFilled: ye("fold-vertical-filled", 60465), + goToSearch: ye("go-to-search", 60466), + percentage: ye("percentage", 60467), + sortPercentage: ye("sort-percentage", 60467), + attach: ye("attach", 60468), + goToEditingSession: ye("go-to-editing-session", 60469), + editSession: ye("edit-session", 60470), + codeReview: ye("code-review", 60471), + copilotWarning: ye("copilot-warning", 60472), + python: ye("python", 60473), + copilotLarge: ye("copilot-large", 60474), + copilotWarningLarge: ye("copilot-warning-large", 60475), + terminalTwo: ye("terminal-two", 60800), + checkTwo: ye("check-two", 60801), + xTwo: ye("x-two", 60802), + expander: ye("expander", 60803), + restore: ye("restore", 60804), + pinTwo: ye("pin-two", 60805), + stopTwo: ye("stop-two", 60806), + brain: ye("brain", 60807), + magnifyingGlass: ye("magnifying-glass", 60808), + imageTwo: ye("image-two", 60809), + microphone: ye("microphone", 60810), + submit: ye("submit", 60811), + running: ye("running", 60812), + fileAddTwo: ye("file-add-two", 60813), + infinity: ye("infinity", 60814), + editTwo: ye("edit-two", 60815), + stopThree: ye("stop-three", 60816), + warningTwo: ye("warning-two", 60817), + arrowLeftTwo: ye("arrow-left-two", 60818), + redoTwo: ye("redo-two", 60819), + infoTwo: ye("info-two", 60820), + chat: ye("chat", 60821), + thumbsDown: ye("thumbs-down", 60822), + thumbsUp: ye("thumbs-up", 60823), + thumbsDownFilled: ye("thumbs-down-filled", 60824), + thumbsUpFilled: ye("thumbs-up-filled", 60825), + copyTwo: ye("copy-two", 60826), + ellipsisTwo: ye("ellipsis-two", 60827), + eyeTwo: ye("eye-two", 60828), + globeTwo: ye("globe-two", 60829), + reload: ye("reload", 60830), + folderTwo: ye("folder-two", 60831), + eraser: ye("eraser", 60832), + swirlSparkle: ye("swirl-sparkle", 60833), + sendTwo: ye("send-two", 60834), + inboxTwo: ye("inbox-two", 60835), + fileTwo: ye("file-two", 60836), + list: ye("list", 60837), + calendarTwo: ye("calendar-two", 60838), + openNotebook: ye("open-notebook", 60839), + paperWords: ye("paper-words", 60840), + mortarboard: ye("mortarboard", 60841), + lightning: ye("lightning", 60842), + hammer: ye("hammer", 60843), + keyboardTwo: ye("keyboard-two", 60844), + arrowUpTwo: ye("arrow-up-two", 60845), + import: ye("import", 60846), + targetTwo: ye("target-two", 60847), + tab: ye("tab", 60848), + magic: ye("magic", 60849), + cloneTwo: ye("clone-two", 60850), + brush: ye("brush", 60851), + branch: ye("branch", 60852), + addTwo: ye("add-two", 60853), + historyTwo: ye("history-two", 60854), + cloudTwo: ye("cloud-two", 60855), + review: ye("review", 60856), + plusSquare: ye("plus-square", 60857), + checkCircled: ye("check-circled", 60858), + dottedCircle: ye("dotted-circle", 60859), + warnCircle: ye("warn-circle", 60860), + downLocalMachine: ye("down-local-machine", 60861), + mergeUpwards: ye("merge-upwards", 60862), + asterisk: ye("asterisk", 60863), + time: ye("time", 60864), + arrowUpRight: ye("arrow-up-right", 60865), + arrowUpRightSquare: ye("arrow-up-right-square", 60866), + bubbleAndPencil: ye("bubble-and-pencil", 60867), + downloadOnSquare: ye("download-on-square", 60868), + shippingBox: ye("shipping-box", 60869) + }; + } +}); +function jrt() { + return Object.values(A); +} +var WJi; +var A; +var He = ue({ + "out-build/vs/base/common/codicons.js"() { + "use strict"; + + qrt(); + O6t(); + WJi = { + dialogError: ye("dialog-error", "error"), + dialogWarning: ye("dialog-warning", "warning"), + dialogInfo: ye("dialog-info", "info"), + dialogClose: ye("dialog-close", "close"), + treeItemExpanded: ye("tree-item-expanded", "chevron-down"), + treeFilterOnTypeOn: ye("tree-filter-on-type-on", "list-filter"), + treeFilterOnTypeOff: ye("tree-filter-on-type-off", "list-selection"), + treeFilterClear: ye("tree-filter-clear", "close"), + treeItemLoading: ye("tree-item-loading", "loading"), + menuSelection: ye("menu-selection", "check"), + menuSubmenu: ye("menu-submenu", "chevron-right"), + menuBarMore: ye("menubar-more", "more"), + scrollbarButtonLeft: ye("scrollbar-button-left", "triangle-left"), + scrollbarButtonRight: ye("scrollbar-button-right", "triangle-right"), + scrollbarButtonUp: ye("scrollbar-button-up", "triangle-up"), + scrollbarButtonDown: ye("scrollbar-button-down", "triangle-down"), + toolBarMore: ye("toolbar-more", "more"), + quickInputBack: ye("quick-input-back", "arrow-left"), + dropDownButton: ye("drop-down-button", 60084), + symbolCustomColor: ye("symbol-customcolor", 60252), + exportIcon: ye("export", 60332), + workspaceUnspecified: ye("workspace-unspecified", 60355), + newLine: ye("newline", 60394), + gitFetch: ye("git-fetch", 60445), + lightbulbSparkleAutofix: ye("lightbulb-sparkle-autofix", 60447), + debugBreakpointPending: ye("debug-breakpoint-pending", 60377) + }; + A = { + ...uge, + ...WJi + }; + } +}); +function V0(i) { + return { + id: i + }; +} +var _6t; +var le; +var Rt = ue({ + "out-build/vs/base/common/themables.js"() { + "use strict"; + + He(); + (function (i) { + function e(t) { + return t && typeof t == "object" && typeof t.id == "string"; + } + i.isThemeColor = e; + })(_6t ||= {}); + (function (i) { + i.iconNameSegment = "[A-Za-z0-9]+"; + i.iconNameExpression = "[A-Za-z0-9-]+"; + i.iconModifierExpression = "~[A-Za-z]+"; + i.iconNameCharacter = "[A-Za-z0-9~-]"; + const e = new RegExp(`^(${i.iconNameExpression})(${i.iconModifierExpression})?$`); + function t(h) { + const g = e.exec(h.id); + if (!g) { + return t(A.error); + } + const [, p, b] = g; + const v = ["codicon", "codicon-" + p]; + if (b) { + v.push("codicon-modifier-" + b.substring(1)); + } + return v; + } + i.asClassNameArray = t; + function s(h) { + const g = e.exec(h.id); + if (!g) { + return s(A.error); + } + const [, p, b] = g; + let v = `codicon codicon-${p}`; + if (b) { + v += ` codicon-modifier-${b.substring(1)}`; + } + return v; + } + i.asClassName = s; + function n(h) { + const g = e.exec(h.id); + if (!g) { + return n(A.error); + } + const [, p, b] = g; + let v = `.codicon.codicon-${p}`; + if (b) { + v += `.codicon-modifier-${b.substring(1)}`; + } + return v; + } + i.asCSSSelector = n; + function r(h) { + return h && typeof h == "object" && typeof h.id == "string" && (typeof h.color === "undefined" || _6t.isThemeColor(h.color)); + } + i.isThemeIcon = r; + const o = new RegExp(`^\\$\\((${i.iconNameExpression}(?:${i.iconModifierExpression})?)\\)$`); + function a(h) { + const g = o.exec(h); + if (!g) { + return; + } + const [, p] = g; + return { + id: p + }; + } + i.fromString = a; + function l(h) { + return { + id: h + }; + } + i.fromId = l; + function c(h, g) { + let p = h.id; + const b = p.lastIndexOf("~"); + if (b !== -1) { + p = p.substring(0, b); + } + if (g) { + p = `${p}~${g}`; + } + return { + id: p + }; + } + i.modify = c; + function u(h) { + const g = h.id.lastIndexOf("~"); + if (g !== -1) { + return h.id.substring(g + 1); + } + } + i.getModifier = u; + function d(h, g) { + return h.id === g.id && h.color?.id === g.color?.id; + } + i.isEqual = d; + })(le ||= {}); + } +}); +var gt; +var ei; +var Wt = ue({ + "out-build/vs/platform/commands/common/commands.js"() { + "use strict"; + + pe(); + sa(); + q(); + Av(); + zt(); + te(); + gt = Ve("commandService"); + ei = new class { + constructor() { + this.a = new Map(); + this.b = new B(); + this.onDidRegisterCommand = this.b.event; + } + registerCommand(i, e) { + if (!i) { + throw new Error("invalid command"); + } + if (typeof i == "string") { + if (!e) { + throw new Error("invalid command"); + } + return this.registerCommand({ + id: i, + handler: e + }); + } + if (i.metadata && Array.isArray(i.metadata.args)) { + const o = []; + for (const l of i.metadata.args) { + o.push(l.constraint); + } + const a = i.handler; + i.handler = function (l, ...c) { + lHn(c, o); + return a(l, ...c); + }; + } + const { + id: t + } = i; + let s = this.a.get(t); + if (!s) { + s = new hp(); + this.a.set(t, s); + } + const n = s.unshift(i); + const r = Ue(() => { + n(); + if (this.a.get(t)?.isEmpty()) { + this.a.delete(t); + } + }); + this.b.fire(t); + return IL(r); + } + registerCommandAlias(i, e) { + return ei.registerCommand(i, (t, ...s) => t.get(gt).executeCommand(e, ...s)); + } + getCommand(i) { + const e = this.a.get(i); + if (!!e && !e.isEmpty()) { + return Ws.first(e); + } + } + getCommands() { + const i = new Map(); + for (const e of this.a.keys()) { + const t = this.getCommand(e); + if (t) { + i.set(e, t); + } + } + return i; + } + }(); + ei.registerCommand("noop", () => {}); + ei.registerCommandAlias("inlineChat.hideHint", "noop"); + ei.registerCommandAlias("inlineChat.showHint", "noop"); + } +}); +function B6t(...i) { + switch (i.length) { + case 1: + return f(1728, null, i[0]); + case 2: + return f(1729, null, i[0], i[1]); + case 3: + return f(1730, null, i[0], i[1], i[2]); + default: + return; + } +} +var VJi; +var HJi; +var qJi; +var Cee; +var Dqn = ue({ + "out-build/vs/platform/contextkey/common/scanner.js"() { + "use strict"; + + Ut(); + X(); + (function (i) { + i[i.LParen = 0] = "LParen"; + i[i.RParen = 1] = "RParen"; + i[i.Neg = 2] = "Neg"; + i[i.Eq = 3] = "Eq"; + i[i.NotEq = 4] = "NotEq"; + i[i.Lt = 5] = "Lt"; + i[i.LtEq = 6] = "LtEq"; + i[i.Gt = 7] = "Gt"; + i[i.GtEq = 8] = "GtEq"; + i[i.RegexOp = 9] = "RegexOp"; + i[i.RegexStr = 10] = "RegexStr"; + i[i.True = 11] = "True"; + i[i.False = 12] = "False"; + i[i.In = 13] = "In"; + i[i.Not = 14] = "Not"; + i[i.And = 15] = "And"; + i[i.Or = 16] = "Or"; + i[i.Str = 17] = "Str"; + i[i.QuotedStr = 18] = "QuotedStr"; + i[i.Error = 19] = "Error"; + i[i.EOF = 20] = "EOF"; + })(VJi ||= {}); + HJi = f(1731, null); + qJi = f(1732, null); + Cee = class y3i { + constructor() { + this.c = ""; + this.d = 0; + this.e = 0; + this.f = []; + this.g = []; + this.m = /[a-zA-Z0-9_<>\-\./\\:\*\?\+\[\]\^,#@;"%\$\p{L}-]+/uy; + } + static getLexeme(e) { + switch (e.type) { + case 0: + return "("; + case 1: + return ")"; + case 2: + return "!"; + case 3: + if (e.isTripleEq) { + return "==="; + } else { + return "=="; + } + case 4: + if (e.isTripleEq) { + return "!=="; + } else { + return "!="; + } + case 5: + return "<"; + case 6: + return "<="; + case 7: + return ">="; + case 8: + return ">="; + case 9: + return "=~"; + case 10: + return e.lexeme; + case 11: + return "true"; + case 12: + return "false"; + case 13: + return "in"; + case 14: + return "not"; + case 15: + return "&&"; + case 16: + return "||"; + case 17: + return e.lexeme; + case 18: + return e.lexeme; + case 19: + return e.lexeme; + case 20: + return "EOF"; + default: + throw FBt(`unhandled token type: ${JSON.stringify(e)}; have you forgotten to add a case?`); + } + } + static { + this.a = new Set(["i", "g", "s", "m", "y", "u"].map(e => e.charCodeAt(0))); + } + static { + this.b = new Map([["not", 14], ["in", 13], ["false", 12], ["true", 11]]); + } + get errors() { + return this.g; + } + reset(e) { + this.c = e; + this.d = 0; + this.e = 0; + this.f = []; + this.g = []; + return this; + } + scan() { + while (!this.r()) { + this.d = this.e; + switch (this.i()) { + case 40: + this.k(0); + break; + case 41: + this.k(1); + break; + case 33: + if (this.h(61)) { + const t = this.h(61); + this.f.push({ + type: 4, + offset: this.d, + isTripleEq: t + }); + } else { + this.k(2); + } + break; + case 39: + this.o(); + break; + case 47: + this.q(); + break; + case 61: + if (this.h(61)) { + const t = this.h(61); + this.f.push({ + type: 3, + offset: this.d, + isTripleEq: t + }); + } else if (this.h(126)) { + this.k(9); + } else { + this.l(B6t("==", "=~")); + } + break; + case 60: + this.k(this.h(61) ? 6 : 5); + break; + case 62: + this.k(this.h(61) ? 8 : 7); + break; + case 38: + if (this.h(38)) { + this.k(15); + } else { + this.l(B6t("&&")); + } + break; + case 124: + if (this.h(124)) { + this.k(16); + } else { + this.l(B6t("||")); + } + break; + case 32: + case 13: + case 9: + case 10: + case 160: + break; + default: + this.n(); + } + } + this.d = this.e; + this.k(20); + return Array.from(this.f); + } + h(e) { + if (this.r() || this.c.charCodeAt(this.e) !== e) { + return false; + } else { + this.e++; + return true; + } + } + i() { + return this.c.charCodeAt(this.e++); + } + j() { + if (this.r()) { + return 0; + } else { + return this.c.charCodeAt(this.e); + } + } + k(e) { + this.f.push({ + type: e, + offset: this.d + }); + } + l(e) { + const t = this.d; + const s = this.c.substring(this.d, this.e); + const n = { + type: 19, + offset: this.d, + lexeme: s + }; + this.g.push({ + offset: t, + lexeme: s, + additionalInfo: e + }); + this.f.push(n); + } + n() { + this.m.lastIndex = this.d; + const e = this.m.exec(this.c); + if (e) { + this.e = this.d + e[0].length; + const t = this.c.substring(this.d, this.e); + const s = y3i.b.get(t); + if (s) { + this.k(s); + } else { + this.f.push({ + type: 17, + lexeme: t, + offset: this.d + }); + } + } + } + o() { + while (this.j() !== 39 && !this.r()) { + this.i(); + } + if (this.r()) { + this.l(HJi); + return; + } + this.i(); + this.f.push({ + type: 18, + lexeme: this.c.substring(this.d + 1, this.e - 1), + offset: this.d + 1 + }); + } + q() { + let e = this.e; + let t = false; + let s = false; + while (true) { + if (e >= this.c.length) { + this.e = e; + this.l(qJi); + return; + } + const r = this.c.charCodeAt(e); + if (t) { + t = false; + } else if (r === 47 && !s) { + e++; + break; + } else if (r === 91) { + s = true; + } else if (r === 92) { + t = true; + } else if (r === 93) { + s = false; + } + e++; + } + while (e < this.c.length && y3i.a.has(this.c.charCodeAt(e))) { + e++; + } + this.e = e; + const n = this.c.substring(this.d, this.e); + this.f.push({ + type: 10, + lexeme: n, + offset: this.d + }); + } + r() { + return this.e >= this.c.length; + } + }; + } +}); +function Tqn(i, e) { + if (See.has(i)) { + console.warn(`A context key function with id '${i}' is already registered. Function collisions can lead to unexpected behavior.`); + See.delete(i); + } + See.set(i, e); + return { + dispose: () => { + See.delete(i); + } + }; +} +function jJi(i) { + return See.get(i); +} +function Pqn(i, e) { + if (Uv.get(i) !== undefined) { + throw Hl("contextkey.setConstant(k, v) invoked with already set constant `k`"); + } + Uv.set(i, e); +} +function Lqn(i, e) { + const t = i ? i.substituteConstants() : undefined; + const s = e ? e.substituteConstants() : undefined; + if (!t && !s) { + return true; + } else if (!t || !s) { + return false; + } else { + return t.equals(s); + } +} +function dge(i, e) { + return i.cmp(e); +} +function zrt(i, e) { + if (typeof i == "string") { + const t = parseFloat(i); + if (!isNaN(t)) { + i = t; + } + } + if (typeof i == "string" || typeof i == "number") { + return e(i); + } else { + return wx.INSTANCE; + } +} +function zJi(i) { + let e = null; + for (let t = 0, s = i.length; t < s; t++) { + const n = i[t].substituteConstants(); + if (i[t] !== n && e === null) { + e = []; + for (let r = 0; r < t; r++) { + e[r] = i[r]; + } + } + if (e !== null) { + e[t] = n; + } + } + if (e === null) { + return i; + } else { + return e; + } +} +function U6t(i, e) { + if (i < e) { + return -1; + } else if (i > e) { + return 1; + } else { + return 0; + } +} +function nj(i, e, t, s) { + if (i < t) { + return -1; + } else if (i > t) { + return 1; + } else if (e < s) { + return -1; + } else if (e > s) { + return 1; + } else { + return 0; + } +} +function W6t(i, e) { + if (i.type === 0 || e.type === 1) { + return true; + } + if (i.type === 9) { + if (e.type === 9) { + return JJi(i.expr, e.expr); + } else { + return false; + } + } + if (e.type === 9) { + for (const t of e.expr) { + if (W6t(i, t)) { + return true; + } + } + return false; + } + if (i.type === 6) { + if (e.type === 6) { + return JJi(e.expr, i.expr); + } + for (const t of i.expr) { + if (W6t(t, e)) { + return true; + } + } + return false; + } + return i.equals(e); +} +function JJi(i, e) { + let t = 0; + let s = 0; + while (t < i.length && s < e.length) { + const n = i[t].cmp(e[s]); + if (n < 0) { + return false; + } + if (n === 0) { + t++; + } + s++; + } + return t === i.length; +} +function GJi(i) { + if (i.type === 9) { + return i.expr; + } else { + return [i]; + } +} +var Uv; +var See; +var KJi; +var YJi; +var XJi; +var QJi; +var ZJi; +var eGi; +var V6t; +var tGi; +var iGi; +var sGi; +var nGi; +var rGi; +var T; +var Jrt; +var wx; +var t1; +var rj; +var oj; +var H6t; +var q6t; +var hge; +var xee; +var fge; +var Grt; +var Krt; +var Yrt; +var Xrt; +var oGi; +var j6t; +var Qrt; +var fe; +var Ne; +var Ee = ue({ + "out-build/vs/platform/contextkey/common/contextkey.js"() { + "use strict"; + + rt(); + $i(); + Dqn(); + te(); + X(); + Ut(); + Uv = new Map(); + Uv.set("false", false); + Uv.set("true", true); + Uv.set("isMac", Gt); + Uv.set("isLinux", yl); + Uv.set("isWindows", ln); + Uv.set("isWeb", tn); + Uv.set("isMacNative", Gt && !tn); + Uv.set("isEdge", Nnt); + Uv.set("isFirefox", Lnt); + Uv.set("isChrome", Mq); + Uv.set("isSafari", Rnt); + See = new Map(); + KJi = Object.prototype.hasOwnProperty; + (function (i) { + i[i.False = 0] = "False"; + i[i.True = 1] = "True"; + i[i.Defined = 2] = "Defined"; + i[i.Not = 3] = "Not"; + i[i.Equals = 4] = "Equals"; + i[i.NotEquals = 5] = "NotEquals"; + i[i.And = 6] = "And"; + i[i.Regex = 7] = "Regex"; + i[i.NotRegex = 8] = "NotRegex"; + i[i.Or = 9] = "Or"; + i[i.In = 10] = "In"; + i[i.NotIn = 11] = "NotIn"; + i[i.Greater = 12] = "Greater"; + i[i.GreaterEquals = 13] = "GreaterEquals"; + i[i.Smaller = 14] = "Smaller"; + i[i.SmallerEquals = 15] = "SmallerEquals"; + i[i.Function = 16] = "Function"; + })(YJi ||= {}); + XJi = { + regexParsingWithErrorRecovery: true + }; + QJi = f(1708, null); + ZJi = f(1709, null); + eGi = f(1710, null); + V6t = f(1711, null); + tGi = f(1712, null); + iGi = f(1713, null); + sGi = f(1714, null); + nGi = f(1715, null); + rGi = class WPe { + static { + this.c = new Error(); + } + get lexingErrors() { + return this.d.errors; + } + get parsingErrors() { + return this.h; + } + constructor(e = XJi) { + this.k = e; + this.d = new Cee(); + this.f = []; + this.g = 0; + this.h = []; + this.v = /g|y/g; + } + parse(e) { + if (e === "") { + this.h.push({ + message: QJi, + offset: 0, + lexeme: "", + additionalInfo: ZJi + }); + return; + } + this.f = this.d.reset(e).scan(); + this.g = 0; + this.h = []; + try { + const t = this.l(); + if (!this.E()) { + const s = this.D(); + const n = s.type === 17 ? iGi : undefined; + this.h.push({ + message: tGi, + offset: s.offset, + lexeme: Cee.getLexeme(s), + additionalInfo: n + }); + throw WPe.c; + } + return t; + } catch (t) { + if (t !== WPe.c) { + throw t; + } + return; + } + } + l() { + return this.m(); + } + m() { + const e = [this.o()]; + while (this.y(16)) { + const t = this.o(); + e.push(t); + } + if (e.length === 1) { + return e[0]; + } else { + return T.or(...e); + } + } + o() { + const e = [this.s()]; + while (this.y(15)) { + const t = this.s(); + e.push(t); + } + if (e.length === 1) { + return e[0]; + } else { + return T.and(...e); + } + } + s() { + if (this.y(2)) { + const e = this.D(); + switch (e.type) { + case 11: + this.z(); + return wx.INSTANCE; + case 12: + this.z(); + return t1.INSTANCE; + case 0: + { + this.z(); + const t = this.l(); + this.A(1, V6t); + return t?.negate(); + } + case 17: + this.z(); + return xee.create(e.lexeme); + default: + throw this.B("KEY | true | false | '(' expression ')'", e); + } + } + return this.t(); + } + t() { + const e = this.D(); + switch (e.type) { + case 11: + this.z(); + return T.true(); + case 12: + this.z(); + return T.false(); + case 0: + { + this.z(); + const t = this.l(); + this.A(1, V6t); + return t; + } + case 17: + { + if (e.lexeme.startsWith("@")) { + this.z(); + const n = e.lexeme.substring(1); + if (n.startsWith("!")) { + const o = n.substring(1); + const a = jJi(o); + if (a) { + return Jrt.createWithoutRegistration(n, () => !a()); + } + } + const r = jJi(n) || (() => false); + return Jrt.createWithoutRegistration(n, r); + } + const t = e.lexeme; + this.z(); + if (this.y(9)) { + const n = this.D(); + if (!this.k.regexParsingWithErrorRecovery) { + this.z(); + if (n.type !== 10) { + throw this.B("REGEX", n); + } + const r = n.lexeme; + const o = r.lastIndexOf("/"); + const a = o === r.length - 1 ? undefined : this.w(r.substring(o + 1)); + let l; + try { + l = new RegExp(r.substring(1, o), a); + } catch { + throw this.B("REGEX", n); + } + return Xrt.create(t, l); + } + switch (n.type) { + case 10: + case 19: + { + const r = [n.lexeme]; + this.z(); + let o = this.D(); + let a = 0; + for (let h = 0; h < n.lexeme.length; h++) { + if (n.lexeme.charCodeAt(h) === 40) { + a++; + } else if (n.lexeme.charCodeAt(h) === 41) { + a--; + } + } + while (!this.E() && o.type !== 15 && o.type !== 16) { + switch (o.type) { + case 0: + a++; + break; + case 1: + a--; + break; + case 10: + case 18: + for (let h = 0; h < o.lexeme.length; h++) { + if (o.lexeme.charCodeAt(h) === 40) { + a++; + } else if (n.lexeme.charCodeAt(h) === 41) { + a--; + } + } + } + if (a < 0) { + break; + } + r.push(Cee.getLexeme(o)); + this.z(); + o = this.D(); + } + const l = r.join(""); + const c = l.lastIndexOf("/"); + const u = c === l.length - 1 ? undefined : this.w(l.substring(c + 1)); + let d; + try { + d = new RegExp(l.substring(1, c), u); + } catch { + throw this.B("REGEX", n); + } + return T.regex(t, d); + } + case 18: + { + const r = n.lexeme; + this.z(); + let o = null; + if (!Ay(r)) { + const a = r.indexOf("/"); + const l = r.lastIndexOf("/"); + if (a !== l && a >= 0) { + const c = r.slice(a + 1, l); + const u = r[l + 1] === "i" ? "i" : ""; + try { + o = new RegExp(c, u); + } catch { + throw this.B("REGEX", n); + } + } + } + if (o === null) { + throw this.B("REGEX", n); + } + return Xrt.create(t, o); + } + default: + throw this.B("REGEX", this.D()); + } + } + if (this.y(14)) { + this.A(13, eGi); + const n = this.u(); + return T.notIn(t, n); + } + switch (this.D().type) { + case 3: + { + this.z(); + const n = this.u(); + if (this.x().type === 18) { + return T.equals(t, n); + } + switch (n) { + case "true": + return T.has(t); + case "false": + return T.not(t); + default: + return T.equals(t, n); + } + } + case 4: + { + this.z(); + const n = this.u(); + if (this.x().type === 18) { + return T.notEquals(t, n); + } + switch (n) { + case "true": + return T.not(t); + case "false": + return T.has(t); + default: + return T.notEquals(t, n); + } + } + case 5: + this.z(); + return Krt.create(t, this.u()); + case 6: + this.z(); + return Yrt.create(t, this.u()); + case 7: + this.z(); + return fge.create(t, this.u()); + case 8: + this.z(); + return Grt.create(t, this.u()); + case 13: + this.z(); + return T.in(t, this.u()); + default: + return T.has(t); + } + } + case 20: + this.h.push({ + message: sGi, + offset: e.offset, + lexeme: "", + additionalInfo: nGi + }); + throw WPe.c; + default: + throw this.B(`true | false | KEY + | KEY '=~' REGEX + | KEY ('==' | '!=' | '<' | '<=' | '>' | '>=' | 'in' | 'not' 'in') value`, this.D()); + } + } + u() { + const e = this.D(); + switch (e.type) { + case 17: + case 18: + this.z(); + return e.lexeme; + case 11: + this.z(); + return "true"; + case 12: + this.z(); + return "false"; + case 13: + this.z(); + return "in"; + default: + return ""; + } + } + w(e) { + return e.replaceAll(this.v, ""); + } + x() { + return this.f[this.g - 1]; + } + y(e) { + if (this.C(e)) { + this.z(); + return true; + } else { + return false; + } + } + z() { + if (!this.E()) { + this.g++; + } + return this.x(); + } + A(e, t) { + if (this.C(e)) { + return this.z(); + } + throw this.B(t, this.D()); + } + B(e, t, s) { + const n = f(1716, null, e, Cee.getLexeme(t)); + const r = t.offset; + const o = Cee.getLexeme(t); + this.h.push({ + message: n, + offset: r, + lexeme: o, + additionalInfo: s + }); + return WPe.c; + } + C(e) { + return this.D().type === e; + } + D() { + return this.f[this.g]; + } + E() { + return this.D().type === 20; + } + }; + T = class { + static false() { + return wx.INSTANCE; + } + static true() { + return t1.INSTANCE; + } + static has(i) { + return rj.create(i); + } + static equals(i, e) { + return oj.create(i, e); + } + static notEquals(i, e) { + return hge.create(i, e); + } + static regex(i, e) { + return Xrt.create(i, e); + } + static in(i, e) { + return H6t.create(i, e); + } + static notIn(i, e) { + return q6t.create(i, e); + } + static not(i) { + return xee.create(i); + } + static and(...i) { + return j6t.create(i, null, true); + } + static or(...i) { + return Qrt.create(i, null, true); + } + static greater(i, e) { + return fge.create(i, e); + } + static greaterEquals(i, e) { + return Grt.create(i, e); + } + static smaller(i, e) { + return Krt.create(i, e); + } + static smallerEquals(i, e) { + return Yrt.create(i, e); + } + static function(i, e) { + return Jrt.create(i, e); + } + static { + this.c = new rGi({ + regexParsingWithErrorRecovery: false + }); + } + static deserialize(i) { + if (i == null) { + return undefined; + } else { + return this.c.parse(i); + } + } + }; + Jrt = class lFt { + static create(e, t) { + Tqn(e, t); + return new lFt(e, t); + } + static createWithoutRegistration(e, t) { + return new lFt(e, t); + } + constructor(e, t) { + this.type = 16; + this.d = e; + this.c = t; + } + cmp(e) { + if (e.type !== this.type) { + return this.type - e.type; + } else { + return U6t(this.d, e.d); + } + } + equals(e) { + return e.type === this.type && this.d === e.d; + } + substituteConstants() { + return this; + } + evaluate(e) { + return this.c(); + } + serialize() { + return `@${this.d}`; + } + keys() { + return []; + } + map(e) { + return this; + } + negate() { + return lFt.createWithoutRegistration(`!${this.d}`, () => !this.c()); + } + }; + wx = class aFn { + static { + this.INSTANCE = new aFn(); + } + constructor() { + this.type = 0; + } + cmp(e) { + return this.type - e.type; + } + equals(e) { + return e.type === this.type; + } + substituteConstants() { + return this; + } + evaluate(e) { + return false; + } + serialize() { + return "false"; + } + keys() { + return []; + } + map(e) { + return this; + } + negate() { + return t1.INSTANCE; + } + }; + t1 = class lFn { + static { + this.INSTANCE = new lFn(); + } + constructor() { + this.type = 1; + } + cmp(e) { + return this.type - e.type; + } + equals(e) { + return e.type === this.type; + } + substituteConstants() { + return this; + } + evaluate(e) { + return true; + } + serialize() { + return "true"; + } + keys() { + return []; + } + map(e) { + return this; + } + negate() { + return wx.INSTANCE; + } + }; + rj = class cFn { + static create(e, t = null) { + const s = Uv.get(e); + if (typeof s == "boolean") { + if (s) { + return t1.INSTANCE; + } else { + return wx.INSTANCE; + } + } else { + return new cFn(e, t); + } + } + constructor(e, t) { + this.key = e; + this.c = t; + this.type = 2; + } + cmp(e) { + if (e.type !== this.type) { + return this.type - e.type; + } else { + return U6t(this.key, e.key); + } + } + equals(e) { + if (e.type === this.type) { + return this.key === e.key; + } else { + return false; + } + } + substituteConstants() { + const e = Uv.get(this.key); + if (typeof e == "boolean") { + if (e) { + return t1.INSTANCE; + } else { + return wx.INSTANCE; + } + } else { + return this; + } + } + evaluate(e) { + return !!e.getValue(this.key); + } + serialize() { + return this.key; + } + keys() { + return [this.key]; + } + map(e) { + return e.mapDefined(this.key); + } + negate() { + this.c ||= xee.create(this.key, this); + return this.c; + } + }; + oj = class uFn { + static create(e, t, s = null) { + if (typeof t == "boolean") { + if (t) { + return rj.create(e, s); + } else { + return xee.create(e, s); + } + } + const n = Uv.get(e); + if (typeof n == "boolean") { + if (t === (n ? "true" : "false")) { + return t1.INSTANCE; + } else { + return wx.INSTANCE; + } + } else { + return new uFn(e, t, s); + } + } + constructor(e, t, s) { + this.c = e; + this.d = t; + this.f = s; + this.type = 4; + } + cmp(e) { + if (e.type !== this.type) { + return this.type - e.type; + } else { + return nj(this.c, this.d, e.c, e.d); + } + } + equals(e) { + if (e.type === this.type) { + return this.c === e.c && this.d === e.d; + } else { + return false; + } + } + substituteConstants() { + const e = Uv.get(this.c); + if (typeof e == "boolean") { + const t = e ? "true" : "false"; + if (this.d === t) { + return t1.INSTANCE; + } else { + return wx.INSTANCE; + } + } + return this; + } + evaluate(e) { + return e.getValue(this.c) == this.d; + } + serialize() { + return `${this.c} == '${this.d}'`; + } + keys() { + return [this.c]; + } + map(e) { + return e.mapEquals(this.c, this.d); + } + negate() { + this.f ||= hge.create(this.c, this.d, this); + return this.f; + } + }; + H6t = class dFn { + static create(e, t) { + return new dFn(e, t); + } + constructor(e, t) { + this.d = e; + this.f = t; + this.type = 10; + this.c = null; + } + cmp(e) { + if (e.type !== this.type) { + return this.type - e.type; + } else { + return nj(this.d, this.f, e.d, e.f); + } + } + equals(e) { + if (e.type === this.type) { + return this.d === e.d && this.f === e.f; + } else { + return false; + } + } + substituteConstants() { + return this; + } + evaluate(e) { + const t = e.getValue(this.f); + const s = e.getValue(this.d); + if (Array.isArray(t)) { + return t.includes(s); + } else if (typeof s == "string" && typeof t == "object" && t !== null) { + return KJi.call(t, s); + } else { + return false; + } + } + serialize() { + return `${this.d} in '${this.f}'`; + } + keys() { + return [this.d, this.f]; + } + map(e) { + return e.mapIn(this.d, this.f); + } + negate() { + this.c ||= q6t.create(this.d, this.f); + return this.c; + } + }; + q6t = class hFn { + static create(e, t) { + return new hFn(e, t); + } + constructor(e, t) { + this.d = e; + this.f = t; + this.type = 11; + this.c = H6t.create(e, t); + } + cmp(e) { + if (e.type !== this.type) { + return this.type - e.type; + } else { + return this.c.cmp(e.c); + } + } + equals(e) { + if (e.type === this.type) { + return this.c.equals(e.c); + } else { + return false; + } + } + substituteConstants() { + return this; + } + evaluate(e) { + return !this.c.evaluate(e); + } + serialize() { + return `${this.d} not in '${this.f}'`; + } + keys() { + return this.c.keys(); + } + map(e) { + return e.mapNotIn(this.d, this.f); + } + negate() { + return this.c; + } + }; + hge = class fFn { + static create(e, t, s = null) { + if (typeof t == "boolean") { + if (t) { + return xee.create(e, s); + } else { + return rj.create(e, s); + } + } + const n = Uv.get(e); + if (typeof n == "boolean") { + if (t === (n ? "true" : "false")) { + return wx.INSTANCE; + } else { + return t1.INSTANCE; + } + } else { + return new fFn(e, t, s); + } + } + constructor(e, t, s) { + this.c = e; + this.d = t; + this.f = s; + this.type = 5; + } + cmp(e) { + if (e.type !== this.type) { + return this.type - e.type; + } else { + return nj(this.c, this.d, e.c, e.d); + } + } + equals(e) { + if (e.type === this.type) { + return this.c === e.c && this.d === e.d; + } else { + return false; + } + } + substituteConstants() { + const e = Uv.get(this.c); + if (typeof e == "boolean") { + const t = e ? "true" : "false"; + if (this.d === t) { + return wx.INSTANCE; + } else { + return t1.INSTANCE; + } + } + return this; + } + evaluate(e) { + return e.getValue(this.c) != this.d; + } + serialize() { + return `${this.c} != '${this.d}'`; + } + keys() { + return [this.c]; + } + map(e) { + return e.mapNotEquals(this.c, this.d); + } + negate() { + this.f ||= oj.create(this.c, this.d, this); + return this.f; + } + }; + xee = class gFn { + static create(e, t = null) { + const s = Uv.get(e); + if (typeof s == "boolean") { + if (s) { + return wx.INSTANCE; + } else { + return t1.INSTANCE; + } + } else { + return new gFn(e, t); + } + } + constructor(e, t) { + this.c = e; + this.d = t; + this.type = 3; + } + cmp(e) { + if (e.type !== this.type) { + return this.type - e.type; + } else { + return U6t(this.c, e.c); + } + } + equals(e) { + if (e.type === this.type) { + return this.c === e.c; + } else { + return false; + } + } + substituteConstants() { + const e = Uv.get(this.c); + if (typeof e == "boolean") { + if (e) { + return wx.INSTANCE; + } else { + return t1.INSTANCE; + } + } else { + return this; + } + } + evaluate(e) { + return !e.getValue(this.c); + } + serialize() { + return `!${this.c}`; + } + keys() { + return [this.c]; + } + map(e) { + return e.mapNot(this.c); + } + negate() { + this.d ||= rj.create(this.c, this); + return this.d; + } + }; + fge = class pFn { + static create(e, t, s = null) { + return zrt(t, n => new pFn(e, n, s)); + } + constructor(e, t, s) { + this.c = e; + this.d = t; + this.f = s; + this.type = 12; + } + cmp(e) { + if (e.type !== this.type) { + return this.type - e.type; + } else { + return nj(this.c, this.d, e.c, e.d); + } + } + equals(e) { + if (e.type === this.type) { + return this.c === e.c && this.d === e.d; + } else { + return false; + } + } + substituteConstants() { + return this; + } + evaluate(e) { + if (typeof this.d == "string") { + return false; + } else { + return parseFloat(e.getValue(this.c)) > this.d; + } + } + serialize() { + return `${this.c} > ${this.d}`; + } + keys() { + return [this.c]; + } + map(e) { + return e.mapGreater(this.c, this.d); + } + negate() { + this.f ||= Yrt.create(this.c, this.d, this); + return this.f; + } + }; + Grt = class mFn { + static create(e, t, s = null) { + return zrt(t, n => new mFn(e, n, s)); + } + constructor(e, t, s) { + this.c = e; + this.d = t; + this.f = s; + this.type = 13; + } + cmp(e) { + if (e.type !== this.type) { + return this.type - e.type; + } else { + return nj(this.c, this.d, e.c, e.d); + } + } + equals(e) { + if (e.type === this.type) { + return this.c === e.c && this.d === e.d; + } else { + return false; + } + } + substituteConstants() { + return this; + } + evaluate(e) { + if (typeof this.d == "string") { + return false; + } else { + return parseFloat(e.getValue(this.c)) >= this.d; + } + } + serialize() { + return `${this.c} >= ${this.d}`; + } + keys() { + return [this.c]; + } + map(e) { + return e.mapGreaterEquals(this.c, this.d); + } + negate() { + this.f ||= Krt.create(this.c, this.d, this); + return this.f; + } + }; + Krt = class bFn { + static create(e, t, s = null) { + return zrt(t, n => new bFn(e, n, s)); + } + constructor(e, t, s) { + this.c = e; + this.d = t; + this.f = s; + this.type = 14; + } + cmp(e) { + if (e.type !== this.type) { + return this.type - e.type; + } else { + return nj(this.c, this.d, e.c, e.d); + } + } + equals(e) { + if (e.type === this.type) { + return this.c === e.c && this.d === e.d; + } else { + return false; + } + } + substituteConstants() { + return this; + } + evaluate(e) { + if (typeof this.d == "string") { + return false; + } else { + return parseFloat(e.getValue(this.c)) < this.d; + } + } + serialize() { + return `${this.c} < ${this.d}`; + } + keys() { + return [this.c]; + } + map(e) { + return e.mapSmaller(this.c, this.d); + } + negate() { + this.f ||= Grt.create(this.c, this.d, this); + return this.f; + } + }; + Yrt = class vFn { + static create(e, t, s = null) { + return zrt(t, n => new vFn(e, n, s)); + } + constructor(e, t, s) { + this.c = e; + this.d = t; + this.f = s; + this.type = 15; + } + cmp(e) { + if (e.type !== this.type) { + return this.type - e.type; + } else { + return nj(this.c, this.d, e.c, e.d); + } + } + equals(e) { + if (e.type === this.type) { + return this.c === e.c && this.d === e.d; + } else { + return false; + } + } + substituteConstants() { + return this; + } + evaluate(e) { + if (typeof this.d == "string") { + return false; + } else { + return parseFloat(e.getValue(this.c)) <= this.d; + } + } + serialize() { + return `${this.c} <= ${this.d}`; + } + keys() { + return [this.c]; + } + map(e) { + return e.mapSmallerEquals(this.c, this.d); + } + negate() { + this.f ||= fge.create(this.c, this.d, this); + return this.f; + } + }; + Xrt = class yFn { + static create(e, t) { + return new yFn(e, t); + } + constructor(e, t) { + this.d = e; + this.f = t; + this.type = 7; + this.c = null; + } + cmp(e) { + if (e.type !== this.type) { + return this.type - e.type; + } + if (this.d < e.d) { + return -1; + } + if (this.d > e.d) { + return 1; + } + const t = this.f ? this.f.source : ""; + const s = e.f ? e.f.source : ""; + if (t < s) { + return -1; + } else if (t > s) { + return 1; + } else { + return 0; + } + } + equals(e) { + if (e.type === this.type) { + const t = this.f ? this.f.source : ""; + const s = e.f ? e.f.source : ""; + return this.d === e.d && t === s; + } + return false; + } + substituteConstants() { + return this; + } + evaluate(e) { + const t = e.getValue(this.d); + if (this.f) { + return this.f.test(t); + } else { + return false; + } + } + serialize() { + const e = this.f ? `/${this.f.source}/${this.f.flags}` : "/invalid/"; + return `${this.d} =~ ${e}`; + } + keys() { + return [this.d]; + } + map(e) { + return e.mapRegex(this.d, this.f); + } + negate() { + this.c ||= oGi.create(this); + return this.c; + } + }; + oGi = class w3i { + static create(e) { + return new w3i(e); + } + constructor(e) { + this.c = e; + this.type = 8; + } + cmp(e) { + if (e.type !== this.type) { + return this.type - e.type; + } else { + return this.c.cmp(e.c); + } + } + equals(e) { + if (e.type === this.type) { + return this.c.equals(e.c); + } else { + return false; + } + } + substituteConstants() { + return this; + } + evaluate(e) { + return !this.c.evaluate(e); + } + serialize() { + return `!(${this.c.serialize()})`; + } + keys() { + return this.c.keys(); + } + map(e) { + return new w3i(this.c.map(e)); + } + negate() { + return this.c; + } + }; + j6t = class Cde { + static create(e, t, s) { + return Cde.d(e, t, s); + } + constructor(e, t) { + this.expr = e; + this.c = t; + this.type = 6; + } + cmp(e) { + if (e.type !== this.type) { + return this.type - e.type; + } + if (this.expr.length < e.expr.length) { + return -1; + } + if (this.expr.length > e.expr.length) { + return 1; + } + for (let t = 0, s = this.expr.length; t < s; t++) { + const n = dge(this.expr[t], e.expr[t]); + if (n !== 0) { + return n; + } + } + return 0; + } + equals(e) { + if (e.type === this.type) { + if (this.expr.length !== e.expr.length) { + return false; + } + for (let t = 0, s = this.expr.length; t < s; t++) { + if (!this.expr[t].equals(e.expr[t])) { + return false; + } + } + return true; + } + return false; + } + substituteConstants() { + const e = zJi(this.expr); + if (e === this.expr) { + return this; + } else { + return Cde.create(e, this.c, false); + } + } + evaluate(e) { + for (let t = 0, s = this.expr.length; t < s; t++) { + if (!this.expr[t].evaluate(e)) { + return false; + } + } + return true; + } + static d(e, t, s) { + const n = []; + let r = false; + for (const o of e) { + if (o) { + if (o.type === 1) { + r = true; + continue; + } + if (o.type === 0) { + return wx.INSTANCE; + } + if (o.type === 6) { + n.push(...o.expr); + continue; + } + n.push(o); + } + } + if (n.length === 0 && r) { + return t1.INSTANCE; + } + if (n.length !== 0) { + if (n.length === 1) { + return n[0]; + } + n.sort(dge); + for (let o = 1; o < n.length; o++) { + if (n[o - 1].equals(n[o])) { + n.splice(o, 1); + o--; + } + } + if (n.length === 1) { + return n[0]; + } + while (n.length > 1) { + const o = n[n.length - 1]; + if (o.type !== 9) { + break; + } + n.pop(); + const a = n.pop(); + const l = n.length === 0; + const c = Qrt.create(o.expr.map(u => Cde.create([u, a], null, s)), null, l); + if (c) { + n.push(c); + n.sort(dge); + } + } + if (n.length === 1) { + return n[0]; + } + if (s) { + for (let o = 0; o < n.length; o++) { + for (let a = o + 1; a < n.length; a++) { + if (n[o].negate().equals(n[a])) { + return wx.INSTANCE; + } + } + } + if (n.length === 1) { + return n[0]; + } + } + return new Cde(n, t); + } + } + serialize() { + return this.expr.map(e => e.serialize()).join(" && "); + } + keys() { + const e = []; + for (const t of this.expr) { + e.push(...t.keys()); + } + return e; + } + map(e) { + return new Cde(this.expr.map(t => t.map(e)), null); + } + negate() { + if (!this.c) { + const e = []; + for (const t of this.expr) { + e.push(t.negate()); + } + this.c = Qrt.create(e, this, true); + } + return this.c; + } + }; + Qrt = class QQ { + static create(e, t, s) { + return QQ.d(e, t, s); + } + constructor(e, t) { + this.expr = e; + this.c = t; + this.type = 9; + } + cmp(e) { + if (e.type !== this.type) { + return this.type - e.type; + } + if (this.expr.length < e.expr.length) { + return -1; + } + if (this.expr.length > e.expr.length) { + return 1; + } + for (let t = 0, s = this.expr.length; t < s; t++) { + const n = dge(this.expr[t], e.expr[t]); + if (n !== 0) { + return n; + } + } + return 0; + } + equals(e) { + if (e.type === this.type) { + if (this.expr.length !== e.expr.length) { + return false; + } + for (let t = 0, s = this.expr.length; t < s; t++) { + if (!this.expr[t].equals(e.expr[t])) { + return false; + } + } + return true; + } + return false; + } + substituteConstants() { + const e = zJi(this.expr); + if (e === this.expr) { + return this; + } else { + return QQ.create(e, this.c, false); + } + } + evaluate(e) { + for (let t = 0, s = this.expr.length; t < s; t++) { + if (this.expr[t].evaluate(e)) { + return true; + } + } + return false; + } + static d(e, t, s) { + let n = []; + let r = false; + if (e) { + for (let o = 0, a = e.length; o < a; o++) { + const l = e[o]; + if (l) { + if (l.type === 0) { + r = true; + continue; + } + if (l.type === 1) { + return t1.INSTANCE; + } + if (l.type === 9) { + n = n.concat(l.expr); + continue; + } + n.push(l); + } + } + if (n.length === 0 && r) { + return wx.INSTANCE; + } + n.sort(dge); + } + if (n.length !== 0) { + if (n.length === 1) { + return n[0]; + } + for (let o = 1; o < n.length; o++) { + if (n[o - 1].equals(n[o])) { + n.splice(o, 1); + o--; + } + } + if (n.length === 1) { + return n[0]; + } + if (s) { + for (let o = 0; o < n.length; o++) { + for (let a = o + 1; a < n.length; a++) { + if (n[o].negate().equals(n[a])) { + return t1.INSTANCE; + } + } + } + if (n.length === 1) { + return n[0]; + } + } + return new QQ(n, t); + } + } + serialize() { + return this.expr.map(e => e.serialize()).join(" || "); + } + keys() { + const e = []; + for (const t of this.expr) { + e.push(...t.keys()); + } + return e; + } + map(e) { + return new QQ(this.expr.map(t => t.map(e)), null); + } + negate() { + if (!this.c) { + const e = []; + for (const t of this.expr) { + e.push(t.negate()); + } + while (e.length > 1) { + const t = e.shift(); + const s = e.shift(); + const n = []; + for (const r of GJi(t)) { + for (const o of GJi(s)) { + n.push(j6t.create([r, o], null, false)); + } + } + e.unshift(QQ.create(n, null, false)); + } + this.c = QQ.create(e, this, true); + } + return this.c; + } + }; + fe = class cFt extends rj { + static { + this.d = []; + } + static all() { + return cFt.d.values(); + } + constructor(e, t, s) { + super(e, null); + this.f = t; + if (typeof s == "object") { + cFt.d.push({ + ...s, + key: e + }); + } else if (s !== true) { + cFt.d.push({ + key: e, + description: s, + type: t != null ? typeof t : undefined + }); + } + } + bindTo(e) { + return e.createKey(this.key, this.f); + } + getValue(e) { + return e.getContextKeyValue(this.key); + } + toNegated() { + return this.negate(); + } + isEqualTo(e) { + return oj.create(this.key, e); + } + notEqualsTo(e) { + return hge.create(this.key, e); + } + }; + Ne = Ve("contextKeyService"); + } +}); +function kee(i, e) { + if (!i) { + throw new Error(e ? `Assertion failed (${e})` : "Assertion Failed"); + } +} +function _L(i, e = "Unreachable") { + throw new Error(e); +} +function Zrt(i, e = "unexpected state") { + if (!i) { + throw new co(`Assertion Failed: ${e}`); + } +} +function aGi(i) { + if (!i) { + xs(new co("Soft Assertion Failed")); + } +} +function Kk(i) { + if (!i()) { + debugger; + i(); + xs(new co("Assertion Failed")); + } +} +function X2(i, e) { + let t = 0; + while (t < i.length - 1) { + const s = i[t]; + const n = i[t + 1]; + if (!e(s, n)) { + return false; + } + t++; + } + return true; +} +var bm = ue({ + "out-build/vs/base/common/assert.js"() { + "use strict"; + + Ut(); + } +}); +var lGi; +var Pe; +var Ht = ue({ + "out-build/vs/platform/registry/common/platform.js"() { + "use strict"; + + bm(); + zt(); + lGi = class { + constructor() { + this.a = new Map(); + } + add(i, e) { + kee(yi(i)); + kee(xo(e)); + kee(!this.a.has(i), "There is already an extension with this id"); + this.a.set(i, e); + } + knows(i) { + return this.a.has(i); + } + as(i) { + return this.a.get(i) || null; + } + }; + Pe = new lGi(); + } +}); +function Rqn(i, e) { + if (i.weight1 !== e.weight1) { + return i.weight1 - e.weight1; + } + if (i.command && e.command) { + if (i.command < e.command) { + return -1; + } + if (i.command > e.command) { + return 1; + } + } + return i.weight2 - e.weight2; +} +var cGi; +var uGi; +var Ci; +var dGi; +var Wu = ue({ + "out-build/vs/platform/keybinding/common/keybindingsRegistry.js"() { + "use strict"; + + wI(); + rt(); + Wt(); + Ht(); + q(); + Av(); + (function (i) { + i[i.EditorCore = 0] = "EditorCore"; + i[i.EditorContrib = 100] = "EditorContrib"; + i[i.WorkbenchContrib = 200] = "WorkbenchContrib"; + i[i.BuiltinExtension = 300] = "BuiltinExtension"; + i[i.ExternalExtension = 400] = "ExternalExtension"; + i[i.CursorDefaultPriority = 500] = "CursorDefaultPriority"; + i[i.CursorMaxPriority = 600] = "CursorMaxPriority"; + })(cGi ||= {}); + uGi = class wFn { + constructor() { + this.c = new hp(); + this.d = []; + this.e = null; + } + static f(e) { + if (Ia === 1) { + if (e && e.win) { + return e.win; + } + } else if (Ia === 2) { + if (e && e.mac) { + return e.mac; + } + } else if (e && e.linux) { + return e.linux; + } + return e; + } + registerKeybindingRule(e) { + const t = wFn.f(e); + const s = new Q(); + if (t && t.primary) { + const n = tee(t.primary, Ia); + if (n) { + s.add(this.g(n, e.id, e.args, e.weight, 0, e.when)); + } + } + if (t && Array.isArray(t.secondary)) { + for (let n = 0, r = t.secondary.length; n < r; n++) { + const o = t.secondary[n]; + const a = tee(o, Ia); + if (a) { + s.add(this.g(a, e.id, e.args, e.weight, -n - 1, e.when)); + } + } + } + return s; + } + setExtensionKeybindings(e) { + const t = []; + let s = 0; + for (const n of e) { + if (n.keybinding) { + t[s++] = { + keybinding: n.keybinding, + command: n.id, + commandArgs: n.args, + when: n.when, + weight1: n.weight, + weight2: 0, + extensionId: n.extensionId || null, + isBuiltinExtension: n.isBuiltinExtension || false + }; + } + } + this.d = t; + this.e = null; + } + registerCommandAndKeybindingRule(e) { + return Gc(this.registerKeybindingRule(e), ei.registerCommand(e)); + } + g(e, t, s, n, r, o) { + const a = this.c.push({ + keybinding: e, + command: t, + commandArgs: s, + when: o, + weight1: n, + weight2: r, + extensionId: null, + isBuiltinExtension: false + }); + this.e = null; + return Ue(() => { + a(); + this.e = null; + }); + } + getDefaultKeybindings() { + if (!this.e) { + this.e = Array.from(this.c).concat(this.d); + this.e.sort(Rqn); + } + return this.e.slice(0); + } + }; + Ci = new uGi(); + dGi = { + EditorModes: "platform.keybindingsRegistry" + }; + Pe.add(dGi.EditorModes, Ci); + } +}); +function GB(i) { + return i.command !== undefined; +} +function Nqn(i) { + return i.submenu !== undefined; +} +function J(i) { + const e = []; + const t = new i(); + const { + f1: s, + menu: n, + keybinding: r, + ...o + } = t.desc; + if (ei.getCommand(o.id)) { + throw new Error(`Cannot register two commands with the same id: ${o.id}`); + } + e.push(ei.registerCommand({ + id: o.id, + handler: (a, ...l) => t.run(a, ...l), + metadata: o.metadata ?? { + description: t.desc.title + } + })); + if (Array.isArray(n)) { + for (const a of n) { + e.push(Be.appendMenuItem(a.id, { + command: { + ...o, + precondition: a.precondition === null ? undefined : o.precondition + }, + ...a + })); + } + } else if (n) { + e.push(Be.appendMenuItem(n.id, { + command: { + ...o, + precondition: n.precondition === null ? undefined : o.precondition + }, + ...n + })); + } + if (s) { + e.push(Be.appendMenuItem(_.CommandPalette, { + command: o, + when: o.precondition + })); + e.push(Be.addCommand(o)); + } + if (Array.isArray(r)) { + for (const a of r) { + e.push(Ci.registerKeybindingRule({ + ...a, + id: o.id, + when: o.precondition ? T.and(o.precondition, a.when) : a.when + })); + } + } else if (r) { + e.push(Ci.registerKeybindingRule({ + ...r, + id: o.id, + when: o.precondition ? T.and(o.precondition, r.when) : r.when + })); + } + return { + dispose() { + si(e); + } + }; +} +var eot; +var _; +var Hn; +var g9; +var Be; +var vm; +var Ma; +var se; +var Je = ue({ + "out-build/vs/platform/actions/common/actions.js"() { + "use strict"; + + Fs(); + pe(); + q(); + Av(); + Rt(); + Wt(); + Ee(); + te(); + Wu(); + _ = class Yi { + static { + this.a = new Map(); + } + static { + this.CommandPalette = new Yi("CommandPalette"); + } + static { + this.DebugBreakpointsContext = new Yi("DebugBreakpointsContext"); + } + static { + this.DebugCallStackContext = new Yi("DebugCallStackContext"); + } + static { + this.DebugConsoleContext = new Yi("DebugConsoleContext"); + } + static { + this.DebugVariablesContext = new Yi("DebugVariablesContext"); + } + static { + this.NotebookVariablesContext = new Yi("NotebookVariablesContext"); + } + static { + this.DebugHoverContext = new Yi("DebugHoverContext"); + } + static { + this.DebugWatchContext = new Yi("DebugWatchContext"); + } + static { + this.DebugToolBar = new Yi("DebugToolBar"); + } + static { + this.DebugToolBarStop = new Yi("DebugToolBarStop"); + } + static { + this.DebugCallStackToolbar = new Yi("DebugCallStackToolbar"); + } + static { + this.DebugCreateConfiguration = new Yi("DebugCreateConfiguration"); + } + static { + this.EditorContext = new Yi("EditorContext"); + } + static { + this.SimpleEditorContext = new Yi("SimpleEditorContext"); + } + static { + this.EditorContent = new Yi("EditorContent"); + } + static { + this.EditorLineNumberContext = new Yi("EditorLineNumberContext"); + } + static { + this.EditorContextCopy = new Yi("EditorContextCopy"); + } + static { + this.EditorContextPeek = new Yi("EditorContextPeek"); + } + static { + this.EditorContextShare = new Yi("EditorContextShare"); + } + static { + this.EditorTitle = new Yi("EditorTitle"); + } + static { + this.EditorTitleRun = new Yi("EditorTitleRun"); + } + static { + this.EditorTitleContext = new Yi("EditorTitleContext"); + } + static { + this.EditorTitleContextShare = new Yi("EditorTitleContextShare"); + } + static { + this.EmptyEditorGroup = new Yi("EmptyEditorGroup"); + } + static { + this.EmptyEditorGroupContext = new Yi("EmptyEditorGroupContext"); + } + static { + this.EditorTabsBarContext = new Yi("EditorTabsBarContext"); + } + static { + this.EditorTabsBarShowTabsSubmenu = new Yi("EditorTabsBarShowTabsSubmenu"); + } + static { + this.EditorTabsBarShowTabsZenModeSubmenu = new Yi("EditorTabsBarShowTabsZenModeSubmenu"); + } + static { + this.EditorActionsPositionSubmenu = new Yi("EditorActionsPositionSubmenu"); + } + static { + this.ExplorerContext = new Yi("ExplorerContext"); + } + static { + this.ExplorerContextShare = new Yi("ExplorerContextShare"); + } + static { + this.ExtensionContext = new Yi("ExtensionContext"); + } + static { + this.ExtensionEditorContextMenu = new Yi("ExtensionEditorContextMenu"); + } + static { + this.GlobalActivity = new Yi("GlobalActivity"); + } + static { + this.CommandCenter = new Yi("CommandCenter"); + } + static { + this.CommandCenterCenter = new Yi("CommandCenterCenter"); + } + static { + this.LayoutControlMenuSubmenu = new Yi("LayoutControlMenuSubmenu"); + } + static { + this.LayoutControlMenu = new Yi("LayoutControlMenu"); + } + static { + this.MenubarMainMenu = new Yi("MenubarMainMenu"); + } + static { + this.MenubarAppearanceMenu = new Yi("MenubarAppearanceMenu"); + } + static { + this.MenubarDebugMenu = new Yi("MenubarDebugMenu"); + } + static { + this.MenubarEditMenu = new Yi("MenubarEditMenu"); + } + static { + this.MenubarCopy = new Yi("MenubarCopy"); + } + static { + this.MenubarFileMenu = new Yi("MenubarFileMenu"); + } + static { + this.MenubarGoMenu = new Yi("MenubarGoMenu"); + } + static { + this.MenubarHelpMenu = new Yi("MenubarHelpMenu"); + } + static { + this.MenubarLayoutMenu = new Yi("MenubarLayoutMenu"); + } + static { + this.MenubarNewBreakpointMenu = new Yi("MenubarNewBreakpointMenu"); + } + static { + this.PanelAlignmentMenu = new Yi("PanelAlignmentMenu"); + } + static { + this.PanelPositionMenu = new Yi("PanelPositionMenu"); + } + static { + this.ActivityBarPositionMenu = new Yi("ActivityBarPositionMenu"); + } + static { + this.MenubarPreferencesMenu = new Yi("MenubarPreferencesMenu"); + } + static { + this.MenubarRecentMenu = new Yi("MenubarRecentMenu"); + } + static { + this.MenubarSelectionMenu = new Yi("MenubarSelectionMenu"); + } + static { + this.MenubarShare = new Yi("MenubarShare"); + } + static { + this.MenubarSwitchEditorMenu = new Yi("MenubarSwitchEditorMenu"); + } + static { + this.MenubarSwitchGroupMenu = new Yi("MenubarSwitchGroupMenu"); + } + static { + this.MenubarTerminalMenu = new Yi("MenubarTerminalMenu"); + } + static { + this.MenubarViewMenu = new Yi("MenubarViewMenu"); + } + static { + this.MenubarHomeMenu = new Yi("MenubarHomeMenu"); + } + static { + this.OpenEditorsContext = new Yi("OpenEditorsContext"); + } + static { + this.OpenEditorsContextShare = new Yi("OpenEditorsContextShare"); + } + static { + this.ProblemsPanelContext = new Yi("ProblemsPanelContext"); + } + static { + this.SCMInputBox = new Yi("SCMInputBox"); + } + static { + this.SCMChangesContext = new Yi("SCMChangesContext"); + } + static { + this.SCMChangeContext = new Yi("SCMChangeContext"); + } + static { + this.SCMResourceContext = new Yi("SCMResourceContext"); + } + static { + this.SCMResourceContextShare = new Yi("SCMResourceContextShare"); + } + static { + this.SCMResourceFolderContext = new Yi("SCMResourceFolderContext"); + } + static { + this.SCMResourceGroupContext = new Yi("SCMResourceGroupContext"); + } + static { + this.SCMSourceControl = new Yi("SCMSourceControl"); + } + static { + this.SCMSourceControlInline = new Yi("SCMSourceControlInline"); + } + static { + this.SCMSourceControlTitle = new Yi("SCMSourceControlTitle"); + } + static { + this.SCMHistoryTitle = new Yi("SCMHistoryTitle"); + } + static { + this.SCMHistoryItemRefContext = new Yi("SCMHistoryItemRefContext"); + } + static { + this.SCMTitle = new Yi("SCMTitle"); + } + static { + this.SearchContext = new Yi("SearchContext"); + } + static { + this.SearchActionMenu = new Yi("SearchActionContext"); + } + static { + this.StatusBarWindowIndicatorMenu = new Yi("StatusBarWindowIndicatorMenu"); + } + static { + this.StatusBarRemoteIndicatorMenu = new Yi("StatusBarRemoteIndicatorMenu"); + } + static { + this.StickyScrollContext = new Yi("StickyScrollContext"); + } + static { + this.TestItem = new Yi("TestItem"); + } + static { + this.TestItemGutter = new Yi("TestItemGutter"); + } + static { + this.TestProfilesContext = new Yi("TestProfilesContext"); + } + static { + this.TestMessageContext = new Yi("TestMessageContext"); + } + static { + this.TestMessageContent = new Yi("TestMessageContent"); + } + static { + this.TestPeekElement = new Yi("TestPeekElement"); + } + static { + this.TestPeekTitle = new Yi("TestPeekTitle"); + } + static { + this.TestCallStack = new Yi("TestCallStack"); + } + static { + this.TouchBarContext = new Yi("TouchBarContext"); + } + static { + this.TitleBarContext = new Yi("TitleBarContext"); + } + static { + this.TitleBarTitleContext = new Yi("TitleBarTitleContext"); + } + static { + this.TunnelContext = new Yi("TunnelContext"); + } + static { + this.TunnelPrivacy = new Yi("TunnelPrivacy"); + } + static { + this.TunnelProtocol = new Yi("TunnelProtocol"); + } + static { + this.TunnelPortInline = new Yi("TunnelInline"); + } + static { + this.TunnelTitle = new Yi("TunnelTitle"); + } + static { + this.TunnelLocalAddressInline = new Yi("TunnelLocalAddressInline"); + } + static { + this.TunnelOriginInline = new Yi("TunnelOriginInline"); + } + static { + this.ViewItemContext = new Yi("ViewItemContext"); + } + static { + this.ViewContainerTitle = new Yi("ViewContainerTitle"); + } + static { + this.ViewContainerTitleContext = new Yi("ViewContainerTitleContext"); + } + static { + this.ViewTitle = new Yi("ViewTitle"); + } + static { + this.ViewTitleContext = new Yi("ViewTitleContext"); + } + static { + this.CommentEditorActions = new Yi("CommentEditorActions"); + } + static { + this.CommentThreadTitle = new Yi("CommentThreadTitle"); + } + static { + this.CommentThreadActions = new Yi("CommentThreadActions"); + } + static { + this.CommentThreadAdditionalActions = new Yi("CommentThreadAdditionalActions"); + } + static { + this.CommentThreadTitleContext = new Yi("CommentThreadTitleContext"); + } + static { + this.CommentThreadCommentContext = new Yi("CommentThreadCommentContext"); + } + static { + this.CommentTitle = new Yi("CommentTitle"); + } + static { + this.CommentActions = new Yi("CommentActions"); + } + static { + this.CommentsViewThreadActions = new Yi("CommentsViewThreadActions"); + } + static { + this.InteractiveToolbar = new Yi("InteractiveToolbar"); + } + static { + this.InteractiveCellTitle = new Yi("InteractiveCellTitle"); + } + static { + this.InteractiveCellDelete = new Yi("InteractiveCellDelete"); + } + static { + this.InteractiveCellExecute = new Yi("InteractiveCellExecute"); + } + static { + this.InteractiveInputExecute = new Yi("InteractiveInputExecute"); + } + static { + this.InteractiveInputConfig = new Yi("InteractiveInputConfig"); + } + static { + this.ReplInputExecute = new Yi("ReplInputExecute"); + } + static { + this.IssueReporter = new Yi("IssueReporter"); + } + static { + this.NotebookToolbar = new Yi("NotebookToolbar"); + } + static { + this.NotebookStickyScrollContext = new Yi("NotebookStickyScrollContext"); + } + static { + this.NotebookCellTitle = new Yi("NotebookCellTitle"); + } + static { + this.NotebookCellDelete = new Yi("NotebookCellDelete"); + } + static { + this.NotebookCellInsert = new Yi("NotebookCellInsert"); + } + static { + this.NotebookCellBetween = new Yi("NotebookCellBetween"); + } + static { + this.NotebookCellListTop = new Yi("NotebookCellTop"); + } + static { + this.NotebookCellExecute = new Yi("NotebookCellExecute"); + } + static { + this.NotebookCellExecuteGoTo = new Yi("NotebookCellExecuteGoTo"); + } + static { + this.NotebookCellExecutePrimary = new Yi("NotebookCellExecutePrimary"); + } + static { + this.NotebookDiffCellInputTitle = new Yi("NotebookDiffCellInputTitle"); + } + static { + this.NotebookDiffDocumentMetadata = new Yi("NotebookDiffDocumentMetadata"); + } + static { + this.NotebookDiffCellMetadataTitle = new Yi("NotebookDiffCellMetadataTitle"); + } + static { + this.NotebookDiffCellOutputsTitle = new Yi("NotebookDiffCellOutputsTitle"); + } + static { + this.NotebookOutputToolbar = new Yi("NotebookOutputToolbar"); + } + static { + this.NotebookOutlineFilter = new Yi("NotebookOutlineFilter"); + } + static { + this.NotebookOutlineActionMenu = new Yi("NotebookOutlineActionMenu"); + } + static { + this.NotebookEditorLayoutConfigure = new Yi("NotebookEditorLayoutConfigure"); + } + static { + this.NotebookKernelSource = new Yi("NotebookKernelSource"); + } + static { + this.BulkEditTitle = new Yi("BulkEditTitle"); + } + static { + this.BulkEditContext = new Yi("BulkEditContext"); + } + static { + this.TimelineItemContext = new Yi("TimelineItemContext"); + } + static { + this.TimelineTitle = new Yi("TimelineTitle"); + } + static { + this.TimelineTitleContext = new Yi("TimelineTitleContext"); + } + static { + this.TimelineFilterSubMenu = new Yi("TimelineFilterSubMenu"); + } + static { + this.AccountsContext = new Yi("AccountsContext"); + } + static { + this.SidebarTitle = new Yi("SidebarTitle"); + } + static { + this.PanelTitle = new Yi("PanelTitle"); + } + static { + this.AuxiliaryBarTitle = new Yi("AuxiliaryBarTitle"); + } + static { + this.AuxiliaryBarHeader = new Yi("AuxiliaryBarHeader"); + } + static { + this.TerminalInstanceContext = new Yi("TerminalInstanceContext"); + } + static { + this.TerminalEditorInstanceContext = new Yi("TerminalEditorInstanceContext"); + } + static { + this.TerminalNewDropdownContext = new Yi("TerminalNewDropdownContext"); + } + static { + this.TerminalTabContext = new Yi("TerminalTabContext"); + } + static { + this.TerminalTabEmptyAreaContext = new Yi("TerminalTabEmptyAreaContext"); + } + static { + this.TerminalStickyScrollContext = new Yi("TerminalStickyScrollContext"); + } + static { + this.WebviewContext = new Yi("WebviewContext"); + } + static { + this.InlineCompletionsActions = new Yi("InlineCompletionsActions"); + } + static { + this.InlineEditsActions = new Yi("InlineEditsActions"); + } + static { + this.NewFile = new Yi("NewFile"); + } + static { + this.MergeInput1Toolbar = new Yi("MergeToolbar1Toolbar"); + } + static { + this.MergeInput2Toolbar = new Yi("MergeToolbar2Toolbar"); + } + static { + this.MergeBaseToolbar = new Yi("MergeBaseToolbar"); + } + static { + this.MergeInputResultToolbar = new Yi("MergeToolbarResultToolbar"); + } + static { + this.InlineSuggestionToolbar = new Yi("InlineSuggestionToolbar"); + } + static { + this.InlineEditToolbar = new Yi("InlineEditToolbar"); + } + static { + this.ChatContext = new Yi("ChatContext"); + } + static { + this.ChatCodeBlock = new Yi("ChatCodeblock"); + } + static { + this.ChatCompareBlock = new Yi("ChatCompareBlock"); + } + static { + this.ChatMessageTitle = new Yi("ChatMessageTitle"); + } + static { + this.ChatMessageFooter = new Yi("ChatMessageFooter"); + } + static { + this.ChatExecute = new Yi("ChatExecute"); + } + static { + this.ChatExecuteSecondary = new Yi("ChatExecuteSecondary"); + } + static { + this.ChatInput = new Yi("ChatInput"); + } + static { + this.ChatInputSide = new Yi("ChatInputSide"); + } + static { + this.ChatEditingWidgetToolbar = new Yi("ChatEditingWidgetToolbar"); + } + static { + this.ChatEditingEditorContent = new Yi("ChatEditingEditorContent"); + } + static { + this.ChatEditingEditorHunk = new Yi("ChatEditingEditorHunk"); + } + static { + this.ChatEditingWidgetModifiedFilesToolbar = new Yi("ChatEditingWidgetModifiedFilesToolbar"); + } + static { + this.ChatInputResourceAttachmentContext = new Yi("ChatInputResourceAttachmentContext"); + } + static { + this.ChatInputSymbolAttachmentContext = new Yi("ChatInputSymbolAttachmentContext"); + } + static { + this.ChatInlineResourceAnchorContext = new Yi("ChatInlineResourceAnchorContext"); + } + static { + this.ChatInlineSymbolAnchorContext = new Yi("ChatInlineSymbolAnchorContext"); + } + static { + this.ChatEditingCodeBlockContext = new Yi("ChatEditingCodeBlockContext"); + } + static { + this.ChatCommandCenter = new Yi("ChatCommandCenter"); + } + static { + this.ChatAttachmentsContext = new Yi("ChatAttachmentsContext"); + } + static { + this.AccessibleView = new Yi("AccessibleView"); + } + static { + this.MultiDiffEditorFileToolbar = new Yi("MultiDiffEditorFileToolbar"); + } + static { + this.DiffEditorHunkToolbar = new Yi("DiffEditorHunkToolbar"); + } + static { + this.DiffEditorSelectionToolbar = new Yi("DiffEditorSelectionToolbar"); + } + static for(e) { + return Yi.a.get(e) ?? new Yi(e); + } + constructor(e) { + if (Yi.a.has(e)) { + throw new TypeError(`MenuId with identifier '${e}' already exists. Use MenuId.for(ident) or a unique identifier`); + } + Yi.a.set(e, this); + this.id = e; + } + }; + Hn = Ve("menuService"); + g9 = class C3i { + static { + this.a = new Map(); + } + static for(e) { + let t = this.a.get(e); + if (!t) { + t = new C3i(e); + this.a.set(e, t); + } + return t; + } + static merge(e) { + const t = new Set(); + for (const s of e) { + if (s instanceof C3i) { + t.add(s.b); + } + } + return t; + } + constructor(e) { + this.b = e; + this.has = t => t === e; + } + }; + Be = new class { + constructor() { + this.a = new Map(); + this.b = new Map(); + this.c = new Lqi({ + merge: g9.merge + }); + this.onDidChangeMenu = this.c.event; + } + addCommand(i) { + this.a.set(i.id, i); + this.c.fire(g9.for(_.CommandPalette)); + return IL(Ue(() => { + if (this.a.delete(i.id)) { + this.c.fire(g9.for(_.CommandPalette)); + } + })); + } + getCommand(i) { + return this.a.get(i); + } + getCommands() { + const i = new Map(); + this.a.forEach((e, t) => i.set(t, e)); + return i; + } + appendMenuItem(i, e) { + let t = this.b.get(i); + if (!t) { + t = new hp(); + this.b.set(i, t); + } + const s = t.push(e); + this.c.fire(g9.for(i)); + return IL(Ue(() => { + s(); + this.c.fire(g9.for(i)); + })); + } + appendMenuItems(i) { + const e = new Q(); + for (const { + id: t, + item: s + } of i) { + e.add(this.appendMenuItem(t, s)); + } + return e; + } + removeMenuItem(i, e) { + let t = this.b.get(i); + if (t) { + let s = t.first; + while (s.element != null && s.element._id !== e._id) { + s = s.next; + } + if (s.element != null) { + t.remove(s); + this.c.fire(g9.for(i)); + } else { + console.error("Could not find element in list"); + } + } + return Ue(() => { + this.c.fire(g9.for(i)); + }); + } + getMenuItems(i) { + let e; + if (this.b.has(i)) { + e = [...this.b.get(i)]; + } else { + e = []; + } + if (i === _.CommandPalette) { + this.d(e); + } + return e; + } + d(i) { + const e = new Set(); + for (const t of i) { + if (GB(t)) { + e.add(t.command.id); + if (t.alt) { + e.add(t.alt.id); + } + } + } + this.a.forEach((t, s) => { + if (!e.has(s)) { + i.push({ + command: t + }); + } + }); + } + }(); + vm = class extends mg { + constructor(i, e, t) { + super(`submenuitem.${i.submenu.id}`, typeof i.title == "string" ? i.title : i.title.value, t, "submenu"); + this.item = i; + this.hideActions = e; + } + }; + Ma = eot = class { + static label(e, t) { + if (t?.renderShortTitle && e.shortTitle) { + if (typeof e.shortTitle == "string") { + return e.shortTitle; + } else { + return e.shortTitle.value; + } + } else if (typeof e.title == "string") { + return e.title; + } else { + return e.title.value; + } + } + constructor(e, t, s, n, r, o, a) { + this.hideActions = n; + this.menuKeybinding = r; + this.d = a; + this.id = e.id; + this.label = eot.label(e, s); + this.tooltip = (typeof e.tooltip == "string" ? e.tooltip : e.tooltip?.value) ?? ""; + this.enabled = !e.precondition || o.contextMatchesRules(e.precondition); + this.checked = undefined; + let l; + if (e.toggled) { + const c = e.toggled.condition ? e.toggled : { + condition: e.toggled + }; + this.checked = o.contextMatchesRules(c.condition); + if (this.checked && c.tooltip) { + this.tooltip = typeof c.tooltip == "string" ? c.tooltip : c.tooltip.value; + } + if (this.checked && le.isThemeIcon(c.icon)) { + l = c.icon; + } + if (this.checked && c.title) { + this.label = typeof c.title == "string" ? c.title : c.title.value; + } + } + l ||= le.isThemeIcon(e.icon) ? e.icon : undefined; + this.item = e; + this.alt = t ? new eot(t, undefined, s, n, undefined, o, a) : undefined; + this.c = s; + this.class = l && le.asClassName(l); + } + run(...e) { + let t = []; + if (this.c?.arg) { + t = [...t, this.c.arg]; + } + if (this.c?.shouldForwardArgs) { + t = [...t, ...e]; + } + return this.d.executeCommand(this.id, ...t); + } + }; + Ma = eot = __decorate([__param(5, Ne), __param(6, gt)], Ma); + se = class { + constructor(i) { + this.desc = i; + } + }; + } +}); +var Ot; +var hGi; +var fGi; +var z6t; +var gGi; +var pGi; +var mGi; +var aj; +var J6t; +var tot; +var bGi; +var vGi; +var ai = ue({ + "out-build/vs/platform/telemetry/common/telemetry.js"() { + "use strict"; + + te(); + Ot = Ve("telemetryService"); + hGi = "inlineDiffAccept"; + fGi = "inlineDiffReject"; + z6t = Ve("customEndpointTelemetryService"); + gGi = "telemetry.firstSessionDate"; + pGi = "telemetry.lastSessionDate"; + mGi = "crashReporting"; + aj = "crashReporting.enabled"; + J6t = "telemetry.enableCrashReporter"; + tot = "telemetry.enableTelemetry"; + (function (i) { + i[i.NONE = 0] = "NONE"; + i[i.CRASH = 1] = "CRASH"; + i[i.ERROR = 2] = "ERROR"; + i[i.USAGE = 3] = "USAGE"; + })(bGi ||= {}); + (function (i) { + i.OFF = "off"; + i.ON = "all"; + })(vGi ||= {}); + } +}); +function G6t(i, e) { + if (e && (i.stack || i.stacktrace)) { + return f(110, null, wGi(i), yGi(i.stack) || yGi(i.stacktrace)); + } else { + return wGi(i); + } +} +function yGi(i) { + if (Array.isArray(i)) { + return i.join(` +`); + } else { + return i; + } +} +function wGi(i) { + if (i.code === "ERR_UNC_HOST_NOT_ALLOWED") { + return `${i.message}. Please update the 'security.allowedUNCHosts' setting if you want to allow this host.`; + } else if (typeof i.code == "string" && typeof i.errno == "number" && typeof i.syscall == "string") { + return f(111, null, i.message); + } else { + return i.message || f(112, null); + } +} +function ou(i = null, e = false) { + if (!i) { + return f(113, null); + } + if (Array.isArray(i)) { + const t = dr(i); + const s = ou(t[0], e); + if (t.length > 1) { + return f(114, null, s, t.length); + } else { + return s; + } + } + if (yi(i)) { + return i; + } + if (i.detail) { + const t = i.detail; + if (t.error) { + return G6t(t.error, e); + } + if (t.exception) { + return G6t(t.exception, e); + } + } + if (i.stack) { + return G6t(i, e); + } else if (i.message) { + return i.message; + } else { + return f(115, null); + } +} +function iot(i) { + const e = i; + return e instanceof Error && Array.isArray(e.actions); +} +function Eee(i, e) { + let t; + if (typeof i == "string") { + t = new Error(i); + } else { + t = i; + } + t.actions = e; + return t; +} +var Yd = ue({ + "out-build/vs/base/common/errorMessage.js"() { + "use strict"; + + Jt(); + zt(); + X(); + } +}); +function sot(i) { + return Od(i); +} +function Mqn(i, e, t) { + switch (e) { + case pr.Trace: + i.trace(t); + break; + case pr.Debug: + i.debug(t); + break; + case pr.Info: + i.info(t); + break; + case pr.Warning: + i.warn(t); + break; + case pr.Error: + i.error(t); + break; + case pr.Off: + break; + default: + throw new Error(`Invalid log level ${e}`); + } +} +function Iee(i, e = false) { + let t = ""; + for (let s = 0; s < i.length; s++) { + let n = i[s]; + if (n instanceof Error) { + n = ou(n, e); + } + if (typeof n == "object") { + try { + n = JSON.stringify(n); + } catch {} + } + t += (s > 0 ? " " : "") + n; + } + return t; +} +function CGi(i) { + if (i.verbose) { + return pr.Trace; + } + if (typeof i.logLevel == "string") { + const e = gge(i.logLevel.toLowerCase()); + if (e !== undefined) { + return e; + } + } + return pge; +} +function Q2(i) { + switch (i) { + case pr.Trace: + return "trace"; + case pr.Debug: + return "debug"; + case pr.Info: + return "info"; + case pr.Warning: + return "warn"; + case pr.Error: + return "error"; + case pr.Off: + return "off"; + } +} +function SGi(i) { + switch (i) { + case pr.Trace: + return { + original: "Trace", + value: f(1996, null) + }; + case pr.Debug: + return { + original: "Debug", + value: f(1997, null) + }; + case pr.Info: + return { + original: "Info", + value: f(1998, null) + }; + case pr.Warning: + return { + original: "Warning", + value: f(1999, null) + }; + case pr.Error: + return { + original: "Error", + value: f(2000, null) + }; + case pr.Off: + return { + original: "Off", + value: f(2001, null) + }; + } +} +function gge(i) { + switch (i) { + case "trace": + return pr.Trace; + case "debug": + return pr.Debug; + case "info": + return pr.Info; + case "warn": + return pr.Warning; + case "error": + return pr.Error; + case "critical": + return pr.Error; + case "off": + return pr.Off; + } +} +var Bt; +var Um; +var pr; +var pge; +var lj; +var K6t; +var xGi; +var kGi; +var EGi; +var IGi; +var DGi; +var TGi; +var PGi; +var Zt = ue({ + "out-build/vs/platform/log/common/log.js"() { + "use strict"; + + X(); + Yd(); + pe(); + Gl(); + q(); + In(); + rt(); + Et(); + zt(); + Le(); + Ee(); + te(); + Bt = Ve("logService"); + Um = Ve("loggerService"); + (function (i) { + i[i.Off = 0] = "Off"; + i[i.Trace = 1] = "Trace"; + i[i.Debug = 2] = "Debug"; + i[i.Info = 3] = "Info"; + i[i.Warning = 4] = "Warning"; + i[i.Error = 5] = "Error"; + })(pr ||= {}); + pge = pr.Info; + lj = class extends H { + constructor() { + super(...arguments); + this.b = pge; + this.c = this.D(new B()); + this.onDidChangeLogLevel = this.c.event; + } + setLevel(i) { + if (this.b !== i) { + this.b = i; + this.c.fire(this.b); + } + } + getLevel() { + return this.b; + } + f(i) { + return this.b !== pr.Off && this.b <= i; + } + g(i) { + if (this.B.isDisposed) { + return false; + } else { + return this.f(i); + } + } + }; + K6t = class extends lj { + constructor(i) { + super(); + this.h = i; + } + f(i) { + return this.h || super.f(i); + } + trace(i, ...e) { + if (this.g(pr.Trace)) { + this.m(pr.Trace, Iee([i, ...e], true)); + } + } + debug(i, ...e) { + if (this.g(pr.Debug)) { + this.m(pr.Debug, Iee([i, ...e])); + } + } + info(i, ...e) { + if (this.g(pr.Info)) { + this.m(pr.Info, Iee([i, ...e])); + } + } + warn(i, ...e) { + if (this.g(pr.Warning)) { + this.m(pr.Warning, Iee([i, ...e])); + } + } + error(i, ...e) { + if (this.g(pr.Error)) { + if (i instanceof Error) { + const t = Array.prototype.slice.call(arguments); + t[0] = i.stack; + this.m(pr.Error, Iee(t)); + } else { + this.m(pr.Error, Iee([i, ...e])); + } + } + } + flush() {} + }; + xGi = class extends lj { + constructor(i = pge, e = true) { + super(); + this.h = e; + this.setLevel(i); + } + trace(i, ...e) { + if (this.g(pr.Trace)) { + if (this.h) { + console.log("%cTRACE", "color: #888", i, ...e); + } else { + console.log(i, ...e); + } + } + } + debug(i, ...e) { + if (this.g(pr.Debug)) { + if (this.h) { + console.log("%cDEBUG", "background: #eee; color: #888", i, ...e); + } else { + console.log(i, ...e); + } + } + } + info(i, ...e) { + if (this.g(pr.Info)) { + if (this.h) { + console.log("%c INFO", "color: #33f", i, ...e); + } else { + console.log(i, ...e); + } + } + } + warn(i, ...e) { + if (this.g(pr.Warning)) { + if (this.h) { + console.log("%c WARN", "color: #993", i, ...e); + } else { + console.log(i, ...e); + } + } + } + error(i, ...e) { + if (this.g(pr.Error)) { + if (this.h) { + console.log("%c ERR", "color: #f33", i, ...e); + } else { + console.error(i, ...e); + } + } + } + flush() {} + }; + kGi = class extends lj { + constructor(i, e = pge) { + super(); + this.h = i; + this.setLevel(e); + } + trace(i, ...e) { + if (this.g(pr.Trace)) { + this.h.log(pr.Trace, [this.j(i), ...e]); + } + } + debug(i, ...e) { + if (this.g(pr.Debug)) { + this.h.log(pr.Debug, [this.j(i), ...e]); + } + } + info(i, ...e) { + if (this.g(pr.Info)) { + this.h.log(pr.Info, [this.j(i), ...e]); + } + } + warn(i, ...e) { + if (this.g(pr.Warning)) { + this.h.log(pr.Warning, [this.j(i), ...e]); + } + } + error(i, ...e) { + if (this.g(pr.Error)) { + this.h.log(pr.Error, [this.j(i), ...e]); + } + } + j(i) { + if (typeof i == "string") { + return i; + } else { + return ou(i, this.g(pr.Trace)); + } + } + flush() {} + }; + EGi = class extends lj { + constructor(i) { + super(); + this.h = i; + if (i.length) { + this.setLevel(i[0].getLevel()); + } + } + setLevel(i) { + for (const e of this.h) { + e.setLevel(i); + } + super.setLevel(i); + } + trace(i, ...e) { + for (const t of this.h) { + t.trace(i, ...e); + } + } + debug(i, ...e) { + for (const t of this.h) { + t.debug(i, ...e); + } + } + info(i, ...e) { + for (const t of this.h) { + t.info(i, ...e); + } + } + warn(i, ...e) { + for (const t of this.h) { + t.warn(i, ...e); + } + } + error(i, ...e) { + for (const t of this.h) { + t.error(i, ...e); + } + } + flush() { + for (const i of this.h) { + i.flush(); + } + } + dispose() { + for (const i of this.h) { + i.dispose(); + } + super.dispose(); + } + }; + IGi = class extends H { + constructor(i, e, t) { + super(); + this.h = i; + this.j = e; + this.b = new dn(); + this.c = this.D(new B()); + this.onDidChangeLoggers = this.c.event; + this.f = this.D(new B()); + this.onDidChangeLogLevel = this.f.event; + this.g = this.D(new B()); + this.onDidChangeVisibility = this.g.event; + if (t) { + for (const s of t) { + this.b.set(s.resource, { + logger: undefined, + info: s + }); + } + } + } + m(i) { + if (yi(i)) { + return [...this.b.values()].find(e => e.info.id === i); + } else { + return this.b.get(i); + } + } + getLogger(i) { + return this.m(i)?.logger; + } + createLogger(i, e) { + const t = this.n(i); + const s = yi(i) ? i : e?.id ?? Qc(t.toString()).toString(16); + let n = this.b.get(t)?.logger; + const r = e?.logLevel === "always" ? pr.Trace : e?.logLevel; + n ||= this.q(t, r ?? this.getLogLevel(t) ?? this.h, { + ...e, + id: s + }); + const o = { + logger: n, + info: { + resource: t, + id: s, + logLevel: r, + name: e?.name, + hidden: e?.hidden, + extensionId: e?.extensionId, + when: e?.when + } + }; + this.registerLogger(o.info); + this.b.set(t, o); + return n; + } + n(i) { + if (yi(i)) { + return Li(this.j, `${i}.log`); + } else { + return i; + } + } + setLogLevel(i, e) { + if (V.isUri(i)) { + const t = i; + const s = e; + const n = this.b.get(t); + if (n && s !== n.info.logLevel) { + n.info.logLevel = s === this.h ? undefined : s; + n.logger?.setLevel(s); + this.b.set(n.info.resource, n); + this.f.fire([t, s]); + } + } else { + this.h = i; + for (const [t, s] of this.b.entries()) { + if (this.b.get(t)?.info.logLevel === undefined) { + s.logger?.setLevel(this.h); + } + } + this.f.fire(this.h); + } + } + setVisibility(i, e) { + const t = this.m(i); + if (t && e !== !t.info.hidden) { + t.info.hidden = !e; + this.b.set(t.info.resource, t); + this.g.fire([t.info.resource, e]); + } + } + getLogLevel(i) { + let e; + if (i) { + e = this.b.get(i)?.info.logLevel; + } + return e ?? this.h; + } + registerLogger(i) { + const e = this.b.get(i.resource); + if (e) { + if (e.info.hidden !== i.hidden) { + this.setVisibility(i.resource, !i.hidden); + } + } else { + this.b.set(i.resource, { + info: i, + logger: undefined + }); + this.c.fire({ + added: [i], + removed: [] + }); + } + } + deregisterLogger(i) { + const e = this.b.get(i); + if (e) { + if (e.logger) { + e.logger.dispose(); + } + this.b.delete(i); + this.c.fire({ + added: [], + removed: [e.info] + }); + } + } + *getRegisteredLoggers() { + for (const i of this.b.values()) { + yield i.info; + } + } + getRegisteredLogger(i) { + return this.b.get(i)?.info; + } + dispose() { + this.b.forEach(i => i.logger?.dispose()); + this.b.clear(); + super.dispose(); + } + }; + DGi = class { + constructor() { + this.onDidChangeLogLevel = new B().event; + } + setLevel(i) {} + getLevel() { + return pr.Info; + } + trace(i, ...e) {} + debug(i, ...e) {} + info(i, ...e) {} + warn(i, ...e) {} + error(i, ...e) {} + critical(i, ...e) {} + dispose() {} + flush() {} + }; + TGi = class extends DGi {}; + PGi = new fe("logLevel", Q2(pr.Info)); + } +}); +function Cx(i, e) { + ei.registerCommand(i, function (t, ...s) { + const n = t.get(re); + const [r, o] = s; + yr(V.isUri(r)); + yr(je.isIPosition(o)); + const a = t.get($s).getModel(r); + if (a) { + const l = je.lift(o); + return n.invokeFunction(e, a, l, ...s.slice(2)); + } + return t.get(ns).createModelReference(r).then(l => new Promise((c, u) => { + try { + const d = n.invokeFunction(e, l.object.textEditorModel, je.lift(o), s.slice(2)); + c(d); + } catch (d) { + u(d); + } + }).finally(() => { + l.dispose(); + })); + }); +} +function Sn(i) { + DT.INSTANCE.registerEditorCommand(i); + return i; +} +function Oi(i) { + const e = new i(); + DT.INSTANCE.registerEditorAction(e); + return e; +} +function LGi(i) { + DT.INSTANCE.registerEditorAction(i); + return i; +} +function Aqn(i) { + DT.INSTANCE.registerEditorAction(i); +} +function bo(i, e, t) { + DT.INSTANCE.registerEditorContribution(i, e, t); +} +function RGi(i, e) { + DT.INSTANCE.registerDiffEditorContribution(i, e); +} +function mge(i) { + i.register(); + return i; +} +var NGi; +var bge; +var KB; +var Y6t; +var Wm; +var Es; +var X6t; +var Uh; +var nd; +var MGi; +var DT; +var YB; +var XB; +var Q6t; +var en = ue({ + "out-build/vs/editor/browser/editorExtensions.js"() { + "use strict"; + + X(); + Le(); + Xn(); + Rs(); + Rn(); + Ms(); + Je(); + Wt(); + Ee(); + te(); + Wu(); + Ht(); + ai(); + zt(); + Zt(); + xe(); + (function (i) { + i[i.Eager = 0] = "Eager"; + i[i.AfterFirstRender = 1] = "AfterFirstRender"; + i[i.BeforeFirstInteraction = 2] = "BeforeFirstInteraction"; + i[i.Eventually = 3] = "Eventually"; + i[i.Lazy = 4] = "Lazy"; + })(NGi ||= {}); + bge = class { + constructor(i) { + this.id = i.id; + this.precondition = i.precondition; + this.g = i.kbOpts; + this.q = i.menuOpts; + this.metadata = i.metadata; + } + register() { + if (Array.isArray(this.q)) { + this.q.forEach(this.u, this); + } else if (this.q) { + this.u(this.q); + } + if (this.g) { + const i = Array.isArray(this.g) ? this.g : [this.g]; + for (const e of i) { + let t = e.kbExpr; + if (this.precondition) { + if (t) { + t = T.and(t, this.precondition); + } else { + t = this.precondition; + } + } + const s = { + id: this.id, + weight: e.weight, + args: e.args, + when: t, + primary: e.primary, + secondary: e.secondary, + win: e.win, + linux: e.linux, + mac: e.mac + }; + Ci.registerKeybindingRule(s); + } + } + ei.registerCommand({ + id: this.id, + handler: (i, e) => this.runCommand(i, e), + metadata: this.metadata + }); + } + u(i) { + Be.appendMenuItem(i.menuId, { + group: i.group, + command: { + id: this.id, + title: i.title, + icon: i.icon, + precondition: this.precondition + }, + when: i.when, + order: i.order + }); + } + }; + KB = class extends bge { + constructor() { + super(...arguments); + this.d = []; + } + addImplementation(i, e, t, s) { + this.d.push({ + priority: i, + name: e, + implementation: t, + when: s + }); + this.d.sort((n, r) => r.priority - n.priority); + return { + dispose: () => { + for (let n = 0; n < this.d.length; n++) { + if (this.d[n].implementation === t) { + this.d.splice(n, 1); + return; + } + } + } + }; + } + runCommand(i, e) { + const t = i.get(Bt); + const s = i.get(Ne); + t.trace(`Executing Command '${this.id}' which has ${this.d.length} bound.`); + for (const n of this.d) { + if (n.when) { + const o = s.getContext(Tu()); + if (!n.when.evaluate(o)) { + continue; + } + } + const r = n.implementation(i, e); + if (r) { + t.trace(`Command '${this.id}' was handled by '${n.name}'.`); + if (typeof r == "boolean") { + return undefined; + } else { + return r; + } + } + } + t.trace(`The Command '${this.id}' was not handled by any implementation.`); + } + }; + Y6t = class extends bge { + constructor(i, e) { + super(e); + this.d = i; + } + runCommand(i, e) { + return this.d.runCommand(i, e); + } + }; + Wm = class S3i extends bge { + static bindToContribution(e) { + return class extends S3i { + constructor(s) { + super(s); + this.d = s.handler; + } + runEditorCommand(s, n, r) { + const o = e(n); + if (o) { + this.d(o, r); + } + } + }; + } + static runEditorCommand(e, t, s, n) { + const r = e.get(ps); + const o = r.getFocusedCodeEditor() || r.getActiveCodeEditor(); + if (o) { + return o.invokeWithinContext(a => { + if (a.get(Ne).contextMatchesRules(s ?? undefined)) { + return n(a, o, t); + } + }); + } + } + runCommand(e, t) { + return S3i.runEditorCommand(e, t, this.precondition, (s, n, r) => this.runEditorCommand(s, n, r)); + } + }; + Es = class CFn extends Wm { + static z(e) { + let t; + if (Array.isArray(e.menuOpts)) { + t = e.menuOpts; + } else if (e.menuOpts) { + t = [e.menuOpts]; + } else { + t = []; + } + function s(n) { + n.menuId ||= _.EditorContext; + n.title ||= typeof e.label == "string" ? e.label : e.label.value; + n.when = T.and(e.precondition, n.when); + return n; + } + if (Array.isArray(e.contextMenuOpts)) { + t.push(...e.contextMenuOpts.map(s)); + } else if (e.contextMenuOpts) { + t.push(s(e.contextMenuOpts)); + } + e.menuOpts = t; + return e; + } + constructor(e) { + super(CFn.z(e)); + if (typeof e.label == "string") { + this.label = e.label; + this.alias = e.alias ?? e.label; + } else { + this.label = e.label.value; + this.alias = e.alias ?? e.label.original; + } + } + runEditorCommand(e, t, s) { + this.A(e, t); + return this.run(e, t, s || {}); + } + A(e, t) { + e.get(Ot).publicLog2("editorActionInvoked", { + name: this.label, + id: this.id + }); + } + }; + X6t = class extends Es { + constructor() { + super(...arguments); + this.d = []; + } + addImplementation(i, e) { + this.d.push([i, e]); + this.d.sort((t, s) => s[0] - t[0]); + return { + dispose: () => { + for (let t = 0; t < this.d.length; t++) { + if (this.d[t][1] === e) { + this.d.splice(t, 1); + return; + } + } + } + }; + } + run(i, e, t) { + for (const s of this.d) { + const n = s[1](i, e, t); + if (n) { + if (typeof n == "boolean") { + return undefined; + } else { + return n; + } + } + } + } + }; + Uh = class extends se { + run(i, ...e) { + const t = i.get(ps); + const s = t.getFocusedCodeEditor() || t.getActiveCodeEditor(); + if (s) { + return s.invokeWithinContext(n => { + const r = n.get(Ne); + const o = n.get(Bt); + if (!r.contextMatchesRules(this.desc.precondition ?? undefined)) { + o.debug("[EditorAction2] NOT running command because its precondition is FALSE", this.desc.id, this.desc.precondition?.serialize()); + return; + } + return this.runEditorCommand(n, s, ...e); + }); + } + } + }; + (function (i) { + function e(o) { + return DT.INSTANCE.getEditorCommand(o); + } + i.getEditorCommand = e; + function t() { + return DT.INSTANCE.getEditorActions(); + } + i.getEditorActions = t; + function s() { + return DT.INSTANCE.getEditorContributions(); + } + i.getEditorContributions = s; + function n(o) { + return DT.INSTANCE.getEditorContributions().filter(a => o.indexOf(a.id) >= 0); + } + i.getSomeEditorContributions = n; + function r() { + return DT.INSTANCE.getDiffEditorContributions(); + } + i.getDiffEditorContributions = r; + })(nd ||= {}); + MGi = { + EditorCommonContributions: "editor.contributions" + }; + DT = class SFn { + static { + this.INSTANCE = new SFn(); + } + constructor() { + this.d = []; + this.e = []; + this.f = []; + this.g = Object.create(null); + } + registerEditorContribution(e, t, s) { + this.d.push({ + id: e, + ctor: t, + instantiation: s + }); + } + getEditorContributions() { + return this.d.slice(0); + } + registerDiffEditorContribution(e, t) { + this.e.push({ + id: e, + ctor: t + }); + } + getDiffEditorContributions() { + return this.e.slice(0); + } + registerEditorAction(e) { + e.register(); + this.f.push(e); + } + getEditorActions() { + return this.f; + } + registerEditorCommand(e) { + e.register(); + this.g[e.id] = e; + } + getEditorCommand(e) { + return this.g[e] || null; + } + }; + Pe.add(MGi.EditorCommonContributions, DT.INSTANCE); + YB = mge(new KB({ + id: "undo", + precondition: undefined, + kbOpts: { + weight: 0, + primary: 2104 + }, + menuOpts: [{ + menuId: _.MenubarEditMenu, + group: "1_do", + title: f(185, null), + order: 1 + }, { + menuId: _.CommandPalette, + group: "", + title: f(186, null), + order: 1 + }] + })); + mge(new Y6t(YB, { + id: "default:undo", + precondition: undefined + })); + XB = mge(new KB({ + id: "redo", + precondition: undefined, + kbOpts: { + weight: 0, + primary: 2103, + secondary: [3128], + mac: { + primary: 3128 + } + }, + menuOpts: [{ + menuId: _.MenubarEditMenu, + group: "1_do", + title: f(187, null), + order: 2 + }, { + menuId: _.CommandPalette, + group: "", + title: f(188, null), + order: 1 + }] + })); + mge(new Y6t(XB, { + id: "default:redo", + precondition: undefined + })); + Q6t = mge(new KB({ + id: "editor.action.selectAll", + precondition: undefined, + kbOpts: { + weight: 0, + kbExpr: null, + primary: 2079 + }, + menuOpts: [{ + menuId: _.MenubarSelectionMenu, + group: "1_basic", + title: f(189, null), + order: 1 + }, { + menuId: _.CommandPalette, + group: "", + title: f(190, null), + order: 1 + }] + })); + } +}); +var Z; +var yt = ue({ + "out-build/vs/editor/common/core/range.js"() { + "use strict"; + + Rs(); + Z = class lb { + constructor(e, t, s, n) { + let r; + let o; + let a; + let l; + if (e == null || typeof e == "number" || Number.isNaN(e)) { + r = e; + o = t; + a = s; + l = n; + } else if ("startLineNumber" in e && "startColumn" in e) { + r = e.startLineNumber; + o = e.startColumn; + a = e.endLineNumber; + l = e.endColumn; + } else { + r = e.startLineNumber; + o = 1; + a = e.endLineNumberExclusive; + l = 1; + } + if (r > a || r === a && o > l) { + this.startLineNumber = a; + this.startColumn = l; + this.endLineNumber = r; + this.endColumn = o; + } else { + this.startLineNumber = r; + this.startColumn = o; + this.endLineNumber = a; + this.endColumn = l; + } + } + asIRange() { + return { + startLineNumber: this.startLineNumber, + startColumn: this.startColumn, + endLineNumber: this.endLineNumber, + endColumn: this.endColumn + }; + } + isEmpty() { + return lb.isEmpty(this); + } + static isEmpty(e) { + return e.startLineNumber === e.endLineNumber && e.startColumn === e.endColumn; + } + containsPosition(e) { + return lb.containsPosition(this, e); + } + static containsPosition(e, t) { + return !(t.lineNumber < e.startLineNumber) && !(t.lineNumber > e.endLineNumber) && (t.lineNumber !== e.startLineNumber || !(t.column < e.startColumn)) && (t.lineNumber !== e.endLineNumber || !(t.column > e.endColumn)); + } + static strictContainsPosition(e, t) { + return !(t.lineNumber < e.startLineNumber) && !(t.lineNumber > e.endLineNumber) && (t.lineNumber !== e.startLineNumber || !(t.column <= e.startColumn)) && (t.lineNumber !== e.endLineNumber || !(t.column >= e.endColumn)); + } + containsRange(e) { + return lb.containsRange(this, e); + } + static containsRange(e, t) { + return !(t.startLineNumber < e.startLineNumber) && !(t.endLineNumber < e.startLineNumber) && !(t.startLineNumber > e.endLineNumber) && !(t.endLineNumber > e.endLineNumber) && (t.startLineNumber !== e.startLineNumber || !(t.startColumn < e.startColumn)) && (t.endLineNumber !== e.endLineNumber || !(t.endColumn > e.endColumn)); + } + strictContainsRange(e) { + return lb.strictContainsRange(this, e); + } + static strictContainsRange(e, t) { + return !(t.startLineNumber < e.startLineNumber) && !(t.endLineNumber < e.startLineNumber) && !(t.startLineNumber > e.endLineNumber) && !(t.endLineNumber > e.endLineNumber) && (t.startLineNumber !== e.startLineNumber || !(t.startColumn <= e.startColumn)) && (t.endLineNumber !== e.endLineNumber || !(t.endColumn >= e.endColumn)); + } + plusRange(e) { + return lb.plusRange(this, e); + } + static getRangeAbove(e, t) { + const s = Math.max(e.startLineNumber - t, 1); + const n = e.startLineNumber; + return new lb(s, e.startColumn, n, e.startColumn); + } + static getRangeOnBelow(e, t, s) { + const n = e.endLineNumber; + const r = Math.min(e.endLineNumber + t, s); + return new lb(n, e.endColumn, r, e.endColumn); + } + static getExtendedRange(e, t, s) { + const n = Math.max(e.startLineNumber - t, 0); + const r = Math.min(e.endLineNumber + t, s); + return new lb(n, e.startColumn, r, e.endColumn); + } + static plusRange(e, t) { + let s; + let n; + let r; + let o; + if (t.startLineNumber < e.startLineNumber) { + s = t.startLineNumber; + n = t.startColumn; + } else if (t.startLineNumber === e.startLineNumber) { + s = t.startLineNumber; + n = Math.min(t.startColumn, e.startColumn); + } else { + s = e.startLineNumber; + n = e.startColumn; + } + if (t.endLineNumber > e.endLineNumber) { + r = t.endLineNumber; + o = t.endColumn; + } else if (t.endLineNumber === e.endLineNumber) { + r = t.endLineNumber; + o = Math.max(t.endColumn, e.endColumn); + } else { + r = e.endLineNumber; + o = e.endColumn; + } + return new lb(s, n, r, o); + } + intersectRanges(e) { + return lb.intersectRanges(this, e); + } + static intersectRanges(e, t) { + let s = e.startLineNumber; + let n = e.startColumn; + let r = e.endLineNumber; + let o = e.endColumn; + const a = t.startLineNumber; + const l = t.startColumn; + const c = t.endLineNumber; + const u = t.endColumn; + if (s < a) { + s = a; + n = l; + } else if (s === a) { + n = Math.max(n, l); + } + if (r > c) { + r = c; + o = u; + } else if (r === c) { + o = Math.min(o, u); + } + if (s > r || s === r && n > o) { + return null; + } else { + return new lb(s, n, r, o); + } + } + static inverseEditRange(e, t) { + return { + startLineNumber: e.startLineNumber, + startColumn: e.startColumn, + endLineNumber: e.startLineNumber + t.split(` +`).length - 1, + endColumn: t.lastIndexOf(` +`) === -1 ? e.startColumn + t.length : t.length - t.lastIndexOf(` +`) + }; + } + whereIs(e) { + if (e.endLineNumber < this.startLineNumber || e.endLineNumber === this.startLineNumber && e.endColumn <= this.startColumn) { + return "before"; + } else if (e.startLineNumber > this.endLineNumber || e.startLineNumber === this.endLineNumber && e.startColumn >= this.endColumn) { + return "after"; + } else { + return "overlapping"; + } + } + static rangeAfterEdit(e, t) { + const s = lb.lift(e).whereIs(t.range); + switch (s) { + case "overlapping": + throw new Error("Range is overlapping. The range after edit is ambiguous."); + case "after": + return e; + case "before": + { + const n = t.text.split(` +`).length - 1 - (t.range.endLineNumber - t.range.startLineNumber); + if (t.range.endLineNumber < e.startLineNumber) { + return { + startLineNumber: e.startLineNumber + n, + startColumn: e.startColumn, + endLineNumber: e.endLineNumber + n, + endColumn: e.endColumn + }; + } + { + const r = t.text.lastIndexOf(` +`) === -1 ? t.text.length : t.text.length - t.text.lastIndexOf(` +`) - 1; + const o = t.range.startLineNumber === t.range.endLineNumber ? t.range.endColumn - t.range.startColumn : t.range.endColumn - 1; + const a = r - o; + return { + startLineNumber: e.startLineNumber + n, + startColumn: e.startColumn + a, + endLineNumber: e.endLineNumber + n, + endColumn: e.startLineNumber === e.endLineNumber ? e.endColumn + a : e.endColumn + }; + } + } + default: + { + const n = s; + return e; + } + } + } + equalsRange(e) { + return lb.equalsRange(this, e); + } + static equalsRange(e, t) { + if (!e && !t) { + return true; + } else { + return !!e && !!t && e.startLineNumber === t.startLineNumber && e.startColumn === t.startColumn && e.endLineNumber === t.endLineNumber && e.endColumn === t.endColumn; + } + } + getEndPosition() { + return lb.getEndPosition(this); + } + static getEndPosition(e) { + return new je(e.endLineNumber, e.endColumn); + } + getStartPosition() { + return lb.getStartPosition(this); + } + static getStartPosition(e) { + return new je(e.startLineNumber, e.startColumn); + } + toString() { + return "[" + this.startLineNumber + "," + this.startColumn + " -> " + this.endLineNumber + "," + this.endColumn + "]"; + } + setEndPosition(e, t) { + return new lb(this.startLineNumber, this.startColumn, e, t); + } + setStartPosition(e, t) { + return new lb(e, t, this.endLineNumber, this.endColumn); + } + collapseToStart() { + return lb.collapseToStart(this); + } + static collapseToStart(e) { + return new lb(e.startLineNumber, e.startColumn, e.startLineNumber, e.startColumn); + } + collapseToEnd() { + return lb.collapseToEnd(this); + } + static collapseToEnd(e) { + return new lb(e.endLineNumber, e.endColumn, e.endLineNumber, e.endColumn); + } + delta(e) { + return new lb(this.startLineNumber + e, this.startColumn, this.endLineNumber + e, this.endColumn); + } + static fromPositions(e, t = e) { + return new lb(e.lineNumber, e.column, t.lineNumber, t.column); + } + static lift(e) { + if (e) { + return new lb(e.startLineNumber, e.startColumn, e.endLineNumber, e.endColumn); + } else { + return null; + } + } + static isIRange(e) { + return e && typeof e.startLineNumber == "number" && typeof e.startColumn == "number" && typeof e.endLineNumber == "number" && typeof e.endColumn == "number"; + } + static areIntersectingOrTouching(e, t) { + return !(e.endLineNumber < t.startLineNumber) && (e.endLineNumber !== t.startLineNumber || !(e.endColumn < t.startColumn)) && !(t.endLineNumber < e.startLineNumber) && (t.endLineNumber !== e.startLineNumber || !(t.endColumn < e.startColumn)); + } + static areIntersecting(e, t) { + return !(e.endLineNumber < t.startLineNumber) && (e.endLineNumber !== t.startLineNumber || !(e.endColumn <= t.startColumn)) && !(t.endLineNumber < e.startLineNumber) && (t.endLineNumber !== e.startLineNumber || !(t.endColumn <= e.startColumn)); + } + static compareRangesUsingStarts(e, t) { + if (e && t) { + const r = e.startLineNumber | 0; + const o = t.startLineNumber | 0; + if (r === o) { + const a = e.startColumn | 0; + const l = t.startColumn | 0; + if (a === l) { + const c = e.endLineNumber | 0; + const u = t.endLineNumber | 0; + if (c === u) { + const d = e.endColumn | 0; + const h = t.endColumn | 0; + return d - h; + } + return c - u; + } + return a - l; + } + return r - o; + } + return (e ? 1 : 0) - (t ? 1 : 0); + } + static compareRangesUsingEnds(e, t) { + if (e.endLineNumber === t.endLineNumber) { + if (e.endColumn === t.endColumn) { + if (e.startLineNumber === t.startLineNumber) { + return e.startColumn - t.startColumn; + } else { + return e.startLineNumber - t.startLineNumber; + } + } else { + return e.endColumn - t.endColumn; + } + } else { + return e.endLineNumber - t.endLineNumber; + } + } + static spansMultipleLines(e) { + return e.endLineNumber > e.startLineNumber; + } + toJSON() { + return this; + } + }; + } +}); +var AGi; +var Vs; +var ua = ue({ + "out-build/vs/editor/common/core/selection.js"() { + "use strict"; + + Rs(); + yt(); + (function (i) { + i[i.LTR = 0] = "LTR"; + i[i.RTL = 1] = "RTL"; + })(AGi ||= {}); + Vs = class eM extends Z { + constructor(e, t, s, n) { + super(e, t, s, n); + this.selectionStartLineNumber = e; + this.selectionStartColumn = t; + this.positionLineNumber = s; + this.positionColumn = n; + } + toString() { + return "[" + this.selectionStartLineNumber + "," + this.selectionStartColumn + " -> " + this.positionLineNumber + "," + this.positionColumn + "]"; + } + equalsSelection(e) { + return eM.selectionsEqual(this, e); + } + static selectionsEqual(e, t) { + return e.selectionStartLineNumber === t.selectionStartLineNumber && e.selectionStartColumn === t.selectionStartColumn && e.positionLineNumber === t.positionLineNumber && e.positionColumn === t.positionColumn; + } + getDirection() { + if (this.selectionStartLineNumber === this.startLineNumber && this.selectionStartColumn === this.startColumn) { + return 0; + } else { + return 1; + } + } + setEndPosition(e, t) { + if (this.getDirection() === 0) { + return new eM(this.startLineNumber, this.startColumn, e, t); + } else { + return new eM(e, t, this.startLineNumber, this.startColumn); + } + } + getPosition() { + return new je(this.positionLineNumber, this.positionColumn); + } + getSelectionStart() { + return new je(this.selectionStartLineNumber, this.selectionStartColumn); + } + setStartPosition(e, t) { + if (this.getDirection() === 0) { + return new eM(e, t, this.endLineNumber, this.endColumn); + } else { + return new eM(this.endLineNumber, this.endColumn, e, t); + } + } + static fromPositions(e, t = e) { + return new eM(e.lineNumber, e.column, t.lineNumber, t.column); + } + static fromRange(e, t) { + if (t === 0) { + return new eM(e.startLineNumber, e.startColumn, e.endLineNumber, e.endColumn); + } else { + return new eM(e.endLineNumber, e.endColumn, e.startLineNumber, e.startColumn); + } + } + static liftSelection(e) { + return new eM(e.selectionStartLineNumber, e.selectionStartColumn, e.positionLineNumber, e.positionColumn); + } + static selectionsArrEqual(e, t) { + if (e && !t || !e && t) { + return false; + } + if (!e && !t) { + return true; + } + if (e.length !== t.length) { + return false; + } + for (let s = 0, n = e.length; s < n; s++) { + if (!this.selectionsEqual(e[s], t[s])) { + return false; + } + } + return true; + } + static isISelection(e) { + return e && typeof e.selectionStartLineNumber == "number" && typeof e.selectionStartColumn == "number" && typeof e.positionLineNumber == "number" && typeof e.positionColumn == "number"; + } + static createWithDirection(e, t, s, n, r) { + if (r === 0) { + return new eM(e, t, s, n); + } else { + return new eM(s, n, e, t); + } + } + }; + } +}); +function cj(i, e) { + const t = i.getCount(); + const s = i.findTokenIndexAtOffset(e); + const n = i.getLanguageId(s); + let r = s; + while (r + 1 < t && i.getLanguageId(r + 1) === n) { + r++; + } + let o = s; + while (o > 0 && i.getLanguageId(o - 1) === n) { + o--; + } + return new $Gi(i, n, o, r + 1, i.getStartOffset(o), i.getEndOffset(r)); +} +function Z2(i) { + return (i & 3) !== 0; +} +var $Gi; +var FGi; +var vge = ue({ + "out-build/vs/editor/common/languages/supports.js"() { + "use strict"; + + $Gi = class { + constructor(i, e, t, s, n, r) { + this._scopedLineTokensBrand = undefined; + this.a = i; + this.languageId = e; + this.b = t; + this.c = s; + this.firstCharOffset = n; + this.d = r; + this.languageIdCodec = i.languageIdCodec; + } + getLineContent() { + return this.a.getLineContent().substring(this.firstCharOffset, this.d); + } + getLineLength() { + return this.d - this.firstCharOffset; + } + getActualLineContentBefore(i) { + return this.a.getLineContent().substring(0, this.firstCharOffset + i); + } + getTokenCount() { + return this.c - this.b; + } + findTokenIndexAtOffset(i) { + return this.a.findTokenIndexAtOffset(i + this.firstCharOffset) - this.b; + } + getStandardTokenType(i) { + return this.a.getStandardTokenType(i + this.b); + } + toIViewLineTokens() { + return this.a.sliceAndInflate(this.firstCharOffset, this.d, 0); + } + }; + (function (i) { + i[i.value = 3] = "value"; + })(FGi ||= {}); + } +}); +var pp; +var TT = ue({ + "out-build/vs/editor/common/core/cursorColumns.js"() { + "use strict"; + + $i(); + pp = class VPe { + static a(e, t, s) { + if (e === 9) { + return VPe.nextRenderTabStop(t, s); + } else if (i9(e) || S4t(e)) { + return t + 2; + } else { + return t + 1; + } + } + static visibleColumnFromColumn(e, t, s) { + const n = Math.min(t - 1, e.length); + const r = e.substring(0, n); + const o = new HZ(r); + let a = 0; + while (!o.eol()) { + const l = Unt(r, n, o.offset); + o.nextGraphemeLength(); + a = this.a(l, a, s); + } + return a; + } + static toStatusbarColumn(e, t, s) { + const n = e.substring(0, Math.min(t - 1, e.length)); + const r = new lfe(n); + let o = 0; + while (!r.eol()) { + if (r.nextCodePoint() === 9) { + o = VPe.nextRenderTabStop(o, s); + } else { + o = o + 1; + } + } + return o + 1; + } + static columnFromVisibleColumn(e, t, s) { + if (t <= 0) { + return 1; + } + const n = e.length; + const r = new HZ(e); + let o = 0; + let a = 1; + while (!r.eol()) { + const l = Unt(e, n, r.offset); + r.nextGraphemeLength(); + const c = this.a(l, o, s); + const u = r.offset + 1; + if (c >= t) { + const d = t - o; + if (c - t < d) { + return u; + } else { + return a; + } + } + o = c; + a = u; + } + return n + 1; + } + static nextRenderTabStop(e, t) { + return e + t - e % t; + } + static nextIndentTabStop(e, t) { + return VPe.nextRenderTabStop(e, t); + } + static prevRenderTabStop(e, t) { + return Math.max(0, e - 1 - (e - 1) % t); + } + static prevIndentTabStop(e, t) { + return VPe.prevRenderTabStop(e, t); + } + }; + } +}); +function $qn(i, e, t) { + let s = 0; + for (let r = 0; r < i.length; r++) { + if (i.charAt(r) === "\t") { + s = pp.nextIndentTabStop(s, e); + } else { + s++; + } + } + let n = ""; + if (!t) { + const r = Math.floor(s / e); + s = s % e; + for (let o = 0; o < r; o++) { + n += "\t"; + } + } + for (let r = 0; r < s; r++) { + n += " "; + } + return n; +} +function Z6t(i, e, t) { + let s = B0(i); + if (s === -1) { + s = i.length; + } + return $qn(i.substring(0, s), e, t) + i.substring(s); +} +var e8t = ue({ + "out-build/vs/editor/common/core/indentation.js"() { + "use strict"; + + $i(); + TT(); + } +}); +var OGi; +var p9; +var not = ue({ + "out-build/vs/editor/common/inputMode.js"() { + "use strict"; + + pe(); + OGi = class { + constructor() { + this.a = "insert"; + this.b = new B(); + this.onDidChangeInputMode = this.b.event; + } + getInputMode() { + return this.a; + } + setInputMode(i) { + this.a = i; + this.b.fire(this.a); + } + }; + p9 = new OGi(); + } +}); +function m9(i) { + return i === "'" || i === "\"" || i === "`"; +} +var _Gi; +var BGi; +var UGi; +var WGi; +var b9; +var fc; +var VGi; +var HGi; +var qGi; +var zC; +var JC; +var kI = ue({ + "out-build/vs/editor/common/cursorCommon.js"() { + "use strict"; + + Rs(); + yt(); + ua(); + vge(); + TT(); + e8t(); + not(); + (function (i) { + i[i.Other = 0] = "Other"; + i[i.DeletingLeft = 2] = "DeletingLeft"; + i[i.DeletingRight = 3] = "DeletingRight"; + i[i.TypingOther = 4] = "TypingOther"; + i[i.TypingFirstSpace = 5] = "TypingFirstSpace"; + i[i.TypingConsecutiveSpace = 6] = "TypingConsecutiveSpace"; + })(_Gi ||= {}); + BGi = () => true; + UGi = () => false; + WGi = i => i === " " || i === "\t"; + b9 = class { + static shouldRecreate(i) { + return i.hasChanged(151) || i.hasChanged(136) || i.hasChanged(38) || i.hasChanged(78) || i.hasChanged(80) || i.hasChanged(81) || i.hasChanged(6) || i.hasChanged(7) || i.hasChanged(11) || i.hasChanged(9) || i.hasChanged(10) || i.hasChanged(14) || i.hasChanged(133) || i.hasChanged(52) || i.hasChanged(96) || i.hasChanged(135) || i.hasChanged(85); + } + constructor(i, e, t, s) { + this.languageConfigurationService = s; + this._cursorMoveConfigurationBrand = undefined; + this.a = i; + const n = t.options; + const r = n.get(151); + const o = n.get(52); + this.readOnly = n.get(96); + this.tabSize = e.tabSize; + this.indentSize = e.indentSize; + this.insertSpaces = e.insertSpaces; + this.stickyTabStops = n.get(121); + this.lineHeight = o.lineHeight; + this.typicalHalfwidthCharacterWidth = o.typicalHalfwidthCharacterWidth; + this.pageSize = Math.max(1, Math.floor(r.height / this.lineHeight) - 2); + this.useTabStops = n.get(133); + this.wordSeparators = n.get(136); + this.emptySelectionClipboard = n.get(38); + this.copyWithSyntaxHighlighting = n.get(25); + this.multiCursorMergeOverlapping = n.get(78); + this.multiCursorPaste = n.get(80); + this.multiCursorLimit = n.get(81); + this.autoClosingBrackets = n.get(6); + this.autoClosingComments = n.get(7); + this.autoClosingQuotes = n.get(11); + this.autoClosingDelete = n.get(9); + this.autoClosingOvertype = n.get(10); + this.autoSurround = n.get(14); + this.autoIndent = n.get(12); + this.wordSegmenterLocales = n.get(135); + this.overtypeOnPaste = n.get(85); + this.surroundingPairs = {}; + this.b = null; + this.shouldAutoCloseBefore = { + quote: this.d(i, this.autoClosingQuotes, true), + comment: this.d(i, this.autoClosingComments, false), + bracket: this.d(i, this.autoClosingBrackets, false) + }; + this.autoClosingPairs = this.languageConfigurationService.getLanguageConfiguration(i).getAutoClosingPairs(); + const a = this.languageConfigurationService.getLanguageConfiguration(i).getSurroundingPairs(); + if (a) { + for (const c of a) { + this.surroundingPairs[c.open] = c.close; + } + } + const l = this.languageConfigurationService.getLanguageConfiguration(i).comments; + this.blockCommentStartToken = l?.blockCommentStartToken ?? null; + } + get electricChars() { + if (!this.b) { + this.b = {}; + const i = this.languageConfigurationService.getLanguageConfiguration(this.a).electricCharacter?.getElectricCharacters(); + if (i) { + for (const e of i) { + this.b[e] = true; + } + } + } + return this.b; + } + get inputMode() { + return p9.getInputMode(); + } + onElectricCharacter(i, e, t) { + const s = cj(e, t - 1); + const n = this.languageConfigurationService.getLanguageConfiguration(s.languageId).electricCharacter; + if (n) { + return n.onElectricCharacter(i, s, t - s.firstCharOffset); + } else { + return null; + } + } + normalizeIndentation(i) { + return Z6t(i, this.indentSize, this.insertSpaces); + } + d(i, e, t) { + switch (e) { + case "beforeWhitespace": + return WGi; + case "languageDefined": + return this.f(i, t); + case "always": + return BGi; + case "never": + return UGi; + } + } + f(i, e) { + const t = this.languageConfigurationService.getLanguageConfiguration(i).getAutoCloseBeforeSet(e); + return s => t.indexOf(s) !== -1; + } + visibleColumnFromColumn(i, e) { + return pp.visibleColumnFromColumn(i.getLineContent(e.lineNumber), e.column, this.tabSize); + } + columnFromVisibleColumn(i, e, t) { + const s = pp.columnFromVisibleColumn(i.getLineContent(e), t, this.tabSize); + const n = i.getLineMinColumn(e); + if (s < n) { + return n; + } + const r = i.getLineMaxColumn(e); + if (s > r) { + return r; + } else { + return s; + } + } + }; + fc = class xFn { + static fromModelState(e) { + return new VGi(e); + } + static fromViewState(e) { + return new HGi(e); + } + static fromModelSelection(e) { + const t = Vs.liftSelection(e); + const s = new zC(Z.fromPositions(t.getSelectionStart()), 0, 0, t.getPosition(), 0); + return xFn.fromModelState(s); + } + static fromModelSelections(e) { + const t = []; + for (let s = 0, n = e.length; s < n; s++) { + t[s] = this.fromModelSelection(e[s]); + } + return t; + } + constructor(e, t) { + this._cursorStateBrand = undefined; + this.modelState = e; + this.viewState = t; + } + equals(e) { + return this.viewState.equals(e.viewState) && this.modelState.equals(e.modelState); + } + }; + VGi = class { + constructor(i) { + this.modelState = i; + this.viewState = null; + } + }; + HGi = class { + constructor(i) { + this.modelState = null; + this.viewState = i; + } + }; + (function (i) { + i[i.Simple = 0] = "Simple"; + i[i.Word = 1] = "Word"; + i[i.Line = 2] = "Line"; + })(qGi ||= {}); + zC = class uFt { + constructor(e, t, s, n, r) { + this.selectionStart = e; + this.selectionStartKind = t; + this.selectionStartLeftoverVisibleColumns = s; + this.position = n; + this.leftoverVisibleColumns = r; + this._singleCursorStateBrand = undefined; + this.selection = uFt.a(this.selectionStart, this.position); + } + equals(e) { + return this.selectionStartLeftoverVisibleColumns === e.selectionStartLeftoverVisibleColumns && this.leftoverVisibleColumns === e.leftoverVisibleColumns && this.selectionStartKind === e.selectionStartKind && this.position.equals(e.position) && this.selectionStart.equalsRange(e.selectionStart); + } + hasSelection() { + return !this.selection.isEmpty() || !this.selectionStart.isEmpty(); + } + move(e, t, s, n) { + if (e) { + return new uFt(this.selectionStart, this.selectionStartKind, this.selectionStartLeftoverVisibleColumns, new je(t, s), n); + } else { + return new uFt(new Z(t, s, t, s), 0, n, new je(t, s), n); + } + } + static a(e, t) { + if (e.isEmpty() || !t.isBeforeOrEqual(e.getStartPosition())) { + return Vs.fromPositions(e.getStartPosition(), t); + } else { + return Vs.fromPositions(e.getEndPosition(), t); + } + } + }; + JC = class { + constructor(i, e, t) { + this._editOperationResultBrand = undefined; + this.type = i; + this.commands = e; + this.shouldPushStackElementBefore = t.shouldPushStackElementBefore; + this.shouldPushStackElementAfter = t.shouldPushStackElementAfter; + } + }; + } +}); +var Dee; +var Fqn = ue({ + "out-build/vs/editor/common/cursor/cursorColumnSelection.js"() { + "use strict"; + + kI(); + Rs(); + yt(); + Dee = class kFn { + static columnSelect(e, t, s, n, r, o) { + const a = Math.abs(r - s) + 1; + const l = s > r; + const c = n > o; + const u = n < o; + const d = []; + for (let h = 0; h < a; h++) { + const g = s + (l ? -h : h); + const p = e.columnFromVisibleColumn(t, g, n); + const b = e.columnFromVisibleColumn(t, g, o); + const v = e.visibleColumnFromColumn(t, new je(g, p)); + const y = e.visibleColumnFromColumn(t, new je(g, b)); + if ((!u || !(v > o) && !(y < n)) && (!c || !(y > n) && !(v < o))) { + d.push(new zC(new Z(g, p, g, p), 0, 0, new je(g, b), 0)); + } + } + if (d.length === 0) { + for (let h = 0; h < a; h++) { + const g = s + (l ? -h : h); + const p = t.getLineMaxColumn(g); + d.push(new zC(new Z(g, p, g, p), 0, 0, new je(g, p), 0)); + } + } + return { + viewStates: d, + reversed: l, + fromLineNumber: s, + fromVisualColumn: n, + toLineNumber: r, + toVisualColumn: o + }; + } + static columnSelectLeft(e, t, s) { + let n = s.toViewVisualColumn; + if (n > 0) { + n--; + } + return kFn.columnSelect(e, t, s.fromViewLineNumber, s.fromViewVisualColumn, s.toViewLineNumber, n); + } + static columnSelectRight(e, t, s) { + let n = 0; + const r = Math.min(s.fromViewLineNumber, s.toViewLineNumber); + const o = Math.max(s.fromViewLineNumber, s.toViewLineNumber); + for (let l = r; l <= o; l++) { + const c = t.getLineMaxColumn(l); + const u = e.visibleColumnFromColumn(t, new je(l, c)); + n = Math.max(n, u); + } + let a = s.toViewVisualColumn; + if (a < n) { + a++; + } + return this.columnSelect(e, t, s.fromViewLineNumber, s.fromViewVisualColumn, s.toViewLineNumber, a); + } + static columnSelectUp(e, t, s, n) { + const r = n ? e.pageSize : 1; + const o = Math.max(1, s.toViewLineNumber - r); + return this.columnSelect(e, t, s.fromViewLineNumber, s.fromViewVisualColumn, o, s.toViewVisualColumn); + } + static columnSelectDown(e, t, s, n) { + const r = n ? e.pageSize : 1; + const o = Math.min(t.getLineCount(), s.toViewLineNumber + r); + return this.columnSelect(e, t, s.fromViewLineNumber, s.fromViewVisualColumn, o, s.toViewVisualColumn); + } + }; + } +}); +function jGi(i, e, t) { + if (t < 0) { + throw new Error("Unexpected negative delta"); + } + const s = i.getLineCount(); + let n = new je(s, i.getLineMaxColumn(s)); + for (let r = e.lineNumber; r <= s; r++) { + if (r === e.lineNumber) { + const o = t - i.getLineMaxColumn(e.lineNumber) + e.column; + if (o <= 0) { + n = new je(e.lineNumber, e.column + t); + break; + } + t = o; + } else { + const o = t - i.getLineMaxColumn(r); + if (o <= 0) { + n = new je(r, t); + break; + } + t = o; + } + } + return n; +} +var $y; +var rot; +var zGi; +var yge; +var wge; +var JGi; +var oot; +var Tee = ue({ + "out-build/vs/editor/common/commands/replaceCommand.js"() { + "use strict"; + + Rs(); + yt(); + ua(); + $y = class { + constructor(i, e, t = false) { + this.a = i; + this.b = e; + this.insertsAutoWhitespace = t; + } + getEditOperations(i, e) { + e.addTrackedEditOperation(this.a, this.b); + } + computeCursorState(i, e) { + const s = e.getInverseEditOperations()[0].range; + return Vs.fromPositions(s.getEndPosition()); + } + }; + rot = class { + constructor(i, e, t = false) { + this.a = i; + this.b = e; + this.insertsAutoWhitespace = t; + } + getEditOperations(i, e) { + const t = this.a.getStartPosition(); + const s = this.a.getEndPosition(); + const n = s.lineNumber; + const r = this.b.length + (this.a.isEmpty() ? 0 : -1); + let o = jGi(i, s, r); + if (o.lineNumber > n) { + o = new je(n, i.getLineMaxColumn(n)); + } + const a = Z.fromPositions(t, o); + e.addTrackedEditOperation(a, this.b); + } + computeCursorState(i, e) { + const s = e.getInverseEditOperations()[0].range; + return Vs.fromPositions(s.getEndPosition()); + } + }; + zGi = class { + constructor(i, e) { + this.a = i; + this.b = e; + } + getEditOperations(i, e) { + e.addTrackedEditOperation(this.a, this.b); + } + computeCursorState(i, e) { + const s = e.getInverseEditOperations()[0].range; + return Vs.fromRange(s, 0); + } + }; + yge = class { + constructor(i, e, t = false) { + this.a = i; + this.b = e; + this.insertsAutoWhitespace = t; + } + getEditOperations(i, e) { + e.addTrackedEditOperation(this.a, this.b); + } + computeCursorState(i, e) { + const s = e.getInverseEditOperations()[0].range; + return Vs.fromPositions(s.getStartPosition()); + } + }; + wge = class { + constructor(i, e, t, s, n = false) { + this.a = i; + this.b = e; + this.c = s; + this.d = t; + this.insertsAutoWhitespace = n; + } + getEditOperations(i, e) { + e.addTrackedEditOperation(this.a, this.b); + } + computeCursorState(i, e) { + const s = e.getInverseEditOperations()[0].range; + return Vs.fromPositions(s.getEndPosition().delta(this.d, this.c)); + } + }; + JGi = class { + constructor(i) { + this.a = i; + } + getEditOperations(i, e) { + const t = i.getValueInRange(this.a); + const s = this.a.getEndPosition(); + const n = s.lineNumber; + let r = jGi(i, s, t.length); + if (r.lineNumber > n) { + r = new je(n, i.getLineMaxColumn(n)); + } + const o = Z.fromPositions(s, r); + e.addTrackedEditOperation(o, ""); + } + computeCursorState(i, e) { + const s = e.getInverseEditOperations()[0].range; + return Vs.fromPositions(s.getEndPosition()); + } + }; + oot = class { + constructor(i, e, t, s = false) { + this.a = i; + this.b = e; + this.c = t; + this.d = s; + this.e = null; + } + getEditOperations(i, e) { + e.addTrackedEditOperation(this.a, this.b, this.d); + this.e = e.trackSelection(this.c); + } + computeCursorState(i, e) { + return e.getTrackedSelection(this.e); + } + }; + } +}); +var GGi; +var aot; +var KGi = ue({ + "out-build/vs/editor/common/cursor/cursorAtomicMoveOperations.js"() { + "use strict"; + + TT(); + (function (i) { + i[i.Left = 0] = "Left"; + i[i.Right = 1] = "Right"; + i[i.Nearest = 2] = "Nearest"; + })(GGi ||= {}); + aot = class EFn { + static whitespaceVisibleColumn(e, t, s) { + const n = e.length; + let r = 0; + let o = -1; + let a = -1; + for (let l = 0; l < n; l++) { + if (l === t) { + return [o, a, r]; + } + if (r % s === 0) { + o = l; + a = r; + } + switch (e.charCodeAt(l)) { + case 32: + r += 1; + break; + case 9: + r = pp.nextRenderTabStop(r, s); + break; + default: + return [-1, -1, -1]; + } + } + if (t === n) { + return [o, a, r]; + } else { + return [-1, -1, -1]; + } + } + static atomicPosition(e, t, s, n) { + const r = e.length; + const [o, a, l] = EFn.whitespaceVisibleColumn(e, t, s); + if (l === -1) { + return -1; + } + let c; + switch (n) { + case 0: + c = true; + break; + case 1: + c = false; + break; + case 2: + if (l % s === 0) { + return t; + } + c = l % s <= s / 2; + break; + } + if (c) { + if (o === -1) { + return -1; + } + let h = a; + for (let g = o; g < r; ++g) { + if (h === a + s) { + return o; + } + switch (e.charCodeAt(g)) { + case 32: + h += 1; + break; + case 9: + h = pp.nextRenderTabStop(h, s); + break; + default: + return -1; + } + } + if (h === a + s) { + return o; + } else { + return -1; + } + } + const u = pp.nextRenderTabStop(l, s); + let d = l; + for (let h = t; h < r; h++) { + if (d === u) { + return h; + } + switch (e.charCodeAt(h)) { + case 32: + d += 1; + break; + case 9: + d = pp.nextRenderTabStop(d, s); + break; + default: + return -1; + } + } + if (d === u) { + return r; + } else { + return -1; + } + } + }; + } +}); +var lot; +var mp; +var t8t = ue({ + "out-build/vs/editor/common/cursor/cursorMoveOperations.js"() { + "use strict"; + + $i(); + TT(); + Rs(); + yt(); + KGi(); + kI(); + lot = class { + constructor(i, e, t) { + this._cursorPositionBrand = undefined; + this.lineNumber = i; + this.column = e; + this.leftoverVisibleColumns = t; + } + }; + mp = class _k { + static leftPosition(e, t) { + if (t.column > e.getLineMinColumn(t.lineNumber)) { + return t.delta(undefined, -nji(e.getLineContent(t.lineNumber), t.column - 1)); + } + if (t.lineNumber > 1) { + const s = t.lineNumber - 1; + return new je(s, e.getLineMaxColumn(s)); + } else { + return t; + } + } + static a(e, t, s) { + if (t.column <= e.getLineIndentColumn(t.lineNumber)) { + const n = e.getLineMinColumn(t.lineNumber); + const r = e.getLineContent(t.lineNumber); + const o = aot.atomicPosition(r, t.column - 1, s, 0); + if (o !== -1 && o + 1 >= n) { + return new je(t.lineNumber, o + 1); + } + } + return this.leftPosition(e, t); + } + static b(e, t, s) { + const n = e.stickyTabStops ? _k.a(t, s, e.tabSize) : _k.leftPosition(t, s); + return new lot(n.lineNumber, n.column, 0); + } + static moveLeft(e, t, s, n, r) { + let o; + let a; + if (s.hasSelection() && !n) { + o = s.selection.startLineNumber; + a = s.selection.startColumn; + } else { + const l = s.position.delta(undefined, -(r - 1)); + const c = t.normalizePosition(_k.c(l, t), 0); + const u = _k.b(e, t, c); + o = u.lineNumber; + a = u.column; + } + return s.move(n, o, a, 0); + } + static c(e, t) { + return new je(e.lineNumber, _k.d(e.column, t.getLineMinColumn(e.lineNumber), t.getLineMaxColumn(e.lineNumber))); + } + static d(e, t, s) { + if (e < t) { + return t; + } else if (e > s) { + return s; + } else { + return e; + } + } + static rightPosition(e, t, s) { + if (s < e.getLineMaxColumn(t)) { + s = s + C4t(e.getLineContent(t), s - 1); + } else if (t < e.getLineCount()) { + t = t + 1; + s = e.getLineMinColumn(t); + } + return new je(t, s); + } + static rightPositionAtomicSoftTabs(e, t, s, n, r) { + if (s < e.getLineIndentColumn(t)) { + const o = e.getLineContent(t); + const a = aot.atomicPosition(o, s - 1, n, 1); + if (a !== -1) { + return new je(t, a + 1); + } + } + return this.rightPosition(e, t, s); + } + static right(e, t, s) { + const n = e.stickyTabStops ? _k.rightPositionAtomicSoftTabs(t, s.lineNumber, s.column, e.tabSize, e.indentSize) : _k.rightPosition(t, s.lineNumber, s.column); + return new lot(n.lineNumber, n.column, 0); + } + static moveRight(e, t, s, n, r) { + let o; + let a; + if (s.hasSelection() && !n) { + o = s.selection.endLineNumber; + a = s.selection.endColumn; + } else { + const l = s.position.delta(undefined, r - 1); + const c = t.normalizePosition(_k.c(l, t), 1); + const u = _k.right(e, t, c); + o = u.lineNumber; + a = u.column; + } + return s.move(n, o, a, 0); + } + static vertical(e, t, s, n, r, o, a, l) { + const c = pp.visibleColumnFromColumn(t.getLineContent(s), n, e.tabSize) + r; + const u = t.getLineCount(); + const d = s === 1 && n === 1; + const h = s === u && n === t.getLineMaxColumn(s); + const g = o < s ? d : h; + s = o; + if (s < 1) { + s = 1; + if (a) { + n = t.getLineMinColumn(s); + } else { + n = Math.min(t.getLineMaxColumn(s), n); + } + } else if (s > u) { + s = u; + if (a) { + n = t.getLineMaxColumn(s); + } else { + n = Math.min(t.getLineMaxColumn(s), n); + } + } else { + n = e.columnFromVisibleColumn(t, s, c); + } + if (g) { + r = 0; + } else { + r = c - pp.visibleColumnFromColumn(t.getLineContent(s), n, e.tabSize); + } + if (l !== undefined) { + const p = new je(s, n); + const b = t.normalizePosition(p, l); + r = r + (n - b.column); + s = b.lineNumber; + n = b.column; + } + return new lot(s, n, r); + } + static down(e, t, s, n, r, o, a) { + return this.vertical(e, t, s, n, r, s + o, a, 4); + } + static moveDown(e, t, s, n, r) { + let o; + let a; + if (s.hasSelection() && !n) { + o = s.selection.endLineNumber; + a = s.selection.endColumn; + } else { + o = s.position.lineNumber; + a = s.position.column; + } + let l = 0; + let c; + do { + c = _k.down(e, t, o + l, a, s.leftoverVisibleColumns, r, true); + if (t.normalizePosition(new je(c.lineNumber, c.column), 2).lineNumber > o) { + break; + } + } while (l++ < 10 && o + l < t.getLineCount()); + return s.move(n, c.lineNumber, c.column, c.leftoverVisibleColumns); + } + static translateDown(e, t, s) { + const n = s.selection; + const r = _k.down(e, t, n.selectionStartLineNumber, n.selectionStartColumn, s.selectionStartLeftoverVisibleColumns, 1, false); + const o = _k.down(e, t, n.positionLineNumber, n.positionColumn, s.leftoverVisibleColumns, 1, false); + return new zC(new Z(r.lineNumber, r.column, r.lineNumber, r.column), 0, r.leftoverVisibleColumns, new je(o.lineNumber, o.column), o.leftoverVisibleColumns); + } + static up(e, t, s, n, r, o, a) { + return this.vertical(e, t, s, n, r, s - o, a, 3); + } + static moveUp(e, t, s, n, r) { + let o; + let a; + if (s.hasSelection() && !n) { + o = s.selection.startLineNumber; + a = s.selection.startColumn; + } else { + o = s.position.lineNumber; + a = s.position.column; + } + const l = _k.up(e, t, o, a, s.leftoverVisibleColumns, r, true); + return s.move(n, l.lineNumber, l.column, l.leftoverVisibleColumns); + } + static translateUp(e, t, s) { + const n = s.selection; + const r = _k.up(e, t, n.selectionStartLineNumber, n.selectionStartColumn, s.selectionStartLeftoverVisibleColumns, 1, false); + const o = _k.up(e, t, n.positionLineNumber, n.positionColumn, s.leftoverVisibleColumns, 1, false); + return new zC(new Z(r.lineNumber, r.column, r.lineNumber, r.column), 0, r.leftoverVisibleColumns, new je(o.lineNumber, o.column), o.leftoverVisibleColumns); + } + static e(e, t) { + return e.getLineFirstNonWhitespaceColumn(t) === 0; + } + static moveToPrevBlankLine(e, t, s, n) { + let r = s.position.lineNumber; + while (r > 1 && this.e(t, r)) { + r--; + } + while (r > 1 && !this.e(t, r)) { + r--; + } + return s.move(n, r, t.getLineMinColumn(r), 0); + } + static moveToNextBlankLine(e, t, s, n) { + const r = t.getLineCount(); + let o = s.position.lineNumber; + while (o < r && this.e(t, o)) { + o++; + } + while (o < r && !this.e(t, o)) { + o++; + } + return s.move(n, o, t.getLineMinColumn(o), 0); + } + static moveToBeginningOfLine(e, t, s, n) { + const r = s.position.lineNumber; + const o = t.getLineMinColumn(r); + const a = t.getLineFirstNonWhitespaceColumn(r) || o; + let l; + if (s.position.column === a) { + l = o; + } else { + l = a; + } + return s.move(n, r, l, 0); + } + static moveToEndOfLine(e, t, s, n, r) { + const o = s.position.lineNumber; + const a = t.getLineMaxColumn(o); + return s.move(n, o, a, r ? 1073741824 - a : 0); + } + static moveToBeginningOfBuffer(e, t, s, n) { + return s.move(n, 1, 1, 0); + } + static moveToEndOfBuffer(e, t, s, n) { + const r = t.getLineCount(); + const o = t.getLineMaxColumn(r); + return s.move(n, r, o, 0); + } + }; + } +}); +var uj; +var cot = ue({ + "out-build/vs/editor/common/cursor/cursorDeleteOperations.js"() { + "use strict"; + + $i(); + Tee(); + kI(); + TT(); + t8t(); + yt(); + Rs(); + uj = class x3i { + static deleteRight(e, t, s, n) { + const r = []; + let o = e !== 3; + for (let a = 0, l = n.length; a < l; a++) { + const c = n[a]; + let u = c; + if (u.isEmpty()) { + const d = c.getPosition(); + const h = mp.right(t, s, d); + u = new Z(h.lineNumber, h.column, d.lineNumber, d.column); + } + if (u.isEmpty()) { + r[a] = null; + continue; + } + if (u.startLineNumber !== u.endLineNumber) { + o = true; + } + r[a] = new $y(u, ""); + } + return [o, r]; + } + static isAutoClosingPairDelete(e, t, s, n, r, o, a) { + if (t === "never" && s === "never" || e === "never") { + return false; + } + for (let l = 0, c = o.length; l < c; l++) { + const u = o[l]; + const d = u.getPosition(); + if (!u.isEmpty()) { + return false; + } + const h = r.getLineContent(d.lineNumber); + if (d.column < 2 || d.column >= h.length + 1) { + return false; + } + const g = h.charAt(d.column - 2); + const p = n.get(g); + if (!p) { + return false; + } + if (m9(g)) { + if (s === "never") { + return false; + } + } else if (t === "never") { + return false; + } + const b = h.charAt(d.column - 1); + let v = false; + for (const y of p) { + if (y.open === g && y.close === b) { + v = true; + } + } + if (!v) { + return false; + } + if (e === "auto") { + let y = false; + for (let w = 0, C = a.length; w < C; w++) { + const S = a[w]; + if (d.lineNumber === S.startLineNumber && d.column === S.startColumn) { + y = true; + break; + } + } + if (!y) { + return false; + } + } + } + return true; + } + static c(e, t, s) { + const n = []; + for (let r = 0, o = s.length; r < o; r++) { + const a = s[r].getPosition(); + const l = new Z(a.lineNumber, a.column - 1, a.lineNumber, a.column + 1); + n[r] = new $y(l, ""); + } + return [true, n]; + } + static deleteLeft(e, t, s, n, r) { + if (this.isAutoClosingPairDelete(t.autoClosingDelete, t.autoClosingBrackets, t.autoClosingQuotes, t.autoClosingPairs.autoClosingPairsOpenByEnd, s, n, r)) { + return this.c(t, s, n); + } + const o = []; + let a = e !== 2; + for (let l = 0, c = n.length; l < c; l++) { + const u = x3i.d(n[l], s, t); + if (u.isEmpty()) { + o[l] = null; + continue; + } + if (u.startLineNumber !== u.endLineNumber) { + a = true; + } + o[l] = new $y(u, ""); + } + return [a, o]; + } + static d(e, t, s) { + if (!e.isEmpty()) { + return e; + } + const n = e.getPosition(); + if (s.useTabStops && n.column > 1) { + const r = t.getLineContent(n.lineNumber); + const o = B0(r); + const a = o === -1 ? r.length + 1 : o + 1; + if (n.column <= a) { + const l = s.visibleColumnFromColumn(t, n); + const c = pp.prevIndentTabStop(l, s.indentSize); + const u = s.columnFromVisibleColumn(t, n.lineNumber, c); + return new Z(n.lineNumber, u, n.lineNumber, n.column); + } + } + return Z.fromPositions(x3i.e(n, t), n); + } + static e(e, t) { + if (e.column > 1) { + const s = nHn(e.column - 1, t.getLineContent(e.lineNumber)); + return e.with(undefined, s + 1); + } else if (e.lineNumber > 1) { + const s = e.lineNumber - 1; + return new je(s, t.getLineMaxColumn(s)); + } else { + return e; + } + } + static cut(e, t, s) { + const n = []; + let r = null; + s.sort((o, a) => je.compare(o.getStartPosition(), a.getEndPosition())); + for (let o = 0, a = s.length; o < a; o++) { + const l = s[o]; + if (l.isEmpty()) { + if (e.emptySelectionClipboard) { + const c = l.getPosition(); + let u; + let d; + let h; + let g; + if (c.lineNumber < t.getLineCount()) { + u = c.lineNumber; + d = 1; + h = c.lineNumber + 1; + g = 1; + } else if (c.lineNumber > 1 && r?.endLineNumber !== c.lineNumber) { + u = c.lineNumber - 1; + d = t.getLineMaxColumn(c.lineNumber - 1); + h = c.lineNumber; + g = t.getLineMaxColumn(c.lineNumber); + } else { + u = c.lineNumber; + d = 1; + h = c.lineNumber; + g = t.getLineMaxColumn(c.lineNumber); + } + const p = new Z(u, d, h, g); + r = p; + if (p.isEmpty()) { + n[o] = null; + } else { + n[o] = new $y(p, ""); + } + } else { + n[o] = null; + } + } else { + n[o] = new $y(l, ""); + } + } + return new JC(0, n, { + shouldPushStackElementBefore: true, + shouldPushStackElementAfter: true + }); + } + }; + } +}); +function ym(i, e, t, s) { + if (typeof i != "number") { + i = i.getTime(); + } + const n = Math.round((new Date().getTime() - i) / 1000); + if (n < -30) { + return f(45, null, ym(new Date().getTime() + n * 1000, false)); + } + if (!s && n < 30) { + return f(46, null); + } + let r; + if (n < dj) { + r = n; + return f(e ? r === 1 ? t ? 47 : 48 : t ? 49 : 50 : r === 1 ? t ? 51 : 52 : t ? 53 : 54, null, r); + } else if (n < hj) { + r = Math.floor(n / dj); + return f(e ? r === 1 ? t ? 55 : 56 : t ? 57 : 58 : r === 1 ? t ? 59 : 60 : t ? 61 : 62, null, r); + } else if (n < v9) { + r = Math.floor(n / hj); + return f(e ? r === 1 ? t ? 63 : 64 : t ? 65 : 66 : r === 1 ? t ? 67 : 68 : t ? 69 : 70, null, r); + } else if (n < i8t) { + r = Math.floor(n / v9); + return f(e ? r === 1 ? 71 : 72 : r === 1 ? 73 : 74, null, r); + } else if (n < s8t) { + r = Math.floor(n / i8t); + return f(e ? r === 1 ? t ? 75 : 76 : t ? 77 : 78 : r === 1 ? t ? 79 : 80 : t ? 81 : 82, null, r); + } else if (n < n8t) { + r = Math.floor(n / s8t); + return f(e ? r === 1 ? t ? 83 : 84 : t ? 85 : 86 : r === 1 ? t ? 87 : 88 : t ? 89 : 90, null, r); + } else { + r = Math.floor(n / n8t); + return f(e ? r === 1 ? t ? 91 : 92 : t ? 93 : 94 : r === 1 ? t ? 95 : 96 : t ? 97 : 98, null, r); + } +} +function Oqn(i, e, t) { + if (typeof i != "number") { + i = i.getTime(); + } + const s = new Date(); + s.setHours(0, 0, 0, 0); + const n = new Date(s.getTime()); + n.setDate(n.getDate() - 1); + if (i > s.getTime()) { + return f(99, null); + } else if (i > n.getTime()) { + return f(100, null); + } else { + return ym(i, e, t); + } +} +function _qn(i, e) { + const t = Math.abs(i / 1000); + if (t < 1) { + return f(e ? 101 : 102, null, i); + } else if (t < dj) { + return f(e ? 103 : 104, null, Math.round(i) / 1000); + } else if (t < hj) { + return f(e ? 105 : 106, null, Math.round(i / (dj * 1000))); + } else if (t < v9) { + return f(e ? 107 : 108, null, Math.round(i / (hj * 1000))); + } else { + return f(109, null, Math.round(i / (v9 * 1000))); + } +} +function YGi(i) { + return i.getFullYear() + "-" + String(i.getMonth() + 1).padStart(2, "0") + "-" + String(i.getDate()).padStart(2, "0") + "T" + String(i.getHours()).padStart(2, "0") + ":" + String(i.getMinutes()).padStart(2, "0") + ":" + String(i.getSeconds()).padStart(2, "0") + "." + (i.getMilliseconds() / 1000).toFixed(3).slice(2, 5) + "Z"; +} +var dj; +var hj; +var v9; +var i8t; +var s8t; +var n8t; +var Pee; +var Wv = ue({ + "out-build/vs/base/common/date.js"() { + "use strict"; + + X(); + rt(); + dj = 60; + hj = dj * 60; + v9 = hj * 24; + i8t = v9 * 7; + s8t = v9 * 30; + n8t = v9 * 365; + Pee = { + DateTimeFormat(i, e) { + try { + return new Intl.DateTimeFormat(i, e); + } catch { + return new Intl.DateTimeFormat(undefined, e); + } + }, + Collator(i, e) { + try { + return new Intl.Collator(i, e); + } catch { + return new Intl.Collator(undefined, e); + } + }, + Segmenter(i, e) { + try { + return new Intl.Segmenter(i, e); + } catch { + return new Intl.Segmenter(undefined, e); + } + }, + Locale(i, e) { + try { + return new Intl.Locale(i, e); + } catch { + return new Intl.Locale(NB, e); + } + } + }; + } +}); +function uot(i) { + if (i < 0) { + return 0; + } else if (i > 255) { + return 255; + } else { + return i | 0; + } +} +function Lee(i) { + if (i < 0) { + return 0; + } else if (i > 4294967295) { + return 4294967295; + } else { + return i | 0; + } +} +var XGi; +var dot = ue({ + "out-build/vs/base/common/uint.js"() { + "use strict"; + + (function (i) { + i[i.MAX_SAFE_SMALL_INTEGER = 1073741824] = "MAX_SAFE_SMALL_INTEGER"; + i[i.MIN_SAFE_SMALL_INTEGER = -1073741824] = "MIN_SAFE_SMALL_INTEGER"; + i[i.MAX_UINT_8 = 255] = "MAX_UINT_8"; + i[i.MAX_UINT_16 = 65535] = "MAX_UINT_16"; + i[i.MAX_UINT_32 = 4294967295] = "MAX_UINT_32"; + i[i.UNICODE_SUPPLEMENTARY_PLANE_BEGIN = 65536] = "UNICODE_SUPPLEMENTARY_PLANE_BEGIN"; + })(XGi ||= {}); + } +}); +var Cge; +var QGi; +var Sge; +var Ree = ue({ + "out-build/vs/editor/common/core/characterClassifier.js"() { + "use strict"; + + dot(); + Cge = class IFn { + constructor(e) { + const t = uot(e); + this.c = t; + this.a = IFn.d(t); + this.b = new Map(); + } + static d(e) { + const t = new Uint8Array(256); + t.fill(e); + return t; + } + set(e, t) { + const s = uot(t); + if (e >= 0 && e < 256) { + this.a[e] = s; + } else { + this.b.set(e, s); + } + } + get(e) { + if (e >= 0 && e < 256) { + return this.a[e]; + } else { + return this.b.get(e) || this.c; + } + } + clear() { + this.a.fill(this.c); + this.b.clear(); + } + }; + (function (i) { + i[i.False = 0] = "False"; + i[i.True = 1] = "True"; + })(QGi ||= {}); + Sge = class { + constructor() { + this.a = new Cge(0); + } + add(i) { + this.a.set(i, 1); + } + has(i) { + return this.a.get(i) === 1; + } + clear() { + return this.a.clear(); + } + }; + } +}); +function PT(i, e) { + const t = `${i}/${e.join(",")}`; + let s = r8t.get(t); + if (!s) { + s = new eKi(i, e); + r8t.set(t, s); + } + return s; +} +var ZGi; +var eKi; +var r8t; +var xge = ue({ + "out-build/vs/editor/common/core/wordCharacterClassifier.js"() { + "use strict"; + + Wv(); + In(); + Ree(); + (function (i) { + i[i.Regular = 0] = "Regular"; + i[i.Whitespace = 1] = "Whitespace"; + i[i.WordSeparator = 2] = "WordSeparator"; + })(ZGi ||= {}); + eKi = class extends Cge { + constructor(i, e) { + super(0); + this.e = null; + this.f = null; + this.g = []; + this.intlSegmenterLocales = e; + if (this.intlSegmenterLocales.length > 0) { + this.e = Pee.Segmenter(this.intlSegmenterLocales, { + granularity: "word" + }); + } else { + this.e = null; + } + for (let t = 0, s = i.length; t < s; t++) { + this.set(i.charCodeAt(t), 2); + } + this.set(32, 1); + this.set(9, 1); + } + findPrevIntlWordBeforeOrAtOffset(i, e) { + let t = null; + for (const s of this.h(i)) { + if (s.index > e) { + break; + } + t = s; + } + return t; + } + findNextIntlWordAtOrAfterOffset(i, e) { + for (const t of this.h(i)) { + if (!(t.index < e)) { + return t; + } + } + return null; + } + h(i) { + if (this.e) { + if (this.f === i) { + return this.g; + } else { + this.f = i; + this.g = this.j(this.e.segment(i)); + return this.g; + } + } else { + return []; + } + } + j(i) { + const e = []; + for (const t of i) { + if (this.k(t)) { + e.push(t); + } + } + return e; + } + k(i) { + return !!i.isWordLike; + } + }; + r8t = new vc(10); + } +}); +function hot(i) { + return i.filter(e => !!e); +} +var tKi; +var iKi; +var Fy; +var kge; +var fot = ue({ + "out-build/vs/editor/common/cursor/cursorWordOperations.js"() { + "use strict"; + + $i(); + kI(); + cot(); + xge(); + Rs(); + yt(); + (function (i) { + i[i.None = 0] = "None"; + i[i.Regular = 1] = "Regular"; + i[i.Separator = 2] = "Separator"; + })(tKi ||= {}); + (function (i) { + i[i.WordStart = 0] = "WordStart"; + i[i.WordStartFast = 1] = "WordStartFast"; + i[i.WordEnd = 2] = "WordEnd"; + i[i.WordAccessibility = 3] = "WordAccessibility"; + })(iKi ||= {}); + Fy = class cb { + static a(e, t, s, n, r) { + return { + start: n, + end: r, + wordType: t, + nextCharClass: s + }; + } + static b(e, t) { + return { + start: e.index, + end: e.index + e.segment.length, + wordType: 1, + nextCharClass: t + }; + } + static c(e, t, s) { + const n = t.getLineContent(s.lineNumber); + return this.d(n, e, s); + } + static d(e, t, s) { + let n = 0; + const r = t.findPrevIntlWordBeforeOrAtOffset(e, s.column - 2); + for (let o = s.column - 2; o >= 0; o--) { + const a = e.charCodeAt(o); + const l = t.get(a); + if (r && o === r.index) { + return this.b(r, l); + } + if (l === 0) { + if (n === 2) { + return this.a(e, n, l, o + 1, this.e(e, t, n, o + 1)); + } + n = 1; + } else if (l === 2) { + if (n === 1) { + return this.a(e, n, l, o + 1, this.e(e, t, n, o + 1)); + } + n = 2; + } else if (l === 1 && n !== 0) { + return this.a(e, n, l, o + 1, this.e(e, t, n, o + 1)); + } + } + if (n !== 0) { + return this.a(e, n, 1, 0, this.e(e, t, n, 0)); + } else { + return null; + } + } + static e(e, t, s, n) { + const r = t.findNextIntlWordAtOrAfterOffset(e, n); + const o = e.length; + for (let a = n; a < o; a++) { + const l = e.charCodeAt(a); + const c = t.get(l); + if (r && a === r.index + r.segment.length || c === 1 || s === 1 && c === 2 || s === 2 && c === 0) { + return a; + } + } + return o; + } + static f(e, t, s) { + const n = t.getLineContent(s.lineNumber); + return this.g(n, e, s); + } + static g(e, t, s) { + let n = 0; + const r = e.length; + const o = t.findNextIntlWordAtOrAfterOffset(e, s.column - 1); + for (let a = s.column - 1; a < r; a++) { + const l = e.charCodeAt(a); + const c = t.get(l); + if (o && a === o.index) { + return this.b(o, c); + } + if (c === 0) { + if (n === 2) { + return this.a(e, n, c, this.h(e, t, n, a - 1), a); + } + n = 1; + } else if (c === 2) { + if (n === 1) { + return this.a(e, n, c, this.h(e, t, n, a - 1), a); + } + n = 2; + } else if (c === 1 && n !== 0) { + return this.a(e, n, c, this.h(e, t, n, a - 1), a); + } + } + if (n !== 0) { + return this.a(e, n, 1, this.h(e, t, n, r - 1), r); + } else { + return null; + } + } + static h(e, t, s, n) { + const r = t.findPrevIntlWordBeforeOrAtOffset(e, n); + for (let o = n; o >= 0; o--) { + const a = e.charCodeAt(o); + const l = t.get(a); + if (r && o === r.index) { + return o; + } + if (l === 1 || s === 1 && l === 2 || s === 2 && l === 0) { + return o + 1; + } + } + return 0; + } + static moveWordLeft(e, t, s, n, r) { + let o = s.lineNumber; + let a = s.column; + if (a === 1 && o > 1) { + o = o - 1; + a = t.getLineMaxColumn(o); + } + let l = cb.c(e, t, new je(o, a)); + if (n === 0) { + return new je(o, l ? l.start + 1 : 1); + } + if (n === 1) { + if (!r && l && l.wordType === 2 && l.end - l.start === 1 && l.nextCharClass === 0) { + l = cb.c(e, t, new je(o, l.start + 1)); + } + return new je(o, l ? l.start + 1 : 1); + } + if (n === 3) { + while (l && l.wordType === 2) { + l = cb.c(e, t, new je(o, l.start + 1)); + } + return new je(o, l ? l.start + 1 : 1); + } + if (l && a <= l.end + 1) { + l = cb.c(e, t, new je(o, l.start + 1)); + } + return new je(o, l ? l.end + 1 : 1); + } + static _moveWordPartLeft(e, t) { + const s = t.lineNumber; + const n = e.getLineMaxColumn(s); + if (t.column === 1) { + if (s > 1) { + return new je(s - 1, e.getLineMaxColumn(s - 1)); + } else { + return t; + } + } + const r = e.getLineContent(s); + for (let o = t.column - 1; o > 1; o--) { + const a = r.charCodeAt(o - 2); + const l = r.charCodeAt(o - 1); + if (a === 95 && l !== 95) { + return new je(s, o); + } + if (a === 45 && l !== 45) { + return new je(s, o); + } + if ((e9(a) || Bnt(a)) && PL(l)) { + return new je(s, o); + } + if (PL(a) && PL(l) && o + 1 < n) { + const c = r.charCodeAt(o); + if (e9(c) || Bnt(c)) { + return new je(s, o); + } + } + } + return new je(s, 1); + } + static moveWordRight(e, t, s, n) { + let r = s.lineNumber; + let o = s.column; + let a = false; + if (o === t.getLineMaxColumn(r) && r < t.getLineCount()) { + a = true; + r = r + 1; + o = 1; + } + let l = cb.f(e, t, new je(r, o)); + if (n === 2) { + if (l && l.wordType === 2 && l.end - l.start === 1 && l.nextCharClass === 0) { + l = cb.f(e, t, new je(r, l.end + 1)); + } + if (l) { + o = l.end + 1; + } else { + o = t.getLineMaxColumn(r); + } + } else if (n === 3) { + for (a && (o = 0); l && (l.wordType === 2 || l.start + 1 <= o);) { + l = cb.f(e, t, new je(r, l.end + 1)); + } + if (l) { + o = l.start + 1; + } else { + o = t.getLineMaxColumn(r); + } + } else { + if (l && !a && o >= l.start + 1) { + l = cb.f(e, t, new je(r, l.end + 1)); + } + if (l) { + o = l.start + 1; + } else { + o = t.getLineMaxColumn(r); + } + } + return new je(r, o); + } + static _moveWordPartRight(e, t) { + const s = t.lineNumber; + const n = e.getLineMaxColumn(s); + if (t.column === n) { + if (s < e.getLineCount()) { + return new je(s + 1, 1); + } else { + return t; + } + } + const r = e.getLineContent(s); + for (let o = t.column + 1; o < n; o++) { + const a = r.charCodeAt(o - 2); + const l = r.charCodeAt(o - 1); + if (a !== 95 && l === 95) { + return new je(s, o); + } + if (a !== 45 && l === 45) { + return new je(s, o); + } + if ((e9(a) || Bnt(a)) && PL(l)) { + return new je(s, o); + } + if (PL(a) && PL(l) && o + 1 < n) { + const c = r.charCodeAt(o); + if (e9(c) || Bnt(c)) { + return new je(s, o); + } + } + } + return new je(s, n); + } + static i(e, t) { + const s = e.getLineContent(t.lineNumber); + const n = t.column - 2; + const r = TL(s, n); + if (r + 1 < n) { + return new Z(t.lineNumber, r + 2, t.lineNumber, t.column); + } else { + return null; + } + } + static deleteWordLeft(e, t) { + const s = e.wordSeparators; + const n = e.model; + const r = e.selection; + const o = e.whitespaceHeuristics; + if (!r.isEmpty()) { + return r; + } + if (uj.isAutoClosingPairDelete(e.autoClosingDelete, e.autoClosingBrackets, e.autoClosingQuotes, e.autoClosingPairs.autoClosingPairsOpenByEnd, e.model, [e.selection], e.autoClosedCharacters)) { + const d = e.selection.getPosition(); + return new Z(d.lineNumber, d.column - 1, d.lineNumber, d.column + 1); + } + const a = new je(r.positionLineNumber, r.positionColumn); + let l = a.lineNumber; + let c = a.column; + if (l === 1 && c === 1) { + return null; + } + if (o) { + const d = this.i(n, a); + if (d) { + return d; + } + } + let u = cb.c(s, n, a); + if (t === 0) { + if (u) { + c = u.start + 1; + } else if (c > 1) { + c = 1; + } else { + l--; + c = n.getLineMaxColumn(l); + } + } else { + if (u && c <= u.end + 1) { + u = cb.c(s, n, new je(l, u.start + 1)); + } + if (u) { + c = u.end + 1; + } else if (c > 1) { + c = 1; + } else { + l--; + c = n.getLineMaxColumn(l); + } + } + return new Z(l, c, a.lineNumber, a.column); + } + static deleteInsideWord(e, t, s) { + if (!s.isEmpty()) { + return s; + } + const n = new je(s.positionLineNumber, s.positionColumn); + const r = this.k(t, n); + return r || this.l(e, t, n); + } + static j(e, t) { + const s = e.charCodeAt(t); + return s === 32 || s === 9; + } + static k(e, t) { + const s = e.getLineContent(t.lineNumber); + const n = s.length; + if (n === 0) { + return null; + } + let r = Math.max(t.column - 2, 0); + if (!this.j(s, r)) { + return null; + } + let o = Math.min(t.column - 1, n - 1); + if (!this.j(s, o)) { + return null; + } + while (r > 0 && this.j(s, r - 1)) { + r--; + } + while (o + 1 < n && this.j(s, o + 1)) { + o++; + } + return new Z(t.lineNumber, r + 1, t.lineNumber, o + 2); + } + static l(e, t, s) { + const n = t.getLineContent(s.lineNumber); + const r = n.length; + if (r === 0) { + if (s.lineNumber > 1) { + return new Z(s.lineNumber - 1, t.getLineMaxColumn(s.lineNumber - 1), s.lineNumber, 1); + } else if (s.lineNumber < t.getLineCount()) { + return new Z(s.lineNumber, 1, s.lineNumber + 1, 1); + } else { + return new Z(s.lineNumber, 1, s.lineNumber, 1); + } + } + const o = d => d.start + 1 <= s.column && s.column <= d.end + 1; + const a = (d, h) => { + d = Math.min(d, s.column); + h = Math.max(h, s.column); + return new Z(s.lineNumber, d, s.lineNumber, h); + }; + const l = d => { + let h = d.start + 1; + let g = d.end + 1; + let p = false; + while (g - 1 < r && this.j(n, g - 1)) { + p = true; + g++; + } + if (!p) { + while (h > 1 && this.j(n, h - 2)) { + h--; + } + } + return a(h, g); + }; + const c = cb.c(e, t, s); + if (c && o(c)) { + return l(c); + } + const u = cb.f(e, t, s); + if (u && o(u)) { + return l(u); + } else if (c && u) { + return a(c.end + 1, u.start + 1); + } else if (c) { + return a(c.start + 1, c.end + 1); + } else if (u) { + return a(u.start + 1, u.end + 1); + } else { + return a(1, r + 1); + } + } + static _deleteWordPartLeft(e, t) { + if (!t.isEmpty()) { + return t; + } + const s = t.getPosition(); + const n = cb._moveWordPartLeft(e, s); + return new Z(s.lineNumber, s.column, n.lineNumber, n.column); + } + static m(e, t) { + const s = e.length; + for (let n = t; n < s; n++) { + const r = e.charAt(n); + if (r !== " " && r !== "\t") { + return n; + } + } + return s; + } + static n(e, t) { + const s = e.getLineContent(t.lineNumber); + const n = t.column - 1; + const r = this.m(s, n); + if (n + 1 < r) { + return new Z(t.lineNumber, t.column, t.lineNumber, r + 1); + } else { + return null; + } + } + static deleteWordRight(e, t) { + const s = e.wordSeparators; + const n = e.model; + const r = e.selection; + const o = e.whitespaceHeuristics; + if (!r.isEmpty()) { + return r; + } + const a = new je(r.positionLineNumber, r.positionColumn); + let l = a.lineNumber; + let c = a.column; + const u = n.getLineCount(); + const d = n.getLineMaxColumn(l); + if (l === u && c === d) { + return null; + } + if (o) { + const g = this.n(n, a); + if (g) { + return g; + } + } + let h = cb.f(s, n, a); + if (t === 2) { + if (h) { + c = h.end + 1; + } else if (c < d || l === u) { + c = d; + } else { + l++; + h = cb.f(s, n, new je(l, 1)); + if (h) { + c = h.start + 1; + } else { + c = n.getLineMaxColumn(l); + } + } + } else { + if (h && c >= h.start + 1) { + h = cb.f(s, n, new je(l, h.end + 1)); + } + if (h) { + c = h.start + 1; + } else if (c < d || l === u) { + c = d; + } else { + l++; + h = cb.f(s, n, new je(l, 1)); + if (h) { + c = h.start + 1; + } else { + c = n.getLineMaxColumn(l); + } + } + } + return new Z(l, c, a.lineNumber, a.column); + } + static _deleteWordPartRight(e, t) { + if (!t.isEmpty()) { + return t; + } + const s = t.getPosition(); + const n = cb._moveWordPartRight(e, s); + return new Z(s.lineNumber, s.column, n.lineNumber, n.column); + } + static o(e, t, s) { + const n = new Z(t, s.start + 1, t, s.end + 1); + return { + word: e.getValueInRange(n), + startColumn: n.startColumn, + endColumn: n.endColumn + }; + } + static getWordAtPosition(e, t, s, n) { + const r = PT(t, s); + const o = cb.c(r, e, n); + if (o && o.wordType === 1 && o.start <= n.column - 1 && n.column - 1 <= o.end) { + return cb.o(e, n.lineNumber, o); + } + const a = cb.f(r, e, n); + if (a && a.wordType === 1 && a.start <= n.column - 1 && n.column - 1 <= a.end) { + return cb.o(e, n.lineNumber, a); + } else { + return null; + } + } + static word(e, t, s, n, r) { + const o = PT(e.wordSeparators, e.wordSegmenterLocales); + const a = cb.c(o, t, r); + const l = cb.f(o, t, r); + if (!n) { + let g; + let p; + if (a && a.wordType === 1 && a.start <= r.column - 1 && r.column - 1 <= a.end) { + g = a.start + 1; + p = a.end + 1; + } else if (l && l.wordType === 1 && l.start <= r.column - 1 && r.column - 1 <= l.end) { + g = l.start + 1; + p = l.end + 1; + } else { + if (a) { + g = a.end + 1; + } else { + g = 1; + } + if (l) { + p = l.start + 1; + } else { + p = t.getLineMaxColumn(r.lineNumber); + } + } + return new zC(new Z(r.lineNumber, g, r.lineNumber, p), 1, 0, new je(r.lineNumber, p), 0); + } + let c; + let u; + if (a && a.wordType === 1 && a.start < r.column - 1 && r.column - 1 < a.end) { + c = a.start + 1; + u = a.end + 1; + } else if (l && l.wordType === 1 && l.start < r.column - 1 && r.column - 1 < l.end) { + c = l.start + 1; + u = l.end + 1; + } else { + c = r.column; + u = r.column; + } + const d = r.lineNumber; + let h; + if (s.selectionStart.containsPosition(r)) { + h = s.selectionStart.endColumn; + } else if (r.isBeforeOrEqual(s.selectionStart.getStartPosition())) { + h = c; + const g = new je(d, h); + if (s.selectionStart.containsPosition(g)) { + h = s.selectionStart.endColumn; + } + } else { + h = u; + const g = new je(d, h); + if (s.selectionStart.containsPosition(g)) { + h = s.selectionStart.startColumn; + } + } + return s.move(true, d, h, 0); + } + }; + kge = class extends Fy { + static deleteWordPartLeft(i) { + const e = hot([Fy.deleteWordLeft(i, 0), Fy.deleteWordLeft(i, 2), Fy._deleteWordPartLeft(i.model, i.selection)]); + e.sort(Z.compareRangesUsingEnds); + return e[2]; + } + static deleteWordPartRight(i) { + const e = hot([Fy.deleteWordRight(i, 0), Fy.deleteWordRight(i, 2), Fy._deleteWordPartRight(i.model, i.selection)]); + e.sort(Z.compareRangesUsingStarts); + return e[0]; + } + static moveWordPartLeft(i, e, t, s) { + const n = hot([Fy.moveWordLeft(i, e, t, 0, s), Fy.moveWordLeft(i, e, t, 2, s), Fy._moveWordPartLeft(e, t)]); + n.sort(je.compare); + return n[2]; + } + static moveWordPartRight(i, e, t) { + const s = hot([Fy.moveWordRight(i, e, t, 0), Fy.moveWordRight(i, e, t, 2), Fy._moveWordPartRight(e, t)]); + s.sort(je.compare); + return s[0]; + } + }; + } +}); +var Vv; +var got; +var o8t = ue({ + "out-build/vs/editor/common/cursor/cursorMoveCommands.js"() { + "use strict"; + + zt(); + kI(); + t8t(); + fot(); + Rs(); + yt(); + Vv = class { + static addCursorDown(i, e, t) { + const s = []; + let n = 0; + for (let r = 0, o = e.length; r < o; r++) { + const a = e[r]; + s[n++] = new fc(a.modelState, a.viewState); + if (t) { + s[n++] = fc.fromModelState(mp.translateDown(i.cursorConfig, i.model, a.modelState)); + } else { + s[n++] = fc.fromViewState(mp.translateDown(i.cursorConfig, i, a.viewState)); + } + } + return s; + } + static addCursorUp(i, e, t) { + const s = []; + let n = 0; + for (let r = 0, o = e.length; r < o; r++) { + const a = e[r]; + s[n++] = new fc(a.modelState, a.viewState); + if (t) { + s[n++] = fc.fromModelState(mp.translateUp(i.cursorConfig, i.model, a.modelState)); + } else { + s[n++] = fc.fromViewState(mp.translateUp(i.cursorConfig, i, a.viewState)); + } + } + return s; + } + static moveToBeginningOfLine(i, e, t) { + const s = []; + for (let n = 0, r = e.length; n < r; n++) { + const o = e[n]; + s[n] = this.a(i, o, t); + } + return s; + } + static a(i, e, t) { + const s = e.viewState.position.column; + const n = e.modelState.position.column; + const r = s === n; + const o = e.viewState.position.lineNumber; + const a = i.getLineFirstNonWhitespaceColumn(o); + if (!r && s !== a) { + return this.b(i, e, t); + } else { + return this.c(i, e, t); + } + } + static b(i, e, t) { + return fc.fromViewState(mp.moveToBeginningOfLine(i.cursorConfig, i, e.viewState, t)); + } + static c(i, e, t) { + return fc.fromModelState(mp.moveToBeginningOfLine(i.cursorConfig, i.model, e.modelState, t)); + } + static moveToEndOfLine(i, e, t, s) { + const n = []; + for (let r = 0, o = e.length; r < o; r++) { + const a = e[r]; + n[r] = this.d(i, a, t, s); + } + return n; + } + static d(i, e, t, s) { + const n = e.viewState.position; + const r = i.getLineMaxColumn(n.lineNumber); + const o = n.column === r; + const a = e.modelState.position; + const l = i.model.getLineMaxColumn(a.lineNumber); + const c = r - n.column === l - a.column; + if (o || c) { + return this.f(i, e, t, s); + } else { + return this.e(i, e, t, s); + } + } + static e(i, e, t, s) { + return fc.fromViewState(mp.moveToEndOfLine(i.cursorConfig, i, e.viewState, t, s)); + } + static f(i, e, t, s) { + return fc.fromModelState(mp.moveToEndOfLine(i.cursorConfig, i.model, e.modelState, t, s)); + } + static expandLineSelection(i, e) { + const t = []; + for (let s = 0, n = e.length; s < n; s++) { + const r = e[s]; + const o = r.modelState.selection.startLineNumber; + const a = i.model.getLineCount(); + let l = r.modelState.selection.endLineNumber; + let c; + if (l === a) { + c = i.model.getLineMaxColumn(a); + } else { + l++; + c = 1; + } + t[s] = fc.fromModelState(new zC(new Z(o, 1, o, 1), 0, 0, new je(l, c), 0)); + } + return t; + } + static moveToBeginningOfBuffer(i, e, t) { + const s = []; + for (let n = 0, r = e.length; n < r; n++) { + const o = e[n]; + s[n] = fc.fromModelState(mp.moveToBeginningOfBuffer(i.cursorConfig, i.model, o.modelState, t)); + } + return s; + } + static moveToEndOfBuffer(i, e, t) { + const s = []; + for (let n = 0, r = e.length; n < r; n++) { + const o = e[n]; + s[n] = fc.fromModelState(mp.moveToEndOfBuffer(i.cursorConfig, i.model, o.modelState, t)); + } + return s; + } + static selectAll(i, e) { + const t = i.model.getLineCount(); + const s = i.model.getLineMaxColumn(t); + return fc.fromModelState(new zC(new Z(1, 1, 1, 1), 0, 0, new je(t, s), 0)); + } + static line(i, e, t, s, n) { + const r = i.model.validatePosition(s); + const o = n ? i.coordinatesConverter.validateViewPosition(new je(n.lineNumber, n.column), r) : i.coordinatesConverter.convertModelPositionToViewPosition(r); + if (!t) { + const l = i.model.getLineCount(); + let c = r.lineNumber + 1; + let u = 1; + if (c > l) { + c = l; + u = i.model.getLineMaxColumn(c); + } + return fc.fromModelState(new zC(new Z(r.lineNumber, 1, c, u), 2, 0, new je(c, u), 0)); + } + const a = e.modelState.selectionStart.getStartPosition().lineNumber; + if (r.lineNumber < a) { + return fc.fromViewState(e.viewState.move(true, o.lineNumber, 1, 0)); + } + if (r.lineNumber > a) { + const l = i.getLineCount(); + let c = o.lineNumber + 1; + let u = 1; + if (c > l) { + c = l; + u = i.getLineMaxColumn(c); + } + return fc.fromViewState(e.viewState.move(true, c, u, 0)); + } else { + const l = e.modelState.selectionStart.getEndPosition(); + return fc.fromModelState(e.modelState.move(true, l.lineNumber, l.column, 0)); + } + } + static word(i, e, t, s) { + const n = i.model.validatePosition(s); + return fc.fromModelState(Fy.word(i.cursorConfig, i.model, e.modelState, t, n)); + } + static cancelSelection(i, e) { + if (!e.modelState.hasSelection()) { + return new fc(e.modelState, e.viewState); + } + const t = e.viewState.position.lineNumber; + const s = e.viewState.position.column; + return fc.fromViewState(new zC(new Z(t, s, t, s), 0, 0, new je(t, s), 0)); + } + static moveTo(i, e, t, s, n) { + if (t) { + if (e.modelState.selectionStartKind === 1) { + return this.word(i, e, t, s); + } + if (e.modelState.selectionStartKind === 2) { + return this.line(i, e, t, s, n); + } + } + const r = i.model.validatePosition(s); + const o = n ? i.coordinatesConverter.validateViewPosition(new je(n.lineNumber, n.column), r) : i.coordinatesConverter.convertModelPositionToViewPosition(r); + return fc.fromViewState(e.viewState.move(t, o.lineNumber, o.column, 0)); + } + static simpleMove(i, e, t, s, n, r) { + switch (t) { + case 0: + if (r === 4) { + return this.k(i, e, s); + } else { + return this.j(i, e, s, n); + } + case 1: + if (r === 4) { + return this.m(i, e, s); + } else { + return this.l(i, e, s, n); + } + case 2: + if (r === 2) { + return this.p(i, e, s, n); + } else { + return this.q(i, e, s, n); + } + case 3: + if (r === 2) { + return this.n(i, e, s, n); + } else { + return this.o(i, e, s, n); + } + case 4: + if (r === 2) { + return e.map(o => fc.fromViewState(mp.moveToPrevBlankLine(i.cursorConfig, i, o.viewState, s))); + } else { + return e.map(o => fc.fromModelState(mp.moveToPrevBlankLine(i.cursorConfig, i.model, o.modelState, s))); + } + case 5: + if (r === 2) { + return e.map(o => fc.fromViewState(mp.moveToNextBlankLine(i.cursorConfig, i, o.viewState, s))); + } else { + return e.map(o => fc.fromModelState(mp.moveToNextBlankLine(i.cursorConfig, i.model, o.modelState, s))); + } + case 6: + return this.t(i, e, s); + case 7: + return this.u(i, e, s); + case 8: + return this.v(i, e, s); + case 9: + return this.w(i, e, s); + case 10: + return this.x(i, e, s); + default: + return null; + } + } + static viewportMove(i, e, t, s, n) { + const r = i.getCompletelyVisibleViewRange(); + const o = i.coordinatesConverter.convertViewRangeToModelRange(r); + switch (t) { + case 11: + { + const a = this.g(i.model, o, n); + const l = i.model.getLineFirstNonWhitespaceColumn(a); + return [this.s(i, e[0], s, a, l)]; + } + case 13: + { + const a = this.h(i.model, o, n); + const l = i.model.getLineFirstNonWhitespaceColumn(a); + return [this.s(i, e[0], s, a, l)]; + } + case 12: + { + const a = Math.round((o.startLineNumber + o.endLineNumber) / 2); + const l = i.model.getLineFirstNonWhitespaceColumn(a); + return [this.s(i, e[0], s, a, l)]; + } + case 14: + { + const a = []; + for (let l = 0, c = e.length; l < c; l++) { + const u = e[l]; + a[l] = this.findPositionInViewportIfOutside(i, u, r, s); + } + return a; + } + default: + return null; + } + } + static findPositionInViewportIfOutside(i, e, t, s) { + const n = e.viewState.position.lineNumber; + if (t.startLineNumber <= n && n <= t.endLineNumber - 1) { + return new fc(e.modelState, e.viewState); + } + { + let r; + if (n > t.endLineNumber - 1) { + r = t.endLineNumber - 1; + } else if (n < t.startLineNumber) { + r = t.startLineNumber; + } else { + r = n; + } + const o = mp.vertical(i.cursorConfig, i, n, e.viewState.position.column, e.viewState.leftoverVisibleColumns, r, false); + return fc.fromViewState(e.viewState.move(s, o.lineNumber, o.column, o.leftoverVisibleColumns)); + } + } + static g(i, e, t) { + let s = e.startLineNumber; + if (e.startColumn !== i.getLineMinColumn(s)) { + s++; + } + return Math.min(e.endLineNumber, s + t - 1); + } + static h(i, e, t) { + let s = e.startLineNumber; + if (e.startColumn !== i.getLineMinColumn(s)) { + s++; + } + return Math.max(s, e.endLineNumber - t + 1); + } + static j(i, e, t, s) { + return e.map(n => fc.fromViewState(mp.moveLeft(i.cursorConfig, i, n.viewState, t, s))); + } + static k(i, e, t) { + const s = []; + for (let n = 0, r = e.length; n < r; n++) { + const o = e[n]; + const a = o.viewState.position.lineNumber; + const l = Math.round(i.getLineLength(a) / 2); + s[n] = fc.fromViewState(mp.moveLeft(i.cursorConfig, i, o.viewState, t, l)); + } + return s; + } + static l(i, e, t, s) { + return e.map(n => fc.fromViewState(mp.moveRight(i.cursorConfig, i, n.viewState, t, s))); + } + static m(i, e, t) { + const s = []; + for (let n = 0, r = e.length; n < r; n++) { + const o = e[n]; + const a = o.viewState.position.lineNumber; + const l = Math.round(i.getLineLength(a) / 2); + s[n] = fc.fromViewState(mp.moveRight(i.cursorConfig, i, o.viewState, t, l)); + } + return s; + } + static n(i, e, t, s) { + const n = []; + for (let r = 0, o = e.length; r < o; r++) { + const a = e[r]; + n[r] = fc.fromViewState(mp.moveDown(i.cursorConfig, i, a.viewState, t, s)); + } + return n; + } + static o(i, e, t, s) { + const n = []; + for (let r = 0, o = e.length; r < o; r++) { + const a = e[r]; + n[r] = fc.fromModelState(mp.moveDown(i.cursorConfig, i.model, a.modelState, t, s)); + } + return n; + } + static p(i, e, t, s) { + const n = []; + for (let r = 0, o = e.length; r < o; r++) { + const a = e[r]; + n[r] = fc.fromViewState(mp.moveUp(i.cursorConfig, i, a.viewState, t, s)); + } + return n; + } + static q(i, e, t, s) { + const n = []; + for (let r = 0, o = e.length; r < o; r++) { + const a = e[r]; + n[r] = fc.fromModelState(mp.moveUp(i.cursorConfig, i.model, a.modelState, t, s)); + } + return n; + } + static r(i, e, t, s, n) { + return fc.fromViewState(e.viewState.move(t, s, n, 0)); + } + static s(i, e, t, s, n) { + return fc.fromModelState(e.modelState.move(t, s, n, 0)); + } + static t(i, e, t) { + const s = []; + for (let n = 0, r = e.length; n < r; n++) { + const o = e[n]; + const a = o.viewState.position.lineNumber; + const l = i.getLineMinColumn(a); + s[n] = this.r(i, o, t, a, l); + } + return s; + } + static u(i, e, t) { + const s = []; + for (let n = 0, r = e.length; n < r; n++) { + const o = e[n]; + const a = o.viewState.position.lineNumber; + const l = i.getLineFirstNonWhitespaceColumn(a); + s[n] = this.r(i, o, t, a, l); + } + return s; + } + static v(i, e, t) { + const s = []; + for (let n = 0, r = e.length; n < r; n++) { + const o = e[n]; + const a = o.viewState.position.lineNumber; + const l = Math.round((i.getLineMaxColumn(a) + i.getLineMinColumn(a)) / 2); + s[n] = this.r(i, o, t, a, l); + } + return s; + } + static w(i, e, t) { + const s = []; + for (let n = 0, r = e.length; n < r; n++) { + const o = e[n]; + const a = o.viewState.position.lineNumber; + const l = i.getLineMaxColumn(a); + s[n] = this.r(i, o, t, a, l); + } + return s; + } + static x(i, e, t) { + const s = []; + for (let n = 0, r = e.length; n < r; n++) { + const o = e[n]; + const a = o.viewState.position.lineNumber; + const l = i.getLineLastNonWhitespaceColumn(a); + s[n] = this.r(i, o, t, a, l); + } + return s; + } + }; + (function (i) { + const e = function (r) { + if (!xo(r)) { + return false; + } + const o = r; + return !!yi(o.to) && (!!qo(o.select) || !!df(o.select)) && (!!qo(o.by) || !!yi(o.by)) && (!!qo(o.value) || !!Od(o.value)); + }; + i.metadata = { + description: "Move cursor to a logical position in the view", + args: [{ + name: "Cursor move argument object", + description: `Property-value pairs that can be passed through this argument: + * 'to': A mandatory logical position value providing where to move the cursor. + \`\`\` + 'left', 'right', 'up', 'down', 'prevBlankLine', 'nextBlankLine', + 'wrappedLineStart', 'wrappedLineEnd', 'wrappedLineColumnCenter' + 'wrappedLineFirstNonWhitespaceCharacter', 'wrappedLineLastNonWhitespaceCharacter' + 'viewPortTop', 'viewPortCenter', 'viewPortBottom', 'viewPortIfOutside' + \`\`\` + * 'by': Unit to move. Default is computed based on 'to' value. + \`\`\` + 'line', 'wrappedLine', 'character', 'halfLine' + \`\`\` + * 'value': Number of units to move. Default is '1'. + * 'select': If 'true' makes the selection. Default is 'false'. + `, + constraint: e, + schema: { + type: "object", + required: ["to"], + properties: { + to: { + type: "string", + enum: ["left", "right", "up", "down", "prevBlankLine", "nextBlankLine", "wrappedLineStart", "wrappedLineEnd", "wrappedLineColumnCenter", "wrappedLineFirstNonWhitespaceCharacter", "wrappedLineLastNonWhitespaceCharacter", "viewPortTop", "viewPortCenter", "viewPortBottom", "viewPortIfOutside"] + }, + by: { + type: "string", + enum: ["line", "wrappedLine", "character", "halfLine"] + }, + value: { + type: "number", + default: 1 + }, + select: { + type: "boolean", + default: false + } + } + } + }] + }; + i.RawDirection = { + Left: "left", + Right: "right", + Up: "up", + Down: "down", + PrevBlankLine: "prevBlankLine", + NextBlankLine: "nextBlankLine", + WrappedLineStart: "wrappedLineStart", + WrappedLineFirstNonWhitespaceCharacter: "wrappedLineFirstNonWhitespaceCharacter", + WrappedLineColumnCenter: "wrappedLineColumnCenter", + WrappedLineEnd: "wrappedLineEnd", + WrappedLineLastNonWhitespaceCharacter: "wrappedLineLastNonWhitespaceCharacter", + ViewPortTop: "viewPortTop", + ViewPortCenter: "viewPortCenter", + ViewPortBottom: "viewPortBottom", + ViewPortIfOutside: "viewPortIfOutside" + }; + i.RawUnit = { + Line: "line", + WrappedLine: "wrappedLine", + Character: "character", + HalfLine: "halfLine" + }; + function t(r) { + if (!r.to) { + return null; + } + let o; + switch (r.to) { + case i.RawDirection.Left: + o = 0; + break; + case i.RawDirection.Right: + o = 1; + break; + case i.RawDirection.Up: + o = 2; + break; + case i.RawDirection.Down: + o = 3; + break; + case i.RawDirection.PrevBlankLine: + o = 4; + break; + case i.RawDirection.NextBlankLine: + o = 5; + break; + case i.RawDirection.WrappedLineStart: + o = 6; + break; + case i.RawDirection.WrappedLineFirstNonWhitespaceCharacter: + o = 7; + break; + case i.RawDirection.WrappedLineColumnCenter: + o = 8; + break; + case i.RawDirection.WrappedLineEnd: + o = 9; + break; + case i.RawDirection.WrappedLineLastNonWhitespaceCharacter: + o = 10; + break; + case i.RawDirection.ViewPortTop: + o = 11; + break; + case i.RawDirection.ViewPortBottom: + o = 13; + break; + case i.RawDirection.ViewPortCenter: + o = 12; + break; + case i.RawDirection.ViewPortIfOutside: + o = 14; + break; + default: + return null; + } + let a = 0; + switch (r.by) { + case i.RawUnit.Line: + a = 1; + break; + case i.RawUnit.WrappedLine: + a = 2; + break; + case i.RawUnit.Character: + a = 3; + break; + case i.RawUnit.HalfLine: + a = 4; + break; + } + return { + direction: o, + unit: a, + select: !!r.select, + value: r.value || 1 + }; + } + i.parse = t; + let s; + (function (r) { + r[r.Left = 0] = "Left"; + r[r.Right = 1] = "Right"; + r[r.Up = 2] = "Up"; + r[r.Down = 3] = "Down"; + r[r.PrevBlankLine = 4] = "PrevBlankLine"; + r[r.NextBlankLine = 5] = "NextBlankLine"; + r[r.WrappedLineStart = 6] = "WrappedLineStart"; + r[r.WrappedLineFirstNonWhitespaceCharacter = 7] = "WrappedLineFirstNonWhitespaceCharacter"; + r[r.WrappedLineColumnCenter = 8] = "WrappedLineColumnCenter"; + r[r.WrappedLineEnd = 9] = "WrappedLineEnd"; + r[r.WrappedLineLastNonWhitespaceCharacter = 10] = "WrappedLineLastNonWhitespaceCharacter"; + r[r.ViewPortTop = 11] = "ViewPortTop"; + r[r.ViewPortCenter = 12] = "ViewPortCenter"; + r[r.ViewPortBottom = 13] = "ViewPortBottom"; + r[r.ViewPortIfOutside = 14] = "ViewPortIfOutside"; + })(s = i.Direction ||= {}); + let n; + (function (r) { + r[r.None = 0] = "None"; + r[r.Line = 1] = "Line"; + r[r.WrappedLine = 2] = "WrappedLine"; + r[r.Character = 3] = "Character"; + r[r.HalfLine = 4] = "HalfLine"; + })(n = i.Unit ||= {}); + })(got ||= {}); + } +}); +function Ege(i, e, t) { + if (i.has(e)) { + i.get(e).push(t); + } else { + i.set(e, [t]); + } +} +var bg; +var pot; +var sKi; +var y9 = ue({ + "out-build/vs/editor/common/languages/languageConfiguration.js"() { + "use strict"; + + (function (i) { + i[i.None = 0] = "None"; + i[i.Indent = 1] = "Indent"; + i[i.IndentOutdent = 2] = "IndentOutdent"; + i[i.Outdent = 3] = "Outdent"; + })(bg ||= {}); + pot = class { + constructor(i) { + this.e = null; + this.f = false; + this.open = i.open; + this.close = i.close; + this.b = true; + this.c = true; + this.d = true; + if (Array.isArray(i.notIn)) { + for (let e = 0, t = i.notIn.length; e < t; e++) { + switch (i.notIn[e]) { + case "string": + this.b = false; + break; + case "comment": + this.c = false; + break; + case "regex": + this.d = false; + break; + } + } + } + } + isOK(i) { + switch (i) { + case 0: + return true; + case 1: + return this.c; + case 2: + return this.b; + case 3: + return this.d; + } + } + shouldAutoClose(i, e) { + if (i.getTokenCount() === 0) { + return true; + } + const t = i.findTokenIndexAtOffset(e - 2); + const s = i.getStandardTokenType(t); + return this.isOK(s); + } + g(i, e) { + for (let t = i; t <= e; t++) { + const s = String.fromCharCode(t); + if (!this.open.includes(s) && !this.close.includes(s)) { + return s; + } + } + return null; + } + findNeutralCharacter() { + if (!this.f) { + this.f = true; + this.e ||= this.g(48, 57); + this.e ||= this.g(97, 122); + this.e ||= this.g(65, 90); + } + return this.e; + } + }; + sKi = class { + constructor(i) { + this.autoClosingPairsOpenByStart = new Map(); + this.autoClosingPairsOpenByEnd = new Map(); + this.autoClosingPairsCloseByStart = new Map(); + this.autoClosingPairsCloseByEnd = new Map(); + this.autoClosingPairsCloseSingleChar = new Map(); + for (const e of i) { + Ege(this.autoClosingPairsOpenByStart, e.open.charAt(0), e); + Ege(this.autoClosingPairsOpenByEnd, e.open.charAt(e.open.length - 1), e); + Ege(this.autoClosingPairsCloseByStart, e.close.charAt(0), e); + Ege(this.autoClosingPairsCloseByEnd, e.close.charAt(e.close.length - 1), e); + if (e.close.length === 1 && e.open.length === 1) { + Ege(this.autoClosingPairsCloseSingleChar, e.close, e); + } + } + } + }; + } +}); +function Bqn(i = "") { + let e = "(-?\\d*\\.\\d\\w*)|([^"; + for (const t of w9) { + if (!(i.indexOf(t) >= 0)) { + e += "\\" + t; + } + } + e += "\\s]+)"; + return new RegExp(e, "g"); +} +function Ige(i) { + let e = Nee; + if (i && i instanceof RegExp) { + if (i.global) { + e = i; + } else { + let t = "g"; + if (i.ignoreCase) { + t += "i"; + } + if (i.multiline) { + t += "m"; + } + if (i.unicode) { + t += "u"; + } + e = new RegExp(i.source, t); + } + } + e.lastIndex = 0; + return e; +} +function QB(i, e, t, s, n) { + e = Ige(e); + n ||= Ws.first(a8t); + if (t.length > n.maxLen) { + let c = i - n.maxLen / 2; + if (c < 0) { + c = 0; + } else { + s += c; + } + t = t.substring(c, i + n.maxLen / 2); + return QB(i, e, t, s, n); + } + const r = Date.now(); + const o = i - 1 - s; + let a = -1; + let l = null; + for (let c = 1; !(Date.now() - r >= n.timeBudget); c++) { + const u = o - n.windowSize * c; + e.lastIndex = Math.max(0, u); + const d = Uqn(e, t, o, a); + if (!d && l || (l = d, u <= 0)) { + break; + } + a = u; + } + if (l) { + const c = { + word: l[0], + startColumn: s + 1 + l.index, + endColumn: s + 1 + l.index + l[0].length + }; + e.lastIndex = 0; + return c; + } + return null; +} +function Uqn(i, e, t, s) { + let n; + while (n = i.exec(e)) { + const r = n.index || 0; + if (r <= t && i.lastIndex >= t) { + return n; + } + if (s > 0 && r > s) { + return null; + } + } + return null; +} +var w9; +var Nee; +var a8t; +var BL = ue({ + "out-build/vs/editor/common/core/wordHelper.js"() { + "use strict"; + + sa(); + q(); + Av(); + w9 = "`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?"; + Nee = Bqn(); + a8t = new hp(); + a8t.unshift({ + maxLen: 1000, + windowSize: 15, + timeBudget: 150 + }); + } +}); +var nKi; +var Wqn = ue({ + "out-build/vs/editor/common/languages/supports/characterPair.js"() { + "use strict"; + + y9(); + nKi = class k3i { + static { + this.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_QUOTES = `;:.,=}])> + `; + } + static { + this.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS = `'"\`;:.,=}])> + `; + } + static { + this.DEFAULT_AUTOCLOSE_BEFORE_WHITESPACE = ` + `; + } + constructor(e) { + if (e.autoClosingPairs) { + this.a = e.autoClosingPairs.map(t => new pot(t)); + } else if (e.brackets) { + this.a = e.brackets.map(t => new pot({ + open: t[0], + close: t[1] + })); + } else { + this.a = []; + } + if (e.__electricCharacterSupport && e.__electricCharacterSupport.docComment) { + const t = e.__electricCharacterSupport.docComment; + this.a.push(new pot({ + open: t.open, + close: t.close || "" + })); + } + this.d = typeof e.autoCloseBefore == "string" ? e.autoCloseBefore : k3i.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_QUOTES; + this.e = typeof e.autoCloseBefore == "string" ? e.autoCloseBefore : k3i.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS; + this.c = e.surroundingPairs || this.a; + } + getAutoClosingPairs() { + return this.a; + } + getAutoCloseBeforeSet(e) { + if (e) { + return this.d; + } else { + return this.e; + } + } + getSurroundingPairs() { + return this.c; + } + }; + } +}); +function rKi() { + l8t ||= new TextDecoder("UTF-16LE"); + return l8t; +} +function Vqn() { + c8t ||= new TextDecoder("UTF-16BE"); + return c8t; +} +function oKi() { + u8t ||= i4t() ? rKi() : Vqn(); + return u8t; +} +function Hqn(i, e, t) { + const s = new Uint16Array(i.buffer, e, t); + if (t > 0 && (s[0] === 65279 || s[0] === 65534)) { + return qqn(i, e, t); + } else { + return rKi().decode(s); + } +} +function qqn(i, e, t) { + const s = []; + let n = 0; + for (let r = 0; r < t; r++) { + const o = zHn(i, e); + e += 2; + s[n++] = String.fromCharCode(o); + } + return s.join(""); +} +var l8t; +var c8t; +var u8t; +var UL; +var mM = ue({ + "out-build/vs/editor/common/core/stringBuilder.js"() { + "use strict"; + + $i(); + rt(); + nr(); + UL = class { + constructor(i) { + this.a = i | 0; + this.b = new Uint16Array(this.a); + this.c = null; + this.d = 0; + } + reset() { + this.c = null; + this.d = 0; + } + build() { + if (this.c !== null) { + this.f(); + return this.c.join(""); + } else { + return this.e(); + } + } + e() { + if (this.d === 0) { + return ""; + } + const i = new Uint16Array(this.b.buffer, 0, this.d); + return oKi().decode(i); + } + f() { + const i = this.e(); + this.d = 0; + if (this.c === null) { + this.c = [i]; + } else { + this.c[this.c.length] = i; + } + } + appendCharCode(i) { + const e = this.a - this.d; + if (e <= 1 && (e === 0 || jb(i))) { + this.f(); + } + this.b[this.d++] = i; + } + appendASCIICharCode(i) { + if (this.d === this.a) { + this.f(); + } + this.b[this.d++] = i; + } + appendString(i) { + const e = i.length; + if (this.d + e >= this.a) { + this.f(); + this.c[this.c.length] = i; + return; + } + for (let t = 0; t < e; t++) { + this.b[this.d++] = i.charCodeAt(t); + } + } + }; + } +}); +function jqn(i) { + const e = i.length; + i = i.map(o => [o[0].toLowerCase(), o[1].toLowerCase()]); + const t = []; + for (let o = 0; o < e; o++) { + t[o] = o; + } + const s = (o, a) => { + const [l, c] = o; + const [u, d] = a; + return l === u || l === d || c === u || c === d; + }; + const n = (o, a) => { + const l = Math.min(o, a); + const c = Math.max(o, a); + for (let u = 0; u < e; u++) { + if (t[u] === c) { + t[u] = l; + } + } + }; + for (let o = 0; o < e; o++) { + const a = i[o]; + for (let l = o + 1; l < e; l++) { + const c = i[l]; + if (s(a, c)) { + n(t[o], t[l]); + } + } + } + const r = []; + for (let o = 0; o < e; o++) { + const a = []; + const l = []; + for (let c = 0; c < e; c++) { + if (t[c] === o) { + const [u, d] = i[c]; + a.push(u); + l.push(d); + } + } + if (a.length > 0) { + r.push({ + open: a, + close: l + }); + } + } + return r; +} +function aKi(i, e, t, s) { + for (let n = 0, r = e.length; n < r; n++) { + if (n === t) { + continue; + } + const o = e[n]; + for (const a of o.open) { + if (a.indexOf(i) >= 0) { + s.push(a); + } + } + for (const a of o.close) { + if (a.indexOf(i) >= 0) { + s.push(a); + } + } + } +} +function lKi(i, e) { + return i.length - e.length; +} +function mot(i) { + if (i.length <= 1) { + return i; + } + const e = []; + const t = new Set(); + for (const s of i) { + if (!t.has(s)) { + e.push(s); + t.add(s); + } + } + return e; +} +function zqn(i, e, t, s) { + let n = []; + n = n.concat(i); + n = n.concat(e); + for (let r = 0, o = n.length; r < o; r++) { + aKi(n[r], t, s, n); + } + n = mot(n); + n.sort(lKi); + n.reverse(); + return Dge(n); +} +function Jqn(i, e, t, s) { + let n = []; + n = n.concat(i); + n = n.concat(e); + for (let r = 0, o = n.length; r < o; r++) { + aKi(n[r], t, s, n); + } + n = mot(n); + n.sort(lKi); + n.reverse(); + return Dge(n.map(bot)); +} +function Gqn(i) { + let e = []; + for (const t of i) { + for (const s of t.open) { + e.push(s); + } + for (const s of t.close) { + e.push(s); + } + } + e = mot(e); + return Dge(e); +} +function Kqn(i) { + let e = []; + for (const t of i) { + for (const s of t.open) { + e.push(s); + } + for (const s of t.close) { + e.push(s); + } + } + e = mot(e); + return Dge(e.map(bot)); +} +function Yqn(i) { + const e = /^[\w ]+$/.test(i); + i = zg(i); + if (e) { + return `\\b${i}\\b`; + } else { + return i; + } +} +function Dge(i, e) { + const t = `(${i.map(Yqn).join(")|(")})`; + return ofe(t, true, e); +} +var cKi; +var uKi; +var bot; +var LT; +var vot = ue({ + "out-build/vs/editor/common/languages/supports/richEditBrackets.js"() { + "use strict"; + + $i(); + mM(); + yt(); + cKi = class E3i { + constructor(e, t, s, n, r, o) { + this._richEditBracketBrand = undefined; + this.languageId = e; + this.index = t; + this.open = s; + this.close = n; + this.forwardRegex = r; + this.reversedRegex = o; + this.c = E3i.e(this.open); + this.d = E3i.e(this.close); + } + isOpen(e) { + return this.c.has(e); + } + isClose(e) { + return this.d.has(e); + } + static e(e) { + const t = new Set(); + for (const s of e) { + t.add(s); + } + return t; + } + }; + uKi = class { + constructor(i, e) { + this._richEditBracketsBrand = undefined; + const t = jqn(e); + this.brackets = t.map((s, n) => new cKi(i, n, s.open, s.close, zqn(s.open, s.close, t, n), Jqn(s.open, s.close, t, n))); + this.forwardRegex = Gqn(this.brackets); + this.reversedRegex = Kqn(this.brackets); + this.textIsBracket = {}; + this.textIsOpenBracket = {}; + this.maxBracketLength = 0; + for (const s of this.brackets) { + for (const n of s.open) { + this.textIsBracket[n] = s; + this.textIsOpenBracket[n] = true; + this.maxBracketLength = Math.max(this.maxBracketLength, n.length); + } + for (const n of s.close) { + this.textIsBracket[n] = s; + this.textIsOpenBracket[n] = false; + this.maxBracketLength = Math.max(this.maxBracketLength, n.length); + } + } + } + }; + bot = function () { + function i(s) { + const n = new Uint16Array(s.length); + let r = 0; + for (let o = s.length - 1; o >= 0; o--) { + n[r++] = s.charCodeAt(o); + } + return oKi().decode(n); + } + let e = null; + let t = null; + return function (n) { + if (e !== n) { + e = n; + t = i(e); + } + return t; + }; + }(); + LT = class { + static c(i, e, t, s) { + const n = t.match(i); + if (!n) { + return null; + } + const r = t.length - (n.index || 0); + const o = n[0].length; + const a = s + r; + return new Z(e, a - o + 1, e, a + 1); + } + static findPrevBracketInRange(i, e, t, s, n) { + const o = bot(t).substring(t.length - n, t.length - s); + return this.c(i, e, o, s); + } + static findNextBracketInText(i, e, t, s) { + const n = t.match(i); + if (!n) { + return null; + } + const r = n.index || 0; + const o = n[0].length; + if (o === 0) { + return null; + } + const a = s + r; + return new Z(e, a + 1, e, a + 1 + o); + } + static findNextBracketInRange(i, e, t, s, n) { + const r = t.substring(s, n); + return this.findNextBracketInText(i, e, r, s); + } + }; + } +}); +var dKi; +var Xqn = ue({ + "out-build/vs/editor/common/languages/supports/electricCharacter.js"() { + "use strict"; + + Jt(); + vge(); + vot(); + dKi = class { + constructor(i) { + this.a = i; + } + getElectricCharacters() { + const i = []; + if (this.a) { + for (const e of this.a.brackets) { + for (const t of e.close) { + const s = t.charAt(t.length - 1); + i.push(s); + } + } + } + return Ea(i); + } + onElectricCharacter(i, e, t) { + if (!this.a || this.a.brackets.length === 0) { + return null; + } + const s = e.findTokenIndexAtOffset(t - 1); + if (Z2(e.getStandardTokenType(s))) { + return null; + } + const n = this.a.reversedRegex; + const r = e.getLineContent().substring(0, t - 1) + i; + const o = LT.findPrevBracketInRange(n, 1, r, 0, r.length); + if (!o) { + return null; + } + const a = r.substring(o.startColumn - 1, o.endColumn - 1).toLowerCase(); + if (this.a.textIsOpenBracket[a]) { + return null; + } + const c = e.getActualLineContentBefore(o.startColumn - 1); + if (/^\s*$/.test(c)) { + return { + matchOpenBracket: a + }; + } else { + return null; + } + } + }; + } +}); +function yot(i) { + if (i.global) { + i.lastIndex = 0; + } + return true; +} +var hKi; +var fKi; +var Qqn = ue({ + "out-build/vs/editor/common/languages/supports/indentRules.js"() { + "use strict"; + + (function (i) { + i[i.INCREASE_MASK = 1] = "INCREASE_MASK"; + i[i.DECREASE_MASK = 2] = "DECREASE_MASK"; + i[i.INDENT_NEXTLINE_MASK = 4] = "INDENT_NEXTLINE_MASK"; + i[i.UNINDENT_MASK = 8] = "UNINDENT_MASK"; + })(hKi ||= {}); + fKi = class { + constructor(i) { + this.a = i; + } + shouldIncrease(i) { + return !!this.a && !!this.a.increaseIndentPattern && !!yot(this.a.increaseIndentPattern) && !!this.a.increaseIndentPattern.test(i); + } + shouldDecrease(i) { + return !!this.a && !!this.a.decreaseIndentPattern && !!yot(this.a.decreaseIndentPattern) && !!this.a.decreaseIndentPattern.test(i); + } + shouldIndentNextLine(i) { + return !!this.a && !!this.a.indentNextLinePattern && !!yot(this.a.indentNextLinePattern) && !!this.a.indentNextLinePattern.test(i); + } + shouldIgnore(i) { + return !!this.a && !!this.a.unIndentedLinePattern && !!yot(this.a.unIndentedLinePattern) && !!this.a.unIndentedLinePattern.test(i); + } + getIndentMetadata(i) { + let e = 0; + if (this.shouldIncrease(i)) { + e += 1; + } + if (this.shouldDecrease(i)) { + e += 2; + } + if (this.shouldIndentNextLine(i)) { + e += 4; + } + if (this.shouldIgnore(i)) { + e += 8; + } + return e; + } + }; + } +}); +var gKi; +var Zqn = ue({ + "out-build/vs/editor/common/languages/supports/onEnter.js"() { + "use strict"; + + Ut(); + $i(); + y9(); + gKi = class HPe { + constructor(e) { + e = e || {}; + e.brackets = e.brackets || [["(", ")"], ["{", "}"], ["[", "]"]]; + this.a = []; + e.brackets.forEach(t => { + const s = HPe.c(t[0]); + const n = HPe.d(t[1]); + if (s && n) { + this.a.push({ + open: t[0], + openRegExp: s, + close: t[1], + closeRegExp: n + }); + } + }); + this.b = e.onEnterRules || []; + } + onEnter(e, t, s, n) { + if (e >= 3) { + for (let r = 0, o = this.b.length; r < o; r++) { + const a = this.b[r]; + if ([{ + reg: a.beforeText, + text: s + }, { + reg: a.afterText, + text: n + }, { + reg: a.previousLineText, + text: t + }].every(c => c.reg ? (c.reg.lastIndex = 0, c.reg.test(c.text)) : true)) { + return a.action; + } + } + } + if (e >= 2 && s.length > 0 && n.length > 0) { + for (let r = 0, o = this.a.length; r < o; r++) { + const a = this.a[r]; + if (a.openRegExp.test(s) && a.closeRegExp.test(n)) { + return { + indentAction: bg.IndentOutdent + }; + } + } + } + if (e >= 2 && s.length > 0) { + for (let r = 0, o = this.a.length; r < o; r++) { + if (this.a[r].openRegExp.test(s)) { + return { + indentAction: bg.Indent + }; + } + } + } + return null; + } + static c(e) { + let t = zg(e); + if (!/\B/.test(t.charAt(0))) { + t = "\\b" + t; + } + t += "\\s*$"; + return HPe.e(t); + } + static d(e) { + let t = zg(e); + if (!/\B/.test(t.charAt(t.length - 1))) { + t = t + "\\b"; + } + t = "^\\s*" + t; + return HPe.e(t); + } + static e(e) { + try { + return new RegExp(e); + } catch (t) { + xs(t); + return null; + } + } + }; + } +}); +function d8t(i) { + return i && typeof i == "object" && (!i.overrideIdentifier || typeof i.overrideIdentifier == "string") && (!i.resource || i.resource instanceof V); +} +function ejn(i) { + return i && typeof i == "object" && (!i.overrideIdentifiers || Array.isArray(i.overrideIdentifiers)) && !i.overrideIdentifier && (!i.resource || i.resource instanceof V); +} +function h8t(i) { + switch (i) { + case 1: + return "APPLICATION"; + case 2: + return "USER"; + case 3: + return "USER_LOCAL"; + case 4: + return "USER_REMOTE"; + case 5: + return "WORKSPACE"; + case 6: + return "WORKSPACE_FOLDER"; + case 7: + return "DEFAULT"; + case 8: + return "MEMORY"; + } +} +function tjn(i) { + return i.applicationValue !== undefined || i.userValue !== undefined || i.userLocalValue !== undefined || i.userRemoteValue !== undefined || i.workspaceValue !== undefined || i.workspaceFolderValue !== undefined; +} +function Tge(i, e) { + const t = Object.create(null); + for (const s in i) { + pKi(t, s, i[s], e); + } + return t; +} +function pKi(i, e, t, s) { + const n = e.split("."); + const r = n.pop(); + let o = i; + for (let a = 0; a < n.length; a++) { + const l = n[a]; + let c = o[l]; + switch (typeof c) { + case "undefined": + c = o[l] = Object.create(null); + break; + case "object": + if (c === null) { + s(`Ignoring ${e} as ${n.slice(0, a + 1).join(".")} is null`); + return; + } + break; + default: + s(`Ignoring ${e} as ${n.slice(0, a + 1).join(".")} is ${JSON.stringify(c)}`); + return; + } + o = c; + } + if (typeof o == "object" && o !== null) { + try { + o[r] = t; + } catch { + s(`Ignoring ${e} as ${n.join(".")} is ${JSON.stringify(o)}`); + } + } else { + s(`Ignoring ${e} as ${n.join(".")} is ${JSON.stringify(o)}`); + } +} +function ijn(i, e) { + const t = e.split("."); + mKi(i, t); +} +function mKi(i, e) { + const t = e.shift(); + if (e.length === 0) { + delete i[t]; + return; + } + if (Object.keys(i).indexOf(t) !== -1) { + const s = i[t]; + if (typeof s == "object" && !Array.isArray(s)) { + mKi(s, e); + if (Object.keys(s).length === 0) { + delete i[t]; + } + } + } +} +function wot(i, e, t) { + function s(o, a) { + let l = o; + for (const c of a) { + if (typeof l != "object" || l === null) { + return; + } + l = l[c]; + } + return l; + } + const n = e.split("."); + const r = s(i, n); + if (typeof r === "undefined") { + return t; + } else { + return r; + } +} +function bKi(i) { + return i.replace(/[\[\]]/g, ""); +} +var ve; +var vKi; +var Me = ue({ + "out-build/vs/platform/configuration/common/configuration.js"() { + "use strict"; + + zt(); + Le(); + te(); + ve = Ve("configurationService"); + (function (i) { + i[i.APPLICATION = 1] = "APPLICATION"; + i[i.USER = 2] = "USER"; + i[i.USER_LOCAL = 3] = "USER_LOCAL"; + i[i.USER_REMOTE = 4] = "USER_REMOTE"; + i[i.WORKSPACE = 5] = "WORKSPACE"; + i[i.WORKSPACE_FOLDER = 6] = "WORKSPACE_FOLDER"; + i[i.DEFAULT = 7] = "DEFAULT"; + i[i.MEMORY = 8] = "MEMORY"; + })(vKi ||= {}); + } +}); +var As; +var wn = ue({ + "out-build/vs/editor/common/languages/language.js"() { + "use strict"; + + te(); + As = Ve("languageService"); + } +}); +var Os; +var jo = ue({ + "out-build/vs/platform/instantiation/common/descriptors.js"() { + "use strict"; + + Os = class { + constructor(i, e = [], t = false) { + this.ctor = i; + this.staticArguments = e; + this.supportsDelayedInstantiation = t; + } + }; + } +}); +function it(i, e, t) { + if (!(e instanceof Os)) { + e = new Os(e, [], !!t); + } + f8t.push([i, e]); +} +function sjn() { + return f8t; +} +var f8t; +var yKi; +var It = ue({ + "out-build/vs/platform/instantiation/common/extensions.js"() { + "use strict"; + + jo(); + f8t = []; + (function (i) { + i[i.Eager = 0] = "Eager"; + i[i.Delayed = 1] = "Delayed"; + })(yKi ||= {}); + } +}); +function njn(i) { + const e = Iw(i); + const t = SKi[e.toLowerCase()]; + if (t !== undefined) { + return t; + } else { + return wKi(i); + } +} +function wKi(i) { + const e = Iw(i); + return Cot[e.toLowerCase()]; +} +function rjn(i) { + for (const e in Cot) { + if (Cot[e] === i) { + return e; + } + } +} +function CKi(i, e) { + const t = xKi.exec(i); + if (t) { + return `${t[1].toLowerCase()}/${t[2].toLowerCase()}${t[3] ?? ""}`; + } else if (e) { + return undefined; + } else { + return i; + } +} +var pl; +var SKi; +var Cot; +var xKi; +var Jb = ue({ + "out-build/vs/base/common/mime.js"() { + "use strict"; + + pn(); + pl = Object.freeze({ + text: "text/plain", + binary: "application/octet-stream", + unknown: "application/unknown", + markdown: "text/markdown", + latex: "text/latex", + uriList: "text/uri-list" + }); + SKi = { + ".css": "text/css", + ".csv": "text/csv", + ".htm": "text/html", + ".html": "text/html", + ".ics": "text/calendar", + ".js": "text/javascript", + ".mjs": "text/javascript", + ".txt": "text/plain", + ".xml": "text/xml" + }; + Cot = { + ".aac": "audio/x-aac", + ".avi": "video/x-msvideo", + ".bmp": "image/bmp", + ".flv": "video/x-flv", + ".gif": "image/gif", + ".ico": "image/x-icon", + ".jpe": "image/jpg", + ".jpeg": "image/jpg", + ".jpg": "image/jpg", + ".m1v": "video/mpeg", + ".m2a": "audio/mpeg", + ".m2v": "video/mpeg", + ".m3a": "audio/mpeg", + ".mid": "audio/midi", + ".midi": "audio/midi", + ".mk3d": "video/x-matroska", + ".mks": "video/x-matroska", + ".mkv": "video/x-matroska", + ".mov": "video/quicktime", + ".movie": "video/x-sgi-movie", + ".mp2": "audio/mpeg", + ".mp2a": "audio/mpeg", + ".mp3": "audio/mpeg", + ".mp4": "video/mp4", + ".mp4a": "audio/mp4", + ".mp4v": "video/mp4", + ".mpe": "video/mpeg", + ".mpeg": "video/mpeg", + ".mpg": "video/mpeg", + ".mpg4": "video/mp4", + ".mpga": "audio/mpeg", + ".oga": "audio/ogg", + ".ogg": "audio/ogg", + ".opus": "audio/opus", + ".ogv": "video/ogg", + ".png": "image/png", + ".psd": "image/vnd.adobe.photoshop", + ".qt": "video/quicktime", + ".spx": "audio/ogg", + ".svg": "image/svg+xml", + ".tga": "image/x-tga", + ".tif": "image/tiff", + ".tiff": "image/tiff", + ".wav": "audio/x-wav", + ".webm": "video/webm", + ".webp": "image/webp", + ".wma": "audio/x-ms-wma", + ".wmv": "video/x-ms-wmv", + ".woff": "application/font-woff" + }; + xKi = /^(.+)\/(.+?)(;.+)?$/; + } +}); +function ojn(i) { + let e = false; + const t = new Map(); + const s = new Map(); + ajn(i, u => { + if (i === u) { + return true; + } + const d = JSON.stringify(u); + if (d.length < 30) { + return true; + } + const h = t.get(d); + if (!h) { + const g = { + schemas: [u] + }; + t.set(d, g); + s.set(u, g); + return true; + } + h.schemas.push(u); + s.set(u, h); + e = true; + return false; + }); + t.clear(); + if (!e) { + return JSON.stringify(i); + } + let r = "$defs"; + while (i.hasOwnProperty(r)) { + r += "_"; + } + const o = []; + function a(u) { + return JSON.stringify(u, (d, h) => { + if (h !== u) { + const g = s.get(h); + if (g && g.schemas.length > 1) { + if (!g.id) { + g.id = `_${o.length}`; + o.push(g.schemas[0]); + } + return { + $ref: `#/${r}/${g.id}` + }; + } + } + return h; + }); + } + const l = a(i); + const c = []; + for (let u = 0; u < o.length; u++) { + c.push(`"_${u}":${a(o[u])}`); + } + if (c.length) { + return `${l.substring(0, l.length - 1)},"${r}":{${c.join(",")}}}`; + } else { + return l; + } +} +function Mee(i) { + return typeof i == "object" && i !== null; +} +function ajn(i, e) { + if (!i || typeof i != "object") { + return; + } + const t = (...l) => { + for (const c of l) { + if (Mee(c)) { + o.push(c); + } + } + }; + const s = (...l) => { + for (const c of l) { + if (Mee(c)) { + for (const u in c) { + const d = c[u]; + if (Mee(d)) { + o.push(d); + } + } + } + } + }; + const n = (...l) => { + for (const c of l) { + if (Array.isArray(c)) { + for (const u of c) { + if (Mee(u)) { + o.push(u); + } + } + } + } + }; + const r = l => { + if (Array.isArray(l)) { + for (const c of l) { + if (Mee(c)) { + o.push(c); + } + } + } else if (Mee(l)) { + o.push(l); + } + }; + const o = [i]; + let a = o.pop(); + while (a) { + if (e(a)) { + t(a.additionalItems, a.additionalProperties, a.not, a.contains, a.propertyNames, a.if, a.then, a.else, a.unevaluatedItems, a.unevaluatedProperties); + s(a.definitions, a.$defs, a.properties, a.patternProperties, a.dependencies, a.dependentSchemas); + n(a.anyOf, a.allOf, a.oneOf, a.prefixItems); + r(a.items); + } + a = o.pop(); + } +} +var ljn = ue({ + "out-build/vs/base/common/jsonSchema.js"() { + "use strict"; + } +}); +function cjn(i) { + if (i.length > 0 && i.charAt(i.length - 1) === "#") { + return i.substring(0, i.length - 1); + } else { + return i; + } +} +var Vm; +var kKi; +var EKi; +var Gb = ue({ + "out-build/vs/platform/jsonschemas/common/jsonContributionRegistry.js"() { + "use strict"; + + pe(); + ljn(); + Ht(); + Vm = { + JSONContribution: "base.contributions.json" + }; + kKi = class { + constructor() { + this.b = new B(); + this.onDidChangeSchema = this.b.event; + this.a = {}; + } + registerSchema(i, e) { + this.a[cjn(i)] = e; + this.b.fire(i); + } + notifySchemaChanged(i) { + this.b.fire(i); + } + getSchemaContributions() { + return { + schemas: this.a + }; + } + getSchemaContent(i) { + const e = this.a[i]; + if (e) { + return ojn(e); + } else { + return undefined; + } + } + hasSchemaContent(i) { + return !!this.a[i]; + } + }; + EKi = new kKi(); + Pe.add(Vm.JSONContribution, EKi); + } +}); +function Aee(i) { + const e = []; + if (Rw.test(i)) { + let t = v8t.exec(i); + while (t?.length) { + const s = t[1].trim(); + if (s) { + e.push(s); + } + t = v8t.exec(i); + } + } + return Ea(e); +} +function IKi(i) { + return i.reduce((e, t) => `${e}[${t}]`, ""); +} +function g8t(i) { + switch (Array.isArray(i) ? i[0] : i) { + case "boolean": + return false; + case "integer": + case "number": + return 0; + case "string": + return ""; + case "array": + return []; + case "object": + return {}; + default: + return null; + } +} +function DKi(i, e) { + if (i.trim()) { + if (Rw.test(i)) { + return f(1704, null, i); + } else if (Fee.getConfigurationProperties()[i] !== undefined) { + return f(1705, null, i); + } else if (e.policy?.name && Fee.getPolicyConfigurations().get(e.policy?.name) !== undefined) { + return f(1706, null, i, e.policy?.name, Fee.getPolicyConfigurations().get(e.policy?.name)); + } else { + return null; + } + } else { + return f(1703, null); + } +} +function ujn() { + const i = []; + const e = Fee.getConfigurationProperties(); + for (const t of Object.keys(e)) { + i.push([t, e[t].scope]); + } + i.push(["launch", 4]); + i.push(["task", 4]); + return i; +} +function TKi(i) { + const e = {}; + for (const t of i) { + const s = t.properties; + if (xo(s)) { + for (const n in s) { + e[n] = s[n]; + } + } + if (t.allOf) { + Object.assign(e, TKi(t.allOf)); + } + } + return e; +} +function PKi(i) { + switch (i) { + case "application": + return 1; + case "machine": + return 2; + case "resource": + return 4; + case "machine-overridable": + return 6; + case "language-overridable": + return 5; + default: + return 3; + } +} +var p8t; +var rr; +var LKi; +var i1; +var $ee; +var fj; +var eF; +var tF; +var WL; +var ZB; +var m8t; +var Pge; +var RKi; +var b8t; +var v8t; +var e4; +var Rw; +var Fee; +var Qr = ue({ + "out-build/vs/platform/configuration/common/configurationRegistry.js"() { + "use strict"; + + Jt(); + pe(); + zt(); + X(); + Me(); + Gb(); + Ht(); + (function (i) { + i.Multiline = "multilineText"; + i.Singleline = "singlelineText"; + })(p8t ||= {}); + rr = { + Configuration: "base.contributions.configuration" + }; + (function (i) { + i[i.APPLICATION = 1] = "APPLICATION"; + i[i.MACHINE = 2] = "MACHINE"; + i[i.WINDOW = 3] = "WINDOW"; + i[i.RESOURCE = 4] = "RESOURCE"; + i[i.LANGUAGE_OVERRIDABLE = 5] = "LANGUAGE_OVERRIDABLE"; + i[i.MACHINE_OVERRIDABLE = 6] = "MACHINE_OVERRIDABLE"; + })(LKi ||= {}); + i1 = { + properties: {}, + patternProperties: {} + }; + $ee = { + properties: {}, + patternProperties: {} + }; + fj = { + properties: {}, + patternProperties: {} + }; + eF = { + properties: {}, + patternProperties: {} + }; + tF = { + properties: {}, + patternProperties: {} + }; + WL = { + properties: {}, + patternProperties: {} + }; + ZB = "vscode://schemas/settings/resourceLanguage"; + m8t = "vscode://schemas/settings/configurationDefaults"; + Pge = Pe.as(Vm.JSONContribution); + RKi = class { + constructor() { + this.a = []; + this.i = new Set(); + this.j = new B(); + this.onDidSchemaChange = this.j.event; + this.k = new B(); + this.onDidUpdateConfiguration = this.k.event; + this.b = new Map(); + this.c = { + id: "defaultOverrides", + title: f(1697, null), + properties: {} + }; + this.d = [this.c]; + this.h = { + properties: {}, + patternProperties: {}, + additionalProperties: true, + allowTrailingCommas: true, + allowComments: true + }; + this.e = {}; + this.f = new Map(); + this.g = {}; + Pge.registerSchema(ZB, this.h); + this.z(); + } + registerConfiguration(i, e = true) { + this.registerConfigurations([i], e); + } + registerConfigurations(i, e = true) { + const t = new Set(); + this.r(i, e, t); + Pge.registerSchema(ZB, this.h); + this.j.fire(); + this.k.fire({ + properties: t + }); + } + deregisterConfigurations(i) { + const e = new Set(); + this.s(i, e); + Pge.registerSchema(ZB, this.h); + this.j.fire(); + this.k.fire({ + properties: e + }); + } + updateConfigurations({ + add: i, + remove: e + }) { + const t = new Set(); + this.s(e, t); + this.r(i, false, t); + Pge.registerSchema(ZB, this.h); + this.j.fire(); + this.k.fire({ + properties: t + }); + } + registerDefaultConfigurations(i) { + const e = new Set(); + this.l(i, e); + this.j.fire(); + this.k.fire({ + properties: e, + defaultsOverrides: true + }); + } + l(i, e) { + this.a.push(...i); + const t = []; + for (const { + overrides: s, + source: n + } of i) { + for (const r in s) { + e.add(r); + const o = this.b.get(r) ?? this.b.set(r, { + configurationDefaultOverrides: [] + }).get(r); + const a = s[r]; + o.configurationDefaultOverrides.push({ + value: a, + source: n + }); + if (Rw.test(r)) { + const l = this.o(r, a, n, o.configurationDefaultOverrideValue); + if (!l) { + continue; + } + o.configurationDefaultOverrideValue = l; + this.n(r, l, n); + t.push(...Aee(r)); + } else { + const l = this.p(r, a, n, o.configurationDefaultOverrideValue); + if (!l) { + continue; + } + o.configurationDefaultOverrideValue = l; + const c = this.e[r]; + if (c) { + this.A(r, c); + this.w(r, c); + } + } + } + } + this.q(t); + } + deregisterDefaultConfigurations(i) { + const e = new Set(); + this.m(i, e); + this.j.fire(); + this.k.fire({ + properties: e, + defaultsOverrides: true + }); + } + m(i, e) { + for (const t of i) { + const s = this.a.indexOf(t); + if (s !== -1) { + this.a.splice(s, 1); + } + } + for (const { + overrides: t, + source: s + } of i) { + for (const n in t) { + const r = this.b.get(n); + if (!r) { + continue; + } + const o = r.configurationDefaultOverrides.findIndex(a => s ? a.source?.id === s.id : a.value === t[n]); + if (o !== -1) { + r.configurationDefaultOverrides.splice(o, 1); + if (r.configurationDefaultOverrides.length === 0) { + this.b.delete(n); + } + if (Rw.test(n)) { + let a; + for (const l of r.configurationDefaultOverrides) { + a = this.o(n, l.value, l.source, a); + } + if (a && !RL(a.value)) { + r.configurationDefaultOverrideValue = a; + this.n(n, a, s); + } else { + this.b.delete(n); + delete this.e[n]; + delete this.c.properties[n]; + } + } else { + let a; + for (const c of r.configurationDefaultOverrides) { + a = this.p(n, c.value, c.source, a); + } + r.configurationDefaultOverrideValue = a; + const l = this.e[n]; + if (l) { + this.A(n, l); + this.w(n, l); + } + } + e.add(n); + } + } + } + this.y(); + } + n(i, e, t) { + const s = { + type: "object", + default: e.value, + description: f(1698, null, bKi(i)), + $ref: ZB, + defaultDefaultValue: e.value, + source: t, + defaultValueSource: t + }; + this.e[i] = s; + this.c.properties[i] = s; + } + o(i, e, t, s) { + const n = s?.value || {}; + const r = s?.source ?? new Map(); + if (!(r instanceof Map)) { + console.error("objectConfigurationSources is not a Map"); + return; + } + for (const o of Object.keys(e)) { + const a = e[o]; + if (xo(a) && (qo(n[o]) || xo(n[o]))) { + n[o] = { + ...(n[o] ?? {}), + ...a + }; + if (t) { + for (const c in a) { + r.set(`${o}.${c}`, t); + } + } + } else { + n[o] = a; + if (t) { + r.set(o, t); + } else { + r.delete(o); + } + } + } + return { + value: n, + source: r + }; + } + p(i, e, t, s) { + const n = this.e[i]; + const r = s?.value ?? n?.defaultDefaultValue; + let o = t; + if (xo(e) && (n !== undefined && n.type === "object" || n === undefined && (qo(r) || xo(r)))) { + o = s?.source ?? new Map(); + if (!(o instanceof Map)) { + console.error("defaultValueSource is not a Map"); + return; + } + for (const l in e) { + if (t) { + o.set(`${i}.${l}`, t); + } + } + e = { + ...(xo(r) ? r : {}), + ...e + }; + } + return { + value: e, + source: o + }; + } + deltaConfiguration(i) { + let e = false; + const t = new Set(); + if (i.removedDefaults) { + this.m(i.removedDefaults, t); + e = true; + } + if (i.addedDefaults) { + this.l(i.addedDefaults, t); + e = true; + } + if (i.removedConfigurations) { + this.s(i.removedConfigurations, t); + } + if (i.addedConfigurations) { + this.r(i.addedConfigurations, false, t); + } + this.j.fire(); + this.k.fire({ + properties: t, + defaultsOverrides: e + }); + } + notifyConfigurationSchemaUpdated(...i) { + this.j.fire(); + } + registerOverrideIdentifiers(i) { + this.q(i); + this.j.fire(); + } + q(i) { + for (const e of i) { + this.i.add(e); + } + this.y(); + } + r(i, e, t) { + i.forEach(s => { + this.u(s, e, s.extensionInfo, s.restrictedProperties, undefined, t); + this.d.push(s); + this.v(s); + }); + } + s(i, e) { + const t = s => { + if (s.properties) { + for (const n in s.properties) { + e.add(n); + const r = this.e[n]; + if (r?.policy?.name) { + this.f.delete(r.policy.name); + } + delete this.e[n]; + this.x(n, s.properties[n]); + } + } + s.allOf?.forEach(n => t(n)); + }; + for (const s of i) { + t(s); + const n = this.d.indexOf(s); + if (n !== -1) { + this.d.splice(n, 1); + } + } + } + u(i, e = true, t, s, n = 3, r) { + n = Ga(i.scope) ? n : i.scope; + const o = i.properties; + if (o) { + for (const l in o) { + const c = o[l]; + if (e && DKi(l, c)) { + delete o[l]; + continue; + } + c.source = t; + c.defaultDefaultValue = o[l].default; + this.A(l, c); + if (Rw.test(l)) { + c.scope = undefined; + } else { + c.scope = Ga(c.scope) ? n : c.scope; + c.restricted = Ga(c.restricted) ? !!s?.includes(l) : c.restricted; + } + if (o[l].hasOwnProperty("included") && !o[l].included) { + this.g[l] = o[l]; + delete o[l]; + continue; + } else { + this.e[l] = o[l]; + if (o[l].policy?.name) { + this.f.set(o[l].policy.name, l); + } + } + if (!o[l].deprecationMessage && o[l].markdownDeprecationMessage) { + o[l].deprecationMessage = o[l].markdownDeprecationMessage; + } + r.add(l); + } + } + const a = i.allOf; + if (a) { + for (const l of a) { + this.u(l, e, t, s, n, r); + } + } + } + getConfigurations() { + return this.d; + } + getConfigurationProperties() { + return this.e; + } + getPolicyConfigurations() { + return this.f; + } + getExcludedConfigurationProperties() { + return this.g; + } + getRegisteredDefaultConfigurations() { + return [...this.a]; + } + getConfigurationDefaultsOverrides() { + const i = new Map(); + for (const [e, t] of this.b) { + if (t.configurationDefaultOverrideValue) { + i.set(e, t.configurationDefaultOverrideValue); + } + } + return i; + } + v(i) { + const e = t => { + const s = t.properties; + if (s) { + for (const r in s) { + this.w(r, s[r]); + } + } + t.allOf?.forEach(e); + }; + e(i); + } + w(i, e) { + i1.properties[i] = e; + switch (e.scope) { + case 1: + $ee.properties[i] = e; + break; + case 2: + fj.properties[i] = e; + break; + case 6: + eF.properties[i] = e; + break; + case 3: + tF.properties[i] = e; + break; + case 4: + WL.properties[i] = e; + break; + case 5: + WL.properties[i] = e; + this.h.properties[i] = e; + break; + } + } + x(i, e) { + delete i1.properties[i]; + switch (e.scope) { + case 1: + delete $ee.properties[i]; + break; + case 2: + delete fj.properties[i]; + break; + case 6: + delete eF.properties[i]; + break; + case 3: + delete tF.properties[i]; + break; + case 4: + case 5: + delete WL.properties[i]; + delete this.h.properties[i]; + break; + } + } + y() { + for (const i of this.i.values()) { + const e = `[${i}]`; + const t = { + type: "object", + description: f(1699, null), + errorMessage: f(1700, null), + $ref: ZB + }; + this.A(e, t); + i1.properties[e] = t; + $ee.properties[e] = t; + fj.properties[e] = t; + eF.properties[e] = t; + tF.properties[e] = t; + WL.properties[e] = t; + } + } + z() { + const i = { + type: "object", + description: f(1701, null), + errorMessage: f(1702, null), + $ref: ZB + }; + i1.patternProperties[e4] = i; + $ee.patternProperties[e4] = i; + fj.patternProperties[e4] = i; + eF.patternProperties[e4] = i; + tF.patternProperties[e4] = i; + WL.patternProperties[e4] = i; + this.j.fire(); + } + A(i, e) { + const t = this.b.get(i)?.configurationDefaultOverrideValue; + let s; + let n; + if (t && (!e.disallowConfigurationDefault || !t.source)) { + s = t.value; + n = t.source; + } + if (qo(s)) { + s = e.defaultDefaultValue; + n = undefined; + } + if (qo(s)) { + s = g8t(e.type); + } + e.default = s; + e.defaultValueSource = n; + } + }; + b8t = "\\[([^\\]]+)\\]"; + v8t = new RegExp(b8t, "g"); + e4 = `^(${b8t})+$`; + Rw = new RegExp(e4); + Fee = new RKi(); + Pe.add(rr.Configuration, Fee); + } +}); +var NKi; +var MKi; +var iF; +var Ju; +var Sot; +var gf = ue({ + "out-build/vs/editor/common/languages/modesRegistry.js"() { + "use strict"; + + X(); + pe(); + Ht(); + Jb(); + Qr(); + NKi = { + ModesRegistry: "editor.modesRegistry" + }; + MKi = class { + constructor() { + this.b = new B(); + this.onDidChangeLanguages = this.b.event; + this.a = []; + } + registerLanguage(i) { + this.a.push(i); + this.b.fire(undefined); + return { + dispose: () => { + for (let e = 0, t = this.a.length; e < t; e++) { + if (this.a[e] === i) { + this.a.splice(e, 1); + return; + } + } + } + }; + } + getLanguages() { + return this.a; + } + }; + iF = new MKi(); + Pe.add(NKi.ModesRegistry, iF); + Ju = "plaintext"; + Sot = ".txt"; + iF.registerLanguage({ + id: Ju, + extensions: [Sot], + aliases: [f(833, null), "text"], + mimetypes: [pl.text] + }); + Pe.as(rr.Configuration).registerDefaultConfigurations([{ + overrides: { + "[plaintext]": { + "editor.unicodeHighlight.ambiguousCharacters": false, + "editor.unicodeHighlight.invisibleCharacters": false + } + } + }]); + } +}); +function AKi(i) { + return i.filter(([e, t]) => e !== "" && t !== ""); +} +var $Ki; +var y8t; +var FKi; +var OKi; +var djn = ue({ + "out-build/vs/editor/common/languages/supports/languageBracketsConfiguration.js"() { + "use strict"; + + UZ(); + vot(); + $Ki = class { + constructor(i, e) { + this.languageId = i; + const t = e.brackets ? AKi(e.brackets) : []; + const s = new BZ(o => { + const a = new Set(); + return { + info: new FKi(this, o, a), + closing: a + }; + }); + const n = new BZ(o => { + const a = new Set(); + const l = new Set(); + return { + info: new OKi(this, o, a, l), + opening: a, + openingColorized: l + }; + }); + for (const [o, a] of t) { + const l = s.get(o); + const c = n.get(a); + l.closing.add(c.info); + c.opening.add(l.info); + } + const r = e.colorizedBracketPairs ? AKi(e.colorizedBracketPairs) : t.filter(o => o[0] !== "<" || o[1] !== ">"); + for (const [o, a] of r) { + const l = s.get(o); + const c = n.get(a); + l.closing.add(c.info); + c.openingColorized.add(l.info); + c.opening.add(l.info); + } + this.a = new Map([...s.cachedValues].map(([o, a]) => [o, a.info])); + this.b = new Map([...n.cachedValues].map(([o, a]) => [o, a.info])); + } + get openingBrackets() { + return [...this.a.values()]; + } + get closingBrackets() { + return [...this.b.values()]; + } + getOpeningBracketInfo(i) { + return this.a.get(i); + } + getClosingBracketInfo(i) { + return this.b.get(i); + } + getBracketInfo(i) { + return this.getOpeningBracketInfo(i) || this.getClosingBracketInfo(i); + } + getBracketRegExp(i) { + const e = Array.from([...this.a.keys(), ...this.b.keys()]); + return Dge(e, i); + } + }; + y8t = class { + constructor(i, e) { + this.a = i; + this.bracketText = e; + } + get languageId() { + return this.a.languageId; + } + }; + FKi = class extends y8t { + constructor(i, e, t) { + super(i, e); + this.openedBrackets = t; + this.isOpeningBracket = true; + } + }; + OKi = class extends y8t { + constructor(i, e, t, s) { + super(i, e); + this.openingBrackets = t; + this.b = s; + this.isOpeningBracket = false; + } + closes(i) { + if (i.a !== this.a) { + return false; + } else { + return this.openingBrackets.has(i); + } + } + closesColorized(i) { + if (i.a !== this.a) { + return false; + } else { + return this.b.has(i); + } + } + getOpeningBrackets() { + return [...this.openingBrackets]; + } + }; + } +}); +function hjn(i, e, t, s) { + let n = e.getLanguageConfiguration(i); + if (!n) { + if (!s.isRegisteredLanguageId(i)) { + return new Lge(i, {}); + } + n = new Lge(i, {}); + } + const r = fjn(n.languageId, t); + const o = UKi([n.underlyingConfig, r]); + return new Lge(n.languageId, o); +} +function fjn(i, e) { + const t = e.getValue(Eot.brackets, { + overrideIdentifier: i + }); + const s = e.getValue(Eot.colorizedBracketPairs, { + overrideIdentifier: i + }); + return { + brackets: _Ki(t), + colorizedBracketPairs: _Ki(s) + }; +} +function _Ki(i) { + if (Array.isArray(i)) { + return i.map(e => { + if (!!Array.isArray(e) && e.length === 2) { + return [e[0], e[1]]; + } + }).filter(e => !!e); + } +} +function BKi(i, e, t) { + const s = i.getLineContent(e); + let n = Jd(s); + if (n.length > t - 1) { + n = n.substring(0, t - 1); + } + return n; +} +function UKi(i) { + let e = { + comments: undefined, + brackets: undefined, + wordPattern: undefined, + indentationRules: undefined, + onEnterRules: undefined, + autoClosingPairs: undefined, + surroundingPairs: undefined, + autoCloseBefore: undefined, + folding: undefined, + colorizedBracketPairs: undefined, + __electricCharacterSupport: undefined + }; + for (const t of i) { + e = { + comments: t.comments || e.comments, + brackets: t.brackets || e.brackets, + wordPattern: t.wordPattern || e.wordPattern, + indentationRules: t.indentationRules || e.indentationRules, + onEnterRules: t.onEnterRules || e.onEnterRules, + autoClosingPairs: t.autoClosingPairs || e.autoClosingPairs, + surroundingPairs: t.surroundingPairs || e.surroundingPairs, + autoCloseBefore: t.autoCloseBefore || e.autoCloseBefore, + folding: t.folding || e.folding, + colorizedBracketPairs: t.colorizedBracketPairs || e.colorizedBracketPairs, + __electricCharacterSupport: t.__electricCharacterSupport || e.__electricCharacterSupport + }; + } + return e; +} +var xot; +var Lu; +var kot; +var Eot; +var WKi; +var w8t; +var C8t; +var VKi; +var Lge; +var Bd = ue({ + "out-build/vs/editor/common/languages/languageConfigurationRegistry.js"() { + "use strict"; + + pe(); + q(); + $i(); + BL(); + y9(); + Wqn(); + Xqn(); + Qqn(); + Zqn(); + vot(); + te(); + Me(); + wn(); + It(); + gf(); + djn(); + xot = class { + constructor(i) { + this.languageId = i; + } + affects(i) { + if (this.languageId) { + return this.languageId === i; + } else { + return true; + } + } + }; + Lu = Ve("languageConfigurationService"); + kot = class extends H { + constructor(e, t) { + super(); + this.h = e; + this.j = t; + this.c = this.D(new VKi()); + this.f = this.D(new B()); + this.onDidChange = this.f.event; + this.g = new Map(); + const s = new Set(Object.values(Eot)); + this.D(this.h.onDidChangeConfiguration(n => { + const r = n.change.keys.some(a => s.has(a)); + const o = n.change.overrides.filter(([a, l]) => l.some(c => s.has(c))).map(([a]) => a); + if (r) { + this.g.clear(); + this.f.fire(new xot(undefined)); + } else { + for (const a of o) { + if (this.j.isRegisteredLanguageId(a)) { + this.g.delete(a); + this.f.fire(new xot(a)); + } + } + } + })); + this.D(this.c.onDidChange(n => { + this.g.delete(n.languageId); + this.f.fire(new xot(n.languageId)); + })); + } + register(e, t, s) { + return this.c.register(e, t, s); + } + getLanguageConfiguration(e) { + let t = this.g.get(e); + if (!t) { + t = hjn(e, this.c, this.h, this.j); + this.g.set(e, t); + } + return t; + } + }; + kot = __decorate([__param(0, ve), __param(1, As)], kot); + Eot = { + brackets: "editor.language.brackets", + colorizedBracketPairs: "editor.language.colorizedBracketPairs" + }; + WKi = class { + constructor(i) { + this.languageId = i; + this.f = null; + this.c = []; + this.d = 0; + this.f = null; + } + register(i, e) { + const t = new w8t(i, e, ++this.d); + this.c.push(t); + this.f = null; + return IL(Ue(() => { + for (let s = 0; s < this.c.length; s++) { + if (this.c[s] === t) { + this.c.splice(s, 1); + this.f = null; + break; + } + } + })); + } + getResolvedConfiguration() { + if (!this.f) { + const i = this.g(); + if (i) { + this.f = new Lge(this.languageId, i); + } + } + return this.f; + } + g() { + if (this.c.length === 0) { + return null; + } else { + this.c.sort(w8t.cmp); + return UKi(this.c.map(i => i.configuration)); + } + } + }; + w8t = class { + constructor(i, e, t) { + this.configuration = i; + this.priority = e; + this.order = t; + } + static cmp(i, e) { + if (i.priority === e.priority) { + return i.order - e.order; + } else { + return i.priority - e.priority; + } + } + }; + C8t = class { + constructor(i) { + this.languageId = i; + } + }; + VKi = class extends H { + constructor() { + super(); + this.c = new Map(); + this.f = this.D(new B()); + this.onDidChange = this.f.event; + this.D(this.register(Ju, { + brackets: [["(", ")"], ["[", "]"], ["{", "}"]], + surroundingPairs: [{ + open: "{", + close: "}" + }, { + open: "[", + close: "]" + }, { + open: "(", + close: ")" + }, { + open: "<", + close: ">" + }, { + open: "\"", + close: "\"" + }, { + open: "'", + close: "'" + }, { + open: "`", + close: "`" + }], + colorizedBracketPairs: [], + folding: { + offSide: true + } + }, 0)); + } + register(i, e, t = 0) { + let s = this.c.get(i); + if (!s) { + s = new WKi(i); + this.c.set(i, s); + } + const n = s.register(e, t); + this.f.fire(new C8t(i)); + return IL(Ue(() => { + n.dispose(); + this.f.fire(new C8t(i)); + })); + } + getLanguageConfiguration(i) { + return this.c.get(i)?.getResolvedConfiguration() || null; + } + }; + Lge = class DFn { + constructor(e, t) { + this.languageId = e; + this.underlyingConfig = t; + this.c = null; + this.d = null; + this.f = this.underlyingConfig.brackets || this.underlyingConfig.indentationRules || this.underlyingConfig.onEnterRules ? new gKi(this.underlyingConfig) : null; + this.comments = DFn.g(this.underlyingConfig); + this.characterPair = new nKi(this.underlyingConfig); + this.wordDefinition = this.underlyingConfig.wordPattern || Nee; + this.indentationRules = this.underlyingConfig.indentationRules; + if (this.underlyingConfig.indentationRules) { + this.indentRulesSupport = new fKi(this.underlyingConfig.indentationRules); + } else { + this.indentRulesSupport = null; + } + this.foldingRules = this.underlyingConfig.folding || {}; + this.bracketsNew = new $Ki(e, this.underlyingConfig); + } + getWordDefinition() { + return Ige(this.wordDefinition); + } + get brackets() { + if (!this.c && this.underlyingConfig.brackets) { + this.c = new uKi(this.languageId, this.underlyingConfig.brackets); + } + return this.c; + } + get electricCharacter() { + this.d ||= new dKi(this.brackets); + return this.d; + } + onEnter(e, t, s, n) { + if (this.f) { + return this.f.onEnter(e, t, s, n); + } else { + return null; + } + } + getAutoClosingPairs() { + return new sKi(this.characterPair.getAutoClosingPairs()); + } + getAutoCloseBeforeSet(e) { + return this.characterPair.getAutoCloseBeforeSet(e); + } + getSurroundingPairs() { + return this.characterPair.getSurroundingPairs(); + } + static g(e) { + const t = e.comments; + if (!t) { + return null; + } + const s = {}; + if (t.lineComment) { + s.lineCommentToken = t.lineComment; + } + if (t.blockComment) { + const [n, r] = t.blockComment; + s.blockCommentStartToken = n; + s.blockCommentEndToken = r; + } + return s; + } + }; + it(Lu, kot, 1); + } +}); +var HKi; +var qKi; +var jKi; +var zKi; +var JKi; +var gb; +var C9 = ue({ + "out-build/vs/editor/common/encodedTokenAttributes.js"() { + "use strict"; + + (function (i) { + i[i.Null = 0] = "Null"; + i[i.PlainText = 1] = "PlainText"; + })(HKi ||= {}); + (function (i) { + i[i.NotSet = -1] = "NotSet"; + i[i.None = 0] = "None"; + i[i.Italic = 1] = "Italic"; + i[i.Bold = 2] = "Bold"; + i[i.Underline = 4] = "Underline"; + i[i.Strikethrough = 8] = "Strikethrough"; + })(qKi ||= {}); + (function (i) { + i[i.None = 0] = "None"; + i[i.DefaultForeground = 1] = "DefaultForeground"; + i[i.DefaultBackground = 2] = "DefaultBackground"; + })(jKi ||= {}); + (function (i) { + i[i.Other = 0] = "Other"; + i[i.Comment = 1] = "Comment"; + i[i.String = 2] = "String"; + i[i.RegEx = 3] = "RegEx"; + })(zKi ||= {}); + (function (i) { + i[i.LANGUAGEID_MASK = 255] = "LANGUAGEID_MASK"; + i[i.TOKEN_TYPE_MASK = 768] = "TOKEN_TYPE_MASK"; + i[i.BALANCED_BRACKETS_MASK = 1024] = "BALANCED_BRACKETS_MASK"; + i[i.FONT_STYLE_MASK = 30720] = "FONT_STYLE_MASK"; + i[i.FOREGROUND_MASK = 16744448] = "FOREGROUND_MASK"; + i[i.BACKGROUND_MASK = 4278190080] = "BACKGROUND_MASK"; + i[i.ITALIC_MASK = 2048] = "ITALIC_MASK"; + i[i.BOLD_MASK = 4096] = "BOLD_MASK"; + i[i.UNDERLINE_MASK = 8192] = "UNDERLINE_MASK"; + i[i.STRIKETHROUGH_MASK = 16384] = "STRIKETHROUGH_MASK"; + i[i.SEMANTIC_USE_ITALIC = 1] = "SEMANTIC_USE_ITALIC"; + i[i.SEMANTIC_USE_BOLD = 2] = "SEMANTIC_USE_BOLD"; + i[i.SEMANTIC_USE_UNDERLINE = 4] = "SEMANTIC_USE_UNDERLINE"; + i[i.SEMANTIC_USE_STRIKETHROUGH = 8] = "SEMANTIC_USE_STRIKETHROUGH"; + i[i.SEMANTIC_USE_FOREGROUND = 16] = "SEMANTIC_USE_FOREGROUND"; + i[i.SEMANTIC_USE_BACKGROUND = 32] = "SEMANTIC_USE_BACKGROUND"; + i[i.LANGUAGEID_OFFSET = 0] = "LANGUAGEID_OFFSET"; + i[i.TOKEN_TYPE_OFFSET = 8] = "TOKEN_TYPE_OFFSET"; + i[i.BALANCED_BRACKETS_OFFSET = 10] = "BALANCED_BRACKETS_OFFSET"; + i[i.FONT_STYLE_OFFSET = 11] = "FONT_STYLE_OFFSET"; + i[i.FOREGROUND_OFFSET = 15] = "FOREGROUND_OFFSET"; + i[i.BACKGROUND_OFFSET = 24] = "BACKGROUND_OFFSET"; + })(JKi ||= {}); + gb = class { + static getLanguageId(i) { + return (i & 255) >>> 0; + } + static getTokenType(i) { + return (i & 768) >>> 8; + } + static containsBalancedBrackets(i) { + return (i & 1024) !== 0; + } + static getFontStyle(i) { + return (i & 30720) >>> 11; + } + static getForeground(i) { + return (i & 16744448) >>> 15; + } + static getBackground(i) { + return (i & -16777216) >>> 24; + } + static getClassNameFromMetadata(i) { + let t = "mtk" + this.getForeground(i); + const s = this.getFontStyle(i); + if (s & 1) { + t += " mtki"; + } + if (s & 2) { + t += " mtkb"; + } + if (s & 4) { + t += " mtku"; + } + if (s & 8) { + t += " mtks"; + } + return t; + } + static getInlineStyleFromMetadata(i, e) { + const t = this.getForeground(i); + const s = this.getFontStyle(i); + let n = `color: ${e[t]};`; + if (s & 1) { + n += "font-style: italic;"; + } + if (s & 2) { + n += "font-weight: bold;"; + } + let r = ""; + if (s & 4) { + r += " underline"; + } + if (s & 8) { + r += " line-through"; + } + if (r) { + n += `text-decoration:${r};`; + } + return n; + } + static getPresentationFromMetadata(i) { + const e = this.getForeground(i); + const t = this.getFontStyle(i); + return { + foreground: e, + italic: !!(t & 1), + bold: !!(t & 2), + underline: !!(t & 4), + strikethrough: !!(t & 8) + }; + } + }; + } +}); +var uo; +var GKi; +var jp = ue({ + "out-build/vs/editor/common/core/offsetRange.js"() { + "use strict"; + + Ut(); + uo = class k2 { + static addRange(e, t) { + let s = 0; + while (s < t.length && t[s].endExclusive < e.start) { + s++; + } + let n = s; + while (n < t.length && t[n].start <= e.endExclusive) { + n++; + } + if (s === n) { + t.splice(s, 0, e); + } else { + const r = Math.min(e.start, t[s].start); + const o = Math.max(e.endExclusive, t[n - 1].endExclusive); + t.splice(s, n - s, new k2(r, o)); + } + } + static tryCreate(e, t) { + if (!(e > t)) { + return new k2(e, t); + } + } + static ofLength(e) { + return new k2(0, e); + } + static ofStartAndLength(e, t) { + return new k2(e, e + t); + } + static emptyAt(e) { + return new k2(e, e); + } + constructor(e, t) { + this.start = e; + this.endExclusive = t; + if (e > t) { + throw new co(`Invalid range: ${this.toString()}`); + } + } + get isEmpty() { + return this.start === this.endExclusive; + } + delta(e) { + return new k2(this.start + e, this.endExclusive + e); + } + deltaStart(e) { + return new k2(this.start + e, this.endExclusive); + } + deltaEnd(e) { + return new k2(this.start, this.endExclusive + e); + } + get length() { + return this.endExclusive - this.start; + } + toString() { + return `[${this.start}, ${this.endExclusive})`; + } + equals(e) { + return this.start === e.start && this.endExclusive === e.endExclusive; + } + containsRange(e) { + return this.start <= e.start && e.endExclusive <= this.endExclusive; + } + contains(e) { + return this.start <= e && e < this.endExclusive; + } + join(e) { + return new k2(Math.min(this.start, e.start), Math.max(this.endExclusive, e.endExclusive)); + } + intersect(e) { + const t = Math.max(this.start, e.start); + const s = Math.min(this.endExclusive, e.endExclusive); + if (t <= s) { + return new k2(t, s); + } + } + intersectionLength(e) { + const t = Math.max(this.start, e.start); + const s = Math.min(this.endExclusive, e.endExclusive); + return Math.max(0, s - t); + } + intersects(e) { + const t = Math.max(this.start, e.start); + const s = Math.min(this.endExclusive, e.endExclusive); + return t < s; + } + intersectsOrTouches(e) { + const t = Math.max(this.start, e.start); + const s = Math.min(this.endExclusive, e.endExclusive); + return t <= s; + } + isBefore(e) { + return this.endExclusive <= e.start; + } + isAfter(e) { + return this.start >= e.endExclusive; + } + slice(e) { + return e.slice(this.start, this.endExclusive); + } + substring(e) { + return e.substring(this.start, this.endExclusive); + } + clip(e) { + if (this.isEmpty) { + throw new co(`Invalid clipping range: ${this.toString()}`); + } + return Math.max(this.start, Math.min(this.endExclusive - 1, e)); + } + clipCyclic(e) { + if (this.isEmpty) { + throw new co(`Invalid clipping range: ${this.toString()}`); + } + if (e < this.start) { + return this.endExclusive - (this.start - e) % this.length; + } else if (e >= this.endExclusive) { + return this.start + (e - this.start) % this.length; + } else { + return e; + } + } + map(e) { + const t = []; + for (let s = this.start; s < this.endExclusive; s++) { + t.push(e(s)); + } + return t; + } + forEach(e) { + for (let t = this.start; t < this.endExclusive; t++) { + e(t); + } + } + }; + GKi = class TFn { + constructor() { + this.a = []; + } + addRange(e) { + let t = 0; + while (t < this.a.length && this.a[t].endExclusive < e.start) { + t++; + } + let s = t; + while (s < this.a.length && this.a[s].start <= e.endExclusive) { + s++; + } + if (t === s) { + this.a.splice(t, 0, e); + } else { + const n = Math.min(e.start, this.a[t].start); + const r = Math.max(e.endExclusive, this.a[s - 1].endExclusive); + this.a.splice(t, s - t, new uo(n, r)); + } + } + toString() { + return this.a.map(e => e.toString()).join(", "); + } + intersectsStrict(e) { + let t = 0; + while (t < this.a.length && this.a[t].endExclusive <= e.start) { + t++; + } + return t < this.a.length && this.a[t].start < e.endExclusive; + } + intersectWithRange(e) { + const t = new TFn(); + for (const s of this.a) { + const n = s.intersect(e); + if (n) { + t.addRange(n); + } + } + return t; + } + intersectWithRangeLength(e) { + return this.intersectWithRange(e).length; + } + get length() { + return this.a.reduce((e, t) => e + t.length, 0); + } + }; + } +}); +var KKi; +var S8t; +var YKi; +var gjn = ue({ + "out-build/vs/editor/common/tokens/tokenArray.js"() { + "use strict"; + + jp(); + KKi = class I3i { + static create(e) { + return new I3i(e); + } + constructor(e) { + this.a = e; + } + forEach(e) { + let t = 0; + for (const s of this.a) { + const n = new uo(t, t + s.length); + e(n, s); + t += s.length; + } + } + slice(e) { + const t = []; + let s = 0; + for (const n of this.a) { + const r = s; + const o = r + n.length; + if (o > e.start) { + if (r >= e.endExclusive) { + break; + } + const a = Math.max(0, e.start - r); + const l = Math.max(0, o - e.endExclusive); + t.push(new S8t(n.length - a - l, n.metadata)); + } + s += n.length; + } + return I3i.create(t); + } + }; + S8t = class { + constructor(i, e) { + this.length = i; + this.metadata = e; + } + }; + YKi = class { + constructor() { + this.a = []; + } + add(i, e) { + this.a.push(new S8t(i, e)); + } + build() { + return KKi.create(this.a); + } + }; + } +}); +function pjn(i, e) { + const t = e.lineNumber; + if (!i.tokenization.isCheapToTokenize(t)) { + return; + } + i.tokenization.forceTokenization(t); + const s = i.tokenization.getLineTokens(t); + const n = s.findTokenIndexAtOffset(e.column - 1); + return s.getStandardTokenType(n); +} +var Kb; +var XKi; +var RT = ue({ + "out-build/vs/editor/common/tokens/lineTokens.js"() { + "use strict"; + + C9(); + jp(); + gjn(); + Kb = class ZQ { + static createEmpty(e, t) { + const s = ZQ.defaultTokenMetadata; + const n = new Uint32Array(2); + n[0] = e.length; + n[1] = s; + return new ZQ(n, e, t); + } + static createFromTextAndMetadata(e, t) { + let s = 0; + let n = ""; + const r = new Array(); + for (const { + text: o, + metadata: a + } of e) { + r.push(s + o.length, a); + s += o.length; + n += o; + } + return new ZQ(new Uint32Array(r), n, t); + } + static convertToEndOffset(e, t) { + const n = (e.length >>> 1) - 1; + for (let r = 0; r < n; r++) { + e[r << 1] = e[r + 1 << 1]; + } + e[n << 1] = t; + } + static findIndexInTokensArray(e, t) { + if (e.length <= 2) { + return 0; + } + let s = 0; + let n = (e.length >>> 1) - 1; + while (s < n) { + const r = s + Math.floor((n - s) / 2); + const o = e[r << 1]; + if (o === t) { + return r + 1; + } + if (o < t) { + s = r + 1; + } else if (o > t) { + n = r; + } + } + return s; + } + static { + this.defaultTokenMetadata = 33587200; + } + constructor(e, t, s) { + this._lineTokensBrand = undefined; + this.a = e; + this.b = this.a.length >>> 1; + this.c = t; + this.languageIdCodec = s; + } + equals(e) { + if (e instanceof ZQ) { + return this.slicedEquals(e, 0, this.b); + } else { + return false; + } + } + slicedEquals(e, t, s) { + if (this.c !== e.c || this.b !== e.b) { + return false; + } + const n = t << 1; + const r = n + (s << 1); + for (let o = n; o < r; o++) { + if (this.a[o] !== e.a[o]) { + return false; + } + } + return true; + } + getLineContent() { + return this.c; + } + getCount() { + return this.b; + } + getStartOffset(e) { + if (e > 0) { + return this.a[e - 1 << 1]; + } else { + return 0; + } + } + getMetadata(e) { + return this.a[(e << 1) + 1]; + } + getLanguageId(e) { + const t = this.a[(e << 1) + 1]; + const s = gb.getLanguageId(t); + return this.languageIdCodec.decodeLanguageId(s); + } + getStandardTokenType(e) { + const t = this.a[(e << 1) + 1]; + return gb.getTokenType(t); + } + getForeground(e) { + const t = this.a[(e << 1) + 1]; + return gb.getForeground(t); + } + getClassName(e) { + const t = this.a[(e << 1) + 1]; + return gb.getClassNameFromMetadata(t); + } + getInlineStyle(e, t) { + const s = this.a[(e << 1) + 1]; + return gb.getInlineStyleFromMetadata(s, t); + } + getPresentation(e) { + const t = this.a[(e << 1) + 1]; + return gb.getPresentationFromMetadata(t); + } + getEndOffset(e) { + return this.a[e << 1]; + } + findTokenIndexAtOffset(e) { + return ZQ.findIndexInTokensArray(this.a, e); + } + inflate() { + return this; + } + sliceAndInflate(e, t, s) { + return new XKi(this, e, t, s); + } + withInserted(e) { + if (e.length === 0) { + return this; + } + let t = 0; + let s = 0; + let n = ""; + const r = new Array(); + let o = 0; + while (true) { + const a = t < this.b ? this.a[t << 1] : -1; + const l = s < e.length ? e[s] : null; + if (a !== -1 && (l === null || a <= l.offset)) { + n += this.c.substring(o, a); + const c = this.a[(t << 1) + 1]; + r.push(n.length, c); + t++; + o = a; + } else if (l) { + if (l.offset > o) { + n += this.c.substring(o, l.offset); + const c = this.a[(t << 1) + 1]; + r.push(n.length, c); + o = l.offset; + } + n += l.text; + r.push(n.length, l.tokenMetadata); + s++; + } else { + break; + } + } + return new ZQ(new Uint32Array(r), n, this.languageIdCodec); + } + getTokensInRange(e) { + const t = new YKi(); + const s = this.findTokenIndexAtOffset(e.start); + const n = this.findTokenIndexAtOffset(e.endExclusive); + for (let r = s; r <= n; r++) { + const a = new uo(this.getStartOffset(r), this.getEndOffset(r)).intersectionLength(e); + if (a > 0) { + t.add(a, this.getMetadata(r)); + } + } + return t.build(); + } + getTokenText(e) { + const t = this.getStartOffset(e); + const s = this.getEndOffset(e); + return this.c.substring(t, s); + } + forEach(e) { + const t = this.getCount(); + for (let s = 0; s < t; s++) { + e(s); + } + } + extractObject() { + return { + tokens: this.a, + text: this.c + }; + } + toString() { + let e = ""; + this.forEach(t => { + e += `[${this.getTokenText(t)}]{${this.getClassName(t)}}`; + }); + return e; + } + }; + XKi = class PFn { + constructor(e, t, s, n) { + this.a = e; + this.b = t; + this.c = s; + this.d = n; + this.e = e.findTokenIndexAtOffset(t); + this.languageIdCodec = e.languageIdCodec; + this.f = 0; + for (let r = this.e, o = e.getCount(); r < o && !(e.getStartOffset(r) >= s); r++) { + this.f++; + } + } + getMetadata(e) { + return this.a.getMetadata(this.e + e); + } + getLanguageId(e) { + return this.a.getLanguageId(this.e + e); + } + getLineContent() { + return this.a.getLineContent().substring(this.b, this.c); + } + equals(e) { + if (e instanceof PFn) { + return this.b === e.b && this.c === e.c && this.d === e.d && this.a.slicedEquals(e.a, this.e, this.f); + } else { + return false; + } + } + getCount() { + return this.f; + } + getStandardTokenType(e) { + return this.a.getStandardTokenType(this.e + e); + } + getForeground(e) { + return this.a.getForeground(this.e + e); + } + getEndOffset(e) { + const t = this.a.getEndOffset(this.e + e); + return Math.min(this.c, t) - this.b + this.d; + } + getClassName(e) { + return this.a.getClassName(this.e + e); + } + getInlineStyle(e, t) { + return this.a.getInlineStyle(this.e + e, t); + } + getPresentation(e) { + return this.a.getPresentation(this.e + e); + } + findTokenIndexAtOffset(e) { + return this.a.findTokenIndexAtOffset(e + this.b - this.d) - this.e; + } + getTokenText(e) { + const t = this.e + e; + const s = this.a.getStartOffset(t); + const n = this.a.getEndOffset(t); + let r = this.a.getTokenText(t); + if (s < this.b) { + r = r.substring(this.b - s); + } + if (n > this.c) { + r = r.substring(0, r.length - (n - this.c)); + } + return r; + } + forEach(e) { + for (let t = 0; t < this.getCount(); t++) { + e(t); + } + } + }; + } +}); +function x8t(i, e) { + i.tokenization.forceTokenization(e.lineNumber); + const t = i.tokenization.getLineTokens(e.lineNumber); + const s = cj(t, e.column - 1); + const n = s.firstCharOffset === 0; + const r = t.getLanguageId(0) === s.languageId; + return !n && !r; +} +var Iot; +var Dot; +var k8t; +var E8t = ue({ + "out-build/vs/editor/common/languages/supports/indentationLineProcessor.js"() { + "use strict"; + + $i(); + vge(); + RT(); + Iot = class { + constructor(i, e, t) { + this.a = e; + this.b = new k8t(i, t); + } + shouldIncrease(i, e) { + const t = this.b.getProcessedLine(i, e); + return this.a.shouldIncrease(t); + } + shouldDecrease(i, e) { + const t = this.b.getProcessedLine(i, e); + return this.a.shouldDecrease(t); + } + shouldIgnore(i, e) { + const t = this.b.getProcessedLine(i, e); + return this.a.shouldIgnore(t); + } + shouldIndentNextLine(i, e) { + const t = this.b.getProcessedLine(i, e); + return this.a.shouldIndentNextLine(t); + } + }; + Dot = class { + constructor(i, e) { + this.a = i; + this.b = new k8t(i, e); + } + getProcessedTokenContextAroundRange(i) { + const e = this.c(i); + const t = this.d(i); + const s = this.e(i); + return { + beforeRangeProcessedTokens: e, + afterRangeProcessedTokens: t, + previousLineProcessedTokens: s + }; + } + c(i) { + this.a.tokenization.forceTokenization(i.startLineNumber); + const e = this.a.tokenization.getLineTokens(i.startLineNumber); + const t = cj(e, i.startColumn - 1); + let s; + if (x8t(this.a, i.getStartPosition())) { + const r = i.startColumn - 1 - t.firstCharOffset; + const o = t.firstCharOffset; + const a = o + r; + s = e.sliceAndInflate(o, a, 0); + } else { + const r = i.startColumn - 1; + s = e.sliceAndInflate(0, r, 0); + } + return this.b.getProcessedTokens(s); + } + d(i) { + const e = i.isEmpty() ? i.getStartPosition() : i.getEndPosition(); + this.a.tokenization.forceTokenization(e.lineNumber); + const t = this.a.tokenization.getLineTokens(e.lineNumber); + const s = cj(t, e.column - 1); + const n = e.column - 1 - s.firstCharOffset; + const r = s.firstCharOffset + n; + const o = s.firstCharOffset + s.getLineLength(); + const a = t.sliceAndInflate(r, o, 0); + return this.b.getProcessedTokens(a); + } + e(i) { + const e = h => { + this.a.tokenization.forceTokenization(h); + const g = this.a.tokenization.getLineTokens(h); + const p = this.a.getLineMaxColumn(h) - 1; + return cj(g, p); + }; + this.a.tokenization.forceTokenization(i.startLineNumber); + const t = this.a.tokenization.getLineTokens(i.startLineNumber); + const s = cj(t, i.startColumn - 1); + const n = Kb.createEmpty("", s.languageIdCodec); + const r = i.startLineNumber - 1; + if (r === 0 || s.firstCharOffset !== 0) { + return n; + } + const l = e(r); + if (s.languageId !== l.languageId) { + return n; + } + const u = l.toIViewLineTokens(); + return this.b.getProcessedTokens(u); + } + }; + k8t = class { + constructor(i, e) { + this.a = i; + this.b = e; + } + getProcessedLine(i, e) { + const t = (r, o) => { + const a = Jd(r); + return o + r.substring(a.length); + }; + this.a.tokenization.forceTokenization?.(i); + const s = this.a.tokenization.getLineTokens(i); + let n = this.getProcessedTokens(s).getLineContent(); + if (e !== undefined) { + n = t(n, e); + } + return n; + } + getProcessedTokens(i) { + const e = a => a === 2 || a === 3 || a === 1; + const t = i.getLanguageId(0); + const n = this.b.getLanguageConfiguration(t).bracketsNew.getBracketRegExp({ + global: true + }); + const r = []; + i.forEach(a => { + const l = i.getStandardTokenType(a); + let c = i.getTokenText(a); + if (e(l)) { + c = c.replace(n, ""); + } + const u = i.getMetadata(a); + r.push({ + text: c, + metadata: u + }); + }); + return Kb.createFromTextAndMetadata(r, i.languageIdCodec); + } + }; + } +}); +function Oee(i, e, t, s) { + e.tokenization.forceTokenization(t.startLineNumber); + const n = e.getLanguageIdAtPosition(t.startLineNumber, t.startColumn); + const r = s.getLanguageConfiguration(n); + if (!r) { + return null; + } + const a = new Dot(e, s).getProcessedTokenContextAroundRange(t); + const l = a.previousLineProcessedTokens.getLineContent(); + const c = a.beforeRangeProcessedTokens.getLineContent(); + const u = a.afterRangeProcessedTokens.getLineContent(); + const d = r.onEnter(i, l, c, u); + if (!d) { + return null; + } + const h = d.indentAction; + let g = d.appendText; + const p = d.removeText || 0; + if (g) { + if (h === bg.Indent) { + g = "\t" + g; + } + } else if (h === bg.Indent || h === bg.IndentOutdent) { + g = "\t"; + } else { + g = ""; + } + let b = BKi(e, t.startLineNumber, t.startColumn); + if (p) { + b = b.substring(0, b.length - p); + } + return { + indentAction: h, + appendText: g, + removeText: p, + indentation: b + }; +} +var I8t = ue({ + "out-build/vs/editor/common/languages/enterAction.js"() { + "use strict"; + + y9(); + Bd(); + E8t(); + } +}); +function gj(i, e) { + if (e <= 0) { + return ""; + } + Pot[i] ||= ["", i]; + const t = Pot[i]; + for (let s = t.length; s <= e; s++) { + t[s] = t[s - 1] + i; + } + return t[e]; +} +var Tot; +var Pot; +var EI; +var Rge = ue({ + "out-build/vs/editor/common/commands/shiftCommand.js"() { + "use strict"; + + $i(); + TT(); + yt(); + ua(); + I8t(); + Bd(); + Pot = Object.create(null); + EI = Tot = class { + static unshiftIndent(e, t, s, n, r) { + const o = pp.visibleColumnFromColumn(e, t, s); + if (r) { + const a = gj(" ", n); + const c = pp.prevIndentTabStop(o, n) / n; + return gj(a, c); + } else { + const a = "\t"; + const c = pp.prevRenderTabStop(o, s) / s; + return gj(a, c); + } + } + static shiftIndent(e, t, s, n, r) { + const o = pp.visibleColumnFromColumn(e, t, s); + if (r) { + const a = gj(" ", n); + const c = pp.nextIndentTabStop(o, n) / n; + return gj(a, c); + } else { + const a = "\t"; + const c = pp.nextRenderTabStop(o, s) / s; + return gj(a, c); + } + } + constructor(e, t, s) { + this.f = s; + this.a = t; + this.b = e; + this.c = null; + this.d = false; + this.e = false; + } + g(e, t, s) { + if (this.d) { + e.addTrackedEditOperation(t, s); + } else { + e.addEditOperation(t, s); + } + } + getEditOperations(e, t) { + const s = this.b.startLineNumber; + let n = this.b.endLineNumber; + if (this.b.endColumn === 1 && s !== n) { + n = n - 1; + } + const { + tabSize: r, + indentSize: o, + insertSpaces: a + } = this.a; + const l = s === n; + if (this.a.useTabStops) { + if (this.b.isEmpty() && /^\s*$/.test(e.getLineContent(s))) { + this.d = true; + } + let c = 0; + let u = 0; + for (let d = s; d <= n; d++, c = u) { + u = 0; + const h = e.getLineContent(d); + let g = B0(h); + if (this.a.isUnshift && (h.length === 0 || g === 0) || !l && !this.a.isUnshift && h.length === 0) { + continue; + } + if (g === -1) { + g = h.length; + } + if (d > 1 && pp.visibleColumnFromColumn(h, g + 1, r) % o !== 0 && e.tokenization.isCheapToTokenize(d - 1)) { + const v = Oee(this.a.autoIndent, e, new Z(d - 1, e.getLineMaxColumn(d - 1), d - 1, e.getLineMaxColumn(d - 1)), this.f); + if (v) { + u = c; + if (v.appendText) { + for (let y = 0, w = v.appendText.length; y < w && u < o && v.appendText.charCodeAt(y) === 32; y++) { + u++; + } + } + if (v.removeText) { + u = Math.max(0, u - v.removeText); + } + for (let y = 0; y < u && g !== 0 && h.charCodeAt(g - 1) === 32; y++) { + g--; + } + } + } + if (this.a.isUnshift && g === 0) { + continue; + } + let p; + if (this.a.isUnshift) { + p = Tot.unshiftIndent(h, g + 1, r, o, a); + } else { + p = Tot.shiftIndent(h, g + 1, r, o, a); + } + this.g(t, new Z(d, 1, d, g + 1), p); + if (d === s && !this.b.isEmpty()) { + this.e = this.b.startColumn <= g + 1; + } + } + } else { + if (!this.a.isUnshift && this.b.isEmpty() && e.getLineLength(s) === 0) { + this.d = true; + } + const c = a ? gj(" ", o) : "\t"; + for (let u = s; u <= n; u++) { + const d = e.getLineContent(u); + let h = B0(d); + if ((!this.a.isUnshift || d.length !== 0 && h !== 0) && (!!l || !!this.a.isUnshift || d.length !== 0) && (h === -1 && (h = d.length), !this.a.isUnshift || h !== 0)) { + if (this.a.isUnshift) { + h = Math.min(h, o); + for (let g = 0; g < h; g++) { + if (d.charCodeAt(g) === 9) { + h = g + 1; + break; + } + } + this.g(t, new Z(u, 1, u, h + 1), ""); + } else { + this.g(t, new Z(u, 1, u, 1), c); + if (u === s && !this.b.isEmpty()) { + this.e = this.b.startColumn === 1; + } + } + } + } + } + this.c = t.trackSelection(this.b); + } + computeCursorState(e, t) { + if (this.d) { + const n = t.getInverseEditOperations()[0]; + return new Vs(n.range.endLineNumber, n.range.endColumn, n.range.endLineNumber, n.range.endColumn); + } + const s = t.getTrackedSelection(this.c); + if (this.e) { + const n = this.b.startColumn; + if (s.startColumn <= n) { + return s; + } else if (s.getDirection() === 0) { + return new Vs(s.startLineNumber, n, s.endLineNumber, s.endColumn); + } else { + return new Vs(s.endLineNumber, s.endColumn, s.startLineNumber, n); + } + } + return s; + } + }; + EI = Tot = __decorate([__param(2, Lu)], EI); + } +}); +var QKi; +var ZKi; +var eYi = ue({ + "out-build/vs/editor/common/commands/surroundSelectionCommand.js"() { + "use strict"; + + yt(); + ua(); + QKi = class { + constructor(i, e, t) { + this.a = i; + this.b = e; + this.c = t; + } + getEditOperations(i, e) { + e.addTrackedEditOperation(new Z(this.a.startLineNumber, this.a.startColumn, this.a.startLineNumber, this.a.startColumn), this.b); + e.addTrackedEditOperation(new Z(this.a.endLineNumber, this.a.endColumn, this.a.endLineNumber, this.a.endColumn), this.c); + } + computeCursorState(i, e) { + const t = e.getInverseEditOperations(); + const s = t[0].range; + const n = t[1].range; + return new Vs(s.endLineNumber, s.endColumn, n.endLineNumber, n.endColumn - this.c.length); + } + }; + ZKi = class { + constructor(i, e, t) { + this.a = i; + this.b = e; + this.c = t; + } + getEditOperations(i, e) { + e.addTrackedEditOperation(new Z(this.a.lineNumber, this.a.column, this.a.lineNumber, this.a.column), this.b + this.c); + } + computeCursorState(i, e) { + const s = e.getInverseEditOperations()[0].range; + return new Vs(s.endLineNumber, s.startColumn, s.endLineNumber, s.endColumn - this.c.length); + } + }; + } +}); +function mjn(i, e, t) { + const s = i.tokenization.getLanguageIdAtPosition(e, 0); + if (e > 1) { + let n; + let r = -1; + for (n = e - 1; n >= 1; n--) { + if (i.tokenization.getLanguageIdAtPosition(n, 0) !== s) { + return r; + } + const o = i.getLineContent(n); + if (t.shouldIgnore(n) || /^\s+$/.test(o) || o === "") { + r = n; + continue; + } + return n; + } + } + return -1; +} +function Nge(i, e, t, s = true, n) { + if (i < 4) { + return null; + } + const r = n.getLanguageConfiguration(e.tokenization.getLanguageId()).indentRulesSupport; + if (!r) { + return null; + } + const o = new Iot(e, r, n); + if (t <= 1) { + return { + indentation: "", + action: null + }; + } + for (let l = t - 1; l > 0 && e.getLineContent(l) === ""; l--) { + if (l === 1) { + return { + indentation: "", + action: null + }; + } + } + const a = mjn(e, t, o); + if (a < 0) { + return null; + } + if (a < 1) { + return { + indentation: "", + action: null + }; + } + if (o.shouldIncrease(a) || o.shouldIndentNextLine(a)) { + const l = e.getLineContent(a); + return { + indentation: Jd(l), + action: bg.Indent, + line: a + }; + } else if (o.shouldDecrease(a)) { + const l = e.getLineContent(a); + return { + indentation: Jd(l), + action: null, + line: a + }; + } else { + if (a === 1) { + return { + indentation: Jd(e.getLineContent(a)), + action: null, + line: a + }; + } + const l = a - 1; + const c = r.getIndentMetadata(e.getLineContent(l)); + if (!(c & 3) && c & 4) { + let u = 0; + for (let d = l - 1; d > 0; d--) { + if (!o.shouldIndentNextLine(d)) { + u = d; + break; + } + } + return { + indentation: Jd(e.getLineContent(u + 1)), + action: null, + line: u + 1 + }; + } + if (s) { + return { + indentation: Jd(e.getLineContent(a)), + action: null, + line: a + }; + } + for (let u = a; u > 0; u--) { + if (o.shouldIncrease(u)) { + return { + indentation: Jd(e.getLineContent(u)), + action: bg.Indent, + line: u + }; + } + if (o.shouldIndentNextLine(u)) { + let d = 0; + for (let h = u - 1; h > 0; h--) { + if (!o.shouldIndentNextLine(u)) { + d = h; + break; + } + } + return { + indentation: Jd(e.getLineContent(d + 1)), + action: null, + line: d + 1 + }; + } else if (o.shouldDecrease(u)) { + return { + indentation: Jd(e.getLineContent(u)), + action: null, + line: u + }; + } + } + return { + indentation: Jd(e.getLineContent(1)), + action: null, + line: 1 + }; + } +} +function Mge(i, e, t, s, n, r) { + if (i < 4) { + return null; + } + const o = r.getLanguageConfiguration(t); + if (!o) { + return null; + } + const a = r.getLanguageConfiguration(t).indentRulesSupport; + if (!a) { + return null; + } + const l = new Iot(e, a, r); + const c = Nge(i, e, s, undefined, r); + if (c) { + const u = c.line; + if (u !== undefined) { + let d = true; + for (let h = u; h < s - 1; h++) { + if (!/^\s*$/.test(e.getLineContent(h))) { + d = false; + break; + } + } + if (d) { + const h = o.onEnter(i, "", e.getLineContent(u), ""); + if (h) { + let g = Jd(e.getLineContent(u)); + if (h.removeText) { + g = g.substring(0, g.length - h.removeText); + } + if (h.indentAction === bg.Indent || h.indentAction === bg.IndentOutdent) { + g = n.shiftIndent(g); + } else if (h.indentAction === bg.Outdent) { + g = n.unshiftIndent(g); + } + if (l.shouldDecrease(s)) { + g = n.unshiftIndent(g); + } + if (h.appendText) { + g += h.appendText; + } + return Jd(g); + } + } + } + if (l.shouldDecrease(s)) { + if (c.action === bg.Indent) { + return c.indentation; + } else { + return n.unshiftIndent(c.indentation); + } + } else if (c.action === bg.Indent) { + return n.shiftIndent(c.indentation); + } else { + return c.indentation; + } + } + return null; +} +function bjn(i, e, t, s, n) { + if (i < 4) { + return null; + } + const r = e.getLanguageIdAtPosition(t.startLineNumber, t.startColumn); + const o = n.getLanguageConfiguration(r).indentRulesSupport; + if (!o) { + return null; + } + e.tokenization.forceTokenization(t.startLineNumber); + const l = new Dot(e, n).getProcessedTokenContextAroundRange(t); + const c = l.afterRangeProcessedTokens; + const u = l.beforeRangeProcessedTokens; + const d = Jd(u.getLineContent()); + const h = yjn(e, t.startLineNumber, u); + const g = x8t(e, t.getStartPosition()); + const p = e.getLineContent(t.startLineNumber); + const b = Jd(p); + const v = Nge(i, h, t.startLineNumber + 1, undefined, n); + if (!v) { + const w = g ? b : d; + return { + beforeEnter: w, + afterEnter: w + }; + } + let y = g ? b : v.indentation; + if (v.action === bg.Indent) { + y = s.shiftIndent(y); + } + if (o.shouldDecrease(c.getLineContent())) { + y = s.unshiftIndent(y); + } + return { + beforeEnter: g ? b : d, + afterEnter: y + }; +} +function vjn(i, e, t, s, n, r) { + const o = i.autoIndent; + if (o < 4 || x8t(e, t.getStartPosition())) { + return null; + } + const l = e.getLanguageIdAtPosition(t.startLineNumber, t.startColumn); + const c = r.getLanguageConfiguration(l).indentRulesSupport; + if (!c) { + return null; + } + const d = new Dot(e, r).getProcessedTokenContextAroundRange(t); + const h = d.beforeRangeProcessedTokens.getLineContent(); + const g = d.afterRangeProcessedTokens.getLineContent(); + const p = h + g; + const b = h + s + g; + if (!c.shouldDecrease(p) && c.shouldDecrease(b)) { + const y = Nge(o, e, t.startLineNumber, false, r); + if (!y) { + return null; + } + let w = y.indentation; + if (y.action !== bg.Indent) { + w = n.unshiftIndent(w); + } + return w; + } + const v = t.startLineNumber - 1; + if (v > 0) { + const y = e.getLineContent(v); + if (c.shouldIndentNextLine(y) && c.shouldIncrease(b)) { + const C = Nge(o, e, t.startLineNumber, false, r)?.indentation; + if (C !== undefined) { + const S = e.getLineContent(t.startLineNumber); + const x = Jd(S); + const E = n.shiftIndent(C) === x; + const D = /^\s*$/.test(p); + const P = i.autoClosingPairs.autoClosingPairsOpenByEnd.get(s); + const L = P && P.length > 0 && D; + if (E && L) { + return C; + } + } + } + } + return null; +} +function tYi(i, e, t) { + const s = t.getLanguageConfiguration(i.getLanguageId()).indentRulesSupport; + if (!s || e < 1 || e > i.getLineCount()) { + return null; + } else { + return s.getIndentMetadata(i.getLineContent(e)); + } +} +function yjn(i, e, t) { + return { + tokenization: { + getLineTokens: n => n === e ? t : i.tokenization.getLineTokens(n), + getLanguageId: () => i.getLanguageId(), + getLanguageIdAtPosition: (n, r) => i.getLanguageIdAtPosition(n, r) + }, + getLineContent: n => n === e ? t.getLineContent() : i.getLineContent(n) + }; +} +var D8t = ue({ + "out-build/vs/editor/common/languages/autoIndent.js"() { + "use strict"; + + $i(); + y9(); + E8t(); + } +}); +function T8t(i, e) { + if (i === " ") { + if (e === 5 || e === 6) { + return 6; + } else { + return 5; + } + } else { + return 4; + } +} +function Lot(i, e) { + if (sYi(i) && !sYi(e)) { + return true; + } else if (i === 5) { + return false; + } else { + return iYi(i) !== iYi(e); + } +} +function iYi(i) { + if (i === 6 || i === 5) { + return "space"; + } else { + return i; + } +} +function sYi(i) { + return i === 4 || i === 5 || i === 6; +} +function nYi(i, e, t, s, n) { + if (i.autoClosingOvertype === "never" || !i.autoClosingPairs.autoClosingPairsCloseSingleChar.has(n)) { + return false; + } + for (let r = 0, o = t.length; r < o; r++) { + const a = t[r]; + if (!a.isEmpty()) { + return false; + } + const l = a.getPosition(); + const c = e.getLineContent(l.lineNumber); + if (c.charAt(l.column - 1) !== n) { + return false; + } + const d = m9(n); + if ((l.column > 2 ? c.charCodeAt(l.column - 2) : 0) === 92 && d) { + return false; + } + if (i.autoClosingOvertype === "auto") { + let g = false; + for (let p = 0, b = s.length; p < b; p++) { + const v = s[p]; + if (l.lineNumber === v.startLineNumber && l.column === v.startColumn) { + g = true; + break; + } + } + if (!g) { + return false; + } + } + } + return true; +} +function pj(i, e, t) { + if (t) { + return new yge(i, e, true); + } else { + return new $y(i, e, true); + } +} +function Rot(i, e, t) { + t = t || 1; + return EI.shiftIndent(e, e.length + t, i.tabSize, i.indentSize, i.insertSpaces); +} +function Age(i, e, t) { + t = t || 1; + return EI.unshiftIndent(e, e.length + t, i.tabSize, i.indentSize, i.insertSpaces); +} +function rYi(i, e) { + if (m9(e)) { + return i.autoSurround === "quotes" || i.autoSurround === "languageDefined"; + } else { + return i.autoSurround === "brackets" || i.autoSurround === "languageDefined"; + } +} +var oYi; +var aYi; +var lYi; +var Not; +var P8t; +var cYi; +var uYi; +var dYi; +var $ge; +var hYi; +var fYi; +var gYi; +var pYi; +var Mot; +var mYi; +var bYi; +var Aot = ue({ + "out-build/vs/editor/common/cursor/cursorTypeEditOperations.js"() { + "use strict"; + + Ut(); + $i(); + Tee(); + Rge(); + eYi(); + kI(); + xge(); + yt(); + Rs(); + y9(); + Bd(); + vge(); + D8t(); + I8t(); + oYi = class { + static getEdits(i, e, t, s, n) { + if (!n && this.a(i, e, t)) { + const r = []; + for (const a of t) { + const l = this.b(i, e, a, s); + if (l === null) { + return; + } + r.push({ + selection: a, + indentation: l + }); + } + const o = Not.getAutoClosingPairClose(i, e, t, s, false); + return this.c(i, e, r, s, o); + } + } + static a(i, e, t) { + if (i.autoIndent < 4) { + return false; + } + for (let s = 0, n = t.length; s < n; s++) { + if (!e.tokenization.isCheapToTokenize(t[s].getEndPosition().lineNumber)) { + return false; + } + } + return true; + } + static b(i, e, t, s) { + const n = vjn(i, e, t, s, { + shiftIndent: o => Rot(i, o), + unshiftIndent: o => Age(i, o) + }, i.languageConfigurationService); + if (n === null) { + return null; + } + const r = BKi(e, t.startLineNumber, t.startColumn); + if (n === i.normalizeIndentation(r)) { + return null; + } else { + return n; + } + } + static c(i, e, t, s, n) { + const r = t.map(({ + selection: a, + indentation: l + }) => { + if (n !== null) { + const c = this.d(i, e, l, a, s, false); + return new bYi(c, a, s, n); + } else { + const c = this.d(i, e, l, a, s, true); + return pj(c.range, c.text, false); + } + }); + const o = { + shouldPushStackElementBefore: true, + shouldPushStackElementAfter: false + }; + return new JC(4, r, o); + } + static d(i, e, t, s, n, r = true) { + const o = s.startLineNumber; + const a = e.getLineFirstNonWhitespaceColumn(o); + let l = i.normalizeIndentation(t); + if (a !== 0) { + const u = e.getLineContent(o); + l += u.substring(a - 1, s.startColumn - 1); + } + l += r ? n : ""; + return { + range: new Z(o, 1, s.endLineNumber, s.endColumn), + text: l + }; + } + }; + aYi = class { + static getEdits(i, e, t, s, n, r) { + if (nYi(e, t, s, n, r)) { + return this.a(i, s, r); + } + } + static a(i, e, t) { + const s = []; + for (let n = 0, r = e.length; n < r; n++) { + const a = e[n].getPosition(); + const l = new Z(a.lineNumber, a.column, a.lineNumber, a.column + 1); + s[n] = new $y(l, t); + } + return new JC(4, s, { + shouldPushStackElementBefore: Lot(i, 4), + shouldPushStackElementAfter: false + }); + } + }; + lYi = class { + static getEdits(i, e, t, s, n) { + if (nYi(i, e, t, s, n)) { + const r = t.map(o => new $y(new Z(o.positionLineNumber, o.positionColumn, o.positionLineNumber, o.positionColumn + 1), "", false)); + return new JC(4, r, { + shouldPushStackElementBefore: true, + shouldPushStackElementAfter: false + }); + } + } + }; + Not = class { + static getEdits(i, e, t, s, n, r) { + if (!r) { + const o = this.getAutoClosingPairClose(i, e, t, s, n); + if (o !== null) { + return this.a(t, s, n, o); + } + } + } + static a(i, e, t, s) { + const n = []; + for (let r = 0, o = i.length; r < o; r++) { + const a = i[r]; + n[r] = new mYi(a, e, !t, s); + } + return new JC(4, n, { + shouldPushStackElementBefore: true, + shouldPushStackElementAfter: false + }); + } + static getAutoClosingPairClose(i, e, t, s, n) { + for (const g of t) { + if (!g.isEmpty()) { + return null; + } + } + const r = t.map(g => { + const p = g.getPosition(); + if (n) { + return { + lineNumber: p.lineNumber, + beforeColumn: p.column - s.length, + afterColumn: p.column + }; + } else { + return { + lineNumber: p.lineNumber, + beforeColumn: p.column, + afterColumn: p.column + }; + } + }); + const o = this.c(i, e, r.map(g => new je(g.lineNumber, g.beforeColumn)), s); + if (!o) { + return null; + } + let a; + let l; + if (m9(s)) { + a = i.autoClosingQuotes; + l = i.shouldAutoCloseBefore.quote; + } else if (i.blockCommentStartToken ? o.open.includes(i.blockCommentStartToken) : false) { + a = i.autoClosingComments; + l = i.shouldAutoCloseBefore.comment; + } else { + a = i.autoClosingBrackets; + l = i.shouldAutoCloseBefore.bracket; + } + if (a === "never") { + return null; + } + const u = this.b(i, o); + const d = u ? u.close : ""; + let h = true; + for (const g of r) { + const { + lineNumber: p, + beforeColumn: b, + afterColumn: v + } = g; + const y = e.getLineContent(p); + const w = y.substring(0, b - 1); + const C = y.substring(v - 1); + if (!C.startsWith(d)) { + h = false; + } + if (C.length > 0) { + const E = C.charAt(0); + if (!this.d(i, C) && !l(E)) { + return null; + } + } + if (o.open.length === 1 && (s === "'" || s === "\"") && a !== "always") { + const E = PT(i.wordSeparators, []); + if (w.length > 0) { + const D = w.charCodeAt(w.length - 1); + if (E.get(D) === 0) { + return null; + } + } + } + if (!e.tokenization.isCheapToTokenize(p)) { + return null; + } + e.tokenization.forceTokenization(p); + const S = e.tokenization.getLineTokens(p); + const x = cj(S, b - 1); + if (!o.shouldAutoClose(x, b - x.firstCharOffset)) { + return null; + } + const k = o.findNeutralCharacter(); + if (k) { + const E = e.tokenization.getTokenTypeIfInsertingCharacter(p, b, k); + if (!o.isOK(E)) { + return null; + } + } + } + if (h) { + return o.close.substring(0, o.close.length - d.length); + } else { + return o.close; + } + } + static b(i, e) { + if (e.open.length <= 1) { + return null; + } + const t = e.close.charAt(e.close.length - 1); + const s = i.autoClosingPairs.autoClosingPairsCloseByEnd.get(t) || []; + let n = null; + for (const r of s) { + if (r.open !== e.open && e.open.includes(r.open) && e.close.endsWith(r.close) && (!n || r.open.length > n.open.length)) { + n = r; + } + } + return n; + } + static c(i, e, t, s) { + const n = i.autoClosingPairs.autoClosingPairsOpenByEnd.get(s); + if (!n) { + return null; + } + let r = null; + for (const o of n) { + if (r === null || o.open.length > r.open.length) { + let a = true; + for (const l of t) { + if (e.getValueInRange(new Z(l.lineNumber, l.column - o.open.length + 1, l.lineNumber, l.column)) + s !== o.open) { + a = false; + break; + } + } + if (a) { + r = o; + } + } + } + return r; + } + static d(i, e) { + const t = e.charAt(0); + const s = i.autoClosingPairs.autoClosingPairsOpenByStart.get(t) || []; + const n = i.autoClosingPairs.autoClosingPairsCloseByStart.get(t) || []; + const r = s.some(a => e.startsWith(a.open)); + const o = n.some(a => e.startsWith(a.close)); + return !r && o; + } + }; + P8t = class { + static getEdits(i, e) { + if (i.inputMode !== "overtype") { + return null; + } + const s = e.map(n => new JGi(n.insertedTextRange)); + return new JC(4, s, { + shouldPushStackElementBefore: true, + shouldPushStackElementAfter: false + }); + } + }; + cYi = class { + static getEdits(i, e, t, s, n) { + if (!n && this.b(i, e, t, s)) { + return this.a(i, t, s); + } + } + static a(i, e, t) { + const s = []; + for (let n = 0, r = e.length; n < r; n++) { + const o = e[n]; + const a = i.surroundingPairs[t]; + s[n] = new QKi(o, t, a); + } + return new JC(0, s, { + shouldPushStackElementBefore: true, + shouldPushStackElementAfter: true + }); + } + static b(i, e, t, s) { + if (!rYi(i, s) || !i.surroundingPairs.hasOwnProperty(s)) { + return false; + } + const n = m9(s); + for (const r of t) { + if (r.isEmpty()) { + return false; + } + let o = true; + for (let a = r.startLineNumber; a <= r.endLineNumber; a++) { + const l = e.getLineContent(a); + const c = a === r.startLineNumber ? r.startColumn - 1 : 0; + const u = a === r.endLineNumber ? r.endColumn - 1 : l.length; + const d = l.substring(c, u); + if (/[^ \t]/.test(d)) { + o = false; + break; + } + } + if (o) { + return false; + } + if (n && r.startLineNumber === r.endLineNumber && r.startColumn + 1 === r.endColumn) { + const a = e.getValueInRange(r); + if (m9(a)) { + return false; + } + } + } + return true; + } + }; + uYi = class { + static getEdits(i, e, t, s, n, r) { + if (!r && this.a(e, t, s)) { + const o = this.b(i, e, t, s[0], n); + if (o) { + return o; + } + } + } + static a(i, e, t) { + return t.length === 1 && !!e.tokenization.isCheapToTokenize(t[0].getEndPosition().lineNumber); + } + static b(i, e, t, s, n) { + if (!e.electricChars.hasOwnProperty(n) || !s.isEmpty()) { + return null; + } + const r = s.getPosition(); + t.tokenization.forceTokenization(r.lineNumber); + const o = t.tokenization.getLineTokens(r.lineNumber); + let a; + try { + a = e.onElectricCharacter(n, o, r.column); + } catch (l) { + xs(l); + return null; + } + if (!a) { + return null; + } + if (a.matchOpenBracket) { + const l = (o.getLineContent() + n).lastIndexOf(a.matchOpenBracket) + 1; + const c = t.bracketPairs.findMatchingBracketUp(a.matchOpenBracket, { + lineNumber: r.lineNumber, + column: l + }, 500); + if (c) { + if (c.startLineNumber === r.lineNumber) { + return null; + } + const u = t.getLineContent(c.startLineNumber); + const d = Jd(u); + const h = e.normalizeIndentation(d); + const g = t.getLineContent(r.lineNumber); + const p = t.getLineFirstNonWhitespaceColumn(r.lineNumber) || r.column; + const b = g.substring(p - 1, r.column - 1); + const v = h + b + n; + const y = new Z(r.lineNumber, 1, r.lineNumber, r.column); + const w = new $y(y, v); + return new JC(T8t(v, i), [w], { + shouldPushStackElementBefore: false, + shouldPushStackElementAfter: true + }); + } + } + return null; + } + }; + dYi = class { + static getEdits(i, e, t, s, n) { + const r = []; + for (let a = 0, l = t.length; a < l; a++) { + const c = i.inputMode === "overtype" && !n ? rot : $y; + r[a] = new c(t[a], s); + } + const o = T8t(s, e); + return new JC(o, r, { + shouldPushStackElementBefore: Lot(e, o), + shouldPushStackElementAfter: false + }); + } + }; + $ge = class { + static getEdits(i, e, t, s, n) { + if (!n && s === ` +`) { + const r = []; + for (let o = 0, a = t.length; o < a; o++) { + r[o] = this.a(i, e, false, t[o]); + } + return new JC(4, r, { + shouldPushStackElementBefore: true, + shouldPushStackElementAfter: false + }); + } + } + static a(i, e, t, s) { + if (i.autoIndent === 0) { + return pj(s, ` +`, t); + } + if (!e.tokenization.isCheapToTokenize(s.getStartPosition().lineNumber) || i.autoIndent === 1) { + const a = e.getLineContent(s.startLineNumber); + const l = Jd(a).substring(0, s.startColumn - 1); + return pj(s, ` +${i.normalizeIndentation(l)}`, t); + } + const n = Oee(i.autoIndent, e, s, i.languageConfigurationService); + if (n) { + if (n.indentAction === bg.None) { + return pj(s, ` +${i.normalizeIndentation(n.indentation + n.appendText)}`, t); + } + if (n.indentAction === bg.Indent) { + return pj(s, ` +${i.normalizeIndentation(n.indentation + n.appendText)}`, t); + } + if (n.indentAction === bg.IndentOutdent) { + const a = i.normalizeIndentation(n.indentation); + const l = i.normalizeIndentation(n.indentation + n.appendText); + const c = ` +${l} +${a}`; + if (t) { + return new yge(s, c, true); + } else { + return new wge(s, c, -1, l.length - a.length, true); + } + } else if (n.indentAction === bg.Outdent) { + const a = Age(i, n.indentation); + return pj(s, ` +${i.normalizeIndentation(a + n.appendText)}`, t); + } + } + const r = e.getLineContent(s.startLineNumber); + const o = Jd(r).substring(0, s.startColumn - 1); + if (i.autoIndent >= 4) { + const a = bjn(i.autoIndent, e, s, { + unshiftIndent: l => Age(i, l), + shiftIndent: l => Rot(i, l), + normalizeIndentation: l => i.normalizeIndentation(l) + }, i.languageConfigurationService); + if (a) { + let l = i.visibleColumnFromColumn(e, s.getEndPosition()); + const c = s.endColumn; + const u = e.getLineContent(s.endLineNumber); + const d = B0(u); + if (d >= 0) { + s = s.setEndPosition(s.endLineNumber, Math.max(s.endColumn, d + 1)); + } else { + s = s.setEndPosition(s.endLineNumber, e.getLineMaxColumn(s.endLineNumber)); + } + if (t) { + return new yge(s, ` +${i.normalizeIndentation(a.afterEnter)}`, true); + } + { + let h = 0; + if (c <= d + 1) { + if (!i.insertSpaces) { + l = Math.ceil(l / i.indentSize); + } + h = Math.min(l + 1 - i.normalizeIndentation(a.afterEnter).length - 1, 0); + } + return new wge(s, ` +${i.normalizeIndentation(a.afterEnter)}`, 0, h, true); + } + } + } + return pj(s, ` +${i.normalizeIndentation(o)}`, t); + } + static lineInsertBefore(i, e, t) { + if (e === null || t === null) { + return []; + } + const s = []; + for (let n = 0, r = t.length; n < r; n++) { + let o = t[n].positionLineNumber; + if (o === 1) { + s[n] = new yge(new Z(1, 1, 1, 1), ` +`); + } else { + o--; + const a = e.getLineMaxColumn(o); + s[n] = this.a(i, e, false, new Z(o, a, o, a)); + } + } + return s; + } + static lineInsertAfter(i, e, t) { + if (e === null || t === null) { + return []; + } + const s = []; + for (let n = 0, r = t.length; n < r; n++) { + const o = t[n].positionLineNumber; + const a = e.getLineMaxColumn(o); + s[n] = this.a(i, e, false, new Z(o, a, o, a)); + } + return s; + } + static lineBreakInsert(i, e, t) { + const s = []; + for (let n = 0, r = t.length; n < r; n++) { + s[n] = this.a(i, e, true, t[n]); + } + return s; + } + }; + hYi = class { + static getEdits(i, e, t, s, n, r) { + const o = this.a(i, t, s, n, r); + if (o) { + t = t.sort(Z.compareRangesUsingStarts); + return this.b(i, e, t, o); + } else { + return this.c(i, e, t, s, n); + } + } + static a(i, e, t, s, n) { + if (s || e.length === 1) { + return null; + } + if (n && n.length === e.length) { + return n; + } + if (i.multiCursorPaste === "spread") { + if (t.charCodeAt(t.length - 1) === 10) { + t = t.substring(0, t.length - 1); + } + if (t.charCodeAt(t.length - 1) === 13) { + t = t.substring(0, t.length - 1); + } + const r = Ov(t); + if (r.length === e.length) { + return r; + } + } + return null; + } + static b(i, e, t, s) { + const n = []; + for (let r = 0, o = t.length; r < o; r++) { + const l = i.overtypeOnPaste && i.inputMode === "overtype" ? rot : $y; + n[r] = new l(t[r], s[r]); + } + return new JC(0, n, { + shouldPushStackElementBefore: true, + shouldPushStackElementAfter: true + }); + } + static c(i, e, t, s, n) { + const r = []; + for (let o = 0, a = t.length; o < a; o++) { + const l = t[o]; + const c = l.getPosition(); + if (n && !l.isEmpty()) { + n = false; + } + if (n && s.indexOf(` +`) !== s.length - 1) { + n = false; + } + if (n) { + const u = new Z(c.lineNumber, 1, c.lineNumber, 1); + r[o] = new oot(u, s, l, true); + } else { + const d = i.overtypeOnPaste && i.inputMode === "overtype" ? rot : $y; + r[o] = new d(l, s); + } + } + return new JC(0, r, { + shouldPushStackElementBefore: true, + shouldPushStackElementAfter: true + }); + } + }; + fYi = class { + static getEdits(i, e, t, s, n, r, o, a) { + const l = s.map(c => this.a(t, c, n, r, o, a)); + return new JC(4, l, { + shouldPushStackElementBefore: Lot(i, 4), + shouldPushStackElementAfter: false + }); + } + static a(i, e, t, s, n, r) { + if (!e.isEmpty()) { + return null; + } + const o = e.getPosition(); + const a = Math.max(1, o.column - s); + const l = Math.min(i.getLineMaxColumn(o.lineNumber), o.column + n); + const c = new Z(o.lineNumber, a, o.lineNumber, l); + return new wge(c, t, 0, r); + } + }; + gYi = class { + static getEdits(i, e, t) { + const s = []; + for (let r = 0, o = e.length; r < o; r++) { + s[r] = new $y(e[r], t); + } + const n = T8t(t, i); + return new JC(n, s, { + shouldPushStackElementBefore: Lot(i, n), + shouldPushStackElementAfter: false + }); + } + }; + pYi = class { + static getCommands(i, e, t) { + const s = []; + for (let n = 0, r = t.length; n < r; n++) { + const o = t[n]; + if (o.isEmpty()) { + const a = e.getLineContent(o.startLineNumber); + if (/^\s*$/.test(a) && e.tokenization.isCheapToTokenize(o.startLineNumber)) { + let l = this.a(i, e, o.startLineNumber); + l = l || "\t"; + const c = i.normalizeIndentation(l); + if (!a.startsWith(c)) { + s[n] = new $y(new Z(o.startLineNumber, 1, o.startLineNumber, a.length + 1), c, true); + continue; + } + } + s[n] = this.b(i, e, o, true); + } else { + if (o.startLineNumber === o.endLineNumber) { + const a = e.getLineMaxColumn(o.startLineNumber); + if (o.startColumn !== 1 || o.endColumn !== a) { + s[n] = this.b(i, e, o, false); + continue; + } + } + s[n] = new EI(o, { + isUnshift: false, + tabSize: i.tabSize, + indentSize: i.indentSize, + insertSpaces: i.insertSpaces, + useTabStops: i.useTabStops, + autoIndent: i.autoIndent + }, i.languageConfigurationService); + } + } + return s; + } + static a(i, e, t) { + let s = null; + let n = ""; + const r = Nge(i.autoIndent, e, t, false, i.languageConfigurationService); + if (r) { + s = r.action; + n = r.indentation; + } else if (t > 1) { + let o; + for (o = t - 1; o >= 1; o--) { + const c = e.getLineContent(o); + if (TL(c) >= 0) { + break; + } + } + if (o < 1) { + return null; + } + const a = e.getLineMaxColumn(o); + const l = Oee(i.autoIndent, e, new Z(o, a, o, a), i.languageConfigurationService); + if (l) { + n = l.indentation + l.appendText; + } + } + if (s) { + if (s === bg.Indent) { + n = Rot(i, n); + } + if (s === bg.Outdent) { + n = Age(i, n); + } + n = i.normalizeIndentation(n); + } + return n || null; + } + static b(i, e, t, s) { + let n = ""; + const r = t.getStartPosition(); + if (i.insertSpaces) { + const o = i.visibleColumnFromColumn(e, r); + const a = i.indentSize; + const l = a - o % a; + for (let c = 0; c < l; c++) { + n += " "; + } + } else { + n = "\t"; + } + return new $y(t, n, s); + } + }; + Mot = class extends wge { + constructor(i, e, t, s, n, r) { + super(i, e, t, s); + this.f = n; + this.g = r; + this.closeCharacterRange = null; + this.enclosingRange = null; + } + h(i, e, t) { + this.closeCharacterRange = new Z(e.startLineNumber, e.endColumn - this.g.length, e.endLineNumber, e.endColumn); + this.enclosingRange = new Z(e.startLineNumber, e.endColumn - this.f.length - this.g.length, e.endLineNumber, e.endColumn); + return super.computeCursorState(i, t); + } + }; + mYi = class extends Mot { + constructor(i, e, t, s) { + const n = (t ? e : "") + s; + const r = 0; + const o = -s.length; + super(i, n, r, o, e, s); + } + computeCursorState(i, e) { + const s = e.getInverseEditOperations()[0].range; + return this.h(i, s, e); + } + }; + bYi = class extends Mot { + constructor(i, e, t, s) { + const n = t + s; + const r = 0; + const o = t.length; + super(e, n, r, o, t, s); + this.k = i; + this.l = { + range: e, + text: n + }; + } + getEditOperations(i, e) { + e.addTrackedEditOperation(this.k.range, this.k.text); + e.addTrackedEditOperation(this.l.range, this.l.text); + } + computeCursorState(i, e) { + const t = e.getInverseEditOperations(); + if (t.length !== 2) { + throw new Error("There should be two inverse edit operations!"); + } + const s = t[0].range; + const n = t[1].range; + const r = s.plusRange(n); + return this.h(i, r, e); + } + }; + } +}); +var sF; +var vYi; +var $ot = ue({ + "out-build/vs/editor/common/cursor/cursorTypeOperations.js"() { + "use strict"; + + Rge(); + eYi(); + kI(); + Aot(); + sF = class { + static indent(i, e, t) { + if (e === null || t === null) { + return []; + } + const s = []; + for (let n = 0, r = t.length; n < r; n++) { + s[n] = new EI(t[n], { + isUnshift: false, + tabSize: i.tabSize, + indentSize: i.indentSize, + insertSpaces: i.insertSpaces, + useTabStops: i.useTabStops, + autoIndent: i.autoIndent + }, i.languageConfigurationService); + } + return s; + } + static outdent(i, e, t) { + const s = []; + for (let n = 0, r = t.length; n < r; n++) { + s[n] = new EI(t[n], { + isUnshift: true, + tabSize: i.tabSize, + indentSize: i.indentSize, + insertSpaces: i.insertSpaces, + useTabStops: i.useTabStops, + autoIndent: i.autoIndent + }, i.languageConfigurationService); + } + return s; + } + static shiftIndent(i, e, t) { + return Rot(i, e, t); + } + static unshiftIndent(i, e, t) { + return Age(i, e, t); + } + static paste(i, e, t, s, n, r) { + return hYi.getEdits(i, e, t, s, n, r); + } + static tab(i, e, t) { + return pYi.getCommands(i, e, t); + } + static compositionType(i, e, t, s, n, r, o, a) { + return fYi.getEdits(i, e, t, s, n, r, o, a); + } + static compositionEndWithInterceptors(i, e, t, s, n, r) { + if (!s) { + return null; + } + let o = null; + for (const d of s) { + if (o === null) { + o = d.insertedText; + } else if (o !== d.insertedText) { + return null; + } + } + if (!o || o.length !== 1) { + return P8t.getEdits(e, s); + } + const a = o; + let l = false; + for (const d of s) { + if (d.deletedText.length !== 0) { + l = true; + break; + } + } + if (l) { + if (!rYi(e, a) || !e.surroundingPairs.hasOwnProperty(a)) { + return null; + } + const d = m9(a); + for (const p of s) { + if (p.deletedSelectionStart !== 0 || p.deletedSelectionEnd !== p.deletedText.length || /^[ \t]+$/.test(p.deletedText) || d && m9(p.deletedText)) { + return null; + } + } + const h = []; + for (const p of n) { + if (!p.isEmpty()) { + return null; + } + h.push(p.getPosition()); + } + if (h.length !== s.length) { + return null; + } + const g = []; + for (let p = 0, b = h.length; p < b; p++) { + g.push(new ZKi(h[p], s[p].deletedText, e.surroundingPairs[a])); + } + return new JC(4, g, { + shouldPushStackElementBefore: true, + shouldPushStackElementAfter: false + }); + } + const c = lYi.getEdits(e, t, n, r, a); + if (c !== undefined) { + return c; + } + const u = Not.getEdits(e, t, n, a, true, false); + if (u !== undefined) { + return u; + } else { + return P8t.getEdits(e, s); + } + } + static typeWithInterceptors(i, e, t, s, n, r, o) { + const a = $ge.getEdits(t, s, n, o, i); + if (a !== undefined) { + return a; + } + const l = oYi.getEdits(t, s, n, o, i); + if (l !== undefined) { + return l; + } + const c = aYi.getEdits(e, t, s, n, r, o); + if (c !== undefined) { + return c; + } + const u = Not.getEdits(t, s, n, o, false, i); + if (u !== undefined) { + return u; + } + const d = cYi.getEdits(t, s, n, o, i); + if (d !== undefined) { + return d; + } + const h = uYi.getEdits(e, t, s, n, o, i); + if (h !== undefined) { + return h; + } else { + return dYi.getEdits(t, e, n, o, i); + } + } + static typeWithoutInterceptors(i, e, t, s, n) { + return gYi.getEdits(i, s, n); + } + }; + vYi = class { + constructor(i, e, t, s, n, r, o) { + this.deletedText = i; + this.deletedSelectionStart = e; + this.deletedSelectionEnd = t; + this.insertedText = s; + this.insertedSelectionStart = n; + this.insertedSelectionEnd = r; + this.insertedTextRange = o; + } + }; + } +}); +var ke; +var Sr = ue({ + "out-build/vs/editor/common/editorContextKeys.js"() { + "use strict"; + + X(); + Ee(); + (function (i) { + i.editorSimpleInput = new fe("editorSimpleInput", false, true); + i.editorTextFocus = new fe("editorTextFocus", false, f(758, null)); + i.editorHasPromptBar = new fe("editorHasPromptBar", false, f(759, null)); + i.editorPromptBarFocused = new fe("editorPromptBarFocused", false, f(760, null)); + i.focus = new fe("editorFocus", false, f(761, null)); + i.textInputFocus = new fe("textInputFocus", false, f(762, null)); + i.readOnly = new fe("editorReadonly", false, f(763, null)); + i.inDiffEditor = new fe("inDiffEditor", false, f(764, null)); + i.isEmbeddedDiffEditor = new fe("isEmbeddedDiffEditor", false, f(765, null)); + i.multiDiffEditorAllCollapsed = new fe("multiDiffEditorAllCollapsed", undefined, f(766, null)); + i.hasChanges = new fe("diffEditorHasChanges", false, f(767, null)); + i.comparingMovedCode = new fe("comparingMovedCode", false, f(768, null)); + i.accessibleDiffViewerVisible = new fe("accessibleDiffViewerVisible", false, f(769, null)); + i.diffEditorRenderSideBySideInlineBreakpointReached = new fe("diffEditorRenderSideBySideInlineBreakpointReached", false, f(770, null)); + i.diffEditorInlineMode = new fe("diffEditorInlineMode", false, f(771, null)); + i.diffEditorOriginalWritable = new fe("diffEditorOriginalWritable", false, f(772, null)); + i.diffEditorModifiedWritable = new fe("diffEditorModifiedWritable", false, f(773, null)); + i.diffEditorOriginalUri = new fe("diffEditorOriginalUri", "", f(774, null)); + i.diffEditorModifiedUri = new fe("diffEditorModifiedUri", "", f(775, null)); + i.columnSelection = new fe("editorColumnSelection", false, f(776, null)); + i.writable = i.readOnly.toNegated(); + i.hasNonEmptySelection = new fe("editorHasSelection", false, f(777, null)); + i.hasOnlyEmptySelection = i.hasNonEmptySelection.toNegated(); + i.hasMultipleSelections = new fe("editorHasMultipleSelections", false, f(778, null)); + i.hasSingleSelection = i.hasMultipleSelections.toNegated(); + i.tabMovesFocus = new fe("editorTabMovesFocus", false, f(779, null)); + i.tabDoesNotMoveFocus = i.tabMovesFocus.toNegated(); + i.isInEmbeddedEditor = new fe("isInEmbeddedEditor", false, true); + i.canUndo = new fe("canUndo", false, true); + i.canRedo = new fe("canRedo", false, true); + i.hoverVisible = new fe("editorHoverVisible", false, f(780, null)); + i.hoverFocused = new fe("editorHoverFocused", false, f(781, null)); + i.stickyScrollFocused = new fe("stickyScrollFocused", false, f(782, null)); + i.stickyScrollVisible = new fe("stickyScrollVisible", false, f(783, null)); + i.standaloneColorPickerVisible = new fe("standaloneColorPickerVisible", false, f(784, null)); + i.standaloneColorPickerFocused = new fe("standaloneColorPickerFocused", false, f(785, null)); + i.inCompositeEditor = new fe("inCompositeEditor", undefined, f(786, null)); + i.notInCompositeEditor = i.inCompositeEditor.toNegated(); + i.languageId = new fe("editorLangId", "", f(787, null)); + i.hasCompletionItemProvider = new fe("editorHasCompletionItemProvider", false, f(788, null)); + i.hasCodeActionsProvider = new fe("editorHasCodeActionsProvider", false, f(789, null)); + i.hasCodeLensProvider = new fe("editorHasCodeLensProvider", false, f(790, null)); + i.hasDefinitionProvider = new fe("editorHasDefinitionProvider", false, f(791, null)); + i.hasDeclarationProvider = new fe("editorHasDeclarationProvider", false, f(792, null)); + i.hasImplementationProvider = new fe("editorHasImplementationProvider", false, f(793, null)); + i.hasTypeDefinitionProvider = new fe("editorHasTypeDefinitionProvider", false, f(794, null)); + i.hasHoverProvider = new fe("editorHasHoverProvider", false, f(795, null)); + i.hasDocumentHighlightProvider = new fe("editorHasDocumentHighlightProvider", false, f(796, null)); + i.hasDocumentSymbolProvider = new fe("editorHasDocumentSymbolProvider", false, f(797, null)); + i.hasReferenceProvider = new fe("editorHasReferenceProvider", false, f(798, null)); + i.hasRenameProvider = new fe("editorHasRenameProvider", false, f(799, null)); + i.hasSignatureHelpProvider = new fe("editorHasSignatureHelpProvider", false, f(800, null)); + i.hasInlayHintsProvider = new fe("editorHasInlayHintsProvider", false, f(801, null)); + i.hasDocumentFormattingProvider = new fe("editorHasDocumentFormattingProvider", false, f(802, null)); + i.hasDocumentSelectionFormattingProvider = new fe("editorHasDocumentSelectionFormattingProvider", false, f(803, null)); + i.hasMultipleDocumentFormattingProvider = new fe("editorHasMultipleDocumentFormattingProvider", false, f(804, null)); + i.hasMultipleDocumentSelectionFormattingProvider = new fe("editorHasMultipleDocumentSelectionFormattingProvider", false, f(805, null)); + i.hasDisplayedDiff = new fe("hasDisplayedDiff", false, "Whether the editor has pending edits."); + i.hasActivelyGeneratingDiff = new fe("hasActivelyGeneratingDiff", false, "Whether the editor is currently generating an edit."); + i.hasFastCopilotDiffSuggestion = new fe("hasFastCopilotDiffSuggestion", false, "Whether the editor is currently showing a fast copilot diff suggestion."); + i.hasActivelyGeneratingPromptBarDiff = new fe("hasActivelyGeneratingPromptBarDiff", false, "Whether the editor is currently generating an edit/generation with the inline prompt bar."); + i.hasDisplayedSimpleDiff = new fe("hasDisplayedSimpleDiff", false, "Whether the editor has pending edits."); + i.hasGPT4InlineCompletion = new fe("hasGPT4Diff", false, "Whether the editor is showing a gpt-4 supercompletion"); + i.hasGPT4ActivelyGenerating = new fe("hadGPT4InlineCompletionRunning", false, "Whether the editor had a gpt-4 supercompletion running"); + })(ke ||= {}); + } +}); +function _ee(i, e) { + Ci.registerKeybindingRule({ + id: i, + primary: e, + when: CYi, + weight: eu + 1 + }); +} +function yYi(i) { + i.register(); + return i; +} +function mj(i, e) { + yYi(new L8t("default:" + i, i)); + yYi(new L8t(i, i, e)); +} +var eu; +var vg; +var Nw; +var Bee; +var Fot; +var wYi; +var pb; +var CYi; +var nF; +var L8t; +var S9 = ue({ + "out-build/vs/editor/browser/coreCommands.js"() { + "use strict"; + + X(); + hc(); + zt(); + wc(); + en(); + Xn(); + Fqn(); + kI(); + cot(); + o8t(); + $ot(); + Rs(); + yt(); + Sr(); + Ee(); + Wu(); + xe(); + Aot(); + eu = 0; + vg = class extends Wm { + runEditorCommand(i, e, t) { + const s = e._getViewModel(); + if (s) { + this.runCoreEditorCommand(s, t || {}); + } + } + }; + (function (i) { + const e = function (r) { + if (!xo(r)) { + return false; + } + const o = r; + return !!yi(o.to) && (!!qo(o.by) || !!yi(o.by)) && (!!qo(o.value) || !!Od(o.value)) && (!!qo(o.revealCursor) || !!df(o.revealCursor)); + }; + i.metadata = { + description: "Scroll editor in the given direction", + args: [{ + name: "Editor scroll argument object", + description: "Property-value pairs that can be passed through this argument:\n\t\t\t\t\t* 'to': A mandatory direction value.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'up', 'down'\n\t\t\t\t\t\t```\n\t\t\t\t\t* 'by': Unit to move. Default is computed based on 'to' value.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'line', 'wrappedLine', 'page', 'halfPage', 'editor'\n\t\t\t\t\t\t```\n\t\t\t\t\t* 'value': Number of units to move. Default is '1'.\n\t\t\t\t\t* 'revealCursor': If 'true' reveals the cursor if it is outside view port.\n\t\t\t\t", + constraint: e, + schema: { + type: "object", + required: ["to"], + properties: { + to: { + type: "string", + enum: ["up", "down"] + }, + by: { + type: "string", + enum: ["line", "wrappedLine", "page", "halfPage", "editor"] + }, + value: { + type: "number", + default: 1 + }, + revealCursor: { + type: "boolean" + } + } + } + }] + }; + i.RawDirection = { + Up: "up", + Right: "right", + Down: "down", + Left: "left" + }; + i.RawUnit = { + Line: "line", + WrappedLine: "wrappedLine", + Page: "page", + HalfPage: "halfPage", + Editor: "editor", + Column: "column" + }; + function t(r) { + let o; + switch (r.to) { + case i.RawDirection.Up: + o = 1; + break; + case i.RawDirection.Right: + o = 2; + break; + case i.RawDirection.Down: + o = 3; + break; + case i.RawDirection.Left: + o = 4; + break; + default: + return null; + } + let a; + switch (r.by) { + case i.RawUnit.Line: + a = 1; + break; + case i.RawUnit.WrappedLine: + a = 2; + break; + case i.RawUnit.Page: + a = 3; + break; + case i.RawUnit.HalfPage: + a = 4; + break; + case i.RawUnit.Editor: + a = 5; + break; + case i.RawUnit.Column: + a = 6; + break; + default: + a = 2; + } + const l = Math.floor(r.value || 1); + const c = !!r.revealCursor; + return { + direction: o, + unit: a, + value: l, + revealCursor: c, + select: !!r.select + }; + } + i.parse = t; + let s; + (function (r) { + r[r.Up = 1] = "Up"; + r[r.Right = 2] = "Right"; + r[r.Down = 3] = "Down"; + r[r.Left = 4] = "Left"; + })(s = i.Direction ||= {}); + let n; + (function (r) { + r[r.Line = 1] = "Line"; + r[r.WrappedLine = 2] = "WrappedLine"; + r[r.Page = 3] = "Page"; + r[r.HalfPage = 4] = "HalfPage"; + r[r.Editor = 5] = "Editor"; + r[r.Column = 6] = "Column"; + })(n = i.Unit ||= {}); + })(Nw ||= {}); + (function (i) { + const e = function (t) { + if (!xo(t)) { + return false; + } + const s = t; + return (!!Od(s.lineNumber) || !!yi(s.lineNumber)) && (!!qo(s.at) || !!yi(s.at)); + }; + i.metadata = { + description: "Reveal the given line at the given logical position", + args: [{ + name: "Reveal line argument object", + description: "Property-value pairs that can be passed through this argument:\n\t\t\t\t\t* 'lineNumber': A mandatory line number value.\n\t\t\t\t\t* 'at': Logical position at which line has to be revealed.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'top', 'center', 'bottom'\n\t\t\t\t\t\t```\n\t\t\t\t", + constraint: e, + schema: { + type: "object", + required: ["lineNumber"], + properties: { + lineNumber: { + type: ["number", "string"] + }, + at: { + type: "string", + enum: ["top", "center", "bottom"] + } + } + } + }] + }; + i.RawAtArgument = { + Top: "top", + Center: "center", + Bottom: "bottom" + }; + })(Bee ||= {}); + Fot = class { + constructor(i) { + i.addImplementation(10000, "code-editor", (e, t) => { + const s = e.get(ps).getFocusedCodeEditor(); + if (s && s.hasTextFocus()) { + return this._runEditorCommand(e, s, t); + } else { + return false; + } + }); + i.addImplementation(1000, "generic-dom-input-textarea", (e, t) => { + const s = Tu(); + if (s && ZS(s)) { + this.runDOMCommand(s); + return true; + } else { + return false; + } + }); + i.addImplementation(0, "generic-dom", (e, t) => { + const s = e.get(ps).getActiveCodeEditor(); + if (s) { + s.focus(); + return this._runEditorCommand(e, s, t); + } else { + return false; + } + }); + } + _runEditorCommand(i, e, t) { + const s = this.runEditorCommand(i, e, t); + return s || true; + } + }; + (function (i) { + i[i.Regular = 0] = "Regular"; + i[i.Minimal = 1] = "Minimal"; + i[i.None = 2] = "None"; + })(wYi ||= {}); + (function (i) { + class e extends vg { + constructor(C) { + super(C); + this.d = C.inSelectionMode; + } + runCoreEditorCommand(C, S) { + if (!S.position) { + return; + } + C.model.pushStackElement(); + if (C.setCursorStates(S.source, 3, [Vv.moveTo(C, C.getPrimaryCursorState(), this.d, S.position, S.viewPosition)]) && S.revealType !== 2) { + C.revealAllCursors(S.source, true, true); + } + } + } + i.MoveTo = Sn(new e({ + id: "_moveTo", + inSelectionMode: false, + precondition: undefined + })); + i.MoveToSelect = Sn(new e({ + id: "_moveToSelect", + inSelectionMode: true, + precondition: undefined + })); + class t extends vg { + runCoreEditorCommand(C, S) { + C.model.pushStackElement(); + const x = this.d(C, C.getPrimaryCursorState(), C.getCursorColumnSelectData(), S); + if (x !== null) { + C.setCursorStates(S.source, 3, x.viewStates.map(k => fc.fromViewState(k))); + C.setCursorColumnSelectData({ + isReal: true, + fromViewLineNumber: x.fromLineNumber, + fromViewVisualColumn: x.fromVisualColumn, + toViewLineNumber: x.toLineNumber, + toViewVisualColumn: x.toVisualColumn + }); + if (x.reversed) { + C.revealTopMostCursor(S.source); + } else { + C.revealBottomMostCursor(S.source); + } + } + } + } + i.ColumnSelect = Sn(new class extends t { + constructor() { + super({ + id: "columnSelect", + precondition: undefined + }); + } + d(w, C, S, x) { + if (typeof x.position === "undefined" || typeof x.viewPosition === "undefined" || typeof x.mouseColumn === "undefined") { + return null; + } + const k = w.model.validatePosition(x.position); + const E = w.coordinatesConverter.validateViewPosition(new je(x.viewPosition.lineNumber, x.viewPosition.column), k); + const D = x.doColumnSelect ? S.fromViewLineNumber : E.lineNumber; + const P = x.doColumnSelect ? S.fromViewVisualColumn : x.mouseColumn - 1; + return Dee.columnSelect(w.cursorConfig, w, D, P, E.lineNumber, x.mouseColumn - 1); + } + }()); + i.CursorColumnSelectLeft = Sn(new class extends t { + constructor() { + super({ + id: "cursorColumnSelectLeft", + precondition: undefined, + kbOpts: { + weight: eu, + kbExpr: ke.textInputFocus, + primary: 3599, + linux: { + primary: 0 + } + } + }); + } + d(w, C, S, x) { + return Dee.columnSelectLeft(w.cursorConfig, w, S); + } + }()); + i.CursorColumnSelectRight = Sn(new class extends t { + constructor() { + super({ + id: "cursorColumnSelectRight", + precondition: undefined, + kbOpts: { + weight: eu, + kbExpr: ke.textInputFocus, + primary: 3601, + linux: { + primary: 0 + } + } + }); + } + d(w, C, S, x) { + return Dee.columnSelectRight(w.cursorConfig, w, S); + } + }()); + class s extends t { + constructor(C) { + super(C); + this.e = C.isPaged; + } + d(C, S, x, k) { + return Dee.columnSelectUp(C.cursorConfig, C, x, this.e); + } + } + i.CursorColumnSelectUp = Sn(new s({ + isPaged: false, + id: "cursorColumnSelectUp", + precondition: undefined, + kbOpts: { + weight: eu, + kbExpr: ke.textInputFocus, + primary: 3600, + linux: { + primary: 0 + } + } + })); + i.CursorColumnSelectPageUp = Sn(new s({ + isPaged: true, + id: "cursorColumnSelectPageUp", + precondition: undefined, + kbOpts: { + weight: eu, + kbExpr: ke.textInputFocus, + primary: 3595, + linux: { + primary: 0 + } + } + })); + class n extends t { + constructor(C) { + super(C); + this.e = C.isPaged; + } + d(C, S, x, k) { + return Dee.columnSelectDown(C.cursorConfig, C, x, this.e); + } + } + i.CursorColumnSelectDown = Sn(new n({ + isPaged: false, + id: "cursorColumnSelectDown", + precondition: undefined, + kbOpts: { + weight: eu, + kbExpr: ke.textInputFocus, + primary: 3602, + linux: { + primary: 0 + } + } + })); + i.CursorColumnSelectPageDown = Sn(new n({ + isPaged: true, + id: "cursorColumnSelectPageDown", + precondition: undefined, + kbOpts: { + weight: eu, + kbExpr: ke.textInputFocus, + primary: 3596, + linux: { + primary: 0 + } + } + })); + class r extends vg { + constructor() { + super({ + id: "cursorMove", + precondition: undefined, + metadata: got.metadata + }); + } + runCoreEditorCommand(C, S) { + const x = got.parse(S); + if (x) { + this.d(C, S.source, x); + } + } + d(C, S, x) { + C.model.pushStackElement(); + C.setCursorStates(S, 3, r.e(C, C.getCursorStates(), x)); + C.revealAllCursors(S, true); + } + static e(C, S, x) { + const k = x.select; + const E = x.value; + switch (x.direction) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + return Vv.simpleMove(C, S, x.direction, k, E, x.unit); + case 11: + case 13: + case 12: + case 14: + return Vv.viewportMove(C, S, x.direction, k, E); + default: + return null; + } + } + } + i.CursorMoveImpl = r; + i.CursorMove = Sn(new r()); + let o; + (function (w) { + w[w.PAGE_SIZE_MARKER = -1] = "PAGE_SIZE_MARKER"; + })(o ||= {}); + class a extends vg { + constructor(C) { + super(C); + this.d = C.args; + } + runCoreEditorCommand(C, S) { + let x = this.d; + if (this.d.value === -1) { + x = { + direction: this.d.direction, + unit: this.d.unit, + select: this.d.select, + value: S.pageSize || C.cursorConfig.pageSize + }; + } + C.model.pushStackElement(); + C.setCursorStates(S.source, 3, Vv.simpleMove(C, C.getCursorStates(), x.direction, x.select, x.value, x.unit)); + C.revealAllCursors(S.source, true); + } + } + i.CursorLeft = Sn(new a({ + args: { + direction: 0, + unit: 0, + select: false, + value: 1 + }, + id: "cursorLeft", + precondition: undefined, + kbOpts: { + weight: eu, + kbExpr: ke.textInputFocus, + primary: 15, + mac: { + primary: 15, + secondary: [288] + } + } + })); + i.CursorLeftSelect = Sn(new a({ + args: { + direction: 0, + unit: 0, + select: true, + value: 1 + }, + id: "cursorLeftSelect", + precondition: undefined, + kbOpts: { + weight: eu, + kbExpr: ke.textInputFocus, + primary: 1039 + } + })); + i.CursorRight = Sn(new a({ + args: { + direction: 1, + unit: 0, + select: false, + value: 1 + }, + id: "cursorRight", + precondition: undefined, + kbOpts: { + weight: eu, + kbExpr: ke.textInputFocus, + primary: 17, + mac: { + primary: 17, + secondary: [292] + } + } + })); + i.CursorRightSelect = Sn(new a({ + args: { + direction: 1, + unit: 0, + select: true, + value: 1 + }, + id: "cursorRightSelect", + precondition: undefined, + kbOpts: { + weight: eu, + kbExpr: ke.textInputFocus, + primary: 1041 + } + })); + i.CursorUp = Sn(new a({ + args: { + direction: 2, + unit: 2, + select: false, + value: 1 + }, + id: "cursorUp", + precondition: undefined, + kbOpts: { + weight: eu, + kbExpr: ke.textInputFocus, + primary: 16, + mac: { + primary: 16, + secondary: [302] + } + } + })); + i.CursorUpSelect = Sn(new a({ + args: { + direction: 2, + unit: 2, + select: true, + value: 1 + }, + id: "cursorUpSelect", + precondition: undefined, + kbOpts: { + weight: eu, + kbExpr: ke.textInputFocus, + primary: 1040, + secondary: [3088], + mac: { + primary: 1040 + }, + linux: { + primary: 1040 + } + } + })); + i.CursorPageUp = Sn(new a({ + args: { + direction: 2, + unit: 2, + select: false, + value: -1 + }, + id: "cursorPageUp", + precondition: undefined, + kbOpts: { + weight: eu, + kbExpr: ke.textInputFocus, + primary: 11 + } + })); + i.CursorPageUpSelect = Sn(new a({ + args: { + direction: 2, + unit: 2, + select: true, + value: -1 + }, + id: "cursorPageUpSelect", + precondition: undefined, + kbOpts: { + weight: eu, + kbExpr: ke.textInputFocus, + primary: 1035 + } + })); + i.CursorDown = Sn(new a({ + args: { + direction: 3, + unit: 2, + select: false, + value: 1 + }, + id: "cursorDown", + precondition: undefined, + kbOpts: { + weight: eu, + kbExpr: ke.textInputFocus, + primary: 18, + mac: { + primary: 18, + secondary: [300] + } + } + })); + i.CursorDownSelect = Sn(new a({ + args: { + direction: 3, + unit: 2, + select: true, + value: 1 + }, + id: "cursorDownSelect", + precondition: undefined, + kbOpts: { + weight: eu, + kbExpr: ke.textInputFocus, + primary: 1042, + secondary: [3090], + mac: { + primary: 1042 + }, + linux: { + primary: 1042 + } + } + })); + i.CursorPageDown = Sn(new a({ + args: { + direction: 3, + unit: 2, + select: false, + value: -1 + }, + id: "cursorPageDown", + precondition: undefined, + kbOpts: { + weight: eu, + kbExpr: ke.textInputFocus, + primary: 12 + } + })); + i.CursorPageDownSelect = Sn(new a({ + args: { + direction: 3, + unit: 2, + select: true, + value: -1 + }, + id: "cursorPageDownSelect", + precondition: undefined, + kbOpts: { + weight: eu, + kbExpr: ke.textInputFocus, + primary: 1036 + } + })); + i.CreateCursor = Sn(new class extends vg { + constructor() { + super({ + id: "createCursor", + precondition: undefined + }); + } + runCoreEditorCommand(w, C) { + if (!C.position) { + return; + } + let S; + if (C.wholeLine) { + S = Vv.line(w, w.getPrimaryCursorState(), false, C.position, C.viewPosition); + } else { + S = Vv.moveTo(w, w.getPrimaryCursorState(), false, C.position, C.viewPosition); + } + const x = w.getCursorStates(); + if (x.length > 1) { + const k = S.modelState ? S.modelState.position : null; + const E = S.viewState ? S.viewState.position : null; + for (let D = 0, P = x.length; D < P; D++) { + const R = x[D]; + if ((!k || !!R.modelState.selection.containsPosition(k)) && (!E || !!R.viewState.selection.containsPosition(E))) { + x.splice(D, 1); + w.model.pushStackElement(); + w.setCursorStates(C.source, 3, x); + return; + } + } + } + x.push(S); + w.model.pushStackElement(); + w.setCursorStates(C.source, 3, x); + } + }()); + i.LastCursorMoveToSelect = Sn(new class extends vg { + constructor() { + super({ + id: "_lastCursorMoveToSelect", + precondition: undefined + }); + } + runCoreEditorCommand(w, C) { + if (!C.position) { + return; + } + const S = w.getLastAddedCursorIndex(); + const x = w.getCursorStates(); + const k = x.slice(0); + k[S] = Vv.moveTo(w, x[S], true, C.position, C.viewPosition); + w.model.pushStackElement(); + w.setCursorStates(C.source, 3, k); + } + }()); + class l extends vg { + constructor(C) { + super(C); + this.d = C.inSelectionMode; + } + runCoreEditorCommand(C, S) { + C.model.pushStackElement(); + C.setCursorStates(S.source, 3, Vv.moveToBeginningOfLine(C, C.getCursorStates(), this.d)); + C.revealAllCursors(S.source, true); + } + } + i.CursorHome = Sn(new l({ + inSelectionMode: false, + id: "cursorHome", + precondition: undefined, + kbOpts: { + weight: eu, + kbExpr: ke.textInputFocus, + primary: 14, + mac: { + primary: 14, + secondary: [2063] + } + } + })); + i.CursorHomeSelect = Sn(new l({ + inSelectionMode: true, + id: "cursorHomeSelect", + precondition: undefined, + kbOpts: { + weight: eu, + kbExpr: ke.textInputFocus, + primary: 1038, + mac: { + primary: 1038, + secondary: [3087] + } + } + })); + class c extends vg { + constructor(C) { + super(C); + this.d = C.inSelectionMode; + } + runCoreEditorCommand(C, S) { + C.model.pushStackElement(); + C.setCursorStates(S.source, 3, this.e(C.getCursorStates())); + C.revealAllCursors(S.source, true); + } + e(C) { + const S = []; + for (let x = 0, k = C.length; x < k; x++) { + const E = C[x]; + const D = E.modelState.position.lineNumber; + S[x] = fc.fromModelState(E.modelState.move(this.d, D, 1, 0)); + } + return S; + } + } + i.CursorLineStart = Sn(new c({ + inSelectionMode: false, + id: "cursorLineStart", + precondition: undefined, + kbOpts: { + weight: eu, + kbExpr: ke.textInputFocus, + primary: 0, + mac: { + primary: 287 + } + } + })); + i.CursorLineStartSelect = Sn(new c({ + inSelectionMode: true, + id: "cursorLineStartSelect", + precondition: undefined, + kbOpts: { + weight: eu, + kbExpr: ke.textInputFocus, + primary: 0, + mac: { + primary: 1311 + } + } + })); + class u extends vg { + constructor(C) { + super(C); + this.d = C.inSelectionMode; + } + runCoreEditorCommand(C, S) { + C.model.pushStackElement(); + C.setCursorStates(S.source, 3, Vv.moveToEndOfLine(C, C.getCursorStates(), this.d, S.sticky || false)); + C.revealAllCursors(S.source, true); + } + } + i.CursorEnd = Sn(new u({ + inSelectionMode: false, + id: "cursorEnd", + precondition: undefined, + kbOpts: { + args: { + sticky: false + }, + weight: eu, + kbExpr: ke.textInputFocus, + primary: 13, + mac: { + primary: 13, + secondary: [2065] + } + }, + metadata: { + description: "Go to End", + args: [{ + name: "args", + schema: { + type: "object", + properties: { + sticky: { + description: f(182, null), + type: "boolean", + default: false + } + } + } + }] + } + })); + i.CursorEndSelect = Sn(new u({ + inSelectionMode: true, + id: "cursorEndSelect", + precondition: undefined, + kbOpts: { + args: { + sticky: false + }, + weight: eu, + kbExpr: ke.textInputFocus, + primary: 1037, + mac: { + primary: 1037, + secondary: [3089] + } + }, + metadata: { + description: "Select to End", + args: [{ + name: "args", + schema: { + type: "object", + properties: { + sticky: { + description: f(183, null), + type: "boolean", + default: false + } + } + } + }] + } + })); + class d extends vg { + constructor(C) { + super(C); + this.d = C.inSelectionMode; + } + runCoreEditorCommand(C, S) { + C.model.pushStackElement(); + C.setCursorStates(S.source, 3, this.e(C, C.getCursorStates())); + C.revealAllCursors(S.source, true); + } + e(C, S) { + const x = []; + for (let k = 0, E = S.length; k < E; k++) { + const D = S[k]; + const P = D.modelState.position.lineNumber; + const R = C.model.getLineMaxColumn(P); + x[k] = fc.fromModelState(D.modelState.move(this.d, P, R, 0)); + } + return x; + } + } + i.CursorLineEnd = Sn(new d({ + inSelectionMode: false, + id: "cursorLineEnd", + precondition: undefined, + kbOpts: { + weight: eu, + kbExpr: ke.textInputFocus, + primary: 0, + mac: { + primary: 291 + } + } + })); + i.CursorLineEndSelect = Sn(new d({ + inSelectionMode: true, + id: "cursorLineEndSelect", + precondition: undefined, + kbOpts: { + weight: eu, + kbExpr: ke.textInputFocus, + primary: 0, + mac: { + primary: 1315 + } + } + })); + class h extends vg { + constructor(C) { + super(C); + this.d = C.inSelectionMode; + } + runCoreEditorCommand(C, S) { + C.model.pushStackElement(); + C.setCursorStates(S.source, 3, Vv.moveToBeginningOfBuffer(C, C.getCursorStates(), this.d)); + C.revealAllCursors(S.source, true); + } + } + i.CursorTop = Sn(new h({ + inSelectionMode: false, + id: "cursorTop", + precondition: undefined, + kbOpts: { + weight: eu, + kbExpr: ke.textInputFocus, + primary: 2062, + mac: { + primary: 2064 + } + } + })); + i.CursorTopSelect = Sn(new h({ + inSelectionMode: true, + id: "cursorTopSelect", + precondition: undefined, + kbOpts: { + weight: eu, + kbExpr: ke.textInputFocus, + primary: 3086, + mac: { + primary: 3088 + } + } + })); + class g extends vg { + constructor(C) { + super(C); + this.d = C.inSelectionMode; + } + runCoreEditorCommand(C, S) { + C.model.pushStackElement(); + C.setCursorStates(S.source, 3, Vv.moveToEndOfBuffer(C, C.getCursorStates(), this.d)); + C.revealAllCursors(S.source, true); + } + } + i.CursorBottom = Sn(new g({ + inSelectionMode: false, + id: "cursorBottom", + precondition: undefined, + kbOpts: { + weight: eu, + kbExpr: ke.textInputFocus, + primary: 2061, + mac: { + primary: 2066 + } + } + })); + i.CursorBottomSelect = Sn(new g({ + inSelectionMode: true, + id: "cursorBottomSelect", + precondition: undefined, + kbOpts: { + weight: eu, + kbExpr: ke.textInputFocus, + primary: 3085, + mac: { + primary: 3090 + } + } + })); + class p extends vg { + constructor() { + super({ + id: "editorScroll", + precondition: undefined, + metadata: Nw.metadata + }); + } + determineScrollMethod(C) { + const S = [6]; + const x = [1, 2, 3, 4, 5, 6]; + const k = [4, 2]; + const E = [1, 3]; + if (S.includes(C.unit) && k.includes(C.direction)) { + return this._runHorizontalEditorScroll.bind(this); + } else if (x.includes(C.unit) && E.includes(C.direction)) { + return this._runVerticalEditorScroll.bind(this); + } else { + return null; + } + } + runCoreEditorCommand(C, S) { + const x = Nw.parse(S); + if (!x) { + return; + } + const k = this.determineScrollMethod(x); + if (k) { + k(C, S.source, x); + } + } + _runVerticalEditorScroll(C, S, x) { + const k = this.d(C, x); + if (x.revealCursor) { + const E = C.getCompletelyVisibleViewRangeAtScrollTop(k); + C.setCursorStates(S, 3, [Vv.findPositionInViewportIfOutside(C, C.getPrimaryCursorState(), E, x.select)]); + } + C.viewLayout.setScrollPosition({ + scrollTop: k + }, 0); + } + d(C, S) { + if (S.unit === 1) { + const E = C.viewLayout.getFutureViewport(); + const D = C.getCompletelyVisibleViewRangeAtScrollTop(E.top); + const P = C.coordinatesConverter.convertViewRangeToModelRange(D); + let R; + if (S.direction === 1) { + R = Math.max(1, P.startLineNumber - S.value); + } else { + R = Math.min(C.model.getLineCount(), P.startLineNumber + S.value); + } + const L = C.coordinatesConverter.convertModelPositionToViewPosition(new je(R, 1)); + return C.viewLayout.getVerticalOffsetForLineNumber(L.lineNumber); + } + if (S.unit === 5) { + let E = 0; + if (S.direction === 3) { + E = C.model.getLineCount() - C.cursorConfig.pageSize; + } + return C.viewLayout.getVerticalOffsetForLineNumber(E); + } + let x; + if (S.unit === 3) { + x = C.cursorConfig.pageSize * S.value; + } else if (S.unit === 4) { + x = Math.round(C.cursorConfig.pageSize / 2) * S.value; + } else { + x = S.value; + } + const k = (S.direction === 1 ? -1 : 1) * x; + return C.viewLayout.getCurrentScrollTop() + k * C.cursorConfig.lineHeight; + } + _runHorizontalEditorScroll(C, S, x) { + const k = this._computeDesiredScrollLeft(C, x); + C.viewLayout.setScrollPosition({ + scrollLeft: k + }, 0); + } + _computeDesiredScrollLeft(C, S) { + const x = (S.direction === 4 ? -1 : 1) * S.value; + return C.viewLayout.getCurrentScrollLeft() + x * C.cursorConfig.typicalHalfwidthCharacterWidth; + } + } + i.EditorScrollImpl = p; + i.EditorScroll = Sn(new p()); + i.ScrollLineUp = Sn(new class extends vg { + constructor() { + super({ + id: "scrollLineUp", + precondition: undefined, + kbOpts: { + weight: eu, + kbExpr: ke.textInputFocus, + primary: 2064, + mac: { + primary: 267 + } + } + }); + } + runCoreEditorCommand(w, C) { + i.EditorScroll.runCoreEditorCommand(w, { + to: Nw.RawDirection.Up, + by: Nw.RawUnit.WrappedLine, + value: 1, + revealCursor: false, + select: false, + source: C.source + }); + } + }()); + i.ScrollPageUp = Sn(new class extends vg { + constructor() { + super({ + id: "scrollPageUp", + precondition: undefined, + kbOpts: { + weight: eu, + kbExpr: ke.textInputFocus, + primary: 2059, + win: { + primary: 523 + }, + linux: { + primary: 523 + } + } + }); + } + runCoreEditorCommand(w, C) { + i.EditorScroll.runCoreEditorCommand(w, { + to: Nw.RawDirection.Up, + by: Nw.RawUnit.Page, + value: 1, + revealCursor: false, + select: false, + source: C.source + }); + } + }()); + i.ScrollEditorTop = Sn(new class extends vg { + constructor() { + super({ + id: "scrollEditorTop", + precondition: undefined, + kbOpts: { + weight: eu, + kbExpr: ke.textInputFocus + } + }); + } + runCoreEditorCommand(w, C) { + i.EditorScroll.runCoreEditorCommand(w, { + to: Nw.RawDirection.Up, + by: Nw.RawUnit.Editor, + value: 1, + revealCursor: false, + select: false, + source: C.source + }); + } + }()); + i.ScrollLineDown = Sn(new class extends vg { + constructor() { + super({ + id: "scrollLineDown", + precondition: undefined, + kbOpts: { + weight: eu, + kbExpr: ke.textInputFocus, + primary: 2066, + mac: { + primary: 268 + } + } + }); + } + runCoreEditorCommand(w, C) { + i.EditorScroll.runCoreEditorCommand(w, { + to: Nw.RawDirection.Down, + by: Nw.RawUnit.WrappedLine, + value: 1, + revealCursor: false, + select: false, + source: C.source + }); + } + }()); + i.ScrollPageDown = Sn(new class extends vg { + constructor() { + super({ + id: "scrollPageDown", + precondition: undefined, + kbOpts: { + weight: eu, + kbExpr: ke.textInputFocus, + primary: 2060, + win: { + primary: 524 + }, + linux: { + primary: 524 + } + } + }); + } + runCoreEditorCommand(w, C) { + i.EditorScroll.runCoreEditorCommand(w, { + to: Nw.RawDirection.Down, + by: Nw.RawUnit.Page, + value: 1, + revealCursor: false, + select: false, + source: C.source + }); + } + }()); + i.ScrollEditorBottom = Sn(new class extends vg { + constructor() { + super({ + id: "scrollEditorBottom", + precondition: undefined, + kbOpts: { + weight: eu, + kbExpr: ke.textInputFocus + } + }); + } + runCoreEditorCommand(w, C) { + i.EditorScroll.runCoreEditorCommand(w, { + to: Nw.RawDirection.Down, + by: Nw.RawUnit.Editor, + value: 1, + revealCursor: false, + select: false, + source: C.source + }); + } + }()); + i.ScrollLeft = Sn(new class extends vg { + constructor() { + super({ + id: "scrollLeft", + precondition: undefined, + kbOpts: { + weight: eu, + kbExpr: ke.textInputFocus + } + }); + } + runCoreEditorCommand(w, C) { + i.EditorScroll.runCoreEditorCommand(w, { + to: Nw.RawDirection.Left, + by: Nw.RawUnit.Column, + value: 2, + revealCursor: false, + select: false, + source: C.source + }); + } + }()); + i.ScrollRight = Sn(new class extends vg { + constructor() { + super({ + id: "scrollRight", + precondition: undefined, + kbOpts: { + weight: eu, + kbExpr: ke.textInputFocus + } + }); + } + runCoreEditorCommand(w, C) { + i.EditorScroll.runCoreEditorCommand(w, { + to: Nw.RawDirection.Right, + by: Nw.RawUnit.Column, + value: 2, + revealCursor: false, + select: false, + source: C.source + }); + } + }()); + class b extends vg { + constructor(C) { + super(C); + this.d = C.inSelectionMode; + } + runCoreEditorCommand(C, S) { + if (S.position) { + C.model.pushStackElement(); + C.setCursorStates(S.source, 3, [Vv.word(C, C.getPrimaryCursorState(), this.d, S.position)]); + if (S.revealType !== 2) { + C.revealAllCursors(S.source, true, true); + } + } + } + } + i.WordSelect = Sn(new b({ + inSelectionMode: false, + id: "_wordSelect", + precondition: undefined + })); + i.WordSelectDrag = Sn(new b({ + inSelectionMode: true, + id: "_wordSelectDrag", + precondition: undefined + })); + i.LastCursorWordSelect = Sn(new class extends vg { + constructor() { + super({ + id: "lastCursorWordSelect", + precondition: undefined + }); + } + runCoreEditorCommand(w, C) { + if (!C.position) { + return; + } + const S = w.getLastAddedCursorIndex(); + const x = w.getCursorStates(); + const k = x.slice(0); + const E = x[S]; + k[S] = Vv.word(w, E, E.modelState.hasSelection(), C.position); + w.model.pushStackElement(); + w.setCursorStates(C.source, 3, k); + } + }()); + class v extends vg { + constructor(C) { + super(C); + this.d = C.inSelectionMode; + } + runCoreEditorCommand(C, S) { + if (S.position) { + C.model.pushStackElement(); + C.setCursorStates(S.source, 3, [Vv.line(C, C.getPrimaryCursorState(), this.d, S.position, S.viewPosition)]); + if (S.revealType !== 2) { + C.revealAllCursors(S.source, false, true); + } + } + } + } + i.LineSelect = Sn(new v({ + inSelectionMode: false, + id: "_lineSelect", + precondition: undefined + })); + i.LineSelectDrag = Sn(new v({ + inSelectionMode: true, + id: "_lineSelectDrag", + precondition: undefined + })); + class y extends vg { + constructor(C) { + super(C); + this.d = C.inSelectionMode; + } + runCoreEditorCommand(C, S) { + if (!S.position) { + return; + } + const x = C.getLastAddedCursorIndex(); + const k = C.getCursorStates(); + const E = k.slice(0); + E[x] = Vv.line(C, k[x], this.d, S.position, S.viewPosition); + C.model.pushStackElement(); + C.setCursorStates(S.source, 3, E); + } + } + i.LastCursorLineSelect = Sn(new y({ + inSelectionMode: false, + id: "lastCursorLineSelect", + precondition: undefined + })); + i.LastCursorLineSelectDrag = Sn(new y({ + inSelectionMode: true, + id: "lastCursorLineSelectDrag", + precondition: undefined + })); + i.CancelSelection = Sn(new class extends vg { + constructor() { + super({ + id: "cancelSelection", + precondition: ke.hasNonEmptySelection, + kbOpts: { + weight: eu, + kbExpr: ke.textInputFocus, + primary: 9, + secondary: [1033] + } + }); + } + runCoreEditorCommand(w, C) { + w.model.pushStackElement(); + w.setCursorStates(C.source, 3, [Vv.cancelSelection(w, w.getPrimaryCursorState())]); + w.revealAllCursors(C.source, true); + } + }()); + i.RemoveSecondaryCursors = Sn(new class extends vg { + constructor() { + super({ + id: "removeSecondaryCursors", + precondition: ke.hasMultipleSelections, + kbOpts: { + weight: eu + 1, + kbExpr: ke.textInputFocus, + primary: 9, + secondary: [1033] + } + }); + } + runCoreEditorCommand(w, C) { + w.model.pushStackElement(); + w.setCursorStates(C.source, 3, [w.getPrimaryCursorState()]); + w.revealAllCursors(C.source, true); + Bh(f(184, null)); + } + }()); + i.RevealLine = Sn(new class extends vg { + constructor() { + super({ + id: "revealLine", + precondition: undefined, + metadata: Bee.metadata + }); + } + runCoreEditorCommand(w, C) { + const S = C; + const x = S.lineNumber || 0; + let k = typeof x == "number" ? x + 1 : parseInt(x) + 1; + if (k < 1) { + k = 1; + } + const E = w.model.getLineCount(); + if (k > E) { + k = E; + } + const D = new Z(k, 1, k, w.model.getLineMaxColumn(k)); + let P = 0; + if (S.at) { + switch (S.at) { + case Bee.RawAtArgument.Top: + P = 3; + break; + case Bee.RawAtArgument.Center: + P = 1; + break; + case Bee.RawAtArgument.Bottom: + P = 4; + break; + default: + break; + } + } + const R = w.coordinatesConverter.convertModelRangeToViewRange(D); + w.revealRange(C.source, false, R, P, 0); + } + }()); + i.SelectAll = new class extends Fot { + constructor() { + super(Q6t); + } + runDOMCommand(w) { + if (Bv) { + w.focus(); + w.select(); + } + w.ownerDocument.execCommand("selectAll"); + } + runEditorCommand(w, C, S) { + const x = C._getViewModel(); + if (x) { + this.runCoreEditorCommand(x, S); + } + } + runCoreEditorCommand(w, C) { + w.model.pushStackElement(); + w.setCursorStates("keyboard", 3, [Vv.selectAll(w, w.getPrimaryCursorState())]); + } + }(); + i.SetSelection = Sn(new class extends vg { + constructor() { + super({ + id: "setSelection", + precondition: undefined + }); + } + runCoreEditorCommand(w, C) { + if (C.selection) { + w.model.pushStackElement(); + w.setCursorStates(C.source, 3, [fc.fromModelSelection(C.selection)]); + } + } + }()); + })(pb ||= {}); + CYi = T.and(ke.textInputFocus, ke.columnSelection); + _ee(pb.CursorColumnSelectLeft.id, 1039); + _ee(pb.CursorColumnSelectRight.id, 1041); + _ee(pb.CursorColumnSelectUp.id, 1040); + _ee(pb.CursorColumnSelectPageUp.id, 1035); + _ee(pb.CursorColumnSelectDown.id, 1042); + _ee(pb.CursorColumnSelectPageDown.id, 1036); + (function (i) { + class e extends Wm { + runEditorCommand(s, n, r) { + const o = n._getViewModel(); + if (o) { + this.runCoreEditingCommand(n, o, r || {}); + } + } + } + i.CoreEditingCommand = e; + i.LineBreakInsert = Sn(new class extends e { + constructor() { + super({ + id: "lineBreakInsert", + precondition: ke.writable, + kbOpts: { + weight: eu, + kbExpr: ke.textInputFocus, + primary: 0, + mac: { + primary: 301 + } + } + }); + } + runCoreEditingCommand(t, s, n) { + t.pushUndoStop(); + t.executeCommands(this.id, $ge.lineBreakInsert(s.cursorConfig, s.model, s.getCursorStates().map(r => r.modelState.selection))); + } + }()); + i.Outdent = Sn(new class extends e { + constructor() { + super({ + id: "outdent", + precondition: ke.writable, + kbOpts: { + weight: eu, + kbExpr: T.and(ke.editorTextFocus, ke.tabDoesNotMoveFocus), + primary: 1026 + } + }); + } + runCoreEditingCommand(t, s, n) { + t.pushUndoStop(); + t.executeCommands(this.id, sF.outdent(s.cursorConfig, s.model, s.getCursorStates().map(r => r.modelState.selection))); + t.pushUndoStop(); + } + }()); + i.Tab = Sn(new class extends e { + constructor() { + super({ + id: "tab", + precondition: ke.writable, + kbOpts: { + weight: eu, + kbExpr: T.and(ke.editorTextFocus, ke.tabDoesNotMoveFocus), + primary: 2 + } + }); + } + runCoreEditingCommand(t, s, n) { + t.pushUndoStop(); + t.executeCommands(this.id, sF.tab(s.cursorConfig, s.model, s.getCursorStates().map(r => r.modelState.selection))); + t.pushUndoStop(); + } + }()); + i.DeleteLeft = Sn(new class extends e { + constructor() { + super({ + id: "deleteLeft", + precondition: undefined, + kbOpts: { + weight: eu, + kbExpr: ke.textInputFocus, + primary: 1, + secondary: [1025], + mac: { + primary: 1, + secondary: [1025, 294, 257] + } + } + }); + } + runCoreEditingCommand(t, s, n) { + const [r, o] = uj.deleteLeft(s.getPrevEditOperationType(), s.cursorConfig, s.model, s.getCursorStates().map(a => a.modelState.selection), s.getCursorAutoClosedCharacters()); + if (r) { + t.pushUndoStop(); + } + t.executeCommands(this.id, o); + s.setPrevEditOperationType(2); + } + }()); + i.DeleteRight = Sn(new class extends e { + constructor() { + super({ + id: "deleteRight", + precondition: undefined, + kbOpts: { + weight: eu, + kbExpr: ke.textInputFocus, + primary: 20, + mac: { + primary: 20, + secondary: [290, 276] + } + } + }); + } + runCoreEditingCommand(t, s, n) { + const [r, o] = uj.deleteRight(s.getPrevEditOperationType(), s.cursorConfig, s.model, s.getCursorStates().map(a => a.modelState.selection)); + if (r) { + t.pushUndoStop(); + } + t.executeCommands(this.id, o); + s.setPrevEditOperationType(3); + } + }()); + i.Undo = new class extends Fot { + constructor() { + super(YB); + } + runDOMCommand(t) { + t.ownerDocument.execCommand("undo"); + } + runEditorCommand(t, s, n) { + if (!!s.hasModel() && s.getOption(96) !== true) { + return s.getModel().undo(); + } + } + }(); + i.Redo = new class extends Fot { + constructor() { + super(XB); + } + runDOMCommand(t) { + t.ownerDocument.execCommand("redo"); + } + runEditorCommand(t, s, n) { + if (!!s.hasModel() && s.getOption(96) !== true) { + return s.getModel().redo(); + } + } + }(); + })(nF ||= {}); + L8t = class extends bge { + constructor(i, e, t) { + super({ + id: i, + precondition: undefined, + metadata: t + }); + this.d = e; + } + runCommand(i, e) { + const t = i.get(ps).getFocusedCodeEditor(); + if (t) { + t.trigger("keyboard", this.d, e); + } + } + }; + mj("type", { + description: "Type", + args: [{ + name: "args", + schema: { + type: "object", + required: ["text"], + properties: { + text: { + type: "string" + } + } + } + }] + }); + mj("replacePreviousChar"); + mj("compositionType"); + mj("compositionStart"); + mj("compositionEnd"); + mj("paste"); + mj("cut"); + } +}); +var x9; +var bj = ue({ + "out-build/vs/editor/common/services/markerDecorations.js"() { + "use strict"; + + te(); + yt(); + x9 = Ve("markerDecorationsService"); + } +}); +var Fge; +var wjn = ue({ + "out-build/vs/editor/browser/services/markerDecorations.js"() { + "use strict"; + + bj(); + en(); + Fge = class { + static { + this.ID = "editor.contrib.markerDecorations"; + } + constructor(e, t) {} + dispose() {} + }; + Fge = __decorate([__param(1, x9)], Fge); + bo(Fge.ID, Fge, 0); + } +}); +var Cjn = ue({ + "out-build/vs/editor/browser/widget/codeEditor/editor.css"() {} +}); +function II(i) { + if (typeof i == "number") { + return `${i}px`; + } else { + return i; + } +} +function nc(i) { + return new Mw(i); +} +var Mw; +var pf = ue({ + "out-build/vs/base/browser/fastDomNode.js"() { + "use strict"; + + Mw = class { + constructor(i) { + this.domNode = i; + this.a = ""; + this.b = ""; + this.c = ""; + this.d = ""; + this.e = ""; + this.f = ""; + this.g = ""; + this.h = ""; + this.i = ""; + this.j = ""; + this.k = ""; + this.l = ""; + this.m = ""; + this.n = ""; + this.o = ""; + this.p = ""; + this.q = ""; + this.r = ""; + this.s = ""; + this.t = ""; + this.u = ""; + this.v = ""; + this.w = ""; + this.x = ""; + this.y = ""; + this.z = ""; + this.A = false; + this.B = "none"; + this.C = ""; + } + focus() { + this.domNode.focus(); + } + setMaxWidth(i) { + const e = II(i); + if (this.a !== e) { + this.a = e; + this.domNode.style.maxWidth = this.a; + } + } + setWidth(i) { + const e = II(i); + if (this.b !== e) { + this.b = e; + this.domNode.style.width = this.b; + } + } + setHeight(i) { + const e = II(i); + if (this.c !== e) { + this.c = e; + this.domNode.style.height = this.c; + } + } + setTop(i) { + const e = II(i); + if (this.d !== e) { + this.d = e; + this.domNode.style.top = this.d; + } + } + setLeft(i) { + const e = II(i); + if (this.e !== e) { + this.e = e; + this.domNode.style.left = this.e; + } + } + setBottom(i) { + const e = II(i); + if (this.f !== e) { + this.f = e; + this.domNode.style.bottom = this.f; + } + } + setRight(i) { + const e = II(i); + if (this.g !== e) { + this.g = e; + this.domNode.style.right = this.g; + } + } + setPaddingTop(i) { + const e = II(i); + if (this.h !== e) { + this.h = e; + this.domNode.style.paddingTop = this.h; + } + } + setPaddingLeft(i) { + const e = II(i); + if (this.i !== e) { + this.i = e; + this.domNode.style.paddingLeft = this.i; + } + } + setPaddingBottom(i) { + const e = II(i); + if (this.j !== e) { + this.j = e; + this.domNode.style.paddingBottom = this.j; + } + } + setPaddingRight(i) { + const e = II(i); + if (this.k !== e) { + this.k = e; + this.domNode.style.paddingRight = this.k; + } + } + setFontFamily(i) { + if (this.l !== i) { + this.l = i; + this.domNode.style.fontFamily = this.l; + } + } + setFontWeight(i) { + if (this.m !== i) { + this.m = i; + this.domNode.style.fontWeight = this.m; + } + } + setFontSize(i) { + const e = II(i); + if (this.n !== e) { + this.n = e; + this.domNode.style.fontSize = this.n; + } + } + setFontStyle(i) { + if (this.o !== i) { + this.o = i; + this.domNode.style.fontStyle = this.o; + } + } + setFontFeatureSettings(i) { + if (this.p !== i) { + this.p = i; + this.domNode.style.fontFeatureSettings = this.p; + } + } + setFontVariationSettings(i) { + if (this.q !== i) { + this.q = i; + this.domNode.style.fontVariationSettings = this.q; + } + } + setTextDecoration(i) { + if (this.r !== i) { + this.r = i; + this.domNode.style.textDecoration = this.r; + } + } + setLineHeight(i) { + const e = II(i); + if (this.s !== e) { + this.s = e; + this.domNode.style.lineHeight = this.s; + } + } + setLetterSpacing(i) { + const e = II(i); + if (this.t !== e) { + this.t = e; + this.domNode.style.letterSpacing = this.t; + } + } + setClassName(i) { + if (this.u !== i) { + this.u = i; + this.domNode.className = this.u; + } + } + toggleClassName(i, e) { + this.domNode.classList.toggle(i, e); + this.u = this.domNode.className; + } + setDisplay(i) { + if (this.v !== i) { + this.v = i; + this.domNode.style.display = this.v; + } + } + setPosition(i) { + if (this.w !== i) { + this.w = i; + this.domNode.style.position = this.w; + } + } + setVisibility(i) { + if (this.x !== i) { + this.x = i; + this.domNode.style.visibility = this.x; + } + } + setColor(i) { + if (this.y !== i) { + this.y = i; + this.domNode.style.color = this.y; + } + } + setBackgroundColor(i) { + if (this.z !== i) { + this.z = i; + this.domNode.style.backgroundColor = this.z; + } + } + setLayerHinting(i) { + if (this.A !== i) { + this.A = i; + this.domNode.style.transform = this.A ? "translate3d(0px, 0px, 0px)" : ""; + } + } + setBoxShadow(i) { + if (this.C !== i) { + this.C = i; + this.domNode.style.boxShadow = i; + } + } + setContain(i) { + if (this.B !== i) { + this.B = i; + this.domNode.style.contain = this.B; + } + } + setAttribute(i, e) { + this.domNode.setAttribute(i, e); + } + removeAttribute(i) { + this.domNode.removeAttribute(i); + } + appendChild(i) { + this.domNode.appendChild(i.domNode); + } + removeChild(i) { + this.domNode.removeChild(i.domNode); + } + }; + } +}); +function Hm(i, e) { + if (i instanceof Mw) { + i.setFontFamily(e.getMassagedFontFamily()); + i.setFontWeight(e.fontWeight); + i.setFontSize(e.fontSize); + i.setFontFeatureSettings(e.fontFeatureSettings); + i.setFontVariationSettings(e.fontVariationSettings); + i.setLineHeight(e.lineHeight); + i.setLetterSpacing(e.letterSpacing); + } else { + i.style.fontFamily = e.getMassagedFontFamily(); + i.style.fontWeight = e.fontWeight; + i.style.fontSize = e.fontSize + "px"; + i.style.fontFeatureSettings = e.fontFeatureSettings; + i.style.fontVariationSettings = e.fontVariationSettings; + i.style.lineHeight = e.lineHeight + "px"; + i.style.letterSpacing = e.letterSpacing + "px"; + } +} +function Sjn(i) { + if (i instanceof Mw) { + i.setFontFamily(""); + i.setFontWeight(""); + i.setFontSize(0); + i.setFontFeatureSettings(""); + i.setFontVariationSettings(""); + i.setLineHeight(0); + i.setLetterSpacing(0); + } else { + i.style.fontFamily = ""; + i.style.fontWeight = ""; + i.style.fontSize = ""; + i.style.fontFeatureSettings = ""; + i.style.fontVariationSettings = ""; + i.style.lineHeight = ""; + i.style.letterSpacing = ""; + } +} +var s1 = ue({ + "out-build/vs/editor/browser/config/domFontInfo.js"() { + "use strict"; + + pf(); + } +}); +function Gn(i) { + if (!i || typeof i != "object" || i instanceof RegExp) { + return i; + } + const e = Array.isArray(i) ? [] : {}; + Object.entries(i).forEach(([t, s]) => { + e[t] = s && typeof s == "object" ? Gn(s) : s; + }); + return e; +} +function xjn(i) { + if (!i || typeof i != "object") { + return i; + } + const e = [i]; + while (e.length > 0) { + const t = e.shift(); + Object.freeze(t); + for (const s in t) { + if (M8t.call(t, s)) { + const n = t[s]; + if (typeof n == "object" && !Object.isFrozen(n) && !aHn(n)) { + e.push(n); + } + } + } + } + return i; +} +function Uee(i, e) { + return R8t(i, e, new Set()); +} +function R8t(i, e, t) { + if (Ga(i)) { + return i; + } + const s = e(i); + if (typeof s !== "undefined") { + return s; + } + if (Array.isArray(i)) { + const n = []; + for (const r of i) { + n.push(R8t(r, e, t)); + } + return n; + } + if (xo(i)) { + if (t.has(i)) { + throw new Error("Cannot clone recursive data-structure"); + } + t.add(i); + const n = {}; + for (const r in i) { + if (M8t.call(i, r)) { + n[r] = R8t(i[r], e, t); + } + } + t.delete(i); + return n; + } + return i; +} +function Oy(i, e, t = true) { + if (xo(i)) { + if (xo(e)) { + Object.keys(e).forEach(s => { + if (s in i) { + if (t) { + if (xo(i[s]) && xo(e[s])) { + Oy(i[s], e[s], t); + } else { + i[s] = e[s]; + } + } + } else { + i[s] = e[s]; + } + }); + } + return i; + } else { + return e; + } +} +function Ul(i, e) { + if (i === e) { + return true; + } + if (i == null || e === null || e === undefined || typeof i != typeof e || typeof i != "object" || Array.isArray(i) !== Array.isArray(e)) { + return false; + } + let t; + let s; + if (Array.isArray(i)) { + if (i.length !== e.length) { + return false; + } + for (t = 0; t < i.length; t++) { + if (!Ul(i[t], e[t])) { + return false; + } + } + } else { + const n = []; + for (s in i) { + n.push(s); + } + n.sort(); + const r = []; + for (s in e) { + r.push(s); + } + r.sort(); + if (!Ul(n, r)) { + return false; + } + for (t = 0; t < n.length; t++) { + if (!Ul(i[n[t]], e[n[t]])) { + return false; + } + } + } + return true; +} +function Oot(i) { + const e = new Set(); + return JSON.stringify(i, (t, s) => { + if (xo(s) || Array.isArray(s)) { + if (e.has(s)) { + return "[Circular]"; + } + e.add(s); + } + if (typeof s == "bigint") { + return `[BigInt ${s.toString()}]`; + } else { + return s; + } + }); +} +function N8t(i, e) { + const t = Object.create(null); + if (!!i && !!e) { + Object.keys(e).forEach(n => { + const r = i[n]; + const o = e[n]; + if (!Ul(r, o)) { + t[n] = o; + } + }); + } + return t; +} +function Oge(i, e) { + const t = Object.create(null); + for (const [s, n] of Object.entries(i)) { + if (e(s, n)) { + t[s] = n; + } + } + return t; +} +function kjn(i) { + let e = []; + while (Object.prototype !== i) { + e = e.concat(Object.getOwnPropertyNames(i)); + i = Object.getPrototypeOf(i); + } + return e; +} +function SYi(i) { + const e = []; + for (const t of kjn(i)) { + if (typeof i[t] == "function") { + e.push(t); + } + } + return e; +} +function Ejn(i, e) { + const t = n => function () { + const r = Array.prototype.slice.call(arguments, 0); + return e(n, r); + }; + const s = {}; + for (const n of i) { + s[n] = t(n); + } + return s; +} +function xYi(i, e) { + const t = {}; + for (const [s, n] of Object.entries(i)) { + t[s] = e(n, s); + } + return t; +} +var M8t; +var Jr = ue({ + "out-build/vs/base/common/objects.js"() { + "use strict"; + + zt(); + M8t = Object.prototype.hasOwnProperty; + } +}); +var A8t; +var kYi = ue({ + "out-build/vs/editor/browser/config/elementSizeObserver.js"() { + "use strict"; + + q(); + pe(); + xe(); + A8t = class extends H { + constructor(i, e) { + super(); + this.a = this.D(new B()); + this.onDidChange = this.a.event; + this.b = i; + this.c = -1; + this.f = -1; + this.g = null; + this.h(false, e); + } + dispose() { + this.stopObserving(); + super.dispose(); + } + getWidth() { + return this.c; + } + getHeight() { + return this.f; + } + startObserving(i = false) { + if (!this.g && this.b) { + let e = null; + const t = () => { + if (e) { + this.observe({ + width: e.width, + height: e.height + }, i); + } else { + this.observe(undefined, i); + } + }; + let s = false; + let n = false; + const r = () => { + if (s && !n) { + try { + s = false; + n = true; + t(); + } finally { + Zc(Kt(this.b), () => { + n = false; + r(); + }); + } + } + }; + const o = Kt(this.b)?.ResizeObserver; + this.g = new o(a => { + if (a && a[0] && a[0].contentRect) { + e = { + width: a[0].contentRect.width, + height: a[0].contentRect.height + }; + } else { + e = null; + } + s = true; + r(); + }); + this.g.observe(this.b); + } + } + stopObserving() { + if (this.g) { + this.g.disconnect(); + this.g = null; + } + } + observe(i, e = false) { + this.h(true, i, e); + } + h(i, e, t = false) { + let s = 0; + let n = 0; + if (e) { + s = e.width; + n = e.height; + } else if (this.b) { + s = this.b.clientWidth; + n = this.b.clientHeight; + } + s = Math.max(5, s); + n = Math.max(5, n); + if (this.c !== s || this.f !== n) { + this.c = s; + if (t) { + this.f = Math.max(n, this.b.clientHeight); + } else { + this.f = n; + } + if (i) { + this.a.fire(); + } + } + } + }; + } +}); +var EYi; +var IYi; +var DYi; +var _y; +var Yk = ue({ + "out-build/vs/base/browser/pixelRatio.js"() { + "use strict"; + + xe(); + pe(); + q(); + EYi = class extends H { + constructor(i) { + super(); + this.a = this.D(new B()); + this.onDidChange = this.a.event; + this.b = () => this.f(i, true); + this.c = null; + this.f(i, false); + } + f(i, e) { + this.c?.removeEventListener("change", this.b); + this.c = i.matchMedia(`(resolution: ${i.devicePixelRatio}dppx)`); + this.c.addEventListener("change", this.b); + if (e) { + this.a.fire(); + } + } + }; + IYi = class extends H { + get value() { + return this.b; + } + constructor(i) { + super(); + this.a = this.D(new B()); + this.onDidChange = this.a.event; + this.b = this.c(i); + const e = this.D(new EYi(i)); + this.D(e.onDidChange(() => { + this.b = this.c(i); + this.a.fire(this.b); + })); + } + c(i) { + const e = document.createElement("canvas").getContext("2d"); + const t = i.devicePixelRatio || 1; + const s = e.webkitBackingStorePixelRatio || e.mozBackingStorePixelRatio || e.msBackingStorePixelRatio || e.oBackingStorePixelRatio || e.backingStorePixelRatio || 1; + return t / s; + } + }; + DYi = class { + constructor() { + this.a = new Map(); + } + b(i) { + const e = yx(i); + let t = this.a.get(e); + if (!t) { + t = IL(new IYi(i)); + this.a.set(e, t); + IL(de.once(NJi)(({ + vscodeWindowId: s + }) => { + if (s === e) { + t?.dispose(); + this.a.delete(e); + } + })); + } + return t; + } + getInstance(i) { + return this.b(i); + } + }; + _y = new DYi(); + } +}); +function Ijn(i, e, t) { + new LYi(e, t).read(i); +} +var TYi; +var PYi; +var LYi; +var Djn = ue({ + "out-build/vs/editor/browser/config/charWidthReader.js"() { + "use strict"; + + s1(); + (function (i) { + i[i.Regular = 0] = "Regular"; + i[i.Italic = 1] = "Italic"; + i[i.Bold = 2] = "Bold"; + })(TYi ||= {}); + PYi = class { + constructor(i, e) { + this.chr = i; + this.type = e; + this.width = 0; + } + fulfill(i) { + this.width = i; + } + }; + LYi = class LFn { + constructor(e, t) { + this.a = e; + this.b = t; + this.c = null; + this.d = null; + } + read(e) { + this.e(); + e.document.body.appendChild(this.c); + this.g(); + this.c?.remove(); + this.c = null; + this.d = null; + } + e() { + const e = document.createElement("div"); + e.style.position = "absolute"; + e.style.top = "-50000px"; + e.style.width = "50000px"; + const t = document.createElement("div"); + Hm(t, this.a); + e.appendChild(t); + const s = document.createElement("div"); + Hm(s, this.a); + s.style.fontWeight = "bold"; + e.appendChild(s); + const n = document.createElement("div"); + Hm(n, this.a); + n.style.fontStyle = "italic"; + e.appendChild(n); + const r = []; + for (const o of this.b) { + let a; + if (o.type === 0) { + a = t; + } + if (o.type === 2) { + a = s; + } + if (o.type === 1) { + a = n; + } + a.appendChild(document.createElement("br")); + const l = document.createElement("span"); + LFn.f(l, o); + a.appendChild(l); + r.push(l); + } + this.c = e; + this.d = r; + } + static f(e, t) { + if (t.chr === " ") { + let s = "\xA0"; + for (let n = 0; n < 8; n++) { + s += s; + } + e.innerText = s; + } else { + let s = t.chr; + for (let n = 0; n < 8; n++) { + s += s; + } + e.textContent = s; + } + } + g() { + for (let e = 0, t = this.b.length; e < t; e++) { + const s = this.b[e]; + const n = this.d[e]; + s.fulfill(n.offsetWidth / 256); + } + } + }; + } +}); +var Aw; +var _ot = ue({ + "out-build/vs/editor/common/core/textModelDefaults.js"() { + "use strict"; + + Aw = { + tabSize: 4, + indentSize: 4, + insertSpaces: true, + detectIndentation: true, + trimAutoWhitespace: true, + largeFileOptimizations: true, + bracketPairColorizationOptions: { + enabled: true, + independentColorPoolPerBracketType: false + } + }; + } +}); +function Bot(i, e) { + if (typeof i != "object" || typeof e != "object" || !i || !e) { + return new _ge(e, i !== e); + } + if (Array.isArray(i) || Array.isArray(e)) { + const s = Array.isArray(i) && Array.isArray(e) && Go(i, e); + return new _ge(e, !s); + } + let t = false; + for (const s in e) { + if (e.hasOwnProperty(s)) { + const n = Bot(i[s], e[s]); + if (n.didChange) { + i[s] = n.newValue; + t = true; + } + } + } + return new _ge(i, t); +} +function jr(i, e) { + if (typeof i === "undefined") { + return e; + } else if (i === "false") { + return false; + } else { + return !!i; + } +} +function vj(i, e, t, s) { + if (typeof i === "undefined") { + return e; + } + let n = parseInt(i, 10); + if (isNaN(n)) { + return e; + } else { + n = Math.max(t, n); + n = Math.min(s, n); + return n | 0; + } +} +function Tjn(i, e, t, s) { + if (typeof i === "undefined") { + return e; + } + const n = NT.float(i, e); + return NT.clamp(n, t, s); +} +function Rf(i, e, t, s) { + if (typeof i != "string") { + return e; + } else if (s && i in s) { + return s[i]; + } else if (t.indexOf(i) === -1) { + return e; + } else { + return i; + } +} +function Pjn(i) { + switch (i) { + case "none": + return 0; + case "keep": + return 1; + case "brackets": + return 2; + case "advanced": + return 3; + case "full": + return 4; + } +} +function RYi(i) { + switch (i) { + case "blink": + return 1; + case "smooth": + return 2; + case "phase": + return 3; + case "expand": + return 4; + case "solid": + return 5; + } +} +function Ljn(i) { + switch (i) { + case Wh.Line: + return "line"; + case Wh.Block: + return "block"; + case Wh.Underline: + return "underline"; + case Wh.LineThin: + return "line-thin"; + case Wh.BlockOutline: + return "block-outline"; + case Wh.UnderlineThin: + return "underline-thin"; + } +} +function $8t(i) { + switch (i) { + case "line": + return Wh.Line; + case "block": + return Wh.Block; + case "underline": + return Wh.Underline; + case "line-thin": + return Wh.LineThin; + case "block-outline": + return Wh.BlockOutline; + case "underline-thin": + return Wh.UnderlineThin; + } +} +function Rjn(i) { + if (i === "ctrlCmd") { + if (Gt) { + return "metaKey"; + } else { + return "ctrlKey"; + } + } else { + return "altKey"; + } +} +function Uot(i) { + const e = i.get(103); + if (e === "editable") { + return i.get(96); + } else { + return e !== "on"; + } +} +function NYi(i, e) { + if (typeof i != "string") { + return e; + } + switch (i) { + case "hidden": + return 2; + case "visible": + return 3; + default: + return 1; + } +} +function Wee(i, e, t) { + const s = t.indexOf(i); + if (s === -1) { + return e; + } else { + return t[s]; + } +} +function Xs(i) { + k9[i.id] = i; + return i; +} +var MYi; +var bM; +var AYi; +var F8t; +var Zh; +var _ge; +var yj; +var wj; +var Kl; +var Xd; +var NT; +var Sx; +var mf; +var Vee; +var $Yi; +var FYi; +var OYi; +var Wh; +var _Yi; +var BYi; +var UYi; +var t4; +var Wot; +var WYi; +var VYi; +var HYi; +var qYi; +var jYi; +var zYi; +var JYi; +var O8t; +var GYi; +var MT; +var KYi; +var YYi; +var XYi; +var QYi; +var ZYi; +var eXi; +var tXi; +var iXi; +var sXi; +var nXi; +var rXi; +var oXi; +var aXi; +var lXi; +var cXi; +var uXi; +var Xk; +var n1; +var dXi; +var hXi; +var fXi; +var gXi; +var pXi; +var mXi; +var bXi; +var vXi; +var yXi; +var wXi; +var CXi; +var SXi; +var xXi; +var kXi; +var EXi; +var Qf; +var k9; +var IXi; +var r1; +var Qd = ue({ + "out-build/vs/editor/common/config/editorOptions.js"() { + "use strict"; + + Jt(); + Jr(); + rt(); + _ot(); + BL(); + X(); + (function (i) { + i[i.None = 0] = "None"; + i[i.Keep = 1] = "Keep"; + i[i.Brackets = 2] = "Brackets"; + i[i.Advanced = 3] = "Advanced"; + i[i.Full = 4] = "Full"; + })(MYi ||= {}); + bM = 8; + AYi = class { + constructor(i) { + this.c = i; + } + hasChanged(i) { + return this.c[i]; + } + }; + F8t = class { + constructor() { + this.stableMinimapLayoutInput = null; + this.stableFitMaxMinimapScale = 0; + this.stableFitRemainingWidth = 0; + } + }; + Zh = class { + constructor(i, e, t, s) { + this.id = i; + this.name = e; + this.defaultValue = t; + this.schema = s; + } + applyUpdate(i, e) { + return Bot(i, e); + } + compute(i, e, t) { + return t; + } + }; + _ge = class { + constructor(i, e) { + this.newValue = i; + this.didChange = e; + } + }; + yj = class { + constructor(i) { + this.schema = undefined; + this.id = i; + this.name = "_never_"; + this.defaultValue = undefined; + } + applyUpdate(i, e) { + return Bot(i, e); + } + validate(i) { + return this.defaultValue; + } + }; + wj = class { + constructor(i, e, t, s) { + this.id = i; + this.name = e; + this.defaultValue = t; + this.schema = s; + } + applyUpdate(i, e) { + return Bot(i, e); + } + validate(i) { + if (typeof i === "undefined") { + return this.defaultValue; + } else { + return i; + } + } + compute(i, e, t) { + return t; + } + }; + Kl = class extends wj { + constructor(i, e, t, s = undefined) { + if (typeof s !== "undefined") { + s.type = "boolean"; + s.default = t; + } + super(i, e, t, s); + } + validate(i) { + return jr(i, this.defaultValue); + } + }; + Xd = class RFn extends wj { + static clampedInt(e, t, s, n) { + return vj(e, t, s, n); + } + constructor(e, t, s, n, r, o = undefined) { + if (typeof o !== "undefined") { + o.type = "integer"; + o.default = s; + o.minimum = n; + o.maximum = r; + } + super(e, t, s, o); + this.minimum = n; + this.maximum = r; + } + validate(e) { + return RFn.clampedInt(e, this.defaultValue, this.minimum, this.maximum); + } + }; + NT = class NFn extends wj { + static clamp(e, t, s) { + if (e < t) { + return t; + } else if (e > s) { + return s; + } else { + return e; + } + } + static float(e, t) { + if (typeof e == "number") { + return e; + } + if (typeof e === "undefined") { + return t; + } + const s = parseFloat(e); + if (isNaN(s)) { + return t; + } else { + return s; + } + } + constructor(e, t, s, n, r) { + if (typeof r !== "undefined") { + r.type = "number"; + r.default = s; + } + super(e, t, s, r); + this.validationFn = n; + } + validate(e) { + return this.validationFn(NFn.float(e, this.defaultValue)); + } + }; + Sx = class MFn extends wj { + static string(e, t) { + if (typeof e != "string") { + return t; + } else { + return e; + } + } + constructor(e, t, s, n = undefined) { + if (typeof n !== "undefined") { + n.type = "string"; + n.default = s; + } + super(e, t, s, n); + } + validate(e) { + return MFn.string(e, this.defaultValue); + } + }; + mf = class extends wj { + constructor(i, e, t, s, n = undefined) { + if (typeof n !== "undefined") { + n.type = "string"; + n.enum = s; + n.default = t; + } + super(i, e, t, n); + this.c = s; + } + validate(i) { + return Rf(i, this.defaultValue, this.c); + } + }; + Vee = class extends Zh { + constructor(i, e, t, s, n, r, o = undefined) { + if (typeof o !== "undefined") { + o.type = "string"; + o.enum = n; + o.default = s; + } + super(i, e, t, o); + this.c = n; + this.d = r; + } + validate(i) { + if (typeof i != "string") { + return this.defaultValue; + } else if (this.c.indexOf(i) === -1) { + return this.defaultValue; + } else { + return this.d(i); + } + } + }; + $Yi = class extends Zh { + constructor() { + super(2, "accessibilitySupport", 0, { + type: "string", + enum: ["auto", "on", "off"], + enumDescriptions: [f(309, null), f(310, null), f(311, null)], + default: "auto", + tags: ["accessibility"], + description: f(312, null) + }); + } + validate(i) { + switch (i) { + case "auto": + return 0; + case "off": + return 1; + case "on": + return 2; + } + return this.defaultValue; + } + compute(i, e, t) { + if (t === 0) { + return i.accessibilitySupport; + } else { + return t; + } + } + }; + FYi = class extends Zh { + constructor() { + const i = { + insertSpace: true, + ignoreEmptyLines: true + }; + super(23, "comments", i, { + "editor.comments.insertSpace": { + type: "boolean", + default: i.insertSpace, + description: f(313, null) + }, + "editor.comments.ignoreEmptyLines": { + type: "boolean", + default: i.ignoreEmptyLines, + description: f(314, null) + } + }); + } + validate(i) { + if (!i || typeof i != "object") { + return this.defaultValue; + } + const e = i; + return { + insertSpace: jr(e.insertSpace, this.defaultValue.insertSpace), + ignoreEmptyLines: jr(e.ignoreEmptyLines, this.defaultValue.ignoreEmptyLines) + }; + } + }; + (function (i) { + i[i.Hidden = 0] = "Hidden"; + i[i.Blink = 1] = "Blink"; + i[i.Smooth = 2] = "Smooth"; + i[i.Phase = 3] = "Phase"; + i[i.Expand = 4] = "Expand"; + i[i.Solid = 5] = "Solid"; + })(OYi ||= {}); + (function (i) { + i[i.Line = 1] = "Line"; + i[i.Block = 2] = "Block"; + i[i.Underline = 3] = "Underline"; + i[i.LineThin = 4] = "LineThin"; + i[i.BlockOutline = 5] = "BlockOutline"; + i[i.UnderlineThin = 6] = "UnderlineThin"; + })(Wh ||= {}); + _Yi = class extends yj { + constructor() { + super(148); + } + compute(i, e, t) { + const s = ["monaco-editor"]; + if (e.get(41)) { + s.push(e.get(41)); + } + if (i.extraEditorClassName) { + s.push(i.extraEditorClassName); + } + if (e.get(75) === "default") { + s.push("mouse-default"); + } else if (e.get(75) === "copy") { + s.push("mouse-copy"); + } + if (e.get(116)) { + s.push("showUnused"); + } + if (e.get(145)) { + s.push("showDeprecated"); + } + return s.join(" "); + } + }; + BYi = class extends Kl { + constructor() { + super(38, "emptySelectionClipboard", true, { + description: f(315, null) + }); + } + compute(i, e, t) { + return t && i.emptySelectionClipboard; + } + }; + UYi = class extends Zh { + constructor() { + const i = { + cursorMoveOnType: true, + seedSearchStringFromSelection: "always", + autoFindInSelection: "never", + globalFindClipboard: false, + addExtraSpaceOnTop: true, + loop: true, + history: "workspace" + }; + super(43, "find", i, { + "editor.find.cursorMoveOnType": { + type: "boolean", + default: i.cursorMoveOnType, + description: f(316, null) + }, + "editor.find.seedSearchStringFromSelection": { + type: "string", + enum: ["never", "always", "selection"], + default: i.seedSearchStringFromSelection, + enumDescriptions: [f(317, null), f(318, null), f(319, null)], + description: f(320, null) + }, + "editor.find.autoFindInSelection": { + type: "string", + enum: ["never", "always", "multiline"], + default: i.autoFindInSelection, + enumDescriptions: [f(321, null), f(322, null), f(323, null)], + description: f(324, null) + }, + "editor.find.globalFindClipboard": { + type: "boolean", + default: i.globalFindClipboard, + description: f(325, null), + included: Gt + }, + "editor.find.addExtraSpaceOnTop": { + type: "boolean", + default: i.addExtraSpaceOnTop, + description: f(326, null) + }, + "editor.find.loop": { + type: "boolean", + default: i.loop, + description: f(327, null) + }, + "editor.find.history": { + type: "string", + enum: ["never", "workspace"], + default: "workspace", + enumDescriptions: [f(328, null), f(329, null)], + description: f(330, null) + } + }); + } + validate(i) { + if (!i || typeof i != "object") { + return this.defaultValue; + } + const e = i; + return { + cursorMoveOnType: jr(e.cursorMoveOnType, this.defaultValue.cursorMoveOnType), + seedSearchStringFromSelection: typeof i.seedSearchStringFromSelection == "boolean" ? i.seedSearchStringFromSelection ? "always" : "never" : Rf(e.seedSearchStringFromSelection, this.defaultValue.seedSearchStringFromSelection, ["never", "always", "selection"]), + autoFindInSelection: typeof i.autoFindInSelection == "boolean" ? i.autoFindInSelection ? "always" : "never" : Rf(e.autoFindInSelection, this.defaultValue.autoFindInSelection, ["never", "always", "multiline"]), + globalFindClipboard: jr(e.globalFindClipboard, this.defaultValue.globalFindClipboard), + addExtraSpaceOnTop: jr(e.addExtraSpaceOnTop, this.defaultValue.addExtraSpaceOnTop), + loop: jr(e.loop, this.defaultValue.loop), + history: Rf(e.history, this.defaultValue.history, ["never", "workspace"]) + }; + } + }; + t4 = class Sde extends Zh { + static { + this.OFF = "\"liga\" off, \"calt\" off"; + } + static { + this.ON = "\"liga\" on, \"calt\" on"; + } + constructor() { + super(53, "fontLigatures", Sde.OFF, { + anyOf: [{ + type: "boolean", + description: f(331, null) + }, { + type: "string", + description: f(332, null) + }], + description: f(333, null), + default: false + }); + } + validate(e) { + if (typeof e === "undefined") { + return this.defaultValue; + } else if (typeof e == "string") { + if (e === "false" || e.length === 0) { + return Sde.OFF; + } else if (e === "true") { + return Sde.ON; + } else { + return e; + } + } else if (e) { + return Sde.ON; + } else { + return Sde.OFF; + } + } + }; + Wot = class xde extends Zh { + static { + this.OFF = "normal"; + } + static { + this.TRANSLATE = "translate"; + } + constructor() { + super(56, "fontVariations", xde.OFF, { + anyOf: [{ + type: "boolean", + description: f(334, null) + }, { + type: "string", + description: f(335, null) + }], + description: f(336, null), + default: false + }); + } + validate(e) { + if (typeof e === "undefined") { + return this.defaultValue; + } else if (typeof e == "string") { + if (e === "false") { + return xde.OFF; + } else if (e === "true") { + return xde.TRANSLATE; + } else { + return e; + } + } else if (e) { + return xde.TRANSLATE; + } else { + return xde.OFF; + } + } + compute(e, t, s) { + return e.fontInfo.fontVariationSettings; + } + }; + WYi = class extends yj { + constructor() { + super(52); + } + compute(i, e, t) { + return i.fontInfo; + } + }; + VYi = class extends yj { + constructor() { + super(147); + } + compute(i, e, t) { + if (i.inputMode === "overtype") { + return e.get(84); + } else { + return e.get(28); + } + } + }; + HYi = class extends wj { + constructor() { + super(54, "fontSize", Qf.fontSize, { + type: "number", + minimum: 6, + maximum: 100, + default: Qf.fontSize, + description: f(337, null) + }); + } + validate(i) { + const e = NT.float(i, this.defaultValue); + if (e === 0) { + return Qf.fontSize; + } else { + return NT.clamp(e, 6, 100); + } + } + compute(i, e, t) { + return i.fontInfo.fontSize; + } + }; + qYi = class kde extends Zh { + static { + this.c = ["normal", "bold", "100", "200", "300", "400", "500", "600", "700", "800", "900"]; + } + static { + this.d = 1; + } + static { + this.e = 1000; + } + constructor() { + super(55, "fontWeight", Qf.fontWeight, { + anyOf: [{ + type: "number", + minimum: kde.d, + maximum: kde.e, + errorMessage: f(338, null) + }, { + type: "string", + pattern: "^(normal|bold|1000|[1-9][0-9]{0,2})$" + }, { + enum: kde.c + }], + default: Qf.fontWeight, + description: f(339, null) + }); + } + validate(e) { + if (e === "normal" || e === "bold") { + return e; + } else { + return String(Xd.clampedInt(e, Qf.fontWeight, kde.d, kde.e)); + } + } + }; + jYi = class extends Zh { + constructor() { + const i = { + multiple: "peek", + multipleDefinitions: "peek", + multipleTypeDefinitions: "peek", + multipleDeclarations: "peek", + multipleImplementations: "peek", + multipleReferences: "peek", + multipleTests: "peek", + alternativeDefinitionCommand: "editor.action.goToReferences", + alternativeTypeDefinitionCommand: "editor.action.goToReferences", + alternativeDeclarationCommand: "editor.action.goToReferences", + alternativeImplementationCommand: "", + alternativeReferenceCommand: "", + alternativeTestsCommand: "" + }; + const e = { + type: "string", + enum: ["peek", "gotoAndPeek", "goto"], + default: i.multiple, + enumDescriptions: [f(340, null), f(341, null), f(342, null)] + }; + const t = ["", "editor.action.referenceSearch.trigger", "editor.action.goToReferences", "editor.action.peekImplementation", "editor.action.goToImplementation", "editor.action.peekTypeDefinition", "editor.action.goToTypeDefinition", "editor.action.explainSymbol", "editor.action.peekDeclaration", "editor.action.revealDeclaration", "editor.action.peekDefinition", "editor.action.revealDefinitionAside", "editor.action.revealDefinition"]; + super(60, "gotoLocation", i, { + "editor.gotoLocation.multiple": { + deprecationMessage: f(343, null) + }, + "editor.gotoLocation.multipleDefinitions": { + description: f(344, null), + ...e + }, + "editor.gotoLocation.multipleTypeDefinitions": { + description: f(345, null), + ...e + }, + "editor.gotoLocation.multipleDeclarations": { + description: f(346, null), + ...e + }, + "editor.gotoLocation.multipleImplementations": { + description: f(347, null), + ...e + }, + "editor.gotoLocation.multipleReferences": { + description: f(348, null), + ...e + }, + "editor.gotoLocation.alternativeDefinitionCommand": { + type: "string", + default: i.alternativeDefinitionCommand, + enum: t, + description: f(349, null) + }, + "editor.gotoLocation.alternativeTypeDefinitionCommand": { + type: "string", + default: i.alternativeTypeDefinitionCommand, + enum: t, + description: f(350, null) + }, + "editor.gotoLocation.alternativeDeclarationCommand": { + type: "string", + default: i.alternativeDeclarationCommand, + enum: t, + description: f(351, null) + }, + "editor.gotoLocation.alternativeImplementationCommand": { + type: "string", + default: i.alternativeImplementationCommand, + enum: t, + description: f(352, null) + }, + "editor.gotoLocation.alternativeReferenceCommand": { + type: "string", + default: i.alternativeReferenceCommand, + enum: t, + description: f(353, null) + } + }); + } + validate(i) { + if (!i || typeof i != "object") { + return this.defaultValue; + } + const e = i; + return { + multiple: Rf(e.multiple, this.defaultValue.multiple, ["peek", "gotoAndPeek", "goto"]), + multipleDefinitions: e.multipleDefinitions ?? Rf(e.multipleDefinitions, "peek", ["peek", "gotoAndPeek", "goto"]), + multipleTypeDefinitions: e.multipleTypeDefinitions ?? Rf(e.multipleTypeDefinitions, "peek", ["peek", "gotoAndPeek", "goto"]), + multipleDeclarations: e.multipleDeclarations ?? Rf(e.multipleDeclarations, "peek", ["peek", "gotoAndPeek", "goto"]), + multipleImplementations: e.multipleImplementations ?? Rf(e.multipleImplementations, "peek", ["peek", "gotoAndPeek", "goto"]), + multipleReferences: e.multipleReferences ?? Rf(e.multipleReferences, "peek", ["peek", "gotoAndPeek", "goto"]), + multipleTests: e.multipleTests ?? Rf(e.multipleTests, "peek", ["peek", "gotoAndPeek", "goto"]), + alternativeDefinitionCommand: Sx.string(e.alternativeDefinitionCommand, this.defaultValue.alternativeDefinitionCommand), + alternativeTypeDefinitionCommand: Sx.string(e.alternativeTypeDefinitionCommand, this.defaultValue.alternativeTypeDefinitionCommand), + alternativeDeclarationCommand: Sx.string(e.alternativeDeclarationCommand, this.defaultValue.alternativeDeclarationCommand), + alternativeImplementationCommand: Sx.string(e.alternativeImplementationCommand, this.defaultValue.alternativeImplementationCommand), + alternativeReferenceCommand: Sx.string(e.alternativeReferenceCommand, this.defaultValue.alternativeReferenceCommand), + alternativeTestsCommand: Sx.string(e.alternativeTestsCommand, this.defaultValue.alternativeTestsCommand) + }; + } + }; + zYi = class extends Zh { + constructor() { + const i = { + enabled: true, + delay: 300, + hidingDelay: 300, + sticky: true, + above: true + }; + super(62, "hover", i, { + "editor.hover.enabled": { + type: "boolean", + default: i.enabled, + description: f(354, null) + }, + "editor.hover.delay": { + type: "number", + default: i.delay, + minimum: 0, + maximum: 10000, + description: f(355, null) + }, + "editor.hover.sticky": { + type: "boolean", + default: i.sticky, + description: f(356, null) + }, + "editor.hover.hidingDelay": { + type: "integer", + minimum: 0, + default: i.hidingDelay, + description: f(357, null) + }, + "editor.hover.above": { + type: "boolean", + default: i.above, + description: f(358, null) + } + }); + } + validate(i) { + if (!i || typeof i != "object") { + return this.defaultValue; + } + const e = i; + return { + enabled: jr(e.enabled, this.defaultValue.enabled), + delay: Xd.clampedInt(e.delay, this.defaultValue.delay, 0, 10000), + sticky: jr(e.sticky, this.defaultValue.sticky), + hidingDelay: Xd.clampedInt(e.hidingDelay, this.defaultValue.hidingDelay, 0, 600000), + above: jr(e.above, this.defaultValue.above) + }; + } + }; + (function (i) { + i[i.None = 0] = "None"; + i[i.Text = 1] = "Text"; + i[i.Blocks = 2] = "Blocks"; + })(JYi ||= {}); + O8t = class dFt extends yj { + constructor() { + super(151); + } + compute(e, t, s) { + return dFt.computeLayout(t, { + memory: e.memory, + outerWidth: e.outerWidth, + outerHeight: e.outerHeight, + isDominatedByLongLines: e.isDominatedByLongLines, + lineHeight: e.fontInfo.lineHeight, + viewLineCount: e.viewLineCount, + lineNumbersDigitCount: e.lineNumbersDigitCount, + typicalHalfwidthCharacterWidth: e.fontInfo.typicalHalfwidthCharacterWidth, + maxDigitWidth: e.fontInfo.maxDigitWidth, + pixelRatio: e.pixelRatio, + glyphMarginDecorationLaneCount: e.glyphMarginDecorationLaneCount + }); + } + static computeContainedMinimapLineCount(e) { + const t = e.height / e.lineHeight; + const s = Math.floor(e.paddingTop / e.lineHeight); + let n = Math.floor(e.paddingBottom / e.lineHeight); + if (e.scrollBeyondLastLine) { + n = Math.max(n, t - 1); + } + const r = (s + e.viewLineCount + n) / (e.pixelRatio * e.height); + const o = Math.floor(e.viewLineCount / r); + return { + typicalViewportLineCount: t, + extraLinesBeforeFirstLine: s, + extraLinesBeyondLastLine: n, + desiredRatio: r, + minimapLineCount: o + }; + } + static c(e, t) { + const s = e.outerWidth; + const n = e.outerHeight; + const r = e.pixelRatio; + if (!e.minimap.enabled) { + return { + renderMinimap: 0, + minimapLeft: 0, + minimapWidth: 0, + minimapHeightIsEditorHeight: false, + minimapIsSampling: false, + minimapScale: 1, + minimapLineHeight: 1, + minimapCanvasInnerWidth: 0, + minimapCanvasInnerHeight: Math.floor(r * n), + minimapCanvasOuterWidth: 0, + minimapCanvasOuterHeight: n + }; + } + const o = t.stableMinimapLayoutInput; + const a = o && e.outerHeight === o.outerHeight && e.lineHeight === o.lineHeight && e.typicalHalfwidthCharacterWidth === o.typicalHalfwidthCharacterWidth && e.pixelRatio === o.pixelRatio && e.scrollBeyondLastLine === o.scrollBeyondLastLine && e.paddingTop === o.paddingTop && e.paddingBottom === o.paddingBottom && e.minimap.enabled === o.minimap.enabled && e.minimap.side === o.minimap.side && e.minimap.size === o.minimap.size && e.minimap.showSlider === o.minimap.showSlider && e.minimap.renderCharacters === o.minimap.renderCharacters && e.minimap.maxColumn === o.minimap.maxColumn && e.minimap.scale === o.minimap.scale && e.verticalScrollbarWidth === o.verticalScrollbarWidth && e.isViewportWrapping === o.isViewportWrapping; + const l = e.lineHeight; + const c = e.typicalHalfwidthCharacterWidth; + const u = e.scrollBeyondLastLine; + const d = e.minimap.renderCharacters; + let h = r >= 2 ? Math.round(e.minimap.scale * 2) : e.minimap.scale; + const g = e.minimap.maxColumn; + const p = e.minimap.size; + const b = e.minimap.side; + const v = e.verticalScrollbarWidth; + const y = e.viewLineCount; + const w = e.remainingWidth; + const C = e.isViewportWrapping; + const S = d ? 2 : 3; + let x = Math.floor(r * n); + const k = x / r; + let E = false; + let D = false; + let P = S * h; + let R = h / r; + let L = 1; + if (p === "fill" || p === "fit") { + const { + typicalViewportLineCount: ne, + extraLinesBeforeFirstLine: be, + extraLinesBeyondLastLine: ge, + desiredRatio: ce, + minimapLineCount: Se + } = dFt.computeContainedMinimapLineCount({ + viewLineCount: y, + scrollBeyondLastLine: u, + paddingTop: e.paddingTop, + paddingBottom: e.paddingBottom, + height: n, + lineHeight: l, + pixelRatio: r + }); + if (y / Se > 1) { + E = true; + D = true; + h = 1; + P = 1; + R = h / r; + } else { + let qe = false; + let Ae = h + 1; + if (p === "fit") { + const et = Math.ceil((be + y + ge) * P); + if (C && a && w <= t.stableFitRemainingWidth) { + qe = true; + Ae = t.stableFitMaxMinimapScale; + } else { + qe = et > x; + } + } + if (p === "fill" || qe) { + E = true; + const et = h; + P = Math.min(l * r, Math.max(1, Math.floor(1 / ce))); + if (C && a && w <= t.stableFitRemainingWidth) { + Ae = t.stableFitMaxMinimapScale; + } + h = Math.min(Ae, Math.max(1, Math.floor(P / S))); + if (h > et) { + L = Math.min(2, h / et); + } + R = h / r / L; + x = Math.ceil(Math.max(ne, be + y + ge) * P); + if (C) { + t.stableMinimapLayoutInput = e; + t.stableFitRemainingWidth = w; + t.stableFitMaxMinimapScale = h; + } else { + t.stableMinimapLayoutInput = null; + t.stableFitRemainingWidth = 0; + } + } + } + } + const F = Math.floor(g * R); + const O = Math.min(F, Math.max(0, Math.floor((w - v - 2) * R / (c + R))) + bM); + let U = Math.floor(r * O); + const j = U / r; + U = Math.floor(U * L); + const ie = d ? 1 : 2; + const ee = b === "left" ? 0 : s - O - v; + return { + renderMinimap: ie, + minimapLeft: ee, + minimapWidth: O, + minimapHeightIsEditorHeight: E, + minimapIsSampling: D, + minimapScale: h, + minimapLineHeight: P, + minimapCanvasInnerWidth: U, + minimapCanvasInnerHeight: x, + minimapCanvasOuterWidth: j, + minimapCanvasOuterHeight: k + }; + } + static computeLayout(e, t) { + const s = t.outerWidth | 0; + const n = t.outerHeight | 0; + const r = t.lineHeight | 0; + const o = t.lineNumbersDigitCount | 0; + const a = t.typicalHalfwidthCharacterWidth; + const l = t.maxDigitWidth; + const c = t.pixelRatio; + const u = t.viewLineCount; + const d = e.get(142); + const h = d === "inherit" ? e.get(141) : d; + const g = h === "inherit" ? e.get(137) : h; + const p = e.get(140); + const b = t.isDominatedByLongLines; + const v = e.get(59); + const y = e.get(69).renderType !== 0; + const w = e.get(70); + const C = e.get(110); + const S = e.get(88); + const x = e.get(74); + const k = e.get(108); + const E = k.verticalScrollbarSize; + const D = k.verticalHasArrows; + const P = k.arrowSize; + const R = k.horizontalScrollbarSize; + const L = e.get(45); + const F = e.get(115) !== "never"; + let O = e.get(67); + if (L && F) { + O += 16; + } + let U = 0; + if (y) { + const Mi = Math.max(o, w); + U = Math.round(Mi * l); + } + let j = 0; + if (v) { + j = r * t.glyphMarginDecorationLaneCount; + } + let ie = 0; + let ee = ie + j; + let ne = ee + U; + let be = ne + O; + const ge = s - j - U - O; + let ce = false; + let Se = false; + let $e = -1; + if (h === "inherit" && b) { + ce = true; + Se = true; + } else if (g === "on" || g === "bounded") { + Se = true; + } else if (g === "wordWrapColumn") { + $e = p; + } + const qe = dFt.c({ + outerWidth: s, + outerHeight: n, + lineHeight: r, + typicalHalfwidthCharacterWidth: a, + pixelRatio: c, + scrollBeyondLastLine: C, + paddingTop: S.top, + paddingBottom: S.bottom, + minimap: x, + verticalScrollbarWidth: E, + viewLineCount: u, + remainingWidth: ge, + isViewportWrapping: Se + }, t.memory || new F8t()); + if (qe.renderMinimap !== 0 && qe.minimapLeft === 0) { + ie += qe.minimapWidth; + ee += qe.minimapWidth; + ne += qe.minimapWidth; + be += qe.minimapWidth; + } + const Ae = ge - qe.minimapWidth; + const et = Math.max(1, Math.floor((Ae - E - 2) / a)); + const _t = D ? P : 0; + if (Se) { + $e = Math.max(1, et); + if (g === "bounded") { + $e = Math.min($e, p); + } + } + return { + width: s, + height: n, + glyphMarginLeft: ie, + glyphMarginWidth: j, + glyphMarginDecorationLaneCount: t.glyphMarginDecorationLaneCount, + lineNumbersLeft: ee, + lineNumbersWidth: U, + decorationsLeft: ne, + decorationsWidth: O, + contentLeft: be, + contentWidth: Ae, + minimap: qe, + viewportColumn: et, + isWordWrapMinified: ce, + isViewportWrapping: Se, + wrappingColumn: $e, + verticalScrollbarWidth: E, + horizontalScrollbarHeight: R, + overviewRuler: { + top: _t, + width: E, + height: n - _t * 2, + right: 0 + } + }; + } + }; + GYi = class extends Zh { + constructor() { + super(144, "wrappingStrategy", "simple", { + "editor.wrappingStrategy": { + enumDescriptions: [f(359, null), f(360, null)], + type: "string", + enum: ["simple", "advanced"], + default: "simple", + description: f(361, null) + } + }); + } + validate(i) { + return Rf(i, "simple", ["simple", "advanced"]); + } + compute(i, e, t) { + if (e.get(2) === 2) { + return "advanced"; + } else { + return t; + } + } + }; + (function (i) { + i.Off = "off"; + i.OnCode = "onCode"; + i.On = "on"; + })(MT ||= {}); + KYi = class extends Zh { + constructor() { + const i = { + enabled: MT.Off + }; + super(66, "lightbulb", i, { + "editor.lightbulb.enabled": { + type: "string", + enum: [MT.Off, MT.OnCode, MT.On], + default: i.enabled, + enumDescriptions: [f(362, null), f(363, null), f(364, null)], + description: f(365, null) + } + }); + } + validate(i) { + if (!i || typeof i != "object") { + return this.defaultValue; + } else { + return { + enabled: Rf(i.enabled, this.defaultValue.enabled, [MT.Off, MT.OnCode, MT.On]) + }; + } + } + }; + YYi = class extends Zh { + constructor() { + const i = { + enabled: true, + maxLineCount: 5, + defaultModel: "outlineModel", + scrollWithEditor: true + }; + super(120, "stickyScroll", i, { + "editor.stickyScroll.enabled": { + type: "boolean", + default: i.enabled, + description: f(366, null) + }, + "editor.stickyScroll.maxLineCount": { + type: "number", + default: i.maxLineCount, + minimum: 1, + maximum: 20, + description: f(367, null) + }, + "editor.stickyScroll.defaultModel": { + type: "string", + enum: ["outlineModel", "foldingProviderModel", "indentationModel"], + default: i.defaultModel, + description: f(368, null) + }, + "editor.stickyScroll.scrollWithEditor": { + type: "boolean", + default: i.scrollWithEditor, + description: f(369, null) + } + }); + } + validate(i) { + if (!i || typeof i != "object") { + return this.defaultValue; + } + const e = i; + return { + enabled: jr(e.enabled, this.defaultValue.enabled), + maxLineCount: Xd.clampedInt(e.maxLineCount, this.defaultValue.maxLineCount, 1, 20), + defaultModel: Rf(e.defaultModel, this.defaultValue.defaultModel, ["outlineModel", "foldingProviderModel", "indentationModel"]), + scrollWithEditor: jr(e.scrollWithEditor, this.defaultValue.scrollWithEditor) + }; + } + }; + XYi = class extends Zh { + constructor() { + const i = { + enabled: "on", + fontSize: 0, + fontFamily: "", + padding: false, + maximumLength: 43 + }; + super(146, "inlayHints", i, { + "editor.inlayHints.enabled": { + type: "string", + default: i.enabled, + description: f(370, null), + enum: ["on", "onUnlessPressed", "offUnlessPressed", "off"], + markdownEnumDescriptions: [f(371, null), f(372, null, Gt ? "Ctrl+Option" : "Ctrl+Alt"), f(373, null, Gt ? "Ctrl+Option" : "Ctrl+Alt"), f(374, null)] + }, + "editor.inlayHints.fontSize": { + type: "number", + default: i.fontSize, + markdownDescription: f(375, null, "`#editor.fontSize#`", "`5`") + }, + "editor.inlayHints.fontFamily": { + type: "string", + default: i.fontFamily, + markdownDescription: f(376, null, "`#editor.fontFamily#`") + }, + "editor.inlayHints.padding": { + type: "boolean", + default: i.padding, + description: f(377, null) + }, + "editor.inlayHints.maximumLength": { + type: "number", + default: i.maximumLength, + markdownDescription: f(378, null) + } + }); + } + validate(i) { + if (!i || typeof i != "object") { + return this.defaultValue; + } + const e = i; + if (typeof e.enabled == "boolean") { + e.enabled = e.enabled ? "on" : "off"; + } + return { + enabled: Rf(e.enabled, this.defaultValue.enabled, ["on", "off", "offUnlessPressed", "onUnlessPressed"]), + fontSize: Xd.clampedInt(e.fontSize, this.defaultValue.fontSize, 0, 100), + fontFamily: Sx.string(e.fontFamily, this.defaultValue.fontFamily), + padding: jr(e.padding, this.defaultValue.padding), + maximumLength: Xd.clampedInt(e.maximumLength, this.defaultValue.maximumLength, 0, Number.MAX_SAFE_INTEGER) + }; + } + }; + QYi = class extends Zh { + constructor() { + super(67, "lineDecorationsWidth", 10); + } + validate(i) { + if (typeof i == "string" && /^\d+(\.\d+)?ch$/.test(i)) { + return -parseFloat(i.substring(0, i.length - 2)); + } else { + return Xd.clampedInt(i, this.defaultValue, 0, 1000); + } + } + compute(i, e, t) { + if (t < 0) { + return Xd.clampedInt(-t * i.fontInfo.typicalHalfwidthCharacterWidth, this.defaultValue, 0, 1000); + } else { + return t; + } + } + }; + ZYi = class extends NT { + constructor() { + super(68, "lineHeight", Qf.lineHeight, i => NT.clamp(i, 0, 150), { + markdownDescription: f(379, null) + }); + } + compute(i, e, t) { + return i.fontInfo.lineHeight; + } + }; + eXi = class extends Zh { + constructor() { + const i = { + enabled: false, + size: "proportional", + side: "right", + showSlider: "mouseover", + autohide: false, + renderCharacters: true, + maxColumn: 120, + scale: 1, + showRegionSectionHeaders: true, + showMarkSectionHeaders: true, + sectionHeaderFontSize: 9, + sectionHeaderLetterSpacing: 1 + }; + super(74, "minimap", i, { + "editor.minimap.enabled": { + type: "boolean", + default: i.enabled, + description: f(380, null) + }, + "editor.minimap.autohide": { + type: "boolean", + default: i.autohide, + description: f(381, null) + }, + "editor.minimap.size": { + type: "string", + enum: ["proportional", "fill", "fit"], + enumDescriptions: [f(382, null), f(383, null), f(384, null)], + default: i.size, + description: f(385, null) + }, + "editor.minimap.side": { + type: "string", + enum: ["left", "right"], + default: i.side, + description: f(386, null) + }, + "editor.minimap.showSlider": { + type: "string", + enum: ["always", "mouseover"], + default: i.showSlider, + description: f(387, null) + }, + "editor.minimap.scale": { + type: "number", + default: i.scale, + minimum: 1, + maximum: 3, + enum: [1, 2, 3], + description: f(388, null) + }, + "editor.minimap.renderCharacters": { + type: "boolean", + default: i.renderCharacters, + description: f(389, null) + }, + "editor.minimap.maxColumn": { + type: "number", + default: i.maxColumn, + description: f(390, null) + }, + "editor.minimap.showRegionSectionHeaders": { + type: "boolean", + default: i.showRegionSectionHeaders, + description: f(391, null) + }, + "editor.minimap.showMarkSectionHeaders": { + type: "boolean", + default: i.showMarkSectionHeaders, + description: f(392, null) + }, + "editor.minimap.sectionHeaderFontSize": { + type: "number", + default: i.sectionHeaderFontSize, + description: f(393, null) + }, + "editor.minimap.sectionHeaderLetterSpacing": { + type: "number", + default: i.sectionHeaderLetterSpacing, + description: f(394, null) + } + }); + } + validate(i) { + if (!i || typeof i != "object") { + return this.defaultValue; + } + const e = i; + return { + enabled: jr(e.enabled, this.defaultValue.enabled), + autohide: jr(e.autohide, this.defaultValue.autohide), + size: Rf(e.size, this.defaultValue.size, ["proportional", "fill", "fit"]), + side: Rf(e.side, this.defaultValue.side, ["right", "left"]), + showSlider: Rf(e.showSlider, this.defaultValue.showSlider, ["always", "mouseover"]), + renderCharacters: jr(e.renderCharacters, this.defaultValue.renderCharacters), + scale: Xd.clampedInt(e.scale, 1, 1, 3), + maxColumn: Xd.clampedInt(e.maxColumn, this.defaultValue.maxColumn, 1, 10000), + showRegionSectionHeaders: jr(e.showRegionSectionHeaders, this.defaultValue.showRegionSectionHeaders), + showMarkSectionHeaders: jr(e.showMarkSectionHeaders, this.defaultValue.showMarkSectionHeaders), + sectionHeaderFontSize: NT.clamp(e.sectionHeaderFontSize ?? this.defaultValue.sectionHeaderFontSize, 4, 32), + sectionHeaderLetterSpacing: NT.clamp(e.sectionHeaderLetterSpacing ?? this.defaultValue.sectionHeaderLetterSpacing, 0, 5) + }; + } + }; + tXi = class extends Zh { + constructor() { + super(88, "padding", { + top: 0, + bottom: 0 + }, { + "editor.padding.top": { + type: "number", + default: 0, + minimum: 0, + maximum: 1000, + description: f(395, null) + }, + "editor.padding.bottom": { + type: "number", + default: 0, + minimum: 0, + maximum: 1000, + description: f(396, null) + } + }); + } + validate(i) { + if (!i || typeof i != "object") { + return this.defaultValue; + } + const e = i; + return { + top: Xd.clampedInt(e.top, 0, 0, 1000), + bottom: Xd.clampedInt(e.bottom, 0, 0, 1000) + }; + } + }; + iXi = class extends Zh { + constructor() { + const i = { + enabled: true, + cycle: true + }; + super(90, "parameterHints", i, { + "editor.parameterHints.enabled": { + type: "boolean", + default: i.enabled, + description: f(397, null) + }, + "editor.parameterHints.cycle": { + type: "boolean", + default: i.cycle, + description: f(398, null) + } + }); + } + validate(i) { + if (!i || typeof i != "object") { + return this.defaultValue; + } + const e = i; + return { + enabled: jr(e.enabled, this.defaultValue.enabled), + cycle: jr(e.cycle, this.defaultValue.cycle) + }; + } + }; + sXi = class extends yj { + constructor() { + super(149); + } + compute(i, e, t) { + return i.pixelRatio; + } + }; + nXi = class extends Zh { + constructor() { + super(92, "placeholder", undefined); + } + validate(i) { + if (typeof i === "undefined") { + return this.defaultValue; + } else if (typeof i == "string") { + return i; + } else { + return this.defaultValue; + } + } + }; + rXi = class extends Zh { + constructor() { + const i = { + other: "on", + comments: "off", + strings: "off" + }; + const e = [{ + type: "boolean" + }, { + type: "string", + enum: ["on", "inline", "off"], + enumDescriptions: [f(399, null), f(400, null), f(401, null)] + }]; + super(94, "quickSuggestions", i, { + type: "object", + additionalProperties: false, + properties: { + strings: { + anyOf: e, + default: i.strings, + description: f(402, null) + }, + comments: { + anyOf: e, + default: i.comments, + description: f(403, null) + }, + other: { + anyOf: e, + default: i.other, + description: f(404, null) + } + }, + default: i, + markdownDescription: f(405, null, "`#editor.suggestOnTriggerCharacters#`") + }); + this.defaultValue = i; + } + validate(i) { + if (typeof i == "boolean") { + const l = i ? "on" : "off"; + return { + comments: l, + strings: l, + other: l + }; + } + if (!i || typeof i != "object") { + return this.defaultValue; + } + const { + other: e, + comments: t, + strings: s + } = i; + const n = ["on", "inline", "off"]; + let r; + let o; + let a; + if (typeof e == "boolean") { + r = e ? "on" : "off"; + } else { + r = Rf(e, this.defaultValue.other, n); + } + if (typeof t == "boolean") { + o = t ? "on" : "off"; + } else { + o = Rf(t, this.defaultValue.comments, n); + } + if (typeof s == "boolean") { + a = s ? "on" : "off"; + } else { + a = Rf(s, this.defaultValue.strings, n); + } + return { + other: r, + comments: o, + strings: a + }; + } + }; + (function (i) { + i[i.Off = 0] = "Off"; + i[i.On = 1] = "On"; + i[i.Relative = 2] = "Relative"; + i[i.Interval = 3] = "Interval"; + i[i.Custom = 4] = "Custom"; + })(oXi ||= {}); + aXi = class extends Zh { + constructor() { + super(69, "lineNumbers", { + renderType: 1, + renderFn: null + }, { + type: "string", + enum: ["off", "on", "relative", "interval"], + enumDescriptions: [f(406, null), f(407, null), f(408, null), f(409, null)], + default: "on", + description: f(410, null) + }); + } + validate(i) { + let e = this.defaultValue.renderType; + let t = this.defaultValue.renderFn; + if (typeof i !== "undefined") { + if (typeof i == "function") { + e = 4; + t = i; + } else if (i === "interval") { + e = 3; + } else if (i === "relative") { + e = 2; + } else if (i === "on") { + e = 1; + } else { + e = 0; + } + } + return { + renderType: e, + renderFn: t + }; + } + }; + lXi = class extends Zh { + constructor() { + const i = []; + const e = { + type: "number", + description: f(411, null) + }; + super(107, "rulers", i, { + type: "array", + items: { + anyOf: [e, { + type: ["object"], + properties: { + column: e, + color: { + type: "string", + description: f(412, null), + format: "color-hex" + } + } + }] + }, + default: i, + description: f(413, null) + }); + } + validate(i) { + if (Array.isArray(i)) { + const e = []; + for (const t of i) { + if (typeof t == "number") { + e.push({ + column: Xd.clampedInt(t, 0, 0, 10000), + color: null + }); + } else if (t && typeof t == "object") { + const s = t; + e.push({ + column: Xd.clampedInt(s.column, 0, 0, 10000), + color: s.color + }); + } + } + e.sort((t, s) => t.column - s.column); + return e; + } + return this.defaultValue; + } + }; + cXi = class extends Zh { + constructor() { + super(97, "readOnlyMessage", undefined); + } + validate(i) { + if (!i || typeof i != "object") { + return this.defaultValue; + } else { + return i; + } + } + }; + uXi = class extends Zh { + constructor() { + const i = { + vertical: 1, + horizontal: 1, + arrowSize: 11, + useShadows: true, + verticalHasArrows: false, + horizontalHasArrows: false, + horizontalScrollbarSize: 12, + horizontalSliderSize: 12, + verticalScrollbarSize: 14, + verticalSliderSize: 14, + handleMouseWheel: true, + ignoreVerticalScrolling: false, + alwaysConsumeMouseWheel: true, + scrollByPage: false, + ignoreHorizontalScrollbarInContentHeight: false + }; + super(108, "scrollbar", i, { + "editor.scrollbar.vertical": { + type: "string", + enum: ["auto", "visible", "hidden"], + enumDescriptions: [f(414, null), f(415, null), f(416, null)], + default: "auto", + description: f(417, null) + }, + "editor.scrollbar.horizontal": { + type: "string", + enum: ["auto", "visible", "hidden"], + enumDescriptions: [f(418, null), f(419, null), f(420, null)], + default: "auto", + description: f(421, null) + }, + "editor.scrollbar.verticalScrollbarSize": { + type: "number", + default: i.verticalScrollbarSize, + description: f(422, null) + }, + "editor.scrollbar.horizontalScrollbarSize": { + type: "number", + default: i.horizontalScrollbarSize, + description: f(423, null) + }, + "editor.scrollbar.scrollByPage": { + type: "boolean", + default: i.scrollByPage, + description: f(424, null) + }, + "editor.scrollbar.ignoreHorizontalScrollbarInContentHeight": { + type: "boolean", + default: i.ignoreHorizontalScrollbarInContentHeight, + description: f(425, null) + } + }); + } + validate(i) { + if (!i || typeof i != "object") { + return this.defaultValue; + } + const e = i; + const t = Xd.clampedInt(e.horizontalScrollbarSize, this.defaultValue.horizontalScrollbarSize, 0, 1000); + const s = Xd.clampedInt(e.verticalScrollbarSize, this.defaultValue.verticalScrollbarSize, 0, 1000); + return { + arrowSize: Xd.clampedInt(e.arrowSize, this.defaultValue.arrowSize, 0, 1000), + vertical: NYi(e.vertical, this.defaultValue.vertical), + horizontal: NYi(e.horizontal, this.defaultValue.horizontal), + useShadows: jr(e.useShadows, this.defaultValue.useShadows), + verticalHasArrows: jr(e.verticalHasArrows, this.defaultValue.verticalHasArrows), + horizontalHasArrows: jr(e.horizontalHasArrows, this.defaultValue.horizontalHasArrows), + handleMouseWheel: jr(e.handleMouseWheel, this.defaultValue.handleMouseWheel), + ignoreVerticalScrolling: jr(e.ignoreVerticalScrolling, this.defaultValue.ignoreVerticalScrolling), + alwaysConsumeMouseWheel: jr(e.alwaysConsumeMouseWheel, this.defaultValue.alwaysConsumeMouseWheel), + horizontalScrollbarSize: t, + horizontalSliderSize: Xd.clampedInt(e.horizontalSliderSize, t, 0, 1000), + verticalScrollbarSize: s, + verticalSliderSize: Xd.clampedInt(e.verticalSliderSize, s, 0, 1000), + scrollByPage: jr(e.scrollByPage, this.defaultValue.scrollByPage), + ignoreHorizontalScrollbarInContentHeight: jr(e.ignoreHorizontalScrollbarInContentHeight, this.defaultValue.ignoreHorizontalScrollbarInContentHeight) + }; + } + }; + Xk = "inUntrustedWorkspace"; + n1 = { + allowedCharacters: "editor.unicodeHighlight.allowedCharacters", + invisibleCharacters: "editor.unicodeHighlight.invisibleCharacters", + nonBasicASCII: "editor.unicodeHighlight.nonBasicASCII", + ambiguousCharacters: "editor.unicodeHighlight.ambiguousCharacters", + includeComments: "editor.unicodeHighlight.includeComments", + includeStrings: "editor.unicodeHighlight.includeStrings", + allowedLocales: "editor.unicodeHighlight.allowedLocales" + }; + dXi = class extends Zh { + constructor() { + const i = { + nonBasicASCII: Xk, + invisibleCharacters: true, + ambiguousCharacters: true, + includeComments: Xk, + includeStrings: true, + allowedCharacters: {}, + allowedLocales: { + _os: true, + _vscode: true + } + }; + super(130, "unicodeHighlight", i, { + [n1.nonBasicASCII]: { + restricted: true, + type: ["boolean", "string"], + enum: [true, false, Xk], + default: i.nonBasicASCII, + description: f(426, null) + }, + [n1.invisibleCharacters]: { + restricted: true, + type: "boolean", + default: i.invisibleCharacters, + description: f(427, null) + }, + [n1.ambiguousCharacters]: { + restricted: true, + type: "boolean", + default: i.ambiguousCharacters, + description: f(428, null) + }, + [n1.includeComments]: { + restricted: true, + type: ["boolean", "string"], + enum: [true, false, Xk], + default: i.includeComments, + description: f(429, null) + }, + [n1.includeStrings]: { + restricted: true, + type: ["boolean", "string"], + enum: [true, false, Xk], + default: i.includeStrings, + description: f(430, null) + }, + [n1.allowedCharacters]: { + restricted: true, + type: "object", + default: i.allowedCharacters, + description: f(431, null), + additionalProperties: { + type: "boolean" + } + }, + [n1.allowedLocales]: { + restricted: true, + type: "object", + additionalProperties: { + type: "boolean" + }, + default: i.allowedLocales, + description: f(432, null) + } + }); + } + applyUpdate(i, e) { + let t = false; + if (e.allowedCharacters && i) { + if (!Ul(i.allowedCharacters, e.allowedCharacters)) { + i = { + ...i, + allowedCharacters: e.allowedCharacters + }; + t = true; + } + } + if (e.allowedLocales && i) { + if (!Ul(i.allowedLocales, e.allowedLocales)) { + i = { + ...i, + allowedLocales: e.allowedLocales + }; + t = true; + } + } + const s = super.applyUpdate(i, e); + if (t) { + return new _ge(s.newValue, true); + } else { + return s; + } + } + validate(i) { + if (!i || typeof i != "object") { + return this.defaultValue; + } + const e = i; + return { + nonBasicASCII: Wee(e.nonBasicASCII, Xk, [true, false, Xk]), + invisibleCharacters: jr(e.invisibleCharacters, this.defaultValue.invisibleCharacters), + ambiguousCharacters: jr(e.ambiguousCharacters, this.defaultValue.ambiguousCharacters), + includeComments: Wee(e.includeComments, Xk, [true, false, Xk]), + includeStrings: Wee(e.includeStrings, Xk, [true, false, Xk]), + allowedCharacters: this.c(i.allowedCharacters, this.defaultValue.allowedCharacters), + allowedLocales: this.c(i.allowedLocales, this.defaultValue.allowedLocales) + }; + } + c(i, e) { + if (typeof i != "object" || !i) { + return e; + } + const t = {}; + for (const [s, n] of Object.entries(i)) { + if (n === true) { + t[s] = true; + } + } + return t; + } + }; + hXi = class extends Zh { + constructor() { + const i = { + enabled: true, + mode: "subwordSmart", + showToolbar: "onHover", + suppressSuggestions: false, + keepOnBlur: false, + fontFamily: "default", + syntaxHighlightingEnabled: false, + edits: { + experimental: { + enabled: true, + useMixedLinesDiff: "never", + useInterleavedLinesDiff: "never", + onlyShowWhenCloseToCursor: true + } + } + }; + super(64, "inlineSuggest", i, { + "editor.inlineSuggest.enabled": { + type: "boolean", + default: i.enabled, + description: f(433, null) + }, + "editor.inlineSuggest.showToolbar": { + type: "string", + default: i.showToolbar, + enum: ["always", "onHover", "never"], + enumDescriptions: [f(434, null), f(435, null), f(436, null)], + description: f(437, null) + }, + "editor.inlineSuggest.syntaxHighlightingEnabled": { + type: "boolean", + default: i.syntaxHighlightingEnabled, + description: f(438, null) + }, + "editor.inlineSuggest.suppressSuggestions": { + type: "boolean", + default: i.suppressSuggestions, + description: f(439, null) + }, + "editor.inlineSuggest.fontFamily": { + type: "string", + default: i.fontFamily, + description: f(440, null) + }, + "editor.inlineSuggest.edits.experimental.enabled": { + type: "boolean", + default: i.edits.experimental.enabled, + description: f(441, null) + }, + "editor.inlineSuggest.edits.experimental.useMixedLinesDiff": { + type: "string", + default: i.edits.experimental.useMixedLinesDiff, + description: f(442, null), + enum: ["never", "whenPossible"] + }, + "editor.inlineSuggest.edits.experimental.useInterleavedLinesDiff": { + type: "string", + default: i.edits.experimental.useInterleavedLinesDiff, + description: f(443, null), + enum: ["never", "always", "afterJump"] + }, + "editor.inlineSuggest.edits.experimental.onlyShowWhenCloseToCursor": { + type: "boolean", + default: i.edits.experimental.onlyShowWhenCloseToCursor, + description: f(444, null) + } + }); + } + validate(i) { + if (!i || typeof i != "object") { + return this.defaultValue; + } + const e = i; + return { + enabled: jr(e.enabled, this.defaultValue.enabled), + mode: Rf(e.mode, this.defaultValue.mode, ["prefix", "subword", "subwordSmart"]), + showToolbar: Rf(e.showToolbar, this.defaultValue.showToolbar, ["always", "onHover", "never"]), + suppressSuggestions: jr(e.suppressSuggestions, this.defaultValue.suppressSuggestions), + keepOnBlur: jr(e.keepOnBlur, this.defaultValue.keepOnBlur), + fontFamily: Sx.string(e.fontFamily, this.defaultValue.fontFamily), + syntaxHighlightingEnabled: jr(e.syntaxHighlightingEnabled, this.defaultValue.syntaxHighlightingEnabled), + edits: { + experimental: { + enabled: jr(e.edits?.experimental?.enabled, this.defaultValue.edits.experimental.enabled), + useMixedLinesDiff: Rf(e.edits?.experimental?.useMixedLinesDiff, this.defaultValue.edits.experimental.useMixedLinesDiff, ["never", "whenPossible", "afterJumpWhenPossible"]), + useInterleavedLinesDiff: Rf(e.edits?.experimental?.useInterleavedLinesDiff, this.defaultValue.edits.experimental.useInterleavedLinesDiff, ["never", "always", "afterJump"]), + onlyShowWhenCloseToCursor: jr(e.edits?.experimental?.onlyShowWhenCloseToCursor, this.defaultValue.edits.experimental.onlyShowWhenCloseToCursor) + } + } + }; + } + }; + fXi = class extends Zh { + constructor() { + const i = { + enabled: Aw.bracketPairColorizationOptions.enabled, + independentColorPoolPerBracketType: Aw.bracketPairColorizationOptions.independentColorPoolPerBracketType + }; + super(15, "bracketPairColorization", i, { + "editor.bracketPairColorization.enabled": { + type: "boolean", + default: i.enabled, + markdownDescription: f(445, null, "`#workbench.colorCustomizations#`") + }, + "editor.bracketPairColorization.independentColorPoolPerBracketType": { + type: "boolean", + default: i.independentColorPoolPerBracketType, + description: f(446, null) + } + }); + } + validate(i) { + if (!i || typeof i != "object") { + return this.defaultValue; + } + const e = i; + return { + enabled: jr(e.enabled, this.defaultValue.enabled), + independentColorPoolPerBracketType: jr(e.independentColorPoolPerBracketType, this.defaultValue.independentColorPoolPerBracketType) + }; + } + }; + gXi = class extends Zh { + constructor() { + const i = { + bracketPairs: false, + bracketPairsHorizontal: "active", + highlightActiveBracketPair: true, + indentation: true, + highlightActiveIndentation: true + }; + super(16, "guides", i, { + "editor.guides.bracketPairs": { + type: ["boolean", "string"], + enum: [true, "active", false], + enumDescriptions: [f(447, null), f(448, null), f(449, null)], + default: i.bracketPairs, + description: f(450, null) + }, + "editor.guides.bracketPairsHorizontal": { + type: ["boolean", "string"], + enum: [true, "active", false], + enumDescriptions: [f(451, null), f(452, null), f(453, null)], + default: i.bracketPairsHorizontal, + description: f(454, null) + }, + "editor.guides.highlightActiveBracketPair": { + type: "boolean", + default: i.highlightActiveBracketPair, + description: f(455, null) + }, + "editor.guides.indentation": { + type: "boolean", + default: i.indentation, + description: f(456, null) + }, + "editor.guides.highlightActiveIndentation": { + type: ["boolean", "string"], + enum: [true, "always", false], + enumDescriptions: [f(457, null), f(458, null), f(459, null)], + default: i.highlightActiveIndentation, + description: f(460, null) + } + }); + } + validate(i) { + if (!i || typeof i != "object") { + return this.defaultValue; + } + const e = i; + return { + bracketPairs: Wee(e.bracketPairs, this.defaultValue.bracketPairs, [true, false, "active"]), + bracketPairsHorizontal: Wee(e.bracketPairsHorizontal, this.defaultValue.bracketPairsHorizontal, [true, false, "active"]), + highlightActiveBracketPair: jr(e.highlightActiveBracketPair, this.defaultValue.highlightActiveBracketPair), + indentation: jr(e.indentation, this.defaultValue.indentation), + highlightActiveIndentation: Wee(e.highlightActiveIndentation, this.defaultValue.highlightActiveIndentation, [true, false, "always"]) + }; + } + }; + pXi = class extends Zh { + constructor() { + const i = { + insertMode: "insert", + filterGraceful: true, + snippetsPreventQuickSuggestions: false, + localityBonus: false, + shareSuggestSelections: false, + selectionMode: "always", + showIcons: true, + showStatusBar: false, + preview: false, + previewMode: "subwordSmart", + showInlineDetails: true, + showMethods: true, + showFunctions: true, + showConstructors: true, + showDeprecated: true, + matchOnWordStartOnly: true, + showFields: true, + showVariables: true, + showClasses: true, + showStructs: true, + showInterfaces: true, + showModules: true, + showProperties: true, + showEvents: true, + showOperators: true, + showUnits: true, + showValues: true, + showConstants: true, + showEnums: true, + showEnumMembers: true, + showKeywords: true, + showWords: true, + showColors: true, + showFiles: true, + showReferences: true, + showFolders: true, + showTypeParameters: true, + showSnippets: true, + showUsers: true, + showIssues: true + }; + super(123, "suggest", i, { + "editor.suggest.insertMode": { + type: "string", + enum: ["insert", "replace"], + enumDescriptions: [f(461, null), f(462, null)], + default: i.insertMode, + description: f(463, null) + }, + "editor.suggest.filterGraceful": { + type: "boolean", + default: i.filterGraceful, + description: f(464, null) + }, + "editor.suggest.localityBonus": { + type: "boolean", + default: i.localityBonus, + description: f(465, null) + }, + "editor.suggest.shareSuggestSelections": { + type: "boolean", + default: i.shareSuggestSelections, + markdownDescription: f(466, null) + }, + "editor.suggest.selectionMode": { + type: "string", + enum: ["always", "never", "whenTriggerCharacter", "whenQuickSuggestion"], + enumDescriptions: [f(467, null), f(468, null), f(469, null), f(470, null)], + default: i.selectionMode, + markdownDescription: f(471, null, "`#editor.quickSuggestions#`", "`#editor.suggestOnTriggerCharacters#`") + }, + "editor.suggest.snippetsPreventQuickSuggestions": { + type: "boolean", + default: i.snippetsPreventQuickSuggestions, + description: f(472, null) + }, + "editor.suggest.showIcons": { + type: "boolean", + default: i.showIcons, + description: f(473, null) + }, + "editor.suggest.showStatusBar": { + type: "boolean", + default: i.showStatusBar, + description: f(474, null) + }, + "editor.suggest.preview": { + type: "boolean", + default: i.preview, + description: f(475, null) + }, + "editor.suggest.showInlineDetails": { + type: "boolean", + default: i.showInlineDetails, + description: f(476, null) + }, + "editor.suggest.maxVisibleSuggestions": { + type: "number", + deprecationMessage: f(477, null) + }, + "editor.suggest.filteredTypes": { + type: "object", + deprecationMessage: f(478, null) + }, + "editor.suggest.showMethods": { + type: "boolean", + default: true, + markdownDescription: f(479, null) + }, + "editor.suggest.showFunctions": { + type: "boolean", + default: true, + markdownDescription: f(480, null) + }, + "editor.suggest.showConstructors": { + type: "boolean", + default: true, + markdownDescription: f(481, null) + }, + "editor.suggest.showDeprecated": { + type: "boolean", + default: true, + markdownDescription: f(482, null) + }, + "editor.suggest.matchOnWordStartOnly": { + type: "boolean", + default: true, + markdownDescription: f(483, null) + }, + "editor.suggest.showFields": { + type: "boolean", + default: true, + markdownDescription: f(484, null) + }, + "editor.suggest.showVariables": { + type: "boolean", + default: true, + markdownDescription: f(485, null) + }, + "editor.suggest.showClasses": { + type: "boolean", + default: true, + markdownDescription: f(486, null) + }, + "editor.suggest.showStructs": { + type: "boolean", + default: true, + markdownDescription: f(487, null) + }, + "editor.suggest.showInterfaces": { + type: "boolean", + default: true, + markdownDescription: f(488, null) + }, + "editor.suggest.showModules": { + type: "boolean", + default: true, + markdownDescription: f(489, null) + }, + "editor.suggest.showProperties": { + type: "boolean", + default: true, + markdownDescription: f(490, null) + }, + "editor.suggest.showEvents": { + type: "boolean", + default: true, + markdownDescription: f(491, null) + }, + "editor.suggest.showOperators": { + type: "boolean", + default: true, + markdownDescription: f(492, null) + }, + "editor.suggest.showUnits": { + type: "boolean", + default: true, + markdownDescription: f(493, null) + }, + "editor.suggest.showValues": { + type: "boolean", + default: true, + markdownDescription: f(494, null) + }, + "editor.suggest.showConstants": { + type: "boolean", + default: true, + markdownDescription: f(495, null) + }, + "editor.suggest.showEnums": { + type: "boolean", + default: true, + markdownDescription: f(496, null) + }, + "editor.suggest.showEnumMembers": { + type: "boolean", + default: true, + markdownDescription: f(497, null) + }, + "editor.suggest.showKeywords": { + type: "boolean", + default: true, + markdownDescription: f(498, null) + }, + "editor.suggest.showWords": { + type: "boolean", + default: true, + markdownDescription: f(499, null) + }, + "editor.suggest.showColors": { + type: "boolean", + default: true, + markdownDescription: f(500, null) + }, + "editor.suggest.showFiles": { + type: "boolean", + default: true, + markdownDescription: f(501, null) + }, + "editor.suggest.showReferences": { + type: "boolean", + default: true, + markdownDescription: f(502, null) + }, + "editor.suggest.showCustomcolors": { + type: "boolean", + default: true, + markdownDescription: f(503, null) + }, + "editor.suggest.showFolders": { + type: "boolean", + default: true, + markdownDescription: f(504, null) + }, + "editor.suggest.showTypeParameters": { + type: "boolean", + default: true, + markdownDescription: f(505, null) + }, + "editor.suggest.showSnippets": { + type: "boolean", + default: true, + markdownDescription: f(506, null) + }, + "editor.suggest.showUsers": { + type: "boolean", + default: true, + markdownDescription: f(507, null) + }, + "editor.suggest.showIssues": { + type: "boolean", + default: true, + markdownDescription: f(508, null) + } + }); + } + validate(i) { + if (!i || typeof i != "object") { + return this.defaultValue; + } + const e = i; + return { + insertMode: Rf(e.insertMode, this.defaultValue.insertMode, ["insert", "replace"]), + filterGraceful: jr(e.filterGraceful, this.defaultValue.filterGraceful), + snippetsPreventQuickSuggestions: jr(e.snippetsPreventQuickSuggestions, this.defaultValue.filterGraceful), + localityBonus: jr(e.localityBonus, this.defaultValue.localityBonus), + shareSuggestSelections: jr(e.shareSuggestSelections, this.defaultValue.shareSuggestSelections), + selectionMode: Rf(e.selectionMode, this.defaultValue.selectionMode, ["always", "never", "whenQuickSuggestion", "whenTriggerCharacter"]), + showIcons: jr(e.showIcons, this.defaultValue.showIcons), + showStatusBar: jr(e.showStatusBar, this.defaultValue.showStatusBar), + preview: jr(e.preview, this.defaultValue.preview), + previewMode: Rf(e.previewMode, this.defaultValue.previewMode, ["prefix", "subword", "subwordSmart"]), + showInlineDetails: jr(e.showInlineDetails, this.defaultValue.showInlineDetails), + showMethods: jr(e.showMethods, this.defaultValue.showMethods), + showFunctions: jr(e.showFunctions, this.defaultValue.showFunctions), + showConstructors: jr(e.showConstructors, this.defaultValue.showConstructors), + showDeprecated: jr(e.showDeprecated, this.defaultValue.showDeprecated), + matchOnWordStartOnly: jr(e.matchOnWordStartOnly, this.defaultValue.matchOnWordStartOnly), + showFields: jr(e.showFields, this.defaultValue.showFields), + showVariables: jr(e.showVariables, this.defaultValue.showVariables), + showClasses: jr(e.showClasses, this.defaultValue.showClasses), + showStructs: jr(e.showStructs, this.defaultValue.showStructs), + showInterfaces: jr(e.showInterfaces, this.defaultValue.showInterfaces), + showModules: jr(e.showModules, this.defaultValue.showModules), + showProperties: jr(e.showProperties, this.defaultValue.showProperties), + showEvents: jr(e.showEvents, this.defaultValue.showEvents), + showOperators: jr(e.showOperators, this.defaultValue.showOperators), + showUnits: jr(e.showUnits, this.defaultValue.showUnits), + showValues: jr(e.showValues, this.defaultValue.showValues), + showConstants: jr(e.showConstants, this.defaultValue.showConstants), + showEnums: jr(e.showEnums, this.defaultValue.showEnums), + showEnumMembers: jr(e.showEnumMembers, this.defaultValue.showEnumMembers), + showKeywords: jr(e.showKeywords, this.defaultValue.showKeywords), + showWords: jr(e.showWords, this.defaultValue.showWords), + showColors: jr(e.showColors, this.defaultValue.showColors), + showFiles: jr(e.showFiles, this.defaultValue.showFiles), + showReferences: jr(e.showReferences, this.defaultValue.showReferences), + showFolders: jr(e.showFolders, this.defaultValue.showFolders), + showTypeParameters: jr(e.showTypeParameters, this.defaultValue.showTypeParameters), + showSnippets: jr(e.showSnippets, this.defaultValue.showSnippets), + showUsers: jr(e.showUsers, this.defaultValue.showUsers), + showIssues: jr(e.showIssues, this.defaultValue.showIssues) + }; + } + }; + mXi = class extends Zh { + constructor() { + super(118, "smartSelect", { + selectLeadingAndTrailingWhitespace: true, + selectSubwords: true + }, { + "editor.smartSelect.selectLeadingAndTrailingWhitespace": { + description: f(509, null), + default: true, + type: "boolean" + }, + "editor.smartSelect.selectSubwords": { + description: f(510, null), + default: true, + type: "boolean" + } + }); + } + validate(i) { + if (!i || typeof i != "object") { + return this.defaultValue; + } else { + return { + selectLeadingAndTrailingWhitespace: jr(i.selectLeadingAndTrailingWhitespace, this.defaultValue.selectLeadingAndTrailingWhitespace), + selectSubwords: jr(i.selectSubwords, this.defaultValue.selectSubwords) + }; + } + } + }; + bXi = class extends Zh { + constructor() { + const i = []; + super(135, "wordSegmenterLocales", i, { + anyOf: [{ + description: f(511, null), + type: "string" + }, { + description: f(512, null), + type: "array", + items: { + type: "string" + } + }] + }); + } + validate(i) { + if (typeof i == "string") { + i = [i]; + } + if (Array.isArray(i)) { + const e = []; + for (const t of i) { + if (typeof t == "string") { + try { + if (Intl.Segmenter.supportedLocalesOf(t).length > 0) { + e.push(t); + } + } catch {} + } + } + return e; + } + return this.defaultValue; + } + }; + (function (i) { + i[i.None = 0] = "None"; + i[i.Same = 1] = "Same"; + i[i.Indent = 2] = "Indent"; + i[i.DeepIndent = 3] = "DeepIndent"; + })(vXi ||= {}); + yXi = class extends Zh { + constructor() { + super(143, "wrappingIndent", 1, { + "editor.wrappingIndent": { + type: "string", + enum: ["none", "same", "indent", "deepIndent"], + enumDescriptions: [f(513, null), f(514, null), f(515, null), f(516, null)], + description: f(517, null), + default: "same" + } + }); + } + validate(i) { + switch (i) { + case "none": + return 0; + case "same": + return 1; + case "indent": + return 2; + case "deepIndent": + return 3; + } + return 1; + } + compute(i, e, t) { + if (e.get(2) === 2) { + return 0; + } else { + return t; + } + } + }; + wXi = class extends yj { + constructor() { + super(152); + } + compute(i, e, t) { + const s = e.get(151); + return { + isDominatedByLongLines: i.isDominatedByLongLines, + isWordWrapMinified: s.isWordWrapMinified, + isViewportWrapping: s.isViewportWrapping, + wrappingColumn: s.wrappingColumn + }; + } + }; + CXi = class extends Zh { + constructor() { + const i = { + enabled: true, + showDropSelector: "afterDrop" + }; + super(36, "dropIntoEditor", i, { + "editor.dropIntoEditor.enabled": { + type: "boolean", + default: i.enabled, + markdownDescription: f(518, null) + }, + "editor.dropIntoEditor.showDropSelector": { + type: "string", + markdownDescription: f(519, null), + enum: ["afterDrop", "never"], + enumDescriptions: [f(520, null), f(521, null)], + default: "afterDrop" + } + }); + } + validate(i) { + if (!i || typeof i != "object") { + return this.defaultValue; + } + const e = i; + return { + enabled: jr(e.enabled, this.defaultValue.enabled), + showDropSelector: Rf(e.showDropSelector, this.defaultValue.showDropSelector, ["afterDrop", "never"]) + }; + } + }; + SXi = class extends Zh { + constructor() { + const i = { + enabled: false, + showPasteSelector: "afterPaste" + }; + super(89, "pasteAs", i, { + "editor.pasteAs.enabled": { + type: "boolean", + default: i.enabled, + markdownDescription: f(522, null) + }, + "editor.pasteAs.showPasteSelector": { + type: "string", + markdownDescription: f(523, null), + enum: ["afterPaste", "never"], + enumDescriptions: [f(524, null), f(525, null)], + default: "afterPaste" + } + }); + } + validate(i) { + if (!i || typeof i != "object") { + return this.defaultValue; + } + const e = i; + return { + enabled: jr(e.enabled, this.defaultValue.enabled), + showPasteSelector: Rf(e.showPasteSelector, this.defaultValue.showPasteSelector, ["afterPaste", "never"]) + }; + } + }; + xXi = "Consolas, 'Courier New', monospace"; + kXi = "Menlo, Monaco, 'Courier New', monospace"; + EXi = "'Droid Sans Mono', 'monospace', monospace"; + Qf = { + fontFamily: Gt ? kXi : yl ? EXi : xXi, + fontWeight: "normal", + fontSize: Gt ? 12 : 14, + lineHeight: 0, + letterSpacing: 0 + }; + k9 = []; + (function (i) { + i[i.acceptSuggestionOnCommitCharacter = 0] = "acceptSuggestionOnCommitCharacter"; + i[i.acceptSuggestionOnEnter = 1] = "acceptSuggestionOnEnter"; + i[i.accessibilitySupport = 2] = "accessibilitySupport"; + i[i.accessibilityPageSize = 3] = "accessibilityPageSize"; + i[i.ariaLabel = 4] = "ariaLabel"; + i[i.ariaRequired = 5] = "ariaRequired"; + i[i.autoClosingBrackets = 6] = "autoClosingBrackets"; + i[i.autoClosingComments = 7] = "autoClosingComments"; + i[i.screenReaderAnnounceInlineSuggestion = 8] = "screenReaderAnnounceInlineSuggestion"; + i[i.autoClosingDelete = 9] = "autoClosingDelete"; + i[i.autoClosingOvertype = 10] = "autoClosingOvertype"; + i[i.autoClosingQuotes = 11] = "autoClosingQuotes"; + i[i.autoIndent = 12] = "autoIndent"; + i[i.automaticLayout = 13] = "automaticLayout"; + i[i.autoSurround = 14] = "autoSurround"; + i[i.bracketPairColorization = 15] = "bracketPairColorization"; + i[i.guides = 16] = "guides"; + i[i.codeLens = 17] = "codeLens"; + i[i.codeLensFontFamily = 18] = "codeLensFontFamily"; + i[i.codeLensFontSize = 19] = "codeLensFontSize"; + i[i.colorDecorators = 20] = "colorDecorators"; + i[i.colorDecoratorsLimit = 21] = "colorDecoratorsLimit"; + i[i.columnSelection = 22] = "columnSelection"; + i[i.comments = 23] = "comments"; + i[i.contextmenu = 24] = "contextmenu"; + i[i.copyWithSyntaxHighlighting = 25] = "copyWithSyntaxHighlighting"; + i[i.cursorBlinking = 26] = "cursorBlinking"; + i[i.cursorSmoothCaretAnimation = 27] = "cursorSmoothCaretAnimation"; + i[i.cursorStyle = 28] = "cursorStyle"; + i[i.cursorSurroundingLines = 29] = "cursorSurroundingLines"; + i[i.cursorSurroundingLinesStyle = 30] = "cursorSurroundingLinesStyle"; + i[i.cursorWidth = 31] = "cursorWidth"; + i[i.disableLayerHinting = 32] = "disableLayerHinting"; + i[i.disableMonospaceOptimizations = 33] = "disableMonospaceOptimizations"; + i[i.domReadOnly = 34] = "domReadOnly"; + i[i.dragAndDrop = 35] = "dragAndDrop"; + i[i.dropIntoEditor = 36] = "dropIntoEditor"; + i[i.experimentalEditContextEnabled = 37] = "experimentalEditContextEnabled"; + i[i.emptySelectionClipboard = 38] = "emptySelectionClipboard"; + i[i.experimentalGpuAcceleration = 39] = "experimentalGpuAcceleration"; + i[i.experimentalWhitespaceRendering = 40] = "experimentalWhitespaceRendering"; + i[i.extraEditorClassName = 41] = "extraEditorClassName"; + i[i.fastScrollSensitivity = 42] = "fastScrollSensitivity"; + i[i.find = 43] = "find"; + i[i.fixedOverflowWidgets = 44] = "fixedOverflowWidgets"; + i[i.folding = 45] = "folding"; + i[i.foldingStrategy = 46] = "foldingStrategy"; + i[i.foldingHighlight = 47] = "foldingHighlight"; + i[i.foldingImportsByDefault = 48] = "foldingImportsByDefault"; + i[i.foldingMaximumRegions = 49] = "foldingMaximumRegions"; + i[i.unfoldOnClickAfterEndOfLine = 50] = "unfoldOnClickAfterEndOfLine"; + i[i.fontFamily = 51] = "fontFamily"; + i[i.fontInfo = 52] = "fontInfo"; + i[i.fontLigatures = 53] = "fontLigatures"; + i[i.fontSize = 54] = "fontSize"; + i[i.fontWeight = 55] = "fontWeight"; + i[i.fontVariations = 56] = "fontVariations"; + i[i.formatOnPaste = 57] = "formatOnPaste"; + i[i.formatOnType = 58] = "formatOnType"; + i[i.glyphMargin = 59] = "glyphMargin"; + i[i.gotoLocation = 60] = "gotoLocation"; + i[i.hideCursorInOverviewRuler = 61] = "hideCursorInOverviewRuler"; + i[i.hover = 62] = "hover"; + i[i.inDiffEditor = 63] = "inDiffEditor"; + i[i.inlineSuggest = 64] = "inlineSuggest"; + i[i.letterSpacing = 65] = "letterSpacing"; + i[i.lightbulb = 66] = "lightbulb"; + i[i.lineDecorationsWidth = 67] = "lineDecorationsWidth"; + i[i.lineHeight = 68] = "lineHeight"; + i[i.lineNumbers = 69] = "lineNumbers"; + i[i.lineNumbersMinChars = 70] = "lineNumbersMinChars"; + i[i.linkedEditing = 71] = "linkedEditing"; + i[i.links = 72] = "links"; + i[i.matchBrackets = 73] = "matchBrackets"; + i[i.minimap = 74] = "minimap"; + i[i.mouseStyle = 75] = "mouseStyle"; + i[i.mouseWheelScrollSensitivity = 76] = "mouseWheelScrollSensitivity"; + i[i.mouseWheelZoom = 77] = "mouseWheelZoom"; + i[i.multiCursorMergeOverlapping = 78] = "multiCursorMergeOverlapping"; + i[i.multiCursorModifier = 79] = "multiCursorModifier"; + i[i.multiCursorPaste = 80] = "multiCursorPaste"; + i[i.multiCursorLimit = 81] = "multiCursorLimit"; + i[i.occurrencesHighlight = 82] = "occurrencesHighlight"; + i[i.occurrencesHighlightDelay = 83] = "occurrencesHighlightDelay"; + i[i.overtypeCursorStyle = 84] = "overtypeCursorStyle"; + i[i.overtypeOnPaste = 85] = "overtypeOnPaste"; + i[i.overviewRulerBorder = 86] = "overviewRulerBorder"; + i[i.overviewRulerLanes = 87] = "overviewRulerLanes"; + i[i.padding = 88] = "padding"; + i[i.pasteAs = 89] = "pasteAs"; + i[i.parameterHints = 90] = "parameterHints"; + i[i.peekWidgetDefaultFocus = 91] = "peekWidgetDefaultFocus"; + i[i.placeholder = 92] = "placeholder"; + i[i.definitionLinkOpensInPeek = 93] = "definitionLinkOpensInPeek"; + i[i.quickSuggestions = 94] = "quickSuggestions"; + i[i.quickSuggestionsDelay = 95] = "quickSuggestionsDelay"; + i[i.readOnly = 96] = "readOnly"; + i[i.readOnlyMessage = 97] = "readOnlyMessage"; + i[i.renameOnType = 98] = "renameOnType"; + i[i.renderControlCharacters = 99] = "renderControlCharacters"; + i[i.renderFinalNewline = 100] = "renderFinalNewline"; + i[i.renderLineHighlight = 101] = "renderLineHighlight"; + i[i.renderLineHighlightOnlyWhenFocus = 102] = "renderLineHighlightOnlyWhenFocus"; + i[i.renderValidationDecorations = 103] = "renderValidationDecorations"; + i[i.renderWhitespace = 104] = "renderWhitespace"; + i[i.revealHorizontalRightPadding = 105] = "revealHorizontalRightPadding"; + i[i.roundedSelection = 106] = "roundedSelection"; + i[i.rulers = 107] = "rulers"; + i[i.scrollbar = 108] = "scrollbar"; + i[i.scrollBeyondLastColumn = 109] = "scrollBeyondLastColumn"; + i[i.scrollBeyondLastLine = 110] = "scrollBeyondLastLine"; + i[i.scrollPredominantAxis = 111] = "scrollPredominantAxis"; + i[i.selectionClipboard = 112] = "selectionClipboard"; + i[i.selectionHighlight = 113] = "selectionHighlight"; + i[i.selectOnLineNumbers = 114] = "selectOnLineNumbers"; + i[i.showFoldingControls = 115] = "showFoldingControls"; + i[i.showUnused = 116] = "showUnused"; + i[i.snippetSuggestions = 117] = "snippetSuggestions"; + i[i.smartSelect = 118] = "smartSelect"; + i[i.smoothScrolling = 119] = "smoothScrolling"; + i[i.stickyScroll = 120] = "stickyScroll"; + i[i.stickyTabStops = 121] = "stickyTabStops"; + i[i.stopRenderingLineAfter = 122] = "stopRenderingLineAfter"; + i[i.suggest = 123] = "suggest"; + i[i.suggestFontSize = 124] = "suggestFontSize"; + i[i.suggestLineHeight = 125] = "suggestLineHeight"; + i[i.suggestOnTriggerCharacters = 126] = "suggestOnTriggerCharacters"; + i[i.suggestSelection = 127] = "suggestSelection"; + i[i.tabCompletion = 128] = "tabCompletion"; + i[i.tabIndex = 129] = "tabIndex"; + i[i.unicodeHighlighting = 130] = "unicodeHighlighting"; + i[i.unusualLineTerminators = 131] = "unusualLineTerminators"; + i[i.useShadowDOM = 132] = "useShadowDOM"; + i[i.useTabStops = 133] = "useTabStops"; + i[i.wordBreak = 134] = "wordBreak"; + i[i.wordSegmenterLocales = 135] = "wordSegmenterLocales"; + i[i.wordSeparators = 136] = "wordSeparators"; + i[i.wordWrap = 137] = "wordWrap"; + i[i.wordWrapBreakAfterCharacters = 138] = "wordWrapBreakAfterCharacters"; + i[i.wordWrapBreakBeforeCharacters = 139] = "wordWrapBreakBeforeCharacters"; + i[i.wordWrapColumn = 140] = "wordWrapColumn"; + i[i.wordWrapOverride1 = 141] = "wordWrapOverride1"; + i[i.wordWrapOverride2 = 142] = "wordWrapOverride2"; + i[i.wrappingIndent = 143] = "wrappingIndent"; + i[i.wrappingStrategy = 144] = "wrappingStrategy"; + i[i.showDeprecated = 145] = "showDeprecated"; + i[i.inlayHints = 146] = "inlayHints"; + i[i.effectiveCursorStyle = 147] = "effectiveCursorStyle"; + i[i.editorClassName = 148] = "editorClassName"; + i[i.pixelRatio = 149] = "pixelRatio"; + i[i.tabFocusMode = 150] = "tabFocusMode"; + i[i.layoutInfo = 151] = "layoutInfo"; + i[i.wrappingInfo = 152] = "wrappingInfo"; + i[i.defaultColorDecorators = 153] = "defaultColorDecorators"; + i[i.colorDecoratorsActivatedOn = 154] = "colorDecoratorsActivatedOn"; + i[i.inlineCompletionsAccessibilityVerbose = 155] = "inlineCompletionsAccessibilityVerbose"; + i[i.automaticLayoutIgnoreHeight = 156] = "automaticLayoutIgnoreHeight"; + })(IXi ||= {}); + r1 = { + acceptSuggestionOnCommitCharacter: Xs(new Kl(0, "acceptSuggestionOnCommitCharacter", true, { + markdownDescription: f(526, null) + })), + acceptSuggestionOnEnter: Xs(new mf(1, "acceptSuggestionOnEnter", "on", ["on", "smart", "off"], { + markdownEnumDescriptions: ["", f(527, null), ""], + markdownDescription: f(528, null) + })), + accessibilitySupport: Xs(new $Yi()), + accessibilityPageSize: Xs(new Xd(3, "accessibilityPageSize", 10, 1, 1073741824, { + description: f(529, null), + tags: ["accessibility"] + })), + ariaLabel: Xs(new Sx(4, "ariaLabel", f(530, null))), + ariaRequired: Xs(new Kl(5, "ariaRequired", false, undefined)), + screenReaderAnnounceInlineSuggestion: Xs(new Kl(8, "screenReaderAnnounceInlineSuggestion", true, { + description: f(531, null), + tags: ["accessibility"] + })), + autoClosingBrackets: Xs(new mf(6, "autoClosingBrackets", "languageDefined", ["always", "languageDefined", "beforeWhitespace", "never"], { + enumDescriptions: ["", f(532, null), f(533, null), ""], + description: f(534, null) + })), + autoClosingComments: Xs(new mf(7, "autoClosingComments", "languageDefined", ["always", "languageDefined", "beforeWhitespace", "never"], { + enumDescriptions: ["", f(535, null), f(536, null), ""], + description: f(537, null) + })), + autoClosingDelete: Xs(new mf(9, "autoClosingDelete", "auto", ["always", "auto", "never"], { + enumDescriptions: ["", f(538, null), ""], + description: f(539, null) + })), + autoClosingOvertype: Xs(new mf(10, "autoClosingOvertype", "auto", ["always", "auto", "never"], { + enumDescriptions: ["", f(540, null), ""], + description: f(541, null) + })), + autoClosingQuotes: Xs(new mf(11, "autoClosingQuotes", "languageDefined", ["always", "languageDefined", "beforeWhitespace", "never"], { + enumDescriptions: ["", f(542, null), f(543, null), ""], + description: f(544, null) + })), + autoIndent: Xs(new Vee(12, "autoIndent", 4, "full", ["none", "keep", "brackets", "advanced", "full"], Pjn, { + enumDescriptions: [f(545, null), f(546, null), f(547, null), f(548, null), f(549, null)], + description: f(550, null) + })), + automaticLayout: Xs(new Kl(13, "automaticLayout", false)), + autoSurround: Xs(new mf(14, "autoSurround", "languageDefined", ["languageDefined", "quotes", "brackets", "never"], { + enumDescriptions: [f(551, null), f(552, null), f(553, null), ""], + description: f(554, null) + })), + bracketPairColorization: Xs(new fXi()), + bracketPairGuides: Xs(new gXi()), + stickyTabStops: Xs(new Kl(121, "stickyTabStops", false, { + description: f(555, null) + })), + codeLens: Xs(new Kl(17, "codeLens", true, { + description: f(556, null) + })), + codeLensFontFamily: Xs(new Sx(18, "codeLensFontFamily", "", { + description: f(557, null) + })), + codeLensFontSize: Xs(new Xd(19, "codeLensFontSize", 0, 0, 100, { + type: "number", + default: 0, + minimum: 0, + maximum: 100, + markdownDescription: f(558, null) + })), + colorDecorators: Xs(new Kl(20, "colorDecorators", true, { + description: f(559, null) + })), + colorDecoratorActivatedOn: Xs(new mf(154, "colorDecoratorsActivatedOn", "clickAndHover", ["clickAndHover", "hover", "click"], { + enumDescriptions: [f(560, null), f(561, null), f(562, null)], + description: f(563, null) + })), + colorDecoratorsLimit: Xs(new Xd(21, "colorDecoratorsLimit", 500, 1, 1000000, { + markdownDescription: f(564, null) + })), + columnSelection: Xs(new Kl(22, "columnSelection", false, { + description: f(565, null) + })), + comments: Xs(new FYi()), + contextmenu: Xs(new Kl(24, "contextmenu", true)), + copyWithSyntaxHighlighting: Xs(new Kl(25, "copyWithSyntaxHighlighting", true, { + description: f(566, null) + })), + cursorBlinking: Xs(new Vee(26, "cursorBlinking", 1, "blink", ["blink", "smooth", "phase", "expand", "solid"], RYi, { + description: f(567, null) + })), + cursorSmoothCaretAnimation: Xs(new mf(27, "cursorSmoothCaretAnimation", "off", ["off", "explicit", "on"], { + enumDescriptions: [f(568, null), f(569, null), f(570, null)], + description: f(571, null) + })), + cursorStyle: Xs(new Vee(28, "cursorStyle", Wh.Line, "line", ["line", "block", "underline", "line-thin", "block-outline", "underline-thin"], $8t, { + description: f(572, null) + })), + overtypeCursorStyle: Xs(new Vee(84, "overtypeCursorStyle", Wh.Block, "block", ["line", "block", "underline", "line-thin", "block-outline", "underline-thin"], $8t, { + description: f(573, null) + })), + cursorSurroundingLines: Xs(new Xd(29, "cursorSurroundingLines", 0, 0, 1073741824, { + description: f(574, null) + })), + cursorSurroundingLinesStyle: Xs(new mf(30, "cursorSurroundingLinesStyle", "default", ["default", "all"], { + enumDescriptions: [f(575, null), f(576, null)], + markdownDescription: f(577, null) + })), + cursorWidth: Xs(new Xd(31, "cursorWidth", 0, 0, 1073741824, { + markdownDescription: f(578, null) + })), + disableLayerHinting: Xs(new Kl(32, "disableLayerHinting", false)), + disableMonospaceOptimizations: Xs(new Kl(33, "disableMonospaceOptimizations", false)), + domReadOnly: Xs(new Kl(34, "domReadOnly", false)), + dragAndDrop: Xs(new Kl(35, "dragAndDrop", true, { + description: f(579, null) + })), + emptySelectionClipboard: Xs(new BYi()), + dropIntoEditor: Xs(new CXi()), + experimentalEditContextEnabled: Xs(new Kl(37, "experimentalEditContextEnabled", false, { + description: f(580, null), + included: Mq || Nnt || sc + })), + stickyScroll: Xs(new YYi()), + experimentalGpuAcceleration: Xs(new mf(39, "experimentalGpuAcceleration", "off", ["off", "on"], undefined)), + experimentalWhitespaceRendering: Xs(new mf(40, "experimentalWhitespaceRendering", "svg", ["svg", "font", "off"], { + enumDescriptions: [f(581, null), f(582, null), f(583, null)], + description: f(584, null) + })), + extraEditorClassName: Xs(new Sx(41, "extraEditorClassName", "")), + fastScrollSensitivity: Xs(new NT(42, "fastScrollSensitivity", 5, i => i <= 0 ? 5 : i, { + markdownDescription: f(585, null) + })), + find: Xs(new UYi()), + fixedOverflowWidgets: Xs(new Kl(44, "fixedOverflowWidgets", false)), + folding: Xs(new Kl(45, "folding", true, { + description: f(586, null) + })), + foldingStrategy: Xs(new mf(46, "foldingStrategy", "auto", ["auto", "indentation"], { + enumDescriptions: [f(587, null), f(588, null)], + description: f(589, null) + })), + foldingHighlight: Xs(new Kl(47, "foldingHighlight", true, { + description: f(590, null) + })), + foldingImportsByDefault: Xs(new Kl(48, "foldingImportsByDefault", false, { + description: f(591, null) + })), + foldingMaximumRegions: Xs(new Xd(49, "foldingMaximumRegions", 5000, 10, 65000, { + description: f(592, null) + })), + unfoldOnClickAfterEndOfLine: Xs(new Kl(50, "unfoldOnClickAfterEndOfLine", false, { + description: f(593, null) + })), + fontFamily: Xs(new Sx(51, "fontFamily", Qf.fontFamily, { + description: f(594, null) + })), + fontInfo: Xs(new WYi()), + fontLigatures2: Xs(new t4()), + fontSize: Xs(new HYi()), + fontWeight: Xs(new qYi()), + fontVariations: Xs(new Wot()), + formatOnPaste: Xs(new Kl(57, "formatOnPaste", false, { + description: f(595, null) + })), + formatOnType: Xs(new Kl(58, "formatOnType", false, { + description: f(596, null) + })), + glyphMargin: Xs(new Kl(59, "glyphMargin", true, { + description: f(597, null) + })), + gotoLocation: Xs(new jYi()), + hideCursorInOverviewRuler: Xs(new Kl(61, "hideCursorInOverviewRuler", false, { + description: f(598, null) + })), + hover: Xs(new zYi()), + inDiffEditor: Xs(new Kl(63, "inDiffEditor", false)), + letterSpacing: Xs(new NT(65, "letterSpacing", Qf.letterSpacing, i => NT.clamp(i, -5, 20), { + description: f(599, null) + })), + lightbulb: Xs(new KYi()), + lineDecorationsWidth: Xs(new QYi()), + lineHeight: Xs(new ZYi()), + lineNumbers: Xs(new aXi()), + lineNumbersMinChars: Xs(new Xd(70, "lineNumbersMinChars", 5, 1, 300)), + linkedEditing: Xs(new Kl(71, "linkedEditing", false, { + description: f(600, null) + })), + links: Xs(new Kl(72, "links", true, { + description: f(601, null) + })), + matchBrackets: Xs(new mf(73, "matchBrackets", "always", ["always", "near", "never"], { + description: f(602, null) + })), + minimap: Xs(new eXi()), + mouseStyle: Xs(new mf(75, "mouseStyle", "text", ["text", "default", "copy"])), + mouseWheelScrollSensitivity: Xs(new NT(76, "mouseWheelScrollSensitivity", 1, i => i === 0 ? 1 : i, { + markdownDescription: f(603, null) + })), + mouseWheelZoom: Xs(new Kl(77, "mouseWheelZoom", false, { + markdownDescription: f(Gt ? 604 : 605, null) + })), + multiCursorMergeOverlapping: Xs(new Kl(78, "multiCursorMergeOverlapping", true, { + description: f(606, null) + })), + multiCursorModifier: Xs(new Vee(79, "multiCursorModifier", "altKey", "alt", ["ctrlCmd", "alt"], Rjn, { + markdownEnumDescriptions: [f(607, null), f(608, null)], + markdownDescription: f(609, null) + })), + multiCursorPaste: Xs(new mf(80, "multiCursorPaste", "spread", ["spread", "full"], { + markdownEnumDescriptions: [f(610, null), f(611, null)], + markdownDescription: f(612, null) + })), + multiCursorLimit: Xs(new Xd(81, "multiCursorLimit", 10000, 1, 100000, { + markdownDescription: f(613, null) + })), + occurrencesHighlight: Xs(new mf(82, "occurrencesHighlight", "singleFile", ["off", "singleFile", "multiFile"], { + markdownEnumDescriptions: [f(614, null), f(615, null), f(616, null)], + markdownDescription: f(617, null) + })), + occurrencesHighlightDelay: Xs(new Xd(83, "occurrencesHighlightDelay", 250, 0, 2000, { + description: f(618, null), + tags: ["preview"] + })), + overtypeOnPaste: Xs(new Kl(85, "overtypeOnPaste", true, { + description: f(619, null) + })), + overviewRulerBorder: Xs(new Kl(86, "overviewRulerBorder", true, { + description: f(620, null) + })), + overviewRulerLanes: Xs(new Xd(87, "overviewRulerLanes", 3, 0, 3)), + padding: Xs(new tXi()), + pasteAs: Xs(new SXi()), + parameterHints: Xs(new iXi()), + peekWidgetDefaultFocus: Xs(new mf(91, "peekWidgetDefaultFocus", "tree", ["tree", "editor"], { + enumDescriptions: [f(621, null), f(622, null)], + description: f(623, null) + })), + placeholder: Xs(new nXi()), + definitionLinkOpensInPeek: Xs(new Kl(93, "definitionLinkOpensInPeek", false, { + description: f(624, null) + })), + quickSuggestions: Xs(new rXi()), + quickSuggestionsDelay: Xs(new Xd(95, "quickSuggestionsDelay", 10, 0, 1073741824, { + description: f(625, null) + })), + readOnly: Xs(new Kl(96, "readOnly", false)), + readOnlyMessage: Xs(new cXi()), + renameOnType: Xs(new Kl(98, "renameOnType", false, { + description: f(626, null), + markdownDeprecationMessage: f(627, null) + })), + renderControlCharacters: Xs(new Kl(99, "renderControlCharacters", true, { + description: f(628, null), + restricted: true + })), + renderFinalNewline: Xs(new mf(100, "renderFinalNewline", yl ? "dimmed" : "on", ["off", "on", "dimmed"], { + description: f(629, null) + })), + renderLineHighlight: Xs(new mf(101, "renderLineHighlight", "line", ["none", "gutter", "line", "all"], { + enumDescriptions: ["", "", "", f(630, null)], + description: f(631, null) + })), + renderLineHighlightOnlyWhenFocus: Xs(new Kl(102, "renderLineHighlightOnlyWhenFocus", false, { + description: f(632, null) + })), + renderValidationDecorations: Xs(new mf(103, "renderValidationDecorations", "editable", ["editable", "on", "off"])), + renderWhitespace: Xs(new mf(104, "renderWhitespace", "selection", ["none", "boundary", "selection", "trailing", "all"], { + enumDescriptions: ["", f(633, null), f(634, null), f(635, null), ""], + description: f(636, null) + })), + revealHorizontalRightPadding: Xs(new Xd(105, "revealHorizontalRightPadding", 15, 0, 1000)), + roundedSelection: Xs(new Kl(106, "roundedSelection", true, { + description: f(637, null) + })), + rulers: Xs(new lXi()), + scrollbar: Xs(new uXi()), + scrollBeyondLastColumn: Xs(new Xd(109, "scrollBeyondLastColumn", 4, 0, 1073741824, { + description: f(638, null) + })), + scrollBeyondLastLine: Xs(new Kl(110, "scrollBeyondLastLine", true, { + description: f(639, null) + })), + scrollPredominantAxis: Xs(new Kl(111, "scrollPredominantAxis", true, { + description: f(640, null) + })), + selectionClipboard: Xs(new Kl(112, "selectionClipboard", true, { + description: f(641, null), + included: yl + })), + selectionHighlight: Xs(new Kl(113, "selectionHighlight", true, { + description: f(642, null) + })), + selectOnLineNumbers: Xs(new Kl(114, "selectOnLineNumbers", true)), + showFoldingControls: Xs(new mf(115, "showFoldingControls", "mouseover", ["always", "never", "mouseover"], { + enumDescriptions: [f(643, null), f(644, null), f(645, null)], + description: f(646, null) + })), + showUnused: Xs(new Kl(116, "showUnused", true, { + description: f(647, null) + })), + showDeprecated: Xs(new Kl(145, "showDeprecated", true, { + description: f(648, null) + })), + inlayHints: Xs(new XYi()), + snippetSuggestions: Xs(new mf(117, "snippetSuggestions", "inline", ["top", "bottom", "inline", "none"], { + enumDescriptions: [f(649, null), f(650, null), f(651, null), f(652, null)], + description: f(653, null) + })), + smartSelect: Xs(new mXi()), + smoothScrolling: Xs(new Kl(119, "smoothScrolling", false, { + description: f(654, null) + })), + stopRenderingLineAfter: Xs(new Xd(122, "stopRenderingLineAfter", 10000, -1, 1073741824)), + suggest: Xs(new pXi()), + inlineSuggest: Xs(new hXi()), + inlineCompletionsAccessibilityVerbose: Xs(new Kl(155, "inlineCompletionsAccessibilityVerbose", false, { + description: f(655, null) + })), + automaticLayoutIgnoreHeight: Xs(new Kl(156, "automaticLayoutIgnoreHeight", false)), + suggestFontSize: Xs(new Xd(124, "suggestFontSize", 0, 0, 1000, { + markdownDescription: f(656, null, "`0`", "`#editor.fontSize#`") + })), + suggestLineHeight: Xs(new Xd(125, "suggestLineHeight", 0, 0, 1000, { + markdownDescription: f(657, null, "`0`", "`#editor.lineHeight#`") + })), + suggestOnTriggerCharacters: Xs(new Kl(126, "suggestOnTriggerCharacters", true, { + description: f(658, null) + })), + suggestSelection: Xs(new mf(127, "suggestSelection", "first", ["first", "recentlyUsed", "recentlyUsedByPrefix"], { + markdownEnumDescriptions: [f(659, null), f(660, null), f(661, null)], + description: f(662, null) + })), + tabCompletion: Xs(new mf(128, "tabCompletion", "off", ["on", "off", "onlySnippets"], { + enumDescriptions: [f(663, null), f(664, null), f(665, null)], + description: f(666, null) + })), + tabIndex: Xs(new Xd(129, "tabIndex", 0, -1, 1073741824)), + unicodeHighlight: Xs(new dXi()), + unusualLineTerminators: Xs(new mf(131, "unusualLineTerminators", "prompt", ["auto", "off", "prompt"], { + enumDescriptions: [f(667, null), f(668, null), f(669, null)], + description: f(670, null) + })), + useShadowDOM: Xs(new Kl(132, "useShadowDOM", true)), + useTabStops: Xs(new Kl(133, "useTabStops", true, { + description: f(671, null) + })), + wordBreak: Xs(new mf(134, "wordBreak", "normal", ["normal", "keepAll"], { + markdownEnumDescriptions: [f(672, null), f(673, null)], + description: f(674, null) + })), + wordSegmenterLocales: Xs(new bXi()), + wordSeparators: Xs(new Sx(136, "wordSeparators", w9, { + description: f(675, null) + })), + wordWrap: Xs(new mf(137, "wordWrap", "off", ["off", "on", "wordWrapColumn", "bounded"], { + markdownEnumDescriptions: [f(676, null), f(677, null), f(678, null), f(679, null)], + description: f(680, null) + })), + wordWrapBreakAfterCharacters: Xs(new Sx(138, "wordWrapBreakAfterCharacters", " \t})]?|/&.,;¢°′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー”〉》」』】〕)]}」")), + wordWrapBreakBeforeCharacters: Xs(new Sx(139, "wordWrapBreakBeforeCharacters", "([{‘“〈《「『【〔([{「£¥$£¥++")), + wordWrapColumn: Xs(new Xd(140, "wordWrapColumn", 80, 1, 1073741824, { + markdownDescription: f(681, null) + })), + wordWrapOverride1: Xs(new mf(141, "wordWrapOverride1", "inherit", ["off", "on", "inherit"])), + wordWrapOverride2: Xs(new mf(142, "wordWrapOverride2", "inherit", ["off", "on", "inherit"])), + effectiveCursorStyle: Xs(new VYi()), + editorClassName: Xs(new _Yi()), + defaultColorDecorators: Xs(new mf(153, "defaultColorDecorators", "auto", ["auto", "always", "never"], { + enumDescriptions: [f(682, null), f(683, null), f(684, null)], + description: f(685, null) + })), + pixelRatio: Xs(new sXi()), + tabFocusMode: Xs(new Kl(150, "tabFocusMode", false, { + markdownDescription: f(686, null) + })), + layoutInfo: Xs(new O8t()), + wrappingInfo: Xs(new wXi()), + wrappingIndent: Xs(new yXi()), + wrappingStrategy: Xs(new GYi()) + }; + } +}); +var AT; +var Vot = ue({ + "out-build/vs/editor/common/config/editorZoom.js"() { + "use strict"; + + pe(); + AT = new class { + constructor() { + this.a = 0; + this.b = new B(); + this.onDidChangeZoomLevel = this.b.event; + } + getZoomLevel() { + return this.a; + } + setZoomLevel(i) { + i = Math.min(Math.max(-5, i), 20); + if (this.a !== i) { + this.a = i; + this.b.fire(this.a); + } + } + }(); + } +}); +var DXi; +var Hot; +var VL; +var _8t; +var qot; +var rF = ue({ + "out-build/vs/editor/common/config/fontInfo.js"() { + "use strict"; + + rt(); + Qd(); + Vot(); + DXi = Gt ? 1.5 : 1.35; + Hot = 8; + VL = class qPe { + static createFromValidatedSettings(e, t, s) { + const n = e.get(51); + const r = e.get(55); + const o = e.get(54); + const a = e.get(53); + const l = e.get(56); + const c = e.get(68); + const u = e.get(65); + return qPe.a(n, r, o, a, l, c, u, t, s); + } + static createFromRawSettings(e, t, s = false) { + const n = r1.fontFamily.validate(e.fontFamily); + const r = r1.fontWeight.validate(e.fontWeight); + const o = r1.fontSize.validate(e.fontSize); + const a = r1.fontLigatures2.validate(e.fontLigatures); + const l = r1.fontVariations.validate(e.fontVariations); + const c = r1.lineHeight.validate(e.lineHeight); + const u = r1.letterSpacing.validate(e.letterSpacing); + return qPe.a(n, r, o, a, l, c, u, t, s); + } + static a(e, t, s, n, r, o, a, l, c) { + if (o === 0) { + o = DXi * s; + } else if (o < Hot) { + o = o * s; + } + o = Math.round(o); + if (o < Hot) { + o = Hot; + } + const u = 1 + (c ? 0 : AT.getZoomLevel() * 0.1); + s *= u; + o *= u; + if (r === Wot.TRANSLATE) { + if (t === "normal" || t === "bold") { + r = Wot.OFF; + } else { + r = `'wght' ${parseInt(t, 10)}`; + t = "normal"; + } + } + return new qPe({ + pixelRatio: l, + fontFamily: e, + fontWeight: t, + fontSize: s, + fontFeatureSettings: n, + fontVariationSettings: r, + lineHeight: o, + letterSpacing: a + }); + } + constructor(e) { + this._bareFontInfoBrand = undefined; + this.pixelRatio = e.pixelRatio; + this.fontFamily = String(e.fontFamily); + this.fontWeight = String(e.fontWeight); + this.fontSize = e.fontSize; + this.fontFeatureSettings = e.fontFeatureSettings; + this.fontVariationSettings = e.fontVariationSettings; + this.lineHeight = e.lineHeight | 0; + this.letterSpacing = e.letterSpacing; + } + getId() { + return `${this.pixelRatio}-${this.fontFamily}-${this.fontWeight}-${this.fontSize}-${this.fontFeatureSettings}-${this.fontVariationSettings}-${this.lineHeight}-${this.letterSpacing}`; + } + getMassagedFontFamily() { + const e = Qf.fontFamily; + const t = qPe.b(this.fontFamily); + if (e && this.fontFamily !== e) { + return `${t}, ${e}`; + } else { + return t; + } + } + static b(e) { + if (/[,"']/.test(e)) { + return e; + } else if (/[+ ]/.test(e)) { + return `"${e}"`; + } else { + return e; + } + } + }; + _8t = 2; + qot = class extends VL { + constructor(i, e) { + super(i); + this._editorStylingBrand = undefined; + this.version = _8t; + this.isTrusted = e; + this.isMonospace = i.isMonospace; + this.typicalHalfwidthCharacterWidth = i.typicalHalfwidthCharacterWidth; + this.typicalFullwidthCharacterWidth = i.typicalFullwidthCharacterWidth; + this.canUseHalfwidthRightwardsArrow = i.canUseHalfwidthRightwardsArrow; + this.spaceWidth = i.spaceWidth; + this.middotWidth = i.middotWidth; + this.wsmiddotWidth = i.wsmiddotWidth; + this.maxDigitWidth = i.maxDigitWidth; + } + equals(i) { + return this.fontFamily === i.fontFamily && this.fontWeight === i.fontWeight && this.fontSize === i.fontSize && this.fontFeatureSettings === i.fontFeatureSettings && this.fontVariationSettings === i.fontVariationSettings && this.lineHeight === i.lineHeight && this.letterSpacing === i.letterSpacing && this.typicalHalfwidthCharacterWidth === i.typicalHalfwidthCharacterWidth && this.typicalFullwidthCharacterWidth === i.typicalFullwidthCharacterWidth && this.canUseHalfwidthRightwardsArrow === i.canUseHalfwidthRightwardsArrow && this.spaceWidth === i.spaceWidth && this.middotWidth === i.middotWidth && this.wsmiddotWidth === i.wsmiddotWidth && this.maxDigitWidth === i.maxDigitWidth; + } + }; + } +}); +var TXi; +var PXi; +var vM; +var Cj = ue({ + "out-build/vs/editor/browser/config/fontMeasurements.js"() { + "use strict"; + + xe(); + Yk(); + pe(); + q(); + Djn(); + Qd(); + rF(); + TXi = class extends H { + constructor() { + super(...arguments); + this.a = new Map(); + this.b = -1; + this.c = this.D(new B()); + this.onDidChange = this.c.event; + } + dispose() { + if (this.b !== -1) { + clearTimeout(this.b); + this.b = -1; + } + super.dispose(); + } + clearAllFontInfos() { + this.a.clear(); + this.c.fire(); + } + f(i) { + const e = yx(i); + let t = this.a.get(e); + if (!t) { + t = new PXi(); + this.a.set(e, t); + } + return t; + } + g(i, e, t) { + this.f(i).put(e, t); + if (!t.isTrusted && this.b === -1) { + this.b = i.setTimeout(() => { + this.b = -1; + this.h(i); + }, 5000); + } + } + h(i) { + const e = this.f(i); + const t = e.getValues(); + let s = false; + for (const n of t) { + if (!n.isTrusted) { + s = true; + e.remove(n); + } + } + if (s) { + this.c.fire(); + } + } + serializeFontInfo(i) { + return this.f(i).getValues().filter(t => t.isTrusted); + } + restoreFontInfo(i, e) { + for (const t of e) { + if (t.version !== _8t) { + continue; + } + const s = new qot(t, false); + this.g(i, s, s); + } + } + readFontInfo(i, e) { + const t = this.f(i); + if (!t.has(e)) { + let s = this.m(i, e); + if (s.typicalHalfwidthCharacterWidth <= 2 || s.typicalFullwidthCharacterWidth <= 2 || s.spaceWidth <= 2 || s.maxDigitWidth <= 2) { + s = new qot({ + pixelRatio: _y.getInstance(i).value, + fontFamily: s.fontFamily, + fontWeight: s.fontWeight, + fontSize: s.fontSize, + fontFeatureSettings: s.fontFeatureSettings, + fontVariationSettings: s.fontVariationSettings, + lineHeight: s.lineHeight, + letterSpacing: s.letterSpacing, + isMonospace: s.isMonospace, + typicalHalfwidthCharacterWidth: Math.max(s.typicalHalfwidthCharacterWidth, 5), + typicalFullwidthCharacterWidth: Math.max(s.typicalFullwidthCharacterWidth, 5), + canUseHalfwidthRightwardsArrow: s.canUseHalfwidthRightwardsArrow, + spaceWidth: Math.max(s.spaceWidth, 5), + middotWidth: Math.max(s.middotWidth, 5), + wsmiddotWidth: Math.max(s.wsmiddotWidth, 5), + maxDigitWidth: Math.max(s.maxDigitWidth, 5) + }, false); + } + this.g(i, e, s); + } + return t.get(e); + } + j(i, e, t, s) { + const n = new PYi(i, e); + t.push(n); + s?.push(n); + return n; + } + m(i, e) { + const t = []; + const s = []; + const n = this.j("n", 0, t, s); + const r = this.j("m", 0, t, null); + const o = this.j(" ", 0, t, s); + const a = this.j("0", 0, t, s); + const l = this.j("1", 0, t, s); + const c = this.j("2", 0, t, s); + const u = this.j("3", 0, t, s); + const d = this.j("4", 0, t, s); + const h = this.j("5", 0, t, s); + const g = this.j("6", 0, t, s); + const p = this.j("7", 0, t, s); + const b = this.j("8", 0, t, s); + const v = this.j("9", 0, t, s); + const y = this.j("→", 0, t, s); + const w = this.j("→", 0, t, null); + const C = this.j("·", 0, t, s); + const S = this.j("⸱", 0, t, null); + const x = "|/-_ilm%"; + for (let R = 0, L = x.length; R < L; R++) { + this.j(x.charAt(R), 0, t, s); + this.j(x.charAt(R), 1, t, s); + this.j(x.charAt(R), 2, t, s); + } + Ijn(i, e, t); + const k = Math.max(a.width, l.width, c.width, u.width, d.width, h.width, g.width, p.width, b.width, v.width); + let E = e.fontFeatureSettings === t4.OFF; + const D = s[0].width; + for (let R = 1, L = s.length; E && R < L; R++) { + const F = D - s[R].width; + if (F < -0.001 || F > 0.001) { + E = false; + break; + } + } + let P = true; + if (E && w.width !== D) { + P = false; + } + if (w.width > y.width) { + P = false; + } + return new qot({ + pixelRatio: _y.getInstance(i).value, + fontFamily: e.fontFamily, + fontWeight: e.fontWeight, + fontSize: e.fontSize, + fontFeatureSettings: e.fontFeatureSettings, + fontVariationSettings: e.fontVariationSettings, + lineHeight: e.lineHeight, + letterSpacing: e.letterSpacing, + isMonospace: E, + typicalHalfwidthCharacterWidth: n.width, + typicalFullwidthCharacterWidth: r.width, + canUseHalfwidthRightwardsArrow: P, + spaceWidth: o.width, + middotWidth: C.width, + wsmiddotWidth: S.width, + maxDigitWidth: k + }, true); + } + }; + PXi = class { + constructor() { + this.a = Object.create(null); + this.b = Object.create(null); + } + has(i) { + const e = i.getId(); + return !!this.b[e]; + } + get(i) { + const e = i.getId(); + return this.b[e]; + } + put(i, e) { + const t = i.getId(); + this.a[t] = i; + this.b[t] = e; + } + remove(i) { + const e = i.getId(); + delete this.a[e]; + delete this.b[e]; + } + getValues() { + return Object.keys(this.a).map(i => this.b[i]); + } + }; + vM = new TXi(); + } +}); +function yM(i, e) { + Bge.items.push(new Bge(i, e)); +} +function xx(i, e) { + yM(i, (t, s, n) => { + if (typeof t !== "undefined") { + for (const [r, o] of e) { + if (t === r) { + n(i, o); + return; + } + } + } + }); +} +function Njn(i) { + Bge.items.forEach(e => e.apply(i)); +} +var Bge; +var LXi; +var RXi = ue({ + "out-build/vs/editor/browser/config/migrateOptions.js"() { + "use strict"; + + Bge = class hFt { + static { + this.items = []; + } + constructor(e, t) { + this.key = e; + this.migrate = t; + } + apply(e) { + const t = hFt.a(e, this.key); + const s = r => hFt.a(e, r); + const n = (r, o) => hFt.b(e, r, o); + this.migrate(t, s, n); + } + static a(e, t) { + if (typeof e === "undefined") { + return; + } + const s = t.indexOf("."); + if (s >= 0) { + const n = t.substring(0, s); + return this.a(e[n], t.substring(s + 1)); + } + return e[t]; + } + static b(e, t, s) { + const n = t.indexOf("."); + if (n >= 0) { + const r = t.substring(0, n); + e[r] = e[r] || {}; + this.b(e[r], t.substring(n + 1), s); + return; + } + e[t] = s; + } + }; + xx("wordWrap", [[true, "on"], [false, "off"]]); + xx("lineNumbers", [[true, "on"], [false, "off"]]); + xx("cursorBlinking", [["visible", "solid"]]); + xx("renderWhitespace", [[true, "boundary"], [false, "none"]]); + xx("renderLineHighlight", [[true, "line"], [false, "none"]]); + xx("acceptSuggestionOnEnter", [[true, "on"], [false, "off"]]); + xx("tabCompletion", [[false, "off"], [true, "onlySnippets"]]); + xx("hover", [[true, { + enabled: true + }], [false, { + enabled: false + }]]); + xx("parameterHints", [[true, { + enabled: true + }], [false, { + enabled: false + }]]); + xx("autoIndent", [[false, "advanced"], [true, "full"]]); + xx("matchBrackets", [[true, "always"], [false, "never"]]); + xx("renderFinalNewline", [[true, "on"], [false, "off"]]); + xx("cursorSmoothCaretAnimation", [[true, "on"], [false, "off"]]); + xx("occurrencesHighlight", [[true, "singleFile"], [false, "off"]]); + xx("wordBasedSuggestions", [[true, "matchingDocuments"], [false, "off"]]); + xx("defaultColorDecorators", [[true, "auto"], [false, "never"]]); + yM("autoClosingBrackets", (i, e, t) => { + if (i === false) { + t("autoClosingBrackets", "never"); + if (typeof e("autoClosingQuotes") === "undefined") { + t("autoClosingQuotes", "never"); + } + if (typeof e("autoSurround") === "undefined") { + t("autoSurround", "never"); + } + } + }); + yM("renderIndentGuides", (i, e, t) => { + if (typeof i !== "undefined") { + t("renderIndentGuides", undefined); + if (typeof e("guides.indentation") === "undefined") { + t("guides.indentation", !!i); + } + } + }); + yM("highlightActiveIndentGuide", (i, e, t) => { + if (typeof i !== "undefined") { + t("highlightActiveIndentGuide", undefined); + if (typeof e("guides.highlightActiveIndentation") === "undefined") { + t("guides.highlightActiveIndentation", !!i); + } + } + }); + LXi = { + method: "showMethods", + function: "showFunctions", + constructor: "showConstructors", + deprecated: "showDeprecated", + field: "showFields", + variable: "showVariables", + class: "showClasses", + struct: "showStructs", + interface: "showInterfaces", + module: "showModules", + property: "showProperties", + event: "showEvents", + operator: "showOperators", + unit: "showUnits", + value: "showValues", + constant: "showConstants", + enum: "showEnums", + enumMember: "showEnumMembers", + keyword: "showKeywords", + text: "showWords", + color: "showColors", + file: "showFiles", + reference: "showReferences", + folder: "showFolders", + typeParameter: "showTypeParameters", + snippet: "showSnippets" + }; + yM("suggest.filteredTypes", (i, e, t) => { + if (i && typeof i == "object") { + for (const s of Object.entries(LXi)) { + if (i[s[0]] === false && typeof e(`suggest.${s[1]}`) === "undefined") { + t(`suggest.${s[1]}`, false); + } + } + t("suggest.filteredTypes", undefined); + } + }); + yM("quickSuggestions", (i, e, t) => { + if (typeof i == "boolean") { + const s = i ? "on" : "off"; + t("quickSuggestions", { + comments: s, + strings: s, + other: s + }); + } + }); + yM("experimental.stickyScroll.enabled", (i, e, t) => { + if (typeof i == "boolean") { + t("experimental.stickyScroll.enabled", undefined); + if (typeof e("stickyScroll.enabled") === "undefined") { + t("stickyScroll.enabled", i); + } + } + }); + yM("experimental.stickyScroll.maxLineCount", (i, e, t) => { + if (typeof i == "number") { + t("experimental.stickyScroll.maxLineCount", undefined); + if (typeof e("stickyScroll.maxLineCount") === "undefined") { + t("stickyScroll.maxLineCount", i); + } + } + }); + yM("codeActionsOnSave", (i, e, t) => { + if (i && typeof i == "object") { + let s = false; + const n = {}; + for (const r of Object.entries(i)) { + if (typeof r[1] == "boolean") { + s = true; + n[r[0]] = r[1] ? "explicit" : "never"; + } else { + n[r[0]] = r[1]; + } + } + if (s) { + t("codeActionsOnSave", n); + } + } + }); + yM("codeActionWidget.includeNearbyQuickfixes", (i, e, t) => { + if (typeof i == "boolean") { + t("codeActionWidget.includeNearbyQuickfixes", undefined); + if (typeof e("codeActionWidget.includeNearbyQuickFixes") === "undefined") { + t("codeActionWidget.includeNearbyQuickFixes", i); + } + } + }); + yM("lightbulb.enabled", (i, e, t) => { + if (typeof i == "boolean") { + t("lightbulb.enabled", i ? undefined : "off"); + } + }); + } +}); +var NXi; +var wM; +var Uge = ue({ + "out-build/vs/editor/browser/config/tabFocus.js"() { + "use strict"; + + pe(); + NXi = class { + constructor() { + this.a = false; + this.b = new B(); + this.onDidChangeTabFocus = this.b.event; + } + getTabFocusMode() { + return this.a; + } + setTabFocusMode(i) { + this.a = i; + this.b.fire(this.a); + } + }; + wM = new NXi(); + } +}); +function Mjn(i) { + return i && typeof i == "object" && typeof i.label == "string" && (typeof i.role === "undefined" || typeof i.role == "string"); +} +var na; +var MXi; +var Ud; +var jot; +var Ho = ue({ + "out-build/vs/platform/accessibility/common/accessibility.js"() { + "use strict"; + + Ee(); + te(); + na = Ve("accessibilityService"); + (function (i) { + i[i.Unknown = 0] = "Unknown"; + i[i.Disabled = 1] = "Disabled"; + i[i.Enabled = 2] = "Enabled"; + })(MXi ||= {}); + Ud = new fe("accessibilityModeEnabled", false); + jot = "ACCESSIBLE_VIEW_SHOWN_"; + } +}); +function Ajn(i) { + let e = 0; + while (i) { + i = Math.floor(i / 10); + e++; + } + return e || 1; +} +function $jn() { + let i = ""; + if (!yI && !Qji) { + i += "no-user-select "; + } + if (yI) { + i += "no-minimap-shadow "; + i += "enable-user-select "; + } + if (Gt) { + i += "mac "; + } + return i; +} +function AXi(i) { + const e = Gn(i); + Njn(e); + return e; +} +var Wge; +var $Xi; +var FXi; +var Hee; +var OXi = ue({ + "out-build/vs/editor/browser/config/editorConfiguration.js"() { + "use strict"; + + hc(); + Jt(); + pe(); + q(); + Jr(); + rt(); + kYi(); + Cj(); + RXi(); + Uge(); + Qd(); + Vot(); + rF(); + Ho(); + xe(); + Yk(); + not(); + Wge = class extends H { + constructor(e, t, s, n, r, o = false, a = undefined) { + super(); + this.z = r; + this.c = this.D(new B()); + this.onDidChange = this.c.event; + this.f = this.D(new B()); + this.onDidChangeFast = this.f.event; + this.h = false; + this.j = 1; + this.m = 1; + this.q = 0; + this.s = 1; + this.u = new F8t(); + this.isSimpleWidget = e; + this.isChatCodeblock = o; + this.cursorCodeBlockType = a; + this.contextMenuId = t; + this.g = this.D(new A8t(n, s.dimension)); + this.t = Kt(n).vscodeWindowId; + this.w = AXi(s); + this.y = Hee.validateOptions(this.w); + this.options = this.F(); + if (this.options.get(13) || this.options.get(156)) { + this.g.startObserving(this.options.get(156)); + } + this.D(AT.onDidChangeZoomLevel(() => this.C())); + this.D(wM.onDidChangeTabFocus(() => this.C())); + this.D(this.g.onDidChange(() => this.C())); + this.D(vM.onDidChange(() => this.C())); + this.D(_y.getInstance(Kt(n)).onDidChange(() => this.C())); + this.D(this.z.onDidChangeScreenReaderOptimized(() => this.C())); + this.D(p9.onDidChangeInputMode(() => this.C())); + } + C() { + const e = this.F(); + const t = Hee.checkEquals(this.options, e); + if (t !== null) { + this.options = e; + this.f.fire(t); + this.c.fire(t); + } + } + F() { + const e = this.G(); + const t = VL.createFromValidatedSettings(this.y, e.pixelRatio, this.isSimpleWidget && this.cursorCodeBlockType !== "cppPreviewBox"); + const s = this.H(t); + const n = { + memory: this.u, + outerWidth: e.outerWidth, + outerHeight: e.outerHeight - this.q, + fontInfo: s, + extraEditorClassName: e.extraEditorClassName, + isDominatedByLongLines: this.h, + viewLineCount: this.j, + lineNumbersDigitCount: this.m, + emptySelectionClipboard: e.emptySelectionClipboard, + pixelRatio: e.pixelRatio, + tabFocusMode: wM.getTabFocusMode(), + inputMode: p9.getInputMode(), + accessibilitySupport: e.accessibilitySupport, + glyphMarginDecorationLaneCount: this.s + }; + return Hee.computeOptions(this.y, n); + } + G() { + return { + extraEditorClassName: $jn(), + outerWidth: this.g.getWidth(), + outerHeight: this.g.getHeight(), + emptySelectionClipboard: c9 || Bv, + pixelRatio: _y.getInstance(SI(this.t, true).window).value, + accessibilitySupport: this.z.isScreenReaderOptimized() ? 2 : this.z.getAccessibilitySupport() + }; + } + H(e) { + return vM.readFontInfo(SI(this.t, true).window, e); + } + getRawOptions() { + return this.w; + } + updateOptions(e) { + const t = AXi(e); + if (Hee.applyUpdate(this.w, t)) { + this.y = Hee.validateOptions(this.w); + this.C(); + } + } + observeContainer(e) { + this.g.observe(e); + } + setIsDominatedByLongLines(e) { + if (this.h !== e) { + this.h = e; + this.C(); + } + } + setModelLineCount(e) { + const t = Ajn(e); + if (this.m !== t) { + this.m = t; + this.C(); + } + } + setViewLineCount(e) { + if (this.j !== e) { + this.j = e; + this.C(); + } + } + setReservedHeight(e) { + if (this.q !== e) { + this.q = e; + this.C(); + } + } + setGlyphMarginDecorationLaneCount(e) { + if (this.s !== e) { + this.s = e; + this.C(); + } + } + }; + Wge = __decorate([__param(4, na)], Wge); + $Xi = class { + constructor() { + this.c = []; + } + _read(i) { + return this.c[i]; + } + get(i) { + return this.c[i]; + } + _write(i, e) { + this.c[i] = e; + } + }; + FXi = class { + constructor() { + this.c = []; + } + _read(i) { + if (i >= this.c.length) { + throw new Error("Cannot read uninitialized value"); + } + return this.c[i]; + } + get(i) { + return this._read(i); + } + _write(i, e) { + this.c[i] = e; + } + }; + Hee = class D3i { + static validateOptions(e) { + const t = new $Xi(); + for (const s of k9) { + const n = s.name === "_never_" ? undefined : e[s.name]; + t._write(s.id, s.validate(n)); + } + return t; + } + static computeOptions(e, t) { + const s = new FXi(); + for (const n of k9) { + s._write(n.id, n.compute(t, s, e._read(n.id))); + } + return s; + } + static c(e, t) { + if (typeof e != "object" || typeof t != "object" || !e || !t) { + return e === t; + } + if (Array.isArray(e) || Array.isArray(t)) { + if (Array.isArray(e) && Array.isArray(t)) { + return Go(e, t); + } else { + return false; + } + } + if (Object.keys(e).length !== Object.keys(t).length) { + return false; + } + for (const s in e) { + if (!D3i.c(e[s], t[s])) { + return false; + } + } + return true; + } + static checkEquals(e, t) { + const s = []; + let n = false; + for (const r of k9) { + const o = !D3i.c(e._read(r.id), t._read(r.id)); + s[r.id] = o; + if (o) { + n = true; + } + } + if (n) { + return new AYi(s); + } else { + return null; + } + } + static applyUpdate(e, t) { + let s = false; + for (const n of k9) { + if (t.hasOwnProperty(n.name)) { + const r = n.applyUpdate(e[n.name], t[n.name]); + e[n.name] = r.newValue; + s = s || r.didChange; + } + } + return s; + } + }; + } +}); +var i4; +var B8t = ue({ + "out-build/vs/base/browser/performance.js"() { + "use strict"; + + (function (i) { + const e = { + total: 0, + min: Number.MAX_VALUE, + max: 0 + }; + const t = { + ...e + }; + const s = { + ...e + }; + const n = { + ...e + }; + let r = 0; + let o; + (function (D) { + D[D.Before = 0] = "Before"; + D[D.InProgress = 1] = "InProgress"; + D[D.Finished = 2] = "Finished"; + })(o ||= {}); + const a = { + keydown: 0, + input: 0, + render: 0 + }; + function l() { + w(); + performance.mark("inputlatency/start"); + performance.mark("keydown/start"); + a.keydown = 1; + queueMicrotask(c); + } + i.onKeyDown = l; + function c() { + if (a.keydown === 1) { + performance.mark("keydown/end"); + a.keydown = 2; + } + } + function u() { + performance.mark("input/start"); + a.input = 1; + y(); + } + i.onBeforeInput = u; + function d() { + if (a.input === 0) { + u(); + } + queueMicrotask(h); + } + i.onInput = d; + function h() { + if (a.input === 1) { + performance.mark("input/end"); + a.input = 2; + } + } + function g() { + w(); + } + i.onKeyUp = g; + function p() { + w(); + } + i.onSelectionChange = p; + function b() { + if (a.keydown === 2 && a.input === 2 && a.render === 0) { + performance.mark("render/start"); + a.render = 1; + queueMicrotask(v); + y(); + } + } + i.onRenderStart = b; + function v() { + if (a.render === 1) { + performance.mark("render/end"); + a.render = 2; + } + } + function y() { + setTimeout(w); + } + function w() { + if (a.keydown === 2 && a.input === 2 && a.render === 2) { + performance.mark("inputlatency/end"); + performance.measure("keydown", "keydown/start", "keydown/end"); + performance.measure("input", "input/start", "input/end"); + performance.measure("render", "render/start", "render/end"); + performance.measure("inputlatency", "inputlatency/start", "inputlatency/end"); + C("keydown", e); + C("input", t); + C("render", s); + C("inputlatency", n); + r++; + S(); + } + } + function C(D, P) { + const R = performance.getEntriesByName(D)[0].duration; + P.total += R; + P.min = Math.min(P.min, R); + P.max = Math.max(P.max, R); + } + function S() { + performance.clearMarks("keydown/start"); + performance.clearMarks("keydown/end"); + performance.clearMarks("input/start"); + performance.clearMarks("input/end"); + performance.clearMarks("render/start"); + performance.clearMarks("render/end"); + performance.clearMarks("inputlatency/start"); + performance.clearMarks("inputlatency/end"); + performance.clearMeasures("keydown"); + performance.clearMeasures("input"); + performance.clearMeasures("render"); + performance.clearMeasures("inputlatency"); + a.keydown = 0; + a.input = 0; + a.render = 0; + } + function x() { + if (r === 0) { + return; + } + const D = { + keydown: k(e), + input: k(t), + render: k(s), + total: k(n), + sampleCount: r + }; + E(e); + E(t); + E(s); + E(n); + r = 0; + return D; + } + i.getAndClearMeasurements = x; + function k(D) { + return { + average: D.total / r, + max: D.max, + min: D.min + }; + } + function E(D) { + D.total = 0; + D.min = Number.MAX_VALUE; + D.max = 0; + } + })(i4 ||= {}); + } +}); +function Fjn(i) { + return qee.has(i); +} +function Ojn() { + return new WXi(); +} +function pd(i = xt.document.head, e, t) { + const s = document.createElement("style"); + s.type = "text/css"; + s.media = "screen"; + e?.(s); + i.appendChild(s); + if (t) { + t.add(Ue(() => s.remove())); + } + if (i === xt.document.head) { + const n = new Set(); + qee.set(s, n); + for (const { + window: r, + disposables: o + } of Jk()) { + if (r === xt) { + continue; + } + const a = o.add(_Xi(s, n, r)); + t?.add(a); + } + } + return s; +} +function _jn(i) { + const e = new Q(); + for (const [t, s] of qee) { + e.add(_Xi(t, s, i)); + } + return e; +} +function _Xi(i, e, t) { + const s = new Q(); + const n = i.cloneNode(true); + t.document.head.appendChild(n); + s.add(Ue(() => n.remove())); + for (const r of UXi(i)) { + n.sheet?.insertRule(r.cssText, n.sheet?.cssRules.length); + } + s.add(Brt.observe(i, s, { + childList: true + })(() => { + n.textContent = i.textContent; + })); + e.add(n); + s.add(Ue(() => e.delete(n))); + return s; +} +function BXi() { + zot ||= pd(); + return zot; +} +function UXi(i) { + if (i?.sheet?.rules) { + return i.sheet.rules; + } else if (i?.sheet?.cssRules) { + return i.sheet.cssRules; + } else { + return []; + } +} +function o1(i, e, t = BXi()) { + if (!!t && !!e) { + t.sheet?.insertRule(`${i} {${e}}`, 0); + for (const s of qee.get(t) ?? []) { + o1(i, e, s); + } + } +} +function s4(i, e = BXi()) { + if (!e) { + return; + } + const t = UXi(e); + const s = []; + for (let n = 0; n < t.length; n++) { + const r = t[n]; + if (Bjn(r) && r.selectorText.indexOf(i) !== -1) { + s.push(n); + } + } + for (let n = s.length - 1; n >= 0; n--) { + e.sheet?.deleteRule(s[n]); + } + for (const n of qee.get(e) ?? []) { + s4(i, n); + } +} +function Bjn(i) { + return typeof i.selectorText == "string"; +} +var qee; +var WXi; +var zot; +var md = ue({ + "out-build/vs/base/browser/domStylesheets.js"() { + "use strict"; + + q(); + xe(); + fr(); + qee = new Map(); + WXi = class { + constructor() { + this.a = ""; + this.b = undefined; + } + setStyle(i) { + if (i !== this.a) { + this.a = i; + if (this.b) { + this.b.innerText = i; + } else { + this.b = pd(xt.document.head, e => e.innerText = i); + } + } + } + dispose() { + if (this.b) { + this.b.remove(); + this.b = undefined; + } + } + }; + zot = null; + } +}); +var Sj; +var jee = ue({ + "out-build/vs/base/browser/globalPointerMoveMonitor.js"() { + "use strict"; + + xe(); + q(); + Sj = class { + constructor() { + this.a = new Q(); + this.b = null; + this.c = null; + } + dispose() { + this.stopMonitoring(false); + this.a.dispose(); + } + stopMonitoring(i, e) { + if (!this.isMonitoring()) { + return; + } + this.a.clear(); + this.b = null; + const t = this.c; + this.c = null; + if (i && t) { + t(e); + } + } + isMonitoring() { + return !!this.b; + } + startMonitoring(i, e, t, s, n) { + if (this.isMonitoring()) { + this.stopMonitoring(false); + } + this.b = s; + this.c = n; + let r = i; + try { + i.setPointerCapture(e); + this.a.add(Ue(() => { + try { + i.releasePointerCapture(e); + } catch {} + })); + } catch { + r = Kt(i); + } + this.a.add(Ce(r, Oe.POINTER_MOVE, o => { + if (o.buttons !== t) { + this.stopMonitoring(true); + return; + } + o.preventDefault(); + this.b(o); + })); + this.a.add(Ce(r, Oe.POINTER_UP, o => this.stopMonitoring(true))); + } + }; + } +}); +function E9(i, e) { + const t = Math.pow(10, e); + return Math.round(i * t) / t; +} +var Ti; +var I9; +var n4; +var ut; +var Zo = ue({ + "out-build/vs/base/common/color.js"() { + "use strict"; + + Ti = class { + constructor(i, e, t, s = 1) { + this._rgbaBrand = undefined; + this.r = Math.min(255, Math.max(0, i)) | 0; + this.g = Math.min(255, Math.max(0, e)) | 0; + this.b = Math.min(255, Math.max(0, t)) | 0; + this.a = E9(Math.max(Math.min(1, s), 0), 3); + } + static equals(i, e) { + return i.r === e.r && i.g === e.g && i.b === e.b && i.a === e.a; + } + }; + I9 = class jPe { + constructor(e, t, s, n) { + this._hslaBrand = undefined; + this.h = Math.max(Math.min(360, e), 0) | 0; + this.s = E9(Math.max(Math.min(1, t), 0), 3); + this.l = E9(Math.max(Math.min(1, s), 0), 3); + this.a = E9(Math.max(Math.min(1, n), 0), 3); + } + static equals(e, t) { + return e.h === t.h && e.s === t.s && e.l === t.l && e.a === t.a; + } + static fromRGBA(e) { + const t = e.r / 255; + const s = e.g / 255; + const n = e.b / 255; + const r = e.a; + const o = Math.max(t, s, n); + const a = Math.min(t, s, n); + let l = 0; + let c = 0; + const u = (a + o) / 2; + const d = o - a; + if (d > 0) { + c = Math.min(u <= 0.5 ? d / (u * 2) : d / (2 - u * 2), 1); + switch (o) { + case t: + l = (s - n) / d + (s < n ? 6 : 0); + break; + case s: + l = (n - t) / d + 2; + break; + case n: + l = (t - s) / d + 4; + break; + } + l *= 60; + l = Math.round(l); + } + return new jPe(l, c, u, r); + } + static i(e, t, s) { + if (s < 0) { + s += 1; + } + if (s > 1) { + s -= 1; + } + if (s < 1 / 6) { + return e + (t - e) * 6 * s; + } else if (s < 1 / 2) { + return t; + } else if (s < 2 / 3) { + return e + (t - e) * (2 / 3 - s) * 6; + } else { + return e; + } + } + static toRGBA(e) { + const t = e.h / 360; + const { + s, + l: n, + a: r + } = e; + let o; + let a; + let l; + if (s === 0) { + o = a = l = n; + } else { + const c = n < 0.5 ? n * (1 + s) : n + s - n * s; + const u = n * 2 - c; + o = jPe.i(u, c, t + 1 / 3); + a = jPe.i(u, c, t); + l = jPe.i(u, c, t - 1 / 3); + } + return new Ti(Math.round(o * 255), Math.round(a * 255), Math.round(l * 255), r); + } + }; + n4 = class AFn { + constructor(e, t, s, n) { + this._hsvaBrand = undefined; + this.h = Math.max(Math.min(360, e), 0) | 0; + this.s = E9(Math.max(Math.min(1, t), 0), 3); + this.v = E9(Math.max(Math.min(1, s), 0), 3); + this.a = E9(Math.max(Math.min(1, n), 0), 3); + } + static equals(e, t) { + return e.h === t.h && e.s === t.s && e.v === t.v && e.a === t.a; + } + static fromRGBA(e) { + const t = e.r / 255; + const s = e.g / 255; + const n = e.b / 255; + const r = Math.max(t, s, n); + const o = Math.min(t, s, n); + const a = r - o; + const l = r === 0 ? 0 : a / r; + let c; + if (a === 0) { + c = 0; + } else if (r === t) { + c = ((s - n) / a % 6 + 6) % 6; + } else if (r === s) { + c = (n - t) / a + 2; + } else { + c = (t - s) / a + 4; + } + return new AFn(Math.round(c * 60), l, r, e.a); + } + static toRGBA(e) { + const { + h: t, + s, + v: n, + a: r + } = e; + const o = n * s; + const a = o * (1 - Math.abs(t / 60 % 2 - 1)); + const l = n - o; + let [c, u, d] = [0, 0, 0]; + if (t < 60) { + c = o; + u = a; + } else if (t < 120) { + c = a; + u = o; + } else if (t < 180) { + u = o; + d = a; + } else if (t < 240) { + u = a; + d = o; + } else if (t < 300) { + c = a; + d = o; + } else if (t <= 360) { + c = o; + d = a; + } + c = Math.round((c + l) * 255); + u = Math.round((u + l) * 255); + d = Math.round((d + l) * 255); + return new Ti(c, u, d, r); + } + }; + ut = class up { + static fromHex(e) { + return up.Format.CSS.parseHex(e) || up.red; + } + static equals(e, t) { + if (!e && !t) { + return true; + } else if (!e || !t) { + return false; + } else { + return e.equals(t); + } + } + get hsla() { + if (this.i) { + return this.i; + } else { + return I9.fromRGBA(this.rgba); + } + } + get hsva() { + if (this.j) { + return this.j; + } else { + return n4.fromRGBA(this.rgba); + } + } + constructor(e) { + if (e) { + if (e instanceof Ti) { + this.rgba = e; + } else if (e instanceof I9) { + this.i = e; + this.rgba = I9.toRGBA(e); + } else if (e instanceof n4) { + this.j = e; + this.rgba = n4.toRGBA(e); + } else { + throw new Error("Invalid color ctor argument"); + } + } else { + throw new Error("Color needs a value"); + } + } + equals(e) { + return !!e && Ti.equals(this.rgba, e.rgba) && I9.equals(this.hsla, e.hsla) && n4.equals(this.hsva, e.hsva); + } + getRelativeLuminance() { + const e = up.k(this.rgba.r); + const t = up.k(this.rgba.g); + const s = up.k(this.rgba.b); + const n = e * 0.2126 + t * 0.7152 + s * 0.0722; + return E9(n, 4); + } + reduceRelativeLuminace(e, t) { + let { + r: s, + g: n, + b: r + } = e.rgba; + let o = this.getContrastRatio(e); + while (o < t && (s > 0 || n > 0 || r > 0)) { + s -= Math.max(0, Math.ceil(s * 0.1)); + n -= Math.max(0, Math.ceil(n * 0.1)); + r -= Math.max(0, Math.ceil(r * 0.1)); + o = this.getContrastRatio(new up(new Ti(s, n, r))); + } + return new up(new Ti(s, n, r)); + } + increaseRelativeLuminace(e, t) { + let { + r: s, + g: n, + b: r + } = e.rgba; + let o = this.getContrastRatio(e); + while (o < t && (s < 255 || n < 255 || r < 255)) { + s = Math.min(255, s + Math.ceil((255 - s) * 0.1)); + n = Math.min(255, n + Math.ceil((255 - n) * 0.1)); + r = Math.min(255, r + Math.ceil((255 - r) * 0.1)); + o = this.getContrastRatio(new up(new Ti(s, n, r))); + } + return new up(new Ti(s, n, r)); + } + static k(e) { + const t = e / 255; + if (t <= 0.03928) { + return t / 12.92; + } else { + return Math.pow((t + 0.055) / 1.055, 2.4); + } + } + getContrastRatio(e) { + const t = this.getRelativeLuminance(); + const s = e.getRelativeLuminance(); + if (t > s) { + return (t + 0.05) / (s + 0.05); + } else { + return (s + 0.05) / (t + 0.05); + } + } + isDarker() { + return (this.rgba.r * 299 + this.rgba.g * 587 + this.rgba.b * 114) / 1000 < 128; + } + isLighter() { + return (this.rgba.r * 299 + this.rgba.g * 587 + this.rgba.b * 114) / 1000 >= 128; + } + isLighterThan(e) { + const t = this.getRelativeLuminance(); + const s = e.getRelativeLuminance(); + return t > s; + } + isDarkerThan(e) { + const t = this.getRelativeLuminance(); + const s = e.getRelativeLuminance(); + return t < s; + } + ensureConstrast(e, t) { + const s = this.getRelativeLuminance(); + const n = e.getRelativeLuminance(); + if (this.getContrastRatio(e) < t) { + if (n < s) { + const l = this.reduceRelativeLuminace(e, t); + const c = this.getContrastRatio(l); + if (c < t) { + const u = this.increaseRelativeLuminace(e, t); + const d = this.getContrastRatio(u); + if (c > d) { + return l; + } else { + return u; + } + } + return l; + } + const o = this.increaseRelativeLuminace(e, t); + const a = this.getContrastRatio(o); + if (a < t) { + const l = this.reduceRelativeLuminace(e, t); + const c = this.getContrastRatio(l); + if (a > c) { + return o; + } else { + return l; + } + } + return o; + } + return e; + } + lighten(e) { + return new up(new I9(this.hsla.h, this.hsla.s, this.hsla.l + this.hsla.l * e, this.hsla.a)); + } + darken(e) { + return new up(new I9(this.hsla.h, this.hsla.s, this.hsla.l - this.hsla.l * e, this.hsla.a)); + } + transparent(e) { + const { + r: t, + g: s, + b: n, + a: r + } = this.rgba; + return new up(new Ti(t, s, n, r * e)); + } + isTransparent() { + return this.rgba.a === 0; + } + isOpaque() { + return this.rgba.a === 1; + } + opposite() { + return new up(new Ti(255 - this.rgba.r, 255 - this.rgba.g, 255 - this.rgba.b, this.rgba.a)); + } + blend(e) { + const t = e.rgba; + const s = this.rgba.a; + const n = t.a; + const r = s + n * (1 - s); + if (r < 0.000001) { + return up.transparent; + } + const o = this.rgba.r * s / r + t.r * n * (1 - s) / r; + const a = this.rgba.g * s / r + t.g * n * (1 - s) / r; + const l = this.rgba.b * s / r + t.b * n * (1 - s) / r; + return new up(new Ti(o, a, l, r)); + } + makeOpaque(e) { + if (this.isOpaque() || e.rgba.a !== 1) { + return this; + } + const { + r: t, + g: s, + b: n, + a: r + } = this.rgba; + return new up(new Ti(e.rgba.r - r * (e.rgba.r - t), e.rgba.g - r * (e.rgba.g - s), e.rgba.b - r * (e.rgba.b - n), 1)); + } + flatten(...e) { + const t = e.reduceRight((s, n) => up.o(n, s)); + return up.o(this, t); + } + static o(e, t) { + const s = 1 - e.rgba.a; + return new up(new Ti(s * t.rgba.r + e.rgba.a * e.rgba.r, s * t.rgba.g + e.rgba.a * e.rgba.g, s * t.rgba.b + e.rgba.a * e.rgba.b)); + } + toString() { + this.u ||= up.Format.CSS.format(this); + return this.u; + } + toNumber24Bit() { + this.w ||= (this.rgba.r << 24 | this.rgba.g << 16 | this.rgba.b << 8 | this.rgba.a * 255 << 0) >>> 0; + return this.w; + } + static getLighterColor(e, t, s) { + if (e.isLighterThan(t)) { + return e; + } + s = s || 0.5; + const n = e.getRelativeLuminance(); + const r = t.getRelativeLuminance(); + s = s * (r - n) / r; + return e.lighten(s); + } + static getDarkerColor(e, t, s) { + if (e.isDarkerThan(t)) { + return e; + } + s = s || 0.5; + const n = e.getRelativeLuminance(); + const r = t.getRelativeLuminance(); + s = s * (n - r) / n; + return e.darken(s); + } + static { + this.white = new up(new Ti(255, 255, 255, 1)); + } + static { + this.black = new up(new Ti(0, 0, 0, 1)); + } + static { + this.red = new up(new Ti(255, 0, 0, 1)); + } + static { + this.blue = new up(new Ti(0, 0, 255, 1)); + } + static { + this.green = new up(new Ti(0, 255, 0, 1)); + } + static { + this.cyan = new up(new Ti(0, 255, 255, 1)); + } + static { + this.lightgrey = new up(new Ti(211, 211, 211, 1)); + } + static { + this.transparent = new up(new Ti(0, 0, 0, 0)); + } + }; + (function (i) { + let e; + (function (t) { + let s; + (function (n) { + function r(y) { + if (y.rgba.a === 1) { + return `rgb(${y.rgba.r}, ${y.rgba.g}, ${y.rgba.b})`; + } else { + return i.Format.CSS.formatRGBA(y); + } + } + n.formatRGB = r; + function o(y) { + return `rgba(${y.rgba.r}, ${y.rgba.g}, ${y.rgba.b}, ${+y.rgba.a.toFixed(2)})`; + } + n.formatRGBA = o; + function a(y) { + if (y.hsla.a === 1) { + return `hsl(${y.hsla.h}, ${(y.hsla.s * 100).toFixed(2)}%, ${(y.hsla.l * 100).toFixed(2)}%)`; + } else { + return i.Format.CSS.formatHSLA(y); + } + } + n.formatHSL = a; + function l(y) { + return `hsla(${y.hsla.h}, ${(y.hsla.s * 100).toFixed(2)}%, ${(y.hsla.l * 100).toFixed(2)}%, ${y.hsla.a.toFixed(2)})`; + } + n.formatHSLA = l; + function c(y) { + const w = y.toString(16); + if (w.length !== 2) { + return "0" + w; + } else { + return w; + } + } + function u(y) { + return `#${c(y.rgba.r)}${c(y.rgba.g)}${c(y.rgba.b)}`; + } + n.formatHex = u; + function d(y, w = false) { + if (w && y.rgba.a === 1) { + return i.Format.CSS.formatHex(y); + } else { + return `#${c(y.rgba.r)}${c(y.rgba.g)}${c(y.rgba.b)}${c(Math.round(y.rgba.a * 255))}`; + } + } + n.formatHexA = d; + function h(y) { + if (y.isOpaque()) { + return i.Format.CSS.formatHex(y); + } else { + return i.Format.CSS.formatRGBA(y); + } + } + n.format = h; + function g(y) { + if (y === "transparent") { + return i.transparent; + } + if (y.startsWith("#")) { + return b(y); + } + if (y.startsWith("rgba(")) { + const w = y.match(/rgba\((?(?:\+|-)?\d+), *(?(?:\+|-)?\d+), *(?(?:\+|-)?\d+), *(?(?:\+|-)?\d+(\.\d+)?)\)/); + if (!w) { + throw new Error("Invalid color format " + y); + } + const C = parseInt(w.groups?.r ?? "0"); + const S = parseInt(w.groups?.g ?? "0"); + const x = parseInt(w.groups?.b ?? "0"); + const k = parseFloat(w.groups?.a ?? "0"); + return new i(new Ti(C, S, x, k)); + } + if (y.startsWith("rgb(")) { + const w = y.match(/rgb\((?(?:\+|-)?\d+), *(?(?:\+|-)?\d+), *(?(?:\+|-)?\d+)\)/); + if (!w) { + throw new Error("Invalid color format " + y); + } + const C = parseInt(w.groups?.r ?? "0"); + const S = parseInt(w.groups?.g ?? "0"); + const x = parseInt(w.groups?.b ?? "0"); + return new i(new Ti(C, S, x)); + } + return p(y); + } + n.parse = g; + function p(y) { + switch (y) { + case "aliceblue": + return new i(new Ti(240, 248, 255, 1)); + case "antiquewhite": + return new i(new Ti(250, 235, 215, 1)); + case "aqua": + return new i(new Ti(0, 255, 255, 1)); + case "aquamarine": + return new i(new Ti(127, 255, 212, 1)); + case "azure": + return new i(new Ti(240, 255, 255, 1)); + case "beige": + return new i(new Ti(245, 245, 220, 1)); + case "bisque": + return new i(new Ti(255, 228, 196, 1)); + case "black": + return new i(new Ti(0, 0, 0, 1)); + case "blanchedalmond": + return new i(new Ti(255, 235, 205, 1)); + case "blue": + return new i(new Ti(0, 0, 255, 1)); + case "blueviolet": + return new i(new Ti(138, 43, 226, 1)); + case "brown": + return new i(new Ti(165, 42, 42, 1)); + case "burlywood": + return new i(new Ti(222, 184, 135, 1)); + case "cadetblue": + return new i(new Ti(95, 158, 160, 1)); + case "chartreuse": + return new i(new Ti(127, 255, 0, 1)); + case "chocolate": + return new i(new Ti(210, 105, 30, 1)); + case "coral": + return new i(new Ti(255, 127, 80, 1)); + case "cornflowerblue": + return new i(new Ti(100, 149, 237, 1)); + case "cornsilk": + return new i(new Ti(255, 248, 220, 1)); + case "crimson": + return new i(new Ti(220, 20, 60, 1)); + case "cyan": + return new i(new Ti(0, 255, 255, 1)); + case "darkblue": + return new i(new Ti(0, 0, 139, 1)); + case "darkcyan": + return new i(new Ti(0, 139, 139, 1)); + case "darkgoldenrod": + return new i(new Ti(184, 134, 11, 1)); + case "darkgray": + return new i(new Ti(169, 169, 169, 1)); + case "darkgreen": + return new i(new Ti(0, 100, 0, 1)); + case "darkgrey": + return new i(new Ti(169, 169, 169, 1)); + case "darkkhaki": + return new i(new Ti(189, 183, 107, 1)); + case "darkmagenta": + return new i(new Ti(139, 0, 139, 1)); + case "darkolivegreen": + return new i(new Ti(85, 107, 47, 1)); + case "darkorange": + return new i(new Ti(255, 140, 0, 1)); + case "darkorchid": + return new i(new Ti(153, 50, 204, 1)); + case "darkred": + return new i(new Ti(139, 0, 0, 1)); + case "darksalmon": + return new i(new Ti(233, 150, 122, 1)); + case "darkseagreen": + return new i(new Ti(143, 188, 143, 1)); + case "darkslateblue": + return new i(new Ti(72, 61, 139, 1)); + case "darkslategray": + return new i(new Ti(47, 79, 79, 1)); + case "darkslategrey": + return new i(new Ti(47, 79, 79, 1)); + case "darkturquoise": + return new i(new Ti(0, 206, 209, 1)); + case "darkviolet": + return new i(new Ti(148, 0, 211, 1)); + case "deeppink": + return new i(new Ti(255, 20, 147, 1)); + case "deepskyblue": + return new i(new Ti(0, 191, 255, 1)); + case "dimgray": + return new i(new Ti(105, 105, 105, 1)); + case "dimgrey": + return new i(new Ti(105, 105, 105, 1)); + case "dodgerblue": + return new i(new Ti(30, 144, 255, 1)); + case "firebrick": + return new i(new Ti(178, 34, 34, 1)); + case "floralwhite": + return new i(new Ti(255, 250, 240, 1)); + case "forestgreen": + return new i(new Ti(34, 139, 34, 1)); + case "fuchsia": + return new i(new Ti(255, 0, 255, 1)); + case "gainsboro": + return new i(new Ti(220, 220, 220, 1)); + case "ghostwhite": + return new i(new Ti(248, 248, 255, 1)); + case "gold": + return new i(new Ti(255, 215, 0, 1)); + case "goldenrod": + return new i(new Ti(218, 165, 32, 1)); + case "gray": + return new i(new Ti(128, 128, 128, 1)); + case "green": + return new i(new Ti(0, 128, 0, 1)); + case "greenyellow": + return new i(new Ti(173, 255, 47, 1)); + case "grey": + return new i(new Ti(128, 128, 128, 1)); + case "honeydew": + return new i(new Ti(240, 255, 240, 1)); + case "hotpink": + return new i(new Ti(255, 105, 180, 1)); + case "indianred": + return new i(new Ti(205, 92, 92, 1)); + case "indigo": + return new i(new Ti(75, 0, 130, 1)); + case "ivory": + return new i(new Ti(255, 255, 240, 1)); + case "khaki": + return new i(new Ti(240, 230, 140, 1)); + case "lavender": + return new i(new Ti(230, 230, 250, 1)); + case "lavenderblush": + return new i(new Ti(255, 240, 245, 1)); + case "lawngreen": + return new i(new Ti(124, 252, 0, 1)); + case "lemonchiffon": + return new i(new Ti(255, 250, 205, 1)); + case "lightblue": + return new i(new Ti(173, 216, 230, 1)); + case "lightcoral": + return new i(new Ti(240, 128, 128, 1)); + case "lightcyan": + return new i(new Ti(224, 255, 255, 1)); + case "lightgoldenrodyellow": + return new i(new Ti(250, 250, 210, 1)); + case "lightgray": + return new i(new Ti(211, 211, 211, 1)); + case "lightgreen": + return new i(new Ti(144, 238, 144, 1)); + case "lightgrey": + return new i(new Ti(211, 211, 211, 1)); + case "lightpink": + return new i(new Ti(255, 182, 193, 1)); + case "lightsalmon": + return new i(new Ti(255, 160, 122, 1)); + case "lightseagreen": + return new i(new Ti(32, 178, 170, 1)); + case "lightskyblue": + return new i(new Ti(135, 206, 250, 1)); + case "lightslategray": + return new i(new Ti(119, 136, 153, 1)); + case "lightslategrey": + return new i(new Ti(119, 136, 153, 1)); + case "lightsteelblue": + return new i(new Ti(176, 196, 222, 1)); + case "lightyellow": + return new i(new Ti(255, 255, 224, 1)); + case "lime": + return new i(new Ti(0, 255, 0, 1)); + case "limegreen": + return new i(new Ti(50, 205, 50, 1)); + case "linen": + return new i(new Ti(250, 240, 230, 1)); + case "magenta": + return new i(new Ti(255, 0, 255, 1)); + case "maroon": + return new i(new Ti(128, 0, 0, 1)); + case "mediumaquamarine": + return new i(new Ti(102, 205, 170, 1)); + case "mediumblue": + return new i(new Ti(0, 0, 205, 1)); + case "mediumorchid": + return new i(new Ti(186, 85, 211, 1)); + case "mediumpurple": + return new i(new Ti(147, 112, 219, 1)); + case "mediumseagreen": + return new i(new Ti(60, 179, 113, 1)); + case "mediumslateblue": + return new i(new Ti(123, 104, 238, 1)); + case "mediumspringgreen": + return new i(new Ti(0, 250, 154, 1)); + case "mediumturquoise": + return new i(new Ti(72, 209, 204, 1)); + case "mediumvioletred": + return new i(new Ti(199, 21, 133, 1)); + case "midnightblue": + return new i(new Ti(25, 25, 112, 1)); + case "mintcream": + return new i(new Ti(245, 255, 250, 1)); + case "mistyrose": + return new i(new Ti(255, 228, 225, 1)); + case "moccasin": + return new i(new Ti(255, 228, 181, 1)); + case "navajowhite": + return new i(new Ti(255, 222, 173, 1)); + case "navy": + return new i(new Ti(0, 0, 128, 1)); + case "oldlace": + return new i(new Ti(253, 245, 230, 1)); + case "olive": + return new i(new Ti(128, 128, 0, 1)); + case "olivedrab": + return new i(new Ti(107, 142, 35, 1)); + case "orange": + return new i(new Ti(255, 165, 0, 1)); + case "orangered": + return new i(new Ti(255, 69, 0, 1)); + case "orchid": + return new i(new Ti(218, 112, 214, 1)); + case "palegoldenrod": + return new i(new Ti(238, 232, 170, 1)); + case "palegreen": + return new i(new Ti(152, 251, 152, 1)); + case "paleturquoise": + return new i(new Ti(175, 238, 238, 1)); + case "palevioletred": + return new i(new Ti(219, 112, 147, 1)); + case "papayawhip": + return new i(new Ti(255, 239, 213, 1)); + case "peachpuff": + return new i(new Ti(255, 218, 185, 1)); + case "peru": + return new i(new Ti(205, 133, 63, 1)); + case "pink": + return new i(new Ti(255, 192, 203, 1)); + case "plum": + return new i(new Ti(221, 160, 221, 1)); + case "powderblue": + return new i(new Ti(176, 224, 230, 1)); + case "purple": + return new i(new Ti(128, 0, 128, 1)); + case "rebeccapurple": + return new i(new Ti(102, 51, 153, 1)); + case "red": + return new i(new Ti(255, 0, 0, 1)); + case "rosybrown": + return new i(new Ti(188, 143, 143, 1)); + case "royalblue": + return new i(new Ti(65, 105, 225, 1)); + case "saddlebrown": + return new i(new Ti(139, 69, 19, 1)); + case "salmon": + return new i(new Ti(250, 128, 114, 1)); + case "sandybrown": + return new i(new Ti(244, 164, 96, 1)); + case "seagreen": + return new i(new Ti(46, 139, 87, 1)); + case "seashell": + return new i(new Ti(255, 245, 238, 1)); + case "sienna": + return new i(new Ti(160, 82, 45, 1)); + case "silver": + return new i(new Ti(192, 192, 192, 1)); + case "skyblue": + return new i(new Ti(135, 206, 235, 1)); + case "slateblue": + return new i(new Ti(106, 90, 205, 1)); + case "slategray": + return new i(new Ti(112, 128, 144, 1)); + case "slategrey": + return new i(new Ti(112, 128, 144, 1)); + case "snow": + return new i(new Ti(255, 250, 250, 1)); + case "springgreen": + return new i(new Ti(0, 255, 127, 1)); + case "steelblue": + return new i(new Ti(70, 130, 180, 1)); + case "tan": + return new i(new Ti(210, 180, 140, 1)); + case "teal": + return new i(new Ti(0, 128, 128, 1)); + case "thistle": + return new i(new Ti(216, 191, 216, 1)); + case "tomato": + return new i(new Ti(255, 99, 71, 1)); + case "turquoise": + return new i(new Ti(64, 224, 208, 1)); + case "violet": + return new i(new Ti(238, 130, 238, 1)); + case "wheat": + return new i(new Ti(245, 222, 179, 1)); + case "white": + return new i(new Ti(255, 255, 255, 1)); + case "whitesmoke": + return new i(new Ti(245, 245, 245, 1)); + case "yellow": + return new i(new Ti(255, 255, 0, 1)); + case "yellowgreen": + return new i(new Ti(154, 205, 50, 1)); + default: + return null; + } + } + function b(y) { + const w = y.length; + if (w === 0 || y.charCodeAt(0) !== 35) { + return null; + } + if (w === 7) { + const C = v(y.charCodeAt(1)) * 16 + v(y.charCodeAt(2)); + const S = v(y.charCodeAt(3)) * 16 + v(y.charCodeAt(4)); + const x = v(y.charCodeAt(5)) * 16 + v(y.charCodeAt(6)); + return new i(new Ti(C, S, x, 1)); + } + if (w === 9) { + const C = v(y.charCodeAt(1)) * 16 + v(y.charCodeAt(2)); + const S = v(y.charCodeAt(3)) * 16 + v(y.charCodeAt(4)); + const x = v(y.charCodeAt(5)) * 16 + v(y.charCodeAt(6)); + const k = v(y.charCodeAt(7)) * 16 + v(y.charCodeAt(8)); + return new i(new Ti(C, S, x, k / 255)); + } + if (w === 4) { + const C = v(y.charCodeAt(1)); + const S = v(y.charCodeAt(2)); + const x = v(y.charCodeAt(3)); + return new i(new Ti(C * 16 + C, S * 16 + S, x * 16 + x)); + } + if (w === 5) { + const C = v(y.charCodeAt(1)); + const S = v(y.charCodeAt(2)); + const x = v(y.charCodeAt(3)); + const k = v(y.charCodeAt(4)); + return new i(new Ti(C * 16 + C, S * 16 + S, x * 16 + x, (k * 16 + k) / 255)); + } + return null; + } + n.parseHex = b; + function v(y) { + switch (y) { + case 48: + return 0; + case 49: + return 1; + case 50: + return 2; + case 51: + return 3; + case 52: + return 4; + case 53: + return 5; + case 54: + return 6; + case 55: + return 7; + case 56: + return 8; + case 57: + return 9; + case 97: + return 10; + case 65: + return 10; + case 98: + return 11; + case 66: + return 11; + case 99: + return 12; + case 67: + return 12; + case 100: + return 13; + case 68: + return 13; + case 101: + return 14; + case 69: + return 14; + case 102: + return 15; + case 70: + return 15; + } + return 0; + } + })(s = t.CSS ||= {}); + })(e = i.Format ||= {}); + })(ut ||= {}); + } +}); +function D9(i) { + return `--vscode-${i.replace(/\./g, "-")}`; +} +function Ui(i) { + return `var(${D9(i)})`; +} +function Jot(i, e) { + return `var(${D9(i)}, ${e})`; +} +function Ujn(i) { + return i !== null && typeof i == "object" && "light" in i && "dark" in i; +} +function he(i, e, t, s, n) { + return Jee.registerColor(i, e, t, s, n); +} +function U8t() { + return Jee; +} +function Wjn(i, e) { + switch (i.op) { + case 0: + return HL(i.value, e)?.darken(i.factor); + case 1: + return HL(i.value, e)?.lighten(i.factor); + case 2: + return HL(i.value, e)?.transparent(i.factor); + case 3: + { + const t = HL(i.background, e); + if (t) { + return HL(i.value, e)?.makeOpaque(t); + } else { + return HL(i.value, e); + } + } + case 4: + for (const t of i.values) { + const s = HL(t, e); + if (s) { + return s; + } + } + return; + case 6: + return HL(e.defines(i.if) ? i.then : i.else, e); + case 5: + { + const t = HL(i.value, e); + if (!t) { + return; + } + const s = HL(i.background, e); + if (s) { + if (t.isDarkerThan(s)) { + return ut.getLighterColor(t, s, i.factor).transparent(i.transparency); + } else { + return ut.getDarkerColor(t, s, i.factor).transparent(i.transparency); + } + } else { + return t.transparent(i.factor * i.transparency); + } + } + default: + throw _L(i); + } +} +function Qk(i, e) { + return { + op: 0, + value: i, + factor: e + }; +} +function $T(i, e) { + return { + op: 1, + value: i, + factor: e + }; +} +function Bs(i, e) { + return { + op: 2, + value: i, + factor: e + }; +} +function Got(i, e) { + return { + op: 3, + value: i, + background: e + }; +} +function Vge(...i) { + return { + op: 4, + values: i + }; +} +function Hge(i, e, t) { + return { + op: 6, + if: i, + then: e, + else: t + }; +} +function VXi(i, e, t, s) { + return { + op: 5, + value: i, + background: e, + factor: t, + transparency: s + }; +} +function HL(i, e) { + if (i !== null) { + if (typeof i == "string") { + if (i[0] === "#") { + return ut.fromHex(i); + } else { + return e.getColor(i); + } + } + if (i instanceof ut) { + return i; + } + if (typeof i == "object") { + return Wjn(i, e); + } + } +} +var HXi; +var zee; +var qge; +var qXi; +var Jee; +var Gee; +var W8t; +var V8t; +var Hv = ue({ + "out-build/vs/platform/theme/common/colorUtils.js"() { + "use strict"; + + bm(); + nt(); + Zo(); + pe(); + Gb(); + Ht(); + X(); + (function (i) { + i[i.Darken = 0] = "Darken"; + i[i.Lighten = 1] = "Lighten"; + i[i.Transparent = 2] = "Transparent"; + i[i.Opaque = 3] = "Opaque"; + i[i.OneOf = 4] = "OneOf"; + i[i.LessProminent = 5] = "LessProminent"; + i[i.IfDefinedThenElse = 6] = "IfDefinedThenElse"; + })(HXi ||= {}); + zee = { + ColorContribution: "base.contributions.colors" + }; + qge = "default"; + qXi = class { + constructor() { + this.c = new B(); + this.onDidChangeSchema = this.c.event; + this.e = { + type: "object", + properties: {} + }; + this.f = { + type: "string", + enum: [], + enumDescriptions: [] + }; + this.d = {}; + } + notifyThemeUpdate(i) { + for (const e of Object.keys(this.d)) { + const t = i.getColor(e); + if (t) { + this.e.properties[e].oneOf[0].defaultSnippets[0].body = `\${1:${t.toString()}}`; + } + } + this.c.fire(); + } + registerColor(i, e, t, s = false, n) { + const r = { + id: i, + description: t, + defaults: e, + needsTransparency: s, + deprecationMessage: n + }; + this.d[i] = r; + const o = { + type: "string", + format: "color-hex", + defaultSnippets: [{ + body: "${1:#ff0000}" + }] + }; + if (n) { + o.deprecationMessage = n; + } + if (s) { + o.pattern = "^#(?:(?[0-9a-fA-f]{3}[0-9a-eA-E])|(?:[0-9a-fA-F]{6}(?:(?![fF]{2})(?:[0-9a-fA-F]{2}))))?$"; + o.patternErrorMessage = f(2405, null); + } + this.e.properties[i] = { + description: t, + oneOf: [o, { + type: "string", + const: qge, + description: f(2406, null) + }] + }; + this.f.enum.push(i); + this.f.enumDescriptions.push(t); + this.c.fire(); + return i; + } + deregisterColor(i) { + delete this.d[i]; + delete this.e.properties[i]; + const e = this.f.enum.indexOf(i); + if (e !== -1) { + this.f.enum.splice(e, 1); + this.f.enumDescriptions.splice(e, 1); + } + this.c.fire(); + } + getColors() { + return Object.keys(this.d).map(i => this.d[i]); + } + resolveDefaultColor(i, e) { + const t = this.d[i]; + if (t?.defaults) { + const s = Ujn(t.defaults) ? t.defaults[e.type] : t.defaults; + return HL(s, e); + } + } + getColorSchema() { + return this.e; + } + getColorReferenceSchema() { + return this.f; + } + toString() { + const i = (e, t) => { + const s = e.indexOf(".") === -1 ? 0 : 1; + const n = t.indexOf(".") === -1 ? 0 : 1; + if (s !== n) { + return s - n; + } else { + return e.localeCompare(t); + } + }; + return Object.keys(this.d).sort(i).map(e => `- \`${e}\`: ${this.d[e].description}`).join(` +`); + } + }; + Jee = new qXi(); + Pe.add(zee.ColorContribution, Jee); + Gee = "vscode://schemas/workbench-colors"; + W8t = Pe.as(Vm.JSONContribution); + W8t.registerSchema(Gee, Jee.getColorSchema()); + V8t = new Vn(() => W8t.notifySchemaChanged(Gee), 200); + Jee.onDidChangeSchema(() => { + if (!V8t.isScheduled()) { + V8t.schedule(); + } + }); + } +}); +var Nr; +var H8t; +var jge; +var Vjn; +var Kee; +var bp; +var cn; +var Oc; +var q8t; +var Zk; +var Kot; +var Hjn; +var qjn; +var jjn; +var jXi; +var zXi; +var zjn; +var T9 = ue({ + "out-build/vs/platform/theme/common/colors/baseColors.js"() { + "use strict"; + + X(); + Zo(); + Hv(); + Nr = he("foreground", { + dark: "#CCCCCC", + light: "#616161", + hcDark: "#FFFFFF", + hcLight: "#292929" + }, f(2160, null)); + H8t = he("disabledForeground", { + dark: "#CCCCCC80", + light: "#61616180", + hcDark: "#A5A5A5", + hcLight: "#7F7F7F" + }, f(2161, null)); + jge = he("errorForeground", { + dark: "#F48771", + light: "#A1260D", + hcDark: "#F48771", + hcLight: "#B5200D" + }, f(2162, null)); + Vjn = he("descriptionForeground", { + light: "#717171", + dark: Bs(Nr, 0.7), + hcDark: Bs(Nr, 0.7), + hcLight: Bs(Nr, 0.7) + }, f(2163, null)); + Kee = he("icon.foreground", { + dark: "#C5C5C5", + light: "#424242", + hcDark: "#FFFFFF", + hcLight: "#292929" + }, f(2164, null)); + bp = he("focusBorder", { + dark: "#007FD4", + light: "#0090F1", + hcDark: "#F38518", + hcLight: "#006BBD" + }, f(2165, null)); + cn = he("contrastBorder", { + light: null, + dark: null, + hcDark: "#6FC3DF", + hcLight: "#0F4A85" + }, f(2166, null)); + Oc = he("contrastActiveBorder", { + light: null, + dark: null, + hcDark: bp, + hcLight: bp + }, f(2167, null)); + q8t = he("selection.background", null, f(2168, null)); + Zk = he("textLink.foreground", { + light: "#006AB1", + dark: "#3794FF", + hcDark: "#21A6FF", + hcLight: "#0F4A85" + }, f(2169, null)); + Kot = he("textLink.activeForeground", { + light: "#006AB1", + dark: "#3794FF", + hcDark: "#21A6FF", + hcLight: "#0F4A85" + }, f(2170, null)); + Hjn = he("textSeparator.foreground", { + light: "#0000002e", + dark: "#ffffff2e", + hcDark: ut.black, + hcLight: "#292929" + }, f(2171, null)); + qjn = he("textPreformat.foreground", { + light: "#A31515", + dark: "#D7BA7D", + hcDark: "#000000", + hcLight: "#FFFFFF" + }, f(2172, null)); + jjn = he("textPreformat.background", { + light: "#0000001A", + dark: "#FFFFFF1A", + hcDark: "#FFFFFF", + hcLight: "#09345f" + }, f(2173, null)); + jXi = he("textBlockQuote.background", { + light: "#f2f2f2", + dark: "#222222", + hcDark: null, + hcLight: "#F2F2F2" + }, f(2174, null)); + zXi = he("textBlockQuote.border", { + light: "#007acc80", + dark: "#007acc80", + hcDark: ut.white, + hcLight: "#292929" + }, f(2175, null)); + zjn = he("textCodeBlock.background", { + light: "#dcdcdc66", + dark: "#0a0a0a66", + hcDark: ut.black, + hcLight: "#F2F2F2" + }, f(2176, null)); + } +}); +var Jjn; +var kx; +var qL; +var JXi; +var GXi; +var KXi; +var YXi; +var xj; +var Yee; +var kj; +var Ej; +var XXi; +var QXi; +var j8t; +var ZXi; +var Yot = ue({ + "out-build/vs/platform/theme/common/colors/miscColors.js"() { + "use strict"; + + X(); + Zo(); + Hv(); + T9(); + Jjn = he("sash.hoverBorder", bp, f(2378, null)); + kx = he("badge.background", { + dark: "#4D4D4D", + light: "#C4C4C4", + hcDark: ut.black, + hcLight: "#0F4A85" + }, f(2379, null)); + qL = he("badge.foreground", { + dark: ut.white, + light: "#333", + hcDark: ut.white, + hcLight: ut.white + }, f(2380, null)); + JXi = he("activityWarningBadge.foreground", { + dark: ut.black.lighten(0.2), + light: ut.white, + hcDark: null, + hcLight: ut.black.lighten(0.2) + }, f(2381, null)); + GXi = he("activityWarningBadge.background", { + dark: "#CCA700", + light: "#BF8803", + hcDark: null, + hcLight: "#CCA700" + }, f(2382, null)); + KXi = he("activityErrorBadge.foreground", { + dark: ut.black.lighten(0.2), + light: ut.white, + hcDark: null, + hcLight: ut.black.lighten(0.2) + }, f(2383, null)); + YXi = he("activityErrorBadge.background", { + dark: "#F14C4C", + light: "#E51400", + hcDark: null, + hcLight: "#F14C4C" + }, f(2384, null)); + xj = he("scrollbar.shadow", { + dark: "#000000", + light: "#DDDDDD", + hcDark: null, + hcLight: null + }, f(2385, null)); + Yee = he("scrollbarSlider.background", { + dark: ut.fromHex("#797979").transparent(0.4), + light: ut.fromHex("#646464").transparent(0.4), + hcDark: Bs(cn, 0.6), + hcLight: Bs(cn, 0.4) + }, f(2386, null)); + kj = he("scrollbarSlider.hoverBackground", { + dark: ut.fromHex("#646464").transparent(0.7), + light: ut.fromHex("#646464").transparent(0.7), + hcDark: Bs(cn, 0.8), + hcLight: Bs(cn, 0.8) + }, f(2387, null)); + Ej = he("scrollbarSlider.activeBackground", { + dark: ut.fromHex("#BFBFBF").transparent(0.4), + light: ut.fromHex("#000000").transparent(0.6), + hcDark: cn, + hcLight: cn + }, f(2388, null)); + XXi = he("progressBar.background", { + dark: ut.fromHex("#0E70C0"), + light: ut.fromHex("#0E70C0"), + hcDark: cn, + hcLight: cn + }, f(2389, null)); + QXi = he("chart.line", { + dark: "#236B8E", + light: "#236B8E", + hcDark: "#236B8E", + hcLight: "#236B8E" + }, f(2390, null)); + j8t = he("chart.axis", { + dark: ut.fromHex("#BFBFBF").transparent(0.4), + light: ut.fromHex("#000000").transparent(0.6), + hcDark: cn, + hcLight: cn + }, f(2391, null)); + ZXi = he("chart.guide", { + dark: ut.fromHex("#BFBFBF").transparent(0.2), + light: ut.fromHex("#000000").transparent(0.2), + hcDark: cn, + hcLight: cn + }, f(2392, null)); + } +}); +var wo; +var wm; +var Gjn; +var Kjn; +var Yjn; +var Xjn; +var $w; +var r4; +var Ij; +var Qjn; +var Zjn; +var DI; +var eQi; +var tQi; +var GC; +var Xee; +var ezn; +var Fw; +var Qee; +var iQi; +var tzn; +var sQi; +var FT; +var nQi; +var rQi; +var z8t; +var izn; +var szn; +var zge; +var oQi; +var TI; +var aQi; +var lQi; +var nzn; +var o4; +var cQi; +var J8t; +var P9; +var uQi; +var Xot; +var rzn; +var Qot; +var Zot; +var dQi; +var hQi; +var fQi; +var gQi; +var pQi; +var ozn; +var azn; +var lzn; +var czn; +var uzn; +var dzn; +var Jge; +var Gge; +var KC; +var Ex; +var hzn; +var fzn; +var gzn; +var pzn; +var G8t; +var K8t; +var mzn; +var bzn; +var vzn; +var mQi; +var yzn; +var wzn; +var Czn; +var OT; +var a4; +var Zee; +var Szn; +var xzn; +var bQi; +var vQi; +var Y8t; +var yQi; +var X8t; +var Q8t; +var Z8t; +var e3t; +var t3t; +var eat; +var Dj; +var Kge; +var kzn; +var Yge; +var Ezn; +var tat; +var Izn; +var Tj; +var Dzn; +var Tzn; +var Pzn; +var l4; +var Xge; +var wQi; +var CQi; +var SQi; +var Pj = ue({ + "out-build/vs/platform/theme/common/colors/editorColors.js"() { + "use strict"; + + X(); + Zo(); + Hv(); + T9(); + Yot(); + wo = he("editor.background", { + light: "#ffffff", + dark: "#1E1E1E", + hcDark: ut.black, + hcLight: ut.white + }, f(2185, null)); + wm = he("editor.foreground", { + light: "#333333", + dark: "#BBBBBB", + hcDark: ut.white, + hcLight: Nr + }, f(2186, null)); + Gjn = he("editorStickyScroll.background", wo, f(2187, null)); + Kjn = he("editorStickyScrollHover.background", { + dark: "#2A2D2E", + light: "#F0F0F0", + hcDark: null, + hcLight: ut.fromHex("#0F4A85").transparent(0.1) + }, f(2188, null)); + Yjn = he("editorStickyScroll.border", { + dark: null, + light: null, + hcDark: cn, + hcLight: cn + }, f(2189, null)); + Xjn = he("editorStickyScroll.shadow", xj, f(2190, null)); + $w = he("editorWidget.background", { + dark: "#252526", + light: "#F3F3F3", + hcDark: "#0C141F", + hcLight: ut.white + }, f(2191, null)); + r4 = he("editorWidget.foreground", Nr, f(2192, null)); + Ij = he("editorWidget.border", { + dark: "#454545", + light: "#C8C8C8", + hcDark: cn, + hcLight: cn + }, f(2193, null)); + Qjn = he("editorWidget.resizeBorder", null, f(2194, null)); + Zjn = he("editorError.background", null, f(2195, null), true); + DI = he("editorError.foreground", { + dark: "#F14C4C", + light: "#E51400", + hcDark: "#F48771", + hcLight: "#B5200D" + }, f(2196, null)); + eQi = he("editorError.border", { + dark: null, + light: null, + hcDark: ut.fromHex("#E47777").transparent(0.8), + hcLight: "#B5200D" + }, f(2197, null)); + tQi = he("editorWarning.background", null, f(2198, null), true); + GC = he("editorWarning.foreground", { + dark: "#CCA700", + light: "#BF8803", + hcDark: "#FFD370", + hcLight: "#895503" + }, f(2199, null)); + Xee = he("editorWarning.border", { + dark: null, + light: null, + hcDark: ut.fromHex("#FFCC00").transparent(0.8), + hcLight: ut.fromHex("#FFCC00").transparent(0.8) + }, f(2200, null)); + ezn = he("editorInfo.background", null, f(2201, null), true); + Fw = he("editorInfo.foreground", { + dark: "#3794FF", + light: "#1a85ff", + hcDark: "#3794FF", + hcLight: "#1a85ff" + }, f(2202, null)); + Qee = he("editorInfo.border", { + dark: null, + light: null, + hcDark: ut.fromHex("#3794FF").transparent(0.8), + hcLight: "#292929" + }, f(2203, null)); + iQi = he("editorHint.foreground", { + dark: ut.fromHex("#eeeeee").transparent(0.7), + light: "#6c6c6c", + hcDark: null, + hcLight: null + }, f(2204, null)); + tzn = he("editorHint.border", { + dark: null, + light: null, + hcDark: ut.fromHex("#eeeeee").transparent(0.8), + hcLight: "#292929" + }, f(2205, null)); + sQi = he("editorLink.activeForeground", { + dark: "#4E94CE", + light: ut.blue, + hcDark: ut.cyan, + hcLight: "#292929" + }, f(2206, null)); + FT = he("editor.selectionBackground", { + light: "#ADD6FF", + dark: "#264F78", + hcDark: "#f3f518", + hcLight: "#0F4A85" + }, f(2207, null)); + nQi = he("editor.selectionForeground", { + light: null, + dark: null, + hcDark: "#000000", + hcLight: ut.white + }, f(2208, null)); + rQi = he("editor.inactiveSelectionBackground", { + light: Bs(FT, 0.5), + dark: Bs(FT, 0.5), + hcDark: Bs(FT, 0.7), + hcLight: Bs(FT, 0.5) + }, f(2209, null), true); + z8t = he("editor.selectionHighlightBackground", { + light: VXi(FT, wo, 0.3, 0.6), + dark: VXi(FT, wo, 0.3, 0.6), + hcDark: null, + hcLight: null + }, f(2210, null), true); + izn = he("editor.selectionHighlightBorder", { + light: null, + dark: null, + hcDark: Oc, + hcLight: Oc + }, f(2211, null)); + szn = he("editor.compositionBorder", { + light: "#000000", + dark: "#ffffff", + hcLight: "#000000", + hcDark: "#ffffff" + }, f(2212, null)); + zge = he("editor.findMatchBackground", { + light: "#A8AC94", + dark: "#515C6A", + hcDark: null, + hcLight: null + }, f(2213, null)); + oQi = he("editor.findMatchForeground", null, f(2214, null)); + TI = he("editor.findMatchHighlightBackground", { + light: "#EA5C0055", + dark: "#EA5C0055", + hcDark: null, + hcLight: null + }, f(2215, null), true); + aQi = he("editor.findMatchHighlightForeground", null, f(2216, null), true); + lQi = he("editor.findRangeHighlightBackground", { + dark: "#3a3d4166", + light: "#b4b4b44d", + hcDark: null, + hcLight: null + }, f(2217, null), true); + nzn = he("editor.findMatchBorder", { + light: null, + dark: null, + hcDark: Oc, + hcLight: Oc + }, f(2218, null)); + o4 = he("editor.findMatchHighlightBorder", { + light: null, + dark: null, + hcDark: Oc, + hcLight: Oc + }, f(2219, null)); + cQi = he("editor.findRangeHighlightBorder", { + dark: null, + light: null, + hcDark: Bs(Oc, 0.4), + hcLight: Bs(Oc, 0.4) + }, f(2220, null), true); + J8t = he("editor.hoverHighlightBackground", { + light: "#ADD6FF26", + dark: "#264f7840", + hcDark: "#ADD6FF26", + hcLight: null + }, f(2221, null), true); + P9 = he("editorHoverWidget.background", $w, f(2222, null)); + uQi = he("editorHoverWidget.foreground", r4, f(2223, null)); + Xot = he("editorHoverWidget.border", Ij, f(2224, null)); + rzn = he("editorHoverWidget.statusBarBackground", { + dark: $T(P9, 0.2), + light: Qk(P9, 0.05), + hcDark: $w, + hcLight: $w + }, f(2225, null)); + Qot = he("editorInlayHint.foreground", { + dark: "#969696", + light: "#969696", + hcDark: ut.white, + hcLight: ut.black + }, f(2226, null)); + Zot = he("editorInlayHint.background", { + dark: Bs(kx, 0.1), + light: Bs(kx, 0.1), + hcDark: Bs(ut.white, 0.1), + hcLight: Bs(kx, 0.1) + }, f(2227, null)); + dQi = he("editorInlayHint.typeForeground", Qot, f(2228, null)); + hQi = he("editorInlayHint.typeBackground", Zot, f(2229, null)); + fQi = he("editorInlayHint.parameterForeground", Qot, f(2230, null)); + gQi = he("editorInlayHint.parameterBackground", Zot, f(2231, null)); + pQi = he("editorLightBulb.foreground", { + dark: "#FFCC00", + light: "#DDB100", + hcDark: "#FFCC00", + hcLight: "#007ACC" + }, f(2232, null)); + ozn = he("editorLightBulbAutoFix.foreground", { + dark: "#75BEFF", + light: "#007ACC", + hcDark: "#75BEFF", + hcLight: "#007ACC" + }, f(2233, null)); + azn = he("editorLightBulbAi.foreground", pQi, f(2234, null)); + lzn = he("editor.snippetTabstopHighlightBackground", { + dark: new ut(new Ti(124, 124, 124, 0.3)), + light: new ut(new Ti(10, 50, 100, 0.2)), + hcDark: new ut(new Ti(124, 124, 124, 0.3)), + hcLight: new ut(new Ti(10, 50, 100, 0.2)) + }, f(2235, null)); + czn = he("editor.snippetTabstopHighlightBorder", null, f(2236, null)); + uzn = he("editor.snippetFinalTabstopHighlightBackground", null, f(2237, null)); + dzn = he("editor.snippetFinalTabstopHighlightBorder", { + dark: "#525252", + light: new ut(new Ti(10, 50, 100, 0.5)), + hcDark: "#525252", + hcLight: "#292929" + }, f(2238, null)); + Jge = new ut(new Ti(155, 185, 85, 0.2)); + Gge = new ut(new Ti(255, 0, 0, 0.2)); + KC = he("diffEditor.insertedTextBackground", { + dark: "#9ccc2c33", + light: "#9ccc2c40", + hcDark: null, + hcLight: null + }, f(2239, null), true); + Ex = he("diffEditor.removedTextBackground", { + dark: "#ff000033", + light: "#ff000033", + hcDark: null, + hcLight: null + }, f(2240, null), true); + hzn = he("diffEditor.insertedLineBackground", { + dark: Jge, + light: Jge, + hcDark: null, + hcLight: null + }, f(2241, null), true); + fzn = he("diffEditor.removedLineBackground", { + dark: Gge, + light: Gge, + hcDark: null, + hcLight: null + }, f(2242, null), true); + gzn = he("diffEditorGutter.insertedLineBackground", null, f(2243, null)); + pzn = he("diffEditorGutter.removedLineBackground", null, f(2244, null)); + G8t = he("diffEditorOverview.insertedForeground", null, f(2245, null)); + K8t = he("diffEditorOverview.removedForeground", null, f(2246, null)); + mzn = he("diffEditor.insertedTextBorder", { + dark: null, + light: null, + hcDark: "#33ff2eff", + hcLight: "#374E06" + }, f(2247, null)); + bzn = he("diffEditor.removedTextBorder", { + dark: null, + light: null, + hcDark: "#FF008F", + hcLight: "#AD0707" + }, f(2248, null)); + vzn = he("diffEditor.border", { + dark: null, + light: null, + hcDark: cn, + hcLight: cn + }, f(2249, null)); + mQi = he("diffEditor.diagonalFill", { + dark: "#cccccc33", + light: "#22222233", + hcDark: null, + hcLight: null + }, f(2250, null)); + yzn = he("diffEditor.unchangedRegionBackground", "sideBar.background", f(2251, null)); + wzn = he("diffEditor.unchangedRegionForeground", "foreground", f(2252, null)); + Czn = he("diffEditor.unchangedCodeBackground", { + dark: "#74747429", + light: "#b8b8b829", + hcDark: null, + hcLight: null + }, f(2253, null)); + OT = he("widget.shadow", { + dark: Bs(ut.black, 0.36), + light: Bs(ut.black, 0.16), + hcDark: null, + hcLight: null + }, f(2254, null)); + a4 = he("widget.border", { + dark: null, + light: null, + hcDark: cn, + hcLight: cn + }, f(2255, null)); + Zee = he("toolbar.hoverBackground", { + dark: "#5a5d5e50", + light: "#b8b8b850", + hcDark: null, + hcLight: null + }, f(2256, null)); + Szn = he("toolbar.hoverOutline", { + dark: null, + light: null, + hcDark: Oc, + hcLight: Oc + }, f(2257, null)); + xzn = he("toolbar.activeBackground", { + dark: $T(Zee, 0.1), + light: Qk(Zee, 0.1), + hcDark: null, + hcLight: null + }, f(2258, null)); + bQi = he("breadcrumb.foreground", Bs(Nr, 0.8), f(2259, null)); + vQi = he("breadcrumb.background", wo, f(2260, null)); + Y8t = he("breadcrumb.focusForeground", { + light: Qk(Nr, 0.2), + dark: $T(Nr, 0.1), + hcDark: $T(Nr, 0.1), + hcLight: $T(Nr, 0.1) + }, f(2261, null)); + yQi = he("breadcrumb.activeSelectionForeground", { + light: Qk(Nr, 0.2), + dark: $T(Nr, 0.1), + hcDark: $T(Nr, 0.1), + hcLight: $T(Nr, 0.1) + }, f(2262, null)); + X8t = he("breadcrumbPicker.background", $w, f(2263, null)); + Q8t = 0.5; + Z8t = ut.fromHex("#40C8AE").transparent(Q8t); + e3t = ut.fromHex("#40A6FF").transparent(Q8t); + t3t = ut.fromHex("#606060").transparent(0.4); + eat = 0.4; + Dj = 1; + Kge = he("merge.currentHeaderBackground", { + dark: Z8t, + light: Z8t, + hcDark: null, + hcLight: null + }, f(2264, null), true); + kzn = he("merge.currentContentBackground", Bs(Kge, eat), f(2265, null), true); + Yge = he("merge.incomingHeaderBackground", { + dark: e3t, + light: e3t, + hcDark: null, + hcLight: null + }, f(2266, null), true); + Ezn = he("merge.incomingContentBackground", Bs(Yge, eat), f(2267, null), true); + tat = he("merge.commonHeaderBackground", { + dark: t3t, + light: t3t, + hcDark: null, + hcLight: null + }, f(2268, null), true); + Izn = he("merge.commonContentBackground", Bs(tat, eat), f(2269, null), true); + Tj = he("merge.border", { + dark: null, + light: null, + hcDark: "#C3DF6F", + hcLight: "#007ACC" + }, f(2270, null)); + Dzn = he("editorOverviewRuler.currentContentForeground", { + dark: Bs(Kge, Dj), + light: Bs(Kge, Dj), + hcDark: Tj, + hcLight: Tj + }, f(2271, null)); + Tzn = he("editorOverviewRuler.incomingContentForeground", { + dark: Bs(Yge, Dj), + light: Bs(Yge, Dj), + hcDark: Tj, + hcLight: Tj + }, f(2272, null)); + Pzn = he("editorOverviewRuler.commonContentForeground", { + dark: Bs(tat, Dj), + light: Bs(tat, Dj), + hcDark: Tj, + hcLight: Tj + }, f(2273, null)); + l4 = he("editorOverviewRuler.findMatchForeground", { + dark: "#d186167e", + light: "#d186167e", + hcDark: "#AB5A00", + hcLight: "#AB5A00" + }, f(2274, null), true); + Xge = he("editorOverviewRuler.selectionHighlightForeground", "#A0A0A0CC", f(2275, null), true); + wQi = he("problemsErrorIcon.foreground", DI, f(2276, null)); + CQi = he("problemsWarningIcon.foreground", GC, f(2277, null)); + SQi = he("problemsInfoIcon.foreground", Fw, f(2278, null)); + } +}); +var ete; +var Qge; +var i3t; +var xQi; +var kQi; +var EQi; +var IQi; +var DQi; +var Lzn; +var Rzn; +var Nzn; +var TQi = ue({ + "out-build/vs/platform/theme/common/colors/minimapColors.js"() { + "use strict"; + + X(); + Zo(); + Hv(); + Pj(); + Yot(); + ete = he("minimap.findMatchHighlight", { + light: "#d18616", + dark: "#d18616", + hcDark: "#AB5A00", + hcLight: "#0F4A85" + }, f(2367, null), true); + Qge = he("minimap.selectionOccurrenceHighlight", { + light: "#c9c9c9", + dark: "#676767", + hcDark: "#ffffff", + hcLight: "#0F4A85" + }, f(2368, null), true); + i3t = he("minimap.selectionHighlight", { + light: "#ADD6FF", + dark: "#264F78", + hcDark: "#ffffff", + hcLight: "#0F4A85" + }, f(2369, null), true); + xQi = he("minimap.infoHighlight", { + dark: Fw, + light: Fw, + hcDark: Qee, + hcLight: Qee + }, f(2370, null)); + kQi = he("minimap.warningHighlight", { + dark: GC, + light: GC, + hcDark: Xee, + hcLight: Xee + }, f(2371, null)); + EQi = he("minimap.errorHighlight", { + dark: new ut(new Ti(255, 18, 18, 0.7)), + light: new ut(new Ti(255, 18, 18, 0.7)), + hcDark: new ut(new Ti(255, 50, 50, 1)), + hcLight: "#B5200D" + }, f(2372, null)); + IQi = he("minimap.background", null, f(2373, null)); + DQi = he("minimap.foregroundOpacity", ut.fromHex("#000f"), f(2374, null)); + Lzn = he("minimapSlider.background", Bs(Yee, 0.5), f(2375, null)); + Rzn = he("minimapSlider.hoverBackground", Bs(kj, 0.5), f(2376, null)); + Nzn = he("minimapSlider.activeBackground", Bs(Ej, 0.5), f(2377, null)); + } +}); +var Mzn; +var Azn; +var tte; +var PQi; +var LQi; +var $zn; +var oF; +var RQi; +var Fzn = ue({ + "out-build/vs/platform/theme/common/colors/chartsColors.js"() { + "use strict"; + + X(); + Hv(); + T9(); + Pj(); + TQi(); + Mzn = he("charts.foreground", Nr, f(2177, null)); + Azn = he("charts.lines", Bs(Nr, 0.5), f(2178, null)); + tte = he("charts.red", DI, f(2179, null)); + PQi = he("charts.blue", Fw, f(2180, null)); + LQi = he("charts.yellow", GC, f(2181, null)); + $zn = he("charts.orange", ete, f(2182, null)); + oF = he("charts.green", { + dark: "#89D185", + light: "#388A34", + hcDark: "#89D185", + hcLight: "#374e06" + }, f(2183, null)); + RQi = he("charts.purple", { + dark: "#B180D7", + light: "#652D90", + hcDark: "#B180D7", + hcLight: "#652D90" + }, f(2184, null)); + } +}); +var _T; +var c4; +var jL; +var L9; +var NQi; +var R9; +var Lj; +var iat; +var MQi; +var AQi; +var $Qi; +var FQi; +var OQi; +var _Qi; +var sat; +var nat; +var rat; +var Rj; +var BQi; +var Zge; +var N9; +var zL; +var oat; +var PI; +var M9; +var UQi; +var s3t; +var ite; +var n3t; +var ste; +var WQi; +var VQi; +var HQi; +var qQi; +var jQi; +var zQi; +var r3t; +var Ozn; +var o3t; +var a3t; +var _zn; +var JQi; +var GQi; +var KQi; +var YQi; +var XQi = ue({ + "out-build/vs/platform/theme/common/colors/inputColors.js"() { + "use strict"; + + X(); + Zo(); + Hv(); + T9(); + Pj(); + _T = he("input.background", { + dark: "#3C3C3C", + light: ut.white, + hcDark: ut.black, + hcLight: ut.white + }, f(2279, null)); + c4 = he("input.foreground", Nr, f(2280, null)); + jL = he("input.border", { + dark: null, + light: null, + hcDark: cn, + hcLight: cn + }, f(2281, null)); + L9 = he("inputOption.activeBorder", { + dark: "#007ACC", + light: "#007ACC", + hcDark: cn, + hcLight: cn + }, f(2282, null)); + NQi = he("inputOption.hoverBackground", { + dark: "#5a5d5e80", + light: "#b8b8b850", + hcDark: null, + hcLight: null + }, f(2283, null)); + R9 = he("inputOption.activeBackground", { + dark: Bs(bp, 0.4), + light: Bs(bp, 0.2), + hcDark: ut.transparent, + hcLight: ut.transparent + }, f(2284, null)); + Lj = he("inputOption.activeForeground", { + dark: ut.white, + light: ut.black, + hcDark: Nr, + hcLight: Nr + }, f(2285, null)); + iat = he("input.placeholderForeground", { + light: Bs(Nr, 0.5), + dark: Bs(Nr, 0.5), + hcDark: Bs(Nr, 0.7), + hcLight: Bs(Nr, 0.7) + }, f(2286, null)); + MQi = he("inputValidation.infoBackground", { + dark: "#063B49", + light: "#D6ECF2", + hcDark: ut.black, + hcLight: ut.white + }, f(2287, null)); + AQi = he("inputValidation.infoForeground", { + dark: null, + light: null, + hcDark: null, + hcLight: Nr + }, f(2288, null)); + $Qi = he("inputValidation.infoBorder", { + dark: "#007acc", + light: "#007acc", + hcDark: cn, + hcLight: cn + }, f(2289, null)); + FQi = he("inputValidation.warningBackground", { + dark: "#352A05", + light: "#F6F5D2", + hcDark: ut.black, + hcLight: ut.white + }, f(2290, null)); + OQi = he("inputValidation.warningForeground", { + dark: null, + light: null, + hcDark: null, + hcLight: Nr + }, f(2291, null)); + _Qi = he("inputValidation.warningBorder", { + dark: "#B89500", + light: "#B89500", + hcDark: cn, + hcLight: cn + }, f(2292, null)); + sat = he("inputValidation.errorBackground", { + dark: "#5A1D1D", + light: "#F2DEDE", + hcDark: ut.black, + hcLight: ut.white + }, f(2293, null)); + nat = he("inputValidation.errorForeground", { + dark: null, + light: null, + hcDark: null, + hcLight: Nr + }, f(2294, null)); + rat = he("inputValidation.errorBorder", { + dark: "#BE1100", + light: "#BE1100", + hcDark: cn, + hcLight: cn + }, f(2295, null)); + Rj = he("dropdown.background", { + dark: "#3C3C3C", + light: ut.white, + hcDark: ut.black, + hcLight: ut.white + }, f(2296, null)); + BQi = he("dropdown.listBackground", { + dark: null, + light: null, + hcDark: ut.black, + hcLight: ut.white + }, f(2297, null)); + Zge = he("dropdown.foreground", { + dark: "#F0F0F0", + light: Nr, + hcDark: ut.white, + hcLight: Nr + }, f(2298, null)); + N9 = he("dropdown.border", { + dark: Rj, + light: "#CECECE", + hcDark: cn, + hcLight: cn + }, f(2299, null)); + zL = he("button.foreground", ut.white, f(2300, null)); + oat = he("button.separator", Bs(zL, 0.4), f(2301, null)); + PI = he("button.background", { + dark: "#0E639C", + light: "#007ACC", + hcDark: null, + hcLight: "#0F4A85" + }, f(2302, null)); + M9 = he("button.hoverBackground", { + dark: $T(PI, 0.2), + light: Qk(PI, 0.2), + hcDark: PI, + hcLight: PI + }, f(2303, null)); + UQi = he("button.border", cn, f(2304, null)); + s3t = he("button.secondaryForeground", { + dark: ut.white, + light: ut.white, + hcDark: ut.white, + hcLight: Nr + }, f(2305, null)); + ite = he("button.secondaryBackground", { + dark: "#3A3D41", + light: "#5F6A79", + hcDark: null, + hcLight: ut.white + }, f(2306, null)); + n3t = he("button.secondaryHoverBackground", { + dark: $T(ite, 0.2), + light: Qk(ite, 0.2), + hcDark: null, + hcLight: null + }, f(2307, null)); + ste = he("radio.activeForeground", Lj, f(2308, null)); + WQi = he("radio.activeBackground", R9, f(2309, null)); + VQi = he("radio.activeBorder", L9, f(2310, null)); + HQi = he("radio.inactiveForeground", null, f(2311, null)); + qQi = he("radio.inactiveBackground", null, f(2312, null)); + jQi = he("radio.inactiveBorder", { + light: Bs(ste, 0.2), + dark: Bs(ste, 0.2), + hcDark: Bs(ste, 0.4), + hcLight: Bs(ste, 0.2) + }, f(2313, null)); + zQi = he("radio.inactiveHoverBackground", NQi, f(2314, null)); + r3t = he("checkbox.background", Rj, f(2315, null)); + Ozn = he("checkbox.selectBackground", $w, f(2316, null)); + o3t = he("checkbox.foreground", Zge, f(2317, null)); + a3t = he("checkbox.border", N9, f(2318, null)); + _zn = he("checkbox.selectBorder", Kee, f(2319, null)); + JQi = he("keybindingLabel.background", { + dark: new ut(new Ti(128, 128, 128, 0.17)), + light: new ut(new Ti(221, 221, 221, 0.4)), + hcDark: ut.transparent, + hcLight: ut.transparent + }, f(2320, null)); + GQi = he("keybindingLabel.foreground", { + dark: ut.fromHex("#CCCCCC"), + light: ut.fromHex("#555555"), + hcDark: ut.white, + hcLight: Nr + }, f(2321, null)); + KQi = he("keybindingLabel.border", { + dark: new ut(new Ti(51, 51, 51, 0.6)), + light: new ut(new Ti(204, 204, 204, 0.4)), + hcDark: new ut(new Ti(111, 195, 223)), + hcLight: cn + }, f(2322, null)); + YQi = he("keybindingLabel.bottomBorder", { + dark: new ut(new Ti(68, 68, 68, 0.6)), + light: new ut(new Ti(187, 187, 187, 0.4)), + hcDark: new ut(new Ti(111, 195, 223)), + hcLight: Nr + }, f(2323, null)); + } +}); +var nte; +var epe; +var tpe; +var QQi; +var a1; +var CM; +var l3t; +var Ix; +var c3t; +var ZQi; +var u3t; +var eZi; +var u4; +var ipe; +var d3t; +var tZi; +var Nj; +var iZi; +var sZi; +var d4; +var spe; +var nZi; +var rZi; +var oZi; +var aZi; +var lZi; +var cZi; +var h3t; +var npe; +var uZi; +var dZi; +var aat; +var Bzn; +var Uzn; +var Wzn; +var Vzn; +var f3t = ue({ + "out-build/vs/platform/theme/common/colors/listColors.js"() { + "use strict"; + + X(); + Zo(); + Hv(); + T9(); + Pj(); + nte = he("list.focusBackground", null, f(2324, null)); + epe = he("list.focusForeground", null, f(2325, null)); + tpe = he("list.focusOutline", { + dark: bp, + light: bp, + hcDark: Oc, + hcLight: Oc + }, f(2326, null)); + QQi = he("list.focusAndSelectionOutline", null, f(2327, null)); + a1 = he("list.activeSelectionBackground", { + dark: "#04395E", + light: "#0060C0", + hcDark: null, + hcLight: ut.fromHex("#0F4A85").transparent(0.1) + }, f(2328, null)); + CM = he("list.activeSelectionForeground", { + dark: ut.white, + light: ut.white, + hcDark: null, + hcLight: null + }, f(2329, null)); + l3t = he("list.activeSelectionIconForeground", null, f(2330, null)); + Ix = he("list.inactiveSelectionBackground", { + dark: "#37373D", + light: "#E4E6F1", + hcDark: null, + hcLight: ut.fromHex("#0F4A85").transparent(0.1) + }, f(2331, null)); + c3t = he("list.inactiveSelectionForeground", null, f(2332, null)); + ZQi = he("list.inactiveSelectionIconForeground", null, f(2333, null)); + u3t = he("list.inactiveFocusBackground", null, f(2334, null)); + eZi = he("list.inactiveFocusOutline", null, f(2335, null)); + u4 = he("list.hoverBackground", { + dark: "#2A2D2E", + light: "#F0F0F0", + hcDark: ut.white.transparent(0.1), + hcLight: ut.fromHex("#0F4A85").transparent(0.1) + }, f(2336, null)); + ipe = he("list.hoverForeground", null, f(2337, null)); + d3t = he("list.dropBackground", { + dark: "#062F4A", + light: "#D6EBFF", + hcDark: null, + hcLight: null + }, f(2338, null)); + tZi = he("list.dropBetweenBackground", { + dark: Kee, + light: Kee, + hcDark: null, + hcLight: null + }, f(2339, null)); + Nj = he("list.highlightForeground", { + dark: "#2AAAFF", + light: "#0066BF", + hcDark: bp, + hcLight: bp + }, f(2340, null)); + iZi = he("list.focusHighlightForeground", { + dark: Nj, + light: Hge(a1, Nj, "#BBE7FF"), + hcDark: Nj, + hcLight: Nj + }, f(2341, null)); + sZi = he("list.invalidItemForeground", { + dark: "#B89500", + light: "#B89500", + hcDark: "#B89500", + hcLight: "#B5200D" + }, f(2342, null)); + d4 = he("list.errorForeground", { + dark: "#F88070", + light: "#B01011", + hcDark: null, + hcLight: null + }, f(2343, null)); + spe = he("list.warningForeground", { + dark: "#CCA700", + light: "#855F00", + hcDark: null, + hcLight: null + }, f(2344, null)); + nZi = he("listFilterWidget.background", { + light: Qk($w, 0), + dark: $T($w, 0), + hcDark: $w, + hcLight: $w + }, f(2345, null)); + rZi = he("listFilterWidget.outline", { + dark: ut.transparent, + light: ut.transparent, + hcDark: "#f38518", + hcLight: "#007ACC" + }, f(2346, null)); + oZi = he("listFilterWidget.noMatchesOutline", { + dark: "#BE1100", + light: "#BE1100", + hcDark: cn, + hcLight: cn + }, f(2347, null)); + aZi = he("listFilterWidget.shadow", OT, f(2348, null)); + lZi = he("list.filterMatchBackground", { + dark: TI, + light: TI, + hcDark: null, + hcLight: null + }, f(2349, null)); + cZi = he("list.filterMatchBorder", { + dark: o4, + light: o4, + hcDark: cn, + hcLight: Oc + }, f(2350, null)); + h3t = he("list.deemphasizedForeground", { + dark: "#8C8C8C", + light: "#8E8E90", + hcDark: "#A7A8A9", + hcLight: "#666666" + }, f(2351, null)); + npe = he("tree.indentGuidesStroke", { + dark: "#585858", + light: "#a9a9a9", + hcDark: "#a9a9a9", + hcLight: "#a5a5a5" + }, f(2352, null)); + uZi = he("tree.inactiveIndentGuidesStroke", Bs(npe, 0.4), f(2353, null)); + dZi = he("tree.tableColumnsBorder", { + dark: "#CCCCCC20", + light: "#61616120", + hcDark: null, + hcLight: null + }, f(2354, null)); + aat = he("tree.tableOddRowsBackground", { + dark: Bs(Nr, 0.04), + light: Bs(Nr, 0.04), + hcDark: null, + hcLight: null + }, f(2355, null)); + Bzn = he("editorActionList.background", $w, f(2356, null)); + Uzn = he("editorActionList.foreground", r4, f(2357, null)); + Wzn = he("editorActionList.focusForeground", CM, f(2358, null)); + Vzn = he("editorActionList.focusBackground", a1, f(2359, null)); + } +}); +var hZi; +var fZi; +var gZi; +var pZi; +var mZi; +var bZi; +var vZi; +var Hzn = ue({ + "out-build/vs/platform/theme/common/colors/menuColors.js"() { + "use strict"; + + X(); + Hv(); + T9(); + XQi(); + f3t(); + hZi = he("menu.border", { + dark: null, + light: null, + hcDark: cn, + hcLight: cn + }, f(2360, null)); + fZi = he("menu.foreground", Zge, f(2361, null)); + gZi = he("menu.background", Rj, f(2362, null)); + pZi = he("menu.selectionForeground", CM, f(2363, null)); + mZi = he("menu.selectionBackground", a1, f(2364, null)); + bZi = he("menu.selectionBorder", { + dark: null, + light: null, + hcDark: Oc, + hcLight: Oc + }, f(2365, null)); + vZi = he("menu.separatorBackground", { + dark: "#606060", + light: "#D4D4D4", + hcDark: cn, + hcLight: cn + }, f(2366, null)); + } +}); +var lat; +var g3t; +var yZi; +var p3t; +var wZi; +var m3t; +var rte; +var cat; +var ote; +var qzn = ue({ + "out-build/vs/platform/theme/common/colors/quickpickColors.js"() { + "use strict"; + + X(); + Zo(); + Hv(); + Pj(); + f3t(); + lat = he("quickInput.background", $w, f(2393, null)); + g3t = he("quickInput.foreground", r4, f(2394, null)); + yZi = he("quickInputTitle.background", { + dark: new ut(new Ti(255, 255, 255, 0.105)), + light: new ut(new Ti(0, 0, 0, 0.06)), + hcDark: "#000000", + hcLight: ut.white + }, f(2395, null)); + p3t = he("pickerGroup.foreground", { + dark: "#3794FF", + light: "#0066BF", + hcDark: ut.white, + hcLight: "#0F4A85" + }, f(2396, null)); + wZi = he("pickerGroup.border", { + dark: "#3F3F46", + light: "#CCCEDB", + hcDark: ut.white, + hcLight: "#0F4A85" + }, f(2397, null)); + m3t = he("quickInput.list.focusBackground", null, "", undefined, f(2398, null)); + rte = he("quickInputList.focusForeground", CM, f(2399, null)); + cat = he("quickInputList.focusIconForeground", l3t, f(2400, null)); + ote = he("quickInputList.focusBackground", { + dark: Vge(m3t, a1), + light: Vge(m3t, a1), + hcDark: null, + hcLight: null + }, f(2401, null)); + } +}); +var jzn; +var zzn; +var Jzn; +var Gzn = ue({ + "out-build/vs/platform/theme/common/colors/searchColors.js"() { + "use strict"; + + X(); + Hv(); + T9(); + Pj(); + jzn = he("search.resultsInfoForeground", { + light: Nr, + dark: Bs(Nr, 0.65), + hcDark: Nr, + hcLight: Nr + }, f(2402, null)); + zzn = he("searchEditor.findMatchBackground", { + light: Bs(TI, 0.66), + dark: Bs(TI, 0.66), + hcDark: TI, + hcLight: TI + }, f(2403, null)); + Jzn = he("searchEditor.findMatchBorder", { + light: Bs(o4, 0.66), + dark: Bs(o4, 0.66), + hcDark: o4, + hcLight: o4 + }, f(2404, null)); + } +}); +var Qs = ue({ + "out-build/vs/platform/theme/common/colorRegistry.js"() { + "use strict"; + + Hv(); + T9(); + Fzn(); + Pj(); + XQi(); + f3t(); + Hzn(); + TQi(); + Yot(); + qzn(); + Gzn(); + } +}); +function b3t(i) { + const e = sd(i); + return new CZi(e.left, e.top, e.width, e.height); +} +function v3t(i, e, t) { + const s = e.width / i.offsetWidth; + const n = e.height / i.offsetHeight; + const r = (t.x - e.x) / s; + const o = (t.y - e.y) / n; + return new SZi(r, o); +} +function Kzn(i) { + return i.replace(/(^[A-Z])/, ([e]) => e.toLowerCase()).replace(/([A-Z])/g, ([e]) => `-${e.toLowerCase()}`); +} +var rpe; +var y3t; +var CZi; +var SZi; +var h4; +var xZi; +var kZi; +var EZi; +var w3t; +var IZi; +var ope = ue({ + "out-build/vs/editor/browser/editorDom.js"() { + "use strict"; + + xe(); + md(); + jee(); + gd(); + nt(); + q(); + Qs(); + rpe = class { + constructor(i, e) { + this.x = i; + this.y = e; + this._pageCoordinatesBrand = undefined; + } + toClientCoordinates(i) { + return new y3t(this.x - i.scrollX, this.y - i.scrollY); + } + }; + y3t = class { + constructor(i, e) { + this.clientX = i; + this.clientY = e; + this._clientCoordinatesBrand = undefined; + } + toPageCoordinates(i) { + return new rpe(this.clientX + i.scrollX, this.clientY + i.scrollY); + } + }; + CZi = class { + constructor(i, e, t, s) { + this.x = i; + this.y = e; + this.width = t; + this.height = s; + this._editorPagePositionBrand = undefined; + } + }; + SZi = class { + constructor(i, e) { + this.x = i; + this.y = e; + this._positionRelativeToEditorBrand = undefined; + } + }; + h4 = class extends Xc { + constructor(i, e, t) { + super(Kt(t), i); + this._editorMouseEventBrand = undefined; + this.isFromPointerCapture = e; + this.pos = new rpe(this.posx, this.posy); + this.editorPos = b3t(t); + this.relativePos = v3t(t, this.editorPos, this.pos); + } + }; + xZi = class { + constructor(i) { + this.a = i; + } + b(i) { + return new h4(i, false, this.a); + } + onContextMenu(i, e) { + return Ce(i, "contextmenu", t => { + e(this.b(t)); + }); + } + onMouseUp(i, e) { + return Ce(i, "mouseup", t => { + e(this.b(t)); + }); + } + onMouseDown(i, e) { + return Ce(i, Oe.MOUSE_DOWN, t => { + e(this.b(t)); + }); + } + onPointerDown(i, e) { + return Ce(i, Oe.POINTER_DOWN, t => { + e(this.b(t), t.pointerId); + }); + } + onMouseLeave(i, e) { + return Ce(i, Oe.MOUSE_LEAVE, t => { + e(this.b(t)); + }); + } + onMouseMove(i, e) { + return Ce(i, "mousemove", t => e(this.b(t))); + } + }; + kZi = class { + constructor(i) { + this.a = i; + } + b(i) { + return new h4(i, false, this.a); + } + onPointerUp(i, e) { + return Ce(i, "pointerup", t => { + e(this.b(t)); + }); + } + onPointerDown(i, e) { + return Ce(i, Oe.POINTER_DOWN, t => { + e(this.b(t), t.pointerId); + }); + } + onPointerLeave(i, e) { + return Ce(i, Oe.POINTER_LEAVE, t => { + e(this.b(t)); + }); + } + onPointerMove(i, e) { + return Ce(i, "pointermove", t => e(this.b(t))); + } + }; + EZi = class extends H { + constructor(i) { + super(); + this.a = i; + this.b = this.D(new Sj()); + this.c = null; + } + startMonitoring(i, e, t, s, n) { + this.c = ko(i.ownerDocument, "keydown", r => { + if (!r.toKeyCodeChord().isModifierKey()) { + this.b.stopMonitoring(true, r.browserEvent); + } + }, true); + this.b.startMonitoring(i, e, t, r => { + s(new h4(r, true, this.a)); + }, r => { + this.c.dispose(); + n(r); + }); + } + stopMonitoring() { + this.b.stopMonitoring(true); + } + }; + w3t = class $Fn { + static { + this.a = 0; + } + constructor(e) { + this.g = e; + this.b = ++$Fn.a; + this.c = 0; + this.d = new Map(); + this.f = new Vn(() => this.j(), 1000); + } + createClassNameRef(e) { + const t = this.h(e); + t.increaseRefCount(); + return { + className: t.className, + dispose: () => { + t.decreaseRefCount(); + this.f.schedule(); + } + }; + } + h(e) { + const t = this.i(e); + let s = this.d.get(t); + if (!s) { + const n = this.c++; + s = new IZi(t, `dyn-rule-${this.b}-${n}`, oge(this.g.getContainerDomNode()) ? this.g.getContainerDomNode() : undefined, e); + this.d.set(t, s); + } + return s; + } + i(e) { + return JSON.stringify(e); + } + j() { + for (const e of this.d.values()) { + if (!e.hasReferences()) { + this.d.delete(e.key); + e.dispose(); + } + } + } + }; + IZi = class { + constructor(i, e, t, s) { + this.key = i; + this.className = e; + this.properties = s; + this.a = 0; + this.c = new Q(); + this.b = pd(t, undefined, this.c); + this.b.textContent = this.d(this.className, this.properties); + } + d(i, e) { + let t = `.${i} {`; + for (const s in e) { + const n = e[s]; + let r; + if (typeof n == "object") { + r = Ui(n.id); + } else { + r = n; + } + const o = Kzn(s); + t += ` + ${o}: ${r};`; + } + t += ` +}`; + return t; + } + dispose() { + this.c.dispose(); + this.b = undefined; + } + increaseRefCount() { + this.a++; + } + decreaseRefCount() { + this.a--; + } + hasReferences() { + return this.a > 0; + } + }; + } +}); +var A9; +var Mj = ue({ + "out-build/vs/editor/common/viewEventHandler.js"() { + "use strict"; + + q(); + A9 = class extends H { + constructor() { + super(); + this.m = true; + } + shouldRender() { + return this.m; + } + forceShouldRender() { + this.m = true; + } + q() { + this.m = true; + } + onDidRender() { + this.m = false; + } + onCompositionStart(i) { + return false; + } + onCompositionEnd(i) { + return false; + } + onConfigurationChanged(i) { + return false; + } + onCursorStateChanged(i) { + return false; + } + onDecorationsChanged(i) { + return false; + } + onFlushed(i) { + return false; + } + onFocusChanged(i) { + return false; + } + onLanguageConfigurationChanged(i) { + return false; + } + onLineMappingChanged(i) { + return false; + } + onLinesChanged(i) { + return false; + } + onLinesDeleted(i) { + return false; + } + onLinesInserted(i) { + return false; + } + onRevealRangeRequest(i) { + return false; + } + onScrollChanged(i) { + return false; + } + onThemeChanged(i) { + return false; + } + onTokensChanged(i) { + return false; + } + onTokensColorsChanged(i) { + return false; + } + onZonesChanged(i) { + return false; + } + handleEvents(i) { + let e = false; + for (let t = 0, s = i.length; t < s; t++) { + const n = i[t]; + switch (n.type) { + case 0: + if (this.onCompositionStart(n)) { + e = true; + } + break; + case 1: + if (this.onCompositionEnd(n)) { + e = true; + } + break; + case 2: + if (this.onConfigurationChanged(n)) { + e = true; + } + break; + case 3: + if (this.onCursorStateChanged(n)) { + e = true; + } + break; + case 4: + if (this.onDecorationsChanged(n)) { + e = true; + } + break; + case 5: + if (this.onFlushed(n)) { + e = true; + } + break; + case 6: + if (this.onFocusChanged(n)) { + e = true; + } + break; + case 7: + if (this.onLanguageConfigurationChanged(n)) { + e = true; + } + break; + case 8: + if (this.onLineMappingChanged(n)) { + e = true; + } + break; + case 9: + if (this.onLinesChanged(n)) { + e = true; + } + break; + case 10: + if (this.onLinesDeleted(n)) { + e = true; + } + break; + case 11: + if (this.onLinesInserted(n)) { + e = true; + } + break; + case 12: + if (this.onRevealRangeRequest(n)) { + e = true; + } + break; + case 13: + if (this.onScrollChanged(n)) { + e = true; + } + break; + case 15: + if (this.onTokensChanged(n)) { + e = true; + } + break; + case 14: + if (this.onThemeChanged(n)) { + e = true; + } + break; + case 16: + if (this.onTokensColorsChanged(n)) { + e = true; + } + break; + case 17: + if (this.onZonesChanged(n)) { + e = true; + } + break; + default: + console.info("View received unknown event: "); + console.info(n); + } + } + if (e) { + this.m = true; + } + } + }; + } +}); +var YC; +var DZi; +var JL; +var Ow = ue({ + "out-build/vs/editor/browser/view/viewPart.js"() { + "use strict"; + + Mj(); + YC = class extends A9 { + constructor(i) { + super(); + this._context = i; + this._context.addEventHandler(this); + } + dispose() { + this._context.removeEventHandler(this); + super.dispose(); + } + }; + (function (i) { + i[i.None = 0] = "None"; + i[i.ContentWidgets = 1] = "ContentWidgets"; + i[i.OverflowingContentWidgets = 2] = "OverflowingContentWidgets"; + i[i.OverflowGuard = 3] = "OverflowGuard"; + i[i.OverlayWidgets = 4] = "OverlayWidgets"; + i[i.OverflowingOverlayWidgets = 5] = "OverflowingOverlayWidgets"; + i[i.ScrollableElement = 6] = "ScrollableElement"; + i[i.TextArea = 7] = "TextArea"; + i[i.ViewLines = 8] = "ViewLines"; + i[i.Minimap = 9] = "Minimap"; + i[i.ViewLinesGpu = 10] = "ViewLinesGpu"; + })(DZi ||= {}); + JL = class { + static write(i, e) { + i.setAttribute("data-mprt", String(e)); + } + static read(i) { + const e = i.getAttribute("data-mprt"); + if (e === null) { + return 0; + } else { + return parseInt(e, 10); + } + } + static collect(i, e) { + const t = []; + let s = 0; + while (i && i !== i.ownerDocument.body && i !== e) { + if (i.nodeType === i.ELEMENT_NODE) { + t[s++] = this.read(i); + } + i = i.parentElement; + } + const n = new Uint8Array(s); + for (let r = 0; r < s; r++) { + n[r] = t[s - r - 1]; + } + return n; + } + }; + } +}); +var TZi; +var PZi; +var C3t; +var uat; +var f4; +var S3t; +var dat; +var ate = ue({ + "out-build/vs/editor/browser/view/renderingContext.js"() { + "use strict"; + + TZi = class { + constructor(i, e) { + this._restrictedRenderingContextBrand = undefined; + this.c = i; + this.viewportData = e; + this.scrollWidth = this.c.getScrollWidth(); + this.scrollHeight = this.c.getScrollHeight(); + this.visibleRange = this.viewportData.visibleRange; + this.bigNumbersDelta = this.viewportData.bigNumbersDelta; + const t = this.c.getCurrentViewport(); + this.scrollTop = t.top; + this.scrollLeft = t.left; + this.viewportWidth = t.width; + this.viewportHeight = t.height; + } + getScrolledTopFromAbsoluteTop(i) { + return i - this.scrollTop; + } + getVerticalOffsetForLineNumber(i, e) { + return this.c.getVerticalOffsetForLineNumber(i, e); + } + getVerticalOffsetAfterLineNumber(i, e) { + return this.c.getVerticalOffsetAfterLineNumber(i, e); + } + getDecorationsInViewport() { + return this.viewportData.getDecorationsInViewport(); + } + }; + PZi = class extends TZi { + constructor(i, e, t, s) { + super(i, e); + this._renderingContextBrand = undefined; + this.d = t; + this.e = s; + } + linesVisibleRangesForRange(i, e) { + const t = this.d.linesVisibleRangesForRange(i, e); + if (!this.e) { + return t ?? null; + } + const s = this.e.linesVisibleRangesForRange(i, e); + if (t) { + if (s) { + return t.concat(s).sort((n, r) => n.lineNumber - r.lineNumber); + } else { + return t; + } + } else { + return s; + } + } + visibleRangeForPosition(i) { + return this.d.visibleRangeForPosition(i) ?? this.e?.visibleRangeForPosition(i) ?? null; + } + }; + C3t = class { + static firstLine(i) { + if (!i) { + return null; + } + let e = null; + for (const t of i) { + if (!e || t.lineNumber < e.lineNumber) { + e = t; + } + } + return e; + } + static lastLine(i) { + if (!i) { + return null; + } + let e = null; + for (const t of i) { + if (!e || t.lineNumber > e.lineNumber) { + e = t; + } + } + return e; + } + constructor(i, e, t, s) { + this.outsideRenderedLine = i; + this.lineNumber = e; + this.ranges = t; + this.continuesOnNextLine = s; + } + }; + uat = class FFn { + static from(e) { + const t = new Array(e.length); + for (let s = 0, n = e.length; s < n; s++) { + const r = e[s]; + t[s] = new FFn(r.left, r.width); + } + return t; + } + constructor(e, t) { + this._horizontalRangeBrand = undefined; + this.left = Math.round(e); + this.width = Math.round(t); + } + toString() { + return `[${this.left},${this.width}]`; + } + }; + f4 = class { + constructor(i, e) { + this._floatHorizontalRangeBrand = undefined; + this.left = i; + this.width = e; + } + toString() { + return `[${this.left},${this.width}]`; + } + static compare(i, e) { + return i.left - e.left; + } + }; + S3t = class { + constructor(i, e) { + this.outsideRenderedLine = i; + this.originalLeft = e; + this.left = Math.round(this.originalLeft); + } + }; + dat = class { + constructor(i, e) { + this.outsideRenderedLine = i; + this.ranges = e; + } + }; + } +}); +var ape; +var Yzn = ue({ + "out-build/vs/editor/browser/viewParts/viewLines/rangeUtil.js"() { + "use strict"; + + ate(); + ape = class { + static b() { + this.a ||= document.createRange(); + return this.a; + } + static c(i, e) { + i.selectNodeContents(e); + } + static d(i, e, t, s, n) { + const r = this.b(); + try { + r.setStart(i, e); + r.setEnd(t, s); + return r.getClientRects(); + } catch { + return null; + } finally { + this.c(r, n); + } + } + static f(i) { + if (i.length === 1) { + return i; + } + i.sort(f4.compare); + const e = []; + let t = 0; + let s = i[0]; + for (let n = 1, r = i.length; n < r; n++) { + const o = i[n]; + if (s.left + s.width + 0.9 >= o.left) { + s.width = Math.max(s.width, o.left + o.width - s.left); + } else { + e[t++] = s; + s = o; + } + } + e[t++] = s; + return e; + } + static g(i, e, t) { + if (!i || i.length === 0) { + return null; + } + const s = []; + for (let n = 0, r = i.length; n < r; n++) { + const o = i[n]; + s[n] = new f4(Math.max(0, (o.left - e) / t), o.width / t); + } + return this.f(s); + } + static readHorizontalRanges(i, e, t, s, n, r) { + const a = i.children.length - 1; + if (a < 0) { + return null; + } + e = Math.min(a, Math.max(0, e)); + s = Math.min(a, Math.max(0, s)); + if (e === s && t === n && t === 0 && !i.children[e].firstChild) { + const d = i.children[e].getClientRects(); + r.markDidDomLayout(); + return this.g(d, r.clientRectDeltaLeft, r.clientRectScale); + } + if (e !== s && s > 0 && n === 0) { + s--; + n = 1073741824; + } + let l = i.children[e].firstChild; + let c = i.children[s].firstChild; + if (!l || !c) { + if (!l && t === 0 && e > 0) { + l = i.children[e - 1].firstChild; + t = 1073741824; + } + if (!c && n === 0 && s > 0) { + c = i.children[s - 1].firstChild; + n = 1073741824; + } + } + if (!l || !c) { + return null; + } + t = Math.min(l.textContent.length, Math.max(0, t)); + n = Math.min(c.textContent.length, Math.max(0, n)); + const u = this.d(l, t, c, n, r.endNode); + r.markDidDomLayout(); + return this.g(u, r.clientRectDeltaLeft, r.clientRectScale); + } + }; + } +}); +var eE; +var x3t; +var LZi; +var RZi; +var Aj = ue({ + "out-build/vs/editor/common/viewLayout/lineDecorations.js"() { + "use strict"; + + $i(); + eE = class zPe { + constructor(e, t, s, n) { + this.startColumn = e; + this.endColumn = t; + this.className = s; + this.type = n; + this._lineDecorationBrand = undefined; + } + static c(e, t) { + return e.startColumn === t.startColumn && e.endColumn === t.endColumn && e.className === t.className && e.type === t.type; + } + static equalsArr(e, t) { + const s = e.length; + const n = t.length; + if (s !== n) { + return false; + } + for (let r = 0; r < s; r++) { + if (!zPe.c(e[r], t[r])) { + return false; + } + } + return true; + } + static extractWrapped(e, t, s) { + if (e.length === 0) { + return e; + } + const n = t + 1; + const r = s + 1; + const o = s - t; + const a = []; + let l = 0; + for (const c of e) { + if (!(c.endColumn <= n) && !(c.startColumn >= r)) { + a[l++] = new zPe(Math.max(1, c.startColumn - n + 1), Math.min(o + 1, c.endColumn - n + 1), c.className, c.type); + } + } + return a; + } + static filter(e, t, s, n) { + if (e.length === 0) { + return []; + } + const r = []; + let o = 0; + for (let a = 0, l = e.length; a < l; a++) { + const c = e[a]; + const u = c.range; + if (u.endLineNumber < t || u.startLineNumber > t || u.isEmpty() && (c.type === 0 || c.type === 3)) { + continue; + } + const d = u.startLineNumber === t ? u.startColumn : s; + const h = u.endLineNumber === t ? u.endColumn : n; + r[o++] = new zPe(d, h, c.inlineClassName, c.type); + } + return r; + } + static e(e, t) { + const s = [2, 0, 1, 3]; + return s[e] - s[t]; + } + static compare(e, t) { + if (e.startColumn !== t.startColumn) { + return e.startColumn - t.startColumn; + } + if (e.endColumn !== t.endColumn) { + return e.endColumn - t.endColumn; + } + const s = zPe.e(e.type, t.type); + if (s !== 0) { + return s; + } else if (e.className !== t.className) { + if (e.className < t.className) { + return -1; + } else { + return 1; + } + } else { + return 0; + } + } + }; + x3t = class { + constructor(i, e, t, s) { + this.startOffset = i; + this.endOffset = e; + this.className = t; + this.metadata = s; + } + }; + LZi = class T3i { + constructor() { + this.c = []; + this.e = []; + this.f = []; + this.count = 0; + } + static g(e) { + let t = 0; + for (let s = 0, n = e.length; s < n; s++) { + t |= e[s]; + } + return t; + } + consumeLowerThan(e, t, s) { + while (this.count > 0 && this.c[0] < e) { + let n = 0; + while (n + 1 < this.count && this.c[n] === this.c[n + 1]) { + n++; + } + s.push(new x3t(t, this.c[n], this.e.join(" "), T3i.g(this.f))); + t = this.c[n] + 1; + this.c.splice(0, n + 1); + this.e.splice(0, n + 1); + this.f.splice(0, n + 1); + this.count -= n + 1; + } + if (this.count > 0 && t < e) { + s.push(new x3t(t, e - 1, this.e.join(" "), T3i.g(this.f))); + t = e; + } + return t; + } + insert(e, t, s) { + if (this.count === 0 || this.c[this.count - 1] <= e) { + this.c.push(e); + this.e.push(t); + this.f.push(s); + } else { + for (let n = 0; n < this.count; n++) { + if (this.c[n] >= e) { + this.c.splice(n, 0, e); + this.e.splice(n, 0, t); + this.f.splice(n, 0, s); + break; + } + } + } + this.count++; + } + }; + RZi = class { + static normalize(i, e) { + if (e.length === 0) { + return []; + } + const t = []; + const s = new LZi(); + let n = 0; + for (let r = 0, o = e.length; r < o; r++) { + const a = e[r]; + let l = a.startColumn; + let c = a.endColumn; + const u = a.className; + const d = a.type === 1 ? 2 : a.type === 2 ? 4 : 0; + if (l > 1) { + const p = i.charCodeAt(l - 2); + if (jb(p)) { + l--; + } + } + if (c > 1) { + const p = i.charCodeAt(c - 2); + if (jb(p)) { + c--; + } + } + const h = l - 1; + const g = c - 2; + n = s.consumeLowerThan(h, n, t); + if (s.count === 0) { + n = h; + } + s.insert(g, u, d); + } + s.consumeLowerThan(1073741824, n, t); + return t; + } + }; + } +}); +var NZi; +var Yb; +var Xzn = ue({ + "out-build/vs/editor/common/viewLayout/linePart.js"() { + "use strict"; + + (function (i) { + i[i.IS_WHITESPACE = 1] = "IS_WHITESPACE"; + i[i.PSEUDO_BEFORE = 2] = "PSEUDO_BEFORE"; + i[i.PSEUDO_AFTER = 4] = "PSEUDO_AFTER"; + i[i.IS_WHITESPACE_MASK = 1] = "IS_WHITESPACE_MASK"; + i[i.PSEUDO_BEFORE_MASK = 2] = "PSEUDO_BEFORE_MASK"; + i[i.PSEUDO_AFTER_MASK = 4] = "PSEUDO_AFTER_MASK"; + })(NZi ||= {}); + Yb = class { + constructor(i, e, t, s) { + this.endIndex = i; + this.type = e; + this.metadata = t; + this.containsRTL = s; + this._linePartBrand = undefined; + } + isWhitespace() { + return !!(this.metadata & 1); + } + isPseudoAfter() { + return !!(this.metadata & 4); + } + }; + } +}); +function $j(i, e) { + if (i.lineContent.length === 0) { + if (i.lineDecorations.length > 0) { + e.appendString(""); + let t = 0; + let s = 0; + let n = 0; + for (const o of i.lineDecorations) { + if (o.type === 1 || o.type === 2) { + e.appendString(""); + if (o.type === 1) { + n |= 1; + t++; + } + if (o.type === 2) { + n |= 2; + s++; + } + } + } + e.appendString(""); + const r = new hat(1, t + s); + r.setColumnInfo(1, t, 0, 0); + return new fat(r, false, n); + } + e.appendString(""); + return new fat(new hat(0, 0), false, 0); + } + return rJn(Zzn(i), e); +} +function Qzn(i) { + const e = new UL(10000); + const t = $j(i, e); + return new OZi(t.characterMapping, e.build(), t.containsRTL, t.containsForeignElements); +} +function Zzn(i) { + const e = i.lineContent; + let t; + let s; + let n; + if (i.stopRenderingLineAfter !== -1 && i.stopRenderingLineAfter < e.length) { + t = true; + s = e.length - i.stopRenderingLineAfter; + n = i.stopRenderingLineAfter; + } else { + t = false; + s = 0; + n = e.length; + } + let r = eJn(e, i.containsRTL, i.lineTokens, i.fauxIndentLength, n); + if (i.renderControlCharacters && !i.isBasicASCII) { + r = iJn(e, r); + } + if (i.renderWhitespace === 4 || i.renderWhitespace === 1 || i.renderWhitespace === 2 && i.selectionsOnLine || i.renderWhitespace === 3 && !i.continuesWithWrappedLine) { + r = sJn(i, e, n, r); + } + let o = 0; + if (i.lineDecorations.length > 0) { + for (let a = 0, l = i.lineDecorations.length; a < l; a++) { + const c = i.lineDecorations[a]; + if (c.type === 3 || c.type === 1) { + o |= 1; + } else if (c.type === 2) { + o |= 2; + } + } + r = nJn(e, n, r, i.lineDecorations); + } + if (!i.containsRTL) { + r = tJn(e, r, !i.isBasicASCII || i.fontLigatures); + } + return new _Zi(i.useMonospaceOptimizations, i.canUseHalfwidthRightwardsArrow, e, n, t, s, r, o, i.fauxIndentLength, i.tabSize, i.startVisibleColumn, i.containsRTL, i.spaceWidth, i.renderSpaceCharCode, i.renderWhitespace, i.renderControlCharacters); +} +function eJn(i, e, t, s, n) { + const r = []; + let o = 0; + if (s > 0) { + r[o++] = new Yb(s, "", 0, false); + } + let a = s; + for (let l = 0, c = t.getCount(); l < c; l++) { + const u = t.getEndOffset(l); + if (u <= s) { + continue; + } + const d = t.getClassName(l); + if (u >= n) { + const g = e ? t9(i.substring(a, n)) : false; + r[o++] = new Yb(n, d, 0, g); + break; + } + const h = e ? t9(i.substring(a, u)) : false; + r[o++] = new Yb(u, d, 0, h); + a = u; + } + return r; +} +function tJn(i, e, t) { + let s = 0; + const n = []; + let r = 0; + if (t) { + for (let o = 0, a = e.length; o < a; o++) { + const l = e[o]; + const c = l.endIndex; + if (s + 50 < c) { + const u = l.type; + const d = l.metadata; + const h = l.containsRTL; + let g = -1; + let p = s; + for (let b = s; b < c; b++) { + if (i.charCodeAt(b) === 32) { + g = b; + } + if (g !== -1 && b - p >= 50) { + n[r++] = new Yb(g + 1, u, d, h); + p = g + 1; + g = -1; + } + } + if (p !== c) { + n[r++] = new Yb(c, u, d, h); + } + } else { + n[r++] = l; + } + s = c; + } + } else { + for (let o = 0, a = e.length; o < a; o++) { + const l = e[o]; + const c = l.endIndex; + const u = c - s; + if (u > 50) { + const d = l.type; + const h = l.metadata; + const g = l.containsRTL; + const p = Math.ceil(u / 50); + for (let b = 1; b < p; b++) { + const v = s + b * 50; + n[r++] = new Yb(v, d, h, g); + } + n[r++] = new Yb(c, d, h, g); + } else { + n[r++] = l; + } + s = c; + } + } + return n; +} +function MZi(i) { + if (i < 32) { + return i !== 9; + } else { + return i === 127 || i >= 8234 && i <= 8238 || i >= 8294 && i <= 8297 || i >= 8206 && i <= 8207 || i === 1564; + } +} +function iJn(i, e) { + const t = []; + let s = new Yb(0, "", 0, false); + let n = 0; + for (const r of e) { + const o = r.endIndex; + for (; n < o; n++) { + const a = i.charCodeAt(n); + if (MZi(a)) { + if (n > s.endIndex) { + s = new Yb(n, r.type, r.metadata, r.containsRTL); + t.push(s); + } + s = new Yb(n + 1, "mtkcontrol", r.metadata, false); + t.push(s); + } + } + if (n > s.endIndex) { + s = new Yb(o, r.type, r.metadata, r.containsRTL); + t.push(s); + } + } + return t; +} +function sJn(i, e, t, s) { + const n = i.continuesWithWrappedLine; + const r = i.fauxIndentLength; + const o = i.tabSize; + const a = i.startVisibleColumn; + const l = i.useMonospaceOptimizations; + const c = i.selectionsOnLine; + const u = i.renderWhitespace === 1; + const d = i.renderWhitespace === 3; + const h = i.renderSpaceWidth !== i.spaceWidth; + const g = []; + let p = 0; + let b = 0; + let v = s[b].type; + let y = s[b].containsRTL; + let w = s[b].endIndex; + const C = s.length; + let S = false; + let x = B0(e); + let k; + if (x === -1) { + S = true; + x = t; + k = t; + } else { + k = TL(e); + } + let E = false; + let D = 0; + let P = c && c[D]; + let R = a % o; + for (let F = r; F < t; F++) { + const O = e.charCodeAt(F); + if (P && F >= P.endOffset) { + D++; + P = c && c[D]; + } + let U; + if (F < x || F > k) { + U = true; + } else if (O === 9) { + U = true; + } else if (O === 32) { + if (u) { + if (E) { + U = true; + } else { + const j = F + 1 < t ? e.charCodeAt(F + 1) : 0; + U = j === 32 || j === 9; + } + } else { + U = true; + } + } else { + U = false; + } + if (U && c) { + U = !!P && P.startOffset <= F && P.endOffset > F; + } + if (U && d) { + U = S || F > k; + } + if (U && y && F >= x && F <= k) { + U = false; + } + if (E) { + if (!U || !l && R >= o) { + if (h) { + const j = p > 0 ? g[p - 1].endIndex : r; + for (let ie = j + 1; ie <= F; ie++) { + g[p++] = new Yb(ie, "mtkw", 1, false); + } + } else { + g[p++] = new Yb(F, "mtkw", 1, false); + } + R = R % o; + } + } else if (F === w || U && F > r) { + g[p++] = new Yb(F, v, 0, y); + R = R % o; + } + if (O === 9) { + R = o; + } else if (i9(O)) { + R += 2; + } else { + R++; + } + E = U; + while (F === w && (b++, b < C)) { + v = s[b].type; + y = s[b].containsRTL; + w = s[b].endIndex; + } + } + let L = false; + if (E) { + if (n && u) { + const F = t > 0 ? e.charCodeAt(t - 1) : 0; + const O = t > 1 ? e.charCodeAt(t - 2) : 0; + if (F !== 32 || O === 32 || O === 9) { + L = true; + } + } else { + L = true; + } + } + if (L) { + if (h) { + const F = p > 0 ? g[p - 1].endIndex : r; + for (let O = F + 1; O <= t; O++) { + g[p++] = new Yb(O, "mtkw", 1, false); + } + } else { + g[p++] = new Yb(t, "mtkw", 1, false); + } + } else { + g[p++] = new Yb(t, v, 0, y); + } + return g; +} +function nJn(i, e, t, s) { + s.sort(eE.compare); + const n = RZi.normalize(i, s); + const r = n.length; + let o = 0; + const a = []; + let l = 0; + let c = 0; + for (let d = 0, h = t.length; d < h; d++) { + const g = t[d]; + const p = g.endIndex; + const b = g.type; + const v = g.metadata; + const y = g.containsRTL; + while (o < r && n[o].startOffset < p) { + const w = n[o]; + if (w.startOffset > c) { + c = w.startOffset; + a[l++] = new Yb(c, b, v, y); + } + if (w.endOffset + 1 <= p) { + c = w.endOffset + 1; + a[l++] = new Yb(c, b + " " + w.className, v | w.metadata, y); + o++; + } else { + c = p; + a[l++] = new Yb(c, b + " " + w.className, v | w.metadata, y); + break; + } + } + if (p > c) { + c = p; + a[l++] = new Yb(c, b, v, y); + } + } + const u = t[t.length - 1].endIndex; + if (o < r && n[o].startOffset === u) { + while (o < r && n[o].startOffset === u) { + const d = n[o]; + a[l++] = new Yb(c, d.className, d.metadata, false); + o++; + } + } + return a; +} +function rJn(i, e) { + const t = i.fontIsMonospace; + const s = i.canUseHalfwidthRightwardsArrow; + const n = i.containsForeignElements; + const r = i.lineContent; + const o = i.len; + const a = i.isOverflowing; + const l = i.overflowingCharCount; + const c = i.parts; + const u = i.fauxIndentLength; + const d = i.tabSize; + const h = i.startVisibleColumn; + const g = i.containsRTL; + const p = i.spaceWidth; + const b = i.renderSpaceCharCode; + const v = i.renderWhitespace; + const y = i.renderControlCharacters; + const w = new hat(o + 1, c.length); + let C = false; + let S = 0; + let x = h; + let k = 0; + let E = 0; + let D = 0; + if (g) { + e.appendString(""); + } else { + e.appendString(""); + } + for (let P = 0, R = c.length; P < R; P++) { + const L = c[P]; + const F = L.endIndex; + const O = L.type; + const U = L.containsRTL; + const j = v !== 0 && L.isWhitespace(); + const ie = j && !t && (O === "mtkw" || !n); + const ee = S === F && L.isPseudoAfter(); + k = 0; + e.appendString("= u) { + ge += Se; + } + } + } + if (ie) { + e.appendString(" style=\"width:"); + e.appendString(String(p * ne)); + e.appendString("px\""); + } + e.appendASCIICharCode(62); + for (; S < F; S++) { + w.setColumnInfo(S + 1, P - D, k, E); + D = 0; + const be = r.charCodeAt(S); + let ge; + let ce; + if (be === 9) { + ge = d - x % d | 0; + ce = ge; + if (!s || ce > 1) { + e.appendCharCode(8594); + } else { + e.appendCharCode(65515); + } + for (let Se = 2; Se <= ce; Se++) { + e.appendCharCode(160); + } + } else { + ge = 2; + ce = 1; + e.appendCharCode(b); + e.appendCharCode(8204); + } + k += ge; + E += ce; + if (S >= u) { + x += ce; + } + } + } else { + for (e.appendASCIICharCode(62); S < F; S++) { + w.setColumnInfo(S + 1, P - D, k, E); + D = 0; + const ne = r.charCodeAt(S); + let be = 1; + let ge = 1; + switch (ne) { + case 9: + be = d - x % d; + ge = be; + for (let ce = 1; ce <= be; ce++) { + e.appendCharCode(160); + } + break; + case 32: + e.appendCharCode(160); + break; + case 60: + e.appendString("<"); + break; + case 62: + e.appendString(">"); + break; + case 38: + e.appendString("&"); + break; + case 0: + if (y) { + e.appendCharCode(9216); + } else { + e.appendString("�"); + } + break; + case 65279: + case 8232: + case 8233: + case 133: + e.appendCharCode(65533); + break; + default: + if (i9(ne)) { + ge++; + } + if (y && ne < 32) { + e.appendCharCode(9216 + ne); + } else if (y && ne === 127) { + e.appendCharCode(9249); + } else if (y && MZi(ne)) { + e.appendString("[U+"); + e.appendString(oJn(ne)); + e.appendString("]"); + be = 8; + ge = be; + } else { + e.appendCharCode(ne); + } + } + k += be; + E += ge; + if (S >= u) { + x += ge; + } + } + } + if (ee) { + D++; + } else { + D = 0; + } + if (S >= o && !C && L.isPseudoAfter()) { + C = true; + w.setColumnInfo(S + 1, P, k, E); + } + e.appendString(""); + } + if (!C) { + w.setColumnInfo(o + 1, c.length - 1, k, E); + } + if (a) { + e.appendString(""); + e.appendString(f(873, null, aJn(l))); + e.appendString(""); + } + e.appendString(""); + return new fat(w, g, n); +} +function oJn(i) { + return i.toString(16).toUpperCase().padStart(4, "0"); +} +function aJn(i) { + if (i < 1024) { + return f(874, null, i); + } else if (i < 1048576) { + return `${(i / 1024).toFixed(1)} KB`; + } else { + return `${(i / 1024 / 1024).toFixed(1)} MB`; + } +} +var AZi; +var k3t; +var $9; +var $Zi; +var E3t; +var hat; +var FZi; +var fat; +var OZi; +var _Zi; +var BZi; +var Fj = ue({ + "out-build/vs/editor/common/viewLayout/viewLineRenderer.js"() { + "use strict"; + + X(); + $i(); + mM(); + Aj(); + Xzn(); + (function (i) { + i[i.None = 0] = "None"; + i[i.Boundary = 1] = "Boundary"; + i[i.Selection = 2] = "Selection"; + i[i.Trailing = 3] = "Trailing"; + i[i.All = 4] = "All"; + })(AZi ||= {}); + k3t = class { + constructor(i, e) { + this.startOffset = i; + this.endOffset = e; + } + equals(i) { + return this.startOffset === i.startOffset && this.endOffset === i.endOffset; + } + }; + $9 = class { + constructor(i, e, t, s, n, r, o, a, l, c, u, d, h, g, p, b, v, y, w) { + this.useMonospaceOptimizations = i; + this.canUseHalfwidthRightwardsArrow = e; + this.lineContent = t; + this.continuesWithWrappedLine = s; + this.isBasicASCII = n; + this.containsRTL = r; + this.fauxIndentLength = o; + this.lineTokens = a; + this.lineDecorations = l.sort(eE.compare); + this.tabSize = c; + this.startVisibleColumn = u; + this.spaceWidth = d; + this.stopRenderingLineAfter = p; + this.renderWhitespace = b === "all" ? 4 : b === "boundary" ? 1 : b === "selection" ? 2 : b === "trailing" ? 3 : 0; + this.renderControlCharacters = v; + this.fontLigatures = y; + this.selectionsOnLine = w && w.sort((x, k) => x.startOffset < k.startOffset ? -1 : 1); + const C = Math.abs(g - d); + const S = Math.abs(h - d); + if (C < S) { + this.renderSpaceWidth = g; + this.renderSpaceCharCode = 11825; + } else { + this.renderSpaceWidth = h; + this.renderSpaceCharCode = 183; + } + } + c(i) { + if (this.selectionsOnLine === null) { + return i === null; + } + if (i === null || i.length !== this.selectionsOnLine.length) { + return false; + } + for (let e = 0; e < this.selectionsOnLine.length; e++) { + if (!this.selectionsOnLine[e].equals(i[e])) { + return false; + } + } + return true; + } + equals(i) { + return this.useMonospaceOptimizations === i.useMonospaceOptimizations && this.canUseHalfwidthRightwardsArrow === i.canUseHalfwidthRightwardsArrow && this.lineContent === i.lineContent && this.continuesWithWrappedLine === i.continuesWithWrappedLine && this.isBasicASCII === i.isBasicASCII && this.containsRTL === i.containsRTL && this.fauxIndentLength === i.fauxIndentLength && this.tabSize === i.tabSize && this.startVisibleColumn === i.startVisibleColumn && this.spaceWidth === i.spaceWidth && this.renderSpaceWidth === i.renderSpaceWidth && this.renderSpaceCharCode === i.renderSpaceCharCode && this.stopRenderingLineAfter === i.stopRenderingLineAfter && this.renderWhitespace === i.renderWhitespace && this.renderControlCharacters === i.renderControlCharacters && this.fontLigatures === i.fontLigatures && eE.equalsArr(this.lineDecorations, i.lineDecorations) && this.lineTokens.equals(i.lineTokens) && this.c(i.selectionsOnLine); + } + }; + (function (i) { + i[i.PART_INDEX_MASK = 4294901760] = "PART_INDEX_MASK"; + i[i.CHAR_INDEX_MASK = 65535] = "CHAR_INDEX_MASK"; + i[i.CHAR_INDEX_OFFSET = 0] = "CHAR_INDEX_OFFSET"; + i[i.PART_INDEX_OFFSET = 16] = "PART_INDEX_OFFSET"; + })($Zi ||= {}); + E3t = class { + constructor(i, e) { + this.partIndex = i; + this.charIndex = e; + } + }; + hat = class k3 { + static c(e) { + return (e & -65536) >>> 16; + } + static d(e) { + return (e & 65535) >>> 0; + } + constructor(e, t) { + this.length = e; + this.e = new Uint32Array(this.length); + this.f = new Uint32Array(this.length); + } + setColumnInfo(e, t, s, n) { + const r = (t << 16 | s << 0) >>> 0; + this.e[e - 1] = r; + this.f[e - 1] = n; + } + getHorizontalOffset(e) { + if (this.f.length === 0) { + return 0; + } else { + return this.f[e - 1]; + } + } + g(e) { + if (this.length === 0) { + return 0; + } else if (e < 0) { + return this.e[0]; + } else if (e >= this.length) { + return this.e[this.length - 1]; + } else { + return this.e[e]; + } + } + getDomPosition(e) { + const t = this.g(e - 1); + const s = k3.c(t); + const n = k3.d(t); + return new E3t(s, n); + } + getColumn(e, t) { + return this.h(e.partIndex, t, e.charIndex) + 1; + } + h(e, t, s) { + if (this.length === 0) { + return 0; + } + const n = (e << 16 | s << 0) >>> 0; + let r = 0; + let o = this.length - 1; + while (r + 1 < o) { + const b = r + o >>> 1; + const v = this.e[b]; + if (v === n) { + return b; + } + if (v > n) { + o = b; + } else { + r = b; + } + } + if (r === o) { + return r; + } + const a = this.e[r]; + const l = this.e[o]; + if (a === n) { + return r; + } + if (l === n) { + return o; + } + const c = k3.c(a); + const u = k3.d(a); + const d = k3.c(l); + let h; + if (c !== d) { + h = t; + } else { + h = k3.d(l); + } + const g = s - u; + const p = h - s; + if (g <= p) { + return r; + } else { + return o; + } + } + inflate() { + const e = []; + for (let t = 0; t < this.length; t++) { + const s = this.e[t]; + const n = k3.c(s); + const r = k3.d(s); + const o = this.f[t]; + e.push([n, r, o]); + } + return e; + } + }; + (function (i) { + i[i.None = 0] = "None"; + i[i.Before = 1] = "Before"; + i[i.After = 2] = "After"; + })(FZi ||= {}); + fat = class { + constructor(i, e, t) { + this._renderLineOutputBrand = undefined; + this.characterMapping = i; + this.containsRTL = e; + this.containsForeignElements = t; + } + }; + OZi = class { + constructor(i, e, t, s) { + this.characterMapping = i; + this.html = e; + this.containsRTL = t; + this.containsForeignElements = s; + } + }; + _Zi = class { + constructor(i, e, t, s, n, r, o, a, l, c, u, d, h, g, p, b) { + this.fontIsMonospace = i; + this.canUseHalfwidthRightwardsArrow = e; + this.lineContent = t; + this.len = s; + this.isOverflowing = n; + this.overflowingCharCount = r; + this.parts = o; + this.containsForeignElements = a; + this.fauxIndentLength = l; + this.tabSize = c; + this.startVisibleColumn = u; + this.containsRTL = d; + this.spaceWidth = h; + this.renderSpaceCharCode = g; + this.renderWhitespace = p; + this.renderControlCharacters = b; + } + }; + (function (i) { + i[i.LongToken = 50] = "LongToken"; + })(BZi ||= {}); + } +}); +function LI(i) { + return i === il.HIGH_CONTRAST_DARK || i === il.HIGH_CONTRAST_LIGHT; +} +function I3t(i) { + return i === il.DARK || i === il.HIGH_CONTRAST_DARK; +} +var il; +var vp = ue({ + "out-build/vs/platform/theme/common/theme.js"() { + "use strict"; + + (function (i) { + i.DARK = "dark"; + i.LIGHT = "light"; + i.HIGH_CONTRAST_DARK = "hcDark"; + i.HIGH_CONTRAST_LIGHT = "hcLight"; + })(il ||= {}); + } +}); +function lJn(i, e, t, s, n) { + return new VZi(i, e, t, s, n); +} +function cJn(i, e, t, s, n) { + return new T3t(i, e, t, s, n); +} +function D3t(i, e, t) { + const s = e.textContent.length; + let n = -1; + while (e) { + e = e.previousSibling; + n++; + } + return i.getColumn(new E3t(n, t), s); +} +var UZi; +var Oj; +var F9; +var WZi; +var lpe; +var T3t; +var VZi; +var P3t; +var L3t = ue({ + "out-build/vs/editor/browser/viewParts/viewLines/viewLine.js"() { + "use strict"; + + hc(); + pf(); + rt(); + Yzn(); + ate(); + Aj(); + Fj(); + vp(); + Qd(); + UZi = function () { + if (sc) { + return true; + } else { + return !yl && !Bv && !yI; + } + }(); + Oj = true; + F9 = class OFn { + static { + this.CLASS_NAME = "view-line"; + } + constructor(e, t) { + this.d = e; + this.a = t; + this.b = true; + this.c = null; + } + getDomNode() { + if (this.c && this.c.domNode) { + return this.c.domNode.domNode; + } else { + return null; + } + } + setDomNode(e) { + if (this.c) { + this.c.domNode = nc(e); + } else { + throw new Error("I have no rendered view line to set the dom node to..."); + } + } + onContentChanged() { + this.b = true; + } + onTokensChanged() { + this.b = true; + } + onDecorationsChanged() { + this.b = true; + } + onOptionsChanged(e) { + this.b = true; + this.a = e; + } + onSelectionChanged() { + if (LI(this.a.themeType) || this.a.renderWhitespace === "selection") { + this.b = true; + return true; + } else { + return false; + } + } + renderLine(e, t, s, n, r) { + if (this.a.useGpu && this.d?.canRender(this.a, n, e)) { + this.c?.domNode?.domNode.remove(); + this.c = null; + return false; + } + if (this.b === false) { + return false; + } + this.b = false; + const o = n.getViewLineRenderingData(e); + const a = this.a; + const l = eE.filter(o.inlineDecorations, e, o.minColumn, o.maxColumn); + let c = null; + if (LI(a.themeType) || this.a.renderWhitespace === "selection") { + const g = n.selections; + for (const p of g) { + if (p.endLineNumber < e || p.startLineNumber > e) { + continue; + } + const b = p.startLineNumber === e ? p.startColumn : o.minColumn; + const v = p.endLineNumber === e ? p.endColumn : o.maxColumn; + if (b < v) { + if (LI(a.themeType)) { + l.push(new eE(b, v, "inline-selected-text", 0)); + } + if (this.a.renderWhitespace === "selection") { + c ||= []; + c.push(new k3t(b - 1, v - 1)); + } + } + } + } + const u = new $9(a.useMonospaceOptimizations, a.canUseHalfwidthRightwardsArrow, o.content, o.continuesWithWrappedLine, o.isBasicASCII, o.containsRTL, o.minColumn - 1, o.tokens, l, o.tabSize, o.startVisibleColumn, a.spaceWidth, a.middotWidth, a.wsmiddotWidth, a.stopRenderingLineAfter, a.renderWhitespace, a.renderControlCharacters, a.fontLigatures !== t4.OFF, c); + if (this.c && this.c.input.equals(u)) { + return false; + } + r.appendString("
"); + const d = $j(u, r); + r.appendString("
"); + let h = null; + if (Oj && UZi && o.isBasicASCII && a.useMonospaceOptimizations && d.containsForeignElements === 0) { + h = new lpe(this.c ? this.c.domNode : null, u, d.characterMapping); + } + h ||= P3t(this.c ? this.c.domNode : null, u, d.characterMapping, d.containsRTL, d.containsForeignElements); + this.c = h; + return true; + } + layoutLine(e, t, s) { + if (this.c && this.c.domNode) { + this.c.domNode.setTop(t); + this.c.domNode.setHeight(s); + } + } + getWidth(e) { + if (this.c) { + return this.c.getWidth(e); + } else { + return 0; + } + } + getWidthIsFast() { + if (this.c) { + return this.c.getWidthIsFast(); + } else { + return true; + } + } + needsMonospaceFontCheck() { + if (this.c) { + return this.c instanceof lpe; + } else { + return false; + } + } + monospaceAssumptionsAreValid() { + if (this.c && this.c instanceof lpe) { + return this.c.monospaceAssumptionsAreValid(); + } else { + return Oj; + } + } + onMonospaceAssumptionsInvalidated() { + if (this.c && this.c instanceof lpe) { + this.c = this.c.toSlowRenderedLine(); + } + } + getVisibleRangesForRange(e, t, s, n) { + if (!this.c) { + return null; + } + t = Math.min(this.c.input.lineContent.length + 1, Math.max(1, t)); + s = Math.min(this.c.input.lineContent.length + 1, Math.max(1, s)); + const r = this.c.input.stopRenderingLineAfter; + if (r !== -1 && t > r + 1 && s > r + 1) { + return new dat(true, [new f4(this.getWidth(n), 0)]); + } + if (r !== -1 && t > r + 1) { + t = r + 1; + } + if (r !== -1 && s > r + 1) { + s = r + 1; + } + const o = this.c.getVisibleRangesForRange(e, t, s, n); + if (o && o.length > 0) { + return new dat(false, o); + } else { + return null; + } + } + getColumnOfNodeOffset(e, t) { + if (this.c) { + return this.c.getColumnOfNodeOffset(e, t); + } else { + return 1; + } + } + }; + (function (i) { + i[i.MaxMonospaceDistance = 300] = "MaxMonospaceDistance"; + })(WZi ||= {}); + lpe = class { + constructor(i, e, t) { + this.d = -1; + this.domNode = i; + this.input = e; + const s = Math.floor(e.lineContent.length / 300); + if (s > 0) { + this.c = new Float32Array(s); + for (let n = 0; n < s; n++) { + this.c[n] = -1; + } + } else { + this.c = null; + } + this.a = t; + this.b = e.spaceWidth; + } + getWidth(i) { + if (!this.domNode || this.input.lineContent.length < 300) { + const e = this.a.getHorizontalOffset(this.a.length); + return Math.round(this.b * e); + } + if (this.d === -1) { + this.d = this.f(this.domNode).offsetWidth; + i?.markDidDomLayout(); + } + return this.d; + } + getWidthIsFast() { + return this.input.lineContent.length < 300 || this.d !== -1; + } + monospaceAssumptionsAreValid() { + if (!this.domNode) { + return Oj; + } + if (this.input.lineContent.length < 300) { + const i = this.getWidth(null); + const e = this.domNode.domNode.firstChild.offsetWidth; + if (Math.abs(i - e) >= 2) { + console.warn("monospace assumptions have been violated, therefore disabling monospace optimizations!"); + Oj = false; + } + } + return Oj; + } + toSlowRenderedLine() { + return P3t(this.domNode, this.input, this.a, false, 0); + } + getVisibleRangesForRange(i, e, t, s) { + const n = this.e(i, e, s); + const r = this.e(i, t, s); + return [new f4(n, r - n)]; + } + e(i, e, t) { + if (e <= 300) { + const l = this.a.getHorizontalOffset(e); + return this.b * l; + } + const s = Math.floor((e - 1) / 300) - 1; + const n = (s + 1) * 300 + 1; + let r = -1; + if (this.c) { + r = this.c[s]; + if (r === -1) { + r = this.g(i, n, t); + this.c[s] = r; + } + } + if (r === -1) { + const l = this.a.getHorizontalOffset(e); + return this.b * l; + } + const o = this.a.getHorizontalOffset(n); + const a = this.a.getHorizontalOffset(e); + return r + this.b * (a - o); + } + f(i) { + return i.domNode.firstChild; + } + g(i, e, t) { + if (!this.domNode) { + return -1; + } + const s = this.a.getDomPosition(e); + const n = ape.readHorizontalRanges(this.f(this.domNode), s.partIndex, s.charIndex, s.partIndex, s.charIndex, t); + if (!n || n.length === 0) { + return -1; + } else { + return n[0].left; + } + } + getColumnOfNodeOffset(i, e) { + return D3t(this.a, i, e); + } + }; + T3t = class { + constructor(i, e, t, s, n) { + this.domNode = i; + this.input = e; + this.a = t; + this.b = /^\s*$/.test(e.lineContent); + this.c = n; + this.d = -1; + this.e = null; + if (!s || this.a.length === 0) { + this.e = new Float32Array(Math.max(2, this.a.length + 1)); + for (let r = 0, o = this.a.length; r <= o; r++) { + this.e[r] = -1; + } + } + } + f(i) { + return i.domNode.firstChild; + } + getWidth(i) { + if (this.domNode) { + if (this.d === -1) { + this.d = this.f(this.domNode).offsetWidth; + i?.markDidDomLayout(); + } + return this.d; + } else { + return 0; + } + } + getWidthIsFast() { + return this.d !== -1; + } + getVisibleRangesForRange(i, e, t, s) { + if (!this.domNode) { + return null; + } + if (this.e !== null) { + const n = this.h(this.domNode, i, e, s); + if (n === -1) { + return null; + } + const r = this.h(this.domNode, i, t, s); + if (r === -1) { + return null; + } else { + return [new f4(n, r - n)]; + } + } + return this.g(this.domNode, i, e, t, s); + } + g(i, e, t, s, n) { + if (t === s) { + const r = this.h(i, e, t, n); + if (r === -1) { + return null; + } else { + return [new f4(r, 0)]; + } + } else { + return this.k(i, t, s, n); + } + } + h(i, e, t, s) { + if (this.a.length === 0) { + if (this.c === 0 || this.c === 2) { + return 0; + } + if (this.c === 1) { + return this.getWidth(s); + } + const n = this.f(i); + if (n.firstChild) { + s.markDidDomLayout(); + return n.firstChild.offsetWidth; + } else { + return 0; + } + } + if (this.e !== null) { + const n = this.e[t]; + if (n !== -1) { + return n; + } + const r = this.j(i, e, t, s); + this.e[t] = r; + return r; + } + return this.j(i, e, t, s); + } + j(i, e, t, s) { + if (this.a.length === 0) { + const a = ape.readHorizontalRanges(this.f(i), 0, 0, 0, 0, s); + if (!a || a.length === 0) { + return -1; + } else { + return a[0].left; + } + } + if (t === this.a.length && this.b && this.c === 0) { + return this.getWidth(s); + } + const n = this.a.getDomPosition(t); + const r = ape.readHorizontalRanges(this.f(i), n.partIndex, n.charIndex, n.partIndex, n.charIndex, s); + if (!r || r.length === 0) { + return -1; + } + const o = r[0].left; + if (this.input.isBasicASCII) { + const a = this.a.getHorizontalOffset(t); + const l = Math.round(this.input.spaceWidth * a); + if (Math.abs(l - o) <= 1) { + return l; + } + } + return o; + } + k(i, e, t, s) { + if (e === 1 && t === this.a.length) { + return [new f4(0, this.getWidth(s))]; + } + const n = this.a.getDomPosition(e); + const r = this.a.getDomPosition(t); + return ape.readHorizontalRanges(this.f(i), n.partIndex, n.charIndex, r.partIndex, r.charIndex, s); + } + getColumnOfNodeOffset(i, e) { + return D3t(this.a, i, e); + } + }; + VZi = class extends T3t { + g(i, e, t, s, n) { + const r = super.g(i, e, t, s, n); + if (!r || r.length === 0 || t === s || t === 1 && s === this.a.length) { + return r; + } + if (!this.input.containsRTL) { + const o = this.h(i, e, s, n); + if (o !== -1) { + const a = r[r.length - 1]; + if (a.left < o) { + a.width = o - a.left; + } + } + } + return r; + } + }; + P3t = function () { + if (c9) { + return lJn; + } else { + return cJn; + } + }(); + } +}); +function cpe(i) { + return { + isAfterLines: false, + horizontalDistanceToText: i + }; +} +function uJn(i, e, t) { + const s = document.createRange(); + let n = i.elementFromPoint(e, t); + if (n !== null) { + while (n && n.firstChild && n.firstChild.nodeType !== n.firstChild.TEXT_NODE && n.lastChild && n.lastChild.firstChild) { + n = n.lastChild; + } + const r = n.getBoundingClientRect(); + const o = Kt(n); + const a = o.getComputedStyle(n, null).getPropertyValue("font-style"); + const l = o.getComputedStyle(n, null).getPropertyValue("font-variant"); + const c = o.getComputedStyle(n, null).getPropertyValue("font-weight"); + const u = o.getComputedStyle(n, null).getPropertyValue("font-size"); + const d = o.getComputedStyle(n, null).getPropertyValue("line-height"); + const h = o.getComputedStyle(n, null).getPropertyValue("font-family"); + const g = `${a} ${l} ${c} ${u}/${d} ${h}`; + const p = n.innerText; + let b = r.left; + let v = 0; + let y; + if (e > r.left + r.width) { + v = p.length; + } else { + const w = JZi.getInstance(); + for (let C = 0; C < p.length + 1; C++) { + y = w.getCharWidth(p.charAt(C), g) / 2; + b += y; + if (e < b) { + v = C; + break; + } + b += y; + } + } + s.setStart(n.firstChild, v); + s.setEnd(n.firstChild, v); + } + return s; +} +var HZi; +var g4; +var R3t; +var _j; +var qZi; +var H0; +var XC; +var gat; +var jZi; +var zZi; +var N3t; +var pat; +var JZi; +var GZi = ue({ + "out-build/vs/editor/browser/controller/mouseTarget.js"() { + "use strict"; + + ope(); + Ow(); + L3t(); + Rs(); + yt(); + TT(); + xe(); + KGi(); + pu(); + (function (i) { + i[i.Unknown = 0] = "Unknown"; + i[i.Content = 1] = "Content"; + })(HZi ||= {}); + g4 = class { + constructor(i = null) { + this.hitTarget = i; + this.type = 0; + } + }; + R3t = class { + get hitTarget() { + return this.spanNode; + } + constructor(i, e, t) { + this.position = i; + this.spanNode = e; + this.injectedText = t; + this.type = 1; + } + }; + (function (i) { + function e(t, s, n) { + const r = t.getPositionFromDOMInfo(s, n); + if (r) { + return new R3t(r, s, null); + } else { + return new g4(s); + } + } + i.createFromDOMInfo = e; + })(_j ||= {}); + qZi = class { + constructor(i, e) { + this.lastViewCursorsRenderData = i; + this.lastTextareaPosition = e; + } + }; + H0 = class { + static c(i, e = null) { + if (!e && i) { + return new Z(i.lineNumber, i.column, i.lineNumber, i.column); + } else { + return e ?? null; + } + } + static createUnknown(i, e, t) { + return { + type: 0, + element: i, + mouseColumn: e, + position: t, + range: this.c(t) + }; + } + static createTextarea(i, e) { + return { + type: 1, + element: i, + mouseColumn: e, + position: null, + range: null + }; + } + static createMargin(i, e, t, s, n, r) { + return { + type: i, + element: e, + mouseColumn: t, + position: s, + range: n, + detail: r + }; + } + static createViewZone(i, e, t, s, n) { + return { + type: i, + element: e, + mouseColumn: t, + position: s, + range: this.c(s), + detail: n + }; + } + static createContentText(i, e, t, s, n) { + return { + type: 6, + element: i, + mouseColumn: e, + position: t, + range: this.c(t, s), + detail: n + }; + } + static createContentEmpty(i, e, t, s) { + return { + type: 7, + element: i, + mouseColumn: e, + position: t, + range: this.c(t), + detail: s + }; + } + static createContentWidget(i, e, t) { + return { + type: 9, + element: i, + mouseColumn: e, + position: null, + range: null, + detail: t + }; + } + static createScrollbar(i, e, t) { + return { + type: 11, + element: i, + mouseColumn: e, + position: t, + range: this.c(t) + }; + } + static createOverlayWidget(i, e, t) { + return { + type: 12, + element: i, + mouseColumn: e, + position: null, + range: null, + detail: t + }; + } + static createOutsideEditor(i, e, t, s) { + return { + type: 13, + element: null, + mouseColumn: i, + position: e, + range: this.c(e), + outsidePosition: t, + outsideDistance: s + }; + } + static f(i) { + if (i === 1) { + return "TEXTAREA"; + } else if (i === 2) { + return "GUTTER_GLYPH_MARGIN"; + } else if (i === 3) { + return "GUTTER_LINE_NUMBERS"; + } else if (i === 4) { + return "GUTTER_LINE_DECORATIONS"; + } else if (i === 5) { + return "GUTTER_VIEW_ZONE"; + } else if (i === 6) { + return "CONTENT_TEXT"; + } else if (i === 7) { + return "CONTENT_EMPTY"; + } else if (i === 8) { + return "CONTENT_VIEW_ZONE"; + } else if (i === 9) { + return "CONTENT_WIDGET"; + } else if (i === 10) { + return "OVERVIEW_RULER"; + } else if (i === 11) { + return "SCROLLBAR"; + } else if (i === 12) { + return "OVERLAY_WIDGET"; + } else { + return "UNKNOWN"; + } + } + static toString(i) { + return this.f(i.type) + ": " + i.position + " - " + i.range + " - " + JSON.stringify(i.detail); + } + }; + XC = class { + static isTextArea(i) { + return i.length === 2 && i[0] === 3 && i[1] === 7; + } + static isChildOfViewLines(i) { + return i.length >= 4 && i[0] === 3 && i[3] === 8; + } + static isStrictChildOfViewLines(i) { + return i.length > 4 && i[0] === 3 && i[3] === 8; + } + static isChildOfScrollableElement(i) { + return i.length >= 2 && i[0] === 3 && i[1] === 6; + } + static isChildOfMinimap(i) { + return i.length >= 2 && i[0] === 3 && i[1] === 9; + } + static isChildOfContentWidgets(i) { + return i.length >= 4 && i[0] === 3 && i[3] === 1; + } + static isChildOfOverflowGuard(i) { + return i.length >= 1 && i[0] === 3; + } + static isChildOfOverflowingContentWidgets(i) { + return i.length >= 1 && i[0] === 2; + } + static isChildOfOverlayWidgets(i) { + return i.length >= 2 && i[0] === 3 && i[1] === 4; + } + static isChildOfOverflowingOverlayWidgets(i) { + return i.length >= 1 && i[0] === 5; + } + }; + gat = class P3i { + constructor(e, t, s) { + this.viewModel = e.viewModel; + const n = e.configuration.options; + this.layoutInfo = n.get(151); + this.viewDomNode = t.viewDomNode; + this.viewLinesGpu = t.viewLinesGpu; + this.lineHeight = n.get(68); + this.stickyTabStops = n.get(121); + this.typicalHalfwidthCharacterWidth = n.get(52).typicalHalfwidthCharacterWidth; + this.lastRenderData = s; + this.c = e; + this.f = t; + } + getZoneAtCoord(e) { + return P3i.getZoneAtCoord(this.c, e); + } + static getZoneAtCoord(e, t) { + const s = e.viewLayout.getWhitespaceAtVerticalOffset(t); + if (s) { + const n = s.verticalOffset + s.height / 2; + const r = e.viewModel.getLineCount(); + let o = null; + let a; + let l = null; + if (s.afterLineNumber !== r) { + l = new je(s.afterLineNumber + 1, 1); + } + if (s.afterLineNumber > 0) { + o = new je(s.afterLineNumber, e.viewModel.getLineMaxColumn(s.afterLineNumber)); + } + if (l === null) { + a = o; + } else if (o === null) { + a = l; + } else if (t < n) { + a = o; + } else { + a = l; + } + return { + viewZoneId: s.id, + afterLineNumber: s.afterLineNumber, + positionBefore: o, + positionAfter: l, + position: a + }; + } + return null; + } + getFullLineRangeAtCoord(e) { + if (this.c.viewLayout.isAfterLines(e)) { + const n = this.c.viewModel.getLineCount(); + const r = this.c.viewModel.getLineMaxColumn(n); + return { + range: new Z(n, r, n, r), + isAfterLines: true + }; + } + const t = this.c.viewLayout.getLineNumberAtVerticalOffset(e); + const s = this.c.viewModel.getLineMaxColumn(t); + return { + range: new Z(t, 1, t, s), + isAfterLines: false + }; + } + getLineNumberAtVerticalOffset(e) { + return this.c.viewLayout.getLineNumberAtVerticalOffset(e); + } + isAfterLines(e) { + return this.c.viewLayout.isAfterLines(e); + } + isInTopPadding(e) { + return this.c.viewLayout.isInTopPadding(e); + } + isInBottomPadding(e) { + return this.c.viewLayout.isInBottomPadding(e); + } + getVerticalOffsetForLineNumber(e) { + return this.c.viewLayout.getVerticalOffsetForLineNumber(e); + } + findAttribute(e, t) { + return P3i.g(e, t, this.f.viewDomNode); + } + static g(e, t, s) { + while (e && e !== e.ownerDocument.body) { + if (e.hasAttribute && e.hasAttribute(t)) { + return e.getAttribute(t); + } + if (e === s) { + return null; + } + e = e.parentNode; + } + return null; + } + getLineWidth(e) { + return this.f.getLineWidth(e); + } + visibleRangeForPosition(e, t) { + return this.f.visibleRangeForPosition(e, t); + } + getPositionFromDOMInfo(e, t) { + return this.f.getPositionFromDOMInfo(e, t); + } + getCurrentScrollTop() { + return this.c.viewLayout.getCurrentScrollTop(); + } + getCurrentScrollLeft() { + return this.c.viewLayout.getCurrentScrollLeft(); + } + }; + jZi = class { + constructor(i, e, t, s) { + this.editorPos = e; + this.pos = t; + this.relativePos = s; + this.mouseVerticalOffset = Math.max(0, i.getCurrentScrollTop() + this.relativePos.y); + this.mouseContentHorizontalOffset = i.getCurrentScrollLeft() + this.relativePos.x - i.layoutInfo.contentLeft; + this.isInMarginArea = this.relativePos.x < i.layoutInfo.contentLeft && this.relativePos.x >= i.layoutInfo.glyphMarginLeft; + this.isInContentArea = !this.isInMarginArea; + this.c = Math.max(0, pat._getMouseColumn(this.mouseContentHorizontalOffset, i.typicalHalfwidthCharacterWidth)); + } + }; + zZi = class extends jZi { + get target() { + if (this.h) { + return this.hitTestResult.value.hitTarget; + } else { + return this.g; + } + } + get targetPath() { + if (this.j !== this.target) { + this.j = this.target; + this.k = JL.collect(this.target, this.f.viewDomNode); + } + return this.k; + } + constructor(i, e, t, s, n) { + super(i, e, t, s); + this.hitTestResult = new ol(() => pat.doHitTest(this.f, this)); + this.j = null; + this.k = new Uint8Array(0); + this.f = i; + this.g = n; + const r = !!this.g; + this.h = !r; + } + 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} + target: ${this.target ? this.target.outerHTML : null}`; + } + get wouldBenefitFromHitTestTargetSwitch() { + return !this.h && this.hitTestResult.value.hitTarget !== null && this.target !== this.hitTestResult.value.hitTarget; + } + switchToHitTestTarget() { + this.h = true; + } + l(i = null) { + if (i && i.column < this.f.viewModel.getLineMaxColumn(i.lineNumber)) { + return pp.visibleColumnFromColumn(this.f.viewModel.getLineContent(i.lineNumber), i.column, this.f.viewModel.model.getOptions().tabSize) + 1; + } else { + return this.c; + } + } + fulfillUnknown(i = null) { + return H0.createUnknown(this.target, this.l(i), i); + } + fulfillTextarea() { + return H0.createTextarea(this.target, this.l()); + } + fulfillMargin(i, e, t, s) { + return H0.createMargin(i, this.target, this.l(e), e, t, s); + } + fulfillViewZone(i, e, t) { + return H0.createViewZone(i, this.target, this.l(e), e, t); + } + fulfillContentText(i, e, t) { + return H0.createContentText(this.target, this.l(i), i, e, t); + } + fulfillContentEmpty(i, e) { + return H0.createContentEmpty(this.target, this.l(i), i, e); + } + fulfillContentWidget(i) { + return H0.createContentWidget(this.target, this.l(), i); + } + fulfillScrollbar(i) { + return H0.createScrollbar(this.target, this.l(i), i); + } + fulfillOverlayWidget(i) { + return H0.createOverlayWidget(this.target, this.l(), i); + } + }; + N3t = { + isAfterLines: true + }; + pat = class dI { + constructor(e, t) { + this.c = e; + this.f = t; + } + mouseTargetIsWidget(e) { + const t = e.target; + const s = JL.collect(t, this.f.viewDomNode); + const n = t.parentElement; + if (n && n.getAttribute("data-lexical-editor") === "true") { + return true; + } + const r = n?.parentElement; + return !!r && r.getAttribute("data-lexical-editor") === "true" || !!XC.isChildOfContentWidgets(s) || !!XC.isChildOfOverflowingContentWidgets(s) || !!XC.isChildOfOverlayWidgets(s) || !!XC.isChildOfOverflowingOverlayWidgets(s); + } + createMouseTarget(e, t, s, n, r) { + const o = new gat(this.c, this.f, e); + const a = new zZi(o, t, s, n, r); + try { + const l = dI.g(o, a); + if (l.type === 6 && o.stickyTabStops && l.position !== null) { + const c = dI.A(l.position, o.viewModel); + const u = Z.fromPositions(c, c).plusRange(l.range); + return a.fulfillContentText(c, u, l.detail); + } + return l; + } catch { + return a.fulfillUnknown(); + } + } + static g(e, t) { + if (t.target === null) { + return t.fulfillUnknown(); + } + const s = t; + let n = null; + if (!XC.isChildOfOverflowGuard(t.targetPath) && !XC.isChildOfOverflowingContentWidgets(t.targetPath) && !XC.isChildOfOverflowingOverlayWidgets(t.targetPath)) { + n = n || t.fulfillUnknown(); + } + n = n || dI.h(e, s); + n = n || dI.j(e, s); + n = n || dI.p(e, s); + n = n || dI.q(e, s); + n = n || dI.l(e, s); + n = n || dI.n(e, s); + n = n || dI.k(e, s); + n = n || dI.m(e, s); + n = n || dI.o(e, s); + n = n || dI.s(e, s); + return n || t.fulfillUnknown(); + } + static h(e, t) { + if (XC.isChildOfContentWidgets(t.targetPath) || XC.isChildOfOverflowingContentWidgets(t.targetPath)) { + const s = e.findAttribute(t.target, "widgetId"); + if (s) { + return t.fulfillContentWidget(s); + } else { + return t.fulfillUnknown(); + } + } + return null; + } + static j(e, t) { + if (XC.isChildOfOverlayWidgets(t.targetPath) || XC.isChildOfOverflowingOverlayWidgets(t.targetPath)) { + const s = e.findAttribute(t.target, "widgetId"); + if (s) { + return t.fulfillOverlayWidget(s); + } else { + return t.fulfillUnknown(); + } + } + return null; + } + static k(e, t) { + if (t.target) { + const s = e.lastRenderData.lastViewCursorsRenderData; + for (const n of s) { + if (t.target === n.domNode) { + return t.fulfillContentText(n.position, null, { + mightBeForeignElement: false, + injectedText: null + }); + } + } + } + if (t.isInContentArea) { + const s = e.lastRenderData.lastViewCursorsRenderData; + const n = t.mouseContentHorizontalOffset; + const r = t.mouseVerticalOffset; + for (const o of s) { + if (n < o.contentLeft || n > o.contentLeft + o.width) { + continue; + } + const a = e.getVerticalOffsetForLineNumber(o.position.lineNumber); + if (a <= r && r <= a + o.height) { + return t.fulfillContentText(o.position, null, { + mightBeForeignElement: false, + injectedText: null + }); + } + } + } + return null; + } + static l(e, t) { + const s = e.getZoneAtCoord(t.mouseVerticalOffset); + if (s) { + const n = t.isInContentArea ? 8 : 5; + return t.fulfillViewZone(n, s.position, s); + } + return null; + } + static m(e, t) { + if (XC.isTextArea(t.targetPath)) { + if (e.lastRenderData.lastTextareaPosition) { + return t.fulfillContentText(e.lastRenderData.lastTextareaPosition, null, { + mightBeForeignElement: false, + injectedText: null + }); + } else { + return t.fulfillTextarea(); + } + } else { + return null; + } + } + static n(e, t) { + if (t.isInMarginArea) { + const s = e.getFullLineRangeAtCoord(t.mouseVerticalOffset); + const n = s.range.getStartPosition(); + let r = Math.abs(t.relativePos.x); + const o = { + isAfterLines: s.isAfterLines, + glyphMarginLeft: e.layoutInfo.glyphMarginLeft, + glyphMarginWidth: e.layoutInfo.glyphMarginWidth, + lineNumbersWidth: e.layoutInfo.lineNumbersWidth, + offsetX: r + }; + r -= e.layoutInfo.glyphMarginLeft; + if (r <= e.layoutInfo.glyphMarginWidth) { + const a = e.viewModel.coordinatesConverter.convertViewPositionToModelPosition(s.range.getStartPosition()); + const l = e.viewModel.glyphLanes.getLanesAtLine(a.lineNumber); + o.glyphMarginLane = l[Math.floor(r / e.lineHeight)]; + return t.fulfillMargin(2, n, s.range, o); + } + r -= e.layoutInfo.glyphMarginWidth; + if (r <= e.layoutInfo.lineNumbersWidth) { + return t.fulfillMargin(3, n, s.range, o); + } else { + r -= e.layoutInfo.lineNumbersWidth; + return t.fulfillMargin(4, n, s.range, o); + } + } + return null; + } + static o(e, t) { + if (!XC.isChildOfViewLines(t.targetPath)) { + return null; + } + if (e.isInTopPadding(t.mouseVerticalOffset)) { + return t.fulfillContentEmpty(new je(1, 1), N3t); + } + if (e.isAfterLines(t.mouseVerticalOffset) || e.isInBottomPadding(t.mouseVerticalOffset)) { + const n = e.viewModel.getLineCount(); + const r = e.viewModel.getLineMaxColumn(n); + return t.fulfillContentEmpty(new je(n, r), N3t); + } + if (XC.isStrictChildOfViewLines(t.targetPath)) { + const n = e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset); + if (e.viewModel.getLineLength(n) === 0) { + const o = e.getLineWidth(n); + const a = cpe(t.mouseContentHorizontalOffset - o); + return t.fulfillContentEmpty(new je(n, 1), a); + } + const r = e.getLineWidth(n); + if (t.mouseContentHorizontalOffset >= r) { + const o = cpe(t.mouseContentHorizontalOffset - r); + const a = new je(n, e.viewModel.getLineMaxColumn(n)); + return t.fulfillContentEmpty(a, o); + } + } else if (e.viewLinesGpu) { + const n = e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset); + if (e.viewModel.getLineLength(n) === 0) { + const a = e.getLineWidth(n); + const l = cpe(t.mouseContentHorizontalOffset - a); + return t.fulfillContentEmpty(new je(n, 1), l); + } + const r = e.getLineWidth(n); + if (t.mouseContentHorizontalOffset >= r) { + const a = cpe(t.mouseContentHorizontalOffset - r); + const l = new je(n, e.viewModel.getLineMaxColumn(n)); + return t.fulfillContentEmpty(l, a); + } + const o = e.viewLinesGpu.getPositionAtCoordinate(n, t.mouseContentHorizontalOffset); + if (o) { + const a = { + injectedText: null, + mightBeForeignElement: false + }; + return t.fulfillContentText(o, Z.fromPositions(o, o), a); + } + } + const s = t.hitTestResult.value; + if (s.type === 1) { + return dI.u(e, t, s.spanNode, s.position, s.injectedText); + } else if (t.wouldBenefitFromHitTestTargetSwitch) { + t.switchToHitTestTarget(); + return this.g(e, t); + } else { + return t.fulfillUnknown(); + } + } + static p(e, t) { + if (XC.isChildOfMinimap(t.targetPath)) { + const s = e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset); + const n = e.viewModel.getLineMaxColumn(s); + return t.fulfillScrollbar(new je(s, n)); + } + return null; + } + static q(e, t) { + if (XC.isChildOfScrollableElement(t.targetPath) && t.target && t.target.nodeType === 1) { + const s = t.target.className; + if (s && /\b(slider|scrollbar)\b/.test(s)) { + const n = e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset); + const r = e.viewModel.getLineMaxColumn(n); + return t.fulfillScrollbar(new je(n, r)); + } + } + return null; + } + static s(e, t) { + if (XC.isChildOfScrollableElement(t.targetPath)) { + const s = e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset); + const n = e.viewModel.getLineMaxColumn(s); + return t.fulfillScrollbar(new je(s, n)); + } + return null; + } + getMouseColumn(e) { + const t = this.c.configuration.options; + const s = t.get(151); + const n = this.c.viewLayout.getCurrentScrollLeft() + e.x - s.contentLeft; + return dI._getMouseColumn(n, t.get(52).typicalHalfwidthCharacterWidth); + } + static _getMouseColumn(e, t) { + if (e < 0) { + return 1; + } else { + return Math.round(e / t) + 1; + } + } + static u(e, t, s, n, r) { + const o = n.lineNumber; + const a = n.column; + const l = e.getLineWidth(o); + if (t.mouseContentHorizontalOffset > l) { + const y = cpe(t.mouseContentHorizontalOffset - l); + return t.fulfillContentEmpty(n, y); + } + const c = e.visibleRangeForPosition(o, a); + if (!c) { + return t.fulfillUnknown(n); + } + const u = c.left; + if (Math.abs(t.mouseContentHorizontalOffset - u) < 1) { + return t.fulfillContentText(n, null, { + mightBeForeignElement: !!r, + injectedText: r + }); + } + const d = []; + d.push({ + offset: c.left, + column: a + }); + if (a > 1) { + const y = e.visibleRangeForPosition(o, a - 1); + if (y) { + d.push({ + offset: y.left, + column: a - 1 + }); + } + } + const h = e.viewModel.getLineMaxColumn(o); + if (a < h) { + const y = e.visibleRangeForPosition(o, a + 1); + if (y) { + d.push({ + offset: y.left, + column: a + 1 + }); + } + } + d.sort((y, w) => y.offset - w.offset); + const g = t.pos.toClientCoordinates(Kt(e.viewDomNode)); + const p = s.getBoundingClientRect(); + const b = p.left <= g.clientX && g.clientX <= p.right; + let v = null; + for (let y = 1; y < d.length; y++) { + const w = d[y - 1]; + const C = d[y]; + if (w.offset <= t.mouseContentHorizontalOffset && t.mouseContentHorizontalOffset <= C.offset) { + v = new Z(o, w.column, o, C.column); + const S = Math.abs(w.offset - t.mouseContentHorizontalOffset); + const x = Math.abs(C.offset - t.mouseContentHorizontalOffset); + n = S < x ? new je(o, w.column) : new je(o, C.column); + break; + } + } + return t.fulfillContentText(n, v, { + mightBeForeignElement: !b || !!r, + injectedText: r + }); + } + static v(e, t) { + const s = e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset); + const n = e.getVerticalOffsetForLineNumber(s); + const r = n + e.lineHeight; + if (s !== e.viewModel.getLineCount() || !(t.mouseVerticalOffset > r)) { + const a = Math.floor((n + r) / 2); + let l = t.pos.y + (a - t.mouseVerticalOffset); + if (l <= t.editorPos.y) { + l = t.editorPos.y + 1; + } + if (l >= t.editorPos.y + t.editorPos.height) { + l = t.editorPos.y + t.editorPos.height - 1; + } + const c = new rpe(t.pos.x, l); + const u = this.w(e, c.toClientCoordinates(Kt(e.viewDomNode))); + if (u.type === 1) { + return u; + } + } + return this.w(e, t.pos.toClientCoordinates(Kt(e.viewDomNode))); + } + static w(e, t) { + const s = Zq(e.viewDomNode); + let n; + if (s) { + if (typeof s.caretRangeFromPoint === "undefined") { + n = uJn(s, t.clientX, t.clientY); + } else { + n = s.caretRangeFromPoint(t.clientX, t.clientY); + } + } else { + n = e.viewDomNode.ownerDocument.caretRangeFromPoint(t.clientX, t.clientY); + } + if (!n || !n.startContainer) { + return new g4(); + } + const r = n.startContainer; + if (r.nodeType === r.TEXT_NODE) { + const o = r.parentNode; + const a = o ? o.parentNode : null; + const l = a ? a.parentNode : null; + if ((l && l.nodeType === l.ELEMENT_NODE ? l.className : null) === F9.CLASS_NAME) { + return _j.createFromDOMInfo(e, o, n.startOffset); + } else { + return new g4(r.parentNode); + } + } else if (r.nodeType === r.ELEMENT_NODE) { + const o = r.parentNode; + const a = o ? o.parentNode : null; + if ((a && a.nodeType === a.ELEMENT_NODE ? a.className : null) === F9.CLASS_NAME) { + return _j.createFromDOMInfo(e, r, r.textContent.length); + } else { + return new g4(r); + } + } + return new g4(); + } + static z(e, t) { + const s = e.viewDomNode.ownerDocument.caretPositionFromPoint(t.clientX, t.clientY); + if (s.offsetNode.nodeType === s.offsetNode.TEXT_NODE) { + const n = s.offsetNode.parentNode; + const r = n ? n.parentNode : null; + const o = r ? r.parentNode : null; + if ((o && o.nodeType === o.ELEMENT_NODE ? o.className : null) === F9.CLASS_NAME) { + return _j.createFromDOMInfo(e, s.offsetNode.parentNode, s.offset); + } else { + return new g4(s.offsetNode.parentNode); + } + } + if (s.offsetNode.nodeType === s.offsetNode.ELEMENT_NODE) { + const n = s.offsetNode.parentNode; + const r = n && n.nodeType === n.ELEMENT_NODE ? n.className : null; + const o = n ? n.parentNode : null; + const a = o && o.nodeType === o.ELEMENT_NODE ? o.className : null; + if (r === F9.CLASS_NAME) { + const l = s.offsetNode.childNodes[Math.min(s.offset, s.offsetNode.childNodes.length - 1)]; + if (l) { + return _j.createFromDOMInfo(e, l, 0); + } + } else if (a === F9.CLASS_NAME) { + return _j.createFromDOMInfo(e, s.offsetNode, 0); + } + } + return new g4(s.offsetNode); + } + static A(e, t) { + const s = t.getLineContent(e.lineNumber); + const { + tabSize: n + } = t.model.getOptions(); + const r = aot.atomicPosition(s, e.column - 1, n, 2); + if (r !== -1) { + return new je(e.lineNumber, r + 1); + } else { + return e; + } + } + static doHitTest(e, t) { + let s = new g4(); + if (typeof e.viewDomNode.ownerDocument.caretRangeFromPoint == "function") { + s = this.v(e, t); + } else if (e.viewDomNode.ownerDocument.caretPositionFromPoint) { + s = this.z(e, t.pos.toClientCoordinates(Kt(e.viewDomNode))); + } + if (s.type === 1) { + const n = e.viewModel.getInjectedTextAt(s.position); + const r = e.viewModel.normalizePosition(s.position, 2); + if (n || !r.equals(s.position)) { + s = new R3t(r, s.spanNode, n); + } + } + return s; + } + }; + JZi = class JPe { + static { + this.c = null; + } + static getInstance() { + JPe.c ||= new JPe(); + return JPe.c; + } + constructor() { + this.f = {}; + this.g = document.createElement("canvas"); + } + getCharWidth(e, t) { + const s = e + t; + if (this.f[s]) { + return this.f[s]; + } + const n = this.g.getContext("2d"); + n.font = t; + const o = n.measureText(e).width; + this.f[s] = o; + return o; + } + }; + } +}); +function KZi(i) { + return (e, t, s) => { + let n = null; + let r = null; + if (typeof s.value == "function") { + n = "value"; + r = s.value; + } else if (typeof s.get == "function") { + n = "get"; + r = s.get; + } + if (!r || typeof t == "symbol") { + throw new Error("not supported"); + } + s[n] = i(r, t); + }; +} +function Hs(i, e, t) { + let s = null; + let n = null; + if (typeof t.value == "function") { + s = "value"; + n = t.value; + if (n.length !== 0) { + console.warn("Memoize should only be used in functions with zero parameters"); + } + } else if (typeof t.get == "function") { + s = "get"; + n = t.get; + } + if (!n) { + throw new Error("not supported"); + } + const r = `$memoize$${e}`; + t[s] = function (...o) { + if (!this.hasOwnProperty(r)) { + Object.defineProperty(this, r, { + configurable: false, + enumerable: false, + writable: false, + value: n.apply(this, o) + }); + } + return this[r]; + }; +} +function mb(i, e, t) { + return KZi((s, n) => { + const r = `$debounce$${n}`; + const o = `$debounce$result$${n}`; + return function (...a) { + this[o] ||= t ? t() : undefined; + clearTimeout(this[r]); + if (e) { + this[o] = e(this[o], ...a); + a = [this[o]]; + } + this[r] = setTimeout(() => { + s.apply(this, a); + this[o] = t ? t() : undefined; + }, i); + }; + }); +} +function Bj(i, e, t) { + return KZi((s, n) => { + const r = `$throttle$timer$${n}`; + const o = `$throttle$result$${n}`; + const a = `$throttle$lastRun$${n}`; + const l = `$throttle$pending$${n}`; + return function (...c) { + this[o] ||= t ? t() : undefined; + if (this[a] === null || this[a] === undefined) { + this[a] = -Number.MAX_VALUE; + } + if (e) { + this[o] = e(this[o], ...c); + } + if (this[l]) { + return; + } + const u = this[a] + i; + if (u <= Date.now()) { + this[a] = Date.now(); + s.apply(this, [this[o]]); + this[o] = t ? t() : undefined; + } else { + this[l] = true; + this[r] = setTimeout(() => { + this[l] = false; + this[a] = Date.now(); + s.apply(this, [this[o]]); + this[o] = t ? t() : undefined; + }, u - Date.now()); + } + }; + }); +} +var au = ue({ + "out-build/vs/base/common/decorators.js"() { + "use strict"; + } +}); +var ul; +var bd; +var hh = ue({ + "out-build/vs/base/browser/touch.js"() { + "use strict"; + + xe(); + fr(); + au(); + pe(); + q(); + Av(); + (function (i) { + i.Tap = "-monaco-gesturetap"; + i.Change = "-monaco-gesturechange"; + i.Start = "-monaco-gesturestart"; + i.End = "-monaco-gesturesend"; + i.Contextmenu = "-monaco-gesturecontextmenu"; + })(ul ||= {}); + bd = class Bk extends H { + static { + this.c = -0.005; + } + static { + this.g = 700; + } + static { + this.s = 400; + } + constructor() { + super(); + this.h = false; + this.j = new hp(); + this.m = new hp(); + this.q = {}; + this.n = null; + this.r = 0; + this.D(de.runAndSubscribe(xI, ({ + window: e, + disposables: t + }) => { + t.add(Ce(e.document, "touchstart", s => this.u(s), { + passive: false + })); + t.add(Ce(e.document, "touchend", s => this.w(e, s))); + t.add(Ce(e.document, "touchmove", s => this.G(s), { + passive: false + })); + }, { + window: xt, + disposables: this.B + })); + } + static addTarget(e) { + if (!Bk.isTouchDevice()) { + return H.None; + } + Bk.f ||= IL(new Bk()); + const t = Bk.f.j.push(e); + return Ue(t); + } + static ignoreTarget(e) { + if (!Bk.isTouchDevice()) { + return H.None; + } + Bk.f ||= IL(new Bk()); + const t = Bk.f.m.push(e); + return Ue(t); + } + static isTouchDevice() { + return "ontouchstart" in xt || navigator.maxTouchPoints > 0; + } + dispose() { + if (this.n) { + this.n.dispose(); + this.n = null; + } + super.dispose(); + } + u(e) { + const t = Date.now(); + if (this.n) { + this.n.dispose(); + this.n = null; + } + for (let s = 0, n = e.targetTouches.length; s < n; s++) { + const r = e.targetTouches.item(s); + this.q[r.identifier] = { + id: r.identifier, + initialTarget: r.target, + initialTimeStamp: t, + initialPageX: r.pageX, + initialPageY: r.pageY, + rollingTimestamps: [t], + rollingPageX: [r.pageX], + rollingPageY: [r.pageY] + }; + const o = this.z(ul.Start, r.target); + o.pageX = r.pageX; + o.pageY = r.pageY; + this.C(o); + } + if (this.h) { + e.preventDefault(); + e.stopPropagation(); + this.h = false; + } + } + w(e, t) { + const s = Date.now(); + const n = Object.keys(this.q).length; + for (let r = 0, o = t.changedTouches.length; r < o; r++) { + const a = t.changedTouches.item(r); + if (!this.q.hasOwnProperty(String(a.identifier))) { + console.warn("move of an UNKNOWN touch", a); + continue; + } + const l = this.q[a.identifier]; + const c = Date.now() - l.initialTimeStamp; + if (c < Bk.g && Math.abs(l.initialPageX - l.rollingPageX.at(-1)) < 30 && Math.abs(l.initialPageY - l.rollingPageY.at(-1)) < 30) { + const u = this.z(ul.Tap, l.initialTarget); + u.pageX = l.rollingPageX.at(-1); + u.pageY = l.rollingPageY.at(-1); + this.C(u); + } else if (c >= Bk.g && Math.abs(l.initialPageX - l.rollingPageX.at(-1)) < 30 && Math.abs(l.initialPageY - l.rollingPageY.at(-1)) < 30) { + const u = this.z(ul.Contextmenu, l.initialTarget); + u.pageX = l.rollingPageX.at(-1); + u.pageY = l.rollingPageY.at(-1); + this.C(u); + } else if (n === 1) { + const u = l.rollingPageX.at(-1); + const d = l.rollingPageY.at(-1); + const h = l.rollingTimestamps.at(-1) - l.rollingTimestamps[0]; + const g = u - l.rollingPageX[0]; + const p = d - l.rollingPageY[0]; + const b = [...this.j].filter(v => l.initialTarget instanceof Node && v.contains(l.initialTarget)); + this.F(e, b, s, Math.abs(g) / h, g > 0 ? 1 : -1, u, Math.abs(p) / h, p > 0 ? 1 : -1, d); + } + this.C(this.z(ul.End, l.initialTarget)); + delete this.q[a.identifier]; + } + if (this.h) { + t.preventDefault(); + t.stopPropagation(); + this.h = false; + } + } + z(e, t) { + const s = document.createEvent("CustomEvent"); + s.initEvent(e, false, true); + s.initialTarget = t; + s.tapCount = 0; + return s; + } + C(e) { + if (e.type === ul.Tap) { + const t = new Date().getTime(); + let s = 0; + if (t - this.r > Bk.s) { + s = 1; + } else { + s = 2; + } + this.r = t; + e.tapCount = s; + } else if (e.type === ul.Change || e.type === ul.Contextmenu) { + this.r = 0; + } + if (e.initialTarget instanceof Node) { + for (const s of this.m) { + if (s.contains(e.initialTarget)) { + return; + } + } + const t = []; + for (const s of this.j) { + if (s.contains(e.initialTarget)) { + let n = 0; + let r = e.initialTarget; + while (r && r !== s) { + n++; + r = r.parentElement; + } + t.push([n, s]); + } + } + t.sort((s, n) => s[0] - n[0]); + for (const [s, n] of t) { + n.dispatchEvent(e); + this.h = true; + } + } + } + F(e, t, s, n, r, o, a, l, c) { + this.n = Zc(e, () => { + const u = Date.now(); + const d = u - s; + let h = 0; + let g = 0; + let p = true; + n += Bk.c * d; + a += Bk.c * d; + if (n > 0) { + p = false; + h = r * n * d; + } + if (a > 0) { + p = false; + g = l * a * d; + } + const b = this.z(ul.Change); + b.translationX = h; + b.translationY = g; + t.forEach(v => v.dispatchEvent(b)); + if (!p) { + this.F(e, t, u, n, r, o + h, a, l, c + g); + } + }); + } + G(e) { + const t = Date.now(); + for (let s = 0, n = e.changedTouches.length; s < n; s++) { + const r = e.changedTouches.item(s); + if (!this.q.hasOwnProperty(String(r.identifier))) { + console.warn("end of an UNKNOWN touch", r); + continue; + } + const o = this.q[r.identifier]; + const a = this.z(ul.Change, o.initialTarget); + a.translationX = r.pageX - o.rollingPageX.at(-1); + a.translationY = r.pageY - o.rollingPageY.at(-1); + a.pageX = r.pageX; + a.pageY = r.pageY; + this.C(a); + if (o.rollingPageX.length > 3) { + o.rollingPageX.shift(); + o.rollingPageY.shift(); + o.rollingTimestamps.shift(); + } + o.rollingPageX.push(r.pageX); + o.rollingPageY.push(r.pageY); + o.rollingTimestamps.push(t); + } + if (this.h) { + e.preventDefault(); + e.stopPropagation(); + this.h = false; + } + } + }; + __decorate([Hs], bd, "isTouchDevice", null); + } +}); +var Gg; +var bb = ue({ + "out-build/vs/base/browser/ui/widget.js"() { + "use strict"; + + xe(); + _a(); + gd(); + hh(); + q(); + Gg = class extends H { + b(i, e) { + this.D(Ce(i, Oe.CLICK, t => e(new Xc(Kt(i), t)))); + } + f(i, e) { + this.D(Ce(i, Oe.MOUSE_DOWN, t => e(new Xc(Kt(i), t)))); + } + j(i, e) { + this.D(Ce(i, Oe.MOUSE_OVER, t => e(new Xc(Kt(i), t)))); + } + m(i, e) { + this.D(Ce(i, Oe.MOUSE_LEAVE, t => e(new Xc(Kt(i), t)))); + } + q(i, e) { + this.D(Ce(i, Oe.KEY_DOWN, t => e(new wr(t)))); + } + s(i, e) { + this.D(Ce(i, Oe.KEY_UP, t => e(new wr(t)))); + } + u(i, e) { + this.D(Ce(i, Oe.INPUT, e)); + } + z(i, e) { + this.D(Ce(i, Oe.BLUR, e)); + } + C(i, e) { + this.D(Ce(i, Oe.FOCUS, e)); + } + F(i, e) { + this.D(Ce(i, Oe.CHANGE, e)); + } + G(i) { + return bd.ignoreTarget(i); + } + }; + } +}); +var Uj; +var YZi; +var M3t = ue({ + "out-build/vs/base/browser/ui/scrollbar/scrollbarArrow.js"() { + "use strict"; + + jee(); + bb(); + nt(); + Rt(); + xe(); + Uj = 11; + YZi = class extends Gg { + constructor(i) { + super(); + this.a = i.onActivate; + this.bgDomNode = document.createElement("div"); + this.bgDomNode.className = "arrow-background"; + this.bgDomNode.style.position = "absolute"; + this.bgDomNode.style.width = i.bgWidth + "px"; + this.bgDomNode.style.height = i.bgHeight + "px"; + if (typeof i.top !== "undefined") { + this.bgDomNode.style.top = "0px"; + } + if (typeof i.left !== "undefined") { + this.bgDomNode.style.left = "0px"; + } + if (typeof i.bottom !== "undefined") { + this.bgDomNode.style.bottom = "0px"; + } + if (typeof i.right !== "undefined") { + this.bgDomNode.style.right = "0px"; + } + this.domNode = document.createElement("div"); + this.domNode.className = i.className; + this.domNode.classList.add(...le.asClassNameArray(i.icon)); + this.domNode.style.position = "absolute"; + this.domNode.style.width = Uj + "px"; + this.domNode.style.height = Uj + "px"; + if (typeof i.top !== "undefined") { + this.domNode.style.top = i.top + "px"; + } + if (typeof i.left !== "undefined") { + this.domNode.style.left = i.left + "px"; + } + if (typeof i.bottom !== "undefined") { + this.domNode.style.bottom = i.bottom + "px"; + } + if (typeof i.right !== "undefined") { + this.domNode.style.right = i.right + "px"; + } + this.h = this.D(new Sj()); + this.D(ko(this.bgDomNode, Oe.POINTER_DOWN, e => this.n(e))); + this.D(ko(this.domNode, Oe.POINTER_DOWN, e => this.n(e))); + this.c = this.D(new JB()); + this.g = this.D(new qC()); + } + n(i) { + if (!i.target || !(i.target instanceof Element)) { + return; + } + const e = () => { + this.c.cancelAndSet(() => this.a(), 1000 / 24, Kt(i)); + }; + this.a(); + this.c.cancel(); + this.g.cancelAndSet(e, 200); + this.h.startMonitoring(i.target, i.pointerId, i.buttons, t => {}, () => { + this.c.cancel(); + this.g.cancel(); + }); + i.preventDefault(); + } + }; + } +}); +var XZi; +var dJn = ue({ + "out-build/vs/base/browser/ui/scrollbar/scrollbarVisibilityController.js"() { + "use strict"; + + nt(); + q(); + XZi = class extends H { + constructor(i, e, t) { + super(); + this.a = i; + this.b = e; + this.c = t; + this.f = null; + this.m = false; + this.j = false; + this.g = false; + this.h = false; + this.n = this.D(new qC()); + } + setVisibility(i) { + if (this.a !== i) { + this.a = i; + this.r(); + } + } + setShouldBeVisible(i) { + this.g = i; + this.r(); + } + q() { + if (this.a === 2) { + return false; + } else if (this.a === 3) { + return true; + } else { + return this.g; + } + } + r() { + const i = this.q(); + if (this.h !== i) { + this.h = i; + this.ensureVisibility(); + } + } + setIsNeeded(i) { + if (this.j !== i) { + this.j = i; + this.ensureVisibility(); + } + } + setDomNode(i) { + this.f = i; + this.f.setClassName(this.c); + this.setShouldBeVisible(false); + } + ensureVisibility() { + if (!this.j) { + this.t(false); + return; + } + if (this.h) { + this.s(); + } else { + this.t(true); + } + } + s() { + if (!this.m) { + this.m = true; + this.n.setIfNotSet(() => { + this.f?.setClassName(this.b); + }, 0); + } + } + t(i) { + this.n.cancel(); + if (this.m) { + this.m = false; + this.f?.setClassName(this.c + (i ? " fade" : "")); + } + } + }; + } +}); +var QZi; +var A3t; +var ZZi = ue({ + "out-build/vs/base/browser/ui/scrollbar/abstractScrollbar.js"() { + "use strict"; + + xe(); + pf(); + jee(); + M3t(); + dJn(); + bb(); + rt(); + QZi = 140; + A3t = class extends Gg { + constructor(i) { + super(); + this.h = i.lazyRender; + this.a = i.host; + this.c = i.scrollable; + this.g = i.scrollByPage; + this.n = i.scrollbarState; + this.r = this.D(new XZi(i.visibility, "visible scrollbar " + i.extraScrollbarClassName, "invisible scrollbar " + i.extraScrollbarClassName)); + this.r.setIsNeeded(this.n.isNeeded()); + this.t = this.D(new Sj()); + this.w = true; + this.domNode = nc(document.createElement("div")); + this.domNode.setAttribute("role", "presentation"); + this.domNode.setAttribute("aria-hidden", "true"); + this.r.setDomNode(this.domNode); + this.domNode.setPosition("absolute"); + this.D(Ce(this.domNode.domNode, Oe.POINTER_DOWN, e => this.M(e))); + } + y(i) { + const e = this.D(new YZi(i)); + this.domNode.domNode.appendChild(e.bgDomNode); + this.domNode.domNode.appendChild(e.domNode); + } + H(i, e, t, s) { + this.slider = nc(document.createElement("div")); + this.slider.setClassName("slider"); + this.slider.setPosition("absolute"); + this.slider.setTop(i); + this.slider.setLeft(e); + if (typeof t == "number") { + this.slider.setWidth(t); + } + if (typeof s == "number") { + this.slider.setHeight(s); + } + this.slider.setLayerHinting(true); + this.slider.setContain("strict"); + this.domNode.domNode.appendChild(this.slider.domNode); + this.D(Ce(this.slider.domNode, Oe.POINTER_DOWN, n => { + if (n.button === 0) { + n.preventDefault(); + this.O(n); + } + })); + this.b(this.slider.domNode, n => { + if (n.leftButton) { + n.stopPropagation(); + } + }); + } + I(i) { + if (this.n.setVisibleSize(i)) { + this.r.setIsNeeded(this.n.isNeeded()); + this.w = true; + if (!this.h) { + this.render(); + } + } + return this.w; + } + J(i) { + if (this.n.setScrollSize(i)) { + this.r.setIsNeeded(this.n.isNeeded()); + this.w = true; + if (!this.h) { + this.render(); + } + } + return this.w; + } + L(i) { + if (this.n.setScrollPosition(i)) { + this.r.setIsNeeded(this.n.isNeeded()); + this.w = true; + if (!this.h) { + this.render(); + } + } + return this.w; + } + beginReveal() { + this.r.setShouldBeVisible(true); + } + beginHide() { + this.r.setShouldBeVisible(false); + } + render() { + if (this.w) { + this.w = false; + this.Q(this.n.getRectangleLargeSize(), this.n.getRectangleSmallSize()); + this.R(this.n.getSliderSize(), this.n.getArrowSize() + this.n.getSliderPosition()); + } + } + M(i) { + if (i.target === this.domNode.domNode) { + this.N(i); + } + } + delegatePointerDown(i) { + const e = this.domNode.domNode.getClientRects()[0].top; + const t = e + this.n.getSliderPosition(); + const s = e + this.n.getSliderPosition() + this.n.getSliderSize(); + const n = this.U(i); + if (t <= n && n <= s) { + if (i.button === 0) { + i.preventDefault(); + this.O(i); + } + } else { + this.N(i); + } + } + N(i) { + let e; + let t; + if (i.target === this.domNode.domNode && typeof i.offsetX == "number" && typeof i.offsetY == "number") { + e = i.offsetX; + t = i.offsetY; + } else { + const n = sd(this.domNode.domNode); + e = i.pageX - n.left; + t = i.pageY - n.top; + } + const s = this.S(e, t); + this.P(this.g ? this.n.getDesiredScrollPositionFromOffsetPaged(s) : this.n.getDesiredScrollPositionFromOffset(s)); + if (i.button === 0) { + i.preventDefault(); + this.O(i); + } + } + O(i) { + if (!i.target || !(i.target instanceof Element)) { + return; + } + const e = this.U(i); + const t = this.W(i); + const s = this.n.clone(); + this.slider.toggleClassName("active", true); + this.t.startMonitoring(i.target, i.pointerId, i.buttons, n => { + const r = this.W(n); + const o = Math.abs(r - t); + if (ln && o > QZi) { + this.P(s.getScrollPosition()); + return; + } + const l = this.U(n) - e; + this.P(s.getDesiredScrollPositionFromDelta(l)); + }, () => { + this.slider.toggleClassName("active", false); + this.a.onDragEnd(); + }); + this.a.onDragStart(); + } + P(i) { + const e = {}; + this.writeScrollPosition(e, i); + this.c.setScrollPositionNow(e); + } + updateScrollbarSize(i) { + this.X(i); + this.n.setScrollbarSize(i); + this.w = true; + if (!this.h) { + this.render(); + } + } + isNeeded() { + return this.n.isNeeded(); + } + }; + } +}); +var ees; +var mat; +var $3t = ue({ + "out-build/vs/base/browser/ui/scrollbar/scrollbarState.js"() { + "use strict"; + + ees = 20; + mat = class L3i { + constructor(e, t, s, n, r, o) { + this.a = Math.round(t); + this.b = Math.round(s); + this.c = Math.round(e); + this.d = n; + this.e = r; + this.f = o; + this.g = 0; + this.h = false; + this.i = 0; + this.j = 0; + this.k = 0; + this.m(); + } + clone() { + return new L3i(this.c, this.a, this.b, this.d, this.e, this.f); + } + setVisibleSize(e) { + const t = Math.round(e); + if (this.d !== t) { + this.d = t; + this.m(); + return true; + } else { + return false; + } + } + setScrollSize(e) { + const t = Math.round(e); + if (this.e !== t) { + this.e = t; + this.m(); + return true; + } else { + return false; + } + } + setScrollPosition(e) { + const t = Math.round(e); + if (this.f !== t) { + this.f = t; + this.m(); + return true; + } else { + return false; + } + } + setScrollbarSize(e) { + this.a = Math.round(e); + } + setOppositeScrollbarSize(e) { + this.b = Math.round(e); + } + static l(e, t, s, n, r) { + const o = Math.max(0, s - e); + const a = Math.max(0, o - t * 2); + const l = n > 0 && n > s; + if (!l) { + return { + computedAvailableSize: Math.round(o), + computedIsNeeded: l, + computedSliderSize: Math.round(a), + computedSliderRatio: 0, + computedSliderPosition: 0 + }; + } + const c = Math.round(Math.max(ees, Math.floor(s * a / n))); + const u = (a - c) / (n - s); + const d = r * u; + return { + computedAvailableSize: Math.round(o), + computedIsNeeded: l, + computedSliderSize: Math.round(c), + computedSliderRatio: u, + computedSliderPosition: Math.round(d) + }; + } + m() { + const e = L3i.l(this.b, this.c, this.d, this.e, this.f); + this.g = e.computedAvailableSize; + this.h = e.computedIsNeeded; + this.i = e.computedSliderSize; + this.j = e.computedSliderRatio; + this.k = e.computedSliderPosition; + } + getArrowSize() { + return this.c; + } + getScrollPosition() { + return this.f; + } + getRectangleLargeSize() { + return this.g; + } + getRectangleSmallSize() { + return this.a; + } + isNeeded() { + return this.h; + } + getSliderSize() { + return this.i; + } + getSliderPosition() { + return this.k; + } + getDesiredScrollPositionFromOffset(e) { + if (!this.h) { + return 0; + } + const t = e - this.c - this.i / 2; + return Math.round(t / this.j); + } + getDesiredScrollPositionFromOffsetPaged(e) { + if (!this.h) { + return 0; + } + const t = e - this.c; + let s = this.f; + if (t < this.k) { + s -= this.d; + } else { + s += this.d; + } + return s; + } + getDesiredScrollPositionFromDelta(e) { + if (!this.h) { + return 0; + } + const t = this.k + e; + return Math.round(t / this.j); + } + }; + } +}); +var tes; +var hJn = ue({ + "out-build/vs/base/browser/ui/scrollbar/horizontalScrollbar.js"() { + "use strict"; + + gd(); + ZZi(); + M3t(); + $3t(); + He(); + tes = class extends A3t { + constructor(i, e, t) { + const s = i.getScrollDimensions(); + const n = i.getCurrentScrollPosition(); + super({ + lazyRender: e.lazyRender, + host: t, + scrollbarState: new mat(e.horizontalHasArrows ? e.arrowSize : 0, e.horizontal === 2 ? 0 : e.horizontalScrollbarSize, e.vertical === 2 ? 0 : e.verticalScrollbarSize, s.width, s.scrollWidth, n.scrollLeft), + visibility: e.horizontal, + extraScrollbarClassName: "horizontal", + scrollable: i, + scrollByPage: e.scrollByPage + }); + if (e.horizontalHasArrows) { + const r = (e.arrowSize - Uj) / 2; + const o = (e.horizontalScrollbarSize - Uj) / 2; + this.y({ + className: "scra", + icon: A.scrollbarButtonLeft, + top: o, + left: r, + bottom: undefined, + right: undefined, + bgWidth: e.arrowSize, + bgHeight: e.horizontalScrollbarSize, + onActivate: () => this.a.onMouseWheel(new BB(null, 1, 0)) + }); + this.y({ + className: "scra", + icon: A.scrollbarButtonRight, + top: o, + left: undefined, + bottom: undefined, + right: r, + bgWidth: e.arrowSize, + bgHeight: e.horizontalScrollbarSize, + onActivate: () => this.a.onMouseWheel(new BB(null, -1, 0)) + }); + } + this.H(Math.floor((e.horizontalScrollbarSize - e.horizontalSliderSize) / 2), 0, undefined, e.horizontalSliderSize); + } + R(i, e) { + this.slider.setWidth(i); + this.slider.setLeft(e); + } + Q(i, e) { + this.domNode.setWidth(i); + this.domNode.setHeight(e); + this.domNode.setLeft(0); + this.domNode.setBottom(0); + } + onDidScroll(i) { + this.w = this.J(i.scrollWidth) || this.w; + this.w = this.L(i.scrollLeft) || this.w; + this.w = this.I(i.width) || this.w; + return this.w; + } + S(i, e) { + return i; + } + U(i) { + return i.pageX; + } + W(i) { + return i.pageY; + } + X(i) { + this.slider.setHeight(i); + } + writeScrollPosition(i, e) { + i.scrollLeft = e; + } + updateOptions(i) { + this.updateScrollbarSize(i.horizontal === 2 ? 0 : i.horizontalScrollbarSize); + this.n.setOppositeScrollbarSize(i.vertical === 2 ? 0 : i.verticalScrollbarSize); + this.r.setVisibility(i.horizontal); + this.g = i.scrollByPage; + } + }; + } +}); +var ies; +var fJn = ue({ + "out-build/vs/base/browser/ui/scrollbar/verticalScrollbar.js"() { + "use strict"; + + gd(); + ZZi(); + M3t(); + $3t(); + He(); + ies = class extends A3t { + constructor(i, e, t) { + const s = i.getScrollDimensions(); + const n = i.getCurrentScrollPosition(); + super({ + lazyRender: e.lazyRender, + host: t, + scrollbarState: new mat(e.verticalHasArrows ? e.arrowSize : 0, e.vertical === 2 ? 0 : e.verticalScrollbarSize, 0, s.height, s.scrollHeight, n.scrollTop), + visibility: e.vertical, + extraScrollbarClassName: "vertical", + scrollable: i, + scrollByPage: e.scrollByPage + }); + if (e.verticalHasArrows) { + const r = (e.arrowSize - Uj) / 2; + const o = (e.verticalScrollbarSize - Uj) / 2; + this.y({ + className: "scra", + icon: A.scrollbarButtonUp, + top: r, + left: o, + bottom: undefined, + right: undefined, + bgWidth: e.verticalScrollbarSize, + bgHeight: e.arrowSize, + onActivate: () => this.a.onMouseWheel(new BB(null, 0, 1)) + }); + this.y({ + className: "scra", + icon: A.scrollbarButtonDown, + top: undefined, + left: o, + bottom: r, + right: undefined, + bgWidth: e.verticalScrollbarSize, + bgHeight: e.arrowSize, + onActivate: () => this.a.onMouseWheel(new BB(null, 0, -1)) + }); + } + this.H(0, Math.floor((e.verticalScrollbarSize - e.verticalSliderSize) / 2), e.verticalSliderSize, undefined); + } + R(i, e) { + this.slider.setHeight(i); + this.slider.setTop(e); + } + Q(i, e) { + this.domNode.setWidth(e); + this.domNode.setHeight(i); + this.domNode.setRight(0); + this.domNode.setTop(0); + } + onDidScroll(i) { + this.w = this.J(i.scrollHeight) || this.w; + this.w = this.L(i.scrollTop) || this.w; + this.w = this.I(i.height) || this.w; + return this.w; + } + S(i, e) { + return e; + } + U(i) { + return i.pageY; + } + W(i) { + return i.pageX; + } + X(i) { + this.slider.setWidth(i); + } + writeScrollPosition(i, e) { + i.scrollTop = e; + } + updateOptions(i) { + this.updateScrollbarSize(i.vertical === 2 ? 0 : i.verticalScrollbarSize); + this.n.setOppositeScrollbarSize(0); + this.r.setVisibility(i.vertical); + this.g = i.scrollByPage; + } + }; + } +}); +function F3t(i, e) { + const t = e - i; + return function (s) { + return i + t * mJn(s); + }; +} +function gJn(i, e, t) { + return function (s) { + if (s < t) { + return i(s / t); + } else { + return e((s - t) / (1 - t)); + } + }; +} +function pJn(i) { + return Math.pow(i, 3); +} +function mJn(i) { + return 1 - pJn(1 - i); +} +var ses; +var nes; +var p4; +var O3t; +var _3t; +var O9 = ue({ + "out-build/vs/base/common/scrollable.js"() { + "use strict"; + + pe(); + q(); + (function (i) { + i[i.Auto = 1] = "Auto"; + i[i.Hidden = 2] = "Hidden"; + i[i.Visible = 3] = "Visible"; + })(ses ||= {}); + nes = class R3i { + constructor(e, t, s, n, r, o, a) { + this.c = e; + this._scrollStateBrand = undefined; + if (this.c) { + t = t | 0; + s = s | 0; + n = n | 0; + r = r | 0; + o = o | 0; + a = a | 0; + } + this.rawScrollLeft = n; + this.rawScrollTop = a; + if (t < 0) { + t = 0; + } + if (n + t > s) { + n = s - t; + } + if (n < 0) { + n = 0; + } + if (r < 0) { + r = 0; + } + if (a + r > o) { + a = o - r; + } + if (a < 0) { + a = 0; + } + this.width = t; + this.scrollWidth = s; + this.scrollLeft = n; + this.height = r; + this.scrollHeight = o; + this.scrollTop = a; + } + 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 R3i(this.c, typeof e.width !== "undefined" ? e.width : this.width, typeof e.scrollWidth !== "undefined" ? e.scrollWidth : this.scrollWidth, t ? this.rawScrollLeft : this.scrollLeft, typeof e.height !== "undefined" ? e.height : this.height, typeof e.scrollHeight !== "undefined" ? e.scrollHeight : this.scrollHeight, t ? this.rawScrollTop : this.scrollTop); + } + withScrollPosition(e) { + return new R3i(this.c, this.width, this.scrollWidth, typeof e.scrollLeft !== "undefined" ? e.scrollLeft : this.rawScrollLeft, this.height, this.scrollHeight, typeof e.scrollTop !== "undefined" ? e.scrollTop : this.rawScrollTop); + } + createScrollEvent(e, t) { + const s = this.width !== e.width; + const n = this.scrollWidth !== e.scrollWidth; + const r = this.scrollLeft !== e.scrollLeft; + const o = this.height !== e.height; + const a = this.scrollHeight !== e.scrollHeight; + const l = this.scrollTop !== e.scrollTop; + return { + inSmoothScrolling: t, + oldWidth: e.width, + oldScrollWidth: e.scrollWidth, + oldScrollLeft: e.scrollLeft, + width: this.width, + scrollWidth: this.scrollWidth, + scrollLeft: this.scrollLeft, + oldHeight: e.height, + oldScrollHeight: e.scrollHeight, + oldScrollTop: e.scrollTop, + height: this.height, + scrollHeight: this.scrollHeight, + scrollTop: this.scrollTop, + widthChanged: s, + scrollWidthChanged: n, + scrollLeftChanged: r, + heightChanged: o, + scrollHeightChanged: a, + scrollTopChanged: l + }; + } + }; + p4 = class extends H { + constructor(i) { + super(); + this.m = i; + this._scrollableBrand = undefined; + this.j = this.D(new B()); + this.onScroll = this.j.event; + this.c = this.m.smoothScrollDuration; + this.f = this.m.scheduleAtNextAnimationFrame; + this.g = new nes(this.m.forceIntegerValues, 0, 0, 0, 0, 0, 0); + this.h = null; + } + dispose() { + if (this.h) { + this.h.dispose(); + this.h = null; + } + super.dispose(); + } + setSmoothScrollDuration(i) { + this.c = i; + } + validateScrollPosition(i) { + return this.g.withScrollPosition(i); + } + getScrollDimensions() { + return this.g; + } + setScrollDimensions(i, e) { + const t = this.g.withScrollDimensions(i, e); + this.q(t, !!this.h); + this.h?.acceptScrollDimensions(this.g); + } + getFutureScrollPosition() { + if (this.h) { + return this.h.to; + } else { + return this.g; + } + } + getCurrentScrollPosition() { + return this.g; + } + setScrollPositionNow(i) { + const e = this.g.withScrollPosition(i); + if (this.h) { + this.h.dispose(); + this.h = null; + } + this.q(e, false); + } + setScrollPositionSmooth(i, e) { + if (this.c === 0) { + return this.setScrollPositionNow(i); + } + if (this.h) { + i = { + scrollLeft: typeof i.scrollLeft === "undefined" ? this.h.to.scrollLeft : i.scrollLeft, + scrollTop: typeof i.scrollTop === "undefined" ? this.h.to.scrollTop : i.scrollTop + }; + const t = this.g.withScrollPosition(i); + if (this.h.to.scrollLeft === t.scrollLeft && this.h.to.scrollTop === t.scrollTop) { + return; + } + let s; + if (e) { + s = new _3t(this.h.from, t, this.h.startTime, this.h.duration); + } else { + s = this.h.combine(this.g, t, this.c); + } + this.h.dispose(); + this.h = s; + } else { + const t = this.g.withScrollPosition(i); + this.h = _3t.start(this.g, t, this.c); + } + this.h.animationFrameDisposable = this.f(() => { + if (this.h) { + this.h.animationFrameDisposable = null; + this.n(); + } + }); + } + hasPendingScrollAnimation() { + return !!this.h; + } + n() { + if (!this.h) { + return; + } + const i = this.h.tick(); + const e = this.g.withScrollPosition(i); + this.q(e, true); + if (this.h) { + if (i.isDone) { + this.h.dispose(); + this.h = null; + return; + } + this.h.animationFrameDisposable = this.f(() => { + if (this.h) { + this.h.animationFrameDisposable = null; + this.n(); + } + }); + } + } + q(i, e) { + const t = this.g; + if (!t.equals(i)) { + if (this.m.stickyScrollHorizontal) { + if ((this.m.stickyScrollHorizontal === "right" || typeof this.m.stickyScrollHorizontal == "function" && this.m.stickyScrollHorizontal() === "right") && i.scrollLeft + i.width >= i.scrollWidth) { + i = i.withScrollPosition({ + scrollLeft: Infinity + }); + } + if ((this.m.stickyScrollHorizontal === "left" || typeof this.m.stickyScrollHorizontal == "function" && this.m.stickyScrollHorizontal() === "left") && i.scrollLeft <= 0) { + i = i.withScrollPosition({ + scrollLeft: -Infinity + }); + } + } + if (this.m.stickyScrollVertical) { + if ((this.m.stickyScrollVertical === "down" || typeof this.m.stickyScrollVertical == "function" && this.m.stickyScrollVertical() === "down") && i.scrollTop + i.height >= i.scrollHeight) { + i = i.withScrollPosition({ + scrollTop: Infinity + }); + } + if ((this.m.stickyScrollVertical === "up" || typeof this.m.stickyScrollVertical == "function" && this.m.stickyScrollVertical() === "up") && i.scrollTop <= 0) { + i = i.withScrollPosition({ + scrollTop: -Infinity + }); + } + } + this.g = i; + this.j.fire(this.g.createScrollEvent(t, e)); + } + } + getScrollHeight() { + return this.g.scrollHeight; + } + }; + O3t = class { + constructor(i, e, t) { + this.scrollLeft = i; + this.scrollTop = e; + this.isDone = t; + } + }; + _3t = class N3i { + constructor(e, t, s, n) { + this.from = e; + this.to = t; + this.duration = n; + this.startTime = s; + this.animationFrameDisposable = null; + this.e(); + } + e() { + this.c = this.f(this.from.scrollLeft, this.to.scrollLeft, this.to.width); + this.d = this.f(this.from.scrollTop, this.to.scrollTop, this.to.height); + } + f(e, t, s) { + if (Math.abs(e - t) > s * 2.5) { + let r; + let o; + if (e < t) { + r = e + s * 0.75; + o = t - s * 0.75; + } else { + r = e - s * 0.75; + o = t + s * 0.75; + } + return gJn(F3t(e, r), F3t(o, t), 0.33); + } + return F3t(e, t); + } + dispose() { + if (this.animationFrameDisposable !== null) { + this.animationFrameDisposable.dispose(); + this.animationFrameDisposable = null; + } + } + acceptScrollDimensions(e) { + this.to = e.withScrollPosition(this.to); + this.e(); + } + tick() { + return this.g(Date.now()); + } + g(e) { + const t = (e - this.startTime) / this.duration; + if (t < 1) { + const s = this.c(t); + const n = this.d(t); + return new O3t(s, n, false); + } + return new O3t(this.to.scrollLeft, this.to.scrollTop, true); + } + combine(e, t, s) { + return N3i.start(e, t, s); + } + static start(e, t, s) { + s = s + 10; + const n = Date.now() - 10; + return new N3i(e, t, n, s); + } + }; + } +}); +var bJn = ue({ + "out-build/vs/base/browser/ui/scrollbar/media/scrollbars.css"() {} +}); +function vJn(i) { + const e = { + lazyRender: typeof i.lazyRender !== "undefined" ? i.lazyRender : false, + className: typeof i.className !== "undefined" ? i.className : "", + useShadows: typeof i.useShadows !== "undefined" ? i.useShadows : true, + handleMouseWheel: typeof i.handleMouseWheel !== "undefined" ? i.handleMouseWheel : true, + ignoreVerticalScrolling: typeof i.ignoreVerticalScrolling !== "undefined" ? i.ignoreVerticalScrolling : false, + flipAxes: typeof i.flipAxes !== "undefined" ? i.flipAxes : false, + consumeMouseWheelIfScrollbarIsNeeded: typeof i.consumeMouseWheelIfScrollbarIsNeeded !== "undefined" ? i.consumeMouseWheelIfScrollbarIsNeeded : false, + alwaysConsumeMouseWheel: typeof i.alwaysConsumeMouseWheel !== "undefined" ? i.alwaysConsumeMouseWheel : false, + scrollYToX: typeof i.scrollYToX !== "undefined" ? i.scrollYToX : false, + mouseWheelScrollSensitivity: typeof i.mouseWheelScrollSensitivity !== "undefined" ? i.mouseWheelScrollSensitivity : 1, + fastScrollSensitivity: typeof i.fastScrollSensitivity !== "undefined" ? i.fastScrollSensitivity : 5, + scrollPredominantAxis: typeof i.scrollPredominantAxis !== "undefined" ? i.scrollPredominantAxis : true, + mouseWheelSmoothScroll: typeof i.mouseWheelSmoothScroll !== "undefined" ? i.mouseWheelSmoothScroll : true, + arrowSize: typeof i.arrowSize !== "undefined" ? i.arrowSize : 11, + listenOnDomNode: typeof i.listenOnDomNode !== "undefined" ? i.listenOnDomNode : null, + horizontal: typeof i.horizontal !== "undefined" ? i.horizontal : 1, + horizontalScrollbarSize: typeof i.horizontalScrollbarSize !== "undefined" ? i.horizontalScrollbarSize : 10, + horizontalSliderSize: typeof i.horizontalSliderSize !== "undefined" ? i.horizontalSliderSize : 0, + horizontalHasArrows: typeof i.horizontalHasArrows !== "undefined" ? i.horizontalHasArrows : false, + vertical: typeof i.vertical !== "undefined" ? i.vertical : 1, + verticalScrollbarSize: typeof i.verticalScrollbarSize !== "undefined" ? i.verticalScrollbarSize : 10, + verticalHasArrows: typeof i.verticalHasArrows !== "undefined" ? i.verticalHasArrows : false, + verticalSliderSize: typeof i.verticalSliderSize !== "undefined" ? i.verticalSliderSize : 0, + scrollByPage: typeof i.scrollByPage !== "undefined" ? i.scrollByPage : false + }; + e.horizontalSliderSize = typeof i.horizontalSliderSize !== "undefined" ? i.horizontalSliderSize : e.horizontalScrollbarSize; + e.verticalSliderSize = typeof i.verticalSliderSize !== "undefined" ? i.verticalSliderSize : e.verticalScrollbarSize; + if (Gt) { + e.className += " mac"; + } + return e; +} +var res; +var B3t; +var U3t; +var oes; +var lte; +var upe; +var bat; +var cte; +var aes; +var _w; +var Kg = ue({ + "out-build/vs/base/browser/ui/scrollbar/scrollableElement.js"() { + "use strict"; + + hc(); + xe(); + pf(); + gd(); + hJn(); + fJn(); + bb(); + nt(); + pe(); + q(); + rt(); + O9(); + bJn(); + res = 500; + B3t = 50; + U3t = true; + oes = class { + constructor(i, e, t) { + this.timestamp = i; + this.deltaX = e; + this.deltaY = t; + this.score = 0; + } + }; + lte = class _Fn { + static { + this.INSTANCE = new _Fn(); + } + constructor() { + this.a = 5; + this.b = []; + this.c = -1; + this.d = -1; + } + isPhysicalMouseWheel() { + if (this.c === -1 && this.d === -1) { + return false; + } + let e = 1; + let t = 0; + let s = 1; + let n = this.d; + do { + const r = n === this.c ? e : Math.pow(2, -s); + e -= r; + t += this.b[n].score * r; + if (n === this.c) { + break; + } + n = (this.a + n - 1) % this.a; + s++; + } while (true); + return t <= 0.5; + } + acceptStandardWheelEvent(e) { + if (Jq) { + const t = Kt(e.browserEvent); + const s = vI(t); + this.accept(Date.now(), e.deltaX * s, e.deltaY * s); + } else { + this.accept(Date.now(), e.deltaX, e.deltaY); + } + } + accept(e, t, s) { + let n = null; + const r = new oes(e, t, s); + if (this.c === -1 && this.d === -1) { + this.b[0] = r; + this.c = 0; + this.d = 0; + } else { + n = this.b[this.d]; + this.d = (this.d + 1) % this.a; + if (this.d === this.c) { + this.c = (this.c + 1) % this.a; + } + this.b[this.d] = r; + } + r.score = this.f(r, n); + } + f(e, t) { + if (Math.abs(e.deltaX) > 0 && Math.abs(e.deltaY) > 0) { + return 1; + } + let s = 0.5; + if (!this.g(e.deltaX) || !this.g(e.deltaY)) { + s += 0.25; + } + if (t) { + const n = Math.abs(e.deltaX); + const r = Math.abs(e.deltaY); + const o = Math.abs(t.deltaX); + const a = Math.abs(t.deltaY); + const l = Math.max(Math.min(n, o), 1); + const c = Math.max(Math.min(r, a), 1); + const u = Math.max(n, o); + const d = Math.max(r, a); + if (u % l === 0 && d % c === 0) { + s -= 0.5; + } + } + return Math.min(Math.max(s, 0), 1); + } + g(e) { + return Math.abs(Math.round(e) - e) < 0.01; + } + }; + upe = class extends Gg { + get options() { + return this.a; + } + constructor(i, e, t) { + super(); + this.O = this.D(new B()); + this.onScroll = this.O.event; + this.P = this.D(new B()); + this.onWillScroll = this.P.event; + i.style.overflow = "hidden"; + this.a = vJn(e); + this.c = t; + this.D(this.c.onScroll(r => { + this.P.fire(r); + this.S(r); + this.O.fire(r); + })); + const s = { + onMouseWheel: r => this.R(r), + onDragStart: () => this.W(), + onDragEnd: () => this.X() + }; + this.g = this.D(new ies(this.c, this.a, s)); + this.h = this.D(new tes(this.c, this.a, s)); + this.n = document.createElement("div"); + this.n.className = "monaco-scrollable-element " + this.a.className; + this.n.setAttribute("role", "presentation"); + this.n.style.position = "relative"; + const n = e.horizontal && e.vertical ? "both" : e.horizontal ? "horizontal" : "vertical"; + if (n === "both") { + this.n.style.overflow = "hidden"; + } else if (n === "horizontal") { + this.n.style.overflowX = "hidden"; + } else { + this.n.style.overflowY = "hidden"; + } + this.n.appendChild(i); + this.n.appendChild(this.h.domNode.domNode); + this.n.appendChild(this.g.domNode.domNode); + if (this.a.useShadows) { + this.r = nc(document.createElement("div")); + this.r.setClassName("shadow"); + this.n.appendChild(this.r.domNode); + this.t = nc(document.createElement("div")); + this.t.setClassName("shadow"); + this.n.appendChild(this.t.domNode); + this.w = nc(document.createElement("div")); + this.w.setClassName("shadow"); + this.n.appendChild(this.w.domNode); + } else { + this.r = null; + this.t = null; + this.w = null; + } + this.y = this.a.listenOnDomNode || this.n; + this.H = []; + this.Q(this.a.handleMouseWheel); + this.j(this.y, r => this.Z(r)); + this.m(this.y, r => this.Y(r)); + this.L = this.D(new qC()); + this.I = false; + this.J = false; + this.M = true; + this.N = true; + } + dispose() { + this.H = si(this.H); + super.dispose(); + } + getDomNode() { + return this.n; + } + getOverviewRulerLayoutInfo() { + return { + parent: this.n, + insertBefore: this.g.domNode.domNode + }; + } + delegateVerticalScrollbarPointerDown(i) { + this.g.delegatePointerDown(i); + } + getScrollDimensions() { + return this.c.getScrollDimensions(); + } + setScrollDimensions(i) { + this.c.setScrollDimensions(i, false); + } + updateClassName(i) { + this.a.className = i; + if (Gt) { + this.a.className += " mac"; + } + this.n.className = "monaco-scrollable-element " + this.a.className; + } + updateOptions(i) { + if (typeof i.handleMouseWheel !== "undefined") { + this.a.handleMouseWheel = i.handleMouseWheel; + this.Q(this.a.handleMouseWheel); + } + if (typeof i.ignoreVerticalScrolling !== "undefined") { + this.a.ignoreVerticalScrolling = i.ignoreVerticalScrolling; + } + if (typeof i.mouseWheelScrollSensitivity !== "undefined") { + this.a.mouseWheelScrollSensitivity = i.mouseWheelScrollSensitivity; + } + if (typeof i.fastScrollSensitivity !== "undefined") { + this.a.fastScrollSensitivity = i.fastScrollSensitivity; + } + if (typeof i.scrollPredominantAxis !== "undefined") { + this.a.scrollPredominantAxis = i.scrollPredominantAxis; + } + if (typeof i.horizontal !== "undefined") { + this.a.horizontal = i.horizontal; + } + if (typeof i.vertical !== "undefined") { + this.a.vertical = i.vertical; + } + if (typeof i.horizontalScrollbarSize !== "undefined") { + this.a.horizontalScrollbarSize = i.horizontalScrollbarSize; + } + if (typeof i.verticalScrollbarSize !== "undefined") { + this.a.verticalScrollbarSize = i.verticalScrollbarSize; + } + if (typeof i.scrollByPage !== "undefined") { + this.a.scrollByPage = i.scrollByPage; + } + this.h.updateOptions(this.a); + this.g.updateOptions(this.a); + if (!this.a.lazyRender) { + this.U(); + } + } + setRevealOnScroll(i) { + this.N = i; + } + delegateScrollFromMouseWheelEvent(i) { + this.R(new BB(i)); + } + Q(i) { + if (this.H.length > 0 !== i && (this.H = si(this.H), i)) { + const t = s => { + this.R(new BB(s)); + }; + this.H.push(Ce(this.y, Oe.MOUSE_WHEEL, t, { + passive: false + })); + } + } + R(i) { + if (i.browserEvent?.defaultPrevented) { + return; + } + const e = lte.INSTANCE; + if (U3t) { + e.acceptStandardWheelEvent(i); + } + let t = false; + if (i.deltaY || i.deltaX) { + let n = i.deltaY * this.a.mouseWheelScrollSensitivity; + let r = i.deltaX * this.a.mouseWheelScrollSensitivity; + if (this.a.scrollPredominantAxis) { + if (this.a.scrollYToX && r + n === 0) { + r = n = 0; + } else if (Math.abs(n) >= Math.abs(r)) { + r = 0; + } else { + n = 0; + } + } + if (this.a.ignoreVerticalScrolling === true) { + n = 0; + } + if (this.a.flipAxes) { + [n, r] = [r, n]; + } + const o = !Gt && i.browserEvent && i.browserEvent.shiftKey; + if ((this.a.scrollYToX || o) && !r) { + r = n; + n = 0; + } + if (i.browserEvent && i.browserEvent.altKey) { + r = r * this.a.fastScrollSensitivity; + n = n * this.a.fastScrollSensitivity; + } + const a = this.c.getFutureScrollPosition(); + let l = {}; + if (n) { + const c = B3t * n; + const u = a.scrollTop - (c < 0 ? Math.floor(c) : Math.ceil(c)); + this.g.writeScrollPosition(l, u); + } + if (r) { + const c = B3t * r; + const u = a.scrollLeft - (c < 0 ? Math.floor(c) : Math.ceil(c)); + this.h.writeScrollPosition(l, u); + } + l = this.c.validateScrollPosition(l); + if (a.scrollLeft !== l.scrollLeft || a.scrollTop !== l.scrollTop) { + if (U3t && this.a.mouseWheelSmoothScroll && e.isPhysicalMouseWheel()) { + this.c.setScrollPositionSmooth(l); + } else { + this.c.setScrollPositionNow(l); + } + t = true; + } + } + let s = t; + if (!s && this.a.alwaysConsumeMouseWheel) { + s = true; + } + if (!s && this.a.consumeMouseWheelIfScrollbarIsNeeded && (this.g.isNeeded() || this.h.isNeeded())) { + s = true; + } + if (s) { + i.preventDefault(); + i.stopPropagation(); + } + } + S(i) { + this.M = this.h.onDidScroll(i) || this.M; + this.M = this.g.onDidScroll(i) || this.M; + if (this.a.useShadows) { + this.M = true; + } + if (this.N) { + this.$(); + } + if (!this.a.lazyRender) { + this.U(); + } + } + renderNow() { + if (!this.a.lazyRender) { + throw new Error("Please use `lazyRender` together with `renderNow`!"); + } + this.U(); + } + U() { + if (this.M && (this.M = false, this.h.render(), this.g.render(), this.a.useShadows)) { + const i = this.c.getCurrentScrollPosition(); + const e = i.scrollTop > 0; + const t = i.scrollLeft > 0; + const s = t ? " left" : ""; + const n = e ? " top" : ""; + const r = t || e ? " top-left-corner" : ""; + this.r.setClassName(`shadow${s}`); + this.t.setClassName(`shadow${n}`); + this.w.setClassName(`shadow${r}${n}${s}`); + } + } + W() { + this.I = true; + this.$(); + } + X() { + this.I = false; + this.ab(); + } + Y(i) { + this.J = false; + this.ab(); + } + Z(i) { + this.J = true; + this.$(); + } + $() { + this.g.beginReveal(); + this.h.beginReveal(); + this.bb(); + } + ab() { + if (!this.J && !this.I) { + this.g.beginHide(); + this.h.beginHide(); + } + } + bb() { + if (!this.J && !this.I) { + this.L.cancelAndSet(() => this.ab(), res); + } + } + }; + bat = class extends upe { + constructor(i, e) { + e = e || {}; + e.mouseWheelSmoothScroll = false; + const t = new p4({ + forceIntegerValues: true, + smoothScrollDuration: 0, + scheduleAtNextAnimationFrame: s => Zc(Kt(i), s) + }); + super(i, e, t); + this.D(t); + } + setScrollPosition(i) { + this.c.setScrollPositionNow(i); + } + getScrollPosition() { + return this.c.getCurrentScrollPosition(); + } + }; + cte = class extends upe { + constructor(i, e, t) { + super(i, e, t); + } + setScrollPosition(i) { + if (i.reuseAnimation) { + this.c.setScrollPositionSmooth(i, i.reuseAnimation); + } else { + this.c.setScrollPositionNow(i); + } + } + getScrollPosition() { + return this.c.getCurrentScrollPosition(); + } + }; + aes = class extends upe { + constructor(i, e, t) { + super(i, e, t); + } + }; + _w = class extends upe { + constructor(i, e) { + e = e || {}; + e.mouseWheelSmoothScroll = false; + const t = new p4({ + forceIntegerValues: false, + smoothScrollDuration: 0, + scheduleAtNextAnimationFrame: s => Zc(Kt(i), s) + }); + super(i, e, t); + this.D(t); + this.cb = i; + this.D(this.onScroll(s => { + if (s.scrollTopChanged) { + this.cb.scrollTop = s.scrollTop; + } + if (s.scrollLeftChanged) { + this.cb.scrollLeft = s.scrollLeft; + } + })); + this.scanDomNode(); + } + setScrollPosition(i) { + this.c.setScrollPositionNow(i); + } + getScrollPosition() { + return this.c.getCurrentScrollPosition(); + } + scanDomNode() { + this.setScrollDimensions({ + width: this.cb.clientWidth, + scrollWidth: this.cb.scrollWidth, + height: this.cb.clientHeight, + scrollHeight: this.cb.scrollHeight + }); + this.setScrollPosition({ + scrollLeft: this.cb.scrollLeft, + scrollTop: this.cb.scrollTop + }); + } + }; + } +}); +var vat; +var les; +var ces; +var ues; +var des; +var yJn = ue({ + "out-build/vs/editor/browser/controller/mouseHandler.js"() { + "use strict"; + + xe(); + gd(); + q(); + rt(); + GZi(); + ope(); + Vot(); + Rs(); + ua(); + Mj(); + Kg(); + vat = class extends A9 { + constructor(i, e, t) { + super(); + this.n = null; + this.a = i; + this.b = e; + this.c = t; + this.f = new pat(this.a, t); + this.g = this.D(new les(this.a, this.b, this.c, this.f, (r, o) => this.s(r, o), r => this.u(r))); + this.h = -1; + this.j = this.a.configuration.options.get(151).height; + const s = new xZi(this.c.viewDomNode); + this.D(s.onContextMenu(this.c.viewDomNode, r => this.w(r, true))); + this.D(s.onMouseMove(this.c.viewDomNode, r => { + this.z(r); + this.n ||= Ce(this.c.viewDomNode.ownerDocument, "mousemove", o => { + if (!this.c.viewDomNode.contains(o.target)) { + this.C(new h4(o, false, this.c.viewDomNode)); + } + }); + })); + this.D(s.onMouseUp(this.c.viewDomNode, r => this.F(r))); + this.D(s.onMouseLeave(this.c.viewDomNode, r => this.C(r))); + let n = 0; + this.D(s.onPointerDown(this.c.viewDomNode, (r, o) => { + n = o; + })); + this.D(Ce(this.c.viewDomNode, Oe.POINTER_UP, r => { + this.g.onPointerUp(); + })); + this.D(s.onMouseDown(this.c.viewDomNode, r => this.G(r, n))); + this.r(); + this.a.addEventHandler(this); + } + r() { + const i = lte.INSTANCE; + let e = 0; + let t = AT.getZoomLevel(); + let s = false; + let n = 0; + const r = a => { + this.b.emitMouseWheel(a); + if (!this.a.configuration.options.get(77)) { + return; + } + const l = new BB(a); + i.acceptStandardWheelEvent(l); + if (i.isPhysicalMouseWheel()) { + if (o(a)) { + const c = AT.getZoomLevel(); + const u = l.deltaY > 0 ? 1 : -1; + AT.setZoomLevel(c + u); + l.preventDefault(); + l.stopPropagation(); + } + } else { + if (Date.now() - e > 50) { + t = AT.getZoomLevel(); + s = o(a); + n = 0; + } + e = Date.now(); + n += l.deltaY; + if (s) { + AT.setZoomLevel(t + n / 5); + l.preventDefault(); + l.stopPropagation(); + } + } + }; + this.D(Ce(this.c.viewDomNode, Oe.MOUSE_WHEEL, r, { + capture: true, + passive: false + })); + function o(a) { + if (Gt) { + return (a.metaKey || a.ctrlKey) && !a.shiftKey && !a.altKey; + } else { + return a.ctrlKey && !a.metaKey && !a.shiftKey && !a.altKey; + } + } + } + dispose() { + this.a.removeEventHandler(this); + if (this.n) { + this.n.dispose(); + this.n = null; + } + super.dispose(); + } + onConfigurationChanged(i) { + if (i.hasChanged(151)) { + const e = this.a.configuration.options.get(151).height; + if (this.j !== e) { + this.j = e; + this.g.onHeightChanged(); + } + } + return false; + } + onCursorStateChanged(i) { + this.g.onCursorStateChanged(i); + return false; + } + onFocusChanged(i) { + return false; + } + getTargetAtClientPoint(i, e) { + const s = new y3t(i, e).toPageCoordinates(Kt(this.c.viewDomNode)); + const n = b3t(this.c.viewDomNode); + if (s.y < n.y || s.y > n.y + n.height || s.x < n.x || s.x > n.x + n.width) { + return null; + } + const r = v3t(this.c.viewDomNode, n, s); + return this.f.createMouseTarget(this.c.getLastRenderData(), n, s, r, null); + } + s(i, e) { + let t = i.target; + if (!this.c.viewDomNode.contains(t)) { + const s = Zq(this.c.viewDomNode); + if (s) { + t = s.elementsFromPoint(i.posx, i.posy).find(n => this.c.viewDomNode.contains(n)); + } + } + return this.f.createMouseTarget(this.c.getLastRenderData(), i.editorPos, i.pos, i.relativePos, e ? t : null); + } + u(i) { + return this.f.getMouseColumn(i.relativePos); + } + w(i, e) { + this.b.emitContextMenu({ + event: i, + target: this.s(i, e) + }); + } + z(i) { + if (!this.f.mouseTargetIsWidget(i)) { + i.preventDefault(); + } + if (!this.g.isActive() && !(i.timestamp < this.h)) { + this.b.emitMouseMove({ + event: i, + target: this.s(i, true) + }); + } + } + C(i) { + if (this.n) { + this.n.dispose(); + this.n = null; + } + this.h = new Date().getTime(); + this.b.emitMouseLeave({ + event: i, + target: null + }); + } + F(i) { + this.b.emitMouseUp({ + event: i, + target: this.s(i, true) + }); + } + G(i, e) { + const t = this.s(i, true); + const s = t.type === 6 || t.type === 7; + const n = t.type === 2 || t.type === 3 || t.type === 4; + const r = t.type === 3; + const o = this.a.configuration.options.get(114); + const a = t.type === 8 || t.type === 5; + const l = t.type === 9; + let c = i.leftButton || i.middleButton; + if (Gt && i.leftButton && i.ctrlKey) { + c = false; + } + const u = () => { + i.preventDefault(); + this.c.focusTextArea(); + }; + if (c && (s || r && o)) { + u(); + this.g.start(t.type, i, e); + } else if (n) { + i.preventDefault(); + } else if (a) { + const d = t.detail; + if (c && this.c.shouldSuppressMouseDownOnViewZone(d.viewZoneId)) { + u(); + this.g.start(t.type, i, e); + i.preventDefault(); + } + } else if (l && this.c.shouldSuppressMouseDownOnWidget(t.detail)) { + u(); + i.preventDefault(); + } + this.b.emitMouseDown({ + event: i, + target: t + }); + } + H(i) { + this.b.emitMouseWheel(i); + } + }; + les = class extends H { + constructor(i, e, t, s, n, r) { + super(); + this.n = i; + this.q = e; + this.r = t; + this.s = s; + this.a = n; + this.b = r; + this.c = this.D(new EZi(this.r.viewDomNode)); + this.f = this.D(new ces(this.n, this.r, this.s, (o, a, l) => this.G(o, a, l))); + this.g = new des(); + this.h = new Vs(1, 1, 1, 1); + this.j = false; + this.m = null; + } + dispose() { + super.dispose(); + } + isActive() { + return this.j; + } + u(i) { + this.m = i; + this.g.setModifiers(i); + const e = this.C(i, false); + if (e) { + if (this.g.isDragAndDrop) { + this.q.emitMouseDrag({ + event: i, + target: e + }); + } else if (e.type === 13 && (e.outsidePosition === "above" || e.outsidePosition === "below")) { + this.f.start(e, i); + } else { + this.f.stop(); + this.G(e, true, 1); + } + } + } + start(i, e, t) { + this.m = e; + this.g.setStartedOnLineNumbers(i === 3); + this.g.setStartButtons(e); + this.g.setModifiers(e); + const s = this.C(e, true); + if (!s || !s.position) { + return; + } + this.g.trySetCount(e.detail, s.position); + e.detail = this.g.count; + const n = this.n.configuration.options; + if (!n.get(96) && n.get(35) && !n.get(22) && !this.g.altKey && e.detail < 2 && !this.j && !this.h.isEmpty() && s.type === 6 && s.position && this.h.containsPosition(s.position)) { + this.g.isDragAndDrop = true; + this.j = true; + this.c.startMonitoring(this.r.viewLinesDomNode, t, e.buttons, r => this.u(r), r => { + const o = this.C(this.m, false); + if (QS(r)) { + this.q.emitMouseDropCanceled(); + } else { + this.q.emitMouseDrop({ + event: this.m, + target: o ? this.a(this.m, true) : null + }); + } + this.w(); + }); + return; + } + this.g.isDragAndDrop = false; + this.G(s, e.shiftKey, 1); + if (!this.j) { + this.j = true; + this.c.startMonitoring(this.r.viewLinesDomNode, t, e.buttons, r => this.u(r), () => this.w()); + } + } + w() { + this.j = false; + this.f.stop(); + } + onHeightChanged() { + this.c.stopMonitoring(); + } + onPointerUp() { + this.c.stopMonitoring(); + } + onCursorStateChanged(i) { + this.h = i.selections[0]; + } + z(i) { + const e = i.editorPos; + const t = this.n.viewModel; + const s = this.n.viewLayout; + const n = this.b(i); + if (i.posy < e.y) { + const o = e.y - i.posy; + const a = Math.max(s.getCurrentScrollTop() - o, 0); + const l = gat.getZoneAtCoord(this.n, a); + if (l) { + const u = this.F(l); + if (u) { + return H0.createOutsideEditor(n, u, "above", o); + } + } + const c = s.getLineNumberAtVerticalOffset(a); + return H0.createOutsideEditor(n, new je(c, 1), "above", o); + } + if (i.posy > e.y + e.height) { + const o = i.posy - e.y - e.height; + const a = s.getCurrentScrollTop() + i.relativePos.y; + const l = gat.getZoneAtCoord(this.n, a); + if (l) { + const u = this.F(l); + if (u) { + return H0.createOutsideEditor(n, u, "below", o); + } + } + const c = s.getLineNumberAtVerticalOffset(a); + return H0.createOutsideEditor(n, new je(c, t.getLineMaxColumn(c)), "below", o); + } + const r = s.getLineNumberAtVerticalOffset(s.getCurrentScrollTop() + i.relativePos.y); + if (i.posx < e.x) { + const o = e.x - i.posx; + return H0.createOutsideEditor(n, new je(r, 1), "left", o); + } + if (i.posx > e.x + e.width) { + const o = i.posx - e.x - e.width; + return H0.createOutsideEditor(n, new je(r, t.getLineMaxColumn(r)), "right", o); + } + return null; + } + C(i, e) { + const t = this.z(i); + if (t) { + return t; + } + const s = this.a(i, e); + if (!s.position) { + return null; + } + if (s.type === 8 || s.type === 5) { + const r = this.F(s.detail); + if (r) { + return H0.createViewZone(s.type, s.element, s.mouseColumn, r, s.detail); + } + } + return s; + } + F(i) { + const e = new je(this.h.selectionStartLineNumber, this.h.selectionStartColumn); + const t = i.positionBefore; + const s = i.positionAfter; + if (t && s) { + if (t.isBefore(e)) { + return t; + } else { + return s; + } + } else { + return null; + } + } + G(i, e, t) { + if (i.position) { + this.q.dispatchMouse({ + position: i.position, + mouseColumn: i.mouseColumn, + startedOnLineNumbers: this.g.startedOnLineNumbers, + revealType: t, + inSelectionMode: e, + mouseDownCount: this.g.count, + altKey: this.g.altKey, + ctrlKey: this.g.ctrlKey, + metaKey: this.g.metaKey, + shiftKey: this.g.shiftKey, + leftButton: this.g.leftButton, + middleButton: this.g.middleButton, + onInjectedText: i.type === 6 && i.detail.injectedText !== null + }); + } + } + }; + ces = class extends H { + constructor(i, e, t, s) { + super(); + this.b = i; + this.c = e; + this.f = t; + this.g = s; + this.a = null; + } + dispose() { + super.dispose(); + this.stop(); + } + start(i, e) { + if (this.a) { + this.a.setPosition(i, e); + } else { + this.a = new ues(this.b, this.c, this.f, this.g, i, e); + } + } + stop() { + if (this.a) { + this.a.dispose(); + this.a = null; + } + } + }; + ues = class extends H { + constructor(i, e, t, s, n, r) { + super(); + this.g = i; + this.h = e; + this.j = t; + this.m = s; + this.a = n; + this.b = r; + this.c = Date.now(); + this.f = Zc(Kt(r.browserEvent), () => this.r()); + } + dispose() { + this.f.dispose(); + super.dispose(); + } + setPosition(i, e) { + this.a = i; + this.b = e; + } + n() { + const i = Date.now(); + const e = i - this.c; + this.c = i; + return e; + } + q() { + const i = this.g.configuration.options.get(68); + const e = this.g.configuration.options.get(151).height / i; + const t = this.a.outsideDistance / i; + if (t <= 1.5) { + return Math.max(30, e * (1 + t)); + } else if (t <= 3) { + return Math.max(60, e * (2 + t)); + } else { + return Math.max(200, e * (7 + t)); + } + } + r() { + const i = this.g.configuration.options.get(68); + const e = this.q(); + const t = this.n(); + const s = e * (t / 1000) * i; + const n = this.a.outsidePosition === "above" ? -s : s; + this.g.viewModel.viewLayout.deltaScrollNow(0, n); + this.h.renderNow(); + const r = this.g.viewLayout.getLinesViewportData(); + const o = this.a.outsidePosition === "above" ? r.startLineNumber : r.endLineNumber; + let a; + { + const l = b3t(this.h.viewDomNode); + const c = this.g.configuration.options.get(151).horizontalScrollbarHeight; + const u = new rpe(this.b.pos.x, l.y + l.height - c - 0.1); + const d = v3t(this.h.viewDomNode, l, u); + a = this.j.createMouseTarget(this.h.getLastRenderData(), l, u, d, null); + } + if (!a.position || a.position.lineNumber !== o) { + if (this.a.outsidePosition === "above") { + a = H0.createOutsideEditor(this.a.mouseColumn, new je(o, 1), "above", this.a.outsideDistance); + } else { + a = H0.createOutsideEditor(this.a.mouseColumn, new je(o, this.g.viewModel.getLineMaxColumn(o)), "below", this.a.outsideDistance); + } + } + this.m(a, true, 2); + this.f = Zc(Kt(a.element), () => this.r()); + } + }; + des = class BFn { + static { + this.a = 400; + } + get altKey() { + return this.b; + } + get ctrlKey() { + return this.c; + } + get metaKey() { + return this.d; + } + get shiftKey() { + return this.f; + } + get leftButton() { + return this.g; + } + get middleButton() { + return this.h; + } + get startedOnLineNumbers() { + return this.i; + } + constructor() { + this.b = false; + this.c = false; + this.d = false; + this.f = false; + this.g = false; + this.h = false; + this.i = false; + this.j = null; + this.k = 0; + this.l = 0; + this.m = 0; + this.isDragAndDrop = false; + } + get count() { + return this.l; + } + setModifiers(e) { + this.b = e.altKey; + this.c = e.ctrlKey; + this.d = e.metaKey; + this.f = e.shiftKey; + } + setStartButtons(e) { + this.g = e.leftButton; + this.h = e.middleButton; + } + setStartedOnLineNumbers(e) { + this.i = e; + } + trySetCount(e, t) { + const s = new Date().getTime(); + if (s - this.m > BFn.a) { + e = 1; + } + this.m = s; + if (e > this.l + 1) { + e = this.l + 1; + } + if (this.j && this.j.equals(t)) { + this.k++; + } else { + this.k = 1; + } + this.j = t; + this.l = Math.min(e, this.k); + } + }; + } +}); +var Co; +var q0 = ue({ + "out-build/vs/base/browser/event.js"() { + "use strict"; + + pe(); + Co = class { + get event() { + return this.a.event; + } + constructor(i, e, t) { + const s = n => this.a.fire(n); + this.a = new B({ + onWillAddFirstListener: () => i.addEventListener(e, s, t), + onDidRemoveLastListener: () => i.removeEventListener(e, s, t) + }); + } + dispose() { + this.a.dispose(); + } + }; + } +}); +function hes(i, e, t, s) { + const n = i.getPlainTextToCopy(e, t, ln); + const r = i.model.getEOL(); + const o = t && e.length === 1 && e[0].isEmpty(); + const a = Array.isArray(n) ? n : null; + const l = Array.isArray(n) ? n.join(r) : n; + let c; + let u = null; + if (yat.forceCopyWithSyntaxHighlighting || s && l.length < 65536) { + const h = i.getRichTextToCopy(e, t); + if (h) { + c = h.html; + u = h.mode; + } + } + return { + isFromEmptySelection: o, + multicursorText: a, + text: l, + html: c, + mode: u + }; +} +var ute; +var yat; +var dte; +var dpe = ue({ + "out-build/vs/editor/browser/controller/editContext/clipboardUtils.js"() { + "use strict"; + + rt(); + Jb(); + ute = class UFn { + static { + this.INSTANCE = new UFn(); + } + constructor() { + this.a = null; + } + set(e, t) { + this.a = { + lastCopiedValue: e, + data: t + }; + } + get(e) { + if (this.a && this.a.lastCopiedValue === e) { + return this.a.data; + } else { + this.a = null; + return null; + } + } + }; + yat = { + forceCopyWithSyntaxHighlighting: false + }; + dte = { + getTextData(i) { + const e = i.getData(pl.text); + let t = null; + const s = i.getData("vscode-editor-data"); + if (typeof s == "string") { + try { + t = JSON.parse(s); + if (t.version !== 1) { + t = null; + } + } catch {} + } + if (e.length === 0 && t === null && i.files.length > 0) { + return [Array.prototype.slice.call(i.files, 0).map(r => r.name).join(` +`), null]; + } else { + return [e, t]; + } + }, + setTextData(i, e, t, s) { + i.setData(pl.text, e); + if (typeof t == "string") { + i.setData("text/html", t); + } + i.setData("vscode-editor-data", JSON.stringify(s)); + } + }; + } +}); +var RI; +var QC; +var fes = ue({ + "out-build/vs/editor/browser/controller/editContext/textArea/textAreaEditContextState.js"() { + "use strict"; + + $i(); + RI = false; + QC = class GPe { + static { + this.EMPTY = new GPe("", 0, 0, null, undefined); + } + constructor(e, t, s, n, r) { + this.value = e; + this.selectionStart = t; + this.selectionEnd = s; + this.selection = n; + this.newlineCountBeforeSelection = r; + } + toString() { + return `[ <${this.value}>, selectionStart: ${this.selectionStart}, selectionEnd: ${this.selectionEnd}]`; + } + static readFromTextArea(e, t) { + const s = e.getValue(); + const n = e.getSelectionStart(); + const r = e.getSelectionEnd(); + let o; + if (t) { + const a = s.substring(0, n); + const l = t.value.substring(0, t.selectionStart); + if (a === l) { + o = t.newlineCountBeforeSelection; + } + } + return new GPe(s, n, r, null, o); + } + collapseSelection() { + if (this.selectionStart === this.value.length) { + return this; + } else { + return new GPe(this.value, this.value.length, this.value.length, null, undefined); + } + } + isWrittenToTextArea(e, t) { + const s = this.value === e.getValue(); + if (t) { + return this.selectionStart === e.getSelectionStart() && this.selectionEnd === e.getSelectionEnd() && s; + } else { + return s; + } + } + writeToTextArea(e, t, s) { + if (RI) { + console.log(`writeToTextArea ${e}: ${this.toString()}`); + } + t.setValue(e, this.value); + if (s) { + t.setSelectionRange(e, this.selectionStart, this.selectionEnd); + } + } + deduceEditorPosition(e) { + if (e <= this.selectionStart) { + const n = this.value.substring(e, this.selectionStart); + return this.a(this.selection?.getStartPosition() ?? null, n, -1); + } + if (e >= this.selectionEnd) { + const n = this.value.substring(this.selectionEnd, e); + return this.a(this.selection?.getEndPosition() ?? null, n, 1); + } + const t = this.value.substring(this.selectionStart, e); + if (t.indexOf("…") === -1) { + return this.a(this.selection?.getStartPosition() ?? null, t, 1); + } + const s = this.value.substring(e, this.selectionEnd); + return this.a(this.selection?.getEndPosition() ?? null, s, -1); + } + a(e, t, s) { + let n = 0; + let r = -1; + while ((r = t.indexOf(` +`, r + 1)) !== -1) { + n++; + } + return [e, s * t.length, n]; + } + static deduceInput(e, t, s) { + if (!e) { + return { + text: "", + replacePrevCharCnt: 0, + replaceNextCharCnt: 0, + positionDelta: 0 + }; + } + if (RI) { + console.log("------------------------deduceInput"); + console.log(`PREVIOUS STATE: ${e.toString()}`); + console.log(`CURRENT STATE: ${t.toString()}`); + } + const n = Math.min(LL(e.value, t.value), e.selectionStart, t.selectionStart); + const r = Math.min(VZ(e.value, t.value), e.value.length - e.selectionEnd, t.value.length - t.selectionEnd); + const o = e.value.substring(n, e.value.length - r); + const a = t.value.substring(n, t.value.length - r); + const l = e.selectionStart - n; + const c = e.selectionEnd - n; + const u = t.selectionStart - n; + const d = t.selectionEnd - n; + if (RI) { + console.log(`AFTER DIFFING PREVIOUS STATE: <${o}>, selectionStart: ${l}, selectionEnd: ${c}`); + console.log(`AFTER DIFFING CURRENT STATE: <${a}>, selectionStart: ${u}, selectionEnd: ${d}`); + } + if (u === d) { + const g = e.selectionStart - n; + if (RI) { + console.log(`REMOVE PREVIOUS: ${g} chars`); + } + return { + text: a, + replacePrevCharCnt: g, + replaceNextCharCnt: 0, + positionDelta: 0 + }; + } + const h = c - l; + return { + text: a, + replacePrevCharCnt: h, + replaceNextCharCnt: 0, + positionDelta: 0 + }; + } + static deduceAndroidCompositionInput(e, t) { + if (!e) { + return { + text: "", + replacePrevCharCnt: 0, + replaceNextCharCnt: 0, + positionDelta: 0 + }; + } + if (RI) { + console.log("------------------------deduceAndroidCompositionInput"); + console.log(`PREVIOUS STATE: ${e.toString()}`); + console.log(`CURRENT STATE: ${t.toString()}`); + } + if (e.value === t.value) { + return { + text: "", + replacePrevCharCnt: 0, + replaceNextCharCnt: 0, + positionDelta: t.selectionEnd - e.selectionEnd + }; + } + const s = Math.min(LL(e.value, t.value), e.selectionEnd); + const n = Math.min(VZ(e.value, t.value), e.value.length - e.selectionEnd); + const r = e.value.substring(s, e.value.length - n); + const o = t.value.substring(s, t.value.length - n); + const a = e.selectionStart - s; + const l = e.selectionEnd - s; + const c = t.selectionStart - s; + const u = t.selectionEnd - s; + if (RI) { + console.log(`AFTER DIFFING PREVIOUS STATE: <${r}>, selectionStart: ${a}, selectionEnd: ${l}`); + console.log(`AFTER DIFFING CURRENT STATE: <${o}>, selectionStart: ${c}, selectionEnd: ${u}`); + } + return { + text: o, + replacePrevCharCnt: l, + replaceNextCharCnt: r.length - l, + positionDelta: u - o.length + }; + } + static fromScreenReaderContentState(e) { + return new GPe(e.value, e.selectionStart, e.selectionEnd, e.selection, e.newlineCountBeforeSelection); + } + }; + } +}); +var wat; +var ges; +var Cat; +var pes; +var mes = ue({ + "out-build/vs/editor/browser/controller/editContext/textArea/textAreaEditContextInput.js"() { + "use strict"; + + hc(); + xe(); + q0(); + _a(); + B8t(); + nt(); + pe(); + q(); + $i(); + ua(); + Ho(); + Zt(); + dpe(); + fes(); + (function (i) { + i.Tap = "-monaco-textarea-synthetic-tap"; + })(wat ||= {}); + ges = class { + constructor() { + this.a = 0; + } + handleCompositionUpdate(i) { + i = i || ""; + const e = { + text: i, + replacePrevCharCnt: this.a, + replaceNextCharCnt: 0, + positionDelta: 0 + }; + this.a = i.length; + return e; + } + }; + Cat = class extends H { + get textAreaState() { + return this.u; + } + constructor(e, t, s, n, r, o) { + super(); + this.C = e; + this.F = t; + this.G = s; + this.H = n; + this.I = r; + this.J = o; + this.a = this.D(new B()); + this.onFocus = this.a.event; + this.b = this.D(new B()); + this.onBlur = this.b.event; + this.c = this.D(new B()); + this.onKeyDown = this.c.event; + this.f = this.D(new B()); + this.onKeyUp = this.f.event; + this.g = this.D(new B()); + this.onCut = this.g.event; + this.h = this.D(new B()); + this.onPaste = this.h.event; + this.j = this.D(new B()); + this.onType = this.j.event; + this.m = this.D(new B()); + this.onCompositionStart = this.m.event; + this.n = this.D(new B()); + this.onCompositionUpdate = this.n.event; + this.q = this.D(new B()); + this.onCompositionEnd = this.q.event; + this.r = this.D(new B()); + this.onSelectionChangeRequest = this.r.event; + this.t = this.D(new ki()); + this.s = this.D(new Vn(() => this.g.fire(), 0)); + this.u = QC.EMPTY; + this.w = null; + if (this.I.isScreenReaderOptimized()) { + this.writeNativeTextAreaContent("ctor"); + } + this.D(de.runAndSubscribe(this.I.onDidChangeScreenReaderOptimized, () => { + if (this.I.isScreenReaderOptimized() && !this.t.value) { + this.t.value = this.D(new Vn(() => this.writeNativeTextAreaContent("asyncFocusGain"), 0)); + } else { + this.t.clear(); + } + })); + this.y = false; + this.z = null; + let a = null; + this.D(this.F.onKeyDown(l => { + const c = new wr(l); + if (c.keyCode === 114 || this.z && c.keyCode === 1) { + c.stopPropagation(); + } + if (c.equals(9)) { + c.preventDefault(); + } + a = c; + this.c.fire(c); + })); + this.D(this.F.onKeyUp(l => { + const c = new wr(l); + this.f.fire(c); + })); + this.D(this.F.onCompositionStart(l => { + if (RI) { + console.log("[compositionstart]", l); + } + const c = new ges(); + if (this.z) { + this.z = c; + return; + } + this.z = c; + if (this.G === 2 && a && a.equals(114) && this.u.selectionStart === this.u.selectionEnd && this.u.selectionStart > 0 && this.u.value.substr(this.u.selectionStart - 1, 1) === l.data && (a.code === "ArrowRight" || a.code === "ArrowLeft")) { + if (RI) { + console.log("[compositionstart] Handling long press case on macOS + arrow key", l); + } + c.handleCompositionUpdate("x"); + this.m.fire({ + data: l.data + }); + return; + } + if (this.H.isAndroid) { + this.m.fire({ + data: l.data + }); + return; + } + this.m.fire({ + data: l.data + }); + })); + this.D(this.F.onCompositionUpdate(l => { + if (RI) { + console.log("[compositionupdate]", l); + } + const c = this.z; + if (!c) { + return; + } + if (this.H.isAndroid) { + const d = QC.readFromTextArea(this.F, this.u); + const h = QC.deduceAndroidCompositionInput(this.u, d); + this.u = d; + this.j.fire(h); + this.n.fire(l); + return; + } + const u = c.handleCompositionUpdate(l.data); + this.u = QC.readFromTextArea(this.F, this.u); + this.j.fire(u); + this.n.fire(l); + })); + this.D(this.F.onCompositionEnd(l => { + if (RI) { + console.log("[compositionend]", l); + } + const c = this.z; + if (!c) { + return; + } + this.z = null; + if (this.H.isAndroid) { + const d = QC.readFromTextArea(this.F, this.u); + const h = QC.deduceAndroidCompositionInput(this.u, d); + this.u = d; + this.j.fire(h); + this.q.fire(); + return; + } + const u = c.handleCompositionUpdate(l.data); + this.u = QC.readFromTextArea(this.F, this.u); + this.j.fire(u); + this.q.fire(); + })); + this.D(this.F.onInput(l => { + if (RI) { + console.log("[input]", l); + } + this.F.setIgnoreSelectionChangeTime("received input event"); + if (this.z) { + return; + } + const c = QC.readFromTextArea(this.F, this.u); + const u = QC.deduceInput(this.u, c, this.G === 2); + if (u.replacePrevCharCnt !== 0 || u.text.length !== 1 || !jb(u.text.charCodeAt(0)) && u.text.charCodeAt(0) !== 127) { + this.u = c; + if (u.text !== "" || u.replacePrevCharCnt !== 0 || u.replaceNextCharCnt !== 0 || u.positionDelta !== 0) { + this.j.fire(u); + } + } + })); + this.D(this.F.onCut(l => { + this.F.setIgnoreSelectionChangeTime("received cut event"); + this.O(l); + this.s.schedule(); + })); + this.D(this.F.onCopy(l => { + this.O(l); + })); + this.D(this.F.onPaste(l => { + this.F.setIgnoreSelectionChangeTime("received paste event"); + l.preventDefault(); + if (!l.clipboardData) { + return; + } + let [c, u] = dte.getTextData(l.clipboardData); + if (c) { + u = u || ute.INSTANCE.get(c); + this.h.fire({ + text: c, + metadata: u + }); + } + })); + this.D(this.F.onFocus(() => { + const l = this.y; + this.M(true); + if (this.I.isScreenReaderOptimized() && this.H.isSafari && !l && this.y) { + this.t.value ||= new Vn(() => this.writeNativeTextAreaContent("asyncFocusGain"), 0); + this.t.value.schedule(); + } + })); + this.D(this.F.onBlur(() => { + if (this.z) { + this.z = null; + this.writeNativeTextAreaContent("blurWithoutCompositionEnd"); + this.q.fire(); + } + this.M(false); + })); + this.D(this.F.onSyntheticTap(() => { + if (this.H.isAndroid && this.z) { + this.z = null; + this.writeNativeTextAreaContent("tapWithoutCompositionEnd"); + this.q.fire(); + } + })); + } + _initializeFromTest() { + this.y = true; + this.u = QC.readFromTextArea(this.F, null); + } + L() { + let e = 0; + return Ce(this.F.ownerDocument, "selectionchange", t => { + i4.onSelectionChange(); + if (!this.y || this.z || !this.H.isChrome) { + return; + } + const s = Date.now(); + const n = s - e; + e = s; + if (n < 5) { + return; + } + const r = s - this.F.getIgnoreSelectionChangeTime(); + this.F.resetSelectionChangeTime(); + if (r < 100 || !this.u.selection) { + return; + } + const o = this.F.getValue(); + if (this.u.value !== o) { + return; + } + const a = this.F.getSelectionStart(); + const l = this.F.getSelectionEnd(); + if (this.u.selectionStart === a && this.u.selectionEnd === l) { + return; + } + const c = this.u.deduceEditorPosition(a); + const u = this.C.deduceModelPosition(c[0], c[1], c[2]); + const d = this.u.deduceEditorPosition(l); + const h = this.C.deduceModelPosition(d[0], d[1], d[2]); + const g = new Vs(u.lineNumber, u.column, h.lineNumber, h.column); + this.r.fire(g); + }); + } + dispose() { + super.dispose(); + if (this.w) { + this.w.dispose(); + this.w = null; + } + } + focusTextArea() { + this.M(true); + this.refreshFocusState(); + } + isFocused() { + return this.y; + } + refreshFocusState() { + this.M(this.F.hasFocus()); + } + M(e) { + if (this.y !== e) { + this.y = e; + if (this.w) { + this.w.dispose(); + this.w = null; + } + if (this.y) { + this.w = this.L(); + } + if (this.y) { + this.writeNativeTextAreaContent("focusgain"); + } + if (this.y) { + this.a.fire(); + } else { + this.b.fire(); + } + } + } + N(e, t) { + if (!this.y) { + t = t.collapseSelection(); + } + if (!t.isWrittenToTextArea(this.F, this.y)) { + this.J.trace(`writeTextAreaState(reason: ${e})`); + } + t.writeToTextArea(e, this.F, this.y); + this.u = t; + } + writeNativeTextAreaContent(e) { + if ((!!this.I.isScreenReaderOptimized() || e !== "render") && !this.z) { + this.N(e, this.C.getScreenReaderContent()); + } + } + O(e) { + const t = this.C.getDataToCopy(); + const s = { + version: 1, + isFromEmptySelection: t.isFromEmptySelection, + multicursorText: t.multicursorText, + mode: t.mode + }; + ute.INSTANCE.set(this.H.isFirefox ? t.text.replace(/\r\n/g, ` +`) : t.text, s); + e.preventDefault(); + if (e.clipboardData) { + dte.setTextData(e.clipboardData, t.text, t.html, s); + } + } + }; + Cat = __decorate([__param(4, na), __param(5, Bt)], Cat); + pes = class extends H { + get ownerDocument() { + return this.c.ownerDocument; + } + constructor(i) { + super(); + this.c = i; + this.onKeyDown = this.D(new Co(this.c, "keydown")).event; + this.onKeyPress = this.D(new Co(this.c, "keypress")).event; + this.onKeyUp = this.D(new Co(this.c, "keyup")).event; + this.onCompositionStart = this.D(new Co(this.c, "compositionstart")).event; + this.onCompositionUpdate = this.D(new Co(this.c, "compositionupdate")).event; + this.onCompositionEnd = this.D(new Co(this.c, "compositionend")).event; + this.onBeforeInput = this.D(new Co(this.c, "beforeinput")).event; + this.onInput = this.D(new Co(this.c, "input")).event; + this.onCut = this.D(new Co(this.c, "cut")).event; + this.onCopy = this.D(new Co(this.c, "copy")).event; + this.onPaste = this.D(new Co(this.c, "paste")).event; + this.onFocus = this.D(new Co(this.c, "focus")).event; + this.onBlur = this.D(new Co(this.c, "blur")).event; + this.a = this.D(new B()); + this.onSyntheticTap = this.a.event; + this.b = 0; + this.D(this.onKeyDown(() => i4.onKeyDown())); + this.D(this.onBeforeInput(() => i4.onBeforeInput())); + this.D(this.onInput(() => i4.onInput())); + this.D(this.onKeyUp(() => i4.onKeyUp())); + this.D(Ce(this.c, wat.Tap, () => this.a.fire())); + } + hasFocus() { + const i = Zq(this.c); + if (i) { + return i.activeElement === this.c; + } else if (this.c.isConnected) { + return Tu() === this.c; + } else { + return false; + } + } + setIgnoreSelectionChangeTime(i) { + this.b = Date.now(); + } + getIgnoreSelectionChangeTime() { + return this.b; + } + resetSelectionChangeTime() { + this.b = 0; + } + getValue() { + return this.c.value; + } + setValue(i, e) { + const t = this.c; + if (t.value !== e) { + this.setIgnoreSelectionChangeTime("setValue"); + t.value = e; + } + } + getSelectionStart() { + if (this.c.selectionDirection === "backward") { + return this.c.selectionEnd; + } else { + return this.c.selectionStart; + } + } + getSelectionEnd() { + if (this.c.selectionDirection === "backward") { + return this.c.selectionStart; + } else { + return this.c.selectionEnd; + } + } + setSelectionRange(i, e, t) { + const s = this.c; + let n = null; + const r = Zq(s); + if (r) { + n = r.activeElement; + } else { + n = Tu(); + } + const o = Kt(n); + const a = n === s; + const l = s.selectionStart; + const c = s.selectionEnd; + if (a && l === e && c === t) { + if (Bv && o.parent !== o) { + s.focus(); + } + return; + } + if (a) { + this.setIgnoreSelectionChangeTime("setSelectionRange"); + s.setSelectionRange(e, t); + if (Bv && o.parent !== o) { + s.focus(); + } + return; + } + try { + const u = gqn(s); + this.setIgnoreSelectionChangeTime("setSelectionRange"); + s.focus(); + s.setSelectionRange(e, t); + pqn(s, u); + } catch {} + } + }; + } +}); +var bes; +var ves; +var yes; +var wJn = ue({ + "out-build/vs/editor/browser/controller/pointerHandler.js"() { + "use strict"; + + V2(); + xe(); + hh(); + fr(); + q(); + rt(); + yJn(); + ope(); + mes(); + bes = class extends vat { + constructor(i, e, t) { + super(i, e, t); + this.D(bd.addTarget(this.c.linesContentDomNode)); + this.D(Ce(this.c.linesContentDomNode, ul.Tap, n => this.J(n))); + this.D(Ce(this.c.linesContentDomNode, ul.Change, n => this.L(n))); + this.D(Ce(this.c.linesContentDomNode, ul.Contextmenu, n => this.w(new h4(n, false, this.c.viewDomNode), false))); + this.I = "mouse"; + this.D(Ce(this.c.linesContentDomNode, "pointerdown", n => { + const r = n.pointerType; + if (r === "mouse") { + this.I = "mouse"; + return; + } else if (r === "touch") { + this.I = "touch"; + } else { + this.I = "pen"; + } + })); + const s = new kZi(this.c.viewDomNode); + this.D(s.onPointerMove(this.c.viewDomNode, n => this.z(n))); + this.D(s.onPointerUp(this.c.viewDomNode, n => this.F(n))); + this.D(s.onPointerLeave(this.c.viewDomNode, n => this.C(n))); + this.D(s.onPointerDown(this.c.viewDomNode, (n, r) => this.G(n, r))); + } + J(i) { + if (!!i.initialTarget && !!this.c.linesContentDomNode.contains(i.initialTarget)) { + i.preventDefault(); + this.c.focusTextArea(); + this.M(i, false); + } + } + L(i) { + if (this.I === "touch") { + this.a.viewModel.viewLayout.deltaScrollNow(-i.translationX, -i.translationY); + } + if (this.I === "pen") { + this.M(i, true); + } + } + M(i, e) { + const t = this.s(new h4(i, false, this.c.viewDomNode), false); + if (t.position) { + this.b.dispatchMouse({ + position: t.position, + mouseColumn: t.position.column, + startedOnLineNumbers: false, + revealType: 1, + mouseDownCount: i.tapCount, + inSelectionMode: e, + altKey: false, + ctrlKey: false, + metaKey: false, + shiftKey: false, + leftButton: false, + middleButton: false, + onInjectedText: t.type === 6 && t.detail.injectedText !== null + }); + } + } + G(i, e) { + if (i.browserEvent.pointerType !== "touch") { + super.G(i, e); + } + } + }; + ves = class extends vat { + constructor(i, e, t) { + super(i, e, t); + this.D(bd.addTarget(this.c.linesContentDomNode)); + this.D(Ce(this.c.linesContentDomNode, ul.Tap, s => this.I(s))); + this.D(Ce(this.c.linesContentDomNode, ul.Change, s => this.J(s))); + this.D(Ce(this.c.linesContentDomNode, ul.Contextmenu, s => this.w(new h4(s, false, this.c.viewDomNode), false))); + } + I(i) { + i.preventDefault(); + this.c.focusTextArea(); + const e = this.s(new h4(i, false, this.c.viewDomNode), false); + if (e.position) { + const t = document.createEvent("CustomEvent"); + t.initEvent(wat.Tap, false, true); + this.c.dispatchTextAreaEvent(t); + this.b.moveTo(e.position, 1); + } + } + J(i) { + this.a.viewModel.viewLayout.deltaScrollNow(-i.translationX, -i.translationY); + } + }; + yes = class extends H { + constructor(i, e, t) { + super(); + if ((fp || p4t && u4t) && jC.pointerEvents) { + this.a = this.D(new bes(i, e, t)); + } else if (xt.TouchEvent) { + this.a = this.D(new ves(i, e, t)); + } else { + this.a = this.D(new vat(i, e, t)); + } + } + getTargetAtClientPoint(i, e) { + return this.a.getTargetAtClientPoint(i, e); + } + }; + } +}); +var wes; +var CJn = ue({ + "out-build/vs/editor/browser/view/viewController.js"() { + "use strict"; + + S9(); + Rs(); + rt(); + wes = class { + constructor(i, e, t, s) { + this.a = i; + this.b = e; + this.c = t; + this.d = s; + } + paste(i, e, t, s) { + this.d.paste(i, e, t, s); + } + type(i) { + this.d.type(i); + } + compositionType(i, e, t, s) { + this.d.compositionType(i, e, t, s); + } + compositionStart() { + this.d.startComposition(); + } + compositionEnd() { + this.d.endComposition(); + } + cut() { + this.d.cut(); + } + setSelection(i) { + pb.SetSelection.runCoreEditorCommand(this.b, { + source: "keyboard", + selection: i + }); + } + f(i) { + const e = this.b.getLineMinColumn(i.lineNumber); + if (i.column < e) { + return new je(i.lineNumber, e); + } else { + return i; + } + } + g(i) { + switch (this.a.options.get(79)) { + case "altKey": + return i.altKey; + case "ctrlKey": + return i.ctrlKey; + case "metaKey": + return i.metaKey; + default: + return false; + } + } + h(i) { + switch (this.a.options.get(79)) { + case "altKey": + return i.ctrlKey || i.metaKey; + case "ctrlKey": + return i.altKey || i.metaKey; + case "metaKey": + return i.ctrlKey || i.altKey; + default: + return false; + } + } + dispatchMouse(i) { + const e = this.a.options; + const t = yl && e.get(112); + const s = e.get(22); + if (i.middleButton && !t) { + this.k(i.position, i.mouseColumn, i.inSelectionMode); + } else if (i.startedOnLineNumbers) { + if (this.g(i)) { + if (i.inSelectionMode) { + this.s(i.position, i.revealType); + } else { + this.l(i.position, true); + } + } else if (i.inSelectionMode) { + this.r(i.position, i.revealType); + } else { + this.q(i.position, i.revealType); + } + } else if (i.mouseDownCount >= 4) { + this.u(); + } else if (i.mouseDownCount === 3) { + if (this.g(i)) { + if (i.inSelectionMode) { + this.t(i.position, i.revealType); + } else { + this.s(i.position, i.revealType); + } + } else if (i.inSelectionMode) { + this.r(i.position, i.revealType); + } else { + this.q(i.position, i.revealType); + } + } else if (i.mouseDownCount === 2) { + if (!i.onInjectedText) { + if (this.g(i)) { + this.p(i.position, i.revealType); + } else if (i.inSelectionMode) { + this.o(i.position, i.revealType); + } else { + this.n(i.position, i.revealType); + } + } + } else if (this.g(i)) { + if (!this.h(i)) { + if (i.shiftKey) { + this.k(i.position, i.mouseColumn, true); + } else if (i.inSelectionMode) { + this.m(i.position, i.revealType); + } else { + this.l(i.position, false); + } + } + } else if (i.inSelectionMode) { + if (i.altKey) { + this.k(i.position, i.mouseColumn, true); + } else if (s) { + this.k(i.position, i.mouseColumn, true); + } else { + this.j(i.position, i.revealType); + } + } else { + this.moveTo(i.position, i.revealType); + } + } + i(i, e) { + i = this.f(i); + return { + source: "mouse", + position: this.v(i), + viewPosition: i, + revealType: e + }; + } + moveTo(i, e) { + pb.MoveTo.runCoreEditorCommand(this.b, this.i(i, e)); + } + j(i, e) { + pb.MoveToSelect.runCoreEditorCommand(this.b, this.i(i, e)); + } + k(i, e, t) { + i = this.f(i); + pb.ColumnSelect.runCoreEditorCommand(this.b, { + source: "mouse", + position: this.v(i), + viewPosition: i, + mouseColumn: e, + doColumnSelect: t + }); + } + l(i, e) { + i = this.f(i); + pb.CreateCursor.runCoreEditorCommand(this.b, { + source: "mouse", + position: this.v(i), + viewPosition: i, + wholeLine: e + }); + } + m(i, e) { + pb.LastCursorMoveToSelect.runCoreEditorCommand(this.b, this.i(i, e)); + } + n(i, e) { + pb.WordSelect.runCoreEditorCommand(this.b, this.i(i, e)); + } + o(i, e) { + pb.WordSelectDrag.runCoreEditorCommand(this.b, this.i(i, e)); + } + p(i, e) { + pb.LastCursorWordSelect.runCoreEditorCommand(this.b, this.i(i, e)); + } + q(i, e) { + pb.LineSelect.runCoreEditorCommand(this.b, this.i(i, e)); + } + r(i, e) { + pb.LineSelectDrag.runCoreEditorCommand(this.b, this.i(i, e)); + } + s(i, e) { + pb.LastCursorLineSelect.runCoreEditorCommand(this.b, this.i(i, e)); + } + t(i, e) { + pb.LastCursorLineSelectDrag.runCoreEditorCommand(this.b, this.i(i, e)); + } + u() { + pb.SelectAll.runCoreEditorCommand(this.b, { + source: "mouse" + }); + } + v(i) { + return this.b.coordinatesConverter.convertViewPositionToModelPosition(i); + } + emitKeyDown(i) { + this.c.emitKeyDown(i); + } + emitKeyUp(i) { + this.c.emitKeyUp(i); + } + emitContextMenu(i) { + this.c.emitContextMenu(i); + } + emitMouseMove(i) { + this.c.emitMouseMove(i); + } + emitMouseLeave(i) { + this.c.emitMouseLeave(i); + } + emitMouseUp(i) { + this.c.emitMouseUp(i); + } + emitMouseDown(i) { + this.c.emitMouseDown(i); + } + emitMouseDrag(i) { + this.c.emitMouseDrag(i); + } + emitMouseDrop(i) { + this.c.emitMouseDrop(i); + } + emitMouseDropCanceled() { + this.c.emitMouseDropCanceled(); + } + emitMouseWheel(i) { + this.c.emitMouseWheel(i); + } + }; + } +}); +function GL(i, e) { + const t = globalThis.MonacoEnvironment; + if (t?.createTrustedTypesPolicy) { + try { + return t.createTrustedTypesPolicy(i, e); + } catch (s) { + xs(s); + return; + } + } + try { + return globalThis.trustedTypes?.createPolicy(i, e); + } catch (s) { + xs(s); + return; + } +} +var KL = ue({ + "out-build/vs/base/browser/trustedTypes.js"() { + "use strict"; + + Ut(); + } +}); +var W3t; +var V3t; +var Ces; +var H3t = ue({ + "out-build/vs/editor/browser/view/viewLayer.js"() { + "use strict"; + + pf(); + KL(); + Ut(); + mM(); + W3t = class { + constructor(i) { + this.c = i; + this._set(1, []); + } + flush() { + this._set(1, []); + } + _set(i, e) { + this.a = e; + this.b = i; + } + _get() { + return { + rendLineNumberStart: this.b, + lines: this.a + }; + } + getStartLineNumber() { + return this.b; + } + getEndLineNumber() { + return this.b + this.a.length - 1; + } + getCount() { + return this.a.length; + } + getLine(i) { + const e = i - this.b; + if (e < 0 || e >= this.a.length) { + throw new co("Illegal value for lineNumber"); + } + return this.a[e]; + } + onLinesDeleted(i, e) { + if (this.getCount() === 0) { + return null; + } + const t = this.getStartLineNumber(); + const s = this.getEndLineNumber(); + if (e < t) { + const a = e - i + 1; + this.b -= a; + return null; + } + if (i > s) { + return null; + } + let n = 0; + let r = 0; + for (let a = t; a <= s; a++) { + const l = a - this.b; + if (i <= a && a <= e) { + if (r === 0) { + n = l; + r = 1; + } else { + r++; + } + } + } + if (i < t) { + let a = 0; + if (e < t) { + a = e - i + 1; + } else { + a = t - i; + } + this.b -= a; + } + return this.a.splice(n, r); + } + onLinesChanged(i, e) { + const t = i + e - 1; + if (this.getCount() === 0) { + return false; + } + const s = this.getStartLineNumber(); + const n = this.getEndLineNumber(); + let r = false; + for (let o = i; o <= t; o++) { + if (o >= s && o <= n) { + this.a[o - this.b].onContentChanged(); + r = true; + } + } + return r; + } + onLinesInserted(i, e) { + if (this.getCount() === 0) { + return null; + } + const t = e - i + 1; + const s = this.getStartLineNumber(); + const n = this.getEndLineNumber(); + if (i <= s) { + this.b += t; + return null; + } + if (i > n) { + return null; + } + if (t + i > n) { + return this.a.splice(i - this.b, n - i + 1); + } + const r = []; + for (let u = 0; u < t; u++) { + r[u] = this.c.createLine(); + } + const o = i - this.b; + const a = this.a.slice(0, o); + const l = this.a.slice(o, this.a.length - t); + const c = this.a.slice(this.a.length - t, this.a.length); + this.a = a.concat(r).concat(l); + return c; + } + onTokensChanged(i) { + if (this.getCount() === 0) { + return false; + } + const e = this.getStartLineNumber(); + const t = this.getEndLineNumber(); + let s = false; + for (let n = 0, r = i.length; n < r; n++) { + const o = i[n]; + if (o.toLineNumber < e || o.fromLineNumber > t) { + continue; + } + const a = Math.max(e, o.fromLineNumber); + const l = Math.min(t, o.toLineNumber); + for (let c = a; c <= l; c++) { + const u = c - this.b; + this.a[u].onTokensChanged(); + s = true; + } + } + return s; + } + }; + V3t = class { + constructor(i) { + this.b = i; + this.domNode = this.c(); + this.a = new W3t(this.b); + } + c() { + const i = nc(document.createElement("div")); + i.setClassName("view-layer"); + i.setPosition("absolute"); + i.domNode.setAttribute("role", "presentation"); + i.domNode.setAttribute("aria-hidden", "true"); + return i; + } + onConfigurationChanged(i) { + return !!i.hasChanged(151); + } + onFlushed(i) { + this.a.flush(); + return true; + } + onLinesChanged(i) { + return this.a.onLinesChanged(i.fromLineNumber, i.count); + } + onLinesDeleted(i) { + const e = this.a.onLinesDeleted(i.fromLineNumber, i.toLineNumber); + if (e) { + for (let t = 0, s = e.length; t < s; t++) { + e[t].getDomNode()?.remove(); + } + } + return true; + } + onLinesInserted(i) { + const e = this.a.onLinesInserted(i.fromLineNumber, i.toLineNumber); + if (e) { + for (let t = 0, s = e.length; t < s; t++) { + e[t].getDomNode()?.remove(); + } + } + return true; + } + onScrollChanged(i) { + return i.scrollTopChanged; + } + onTokensChanged(i) { + return this.a.onTokensChanged(i.ranges); + } + onZonesChanged(i) { + return true; + } + getStartLineNumber() { + return this.a.getStartLineNumber(); + } + getEndLineNumber() { + return this.a.getEndLineNumber(); + } + getVisibleLine(i) { + return this.a.getLine(i); + } + renderLines(i) { + const e = this.a._get(); + const t = new Ces(this.domNode.domNode, this.b, i); + const s = { + rendLineNumberStart: e.rendLineNumberStart, + lines: e.lines, + linesLength: e.lines.length + }; + const n = t.render(s, i.startLineNumber, i.endLineNumber, i.relativeVerticalOffset); + this.a._set(n.rendLineNumberStart, n.lines); + } + }; + Ces = class Ede { + static { + this.a = GL("editorViewLayer", { + createHTML: e => e + }); + } + constructor(e, t, s) { + this.b = e; + this.c = t; + this.d = s; + } + render(e, t, s, n) { + const r = { + rendLineNumberStart: e.rendLineNumberStart, + lines: e.lines.slice(0), + linesLength: e.linesLength + }; + if (r.rendLineNumberStart + r.linesLength - 1 < t || s < r.rendLineNumberStart) { + r.rendLineNumberStart = t; + r.linesLength = s - t + 1; + r.lines = []; + for (let o = t; o <= s; o++) { + r.lines[o - t] = this.c.createLine(); + } + this.o(r, true, n); + return r; + } + this.f(r, Math.max(t - r.rendLineNumberStart, 0), Math.min(s - r.rendLineNumberStart, r.linesLength - 1), n, t); + if (r.rendLineNumberStart > t) { + const o = t; + const a = Math.min(s, r.rendLineNumberStart - 1); + if (o <= a) { + this.g(r, o, a, n, t); + r.linesLength += a - o + 1; + } + } else if (r.rendLineNumberStart < t) { + const o = Math.min(r.linesLength, t - r.rendLineNumberStart); + if (o > 0) { + this.h(r, o); + r.linesLength -= o; + } + } + r.rendLineNumberStart = t; + if (r.rendLineNumberStart + r.linesLength - 1 < s) { + const o = r.rendLineNumberStart + r.linesLength; + const a = s; + if (o <= a) { + this.j(r, o, a, n, t); + r.linesLength += a - o + 1; + } + } else if (r.rendLineNumberStart + r.linesLength - 1 > s) { + const o = Math.max(0, s - r.rendLineNumberStart + 1); + const l = r.linesLength - 1 - o + 1; + if (l > 0) { + this.k(r, l); + r.linesLength -= l; + } + } + this.o(r, false, n); + return r; + } + f(e, t, s, n, r) { + const o = e.rendLineNumberStart; + const a = e.lines; + for (let l = t; l <= s; l++) { + const c = o + l; + a[l].layoutLine(c, n[c - r], this.d.lineHeight); + } + } + g(e, t, s, n, r) { + const o = []; + let a = 0; + for (let l = t; l <= s; l++) { + o[a++] = this.c.createLine(); + } + e.lines = o.concat(e.lines); + } + h(e, t) { + for (let s = 0; s < t; s++) { + e.lines[s].getDomNode()?.remove(); + } + e.lines.splice(0, t); + } + j(e, t, s, n, r) { + const o = []; + let a = 0; + for (let l = t; l <= s; l++) { + o[a++] = this.c.createLine(); + } + e.lines = e.lines.concat(o); + } + k(e, t) { + const s = e.linesLength - t; + for (let n = 0; n < t; n++) { + e.lines[s + n].getDomNode()?.remove(); + } + e.lines.splice(s, t); + } + l(e, t, s, n) { + if (Ede.a) { + s = Ede.a.createHTML(s); + } + const r = this.b.lastChild; + if (t || !r) { + this.b.innerHTML = s; + } else { + r.insertAdjacentHTML("afterend", s); + } + let o = this.b.lastChild; + for (let a = e.linesLength - 1; a >= 0; a--) { + const l = e.lines[a]; + if (n[a]) { + l.setDomNode(o); + o = o.previousSibling; + } + } + } + m(e, t, s) { + const n = document.createElement("div"); + if (Ede.a) { + t = Ede.a.createHTML(t); + } + n.innerHTML = t; + for (let r = 0; r < e.linesLength; r++) { + const o = e.lines[r]; + if (s[r]) { + const a = n.firstChild; + const l = o.getDomNode(); + l.parentNode.replaceChild(a, l); + o.setDomNode(a); + } + } + } + static { + this.n = new UL(100000); + } + o(e, t, s) { + const n = Ede.n; + const r = e.linesLength; + const o = e.lines; + const a = e.rendLineNumberStart; + const l = []; + { + n.reset(); + let c = false; + for (let u = 0; u < r; u++) { + const d = o[u]; + l[u] = false; + if (!d.getDomNode() && !!d.renderLine(u + a, s[u], this.d.lineHeight, this.d, n)) { + l[u] = true; + c = true; + } + } + if (c) { + this.l(e, t, n.build(), l); + } + } + { + n.reset(); + let c = false; + const u = []; + for (let d = 0; d < r; d++) { + const h = o[d]; + u[d] = false; + if (!l[d] && !!h.renderLine(d + a, s[d], this.d.lineHeight, this.d, n)) { + u[d] = true; + c = true; + } + } + if (c) { + this.m(e, n.build(), u); + } + } + } + }; + } +}); +var q3t; +var Ses; +var xes; +var kes; +var SJn = ue({ + "out-build/vs/editor/browser/view/viewOverlays.js"() { + "use strict"; + + pf(); + s1(); + H3t(); + Ow(); + q3t = class extends YC { + constructor(i) { + super(i); + this.c = []; + this.f = false; + this.a = new V3t({ + createLine: () => new Ses(this.c) + }); + this.b = this.a.domNode; + const t = this._context.configuration.options.get(52); + Hm(this.b, t); + this.b.setClassName("view-overlays"); + } + shouldRender() { + if (super.shouldRender()) { + return true; + } + for (let i = 0, e = this.c.length; i < e; i++) { + if (this.c[i].shouldRender()) { + return true; + } + } + return false; + } + dispose() { + super.dispose(); + for (let i = 0, e = this.c.length; i < e; i++) { + this.c[i].dispose(); + } + this.c = []; + } + getDomNode() { + return this.b; + } + addDynamicOverlay(i) { + this.c.push(i); + } + onConfigurationChanged(i) { + this.a.onConfigurationChanged(i); + const t = this._context.configuration.options.get(52); + Hm(this.b, t); + return true; + } + onFlushed(i) { + return this.a.onFlushed(i); + } + onFocusChanged(i) { + this.f = i.isFocused; + return true; + } + onLinesChanged(i) { + return this.a.onLinesChanged(i); + } + onLinesDeleted(i) { + return this.a.onLinesDeleted(i); + } + onLinesInserted(i) { + return this.a.onLinesInserted(i); + } + onScrollChanged(i) { + return this.a.onScrollChanged(i) || true; + } + onTokensChanged(i) { + return this.a.onTokensChanged(i); + } + onZonesChanged(i) { + return this.a.onZonesChanged(i); + } + prepareRender(i) { + const e = this.c.filter(t => t.shouldRender()); + for (let t = 0, s = e.length; t < s; t++) { + const n = e[t]; + n.prepareRender(i); + n.onDidRender(); + } + } + render(i) { + this._viewOverlaysRender(i); + this.b.toggleClassName("focused", this.f); + } + _viewOverlaysRender(i) { + this.a.renderLines(i.viewportData); + } + }; + Ses = class { + constructor(i) { + this.a = i; + this.b = null; + this.c = null; + } + getDomNode() { + if (this.b) { + return this.b.domNode; + } else { + return null; + } + } + setDomNode(i) { + this.b = nc(i); + } + onContentChanged() {} + onTokensChanged() {} + renderLine(i, e, t, s, n) { + let r = ""; + for (let o = 0, a = this.a.length; o < a; o++) { + const l = this.a[o]; + r += l.render(s.startLineNumber, i); + } + if (this.c === r) { + return false; + } else { + this.c = r; + n.appendString("
"); + n.appendString(r); + n.appendString("
"); + return true; + } + } + layoutLine(i, e, t) { + if (this.b) { + this.b.setTop(e); + this.b.setHeight(t); + } + } + }; + xes = class extends q3t { + constructor(i) { + super(i); + const t = this._context.configuration.options.get(151); + this.g = t.contentWidth; + this.b.setHeight(0); + } + onConfigurationChanged(i) { + const t = this._context.configuration.options.get(151); + this.g = t.contentWidth; + return super.onConfigurationChanged(i) || true; + } + onScrollChanged(i) { + return super.onScrollChanged(i) || i.scrollWidthChanged; + } + _viewOverlaysRender(i) { + super._viewOverlaysRender(i); + this.b.setWidth(Math.max(i.scrollWidth, this.g)); + } + }; + kes = class extends q3t { + constructor(i) { + super(i); + const e = this._context.configuration.options; + const t = e.get(151); + this.g = t.contentLeft; + this.b.setClassName("margin-view-overlays"); + this.b.setWidth(1); + Hm(this.b, e.get(52)); + } + onConfigurationChanged(i) { + const e = this._context.configuration.options; + Hm(this.b, e.get(52)); + const t = e.get(151); + this.g = t.contentLeft; + return super.onConfigurationChanged(i) || true; + } + onScrollChanged(i) { + return super.onScrollChanged(i) || i.scrollHeightChanged; + } + _viewOverlaysRender(i) { + super._viewOverlaysRender(i); + const e = Math.min(i.scrollHeight, 1000000); + this.b.setHeight(e); + this.b.setWidth(this.g); + } + }; + } +}); +var j3t; +var Ees = ue({ + "out-build/vs/editor/browser/view/viewUserInputEvents.js"() { + "use strict"; + + Rs(); + j3t = class WFn { + 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.a = e; + } + emitKeyDown(e) { + this.onKeyDown?.(e); + } + emitKeyUp(e) { + this.onKeyUp?.(e); + } + emitContextMenu(e) { + this.onContextMenu?.(this.b(e)); + } + emitMouseMove(e) { + this.onMouseMove?.(this.b(e)); + } + emitMouseLeave(e) { + this.onMouseLeave?.(this.b(e)); + } + emitMouseDown(e) { + this.onMouseDown?.(this.b(e)); + } + emitMouseUp(e) { + this.onMouseUp?.(this.b(e)); + } + emitMouseDrag(e) { + this.onMouseDrag?.(this.b(e)); + } + emitMouseDrop(e) { + this.onMouseDrop?.(this.b(e)); + } + emitMouseDropCanceled() { + this.onMouseDropCanceled?.(); + } + emitMouseWheel(e) { + this.onMouseWheel?.(e); + } + b(e) { + if (e.target) { + return { + event: e.event, + target: this.c(e.target) + }; + } else { + return e; + } + } + c(e) { + return WFn.convertViewToModelMouseTarget(e, this.a); + } + static convertViewToModelMouseTarget(e, t) { + const s = { + ...e + }; + s.position &&= t.convertViewPositionToModelPosition(s.position); + s.range &&= t.convertViewRangeToModelRange(s.range); + if (s.type === 5 || s.type === 8) { + s.detail = this.d(s.detail, t); + } + return s; + } + static d(e, t) { + return { + viewZoneId: e.viewZoneId, + 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 je(e.afterLineNumber, 1)).lineNumber + }; + } + }; + } +}); +var xJn = ue({ + "out-build/vs/editor/browser/viewParts/blockDecorations/blockDecorations.css"() {} +}); +var Ies; +var kJn = ue({ + "out-build/vs/editor/browser/viewParts/blockDecorations/blockDecorations.js"() { + "use strict"; + + pf(); + xJn(); + Ow(); + Ies = class extends YC { + constructor(i) { + super(i); + this.a = []; + this.b = -1; + this.c = 0; + this.domNode = nc(document.createElement("div")); + this.domNode.setAttribute("role", "presentation"); + this.domNode.setAttribute("aria-hidden", "true"); + this.domNode.setClassName("blockDecorations-container"); + this.f(); + } + f() { + let i = false; + const t = this._context.configuration.options.get(151); + const s = t.contentWidth - t.verticalScrollbarWidth; + if (this.b !== s) { + this.b = s; + i = true; + } + const n = t.contentLeft; + if (this.c !== n) { + this.c = n; + i = true; + } + return i; + } + dispose() { + super.dispose(); + } + onConfigurationChanged(i) { + return this.f(); + } + onScrollChanged(i) { + return i.scrollTopChanged || i.scrollLeftChanged; + } + onDecorationsChanged(i) { + return true; + } + onZonesChanged(i) { + return true; + } + prepareRender(i) {} + render(i) { + let e = 0; + const t = i.getDecorationsInViewport(); + for (const s of t) { + if (!s.options.blockClassName) { + continue; + } + let n = this.a[e]; + if (!n) { + n = this.a[e] = nc(document.createElement("div")); + this.domNode.appendChild(n); + } + let r; + let o; + if (s.options.blockIsAfterEnd) { + r = i.getVerticalOffsetAfterLineNumber(s.range.endLineNumber, false); + o = i.getVerticalOffsetAfterLineNumber(s.range.endLineNumber, true); + } else { + r = i.getVerticalOffsetForLineNumber(s.range.startLineNumber, true); + o = s.range.isEmpty() && !s.options.blockDoesNotCollapse ? i.getVerticalOffsetForLineNumber(s.range.startLineNumber, false) : i.getVerticalOffsetAfterLineNumber(s.range.endLineNumber, true); + } + const [a, l, c, u] = s.options.blockPadding ?? [0, 0, 0, 0]; + n.setClassName("blockDecorations-block " + s.options.blockClassName); + n.setLeft(this.c - u); + n.setWidth(this.b + u + l); + n.setTop(r - i.scrollTop - a); + n.setHeight(o - r + a + c); + e++; + } + for (let s = e; s < this.a.length; s++) { + this.a[s].domNode.remove(); + } + this.a.length = e; + } + }; + } +}); +function z3t(i, e, ...t) { + try { + return i.call(e, ...t); + } catch { + return null; + } +} +var Des; +var Tes; +var hte; +var fte; +var J3t; +var EJn = ue({ + "out-build/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js"() { + "use strict"; + + xe(); + pf(); + Ow(); + Des = class extends YC { + constructor(i, e) { + super(i); + this.a = e; + this.b = {}; + this.domNode = nc(document.createElement("div")); + JL.write(this.domNode, 1); + this.domNode.setClassName("contentWidgets"); + this.domNode.setPosition("absolute"); + this.domNode.setTop(0); + this.overflowingContentWidgetsDomNode = nc(document.createElement("div")); + JL.write(this.overflowingContentWidgetsDomNode, 2); + this.overflowingContentWidgetsDomNode.setClassName("overflowingContentWidgets"); + } + dispose() { + super.dispose(); + this.b = {}; + } + onConfigurationChanged(i) { + const e = Object.keys(this.b); + for (const t of e) { + this.b[t].onConfigurationChanged(i); + } + return true; + } + onDecorationsChanged(i) { + return true; + } + onFlushed(i) { + return true; + } + onLineMappingChanged(i) { + this.c(); + return true; + } + onLinesChanged(i) { + this.c(); + return true; + } + onLinesDeleted(i) { + this.c(); + return true; + } + onLinesInserted(i) { + this.c(); + return true; + } + onScrollChanged(i) { + return true; + } + onZonesChanged(i) { + return true; + } + c() { + const i = Object.keys(this.b); + for (const e of i) { + this.b[e].updateAnchorViewPosition(); + } + } + addWidget(i) { + const e = new Tes(this._context, this.a, i); + this.b[e.id] = e; + if (e.allowEditorOverflow) { + this.overflowingContentWidgetsDomNode.appendChild(e.domNode); + } else { + this.domNode.appendChild(e.domNode); + } + this.q(); + } + setWidgetPosition(i, e, t, s, n) { + this.b[i.getId()].setPosition(e, t, s, n); + this.q(); + } + removeWidget(i) { + const e = i.getId(); + if (this.b.hasOwnProperty(e)) { + const t = this.b[e]; + delete this.b[e]; + const s = t.domNode.domNode; + s.remove(); + s.removeAttribute("monaco-visible-content-widget"); + this.q(); + } + } + shouldSuppressMouseDownOnWidget(i) { + if (this.b.hasOwnProperty(i)) { + return this.b[i].suppressMouseDown; + } else { + return false; + } + } + onBeforeRender(i) { + const e = Object.keys(this.b); + for (const t of e) { + this.b[t].onBeforeRender(i); + } + } + prepareRender(i) { + const e = Object.keys(this.b); + for (const t of e) { + this.b[t].prepareRender(i); + } + } + render(i) { + const e = Object.keys(this.b); + for (const t of e) { + this.b[t].render(i); + } + } + }; + Tes = class { + constructor(i, e, t) { + this.i = new hte(null, null); + this.j = new hte(null, null); + this.a = i; + this.b = e; + this.c = t; + this.domNode = nc(this.c.getDomNode()); + this.id = this.c.getId(); + this.allowEditorOverflow = this.c.allowEditorOverflow || false; + this.suppressMouseDown = this.c.suppressMouseDown || false; + const s = this.a.configuration.options; + const n = s.get(151); + this.d = s.get(44); + this.f = n.contentWidth; + this.g = n.contentLeft; + this.h = s.get(68); + this.k = null; + this.l = []; + this.m = -1; + this.n = -1; + this.o = this.s(); + this.p = false; + this.q = null; + this.domNode.setPosition(this.d && this.allowEditorOverflow ? "fixed" : "absolute"); + this.domNode.setDisplay("none"); + this.domNode.setVisibility("hidden"); + this.domNode.setAttribute("widgetId", this.id); + this.domNode.setMaxWidth(this.o); + } + onConfigurationChanged(i) { + const e = this.a.configuration.options; + this.h = e.get(68); + if (i.hasChanged(151)) { + const t = e.get(151); + this.g = t.contentLeft; + this.f = t.contentWidth; + this.o = this.s(); + } + } + updateAnchorViewPosition() { + this.r(this.k, this.i.modelPosition, this.j.modelPosition); + } + r(i, e, t) { + this.k = i; + this.i = s(e, this.a.viewModel, this.k); + this.j = s(t, this.a.viewModel, this.k); + function s(n, r, o) { + if (!n) { + return new hte(null, null); + } + const a = r.model.validatePosition(n); + if (r.coordinatesConverter.modelPositionIsVisible(a)) { + const l = r.coordinatesConverter.convertModelPositionToViewPosition(a, o ?? undefined); + return new hte(n, l); + } + return new hte(n, null); + } + } + s() { + const i = this.domNode.domNode.ownerDocument; + const e = i.defaultView; + if (this.allowEditorOverflow) { + return e?.innerWidth || i.documentElement.offsetWidth || i.body.offsetWidth; + } else { + return this.f; + } + } + setPosition(i, e, t, s) { + this.r(s, i, e); + this.l = t; + if (this.i.viewPosition && this.l && this.l.length > 0) { + this.domNode.setDisplay("block"); + } else { + this.domNode.setDisplay("none"); + } + this.m = -1; + this.n = -1; + } + t(i, e, t, s) { + const n = i.top; + const r = n; + const o = i.top + i.height; + const a = s.viewportHeight - o; + const l = n - t; + const c = r >= t; + const u = o; + const d = a >= t; + let h = i.left; + if (h + e > s.scrollLeft + s.viewportWidth) { + h = s.scrollLeft + s.viewportWidth - e; + } + if (h < s.scrollLeft) { + h = s.scrollLeft; + } + return { + fitsAbove: c, + aboveTop: l, + fitsBelow: d, + belowTop: u, + left: h + }; + } + u(i, e, t, s) { + const o = Math.max(15, e.left - s); + const a = Math.min(e.left + e.width + s, i.width - 15); + const c = this.b.domNode.ownerDocument.defaultView; + let u = e.left + t - (c?.scrollX ?? 0); + if (u + s > a) { + const d = u - (a - s); + u -= d; + t -= d; + } + if (u < o) { + const d = u - o; + u -= d; + t -= d; + } + return [t, u]; + } + v(i, e, t, s) { + const n = i.top - t; + const r = i.top + i.height; + const o = sd(this.b.domNode); + const a = this.b.domNode.ownerDocument; + const l = a.defaultView; + const c = o.top + n - (l?.scrollY ?? 0); + const u = o.top + r - (l?.scrollY ?? 0); + const d = zk(a.body); + const [h, g] = this.u(d, o, i.left - s.scrollLeft + this.g, e); + const p = 22; + const b = 22; + const v = c >= p; + const y = u + t <= d.height - b; + if (this.d) { + return { + fitsAbove: v, + aboveTop: Math.max(c, p), + fitsBelow: y, + belowTop: u, + left: g + }; + } else { + return { + fitsAbove: v, + aboveTop: n, + fitsBelow: y, + belowTop: r, + left: h + }; + } + } + w(i) { + return new fte(i.top, i.left + this.g); + } + x(i) { + const e = n(this.i.viewPosition, this.k, this.h); + const t = this.j.viewPosition?.lineNumber === this.i.viewPosition?.lineNumber ? this.j.viewPosition : null; + const s = n(t, this.k, this.h); + return { + primary: e, + secondary: s + }; + function n(r, o, a) { + if (!r) { + return null; + } + const l = i.visibleRangeForPosition(r); + if (!l) { + return null; + } + const c = r.column === 1 && o === 3 ? 0 : l.left; + const u = i.getVerticalOffsetForLineNumber(r.lineNumber) - i.scrollTop; + return new J3t(u, c, a); + } + } + y(i, e, t) { + if (!e) { + return i; + } + const s = this.a.configuration.options.get(52); + let n = e.left; + if (n < i.left) { + n = Math.max(n, i.left - t + s.typicalFullwidthCharacterWidth); + } else { + n = Math.min(n, i.left + t - s.typicalFullwidthCharacterWidth); + } + return new J3t(i.top, n, i.height); + } + z(i) { + if (!this.l || this.l.length === 0) { + return null; + } + const { + primary: e, + secondary: t + } = this.x(i); + if (!e) { + return { + kind: "offViewport", + preserveFocus: this.domNode.domNode.contains(this.domNode.domNode.ownerDocument.activeElement) + }; + } + if (this.m === -1 || this.n === -1) { + let r = null; + if (typeof this.c.beforeRender == "function") { + r = z3t(this.c.beforeRender, this.c); + } + if (r) { + this.m = r.width; + this.n = r.height; + } else { + const a = this.domNode.domNode.getBoundingClientRect(); + this.m = Math.round(a.width); + this.n = Math.round(a.height); + } + } + const s = this.y(e, t, this.m); + let n; + if (this.allowEditorOverflow) { + n = this.v(s, this.m, this.n, i); + } else { + n = this.t(s, this.m, this.n, i); + } + for (let r = 1; r <= 2; r++) { + for (const o of this.l) { + if (o === 1) { + if (!n) { + return null; + } + if (r === 2 || n.fitsAbove) { + return { + kind: "inViewport", + coordinate: new fte(n.aboveTop, n.left), + position: 1 + }; + } + } else if (o === 2) { + if (!n) { + return null; + } + if (r === 2 || n.fitsBelow) { + return { + kind: "inViewport", + coordinate: new fte(n.belowTop, n.left), + position: 2 + }; + } + } else if (this.allowEditorOverflow) { + return { + kind: "inViewport", + coordinate: this.w(new fte(s.top, s.left)), + position: 0 + }; + } else { + return { + kind: "inViewport", + coordinate: new fte(s.top, s.left), + position: 0 + }; + } + } + } + return null; + } + onBeforeRender(i) { + if (!!this.i.viewPosition && !!this.l && !(this.i.viewPosition.lineNumber < i.startLineNumber) && !(this.i.viewPosition.lineNumber > i.endLineNumber)) { + this.domNode.setMaxWidth(this.o); + } + } + prepareRender(i) { + this.q = this.z(i); + } + render(i) { + if (!this.q || this.q.kind === "offViewport") { + if (this.p) { + this.domNode.removeAttribute("monaco-visible-content-widget"); + this.p = false; + if (this.q?.kind === "offViewport" && this.q.preserveFocus) { + this.domNode.setTop(-1000); + } else { + this.domNode.setVisibility("hidden"); + } + } + if (typeof this.c.afterRender == "function") { + z3t(this.c.afterRender, this.c, null, null); + } + return; + } + if (this.allowEditorOverflow) { + this.domNode.setTop(this.q.coordinate.top); + this.domNode.setLeft(this.q.coordinate.left); + } else { + this.domNode.setTop(this.q.coordinate.top + i.scrollTop - i.bigNumbersDelta); + this.domNode.setLeft(this.q.coordinate.left); + } + if (!this.p) { + this.domNode.setVisibility("inherit"); + this.domNode.setAttribute("monaco-visible-content-widget", "true"); + this.p = true; + } + if (typeof this.c.afterRender == "function") { + z3t(this.c.afterRender, this.c, this.q.position, this.q.coordinate); + } + } + }; + hte = class { + constructor(i, e) { + this.modelPosition = i; + this.viewPosition = e; + } + }; + fte = class { + constructor(i, e) { + this.top = i; + this.left = e; + this._coordinateBrand = undefined; + } + }; + J3t = class { + constructor(i, e, t) { + this.top = i; + this.left = e; + this.height = t; + this._anchorCoordinateBrand = undefined; + } + }; + } +}); +var IJn = ue({ + "out-build/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.css"() {} +}); +var m4; +var _9 = ue({ + "out-build/vs/editor/browser/view/dynamicViewOverlay.js"() { + "use strict"; + + Mj(); + m4 = class extends A9 {}; + } +}); +function lu(i) { + return { + id: i + }; +} +function hpe(i) { + switch (i) { + case il.DARK: + return "vs-dark"; + case il.HIGH_CONTRAST_DARK: + return "hc-black"; + case il.HIGH_CONTRAST_LIGHT: + return "hc-light"; + default: + return "vs"; + } +} +function bf(i) { + return K3t.onColorThemeChange(i); +} +var ti; +var G3t; +var Wj; +var Sat; +var Pes; +var K3t; +var j0; +var gi = ue({ + "out-build/vs/platform/theme/common/themeService.js"() { + "use strict"; + + He(); + pe(); + q(); + te(); + Ht(); + vp(); + ti = Ve("themeService"); + G3t = A.file; + Wj = A.folder; + Sat = { + ThemingContribution: "base.contributions.theming" + }; + Pes = class { + constructor() { + this.a = []; + this.a = []; + this.b = new B(); + } + onColorThemeChange(i) { + this.a.push(i); + this.b.fire(i); + return Ue(() => { + const e = this.a.indexOf(i); + this.a.splice(e, 1); + }); + } + get onThemingParticipantAdded() { + return this.b.event; + } + getThemingParticipants() { + return this.a; + } + }; + K3t = new Pes(); + Pe.add(Sat.ThemingContribution, K3t); + j0 = class extends H { + constructor(i) { + super(); + this.n = i; + this.h = i.getColorTheme(); + this.D(this.n.onDidColorThemeChange(e => this.q(e))); + } + q(i) { + this.h = i; + this.updateStyles(); + } + updateStyles() {} + w(i, e) { + let t = this.h.getColor(i); + if (t && e) { + t = e(t, this.h); + } + if (t) { + return t.toString(); + } else { + return null; + } + } + }; + } +}); +var xat; +var Vj; +var Les; +var DJn; +var TJn; +var PJn; +var gte; +var kat; +var Y3t; +var Res; +var X3t; +var Nes; +var fpe; +var Mes; +var Aes; +var $es; +var Q3t; +var Fes; +var Oes; +var _es; +var Bes; +var Ues; +var Z3t; +var Wes; +var Ves; +var Hes; +var qes; +var jes; +var zes; +var LJn; +var Jes; +var Ges; +var RJn; +var NJn; +var MJn; +var e9t; +var Kes; +var AJn; +var $Jn; +var Yes; +var FJn; +var Xes; +var OJn; +var Qes; +var Eat; +var Iat; +var Zes; +var Dat; +var t9t; +var i9t; +var s9t; +var n9t; +var r9t; +var o9t; +var ets; +var tts; +var its; +var sts; +var nts; +var rts; +var ots; +var ats; +var lts; +var cts; +var uts; +var dts; +var hts; +var _Jn; +var BJn; +var z0 = ue({ + "out-build/vs/editor/common/core/editorColorRegistry.js"() { + "use strict"; + + X(); + Zo(); + Qs(); + gi(); + xat = he("editor.lineHighlightBackground", null, f(687, null)); + Vj = he("editor.lineHighlightBorder", { + dark: "#282828", + light: "#eeeeee", + hcDark: "#f38518", + hcLight: cn + }, f(688, null)); + Les = he("editor.rangeHighlightBackground", { + dark: "#ffffff0b", + light: "#fdff0033", + hcDark: null, + hcLight: null + }, f(689, null), true); + DJn = he("editor.rangeHighlightBorder", { + dark: null, + light: null, + hcDark: Oc, + hcLight: Oc + }, f(690, null)); + TJn = he("editor.symbolHighlightBackground", { + dark: TI, + light: TI, + hcDark: null, + hcLight: null + }, f(691, null), true); + PJn = he("editor.symbolHighlightBorder", { + dark: null, + light: null, + hcDark: Oc, + hcLight: Oc + }, f(692, null)); + gte = he("editorCursor.foreground", { + dark: "#AEAFAD", + light: ut.black, + hcDark: ut.white, + hcLight: "#0F4A85" + }, f(693, null)); + kat = he("editorCursor.background", null, f(694, null)); + Y3t = he("editorMultiCursor.primary.foreground", gte, f(695, null)); + Res = he("editorMultiCursor.primary.background", kat, f(696, null)); + X3t = he("editorMultiCursor.secondary.foreground", gte, f(697, null)); + Nes = he("editorMultiCursor.secondary.background", kat, f(698, null)); + fpe = he("editorWhitespace.foreground", { + dark: "#e3e4e229", + light: "#33333333", + hcDark: "#e3e4e229", + hcLight: "#CCCCCC" + }, f(699, null)); + Mes = he("editorLineNumber.foreground", { + dark: "#858585", + light: "#237893", + hcDark: ut.white, + hcLight: "#292929" + }, f(700, null)); + Aes = he("editorIndentGuide.background", fpe, f(701, null), false, f(702, null)); + $es = he("editorIndentGuide.activeBackground", fpe, f(703, null), false, f(704, null)); + Q3t = he("editorIndentGuide.background1", Aes, f(705, null)); + Fes = he("editorIndentGuide.background2", "#00000000", f(706, null)); + Oes = he("editorIndentGuide.background3", "#00000000", f(707, null)); + _es = he("editorIndentGuide.background4", "#00000000", f(708, null)); + Bes = he("editorIndentGuide.background5", "#00000000", f(709, null)); + Ues = he("editorIndentGuide.background6", "#00000000", f(710, null)); + Z3t = he("editorIndentGuide.activeBackground1", $es, f(711, null)); + Wes = he("editorIndentGuide.activeBackground2", "#00000000", f(712, null)); + Ves = he("editorIndentGuide.activeBackground3", "#00000000", f(713, null)); + Hes = he("editorIndentGuide.activeBackground4", "#00000000", f(714, null)); + qes = he("editorIndentGuide.activeBackground5", "#00000000", f(715, null)); + jes = he("editorIndentGuide.activeBackground6", "#00000000", f(716, null)); + zes = he("editorActiveLineNumber.foreground", { + dark: "#c6c6c6", + light: "#0B216F", + hcDark: Oc, + hcLight: Oc + }, f(717, null), false, f(718, null)); + LJn = he("editorLineNumber.activeForeground", zes, f(719, null)); + Jes = he("editorLineNumber.dimmedForeground", null, f(720, null)); + Ges = he("editorRuler.foreground", { + dark: "#5A5A5A", + light: ut.lightgrey, + hcDark: ut.white, + hcLight: "#292929" + }, f(721, null)); + RJn = he("editorCodeLens.foreground", { + dark: "#999999", + light: "#919191", + hcDark: "#999999", + hcLight: "#292929" + }, f(722, null)); + NJn = he("editorBracketMatch.background", { + dark: "#0064001a", + light: "#0064001a", + hcDark: "#0064001a", + hcLight: "#0000" + }, f(723, null)); + MJn = he("editorBracketMatch.border", { + dark: "#888", + light: "#B9B9B9", + hcDark: cn, + hcLight: cn + }, f(724, null)); + e9t = he("editorOverviewRuler.border", { + dark: "#7f7f7f4d", + light: "#7f7f7f4d", + hcDark: "#7f7f7f4d", + hcLight: "#666666" + }, f(725, null)); + Kes = he("editorOverviewRuler.background", null, f(726, null)); + AJn = he("editorGutter.background", wo, f(727, null)); + $Jn = he("editorUnnecessaryCode.border", { + dark: null, + light: null, + hcDark: ut.fromHex("#fff").transparent(0.8), + hcLight: cn + }, f(728, null)); + Yes = he("editorUnnecessaryCode.opacity", { + dark: ut.fromHex("#000a"), + light: ut.fromHex("#0007"), + hcDark: null, + hcLight: null + }, f(729, null)); + FJn = he("editorGhostText.border", { + dark: null, + light: null, + hcDark: ut.fromHex("#fff").transparent(0.8), + hcLight: ut.fromHex("#292929").transparent(0.8) + }, f(730, null)); + Xes = he("editorGhostText.foreground", { + dark: ut.fromHex("#ffffff56"), + light: ut.fromHex("#0007"), + hcDark: null, + hcLight: null + }, f(731, null)); + OJn = he("editorGhostText.background", null, f(732, null)); + Qes = new ut(new Ti(0, 122, 204, 0.6)); + Eat = he("editorOverviewRuler.rangeHighlightForeground", Qes, f(733, null), true); + Iat = he("editorOverviewRuler.errorForeground", { + dark: new ut(new Ti(255, 18, 18, 0.7)), + light: new ut(new Ti(255, 18, 18, 0.7)), + hcDark: new ut(new Ti(255, 50, 50, 1)), + hcLight: "#B5200D" + }, f(734, null)); + Zes = he("editorOverviewRuler.warningForeground", { + dark: GC, + light: GC, + hcDark: Xee, + hcLight: Xee + }, f(735, null)); + Dat = he("editorOverviewRuler.infoForeground", { + dark: Fw, + light: Fw, + hcDark: Qee, + hcLight: Qee + }, f(736, null)); + t9t = he("editorBracketHighlight.foreground1", { + dark: "#FFD700", + light: "#0431FAFF", + hcDark: "#FFD700", + hcLight: "#0431FAFF" + }, f(737, null)); + i9t = he("editorBracketHighlight.foreground2", { + dark: "#DA70D6", + light: "#319331FF", + hcDark: "#DA70D6", + hcLight: "#319331FF" + }, f(738, null)); + s9t = he("editorBracketHighlight.foreground3", { + dark: "#179FFF", + light: "#7B3814FF", + hcDark: "#87CEFA", + hcLight: "#7B3814FF" + }, f(739, null)); + n9t = he("editorBracketHighlight.foreground4", "#00000000", f(740, null)); + r9t = he("editorBracketHighlight.foreground5", "#00000000", f(741, null)); + o9t = he("editorBracketHighlight.foreground6", "#00000000", f(742, null)); + ets = he("editorBracketHighlight.unexpectedBracket.foreground", { + dark: new ut(new Ti(255, 18, 18, 0.8)), + light: new ut(new Ti(255, 18, 18, 0.8)), + hcDark: "new Color(new RGBA(255, 50, 50, 1))", + hcLight: "#B5200D" + }, f(743, null)); + tts = he("editorBracketPairGuide.background1", "#00000000", f(744, null)); + its = he("editorBracketPairGuide.background2", "#00000000", f(745, null)); + sts = he("editorBracketPairGuide.background3", "#00000000", f(746, null)); + nts = he("editorBracketPairGuide.background4", "#00000000", f(747, null)); + rts = he("editorBracketPairGuide.background5", "#00000000", f(748, null)); + ots = he("editorBracketPairGuide.background6", "#00000000", f(749, null)); + ats = he("editorBracketPairGuide.activeBackground1", "#00000000", f(750, null)); + lts = he("editorBracketPairGuide.activeBackground2", "#00000000", f(751, null)); + cts = he("editorBracketPairGuide.activeBackground3", "#00000000", f(752, null)); + uts = he("editorBracketPairGuide.activeBackground4", "#00000000", f(753, null)); + dts = he("editorBracketPairGuide.activeBackground5", "#00000000", f(754, null)); + hts = he("editorBracketPairGuide.activeBackground6", "#00000000", f(755, null)); + _Jn = he("editorUnicodeHighlight.border", GC, f(756, null)); + BJn = he("editorUnicodeHighlight.background", tQi, f(757, null)); + bf((i, e) => { + const t = i.getColor(wo); + const s = i.getColor(xat); + const n = s && !s.isTransparent() ? s : t; + if (n) { + e.addRule(`.monaco-editor .inputarea.ime-input { background-color: ${n}; }`); + } + }); + } +}); +var a9t; +var fts; +var gts; +var UJn = ue({ + "out-build/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.js"() { + "use strict"; + + IJn(); + _9(); + z0(); + Jt(); + gi(); + ua(); + vp(); + Rs(); + a9t = class extends m4 { + constructor(i) { + super(); + this.c = i; + const e = this.c.configuration.options; + const t = e.get(151); + this.f = e.get(101); + this.r = e.get(102); + this.g = t.isViewportWrapping; + this.h = t.contentLeft; + this.j = t.contentWidth; + this.n = true; + this.t = false; + this.u = [1]; + this.w = [new Vs(1, 1, 1, 1)]; + this.y = null; + this.c.addEventHandler(this); + } + dispose() { + this.c.removeEventHandler(this); + super.dispose(); + } + z() { + let i = false; + const e = new Set(); + for (const n of this.w) { + e.add(n.positionLineNumber); + } + const t = Array.from(e); + t.sort((n, r) => n - r); + if (!Go(this.u, t)) { + this.u = t; + i = true; + } + const s = this.w.every(n => n.isEmpty()); + if (this.n !== s) { + this.n = s; + i = true; + } + return i; + } + onThemeChanged(i) { + return this.z(); + } + onConfigurationChanged(i) { + const e = this.c.configuration.options; + const t = e.get(151); + this.f = e.get(101); + this.r = e.get(102); + this.g = t.isViewportWrapping; + this.h = t.contentLeft; + this.j = t.contentWidth; + return true; + } + onCursorStateChanged(i) { + this.w = i.selections; + return this.z(); + } + onFlushed(i) { + return true; + } + onLinesDeleted(i) { + return true; + } + onLinesInserted(i) { + return true; + } + onScrollChanged(i) { + return i.scrollWidthChanged || i.scrollTopChanged; + } + onZonesChanged(i) { + return true; + } + onFocusChanged(i) { + if (this.r) { + this.t = i.isFocused; + return true; + } else { + return false; + } + } + prepareRender(i) { + if (!this.G()) { + this.y = null; + return; + } + const e = i.visibleRange.startLineNumber; + const t = i.visibleRange.endLineNumber; + const s = []; + for (let r = e; r <= t; r++) { + const o = r - e; + s[o] = ""; + } + if (this.g) { + const r = this.I(i, false); + for (const o of this.u) { + const a = this.c.viewModel.coordinatesConverter; + const l = a.convertViewPositionToModelPosition(new je(o, 1)).lineNumber; + const c = a.convertModelPositionToViewPosition(new je(l, 1)).lineNumber; + const u = a.convertModelPositionToViewPosition(new je(l, this.c.viewModel.model.getLineMaxColumn(l))).lineNumber; + const d = Math.max(c, e); + const h = Math.min(u, t); + for (let g = d; g <= h; g++) { + const p = g - e; + s[p] = r; + } + } + } + const n = this.I(i, true); + for (const r of this.u) { + if (r < e || r > t) { + continue; + } + const o = r - e; + s[o] = n; + } + this.y = s; + } + render(i, e) { + if (!this.y) { + return ""; + } + const t = e - i; + if (t >= this.y.length) { + return ""; + } else { + return this.y[t]; + } + } + C() { + return (this.f === "gutter" || this.f === "all") && (!this.r || this.t); + } + F() { + return (this.f === "line" || this.f === "all") && this.n && (!this.r || this.t); + } + }; + fts = class extends a9t { + I(i, e) { + return `
`; + } + G() { + return this.F(); + } + H() { + return this.C(); + } + }; + gts = class extends a9t { + I(i, e) { + return `
`; + } + G() { + return true; + } + H() { + return this.F(); + } + }; + bf((i, e) => { + const t = i.getColor(xat); + 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; }`); + } + if (!t || t.isTransparent() || i.defines(Vj)) { + const s = i.getColor(Vj); + if (s) { + e.addRule(`.monaco-editor .view-overlays .current-line-exact { border: 2px solid ${s}; }`); + e.addRule(`.monaco-editor .margin-view-overlays .current-line-exact-margin { border: 2px solid ${s}; }`); + if (LI(i.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; }"); + } + } + } + }); + } +}); +var WJn = ue({ + "out-build/vs/editor/browser/viewParts/decorations/decorations.css"() {} +}); +var pts; +var VJn = ue({ + "out-build/vs/editor/browser/viewParts/decorations/decorations.js"() { + "use strict"; + + WJn(); + _9(); + ate(); + yt(); + pts = class extends m4 { + constructor(i) { + super(); + this.c = i; + const e = this.c.configuration.options; + this.f = e.get(52).typicalHalfwidthCharacterWidth; + this.g = null; + this.c.addEventHandler(this); + } + dispose() { + this.c.removeEventHandler(this); + this.g = null; + super.dispose(); + } + onConfigurationChanged(i) { + const e = this.c.configuration.options; + this.f = e.get(52).typicalHalfwidthCharacterWidth; + return true; + } + onDecorationsChanged(i) { + return true; + } + onFlushed(i) { + return true; + } + onLinesChanged(i) { + return true; + } + onLinesDeleted(i) { + return true; + } + onLinesInserted(i) { + return true; + } + onScrollChanged(i) { + return i.scrollTopChanged || i.scrollWidthChanged; + } + onZonesChanged(i) { + return true; + } + prepareRender(i) { + const e = i.getDecorationsInViewport(); + let t = []; + let s = 0; + for (let a = 0, l = e.length; a < l; a++) { + const c = e[a]; + if (c.options.className) { + t[s++] = c; + } + } + t = t.sort((a, l) => { + if (a.options.zIndex < l.options.zIndex) { + return -1; + } + if (a.options.zIndex > l.options.zIndex) { + return 1; + } + const c = a.options.className; + const u = l.options.className; + if (c < u) { + return -1; + } else if (c > u) { + return 1; + } else { + return Z.compareRangesUsingStarts(a.range, l.range); + } + }); + const n = i.visibleRange.startLineNumber; + const r = i.visibleRange.endLineNumber; + const o = []; + for (let a = n; a <= r; a++) { + const l = a - n; + o[l] = ""; + } + this.h(i, t, o); + this.n(i, t, o); + this.g = o; + } + h(i, e, t) { + const s = i.visibleRange.startLineNumber; + const n = i.visibleRange.endLineNumber; + for (let r = 0, o = e.length; r < o; r++) { + const a = e[r]; + if (!a.options.isWholeLine) { + continue; + } + const l = "
"; + const c = Math.max(a.range.startLineNumber, s); + const u = Math.min(a.range.endLineNumber, n); + for (let d = c; d <= u; d++) { + const h = d - s; + t[h] += l; + } + } + } + n(i, e, t) { + const s = i.visibleRange.startLineNumber; + let n = null; + let r = false; + let o = null; + let a = false; + for (let l = 0, c = e.length; l < c; l++) { + const u = e[l]; + if (u.options.isWholeLine) { + continue; + } + const d = u.options.className; + const h = !!u.options.showIfCollapsed; + let g = u.range; + if (h && g.endColumn === 1 && g.endLineNumber !== g.startLineNumber) { + g = new Z(g.startLineNumber, g.startColumn, g.endLineNumber - 1, this.c.viewModel.getLineMaxColumn(g.endLineNumber - 1)); + } + if (n === d && r === h && Z.areIntersectingOrTouching(o, g)) { + o = Z.plusRange(o, g); + continue; + } + if (n !== null) { + this.r(i, o, n, a, r, s, t); + } + n = d; + r = h; + o = g; + a = u.options.shouldFillLineOnLineBreak ?? false; + } + if (n !== null) { + this.r(i, o, n, a, r, s, t); + } + } + r(i, e, t, s, n, r, o) { + const a = i.linesVisibleRangesForRange(e, t === "findMatch"); + if (a) { + for (let l = 0, c = a.length; l < c; l++) { + const u = a[l]; + if (u.outsideRenderedLine) { + continue; + } + const d = u.lineNumber - r; + if (n && u.ranges.length === 1) { + const h = u.ranges[0]; + if (h.width < this.f) { + const g = Math.round(h.left + h.width / 2); + const p = Math.max(0, Math.round(g - this.f / 2)); + u.ranges[0] = new uat(p, this.f); + } + } + for (let h = 0, g = u.ranges.length; h < g; h++) { + const p = s && u.continuesOnNextLine && g === 1; + const b = u.ranges[h]; + const v = "
"; + o[d] += v; + } + } + } + } + render(i, e) { + if (!this.g) { + return ""; + } + const t = e - i; + if (t < 0 || t >= this.g.length) { + return ""; + } else { + return this.g[t]; + } + } + }; + } +}); +var mts; +var HJn = ue({ + "out-build/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.js"() { + "use strict"; + + xe(); + pf(); + Kg(); + Ow(); + gi(); + mts = class extends YC { + constructor(i, e, t, s) { + super(i); + const n = this._context.configuration.options; + const r = n.get(108); + const o = n.get(76); + const a = n.get(42); + const l = n.get(111); + const c = { + listenOnDomNode: t.domNode, + className: "editor-scrollable " + hpe(i.theme.type), + useShadows: false, + lazyRender: true, + 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, + ignoreVerticalScrolling: r.ignoreVerticalScrolling, + alwaysConsumeMouseWheel: r.alwaysConsumeMouseWheel, + arrowSize: r.arrowSize, + mouseWheelScrollSensitivity: o, + fastScrollSensitivity: a, + scrollPredominantAxis: l, + scrollByPage: r.scrollByPage + }; + this.a = this.D(new cte(e.domNode, c, this._context.viewLayout.getScrollable())); + JL.write(this.a.getDomNode(), 6); + this.b = nc(this.a.getDomNode()); + this.b.setPosition("absolute"); + this.c(); + const u = (d, h, g) => { + const p = {}; + if (h) { + const b = d.scrollTop; + if (b) { + p.scrollTop = this._context.viewLayout.getCurrentScrollTop() + b; + d.scrollTop = 0; + } + } + if (g) { + const b = d.scrollLeft; + if (b) { + p.scrollLeft = this._context.viewLayout.getCurrentScrollLeft() + b; + d.scrollLeft = 0; + } + } + this._context.viewModel.viewLayout.setScrollPosition(p, 1); + }; + this.D(Ce(t.domNode, "scroll", d => u(t.domNode, true, true))); + this.D(Ce(e.domNode, "scroll", d => u(e.domNode, true, false))); + this.D(Ce(s.domNode, "scroll", d => u(s.domNode, true, false))); + this.D(Ce(this.b.domNode, "scroll", d => u(this.b.domNode, true, false))); + } + dispose() { + super.dispose(); + } + c() { + const i = this._context.configuration.options; + const e = i.get(151); + this.b.setLeft(e.contentLeft); + if (i.get(74).side === "right") { + this.b.setWidth(e.contentWidth + e.minimap.minimapWidth); + } else { + this.b.setWidth(e.contentWidth); + } + this.b.setHeight(e.height); + } + getOverviewRulerLayoutInfo() { + return this.a.getOverviewRulerLayoutInfo(); + } + getDomNode() { + return this.b; + } + delegateVerticalScrollbarPointerDown(i) { + this.a.delegateVerticalScrollbarPointerDown(i); + } + delegateScrollFromMouseWheelEvent(i) { + this.a.delegateScrollFromMouseWheelEvent(i); + } + onConfigurationChanged(i) { + if (i.hasChanged(108) || i.hasChanged(76) || i.hasChanged(42)) { + const e = this._context.configuration.options; + const t = e.get(108); + const s = e.get(76); + const n = e.get(42); + const r = e.get(111); + const o = { + vertical: t.vertical, + horizontal: t.horizontal, + verticalScrollbarSize: t.verticalScrollbarSize, + horizontalScrollbarSize: t.horizontalScrollbarSize, + scrollByPage: t.scrollByPage, + handleMouseWheel: t.handleMouseWheel, + mouseWheelScrollSensitivity: s, + fastScrollSensitivity: n, + scrollPredominantAxis: r + }; + this.a.updateOptions(o); + } + if (i.hasChanged(151)) { + this.c(); + } + return true; + } + onScrollChanged(i) { + return true; + } + onThemeChanged(i) { + this.a.updateClassName("editor-scrollable " + hpe(this._context.theme.type)); + return true; + } + prepareRender(i) {} + render(i) { + this.a.renderNow(); + } + }; + } +}); +var qJn = ue({ + "out-build/vs/editor/browser/viewParts/glyphMargin/glyphMargin.css"() {} +}); +function jJn(i) { + return bts.test(i); +} +var bts; +var Ft; +var Ps = ue({ + "out-build/vs/base/common/uuid.js"() { + "use strict"; + + bts = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i; + Ft = function () { + if (typeof crypto == "object" && typeof crypto.randomUUID == "function") { + return crypto.randomUUID.bind(crypto); + } + let i; + if (typeof crypto == "object" && typeof crypto.getRandomValues == "function") { + i = crypto.getRandomValues.bind(crypto); + } else { + i = function (s) { + for (let n = 0; n < s.length; n++) { + s[n] = Math.floor(Math.random() * 256); + } + return s; + }; + } + const e = new Uint8Array(16); + const t = []; + for (let s = 0; s < 256; s++) { + t.push(s.toString(16).padStart(2, "0")); + } + return function () { + i(e); + e[6] = e[6] & 15 | 64; + e[8] = e[8] & 63 | 128; + let n = 0; + let r = ""; + r += t[e[n++]]; + r += t[e[n++]]; + r += t[e[n++]]; + r += t[e[n++]]; + r += "-"; + r += t[e[n++]]; + r += t[e[n++]]; + r += "-"; + r += t[e[n++]]; + r += t[e[n++]]; + r += "-"; + r += t[e[n++]]; + r += t[e[n++]]; + r += "-"; + r += t[e[n++]]; + r += t[e[n++]]; + r += t[e[n++]]; + r += t[e[n++]]; + r += t[e[n++]]; + r += t[e[n++]]; + return r; + }; + }(); + } +}); +var SM; +var pte = ue({ + "out-build/vs/platform/reactivestorage/common/reactiveStorageTypes2.js"() { + "use strict"; + + Ps(); + SM = class { + constructor() { + this.id = Ft(); + this.a = ""; + this.b = undefined; + this.c = new Map(); + this.d = new Map(); + this.e = new Map(); + this.f = new Map(); + this.g = () => {}; + this.h = new Map(); + } + setForceFocusNoScroll(i) { + this.g = i; + } + doForceFocusNoScroll() { + this.g(); + } + onTextChange(i) { + const e = Ft(); + this.c.set(e, i); + return () => { + this.c.delete(e); + }; + } + onFireEditNode(i) { + const e = Ft(); + this.d.set(e, i); + return () => { + this.d.delete(e); + }; + } + getText() { + return this.a; + } + getRichText() { + return this.b; + } + setText(i, e) { + if (i !== this.a || e !== this.b) { + this.a = i; + this.b = e; + for (const t of this.c.values()) { + t(i, e); + } + } + } + fireEditNode(i) { + for (const e of this.d.values()) { + e(i); + } + } + numSubmitListeners() { + return this.e.size; + } + onSubmit(i) { + const e = Ft(); + this.e.set(e, i); + return () => { + this.e.delete(e); + }; + } + submit() { + for (const i of this.e.values()) { + i(); + } + } + onFocus(i) { + const e = Ft(); + this.f.set(e, i); + return () => { + this.f.delete(e); + }; + } + notifyFocus() { + for (const i of this.f.values()) { + i(); + } + } + clear() { + this.a = ""; + for (const i of this.h.values()) { + i(); + } + } + onClear(i) { + const e = Ft(); + this.h.set(e, i); + return () => { + this.h.delete(e); + }; + } + }; + } +}); +function zJn(i) { + return i && typeof i.read == "function"; +} +function l9t(i) { + return !!i && !!i.uri; +} +function aF(i) { + return !i.isTooLargeForSyncing() && !i.isForSimpleWidget; +} +var Zd; +var Dx; +var vts; +var yts; +var l1; +var wts; +var Cts; +var Sts; +var Tat; +var mte; +var xts; +var kts; +var Ets; +var Its; +var gpe; +var Dts; +var Tts; +var gc = ue({ + "out-build/vs/editor/common/model.js"() { + "use strict"; + + Jr(); + pte(); + (function (i) { + i[i.Left = 1] = "Left"; + i[i.Center = 2] = "Center"; + i[i.Right = 4] = "Right"; + i[i.Full = 7] = "Full"; + })(Zd ||= {}); + (function (i) { + i[i.Left = 1] = "Left"; + i[i.Center = 2] = "Center"; + i[i.Right = 3] = "Right"; + })(Dx ||= {}); + (function (i) { + i[i.Inline = 1] = "Inline"; + i[i.Gutter = 2] = "Gutter"; + })(vts ||= {}); + (function (i) { + i[i.Normal = 1] = "Normal"; + i[i.Underlined = 2] = "Underlined"; + })(yts ||= {}); + (function (i) { + i[i.Both = 0] = "Both"; + i[i.Right = 1] = "Right"; + i[i.Left = 2] = "Left"; + i[i.None = 3] = "None"; + })(l1 ||= {}); + (function (i) { + i[i.TextDefined = 0] = "TextDefined"; + i[i.LF = 1] = "LF"; + i[i.CRLF = 2] = "CRLF"; + })(wts ||= {}); + (function (i) { + i[i.LF = 1] = "LF"; + i[i.CRLF = 2] = "CRLF"; + })(Cts ||= {}); + (function (i) { + i[i.LF = 0] = "LF"; + i[i.CRLF = 1] = "CRLF"; + })(Sts ||= {}); + Tat = class { + get originalIndentSize() { + if (this.a) { + return "tabSize"; + } else { + return this.indentSize; + } + } + constructor(i) { + this._textModelResolvedOptionsBrand = undefined; + this.tabSize = Math.max(1, i.tabSize | 0); + if (i.indentSize === "tabSize") { + this.indentSize = this.tabSize; + this.a = true; + } else { + this.indentSize = Math.max(1, i.indentSize | 0); + this.a = false; + } + this.insertSpaces = !!i.insertSpaces; + this.defaultEOL = i.defaultEOL | 0; + this.trimAutoWhitespace = !!i.trimAutoWhitespace; + this.bracketPairColorizationOptions = i.bracketPairColorizationOptions; + } + equals(i) { + return this.tabSize === i.tabSize && this.a === i.a && this.indentSize === i.indentSize && this.insertSpaces === i.insertSpaces && this.defaultEOL === i.defaultEOL && this.trimAutoWhitespace === i.trimAutoWhitespace && Ul(this.bracketPairColorizationOptions, i.bracketPairColorizationOptions); + } + createChangeEvent(i) { + return { + tabSize: this.tabSize !== i.tabSize, + indentSize: this.indentSize !== i.indentSize, + insertSpaces: this.insertSpaces !== i.insertSpaces, + trimAutoWhitespace: this.trimAutoWhitespace !== i.trimAutoWhitespace + }; + } + }; + mte = class { + constructor(i, e) { + this._findMatchBrand = undefined; + this.range = i; + this.matches = e; + } + }; + (function (i) { + i[i.AlwaysGrowsWhenTypingAtEdges = 0] = "AlwaysGrowsWhenTypingAtEdges"; + i[i.NeverGrowsWhenTypingAtEdges = 1] = "NeverGrowsWhenTypingAtEdges"; + i[i.GrowsOnlyWhenTypingBefore = 2] = "GrowsOnlyWhenTypingBefore"; + i[i.GrowsOnlyWhenTypingAfter = 3] = "GrowsOnlyWhenTypingAfter"; + })(xts ||= {}); + kts = () => ({ + topPromptBarData: { + selections: [], + selectedDocs: [], + lastGenerationUUID: undefined, + diffIds: [], + initText: "", + userBubbleDelegate: new SM(), + shown: false + } + }); + (function (i) { + i[i.Left = 0] = "Left"; + i[i.Right = 1] = "Right"; + i[i.None = 2] = "None"; + i[i.LeftOfInjectedText = 3] = "LeftOfInjectedText"; + i[i.RightOfInjectedText = 4] = "RightOfInjectedText"; + })(Ets ||= {}); + (function (i) { + i[i.FIRST_LINE_DETECTION_LENGTH_LIMIT = 1000] = "FIRST_LINE_DETECTION_LENGTH_LIMIT"; + })(Its ||= {}); + gpe = class { + constructor(i, e, t, s, n, r) { + this.identifier = i; + this.range = e; + this.text = t; + this.forceMoveMarkers = s; + this.isAutoWhitespaceEdit = n; + this._isTracked = r; + } + }; + Dts = class { + constructor(i, e, t) { + this.regex = i; + this.wordSeparators = e; + this.simpleSearch = t; + } + }; + Tts = class { + constructor(i, e, t) { + this.reverseEdits = i; + this.changes = e; + this.trimAutoWhitespaceLineNumbers = t; + } + }; + } +}); +var Pat; +var Pts; +var Lts; +var c9t; +var Rts; +var Nts; +var Mts; +var Ats; +var $ts; +var u9t = ue({ + "out-build/vs/editor/browser/viewParts/glyphMargin/glyphMargin.js"() { + "use strict"; + + pf(); + Jt(); + qJn(); + _9(); + Ow(); + Rs(); + yt(); + gc(); + Pat = class { + constructor(i, e, t, s, n) { + this.startLineNumber = i; + this.endLineNumber = e; + this.className = t; + this.tooltip = s; + this._decorationToRenderBrand = undefined; + this.zIndex = n ?? 0; + } + }; + Pts = class { + constructor(i, e, t) { + this.className = i; + this.zIndex = e; + this.tooltip = t; + } + }; + Lts = class { + constructor() { + this.c = []; + } + add(i) { + this.c.push(i); + } + getDecorations() { + return this.c; + } + }; + c9t = class extends m4 { + c(i, e, t) { + const s = []; + for (let o = i; o <= e; o++) { + const a = o - i; + s[a] = new Lts(); + } + if (t.length === 0) { + return s; + } + t.sort((o, a) => o.className === a.className ? o.startLineNumber === a.startLineNumber ? o.endLineNumber - a.endLineNumber : o.startLineNumber - a.startLineNumber : o.className < a.className ? -1 : 1); + let n = null; + let r = 0; + for (let o = 0, a = t.length; o < a; o++) { + const l = t[o]; + const c = l.className; + const u = l.zIndex; + let d = Math.max(l.startLineNumber, i) - i; + const h = Math.min(l.endLineNumber, e) - i; + if (n === c) { + d = Math.max(r + 1, d); + r = Math.max(r, h); + } else { + n = c; + r = h; + } + for (let g = d; g <= r; g++) { + s[g].add(new Pts(c, u, l.tooltip)); + } + } + return s; + } + }; + Rts = class extends YC { + constructor(i) { + super(i); + this.t = {}; + this._context = i; + const e = this._context.configuration.options; + const t = e.get(151); + this.domNode = nc(document.createElement("div")); + this.domNode.setClassName("glyph-margin-widgets"); + this.domNode.setPosition("absolute"); + this.domNode.setTop(0); + this.c = e.get(68); + this.f = e.get(59); + this.g = t.glyphMarginLeft; + this.h = t.glyphMarginWidth; + this.j = t.glyphMarginDecorationLaneCount; + this.n = []; + this.s = []; + } + dispose() { + this.n = []; + this.s = []; + this.t = {}; + super.dispose(); + } + getWidgets() { + return Object.values(this.t); + } + onConfigurationChanged(i) { + const e = this._context.configuration.options; + const t = e.get(151); + this.c = e.get(68); + this.f = e.get(59); + this.g = t.glyphMarginLeft; + this.h = t.glyphMarginWidth; + this.j = t.glyphMarginDecorationLaneCount; + return true; + } + onDecorationsChanged(i) { + return true; + } + onFlushed(i) { + return true; + } + onLinesChanged(i) { + return true; + } + onLinesDeleted(i) { + return true; + } + onLinesInserted(i) { + return true; + } + onScrollChanged(i) { + return i.scrollTopChanged; + } + onZonesChanged(i) { + return true; + } + addWidget(i) { + const e = nc(i.getDomNode()); + this.t[i.getId()] = { + widget: i, + preference: i.getPosition(), + domNode: e, + renderInfo: null + }; + e.setPosition("absolute"); + e.setDisplay("none"); + e.setAttribute("widgetId", i.getId()); + this.domNode.appendChild(e); + this.q(); + } + setWidgetPosition(i, e) { + const t = this.t[i.getId()]; + if (t.preference.lane === e.lane && t.preference.zIndex === e.zIndex && Z.equalsRange(t.preference.range, e.range)) { + return false; + } else { + t.preference = e; + this.q(); + return true; + } + } + removeWidget(i) { + const e = i.getId(); + if (this.t[e]) { + const s = this.t[e].domNode.domNode; + delete this.t[e]; + s.remove(); + this.q(); + } + } + u(i, e) { + const t = i.visibleRange.startLineNumber; + const s = i.visibleRange.endLineNumber; + const n = i.getDecorationsInViewport(); + for (const r of n) { + const o = r.options.glyphMarginClassName; + if (!o) { + continue; + } + const a = Math.max(r.range.startLineNumber, t); + const l = Math.min(r.range.endLineNumber, s); + const c = r.options.glyphMargin?.position ?? Dx.Center; + const u = r.options.zIndex ?? 0; + for (let d = a; d <= l; d++) { + const h = this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new je(d, 0)); + const g = this._context.viewModel.glyphLanes.getLanesAtLine(h.lineNumber).indexOf(c); + e.push(new Mts(d, g, u, o)); + } + } + } + w(i, e) { + const t = i.visibleRange.startLineNumber; + const s = i.visibleRange.endLineNumber; + for (const n of Object.values(this.t)) { + const r = n.preference.range; + const { + startLineNumber: o, + endLineNumber: a + } = this._context.viewModel.coordinatesConverter.convertModelRangeToViewRange(Z.lift(r)); + if (!o || !a || a < t || o > s) { + continue; + } + const l = Math.max(o, t); + const c = this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new je(l, 0)); + const u = this._context.viewModel.glyphLanes.getLanesAtLine(c.lineNumber).indexOf(n.preference.lane); + e.push(new Ats(l, u, n.preference.zIndex, n)); + } + } + y(i) { + const e = []; + this.u(i, e); + this.w(i, e); + e.sort((t, s) => t.lineNumber === s.lineNumber ? t.laneIndex === s.laneIndex ? t.zIndex === s.zIndex ? s.type === t.type ? t.type === 0 && s.type === 0 ? t.className < s.className ? -1 : 1 : 0 : s.type - t.type : s.zIndex - t.zIndex : t.laneIndex - s.laneIndex : t.lineNumber - s.lineNumber); + return e; + } + prepareRender(i) { + if (!this.f) { + this.s = []; + return; + } + for (const s of Object.values(this.t)) { + s.renderInfo = null; + } + const e = new EL(this.y(i)); + const t = []; + while (e.length > 0) { + const s = e.peek(); + if (!s) { + break; + } + const n = e.takeWhile(o => o.lineNumber === s.lineNumber && o.laneIndex === s.laneIndex); + if (!n || n.length === 0) { + break; + } + const r = n[0]; + if (r.type === 0) { + const o = []; + for (const a of n) { + if (a.zIndex !== r.zIndex || a.type !== r.type) { + break; + } + if (o.length === 0 || o[o.length - 1] !== a.className) { + o.push(a.className); + } + } + t.push(r.accept(o.join(" "))); + } else { + r.widget.renderInfo = { + lineNumber: r.lineNumber, + laneIndex: r.laneIndex + }; + } + } + this.s = t; + } + render(i) { + if (!this.f) { + for (const t of Object.values(this.t)) { + t.domNode.setDisplay("none"); + } + while (this.n.length > 0) { + this.n.pop()?.domNode.remove(); + } + return; + } + const e = Math.round(this.h / this.j); + for (const t of Object.values(this.t)) { + if (!t.renderInfo) { + t.domNode.setDisplay("none"); + } else { + const s = i.viewportData.relativeVerticalOffset[t.renderInfo.lineNumber - i.viewportData.startLineNumber]; + const n = this.g + t.renderInfo.laneIndex * this.c; + t.domNode.setDisplay("block"); + t.domNode.setTop(s); + t.domNode.setLeft(n); + t.domNode.setWidth(e); + t.domNode.setHeight(this.c); + } + } + for (let t = 0; t < this.s.length; t++) { + const s = this.s[t]; + const n = i.viewportData.relativeVerticalOffset[s.lineNumber - i.viewportData.startLineNumber]; + const r = this.g + s.laneIndex * this.c; + let o; + if (t < this.n.length) { + o = this.n[t]; + } else { + o = nc(document.createElement("div")); + this.n.push(o); + this.domNode.appendChild(o); + } + o.setClassName("cgmr codicon " + s.combinedClassName); + o.setPosition("absolute"); + o.setTop(n); + o.setLeft(r); + o.setWidth(e); + o.setHeight(this.c); + } + while (this.n.length > this.s.length) { + this.n.pop()?.domNode.remove(); + } + } + }; + (function (i) { + i[i.Decoration = 0] = "Decoration"; + i[i.Widget = 1] = "Widget"; + })(Nts ||= {}); + Mts = class { + constructor(i, e, t, s) { + this.lineNumber = i; + this.laneIndex = e; + this.zIndex = t; + this.className = s; + this.type = 0; + } + accept(i) { + return new $ts(this.lineNumber, this.laneIndex, i); + } + }; + Ats = class { + constructor(i, e, t, s) { + this.lineNumber = i; + this.laneIndex = e; + this.zIndex = t; + this.widget = s; + this.type = 1; + } + }; + $ts = class { + constructor(i, e, t) { + this.lineNumber = i; + this.laneIndex = e; + this.combinedClassName = t; + } + }; + } +}); +var JJn = ue({ + "out-build/vs/editor/browser/viewParts/indentGuides/indentGuides.css"() {} +}); +var d9t; +var Fts = ue({ + "out-build/vs/editor/common/model/textModelPart.js"() { + "use strict"; + + q(); + d9t = class extends H { + constructor() { + super(...arguments); + this.f = false; + } + dispose() { + super.dispose(); + this.f = true; + } + g() { + if (this.f) { + throw new Error("TextModelPart is disposed!"); + } + } + }; + } +}); +function Lat(i, e) { + let t = 0; + let s = 0; + const n = i.length; + while (s < n) { + const r = i.charCodeAt(s); + if (r === 32) { + t++; + } else if (r === 9) { + t = t - t % e + e; + } else { + break; + } + s++; + } + if (s === n) { + return -1; + } else { + return t; + } +} +var h9t = ue({ + "out-build/vs/editor/common/model/utils.js"() { + "use strict"; + } +}); +var Hj; +var B9; +var bte; +var f9t = ue({ + "out-build/vs/editor/common/textModelGuides.js"() { + "use strict"; + + (function (i) { + i[i.Disabled = 0] = "Disabled"; + i[i.EnabledForActive = 1] = "EnabledForActive"; + i[i.Enabled = 2] = "Enabled"; + })(Hj ||= {}); + B9 = class { + constructor(i, e, t, s, n, r) { + this.visibleColumn = i; + this.column = e; + this.className = t; + this.horizontalLine = s; + this.forWrappedLinesAfterColumn = n; + this.forWrappedLinesBeforeOrAtColumn = r; + if (i !== -1 == (e !== -1)) { + throw new Error(); + } + } + }; + bte = class { + constructor(i, e) { + this.top = i; + this.endColumn = e; + } + }; + } +}); +var Ots; +var g9t; +var _ts = ue({ + "out-build/vs/editor/common/model/guidesTextModelPart.js"() { + "use strict"; + + qg(); + $i(); + TT(); + yt(); + Fts(); + h9t(); + f9t(); + Ut(); + Ots = class extends d9t { + constructor(i, e) { + super(); + this.c = i; + this.h = e; + } + j(i) { + return this.h.getLanguageConfiguration(i); + } + m(i) { + return Lat(this.c.getLineContent(i + 1), this.c.getOptions().tabSize); + } + getActiveIndentGuide(i, e, t) { + this.g(); + const s = this.c.getLineCount(); + if (i < 1 || i > s) { + throw new co("Illegal value for lineNumber"); + } + const n = this.j(this.c.getLanguageId()).foldingRules; + const r = !!n && !!n.offSide; + let o = -2; + let a = -1; + let l = -2; + let c = -1; + const u = k => { + if (o !== -1 && (o === -2 || o > k - 1)) { + o = -1; + a = -1; + for (let E = k - 2; E >= 0; E--) { + const D = this.m(E); + if (D >= 0) { + o = E; + a = D; + break; + } + } + } + if (l === -2) { + l = -1; + c = -1; + for (let E = k; E < s; E++) { + const D = this.m(E); + if (D >= 0) { + l = E; + c = D; + break; + } + } + } + }; + let d = -2; + let h = -1; + let g = -2; + let p = -1; + const b = k => { + if (d === -2) { + d = -1; + h = -1; + for (let E = k - 2; E >= 0; E--) { + const D = this.m(E); + if (D >= 0) { + d = E; + h = D; + break; + } + } + } + if (g !== -1 && (g === -2 || g < k - 1)) { + g = -1; + p = -1; + for (let E = k; E < s; E++) { + const D = this.m(E); + if (D >= 0) { + g = E; + p = D; + break; + } + } + } + }; + let v = 0; + let y = true; + let w = 0; + let C = true; + let S = 0; + let x = 0; + for (let k = 0; y || C; k++) { + const E = i - k; + const D = i + k; + if (k > 1 && (E < 1 || E < e)) { + y = false; + } + if (k > 1 && (D > s || D > t)) { + C = false; + } + if (k > 50000) { + y = false; + C = false; + } + let P = -1; + if (y && E >= 1) { + const L = this.m(E - 1); + if (L >= 0) { + l = E - 1; + c = L; + P = Math.ceil(L / this.c.getOptions().indentSize); + } else { + u(E); + P = this.q(r, a, c); + } + } + let R = -1; + if (C && D <= s) { + const L = this.m(D - 1); + if (L >= 0) { + d = D - 1; + h = L; + R = Math.ceil(L / this.c.getOptions().indentSize); + } else { + b(D); + R = this.q(r, h, p); + } + } + if (k === 0) { + x = P; + continue; + } + if (k === 1) { + if (D <= s && R >= 0 && x + 1 === R) { + y = false; + v = D; + w = D; + S = R; + continue; + } + if (E >= 1 && P >= 0 && P - 1 === x) { + C = false; + v = E; + w = E; + S = P; + continue; + } + v = i; + w = i; + S = x; + if (S === 0) { + return { + startLineNumber: v, + endLineNumber: w, + indent: S + }; + } + } + if (y) { + if (P >= S) { + v = E; + } else { + y = false; + } + } + if (C) { + if (R >= S) { + w = D; + } else { + C = false; + } + } + } + return { + startLineNumber: v, + endLineNumber: w, + indent: S + }; + } + getLinesBracketGuides(i, e, t, s) { + const n = []; + for (let u = i; u <= e; u++) { + n.push([]); + } + const r = true; + const o = this.c.bracketPairs.getBracketPairsInRangeWithMinIndentation(new Z(i, 1, e, this.c.getLineMaxColumn(e))).toArray(); + let a; + if (t && o.length > 0) { + const u = (i <= t.lineNumber && t.lineNumber <= e ? o : this.c.bracketPairs.getBracketPairsInRange(Z.fromPositions(t)).toArray()).filter(d => Z.strictContainsPosition(d.range, t)); + a = oM(u, d => r || d.range.startLineNumber !== d.range.endLineNumber)?.range; + } + const l = this.c.getOptions().bracketPairColorizationOptions.independentColorPoolPerBracketType; + const c = new g9t(); + for (const u of o) { + if (!u.closingBracketRange) { + continue; + } + const d = a && u.range.equalsRange(a); + if (!d && !s.includeInactive) { + continue; + } + const h = c.getInlineClassName(u.nestingLevel, u.nestingLevelOfEqualBracketType, l) + (s.highlightActive && d ? " " + c.activeClassName : ""); + const g = u.openingBracketRange.getStartPosition(); + const p = u.closingBracketRange.getStartPosition(); + const b = s.horizontalGuides === Hj.Enabled || s.horizontalGuides === Hj.EnabledForActive && d; + if (u.range.startLineNumber === u.range.endLineNumber) { + if (r && b) { + n[u.range.startLineNumber - i].push(new B9(-1, u.openingBracketRange.getEndPosition().column, h, new bte(false, p.column), -1, -1)); + } + continue; + } + const v = this.n(p); + const y = this.n(u.openingBracketRange.getStartPosition()); + const w = Math.min(y, v, u.minVisibleColumnIndentation + 1); + let C = false; + if (B0(this.c.getLineContent(u.closingBracketRange.startLineNumber)) < u.closingBracketRange.startColumn - 1) { + C = true; + } + const k = Math.max(g.lineNumber, i); + const E = Math.min(p.lineNumber, e); + const D = C ? 1 : 0; + for (let P = k; P < E + D; P++) { + n[P - i].push(new B9(w, -1, h, null, P === g.lineNumber ? g.column : -1, P === p.lineNumber ? p.column : -1)); + } + if (b) { + if (g.lineNumber >= i && y > w) { + n[g.lineNumber - i].push(new B9(w, -1, h, new bte(false, g.column), -1, -1)); + } + if (p.lineNumber <= e && v > w) { + n[p.lineNumber - i].push(new B9(w, -1, h, new bte(!C, p.column), -1, -1)); + } + } + } + for (const u of n) { + u.sort((d, h) => d.visibleColumn - h.visibleColumn); + } + return n; + } + n(i) { + return pp.visibleColumnFromColumn(this.c.getLineContent(i.lineNumber), i.column, this.c.getOptions().tabSize) + 1; + } + getLinesIndentGuides(i, e) { + this.g(); + const t = this.c.getLineCount(); + if (i < 1 || i > t) { + throw new Error("Illegal value for startLineNumber"); + } + if (e < 1 || e > t) { + throw new Error("Illegal value for endLineNumber"); + } + const s = this.c.getOptions(); + const n = this.j(this.c.getLanguageId()).foldingRules; + const r = !!n && !!n.offSide; + const o = new Array(e - i + 1); + let a = -2; + let l = -1; + let c = -2; + let u = -1; + for (let d = i; d <= e; d++) { + const h = d - i; + const g = this.m(d - 1); + if (g >= 0) { + a = d - 1; + l = g; + o[h] = Math.ceil(g / s.indentSize); + continue; + } + if (a === -2) { + a = -1; + l = -1; + for (let p = d - 2; p >= 0; p--) { + const b = this.m(p); + if (b >= 0) { + a = p; + l = b; + break; + } + } + } + if (c !== -1 && (c === -2 || c < d - 1)) { + c = -1; + u = -1; + for (let p = d; p < t; p++) { + const b = this.m(p); + if (b >= 0) { + c = p; + u = b; + break; + } + } + } + o[h] = this.q(r, l, u); + } + return o; + } + q(i, e, t) { + const s = this.c.getOptions(); + if (e === -1 || t === -1) { + return 0; + } else if (e < t) { + return 1 + Math.floor(e / s.indentSize); + } else if (e === t || i) { + return Math.ceil(t / s.indentSize); + } else { + return 1 + Math.floor(t / s.indentSize); + } + } + }; + g9t = class { + constructor() { + this.activeClassName = "indent-active"; + } + getInlineClassName(i, e, t) { + return this.getInlineClassNameOfLevel(t ? e : i); + } + getInlineClassNameOfLevel(i) { + return `bracket-indent-guide lvl-${i % 30}`; + } + }; + } +}); +function vte(i) { + if (!i || !i.isTransparent()) { + return i; + } +} +var Bts; +var GJn = ue({ + "out-build/vs/editor/browser/viewParts/indentGuides/indentGuides.js"() { + "use strict"; + + JJn(); + _9(); + z0(); + gi(); + Rs(); + Jt(); + zt(); + _ts(); + f9t(); + Bts = class extends m4 { + constructor(i) { + super(); + this.a = i; + this.b = null; + const e = this.a.configuration.options; + const t = e.get(152); + const s = e.get(52); + this.f = s.spaceWidth; + this.j = t.wrappingColumn === -1 ? -1 : t.wrappingColumn * s.typicalHalfwidthCharacterWidth; + this.n = e.get(16); + this.h = null; + this.a.addEventHandler(this); + } + dispose() { + this.a.removeEventHandler(this); + this.h = null; + super.dispose(); + } + onConfigurationChanged(i) { + const e = this.a.configuration.options; + const t = e.get(152); + const s = e.get(52); + this.f = s.spaceWidth; + this.j = t.wrappingColumn === -1 ? -1 : t.wrappingColumn * s.typicalHalfwidthCharacterWidth; + this.n = e.get(16); + return true; + } + onCursorStateChanged(i) { + const t = i.selections[0].getPosition(); + if (this.b?.equals(t)) { + return false; + } else { + this.b = t; + return true; + } + } + onDecorationsChanged(i) { + return true; + } + onFlushed(i) { + return true; + } + onLinesChanged(i) { + return true; + } + onLinesDeleted(i) { + return true; + } + onLinesInserted(i) { + return true; + } + onScrollChanged(i) { + return i.scrollTopChanged; + } + onZonesChanged(i) { + return true; + } + onLanguageConfigurationChanged(i) { + return true; + } + prepareRender(i) { + if (!this.n.indentation && this.n.bracketPairs === false) { + this.h = null; + return; + } + const e = i.visibleRange.startLineNumber; + const t = i.visibleRange.endLineNumber; + const s = i.scrollWidth; + const n = this.b; + const r = this.r(e, Math.min(t + 1, this.a.viewModel.getLineCount()), n); + const o = []; + for (let a = e; a <= t; a++) { + const l = a - e; + const c = r[l]; + let u = ""; + const d = i.visibleRangeForPosition(new je(a, 1))?.left ?? 0; + for (const h of c) { + const g = h.column === -1 ? d + (h.visibleColumn - 1) * this.f : i.visibleRangeForPosition(new je(a, h.column)).left; + if (g > s || this.j > 0 && g > this.j) { + break; + } + const p = h.horizontalLine ? h.horizontalLine.top ? "horizontal-top" : "horizontal-bottom" : "vertical"; + const b = h.horizontalLine ? (i.visibleRangeForPosition(new je(a, h.horizontalLine.endColumn))?.left ?? g + this.f) - g : this.f; + u += `
`; + } + o[l] = u; + } + this.h = o; + } + r(i, e, t) { + const s = this.n.bracketPairs !== false ? this.a.viewModel.getBracketGuidesInRangeByLine(i, e, t, { + highlightActive: this.n.highlightActiveBracketPair, + horizontalGuides: this.n.bracketPairsHorizontal === true ? Hj.Enabled : this.n.bracketPairsHorizontal === "active" ? Hj.EnabledForActive : Hj.Disabled, + includeInactive: this.n.bracketPairs === true + }) : null; + const n = this.n.indentation ? this.a.viewModel.getLinesIndentGuides(i, e) : null; + let r = 0; + let o = 0; + let a = 0; + if (this.n.highlightActiveIndentation !== false && t) { + const u = this.a.viewModel.getActiveIndentGuide(t.lineNumber, i, e); + r = u.startLineNumber; + o = u.endLineNumber; + a = u.indent; + } + const { + indentSize: l + } = this.a.viewModel.model.getOptions(); + const c = []; + for (let u = i; u <= e; u++) { + const d = new Array(); + c.push(d); + const h = s ? s[u - i] : []; + const g = new EL(h); + const p = n ? n[u - i] : 0; + for (let b = 1; b <= p; b++) { + const v = (b - 1) * l + 1; + const y = (this.n.highlightActiveIndentation === "always" || h.length === 0) && r <= u && u <= o && b === a; + d.push(...(g.takeWhile(C => C.visibleColumn < v) || [])); + const w = g.peek(); + if (!w || w.visibleColumn !== v || w.horizontalLine) { + d.push(new B9(v, -1, `core-guide-indent lvl-${(b - 1) % 30}${y ? " indent-active" : ""}`, null, -1, -1)); + } + } + d.push(...(g.takeWhile(b => true) || [])); + } + return c; + } + render(i, e) { + if (!this.h) { + return ""; + } + const t = e - i; + if (t < 0 || t >= this.h.length) { + return ""; + } else { + return this.h[t]; + } + } + }; + bf((i, e) => { + const t = [{ + bracketColor: t9t, + guideColor: tts, + guideColorActive: ats + }, { + bracketColor: i9t, + guideColor: its, + guideColorActive: lts + }, { + bracketColor: s9t, + guideColor: sts, + guideColorActive: cts + }, { + bracketColor: n9t, + guideColor: nts, + guideColorActive: uts + }, { + bracketColor: r9t, + guideColor: rts, + guideColorActive: dts + }, { + bracketColor: o9t, + guideColor: ots, + guideColorActive: hts + }]; + const s = new g9t(); + const n = [{ + indentColor: Q3t, + indentColorActive: Z3t + }, { + indentColor: Fes, + indentColorActive: Wes + }, { + indentColor: Oes, + indentColorActive: Ves + }, { + indentColor: _es, + indentColorActive: Hes + }, { + indentColor: Bes, + indentColorActive: qes + }, { + indentColor: Ues, + indentColorActive: jes + }]; + const r = t.map(a => { + const l = i.getColor(a.bracketColor); + const c = i.getColor(a.guideColor); + const u = i.getColor(a.guideColorActive); + const d = vte(vte(c) ?? l?.transparent(0.3)); + const h = vte(vte(u) ?? l); + if (!!d && !!h) { + return { + guideColor: d, + guideColorActive: h + }; + } + }).filter(to); + const o = n.map(a => { + const l = i.getColor(a.indentColor); + const c = i.getColor(a.indentColorActive); + const u = vte(l); + const d = vte(c); + if (!!u && !!d) { + return { + indentColor: u, + indentColorActive: d + }; + } + }).filter(to); + if (r.length > 0) { + for (let a = 0; a < 30; a++) { + const l = r[a % r.length]; + e.addRule(`.monaco-editor .${s.getInlineClassNameOfLevel(a).replace(/ /g, ".")} { --guide-color: ${l.guideColor}; --guide-color-active: ${l.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.${s.activeClassName} { box-shadow: 1px 0 0 0 var(--guide-color-active) inset; }`); + e.addRule(`.monaco-editor .horizontal-top.${s.activeClassName} { border-top: 1px solid var(--guide-color-active); }`); + e.addRule(`.monaco-editor .horizontal-bottom.${s.activeClassName} { border-bottom: 1px solid var(--guide-color-active); }`); + } + if (o.length > 0) { + for (let a = 0; a < 30; a++) { + const l = o[a % o.length]; + e.addRule(`.monaco-editor .lines-content .core-guide-indent.lvl-${a} { --indent-color: ${l.indentColor}; --indent-color-active: ${l.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; }"); + } + }); + } +}); +var KJn = ue({ + "out-build/vs/editor/browser/viewParts/lineNumbers/lineNumbers.css"() {} +}); +var p9t; +var Uts = ue({ + "out-build/vs/editor/browser/viewParts/lineNumbers/lineNumbers.js"() { + "use strict"; + + KJn(); + rt(); + _9(); + Rs(); + yt(); + gi(); + z0(); + p9t = class VFn extends m4 { + static { + this.CLASS_NAME = "line-numbers"; + } + constructor(e) { + super(); + this.c = e; + this.w(); + this.s = new je(1, 1); + this.t = null; + this.u = 1; + this.c.addEventHandler(this); + } + w() { + const e = this.c.configuration.options; + this.f = e.get(68); + const t = e.get(69); + this.g = t.renderType; + this.h = t.renderFn; + this.j = e.get(100); + const s = e.get(151); + this.n = s.lineNumbersLeft; + this.r = s.lineNumbersWidth; + } + dispose() { + this.c.removeEventHandler(this); + this.t = null; + super.dispose(); + } + onConfigurationChanged(e) { + this.w(); + return true; + } + onCursorStateChanged(e) { + const t = e.selections[0].getPosition(); + this.s = this.c.viewModel.coordinatesConverter.convertViewPositionToModelPosition(t); + let s = false; + if (this.u !== t.lineNumber) { + this.u = t.lineNumber; + s = true; + } + if (this.g === 2 || this.g === 3) { + s = true; + } + return s; + } + onFlushed(e) { + return true; + } + onLinesChanged(e) { + return true; + } + onLinesDeleted(e) { + return true; + } + onLinesInserted(e) { + return true; + } + onScrollChanged(e) { + return e.scrollTopChanged; + } + onZonesChanged(e) { + return true; + } + onDecorationsChanged(e) { + return e.affectsLineNumber; + } + y(e) { + const t = this.c.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new je(e, 1)); + if (t.column !== 1) { + return ""; + } + const s = t.lineNumber; + if (this.h) { + return this.h(s); + } + if (this.g === 2) { + const n = Math.abs(this.s.lineNumber - s); + if (n === 0) { + return "" + s + ""; + } else { + return String(n); + } + } + if (this.g === 3) { + if (this.s.lineNumber === s || s % 10 === 0) { + return String(s); + } + const n = this.c.viewModel.getLineCount(); + if (s === n) { + return String(s); + } else { + return ""; + } + } + return String(s); + } + prepareRender(e) { + if (this.g === 0) { + this.t = null; + return; + } + const t = yl ? this.f % 2 === 0 ? " lh-even" : " lh-odd" : ""; + const s = e.visibleRange.startLineNumber; + const n = e.visibleRange.endLineNumber; + const r = this.c.viewModel.getDecorationsInViewport(e.visibleRange).filter(c => !!c.options.lineNumberClassName); + r.sort((c, u) => Z.compareRangesUsingEnds(c.range, u.range)); + let o = 0; + const a = this.c.viewModel.getLineCount(); + const l = []; + for (let c = s; c <= n; c++) { + const u = c - s; + let d = this.y(c); + let h = ""; + while (o < r.length && r[o].range.endLineNumber < c) { + o++; + } + for (let g = o; g < r.length; g++) { + const { + range: p, + options: b + } = r[g]; + if (p.startLineNumber <= c) { + h += " " + b.lineNumberClassName; + } + } + if (!d && !h) { + l[u] = ""; + continue; + } + if (c === a && this.c.viewModel.getLineLength(c) === 0) { + if (this.j === "off") { + d = ""; + } + if (this.j === "dimmed") { + h += " dimmed-line-number"; + } + } + if (c === this.u) { + h += " active-line-number"; + } + l[u] = `
${d}
`; + } + this.t = l; + } + render(e, t) { + if (!this.t) { + return ""; + } + const s = t - e; + if (s < 0 || s >= this.t.length) { + return ""; + } else { + return this.t[s]; + } + } + }; + bf((i, e) => { + const t = i.getColor(Mes); + const s = i.getColor(Jes); + if (s) { + e.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${s}; }`); + } else if (t) { + e.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${t.transparent(0.4)}; }`); + } + }); + } +}); +var YJn = ue({ + "out-build/vs/base/browser/ui/mouseCursor/mouseCursor.css"() {} +}); +var xM; +var yte = ue({ + "out-build/vs/base/browser/ui/mouseCursor/mouseCursor.js"() { + "use strict"; + + YJn(); + xM = "monaco-mouse-cursor-text"; + } +}); +var XJn = ue({ + "out-build/vs/editor/browser/viewParts/viewLines/viewLines.css"() {} +}); +var Rat; +var QJn = ue({ + "out-build/vs/editor/browser/viewParts/viewLines/domReadingContext.js"() { + "use strict"; + + Rat = class { + get didDomLayout() { + return this.a; + } + e() { + if (!this.d) { + this.d = true; + const i = this.f.getBoundingClientRect(); + this.markDidDomLayout(); + this.b = i.left; + this.c = i.width / this.f.offsetWidth; + } + } + get clientRectDeltaLeft() { + if (!this.d) { + this.e(); + } + return this.b; + } + get clientRectScale() { + if (!this.d) { + this.e(); + } + return this.c; + } + constructor(i, e) { + this.f = i; + this.endNode = e; + this.a = false; + this.b = 0; + this.c = 1; + this.d = false; + } + markDidDomLayout() { + this.a = true; + } + }; + } +}); +var ppe; +var m9t = ue({ + "out-build/vs/editor/browser/viewParts/viewLines/viewLineOptions.js"() { + "use strict"; + + ppe = class { + constructor(i, e) { + this.themeType = e; + const t = i.options; + const s = t.get(52); + if (t.get(40) === "off") { + this.renderWhitespace = t.get(104); + } else { + this.renderWhitespace = "none"; + } + this.renderControlCharacters = t.get(99); + this.spaceWidth = s.spaceWidth; + this.middotWidth = s.middotWidth; + this.wsmiddotWidth = s.wsmiddotWidth; + this.useMonospaceOptimizations = s.isMonospace && !t.get(33); + this.canUseHalfwidthRightwardsArrow = s.canUseHalfwidthRightwardsArrow; + this.lineHeight = t.get(68); + this.stopRenderingLineAfter = t.get(122); + this.fontLigatures = t.get(53); + this.useGpu = t.get(39) === "on"; + } + equals(i) { + return this.themeType === i.themeType && this.renderWhitespace === i.renderWhitespace && this.renderControlCharacters === i.renderControlCharacters && this.spaceWidth === i.spaceWidth && this.middotWidth === i.middotWidth && this.wsmiddotWidth === i.wsmiddotWidth && this.useMonospaceOptimizations === i.useMonospaceOptimizations && this.canUseHalfwidthRightwardsArrow === i.canUseHalfwidthRightwardsArrow && this.lineHeight === i.lineHeight && this.stopRenderingLineAfter === i.stopRenderingLineAfter && this.fontLigatures === i.fontLigatures && this.useGpu === i.useGpu; + } + }; + } +}); +var Wts; +var Vts; +var Hts; +var qts; +var ZJn = ue({ + "out-build/vs/editor/browser/viewParts/viewLines/viewLines.js"() { + "use strict"; + + yte(); + nt(); + rt(); + XJn(); + s1(); + ate(); + H3t(); + Ow(); + QJn(); + L3t(); + Rs(); + yt(); + m9t(); + Wts = class { + constructor() { + this.a = new Z(1, 1, 1, 1); + } + getCurrentVisibleRange() { + return this.a; + } + setCurrentVisibleRange(i) { + this.a = i; + } + }; + Vts = class { + constructor(i, e, t, s, n, r, o) { + this.minimalReveal = i; + this.lineNumber = e; + this.startColumn = t; + this.endColumn = s; + this.startScrollTop = n; + this.stopScrollTop = r; + this.scrollType = o; + this.type = "range"; + this.minLineNumber = e; + this.maxLineNumber = e; + } + }; + Hts = class { + constructor(i, e, t, s, n) { + this.minimalReveal = i; + this.selections = e; + this.startScrollTop = t; + this.stopScrollTop = s; + this.scrollType = n; + this.type = "selections"; + let r = e[0].startLineNumber; + let o = e[0].endLineNumber; + for (let a = 1, l = e.length; a < l; a++) { + const c = e[a]; + r = Math.min(r, c.startLineNumber); + o = Math.max(o, c.endLineNumber); + } + this.minLineNumber = r; + this.maxLineNumber = o; + } + }; + qts = class HFn extends YC { + static { + this.a = 30; + } + constructor(e, t, s) { + super(e); + const n = this._context.configuration; + const r = this._context.configuration.options; + const o = r.get(52); + const a = r.get(152); + this.h = r.get(68); + this.j = o.typicalHalfwidthCharacterWidth; + this.n = a.isViewportWrapping; + this.s = r.get(105); + this.t = r.get(29); + this.u = r.get(30); + this.w = !r.get(32); + this.y = new ppe(n, this._context.theme.type); + this.b = s; + this.c = document.createElement("div"); + this.f = new V3t({ + createLine: () => new F9(t, this.y) + }); + this.g = this.f.domNode; + JL.write(this.g, 8); + this.g.setClassName(`view-lines ${xM}`); + Hm(this.g, o); + this.z = 0; + this.C = new Vn(() => { + this.Q(); + }, 200); + this.F = new Vn(() => { + this.U(); + }, 2000); + this.H = new Wts(); + this.G = null; + this.I = r.get(120).enabled; + this.J = r.get(120).maxLineCount; + } + dispose() { + this.C.dispose(); + this.F.dispose(); + super.dispose(); + } + getDomNode() { + return this.g; + } + onConfigurationChanged(e) { + this.f.onConfigurationChanged(e); + if (e.hasChanged(152)) { + this.z = 0; + } + const t = this._context.configuration.options; + const s = t.get(52); + const n = t.get(152); + this.h = t.get(68); + this.j = s.typicalHalfwidthCharacterWidth; + this.n = n.isViewportWrapping; + this.s = t.get(105); + this.t = t.get(29); + this.u = t.get(30); + this.w = !t.get(32); + this.I = t.get(120).enabled; + this.J = t.get(120).maxLineCount; + Hm(this.g, s); + this.L(); + if (e.hasChanged(151)) { + this.z = 0; + } + return true; + } + L() { + const e = this._context.configuration; + const t = new ppe(e, this._context.theme.type); + if (!this.y.equals(t)) { + this.y = t; + const s = this.f.getStartLineNumber(); + const n = this.f.getEndLineNumber(); + for (let r = s; r <= n; r++) { + this.f.getVisibleLine(r).onOptionsChanged(this.y); + } + return true; + } + return false; + } + onCursorStateChanged(e) { + const t = this.f.getStartLineNumber(); + const s = this.f.getEndLineNumber(); + let n = false; + for (let r = t; r <= s; r++) { + n = this.f.getVisibleLine(r).onSelectionChanged() || n; + } + return n; + } + onDecorationsChanged(e) { + { + const t = this.f.getStartLineNumber(); + const s = this.f.getEndLineNumber(); + for (let n = t; n <= s; n++) { + this.f.getVisibleLine(n).onDecorationsChanged(); + } + } + return true; + } + onFlushed(e) { + const t = this.f.onFlushed(e); + this.z = 0; + return t; + } + onLinesChanged(e) { + return this.f.onLinesChanged(e); + } + onLinesDeleted(e) { + return this.f.onLinesDeleted(e); + } + onLinesInserted(e) { + return this.f.onLinesInserted(e); + } + onRevealRangeRequest(e) { + const t = this.X(this._context.viewLayout.getFutureViewport(), e.source, e.minimalReveal, e.range, e.selections, e.verticalType); + if (t === -1) { + return false; + } + let s = this._context.viewLayout.validateScrollPosition({ + scrollTop: t + }); + if (e.revealHorizontal) { + if (e.range && e.range.startLineNumber !== e.range.endLineNumber) { + s = { + scrollTop: s.scrollTop, + scrollLeft: 0 + }; + } else if (e.range) { + this.G = new Vts(e.minimalReveal, e.range.startLineNumber, e.range.startColumn, e.range.endColumn, this._context.viewLayout.getCurrentScrollTop(), s.scrollTop, e.scrollType); + } else if (e.selections && e.selections.length > 0) { + this.G = new Hts(e.minimalReveal, e.selections, this._context.viewLayout.getCurrentScrollTop(), s.scrollTop, e.scrollType); + } + } else { + this.G = null; + } + const r = Math.abs(this._context.viewLayout.getCurrentScrollTop() - s.scrollTop) <= this.h ? 1 : e.scrollType; + this._context.viewModel.viewLayout.setScrollPosition(s, r); + return true; + } + onScrollChanged(e) { + if (this.G && e.scrollLeftChanged) { + this.G = null; + } + if (this.G && e.scrollTopChanged) { + const t = Math.min(this.G.startScrollTop, this.G.stopScrollTop); + const s = Math.max(this.G.startScrollTop, this.G.stopScrollTop); + if (e.scrollTop < t || e.scrollTop > s) { + this.G = null; + } + } + this.g.setWidth(e.scrollWidth); + return this.f.onScrollChanged(e) || true; + } + onTokensChanged(e) { + return this.f.onTokensChanged(e); + } + onZonesChanged(e) { + this._context.viewModel.viewLayout.setMaxLineWidth(this.z); + return this.f.onZonesChanged(e); + } + onThemeChanged(e) { + return this.L(); + } + getPositionFromDOMInfo(e, t) { + const s = this.M(e); + if (s === null) { + return null; + } + const n = this.N(s); + if (n === -1 || n < 1 || n > this._context.viewModel.getLineCount()) { + return null; + } + if (this._context.viewModel.getLineMaxColumn(n) === 1) { + return new je(n, 1); + } + const r = this.f.getStartLineNumber(); + const o = this.f.getEndLineNumber(); + if (n < r || n > o) { + return null; + } + let a = this.f.getVisibleLine(n).getColumnOfNodeOffset(e, t); + const l = this._context.viewModel.getLineMinColumn(n); + if (a < l) { + a = l; + } + return new je(n, a); + } + M(e) { + while (e && e.nodeType === 1) { + if (e.className === F9.CLASS_NAME) { + return e; + } + e = e.parentElement; + } + return null; + } + N(e) { + const t = this.f.getStartLineNumber(); + const s = this.f.getEndLineNumber(); + for (let n = t; n <= s; n++) { + const r = this.f.getVisibleLine(n); + if (e === r.getDomNode()) { + return n; + } + } + return -1; + } + getLineWidth(e) { + const t = this.f.getStartLineNumber(); + const s = this.f.getEndLineNumber(); + if (e < t || e > s) { + return -1; + } + const n = new Rat(this.g.domNode, this.c); + const r = this.f.getVisibleLine(e).getWidth(n); + this.R(n); + return r; + } + linesVisibleRangesForRange(e, t) { + if (this.shouldRender()) { + return null; + } + const s = e.endLineNumber; + const n = Z.intersectRanges(e, this.H.getCurrentVisibleRange()); + if (!n) { + return null; + } + const r = []; + let o = 0; + const a = new Rat(this.g.domNode, this.c); + let l = 0; + if (t) { + l = this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new je(n.startLineNumber, 1)).lineNumber; + } + const c = this.f.getStartLineNumber(); + const u = this.f.getEndLineNumber(); + for (let d = n.startLineNumber; d <= n.endLineNumber; d++) { + if (d < c || d > u) { + continue; + } + const h = d === n.startLineNumber ? n.startColumn : 1; + const g = d !== n.endLineNumber; + const p = g ? this._context.viewModel.getLineMaxColumn(d) : n.endColumn; + const b = this.f.getVisibleLine(d).getVisibleRangesForRange(d, h, p, a); + if (b) { + if (t && d < s) { + const v = l; + l = this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new je(d + 1, 1)).lineNumber; + if (v !== l) { + b.ranges[b.ranges.length - 1].width += this.j; + } + } + r[o++] = new C3t(b.outsideRenderedLine, d, uat.from(b.ranges), g); + } + } + this.R(a); + if (o === 0) { + return null; + } else { + return r; + } + } + O(e, t, s) { + if (this.shouldRender() || e < this.f.getStartLineNumber() || e > this.f.getEndLineNumber()) { + return null; + } + const n = new Rat(this.g.domNode, this.c); + const r = this.f.getVisibleLine(e).getVisibleRangesForRange(e, t, s, n); + this.R(n); + return r; + } + visibleRangeForPosition(e) { + const t = this.O(e.lineNumber, e.column, e.column); + if (t) { + return new S3t(t.outsideRenderedLine, t.ranges[0].left); + } else { + return null; + } + } + updateLineWidths() { + this.S(false); + } + P() { + return this.S(true); + } + Q() { + this.S(false); + } + R(e) { + if (e.didDomLayout) { + if (!this.C.isScheduled()) { + this.C.cancel(); + this.Q(); + } + } + } + S(e) { + const t = this.f.getStartLineNumber(); + const s = this.f.getEndLineNumber(); + let n = 1; + let r = true; + for (let o = t; o <= s; o++) { + const a = this.f.getVisibleLine(o); + if (e && !a.getWidthIsFast()) { + r = false; + continue; + } + n = Math.max(n, a.getWidth(null)); + } + if (r && t === 1 && s === this._context.viewModel.getLineCount()) { + this.z = 0; + } + this.W(n); + return r; + } + U() { + let e = -1; + let t = -1; + const s = this.f.getStartLineNumber(); + const n = this.f.getEndLineNumber(); + for (let r = s; r <= n; r++) { + const o = this.f.getVisibleLine(r); + if (o.needsMonospaceFontCheck()) { + const a = o.getWidth(null); + if (a > t) { + t = a; + e = r; + } + } + } + if (e !== -1 && !this.f.getVisibleLine(e).monospaceAssumptionsAreValid()) { + for (let r = s; r <= n; r++) { + this.f.getVisibleLine(r).onMonospaceAssumptionsInvalidated(); + } + } + } + prepareRender() { + throw new Error("Not supported"); + } + render() { + throw new Error("Not supported"); + } + renderText(e) { + this.f.renderLines(e); + this.H.setCurrentVisibleRange(e.visibleRange); + this.g.setWidth(this._context.viewLayout.getScrollWidth()); + this.g.setHeight(Math.min(this._context.viewLayout.getScrollHeight(), 1000000)); + if (this.G) { + const s = this.G; + if (e.startLineNumber <= s.minLineNumber && s.maxLineNumber <= e.endLineNumber) { + this.G = null; + this.onDidRender(); + const n = this.Y(s); + if (n) { + if (!this.n) { + this.W(n.maxHorizontalOffset); + } + this._context.viewModel.viewLayout.setScrollPosition({ + scrollLeft: n.scrollLeft + }, s.scrollType); + } + } + } + if (this.P()) { + this.C.cancel(); + } else { + this.C.schedule(); + } + if (yl && !this.F.isScheduled()) { + const s = this.f.getStartLineNumber(); + const n = this.f.getEndLineNumber(); + for (let r = s; r <= n; r++) { + if (this.f.getVisibleLine(r).needsMonospaceFontCheck()) { + this.F.schedule(); + break; + } + } + } + this.b.setLayerHinting(this.w); + this.b.setContain("strict"); + const t = this._context.viewLayout.getCurrentScrollTop() - e.bigNumbersDelta; + this.b.setTop(-t); + this.b.setLeft(-this._context.viewLayout.getCurrentScrollLeft()); + } + W(e) { + const t = Math.ceil(e); + if (this.z < t) { + this.z = t; + this._context.viewModel.viewLayout.setMaxLineWidth(this.z); + } + } + X(e, t, s, n, r, o) { + const a = e.top; + const l = e.height; + const c = a + l; + let u; + let d; + let h; + if (r && r.length > 0) { + let y = r[0].startLineNumber; + let w = r[0].endLineNumber; + for (let C = 1, S = r.length; C < S; C++) { + const x = r[C]; + y = Math.min(y, x.startLineNumber); + w = Math.max(w, x.endLineNumber); + } + u = false; + d = this._context.viewLayout.getVerticalOffsetForLineNumber(y); + h = this._context.viewLayout.getVerticalOffsetForLineNumber(w) + this.h; + } else if (n) { + u = true; + d = this._context.viewLayout.getVerticalOffsetForLineNumber(n.startLineNumber); + h = this._context.viewLayout.getVerticalOffsetForLineNumber(n.endLineNumber) + this.h; + } else { + return -1; + } + const g = (t === "mouse" || s) && this.u === "default"; + let p = 0; + let b = 0; + if (g) { + if (!s) { + p = this.h; + } + } else { + const y = l / this.h; + const w = Math.max(this.t, this.I ? this.J : 0); + const C = Math.min(y / 2, w); + p = C * this.h; + b = Math.max(0, C - 1) * this.h; + } + if (!s) { + if (o === 0 || o === 4) { + b += this.h; + } + } + d -= p; + h += b; + let v; + if (h - d > l) { + if (!u) { + return -1; + } + v = d; + } else if (o === 5 || o === 6) { + if (o === 6 && a <= d && h <= c) { + v = a; + } else { + const y = Math.max(this.h * 5, l * 0.2); + const w = d - y; + const C = h - l; + v = Math.max(C, w); + } + } else if (o === 1 || o === 2) { + if (o === 2 && a <= d && h <= c) { + v = a; + } else { + const y = (d + h) / 2; + v = Math.max(0, y - l / 2); + } + } else { + v = this.Z(a, c, d, h, o === 3, o === 4); + } + return v; + } + Y(e) { + const t = this._context.viewLayout.getCurrentViewport(); + const s = this._context.configuration.options.get(151); + const n = t.left; + const r = n + t.width - s.verticalScrollbarWidth; + let o = 1073741824; + let a = 0; + if (e.type === "range") { + const c = this.O(e.lineNumber, e.startColumn, e.endColumn); + if (!c) { + return null; + } + for (const u of c.ranges) { + o = Math.min(o, Math.round(u.left)); + a = Math.max(a, Math.round(u.left + u.width)); + } + } else { + for (const c of e.selections) { + if (c.startLineNumber !== c.endLineNumber) { + return null; + } + const u = this.O(c.startLineNumber, c.startColumn, c.endColumn); + if (!u) { + return null; + } + for (const d of u.ranges) { + o = Math.min(o, Math.round(d.left)); + a = Math.max(a, Math.round(d.left + d.width)); + } + } + } + if (!e.minimalReveal) { + o = Math.max(0, o - HFn.a); + a += this.s; + } + if (e.type === "selections" && a - o > t.width) { + return null; + } else { + return { + scrollLeft: this.Z(n, r, o, a), + maxHorizontalOffset: a + }; + } + } + Z(e, t, s, n, r, o) { + e = e | 0; + t = t | 0; + s = s | 0; + n = n | 0; + r = !!r; + o = !!o; + const a = t - e; + if (n - s < a) { + if (r) { + return s; + } + if (o) { + return Math.max(0, n - a); + } + if (s < e) { + return s; + } + if (n > t) { + return Math.max(0, n - a); + } + } else { + return s; + } + return e; + } + }; + } +}); +var eGn = ue({ + "out-build/vs/editor/browser/viewParts/linesDecorations/linesDecorations.css"() {} +}); +var jts; +var tGn = ue({ + "out-build/vs/editor/browser/viewParts/linesDecorations/linesDecorations.js"() { + "use strict"; + + eGn(); + u9t(); + jts = class extends c9t { + constructor(i) { + super(); + this.f = i; + const t = this.f.configuration.options.get(151); + this.g = t.decorationsLeft; + this.h = t.decorationsWidth; + this.j = null; + this.f.addEventHandler(this); + } + dispose() { + this.f.removeEventHandler(this); + this.j = null; + super.dispose(); + } + onConfigurationChanged(i) { + const t = this.f.configuration.options.get(151); + this.g = t.decorationsLeft; + this.h = t.decorationsWidth; + return true; + } + onDecorationsChanged(i) { + return true; + } + onFlushed(i) { + return true; + } + onLinesChanged(i) { + return true; + } + onLinesDeleted(i) { + return true; + } + onLinesInserted(i) { + return true; + } + onScrollChanged(i) { + return i.scrollTopChanged; + } + onZonesChanged(i) { + return true; + } + n(i) { + const e = i.getDecorationsInViewport(); + const t = []; + let s = 0; + for (let n = 0, r = e.length; n < r; n++) { + const o = e[n]; + const a = o.options.linesDecorationsClassName; + const l = o.options.zIndex; + if (a) { + t[s++] = new Pat(o.range.startLineNumber, o.range.endLineNumber, a, o.options.linesDecorationsTooltip ?? null, l); + } + const c = o.options.firstLineDecorationClassName; + if (c) { + t[s++] = new Pat(o.range.startLineNumber, o.range.startLineNumber, c, o.options.linesDecorationsTooltip ?? null, l); + } + } + return t; + } + prepareRender(i) { + const e = i.visibleRange.startLineNumber; + const t = i.visibleRange.endLineNumber; + const s = this.c(e, t, this.n(i)); + const n = this.g.toString(); + const r = this.h.toString(); + const o = "\" style=\"left:" + n + "px;width:" + r + "px;\">"; + const a = []; + for (let l = e; l <= t; l++) { + const c = l - e; + const u = s[c].getDecorations(); + let d = ""; + for (const h of u) { + let g = "
"; + } + n[o] = l; + } + this.g = n; + } + render(i, e) { + if (this.g) { + return this.g[e - i]; + } else { + return ""; + } + } + }; + } +}); +var rGn = ue({ + "out-build/vs/editor/browser/viewParts/minimap/minimap.css"() {} +}); +var U9; +var Gts = ue({ + "out-build/vs/editor/common/core/rgba.js"() { + "use strict"; + + U9 = class Ide { + static { + this.Empty = new Ide(0, 0, 0, 0); + } + constructor(e, t, s, n) { + this._rgba8Brand = undefined; + this.r = Ide._clamp(e); + this.g = Ide._clamp(t); + this.b = Ide._clamp(s); + this.a = Ide._clamp(n); + } + equals(e) { + return this.r === e.r && this.g === e.g && this.b === e.b && this.a === e.a; + } + static _clamp(e) { + if (e < 0) { + return 0; + } else if (e > 255) { + return 255; + } else { + return e | 0; + } + } + }; + } +}); +var Ua; +var ef = ue({ + "out-build/vs/editor/common/core/editOperation.js"() { + "use strict"; + + yt(); + Ua = class { + static insert(i, e) { + return { + range: new Z(i.lineNumber, i.column, i.lineNumber, i.column), + text: e, + forceMoveMarkers: true + }; + } + static delete(i) { + return { + range: i, + text: null + }; + } + static replace(i, e) { + return { + range: i, + text: e + }; + } + static replaceMove(i, e) { + return { + range: i, + text: e, + forceMoveMarkers: true + }; + } + }; + } +}); +var v9t; +var Kts; +var oGn = ue({ + "out-build/vs/editor/common/tokenizationRegistry.js"() { + "use strict"; + + pe(); + q(); + v9t = class { + constructor() { + this.a = new Map(); + this.b = new Map(); + this.c = new B(); + this.onDidChange = this.c.event; + this.d = null; + } + handleChange(i) { + this.c.fire({ + changedLanguages: i, + changedColorMap: false + }); + } + register(i, e) { + this.a.set(i, e); + this.handleChange([i]); + return Ue(() => { + if (this.a.get(i) === e) { + this.a.delete(i); + this.handleChange([i]); + } + }); + } + get(i) { + return this.a.get(i) || null; + } + registerFactory(i, e) { + this.b.get(i)?.dispose(); + const t = new Kts(this, i, e); + this.b.set(i, t); + return Ue(() => { + const s = this.b.get(i); + if (!!s && s === t) { + this.b.delete(i); + s.dispose(); + } + }); + } + async getOrCreate(i) { + const e = this.get(i); + if (e) { + return e; + } + const t = this.b.get(i); + if (!t || t.isResolved) { + return null; + } else { + await t.resolve(); + return this.get(i); + } + } + isResolved(i) { + if (this.get(i)) { + return true; + } + const t = this.b.get(i); + return !t || !!t.isResolved; + } + setColorMap(i) { + this.d = i; + this.c.fire({ + changedLanguages: Array.from(this.a.keys()), + changedColorMap: true + }); + } + getColorMap() { + return this.d; + } + getDefaultBackground() { + if (this.d && this.d.length > 2) { + return this.d[2]; + } else { + return null; + } + } + }; + Kts = class extends H { + get isResolved() { + return this.c; + } + constructor(i, e, t) { + super(); + this.f = i; + this.g = e; + this.h = t; + this.a = false; + this.b = null; + this.c = false; + } + dispose() { + this.a = true; + super.dispose(); + } + async resolve() { + this.b ||= this.j(); + return this.b; + } + async j() { + const i = await this.h.tokenizationSupport; + this.c = true; + if (i && !this.a) { + this.D(this.f.register(this.g, i)); + } + } + }; + } +}); +function aGn(i) { + return i && V.isUri(i.uri) && Z.isIRange(i.range) && (Z.isIRange(i.originSelectionRange) || Z.isIRange(i.targetSelectionRange)); +} +function wte(i) { + return i && V.isUri(i.uri) && Z.isIRange(i.range); +} +function Yts(i, e) { + return f(832, null, i, Mat[e]); +} +var Xts; +var Nat; +var Xb; +var Qts; +var Cte; +var Zts; +var eis; +var tis; +var iis; +var kM; +var sis; +var nis; +var mpe; +var lF; +var Ste; +var ris; +var Mat; +var ois; +var tE; +var xte; +var NI; +var y9t; +var bpe; +var Aat; +var ZC; +var eS; +var vpe; +var kte; +var ais; +var $at; +var w9t; +var qm; +var b4; +var qj; +var C9t; +var Eo = ue({ + "out-build/vs/editor/common/languages.js"() { + "use strict"; + + He(); + Le(); + ef(); + yt(); + oGn(); + X(); + Xts = class { + constructor(i, e, t) { + this.offset = i; + this.type = e; + this.language = t; + this._tokenBrand = undefined; + } + toString() { + return "(" + this.offset + ", " + this.type + ")"; + } + }; + Nat = class { + constructor(i, e) { + this.tokens = i; + this.endState = e; + this._encodedTokenizationResultBrand = undefined; + } + }; + (function (i) { + i[i.Increase = 0] = "Increase"; + i[i.Decrease = 1] = "Decrease"; + })(Xb ||= {}); + (function (i) { + i[i.Method = 0] = "Method"; + i[i.Function = 1] = "Function"; + i[i.Constructor = 2] = "Constructor"; + i[i.Field = 3] = "Field"; + i[i.Variable = 4] = "Variable"; + i[i.Class = 5] = "Class"; + i[i.Struct = 6] = "Struct"; + i[i.Interface = 7] = "Interface"; + i[i.Module = 8] = "Module"; + i[i.Property = 9] = "Property"; + i[i.Event = 10] = "Event"; + i[i.Operator = 11] = "Operator"; + i[i.Unit = 12] = "Unit"; + i[i.Value = 13] = "Value"; + i[i.Constant = 14] = "Constant"; + i[i.Enum = 15] = "Enum"; + i[i.EnumMember = 16] = "EnumMember"; + i[i.Keyword = 17] = "Keyword"; + i[i.Text = 18] = "Text"; + i[i.Color = 19] = "Color"; + i[i.File = 20] = "File"; + i[i.Reference = 21] = "Reference"; + i[i.Customcolor = 22] = "Customcolor"; + i[i.Folder = 23] = "Folder"; + i[i.TypeParameter = 24] = "TypeParameter"; + i[i.User = 25] = "User"; + i[i.Issue = 26] = "Issue"; + i[i.Snippet = 27] = "Snippet"; + })(Qts ||= {}); + (function (i) { + const e = new Map(); + e.set(0, A.symbolMethod); + e.set(1, A.symbolFunction); + e.set(2, A.symbolConstructor); + e.set(3, A.symbolField); + e.set(4, A.symbolVariable); + e.set(5, A.symbolClass); + e.set(6, A.symbolStruct); + e.set(7, A.symbolInterface); + e.set(8, A.symbolModule); + e.set(9, A.symbolProperty); + e.set(10, A.symbolEvent); + e.set(11, A.symbolOperator); + e.set(12, A.symbolUnit); + e.set(13, A.symbolValue); + e.set(15, A.symbolEnum); + e.set(14, A.symbolConstant); + e.set(15, A.symbolEnum); + e.set(16, A.symbolEnumMember); + e.set(17, A.symbolKeyword); + e.set(27, A.symbolSnippet); + e.set(18, A.symbolText); + e.set(19, A.symbolColor); + e.set(20, A.symbolFile); + e.set(21, A.symbolReference); + e.set(22, A.symbolCustomColor); + e.set(23, A.symbolFolder); + e.set(24, A.symbolTypeParameter); + e.set(25, A.account); + e.set(26, A.issues); + function t(r) { + let o = e.get(r); + if (!o) { + console.info("No codicon found for CompletionItemKind " + r); + o = A.symbolProperty; + } + return o; + } + i.toIcon = t; + const s = new Map(); + s.set("method", 0); + s.set("function", 1); + s.set("constructor", 2); + s.set("field", 3); + s.set("variable", 4); + s.set("class", 5); + s.set("struct", 6); + s.set("interface", 7); + s.set("module", 8); + s.set("property", 9); + s.set("event", 10); + s.set("operator", 11); + s.set("unit", 12); + s.set("value", 13); + s.set("constant", 14); + s.set("enum", 15); + s.set("enum-member", 16); + s.set("enumMember", 16); + s.set("keyword", 17); + s.set("snippet", 27); + s.set("text", 18); + s.set("color", 19); + s.set("file", 20); + s.set("reference", 21); + s.set("customcolor", 22); + s.set("folder", 23); + s.set("type-parameter", 24); + s.set("typeParameter", 24); + s.set("account", 25); + s.set("issue", 26); + function n(r, o) { + let a = s.get(r); + if (typeof a === "undefined" && !o) { + a = 9; + } + return a; + } + i.fromString = n; + })(Cte ||= {}); + (function (i) { + i[i.Deprecated = 1] = "Deprecated"; + })(Zts ||= {}); + (function (i) { + i[i.None = 0] = "None"; + i[i.KeepWhitespace = 1] = "KeepWhitespace"; + i[i.InsertAsSnippet = 4] = "InsertAsSnippet"; + })(eis ||= {}); + (function (i) { + i[i.Word = 0] = "Word"; + i[i.Line = 1] = "Line"; + i[i.Suggest = 2] = "Suggest"; + })(tis ||= {}); + (function (i) { + i[i.Invoke = 0] = "Invoke"; + i[i.TriggerCharacter = 1] = "TriggerCharacter"; + i[i.TriggerForIncompleteCompletions = 2] = "TriggerForIncompleteCompletions"; + })(iis ||= {}); + (function (i) { + i[i.Automatic = 0] = "Automatic"; + i[i.Explicit = 1] = "Explicit"; + })(kM ||= {}); + sis = class { + constructor(i, e, t, s) { + this.range = i; + this.text = e; + this.completionKind = t; + this.isSnippetText = s; + } + equals(i) { + return Z.lift(this.range).equalsRange(i.range) && this.text === i.text && this.completionKind === i.completionKind && this.isSnippetText === i.isSnippetText; + } + }; + (function (i) { + i[i.Invoke = 1] = "Invoke"; + i[i.Auto = 2] = "Auto"; + })(nis ||= {}); + (function (i) { + i[i.Automatic = 0] = "Automatic"; + i[i.PasteAs = 1] = "PasteAs"; + })(mpe ||= {}); + (function (i) { + i[i.Invoke = 1] = "Invoke"; + i[i.TriggerCharacter = 2] = "TriggerCharacter"; + i[i.ContentChange = 3] = "ContentChange"; + })(lF ||= {}); + (function (i) { + i[i.Text = 0] = "Text"; + i[i.Read = 1] = "Read"; + i[i.Write = 2] = "Write"; + })(Ste ||= {}); + (function (i) { + i[i.File = 0] = "File"; + i[i.Module = 1] = "Module"; + i[i.Namespace = 2] = "Namespace"; + i[i.Package = 3] = "Package"; + i[i.Class = 4] = "Class"; + i[i.Method = 5] = "Method"; + i[i.Property = 6] = "Property"; + i[i.Field = 7] = "Field"; + i[i.Constructor = 8] = "Constructor"; + i[i.Enum = 9] = "Enum"; + i[i.Interface = 10] = "Interface"; + i[i.Function = 11] = "Function"; + i[i.Variable = 12] = "Variable"; + i[i.Constant = 13] = "Constant"; + i[i.String = 14] = "String"; + i[i.Number = 15] = "Number"; + i[i.Boolean = 16] = "Boolean"; + i[i.Array = 17] = "Array"; + i[i.Object = 18] = "Object"; + i[i.Key = 19] = "Key"; + i[i.Null = 20] = "Null"; + i[i.EnumMember = 21] = "EnumMember"; + i[i.Struct = 22] = "Struct"; + i[i.Event = 23] = "Event"; + i[i.Operator = 24] = "Operator"; + i[i.TypeParameter = 25] = "TypeParameter"; + })(ris ||= {}); + Mat = { + 17: f(806, null), + 16: f(807, null), + 4: f(808, null), + 13: f(809, null), + 8: f(810, null), + 9: f(811, null), + 21: f(812, null), + 23: f(813, null), + 7: f(814, null), + 0: f(815, null), + 11: f(816, null), + 10: f(817, null), + 19: f(818, null), + 5: f(819, null), + 1: f(820, null), + 2: f(821, null), + 20: f(822, null), + 15: f(823, null), + 18: f(824, null), + 24: f(825, null), + 3: f(826, null), + 6: f(827, null), + 14: f(828, null), + 22: f(829, null), + 25: f(830, null), + 12: f(831, null) + }; + (function (i) { + i[i.Deprecated = 1] = "Deprecated"; + })(ois ||= {}); + (function (i) { + const e = new Map(); + e.set(0, A.symbolFile); + e.set(1, A.symbolModule); + e.set(2, A.symbolNamespace); + e.set(3, A.symbolPackage); + e.set(4, A.symbolClass); + e.set(5, A.symbolMethod); + e.set(6, A.symbolProperty); + e.set(7, A.symbolField); + e.set(8, A.symbolConstructor); + e.set(9, A.symbolEnum); + e.set(10, A.symbolInterface); + e.set(11, A.symbolFunction); + e.set(12, A.symbolVariable); + e.set(13, A.symbolConstant); + e.set(14, A.symbolString); + e.set(15, A.symbolNumber); + e.set(16, A.symbolBoolean); + e.set(17, A.symbolArray); + e.set(18, A.symbolObject); + e.set(19, A.symbolKey); + e.set(20, A.symbolNull); + e.set(21, A.symbolEnumMember); + e.set(22, A.symbolStruct); + e.set(23, A.symbolEvent); + e.set(24, A.symbolOperator); + e.set(25, A.symbolTypeParameter); + function t(r) { + let o = e.get(r); + if (!o) { + console.info("No codicon found for SymbolKind " + r); + o = A.symbolProperty; + } + return o; + } + i.toIcon = t; + const s = new Map(); + s.set(0, 20); + s.set(1, 8); + s.set(2, 8); + s.set(3, 8); + s.set(4, 5); + s.set(5, 0); + s.set(6, 9); + s.set(7, 3); + s.set(8, 2); + s.set(9, 15); + s.set(10, 7); + s.set(11, 1); + s.set(12, 4); + s.set(13, 14); + s.set(14, 18); + s.set(15, 13); + s.set(16, 13); + s.set(17, 13); + s.set(18, 13); + s.set(19, 17); + s.set(20, 13); + s.set(21, 16); + s.set(22, 6); + s.set(23, 10); + s.set(24, 11); + s.set(25, 24); + function n(r) { + let o = s.get(r); + if (o === undefined) { + console.info("No completion kind found for SymbolKind " + r); + o = 20; + } + return o; + } + i.toCompletionKind = n; + })(tE ||= {}); + xte = class { + static asEditOperation(i) { + return Ua.replace(Z.lift(i.range), i.text); + } + }; + NI = class iq { + static { + this.Comment = new iq("comment"); + } + static { + this.Imports = new iq("imports"); + } + static { + this.Region = new iq("region"); + } + static fromValue(e) { + switch (e) { + case "comment": + return iq.Comment; + case "imports": + return iq.Imports; + case "region": + return iq.Region; + } + return new iq(e); + } + constructor(e) { + this.value = e; + } + }; + (function (i) { + i[i.AIGenerated = 1] = "AIGenerated"; + })(y9t ||= {}); + (function (i) { + i[i.Invoke = 0] = "Invoke"; + i[i.Automatic = 1] = "Automatic"; + })(bpe ||= {}); + (function (i) { + function e(t) { + if (!t || typeof t != "object") { + return false; + } else { + return typeof t.id == "string" && typeof t.title == "string"; + } + } + i.is = e; + })(Aat ||= {}); + (function (i) { + i[i.Collapsed = 0] = "Collapsed"; + i[i.Expanded = 1] = "Expanded"; + })(ZC ||= {}); + (function (i) { + i[i.Unresolved = 0] = "Unresolved"; + i[i.Resolved = 1] = "Resolved"; + })(eS ||= {}); + (function (i) { + i[i.Current = 0] = "Current"; + i[i.Outdated = 1] = "Outdated"; + })(vpe ||= {}); + (function (i) { + i[i.Editing = 0] = "Editing"; + i[i.Preview = 1] = "Preview"; + })(kte ||= {}); + (function (i) { + i[i.Published = 0] = "Published"; + i[i.Draft = 1] = "Draft"; + })(ais ||= {}); + (function (i) { + i[i.Type = 1] = "Type"; + i[i.Parameter = 2] = "Parameter"; + })($at ||= {}); + w9t = class { + constructor(i) { + this.b = i; + this.a = null; + } + dispose() { + if (this.a) { + this.a.then(i => { + if (i) { + i.dispose(); + } + }); + } + } + get tokenizationSupport() { + this.a ||= this.b(); + return this.a; + } + }; + qm = new v9t(); + b4 = new v9t(); + (function (i) { + i[i.None = 0] = "None"; + i[i.Option = 1] = "Option"; + i[i.Default = 2] = "Default"; + i[i.Preferred = 3] = "Preferred"; + })(qj ||= {}); + (function (i) { + i[i.Invoke = 0] = "Invoke"; + i[i.Automatic = 1] = "Automatic"; + })(C9t ||= {}); + } +}); +var S9t; +var lis = ue({ + "out-build/vs/editor/common/viewModel/minimapTokensColorTracker.js"() { + "use strict"; + + pe(); + q(); + Gts(); + Eo(); + S9t = class qFn extends H { + static { + this.c = null; + } + static getInstance() { + this.c ||= IL(new qFn()); + return this.c; + } + constructor() { + super(); + this.j = new B(); + this.onDidChange = this.j.event; + this.m(); + this.D(qm.onDidChange(e => { + if (e.changedColorMap) { + this.m(); + } + })); + } + m() { + const e = qm.getColorMap(); + if (!e) { + this.f = [U9.Empty]; + this.h = true; + return; + } + this.f = [U9.Empty]; + for (let s = 1; s < e.length; s++) { + const n = e[s].rgba; + this.f[s] = new U9(n.r, n.g, n.b, Math.round(n.a * 255)); + } + const t = e[2].getRelativeLuminance(); + this.h = t >= 0.5; + this.j.fire(undefined); + } + getColor(e) { + if (e < 1 || e >= this.f.length) { + e = 2; + } + return this.f[e]; + } + backgroundIsLight() { + return this.h; + } + }; + } +}); +var x9t; +var cis; +var Fat; +var Ete; +var uis; +var cF; +var dis; +var k9t; +var Oat; +var MI = ue({ + "out-build/vs/editor/common/viewModel.js"() { + "use strict"; + + Jt(); + $i(); + yt(); + x9t = class { + constructor(i, e, t, s) { + this._viewportBrand = undefined; + this.top = i | 0; + this.left = e | 0; + this.width = t | 0; + this.height = s | 0; + } + }; + cis = class { + constructor(i, e) { + this.tabSize = i; + this.data = e; + } + }; + Fat = class { + constructor(i, e, t, s, n, r, o) { + this._viewLineDataBrand = undefined; + this.content = i; + this.continuesWithWrappedLine = e; + this.minColumn = t; + this.maxColumn = s; + this.startVisibleColumn = n; + this.tokens = r; + this.inlineDecorations = o; + } + }; + Ete = class A3i { + constructor(e, t, s, n, r, o, a, l, c, u) { + this.minColumn = e; + this.maxColumn = t; + this.content = s; + this.continuesWithWrappedLine = n; + this.isBasicASCII = A3i.isBasicASCII(s, o); + this.containsRTL = A3i.containsRTL(s, this.isBasicASCII, r); + this.tokens = a; + this.inlineDecorations = l; + this.tabSize = c; + this.startVisibleColumn = u; + } + static isBasicASCII(e, t) { + if (t) { + return Bq(e); + } else { + return true; + } + } + static containsRTL(e, t, s) { + if (!t && s) { + return t9(e); + } else { + return false; + } + } + }; + (function (i) { + i[i.Regular = 0] = "Regular"; + i[i.Before = 1] = "Before"; + i[i.After = 2] = "After"; + i[i.RegularAffectingLetterSpacing = 3] = "RegularAffectingLetterSpacing"; + })(uis ||= {}); + cF = class { + constructor(i, e, t) { + this.range = i; + this.inlineClassName = e; + this.type = t; + } + }; + dis = class { + constructor(i, e, t, s) { + this.startOffset = i; + this.endOffset = e; + this.inlineClassName = t; + this.inlineClassNameAffectsLetterSpacing = s; + } + toInlineDecoration(i) { + return new cF(new Z(i, this.startOffset + 1, i, this.endOffset + 1), this.inlineClassName, this.inlineClassNameAffectsLetterSpacing ? 3 : 0); + } + }; + k9t = class { + constructor(i, e) { + this._viewModelDecorationBrand = undefined; + this.range = i; + this.options = e; + } + }; + Oat = class jFn { + constructor(e, t, s) { + this.color = e; + this.zIndex = t; + this.data = s; + } + static compareByRenderingProps(e, t) { + if (e.zIndex === t.zIndex) { + if (e.color < t.color) { + return -1; + } else if (e.color > t.color) { + return 1; + } else { + return 0; + } + } else { + return e.zIndex - t.zIndex; + } + } + static equals(e, t) { + return e.color === t.color && e.zIndex === t.zIndex && Go(e.data, t.data); + } + static equalsArr(e, t) { + return Go(e, t, jFn.equals); + } + }; + } +}); +var his; +var fis; +var gis; +var pis = ue({ + "out-build/vs/editor/browser/viewParts/minimap/minimapCharSheet.js"() { + "use strict"; + + (function (i) { + i[i.START_CH_CODE = 32] = "START_CH_CODE"; + i[i.END_CH_CODE = 126] = "END_CH_CODE"; + i[i.UNKNOWN_CODE = 65533] = "UNKNOWN_CODE"; + i[i.CHAR_COUNT = 96] = "CHAR_COUNT"; + i[i.SAMPLED_CHAR_HEIGHT = 16] = "SAMPLED_CHAR_HEIGHT"; + i[i.SAMPLED_CHAR_WIDTH = 10] = "SAMPLED_CHAR_WIDTH"; + i[i.BASE_CHAR_HEIGHT = 2] = "BASE_CHAR_HEIGHT"; + i[i.BASE_CHAR_WIDTH = 1] = "BASE_CHAR_WIDTH"; + i[i.RGBA_CHANNELS_CNT = 4] = "RGBA_CHANNELS_CNT"; + i[i.RGBA_SAMPLED_ROW_WIDTH = 3840] = "RGBA_SAMPLED_ROW_WIDTH"; + })(his ||= {}); + fis = (() => { + const i = []; + for (let e = 32; e <= 126; e++) { + i.push(e); + } + i.push(65533); + return i; + })(); + gis = (i, e) => { + i -= 32; + if (i < 0 || i > 96) { + if (e <= 2) { + return (i + 96) % 96; + } else { + return 95; + } + } else { + return i; + } + }; + } +}); +var E9t; +var lGn = ue({ + "out-build/vs/editor/browser/viewParts/minimap/minimapCharRenderer.js"() { + "use strict"; + + pis(); + dot(); + E9t = class $3i { + constructor(e, t) { + this.scale = t; + this._minimapCharRendererBrand = undefined; + this.a = $3i.e(e, 12 / 15); + this.d = $3i.e(e, 50 / 60); + } + static e(e, t) { + const s = new Uint8ClampedArray(e.length); + for (let n = 0, r = e.length; n < r; n++) { + s[n] = uot(e[n] * t); + } + return s; + } + renderChar(e, t, s, n, r, o, a, l, c, u, d) { + const h = this.scale * 1; + const g = this.scale * 2; + const p = d ? 1 : g; + if (t + h > e.width || s + p > e.height) { + console.warn("bad render request outside image data"); + return; + } + const b = u ? this.d : this.a; + const v = gis(n, c); + const y = e.width * 4; + const w = a.r; + const C = a.g; + const S = a.b; + const x = r.r - w; + const k = r.g - C; + const E = r.b - S; + const D = Math.max(o, l); + const P = e.data; + let R = v * h * g; + let L = s * y + t * 4; + for (let F = 0; F < p; F++) { + let O = L; + for (let U = 0; U < h; U++) { + const j = b[R++] / 255 * (o / 255); + P[O++] = w + x * j; + P[O++] = C + k * j; + P[O++] = S + E * j; + P[O++] = D; + } + L += y; + } + } + blockRenderChar(e, t, s, n, r, o, a, l) { + const c = this.scale * 1; + const u = this.scale * 2; + const d = l ? 1 : u; + if (t + c > e.width || s + d > e.height) { + console.warn("bad render request outside image data"); + return; + } + const h = e.width * 4; + const g = r / 255 * 0.5; + const p = o.r; + const b = o.g; + const v = o.b; + const y = n.r - p; + const w = n.g - b; + const C = n.b - v; + const S = p + y * g; + const x = b + w * g; + const k = v + C * g; + const E = Math.max(r, a); + const D = e.data; + let P = s * h + t * 4; + for (let R = 0; R < d; R++) { + let L = P; + for (let F = 0; F < c; F++) { + D[L++] = S; + D[L++] = x; + D[L++] = k; + D[L++] = E; + } + P += h; + } + } + }; + } +}); +var I9t; +var D9t; +var T9t; +var cGn = ue({ + "out-build/vs/editor/browser/viewParts/minimap/minimapPreBaked.js"() { + "use strict"; + + A0(); + I9t = { + 0: 0, + 1: 1, + 2: 2, + 3: 3, + 4: 4, + 5: 5, + 6: 6, + 7: 7, + 8: 8, + 9: 9, + A: 10, + B: 11, + C: 12, + D: 13, + E: 14, + F: 15 + }; + D9t = i => { + const e = new Uint8ClampedArray(i.length / 2); + for (let t = 0; t < i.length; t += 2) { + e[t >> 1] = I9t[i[t]] << 4 | I9t[i[t + 1]] & 15; + } + return e; + }; + T9t = { + 1: Py(() => D9t("0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792")), + 2: Py(() => D9t("000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126")) + }; + } +}); +var mis; +var uGn = ue({ + "out-build/vs/editor/browser/viewParts/minimap/minimapCharRendererFactory.js"() { + "use strict"; + + lGn(); + pis(); + cGn(); + dot(); + mis = class fFt { + static create(e, t) { + if (this.a && e === this.a.scale && t === this.b) { + return this.a; + } + let s; + if (T9t[e]) { + s = new E9t(T9t[e](), e); + } else { + s = fFt.createFromSampleData(fFt.createSampleData(t).data, e); + } + this.b = t; + this.a = s; + return s; + } + static createSampleData(e) { + const t = document.createElement("canvas"); + const s = t.getContext("2d"); + t.style.height = "16px"; + t.height = 16; + t.width = 960; + t.style.width = "960px"; + s.fillStyle = "#ffffff"; + s.font = `bold 16px ${e}`; + s.textBaseline = "middle"; + let n = 0; + for (const r of fis) { + s.fillText(String.fromCharCode(r), n, 8); + n += 10; + } + return s.getImageData(0, 0, 960, 16); + } + static createFromSampleData(e, t) { + if (e.length !== 61440) { + throw new Error("Unexpected source in MinimapCharRenderer"); + } + const n = fFt.d(e, t); + return new E9t(n, t); + } + static c(e, t, s, n, r) { + const o = r * 1; + const a = r * 2; + let l = n; + let c = 0; + for (let u = 0; u < a; u++) { + const d = u / a * 16; + const h = (u + 1) / a * 16; + for (let g = 0; g < o; g++) { + const p = g / o * 10; + const b = (g + 1) / o * 10; + let v = 0; + let y = 0; + for (let C = d; C < h; C++) { + const S = t + Math.floor(C) * 3840; + const x = 1 - (C - Math.floor(C)); + for (let k = p; k < b; k++) { + const E = 1 - (k - Math.floor(k)); + const D = S + Math.floor(k) * 4; + const P = E * x; + y += P; + v += e[D] * e[D + 3] / 255 * P; + } + } + const w = v / y; + c = Math.max(c, w); + s[l++] = uot(w); + } + } + return c; + } + static d(e, t) { + const s = t * 2 * 1 * t; + const n = s * 96; + const r = new Uint8ClampedArray(n); + let o = 0; + let a = 0; + let l = 0; + for (let c = 0; c < 96; c++) { + l = Math.max(l, this.c(e, a, r, o, t)); + o += s; + a += 40; + } + if (l > 0) { + const c = 255 / l; + for (let u = 0; u < n; u++) { + r[u] *= c; + } + } + return r; + } + }; + } +}); +var Ite; +var ype = ue({ + "out-build/vs/base/browser/fonts.js"() { + "use strict"; + + rt(); + Ite = ln ? "\"Segoe WPC\", \"Segoe UI\", sans-serif" : Gt ? "-apple-system, BlinkMacSystemFont, sans-serif" : "system-ui, \"Ubuntu\", \"Droid Sans\", sans-serif"; + } +}); +var bis; +var vis; +var P9t; +var yis; +var L9t; +var R9t; +var wis; +var N9t; +var Cis; +var Sis; +var M9t; +var dGn = ue({ + "out-build/vs/editor/browser/viewParts/minimap/minimap.js"() { + "use strict"; + + rGn(); + xe(); + pf(); + jee(); + q(); + rt(); + $i(); + H3t(); + Ow(); + Qd(); + yt(); + Gts(); + lis(); + MI(); + Qs(); + ua(); + hh(); + uGn(); + A0(); + In(); + ype(); + bis = 140; + vis = 2; + P9t = class gFt { + constructor(e, t, s) { + const n = e.options; + const r = n.get(149); + const o = n.get(151); + const a = o.minimap; + const l = n.get(52); + const c = n.get(74); + this.renderMinimap = a.renderMinimap; + this.size = c.size; + this.minimapHeightIsEditorHeight = a.minimapHeightIsEditorHeight; + this.scrollBeyondLastLine = n.get(110); + this.paddingTop = n.get(88).top; + this.paddingBottom = n.get(88).bottom; + this.showSlider = c.showSlider; + this.autohide = c.autohide; + this.pixelRatio = r; + this.typicalHalfwidthCharacterWidth = l.typicalHalfwidthCharacterWidth; + this.lineHeight = n.get(68); + this.minimapLeft = a.minimapLeft; + this.minimapWidth = a.minimapWidth; + this.minimapHeight = o.height; + this.canvasInnerWidth = a.minimapCanvasInnerWidth; + this.canvasInnerHeight = a.minimapCanvasInnerHeight; + this.canvasOuterWidth = a.minimapCanvasOuterWidth; + this.canvasOuterHeight = a.minimapCanvasOuterHeight; + this.isSampling = a.minimapIsSampling; + this.editorHeight = o.height; + this.fontScale = a.minimapScale; + this.minimapLineHeight = a.minimapLineHeight; + this.minimapCharWidth = this.fontScale * 1; + this.sectionHeaderFontFamily = Ite; + this.sectionHeaderFontSize = c.sectionHeaderFontSize * r; + this.sectionHeaderLetterSpacing = c.sectionHeaderLetterSpacing; + this.sectionHeaderFontColor = gFt.f(t, s.getColor(1)); + this.charRenderer = Py(() => mis.create(this.fontScale, l.fontFamily)); + this.defaultBackgroundColor = s.getColor(2); + this.backgroundColor = gFt.c(t, this.defaultBackgroundColor); + this.foregroundAlpha = gFt.d(t); + } + static c(e, t) { + const s = e.getColor(IQi); + if (s) { + return new U9(s.rgba.r, s.rgba.g, s.rgba.b, Math.round(s.rgba.a * 255)); + } else { + return t; + } + } + static d(e) { + const t = e.getColor(DQi); + if (t) { + return U9._clamp(Math.round(t.rgba.a * 255)); + } else { + return 255; + } + } + static f(e, t) { + const s = e.getColor(wm); + if (s) { + return new U9(s.rgba.r, s.rgba.g, s.rgba.b, Math.round(s.rgba.a * 255)); + } else { + return t; + } + } + equals(e) { + return this.renderMinimap === e.renderMinimap && this.size === e.size && this.minimapHeightIsEditorHeight === e.minimapHeightIsEditorHeight && this.scrollBeyondLastLine === e.scrollBeyondLastLine && this.paddingTop === e.paddingTop && this.paddingBottom === e.paddingBottom && this.showSlider === e.showSlider && this.autohide === e.autohide && this.pixelRatio === e.pixelRatio && this.typicalHalfwidthCharacterWidth === e.typicalHalfwidthCharacterWidth && this.lineHeight === e.lineHeight && this.minimapLeft === e.minimapLeft && this.minimapWidth === e.minimapWidth && this.minimapHeight === e.minimapHeight && this.canvasInnerWidth === e.canvasInnerWidth && this.canvasInnerHeight === e.canvasInnerHeight && this.canvasOuterWidth === e.canvasOuterWidth && this.canvasOuterHeight === e.canvasOuterHeight && this.isSampling === e.isSampling && this.editorHeight === e.editorHeight && this.fontScale === e.fontScale && this.minimapLineHeight === e.minimapLineHeight && this.minimapCharWidth === e.minimapCharWidth && this.sectionHeaderFontSize === e.sectionHeaderFontSize && this.sectionHeaderLetterSpacing === e.sectionHeaderLetterSpacing && this.defaultBackgroundColor && this.defaultBackgroundColor.equals(e.defaultBackgroundColor) && this.backgroundColor && this.backgroundColor.equals(e.backgroundColor) && this.foregroundAlpha === e.foregroundAlpha; + } + }; + yis = class pFt { + constructor(e, t, s, n, r, o, a, l, c) { + this.scrollTop = e; + this.scrollHeight = t; + this.sliderNeeded = s; + this.c = n; + this.sliderTop = r; + this.sliderHeight = o; + this.topPaddingLineCount = a; + this.startLineNumber = l; + this.endLineNumber = c; + } + getDesiredScrollTopFromDelta(e) { + return Math.round(this.scrollTop + e / this.c); + } + getDesiredScrollTopFromTouchLocation(e) { + return Math.round((e - this.sliderHeight / 2) / this.c); + } + intersectWithViewport(e) { + const t = Math.max(this.startLineNumber, e.startLineNumber); + const s = Math.min(this.endLineNumber, e.endLineNumber); + if (t > s) { + return null; + } else { + return [t, s]; + } + } + getYForLineNumber(e, t) { + return +(e - this.startLineNumber + this.topPaddingLineCount) * t; + } + static create(e, t, s, n, r, o, a, l, c, u, d) { + const h = e.pixelRatio; + const g = e.minimapLineHeight; + const p = Math.floor(e.canvasInnerHeight / g); + const b = e.lineHeight; + if (e.minimapHeightIsEditorHeight) { + let k = l * e.lineHeight + e.paddingTop + e.paddingBottom; + if (e.scrollBeyondLastLine) { + k += Math.max(0, r - e.lineHeight - e.paddingBottom); + } + const E = Math.max(1, Math.floor(r * r / k)); + const D = Math.max(0, e.minimapHeight - E); + const P = D / (u - r); + const R = c * P; + const L = D > 0; + const F = Math.floor(e.canvasInnerHeight / e.minimapLineHeight); + const O = Math.floor(e.paddingTop / e.lineHeight); + return new pFt(c, u, L, P, R, E, O, 1, Math.min(a, F)); + } + let v; + if (o && s !== a) { + const k = s - t + 1; + v = Math.floor(k * g / h); + } else { + const k = r / b; + v = Math.floor(k * g / h); + } + const y = Math.floor(e.paddingTop / b); + let w = Math.floor(e.paddingBottom / b); + if (e.scrollBeyondLastLine) { + const k = r / b; + w = Math.max(w, k - 1); + } + let C; + if (w > 0) { + const k = r / b; + C = (y + a + w - k - 1) * g / h; + } else { + C = Math.max(0, (y + a) * g / h - v); + } + C = Math.min(e.minimapHeight - v, C); + const S = C / (u - r); + const x = c * S; + if (p >= y + a + w) { + const k = C > 0; + return new pFt(c, u, k, S, x, v, y, 1, a); + } else { + let k; + if (t > 1) { + k = t + y; + } else { + k = Math.max(1, c / b); + } + let E; + let D = Math.max(1, Math.floor(k - x * h / g)); + if (D < y) { + E = y - D + 1; + D = 1; + } else { + E = 0; + D = Math.max(1, D - y); + } + if (d && d.scrollHeight === u) { + if (d.scrollTop > c) { + D = Math.min(D, d.startLineNumber); + E = Math.max(E, d.topPaddingLineCount); + } + if (d.scrollTop < c) { + D = Math.max(D, d.startLineNumber); + E = Math.min(E, d.topPaddingLineCount); + } + } + const P = Math.min(a, D - E + p - 1); + const R = (c - n) / b; + let L; + if (c >= e.paddingTop) { + L = (t - D + E + R) * g / h; + } else { + L = c / e.paddingTop * (E + R) * g / h; + } + return new pFt(c, u, true, S, L, v, E, D, P); + } + } + }; + L9t = class zFn { + static { + this.INVALID = new zFn(-1); + } + constructor(e) { + this.dy = e; + } + onContentChanged() { + this.dy = -1; + } + onTokensChanged() { + this.dy = -1; + } + }; + R9t = class { + constructor(i, e, t) { + this.renderedLayout = i; + this.c = e; + this.d = new W3t({ + createLine: () => L9t.INVALID + }); + this.d._set(i.startLineNumber, t); + } + linesEquals(i) { + if (!this.scrollEquals(i)) { + return false; + } + const t = this.d._get().lines; + for (let s = 0, n = t.length; s < n; s++) { + if (t[s].dy === -1) { + return false; + } + } + return true; + } + scrollEquals(i) { + return this.renderedLayout.startLineNumber === i.startLineNumber && this.renderedLayout.endLineNumber === i.endLineNumber; + } + _get() { + const i = this.d._get(); + return { + imageData: this.c, + rendLineNumberStart: i.rendLineNumberStart, + lines: i.lines + }; + } + onLinesChanged(i, e) { + return this.d.onLinesChanged(i, e); + } + onLinesDeleted(i, e) { + this.d.onLinesDeleted(i, e); + } + onLinesInserted(i, e) { + this.d.onLinesInserted(i, e); + } + onTokensChanged(i) { + return this.d.onTokensChanged(i); + } + }; + wis = class JFn { + constructor(e, t, s, n) { + this.c = JFn.h(t, s, n); + this.d = [e.createImageData(t, s), e.createImageData(t, s)]; + this.f = 0; + } + getBuffer() { + this.f = 1 - this.f; + const e = this.d[this.f]; + e.data.set(this.c); + return e; + } + static h(e, t, s) { + const n = s.r; + const r = s.g; + const o = s.b; + const a = s.a; + const l = new Uint8ClampedArray(e * t * 4); + let c = 0; + for (let u = 0; u < t; u++) { + for (let d = 0; d < e; d++) { + l[c] = n; + l[c + 1] = r; + l[c + 2] = o; + l[c + 3] = a; + c += 4; + } + } + return l; + } + }; + N9t = class F3i { + static compute(e, t, s) { + if (e.renderMinimap === 0 || !e.isSampling) { + return [null, []]; + } + const { + minimapLineCount: n + } = O8t.computeContainedMinimapLineCount({ + viewLineCount: t, + scrollBeyondLastLine: e.scrollBeyondLastLine, + paddingTop: e.paddingTop, + paddingBottom: e.paddingBottom, + height: e.editorHeight, + lineHeight: e.lineHeight, + pixelRatio: e.pixelRatio + }); + const r = t / n; + const o = r / 2; + if (!s || s.minimapLines.length === 0) { + const v = []; + v[0] = 1; + if (n > 1) { + for (let y = 0, w = n - 1; y < w; y++) { + v[y] = Math.round(y * r + o); + } + v[n - 1] = t; + } + return [new F3i(r, v), []]; + } + const a = s.minimapLines; + const l = a.length; + const c = []; + let u = 0; + let d = 0; + let h = 1; + const g = 10; + let p = []; + let b = null; + for (let v = 0; v < n; v++) { + const y = Math.max(h, Math.round(v * r)); + const w = Math.max(y, Math.round((v + 1) * r)); + while (u < l && a[u] < y) { + if (p.length < g) { + const S = u + 1 + d; + if (b && b.type === "deleted" && b._oldIndex === u - 1) { + b.deleteToLineNumber++; + } else { + b = { + type: "deleted", + _oldIndex: u, + deleteFromLineNumber: S, + deleteToLineNumber: S + }; + p.push(b); + } + d--; + } + u++; + } + let C; + if (u < l && a[u] <= w) { + C = a[u]; + u++; + } else { + if (v === 0) { + C = 1; + } else if (v + 1 === n) { + C = t; + } else { + C = Math.round(v * r + o); + } + if (p.length < g) { + const S = u + 1 + d; + if (b && b.type === "inserted" && b._i === v - 1) { + b.insertToLineNumber++; + } else { + b = { + type: "inserted", + _i: v, + insertFromLineNumber: S, + insertToLineNumber: S + }; + p.push(b); + } + d++; + } + } + c[v] = C; + h = C; + } + if (p.length < g) { + while (u < l) { + const v = u + 1 + d; + if (b && b.type === "deleted" && b._oldIndex === u - 1) { + b.deleteToLineNumber++; + } else { + b = { + type: "deleted", + _oldIndex: u, + deleteFromLineNumber: v, + deleteToLineNumber: v + }; + p.push(b); + } + d--; + u++; + } + } else { + p = [{ + type: "flush" + }]; + } + return [new F3i(r, c), p]; + } + constructor(e, t) { + this.samplingRatio = e; + this.minimapLines = t; + } + modelLineToMinimapLine(e) { + return Math.min(this.minimapLines.length, Math.max(1, Math.round(e / this.samplingRatio))); + } + modelLineRangeToMinimapLineRange(e, t) { + let s = this.modelLineToMinimapLine(e) - 1; + while (s > 0 && this.minimapLines[s - 1] >= e) { + s--; + } + let n = this.modelLineToMinimapLine(t) - 1; + while (n + 1 < this.minimapLines.length && this.minimapLines[n + 1] <= t) { + n++; + } + if (s === n) { + const r = this.minimapLines[s]; + if (r < e || r > t) { + return null; + } + } + return [s + 1, n + 1]; + } + decorationLineRangeToMinimapLineRange(e, t) { + let s = this.modelLineToMinimapLine(e); + let n = this.modelLineToMinimapLine(t); + if (e !== t && n === s) { + if (n === this.minimapLines.length) { + if (s > 1) { + s--; + } + } else { + n++; + } + } + return [s, n]; + } + onLinesDeleted(e) { + const t = e.toLineNumber - e.fromLineNumber + 1; + let s = this.minimapLines.length; + let n = 0; + for (let r = this.minimapLines.length - 1; r >= 0 && !(this.minimapLines[r] < e.fromLineNumber); r--) { + if (this.minimapLines[r] <= e.toLineNumber) { + this.minimapLines[r] = Math.max(1, e.fromLineNumber - 1); + s = Math.min(s, r); + n = Math.max(n, r); + } else { + this.minimapLines[r] -= t; + } + } + return [s, n]; + } + onLinesInserted(e) { + const t = e.toLineNumber - e.fromLineNumber + 1; + for (let s = this.minimapLines.length - 1; s >= 0 && !(this.minimapLines[s] < e.fromLineNumber); s--) { + this.minimapLines[s] += t; + } + } + }; + Cis = class extends YC { + constructor(i) { + super(i); + this.t = new vc(10, 1.5); + this.tokensColorTracker = S9t.getInstance(); + this.c = []; + this.f = null; + this.options = new P9t(this._context.configuration, this._context.theme, this.tokensColorTracker); + const [e] = N9t.compute(this.options, this._context.viewModel.getLineCount(), null); + this.h = e; + this.n = false; + this.u = new Sis(i.theme, this); + } + dispose() { + this.u.dispose(); + super.dispose(); + } + getDomNode() { + return this.u.getDomNode(); + } + w() { + const i = new P9t(this._context.configuration, this._context.theme, this.tokensColorTracker); + if (this.options.equals(i)) { + return false; + } else { + this.options = i; + this.z(); + this.u.onDidChangeOptions(); + return true; + } + } + onConfigurationChanged(i) { + return this.w(); + } + onCursorStateChanged(i) { + this.c = i.selections; + this.f = null; + return this.u.onSelectionChanged(); + } + onDecorationsChanged(i) { + if (i.affectsMinimap) { + return this.u.onDecorationsChanged(); + } else { + return false; + } + } + onFlushed(i) { + if (this.h) { + this.n = true; + } + return this.u.onFlushed(); + } + onLinesChanged(i) { + if (this.h) { + const e = this.h.modelLineRangeToMinimapLineRange(i.fromLineNumber, i.fromLineNumber + i.count - 1); + if (e) { + return this.u.onLinesChanged(e[0], e[1] - e[0] + 1); + } else { + return false; + } + } else { + return this.u.onLinesChanged(i.fromLineNumber, i.count); + } + } + onLinesDeleted(i) { + if (this.h) { + const [e, t] = this.h.onLinesDeleted(i); + if (e <= t) { + this.u.onLinesChanged(e + 1, t - e + 1); + } + this.n = true; + return true; + } else { + return this.u.onLinesDeleted(i.fromLineNumber, i.toLineNumber); + } + } + onLinesInserted(i) { + if (this.h) { + this.h.onLinesInserted(i); + this.n = true; + return true; + } else { + return this.u.onLinesInserted(i.fromLineNumber, i.toLineNumber); + } + } + onScrollChanged(i) { + return this.u.onScrollChanged(); + } + onThemeChanged(i) { + this.u.onThemeChanged(); + this.w(); + return true; + } + onTokensChanged(i) { + if (this.h) { + const e = []; + for (const t of i.ranges) { + const s = this.h.modelLineRangeToMinimapLineRange(t.fromLineNumber, t.toLineNumber); + if (s) { + e.push({ + fromLineNumber: s[0], + toLineNumber: s[1] + }); + } + } + if (e.length) { + return this.u.onTokensChanged(e); + } else { + return false; + } + } else { + return this.u.onTokensChanged(i.ranges); + } + } + onTokensColorsChanged(i) { + this.w(); + return this.u.onTokensColorsChanged(); + } + onZonesChanged(i) { + return this.u.onZonesChanged(); + } + prepareRender(i) { + if (this.n) { + this.n = false; + this.z(); + } + } + render(i) { + let e = i.visibleRange.startLineNumber; + let t = i.visibleRange.endLineNumber; + if (this.h) { + e = this.h.modelLineToMinimapLine(e); + t = this.h.modelLineToMinimapLine(t); + } + const s = { + viewportContainsWhitespaceGaps: i.viewportData.whitespaceViewportData.length > 0, + scrollWidth: i.scrollWidth, + scrollHeight: i.scrollHeight, + viewportStartLineNumber: e, + viewportEndLineNumber: t, + viewportStartLineNumberVerticalOffset: i.getVerticalOffsetForLineNumber(e), + scrollTop: i.scrollTop, + scrollLeft: i.scrollLeft, + viewportWidth: i.viewportWidth, + viewportHeight: i.viewportHeight + }; + this.u.render(s); + } + z() { + this.f = null; + const i = !!this.h; + const [e, t] = N9t.compute(this.options, this._context.viewModel.getLineCount(), this.h); + this.h = e; + if (i && this.h) { + for (const s of t) { + switch (s.type) { + case "deleted": + this.u.onLinesDeleted(s.deleteFromLineNumber, s.deleteToLineNumber); + break; + case "inserted": + this.u.onLinesInserted(s.insertFromLineNumber, s.insertToLineNumber); + break; + case "flush": + this.u.onFlushed(); + break; + } + } + } + } + getLineCount() { + if (this.h) { + return this.h.minimapLines.length; + } else { + return this._context.viewModel.getLineCount(); + } + } + getRealLineCount() { + return this._context.viewModel.getLineCount(); + } + getLineContent(i) { + if (this.h) { + return this._context.viewModel.getLineContent(this.h.minimapLines[i - 1]); + } else { + return this._context.viewModel.getLineContent(i); + } + } + getLineMaxColumn(i) { + if (this.h) { + return this._context.viewModel.getLineMaxColumn(this.h.minimapLines[i - 1]); + } else { + return this._context.viewModel.getLineMaxColumn(i); + } + } + getMinimapLinesRenderingData(i, e, t) { + if (this.h) { + const s = []; + for (let n = 0, r = e - i + 1; n < r; n++) { + if (t[n]) { + s[n] = this._context.viewModel.getViewLineData(this.h.minimapLines[i + n - 1]); + } else { + s[n] = null; + } + } + return s; + } + return this._context.viewModel.getMinimapLinesRenderingData(i, e, t).data; + } + getSelections() { + if (this.f === null) { + if (this.h) { + this.f = []; + for (const i of this.c) { + const [e, t] = this.h.decorationLineRangeToMinimapLineRange(i.startLineNumber, i.endLineNumber); + this.f.push(new Vs(e, i.startColumn, t, i.endColumn)); + } + } else { + this.f = this.c; + } + } + return this.f; + } + getMinimapDecorationsInViewport(i, e) { + const t = this.C(i, e).filter(s => !s.options.minimap?.sectionHeaderStyle); + if (this.h) { + const s = []; + for (const n of t) { + if (!n.options.minimap) { + continue; + } + const r = n.range; + const o = this.h.modelLineToMinimapLine(r.startLineNumber); + const a = this.h.modelLineToMinimapLine(r.endLineNumber); + s.push(new k9t(new Z(o, r.startColumn, a, r.endColumn), n.options)); + } + return s; + } + return t; + } + getSectionHeaderDecorationsInViewport(i, e) { + const t = this.options.minimapLineHeight; + const n = this.options.sectionHeaderFontSize / t; + i = Math.floor(Math.max(1, i - n)); + return this.C(i, e).filter(r => !!r.options.minimap?.sectionHeaderStyle); + } + C(i, e) { + let t; + if (this.h) { + const s = this.h.minimapLines[i - 1]; + const n = this.h.minimapLines[e - 1]; + t = new Z(s, 1, n, this._context.viewModel.getLineMaxColumn(n)); + } else { + t = new Z(i, 1, e, this._context.viewModel.getLineMaxColumn(e)); + } + return this._context.viewModel.getMinimapDecorationsInRange(t); + } + getSectionHeaderText(i, e) { + const t = i.options.minimap?.sectionHeaderText; + if (!t) { + return null; + } + const s = this.t.get(t); + if (s) { + return s; + } + const n = e(t); + this.t.set(t, n); + return n; + } + getOptions() { + return this._context.viewModel.model.getOptions(); + } + revealLineNumber(i) { + if (this.h) { + i = this.h.minimapLines[i - 1]; + } + this._context.viewModel.revealRange("mouse", false, new Z(i, 1, i, 1), 1, 0); + } + setScrollTop(i) { + this._context.viewModel.viewLayout.setScrollPosition({ + scrollTop: i + }, 1); + } + }; + Sis = class KPe extends H { + constructor(e, t) { + super(); + this.M = false; + this.N = false; + this.c = e; + this.f = t; + this.J = null; + this.O = null; + this.L = this.c.getColor(i3t); + this.h = nc(document.createElement("div")); + JL.write(this.h, 9); + this.h.setClassName(this.R()); + this.h.setPosition("absolute"); + this.h.setAttribute("role", "presentation"); + this.h.setAttribute("aria-hidden", "true"); + this.m = nc(document.createElement("div")); + this.m.setClassName("minimap-shadow-hidden"); + this.h.appendChild(this.m); + this.n = nc(document.createElement("canvas")); + this.n.setPosition("absolute"); + this.n.setLeft(0); + this.h.appendChild(this.n); + this.q = nc(document.createElement("canvas")); + this.q.setPosition("absolute"); + this.q.setClassName("minimap-decorations-layer"); + this.q.setLeft(0); + this.h.appendChild(this.q); + this.t = nc(document.createElement("div")); + this.t.setPosition("absolute"); + this.t.setClassName("minimap-slider"); + this.t.setLayerHinting(true); + this.t.setContain("strict"); + this.h.appendChild(this.t); + this.u = nc(document.createElement("div")); + this.u.setPosition("absolute"); + this.u.setClassName("minimap-slider-horizontal"); + this.t.appendChild(this.u); + this.S(); + this.w = ko(this.h.domNode, Oe.POINTER_DOWN, s => { + s.preventDefault(); + if (this.f.options.renderMinimap === 0 || !this.J) { + return; + } + if (this.f.options.size !== "proportional") { + if (s.button === 0 && this.J) { + const c = sd(this.t.domNode); + const u = c.top + c.height / 2; + this.P(s, u, this.J.renderedLayout); + } + return; + } + const r = this.f.options.minimapLineHeight; + const o = this.f.options.canvasInnerHeight / this.f.options.canvasOuterHeight * s.offsetY; + let l = Math.floor(o / r) + this.J.renderedLayout.startLineNumber - this.J.renderedLayout.topPaddingLineCount; + l = Math.min(l, this.f.getLineCount()); + this.f.revealLineNumber(l); + }); + this.z = new Sj(); + this.C = ko(this.t.domNode, Oe.POINTER_DOWN, s => { + s.preventDefault(); + s.stopPropagation(); + if (s.button === 0 && this.J) { + this.P(s, s.pageY, this.J.renderedLayout); + } + }); + this.F = bd.addTarget(this.h.domNode); + this.G = Ce(this.h.domNode, ul.Start, s => { + s.preventDefault(); + s.stopPropagation(); + if (this.J) { + this.t.toggleClassName("active", true); + this.N = true; + this.Q(s); + } + }, { + passive: false + }); + this.H = Ce(this.h.domNode, ul.Change, s => { + s.preventDefault(); + s.stopPropagation(); + if (this.J && this.N) { + this.Q(s); + } + }, { + passive: false + }); + this.I = ko(this.h.domNode, ul.End, s => { + s.preventDefault(); + s.stopPropagation(); + this.N = false; + this.t.toggleClassName("active", false); + }); + } + P(e, t, s) { + if (!e.target || !(e.target instanceof Element)) { + return; + } + const n = e.pageX; + this.t.toggleClassName("active", true); + const r = (o, a) => { + const l = sd(this.h.domNode); + const c = Math.min(Math.abs(a - n), Math.abs(a - l.left), Math.abs(a - l.left - l.width)); + if (ln && c > bis) { + this.f.setScrollTop(s.scrollTop); + return; + } + const u = o - t; + this.f.setScrollTop(s.getDesiredScrollTopFromDelta(u)); + }; + if (e.pageY !== t) { + r(e.pageY, n); + } + this.z.startMonitoring(e.target, e.pointerId, e.buttons, o => r(o.pageY, o.pageX), () => { + this.t.toggleClassName("active", false); + }); + } + Q(e) { + const t = this.h.domNode.getBoundingClientRect().top; + const s = this.J.renderedLayout.getDesiredScrollTopFromTouchLocation(e.pageY - t); + this.f.setScrollTop(s); + } + dispose() { + this.w.dispose(); + this.z.dispose(); + this.C.dispose(); + this.F.dispose(); + this.G.dispose(); + this.H.dispose(); + this.I.dispose(); + super.dispose(); + } + R() { + const e = ["minimap"]; + if (this.f.options.showSlider === "always") { + e.push("slider-always"); + } else { + e.push("slider-mouseover"); + } + if (this.f.options.autohide) { + e.push("autohide"); + } + return e.join(" "); + } + getDomNode() { + return this.h; + } + S() { + this.h.setLeft(this.f.options.minimapLeft); + this.h.setWidth(this.f.options.minimapWidth); + this.h.setHeight(this.f.options.minimapHeight); + this.m.setHeight(this.f.options.minimapHeight); + this.n.setWidth(this.f.options.canvasOuterWidth); + this.n.setHeight(this.f.options.canvasOuterHeight); + this.n.domNode.width = this.f.options.canvasInnerWidth; + this.n.domNode.height = this.f.options.canvasInnerHeight; + this.q.setWidth(this.f.options.canvasOuterWidth); + this.q.setHeight(this.f.options.canvasOuterHeight); + this.q.domNode.width = this.f.options.canvasInnerWidth; + this.q.domNode.height = this.f.options.canvasInnerHeight; + this.t.setWidth(this.f.options.minimapWidth); + } + U() { + if (!this.O) { + if (this.f.options.canvasInnerWidth > 0 && this.f.options.canvasInnerHeight > 0) { + this.O = new wis(this.n.domNode.getContext("2d"), this.f.options.canvasInnerWidth, this.f.options.canvasInnerHeight, this.f.options.backgroundColor); + } + } + if (this.O) { + return this.O.getBuffer(); + } else { + return null; + } + } + onDidChangeOptions() { + this.J = null; + this.O = null; + this.S(); + this.h.setClassName(this.R()); + } + onSelectionChanged() { + this.M = true; + return true; + } + onDecorationsChanged() { + this.M = true; + return true; + } + onFlushed() { + this.J = null; + return true; + } + onLinesChanged(e, t) { + if (this.J) { + return this.J.onLinesChanged(e, t); + } else { + return false; + } + } + onLinesDeleted(e, t) { + this.J?.onLinesDeleted(e, t); + return true; + } + onLinesInserted(e, t) { + this.J?.onLinesInserted(e, t); + return true; + } + onScrollChanged() { + this.M = true; + return true; + } + onThemeChanged() { + this.L = this.c.getColor(i3t); + this.M = true; + return true; + } + onTokensChanged(e) { + if (this.J) { + return this.J.onTokensChanged(e); + } else { + return false; + } + } + onTokensColorsChanged() { + this.J = null; + this.O = null; + return true; + } + onZonesChanged() { + this.J = null; + return true; + } + render(e) { + if (this.f.options.renderMinimap === 0) { + this.m.setClassName("minimap-shadow-hidden"); + this.u.setWidth(0); + this.u.setHeight(0); + return; + } + if (e.scrollLeft + e.viewportWidth >= e.scrollWidth) { + this.m.setClassName("minimap-shadow-hidden"); + } else { + this.m.setClassName("minimap-shadow-visible"); + } + const s = yis.create(this.f.options, e.viewportStartLineNumber, e.viewportEndLineNumber, e.viewportStartLineNumberVerticalOffset, e.viewportHeight, e.viewportContainsWhitespaceGaps, this.f.getLineCount(), this.f.getRealLineCount(), e.scrollTop, e.scrollHeight, this.J ? this.J.renderedLayout : null); + this.t.setDisplay(s.sliderNeeded ? "block" : "none"); + this.t.setTop(s.sliderTop); + this.t.setHeight(s.sliderHeight); + this.u.setLeft(0); + this.u.setWidth(this.f.options.minimapWidth); + this.u.setTop(0); + this.u.setHeight(s.sliderHeight); + this.W(s); + this.J = this.gb(s); + } + W(e) { + if (this.M) { + this.M = false; + const t = this.f.getSelections(); + t.sort(Z.compareRangesUsingStarts); + const s = this.f.getMinimapDecorationsInViewport(e.startLineNumber, e.endLineNumber); + s.sort((h, g) => (h.options.zIndex || 0) - (g.options.zIndex || 0)); + const { + canvasInnerWidth: n, + canvasInnerHeight: r + } = this.f.options; + const o = this.f.options.minimapLineHeight; + const a = this.f.options.minimapCharWidth; + const l = this.f.getOptions().tabSize; + const c = this.q.domNode.getContext("2d"); + c.clearRect(0, 0, n, r); + const u = new M9t(e.startLineNumber, e.endLineNumber, false); + this.X(c, t, u, e, o); + this.Y(c, s, u, e, o); + const d = new M9t(e.startLineNumber, e.endLineNumber, null); + this.Z(c, t, d, e, o, l, a, n); + this.$(c, s, d, e, o, l, a, n); + this.db(e); + } + } + X(e, t, s, n, r) { + if (!this.L || this.L.isTransparent()) { + return; + } + e.fillStyle = this.L.transparent(0.5).toString(); + let o = 0; + let a = 0; + for (const l of t) { + const c = n.intersectWithViewport(l); + if (!c) { + continue; + } + const [u, d] = c; + for (let p = u; p <= d; p++) { + s.set(p, true); + } + const h = n.getYForLineNumber(u, r); + const g = n.getYForLineNumber(d, r); + if (!(a >= h)) { + if (a > o) { + e.fillRect(bM, o, e.canvas.width, a - o); + } + o = h; + } + a = g; + } + if (a > o) { + e.fillRect(bM, o, e.canvas.width, a - o); + } + } + Y(e, t, s, n, r) { + const o = new Map(); + for (let a = t.length - 1; a >= 0; a--) { + const l = t[a]; + const c = l.options.minimap; + if (!c || c.position !== 1) { + continue; + } + const u = n.intersectWithViewport(l.range); + if (!u) { + continue; + } + const [d, h] = u; + const g = c.getColor(this.c.value); + if (!g || g.isTransparent()) { + continue; + } + let p = o.get(g.toString()); + if (!p) { + p = g.transparent(0.5).toString(); + o.set(g.toString(), p); + } + e.fillStyle = p; + for (let b = d; b <= h; b++) { + if (s.has(b)) { + continue; + } + s.set(b, true); + const v = n.getYForLineNumber(d, r); + e.fillRect(bM, v, e.canvas.width, r); + } + } + } + Z(e, t, s, n, r, o, a, l) { + if (!!this.L && !this.L.isTransparent()) { + for (const c of t) { + const u = n.intersectWithViewport(c); + if (!u) { + continue; + } + const [d, h] = u; + for (let g = d; g <= h; g++) { + this.ab(e, s, c, this.L, n, g, r, r, o, a, l); + } + } + } + } + $(e, t, s, n, r, o, a, l) { + for (const c of t) { + const u = c.options.minimap; + if (!u) { + continue; + } + const d = n.intersectWithViewport(c.range); + if (!d) { + continue; + } + const [h, g] = d; + const p = u.getColor(this.c.value); + if (!!p && !p.isTransparent()) { + for (let b = h; b <= g; b++) { + switch (u.position) { + case 1: + this.ab(e, s, c.range, p, n, b, r, r, o, a, l); + continue; + case 2: + { + const v = n.getYForLineNumber(b, r); + this.cb(e, p, 2, v, vis, r); + continue; + } + } + } + } + } + } + ab(e, t, s, n, r, o, a, l, c, u, d) { + const h = r.getYForLineNumber(o, l); + if (h + a < 0 || h > this.f.options.canvasInnerHeight) { + return; + } + const { + startLineNumber: g, + endLineNumber: p + } = s; + const b = g === o ? s.startColumn : 1; + const v = p === o ? s.endColumn : this.f.getLineMaxColumn(o); + const y = this.bb(t, o, b, c, u, d); + const w = this.bb(t, o, v, c, u, d); + this.cb(e, n, y, h, w - y, a); + } + bb(e, t, s, n, r, o) { + if (s === 1) { + return bM; + } + if ((s - 1) * r >= o) { + return o; + } + let l = e.get(t); + if (!l) { + const c = this.f.getLineContent(t); + l = [bM]; + let u = bM; + for (let d = 1; d < c.length + 1; d++) { + const h = c.charCodeAt(d - 1); + const g = h === 9 ? n * r : i9(h) ? r * 2 : r; + const p = u + g; + if (p >= o) { + l[d] = o; + break; + } + l[d] = p; + u = p; + } + e.set(t, l); + } + if (s - 1 < l.length) { + return l[s - 1]; + } else { + return o; + } + } + cb(e, t, s, n, r, o) { + e.fillStyle = t && t.toString() || ""; + e.fillRect(s, n, r, o); + } + db(e) { + const t = this.f.options.minimapLineHeight; + const s = this.f.options.sectionHeaderFontSize; + const n = this.f.options.sectionHeaderLetterSpacing; + const r = s * 1.5; + const { + canvasInnerWidth: o + } = this.f.options; + const a = this.f.options.backgroundColor; + const l = `rgb(${a.r} ${a.g} ${a.b} / .7)`; + const c = this.f.options.sectionHeaderFontColor; + const u = `rgb(${c.r} ${c.g} ${c.b})`; + const d = u; + const h = this.q.domNode.getContext("2d"); + h.letterSpacing = n + "px"; + h.font = "500 " + s + "px " + this.f.options.sectionHeaderFontFamily; + h.strokeStyle = d; + h.lineWidth = 0.2; + const g = this.f.getSectionHeaderDecorationsInViewport(e.startLineNumber, e.endLineNumber); + g.sort((b, v) => b.range.startLineNumber - v.range.startLineNumber); + const p = KPe.eb.bind(null, h, o - bM); + for (const b of g) { + const v = e.getYForLineNumber(b.range.startLineNumber, t) + s; + const y = v - s; + const w = y + 2; + const C = this.f.getSectionHeaderText(b, p); + KPe.fb(h, C, b.options.minimap?.sectionHeaderStyle === 2, l, u, o, y, r, v, w); + } + } + static eb(e, t, s) { + if (!s) { + return s; + } + const n = "…"; + const r = e.measureText(s).width; + const o = e.measureText(n).width; + if (r <= t || r <= o) { + return s; + } + const a = s.length; + const l = r / s.length; + const c = Math.floor((t - o) / l) - 1; + let u = Math.ceil(c / 2); + while (u > 0 && /\s/.test(s[u - 1])) { + --u; + } + return s.substring(0, u) + n + s.substring(a - (c - u)); + } + static fb(e, t, s, n, r, o, a, l, c, u) { + if (t) { + e.fillStyle = n; + e.fillRect(0, a, o, l); + e.fillStyle = r; + e.fillText(t, bM, c); + } + if (s) { + e.beginPath(); + e.moveTo(0, u); + e.lineTo(o, u); + e.closePath(); + e.stroke(); + } + } + gb(e) { + const t = e.startLineNumber; + const s = e.endLineNumber; + const n = this.f.options.minimapLineHeight; + if (this.J && this.J.linesEquals(e)) { + const j = this.J._get(); + return new R9t(e, j.imageData, j.lines); + } + const r = this.U(); + if (!r) { + return null; + } + const [o, a, l] = KPe.hb(r, e.topPaddingLineCount, t, s, n, this.J); + const c = this.f.getMinimapLinesRenderingData(t, s, l); + const u = this.f.getOptions().tabSize; + const d = this.f.options.defaultBackgroundColor; + const h = this.f.options.backgroundColor; + const g = this.f.options.foregroundAlpha; + const p = this.f.tokensColorTracker; + const b = p.backgroundIsLight(); + const v = this.f.options.renderMinimap; + const y = this.f.options.charRenderer(); + const w = this.f.options.fontScale; + const C = this.f.options.minimapCharWidth; + const x = (v === 1 ? 2 : 3) * w; + const k = n > x ? Math.floor((n - x) / 2) : 0; + const E = h.a / 255; + const D = new U9(Math.round((h.r - d.r) * E + d.r), Math.round((h.g - d.g) * E + d.g), Math.round((h.b - d.b) * E + d.b), 255); + let P = e.topPaddingLineCount * n; + const R = []; + for (let j = 0, ie = s - t + 1; j < ie; j++) { + if (l[j]) { + KPe.ib(r, D, h.a, b, v, C, p, g, y, P, k, u, c[j], w, n); + } + R[j] = new L9t(P); + P += n; + } + const L = o === -1 ? 0 : o; + const O = (a === -1 ? r.height : a) - L; + this.n.domNode.getContext("2d").putImageData(r, 0, 0, 0, L, r.width, O); + return new R9t(e, r, R); + } + static hb(e, t, s, n, r, o) { + const a = []; + if (!o) { + for (let P = 0, R = n - s + 1; P < R; P++) { + a[P] = true; + } + return [-1, -1, a]; + } + const l = o._get(); + const c = l.imageData.data; + const u = l.rendLineNumberStart; + const d = l.lines; + const h = d.length; + const g = e.width; + const p = e.data; + const b = (n - s + 1) * r * g * 4; + let v = -1; + let y = -1; + let w = -1; + let C = -1; + let S = -1; + let x = -1; + let k = t * r; + for (let P = s; P <= n; P++) { + const R = P - s; + const L = P - u; + const F = L >= 0 && L < h ? d[L].dy : -1; + if (F === -1) { + a[R] = true; + k += r; + continue; + } + const O = F * g * 4; + const U = (F + r) * g * 4; + const j = k * g * 4; + const ie = (k + r) * g * 4; + if (C === O && x === j) { + C = U; + x = ie; + } else { + if (w !== -1) { + p.set(c.subarray(w, C), S); + if (v === -1 && w === 0 && w === S) { + v = C; + } + if (y === -1 && C === b && w === S) { + y = w; + } + } + w = O; + C = U; + S = j; + x = ie; + } + a[R] = false; + k += r; + } + if (w !== -1) { + p.set(c.subarray(w, C), S); + if (v === -1 && w === 0 && w === S) { + v = C; + } + if (y === -1 && C === b && w === S) { + y = w; + } + } + const E = v === -1 ? -1 : v / (g * 4); + const D = y === -1 ? -1 : y / (g * 4); + return [E, D, a]; + } + static ib(e, t, s, n, r, o, a, l, c, u, d, h, g, p, b) { + const v = g.content; + const y = g.tokens; + const w = e.width - o; + const C = b === 1; + let S = bM; + let x = 0; + let k = 0; + for (let E = 0, D = y.getCount(); E < D; E++) { + const P = y.getEndOffset(E); + const R = y.getForeground(E); + const L = a.getColor(R); + for (; x < P; x++) { + if (S > w) { + return; + } + const F = v.charCodeAt(x); + if (F === 9) { + const O = h - (x + k) % h; + k += O - 1; + S += O * o; + } else if (F === 32) { + S += o; + } else { + const O = i9(F) ? 2 : 1; + for (let U = 0; U < O; U++) { + if (r === 2) { + c.blockRenderChar(e, S, u + d, L, l, t, s, C); + } else { + c.renderChar(e, S, u + d, F, L, l, t, s, p, n, C); + } + S += o; + if (S > w) { + return; + } + } + } + } + } + } + }; + M9t = class { + constructor(i, e, t) { + this.c = i; + this.d = e; + this.f = t; + this.h = []; + for (let s = 0, n = this.d - this.c + 1; s < n; s++) { + this.h[s] = t; + } + } + has(i) { + return this.get(i) !== this.f; + } + set(i, e) { + if (!(i < this.c) && !(i > this.d)) { + this.h[i - this.c] = e; + } + } + get(i) { + if (i < this.c || i > this.d) { + return this.f; + } else { + return this.h[i - this.c]; + } + } + }; + } +}); +var hGn = ue({ + "out-build/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.css"() {} +}); +var xis; +var fGn = ue({ + "out-build/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.js"() { + "use strict"; + + hGn(); + pf(); + Ow(); + xe(); + xis = class extends YC { + constructor(i, e) { + super(i); + this.c = e; + const s = this._context.configuration.options.get(151); + this.f = {}; + this.j = s.verticalScrollbarWidth; + this.n = s.minimap.minimapWidth; + this.s = s.horizontalScrollbarHeight; + this.t = s.height; + this.u = s.width; + this.g = { + top: 0, + left: 0, + width: 0, + height: 0 + }; + this.h = nc(document.createElement("div")); + JL.write(this.h, 4); + this.h.setClassName("overlayWidgets"); + this.overflowingOverlayWidgetsDomNode = nc(document.createElement("div")); + JL.write(this.overflowingOverlayWidgetsDomNode, 5); + this.overflowingOverlayWidgetsDomNode.setClassName("overflowingOverlayWidgets"); + } + dispose() { + super.dispose(); + this.f = {}; + } + getDomNode() { + return this.h; + } + onConfigurationChanged(i) { + const t = this._context.configuration.options.get(151); + this.j = t.verticalScrollbarWidth; + this.n = t.minimap.minimapWidth; + this.s = t.horizontalScrollbarHeight; + this.t = t.height; + this.u = t.width; + return true; + } + addWidget(i) { + const e = nc(i.getDomNode()); + this.f[i.getId()] = { + widget: i, + preference: null, + domNode: e + }; + e.setPosition("absolute"); + e.setAttribute("widgetId", i.getId()); + if (i.allowEditorOverflow) { + this.overflowingOverlayWidgetsDomNode.appendChild(e); + } else { + this.h.appendChild(e); + } + this.q(); + this.w(); + } + setWidgetPosition(i, e) { + const t = this.f[i.getId()]; + const s = e ? e.preference : null; + const n = e?.stackOridinal; + if (t.preference === s && t.stack === n) { + this.w(); + return false; + } else { + t.preference = s; + t.stack = n; + this.q(); + this.w(); + return true; + } + } + removeWidget(i) { + const e = i.getId(); + if (this.f.hasOwnProperty(e)) { + const s = this.f[e].domNode.domNode; + delete this.f[e]; + s.remove(); + this.q(); + this.w(); + } + } + w() { + let i = 0; + const e = Object.keys(this.f); + for (let t = 0, s = e.length; t < s; t++) { + const n = e[t]; + const o = this.f[n].widget.getMinContentWidthInPx?.(); + if (typeof o !== "undefined") { + i = Math.max(i, o); + } + } + this._context.viewLayout.setOverlayWidgetsMinWidth(i); + } + y(i, e) { + const t = i.domNode; + if (i.preference === null) { + t.setTop(""); + return; + } + const s = this.j * 2 + this.n; + if (i.preference === 0 || i.preference === 1) { + if (i.preference === 1) { + const n = t.domNode.clientHeight; + t.setTop(this.t - n - this.s * 2); + } else { + t.setTop(0); + } + if (i.stack !== undefined) { + t.setTop(e[i.preference]); + e[i.preference] += t.domNode.clientWidth; + } else { + t.setRight(s); + } + } else if (i.preference === 2) { + t.domNode.style.right = "50%"; + if (i.stack !== undefined) { + t.setTop(e[2]); + e[2] += t.domNode.clientHeight; + } else { + t.setTop(0); + } + } else if (i.preference === 3) { + t.setTop(""); + t.setBottom(this.s); + t.setWidth("100%"); + } else { + const { + top: n, + left: r + } = i.preference; + if (this._context.configuration.options.get(44) && i.widget.allowEditorOverflow) { + const a = this.g; + t.setTop(n + a.top); + t.setLeft(r + a.left); + t.setPosition("fixed"); + } else { + t.setTop(n); + t.setLeft(r); + t.setPosition("absolute"); + } + } + } + prepareRender(i) { + this.g = sd(this.c.domNode); + } + render(i) { + this.h.setWidth(this.u); + const e = Object.keys(this.f); + const t = Array.from({ + length: 3 + }, () => 0); + e.sort((s, n) => (this.f[s].stack || 0) - (this.f[n].stack || 0)); + for (let s = 0, n = e.length; s < n; s++) { + const r = e[s]; + this.y(this.f[r], t); + } + } + }; + } +}); +var kis; +var Eis; +var Iis; +var Dis; +var Tis; +var gGn = ue({ + "out-build/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.js"() { + "use strict"; + + pf(); + Zo(); + Ow(); + Rs(); + Eo(); + z0(); + MI(); + Jt(); + kis = class { + constructor(i, e) { + const t = i.options; + this.lineHeight = t.get(68); + this.pixelRatio = t.get(149); + this.overviewRulerLanes = t.get(87); + this.renderBorder = t.get(86); + const s = e.getColor(e9t); + this.borderColor = s ? s.toString() : null; + this.hideCursor = t.get(61); + const n = e.getColor(gte); + this.cursorColorSingle = n ? n.transparent(0.7).toString() : null; + const r = e.getColor(Y3t); + this.cursorColorPrimary = r ? r.transparent(0.7).toString() : null; + const o = e.getColor(X3t); + this.cursorColorSecondary = o ? o.transparent(0.7).toString() : null; + this.themeType = e.type; + const a = t.get(74); + const l = a.enabled; + const c = a.side; + const u = e.getColor(Kes); + const d = qm.getDefaultBackground(); + if (u) { + this.backgroundColor = u; + } else if (l && c === "right") { + this.backgroundColor = d; + } else { + this.backgroundColor = null; + } + const g = t.get(151).overviewRuler; + this.top = g.top; + this.right = g.right; + this.domWidth = g.width; + this.domHeight = g.height; + if (this.overviewRulerLanes === 0) { + this.canvasWidth = 0; + this.canvasHeight = 0; + } else { + this.canvasWidth = this.domWidth * this.pixelRatio | 0; + this.canvasHeight = this.domHeight * this.pixelRatio | 0; + } + const [p, b] = this.c(1, this.canvasWidth, this.overviewRulerLanes); + this.x = p; + this.w = b; + } + c(i, e, t) { + const s = e - i; + if (t >= 3) { + const n = Math.floor(s / 3); + const r = Math.floor(s / 3); + const o = s - n - r; + const a = i; + const l = a + n; + const c = a + n + o; + return [[0, a, l, a, c, a, l, a], [0, n, o, n + o, r, n + o + r, o + r, n + o + r]]; + } else if (t === 2) { + const n = Math.floor(s / 2); + const r = s - n; + const o = i; + const a = o + n; + return [[0, o, o, o, a, o, o, o], [0, n, n, n, r, n + r, n + r, n + r]]; + } else { + const n = i; + const r = s; + return [[0, n, n, n, n, n, n, n], [0, r, r, r, r, r, r, r]]; + } + } + equals(i) { + return this.lineHeight === i.lineHeight && this.pixelRatio === i.pixelRatio && this.overviewRulerLanes === i.overviewRulerLanes && this.renderBorder === i.renderBorder && this.borderColor === i.borderColor && this.hideCursor === i.hideCursor && this.cursorColorSingle === i.cursorColorSingle && this.cursorColorPrimary === i.cursorColorPrimary && this.cursorColorSecondary === i.cursorColorSecondary && this.themeType === i.themeType && ut.equals(this.backgroundColor, i.backgroundColor) && this.top === i.top && this.right === i.right && this.domWidth === i.domWidth && this.domHeight === i.domHeight && this.canvasWidth === i.canvasWidth && this.canvasHeight === i.canvasHeight; + } + }; + (function (i) { + i[i.MIN_DECORATION_HEIGHT = 6] = "MIN_DECORATION_HEIGHT"; + })(Eis ||= {}); + (function (i) { + i[i.Left = 1] = "Left"; + i[i.Center = 2] = "Center"; + i[i.Right = 4] = "Right"; + i[i.Full = 7] = "Full"; + })(Iis ||= {}); + (function (i) { + i[i.NotNeeded = 0] = "NotNeeded"; + i[i.Maybe = 1] = "Maybe"; + i[i.Needed = 2] = "Needed"; + })(Dis ||= {}); + Tis = class extends YC { + constructor(i) { + super(i); + this.c = 0; + this.n = []; + this.s = []; + this.g = nc(document.createElement("canvas")); + this.g.setClassName("decorationsOverviewRuler"); + this.g.setPosition("absolute"); + this.g.setLayerHinting(true); + this.g.setContain("strict"); + this.g.setAttribute("aria-hidden", "true"); + this.t(false); + this.f = qm.onDidChange(e => { + if (e.changedColorMap) { + this.t(true); + } + }); + this.j = [{ + position: new je(1, 1), + color: this.h.cursorColorSingle + }]; + } + dispose() { + super.dispose(); + this.f.dispose(); + } + t(i) { + const e = new kis(this._context.configuration, this._context.theme); + if (this.h && this.h.equals(e)) { + return false; + } else { + this.h = e; + this.g.setTop(this.h.top); + this.g.setRight(this.h.right); + this.g.setWidth(this.h.domWidth); + this.g.setHeight(this.h.domHeight); + this.g.domNode.width = this.h.canvasWidth; + this.g.domNode.height = this.h.canvasHeight; + if (i) { + this.z(); + } + return true; + } + } + u() { + this.c = 2; + return true; + } + y() { + this.c = 1; + return true; + } + onConfigurationChanged(i) { + if (this.t(false)) { + return this.u(); + } else { + return false; + } + } + onCursorStateChanged(i) { + this.j = []; + for (let e = 0, t = i.selections.length; e < t; e++) { + let s = this.h.cursorColorSingle; + if (t > 1) { + s = e === 0 ? this.h.cursorColorPrimary : this.h.cursorColorSecondary; + } + this.j.push({ + position: i.selections[e].getPosition(), + color: s + }); + } + this.j.sort((e, t) => je.compare(e.position, t.position)); + return this.y(); + } + onDecorationsChanged(i) { + if (i.affectsOverviewRuler) { + return this.y(); + } else { + return false; + } + } + onFlushed(i) { + return this.u(); + } + onScrollChanged(i) { + if (i.scrollHeightChanged) { + return this.u(); + } else { + return false; + } + } + onZonesChanged(i) { + return this.u(); + } + onThemeChanged(i) { + if (this.t(false)) { + return this.u(); + } else { + return false; + } + } + getDomNode() { + return this.g.domNode; + } + prepareRender(i) {} + render(i) { + this.z(); + this.c = 0; + } + z() { + const i = this.h.backgroundColor; + if (this.h.overviewRulerLanes === 0) { + this.g.setBackgroundColor(i ? ut.Format.CSS.formatHexA(i) : ""); + this.g.setDisplay("none"); + return; + } + const e = this._context.viewModel.getAllOverviewRulerDecorations(this._context.theme); + e.sort(Oat.compareByRenderingProps); + if (this.c === 1 && !Oat.equalsArr(this.n, e)) { + this.c = 2; + } + if (this.c === 1 && !Go(this.s, this.j, (g, p) => g.position.lineNumber === p.position.lineNumber && g.color === p.color)) { + this.c = 2; + } + if (this.c === 1) { + return; + } + this.n = e; + this.s = this.j; + this.g.setDisplay("block"); + const t = this.h.canvasWidth; + const s = this.h.canvasHeight; + const n = this.h.lineHeight; + const r = this._context.viewLayout; + const o = this._context.viewLayout.getScrollHeight(); + const a = s / o; + const l = this.h.pixelRatio * 6 | 0; + const c = l / 2 | 0; + const u = this.g.domNode.getContext("2d"); + if (i) { + if (i.isOpaque()) { + u.fillStyle = ut.Format.CSS.formatHexA(i); + u.fillRect(0, 0, t, s); + } else { + u.clearRect(0, 0, t, s); + u.fillStyle = ut.Format.CSS.formatHexA(i); + u.fillRect(0, 0, t, s); + } + } else { + u.clearRect(0, 0, t, s); + } + const d = this.h.x; + const h = this.h.w; + for (const g of e) { + const p = g.color; + const b = g.data; + u.fillStyle = p; + let v = 0; + let y = 0; + let w = 0; + for (let C = 0, S = b.length / 3; C < S; C++) { + const x = b[C * 3]; + const k = b[C * 3 + 1]; + const E = b[C * 3 + 2]; + let D = r.getVerticalOffsetForLineNumber(k) * a | 0; + let P = (r.getVerticalOffsetForLineNumber(E) + n) * a | 0; + if (P - D < l) { + let L = (D + P) / 2 | 0; + if (L < c) { + L = c; + } else if (L + c > s) { + L = s - c; + } + D = L - c; + P = L + c; + } + if (D > w + 1 || x !== v) { + if (C !== 0) { + u.fillRect(d[v], y, h[v], w - y); + } + v = x; + y = D; + w = P; + } else if (P > w) { + w = P; + } + } + u.fillRect(d[v], y, h[v], w - y); + } + if (!this.h.hideCursor) { + const g = this.h.pixelRatio * 2 | 0; + const p = g / 2 | 0; + const b = this.h.x[7]; + const v = this.h.w[7]; + let y = -100; + let w = -100; + let C = null; + for (let S = 0, x = this.j.length; S < x; S++) { + const k = this.j[S].color; + if (!k) { + continue; + } + const E = this.j[S].position; + let D = r.getVerticalOffsetForLineNumber(E.lineNumber) * a | 0; + if (D < p) { + D = p; + } else if (D + p > s) { + D = s - p; + } + const P = D - p; + const R = P + g; + if (P > w + 1 || k !== C) { + if (S !== 0 && C) { + u.fillRect(b, y, v, w - y); + } + y = P; + w = R; + } else if (R > w) { + w = R; + } + C = k; + u.fillStyle = k; + } + if (C) { + u.fillRect(b, y, v, w - y); + } + } + if (this.h.renderBorder && this.h.borderColor && this.h.overviewRulerLanes > 0) { + u.beginPath(); + u.lineWidth = 1; + u.strokeStyle = this.h.borderColor; + u.moveTo(0, 0); + u.lineTo(0, s); + u.moveTo(1, 0); + u.lineTo(t, 0); + u.stroke(); + } + } + }; + } +}); +var Pis; +var A9t; +var $9t; +var Lis; +var Ris = ue({ + "out-build/vs/editor/common/viewModel/overviewZoneManager.js"() { + "use strict"; + + (function (i) { + i[i.MINIMUM_HEIGHT = 4] = "MINIMUM_HEIGHT"; + })(Pis ||= {}); + A9t = class { + constructor(i, e, t) { + this._colorZoneBrand = undefined; + this.from = i | 0; + this.to = e | 0; + this.colorId = t | 0; + } + static compare(i, e) { + if (i.colorId === e.colorId) { + if (i.from === e.from) { + return i.to - e.to; + } else { + return i.from - e.from; + } + } else { + return i.colorId - e.colorId; + } + } + }; + $9t = class { + constructor(i, e, t, s) { + this._overviewRulerZoneBrand = undefined; + this.startLineNumber = i; + this.endLineNumber = e; + this.heightInLines = t; + this.color = s; + this.c = null; + } + static compare(i, e) { + if (i.color === e.color) { + if (i.startLineNumber === e.startLineNumber) { + if (i.heightInLines === e.heightInLines) { + return i.endLineNumber - e.endLineNumber; + } else { + return i.heightInLines - e.heightInLines; + } + } else { + return i.startLineNumber - e.startLineNumber; + } + } else if (i.color < e.color) { + return -1; + } else { + return 1; + } + } + setColorZone(i) { + this.c = i; + } + getColorZones() { + return this.c; + } + }; + Lis = class { + constructor(i) { + this.c = i; + this.d = []; + this.e = false; + this.f = 0; + this.g = 0; + this.h = 0; + this.j = 0; + this.k = 1; + this.l = 0; + this.m = Object.create(null); + this.n = []; + } + getId2Color() { + return this.n; + } + setZones(i) { + this.d = i; + this.d.sort($9t.compare); + } + setLineHeight(i) { + if (this.f === i) { + return false; + } else { + this.f = i; + this.e = true; + return true; + } + } + setPixelRatio(i) { + this.k = i; + this.e = true; + } + getDOMWidth() { + return this.g; + } + getCanvasWidth() { + return this.g * this.k; + } + setDOMWidth(i) { + if (this.g === i) { + return false; + } else { + this.g = i; + this.e = true; + return true; + } + } + getDOMHeight() { + return this.h; + } + getCanvasHeight() { + return this.h * this.k; + } + setDOMHeight(i) { + if (this.h === i) { + return false; + } else { + this.h = i; + this.e = true; + return true; + } + } + getOuterHeight() { + return this.j; + } + setOuterHeight(i) { + if (this.j === i) { + return false; + } else { + this.j = i; + this.e = true; + return true; + } + } + resolveColorZones() { + const i = this.e; + const e = Math.floor(this.f); + const t = Math.floor(this.getCanvasHeight()); + const s = Math.floor(this.j); + const n = t / s; + const r = Math.floor(this.k * 4 / 2); + const o = []; + for (let a = 0, l = this.d.length; a < l; a++) { + const c = this.d[a]; + if (!i) { + const C = c.getColorZones(); + if (C) { + o.push(C); + continue; + } + } + const u = this.c(c.startLineNumber); + const d = c.heightInLines === 0 ? this.c(c.endLineNumber) + e : u + c.heightInLines * e; + const h = Math.floor(n * u); + const g = Math.floor(n * d); + let p = Math.floor((h + g) / 2); + let b = g - p; + if (b < r) { + b = r; + } + if (p - b < 0) { + p = b; + } + if (p + b > t) { + p = t - b; + } + const v = c.color; + let y = this.m[v]; + if (!y) { + y = ++this.l; + this.m[v] = y; + this.n[y] = v; + } + const w = new A9t(p - b, p + b, y); + c.setColorZone(w); + o.push(w); + } + this.e = false; + o.sort(A9t.compare); + return o; + } + }; + } +}); +var Nis; +var pGn = ue({ + "out-build/vs/editor/browser/viewParts/overviewRuler/overviewRuler.js"() { + "use strict"; + + pf(); + Ris(); + Mj(); + Nis = class extends A9 { + constructor(i, e) { + super(); + this.a = i; + const t = this.a.configuration.options; + this.b = nc(document.createElement("canvas")); + this.b.setClassName(e); + this.b.setPosition("absolute"); + this.b.setLayerHinting(true); + this.b.setContain("strict"); + this.c = new Lis(s => this.a.viewLayout.getVerticalOffsetForLineNumber(s)); + this.c.setDOMWidth(0); + this.c.setDOMHeight(0); + this.c.setOuterHeight(this.a.viewLayout.getScrollHeight()); + this.c.setLineHeight(t.get(68)); + this.c.setPixelRatio(t.get(149)); + this.a.addEventHandler(this); + } + dispose() { + this.a.removeEventHandler(this); + super.dispose(); + } + onConfigurationChanged(i) { + const e = this.a.configuration.options; + if (i.hasChanged(68)) { + this.c.setLineHeight(e.get(68)); + this.f(); + } + if (i.hasChanged(149)) { + this.c.setPixelRatio(e.get(149)); + this.b.setWidth(this.c.getDOMWidth()); + this.b.setHeight(this.c.getDOMHeight()); + this.b.domNode.width = this.c.getCanvasWidth(); + this.b.domNode.height = this.c.getCanvasHeight(); + this.f(); + } + return true; + } + onFlushed(i) { + this.f(); + return true; + } + onScrollChanged(i) { + if (i.scrollHeightChanged) { + this.c.setOuterHeight(i.scrollHeight); + this.f(); + } + return true; + } + onZonesChanged(i) { + this.f(); + return true; + } + getDomNode() { + return this.b.domNode; + } + setLayout(i) { + this.b.setTop(i.top); + this.b.setRight(i.right); + let e = false; + e = this.c.setDOMWidth(i.width) || e; + e = this.c.setDOMHeight(i.height) || e; + if (e) { + this.b.setWidth(this.c.getDOMWidth()); + this.b.setHeight(this.c.getDOMHeight()); + this.b.domNode.width = this.c.getCanvasWidth(); + this.b.domNode.height = this.c.getCanvasHeight(); + this.f(); + } + } + setZones(i) { + this.c.setZones(i); + this.f(); + } + f() { + if (this.c.getOuterHeight() === 0) { + return false; + } + const i = this.c.getCanvasWidth(); + const e = this.c.getCanvasHeight(); + const t = this.c.resolveColorZones(); + const s = this.c.getId2Color(); + const n = this.b.domNode.getContext("2d"); + n.clearRect(0, 0, i, e); + if (t.length > 0) { + this.g(n, t, s, i); + } + return true; + } + g(i, e, t, s) { + let n = 0; + let r = 0; + let o = 0; + for (const a of e) { + const l = a.colorId; + const c = a.from; + const u = a.to; + if (l !== n) { + i.fillRect(0, r, s, o - r); + n = l; + i.fillStyle = t[n]; + r = c; + o = u; + } else if (o >= c) { + o = Math.max(o, u); + } else { + i.fillRect(0, r, s, o - r); + r = c; + o = u; + } + } + i.fillRect(0, r, s, o - r); + } + }; + } +}); +var mGn = ue({ + "out-build/vs/editor/browser/viewParts/rulers/rulers.css"() {} +}); +var Mis; +var bGn = ue({ + "out-build/vs/editor/browser/viewParts/rulers/rulers.js"() { + "use strict"; + + mGn(); + pf(); + Ow(); + Mis = class extends YC { + constructor(i) { + super(i); + this.domNode = nc(document.createElement("div")); + this.domNode.setAttribute("role", "presentation"); + this.domNode.setAttribute("aria-hidden", "true"); + this.domNode.setClassName("view-rulers"); + this.a = []; + const e = this._context.configuration.options; + this.b = e.get(107); + this.c = e.get(52).typicalHalfwidthCharacterWidth; + } + dispose() { + super.dispose(); + } + onConfigurationChanged(i) { + const e = this._context.configuration.options; + this.b = e.get(107); + this.c = e.get(52).typicalHalfwidthCharacterWidth; + return true; + } + onScrollChanged(i) { + return i.scrollHeightChanged; + } + prepareRender(i) {} + f() { + const i = this.a.length; + const e = this.b.length; + if (i === e) { + return; + } + if (i < e) { + const { + tabSize: s + } = this._context.viewModel.model.getOptions(); + const n = s; + let r = e - i; + while (r > 0) { + const o = nc(document.createElement("div")); + o.setClassName("view-ruler"); + o.setWidth(n); + this.domNode.appendChild(o); + this.a.push(o); + r--; + } + return; + } + let t = i - e; + while (t > 0) { + const s = this.a.pop(); + this.domNode.removeChild(s); + t--; + } + } + render(i) { + this.f(); + for (let e = 0, t = this.b.length; e < t; e++) { + const s = this.a[e]; + const n = this.b[e]; + s.setBoxShadow(n.color ? `1px 0 0 0 ${n.color} inset` : ""); + s.setHeight(Math.min(i.scrollHeight, 1000000)); + s.setLeft(n.column * this.c); + } + } + }; + } +}); +var vGn = ue({ + "out-build/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.css"() {} +}); +var Ais; +var yGn = ue({ + "out-build/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.js"() { + "use strict"; + + vGn(); + pf(); + Ow(); + Ais = class extends YC { + constructor(i) { + super(i); + this.b = 0; + this.c = 0; + this.j(); + this.f = false; + const t = this._context.configuration.options.get(108); + this.g = t.useShadows; + this.a = nc(document.createElement("div")); + this.a.setAttribute("role", "presentation"); + this.a.setAttribute("aria-hidden", "true"); + } + dispose() { + super.dispose(); + } + h() { + const i = this.g && this.b > 0; + if (this.f !== i) { + this.f = i; + return true; + } else { + return false; + } + } + getDomNode() { + return this.a; + } + j() { + const e = this._context.configuration.options.get(151); + if (e.minimap.renderMinimap === 0 || e.minimap.minimapWidth > 0 && e.minimap.minimapLeft === 0) { + this.c = e.width; + } else { + this.c = e.width - e.verticalScrollbarWidth; + } + } + onConfigurationChanged(i) { + const t = this._context.configuration.options.get(108); + this.g = t.useShadows; + this.j(); + this.h(); + return true; + } + onScrollChanged(i) { + this.b = i.scrollTop; + return this.h(); + } + prepareRender(i) {} + render(i) { + this.a.setWidth(this.c); + this.a.setClassName(this.f ? "scroll-decoration" : ""); + } + }; + } +}); +var wGn = ue({ + "out-build/vs/editor/browser/viewParts/selections/selections.css"() {} +}); +function CGn(i) { + return new Fis(i); +} +function SGn(i) { + return new Ois(i.lineNumber, i.ranges.map(CGn)); +} +function _at(i) { + if (i < 0) { + return -i; + } else { + return i; + } +} +var $is; +var Fis; +var Ois; +var _is; +var xGn = ue({ + "out-build/vs/editor/browser/viewParts/selections/selections.js"() { + "use strict"; + + wGn(); + _9(); + Qs(); + gi(); + (function (i) { + i[i.EXTERN = 0] = "EXTERN"; + i[i.INTERN = 1] = "INTERN"; + i[i.FLAT = 2] = "FLAT"; + })($is ||= {}); + Fis = class { + constructor(i) { + this.left = i.left; + this.width = i.width; + this.startStyle = null; + this.endStyle = null; + } + }; + Ois = class { + constructor(i, e) { + this.lineNumber = i; + this.ranges = e; + } + }; + _is = class L0 extends m4 { + static { + this.a = "selected-text"; + } + static { + this.b = "top-left-radius"; + } + static { + this.c = "bottom-left-radius"; + } + static { + this.f = "top-right-radius"; + } + static { + this.g = "bottom-right-radius"; + } + static { + this.h = "monaco-editor-background"; + } + static { + this.r = 10; + } + constructor(e) { + super(); + this.I = []; + this.s = e; + const t = this.s.configuration.options; + this.t = t.get(106); + this.u = t.get(52).typicalHalfwidthCharacterWidth; + this.w = []; + this.y = null; + this.s.addEventHandler(this); + } + dispose() { + this.s.removeEventHandler(this); + this.y = null; + super.dispose(); + } + onConfigurationChanged(e) { + const t = this.s.configuration.options; + this.t = t.get(106); + this.u = t.get(52).typicalHalfwidthCharacterWidth; + return true; + } + onCursorStateChanged(e) { + this.w = e.selections.slice(0); + return true; + } + onDecorationsChanged(e) { + return true; + } + onFlushed(e) { + return true; + } + onLinesChanged(e) { + return true; + } + onLinesDeleted(e) { + return true; + } + onLinesInserted(e) { + return true; + } + onScrollChanged(e) { + return e.scrollTopChanged; + } + onZonesChanged(e) { + return true; + } + z(e) { + for (let t = 0, s = e.length; t < s; t++) { + if (e[t].ranges.length > 1) { + return true; + } + } + return false; + } + C(e, t, s) { + const n = this.u / 4; + let r = null; + let o = null; + if (s && s.length > 0 && t.length > 0) { + const a = t[0].lineNumber; + if (a === e.startLineNumber) { + for (let c = 0; !r && c < s.length; c++) { + if (s[c].lineNumber === a) { + r = s[c].ranges[0]; + } + } + } + const l = t[t.length - 1].lineNumber; + if (l === e.endLineNumber) { + for (let c = s.length - 1; !o && c >= 0; c--) { + if (s[c].lineNumber === l) { + o = s[c].ranges[0]; + } + } + } + if (r && !r.startStyle) { + r = null; + } + if (o && !o.startStyle) { + o = null; + } + } + for (let a = 0, l = t.length; a < l; a++) { + const c = t[a].ranges[0]; + const u = c.left; + const d = c.left + c.width; + const h = { + top: 0, + bottom: 0 + }; + const g = { + top: 0, + bottom: 0 + }; + if (a > 0) { + const p = t[a - 1].ranges[0].left; + const b = t[a - 1].ranges[0].left + t[a - 1].ranges[0].width; + if (_at(u - p) < n) { + h.top = 2; + } else if (u > p) { + h.top = 1; + } + if (_at(d - b) < n) { + g.top = 2; + } else if (p < d && d < b) { + g.top = 1; + } + } else if (r) { + h.top = r.startStyle.top; + g.top = r.endStyle.top; + } + if (a + 1 < l) { + const p = t[a + 1].ranges[0].left; + const b = t[a + 1].ranges[0].left + t[a + 1].ranges[0].width; + if (_at(u - p) < n) { + h.bottom = 2; + } else if (p < u && u < b) { + h.bottom = 1; + } + if (_at(d - b) < n) { + g.bottom = 2; + } else if (d < b) { + g.bottom = 1; + } + } else if (o) { + h.bottom = o.startStyle.bottom; + g.bottom = o.endStyle.bottom; + } + c.startStyle = h; + c.endStyle = g; + } + } + F(e, t, s) { + const r = (t.linesVisibleRangesForRange(e, true) || []).map(SGn); + if (!this.z(r) && this.t) { + this.C(t.visibleRange, r, s); + } + return r; + } + G(e, t, s, n, r) { + return "
"; + } + H(e, t, s, n) { + if (n.length === 0) { + return; + } + const r = !!n[0].ranges[0].startStyle; + const o = n[0].lineNumber; + const a = n[n.length - 1].lineNumber; + for (let l = 0, c = n.length; l < c; l++) { + const u = n[l]; + const d = u.lineNumber; + const h = d - t; + const g = s && d === o ? 1 : 0; + const p = s && d !== o && d === a ? 1 : 0; + let b = ""; + let v = ""; + for (let y = 0, w = u.ranges.length; y < w; y++) { + const C = u.ranges[y]; + if (r) { + const x = C.startStyle; + const k = C.endStyle; + if (x.top === 1 || x.bottom === 1) { + b += this.G(g, p, L0.a, C.left - L0.r, L0.r); + let E = L0.h; + if (x.top === 1) { + E += " " + L0.f; + } + if (x.bottom === 1) { + E += " " + L0.g; + } + b += this.G(g, p, E, C.left - L0.r, L0.r); + } + if (k.top === 1 || k.bottom === 1) { + b += this.G(g, p, L0.a, C.left + C.width, L0.r); + let E = L0.h; + if (k.top === 1) { + E += " " + L0.b; + } + if (k.bottom === 1) { + E += " " + L0.c; + } + b += this.G(g, p, E, C.left + C.width, L0.r); + } + } + let S = L0.a; + if (r) { + const x = C.startStyle; + const k = C.endStyle; + if (x.top === 0) { + S += " " + L0.b; + } + if (x.bottom === 0) { + S += " " + L0.c; + } + if (k.top === 0) { + S += " " + L0.f; + } + if (k.bottom === 0) { + S += " " + L0.g; + } + } + v += this.G(g, p, S, C.left, C.width); + } + e[h][0] += b; + e[h][1] += v; + } + } + prepareRender(e) { + const t = []; + const s = e.visibleRange.startLineNumber; + const n = e.visibleRange.endLineNumber; + for (let o = s; o <= n; o++) { + const a = o - s; + t[a] = ["", ""]; + } + const r = []; + for (let o = 0, a = this.w.length; o < a; o++) { + const l = this.w[o]; + if (l.isEmpty()) { + r[o] = null; + continue; + } + const c = this.F(l, e, this.I[o]); + r[o] = c; + this.H(t, s, this.w.length > 1, c); + } + this.I = r; + this.y = t.map(([o, a]) => o + a); + } + render(e, t) { + if (!this.y) { + return ""; + } + const s = t - e; + if (s < 0 || s >= this.y.length) { + return ""; + } else { + return this.y[s]; + } + } + }; + bf((i, e) => { + const t = i.getColor(nQi); + if (t && !t.isTransparent()) { + e.addRule(`.monaco-editor .view-line span.inline-selected-text { color: ${t}; }`); + } + }); + } +}); +var kGn = ue({ + "out-build/vs/editor/browser/viewParts/viewCursors/viewCursors.css"() {} +}); +var F9t; +var v4; +var O9t; +var EGn = ue({ + "out-build/vs/editor/browser/viewParts/viewCursors/viewCursor.js"() { + "use strict"; + + xe(); + pf(); + $i(); + s1(); + Qd(); + Rs(); + yt(); + yte(); + F9t = class { + constructor(i, e, t, s, n, r, o) { + this.top = i; + this.left = e; + this.paddingLeft = t; + this.width = s; + this.height = n; + this.textContent = r; + this.textContentClassName = o; + } + }; + (function (i) { + i[i.Single = 0] = "Single"; + i[i.MultiPrimary = 1] = "MultiPrimary"; + i[i.MultiSecondary = 2] = "MultiSecondary"; + })(v4 ||= {}); + O9t = class { + constructor(i, e) { + this.a = i; + const t = this.a.configuration.options; + const s = t.get(52); + this.c = t.get(147); + this.f = t.get(68); + this.g = s.typicalHalfwidthCharacterWidth; + this.d = Math.min(t.get(31), this.g); + this.h = true; + this.b = nc(document.createElement("div")); + this.b.setClassName(`cursor ${xM}`); + this.b.setHeight(this.f); + this.b.setTop(0); + this.b.setLeft(0); + Hm(this.b, s); + this.b.setDisplay("none"); + this.i = new je(1, 1); + this.j = ""; + this.setPlurality(e); + this.k = ""; + this.l = null; + } + getDomNode() { + return this.b; + } + getPosition() { + return this.i; + } + setPlurality(i) { + switch (i) { + default: + case v4.Single: + this.j = ""; + break; + case v4.MultiPrimary: + this.j = "cursor-primary"; + break; + case v4.MultiSecondary: + this.j = "cursor-secondary"; + break; + } + } + show() { + if (!this.h) { + this.b.setVisibility("inherit"); + this.h = true; + } + } + hide() { + if (this.h) { + this.b.setVisibility("hidden"); + this.h = false; + } + } + onConfigurationChanged(i) { + const e = this.a.configuration.options; + const t = e.get(52); + this.c = e.get(147); + this.f = e.get(68); + this.g = t.typicalHalfwidthCharacterWidth; + this.d = Math.min(e.get(31), this.g); + Hm(this.b, t); + return true; + } + onCursorPositionChanged(i, e) { + if (e) { + this.b.domNode.style.transitionProperty = "none"; + } else { + this.b.domNode.style.transitionProperty = ""; + } + this.i = i; + return true; + } + m() { + const { + lineNumber: i, + column: e + } = this.i; + const t = this.a.viewModel.getLineContent(i); + const [s, n] = rji(t, e - 1); + return [new je(i, s + 1), t.substring(s, n)]; + } + n(i) { + let e = ""; + let t = ""; + const [s, n] = this.m(); + if (this.c === Wh.Line || this.c === Wh.LineThin) { + const d = i.visibleRangeForPosition(s); + if (!d || d.outsideRenderedLine) { + return null; + } + const h = Kt(this.b.domNode); + let g; + if (this.c === Wh.Line) { + g = Frt(h, this.d > 0 ? this.d : 2); + if (g > 2) { + e = n; + t = this.o(s); + } + } else { + g = Frt(h, 1); + } + let p = d.left; + let b = 0; + if (g >= 2 && p >= 1) { + b = 1; + p -= b; + } + const v = i.getVerticalOffsetForLineNumber(s.lineNumber) - i.bigNumbersDelta; + return new F9t(v, p, b, g, this.f, e, t); + } + const r = i.linesVisibleRangesForRange(new Z(s.lineNumber, s.column, s.lineNumber, s.column + n.length), false); + if (!r || r.length === 0) { + return null; + } + const o = r[0]; + if (o.outsideRenderedLine || o.ranges.length === 0) { + return null; + } + const a = o.ranges[0]; + const l = n === "\t" ? this.g : a.width < 1 ? this.g : a.width; + if (this.c === Wh.Block) { + e = n; + t = this.o(s); + } + let c = i.getVerticalOffsetForLineNumber(s.lineNumber) - i.bigNumbersDelta; + let u = this.f; + if (this.c === Wh.Underline || this.c === Wh.UnderlineThin) { + c += this.f - 2; + u = 2; + } + return new F9t(c, a.left, 0, l, u, e, t); + } + o(i) { + const e = this.a.viewModel.getViewLineData(i.lineNumber); + const t = e.tokens.findTokenIndexAtOffset(i.column - 1); + return e.tokens.getClassName(t); + } + prepareRender(i) { + this.l = this.n(i); + } + render(i) { + if (this.l) { + if (this.k !== this.l.textContent) { + this.k = this.l.textContent; + this.b.domNode.textContent = this.k; + } + this.b.setClassName(`cursor ${this.j} ${xM} ${this.l.textContentClassName}`); + this.b.setDisplay("block"); + this.b.setTop(this.l.top); + this.b.setLeft(this.l.left); + this.b.setPaddingLeft(this.l.paddingLeft); + this.b.setWidth(this.l.width); + this.b.setLineHeight(this.l.height); + this.b.setHeight(this.l.height); + return { + domNode: this.b.domNode, + position: this.i, + contentLeft: this.l.left, + height: this.l.height, + width: 2 + }; + } else { + this.b.setDisplay("none"); + return null; + } + } + }; + } +}); +var Bis; +var IGn = ue({ + "out-build/vs/editor/browser/viewParts/viewCursors/viewCursors.js"() { + "use strict"; + + kGn(); + pf(); + nt(); + Ow(); + EGn(); + Qd(); + z0(); + gi(); + vp(); + xe(); + Bis = class O3i extends YC { + static { + this.BLINK_INTERVAL = 500; + } + constructor(e) { + super(e); + const t = this._context.configuration.options; + this.a = t.get(96); + this.b = t.get(26); + this.c = t.get(147); + this.f = t.get(27); + this.g = t.get(37); + this.h = true; + this.j = false; + this.n = false; + this.z = new O9t(this._context, v4.Single); + this.C = []; + this.F = []; + this.s = nc(document.createElement("div")); + this.s.setAttribute("role", "presentation"); + this.s.setAttribute("aria-hidden", "true"); + this.J(); + this.s.appendChild(this.z.getDomNode()); + this.t = new qC(); + this.u = new JB(); + this.w = false; + this.y = false; + this.I(); + } + dispose() { + super.dispose(); + this.t.dispose(); + this.u.dispose(); + } + getDomNode() { + return this.s; + } + onCompositionStart(e) { + this.j = true; + this.I(); + return true; + } + onCompositionEnd(e) { + this.j = false; + this.I(); + return true; + } + onConfigurationChanged(e) { + const t = this._context.configuration.options; + this.a = t.get(96); + this.b = t.get(26); + this.c = t.get(147); + this.f = t.get(27); + this.g = t.get(37); + this.I(); + this.J(); + this.z.onConfigurationChanged(e); + for (let s = 0, n = this.C.length; s < n; s++) { + this.C[s].onConfigurationChanged(e); + } + return true; + } + G(e, t, s) { + const n = this.C.length !== t.length || this.f === "explicit" && s !== 3; + this.z.setPlurality(t.length ? v4.MultiPrimary : v4.Single); + this.z.onCursorPositionChanged(e, n); + this.I(); + if (this.C.length < t.length) { + const r = t.length - this.C.length; + for (let o = 0; o < r; o++) { + const a = new O9t(this._context, v4.MultiSecondary); + this.s.domNode.insertBefore(a.getDomNode().domNode, this.z.getDomNode().domNode.nextSibling); + this.C.push(a); + } + } else if (this.C.length > t.length) { + const r = this.C.length - t.length; + for (let o = 0; o < r; o++) { + this.s.removeChild(this.C[0].getDomNode()); + this.C.splice(0, 1); + } + } + for (let r = 0; r < t.length; r++) { + this.C[r].onCursorPositionChanged(t[r], n); + } + } + onCursorStateChanged(e) { + const t = []; + for (let n = 0, r = e.selections.length; n < r; n++) { + t[n] = e.selections[n].getPosition(); + } + this.G(t[0], t.slice(1), e.reason); + const s = e.selections[0].isEmpty(); + if (this.h !== s) { + this.h = s; + this.J(); + } + return true; + } + onDecorationsChanged(e) { + return true; + } + onFlushed(e) { + return true; + } + onFocusChanged(e) { + this.y = e.isFocused; + this.I(); + return false; + } + onLinesChanged(e) { + return true; + } + onLinesDeleted(e) { + return true; + } + onLinesInserted(e) { + return true; + } + onScrollChanged(e) { + return true; + } + onTokensChanged(e) { + const t = s => { + for (let n = 0, r = e.ranges.length; n < r; n++) { + if (e.ranges[n].fromLineNumber <= s.lineNumber && s.lineNumber <= e.ranges[n].toLineNumber) { + return true; + } + } + return false; + }; + if (t(this.z.getPosition())) { + return true; + } + for (const s of this.C) { + if (t(s.getPosition())) { + return true; + } + } + return false; + } + onZonesChanged(e) { + return true; + } + H() { + if (this.j && !this.g || !this.y) { + return 0; + } else if (this.a) { + return 5; + } else { + return this.b; + } + } + I() { + this.t.cancel(); + this.u.cancel(); + const e = this.H(); + const t = e === 0; + const s = e === 5; + if (t) { + this.N(); + } else { + this.M(); + } + this.w = false; + this.J(); + if (!t && !s) { + if (e === 1) { + this.u.cancelAndSet(() => { + if (this.n) { + this.N(); + } else { + this.M(); + } + }, O3i.BLINK_INTERVAL, Kt(this.s.domNode)); + } else { + this.t.setIfNotSet(() => { + this.w = true; + this.J(); + }, O3i.BLINK_INTERVAL); + } + } + } + J() { + this.s.setClassName(this.L()); + } + L() { + let e = "cursors-layer"; + if (!this.h) { + e += " has-selection"; + } + switch (this.c) { + case Wh.Line: + e += " cursor-line-style"; + break; + case Wh.Block: + e += " cursor-block-style"; + break; + case Wh.Underline: + e += " cursor-underline-style"; + break; + case Wh.LineThin: + e += " cursor-line-thin-style"; + break; + case Wh.BlockOutline: + e += " cursor-block-outline-style"; + break; + case Wh.UnderlineThin: + e += " cursor-underline-thin-style"; + break; + default: + e += " cursor-line-style"; + } + if (this.w) { + switch (this.H()) { + case 1: + e += " cursor-blink"; + break; + case 2: + e += " cursor-smooth"; + break; + case 3: + e += " cursor-phase"; + break; + case 4: + e += " cursor-expand"; + break; + case 5: + e += " cursor-solid"; + break; + default: + e += " cursor-solid"; + } + } else { + e += " cursor-solid"; + } + if (this.f === "on" || this.f === "explicit") { + e += " cursor-smooth-caret-animation"; + } + return e; + } + M() { + this.z.show(); + for (let e = 0, t = this.C.length; e < t; e++) { + this.C[e].show(); + } + this.n = true; + } + N() { + this.z.hide(); + for (let e = 0, t = this.C.length; e < t; e++) { + this.C[e].hide(); + } + this.n = false; + } + prepareRender(e) { + this.z.prepareRender(e); + for (let t = 0, s = this.C.length; t < s; t++) { + this.C[t].prepareRender(e); + } + } + render(e) { + const t = []; + let s = 0; + const n = this.z.render(e); + if (n) { + t[s++] = n; + } + for (let r = 0, o = this.C.length; r < o; r++) { + const a = this.C[r].render(e); + if (a) { + t[s++] = a; + } + } + this.F = t; + } + getLastRenderData() { + return this.F; + } + }; + bf((i, e) => { + const t = [{ + class: ".cursor", + foreground: gte, + background: kat + }, { + class: ".cursor-primary", + foreground: Y3t, + background: Res + }, { + class: ".cursor-secondary", + foreground: X3t, + background: Nes + }]; + for (const s of t) { + const n = i.getColor(s.foreground); + if (n) { + let r = i.getColor(s.background); + r ||= n.opposite(); + e.addRule(`.monaco-editor .cursors-layer ${s.class} { background-color: ${n}; border-color: ${n}; color: ${r}; }`); + if (LI(i.type)) { + e.addRule(`.monaco-editor .cursors-layer.has-selection ${s.class} { border-left: 1px solid ${r}; border-right: 1px solid ${r}; }`); + } + } + } + }); + } +}); +function DGn(i, e) { + try { + return i(e); + } catch (t) { + xs(t); + } +} +var Bat; +var Uis; +var TGn = ue({ + "out-build/vs/editor/browser/viewParts/viewZones/viewZones.js"() { + "use strict"; + + pf(); + Ut(); + Ow(); + Rs(); + Bat = () => { + throw new Error("Invalid change accessor"); + }; + Uis = class extends YC { + constructor(i) { + super(i); + const e = this._context.configuration.options; + const t = e.get(151); + this.b = e.get(68); + this.c = t.contentWidth; + this.f = t.contentLeft; + this.domNode = nc(document.createElement("div")); + this.domNode.setClassName("view-zones"); + this.domNode.setPosition("absolute"); + this.domNode.setAttribute("role", "presentation"); + this.domNode.setAttribute("aria-hidden", "true"); + this.marginDomNode = nc(document.createElement("div")); + this.marginDomNode.setClassName("margin-view-zones"); + this.marginDomNode.setPosition("absolute"); + this.marginDomNode.setAttribute("role", "presentation"); + this.marginDomNode.setAttribute("aria-hidden", "true"); + this.a = {}; + } + dispose() { + super.dispose(); + this.a = {}; + } + g() { + const i = this._context.viewLayout.getWhitespaces(); + const e = new Map(); + for (const s of i) { + e.set(s.id, s); + } + let t = false; + this._context.viewModel.changeWhitespace(s => { + const n = Object.keys(this.a); + for (let r = 0, o = n.length; r < o; r++) { + const a = n[r]; + const l = this.a[a]; + const c = this.j(l.delegate); + l.isInHiddenArea = c.isInHiddenArea; + const u = e.get(a); + if (u && (u.afterLineNumber !== c.afterViewLineNumber || u.height !== c.heightInPx)) { + s.changeOneWhitespace(a, c.afterViewLineNumber, c.heightInPx); + this.y(l.delegate, c.heightInPx); + t = true; + } + } + }); + return t; + } + onConfigurationChanged(i) { + const e = this._context.configuration.options; + const t = e.get(151); + this.b = e.get(68); + this.c = t.contentWidth; + this.f = t.contentLeft; + if (i.hasChanged(68)) { + this.g(); + } + return true; + } + onLineMappingChanged(i) { + return this.g(); + } + onLinesDeleted(i) { + return true; + } + onScrollChanged(i) { + return i.scrollTopChanged || i.scrollWidthChanged; + } + onZonesChanged(i) { + return true; + } + onLinesInserted(i) { + return true; + } + h(i) { + return i.ordinal ?? i.afterColumn ?? 10000; + } + j(i) { + if (i.afterLineNumber === 0) { + return { + isInHiddenArea: false, + afterViewLineNumber: 0, + heightInPx: this.u(i), + minWidthInPx: this.w(i) + }; + } + let e; + if (typeof i.afterColumn !== "undefined") { + e = this._context.viewModel.model.validatePosition({ + lineNumber: i.afterLineNumber, + column: i.afterColumn + }); + } else { + const r = this._context.viewModel.model.validatePosition({ + lineNumber: i.afterLineNumber, + column: 1 + }).lineNumber; + e = new je(r, this._context.viewModel.model.getLineMaxColumn(r)); + } + let t; + if (e.column === this._context.viewModel.model.getLineMaxColumn(e.lineNumber)) { + t = this._context.viewModel.model.validatePosition({ + lineNumber: e.lineNumber + 1, + column: 1 + }); + } else { + t = this._context.viewModel.model.validatePosition({ + lineNumber: e.lineNumber, + column: e.column + 1 + }); + } + const s = this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(e, i.afterColumnAffinity, true); + const n = i.showInHiddenAreas || this._context.viewModel.coordinatesConverter.modelPositionIsVisible(t); + return { + isInHiddenArea: !n, + showEvenWhenNotInViewport: i.showEvenWhenNotInViewport, + afterViewLineNumber: s.lineNumber, + heightInPx: n ? this.u(i) : 0, + minWidthInPx: this.w(i) + }; + } + changeViewZones(i) { + let e = false; + this._context.viewModel.changeWhitespace(t => { + const s = { + addZone: n => { + e = true; + return this.n(t, n); + }, + removeZone: n => { + if (n) { + e = this.s(t, n) || e; + } + }, + layoutZone: n => { + if (n) { + e = this.t(t, n) || e; + } + } + }; + DGn(i, s); + s.addZone = Bat; + s.removeZone = Bat; + s.layoutZone = Bat; + }); + return e; + } + n(i, e) { + const t = this.j(e); + const n = { + whitespaceId: i.insertWhitespace(t.afterViewLineNumber, this.h(e), t.heightInPx, t.minWidthInPx), + delegate: e, + isInHiddenArea: t.isInHiddenArea, + isVisible: false, + domNode: nc(e.domNode), + marginDomNode: e.marginDomNode ? nc(e.marginDomNode) : null, + showEvenWhenNotInViewport: e.showEvenWhenNotInViewport + }; + this.y(n.delegate, t.heightInPx); + n.domNode.setPosition("absolute"); + n.domNode.domNode.style.width = "100%"; + n.domNode.setDisplay("none"); + n.domNode.setAttribute("monaco-view-zone", n.whitespaceId); + this.domNode.appendChild(n.domNode); + if (n.marginDomNode) { + n.marginDomNode.setPosition("absolute"); + n.marginDomNode.domNode.style.width = "100%"; + n.marginDomNode.setDisplay("none"); + n.marginDomNode.setAttribute("monaco-view-zone", n.whitespaceId); + this.marginDomNode.appendChild(n.marginDomNode); + } + this.a[n.whitespaceId] = n; + this.q(); + return n.whitespaceId; + } + s(i, e) { + if (this.a.hasOwnProperty(e)) { + const t = this.a[e]; + delete this.a[e]; + i.removeWhitespace(t.whitespaceId); + t.domNode.removeAttribute("monaco-visible-view-zone"); + t.domNode.removeAttribute("monaco-view-zone"); + t.domNode.domNode.remove(); + if (t.marginDomNode) { + t.marginDomNode.removeAttribute("monaco-visible-view-zone"); + t.marginDomNode.removeAttribute("monaco-view-zone"); + t.marginDomNode.domNode.remove(); + } + this.q(); + return true; + } + return false; + } + t(i, e) { + if (this.a.hasOwnProperty(e)) { + const t = this.a[e]; + const s = this.j(t.delegate); + t.isInHiddenArea = s.isInHiddenArea; + i.changeOneWhitespace(t.whitespaceId, s.afterViewLineNumber, s.heightInPx); + this.y(t.delegate, s.heightInPx); + this.q(); + return true; + } + return false; + } + shouldSuppressMouseDownOnViewZone(i) { + if (this.a.hasOwnProperty(i)) { + return !!this.a[i].delegate.suppressMouseDown; + } else { + return false; + } + } + u(i) { + if (typeof i.heightInPx == "number") { + return i.heightInPx; + } else if (typeof i.heightInLines == "number") { + return this.b * i.heightInLines; + } else { + return this.b; + } + } + w(i) { + if (typeof i.minWidthInPx == "number") { + return i.minWidthInPx; + } else { + return 0; + } + } + y(i, e) { + if (typeof i.onComputedHeight == "function") { + try { + i.onComputedHeight(e); + } catch (t) { + xs(t); + } + } + } + z(i, e) { + if (typeof i.onDomNodeTop == "function") { + try { + i.onDomNodeTop(e); + } catch (t) { + xs(t); + } + } + } + prepareRender(i) {} + render(i) { + const e = i.viewportData.whitespaceViewportData; + const t = {}; + let s = false; + for (const r of e) { + if (!this.a[r.id].isInHiddenArea || !!this.a[r.id].showEvenWhenNotInViewport) { + t[r.id] = r; + s = true; + } + } + const n = Object.keys(this.a); + for (let r = 0, o = n.length; r < o; r++) { + const a = n[r]; + const l = this.a[a]; + if (!t.hasOwnProperty(a) && l.showEvenWhenNotInViewport) { + continue; + } + let c = 0; + let u = 0; + let d = "none"; + if (t.hasOwnProperty(a)) { + c = t[a].verticalOffset - i.bigNumbersDelta; + u = t[a].height; + d = "block"; + if (!l.isVisible) { + l.domNode.setAttribute("monaco-visible-view-zone", "true"); + l.isVisible = true; + } + this.z(l.delegate, i.getScrolledTopFromAbsoluteTop(t[a].verticalOffset)); + } else { + if (l.isVisible) { + l.domNode.removeAttribute("monaco-visible-view-zone"); + l.isVisible = false; + } + this.z(l.delegate, i.getScrolledTopFromAbsoluteTop(-1000000)); + } + l.domNode.setTop(c); + l.domNode.setHeight(u); + l.domNode.setDisplay(d); + if (l.marginDomNode) { + l.marginDomNode.setTop(c); + l.marginDomNode.setHeight(u); + l.marginDomNode.setDisplay(d); + } + } + if (s) { + this.domNode.setWidth(Math.max(i.scrollWidth, this.c)); + this.marginDomNode.setWidth(this.f); + } + } + }; + } +}); +var PGn = ue({ + "out-build/vs/editor/browser/viewParts/whitespace/whitespace.css"() {} +}); +var Wis; +var _9t; +var LGn = ue({ + "out-build/vs/editor/browser/viewParts/whitespace/whitespace.js"() { + "use strict"; + + PGn(); + _9(); + $i(); + Fj(); + Rs(); + z0(); + Wis = class extends m4 { + constructor(i) { + super(); + this.a = i; + this.b = new _9t(this.a.configuration); + this.c = []; + this.f = null; + this.a.addEventHandler(this); + } + dispose() { + this.a.removeEventHandler(this); + this.f = null; + super.dispose(); + } + onConfigurationChanged(i) { + const e = new _9t(this.a.configuration); + if (this.b.equals(e)) { + return i.hasChanged(151); + } else { + this.b = e; + return true; + } + } + onCursorStateChanged(i) { + this.c = i.selections; + return this.b.renderWhitespace === "selection"; + } + onDecorationsChanged(i) { + return true; + } + onFlushed(i) { + return true; + } + onLinesChanged(i) { + return true; + } + onLinesDeleted(i) { + return true; + } + onLinesInserted(i) { + return true; + } + onScrollChanged(i) { + return i.scrollTopChanged; + } + onZonesChanged(i) { + return true; + } + prepareRender(i) { + if (this.b.renderWhitespace === "none") { + this.f = null; + return; + } + const e = i.visibleRange.startLineNumber; + const s = i.visibleRange.endLineNumber - e + 1; + const n = new Array(s); + for (let o = 0; o < s; o++) { + n[o] = true; + } + const r = this.a.viewModel.getMinimapLinesRenderingData(i.viewportData.startLineNumber, i.viewportData.endLineNumber, n); + this.f = []; + for (let o = i.viewportData.startLineNumber; o <= i.viewportData.endLineNumber; o++) { + const a = o - i.viewportData.startLineNumber; + const l = r.data[a]; + let c = null; + if (this.b.renderWhitespace === "selection") { + const u = this.c; + for (const d of u) { + if (d.endLineNumber < o || d.startLineNumber > o) { + continue; + } + const h = d.startLineNumber === o ? d.startColumn : l.minColumn; + const g = d.endLineNumber === o ? d.endColumn : l.maxColumn; + if (h < g) { + c ||= []; + c.push(new k3t(h - 1, g - 1)); + } + } + } + this.f[a] = this.g(i, o, c, l); + } + } + g(i, e, t, s) { + if (this.b.renderWhitespace === "selection" && !t || this.b.renderWhitespace === "trailing" && s.continuesWithWrappedLine) { + return ""; + } + const n = this.a.theme.getColor(fpe); + const r = this.b.renderWithSVG; + const o = s.content; + const a = this.b.stopRenderingLineAfter === -1 ? o.length : Math.min(this.b.stopRenderingLineAfter, o.length); + const l = s.continuesWithWrappedLine; + const c = s.minColumn - 1; + const u = this.b.renderWhitespace === "boundary"; + const d = this.b.renderWhitespace === "trailing"; + const h = this.b.lineHeight; + const g = this.b.middotWidth; + const p = this.b.wsmiddotWidth; + const b = this.b.spaceWidth; + const v = Math.abs(p - b); + const y = Math.abs(g - b); + const w = v < y ? 11825 : 183; + const C = this.b.canUseHalfwidthRightwardsArrow; + let S = ""; + let x = false; + let k = B0(o); + let E; + if (k === -1) { + x = true; + k = a; + E = a; + } else { + E = TL(o); + } + let D = 0; + let P = t && t[D]; + let R = 0; + for (let L = c; L < a; L++) { + const F = o.charCodeAt(L); + if (P && L >= P.endOffset) { + D++; + P = t && t[D]; + } + if (F !== 9 && F !== 32 || d && !x && L <= E) { + continue; + } + if (u && L >= k && L <= E && F === 32) { + const U = L - 1 >= 0 ? o.charCodeAt(L - 1) : 0; + const j = L + 1 < a ? o.charCodeAt(L + 1) : 0; + if (U !== 32 && j !== 32) { + continue; + } + } + if (u && l && L === a - 1) { + const U = L - 1 >= 0 ? o.charCodeAt(L - 1) : 0; + if (F === 32 && U !== 32 && U !== 9) { + continue; + } + } + if (t && (!P || P.startOffset > L || P.endOffset <= L)) { + continue; + } + const O = i.visibleRangeForPosition(new je(e, L + 1)); + if (O) { + if (r) { + R = Math.max(R, O.left); + if (F === 9) { + S += this.h(h, b, O.left); + } else { + S += ``; + } + } else if (F === 9) { + S += `
${C ? "→" : "→"}
`; + } else { + S += `
${String.fromCharCode(w)}
`; + } + } + } + if (r) { + R = Math.round(R + b); + return `${S}`; + } else { + return S; + } + } + h(i, e, t) { + const s = e / 7; + const n = e; + const r = i / 2; + const o = t; + const a = { + x: 0, + y: s / 2 + }; + const l = { + x: 100 / 125 * n, + y: a.y + }; + const c = { + x: l.x - l.x * 0.2, + y: l.y + l.x * 0.2 + }; + const u = { + x: c.x + l.x * 0.1, + y: c.y + l.x * 0.1 + }; + const d = { + x: u.x + l.x * 0.35, + y: u.y - l.x * 0.35 + }; + const h = { + x: d.x, + y: -d.y + }; + const g = { + x: u.x, + y: -u.y + }; + const p = { + x: c.x, + y: -c.y + }; + const b = { + x: l.x, + y: -l.y + }; + const v = { + x: a.x, + y: -a.y + }; + return ``; + } + render(i, e) { + if (!this.f) { + return ""; + } + const t = e - i; + if (t < 0 || t >= this.f.length) { + return ""; + } else { + return this.f[t]; + } + } + }; + _9t = class { + constructor(i) { + const e = i.options; + const t = e.get(52); + const s = e.get(40); + if (s === "off") { + this.renderWhitespace = "none"; + this.renderWithSVG = false; + } else if (s === "svg") { + this.renderWhitespace = e.get(104); + this.renderWithSVG = true; + } else { + this.renderWhitespace = e.get(104); + this.renderWithSVG = false; + } + this.spaceWidth = t.spaceWidth; + this.middotWidth = t.middotWidth; + this.wsmiddotWidth = t.wsmiddotWidth; + this.canUseHalfwidthRightwardsArrow = t.canUseHalfwidthRightwardsArrow; + this.lineHeight = e.get(68); + this.stopRenderingLineAfter = e.get(122); + } + equals(i) { + return this.renderWhitespace === i.renderWhitespace && this.renderWithSVG === i.renderWithSVG && this.spaceWidth === i.spaceWidth && this.middotWidth === i.middotWidth && this.wsmiddotWidth === i.wsmiddotWidth && this.canUseHalfwidthRightwardsArrow === i.canUseHalfwidthRightwardsArrow && this.lineHeight === i.lineHeight && this.stopRenderingLineAfter === i.stopRenderingLineAfter; + } + }; + } +}); +var Vis; +var RGn = ue({ + "out-build/vs/editor/common/viewLayout/viewLinesViewportData.js"() { + "use strict"; + + yt(); + Vis = class { + constructor(i, e, t, s) { + this.selections = i; + this.startLineNumber = e.startLineNumber | 0; + this.endLineNumber = e.endLineNumber | 0; + this.relativeVerticalOffset = e.relativeVerticalOffset; + this.bigNumbersDelta = e.bigNumbersDelta | 0; + this.lineHeight = e.lineHeight | 0; + this.whitespaceViewportData = t; + this.a = s; + this.visibleRange = new Z(e.startLineNumber, this.a.getLineMinColumn(e.startLineNumber), e.endLineNumber, this.a.getLineMaxColumn(e.endLineNumber)); + } + getViewLineRenderingData(i) { + return this.a.getViewportViewLineRenderingData(this.visibleRange, i); + } + getDecorationsInViewport() { + return this.a.getDecorationsInViewport(this.visibleRange); + } + }; + } +}); +var His; +var NGn = ue({ + "out-build/vs/editor/common/editorTheme.js"() { + "use strict"; + + His = class { + get type() { + return this.a.type; + } + get value() { + return this.a; + } + constructor(i) { + this.a = i; + } + update(i) { + this.a = i; + } + getColor(i) { + return this.a.getColor(i); + } + }; + } +}); +var qis; +var MGn = ue({ + "out-build/vs/editor/common/viewModel/viewContext.js"() { + "use strict"; + + NGn(); + qis = class { + constructor(i, e, t) { + this.configuration = i; + this.theme = new His(e); + this.viewModel = t; + this.viewLayout = t.viewLayout; + } + addEventHandler(i) { + this.viewModel.addViewEventHandler(i); + } + removeEventHandler(i) { + this.viewModel.removeViewEventHandler(i); + } + }; + } +}); +function jis(i, e) { + const t = Uat.get(i); + if (t) { + return t; + } + const s = AGn(i, e); + if (s) { + let n = U9t.get(s) ?? 0; + n++; + U9t.set(s, n); + const r = n === 1 ? s : `${s}#${n}`; + Uat.set(i, r); + return r; + } +} +function AGn(i, e) { + const t = Uat.get(i); + if (t) { + return t; + } + const s = e.owner ? FGn(e.owner) + "." : ""; + let n; + const r = e.debugNameSource; + if (r !== undefined) { + if (typeof r == "function") { + n = r(); + if (n !== undefined) { + return s + n; + } + } else { + return s + r; + } + } + const o = e.referenceFn; + if (o !== undefined && (n = B9t(o), n !== undefined)) { + return s + n; + } + if (e.owner !== undefined) { + const a = $Gn(e.owner, i); + if (a !== undefined) { + return s + a; + } + } +} +function $Gn(i, e) { + for (const t in i) { + if (i[t] === e) { + return t; + } + } +} +function FGn(i) { + const e = V9t.get(i); + if (e) { + return e; + } + const t = OGn(i); + let s = W9t.get(t) ?? 0; + s++; + W9t.set(t, s); + const n = s === 1 ? t : `${t}#${s}`; + V9t.set(i, n); + return n; +} +function OGn(i) { + const e = i.constructor; + if (e) { + return e.name; + } else { + return "Object"; + } +} +function B9t(i) { + const e = i.toString(); + const s = /\/\*\*\s*@description\s*([^*]*)\*\//.exec(e); + return (s ? s[1] : undefined)?.trim(); +} +var By; +var U9t; +var Uat; +var W9t; +var V9t; +var Dte = ue({ + "out-build/vs/base/common/observableInternal/debugName.js"() { + "use strict"; + + By = class { + constructor(i, e, t) { + this.owner = i; + this.debugNameSource = e; + this.referenceFn = t; + } + getDebugName(i) { + return jis(i, this); + } + }; + U9t = new Map(); + Uat = new WeakMap(); + W9t = new Map(); + V9t = new WeakMap(); + } +}); +function Wat(i = iE) { + return (e, t) => Go(e, t, i); +} +function zis() { + return (i, e) => i.equals(e); +} +function wpe(i, e, t) { + if (t !== undefined) { + const s = i; + if (s == null || e === undefined || e === null) { + return e === s; + } else { + return t(s, e); + } + } else { + const s = i; + return (n, r) => n == null || r === undefined || r === null ? r === n : s(n, r); + } +} +function jj(i, e) { + if (i === e) { + return true; + } + if (Array.isArray(i) && Array.isArray(e)) { + if (i.length !== e.length) { + return false; + } + for (let t = 0; t < i.length; t++) { + if (!jj(i[t], e[t])) { + return false; + } + } + return true; + } + if (i && typeof i == "object" && e && typeof e == "object" && Object.getPrototypeOf(i) === Object.prototype && Object.getPrototypeOf(e) === Object.prototype) { + const t = i; + const s = e; + const n = Object.keys(t); + const r = Object.keys(s); + const o = new Set(r); + if (n.length !== r.length) { + return false; + } + for (const a of n) { + if (!o.has(a) || !jj(t[a], s[a])) { + return false; + } + } + return true; + } + return false; +} +function _Gn(i) { + return JSON.stringify(H9t(i)); +} +function H9t(i) { + if (Array.isArray(i)) { + return i.map(H9t); + } + if (i && typeof i == "object") { + if (Object.getPrototypeOf(i) === Object.prototype) { + const e = i; + const t = Object.create(null); + for (const s of Object.keys(e).sort()) { + t[s] = H9t(e[s]); + } + return t; + } else { + let e = q9t.get(i); + if (e === undefined) { + e = Jis++; + q9t.set(i, e); + } + return e + "----2b76a038c20c4bcc"; + } + } + return i; +} +var iE; +var Jis; +var q9t; +var y4 = ue({ + "out-build/vs/base/common/equals.js"() { + "use strict"; + + Jt(); + iE = (i, e) => i === e; + Jis = 0; + q9t = new WeakMap(); + } +}); +var Tte = ue({ + "out-build/vs/base/common/observableInternal/commonFacade/deps.js"() { + "use strict"; + + bm(); + y4(); + Ut(); + pe(); + q(); + } +}); +function BGn(i) { + Gis = i; +} +function uF() { + return Gis; +} +function UGn(i) { + const e = new Array(); + const t = []; + let s = ""; + function n(o) { + if ("length" in o) { + for (const a of o) { + if (a) { + n(a); + } + } + } else if ("text" in o) { + s += `%c${o.text}`; + e.push(o.style); + if (o.data) { + t.push(...o.data); + } + } else if ("data" in o) { + t.push(...o.data); + } + } + n(i); + const r = [s, ...e]; + r.push(...t); + return r; +} +function Pte(i) { + return EM(i, { + color: "black" + }); +} +function Cpe(i) { + return EM(qGn(`${i}: `, 10), { + color: "black", + bold: true + }); +} +function EM(i, e = { + color: "black" +}) { + function t(n) { + return Object.entries(n).reduce((r, [o, a]) => `${r}${o}:${a};`, ""); + } + const s = { + color: e.color + }; + if (e.strikeThrough) { + s["text-decoration"] = "line-through"; + } + if (e.bold) { + s["font-weight"] = "bold"; + } + return { + text: i, + style: t(s) + }; +} +function Spe(i, e) { + switch (typeof i) { + case "number": + return "" + i; + case "string": + if (i.length + 2 <= e) { + return `"${i}"`; + } else { + return `"${i.substr(0, e - 7)}"+...`; + } + case "boolean": + if (i) { + return "true"; + } else { + return "false"; + } + case "undefined": + return "undefined"; + case "object": + if (i === null) { + return "null"; + } else if (Array.isArray(i)) { + return WGn(i, e); + } else { + return VGn(i, e); + } + case "symbol": + return i.toString(); + case "function": + return `[[Function${i.name ? " " + i.name : ""}]]`; + default: + return "" + i; + } +} +function WGn(i, e) { + let t = "[ "; + let s = true; + for (const n of i) { + if (!s) { + t += ", "; + } + if (t.length - 5 > e) { + t += "..."; + break; + } + s = false; + t += `${Spe(n, e - t.length)}`; + } + t += " ]"; + return t; +} +function VGn(i, e) { + let t = "{ "; + let s = true; + for (const [n, r] of Object.entries(i)) { + if (!s) { + t += ", "; + } + if (t.length - 5 > e) { + t += "..."; + break; + } + s = false; + t += `${n}: ${Spe(r, e - t.length)}`; + } + t += " }"; + return t; +} +function HGn(i, e) { + let t = ""; + for (let s = 1; s <= e; s++) { + t += i; + } + return t; +} +function qGn(i, e) { + while (i.length < e) { + i += " "; + } + return i; +} +var Gis; +var Kis; +var xpe = ue({ + "out-build/vs/base/common/observableInternal/logging.js"() { + "use strict"; + + Kis = class { + constructor() { + this.a = 0; + this.d = new WeakMap(); + } + b(i) { + return UGn([Pte(HGn("| ", this.a)), i]); + } + c(i) { + if (i.hadValue) { + if (i.didChange) { + return [Pte(" "), EM(Spe(i.oldValue, 70), { + color: "red", + strikeThrough: true + }), Pte(" "), EM(Spe(i.newValue, 60), { + color: "green" + })]; + } else { + return [Pte(" (unchanged)")]; + } + } else { + return [Pte(" "), EM(Spe(i.newValue, 60), { + color: "green" + }), Pte(" (initial)")]; + } + } + handleObservableChanged(i, e) { + console.log(...this.b([Cpe("observable value changed"), EM(i.debugName, { + color: "BlueViolet" + }), ...this.c(e)])); + } + formatChanges(i) { + if (i.size !== 0) { + return EM(" (changed deps: " + [...i].map(e => e.debugName).join(", ") + ")", { + color: "gray" + }); + } + } + handleDerivedCreated(i) { + const e = i.handleChange; + this.d.set(i, new Set()); + i.handleChange = (t, s) => { + this.d.get(i).add(t); + return e.apply(i, [t, s]); + }; + } + handleDerivedRecomputed(i, e) { + const t = this.d.get(i); + console.log(...this.b([Cpe("derived recomputed"), EM(i.debugName, { + color: "BlueViolet" + }), ...this.c(e), this.formatChanges(t), { + data: [{ + fn: i._debugNameData.referenceFn ?? i._computeFn + }] + }])); + t.clear(); + } + handleFromEventObservableTriggered(i, e) { + console.log(...this.b([Cpe("observable from event triggered"), EM(i.debugName, { + color: "BlueViolet" + }), ...this.c(e), { + data: [{ + fn: i._getValue + }] + }])); + } + handleAutorunCreated(i) { + const e = i.handleChange; + this.d.set(i, new Set()); + i.handleChange = (t, s) => { + this.d.get(i).add(t); + return e.apply(i, [t, s]); + }; + } + handleAutorunTriggered(i) { + const e = this.d.get(i); + console.log(...this.b([Cpe("autorun"), EM(i.debugName, { + color: "BlueViolet" + }), this.formatChanges(e), { + data: [{ + fn: i._debugNameData.referenceFn ?? i._runFn + }] + }])); + e.clear(); + this.a++; + } + handleAutorunFinished(i) { + this.a--; + } + handleBeginTransaction(i) { + let e = i.getDebugName(); + if (e === undefined) { + e = ""; + } + console.log(...this.b([Cpe("transaction"), EM(e, { + color: "BlueViolet" + }), { + data: [{ + fn: i._fn + }] + }])); + this.a++; + } + handleEndTransaction() { + this.a--; + } + }; + } +}); +function jGn(i) { + Yis = i; +} +function zGn(i) { + Xis = i; +} +function JGn(i) { + j9t = i; +} +function Io(i, e) { + const t = new Jj(i, e); + try { + i(t); + } finally { + t.finish(); + } +} +function kpe(i) { + if (Ipe) { + i(Ipe); + } else { + const e = new Jj(i, undefined); + Ipe = e; + try { + i(e); + } finally { + e.finish(); + Ipe = undefined; + } + } +} +async function GGn(i, e) { + const t = new Jj(i, e); + try { + await i(t); + } finally { + t.finish(); + } +} +function Lte(i, e, t) { + if (i) { + e(i); + } else { + Io(e, t); + } +} +function un(i, e) { + let t; + if (typeof i == "string") { + t = new By(undefined, i, undefined); + } else { + t = new By(i, undefined, undefined); + } + return new Vat(t, e, iE); +} +function Epe(i, e) { + let t; + if (typeof i == "string") { + t = new By(undefined, i, undefined); + } else { + t = new By(i, undefined, undefined); + } + return new Qis(t, e, iE); +} +var Yis; +var Xis; +var j9t; +var z9t; +var zj; +var Ipe; +var Jj; +var Vat; +var Qis; +var Rte = ue({ + "out-build/vs/base/common/observableInternal/base.js"() { + "use strict"; + + Dte(); + Tte(); + xpe(); + z9t = class { + get TChange() { + return null; + } + reportChanges() { + this.get(); + } + read(i) { + if (i) { + return i.readObservable(this); + } else { + return this.get(); + } + } + map(i, e) { + const t = e === undefined ? undefined : i; + const s = e === undefined ? i : e; + return j9t({ + owner: t, + debugName: () => { + const n = B9t(s); + if (n !== undefined) { + return n; + } + const o = /^\s*\(?\s*([a-zA-Z_$][a-zA-Z_$0-9]*)\s*\)?\s*=>\s*\1(?:\??)\.([a-zA-Z_$][a-zA-Z_$0-9]*)\s*$/.exec(s.toString()); + if (o) { + return `${this.debugName}.${o[2]}`; + } + if (!t) { + return `${this.debugName} (mapped)`; + } + }, + debugReferenceFn: s + }, n => s(this.read(n), n)); + } + flatten() { + return j9t({ + owner: undefined, + debugName: () => `${this.debugName} (flattened)` + }, i => this.read(i).read(i)); + } + recomputeInitiallyAndOnChange(i, e) { + i.add(Yis(this, e)); + return this; + } + keepObserved(i) { + i.add(Xis(this)); + return this; + } + get a() { + return this.get(); + } + }; + zj = class extends z9t { + constructor() { + super(...arguments); + this.b = new Set(); + } + addObserver(i) { + const e = this.b.size; + this.b.add(i); + if (e === 0) { + this.c(); + } + } + removeObserver(i) { + if (this.b.delete(i) && this.b.size === 0) { + this.f(); + } + } + c() {} + f() {} + }; + Ipe = undefined; + Jj = class { + constructor(i, e) { + this._fn = i; + this.b = e; + this.a = []; + uF()?.handleBeginTransaction(this); + } + getDebugName() { + if (this.b) { + return this.b(); + } else { + return B9t(this._fn); + } + } + updateObserver(i, e) { + this.a.push({ + observer: i, + observable: e + }); + i.beginUpdate(e); + } + finish() { + const i = this.a; + for (let e = 0; e < i.length; e++) { + const { + observer: t, + observable: s + } = i[e]; + t.endUpdate(s); + } + this.a = null; + uF()?.handleEndTransaction(); + } + }; + Vat = class extends zj { + get debugName() { + return this.e.getDebugName(this) ?? "ObservableValue"; + } + constructor(i, e, t) { + super(); + this.e = i; + this.g = t; + this.d = e; + } + get() { + return this.d; + } + set(i, e, t) { + if (t === undefined && this.g(this.d, i)) { + return; + } + let s; + e ||= s = new Jj(() => {}, () => `Setting ${this.debugName}`); + try { + const n = this.d; + this.h(i); + uF()?.handleObservableChanged(this, { + oldValue: n, + newValue: i, + change: t, + didChange: true, + hadValue: true + }); + for (const r of this.b) { + e.updateObserver(r, this); + r.handleChange(this, t); + } + } finally { + if (s) { + s.finish(); + } + } + } + toString() { + return `${this.debugName}: ${this.d}`; + } + h(i) { + this.d = i; + } + }; + Qis = class extends Vat { + h(i) { + if (this.d !== i) { + if (this.d) { + this.d.dispose(); + } + this.d = i; + } + } + dispose() { + this.d?.dispose(); + } + }; + } +}); +var Zis; +var KGn = ue({ + "out-build/vs/base/common/observableInternal/lazyObservableValue.js"() { + "use strict"; + + Rte(); + Zis = class extends zj { + get debugName() { + return this.h.getDebugName(this) ?? "LazyObservableValue"; + } + constructor(i, e, t) { + super(); + this.h = i; + this.j = t; + this.e = true; + this.g = []; + this.l = 0; + this.d = e; + } + get() { + this.k(); + return this.d; + } + k() { + if (!this.e) { + this.e = true; + if (this.g.length > 0) { + for (const i of this.b) { + for (const e of this.g) { + i.handleChange(this, e); + } + } + this.g.length = 0; + } else { + for (const i of this.b) { + i.handleChange(this, undefined); + } + } + } + } + m() { + this.l++; + if (this.l === 1) { + for (const i of this.b) { + i.beginUpdate(this); + } + } + } + n() { + this.l--; + if (this.l === 0) { + this.k(); + const i = [...this.b]; + for (const e of i) { + e.endUpdate(this); + } + } + } + addObserver(i) { + const e = !this.b.has(i) && this.l > 0; + super.addObserver(i); + if (e) { + i.beginUpdate(this); + } + } + removeObserver(i) { + const e = this.b.has(i) && this.l > 0; + super.removeObserver(i); + if (e) { + i.endUpdate(this); + } + } + set(i, e, t) { + if (t === undefined && this.j(this.d, i)) { + return; + } + let s; + e ||= s = new Jj(() => {}, () => `Setting ${this.debugName}`); + try { + this.e = false; + this.o(i); + if (t !== undefined) { + this.g.push(t); + } + e.updateObserver({ + beginUpdate: () => this.m(), + endUpdate: () => this.n(), + handleChange: (n, r) => {}, + handlePossibleChange: n => {} + }, this); + if (this.l > 1) { + for (const n of this.b) { + n.handlePossibleChange(this); + } + } + } finally { + if (s) { + s.finish(); + } + } + } + toString() { + return `${this.debugName}: ${this.d}`; + } + o(i) { + this.d = i; + } + }; + } +}); +function Nte(i, e) { + if (i.lazy) { + return new Zis(new By(i.owner, i.debugName, undefined), e, i.equalsFn ?? iE); + } else { + return new Vat(new By(i.owner, i.debugName, undefined), e, i.equalsFn ?? iE); + } +} +var YGn = ue({ + "out-build/vs/base/common/observableInternal/api.js"() { + "use strict"; + + Rte(); + Dte(); + Tte(); + KGn(); + } +}); +function Dn(i) { + return new Dpe(new By(undefined, undefined, i), i, undefined, undefined); +} +function W9(i, e) { + return new Dpe(new By(i.owner, i.debugName, i.debugReferenceFn ?? e), e, undefined, undefined); +} +function Mte(i, e) { + return new Dpe(new By(i.owner, i.debugName, i.debugReferenceFn ?? e), e, i.createEmptyChangeSummary, i.handleChange); +} +function XGn(i, e) { + const t = new Q(); + const s = Mte({ + owner: i.owner, + debugName: i.debugName, + debugReferenceFn: i.debugReferenceFn ?? e, + createEmptyChangeSummary: i.createEmptyChangeSummary, + handleChange: i.handleChange + }, (n, r) => { + t.clear(); + e(n, r, t); + }); + return Ue(() => { + s.dispose(); + t.dispose(); + }); +} +function eh(i) { + const e = new Q(); + const t = W9({ + owner: undefined, + debugName: undefined, + debugReferenceFn: i + }, s => { + e.clear(); + i(s, e); + }); + return Ue(() => { + t.dispose(); + e.dispose(); + }); +} +function QGn(i, e, t = s => s) { + const s = new Map(); + return W9({ + debugReferenceFn: i + }, n => { + const r = new Map(); + const o = new Map(s); + for (const a of i(n)) { + const l = t(a); + if (s.has(l)) { + o.delete(l); + } else { + r.set(l, a); + s.set(l, a); + } + } + for (const a of o.keys()) { + s.delete(a); + } + if (r.size || o.size) { + e({ + addedValues: [...r.values()], + removedValues: [...o.values()] + }); + } + }); +} +var ess; +var Dpe; +var Hat = ue({ + "out-build/vs/base/common/observableInternal/autorun.js"() { + "use strict"; + + Dte(); + Tte(); + xpe(); + (function (i) { + i[i.dependenciesMightHaveChanged = 1] = "dependenciesMightHaveChanged"; + i[i.stale = 2] = "stale"; + i[i.upToDate = 3] = "upToDate"; + })(ess ||= {}); + Dpe = class { + get debugName() { + return this._debugNameData.getDebugName(this) ?? "(anonymous)"; + } + constructor(i, e, t, s) { + this._debugNameData = i; + this._runFn = e; + this.i = t; + this.j = s; + this.a = 2; + this.b = 0; + this.c = false; + this.f = new Set(); + this.g = new Set(); + this.l = false; + this.h = this.i?.(); + uF()?.handleAutorunCreated(this); + this.k(); + PZ(this); + } + dispose() { + this.c = true; + for (const i of this.f) { + i.removeObserver(this); + } + this.f.clear(); + LZ(this); + } + k() { + if (this.a === 3) { + return; + } + const i = this.g; + this.g = this.f; + this.f = i; + this.a = 3; + const e = this.c; + try { + if (!e) { + uF()?.handleAutorunTriggered(this); + const t = this.h; + try { + this.h = this.i?.(); + this.l = true; + this._runFn(this, t); + } catch (s) { + unt(s); + } finally { + this.l = false; + } + } + } finally { + if (!e) { + uF()?.handleAutorunFinished(this); + } + for (const t of this.g) { + t.removeObserver(this); + } + this.g.clear(); + } + } + toString() { + return `Autorun<${this.debugName}>`; + } + beginUpdate() { + if (this.a === 3) { + this.a = 1; + } + this.b++; + } + endUpdate() { + try { + if (this.b === 1) { + do { + if (this.a === 1) { + this.a = 3; + for (const i of this.f) { + i.reportChanges(); + if (this.a === 2) { + break; + } + } + } + this.k(); + } while (this.a !== 3); + } + } finally { + this.b--; + } + Kk(() => this.b >= 0); + } + handlePossibleChange(i) { + if (this.a === 3 && this.f.has(i) && !this.g.has(i)) { + this.a = 1; + } + } + handleChange(i, e) { + if (this.f.has(i) && !this.g.has(i)) { + try { + if (this.j ? this.j({ + changedObservable: i, + change: e, + didChange: s => s === i + }, this.h) : true) { + this.a = 2; + } + } catch (t) { + unt(t); + } + } + } + readObservable(i) { + if (!this.l) { + throw new co("The reader object cannot be used outside its compute function!"); + } + if (this.c) { + return i.get(); + } + i.addObserver(this); + const e = i.get(); + this.f.add(i); + this.g.delete(i); + return e; + } + }; + (function (i) { + i.Observer = Dpe; + })(Dn ||= {}); + } +}); +function Is(i, e) { + if (e !== undefined) { + return new V9(new By(i, undefined, e), e, undefined, undefined, undefined, iE); + } else { + return new V9(new By(undefined, undefined, i), i, undefined, undefined, undefined, iE); + } +} +function J9t(i, e, t) { + return new iss(new By(i, undefined, e), e, undefined, undefined, undefined, iE, t); +} +function Uy(i, e) { + return new V9(new By(i.owner, i.debugName, i.debugReferenceFn), e, undefined, undefined, i.onLastObserverRemoved, i.equalsFn ?? iE); +} +function ZGn(i, e) { + return new V9(new By(i.owner, i.debugName, undefined), e, i.createEmptyChangeSummary, i.handleChange, undefined, i.equalityComparer ?? iE); +} +function w4(i, e) { + let t; + let s; + if (e === undefined) { + t = i; + s = undefined; + } else { + s = i; + t = e; + } + const n = new Q(); + return new V9(new By(s, undefined, t), r => { + n.clear(); + return t(r, n); + }, undefined, undefined, () => n.dispose(), iE); +} +function sE(i, e) { + let t; + let s; + if (e === undefined) { + t = i; + s = undefined; + } else { + s = i; + t = e; + } + let n; + return new V9(new By(s, undefined, t), r => { + if (n) { + n.clear(); + } else { + n = new Q(); + } + const o = t(r); + if (o) { + n.add(o); + } + return o; + }, undefined, undefined, () => { + if (n) { + n.dispose(); + n = undefined; + } + }, iE); +} +var tss; +var V9; +var iss; +var qat = ue({ + "out-build/vs/base/common/observableInternal/derived.js"() { + "use strict"; + + Rte(); + Dte(); + Tte(); + xpe(); + JGn(Uy); + (function (i) { + i[i.initial = 0] = "initial"; + i[i.dependenciesMightHaveChanged = 1] = "dependenciesMightHaveChanged"; + i[i.stale = 2] = "stale"; + i[i.upToDate = 3] = "upToDate"; + })(tss ||= {}); + V9 = class extends zj { + get debugName() { + return this._debugNameData.getDebugName(this) ?? "(anonymous)"; + } + constructor(i, e, t, s, n = undefined, r) { + super(); + this._debugNameData = i; + this._computeFn = e; + this.q = t; + this.s = s; + this.t = n; + this.u = r; + this.g = 0; + this.h = undefined; + this.j = 0; + this.k = new Set(); + this.l = new Set(); + this.m = undefined; + this.n = false; + this.p = false; + this.x = false; + this.m = this.q?.(); + uF()?.handleDerivedCreated(this); + } + f() { + this.g = 0; + this.h = undefined; + for (const i of this.k) { + i.removeObserver(this); + } + this.k.clear(); + this.t?.(); + } + get() { + if (this.p) { + throw new co("Cyclic deriveds are not supported yet!"); + } + if (this.b.size === 0) { + let i; + try { + this.x = true; + i = this._computeFn(this, this.q?.()); + } finally { + this.x = false; + } + this.f(); + return i; + } else { + do { + if (this.g === 1) { + for (const i of this.k) { + i.reportChanges(); + if (this.g === 2) { + break; + } + } + } + if (this.g === 1) { + this.g = 3; + } + this.w(); + } while (this.g !== 3); + return this.h; + } + } + w() { + if (this.g === 3) { + return; + } + const i = this.l; + this.l = this.k; + this.k = i; + const e = this.g !== 0; + const t = this.h; + this.g = 3; + let s = false; + this.p = false; + try { + const n = this.m; + this.m = this.q?.(); + try { + this.x = true; + this.h = this._computeFn(this, n); + } finally { + this.x = false; + for (const r of this.l) { + r.removeObserver(this); + } + this.l.clear(); + } + s = e && !this.u(t, this.h); + uF()?.handleDerivedRecomputed(this, { + oldValue: t, + newValue: this.h, + change: undefined, + didChange: s, + hadValue: e + }); + } catch (n) { + unt(n); + } + this.p = false; + if (s) { + for (const n of this.b) { + n.handleChange(this, undefined); + } + } + } + toString() { + return `LazyDerived<${this.debugName}>`; + } + beginUpdate(i) { + if (this.n) { + throw new co("Cyclic deriveds are not supported yet!"); + } + this.j++; + this.n = true; + try { + const e = this.j === 1; + if (this.g === 3 && (this.g = 1, !e)) { + for (const t of this.b) { + t.handlePossibleChange(this); + } + } + if (e) { + for (const t of this.b) { + t.beginUpdate(this); + } + } + } finally { + this.n = false; + } + } + endUpdate(i) { + this.j--; + if (this.j === 0) { + const e = [...this.b]; + for (const t of e) { + t.endUpdate(this); + } + } + Kk(() => this.j >= 0); + } + handlePossibleChange(i) { + if (this.g === 3 && this.k.has(i) && !this.l.has(i)) { + this.g = 1; + for (const e of this.b) { + e.handlePossibleChange(this); + } + } + } + handleChange(i, e) { + if (this.k.has(i) && !this.l.has(i)) { + let t = false; + try { + t = this.s ? this.s({ + changedObservable: i, + change: e, + didChange: n => n === i + }, this.m) : true; + } catch (n) { + unt(n); + } + const s = this.g === 3; + if (t && (this.g === 1 || s) && (this.g = 2, s)) { + for (const n of this.b) { + n.handlePossibleChange(this); + } + } + } + } + readObservable(i) { + if (!this.x) { + throw new co("The reader object cannot be used outside its compute function!"); + } + i.addObserver(this); + const e = i.get(); + this.k.add(i); + this.l.delete(i); + return e; + } + addObserver(i) { + const e = !this.b.has(i) && this.j > 0; + super.addObserver(i); + if (e) { + i.beginUpdate(this); + } + } + removeObserver(i) { + const e = this.b.has(i) && this.j > 0; + super.removeObserver(i); + if (e) { + i.endUpdate(this); + } + } + }; + iss = class extends V9 { + constructor(i, e, t, s, n = undefined, r, o) { + super(i, e, t, s, n, r); + this.set = o; + } + }; + } +}); +var sss; +var G9t; +var Tpe; +var nss; +var eKn = ue({ + "out-build/vs/base/common/observableInternal/promise.js"() { + "use strict"; + + Rte(); + qat(); + sss = class { + get cachedValue() { + return this.a; + } + constructor(i) { + this.b = i; + this.a = un(this, undefined); + } + getValue() { + let i = this.a.get(); + if (!i) { + i = this.b(); + this.a.set(i, undefined); + } + return i; + } + }; + G9t = class GFn { + static fromFn(e) { + return new GFn(e()); + } + constructor(e) { + this.a = un(this, undefined); + this.promiseResult = this.a; + this.promise = e.then(t => { + Io(s => { + this.a.set(new Tpe(t, undefined), s); + }); + return t; + }, t => { + Io(s => { + this.a.set(new Tpe(undefined, t), s); + }); + throw t; + }); + } + }; + Tpe = class { + constructor(i, e) { + this.data = i; + this.error = e; + } + getDataOrThrow() { + if (this.error) { + throw this.error; + } + return this.data; + } + }; + nss = class { + constructor(i) { + this.b = i; + this.a = new sss(() => new G9t(this.b())); + this.cachedPromiseResult = Is(this, e => this.a.cachedValue.read(e)?.promiseResult.read(e)); + } + getPromise() { + return this.a.getValue().promise; + } + }; + } +}); +var tKn = ue({ + "out-build/vs/base/common/observableInternal/commonFacade/cancellation.js"() { + "use strict"; + + Ut(); + ri(); + } +}); +function C4(i, e, t, s) { + e ||= n => n != null; + return new Promise((n, r) => { + let o = true; + let a = false; + const l = i.map(u => ({ + isFinished: e(u), + error: t ? t(u) : false, + state: u + })); + const c = Dn(u => { + const { + isFinished: d, + error: h, + state: g + } = l.read(u); + if (d || h) { + if (o) { + a = true; + } else { + c.dispose(); + } + if (h) { + r(h === true ? g : h); + } else { + n(g); + } + } + }); + if (s) { + const u = s.onCancellationRequested(() => { + c.dispose(); + u.dispose(); + r(new fl()); + }); + if (s.isCancellationRequested) { + c.dispose(); + u.dispose(); + r(new fl()); + return; + } + } + o = false; + if (a) { + c.dispose(); + } + }); +} +var iKn = ue({ + "out-build/vs/base/common/observableInternal/utilsCancellation.js"() { + "use strict"; + + Dte(); + tKn(); + qat(); + Tte(); + Hat(); + } +}); +function vb(i) { + return new ass(i); +} +function sKn(i) { + const e = un("promiseValue", {}); + i.then(t => { + e.set({ + value: t + }, undefined); + }); + return e; +} +function Ro(...i) { + let e; + let t; + let s; + if (i.length === 3) { + [e, t, s] = i; + } else { + [t, s] = i; + } + return new S4(new By(e, undefined, s), t, s, () => S4.globalTransaction, iE); +} +function K9t(i, e, t) { + return new S4(new By(i.owner, i.debugName, i.debugReferenceFn ?? t), e, t, () => S4.globalTransaction, i.equalsFn ?? iE); +} +function Wy(i, e) { + return new lss(i, e); +} +function AI(i) { + if (typeof i == "string") { + return new X9t(i); + } else { + return new X9t(undefined, i); + } +} +function nKn(i, e) { + let t = false; + let s; + let n; + return Ro(r => { + const o = Dn(a => { + const l = i.read(a); + if (t) { + if (n) { + clearTimeout(n); + } + n = setTimeout(() => { + s = l; + r(); + }, e); + } else { + t = true; + s = l; + } + }); + return { + dispose() { + o.dispose(); + t = false; + s = undefined; + } + }; + }, () => t ? s : i.get()); +} +function rKn(i, e, t) { + const s = un("triggeredRecently", false); + let n; + t.add(i(() => { + s.set(true, undefined); + if (n) { + clearTimeout(n); + } + n = setTimeout(() => { + s.set(false, undefined); + }, e); + })); + return s; +} +function Ate(i) { + const e = new Q9t(false, undefined); + i.addObserver(e); + return Ue(() => { + i.removeObserver(e); + }); +} +function $te(i, e) { + const t = new Q9t(true, e); + i.addObserver(t); + if (e) { + e(i.get()); + } else { + i.reportChanges(); + } + return Ue(() => { + i.removeObserver(t); + }); +} +function Fte(i, e) { + let t; + return Uy({ + owner: i, + debugReferenceFn: e + }, n => { + t = e(n, t); + return t; + }); +} +function rss(i, e) { + let t; + const s = AI("derivedObservableWithWritableCache"); + const n = Is(i, r => { + s.read(r); + t = e(r, t); + return t; + }); + return Object.assign(n, { + clearCache: r => { + t = undefined; + s.trigger(r); + }, + setCache: (r, o) => { + t = r; + s.trigger(o); + } + }); +} +function jat(i, e, t, s) { + let n = new Z9t(t, s); + return Uy({ + debugReferenceFn: t, + owner: i, + onLastObserverRemoved: () => { + n.dispose(); + n = new Z9t(t); + } + }, o => { + n.setItems(e.read(o)); + return n.getItems(); + }); +} +function Y9t(i, e) { + if (e instanceof Ote) { + return e.observable; + } else { + return Ro(i, e.onDidChange, () => e.value); + } +} +function oss(i, e) { + if (e.length === 0) { + throw new co(); + } + let t = false; + let s; + const n = Ro(i, r => { + const o = new Q(); + for (const a of e) { + o.add(W9({ + debugName: () => jis(n, new By(i, undefined, undefined)) + ".updateLastChangedValue" + }, l => { + t = true; + s = a.read(l); + r(); + })); + } + o.add({ + dispose() { + t = false; + s = undefined; + } + }); + return o; + }, () => t ? s : e[e.length - 1].get()); + return n; +} +function oKn(i, e) { + return Fte(i, (t, s) => s ?? e(t)); +} +function dF(i, e) { + let t; + return XGn({ + createEmptyChangeSummary: () => ({ + deltas: [], + didChange: false + }), + handleChange: (s, n) => { + if (s.didChange(i)) { + const r = s.change; + if (r !== undefined) { + n.deltas.push(r); + } + n.didChange = true; + } + return true; + } + }, (s, n) => { + const r = i.read(s); + const o = t; + if (n.didChange) { + t = r; + e(r, o, n.deltas); + } + }); +} +function aKn(i, e) { + const t = new Q(); + const s = dF(i, (n, r, o) => { + t.clear(); + e(n, r, o, t); + }); + return { + dispose() { + s.dispose(); + t.dispose(); + } + }; +} +var ass; +var S4; +var lss; +var X9t; +var Q9t; +var Z9t; +var Ote; +var css = ue({ + "out-build/vs/base/common/observableInternal/utils.js"() { + "use strict"; + + Hat(); + Rte(); + Dte(); + Tte(); + qat(); + xpe(); + ass = class extends z9t { + constructor(i) { + super(); + this.b = i; + } + get debugName() { + return this.toString(); + } + get() { + return this.b; + } + addObserver(i) {} + removeObserver(i) {} + toString() { + return `Const: ${this.b}`; + } + }; + S4 = class extends zj { + constructor(i, e, t, s, n) { + super(); + this.k = i; + this.l = e; + this._getValue = t; + this.n = s; + this.p = n; + this.h = false; + this.s = r => { + const o = this._getValue(r); + const a = this.g; + const l = !this.h || !this.p(a, o); + let c = false; + if (l) { + this.g = o; + if (this.h) { + c = true; + Lte(this.n(), u => { + uF()?.handleFromEventObservableTriggered(this, { + oldValue: a, + newValue: o, + change: undefined, + didChange: l, + hadValue: this.h + }); + for (const d of this.b) { + u.updateObserver(d, this); + d.handleChange(this, undefined); + } + }, () => { + const u = this.q(); + return "Event fired" + (u ? `: ${u}` : ""); + }); + } + this.h = true; + } + if (!c) { + uF()?.handleFromEventObservableTriggered(this, { + oldValue: a, + newValue: o, + change: undefined, + didChange: l, + hadValue: this.h + }); + } + }; + } + q() { + return this.k.getDebugName(this); + } + get debugName() { + const i = this.q(); + return "From Event" + (i ? `: ${i}` : ""); + } + c() { + this.j = this.l(this.s); + } + f() { + this.j.dispose(); + this.j = undefined; + this.h = false; + this.g = undefined; + } + get() { + if (this.j) { + if (!this.h) { + this.s(undefined); + } + return this.g; + } else { + return this._getValue(undefined); + } + } + }; + (function (i) { + i.Observer = S4; + function e(t, s) { + let n = false; + if (S4.globalTransaction === undefined) { + S4.globalTransaction = t; + n = true; + } + try { + s(); + } finally { + if (n) { + S4.globalTransaction = undefined; + } + } + } + i.batchEventsGlobally = e; + })(Ro ||= {}); + lss = class extends zj { + constructor(i, e) { + super(); + this.debugName = i; + this.h = e; + this.k = () => { + Io(t => { + for (const s of this.b) { + t.updateObserver(s, this); + s.handleChange(this, undefined); + } + }, () => this.debugName); + }; + } + c() { + this.g = this.h(this.k); + } + f() { + this.g.dispose(); + this.g = undefined; + } + get() {} + }; + X9t = class extends zj { + get debugName() { + return new By(this.h, this.g, undefined).getDebugName(this) ?? "Observable Signal"; + } + toString() { + return this.debugName; + } + constructor(i, e) { + super(); + this.g = i; + this.h = e; + } + trigger(i, e) { + if (!i) { + Io(t => { + this.trigger(t, e); + }, () => `Trigger signal ${this.debugName}`); + return; + } + for (const t of this.b) { + i.updateObserver(t, this); + t.handleChange(this, e); + } + } + get() {} + }; + zGn(Ate); + jGn($te); + Q9t = class { + constructor(i, e) { + this.b = i; + this.c = e; + this.a = 0; + } + beginUpdate(i) { + this.a++; + } + endUpdate(i) { + this.a--; + if (this.a === 0 && this.b) { + if (this.c) { + this.c(i.get()); + } else { + i.reportChanges(); + } + } + } + handlePossibleChange(i) {} + handleChange(i, e) {} + }; + Z9t = class { + constructor(i, e) { + this.c = i; + this.f = e; + this.a = new Map(); + this.b = []; + } + dispose() { + this.a.forEach(i => i.store.dispose()); + this.a.clear(); + } + setItems(i) { + const e = []; + const t = new Set(this.a.keys()); + for (const s of i) { + const n = this.f ? this.f(s) : s; + let r = this.a.get(n); + if (r) { + t.delete(n); + } else { + const o = new Q(); + r = { + out: this.c(s, o), + store: o + }; + this.a.set(n, r); + } + e.push(r.out); + } + for (const s of t) { + this.a.get(s).store.dispose(); + this.a.delete(s); + } + this.b = e; + } + getItems() { + return this.b; + } + }; + Ote = class { + constructor(i) { + this.observable = i; + } + get onDidChange() { + return de.fromObservableLight(this.observable); + } + get value() { + return this.observable.get(); + } + }; + } +}); +var uss; +var lKn = ue({ + "out-build/vs/base/common/observableInternal/index.js"() { + "use strict"; + + YGn(); + Hat(); + Rte(); + qat(); + eKn(); + iKn(); + css(); + xpe(); + uss = false; + if (uss) { + BGn(new Kis()); + } + } +}); +var An = ue({ + "out-build/vs/base/common/observable.js"() { + "use strict"; + + lKn(); + } +}); +function Gj(i) { + if (!i) { + throw new Error(`Value "${i}" cannot be null`); + } + return i; +} +function dss(i, e, t) { + let s = new e.ResizeObserver(n => { + const r = n.find(l => l.target === i); + if (!r) { + return; + } + if (!("devicePixelContentBoxSize" in r)) { + s?.disconnect(); + s = undefined; + return; + } + const o = r.devicePixelContentBoxSize[0].inlineSize; + const a = r.devicePixelContentBoxSize[0].blockSize; + if (o > 0 && a > 0) { + t(o, a); + } + }); + try { + s.observe(i, { + box: ["device-pixel-content-box"] + }); + } catch { + s.disconnect(); + s = undefined; + throw new co("Could not observe device pixel dimensions"); + } + return Ue(() => s?.disconnect()); +} +var H9; +var q9 = ue({ + "out-build/vs/editor/browser/gpu/gpuUtils.js"() { + "use strict"; + + Ut(); + q(); + H9 = new Float32Array([1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 0]); + } +}); +var hss; +var _te; +var e7t = ue({ + "out-build/vs/editor/browser/gpu/raster/glyphRasterizer.js"() { + "use strict"; + + au(); + q(); + mM(); + C9(); + q9(); + hss = 0; + _te = class extends H { + get cacheKey() { + return `${this.fontFamily}_${this.fontSize}px`; + } + constructor(i, e, t) { + super(); + this.fontSize = i; + this.fontFamily = e; + this.devicePixelRatio = t; + this.id = hss++; + this.f = { + source: null, + boundingBox: { + left: 0, + bottom: 0, + right: 0, + top: 0 + }, + originOffset: { + x: 0, + y: 0 + }, + fontBoundingBoxAscent: 0, + fontBoundingBoxDescent: 0 + }; + this.g = { + chars: undefined, + tokenMetadata: 0, + charMetadata: 0 + }; + const s = Math.ceil(this.fontSize * t); + this.a = new OffscreenCanvas(s * 3, s * 3); + this.b = Gj(this.a.getContext("2d", { + willReadFrequently: true + })); + this.b.textBaseline = "top"; + this.b.fillStyle = "#FFFFFF"; + this.b.font = `${s}px ${this.fontFamily}`; + this.c = this.b.measureText("A"); + } + rasterizeGlyph(i, e, t, s) { + if (i === "") { + return { + source: this.a, + boundingBox: { + top: 0, + left: 0, + bottom: -1, + right: -1 + }, + originOffset: { + x: 0, + y: 0 + }, + fontBoundingBoxAscent: 0, + fontBoundingBoxDescent: 0 + }; + } else if (this.g.chars === i && this.g.tokenMetadata === e && this.g.charMetadata === t) { + return this.f; + } else { + this.g.chars = i; + this.g.tokenMetadata = e; + this.g.charMetadata = t; + return this._rasterizeGlyph(i, e, t, s); + } + } + _rasterizeGlyph(i, e, t, s) { + const n = Math.ceil(this.fontSize * this.devicePixelRatio); + const r = n * 3; + if (this.a.width !== r) { + this.a.width = r; + this.a.height = r; + } + this.b.clearRect(0, 0, this.a.width, this.a.height); + const o = new UL(200); + const a = gb.getFontStyle(e); + if (a & 1) { + o.appendString("italic "); + } + if (a & 2) { + o.appendString("bold "); + } + o.appendString(`${n}px ${this.fontFamily}`); + this.b.font = o.build(); + const l = n; + const c = n; + if (t) { + this.b.fillStyle = `#${t.toString(16).padStart(8, "0")}`; + } else { + this.b.fillStyle = s[gb.getForeground(e)]; + } + this.b.textBaseline = "top"; + this.b.fillText(i, l, c); + const u = this.b.getImageData(0, 0, this.a.width, this.a.height); + this.h(u, this.f.boundingBox); + this.f.source = this.a; + this.f.originOffset.x = this.f.boundingBox.left - l; + this.f.originOffset.y = this.f.boundingBox.top - c; + this.f.fontBoundingBoxAscent = this.c.fontBoundingBoxAscent; + this.f.fontBoundingBoxDescent = this.c.fontBoundingBoxDescent; + return this.f; + } + h(i, e) { + const t = this.a.height; + const s = this.a.width; + let n = false; + for (let r = 0; r < t; r++) { + for (let o = 0; o < s; o++) { + const a = r * s * 4 + o * 4 + 3; + if (i.data[a] !== 0) { + e.top = r; + n = true; + break; + } + } + if (n) { + break; + } + } + e.left = 0; + n = false; + for (let r = 0; r < s; r++) { + for (let o = 0; o < t; o++) { + const a = o * s * 4 + r * 4 + 3; + if (i.data[a] !== 0) { + e.left = r; + n = true; + break; + } + } + if (n) { + break; + } + } + e.right = s; + n = false; + for (let r = s - 1; r >= e.left; r--) { + for (let o = 0; o < t; o++) { + const a = o * s * 4 + r * 4 + 3; + if (i.data[a] !== 0) { + e.right = r; + n = true; + break; + } + } + if (n) { + break; + } + } + e.bottom = e.top; + n = false; + for (let r = t - 1; r >= 0; r--) { + for (let o = 0; o < s; o++) { + const a = r * s * 4 + o * 4 + 3; + if (i.data[a] !== 0) { + e.bottom = r; + n = true; + break; + } + } + if (n) { + break; + } + } + } + }; + __decorate([Hs], _te.prototype, "cacheKey", null); + } +}); +var fss; +var gss; +var cKn = ue({ + "out-build/vs/editor/browser/gpu/taskQueue.js"() { + "use strict"; + + xe(); + q(); + fss = class extends H { + constructor() { + super(); + this.a = []; + this.c = 0; + this.D(Ue(() => this.clear())); + } + enqueue(i) { + this.a.push(i); + this.h(); + } + flush() { + while (this.c < this.a.length) { + if (!this.a[this.c]()) { + this.c++; + } + } + this.clear(); + } + clear() { + if (this.b) { + this.g(this.b); + this.b = undefined; + } + this.c = 0; + this.a.length = 0; + } + h() { + this.b ||= this.f(this.j.bind(this)); + } + j(i) { + this.b = undefined; + let e = 0; + let t = 0; + let s = i.timeRemaining(); + let n = 0; + while (this.c < this.a.length) { + e = Date.now(); + if (!this.a[this.c]()) { + this.c++; + } + e = Math.max(1, Date.now() - e); + t = Math.max(e, t); + n = i.timeRemaining(); + if (t * 1.5 > n) { + if (s - e < -20) { + console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(s - e))}ms`); + } + this.h(); + return; + } + s = n; + } + this.clear(); + } + }; + gss = class extends fss { + f(i) { + return js().requestIdleCallback(i); + } + g(i) { + js().cancelIdleCallback(i); + } + }; + } +}); +var pss; +var uKn = ue({ + "out-build/vs/editor/browser/gpu/atlas/textureAtlasShelfAllocator.js"() { + "use strict"; + + Ut(); + q9(); + pss = class { + constructor(i, e) { + this.e = i; + this.f = e; + this.b = { + x: 0, + y: 0, + h: 0 + }; + this.c = new Set(); + this.d = 0; + this.a = Gj(this.e.getContext("2d", { + willReadFrequently: true + })); + } + allocate(i) { + const e = i.boundingBox.right - i.boundingBox.left + 1; + const t = i.boundingBox.bottom - i.boundingBox.top + 1; + if (e > this.e.width || t > this.e.height) { + throw new co("Glyph is too large for the atlas page"); + } + if (i.boundingBox.right - i.boundingBox.left + 1 > this.e.width - this.b.x) { + this.b.x = 0; + this.b.y += this.b.h; + this.b.h = 1; + } + if (this.b.y + i.boundingBox.bottom - i.boundingBox.top + 1 > this.e.height) { + return; + } + this.a.drawImage(i.source, i.boundingBox.left, i.boundingBox.top, e, t, this.b.x, this.b.y, e, t); + const s = { + pageIndex: this.f, + glyphIndex: this.d++, + x: this.b.x, + y: this.b.y, + w: e, + h: t, + originOffsetX: i.originOffset.x, + originOffsetY: i.originOffset.y, + fontBoundingBoxAscent: i.fontBoundingBoxAscent, + fontBoundingBoxDescent: i.fontBoundingBoxDescent + }; + this.b.x += e; + this.b.h = Math.max(this.b.h, t); + this.c.add(s); + return s; + } + getUsagePreview() { + const i = this.e.width; + const e = this.e.height; + const t = new OffscreenCanvas(i, e); + const s = Gj(t.getContext("2d")); + s.fillStyle = "#808080"; + s.fillRect(0, 0, i, e); + const n = new Map(); + const r = new Map(); + for (const o of this.c) { + n.set(o.y, Math.max(n.get(o.y) ?? 0, o.h)); + r.set(o.y, Math.max(r.get(o.y) ?? 0, o.x + o.w)); + } + for (const o of this.c) { + s.fillStyle = "#4040FF"; + s.fillRect(o.x, o.y, o.w, o.h); + s.fillStyle = "#FF0000"; + s.fillRect(o.x, o.y + o.h, o.w, n.get(o.y) - o.h); + } + for (const [o, a] of r.entries()) { + if (o !== this.b.y) { + s.fillStyle = "#FF0000"; + s.fillRect(a, o, i - a, n.get(o)); + } + } + return t.convertToBlob(); + } + getStats() { + const i = this.e.width; + const e = this.e.height; + let t = 0; + let s = 0; + const n = i * e; + const r = new Map(); + const o = new Map(); + for (const a of this.c) { + r.set(a.y, Math.max(r.get(a.y) ?? 0, a.h)); + o.set(a.y, Math.max(o.get(a.y) ?? 0, a.x + a.w)); + } + for (const a of this.c) { + t += a.w * a.h; + s += a.w * (r.get(a.y) - a.h); + } + for (const [a, l] of o.entries()) { + if (a !== this.b.y) { + s += (i - l) * r.get(a); + } + } + return [`page${this.f}:`, ` Total: ${n} (${i}x${e})`, ` Used: ${t} (${(t / n * 100).toPrecision(2)}%)`, ` Wasted: ${s} (${(s / n * 100).toPrecision(2)}%)`, `Efficiency: ${(t / (t + s) * 100).toPrecision(2)}%`].join(` +`); + } + }; + } +}); +function mss(i, e, t) { + let s = i.get(e); + if (!s) { + s = []; + i.set(e, s); + } + s.push(t); +} +var bss; +var dKn = ue({ + "out-build/vs/editor/browser/gpu/atlas/textureAtlasSlabAllocator.js"() { + "use strict"; + + xe(); + Ut(); + In(); + q9(); + bss = class { + constructor(i, e, t) { + this.p = i; + this.q = e; + this.b = []; + this.c = new ynt(); + this.d = []; + this.e = new Map(); + this.f = new Map(); + this.j = new Set(); + this.o = 0; + this.a = Gj(this.p.getContext("2d", { + willReadFrequently: true + })); + this.k = Math.min(t?.slabW ?? 64 << Math.max(Math.floor(js().devicePixelRatio) - 1, 0), this.p.width); + this.l = Math.min(t?.slabH ?? this.k, this.p.height); + this.m = Math.floor(this.p.width / this.k); + this.n = Math.floor(this.p.height / this.l); + } + allocate(i) { + const e = i.boundingBox.right - i.boundingBox.left + 1; + const t = i.boundingBox.bottom - i.boundingBox.top + 1; + if (e > this.p.width || t > this.p.height) { + throw new co("Glyph is too large for the atlas page"); + } + if (e > this.k || t > this.l) { + if (this.j.size > 0) { + return; + } + let l = this.p.width; + while (e < l / 2 && t < l / 2) { + l /= 2; + } + this.k = l; + this.l = l; + this.m = Math.floor(this.p.width / this.k); + this.n = Math.floor(this.p.height / this.l); + } + const s = { + w: e, + h: t + }; + let n = this.c.get(s.w, s.h); + if (n) { + const l = Math.floor(this.k / n.entryW) * Math.floor(this.l / n.entryH); + if (n.count >= l) { + n = undefined; + } + } + let r; + let o; + if (!n) { + if (e < t) { + const l = this.f.get(e); + if (l?.length) { + for (let c = l.length - 1; c >= 0; c--) { + const u = l[c]; + if (u.w >= e && u.h >= t) { + r = u.x; + o = u.y; + if (e < u.w) { + this.d.push({ + x: u.x + e, + y: u.y, + w: u.w - e, + h: t + }); + } + u.y += t; + u.h -= t; + if (u.h === 0) { + if (c === l.length - 1) { + l.pop(); + } else { + this.d.splice(c, 1); + } + } + break; + } + } + } + } else { + const l = this.e.get(t); + if (l?.length) { + for (let c = l.length - 1; c >= 0; c--) { + const u = l[c]; + if (u.w >= e && u.h >= t) { + r = u.x; + o = u.y; + if (t < u.h) { + this.d.push({ + x: u.x, + y: u.y + t, + w: e, + h: u.h - t + }); + } + u.x += e; + u.w -= e; + if (u.h === 0) { + if (c === l.length - 1) { + l.pop(); + } else { + this.d.splice(c, 1); + } + } + break; + } + } + } + } + } + if (r === undefined || o === undefined) { + if (!n) { + if (this.b.length >= this.m * this.n) { + return; + } + n = { + x: Math.floor(this.b.length % this.m) * this.k, + y: Math.floor(this.b.length / this.m) * this.l, + entryW: s.w, + entryH: s.h, + count: 0 + }; + const c = this.k % n.entryW; + const u = this.l % n.entryH; + if (c) { + mss(this.f, c, { + x: n.x + this.k - c, + w: c, + y: n.y, + h: this.l - (u ?? 0) + }); + } + if (u) { + mss(this.e, u, { + x: n.x, + w: this.k, + y: n.y + this.l - u, + h: u + }); + } + this.b.push(n); + this.c.set(s.w, s.h, n); + } + const l = Math.floor(this.k / n.entryW); + r = n.x + Math.floor(n.count % l) * n.entryW; + o = n.y + Math.floor(n.count / l) * n.entryH; + n.count++; + } + this.a.drawImage(i.source, i.boundingBox.left, i.boundingBox.top, e, t, r, o, e, t); + const a = { + pageIndex: this.q, + glyphIndex: this.o++, + x: r, + y: o, + w: e, + h: t, + originOffsetX: i.originOffset.x, + originOffsetY: i.originOffset.y, + fontBoundingBoxAscent: i.fontBoundingBoxAscent, + fontBoundingBoxDescent: i.fontBoundingBoxDescent + }; + this.j.add(a); + return a; + } + getUsagePreview() { + const i = this.p.width; + const e = this.p.height; + const t = new OffscreenCanvas(i, e); + const s = Gj(t.getContext("2d")); + s.fillStyle = "#808080"; + s.fillRect(0, 0, i, e); + let n = 0; + let r = 0; + let o = 0; + let a = 0; + const l = 64 << Math.floor(js().devicePixelRatio) - 1; + const c = l; + for (const d of this.b) { + let h = 0; + let g = 0; + for (let y = 0; y < d.count; y++) { + if (h + d.entryW > l) { + h = 0; + g += d.entryH; + } + s.fillStyle = "#FF0000"; + s.fillRect(d.x + h, d.y + g, d.entryW, d.entryH); + n += d.entryW * d.entryH; + h += d.entryW; + } + const p = Math.floor(l / d.entryW); + const b = Math.floor(c / d.entryH); + const v = d.entryW * p * d.entryH * b; + o += l * c - v; + } + for (const d of this.j) { + r += d.w * d.h; + s.fillStyle = "#4040FF"; + s.fillRect(d.x, d.y, d.w, d.h); + } + const u = Array.from(this.f.values()).flat().concat(Array.from(this.e.values()).flat()); + for (const d of u) { + s.fillStyle = "#FF000088"; + s.fillRect(d.x, d.y, d.w, d.h); + a += d.w * d.h; + } + s.globalAlpha = 0.5; + s.drawImage(this.p, 0, 0); + s.globalAlpha = 1; + return t.convertToBlob(); + } + getStats() { + const i = this.p.width; + const e = this.p.height; + let t = 0; + let s = 0; + let n = 0; + let r = 0; + let o = 0; + const a = i * e; + const l = 64 << Math.floor(js().devicePixelRatio) - 1; + const c = l; + for (const g of this.b) { + let p = 0; + let b = 0; + for (let C = 0; C < g.count; C++) { + if (p + g.entryW > l) { + p = 0; + b += g.entryH; + } + t += g.entryW * g.entryH; + p += g.entryW; + } + const v = Math.floor(l / g.entryW); + const y = Math.floor(c / g.entryH); + const w = g.entryW * v * g.entryH * y; + n += l * c - w; + } + for (const g of this.j) { + s += g.w * g.h; + } + const u = Array.from(this.f.values()).flat().concat(Array.from(this.e.values()).flat()); + for (const g of u) { + o += g.w * g.h; + } + const d = n - o; + r = t - (s - d); + const h = s / (s + r + o); + return [`page[${this.q}]:`, ` Total: ${a}px (${i}x${e})`, ` Used: ${s}px (${(s / a * 100).toFixed(2)}%)`, ` Wasted: ${r}px (${(r / a * 100).toFixed(2)}%)`, `Restricted: ${o}px (${(o / a * 100).toFixed(2)}%) (hard to allocate)`, `Efficiency: ${h === 1 ? "100" : (h * 100).toFixed(2)}%`, ` Slabs: ${this.b.length} of ${Math.floor(this.p.width / l) * Math.floor(this.p.height / c)}`].join(` +`); + } + }; + } +}); +var t7t; +var YL; +var i7t = ue({ + "out-build/vs/editor/browser/gpu/atlas/textureAtlasPage.js"() { + "use strict"; + + q(); + In(); + Zt(); + gi(); + uKn(); + dKn(); + YL = class extends H { + static { + t7t = this; + } + get version() { + return this.a; + } + static { + this.maximumGlyphCount = 5000; + } + get usedArea() { + return this.b; + } + get source() { + return this.c; + } + get glyphs() { + return this.g.values(); + } + constructor(e, t, s, n, r) { + super(); + this.n = n; + this.a = 0; + this.b = { + left: 0, + top: 0, + right: 0, + bottom: 0 + }; + this.f = new jBt(); + this.g = new Set(); + this.c = new OffscreenCanvas(t, t); + this.m = r.getColorTheme().tokenColorMap; + switch (s) { + case "shelf": + this.j = new pss(this.c, e); + break; + case "slab": + this.j = new bss(this.c, e); + break; + default: + this.j = s(this.c, e); + break; + } + this.D(Ue(() => { + this.c.width = 1; + this.c.height = 1; + })); + } + getGlyph(e, t, s, n) { + return this.f.get(t, s, n, e.cacheKey) ?? this.q(e, t, s, n); + } + q(e, t, s, n) { + if (this.g.size >= t7t.maximumGlyphCount) { + return; + } + const r = e.rasterizeGlyph(t, s, n, this.m); + const o = this.j.allocate(r); + if (o !== undefined) { + this.f.set(t, s, n, e.cacheKey, o); + this.g.add(o); + this.a++; + this.b.right = Math.max(this.b.right, o.x + o.w - 1); + this.b.bottom = Math.max(this.b.bottom, o.y + o.h - 1); + if (this.n.getLevel() === pr.Trace) { + this.n.trace("New glyph", { + chars: t, + tokenMetadata: s, + charMetadata: n, + rasterizedGlyph: r, + glyph: o + }); + } + return o; + } + } + getUsagePreview() { + return this.j.getUsagePreview(); + } + getStats() { + return this.j.getStats(); + } + }; + YL = t7t = __decorate([__param(3, Bt), __param(4, ti)], YL); + } +}); +var zat; +var x4; +var s7t = ue({ + "out-build/vs/editor/browser/gpu/atlas/textureAtlas.js"() { + "use strict"; + + xe(); + Ut(); + pe(); + q(); + In(); + te(); + gi(); + e7t(); + cKn(); + i7t(); + x4 = class extends H { + static { + zat = this; + } + static { + this.maximumPageCount = 16; + } + get pages() { + return this.h; + } + constructor(e, t, s, n) { + super(); + this.n = e; + this.q = s; + this.r = n; + this.c = this.D(new ki()); + this.f = new Set(); + this.h = []; + this.j = new jBt(); + this.m = this.D(new B()); + this.onDidDeleteGlyphs = this.m.event; + this.g = t?.allocatorType ?? "slab"; + this.D(de.runAndSubscribe(this.q.onDidColorThemeChange, () => { + if (this.b) { + this.clear(); + } + this.b = this.q.getColorTheme().tokenColorMap; + })); + const r = Math.max(1, Math.floor(js().devicePixelRatio)); + this.pageSize = Math.min(r * 1024, this.n); + this.s(); + this.D(Ue(() => si(this.h))); + } + s() { + const e = this.r.createInstance(YL, 0, this.pageSize, this.g); + this.h.push(e); + const t = new _te(1, "", 1); + e.getGlyph(t, "", 0, 0); + t.dispose(); + } + clear() { + for (const e of this.h) { + e.dispose(); + } + this.h.length = 0; + this.j.clear(); + this.f.clear(); + this.c.clear(); + this.s(); + this.m.fire(); + } + getGlyph(e, t, s, n) { + s &= -2048; + if (!this.f.has(e.id)) { + this.w(e); + this.f.add(e.id); + } + return this.t(this.j.get(t, s, n, e.cacheKey) ?? 0, e, t, s, n); + } + t(e, t, s, n, r) { + this.j.set(s, n, r, t.cacheKey, e); + return this.h[e].getGlyph(t, s, n, r) ?? (e + 1 < this.h.length ? this.t(e + 1, t, s, n, r) : undefined) ?? this.u(t, s, n, r); + } + u(e, t, s, n) { + if (this.h.length >= zat.maximumPageCount) { + throw new Error(`Attempt to create a texture atlas page past the limit ${zat.maximumPageCount}`); + } + this.h.push(this.r.createInstance(YL, this.h.length, this.pageSize, this.g)); + this.j.set(t, s, n, e.cacheKey, this.h.length - 1); + return this.h[this.h.length - 1].getGlyph(e, t, s, n); + } + getUsagePreview() { + return Promise.all(this.h.map(e => e.getUsagePreview())); + } + getStats() { + return this.h.map(e => e.getStats()); + } + w(e) { + const t = this.b; + if (!t) { + throw new co("Cannot warm atlas without color map"); + } + this.c.value?.clear(); + const s = this.c.value = new gss(); + for (let n = 65; n <= 90; n++) { + s.enqueue(() => { + for (const r of t.keys()) { + this.getGlyph(e, String.fromCharCode(n), r << 15 & 16744448, 0); + } + }); + } + for (let n = 97; n <= 122; n++) { + s.enqueue(() => { + for (const r of t.keys()) { + this.getGlyph(e, String.fromCharCode(n), r << 15 & 16744448, 0); + } + }); + } + for (let n = 33; n <= 126; n++) { + s.enqueue(() => { + for (const r of t.keys()) { + this.getGlyph(e, String.fromCharCode(n), r << 15 & 16744448, 0); + } + }); + } + } + }; + x4 = zat = __decorate([__param(2, ti), __param(3, re)], x4); + } +}); +var Ppe; +var cs; +var Wa = ue({ + "out-build/vs/base/common/severity.js"() { + "use strict"; + + $i(); + (function (i) { + i[i.Ignore = 0] = "Ignore"; + i[i.Info = 1] = "Info"; + i[i.Warning = 2] = "Warning"; + i[i.Error = 3] = "Error"; + i[i.AI = 4] = "AI"; + })(Ppe ||= {}); + (function (i) { + const e = "error"; + const t = "warning"; + const s = "warn"; + const n = "info"; + const r = "ignore"; + function o(l) { + if (l) { + if ($c(e, l)) { + return i.Error; + } else if ($c(t, l) || $c(s, l)) { + return i.Warning; + } else if ($c(n, l)) { + return i.Info; + } else { + return i.Ignore; + } + } else { + return i.Ignore; + } + } + i.fromValue = o; + function a(l) { + switch (l) { + case i.Error: + return e; + case i.Warning: + return t; + case i.Info: + return n; + default: + return r; + } + } + i.toString = a; + })(Ppe ||= {}); + cs = Ppe; + } +}); +function Jat(i) { + if (i) { + const e = i; + return typeof e.id == "string" && typeof e.label == "string"; + } + return false; +} +var es; +var ni; +var Ru; +var hF; +var rd; +var Gat; +var vss; +var Wi = ue({ + "out-build/vs/platform/notification/common/notification.js"() { + "use strict"; + + pe(); + Wa(); + te(); + es = cs; + ni = Ve("notificationService"); + (function (i) { + i[i.DEFAULT = 0] = "DEFAULT"; + i[i.SILENT = 1] = "SILENT"; + i[i.URGENT = 2] = "URGENT"; + })(Ru ||= {}); + (function (i) { + i[i.WORKSPACE = 0] = "WORKSPACE"; + i[i.PROFILE = 1] = "PROFILE"; + i[i.APPLICATION = 2] = "APPLICATION"; + })(hF ||= {}); + (function (i) { + i[i.OFF = 0] = "OFF"; + i[i.ERROR = 1] = "ERROR"; + })(rd ||= {}); + Gat = class { + constructor() { + this.progress = new vss(); + this.onDidClose = de.None; + this.onDidChangeVisibility = de.None; + } + updateSeverity(i) {} + updateMessage(i) {} + updateActions(i) {} + close() {} + }; + vss = class { + infinite() {} + done() {} + total(i) {} + worked(i) {} + }; + } +}); +function n7t(i) { + return { + object: i, + dispose: () => i.destroy() + }; +} +var $I; +var Kat = ue({ + "out-build/vs/editor/browser/gpu/gpuDisposable.js"() { + "use strict"; + + zt(); + (function (i) { + async function e(n) { + try { + if (!navigator.gpu) { + throw new Error("This browser does not support WebGPU"); + } + const r = await navigator.gpu.requestAdapter(); + if (!r) { + throw new Error("This browser supports WebGPU but it appears to be disabled"); + } + return n7t(await r.requestDevice()); + } catch (r) { + if (n) { + n(r.message); + } + throw r; + } + } + i.requestDevice = e; + function t(n, r, o) { + const a = n.createBuffer(r); + if (o) { + n.queue.writeBuffer(a, 0, Wq(o) ? o() : o); + } + return n7t(a); + } + i.createBuffer = t; + function s(n, r) { + return n7t(n.createTexture(r)); + } + i.createTexture = s; + })($I ||= {}); + } +}); +var yss; +var hKn = ue({ + "out-build/vs/editor/browser/gpu/bufferDirtyTracker.js"() { + "use strict"; + + yss = class { + get dataOffset() { + return this.a; + } + get dirtySize() { + if (this.a !== undefined && this.b !== undefined) { + return this.b - this.a + 1; + } + } + get isDirty() { + return this.a !== undefined; + } + flag(i, e = 1) { + this.c(i); + if (e > 1) { + this.c(i + e - 1); + } + return i; + } + c(i) { + if (this.a === undefined || i < this.a) { + this.a = i; + } + if (this.b === undefined || i > this.b) { + this.b = i; + } + } + clear() { + this.a = undefined; + this.b = undefined; + } + }; + } +}); +function fKn(i, e) { + return new wss(i, e); +} +var wss; +var Css; +var gKn = ue({ + "out-build/vs/editor/browser/gpu/objectCollectionBuffer.js"() { + "use strict"; + + pe(); + q(); + Av(); + hKn(); + wss = class extends H { + get bufferUsedSize() { + return this.viewUsedSize * Float32Array.BYTES_PER_ELEMENT; + } + get viewUsedSize() { + return this.f.size * this.c; + } + get entryCount() { + return this.f.size; + } + get dirtyTracker() { + return this.a; + } + constructor(i, e) { + super(); + this.propertySpecs = i; + this.capacity = e; + this.a = new yss(); + this.b = new Map(); + this.f = new hp(); + this.g = this.D(new B()); + this.onDidChange = this.g.event; + this.h = this.D(new B()); + this.onDidChangeBuffer = this.h.event; + this.view = new Float32Array(e * i.length); + this.buffer = this.view.buffer; + this.c = i.length; + for (let t = 0; t < i.length; t++) { + const s = { + offset: t, + ...i[t] + }; + this.b.set(s.name, s); + } + this.D(Ue(() => si(this.f))); + } + createEntry(i) { + if (this.f.size === this.capacity) { + this.j(); + this.h.fire(); + } + const e = new Css(this.view, this.b, this.a, this.f.size, i); + const t = this.f.push(e); + const s = []; + s.push(de.forward(e.onDidChange, this.g)); + s.push(e.onWillDispose(() => { + const n = e.i; + t(); + this.view.set(this.view.subarray(n * this.c + 2, this.f.size * this.c + 2), n * this.c); + for (const r of this.f) { + if (r.i > n) { + r.i--; + } + } + this.a.flag(n, (this.f.size - n) * this.c); + si(s); + })); + return e; + } + j() { + this.capacity *= 2; + const i = new Float32Array(this.capacity * this.c); + i.set(this.view); + this.view = i; + this.buffer = this.view.buffer; + } + }; + Css = class extends H { + constructor(i, e, t, s, n) { + super(); + this.c = i; + this.f = e; + this.g = t; + this.i = s; + this.a = this.D(new B()); + this.onDidChange = this.a.event; + this.b = this.D(new B()); + this.onWillDispose = this.b.event; + for (const r of this.f.values()) { + this.c[this.i * this.f.size + r.offset] = n[r.name]; + } + this.g.flag(this.i * this.f.size, this.f.size); + } + dispose() { + this.b.fire(); + super.dispose(); + } + set(i, e) { + const t = this.i * this.f.size + this.f.get(i).offset; + this.c[this.g.flag(t)] = e; + this.a.fire(); + } + get(i) { + return this.c[this.i * this.f.size + this.f.get(i).offset]; + } + setRaw(i) { + if (i.length !== this.f.size) { + throw new Error(`Data length ${i.length} does not match the number of properties in the collection (${this.f.size})`); + } + this.c.set(i, this.i * this.f.size); + this.g.flag(this.i * this.f.size, this.f.size); + } + }; + } +}); +var Sss; +var xss; +var pKn = ue({ + "out-build/vs/editor/browser/gpu/rectangleRenderer.wgsl.js"() { + "use strict"; + + (function (i) { + i[i.Shapes = 0] = "Shapes"; + i[i.LayoutInfoUniform = 1] = "LayoutInfoUniform"; + i[i.ScrollOffset = 2] = "ScrollOffset"; + })(Sss ||= {}); + xss = ` + +struct Vertex { + @location(0) position: vec2f, +}; + +struct LayoutInfo { + canvasDims: vec2f, + viewportOffset: vec2f, + viewportDims: vec2f, +} + +struct ScrollOffset { + offset: vec2f, +} + +struct Shape { + position: vec2f, + size: vec2f, + color: vec4f, +}; + +struct VSOutput { + @builtin(position) position: vec4f, + @location(1) color: vec4f, +}; + +// Uniforms +@group(0) @binding(1) var layoutInfo: LayoutInfo; + +// Storage buffers +@group(0) @binding(0) var shapes: array; +@group(0) @binding(2) var scrollOffset: ScrollOffset; + +@vertex fn vs( + vert: Vertex, + @builtin(instance_index) instanceIndex: u32, + @builtin(vertex_index) vertexIndex : u32 +) -> VSOutput { + let shape = shapes[instanceIndex]; + + var vsOut: VSOutput; + vsOut.position = vec4f( + ( + // Top left corner + vec2f(-1, 1) + + // Convert pixel position to clipspace + vec2f( 2, -2) / layoutInfo.canvasDims * + // Shape position and size + (layoutInfo.viewportOffset - scrollOffset.offset + shape.position + vert.position * shape.size) + ), + 0.0, + 1.0 + ); + vsOut.color = shape.color; + return vsOut; +} + +@fragment fn fs(vsOut: VSOutput) -> @location(0) vec4f { + return vsOut.color; +} +`; + } +}); +var kss; +var mKn = ue({ + "out-build/vs/editor/browser/gpu/rectangleRenderer.js"() { + "use strict"; + + xe(); + pe(); + q(); + Mj(); + Kat(); + q9(); + gKn(); + pKn(); + kss = class extends A9 { + constructor(i, e, t, s) { + super(); + this.z = i; + this.C = e; + this.F = t; + this.n = this.D(new ki()); + this.t = false; + this.u = this.D(fKn([{ + name: "x" + }, { + name: "y" + }, { + name: "width" + }, { + name: "height" + }, { + name: "red" + }, { + name: "green" + }, { + name: "blue" + }, { + name: "alpha" + }], 32)); + this.z.addEventHandler(this); + this.G(s); + } + async G(i) { + this.a = await i; + if (this.B.isDisposed) { + return; + } + const e = navigator.gpu.getPreferredCanvasFormat(); + this.F.configure({ + device: this.a, + format: e, + alphaMode: "premultiplied" + }); + this.c = { + view: null, + loadOp: "load", + storeOp: "store" + }; + this.b = { + label: "Monaco rectangle renderer render pass", + colorAttachments: [this.c] + }; + let t; + { + let o; + (function (c) { + c[c.FloatsPerEntry = 6] = "FloatsPerEntry"; + c[c.BytesPerEntry = 24] = "BytesPerEntry"; + c[c.Offset_CanvasWidth____ = 0] = "Offset_CanvasWidth____"; + c[c.Offset_CanvasHeight___ = 1] = "Offset_CanvasHeight___"; + c[c.Offset_ViewportOffsetX = 2] = "Offset_ViewportOffsetX"; + c[c.Offset_ViewportOffsetY = 3] = "Offset_ViewportOffsetY"; + c[c.Offset_ViewportWidth__ = 4] = "Offset_ViewportWidth__"; + c[c.Offset_ViewportHeight_ = 5] = "Offset_ViewportHeight_"; + })(o ||= {}); + const a = new Float32Array(6); + const l = (c = this.C.width, u = this.C.height) => { + a[0] = c; + a[1] = u; + a[2] = Math.ceil(this.z.configuration.options.get(151).contentLeft * js().devicePixelRatio); + a[3] = 0; + a[4] = a[0] - a[2]; + a[5] = a[1] - a[3]; + return a; + }; + t = this.D($I.createBuffer(this.a, { + label: "Monaco rectangle renderer uniform buffer", + size: 24, + usage: GPUBufferUsage.UNIFORM | GPUBufferUsage.COPY_DST + }, () => l())).object; + this.D(dss(this.C, js(), (c, u) => { + this.a.queue.writeBuffer(t, 0, l(c, u)); + })); + } + const s = 2; + this.r = this.D($I.createBuffer(this.a, { + label: "Monaco rectangle renderer scroll offset buffer", + size: s * Float32Array.BYTES_PER_ELEMENT, + usage: GPUBufferUsage.UNIFORM | GPUBufferUsage.COPY_DST + })).object; + this.s = new Float32Array(s); + const n = () => $I.createBuffer(this.a, { + label: "Monaco rectangle renderer shape buffer", + size: this.u.buffer.byteLength, + usage: GPUBufferUsage.STORAGE | GPUBufferUsage.COPY_DST + }); + this.n.value = n(); + this.D(de.runAndSubscribe(this.u.onDidChangeBuffer, () => { + this.n.value = n(); + if (this.g) { + this.H(this.g, t); + } + })); + this.j = this.D($I.createBuffer(this.a, { + label: "Monaco rectangle renderer vertex buffer", + size: H9.byteLength, + usage: GPUBufferUsage.VERTEX | GPUBufferUsage.COPY_DST + }, H9)).object; + const r = this.a.createShaderModule({ + label: "Monaco rectangle renderer shader module", + code: xss + }); + this.g = this.a.createRenderPipeline({ + label: "Monaco rectangle renderer render pipeline", + layout: "auto", + vertex: { + module: r, + buffers: [{ + arrayStride: Float32Array.BYTES_PER_ELEMENT * 2, + attributes: [{ + shaderLocation: 0, + offset: 0, + format: "float32x2" + }] + }] + }, + fragment: { + module: r, + targets: [{ + format: e, + blend: { + color: { + srcFactor: "src-alpha", + dstFactor: "one-minus-src-alpha" + }, + alpha: { + srcFactor: "src-alpha", + dstFactor: "one-minus-src-alpha" + } + } + }] + } + }); + this.H(this.g, t); + this.t = true; + } + H(i, e) { + this.f = this.a.createBindGroup({ + label: "Monaco rectangle renderer bind group", + layout: i.getBindGroupLayout(0), + entries: [{ + binding: 0, + resource: { + buffer: this.n.value.object + } + }, { + binding: 1, + resource: { + buffer: e + } + }, { + binding: 2, + resource: { + buffer: this.r + } + }] + }); + } + register(i, e, t, s, n, r, o, a) { + return this.u.createEntry({ + x: i, + y: e, + width: t, + height: s, + red: n, + green: r, + blue: o, + alpha: a + }); + } + onScrollChanged(i) { + if (this.a) { + const e = js().devicePixelRatio; + this.s[0] = this.z.viewLayout.getCurrentScrollLeft() * e; + this.s[1] = this.z.viewLayout.getCurrentScrollTop() * e; + this.a.queue.writeBuffer(this.r, 0, this.s); + } + return true; + } + I() { + if (!this.a) { + return; + } + const i = this.u; + if (i.dirtyTracker.isDirty) { + this.a.queue.writeBuffer(this.n.value.object, 0, i.buffer, i.dirtyTracker.dataOffset, i.dirtyTracker.dirtySize * i.view.BYTES_PER_ELEMENT); + i.dirtyTracker.clear(); + } + } + draw(i) { + if (!this.t) { + return; + } + this.I(); + const e = this.a.createCommandEncoder({ + label: "Monaco rectangle renderer command encoder" + }); + this.c.view = this.F.getCurrentTexture().createView(); + const t = e.beginRenderPass(this.b); + t.setPipeline(this.g); + t.setVertexBuffer(0, this.j); + t.setBindGroup(0, this.f); + t.draw(H9.length / 2, this.u.entryCount); + t.end(); + const s = e.finish(); + this.a.queue.submit([s]); + } + }; + } +}); +var bKn = ue({ + "out-build/vs/editor/browser/gpu/media/decorationCssRuleExtractor.css"() {} +}); +var Ess; +var vKn = ue({ + "out-build/vs/editor/browser/gpu/decorationCssRuleExtractor.js"() { + "use strict"; + + xe(); + q(); + bKn(); + Ess = class extends H { + constructor() { + super(); + this.c = new Map(); + this.a = G("div.monaco-decoration-css-rule-extractor"); + this.b = G("span"); + this.a.appendChild(this.b); + this.D(Ue(() => this.a.remove())); + } + getStyleRules(i, e) { + const t = this.c.get(e); + if (t) { + return t; + } + this.b.className = e; + i.appendChild(this.a); + const s = this.f(e); + this.c.set(e, s); + i.removeChild(this.a); + return s; + } + f(i) { + const e = []; + const s = [...hf().styleSheets]; + for (let n = 0; n < s.length; n++) { + const r = s[n]; + for (const o of r.cssRules) { + if (o instanceof CSSImportRule) { + if (o.styleSheet) { + s.push(o.styleSheet); + } + } else if (o instanceof CSSStyleRule) { + const a = `.${i}`; + const l = o.selectorText.indexOf(a); + if (l !== -1) { + const c = l + a.length; + if (o.selectorText.length === c || o.selectorText.substring(c, c + 1).match(/[ :]/)) { + e.push(o); + } + } + } + } + } + return e; + } + }; + } +}); +var IM; +var Iss; +var DM; +var r7t; +var Yat = ue({ + "out-build/vs/editor/browser/gpu/viewGpuContext.js"() { + "use strict"; + + X(); + xe(); + pf(); + Ut(); + q(); + An(); + te(); + s7t(); + Me(); + Wi(); + Kat(); + q9(); + mKn(); + vKn(); + pe(); + (function (i) { + i[i.maxGpuLines = 3000] = "maxGpuLines"; + i[i.maxGpuCols = 200] = "maxGpuCols"; + })(Iss ||= {}); + DM = class extends H { + static { + IM = this; + } + static { + this.a = new Ess(); + } + static get decorationCssRuleExtractor() { + return IM.a; + } + static get atlas() { + if (!IM.b) { + throw new co("Cannot call ViewGpuContext.textureAtlas before device is resolved"); + } + return IM.b; + } + get atlas() { + return IM.atlas; + } + constructor(e, t, s, n) { + super(); + this.c = t; + this.f = s; + this.g = n; + this.maxGpuLines = 3000; + this.maxGpuCols = 200; + this.canvas = nc(document.createElement("canvas")); + this.canvas.setClassName("editorCanvas"); + this.D(de.runAndSubscribe(n.onDidChangeConfiguration, a => { + if (!a || a.affectsConfiguration("editor.scrollbar.verticalScrollbarSize")) { + const l = n.getValue("editor").scrollbar?.verticalScrollbarSize ?? 14; + this.canvas.domNode.style.boxSizing = "border-box"; + this.canvas.domNode.style.paddingRight = `${l}px`; + } + })); + this.ctx = Gj(this.canvas.domNode.getContext("webgpu")); + this.device = $I.requestDevice(a => { + const l = [{ + label: f(191, null), + run: () => this.g.updateValue("editor.experimentalGpuAcceleration", "off") + }]; + this.f.prompt(es.Warning, a, l); + }).then(a => this.D(a).object); + this.device.then(a => { + IM.b ||= this.c.createInstance(x4, a.limits.maxTextureDimension2D, undefined); + }); + this.rectangleRenderer = this.c.createInstance(kss, e, this.canvas.domNode, this.ctx, this.device); + const r = un(this, js().devicePixelRatio); + this.D(Ce(js(), "resize", () => { + r.set(js().devicePixelRatio, undefined); + })); + this.devicePixelRatio = r; + this.D(dF(this.devicePixelRatio, () => IM.atlas?.clear())); + const o = un(this, { + width: this.canvas.domNode.width, + height: this.canvas.domNode.height + }); + this.D(dss(this.canvas.domNode, js(), (a, l) => { + this.canvas.domNode.width = a; + this.canvas.domNode.height = l; + o.set({ + width: a, + height: l + }, undefined); + })); + this.canvasDevicePixelDimensions = o; + } + canRender(e, t, s) { + const n = t.getViewLineRenderingData(s); + if (n.containsRTL || n.maxColumn > 200 || n.continuesWithWrappedLine || s >= 3000) { + return false; + } + if (n.inlineDecorations.length > 0) { + let r = true; + for (const o of n.inlineDecorations) { + if (o.type !== 0) { + r = false; + break; + } + const a = IM.a.getStyleRules(this.canvas.domNode, o.inlineClassName); + r &&= a.every(l => { + if (l.selectorText.includes(":")) { + return false; + } + for (const c of l.style) { + if (!r7t.includes(c)) { + return false; + } + } + return true; + }); + if (!r) { + break; + } + } + return r; + } + return true; + } + canRenderDetailed(e, t, s) { + const n = t.getViewLineRenderingData(s); + const r = []; + if (n.containsRTL) { + r.push("containsRTL"); + } + if (n.maxColumn > 200) { + r.push("maxColumn > maxGpuCols"); + } + if (n.continuesWithWrappedLine) { + r.push("continuesWithWrappedLine"); + } + if (n.inlineDecorations.length > 0) { + let o = true; + const a = []; + const l = []; + const c = []; + for (const u of n.inlineDecorations) { + if (u.type !== 0) { + a.push(u.type); + o = false; + continue; + } + const d = IM.a.getStyleRules(this.canvas.domNode, u.inlineClassName); + o &&= d.every(h => { + if (h.selectorText.includes(":")) { + l.push(h.selectorText); + return false; + } + for (const g of h.style) { + if (!r7t.includes(g)) { + c.push(g); + return false; + } + } + return true; + }); + } + if (a.length > 0) { + r.push(`inlineDecorations with unsupported types (${a.map(u => `\`${u}\``).join(", ")})`); + } + if (c.length > 0) { + r.push(`inlineDecorations with unsupported CSS rules (${c.map(u => `\`${u}\``).join(", ")})`); + } + if (l.length > 0) { + r.push(`inlineDecorations with unsupported CSS selectors (${l.map(u => `\`${u}\``).join(", ")})`); + } + } + if (s >= 3000) { + r.push("lineNumber >= maxGpuLines"); + } + return r; + } + }; + DM = IM = __decorate([__param(1, re), __param(2, ni), __param(3, ve)], DM); + r7t = ["color"]; + } +}); +var Dss; +var yKn = ue({ + "out-build/vs/editor/browser/gpu/fullFileRenderStrategy.wgsl.js"() { + "use strict"; + + s7t(); + i7t(); + Dss = ` +struct GlyphInfo { + position: vec2f, + size: vec2f, + origin: vec2f, +}; + +struct Vertex { + @location(0) position: vec2f, +}; + +struct Cell { + position: vec2f, + unused1: vec2f, + glyphIndex: f32, + textureIndex: f32 +}; + +struct LayoutInfo { + canvasDims: vec2f, + viewportOffset: vec2f, + viewportDims: vec2f, +} + +struct ScrollOffset { + offset: vec2f +} + +struct VSOutput { + @builtin(position) position: vec4f, + @location(1) layerIndex: f32, + @location(0) texcoord: vec2f, +}; + +// Uniforms +@group(0) @binding(4) var layoutInfo: LayoutInfo; +@group(0) @binding(5) var atlasDims: vec2f; +@group(0) @binding(6) var scrollOffset: ScrollOffset; + +// Storage buffers +@group(0) @binding(0) var glyphInfo: array, ${x4.maximumPageCount}>; +@group(0) @binding(1) var cells: array; + +@vertex fn vs( + vert: Vertex, + @builtin(instance_index) instanceIndex: u32, + @builtin(vertex_index) vertexIndex : u32 +) -> VSOutput { + let cell = cells[instanceIndex]; + var glyph = glyphInfo[u32(cell.textureIndex)][u32(cell.glyphIndex)]; + + var vsOut: VSOutput; + // Multiple vert.position by 2,-2 to get it into clipspace which ranged from -1 to 1 + vsOut.position = vec4f( + // Make everything relative to top left instead of center + vec2f(-1, 1) + + ((vert.position * vec2f(2, -2)) / layoutInfo.canvasDims) * glyph.size + + ((cell.position * vec2f(2, -2)) / layoutInfo.canvasDims) + + ((glyph.origin * vec2f(2, -2)) / layoutInfo.canvasDims) + + (((layoutInfo.viewportOffset - scrollOffset.offset * vec2(1, -1)) * 2) / layoutInfo.canvasDims), + 0.0, + 1.0 + ); + + vsOut.layerIndex = cell.textureIndex; + // Textures are flipped from natural direction on the y-axis, so flip it back + vsOut.texcoord = vert.position; + vsOut.texcoord = ( + // Glyph offset (0-1) + (glyph.position / atlasDims) + + // Glyph coordinate (0-1) + (vsOut.texcoord * (glyph.size / atlasDims)) + ); + + return vsOut; +} + +@group(0) @binding(2) var ourSampler: sampler; +@group(0) @binding(3) var ourTexture: texture_2d_array; + +@fragment fn fs(vsOut: VSOutput) -> @location(0) vec4f { + return textureSample(ourTexture, ourSampler, vsOut.texcoord, u32(vsOut.layerIndex)); +} +`; + } +}); +var Tss; +var Pss; +var Lss; +var wKn = ue({ + "out-build/vs/editor/browser/gpu/fullFileRenderStrategy.js"() { + "use strict"; + + xe(); + Ut(); + q(); + TT(); + Mj(); + yKn(); + Kat(); + q9(); + e7t(); + Yat(); + Zo(); + (function (i) { + i[i.IndicesPerCell = 6] = "IndicesPerCell"; + })(Tss ||= {}); + (function (i) { + i[i.FloatsPerEntry = 6] = "FloatsPerEntry"; + i[i.BytesPerEntry = 24] = "BytesPerEntry"; + i[i.Offset_X = 0] = "Offset_X"; + i[i.Offset_Y = 1] = "Offset_Y"; + i[i.Offset_Unused1 = 2] = "Offset_Unused1"; + i[i.Offset_Unused2 = 3] = "Offset_Unused2"; + i[i.GlyphIndex = 4] = "GlyphIndex"; + i[i.TextureIndex = 5] = "TextureIndex"; + })(Pss ||= {}); + Lss = class extends A9 { + get bindGroupEntries() { + return [{ + binding: 1, + resource: { + buffer: this.b + } + }, { + binding: 6, + resource: { + buffer: this.n + } + }]; + } + constructor(i, e, t) { + super(); + this.w = i; + this.z = e; + this.C = t; + this.wgsl = Dss; + this.f = 0; + this.g = [new Set(), new Set()]; + this.h = 0; + this.j = 0; + this.t = false; + this.u = [[], []]; + this.w.addEventHandler(this); + const s = this.w.configuration.options.get(51); + const n = this.w.configuration.options.get(54); + this.a = this.D(new GBt(new _te(n, s, this.z.devicePixelRatio.get()))); + const r = this.z.maxGpuLines * this.z.maxGpuCols * 6 * Float32Array.BYTES_PER_ELEMENT; + this.b = this.D($I.createBuffer(this.C, { + label: "Monaco full file cell buffer", + size: r, + usage: GPUBufferUsage.STORAGE | GPUBufferUsage.COPY_DST + })).object; + this.c = [new ArrayBuffer(r), new ArrayBuffer(r)]; + const o = 2; + this.n = this.D($I.createBuffer(this.C, { + label: "Monaco scroll offset buffer", + size: o * Float32Array.BYTES_PER_ELEMENT, + usage: GPUBufferUsage.UNIFORM | GPUBufferUsage.COPY_DST + })).object; + this.s = new Float32Array(o); + } + onConfigurationChanged(i) { + this.F(); + this.I(i); + const e = this.w.configuration.options.get(51); + const t = this.w.configuration.options.get(54); + const s = this.z.devicePixelRatio.get(); + if (this.a.value.fontFamily !== e || this.a.value.fontSize !== t || this.a.value.devicePixelRatio !== s) { + this.a.value = new _te(t, e, s); + } + return true; + } + onDecorationsChanged(i) { + this.F(); + return true; + } + onTokensChanged(i) { + for (const e of i.ranges) { + this.H(e.fromLineNumber, e.toLineNumber); + } + return true; + } + onLinesDeleted(i) { + this.G(i.fromLineNumber); + this.I(i); + return true; + } + onLinesInserted(i) { + this.G(i.fromLineNumber); + return true; + } + onLinesChanged(i) { + this.H(i.fromLineNumber, i.fromLineNumber + i.count); + return true; + } + onScrollChanged(i) { + const e = js().devicePixelRatio; + this.s[0] = (i?.scrollLeft ?? this.w.viewLayout.getCurrentScrollLeft()) * e; + this.s[1] = (i?.scrollTop ?? this.w.viewLayout.getCurrentScrollTop()) * e; + this.C.queue.writeBuffer(this.n, 0, this.s); + return true; + } + onThemeChanged(i) { + this.F(); + return true; + } + onLineMappingChanged(i) { + this.F(); + this.I(i); + return true; + } + onZonesChanged(i) { + this.F(); + this.I(i); + return true; + } + F() { + this.g[0].clear(); + this.g[1].clear(); + } + G(i) { + for (const e of [0, 1]) { + const t = this.g[e]; + for (const s of t) { + if (s >= i) { + t.delete(s); + } + } + } + } + H(i, e) { + for (let t = i; t <= e; t++) { + this.g[0].delete(t); + this.g[1].delete(t); + } + } + reset() { + this.F(); + for (const i of [0, 1]) { + const e = new Float32Array(this.c[i]); + e.fill(0, 0, e.length); + this.C.queue.writeBuffer(this.b, 0, e.buffer, 0, e.byteLength); + } + this.j = 0; + } + update(i, e) { + let t = ""; + let s = 0; + let n = 0; + let r = 0; + let o = 0; + let a = 0; + let l; + let c = 0; + let u = 0; + let d = 0; + let h = 0; + let g = 0; + let p; + let b; + let v = ""; + let y = 0; + let w = 0; + let C; + const S = js().devicePixelRatio; + if (!this.t) { + this.onScrollChanged(); + this.t = true; + } + const x = new Float32Array(this.c[this.f]); + const k = this.z.maxGpuCols * 6; + const E = this.g[this.f]; + let D = Number.MAX_SAFE_INTEGER; + let P = 0; + const R = this.u[this.f]; + while (R.length) { + const F = R.shift(); + switch (F.type) { + case 2: + case 8: + case 17: + { + x.fill(0); + D = 1; + P = Math.max(P, this.j); + this.j = 0; + break; + } + case 10: + { + const O = (F.fromLineNumber - 1) * this.z.maxGpuCols * 6; + const U = F.toLineNumber * this.z.maxGpuCols * 6; + const j = (this.j - (F.toLineNumber - F.fromLineNumber + 1)) * this.z.maxGpuCols * 6; + x.set(x.subarray(U), O); + x.fill(0, j); + D = Math.min(D, F.fromLineNumber); + P = Math.max(P, this.j); + this.j -= F.toLineNumber - F.fromLineNumber + 1; + break; + } + } + } + for (s = i.startLineNumber; s <= i.endLineNumber; s++) { + if (!this.z.canRender(e, i, s)) { + y = (s - 1) * this.z.maxGpuCols * 6; + w = s * this.z.maxGpuCols * 6; + x.fill(0, y, w); + D = Math.min(D, s); + P = Math.max(P, s); + continue; + } + if (!E.has(s)) { + D = Math.min(D, s); + P = Math.max(P, s); + p = i.getViewLineRenderingData(s); + v = p.content; + a = 0; + C = p.tokens; + u = p.minColumn - 1; + d = 0; + for (let F = 0, O = C.getCount(); F < O; F++) { + d = C.getEndOffset(F); + if (!(d <= u)) { + h = C.getMetadata(F); + n = u; + for (; n < d && !(n > this.z.maxGpuCols); n++) { + t = v.charAt(n); + g = 0; + for (b of p.inlineDecorations) { + if (s < b.range.startLineNumber || s > b.range.endLineNumber || s === b.range.startLineNumber && n < b.range.startColumn - 1 || s === b.range.endLineNumber && n >= b.range.endColumn - 1) { + continue; + } + const U = DM.decorationCssRuleExtractor.getStyleRules(this.z.canvas.domNode, b.inlineClassName); + for (const j of U) { + for (const ie of j.style) { + const ee = j.styleMap.get(ie)?.toString() ?? ""; + switch (ie) { + case "color": + { + const ne = ut.Format.CSS.parse(ee); + if (!ne) { + throw new co("Invalid color format " + ee); + } + g = ne.toNumber24Bit(); + break; + } + default: + throw new co("Unexpected inline decoration style"); + } + } + } + } + if (t === " " || t === "\t") { + c = ((s - 1) * this.z.maxGpuCols + n) * 6; + x.fill(0, c, c + 6); + if (t === "\t") { + a = pp.nextRenderTabStop(n + a, p.tabSize) - n - 1; + } + continue; + } + l = this.z.atlas.getGlyph(this.a.value, t, h, g); + r = Math.round((n + a) * e.spaceWidth * S); + o = Math.round(i.relativeVerticalOffset[s - i.startLineNumber] * S + Math.floor((i.lineHeight * S - (l.fontBoundingBoxAscent + l.fontBoundingBoxDescent)) / 2) + l.fontBoundingBoxAscent); + c = ((s - 1) * this.z.maxGpuCols + n) * 6; + x[c + 0] = r; + x[c + 1] = o; + x[c + 4] = l.glyphIndex; + x[c + 5] = l.pageIndex; + } + u = d; + } + } + y = ((s - 1) * this.z.maxGpuCols + d) * 6; + w = s * this.z.maxGpuCols * 6; + x.fill(0, y, w); + E.add(s); + } + } + const L = (i.endLineNumber - i.startLineNumber + 1) * k; + if (D <= P) { + this.C.queue.writeBuffer(this.b, (D - 1) * k * Float32Array.BYTES_PER_ELEMENT, x.buffer, (D - 1) * k * Float32Array.BYTES_PER_ELEMENT, (P - D + 1) * k * Float32Array.BYTES_PER_ELEMENT); + } + this.j = Math.max(this.j, P); + this.f = this.f ? 0 : 1; + this.h = L; + return L; + } + draw(i, e) { + if (this.h <= 0) { + throw new co("Attempt to draw 0 objects"); + } + i.draw(H9.length / 2, this.h, undefined, (e.startLineNumber - 1) * this.z.maxGpuCols); + } + I(i) { + this.u[0].push(i); + this.u[1].push(i); + } + }; + } +}); +var Rss; +var Xat; +var CKn = ue({ + "out-build/vs/editor/browser/viewParts/viewLinesGpu/viewLinesGpu.js"() { + "use strict"; + + xe(); + Ut(); + An(); + te(); + Zt(); + Rs(); + yt(); + i7t(); + wKn(); + Kat(); + q9(); + Yat(); + ate(); + Ow(); + m9t(); + TT(); + s7t(); + (function (i) { + i[i.FloatsPerEntry = 6] = "FloatsPerEntry"; + i[i.BytesPerEntry = 24] = "BytesPerEntry"; + i[i.Offset_TexturePosition = 0] = "Offset_TexturePosition"; + i[i.Offset_TextureSize = 2] = "Offset_TextureSize"; + i[i.Offset_OriginPosition = 4] = "Offset_OriginPosition"; + })(Rss ||= {}); + Xat = class extends YC { + constructor(e, t, s, n) { + super(e); + this.L = t; + this.M = s; + this.N = n; + this.G = []; + this.H = false; + this.J = un("contentLeft", 0); + this.a = this.L.canvas.domNode; + this.D(Dn(r => { + this.L.canvasDevicePixelDimensions.read(r); + const o = this.c; + if (o) { + setTimeout(() => { + if (o === this.c) { + this.renderText(o); + } + }); + } + })); + this.initWebgpu(); + } + async initWebgpu() { + this.g = await this.L.device; + if (this.B.isDisposed) { + return; + } + const e = DM.atlas; + this.D(e.onDidDeleteGlyphs(() => { + this.G.length = 0; + this.G[0] = 0; + this.G[1] = 0; + this.I.reset(); + })); + const t = navigator.gpu.getPreferredCanvasFormat(); + this.L.ctx.configure({ + device: this.g, + format: t, + alphaMode: "premultiplied" + }); + this.n = { + view: null, + loadOp: "load", + storeOp: "store" + }; + this.j = { + label: "Monaco render pass", + colorAttachments: [this.n] + }; + let s; + { + let o; + (function (c) { + c[c.FloatsPerEntry = 6] = "FloatsPerEntry"; + c[c.BytesPerEntry = 24] = "BytesPerEntry"; + c[c.Offset_CanvasWidth____ = 0] = "Offset_CanvasWidth____"; + c[c.Offset_CanvasHeight___ = 1] = "Offset_CanvasHeight___"; + c[c.Offset_ViewportOffsetX = 2] = "Offset_ViewportOffsetX"; + c[c.Offset_ViewportOffsetY = 3] = "Offset_ViewportOffsetY"; + c[c.Offset_ViewportWidth__ = 4] = "Offset_ViewportWidth__"; + c[c.Offset_ViewportHeight_ = 5] = "Offset_ViewportHeight_"; + })(o ||= {}); + const a = new Float32Array(6); + const l = (c = this.a.width, u = this.a.height) => { + a[0] = c; + a[1] = u; + a[2] = Math.ceil(this._context.configuration.options.get(151).contentLeft * js().devicePixelRatio); + a[3] = 0; + a[4] = a[0] - a[2]; + a[5] = a[1] - a[3]; + return a; + }; + s = this.D($I.createBuffer(this.g, { + label: "Monaco uniform buffer", + size: 24, + usage: GPUBufferUsage.UNIFORM | GPUBufferUsage.COPY_DST + }, () => l())).object; + this.D(dF(this.L.canvasDevicePixelDimensions, ({ + width: c, + height: u + }) => { + this.g.queue.writeBuffer(s, 0, l(c, u)); + })); + this.D(dF(this.J, () => { + this.g.queue.writeBuffer(s, 0, l()); + })); + } + let n; + { + let o; + (function (a) { + a[a.FloatsPerEntry = 2] = "FloatsPerEntry"; + a[a.BytesPerEntry = 8] = "BytesPerEntry"; + a[a.Offset_Width_ = 0] = "Offset_Width_"; + a[a.Offset_Height = 1] = "Offset_Height"; + })(o ||= {}); + n = this.D($I.createBuffer(this.g, { + label: "Monaco atlas info uniform buffer", + size: 8, + usage: GPUBufferUsage.UNIFORM | GPUBufferUsage.COPY_DST + }, () => { + const a = new Float32Array(2); + a[0] = e.pageSize; + a[1] = e.pageSize; + return a; + })).object; + } + this.I = this.D(this.M.createInstance(Lss, this._context, this.L, this.g)); + this.C = this.D($I.createBuffer(this.g, { + label: "Monaco glyph storage buffer", + size: x4.maximumPageCount * (YL.maximumGlyphCount * 24), + usage: GPUBufferUsage.STORAGE | GPUBufferUsage.COPY_DST + })).object; + this.G[0] = 0; + this.G[1] = 0; + this.F = this.D($I.createTexture(this.g, { + label: "Monaco atlas texture", + format: "rgba8unorm", + size: { + width: e.pageSize, + height: e.pageSize, + depthOrArrayLayers: x4.maximumPageCount + }, + dimension: "2d", + usage: GPUTextureUsage.TEXTURE_BINDING | GPUTextureUsage.COPY_DST | GPUTextureUsage.RENDER_ATTACHMENT + })).object; + this.O(); + this.u = this.D($I.createBuffer(this.g, { + label: "Monaco vertex buffer", + size: H9.byteLength, + usage: GPUBufferUsage.VERTEX | GPUBufferUsage.COPY_DST + }, H9)).object; + const r = this.g.createShaderModule({ + label: "Monaco shader module", + code: this.I.wgsl + }); + this.t = this.g.createRenderPipeline({ + label: "Monaco render pipeline", + layout: "auto", + vertex: { + module: r, + buffers: [{ + arrayStride: Float32Array.BYTES_PER_ELEMENT * 2, + attributes: [{ + shaderLocation: 0, + offset: 0, + format: "float32x2" + }] + }] + }, + fragment: { + module: r, + targets: [{ + format: t, + blend: { + color: { + srcFactor: "src-alpha", + dstFactor: "one-minus-src-alpha" + }, + alpha: { + srcFactor: "src-alpha", + dstFactor: "one-minus-src-alpha" + } + } + }] + } + }); + this.s = this.g.createBindGroup({ + label: "Monaco bind group", + layout: this.t.getBindGroupLayout(0), + entries: [{ + binding: 0, + resource: { + buffer: this.C + } + }, { + binding: 2, + resource: this.g.createSampler({ + label: "Monaco atlas sampler", + magFilter: "nearest", + minFilter: "nearest" + }) + }, { + binding: 3, + resource: this.F.createView() + }, { + binding: 4, + resource: { + buffer: s + } + }, { + binding: 5, + resource: { + buffer: n + } + }, ...this.I.bindGroupEntries] + }); + this.H = true; + if (this.b) { + for (const o of this.b) { + this.renderText(o); + } + this.b = undefined; + } + } + O() { + for (const [e, t] of DM.atlas.pages.entries()) { + if (e >= x4.maximumPageCount) { + console.log(`Attempt to upload atlas page [${e}], only ${x4.maximumPageCount} are supported currently`); + continue; + } + if (t.version === this.G[e]) { + continue; + } + this.N.trace("Updating atlas page[", e, "] from version ", this.G[e], " to version ", t.version); + const s = YL.maximumGlyphCount * 6; + const n = new Float32Array(s); + let r = 0; + for (const o of t.glyphs) { + n[r + 0] = o.x; + n[r + 0 + 1] = o.y; + n[r + 2] = o.w; + n[r + 2 + 1] = o.h; + n[r + 4] = o.originOffsetX; + n[r + 4 + 1] = o.originOffsetY; + r += 6; + } + if (r / 6 > YL.maximumGlyphCount) { + throw new Error(`Attempting to write more glyphs (${r / 6}) than the GPUBuffer can hold (${YL.maximumGlyphCount})`); + } + this.g.queue.writeBuffer(this.C, e * 6 * YL.maximumGlyphCount * Float32Array.BYTES_PER_ELEMENT, n, 0, YL.maximumGlyphCount * 6); + if (t.usedArea.right - t.usedArea.left > 0 && t.usedArea.bottom - t.usedArea.top > 0) { + this.g.queue.copyExternalImageToTexture({ + source: t.source + }, { + texture: this.F, + origin: { + x: t.usedArea.left, + y: t.usedArea.top, + z: e + } + }, { + width: t.usedArea.right - t.usedArea.left + 1, + height: t.usedArea.bottom - t.usedArea.top + 1 + }); + } + this.G[e] = t.version; + } + } + prepareRender(e) { + throw new co("Should not be called"); + } + render(e) { + throw new co("Should not be called"); + } + onCursorStateChanged(e) { + return true; + } + onDecorationsChanged(e) { + return true; + } + onFlushed(e) { + return true; + } + onLinesChanged(e) { + return true; + } + onLinesDeleted(e) { + return true; + } + onLinesInserted(e) { + return true; + } + onLineMappingChanged(e) { + return true; + } + onRevealRangeRequest(e) { + return true; + } + onScrollChanged(e) { + return true; + } + onThemeChanged(e) { + return true; + } + onZonesChanged(e) { + return true; + } + onConfigurationChanged(e) { + this.J.set(this._context.configuration.options.get(151).contentLeft, undefined); + return true; + } + renderText(e) { + if (this.H) { + return this.P(e); + } + this.b = this.b ?? []; + this.b.push(e); + } + P(e) { + this.L.rectangleRenderer.draw(e); + const t = new ppe(this._context.configuration, this._context.theme.type); + const s = this.I.update(e, t); + this.O(); + const n = this.g.createCommandEncoder({ + label: "Monaco command encoder" + }); + this.n.view = this.L.ctx.getCurrentTexture().createView({ + label: "Monaco canvas texture view" + }); + const r = n.beginRenderPass(this.j); + r.setPipeline(this.t); + r.setVertexBuffer(0, this.u); + const o = Math.ceil(this.J.get() * this.L.devicePixelRatio.get()); + r.setScissorRect(o, 0, this.a.width - o, this.a.height); + r.setBindGroup(0, this.s); + if (this.I?.draw) { + this.I.draw(r, e); + } else { + r.draw(H9.length / 2, s); + } + r.end(); + const a = n.finish(); + this.g.queue.submit([a]); + this.c = e; + this.f = t; + } + linesVisibleRangesForRange(e, t) { + if (!this.c) { + return null; + } + const s = e.endLineNumber; + const n = Z.intersectRanges(e, this.c.visibleRange); + if (!n) { + return null; + } + const r = this.c.startLineNumber; + const o = this.c.endLineNumber; + const a = this.c; + const l = this.f; + if (!a || !l) { + return null; + } + const c = []; + let u = 0; + if (t) { + u = this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new je(n.startLineNumber, 1)).lineNumber; + } + for (let d = n.startLineNumber; d <= n.endLineNumber; d++) { + if (d < r || d > o) { + continue; + } + const h = d === n.startLineNumber ? n.startColumn : 1; + const g = d !== n.endLineNumber; + const p = g ? this._context.viewModel.getLineMaxColumn(d) : n.endColumn; + const b = this.Q(d, h, p); + if (b) { + if (t && d < s) { + const v = u; + u = this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new je(d + 1, 1)).lineNumber; + if (v !== u) { + b.ranges[b.ranges.length - 1].width += l.spaceWidth; + } + } + c.push(new C3t(b.outsideRenderedLine, d, uat.from(b.ranges), g)); + } + } + if (c.length === 0) { + return null; + } else { + return c; + } + } + Q(e, t, s) { + if (this.shouldRender()) { + return null; + } + const n = this.c; + const r = this.f; + if (!n || !r || e < n.startLineNumber || e > n.endLineNumber) { + return null; + } + const o = n.getViewLineRenderingData(e); + const a = o.content; + let l = 0; + for (let d = 0; d < t - 1; d++) { + if (a[d] === "\t") { + l = pp.nextRenderTabStop(l, o.tabSize); + } else { + l++; + } + } + let c = l; + for (let d = t - 1; d < s - 1; d++) { + if (a[d] === "\t") { + c = pp.nextRenderTabStop(c, o.tabSize); + } else { + c++; + } + } + return new dat(false, [new f4(l * r.spaceWidth, (c - l) * r.spaceWidth)]); + } + visibleRangeForPosition(e) { + const t = this.Q(e.lineNumber, e.column, e.column); + if (t) { + return new S3t(t.outsideRenderedLine, t.ranges[0].left); + } else { + return null; + } + } + getLineWidth(e) { + if (!this.c || !this.f || !this.L.canRender(this.f, this.c, e)) { + return; + } + const t = this.c.getViewLineRenderingData(e); + const n = this.Q(e, 1, t.maxColumn)?.ranges.at(-1); + if (n) { + return n.width; + } + } + getPositionAtCoordinate(e, t) { + if (!this.c || !this.f || !this.L.canRender(this.f, this.c, e)) { + return; + } + const s = this.c.getViewLineRenderingData(e); + const n = s.content; + let r = Math.round(t / this.f.spaceWidth); + let o = 0; + let a = 0; + while (r > 0) { + let l = 0; + if (n[o] === "\t") { + l = pp.nextRenderTabStop(a, s.tabSize) - a; + } else { + l = 1; + } + if (r - l / 2 < 0) { + break; + } + r -= l; + o++; + a += l; + } + return new je(e, Math.floor(o) + 1); + } + }; + Xat = __decorate([__param(2, re), __param(3, Bt)], Xat); + } +}); +var SKn = ue({ + "out-build/vs/editor/browser/controller/editContext/textArea/textAreaEditContext.css"() {} +}); +var Nss; +var Bte; +var Mss = ue({ + "out-build/vs/base/common/ime.js"() { + "use strict"; + + pe(); + Nss = class { + constructor() { + this.a = new B(); + this.onDidChange = this.a.event; + this.b = true; + } + get enabled() { + return this.b; + } + enable() { + this.b = true; + this.a.fire(); + } + disable() { + this.b = false; + this.a.fire(); + } + }; + Bte = new Nss(); + } +}); +var oi; +var Fi = ue({ + "out-build/vs/platform/keybinding/common/keybinding.js"() { + "use strict"; + + te(); + oi = Ve("keybindingService"); + } +}); +var o7t; +var Ass = ue({ + "out-build/vs/editor/browser/controller/editContext/editContext.js"() { + "use strict"; + + Ow(); + o7t = class extends YC {}; + } +}); +function a7t(i, e) { + if (i.get(2) === 1) { + const s = e.lookupKeybinding("editor.action.toggleScreenReaderAccessibilityMode")?.getAriaLabel(); + const n = e.lookupKeybinding("workbench.action.showCommands")?.getAriaLabel(); + const r = e.lookupKeybinding("workbench.action.openGlobalKeybindings")?.getAriaLabel(); + const o = f(177, null); + if (s) { + return f(178, null, o, s); + } else if (n) { + return f(179, null, o, n); + } else if (r) { + return f(180, null, o, r); + } else { + return o; + } + } + return i.get(4); +} +function l7t(i) { + let e = 0; + let t = -1; + do { + t = i.indexOf(` +`, t + 1); + if (t === -1) { + break; + } + e++; + } while (true); + return e; +} +var c7t; +var $ss = ue({ + "out-build/vs/editor/browser/controller/editContext/screenReaderUtils.js"() { + "use strict"; + + yt(); + X(); + c7t = class YPe { + static a(e, t) { + return Math.floor((e - 1) / t); + } + static b(e, t) { + const s = e * t; + const n = s + 1; + const r = s + t; + return new Z(n, 1, r + 1, 1); + } + static fromEditorSelection(e, t, s, n) { + const o = YPe.a(t.startLineNumber, s); + const a = YPe.b(o, s); + const l = YPe.a(t.endLineNumber, s); + const c = YPe.b(l, s); + let u = a.intersectRanges(new Z(1, 1, t.startLineNumber, t.startColumn)); + if (n && e.getValueLengthInRange(u, 1) > 500) { + const y = e.modifyPosition(u.getEndPosition(), -500); + u = Z.fromPositions(y, u.getEndPosition()); + } + const d = e.getValueInRange(u, 1); + const h = e.getLineCount(); + const g = e.getLineMaxColumn(h); + let p = c.intersectRanges(new Z(t.endLineNumber, t.endColumn, h, g)); + if (n && e.getValueLengthInRange(p, 1) > 500) { + const y = e.modifyPosition(p.getStartPosition(), 500); + p = Z.fromPositions(p.getStartPosition(), y); + } + const b = e.getValueInRange(p, 1); + let v; + if (o === l || o + 1 === l) { + v = e.getValueInRange(t, 1); + } else { + const y = a.intersectRanges(t); + const w = c.intersectRanges(t); + v = e.getValueInRange(y, 1) + "…" + e.getValueInRange(w, 1); + } + if (n && v.length > 1000) { + v = v.substring(0, 500) + "…" + v.substring(v.length - 500, v.length); + } + return { + value: d + v + b, + selection: t, + selectionStart: d.length, + selectionEnd: d.length + v.length, + startPositionWithinEditor: u.getStartPosition(), + newlineCountBeforeSelection: u.endLineNumber - u.startLineNumber + }; + } + }; + } +}); +function xKn(i, e, t, s) { + if (e.length === 0) { + return 0; + } + const n = i.createElement("div"); + n.style.position = "absolute"; + n.style.top = "-50000px"; + n.style.width = "50000px"; + const r = i.createElement("span"); + Hm(r, t); + r.style.whiteSpace = "pre"; + r.style.tabSize = `${s * t.spaceWidth}px`; + r.append(e); + n.appendChild(r); + i.body.appendChild(n); + const o = r.offsetWidth; + n.remove(); + return o; +} +var Fss; +var Qat; +var Zat; +var kKn = ue({ + "out-build/vs/editor/browser/controller/editContext/textArea/textAreaEditContext.js"() { + "use strict"; + + SKn(); + X(); + hc(); + pf(); + rt(); + $i(); + s1(); + Ow(); + Uts(); + zts(); + Qd(); + Rs(); + yt(); + ua(); + yte(); + Eo(); + Zo(); + Mss(); + Fi(); + te(); + Ass(); + mes(); + $ss(); + dpe(); + fes(); + xge(); + Fss = class { + constructor(i, e, t, s, n) { + this.b = i; + this.modelLineNumber = e; + this.distanceToModelLineStart = t; + this.widthOfHiddenLineTextBefore = s; + this.distanceToModelLineEnd = n; + this._visibleTextAreaBrand = undefined; + this.startPosition = null; + this.endPosition = null; + this.visibleTextareaStart = null; + this.visibleTextareaEnd = null; + this.a = null; + } + prepareRender(i) { + const e = new je(this.modelLineNumber, this.distanceToModelLineStart + 1); + const t = new je(this.modelLineNumber, this.b.viewModel.model.getLineMaxColumn(this.modelLineNumber) - this.distanceToModelLineEnd); + this.startPosition = this.b.viewModel.coordinatesConverter.convertModelPositionToViewPosition(e); + this.endPosition = this.b.viewModel.coordinatesConverter.convertModelPositionToViewPosition(t); + if (this.startPosition.lineNumber === this.endPosition.lineNumber) { + this.visibleTextareaStart = i.visibleRangeForPosition(this.startPosition); + this.visibleTextareaEnd = i.visibleRangeForPosition(this.endPosition); + } else { + this.visibleTextareaStart = null; + this.visibleTextareaEnd = null; + } + } + definePresentation(i) { + if (!this.a) { + if (i) { + this.a = i; + } else { + this.a = { + foreground: 1, + italic: false, + bold: false, + underline: false, + strikethrough: false + }; + } + } + return this.a; + } + }; + Qat = Bv; + Zat = class extends o7t { + constructor(e, t, s, n, r, o) { + super(e); + this.L = r; + this.M = o; + this.S = new je(1, 1); + this.U = null; + this.a = s; + this.b = n; + this.c = 0; + this.f = 0; + const a = this._context.configuration.options; + const l = a.get(151); + this.Q(a); + this.s = l.contentLeft; + this.t = l.contentWidth; + this.u = l.height; + this.w = a.get(52); + this.y = a.get(68); + this.z = a.get(38); + this.C = a.get(25); + this.F = null; + this.G = [new Vs(1, 1, 1, 1)]; + this.H = [new Vs(1, 1, 1, 1)]; + this.I = null; + this.textArea = nc(document.createElement("textarea")); + JL.write(this.textArea, 7); + this.textArea.setClassName(`inputarea ${xM}`); + this.textArea.setAttribute("wrap", this.j && !this.F ? "on" : "off"); + const { + tabSize: c + } = this._context.viewModel.model.getOptions(); + this.textArea.domNode.style.tabSize = `${c * this.w.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", a7t(a, this.L)); + this.textArea.setAttribute("aria-required", a.get(5) ? "true" : "false"); + this.textArea.setAttribute("tabindex", String(a.get(129))); + this.textArea.setAttribute("role", "textbox"); + this.textArea.setAttribute("aria-roledescription", f(181, null)); + this.textArea.setAttribute("aria-multiline", "true"); + this.textArea.setAttribute("aria-autocomplete", a.get(96) ? "none" : "both"); + this.R(); + this.textAreaCover = nc(document.createElement("div")); + this.textAreaCover.setPosition("absolute"); + t.appendChild(this.textArea); + t.appendChild(this.textAreaCover); + const u = { + getLineCount: () => this._context.viewModel.getLineCount(), + getLineMaxColumn: g => this._context.viewModel.getLineMaxColumn(g), + getValueInRange: (g, p) => this._context.viewModel.getValueInRange(g, p), + getValueLengthInRange: (g, p) => this._context.viewModel.getValueLengthInRange(g, p), + modifyPosition: (g, p) => this._context.viewModel.modifyPosition(g, p) + }; + const d = { + getDataToCopy: () => hes(this._context.viewModel, this.H, this.z, this.C), + getScreenReaderContent: () => { + if (this.g === 1) { + const p = this.G[0]; + if (Gt && p.isEmpty()) { + const v = p.getStartPosition(); + let y = this.O(v); + if (y.length === 0) { + y = this.P(v); + } + if (y.length > 0) { + return new QC(y, y.length, y.length, Z.fromPositions(v), 0); + } + } + if (Gt && !p.isEmpty() && u.getValueLengthInRange(p, 0) < 500) { + const v = u.getValueInRange(p, 0); + return new QC(v, 0, v.length, p, 0); + } + if (yI && !p.isEmpty()) { + const v = "vscode-placeholder"; + return new QC(v, 0, v.length, null, undefined); + } + return QC.EMPTY; + } + if (G4t) { + const p = this.G[0]; + if (p.isEmpty()) { + const b = p.getStartPosition(); + const [v, y] = this.N(b); + if (v.length > 0) { + return new QC(v, y, y, Z.fromPositions(b), 0); + } + } + return QC.EMPTY; + } + const g = c7t.fromEditorSelection(u, this.G[0], this.h, this.g === 0); + return QC.fromScreenReaderContentState(g); + }, + deduceModelPosition: (g, p, b) => this._context.viewModel.deduceModelPositionRelativeToViewPosition(g, p, b) + }; + const h = this.D(new pes(this.textArea.domNode)); + this.J = this.D(this.M.createInstance(Cat, d, h, Ia, { + isAndroid: G4t, + isChrome: Jq, + isFirefox: Bv, + isSafari: yI + })); + this.D(this.J.onKeyDown(g => { + this.a.emitKeyDown(g); + })); + this.D(this.J.onKeyUp(g => { + this.a.emitKeyUp(g); + })); + this.D(this.J.onPaste(g => { + let p = false; + let b = null; + let v = null; + if (g.metadata) { + p = this.z && !!g.metadata.isFromEmptySelection; + b = typeof g.metadata.multicursorText !== "undefined" ? g.metadata.multicursorText : null; + v = g.metadata.mode; + } + this.a.paste(g.text, p, b, v); + })); + this.D(this.J.onCut(() => { + this.a.cut(); + })); + this.D(this.J.onType(g => { + if (g.replacePrevCharCnt || g.replaceNextCharCnt || g.positionDelta) { + if (RI) { + console.log(` => compositionType: <<${g.text}>>, ${g.replacePrevCharCnt}, ${g.replaceNextCharCnt}, ${g.positionDelta}`); + } + this.a.compositionType(g.text, g.replacePrevCharCnt, g.replaceNextCharCnt, g.positionDelta); + } else { + if (RI) { + console.log(` => type: <<${g.text}>>`); + } + this.a.type(g.text); + } + })); + this.D(this.J.onSelectionChangeRequest(g => { + this.a.setSelection(g); + })); + this.D(this.J.onCompositionStart(g => { + const p = this.textArea.domNode; + const b = this.H[0]; + const { + distanceToModelLineStart: v, + widthOfHiddenTextBefore: y + } = (() => { + const C = p.value.substring(0, Math.min(p.selectionStart, p.selectionEnd)); + const S = C.lastIndexOf(` +`); + const x = C.substring(S + 1); + const k = x.lastIndexOf("\t"); + const E = x.length - k - 1; + const D = b.getStartPosition(); + const P = Math.min(D.column - 1, E); + const R = D.column - 1 - P; + const L = x.substring(0, x.length - P); + const { + tabSize: F + } = this._context.viewModel.model.getOptions(); + const O = xKn(this.textArea.domNode.ownerDocument, L, this.w, F); + return { + distanceToModelLineStart: R, + widthOfHiddenTextBefore: O + }; + })(); + const { + distanceToModelLineEnd: w + } = (() => { + const C = p.value.substring(Math.max(p.selectionStart, p.selectionEnd)); + const S = C.indexOf(` +`); + const x = S === -1 ? C : C.substring(0, S); + const k = x.indexOf("\t"); + const E = k === -1 ? x.length : x.length - k - 1; + const D = b.getEndPosition(); + const P = Math.min(this._context.viewModel.model.getLineMaxColumn(D.lineNumber) - D.column, E); + return { + distanceToModelLineEnd: this._context.viewModel.model.getLineMaxColumn(D.lineNumber) - D.column - P + }; + })(); + this._context.viewModel.revealRange("keyboard", true, Z.fromPositions(this.G[0].getStartPosition()), 0, 1); + this.F = new Fss(this._context, b.startLineNumber, v, y, w); + this.textArea.setAttribute("wrap", this.j && !this.F ? "on" : "off"); + this.F.prepareRender(this.b); + this.W(); + this.textArea.setClassName(`inputarea ${xM} ime-input`); + this.a.compositionStart(); + this._context.viewModel.onCompositionStart(); + })); + this.D(this.J.onCompositionUpdate(g => { + if (this.F) { + this.F.prepareRender(this.b); + this.W(); + } + })); + this.D(this.J.onCompositionEnd(() => { + this.F = null; + this.textArea.setAttribute("wrap", this.j && !this.F ? "on" : "off"); + this.W(); + this.textArea.setClassName(`inputarea ${xM}`); + this.a.compositionEnd(); + this._context.viewModel.onCompositionEnd(); + })); + this.D(this.J.onFocus(() => { + this._context.viewModel.setHasFocus(true); + })); + this.D(this.J.onBlur(() => { + this._context.viewModel.setHasFocus(false); + })); + this.D(Bte.onDidChange(() => { + this.R(); + })); + } + get domNode() { + return this.textArea; + } + writeScreenReaderContent(e) { + this.J.writeNativeTextAreaContent(e); + } + getTextAreaDomNode() { + return this.textArea.domNode; + } + dispose() { + super.dispose(); + this.textArea.domNode.remove(); + this.textAreaCover.domNode.remove(); + } + N(e) { + const t = "`~!@#$%^&*()-=+[{]}\\|;:\",.<>/?"; + const s = this._context.viewModel.getLineContent(e.lineNumber); + const n = PT(t, []); + let r = true; + let o = e.column; + let a = true; + let l = e.column; + let c = 0; + while (c < 50 && (r || a)) { + if (r && o <= 1) { + r = false; + } + if (r) { + const u = s.charCodeAt(o - 2); + if (n.get(u) !== 0) { + r = false; + } else { + o--; + } + } + if (a && l > s.length) { + a = false; + } + if (a) { + const u = s.charCodeAt(l - 1); + if (n.get(u) !== 0) { + a = false; + } else { + l++; + } + } + c++; + } + return [s.substring(o - 1, l - 1), e.column - o]; + } + O(e) { + const t = this._context.viewModel.getLineContent(e.lineNumber); + const s = PT(this._context.configuration.options.get(136), []); + let n = e.column; + let r = 0; + while (n > 1) { + const o = t.charCodeAt(n - 2); + if (s.get(o) !== 0 || r > 50) { + return t.substring(n - 1, e.column - 1); + } + r++; + n--; + } + return t.substring(0, e.column - 1); + } + P(e) { + if (e.column > 1) { + const s = this._context.viewModel.getLineContent(e.lineNumber).charAt(e.column - 2); + if (!jb(s.charCodeAt(0))) { + return s; + } + } + return ""; + } + Q(e) { + this.g = e.get(2); + const t = e.get(3); + if (this.g === 2 && t === r1.accessibilityPageSize.defaultValue) { + this.h = 500; + } else { + this.h = t; + } + const n = e.get(151).wrappingColumn; + if (n !== -1 && this.g !== 1) { + const r = e.get(52); + this.j = true; + this.n = Math.round(n * r.typicalHalfwidthCharacterWidth); + } else { + this.j = false; + this.n = Qat ? 0 : 1; + } + } + onConfigurationChanged(e) { + const t = this._context.configuration.options; + const s = t.get(151); + this.Q(t); + this.s = s.contentLeft; + this.t = s.contentWidth; + this.u = s.height; + this.w = t.get(52); + this.y = t.get(68); + this.z = t.get(38); + this.C = t.get(25); + this.textArea.setAttribute("wrap", this.j && !this.F ? "on" : "off"); + const { + tabSize: n + } = this._context.viewModel.model.getOptions(); + this.textArea.domNode.style.tabSize = `${n * this.w.spaceWidth}px`; + this.textArea.setAttribute("aria-label", a7t(t, this.L)); + this.textArea.setAttribute("aria-required", t.get(5) ? "true" : "false"); + this.textArea.setAttribute("tabindex", String(t.get(129))); + if (e.hasChanged(34) || e.hasChanged(96)) { + this.R(); + } + if (e.hasChanged(2)) { + this.J.writeNativeTextAreaContent("strategy changed"); + } + return true; + } + onCursorStateChanged(e) { + this.G = e.selections.slice(0); + this.H = e.modelSelections.slice(0); + this.J.writeNativeTextAreaContent("selection changed"); + return true; + } + onDecorationsChanged(e) { + return true; + } + onFlushed(e) { + return true; + } + onLinesChanged(e) { + return true; + } + onLinesDeleted(e) { + return true; + } + onLinesInserted(e) { + return true; + } + onScrollChanged(e) { + this.c = e.scrollLeft; + this.f = e.scrollTop; + return true; + } + onZonesChanged(e) { + return true; + } + isFocused() { + return this.J.isFocused(); + } + focus() { + this.J.focusTextArea(); + } + refreshFocusState() { + this.J.refreshFocusState(); + } + getLastRenderData() { + return this.I; + } + setAriaOptions(e) { + if (e.activeDescendant) { + this.textArea.setAttribute("aria-haspopup", "true"); + this.textArea.setAttribute("aria-autocomplete", "list"); + this.textArea.setAttribute("aria-activedescendant", e.activeDescendant); + } else { + this.textArea.setAttribute("aria-haspopup", "false"); + this.textArea.setAttribute("aria-autocomplete", "both"); + this.textArea.removeAttribute("aria-activedescendant"); + } + if (e.role) { + this.textArea.setAttribute("role", e.role); + } + } + R() { + const e = this._context.configuration.options; + if (!Bte.enabled || e.get(34) && e.get(96)) { + this.textArea.setAttribute("readonly", "true"); + } else { + this.textArea.removeAttribute("readonly"); + } + } + prepareRender(e) { + this.S = new je(this.G[0].positionLineNumber, this.G[0].positionColumn); + this.U = e.visibleRangeForPosition(this.S); + this.F?.prepareRender(e); + } + render(e) { + this.J.writeNativeTextAreaContent("render"); + this.W(); + } + W() { + if (this.F) { + const s = this.F.visibleTextareaStart; + const n = this.F.visibleTextareaEnd; + const r = this.F.startPosition; + const o = this.F.endPosition; + if (r && o && s && n && n.left >= this.c && s.left <= this.c + this.t) { + const a = this._context.viewLayout.getVerticalOffsetForLineNumber(this.S.lineNumber) - this.f; + const l = l7t(this.textArea.domNode.value.substr(0, this.textArea.domNode.selectionStart)); + let c = this.F.widthOfHiddenLineTextBefore; + let u = this.s + s.left - this.c; + let d = n.left - s.left + 1; + if (u < this.s) { + const y = this.s - u; + u += y; + c += y; + d -= y; + } + if (d > this.t) { + d = this.t; + } + const h = this._context.viewModel.getViewLineData(r.lineNumber); + const g = h.tokens.findTokenIndexAtOffset(r.column - 1); + const p = h.tokens.findTokenIndexAtOffset(o.column - 1); + const b = g === p; + const v = this.F.definePresentation(b ? h.tokens.getPresentation(g) : null); + this.textArea.domNode.scrollTop = l * this.y; + this.textArea.domNode.scrollLeft = c; + this.Y({ + lastRenderPosition: null, + top: a, + left: u, + width: d, + height: this.y, + useCover: false, + color: (qm.getColorMap() || [])[v.foreground], + italic: v.italic, + bold: v.bold, + underline: v.underline, + strikethrough: v.strikethrough + }); + } + return; + } + if (!this.U) { + this.X(); + return; + } + const e = this.s + this.U.left - this.c; + if (e < this.s || e > this.s + this.t) { + this.X(); + return; + } + const t = this._context.viewLayout.getVerticalOffsetForLineNumber(this.G[0].positionLineNumber) - this.f; + if (t < 0 || t > this.u) { + this.X(); + return; + } + if (Gt || this.g === 2) { + this.Y({ + lastRenderPosition: this.S, + top: t, + left: this.j ? this.s : e, + width: this.n, + height: this.y, + useCover: false + }); + this.textArea.domNode.scrollLeft = this.U.left; + const s = this.J.textAreaState.newlineCountBeforeSelection ?? l7t(this.textArea.domNode.value.substring(0, this.textArea.domNode.selectionStart)); + this.textArea.domNode.scrollTop = s * this.y; + return; + } + this.Y({ + lastRenderPosition: this.S, + top: t, + left: this.j ? this.s : e, + width: this.n, + height: Qat ? 0 : 1, + useCover: false + }); + } + X() { + this.Y({ + lastRenderPosition: null, + top: 0, + left: 0, + width: this.n, + height: Qat ? 0 : 1, + useCover: true + }); + } + Y(e) { + this.I = e.lastRenderPosition; + const t = this.textArea; + const s = this.textAreaCover; + Hm(t, this.w); + t.setTop(e.top); + t.setLeft(e.left); + t.setWidth(e.width); + t.setHeight(e.height); + t.setColor(e.color ? ut.Format.CSS.formatHex(e.color) : ""); + t.setFontStyle(e.italic ? "italic" : ""); + if (e.bold) { + t.setFontWeight("bold"); + } + t.setTextDecoration(`${e.underline ? " underline" : ""}${e.strikethrough ? " line-through" : ""}`); + s.setTop(e.useCover ? e.top : 0); + s.setLeft(e.useCover ? e.left : 0); + s.setWidth(e.useCover ? e.width : 0); + s.setHeight(e.useCover ? e.height : 0); + const n = this._context.configuration.options; + if (n.get(59)) { + s.setClassName("monaco-editor-background textAreaCover " + b9t.OUTER_CLASS_NAME); + } else if (n.get(69).renderType !== 0) { + s.setClassName("monaco-editor-background textAreaCover " + p9t.CLASS_NAME); + } else { + s.setClassName("monaco-editor-background textAreaCover"); + } + } + }; + Zat = __decorate([__param(4, oi), __param(5, re)], Zat); + } +}); +var EKn = ue({ + "out-build/vs/editor/browser/controller/editContext/native/nativeEditContext.css"() {} +}); +function Lpe(i, e, t, s) { + i.addEventListener(e, t, s); + return { + dispose() { + i.removeEventListener(e, t); + } + }; +} +var Oss; +var IKn = ue({ + "out-build/vs/editor/browser/controller/editContext/native/nativeEditContextUtils.js"() { + "use strict"; + + xe(); + q(); + Oss = class extends H { + constructor(i, e) { + super(); + this.b = i; + this.c = e; + this.a = false; + this.D(Ce(this.b, "focus", () => this.f(true))); + this.D(Ce(this.b, "blur", () => this.f(false))); + } + f(i) { + if (this.a !== i) { + this.a = i; + this.c(this.a); + } + } + focus() { + this.f(true); + this.b.focus(); + } + refreshFocusState() { + const i = this.b === js().document.activeElement; + this.f(i); + } + get isFocused() { + return this.a; + } + }; + } +}); +var elt; +var DKn = ue({ + "out-build/vs/editor/browser/controller/editContext/native/screenReaderSupport.js"() { + "use strict"; + + xe(); + X(); + Ho(); + Fi(); + ua(); + s1(); + $ss(); + elt = class { + constructor(e, t, s, n) { + this.l = e; + this.m = t; + this.n = s; + this.o = n; + this.a = 1; + this.b = 1; + this.c = 1; + this.d = 1; + this.g = 1; + this.h = 0; + this.i = new Vs(1, 1, 1, 1); + this.j = null; + this.p(); + this.q(); + } + setIgnoreSelectionChangeTime(e) { + this.h = Date.now(); + } + getIgnoreSelectionChangeTime() { + return this.h; + } + resetSelectionChangeTime() { + this.h = 0; + } + onConfigurationChanged(e) { + this.p(); + this.q(); + if (e.hasChanged(2)) { + this.writeScreenReaderContent(); + } + } + p() { + const e = this.m.configuration.options; + const t = e.get(151); + this.a = t.contentLeft; + this.b = t.contentWidth; + this.c = t.height; + this.f = e.get(52); + this.d = e.get(68); + this.g = e.get(3); + } + q() { + const e = this.m.configuration.options; + this.l.domNode.setAttribute("role", "textbox"); + this.l.domNode.setAttribute("aria-required", e.get(5) ? "true" : "false"); + this.l.domNode.setAttribute("aria-multiline", "true"); + this.l.domNode.setAttribute("aria-autocomplete", e.get(96) ? "none" : "both"); + this.l.domNode.setAttribute("aria-roledescription", f(176, null)); + this.l.domNode.setAttribute("aria-label", a7t(e, this.n)); + const t = this.m.viewModel.model.getOptions().tabSize; + const s = e.get(52).spaceWidth; + this.l.domNode.style.tabSize = `${t * s}px`; + } + onCursorStateChanged(e) { + this.i = e.selections[0] ?? new Vs(1, 1, 1, 1); + } + prepareRender(e) { + this.writeScreenReaderContent(); + this.j = e.visibleRangeForPosition(this.i.getPosition()); + } + render(e) { + if (!this.k) { + return; + } + if (!this.j) { + this.r(); + return; + } + const t = this.m.viewLayout.getCurrentScrollLeft(); + const s = this.a + this.j.left - t; + if (s < this.a || s > this.a + this.b) { + this.r(); + return; + } + const n = this.m.viewLayout.getCurrentScrollTop(); + const r = this.m.viewLayout.getVerticalOffsetForLineNumber(this.i.positionLineNumber) - n; + if (r < 0 || r > this.c) { + this.r(); + return; + } + this.s(r, this.a, this.b, this.d); + this.t(); + } + r() { + this.s(0, 0, this.b, 1); + } + s(e, t, s, n) { + Hm(this.l, this.f); + this.l.setTop(e); + this.l.setLeft(t); + this.l.setWidth(s); + this.l.setHeight(n); + } + t() { + if (!this.k) { + return; + } + const e = this.k.value.substring(0, this.k.selectionStart); + const t = l7t(e); + this.l.domNode.scrollTop = t * this.d; + } + setAriaOptions(e) { + if (e.activeDescendant) { + this.l.setAttribute("aria-haspopup", "true"); + this.l.setAttribute("aria-autocomplete", "list"); + this.l.setAttribute("aria-activedescendant", e.activeDescendant); + } else { + this.l.setAttribute("aria-haspopup", "false"); + this.l.setAttribute("aria-autocomplete", "both"); + this.l.removeAttribute("aria-activedescendant"); + } + if (e.role) { + this.l.setAttribute("role", e.role); + } + } + writeScreenReaderContent() { + const e = js().document.activeElement; + if (!e || e !== this.l.domNode) { + return; + } + if (this.o.isScreenReaderOptimized()) { + this.k = this.u(); + if (this.l.domNode.textContent !== this.k.value) { + this.setIgnoreSelectionChangeTime("setValue"); + this.l.domNode.textContent = this.k.value; + } + this.v(this.k.selectionStart, this.k.selectionEnd); + } else { + this.k = undefined; + this.setIgnoreSelectionChangeTime("setValue"); + this.l.domNode.textContent = ""; + } + } + get screenReaderContentState() { + return this.k; + } + u() { + const e = { + getLineCount: () => this.m.viewModel.getLineCount(), + getLineMaxColumn: t => this.m.viewModel.getLineMaxColumn(t), + getValueInRange: (t, s) => this.m.viewModel.getValueInRange(t, s), + getValueLengthInRange: (t, s) => this.m.viewModel.getValueLengthInRange(t, s), + modifyPosition: (t, s) => this.m.viewModel.modifyPosition(t, s) + }; + return c7t.fromEditorSelection(e, this.i, this.g, this.o.getAccessibilitySupport() === 0); + } + v(e, t) { + const n = js().document.getSelection(); + if (!n) { + return; + } + const r = this.l.domNode.firstChild; + if (!r) { + return; + } + const o = new globalThis.Range(); + o.setStart(r, e); + o.setEnd(r, t); + this.setIgnoreSelectionChangeTime("setRange"); + n.removeAllRanges(); + n.addRange(o); + } + }; + elt = __decorate([__param(2, oi), __param(3, na)], elt); + } +}); +var or; +var j9; +var Nf = ue({ + "out-build/vs/editor/common/core/lineRange.js"() { + "use strict"; + + Ut(); + jp(); + yt(); + qg(); + or = class hI { + static fromRange(e) { + return new hI(e.startLineNumber, e.endLineNumber); + } + static fromRangeInclusive(e) { + return new hI(e.startLineNumber, e.endLineNumber + 1); + } + static subtract(e, t) { + if (t) { + if (e.startLineNumber < t.startLineNumber && t.endLineNumberExclusive < e.endLineNumberExclusive) { + return [new hI(e.startLineNumber, t.startLineNumber), new hI(t.endLineNumberExclusive, e.endLineNumberExclusive)]; + } else if (t.startLineNumber <= e.startLineNumber && e.endLineNumberExclusive <= t.endLineNumberExclusive) { + return []; + } else if (t.endLineNumberExclusive < e.endLineNumberExclusive) { + return [new hI(Math.max(t.endLineNumberExclusive, e.startLineNumber), e.endLineNumberExclusive)]; + } else { + return [new hI(e.startLineNumber, Math.min(t.startLineNumber, e.endLineNumberExclusive))]; + } + } else { + return [e]; + } + } + static joinMany(e) { + if (e.length === 0) { + return []; + } + let t = new j9(e[0].slice()); + for (let s = 1; s < e.length; s++) { + t = t.getUnion(new j9(e[s].slice())); + } + return t.ranges; + } + static join(e) { + if (e.length === 0) { + throw new co("lineRanges cannot be empty"); + } + let t = e[0].startLineNumber; + let s = e[0].endLineNumberExclusive; + for (let n = 1; n < e.length; n++) { + t = Math.min(t, e[n].startLineNumber); + s = Math.max(s, e[n].endLineNumberExclusive); + } + return new hI(t, s); + } + static ofLength(e, t) { + return new hI(e, e + t); + } + static deserialize(e) { + return new hI(e[0], e[1]); + } + constructor(e, t) { + if (e > t) { + throw new co(`startLineNumber ${e} cannot be after endLineNumberExclusive ${t}`); + } + this.startLineNumber = e; + this.endLineNumberExclusive = t; + } + contains(e) { + return this.startLineNumber <= e && e < this.endLineNumberExclusive; + } + get isEmpty() { + return this.startLineNumber === this.endLineNumberExclusive; + } + delta(e) { + return new hI(this.startLineNumber + e, this.endLineNumberExclusive + e); + } + deltaLength(e) { + return new hI(this.startLineNumber, this.endLineNumberExclusive + e); + } + get length() { + return this.endLineNumberExclusive - this.startLineNumber; + } + join(e) { + return new hI(Math.min(this.startLineNumber, e.startLineNumber), Math.max(this.endLineNumberExclusive, e.endLineNumberExclusive)); + } + toString() { + return `[${this.startLineNumber},${this.endLineNumberExclusive})`; + } + intersect(e) { + const t = Math.max(this.startLineNumber, e.startLineNumber); + const s = Math.min(this.endLineNumberExclusive, e.endLineNumberExclusive); + if (t <= s) { + return new hI(t, s); + } + } + intersectsStrict(e) { + return this.startLineNumber < e.endLineNumberExclusive && e.startLineNumber < this.endLineNumberExclusive; + } + overlapOrTouch(e) { + return this.startLineNumber <= e.endLineNumberExclusive && e.startLineNumber <= this.endLineNumberExclusive; + } + equals(e) { + return this.startLineNumber === e.startLineNumber && this.endLineNumberExclusive === e.endLineNumberExclusive; + } + toInclusiveRange() { + if (this.isEmpty) { + return null; + } else { + return new Z(this.startLineNumber, 1, this.endLineNumberExclusive - 1, Number.MAX_SAFE_INTEGER); + } + } + toExclusiveRange() { + return new Z(this.startLineNumber, 1, this.endLineNumberExclusive, 1); + } + mapToLineArray(e) { + const t = []; + for (let s = this.startLineNumber; s < this.endLineNumberExclusive; s++) { + t.push(e(s)); + } + return t; + } + forEach(e) { + for (let t = this.startLineNumber; t < this.endLineNumberExclusive; t++) { + e(t); + } + } + serialize() { + return [this.startLineNumber, this.endLineNumberExclusive]; + } + includes(e) { + return this.startLineNumber <= e && e < this.endLineNumberExclusive; + } + toOffsetRange() { + return new uo(this.startLineNumber - 1, this.endLineNumberExclusive - 1); + } + distanceToRange(e) { + if (this.endLineNumberExclusive <= e.startLineNumber) { + return e.startLineNumber - this.endLineNumberExclusive; + } else if (e.endLineNumberExclusive <= this.startLineNumber) { + return this.startLineNumber - e.endLineNumberExclusive; + } else { + return 0; + } + } + distanceToLine(e) { + if (this.contains(e)) { + return 0; + } else if (e < this.startLineNumber) { + return this.startLineNumber - e; + } else { + return e - this.endLineNumberExclusive; + } + } + addMargin(e, t) { + return new hI(this.startLineNumber - e, this.endLineNumberExclusive + t); + } + }; + j9 = class Dde { + constructor(e = []) { + this.c = e; + } + get ranges() { + return this.c; + } + addRange(e) { + if (e.length === 0) { + return; + } + const t = aM(this.c, n => n.endLineNumberExclusive >= e.startLineNumber); + const s = EZ(this.c, n => n.startLineNumber <= e.endLineNumberExclusive) + 1; + if (t === s) { + this.c.splice(t, 0, e); + } else if (t === s - 1) { + const n = this.c[t]; + this.c[t] = n.join(e); + } else { + const n = this.c[t].join(this.c[s - 1]).join(e); + this.c.splice(t, s - t, n); + } + } + contains(e) { + const t = kZ(this.c, s => s.startLineNumber <= e); + return !!t && t.endLineNumberExclusive > e; + } + intersects(e) { + const t = kZ(this.c, s => s.startLineNumber < e.endLineNumberExclusive); + return !!t && t.endLineNumberExclusive > e.startLineNumber; + } + getUnion(e) { + if (this.c.length === 0) { + return e; + } + if (e.c.length === 0) { + return this; + } + const t = []; + let s = 0; + let n = 0; + let r = null; + while (s < this.c.length || n < e.c.length) { + let o = null; + if (s < this.c.length && n < e.c.length) { + const a = this.c[s]; + const l = e.c[n]; + if (a.startLineNumber < l.startLineNumber) { + o = a; + s++; + } else { + o = l; + n++; + } + } else if (s < this.c.length) { + o = this.c[s]; + s++; + } else { + o = e.c[n]; + n++; + } + if (r === null) { + r = o; + } else if (r.endLineNumberExclusive >= o.startLineNumber) { + r = new or(r.startLineNumber, Math.max(r.endLineNumberExclusive, o.endLineNumberExclusive)); + } else { + t.push(r); + r = o; + } + } + if (r !== null) { + t.push(r); + } + return new Dde(t); + } + subtractFrom(e) { + const t = aM(this.c, o => o.endLineNumberExclusive >= e.startLineNumber); + const s = EZ(this.c, o => o.startLineNumber <= e.endLineNumberExclusive) + 1; + if (t === s) { + return new Dde([e]); + } + const n = []; + let r = e.startLineNumber; + for (let o = t; o < s; o++) { + const a = this.c[o]; + if (a.startLineNumber > r) { + n.push(new or(r, a.startLineNumber)); + } + r = a.endLineNumberExclusive; + } + if (r < e.endLineNumberExclusive) { + n.push(new or(r, e.endLineNumberExclusive)); + } + return new Dde(n); + } + toString() { + return this.c.map(e => e.toString()).join(", "); + } + getIntersection(e) { + const t = []; + let s = 0; + let n = 0; + while (s < this.c.length && n < e.c.length) { + const r = this.c[s]; + const o = e.c[n]; + const a = r.intersect(o); + if (a && !a.isEmpty) { + t.push(a); + } + if (r.endLineNumberExclusive < o.endLineNumberExclusive) { + s++; + } else { + n++; + } + } + return new Dde(t); + } + getWithDelta(e) { + return new Dde(this.c.map(t => t.delta(e))); + } + }; + } +}); +var qv; +var TM = ue({ + "out-build/vs/editor/common/core/textLength.js"() { + "use strict"; + + Nf(); + Rs(); + yt(); + qv = class tM { + static { + this.zero = new tM(0, 0); + } + static lengthDiffNonNegative(e, t) { + if (t.isLessThan(e)) { + return tM.zero; + } else if (e.lineCount === t.lineCount) { + return new tM(0, t.columnCount - e.columnCount); + } else { + return new tM(t.lineCount - e.lineCount, t.columnCount); + } + } + static betweenPositions(e, t) { + if (e.lineNumber === t.lineNumber) { + return new tM(0, t.column - e.column); + } else { + return new tM(t.lineNumber - e.lineNumber, t.column - 1); + } + } + static fromPosition(e) { + return new tM(e.lineNumber - 1, e.column - 1); + } + static ofRange(e) { + return tM.betweenPositions(e.getStartPosition(), e.getEndPosition()); + } + static ofText(e) { + let t = 0; + let s = 0; + for (const n of e) { + if (n === ` +`) { + t++; + s = 0; + } else { + s++; + } + } + return new tM(t, s); + } + constructor(e, t) { + this.lineCount = e; + this.columnCount = t; + } + isZero() { + return this.lineCount === 0 && this.columnCount === 0; + } + isLessThan(e) { + if (this.lineCount !== e.lineCount) { + return this.lineCount < e.lineCount; + } else { + return this.columnCount < e.columnCount; + } + } + isGreaterThan(e) { + if (this.lineCount !== e.lineCount) { + return this.lineCount > e.lineCount; + } else { + return this.columnCount > e.columnCount; + } + } + isGreaterThanOrEqualTo(e) { + if (this.lineCount !== e.lineCount) { + return this.lineCount > e.lineCount; + } else { + return this.columnCount >= e.columnCount; + } + } + equals(e) { + return this.lineCount === e.lineCount && this.columnCount === e.columnCount; + } + compare(e) { + if (this.lineCount !== e.lineCount) { + return this.lineCount - e.lineCount; + } else { + return this.columnCount - e.columnCount; + } + } + add(e) { + if (e.lineCount === 0) { + return new tM(this.lineCount, this.columnCount + e.columnCount); + } else { + return new tM(this.lineCount + e.lineCount, e.columnCount); + } + } + createRange(e) { + if (this.lineCount === 0) { + return new Z(e.lineNumber, e.column, e.lineNumber, e.column + this.columnCount); + } else { + return new Z(e.lineNumber, e.column, e.lineNumber + this.lineCount, this.columnCount + 1); + } + } + toRange() { + return new Z(1, 1, this.lineCount + 1, this.columnCount + 1); + } + toLineRange() { + return or.ofLength(1, this.lineCount); + } + addToPosition(e) { + if (this.lineCount === 0) { + return new je(e.lineNumber, e.column + this.columnCount); + } else { + return new je(e.lineNumber + this.lineCount, this.columnCount + 1); + } + } + addToRange(e) { + return Z.fromPositions(this.addToPosition(e.getStartPosition()), this.addToPosition(e.getEndPosition())); + } + toString() { + return `${this.lineCount},${this.columnCount}`; + } + }; + } +}); +var Rpe; +var _ss = ue({ + "out-build/vs/editor/common/core/positionToOffset.js"() { + "use strict"; + + qg(); + jp(); + Rs(); + yt(); + TM(); + Rpe = class { + constructor(i) { + this.text = i; + this.a = []; + this.b = []; + this.a.push(0); + for (let e = 0; e < i.length; e++) { + if (i.charAt(e) === ` +`) { + this.a.push(e + 1); + if (e > 0 && i.charAt(e - 1) === "\r") { + this.b.push(e - 1); + } else { + this.b.push(e); + } + } + } + this.b.push(i.length); + } + getOffset(i) { + return this.a[i.lineNumber - 1] + i.column - 1; + } + getOffsetRange(i) { + return new uo(this.getOffset(i.getStartPosition()), this.getOffset(i.getEndPosition())); + } + getPosition(i) { + const e = EZ(this.a, n => n <= i); + const t = e + 1; + const s = i - this.a[e] + 1; + return new je(t, s); + } + getRange(i) { + return Z.fromPositions(this.getPosition(i.start), this.getPosition(i.endExclusive)); + } + getTextLength(i) { + return qv.ofRange(this.getRange(i)); + } + get textLength() { + const i = this.a.length - 1; + return new qv(i, this.text.length - this.a[i]); + } + getLineLength(i) { + return this.b[i - 1] - this.a[i - 1]; + } + }; + } +}); +var tlt; +var Bss = ue({ + "out-build/vs/editor/browser/controller/editContext/native/editContextFactory.js"() { + "use strict"; + + (function (i) { + function e(s) { + return typeof s?.EditContext == "function"; + } + i.supported = e; + function t(s, n) { + return new s.EditContext(n); + } + i.create = t; + })(tlt ||= {}); + } +}); +var Uss; +var u7t; +var Wss = ue({ + "out-build/vs/editor/browser/controller/editContext/native/nativeEditContextRegistry.js"() { + "use strict"; + + Uss = class { + constructor() { + this.a = new Map(); + } + register(i, e) { + this.a.set(i, e); + return { + dispose: () => { + this.a.delete(i); + } + }; + } + get(i) { + return this.a.get(i); + } + }; + u7t = new Uss(); + } +}); +var Npe; +var Mpe; +var TKn = ue({ + "out-build/vs/editor/browser/controller/editContext/native/nativeEditContext.js"() { + "use strict"; + + EKn(); + hc(); + xe(); + pf(); + _a(); + te(); + dpe(); + Ass(); + IKn(); + DKn(); + yt(); + ua(); + Rs(); + _ss(); + q(); + Bss(); + Ho(); + Wss(); + (function (i) { + i.NONE = "edit-context-composition-none"; + i.SECONDARY = "edit-context-composition-secondary"; + i.PRIMARY = "edit-context-composition-primary"; + })(Npe ||= {}); + Mpe = class extends o7t { + constructor(e, t, s, n, r, o, a) { + super(t); + this.y = r; + this.z = a; + this.g = []; + this.h = new Vs(1, 1, 1, 1); + this.j = new je(1, 1); + this.n = -1; + this.s = 0; + this.t = 0; + this.domNode = new Mw(document.createElement("div")); + this.domNode.setClassName("native-edit-context"); + this.textArea = new Mw(document.createElement("textarea")); + this.textArea.setClassName("native-edit-context-textarea"); + this.C(); + s.appendChild(this.domNode); + s.appendChild(this.textArea); + this.c = s.domNode; + this.w = this.D(new ki()); + this.u = this.D(new Oss(this.domNode.domNode, c => { + if (c) { + this.w.value = this.O(n); + this.b.setIgnoreSelectionChangeTime("onFocus"); + } else { + this.w.value = undefined; + } + this._context.viewModel.setHasFocus(c); + })); + const l = Kt(this.domNode.domNode); + this.a = tlt.create(l); + this.setEditContextOnDomNode(); + this.b = o.createInstance(elt, this.domNode, t); + this.D(Ce(this.domNode.domNode, "copy", c => this.N(c))); + this.D(Ce(this.domNode.domNode, "cut", c => { + this.b.setIgnoreSelectionChangeTime("onCut"); + this.N(c); + n.cut(); + })); + this.D(Ce(this.domNode.domNode, "keyup", c => n.emitKeyUp(new wr(c)))); + this.D(Ce(this.domNode.domNode, "keydown", async c => { + const u = new wr(c); + if (u.keyCode === 114) { + u.stopPropagation(); + } + n.emitKeyDown(u); + })); + this.D(Ce(this.domNode.domNode, "beforeinput", async c => { + if (c.inputType === "insertParagraph" || c.inputType === "insertLineBreak") { + this.H(n, { + text: ` +`, + replacePrevCharCnt: 0, + replaceNextCharCnt: 0, + positionDelta: 0 + }); + } + })); + this.D(Lpe(this.a, "textformatupdate", c => this.J(c))); + this.D(Lpe(this.a, "characterboundsupdate", c => this.M(c))); + this.D(Lpe(this.a, "textupdate", c => { + this.G(n, c); + })); + this.D(Lpe(this.a, "compositionstart", c => { + n.compositionStart(); + this._context.viewModel.onCompositionStart(); + })); + this.D(Lpe(this.a, "compositionend", c => { + n.compositionEnd(); + this._context.viewModel.onCompositionEnd(); + })); + this.D(Ce(this.textArea.domNode, "paste", c => { + this.b.setIgnoreSelectionChangeTime("onPaste"); + c.preventDefault(); + if (!c.clipboardData) { + return; + } + let [u, d] = dte.getTextData(c.clipboardData); + if (!u) { + return; + } + d = d || ute.INSTANCE.get(u); + let h = false; + let g = null; + let p = null; + if (d) { + h = this._context.configuration.options.get(38) && !!d.isFromEmptySelection; + g = typeof d.multicursorText !== "undefined" ? d.multicursorText : null; + p = d.mode; + } + n.paste(u, h, g, p); + })); + this.D(u7t.register(e, this)); + } + dispose() { + this.domNode.domNode.blur(); + this.domNode.domNode.remove(); + this.textArea.domNode.remove(); + super.dispose(); + } + setAriaOptions(e) { + this.b.setAriaOptions(e); + } + getLastRenderData() { + return this.h.getPosition(); + } + prepareRender(e) { + this.b.prepareRender(e); + this.F(); + this.L(e); + } + render(e) { + this.b.render(e); + } + onCursorStateChanged(e) { + this.h = e.modelSelections[0] ?? new Vs(1, 1, 1, 1); + this.b.onCursorStateChanged(e); + return true; + } + onConfigurationChanged(e) { + this.b.onConfigurationChanged(e); + this.C(); + return true; + } + onDecorationsChanged(e) { + return true; + } + onFlushed(e) { + return true; + } + onLinesChanged(e) { + return true; + } + onLinesDeleted(e) { + return true; + } + onLinesInserted(e) { + return true; + } + onScrollChanged(e) { + this.t = e.scrollLeft; + this.s = e.scrollTop; + return true; + } + onZonesChanged(e) { + return true; + } + onWillPaste() { + this.b.setIgnoreSelectionChangeTime("onWillPaste"); + } + writeScreenReaderContent() { + this.b.writeScreenReaderContent(); + } + isFocused() { + return this.u.isFocused || js().document.activeElement === this.textArea.domNode; + } + focus() { + this.u.focus(); + this.refreshFocusState(); + } + refreshFocusState() { + this.u.refreshFocusState(); + } + setEditContextOnDomNode() { + const e = Kt(this.domNode.domNode); + const t = yx(e); + if (this.n !== t) { + this.domNode.domNode.editContext = this.a; + this.n = t; + } + } + C() { + const e = this._context.configuration.options; + this.domNode.domNode.setAttribute("tabindex", String(e.get(129))); + } + F() { + const e = this.I(); + this.a.updateText(0, Number.MAX_SAFE_INTEGER, e.text); + this.a.updateSelection(e.selectionStartOffset, e.selectionEndOffset); + this.j = e.textStartPositionWithinEditor; + } + G(e, t) { + if (!this.a) { + return; + } + const s = this._context.viewModel.model; + const n = s.getOffsetAt(this.j); + const r = s.getOffsetAt(this.h.getEndPosition()); + const o = s.getOffsetAt(this.h.getStartPosition()); + const a = r - n; + const l = o - n; + let c = 0; + let u = 0; + if (t.updateRangeEnd > a) { + c = t.updateRangeEnd - a; + } + if (t.updateRangeStart < l) { + u = l - t.updateRangeStart; + } + let d = ""; + if (l < t.updateRangeStart) { + d += this.a.text.substring(l, t.updateRangeStart); + } + d += t.text; + if (a > t.updateRangeEnd) { + d += this.a.text.substring(t.updateRangeEnd, a); + } + let h = 0; + if (t.selectionStart === t.selectionEnd && l === a) { + h = t.selectionStart - (t.updateRangeStart + t.text.length); + } + const g = { + text: d, + replacePrevCharCnt: u, + replaceNextCharCnt: c, + positionDelta: h + }; + this.H(e, g); + this.F(); + } + H(e, t) { + if (t.replacePrevCharCnt || t.replaceNextCharCnt || t.positionDelta) { + e.compositionType(t.text, t.replacePrevCharCnt, t.replaceNextCharCnt, t.positionDelta); + } else { + e.type(t.text); + } + } + I() { + const e = this._context.viewModel.model; + const t = this.h.startLineNumber; + const s = this.h.endLineNumber; + const n = e.getLineMaxColumn(s); + const r = new Z(t, 1, s, n); + const o = e.getValueInRange(r, 0); + const a = this.h.startColumn - 1; + const l = o.length + this.h.endColumn - n; + const c = r.getStartPosition(); + return { + text: o, + selectionStartOffset: a, + selectionEndOffset: l, + textStartPositionWithinEditor: c + }; + } + J(e) { + if (!this.a) { + return; + } + const t = e.getTextFormats(); + const s = this.j; + const n = []; + t.forEach(r => { + const o = this._context.viewModel.model; + const a = o.getOffsetAt(s); + const l = o.getPositionAt(a + r.rangeStart); + const c = o.getPositionAt(a + r.rangeEnd); + const u = Z.fromPositions(l, c); + const d = r.underlineThickness.toLowerCase(); + let h = Npe.NONE; + switch (d) { + case "thin": + h = Npe.SECONDARY; + break; + case "thick": + h = Npe.PRIMARY; + break; + } + n.push({ + range: u, + options: { + description: "textFormatDecoration", + inlineClassName: h + } + }); + }); + this.g = this._context.viewModel.model.deltaDecorations(this.g, n); + } + L(e) { + if (!this.c) { + return; + } + const t = this._context.configuration.options; + const s = t.get(68); + const n = t.get(151).contentLeft; + const r = this.c.getBoundingClientRect(); + const o = this.h.getStartPosition(); + const a = this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(o); + const l = this._context.viewLayout.getVerticalOffsetForLineNumber(a.lineNumber); + const c = r.top + l - this.s; + const u = (this.h.endLineNumber - this.h.startLineNumber + 1) * s; + let d = r.left + n - this.t; + let h; + if (this.h.isEmpty()) { + const p = e.visibleRangeForPosition(a); + if (p) { + d += p.left; + } + h = 0; + } else { + h = r.width - n; + } + const g = new DOMRect(d, c, h, u); + this.a.updateSelectionBounds(g); + this.a.updateControlBounds(g); + } + M(e) { + if (!this.c) { + return; + } + const t = this._context.configuration.options; + const s = t.get(52).typicalHalfwidthCharacterWidth; + const n = t.get(68); + const r = t.get(151).contentLeft; + const o = this.c.getBoundingClientRect(); + const a = []; + const l = new Rpe(this.a.text); + for (let c = e.rangeStart; c < e.rangeEnd; c++) { + const u = l.getPosition(c); + const d = this.j.lineNumber - 1; + const h = new je(d + u.lineNumber, u.column); + const g = h.delta(0, 1); + const p = Z.fromPositions(h, g); + const b = this._context.viewModel.coordinatesConverter.convertModelRangeToViewRange(p); + const v = this.y.linesVisibleRangesForRange(b, true) ?? []; + const y = this._context.viewLayout.getVerticalOffsetForLineNumber(b.startLineNumber); + const w = o.top + y - this.s; + let C = 0; + let S = s; + if (v.length > 0) { + for (const x of v[0].ranges) { + C = x.left; + S = x.width; + break; + } + } + a.push(new DOMRect(o.left + r + C - this.t, w, S, n)); + } + this.a.updateCharacterBounds(e.rangeStart, a); + } + N(e) { + const t = this._context.configuration.options; + const s = t.get(38); + const n = t.get(25); + const r = this._context.viewModel.getCursorStates().map(l => l.modelState.selection); + const o = hes(this._context.viewModel, r, s, n); + const a = { + version: 1, + isFromEmptySelection: o.isFromEmptySelection, + multicursorText: o.multicursorText, + mode: o.mode + }; + ute.INSTANCE.set(Bv ? o.text.replace(/\r\n/g, ` +`) : o.text, a); + e.preventDefault(); + if (e.clipboardData) { + dte.setTextData(e.clipboardData, o.text, o.html, a); + } + } + O(e) { + let t = 0; + return Ce(this.domNode.domNode.ownerDocument, "selectionchange", () => { + const s = this.z.isScreenReaderOptimized(); + if (!this.isFocused() || !s) { + return; + } + const n = this.b.screenReaderContentState; + if (!n) { + return; + } + const r = Date.now(); + const o = r - t; + t = r; + if (o < 5) { + return; + } + const a = r - this.b.getIgnoreSelectionChangeTime(); + this.b.resetSelectionChangeTime(); + if (a < 100) { + return; + } + const c = js().document.getSelection(); + if (!c || c.rangeCount === 0) { + return; + } + const d = c.getRangeAt(0); + const h = this._context.viewModel; + const g = h.model; + const b = h.coordinatesConverter.convertViewPositionToModelPosition(n.startPositionWithinEditor); + const v = g.getOffsetAt(b); + let y = d.startOffset + v; + let w = d.endOffset + v; + if (g.getEndOfLineSequence() === 1) { + const E = n.value; + const D = new Rpe(E); + const P = D.getPosition(d.startOffset); + const R = D.getPosition(d.endOffset); + y += P.lineNumber - 1; + w += R.lineNumber - 1; + } + const S = g.getPositionAt(y); + const x = g.getPositionAt(w); + const k = Vs.fromPositions(S, x); + e.setSelection(k); + }); + } + }; + Mpe = __decorate([__param(5, re), __param(6, na)], Mpe); + } +}); +var Vss; +var PKn = ue({ + "out-build/vs/editor/browser/viewParts/rulersGpu/rulersGpu.js"() { + "use strict"; + + Ow(); + Zo(); + z0(); + An(); + Vss = class extends YC { + constructor(i, e) { + super(i); + this.f = e; + this.c = []; + this.D(Dn(t => this.h(t))); + } + onConfigurationChanged(i) { + this.h(undefined); + return true; + } + prepareRender(i) {} + render(i) {} + h(i) { + const e = this._context.configuration.options; + const t = e.get(107); + const s = e.get(52).typicalHalfwidthCharacterWidth; + const n = this.f.devicePixelRatio.read(i); + for (let r = 0, o = t.length; r < o; r++) { + const a = t[r]; + const l = this.c[r]; + const c = a.color ? ut.fromHex(a.color) : this._context.theme.getColor(Ges) ?? ut.white; + const u = [a.column * s * n, 0, Math.max(1, Math.ceil(n)), Number.MAX_SAFE_INTEGER, c.rgba.r / 255, c.rgba.g / 255, c.rgba.b / 255, c.rgba.a]; + if (l) { + l.setRaw(u); + } else { + this.c[r] = this.f.rectangleRenderer.register(...u); + } + } + while (this.c.length > t.length) { + this.c.splice(-1, 1)[0].dispose(); + } + } + }; + } +}); +var LKn = ue({ + "out-build/vs/editor/browser/viewParts/gpuMark/gpuMark.css"() {} +}); +var Hss; +var RKn = ue({ + "out-build/vs/editor/browser/viewParts/gpuMark/gpuMark.js"() { + "use strict"; + + _9(); + m9t(); + LKn(); + Hss = class KFn extends m4 { + static { + this.CLASS_NAME = "gpu-mark"; + } + constructor(e, t) { + super(); + this.c = t; + this.a = e; + this.b = null; + this.a.addEventHandler(this); + } + dispose() { + this.a.removeEventHandler(this); + this.b = null; + super.dispose(); + } + onConfigurationChanged(e) { + return true; + } + onCursorStateChanged(e) { + return true; + } + onFlushed(e) { + return true; + } + onLinesChanged(e) { + return true; + } + onLinesDeleted(e) { + return true; + } + onLinesInserted(e) { + return true; + } + onScrollChanged(e) { + return e.scrollTopChanged; + } + onZonesChanged(e) { + return true; + } + onDecorationsChanged(e) { + return true; + } + prepareRender(e) { + const t = e.visibleRange.startLineNumber; + const s = e.visibleRange.endLineNumber; + const n = e.viewportData; + const r = new ppe(this.a.configuration, this.a.theme.type); + const o = []; + for (let a = t; a <= s; a++) { + const l = a - t; + const c = this.c.canRenderDetailed(r, n, a); + o[l] = c.length ? `
` : ""; + } + this.b = o; + } + render(e, t) { + if (!this.b) { + return ""; + } + const s = t - e; + if (s < 0 || s >= this.b.length) { + return ""; + } else { + return this.b[s]; + } + } + }; + } +}); +function z9(i) { + try { + return i(); + } catch (e) { + xs(e); + return null; + } +} +var ilt; +var qss; +var NKn = ue({ + "out-build/vs/editor/browser/view.js"() { + "use strict"; + + xe(); + pf(); + B8t(); + Ut(); + GZi(); + wJn(); + ate(); + CJn(); + SJn(); + Ow(); + Ees(); + kJn(); + EJn(); + UJn(); + VJn(); + HJn(); + u9t(); + GJn(); + Uts(); + ZJn(); + tGn(); + zts(); + nGn(); + dGn(); + fGn(); + gGn(); + pGn(); + bGn(); + yGn(); + xGn(); + IGn(); + TGn(); + LGn(); + Rs(); + yt(); + ua(); + gc(); + Mj(); + RGn(); + MGn(); + te(); + gi(); + Yat(); + CKn(); + kKn(); + TKn(); + PKn(); + Bss(); + RKn(); + ilt = class extends A9 { + constructor(e, t, s, n, r, o, a, l) { + super(); + this.N = l; + this.J = false; + this.M = e; + this.h = [new Vs(1, 1, 1, 1)]; + this.L = null; + this.I = nc(document.createElement("div")); + JL.write(this.I, 3); + this.I.setClassName("overflow-guard"); + this.z = new wes(s, r, o, t); + this.f = new qis(s, n, r); + this.f.addEventHandler(this); + this.y = []; + this.C = this.f.configuration.options.get(37); + this.F = this.O(this.C); + this.y.push(this.F); + this.H = nc(document.createElement("div")); + this.H.setClassName("lines-content monaco-editor-background"); + this.H.setPosition("absolute"); + this.domNode = nc(document.createElement("div")); + this.domNode.setClassName(this.W()); + this.domNode.setAttribute("role", "code"); + if (this.f.configuration.options.get(39) === "on") { + this.g = this.N.createInstance(DM, this.f); + } + this.c = new mts(this.f, this.H, this.domNode, this.I); + this.y.push(this.c); + this.j = new qts(this.f, this.g, this.H); + if (this.g) { + this.n = this.N.createInstance(Xat, this.f, this.g); + } + this.r = new Uis(this.f); + this.y.push(this.r); + const c = new Tis(this.f); + this.y.push(c); + const u = new Ais(this.f); + this.y.push(u); + const d = new xes(this.f); + this.y.push(d); + d.addDynamicOverlay(new fts(this.f)); + d.addDynamicOverlay(new _is(this.f)); + d.addDynamicOverlay(new Bts(this.f)); + d.addDynamicOverlay(new pts(this.f)); + d.addDynamicOverlay(new Wis(this.f)); + const h = new kes(this.f); + this.y.push(h); + h.addDynamicOverlay(new gts(this.f)); + h.addDynamicOverlay(new Jts(this.f)); + h.addDynamicOverlay(new jts(this.f)); + h.addDynamicOverlay(new p9t(this.f)); + if (this.g) { + h.addDynamicOverlay(new Hss(this.f, this.g)); + } + this.u = new Rts(this.f); + this.y.push(this.u); + const g = new b9t(this.f); + g.getDomNode().appendChild(this.r.marginDomNode); + g.getDomNode().appendChild(h.getDomNode()); + g.getDomNode().appendChild(this.u.domNode); + this.y.push(g); + this.s = new Des(this.f, this.domNode); + this.y.push(this.s); + this.w = new Bis(this.f); + this.y.push(this.w); + this.t = new xis(this.f, this.domNode); + this.y.push(this.t); + const p = this.g ? new Vss(this.f, this.g) : new Mis(this.f); + this.y.push(p); + const b = new Ies(this.f); + this.y.push(b); + const v = new Cis(this.f); + this.y.push(v); + if (c) { + const y = this.c.getOverviewRulerLayoutInfo(); + y.parent.insertBefore(c.getDomNode(), y.insertBefore); + } + this.H.appendChild(d.getDomNode()); + if ("domNode" in p) { + this.H.appendChild(p.domNode); + } + this.H.appendChild(this.r.domNode); + this.H.appendChild(this.j.getDomNode()); + this.H.appendChild(this.s.domNode); + this.H.appendChild(this.w.getDomNode()); + this.I.appendChild(g.getDomNode()); + this.I.appendChild(this.c.getDomNode()); + if (this.g) { + this.I.appendChild(this.g.canvas); + } + this.I.appendChild(u.getDomNode()); + this.I.appendChild(this.t.getDomNode()); + this.I.appendChild(v.getDomNode()); + this.I.appendChild(b.domNode); + this.domNode.appendChild(this.I); + if (a) { + a.appendChild(this.s.overflowingContentWidgetsDomNode.domNode); + a.appendChild(this.t.overflowingOverlayWidgetsDomNode.domNode); + } else { + this.domNode.appendChild(this.s.overflowingContentWidgetsDomNode); + this.domNode.appendChild(this.t.overflowingOverlayWidgetsDomNode); + } + this.U(); + this.G = this.D(new yes(this.f, this.z, this.R())); + } + O(e) { + const t = Kt(this.I.domNode); + const s = tlt.supported(t); + if (e && s) { + return this.N.createInstance(Mpe, this.M, this.f, this.I, this.z, this.S()); + } else { + return this.N.createInstance(Zat, this.f, this.I, this.z, this.S()); + } + } + P() { + const e = this.f.configuration.options.get(37); + if (this.C === e) { + return; + } + this.C = e; + const t = this.F.isFocused(); + const s = this.y.indexOf(this.F); + this.F.dispose(); + this.F = this.O(e); + if (t) { + this.F.focus(); + } + if (s !== -1) { + this.y.splice(s, 1, this.F); + } + } + Q() { + const e = this.f.viewModel.model; + const t = this.f.viewModel.glyphLanes; + let s = []; + let n = 0; + s = s.concat(e.getAllMarginDecorations().map(r => { + const o = r.options.glyphMargin?.position ?? Dx.Center; + n = Math.max(n, r.range.endLineNumber); + return { + range: r.range, + lane: o, + persist: r.options.glyphMargin?.persistLane + }; + })); + s = s.concat(this.u.getWidgets().map(r => { + const o = e.validateRange(r.preference.range); + n = Math.max(n, o.endLineNumber); + return { + range: o, + lane: r.preference.lane + }; + })); + s.sort((r, o) => Z.compareRangesUsingStarts(r.range, o.range)); + t.reset(n); + for (const r of s) { + t.push(r.lane, r.range, r.persist); + } + return t; + } + R() { + return { + viewDomNode: this.domNode.domNode, + linesContentDomNode: this.H.domNode, + viewLinesDomNode: this.j.getDomNode().domNode, + viewLinesGpu: this.n, + focusTextArea: () => { + this.focus(); + }, + dispatchTextAreaEvent: e => { + this.F.domNode.domNode.dispatchEvent(e); + }, + getLastRenderData: () => { + const e = this.w.getLastRenderData() || []; + const t = this.F.getLastRenderData(); + return new qZi(e, t); + }, + renderNow: () => { + this.render(true, false); + }, + shouldSuppressMouseDownOnViewZone: e => this.r.shouldSuppressMouseDownOnViewZone(e), + shouldSuppressMouseDownOnWidget: e => this.s.shouldSuppressMouseDownOnWidget(e), + getPositionFromDOMInfo: (e, t) => { + this.Y(); + return this.j.getPositionFromDOMInfo(e, t); + }, + visibleRangeForPosition: (e, t) => { + this.Y(); + const s = new je(e, t); + return this.j.visibleRangeForPosition(s) ?? this.n?.visibleRangeForPosition(s) ?? null; + }, + getLineWidth: e => { + this.Y(); + if (this.n) { + const t = this.n.getLineWidth(e); + if (t !== undefined) { + return t; + } + } + return this.j.getLineWidth(e); + } + }; + } + S() { + return { + visibleRangeForPosition: e => { + this.Y(); + return this.j.visibleRangeForPosition(e); + }, + linesVisibleRangesForRange: (e, t) => { + this.Y(); + return this.j.linesVisibleRangesForRange(e, t); + } + }; + } + U() { + const t = this.f.configuration.options.get(151); + this.domNode.setWidth(t.width); + this.domNode.setHeight(t.height); + this.I.setWidth(t.width); + this.I.setHeight(t.height); + this.H.setWidth(16777216); + this.H.setHeight(16777216); + } + W() { + const e = this.F.isFocused() ? " focused" : ""; + return this.f.configuration.options.get(148) + " " + hpe(this.f.theme.type) + e; + } + handleEvents(e) { + super.handleEvents(e); + this.X(); + } + onConfigurationChanged(e) { + this.domNode.setClassName(this.W()); + this.P(); + this.U(); + return false; + } + onCursorStateChanged(e) { + this.h = e.selections; + return false; + } + onDecorationsChanged(e) { + if (e.affectsGlyphMargin) { + this.J = true; + } + return false; + } + onFocusChanged(e) { + this.domNode.setClassName(this.W()); + return false; + } + onThemeChanged(e) { + this.f.theme.update(e.theme); + this.domNode.setClassName(this.W()); + return false; + } + dispose() { + if (this.L !== null) { + this.L.dispose(); + this.L = null; + } + this.s.overflowingContentWidgetsDomNode.domNode.remove(); + this.t.overflowingOverlayWidgetsDomNode.domNode.remove(); + this.f.removeEventHandler(this); + this.g?.dispose(); + this.j.dispose(); + this.n?.dispose(); + for (const e of this.y) { + e.dispose(); + } + super.dispose(); + } + X() { + if (this.B.isDisposed) { + throw new co(); + } + if (this.L === null) { + if (this.F instanceof Mpe) { + this.F.setEditContextOnDomNode(); + } + const e = this.$(); + this.L = qss.INSTANCE.scheduleCoordinatedRendering({ + window: Kt(this.domNode?.domNode), + prepareRenderText: () => { + if (this.B.isDisposed) { + throw new co(); + } + try { + return e.prepareRenderText(); + } finally { + this.L = null; + } + }, + renderText: () => { + if (this.B.isDisposed) { + throw new co(); + } + return e.renderText(); + }, + prepareRender: (t, s) => { + if (this.B.isDisposed) { + throw new co(); + } + return e.prepareRender(t, s); + }, + render: (t, s) => { + if (this.B.isDisposed) { + throw new co(); + } + return e.render(t, s); + } + }); + } + } + Y() { + const e = this.$(); + z9(() => e.prepareRenderText()); + const t = z9(() => e.renderText()); + if (t) { + const [s, n] = t; + z9(() => e.prepareRender(s, n)); + z9(() => e.render(s, n)); + } + } + Z() { + const e = []; + let t = 0; + for (const s of this.y) { + if (s.shouldRender()) { + e[t++] = s; + } + } + return e; + } + $() { + return { + prepareRenderText: () => { + if (this.J) { + this.J = false; + const e = this.Q(); + this.f.configuration.setGlyphMarginDecorationLaneCount(e.requiredLanes); + } + i4.onRenderStart(); + }, + renderText: () => { + if (!this.domNode.domNode.isConnected) { + return null; + } + let e = this.Z(); + if (!this.j.shouldRender() && e.length === 0) { + return null; + } + const t = this.f.viewLayout.getLinesViewportData(); + this.f.viewModel.setViewport(t.startLineNumber, t.endLineNumber, t.centeredLineNumber); + const s = new Vis(this.h, t, this.f.viewLayout.getWhitespaceViewportData(), this.f.viewModel); + if (this.s.shouldRender()) { + this.s.onBeforeRender(s); + } + if (this.j.shouldRender()) { + this.j.renderText(s); + this.j.onDidRender(); + e = this.Z(); + } + if (this.n?.shouldRender()) { + this.n.renderText(s); + this.n.onDidRender(); + } + return [e, new PZi(this.f.viewLayout, s, this.j, this.n)]; + }, + prepareRender: (e, t) => { + for (const s of e) { + s.prepareRender(t); + } + }, + render: (e, t) => { + for (const s of e) { + s.render(t); + s.onDidRender(); + } + } + }; + } + delegateVerticalScrollbarPointerDown(e) { + this.c.delegateVerticalScrollbarPointerDown(e); + } + delegateScrollFromMouseWheelEvent(e) { + this.c.delegateScrollFromMouseWheelEvent(e); + } + restoreState(e) { + this.f.viewModel.viewLayout.setScrollPosition({ + scrollTop: e.scrollTop, + scrollLeft: e.scrollLeft + }, 1); + this.f.viewModel.visibleLinesStabilized(); + } + getOffsetForColumn(e, t) { + const s = this.f.viewModel.model.validatePosition({ + lineNumber: e, + column: t + }); + const n = this.f.viewModel.coordinatesConverter.convertModelPositionToViewPosition(s); + this.Y(); + const r = this.j.visibleRangeForPosition(new je(n.lineNumber, n.column)); + if (r) { + return r.left; + } else { + return -1; + } + } + getTargetAtClientPoint(e, t) { + const s = this.G.getTargetAtClientPoint(e, t); + if (s) { + return j3t.convertViewToModelMouseTarget(s, this.f.viewModel.coordinatesConverter); + } else { + return null; + } + } + createOverviewRuler(e) { + return new Nis(this.f, e); + } + change(e) { + this.r.changeViewZones(e); + this.X(); + } + render(e, t) { + if (t) { + this.j.forceShouldRender(); + for (const s of this.y) { + s.forceShouldRender(); + } + } + if (e) { + this.Y(); + } else { + this.X(); + } + } + writeScreenReaderContent(e) { + this.F.writeScreenReaderContent(e); + } + focus() { + this.F.focus(); + } + isFocused() { + return this.F.isFocused(); + } + refreshFocusState() { + this.F.refreshFocusState(); + } + setAriaOptions(e) { + this.F.setAriaOptions(e); + } + addContentWidget(e) { + this.s.addWidget(e.widget); + this.layoutContentWidget(e); + this.X(); + } + layoutContentWidget(e) { + this.s.setWidgetPosition(e.widget, e.position?.position ?? null, e.position?.secondaryPosition ?? null, e.position?.preference ?? null, e.position?.positionAffinity ?? null); + this.X(); + } + removeContentWidget(e) { + this.s.removeWidget(e.widget); + this.X(); + } + addOverlayWidget(e) { + this.t.addWidget(e.widget); + this.layoutOverlayWidget(e); + this.X(); + } + layoutOverlayWidget(e) { + if (this.t.setWidgetPosition(e.widget, e.position)) { + this.X(); + } + } + removeOverlayWidget(e) { + this.t.removeWidget(e.widget); + this.X(); + } + addGlyphMarginWidget(e) { + this.u.addWidget(e.widget); + this.J = true; + this.X(); + } + layoutGlyphMarginWidget(e) { + const t = e.position; + if (this.u.setWidgetPosition(e.widget, t)) { + this.J = true; + this.X(); + } + } + removeGlyphMarginWidget(e) { + this.u.removeWidget(e.widget); + this.J = true; + this.X(); + } + }; + ilt = __decorate([__param(7, re)], ilt); + qss = class YFn { + static { + this.INSTANCE = new YFn(); + } + constructor() { + this.c = []; + this.d = new Map(); + } + scheduleCoordinatedRendering(e) { + this.c.push(e); + this.f(e.window); + return { + dispose: () => { + const t = this.c.indexOf(e); + if (t !== -1 && (this.c.splice(t, 1), this.c.length === 0)) { + for (const [s, n] of this.d) { + n.dispose(); + } + this.d.clear(); + } + } + }; + } + f(e) { + if (!this.d.has(e)) { + const t = () => { + this.d.delete(e); + this.g(); + }; + this.d.set(e, f9(e, t, 100)); + } + } + g() { + const e = this.c.slice(0); + this.c = []; + for (const s of e) { + z9(() => s.prepareRenderText()); + } + const t = []; + for (let s = 0, n = e.length; s < n; s++) { + const r = e[s]; + t[s] = z9(() => r.renderText()); + } + for (let s = 0, n = e.length; s < n; s++) { + const r = e[s]; + const o = t[s]; + if (!o) { + continue; + } + const [a, l] = o; + z9(() => r.prepareRender(a, l)); + } + for (let s = 0, n = e.length; s < n; s++) { + const r = e[s]; + const o = t[s]; + if (!o) { + continue; + } + const [a, l] = o; + z9(() => r.render(a, l)); + } + } + }; + } +}); +function jss(i) { + if (i == null) { + return true; + } else { + return i === l1.Right || i === l1.Both; + } +} +function zss(i) { + if (i == null) { + return true; + } else { + return i === l1.Left || i === l1.Both; + } +} +var Ute; +var Ape; +var Jss = ue({ + "out-build/vs/editor/common/modelLineProjectionData.js"() { + "use strict"; + + bm(); + Rs(); + gc(); + Ute = class { + constructor(i, e, t, s, n) { + this.injectionOffsets = i; + this.injectionOptions = e; + this.breakOffsets = t; + this.breakOffsetsVisibleColumn = s; + this.wrappedTextIndentLength = n; + } + getOutputLineCount() { + return this.breakOffsets.length; + } + getMinOutputOffset(i) { + if (i > 0) { + return this.wrappedTextIndentLength; + } else { + return 0; + } + } + getLineLength(i) { + const e = i > 0 ? this.breakOffsets[i - 1] : 0; + let s = this.breakOffsets[i] - e; + if (i > 0) { + s += this.wrappedTextIndentLength; + } + return s; + } + getMaxOutputOffset(i) { + return this.getLineLength(i); + } + translateToInputOffset(i, e) { + if (i > 0) { + e = Math.max(0, e - this.wrappedTextIndentLength); + } + let s = i === 0 ? e : this.breakOffsets[i - 1] + e; + if (this.injectionOffsets !== null) { + for (let n = 0; n < this.injectionOffsets.length && s > this.injectionOffsets[n]; n++) { + if (s < this.injectionOffsets[n] + this.injectionOptions[n].content.length) { + s = this.injectionOffsets[n]; + } else { + s -= this.injectionOptions[n].content.length; + } + } + } + return s; + } + translateToOutputPosition(i, e = 2) { + let t = i; + if (this.injectionOffsets !== null) { + for (let s = 0; s < this.injectionOffsets.length && !(i < this.injectionOffsets[s]) && (e === 1 || i !== this.injectionOffsets[s]); s++) { + t += this.injectionOptions[s].content.length; + } + } + return this.a(t, e); + } + a(i, e = 2) { + let t = 0; + let s = this.breakOffsets.length - 1; + let n = 0; + let r = 0; + while (t <= s) { + n = t + (s - t) / 2 | 0; + const a = this.breakOffsets[n]; + r = n > 0 ? this.breakOffsets[n - 1] : 0; + if (e === 0) { + if (i <= r) { + s = n - 1; + } else if (i > a) { + t = n + 1; + } else { + break; + } + } else if (i < r) { + s = n - 1; + } else if (i >= a) { + t = n + 1; + } else { + break; + } + } + let o = i - r; + if (n > 0) { + o += this.wrappedTextIndentLength; + } + return new Ape(n, o); + } + normalizeOutputPosition(i, e, t) { + if (this.injectionOffsets !== null) { + const s = this.b(i, e); + const n = this.c(s, t); + if (n !== s) { + return this.a(n, t); + } + } + if (t === 0) { + if (i > 0 && e === this.getMinOutputOffset(i)) { + return new Ape(i - 1, this.getMaxOutputOffset(i - 1)); + } + } else if (t === 1) { + const s = this.getOutputLineCount() - 1; + if (i < s && e === this.getMaxOutputOffset(i)) { + return new Ape(i + 1, this.getMinOutputOffset(i + 1)); + } + } + return new Ape(i, e); + } + b(i, e) { + if (i > 0) { + e = Math.max(0, e - this.wrappedTextIndentLength); + } + return (i > 0 ? this.breakOffsets[i - 1] : 0) + e; + } + c(i, e) { + const t = this.d(i); + if (!t) { + return i; + } + if (e === 2) { + if (i === t.offsetInInputWithInjections + t.length && jss(this.injectionOptions[t.injectedTextIndex].cursorStops)) { + return t.offsetInInputWithInjections + t.length; + } + { + let s = t.offsetInInputWithInjections; + if (zss(this.injectionOptions[t.injectedTextIndex].cursorStops)) { + return s; + } + let n = t.injectedTextIndex - 1; + while (n >= 0 && this.injectionOffsets[n] === this.injectionOffsets[t.injectedTextIndex] && !jss(this.injectionOptions[n].cursorStops) && !(s -= this.injectionOptions[n].content.length, zss(this.injectionOptions[n].cursorStops))) { + n--; + } + return s; + } + } else if (e === 1 || e === 4) { + let s = t.offsetInInputWithInjections + t.length; + let n = t.injectedTextIndex; + while (n + 1 < this.injectionOffsets.length && this.injectionOffsets[n + 1] === this.injectionOffsets[n]) { + s += this.injectionOptions[n + 1].content.length; + n++; + } + return s; + } else if (e === 0 || e === 3) { + let s = t.offsetInInputWithInjections; + let n = t.injectedTextIndex; + while (n - 1 >= 0 && this.injectionOffsets[n - 1] === this.injectionOffsets[n]) { + s -= this.injectionOptions[n - 1].content.length; + n--; + } + return s; + } + _L(e); + } + getInjectedText(i, e) { + const t = this.b(i, e); + const s = this.d(t); + if (s) { + return { + options: this.injectionOptions[s.injectedTextIndex] + }; + } else { + return null; + } + } + d(i) { + const e = this.injectionOffsets; + const t = this.injectionOptions; + if (e !== null) { + let s = 0; + for (let n = 0; n < e.length; n++) { + const r = t[n].content.length; + const o = e[n] + s; + const a = e[n] + s + r; + if (o > i) { + break; + } + if (i <= a) { + return { + injectedTextIndex: n, + offsetInInputWithInjections: o, + length: r + }; + } + s += r; + } + } + } + }; + Ape = class { + constructor(i, e) { + this.outputLineIndex = i; + this.outputOffset = e; + } + toString() { + return `${this.outputLineIndex}:${this.outputOffset}`; + } + toPosition(i) { + return new je(i + this.outputLineIndex, this.outputOffset + 1); + } + }; + } +}); +var Gss; +var Kss; +var k4; +var d7t; +var Yss; +var Xss; +var Qss; +var $pe; +var h7t; +var Fpe; +var Kj = ue({ + "out-build/vs/editor/common/textModelEvents.js"() { + "use strict"; + + (function (i) { + i[i.Flush = 1] = "Flush"; + i[i.LineChanged = 2] = "LineChanged"; + i[i.LinesDeleted = 3] = "LinesDeleted"; + i[i.LinesInserted = 4] = "LinesInserted"; + i[i.EOLChanged = 5] = "EOLChanged"; + })(Gss ||= {}); + Kss = class { + constructor() { + this.changeType = 1; + } + }; + k4 = class mFt { + static applyInjectedText(e, t) { + if (!t || t.length === 0) { + return e; + } + let s = ""; + let n = 0; + for (const r of t) { + s += e.substring(n, r.column - 1); + n = r.column - 1; + s += r.options.content; + } + s += e.substring(n); + return s; + } + static fromDecorations(e) { + const t = []; + for (const s of e) { + if (s.options.before && s.options.before.content.length > 0) { + t.push(new mFt(s.ownerId, s.range.startLineNumber, s.range.startColumn, s.options.before, 0)); + } + if (s.options.after && s.options.after.content.length > 0) { + t.push(new mFt(s.ownerId, s.range.endLineNumber, s.range.endColumn, s.options.after, 1)); + } + } + t.sort((s, n) => s.lineNumber === n.lineNumber ? s.column === n.column ? s.order - n.order : s.column - n.column : s.lineNumber - n.lineNumber); + return t; + } + constructor(e, t, s, n, r) { + this.ownerId = e; + this.lineNumber = t; + this.column = s; + this.options = n; + this.order = r; + } + withText(e) { + return new mFt(this.ownerId, this.lineNumber, this.column, { + ...this.options, + content: e + }, this.order); + } + }; + d7t = class { + constructor(i, e, t) { + this.changeType = 2; + this.lineNumber = i; + this.detail = e; + this.injectedText = t; + } + }; + Yss = class { + constructor(i, e) { + this.changeType = 3; + this.fromLineNumber = i; + this.toLineNumber = e; + } + }; + Xss = class { + constructor(i, e, t, s) { + this.changeType = 4; + this.injectedTexts = s; + this.fromLineNumber = i; + this.toLineNumber = e; + this.detail = t; + } + }; + Qss = class { + constructor() { + this.changeType = 5; + } + }; + $pe = class XFn { + constructor(e, t, s, n) { + this.changes = e; + this.versionId = t; + this.isUndoing = s; + this.isRedoing = n; + this.resultingSelection = null; + } + containsEvent(e) { + for (let t = 0, s = this.changes.length; t < s; t++) { + if (this.changes[t].changeType === e) { + return true; + } + } + return false; + } + static merge(e, t) { + const s = [].concat(e.changes).concat(t.changes); + const n = t.versionId; + const r = e.isUndoing || t.isUndoing; + const o = e.isRedoing || t.isRedoing; + return new XFn(s, n, r, o); + } + }; + h7t = class { + constructor(i) { + this.changes = i; + } + }; + Fpe = class _3i { + constructor(e, t) { + this.rawContentChangedEvent = e; + this.contentChangedEvent = t; + } + merge(e) { + const t = $pe.merge(this.rawContentChangedEvent, e.rawContentChangedEvent); + const s = _3i.c(this.contentChangedEvent, e.contentChangedEvent); + return new _3i(t, s); + } + static c(e, t) { + const s = [].concat(e.changes).concat(t.changes); + const n = t.eol; + const r = t.versionId; + const o = e.isUndoing || t.isUndoing; + const a = e.isRedoing || t.isRedoing; + const l = e.isFlush || t.isFlush; + const c = e.isEolChange && t.isEolChange; + return { + changes: s, + eol: n, + isEolChange: c, + versionId: r, + isUndoing: o, + isRedoing: a, + isFlush: l + }; + } + }; + } +}); +function MKn(i, e, t, s, n, r, o, a) { + function l(P) { + const R = a[P]; + if (R) { + const L = k4.applyInjectedText(e[P], R); + const F = R.map(U => U.options); + const O = R.map(U => U.column - 1); + return new Ute(O, F, [L.length], [], 0); + } else { + return null; + } + } + if (n === -1) { + const P = []; + for (let R = 0, L = e.length; R < L; R++) { + P[R] = l(R); + } + return P; + } + const c = Math.round(n * t.typicalHalfwidthCharacterWidth); + const d = Math.round(s * (r === 3 ? 2 : r === 2 ? 1 : 0)); + const h = Math.ceil(t.spaceWidth * d); + const g = document.createElement("div"); + Hm(g, t); + const p = new UL(10000); + const b = []; + const v = []; + const y = []; + const w = []; + const C = []; + for (let P = 0; P < e.length; P++) { + const R = k4.applyInjectedText(e[P], a[P]); + let L = 0; + let F = 0; + let O = c; + if (r !== 0) { + L = B0(R); + if (L === -1) { + L = 0; + } else { + for (let ee = 0; ee < L; ee++) { + const ne = R.charCodeAt(ee) === 9 ? s - F % s : 1; + F += ne; + } + const ie = Math.ceil(t.spaceWidth * F); + if (ie + t.typicalFullwidthCharacterWidth > c) { + L = 0; + F = 0; + } else { + O = c - ie; + } + } + } + const U = R.substr(L); + const j = AKn(U, F, s, O, p, h); + b[P] = L; + v[P] = F; + y[P] = U; + w[P] = j[0]; + C[P] = j[1]; + } + const S = p.build(); + const x = Zss?.createHTML(S) ?? S; + g.innerHTML = x; + g.style.position = "absolute"; + g.style.top = "10000"; + if (o === "keepAll") { + g.style.wordBreak = "keep-all"; + g.style.overflowWrap = "anywhere"; + } else { + g.style.wordBreak = "inherit"; + g.style.overflowWrap = "break-word"; + } + i.document.body.appendChild(g); + const k = document.createRange(); + const E = Array.prototype.slice.call(g.children, 0); + const D = []; + for (let P = 0; P < e.length; P++) { + const R = E[P]; + const L = $Kn(k, R, y[P], w[P]); + if (L === null) { + D[P] = l(P); + continue; + } + const F = b[P]; + const O = v[P] + d; + const U = C[P]; + const j = []; + for (let be = 0, ge = L.length; be < ge; be++) { + j[be] = U[L[be]]; + } + if (F !== 0) { + for (let be = 0, ge = L.length; be < ge; be++) { + L[be] += F; + } + } + let ie; + let ee; + const ne = a[P]; + if (ne) { + ie = ne.map(be => be.options); + ee = ne.map(be => be.column - 1); + } else { + ie = null; + ee = null; + } + D[P] = new Ute(ee, ie, L, j, O); + } + g.remove(); + return D; +} +function AKn(i, e, t, s, n, r) { + if (r !== 0) { + const h = String(r); + n.appendString("
"); + const o = i.length; + let a = e; + let l = 0; + const c = []; + const u = []; + let d = o > 0 ? i.charCodeAt(0) : 0; + n.appendString(""); + for (let h = 0; h < o; h++) { + if (h !== 0 && h % 16384 === 0) { + n.appendString(""); + } + c[h] = l; + u[h] = a; + const g = d; + d = h + 1 < o ? i.charCodeAt(h + 1) : 0; + let p = 1; + let b = 1; + switch (g) { + case 9: + p = t - a % t; + b = p; + for (let v = 1; v <= p; v++) { + if (v < p) { + n.appendCharCode(160); + } else { + n.appendASCIICharCode(32); + } + } + break; + case 32: + if (d === 32) { + n.appendCharCode(160); + } else { + n.appendASCIICharCode(32); + } + break; + case 60: + n.appendString("<"); + break; + case 62: + n.appendString(">"); + break; + case 38: + n.appendString("&"); + break; + case 0: + n.appendString("�"); + break; + case 65279: + case 8232: + case 8233: + case 133: + n.appendCharCode(65533); + break; + default: + if (i9(g)) { + b++; + } + if (g < 32) { + n.appendCharCode(9216 + g); + } else { + n.appendCharCode(g); + } + } + l += p; + a += b; + } + n.appendString(""); + c[i.length] = l; + u[i.length] = a; + n.appendString("
"); + return [c, u]; +} +function $Kn(i, e, t, s) { + if (t.length <= 1) { + return null; + } + const n = Array.prototype.slice.call(e.children, 0); + const r = []; + try { + f7t(i, n, s, 0, null, t.length - 1, null, r); + } catch (o) { + console.log(o); + return null; + } + if (r.length === 0) { + return null; + } else { + r.push(t.length); + return r; + } +} +function f7t(i, e, t, s, n, r, o, a) { + if (s === r || (n = n || g7t(i, e, t[s], t[s + 1]), o = o || g7t(i, e, t[r], t[r + 1]), Math.abs(n[0].top - o[0].top) <= 0.1)) { + return; + } + if (s + 1 === r) { + a.push(r); + return; + } + const l = s + (r - s) / 2 | 0; + const c = g7t(i, e, t[l], t[l + 1]); + f7t(i, e, t, s, n, l, c, a); + f7t(i, e, t, l, c, r, o, a); +} +function g7t(i, e, t, s) { + i.setStart(e[t / 16384 | 0].firstChild, t % 16384); + i.setEnd(e[s / 16384 | 0].firstChild, s % 16384); + return i.getClientRects(); +} +var Zss; +var ens; +var tns; +var FKn = ue({ + "out-build/vs/editor/browser/view/domLineBreaksComputer.js"() { + "use strict"; + + KL(); + $i(); + zt(); + s1(); + mM(); + Jss(); + Kj(); + Zss = GL("domLineBreaksComputer", { + createHTML: i => i + }); + ens = class QFn { + static create(e) { + return new QFn(new WeakRef(e)); + } + constructor(e) { + this.a = e; + } + createLineBreaksComputer(e, t, s, n, r) { + const o = []; + const a = []; + return { + addRequest: (l, c, u) => { + o.push(l); + a.push(c); + }, + finalize: () => MKn(Tn(this.a.deref()), o, e, t, s, n, r, a) + }; + } + }; + (function (i) { + i[i.SPAN_MODULO_LIMIT = 16384] = "SPAN_MODULO_LIMIT"; + })(tns ||= {}); + } +}); +var ins; +var OKn = ue({ + "out-build/vs/editor/browser/widget/codeEditor/codeEditorContributions.js"() { + "use strict"; + + xe(); + Ut(); + q(); + ins = class extends H { + constructor() { + super(); + this.a = null; + this.b = null; + this.c = this.D(new Bo()); + this.f = new Map(); + this.g = []; + this.g[0] = false; + this.g[1] = false; + this.g[2] = false; + this.g[3] = false; + } + initialize(i, e, t) { + this.a = i; + this.b = t; + for (const s of e) { + if (this.f.has(s.id)) { + xs(new Error(`Cannot have two contributions with the same id ${s.id}`)); + continue; + } + this.f.set(s.id, s); + } + this.h(0); + this.D(jk(Kt(this.a.getDomNode()), () => { + this.h(1); + })); + this.D(jk(Kt(this.a.getDomNode()), () => { + this.h(2); + })); + this.D(jk(Kt(this.a.getDomNode()), () => { + this.h(3); + }, 5000)); + } + saveViewState() { + const i = {}; + for (const [e, t] of this.c) { + if (typeof t.saveViewState == "function") { + i[e] = t.saveViewState(); + } + } + return i; + } + restoreViewState(i) { + for (const [e, t] of this.c) { + if (typeof t.restoreViewState == "function") { + t.restoreViewState(i[e]); + } + } + } + get(i) { + this.m(i); + return this.c.get(i) || null; + } + set(i, e) { + this.c.set(i, e); + } + onBeforeInteractionEvent() { + this.h(2); + } + onAfterModelAttached() { + return jk(Kt(this.a?.getDomNode()), () => { + this.h(1); + }, 50); + } + h(i) { + if (this.g[i]) { + return; + } + this.g[i] = true; + const e = this.j(i); + for (const t of e) { + this.m(t.id); + } + } + j(i) { + const e = []; + for (const [, t] of this.f) { + if (t.instantiation === i) { + e.push(t); + } + } + return e; + } + m(i) { + const e = this.f.get(i); + if (e) { + this.f.delete(i); + if (!this.b || !this.a) { + throw new Error("Cannot instantiate contributions before being initialized!"); + } + try { + const t = this.b.createInstance(e.ctor, this.a); + this.c.set(e.id, t); + if (typeof t.restoreViewState == "function" && e.instantiation !== 0) { + console.warn(`Editor contribution '${e.id}' should be eager instantiated because it uses saveViewState / restoreViewState.`); + } + } catch (t) { + xs(t); + } + } + } + }; + } +}); +var sns; +var _Kn = ue({ + "out-build/vs/editor/common/editorAction.js"() { + "use strict"; + + sns = class { + constructor(i, e, t, s, n, r, o) { + this.id = i; + this.label = e; + this.alias = t; + this.metadata = s; + this.a = n; + this.b = r; + this.c = o; + } + isSupported() { + return this.c.contextMatchesRules(this.a); + } + run(i) { + if (this.isSupported()) { + return this.b(i); + } else { + return Promise.resolve(undefined); + } + } + }; + } +}); +function p7t(i) { + return i && typeof i.id == "string"; +} +var nns; +var PM; +var rns; +var E4 = ue({ + "out-build/vs/editor/common/editorCommon.js"() { + "use strict"; + + (function (i) { + i[i.Smooth = 0] = "Smooth"; + i[i.Immediate = 1] = "Immediate"; + })(nns ||= {}); + PM = { + ICodeEditor: "vs.editor.ICodeEditor", + IDiffEditor: "vs.editor.IDiffEditor", + InlineMultiDiffEditor: "cursor.editor.IInlineMultiDiffEditor" + }; + (function (i) { + i.CompositionStart = "compositionStart"; + i.CompositionEnd = "compositionEnd"; + i.Type = "type"; + i.ReplacePreviousChar = "replacePreviousChar"; + i.CompositionType = "compositionType"; + i.Paste = "paste"; + i.Cut = "cut"; + })(rns ||= {}); + } +}); +function XL(i) { + let e = 0; + let t = 0; + let s = 0; + let n = 0; + for (let r = 0, o = i.length; r < o; r++) { + const a = i.charCodeAt(r); + if (a === 13) { + if (e === 0) { + t = r; + } + e++; + if (r + 1 < o && i.charCodeAt(r + 1) === 10) { + n |= 2; + r++; + } else { + n |= 3; + } + s = r + 1; + } else if (a === 10) { + n |= 1; + if (e === 0) { + t = r; + } + e++; + s = r + 1; + } + } + if (e === 0) { + t = i.length; + } + return [e, t, i.length - s, n]; +} +var ons; +var J9 = ue({ + "out-build/vs/editor/common/core/eolCounter.js"() { + "use strict"; + + (function (i) { + i[i.Unknown = 0] = "Unknown"; + i[i.Invalid = 3] = "Invalid"; + i[i.LF = 1] = "LF"; + i[i.CRLF = 2] = "CRLF"; + })(ons ||= {}); + } +}); +var m7t; +var ans; +var lns; +var BKn = ue({ + "out-build/vs/editor/common/textModelBracketPairs.js"() { + "use strict"; + + m7t = class { + constructor(i, e, t, s) { + this.range = i; + this.nestingLevel = e; + this.nestingLevelOfEqualBracketType = t; + this.isInvalid = s; + } + }; + ans = class { + constructor(i, e, t, s, n, r) { + this.range = i; + this.openingBracketRange = e; + this.closingBracketRange = t; + this.nestingLevel = s; + this.nestingLevelOfEqualBracketType = n; + this.a = r; + } + get openingBracketInfo() { + return this.a.openingBracket.bracketInfo; + } + get closingBracketInfo() { + return this.a.closingBracket?.bracketInfo; + } + }; + lns = class extends ans { + constructor(i, e, t, s, n, r, o) { + super(i, e, t, s, n, r); + this.minVisibleColumnIndentation = o; + } + }; + } +}); +function UKn(i, e, t, s) { + if (i !== t) { + return zp(t - i, s); + } else { + return zp(0, s - e); + } +} +function Ope(i) { + return i === 0; +} +function zp(i, e) { + return i * nE + e; +} +function BT(i) { + const e = i; + const t = Math.floor(e / nE); + const s = e - t * nE; + return new qv(t, s); +} +function WKn(i) { + return Math.floor(i / nE); +} +function Fta(i) { + return i; +} +function Zf(i, e) { + let t = i + e; + if (e >= nE) { + t = t - i % nE; + } + return t; +} +function VKn(i, e) { + return i.reduce((t, s) => Zf(t, e(s)), tS); +} +function cns(i, e) { + return i === e; +} +function _pe(i, e) { + const t = i; + const s = e; + if (s - t <= 0) { + return tS; + } + const r = Math.floor(t / nE); + const o = Math.floor(s / nE); + const a = s - o * nE; + if (r === o) { + const l = t - r * nE; + return zp(0, a - l); + } else { + return zp(o - r, a); + } +} +function Wte(i, e) { + return i < e; +} +function Vte(i, e) { + return i <= e; +} +function Bpe(i, e) { + return i >= e; +} +function Hte(i) { + return zp(i.lineNumber - 1, i.column - 1); +} +function Yj(i, e) { + const t = i; + const s = Math.floor(t / nE); + const n = t - s * nE; + const r = e; + const o = Math.floor(r / nE); + const a = r - o * nE; + return new Z(s + 1, n + 1, o + 1, a + 1); +} +function HKn(i) { + const e = Ov(i); + return zp(e.length - 1, e[e.length - 1].length); +} +var tS; +var nE; +var I4 = ue({ + "out-build/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/length.js"() { + "use strict"; + + $i(); + Rs(); + yt(); + TM(); + tS = 0; + nE = 67108864; + } +}); +var G9; +var uns; +var dns; +var slt = ue({ + "out-build/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/beforeEditPositionMapper.js"() { + "use strict"; + + yt(); + I4(); + G9 = class ZFn { + static fromModelContentChanges(e) { + return e.map(s => { + const n = Z.lift(s.range); + return new ZFn(Hte(n.getStartPosition()), Hte(n.getEndPosition()), HKn(s.text)); + }).reverse(); + } + constructor(e, t, s) { + this.startOffset = e; + this.endOffset = t; + this.newLength = s; + } + toString() { + return `[${BT(this.startOffset)}...${BT(this.endOffset)}) -> ${BT(this.newLength)}`; + } + }; + uns = class { + constructor(i) { + this.a = 0; + this.b = 0; + this.d = 0; + this.e = -1; + this.f = i.map(e => dns.from(e)); + } + getOffsetBeforeChange(i) { + this.i(i); + return this.h(i); + } + getDistanceToNextChange(i) { + this.i(i); + const e = this.f[this.a]; + const t = e ? this.g(e.offsetObj) : null; + if (t === null) { + return null; + } else { + return _pe(i, t); + } + } + g(i) { + if (i.lineCount === this.e) { + return zp(i.lineCount + this.b, i.columnCount + this.d); + } else { + return zp(i.lineCount + this.b, i.columnCount); + } + } + h(i) { + const e = BT(i); + if (e.lineCount - this.b === this.e) { + return zp(e.lineCount - this.b, e.columnCount - this.d); + } else { + return zp(e.lineCount - this.b, e.columnCount); + } + } + i(i) { + while (this.a < this.f.length) { + const e = this.f[this.a]; + const t = this.g(e.endOffsetAfterObj); + if (Vte(t, i)) { + this.a++; + const s = BT(t); + const n = BT(this.g(e.endOffsetBeforeObj)); + const r = s.lineCount - n.lineCount; + this.b += r; + const o = this.e === e.endOffsetBeforeObj.lineCount ? this.d : 0; + const a = s.columnCount - n.columnCount; + this.d = o + a; + this.e = e.endOffsetBeforeObj.lineCount; + } else { + break; + } + } + } + }; + dns = class eOn { + static from(e) { + return new eOn(e.startOffset, e.endOffset, e.newLength); + } + constructor(e, t, s) { + this.endOffsetBeforeObj = BT(t); + this.endOffsetAfterObj = BT(Zf(e, s)); + this.offsetObj = BT(e); + } + }; + } +}); +var Upe; +var FI; +var b7t; +var v7t; +var qte = ue({ + "out-build/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/smallImmutableSet.js"() { + "use strict"; + + Upe = []; + FI = class fB { + static { + this.a = new Array(129); + } + static b(e, t) { + if (e <= 128 && t.length === 0) { + let s = fB.a[e]; + if (!s) { + s = new fB(e, t); + fB.a[e] = s; + } + return s; + } + return new fB(e, t); + } + static { + this.c = fB.b(0, Upe); + } + static getEmpty() { + return this.c; + } + constructor(e, t) { + this.d = e; + this.e = t; + } + add(e, t) { + const s = t.getKey(e); + let n = s >> 5; + if (n === 0) { + const o = 1 << s | this.d; + if (o === this.d) { + return this; + } else { + return fB.b(o, this.e); + } + } + n--; + const r = this.e.slice(0); + while (r.length < n) { + r.push(0); + } + r[n] |= 1 << (s & 31); + return fB.b(this.d, r); + } + has(e, t) { + const s = t.getKey(e); + let n = s >> 5; + if (n === 0) { + return (this.d & 1 << s) !== 0; + } else { + n--; + return ((this.e[n] || 0) & 1 << (s & 31)) !== 0; + } + } + merge(e) { + const t = this.d | e.d; + if (this.e === Upe && e.e === Upe) { + if (t === this.d) { + return this; + } else if (t === e.d) { + return e; + } else { + return fB.b(t, Upe); + } + } + const s = []; + for (let n = 0; n < Math.max(this.e.length, e.e.length); n++) { + const r = this.e[n] || 0; + const o = e.e[n] || 0; + s.push(r | o); + } + return fB.b(t, s); + } + intersects(e) { + if (this.d & e.d) { + return true; + } + for (let t = 0; t < Math.min(this.e.length, e.e.length); t++) { + if (this.e[t] & e.e[t]) { + return true; + } + } + return false; + } + equals(e) { + if (this.d !== e.d || this.e.length !== e.e.length) { + return false; + } + for (let t = 0; t < this.e.length; t++) { + if (this.e[t] !== e.e[t]) { + return false; + } + } + return true; + } + }; + b7t = { + getKey(i) { + return i; + } + }; + v7t = class { + constructor() { + this.a = new Map(); + } + getKey(i) { + let e = this.a.get(i); + if (e === undefined) { + e = this.a.size; + this.a.set(i, e); + } + return e; + } + reverseLookup(i) { + return [...this.a].find(([e, t]) => t === i)?.[0]; + } + reverseLookupSet(i) { + const e = []; + for (const [t] of this.a) { + if (i.has(t, this)) { + e.push(t); + } + } + return e; + } + keys() { + return this.a.keys(); + } + }; + } +}); +var hns; +var nlt; +var y7t; +var LM; +var rlt; +var fns; +var olt; +var w7t; +var gns; +var alt; +var K9; +var C7t; +var pns; +var llt = ue({ + "out-build/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/ast.js"() { + "use strict"; + + Ut(); + TT(); + I4(); + qte(); + (function (i) { + i[i.Text = 0] = "Text"; + i[i.Bracket = 1] = "Bracket"; + i[i.Pair = 2] = "Pair"; + i[i.UnexpectedClosingBracket = 3] = "UnexpectedClosingBracket"; + i[i.List = 4] = "List"; + })(hns ||= {}); + nlt = class { + get length() { + return this.a; + } + constructor(i) { + this.a = i; + } + }; + y7t = class bFt extends nlt { + static create(e, t, s) { + let n = e.length; + if (t) { + n = Zf(n, t.length); + } + if (s) { + n = Zf(n, s.length); + } + return new bFt(n, e, t, s, t ? t.missingOpeningBracketIds : FI.getEmpty()); + } + get kind() { + return 2; + } + get listHeight() { + return 0; + } + get childrenLength() { + return 3; + } + getChild(e) { + switch (e) { + case 0: + return this.openingBracket; + case 1: + return this.child; + case 2: + return this.closingBracket; + } + throw new Error("Invalid child index"); + } + get children() { + const e = []; + e.push(this.openingBracket); + if (this.child) { + e.push(this.child); + } + if (this.closingBracket) { + e.push(this.closingBracket); + } + return e; + } + constructor(e, t, s, n, r) { + super(e); + this.openingBracket = t; + this.child = s; + this.closingBracket = n; + this.missingOpeningBracketIds = r; + } + canBeReused(e) { + return this.closingBracket !== null && !e.intersects(this.missingOpeningBracketIds); + } + flattenLists() { + return bFt.create(this.openingBracket.flattenLists(), this.child && this.child.flattenLists(), this.closingBracket && this.closingBracket.flattenLists()); + } + deepClone() { + return new bFt(this.length, this.openingBracket.deepClone(), this.child && this.child.deepClone(), this.closingBracket && this.closingBracket.deepClone(), this.missingOpeningBracketIds); + } + computeMinIndentation(e, t) { + if (this.child) { + return this.child.computeMinIndentation(Zf(e, this.openingBracket.length), t); + } else { + return Number.MAX_SAFE_INTEGER; + } + } + }; + LM = class tOn extends nlt { + static create23(e, t, s, n = false) { + let r = e.length; + let o = e.missingOpeningBracketIds; + if (e.listHeight !== t.listHeight) { + throw new Error("Invalid list heights"); + } + r = Zf(r, t.length); + o = o.merge(t.missingOpeningBracketIds); + if (s) { + if (e.listHeight !== s.listHeight) { + throw new Error("Invalid list heights"); + } + r = Zf(r, s.length); + o = o.merge(s.missingOpeningBracketIds); + } + if (n) { + return new fns(r, e.listHeight + 1, e, t, s, o); + } else { + return new rlt(r, e.listHeight + 1, e, t, s, o); + } + } + static create(e, t = false) { + if (e.length === 0) { + return this.getEmpty(); + } + { + let s = e[0].length; + let n = e[0].missingOpeningBracketIds; + for (let r = 1; r < e.length; r++) { + s = Zf(s, e[r].length); + n = n.merge(e[r].missingOpeningBracketIds); + } + if (t) { + return new w7t(s, e[0].listHeight + 1, e, n); + } else { + return new olt(s, e[0].listHeight + 1, e, n); + } + } + } + static getEmpty() { + return new w7t(tS, 0, [], FI.getEmpty()); + } + get kind() { + return 4; + } + get missingOpeningBracketIds() { + return this.d; + } + constructor(e, t, s) { + super(e); + this.listHeight = t; + this.d = s; + this.b = -1; + } + e() {} + makeLastElementMutable() { + this.e(); + const e = this.childrenLength; + if (e === 0) { + return; + } + const t = this.getChild(e - 1); + const s = t.kind === 4 ? t.toMutable() : t; + if (t !== s) { + this.f(e - 1, s); + } + return s; + } + makeFirstElementMutable() { + this.e(); + if (this.childrenLength === 0) { + return; + } + const t = this.getChild(0); + const s = t.kind === 4 ? t.toMutable() : t; + if (t !== s) { + this.f(0, s); + } + return s; + } + canBeReused(e) { + if (e.intersects(this.missingOpeningBracketIds) || this.childrenLength === 0) { + return false; + } + let t = this; + while (t.kind === 4) { + const s = t.childrenLength; + if (s === 0) { + throw new co(); + } + t = t.getChild(s - 1); + } + return t.canBeReused(e); + } + handleChildrenChanged() { + this.e(); + const e = this.childrenLength; + let t = this.getChild(0).length; + let s = this.getChild(0).missingOpeningBracketIds; + for (let n = 1; n < e; n++) { + const r = this.getChild(n); + t = Zf(t, r.length); + s = s.merge(r.missingOpeningBracketIds); + } + this.a = t; + this.d = s; + this.b = -1; + } + flattenLists() { + const e = []; + for (const t of this.children) { + const s = t.flattenLists(); + if (s.kind === 4) { + e.push(...s.children); + } else { + e.push(s); + } + } + return tOn.create(e); + } + computeMinIndentation(e, t) { + if (this.b !== -1) { + return this.b; + } + let s = Number.MAX_SAFE_INTEGER; + let n = e; + for (let r = 0; r < this.childrenLength; r++) { + const o = this.getChild(r); + if (o) { + s = Math.min(s, o.computeMinIndentation(n, t)); + n = Zf(n, o.length); + } + } + this.b = s; + return s; + } + }; + rlt = class iOn extends LM { + get childrenLength() { + if (this.k !== null) { + return 3; + } else { + return 2; + } + } + getChild(e) { + switch (e) { + case 0: + return this.h; + case 1: + return this.j; + case 2: + return this.k; + } + throw new Error("Invalid child index"); + } + f(e, t) { + switch (e) { + case 0: + this.h = t; + return; + case 1: + this.j = t; + return; + case 2: + this.k = t; + return; + } + throw new Error("Invalid child index"); + } + get children() { + if (this.k) { + return [this.h, this.j, this.k]; + } else { + return [this.h, this.j]; + } + } + get item1() { + return this.h; + } + get item2() { + return this.j; + } + get item3() { + return this.k; + } + constructor(e, t, s, n, r, o) { + super(e, t, o); + this.h = s; + this.j = n; + this.k = r; + } + deepClone() { + return new iOn(this.length, this.listHeight, this.h.deepClone(), this.j.deepClone(), this.k ? this.k.deepClone() : null, this.missingOpeningBracketIds); + } + appendChildOfSameHeight(e) { + if (this.k) { + throw new Error("Cannot append to a full (2,3) tree node"); + } + this.e(); + this.k = e; + this.handleChildrenChanged(); + } + unappendChild() { + if (!this.k) { + throw new Error("Cannot remove from a non-full (2,3) tree node"); + } + this.e(); + const e = this.k; + this.k = null; + this.handleChildrenChanged(); + return e; + } + prependChildOfSameHeight(e) { + if (this.k) { + throw new Error("Cannot prepend to a full (2,3) tree node"); + } + this.e(); + this.k = this.j; + this.j = this.h; + this.h = e; + this.handleChildrenChanged(); + } + unprependChild() { + if (!this.k) { + throw new Error("Cannot remove from a non-full (2,3) tree node"); + } + this.e(); + const e = this.h; + this.h = this.j; + this.j = this.k; + this.k = null; + this.handleChildrenChanged(); + return e; + } + toMutable() { + return this; + } + }; + fns = class extends rlt { + toMutable() { + return new rlt(this.length, this.listHeight, this.item1, this.item2, this.item3, this.missingOpeningBracketIds); + } + e() { + throw new Error("this instance is immutable"); + } + }; + olt = class sOn extends LM { + get childrenLength() { + return this.h.length; + } + getChild(e) { + return this.h[e]; + } + f(e, t) { + this.h[e] = t; + } + get children() { + return this.h; + } + constructor(e, t, s, n) { + super(e, t, n); + this.h = s; + } + deepClone() { + const e = new Array(this.h.length); + for (let t = 0; t < this.h.length; t++) { + e[t] = this.h[t].deepClone(); + } + return new sOn(this.length, this.listHeight, e, this.missingOpeningBracketIds); + } + appendChildOfSameHeight(e) { + this.e(); + this.h.push(e); + this.handleChildrenChanged(); + } + unappendChild() { + this.e(); + const e = this.h.pop(); + this.handleChildrenChanged(); + return e; + } + prependChildOfSameHeight(e) { + this.e(); + this.h.unshift(e); + this.handleChildrenChanged(); + } + unprependChild() { + this.e(); + const e = this.h.shift(); + this.handleChildrenChanged(); + return e; + } + toMutable() { + return this; + } + }; + w7t = class extends olt { + toMutable() { + return new olt(this.length, this.listHeight, [...this.children], this.missingOpeningBracketIds); + } + e() { + throw new Error("this instance is immutable"); + } + }; + gns = []; + alt = class extends nlt { + get listHeight() { + return 0; + } + get childrenLength() { + return 0; + } + getChild(i) { + return null; + } + get children() { + return gns; + } + flattenLists() { + return this; + } + deepClone() { + return this; + } + }; + K9 = class extends alt { + get kind() { + return 0; + } + get missingOpeningBracketIds() { + return FI.getEmpty(); + } + canBeReused(i) { + return true; + } + computeMinIndentation(i, e) { + const t = BT(i); + const s = (t.columnCount === 0 ? t.lineCount : t.lineCount + 1) + 1; + const n = WKn(Zf(i, this.length)) + 1; + let r = Number.MAX_SAFE_INTEGER; + for (let o = s; o <= n; o++) { + const a = e.getLineFirstNonWhitespaceColumn(o); + const l = e.getLineContent(o); + if (a === 0) { + continue; + } + const c = pp.visibleColumnFromColumn(l, a, e.getOptions().tabSize); + r = Math.min(r, c); + } + return r; + } + }; + C7t = class nOn extends alt { + static create(e, t, s) { + return new nOn(e, t, s); + } + get kind() { + return 1; + } + get missingOpeningBracketIds() { + return FI.getEmpty(); + } + constructor(e, t, s) { + super(e); + this.bracketInfo = t; + this.bracketIds = s; + } + get text() { + return this.bracketInfo.bracketText; + } + get languageId() { + return this.bracketInfo.languageId; + } + canBeReused(e) { + return false; + } + computeMinIndentation(e, t) { + return Number.MAX_SAFE_INTEGER; + } + }; + pns = class extends alt { + get kind() { + return 3; + } + constructor(i, e) { + super(e); + this.missingOpeningBracketIds = i; + } + canBeReused(i) { + return !i.intersects(this.missingOpeningBracketIds); + } + computeMinIndentation(i, e) { + return Number.MAX_SAFE_INTEGER; + } + }; + } +}); +var mns; +var D4; +var S7t; +var bns; +var vns; +var x7t = ue({ + "out-build/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/tokenizer.js"() { + "use strict"; + + Ut(); + C9(); + llt(); + I4(); + qte(); + (function (i) { + i[i.Text = 0] = "Text"; + i[i.OpeningBracket = 1] = "OpeningBracket"; + i[i.ClosingBracket = 2] = "ClosingBracket"; + })(mns ||= {}); + D4 = class { + constructor(i, e, t, s, n) { + this.length = i; + this.kind = e; + this.bracketId = t; + this.bracketIds = s; + this.astNode = n; + } + }; + S7t = class { + constructor(i, e) { + this.d = i; + this.e = e; + this.c = new bns(this.d, this.e); + this.f = tS; + this.g = false; + this.h = null; + this.a = i.getLineCount(); + this.b = i.getLineLength(this.a); + } + get offset() { + return this.f; + } + get length() { + return zp(this.a - 1, this.b); + } + getText() { + return this.d.getValue(); + } + skip(i) { + this.g = false; + this.f = Zf(this.f, i); + const e = BT(this.f); + this.c.setPosition(e.lineCount, e.columnCount); + } + read() { + let i; + if (this.h) { + this.g = false; + i = this.h; + } else { + i = this.c.read(); + } + if (i) { + this.f = Zf(this.f, i.length); + } + return i; + } + peek() { + if (!this.g) { + this.h = this.c.read(); + this.g = true; + } + return this.h; + } + }; + bns = class { + constructor(i, e) { + this.c = i; + this.d = e; + this.e = 0; + this.f = null; + this.g = 0; + this.h = null; + this.j = 0; + this.k = null; + this.a = i.getLineCount(); + this.b = i.getLineLength(this.a); + } + setPosition(i, e) { + if (i === this.e) { + this.g = e; + if (this.f !== null) { + this.j = this.g === 0 ? 0 : this.h.findTokenIndexAtOffset(this.g); + } + } else { + this.e = i; + this.g = e; + this.f = null; + } + this.k = null; + } + read() { + if (this.k) { + const n = this.k; + this.k = null; + this.g += n.length; + return n; + } + if (this.e > this.a - 1 || this.e === this.a - 1 && this.g >= this.b) { + return null; + } + if (this.f === null) { + this.h = this.c.tokenization.getLineTokens(this.e + 1); + this.f = this.h.getLineContent(); + this.j = this.g === 0 ? 0 : this.h.findTokenIndexAtOffset(this.g); + } + const i = this.e; + const e = this.g; + let t = 0; + while (true) { + const n = this.h; + const r = n.getCount(); + let o = null; + if (this.j < r) { + const a = n.getMetadata(this.j); + while (this.j + 1 < r && a === n.getMetadata(this.j + 1)) { + this.j++; + } + const l = gb.getTokenType(a) === 0; + const c = gb.containsBalancedBrackets(a); + const u = n.getEndOffset(this.j); + if (c && l && this.g < u) { + const d = n.getLanguageId(this.j); + const h = this.f.substring(this.g, u); + const g = this.d.getSingleLanguageBracketTokens(d); + const p = g.regExpGlobal; + if (p) { + p.lastIndex = 0; + const b = p.exec(h); + if (b) { + o = g.getToken(b[0]); + if (o) { + this.g += b.index; + } + } + } + } + t += u - this.g; + if (o) { + if (i !== this.e || e !== this.g) { + this.k = o; + break; + } else { + this.g += o.length; + return o; + } + } else { + this.j++; + this.g = u; + } + } else if (this.e === this.a - 1 || (this.e++, this.h = this.c.tokenization.getLineTokens(this.e + 1), this.j = 0, this.f = this.h.getLineContent(), this.g = 0, t += 33, t > 1000)) { + break; + } + if (t > 1500) { + break; + } + } + const s = UKn(i, e, this.e, this.g); + return new D4(s, 0, -1, FI.getEmpty(), new K9(s)); + } + }; + vns = class { + constructor(i, e) { + this.d = i; + this.a = tS; + this.c = 0; + const t = e.getRegExpStr(); + const s = t ? new RegExp(`${t}| +`, "gi") : null; + const n = []; + let r; + let o = 0; + let a = 0; + let l = 0; + let c = 0; + const u = []; + for (let g = 0; g < 60; g++) { + u.push(new D4(zp(0, g), 0, -1, FI.getEmpty(), new K9(zp(0, g)))); + } + const d = []; + for (let g = 0; g < 60; g++) { + d.push(new D4(zp(1, g), 0, -1, FI.getEmpty(), new K9(zp(1, g)))); + } + if (s) { + for (s.lastIndex = 0; (r = s.exec(i)) !== null;) { + const g = r.index; + const p = r[0]; + if (p === ` +`) { + o++; + a = g + 1; + } else { + if (l !== g) { + let b; + if (c === o) { + const v = g - l; + if (v < u.length) { + b = u[v]; + } else { + const y = zp(0, v); + b = new D4(y, 0, -1, FI.getEmpty(), new K9(y)); + } + } else { + const v = o - c; + const y = g - a; + if (v === 1 && y < d.length) { + b = d[y]; + } else { + const w = zp(v, y); + b = new D4(w, 0, -1, FI.getEmpty(), new K9(w)); + } + } + n.push(b); + } + n.push(e.getToken(p)); + l = g + p.length; + c = o; + } + } + } + const h = i.length; + if (l !== h) { + const g = c === o ? zp(0, h - l) : zp(o - c, h - a); + n.push(new D4(g, 0, -1, FI.getEmpty(), new K9(g))); + } + this.length = zp(o, h - a); + this.b = n; + } + get offset() { + return this.a; + } + read() { + return this.b[this.c++] || null; + } + peek() { + return this.b[this.c] || null; + } + skip(i) { + throw new Khe(); + } + getText() { + return this.d; + } + }; + } +}); +function qKn(i) { + let e = zg(i); + if (/^[\w ]+/.test(i)) { + e = `\\b${e}`; + } + if (/[\w ]+$/.test(i)) { + e = `${e}\\b`; + } + return e; +} +var yns; +var k7t; +var wns = ue({ + "out-build/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/brackets.js"() { + "use strict"; + + $i(); + llt(); + I4(); + qte(); + x7t(); + yns = class rOn { + static createFromLanguage(e, t) { + function s(r) { + return t.getKey(`${r.languageId}:::${r.bracketText}`); + } + const n = new Map(); + for (const r of e.bracketsNew.openingBrackets) { + const o = zp(0, r.bracketText.length); + const a = s(r); + const l = FI.getEmpty().add(a, b7t); + n.set(r.bracketText, new D4(o, 1, a, l, C7t.create(o, r, l))); + } + for (const r of e.bracketsNew.closingBrackets) { + const o = zp(0, r.bracketText.length); + let a = FI.getEmpty(); + const l = r.getOpeningBrackets(); + for (const c of l) { + a = a.add(s(c), b7t); + } + n.set(r.bracketText, new D4(o, 2, s(l[0]), a, C7t.create(o, r, a))); + } + return new rOn(n); + } + constructor(e) { + this.c = e; + this.a = false; + this.b = null; + } + getRegExpStr() { + if (this.isEmpty) { + return null; + } + { + const e = [...this.c.keys()]; + e.sort(); + e.reverse(); + return e.map(t => qKn(t)).join("|"); + } + } + get regExpGlobal() { + if (!this.a) { + const e = this.getRegExpStr(); + this.b = e ? new RegExp(e, "gi") : null; + this.a = true; + } + return this.b; + } + getToken(e) { + return this.c.get(e.toLowerCase()); + } + findClosingTokenText(e) { + for (const [t, s] of this.c) { + if (s.kind === 2 && s.bracketIds.intersects(e)) { + return t; + } + } + } + get isEmpty() { + return this.c.size === 0; + } + }; + k7t = class { + constructor(i, e) { + this.b = i; + this.c = e; + this.a = new Map(); + } + didLanguageChange(i) { + return this.a.has(i); + } + getSingleLanguageBracketTokens(i) { + let e = this.a.get(i); + if (!e) { + e = yns.createFromLanguage(this.c(i), this.b); + this.a.set(i, e); + } + return e; + } + getToken(i, e) { + return this.getSingleLanguageBracketTokens(e).getToken(i); + } + }; + } +}); +function jKn(i) { + if (i.length === 0) { + return null; + } + if (i.length === 1) { + return i[0]; + } + let e = 0; + function t() { + if (e >= i.length) { + return null; + } + const o = e; + const a = i[o].listHeight; + for (e++; e < i.length && i[e].listHeight === a;) { + e++; + } + if (e - o >= 2) { + return Cns(o === 0 && e === i.length ? i : i.slice(o, e), false); + } else { + return i[o]; + } + } + let s = t(); + let n = t(); + if (!n) { + return s; + } + for (let o = t(); o; o = t()) { + if (Sns(s, n) <= Sns(n, o)) { + s = E7t(s, n); + n = o; + } else { + n = E7t(n, o); + } + } + return E7t(s, n); +} +function Cns(i, e = false) { + if (i.length === 0) { + return null; + } + if (i.length === 1) { + return i[0]; + } + let t = i.length; + while (t > 3) { + const s = t >> 1; + for (let n = 0; n < s; n++) { + const r = n << 1; + i[n] = LM.create23(i[r], i[r + 1], r + 3 === t ? i[r + 2] : null, e); + } + t = s; + } + return LM.create23(i[0], i[1], t >= 3 ? i[2] : null, e); +} +function Sns(i, e) { + return Math.abs(i.listHeight - e.listHeight); +} +function E7t(i, e) { + if (i.listHeight === e.listHeight) { + return LM.create23(i, e, null, false); + } else if (i.listHeight > e.listHeight) { + return zKn(i, e); + } else { + return JKn(e, i); + } +} +function zKn(i, e) { + i = i.toMutable(); + let t = i; + const s = []; + let n; + while (true) { + if (e.listHeight === t.listHeight) { + n = e; + break; + } + if (t.kind !== 4) { + throw new Error("unexpected"); + } + s.push(t); + t = t.makeLastElementMutable(); + } + for (let r = s.length - 1; r >= 0; r--) { + const o = s[r]; + if (n) { + if (o.childrenLength >= 3) { + n = LM.create23(o.unappendChild(), n, null, false); + } else { + o.appendChildOfSameHeight(n); + n = undefined; + } + } else { + o.handleChildrenChanged(); + } + } + if (n) { + return LM.create23(i, n, null, false); + } else { + return i; + } +} +function JKn(i, e) { + i = i.toMutable(); + let t = i; + const s = []; + while (e.listHeight !== t.listHeight) { + if (t.kind !== 4) { + throw new Error("unexpected"); + } + s.push(t); + t = t.makeFirstElementMutable(); + } + let n = e; + for (let r = s.length - 1; r >= 0; r--) { + const o = s[r]; + if (n) { + if (o.childrenLength >= 3) { + n = LM.create23(n, o.unprependChild(), null, false); + } else { + o.prependChildOfSameHeight(n); + n = undefined; + } + } else { + o.handleChildrenChanged(); + } + } + if (n) { + return LM.create23(n, i, null, false); + } else { + return i; + } +} +var GKn = ue({ + "out-build/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/concat23Trees.js"() { + "use strict"; + + llt(); + } +}); +function I7t(i, e = -1) { + while (true) { + e++; + if (e >= i.childrenLength) { + return -1; + } + if (i.getChild(e)) { + return e; + } + } +} +function Wpe(i) { + if (i.length > 0) { + return i[i.length - 1]; + } else { + return undefined; + } +} +var xns; +var KKn = ue({ + "out-build/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/nodeReader.js"() { + "use strict"; + + I4(); + xns = class { + constructor(i) { + this.d = tS; + this.a = [i]; + this.b = [tS]; + this.c = []; + } + readLongestNodeAt(i, e) { + if (Wte(i, this.d)) { + throw new Error("Invalid offset"); + } + for (this.d = i;;) { + const t = Wpe(this.a); + if (!t) { + return; + } + const s = Wpe(this.b); + if (Wte(i, s)) { + return; + } + if (Wte(s, i)) { + if (Zf(s, t.length) <= i) { + this.e(); + } else { + const n = I7t(t); + if (n !== -1) { + this.a.push(t.getChild(n)); + this.b.push(s); + this.c.push(n); + } else { + this.e(); + } + } + } else { + if (e(t)) { + this.e(); + return t; + } + { + const n = I7t(t); + if (n === -1) { + this.e(); + return; + } else { + this.a.push(t.getChild(n)); + this.b.push(s); + this.c.push(n); + } + } + } + } + } + e() { + while (true) { + const i = Wpe(this.b); + const e = Wpe(this.a); + this.a.pop(); + this.b.pop(); + if (this.c.length === 0) { + break; + } + const t = Wpe(this.a); + const s = I7t(t, this.c[this.c.length - 1]); + if (s !== -1) { + this.a.push(t.getChild(s)); + this.b.push(Zf(i, e.length)); + this.c[this.c.length - 1] = s; + break; + } else { + this.c.pop(); + } + } + } + }; + } +}); +function D7t(i, e, t, s) { + return new kns(i, e, t, s).parseDocument(); +} +var kns; +var Ens = ue({ + "out-build/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/parser.js"() { + "use strict"; + + llt(); + slt(); + qte(); + I4(); + GKn(); + KKn(); + kns = class { + get nodesConstructed() { + return this.c; + } + get nodesReused() { + return this.d; + } + constructor(i, e, t, s) { + this.e = i; + this.f = s; + this.c = 0; + this.d = 0; + if (t && s) { + throw new Error("Not supported"); + } + this.a = t ? new xns(t) : undefined; + this.b = new uns(e); + } + parseDocument() { + this.c = 0; + this.d = 0; + let i = this.g(FI.getEmpty(), 0); + i ||= LM.getEmpty(); + return i; + } + g(i, e) { + const t = []; + while (true) { + let n = this.h(i); + if (!n) { + const r = this.e.peek(); + if (!r || r.kind === 0 && Ope(r.length) || r.kind === 2 && r.bracketIds.intersects(i)) { + break; + } + n = this.i(i, e + 1); + } + if (n.kind !== 4 || n.childrenLength !== 0) { + t.push(n); + } + } + if (this.a) { + return jKn(t); + } else { + return Cns(t, this.f); + } + } + h(i) { + if (this.a) { + const e = this.b.getDistanceToNextChange(this.e.offset); + if (e === null || !Ope(e)) { + const t = this.a.readLongestNodeAt(this.b.getOffsetBeforeChange(this.e.offset), s => e !== null && !Wte(s.length, e) ? false : s.canBeReused(i)); + if (t) { + this.d++; + this.e.skip(t.length); + return t; + } + } + } + } + i(i, e) { + this.c++; + const t = this.e.read(); + switch (t.kind) { + case 2: + return new pns(t.bracketIds, t.length); + case 0: + return t.astNode; + case 1: + { + if (e > 300) { + return new K9(t.length); + } + const s = i.merge(t.bracketIds); + const n = this.g(s, e + 1); + const r = this.e.peek(); + if (r && r.kind === 2 && (r.bracketId === t.bracketId || r.bracketIds.intersects(t.bracketIds))) { + this.e.read(); + return y7t.create(t.astNode, n, r.astNode); + } else { + return y7t.create(t.astNode, n, null); + } + } + default: + throw new Error("unexpected"); + } + } + }; + } +}); +function clt(i, e) { + if (i.length === 0) { + return e; + } + if (e.length === 0) { + return i; + } + const t = new EL(Ins(i)); + const s = Ins(e); + s.push({ + modified: false, + lengthBefore: undefined, + lengthAfter: undefined + }); + let n = t.dequeue(); + function r(c) { + if (c === undefined) { + const d = t.takeWhile(h => true) || []; + if (n) { + d.unshift(n); + } + return d; + } + const u = []; + while (n && !Ope(c)) { + const [d, h] = n.splitAt(c); + u.push(d); + c = _pe(d.lengthAfter, c); + n = h ?? t.dequeue(); + } + if (!Ope(c)) { + u.push(new ult(false, c, c)); + } + return u; + } + const o = []; + function a(c, u, d) { + if (o.length > 0 && cns(o[o.length - 1].endOffset, c)) { + const h = o[o.length - 1]; + o[o.length - 1] = new G9(h.startOffset, u, Zf(h.newLength, d)); + } else { + o.push({ + startOffset: c, + endOffset: u, + newLength: d + }); + } + } + let l = tS; + for (const c of s) { + const u = r(c.lengthBefore); + if (c.modified) { + const d = VKn(u, g => g.lengthBefore); + const h = Zf(l, d); + a(l, h, c.lengthAfter); + l = h; + } else { + for (const d of u) { + const h = l; + l = Zf(l, d.lengthBefore); + if (d.modified) { + a(h, l, d.lengthAfter); + } + } + } + } + return o; +} +function Ins(i) { + const e = []; + let t = tS; + for (const s of i) { + const n = _pe(t, s.startOffset); + if (!Ope(n)) { + e.push(new ult(false, n, n)); + } + const r = _pe(s.startOffset, s.endOffset); + e.push(new ult(true, r, s.newLength)); + t = s.endOffset; + } + return e; +} +var ult; +var Dns = ue({ + "out-build/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/combineTextEditInfos.js"() { + "use strict"; + + Jt(); + slt(); + I4(); + ult = class XPe { + constructor(e, t, s) { + this.modified = e; + this.lengthBefore = t; + this.lengthAfter = s; + } + splitAt(e) { + const t = _pe(e, this.lengthAfter); + if (cns(t, tS)) { + return [this, undefined]; + } else if (this.modified) { + return [new XPe(this.modified, this.lengthBefore, e), new XPe(this.modified, tS, t)]; + } else { + return [new XPe(this.modified, e, e), new XPe(this.modified, t, t)]; + } + } + toString() { + return `${this.modified ? "M" : "U"}:${BT(this.lengthBefore)} -> ${BT(this.lengthAfter)}`; + } + }; + } +}); +function Tns(i, e, t, s) { + if (i.kind === 4 || i.kind === 2) { + const n = []; + for (const r of i.children) { + t = Zf(e, r.length); + n.push({ + nodeOffsetStart: e, + nodeOffsetEnd: t + }); + e = t; + } + for (let r = n.length - 1; r >= 0; r--) { + const { + nodeOffsetStart: o, + nodeOffsetEnd: a + } = n[r]; + if (Wte(o, s)) { + const l = Tns(i.children[r], o, a, s); + if (l) { + return l; + } + } + } + return null; + } else { + if (i.kind === 3) { + return null; + } + if (i.kind === 1) { + const n = Yj(e, t); + return { + bracketInfo: i.bracketInfo, + range: n + }; + } + } + return null; +} +function Pns(i, e, t, s) { + if (i.kind === 4 || i.kind === 2) { + for (const n of i.children) { + t = Zf(e, n.length); + if (Wte(s, t)) { + const r = Pns(n, e, t, s); + if (r) { + return r; + } + } + e = t; + } + return null; + } else { + if (i.kind === 3) { + return null; + } + if (i.kind === 1) { + const n = Yj(e, t); + return { + bracketInfo: i.bracketInfo, + range: n + }; + } + } + return null; +} +function T7t(i, e, t, s, n, r, o, a, l, c, u = false) { + if (o > 200) { + return true; + } + e: while (true) { + switch (i.kind) { + case 4: + { + const d = i.childrenLength; + for (let h = 0; h < d; h++) { + const g = i.getChild(h); + if (g) { + t = Zf(e, g.length); + if (Vte(e, n) && Bpe(t, s)) { + if (Bpe(t, n)) { + i = g; + continue e; + } + if (!T7t(g, e, t, s, n, r, o, 0, l, c)) { + return false; + } + } + e = t; + } + } + return true; + } + case 2: + { + const d = !c || !i.closingBracket || i.closingBracket.bracketInfo.closesColorized(i.openingBracket.bracketInfo); + let h = 0; + if (l) { + let p = l.get(i.openingBracket.text); + if (p === undefined) { + p = 0; + } + h = p; + if (d) { + p++; + l.set(i.openingBracket.text, p); + } + } + const g = i.childrenLength; + for (let p = 0; p < g; p++) { + const b = i.getChild(p); + if (b) { + t = Zf(e, b.length); + if (Vte(e, n) && Bpe(t, s)) { + if (Bpe(t, n) && b.kind !== 1) { + i = b; + if (d) { + o++; + a = h + 1; + } else { + a = h; + } + continue e; + } + if ((d || b.kind !== 1 || !i.closingBracket) && !T7t(b, e, t, s, n, r, d ? o + 1 : o, d ? h + 1 : h, l, c, !i.closingBracket)) { + return false; + } + } + e = t; + } + } + l?.set(i.openingBracket.text, h); + return true; + } + case 3: + { + const d = Yj(e, t); + return r(new m7t(d, o - 1, 0, true)); + } + case 1: + { + const d = Yj(e, t); + return r(new m7t(d, o - 1, a - 1, u)); + } + case 0: + return true; + } + } +} +function P7t(i, e, t, s, n, r, o, a) { + if (o > 200) { + return true; + } + let l = true; + if (i.kind === 2) { + let c = 0; + if (a) { + let h = a.get(i.openingBracket.text); + if (h === undefined) { + h = 0; + } + c = h; + h++; + a.set(i.openingBracket.text, h); + } + const u = Zf(e, i.openingBracket.length); + let d = -1; + if (r.includeMinIndentation) { + d = i.computeMinIndentation(e, r.textModel); + } + l = r.push(new lns(Yj(e, t), Yj(e, u), i.closingBracket ? Yj(Zf(u, i.child?.length || tS), t) : undefined, o, c, i, d)); + e = u; + if (l && i.child) { + const h = i.child; + t = Zf(e, h.length); + if (Vte(e, n) && Bpe(t, s) && (l = P7t(h, e, t, s, n, r, o + 1, a), !l)) { + return false; + } + } + a?.set(i.openingBracket.text, c); + } else { + let c = e; + for (const u of i.children) { + const d = c; + c = Zf(c, u.length); + if (Vte(d, n) && Vte(s, c) && (l = P7t(u, d, c, s, n, r, o, a), !l)) { + return false; + } + } + } + return l; +} +var Lns; +var Rns; +var YKn = ue({ + "out-build/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/bracketPairsTree.js"() { + "use strict"; + + pe(); + q(); + BKn(); + slt(); + wns(); + I4(); + Ens(); + qte(); + x7t(); + Jt(); + Dns(); + Lns = class extends H { + didLanguageChange(i) { + return this.g.didLanguageChange(i); + } + constructor(i, e) { + super(); + this.m = i; + this.n = e; + this.a = new B(); + this.f = new v7t(); + this.g = new k7t(this.f, this.n); + this.onDidChange = this.a.event; + this.h = []; + this.j = []; + if (i.tokenization.hasTokens) { + if (i.tokenization.backgroundTokenizationState === 2) { + this.b = undefined; + this.c = this.t([], undefined, false); + } else { + this.b = this.t([], undefined, true); + this.c = this.b; + } + } else { + const t = this.g.getSingleLanguageBracketTokens(this.m.getLanguageId()); + const s = new vns(this.m.getValue(), t); + this.b = D7t(s, [], undefined, true); + this.c = this.b; + } + } + handleDidChangeBackgroundTokenizationState() { + if (this.m.tokenization.backgroundTokenizationState === 2) { + const i = this.b === undefined; + this.b = undefined; + if (!i) { + this.a.fire(); + } + } + } + handleDidChangeTokens({ + ranges: i + }) { + const e = i.map(t => new G9(zp(t.fromLineNumber - 1, 0), zp(t.toLineNumber, 0), zp(t.toLineNumber - t.fromLineNumber + 1, 0))); + this.q(e, true); + if (!this.b) { + this.a.fire(); + } + } + handleContentChanged(i) { + const e = G9.fromModelContentChanges(i.changes); + this.q(e, false); + } + q(i, e) { + const t = clt(this.j, i); + this.j = t; + if (this.b && !e) { + this.h = clt(this.h, i); + } + } + s() { + if (this.j.length > 0) { + this.c = this.t(this.j, this.c, false); + this.j = []; + } + if (this.h.length > 0) { + this.b &&= this.t(this.h, this.b, false); + this.h = []; + } + } + t(i, e, t) { + const n = e; + const r = new S7t(this.m, this.g); + return D7t(r, i, n, t); + } + getBracketsInRange(i, e) { + this.s(); + const t = zp(i.startLineNumber - 1, i.startColumn - 1); + const s = zp(i.endLineNumber - 1, i.endColumn - 1); + return new IZ(n => { + const r = this.b || this.c; + T7t(r, tS, r.length, t, s, n, 0, 0, new Map(), e); + }); + } + getBracketPairsInRange(i, e) { + this.s(); + const t = Hte(i.getStartPosition()); + const s = Hte(i.getEndPosition()); + return new IZ(n => { + const r = this.b || this.c; + const o = new Rns(n, e, this.m); + P7t(r, tS, r.length, t, s, o, 0, new Map()); + }); + } + getFirstBracketAfter(i) { + this.s(); + const e = this.b || this.c; + return Pns(e, tS, e.length, Hte(i)); + } + getFirstBracketBefore(i) { + this.s(); + const e = this.b || this.c; + return Tns(e, tS, e.length, Hte(i)); + } + }; + Rns = class { + constructor(i, e, t) { + this.push = i; + this.includeMinIndentation = e; + this.textModel = t; + } + }; + } +}); +function XKn(i, e) { + return { + object: i, + dispose: () => e?.dispose() + }; +} +function L7t(i) { + if (typeof i === "undefined") { + return () => true; + } + { + const e = Date.now(); + return () => Date.now() - e <= i; + } +} +function dlt(i) { + if (i instanceof Y9) { + return null; + } else { + return i; + } +} +var Nns; +var Y9; +var QKn = ue({ + "out-build/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsImpl.js"() { + "use strict"; + + Jt(); + pe(); + q(); + yt(); + vge(); + vot(); + YKn(); + Nns = class extends H { + get f() { + return this.h.getValueLength() <= 5000000; + } + constructor(i, e) { + super(); + this.h = i; + this.j = e; + this.a = this.D(new ki()); + this.c = new B(); + this.onDidChange = this.c.event; + this.g = false; + } + handleLanguageConfigurationServiceChange(i) { + if (!i.languageId || this.a.value?.object.didLanguageChange(i.languageId)) { + this.a.clear(); + this.m(); + } + } + handleDidChangeOptions(i) { + this.a.clear(); + this.m(); + } + handleDidChangeLanguage(i) { + this.a.clear(); + this.m(); + } + handleDidChangeContent(i) { + this.a.value?.object.handleContentChanged(i); + } + handleDidChangeBackgroundTokenizationState() { + this.a.value?.object.handleDidChangeBackgroundTokenizationState(); + } + handleDidChangeTokens(i) { + this.a.value?.object.handleDidChangeTokens(i); + } + m() { + if (this.g && this.f) { + if (!this.a.value) { + const i = new Q(); + this.a.value = XKn(i.add(new Lns(this.h, e => this.j.getLanguageConfiguration(e))), i); + i.add(this.a.value.object.onDidChange(e => this.c.fire(e))); + this.c.fire(); + } + } else if (this.a.value) { + this.a.clear(); + this.c.fire(); + } + } + getBracketPairsInRange(i) { + this.g = true; + this.m(); + return this.a.value?.object.getBracketPairsInRange(i, false) || IZ.empty; + } + getBracketPairsInRangeWithMinIndentation(i) { + this.g = true; + this.m(); + return this.a.value?.object.getBracketPairsInRange(i, true) || IZ.empty; + } + getBracketsInRange(i, e = false) { + this.g = true; + this.m(); + return this.a.value?.object.getBracketsInRange(i, e) || IZ.empty; + } + findMatchingBracketUp(i, e, t) { + const s = this.h.validatePosition(e); + const n = this.h.getLanguageIdAtPosition(s.lineNumber, s.column); + if (this.f) { + const r = this.j.getLanguageConfiguration(n).bracketsNew.getClosingBracketInfo(i); + if (!r) { + return null; + } + const o = this.getBracketPairsInRange(Z.fromPositions(e, e)).findLast(a => r.closes(a.openingBracketInfo)); + if (o) { + return o.openingBracketRange; + } else { + return null; + } + } else { + const r = i.toLowerCase(); + const o = this.j.getLanguageConfiguration(n).brackets; + if (!o) { + return null; + } + const a = o.textIsBracket[r]; + if (a) { + return dlt(this.t(a, s, L7t(t))); + } else { + return null; + } + } + } + matchBracket(i, e) { + if (this.f) { + const t = this.getBracketPairsInRange(Z.fromPositions(i, i)).filter(s => s.closingBracketRange !== undefined && (s.openingBracketRange.containsPosition(i) || s.closingBracketRange.containsPosition(i))).findLastMaxBy(jg(s => s.openingBracketRange.containsPosition(i) ? s.openingBracketRange : s.closingBracketRange, Z.compareRangesUsingStarts)); + if (t) { + return [t.openingBracketRange, t.closingBracketRange]; + } else { + return null; + } + } else { + const t = L7t(e); + return this.q(this.h.validatePosition(i), t); + } + } + n(i, e, t, s) { + const n = e.getCount(); + const r = e.getLanguageId(s); + let o = Math.max(0, i.column - 1 - t.maxBracketLength); + for (let l = s - 1; l >= 0; l--) { + const c = e.getEndOffset(l); + if (c <= o) { + break; + } + if (Z2(e.getStandardTokenType(l)) || e.getLanguageId(l) !== r) { + o = c; + break; + } + } + let a = Math.min(e.getLineContent().length, i.column - 1 + t.maxBracketLength); + for (let l = s + 1; l < n; l++) { + const c = e.getStartOffset(l); + if (c >= a) { + break; + } + if (Z2(e.getStandardTokenType(l)) || e.getLanguageId(l) !== r) { + a = c; + break; + } + } + return { + searchStartOffset: o, + searchEndOffset: a + }; + } + q(i, e) { + const t = i.lineNumber; + const s = this.h.tokenization.getLineTokens(t); + const n = this.h.getLineContent(t); + const r = s.findTokenIndexAtOffset(i.column - 1); + if (r < 0) { + return null; + } + const o = this.j.getLanguageConfiguration(s.getLanguageId(r)).brackets; + if (o && !Z2(s.getStandardTokenType(r))) { + let { + searchStartOffset: a, + searchEndOffset: l + } = this.n(i, s, o, r); + let c = null; + while (true) { + const u = LT.findNextBracketInRange(o.forwardRegex, t, n, a, l); + if (!u) { + break; + } + if (u.startColumn <= i.column && i.column <= u.endColumn) { + const d = n.substring(u.startColumn - 1, u.endColumn - 1).toLowerCase(); + const h = this.s(u, o.textIsBracket[d], o.textIsOpenBracket[d], e); + if (h) { + if (h instanceof Y9) { + return null; + } + c = h; + } + } + a = u.endColumn - 1; + } + if (c) { + return c; + } + } + if (r > 0 && s.getStartOffset(r) === i.column - 1) { + const a = r - 1; + const l = this.j.getLanguageConfiguration(s.getLanguageId(a)).brackets; + if (l && !Z2(s.getStandardTokenType(a))) { + const { + searchStartOffset: c, + searchEndOffset: u + } = this.n(i, s, l, a); + const d = LT.findPrevBracketInRange(l.reversedRegex, t, n, c, u); + if (d && d.startColumn <= i.column && i.column <= d.endColumn) { + const h = n.substring(d.startColumn - 1, d.endColumn - 1).toLowerCase(); + const g = this.s(d, l.textIsBracket[h], l.textIsOpenBracket[h], e); + if (g) { + if (g instanceof Y9) { + return null; + } else { + return g; + } + } + } + } + } + return null; + } + s(i, e, t, s) { + if (!e) { + return null; + } + const n = t ? this.u(e, i.getEndPosition(), s) : this.t(e, i.getStartPosition(), s); + if (n) { + if (n instanceof Y9) { + return n; + } else { + return [i, n]; + } + } else { + return null; + } + } + t(i, e, t) { + const s = i.languageId; + const n = i.reversedRegex; + let r = -1; + let o = 0; + const a = (l, c, u, d) => { + while (true) { + if (t && ++o % 100 === 0 && !t()) { + return Y9.INSTANCE; + } + const h = LT.findPrevBracketInRange(n, l, c, u, d); + if (!h) { + break; + } + const g = c.substring(h.startColumn - 1, h.endColumn - 1).toLowerCase(); + if (i.isOpen(g)) { + r++; + } else if (i.isClose(g)) { + r--; + } + if (r === 0) { + return h; + } + d = h.startColumn - 1; + } + return null; + }; + for (let l = e.lineNumber; l >= 1; l--) { + const c = this.h.tokenization.getLineTokens(l); + const u = c.getCount(); + const d = this.h.getLineContent(l); + let h = u - 1; + let g = d.length; + let p = d.length; + if (l === e.lineNumber) { + h = c.findTokenIndexAtOffset(e.column - 1); + g = e.column - 1; + p = e.column - 1; + } + let b = true; + for (; h >= 0; h--) { + const v = c.getLanguageId(h) === s && !Z2(c.getStandardTokenType(h)); + if (v) { + if (b) { + g = c.getStartOffset(h); + } else { + g = c.getStartOffset(h); + p = c.getEndOffset(h); + } + } else if (b && g !== p) { + const y = a(l, d, g, p); + if (y) { + return y; + } + } + b = v; + } + if (b && g !== p) { + const v = a(l, d, g, p); + if (v) { + return v; + } + } + } + return null; + } + u(i, e, t) { + const s = i.languageId; + const n = i.forwardRegex; + let r = 1; + let o = 0; + const a = (c, u, d, h) => { + while (true) { + if (t && ++o % 100 === 0 && !t()) { + return Y9.INSTANCE; + } + const g = LT.findNextBracketInRange(n, c, u, d, h); + if (!g) { + break; + } + const p = u.substring(g.startColumn - 1, g.endColumn - 1).toLowerCase(); + if (i.isOpen(p)) { + r++; + } else if (i.isClose(p)) { + r--; + } + if (r === 0) { + return g; + } + d = g.endColumn - 1; + } + return null; + }; + const l = this.h.getLineCount(); + for (let c = e.lineNumber; c <= l; c++) { + const u = this.h.tokenization.getLineTokens(c); + const d = u.getCount(); + const h = this.h.getLineContent(c); + let g = 0; + let p = 0; + let b = 0; + if (c === e.lineNumber) { + g = u.findTokenIndexAtOffset(e.column - 1); + p = e.column - 1; + b = e.column - 1; + } + let v = true; + for (; g < d; g++) { + const y = u.getLanguageId(g) === s && !Z2(u.getStandardTokenType(g)); + if (y) { + if (!v) { + p = u.getStartOffset(g); + } + b = u.getEndOffset(g); + } else if (v && p !== b) { + const w = a(c, h, p, b); + if (w) { + return w; + } + } + v = y; + } + if (v && p !== b) { + const y = a(c, h, p, b); + if (y) { + return y; + } + } + } + return null; + } + findPrevBracket(i) { + const e = this.h.validatePosition(i); + if (this.f) { + this.g = true; + this.m(); + return this.a.value?.object.getFirstBracketBefore(e) || null; + } + let t = null; + let s = null; + let n = null; + for (let r = e.lineNumber; r >= 1; r--) { + const o = this.h.tokenization.getLineTokens(r); + const a = o.getCount(); + const l = this.h.getLineContent(r); + let c = a - 1; + let u = l.length; + let d = l.length; + if (r === e.lineNumber) { + c = o.findTokenIndexAtOffset(e.column - 1); + u = e.column - 1; + d = e.column - 1; + const g = o.getLanguageId(c); + if (t !== g) { + t = g; + s = this.j.getLanguageConfiguration(t).brackets; + n = this.j.getLanguageConfiguration(t).bracketsNew; + } + } + let h = true; + for (; c >= 0; c--) { + const g = o.getLanguageId(c); + if (t !== g) { + if (s && n && h && u !== d) { + const b = LT.findPrevBracketInRange(s.reversedRegex, r, l, u, d); + if (b) { + return this.w(n, b); + } + h = false; + } + t = g; + s = this.j.getLanguageConfiguration(t).brackets; + n = this.j.getLanguageConfiguration(t).bracketsNew; + } + const p = !!s && !Z2(o.getStandardTokenType(c)); + if (p) { + if (h) { + u = o.getStartOffset(c); + } else { + u = o.getStartOffset(c); + d = o.getEndOffset(c); + } + } else if (n && s && h && u !== d) { + const b = LT.findPrevBracketInRange(s.reversedRegex, r, l, u, d); + if (b) { + return this.w(n, b); + } + } + h = p; + } + if (n && s && h && u !== d) { + const g = LT.findPrevBracketInRange(s.reversedRegex, r, l, u, d); + if (g) { + return this.w(n, g); + } + } + } + return null; + } + findNextBracket(i) { + const e = this.h.validatePosition(i); + if (this.f) { + this.g = true; + this.m(); + return this.a.value?.object.getFirstBracketAfter(e) || null; + } + const t = this.h.getLineCount(); + let s = null; + let n = null; + let r = null; + for (let o = e.lineNumber; o <= t; o++) { + const a = this.h.tokenization.getLineTokens(o); + const l = a.getCount(); + const c = this.h.getLineContent(o); + let u = 0; + let d = 0; + let h = 0; + if (o === e.lineNumber) { + u = a.findTokenIndexAtOffset(e.column - 1); + d = e.column - 1; + h = e.column - 1; + const p = a.getLanguageId(u); + if (s !== p) { + s = p; + n = this.j.getLanguageConfiguration(s).brackets; + r = this.j.getLanguageConfiguration(s).bracketsNew; + } + } + let g = true; + for (; u < l; u++) { + const p = a.getLanguageId(u); + if (s !== p) { + if (r && n && g && d !== h) { + const v = LT.findNextBracketInRange(n.forwardRegex, o, c, d, h); + if (v) { + return this.w(r, v); + } + g = false; + } + s = p; + n = this.j.getLanguageConfiguration(s).brackets; + r = this.j.getLanguageConfiguration(s).bracketsNew; + } + const b = !!n && !Z2(a.getStandardTokenType(u)); + if (b) { + if (!g) { + d = a.getStartOffset(u); + } + h = a.getEndOffset(u); + } else if (r && n && g && d !== h) { + const v = LT.findNextBracketInRange(n.forwardRegex, o, c, d, h); + if (v) { + return this.w(r, v); + } + } + g = b; + } + if (r && n && g && d !== h) { + const p = LT.findNextBracketInRange(n.forwardRegex, o, c, d, h); + if (p) { + return this.w(r, p); + } + } + } + return null; + } + findEnclosingBrackets(i, e) { + const t = this.h.validatePosition(i); + if (this.f) { + const h = Z.fromPositions(t); + const g = this.getBracketPairsInRange(Z.fromPositions(t, t)).findLast(p => p.closingBracketRange !== undefined && p.range.strictContainsRange(h)); + if (g) { + return [g.openingBracketRange, g.closingBracketRange]; + } else { + return null; + } + } + const s = L7t(e); + const n = this.h.getLineCount(); + const r = new Map(); + let o = []; + const a = (h, g) => { + if (!r.has(h)) { + const p = []; + for (let b = 0, v = g ? g.brackets.length : 0; b < v; b++) { + p[b] = 0; + } + r.set(h, p); + } + o = r.get(h); + }; + let l = 0; + const c = (h, g, p, b, v) => { + while (true) { + if (s && ++l % 100 === 0 && !s()) { + return Y9.INSTANCE; + } + const y = LT.findNextBracketInRange(h.forwardRegex, g, p, b, v); + if (!y) { + break; + } + const w = p.substring(y.startColumn - 1, y.endColumn - 1).toLowerCase(); + const C = h.textIsBracket[w]; + if (C && (C.isOpen(w) ? o[C.index]++ : C.isClose(w) && o[C.index]--, o[C.index] === -1)) { + return this.s(y, C, false, s); + } + b = y.endColumn - 1; + } + return null; + }; + let u = null; + let d = null; + for (let h = t.lineNumber; h <= n; h++) { + const g = this.h.tokenization.getLineTokens(h); + const p = g.getCount(); + const b = this.h.getLineContent(h); + let v = 0; + let y = 0; + let w = 0; + if (h === t.lineNumber) { + v = g.findTokenIndexAtOffset(t.column - 1); + y = t.column - 1; + w = t.column - 1; + const S = g.getLanguageId(v); + if (u !== S) { + u = S; + d = this.j.getLanguageConfiguration(u).brackets; + a(u, d); + } + } + let C = true; + for (; v < p; v++) { + const S = g.getLanguageId(v); + if (u !== S) { + if (d && C && y !== w) { + const k = c(d, h, b, y, w); + if (k) { + return dlt(k); + } + C = false; + } + u = S; + d = this.j.getLanguageConfiguration(u).brackets; + a(u, d); + } + const x = !!d && !Z2(g.getStandardTokenType(v)); + if (x) { + if (!C) { + y = g.getStartOffset(v); + } + w = g.getEndOffset(v); + } else if (d && C && y !== w) { + const k = c(d, h, b, y, w); + if (k) { + return dlt(k); + } + } + C = x; + } + if (d && C && y !== w) { + const S = c(d, h, b, y, w); + if (S) { + return dlt(S); + } + } + } + return null; + } + w(i, e) { + if (!e) { + return null; + } + let t = this.h.getValueInRange(e); + t = t.toLowerCase(); + const s = i.getBracketInfo(t); + if (s) { + return { + range: e, + bracketInfo: s + }; + } else { + return null; + } + } + }; + Y9 = class oOn { + static { + this.INSTANCE = new oOn(); + } + constructor() { + this._searchCanceledBrand = undefined; + } + }; + } +}); +var Mns; +var R7t; +var ZKn = ue({ + "out-build/vs/editor/common/model/bracketPairsTextModelPart/colorizedBracketPairsDecorationProvider.js"() { + "use strict"; + + pe(); + q(); + yt(); + z0(); + gi(); + Mns = class extends H { + constructor(i) { + super(); + this.g = i; + this.b = new R7t(); + this.f = new B(); + this.onDidChange = this.f.event; + this.a = i.getOptions().bracketPairColorizationOptions; + this.D(i.bracketPairs.onDidChange(e => { + this.f.fire(); + })); + } + handleDidChangeOptions(i) { + this.a = this.g.getOptions().bracketPairColorizationOptions; + } + getDecorationsInRange(i, e, t, s) { + if (s) { + return []; + } else if (e === undefined) { + return []; + } else if (this.a.enabled) { + return this.g.bracketPairs.getBracketsInRange(i, true).map(r => ({ + id: `bracket${r.range.toString()}-${r.nestingLevel}`, + options: { + description: "BracketPairColorization", + inlineClassName: this.b.getInlineClassName(r, this.a.independentColorPoolPerBracketType) + }, + ownerId: 0, + range: r.range + })).toArray(); + } else { + return []; + } + } + getAllDecorations(i, e) { + if (i === undefined) { + return []; + } else if (this.a.enabled) { + return this.getDecorationsInRange(new Z(1, 1, this.g.getLineCount(), 1), i, e); + } else { + return []; + } + } + }; + R7t = class { + constructor() { + this.unexpectedClosingBracketClassName = "unexpected-closing-bracket"; + } + getInlineClassName(i, e) { + if (i.isInvalid) { + return this.unexpectedClosingBracketClassName; + } else { + return this.getInlineClassNameOfLevel(e ? i.nestingLevelOfEqualBracketType : i.nestingLevel); + } + } + getInlineClassNameOfLevel(i) { + return `bracket-highlighting-${i % 30}`; + } + }; + bf((i, e) => { + const t = [t9t, i9t, s9t, n9t, r9t, o9t]; + const s = new R7t(); + e.addRule(`.monaco-editor .${s.unexpectedClosingBracketClassName} { color: ${i.getColor(ets)}; }`); + const n = t.map(r => i.getColor(r)).filter(r => !!r).filter(r => !r.isTransparent()); + for (let r = 0; r < 30; r++) { + const o = n[r % n.length]; + e.addRule(`.monaco-editor .${s.getInlineClassNameOfLevel(r)} { color: ${o}; }`); + } + }); + } +}); +function hlt(i) { + return i.replace(/\n/g, "\\n").replace(/\r/g, "\\r"); +} +function eYn(i, e) { + if (i === null || i.length === 0) { + return e; + } else { + return new Ans(i, e).compress(); + } +} +var RM; +var Ans; +var $ns = ue({ + "out-build/vs/editor/common/core/textChange.js"() { + "use strict"; + + nr(); + mM(); + RM = class E2 { + get oldLength() { + return this.oldText.length; + } + get oldEnd() { + return this.oldPosition + this.oldText.length; + } + get newLength() { + return this.newText.length; + } + get newEnd() { + return this.newPosition + this.newText.length; + } + constructor(e, t, s, n) { + this.oldPosition = e; + this.oldText = t; + this.newPosition = s; + this.newText = n; + } + shift(e) { + return new E2(this.oldPosition + e, this.oldText, this.newPosition + e, this.newText); + } + toString() { + if (this.oldText.length === 0) { + return `(insert@${this.oldPosition} "${hlt(this.newText)}")`; + } else if (this.newText.length === 0) { + return `(delete@${this.oldPosition} "${hlt(this.oldText)}")`; + } else { + return `(replace@${this.oldPosition} "${hlt(this.oldText)}" with "${hlt(this.newText)}")`; + } + } + static a(e) { + return 4 + e.length * 2; + } + static c(e, t, s) { + const n = t.length; + vx(e, n, s); + s += 4; + for (let r = 0; r < n; r++) { + JHn(e, t.charCodeAt(r), s); + s += 2; + } + return s; + } + static d(e, t) { + const s = bx(e, t); + t += 4; + return Hqn(e, t, s); + } + writeSize() { + return 8 + E2.a(this.oldText) + E2.a(this.newText); + } + write(e, t) { + vx(e, this.oldPosition, t); + t += 4; + vx(e, this.newPosition, t); + t += 4; + t = E2.c(e, this.oldText, t); + t = E2.c(e, this.newText, t); + return t; + } + static read(e, t, s) { + const n = bx(e, t); + t += 4; + const r = bx(e, t); + t += 4; + const o = E2.d(e, t); + t += E2.a(o); + const a = E2.d(e, t); + t += E2.a(a); + s.push(new E2(n, o, r, a)); + return t; + } + }; + Ans = class E3 { + constructor(e, t) { + this.a = e; + this.c = t; + this.d = []; + this.e = 0; + this.f = this.a.length; + this.g = 0; + this.h = this.c.length; + this.j = 0; + } + compress() { + let e = 0; + let t = 0; + let s = this.n(e); + let n = this.l(t); + while (e < this.f || t < this.h) { + if (s === null) { + this.k(n); + n = this.l(++t); + continue; + } + if (n === null) { + this.m(s); + s = this.n(++e); + continue; + } + if (n.oldEnd <= s.newPosition) { + this.k(n); + n = this.l(++t); + continue; + } + if (s.newEnd <= n.oldPosition) { + this.m(s); + s = this.n(++e); + continue; + } + if (n.oldPosition < s.newPosition) { + const [c, u] = E3.r(n, s.newPosition - n.oldPosition); + this.k(c); + n = u; + continue; + } + if (s.newPosition < n.oldPosition) { + const [c, u] = E3.q(s, n.oldPosition - s.newPosition); + this.m(c); + s = u; + continue; + } + let a; + let l; + if (n.oldEnd === s.newEnd) { + a = s; + l = n; + s = this.n(++e); + n = this.l(++t); + } else if (n.oldEnd < s.newEnd) { + const [c, u] = E3.q(s, n.oldLength); + a = c; + l = n; + s = u; + n = this.l(++t); + } else { + const [c, u] = E3.r(n, s.newLength); + a = s; + l = c; + s = this.n(++e); + n = u; + } + this.d[this.e++] = new RM(a.oldPosition, a.oldText, l.newPosition, l.newText); + this.g += a.newLength - a.oldLength; + this.j += l.newLength - l.oldLength; + } + const r = E3.s(this.d); + return E3.t(r); + } + k(e) { + this.d[this.e++] = E3.o(this.g, e); + this.j += e.newLength - e.oldLength; + } + l(e) { + if (e < this.h) { + return this.c[e]; + } else { + return null; + } + } + m(e) { + this.d[this.e++] = E3.p(this.j, e); + this.g += e.newLength - e.oldLength; + } + n(e) { + if (e < this.f) { + return this.a[e]; + } else { + return null; + } + } + static o(e, t) { + return new RM(t.oldPosition - e, t.oldText, t.newPosition, t.newText); + } + static p(e, t) { + return new RM(t.oldPosition, t.oldText, t.newPosition + e, t.newText); + } + static q(e, t) { + const s = e.newText.substr(0, t); + const n = e.newText.substr(t); + return [new RM(e.oldPosition, e.oldText, e.newPosition, s), new RM(e.oldEnd, "", e.newPosition + t, n)]; + } + static r(e, t) { + const s = e.oldText.substr(0, t); + const n = e.oldText.substr(t); + return [new RM(e.oldPosition, s, e.newPosition, e.newText), new RM(e.oldPosition + t, n, e.newEnd, "")]; + } + static s(e) { + if (e.length === 0) { + return e; + } + const t = []; + let s = 0; + let n = e[0]; + for (let r = 1; r < e.length; r++) { + const o = e[r]; + if (n.oldEnd === o.oldPosition) { + n = new RM(n.oldPosition, n.oldText + o.oldText, n.newPosition, n.newText + o.newText); + } else { + t[s++] = n; + n = o; + } + } + t[s++] = n; + return t; + } + static t(e) { + if (e.length === 0) { + return e; + } + const t = []; + let s = 0; + for (let n = 0; n < e.length; n++) { + const r = e[n]; + if (r.oldText !== r.newText) { + t[s++] = r; + } + } + return t; + } + }; + } +}); +function jte(i) { + return i.toString(); +} +function N7t(i) { + if (i.getEOL() === ` +`) { + return 0; + } else { + return 1; + } +} +function T4(i) { + if (i) { + return i instanceof fF || i instanceof Xj; + } else { + return false; + } +} +var OI; +var fF; +var Xj; +var Fns; +var zte = ue({ + "out-build/vs/editor/common/model/editStack.js"() { + "use strict"; + + X(); + Ut(); + ua(); + Le(); + $ns(); + nr(); + Et(); + Rs(); + OI = class I3 { + static create(e, t) { + const s = e.getAlternativeVersionId(); + const n = N7t(e); + return new I3(s, s, n, n, t, t, []); + } + constructor(e, t, s, n, r, o, a) { + this.beforeVersionId = e; + this.afterVersionId = t; + this.beforeEOL = s; + this.afterEOL = n; + this.beforeCursorState = r; + this.afterCursorState = o; + this.changes = a; + } + append(e, t, s, n, r) { + if (t.length > 0) { + this.changes = eYn(this.changes, t); + } + this.afterEOL = s; + this.afterVersionId = n; + this.afterCursorState = r; + } + static c(e) { + return 4 + (e ? e.length : 0) * 16; + } + static d(e, t, s) { + vx(e, t ? t.length : 0, s); + s += 4; + if (t) { + for (const n of t) { + vx(e, n.selectionStartLineNumber, s); + s += 4; + vx(e, n.selectionStartColumn, s); + s += 4; + vx(e, n.positionLineNumber, s); + s += 4; + vx(e, n.positionColumn, s); + s += 4; + } + } + return s; + } + static f(e, t, s) { + const n = bx(e, t); + t += 4; + for (let r = 0; r < n; r++) { + const o = bx(e, t); + t += 4; + const a = bx(e, t); + t += 4; + const l = bx(e, t); + t += 4; + const c = bx(e, t); + t += 4; + s.push(new Vs(o, a, l, c)); + } + return t; + } + serialize() { + let e = 10 + I3.c(this.beforeCursorState) + I3.c(this.afterCursorState) + 4; + for (const n of this.changes) { + e += n.writeSize(); + } + const t = new Uint8Array(e); + let s = 0; + vx(t, this.beforeVersionId, s); + s += 4; + vx(t, this.afterVersionId, s); + s += 4; + m5t(t, this.beforeEOL, s); + s += 1; + m5t(t, this.afterEOL, s); + s += 1; + s = I3.d(t, this.beforeCursorState, s); + s = I3.d(t, this.afterCursorState, s); + vx(t, this.changes.length, s); + s += 4; + for (const n of this.changes) { + s = n.write(t, s); + } + return t.buffer; + } + static deserialize(e) { + const t = new Uint8Array(e); + let s = 0; + const n = bx(t, s); + s += 4; + const r = bx(t, s); + s += 4; + const o = p5t(t, s); + s += 1; + const a = p5t(t, s); + s += 1; + const l = []; + s = I3.f(t, s, l); + const c = []; + s = I3.f(t, s, c); + const u = bx(t, s); + s += 4; + const d = []; + for (let h = 0; h < u; h++) { + s = RM.read(t, s, d); + } + return new I3(n, r, o, a, l, c, d); + } + }; + fF = class { + get type() { + return 0; + } + get resource() { + if (V.isUri(this.model)) { + return this.model; + } else { + return this.model.uri; + } + } + constructor(i, e, t, s) { + this.label = i; + this.code = e; + this.model = t; + this.c = OI.create(t, s); + } + toString() { + return (this.c instanceof OI ? this.c : OI.deserialize(this.c)).changes.map(e => e.toString()).join(", "); + } + matchesResource(i) { + return (V.isUri(this.model) ? this.model : this.model.uri).toString() === i.toString(); + } + setModel(i) { + this.model = i; + } + canAppend(i) { + return this.model === i && this.c instanceof OI; + } + append(i, e, t, s, n) { + if (this.c instanceof OI) { + this.c.append(i, e, t, s, n); + } + } + close() { + if (this.c instanceof OI) { + this.c = this.c.serialize(); + } + } + open() { + if (!(this.c instanceof OI)) { + this.c = OI.deserialize(this.c); + } + } + undo() { + if (V.isUri(this.model)) { + throw new Error("Invalid SingleModelEditStackElement"); + } + if (this.c instanceof OI) { + this.c = this.c.serialize(); + } + const i = OI.deserialize(this.c); + this.model._applyUndo(i.changes, i.beforeEOL, i.beforeVersionId, i.beforeCursorState); + } + redo() { + if (V.isUri(this.model)) { + throw new Error("Invalid SingleModelEditStackElement"); + } + if (this.c instanceof OI) { + this.c = this.c.serialize(); + } + const i = OI.deserialize(this.c); + this.model._applyRedo(i.changes, i.afterEOL, i.afterVersionId, i.afterCursorState); + } + rebase(i, e, t, s, n, r, o, a) { + this.open(); + const l = t - (e - i); + const c = this.c; + const u = c.changes.map(g => (s ? g.newPosition : g.oldPosition) >= e ? g.shift(l) : g); + c.changes = u; + const d = g => g.lineNumber > n ? new je(g.lineNumber + o, g.column) : g.lineNumber === n && g.column >= r ? new je(g.lineNumber + o, g.column + a) : g; + const h = g => Vs.fromPositions(d(g.getStartPosition()), d(g.getEndPosition())); + c.afterCursorState = c.afterCursorState?.map(h) ?? null; + c.beforeCursorState = c.beforeCursorState?.map(h) ?? null; + this.close(); + } + heapSize() { + if (this.c instanceof OI) { + this.c = this.c.serialize(); + } + return this.c.byteLength + 168; + } + }; + Xj = class { + get resources() { + return this.d.map(i => i.resource); + } + constructor(i, e, t) { + this.label = i; + this.code = e; + this.type = 1; + this.c = true; + this.d = t.slice(0); + this.f = new Map(); + for (const s of this.d) { + const n = jte(s.resource); + this.f.set(n, s); + } + this.g = null; + } + setDelegate(i) { + this.g = i; + } + prepareUndoRedo() { + if (this.g) { + return this.g.prepareUndoRedo(this); + } + } + getMissingModels() { + const i = []; + for (const e of this.d) { + if (V.isUri(e.model)) { + i.push(e.model); + } + } + return i; + } + matchesResource(i) { + const e = jte(i); + return this.f.has(e); + } + setModel(i) { + const e = jte(V.isUri(i) ? i : i.uri); + if (this.f.has(e)) { + this.f.get(e).setModel(i); + } + } + canAppend(i) { + if (!this.c) { + return false; + } + const e = jte(i.uri); + if (this.f.has(e)) { + return this.f.get(e).canAppend(i); + } else { + return false; + } + } + append(i, e, t, s, n) { + const r = jte(i.uri); + this.f.get(r).append(i, e, t, s, n); + } + close() { + this.c = false; + } + open() {} + undo() { + this.c = false; + for (const i of this.d) { + i.undo(); + } + } + redo() { + for (const i of this.d) { + i.redo(); + } + } + heapSize(i) { + const e = jte(i); + if (this.f.has(e)) { + return this.f.get(e).heapSize(); + } else { + return 0; + } + } + split() { + return this.d; + } + toString() { + const i = []; + for (const e of this.d) { + i.push(`${ji(e.resource)}: ${e}`); + } + return `{${i.join(", ")}}`; + } + }; + Fns = class aOn { + constructor(e, t) { + this.c = e; + this.d = t; + } + pushStackElement() { + const e = this.d.getLastElement(this.c.uri); + if (T4(e)) { + e.close(); + } + } + popStackElement() { + const e = this.d.getLastElement(this.c.uri); + if (T4(e)) { + e.open(); + } + } + clear() { + this.d.removeElements(this.c.uri); + } + f(e, t, s) { + const n = this.d.getLastElement(this.c.uri); + if (T4(n) && n.canAppend(this.c) && s !== true) { + return n; + } + const r = new fF(f(834, null), "undoredo.textBufferEdit", this.c, e); + this.d.pushElement(r, t); + return r; + } + pushEOL(e) { + const t = this.f(null, undefined); + this.c.setEOL(e); + t.append(this.c, [], N7t(this.c), this.c.getAlternativeVersionId(), null); + } + pushEditOperation(e, t, s, n, r) { + const o = this.f(e, n, r); + const a = this.c.applyEdits(t, true); + const l = aOn.g(s, a); + const c = a.map((u, d) => ({ + index: d, + textChange: u.textChange + })); + c.sort((u, d) => u.textChange.oldPosition === d.textChange.oldPosition ? u.index - d.index : u.textChange.oldPosition - d.textChange.oldPosition); + o.append(this.c, c.map(u => u.textChange), N7t(this.c), this.c.getAlternativeVersionId(), l); + return l; + } + static g(e, t) { + try { + if (e) { + return e(t); + } else { + return null; + } + } catch (s) { + xs(s); + return null; + } + } + }; + } +}); +function tYn(i, e, t, s, n) { + n.spacesDiff = 0; + n.looksLikeAlignment = false; + let r; + for (r = 0; r < e && r < s; r++) { + const h = i.charCodeAt(r); + const g = t.charCodeAt(r); + if (h !== g) { + break; + } + } + let o = 0; + let a = 0; + for (let h = r; h < e; h++) { + if (i.charCodeAt(h) === 32) { + o++; + } else { + a++; + } + } + let l = 0; + let c = 0; + for (let h = r; h < s; h++) { + if (t.charCodeAt(h) === 32) { + l++; + } else { + c++; + } + } + if (o > 0 && a > 0 || l > 0 && c > 0) { + return; + } + const u = Math.abs(a - c); + const d = Math.abs(o - l); + if (u === 0) { + n.spacesDiff = d; + if (d > 0 && l - 1 >= 0 && l - 1 < i.length && l < t.length && t.charCodeAt(l) !== 32 && i.charCodeAt(l - 1) === 32 && i.charCodeAt(i.length - 1) === 44) { + n.looksLikeAlignment = true; + } + return; + } + if (d % u === 0) { + n.spacesDiff = d / u; + return; + } +} +function Ons(i, e, t) { + const s = Math.min(i.getLineCount(), 10000); + let n = 0; + let r = 0; + let o = ""; + let a = 0; + const l = [2, 4, 6, 8, 3, 5, 7]; + const c = 8; + const u = [0, 0, 0, 0, 0, 0, 0, 0, 0]; + const d = new _ns(); + for (let p = 1; p <= s; p++) { + const b = i.getLineLength(p); + const v = i.getLineContent(p); + const y = b <= 65536; + let w = false; + let C = 0; + let S = 0; + let x = 0; + for (let E = 0, D = b; E < D; E++) { + const P = y ? v.charCodeAt(E) : i.getLineCharCode(p, E); + if (P === 9) { + x++; + } else if (P === 32) { + S++; + } else { + w = true; + C = E; + break; + } + } + if (!w || (x > 0 ? n++ : S > 1 && r++, tYn(o, a, v, C, d), d.looksLikeAlignment && (!t || e !== d.spacesDiff))) { + continue; + } + const k = d.spacesDiff; + if (k <= c) { + u[k]++; + } + o = v; + a = C; + } + let h = t; + if (n !== r) { + h = n < r; + } + let g = e; + if (h) { + let p = h ? 0 : s * 0.1; + l.forEach(b => { + const v = u[b]; + if (v > p) { + p = v; + g = b; + } + }); + if (g === 4 && u[4] > 0 && u[2] > 0 && u[2] >= u[4] / 2) { + g = 2; + } + } + return { + insertSpaces: h, + tabSize: g + }; +} +var _ns; +var iYn = ue({ + "out-build/vs/editor/common/model/indentationGuesser.js"() { + "use strict"; + + _ns = class { + constructor() { + this.spacesDiff = 0; + this.looksLikeAlignment = false; + } + }; + } +}); +function Tx(i) { + return (i.metadata & 1) >>> 0; +} +function tf(i, e) { + i.metadata = i.metadata & 254 | e << 0; +} +function Bw(i) { + return (i.metadata & 2) >>> 1 === 1; +} +function Vh(i, e) { + i.metadata = i.metadata & 253 | (e ? 1 : 0) << 1; +} +function Bns(i) { + return (i.metadata & 4) >>> 2 === 1; +} +function Uns(i, e) { + i.metadata = i.metadata & 251 | (e ? 1 : 0) << 2; +} +function Wns(i) { + return (i.metadata & 64) >>> 6 === 1; +} +function Vns(i, e) { + i.metadata = i.metadata & 191 | (e ? 1 : 0) << 6; +} +function sYn(i) { + return (i.metadata & 24) >>> 3; +} +function Hns(i, e) { + i.metadata = i.metadata & 231 | e << 3; +} +function nYn(i) { + return (i.metadata & 32) >>> 5 === 1; +} +function qns(i, e) { + i.metadata = i.metadata & 223 | (e ? 1 : 0) << 5; +} +function rYn(i) { + let e = i.root; + let t = 0; + while (e !== kl) { + if (e.left !== kl && !Bw(e.left)) { + e = e.left; + continue; + } + if (e.right !== kl && !Bw(e.right)) { + t += e.delta; + e = e.right; + continue; + } + e.start = t + e.start; + e.end = t + e.end; + e.delta = 0; + X9(e); + Vh(e, true); + Vh(e.left, false); + Vh(e.right, false); + if (e === e.parent.right) { + t -= e.parent.delta; + } + e = e.parent; + } + Vh(i.root, false); +} +function Jte(i, e, t, s) { + if (i < t) { + return true; + } else if (i > t || s === 1) { + return false; + } else if (s === 2) { + return true; + } else { + return e; + } +} +function oYn(i, e, t, s, n) { + const r = sYn(i); + const o = r === 0 || r === 2; + const a = r === 1 || r === 2; + const l = t - e; + const c = s; + const u = Math.min(l, c); + const d = i.start; + let h = false; + const g = i.end; + let p = false; + if (e <= d && g <= t && nYn(i)) { + i.start = e; + h = true; + i.end = e; + p = true; + } + { + const v = n ? 1 : l > 0 ? 2 : 0; + if (!h && Jte(d, o, e, v)) { + h = true; + } + if (!p && Jte(g, a, e, v)) { + p = true; + } + } + if (u > 0 && !n) { + const v = l > c ? 2 : 0; + if (!h && Jte(d, o, e + u, v)) { + h = true; + } + if (!p && Jte(g, a, e + u, v)) { + p = true; + } + } + { + const v = n ? 1 : 0; + if (!h && Jte(d, o, t, v)) { + i.start = e + c; + h = true; + } + if (!p && Jte(g, a, t, v)) { + i.end = e + c; + p = true; + } + } + const b = c - l; + if (!h) { + i.start = Math.max(0, d + b); + } + if (!p) { + i.end = Math.max(0, g + b); + } + if (i.start > i.end) { + i.end = i.start; + } +} +function aYn(i, e, t) { + let s = i.root; + let n = 0; + let r = 0; + let o = 0; + let a = 0; + const l = []; + let c = 0; + while (s !== kl) { + if (Bw(s)) { + Vh(s.left, false); + Vh(s.right, false); + if (s === s.parent.right) { + n -= s.parent.delta; + } + s = s.parent; + continue; + } + if (!Bw(s.left)) { + r = n + s.maxEnd; + if (r < e) { + Vh(s, true); + continue; + } + if (s.left !== kl) { + s = s.left; + continue; + } + } + o = n + s.start; + if (o > t) { + Vh(s, true); + continue; + } + a = n + s.end; + if (a >= e) { + s.setCachedOffsets(o, a, 0); + l[c++] = s; + } + Vh(s, true); + if (s.right !== kl && !Bw(s.right)) { + n += s.delta; + s = s.right; + continue; + } + } + Vh(i.root, false); + return l; +} +function lYn(i, e, t, s) { + let n = i.root; + let r = 0; + let o = 0; + let a = 0; + const l = s - (t - e); + while (n !== kl) { + if (Bw(n)) { + Vh(n.left, false); + Vh(n.right, false); + if (n === n.parent.right) { + r -= n.parent.delta; + } + X9(n); + n = n.parent; + continue; + } + if (!Bw(n.left)) { + o = r + n.maxEnd; + if (o < e) { + Vh(n, true); + continue; + } + if (n.left !== kl) { + n = n.left; + continue; + } + } + a = r + n.start; + if (a > t) { + n.start += l; + n.end += l; + n.delta += l; + if (n.delta < -1073741824 || n.delta > 1073741824) { + i.requestNormalizeDelta = true; + } + Vh(n, true); + continue; + } + Vh(n, true); + if (n.right !== kl && !Bw(n.right)) { + r += n.delta; + n = n.right; + continue; + } + } + Vh(i.root, false); +} +function cYn(i, e) { + let t = i.root; + const s = []; + let n = 0; + while (t !== kl) { + if (Bw(t)) { + Vh(t.left, false); + Vh(t.right, false); + t = t.parent; + continue; + } + if (t.left !== kl && !Bw(t.left)) { + t = t.left; + continue; + } + if (t.ownerId === e) { + s[n++] = t; + } + Vh(t, true); + if (t.right !== kl && !Bw(t.right)) { + t = t.right; + continue; + } + } + Vh(i.root, false); + return s; +} +function uYn(i) { + let e = i.root; + const t = []; + let s = 0; + while (e !== kl) { + if (Bw(e)) { + Vh(e.left, false); + Vh(e.right, false); + e = e.parent; + continue; + } + if (e.left !== kl && !Bw(e.left)) { + e = e.left; + continue; + } + if (e.right !== kl && !Bw(e.right)) { + e = e.right; + continue; + } + t[s++] = e; + Vh(e, true); + } + Vh(i.root, false); + return t; +} +function jns(i, e, t, s, n) { + let r = i.root; + let o = 0; + let a = 0; + let l = 0; + const c = []; + let u = 0; + while (r !== kl) { + if (Bw(r)) { + Vh(r.left, false); + Vh(r.right, false); + if (r === r.parent.right) { + o -= r.parent.delta; + } + r = r.parent; + continue; + } + if (r.left !== kl && !Bw(r.left)) { + r = r.left; + continue; + } + a = o + r.start; + l = o + r.end; + r.setCachedOffsets(a, l, s); + let d = true; + if (e && r.ownerId && r.ownerId !== e) { + d = false; + } + if (t && Bns(r)) { + d = false; + } + if (n && !Wns(r)) { + d = false; + } + if (d) { + c[u++] = r; + } + Vh(r, true); + if (r.right !== kl && !Bw(r.right)) { + o += r.delta; + r = r.right; + continue; + } + } + Vh(i.root, false); + return c; +} +function dYn(i, e, t, s, n, r, o) { + let a = i.root; + let l = 0; + let c = 0; + let u = 0; + let d = 0; + const h = []; + let g = 0; + while (a !== kl) { + if (Bw(a)) { + Vh(a.left, false); + Vh(a.right, false); + if (a === a.parent.right) { + l -= a.parent.delta; + } + a = a.parent; + continue; + } + if (!Bw(a.left)) { + c = l + a.maxEnd; + if (c < e) { + Vh(a, true); + continue; + } + if (a.left !== kl) { + a = a.left; + continue; + } + } + u = l + a.start; + if (u > t) { + Vh(a, true); + continue; + } + d = l + a.end; + if (d >= e) { + a.setCachedOffsets(u, d, r); + let p = true; + if (s && a.ownerId && a.ownerId !== s) { + p = false; + } + if (n && Bns(a)) { + p = false; + } + if (o && !Wns(a)) { + p = false; + } + if (p) { + h[g++] = a; + } + } + Vh(a, true); + if (a.right !== kl && !Bw(a.right)) { + l += a.delta; + a = a.right; + continue; + } + } + Vh(i.root, false); + return h; +} +function zns(i, e) { + if (i.root === kl) { + e.parent = kl; + e.left = kl; + e.right = kl; + tf(e, 0); + i.root = e; + return i.root; + } + hYn(i, e); + Q9(e.parent); + let t = e; + while (t !== i.root && Tx(t.parent) === 1) { + if (t.parent === t.parent.parent.left) { + const s = t.parent.parent.right; + if (Tx(s) === 1) { + tf(t.parent, 0); + tf(s, 0); + tf(t.parent.parent, 1); + t = t.parent.parent; + } else { + if (t === t.parent.right) { + t = t.parent; + Vpe(i, t); + } + tf(t.parent, 0); + tf(t.parent.parent, 1); + Hpe(i, t.parent.parent); + } + } else { + const s = t.parent.parent.left; + if (Tx(s) === 1) { + tf(t.parent, 0); + tf(s, 0); + tf(t.parent.parent, 1); + t = t.parent.parent; + } else { + if (t === t.parent.left) { + t = t.parent; + Hpe(i, t); + } + tf(t.parent, 0); + tf(t.parent.parent, 1); + Vpe(i, t.parent.parent); + } + } + } + tf(i.root, 0); + return e; +} +function hYn(i, e) { + let t = 0; + let s = i.root; + const n = e.start; + const r = e.end; + while (true) { + if (gYn(n, r, s.start + t, s.end + t) < 0) { + if (s.left === kl) { + e.start -= t; + e.end -= t; + e.maxEnd -= t; + s.left = e; + break; + } else { + s = s.left; + } + } else if (s.right === kl) { + e.start -= t + s.delta; + e.end -= t + s.delta; + e.maxEnd -= t + s.delta; + s.right = e; + break; + } else { + t += s.delta; + s = s.right; + } + } + e.parent = s; + e.left = kl; + e.right = kl; + tf(e, 1); +} +function Jns(i, e) { + let t; + let s; + if (e.left === kl) { + t = e.right; + s = e; + t.delta += e.delta; + if (t.delta < -1073741824 || t.delta > 1073741824) { + i.requestNormalizeDelta = true; + } + t.start += e.delta; + t.end += e.delta; + } else if (e.right === kl) { + t = e.left; + s = e; + } else { + s = fYn(e.right); + t = s.right; + t.start += s.delta; + t.end += s.delta; + t.delta += s.delta; + if (t.delta < -1073741824 || t.delta > 1073741824) { + i.requestNormalizeDelta = true; + } + s.start += e.delta; + s.end += e.delta; + s.delta = e.delta; + if (s.delta < -1073741824 || s.delta > 1073741824) { + i.requestNormalizeDelta = true; + } + } + if (s === i.root) { + i.root = t; + tf(t, 0); + e.detach(); + M7t(); + X9(t); + i.root.parent = kl; + return; + } + const n = Tx(s) === 1; + if (s === s.parent.left) { + s.parent.left = t; + } else { + s.parent.right = t; + } + if (s === e) { + t.parent = s.parent; + } else { + if (s.parent === e) { + t.parent = s; + } else { + t.parent = s.parent; + } + s.left = e.left; + s.right = e.right; + s.parent = e.parent; + tf(s, Tx(e)); + if (e === i.root) { + i.root = s; + } else if (e === e.parent.left) { + e.parent.left = s; + } else { + e.parent.right = s; + } + if (s.left !== kl) { + s.left.parent = s; + } + if (s.right !== kl) { + s.right.parent = s; + } + } + e.detach(); + if (n) { + Q9(t.parent); + if (s !== e) { + Q9(s); + Q9(s.parent); + } + M7t(); + return; + } + Q9(t); + Q9(t.parent); + if (s !== e) { + Q9(s); + Q9(s.parent); + } + let r; + while (t !== i.root && Tx(t) === 0) { + if (t === t.parent.left) { + r = t.parent.right; + if (Tx(r) === 1) { + tf(r, 0); + tf(t.parent, 1); + Vpe(i, t.parent); + r = t.parent.right; + } + if (Tx(r.left) === 0 && Tx(r.right) === 0) { + tf(r, 1); + t = t.parent; + } else { + if (Tx(r.right) === 0) { + tf(r.left, 0); + tf(r, 1); + Hpe(i, r); + r = t.parent.right; + } + tf(r, Tx(t.parent)); + tf(t.parent, 0); + tf(r.right, 0); + Vpe(i, t.parent); + t = i.root; + } + } else { + r = t.parent.left; + if (Tx(r) === 1) { + tf(r, 0); + tf(t.parent, 1); + Hpe(i, t.parent); + r = t.parent.left; + } + if (Tx(r.left) === 0 && Tx(r.right) === 0) { + tf(r, 1); + t = t.parent; + } else { + if (Tx(r.left) === 0) { + tf(r.right, 0); + tf(r, 1); + Vpe(i, r); + r = t.parent.left; + } + tf(r, Tx(t.parent)); + tf(t.parent, 0); + tf(r.left, 0); + Hpe(i, t.parent); + t = i.root; + } + } + } + tf(t, 0); + M7t(); +} +function fYn(i) { + while (i.left !== kl) { + i = i.left; + } + return i; +} +function M7t() { + kl.parent = kl; + kl.delta = 0; + kl.start = 0; + kl.end = 0; +} +function Vpe(i, e) { + const t = e.right; + t.delta += e.delta; + if (t.delta < -1073741824 || t.delta > 1073741824) { + i.requestNormalizeDelta = true; + } + t.start += e.delta; + t.end += e.delta; + e.right = t.left; + if (t.left !== kl) { + t.left.parent = e; + } + t.parent = e.parent; + if (e.parent === kl) { + i.root = t; + } else if (e === e.parent.left) { + e.parent.left = t; + } else { + e.parent.right = t; + } + t.left = e; + e.parent = t; + X9(e); + X9(t); +} +function Hpe(i, e) { + const t = e.left; + e.delta -= t.delta; + if (e.delta < -1073741824 || e.delta > 1073741824) { + i.requestNormalizeDelta = true; + } + e.start -= t.delta; + e.end -= t.delta; + e.left = t.right; + if (t.right !== kl) { + t.right.parent = e; + } + t.parent = e.parent; + if (e.parent === kl) { + i.root = t; + } else if (e === e.parent.right) { + e.parent.right = t; + } else { + e.parent.left = t; + } + t.right = e; + e.parent = t; + X9(e); + X9(t); +} +function Gns(i) { + let e = i.end; + if (i.left !== kl) { + const t = i.left.maxEnd; + if (t > e) { + e = t; + } + } + if (i.right !== kl) { + const t = i.right.maxEnd + i.delta; + if (t > e) { + e = t; + } + } + return e; +} +function X9(i) { + i.maxEnd = Gns(i); +} +function Q9(i) { + while (i !== kl) { + const e = Gns(i); + if (i.maxEnd === e) { + return; + } + i.maxEnd = e; + i = i.parent; + } +} +function gYn(i, e, t, s) { + if (i === t) { + return e - s; + } else { + return i - t; + } +} +var Kns; +var Yns; +var Xns; +var flt; +var kl; +var qpe; +var Qns; +var Zns = ue({ + "out-build/vs/editor/common/model/intervalTree.js"() { + "use strict"; + + (function (i) { + i.EditorHintDecoration = "squiggly-hint"; + i.EditorInfoDecoration = "squiggly-info"; + i.EditorWarningDecoration = "squiggly-warning"; + i.EditorAIDecoration = "squiggly-ai"; + i.EditorErrorDecoration = "squiggly-error"; + i.EditorUnnecessaryDecoration = "squiggly-unnecessary"; + i.EditorUnnecessaryInlineDecoration = "squiggly-inline-unnecessary"; + i.EditorDeprecatedInlineDecoration = "squiggly-inline-deprecated"; + })(Kns ||= {}); + (function (i) { + i[i.Black = 0] = "Black"; + i[i.Red = 1] = "Red"; + })(Yns ||= {}); + (function (i) { + i[i.ColorMask = 1] = "ColorMask"; + i[i.ColorMaskInverse = 254] = "ColorMaskInverse"; + i[i.ColorOffset = 0] = "ColorOffset"; + i[i.IsVisitedMask = 2] = "IsVisitedMask"; + i[i.IsVisitedMaskInverse = 253] = "IsVisitedMaskInverse"; + i[i.IsVisitedOffset = 1] = "IsVisitedOffset"; + i[i.IsForValidationMask = 4] = "IsForValidationMask"; + i[i.IsForValidationMaskInverse = 251] = "IsForValidationMaskInverse"; + i[i.IsForValidationOffset = 2] = "IsForValidationOffset"; + i[i.StickinessMask = 24] = "StickinessMask"; + i[i.StickinessMaskInverse = 231] = "StickinessMaskInverse"; + i[i.StickinessOffset = 3] = "StickinessOffset"; + i[i.CollapseOnReplaceEditMask = 32] = "CollapseOnReplaceEditMask"; + i[i.CollapseOnReplaceEditMaskInverse = 223] = "CollapseOnReplaceEditMaskInverse"; + i[i.CollapseOnReplaceEditOffset = 5] = "CollapseOnReplaceEditOffset"; + i[i.IsMarginMask = 64] = "IsMarginMask"; + i[i.IsMarginMaskInverse = 191] = "IsMarginMaskInverse"; + i[i.IsMarginOffset = 6] = "IsMarginOffset"; + i[i.MIN_SAFE_DELTA = -1073741824] = "MIN_SAFE_DELTA"; + i[i.MAX_SAFE_DELTA = 1073741824] = "MAX_SAFE_DELTA"; + })(Xns ||= {}); + flt = class { + constructor(i, e, t) { + this.metadata = 0; + this.parent = this; + this.left = this; + this.right = this; + tf(this, 1); + this.start = e; + this.end = t; + this.delta = 0; + this.maxEnd = t; + this.id = i; + this.ownerId = 0; + this.options = null; + Uns(this, false); + Vns(this, false); + Hns(this, 1); + qns(this, false); + this.cachedVersionId = 0; + this.cachedAbsoluteStart = e; + this.cachedAbsoluteEnd = t; + this.range = null; + Vh(this, false); + } + reset(i, e, t, s) { + this.start = e; + this.end = t; + this.maxEnd = t; + this.cachedVersionId = i; + this.cachedAbsoluteStart = e; + this.cachedAbsoluteEnd = t; + this.range = s; + } + setOptions(i) { + this.options = i; + const e = this.options.className; + Uns(this, e === "squiggly-error" || e === "squiggly-warning" || e === "squiggly-info"); + Vns(this, this.options.glyphMarginClassName !== null); + Hns(this, this.options.stickiness); + qns(this, this.options.collapseOnReplaceEdit); + } + setCachedOffsets(i, e, t) { + if (this.cachedVersionId !== t) { + this.range = null; + } + this.cachedVersionId = t; + this.cachedAbsoluteStart = i; + this.cachedAbsoluteEnd = e; + } + detach() { + this.parent = null; + this.left = null; + this.right = null; + } + }; + kl = new flt(null, 0, 0); + kl.parent = kl; + kl.left = kl; + kl.right = kl; + tf(kl, 0); + qpe = class { + constructor() { + this.root = kl; + this.requestNormalizeDelta = false; + } + intervalSearch(i, e, t, s, n, r) { + if (this.root === kl) { + return []; + } else { + return dYn(this, i, e, t, s, n, r); + } + } + search(i, e, t, s) { + if (this.root === kl) { + return []; + } else { + return jns(this, i, e, t, s); + } + } + collectNodesFromOwner(i) { + return cYn(this, i); + } + collectNodesPostOrder() { + return uYn(this); + } + insert(i) { + zns(this, i); + this.a(); + } + delete(i) { + Jns(this, i); + this.a(); + } + resolveNode(i, e) { + const t = i; + let s = 0; + while (i !== this.root) { + if (i === i.parent.right) { + s += i.parent.delta; + } + i = i.parent; + } + const n = t.start + s; + const r = t.end + s; + t.setCachedOffsets(n, r, e); + } + acceptReplace(i, e, t, s) { + const n = aYn(this, i, i + e); + for (let r = 0, o = n.length; r < o; r++) { + const a = n[r]; + Jns(this, a); + } + this.a(); + lYn(this, i, i + e, t); + this.a(); + for (let r = 0, o = n.length; r < o; r++) { + const a = n[r]; + a.start = a.cachedAbsoluteStart; + a.end = a.cachedAbsoluteEnd; + oYn(a, i, i + e, t, s); + a.maxEnd = a.end; + zns(this, a); + } + this.a(); + } + getAllInOrder() { + return jns(this, 0, false, 0, false); + } + a() { + if (this.requestNormalizeDelta) { + this.requestNormalizeDelta = false; + rYn(this); + } + } + }; + (function (i) { + i[i.MarkerDefined = 0] = "MarkerDefined"; + i[i.ForceMove = 1] = "ForceMove"; + i[i.ForceStay = 2] = "ForceStay"; + })(Qns ||= {}); + } +}); +function A7t(i) { + while (i.left !== Ta) { + i = i.left; + } + return i; +} +function ers(i) { + while (i.right !== Ta) { + i = i.right; + } + return i; +} +function $7t(i) { + if (i === Ta) { + return 0; + } else { + return i.size_left + i.piece.length + $7t(i.right); + } +} +function F7t(i) { + if (i === Ta) { + return 0; + } else { + return i.lf_left + i.piece.lineFeedCnt + F7t(i.right); + } +} +function O7t() { + Ta.parent = Ta; +} +function jpe(i, e) { + const t = e.right; + t.size_left += e.size_left + (e.piece ? e.piece.length : 0); + t.lf_left += e.lf_left + (e.piece ? e.piece.lineFeedCnt : 0); + e.right = t.left; + if (t.left !== Ta) { + t.left.parent = e; + } + t.parent = e.parent; + if (e.parent === Ta) { + i.root = t; + } else if (e.parent.left === e) { + e.parent.left = t; + } else { + e.parent.right = t; + } + t.left = e; + e.parent = t; +} +function zpe(i, e) { + const t = e.left; + e.left = t.right; + if (t.right !== Ta) { + t.right.parent = e; + } + t.parent = e.parent; + e.size_left -= t.size_left + (t.piece ? t.piece.length : 0); + e.lf_left -= t.lf_left + (t.piece ? t.piece.lineFeedCnt : 0); + if (e.parent === Ta) { + i.root = t; + } else if (e === e.parent.right) { + e.parent.right = t; + } else { + e.parent.left = t; + } + t.right = e; + e.parent = t; +} +function glt(i, e) { + let t; + let s; + if (e.left === Ta) { + s = e; + t = s.right; + } else if (e.right === Ta) { + s = e; + t = s.left; + } else { + s = A7t(e.right); + t = s.right; + } + if (s === i.root) { + i.root = t; + t.color = 0; + e.detach(); + O7t(); + i.root.parent = Ta; + return; + } + const n = s.color === 1; + if (s === s.parent.left) { + s.parent.left = t; + } else { + s.parent.right = t; + } + if (s === e) { + t.parent = s.parent; + Jpe(i, t); + } else { + if (s.parent === e) { + t.parent = s; + } else { + t.parent = s.parent; + } + Jpe(i, t); + s.left = e.left; + s.right = e.right; + s.parent = e.parent; + s.color = e.color; + if (e === i.root) { + i.root = s; + } else if (e === e.parent.left) { + e.parent.left = s; + } else { + e.parent.right = s; + } + if (s.left !== Ta) { + s.left.parent = s; + } + if (s.right !== Ta) { + s.right.parent = s; + } + s.size_left = e.size_left; + s.lf_left = e.lf_left; + Jpe(i, s); + } + e.detach(); + if (t.parent.left === t) { + const o = $7t(t); + const a = F7t(t); + if (o !== t.parent.size_left || a !== t.parent.lf_left) { + const l = o - t.parent.size_left; + const c = a - t.parent.lf_left; + t.parent.size_left = o; + t.parent.lf_left = a; + P4(i, t.parent, l, c); + } + } + Jpe(i, t.parent); + if (n) { + O7t(); + return; + } + let r; + while (t !== i.root && t.color === 0) { + if (t === t.parent.left) { + r = t.parent.right; + if (r.color === 1) { + r.color = 0; + t.parent.color = 1; + jpe(i, t.parent); + r = t.parent.right; + } + if (r.left.color === 0 && r.right.color === 0) { + r.color = 1; + t = t.parent; + } else { + if (r.right.color === 0) { + r.left.color = 0; + r.color = 1; + zpe(i, r); + r = t.parent.right; + } + r.color = t.parent.color; + t.parent.color = 0; + r.right.color = 0; + jpe(i, t.parent); + t = i.root; + } + } else { + r = t.parent.left; + if (r.color === 1) { + r.color = 0; + t.parent.color = 1; + zpe(i, t.parent); + r = t.parent.left; + } + if (r.left.color === 0 && r.right.color === 0) { + r.color = 1; + t = t.parent; + } else { + if (r.left.color === 0) { + r.right.color = 0; + r.color = 1; + jpe(i, r); + r = t.parent.left; + } + r.color = t.parent.color; + t.parent.color = 0; + r.left.color = 0; + zpe(i, t.parent); + t = i.root; + } + } + } + t.color = 0; + O7t(); +} +function trs(i, e) { + for (Jpe(i, e); e !== i.root && e.parent.color === 1;) { + if (e.parent === e.parent.parent.left) { + const t = e.parent.parent.right; + if (t.color === 1) { + e.parent.color = 0; + t.color = 0; + e.parent.parent.color = 1; + e = e.parent.parent; + } else { + if (e === e.parent.right) { + e = e.parent; + jpe(i, e); + } + e.parent.color = 0; + e.parent.parent.color = 1; + zpe(i, e.parent.parent); + } + } else { + const t = e.parent.parent.left; + if (t.color === 1) { + e.parent.color = 0; + t.color = 0; + e.parent.parent.color = 1; + e = e.parent.parent; + } else { + if (e === e.parent.left) { + e = e.parent; + zpe(i, e); + } + e.parent.color = 0; + e.parent.parent.color = 1; + jpe(i, e.parent.parent); + } + } + } + i.root.color = 0; +} +function P4(i, e, t, s) { + while (e !== i.root && e !== Ta) { + if (e.parent.left === e) { + e.parent.size_left += t; + e.parent.lf_left += s; + } + e = e.parent; + } +} +function Jpe(i, e) { + let t = 0; + let s = 0; + if (e !== i.root) { + while (e !== i.root && e === e.parent.right) { + e = e.parent; + } + if (e !== i.root) { + e = e.parent; + t = $7t(e.left) - e.size_left; + s = F7t(e.left) - e.lf_left; + e.size_left += t; + e.lf_left += s; + while (e !== i.root && (t !== 0 || s !== 0)) { + if (e.parent.left === e) { + e.parent.size_left += t; + e.parent.lf_left += s; + } + e = e.parent; + } + } + } +} +var plt; +var irs; +var Ta; +var pYn = ue({ + "out-build/vs/editor/common/model/pieceTreeTextBuffer/rbTreeBase.js"() { + "use strict"; + + plt = class { + constructor(i, e) { + this.piece = i; + this.color = e; + this.size_left = 0; + this.lf_left = 0; + this.parent = this; + this.left = this; + this.right = this; + } + next() { + if (this.right !== Ta) { + return A7t(this.right); + } + let i = this; + while (i.parent !== Ta && i.parent.left !== i) { + i = i.parent; + } + if (i.parent === Ta) { + return Ta; + } else { + return i.parent; + } + } + prev() { + if (this.left !== Ta) { + return ers(this.left); + } + let i = this; + while (i.parent !== Ta && i.parent.right !== i) { + i = i.parent; + } + if (i.parent === Ta) { + return Ta; + } else { + return i.parent; + } + } + detach() { + this.parent = null; + this.left = null; + this.right = null; + } + }; + (function (i) { + i[i.Black = 0] = "Black"; + i[i.Red = 1] = "Red"; + })(irs ||= {}); + Ta = new plt(null, 0); + Ta.parent = Ta; + Ta.left = Ta; + Ta.right = Ta; + Ta.color = 0; + } +}); +function srs(i) { + if (!i || i.length === 0) { + return false; + } + for (let e = 0, t = i.length; e < t; e++) { + const s = i.charCodeAt(e); + if (s === 10) { + return true; + } + if (s === 92) { + e++; + if (e >= t) { + break; + } + const n = i.charCodeAt(e); + if (n === 110 || n === 114 || n === 87) { + return true; + } + } + if (s === 91 && e + 5 < t && i.charCodeAt(e + 1) === 92) { + const n = i.charCodeAt(e + 2); + if ((n === 115 || n === 83 || n === 100 || n === 68) && i.charCodeAt(e + 3) === 92) { + const r = i.charCodeAt(e + 4); + if ((n === 115 && r === 83 || n === 83 && r === 115 || n === 100 && r === 68 || n === 68 && r === 100) && i.charCodeAt(e + 5) === 93) { + return true; + } + } + } + } + return false; +} +function Qj(i, e, t) { + if (!t) { + return new mte(i, null); + } + const s = []; + for (let n = 0, r = e.length; n < r; n++) { + s[n] = e[n]; + } + return new mte(i, s); +} +function mYn(i, e, t, s, n) { + if (s === 0) { + return true; + } + const r = e.charCodeAt(s - 1); + if (i.get(r) !== 0 || r === 13 || r === 10) { + return true; + } + if (n > 0) { + const o = e.charCodeAt(s); + if (i.get(o) !== 0) { + return true; + } + } + return false; +} +function bYn(i, e, t, s, n) { + if (s + n === t) { + return true; + } + const r = e.charCodeAt(s + n); + if (i.get(r) !== 0 || r === 13 || r === 10) { + return true; + } + if (n > 0) { + const o = e.charCodeAt(s + n - 1); + if (i.get(o) !== 0) { + return true; + } + } + return false; +} +function _7t(i, e, t, s, n) { + return mYn(i, e, t, s, n) && bYn(i, e, t, s, n); +} +var nrs; +var UT; +var B7t; +var Gpe; +var Zj; +var Z9 = ue({ + "out-build/vs/editor/common/model/textModelSearch.js"() { + "use strict"; + + $i(); + xge(); + Rs(); + yt(); + gc(); + nrs = 999; + UT = class { + constructor(i, e, t, s) { + this.searchString = i; + this.isRegex = e; + this.matchCase = t; + this.wordSeparators = s; + } + parseSearchRequest() { + if (this.searchString === "") { + return null; + } + let i; + if (this.isRegex) { + i = srs(this.searchString); + } else { + i = this.searchString.indexOf(` +`) >= 0; + } + let e = null; + try { + e = ofe(this.searchString, this.isRegex, { + matchCase: this.matchCase, + wholeWord: false, + multiline: i, + global: true, + unicode: true + }); + } catch { + return null; + } + if (!e) { + return null; + } + let t = !this.isRegex && !i; + if (t && this.searchString.toLowerCase() !== this.searchString.toUpperCase()) { + t = this.matchCase; + } + return new Dts(e, this.wordSeparators ? PT(this.wordSeparators, []) : null, t ? this.searchString : null); + } + }; + B7t = class { + constructor(i) { + const e = []; + let t = 0; + for (let s = 0, n = i.length; s < n; s++) { + if (i.charCodeAt(s) === 10) { + e[t++] = s; + } + } + this.a = e; + } + findLineFeedCountBeforeOffset(i) { + const e = this.a; + let t = 0; + let s = e.length - 1; + if (s === -1 || i <= e[0]) { + return 0; + } + while (t < s) { + const n = t + ((s - t) / 2 >> 0); + if (e[n] >= i) { + s = n - 1; + } else if (e[n + 1] >= i) { + t = n; + s = n; + } else { + t = n + 1; + } + } + return t + 1; + } + }; + Gpe = class { + static findMatches(i, e, t, s, n) { + const r = e.parseSearchRequest(); + if (r) { + if (r.regex.multiline) { + return this.b(i, t, new Zj(r.wordSeparators, r.regex), s, n); + } else { + return this.c(i, t, r, s, n); + } + } else { + return []; + } + } + static a(i, e, t, s, n, r) { + let o; + let a = 0; + if (s) { + a = s.findLineFeedCountBeforeOffset(n); + o = e + n + a; + } else { + o = e + n; + } + let l; + if (s) { + const h = s.findLineFeedCountBeforeOffset(n + r.length) - a; + l = o + r.length + h; + } else { + l = o + r.length; + } + const c = i.getPositionAt(o); + const u = i.getPositionAt(l); + return new Z(c.lineNumber, c.column, u.lineNumber, u.column); + } + static b(i, e, t, s, n) { + const r = i.getOffsetAt(e.getStartPosition()); + const o = i.getValueInRange(e, 1); + const a = i.getEOL() === `\r +` ? new B7t(o) : null; + const l = []; + let c = 0; + let u; + for (t.reset(0); u = t.next(o);) { + l[c++] = Qj(this.a(i, r, o, a, u.index, u[0]), u, s); + if (c >= n) { + return l; + } + } + return l; + } + static c(i, e, t, s, n) { + const r = []; + let o = 0; + if (e.startLineNumber === e.endLineNumber) { + const l = i.getLineContent(e.startLineNumber).substring(e.startColumn - 1, e.endColumn - 1); + o = this.e(t, l, e.startLineNumber, e.startColumn - 1, o, r, s, n); + return r; + } + const a = i.getLineContent(e.startLineNumber).substring(e.startColumn - 1); + o = this.e(t, a, e.startLineNumber, e.startColumn - 1, o, r, s, n); + for (let l = e.startLineNumber + 1; l < e.endLineNumber && o < n; l++) { + o = this.e(t, i.getLineContent(l), l, 0, o, r, s, n); + } + if (o < n) { + const l = i.getLineContent(e.endLineNumber).substring(0, e.endColumn - 1); + o = this.e(t, l, e.endLineNumber, 0, o, r, s, n); + } + return r; + } + static e(i, e, t, s, n, r, o, a) { + const l = i.wordSeparators; + if (!o && i.simpleSearch) { + const d = i.simpleSearch; + const h = d.length; + const g = e.length; + let p = -h; + while ((p = e.indexOf(d, p + h)) !== -1) { + if ((!l || _7t(l, e, g, p, h)) && (r[n++] = new mte(new Z(t, p + 1 + s, t, p + 1 + h + s), null), n >= a)) { + return n; + } + } + return n; + } + const c = new Zj(i.wordSeparators, i.regex); + let u; + c.reset(0); + do { + u = c.next(e); + if (u && (r[n++] = Qj(new Z(t, u.index + 1 + s, t, u.index + 1 + u[0].length + s), u, o), n >= a)) { + return n; + } + } while (u); + return n; + } + static findNextMatch(i, e, t, s) { + const n = e.parseSearchRequest(); + if (!n) { + return null; + } + const r = new Zj(n.wordSeparators, n.regex); + if (n.regex.multiline) { + return this.f(i, t, r, s); + } else { + return this.g(i, t, r, s); + } + } + static f(i, e, t, s) { + const n = new je(e.lineNumber, 1); + const r = i.getOffsetAt(n); + const o = i.getLineCount(); + const a = i.getValueInRange(new Z(n.lineNumber, n.column, o, i.getLineMaxColumn(o)), 1); + const l = i.getEOL() === `\r +` ? new B7t(a) : null; + t.reset(e.column - 1); + const c = t.next(a); + if (c) { + return Qj(this.a(i, r, a, l, c.index, c[0]), c, s); + } else if (e.lineNumber !== 1 || e.column !== 1) { + return this.f(i, new je(1, 1), t, s); + } else { + return null; + } + } + static g(i, e, t, s) { + const n = i.getLineCount(); + const r = e.lineNumber; + const o = i.getLineContent(r); + const a = this.h(t, o, r, e.column, s); + if (a) { + return a; + } + for (let l = 1; l <= n; l++) { + const c = (r + l - 1) % n; + const u = i.getLineContent(c + 1); + const d = this.h(t, u, c + 1, 1, s); + if (d) { + return d; + } + } + return null; + } + static h(i, e, t, s, n) { + i.reset(s - 1); + const r = i.next(e); + if (r) { + return Qj(new Z(t, r.index + 1, t, r.index + 1 + r[0].length), r, n); + } else { + return null; + } + } + static findPreviousMatch(i, e, t, s) { + const n = e.parseSearchRequest(); + if (!n) { + return null; + } + const r = new Zj(n.wordSeparators, n.regex); + if (n.regex.multiline) { + return this.j(i, t, r, s); + } else { + return this.k(i, t, r, s); + } + } + static j(i, e, t, s) { + const n = this.b(i, new Z(1, 1, e.lineNumber, e.column), t, s, nrs * 10); + if (n.length > 0) { + return n[n.length - 1]; + } + const r = i.getLineCount(); + if (e.lineNumber !== r || e.column !== i.getLineMaxColumn(r)) { + return this.j(i, new je(r, i.getLineMaxColumn(r)), t, s); + } else { + return null; + } + } + static k(i, e, t, s) { + const n = i.getLineCount(); + const r = e.lineNumber; + const o = i.getLineContent(r).substring(0, e.column - 1); + const a = this.l(t, o, r, s); + if (a) { + return a; + } + for (let l = 1; l <= n; l++) { + const c = (n + r - l - 1) % n; + const u = i.getLineContent(c + 1); + const d = this.l(t, u, c + 1, s); + if (d) { + return d; + } + } + return null; + } + static l(i, e, t, s) { + let n = null; + let r; + for (i.reset(0); r = i.next(e);) { + n = Qj(new Z(t, r.index + 1, t, r.index + 1 + r[0].length), r, s); + } + return n; + } + }; + Zj = class { + constructor(i, e) { + this._wordSeparators = i; + this.a = e; + this.b = -1; + this.c = 0; + } + reset(i) { + this.a.lastIndex = i; + this.b = -1; + this.c = 0; + } + next(i) { + const e = i.length; + let t; + do { + if (this.b + this.c === e || (t = this.a.exec(i), !t)) { + return null; + } + const s = t.index; + const n = t[0].length; + if (s === this.b && n === this.c) { + if (n === 0) { + if (Unt(i, e, this.a.lastIndex) > 65535) { + this.a.lastIndex += 2; + } else { + this.a.lastIndex += 1; + } + continue; + } + return null; + } + this.b = s; + this.c = n; + if (!this._wordSeparators || _7t(this._wordSeparators, i, e, s, n)) { + return t; + } + } while (t); + return null; + } + }; + } +}); +function rrs(i) { + let e; + if (i[i.length - 1] < 65536) { + e = new Uint16Array(i.length); + } else { + e = new Uint32Array(i.length); + } + e.set(i, 0); + return e; +} +function L4(i, e = true) { + const t = [0]; + let s = 1; + for (let n = 0, r = i.length; n < r; n++) { + const o = i.charCodeAt(n); + if (o === 13) { + if (n + 1 < r && i.charCodeAt(n + 1) === 10) { + t[s++] = n + 2; + n++; + } else { + t[s++] = n + 1; + } + } else if (o === 10) { + t[s++] = n + 1; + } + } + if (e) { + return rrs(t); + } else { + return t; + } +} +function vYn(i, e) { + i.length = 0; + i[0] = 0; + let t = 1; + let s = 0; + let n = 0; + let r = 0; + let o = true; + for (let l = 0, c = e.length; l < c; l++) { + const u = e.charCodeAt(l); + if (u === 13) { + if (l + 1 < c && e.charCodeAt(l + 1) === 10) { + r++; + i[t++] = l + 2; + l++; + } else { + s++; + i[t++] = l + 1; + } + } else if (u === 10) { + n++; + i[t++] = l + 1; + } else if (o && u !== 9 && (u < 32 || u > 126)) { + o = false; + } + } + const a = new ors(rrs(i), s, n, r, o); + i.length = 0; + return a; +} +var gF; +var ors; +var Px; +var e7; +var ars; +var lrs; +var crs; +var urs = ue({ + "out-build/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeBase.js"() { + "use strict"; + + Rs(); + yt(); + gc(); + pYn(); + Z9(); + gF = 65535; + ors = class { + constructor(i, e, t, s, n) { + this.lineStarts = i; + this.cr = e; + this.lf = t; + this.crlf = s; + this.isBasicASCII = n; + } + }; + Px = class { + constructor(i, e, t, s, n) { + this.bufferIndex = i; + this.start = e; + this.end = t; + this.lineFeedCnt = s; + this.length = n; + } + }; + e7 = class { + constructor(i, e) { + this.buffer = i; + this.lineStarts = e; + } + }; + ars = class { + constructor(i, e) { + this.a = []; + this.c = i; + this.d = e; + this.b = 0; + if (i.root !== Ta) { + i.iterate(i.root, t => { + if (t !== Ta) { + this.a.push(t.piece); + } + return true; + }); + } + } + read() { + if (this.a.length === 0) { + if (this.b === 0) { + this.b++; + return this.d; + } else { + return null; + } + } else if (this.b > this.a.length - 1) { + return null; + } else if (this.b === 0) { + return this.d + this.c.getPieceContent(this.a[this.b++]); + } else { + return this.c.getPieceContent(this.a[this.b++]); + } + } + }; + lrs = class { + constructor(i) { + this.a = i; + this.b = []; + } + get(i) { + for (let e = this.b.length - 1; e >= 0; e--) { + const t = this.b[e]; + if (t.nodeStartOffset <= i && t.nodeStartOffset + t.node.piece.length >= i) { + return t; + } + } + return null; + } + get2(i) { + for (let e = this.b.length - 1; e >= 0; e--) { + const t = this.b[e]; + if (t.nodeStartLineNumber && t.nodeStartLineNumber < i && t.nodeStartLineNumber + t.node.piece.lineFeedCnt >= i) { + return t; + } + } + return null; + } + set(i) { + if (this.b.length >= this.a) { + this.b.shift(); + } + this.b.push(i); + } + validate(i) { + let e = false; + const t = this.b; + for (let s = 0; s < t.length; s++) { + const n = t[s]; + if (n.node.parent === null || n.nodeStartOffset >= i) { + t[s] = null; + e = true; + continue; + } + } + if (e) { + const s = []; + for (const n of t) { + if (n !== null) { + s.push(n); + } + } + this.b = s; + } + } + }; + crs = class { + constructor(i, e, t) { + this.create(i, e, t); + } + create(i, e, t) { + this.a = [new e7("", [0])]; + this.g = { + line: 0, + column: 0 + }; + this.root = Ta; + this.b = 1; + this.c = 0; + this.d = e; + this.e = e.length; + this.f = t; + let s = null; + for (let n = 0, r = i.length; n < r; n++) { + if (i[n].buffer.length > 0) { + i[n].lineStarts ||= L4(i[n].buffer); + const o = new Px(n + 1, { + line: 0, + column: 0 + }, { + line: i[n].lineStarts.length - 1, + column: i[n].buffer.length - i[n].lineStarts[i[n].lineStarts.length - 1] + }, i[n].lineStarts.length - 1, i[n].buffer.length); + this.a.push(i[n]); + s = this.S(s, o); + } + } + this.h = new lrs(1); + this.j = { + lineNumber: 0, + value: "" + }; + this.y(); + } + normalizeEOL(i) { + const e = gF; + const t = e - Math.floor(e / 3); + const s = t * 2; + let n = ""; + let r = 0; + const o = []; + this.iterate(this.root, a => { + const l = this.R(a); + const c = l.length; + if (r <= t || r + c < s) { + n += l; + r += c; + return true; + } + const u = n.replace(/\r\n|\r|\n/g, i); + o.push(new e7(u, L4(u))); + n = l; + r = c; + return true; + }); + if (r > 0) { + const a = n.replace(/\r\n|\r|\n/g, i); + o.push(new e7(a, L4(a))); + } + this.create(o, i, true); + } + getEOL() { + return this.d; + } + setEOL(i) { + this.d = i; + this.e = this.d.length; + this.normalizeEOL(i); + } + createSnapshot(i) { + return new ars(this, i); + } + equal(i) { + if (this.getLength() !== i.getLength() || this.getLineCount() !== i.getLineCount()) { + return false; + } + let e = 0; + return this.iterate(this.root, s => { + if (s === Ta) { + return true; + } + const n = this.R(s); + const r = n.length; + const o = i.G(e); + const a = i.G(e + r); + const l = i.getValueInRange2(o, a); + e += r; + return n === l; + }); + } + getOffsetAt(i, e) { + let t = 0; + let s = this.root; + while (s !== Ta) { + if (s.left !== Ta && s.lf_left + 1 >= i) { + s = s.left; + } else if (s.lf_left + s.piece.lineFeedCnt + 1 >= i) { + t += s.size_left; + const n = this.B(s, i - s.lf_left - 2); + return t += n + e - 1; + } else { + i -= s.lf_left + s.piece.lineFeedCnt; + t += s.size_left + s.piece.length; + s = s.right; + } + } + return t; + } + getPositionAt(i) { + i = Math.floor(i); + i = Math.max(0, i); + let e = this.root; + let t = 0; + const s = i; + while (e !== Ta) { + if (e.size_left !== 0 && e.size_left >= i) { + e = e.left; + } else if (e.size_left + e.piece.length >= i) { + const n = this.A(e, i - e.size_left); + t += e.lf_left + n.index; + if (n.index === 0) { + const r = this.getOffsetAt(t + 1, 1); + const o = s - r; + return new je(t + 1, o + 1); + } + return new je(t + 1, n.remainder + 1); + } else { + i -= e.size_left + e.piece.length; + t += e.lf_left + e.piece.lineFeedCnt; + if (e.right === Ta) { + const n = this.getOffsetAt(t + 1, 1); + const r = s - i - n; + return new je(t + 1, r + 1); + } else { + e = e.right; + } + } + } + return new je(1, 1); + } + getValueInRange(i, e) { + if (i.startLineNumber === i.endLineNumber && i.startColumn === i.endColumn) { + return ""; + } + const t = this.H(i.startLineNumber, i.startColumn); + const s = this.H(i.endLineNumber, i.endColumn); + const n = this.getValueInRange2(t, s); + if (e) { + if (e !== this.d || !this.f) { + return n.replace(/\r\n|\r|\n/g, e); + } else if (e === this.getEOL() && this.f) { + return n; + } else { + return n.replace(/\r\n|\r|\n/g, e); + } + } else { + return n; + } + } + getValueInRange2(i, e) { + if (i.node === e.node) { + const o = i.node; + const a = this.a[o.piece.bufferIndex].buffer; + const l = this.u(o.piece.bufferIndex, o.piece.start); + return a.substring(l + i.remainder, l + e.remainder); + } + let t = i.node; + const s = this.a[t.piece.bufferIndex].buffer; + const n = this.u(t.piece.bufferIndex, t.piece.start); + let r = s.substring(n + i.remainder, n + t.piece.length); + for (t = t.next(); t !== Ta;) { + const o = this.a[t.piece.bufferIndex].buffer; + const a = this.u(t.piece.bufferIndex, t.piece.start); + if (t === e.node) { + r += o.substring(a, a + e.remainder); + break; + } else { + r += o.substr(a, t.piece.length); + } + t = t.next(); + } + return r; + } + getLinesContent() { + const i = []; + let e = 0; + let t = ""; + let s = false; + this.iterate(this.root, n => { + if (n === Ta) { + return true; + } + const r = n.piece; + let o = r.length; + if (o === 0) { + return true; + } + const a = this.a[r.bufferIndex].buffer; + const l = this.a[r.bufferIndex].lineStarts; + const c = r.start.line; + const u = r.end.line; + let d = l[c] + r.start.column; + if (s && (a.charCodeAt(d) === 10 && (d++, o--), i[e++] = t, t = "", s = false, o === 0)) { + return true; + } + if (c === u) { + if (!this.f && a.charCodeAt(d + o - 1) === 13) { + s = true; + t += a.substr(d, o - 1); + } else { + t += a.substr(d, o); + } + return true; + } + t += this.f ? a.substring(d, Math.max(d, l[c + 1] - this.e)) : a.substring(d, l[c + 1]).replace(/(\r\n|\r|\n)$/, ""); + i[e++] = t; + for (let h = c + 1; h < u; h++) { + t = this.f ? a.substring(l[h], l[h + 1] - this.e) : a.substring(l[h], l[h + 1]).replace(/(\r\n|\r|\n)$/, ""); + i[e++] = t; + } + if (!this.f && a.charCodeAt(l[u] + r.end.column - 1) === 13) { + s = true; + if (r.end.column === 0) { + e--; + } else { + t = a.substr(l[u], r.end.column - 1); + } + } else { + t = a.substr(l[u], r.end.column); + } + return true; + }); + if (s) { + i[e++] = t; + t = ""; + } + i[e++] = t; + return i; + } + getLength() { + return this.c; + } + getLineCount() { + return this.b; + } + getLineContent(i) { + if (this.j.lineNumber === i) { + return this.j.value; + } else { + this.j.lineNumber = i; + if (i === this.b) { + this.j.value = this.getLineRawContent(i); + } else if (this.f) { + this.j.value = this.getLineRawContent(i, this.e); + } else { + this.j.value = this.getLineRawContent(i).replace(/(\r\n|\r|\n)$/, ""); + } + return this.j.value; + } + } + l(i) { + if (i.remainder === i.node.piece.length) { + const e = i.node.next(); + if (!e) { + return 0; + } + const t = this.a[e.piece.bufferIndex]; + const s = this.u(e.piece.bufferIndex, e.piece.start); + return t.buffer.charCodeAt(s); + } else { + const e = this.a[i.node.piece.bufferIndex]; + const s = this.u(i.node.piece.bufferIndex, i.node.piece.start) + i.remainder; + return e.buffer.charCodeAt(s); + } + } + getLineCharCode(i, e) { + const t = this.H(i, e + 1); + return this.l(t); + } + getLineLength(i) { + if (i === this.getLineCount()) { + const e = this.getOffsetAt(i, 1); + return this.getLength() - e; + } + return this.getOffsetAt(i + 1, 1) - this.getOffsetAt(i, 1) - this.e; + } + getCharCode(i) { + const e = this.G(i); + return this.l(e); + } + getNearestChunk(i) { + const e = this.G(i); + if (e.remainder === e.node.piece.length) { + const t = e.node.next(); + if (!t || t === Ta) { + return ""; + } + const s = this.a[t.piece.bufferIndex]; + const n = this.u(t.piece.bufferIndex, t.piece.start); + return s.buffer.substring(n, n + t.piece.length); + } else { + const t = this.a[e.node.piece.bufferIndex]; + const s = this.u(e.node.piece.bufferIndex, e.node.piece.start); + const n = s + e.remainder; + const r = s + e.node.piece.length; + return t.buffer.substring(n, r); + } + } + findMatchesInNode(i, e, t, s, n, r, o, a, l, c, u) { + const d = this.a[i.piece.bufferIndex]; + const h = this.u(i.piece.bufferIndex, i.piece.start); + const g = this.u(i.piece.bufferIndex, n); + const p = this.u(i.piece.bufferIndex, r); + let b; + const v = { + line: 0, + column: 0 + }; + let y; + let w; + if (e._wordSeparators) { + y = d.buffer.substring(g, p); + w = C => C + g; + e.reset(0); + } else { + y = d.buffer; + w = C => C; + e.reset(g); + } + do { + b = e.next(y); + if (b) { + if (w(b.index) >= p) { + return c; + } + this.s(i, w(b.index) - h, v); + const C = this.t(i.piece.bufferIndex, n, v); + const S = v.line === n.line ? v.column - n.column + s : v.column + 1; + const x = S + b[0].length; + u[c++] = Qj(new Z(t + C, S, t + C, x), b, a); + if (w(b.index) + b[0].length >= p || c >= l) { + return c; + } + } + } while (b); + return c; + } + findMatchesLineByLine(i, e, t, s) { + const n = []; + let r = 0; + const o = new Zj(e.wordSeparators, e.regex); + let a = this.H(i.startLineNumber, i.startColumn); + if (a === null) { + return []; + } + const l = this.H(i.endLineNumber, i.endColumn); + if (l === null) { + return []; + } + let c = this.s(a.node, a.remainder); + const u = this.s(l.node, l.remainder); + if (a.node === l.node) { + this.findMatchesInNode(a.node, o, i.startLineNumber, i.startColumn, c, u, e, t, s, r, n); + return n; + } + let d = i.startLineNumber; + let h = a.node; + while (h !== l.node) { + const p = this.t(h.piece.bufferIndex, c, h.piece.end); + if (p >= 1) { + const v = this.a[h.piece.bufferIndex].lineStarts; + const y = this.u(h.piece.bufferIndex, h.piece.start); + const w = v[c.line + p]; + const C = d === i.startLineNumber ? i.startColumn : 1; + r = this.findMatchesInNode(h, o, d, C, c, this.s(h, w - y), e, t, s, r, n); + if (r >= s) { + return n; + } + d += p; + } + const b = d === i.startLineNumber ? i.startColumn - 1 : 0; + if (d === i.endLineNumber) { + const v = this.getLineContent(d).substring(b, i.endColumn - 1); + r = this.n(e, o, v, i.endLineNumber, b, r, n, t, s); + return n; + } + r = this.n(e, o, this.getLineContent(d).substr(b), d, b, r, n, t, s); + if (r >= s) { + return n; + } + d++; + a = this.H(d, 1); + h = a.node; + c = this.s(a.node, a.remainder); + } + if (d === i.endLineNumber) { + const p = d === i.startLineNumber ? i.startColumn - 1 : 0; + const b = this.getLineContent(d).substring(p, i.endColumn - 1); + r = this.n(e, o, b, i.endLineNumber, p, r, n, t, s); + return n; + } + const g = d === i.startLineNumber ? i.startColumn : 1; + r = this.findMatchesInNode(l.node, o, d, g, c, u, e, t, s, r, n); + return n; + } + n(i, e, t, s, n, r, o, a, l) { + const c = i.wordSeparators; + if (!a && i.simpleSearch) { + const d = i.simpleSearch; + const h = d.length; + const g = t.length; + let p = -h; + while ((p = t.indexOf(d, p + h)) !== -1) { + if ((!c || _7t(c, t, g, p, h)) && (o[r++] = new mte(new Z(s, p + 1 + n, s, p + 1 + h + n), null), r >= l)) { + return r; + } + } + return r; + } + let u; + e.reset(0); + do { + u = e.next(t); + if (u && (o[r++] = Qj(new Z(s, u.index + 1 + n, s, u.index + 1 + u[0].length + n), u, a), r >= l)) { + return r; + } + } while (u); + return r; + } + insert(i, e, t = false) { + this.f = this.f && t; + this.j.lineNumber = 0; + this.j.value = ""; + if (this.root !== Ta) { + const { + node: s, + remainder: n, + nodeStartOffset: r + } = this.G(i); + const o = s.piece; + const a = o.bufferIndex; + const l = this.s(s, n); + if (s.piece.bufferIndex === 0 && o.end.line === this.g.line && o.end.column === this.g.column && r + o.length === i && e.length < gF) { + this.F(s, e); + this.y(); + return; + } + if (r === i) { + this.o(e, s); + this.h.validate(i); + } else if (r + s.piece.length > i) { + const c = []; + let u = new Px(o.bufferIndex, l, o.end, this.t(o.bufferIndex, l, o.end), this.u(a, o.end) - this.u(a, l)); + if (this.K() && this.M(e) && this.I(s, n) === 10) { + const p = { + line: u.start.line + 1, + column: 0 + }; + u = new Px(u.bufferIndex, p, u.end, this.t(u.bufferIndex, p, u.end), u.length - 1); + e += ` +`; + } + if (this.K() && this.L(e)) { + if (this.I(s, n - 1) === 13) { + const p = this.s(s, n - 1); + this.C(s, p); + e = "\r" + e; + if (s.piece.length === 0) { + c.push(s); + } + } else { + this.C(s, l); + } + } else { + this.C(s, l); + } + const d = this.w(e); + if (u.length > 0) { + this.S(s, u); + } + let h = s; + for (let g = 0; g < d.length; g++) { + h = this.S(h, d[g]); + } + this.v(c); + } else { + this.q(e, s); + } + } else { + const s = this.w(e); + let n = this.T(null, s[0]); + for (let r = 1; r < s.length; r++) { + n = this.S(n, s[r]); + } + } + this.y(); + } + delete(i, e) { + this.j.lineNumber = 0; + this.j.value = ""; + if (e <= 0 || this.root === Ta) { + return; + } + const t = this.G(i); + const s = this.G(i + e); + const n = t.node; + const r = s.node; + if (n === r) { + const d = this.s(n, t.remainder); + const h = this.s(n, s.remainder); + if (t.nodeStartOffset === i) { + if (e === n.piece.length) { + const g = n.next(); + glt(this, n); + this.N(g); + this.y(); + return; + } + this.D(n, h); + this.h.validate(i); + this.N(n); + this.y(); + return; + } + if (t.nodeStartOffset + n.piece.length === i + e) { + this.C(n, d); + this.O(n); + this.y(); + return; + } + this.E(n, d, h); + this.y(); + return; + } + const o = []; + const a = this.s(n, t.remainder); + this.C(n, a); + this.h.validate(i); + if (n.piece.length === 0) { + o.push(n); + } + const l = this.s(r, s.remainder); + this.D(r, l); + if (r.piece.length === 0) { + o.push(r); + } + const c = n.next(); + for (let d = c; d !== Ta && d !== r; d = d.next()) { + o.push(d); + } + const u = n.piece.length === 0 ? n.prev() : n; + this.v(o); + this.O(u); + this.y(); + } + o(i, e) { + const t = []; + if (this.K() && this.M(i) && this.L(e)) { + const r = e.piece; + const o = { + line: r.start.line + 1, + column: 0 + }; + const a = new Px(r.bufferIndex, o, r.end, this.t(r.bufferIndex, o, r.end), r.length - 1); + e.piece = a; + i += ` +`; + P4(this, e, -1, -1); + if (e.piece.length === 0) { + t.push(e); + } + } + const s = this.w(i); + let n = this.T(e, s[s.length - 1]); + for (let r = s.length - 2; r >= 0; r--) { + n = this.T(n, s[r]); + } + this.N(n); + this.v(t); + } + q(i, e) { + if (this.Q(i, e)) { + i += ` +`; + } + const t = this.w(i); + const s = this.S(e, t[0]); + let n = s; + for (let r = 1; r < t.length; r++) { + n = this.S(n, t[r]); + } + this.N(s); + } + s(i, e, t) { + const s = i.piece; + const n = i.piece.bufferIndex; + const r = this.a[n].lineStarts; + const a = r[s.start.line] + s.start.column + e; + let l = s.start.line; + let c = s.end.line; + let u = 0; + let d = 0; + let h = 0; + while (l <= c && (u = l + (c - l) / 2 | 0, h = r[u], u !== c)) { + d = r[u + 1]; + if (a < h) { + c = u - 1; + } else if (a >= d) { + l = u + 1; + } else { + break; + } + } + if (t) { + t.line = u; + t.column = a - h; + return null; + } else { + return { + line: u, + column: a - h + }; + } + } + t(i, e, t) { + if (t.column === 0) { + return t.line - e.line; + } + const s = this.a[i].lineStarts; + if (t.line === s.length - 1) { + return t.line - e.line; + } + const n = s[t.line + 1]; + const r = s[t.line] + t.column; + if (n > r + 1) { + return t.line - e.line; + } + const o = r - 1; + if (this.a[i].buffer.charCodeAt(o) === 13) { + return t.line - e.line + 1; + } else { + return t.line - e.line; + } + } + u(i, e) { + return this.a[i].lineStarts[e.line] + e.column; + } + v(i) { + for (let e = 0; e < i.length; e++) { + glt(this, i[e]); + } + } + w(i) { + if (i.length > gF) { + const c = []; + while (i.length > gF) { + const d = i.charCodeAt(gF - 1); + let h; + if (d === 13 || d >= 55296 && d <= 56319) { + h = i.substring(0, gF - 1); + i = i.substring(gF - 1); + } else { + h = i.substring(0, gF); + i = i.substring(gF); + } + const g = L4(h); + c.push(new Px(this.a.length, { + line: 0, + column: 0 + }, { + line: g.length - 1, + column: h.length - g[g.length - 1] + }, g.length - 1, h.length)); + this.a.push(new e7(h, g)); + } + const u = L4(i); + c.push(new Px(this.a.length, { + line: 0, + column: 0 + }, { + line: u.length - 1, + column: i.length - u[u.length - 1] + }, u.length - 1, i.length)); + this.a.push(new e7(i, u)); + return c; + } + let e = this.a[0].buffer.length; + const t = L4(i, false); + let s = this.g; + if (this.a[0].lineStarts[this.a[0].lineStarts.length - 1] === e && e !== 0 && this.L(i) && this.M(this.a[0].buffer)) { + this.g = { + line: this.g.line, + column: this.g.column + 1 + }; + s = this.g; + for (let c = 0; c < t.length; c++) { + t[c] += e + 1; + } + this.a[0].lineStarts = this.a[0].lineStarts.concat(t.slice(1)); + this.a[0].buffer += "_" + i; + e += 1; + } else { + if (e !== 0) { + for (let c = 0; c < t.length; c++) { + t[c] += e; + } + } + this.a[0].lineStarts = this.a[0].lineStarts.concat(t.slice(1)); + this.a[0].buffer += i; + } + const n = this.a[0].buffer.length; + const r = this.a[0].lineStarts.length - 1; + const o = n - this.a[0].lineStarts[r]; + const a = { + line: r, + column: o + }; + const l = new Px(0, s, a, this.t(0, s, a), n - e); + this.g = a; + return [l]; + } + getLinesRawContent() { + return this.U(this.root); + } + getLineRawContent(i, e = 0) { + let t = this.root; + let s = ""; + const n = this.h.get2(i); + if (n) { + t = n.node; + const r = this.B(t, i - n.nodeStartLineNumber - 1); + const o = this.a[t.piece.bufferIndex].buffer; + const a = this.u(t.piece.bufferIndex, t.piece.start); + if (n.nodeStartLineNumber + t.piece.lineFeedCnt === i) { + s = o.substring(a + r, a + t.piece.length); + } else { + const l = this.B(t, i - n.nodeStartLineNumber); + return o.substring(a + r, a + l - e); + } + } else { + let r = 0; + const o = i; + while (t !== Ta) { + if (t.left !== Ta && t.lf_left >= i - 1) { + t = t.left; + } else if (t.lf_left + t.piece.lineFeedCnt > i - 1) { + const a = this.B(t, i - t.lf_left - 2); + const l = this.B(t, i - t.lf_left - 1); + const c = this.a[t.piece.bufferIndex].buffer; + const u = this.u(t.piece.bufferIndex, t.piece.start); + r += t.size_left; + this.h.set({ + node: t, + nodeStartOffset: r, + nodeStartLineNumber: o - (i - 1 - t.lf_left) + }); + return c.substring(u + a, u + l - e); + } else if (t.lf_left + t.piece.lineFeedCnt === i - 1) { + const a = this.B(t, i - t.lf_left - 2); + const l = this.a[t.piece.bufferIndex].buffer; + const c = this.u(t.piece.bufferIndex, t.piece.start); + s = l.substring(c + a, c + t.piece.length); + break; + } else { + i -= t.lf_left + t.piece.lineFeedCnt; + r += t.size_left + t.piece.length; + t = t.right; + } + } + } + for (t = t.next(); t !== Ta;) { + const r = this.a[t.piece.bufferIndex].buffer; + if (t.piece.lineFeedCnt > 0) { + const o = this.B(t, 0); + const a = this.u(t.piece.bufferIndex, t.piece.start); + s += r.substring(a, a + o - e); + return s; + } else { + const o = this.u(t.piece.bufferIndex, t.piece.start); + s += r.substr(o, t.piece.length); + } + t = t.next(); + } + return s; + } + y() { + let i = this.root; + let e = 1; + let t = 0; + while (i !== Ta) { + e += i.lf_left + i.piece.lineFeedCnt; + t += i.size_left + i.piece.length; + i = i.right; + } + this.b = e; + this.c = t; + this.h.validate(this.c); + } + A(i, e) { + const t = i.piece; + const s = this.s(i, e); + const n = s.line - t.start.line; + if (this.u(t.bufferIndex, t.end) - this.u(t.bufferIndex, t.start) === e) { + const r = this.t(i.piece.bufferIndex, t.start, s); + if (r !== n) { + return { + index: r, + remainder: 0 + }; + } + } + return { + index: n, + remainder: s.column + }; + } + B(i, e) { + if (e < 0) { + return 0; + } + const t = i.piece; + const s = this.a[t.bufferIndex].lineStarts; + const n = t.start.line + e + 1; + if (n > t.end.line) { + return s[t.end.line] + t.end.column - s[t.start.line] - t.start.column; + } else { + return s[n] - s[t.start.line] - t.start.column; + } + } + C(i, e) { + const t = i.piece; + const s = t.lineFeedCnt; + const n = this.u(t.bufferIndex, t.end); + const r = e; + const o = this.u(t.bufferIndex, r); + const a = this.t(t.bufferIndex, t.start, r); + const l = a - s; + const c = o - n; + const u = t.length + c; + i.piece = new Px(t.bufferIndex, t.start, r, a, u); + P4(this, i, c, l); + } + D(i, e) { + const t = i.piece; + const s = t.lineFeedCnt; + const n = this.u(t.bufferIndex, t.start); + const r = e; + const o = this.t(t.bufferIndex, r, t.end); + const a = this.u(t.bufferIndex, r); + const l = o - s; + const c = n - a; + const u = t.length + c; + i.piece = new Px(t.bufferIndex, r, t.end, o, u); + P4(this, i, c, l); + } + E(i, e, t) { + const s = i.piece; + const n = s.start; + const r = s.end; + const o = s.length; + const a = s.lineFeedCnt; + const l = e; + const c = this.t(s.bufferIndex, s.start, l); + const u = this.u(s.bufferIndex, e) - this.u(s.bufferIndex, n); + i.piece = new Px(s.bufferIndex, s.start, l, c, u); + P4(this, i, u - o, c - a); + const d = new Px(s.bufferIndex, t, r, this.t(s.bufferIndex, t, r), this.u(s.bufferIndex, r) - this.u(s.bufferIndex, t)); + const h = this.S(i, d); + this.N(h); + } + F(i, e) { + if (this.Q(e, i)) { + e += ` +`; + } + const t = this.K() && this.L(e) && this.M(i); + const s = this.a[0].buffer.length; + this.a[0].buffer += e; + const n = L4(e, false); + for (let h = 0; h < n.length; h++) { + n[h] += s; + } + if (t) { + const h = this.a[0].lineStarts[this.a[0].lineStarts.length - 2]; + this.a[0].lineStarts.pop(); + this.g = { + line: this.g.line - 1, + column: s - h + }; + } + this.a[0].lineStarts = this.a[0].lineStarts.concat(n.slice(1)); + const r = this.a[0].lineStarts.length - 1; + const o = this.a[0].buffer.length - this.a[0].lineStarts[r]; + const a = { + line: r, + column: o + }; + const l = i.piece.length + e.length; + const c = i.piece.lineFeedCnt; + const u = this.t(0, i.piece.start, a); + const d = u - c; + i.piece = new Px(i.piece.bufferIndex, i.piece.start, a, u, l); + this.g = a; + P4(this, i, e.length, d); + } + G(i) { + let e = this.root; + const t = this.h.get(i); + if (t) { + return { + node: t.node, + nodeStartOffset: t.nodeStartOffset, + remainder: i - t.nodeStartOffset + }; + } + let s = 0; + while (e !== Ta) { + if (e.size_left > i) { + e = e.left; + } else if (e.size_left + e.piece.length >= i) { + s += e.size_left; + const n = { + node: e, + remainder: i - e.size_left, + nodeStartOffset: s + }; + this.h.set(n); + return n; + } else { + i -= e.size_left + e.piece.length; + s += e.size_left + e.piece.length; + e = e.right; + } + } + return null; + } + H(i, e) { + let t = this.root; + let s = 0; + while (t !== Ta) { + if (t.left !== Ta && t.lf_left >= i - 1) { + t = t.left; + } else if (t.lf_left + t.piece.lineFeedCnt > i - 1) { + const n = this.B(t, i - t.lf_left - 2); + const r = this.B(t, i - t.lf_left - 1); + s += t.size_left; + return { + node: t, + remainder: Math.min(n + e - 1, r), + nodeStartOffset: s + }; + } else if (t.lf_left + t.piece.lineFeedCnt === i - 1) { + const n = this.B(t, i - t.lf_left - 2); + if (n + e - 1 <= t.piece.length) { + return { + node: t, + remainder: n + e - 1, + nodeStartOffset: s + }; + } + e -= t.piece.length - n; + break; + } else { + i -= t.lf_left + t.piece.lineFeedCnt; + s += t.size_left + t.piece.length; + t = t.right; + } + } + for (t = t.next(); t !== Ta;) { + if (t.piece.lineFeedCnt > 0) { + const n = this.B(t, 0); + const r = this.J(t); + return { + node: t, + remainder: Math.min(e - 1, n), + nodeStartOffset: r + }; + } else if (t.piece.length >= e - 1) { + const n = this.J(t); + return { + node: t, + remainder: e - 1, + nodeStartOffset: n + }; + } else { + e -= t.piece.length; + } + t = t.next(); + } + return null; + } + I(i, e) { + if (i.piece.lineFeedCnt < 1) { + return -1; + } + const t = this.a[i.piece.bufferIndex]; + const s = this.u(i.piece.bufferIndex, i.piece.start) + e; + return t.buffer.charCodeAt(s); + } + J(i) { + if (!i) { + return 0; + } + let e = i.size_left; + while (i !== this.root) { + if (i.parent.right === i) { + e += i.parent.size_left + i.parent.piece.length; + } + i = i.parent; + } + return e; + } + K() { + return !this.f || this.d !== ` +`; + } + L(i) { + if (typeof i == "string") { + return i.charCodeAt(0) === 10; + } + if (i === Ta || i.piece.lineFeedCnt === 0) { + return false; + } + const e = i.piece; + const t = this.a[e.bufferIndex].lineStarts; + const s = e.start.line; + const n = t[s] + e.start.column; + if (s === t.length - 1 || t[s + 1] > n + 1) { + return false; + } else { + return this.a[e.bufferIndex].buffer.charCodeAt(n) === 10; + } + } + M(i) { + if (typeof i == "string") { + return i.charCodeAt(i.length - 1) === 13; + } else if (i === Ta || i.piece.lineFeedCnt === 0) { + return false; + } else { + return this.I(i, i.piece.length - 1) === 13; + } + } + N(i) { + if (this.K() && this.L(i)) { + const e = i.prev(); + if (this.M(e)) { + this.P(e, i); + } + } + } + O(i) { + if (this.K() && this.M(i)) { + const e = i.next(); + if (this.L(e)) { + this.P(i, e); + } + } + } + P(i, e) { + const t = []; + const s = this.a[i.piece.bufferIndex].lineStarts; + let n; + if (i.piece.end.column === 0) { + n = { + line: i.piece.end.line - 1, + column: s[i.piece.end.line] - s[i.piece.end.line - 1] - 1 + }; + } else { + n = { + line: i.piece.end.line, + column: i.piece.end.column - 1 + }; + } + const r = i.piece.length - 1; + const o = i.piece.lineFeedCnt - 1; + i.piece = new Px(i.piece.bufferIndex, i.piece.start, n, o, r); + P4(this, i, -1, -1); + if (i.piece.length === 0) { + t.push(i); + } + const a = { + line: e.piece.start.line + 1, + column: 0 + }; + const l = e.piece.length - 1; + const c = this.t(e.piece.bufferIndex, a, e.piece.end); + e.piece = new Px(e.piece.bufferIndex, a, e.piece.end, c, l); + P4(this, e, -1, -1); + if (e.piece.length === 0) { + t.push(e); + } + const u = this.w(`\r +`); + this.S(i, u[0]); + for (let d = 0; d < t.length; d++) { + glt(this, t[d]); + } + } + Q(i, e) { + if (this.K() && this.M(i)) { + const t = e.next(); + if (this.L(t)) { + i += ` +`; + if (t.piece.length === 1) { + glt(this, t); + } else { + const s = t.piece; + const n = { + line: s.start.line + 1, + column: 0 + }; + const r = s.length - 1; + const o = this.t(s.bufferIndex, n, s.end); + t.piece = new Px(s.bufferIndex, n, s.end, o, r); + P4(this, t, -1, -1); + } + return true; + } + } + return false; + } + iterate(i, e) { + if (i === Ta) { + return e(Ta); + } + const t = this.iterate(i.left, e); + return t && e(i) && this.iterate(i.right, e); + } + R(i) { + if (i === Ta) { + return ""; + } + const e = this.a[i.piece.bufferIndex]; + const t = i.piece; + const s = this.u(t.bufferIndex, t.start); + const n = this.u(t.bufferIndex, t.end); + return e.buffer.substring(s, n); + } + getPieceContent(i) { + const e = this.a[i.bufferIndex]; + const t = this.u(i.bufferIndex, i.start); + const s = this.u(i.bufferIndex, i.end); + return e.buffer.substring(t, s); + } + S(i, e) { + const t = new plt(e, 1); + t.left = Ta; + t.right = Ta; + t.parent = Ta; + t.size_left = 0; + t.lf_left = 0; + if (this.root === Ta) { + this.root = t; + t.color = 0; + } else if (i.right === Ta) { + i.right = t; + t.parent = i; + } else { + const n = A7t(i.right); + n.left = t; + t.parent = n; + } + trs(this, t); + return t; + } + T(i, e) { + const t = new plt(e, 1); + t.left = Ta; + t.right = Ta; + t.parent = Ta; + t.size_left = 0; + t.lf_left = 0; + if (this.root === Ta) { + this.root = t; + t.color = 0; + } else if (i.left === Ta) { + i.left = t; + t.parent = i; + } else { + const s = ers(i.left); + s.right = t; + t.parent = s; + } + trs(this, t); + return t; + } + U(i) { + let e = ""; + this.iterate(i, t => { + e += this.R(t); + return true; + }); + return e; + } + }; + } +}); +var mlt; +var U7t = ue({ + "out-build/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBuffer.js"() { + "use strict"; + + pe(); + $i(); + yt(); + gc(); + urs(); + J9(); + $ns(); + q(); + mlt = class QPe extends H { + constructor(e, t, s, n, r, o, a) { + super(); + this.m = this.D(new B()); + this.onDidChangeContent = this.m.event; + this.f = t; + this.j = !o; + this.g = n; + this.h = r; + this.c = new crs(e, s, a); + } + equals(e) { + if (!(e instanceof QPe) || this.f !== e.f || this.getEOL() !== e.getEOL()) { + return false; + } else { + return this.c.equal(e.c); + } + } + mightContainRTL() { + return this.g; + } + mightContainUnusualLineTerminators() { + return this.h; + } + resetMightContainUnusualLineTerminators() { + this.h = false; + } + mightContainNonBasicASCII() { + return this.j; + } + getBOM() { + return this.f; + } + getEOL() { + return this.c.getEOL(); + } + createSnapshot(e) { + return this.c.createSnapshot(e ? this.f : ""); + } + getOffsetAt(e, t) { + return this.c.getOffsetAt(e, t); + } + getPositionAt(e) { + return this.c.getPositionAt(e); + } + getRangeAt(e, t) { + const s = e + t; + const n = this.getPositionAt(e); + const r = this.getPositionAt(s); + return new Z(n.lineNumber, n.column, r.lineNumber, r.column); + } + getValueInRange(e, t = 0) { + if (e.isEmpty()) { + return ""; + } + const s = this.n(t); + return this.c.getValueInRange(e, s); + } + getValueLengthInRange(e, t = 0) { + if (e.isEmpty()) { + return 0; + } + if (e.startLineNumber === e.endLineNumber) { + return e.endColumn - e.startColumn; + } + const s = this.getOffsetAt(e.startLineNumber, e.startColumn); + const n = this.getOffsetAt(e.endLineNumber, e.endColumn); + let r = 0; + const o = this.n(t); + const a = this.getEOL(); + if (o.length !== a.length) { + const l = o.length - a.length; + const c = e.endLineNumber - e.startLineNumber; + r = l * c; + } + return n - s + r; + } + getCharacterCountInRange(e, t = 0) { + if (this.j) { + let s = 0; + const n = e.startLineNumber; + const r = e.endLineNumber; + for (let o = n; o <= r; o++) { + const a = this.getLineContent(o); + const l = o === n ? e.startColumn - 1 : 0; + const c = o === r ? e.endColumn - 1 : a.length; + for (let u = l; u < c; u++) { + if (jb(a.charCodeAt(u))) { + s = s + 1; + u = u + 1; + } else { + s = s + 1; + } + } + } + s += this.n(t).length * (r - n); + return s; + } + return this.getValueLengthInRange(e, t); + } + getNearestChunk(e) { + return this.c.getNearestChunk(e); + } + getLength() { + return this.c.getLength(); + } + getLineCount() { + return this.c.getLineCount(); + } + getLinesContent() { + return this.c.getLinesContent(); + } + getLineContent(e) { + return this.c.getLineContent(e); + } + getLineCharCode(e, t) { + return this.c.getLineCharCode(e, t); + } + getCharCode(e) { + return this.c.getCharCode(e); + } + getLineLength(e) { + return this.c.getLineLength(e); + } + getLineMinColumn(e) { + return 1; + } + getLineMaxColumn(e) { + return this.getLineLength(e) + 1; + } + getLineFirstNonWhitespaceColumn(e) { + const t = B0(this.getLineContent(e)); + if (t === -1) { + return 0; + } else { + return t + 1; + } + } + getLineLastNonWhitespaceColumn(e) { + const t = TL(this.getLineContent(e)); + if (t === -1) { + return 0; + } else { + return t + 2; + } + } + n(e) { + switch (e) { + case 1: + return ` +`; + case 2: + return `\r +`; + case 0: + return this.getEOL(); + default: + throw new Error("Unknown EOL preference"); + } + } + setEOL(e) { + this.c.setEOL(e); + } + applyEdits(e, t, s) { + let n = this.g; + let r = this.h; + let o = this.j; + let a = true; + let l = []; + for (let b = 0; b < e.length; b++) { + const v = e[b]; + if (a && v._isTracked) { + a = false; + } + const y = v.range; + if (v.text) { + let k = true; + if (!o) { + k = !Bq(v.text); + o = k; + } + if (!n && k) { + n = t9(v.text); + } + if (!r && k) { + r = oji(v.text); + } + } + let w = ""; + let C = 0; + let S = 0; + let x = 0; + if (v.text) { + let k; + [C, S, x, k] = XL(v.text); + const E = this.getEOL(); + if (k === 0 || k === (E === `\r +` ? 2 : 1)) { + w = v.text; + } else { + w = v.text.replace(/\r\n|\r|\n/g, E); + } + } + l[b] = { + sortIndex: b, + identifier: v.identifier || null, + range: y, + rangeOffset: this.getOffsetAt(y.startLineNumber, y.startColumn), + rangeLength: this.getValueLengthInRange(y), + text: w, + eolCount: C, + firstLineLength: S, + lastLineLength: x, + forceMoveMarkers: !!v.forceMoveMarkers, + isAutoWhitespaceEdit: v.isAutoWhitespaceEdit || false + }; + } + l.sort(QPe.t); + let c = false; + for (let b = 0, v = l.length - 1; b < v; b++) { + const y = l[b].range.getEndPosition(); + const w = l[b + 1].range.getStartPosition(); + if (w.isBeforeOrEqual(y)) { + if (w.isBefore(y)) { + throw new Error("Overlapping ranges are not allowed!"); + } + c = true; + } + } + if (a) { + l = this.q(l); + } + const u = s || t ? QPe._getInverseEditRanges(l) : []; + const d = []; + if (t) { + for (let b = 0; b < l.length; b++) { + const v = l[b]; + const y = u[b]; + if (v.isAutoWhitespaceEdit && v.range.isEmpty()) { + for (let w = y.startLineNumber; w <= y.endLineNumber; w++) { + let C = ""; + if (w !== y.startLineNumber || !(C = this.getLineContent(v.range.startLineNumber), B0(C) !== -1)) { + d.push({ + lineNumber: w, + oldContent: C + }); + } + } + } + } + } + let h = null; + if (s) { + let b = 0; + h = []; + for (let v = 0; v < l.length; v++) { + const y = l[v]; + const w = u[v]; + const C = this.getValueInRange(y.range); + const S = y.rangeOffset + b; + b += y.text.length - C.length; + h[v] = { + sortIndex: y.sortIndex, + identifier: y.identifier, + range: w, + text: C, + textChange: new RM(y.rangeOffset, C, S, y.text) + }; + } + if (!c) { + h.sort((v, y) => v.sortIndex - y.sortIndex); + } + } + this.g = n; + this.h = r; + this.j = o; + const g = this.s(l); + let p = null; + if (t && d.length > 0) { + d.sort((b, v) => v.lineNumber - b.lineNumber); + p = []; + for (let b = 0, v = d.length; b < v; b++) { + const y = d[b].lineNumber; + if (b > 0 && d[b - 1].lineNumber === y) { + continue; + } + const w = d[b].oldContent; + const C = this.getLineContent(y); + if (C.length !== 0 && C !== w && B0(C) === -1) { + p.push(y); + } + } + } + this.m.fire(); + return new Tts(h, g, p); + } + q(e) { + if (e.length < 1000) { + return e; + } else { + return [this._toSingleEditOperation(e)]; + } + } + _toSingleEditOperation(e) { + let t = false; + const s = e[0].range; + const n = e[e.length - 1].range; + const r = new Z(s.startLineNumber, s.startColumn, n.endLineNumber, n.endColumn); + let o = s.startLineNumber; + let a = s.startColumn; + const l = []; + for (let g = 0, p = e.length; g < p; g++) { + const b = e[g]; + const v = b.range; + t = t || b.forceMoveMarkers; + l.push(this.getValueInRange(new Z(o, a, v.startLineNumber, v.startColumn))); + if (b.text.length > 0) { + l.push(b.text); + } + o = v.endLineNumber; + a = v.endColumn; + } + const c = l.join(""); + const [u, d, h] = XL(c); + return { + sortIndex: 0, + identifier: e[0].identifier, + range: r, + rangeOffset: this.getOffsetAt(r.startLineNumber, r.startColumn), + rangeLength: this.getValueLengthInRange(r, 0), + text: c, + eolCount: u, + firstLineLength: d, + lastLineLength: h, + forceMoveMarkers: t, + isAutoWhitespaceEdit: false + }; + } + s(e) { + e.sort(QPe.u); + const t = []; + for (let s = 0; s < e.length; s++) { + const n = e[s]; + const r = n.range.startLineNumber; + const o = n.range.startColumn; + const a = n.range.endLineNumber; + const l = n.range.endColumn; + if (r === a && o === l && n.text.length === 0) { + continue; + } + if (n.text) { + this.c.delete(n.rangeOffset, n.rangeLength); + this.c.insert(n.rangeOffset, n.text, true); + } else { + this.c.delete(n.rangeOffset, n.rangeLength); + } + const c = new Z(r, o, a, l); + t.push({ + range: c, + rangeLength: n.rangeLength, + text: n.text, + rangeOffset: n.rangeOffset, + forceMoveMarkers: n.forceMoveMarkers + }); + } + return t; + } + findMatchesLineByLine(e, t, s, n) { + return this.c.findMatchesLineByLine(e, t, s, n); + } + getPieceTree() { + return this.c; + } + static _getInverseEditRange(e, t) { + const s = e.startLineNumber; + const n = e.startColumn; + const [r, o, a] = XL(t); + let l; + if (t.length > 0) { + const c = r + 1; + if (c === 1) { + l = new Z(s, n, s, n + o); + } else { + l = new Z(s, n, s + c - 1, a + 1); + } + } else { + l = new Z(s, n, s, n); + } + return l; + } + static _getInverseEditRanges(e) { + const t = []; + let s = 0; + let n = 0; + let r = null; + for (let o = 0, a = e.length; o < a; o++) { + const l = e[o]; + let c; + let u; + if (r) { + if (r.range.endLineNumber === l.range.startLineNumber) { + c = s; + u = n + (l.range.startColumn - r.range.endColumn); + } else { + c = s + (l.range.startLineNumber - r.range.endLineNumber); + u = l.range.startColumn; + } + } else { + c = l.range.startLineNumber; + u = l.range.startColumn; + } + let d; + if (l.text.length > 0) { + const h = l.eolCount + 1; + if (h === 1) { + d = new Z(c, u, c, u + l.firstLineLength); + } else { + d = new Z(c, u, c + h - 1, l.lastLineLength + 1); + } + } else { + d = new Z(c, u, c, u); + } + s = d.endLineNumber; + n = d.endColumn; + t.push(d); + r = l; + } + return t; + } + static t(e, t) { + const s = Z.compareRangesUsingEnds(e.range, t.range); + if (s === 0) { + return e.sortIndex - t.sortIndex; + } else { + return s; + } + } + static u(e, t) { + const s = Z.compareRangesUsingEnds(e.range, t.range); + if (s === 0) { + return t.sortIndex - e.sortIndex; + } else { + return -s; + } + } + }; + } +}); +var drs; +var Gte; +var hrs = ue({ + "out-build/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBufferBuilder.js"() { + "use strict"; + + $i(); + urs(); + U7t(); + drs = class { + constructor(i, e, t, s, n, r, o, a, l) { + this.a = i; + this.b = e; + this.c = t; + this.d = s; + this.e = n; + this.f = r; + this.g = o; + this.h = a; + this.j = l; + } + k(i) { + const e = this.c + this.d + this.e; + const t = this.c + this.e; + if (e === 0) { + if (i === 1) { + return ` +`; + } else { + return `\r +`; + } + } else if (t > e / 2) { + return `\r +`; + } else { + return ` +`; + } + } + create(i) { + const e = this.k(i); + const t = this.a; + if (this.j && (e === `\r +` && (this.c > 0 || this.d > 0) || e === ` +` && (this.c > 0 || this.e > 0))) { + for (let n = 0, r = t.length; n < r; n++) { + const o = t[n].buffer.replace(/\r\n|\r|\n/g, e); + const a = L4(o); + t[n] = new e7(o, a); + } + } + const s = new mlt(t, this.b, e, this.f, this.g, this.h, this.j); + return { + textBuffer: s, + disposable: s + }; + } + getFirstLineText(i) { + return this.a[0].buffer.substr(0, i).split(/\r\n|\r|\n/)[0]; + } + }; + Gte = class { + constructor() { + this.a = []; + this.b = ""; + this.c = false; + this.d = 0; + this.e = []; + this.f = 0; + this.g = 0; + this.h = 0; + this.j = false; + this.k = false; + this.l = true; + } + acceptChunk(i) { + if (i.length === 0) { + return; + } + if (this.a.length === 0 && aji(i)) { + this.b = pji; + i = i.substr(1); + } + const e = i.charCodeAt(i.length - 1); + if (e === 13 || e >= 55296 && e <= 56319) { + this.m(i.substr(0, i.length - 1), false); + this.c = true; + this.d = e; + } else { + this.m(i, false); + this.c = false; + this.d = e; + } + } + m(i, e) { + if (!!e || i.length !== 0) { + if (this.c) { + this.n(String.fromCharCode(this.d) + i); + } else { + this.n(i); + } + } + } + n(i) { + const e = vYn(this.e, i); + this.a.push(new e7(i, e.lineStarts)); + this.f += e.cr; + this.g += e.lf; + this.h += e.crlf; + if (!e.isBasicASCII) { + this.l = false; + this.j ||= t9(i); + this.k ||= oji(i); + } + } + finish(i = true) { + this.o(); + return new drs(this.a, this.b, this.f, this.g, this.h, this.j, this.k, this.l, i); + } + o() { + if (this.a.length === 0) { + this.m("", true); + } + if (this.c) { + this.c = false; + const i = this.a[this.a.length - 1]; + i.buffer += String.fromCharCode(this.d); + const e = L4(i.buffer); + i.lineStarts = e; + if (this.d === 13) { + this.f++; + } + } + } + }; + } +}); +function W7t(i, e) { + const t = new Uint32Array(2); + t[0] = 0; + t[1] = (i << 0 | 0 | 0 | 32768 | 33554432) >>> 0; + return new Nat(t, e === null ? V7t : e); +} +var V7t; +var H7t = ue({ + "out-build/vs/editor/common/languages/nullTokenize.js"() { + "use strict"; + + Eo(); + V7t = new class { + clone() { + return this; + } + equals(i) { + return this === i; + } + }(); + } +}); +function yYn(i, e) { + const t = []; + for (let s = 0; s < i; s++) { + t[s] = e; + } + return t; +} +var frs; +var wYn = ue({ + "out-build/vs/editor/common/model/fixedArray.js"() { + "use strict"; + + Jt(); + frs = class { + constructor(i) { + this.b = i; + this.a = []; + } + get(i) { + if (i < this.a.length) { + return this.a[i]; + } else { + return this.b; + } + } + set(i, e) { + while (i >= this.a.length) { + this.a[this.a.length] = this.b; + } + this.a[i] = e; + } + replace(i, e, t) { + if (i >= this.a.length) { + return; + } + if (e === 0) { + this.insert(i, t); + return; + } else if (t === 0) { + this.delete(i, e); + return; + } + const s = this.a.slice(0, i); + const n = this.a.slice(i + e); + const r = yYn(t, this.b); + this.a = s.concat(r, n); + } + delete(i, e) { + if (e !== 0 && !(i >= this.a.length)) { + this.a.splice(i, e); + } + } + insert(i, e) { + if (e === 0 || i >= this.a.length) { + return; + } + const t = []; + for (let s = 0; s < e; s++) { + t[s] = this.b; + } + this.a = Xhe(this.a, i, t); + } + }; + } +}); +function R4(i) { + if (i instanceof Uint32Array) { + return i; + } else { + return new Uint32Array(i); + } +} +var pF; +var c1; +var grs = ue({ + "out-build/vs/editor/common/tokens/contiguousTokensEditing.js"() { + "use strict"; + + RT(); + pF = new Uint32Array(0).buffer; + c1 = class B3i { + static deleteBeginning(e, t) { + if (e === null || e === pF) { + return e; + } else { + return B3i.delete(e, 0, t); + } + } + static deleteEnding(e, t) { + if (e === null || e === pF) { + return e; + } + const s = R4(e); + const n = s[s.length - 2]; + return B3i.delete(e, t, n); + } + static delete(e, t, s) { + if (e === null || e === pF || t === s) { + return e; + } + const n = R4(e); + const r = n.length >>> 1; + if (t === 0 && n[n.length - 2] === s) { + return pF; + } + const o = Kb.findIndexInTokensArray(n, t); + const a = o > 0 ? n[o - 1 << 1] : 0; + const l = n[o << 1]; + if (s < l) { + const g = s - t; + for (let p = o; p < r; p++) { + n[p << 1] -= g; + } + return e; + } + let c; + let u; + if (a !== t) { + n[o << 1] = t; + c = o + 1 << 1; + u = t; + } else { + c = o << 1; + u = a; + } + const d = s - t; + for (let g = o + 1; g < r; g++) { + const p = n[g << 1] - d; + if (p > u) { + n[c++] = p; + n[c++] = n[(g << 1) + 1]; + u = p; + } + } + if (c === n.length) { + return e; + } + const h = new Uint32Array(c); + h.set(n.subarray(0, c), 0); + return h.buffer; + } + static append(e, t) { + if (t === pF) { + return e; + } + if (e === pF) { + return t; + } + if (e === null) { + return e; + } + if (t === null) { + return null; + } + const s = R4(e); + const n = R4(t); + const r = n.length >>> 1; + const o = new Uint32Array(s.length + n.length); + o.set(s, 0); + let a = s.length; + const l = s[s.length - 2]; + for (let c = 0; c < r; c++) { + o[a++] = n[c << 1] + l; + o[a++] = n[(c << 1) + 1]; + } + return o.buffer; + } + static insert(e, t, s) { + if (e === null || e === pF) { + return e; + } + const n = R4(e); + const r = n.length >>> 1; + let o = Kb.findIndexInTokensArray(n, t); + if (o > 0 && n[o - 1 << 1] === t) { + o--; + } + for (let a = o; a < r; a++) { + n[a << 1] += s; + } + return e; + } + }; + } +}); +var q7t; +var CYn = ue({ + "out-build/vs/editor/common/tokens/contiguousMultilineTokens.js"() { + "use strict"; + + Jt(); + nr(); + Rs(); + J9(); + grs(); + Nf(); + q7t = class lOn { + static deserialize(e, t, s) { + const n = new Uint32Array(e.buffer); + const r = bx(e, t); + t += 4; + const o = bx(e, t); + t += 4; + const a = []; + for (let l = 0; l < o; l++) { + const c = bx(e, t); + t += 4; + a.push(n.subarray(t / 4, t / 4 + c / 4)); + t += c; + } + s.push(new lOn(r, a)); + return t; + } + get startLineNumber() { + return this.a; + } + get endLineNumber() { + return this.a + this.b.length - 1; + } + constructor(e, t) { + this.a = e; + this.b = t; + } + getLineRange() { + return new or(this.a, this.a + this.b.length); + } + getLineTokens(e) { + return this.b[e - this.a]; + } + appendLineTokens(e) { + this.b.push(e); + } + serializeSize() { + let e = 0; + e += 4; + e += 4; + for (let t = 0; t < this.b.length; t++) { + const s = this.b[t]; + if (!(s instanceof Uint32Array)) { + throw new Error("Not supported!"); + } + e += 4; + e += s.byteLength; + } + return e; + } + serialize(e, t) { + vx(e, this.a, t); + t += 4; + vx(e, this.b.length, t); + t += 4; + for (let s = 0; s < this.b.length; s++) { + const n = this.b[s]; + if (!(n instanceof Uint32Array)) { + throw new Error("Not supported!"); + } + vx(e, n.byteLength, t); + t += 4; + e.set(new Uint8Array(n.buffer), t); + t += n.byteLength; + } + return t; + } + applyEdit(e, t) { + const [s, n] = XL(t); + this.c(e); + this.d(new je(e.startLineNumber, e.startColumn), s, n); + } + c(e) { + if (e.startLineNumber === e.endLineNumber && e.startColumn === e.endColumn) { + return; + } + const t = e.startLineNumber - this.a; + const s = e.endLineNumber - this.a; + if (s < 0) { + const n = s - t; + this.a -= n; + return; + } + if (!(t >= this.b.length)) { + if (t < 0 && s >= this.b.length) { + this.a = 0; + this.b = []; + return; + } + if (t === s) { + this.b[t] = c1.delete(this.b[t], e.startColumn - 1, e.endColumn - 1); + return; + } + if (t >= 0) { + this.b[t] = c1.deleteEnding(this.b[t], e.startColumn - 1); + if (s < this.b.length) { + const n = c1.deleteBeginning(this.b[s], e.endColumn - 1); + this.b[t] = c1.append(this.b[t], n); + this.b.splice(t + 1, s - t); + } else { + this.b[t] = c1.append(this.b[t], null); + this.b = this.b.slice(0, t + 1); + } + } else { + const n = -t; + this.a -= n; + this.b[s] = c1.deleteBeginning(this.b[s], e.endColumn - 1); + this.b = this.b.slice(s); + } + } + } + d(e, t, s) { + if (t === 0 && s === 0) { + return; + } + const n = e.lineNumber - this.a; + if (n < 0) { + this.a += t; + return; + } + if (!(n >= this.b.length)) { + if (t === 0) { + this.b[n] = c1.insert(this.b[n], e.column - 1, s); + return; + } + this.b[n] = c1.deleteEnding(this.b[n], e.column - 1); + this.b[n] = c1.insert(this.b[n], e.column - 1, s); + this.e(e.lineNumber, t); + } + } + e(e, t) { + if (t === 0) { + return; + } + const s = []; + for (let n = 0; n < t; n++) { + s[n] = null; + } + this.b = Xhe(this.b, e, s); + } + }; + } +}); +var Kte; +var j7t = ue({ + "out-build/vs/editor/common/tokens/contiguousMultilineTokensBuilder.js"() { + "use strict"; + + nr(); + CYn(); + Kte = class { + static deserialize(i) { + let e = 0; + const t = bx(i, e); + e += 4; + const s = []; + for (let n = 0; n < t; n++) { + e = q7t.deserialize(i, e, s); + } + return s; + } + constructor() { + this.a = []; + } + add(i, e) { + if (this.a.length > 0) { + const t = this.a[this.a.length - 1]; + if (t.endLineNumber + 1 === i) { + t.appendLineTokens(e); + return; + } + } + this.a.push(new q7t(i, [e])); + } + finalize() { + return this.a; + } + serialize() { + const i = this.b(); + const e = new Uint8Array(i); + this.c(e); + return e; + } + b() { + let i = 0; + i += 4; + for (let e = 0; e < this.a.length; e++) { + i += this.a[e].serializeSize(); + } + return i; + } + c(i) { + let e = 0; + vx(i, this.a.length, e); + e += 4; + for (let t = 0; t < this.a.length; t++) { + e = this.a[t].serialize(i, e); + } + } + }; + } +}); +function Yte(i, e, t, s, n, r) { + let o = null; + if (t) { + try { + o = t.tokenizeEncoded(s, n, r.clone()); + } catch (a) { + xs(a); + } + } + o ||= W7t(i.encodeLanguageId(e), r); + Kb.convertToEndOffset(o.tokens, s.length); + return o; +} +var prs; +var mrs; +var brs; +var blt; +var z7t; +var vrs; +var yrs; +var wrs = ue({ + "out-build/vs/editor/common/model/textModelTokens.js"() { + "use strict"; + + nt(); + Ut(); + rt(); + fd(); + J9(); + Nf(); + jp(); + H7t(); + wYn(); + j7t(); + RT(); + (function (i) { + i[i.CHEAP_TOKENIZATION_LENGTH_LIMIT = 2048] = "CHEAP_TOKENIZATION_LENGTH_LIMIT"; + })(prs ||= {}); + mrs = class { + constructor(i, e) { + this.tokenizationSupport = e; + this.a = this.tokenizationSupport.getInitialState(); + this.store = new blt(i); + } + getStartState(i) { + return this.store.getStartState(i, this.a); + } + getFirstInvalidLine() { + return this.store.getFirstInvalidLine(this.a); + } + }; + brs = class extends mrs { + constructor(i, e, t, s) { + super(i, e); + this._textModel = t; + this._languageIdCodec = s; + } + updateTokensUntilLine(i, e) { + const t = this._textModel.getLanguageId(); + while (true) { + const s = this.getFirstInvalidLine(); + if (!s || s.lineNumber > e) { + break; + } + const n = this._textModel.getLineContent(s.lineNumber); + const r = Yte(this._languageIdCodec, t, this.tokenizationSupport, n, true, s.startState); + i.add(s.lineNumber, r.tokens); + this.store.setEndState(s.lineNumber, r.endState); + } + } + getTokenTypeIfInsertingCharacter(i, e) { + const t = this.getStartState(i.lineNumber); + if (!t) { + return 0; + } + const s = this._textModel.getLanguageId(); + const n = this._textModel.getLineContent(i.lineNumber); + const r = n.substring(0, i.column - 1) + e + n.substring(i.column - 1); + const o = Yte(this._languageIdCodec, s, this.tokenizationSupport, r, true, t); + const a = new Kb(o.tokens, r, this._languageIdCodec); + if (a.getCount() === 0) { + return 0; + } + const l = a.findTokenIndexAtOffset(i.column - 1); + return a.getStandardTokenType(l); + } + tokenizeLineWithEdit(i, e) { + const t = this.getStartState(i); + if (!t) { + return { + mainLineTokens: null, + additionalLines: null + }; + } + const s = this._textModel.getLineContent(i); + const n = e.lineEdit.apply(s); + const r = this._textModel.getLanguageIdAtPosition(i, 0); + const o = Yte(this._languageIdCodec, r, this.tokenizationSupport, n, true, t); + let a = null; + if (e.additionalLines) { + a = []; + let c = o.endState; + for (const u of e.additionalLines) { + const d = Yte(this._languageIdCodec, r, this.tokenizationSupport, u, true, c); + a.push(new Kb(d.tokens, u, this._languageIdCodec)); + c = d.endState; + } + } + return { + mainLineTokens: new Kb(o.tokens, n, this._languageIdCodec), + additionalLines: a + }; + } + hasAccurateTokensForLine(i) { + const e = this.store.getFirstInvalidEndStateLineNumberOrMax(); + return i < e; + } + isCheapToTokenize(i) { + const e = this.store.getFirstInvalidEndStateLineNumberOrMax(); + return i < e || i === e && this._textModel.getLineLength(i) < 2048; + } + tokenizeHeuristically(i, e, t) { + if (t <= this.store.getFirstInvalidEndStateLineNumberOrMax()) { + return { + heuristicTokens: false + }; + } + if (e <= this.store.getFirstInvalidEndStateLineNumberOrMax()) { + this.updateTokensUntilLine(i, t); + return { + heuristicTokens: false + }; + } + let s = this.b(e); + const n = this._textModel.getLanguageId(); + for (let r = e; r <= t; r++) { + const o = this._textModel.getLineContent(r); + const a = Yte(this._languageIdCodec, n, this.tokenizationSupport, o, true, s); + i.add(r, a.tokens); + s = a.endState; + } + return { + heuristicTokens: true + }; + } + b(i) { + let e = this._textModel.getLineFirstNonWhitespaceColumn(i); + const t = []; + let s = null; + for (let o = i - 1; e > 1 && o >= 1; o--) { + const a = this._textModel.getLineFirstNonWhitespaceColumn(o); + if (a !== 0 && a < e && (t.push(this._textModel.getLineContent(o)), e = a, s = this.getStartState(o), s)) { + break; + } + } + s ||= this.tokenizationSupport.getInitialState(); + t.reverse(); + const n = this._textModel.getLanguageId(); + let r = s; + for (const o of t) { + r = Yte(this._languageIdCodec, n, this.tokenizationSupport, o, false, r).endState; + } + return r; + } + }; + blt = class { + constructor(i) { + this.d = i; + this.a = new z7t(); + this.b = new vrs(); + this.b.addRange(new uo(1, i + 1)); + } + getEndState(i) { + return this.a.getEndState(i); + } + setEndState(i, e) { + if (!e) { + throw new co("Cannot set null/undefined state"); + } + this.b.delete(i); + const t = this.a.setEndState(i, e); + if (t && i < this.d) { + this.b.addRange(new uo(i + 1, i + 2)); + } + return t; + } + acceptChange(i, e) { + this.d += e - i.length; + this.a.acceptChange(i, e); + this.b.addRangeAndResize(new uo(i.startLineNumber, i.endLineNumberExclusive), e); + } + acceptChanges(i) { + for (const e of i) { + const [t] = XL(e.text); + this.acceptChange(new or(e.range.startLineNumber, e.range.endLineNumber + 1), t + 1); + } + } + invalidateEndStateRange(i) { + this.b.addRange(new uo(i.startLineNumber, i.endLineNumberExclusive)); + } + getFirstInvalidEndStateLineNumber() { + return this.b.min; + } + getFirstInvalidEndStateLineNumberOrMax() { + return this.getFirstInvalidEndStateLineNumber() || Number.MAX_SAFE_INTEGER; + } + allStatesValid() { + return this.b.min === null; + } + getStartState(i, e) { + if (i === 1) { + return e; + } else { + return this.getEndState(i - 1); + } + } + getFirstInvalidLine(i) { + const e = this.getFirstInvalidEndStateLineNumber(); + if (e === null) { + return null; + } + const t = this.getStartState(e, i); + if (!t) { + throw new co("Start state must be defined"); + } + return { + lineNumber: e, + startState: t + }; + } + }; + z7t = class { + constructor() { + this.a = new frs(null); + } + getEndState(i) { + return this.a.get(i); + } + setEndState(i, e) { + const t = this.a.get(i); + if (t && t.equals(e)) { + return false; + } else { + this.a.set(i, e); + return true; + } + } + acceptChange(i, e) { + let t = i.length; + if (e > 0 && t > 0) { + t--; + e--; + } + this.a.replace(i.startLineNumber, t, e); + } + acceptChanges(i) { + for (const e of i) { + const [t] = XL(e.text); + this.acceptChange(new or(e.range.startLineNumber, e.range.endLineNumber + 1), t + 1); + } + } + }; + vrs = class { + constructor() { + this.a = []; + } + getRanges() { + return this.a; + } + get min() { + if (this.a.length === 0) { + return null; + } else { + return this.a[0].start; + } + } + removeMin() { + if (this.a.length === 0) { + return null; + } + const i = this.a[0]; + if (i.start + 1 === i.endExclusive) { + this.a.shift(); + } else { + this.a[0] = new uo(i.start + 1, i.endExclusive); + } + return i.start; + } + delete(i) { + const e = this.a.findIndex(t => t.contains(i)); + if (e !== -1) { + const t = this.a[e]; + if (t.start === i) { + if (t.endExclusive === i + 1) { + this.a.splice(e, 1); + } else { + this.a[e] = new uo(i + 1, t.endExclusive); + } + } else if (t.endExclusive === i + 1) { + this.a[e] = new uo(t.start, i); + } else { + this.a.splice(e, 1, new uo(t.start, i), new uo(i + 1, t.endExclusive)); + } + } + } + addRange(i) { + uo.addRange(i, this.a); + } + addRangeAndResize(i, e) { + let t = 0; + while (!(t >= this.a.length) && !(i.start <= this.a[t].endExclusive)) { + t++; + } + let s = t; + while (!(s >= this.a.length) && !(i.endExclusive < this.a[s].start)) { + s++; + } + const n = e - i.length; + for (let r = s; r < this.a.length; r++) { + this.a[r] = this.a[r].delta(n); + } + if (t === s) { + const r = new uo(i.start, i.start + e); + if (!r.isEmpty) { + this.a.splice(t, 0, r); + } + } else { + const r = Math.min(i.start, this.a[t].start); + const o = Math.max(i.endExclusive, this.a[s - 1].endExclusive); + const a = new uo(r, o + n); + if (a.isEmpty) { + this.a.splice(t, s - t); + } else { + this.a.splice(t, s - t, a); + } + } + } + toString() { + return this.a.map(i => i.toString()).join(" + "); + } + }; + yrs = class { + constructor(i, e) { + this.b = i; + this.d = e; + this.a = false; + this.f = false; + } + dispose() { + this.a = true; + } + handleChanges() { + this.g(); + } + g() { + if (!this.f && !!this.b._textModel.isAttachedToEditor() && !!this.k()) { + this.f = true; + qq(i => { + this.f = false; + this.h(i); + }); + } + } + h(i) { + const e = Date.now() + i.timeRemaining(); + const t = () => { + if (!this.a && !!this.b._textModel.isAttachedToEditor() && !!this.k()) { + this.j(); + if (Date.now() < e) { + OZ(t); + } else { + this.g(); + } + } + }; + t(); + } + j() { + const i = this.b._textModel.getLineCount(); + const e = new Kte(); + const t = ic.create(false); + do { + if (t.elapsed() > 1 || this.l(e) >= i) { + break; + } + } while (this.k()); + this.d.setTokens(e.finalize()); + this.checkFinished(); + } + k() { + if (this.b) { + return !this.b.store.allStatesValid(); + } else { + return false; + } + } + l(i) { + const e = this.b?.getFirstInvalidLine(); + if (e) { + this.b.updateTokensUntilLine(i, e.lineNumber); + return e.lineNumber; + } else { + return this.b._textModel.getLineCount() + 1; + } + } + checkFinished() { + if (!this.a) { + if (this.b.store.allStatesValid()) { + this.d.backgroundTokenizationFinished(); + } + } + } + requestTokens(i, e) { + this.b.store.invalidateEndStateRange(new or(i, e)); + } + }; + } +}); +var Crs; +var Srs; +var xrs; +var J7t; +var G7t = ue({ + "out-build/vs/editor/common/model/tokens.js"() { + "use strict"; + + Jt(); + nt(); + pe(); + q(); + Nf(); + Crs = class { + constructor() { + this.c = new B(); + this.onDidChangeVisibleRanges = this.c.event; + this.d = new Set(); + } + attachView() { + const i = new Srs(e => { + this.c.fire({ + view: i, + state: e + }); + }); + this.d.add(i); + return i; + } + detachView(i) { + this.d.delete(i); + this.c.fire({ + view: i, + state: undefined + }); + } + }; + Srs = class { + constructor(i) { + this.c = i; + } + setVisibleLines(i, e) { + const t = i.map(s => new or(s.startLineNumber, s.endLineNumber + 1)); + this.c({ + visibleLineRanges: t, + stabilized: e + }); + } + }; + xrs = class extends H { + get lineRanges() { + return this.g; + } + constructor(i) { + super(); + this.h = i; + this.c = this.D(new Vn(() => this.j(), 50)); + this.f = []; + this.g = []; + } + j() { + if (!Go(this.f, this.g, (i, e) => i.equals(e))) { + this.f = this.g; + this.h(); + } + } + handleStateChange(i) { + this.g = i.visibleLineRanges; + if (i.stabilized) { + this.c.cancel(); + this.j(); + } else { + this.c.schedule(); + } + } + }; + J7t = class extends H { + get backgroundTokenizationState() { + return this.f; + } + constructor(i, e, t) { + super(); + this.j = i; + this.m = e; + this.n = t; + this.f = 1; + this.g = this.D(new B()); + this.onDidChangeBackgroundTokenizationState = this.g.event; + this.h = this.D(new B()); + this.onDidChangeTokens = this.h.event; + } + tokenizeIfCheap(i) { + if (this.isCheapToTokenize(i)) { + this.forceTokenization(i); + } + } + }; + } +}); +var K7t; +var SYn = ue({ + "out-build/vs/editor/common/model/treeSitterTokens.js"() { + "use strict"; + + Eo(); + RT(); + G7t(); + q(); + K7t = class extends J7t { + constructor(i, e, t, s) { + super(e, t, s); + this.s = i; + this.c = null; + this.r = this.D(new ki()); + this.t(); + } + t() { + const i = this.n(); + if (!this.c || this.q !== i) { + this.q = i; + this.c = b4.get(i); + this.r.value = this.c?.onDidChangeTokens(e => { + if (e.textModel === this.m) { + this.h.fire(e.changes); + } + }); + } + } + getLineTokens(i) { + const e = this.m.getLineContent(i); + if (this.c) { + const t = this.c.tokenizeEncoded(i, this.m); + if (t) { + return new Kb(t, e, this.j); + } + } + return Kb.createEmpty(e, this.j); + } + resetTokenization(i = true) { + if (i) { + this.h.fire({ + semanticTokensApplied: false, + ranges: [{ + fromLineNumber: 1, + toLineNumber: this.m.getLineCount() + }] + }); + } + this.t(); + } + handleDidChangeAttached() {} + handleDidChangeContent(i) { + if (i.isFlush) { + this.resetTokenization(false); + } + } + forceTokenization(i) {} + hasAccurateTokensForLine(i) { + return true; + } + isCheapToTokenize(i) { + return true; + } + getTokenTypeIfInsertingCharacter(i, e, t) { + return 0; + } + tokenizeLineWithEdit(i, e) { + return { + mainLineTokens: null, + additionalLines: null + }; + } + get hasTokens() { + return this.s.getParseResult(this.m) !== undefined; + } + }; + } +}); +var Kpe; +var N4; +var ez = ue({ + "out-build/vs/editor/common/services/treeSitterParserService.js"() { + "use strict"; + + te(); + Kpe = "editor.experimental.preferTreeSitter"; + N4 = Ve("treeSitterParserService"); + } +}); +function krs(i) { + return (i << 0 | 0 | 0 | 32768 | 33554432 | 1024) >>> 0; +} +var Y7t; +var xYn = ue({ + "out-build/vs/editor/common/tokens/contiguousTokensStore.js"() { + "use strict"; + + Jt(); + Rs(); + grs(); + RT(); + C9(); + Y7t = class U3i { + constructor(e) { + this.c = []; + this.d = 0; + this.e = e; + } + flush() { + this.c = []; + this.d = 0; + } + get hasTokens() { + return this.c.length > 0; + } + getTokens(e, t, s) { + let n = null; + if (t < this.d) { + n = this.c[t]; + } + if (n !== null && n !== pF) { + return new Kb(R4(n), s, this.e); + } + const r = new Uint32Array(2); + r[0] = s.length; + r[1] = krs(this.e.encodeLanguageId(e)); + return new Kb(r, s, this.e); + } + static f(e, t, s) { + const n = s ? R4(s) : null; + if (t === 0) { + let r = false; + if (n && n.length > 1) { + r = gb.getLanguageId(n[1]) !== e; + } + if (!r) { + return pF; + } + } + if (!n || n.length === 0) { + const r = new Uint32Array(2); + r[0] = t; + r[1] = krs(e); + return r.buffer; + } + n[n.length - 2] = t; + if (n.byteOffset === 0 && n.byteLength === n.buffer.byteLength) { + return n.buffer; + } else { + return n; + } + } + g(e) { + while (e >= this.d) { + this.c[this.d] = null; + this.d++; + } + } + h(e, t) { + if (t !== 0) { + if (e + t > this.d) { + t = this.d - e; + } + this.c.splice(e, t); + this.d -= t; + } + } + j(e, t) { + if (t === 0) { + return; + } + const s = []; + for (let n = 0; n < t; n++) { + s[n] = null; + } + this.c = Xhe(this.c, e, s); + this.d += t; + } + setTokens(e, t, s, n, r) { + const o = U3i.f(this.e.encodeLanguageId(e), s, n); + this.g(t); + const a = this.c[t]; + this.c[t] = o; + if (r) { + return !U3i.k(a, o); + } else { + return false; + } + } + static k(e, t) { + if (!e || !t) { + return !e && !t; + } + const s = R4(e); + const n = R4(t); + if (s.length !== n.length) { + return false; + } + for (let r = 0, o = s.length; r < o; r++) { + if (s[r] !== n[r]) { + return false; + } + } + return true; + } + acceptEdit(e, t, s) { + this.l(e); + this.m(new je(e.startLineNumber, e.startColumn), t, s); + } + l(e) { + const t = e.startLineNumber - 1; + if (t >= this.d) { + return; + } + if (e.startLineNumber === e.endLineNumber) { + if (e.startColumn === e.endColumn) { + return; + } + this.c[t] = c1.delete(this.c[t], e.startColumn - 1, e.endColumn - 1); + return; + } + this.c[t] = c1.deleteEnding(this.c[t], e.startColumn - 1); + const s = e.endLineNumber - 1; + let n = null; + if (s < this.d) { + n = c1.deleteBeginning(this.c[s], e.endColumn - 1); + } + this.c[t] = c1.append(this.c[t], n); + this.h(e.startLineNumber, e.endLineNumber - e.startLineNumber); + } + m(e, t, s) { + if (t === 0 && s === 0) { + return; + } + const n = e.lineNumber - 1; + if (!(n >= this.d)) { + if (t === 0) { + this.c[n] = c1.insert(this.c[n], e.column - 1, s); + return; + } + this.c[n] = c1.deleteEnding(this.c[n], e.column - 1); + this.c[n] = c1.insert(this.c[n], e.column - 1, s); + this.j(e.lineNumber, t); + } + } + setMultilineTokens(e, t) { + if (e.length === 0) { + return { + changes: [] + }; + } + const s = []; + for (let n = 0, r = e.length; n < r; n++) { + const o = e[n]; + let a = 0; + let l = 0; + let c = false; + for (let u = o.startLineNumber; u <= o.endLineNumber; u++) { + if (c) { + this.setTokens(t.getLanguageId(), u - 1, t.getLineLength(u), o.getLineTokens(u), false); + l = u; + } else if (this.setTokens(t.getLanguageId(), u - 1, t.getLineLength(u), o.getLineTokens(u), true)) { + c = true; + a = u; + l = u; + } + } + if (c) { + s.push({ + fromLineNumber: a, + toLineNumber: l + }); + } + } + return { + changes: s + }; + } + }; + } +}); +var Ers; +var kYn = ue({ + "out-build/vs/editor/common/tokens/sparseTokensStore.js"() { + "use strict"; + + Jt(); + RT(); + Ers = class cOn { + constructor(e) { + this.c = []; + this.d = false; + this.e = e; + } + flush() { + this.c = []; + this.d = false; + } + isEmpty() { + return this.c.length === 0; + } + set(e, t) { + this.c = e || []; + this.d = t; + } + setPartial(e, t) { + let s = e; + if (t.length > 0) { + const r = t[0].getRange(); + const o = t[t.length - 1].getRange(); + if (!r || !o) { + return e; + } + s = e.plusRange(r).plusRange(o); + } + let n = null; + for (let r = 0, o = this.c.length; r < o; r++) { + const a = this.c[r]; + if (a.endLineNumber < s.startLineNumber) { + continue; + } + if (a.startLineNumber > s.endLineNumber) { + n = n || { + index: r + }; + break; + } + a.removeTokens(s); + if (a.isEmpty()) { + this.c.splice(r, 1); + r--; + o--; + continue; + } + if (a.endLineNumber < s.startLineNumber) { + continue; + } + if (a.startLineNumber > s.endLineNumber) { + n = n || { + index: r + }; + continue; + } + const [l, c] = a.split(s); + if (l.isEmpty()) { + n = n || { + index: r + }; + continue; + } + if (!c.isEmpty()) { + this.c.splice(r, 1, l, c); + r++; + o++; + n = n || { + index: r + }; + } + } + n = n || { + index: this.c.length + }; + if (t.length > 0) { + this.c = Xhe(this.c, n.index, t); + } + return s; + } + isComplete() { + return this.d; + } + addSparseTokens(e, t) { + if (t.getLineContent().length === 0) { + return t; + } + const s = this.c; + if (s.length === 0) { + return t; + } + const n = cOn.f(s, e); + const r = s[n].getLineTokens(e); + if (!r) { + return t; + } + const o = t.getCount(); + const a = r.getCount(); + let l = 0; + const c = []; + let u = 0; + let d = 0; + const h = (g, p) => { + if (g !== d) { + d = g; + c[u++] = g; + c[u++] = p; + } + }; + for (let g = 0; g < a; g++) { + const p = r.getStartCharacter(g); + const b = r.getEndCharacter(g); + const v = r.getMetadata(g); + const y = ((v & 1 ? 2048 : 0) | (v & 2 ? 4096 : 0) | (v & 4 ? 8192 : 0) | (v & 8 ? 16384 : 0) | (v & 16 ? 16744448 : 0) | (v & 32 ? 4278190080 : 0)) >>> 0; + const w = ~y >>> 0; + while (l < o && t.getEndOffset(l) <= p) { + h(t.getEndOffset(l), t.getMetadata(l)); + l++; + } + for (l < o && t.getStartOffset(l) < p && h(p, t.getMetadata(l)); l < o && t.getEndOffset(l) < b;) { + h(t.getEndOffset(l), t.getMetadata(l) & w | v & y); + l++; + } + if (l < o) { + h(b, t.getMetadata(l) & w | v & y); + if (t.getEndOffset(l) === b) { + l++; + } + } else { + const C = Math.min(Math.max(0, l - 1), o - 1); + h(b, t.getMetadata(C) & w | v & y); + } + } + while (l < o) { + h(t.getEndOffset(l), t.getMetadata(l)); + l++; + } + return new Kb(new Uint32Array(c), t.getLineContent(), this.e); + } + static f(e, t) { + let s = 0; + let n = e.length - 1; + while (s < n) { + let r = s + Math.floor((n - s) / 2); + if (e[r].endLineNumber < t) { + s = r + 1; + } else if (e[r].startLineNumber > t) { + n = r - 1; + } else { + while (r > s && e[r - 1].startLineNumber <= t && t <= e[r - 1].endLineNumber) { + r--; + } + return r; + } + } + return s; + } + acceptEdit(e, t, s, n, r) { + for (const o of this.c) { + o.acceptEdit(e, t, s, n, r); + } + } + }; + } +}); +var vlt; +var ylt; +var X7t; +var EYn = ue({ + "out-build/vs/editor/common/model/tokenizationTextModelPart.js"() { + "use strict"; + + Ut(); + pe(); + q(); + J9(); + Nf(); + Rs(); + BL(); + Eo(); + wn(); + Bd(); + Fts(); + wrs(); + G7t(); + SYn(); + ez(); + j7t(); + xYn(); + kYn(); + ylt = vlt = class extends d9t { + constructor(e, t, s, n, r, o, a) { + super(); + this.r = e; + this.t = t; + this.u = s; + this.w = n; + this.y = r; + this.z = o; + this.C = a; + this.a = new Ers(this.y.languageIdCodec); + this.h = this.D(new B()); + this.onDidChangeLanguage = this.h.event; + this.j = this.D(new B()); + this.onDidChangeLanguageConfiguration = this.j.event; + this.m = this.D(new B()); + this.onDidChangeTokens = this.m.event; + this.q = this.D(new Q()); + this.D(de.filter(b4.onDidChange, l => l.changedLanguages.includes(this.u))(() => { + this.I(); + })); + this.I(); + } + F() { + return this.D(new X7t(this.y.languageIdCodec, this.r, () => this.u, this.w)); + } + G() { + return this.D(new K7t(this.C, this.y.languageIdCodec, this.r, () => this.u)); + } + H(e) { + const t = this.n !== undefined; + this.n?.dispose(); + this.n = e ? this.G() : this.F(); + this.q.clear(); + this.q.add(this.n.onDidChangeTokens(s => { + this.J(s); + })); + this.q.add(this.n.onDidChangeBackgroundTokenizationState(s => { + this.t.handleDidChangeBackgroundTokenizationState(); + })); + if (t) { + this.n.resetTokenization(); + } + } + I() { + if (b4.get(this.u)) { + if (!(this.n instanceof K7t)) { + this.H(true); + } + } else if (!(this.n instanceof X7t)) { + this.H(false); + } + } + _hasListeners() { + return this.h.hasListeners() || this.j.hasListeners() || this.m.hasListeners(); + } + handleLanguageConfigurationServiceChange(e) { + if (e.affects(this.u)) { + this.j.fire({}); + } + } + handleDidChangeContent(e) { + if (e.isFlush) { + this.a.flush(); + } else if (!e.isEolChange) { + for (const t of e.changes) { + const [s, n, r] = XL(t.text); + this.a.acceptEdit(t.range, s, n, r, t.text.length > 0 ? t.text.charCodeAt(0) : 0); + } + } + this.n.handleDidChangeContent(e); + } + handleDidChangeAttached() { + this.n.handleDidChangeAttached(); + } + getLineTokens(e) { + this.L(e); + const t = this.n.getLineTokens(e); + return this.a.addSparseTokens(e, t); + } + J(e) { + if (!this.r._isDisposing()) { + this.t.handleDidChangeTokens(e); + this.m.fire(e); + } + } + L(e) { + if (e < 1 || e > this.r.getLineCount()) { + throw new co("Illegal value for lineNumber"); + } + } + get hasTokens() { + return this.n.hasTokens; + } + resetTokenization() { + this.n.resetTokenization(); + } + get backgroundTokenizationState() { + return this.n.backgroundTokenizationState; + } + forceTokenization(e) { + this.L(e); + this.n.forceTokenization(e); + } + hasAccurateTokensForLine(e) { + this.L(e); + return this.n.hasAccurateTokensForLine(e); + } + isCheapToTokenize(e) { + this.L(e); + return this.n.isCheapToTokenize(e); + } + tokenizeIfCheap(e) { + this.L(e); + this.n.tokenizeIfCheap(e); + } + getTokenTypeIfInsertingCharacter(e, t, s) { + return this.n.getTokenTypeIfInsertingCharacter(e, t, s); + } + tokenizeLineWithEdit(e, t) { + return this.n.tokenizeLineWithEdit(e, t); + } + setSemanticTokens(e, t) { + this.a.set(e, t); + this.J({ + semanticTokensApplied: e !== null, + ranges: [{ + fromLineNumber: 1, + toLineNumber: this.r.getLineCount() + }] + }); + } + hasCompleteSemanticTokens() { + return this.a.isComplete(); + } + hasSomeSemanticTokens() { + return !this.a.isEmpty(); + } + setPartialSemanticTokens(e, t) { + if (this.hasCompleteSemanticTokens()) { + return; + } + const s = this.r.validateRange(this.a.setPartial(e, t)); + this.J({ + semanticTokensApplied: true, + ranges: [{ + fromLineNumber: s.startLineNumber, + toLineNumber: s.endLineNumber + }] + }); + } + getWordAtPosition(e) { + this.g(); + const t = this.r.validatePosition(e); + const s = this.r.getLineContent(t.lineNumber); + const n = this.getLineTokens(t.lineNumber); + const r = n.findTokenIndexAtOffset(t.column - 1); + const [o, a] = vlt.N(n, r); + const l = QB(t.column, this.M(n.getLanguageId(r)).getWordDefinition(), s.substring(o, a), o); + if (l && l.startColumn <= e.column && e.column <= l.endColumn) { + return l; + } + if (r > 0 && o === t.column - 1) { + const [c, u] = vlt.N(n, r - 1); + const d = QB(t.column, this.M(n.getLanguageId(r - 1)).getWordDefinition(), s.substring(c, u), c); + if (d && d.startColumn <= e.column && e.column <= d.endColumn) { + return d; + } + } + return null; + } + M(e) { + return this.z.getLanguageConfiguration(e); + } + static N(e, t) { + const s = e.getLanguageId(t); + let n = 0; + for (let o = t; o >= 0 && e.getLanguageId(o) === s; o--) { + n = e.getStartOffset(o); + } + let r = e.getLineContent().length; + for (let o = t, a = e.getCount(); o < a && e.getLanguageId(o) === s; o++) { + r = e.getEndOffset(o); + } + return [n, r]; + } + getWordUntilPosition(e) { + const t = this.getWordAtPosition(e); + if (t) { + return { + word: t.word.substr(0, e.column - t.startColumn), + startColumn: t.startColumn, + endColumn: e.column + }; + } else { + return { + word: "", + startColumn: e.column, + endColumn: e.column + }; + } + } + getWordsUntilPosition(e) { + this.g(); + const t = []; + const s = this.r.validatePosition(e); + const n = this.getLineTokens(s.lineNumber); + const r = n.findTokenIndexAtOffset(s.column - 1); + for (let o = 0; o < r; o++) { + t.push({ + startLineNumber: s.lineNumber, + endLineNumber: s.lineNumber, + startColumn: n.getStartOffset(o), + endColumn: n.getEndOffset(o) + }); + } + return t; + } + getLanguageId() { + return this.u; + } + getLanguageIdAtPosition(e, t) { + const s = this.r.validatePosition(new je(e, t)); + const n = this.getLineTokens(s.lineNumber); + return n.getLanguageId(n.findTokenIndexAtOffset(s.column - 1)); + } + setLanguageId(e, t = "api") { + if (this.u === e) { + return; + } + const s = { + oldLanguage: this.u, + newLanguage: e, + source: t + }; + this.u = e; + this.t.handleDidChangeLanguage(s); + this.n.resetTokenization(); + this.I(); + this.h.fire(s); + this.j.fire({}); + } + }; + ylt = vlt = __decorate([__param(4, As), __param(5, Lu), __param(6, N4)], ylt); + X7t = class extends J7t { + constructor(i, e, t, s) { + super(i, e, t); + this.q = null; + this.r = null; + this.t = this.D(new ki()); + this.u = new Y7t(this.j); + this.z = this.D(new ki()); + this.C = this.D(new Bo()); + this.D(qm.onDidChange(n => { + const r = this.n(); + if (n.changedLanguages.indexOf(r) !== -1) { + this.resetTokenization(); + } + })); + this.resetTokenization(); + this.D(s.onDidChangeVisibleRanges(({ + view: n, + state: r + }) => { + if (r) { + let o = this.C.get(n); + if (!o) { + o = new xrs(() => this.H(o.lineRanges)); + this.C.set(n, o); + } + o.handleStateChange(r); + } else { + this.C.deleteAndDispose(n); + } + })); + } + resetTokenization(i = true) { + this.u.flush(); + this.w?.flush(); + this.y &&= new blt(this.m.getLineCount()); + if (i) { + this.h.fire({ + semanticTokensApplied: false, + ranges: [{ + fromLineNumber: 1, + toLineNumber: this.m.getLineCount() + }] + }); + } + const e = () => { + if (this.m.isTooLargeForTokenization()) { + return [null, null]; + } + const n = qm.get(this.n()); + if (!n) { + return [null, null]; + } + let r; + try { + r = n.getInitialState(); + } catch (o) { + xs(o); + return [null, null]; + } + return [n, r]; + }; + const [t, s] = e(); + if (t && s) { + this.q = new brs(this.m.getLineCount(), t, this.m, this.j); + } else { + this.q = null; + } + this.t.clear(); + this.r = null; + if (this.q) { + const n = { + setTokens: r => { + this.F(r); + }, + backgroundTokenizationFinished: () => { + if (this.f === 2) { + return; + } + const r = 2; + this.f = r; + this.g.fire(); + }, + setEndState: (r, o) => { + if (!this.q) { + return; + } + const a = this.q.store.getFirstInvalidEndStateLineNumber(); + if (a !== null && r >= a) { + this.q?.store.setEndState(r, o); + } + } + }; + if (t && t.createBackgroundTokenizer && !t.backgroundTokenizerShouldOnlyVerifyTokens) { + this.t.value = t.createBackgroundTokenizer(this.m, n); + } + if (!this.t.value && !this.m.isTooLargeForTokenization()) { + this.t.value = this.r = new yrs(this.q, n); + this.r.handleChanges(); + } + if (t?.backgroundTokenizerShouldOnlyVerifyTokens && t.createBackgroundTokenizer) { + this.w = new Y7t(this.j); + this.y = new blt(this.m.getLineCount()); + this.z.clear(); + this.z.value = t.createBackgroundTokenizer(this.m, { + setTokens: r => { + this.w?.setMultilineTokens(r, this.m); + }, + backgroundTokenizationFinished() {}, + setEndState: (r, o) => { + this.y?.setEndState(r, o); + } + }); + } else { + this.w = undefined; + this.y = undefined; + this.z.value = undefined; + } + } + this.G(); + } + handleDidChangeAttached() { + this.r?.handleChanges(); + } + handleDidChangeContent(i) { + if (i.isFlush) { + this.resetTokenization(false); + } else if (!i.isEolChange) { + for (const e of i.changes) { + const [t, s] = XL(e.text); + this.u.acceptEdit(e.range, t, s); + this.w?.acceptEdit(e.range, t, s); + } + this.y?.acceptChanges(i.changes); + if (this.q) { + this.q.store.acceptChanges(i.changes); + } + this.r?.handleChanges(); + } + } + F(i) { + const { + changes: e + } = this.u.setMultilineTokens(i, this.m); + if (e.length > 0) { + this.h.fire({ + semanticTokensApplied: false, + ranges: e + }); + } + return { + changes: e + }; + } + G() { + const i = or.joinMany([...this.C].map(([e, t]) => t.lineRanges)); + this.H(i); + } + H(i) { + for (const e of i) { + this.I(e.startLineNumber, e.endLineNumberExclusive - 1); + } + } + I(i, e) { + if (!this.q) { + return; + } + i = Math.max(1, Math.min(this.m.getLineCount(), i)); + e = Math.min(this.m.getLineCount(), e); + const t = new Kte(); + const { + heuristicTokens: s + } = this.q.tokenizeHeuristically(t, i, e); + const n = this.F(t.finalize()); + if (s) { + for (const r of n.changes) { + this.t.value?.requestTokens(r.fromLineNumber, r.toLineNumber + 1); + } + } + this.r?.checkFinished(); + } + forceTokenization(i) { + const e = new Kte(); + this.q?.updateTokensUntilLine(e, i); + this.F(e.finalize()); + this.r?.checkFinished(); + } + hasAccurateTokensForLine(i) { + if (this.q) { + return this.q.hasAccurateTokensForLine(i); + } else { + return true; + } + } + isCheapToTokenize(i) { + if (this.q) { + return this.q.isCheapToTokenize(i); + } else { + return true; + } + } + getLineTokens(i) { + const e = this.m.getLineContent(i); + const t = this.u.getTokens(this.m.getLanguageId(), i - 1, e); + if (this.w && this.y && this.q && this.y.getFirstInvalidEndStateLineNumberOrMax() > i && this.q.store.getFirstInvalidEndStateLineNumberOrMax() > i) { + const s = this.w.getTokens(this.m.getLanguageId(), i - 1, e); + if (!t.equals(s) && this.z.value?.reportMismatchingTokens) { + this.z.value.reportMismatchingTokens(i); + } + } + return t; + } + getTokenTypeIfInsertingCharacter(i, e, t) { + if (!this.q) { + return 0; + } + const s = this.m.validatePosition(new je(i, e)); + this.forceTokenization(s.lineNumber); + return this.q.getTokenTypeIfInsertingCharacter(s, t); + } + tokenizeLineWithEdit(i, e) { + if (this.q) { + this.forceTokenization(i); + return this.q.tokenizeLineWithEdit(i, e); + } else { + return { + mainLineTokens: null, + additionalLines: null + }; + } + } + get hasTokens() { + return this.u.hasTokens; + } + }; + } +}); +var Hh; +var Irs; +var Q7t; +var tz; +var iz; +var qh = ue({ + "out-build/vs/platform/undoRedo/common/undoRedo.js"() { + "use strict"; + + te(); + Hh = Ve("undoRedoService"); + (function (i) { + i[i.Resource = 0] = "Resource"; + i[i.Workspace = 1] = "Workspace"; + })(Irs ||= {}); + Q7t = class { + constructor(i, e) { + this.resource = i; + this.elements = e; + } + }; + tz = class W3i { + static { + this.a = 0; + } + constructor() { + this.id = W3i.a++; + this.b = 1; + } + nextOrder() { + if (this.id === 0) { + return 0; + } else { + return this.b++; + } + } + static { + this.None = new W3i(); + } + }; + iz = class V3i { + static { + this.a = 0; + } + constructor() { + this.id = V3i.a++; + this.b = 1; + } + nextOrder() { + if (this.id === 0) { + return 0; + } else { + return this.b++; + } + } + static { + this.None = new V3i(); + } + }; + } +}); +var Drs = ue({ + "out-build/external/solid/solid/reactive/scheduler.js"() { + "use strict"; + } +}); +function Trs(i) { + const e = String(i); + const t = e.length - 1; + return Yl.context.id + (t ? String.fromCharCode(96 + t) : "") + e; +} +function sz(i) { + Yl.context = i; +} +function IYn() { + return { + ...Yl.context, + id: Yl.getNextContextId(), + count: 0 + }; +} +var Yl; +var Ype = ue({ + "out-build/external/solid/solid/render/hydration.js"() { + "use strict"; + + Yl = { + context: undefined, + registry: undefined, + effects: undefined, + done: false, + getContextId() { + return Trs(this.context.count); + }, + getNextContextId() { + return Trs(this.context.count++); + } + }; + } +}); +function Qb(i, e) { + const t = Mf; + const s = Dc; + const n = i.length === 0; + const r = e === undefined ? s : e; + const o = n ? xh ? { + owned: null, + cleanups: null, + context: null, + owner: null + } : oUt : { + owned: null, + cleanups: null, + context: r ? r.context : null, + owner: r + }; + const a = n ? xh ? () => i(() => { + throw new Error("Dispose method must be an explicit argument to createRoot function"); + }) : i : () => i(() => El(() => A4(o))); + if (xh && QL.afterCreateOwner) { + QL.afterCreateOwner(o); + } + Dc = o; + Mf = null; + try { + return _I(a, true); + } finally { + Mf = t; + Dc = s; + } +} +function ae(i, e) { + e = e ? Object.assign({}, eme, e) : eme; + const t = { + value: i, + observers: null, + observerSlots: null, + comparator: e.equals || undefined + }; + if (xh) { + if (e.name) { + t.name = e.name; + } + if (e.internal) { + t.internal = true; + } else { + Nrs(t); + if (QL.afterCreateSignal) { + QL.afterCreateSignal(t); + } + } + } + const s = n => { + if (typeof n == "function") { + if (ho && ho.running && ho.sources.has(t)) { + n = n(t.tValue); + } else { + n = n(t.value); + } + } + return tUt(t, n); + }; + return [Mrs.bind(t), s]; +} +function Z7t(i, e, t) { + const s = Xte(i, e, true, BI, xh ? t : undefined); + if (oz && ho && ho.running) { + Vy.push(s); + } else { + rz(s); + } +} +function Ie(i, e, t) { + const s = Xte(i, e, false, BI, xh ? t : undefined); + if (oz && ho && ho.running) { + Vy.push(s); + } else { + rz(s); + } +} +function Fe(i, e, t) { + rUt = NYn; + const s = Xte(i, e, false, BI, xh ? t : undefined); + const n = lz && iS(lz); + if (n) { + s.suspense = n; + } + if (!t || !t.render) { + s.user = true; + } + if (G0) { + G0.push(s); + } else { + rz(s); + } +} +function K(i, e, t) { + t = t ? Object.assign({}, eme, t) : eme; + const s = Xte(i, e, true, 0, xh ? t : undefined); + s.observers = null; + s.observerSlots = null; + s.comparator = t.equals || undefined; + if (oz && ho && ho.running) { + s.tState = BI; + Vy.push(s); + } else { + rz(s); + } + return Mrs.bind(s); +} +function DYn(i) { + return i && typeof i == "object" && "then" in i; +} +function M4(i, e, t) { + let s; + let n; + let r; + if (typeof e == "function") { + s = i; + n = e; + r = t || {}; + } else { + s = true; + n = i; + r = e || {}; + } + let o = null; + let a = xlt; + let l = null; + let c = false; + let u = false; + let d = "initialValue" in r; + let h = typeof s == "function" && K(s); + const g = new Set(); + const [p, b] = (r.storage || ae)(r.initialValue); + const [v, y] = ae(undefined); + const [w, C] = ae(undefined, { + equals: false + }); + const [S, x] = ae(d ? "ready" : "unresolved"); + if (Yl.context) { + l = Yl.getNextContextId(); + if (r.ssrLoadFrom === "initial") { + a = r.initialValue; + } else if (Yl.load && Yl.has(l)) { + a = Yl.load(l); + } + } + function k(R, L, F, O) { + if (o === R) { + o = null; + if (O !== undefined) { + d = true; + } + if ((R === a || L === a) && r.onHydrated) { + queueMicrotask(() => r.onHydrated(O, { + value: L + })); + } + a = xlt; + if (ho && R && c) { + ho.promises.delete(R); + c = false; + _I(() => { + ho.running = true; + E(L, F); + }, false); + } else { + E(L, F); + } + } + return L; + } + function E(R, L) { + _I(() => { + if (L === undefined) { + b(() => R); + } + x(L !== undefined ? "errored" : d ? "ready" : "unresolved"); + y(L); + for (const F of g.keys()) { + F.decrement(); + } + g.clear(); + }, false); + } + function D() { + const R = lz && iS(lz); + const L = p(); + const F = v(); + if (F !== undefined && !o) { + throw F; + } + if (Mf && !Mf.user && R) { + Z7t(() => { + w(); + if (o) { + if (R.resolved && ho && c) { + ho.promises.add(o); + } else if (!g.has(R)) { + R.increment(); + g.add(R); + } + } + }); + } + return L; + } + function P(R = true) { + if (R !== false && u) { + return; + } + u = false; + const L = h ? h() : s; + c = ho && ho.running; + if (L == null || L === false) { + k(o, El(p)); + return; + } + if (ho && o) { + ho.promises.delete(o); + } + const F = a !== xlt ? a : El(() => n(L, { + value: p(), + refetching: R + })); + if (DYn(F)) { + o = F; + if ("value" in F) { + if (F.status === "success") { + k(o, F.value, undefined, L); + } else { + k(o, undefined, iUt(F.value), L); + } + return F; + } else { + u = true; + queueMicrotask(() => u = false); + _I(() => { + x(d ? "refreshing" : "pending"); + C(); + }, false); + return F.then(O => k(F, O, undefined, L), O => k(F, undefined, iUt(O), L)); + } + } else { + k(o, F, undefined, L); + return F; + } + } + Object.defineProperties(D, { + state: { + get: () => S() + }, + error: { + get: () => v() + }, + loading: { + get() { + const R = S(); + return R === "pending" || R === "refreshing"; + } + }, + latest: { + get() { + if (!d) { + return D(); + } + const R = v(); + if (R && !o) { + throw R; + } + return p(); + } + } + }); + if (h) { + Z7t(() => P(false)); + } else { + P(false); + } + return [D, { + refetch: P, + mutate: b + }]; +} +function J0(i) { + return _I(i, false); +} +function El(i) { + if (!az && Mf === null) { + return i(); + } + const e = Mf; + Mf = null; + try { + if (az) { + return az.untrack(i); + } else { + return i(); + } + } finally { + Mf = e; + } +} +function Va(i, e, t) { + const s = Array.isArray(i); + let n; + let r = t && t.defer; + return o => { + let a; + if (s) { + a = Array(i.length); + for (let c = 0; c < i.length; c++) { + a[c] = i[c](); + } + } else { + a = i(); + } + if (r) { + r = false; + return o; + } + const l = El(() => e(a, n, o)); + n = a; + return l; + }; +} +function xr(i) { + Fe(() => El(i)); +} +function Qt(i) { + if (Dc === null) { + if (xh) { + console.warn("cleanups created outside a `createRoot` or `render` will never be run"); + } + } else if (Dc.cleanups === null) { + Dc.cleanups = [i]; + } else { + Dc.cleanups.push(i); + } + return i; +} +function Prs(i, e) { + Qte ||= Symbol("error"); + Dc = Xte(undefined, undefined, true); + Dc.context = { + ...Dc.context, + [Qte]: [e] + }; + if (ho && ho.running) { + ho.sources.add(Dc); + } + try { + return i(); + } catch (t) { + Qpe(t); + } finally { + Dc = Dc.owner; + } +} +function eUt() { + return Mf; +} +function wlt() { + return Dc; +} +function nz(i, e) { + const t = Dc; + const s = Mf; + Dc = i; + Mf = null; + try { + return _I(e, true); + } catch (n) { + Qpe(n); + } finally { + Dc = t; + Mf = s; + } +} +function Lrs(i) { + if (ho && ho.running) { + i(); + return ho.done; + } + const e = Mf; + const t = Dc; + return Promise.resolve().then(() => { + Mf = e; + Dc = t; + let s; + if (oz || lz) { + s = ho ||= { + sources: new Set(), + effects: [], + promises: new Set(), + disposed: new Set(), + queue: new Set(), + running: true + }; + s.done ||= new Promise(n => s.resolve = n); + s.running = true; + } + _I(i, false); + Mf = Dc = null; + if (s) { + return s.done; + } else { + return undefined; + } + }); +} +function TYn(i) { + G0.push.apply(G0, i); + i.length = 0; +} +function Rrs(i, e) { + const t = Xte(() => El(() => { + Object.assign(i, { + [nUt]: true + }); + return i(e); + }), undefined, true, 0); + t.props = e; + t.observers = null; + t.observerSlots = null; + t.name = i.name; + t.component = i; + rz(t); + if (t.tValue !== undefined) { + return t.tValue; + } else { + return t.value; + } +} +function Nrs(i) { + if (Dc) { + if (Dc.sourceMap) { + Dc.sourceMap.push(i); + } else { + Dc.sourceMap = [i]; + } + i.graph = Dc; + } + if (QL.afterRegisterGraph) { + QL.afterRegisterGraph(i); + } +} +function Uw(i, e) { + const t = Symbol("context"); + return { + id: t, + Provider: MYn(t, e), + defaultValue: i + }; +} +function iS(i) { + let e; + if (Dc && Dc.context && (e = Dc.context[i.id]) !== undefined) { + return e; + } else { + return i.defaultValue; + } +} +function Gu(i) { + const e = K(i); + const t = xh ? K(() => Slt(e()), undefined, { + name: "children" + }) : K(() => Slt(e())); + t.toArray = () => { + const s = t(); + if (Array.isArray(s)) { + return s; + } else if (s != null) { + return [s]; + } else { + return []; + } + }; + return t; +} +function PYn() { + return lz ||= Uw(); +} +function Mrs() { + const i = ho && ho.running; + if (this.sources && (i ? this.tState : this.state)) { + if ((i ? this.tState : this.state) === BI) { + rz(this); + } else { + const e = Vy; + Vy = null; + _I(() => Clt(this), false); + Vy = e; + } + } + if (Mf) { + const e = this.observers ? this.observers.length : 0; + if (Mf.sources) { + Mf.sources.push(this); + Mf.sourceSlots.push(e); + } else { + Mf.sources = [this]; + Mf.sourceSlots = [e]; + } + if (!this.observers) { + this.observers = [Mf]; + this.observerSlots = [Mf.sources.length - 1]; + } else { + this.observers.push(Mf); + this.observerSlots.push(Mf.sources.length - 1); + if (xh && this.observers.length > 1000 && this.observers.length % 100 === 0) { + const t = new Error().stack?.split(` +`).slice(1).join(` +`); + console.warn("solid signal has", this.observers.length, "observers for value:", this.value, this, t); + } + } + } + if (i && ho.sources.has(this)) { + return this.tValue; + } else { + return this.value; + } +} +function tUt(i, e, t) { + let s = ho && ho.running && ho.sources.has(i) ? i.tValue : i.value; + if (!i.comparator || !i.comparator(s, e)) { + if (ho) { + const n = ho.running; + if (n || !t && ho.sources.has(i)) { + ho.sources.add(i); + i.tValue = e; + } + if (!n) { + i.value = e; + } + } else { + i.value = e; + } + if (i.observers && i.observers.length) { + _I(() => { + for (let n = 0; n < i.observers.length; n += 1) { + const r = i.observers[n]; + const o = ho && ho.running; + if (!o || !ho.disposed.has(r)) { + if (o ? !r.tState : !r.state) { + if (r.pure) { + Vy.push(r); + } else { + G0.push(r); + } + if (r.observers) { + Frs(r); + } + } + if (o) { + r.tState = BI; + } else { + r.state = BI; + } + } + } + if (Vy.length > 1000000) { + Vy = []; + throw xh ? new Error("Potential Infinite Loop Detected.") : new Error(); + } + }, false); + } + } + return e; +} +function rz(i) { + if (!i.fn) { + return; + } + A4(i); + const e = tme; + Ars(i, ho && ho.running && ho.sources.has(i) ? i.tValue : i.value, e); + if (ho && !ho.running && ho.sources.has(i)) { + queueMicrotask(() => { + _I(() => { + if (ho) { + ho.running = true; + } + Mf = Dc = i; + Ars(i, i.tValue, e); + Mf = Dc = null; + }, false); + }); + } +} +function Ars(i, e, t) { + let s; + const n = Dc; + const r = Mf; + Mf = Dc = i; + try { + s = i.fn(e); + } catch (o) { + if (i.pure) { + if (ho && ho.running) { + i.tState = BI; + if (i.tOwned) { + i.tOwned.forEach(A4); + } + i.tOwned = undefined; + } else { + i.state = BI; + if (i.owned) { + i.owned.forEach(A4); + } + i.owned = null; + } + } + i.updatedAt = t + 1; + return Qpe(o); + } finally { + Mf = r; + Dc = n; + } + if (!i.updatedAt || i.updatedAt <= t) { + if (i.updatedAt != null && "observers" in i) { + tUt(i, s, true); + } else if (ho && ho.running && i.pure) { + ho.sources.add(i); + i.tValue = s; + } else { + i.value = s; + } + i.updatedAt = t; + } +} +function Xte(i, e, t, s = BI, n) { + const r = { + fn: i, + state: s, + updatedAt: null, + owned: null, + sources: null, + sourceSlots: null, + cleanups: null, + value: e, + owner: Dc, + context: Dc ? Dc.context : null, + pure: t + }; + if (ho && ho.running) { + r.state = 0; + r.tState = s; + } + if (Dc === null) { + if (xh) { + console.warn("computations created outside a `createRoot` or `render` will never be disposed"); + } + } else if (Dc !== oUt) { + if (ho && ho.running && Dc.pure) { + if (Dc.tOwned) { + Dc.tOwned.push(r); + } else { + Dc.tOwned = [r]; + } + } else if (Dc.owned) { + Dc.owned.push(r); + } else { + Dc.owned = [r]; + } + } + if (xh && n && n.name) { + r.name = n.name; + } + if (az && r.fn) { + const [o, a] = ae(undefined, { + equals: false + }); + const l = az.factory(r.fn, a); + Qt(() => l.dispose()); + const c = () => Lrs(a).then(() => u.dispose()); + const u = az.factory(r.fn, c); + r.fn = d => { + o(); + if (ho && ho.running) { + return u.track(d); + } else { + return l.track(d); + } + }; + } + if (xh && QL.afterCreateOwner) { + QL.afterCreateOwner(r); + } + return r; +} +function Xpe(i) { + const e = ho && ho.running; + if ((e ? i.tState : i.state) === 0) { + return; + } + if ((e ? i.tState : i.state) === Zte) { + return Clt(i); + } + if (i.suspense && El(i.suspense.inFallback)) { + return i.suspense.effects.push(i); + } + const t = [i]; + while ((i = i.owner) && (!i.updatedAt || i.updatedAt < tme)) { + if (e && ho.disposed.has(i)) { + return; + } + if (e ? i.tState : i.state) { + t.push(i); + } + } + for (let s = t.length - 1; s >= 0; s--) { + i = t[s]; + if (e) { + let n = i; + let r = t[s + 1]; + while ((n = n.owner) && n !== r) { + if (ho.disposed.has(n)) { + return; + } + } + } + if ((e ? i.tState : i.state) === BI) { + rz(i); + } else if ((e ? i.tState : i.state) === Zte) { + const n = Vy; + Vy = null; + _I(() => Clt(i, t[0]), false); + Vy = n; + } + } +} +function _I(i, e) { + if (Vy) { + return i(); + } + let t = false; + if (!e) { + Vy = []; + } + if (G0) { + t = true; + } else { + G0 = []; + } + tme++; + try { + const s = i(); + LYn(t); + return s; + } catch (s) { + if (!t) { + G0 = null; + } + Vy = null; + Qpe(s); + } +} +function LYn(i) { + if (Vy) { + if (oz && ho && ho.running) { + RYn(Vy); + } else { + $rs(Vy); + } + Vy = null; + } + if (i) { + return; + } + let e; + if (ho) { + if (!ho.promises.size && !ho.queue.size) { + const s = ho.sources; + const n = ho.disposed; + G0.push.apply(G0, ho.effects); + e = ho.resolve; + for (const r of G0) { + if ("tState" in r) { + r.state = r.tState; + } + delete r.tState; + } + ho = null; + _I(() => { + for (const r of n) { + A4(r); + } + for (const r of s) { + r.value = r.tValue; + if (r.owned) { + for (let o = 0, a = r.owned.length; o < a; o++) { + A4(r.owned[o]); + } + } + if (r.tOwned) { + r.owned = r.tOwned; + } + delete r.tValue; + delete r.tOwned; + r.tState = 0; + } + aUt(false); + }, false); + } else if (ho.running) { + ho.running = false; + ho.effects.push.apply(ho.effects, G0); + G0 = null; + aUt(true); + return; + } + } + const t = G0; + G0 = null; + if (t.length) { + _I(() => rUt(t), false); + } else if (xh && QL.afterUpdate) { + QL.afterUpdate(); + } + if (e) { + e(); + } +} +function $rs(i) { + for (let e = 0; e < i.length; e++) { + Xpe(i[e]); + } +} +function RYn(i) { + for (let e = 0; e < i.length; e++) { + const t = i[e]; + const s = ho.queue; + if (!s.has(t)) { + s.add(t); + oz(() => { + s.delete(t); + _I(() => { + ho.running = true; + Xpe(t); + }, false); + if (ho) { + ho.running = false; + } + }); + } + } +} +function NYn(i) { + let e; + let t = 0; + for (e = 0; e < i.length; e++) { + const s = i[e]; + if (s.user) { + i[t++] = s; + } else { + Xpe(s); + } + } + if (Yl.context) { + if (Yl.count) { + Yl.effects ||= []; + Yl.effects.push(...i.slice(0, t)); + return; + } + sz(); + } + if (Yl.effects && (Yl.done || !Yl.count)) { + i = [...Yl.effects, ...i]; + t += Yl.effects.length; + delete Yl.effects; + } + e = 0; + for (; e < t; e++) { + Xpe(i[e]); + } +} +function Clt(i, e) { + const t = ho && ho.running; + if (t) { + i.tState = 0; + } else { + i.state = 0; + } + for (let s = 0; s < i.sources.length; s += 1) { + const n = i.sources[s]; + if (n.sources) { + const r = t ? n.tState : n.state; + if (r === BI) { + if (n !== e && (!n.updatedAt || n.updatedAt < tme)) { + Xpe(n); + } + } else if (r === Zte) { + Clt(n, e); + } + } + } +} +function Frs(i) { + const e = ho && ho.running; + for (let t = 0; t < i.observers.length; t += 1) { + const s = i.observers[t]; + if (e ? !s.tState : !s.state) { + if (e) { + s.tState = Zte; + } else { + s.state = Zte; + } + if (s.pure) { + Vy.push(s); + } else { + G0.push(s); + } + if (s.observers) { + Frs(s); + } + } + } +} +function A4(i) { + let e; + if (i.sources) { + while (i.sources.length) { + const t = i.sources.pop(); + const s = i.sourceSlots.pop(); + const n = t.observers; + if (n && n.length) { + const r = n.pop(); + const o = t.observerSlots.pop(); + if (s < n.length) { + r.sourceSlots[o] = s; + n[s] = r; + t.observerSlots[s] = o; + } + } + } + } + if (i.tOwned) { + for (e = i.tOwned.length - 1; e >= 0; e--) { + A4(i.tOwned[e]); + } + delete i.tOwned; + } + if (ho && ho.running && i.pure) { + Ors(i, true); + } else if (i.owned) { + for (e = i.owned.length - 1; e >= 0; e--) { + A4(i.owned[e]); + } + i.owned = null; + } + if (i.cleanups) { + for (e = i.cleanups.length - 1; e >= 0; e--) { + i.cleanups[e](); + } + i.cleanups = null; + } + if (ho && ho.running) { + i.tState = 0; + } else { + i.state = 0; + } + if (xh) { + delete i.sourceMap; + } +} +function Ors(i, e) { + if (!e) { + i.tState = 0; + ho.disposed.add(i); + } + if (i.owned) { + for (let t = 0; t < i.owned.length; t++) { + Ors(i.owned[t]); + } + } +} +function iUt(i) { + if (i instanceof Error) { + return i; + } else { + return new Error(typeof i == "string" ? i : "Unknown error", { + cause: i + }); + } +} +function _rs(i, e, t) { + try { + for (const s of e) { + s(i); + } + } catch (s) { + Qpe(s, t && t.owner || null); + } +} +function Qpe(i, e = Dc) { + const t = Qte && e && e.context && e.context[Qte]; + const s = iUt(i); + if (!t) { + throw s; + } + if (G0) { + G0.push({ + fn() { + _rs(s, t, e); + }, + state: BI + }); + } else { + _rs(s, t, e); + } +} +function Slt(i) { + if (typeof i == "function" && !i.length) { + return Slt(i()); + } + if (Array.isArray(i)) { + const e = []; + for (let t = 0; t < i.length; t++) { + const s = Slt(i[t]); + if (Array.isArray(s)) { + e.push.apply(e, s); + } else { + e.push(s); + } + } + return e; + } + return i; +} +function MYn(i, e) { + return function (s) { + let n; + Ie(() => n = El(() => { + Dc.context = { + ...Dc.context, + [i]: s.value + }; + return Gu(() => s.children); + }), undefined, e); + return n; + }; +} +var xh; +var Brs; +var WT; +var sUt; +var Zpe; +var nUt; +var eme; +var Qte; +var rUt; +var BI; +var Zte; +var oUt; +var xlt; +var Dc; +var ho; +var oz; +var az; +var Mf; +var Vy; +var G0; +var tme; +var QL; +var AYn; +var aUt; +var lz; +var cz = ue({ + "out-build/external/solid/solid/reactive/signal.js"() { + "use strict"; + + Drs(); + Ype(); + xh = false; + Brs = (i, e) => i === e; + WT = Symbol("solid-proxy"); + sUt = typeof Proxy == "function"; + Zpe = Symbol("solid-track"); + nUt = Symbol("solid-dev-component"); + eme = { + equals: Brs + }; + Qte = null; + rUt = $rs; + BI = 1; + Zte = 2; + oUt = { + owned: null, + cleanups: null, + context: null, + owner: null + }; + xlt = {}; + Dc = null; + ho = null; + oz = null; + az = null; + Mf = null; + Vy = null; + G0 = null; + tme = 0; + QL = { + afterUpdate: null, + afterCreateOwner: null, + afterCreateSignal: null, + afterRegisterGraph: null + }; + [AYn, aUt] = ae(false); + } +}); +var $Yn = ue({ + "out-build/external/solid/solid/reactive/observable.js"() { + "use strict"; + + cz(); + } +}); +function klt(i) { + for (let e = 0; e < i.length; e++) { + i[e](); + } +} +function Urs(i, e, t = {}) { + let s = []; + let n = []; + let r = []; + let o = 0; + let a = e.length > 1 ? [] : null; + Qt(() => klt(r)); + return () => { + let l = i() || []; + let c = l.length; + let u; + let d; + l[Zpe]; + return El(() => { + let g; + let p; + let b; + let v; + let y; + let w; + let C; + let S; + let x; + if (c === 0) { + if (o !== 0) { + klt(r); + r = []; + s = []; + n = []; + o = 0; + a &&= []; + } + if (t.fallback) { + s = [Elt]; + n[0] = Qb(k => { + r[0] = k; + return t.fallback(); + }); + o = 1; + } + } else if (o === 0) { + n = new Array(c); + d = 0; + for (; d < c; d++) { + s[d] = l[d]; + n[d] = Qb(h); + } + o = c; + } else { + b = new Array(c); + v = new Array(c); + if (a) { + y = new Array(c); + } + w = 0; + C = Math.min(o, c); + for (; w < C && s[w] === l[w]; w++); + C = o - 1; + S = c - 1; + for (; C >= w && S >= w && s[C] === l[S]; C--, S--) { + b[S] = n[C]; + v[S] = r[C]; + if (a) { + y[S] = a[C]; + } + } + g = new Map(); + p = new Array(S + 1); + d = S; + for (; d >= w; d--) { + x = l[d]; + u = g.get(x); + p[d] = u === undefined ? -1 : u; + g.set(x, d); + } + for (u = w; u <= C; u++) { + x = s[u]; + d = g.get(x); + if (d !== undefined && d !== -1) { + b[d] = n[u]; + v[d] = r[u]; + if (a) { + y[d] = a[u]; + } + d = p[d]; + g.set(x, d); + } else { + r[u](); + } + } + for (d = w; d < c; d++) { + if (d in b) { + n[d] = b[d]; + r[d] = v[d]; + if (a) { + a[d] = y[d]; + a[d](d); + } + } else { + n[d] = Qb(h); + } + } + n = n.slice(0, o = c); + s = l.slice(0); + } + return n; + }); + function h(g) { + r[d] = g; + if (a) { + const [p, b] = xh ? ae(d, { + name: "index" + }) : ae(d); + a[d] = b; + return e(l[d], p); + } + return e(l[d]); + } + }; +} +function Wrs(i, e, t = {}) { + let s = []; + let n = []; + let r = []; + let o = []; + let a = 0; + let l; + Qt(() => klt(r)); + return () => { + const c = i() || []; + const u = c.length; + c[Zpe]; + return El(() => { + if (u === 0) { + if (a !== 0) { + klt(r); + r = []; + s = []; + n = []; + a = 0; + o = []; + } + if (t.fallback) { + s = [Elt]; + n[0] = Qb(h => { + r[0] = h; + return t.fallback(); + }); + a = 1; + } + return n; + } + if (s[0] === Elt) { + r[0](); + r = []; + s = []; + n = []; + a = 0; + } + l = 0; + for (; l < u; l++) { + if (l < s.length && s[l] !== c[l]) { + o[l](() => c[l]); + } else if (l >= s.length) { + n[l] = Qb(d); + } + } + for (; l < s.length; l++) { + r[l](); + } + a = o.length = r.length = u; + s = c.slice(0); + return n = n.slice(0, a); + }); + function d(h) { + r[l] = h; + const [g, p] = xh ? ae(c[l], { + name: "value" + }) : ae(c[l]); + o[l] = p; + return e(g, l); + } + }; +} +var Elt; +var Vrs = ue({ + "out-build/external/solid/solid/reactive/array.js"() { + "use strict"; + + cz(); + Elt = Symbol("fallback"); + } +}); +function I(i, e) { + if (Hrs && Yl.context) { + const t = Yl.context; + sz(IYn()); + const s = xh ? Rrs(i, e || {}) : El(() => i(e || {})); + sz(t); + return s; + } + if (xh) { + return Rrs(i, e || {}); + } else { + return El(() => i(e || {})); + } +} +function Ilt() { + return true; +} +function lUt(i) { + if (i = typeof i == "function" ? i() : i) { + return i; + } else { + return {}; + } +} +function FYn() { + for (let i = 0, e = this.length; i < e; ++i) { + const t = this[i](); + if (t !== undefined) { + return t; + } + } +} +function Uo(...i) { + let e = false; + for (let o = 0; o < i.length; o++) { + const a = i[o]; + e = e || !!a && WT in a; + i[o] = typeof a == "function" ? (e = true, K(a)) : a; + } + if (sUt && e) { + return new Proxy({ + get(o) { + for (let a = i.length - 1; a >= 0; a--) { + const l = lUt(i[a])[o]; + if (l !== undefined) { + return l; + } + } + }, + has(o) { + for (let a = i.length - 1; a >= 0; a--) { + if (o in lUt(i[a])) { + return true; + } + } + return false; + }, + keys() { + const o = []; + for (let a = 0; a < i.length; a++) { + o.push(...Object.keys(lUt(i[a]))); + } + return [...new Set(o)]; + } + }, Tlt); + } + const t = {}; + const s = Object.create(null); + for (let o = i.length - 1; o >= 0; o--) { + const a = i[o]; + if (!a) { + continue; + } + const l = Object.getOwnPropertyNames(a); + for (let c = l.length - 1; c >= 0; c--) { + const u = l[c]; + if (u === "__proto__" || u === "constructor") { + continue; + } + const d = Object.getOwnPropertyDescriptor(a, u); + if (!s[u]) { + s[u] = d.get ? { + enumerable: true, + configurable: true, + get: FYn.bind(t[u] = [d.get.bind(a)]) + } : d.value !== undefined ? d : undefined; + } else { + const h = t[u]; + if (h) { + if (d.get) { + h.push(d.get.bind(a)); + } else if (d.value !== undefined) { + h.push(() => d.value); + } + } + } + } + } + const n = {}; + const r = Object.keys(s); + for (let o = r.length - 1; o >= 0; o--) { + const a = r[o]; + const l = s[a]; + if (l && l.get) { + Object.defineProperty(n, a, l); + } else { + n[a] = l ? l.value : undefined; + } + } + return n; +} +function UI(i, ...e) { + if (sUt && WT in i) { + const n = new Set(e.length > 1 ? e.flat() : e[0]); + const r = e.map(o => new Proxy({ + get(a) { + if (o.includes(a)) { + return i[a]; + } else { + return undefined; + } + }, + has(a) { + return o.includes(a) && a in i; + }, + keys() { + return o.filter(a => a in i); + } + }, Tlt)); + r.push(new Proxy({ + get(o) { + if (n.has(o)) { + return undefined; + } else { + return i[o]; + } + }, + has(o) { + if (n.has(o)) { + return false; + } else { + return o in i; + } + }, + keys() { + return Object.keys(i).filter(o => !n.has(o)); + } + }, Tlt)); + return r; + } + const t = {}; + const s = e.map(() => ({})); + for (const n of Object.getOwnPropertyNames(i)) { + const r = Object.getOwnPropertyDescriptor(i, n); + const o = !r.get && !r.set && r.enumerable && r.writable && r.configurable; + let a = false; + let l = 0; + for (const c of e) { + if (c.includes(n)) { + a = true; + if (o) { + s[l][n] = r.value; + } else { + Object.defineProperty(s[l], n, r); + } + } + ++l; + } + if (!a) { + if (o) { + t[n] = r.value; + } else { + Object.defineProperty(t, n, r); + } + } + } + return [...s, t]; +} +function Dlt() { + if (Yl.context) { + return Yl.getNextContextId(); + } else { + return `cl-${qrs++}`; + } +} +var Hrs; +var Tlt; +var qrs; +var jrs = ue({ + "out-build/external/solid/solid/render/component.js"() { + "use strict"; + + cz(); + Ype(); + Hrs = false; + Tlt = { + get(i, e, t) { + if (e === WT) { + return t; + } else { + return i.get(e); + } + }, + has(i, e) { + if (e === WT) { + return true; + } else { + return i.has(e); + } + }, + set: Ilt, + deleteProperty: Ilt, + getOwnPropertyDescriptor(i, e) { + return { + configurable: true, + enumerable: true, + get() { + return i.get(e); + }, + set: Ilt, + deleteProperty: Ilt + }; + }, + ownKeys(i) { + return i.keys(); + } + }; + qrs = 0; + } +}); +function Zn(i) { + const e = "fallback" in i && { + fallback: () => i.fallback + }; + if (xh) { + return K(Urs(() => i.each, i.children, e || undefined), undefined, { + name: "value" + }); + } else { + return K(Urs(() => i.each, i.children, e || undefined)); + } +} +function NM(i) { + const e = "fallback" in i && { + fallback: () => i.fallback + }; + if (xh) { + return K(Wrs(() => i.each, i.children, e || undefined), undefined, { + name: "value" + }); + } else { + return K(Wrs(() => i.each, i.children, e || undefined)); + } +} +function oe(i) { + const e = i.keyed; + const t = K(() => i.when, undefined, xh ? { + name: "condition value" + } : undefined); + const s = e ? t : K(t, undefined, xh ? { + equals: (n, r) => !n == !r, + name: "condition" + } : { + equals: (n, r) => !n == !r + }); + return K(() => { + const n = s(); + if (n) { + const r = i.children; + if (typeof r == "function" && r.length > 0) { + return El(() => r(e ? n : () => { + if (!El(s)) { + throw cUt("Show"); + } + return t(); + })); + } else { + return r; + } + } + return i.fallback; + }, undefined, xh ? { + name: "value" + } : undefined); +} +function Cc(i) { + const e = Gu(() => i.children); + const t = K(() => { + const s = e(); + const n = Array.isArray(s) ? s : [s]; + let r = () => {}; + for (let o = 0; o < n.length; o++) { + const a = o; + const l = n[o]; + const c = r; + const u = K(() => c() ? undefined : l.when, undefined, xh ? { + name: "condition value" + } : undefined); + const d = l.keyed ? u : K(u, undefined, xh ? { + equals: (h, g) => !h == !g, + name: "condition" + } : { + equals: (h, g) => !h == !g + }); + r = () => c() || (d() ? [a, u, l] : undefined); + } + return r; + }); + return K(() => { + const s = t()(); + if (!s) { + return i.fallback; + } + const [n, r, o] = s; + const a = o.children; + if (typeof a == "function" && a.length > 0) { + return El(() => a(o.keyed ? r() : () => { + if (El(t)()?.[0] !== n) { + throw cUt("Match"); + } + return r(); + })); + } else { + return a; + } + }, undefined, xh ? { + name: "eval conditions" + } : undefined); +} +function ds(i) { + return i; +} +function zrs(i) { + let e; + if (Yl.context && Yl.load) { + e = Yl.load(Yl.getContextId()); + } + const [t, s] = ae(e, xh ? { + name: "errored" + } : undefined); + Plt ||= new Set(); + Plt.add(s); + Qt(() => Plt.delete(s)); + return K(() => { + let n; + if (n = t()) { + const r = i.fallback; + if (xh && (typeof r != "function" || r.length == 0)) { + console.error(n); + } + if (typeof r == "function" && r.length) { + return El(() => r(n, () => s())); + } else { + return r; + } + } + return Prs(() => i.children, s); + }, undefined, xh ? { + name: "value" + } : undefined); +} +var cUt; +var Plt; +var OYn = ue({ + "out-build/external/solid/solid/render/flow.js"() { + "use strict"; + + cz(); + Vrs(); + Ype(); + cUt = i => xh ? `Attempting to access a stale value from <${i}> that could possibly be undefined. This may occur because you are reading the accessor returned from the component at a time where it has already been unmounted. We recommend cleaning up any stale timers or async, or reading from the initial condition.` : `Stale read from <${i}>.`; + } +}); +function _Yn(i) { + let e = 0; + let t; + let s; + let n; + let r; + let o; + const [a, l] = ae(false); + const c = PYn(); + const u = { + increment: () => { + if (++e === 1) { + l(true); + } + }, + decrement: () => { + if (--e === 0) { + l(false); + } + }, + inFallback: a, + effects: [], + resolved: false + }; + const d = wlt(); + if (Yl.context && Yl.load) { + const p = Yl.getContextId(); + let b = Yl.load(p); + if (b) { + if (typeof b != "object" || b.status !== "success") { + n = b; + } else { + Yl.gather(p); + } + } + if (n && n !== "$$f") { + const [v, y] = ae(undefined, { + equals: false + }); + r = v; + n.then(() => { + if (Yl.done) { + return y(); + } + Yl.gather(p); + sz(s); + y(); + sz(); + }, w => { + o = w; + y(); + }); + } + } + const h = iS(Jrs); + if (h) { + t = h.register(u.inFallback); + } + let g; + Qt(() => g && g()); + return I(c.Provider, { + value: u, + get children() { + return K(() => { + if (o) { + throw o; + } + s = Yl.context; + if (r) { + r(); + return r = undefined; + } + if (s && n === "$$f") { + sz(); + } + const p = K(() => i.children); + return K(b => { + const v = u.inFallback(); + const { + showContent: y = true, + showFallback: w = true + } = t ? t() : {}; + if ((!v || n && n !== "$$f") && y) { + u.resolved = true; + if (g) { + g(); + } + g = s = n = undefined; + TYn(u.effects); + return p(); + } + if (w) { + if (g) { + return b; + } else { + return Qb(C => { + g = C; + if (s) { + sz({ + id: s.id + "F", + count: 0 + }); + s = undefined; + } + return i.fallback; + }, d); + } + } + }); + }); + } + }); +} +var Jrs; +var BYn = ue({ + "out-build/external/solid/solid/render/Suspense.js"() { + "use strict"; + + jrs(); + cz(); + Ype(); + Jrs = Uw(); + } +}); +var UYn = ue({ + "out-build/external/solid/solid/render/index.js"() { + "use strict"; + + jrs(); + OYn(); + BYn(); + Ype(); + } +}); +var uUt; +var We = ue({ + "out-build/external/solid/solid.js"() { + "use strict"; + + cz(); + $Yn(); + Drs(); + Vrs(); + UYn(); + cz(); + uUt = xh ? { + hooks: QL, + writeSignal: tUt, + registerGraph: Nrs + } : undefined; + if (xh && globalThis) { + if (globalThis.Solid$$) { + console.warn("You appear to have multiple instances of Solid. This can lead to unexpected behavior."); + } else { + globalThis.Solid$$ = true; + } + } + } +}); +function Grs(i) { + let e = i[WT]; + if (!e && (Object.defineProperty(i, WT, { + value: e = new Proxy(i, Xrs) + }), !Array.isArray(i))) { + const t = Object.keys(i); + const s = Object.getOwnPropertyDescriptors(i); + for (let n = 0, r = t.length; n < r; n++) { + const o = t[n]; + if (s[o].get) { + Object.defineProperty(i, o, { + enumerable: s[o].enumerable, + get: s[o].get.bind(e) + }); + } + } + } + return e; +} +function mF(i) { + let e; + return i != null && typeof i == "object" && (i[WT] || !(e = Object.getPrototypeOf(i)) || e === Object.prototype || Array.isArray(i)); +} +function fh(i, e = new Set()) { + let t; + let s; + let n; + let r; + if (t = i != null && i[nme]) { + return t; + } + if (!mF(i) || e.has(i)) { + return i; + } + if (Array.isArray(i)) { + if (Object.isFrozen(i)) { + i = i.slice(0); + } else { + e.add(i); + } + for (let o = 0, a = i.length; o < a; o++) { + n = i[o]; + if ((s = fh(n, e)) !== n) { + i[o] = s; + } + } + } else { + if (Object.isFrozen(i)) { + i = Object.assign({}, i); + } else { + e.add(i); + } + const o = Object.keys(i); + const a = Object.getOwnPropertyDescriptors(i); + for (let l = 0, c = o.length; l < c; l++) { + r = o[l]; + if (!a[r].get) { + n = i[r]; + if ((s = fh(n, e)) !== n) { + i[r] = s; + } + } + } + } + return i; +} +function Llt(i, e) { + let t = i[e]; + if (!t) { + Object.defineProperty(i, e, { + value: t = Object.create(null) + }); + } + return t; +} +function ime(i, e, t) { + if (i[e]) { + return i[e]; + } + const [s, n] = ae(t, { + equals: false, + internal: true + }); + s.$ = n; + return i[e] = s; +} +function WYn(i, e) { + const t = Reflect.getOwnPropertyDescriptor(i, e); + if (!!t && !t.get && !!t.configurable && e !== WT && e !== dz) { + delete t.value; + delete t.writable; + t.get = () => i[WT][e]; + } + return t; +} +function Krs(i) { + if (eUt()) { + ime(Llt(i, dz), dUt)(); + } +} +function VYn(i) { + Krs(i); + return Reflect.ownKeys(i); +} +function WI(i, e, t, s = false) { + if (!s && i[e] === t) { + return; + } + const n = i[e]; + const r = i.length; + if (uz && hUt.onStoreNodeUpdate) { + hUt.onStoreNodeUpdate(i, e, t, n); + } + if (t === undefined) { + delete i[e]; + if (i[bF] && i[bF][e] && n !== undefined) { + i[bF][e].$(); + } + } else { + i[e] = t; + if (i[bF] && i[bF][e] && n === undefined) { + i[bF][e].$(); + } + } + let o = Llt(i, dz); + let a; + if (a = ime(o, e, n)) { + a.$(() => t); + } + if (Array.isArray(i) && i.length !== r) { + for (let l = i.length; l < r; l++) { + if (a = o[l]) { + a.$(); + } + } + if (a = ime(o, "length", r)) { + a.$(i.length); + } + } + if (a = o[dUt]) { + a.$(); + } +} +function Yrs(i, e) { + const t = Object.keys(e); + for (let s = 0; s < t.length; s += 1) { + const n = t[s]; + WI(i, n, e[n]); + } +} +function HYn(i, e) { + if (typeof e == "function") { + e = e(i); + } + e = fh(e); + if (Array.isArray(e)) { + if (i === e) { + return; + } + let t = 0; + let s = e.length; + for (; t < s; t++) { + const n = e[t]; + if (i[t] !== n) { + WI(i, t, n); + } + } + WI(i, "length", s); + } else { + Yrs(i, e); + } +} +function sme(i, e, t = []) { + let s; + let n = i; + if (e.length > 1) { + s = e.shift(); + const o = typeof s; + const a = Array.isArray(i); + if (Array.isArray(s)) { + for (let l = 0; l < s.length; l++) { + sme(i, [s[l]].concat(e), t); + } + return; + } else if (a && o === "function") { + for (let l = 0; l < i.length; l++) { + if (s(i[l], l)) { + sme(i, [l].concat(e), t); + } + } + return; + } else if (a && o === "object") { + const { + from: l = 0, + to: c = i.length - 1, + by: u = 1 + } = s; + for (let d = l; d <= c; d += u) { + sme(i, [d].concat(e), t); + } + return; + } else if (e.length > 1) { + sme(i[s], e, [s].concat(t)); + return; + } + n = i[s]; + t = [s].concat(t); + } + let r = e[0]; + if ((typeof r != "function" || !(r = r(n, t), r === n)) && (s !== undefined || r != null)) { + r = fh(r); + if (s === undefined || mF(n) && mF(r) && !Array.isArray(r)) { + Yrs(n, r); + } else { + WI(i, s, r); + } + } +} +function yp(...[i, e]) { + const t = fh(i || {}); + const s = Array.isArray(t); + if (uz && typeof t != "object" && typeof t != "function") { + throw new Error(`Unexpected type ${typeof t} received when initializing 'createStore'. Expected an object.`); + } + const n = Grs(t); + if (uz) { + uUt.registerGraph({ + value: t, + name: e && e.name + }); + } + function r(...o) { + J0(() => { + if (s && o.length === 1) { + HYn(t, o[0]); + } else { + sme(t, o); + } + }); + } + return [n, r]; +} +var uz; +var nme; +var dz; +var bF; +var dUt; +var hUt; +var Xrs; +var hz = ue({ + "out-build/external/solid/store/store.js"() { + "use strict"; + + We(); + uz = false; + nme = Symbol("store-raw"); + dz = Symbol("store-node"); + bF = Symbol("store-has"); + dUt = Symbol("store-self"); + hUt = { + onStoreNodeUpdate: null + }; + Xrs = { + get(i, e, t) { + if (e === nme) { + return i; + } + if (e === WT) { + return t; + } + if (e === Zpe) { + Krs(i); + return t; + } + const s = Llt(i, dz); + const n = s[e]; + let r = n ? n() : i[e]; + if (e === dz || e === bF || e === "__proto__") { + return r; + } + if (!n) { + const o = Object.getOwnPropertyDescriptor(i, e); + if (eUt() && (typeof r != "function" || i.hasOwnProperty(e)) && (!o || !o.get)) { + r = ime(s, e, r)(); + } + } + if (mF(r)) { + return Grs(r); + } else { + return r; + } + }, + has(i, e) { + if (e === nme || e === WT || e === Zpe || e === dz || e === bF || e === "__proto__") { + return true; + } else { + if (eUt()) { + ime(Llt(i, bF), e)(); + } + return e in i; + } + }, + set() { + if (uz) { + console.warn("Cannot mutate a Store directly"); + } + return true; + }, + deleteProperty() { + if (uz) { + console.warn("Cannot mutate a Store directly"); + } + return true; + }, + ownKeys: VYn, + getOwnPropertyDescriptor: WYn + }; + } +}); +var qYn = ue({ + "out-build/external/solid/store/mutable.js"() { + "use strict"; + + We(); + hz(); + } +}); +function eie(i, e, t, s, n) { + const r = e[t]; + if (i === r) { + return; + } + const o = Array.isArray(i); + if (t !== Rlt && (!mF(i) || !mF(r) || o !== Array.isArray(r) || n && i[n] !== r[n])) { + WI(e, t, i); + return; + } + if (o) { + if (i.length && r.length && (!s || n && i[0] && i[0][n] != null)) { + let c; + let u; + let d; + let h; + let g; + let p; + let b; + let v; + d = 0; + h = Math.min(r.length, i.length); + for (; d < h && (r[d] === i[d] || n && r[d] && i[d] && r[d][n] === i[d][n]); d++) { + eie(i[d], r, d, s, n); + } + const y = new Array(i.length); + const w = new Map(); + h = r.length - 1; + g = i.length - 1; + for (; h >= d && g >= d && (r[h] === i[g] || n && r[h] && i[g] && r[h][n] === i[g][n]); h--, g--) { + y[g] = r[h]; + } + if (d > g || d > h) { + for (u = d; u <= g; u++) { + WI(r, u, i[u]); + } + for (; u < i.length; u++) { + WI(r, u, y[u]); + eie(i[u], r, u, s, n); + } + if (r.length > i.length) { + WI(r, "length", i.length); + } + return; + } + b = new Array(g + 1); + u = g; + for (; u >= d; u--) { + p = i[u]; + v = n && p ? p[n] : p; + c = w.get(v); + b[u] = c === undefined ? -1 : c; + w.set(v, u); + } + for (c = d; c <= h; c++) { + p = r[c]; + v = n && p ? p[n] : p; + u = w.get(v); + if (u !== undefined && u !== -1) { + y[u] = r[c]; + u = b[u]; + w.set(v, u); + } + } + for (u = d; u < i.length; u++) { + if (u in y) { + WI(r, u, y[u]); + eie(i[u], r, u, s, n); + } else { + WI(r, u, i[u]); + } + } + } else { + for (let c = 0, u = i.length; c < u; c++) { + eie(i[c], r, c, s, n); + } + } + if (r.length > i.length) { + WI(r, "length", i.length); + } + return; + } + const a = Object.keys(i); + for (let c = 0, u = a.length; c < u; c++) { + eie(i[a[c]], r, a[c], s, n); + } + const l = Object.keys(r); + for (let c = 0, u = l.length; c < u; c++) { + if (i[l[c]] === undefined) { + WI(r, l[c], undefined); + } + } +} +function jYn(i, e = {}) { + const { + merge: t, + key: s = "id" + } = e; + const n = fh(i); + return r => { + if (!mF(r) || !mF(n)) { + return n; + } + const o = eie(n, { + [Rlt]: r + }, Rlt, t, s); + if (o === undefined) { + return r; + } else { + return o; + } + }; +} +function fUt(i) { + return e => { + if (mF(e)) { + let t; + if (!(t = rme.get(e))) { + rme.set(e, t = new Proxy(e, gUt)); + } + i(t); + } + return e; + }; +} +var Rlt; +var rme; +var gUt; +var zYn = ue({ + "out-build/external/solid/store/modifiers.js"() { + "use strict"; + + hz(); + Rlt = Symbol("store-root"); + rme = new WeakMap(); + gUt = { + get(i, e) { + if (e === nme) { + return i; + } + const t = i[e]; + let s; + if (mF(t)) { + return rme.get(t) || (rme.set(t, s = new Proxy(t, gUt)), s); + } else { + return t; + } + }, + set(i, e, t) { + WI(i, e, fh(t)); + return true; + }, + deleteProperty(i, e) { + WI(i, e, undefined, true); + return true; + } + }; + } +}); +var kh = ue({ + "out-build/external/solid/store.js"() { + "use strict"; + + hz(); + qYn(); + zYn(); + hz(); + } +}); +function pUt(i) { + const e = []; + if (typeof i == "number") { + e.push("code/timeOrigin", i); + } + function t(n, r) { + e.push(n, r?.startTime ?? Date.now()); + } + function s() { + const n = []; + for (let r = 0; r < e.length; r += 2) { + n.push({ + name: e[r], + startTime: e[r + 1] + }); + } + return n; + } + return { + mark: t, + getMarks: s + }; +} +function JYn() { + if (typeof performance == "object" && typeof performance.mark == "function" && !performance.nodeTiming) { + if (typeof performance.timeOrigin != "number" && !performance.timing) { + return pUt(); + } else { + return { + mark(i, e) { + performance.mark(i, e); + }, + getMarks() { + let i = performance.timeOrigin; + if (typeof i != "number") { + i = performance.timing.navigationStart || performance.timing.redirectStart || performance.timing.fetchStart; + } + const e = [{ + name: "code/timeOrigin", + startTime: Math.round(i) + }]; + for (const t of performance.getEntriesByType("mark")) { + e.push({ + name: t.name, + startTime: Math.round(i + t.startTime) + }); + } + return e; + } + }; + } + } + if (typeof process == "object") { + const i = performance?.timeOrigin; + return pUt(i); + } else { + console.trace("perf-util loaded in UNKNOWN environment"); + return pUt(); + } +} +function GYn(i) { + i.MonacoPerformanceMarks ||= JYn(); + return i.MonacoPerformanceMarks; +} +var mUt; +var Dr; +var Qrs; +var yb = ue({ + "out-build/vs/base/common/performance.js"() { + "use strict"; + + mUt = GYn(globalThis); + Dr = mUt.mark; + Qrs = mUt.getMarks; + } +}); +function bUt(i) { + return JSON.stringify(i, KYn); +} +function VI(i) { + let e = JSON.parse(i); + e = Eh(e); + return e; +} +function KYn(i, e) { + if (e instanceof RegExp) { + return { + $mid: 2, + source: e.source, + flags: e.flags + }; + } else { + return e; + } +} +function Eh(i, e = 0) { + if (!i || e > 200) { + return i; + } + if (typeof i == "object") { + switch (i.$mid) { + case 1: + return V.revive(i); + case 2: + return new RegExp(i.source, i.flags); + case 17: + return new Date(i.source); + } + if (i instanceof Ii || i instanceof Uint8Array) { + return i; + } + if (Array.isArray(i)) { + for (let t = 0; t < i.length; ++t) { + i[t] = Eh(i[t], e + 1); + } + } else { + for (const t in i) { + if (Object.hasOwnProperty.call(i, t)) { + i[t] = Eh(i[t], e + 1); + } + } + } + } + return i; +} +var yg = ue({ + "out-build/vs/base/common/marshalling.js"() { + "use strict"; + + nr(); + Le(); + } +}); +var t7; +var MM; +var i7; +var Nlt; +var vUt = ue({ + "out-build/vs/base/parts/storage/common/storage.js"() { + "use strict"; + + nt(); + pe(); + q(); + yg(); + zt(); + (function (i) { + i[i.STORAGE_DOES_NOT_EXIST = 0] = "STORAGE_DOES_NOT_EXIST"; + i[i.STORAGE_IN_MEMORY = 1] = "STORAGE_IN_MEMORY"; + })(t7 ||= {}); + (function (i) { + i[i.None = 0] = "None"; + i[i.Initialized = 1] = "Initialized"; + i[i.Closed = 2] = "Closed"; + })(MM ||= {}); + i7 = class uOn extends H { + static { + this.a = 100; + } + constructor(e, t = Object.create(null)) { + super(); + this.q = e; + this.r = t; + this.b = this.D(new cx()); + this.onDidChangeStorage = this.b.event; + this.c = MM.None; + this.f = new Map(); + this.g = this.D(new Bm(uOn.a)); + this.h = new Set(); + this.j = new Map(); + this.m = undefined; + this.n = []; + this.s(); + } + s() { + this.D(this.q.onDidChangeItemsExternal(e => this.t(e))); + } + t(e) { + this.b.pause(); + try { + e.changed?.forEach((t, s) => this.u(s, t)); + e.deleted?.forEach(t => this.u(t, undefined)); + } finally { + this.b.resume(); + } + } + u(e, t) { + if (this.c === MM.Closed) { + return; + } + let s = false; + if (Ga(t)) { + s = this.f.delete(e); + } else if (this.f.get(e) !== t) { + this.f.set(e, t); + s = true; + } + if (s) { + this.b.fire({ + key: e, + external: true + }); + } + } + get items() { + return this.f; + } + get size() { + return this.f.size; + } + async init() { + if (this.c === MM.None) { + this.c = MM.Initialized; + if (this.r.hint !== t7.STORAGE_DOES_NOT_EXIST) { + this.f = await this.q.getItems(); + } + } + } + cursorDiskKVGet(e) { + return this.q.cursorDiskKVGet(e); + } + cursorDiskKVSet(e, t) { + return this.q.cursorDiskKVSet(e, t); + } + cursorDiskKVClearPrefix(e) { + return this.q.cursorDiskKVClearPrefix(e); + } + get(e, t) { + const s = this.f.get(e); + if (Ga(s)) { + return t; + } else { + return s; + } + } + getBoolean(e, t) { + const s = this.get(e); + if (Ga(s)) { + return t; + } else { + return s === "true"; + } + } + getNumber(e, t) { + const s = this.get(e); + if (Ga(s)) { + return t; + } else { + return parseInt(s, 10); + } + } + getObject(e, t) { + const s = this.get(e); + if (Ga(s)) { + return t; + } else { + return VI(s); + } + } + async set(e, t, s = false) { + if (this.c === MM.Closed) { + return; + } + if (Ga(t)) { + return this.delete(e, s); + } + const n = xo(t) || Array.isArray(t) ? bUt(t) : String(t); + if (this.f.get(e) !== n) { + this.f.set(e, n); + this.j.set(e, n); + this.h.delete(e); + this.b.fire({ + key: e, + external: s + }); + return this.C(); + } + } + async delete(e, t = false) { + if (this.c !== MM.Closed && !!this.f.delete(e)) { + if (!this.h.has(e)) { + this.h.add(e); + } + this.j.delete(e); + this.b.fire({ + key: e, + external: t + }); + return this.C(); + } + } + async optimize() { + if (this.c !== MM.Closed) { + await this.flush(0); + return this.q.optimize(); + } + } + async close() { + this.m ||= this.w(); + return this.m; + } + async w() { + this.c = MM.Closed; + try { + await this.C(0); + } catch {} + await this.q.close(() => this.f); + } + get y() { + return this.j.size > 0 || this.h.size > 0; + } + async z() { + if (!this.y) { + return; + } + const e = { + insert: this.j, + delete: this.h + }; + this.h = new Set(); + this.j = new Map(); + return this.q.updateItems(e).finally(() => { + if (!this.y) { + while (this.n.length) { + this.n.pop()?.(); + } + } + }); + } + async flush(e) { + if (this.c !== MM.Closed && !this.m) { + return this.C(e); + } + } + async C(e) { + if (this.r.hint === t7.STORAGE_IN_MEMORY) { + return this.z(); + } else { + return this.g.trigger(() => this.z(), e); + } + } + async whenFlushed() { + if (this.y) { + return new Promise(e => this.n.push(e)); + } + } + isInMemory() { + return this.r.hint === t7.STORAGE_IN_MEMORY; + } + }; + Nlt = class { + constructor() { + this.onDidChangeItemsExternal = de.None; + this.a = new Map(); + } + async getItems() { + return this.a; + } + async cursorDiskKVGet(i) {} + async cursorDiskKVSet(i, e) {} + async cursorDiskKVClearPrefix(i) {} + async updateItems(i) { + i.insert?.forEach((e, t) => this.a.set(t, e)); + i.delete?.forEach(e => this.a.delete(e)); + } + async optimize() {} + async close() {} + }; + } +}); +var pa; +var AM; +var Aa = ue({ + "out-build/vs/platform/environment/common/environment.js"() { + "use strict"; + + te(); + pa = Ve("environmentService"); + AM = pa; + } +}); +var Zrs; +var eos; +var tie; +var tos; +var ios; +var ome; +var sos; +var Ww; +var HI = ue({ + "out-build/vs/base/common/ternarySearchTree.js"() { + "use strict"; + + Jt(); + $i(); + Zrs = class { + constructor() { + this.b = ""; + this.c = 0; + } + reset(i) { + this.b = i; + this.c = 0; + return this; + } + next() { + this.c += 1; + return this; + } + hasNext() { + return this.c < this.b.length - 1; + } + cmp(i) { + const e = i.charCodeAt(0); + const t = this.b.charCodeAt(this.c); + return e - t; + } + value() { + return this.b[this.c]; + } + }; + eos = class { + constructor(i = true) { + this.e = i; + } + reset(i) { + this.b = i; + this.c = 0; + this.d = 0; + return this.next(); + } + hasNext() { + return this.d < this.b.length; + } + next() { + this.c = this.d; + let i = true; + for (; this.d < this.b.length; this.d++) { + if (this.b.charCodeAt(this.d) === 46) { + if (i) { + this.c++; + } else { + break; + } + } else { + i = false; + } + } + return this; + } + cmp(i) { + if (this.e) { + return _nt(i, this.b, 0, i.length, this.c, this.d); + } else { + return afe(i, this.b, 0, i.length, this.c, this.d); + } + } + value() { + return this.b.substring(this.c, this.d); + } + }; + tie = class { + constructor(i = true, e = true) { + this.f = i; + this.g = e; + } + reset(i) { + this.d = 0; + this.e = 0; + this.b = i; + this.c = i.length; + for (let e = i.length - 1; e >= 0; e--, this.c--) { + const t = this.b.charCodeAt(e); + if (t !== 47 && (!this.f || t !== 92)) { + break; + } + } + return this.next(); + } + hasNext() { + return this.e < this.c; + } + next() { + this.d = this.e; + let i = true; + for (; this.e < this.c; this.e++) { + const e = this.b.charCodeAt(this.e); + if (e === 47 || this.f && e === 92) { + if (i) { + this.d++; + } else { + break; + } + } else { + i = false; + } + } + return this; + } + cmp(i) { + if (this.g) { + return _nt(i, this.b, 0, i.length, this.d, this.e); + } else { + return afe(i, this.b, 0, i.length, this.d, this.e); + } + } + value() { + return this.b.substring(this.d, this.e); + } + }; + (function (i) { + i[i.Scheme = 1] = "Scheme"; + i[i.Authority = 2] = "Authority"; + i[i.Path = 3] = "Path"; + i[i.Query = 4] = "Query"; + i[i.Fragment = 5] = "Fragment"; + })(tos ||= {}); + ios = class { + constructor(i, e) { + this.f = i; + this.g = e; + this.d = []; + this.e = 0; + } + reset(i) { + this.c = i; + this.d = []; + if (this.c.scheme) { + this.d.push(1); + } + if (this.c.authority) { + this.d.push(2); + } + if (this.c.path) { + this.b = new tie(false, !this.f(i)); + this.b.reset(i.path); + if (this.b.value()) { + this.d.push(3); + } + } + if (!this.g(i)) { + if (this.c.query) { + this.d.push(4); + } + if (this.c.fragment) { + this.d.push(5); + } + } + this.e = 0; + return this; + } + next() { + if (this.d[this.e] === 3 && this.b.hasNext()) { + this.b.next(); + } else { + this.e += 1; + } + return this; + } + hasNext() { + return this.d[this.e] === 3 && this.b.hasNext() || this.e < this.d.length - 1; + } + cmp(i) { + if (this.d[this.e] === 1) { + return cM(i, this.c.scheme); + } + if (this.d[this.e] === 2) { + return cM(i, this.c.authority); + } + if (this.d[this.e] === 3) { + return this.b.cmp(i); + } + if (this.d[this.e] === 4) { + return _m(i, this.c.query); + } + if (this.d[this.e] === 5) { + return _m(i, this.c.fragment); + } + throw new Error(); + } + value() { + if (this.d[this.e] === 1) { + return this.c.scheme; + } + if (this.d[this.e] === 2) { + return this.c.authority; + } + if (this.d[this.e] === 3) { + return this.b.value(); + } + if (this.d[this.e] === 4) { + return this.c.query; + } + if (this.d[this.e] === 5) { + return this.c.fragment; + } + throw new Error(); + } + }; + ome = class { + constructor() { + this.height = 1; + } + isEmpty() { + return !this.left && !this.mid && !this.right && !this.value; + } + rotateLeft() { + const i = this.right; + this.right = i.left; + i.left = this; + this.updateHeight(); + i.updateHeight(); + return i; + } + rotateRight() { + const i = this.left; + this.left = i.right; + i.right = this; + this.updateHeight(); + i.updateHeight(); + return i; + } + updateHeight() { + this.height = 1 + Math.max(this.heightLeft, this.heightRight); + } + balanceFactor() { + return this.heightRight - this.heightLeft; + } + get heightLeft() { + return this.left?.height ?? 0; + } + get heightRight() { + return this.right?.height ?? 0; + } + }; + (function (i) { + i[i.Left = -1] = "Left"; + i[i.Mid = 0] = "Mid"; + i[i.Right = 1] = "Right"; + })(sos ||= {}); + Ww = class ZPe { + static forUris(e = () => false, t = () => false) { + return new ZPe(new ios(e, t)); + } + static forPaths(e = false) { + return new ZPe(new tie(undefined, !e)); + } + static forStrings() { + return new ZPe(new Zrs()); + } + static forConfigKeys() { + return new ZPe(new eos()); + } + constructor(e) { + this.b = e; + } + clear() { + this.c = undefined; + } + fill(e, t) { + if (t) { + const s = t.slice(0); + bnt(s); + for (const n of s) { + this.set(n, e); + } + } else { + const s = e.slice(0); + bnt(s); + for (const n of s) { + this.set(n[0], n[1]); + } + } + } + set(e, t) { + const s = this.b.reset(e); + let n; + if (!this.c) { + this.c = new ome(); + this.c.segment = s.value(); + } + const r = []; + for (n = this.c;;) { + const a = s.cmp(n.segment); + if (a > 0) { + if (!n.left) { + n.left = new ome(); + n.left.segment = s.value(); + } + r.push([-1, n]); + n = n.left; + } else if (a < 0) { + if (!n.right) { + n.right = new ome(); + n.right.segment = s.value(); + } + r.push([1, n]); + n = n.right; + } else if (s.hasNext()) { + s.next(); + if (!n.mid) { + n.mid = new ome(); + n.mid.segment = s.value(); + } + r.push([0, n]); + n = n.mid; + } else { + break; + } + } + const o = n.value; + n.value = t; + n.key = e; + for (let a = r.length - 1; a >= 0; a--) { + const l = r[a][1]; + l.updateHeight(); + const c = l.balanceFactor(); + if (c < -1 || c > 1) { + const u = r[a][0]; + const d = r[a + 1][0]; + if (u === 1 && d === 1) { + r[a][1] = l.rotateLeft(); + } else if (u === -1 && d === -1) { + r[a][1] = l.rotateRight(); + } else if (u === 1 && d === -1) { + l.right = r[a + 1][1] = r[a + 1][1].rotateRight(); + r[a][1] = l.rotateLeft(); + } else if (u === -1 && d === 1) { + l.left = r[a + 1][1] = r[a + 1][1].rotateLeft(); + r[a][1] = l.rotateRight(); + } else { + throw new Error(); + } + if (a > 0) { + switch (r[a - 1][0]) { + case -1: + r[a - 1][1].left = r[a][1]; + break; + case 1: + r[a - 1][1].right = r[a][1]; + break; + case 0: + r[a - 1][1].mid = r[a][1]; + break; + } + } else { + this.c = r[0][1]; + } + } + } + return o; + } + get(e) { + return this.d(e)?.value; + } + d(e) { + const t = this.b.reset(e); + let s = this.c; + while (s) { + const n = t.cmp(s.segment); + if (n > 0) { + s = s.left; + } else if (n < 0) { + s = s.right; + } else if (t.hasNext()) { + t.next(); + s = s.mid; + } else { + break; + } + } + return s; + } + has(e) { + const t = this.d(e); + return t?.value !== undefined || t?.mid !== undefined; + } + delete(e) { + return this.e(e, false); + } + deleteSuperstr(e) { + return this.e(e, true); + } + e(e, t) { + const s = this.b.reset(e); + const n = []; + let r = this.c; + while (r) { + const o = s.cmp(r.segment); + if (o > 0) { + n.push([-1, r]); + r = r.left; + } else if (o < 0) { + n.push([1, r]); + r = r.right; + } else if (s.hasNext()) { + s.next(); + n.push([0, r]); + r = r.mid; + } else { + break; + } + } + if (r) { + if (t) { + r.left = undefined; + r.mid = undefined; + r.right = undefined; + r.height = 1; + } else { + r.key = undefined; + r.value = undefined; + } + if (!r.mid && !r.value) { + if (r.left && r.right) { + const o = this.f(r.right); + if (o.key) { + const { + key: a, + value: l, + segment: c + } = o; + this.e(o.key, false); + r.key = a; + r.value = l; + r.segment = c; + } + } else { + const o = r.left ?? r.right; + if (n.length > 0) { + const [a, l] = n[n.length - 1]; + switch (a) { + case -1: + l.left = o; + break; + case 0: + l.mid = o; + break; + case 1: + l.right = o; + break; + } + } else { + this.c = o; + } + } + } + for (let o = n.length - 1; o >= 0; o--) { + const a = n[o][1]; + a.updateHeight(); + const l = a.balanceFactor(); + if (l > 1) { + if (!(a.right.balanceFactor() >= 0)) { + a.right = a.right.rotateRight(); + } + n[o][1] = a.rotateLeft(); + } else if (l < -1) { + if (!(a.left.balanceFactor() <= 0)) { + a.left = a.left.rotateLeft(); + } + n[o][1] = a.rotateRight(); + } + if (o > 0) { + switch (n[o - 1][0]) { + case -1: + n[o - 1][1].left = n[o][1]; + break; + case 1: + n[o - 1][1].right = n[o][1]; + break; + case 0: + n[o - 1][1].mid = n[o][1]; + break; + } + } else { + this.c = n[0][1]; + } + } + } + } + f(e) { + while (e.left) { + e = e.left; + } + return e; + } + findSubstr(e) { + const t = this.b.reset(e); + let s = this.c; + let n; + while (s) { + const r = t.cmp(s.segment); + if (r > 0) { + s = s.left; + } else if (r < 0) { + s = s.right; + } else if (t.hasNext()) { + t.next(); + n = s.value || n; + s = s.mid; + } else { + break; + } + } + return s && s.value || n; + } + findSuperstr(e) { + return this.g(e, false); + } + g(e, t) { + const s = this.b.reset(e); + let n = this.c; + while (n) { + const r = s.cmp(n.segment); + if (r > 0) { + n = n.left; + } else if (r < 0) { + n = n.right; + } else if (s.hasNext()) { + s.next(); + n = n.mid; + } else if (n.mid) { + return this.h(n.mid); + } else if (t) { + return n.value; + } else { + return undefined; + } + } + } + hasElementOrSubtree(e) { + return this.g(e, true) !== undefined; + } + forEach(e) { + for (const [t, s] of this) { + e(s, t); + } + } + *[Symbol.iterator]() { + yield* this.h(this.c); + } + h(e) { + const t = []; + this.j(e, t); + return t[Symbol.iterator](); + } + j(e, t) { + if (e) { + if (e.left) { + this.j(e.left, t); + } + if (e.value) { + t.push([e.key, e.value]); + } + if (e.mid) { + this.j(e.mid, t); + } + if (e.right) { + this.j(e.right, t); + } + } + } + _isBalanced() { + const e = t => { + if (!t) { + return true; + } + const s = t.balanceFactor(); + if (s < -1 || s > 1) { + return false; + } else { + return e(t.left) && e(t.right); + } + }; + return e(this.c); + } + }; + } +}); +function VT(i) { + return !!(i.capabilities & 2); +} +function yUt(i) { + return !!(i.capabilities & 8); +} +function nos(i) { + return !!(i.capabilities & 131072); +} +function s7(i) { + return !!(i.capabilities & 4); +} +function wUt(i) { + return !!(i.capabilities & 16); +} +function CUt(i) { + if (VT(i)) { + return !!(i.capabilities & 16384); + } else { + return false; + } +} +function ros(i) { + if (VT(i)) { + return !!(i.capabilities & 32768); + } else { + return false; + } +} +function YYn(i) { + return !!(i.capabilities & 65536); +} +function XYn(i) { + return !!(i.capabilities & 2048); +} +function wp(i, e) { + return Mlt.create(i, e); +} +function fz(i) { + return i || wp(f(1914, null), io.Unknown); +} +function oos(i, e) { + i.name = e ? `${e} (FileSystemError)` : "FileSystemError"; + return i; +} +function ame(i) { + if (!i) { + return io.Unknown; + } + if (i instanceof Mlt) { + return i.code; + } + const e = /^(.+) \(FileSystemError\)$/.exec(i.name); + if (!e) { + return io.Unknown; + } + switch (e[1]) { + case io.FileExists: + return io.FileExists; + case io.FileIsADirectory: + return io.FileIsADirectory; + case io.FileNotADirectory: + return io.FileNotADirectory; + case io.FileNotFound: + return io.FileNotFound; + case io.FileTooLarge: + return io.FileTooLarge; + case io.FileWriteLocked: + return io.FileWriteLocked; + case io.NoPermissions: + return io.NoPermissions; + case io.Unavailable: + return io.Unavailable; + } + return io.Unknown; +} +function ZL(i) { + if (i instanceof vf) { + return i.fileOperationResult; + } + switch (ame(i)) { + case io.FileNotFound: + return 1; + case io.FileIsADirectory: + return 0; + case io.FileNotADirectory: + return 9; + case io.FileWriteLocked: + return 5; + case io.NoPermissions: + return 6; + case io.FileExists: + return 4; + case io.FileTooLarge: + return 7; + default: + return 10; + } +} +function aos(i) { + if (typeof i.size == "number" && typeof i.mtime == "number") { + return i.mtime.toString(29) + i.size.toString(31); + } +} +async function SUt(i, e) { + if (!e.hasProvider(V.from({ + scheme: i.scheme + }))) { + return new Promise(t => { + const s = e.onDidChangeFileSystemProviderRegistrations(n => { + if (n.scheme === i.scheme && n.added) { + s.dispose(); + t(); + } + }); + }); + } +} +function los(i) { + const e = typeof i == "string" || i?.scheme === me.vscodeRemote; + if (typeof i != "string" && i?.scheme === me.file) { + return Af.MB * 1024; + } else if (e) { + return Af.MB * 10; + } else if (tn) { + return Af.MB * 50; + } else { + return Af.MB * 1024; + } +} +var Ct; +var wg; +var $4; +var cos; +var uos; +var io; +var Mlt; +var dos; +var F4; +var hos; +var n7; +var vf; +var r7; +var iie; +var fos; +var Zb; +var K0; +var sie; +var xUt; +var kUt; +var EUt; +var gos; +var Fo; +var eR; +var Af; +var Nt = ue({ + "out-build/vs/platform/files/common/files.js"() { + "use strict"; + + HI(); + pn(); + $i(); + zt(); + Le(); + X(); + te(); + rt(); + At(); + pu(); + Ct = Ve("fileService"); + (function (i) { + i[i.Unknown = 0] = "Unknown"; + i[i.File = 1] = "File"; + i[i.Directory = 2] = "Directory"; + i[i.SymbolicLink = 64] = "SymbolicLink"; + })(wg ||= {}); + (function (i) { + i[i.Readonly = 1] = "Readonly"; + i[i.Locked = 2] = "Locked"; + })($4 ||= {}); + (function (i) { + i[i.UPDATED = 2] = "UPDATED"; + i[i.ADDED = 4] = "ADDED"; + i[i.DELETED = 8] = "DELETED"; + })(cos ||= {}); + (function (i) { + i[i.None = 0] = "None"; + i[i.FileReadWrite = 2] = "FileReadWrite"; + i[i.FileOpenReadWriteClose = 4] = "FileOpenReadWriteClose"; + i[i.FileReadStream = 16] = "FileReadStream"; + i[i.FileFolderCopy = 8] = "FileFolderCopy"; + i[i.PathCaseSensitive = 1024] = "PathCaseSensitive"; + i[i.Readonly = 2048] = "Readonly"; + i[i.Trash = 4096] = "Trash"; + i[i.FileWriteUnlock = 8192] = "FileWriteUnlock"; + i[i.FileAtomicRead = 16384] = "FileAtomicRead"; + i[i.FileAtomicWrite = 32768] = "FileAtomicWrite"; + i[i.FileAtomicDelete = 65536] = "FileAtomicDelete"; + i[i.FileClone = 131072] = "FileClone"; + })(uos ||= {}); + (function (i) { + i.FileExists = "EntryExists"; + i.FileNotFound = "EntryNotFound"; + i.FileNotADirectory = "EntryNotADirectory"; + i.FileIsADirectory = "EntryIsADirectory"; + i.FileExceedsStorageQuota = "EntryExceedsStorageQuota"; + i.FileTooLarge = "EntryTooLarge"; + i.FileWriteLocked = "EntryWriteLocked"; + i.NoPermissions = "NoPermissions"; + i.Unavailable = "Unavailable"; + i.Unknown = "Unknown"; + })(io ||= {}); + Mlt = class dOn extends Error { + static create(e, t) { + const s = new dOn(e.toString(), t); + oos(s, t); + return s; + } + constructor(e, t) { + super(e); + this.code = t; + } + }; + (function (i) { + i[i.CREATE = 0] = "CREATE"; + i[i.DELETE = 1] = "DELETE"; + i[i.MOVE = 2] = "MOVE"; + i[i.COPY = 3] = "COPY"; + i[i.WRITE = 4] = "WRITE"; + })(dos ||= {}); + F4 = class { + constructor(i, e, t) { + this.resource = i; + this.operation = e; + this.target = t; + } + isOperation(i) { + return this.operation === i; + } + }; + (function (i) { + i[i.UPDATED = 0] = "UPDATED"; + i[i.ADDED = 1] = "ADDED"; + i[i.DELETED = 2] = "DELETED"; + })(hos ||= {}); + n7 = class vFt { + static { + this.a = null; + } + constructor(e, t) { + this.c = t; + this.b = undefined; + this.d = new ol(() => { + const s = Ww.forUris(() => this.c); + s.fill(this.rawAdded.map(n => [n, true])); + return s; + }); + this.f = new ol(() => { + const s = Ww.forUris(() => this.c); + s.fill(this.rawUpdated.map(n => [n, true])); + return s; + }); + this.g = new ol(() => { + const s = Ww.forUris(() => this.c); + s.fill(this.rawDeleted.map(n => [n, true])); + return s; + }); + this.rawAdded = []; + this.rawUpdated = []; + this.rawDeleted = []; + for (const s of e) { + switch (s.type) { + case 1: + this.rawAdded.push(s.resource); + break; + case 0: + this.rawUpdated.push(s.resource); + break; + case 2: + this.rawDeleted.push(s.resource); + break; + } + if (this.b !== vFt.a) { + if (typeof s.cId == "number") { + if (this.b === undefined) { + this.b = s.cId; + } else if (this.b !== s.cId) { + this.b = vFt.a; + } + } else if (this.b !== undefined) { + this.b = vFt.a; + } + } + } + } + contains(e, ...t) { + return this.h(e, { + includeChildren: false + }, ...t); + } + affects(e, ...t) { + return this.h(e, { + includeChildren: true + }, ...t); + } + h(e, t, ...s) { + if (!e) { + return false; + } + const n = s.length > 0; + return (!n || !!s.includes(1)) && (!!this.d.value.get(e) || !!t.includeChildren && !!this.d.value.findSuperstr(e)) || (!n || !!s.includes(0)) && (!!this.f.value.get(e) || !!t.includeChildren && !!this.f.value.findSuperstr(e)) || (!n || !!s.includes(2)) && (!!this.g.value.findSubstr(e) || !!t.includeChildren && !!this.g.value.findSuperstr(e)); + } + gotAdded() { + return this.rawAdded.length > 0; + } + gotDeleted() { + return this.rawDeleted.length > 0; + } + gotUpdated() { + return this.rawUpdated.length > 0; + } + correlates(e) { + return this.b === e; + } + hasCorrelation() { + return typeof this.b == "number"; + } + }; + vf = class extends Error { + constructor(i, e, t) { + super(i); + this.fileOperationResult = e; + this.options = t; + } + }; + r7 = class extends vf { + constructor(i, e, t, s) { + super(i, e, s); + this.fileOperationResult = e; + this.size = t; + } + }; + iie = class extends vf { + constructor(i, e, t) { + super(i, 2, t); + this.stat = e; + } + }; + (function (i) { + i[i.FILE_IS_DIRECTORY = 0] = "FILE_IS_DIRECTORY"; + i[i.FILE_NOT_FOUND = 1] = "FILE_NOT_FOUND"; + i[i.FILE_NOT_MODIFIED_SINCE = 2] = "FILE_NOT_MODIFIED_SINCE"; + i[i.FILE_MODIFIED_SINCE = 3] = "FILE_MODIFIED_SINCE"; + i[i.FILE_MOVE_CONFLICT = 4] = "FILE_MOVE_CONFLICT"; + i[i.FILE_WRITE_LOCKED = 5] = "FILE_WRITE_LOCKED"; + i[i.FILE_PERMISSION_DENIED = 6] = "FILE_PERMISSION_DENIED"; + i[i.FILE_TOO_LARGE = 7] = "FILE_TOO_LARGE"; + i[i.FILE_INVALID_PATH = 8] = "FILE_INVALID_PATH"; + i[i.FILE_NOT_DIRECTORY = 9] = "FILE_NOT_DIRECTORY"; + i[i.FILE_OTHER_ERROR = 10] = "FILE_OTHER_ERROR"; + })(fos ||= {}); + Zb = { + OFF: "off", + AFTER_DELAY: "afterDelay", + ON_FOCUS_CHANGE: "onFocusChange", + ON_WINDOW_CHANGE: "onWindowChange" + }; + K0 = { + OFF: "off", + ON_EXIT: "onExit", + ON_EXIT_AND_WINDOW_CLOSE: "onExitAndWindowClose" + }; + sie = "files.associations"; + xUt = "files.exclude"; + kUt = "files.readonlyInclude"; + EUt = "files.readonlyExclude"; + gos = "files.readonlyFromPermissions"; + (function (i) { + i[i.FILE = 0] = "FILE"; + i[i.FOLDER = 1] = "FOLDER"; + i[i.ROOT_FOLDER = 2] = "ROOT_FOLDER"; + })(Fo ||= {}); + eR = ""; + Af = class fI { + static { + this.KB = 1024; + } + static { + this.MB = fI.KB * fI.KB; + } + static { + this.GB = fI.MB * fI.KB; + } + static { + this.TB = fI.GB * fI.KB; + } + static formatSize(e) { + if (!Od(e)) { + e = 0; + } + if (e < fI.KB) { + return f(1915, null, e.toFixed(0)); + } else if (e < fI.MB) { + return f(1916, null, (e / fI.KB).toFixed(2)); + } else if (e < fI.GB) { + return f(1917, null, (e / fI.MB).toFixed(2)); + } else if (e < fI.TB) { + return f(1918, null, (e / fI.GB).toFixed(2)); + } else { + return f(1919, null, (e / fI.TB).toFixed(2)); + } + } + }; + } +}); +function u1(i) { + const e = i; + return typeof e?.id == "string" && V.isUri(e.uri); +} +function IUt(i) { + return typeof i?.id == "string" && !u1(i) && !$M(i); +} +function Lx(i, e) { + if (typeof i == "string" || typeof i === "undefined") { + if (typeof i == "string") { + return { + id: ir(i) + }; + } else if (e) { + return pos; + } else { + return mos; + } + } + const t = i; + if (t.configuration) { + return { + id: t.id, + configPath: t.configuration + }; + } else if (t.folders.length === 1) { + return { + id: t.id, + uri: t.folders[0].uri + }; + } else { + return { + id: t.id + }; + } +} +function $M(i) { + const e = i; + return typeof e?.id == "string" && V.isUri(e.configPath); +} +function QYn(i) { + const e = i; + if (e?.uri) { + return { + id: e.id, + uri: V.revive(e.uri) + }; + } + const t = i; + if (t?.configPath) { + return { + id: t.id, + configPath: V.revive(t.configPath) + }; + } + if (i?.id) { + return { + id: i.id + }; + } +} +function nie(i) { + const e = i; + return !!e && typeof e == "object" && typeof e.id == "string" && !!Array.isArray(e.folders); +} +function FM(i) { + const e = i; + return !!e && typeof e == "object" && !!V.isUri(e.uri) && typeof e.name == "string" && typeof e.toResource == "function"; +} +function lme(i) { + return new $lt({ + uri: i, + index: 0, + name: gg(i) + }, { + uri: i.toString() + }); +} +function o7(i, e) { + return Bji.isEqualOrParent(i, e.untitledWorkspacesHome); +} +function vF(i) { + let e; + if (V.isUri(i)) { + e = i; + } else { + e = i.configuration; + } + return e?.scheme === me.tmp; +} +function ZYn(i) { + return i.id === Cos; +} +function Alt(i, e) { + return !o7(i, e) && !vF(i); +} +function rie(i) { + return (typeof i == "string" ? Iw(i) : _d(i)) === Flt; +} +var kt; +var pos; +var mos; +var bos; +var vos; +var $lt; +var qI; +var Flt; +var yos; +var wos; +var Cos; +var ii = ue({ + "out-build/vs/platform/workspace/common/workspace.js"() { + "use strict"; + + X(); + pn(); + HI(); + Et(); + Le(); + te(); + At(); + kt = Ve("contextService"); + pos = { + id: "ext-dev" + }; + mos = { + id: "empty-window" + }; + (function (i) { + i[i.EMPTY = 1] = "EMPTY"; + i[i.FOLDER = 2] = "FOLDER"; + i[i.WORKSPACE = 3] = "WORKSPACE"; + })(bos ||= {}); + vos = class { + constructor(i, e, t, s, n) { + this.h = i; + this.j = t; + this.k = s; + this.l = n; + this.c = Ww.forUris(this.l, () => true); + this.folders = e; + } + update(i) { + this.h = i.id; + this.k = i.configuration; + this.j = i.transient; + this.l = i.l; + this.folders = i.folders; + } + get folders() { + return this.g; + } + set folders(i) { + this.g = i; + this.n(); + } + get id() { + return this.h; + } + get transient() { + return this.j; + } + get configuration() { + return this.k; + } + set configuration(i) { + this.k = i; + } + getFolder(i) { + return i && this.c.findSubstr(i) || null; + } + n() { + this.c = Ww.forUris(this.l, () => true); + for (const i of this.folders) { + this.c.set(i.uri, i); + } + } + toJSON() { + return { + id: this.id, + folders: this.folders, + transient: this.transient, + configuration: this.configuration + }; + } + }; + $lt = class { + constructor(i, e) { + this.raw = e; + this.uri = i.uri; + this.index = i.index; + this.name = i.name; + } + toResource(i) { + return Li(this.uri, i); + } + toJSON() { + return { + uri: this.uri, + name: this.name, + index: this.index + }; + } + }; + qI = "code-workspace"; + Flt = `.${qI}`; + yos = [{ + name: f(2533, null), + extensions: [qI] + }]; + wos = "workspace.json"; + Cos = "4064f6ec-cb38-4ad0-af64-ee6467e63c82"; + } +}); +var _s; +var Un = ue({ + "out-build/vs/platform/uriIdentity/common/uriIdentity.js"() { + "use strict"; + + te(); + _s = Ve("IUriIdentityService"); + } +}); +function O4(i) { + const e = i; + return !!e && typeof e == "object" && typeof e.id == "string" && typeof e.isDefault == "boolean" && typeof e.name == "string" && !!V.isUri(e.location) && !!V.isUri(e.globalStorageHome) && !!V.isUri(e.settingsResource) && !!V.isUri(e.keybindingsResource) && !!V.isUri(e.tasksResource) && !!V.isUri(e.snippetsHome) && !!V.isUri(e.extensionsResource); +} +function jI(i, e) { + return { + id: i.id, + isDefault: i.isDefault, + name: i.name, + icon: i.icon, + location: V.revive(i.location).with({ + scheme: e + }), + globalStorageHome: V.revive(i.globalStorageHome).with({ + scheme: e + }), + settingsResource: V.revive(i.settingsResource).with({ + scheme: e + }), + keybindingsResource: V.revive(i.keybindingsResource).with({ + scheme: e + }), + tasksResource: V.revive(i.tasksResource).with({ + scheme: e + }), + snippetsHome: V.revive(i.snippetsHome).with({ + scheme: e + }), + extensionsResource: V.revive(i.extensionsResource).with({ + scheme: e + }), + cacheHome: V.revive(i.cacheHome).with({ + scheme: e + }), + useDefaultFlags: i.useDefaultFlags, + isTransient: i.isTransient, + workspaces: i.workspaces?.map(t => V.revive(t)) + }; +} +function oie(i, e, t, s, n, r) { + return { + id: i, + name: e, + location: t, + isDefault: false, + icon: n?.icon, + globalStorageHome: r && n?.useDefaultFlags?.globalState ? r.globalStorageHome : Li(t, "globalStorage"), + settingsResource: r && n?.useDefaultFlags?.settings ? r.settingsResource : Li(t, "settings.json"), + keybindingsResource: r && n?.useDefaultFlags?.keybindings ? r.keybindingsResource : Li(t, "keybindings.json"), + tasksResource: r && n?.useDefaultFlags?.tasks ? r.tasksResource : Li(t, "tasks.json"), + snippetsHome: r && n?.useDefaultFlags?.snippets ? r.snippetsHome : Li(t, "snippets"), + extensionsResource: r && n?.useDefaultFlags?.extensions ? r.extensionsResource : Li(t, "extensions.json"), + cacheHome: Li(s, i), + useDefaultFlags: n?.useDefaultFlags, + isTransient: n?.transient, + workspaces: n?.workspaces + }; +} +var Sos; +var Ml; +var DUt; +var mu = ue({ + "out-build/vs/platform/userDataProfile/common/userDataProfile.js"() { + "use strict"; + + Gl(); + pe(); + q(); + Et(); + Le(); + X(); + Aa(); + Nt(); + te(); + Zt(); + ii(); + Un(); + nt(); + Ps(); + $i(); + zt(); + (function (i) { + i.Settings = "settings"; + i.Keybindings = "keybindings"; + i.Snippets = "snippets"; + i.Tasks = "tasks"; + i.Extensions = "extensions"; + i.GlobalState = "globalState"; + })(Sos ||= {}); + Ml = Ve("IUserDataProfilesService"); + DUt = class extends H { + static { + this.b = "userDataProfiles"; + } + static { + this.c = "profileAssociations"; + } + get defaultProfile() { + return this.profiles[0]; + } + get profiles() { + return [...this.z.profiles, ...this.q.profiles]; + } + constructor(e, t, s, n) { + super(); + this.r = e; + this.s = t; + this.t = s; + this.u = n; + this.g = this.D(new B()); + this.onDidChangeProfiles = this.g.event; + this.h = this.D(new B()); + this.onWillCreateProfile = this.h.event; + this.j = this.D(new B()); + this.onWillRemoveProfile = this.j.event; + this.m = this.D(new B()); + this.onDidResetWorkspaces = this.m.event; + this.n = new Map(); + this.q = { + profiles: [], + emptyWindows: new Map() + }; + this.profilesHome = Li(this.r.userRoamingDataHome, "profiles"); + this.f = Li(this.r.cacheHome, "CachedProfilesData"); + } + init() { + this.y = undefined; + } + get z() { + if (!this.y) { + const e = this.C(); + const t = [e]; + try { + for (const n of this.N()) { + if (!n.name || !yi(n.name) || !n.location) { + this.u.warn("Skipping the invalid stored profile", n.location || n.name); + continue; + } + t.push(oie(ji(n.location), n.name, n.location, this.f, { + icon: n.icon, + useDefaultFlags: n.useDefaultFlags + }, e)); + } + } catch (n) { + this.u.error(n); + } + const s = new Map(); + if (t.length) { + try { + const n = this.P(); + if (n.workspaces) { + for (const [r, o] of Object.entries(n.workspaces)) { + const a = V.parse(r); + const l = t.find(c => c.id === o); + if (l) { + const c = l.workspaces ? l.workspaces.slice(0) : []; + c.push(a); + l.workspaces = c; + } + } + } + if (n.emptyWindows) { + for (const [r, o] of Object.entries(n.emptyWindows)) { + const a = t.find(l => l.id === o); + if (a) { + s.set(r, a); + } + } + } + } catch (n) { + this.u.error(n); + } + } + this.y = { + profiles: t, + emptyWindows: s + }; + } + return this.y; + } + C() { + const e = oie("__default__profile__", f(2486, null), this.r.userRoamingDataHome, this.f); + return { + ...e, + extensionsResource: this.R() ?? e.extensionsResource, + isDefault: true + }; + } + async createTransientProfile(e) { + const t = "Temp"; + const s = new RegExp(`${zg(t)}\\s(\\d+)`); + let n = 0; + for (const o of this.profiles) { + const a = s.exec(o.name); + const l = a ? parseInt(a[1]) : 0; + n = l > n ? l : n; + } + const r = `${t} ${n + 1}`; + return this.createProfile(Qc(Ft()).toString(16), r, { + transient: true + }, e); + } + async createNamedProfile(e, t, s) { + return this.createProfile(Qc(Ft()).toString(16), e, t, s); + } + async createProfile(e, t, s, n) { + return await this.F(e, t, s, n); + } + async F(e, t, s, n) { + if (!yi(t) || !t) { + throw new Error("Name of the profile is mandatory and must be of type `string`"); + } + let r = this.n.get(t); + if (!r) { + r = (async () => { + try { + if (this.profiles.find(u => u.id === e || !u.isTransient && !s?.transient && u.name === t)) { + throw new Error(`Profile with ${t} name already exists`); + } + const a = n ? this.G(n) : undefined; + if (V.isUri(a)) { + s = { + ...s, + workspaces: [a] + }; + } + const l = oie(e, t, Li(this.profilesHome, e), this.f, s, this.defaultProfile); + await this.s.createFolder(l.location); + const c = []; + this.h.fire({ + profile: l, + join(u) { + c.push(u); + } + }); + await Ko.settled(c); + if (a && !V.isUri(a)) { + this.L(a, l, !!l.isTransient); + } + this.I([l], [], []); + return l; + } finally { + this.n.delete(t); + } + })(); + this.n.set(t, r); + } + return r; + } + async updateProfile(e, t) { + const s = []; + for (const r of this.profiles) { + let o; + if (e.id === r.id) { + if (r.isDefault) { + if (t.workspaces) { + o = r; + o.workspaces = t.workspaces; + } + } else { + o = oie(r.id, t.name ?? r.name, r.location, this.f, { + icon: t.icon === null ? undefined : t.icon ?? r.icon, + transient: t.transient ?? r.isTransient, + useDefaultFlags: t.useDefaultFlags ?? r.useDefaultFlags, + workspaces: t.workspaces ?? r.workspaces + }, this.defaultProfile); + } + } else if (t.workspaces) { + const a = r.workspaces?.filter(l => !t.workspaces?.some(c => this.t.extUri.isEqual(l, c))); + if (r.workspaces?.length !== a?.length) { + o = r; + o.workspaces = a; + } + } + if (o) { + s.push(o); + } + } + if (!s.length) { + throw e.isDefault ? new Error("Cannot update default profile") : new Error(`Profile '${e.name}' does not exist`); + } + this.I([], [], s); + const n = this.profiles.find(r => r.id === e.id); + if (!n) { + throw new Error(`Profile '${e.name}' was not updated`); + } + return n; + } + async removeProfile(e) { + if (e.isDefault) { + throw new Error("Cannot remove default profile"); + } + const t = this.profiles.find(n => n.id === e.id); + if (!t) { + throw new Error(`Profile '${e.name}' does not exist`); + } + const s = []; + this.j.fire({ + profile: t, + join(n) { + s.push(n); + } + }); + try { + await Promise.allSettled(s); + } catch (n) { + this.u.error(n); + } + this.I([], [t], []); + try { + await this.s.del(t.cacheHome, { + recursive: true + }); + } catch (n) { + if (ZL(n) !== 1) { + this.u.error(n); + } + } + } + async setProfileForWorkspace(e, t) { + const s = this.profiles.find(r => r.id === t.id); + if (!s) { + throw new Error(`Profile '${t.name}' does not exist`); + } + const n = this.G(e); + if (V.isUri(n)) { + const r = s.workspaces ? [...s.workspaces] : []; + if (!r.some(o => this.t.extUri.isEqual(o, n))) { + r.push(n); + await this.updateProfile(s, { + workspaces: r + }); + } + } else { + this.L(n, s, false); + this.M(this.profiles); + } + } + unsetWorkspace(e, t = false) { + const s = this.G(e); + if (V.isUri(s)) { + const n = this.getProfileForWorkspace(e); + if (n) { + this.updateProfile(n, { + workspaces: n.workspaces?.filter(r => !this.t.extUri.isEqual(r, s)) + }); + } + } else { + this.L(s, undefined, t); + this.M(this.profiles); + } + } + async resetWorkspaces() { + this.q.emptyWindows.clear(); + this.z.emptyWindows.clear(); + for (const e of this.profiles) { + e.workspaces = undefined; + } + this.I([], [], this.profiles); + this.m.fire(); + } + async cleanUp() { + if (await this.s.exists(this.profilesHome)) { + const e = await this.s.resolve(this.profilesHome); + await Promise.all((e.children || []).filter(t => t.isDirectory && this.profiles.every(s => !this.t.extUri.isEqual(s.location, t.resource))).map(t => this.s.del(t.resource, { + recursive: true + }))); + } + } + async cleanUpTransientProfiles() { + const e = this.q.profiles.filter(t => !this.H(t)); + await Promise.allSettled(e.map(t => this.removeProfile(t))); + } + getProfileForWorkspace(e) { + const t = this.G(e); + if (V.isUri(t)) { + return this.profiles.find(s => s.workspaces?.some(n => this.t.extUri.isEqual(n, t))); + } else { + return this.z.emptyWindows.get(t) ?? this.q.emptyWindows.get(t); + } + } + G(e) { + if (u1(e)) { + return e.uri; + } else if ($M(e)) { + return e.configPath; + } else { + return e.id; + } + } + H(e) { + return !!e.workspaces?.length || !![...this.z.emptyWindows.values()].some(t => this.t.extUri.isEqual(t.location, e.location)) || !![...this.q.emptyWindows.values()].some(t => this.t.extUri.isEqual(t.location, e.location)); + } + I(e, t, s) { + const n = [...this.profiles, ...e]; + const r = this.q.profiles; + this.q.profiles = []; + const o = []; + for (let a of n) { + if (t.some(l => a.id === l.id)) { + for (const l of [...this.z.emptyWindows.keys()]) { + if (a.id === this.z.emptyWindows.get(l)?.id) { + this.z.emptyWindows.delete(l); + } + } + continue; + } + if (!a.isDefault) { + a = s.find(c => a.id === c.id) ?? a; + const l = r.find(c => a.id === c.id); + if (a.isTransient) { + this.q.profiles.push(a); + } else if (l) { + for (const [c, u] of this.q.emptyWindows.entries()) { + if (a.id === u.id) { + this.q.emptyWindows.delete(c); + this.z.emptyWindows.set(c, a); + break; + } + } + } + } + if (a.workspaces?.length === 0) { + a.workspaces = undefined; + } + o.push(a); + } + this.M(o); + this.J(e, t, s); + } + J(e, t, s) { + this.g.fire({ + added: e, + removed: t, + updated: s, + all: this.profiles + }); + } + L(e, t, s) { + s = t?.isTransient ? true : s; + if (s) { + if (t) { + this.q.emptyWindows.set(e, t); + } else { + this.q.emptyWindows.delete(e); + } + } else { + this.q.emptyWindows.delete(e); + if (t) { + this.z.emptyWindows.set(e, t); + } else { + this.z.emptyWindows.delete(e); + } + } + } + M(e) { + const t = []; + const s = {}; + const n = {}; + for (const r of e) { + if (!r.isTransient && (r.isDefault || t.push({ + location: r.location, + name: r.name, + icon: r.icon, + useDefaultFlags: r.useDefaultFlags + }), r.workspaces)) { + for (const o of r.workspaces) { + s[o.toString()] = r.id; + } + } + } + for (const [r, o] of this.z.emptyWindows.entries()) { + n[r.toString()] = o.id; + } + this.Q({ + workspaces: s, + emptyWindows: n + }); + this.O(t); + this.y = undefined; + } + N() { + return []; + } + O(e) { + throw new Error("not implemented"); + } + P() { + return {}; + } + Q(e) { + throw new Error("not implemented"); + } + R() {} + }; + DUt = __decorate([__param(0, pa), __param(1, Ct), __param(2, _s), __param(3, Bt)], DUt); + } +}); +function eXn(i) { + const e = i.get(cme); + if (e) { + try { + return JSON.parse(e); + } catch {} + } + return Object.create(null); +} +function Olt(i) { + return i.isDefault || !!i.useDefaultFlags?.globalState; +} +async function tXn(i, e, t, s, n, r) { + const o = b => { + try { + return JSON.parse(b); + } catch { + return b; + } + }; + const a = new Map(); + const l = new Map(); + i.forEach((b, v) => { + a.set(v, b); + l.set(v, o(b)); + }); + const c = new Map(); + const u = new Map(); + e.forEach((b, v) => { + c.set(v, b); + u.set(v, o(b)); + }); + const d = new Map(); + const h = new Map(); + t.forEach((b, v) => { + d.set(v, b); + h.set(v, o(b)); + }); + console.group(s !== n ? `Storage: Application (path: ${s})` : `Storage: Application & Profile (path: ${s}, default profile)`); + const g = []; + a.forEach((b, v) => { + g.push({ + key: v, + value: b + }); + }); + console.table(g); + console.groupEnd(); + console.log(l); + if (s !== n) { + console.group(`Storage: Profile (path: ${n}, profile specific)`); + const b = []; + c.forEach((v, y) => { + b.push({ + key: y, + value: v + }); + }); + console.table(b); + console.groupEnd(); + console.log(u); + } + console.group(`Storage: Workspace (path: ${r})`); + const p = []; + d.forEach((b, v) => { + p.push({ + key: v, + value: b + }); + }); + console.table(p); + console.groupEnd(); + console.log(h); +} +var TUt; +var cme; +var ht; +var HT; +var xos; +var kos; +var _lt; +var Eos; +var qt = ue({ + "out-build/vs/platform/storage/common/storage.js"() { + "use strict"; + + nt(); + pe(); + q(); + yb(); + zt(); + vUt(); + te(); + mu(); + TUt = "__$__isNewStorageMarker"; + cme = "__$__targetStorageMarker"; + ht = Ve("storageService"); + (function (i) { + i[i.NONE = 0] = "NONE"; + i[i.SHUTDOWN = 1] = "SHUTDOWN"; + })(HT ||= {}); + (function (i) { + i[i.APPLICATION = -1] = "APPLICATION"; + i[i.PROFILE = 0] = "PROFILE"; + i[i.WORKSPACE = 1] = "WORKSPACE"; + })(xos ||= {}); + (function (i) { + i[i.USER = 0] = "USER"; + i[i.MACHINE = 1] = "MACHINE"; + })(kos ||= {}); + _lt = class hOn extends H { + static { + this.a = 60000; + } + constructor(e = { + flushInterval: hOn.a + }) { + super(); + this.n = e; + this.b = this.D(new cx()); + this.f = this.D(new cx()); + this.onDidChangeTarget = this.f.event; + this.g = this.D(new B()); + this.onWillSaveState = this.g.event; + this.j = this.D(new Vn(() => this.q(), this.n.flushInterval)); + this.m = this.D(new ki()); + this.C = undefined; + this.G = undefined; + this.I = undefined; + this.N = []; + } + onDidChangeValue(e, t, s) { + return de.filter(this.b.event, n => n.scope === e && (t === undefined || n.key === t), s); + } + q() { + this.m.value = qq(() => { + if (this.r()) { + this.flush(); + } + this.j.schedule(); + }); + } + r() { + return true; + } + t() { + si([this.m, this.j]); + } + initialize() { + this.h ||= (async () => { + Dr("code/willInitStorage"); + try { + await this.Q(); + } finally { + Dr("code/didInitStorage"); + } + this.j.schedule(); + })(); + return this.h; + } + u(e, t) { + const { + key: s, + external: n + } = t; + if (s === cme) { + switch (e) { + case -1: + this.I = undefined; + break; + case 0: + this.G = undefined; + break; + case 1: + this.C = undefined; + break; + } + this.f.fire({ + scope: e + }); + } else { + this.b.fire({ + scope: e, + key: s, + target: this.L(e)[s], + external: n + }); + } + } + w(e) { + this.g.fire({ + reason: e + }); + } + get(e, t, s) { + return this.R(t)?.get(e, s); + } + getBoolean(e, t, s) { + return this.R(t)?.getBoolean(e, s); + } + getNumber(e, t, s) { + return this.R(t)?.getNumber(e, s); + } + getObject(e, t, s) { + return this.R(t)?.getObject(e, s); + } + storeAll(e, t) { + this.y(() => { + for (const s of e) { + this.store(s.key, s.value, s.scope, s.target, t); + } + }); + } + store(e, t, s, n, r = false) { + if (Ga(t)) { + this.remove(e, s, r); + return; + } + this.y(() => { + this.z(e, s, n); + this.R(s)?.set(e, t, r); + }); + } + remove(e, t, s = false) { + this.y(() => { + this.z(e, t, undefined); + this.R(t)?.delete(e, s); + }); + } + y(e) { + this.b.pause(); + this.f.pause(); + try { + e(); + } finally { + this.b.resume(); + this.f.resume(); + } + } + keys(e, t) { + const s = []; + const n = this.L(e); + for (const r of Object.keys(n)) { + if (n[r] === t) { + s.push(r); + } + } + return s; + } + z(e, t, s, n = false) { + const r = this.L(t); + if (typeof s == "number") { + if (r[e] !== s) { + r[e] = s; + this.R(t)?.set(cme, JSON.stringify(r), n); + } + } else if (typeof r[e] == "number") { + delete r[e]; + this.R(t)?.set(cme, JSON.stringify(r), n); + } + } + get F() { + this.C ||= this.M(1); + return this.C; + } + get H() { + this.G ||= this.M(0); + return this.G; + } + get J() { + this.I ||= this.M(-1); + return this.I; + } + L(e) { + switch (e) { + case -1: + return this.J; + case 0: + return this.H; + default: + return this.F; + } + } + M(e) { + const t = this.R(e); + if (t) { + return eXn(t); + } else { + return Object.create(null); + } + } + isNew(e) { + return this.getBoolean(TUt, e) === true; + } + async cursorDiskKVGet(e) { + return this.R(-1)?.cursorDiskKVGet(e); + } + async cursorDiskKVSet(e, t) { + return this.R(-1)?.cursorDiskKVSet(e, t); + } + async cursorDiskKVClearPrefix(e) { + return this.R(-1)?.cursorDiskKVClearPrefix(e); + } + cursorDiskKVOnShouldSave(e) { + this.N.push(e); + return { + dispose: () => { + this.N = this.N.filter(t => t !== e); + } + }; + } + async flush(e = HT.NONE) { + this.g.fire({ + reason: e + }); + const t = this.R(-1); + const s = this.R(0); + const n = this.R(1); + switch (e) { + case HT.NONE: + for (const r of this.N) { + try { + r().catch(console.error); + } catch {} + } + await Ko.settled([t?.whenFlushed() ?? Promise.resolve(), s?.whenFlushed() ?? Promise.resolve(), n?.whenFlushed() ?? Promise.resolve()]); + break; + case HT.SHUTDOWN: + for (const r of this.N) { + try { + await r(); + } catch (o) { + console.error(o); + } + } + await Ko.settled([t?.flush(0) ?? Promise.resolve(), s?.flush(0) ?? Promise.resolve(), n?.flush(0) ?? Promise.resolve()]); + break; + } + } + async log() { + const e = this.R(-1)?.items ?? new Map(); + const t = this.R(0)?.items ?? new Map(); + const s = this.R(1)?.items ?? new Map(); + return tXn(e, t, s, this.S(-1) ?? "", this.S(0) ?? "", this.S(1) ?? ""); + } + async optimize(e) { + await this.flush(); + return this.R(e)?.optimize(); + } + async switch(e, t) { + this.w(HT.NONE); + if (O4(e)) { + return this.U(e, t); + } else { + return this.W(e, t); + } + } + O(e, t) { + return e.id !== t.id && (!Olt(t) || !Olt(e)); + } + P(e, t, s) { + this.y(() => { + const n = new Set(); + for (const [r, o] of e) { + n.add(r); + if (t.get(r) !== o) { + this.u(s, { + key: r, + external: true + }); + } + } + for (const [r] of t.items) { + if (!n.has(r)) { + this.u(s, { + key: r, + external: true + }); + } + } + }); + } + }; + Eos = class extends _lt { + constructor() { + super(); + this.X = this.D(new i7(new Nlt(), { + hint: t7.STORAGE_IN_MEMORY + })); + this.Y = this.D(new i7(new Nlt(), { + hint: t7.STORAGE_IN_MEMORY + })); + this.Z = this.D(new i7(new Nlt(), { + hint: t7.STORAGE_IN_MEMORY + })); + this.D(this.Z.onDidChangeStorage(i => this.u(1, i))); + this.D(this.Y.onDidChangeStorage(i => this.u(0, i))); + this.D(this.X.onDidChangeStorage(i => this.u(-1, i))); + } + R(i) { + switch (i) { + case -1: + return this.X; + case 0: + return this.Y; + default: + return this.Z; + } + } + S(i) { + switch (i) { + case -1: + return "inMemory (application)"; + case 0: + return "inMemory (profile)"; + default: + return "inMemory (workspace)"; + } + } + async Q() {} + async U() {} + async W() {} + r() { + return false; + } + hasScope(i) { + return false; + } + }; + } +}); +var ume; +var Ios; +var iXn = ue({ + "out-build/vs/platform/tooltipService/common/tooltipPipelines.js"() { + "use strict"; + + rt(); + ume = Gt ? "⌘" : "Ctrl"; + Ios = [{ + name: "terminal.cmdk", + showOn: { + sequences: [{ + events: [["*", "terminal.show", "terminal.focus", "terminal.type"], ["*", "chat.open", "chat.input.focus", "chat.insert_selection.terminal.empty"], ["*", "chat.type", "chat.paste", "_"], "chat.submit", ["*", "!", "chat.submit", "editor.paste", "_"], "chat.copy.codeblock", ["*", "!", "chat.submit", "editor.type", "editor.paste", "_"], ["*", "terminal.type", "_"], "terminal.paste"], + timeout_ms: 120000 + }], + gracePeriod_ms: 2592000000 + }, + popup: { + header: `Generate Terminal Command (${ume} + K)`, + subheader: `You can use ${ume} + K to generate commands directly inside the terminal`, + location: "terminal" + }, + disableOn: { + sequences: [{ + events: ["terminal.cmdk.submit"], + timeout_ms: Infinity + }], + gracePeriod_ms: 2592000000 + } + }, { + name: "editor.cmdk", + showOn: { + sequences: [{ + events: ["editor.copy", ["*", "chat.open", "chat.input.focus", "chat.insert_selection.editor.empty"], ["*", "chat.type", "_"], ["*", "chat.paste"], ["*", "chat.type", "_"], "chat.submit", ["*", "!", "chat.submit", "editor.paste", "_"], "chat.copy.codeblock", ["*", "!", "chat.submit", "terminal.paste", "terminal.type", "_"], ["*", "editor.type", "_"], "editor.paste"], + timeout_ms: 120000 + }, { + events: ["chat.open", "chat.insert_selection.editor.non_empty", ["*", "_", "chat.input.focus"], ["*", "chat.type", "_"], "chat.submit", ["*", "!", "chat.submit", "terminal.paste", "_"], "chat.copy.codeblock", ["*", "!", "chat.submit", "terminal.paste", "terminal.type", "_"], ["*", "editor.type", "_"], "editor.paste"], + timeout_ms: 120000 + }], + gracePeriod_ms: 2592000000 + }, + popup: { + header: `Edit Code (${ume} + K)`, + subheader: `You can select code and edit it in your editor using ${ume} + K`, + location: "editor" + }, + disableOn: { + sequences: [{ + events: ["editor.cmdk.submit"], + timeout_ms: Infinity + }], + gracePeriod_ms: 2592000000 + } + }]; + } +}); +var Blt; +var PUt; +var Dos; +var Tos; +var Pos; +var LUt; +var yF; +var gz; +var Los; +var dme; +var Rx; +var Ult; +var qT = ue({ + "out-build/vs/platform/tooltipService/common/tooltipService.js"() { + "use strict"; + + It(); + te(); + q(); + qt(); + iXn(); + Gl(); + Wt(); + Pn(); + Je(); + Blt = "tooltipServicePipelines"; + PUt = "lastShownTooltipTime"; + Dos = 14400000; + Tos = 1209600000; + Pos = 3600000; + LUt = false; + yF = false; + gz = false; + Los = false; + dme = []; + Rx = Ve("tooltipService"); + Ult = class extends H { + constructor(e, t) { + super(); + this.q = e; + this.r = t; + this.h = new Map(); + this.j = false; + this.n = 0; + this.c = Ios; + this.y(); + } + s() { + const e = { + state: [] + }; + this.c.forEach(t => { + e.state.push({ + name: t.name, + disableStatus: undefined, + createdAt: Date.now() + }); + }); + this.f = e; + this.t(); + } + t() { + const e = { + sequences: [] + }; + this.c.forEach(t => { + t.showOn.sequences.forEach(s => { + e.sequences.push({ + activeEventIndices: [], + sequenceHash: this.z(s) + }); + }); + t.disableOn.sequences.forEach(s => { + e.sequences.push({ + activeEventIndices: [], + sequenceHash: this.z(s) + }); + }); + }); + this.g = e; + } + u(e) { + if (gz) { + return; + } + const t = this.q.get(Blt, -1); + if (!t || t === "") { + if (yF) { + console.log("[Tooltip][Initializing Empty Pipeline State]"); + } + this.s(); + return; + } + return JSON.parse(t).state.find(r => r.name === e); + } + w(e) { + if (gz) { + return this.f?.state.find(o => o.name === e); + } + if (this.f === undefined) { + return; + } + const t = this.f.state.findIndex(o => o.name === e); + if (t === -1) { + return; + } + const s = this.u(e); + const n = s?.disableStatus?.disabledUntil; + const r = this.f.state[t].disableStatus?.disabledUntil; + if (s === undefined || n === undefined) { + return this.f.state[t]; + } else if (r !== undefined && r >= n) { + return this.f.state[t]; + } else { + this.f.state[t] = s; + return s; + } + } + y() { + try { + const e = this.q.get(Blt, -1); + if (gz || !e || e === "") { + if (yF) { + console.log("[Tooltip][Initializing Empty Pipeline State]"); + } + this.s(); + return; + } + if (yF) { + console.log("[Tooltip][Loading Pipeline State]"); + } + const t = JSON.parse(e); + if (yF) { + console.log("[Tooltip][Current Pipelines State]", t); + } + const s = { + state: [] + }; + for (let n of this.c) { + const r = t.state.find(o => o.name === n.name); + if (r) { + s.state.push(r); + } else { + s.state.push({ + name: n.name, + disableStatus: undefined, + createdAt: Date.now() + }); + } + } + this.f = s; + } catch (e) { + if (yF) { + console.log("[Tooltip][Error Loading Pipeline State]", e); + } + this.s(); + } finally { + this.t(); + this.j = true; + } + } + z(e) { + const t = { + ...e + }; + if ("debug" in t) { + delete t.debug; + } + return Qc(JSON.stringify(t)); + } + C(e) { + const t = { + ...e + }; + if ("debug" in t) { + delete t.debug; + } + let s = this.h.get(t); + if (s === undefined) { + s = this.z(e); + this.h.set(e, s); + } + return this.g.sequences.find(n => n.sequenceHash === s); + } + F(e) { + const t = this.C(e); + if (t) { + t.activeEventIndices = []; + } + } + G() { + if (!gz) { + if (yF) { + console.log("[Tooltip][Saving Pipeline State]", this.f); + } + this.q.store(Blt, JSON.stringify(this.f), -1, 1); + this.m = Date.now(); + } + } + H() { + if (!this.m || !(Date.now() - this.m < Pos)) { + this.G(); + } + } + I(e) { + if (this.f === undefined) { + return; + } + e.showOn.sequences.forEach(s => this.F(s)); + const t = this.f.state.find(s => s.name === e.name); + if (t) { + t.disableStatus = { + disabledUntil: Date.now() + e.showOn.gracePeriod_ms + }; + this.r.executeCommand(D5t, { + location: e.popup.location, + header: e.popup.header, + subheader: e.popup.subheader, + name: e.name + }); + console.log(`[Tooltip][Show Tooltip] +${e.popup.header} +--- +${e.popup.subheader}`); + if (!LUt) { + this.q.store(PUt, new Date().getTime().toString(), -1, 1); + } + if (!gz) { + this.G(); + } + } + } + J(e) { + if (this.f === undefined) { + return; + } + const t = this.c.find(r => r.name === e); + let s = this.f.state.find(r => r.name === e); + if (!t || !s || (yF && console.log(`[Tooltip][Disable Tooltip] +${t.name}`), s = this.w(e), !s)) { + return; + } + const n = Date.now() + t.disableOn.gracePeriod_ms; + if (s?.disableStatus === undefined || !(s.disableStatus.disabledUntil > n)) { + t.showOn.sequences.forEach(r => this.F(r)); + t.disableOn.sequences.forEach(r => this.F(r)); + s.disableStatus = { + disabledUntil: n + }; + this.G(); + } + } + L(e, t) { + if (typeof t == "string") { + return { + isEventAccepted: e.startsWith(t), + shouldAllowMultipleOfCurrentEvent: false, + isSkippingAllowed: false + }; + } + if (t.length == 2 && t[0] === "*" && t[1] === "*") { + return { + isEventAccepted: true, + shouldAllowMultipleOfCurrentEvent: true, + isSkippingAllowed: false + }; + } + if (t.length === 3 && t.filter(a => a === "*").length === 2 && t.filter(a => a === "_").length === 1) { + return { + isEventAccepted: true, + shouldAllowMultipleOfCurrentEvent: true, + isSkippingAllowed: true + }; + } + if (t.length === 1 && t[0] === "*") { + return { + isEventAccepted: true, + shouldAllowMultipleOfCurrentEvent: false, + isSkippingAllowed: false + }; + } + if (t.length == 2 && t.filter(a => a === "*").length === 1 && t.filter(a => a === "_").length === 1) { + return { + isEventAccepted: true, + shouldAllowMultipleOfCurrentEvent: false, + isSkippingAllowed: true + }; + } + const s = t.includes("!"); + const n = t.includes("*"); + const r = t.includes("_"); + return { + isEventAccepted: s ? !t.some(a => e.startsWith(a)) : t.some(a => e.startsWith(a)), + shouldAllowMultipleOfCurrentEvent: n, + isSkippingAllowed: r + }; + } + M(e, t, s, n, r) { + const o = this.C(t); + if (!o) { + return; + } + if (o.activeEventIndices.length === 0) { + o.activeEventIndices.push(0); + } + if (o.startTime && Date.now() - o.startTime > t.timeout_ms) { + this.F(t); + } + const a = o.activeEventIndices; + let l = false; + let c = false; + let u = []; + let d = []; + for (let h = 0; h < a.length; h++) { + const g = a[h]; + const p = t.events[g]; + const { + shouldAllowMultipleOfCurrentEvent: b, + isEventAccepted: v, + isSkippingAllowed: y + } = this.L(s, p); + if (y) { + if (g + 1 === t.events.length) { + c = true; + n(); + break; + } + if (!a.includes(g + 1)) { + a.push(g + 1); + } + } + if (v && (l = true, o.startTime === undefined && (o.activeEventIndices.length === 1 && o.activeEventIndices[0] === 0 && !b || o.activeEventIndices.some(w => w > 0)) && (o.startTime = Date.now()), o.activeEventIndices.includes(g + 1) || (dme.includes(e) && t.debug && console.log(`[Accepted Event ${s} as Event ${p}. Adding index ${g + 1}]`), u.push(g + 1)), b || d.push(h), g + 1 === t.events.length)) { + c = true; + n(); + break; + } + } + if (!c) { + d.sort((h, g) => g - h); + for (const h of d) { + o.activeEventIndices.splice(h, 1); + if (dme.includes(e) && t.debug) { + console.log("[Finished Removing]", o.activeEventIndices); + } + } + for (const h of u) { + if (!o.activeEventIndices.includes(h)) { + o.activeEventIndices.push(h); + } + if (dme.includes(e) && t.debug) { + console.log("[Finished Adding]", o.activeEventIndices); + } + } + if (!l) { + if (dme.includes(e) && t.debug) { + console.log(`[Failed Sequence], ${JSON.stringify(t)}`); + } + r(); + } + } + } + async N(e) { + if (!!this.j && this.f !== undefined) { + if (yF) { + console.log("[Tooltip][Registering event]", e); + } + for (const t of this.c) { + let s = this.f.state.find(o => o.name === t.name); + if (s === undefined) { + continue; + } + for (const o of t.disableOn.sequences) { + this.M(t.name, o, e, () => { + this.J(t.name); + }, () => { + this.F(o); + }); + } + if (s.disableStatus) { + if (s.disableStatus.disabledUntil < Date.now()) { + s.disableStatus = undefined; + t.showOn.sequences.forEach(o => this.F(o)); + } else { + continue; + } + } + const n = s.createdAt ? Date.now() - s.createdAt : 0; + const r = t.initialDisabledPeriod_ms ?? Tos; + if (!Los && n <= r) { + if (yF) { + console.log("[Tooltip][Initial Disable Period]", t.name, n, r); + } + continue; + } + for (const o of t.showOn.sequences) { + this.M(t.name, o, e, () => { + s = this.w(t.name); + if (s?.disableStatus !== undefined && s.disableStatus.disabledUntil > Date.now()) { + return; + } + const a = Number(this.q.get(PUt, -1)); + const l = Date.now() - a; + if (LUt || l > Dos || isNaN(l) || isNaN(a)) { + this.I(t); + } + }, () => { + this.F(o); + }); + } + } + if (!gz) { + this.H(); + } + } + } + async registerEvent(e) { + if (this.n > 1000) { + console.error("Too many active promises from tooltipservice. Possible leak"); + return; + } + Promise.resolve().then(async () => { + const t = new Promise((s, n) => setTimeout(() => n(new Error("Timeout")), 1)); + this.n++; + Promise.race([t, new Promise(s => { + this.N(e).then(() => { + s(true); + }); + })]).then(() => { + this.n--; + }).catch(s => { + console.error(s); + this.n--; + }); + }).catch(t => { + console.error("tooltipservice timeout!"); + }); + } + async registerUserCloseTooltip(e) { + if (this.f === undefined) { + return; + } + const t = this.f.state.find(s => s.name === e); + if (t !== undefined) { + t.disableStatus = { + disabledUntil: Date.now() + 315360000000 + }; + this.G(); + } + } + }; + Ult = __decorate([__param(0, ht), __param(1, gt)], Ult); + it(Rx, Ult, 1); + J(class extends se { + constructor() { + super({ + id: T5t, + title: "Register Close Tooltip", + category: "Tooltip", + f1: false + }); + } + run(i, e) { + const { + tooltipName: t + } = e; + i.get(Rx).registerUserCloseTooltip(t); + } + }); + } +}); +function zI(i) { + return (i.scheme === "file" || i.scheme === "vscode-remote") && i.path.endsWith(".mdc"); +} +function Wlt(i) { + return i.scheme === me.aiEditorBox; +} +var RUt; +var a7 = ue({ + "out-build/vs/base/common/mdc.js"() { + "use strict"; + + At(); + RUt = `--- +description: +globs: +alwaysApply: false +--- +`; + } +}); +function aie(i) { + const e = new Gte(); + e.acceptChunk(i); + return e.finish(); +} +function Vlt(i) { + return new Promise((e, t) => { + const s = new Gte(); + let n = false; + Yq(i, { + onData: r => { + s.acceptChunk(typeof r == "string" ? r : r.toString()); + }, + onError: r => { + if (!n) { + n = true; + t(r); + } + }, + onEnd: () => { + if (!n) { + n = true; + e(s.finish()); + } + } + }); + }); +} +function l7(i) { + const e = new Gte(); + let t; + while (typeof (t = i.read()) == "string") { + e.acceptChunk(t); + } + return e.finish(); +} +function hme(i, e) { + let t; + if (typeof i == "string") { + t = aie(i); + } else if (zJn(i)) { + t = l7(i); + } else { + t = i; + } + return t.create(e); +} +function Ros(i) { + let e = 0; + for (const t of i) { + if (t === " " || t === "\t") { + e++; + } else { + break; + } + } + return e; +} +function NUt(i) { + return !!i.options.overviewRuler && !!i.options.overviewRuler.color; +} +function sXn(i) { + return !!i.after || !!i.before; +} +function Hlt(i) { + return !!i.options.after || !!i.options.before; +} +function wF(i) { + return i.replace(/[^a-z0-9\-_]/gi, " "); +} +function Nos(i) { + if (i instanceof Cr) { + return i; + } else { + return Cr.createDynamic(i); + } +} +var pz; +var fme; +var Mos; +var Aos; +var $os; +var lie; +var Fos; +var JI; +var MUt; +var AUt; +var Oos; +var _os; +var Bos; +var cie; +var Cr; +var $Ut; +var Uos; +var Wos; +var Vos; +var Ya = ue({ + "out-build/vs/editor/common/model/textModel.js"() { + "use strict"; + + Jt(); + Zo(); + Ut(); + pe(); + q(); + OL(); + $i(); + Le(); + J9(); + e8t(); + Rs(); + yt(); + ua(); + _ot(); + wn(); + Bd(); + gc(); + QKn(); + ZKn(); + zte(); + _ts(); + iYn(); + Zns(); + U7t(); + hrs(); + Z9(); + EYn(); + G7t(); + Kj(); + te(); + qh(); + kh(); + qT(); + a7(); + Rn(); + Wt(); + Pn(); + fme = 0; + Mos = 999; + Aos = 10000; + $os = class { + constructor(i) { + this.a = i; + this.b = false; + } + read() { + if (this.b) { + return null; + } + const i = []; + let e = 0; + let t = 0; + do { + const s = this.a.read(); + if (s === null) { + this.b = true; + if (e === 0) { + return null; + } else { + return i.join(""); + } + } + if (s.length > 0) { + i[e++] = s; + t += s.length; + } + if (t >= 65536) { + return i.join(""); + } + } while (true); + } + }; + lie = () => { + throw new Error("Invalid change accessor"); + }; + (function (i) { + i[i.Relaxed = 0] = "Relaxed"; + i[i.SurrogatePairs = 1] = "SurrogatePairs"; + })(Fos ||= {}); + JI = class extends H { + static { + pz = this; + } + static { + this._MODEL_SYNC_LIMIT = 52428800; + } + static { + this.a = 20971520; + } + static { + this.b = 300000; + } + static { + this.f = 268435456; + } + static { + this.DEFAULT_CREATION_OPTIONS = { + isForSimpleWidget: false, + tabSize: Aw.tabSize, + indentSize: Aw.indentSize, + insertSpaces: Aw.insertSpaces, + detectIndentation: false, + defaultEOL: 1, + trimAutoWhitespace: Aw.trimAutoWhitespace, + largeFileOptimizations: Aw.largeFileOptimizations, + bracketPairColorizationOptions: Aw.bracketPairColorizationOptions + }; + } + static resolveOptions(e, t) { + if (t.detectIndentation) { + const s = Ons(e, t.tabSize, t.insertSpaces); + return new Tat({ + tabSize: s.tabSize, + indentSize: "tabSize", + insertSpaces: s.insertSpaces, + trimAutoWhitespace: t.trimAutoWhitespace, + defaultEOL: t.defaultEOL, + bracketPairColorizationOptions: t.bracketPairColorizationOptions + }); + } + return new Tat(t); + } + get onDidChangeLanguage() { + return this.bb.onDidChangeLanguage; + } + get onDidChangeLanguageConfiguration() { + return this.bb.onDidChangeLanguageConfiguration; + } + get onDidChangeTokens() { + return this.bb.onDidChangeTokens; + } + onDidChangeContent(e) { + return this.u.slowEvent(t => e(t.contentChangedEvent)); + } + onDidChangeContentOrInjectedText(e) { + return Gc(this.u.fastEvent(t => e(t)), this.s.event(t => e(t))); + } + _isDisposing() { + return this.I; + } + get tokenization() { + return this.bb; + } + get bracketPairs() { + return this.cb; + } + get guides() { + return this.db; + } + constructor(e, t, s, n = null, r, o, a, l, c, u, d) { + super(); + this.fb = r; + this.gb = o; + this.hb = a; + this.ib = l; + this.jb = c; + this.kb = u; + this.lb = d; + this.g = this.D(new B()); + this.onWillDispose = this.g.event; + this.h = this.D(new Uos(y => this.Db(y))); + this.onDidChangeDecorations = this.h.event; + this.n = this.D(new B()); + this.onDidChangeOptions = this.n.event; + this.q = this.D(new B()); + this.onDidChangeAttached = this.q.event; + this.s = this.D(new B()); + this.u = this.D(new Wos()); + this.G = this.D(new ki()); + this.X = 0; + this.eb = new Crs(); + fme++; + this.id = "$model" + fme; + this.isForSimpleWidget = s.isForSimpleWidget; + if (typeof n === "undefined" || n === null) { + this.w = V.parse("inmemory://model/" + fme); + } else { + this.w = n; + } + this.y = 0; + const { + textBuffer: h, + disposable: g + } = hme(e, s.defaultEOL); + this.z = h; + this.C = g; + this.F = pz.resolveOptions(this.z, s); + const p = typeof t == "string" ? t : t.languageId; + if (typeof t != "string") { + this.G.value = t.onDidChange(() => this.Kb(t.languageId)); + } + this.cb = this.D(new Nns(this, this.hb)); + this.db = this.D(new Ots(this, this.hb)); + this.ab = this.D(new Mns(this)); + this.bb = this.jb.createInstance(ylt, this, this.cb, p, this.eb); + const b = this.z.getLineCount(); + const v = this.z.getValueLengthInRange(new Z(1, 1, b, this.z.getLineLength(b) + 1), 0); + if (s.largeFileOptimizations) { + this.O = v > pz.a || b > pz.b; + this.P = v > pz.f; + } else { + this.O = false; + this.P = false; + } + this.N = v > pz._MODEL_SYNC_LIMIT; + this.J = 1; + this.L = 1; + this.M = null; + this.H = false; + this.I = false; + this.W = k4t(fme); + this.Y = 0; + this.Z = Object.create(null); + this.$ = new MUt(); + this.Q = new Fns(this, this.fb); + this.R = false; + this.S = false; + this.U = null; + this.D(this.ab.onDidChange(() => { + this.h.beginDeferredEmit(); + this.h.fire(); + this.h.endDeferredEmit(); + })); + this.gb.requestRichLanguageFeatures(p); + this.D(this.hb.onDidChange(y => { + this.cb.handleLanguageConfigurationServiceChange(y); + this.bb.handleLanguageConfigurationServiceChange(y); + })); + this.reactiveStorageReducers = new Vos(this); + [this.nonPersistentReactiveStorage, this.setNonPersistentReactiveStorage] = this.mb(); + } + mb() { + return yp(kts(), undefined); + } + dispose() { + this.I = true; + this.g.fire(); + this.bb.dispose(); + this.H = true; + super.dispose(); + this.C.dispose(); + this.I = false; + const e = new mlt([], "", ` +`, false, false, true, true); + e.dispose(); + this.z = e; + this.C = H.None; + } + _hasListeners() { + return this.g.hasListeners() || this.h.hasListeners() || this.bb._hasListeners() || this.n.hasListeners() || this.q.hasListeners() || this.s.hasListeners() || this.u.hasListeners(); + } + nb() { + if (this.H) { + throw new co("Model is disposed!"); + } + } + equalsTextBuffer(e) { + this.nb(); + return this.z.equals(e); + } + getTextBuffer() { + this.nb(); + return this.z; + } + ob(e, t) { + if (!this.I) { + this.bb.handleDidChangeContent(t); + this.cb.handleDidChangeContent(t); + this.u.fire(new Fpe(e, t)); + } + } + setValue(e) { + this.nb(); + if (e == null) { + throw Hl(); + } + const { + textBuffer: t, + disposable: s + } = hme(e, this.F.defaultEOL); + this.qb(t, s); + } + pb(e, t, s, n, r, o, a, l) { + return { + changes: [{ + range: e, + rangeOffset: t, + rangeLength: s, + text: n + }], + eol: this.z.getEOL(), + isEolChange: l, + versionId: this.getVersionId(), + isUndoing: r, + isRedoing: o, + isFlush: a + }; + } + qb(e, t) { + this.nb(); + const s = this.getFullModelRange(); + const n = this.getValueLengthInRange(s); + const r = this.getLineCount(); + const o = this.getLineMaxColumn(r); + this.z = e; + this.C.dispose(); + this.C = t; + this.tb(); + this.Z = Object.create(null); + this.$ = new MUt(); + this.Q.clear(); + this.U = null; + this.ob(new $pe([new Kss()], this.J, false, false), this.pb(new Z(1, 1, r, o), 0, n, this.getValue(), false, false, true, false)); + } + setEOL(e) { + this.nb(); + const t = e === 1 ? `\r +` : ` +`; + if (this.z.getEOL() === t) { + return; + } + const s = this.getFullModelRange(); + const n = this.getValueLengthInRange(s); + const r = this.getLineCount(); + const o = this.getLineMaxColumn(r); + this.rb(); + this.z.setEOL(t); + this.tb(); + this.sb(); + this.ob(new $pe([new Qss()], this.J, false, false), this.pb(new Z(1, 1, r, o), 0, n, this.getValue(), false, false, false, true)); + } + rb() { + this.$.ensureAllNodesHaveRanges(this); + } + sb() { + const e = this.getVersionId(); + const t = this.$.collectNodesPostOrder(); + for (let s = 0, n = t.length; s < n; s++) { + const r = t[s]; + const o = r.range; + const a = r.cachedAbsoluteStart - r.start; + const l = this.z.getOffsetAt(o.startLineNumber, o.startColumn); + const c = this.z.getOffsetAt(o.endLineNumber, o.endColumn); + r.cachedAbsoluteStart = l; + r.cachedAbsoluteEnd = c; + r.cachedVersionId = e; + r.start = l - a; + r.end = c - a; + X9(r); + } + } + onBeforeAttached() { + this.y++; + if (this.y === 1) { + this.bb.handleDidChangeAttached(); + this.q.fire(undefined); + } + return this.eb.attachView(); + } + onBeforeDetached(e) { + this.y--; + if (this.y === 0) { + this.bb.handleDidChangeAttached(); + this.q.fire(undefined); + } + this.eb.detachView(e); + } + isAttachedToEditor() { + return this.y > 0; + } + getAttachedEditorCount() { + return this.y; + } + isTooLargeForSyncing() { + return this.N; + } + isTooLargeForTokenization() { + return this.O; + } + isTooLargeForHeapOperation() { + return this.P; + } + isDisposed() { + return this.H; + } + isDominatedByLongLines() { + this.nb(); + if (this.isTooLargeForTokenization()) { + return false; + } + let e = 0; + let t = 0; + const s = this.z.getLineCount(); + for (let n = 1; n <= s; n++) { + const r = this.z.getLineLength(n); + if (r >= Aos) { + t += r; + } else { + e += r; + } + } + return t > e; + } + get uri() { + return this.w; + } + getOptions() { + this.nb(); + return this.F; + } + getFormattingOptions() { + return { + tabSize: this.F.indentSize, + insertSpaces: this.F.insertSpaces + }; + } + updateOptions(e) { + this.nb(); + const t = typeof e.tabSize !== "undefined" ? e.tabSize : this.F.tabSize; + const s = typeof e.indentSize !== "undefined" ? e.indentSize : this.F.originalIndentSize; + const n = typeof e.insertSpaces !== "undefined" ? e.insertSpaces : this.F.insertSpaces; + const r = typeof e.trimAutoWhitespace !== "undefined" ? e.trimAutoWhitespace : this.F.trimAutoWhitespace; + const o = typeof e.bracketColorizationOptions !== "undefined" ? e.bracketColorizationOptions : this.F.bracketPairColorizationOptions; + const a = new Tat({ + tabSize: t, + indentSize: s, + insertSpaces: n, + defaultEOL: this.F.defaultEOL, + trimAutoWhitespace: r, + bracketPairColorizationOptions: o + }); + if (this.F.equals(a)) { + return; + } + const l = this.F.createChangeEvent(a); + this.F = a; + this.cb.handleDidChangeOptions(l); + this.ab.handleDidChangeOptions(l); + this.n.fire(l); + } + detectIndentation(e, t) { + this.nb(); + const s = Ons(this.z, t, e); + this.updateOptions({ + insertSpaces: s.insertSpaces, + tabSize: s.tabSize, + indentSize: s.tabSize + }); + } + normalizeIndentation(e) { + this.nb(); + return Z6t(e, this.F.indentSize, this.F.insertSpaces); + } + getVersionId() { + this.nb(); + return this.J; + } + mightContainRTL() { + return this.z.mightContainRTL(); + } + mightContainUnusualLineTerminators() { + return this.z.mightContainUnusualLineTerminators(); + } + removeUnusualLineTerminators(e = null) { + const t = this.findMatches(E4t.source, false, true, false, null, false, 1073741824); + this.z.resetMightContainUnusualLineTerminators(); + this.pushEditOperations(e, t.map(s => ({ + range: s.range, + text: null + })), () => null); + } + mightContainNonBasicASCII() { + return this.z.mightContainNonBasicASCII(); + } + getAlternativeVersionId() { + this.nb(); + return this.L; + } + getInitialUndoRedoSnapshot() { + this.nb(); + return this.M; + } + getOffsetAt(e) { + this.nb(); + const t = this.vb(e.lineNumber, e.column, 0); + return this.z.getOffsetAt(t.lineNumber, t.column); + } + getPositionAt(e) { + this.nb(); + const t = Math.min(this.z.getLength(), Math.max(0, e)); + return this.z.getPositionAt(t); + } + tb() { + this.J = this.J + 1; + this.L = this.J; + } + _overwriteVersionId(e) { + this.J = e; + } + _overwriteAlternativeVersionId(e) { + this.L = e; + } + _overwriteInitialUndoRedoSnapshot(e) { + this.M = e; + } + getValue(e, t = false) { + this.nb(); + if (this.isTooLargeForHeapOperation()) { + throw new co("Operation would exceed heap memory limits"); + } + const s = this.getFullModelRange(); + const n = this.getValueInRange(s, e); + if (t) { + return this.z.getBOM() + n; + } else { + return n; + } + } + createSnapshot(e = false) { + return new $os(this.z.createSnapshot(e)); + } + getValueLength(e, t = false) { + this.nb(); + const s = this.getFullModelRange(); + const n = this.getValueLengthInRange(s, e); + if (t) { + return this.z.getBOM().length + n; + } else { + return n; + } + } + getValueInRange(e, t = 0) { + this.nb(); + return this.z.getValueInRange(this.validateRange(e), t); + } + getValueLengthInRange(e, t = 0) { + this.nb(); + return this.z.getValueLengthInRange(this.validateRange(e), t); + } + getCharacterCountInRange(e, t = 0) { + this.nb(); + return this.z.getCharacterCountInRange(this.validateRange(e), t); + } + getLineCount() { + this.nb(); + return this.z.getLineCount(); + } + getLineContent(e) { + this.nb(); + if (e < 1 || e > this.getLineCount()) { + throw new co("Illegal value for lineNumber"); + } + return this.z.getLineContent(e); + } + getLineLength(e) { + this.nb(); + if (e < 1 || e > this.getLineCount()) { + throw new co("Illegal value for lineNumber"); + } + return this.z.getLineLength(e); + } + getLinesContent() { + this.nb(); + if (this.isTooLargeForHeapOperation()) { + throw new co("Operation would exceed heap memory limits"); + } + return this.z.getLinesContent(); + } + getEOL() { + this.nb(); + return this.z.getEOL(); + } + getEndOfLineSequence() { + this.nb(); + if (this.z.getEOL() === ` +`) { + return 0; + } else { + return 1; + } + } + getLineMinColumn(e) { + this.nb(); + return 1; + } + getLineMaxColumn(e) { + this.nb(); + if (e < 1 || e > this.getLineCount()) { + throw new co("Illegal value for lineNumber"); + } + return this.z.getLineLength(e) + 1; + } + getLineFirstNonWhitespaceColumn(e) { + this.nb(); + if (e < 1 || e > this.getLineCount()) { + throw new co("Illegal value for lineNumber"); + } + return this.z.getLineFirstNonWhitespaceColumn(e); + } + getLineLastNonWhitespaceColumn(e) { + this.nb(); + if (e < 1 || e > this.getLineCount()) { + throw new co("Illegal value for lineNumber"); + } + return this.z.getLineLastNonWhitespaceColumn(e); + } + _validateRangeRelaxedNoAllocations(e) { + const t = this.z.getLineCount(); + const s = e.startLineNumber; + const n = e.startColumn; + let r = Math.floor(typeof s == "number" && !isNaN(s) ? s : 1); + let o = Math.floor(typeof n == "number" && !isNaN(n) ? n : 1); + if (r < 1) { + r = 1; + o = 1; + } else if (r > t) { + r = t; + o = this.getLineMaxColumn(r); + } else if (o <= 1) { + o = 1; + } else { + const d = this.getLineMaxColumn(r); + if (o >= d) { + o = d; + } + } + const a = e.endLineNumber; + const l = e.endColumn; + let c = Math.floor(typeof a == "number" && !isNaN(a) ? a : 1); + let u = Math.floor(typeof l == "number" && !isNaN(l) ? l : 1); + if (c < 1) { + c = 1; + u = 1; + } else if (c > t) { + c = t; + u = this.getLineMaxColumn(c); + } else if (u <= 1) { + u = 1; + } else { + const d = this.getLineMaxColumn(c); + if (u >= d) { + u = d; + } + } + if (s === r && n === o && a === c && l === u && e instanceof Z && !(e instanceof Vs)) { + return e; + } else { + return new Z(r, o, c, u); + } + } + ub(e, t, s) { + if (typeof e != "number" || typeof t != "number" || isNaN(e) || isNaN(t) || e < 1 || t < 1 || (e | 0) !== e || (t | 0) !== t) { + return false; + } + const n = this.z.getLineCount(); + if (e > n) { + return false; + } + if (t === 1) { + return true; + } + const r = this.getLineMaxColumn(e); + if (t > r) { + return false; + } + if (s === 1) { + const o = this.z.getLineCharCode(e, t - 2); + if (jb(o)) { + return false; + } + } + return true; + } + vb(e, t, s) { + const n = Math.floor(typeof e == "number" && !isNaN(e) ? e : 1); + const r = Math.floor(typeof t == "number" && !isNaN(t) ? t : 1); + const o = this.z.getLineCount(); + if (n < 1) { + return new je(1, 1); + } + if (n > o) { + return new je(o, this.getLineMaxColumn(o)); + } + if (r <= 1) { + return new je(n, 1); + } + const a = this.getLineMaxColumn(n); + if (r >= a) { + return new je(n, a); + } + if (s === 1) { + const l = this.z.getLineCharCode(n, r - 2); + if (jb(l)) { + return new je(n, r - 1); + } + } + return new je(n, r); + } + validatePosition(e) { + this.nb(); + if (e instanceof je && this.ub(e.lineNumber, e.column, 1)) { + return e; + } else { + return this.vb(e.lineNumber, e.column, 1); + } + } + wb(e, t) { + const s = e.startLineNumber; + const n = e.startColumn; + const r = e.endLineNumber; + const o = e.endColumn; + if (!this.ub(s, n, 0) || !this.ub(r, o, 0)) { + return false; + } + if (t === 1) { + const a = n > 1 ? this.z.getLineCharCode(s, n - 2) : 0; + const l = o > 1 && o <= this.z.getLineLength(r) ? this.z.getLineCharCode(r, o - 2) : 0; + const c = jb(a); + const u = jb(l); + return !c && !u; + } + return true; + } + validateRange(e) { + this.nb(); + if (e instanceof Z && !(e instanceof Vs) && this.wb(e, 1)) { + return e; + } + const s = this.vb(e.startLineNumber, e.startColumn, 0); + const n = this.vb(e.endLineNumber, e.endColumn, 0); + const r = s.lineNumber; + const o = s.column; + const a = n.lineNumber; + const l = n.column; + { + const c = o > 1 ? this.z.getLineCharCode(r, o - 2) : 0; + const u = l > 1 && l <= this.z.getLineLength(a) ? this.z.getLineCharCode(a, l - 2) : 0; + const d = jb(c); + const h = jb(u); + if (!d && !h) { + return new Z(r, o, a, l); + } else if (r === a && o === l) { + return new Z(r, o - 1, a, l - 1); + } else if (d && h) { + return new Z(r, o - 1, a, l + 1); + } else if (d) { + return new Z(r, o - 1, a, l); + } else { + return new Z(r, o, a, l + 1); + } + } + return new Z(r, o, a, l); + } + modifyPosition(e, t) { + this.nb(); + const s = this.getOffsetAt(e) + t; + return this.getPositionAt(Math.min(this.z.getLength(), Math.max(0, s))); + } + getFullModelRange() { + this.nb(); + const e = this.getLineCount(); + return new Z(1, 1, e, this.getLineMaxColumn(e)); + } + xb(e, t, s, n) { + return this.z.findMatchesLineByLine(e, t, s, n); + } + findMatches(e, t, s, n, r, o, a = Mos) { + this.nb(); + let l = null; + if (t !== null) { + if (!Array.isArray(t)) { + t = [t]; + } + if (t.every(d => Z.isIRange(d))) { + l = t.map(d => this.validateRange(d)); + } + } + if (l === null) { + l = [this.getFullModelRange()]; + } + l = l.sort((d, h) => d.startLineNumber - h.startLineNumber || d.startColumn - h.startColumn); + const c = []; + c.push(l.reduce((d, h) => Z.areIntersecting(d, h) ? d.plusRange(h) : (c.push(d), h))); + let u; + if (!s && e.indexOf(` +`) < 0) { + const h = new UT(e, s, n, r).parseSearchRequest(); + if (!h) { + return []; + } + u = g => this.xb(g, h, o, a); + } else { + u = d => Gpe.findMatches(this, new UT(e, s, n, r), d, o, a); + } + return c.map(u).reduce((d, h) => d.concat(h), []); + } + findNextMatch(e, t, s, n, r, o) { + this.nb(); + const a = this.validatePosition(t); + if (!s && e.indexOf(` +`) < 0) { + const c = new UT(e, s, n, r).parseSearchRequest(); + if (!c) { + return null; + } + const u = this.getLineCount(); + let d = new Z(a.lineNumber, a.column, u, this.getLineMaxColumn(u)); + let h = this.xb(d, c, o, 1); + Gpe.findNextMatch(this, new UT(e, s, n, r), a, o); + if (h.length > 0 || (d = new Z(1, 1, a.lineNumber, this.getLineMaxColumn(a.lineNumber)), h = this.xb(d, c, o, 1), h.length > 0)) { + return h[0]; + } else { + return null; + } + } + return Gpe.findNextMatch(this, new UT(e, s, n, r), a, o); + } + findPreviousMatch(e, t, s, n, r, o) { + this.nb(); + const a = this.validatePosition(t); + return Gpe.findPreviousMatch(this, new UT(e, s, n, r), a, o); + } + pushStackElement() { + if (Wlt(this.uri)) { + this.lb.executeCommand(ege, this.uri).then(e => { + if (e) { + this.kb.getModel(e)?.pushStackElement(); + } + }); + } + this.Q.pushStackElement(); + } + popStackElement() { + this.Q.popStackElement(); + } + pushEOL(e) { + if ((this.getEOL() === ` +` ? 0 : 1) !== e) { + try { + this.h.beginDeferredEmit(); + this.u.beginDeferredEmit(); + if (this.M === null) { + this.M = this.fb.createSnapshot(this.uri); + } + this.Q.pushEOL(e); + } finally { + this.u.endDeferredEmit(); + this.h.endDeferredEmit(); + } + } + } + yb(e) { + if (e instanceof gpe) { + return e; + } else { + return new gpe(e.identifier || null, this.validateRange(e.range), e.text, e.forceMoveMarkers || false, e.isAutoWhitespaceEdit || false, e._isTracked || false); + } + } + zb(e) { + const t = []; + for (let s = 0, n = e.length; s < n; s++) { + t[s] = this.yb(e[s]); + } + return t; + } + pushEditOperations(e, t, s, n, r) { + try { + this.h.beginDeferredEmit(); + this.u.beginDeferredEmit(); + return this.Ab(e, this.zb(t), s, n, r); + } finally { + this.u.endDeferredEmit(); + this.h.endDeferredEmit(); + } + } + Ab(e, t, s, n, r) { + this.ib.registerEvent("editor.type.push_edit_operation"); + if (this.F.trimAutoWhitespace && this.U) { + const o = t.map(l => ({ + range: this.validateRange(l.range), + text: l.text + })); + let a = true; + if (e) { + for (let l = 0, c = e.length; l < c; l++) { + const u = e[l]; + let d = false; + for (let h = 0, g = o.length; h < g; h++) { + const p = o[h].range; + const b = p.startLineNumber > u.endLineNumber; + const v = u.startLineNumber > p.endLineNumber; + if (!b && !v) { + d = true; + break; + } + } + if (!d) { + a = false; + break; + } + } + } + if (a) { + for (let l = 0, c = this.U.length; l < c; l++) { + const u = this.U[l]; + const d = this.getLineMaxColumn(u); + let h = true; + for (let g = 0, p = o.length; g < p; g++) { + const b = o[g].range; + const v = o[g].text; + if (!(u < b.startLineNumber) && !(u > b.endLineNumber) && (u !== b.startLineNumber || b.startColumn !== d || !b.isEmpty() || !v || !(v.length > 0) || v.charAt(0) !== ` +`) && (u !== b.startLineNumber || b.startColumn !== 1 || !b.isEmpty() || !v || !(v.length > 0) || v.charAt(v.length - 1) !== ` +`)) { + h = false; + break; + } + } + if (h) { + const g = new Z(u, 1, u, d); + t.push(new gpe(null, g, null, false, false, false)); + } + } + } + this.U = null; + } + if (this.M === null) { + this.M = this.fb.createSnapshot(this.uri); + } + return this.Q.pushEditOperation(e, t, s, n, r); + } + _applyUndo(e, t, s, n) { + this.ib.registerEvent("editor.type.undo"); + const r = e.map(o => { + const a = this.getPositionAt(o.newPosition); + const l = this.getPositionAt(o.newEnd); + return { + range: new Z(a.lineNumber, a.column, l.lineNumber, l.column), + text: o.oldText + }; + }); + this.Bb(r, t, true, false, s, n); + } + _applyRedo(e, t, s, n) { + this.ib.registerEvent("editor.type.redo"); + const r = e.map(o => { + const a = this.getPositionAt(o.oldPosition); + const l = this.getPositionAt(o.oldEnd); + return { + range: new Z(a.lineNumber, a.column, l.lineNumber, l.column), + text: o.newText + }; + }); + this.Bb(r, t, false, true, s, n); + } + Bb(e, t, s, n, r, o) { + try { + this.h.beginDeferredEmit(); + this.u.beginDeferredEmit(); + this.R = s; + this.S = n; + this.applyEdits(e, false); + this.setEOL(t); + this._overwriteAlternativeVersionId(r); + } finally { + this.R = false; + this.S = false; + this.u.endDeferredEmit(o); + this.h.endDeferredEmit(); + } + } + applyEdits(e, t = false, s = false) { + try { + this.h.beginDeferredEmit(); + this.u.beginDeferredEmit(); + const n = this.zb(e); + const r = this.Cb(n, t); + if (s) { + for (const o of n) { + this.fb.rebaseStack(this.uri, this.z.getOffsetAt(o.range.startLineNumber, o.range.startColumn), this.z.getOffsetAt(o.range.endLineNumber, o.range.endColumn), o.text?.length ?? 0, o.range.endLineNumber, o.range.endColumn, (o.text?.split(this.getEOL()).length ?? 1) - Math.max(1, o.range.endLineNumber - o.range.startLineNumber), o.text?.split(this.getEOL())[o.text.split(this.getEOL()).length - 1].length ?? 0 - o.range.endColumn + (o.range.startLineNumber === o.range.endLineNumber ? o.range.startColumn : 0)); + } + } + return r; + } finally { + this.u.endDeferredEmit(); + this.h.endDeferredEmit(); + } + } + Cb(e, t) { + const s = this.z.getLineCount(); + const n = this.z.applyEdits(e, this.F.trimAutoWhitespace, t); + const r = this.z.getLineCount(); + const o = n.changes; + this.U = n.trimAutoWhitespaceLineNumbers; + if (o.length !== 0) { + for (let c = 0, u = o.length; c < u; c++) { + const d = o[c]; + this.$.acceptReplace(d.rangeOffset, d.rangeLength, d.text.length, d.forceMoveMarkers); + } + const a = []; + this.tb(); + let l = s; + for (let c = 0, u = o.length; c < u; c++) { + const d = o[c]; + const [h] = XL(d.text); + this.h.fire(); + const g = d.range.startLineNumber; + const p = d.range.endLineNumber; + const b = p - g; + const v = h; + const y = Math.min(b, v); + const w = v - b; + const C = r - l - w + g; + const S = C; + const x = C + v; + const k = this.$.getInjectedTextInInterval(this, this.getOffsetAt(new je(S, 1)), this.getOffsetAt(new je(x, this.getLineMaxColumn(x))), 0); + const E = k4.fromDecorations(k); + const D = new EL(E); + for (let P = y; P >= 0; P--) { + const R = g + P; + const L = C + P; + D.takeFromEndWhile(O => O.lineNumber > L); + const F = D.takeFromEndWhile(O => O.lineNumber === L); + a.push(new d7t(R, this.getLineContent(L), F)); + } + if (y < b) { + const P = g + y; + a.push(new Yss(P + 1, p)); + } + if (y < v) { + const P = new EL(E); + const R = g + y; + const L = v - y; + const F = r - l - L + R + 1; + const O = []; + const U = []; + for (let j = 0; j < L; j++) { + const ie = F + j; + U[j] = this.getLineContent(ie); + P.takeWhile(ee => ee.lineNumber < ie); + O[j] = P.takeWhile(ee => ee.lineNumber === ie); + } + a.push(new Xss(R + 1, g + v, U, O)); + } + l += w; + } + this.ob(new $pe(a, this.getVersionId(), this.R, this.S), { + changes: o, + eol: this.z.getEOL(), + isEolChange: false, + versionId: this.getVersionId(), + isUndoing: this.R, + isRedoing: this.S, + isFlush: false + }); + } + if (n.reverseEdits === null) { + return undefined; + } else { + return n.reverseEdits; + } + } + undo() { + return this.fb.undo(this.uri); + } + canUndo() { + return this.fb.canUndo(this.uri); + } + redo() { + return this.fb.redo(this.uri); + } + canRedo() { + return this.fb.canRedo(this.uri); + } + Db(e) { + if (e === null || e.size === 0) { + return; + } + const s = Array.from(e).map(n => new d7t(n, this.getLineContent(n), this.Fb(n))); + this.s.fire(new h7t(s)); + } + changeDecorations(e, t = 0) { + this.nb(); + try { + this.h.beginDeferredEmit(); + return this.Eb(t, e); + } finally { + this.h.endDeferredEmit(); + } + } + Eb(e, t) { + const s = { + addDecoration: (r, o) => this.Jb(e, [], [{ + range: r, + options: o + }])[0], + changeDecoration: (r, o) => { + this.Hb(r, o); + }, + changeDecorationOptions: (r, o) => { + this.Ib(r, Nos(o)); + }, + removeDecoration: r => { + this.Jb(e, [r], []); + }, + deltaDecorations: (r, o) => r.length === 0 && o.length === 0 ? [] : this.Jb(e, r, o) + }; + let n = null; + try { + n = t(s); + } catch (r) { + xs(r); + } + s.addDecoration = lie; + s.changeDecoration = lie; + s.changeDecorationOptions = lie; + s.removeDecoration = lie; + s.deltaDecorations = lie; + return n; + } + deltaDecorations(e, t, s = 0) { + this.nb(); + e ||= []; + if (e.length === 0 && t.length === 0) { + return []; + } + try { + this.X++; + if (this.X > 1) { + console.warn("Invoking deltaDecorations recursively could lead to leaking decorations."); + xs(new Error("Invoking deltaDecorations recursively could lead to leaking decorations.")); + } + this.h.beginDeferredEmit(); + return this.Jb(s, e, t); + } finally { + this.h.endDeferredEmit(); + this.X--; + } + } + _getTrackedRange(e) { + return this.getDecorationRange(e); + } + _setTrackedRange(e, t, s) { + const n = e ? this.Z[e] : null; + if (!n) { + if (t) { + return this.Jb(0, [], [{ + range: t, + options: $Ut[s] + }], true)[0]; + } else { + return null; + } + } + if (!t) { + this.$.delete(n); + delete this.Z[n.id]; + return null; + } + const r = this._validateRangeRelaxedNoAllocations(t); + const o = this.z.getOffsetAt(r.startLineNumber, r.startColumn); + const a = this.z.getOffsetAt(r.endLineNumber, r.endColumn); + this.$.delete(n); + n.reset(this.getVersionId(), o, a, r); + n.setOptions($Ut[s]); + this.$.insert(n); + return n.id; + } + removeAllDecorationsWithOwnerId(e) { + if (this.H) { + return; + } + const t = this.$.collectNodesFromOwner(e); + for (let s = 0, n = t.length; s < n; s++) { + const r = t[s]; + this.$.delete(r); + delete this.Z[r.id]; + } + } + getDecorationOptions(e) { + const t = this.Z[e]; + if (t) { + return t.options; + } else { + return null; + } + } + getDecorationRange(e) { + const t = this.Z[e]; + if (t) { + return this.$.getNodeRange(this, t); + } else { + return null; + } + } + getLineDecorations(e, t = 0, s = false) { + if (e < 1 || e > this.getLineCount()) { + return []; + } else { + return this.getLinesDecorations(e, e, t, s); + } + } + getLinesDecorations(e, t, s = 0, n = false, r = false) { + const o = this.getLineCount(); + const a = Math.min(o, Math.max(1, e)); + const l = Math.min(o, Math.max(1, t)); + const c = this.getLineMaxColumn(l); + const u = new Z(a, 1, l, c); + const d = this.Gb(u, s, n, r); + WBt(d, this.ab.getDecorationsInRange(u, s, n)); + return d; + } + getDecorationsInRange(e, t = 0, s = false, n = false, r = false) { + const o = this.validateRange(e); + const a = this.Gb(o, t, s, r); + WBt(a, this.ab.getDecorationsInRange(o, t, s, n)); + return a; + } + getOverviewRulerDecorations(e = 0, t = false) { + return this.$.getAll(this, e, t, true, false); + } + getInjectedTextDecorations(e = 0) { + return this.$.getAllInjectedText(this, e); + } + Fb(e) { + const t = this.z.getOffsetAt(e, 1); + const s = t + this.z.getLineLength(e); + const n = this.$.getInjectedTextInInterval(this, t, s, 0); + return k4.fromDecorations(n).filter(r => r.lineNumber === e); + } + getAllDecorations(e = 0, t = false) { + let s = this.$.getAll(this, e, t, false, false); + s = s.concat(this.ab.getAllDecorations(e, t)); + return s; + } + getAllMarginDecorations(e = 0) { + return this.$.getAll(this, e, false, false, true); + } + Gb(e, t, s, n) { + const r = this.z.getOffsetAt(e.startLineNumber, e.startColumn); + const o = this.z.getOffsetAt(e.endLineNumber, e.endColumn); + return this.$.getAllInInterval(this, r, o, t, s, n); + } + getRangeAt(e, t) { + return this.z.getRangeAt(e, t - e); + } + Hb(e, t) { + const s = this.Z[e]; + if (!s) { + return; + } + if (s.options.after) { + const a = this.getDecorationRange(e); + this.h.recordLineAffectedByInjectedText(a.endLineNumber); + } + if (s.options.before) { + const a = this.getDecorationRange(e); + this.h.recordLineAffectedByInjectedText(a.startLineNumber); + } + const n = this._validateRangeRelaxedNoAllocations(t); + const r = this.z.getOffsetAt(n.startLineNumber, n.startColumn); + const o = this.z.getOffsetAt(n.endLineNumber, n.endColumn); + this.$.delete(s); + s.reset(this.getVersionId(), r, o, n); + this.$.insert(s); + this.h.checkAffectedAndFire(s.options); + if (s.options.after) { + this.h.recordLineAffectedByInjectedText(n.endLineNumber); + } + if (s.options.before) { + this.h.recordLineAffectedByInjectedText(n.startLineNumber); + } + } + Ib(e, t) { + const s = this.Z[e]; + if (!s) { + return; + } + const n = !!s.options.overviewRuler && !!s.options.overviewRuler.color; + const r = !!t.overviewRuler && !!t.overviewRuler.color; + this.h.checkAffectedAndFire(s.options); + this.h.checkAffectedAndFire(t); + if (s.options.after || t.after) { + const l = this.$.getNodeRange(this, s); + this.h.recordLineAffectedByInjectedText(l.endLineNumber); + } + if (s.options.before || t.before) { + const l = this.$.getNodeRange(this, s); + this.h.recordLineAffectedByInjectedText(l.startLineNumber); + } + const o = n !== r; + const a = sXn(t) !== Hlt(s); + if (o || a) { + this.$.delete(s); + s.setOptions(t); + this.$.insert(s); + } else { + s.setOptions(t); + } + } + Jb(e, t, s, n = false) { + const r = this.getVersionId(); + const o = t.length; + let a = 0; + const l = s.length; + let c = 0; + this.h.beginDeferredEmit(); + try { + const u = new Array(l); + while (a < o || c < l) { + let d = null; + if (a < o) { + do { + d = this.Z[t[a++]]; + } while (!d && a < o); + if (d) { + if (d.options.after) { + const h = this.$.getNodeRange(this, d); + this.h.recordLineAffectedByInjectedText(h.endLineNumber); + } + if (d.options.before) { + const h = this.$.getNodeRange(this, d); + this.h.recordLineAffectedByInjectedText(h.startLineNumber); + } + this.$.delete(d); + if (!n) { + this.h.checkAffectedAndFire(d.options); + } + } + } + if (c < l) { + if (!d) { + const y = ++this.Y; + const w = `${this.W};${y}`; + d = new flt(w, 0, 0); + this.Z[w] = d; + } + const h = s[c]; + const g = this._validateRangeRelaxedNoAllocations(h.range); + const p = Nos(h.options); + const b = this.z.getOffsetAt(g.startLineNumber, g.startColumn); + const v = this.z.getOffsetAt(g.endLineNumber, g.endColumn); + d.ownerId = e; + d.reset(r, b, v, g); + d.setOptions(p); + if (d.options.after) { + this.h.recordLineAffectedByInjectedText(g.endLineNumber); + } + if (d.options.before) { + this.h.recordLineAffectedByInjectedText(g.startLineNumber); + } + if (!n) { + this.h.checkAffectedAndFire(p); + } + this.$.insert(d); + u[c] = d.id; + c++; + } else if (d) { + delete this.Z[d.id]; + } + } + return u; + } finally { + this.h.endDeferredEmit(); + } + } + getLanguageId() { + return this.tokenization.getLanguageId(); + } + setLanguage(e, t) { + if (typeof e == "string") { + this.G.clear(); + this.Kb(e, t); + } else { + this.G.value = e.onDidChange(() => this.Kb(e.languageId, t)); + this.Kb(e.languageId, t); + } + } + Kb(e, t) { + this.tokenization.setLanguageId(e, t); + this.gb.requestRichLanguageFeatures(e); + } + getLanguageIdAtPosition(e, t) { + return this.tokenization.getLanguageIdAtPosition(e, t); + } + getWordAtPosition(e) { + return this.bb.getWordAtPosition(e); + } + getTokenTypeAtPosition_DANGEROUS_BECAUSE_COSTS_1_MS(e) { + const t = this.bb.getLineTokens(e.lineNumber); + const s = t.findTokenIndexAtOffset(e.column - 1); + return t.getStandardTokenType(s); + } + getWordUntilPosition(e) { + return this.bb.getWordUntilPosition(e); + } + getWordsUntilPosition(e) { + return this.bb.getWordsUntilPosition(e); + } + normalizePosition(e, t) { + return e; + } + getLineIndentColumn(e) { + return Ros(this.getLineContent(e)) + 1; + } + }; + JI = pz = __decorate([__param(4, Hh), __param(5, As), __param(6, Lu), __param(7, Rx), __param(8, re), __param(9, $s), __param(10, gt)], JI); + MUt = class { + constructor() { + this.a = new qpe(); + this.b = new qpe(); + this.d = new qpe(); + } + ensureAllNodesHaveRanges(i) { + this.getAll(i, 0, false, false, false); + } + f(i, e) { + for (const t of e) { + if (t.range === null) { + t.range = i.getRangeAt(t.cachedAbsoluteStart, t.cachedAbsoluteEnd); + } + } + return e; + } + getAllInInterval(i, e, t, s, n, r) { + const o = i.getVersionId(); + const a = this.g(e, t, s, n, o, r); + return this.f(i, a); + } + g(i, e, t, s, n, r) { + const o = this.a.intervalSearch(i, e, t, s, n, r); + const a = this.b.intervalSearch(i, e, t, s, n, r); + const l = this.d.intervalSearch(i, e, t, s, n, r); + return o.concat(a).concat(l); + } + getInjectedTextInInterval(i, e, t, s) { + const n = i.getVersionId(); + const r = this.d.intervalSearch(e, t, s, false, n, false); + return this.f(i, r).filter(o => o.options.showIfCollapsed || !o.range.isEmpty()); + } + getAllInjectedText(i, e) { + const t = i.getVersionId(); + const s = this.d.search(e, false, t, false); + return this.f(i, s).filter(n => n.options.showIfCollapsed || !n.range.isEmpty()); + } + getAll(i, e, t, s, n) { + const r = i.getVersionId(); + const o = this.h(e, t, s, r, n); + return this.f(i, o); + } + h(i, e, t, s, n) { + if (t) { + return this.b.search(i, e, s, n); + } + { + const r = this.a.search(i, e, s, n); + const o = this.b.search(i, e, s, n); + const a = this.d.search(i, e, s, n); + return r.concat(o).concat(a); + } + } + collectNodesFromOwner(i) { + const e = this.a.collectNodesFromOwner(i); + const t = this.b.collectNodesFromOwner(i); + const s = this.d.collectNodesFromOwner(i); + return e.concat(t).concat(s); + } + collectNodesPostOrder() { + const i = this.a.collectNodesPostOrder(); + const e = this.b.collectNodesPostOrder(); + const t = this.d.collectNodesPostOrder(); + return i.concat(e).concat(t); + } + insert(i) { + if (Hlt(i)) { + this.d.insert(i); + } else if (NUt(i)) { + this.b.insert(i); + } else { + this.a.insert(i); + } + } + delete(i) { + if (Hlt(i)) { + this.d.delete(i); + } else if (NUt(i)) { + this.b.delete(i); + } else { + this.a.delete(i); + } + } + getNodeRange(i, e) { + const t = i.getVersionId(); + if (e.cachedVersionId !== t) { + this.k(e, t); + } + if (e.range === null) { + e.range = i.getRangeAt(e.cachedAbsoluteStart, e.cachedAbsoluteEnd); + } + return e.range; + } + k(i, e) { + if (Hlt(i)) { + this.d.resolveNode(i, e); + } else if (NUt(i)) { + this.b.resolveNode(i, e); + } else { + this.a.resolveNode(i, e); + } + } + acceptReplace(i, e, t, s) { + this.a.acceptReplace(i, e, t, s); + this.b.acceptReplace(i, e, t, s); + this.d.acceptReplace(i, e, t, s); + } + }; + AUt = class { + constructor(i) { + this.color = i.color || ""; + this.darkColor = i.darkColor || ""; + } + }; + Oos = class extends AUt { + constructor(i) { + super(i); + this.a = null; + this.position = typeof i.position == "number" ? i.position : Zd.Center; + } + getColor(i) { + if (!this.a) { + if (i.type !== "light" && this.darkColor) { + this.a = this.b(this.darkColor, i); + } else { + this.a = this.b(this.color, i); + } + } + return this.a; + } + invalidateCachedColor() { + this.a = null; + } + b(i, e) { + if (typeof i == "string") { + return i; + } + const t = i ? e.getColor(i.id) : null; + if (t) { + return t.toString(); + } else { + return ""; + } + } + }; + _os = class { + constructor(i) { + this.position = i?.position ?? Dx.Center; + this.persistLane = i?.persistLane; + } + }; + Bos = class extends AUt { + constructor(i) { + super(i); + this.position = i.position; + this.sectionHeaderStyle = i.sectionHeaderStyle ?? null; + this.sectionHeaderText = i.sectionHeaderText ?? null; + } + getColor(i) { + if (!this.a) { + if (i.type !== "light" && this.darkColor) { + this.a = this.b(this.darkColor, i); + } else { + this.a = this.b(this.color, i); + } + } + return this.a; + } + invalidateCachedColor() { + this.a = undefined; + } + b(i, e) { + if (typeof i == "string") { + return ut.fromHex(i); + } else { + return e.getColor(i.id); + } + } + }; + cie = class H3i { + static from(e) { + if (e instanceof H3i) { + return e; + } else { + return new H3i(e); + } + } + constructor(e) { + this.content = e.content || ""; + this.tokens = e.tokens ?? null; + this.inlineClassName = e.inlineClassName || null; + this.inlineClassNameAffectsLetterSpacing = e.inlineClassNameAffectsLetterSpacing || false; + this.attachedData = e.attachedData || null; + this.cursorStops = e.cursorStops || null; + } + }; + Cr = class q3i { + static register(e) { + return new q3i(e); + } + static createDynamic(e) { + return new q3i(e); + } + constructor(e) { + this.description = e.description; + this.blockClassName = e.blockClassName ? wF(e.blockClassName) : null; + this.blockDoesNotCollapse = e.blockDoesNotCollapse ?? null; + this.blockIsAfterEnd = e.blockIsAfterEnd ?? null; + this.blockPadding = e.blockPadding ?? null; + this.stickiness = e.stickiness || 0; + this.zIndex = e.zIndex || 0; + this.className = e.className ? wF(e.className) : null; + this.shouldFillLineOnLineBreak = e.shouldFillLineOnLineBreak ?? null; + this.hoverMessage = e.hoverMessage || null; + this.glyphMarginHoverMessage = e.glyphMarginHoverMessage || null; + this.lineNumberHoverMessage = e.lineNumberHoverMessage || null; + this.isWholeLine = e.isWholeLine || false; + this.showIfCollapsed = e.showIfCollapsed || false; + this.collapseOnReplaceEdit = e.collapseOnReplaceEdit || false; + this.overviewRuler = e.overviewRuler ? new Oos(e.overviewRuler) : null; + this.minimap = e.minimap ? new Bos(e.minimap) : null; + this.glyphMargin = e.glyphMarginClassName ? new _os(e.glyphMargin) : null; + this.glyphMarginClassName = e.glyphMarginClassName ? wF(e.glyphMarginClassName) : null; + this.linesDecorationsClassName = e.linesDecorationsClassName ? wF(e.linesDecorationsClassName) : null; + this.lineNumberClassName = e.lineNumberClassName ? wF(e.lineNumberClassName) : null; + this.linesDecorationsTooltip = e.linesDecorationsTooltip ? qVn(e.linesDecorationsTooltip) : null; + this.firstLineDecorationClassName = e.firstLineDecorationClassName ? wF(e.firstLineDecorationClassName) : null; + this.marginClassName = e.marginClassName ? wF(e.marginClassName) : null; + this.inlineClassName = e.inlineClassName ? wF(e.inlineClassName) : null; + this.inlineClassNameAffectsLetterSpacing = e.inlineClassNameAffectsLetterSpacing || false; + this.beforeContentClassName = e.beforeContentClassName ? wF(e.beforeContentClassName) : null; + this.afterContentClassName = e.afterContentClassName ? wF(e.afterContentClassName) : null; + this.after = e.after ? cie.from(e.after) : null; + this.before = e.before ? cie.from(e.before) : null; + this.hideInCommentTokens = e.hideInCommentTokens ?? false; + this.hideInStringTokens = e.hideInStringTokens ?? false; + } + }; + Cr.EMPTY = Cr.register({ + description: "empty" + }); + $Ut = [Cr.register({ + description: "tracked-range-always-grows-when-typing-at-edges", + stickiness: 0 + }), Cr.register({ + description: "tracked-range-never-grows-when-typing-at-edges", + stickiness: 1 + }), Cr.register({ + description: "tracked-range-grows-only-when-typing-before", + stickiness: 2 + }), Cr.register({ + description: "tracked-range-grows-only-when-typing-after", + stickiness: 3 + })]; + Uos = class extends H { + constructor(i) { + super(); + this.u = i; + this.a = this.D(new B()); + this.event = this.a.event; + this.n = null; + this.b = 0; + this.f = false; + this.g = false; + this.h = false; + this.q = false; + this.s = false; + } + hasListeners() { + return this.a.hasListeners(); + } + beginDeferredEmit() { + this.b++; + } + endDeferredEmit() { + this.b--; + if (this.b === 0) { + if (this.f) { + this.y(); + } + this.n?.clear(); + this.n = null; + } + } + recordLineAffectedByInjectedText(i) { + this.n ||= new Set(); + this.n.add(i); + } + checkAffectedAndFire(i) { + this.g ||= !!i.minimap?.position; + this.h ||= !!i.overviewRuler?.color; + this.q ||= !!i.glyphMarginClassName; + this.s ||= !!i.lineNumberClassName; + this.w(); + } + fire() { + this.g = true; + this.h = true; + this.q = true; + this.w(); + } + w() { + if (this.b === 0) { + this.y(); + } else { + this.f = true; + } + } + y() { + this.u(this.n); + const i = { + affectsMinimap: this.g, + affectsOverviewRuler: this.h, + affectsGlyphMargin: this.q, + affectsLineNumber: this.s + }; + this.f = false; + this.g = false; + this.h = false; + this.q = false; + this.a.fire(i); + } + }; + Wos = class extends H { + constructor() { + super(); + this.a = this.D(new B()); + this.fastEvent = this.a.event; + this.b = this.D(new B()); + this.slowEvent = this.b.event; + this.f = 0; + this.g = null; + } + hasListeners() { + return this.a.hasListeners() || this.b.hasListeners(); + } + beginDeferredEmit() { + this.f++; + } + endDeferredEmit(i = null) { + this.f--; + if (this.f === 0 && this.g !== null) { + this.g.rawContentChangedEvent.resultingSelection = i; + const e = this.g; + this.g = null; + this.a.fire(e); + this.b.fire(e); + } + } + fire(i) { + if (this.f > 0) { + if (this.g) { + this.g = this.g.merge(i); + } else { + this.g = i; + } + return; + } + this.a.fire(i); + this.b.fire(i); + } + }; + Vos = class { + constructor(i) { + this.a = i; + } + }; + } +}); +var nn; +var Tr = ue({ + "out-build/vs/editor/common/services/languageFeatures.js"() { + "use strict"; + + te(); + nn = Ve("ILanguageFeaturesService"); + } +}); +function nXn(i, e, t, s, n, r, o, a) { + if (n === -1) { + return null; + } + const l = t.length; + if (l <= 1) { + return null; + } + const c = a === "keepAll"; + const u = e.breakOffsets; + const d = e.breakOffsetsVisibleColumn; + const h = qos(t, s, n, r, o); + const g = n - h; + const p = qlt; + const b = jlt; + let v = 0; + let y = 0; + let w = 0; + let C = n; + const S = u.length; + let x = 0; + if (x >= 0) { + let k = Math.abs(d[x] - C); + while (x + 1 < S) { + const E = Math.abs(d[x + 1] - C); + if (E >= k) { + break; + } + k = E; + x++; + } + } + while (x < S) { + let k = x < 0 ? 0 : u[x]; + let E = x < 0 ? 0 : d[x]; + if (y > k) { + k = y; + E = w; + } + let D = 0; + let P = 0; + let R = 0; + let L = 0; + if (E <= C) { + let O = E; + let U = k === 0 ? 0 : t.charCodeAt(k - 1); + let j = k === 0 ? 0 : i.get(U); + let ie = true; + for (let ee = k; ee < l; ee++) { + const ne = ee; + const be = t.charCodeAt(ee); + let ge; + let ce; + if (jb(be)) { + ee++; + ge = 0; + ce = 2; + } else { + ge = i.get(be); + ce = gme(be, O, s, r); + } + if (ne > y && FUt(U, j, be, ge, c)) { + D = ne; + P = O; + } + O += ce; + if (O > C) { + if (ne > y) { + R = ne; + L = O - ce; + } else { + R = ee + 1; + L = O; + } + if (O - P > g) { + D = 0; + } + ie = false; + break; + } + U = be; + j = ge; + } + if (ie) { + if (v > 0) { + p[v] = u[u.length - 1]; + b[v] = d[u.length - 1]; + v++; + } + break; + } + } + if (D === 0) { + let O = E; + let U = t.charCodeAt(k); + let j = i.get(U); + let ie = false; + for (let ee = k - 1; ee >= y; ee--) { + const ne = ee + 1; + const be = t.charCodeAt(ee); + if (be === 9) { + ie = true; + break; + } + let ge; + let ce; + if (_q(be)) { + ee--; + ge = 0; + ce = 2; + } else { + ge = i.get(be); + ce = i9(be) ? r : 1; + } + if (O <= C) { + if (R === 0) { + R = ne; + L = O; + } + if (O <= C - g) { + break; + } + if (FUt(be, ge, U, j, c)) { + D = ne; + P = O; + break; + } + } + O -= ce; + U = be; + j = ge; + } + if (D !== 0) { + const ee = g - (L - P); + if (ee <= s) { + const ne = t.charCodeAt(R); + let be; + if (jb(ne)) { + be = 2; + } else { + be = gme(ne, L, s, r); + } + if (ee - be < 0) { + D = 0; + } + } + } + if (ie) { + x--; + continue; + } + } + if (D === 0) { + D = R; + P = L; + } + if (D <= y) { + const O = t.charCodeAt(y); + if (jb(O)) { + D = y + 2; + P = w + 2; + } else { + D = y + 1; + P = w + gme(O, w, s, r); + } + } + y = D; + p[v] = D; + w = P; + b[v] = P; + v++; + C = P + g; + while (x < 0 || x < S && d[x] < P) { + x++; + } + let F = Math.abs(d[x] - C); + while (x + 1 < S) { + const O = Math.abs(d[x + 1] - C); + if (O >= F) { + break; + } + F = O; + x++; + } + } + if (v === 0) { + return null; + } else { + p.length = v; + b.length = v; + qlt = e.breakOffsets; + jlt = e.breakOffsetsVisibleColumn; + e.breakOffsets = p; + e.breakOffsetsVisibleColumn = b; + e.wrappedTextIndentLength = h; + return e; + } +} +function rXn(i, e, t, s, n, r, o, a) { + const l = k4.applyInjectedText(e, t); + let c; + let u; + if (t && t.length > 0) { + c = t.map(P => P.options); + u = t.map(P => P.column - 1); + } else { + c = null; + u = null; + } + if (n === -1) { + if (c) { + return new Ute(u, c, [l.length], [], 0); + } else { + return null; + } + } + const d = l.length; + if (d <= 1) { + if (c) { + return new Ute(u, c, [l.length], [], 0); + } else { + return null; + } + } + const h = a === "keepAll"; + const g = qos(l, s, n, r, o); + const p = n - g; + const b = []; + const v = []; + let y = 0; + let w = 0; + let C = 0; + let S = n; + let x = l.charCodeAt(0); + let k = i.get(x); + let E = gme(x, 0, s, r); + let D = 1; + if (jb(x)) { + E += 1; + x = l.charCodeAt(1); + k = i.get(x); + D++; + } + for (let P = D; P < d; P++) { + const R = P; + const L = l.charCodeAt(P); + let F; + let O; + if (jb(L)) { + P++; + F = 0; + O = 2; + } else { + F = i.get(L); + O = gme(L, E, s, r); + } + if (FUt(x, k, L, F, h)) { + w = R; + C = E; + } + E += O; + if (E > S) { + if (w === 0 || E - C > p) { + w = R; + C = E - O; + } + b[y] = w; + v[y] = C; + y++; + S = C + p; + w = 0; + } + x = L; + k = F; + } + if (y === 0 && (!t || t.length === 0)) { + return null; + } else { + b[y] = d; + v[y] = E; + return new Ute(u, c, b, v, g); + } +} +function gme(i, e, t, s) { + if (i === 9) { + return t - e % t; + } else if (i9(i) || i < 32) { + return s; + } else { + return 1; + } +} +function Hos(i, e) { + return e - i % e; +} +function FUt(i, e, t, s, n) { + return t !== 32 && (e === 2 && s !== 2 || e !== 1 && s === 1 || !n && e === 3 && s !== 2 || !n && s === 3 && e !== 1); +} +function qos(i, e, t, s, n) { + let r = 0; + if (n !== 0) { + const o = B0(i); + if (o !== -1) { + for (let l = 0; l < o; l++) { + const c = i.charCodeAt(l) === 9 ? Hos(r, e) : 1; + r += c; + } + const a = n === 3 ? 2 : n === 2 ? 1 : 0; + for (let l = 0; l < a; l++) { + const c = Hos(r, e); + r += c; + } + if (r + s > t) { + r = 0; + } + } + } + return r; +} +var jos; +var zos; +var Jos; +var qlt; +var jlt; +var oXn = ue({ + "out-build/vs/editor/common/viewModel/monospaceLineBreaksComputer.js"() { + "use strict"; + + $i(); + Ree(); + Kj(); + Jss(); + jos = class fOn { + static create(e) { + return new fOn(e.get(139), e.get(138)); + } + constructor(e, t) { + this.a = new Jos(e, t); + } + createLineBreaksComputer(e, t, s, n, r) { + const o = []; + const a = []; + const l = []; + return { + addRequest: (c, u, d) => { + o.push(c); + a.push(u); + l.push(d); + }, + finalize: () => { + const c = e.typicalFullwidthCharacterWidth / e.typicalHalfwidthCharacterWidth; + const u = []; + for (let d = 0, h = o.length; d < h; d++) { + const g = a[d]; + const p = l[d]; + if (p && !p.injectionOptions && !g) { + u[d] = nXn(this.a, p, o[d], t, s, c, n, r); + } else { + u[d] = rXn(this.a, o[d], g, t, s, c, n, r); + } + } + qlt.length = 0; + jlt.length = 0; + return u; + } + }; + } + }; + (function (i) { + i[i.NONE = 0] = "NONE"; + i[i.BREAK_BEFORE = 1] = "BREAK_BEFORE"; + i[i.BREAK_AFTER = 2] = "BREAK_AFTER"; + i[i.BREAK_IDEOGRAPHIC = 3] = "BREAK_IDEOGRAPHIC"; + })(zos ||= {}); + Jos = class extends Cge { + constructor(i, e) { + super(0); + for (let t = 0; t < i.length; t++) { + this.set(i.charCodeAt(t), 1); + } + for (let t = 0; t < e.length; t++) { + this.set(e.charCodeAt(t), 2); + } + } + get(i) { + if (i >= 0 && i < 256) { + return this.a[i]; + } else if (i >= 12352 && i <= 12543 || i >= 13312 && i <= 19903 || i >= 19968 && i <= 40959) { + return 3; + } else { + return this.b.get(i) || this.c; + } + } + }; + qlt = []; + jlt = []; + } +}); +var OUt; +var aXn = ue({ + "out-build/vs/editor/common/cursor/oneCursor.js"() { + "use strict"; + + kI(); + Rs(); + yt(); + ua(); + OUt = class gOn { + constructor(e) { + this.a = null; + this.b = true; + this.g(e, new zC(new Z(1, 1, 1, 1), 0, 0, new je(1, 1), 0), new zC(new Z(1, 1, 1, 1), 0, 0, new je(1, 1), 0)); + } + dispose(e) { + this.d(e); + } + startTrackingSelection(e) { + this.b = true; + this.c(e); + } + stopTrackingSelection(e) { + this.b = false; + this.d(e); + } + c(e) { + if (this.b) { + this.a = e.model._setTrackedRange(this.a, this.modelState.selection, 0); + } + } + d(e) { + this.a = e.model._setTrackedRange(this.a, null, 0); + } + asCursorState() { + return new fc(this.modelState, this.viewState); + } + readSelectionFromMarkers(e) { + const t = e.model._getTrackedRange(this.a); + if (this.modelState.selection.isEmpty() && !t.isEmpty()) { + return Vs.fromRange(t.collapseToEnd(), this.modelState.selection.getDirection()); + } else { + return Vs.fromRange(t, this.modelState.selection.getDirection()); + } + } + ensureValidState(e) { + this.g(e, this.modelState, this.viewState); + } + setState(e, t, s) { + this.g(e, t, s); + } + static e(e, t, s, n) { + if (t.equals(s)) { + return n; + } else { + return e.normalizePosition(t, 2); + } + } + static f(e, t) { + const s = t.position; + const n = t.selectionStart.getStartPosition(); + const r = t.selectionStart.getEndPosition(); + const o = e.normalizePosition(s, 2); + const a = this.e(e, n, s, o); + const l = this.e(e, r, n, a); + if (s.equals(o) && n.equals(a) && r.equals(l)) { + return t; + } else { + return new zC(Z.fromPositions(a, l), t.selectionStartKind, t.selectionStartLeftoverVisibleColumns + n.column - a.column, o, t.leftoverVisibleColumns + s.column - o.column); + } + } + g(e, t, s) { + s &&= gOn.f(e.viewModel, s); + if (t) { + const n = e.model.validateRange(t.selectionStart); + const r = t.selectionStart.equalsRange(n) ? t.selectionStartLeftoverVisibleColumns : 0; + const o = e.model.validatePosition(t.position); + const a = t.position.equals(o) ? t.leftoverVisibleColumns : 0; + t = new zC(n, t.selectionStartKind, r, o, a); + } else { + if (!s) { + return; + } + const n = e.model.validateRange(e.coordinatesConverter.convertViewRangeToModelRange(s.selectionStart)); + const r = e.model.validatePosition(e.coordinatesConverter.convertViewPositionToModelPosition(s.position)); + t = new zC(n, s.selectionStartKind, s.selectionStartLeftoverVisibleColumns, r, s.leftoverVisibleColumns); + } + if (s) { + const n = e.coordinatesConverter.validateViewRange(s.selectionStart, t.selectionStart); + const r = e.coordinatesConverter.validateViewPosition(s.position, t.position); + s = new zC(n, t.selectionStartKind, t.selectionStartLeftoverVisibleColumns, r, t.leftoverVisibleColumns); + } else { + const n = e.coordinatesConverter.convertModelPositionToViewPosition(new je(t.selectionStart.startLineNumber, t.selectionStart.startColumn)); + const r = e.coordinatesConverter.convertModelPositionToViewPosition(new je(t.selectionStart.endLineNumber, t.selectionStart.endColumn)); + const o = new Z(n.lineNumber, n.column, r.lineNumber, r.column); + const a = e.coordinatesConverter.convertModelPositionToViewPosition(t.position); + s = new zC(o, t.selectionStartKind, t.selectionStartLeftoverVisibleColumns, a, t.leftoverVisibleColumns); + } + this.modelState = t; + this.viewState = s; + this.c(e); + } + }; + } +}); +var _Ut; +var lXn = ue({ + "out-build/vs/editor/common/cursor/cursorCollection.js"() { + "use strict"; + + Jt(); + qg(); + kI(); + aXn(); + Rs(); + yt(); + ua(); + _Ut = class { + constructor(i) { + this.a = i; + this.b = [new OUt(i)]; + this.d = 0; + } + dispose() { + for (const i of this.b) { + i.dispose(this.a); + } + } + startTrackingSelections() { + for (const i of this.b) { + i.startTrackingSelection(this.a); + } + } + stopTrackingSelections() { + for (const i of this.b) { + i.stopTrackingSelection(this.a); + } + } + updateContext(i) { + this.a = i; + } + ensureValidState() { + for (const i of this.b) { + i.ensureValidState(this.a); + } + } + readSelectionFromMarkers() { + return this.b.map(i => i.readSelectionFromMarkers(this.a)); + } + getAll() { + return this.b.map(i => i.asCursorState()); + } + getViewPositions() { + return this.b.map(i => i.viewState.position); + } + getTopMostViewPosition() { + return ZHi(this.b, jg(i => i.viewState.position, je.compare)).viewState.position; + } + getBottomMostViewPosition() { + return IVn(this.b, jg(i => i.viewState.position, je.compare)).viewState.position; + } + getSelections() { + return this.b.map(i => i.modelState.selection); + } + getViewSelections() { + return this.b.map(i => i.viewState.selection); + } + setSelections(i) { + this.setStates(fc.fromModelSelections(i)); + } + getPrimaryCursor() { + return this.b[0].asCursorState(); + } + setStates(i) { + if (i !== null) { + this.b[0].setState(this.a, i[0].modelState, i[0].viewState); + this.e(i.slice(1)); + } + } + e(i) { + const e = this.b.length - 1; + const t = i.length; + if (e < t) { + const s = t - e; + for (let n = 0; n < s; n++) { + this.f(); + } + } else if (e > t) { + const s = e - t; + for (let n = 0; n < s; n++) { + this.g(this.b.length - 2); + } + } + for (let s = 0; s < t; s++) { + this.b[s + 1].setState(this.a, i[s].modelState, i[s].viewState); + } + } + killSecondaryCursors() { + this.e([]); + } + f() { + this.b.push(new OUt(this.a)); + this.d = this.b.length - 1; + } + getLastAddedCursorIndex() { + if (this.b.length === 1 || this.d === 0) { + return 0; + } else { + return this.d; + } + } + g(i) { + if (this.d >= i + 1) { + this.d--; + } + this.b[i + 1].dispose(this.a); + this.b.splice(i + 1, 1); + } + normalize() { + if (this.b.length === 1) { + return; + } + const i = this.b.slice(0); + const e = []; + for (let t = 0, s = i.length; t < s; t++) { + e.push({ + index: t, + selection: i[t].modelState.selection + }); + } + e.sort(jg(t => t.selection, Z.compareRangesUsingStarts)); + for (let t = 0; t < e.length - 1; t++) { + const s = e[t]; + const n = e[t + 1]; + const r = s.selection; + const o = n.selection; + if (!this.a.cursorConfig.multiCursorMergeOverlapping) { + continue; + } + let a; + if (o.isEmpty() || r.isEmpty()) { + a = o.getStartPosition().isBeforeOrEqual(r.getEndPosition()); + } else { + a = o.getStartPosition().isBefore(r.getEndPosition()); + } + if (a) { + const l = s.index < n.index ? t : t + 1; + const c = s.index < n.index ? t + 1 : t; + const u = e[c].index; + const d = e[l].index; + const h = e[c].selection; + const g = e[l].selection; + if (!h.equalsSelection(g)) { + const p = h.plusRange(g); + const b = h.selectionStartLineNumber === h.startLineNumber && h.selectionStartColumn === h.startColumn; + const v = g.selectionStartLineNumber === g.startLineNumber && g.selectionStartColumn === g.startColumn; + let y; + if (u === this.d) { + y = b; + this.d = d; + } else { + y = v; + } + let w; + if (y) { + w = new Vs(p.startLineNumber, p.startColumn, p.endLineNumber, p.endColumn); + } else { + w = new Vs(p.endLineNumber, p.endColumn, p.startLineNumber, p.startColumn); + } + e[l].selection = w; + const C = fc.fromModelSelection(w); + i[d].setState(this.a, C.modelState, C.viewState); + } + for (const p of e) { + if (p.index > u) { + p.index--; + } + } + i.splice(u, 1); + e.splice(c, 1); + this.g(u - 1); + t--; + } + } + } + }; + } +}); +var BUt; +var cXn = ue({ + "out-build/vs/editor/common/cursor/cursorContext.js"() { + "use strict"; + + BUt = class { + constructor(i, e, t, s) { + this._cursorContextBrand = undefined; + this.model = i; + this.viewModel = e; + this.coordinatesConverter = t; + this.cursorConfig = s; + } + }; + } +}); +var Gos; +var Kos; +var Yos; +var Xos; +var Qos; +var c7; +var pme; +var Zos; +var eas; +var mme; +var UUt; +var zlt; +var Jlt; +var tas; +var uie; +var ias; +var sas; +var nas; +var ras; +var oas; +var WUt = ue({ + "out-build/vs/editor/common/viewEvents.js"() { + "use strict"; + + (function (i) { + i[i.ViewCompositionStart = 0] = "ViewCompositionStart"; + i[i.ViewCompositionEnd = 1] = "ViewCompositionEnd"; + i[i.ViewConfigurationChanged = 2] = "ViewConfigurationChanged"; + i[i.ViewCursorStateChanged = 3] = "ViewCursorStateChanged"; + i[i.ViewDecorationsChanged = 4] = "ViewDecorationsChanged"; + i[i.ViewFlushed = 5] = "ViewFlushed"; + i[i.ViewFocusChanged = 6] = "ViewFocusChanged"; + i[i.ViewLanguageConfigurationChanged = 7] = "ViewLanguageConfigurationChanged"; + i[i.ViewLineMappingChanged = 8] = "ViewLineMappingChanged"; + i[i.ViewLinesChanged = 9] = "ViewLinesChanged"; + i[i.ViewLinesDeleted = 10] = "ViewLinesDeleted"; + i[i.ViewLinesInserted = 11] = "ViewLinesInserted"; + i[i.ViewRevealRangeRequest = 12] = "ViewRevealRangeRequest"; + i[i.ViewScrollChanged = 13] = "ViewScrollChanged"; + i[i.ViewThemeChanged = 14] = "ViewThemeChanged"; + i[i.ViewTokensChanged = 15] = "ViewTokensChanged"; + i[i.ViewTokensColorsChanged = 16] = "ViewTokensColorsChanged"; + i[i.ViewZonesChanged = 17] = "ViewZonesChanged"; + })(Gos ||= {}); + Kos = class { + constructor() { + this.type = 0; + } + }; + Yos = class { + constructor() { + this.type = 1; + } + }; + Xos = class { + constructor(i) { + this.type = 2; + this._source = i; + } + hasChanged(i) { + return this._source.hasChanged(i); + } + }; + Qos = class { + constructor(i, e, t) { + this.selections = i; + this.modelSelections = e; + this.reason = t; + this.type = 3; + } + }; + c7 = class { + constructor(i) { + this.type = 4; + if (i) { + this.affectsMinimap = i.affectsMinimap; + this.affectsOverviewRuler = i.affectsOverviewRuler; + this.affectsGlyphMargin = i.affectsGlyphMargin; + this.affectsLineNumber = i.affectsLineNumber; + } else { + this.affectsMinimap = true; + this.affectsOverviewRuler = true; + this.affectsGlyphMargin = true; + this.affectsLineNumber = true; + } + } + }; + pme = class { + constructor() { + this.type = 5; + } + }; + Zos = class { + constructor(i) { + this.type = 6; + this.isFocused = i; + } + }; + eas = class { + constructor() { + this.type = 7; + } + }; + mme = class { + constructor() { + this.type = 8; + } + }; + UUt = class { + constructor(i, e) { + this.fromLineNumber = i; + this.count = e; + this.type = 9; + } + }; + zlt = class { + constructor(i, e) { + this.type = 10; + this.fromLineNumber = i; + this.toLineNumber = e; + } + }; + Jlt = class { + constructor(i, e) { + this.type = 11; + this.fromLineNumber = i; + this.toLineNumber = e; + } + }; + (function (i) { + i[i.Simple = 0] = "Simple"; + i[i.Center = 1] = "Center"; + i[i.CenterIfOutsideViewport = 2] = "CenterIfOutsideViewport"; + i[i.Top = 3] = "Top"; + i[i.Bottom = 4] = "Bottom"; + i[i.NearTop = 5] = "NearTop"; + i[i.NearTopIfOutsideViewport = 6] = "NearTopIfOutsideViewport"; + })(tas ||= {}); + uie = class { + constructor(i, e, t, s, n, r, o) { + this.source = i; + this.minimalReveal = e; + this.range = t; + this.selections = s; + this.verticalType = n; + this.revealHorizontal = r; + this.scrollType = o; + this.type = 12; + } + }; + ias = class { + constructor(i) { + this.type = 13; + this.scrollWidth = i.scrollWidth; + this.scrollLeft = i.scrollLeft; + this.scrollHeight = i.scrollHeight; + this.scrollTop = i.scrollTop; + this.scrollWidthChanged = i.scrollWidthChanged; + this.scrollLeftChanged = i.scrollLeftChanged; + this.scrollHeightChanged = i.scrollHeightChanged; + this.scrollTopChanged = i.scrollTopChanged; + } + }; + sas = class { + constructor(i) { + this.theme = i; + this.type = 14; + } + }; + nas = class { + constructor(i) { + this.type = 15; + this.ranges = i; + } + }; + ras = class { + constructor() { + this.type = 16; + } + }; + oas = class { + constructor() { + this.type = 17; + } + }; + } +}); +var aas; +var OM; +var las; +var cas; +var uas; +var das; +var has; +var fas; +var gas; +var pas; +var mas; +var bas; +var vas; +var yas; +var was; +var Cas; +var Glt = ue({ + "out-build/vs/editor/common/viewModelEventDispatcher.js"() { + "use strict"; + + pe(); + q(); + aas = class extends H { + constructor() { + super(); + this.c = this.D(new B()); + this.onEvent = this.c.event; + this.f = []; + this.g = null; + this.h = false; + this.j = null; + this.m = 0; + this.n = []; + } + emitOutgoingEvent(i) { + this.q(i); + this.r(); + } + q(i) { + for (let e = 0, t = this.n.length; e < t; e++) { + const s = this.n[e].kind === i.kind ? this.n[e].attemptToMerge(i) : null; + if (s) { + this.n[e] = s; + return; + } + } + this.n.push(i); + } + r() { + while (this.n.length > 0) { + if (this.j || this.h) { + return; + } + const i = this.n.shift(); + if (!i.isNoOp()) { + this.c.fire(i); + } + } + } + addViewEventHandler(i) { + for (let e = 0, t = this.f.length; e < t; e++) { + if (this.f[e] === i) { + console.warn("Detected duplicate listener in ViewEventDispatcher", i); + } + } + this.f.push(i); + } + removeViewEventHandler(i) { + for (let e = 0; e < this.f.length; e++) { + if (this.f[e] === i) { + this.f.splice(e, 1); + break; + } + } + } + beginEmitViewEvents() { + this.m++; + if (this.m === 1) { + this.j = new OM(); + } + return this.j; + } + endEmitViewEvents() { + this.m--; + if (this.m === 0) { + const i = this.j.outgoingEvents; + const e = this.j.viewEvents; + this.j = null; + for (const t of i) { + this.q(t); + } + if (e.length > 0) { + this.s(e); + } + } + this.r(); + } + emitSingleViewEvent(i) { + try { + this.beginEmitViewEvents().emitViewEvent(i); + } finally { + this.endEmitViewEvents(); + } + } + s(i) { + if (this.g) { + this.g = this.g.concat(i); + } else { + this.g = i; + } + if (!this.h) { + this.t(); + } + } + t() { + try { + this.h = true; + this.u(); + } finally { + this.h = false; + } + } + u() { + while (this.g) { + const i = this.g; + this.g = null; + const e = this.f.slice(0); + for (const t of e) { + t.handleEvents(i); + } + } + } + }; + OM = class { + constructor() { + this.viewEvents = []; + this.outgoingEvents = []; + } + emitViewEvent(i) { + this.viewEvents.push(i); + } + emitOutgoingEvent(i) { + this.outgoingEvents.push(i); + } + }; + (function (i) { + i[i.ContentSizeChanged = 0] = "ContentSizeChanged"; + i[i.FocusChanged = 1] = "FocusChanged"; + i[i.ScrollChanged = 2] = "ScrollChanged"; + i[i.ViewZonesChanged = 3] = "ViewZonesChanged"; + i[i.HiddenAreasChanged = 4] = "HiddenAreasChanged"; + i[i.ReadOnlyEditAttempt = 5] = "ReadOnlyEditAttempt"; + i[i.CursorStateChanged = 6] = "CursorStateChanged"; + i[i.ModelDecorationsChanged = 7] = "ModelDecorationsChanged"; + i[i.ModelLanguageChanged = 8] = "ModelLanguageChanged"; + i[i.ModelLanguageConfigurationChanged = 9] = "ModelLanguageConfigurationChanged"; + i[i.ModelContentChanged = 10] = "ModelContentChanged"; + i[i.ModelOptionsChanged = 11] = "ModelOptionsChanged"; + i[i.ModelTokensChanged = 12] = "ModelTokensChanged"; + })(las ||= {}); + cas = class pOn { + constructor(e, t, s, n) { + this.kind = 0; + this.c = e; + this.d = t; + this.contentWidth = s; + this.contentHeight = n; + this.contentWidthChanged = this.c !== this.contentWidth; + this.contentHeightChanged = this.d !== this.contentHeight; + } + isNoOp() { + return !this.contentWidthChanged && !this.contentHeightChanged; + } + attemptToMerge(e) { + if (e.kind !== this.kind) { + return null; + } else { + return new pOn(this.c, this.d, e.contentWidth, e.contentHeight); + } + } + }; + uas = class mOn { + constructor(e, t) { + this.kind = 1; + this.oldHasFocus = e; + this.hasFocus = t; + } + isNoOp() { + return this.oldHasFocus === this.hasFocus; + } + attemptToMerge(e) { + if (e.kind !== this.kind) { + return null; + } else { + return new mOn(this.oldHasFocus, e.hasFocus); + } + } + }; + das = class bOn { + constructor(e, t, s, n, r, o, a, l) { + this.kind = 2; + this.c = e; + this.d = t; + this.f = s; + this.g = n; + this.scrollWidth = r; + this.scrollLeft = o; + this.scrollHeight = a; + this.scrollTop = l; + this.scrollWidthChanged = this.c !== this.scrollWidth; + this.scrollLeftChanged = this.d !== this.scrollLeft; + this.scrollHeightChanged = this.f !== this.scrollHeight; + this.scrollTopChanged = this.g !== this.scrollTop; + } + isNoOp() { + return !this.scrollWidthChanged && !this.scrollLeftChanged && !this.scrollHeightChanged && !this.scrollTopChanged; + } + attemptToMerge(e) { + if (e.kind !== this.kind) { + return null; + } else { + return new bOn(this.c, this.d, this.f, this.g, e.scrollWidth, e.scrollLeft, e.scrollHeight, e.scrollTop); + } + } + }; + has = class { + constructor() { + this.kind = 3; + } + isNoOp() { + return false; + } + attemptToMerge(i) { + if (i.kind !== this.kind) { + return null; + } else { + return this; + } + } + }; + fas = class { + constructor() { + this.kind = 4; + } + isNoOp() { + return false; + } + attemptToMerge(i) { + if (i.kind !== this.kind) { + return null; + } else { + return this; + } + } + }; + gas = class j3i { + constructor(e, t, s, n, r, o, a) { + this.kind = 6; + this.oldSelections = e; + this.selections = t; + this.oldModelVersionId = s; + this.modelVersionId = n; + this.source = r; + this.reason = o; + this.reachedMaxCursorCount = a; + } + static c(e, t) { + if (!e && !t) { + return true; + } + if (!e || !t) { + return false; + } + const s = e.length; + const n = t.length; + if (s !== n) { + return false; + } + for (let r = 0; r < s; r++) { + if (!e[r].equalsSelection(t[r])) { + return false; + } + } + return true; + } + isNoOp() { + return j3i.c(this.oldSelections, this.selections) && this.oldModelVersionId === this.modelVersionId; + } + attemptToMerge(e) { + if (e.kind !== this.kind) { + return null; + } else { + return new j3i(this.oldSelections, e.selections, this.oldModelVersionId, e.modelVersionId, e.source, e.reason, this.reachedMaxCursorCount || e.reachedMaxCursorCount); + } + } + }; + pas = class { + constructor() { + this.kind = 5; + } + isNoOp() { + return false; + } + attemptToMerge(i) { + if (i.kind !== this.kind) { + return null; + } else { + return this; + } + } + }; + mas = class { + constructor(i) { + this.event = i; + this.kind = 7; + } + isNoOp() { + return false; + } + attemptToMerge(i) { + return null; + } + }; + bas = class { + constructor(i) { + this.event = i; + this.kind = 8; + } + isNoOp() { + return false; + } + attemptToMerge(i) { + return null; + } + }; + vas = class { + constructor(i) { + this.event = i; + this.kind = 9; + } + isNoOp() { + return false; + } + attemptToMerge(i) { + return null; + } + }; + yas = class { + constructor(i) { + this.event = i; + this.kind = 10; + } + isNoOp() { + return false; + } + attemptToMerge(i) { + return null; + } + }; + was = class { + constructor(i) { + this.event = i; + this.kind = 11; + } + isNoOp() { + return false; + } + attemptToMerge(i) { + return null; + } + }; + Cas = class { + constructor(i) { + this.event = i; + this.kind = 12; + } + isNoOp() { + return false; + } + attemptToMerge(i) { + return null; + } + }; + } +}); +var VUt; +var Klt; +var HUt; +var bme; +var Sas; +var xas; +var qUt = ue({ + "out-build/vs/editor/common/cursor/cursor.js"() { + "use strict"; + + Ut(); + $i(); + lXn(); + kI(); + cXn(); + cot(); + $ot(); + Aot(); + yt(); + ua(); + Kj(); + WUt(); + q(); + Glt(); + VUt = class extends H { + constructor(i, e, t, s) { + super(); + this.c = i; + this.f = this.c.getVersionId(); + this.g = e; + this.h = t; + this.context = new BUt(this.c, this.g, this.h, s); + this.n = new _Ut(this.context); + this.q = false; + this.t = false; + this.u = null; + this.w = null; + this.y = []; + this.z = 0; + } + dispose() { + this.n.dispose(); + this.y = si(this.y); + super.dispose(); + } + updateConfiguration(i) { + this.context = new BUt(this.c, this.g, this.h, i); + this.n.updateContext(this.context); + } + onLineMappingChanged(i) { + if (this.f === this.c.getVersionId()) { + this.setStates(i, "viewModel", 0, this.getCursorStates()); + } + } + setHasFocus(i) { + this.q = i; + } + C() { + if (this.y.length > 0) { + const i = this.n.getSelections(); + for (let e = 0; e < this.y.length; e++) { + const t = this.y[e]; + if (!t.isValid(i)) { + t.dispose(); + this.y.splice(e, 1); + e--; + } + } + } + } + getPrimaryCursorState() { + return this.n.getPrimaryCursor(); + } + getLastAddedCursorIndex() { + return this.n.getLastAddedCursorIndex(); + } + getCursorStates() { + return this.n.getAll(); + } + setStates(i, e, t, s) { + let n = false; + const r = this.context.cursorConfig.multiCursorLimit; + if (s !== null && s.length > r) { + s = s.slice(0, r); + n = true; + } + const o = Klt.from(this.c, this); + this.n.setStates(s); + this.n.normalize(); + this.w = null; + this.C(); + return this.I(i, e, t, o, n); + } + setCursorColumnSelectData(i) { + this.w = i; + } + revealAll(i, e, t, s, n, r) { + const o = this.n.getViewPositions(); + let a = null; + let l = null; + if (o.length > 1) { + l = this.n.getViewSelections(); + } else { + a = Z.fromPositions(o[0], o[0]); + } + i.emitViewEvent(new uie(e, t, a, l, s, n, r)); + } + revealPrimary(i, e, t, s, n, r) { + const a = [this.n.getPrimaryCursor().viewState.selection]; + i.emitViewEvent(new uie(e, t, null, a, s, n, r)); + } + saveState() { + const i = []; + const e = this.n.getSelections(); + for (let t = 0, s = e.length; t < s; t++) { + const n = e[t]; + i.push({ + inSelectionMode: !n.isEmpty(), + selectionStart: { + lineNumber: n.selectionStartLineNumber, + column: n.selectionStartColumn + }, + position: { + lineNumber: n.positionLineNumber, + column: n.positionColumn + } + }); + } + return i; + } + restoreState(i, e) { + const t = []; + for (let s = 0, n = e.length; s < n; s++) { + const r = e[s]; + let o = 1; + let a = 1; + if (r.position && r.position.lineNumber) { + o = r.position.lineNumber; + } + if (r.position && r.position.column) { + a = r.position.column; + } + let l = o; + let c = a; + if (r.selectionStart && r.selectionStart.lineNumber) { + l = r.selectionStart.lineNumber; + } + if (r.selectionStart && r.selectionStart.column) { + c = r.selectionStart.column; + } + t.push({ + selectionStartLineNumber: l, + selectionStartColumn: c, + positionLineNumber: o, + positionColumn: a + }); + } + this.setStates(i, "restoreState", 0, fc.fromModelSelections(t)); + this.revealAll(i, "restoreState", false, 0, true, 1); + } + onModelContentChanged(i, e) { + if (e instanceof h7t) { + if (this.t) { + return; + } + this.t = true; + try { + this.setStates(i, "modelChange", 0, this.getCursorStates()); + } finally { + this.t = false; + } + } else { + const t = e.rawContentChangedEvent; + this.f = t.versionId; + if (this.t) { + return; + } + const s = t.containsEvent(1); + this.z = 0; + if (s) { + this.n.dispose(); + this.n = new _Ut(this.context); + this.C(); + this.I(i, "model", 1, null, false); + } else if (this.q && t.resultingSelection && t.resultingSelection.length > 0) { + const n = fc.fromModelSelections(t.resultingSelection); + if (this.setStates(i, "modelChange", t.isUndoing ? 5 : t.isRedoing ? 6 : 2, n)) { + this.revealAll(i, "modelChange", false, 0, true, 0); + } + } else { + const n = this.n.readSelectionFromMarkers(); + this.setStates(i, "modelChange", 2, fc.fromModelSelections(n)); + } + } + } + getSelection() { + return this.n.getPrimaryCursor().modelState.selection; + } + getTopMostViewPosition() { + return this.n.getTopMostViewPosition(); + } + getBottomMostViewPosition() { + return this.n.getBottomMostViewPosition(); + } + getCursorColumnSelectData() { + if (this.w) { + return this.w; + } + const i = this.n.getPrimaryCursor(); + const e = i.viewState.selectionStart.getStartPosition(); + const t = i.viewState.position; + return { + isReal: false, + fromViewLineNumber: e.lineNumber, + fromViewVisualColumn: this.context.cursorConfig.visibleColumnFromColumn(this.g, e), + toViewLineNumber: t.lineNumber, + toViewVisualColumn: this.context.cursorConfig.visibleColumnFromColumn(this.g, t) + }; + } + getSelections() { + return this.n.getSelections(); + } + getPosition() { + return this.n.getPrimaryCursor().modelState.position; + } + setSelections(i, e, t, s) { + this.setStates(i, e, s, fc.fromModelSelections(t)); + } + getPrevEditOperationType() { + return this.z; + } + setPrevEditOperationType(i) { + this.z = i; + } + F(i, e) { + const t = []; + const s = []; + for (let o = 0, a = i.length; o < a; o++) { + t.push({ + range: i[o], + options: { + description: "auto-closed-character", + inlineClassName: "auto-closed-character", + stickiness: 1 + } + }); + s.push({ + range: e[o], + options: { + description: "auto-closed-enclosing", + stickiness: 1 + } + }); + } + const n = this.c.deltaDecorations([], t); + const r = this.c.deltaDecorations([], s); + this.y.push(new HUt(this.c, n, r)); + } + G(i) { + if (!i) { + return; + } + if (i.shouldPushStackElementBefore) { + this.c.pushStackElement(); + } + const e = bme.executeCommands(this.c, this.n.getSelections(), i.commands); + if (e) { + this.H(e); + const t = []; + const s = []; + for (let n = 0; n < i.commands.length; n++) { + const r = i.commands[n]; + if (r instanceof Mot && r.enclosingRange && r.closeCharacterRange) { + t.push(r.closeCharacterRange); + s.push(r.enclosingRange); + } + } + if (t.length > 0) { + this.F(t, s); + } + this.z = i.type; + } + if (i.shouldPushStackElementAfter) { + this.c.pushStackElement(); + } + } + H(i) { + if (!i || i.length === 0) { + i = this.n.readSelectionFromMarkers(); + } + this.w = null; + this.n.setSelections(i); + this.n.normalize(); + } + I(i, e, t, s, n) { + const r = Klt.from(this.c, this); + if (r.equals(s)) { + return false; + } + const o = this.n.getSelections(); + const a = this.n.getViewSelections(); + i.emitViewEvent(new Qos(a, o, t)); + if (!s || s.cursorState.length !== r.cursorState.length || r.cursorState.some((l, c) => !l.modelState.equals(s.cursorState[c].modelState))) { + const l = s ? s.cursorState.map(u => u.modelState.selection) : null; + const c = s ? s.modelVersionId : 0; + i.emitOutgoingEvent(new gas(l, o, c, r.modelVersionId, e || "keyboard", t, n)); + } + return true; + } + J(i) { + if (!i.length) { + return null; + } + const e = []; + for (let t = 0, s = i.length; t < s; t++) { + const n = i[t]; + if (!n.text || n.text.indexOf(` +`) >= 0) { + return null; + } + const r = n.text.match(/([)\]}>'"`])([^)\]}>'"`]*)$/); + if (!r) { + return null; + } + const o = r[1]; + const a = this.context.cursorConfig.autoClosingPairs.autoClosingPairsCloseSingleChar.get(o); + if (!a || a.length !== 1) { + return null; + } + const l = a[0].open; + const c = n.text.length - r[2].length - 1; + const u = n.text.lastIndexOf(l, c - 1); + if (u === -1) { + return null; + } + e.push([u, c]); + } + return e; + } + executeEdits(i, e, t, s) { + let n = null; + if (e === "snippet") { + n = this.J(t); + } + if (n) { + t[0]._isTracked = true; + } + const r = []; + const o = []; + const a = this.c.pushEditOperations(this.getSelections(), t, l => { + if (n) { + for (let u = 0, d = n.length; u < d; u++) { + const [h, g] = n[u]; + const p = l[u]; + const b = p.range.startLineNumber; + const v = p.range.startColumn - 1 + h; + const y = p.range.startColumn - 1 + g; + r.push(new Z(b, y + 1, b, y + 2)); + o.push(new Z(b, v + 1, b, y + 2)); + } + } + const c = s(l); + if (c) { + this.t = true; + } + return c; + }); + if (a) { + this.t = false; + this.setSelections(i, e, a, 0); + } + if (r.length > 0) { + this.F(r, o); + } + } + L(i, e, t, s = 0) { + if (this.context.cursorConfig.readOnly) { + return; + } + const n = Klt.from(this.c, this); + this.n.stopTrackingSelections(); + this.t = true; + try { + this.n.ensureValidState(); + i(); + } catch (r) { + xs(r); + } + this.t = false; + this.n.startTrackingSelections(); + this.C(); + if (this.I(e, t, s, n, false)) { + this.revealAll(e, t, false, 0, true, 0); + } + } + getAutoClosedCharacters() { + return HUt.getAllAutoClosedCharacters(this.y); + } + startComposition(i) { + this.u = new xas(this.c, this.getSelections()); + } + endComposition(i, e) { + const t = this.u ? this.u.deduceOutcome(this.c, this.getSelections()) : null; + this.u = null; + this.L(() => { + if (e === "keyboard") { + this.G(sF.compositionEndWithInterceptors(this.z, this.context.cursorConfig, this.c, t, this.getSelections(), this.getAutoClosedCharacters())); + } + }, i, e); + } + type(i, e, t) { + this.L(() => { + if (t === "keyboard") { + const s = e.length; + let n = 0; + while (n < s) { + const r = C4t(e, n); + const o = e.substr(n, r); + this.G(sF.typeWithInterceptors(!!this.u, this.z, this.context.cursorConfig, this.c, this.getSelections(), this.getAutoClosedCharacters(), o)); + n += r; + } + } else { + this.G(sF.typeWithoutInterceptors(this.z, this.context.cursorConfig, this.c, this.getSelections(), e)); + } + }, i, t); + } + compositionType(i, e, t, s, n, r) { + if (e.length === 0 && t === 0 && s === 0) { + if (n !== 0) { + const o = this.getSelections().map(a => { + const l = a.getPosition(); + return new Vs(l.lineNumber, l.column + n, l.lineNumber, l.column + n); + }); + this.setSelections(i, r, o, 0); + } + return; + } + this.L(() => { + this.G(sF.compositionType(this.z, this.context.cursorConfig, this.c, this.getSelections(), e, t, s, n)); + }, i, r); + } + paste(i, e, t, s, n) { + this.L(() => { + this.G(sF.paste(this.context.cursorConfig, this.c, this.getSelections(), e, t, s || [])); + }, i, n, 4); + } + cut(i, e) { + this.L(() => { + this.G(uj.cut(this.context.cursorConfig, this.c, this.getSelections())); + }, i, e); + } + executeCommand(i, e, t) { + this.L(() => { + this.n.killSecondaryCursors(); + this.G(new JC(0, [e], { + shouldPushStackElementBefore: false, + shouldPushStackElementAfter: false + })); + }, i, t); + } + executeCommands(i, e, t) { + this.L(() => { + this.G(new JC(0, e, { + shouldPushStackElementBefore: false, + shouldPushStackElementAfter: false + })); + }, i, t); + } + }; + Klt = class vOn { + static from(e, t) { + return new vOn(e.getVersionId(), t.getCursorStates()); + } + constructor(e, t) { + this.modelVersionId = e; + this.cursorState = t; + } + equals(e) { + if (!e || this.modelVersionId !== e.modelVersionId || this.cursorState.length !== e.cursorState.length) { + return false; + } + for (let t = 0, s = this.cursorState.length; t < s; t++) { + if (!this.cursorState[t].equals(e.cursorState[t])) { + return false; + } + } + return true; + } + }; + HUt = class { + static getAllAutoClosedCharacters(i) { + let e = []; + for (const t of i) { + e = e.concat(t.getAutoClosedCharactersRanges()); + } + return e; + } + constructor(i, e, t) { + this.c = i; + this.d = e; + this.f = t; + } + dispose() { + this.d = this.c.deltaDecorations(this.d, []); + this.f = this.c.deltaDecorations(this.f, []); + } + getAutoClosedCharactersRanges() { + const i = []; + for (let e = 0; e < this.d.length; e++) { + const t = this.c.getDecorationRange(this.d[e]); + if (t) { + i.push(t); + } + } + return i; + } + isValid(i) { + const e = []; + for (let t = 0; t < this.f.length; t++) { + const s = this.c.getDecorationRange(this.f[t]); + if (s && (e.push(s), s.startLineNumber !== s.endLineNumber)) { + return false; + } + } + e.sort(Z.compareRangesUsingStarts); + i.sort(Z.compareRangesUsingStarts); + for (let t = 0; t < i.length; t++) { + if (t >= e.length || !e[t].strictContainsRange(i[t])) { + return false; + } + } + return true; + } + }; + bme = class { + static executeCommands(i, e, t) { + const s = { + model: i, + selectionsBefore: e, + trackedRanges: [], + trackedRangesDirection: [] + }; + const n = this.c(s, t); + for (let r = 0, o = s.trackedRanges.length; r < o; r++) { + s.model._setTrackedRange(s.trackedRanges[r], null, 0); + } + return n; + } + static c(i, e) { + if (this.d(e)) { + return null; + } + const t = this.f(i, e); + if (t.operations.length === 0) { + return null; + } + const s = t.operations; + const n = this.h(s); + if (n.hasOwnProperty("0")) { + console.warn("Ignoring commands"); + return null; + } + const r = []; + for (let l = 0, c = s.length; l < c; l++) { + if (!n.hasOwnProperty(s[l].identifier.major.toString())) { + r.push(s[l]); + } + } + if (t.hadTrackedEditOperation && r.length > 0) { + r[0]._isTracked = true; + } + let o = i.model.pushEditOperations(i.selectionsBefore, r, l => { + const c = []; + for (let h = 0; h < i.selectionsBefore.length; h++) { + c[h] = []; + } + for (const h of l) { + if (h.identifier) { + c[h.identifier.major].push(h); + } + } + const u = (h, g) => h.identifier.minor - g.identifier.minor; + const d = []; + for (let h = 0; h < i.selectionsBefore.length; h++) { + if (c[h].length > 0) { + c[h].sort(u); + d[h] = e[h].computeCursorState(i.model, { + getInverseEditOperations: () => c[h], + getTrackedSelection: g => { + const p = parseInt(g, 10); + const b = i.model._getTrackedRange(i.trackedRanges[p]); + if (i.trackedRangesDirection[p] === 0) { + return new Vs(b.startLineNumber, b.startColumn, b.endLineNumber, b.endColumn); + } else { + return new Vs(b.endLineNumber, b.endColumn, b.startLineNumber, b.startColumn); + } + } + }); + } else { + d[h] = i.selectionsBefore[h]; + } + } + return d; + }); + o ||= i.selectionsBefore; + const a = []; + for (const l in n) { + if (n.hasOwnProperty(l)) { + a.push(parseInt(l, 10)); + } + } + a.sort((l, c) => c - l); + for (const l of a) { + o.splice(l, 1); + } + return o; + } + static d(i) { + for (let e = 0, t = i.length; e < t; e++) { + if (i[e]) { + return false; + } + } + return true; + } + static f(i, e) { + let t = []; + let s = false; + for (let n = 0, r = e.length; n < r; n++) { + const o = e[n]; + if (o) { + const a = this.g(i, n, o); + t = t.concat(a.operations); + s = s || a.hadTrackedEditOperation; + } + } + return { + operations: t, + hadTrackedEditOperation: s + }; + } + static g(i, e, t) { + const s = []; + let n = 0; + const r = (u, d, h = false) => { + if (!Z.isEmpty(u) || d !== "") { + s.push({ + identifier: { + major: e, + minor: n++ + }, + range: u, + text: d, + forceMoveMarkers: h, + isAutoWhitespaceEdit: t.insertsAutoWhitespace + }); + } + }; + let o = false; + const c = { + addEditOperation: r, + addTrackedEditOperation: (u, d, h) => { + o = true; + r(u, d, h); + }, + trackSelection: (u, d) => { + const h = Vs.liftSelection(u); + let g; + if (h.isEmpty()) { + if (typeof d == "boolean") { + if (d) { + g = 2; + } else { + g = 3; + } + } else { + const v = i.model.getLineMaxColumn(h.startLineNumber); + if (h.startColumn === v) { + g = 2; + } else { + g = 3; + } + } + } else { + g = 1; + } + const p = i.trackedRanges.length; + const b = i.model._setTrackedRange(null, h, g); + i.trackedRanges[p] = b; + i.trackedRangesDirection[p] = h.getDirection(); + return p.toString(); + } + }; + try { + t.getEditOperations(i.model, c); + } catch (u) { + xs(u); + return { + operations: [], + hadTrackedEditOperation: false + }; + } + return { + operations: s, + hadTrackedEditOperation: o + }; + } + static h(i) { + i = i.slice(0); + i.sort((t, s) => -Z.compareRangesUsingEnds(t.range, s.range)); + const e = {}; + for (let t = 1; t < i.length; t++) { + const s = i[t - 1]; + const n = i[t]; + if (Z.getStartPosition(s.range).isBefore(Z.getEndPosition(n.range))) { + let r; + if (s.identifier.major > n.identifier.major) { + r = s.identifier.major; + } else { + r = n.identifier.major; + } + e[r.toString()] = true; + for (let o = 0; o < i.length; o++) { + if (i[o].identifier.major === r) { + i.splice(o, 1); + if (o < t) { + t--; + } + o--; + } + } + if (t > 0) { + t--; + } + } + } + return e; + } + }; + Sas = class { + constructor(i, e, t, s) { + this.text = i; + this.lineNumber = e; + this.startSelectionOffset = t; + this.endSelectionOffset = s; + } + }; + xas = class yFt { + static d(e, t) { + const s = []; + for (const n of t) { + if (n.startLineNumber !== n.endLineNumber) { + return null; + } + const r = n.startLineNumber; + s.push(new Sas(e.getLineContent(r), r, n.startColumn - 1, n.endColumn - 1)); + } + return s; + } + constructor(e, t) { + this.c = yFt.d(e, t); + } + deduceOutcome(e, t) { + if (!this.c) { + return null; + } + const s = yFt.d(e, t); + if (!s || this.c.length !== s.length) { + return null; + } + const n = []; + for (let r = 0, o = this.c.length; r < o; r++) { + n.push(yFt.f(this.c[r], s[r])); + } + return n; + } + static f(e, t) { + const s = Math.min(e.startSelectionOffset, t.startSelectionOffset, LL(e.text, t.text)); + const n = Math.min(e.text.length - e.endSelectionOffset, t.text.length - t.endSelectionOffset, VZ(e.text, t.text)); + const r = e.text.substring(s, e.text.length - n); + const o = s; + const a = t.text.length - n; + const l = t.text.substring(o, a); + const c = new Z(t.lineNumber, o + 1, t.lineNumber, a + 1); + return new vYi(r, e.startSelectionOffset - s, e.endSelectionOffset - s, l, t.startSelectionOffset - s, t.endSelectionOffset - s, c); + } + }; + } +}); +function kas(i, e, t) { + return jUt(e, i.languageIdCodec, qm.get(t) || Xlt); +} +async function Ylt(i, e, t) { + if (!t) { + return jUt(e, i.languageIdCodec, Xlt); + } + const s = await qm.getOrCreate(t); + return jUt(e, i.languageIdCodec, s || Xlt); +} +function Eas(i, e, t, s, n, r, o) { + let a = "
"; + let l = s; + let c = 0; + let u = true; + for (let d = 0, h = e.getCount(); d < h; d++) { + const g = e.getEndOffset(d); + if (g <= s) { + continue; + } + let p = ""; + for (; l < g && l < n; l++) { + const b = i.charCodeAt(l); + switch (b) { + case 9: + { + let v = r - (l + c) % r; + for (c += v - 1; v > 0;) { + if (o && u) { + p += " "; + u = false; + } else { + p += " "; + u = true; + } + v--; + } + break; + } + case 60: + p += "<"; + u = false; + break; + case 62: + p += ">"; + u = false; + break; + case 38: + p += "&"; + u = false; + break; + case 0: + p += "�"; + u = false; + break; + case 65279: + case 8232: + case 8233: + case 133: + p += "�"; + u = false; + break; + case 13: + p += "​"; + u = false; + break; + case 32: + if (o && u) { + p += " "; + u = false; + } else { + p += " "; + u = true; + } + break; + default: + p += String.fromCharCode(b); + u = false; + } + } + a += `${p}`; + if (g > n || l >= n) { + break; + } + } + a += "
"; + return a; +} +function jUt(i, e, t) { + let s = "
"; + const n = Ov(i); + let r = t.getInitialState(); + for (let o = 0, a = n.length; o < a; o++) { + const l = n[o]; + if (o > 0) { + s += "
"; + } + const c = t.tokenizeEncoded(l, true, r); + Kb.convertToEndOffset(c.tokens, l.length); + const d = new Kb(c.tokens, l, e).inflate(); + let h = 0; + for (let g = 0, p = d.getCount(); g < p; g++) { + const b = d.getClassName(g); + const v = d.getEndOffset(g); + s += `${Ol(l.substring(h, v))}`; + h = v; + } + r = c.endState; + } + s += "
"; + return s; +} +var Xlt; +var u7 = ue({ + "out-build/vs/editor/common/languages/textToHtmlTokenizer.js"() { + "use strict"; + + $i(); + RT(); + Eo(); + H7t(); + Xlt = { + getInitialState: () => V7t, + tokenizeEncoded: (i, e, t) => W7t(0, t) + }; + } +}); +var Ias; +var Das; +var Tas; +var uXn = ue({ + "out-build/vs/editor/common/viewLayout/linesLayout.js"() { + "use strict"; + + $i(); + Ias = class { + constructor() { + this.c = false; + this.d = []; + this.e = []; + this.f = []; + } + insert(i) { + this.c = true; + this.d.push(i); + } + change(i) { + this.c = true; + this.e.push(i); + } + remove(i) { + this.c = true; + this.f.push(i); + } + mustCommit() { + return this.c; + } + commit(i) { + if (!this.c) { + return; + } + const e = this.d; + const t = this.e; + const s = this.f; + this.c = false; + this.d = []; + this.e = []; + this.f = []; + i._commitPendingChanges(e, t, s); + } + }; + Das = class { + constructor(i, e, t, s, n) { + this.id = i; + this.afterLineNumber = e; + this.ordinal = t; + this.height = s; + this.minWidth = n; + this.prefixSum = 0; + } + }; + Tas = class z3i { + static { + this.c = 0; + } + constructor(e, t, s, n) { + this.d = k4t(++z3i.c); + this.e = new Ias(); + this.f = 0; + this.g = []; + this.h = -1; + this.j = -1; + this.k = e; + this.l = t; + this.m = s; + this.n = n; + } + static findInsertionIndex(e, t, s) { + let n = 0; + let r = e.length; + while (n < r) { + const o = n + r >>> 1; + if (t === e[o].afterLineNumber) { + if (s < e[o].ordinal) { + r = o; + } else { + n = o + 1; + } + } else if (t < e[o].afterLineNumber) { + r = o; + } else { + n = o + 1; + } + } + return n; + } + setLineHeight(e) { + this.o(); + this.l = e; + } + setPadding(e, t) { + this.m = e; + this.n = t; + } + onFlushed(e) { + this.o(); + this.k = e; + } + changeWhitespace(e) { + let t = false; + try { + e({ + insertWhitespace: (n, r, o, a) => { + t = true; + n = n | 0; + r = r | 0; + o = o | 0; + a = a | 0; + const l = this.d + ++this.f; + this.e.insert(new Das(l, n, r, o, a)); + return l; + }, + changeOneWhitespace: (n, r, o) => { + t = true; + r = r | 0; + o = o | 0; + this.e.change({ + id: n, + newAfterLineNumber: r, + newHeight: o + }); + }, + removeWhitespace: n => { + t = true; + this.e.remove({ + id: n + }); + } + }); + } finally { + this.e.commit(this); + } + return t; + } + _commitPendingChanges(e, t, s) { + if (e.length > 0 || s.length > 0) { + this.j = -1; + } + if (e.length + t.length + s.length <= 1) { + for (const l of e) { + this.p(l); + } + for (const l of t) { + this.r(l.id, l.newAfterLineNumber, l.newHeight); + } + for (const l of s) { + const c = this.q(l.id); + if (c !== -1) { + this.s(c); + } + } + return; + } + const n = new Set(); + for (const l of s) { + n.add(l.id); + } + const r = new Map(); + for (const l of t) { + r.set(l.id, l); + } + const o = l => { + const c = []; + for (const u of l) { + if (!n.has(u.id)) { + if (r.has(u.id)) { + const d = r.get(u.id); + u.afterLineNumber = d.newAfterLineNumber; + u.height = d.newHeight; + } + c.push(u); + } + } + return c; + }; + const a = o(this.g).concat(o(e)); + a.sort((l, c) => l.afterLineNumber === c.afterLineNumber ? l.ordinal - c.ordinal : l.afterLineNumber - c.afterLineNumber); + this.g = a; + this.h = -1; + } + o() { + if (this.e.mustCommit()) { + this.e.commit(this); + } + } + p(e) { + const t = z3i.findInsertionIndex(this.g, e.afterLineNumber, e.ordinal); + this.g.splice(t, 0, e); + this.h = Math.min(this.h, t - 1); + } + q(e) { + const t = this.g; + for (let s = 0, n = t.length; s < n; s++) { + if (t[s].id === e) { + return s; + } + } + return -1; + } + r(e, t, s) { + const n = this.q(e); + if (n !== -1 && (this.g[n].height !== s && (this.g[n].height = s, this.h = Math.min(this.h, n - 1)), this.g[n].afterLineNumber !== t)) { + const r = this.g[n]; + this.s(n); + r.afterLineNumber = t; + this.p(r); + } + } + s(e) { + this.g.splice(e, 1); + this.h = Math.min(this.h, e - 1); + } + onLinesDeleted(e, t) { + this.o(); + e = e | 0; + t = t | 0; + this.k -= t - e + 1; + for (let s = 0, n = this.g.length; s < n; s++) { + const r = this.g[s].afterLineNumber; + if (e <= r && r <= t) { + this.g[s].afterLineNumber = e - 1; + } else if (r > t) { + this.g[s].afterLineNumber -= t - e + 1; + } + } + } + onLinesInserted(e, t) { + this.o(); + e = e | 0; + t = t | 0; + this.k += t - e + 1; + for (let s = 0, n = this.g.length; s < n; s++) { + const r = this.g[s].afterLineNumber; + if (e <= r) { + this.g[s].afterLineNumber += t - e + 1; + } + } + } + getWhitespacesTotalHeight() { + this.o(); + if (this.g.length === 0) { + return 0; + } else { + return this.getWhitespacesAccumulatedHeight(this.g.length - 1); + } + } + getWhitespacesAccumulatedHeight(e) { + this.o(); + e = e | 0; + let t = Math.max(0, this.h + 1); + if (t === 0) { + this.g[0].prefixSum = this.g[0].height; + t++; + } + for (let s = t; s <= e; s++) { + this.g[s].prefixSum = this.g[s - 1].prefixSum + this.g[s].height; + } + this.h = Math.max(this.h, e); + return this.g[e].prefixSum; + } + getLinesTotalHeight() { + this.o(); + const e = this.l * this.k; + const t = this.getWhitespacesTotalHeight(); + return e + t + this.m + this.n; + } + getWhitespaceAccumulatedHeightBeforeLineNumber(e) { + this.o(); + e = e | 0; + const t = this.t(e); + if (t === -1) { + return 0; + } else { + return this.getWhitespacesAccumulatedHeight(t); + } + } + t(e) { + e = e | 0; + const t = this.g; + let s = 0; + let n = t.length - 1; + while (s <= n) { + const o = (n - s | 0) / 2 | 0; + const a = s + o | 0; + if (t[a].afterLineNumber < e) { + if (a + 1 >= t.length || t[a + 1].afterLineNumber >= e) { + return a; + } + s = a + 1 | 0; + } else { + n = a - 1 | 0; + } + } + return -1; + } + u(e) { + e = e | 0; + const s = this.t(e) + 1; + if (s < this.g.length) { + return s; + } else { + return -1; + } + } + getFirstWhitespaceIndexAfterLineNumber(e) { + this.o(); + e = e | 0; + return this.u(e); + } + getVerticalOffsetForLineNumber(e, t = false) { + this.o(); + e = e | 0; + let s; + if (e > 1) { + s = this.l * (e - 1); + } else { + s = 0; + } + const n = this.getWhitespaceAccumulatedHeightBeforeLineNumber(e - (t ? 1 : 0)); + return s + n + this.m; + } + getVerticalOffsetAfterLineNumber(e, t = false) { + this.o(); + e = e | 0; + const s = this.l * e; + const n = this.getWhitespaceAccumulatedHeightBeforeLineNumber(e + (t ? 1 : 0)); + return s + n + this.m; + } + hasWhitespace() { + this.o(); + return this.getWhitespacesCount() > 0; + } + getWhitespaceMinWidth() { + this.o(); + if (this.j === -1) { + let e = 0; + for (let t = 0, s = this.g.length; t < s; t++) { + e = Math.max(e, this.g[t].minWidth); + } + this.j = e; + } + return this.j; + } + isAfterLines(e) { + this.o(); + const t = this.getLinesTotalHeight(); + return e > t; + } + isInTopPadding(e) { + if (this.m === 0) { + return false; + } else { + this.o(); + return e < this.m; + } + } + isInBottomPadding(e) { + if (this.n === 0) { + return false; + } + this.o(); + const t = this.getLinesTotalHeight(); + return e >= t - this.n; + } + getLineNumberAtOrAfterVerticalOffset(e) { + this.o(); + e = e | 0; + if (e < 0) { + return 1; + } + const t = this.k | 0; + const s = this.l; + let n = 1; + let r = t; + while (n < r) { + const o = (n + r) / 2 | 0; + const a = this.getVerticalOffsetForLineNumber(o) | 0; + if (e >= a + s) { + n = o + 1; + } else { + if (e >= a) { + return o; + } + r = o; + } + } + if (n > t) { + return t; + } else { + return n; + } + } + getLinesViewportData(e, t) { + this.o(); + e = e | 0; + t = t | 0; + const s = this.l; + const n = this.getLineNumberAtOrAfterVerticalOffset(e) | 0; + const r = this.getVerticalOffsetForLineNumber(n) | 0; + let o = this.k | 0; + let a = this.getFirstWhitespaceIndexAfterLineNumber(n) | 0; + const l = this.getWhitespacesCount() | 0; + let c; + let u; + if (a === -1) { + a = l; + u = o + 1; + c = 0; + } else { + u = this.getAfterLineNumberForWhitespaceIndex(a) | 0; + c = this.getHeightForWhitespaceIndex(a) | 0; + } + let d = r; + let h = d; + const g = 500000; + let p = 0; + if (r >= g) { + p = Math.floor(r / g) * g; + p = Math.floor(p / s) * s; + h -= p; + } + const b = []; + const v = e + (t - e) / 2; + let y = -1; + for (let x = n; x <= o; x++) { + if (y === -1) { + const k = d; + const E = d + s; + if (k <= v && v < E || k > v) { + y = x; + } + } + d += s; + b[x - n] = h; + h += s; + while (u === x) { + h += c; + d += c; + a++; + if (a >= l) { + u = o + 1; + } else { + u = this.getAfterLineNumberForWhitespaceIndex(a) | 0; + c = this.getHeightForWhitespaceIndex(a) | 0; + } + } + if (d >= t) { + o = x; + break; + } + } + if (y === -1) { + y = o; + } + const w = this.getVerticalOffsetForLineNumber(o) | 0; + let C = n; + let S = o; + if (C < S && r < e) { + C++; + } + if (C < S && w + s > t) { + S--; + } + return { + bigNumbersDelta: p, + startLineNumber: n, + endLineNumber: o, + relativeVerticalOffset: b, + centeredLineNumber: y, + completelyVisibleStartLineNumber: C, + completelyVisibleEndLineNumber: S, + lineHeight: this.l + }; + } + getVerticalOffsetForWhitespaceIndex(e) { + this.o(); + e = e | 0; + const t = this.getAfterLineNumberForWhitespaceIndex(e); + let s; + if (t >= 1) { + s = this.l * t; + } else { + s = 0; + } + let n; + if (e > 0) { + n = this.getWhitespacesAccumulatedHeight(e - 1); + } else { + n = 0; + } + return s + n + this.m; + } + getWhitespaceIndexAtOrAfterVerticallOffset(e) { + this.o(); + e = e | 0; + let t = 0; + let s = this.getWhitespacesCount() - 1; + if (s < 0) { + return -1; + } + const n = this.getVerticalOffsetForWhitespaceIndex(s); + const r = this.getHeightForWhitespaceIndex(s); + if (e >= n + r) { + return -1; + } + while (t < s) { + const o = Math.floor((t + s) / 2); + const a = this.getVerticalOffsetForWhitespaceIndex(o); + const l = this.getHeightForWhitespaceIndex(o); + if (e >= a + l) { + t = o + 1; + } else { + if (e >= a) { + return o; + } + s = o; + } + } + return t; + } + getWhitespaceAtVerticalOffset(e) { + this.o(); + e = e | 0; + const t = this.getWhitespaceIndexAtOrAfterVerticallOffset(e); + if (t < 0 || t >= this.getWhitespacesCount()) { + return null; + } + const s = this.getVerticalOffsetForWhitespaceIndex(t); + if (s > e) { + return null; + } + const n = this.getHeightForWhitespaceIndex(t); + const r = this.getIdForWhitespaceIndex(t); + const o = this.getAfterLineNumberForWhitespaceIndex(t); + return { + id: r, + afterLineNumber: o, + verticalOffset: s, + height: n + }; + } + getWhitespaceViewportData(e, t) { + this.o(); + e = e | 0; + t = t | 0; + const s = this.getWhitespaceIndexAtOrAfterVerticallOffset(e); + const n = this.getWhitespacesCount() - 1; + if (s < 0) { + return []; + } + const r = []; + for (let o = s; o <= n; o++) { + const a = this.getVerticalOffsetForWhitespaceIndex(o); + const l = this.getHeightForWhitespaceIndex(o); + if (a >= t) { + break; + } + r.push({ + id: this.getIdForWhitespaceIndex(o), + afterLineNumber: this.getAfterLineNumberForWhitespaceIndex(o), + verticalOffset: a, + height: l + }); + } + return r; + } + getWhitespaces() { + this.o(); + return this.g.slice(0); + } + getWhitespacesCount() { + this.o(); + return this.g.length; + } + getIdForWhitespaceIndex(e) { + this.o(); + e = e | 0; + return this.g[e].id; + } + getAfterLineNumberForWhitespaceIndex(e) { + this.o(); + e = e | 0; + return this.g[e].afterLineNumber; + } + getHeightForWhitespaceIndex(e) { + this.o(); + e = e | 0; + return this.g[e].height; + } + }; + } +}); +var Pas; +var die; +var Las; +var Ras; +var dXn = ue({ + "out-build/vs/editor/common/viewLayout/viewLayout.js"() { + "use strict"; + + pe(); + q(); + O9(); + uXn(); + MI(); + Glt(); + Pas = 125; + die = class { + constructor(i, e, t, s) { + i = i | 0; + e = e | 0; + t = t | 0; + s = s | 0; + if (i < 0) { + i = 0; + } + if (e < 0) { + e = 0; + } + if (t < 0) { + t = 0; + } + if (s < 0) { + s = 0; + } + this.width = i; + this.contentWidth = e; + this.scrollWidth = Math.max(i, e); + this.height = t; + this.contentHeight = s; + this.scrollHeight = Math.max(t, s); + } + equals(i) { + return this.width === i.width && this.contentWidth === i.contentWidth && this.height === i.height && this.contentHeight === i.contentHeight; + } + }; + Las = class extends H { + constructor(i, e) { + super(); + this.c = this.D(new B()); + this.onDidContentSizeChange = this.c.event; + this.b = new die(0, 0, 0, 0); + this.a = this.D(new p4({ + forceIntegerValues: true, + smoothScrollDuration: i, + scheduleAtNextAnimationFrame: e + })); + this.onDidScroll = this.a.onScroll; + } + getScrollable() { + return this.a; + } + setSmoothScrollDuration(i) { + this.a.setSmoothScrollDuration(i); + } + validateScrollPosition(i) { + return this.a.validateScrollPosition(i); + } + getScrollDimensions() { + return this.b; + } + setScrollDimensions(i) { + if (this.b.equals(i)) { + return; + } + const e = this.b; + this.b = i; + this.a.setScrollDimensions({ + width: i.width, + scrollWidth: i.scrollWidth, + height: i.height, + scrollHeight: i.scrollHeight + }, true); + const t = e.contentWidth !== i.contentWidth; + const s = e.contentHeight !== i.contentHeight; + if (t || s) { + this.c.fire(new cas(e.contentWidth, e.contentHeight, i.contentWidth, i.contentHeight)); + } + } + getFutureScrollPosition() { + return this.a.getFutureScrollPosition(); + } + getCurrentScrollPosition() { + return this.a.getCurrentScrollPosition(); + } + setScrollPositionNow(i) { + this.a.setScrollPositionNow(i); + } + setScrollPositionSmooth(i) { + this.a.setScrollPositionSmooth(i); + } + hasPendingScrollAnimation() { + return this.a.hasPendingScrollAnimation(); + } + }; + Ras = class extends H { + constructor(i, e, t) { + super(); + this.a = i; + const s = this.a.options; + const n = s.get(151); + const r = s.get(88); + this.b = new Tas(e, s.get(68), r.top, r.bottom); + this.c = 0; + this.f = 0; + this.g = this.D(new Las(0, t)); + this.h(); + this.g.setScrollDimensions(new die(n.contentWidth, 0, n.height, 0)); + this.onDidScroll = this.g.onDidScroll; + this.onDidContentSizeChange = this.g.onDidContentSizeChange; + this.n(); + } + dispose() { + super.dispose(); + } + getScrollable() { + return this.g.getScrollable(); + } + onHeightMaybeChanged() { + this.n(); + } + h() { + this.g.setSmoothScrollDuration(this.a.options.get(119) ? Pas : 0); + } + onConfigurationChanged(i) { + const e = this.a.options; + if (i.hasChanged(68)) { + this.b.setLineHeight(e.get(68)); + } + if (i.hasChanged(88)) { + const t = e.get(88); + this.b.setPadding(t.top, t.bottom); + } + if (i.hasChanged(151)) { + const t = e.get(151); + const s = t.contentWidth; + const n = t.height; + const r = this.g.getScrollDimensions(); + const o = r.contentWidth; + this.g.setScrollDimensions(new die(s, r.contentWidth, n, this.m(s, n, o))); + } else { + this.n(); + } + if (i.hasChanged(119)) { + this.h(); + } + } + onFlushed(i) { + this.b.onFlushed(i); + } + onLinesDeleted(i, e) { + this.b.onLinesDeleted(i, e); + } + onLinesInserted(i, e) { + this.b.onLinesInserted(i, e); + } + j(i, e) { + const s = this.a.options.get(108); + if (s.horizontal === 2 || i >= e) { + return 0; + } else { + return s.horizontalScrollbarSize; + } + } + m(i, e, t) { + const s = this.a.options; + let n = this.b.getLinesTotalHeight(); + if (s.get(110)) { + n += Math.max(0, e - s.get(68) - s.get(88).bottom); + } else if (!s.get(108).ignoreHorizontalScrollbarInContentHeight) { + n += this.j(i, t); + } + return n; + } + n() { + const i = this.g.getScrollDimensions(); + const e = i.width; + const t = i.height; + const s = i.contentWidth; + this.g.setScrollDimensions(new die(e, i.contentWidth, t, this.m(e, t, s))); + } + getCurrentViewport() { + const i = this.g.getScrollDimensions(); + const e = this.g.getCurrentScrollPosition(); + return new x9t(e.scrollTop, e.scrollLeft, i.width, i.height); + } + getFutureViewport() { + const i = this.g.getScrollDimensions(); + const e = this.g.getFutureScrollPosition(); + return new x9t(e.scrollTop, e.scrollLeft, i.width, i.height); + } + q() { + const i = this.a.options; + const e = this.c; + const t = i.get(152); + const s = i.get(52); + const n = i.get(151); + if (t.isViewportWrapping) { + const r = i.get(74); + if (e > n.contentWidth + s.typicalHalfwidthCharacterWidth && r.enabled && r.side === "right") { + return e + n.verticalScrollbarWidth; + } else { + return e; + } + } else { + const r = i.get(109) * s.typicalHalfwidthCharacterWidth; + const o = this.b.getWhitespaceMinWidth(); + return Math.max(e + r + n.verticalScrollbarWidth, o, this.f); + } + } + setMaxLineWidth(i) { + this.c = i; + this.r(); + } + setOverlayWidgetsMinWidth(i) { + this.f = i; + this.r(); + } + r() { + const i = this.g.getScrollDimensions(); + this.g.setScrollDimensions(new die(i.width, this.q(), i.height, i.contentHeight)); + this.n(); + } + saveState() { + const i = this.g.getFutureScrollPosition(); + const e = i.scrollTop; + const t = this.b.getLineNumberAtOrAfterVerticalOffset(e); + const s = this.b.getWhitespaceAccumulatedHeightBeforeLineNumber(t); + return { + scrollTop: e, + scrollTopWithoutViewZones: e - s, + scrollLeft: i.scrollLeft + }; + } + changeWhitespace(i) { + const e = this.b.changeWhitespace(i); + if (e) { + this.onHeightMaybeChanged(); + } + return e; + } + getVerticalOffsetForLineNumber(i, e = false) { + return this.b.getVerticalOffsetForLineNumber(i, e); + } + getVerticalOffsetAfterLineNumber(i, e = false) { + return this.b.getVerticalOffsetAfterLineNumber(i, e); + } + isAfterLines(i) { + return this.b.isAfterLines(i); + } + isInTopPadding(i) { + return this.b.isInTopPadding(i); + } + isInBottomPadding(i) { + return this.b.isInBottomPadding(i); + } + getLineNumberAtVerticalOffset(i) { + return this.b.getLineNumberAtOrAfterVerticalOffset(i); + } + getWhitespaceAtVerticalOffset(i) { + return this.b.getWhitespaceAtVerticalOffset(i); + } + getLinesViewportData() { + const i = this.getCurrentViewport(); + return this.b.getLinesViewportData(i.top, i.top + i.height); + } + getLinesViewportDataAtScrollTop(i) { + const e = this.g.getScrollDimensions(); + if (i + e.height > e.scrollHeight) { + i = e.scrollHeight - e.height; + } + if (i < 0) { + i = 0; + } + return this.b.getLinesViewportData(i, i + e.height); + } + getWhitespaceViewportData() { + const i = this.getCurrentViewport(); + return this.b.getWhitespaceViewportData(i.top, i.top + i.height); + } + getWhitespaces() { + return this.b.getWhitespaces(); + } + getContentWidth() { + return this.g.getScrollDimensions().contentWidth; + } + getScrollWidth() { + return this.g.getScrollDimensions().scrollWidth; + } + getContentHeight() { + return this.g.getScrollDimensions().contentHeight; + } + getScrollHeight() { + return this.g.getScrollDimensions().scrollHeight; + } + getCurrentScrollLeft() { + return this.g.getCurrentScrollPosition().scrollLeft; + } + getCurrentScrollTop() { + return this.g.getCurrentScrollPosition().scrollTop; + } + validateScrollPosition(i) { + return this.g.validateScrollPosition(i); + } + setScrollPosition(i, e) { + if (e === 1) { + this.g.setScrollPositionNow(i); + } else { + this.g.setScrollPositionSmooth(i); + } + } + hasPendingScrollAnimation() { + return this.g.hasPendingScrollAnimation(); + } + deltaScrollNow(i, e) { + const t = this.g.getCurrentScrollPosition(); + this.g.setScrollPositionNow({ + scrollLeft: t.scrollLeft + i, + scrollTop: t.scrollTop + e + }); + } + }; + } +}); +function zUt(i, e) { + return (!e.options.hideInCommentTokens || !JUt(i, e)) && (!e.options.hideInStringTokens || !GUt(i, e)); +} +function JUt(i, e) { + return Nas(i, e.range, t => t === 1); +} +function GUt(i, e) { + return Nas(i, e.range, t => t === 2); +} +function Nas(i, e, t) { + for (let s = e.startLineNumber; s <= e.endLineNumber; s++) { + const n = i.tokenization.getLineTokens(s); + const r = s === e.startLineNumber; + const o = s === e.endLineNumber; + let a = r ? n.findTokenIndexAtOffset(e.startColumn - 1) : 0; + while (a < n.getCount() && (!o || !(n.getStartOffset(a) > e.endColumn - 1))) { + if (!t(n.getStandardTokenType(a))) { + return false; + } + a++; + } + } + return true; +} +var Mas; +var Aas = ue({ + "out-build/vs/editor/common/viewModel/viewModelDecorations.js"() { + "use strict"; + + Rs(); + yt(); + MI(); + Qd(); + Mas = class { + constructor(i, e, t, s, n) { + this.a = i; + this.b = e; + this.c = t; + this.d = s; + this.e = n; + this.f = Object.create(null); + this.g = null; + this.h = null; + } + k() { + this.g = null; + this.h = null; + } + dispose() { + this.f = Object.create(null); + this.k(); + } + reset() { + this.f = Object.create(null); + this.k(); + } + onModelDecorationsChanged() { + this.f = Object.create(null); + this.k(); + } + onLineMappingChanged() { + this.f = Object.create(null); + this.k(); + } + l(i) { + const e = i.id; + let t = this.f[e]; + if (!t) { + const s = i.range; + const n = i.options; + let r; + if (n.isWholeLine) { + const o = this.e.convertModelPositionToViewPosition(new je(s.startLineNumber, 1), 0, false, true); + const a = this.e.convertModelPositionToViewPosition(new je(s.endLineNumber, this.b.getLineMaxColumn(s.endLineNumber)), 1); + r = new Z(o.lineNumber, o.column, a.lineNumber, a.column); + } else { + r = this.e.convertModelRangeToViewRange(s, 1); + } + t = new k9t(r, n); + this.f[e] = t; + } + return t; + } + getMinimapDecorationsInRange(i) { + return this.m(i, true, false).decorations; + } + getDecorationsViewportData(i) { + let e = this.g !== null; + e = e && i.equalsRange(this.h); + if (!e) { + this.g = this.m(i, false, false); + this.h = i; + } + return this.g; + } + getInlineDecorationsOnLine(i, e = false, t = false) { + const s = new Z(i, this.d.getViewLineMinColumn(i), i, this.d.getViewLineMaxColumn(i)); + return this.m(s, e, t).inlineDecorations[0]; + } + m(i, e, t) { + const s = this.d.getDecorationsInRange(i, this.a, Uot(this.c.options), e, t); + const n = i.startLineNumber; + const r = i.endLineNumber; + const o = []; + let a = 0; + const l = []; + for (let c = n; c <= r; c++) { + l[c - n] = []; + } + for (let c = 0, u = s.length; c < u; c++) { + const d = s[c]; + const h = d.options; + if (!zUt(this.b, d)) { + continue; + } + const g = this.l(d); + const p = g.range; + o[a++] = g; + if (h.inlineClassName) { + const b = new cF(p, h.inlineClassName, h.inlineClassNameAffectsLetterSpacing ? 3 : 0); + const v = Math.max(n, p.startLineNumber); + const y = Math.min(r, p.endLineNumber); + for (let w = v; w <= y; w++) { + l[w - n].push(b); + } + } + if (h.beforeContentClassName && n <= p.startLineNumber && p.startLineNumber <= r) { + const b = new cF(new Z(p.startLineNumber, p.startColumn, p.startLineNumber, p.startColumn), h.beforeContentClassName, 1); + l[p.startLineNumber - n].push(b); + } + if (h.afterContentClassName && n <= p.endLineNumber && p.endLineNumber <= r) { + const b = new cF(new Z(p.endLineNumber, p.endColumn, p.endLineNumber, p.endColumn), h.afterContentClassName, 2); + l[p.endLineNumber - n].push(b); + } + } + return { + decorations: o, + inlineDecorations: l + }; + } + }; + } +}); +function KUt(i, e) { + if (i === null) { + if (e) { + return YUt.INSTANCE; + } else { + return XUt.INSTANCE; + } + } else { + return new Fas(i, e); + } +} +function $as(i) { + if (i >= Qlt.length) { + for (let e = 1; e <= i; e++) { + Qlt[e] = hXn(e); + } + } + return Qlt[i]; +} +function hXn(i) { + return new Array(i + 1).join(" "); +} +var Fas; +var YUt; +var XUt; +var Qlt; +var fXn = ue({ + "out-build/vs/editor/common/viewModel/modelLineProjection.js"() { + "use strict"; + + RT(); + Rs(); + Kj(); + MI(); + Fas = class { + constructor(i, e) { + this.a = i; + this.b = e; + } + isVisible() { + return this.b; + } + setVisible(i) { + this.b = i; + return this; + } + getProjectionData() { + return this.a; + } + getViewLineCount() { + if (this.b) { + return this.a.getOutputLineCount(); + } else { + return 0; + } + } + getViewLineContent(i, e, t) { + this.d(); + const s = t > 0 ? this.a.breakOffsets[t - 1] : 0; + const n = this.a.breakOffsets[t]; + let r; + if (this.a.injectionOffsets !== null) { + const o = this.a.injectionOffsets.map((l, c) => new k4(0, 0, l + 1, this.a.injectionOptions[c], 0)); + r = k4.applyInjectedText(i.getLineContent(e), o).substring(s, n); + } else { + r = i.getValueInRange({ + startLineNumber: e, + startColumn: s + 1, + endLineNumber: e, + endColumn: n + 1 + }); + } + if (t > 0) { + r = $as(this.a.wrappedTextIndentLength) + r; + } + return r; + } + getViewLineLength(i, e, t) { + this.d(); + return this.a.getLineLength(t); + } + getViewLineMinColumn(i, e, t) { + this.d(); + return this.a.getMinOutputOffset(t) + 1; + } + getViewLineMaxColumn(i, e, t) { + this.d(); + return this.a.getMaxOutputOffset(t) + 1; + } + getViewLineData(i, e, t) { + const s = new Array(); + this.getViewLinesData(i, e, t, 1, 0, [true], s); + return s[0]; + } + getViewLinesData(i, e, t, s, n, r, o) { + this.d(); + const a = this.a; + const l = a.injectionOffsets; + const c = a.injectionOptions; + let u = null; + if (l) { + u = []; + let h = 0; + let g = 0; + for (let p = 0; p < a.getOutputLineCount(); p++) { + const b = new Array(); + u[p] = b; + const v = p > 0 ? a.breakOffsets[p - 1] : 0; + const y = a.breakOffsets[p]; + while (g < l.length) { + const w = c[g].content.length; + const C = l[g] + h; + const S = C + w; + if (C > y) { + break; + } + if (v < S) { + const x = c[g]; + if (x.inlineClassName) { + const k = p > 0 ? a.wrappedTextIndentLength : 0; + const E = k + Math.max(C - v, 0); + const D = k + Math.min(S - v, y - v); + if (E !== D) { + b.push(new dis(E, D, x.inlineClassName, x.inlineClassNameAffectsLetterSpacing)); + } + } + } + if (S <= y) { + h += w; + g++; + } else { + break; + } + } + } + } + let d; + if (l) { + const h = []; + for (let g = 0; g < l.length; g++) { + const p = l[g]; + const b = c[g].tokens; + if (b) { + b.forEach((v, y) => { + h.push({ + offset: p, + text: v.substring(c[g].content), + tokenMetadata: y.metadata + }); + }); + } else { + h.push({ + offset: p, + text: c[g].content, + tokenMetadata: Kb.defaultTokenMetadata + }); + } + } + d = i.tokenization.getLineTokens(e).withInserted(h); + } else { + d = i.tokenization.getLineTokens(e); + } + for (let h = t; h < t + s; h++) { + const g = n + h - t; + if (!r[g]) { + o[g] = null; + continue; + } + o[g] = this.c(d, u ? u[h] : null, h); + } + } + c(i, e, t) { + this.d(); + const s = this.a; + const n = t > 0 ? s.wrappedTextIndentLength : 0; + const r = t > 0 ? s.breakOffsets[t - 1] : 0; + const o = s.breakOffsets[t]; + const a = i.sliceAndInflate(r, o, n); + let l = a.getLineContent(); + if (t > 0) { + l = $as(s.wrappedTextIndentLength) + l; + } + const c = this.a.getMinOutputOffset(t) + 1; + const u = l.length + 1; + const d = t + 1 < this.getViewLineCount(); + const h = t === 0 ? 0 : s.breakOffsetsVisibleColumn[t - 1]; + return new Fat(l, d, c, u, h, a, e); + } + getModelColumnOfViewPosition(i, e) { + this.d(); + return this.a.translateToInputOffset(i, e - 1) + 1; + } + getViewPositionOfModelPosition(i, e, t = 2) { + this.d(); + return this.a.translateToOutputPosition(e - 1, t).toPosition(i); + } + getViewLineNumberOfModelPosition(i, e) { + this.d(); + const t = this.a.translateToOutputPosition(e - 1); + return i + t.outputLineIndex; + } + normalizePosition(i, e, t) { + const s = e.lineNumber - i; + return this.a.normalizeOutputPosition(i, e.column - 1, t).toPosition(s); + } + getInjectedTextAt(i, e) { + return this.a.getInjectedText(i, e - 1); + } + d() { + if (!this.b) { + throw new Error("Not supported"); + } + } + }; + YUt = class yOn { + static { + this.INSTANCE = new yOn(); + } + constructor() {} + isVisible() { + return true; + } + setVisible(e) { + if (e) { + return this; + } else { + return XUt.INSTANCE; + } + } + getProjectionData() { + return null; + } + getViewLineCount() { + return 1; + } + getViewLineContent(e, t, s) { + return e.getLineContent(t); + } + getViewLineLength(e, t, s) { + return e.getLineLength(t); + } + getViewLineMinColumn(e, t, s) { + return e.getLineMinColumn(t); + } + getViewLineMaxColumn(e, t, s) { + return e.getLineMaxColumn(t); + } + getViewLineData(e, t, s) { + const n = e.tokenization.getLineTokens(t); + const r = n.getLineContent(); + return new Fat(r, false, 1, r.length + 1, 0, n.inflate(), null); + } + getViewLinesData(e, t, s, n, r, o, a) { + if (!o[r]) { + a[r] = null; + return; + } + a[r] = this.getViewLineData(e, t, 0); + } + getModelColumnOfViewPosition(e, t) { + return t; + } + getViewPositionOfModelPosition(e, t) { + return new je(e, t); + } + getViewLineNumberOfModelPosition(e, t) { + return e; + } + normalizePosition(e, t, s) { + return t; + } + getInjectedTextAt(e, t) { + return null; + } + }; + XUt = class wOn { + static { + this.INSTANCE = new wOn(); + } + constructor() {} + isVisible() { + return false; + } + setVisible(e) { + if (e) { + return YUt.INSTANCE; + } else { + return this; + } + } + getProjectionData() { + return null; + } + getViewLineCount() { + return 0; + } + getViewLineContent(e, t, s) { + throw new Error("Not supported"); + } + getViewLineLength(e, t, s) { + throw new Error("Not supported"); + } + getViewLineMinColumn(e, t, s) { + throw new Error("Not supported"); + } + getViewLineMaxColumn(e, t, s) { + throw new Error("Not supported"); + } + getViewLineData(e, t, s) { + throw new Error("Not supported"); + } + getViewLinesData(e, t, s, n, r, o, a) { + throw new Error("Not supported"); + } + getModelColumnOfViewPosition(e, t) { + throw new Error("Not supported"); + } + getViewPositionOfModelPosition(e, t) { + throw new Error("Not supported"); + } + getViewLineNumberOfModelPosition(e, t) { + throw new Error("Not supported"); + } + normalizePosition(e, t, s) { + throw new Error("Not supported"); + } + getInjectedTextAt(e, t) { + throw new Error("Not supported"); + } + }; + Qlt = [""]; + } +}); +var hie; +var QUt; +var ZUt; +var mz = ue({ + "out-build/vs/editor/common/model/prefixSumComputer.js"() { + "use strict"; + + Jt(); + dot(); + hie = class { + constructor(i) { + this.a = i; + this.b = new Uint32Array(i.length); + this.c = new Int32Array(1); + this.c[0] = -1; + } + getCount() { + return this.a.length; + } + insertValues(i, e) { + i = Lee(i); + const t = this.a; + const s = this.b; + const n = e.length; + if (n === 0) { + return false; + } else { + this.a = new Uint32Array(t.length + n); + this.a.set(t.subarray(0, i), 0); + this.a.set(t.subarray(i), i + n); + this.a.set(e, i); + if (i - 1 < this.c[0]) { + this.c[0] = i - 1; + } + this.b = new Uint32Array(this.a.length); + if (this.c[0] >= 0) { + this.b.set(s.subarray(0, this.c[0] + 1)); + } + return true; + } + } + setValue(i, e) { + i = Lee(i); + e = Lee(e); + if (this.a[i] === e) { + return false; + } else { + this.a[i] = e; + if (i - 1 < this.c[0]) { + this.c[0] = i - 1; + } + return true; + } + } + removeValues(i, e) { + i = Lee(i); + e = Lee(e); + const t = this.a; + const s = this.b; + if (i >= t.length) { + return false; + } + const n = t.length - i; + if (e >= n) { + e = n; + } + if (e === 0) { + return false; + } else { + this.a = new Uint32Array(t.length - e); + this.a.set(t.subarray(0, i), 0); + this.a.set(t.subarray(i + e), i); + this.b = new Uint32Array(this.a.length); + if (i - 1 < this.c[0]) { + this.c[0] = i - 1; + } + if (this.c[0] >= 0) { + this.b.set(s.subarray(0, this.c[0] + 1)); + } + return true; + } + } + getTotalSum() { + if (this.a.length === 0) { + return 0; + } else { + return this.d(this.a.length - 1); + } + } + getPrefixSum(i) { + if (i < 0) { + return 0; + } else { + i = Lee(i); + return this.d(i); + } + } + d(i) { + if (i <= this.c[0]) { + return this.b[i]; + } + let e = this.c[0] + 1; + if (e === 0) { + this.b[0] = this.a[0]; + e++; + } + if (i >= this.a.length) { + i = this.a.length - 1; + } + for (let t = e; t <= i; t++) { + this.b[t] = this.b[t - 1] + this.a[t]; + } + this.c[0] = Math.max(this.c[0], i); + return this.b[i]; + } + getIndexOf(i) { + i = Math.floor(i); + this.getTotalSum(); + let e = 0; + let t = this.a.length - 1; + let s = 0; + let n = 0; + let r = 0; + while (e <= t) { + s = e + (t - e) / 2 | 0; + n = this.b[s]; + r = n - this.a[s]; + if (i < r) { + t = s - 1; + } else if (i >= n) { + e = s + 1; + } else { + break; + } + } + return new ZUt(s, i - r); + } + }; + QUt = class { + constructor(i) { + this.a = i; + this.b = false; + this.c = -1; + this.d = []; + this.e = []; + } + getTotalSum() { + this.g(); + return this.e.length; + } + getPrefixSum(i) { + this.g(); + if (i === 0) { + return 0; + } else { + return this.d[i - 1]; + } + } + getIndexOf(i) { + this.g(); + const e = this.e[i]; + const t = e > 0 ? this.d[e - 1] : 0; + return new ZUt(e, i - t); + } + removeValues(i, e) { + this.a.splice(i, e); + this.f(i); + } + insertValues(i, e) { + this.a = Xhe(this.a, i, e); + this.f(i); + } + f(i) { + this.b = false; + this.c = Math.min(this.c, i - 1); + } + g() { + if (!this.b) { + for (let i = this.c + 1, e = this.a.length; i < e; i++) { + const t = this.a[i]; + const s = i > 0 ? this.d[i - 1] : 0; + this.d[i] = s + t; + for (let n = 0; n < t; n++) { + this.e[s + n] = i; + } + } + this.d.length = this.a.length; + this.e.length = this.d[this.d.length - 1]; + this.b = true; + this.c = this.a.length - 1; + } + } + setValue(i, e) { + if (this.a[i] !== e) { + this.a[i] = e; + this.f(i); + } + } + }; + ZUt = class { + constructor(i, e) { + this.index = i; + this.remainder = e; + this._prefixSumIndexOfResultBrand = undefined; + this.index = i; + this.remainder = e; + } + }; + } +}); +function gXn(i) { + if (i.length === 0) { + return []; + } + const e = i.slice(); + e.sort(Z.compareRangesUsingStarts); + const t = []; + let s = e[0].startLineNumber; + let n = e[0].endLineNumber; + for (let r = 1, o = e.length; r < o; r++) { + const a = e[r]; + if (a.startLineNumber > n + 1) { + t.push(new Z(s, 1, n, 1)); + s = a.startLineNumber; + n = a.endLineNumber; + } else if (a.endLineNumber > n) { + n = a.endLineNumber; + } + } + t.push(new Z(s, 1, n, 1)); + return t; +} +var Oas; +var eWt; +var tWt; +var _as; +var Bas; +var Uas; +var Was; +var pXn = ue({ + "out-build/vs/editor/common/viewModel/viewModelLines.js"() { + "use strict"; + + Jt(); + Rs(); + yt(); + f9t(); + Ya(); + Kj(); + WUt(); + fXn(); + mz(); + MI(); + Oas = class { + constructor(i, e, t, s, n, r, o, a, l, c) { + this.c = i; + this.d = e; + this.e = -1; + this.f = t; + this.h = s; + this.k = n; + this.l = r; + this.q = o; + this.m = a; + this.n = l; + this.o = c; + this.w(true, null); + } + dispose() { + this.v = this.d.deltaDecorations(this.v, []); + } + createCoordinatesConverter() { + return new _as(this); + } + w(i, e) { + this.s = []; + if (i) { + this.v = this.d.deltaDecorations(this.v, []); + } + const t = this.d.getLinesContent(); + const s = this.d.getInjectedTextDecorations(this.c); + const n = t.length; + const r = this.createLineBreaksComputer(); + const o = new EL(k4.fromDecorations(s)); + for (let p = 0; p < n; p++) { + const b = o.takeWhile(v => v.lineNumber === p + 1); + r.addRequest(t[p], b, e ? e[p] : null); + } + const a = r.finalize(); + const l = []; + const c = this.v.map(p => this.d.getDecorationRange(p)).sort(Z.compareRangesUsingStarts); + let u = 1; + let d = 0; + let h = -1; + let g = h + 1 < c.length ? d + 1 : n + 2; + for (let p = 0; p < n; p++) { + const b = p + 1; + if (b === g) { + h++; + u = c[h].startLineNumber; + d = c[h].endLineNumber; + g = h + 1 < c.length ? d + 1 : n + 2; + } + const v = b >= u && b <= d; + const y = KUt(a[p], !v); + l[p] = y.getViewLineCount(); + this.s[p] = y; + } + this.e = this.d.getVersionId(); + this.u = new QUt(l); + } + getHiddenAreas() { + return this.v.map(i => this.d.getDecorationRange(i)); + } + setHiddenAreas(i) { + const e = i.map(d => this.d.validateRange(d)); + const t = gXn(e); + const s = this.v.map(d => this.d.getDecorationRange(d)).sort(Z.compareRangesUsingStarts); + if (t.length === s.length) { + let d = false; + for (let h = 0; h < t.length; h++) { + if (!t[h].equalsRange(s[h])) { + d = true; + break; + } + } + if (!d) { + return false; + } + } + const n = t.map(d => ({ + range: d, + options: Cr.EMPTY + })); + this.v = this.d.deltaDecorations(this.v, n); + const r = t; + let o = 1; + let a = 0; + let l = -1; + let c = l + 1 < r.length ? a + 1 : this.s.length + 2; + let u = false; + for (let d = 0; d < this.s.length; d++) { + const h = d + 1; + if (h === c) { + l++; + o = r[l].startLineNumber; + a = r[l].endLineNumber; + c = l + 1 < r.length ? a + 1 : this.s.length + 2; + } + let g = false; + if (h >= o && h <= a) { + if (this.s[d].isVisible()) { + this.s[d] = this.s[d].setVisible(false); + g = true; + } + } else { + u = true; + if (!this.s[d].isVisible()) { + this.s[d] = this.s[d].setVisible(true); + g = true; + } + } + if (g) { + const p = this.s[d].getViewLineCount(); + this.u.setValue(d, p); + } + } + if (!u) { + this.setHiddenAreas([]); + } + return true; + } + modelPositionIsVisible(i, e) { + if (i < 1 || i > this.s.length) { + return false; + } else { + return this.s[i - 1].isVisible(); + } + } + getModelLineViewLineCount(i) { + if (i < 1 || i > this.s.length) { + return 1; + } else { + return this.s[i - 1].getViewLineCount(); + } + } + setTabSize(i) { + if (this.l === i) { + return false; + } else { + this.l = i; + this.w(false, null); + return true; + } + } + setWrappingSettings(i, e, t, s, n) { + const r = this.k.equals(i); + const o = this.q === e; + const a = this.m === t; + const l = this.n === s; + const c = this.o === n; + if (r && o && a && l && c) { + return false; + } + const u = r && o && !a && l && c; + this.k = i; + this.q = e; + this.m = t; + this.n = s; + this.o = n; + let d = null; + if (u) { + d = []; + for (let h = 0, g = this.s.length; h < g; h++) { + d[h] = this.s[h].getProjectionData(); + } + } + this.w(false, d); + return true; + } + createLineBreaksComputer() { + return (this.q === "advanced" ? this.f : this.h).createLineBreaksComputer(this.k, this.l, this.m, this.n, this.o); + } + onModelFlushed() { + this.w(true, null); + } + onModelLinesDeleted(i, e, t) { + if (!i || i <= this.e) { + return null; + } + const s = e === 1 ? 1 : this.u.getPrefixSum(e - 1) + 1; + const n = this.u.getPrefixSum(t); + this.s.splice(e - 1, t - e + 1); + this.u.removeValues(e - 1, t - e + 1); + return new zlt(s, n); + } + onModelLinesInserted(i, e, t, s) { + if (!i || i <= this.e) { + return null; + } + const n = e > 2 && !this.s[e - 2].isVisible(); + const r = e === 1 ? 1 : this.u.getPrefixSum(e - 1) + 1; + let o = 0; + const a = []; + const l = []; + for (let c = 0, u = s.length; c < u; c++) { + const d = KUt(s[c], !n); + a.push(d); + const h = d.getViewLineCount(); + o += h; + l[c] = h; + } + this.s = this.s.slice(0, e - 1).concat(a).concat(this.s.slice(e - 1)); + this.u.insertValues(e - 1, l); + return new Jlt(r, r + o - 1); + } + onModelLineChanged(i, e, t) { + if (i !== null && i <= this.e) { + return [false, null, null, null]; + } + const s = e - 1; + const n = this.s[s].getViewLineCount(); + const r = this.s[s].isVisible(); + const o = KUt(t, r); + this.s[s] = o; + const a = this.s[s].getViewLineCount(); + let l = false; + let c = 0; + let u = -1; + let d = 0; + let h = -1; + let g = 0; + let p = -1; + if (n > a) { + c = this.u.getPrefixSum(e - 1) + 1; + u = c + a - 1; + g = u + 1; + p = g + (n - a) - 1; + l = true; + } else if (n < a) { + c = this.u.getPrefixSum(e - 1) + 1; + u = c + n - 1; + d = u + 1; + h = d + (a - n) - 1; + l = true; + } else { + c = this.u.getPrefixSum(e - 1) + 1; + u = c + a - 1; + } + this.u.setValue(s, a); + const b = c <= u ? new UUt(c, u - c + 1) : null; + const v = d <= h ? new Jlt(d, h) : null; + const y = g <= p ? new zlt(g, p) : null; + return [l, b, v, y]; + } + acceptVersionId(i) { + this.e = i; + if (this.s.length === 1 && !this.s[0].isVisible()) { + this.setHiddenAreas([]); + } + } + getViewLineCount() { + return this.u.getTotalSum(); + } + x(i) { + if (i < 1) { + return 1; + } + const e = this.getViewLineCount(); + if (i > e) { + return e; + } else { + return i | 0; + } + } + getActiveIndentGuide(i, e, t) { + i = this.x(i); + e = this.x(e); + t = this.x(t); + const s = this.convertViewPositionToModelPosition(i, this.getViewLineMinColumn(i)); + const n = this.convertViewPositionToModelPosition(e, this.getViewLineMinColumn(e)); + const r = this.convertViewPositionToModelPosition(t, this.getViewLineMinColumn(t)); + const o = this.d.guides.getActiveIndentGuide(s.lineNumber, n.lineNumber, r.lineNumber); + const a = this.convertModelPositionToViewPosition(o.startLineNumber, 1); + const l = this.convertModelPositionToViewPosition(o.endLineNumber, this.d.getLineMaxColumn(o.endLineNumber)); + return { + startLineNumber: a.lineNumber, + endLineNumber: l.lineNumber, + indent: o.indent + }; + } + y(i) { + i = this.x(i); + const e = this.u.getIndexOf(i - 1); + const t = e.index; + const s = e.remainder; + return new eWt(t + 1, s); + } + z(i) { + return this.s[i.modelLineNumber - 1].getViewLineMinColumn(this.d, i.modelLineNumber, i.modelLineWrappedLineIdx); + } + A(i) { + return this.s[i.modelLineNumber - 1].getViewLineMaxColumn(this.d, i.modelLineNumber, i.modelLineWrappedLineIdx); + } + B(i) { + const e = this.s[i.modelLineNumber - 1]; + const t = e.getViewLineMinColumn(this.d, i.modelLineNumber, i.modelLineWrappedLineIdx); + const s = e.getModelColumnOfViewPosition(i.modelLineWrappedLineIdx, t); + return new je(i.modelLineNumber, s); + } + C(i) { + const e = this.s[i.modelLineNumber - 1]; + const t = e.getViewLineMaxColumn(this.d, i.modelLineNumber, i.modelLineWrappedLineIdx); + const s = e.getModelColumnOfViewPosition(i.modelLineWrappedLineIdx, t); + return new je(i.modelLineNumber, s); + } + D(i, e) { + const t = this.y(i); + const s = this.y(e); + const n = new Array(); + let r = this.B(t); + let o = new Array(); + for (let a = t.modelLineNumber; a <= s.modelLineNumber; a++) { + const l = this.s[a - 1]; + if (l.isVisible()) { + const c = a === t.modelLineNumber ? t.modelLineWrappedLineIdx : 0; + const u = a === s.modelLineNumber ? s.modelLineWrappedLineIdx + 1 : l.getViewLineCount(); + for (let d = c; d < u; d++) { + o.push(new eWt(a, d)); + } + } + if (!l.isVisible() && r) { + const c = new je(a - 1, this.d.getLineMaxColumn(a - 1) + 1); + const u = Z.fromPositions(r, c); + n.push(new tWt(u, o)); + o = []; + r = null; + } else if (l.isVisible() && !r) { + r = new je(a, 1); + } + } + if (r) { + const a = Z.fromPositions(r, this.C(s)); + n.push(new tWt(a, o)); + } + return n; + } + getViewLinesBracketGuides(i, e, t, s) { + const n = t ? this.convertViewPositionToModelPosition(t.lineNumber, t.column) : null; + const r = []; + for (const o of this.D(i, e)) { + const a = o.modelRange.startLineNumber; + const l = this.d.guides.getLinesBracketGuides(a, o.modelRange.endLineNumber, n, s); + for (const c of o.viewLines) { + const d = l[c.modelLineNumber - a].map(h => { + if (h.forWrappedLinesAfterColumn !== -1 && this.s[c.modelLineNumber - 1].getViewPositionOfModelPosition(0, h.forWrappedLinesAfterColumn).lineNumber >= c.modelLineWrappedLineIdx || h.forWrappedLinesBeforeOrAtColumn !== -1 && this.s[c.modelLineNumber - 1].getViewPositionOfModelPosition(0, h.forWrappedLinesBeforeOrAtColumn).lineNumber < c.modelLineWrappedLineIdx) { + return; + } + if (!h.horizontalLine) { + return h; + } + let g = -1; + if (h.column !== -1) { + const v = this.s[c.modelLineNumber - 1].getViewPositionOfModelPosition(0, h.column); + if (v.lineNumber === c.modelLineWrappedLineIdx) { + g = v.column; + } else if (v.lineNumber < c.modelLineWrappedLineIdx) { + g = this.z(c); + } else if (v.lineNumber > c.modelLineWrappedLineIdx) { + return; + } + } + const p = this.convertModelPositionToViewPosition(c.modelLineNumber, h.horizontalLine.endColumn); + const b = this.s[c.modelLineNumber - 1].getViewPositionOfModelPosition(0, h.horizontalLine.endColumn); + if (b.lineNumber === c.modelLineWrappedLineIdx) { + return new B9(h.visibleColumn, g, h.className, new bte(h.horizontalLine.top, p.column), -1, -1); + } else if (b.lineNumber < c.modelLineWrappedLineIdx || h.visibleColumn !== -1) { + return undefined; + } else { + return new B9(h.visibleColumn, g, h.className, new bte(h.horizontalLine.top, this.A(c)), -1, -1); + } + }); + r.push(d.filter(h => !!h)); + } + } + return r; + } + getViewLinesIndentGuides(i, e) { + i = this.x(i); + e = this.x(e); + const t = this.convertViewPositionToModelPosition(i, this.getViewLineMinColumn(i)); + const s = this.convertViewPositionToModelPosition(e, this.getViewLineMaxColumn(e)); + let n = []; + const r = []; + const o = []; + const a = t.lineNumber - 1; + const l = s.lineNumber - 1; + let c = null; + for (let g = a; g <= l; g++) { + const p = this.s[g]; + if (p.isVisible()) { + const b = p.getViewLineNumberOfModelPosition(0, g === a ? t.column : 1); + const v = p.getViewLineNumberOfModelPosition(0, this.d.getLineMaxColumn(g + 1)); + const y = v - b + 1; + let w = 0; + if (y > 1 && p.getViewLineMinColumn(this.d, g + 1, v) === 1) { + w = b === 0 ? 1 : 2; + } + r.push(y); + o.push(w); + if (c === null) { + c = new je(g + 1, 0); + } + } else if (c !== null) { + n = n.concat(this.d.guides.getLinesIndentGuides(c.lineNumber, g)); + c = null; + } + } + if (c !== null) { + n = n.concat(this.d.guides.getLinesIndentGuides(c.lineNumber, s.lineNumber)); + c = null; + } + const u = e - i + 1; + const d = new Array(u); + let h = 0; + for (let g = 0, p = n.length; g < p; g++) { + let b = n[g]; + const v = Math.min(u - h, r[g]); + const y = o[g]; + let w; + if (y === 2) { + w = 0; + } else if (y === 1) { + w = 1; + } else { + w = v; + } + for (let C = 0; C < v; C++) { + if (C === w) { + b = 0; + } + d[h++] = b; + } + } + return d; + } + getViewLineContent(i) { + const e = this.y(i); + return this.s[e.modelLineNumber - 1].getViewLineContent(this.d, e.modelLineNumber, e.modelLineWrappedLineIdx); + } + getViewLineLength(i) { + const e = this.y(i); + return this.s[e.modelLineNumber - 1].getViewLineLength(this.d, e.modelLineNumber, e.modelLineWrappedLineIdx); + } + getViewLineMinColumn(i) { + const e = this.y(i); + return this.s[e.modelLineNumber - 1].getViewLineMinColumn(this.d, e.modelLineNumber, e.modelLineWrappedLineIdx); + } + getViewLineMaxColumn(i) { + const e = this.y(i); + return this.s[e.modelLineNumber - 1].getViewLineMaxColumn(this.d, e.modelLineNumber, e.modelLineWrappedLineIdx); + } + getViewLineData(i) { + const e = this.y(i); + return this.s[e.modelLineNumber - 1].getViewLineData(this.d, e.modelLineNumber, e.modelLineWrappedLineIdx); + } + getViewLinesData(i, e, t) { + i = this.x(i); + e = this.x(e); + const s = this.u.getIndexOf(i - 1); + let n = i; + const r = s.index; + const o = s.remainder; + const a = []; + for (let l = r, c = this.d.getLineCount(); l < c; l++) { + const u = this.s[l]; + if (!u.isVisible()) { + continue; + } + const d = l === r ? o : 0; + let h = u.getViewLineCount() - d; + let g = false; + if (n + h > e) { + g = true; + h = e - n + 1; + } + u.getViewLinesData(this.d, l + 1, d, h, n - i, t, a); + n += h; + if (g) { + break; + } + } + return a; + } + validateViewPosition(i, e, t) { + i = this.x(i); + const s = this.u.getIndexOf(i - 1); + const n = s.index; + const r = s.remainder; + const o = this.s[n]; + const a = o.getViewLineMinColumn(this.d, n + 1, r); + const l = o.getViewLineMaxColumn(this.d, n + 1, r); + if (e < a) { + e = a; + } + if (e > l) { + e = l; + } + const c = o.getModelColumnOfViewPosition(r, e); + if (this.d.validatePosition(new je(n + 1, c)).equals(t)) { + return new je(i, e); + } else { + return this.convertModelPositionToViewPosition(t.lineNumber, t.column); + } + } + validateViewRange(i, e) { + const t = this.validateViewPosition(i.startLineNumber, i.startColumn, e.getStartPosition()); + const s = this.validateViewPosition(i.endLineNumber, i.endColumn, e.getEndPosition()); + return new Z(t.lineNumber, t.column, s.lineNumber, s.column); + } + convertViewPositionToModelPosition(i, e) { + const t = this.y(i); + const s = this.s[t.modelLineNumber - 1].getModelColumnOfViewPosition(t.modelLineWrappedLineIdx, e); + return this.d.validatePosition(new je(t.modelLineNumber, s)); + } + convertViewRangeToModelRange(i) { + const e = this.convertViewPositionToModelPosition(i.startLineNumber, i.startColumn); + const t = this.convertViewPositionToModelPosition(i.endLineNumber, i.endColumn); + return new Z(e.lineNumber, e.column, t.lineNumber, t.column); + } + convertModelPositionToViewPosition(i, e, t = 2, s = false, n = false) { + const r = this.d.validatePosition(new je(i, e)); + const o = r.lineNumber; + const a = r.column; + let l = o - 1; + let c = false; + if (n) { + while (l < this.s.length && !this.s[l].isVisible()) { + l++; + c = true; + } + } else { + while (l > 0 && !this.s[l].isVisible()) { + l--; + c = true; + } + } + if (l === 0 && !this.s[l].isVisible()) { + return new je(s ? 0 : 1, 1); + } + const u = 1 + this.u.getPrefixSum(l); + let d; + if (c) { + if (n) { + d = this.s[l].getViewPositionOfModelPosition(u, 1, t); + } else { + d = this.s[l].getViewPositionOfModelPosition(u, this.d.getLineMaxColumn(l + 1), t); + } + } else { + d = this.s[o - 1].getViewPositionOfModelPosition(u, a, t); + } + return d; + } + convertModelRangeToViewRange(i, e = 0) { + if (i.isEmpty()) { + const t = this.convertModelPositionToViewPosition(i.startLineNumber, i.startColumn, e); + return Z.fromPositions(t); + } else { + const t = this.convertModelPositionToViewPosition(i.startLineNumber, i.startColumn, 1); + const s = this.convertModelPositionToViewPosition(i.endLineNumber, i.endColumn, 0); + return new Z(t.lineNumber, t.column, s.lineNumber, s.column); + } + } + getViewLineNumberOfModelPosition(i, e) { + let t = i - 1; + if (this.s[t].isVisible()) { + const n = 1 + this.u.getPrefixSum(t); + return this.s[t].getViewLineNumberOfModelPosition(n, e); + } + while (t > 0 && !this.s[t].isVisible()) { + t--; + } + if (t === 0 && !this.s[t].isVisible()) { + return 1; + } + const s = 1 + this.u.getPrefixSum(t); + return this.s[t].getViewLineNumberOfModelPosition(s, this.d.getLineMaxColumn(t + 1)); + } + getDecorationsInRange(i, e, t, s, n) { + const r = this.convertViewPositionToModelPosition(i.startLineNumber, i.startColumn); + const o = this.convertViewPositionToModelPosition(i.endLineNumber, i.endColumn); + if (o.lineNumber - r.lineNumber <= i.endLineNumber - i.startLineNumber) { + return this.d.getDecorationsInRange(new Z(r.lineNumber, 1, o.lineNumber, o.column), e, t, s, n); + } + let a = []; + const l = r.lineNumber - 1; + const c = o.lineNumber - 1; + let u = null; + for (let p = l; p <= c; p++) { + if (this.s[p].isVisible()) { + if (u === null) { + u = new je(p + 1, p === l ? r.column : 1); + } + } else if (u !== null) { + const v = this.d.getLineMaxColumn(p); + a = a.concat(this.d.getDecorationsInRange(new Z(u.lineNumber, u.column, p, v), e, t, s)); + u = null; + } + } + if (u !== null) { + a = a.concat(this.d.getDecorationsInRange(new Z(u.lineNumber, u.column, o.lineNumber, o.column), e, t, s)); + u = null; + } + a.sort((p, b) => { + const v = Z.compareRangesUsingStarts(p.range, b.range); + if (v === 0) { + if (p.id < b.id) { + return -1; + } else if (p.id > b.id) { + return 1; + } else { + return 0; + } + } else { + return v; + } + }); + const d = []; + let h = 0; + let g = null; + for (const p of a) { + const b = p.id; + if (g !== b) { + g = b; + d[h++] = p; + } + } + return d; + } + getInjectedTextAt(i) { + const e = this.y(i.lineNumber); + return this.s[e.modelLineNumber - 1].getInjectedTextAt(e.modelLineWrappedLineIdx, i.column); + } + normalizePosition(i, e) { + const t = this.y(i.lineNumber); + return this.s[t.modelLineNumber - 1].normalizePosition(t.modelLineWrappedLineIdx, i, e); + } + getLineIndentColumn(i) { + const e = this.y(i); + if (e.modelLineWrappedLineIdx === 0) { + return this.d.getLineIndentColumn(e.modelLineNumber); + } else { + return 0; + } + } + }; + eWt = class { + get isWrappedLineContinuation() { + return this.modelLineWrappedLineIdx > 0; + } + constructor(i, e) { + this.modelLineNumber = i; + this.modelLineWrappedLineIdx = e; + } + }; + tWt = class { + constructor(i, e) { + this.modelRange = i; + this.viewLines = e; + } + }; + _as = class { + constructor(i) { + this.c = i; + } + convertViewPositionToModelPosition(i) { + return this.c.convertViewPositionToModelPosition(i.lineNumber, i.column); + } + convertViewRangeToModelRange(i) { + return this.c.convertViewRangeToModelRange(i); + } + validateViewPosition(i, e) { + return this.c.validateViewPosition(i.lineNumber, i.column, e); + } + validateViewRange(i, e) { + return this.c.validateViewRange(i, e); + } + convertModelPositionToViewPosition(i, e, t, s) { + return this.c.convertModelPositionToViewPosition(i.lineNumber, i.column, e, t, s); + } + convertModelRangeToViewRange(i, e) { + return this.c.convertModelRangeToViewRange(i, e); + } + modelPositionIsVisible(i) { + return this.c.modelPositionIsVisible(i.lineNumber, i.column); + } + getModelLineViewLineCount(i) { + return this.c.getModelLineViewLineCount(i); + } + getViewLineNumberOfModelPosition(i, e) { + return this.c.getViewLineNumberOfModelPosition(i, e); + } + }; + (function (i) { + i[i.BlockNone = 0] = "BlockNone"; + i[i.BlockSubsequent = 1] = "BlockSubsequent"; + i[i.BlockAll = 2] = "BlockAll"; + })(Bas ||= {}); + Uas = class { + constructor(i) { + this.model = i; + } + dispose() {} + createCoordinatesConverter() { + return new Was(this); + } + getHiddenAreas() { + return []; + } + setHiddenAreas(i) { + return false; + } + setTabSize(i) { + return false; + } + setWrappingSettings(i, e, t, s) { + return false; + } + createLineBreaksComputer() { + const i = []; + return { + addRequest: (e, t, s) => { + i.push(null); + }, + finalize: () => i + }; + } + onModelFlushed() {} + onModelLinesDeleted(i, e, t) { + return new zlt(e, t); + } + onModelLinesInserted(i, e, t, s) { + return new Jlt(e, t); + } + onModelLineChanged(i, e, t) { + return [false, new UUt(e, 1), null, null]; + } + acceptVersionId(i) {} + getViewLineCount() { + return this.model.getLineCount(); + } + getActiveIndentGuide(i, e, t) { + return { + startLineNumber: i, + endLineNumber: i, + indent: 0 + }; + } + getViewLinesBracketGuides(i, e, t) { + return new Array(e - i + 1).fill([]); + } + getViewLinesIndentGuides(i, e) { + const t = e - i + 1; + const s = new Array(t); + for (let n = 0; n < t; n++) { + s[n] = 0; + } + return s; + } + getViewLineContent(i) { + return this.model.getLineContent(i); + } + getViewLineLength(i) { + return this.model.getLineLength(i); + } + getViewLineMinColumn(i) { + return this.model.getLineMinColumn(i); + } + getViewLineMaxColumn(i) { + return this.model.getLineMaxColumn(i); + } + getViewLineData(i) { + const e = this.model.tokenization.getLineTokens(i); + const t = e.getLineContent(); + return new Fat(t, false, 1, t.length + 1, 0, e.inflate(), null); + } + getViewLinesData(i, e, t) { + const s = this.model.getLineCount(); + i = Math.min(Math.max(1, i), s); + e = Math.min(Math.max(1, e), s); + const n = []; + for (let r = i; r <= e; r++) { + const o = r - i; + n[o] = t[o] ? this.getViewLineData(r) : null; + } + return n; + } + getDecorationsInRange(i, e, t, s, n) { + return this.model.getDecorationsInRange(i, e, t, s, n); + } + normalizePosition(i, e) { + return this.model.normalizePosition(i, e); + } + getLineIndentColumn(i) { + return this.model.getLineIndentColumn(i); + } + getInjectedTextAt(i) { + return null; + } + }; + Was = class { + constructor(i) { + this.c = i; + } + d(i) { + return this.c.model.validatePosition(i); + } + e(i) { + return this.c.model.validateRange(i); + } + convertViewPositionToModelPosition(i) { + return this.d(i); + } + convertViewRangeToModelRange(i) { + return this.e(i); + } + validateViewPosition(i, e) { + return this.d(e); + } + validateViewRange(i, e) { + return this.e(e); + } + convertModelPositionToViewPosition(i) { + return this.d(i); + } + convertModelRangeToViewRange(i) { + return this.e(i); + } + modelPositionIsVisible(i) { + const e = this.c.model.getLineCount(); + return !(i.lineNumber < 1) && !(i.lineNumber > e); + } + modelRangeIsVisible(i) { + const e = this.c.model.getLineCount(); + return !(i.startLineNumber < 1) && !(i.startLineNumber > e) && !(i.endLineNumber < 1) && !(i.endLineNumber > e); + } + getModelLineViewLineCount(i) { + return 1; + } + getViewLineNumberOfModelPosition(i, e) { + return i; + } + }; + } +}); +var d7; +var Vas; +var mXn = ue({ + "out-build/vs/editor/common/viewModel/glyphLanesModel.js"() { + "use strict"; + + gc(); + d7 = Dx.Right; + Vas = class { + constructor(i) { + this.b = 0; + this.c = 1; + this.a = new Uint8Array(Math.ceil((i + 1) * d7 / 8)); + } + reset(i) { + const e = Math.ceil((i + 1) * d7 / 8); + if (this.a.length < e) { + this.a = new Uint8Array(e); + } else { + this.a.fill(0); + } + this.c = 1; + } + get requiredLanes() { + return this.c; + } + push(i, e, t) { + if (t) { + this.b |= 1 << i - 1; + } + for (let s = e.startLineNumber; s <= e.endLineNumber; s++) { + const n = d7 * s + (i - 1); + this.a[n >>> 3] |= 1 << n % 8; + this.c = Math.max(this.c, this.d(s)); + } + } + getLanesAtLine(i) { + const e = []; + let t = d7 * i; + for (let s = 0; s < d7; s++) { + if (this.b & 1 << s || this.a[t >>> 3] & 1 << t % 8) { + e.push(s + 1); + } + t++; + } + if (e.length) { + return e; + } else { + return [Dx.Center]; + } + } + d(i) { + let e = d7 * i; + let t = 0; + for (let s = 0; s < d7; s++) { + if (this.b & 1 << s || this.a[e >>> 3] & 1 << e % 8) { + t++; + } + e++; + } + return t; + } + }; + } +}); +function bXn(i, e) { + const t = []; + let s = 0; + let n = 0; + while (s < i.length && n < e.length) { + const r = i[s]; + const o = e[n]; + if (r.endLineNumber < o.startLineNumber - 1) { + t.push(i[s++]); + } else if (o.endLineNumber < r.startLineNumber - 1) { + t.push(e[n++]); + } else { + const a = Math.min(r.startLineNumber, o.startLineNumber); + const l = Math.max(r.endLineNumber, o.endLineNumber); + t.push(new Z(a, 1, l, 1)); + s++; + n++; + } + } + while (s < i.length) { + t.push(i[s++]); + } + while (n < e.length) { + t.push(e[n++]); + } + return t; +} +function Has(i, e) { + if (i.length !== e.length) { + return false; + } + for (let t = 0; t < i.length; t++) { + if (!i[t].equalsRange(e[t])) { + return false; + } + } + return true; +} +var qas; +var jas; +var zas; +var Jas; +var Gas; +var iWt; +var vXn = ue({ + "out-build/vs/editor/common/viewModel/viewModelImpl.js"() { + "use strict"; + + Jt(); + nt(); + Zo(); + q(); + rt(); + $i(); + Qd(); + qUt(); + kI(); + Rs(); + yt(); + Kj(); + Eo(); + gf(); + u7(); + WUt(); + dXn(); + lis(); + MI(); + Aas(); + Glt(); + pXn(); + mXn(); + qas = true; + jas = class extends H { + constructor(i, e, t, s, n, r, o, a, l, c) { + super(); + this.s = o; + this.t = a; + this.u = l; + this.w = c; + this.I = new Gas(); + this.J = []; + this.a = i; + this.b = e; + this.model = t; + this.c = new aas(); + this.onEvent = this.c.onEvent; + this.cursorConfig = new b9(this.model.getLanguageId(), this.model.getOptions(), this.b, this.s); + this.f = this.D(new Vn(() => this.y(), 0)); + this.g = false; + this.h = zas.create(this.model); + this.glyphLanes = new Vas(0); + if (qas && this.model.isTooLargeForTokenization()) { + this.m = new Uas(this.model); + } else { + const u = this.b.options; + const d = u.get(52); + const h = u.get(144); + const g = u.get(152); + const p = u.get(143); + const b = u.get(134); + this.m = new Oas(this.a, this.model, s, n, d, this.model.getOptions().tabSize, h, g.wrappingColumn, p, b); + } + this.coordinatesConverter = this.m.createCoordinatesConverter(); + this.n = this.D(new VUt(t, this, this.coordinatesConverter, this.cursorConfig)); + this.viewLayout = this.D(new Ras(this.b, this.getLineCount(), r)); + this.D(this.viewLayout.onDidScroll(u => { + if (u.scrollTopChanged) { + this.C(); + } + if (u.scrollTopChanged) { + this.h.invalidate(); + } + this.c.emitSingleViewEvent(new ias(u)); + this.c.emitOutgoingEvent(new das(u.oldScrollWidth, u.oldScrollLeft, u.oldScrollHeight, u.oldScrollTop, u.scrollWidth, u.scrollLeft, u.scrollHeight, u.scrollTop)); + })); + this.D(this.viewLayout.onDidContentSizeChange(u => { + this.c.emitOutgoingEvent(u); + })); + this.q = new Mas(this.a, this.model, this.b, this.m, this.coordinatesConverter); + this.H(); + this.D(this.b.onDidChangeFast(u => { + try { + const d = this.c.beginEmitViewEvents(); + this.G(d, u); + } finally { + this.c.endEmitViewEvents(); + } + })); + this.D(S9t.getInstance().onDidChange(() => { + this.c.emitSingleViewEvent(new ras()); + })); + this.D(this.t.onDidColorThemeChange(u => { + this.P(); + this.c.emitSingleViewEvent(new sas(u)); + })); + this.y(); + } + dispose() { + super.dispose(); + this.q.dispose(); + this.m.dispose(); + this.h.dispose(); + this.c.dispose(); + } + createLineBreaksComputer() { + return this.m.createLineBreaksComputer(); + } + addViewEventHandler(i) { + this.c.addViewEventHandler(i); + } + removeViewEventHandler(i) { + this.c.removeViewEventHandler(i); + } + y() { + this.b.setViewLineCount(this.m.getViewLineCount()); + } + z() { + const i = this.viewLayout.getLinesViewportData(); + const e = new Z(i.startLineNumber, this.getLineMinColumn(i.startLineNumber), i.endLineNumber, this.getLineMaxColumn(i.endLineNumber)); + return this.L(e); + } + visibleLinesStabilized() { + const i = this.z(); + this.u.setVisibleLines(i, true); + } + C() { + const i = this.z(); + this.u.setVisibleLines(i, false); + } + setHasFocus(i) { + this.g = i; + this.n.setHasFocus(i); + this.c.emitSingleViewEvent(new Zos(i)); + this.c.emitOutgoingEvent(new uas(!i, i)); + } + onCompositionStart() { + this.c.emitSingleViewEvent(new Kos()); + } + onCompositionEnd() { + this.c.emitSingleViewEvent(new Yos()); + } + F() { + if (this.h.isValid && this.viewLayout.getCurrentScrollTop() > 0) { + const i = new je(this.h.viewLineNumber, this.getLineMinColumn(this.h.viewLineNumber)); + const e = this.coordinatesConverter.convertViewPositionToModelPosition(i); + return new iWt(e, this.h.startLineDelta); + } + return new iWt(null, 0); + } + G(i, e) { + const t = this.F(); + const s = this.b.options; + const n = s.get(52); + const r = s.get(144); + const o = s.get(152); + const a = s.get(143); + const l = s.get(134); + if (this.m.setWrappingSettings(n, r, o.wrappingColumn, a, l)) { + i.emitViewEvent(new pme()); + i.emitViewEvent(new mme()); + i.emitViewEvent(new c7(null)); + this.n.onLineMappingChanged(i); + this.q.onLineMappingChanged(); + this.viewLayout.onFlushed(this.getLineCount()); + this.f.schedule(); + } + if (e.hasChanged(96)) { + this.q.reset(); + i.emitViewEvent(new c7(null)); + } + if (e.hasChanged(103)) { + this.q.reset(); + i.emitViewEvent(new c7(null)); + } + i.emitViewEvent(new Xos(e)); + this.viewLayout.onConfigurationChanged(e); + t.recoverViewportStart(this.coordinatesConverter, this.viewLayout); + if (b9.shouldRecreate(e)) { + this.cursorConfig = new b9(this.model.getLanguageId(), this.model.getOptions(), this.b, this.s); + this.n.updateConfiguration(this.cursorConfig); + } + } + H() { + this.D(this.model.onDidChangeContentOrInjectedText(i => { + try { + const t = this.c.beginEmitViewEvents(); + let s = false; + let n = false; + const r = i instanceof Fpe ? i.rawContentChangedEvent.changes : i.changes; + const o = i instanceof Fpe ? i.rawContentChangedEvent.versionId : null; + const a = this.m.createLineBreaksComputer(); + for (const u of r) { + switch (u.changeType) { + case 4: + { + for (let d = 0; d < u.detail.length; d++) { + const h = u.detail[d]; + let g = u.injectedTexts[d]; + g &&= g.filter(p => !p.ownerId || p.ownerId === this.a); + a.addRequest(h, g, null); + } + break; + } + case 2: + { + let d = null; + if (u.injectedText) { + d = u.injectedText.filter(h => !h.ownerId || h.ownerId === this.a); + } + a.addRequest(u.detail, d, null); + break; + } + } + } + const l = a.finalize(); + const c = new EL(l); + for (const u of r) { + switch (u.changeType) { + case 1: + { + this.m.onModelFlushed(); + t.emitViewEvent(new pme()); + this.q.reset(); + this.viewLayout.onFlushed(this.getLineCount()); + s = true; + break; + } + case 3: + { + const d = this.m.onModelLinesDeleted(o, u.fromLineNumber, u.toLineNumber); + if (d !== null) { + t.emitViewEvent(d); + this.viewLayout.onLinesDeleted(d.fromLineNumber, d.toLineNumber); + } + s = true; + break; + } + case 4: + { + const d = c.takeCount(u.detail.length); + const h = this.m.onModelLinesInserted(o, u.fromLineNumber, u.toLineNumber, d); + if (h !== null) { + t.emitViewEvent(h); + this.viewLayout.onLinesInserted(h.fromLineNumber, h.toLineNumber); + } + s = true; + break; + } + case 2: + { + const d = c.dequeue(); + const [h, g, p, b] = this.m.onModelLineChanged(o, u.lineNumber, d); + n = h; + if (g) { + t.emitViewEvent(g); + } + if (p) { + t.emitViewEvent(p); + this.viewLayout.onLinesInserted(p.fromLineNumber, p.toLineNumber); + } + if (b) { + t.emitViewEvent(b); + this.viewLayout.onLinesDeleted(b.fromLineNumber, b.toLineNumber); + } + break; + } + case 5: + break; + } + } + if (o !== null) { + this.m.acceptVersionId(o); + } + this.viewLayout.onHeightMaybeChanged(); + if (!s && n) { + t.emitViewEvent(new mme()); + t.emitViewEvent(new c7(null)); + this.n.onLineMappingChanged(t); + this.q.onLineMappingChanged(); + } + } finally { + this.c.endEmitViewEvents(); + } + const e = this.h.isValid; + this.h.invalidate(); + this.b.setModelLineCount(this.model.getLineCount()); + this.y(); + if (!this.g && this.model.getAttachedEditorCount() >= 2 && e) { + const t = this.model._getTrackedRange(this.h.modelTrackedRange); + if (t) { + const s = this.coordinatesConverter.convertModelPositionToViewPosition(t.getStartPosition()); + const n = this.viewLayout.getVerticalOffsetForLineNumber(s.lineNumber); + this.viewLayout.setScrollPosition({ + scrollTop: n + this.h.startLineDelta + }, 1); + } + } + try { + const t = this.c.beginEmitViewEvents(); + if (i instanceof Fpe) { + t.emitOutgoingEvent(new yas(i.contentChangedEvent)); + } + this.n.onModelContentChanged(t, i); + } finally { + this.c.endEmitViewEvents(); + } + this.C(); + })); + this.D(this.model.onDidChangeTokens(i => { + const e = []; + for (let t = 0, s = i.ranges.length; t < s; t++) { + const n = i.ranges[t]; + const r = this.coordinatesConverter.convertModelPositionToViewPosition(new je(n.fromLineNumber, 1)).lineNumber; + const o = this.coordinatesConverter.convertModelPositionToViewPosition(new je(n.toLineNumber, this.model.getLineMaxColumn(n.toLineNumber))).lineNumber; + e[t] = { + fromLineNumber: r, + toLineNumber: o + }; + } + this.c.emitSingleViewEvent(new nas(e)); + this.c.emitOutgoingEvent(new Cas(i)); + })); + this.D(this.model.onDidChangeLanguageConfiguration(i => { + this.c.emitSingleViewEvent(new eas()); + this.cursorConfig = new b9(this.model.getLanguageId(), this.model.getOptions(), this.b, this.s); + this.n.updateConfiguration(this.cursorConfig); + this.c.emitOutgoingEvent(new vas(i)); + })); + this.D(this.model.onDidChangeLanguage(i => { + this.cursorConfig = new b9(this.model.getLanguageId(), this.model.getOptions(), this.b, this.s); + this.n.updateConfiguration(this.cursorConfig); + this.c.emitOutgoingEvent(new bas(i)); + })); + this.D(this.model.onDidChangeOptions(i => { + if (this.m.setTabSize(this.model.getOptions().tabSize)) { + try { + const e = this.c.beginEmitViewEvents(); + e.emitViewEvent(new pme()); + e.emitViewEvent(new mme()); + e.emitViewEvent(new c7(null)); + this.n.onLineMappingChanged(e); + this.q.onLineMappingChanged(); + this.viewLayout.onFlushed(this.getLineCount()); + } finally { + this.c.endEmitViewEvents(); + } + this.f.schedule(); + } + this.cursorConfig = new b9(this.model.getLanguageId(), this.model.getOptions(), this.b, this.s); + this.n.updateConfiguration(this.cursorConfig); + this.c.emitOutgoingEvent(new was(i)); + })); + this.D(this.model.onDidChangeDecorations(i => { + this.q.onModelDecorationsChanged(); + this.c.emitSingleViewEvent(new c7(i)); + this.c.emitOutgoingEvent(new mas(i)); + })); + } + setHiddenAreas(i, e, t) { + this.I.setHiddenAreas(e, i); + const s = this.I.getMergedRanges(); + if (s === this.J && !t) { + return; + } + this.J = s; + const n = this.F(); + let r = false; + try { + const o = this.c.beginEmitViewEvents(); + r = this.m.setHiddenAreas(s); + if (r) { + o.emitViewEvent(new pme()); + o.emitViewEvent(new mme()); + o.emitViewEvent(new c7(null)); + this.n.onLineMappingChanged(o); + this.q.onLineMappingChanged(); + this.viewLayout.onFlushed(this.getLineCount()); + this.viewLayout.onHeightMaybeChanged(); + } + const a = n.viewportStartModelPosition?.lineNumber; + if (!a || !s.some(c => c.startLineNumber <= a && a <= c.endLineNumber)) { + n.recoverViewportStart(this.coordinatesConverter, this.viewLayout); + } + } finally { + this.c.endEmitViewEvents(); + } + this.f.schedule(); + if (r) { + this.c.emitOutgoingEvent(new fas()); + } + } + getVisibleRangesPlusViewportAboveBelow() { + const i = this.b.options.get(151); + const e = this.b.options.get(68); + const t = Math.max(20, Math.round(i.height / e)); + const s = this.viewLayout.getLinesViewportData(); + const n = Math.max(1, s.completelyVisibleStartLineNumber - t); + const r = Math.min(this.getLineCount(), s.completelyVisibleEndLineNumber + t); + return this.L(new Z(n, this.getLineMinColumn(n), r, this.getLineMaxColumn(r))); + } + getVisibleRanges() { + const i = this.getCompletelyVisibleViewRange(); + return this.L(i); + } + getHiddenAreas() { + return this.m.getHiddenAreas(); + } + L(i) { + const e = this.coordinatesConverter.convertViewRangeToModelRange(i); + const t = this.m.getHiddenAreas(); + if (t.length === 0) { + return [e]; + } + const s = []; + let n = 0; + let r = e.startLineNumber; + let o = e.startColumn; + const a = e.endLineNumber; + const l = e.endColumn; + for (let c = 0, u = t.length; c < u; c++) { + const d = t[c].startLineNumber; + const h = t[c].endLineNumber; + if (!(h < r) && !(d > a)) { + if (r < d) { + s[n++] = new Z(r, o, d - 1, this.model.getLineMaxColumn(d - 1)); + } + r = h + 1; + o = 1; + } + } + if (r < a || r === a && o < l) { + s[n++] = new Z(r, o, a, l); + } + return s; + } + getCompletelyVisibleViewRange() { + const i = this.viewLayout.getLinesViewportData(); + const e = i.completelyVisibleStartLineNumber; + const t = i.completelyVisibleEndLineNumber; + return new Z(e, this.getLineMinColumn(e), t, this.getLineMaxColumn(t)); + } + getCompletelyVisibleViewRangeAtScrollTop(i) { + const e = this.viewLayout.getLinesViewportDataAtScrollTop(i); + const t = e.completelyVisibleStartLineNumber; + const s = e.completelyVisibleEndLineNumber; + return new Z(t, this.getLineMinColumn(t), s, this.getLineMaxColumn(s)); + } + saveState() { + const i = this.viewLayout.saveState(); + const e = i.scrollTop; + const t = this.viewLayout.getLineNumberAtVerticalOffset(e); + const s = this.coordinatesConverter.convertViewPositionToModelPosition(new je(t, this.getLineMinColumn(t))); + const n = this.viewLayout.getVerticalOffsetForLineNumber(t) - e; + return { + scrollLeft: i.scrollLeft, + firstPosition: s, + firstPositionDeltaTop: n + }; + } + reduceRestoreState(i) { + if (typeof i.firstPosition === "undefined") { + return this.M(i); + } + const e = this.model.validatePosition(i.firstPosition); + const t = this.coordinatesConverter.convertModelPositionToViewPosition(e); + const s = this.viewLayout.getVerticalOffsetForLineNumber(t.lineNumber) - i.firstPositionDeltaTop; + return { + scrollLeft: i.scrollLeft, + scrollTop: s + }; + } + M(i) { + return { + scrollLeft: i.scrollLeft, + scrollTop: i.scrollTopWithoutViewZones + }; + } + N() { + return this.model.getOptions().tabSize; + } + getLineCount() { + return this.m.getViewLineCount(); + } + setViewport(i, e, t) { + this.h.update(this, i); + } + getActiveIndentGuide(i, e, t) { + return this.m.getActiveIndentGuide(i, e, t); + } + getLinesIndentGuides(i, e) { + return this.m.getViewLinesIndentGuides(i, e); + } + getBracketGuidesInRangeByLine(i, e, t, s) { + return this.m.getViewLinesBracketGuides(i, e, t, s); + } + getLineContent(i) { + return this.m.getViewLineContent(i); + } + getLineLength(i) { + return this.m.getViewLineLength(i); + } + getLineMinColumn(i) { + return this.m.getViewLineMinColumn(i); + } + getLineMaxColumn(i) { + return this.m.getViewLineMaxColumn(i); + } + getLineFirstNonWhitespaceColumn(i) { + const e = B0(this.getLineContent(i)); + if (e === -1) { + return 0; + } else { + return e + 1; + } + } + getLineLastNonWhitespaceColumn(i) { + const e = TL(this.getLineContent(i)); + if (e === -1) { + return 0; + } else { + return e + 2; + } + } + getMinimapDecorationsInRange(i) { + return this.q.getMinimapDecorationsInRange(i); + } + getDecorationsInViewport(i) { + return this.q.getDecorationsViewportData(i).decorations; + } + getInjectedTextAt(i) { + return this.m.getInjectedTextAt(i); + } + getViewportViewLineRenderingData(i, e) { + const s = this.q.getDecorationsViewportData(i).inlineDecorations[e - i.startLineNumber]; + return this.O(e, s); + } + getViewLineRenderingData(i) { + const e = this.q.getInlineDecorationsOnLine(i); + return this.O(i, e); + } + O(i, e) { + const t = this.model.mightContainRTL(); + const s = this.model.mightContainNonBasicASCII(); + const n = this.N(); + const r = this.m.getViewLineData(i); + if (r.inlineDecorations) { + e = [...e, ...r.inlineDecorations.map(o => o.toInlineDecoration(i))]; + } + return new Ete(r.minColumn, r.maxColumn, r.content, r.continuesWithWrappedLine, t, s, r.tokens, e, n, r.startVisibleColumn); + } + getViewLineData(i) { + return this.m.getViewLineData(i); + } + getMinimapLinesRenderingData(i, e, t) { + const s = this.m.getViewLinesData(i, e, t); + return new cis(this.N(), s); + } + getAllOverviewRulerDecorations(i) { + const e = this.model.getOverviewRulerDecorations(this.a, Uot(this.b.options)); + const t = new Jas(); + for (const s of e) { + const n = s.options; + const r = n.overviewRuler; + if (!r) { + continue; + } + const o = r.position; + if (o === 0) { + continue; + } + const a = r.getColor(i.value); + const l = this.coordinatesConverter.getViewLineNumberOfModelPosition(s.range.startLineNumber, s.range.startColumn); + const c = this.coordinatesConverter.getViewLineNumberOfModelPosition(s.range.endLineNumber, s.range.endColumn); + t.accept(a, n.zIndex, l, c, o); + } + return t.asArray; + } + P() { + const i = this.model.getOverviewRulerDecorations(); + for (const e of i) { + e.options.overviewRuler?.invalidateCachedColor(); + e.options.minimap?.invalidateCachedColor(); + } + } + getValueInRange(i, e) { + const t = this.coordinatesConverter.convertViewRangeToModelRange(i); + return this.model.getValueInRange(t, e); + } + getValueLengthInRange(i, e) { + const t = this.coordinatesConverter.convertViewRangeToModelRange(i); + return this.model.getValueLengthInRange(t, e); + } + modifyPosition(i, e) { + const t = this.coordinatesConverter.convertViewPositionToModelPosition(i); + const s = this.model.modifyPosition(t, e); + return this.coordinatesConverter.convertModelPositionToViewPosition(s); + } + deduceModelPositionRelativeToViewPosition(i, e, t) { + const s = this.coordinatesConverter.convertViewPositionToModelPosition(i); + if (this.model.getEOL().length === 2) { + if (e < 0) { + e -= t; + } else { + e += t; + } + } + const r = this.model.getOffsetAt(s) + e; + return this.model.getPositionAt(r); + } + getPlainTextToCopy(i, e, t) { + const s = t ? `\r +` : this.model.getEOL(); + i = i.slice(0); + i.sort(Z.compareRangesUsingStarts); + let n = false; + let r = false; + for (const a of i) { + if (a.isEmpty()) { + n = true; + } else { + r = true; + } + } + if (!r) { + if (!e) { + return ""; + } + const a = i.map(c => c.startLineNumber); + let l = ""; + for (let c = 0; c < a.length; c++) { + if (!(c > 0) || a[c - 1] !== a[c]) { + l += this.model.getLineContent(a[c]) + s; + } + } + return l; + } + if (n && e) { + const a = []; + let l = 0; + for (const c of i) { + const u = c.startLineNumber; + if (c.isEmpty()) { + if (u !== l) { + a.push(this.model.getLineContent(u)); + } + } else { + a.push(this.model.getValueInRange(c, t ? 2 : 0)); + } + l = u; + } + if (a.length === 1) { + return a[0]; + } else { + return a; + } + } + const o = []; + for (const a of i) { + if (!a.isEmpty()) { + o.push(this.model.getValueInRange(a, t ? 2 : 0)); + } + } + if (o.length === 1) { + return o[0]; + } else { + return o; + } + } + getRichTextToCopy(i, e) { + const t = this.model.getLanguageId(); + if (t === Ju || i.length !== 1) { + return null; + } + let s = i[0]; + if (s.isEmpty()) { + if (!e) { + return null; + } + const c = s.startLineNumber; + s = new Z(c, this.model.getLineMinColumn(c), c, this.model.getLineMaxColumn(c)); + } + const n = this.b.options.get(52); + const r = this.R(); + const a = /[:;\\\/<>]/.test(n.fontFamily) || n.fontFamily === Qf.fontFamily; + let l; + if (a) { + l = Qf.fontFamily; + } else { + l = n.fontFamily; + l = l.replace(/"/g, "'"); + if (!/[,']/.test(l)) { + if (/[+ ]/.test(l)) { + l = `'${l}'`; + } + } + l = `${l}, ${Qf.fontFamily}`; + } + return { + mode: t, + html: `
${this.Q(s, r)}
` + }; + } + Q(i, e) { + const t = i.startLineNumber; + const s = i.startColumn; + const n = i.endLineNumber; + const r = i.endColumn; + const o = this.N(); + let a = ""; + for (let l = t; l <= n; l++) { + const c = this.model.tokenization.getLineTokens(l); + const u = c.getLineContent(); + const d = l === t ? s - 1 : 0; + const h = l === n ? r - 1 : u.length; + if (u === "") { + a += "
"; + } else { + a += Eas(u, c.inflate(), e, d, h, o, ln); + } + } + return a; + } + R() { + const i = qm.getColorMap(); + const e = ["#000000"]; + if (i) { + for (let t = 1, s = i.length; t < s; t++) { + e[t] = ut.Format.CSS.formatHex(i[t]); + } + } + return e; + } + getPrimaryCursorState() { + return this.n.getPrimaryCursorState(); + } + getLastAddedCursorIndex() { + return this.n.getLastAddedCursorIndex(); + } + getCursorStates() { + return this.n.getCursorStates(); + } + setCursorStates(i, e, t) { + return this.U(s => this.n.setStates(s, i, e, t)); + } + getCursorColumnSelectData() { + return this.n.getCursorColumnSelectData(); + } + getCursorAutoClosedCharacters() { + return this.n.getAutoClosedCharacters(); + } + setCursorColumnSelectData(i) { + this.n.setCursorColumnSelectData(i); + } + getPrevEditOperationType() { + return this.n.getPrevEditOperationType(); + } + setPrevEditOperationType(i) { + this.n.setPrevEditOperationType(i); + } + getSelection() { + return this.n.getSelection(); + } + getSelections() { + return this.n.getSelections(); + } + getPosition() { + return this.n.getPrimaryCursorState().modelState.position; + } + setSelections(i, e, t = 0) { + this.U(s => this.n.setSelections(s, i, e, t)); + } + saveCursorState() { + return this.n.saveState(); + } + restoreCursorState(i) { + this.U(e => this.n.restoreState(e, i)); + } + S(i) { + if (this.n.context.cursorConfig.readOnly) { + this.c.emitOutgoingEvent(new pas()); + return; + } + this.U(i); + } + executeEdits(i, e, t) { + this.S(s => this.n.executeEdits(s, i, e, t)); + } + startComposition() { + this.S(i => this.n.startComposition(i)); + } + endComposition(i) { + this.S(e => this.n.endComposition(e, i)); + } + type(i, e) { + this.S(t => this.n.type(t, i, e)); + } + compositionType(i, e, t, s, n) { + this.S(r => this.n.compositionType(r, i, e, t, s, n)); + } + paste(i, e, t, s) { + this.S(n => this.n.paste(n, i, e, t, s)); + } + cut(i) { + this.S(e => this.n.cut(e, i)); + } + executeCommand(i, e) { + this.S(t => this.n.executeCommand(t, i, e)); + } + executeCommands(i, e) { + this.S(t => this.n.executeCommands(t, i, e)); + } + revealAllCursors(i, e, t = false) { + this.U(s => this.n.revealAll(s, i, t, 0, e, 0)); + } + revealPrimaryCursor(i, e, t = false) { + this.U(s => this.n.revealPrimary(s, i, t, 0, e, 0)); + } + revealTopMostCursor(i) { + const e = this.n.getTopMostViewPosition(); + const t = new Z(e.lineNumber, e.column, e.lineNumber, e.column); + this.U(s => s.emitViewEvent(new uie(i, false, t, null, 0, true, 0))); + } + revealBottomMostCursor(i) { + const e = this.n.getBottomMostViewPosition(); + const t = new Z(e.lineNumber, e.column, e.lineNumber, e.column); + this.U(s => s.emitViewEvent(new uie(i, false, t, null, 0, true, 0))); + } + revealRange(i, e, t, s, n) { + this.U(r => r.emitViewEvent(new uie(i, false, t, null, s, e, n))); + } + changeWhitespace(i) { + if (this.viewLayout.changeWhitespace(i)) { + this.c.emitSingleViewEvent(new oas()); + this.c.emitOutgoingEvent(new has()); + } + } + U(i) { + return this.w.batchChanges(() => { + try { + const e = this.c.beginEmitViewEvents(); + return i(e); + } finally { + this.c.endEmitViewEvents(); + } + }); + } + batchEvents(i) { + this.U(() => { + i(); + }); + } + normalizePosition(i, e) { + return this.m.normalizePosition(i, e); + } + getLineIndentColumn(i) { + return this.m.getLineIndentColumn(i); + } + }; + zas = class COn { + static create(e) { + const t = e._setTrackedRange(null, new Z(1, 1, 1, 1), 1); + return new COn(e, 1, false, t, 0); + } + get viewLineNumber() { + return this.b; + } + get isValid() { + return this.c; + } + get modelTrackedRange() { + return this.f; + } + get startLineDelta() { + return this.g; + } + constructor(e, t, s, n, r) { + this.a = e; + this.b = t; + this.c = s; + this.f = n; + this.g = r; + } + dispose() { + this.a._setTrackedRange(this.f, null, 1); + } + update(e, t) { + const s = e.coordinatesConverter.convertViewPositionToModelPosition(new je(t, e.getLineMinColumn(t))); + const n = e.model._setTrackedRange(this.f, new Z(s.lineNumber, s.column, s.lineNumber, s.column), 1); + const r = e.viewLayout.getVerticalOffsetForLineNumber(t); + const o = e.viewLayout.getCurrentScrollTop(); + this.b = t; + this.c = true; + this.f = n; + this.g = o - r; + } + invalidate() { + this.c = false; + } + }; + Jas = class { + constructor() { + this.a = Object.create(null); + this.asArray = []; + } + accept(i, e, t, s, n) { + const r = this.a[i]; + if (r) { + const o = r.data; + const a = o[o.length - 3]; + const l = o[o.length - 1]; + if (a === n && l + 1 >= t) { + if (s > l) { + o[o.length - 1] = s; + } + return; + } + o.push(n, t, s); + } else { + const o = new Oat(i, e, [n, t, s]); + this.a[i] = o; + this.asArray.push(o); + } + } + }; + Gas = class { + constructor() { + this.a = new Map(); + this.b = false; + this.c = []; + } + setHiddenAreas(i, e) { + const t = this.a.get(i); + if (!t || !Has(t, e)) { + this.a.set(i, e); + this.b = true; + } + } + getMergedRanges() { + if (!this.b) { + return this.c; + } + this.b = false; + const i = Array.from(this.a.values()).reduce((e, t) => bXn(e, t), []); + if (Has(this.c, i)) { + return this.c; + } else { + this.c = i; + return this.c; + } + } + }; + iWt = class { + constructor(i, e) { + this.viewportStartModelPosition = i; + this.startLineDelta = e; + } + recoverViewportStart(i, e) { + if (!this.viewportStartModelPosition) { + return; + } + const t = i.convertModelPositionToViewPosition(this.viewportStartModelPosition); + const s = e.getVerticalOffsetForLineNumber(t.lineNumber); + e.setScrollPosition({ + scrollTop: s + this.startLineDelta + }, 1); + } + }; + } +}); +var ml; +var Tc = ue({ + "out-build/vs/platform/instantiation/common/serviceCollection.js"() { + "use strict"; + + ml = class { + constructor(...i) { + this.a = new Map(); + for (const [e, t] of i) { + this.set(e, t); + } + } + set(i, e) { + const t = this.a.get(i); + this.a.set(i, e); + return t; + } + has(i) { + return this.a.has(i); + } + get(i) { + return this.a.get(i); + } + }; + } +}); +function vme(i) { + return ils + encodeURIComponent(i.toString()) + sls; +} +function yXn(i) { + return nls + encodeURIComponent(i.toString()) + rls; +} +var bz; +var gh; +var Kas; +var Yas; +var Xas; +var sWt; +var Y0; +var Qas; +var Zas; +var els; +var tls; +var ils; +var sls; +var nls; +var rls; +var Yg = ue({ + "out-build/vs/editor/browser/widget/codeEditor/codeEditorWidget.js"() { + "use strict"; + + wjn(); + xe(); + Ut(); + pe(); + Gl(); + q(); + At(); + Cjn(); + s1(); + OXi(); + Uge(); + en(); + Xn(); + NKn(); + FKn(); + Ees(); + OKn(); + Qd(); + TT(); + z0(); + Rs(); + yt(); + ua(); + fot(); + _Kn(); + E4(); + Sr(); + Bd(); + Ya(); + Tr(); + oXn(); + vXn(); + X(); + Ho(); + Wt(); + Ee(); + te(); + Tc(); + Wi(); + Qs(); + gi(); + Je(); + qT(); + gh = class extends H { + static { + bz = this; + } + static { + this.b = Cr.register({ + description: "workbench-dnd-target", + className: "dnd-target" + }); + } + get isChatCodeblock() { + return this.sb.isChatCodeblock; + } + get cursorCodeBlockType() { + return this.sb.cursorCodeBlockType; + } + get isSimpleWidget() { + return this.sb.isSimpleWidget; + } + get contextMenuId() { + return this.sb.contextMenuId; + } + get contextKeyService() { + return this.xb; + } + constructor(e, t, s, n, r, o, a, l, c, u, d, h, g) { + super(); + this.Kb = d; + this.Lb = g; + this.c = Pqi(); + this.f = this.D(new ins()); + this.g = this.D(new B()); + this.onDidDispose = this.g.event; + this.h = this.D(new B({ + deliveryQueue: this.c + })); + this.onDidChangeModelContent = this.h.event; + this.j = this.D(new B({ + deliveryQueue: this.c + })); + this.onDidChangeModelLanguage = this.j.event; + this.m = this.D(new B({ + deliveryQueue: this.c + })); + this.onDidChangeModelLanguageConfiguration = this.m.event; + this.n = this.D(new B({ + deliveryQueue: this.c + })); + this.onDidChangeModelOptions = this.n.event; + this.q = this.D(new B({ + deliveryQueue: this.c + })); + this.onDidChangeModelDecorations = this.q.event; + this.t = this.D(new B({ + deliveryQueue: this.c + })); + this.onDidChangeModelTokens = this.t.event; + this.u = this.D(new B({ + deliveryQueue: this.c + })); + this.onDidChangeConfiguration = this.u.event; + this.w = this.D(new B({ + deliveryQueue: this.c + })); + this.onWillChangeModel = this.w.event; + this.y = this.D(new B({ + deliveryQueue: this.c + })); + this.onDidChangeModel = this.y.event; + this.z = this.D(new B({ + deliveryQueue: this.c + })); + this.onDidChangeCursorPosition = this.z.event; + this.C = this.D(new B({ + deliveryQueue: this.c + })); + this.onDidChangeCursorSelection = this.C.event; + this.F = this.D(new Y0(this.f, this.c)); + this.onDidAttemptReadOnlyEdit = this.F.event; + this.G = this.D(new B({ + deliveryQueue: this.c + })); + this.onDidLayoutChange = this.G.event; + this.H = this.D(new sWt({ + deliveryQueue: this.c + })); + this.onDidFocusEditorText = this.H.onDidChangeToTrue; + this.onDidBlurEditorText = this.H.onDidChangeToFalse; + this.I = this.D(new sWt({ + deliveryQueue: this.c + })); + this.onDidFocusEditorWidget = this.I.onDidChangeToTrue; + this.onDidBlurEditorWidget = this.I.onDidChangeToFalse; + this.J = this.D(new Y0(this.f, this.c)); + this.onWillType = this.J.event; + this.L = this.D(new Y0(this.f, this.c)); + this.onDidType = this.L.event; + this.M = this.D(new Y0(this.f, this.c)); + this.onDidCompositionStart = this.M.event; + this.N = this.D(new Y0(this.f, this.c)); + this.onDidCompositionEnd = this.N.event; + this.O = this.D(new Y0(this.f, this.c)); + this.onDidPaste = this.O.event; + this.P = this.D(new Y0(this.f, this.c)); + this.onMouseUp = this.P.event; + this.Q = this.D(new Y0(this.f, this.c)); + this.onMouseDown = this.Q.event; + this.R = this.D(new Y0(this.f, this.c)); + this.onMouseDrag = this.R.event; + this.S = this.D(new Y0(this.f, this.c)); + this.onMouseDrop = this.S.event; + this.U = this.D(new Y0(this.f, this.c)); + this.onMouseDropCanceled = this.U.event; + this.W = this.D(new Y0(this.f, this.c)); + this.onDropIntoEditor = this.W.event; + this.X = this.D(new Y0(this.f, this.c)); + this.onContextMenu = this.X.event; + this.Y = this.D(new Y0(this.f, this.c)); + this.onMouseMove = this.Y.event; + this.Z = this.D(new Y0(this.f, this.c)); + this.onMouseLeave = this.Z.event; + this.ab = this.D(new Y0(this.f, this.c)); + this.onMouseWheel = this.ab.event; + this.bb = this.D(new Y0(this.f, this.c)); + this.onKeyUp = this.bb.event; + this.db = this.D(new Y0(this.f, this.c)); + this.onKeyDown = this.db.event; + this.eb = this.D(new B({ + deliveryQueue: this.c + })); + this.onDidContentSizeChange = this.eb.event; + this.fb = this.D(new B({ + deliveryQueue: this.c + })); + this.onDidScrollChange = this.fb.event; + this.gb = this.D(new B({ + deliveryQueue: this.c + })); + this.onDidChangeViewZones = this.gb.event; + this.hb = this.D(new B({ + deliveryQueue: this.c + })); + this.onDidChangeHiddenAreas = this.hb.event; + this.ib = 0; + this.jb = this.D(new B()); + this.onWillTriggerEditorOperationEvent = this.jb.event; + this.lb = this.D(new B()); + this.onBeginUpdate = this.lb.event; + this.mb = this.D(new B()); + this.onEndUpdate = this.mb.event; + this.nb = this.D(new B()); + this.onBeforeExecuteEdit = this.nb.event; + this.ub = new Map(); + this.Ib = null; + this.Jb = this.createDecorationsCollection(); + this.inComposition = false; + r.willCreateCodeEditor(); + this.shouldShowHover = true; + const p = { + ...t + }; + this.pb = e; + this.qb = p.overflowWidgetsDomNode; + delete p.overflowWidgetsDomNode; + this.rb = ++Kas; + this.Gb = {}; + this.Hb = {}; + this.ob = s.telemetryData; + this.sb = this.D(this.Mb(s.isSimpleWidget || false, s.contextMenuId ?? (s.isSimpleWidget ? _.SimpleEditorContext : _.EditorContext), p, u, s.isChatCodeblock ?? false, s.cursorCodeBlockType)); + this.D(this.sb.onDidChange(y => { + this.u.fire(y); + const w = this.sb.options; + if (y.hasChanged(151)) { + const C = w.get(151); + this.G.fire(C); + } + })); + this.xb = this.D(a.createScoped(this.pb)); + this.yb = c; + this.zb = r; + this.Ab = o; + this.Bb = l; + this.D(new Qas(this, this.xb, this.Lb)); + this.D(new Zas(this, this.xb, h)); + this.wb = this.D(n.createChild(new ml([Ne, this.xb]))); + this.vb = null; + this.Cb = new els(e, this.qb); + this.D(this.Cb.onChange(() => { + this.I.setValue(this.Cb.hasFocus()); + })); + this.Db = {}; + this.Eb = {}; + this.Fb = {}; + let b; + if (Array.isArray(s.contributions)) { + b = s.contributions; + } else { + b = nd.getEditorContributions(); + } + this.f.initialize(this, b, this.wb); + for (const y of nd.getEditorActions()) { + if (this.ub.has(y.id)) { + xs(new Error(`Cannot have two actions with the same id ${y.id}`)); + continue; + } + const w = new sns(y.id, y.label, y.alias, y.metadata, y.precondition ?? undefined, C => this.wb.invokeFunction(S => Promise.resolve(y.runEditorCommand(S, this, C))), this.xb); + this.ub.set(w.id, w); + } + const v = () => !this.sb.options.get(96) && this.sb.options.get(36).enabled; + this.D(new Gk(this.pb, { + onDragOver: y => { + if (!v()) { + return; + } + const w = this.getTargetAtClientPoint(y.clientX, y.clientY); + if (w?.position) { + this.kc(w.position); + } + }, + onDrop: async y => { + if (!v() || (this.lc(), !y.dataTransfer)) { + return; + } + const w = this.getTargetAtClientPoint(y.clientX, y.clientY); + if (w?.position) { + this.W.fire({ + position: w.position, + event: y + }); + } + }, + onDragLeave: () => { + this.lc(); + }, + onDragEnd: () => { + this.lc(); + } + })); + this.zb.addCodeEditor(this); + } + writeScreenReaderContent(e) { + this.vb?.view.writeScreenReaderContent(e); + } + Mb(e, t, s, n, r = false, o = undefined) { + return new Wge(e, t, s, this.pb, n, r, o); + } + getId() { + return this.getEditorType() + ":" + this.rb; + } + getEditorType() { + return PM.ICodeEditor; + } + dispose() { + this.zb.removeCodeEditor(this); + this.Cb.dispose(); + this.ub.clear(); + this.Db = {}; + this.Eb = {}; + this.Nb(); + this.fc(this.gc()); + this.g.fire(); + super.dispose(); + } + invokeWithinContext(e) { + return this.wb.invokeFunction(e); + } + updateOptions(e) { + this.sb.updateOptions(e || {}); + } + getOptions() { + return this.sb.options; + } + getOption(e) { + return this.sb.options.get(e); + } + getRawOptions() { + return this.sb.getRawOptions(); + } + getOverflowWidgetsDomNode() { + return this.qb; + } + getConfiguredWordAtPosition(e) { + if (this.vb) { + return Fy.getWordAtPosition(this.vb.model, this.sb.options.get(136), this.sb.options.get(135), e); + } else { + return null; + } + } + getValue(e = null) { + if (!this.vb) { + return ""; + } + const t = !!e && !!e.preserveBOM; + let s = 0; + if (e && e.lineEnding && e.lineEnding === ` +`) { + s = 1; + } else if (e && e.lineEnding && e.lineEnding === `\r +`) { + s = 2; + } + return this.vb.model.getValue(s, t); + } + setValue(e) { + try { + this.mc(); + if (!this.vb) { + return; + } + this.vb.model.setValue(e); + } finally { + this.nc(); + } + } + getModel() { + if (this.vb) { + return this.vb.model; + } else { + return null; + } + } + setModel(e = null) { + try { + this.mc(); + const t = e; + if (this.vb === null && t === null || this.vb && this.vb.model === t) { + return; + } + const s = { + oldModelUrl: this.vb?.model.uri || null, + newModelUrl: t?.uri || null + }; + this.w.fire(s); + const n = this.hasTextFocus(); + const r = this.gc(); + this.dc(t); + if (n && this.hasModel()) { + this.focus(); + } + this.Nb(); + this.y.fire(s); + this.fc(r); + this.tb = this.f.onAfterModelAttached(); + } finally { + this.nc(); + } + } + Nb() { + this.Gb = {}; + if (this.Hb) { + for (const e in this.Hb) { + const t = this.Hb[e]; + for (const s in t) { + this.ic(e + "-" + s); + } + } + this.Hb = {}; + } + } + getVisibleRanges() { + if (this.vb) { + return this.vb.viewModel.getVisibleRanges(); + } else { + return []; + } + } + getVisibleRangesPlusViewportAboveBelow() { + if (this.vb) { + return this.vb.viewModel.getVisibleRangesPlusViewportAboveBelow(); + } else { + return []; + } + } + getWhitespaces() { + if (this.vb) { + return this.vb.viewModel.viewLayout.getWhitespaces(); + } else { + return []; + } + } + static Ob(e, t, s, n) { + const r = e.model.validatePosition({ + lineNumber: t, + column: s + }); + const o = e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(r); + return e.viewModel.viewLayout.getVerticalOffsetAfterLineNumber(o.lineNumber, n); + } + getTopForLineNumber(e, t = false) { + if (this.vb) { + return bz.Pb(this.vb, e, 1, t); + } else { + return -1; + } + } + getTopForPosition(e, t) { + if (this.vb) { + return bz.Pb(this.vb, e, t, false); + } else { + return -1; + } + } + static Pb(e, t, s, n = false) { + const r = e.model.validatePosition({ + lineNumber: t, + column: s + }); + const o = e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(r); + return e.viewModel.viewLayout.getVerticalOffsetForLineNumber(o.lineNumber, n); + } + getBottomForLineNumber(e, t = false) { + if (!this.vb) { + return -1; + } + const s = this.vb.model.getLineMaxColumn(e); + return bz.Ob(this.vb, e, s, t); + } + setHiddenAreas(e, t, s) { + this.vb?.viewModel.setHiddenAreas(e.map(n => Z.lift(n)), t, s); + } + getVisibleColumnFromPosition(e) { + if (!this.vb) { + return e.column; + } + const t = this.vb.model.validatePosition(e); + const s = this.vb.model.getOptions().tabSize; + return pp.visibleColumnFromColumn(this.vb.model.getLineContent(t.lineNumber), t.column, s) + 1; + } + getStatusbarColumn(e) { + if (!this.vb) { + return e.column; + } + const t = this.vb.model.validatePosition(e); + const s = this.vb.model.getOptions().tabSize; + return pp.toStatusbarColumn(this.vb.model.getLineContent(t.lineNumber), t.column, s); + } + getPosition() { + if (this.vb) { + return this.vb.viewModel.getPosition(); + } else { + return null; + } + } + setPosition(e, t = "api") { + if (this.vb) { + if (!je.isIPosition(e)) { + throw new Error("Invalid arguments"); + } + this.vb.viewModel.setSelections(t, [{ + selectionStartLineNumber: e.lineNumber, + selectionStartColumn: e.column, + positionLineNumber: e.lineNumber, + positionColumn: e.column + }]); + } + } + Qb(e, t, s, n) { + if (!this.vb) { + return; + } + if (!Z.isIRange(e)) { + throw new Error("Invalid arguments"); + } + const r = this.vb.model.validateRange(e); + const o = this.vb.viewModel.coordinatesConverter.convertModelRangeToViewRange(r); + this.vb.viewModel.revealRange("api", s, o, t, n); + } + revealLine(e, t = 0) { + this.Rb(e, 0, t); + } + revealLineInCenter(e, t = 0) { + this.Rb(e, 1, t); + } + revealLineInCenterIfOutsideViewport(e, t = 0) { + this.Rb(e, 2, t); + } + revealLineNearTop(e, t = 0) { + this.Rb(e, 5, t); + } + Rb(e, t, s) { + if (typeof e != "number") { + throw new Error("Invalid arguments"); + } + this.Qb(new Z(e, 1, e, 1), t, false, s); + } + revealPosition(e, t = 0) { + this.Sb(e, 0, true, t); + } + revealPositionInCenter(e, t = 0) { + this.Sb(e, 1, true, t); + } + revealPositionInCenterIfOutsideViewport(e, t = 0) { + this.Sb(e, 2, true, t); + } + revealPositionNearTop(e, t = 0) { + this.Sb(e, 5, true, t); + } + Sb(e, t, s, n) { + if (!je.isIPosition(e)) { + throw new Error("Invalid arguments"); + } + this.Qb(new Z(e.lineNumber, e.column, e.lineNumber, e.column), t, s, n); + } + getSelection() { + if (this.vb) { + return this.vb.viewModel.getSelection(); + } else { + return null; + } + } + getSelections() { + if (this.vb) { + return this.vb.viewModel.getSelections(); + } else { + return null; + } + } + setSelection(e, t = "api") { + const s = Vs.isISelection(e); + const n = Z.isIRange(e); + if (!s && !n) { + throw new Error("Invalid arguments"); + } + if (s) { + this.Tb(e, t); + } else if (n) { + const r = { + selectionStartLineNumber: e.startLineNumber, + selectionStartColumn: e.startColumn, + positionLineNumber: e.endLineNumber, + positionColumn: e.endColumn + }; + this.Tb(r, t); + } + } + Tb(e, t) { + if (!this.vb) { + return; + } + const s = new Vs(e.selectionStartLineNumber, e.selectionStartColumn, e.positionLineNumber, e.positionColumn); + this.vb.viewModel.setSelections(t, [s]); + } + revealLines(e, t, s = 0) { + this.Ub(e, t, 0, s); + } + revealLinesInCenter(e, t, s = 0) { + this.Ub(e, t, 1, s); + } + revealLinesInCenterIfOutsideViewport(e, t, s = 0) { + this.Ub(e, t, 2, s); + } + revealLinesNearTop(e, t, s = 0) { + this.Ub(e, t, 5, s); + } + Ub(e, t, s, n) { + if (typeof e != "number" || typeof t != "number") { + throw new Error("Invalid arguments"); + } + this.Qb(new Z(e, 1, t, 1), s, false, n); + } + revealRange(e, t = 0, s = false, n = true) { + this.Vb(e, s ? 1 : 0, n, t); + } + revealRangeInCenter(e, t = 0) { + this.Vb(e, 1, true, t); + } + revealRangeInCenterIfOutsideViewport(e, t = 0) { + this.Vb(e, 2, true, t); + } + revealRangeNearTop(e, t = 0) { + this.Vb(e, 5, true, t); + } + revealRangeNearTopIfOutsideViewport(e, t = 0) { + this.Vb(e, 6, true, t); + } + revealRangeAtTop(e, t = 0) { + this.Vb(e, 3, true, t); + } + Vb(e, t, s, n) { + if (!Z.isIRange(e)) { + throw new Error("Invalid arguments"); + } + this.Qb(Z.lift(e), t, s, n); + } + setSelections(e, t = "api", s = 0) { + if (this.vb) { + if (!e || e.length === 0) { + throw new Error("Invalid arguments"); + } + for (let n = 0, r = e.length; n < r; n++) { + if (!Vs.isISelection(e[n])) { + throw new Error("Invalid arguments"); + } + } + this.vb.viewModel.setSelections(t, e, s); + } + } + getContentWidth() { + if (this.vb) { + return this.vb.viewModel.viewLayout.getContentWidth(); + } else { + return -1; + } + } + getScrollWidth() { + if (this.vb) { + return this.vb.viewModel.viewLayout.getScrollWidth(); + } else { + return -1; + } + } + getScrollLeft() { + if (this.vb) { + return this.vb.viewModel.viewLayout.getCurrentScrollLeft(); + } else { + return -1; + } + } + getContentHeight() { + if (this.vb) { + return this.vb.viewModel.viewLayout.getContentHeight(); + } else { + return -1; + } + } + getScrollHeight() { + if (this.vb) { + return this.vb.viewModel.viewLayout.getScrollHeight(); + } else { + return -1; + } + } + getScrollTop() { + if (this.vb) { + return this.vb.viewModel.viewLayout.getCurrentScrollTop(); + } else { + return -1; + } + } + setScrollLeft(e, t = 1) { + if (this.vb) { + if (typeof e != "number") { + throw new Error("Invalid arguments"); + } + this.vb.viewModel.viewLayout.setScrollPosition({ + scrollLeft: e + }, t); + } + } + setScrollTop(e, t = 1) { + if (this.vb) { + if (typeof e != "number") { + throw new Error("Invalid arguments"); + } + this.vb.viewModel.viewLayout.setScrollPosition({ + scrollTop: e + }, t); + } + } + setScrollPosition(e, t = 1) { + if (this.vb) { + this.vb.viewModel.viewLayout.setScrollPosition(e, t); + } + } + hasPendingScrollAnimation() { + if (this.vb) { + return this.vb.viewModel.viewLayout.hasPendingScrollAnimation(); + } else { + return false; + } + } + saveViewState() { + if (!this.vb) { + return null; + } + const e = this.f.saveViewState(); + const t = this.vb.viewModel.saveCursorState(); + const s = this.vb.viewModel.saveState(); + return { + cursorState: t, + viewState: s, + contributionsState: e + }; + } + restoreViewState(e) { + if (!this.vb || !this.vb.hasRealView) { + return; + } + const t = e; + if (t && t.cursorState && t.viewState) { + const s = t.cursorState; + if (Array.isArray(s)) { + if (s.length > 0) { + this.vb.viewModel.restoreCursorState(s); + } + } else { + this.vb.viewModel.restoreCursorState([s]); + } + this.f.restoreViewState(t.contributionsState || {}); + const n = this.vb.viewModel.reduceRestoreState(t.viewState); + this.vb.view.restoreState(n); + } + } + handleInitialized() { + this._getViewModel()?.visibleLinesStabilized(); + } + onVisible() { + this.vb?.view.refreshFocusState(); + } + onHide() { + this.vb?.view.refreshFocusState(); + this.Cb.refreshState(); + } + getContribution(e) { + return this.f.get(e); + } + getActions() { + return Array.from(this.ub.values()); + } + getSupportedActions() { + let e = this.getActions(); + e = e.filter(t => t.isSupported()); + return e; + } + getAction(e) { + return this.ub.get(e) || null; + } + trigger(e, t, s) { + s = s || {}; + try { + this.jb.fire({ + source: e, + handlerId: t, + payload: s + }); + this.mc(); + switch (t) { + case "compositionStart": + this.Xb(); + return; + case "compositionEnd": + this.Yb(e); + return; + case "type": + { + const r = s; + this.Zb(e, r.text || ""); + return; + } + case "replacePreviousChar": + { + const r = s; + this.$b(e, r.text || "", r.replaceCharCnt || 0, 0, 0); + return; + } + case "compositionType": + { + const r = s; + this.$b(e, r.text || "", r.replacePrevCharCnt || 0, r.replaceNextCharCnt || 0, r.positionDelta || 0); + return; + } + case "paste": + { + const r = s; + this.ac(e, r.text || "", r.pasteOnNewLine || false, r.multicursorText || null, r.mode || null, r.clipboardEvent); + return; + } + case "cut": + this.bc(e); + return; + } + const n = this.getAction(t); + if (n) { + Promise.resolve(n.run(s)).then(undefined, xs); + return; + } + if (!this.vb || this.cc(e, t, s)) { + return; + } + this.Wb(t, s); + } finally { + this.nc(); + } + } + Wb(e, t) { + this.Ab.executeCommand(e, t); + } + Xb() { + if (this.vb) { + this.inComposition = true; + this.vb.viewModel.startComposition(); + this.M.fire(); + } + } + Yb(e) { + if (this.vb) { + this.inComposition = false; + this.vb.viewModel.endComposition(e); + this.N.fire(); + } + } + Zb(e, t) { + if (!!this.vb && t.length !== 0) { + if (e === "keyboard") { + this.J.fire(t); + } + this.vb.viewModel.type(t, e); + if (e === "keyboard") { + this.L.fire(t); + } + } + } + $b(e, t, s, n, r) { + if (this.vb) { + this.vb.viewModel.compositionType(t, s, n, r, e); + } + } + ac(e, t, s, n, r, o) { + if (!this.vb) { + return; + } + const a = this.vb.viewModel; + const l = a.getSelection().getStartPosition(); + a.paste(t, s, n, e); + const c = a.getSelection().getStartPosition(); + if (e === "keyboard") { + this.O.fire({ + clipboardEvent: o, + range: new Z(l.lineNumber, l.column, c.lineNumber, c.column), + languageId: r + }); + } + } + bc(e) { + if (this.vb) { + this.vb.viewModel.cut(e); + } + } + cc(e, t, s) { + const n = nd.getEditorCommand(t); + if (n) { + s = s || {}; + s.source = e; + this.wb.invokeFunction(r => { + Promise.resolve(n.runEditorCommand(r, this, s)).then(undefined, xs); + }); + return true; + } else { + return false; + } + } + _getViewModel() { + if (this.vb) { + return this.vb.viewModel; + } else { + return null; + } + } + pushUndoStop() { + if (!this.vb || this.sb.options.get(96)) { + return false; + } else { + this.vb.model.pushStackElement(); + return true; + } + } + popUndoStop() { + if (!this.vb || this.sb.options.get(96)) { + return false; + } else { + this.vb.model.popStackElement(); + return true; + } + } + executeEdits(e, t, s) { + if (!this.vb || this.sb.options.get(96)) { + return false; + } + let n; + if (s) { + if (Array.isArray(s)) { + n = () => s; + } else { + n = s; + } + } else { + n = () => null; + } + this.nb.fire({ + source: e ?? undefined + }); + this.vb.viewModel.executeEdits(e, t, n); + return true; + } + executeCommand(e, t) { + if (this.vb) { + this.vb.viewModel.executeCommand(t, e); + } + } + executeCommands(e, t) { + if (this.vb) { + this.vb.viewModel.executeCommands(t, e); + } + } + createDecorationsCollection(e) { + return new tls(this, e); + } + changeDecorations(e) { + if (this.vb) { + return this.vb.model.changeDecorations(e, this.rb); + } else { + return null; + } + } + getLineDecorations(e) { + if (this.vb) { + return this.vb.model.getLineDecorations(e, this.rb, Uot(this.sb.options)); + } else { + return null; + } + } + getDecorationsInRange(e) { + if (this.vb) { + return this.vb.model.getDecorationsInRange(e, this.rb, Uot(this.sb.options)); + } else { + return null; + } + } + deltaDecorations(e, t) { + if (this.vb) { + if (e.length === 0 && t.length === 0) { + return e; + } else { + return this.vb.model.deltaDecorations(e, t, this.rb); + } + } else { + return []; + } + } + removeDecorations(e) { + if (!!this.vb && e.length !== 0) { + this.vb.model.changeDecorations(t => { + t.deltaDecorations(e, []); + }); + } + } + setDecorationsByType(e, t, s) { + const n = {}; + const r = this.Hb[t] || {}; + this.Hb[t] = n; + const o = []; + for (const l of s) { + let c = t; + if (l.renderOptions) { + const d = Qc(l.renderOptions).toString(16); + c = t + "-" + d; + if (!r[d] && !n[d]) { + this.hc(e, c, l.renderOptions, t); + } + n[d] = true; + } + const u = this.jc(c, !!l.hoverMessage); + if (l.hoverMessage) { + u.hoverMessage = l.hoverMessage; + } + o.push({ + range: l.range, + options: u + }); + } + for (const l in r) { + if (!n[l]) { + this.ic(t + "-" + l); + } + } + const a = this.Gb[t] || []; + this.changeDecorations(l => this.Gb[t] = l.deltaDecorations(a, o)); + } + setDecorationsByTypeFast(e, t) { + const s = this.Hb[e] || {}; + for (const a in s) { + this.ic(e + "-" + a); + } + this.Hb[e] = {}; + const n = Cr.createDynamic(this.jc(e, false)); + const r = new Array(t.length); + for (let a = 0, l = t.length; a < l; a++) { + r[a] = { + range: t[a], + options: n + }; + } + const o = this.Gb[e] || []; + this.changeDecorations(a => this.Gb[e] = a.deltaDecorations(o, r)); + } + removeDecorationsByType(e) { + const t = this.Gb[e]; + if (t) { + this.changeDecorations(s => s.deltaDecorations(t, [])); + } + if (this.Gb.hasOwnProperty(e)) { + delete this.Gb[e]; + } + if (this.Hb.hasOwnProperty(e)) { + delete this.Hb[e]; + } + } + getLayoutInfo() { + return this.sb.options.get(151); + } + createOverviewRuler(e) { + if (!this.vb || !this.vb.hasRealView) { + return null; + } else { + return this.vb.view.createOverviewRuler(e); + } + } + getContainerDomNode() { + return this.pb; + } + getDomNode() { + if (!this.vb || !this.vb.hasRealView) { + return null; + } else { + return this.vb.view.domNode.domNode; + } + } + delegateVerticalScrollbarPointerDown(e) { + if (!!this.vb && !!this.vb.hasRealView) { + this.vb.view.delegateVerticalScrollbarPointerDown(e); + } + } + delegateScrollFromMouseWheelEvent(e) { + if (!!this.vb && !!this.vb.hasRealView) { + this.vb.view.delegateScrollFromMouseWheelEvent(e); + } + } + layout(e, t = false) { + this.sb.observeContainer(e); + if (!t) { + this.render(); + } + } + focus() { + if (!!this.vb && !!this.vb.hasRealView) { + this.vb.view.focus(); + } + } + hasTextFocus() { + if (!this.vb || !this.vb.hasRealView) { + return false; + } else { + return this.vb.view.isFocused(); + } + } + hasWidgetFocus() { + return this.Cb && this.Cb.hasFocus(); + } + addContentWidget(e) { + const t = { + widget: e, + position: e.getPosition() + }; + if (this.Db.hasOwnProperty(e.getId())) { + console.warn("Overwriting a content widget with the same id:" + e.getId()); + } + this.Db[e.getId()] = t; + if (this.vb && this.vb.hasRealView) { + this.vb.view.addContentWidget(t); + } + } + layoutContentWidget(e) { + const t = e.getId(); + if (this.Db.hasOwnProperty(t)) { + const s = this.Db[t]; + s.position = e.getPosition(); + if (this.vb && this.vb.hasRealView) { + this.vb.view.layoutContentWidget(s); + } + } + } + removeContentWidget(e) { + const t = e.getId(); + if (this.Db.hasOwnProperty(t)) { + const s = this.Db[t]; + delete this.Db[t]; + if (this.vb && this.vb.hasRealView) { + this.vb.view.removeContentWidget(s); + } + } + } + addOverlayWidget(e) { + const t = { + widget: e, + position: e.getPosition() + }; + if (this.Eb.hasOwnProperty(e.getId())) { + console.warn("Overwriting an overlay widget with the same id."); + } + this.Eb[e.getId()] = t; + if (this.vb && this.vb.hasRealView) { + this.vb.view.addOverlayWidget(t); + } + } + layoutOverlayWidget(e) { + const t = e.getId(); + if (this.Eb.hasOwnProperty(t)) { + const s = this.Eb[t]; + s.position = e.getPosition(); + if (this.vb && this.vb.hasRealView) { + this.vb.view.layoutOverlayWidget(s); + } + } + } + removeOverlayWidget(e) { + const t = e.getId(); + if (this.Eb.hasOwnProperty(t)) { + const s = this.Eb[t]; + delete this.Eb[t]; + if (this.vb && this.vb.hasRealView) { + this.vb.view.removeOverlayWidget(s); + } + } + } + addGlyphMarginWidget(e) { + const t = { + widget: e, + position: e.getPosition() + }; + if (this.Fb.hasOwnProperty(e.getId())) { + console.warn("Overwriting a glyph margin widget with the same id."); + } + this.Fb[e.getId()] = t; + if (this.vb && this.vb.hasRealView) { + this.vb.view.addGlyphMarginWidget(t); + } + } + layoutGlyphMarginWidget(e) { + const t = e.getId(); + if (this.Fb.hasOwnProperty(t)) { + const s = this.Fb[t]; + s.position = e.getPosition(); + if (this.vb && this.vb.hasRealView) { + this.vb.view.layoutGlyphMarginWidget(s); + } + } + } + removeGlyphMarginWidget(e) { + const t = e.getId(); + if (this.Fb.hasOwnProperty(t)) { + const s = this.Fb[t]; + delete this.Fb[t]; + if (this.vb && this.vb.hasRealView) { + this.vb.view.removeGlyphMarginWidget(s); + } + } + } + changeViewZones(e) { + if (!!this.vb && !!this.vb.hasRealView) { + this.vb.view.change(e); + } + } + getTargetAtClientPoint(e, t) { + if (!this.vb || !this.vb.hasRealView) { + return null; + } else { + return this.vb.view.getTargetAtClientPoint(e, t); + } + } + getScrolledVisiblePosition(e) { + if (!this.vb || !this.vb.hasRealView) { + return null; + } + const t = this.vb.model.validatePosition(e); + const s = this.sb.options; + const n = s.get(151); + const r = bz.Pb(this.vb, t.lineNumber, t.column) - this.getScrollTop(); + const o = this.vb.view.getOffsetForColumn(t.lineNumber, t.column) + n.glyphMarginWidth + n.lineNumbersWidth + n.decorationsWidth - this.getScrollLeft(); + return { + top: r, + left: o, + height: s.get(68) + }; + } + getOffsetForColumn(e, t) { + if (!this.vb || !this.vb.hasRealView) { + return -1; + } else { + return this.vb.view.getOffsetForColumn(e, t); + } + } + render(e = false) { + if (!!this.vb && !!this.vb.hasRealView) { + this.vb.viewModel.batchEvents(() => { + this.vb.view.render(true, e); + }); + } + } + setAriaOptions(e) { + if (!!this.vb && !!this.vb.hasRealView) { + this.vb.view.setAriaOptions(e); + } + } + applyFontInfo(e) { + Hm(e, this.sb.options.get(52)); + } + setBanner(e, t) { + if (this.Ib && this.pb.contains(this.Ib)) { + this.Ib.remove(); + } + this.Ib = e; + this.sb.setReservedHeight(e ? t : 0); + if (this.Ib) { + this.pb.prepend(this.Ib); + } + } + dc(e) { + if (!e) { + this.vb = null; + return; + } + const t = []; + this.pb.setAttribute("data-mode-id", e.getLanguageId()); + this.sb.setIsDominatedByLongLines(e.isDominatedByLongLines()); + this.sb.setModelLineCount(e.getLineCount()); + const s = e.onBeforeAttached(); + const n = new jas(this.rb, this.sb, e, ens.create(Kt(this.pb)), jos.create(this.sb.options), a => Zc(Kt(this.pb), a), this.Kb, this.Bb, s, { + batchChanges: a => { + try { + this.mc(); + return a(); + } finally { + this.nc(); + } + } + }); + t.push(e.onWillDispose(() => this.setModel(null))); + t.push(n.onEvent(a => { + switch (a.kind) { + case 0: + this.eb.fire(a); + break; + case 1: + this.H.setValue(a.hasFocus); + break; + case 2: + this.fb.fire(a); + break; + case 3: + this.gb.fire(); + break; + case 4: + this.hb.fire(); + break; + case 5: + this.F.fire(); + break; + case 6: + { + if (a.reachedMaxCursorCount) { + const d = this.getOption(81); + const h = f(194, null, d); + this.yb.prompt(es.Warning, h, [{ + label: "Find and Replace", + run: () => { + this.Ab.executeCommand("editor.action.startFindReplaceAction"); + } + }, { + label: f(195, null), + run: () => { + this.Ab.executeCommand("workbench.action.openSettings2", { + query: "editor.multiCursorLimit" + }); + } + }]); + } + const l = []; + for (let d = 0, h = a.selections.length; d < h; d++) { + l[d] = a.selections[d].getPosition(); + } + const c = { + position: l[0], + secondaryPositions: l.slice(1), + reason: a.reason, + source: a.source + }; + this.z.fire(c); + const u = { + selection: a.selections[0], + secondarySelections: a.selections.slice(1), + modelVersionId: a.modelVersionId, + oldSelections: a.oldSelections, + oldModelVersionId: a.oldModelVersionId, + source: a.source, + reason: a.reason + }; + this.C.fire(u); + break; + } + case 7: + this.q.fire(a.event); + break; + case 8: + this.pb.setAttribute("data-mode-id", e.getLanguageId()); + this.j.fire(a.event); + break; + case 9: + this.m.fire(a.event); + break; + case 10: + this.h.fire(a.event); + break; + case 11: + this.n.fire(a.event); + break; + case 12: + this.t.fire(a.event); + break; + } + })); + const [r, o] = this.ec(n); + if (o) { + this.pb.appendChild(r.domNode.domNode); + let a = Object.keys(this.Db); + for (let l = 0, c = a.length; l < c; l++) { + const u = a[l]; + r.addContentWidget(this.Db[u]); + } + a = Object.keys(this.Eb); + for (let l = 0, c = a.length; l < c; l++) { + const u = a[l]; + r.addOverlayWidget(this.Eb[u]); + } + a = Object.keys(this.Fb); + for (let l = 0, c = a.length; l < c; l++) { + const u = a[l]; + r.addGlyphMarginWidget(this.Fb[u]); + } + r.render(false, true); + r.domNode.domNode.setAttribute("data-uri", e.uri.toString()); + } + this.vb = new Yas(e, n, r, o, t, s); + } + ec(e) { + let t; + if (this.isSimpleWidget) { + t = { + paste: (r, o, a, l) => { + this.ac("keyboard", r, o, a, l); + }, + type: r => { + this.Zb("keyboard", r); + }, + compositionType: (r, o, a, l) => { + this.$b("keyboard", r, o, a, l); + }, + startComposition: () => { + this.Xb(); + }, + endComposition: () => { + this.Yb("keyboard"); + }, + cut: () => { + this.bc("keyboard"); + } + }; + } else { + t = { + paste: (r, o, a, l) => { + const c = { + text: r, + pasteOnNewLine: o, + multicursorText: a, + mode: l + }; + this.Ab.executeCommand("paste", c); + }, + type: r => { + const o = { + text: r + }; + this.Ab.executeCommand("type", o); + }, + compositionType: (r, o, a, l) => { + if (a || l) { + const c = { + text: r, + replacePrevCharCnt: o, + replaceNextCharCnt: a, + positionDelta: l + }; + this.Ab.executeCommand("compositionType", c); + } else { + const c = { + text: r, + replaceCharCnt: o + }; + this.Ab.executeCommand("replacePreviousChar", c); + } + }, + startComposition: () => { + this.Ab.executeCommand("compositionStart", {}); + }, + endComposition: () => { + this.Ab.executeCommand("compositionEnd", {}); + }, + cut: () => { + this.Ab.executeCommand("cut", {}); + } + }; + } + const s = new j3t(e.coordinatesConverter); + s.onKeyDown = r => this.db.fire(r); + s.onKeyUp = r => this.bb.fire(r); + s.onContextMenu = r => this.X.fire(r); + s.onMouseMove = r => this.Y.fire(r); + s.onMouseLeave = r => this.Z.fire(r); + s.onMouseDown = r => this.Q.fire(r); + s.onMouseUp = r => this.P.fire(r); + s.onMouseDrag = r => this.R.fire(r); + s.onMouseDrop = r => this.S.fire(r); + s.onMouseDropCanceled = r => this.U.fire(r); + s.onMouseWheel = r => this.ab.fire(r); + return [new ilt(this.getId(), t, this.sb, this.Bb.getColorTheme(), e, s, this.qb, this.wb), true]; + } + fc(e) { + e?.removeAllDecorationsWithOwnerId(this.rb); + } + gc() { + this.tb?.dispose(); + this.tb = undefined; + if (!this.vb) { + return null; + } + const e = this.vb.model; + const t = this.vb.hasRealView ? this.vb.view.domNode.domNode : null; + this.vb.dispose(); + this.vb = null; + this.pb.removeAttribute("data-mode-id"); + if (t && this.pb.contains(t)) { + t.remove(); + } + if (this.Ib && this.pb.contains(this.Ib)) { + this.Ib.remove(); + } + return e; + } + hc(e, t, s, n) { + this.zb.registerDecorationType(e, t, s, n, this); + } + ic(e) { + this.zb.removeDecorationType(e); + } + jc(e, t) { + return this.zb.resolveDecorationOptions(e, t); + } + getTelemetryData() { + return this.ob; + } + hasModel() { + return this.vb !== null; + } + kc(e) { + const t = [{ + range: new Z(e.lineNumber, e.column, e.lineNumber, e.column), + options: bz.b + }]; + this.Jb.set(t); + this.revealPosition(e, 1); + } + lc() { + this.Jb.clear(); + } + setContextValue(e, t) { + this.xb.createKey(e, t); + } + mc() { + this.ib++; + if (this.ib === 1) { + this.lb.fire(); + } + } + nc() { + this.ib--; + if (this.ib === 0) { + this.mb.fire(); + } + } + }; + gh = bz = __decorate([__param(3, re), __param(4, ps), __param(5, gt), __param(6, Ne), __param(7, ti), __param(8, ni), __param(9, na), __param(10, Lu), __param(11, nn), __param(12, Rx)], gh); + Kas = 0; + Yas = class { + constructor(i, e, t, s, n, r) { + this.model = i; + this.viewModel = e; + this.view = t; + this.hasRealView = s; + this.listenersToRemove = n; + this.attachedView = r; + } + dispose() { + si(this.listenersToRemove); + this.model.onBeforeDetached(this.attachedView); + if (this.hasRealView) { + this.view.dispose(); + } + this.viewModel.dispose(); + } + }; + (function (i) { + i[i.NotSet = 0] = "NotSet"; + i[i.False = 1] = "False"; + i[i.True = 2] = "True"; + })(Xas ||= {}); + sWt = class extends H { + constructor(i) { + super(); + this.g = i; + this.b = this.D(new B(this.g)); + this.onDidChangeToTrue = this.b.event; + this.c = this.D(new B(this.g)); + this.onDidChangeToFalse = this.c.event; + this.f = 0; + } + setValue(i) { + const e = i ? 2 : 1; + if (this.f !== e) { + this.f = e; + if (this.f === 2) { + this.b.fire(); + } else if (this.f === 1) { + this.c.fire(); + } + } + } + }; + Y0 = class extends B { + constructor(i, e) { + super({ + deliveryQueue: e + }); + this.h = i; + } + fire(i) { + this.h.onBeforeInteractionEvent(); + super.fire(i); + } + }; + Qas = class extends H { + constructor(i, e, t) { + super(); + this.b = i; + e.createKey("editorId", i.getId()); + this.c = ke.editorSimpleInput.bindTo(e); + this.f = ke.focus.bindTo(e); + this.g = ke.textInputFocus.bindTo(e); + this.h = ke.editorTextFocus.bindTo(e); + this.j = ke.tabMovesFocus.bindTo(e); + this.m = ke.readOnly.bindTo(e); + this.n = ke.inDiffEditor.bindTo(e); + this.q = ke.columnSelection.bindTo(e); + this.t = ke.hasMultipleSelections.bindTo(e); + this.u = ke.hasNonEmptySelection.bindTo(e); + this.w = ke.canUndo.bindTo(e); + this.y = ke.canRedo.bindTo(e); + this.D(this.b.onDidChangeConfiguration(() => this.z())); + this.D(this.b.onDidChangeCursorSelection(() => this.C())); + this.D(this.b.onDidFocusEditorWidget(() => this.F())); + this.D(this.b.onDidBlurEditorWidget(() => this.F())); + this.D(this.b.onDidFocusEditorText(() => { + if (!this.m.get() && !this.b.isChatCodeblock) { + t.registerEvent("editor.focus"); + } + this.F(); + })); + this.D(this.b.onDidBlurEditorText(() => this.F())); + this.D(this.b.onDidChangeModel(() => this.G())); + this.D(this.b.onDidChangeConfiguration(() => this.G())); + this.D(wM.onDidChangeTabFocus(s => this.j.set(s))); + this.z(); + this.C(); + this.F(); + this.G(); + this.c.set(this.b.isSimpleWidget); + } + z() { + const i = this.b.getOptions(); + this.j.set(wM.getTabFocusMode()); + this.m.set(i.get(96)); + this.n.set(i.get(63)); + this.q.set(i.get(22)); + } + C() { + const i = this.b.getSelections(); + if (i) { + this.t.set(i.length > 1); + this.u.set(i.some(e => !e.isEmpty())); + } else { + this.t.reset(); + this.u.reset(); + } + } + F() { + this.f.set(this.b.hasWidgetFocus() && !this.b.isSimpleWidget); + this.h.set(this.b.hasTextFocus() && !this.b.isSimpleWidget); + this.g.set(this.b.hasTextFocus()); + } + G() { + const i = this.b.getModel(); + this.w.set(!!i && !!i.canUndo()); + this.y.set(!!i && !!i.canRedo()); + } + }; + Zas = class extends H { + constructor(i, e, t) { + super(); + this.L = i; + this.M = e; + this.N = t; + this.b = ke.languageId.bindTo(e); + this.c = ke.hasCompletionItemProvider.bindTo(e); + this.f = ke.hasCodeActionsProvider.bindTo(e); + this.g = ke.hasCodeLensProvider.bindTo(e); + this.h = ke.hasDefinitionProvider.bindTo(e); + this.j = ke.hasDeclarationProvider.bindTo(e); + this.m = ke.hasImplementationProvider.bindTo(e); + this.n = ke.hasTypeDefinitionProvider.bindTo(e); + this.q = ke.hasHoverProvider.bindTo(e); + this.t = ke.hasDocumentHighlightProvider.bindTo(e); + this.u = ke.hasDocumentSymbolProvider.bindTo(e); + this.w = ke.hasReferenceProvider.bindTo(e); + this.y = ke.hasRenameProvider.bindTo(e); + this.H = ke.hasSignatureHelpProvider.bindTo(e); + this.I = ke.hasInlayHintsProvider.bindTo(e); + this.z = ke.hasDocumentFormattingProvider.bindTo(e); + this.C = ke.hasDocumentSelectionFormattingProvider.bindTo(e); + this.F = ke.hasMultipleDocumentFormattingProvider.bindTo(e); + this.G = ke.hasMultipleDocumentSelectionFormattingProvider.bindTo(e); + this.J = ke.isInEmbeddedEditor.bindTo(e); + const s = () => this.O(); + this.D(i.onDidChangeModel(s)); + this.D(i.onDidChangeModelLanguage(s)); + this.D(t.completionProvider.onDidChange(s)); + this.D(t.codeActionProvider.onDidChange(s)); + this.D(t.codeLensProvider.onDidChange(s)); + this.D(t.definitionProvider.onDidChange(s)); + this.D(t.declarationProvider.onDidChange(s)); + this.D(t.implementationProvider.onDidChange(s)); + this.D(t.typeDefinitionProvider.onDidChange(s)); + this.D(t.hoverProvider.onDidChange(s)); + this.D(t.documentHighlightProvider.onDidChange(s)); + this.D(t.documentSymbolProvider.onDidChange(s)); + this.D(t.referenceProvider.onDidChange(s)); + this.D(t.renameProvider.onDidChange(s)); + this.D(t.documentFormattingEditProvider.onDidChange(s)); + this.D(t.documentRangeFormattingEditProvider.onDidChange(s)); + this.D(t.signatureHelpProvider.onDidChange(s)); + this.D(t.inlayHintsProvider.onDidChange(s)); + s(); + } + dispose() { + super.dispose(); + } + reset() { + this.M.bufferChangeEvents(() => { + this.b.reset(); + this.c.reset(); + this.f.reset(); + this.g.reset(); + this.h.reset(); + this.j.reset(); + this.m.reset(); + this.n.reset(); + this.q.reset(); + this.t.reset(); + this.u.reset(); + this.w.reset(); + this.y.reset(); + this.z.reset(); + this.C.reset(); + this.H.reset(); + this.J.reset(); + }); + } + O() { + const i = this.L.getModel(); + if (!i) { + this.reset(); + return; + } + this.M.bufferChangeEvents(() => { + this.b.set(i.getLanguageId()); + this.c.set(this.N.completionProvider.has(i)); + this.f.set(this.N.codeActionProvider.has(i)); + this.g.set(this.N.codeLensProvider.has(i)); + this.h.set(this.N.definitionProvider.has(i)); + this.j.set(this.N.declarationProvider.has(i)); + this.m.set(this.N.implementationProvider.has(i)); + this.n.set(this.N.typeDefinitionProvider.has(i)); + this.q.set(this.N.hoverProvider.has(i)); + this.t.set(this.N.documentHighlightProvider.has(i)); + this.u.set(this.N.documentSymbolProvider.has(i)); + this.w.set(this.N.referenceProvider.has(i)); + this.y.set(this.N.renameProvider.has(i)); + this.H.set(this.N.signatureHelpProvider.has(i)); + this.I.set(this.N.inlayHintsProvider.has(i)); + this.z.set(this.N.documentFormattingEditProvider.has(i) || this.N.documentRangeFormattingEditProvider.has(i)); + this.C.set(this.N.documentRangeFormattingEditProvider.has(i)); + this.F.set(this.N.documentFormattingEditProvider.all(i).length + this.N.documentRangeFormattingEditProvider.all(i).length > 1); + this.G.set(this.N.documentRangeFormattingEditProvider.all(i).length > 1); + this.J.set(i.uri.scheme === me.walkThroughSnippet || i.uri.scheme === me.vscodeChatCodeBlock); + }); + } + }; + els = class extends H { + constructor(i, e) { + super(); + this.g = this.D(new B()); + this.onChange = this.g.event; + this.j = undefined; + this.b = false; + this.c = this.D(Pu(i)); + this.h = false; + this.D(this.c.onDidFocus(() => { + this.b = true; + this.m(); + })); + this.D(this.c.onDidBlur(() => { + this.b = false; + this.m(); + })); + if (e) { + this.f = this.D(Pu(e)); + this.D(this.f.onDidFocus(() => { + this.h = true; + this.m(); + })); + this.D(this.f.onDidBlur(() => { + this.h = false; + this.m(); + })); + } + } + m() { + const i = this.b || this.h; + if (this.j !== i) { + this.j = i; + this.g.fire(undefined); + } + } + hasFocus() { + return this.j ?? false; + } + refreshState() { + this.c.refreshState(); + this.f?.refreshState?.(); + } + }; + tls = class { + get length() { + return this.b.length; + } + constructor(i, e) { + this.d = i; + this.b = []; + this.c = false; + if (Array.isArray(e) && e.length > 0) { + this.set(e); + } + } + onDidChange(i, e, t) { + return this.d.onDidChangeModelDecorations(s => { + if (!this.c) { + i.call(e, s); + } + }, t); + } + getRange(i) { + if (!this.d.hasModel() || i >= this.b.length) { + return null; + } else { + return this.d.getModel().getDecorationRange(this.b[i]); + } + } + getRanges() { + if (!this.d.hasModel()) { + return []; + } + const i = this.d.getModel(); + const e = []; + for (const t of this.b) { + const s = i.getDecorationRange(t); + if (s) { + e.push(s); + } + } + return e; + } + has(i) { + return this.b.includes(i.id); + } + clear() { + if (this.b.length !== 0) { + this.set([]); + } + } + set(i) { + try { + this.c = true; + this.d.changeDecorations(e => { + this.b = e.deltaDecorations(this.b, i); + }); + } finally { + this.c = false; + } + return this.b; + } + append(i) { + let e = []; + try { + this.c = true; + this.d.changeDecorations(t => { + e = t.deltaDecorations([], i); + this.b = this.b.concat(e); + }); + } finally { + this.c = false; + } + return e; + } + }; + ils = encodeURIComponent(""); + nls = encodeURIComponent(""); + bf((i, e) => { + const t = i.getColor(DI); + if (t) { + e.addRule(`.monaco-editor .squiggly-error { background: url("data:image/svg+xml,${vme(t)}") repeat-x bottom left; }`); + } + const s = i.getColor(Zk); + if (s) { + e.addRule(`.monaco-editor .squiggly-ai { background: url("data:image/svg+xml,${vme(s)}") repeat-x bottom left; }`); + } + const n = i.getColor(GC); + if (n) { + e.addRule(`.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,${vme(n)}") repeat-x bottom left; }`); + e.addRule(`.monaco-editor .cursor-squiggly-non-marker { background: url("data:image/svg+xml,${vme(n)}") repeat-x bottom left; }`); + } + const r = i.getColor(Fw); + if (r) { + e.addRule(`.monaco-editor .squiggly-info { background: url("data:image/svg+xml,${vme(r)}") repeat-x bottom left; }`); + } + const o = i.getColor(iQi); + if (o) { + e.addRule(`.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,${yXn(o)}") no-repeat bottom left; }`); + } + const a = i.getColor(Yes); + if (a) { + e.addRule(`.monaco-editor.showUnused .squiggly-inline-unnecessary { opacity: ${a.rgba.a}; }`); + } + }); + } +}); +var ra; +var ols; +var nWt; +var ev; +var Zlt; +var rWt; +var Jp; +var als; +var lls; +var so = ue({ + "out-build/vs/platform/progress/common/progress.js"() { + "use strict"; + + nt(); + ri(); + q(); + It(); + te(); + ra = Ve("progressService"); + (function (i) { + i[i.Explorer = 1] = "Explorer"; + i[i.Scm = 3] = "Scm"; + i[i.Extensions = 5] = "Extensions"; + i[i.Window = 10] = "Window"; + i[i.Notification = 15] = "Notification"; + i[i.Dialog = 20] = "Dialog"; + })(ols ||= {}); + nWt = Object.freeze({ + total() {}, + worked() {}, + done() {} + }); + ev = class { + static { + this.None = Object.freeze({ + report() {} + }); + } + get value() { + return this.a; + } + constructor(i) { + this.b = i; + } + report(i) { + this.a = i; + this.b(this.a); + } + }; + Zlt = class extends H { + constructor(e, t) { + super(); + this.a = new uc(); + t.withProgress(e, s => { + this.b = s; + if (this.c) { + s.report(this.c); + } + return this.a.p; + }); + this.D(Ue(() => this.a.complete())); + } + report(e) { + if (this.b) { + this.b.report(e); + } else { + this.c = e; + } + } + }; + Zlt = __decorate([__param(1, ra)], Zlt); + rWt = class extends H { + constructor(i) { + super(); + this.g = i; + this.a = 0; + this.b = this.D(new Q()); + } + start(i) { + this.stop(); + const e = ++this.a; + const t = new Xi(); + this.f = setTimeout(() => { + if (e === this.a) { + this.c = this.g.show(true); + } + }, i); + this.b.add(Ue(() => clearTimeout(this.f))); + this.b.add(Ue(() => t.cancel())); + this.b.add(Ue(() => this.c ? this.c.done() : undefined)); + return { + id: e, + token: t.token, + stop: () => this.h(e), + isCurrent: () => this.a === e + }; + } + stop() { + this.h(this.a); + } + h(i) { + if (this.a === i) { + this.b.clear(); + } + } + }; + Jp = Ve("editorProgressService"); + als = Object.freeze({ + total() {}, + worked() {}, + done() {} + }); + lls = class extends H { + show(i, e) { + return als; + } + showWhile(i, e) { + return Promise.resolve(); + } + }; + it(Jp, lls, 1); + } +}); +function cls(i, e, t, s, n) { + const r = document.createElement("div"); + r.className = t; + r.textContent = e; + if (n) { + r.style.color = n; + } + if (s) { + r.style.background = s; + } + if (i.dataTransfer) { + Kt(i).document.body.appendChild(r); + i.dataTransfer.setDragImage(r, -10, -10); + setTimeout(() => r.remove(), 0); + } +} +var oWt; +var jh; +var sS = ue({ + "out-build/vs/base/browser/dnd.js"() { + "use strict"; + + xe(); + q(); + Jb(); + oWt = class extends H { + constructor(i, e) { + super(); + this.D(Ce(i, "dragover", t => { + t.preventDefault(); + this.a ||= setTimeout(() => { + e(); + this.a = null; + }, 800); + })); + ["dragleave", "drop", "dragend"].forEach(t => { + this.D(Ce(i, t, () => { + this.b(); + })); + }); + } + b() { + if (this.a) { + clearTimeout(this.a); + this.a = null; + } + } + dispose() { + super.dispose(); + this.b(); + } + }; + jh = { + RESOURCES: "ResourceURLs", + DOWNLOAD_URL: "DownloadURL", + FILES: "Files", + TEXT: pl.text, + INTERNAL_URI_LIST: "application/vnd.code.uri-list" + }; + } +}); +function wXn(i) { + yme = i; +} +function cr(i) { + if (i === "element") { + return hls.value; + } else { + return dls.value; + } +} +function Hy() { + return yme("element", true); +} +var uls; +var yme; +var dls; +var hls; +var oa = ue({ + "out-build/vs/base/browser/ui/hover/hoverDelegateFactory.js"() { + "use strict"; + + pu(); + uls = () => ({ + get delay() { + return -1; + }, + dispose: () => {}, + showHover: () => {} + }); + yme = uls; + dls = new ol(() => yme("mouse", false)); + hls = new ol(() => yme("element", false)); + } +}); +function Hta(i) { + return i; +} +function CF(i, e) { + if (i !== undefined) { + const t = i.match(/^\s*var\((.+)\)$/); + if (t) { + const s = t[1].split(",", 2); + if (s.length === 2) { + e = CF(s[1].trim(), e); + } + return `var(${s[0]}, ${e})`; + } + return i; + } + return e; +} +function fls(i) { + const e = i.replaceAll(/[^\w.%+-]/gi, ""); + if (e !== i) { + console.warn(`CSS size ${i} modified to ${e} to be safe for CSS`); + } + return e; +} +function CXn(i) { + const e = i.replaceAll(/[^[0-9a-fA-F#]]/gi, ""); + if (e !== i) { + console.warn(`CSS hex color ${i} modified to ${e} to be safe for CSS`); + } + return e; +} +function ect(i) { + const e = i.replaceAll(/[^_\-a-z0-9]/gi, ""); + if (e !== i) { + console.warn(`CSS ident value ${i} modified to ${e} to be safe for CSS`); + } + return e; +} +function nS(i) { + return `'${i.replaceAll(/'/g, "\\000027")}'`; +} +function Ih(i) { + if (i) { + return Il`url(${nS(Na.uriToBrowserUri(i).toString(true))})`; + } else { + return "url('')"; + } +} +function vz(i, e = false) { + const t = CSS.escape(i); + if (!e && t !== i) { + console.warn(`CSS class name ${i} modified to ${t} to be safe for CSS`); + } + return t; +} +function Il(i, ...e) { + return i.reduce((t, s, n) => { + const r = e[n] || ""; + return t + s + r; + }, ""); +} +var tR; +var wb = ue({ + "out-build/vs/base/browser/cssValue.js"() { + "use strict"; + + At(); + tR = class { + constructor() { + this.a = []; + } + push(...i) { + this.a.push(...i); + } + join(i = ` +`) { + return this.a.join(i); + } + }; + } +}); +var gls; +var SXn = ue({ + "out-build/vs/base/browser/ui/list/splice.js"() { + "use strict"; + + gls = class { + constructor(i) { + this.a = i; + } + splice(i, e, t) { + this.a.forEach(s => s.splice(i, e, t)); + } + }; + } +}); +function xXn(i) { + const e = kXn(i); + if (e && e.length > 0) { + return new Uint32Array(e); + } +} +function kXn(i) { + rE = 0; + SF(i, tct, 4352); + if (rE > 0 || (SF(i, ict, 4449), rE > 0) || (SF(i, sct, 4520), rE > 0) || (SF(i, h7, 12593), rE)) { + return _4.subarray(0, rE); + } + if (i >= 44032 && i <= 55203) { + const e = i - 44032; + const t = e % 588; + const s = Math.floor(e / 588); + const n = Math.floor(t / 28); + const r = t % 28 - 1; + if (s < tct.length) { + SF(s, tct, 0); + } else if (4352 + s - 12593 < h7.length) { + SF(4352 + s, h7, 12593); + } + if (n < ict.length) { + SF(n, ict, 0); + } else if (4449 + n - 12593 < h7.length) { + SF(4449 + n - 12593, h7, 12593); + } + if (r >= 0) { + if (r < sct.length) { + SF(r, sct, 0); + } else if (4520 + r - 12593 < h7.length) { + SF(4520 + r - 12593, h7, 12593); + } + } + if (rE > 0) { + return _4.subarray(0, rE); + } + } +} +function SF(i, e, t) { + if (i >= t && i < t + e.length) { + EXn(e[i - t]); + } +} +function EXn(i) { + if (i !== 0) { + _4[rE++] = i & 255; + if (i >> 8) { + _4[rE++] = i >> 8 & 255; + } + if (i >> 16) { + _4[rE++] = i >> 16 & 255; + } + } +} +var rE; +var _4; +var pls; +var mls; +var bls; +var tct; +var ict; +var sct; +var h7; +var IXn = ue({ + "out-build/vs/base/common/naturalLanguage/korean.js"() { + "use strict"; + + rE = 0; + _4 = new Uint32Array(10); + (function (i) { + i[i.InitialConsonant = 4352] = "InitialConsonant"; + i[i.Vowel = 4449] = "Vowel"; + i[i.FinalConsonant = 4520] = "FinalConsonant"; + i[i.CompatibilityJamo = 12593] = "CompatibilityJamo"; + })(pls ||= {}); + (function (i) { + i[i.NUL = 0] = "NUL"; + i[i.A = 65] = "A"; + i[i.B = 66] = "B"; + i[i.C = 67] = "C"; + i[i.D = 68] = "D"; + i[i.E = 69] = "E"; + i[i.F = 70] = "F"; + i[i.G = 71] = "G"; + i[i.H = 72] = "H"; + i[i.I = 73] = "I"; + i[i.J = 74] = "J"; + i[i.K = 75] = "K"; + i[i.L = 76] = "L"; + i[i.M = 77] = "M"; + i[i.N = 78] = "N"; + i[i.O = 79] = "O"; + i[i.P = 80] = "P"; + i[i.Q = 81] = "Q"; + i[i.R = 82] = "R"; + i[i.S = 83] = "S"; + i[i.T = 84] = "T"; + i[i.U = 85] = "U"; + i[i.V = 86] = "V"; + i[i.W = 87] = "W"; + i[i.X = 88] = "X"; + i[i.Y = 89] = "Y"; + i[i.Z = 90] = "Z"; + i[i.a = 97] = "a"; + i[i.b = 98] = "b"; + i[i.c = 99] = "c"; + i[i.d = 100] = "d"; + i[i.e = 101] = "e"; + i[i.f = 102] = "f"; + i[i.g = 103] = "g"; + i[i.h = 104] = "h"; + i[i.i = 105] = "i"; + i[i.j = 106] = "j"; + i[i.k = 107] = "k"; + i[i.l = 108] = "l"; + i[i.m = 109] = "m"; + i[i.n = 110] = "n"; + i[i.o = 111] = "o"; + i[i.p = 112] = "p"; + i[i.q = 113] = "q"; + i[i.r = 114] = "r"; + i[i.s = 115] = "s"; + i[i.t = 116] = "t"; + i[i.u = 117] = "u"; + i[i.v = 118] = "v"; + i[i.w = 119] = "w"; + i[i.x = 120] = "x"; + i[i.y = 121] = "y"; + i[i.z = 122] = "z"; + })(mls ||= {}); + (function (i) { + i[i.fa = 24934] = "fa"; + i[i.fg = 26470] = "fg"; + i[i.fq = 29030] = "fq"; + i[i.fr = 29286] = "fr"; + i[i.ft = 29798] = "ft"; + i[i.fv = 30310] = "fv"; + i[i.fx = 30822] = "fx"; + i[i.hk = 27496] = "hk"; + i[i.hl = 27752] = "hl"; + i[i.ho = 28520] = "ho"; + i[i.ml = 27757] = "ml"; + i[i.nj = 27246] = "nj"; + i[i.nl = 27758] = "nl"; + i[i.np = 28782] = "np"; + i[i.qt = 29809] = "qt"; + i[i.rt = 29810] = "rt"; + i[i.sg = 26483] = "sg"; + i[i.sw = 30579] = "sw"; + })(bls ||= {}); + tct = new Uint8Array([114, 82, 115, 101, 69, 102, 97, 113, 81, 116, 84, 100, 119, 87, 99, 122, 120, 118, 103]); + ict = new Uint16Array([107, 111, 105, 79, 106, 112, 117, 80, 104, 27496, 28520, 27752, 121, 110, 27246, 28782, 27758, 98, 109, 27757, 108]); + sct = new Uint16Array([114, 82, 29810, 115, 30579, 26483, 101, 102, 29286, 24934, 29030, 29798, 30822, 30310, 26470, 97, 113, 29809, 116, 84, 100, 119, 99, 122, 120, 118, 103]); + h7 = new Uint16Array([114, 82, 29810, 115, 30579, 26483, 101, 69, 102, 29286, 24934, 29030, 29798, 30822, 30310, 26470, 97, 113, 81, 29809, 116, 84, 100, 119, 87, 99, 122, 120, 118, 103, 107, 111, 105, 79, 106, 112, 117, 80, 104, 27496, 28520, 27752, 121, 110, 27246, 28782, 27758, 98, 109, 27757, 108]); + } +}); +function fie(...i) { + return function (e, t) { + for (let s = 0, n = i.length; s < n; s++) { + const r = i[s](e, t); + if (r) { + return r; + } + } + return null; + }; +} +function vls(i, e, t) { + if (!t || t.length < e.length) { + return null; + } + let s; + if (i) { + s = Oq(t, e); + } else { + s = t.indexOf(e) === 0; + } + if (s) { + if (e.length > 0) { + return [{ + start: 0, + end: e.length + }]; + } else { + return []; + } + } else { + return null; + } +} +function f7(i, e) { + const t = e.toLowerCase().indexOf(i.toLowerCase()); + if (t === -1) { + return null; + } else { + return [{ + start: t, + end: t + i.length + }]; + } +} +function yls(i, e) { + return aWt(i.toLowerCase(), e.toLowerCase(), 0, 0); +} +function aWt(i, e, t, s) { + if (t === i.length) { + return []; + } + if (s === e.length) { + return null; + } + if (i[t] === e[s]) { + let n = null; + if (n = aWt(i, e, t + 1, s + 1)) { + return uWt({ + start: s, + end: s + 1 + }, n); + } else { + return null; + } + } + return aWt(i, e, t, s + 1); +} +function lWt(i) { + return i >= 97 && i <= 122; +} +function wme(i) { + return i >= 65 && i <= 90; +} +function cWt(i) { + return i >= 48 && i <= 57; +} +function wls(i) { + return i === 32 || i === 9 || i === 10 || i === 13; +} +function nct(i) { + return wls(i) || bWt.has(i); +} +function Cls(i, e) { + return i === e || nct(i) && nct(e); +} +function Sls(i) { + if (lct.has(i)) { + return lct.get(i); + } + let e; + const t = xXn(i); + if (t) { + e = t; + } + lct.set(i, e); + return e; +} +function xls(i) { + return lWt(i) || wme(i) || cWt(i); +} +function uWt(i, e) { + if (e.length === 0) { + e = [i]; + } else if (i.end === e[0].start) { + e[0].start = i.start; + } else { + e.unshift(i); + } + return e; +} +function kls(i, e) { + for (let t = e; t < i.length; t++) { + const s = i.charCodeAt(t); + if (wme(s) || cWt(s) || t > 0 && !xls(i.charCodeAt(t - 1))) { + return t; + } + } + return i.length; +} +function dWt(i, e, t, s) { + if (t === i.length) { + return []; + } + if (s === e.length) { + return null; + } + if (i[t] !== e[s].toLowerCase()) { + return null; + } + { + let n = null; + let r = s + 1; + for (n = dWt(i, e, t + 1, s + 1); !n && (r = kls(e, r)) < e.length;) { + n = dWt(i, e, t + 1, r); + r++; + } + if (n === null) { + return null; + } else { + return uWt({ + start: s, + end: s + 1 + }, n); + } + } +} +function DXn(i) { + let e = 0; + let t = 0; + let s = 0; + let n = 0; + let r = 0; + for (let u = 0; u < i.length; u++) { + r = i.charCodeAt(u); + if (wme(r)) { + e++; + } + if (lWt(r)) { + t++; + } + if (xls(r)) { + s++; + } + if (cWt(r)) { + n++; + } + } + const o = e / i.length; + const a = t / i.length; + const l = s / i.length; + const c = n / i.length; + return { + upperPercent: o, + lowerPercent: a, + alphaPercent: l, + numericPercent: c + }; +} +function TXn(i) { + const { + upperPercent: e, + lowerPercent: t + } = i; + return t === 0 && e > 0.6; +} +function PXn(i) { + const { + upperPercent: e, + lowerPercent: t, + alphaPercent: s, + numericPercent: n + } = i; + return t > 0.2 && e < 0.8 && s > 0.6 && n < 0.2; +} +function LXn(i) { + let e = 0; + let t = 0; + let s = 0; + let n = 0; + for (let r = 0; r < i.length; r++) { + s = i.charCodeAt(r); + if (wme(s)) { + e++; + } + if (lWt(s)) { + t++; + } + if (wls(s)) { + n++; + } + } + if ((e === 0 || t === 0) && n === 0) { + return i.length <= 30; + } else { + return e <= 5; + } +} +function rct(i, e) { + if (!e || (e = e.trim(), e.length === 0) || !LXn(i)) { + return null; + } + if (e.length > 60) { + e = e.substring(0, 60); + } + const t = DXn(e); + if (!PXn(t)) { + if (!TXn(t)) { + return null; + } + e = e.toLowerCase(); + } + let s = null; + let n = 0; + for (i = i.toLowerCase(); n < e.length && (s = dWt(i, e, 0, n)) === null;) { + n = kls(e, n + 1); + } + return s; +} +function B4(i, e, t = false) { + if (!e || e.length === 0) { + return null; + } + let s = null; + let n = 0; + i = i.toLowerCase(); + e = e.toLowerCase(); + while (n < e.length && (s = hWt(i, e, 0, n, t), s === null)) { + n = Els(e, n + 1); + } + return s; +} +function hWt(i, e, t, s, n) { + let r = 0; + if (t === i.length) { + return []; + } + if (s === e.length) { + return null; + } + if (!Cls(i.charCodeAt(t), e.charCodeAt(s))) { + const l = Sls(i.charCodeAt(t)); + if (!l) { + return null; + } + for (let c = 0; c < l.length; c++) { + if (!Cls(l[c], e.charCodeAt(s + c))) { + return null; + } + } + r += l.length - 1; + } + let o = null; + let a = s + r + 1; + o = hWt(i, e, t + 1, a, n); + if (!n) { + while (!o && (a = Els(e, a)) < e.length) { + o = hWt(i, e, t + 1, a, n); + a++; + } + } + if (!o) { + return null; + } + if (i.charCodeAt(t) !== e.charCodeAt(s)) { + const l = Sls(i.charCodeAt(t)); + if (!l) { + return o; + } + for (let c = 0; c < l.length; c++) { + if (l[c] !== e.charCodeAt(s + c)) { + return o; + } + } + } + return uWt({ + start: s, + end: s + r + 1 + }, o); +} +function Els(i, e) { + for (let t = e; t < i.length; t++) { + if (nct(i.charCodeAt(t)) || t > 0 && nct(i.charCodeAt(t - 1))) { + return t; + } + } + return i.length; +} +function rS(i, e, t = false) { + if (typeof i != "string" || typeof e != "string") { + return null; + } + let s = vWt.get(i); + if (!s) { + s = new RegExp(jVn(i), "i"); + vWt.set(i, s); + } + const n = s.exec(e); + if (n) { + return [{ + start: n.index, + end: n.index + n[0].length + }]; + } else if (t) { + return Lls(i, e); + } else { + return Pls(i, e); + } +} +function fWt(i, e) { + const t = U4(i, i.toLowerCase(), 0, e, e.toLowerCase(), 0, { + firstMatchCanBeWeak: true, + boostFullMatch: true + }); + if (t) { + return sf(t); + } else { + return null; + } +} +function RXn(i, e, t, s, n, r) { + const o = Math.min(13, i.length); + for (; t < o; t++) { + const a = U4(i, e, t, s, n, r, { + firstMatchCanBeWeak: true, + boostFullMatch: true + }); + if (a) { + return a; + } + } + return [0, r]; +} +function sf(i) { + if (typeof i === "undefined") { + return []; + } + const e = []; + const t = i[1]; + for (let s = i.length - 1; s > 1; s--) { + const n = i[s] + t; + const r = e[e.length - 1]; + if (r && r.end === n) { + r.end = n + 1; + } else { + e.push({ + start: n, + end: n + 1 + }); + } + } + return e; +} +function gWt() { + const i = []; + const e = []; + for (let t = 0; t <= W4; t++) { + e[t] = 0; + } + for (let t = 0; t <= W4; t++) { + i.push(e.slice(0)); + } + return i; +} +function Ils(i) { + const e = []; + for (let t = 0; t <= i; t++) { + e[t] = 0; + } + return e; +} +function pWt(i, e, t, s, n) { + function r(a, l, c = " ") { + while (a.length < l) { + a = c + a; + } + return a; + } + let o = ` | |${s.split("").map(a => r(a, 3)).join("|")} +`; + for (let a = 0; a <= t; a++) { + if (a === 0) { + o += " |"; + } else { + o += `${e[a - 1]}|`; + } + o += `${i[a].slice(0, n + 1).map(l => r(l.toString(), 3)).join("|")} +`; + } + return o; +} +function NXn(i, e, t, s) { + i = i.substr(e); + t = t.substr(s); + console.log(pWt(V4, i, i.length, t, t.length)); + console.log(pWt(gie, i, i.length, t, t.length)); + console.log(pWt(_M, i, i.length, t, t.length)); +} +function oct(i, e) { + if (e < 0 || e >= i.length) { + return false; + } + const t = i.codePointAt(e); + switch (t) { + case 95: + case 45: + case 46: + case 32: + case 47: + case 92: + case 39: + case 34: + case 58: + case 36: + case 60: + case 62: + case 40: + case 41: + case 91: + case 93: + case 123: + case 125: + return true; + case undefined: + return false; + default: + return !!S4t(t); + } +} +function Dls(i, e) { + if (e < 0 || e >= i.length) { + return false; + } + switch (i.charCodeAt(e)) { + case 32: + case 9: + return true; + default: + return false; + } +} +function act(i, e, t) { + return e[i] !== t[i]; +} +function mWt(i, e, t, s, n, r, o = false) { + while (e < t && n < r) { + if (i[e] === s[n]) { + if (o) { + yWt[e] = n; + } + e += 1; + } + n += 1; + } + return e === t; +} +function U4(i, e, t, s, n, r, o = Cme.default) { + const a = i.length > W4 ? W4 : i.length; + const l = s.length > W4 ? W4 : s.length; + if (t >= a || r >= l || a - t > l - r || !mWt(e, t, a, n, r, l, true)) { + return; + } + MXn(a, l, t, r, e, n); + let c = 1; + let u = 1; + let d = t; + let h = r; + const g = [false]; + c = 1; + d = t; + for (; d < a; c++, d++) { + const w = yWt[d]; + const C = cct[d]; + const S = d + 1 < a ? cct[d + 1] : l; + u = w - r + 1; + h = w; + for (; h < S; u++, h++) { + let x = Number.MIN_SAFE_INTEGER; + let k = false; + if (h <= C) { + x = AXn(i, e, d, t, s, n, h, l, r, _M[c - 1][u - 1] === 0, g); + } + let E = 0; + if (x !== Number.MAX_SAFE_INTEGER) { + k = true; + E = x + V4[c - 1][u - 1]; + } + const D = h > w; + const P = D ? V4[c][u - 1] + (_M[c][u - 1] > 0 ? -5 : 0) : 0; + const R = h > w + 1 && _M[c][u - 1] > 0; + const L = R ? V4[c][u - 2] + (_M[c][u - 2] > 0 ? -5 : 0) : 0; + if (R && (!D || L >= P) && (!k || L >= E)) { + V4[c][u] = L; + gie[c][u] = 3; + _M[c][u] = 0; + } else if (D && (!k || P >= E)) { + V4[c][u] = P; + gie[c][u] = 2; + _M[c][u] = 0; + } else if (k) { + V4[c][u] = E; + gie[c][u] = 1; + _M[c][u] = _M[c - 1][u - 1] + 1; + } else { + throw new Error("not possible"); + } + } + } + if (Rls) { + NXn(i, t, s, r); + } + if (!g[0] && !o.firstMatchCanBeWeak) { + return; + } + c--; + u--; + const p = [V4[c][u], r]; + let b = 0; + let v = 0; + while (c >= 1) { + let w = u; + do { + const C = gie[c][w]; + if (C === 3) { + w = w - 2; + } else if (C === 2) { + w = w - 1; + } else { + break; + } + } while (w >= 1); + if (b > 1 && e[t + c - 1] === n[r + u - 1] && !act(w + r - 1, s, n) && b + 1 > _M[c][w]) { + w = u; + } + if (w === u) { + b++; + } else { + b = 1; + } + v ||= w; + c--; + u = w - 1; + p.push(u); + } + if (l - r === a && o.boostFullMatch) { + p[0] += 2; + } + const y = v - a; + p[0] -= y; + return p; +} +function MXn(i, e, t, s, n, r) { + let o = i - 1; + let a = e - 1; + while (o >= t && a >= s) { + if (n[o] === r[a]) { + cct[o] = a; + o--; + } + a--; + } +} +function AXn(i, e, t, s, n, r, o, a, l, c, u) { + if (e[t] !== r[o]) { + return Number.MIN_SAFE_INTEGER; + } + let d = 1; + let h = false; + if (o === t - s) { + d = i[t] === n[o] ? 7 : 5; + } else if (act(o, n, r) && (o === 0 || !act(o - 1, n, r))) { + d = i[t] === n[o] ? 7 : 5; + h = true; + } else if (oct(r, o) && (o === 0 || !oct(r, o - 1))) { + d = 5; + } else if (oct(r, o - 1) || Dls(r, o - 1)) { + d = 5; + h = true; + } + if (d > 1 && t === s) { + u[0] = true; + } + h ||= act(o, n, r) || oct(r, o - 1) || Dls(r, o - 1); + if (t === s) { + if (o > l) { + d -= h ? 3 : 5; + } + } else if (c) { + d += h ? 2 : 0; + } else { + d += h ? 0 : 1; + } + if (o + 1 === a) { + d -= h ? 3 : 5; + } + return d; +} +function Tls(i, e, t, s, n, r, o) { + return $Xn(i, e, t, s, n, r, true, o); +} +function $Xn(i, e, t, s, n, r, o, a) { + let l = U4(i, e, t, s, n, r, a); + if (l && !o) { + return l; + } + if (i.length >= 3) { + const c = Math.min(7, i.length - 1); + for (let u = t + 1; u < c; u++) { + const d = FXn(i, u); + if (d) { + const h = U4(d, d.toLowerCase(), t, s, n, r, a); + if (h) { + h[0] -= 3; + if (!l || h[0] > l[0]) { + l = h; + } + } + } + } + } + return l; +} +function FXn(i, e) { + if (e + 1 >= i.length) { + return; + } + const t = i[e]; + const s = i[e + 1]; + if (t !== s) { + return i.slice(0, e) + s + t + i.slice(e + 2); + } +} +var OXn; +var g7; +var bWt; +var lct; +var Pls; +var Lls; +var vWt; +var W4; +var yWt; +var cct; +var _M; +var V4; +var gie; +var Rls; +var Nls; +var Nx; +var Cme; +var Pc = ue({ + "out-build/vs/base/common/filters.js"() { + "use strict"; + + In(); + IXn(); + $i(); + OXn = vls.bind(undefined, false); + g7 = vls.bind(undefined, true); + bWt = new Set(); + "()[]{}<>`'\"-/;:,.?!".split("").forEach(i => bWt.add(i.charCodeAt(0))); + lct = new Map(); + Pls = fie(g7, rct, f7); + Lls = fie(g7, rct, yls); + vWt = new vc(10000); + W4 = 128; + yWt = Ils(W4 * 2); + cct = Ils(W4 * 2); + _M = gWt(); + V4 = gWt(); + gie = gWt(); + Rls = false; + (function (i) { + i[i.Diag = 1] = "Diag"; + i[i.Left = 2] = "Left"; + i[i.LeftLeft = 3] = "LeftLeft"; + })(Nls ||= {}); + (function (i) { + i.Default = [-100, 0]; + function e(t) { + return !t || t.length === 2 && t[0] === -100 && t[1] === 0; + } + i.isDefault = e; + })(Nx ||= {}); + Cme = class { + static { + this.default = { + boostFullMatch: true, + firstMatchCanBeWeak: false + }; + } + constructor(i, e) { + this.firstMatchCanBeWeak = i; + this.boostFullMatch = e; + } + }; + } +}); +var Mls = ue({ + "out-build/vs/base/browser/ui/list/list.css"() {} +}); +var Als; +var $ls; +var BM; +var uct; +var Sme = ue({ + "out-build/vs/base/browser/ui/list/list.js"() { + "use strict"; + + (function (i) { + i[i.Copy = 0] = "Copy"; + i[i.Move = 1] = "Move"; + })(Als ||= {}); + (function (i) { + i.Over = "drop-target"; + i.Before = "drop-target-before"; + i.After = "drop-target-after"; + })($ls ||= {}); + BM = class extends Error { + constructor(i, e) { + super(`ListError [${i}] ${e}`); + } + }; + uct = class { + constructor() { + this.c = new WeakMap(); + } + getHeight(i) { + return this.c.get(i) ?? this.d(i); + } + setDynamicHeight(i, e) { + if (e > 0) { + this.c.set(i, e); + } + } + }; + } +}); +var X0; +var dct = ue({ + "out-build/vs/base/common/range.js"() { + "use strict"; + + (function (i) { + function e(r, o) { + if (r.start >= o.end || o.start >= r.end) { + return { + start: 0, + end: 0 + }; + } + const a = Math.max(r.start, o.start); + const l = Math.min(r.end, o.end); + if (l - a <= 0) { + return { + start: 0, + end: 0 + }; + } else { + return { + start: a, + end: l + }; + } + } + i.intersect = e; + function t(r) { + return r.end - r.start <= 0; + } + i.isEmpty = t; + function s(r, o) { + return !t(e(r, o)); + } + i.intersects = s; + function n(r, o) { + const a = []; + const l = { + start: r.start, + end: Math.min(o.start, r.end) + }; + const c = { + start: Math.max(o.end, r.start), + end: r.end + }; + if (!t(l)) { + a.push(l); + } + if (!t(c)) { + a.push(c); + } + return a; + } + i.relativeComplement = n; + })(X0 ||= {}); + } +}); +function Fls(i, e) { + const t = []; + for (const s of e) { + if (i.start >= s.range.end) { + continue; + } + if (i.end < s.range.start) { + break; + } + const n = X0.intersect(i, s.range); + if (!X0.isEmpty(n)) { + t.push({ + range: n, + size: s.size + }); + } + } + return t; +} +function wWt({ + start: i, + end: e +}, t) { + return { + start: i + t, + end: e + t + }; +} +function _Xn(i) { + const e = []; + let t = null; + for (const s of i) { + const n = s.range.start; + const r = s.range.end; + const o = s.size; + if (t && o === t.size) { + t.range.end = r; + continue; + } + t = { + range: { + start: n, + end: r + }, + size: o + }; + e.push(t); + } + return e; +} +function BXn(...i) { + return _Xn(i.reduce((e, t) => e.concat(t), [])); +} +var Ols; +var UXn = ue({ + "out-build/vs/base/browser/ui/list/rangeMap.js"() { + "use strict"; + + dct(); + Ols = class { + get paddingTop() { + return this.c; + } + set paddingTop(i) { + this.b = this.b + i - this.c; + this.c = i; + } + constructor(i) { + this.a = []; + this.b = 0; + this.c = 0; + this.c = i ?? 0; + this.b = this.c; + } + splice(i, e, t = []) { + const s = t.length - e; + const n = Fls({ + start: 0, + end: i + }, this.a); + const r = Fls({ + start: i + e, + end: Number.POSITIVE_INFINITY + }, this.a).map(a => ({ + range: wWt(a.range, s), + size: a.size + })); + const o = t.map((a, l) => ({ + range: { + start: i + l, + end: i + l + 1 + }, + size: a.size + })); + this.a = BXn(n, o, r); + this.b = this.c + this.a.reduce((a, l) => a + l.size * (l.range.end - l.range.start), 0); + } + get count() { + const i = this.a.length; + if (i) { + return this.a[i - 1].range.end; + } else { + return 0; + } + } + get size() { + return this.b; + } + indexAt(i) { + if (i < 0) { + return -1; + } + if (i < this.c) { + return 0; + } + let e = 0; + let t = this.c; + for (const s of this.a) { + const n = s.range.end - s.range.start; + const r = t + n * s.size; + if (i < r) { + return e + Math.floor((i - t) / s.size); + } + e += n; + t = r; + } + return e; + } + indexAfter(i) { + return Math.min(this.indexAt(i) + 1, this.count); + } + positionAt(i) { + if (i < 0) { + return -1; + } + let e = 0; + let t = 0; + for (const s of this.a) { + const n = s.range.end - s.range.start; + const r = t + n; + if (i < r) { + return this.c + e + (i - t) * s.size; + } + e += n * s.size; + t = r; + } + return -1; + } + }; + } +}); +var _ls; +var WXn = ue({ + "out-build/vs/base/browser/ui/list/rowCache.js"() { + "use strict"; + + xe(); + _ls = class { + constructor(i) { + this.d = i; + this.a = new Map(); + this.b = new Set(); + this.c = false; + } + alloc(i) { + let e = this.g(i).pop(); + let t = false; + if (e) { + t = this.b.has(e.domNode); + if (t) { + this.b.delete(e.domNode); + } + } else { + const s = G(".monaco-list-row"); + const r = this.h(i).renderTemplate(s); + e = { + domNode: s, + templateId: i, + templateData: r + }; + } + return { + row: e, + isReusingConnectedDomNode: t + }; + } + release(i) { + if (i) { + this.e(i); + } + } + transact(i) { + if (this.c) { + throw new Error("Already in transaction"); + } + this.c = true; + try { + i(); + } finally { + for (const e of this.b) { + this.f(e); + } + this.b.clear(); + this.c = false; + } + } + e(i) { + const { + domNode: e, + templateId: t + } = i; + if (e) { + if (this.c) { + this.b.add(e); + } else { + this.f(e); + } + } + this.g(t).push(i); + } + f(i) { + i.classList.remove("scrolling"); + i.remove(); + } + g(i) { + let e = this.a.get(i); + if (!e) { + e = []; + this.a.set(i, e); + } + return e; + } + dispose() { + this.a.forEach((i, e) => { + for (const t of i) { + this.h(e).disposeTemplate(t.templateData); + t.templateData = null; + } + }); + this.a.clear(); + this.b.clear(); + } + h(i) { + const e = this.d.get(i); + if (!e) { + throw new Error(`No renderer found for ${i}`); + } + return e; + } + }; + } +}); +function VXn(i, e) { + if (Array.isArray(i) && Array.isArray(e)) { + return Go(i, e); + } else { + return i === e; + } +} +var p7; +var Bls; +var UM; +var iR; +var CWt; +var pie; +var Uls; +var GI; +var m7 = ue({ + "out-build/vs/base/browser/ui/list/listView.js"() { + "use strict"; + + sS(); + xe(); + q0(); + hh(); + Kg(); + Jt(); + nt(); + au(); + pe(); + q(); + dct(); + O9(); + UXn(); + WXn(); + Ut(); + Xf(); + p7 = { + CurrentDragAndDropData: undefined + }; + (function (i) { + i[i.TOP = 0] = "TOP"; + i[i.CENTER_TOP = 1] = "CENTER_TOP"; + i[i.CENTER_BOTTOM = 2] = "CENTER_BOTTOM"; + i[i.BOTTOM = 3] = "BOTTOM"; + })(Bls ||= {}); + UM = { + useShadows: true, + verticalScrollMode: 1, + setRowLineHeight: true, + setRowHeight: true, + supportDynamicHeights: false, + dnd: { + getDragElements(i) { + return [i]; + }, + getDragURI() { + return null; + }, + onDragStart() {}, + onDragOver() { + return false; + }, + drop() {}, + dispose() {} + }, + horizontalScrolling: false, + transformOptimization: true, + alwaysConsumeMouseWheel: true + }; + iR = class { + get context() { + return this.d; + } + set context(i) { + this.d = i; + } + constructor(i) { + this.elements = i; + } + update() {} + getData() { + return this.elements; + } + }; + CWt = class { + constructor(i) { + this.elements = i; + } + update() {} + getData() { + return this.elements; + } + }; + pie = class { + constructor() { + this.types = []; + this.files = []; + } + update(i) { + if (i.types) { + this.types.splice(0, this.types.length, ...i.types); + } + if (i.files) { + this.files.splice(0, this.files.length); + for (let e = 0; e < i.files.length; e++) { + const t = i.files.item(e); + if (t && (t.size || t.type)) { + this.files.push(t); + } + } + } + } + getData() { + return { + types: this.types, + files: this.files + }; + } + }; + Uls = class { + constructor(i) { + if (i?.getSetSize) { + this.getSetSize = i.getSetSize.bind(i); + } else { + this.getSetSize = (e, t, s) => s; + } + if (i?.getPosInSet) { + this.getPosInSet = i.getPosInSet.bind(i); + } else { + this.getPosInSet = (e, t) => t + 1; + } + if (i?.getRole) { + this.getRole = i.getRole.bind(i); + } else { + this.getRole = e => "listitem"; + } + if (i?.isChecked) { + this.isChecked = i.isChecked.bind(i); + } else { + this.isChecked = e => {}; + } + } + }; + GI = class SOn { + static { + this.c = 0; + } + get contentHeight() { + return this.g.size; + } + get contentWidth() { + return this.F ?? 0; + } + get onDidScroll() { + return this.q.onScroll; + } + get onWillScroll() { + return this.q.onWillScroll; + } + get containerDomNode() { + return this.o; + } + get scrollableElementDomNode() { + return this.q.getDomNode(); + } + get R() { + return this.Q; + } + set R(e) { + if (e !== this.Q) { + if (e && this.B) { + throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously"); + } + this.Q = e; + this.domNode.classList.toggle("horizontal-scrolling", this.Q); + if (this.Q) { + for (const t of this.d) { + this.bb(t); + } + this.Y(); + this.q.setScrollDimensions({ + width: rge(this.domNode) + }); + this.o.style.width = `${Math.max(this.F || 0, this.n)}px`; + } else { + this.u.cancel(); + this.q.setScrollDimensions({ + width: this.n, + scrollWidth: this.n + }); + this.o.style.width = ""; + } + } + } + constructor(e, t, s, n = UM) { + this.S = t; + this.domId = `list_id_${++SOn.c}`; + this.j = new Map(); + this.n = 0; + this.s = 0; + this.t = null; + this.u = new gl(50); + this.v = false; + this.x = H.None; + this.y = 0; + this.H = false; + this.L = H.None; + this.M = H.None; + this.N = new Q(); + this.O = new B(); + this.P = new B(); + this.onDidChangeContentHeight = de.latch(this.O.event, undefined, this.N); + this.onDidChangeContentWidth = de.latch(this.P.event, undefined, this.N); + this.Q = false; + if (n.horizontalScrolling && n.supportDynamicHeights) { + throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously"); + } + this.d = []; + this.f = 0; + this.g = this.U(n.paddingTop ?? 0); + for (const o of s) { + this.j.set(o.templateId, o); + } + this.h = this.N.add(new _ls(this.j)); + this.k = 0; + this.m = 0; + this.domNode = document.createElement("div"); + this.domNode.className = "monaco-list"; + this.domNode.classList.add(this.domId); + this.domNode.tabIndex = 0; + this.domNode.classList.toggle("mouse-support", typeof n.mouseSupport == "boolean" ? n.mouseSupport : true); + this.Q = n.horizontalScrolling ?? UM.horizontalScrolling; + this.domNode.classList.toggle("horizontal-scrolling", this.Q); + this.C = typeof n.paddingBottom === "undefined" ? 0 : n.paddingBottom; + this.D = typeof n.itemGap === "undefined" ? 0 : n.itemGap; + this.E = new Uls(n.accessibilityProvider); + this.o = document.createElement("div"); + this.o.className = "monaco-list-rows"; + if (n.transformOptimization ?? UM.transformOptimization) { + this.o.style.transform = "translate3d(0px, 0px, 0px)"; + this.o.style.overflow = "hidden"; + this.o.style.contain = "strict"; + } + this.N.add(bd.addTarget(this.o)); + this.p = this.N.add(new p4({ + forceIntegerValues: true, + smoothScrollDuration: n.smoothScrolling ?? false ? 125 : 0, + scheduleAtNextAnimationFrame: o => Zc(Kt(this.domNode), o) + })); + this.q = this.N.add(new cte(this.o, { + alwaysConsumeMouseWheel: n.alwaysConsumeMouseWheel ?? UM.alwaysConsumeMouseWheel, + horizontal: 1, + vertical: n.verticalScrollMode ?? UM.verticalScrollMode, + useShadows: n.useShadows ?? UM.useShadows, + mouseWheelScrollSensitivity: n.mouseWheelScrollSensitivity, + fastScrollSensitivity: n.fastScrollSensitivity, + scrollByPage: n.scrollByPage + }, this.p)); + this.domNode.appendChild(this.q.getDomNode()); + e.appendChild(this.domNode); + this.q.onScroll(this.jb, this, this.N); + this.N.add(Ce(this.o, ul.Change, o => this.kb(o))); + this.N.add(Ce(this.q.getDomNode(), "scroll", o => o.target.scrollTop = 0)); + this.N.add(Ce(this.domNode, "dragover", o => this.mb(this.ib(o)))); + this.N.add(Ce(this.domNode, "drop", o => this.ob(this.ib(o)))); + this.N.add(Ce(this.domNode, "dragleave", o => this.nb(this.ib(o)))); + this.N.add(Ce(this.domNode, "dragend", o => this.pb(o))); + this.z = n.setRowLineHeight ?? UM.setRowLineHeight; + this.A = n.setRowHeight ?? UM.setRowHeight; + this.B = n.supportDynamicHeights ?? UM.supportDynamicHeights; + this.G = n.dnd ?? this.N.add(UM.dnd); + this.layout(n.initialSize?.height, n.initialSize?.width); + } + updateOptions(e) { + if (e.paddingBottom !== undefined) { + this.C = e.paddingBottom; + this.q.setScrollDimensions({ + scrollHeight: this.scrollHeight + }); + } + if (e.smoothScrolling !== undefined) { + this.p.setSmoothScrollDuration(e.smoothScrolling ? 125 : 0); + } + if (e.horizontalScrolling !== undefined) { + this.R = e.horizontalScrolling; + } + if (e.itemGap !== undefined && e.itemGap !== this.D) { + this.D = e.itemGap; + const s = this.d.slice(); + this.g = this.U(this.g.paddingTop); + this.V(0, s.length, s.map(n => n.element)); + } + let t; + if (e.scrollByPage !== undefined) { + t = { + ...(t ?? {}), + scrollByPage: e.scrollByPage + }; + } + if (e.mouseWheelScrollSensitivity !== undefined) { + t = { + ...(t ?? {}), + mouseWheelScrollSensitivity: e.mouseWheelScrollSensitivity + }; + } + if (e.fastScrollSensitivity !== undefined) { + t = { + ...(t ?? {}), + fastScrollSensitivity: e.fastScrollSensitivity + }; + } + if (t) { + this.q.updateOptions(t); + } + if (e.paddingTop !== undefined && e.paddingTop !== this.g.paddingTop) { + const s = this.wb(this.k, this.m); + const n = e.paddingTop - this.g.paddingTop; + this.g.paddingTop = e.paddingTop; + this.Z(s, Math.max(0, this.k + n), this.m, undefined, undefined, true); + this.setScrollTop(this.k); + this.W(); + if (this.B) { + this.xb(this.k, this.m); + } + } + } + delegateScrollFromMouseWheelEvent(e) { + this.q.delegateScrollFromMouseWheelEvent(e); + } + delegateVerticalScrollbarPointerDown(e) { + this.q.delegateVerticalScrollbarPointerDown(e); + } + updateElementHeight(e, t, s) { + if (e < 0 || e >= this.d.length) { + return; + } + const n = this.d[e].size; + if (typeof t === "undefined") { + if (!this.B) { + console.warn("Dynamic heights not supported", new Error().stack); + return; + } + this.d[e].lastDynamicHeightWidth = undefined; + t = n + this.yb(e); + } + if (n === t) { + return; + } + const r = this.wb(this.k, this.m); + let o = 0; + if (e < r.start || s !== null && s > e && s < r.end) { + o = t - n; + } else { + o = 0; + } + const a = this.D > 0 ? t + this.D : t; + this.g.splice(e, 1, [{ + size: a + }]); + this.d[e].size = t; + this.Z(r, Math.max(0, this.k + o), this.m, undefined, undefined, true); + this.setScrollTop(this.k); + this.W(); + if (this.B) { + this.xb(this.k, this.m); + } + } + U(e) { + return new Ols(e); + } + splice(e, t, s = []) { + if (this.v) { + throw new Error("Can't run recursive splices."); + } + this.v = true; + try { + return this.V(e, t, s); + } finally { + this.v = false; + this.O.fire(this.contentHeight); + } + } + V(e, t, s = []) { + const n = this.wb(this.k, this.m); + const r = { + start: e, + end: e + t + }; + const o = X0.intersect(n, r); + const a = new Map(); + for (let x = o.end - 1; x >= o.start; x--) { + const k = this.d[x]; + k.dragStartDisposable.dispose(); + k.checkedDisposable.dispose(); + if (k.row) { + let E = a.get(k.templateId); + if (!E) { + E = []; + a.set(k.templateId, E); + } + const D = this.j.get(k.templateId); + if (D && D.disposeElement) { + D.disposeElement(k.element, x, k.row.templateData, k.size); + } + E.unshift(k.row); + } + k.row = null; + k.stale = true; + } + const l = { + start: e + t, + end: this.d.length + }; + const c = X0.intersect(l, n); + const u = X0.relativeComplement(l, n); + const d = s.map(x => ({ + id: String(this.f++), + element: x, + templateId: this.S.getTemplateId(x), + size: this.S.getHeight(x), + width: undefined, + hasDynamicHeight: !!this.S.hasDynamicHeight && this.S.hasDynamicHeight(x), + lastDynamicHeightWidth: undefined, + row: null, + uri: undefined, + dropTarget: false, + dragStartDisposable: H.None, + checkedDisposable: H.None, + stale: false + })); + let h; + if (e === 0 && t >= this.d.length) { + this.g = this.U(this.g.paddingTop); + if (this.D > 0) { + const x = d.map(k => ({ + ...k, + size: k.size + this.D + })); + if (x.length > 0) { + const k = x[x.length - 1]; + x[x.length - 1] = { + ...k, + size: k.size - this.D + }; + } + this.g.splice(0, 0, x); + } else { + this.g.splice(0, 0, d); + } + h = this.d; + this.d = d; + } else { + if (this.D > 0) { + const x = d.map(k => ({ + ...k, + size: k.size + this.D + })); + if (x.length > 0 && e + x.length === this.d.length + x.length) { + const k = x[x.length - 1]; + x[x.length - 1] = { + ...k, + size: k.size - this.D + }; + } + this.g.splice(e, t, x); + } else { + this.g.splice(e, t, d); + } + h = this.d.splice(e, t, ...d); + } + const g = s.length - t; + const p = this.wb(this.k, this.m); + const b = wWt(c, g); + const v = X0.intersect(p, b); + for (let x = v.start; x < v.end; x++) { + this.db(this.d[x], x); + } + const y = X0.relativeComplement(b, p); + for (const x of y) { + for (let k = x.start; k < x.end; k++) { + this.eb(k); + } + } + const w = u.map(x => wWt(x, g)); + const S = [{ + start: e, + end: e + s.length + }, ...w].map(x => X0.intersect(p, x)).reverse(); + for (const x of S) { + for (let k = x.end - 1; k >= x.start; k--) { + const E = this.d[k]; + const P = a.get(E.templateId)?.pop(); + this.ab(k, P); + } + } + for (const x of a.values()) { + for (const k of x) { + this.h.release(k); + } + } + this.W(); + if (this.B) { + this.xb(this.scrollTop, this.renderHeight); + } + return h.map(x => x.element); + } + W() { + this.s = this.contentHeight; + this.o.style.height = `${this.s}px`; + this.t ||= Zc(Kt(this.domNode), () => { + this.q.setScrollDimensions({ + scrollHeight: this.scrollHeight + }); + this.Y(); + this.t = null; + }); + } + X() { + if (!this.R) { + this.u.cancel(); + return; + } + this.u.trigger(() => this.Y()); + } + Y() { + if (!this.R) { + return; + } + let e = 0; + for (const t of this.d) { + if (typeof t.width !== "undefined") { + e = Math.max(e, t.width); + } + } + this.F = e; + this.q.setScrollDimensions({ + scrollWidth: e === 0 ? 0 : e + 10 + }); + this.P.fire(this.F); + } + updateWidth(e) { + if (!this.R || typeof this.F === "undefined") { + return; + } + const t = this.d[e]; + this.bb(t); + if (typeof t.width !== "undefined" && t.width > this.F) { + this.F = t.width; + this.q.setScrollDimensions({ + scrollWidth: this.F + 10 + }); + this.P.fire(this.F); + } + } + rerender() { + if (this.B) { + for (const e of this.d) { + e.lastDynamicHeightWidth = undefined; + } + this.xb(this.k, this.m); + } + } + get length() { + return this.d.length; + } + get renderHeight() { + return this.q.getScrollDimensions().height; + } + get firstVisibleIndex() { + return this.wb(this.k, this.m).start; + } + get firstMostlyVisibleIndex() { + const e = this.firstVisibleIndex; + const t = this.g.positionAt(e); + const s = this.g.positionAt(e + 1); + if (s !== -1 && (s - t) / 2 + t < this.scrollTop) { + return e + 1; + } else { + return e; + } + } + get lastVisibleIndex() { + return this.wb(this.k, this.m).end - 1; + } + element(e) { + return this.d[e].element; + } + indexOf(e) { + return this.d.findIndex(t => t.element === e); + } + domElement(e) { + const t = this.d[e].row; + return t && t.domNode; + } + elementHeight(e) { + return this.d[e].size; + } + elementTop(e) { + return this.g.positionAt(e); + } + indexAt(e) { + return this.g.indexAt(e); + } + indexAfter(e) { + return this.g.indexAfter(e); + } + layout(e, t) { + const s = { + height: typeof e == "number" ? e : b6t(this.domNode) + }; + if (this.t) { + this.t.dispose(); + this.t = null; + s.scrollHeight = this.scrollHeight; + } + this.q.setScrollDimensions(s); + if (typeof t !== "undefined") { + this.n = t; + if (this.B) { + this.xb(this.scrollTop, this.renderHeight); + } + } + if (this.R) { + this.q.setScrollDimensions({ + width: typeof t == "number" ? t : rge(this.domNode) + }); + } + } + Z(e, t, s, n, r, o = false) { + const a = this.wb(t, s); + const l = X0.relativeComplement(a, e).reverse(); + const c = X0.relativeComplement(e, a); + if (o) { + const u = X0.intersect(e, a); + for (let d = u.start; d < u.end; d++) { + this.db(this.d[d], d); + } + } + this.h.transact(() => { + for (const u of c) { + for (let d = u.start; d < u.end; d++) { + this.eb(d); + } + } + for (const u of l) { + for (let d = u.end - 1; d >= u.start; d--) { + this.ab(d); + } + } + }); + if (n !== undefined) { + this.o.style.left = `-${n}px`; + } + this.o.style.top = `-${t}px`; + if (this.R && r !== undefined) { + this.o.style.width = `${Math.max(r, this.n)}px`; + } + this.k = t; + this.m = s; + } + ab(e, t) { + const s = this.d[e]; + if (!s.row) { + if (t) { + s.row = t; + s.stale = true; + } else { + const l = this.h.alloc(s.templateId); + s.row = l.row; + s.stale ||= l.isReusingConnectedDomNode; + } + } + const n = this.E.getRole(s.element) || "listitem"; + s.row.domNode.setAttribute("role", n); + const r = this.E.isChecked(s.element); + if (typeof r == "boolean") { + s.row.domNode.setAttribute("aria-checked", String(!!r)); + } else if (r) { + const l = c => s.row.domNode.setAttribute("aria-checked", String(!!c)); + l(r.value); + s.checkedDisposable = r.onDidChange(() => l(r.value)); + } + if (s.stale || !s.row.domNode.parentElement) { + const l = this.d.at(e + 1)?.row?.domNode ?? null; + if (s.row.domNode.parentElement !== this.o || s.row.domNode.nextElementSibling !== l) { + this.o.insertBefore(s.row.domNode, l); + } + s.stale = false; + } + this.db(s, e); + const o = this.j.get(s.templateId); + if (!o) { + throw new Error(`No renderer found for template id ${s.templateId}`); + } + o?.renderElement(s.element, e, s.row.templateData, s.size); + const a = this.G.getDragURI(s.element); + s.dragStartDisposable.dispose(); + s.row.domNode.draggable = !!a; + if (a) { + s.dragStartDisposable = Ce(s.row.domNode, "dragstart", l => this.lb(s.element, a, l)); + } + if (this.R) { + this.bb(s); + this.X(); + } + } + bb(e) { + if (!e.row || !e.row.domNode) { + return; + } + e.row.domNode.style.width = "fit-content"; + e.width = rge(e.row.domNode); + const t = Kt(e.row.domNode).getComputedStyle(e.row.domNode); + if (t.paddingLeft) { + e.width += parseFloat(t.paddingLeft); + } + if (t.paddingRight) { + e.width += parseFloat(t.paddingRight); + } + e.row.domNode.style.width = ""; + } + db(e, t) { + e.row.domNode.style.top = `${this.elementTop(t)}px`; + if (this.A) { + e.row.domNode.style.height = `${e.size}px`; + } + if (this.z) { + e.row.domNode.style.lineHeight = `${e.size}px`; + } + e.row.domNode.setAttribute("data-index", `${t}`); + e.row.domNode.setAttribute("data-last-element", t === this.length - 1 ? "true" : "false"); + e.row.domNode.setAttribute("data-parity", t % 2 === 0 ? "even" : "odd"); + e.row.domNode.setAttribute("aria-setsize", String(this.E.getSetSize(e.element, t, this.length))); + e.row.domNode.setAttribute("aria-posinset", String(this.E.getPosInSet(e.element, t))); + e.row.domNode.setAttribute("id", this.getElementDomId(t)); + e.row.domNode.classList.toggle("drop-target", e.dropTarget); + } + eb(e) { + const t = this.d[e]; + t.dragStartDisposable.dispose(); + t.checkedDisposable.dispose(); + if (t.row) { + const s = this.j.get(t.templateId); + if (s && s.disposeElement) { + s.disposeElement(t.element, e, t.row.templateData, t.size); + } + this.h.release(t.row); + t.row = null; + } + if (this.R) { + this.X(); + } + } + getScrollTop() { + return this.q.getScrollPosition().scrollTop; + } + setScrollTop(e, t) { + if (this.t) { + this.t.dispose(); + this.t = null; + this.q.setScrollDimensions({ + scrollHeight: this.scrollHeight + }); + } + this.q.setScrollPosition({ + scrollTop: e, + reuseAnimation: t + }); + } + getScrollLeft() { + return this.q.getScrollPosition().scrollLeft; + } + setScrollLeft(e) { + if (this.t) { + this.t.dispose(); + this.t = null; + this.q.setScrollDimensions({ + scrollWidth: this.F + }); + } + this.q.setScrollPosition({ + scrollLeft: e + }); + } + get scrollTop() { + return this.getScrollTop(); + } + set scrollTop(e) { + this.setScrollTop(e); + } + get scrollHeight() { + return this.s + (this.R ? 10 : 0) + this.C; + } + get onMouseClick() { + return de.map(this.N.add(new Co(this.domNode, "click")).event, e => this.fb(e), this.N); + } + get onMouseDblClick() { + return de.map(this.N.add(new Co(this.domNode, "dblclick")).event, e => this.fb(e), this.N); + } + get onMouseMiddleClick() { + return de.filter(de.map(this.N.add(new Co(this.domNode, "auxclick")).event, e => this.fb(e), this.N), e => e.browserEvent.button === 1, this.N); + } + get onMouseUp() { + return de.map(this.N.add(new Co(this.domNode, "mouseup")).event, e => this.fb(e), this.N); + } + get onMouseDown() { + return de.map(this.N.add(new Co(this.domNode, "mousedown")).event, e => this.fb(e), this.N); + } + get onMouseOver() { + return de.map(this.N.add(new Co(this.domNode, "mouseover")).event, e => this.fb(e), this.N); + } + get onMouseMove() { + return de.map(this.N.add(new Co(this.domNode, "mousemove")).event, e => this.fb(e), this.N); + } + get onMouseOut() { + return de.map(this.N.add(new Co(this.domNode, "mouseout")).event, e => this.fb(e), this.N); + } + get onContextMenu() { + return de.any(de.map(this.N.add(new Co(this.domNode, "contextmenu")).event, e => this.fb(e), this.N), de.map(this.N.add(new Co(this.domNode, ul.Contextmenu)).event, e => this.hb(e), this.N)); + } + get onTouchStart() { + return de.map(this.N.add(new Co(this.domNode, "touchstart")).event, e => this.gb(e), this.N); + } + get onTap() { + return de.map(this.N.add(new Co(this.o, ul.Tap)).event, e => this.hb(e), this.N); + } + fb(e) { + const t = this.vb(e.target || null); + const s = typeof t === "undefined" ? undefined : this.d[t]; + const n = s && s.element; + return { + browserEvent: e, + index: t, + element: n + }; + } + gb(e) { + const t = this.vb(e.target || null); + const s = typeof t === "undefined" ? undefined : this.d[t]; + const n = s && s.element; + return { + browserEvent: e, + index: t, + element: n + }; + } + hb(e) { + const t = this.vb(e.initialTarget || null); + const s = typeof t === "undefined" ? undefined : this.d[t]; + const n = s && s.element; + return { + browserEvent: e, + index: t, + element: n + }; + } + ib(e) { + const t = this.vb(e.target || null); + const s = typeof t === "undefined" ? undefined : this.d[t]; + const n = s && s.element; + const r = this.ub(e, t); + return { + browserEvent: e, + index: t, + element: n, + sector: r + }; + } + jb(e) { + try { + const t = this.wb(this.k, this.m); + this.Z(t, e.scrollTop, e.height, e.scrollLeft, e.scrollWidth); + if (this.B) { + this.xb(e.scrollTop, e.height, e.inSmoothScrolling); + } + } catch (t) { + console.error("Got bad scroll event:", e); + throw t; + } + } + kb(e) { + e.preventDefault(); + e.stopPropagation(); + this.scrollTop -= e.translationY; + } + lb(e, t, s) { + if (!s.dataTransfer) { + return; + } + const n = this.G.getDragElements(e); + s.dataTransfer.effectAllowed = "copyMove"; + s.dataTransfer.setData(jh.TEXT, t); + if (s.dataTransfer.setDragImage) { + let r; + if (this.G.getDragLabel) { + r = this.G.getDragLabel(n, s); + } + if (typeof r === "undefined") { + r = String(n.length); + } + const o = G(".monaco-drag-image"); + o.textContent = r; + (c => { + while (c && !c.classList.contains("monaco-workbench")) { + c = c.parentElement; + } + return c || this.domNode.ownerDocument; + })(this.domNode).appendChild(o); + s.dataTransfer.setDragImage(o, -10, -10); + setTimeout(() => o.remove(), 0); + } + this.domNode.classList.add("dragging"); + this.I = new iR(n); + p7.CurrentDragAndDropData = new CWt(n); + this.G.onDragStart?.(this.I, s); + } + mb(e) { + e.browserEvent.preventDefault(); + this.M.dispose(); + if (p7.CurrentDragAndDropData && p7.CurrentDragAndDropData.getData() === "vscode-ui" || (this.rb(e.browserEvent), !e.browserEvent.dataTransfer)) { + return false; + } + if (!this.I) { + if (p7.CurrentDragAndDropData) { + this.I = p7.CurrentDragAndDropData; + } else { + if (!e.browserEvent.dataTransfer.types) { + return false; + } + this.I = new pie(); + } + } + const t = this.G.onDragOver(this.I, e.element, e.index, e.sector, e.browserEvent); + this.H = typeof t == "boolean" ? t : t.accept; + if (!this.H) { + this.J = undefined; + this.L.dispose(); + return false; + } + e.browserEvent.dataTransfer.dropEffect = typeof t != "boolean" && t.effect?.type === 0 ? "copy" : "move"; + let s; + if (typeof t != "boolean" && t.feedback) { + s = t.feedback; + } else if (typeof e.index === "undefined") { + s = [-1]; + } else { + s = [e.index]; + } + s = Ea(s).filter(r => r >= -1 && r < this.length).sort((r, o) => r - o); + s = s[0] === -1 ? [-1] : s; + let n = typeof t != "boolean" && t.effect && t.effect.position ? t.effect.position : "drop-target"; + if (VXn(this.J, s) && this.K === n) { + return true; + } + this.J = s; + this.K = n; + this.L.dispose(); + if (s[0] === -1) { + this.domNode.classList.add(n); + this.o.classList.add(n); + this.L = Ue(() => { + this.domNode.classList.remove(n); + this.o.classList.remove(n); + }); + } else { + if (s.length > 1 && n !== "drop-target") { + throw new Error("Can't use multiple feedbacks with position different than 'over'"); + } + if (n === "drop-target-after" && s[0] < this.length - 1) { + s[0] += 1; + n = "drop-target-before"; + } + for (const r of s) { + const o = this.d[r]; + o.dropTarget = true; + o.row?.domNode.classList.add(n); + } + this.L = Ue(() => { + for (const r of s) { + const o = this.d[r]; + o.dropTarget = false; + o.row?.domNode.classList.remove(n); + } + }); + } + return true; + } + nb(e) { + this.M.dispose(); + this.M = Gd(() => this.qb(), 100, this.N); + if (this.I) { + this.G.onDragLeave?.(this.I, e.element, e.index, e.browserEvent); + } + } + ob(e) { + if (!this.H) { + return; + } + const t = this.I; + this.tb(); + this.qb(); + this.domNode.classList.remove("dragging"); + this.I = undefined; + p7.CurrentDragAndDropData = undefined; + if (!!t && !!e.browserEvent.dataTransfer) { + e.browserEvent.preventDefault(); + t.update(e.browserEvent.dataTransfer); + this.G.drop(t, e.element, e.index, e.sector, e.browserEvent); + } + } + pb(e) { + this.H = false; + this.tb(); + this.qb(); + this.domNode.classList.remove("dragging"); + this.I = undefined; + p7.CurrentDragAndDropData = undefined; + this.G.onDragEnd?.(e); + } + qb() { + this.J = undefined; + this.K = undefined; + this.L.dispose(); + this.L = H.None; + } + rb(e) { + if (!this.w) { + const t = h9(this.domNode).top; + this.w = vqn(Kt(this.domNode), this.sb.bind(this, t)); + } + this.x.dispose(); + this.x = Gd(() => { + if (this.w) { + this.w.dispose(); + this.w = undefined; + } + }, 1000, this.N); + this.y = e.pageY; + } + sb(e) { + if (this.y === undefined) { + return; + } + const t = this.y - e; + const s = this.renderHeight - 35; + if (t < 35) { + this.scrollTop += Math.max(-14, Math.floor((t - 35) * 0.3)); + } else if (t > s) { + this.scrollTop += Math.min(14, Math.floor((t - s) * 0.3)); + } + } + tb() { + this.x.dispose(); + if (this.w) { + this.w.dispose(); + this.w = undefined; + } + } + ub(e, t) { + if (t === undefined) { + return; + } + const s = e.offsetY / this.d[t].size; + const n = Math.floor(s / 0.25); + return yc(n, 0, 3); + } + vb(e) { + const t = this.q.getDomNode(); + let s = e; + while ((Bl(s) || hqn(s)) && s !== this.o && t.contains(s)) { + const n = s.getAttribute("data-index"); + if (n) { + const r = Number(n); + if (!isNaN(r)) { + return r; + } + } + s = s.parentElement; + } + } + wb(e, t) { + return { + start: this.g.indexAt(e), + end: this.g.indexAfter(e + t - 1) + }; + } + xb(e, t, s) { + const n = this.wb(e, t); + let r; + let o; + if (e === this.elementTop(n.start)) { + r = n.start; + o = 0; + } else if (n.end - n.start > 1) { + r = n.start + 1; + o = this.elementTop(r) - e; + } + let a = 0; + while (true) { + const l = this.wb(e, t); + let c = false; + for (let u = l.start; u < l.end; u++) { + const d = this.yb(u); + if (d !== 0) { + this.g.splice(u, 1, [this.d[u]]); + } + a += d; + c = c || d !== 0; + } + if (!c) { + if (a !== 0) { + this.W(); + } + const u = X0.relativeComplement(n, l); + for (const h of u) { + for (let g = h.start; g < h.end; g++) { + if (this.d[g].row) { + this.eb(g); + } + } + } + const d = X0.relativeComplement(l, n).reverse(); + for (const h of d) { + for (let g = h.end - 1; g >= h.start; g--) { + this.ab(g); + } + } + for (let h = l.start; h < l.end; h++) { + if (this.d[h].row) { + this.db(this.d[h], h); + } + } + if (typeof r == "number") { + const h = this.p.getFutureScrollPosition().scrollTop - e; + const g = this.elementTop(r) - o + h; + this.setScrollTop(g, s); + } + this.O.fire(this.contentHeight); + return; + } + } + } + yb(e) { + const t = this.d[e]; + if (this.S.getDynamicHeight) { + const o = this.S.getDynamicHeight(t.element); + if (o !== null) { + const a = t.size; + t.size = o; + t.lastDynamicHeightWidth = this.n; + return o - a; + } + } + if (!t.hasDynamicHeight || t.lastDynamicHeightWidth === this.n || this.S.hasDynamicHeight && !this.S.hasDynamicHeight(t.element)) { + return 0; + } + const s = t.size; + if (t.row) { + t.row.domNode.style.height = ""; + t.size = t.row.domNode.offsetHeight; + if (t.size === 0 && !Kd(t.row.domNode, Kt(t.row.domNode).document.body)) { + console.warn("Measuring item node that is not in DOM! Add ListView to the DOM before measuring row height!", new Error().stack); + } + t.lastDynamicHeightWidth = this.n; + return t.size - s; + } + const { + row: n + } = this.h.alloc(t.templateId); + n.domNode.style.height = ""; + this.o.appendChild(n.domNode); + const r = this.j.get(t.templateId); + if (!r) { + throw new co("Missing renderer for templateId: " + t.templateId); + } + r.renderElement(t.element, e, n.templateData, undefined); + t.size = n.domNode.offsetHeight; + r.disposeElement?.(t.element, e, n.templateData, undefined); + this.S.setDynamicHeight?.(t.element, t.size); + t.lastDynamicHeightWidth = this.n; + n.domNode.remove(); + this.h.release(n); + return t.size - s; + } + getElementDomId(e) { + return `${this.domId}_${e}`; + } + dispose() { + for (const e of this.d) { + e.dragStartDisposable.dispose(); + e.checkedDisposable.dispose(); + if (e.row) { + const t = this.j.get(e.row.templateId); + if (t) { + t.disposeElement?.(e.element, -1, e.row.templateData, undefined); + t.disposeTemplate(e.row.templateData); + } + } + } + this.d = []; + this.domNode?.remove(); + this.w?.dispose(); + this.N.dispose(); + } + }; + __decorate([Hs], GI.prototype, "onMouseClick", null); + __decorate([Hs], GI.prototype, "onMouseDblClick", null); + __decorate([Hs], GI.prototype, "onMouseMiddleClick", null); + __decorate([Hs], GI.prototype, "onMouseUp", null); + __decorate([Hs], GI.prototype, "onMouseDown", null); + __decorate([Hs], GI.prototype, "onMouseOver", null); + __decorate([Hs], GI.prototype, "onMouseMove", null); + __decorate([Hs], GI.prototype, "onMouseOut", null); + __decorate([Hs], GI.prototype, "onContextMenu", null); + __decorate([Hs], GI.prototype, "onTouchStart", null); + __decorate([Hs], GI.prototype, "onTap", null); + } +}); +function xme(i, e) { + if (i.classList.contains(e)) { + return true; + } else if (i.classList.contains("monaco-list") || !i.parentElement) { + return false; + } else { + return xme(i.parentElement, e); + } +} +function mie(i) { + return xme(i, "monaco-editor"); +} +function HXn(i) { + return xme(i, "monaco-custom-toggle"); +} +function qXn(i) { + return xme(i, "action-item"); +} +function kme(i) { + return xme(i, "monaco-tree-sticky-row"); +} +function Eme(i) { + return i.classList.contains("monaco-tree-sticky-container"); +} +function Wls(i) { + if (i.tagName === "A" && i.classList.contains("monaco-button") || i.tagName === "DIV" && i.classList.contains("monaco-button-dropdown")) { + return true; + } else if (i.classList.contains("monaco-list") || !i.parentElement) { + return false; + } else { + return Wls(i.parentElement); + } +} +function Vls(i) { + if (Gt) { + return i.browserEvent.metaKey; + } else { + return i.browserEvent.ctrlKey; + } +} +function Hls(i) { + return i.browserEvent.shiftKey; +} +function jXn(i) { + return W0(i) && i.button === 2; +} +function zXn(i, e) { + const t = i.indexOf(e); + if (t === -1) { + return []; + } + const s = []; + let n = t - 1; + while (n >= 0 && i[n] === e - (t - n)) { + s.push(i[n--]); + } + s.reverse(); + n = t; + while (n < i.length && i[n] === e + (n - t)) { + s.push(i[n++]); + } + return s; +} +function SWt(i, e) { + const t = []; + let s = 0; + let n = 0; + while (s < i.length || n < e.length) { + if (s >= i.length) { + t.push(e[n++]); + } else if (n >= e.length) { + t.push(i[s++]); + } else if (i[s] === e[n]) { + t.push(i[s]); + s++; + n++; + continue; + } else if (i[s] < e[n]) { + t.push(i[s++]); + } else { + t.push(e[n++]); + } + } + return t; +} +function JXn(i, e) { + const t = []; + let s = 0; + let n = 0; + while (s < i.length || n < e.length) { + if (s >= i.length) { + t.push(e[n++]); + } else if (n >= e.length) { + t.push(i[s++]); + } else if (i[s] === e[n]) { + s++; + n++; + continue; + } else if (i[s] < e[n]) { + t.push(i[s++]); + } else { + n++; + } + } + return t; +} +var qls; +var Ime; +var jls; +var hct; +var xWt; +var xF; +var bie; +var kWt; +var zls; +var Jls; +var EWt; +var fct; +var gct; +var IWt; +var Gls; +var DWt; +var Kls; +var Yls; +var Xls; +var Cg; +var oS = ue({ + "out-build/vs/base/browser/ui/list/listWidget.js"() { + "use strict"; + + xe(); + md(); + wb(); + q0(); + _a(); + hh(); + wc(); + SXn(); + Jt(); + nt(); + Zo(); + au(); + pe(); + Pc(); + q(); + Xf(); + rt(); + zt(); + Mls(); + Sme(); + m7(); + gd(); + An(); + qls = class { + constructor(i) { + this.d = i; + this.c = []; + } + get templateId() { + return `template:${this.d.name}`; + } + renderTemplate(i) { + return i; + } + renderElement(i, e, t) { + const s = this.c.findIndex(n => n.templateData === t); + if (s >= 0) { + const n = this.c[s]; + this.d.unrender(t); + n.index = e; + } else { + const n = { + index: e, + templateData: t + }; + this.c.push(n); + } + this.d.renderIndex(e, t); + } + splice(i, e, t) { + const s = []; + for (const n of this.c) { + if (n.index < i) { + s.push(n); + } else if (n.index >= i + e) { + s.push({ + index: n.index + t - e, + templateData: n.templateData + }); + } + } + this.c = s; + } + renderIndexes(i) { + for (const { + index: e, + templateData: t + } of this.c) { + if (i.indexOf(e) > -1) { + this.d.renderIndex(e, t); + } + } + } + disposeTemplate(i) { + const e = this.c.findIndex(t => t.templateData === i); + if (!(e < 0)) { + this.c.splice(e, 1); + } + } + }; + Ime = class { + get name() { + return this.g; + } + get renderer() { + return new qls(this); + } + constructor(i) { + this.g = i; + this.c = []; + this.d = []; + this.f = new B(); + this.onChange = this.f.event; + } + splice(i, e, t) { + const s = t.length - e; + const n = i + e; + const r = []; + let o = 0; + while (o < this.d.length && this.d[o] < i) { + r.push(this.d[o++]); + } + for (let a = 0; a < t.length; a++) { + if (t[a]) { + r.push(a + i); + } + } + while (o < this.d.length && this.d[o] >= n) { + r.push(this.d[o++] + s); + } + this.renderer.splice(i, e, t.length); + this.h(r, r); + } + renderIndex(i, e) { + e.classList.toggle(this.g, this.contains(i)); + } + unrender(i) { + i.classList.remove(this.g); + } + set(i, e) { + return this.h(i, [...i].sort(DWt), e); + } + h(i, e, t) { + const s = this.c; + const n = this.d; + this.c = i; + this.d = e; + const r = SWt(n, i); + this.renderer.renderIndexes(r); + this.f.fire({ + indexes: i, + browserEvent: t + }); + return s; + } + get() { + return this.c; + } + contains(i) { + return LB(this.d, i, DWt) >= 0; + } + dispose() { + si(this.f); + } + }; + __decorate([Hs], Ime.prototype, "renderer", null); + jls = class extends Ime { + constructor(i) { + super("selected"); + this.k = i; + } + renderIndex(i, e) { + super.renderIndex(i, e); + if (this.k) { + if (this.contains(i)) { + e.setAttribute("aria-selected", "true"); + } else { + e.setAttribute("aria-selected", "false"); + } + } + } + }; + hct = class { + constructor(i, e, t) { + this.c = i; + this.d = e; + this.f = t; + } + splice(i, e, t) { + if (!this.f) { + return this.c.splice(i, e, new Array(t.length).fill(false)); + } + const s = this.c.get().map(o => this.f.getId(this.d.element(o)).toString()); + if (s.length === 0) { + return this.c.splice(i, e, new Array(t.length).fill(false)); + } + const n = new Set(s); + const r = t.map(o => n.has(this.f.getId(o).toString())); + this.c.splice(i, e, r); + } + }; + xWt = class { + get g() { + return de.chain(this.c.add(new Co(this.k.domNode, "keydown")).event, i => i.filter(e => !ZS(e.target)).map(e => new wr(e))); + } + constructor(i, e, t) { + this.h = i; + this.k = e; + this.c = new Q(); + this.d = new Q(); + this.f = t.multipleSelectionSupport; + this.c.add(this.g(s => { + switch (s.keyCode) { + case 3: + return this.l(s); + case 16: + return this.o(s); + case 18: + return this.p(s); + case 11: + return this.q(s); + case 12: + return this.s(s); + case 9: + return this.u(s); + case 31: + if (this.f && (Gt ? s.metaKey : s.ctrlKey)) { + this.t(s); + } + } + })); + } + updateOptions(i) { + if (i.multipleSelectionSupport !== undefined) { + this.f = i.multipleSelectionSupport; + } + } + l(i) { + i.preventDefault(); + i.stopPropagation(); + this.h.setSelection(this.h.getFocus(), i.browserEvent); + } + o(i) { + i.preventDefault(); + i.stopPropagation(); + this.h.focusPrevious(1, false, i.browserEvent); + const e = this.h.getFocus()[0]; + this.h.setAnchor(e); + this.h.reveal(e); + this.k.domNode.focus(); + } + p(i) { + i.preventDefault(); + i.stopPropagation(); + this.h.focusNext(1, false, i.browserEvent); + const e = this.h.getFocus()[0]; + this.h.setAnchor(e); + this.h.reveal(e); + this.k.domNode.focus(); + } + q(i) { + i.preventDefault(); + i.stopPropagation(); + this.h.focusPreviousPage(i.browserEvent); + const e = this.h.getFocus()[0]; + this.h.setAnchor(e); + this.h.reveal(e); + this.k.domNode.focus(); + } + s(i) { + i.preventDefault(); + i.stopPropagation(); + this.h.focusNextPage(i.browserEvent); + const e = this.h.getFocus()[0]; + this.h.setAnchor(e); + this.h.reveal(e); + this.k.domNode.focus(); + } + t(i) { + i.preventDefault(); + i.stopPropagation(); + this.h.setSelection($0(this.h.length), i.browserEvent); + this.h.setAnchor(undefined); + this.k.domNode.focus(); + } + u(i) { + if (this.h.getSelection().length) { + i.preventDefault(); + i.stopPropagation(); + this.h.setSelection([], i.browserEvent); + this.h.setAnchor(undefined); + this.k.domNode.focus(); + } + } + dispose() { + this.c.dispose(); + this.d.dispose(); + } + }; + __decorate([Hs], xWt.prototype, "g", null); + (function (i) { + i[i.Automatic = 0] = "Automatic"; + i[i.Trigger = 1] = "Trigger"; + })(xF ||= {}); + (function (i) { + i[i.Idle = 0] = "Idle"; + i[i.Typing = 1] = "Typing"; + })(bie ||= {}); + kWt = new class { + mightProducePrintableCharacter(i) { + if (i.ctrlKey || i.metaKey || i.altKey) { + return false; + } else { + return i.keyCode >= 31 && i.keyCode <= 56 || i.keyCode >= 21 && i.keyCode <= 30 || i.keyCode >= 98 && i.keyCode <= 107 || i.keyCode >= 85 && i.keyCode <= 95; + } + } + }(); + zls = class { + constructor(i, e, t, s, n) { + this.o = i; + this.p = e; + this.q = t; + this.s = s; + this.t = n; + this.c = false; + this.d = bie.Idle; + this.f = xF.Automatic; + this.g = false; + this.h = -1; + this.k = new Q(); + this.l = new Q(); + this.updateOptions(i.options); + } + updateOptions(i) { + if (i.typeNavigationEnabled ?? true) { + this.u(); + } else { + this.v(); + } + this.f = i.typeNavigationMode ?? xF.Automatic; + } + trigger() { + this.g = !this.g; + } + u() { + if (this.c) { + return; + } + let i = false; + const e = de.chain(this.k.add(new Co(this.p.domNode, "keydown")).event, n => n.filter(r => !ZS(r.target)).filter(() => this.f === xF.Automatic || this.g).map(r => new wr(r)).filter(r => i || this.s(r)).filter(r => this.t.mightProducePrintableCharacter(r)).forEach(r => yn.stop(r, true)).map(r => r.browserEvent.key)); + const t = de.debounce(e, () => null, 800, undefined, undefined, undefined, this.k); + de.reduce(de.any(e, t), (n, r) => r === null ? null : (n || "") + r, undefined, this.k)(this.x, this, this.k); + t(this.w, this, this.k); + e(() => i = true, undefined, this.k); + t(() => i = false, undefined, this.k); + this.c = true; + this.g = false; + } + v() { + if (this.c) { + this.k.clear(); + this.c = false; + this.g = false; + } + } + w() { + const i = this.o.getFocus(); + if (i.length > 0 && i[0] === this.h) { + const e = this.o.options.accessibilityProvider?.getAriaLabel(this.o.element(i[0])); + if (typeof e == "string") { + Fc(e); + } else if (e) { + Fc(e.get()); + } + } + this.h = -1; + } + x(i) { + if (!i) { + this.d = bie.Idle; + this.g = false; + return; + } + const e = this.o.getFocus(); + const t = e.length > 0 ? e[0] : 0; + const s = this.d === bie.Idle ? 1 : 0; + this.d = bie.Typing; + for (let n = 0; n < this.o.length; n++) { + const r = (t + n + s) % this.o.length; + const o = this.q.getKeyboardNavigationLabel(this.p.element(r)); + const a = o && o.toString(); + if (this.o.options.typeNavigationEnabled) { + if (typeof a !== "undefined") { + if (g7(i, a)) { + this.h = t; + this.o.setFocus([r]); + this.o.reveal(r); + return; + } + const l = fWt(i, a); + if (l && l[0].end - l[0].start > 1 && l.length === 1) { + this.h = t; + this.o.setFocus([r]); + this.o.reveal(r); + return; + } + } + } else if (typeof a === "undefined" || g7(i, a)) { + this.h = t; + this.o.setFocus([r]); + this.o.reveal(r); + return; + } + } + } + dispose() { + this.v(); + this.k.dispose(); + this.l.dispose(); + } + }; + Jls = class { + constructor(i, e) { + this.d = i; + this.f = e; + this.c = new Q(); + const t = de.chain(this.c.add(new Co(e.domNode, "keydown")).event, n => n.filter(r => !ZS(r.target)).map(r => new wr(r))); + de.chain(t, n => n.filter(r => r.keyCode === 2 && !r.ctrlKey && !r.metaKey && !r.shiftKey && !r.altKey))(this.g, this, this.c); + } + g(i) { + if (i.target !== this.f.domNode) { + return; + } + const e = this.d.getFocus(); + if (e.length === 0) { + return; + } + const t = this.f.domElement(e[0]); + if (!t) { + return; + } + const s = t.querySelector("[tabIndex]"); + if (!s || !Bl(s) || s.tabIndex === -1) { + return; + } + const n = Kt(s).getComputedStyle(s); + if (n.visibility !== "hidden" && n.display !== "none") { + i.preventDefault(); + i.stopPropagation(); + s.focus(); + } + } + dispose() { + this.c.dispose(); + } + }; + EWt = { + isSelectionSingleChangeEvent: Vls, + isSelectionRangeChangeEvent: Hls + }; + fct = class { + constructor(i) { + this.o = i; + this.g = new Q(); + this.k = new B(); + this.onPointer = this.k.event; + if (i.options.multipleSelectionSupport !== false) { + this.d = this.o.options.multipleSelectionController || EWt; + } + this.f = typeof i.options.mouseSupport === "undefined" || !!i.options.mouseSupport; + if (this.f) { + i.onMouseDown(this.t, this, this.g); + i.onContextMenu(this.u, this, this.g); + i.onMouseDblClick(this.w, this, this.g); + i.onTouchStart(this.t, this, this.g); + this.g.add(bd.addTarget(i.getHTMLElement())); + } + de.any(i.onMouseClick, i.onMouseMiddleClick, i.onTap)(this.v, this, this.g); + } + updateOptions(i) { + if (i.multipleSelectionSupport !== undefined) { + this.d = undefined; + if (i.multipleSelectionSupport) { + this.d = this.o.options.multipleSelectionController || EWt; + } + } + } + p(i) { + if (this.d) { + return this.d.isSelectionSingleChangeEvent(i); + } else { + return false; + } + } + q(i) { + if (this.d) { + return this.d.isSelectionRangeChangeEvent(i); + } else { + return false; + } + } + s(i) { + return this.p(i) || this.q(i); + } + t(i) { + if (!mie(i.browserEvent.target)) { + if (Tu() !== i.browserEvent.target) { + this.o.domFocus(); + } + } + } + u(i) { + if (ZS(i.browserEvent.target) || mie(i.browserEvent.target)) { + return; + } + const e = typeof i.index === "undefined" ? [] : [i.index]; + this.o.setFocus(e, i.browserEvent); + } + v(i) { + if (!this.f || ZS(i.browserEvent.target) || mie(i.browserEvent.target) || i.browserEvent.isHandledByList) { + return; + } + i.browserEvent.isHandledByList = true; + const e = i.index; + if (typeof e === "undefined") { + this.o.setFocus([], i.browserEvent); + this.o.setSelection([], i.browserEvent); + this.o.setAnchor(undefined); + return; + } + if (this.s(i)) { + return this.x(i); + } + this.o.setFocus([e], i.browserEvent); + this.o.setAnchor(e); + if (!jXn(i.browserEvent)) { + this.o.setSelection([e], i.browserEvent); + } + this.k.fire(i); + } + w(i) { + if (ZS(i.browserEvent.target) || mie(i.browserEvent.target) || this.s(i) || i.browserEvent.isHandledByList) { + return; + } + i.browserEvent.isHandledByList = true; + const e = this.o.getFocus(); + this.o.setSelection(e, i.browserEvent); + } + x(i) { + const e = i.index; + let t = this.o.getAnchor(); + if (this.q(i)) { + if (typeof t === "undefined") { + t = this.o.getFocus()[0] ?? e; + this.o.setAnchor(t); + } + const s = Math.min(t, e); + const n = Math.max(t, e); + const r = $0(s, n + 1); + const o = this.o.getSelection(); + const a = zXn(SWt(o, [t]), t); + if (a.length === 0) { + return; + } + const l = SWt(r, JXn(o, a)); + this.o.setSelection(l, i.browserEvent); + this.o.setFocus([e], i.browserEvent); + } else if (this.p(i)) { + const s = this.o.getSelection(); + const n = s.filter(r => r !== e); + this.o.setFocus([e]); + this.o.setAnchor(e); + if (s.length === n.length) { + this.o.setSelection([...n, e], i.browserEvent); + } else { + this.o.setSelection(n, i.browserEvent); + } + } + } + dispose() { + this.g.dispose(); + } + }; + gct = class { + constructor(i, e) { + this.c = i; + this.d = e; + } + style(i) { + const e = this.d && `.${this.d}`; + const t = []; + if (i.listBackground) { + t.push(`.monaco-list${e} .monaco-list-rows { background: ${i.listBackground}; }`); + } + if (i.listFocusBackground) { + t.push(`.monaco-list${e}:focus .monaco-list-row.focused { background-color: ${i.listFocusBackground}; }`); + t.push(`.monaco-list${e}:focus .monaco-list-row.focused:hover { background-color: ${i.listFocusBackground}; }`); + } + if (i.listFocusForeground) { + t.push(`.monaco-list${e}:focus .monaco-list-row.focused { color: ${i.listFocusForeground}; }`); + } + if (i.listActiveSelectionBackground) { + t.push(`.monaco-list${e}:focus .monaco-list-row.selected { background-color: ${i.listActiveSelectionBackground}; }`); + t.push(`.monaco-list${e}:focus .monaco-list-row.selected:hover { background-color: ${i.listActiveSelectionBackground}; }`); + } + if (i.listActiveSelectionForeground) { + t.push(`.monaco-list${e}:focus .monaco-list-row.selected { color: ${i.listActiveSelectionForeground}; }`); + } + if (i.listActiveSelectionIconForeground) { + t.push(`.monaco-list${e}:focus .monaco-list-row.selected .codicon { color: ${i.listActiveSelectionIconForeground}; }`); + } + if (i.listFocusAndSelectionBackground) { + t.push(` + .monaco-drag-image, + .monaco-list${e}:focus .monaco-list-row.selected.focused { background-color: ${i.listFocusAndSelectionBackground}; } + `); + } + if (i.listFocusAndSelectionForeground) { + t.push(` + .monaco-drag-image, + .monaco-list${e}:focus .monaco-list-row.selected.focused { color: ${i.listFocusAndSelectionForeground}; } + `); + } + if (i.listInactiveFocusForeground) { + t.push(`.monaco-list${e} .monaco-list-row.focused { color: ${i.listInactiveFocusForeground}; }`); + t.push(`.monaco-list${e} .monaco-list-row.focused:hover { color: ${i.listInactiveFocusForeground}; }`); + } + if (i.listInactiveSelectionIconForeground) { + t.push(`.monaco-list${e} .monaco-list-row.focused .codicon { color: ${i.listInactiveSelectionIconForeground}; }`); + } + if (i.listInactiveFocusBackground) { + t.push(`.monaco-list${e} .monaco-list-row.focused { background-color: ${i.listInactiveFocusBackground}; }`); + t.push(`.monaco-list${e} .monaco-list-row.focused:hover { background-color: ${i.listInactiveFocusBackground}; }`); + } + if (i.listInactiveSelectionBackground) { + t.push(`.monaco-list${e} .monaco-list-row.selected { background-color: ${i.listInactiveSelectionBackground}; }`); + t.push(`.monaco-list${e} .monaco-list-row.selected:hover { background-color: ${i.listInactiveSelectionBackground}; }`); + } + if (i.listInactiveSelectionForeground) { + t.push(`.monaco-list${e} .monaco-list-row.selected { color: ${i.listInactiveSelectionForeground}; }`); + } + if (i.listHoverBackground) { + t.push(`.monaco-list${e}:not(.drop-target):not(.dragging) .monaco-list-row:hover:not(.selected):not(.focused) { background-color: ${i.listHoverBackground}; }`); + } + if (i.listHoverForeground) { + t.push(`.monaco-list${e}:not(.drop-target):not(.dragging) .monaco-list-row:hover:not(.selected):not(.focused) { color: ${i.listHoverForeground}; }`); + } + const s = CF(i.listFocusAndSelectionOutline, CF(i.listSelectionOutline, i.listFocusOutline ?? "")); + if (s) { + t.push(`.monaco-list${e}:focus .monaco-list-row.focused.selected { outline: 1px solid ${s}; outline-offset: -1px;}`); + } + if (i.listFocusOutline) { + t.push(` + .monaco-drag-image, + .monaco-list${e}:focus .monaco-list-row.focused { outline: 1px solid ${i.listFocusOutline}; outline-offset: -1px; } + .monaco-workbench.context-menu-visible .monaco-list${e}.last-focused .monaco-list-row.focused { outline: 1px solid ${i.listFocusOutline}; outline-offset: -1px; } + `); + } + const n = CF(i.listSelectionOutline, i.listInactiveFocusOutline ?? ""); + if (n) { + t.push(`.monaco-list${e} .monaco-list-row.focused.selected { outline: 1px dotted ${n}; outline-offset: -1px; }`); + } + if (i.listSelectionOutline) { + t.push(`.monaco-list${e} .monaco-list-row.selected { outline: 1px dotted ${i.listSelectionOutline}; outline-offset: -1px; }`); + } + if (i.listInactiveFocusOutline) { + t.push(`.monaco-list${e} .monaco-list-row.focused { outline: 1px dotted ${i.listInactiveFocusOutline}; outline-offset: -1px; }`); + } + if (i.listHoverOutline) { + t.push(`.monaco-list${e} .monaco-list-row:hover { outline: 1px dashed ${i.listHoverOutline}; outline-offset: -1px; }`); + } + if (i.listDropOverBackground) { + t.push(` + .monaco-list${e}.drop-target, + .monaco-list${e} .monaco-list-rows.drop-target, + .monaco-list${e} .monaco-list-row.drop-target { background-color: ${i.listDropOverBackground} !important; color: inherit !important; } + `); + } + if (i.listDropBetweenBackground) { + t.push(` + .monaco-list${e} .monaco-list-rows.drop-target-before .monaco-list-row:first-child::before, + .monaco-list${e} .monaco-list-row.drop-target-before::before { + content: ""; position: absolute; top: 0px; left: 0px; width: 100%; height: 1px; + background-color: ${i.listDropBetweenBackground}; + }`); + t.push(` + .monaco-list${e} .monaco-list-rows.drop-target-after .monaco-list-row:last-child::after, + .monaco-list${e} .monaco-list-row.drop-target-after::after { + content: ""; position: absolute; bottom: 0px; left: 0px; width: 100%; height: 1px; + background-color: ${i.listDropBetweenBackground}; + }`); + } + if (i.tableColumnsBorder) { + t.push(` + .monaco-table > .monaco-split-view2, + .monaco-table > .monaco-split-view2 .monaco-sash.vertical::before, + .monaco-workbench:not(.reduce-motion) .monaco-table:hover > .monaco-split-view2, + .monaco-workbench:not(.reduce-motion) .monaco-table:hover > .monaco-split-view2 .monaco-sash.vertical::before { + border-color: ${i.tableColumnsBorder}; + } + + .monaco-workbench:not(.reduce-motion) .monaco-table > .monaco-split-view2, + .monaco-workbench:not(.reduce-motion) .monaco-table > .monaco-split-view2 .monaco-sash.vertical::before { + border-color: transparent; + } + `); + } + if (i.tableOddRowsBackgroundColor) { + t.push(` + .monaco-table .monaco-list-row[data-parity=odd]:not(.focused):not(.selected):not(:hover) .monaco-table-tr, + .monaco-table .monaco-list:not(:focus) .monaco-list-row[data-parity=odd].focused:not(.selected):not(:hover) .monaco-table-tr, + .monaco-table .monaco-list:not(.focused) .monaco-list-row[data-parity=odd].focused:not(.selected):not(:hover) .monaco-table-tr { + background-color: ${i.tableOddRowsBackgroundColor}; + } + `); + } + this.c.textContent = t.join(` +`); + } + }; + IWt = { + listFocusBackground: "#7FB0D0", + listActiveSelectionBackground: "#0E639C", + listActiveSelectionForeground: "#FFFFFF", + listActiveSelectionIconForeground: "#FFFFFF", + listFocusAndSelectionOutline: "#90C2F9", + listFocusAndSelectionBackground: "#094771", + listFocusAndSelectionForeground: "#FFFFFF", + listInactiveSelectionBackground: "#3F3F46", + listInactiveSelectionIconForeground: "#FFFFFF", + listHoverBackground: "#2A2D2E", + listDropOverBackground: "#383B3D", + listDropBetweenBackground: "#EEEEEE", + treeIndentGuidesStroke: "#a9a9a9", + treeInactiveIndentGuidesStroke: ut.fromHex("#a9a9a9").transparent(0.4).toString(), + tableColumnsBorder: ut.fromHex("#cccccc").transparent(0.2).toString(), + tableOddRowsBackgroundColor: ut.fromHex("#cccccc").transparent(0.04).toString(), + listBackground: undefined, + listFocusForeground: undefined, + listInactiveSelectionForeground: undefined, + listInactiveFocusForeground: undefined, + listInactiveFocusBackground: undefined, + listHoverForeground: undefined, + listFocusOutline: undefined, + listInactiveFocusOutline: undefined, + listSelectionOutline: undefined, + listHoverOutline: undefined, + treeStickyScrollBackground: undefined, + treeStickyScrollBorder: undefined, + treeStickyScrollShadow: undefined + }; + Gls = { + keyboardSupport: true, + mouseSupport: true, + multipleSelectionSupport: true, + dnd: { + getDragURI() { + return null; + }, + onDragStart() {}, + onDragOver() { + return false; + }, + drop() {}, + dispose() {} + } + }; + DWt = (i, e) => i - e; + Kls = class { + constructor(i, e) { + this.c = i; + this.d = e; + } + get templateId() { + return this.c; + } + renderTemplate(i) { + return this.d.map(e => e.renderTemplate(i)); + } + renderElement(i, e, t, s) { + let n = 0; + for (const r of this.d) { + r.renderElement(i, e, t[n++], s); + } + } + disposeElement(i, e, t, s) { + let n = 0; + for (const r of this.d) { + r.disposeElement?.(i, e, t[n], s); + n += 1; + } + } + disposeTemplate(i) { + let e = 0; + for (const t of this.d) { + t.disposeTemplate(i[e++]); + } + } + }; + Yls = class { + constructor(i) { + this.c = i; + this.templateId = "a18n"; + } + renderTemplate(i) { + return { + container: i, + disposables: new Q() + }; + } + renderElement(i, e, t) { + const s = this.c.getAriaLabel(i); + const n = s && typeof s != "string" ? s : vb(s); + t.disposables.add(Dn(o => { + this.d(o.readObservable(n), t.container); + })); + const r = this.c.getAriaLevel && this.c.getAriaLevel(i); + if (typeof r == "number") { + t.container.setAttribute("aria-level", `${r}`); + } else { + t.container.removeAttribute("aria-level"); + } + } + d(i, e) { + if (i) { + e.setAttribute("aria-label", i); + } else { + e.removeAttribute("aria-label"); + } + } + disposeElement(i, e, t, s) { + t.disposables.clear(); + } + disposeTemplate(i) { + i.disposables.dispose(); + } + }; + Xls = class { + constructor(i, e) { + this.c = i; + this.d = e; + } + getDragElements(i) { + const e = this.c.getSelectedElements(); + if (e.indexOf(i) > -1) { + return e; + } else { + return [i]; + } + } + getDragURI(i) { + return this.d.getDragURI(i); + } + getDragLabel(i, e) { + if (this.d.getDragLabel) { + return this.d.getDragLabel(i, e); + } + } + onDragStart(i, e) { + this.d.onDragStart?.(i, e); + } + onDragOver(i, e, t, s, n) { + return this.d.onDragOver(i, e, t, s, n); + } + onDragLeave(i, e, t, s) { + this.d.onDragLeave?.(i, e, t, s); + } + onDragEnd(i) { + this.d.onDragEnd?.(i); + } + drop(i, e, t, s, n) { + this.d.drop(i, e, t, s, n); + } + dispose() { + this.d.dispose(); + } + }; + Cg = class { + get onDidChangeFocus() { + return de.map(this.k.wrapEvent(this.d.onChange), i => this.H(i), this.z); + } + get onDidChangeSelection() { + return de.map(this.k.wrapEvent(this.f.onChange), i => this.H(i), this.z); + } + get domId() { + return this.o.domId; + } + get onDidScroll() { + return this.o.onDidScroll; + } + get onMouseClick() { + return this.o.onMouseClick; + } + get onMouseDblClick() { + return this.o.onMouseDblClick; + } + get onMouseMiddleClick() { + return this.o.onMouseMiddleClick; + } + get onPointer() { + return this.x.onPointer; + } + get onMouseUp() { + return this.o.onMouseUp; + } + get onMouseDown() { + return this.o.onMouseDown; + } + get onMouseOver() { + return this.o.onMouseOver; + } + get onMouseMove() { + return this.o.onMouseMove; + } + get onMouseOut() { + return this.o.onMouseOut; + } + get onTouchStart() { + return this.o.onTouchStart; + } + get onTap() { + return this.o.onTap; + } + get onContextMenu() { + let i = false; + const e = de.chain(this.z.add(new Co(this.o.domNode, "keydown")).event, n => n.map(r => new wr(r)).filter(r => i = r.keyCode === 58 || r.shiftKey && r.keyCode === 68).map(r => yn.stop(r, true)).filter(() => false)); + const t = de.chain(this.z.add(new Co(this.o.domNode, "keyup")).event, n => n.forEach(() => i = false).map(r => new wr(r)).filter(r => r.keyCode === 58 || r.shiftKey && r.keyCode === 68).map(r => yn.stop(r, true)).map(({ + browserEvent: r + }) => { + const o = this.getFocus(); + const a = o.length ? o[0] : undefined; + const l = typeof a !== "undefined" ? this.o.element(a) : undefined; + const c = typeof a !== "undefined" ? this.o.domElement(a) : this.o.domNode; + return { + index: a, + element: l, + anchor: c, + browserEvent: r + }; + })); + const s = de.chain(this.o.onContextMenu, n => n.filter(r => !i).map(({ + element: r, + index: o, + browserEvent: a + }) => ({ + element: r, + index: o, + anchor: new Xc(Kt(this.o.domNode), a), + browserEvent: a + }))); + return de.any(e, t, s); + } + get onKeyDown() { + return this.z.add(new Co(this.o.domNode, "keydown")).event; + } + get onKeyUp() { + return this.z.add(new Co(this.o.domNode, "keyup")).event; + } + get onKeyPress() { + return this.z.add(new Co(this.o.domNode, "keypress")).event; + } + get onDidFocus() { + return de.signal(this.z.add(new Co(this.o.domNode, "focus", true)).event); + } + get onDidBlur() { + return de.signal(this.z.add(new Co(this.o.domNode, "blur", true)).event); + } + constructor(i, e, t, s, n = Gls) { + this.B = i; + this.C = n; + this.d = new Ime("focused"); + this.g = new Ime("anchor"); + this.k = new NZ(); + this.y = ""; + this.z = new Q(); + this.A = new B(); + this.onDidDispose = this.A.event; + const r = this.C.accessibilityProvider && this.C.accessibilityProvider.getWidgetRole ? this.C.accessibilityProvider?.getWidgetRole() : "list"; + this.f = new jls(r !== "listbox"); + const o = [this.d.renderer, this.f.renderer]; + this.v = n.accessibilityProvider; + if (this.v) { + o.push(new Yls(this.v)); + this.v.onDidChangeActiveDescendant?.(this.J, this, this.z); + } + s = s.map(l => new Kls(l.templateId, [...o, l])); + const a = { + ...n, + dnd: n.dnd && new Xls(this, n.dnd) + }; + this.o = this.D(e, t, s, a); + this.o.domNode.setAttribute("role", r); + if (n.styleController) { + this.t = n.styleController(this.o.domId); + } else { + const l = pd(this.o.domNode); + this.t = new gct(l, this.o.domId); + } + this.q = new gls([new hct(this.d, this.o, n.identityProvider), new hct(this.f, this.o, n.identityProvider), new hct(this.g, this.o, n.identityProvider), this.o]); + this.z.add(this.d); + this.z.add(this.f); + this.z.add(this.g); + this.z.add(this.o); + this.z.add(this.A); + this.z.add(new Jls(this, this.o)); + if (typeof n.keyboardSupport != "boolean" || n.keyboardSupport) { + this.w = new xWt(this, this.o, n); + this.z.add(this.w); + } + if (n.keyboardNavigationLabelProvider) { + const l = n.keyboardNavigationDelegate || kWt; + this.u = new zls(this, this.o, n.keyboardNavigationLabelProvider, n.keyboardNavigationEventFilter ?? (() => true), l); + this.z.add(this.u); + } + this.x = this.E(n); + this.z.add(this.x); + this.onDidChangeFocus(this.I, this, this.z); + this.onDidChangeSelection(this.K, this, this.z); + if (this.v) { + this.ariaLabel = this.v.getWidgetAriaLabel(); + } + if (this.C.multipleSelectionSupport !== false) { + this.o.domNode.setAttribute("aria-multiselectable", "true"); + } + } + D(i, e, t, s) { + return new GI(i, e, t, s); + } + E(i) { + return new fct(this); + } + updateOptions(i = {}) { + this.C = { + ...this.C, + ...i + }; + this.u?.updateOptions(this.C); + if (this.C.multipleSelectionController !== undefined) { + if (this.C.multipleSelectionSupport) { + this.o.domNode.setAttribute("aria-multiselectable", "true"); + } else { + this.o.domNode.removeAttribute("aria-multiselectable"); + } + } + this.x.updateOptions(i); + this.w?.updateOptions(i); + this.o.updateOptions(i); + } + get options() { + return this.C; + } + splice(i, e, t = []) { + if (i < 0 || i > this.o.length) { + throw new BM(this.B, `Invalid start index: ${i}`); + } + if (e < 0) { + throw new BM(this.B, `Invalid delete count: ${e}`); + } + if (e !== 0 || t.length !== 0) { + this.k.bufferEvents(() => this.q.splice(i, e, t)); + } + } + updateWidth(i) { + this.o.updateWidth(i); + } + updateElementHeight(i, e) { + this.o.updateElementHeight(i, e, null); + } + rerender() { + this.o.rerender(); + } + element(i) { + return this.o.element(i); + } + indexOf(i) { + return this.o.indexOf(i); + } + indexAt(i) { + return this.o.indexAt(i); + } + get length() { + return this.o.length; + } + get contentHeight() { + return this.o.contentHeight; + } + get contentWidth() { + return this.o.contentWidth; + } + get onDidChangeContentHeight() { + return this.o.onDidChangeContentHeight; + } + get onDidChangeContentWidth() { + return this.o.onDidChangeContentWidth; + } + get scrollTop() { + return this.o.getScrollTop(); + } + set scrollTop(i) { + this.o.setScrollTop(i); + } + get scrollLeft() { + return this.o.getScrollLeft(); + } + set scrollLeft(i) { + this.o.setScrollLeft(i); + } + get scrollHeight() { + return this.o.scrollHeight; + } + get renderHeight() { + return this.o.renderHeight; + } + get firstVisibleIndex() { + return this.o.firstVisibleIndex; + } + get firstMostlyVisibleIndex() { + return this.o.firstMostlyVisibleIndex; + } + get lastVisibleIndex() { + return this.o.lastVisibleIndex; + } + get ariaLabel() { + return this.y; + } + set ariaLabel(i) { + this.y = i; + this.o.domNode.setAttribute("aria-label", i); + } + domFocus() { + this.o.domNode.focus({ + preventScroll: true + }); + } + layout(i, e) { + this.o.layout(i, e); + } + triggerTypeNavigation() { + this.u?.trigger(); + } + setSelection(i, e) { + for (const t of i) { + if (t < 0 || t >= this.length) { + throw new BM(this.B, `Invalid index ${t}`); + } + } + this.f.set(i, e); + } + getSelection() { + return this.f.get(); + } + getSelectedElements() { + return this.getSelection().map(i => this.o.element(i)); + } + setAnchor(i) { + if (typeof i === "undefined") { + this.g.set([]); + return; + } + if (i < 0 || i >= this.length) { + throw new BM(this.B, `Invalid index ${i}`); + } + this.g.set([i]); + } + getAnchor() { + return this.g.get().at(0); + } + getAnchorElement() { + const i = this.getAnchor(); + if (typeof i === "undefined") { + return undefined; + } else { + return this.element(i); + } + } + setFocus(i, e) { + for (const t of i) { + if (t < 0 || t >= this.length) { + throw new BM(this.B, `Invalid index ${t}`); + } + } + this.d.set(i, e); + } + focusNext(i = 1, e = false, t, s) { + if (this.length === 0) { + return; + } + const n = this.d.get(); + const r = this.F(n.length > 0 ? n[0] + i : 0, e, s); + if (r > -1) { + this.setFocus([r], t); + } + } + focusPrevious(i = 1, e = false, t, s) { + if (this.length === 0) { + return; + } + const n = this.d.get(); + const r = this.G(n.length > 0 ? n[0] - i : 0, e, s); + if (r > -1) { + this.setFocus([r], t); + } + } + async focusNextPage(i, e) { + let t = this.o.indexAt(this.o.getScrollTop() + this.o.renderHeight); + t = t === 0 ? 0 : t - 1; + const s = this.getFocus()[0]; + if (s !== t && (s === undefined || t > s)) { + const n = this.G(t, false, e); + if (n > -1 && s !== n) { + this.setFocus([n], i); + } else { + this.setFocus([t], i); + } + } else { + const n = this.o.getScrollTop(); + let r = n + this.o.renderHeight; + if (t > s) { + r -= this.o.elementHeight(t); + } + this.o.setScrollTop(r); + if (this.o.getScrollTop() !== n) { + this.setFocus([]); + await Da(0); + await this.focusNextPage(i, e); + } + } + } + async focusPreviousPage(i, e, t = () => 0) { + let s; + const n = t(); + const r = this.o.getScrollTop() + n; + if (r === 0) { + s = this.o.indexAt(r); + } else { + s = this.o.indexAfter(r - 1); + } + const o = this.getFocus()[0]; + if (o !== s && (o === undefined || o >= s)) { + const a = this.F(s, false, e); + if (a > -1 && o !== a) { + this.setFocus([a], i); + } else { + this.setFocus([s], i); + } + } else { + const a = r; + this.o.setScrollTop(r - this.o.renderHeight - n); + if (this.o.getScrollTop() + t() !== a) { + this.setFocus([]); + await Da(0); + await this.focusPreviousPage(i, e, t); + } + } + } + focusLast(i, e) { + if (this.length === 0) { + return; + } + const t = this.G(this.length - 1, false, e); + if (t > -1) { + this.setFocus([t], i); + } + } + focusFirst(i, e) { + this.focusNth(0, i, e); + } + focusNth(i, e, t) { + if (this.length === 0) { + return; + } + const s = this.F(i, false, t); + if (s > -1) { + this.setFocus([s], e); + } + } + F(i, e = false, t) { + for (let s = 0; s < this.length; s++) { + if (i >= this.length && !e) { + return -1; + } + i = i % this.length; + if (!t || t(this.element(i))) { + return i; + } + i++; + } + return -1; + } + G(i, e = false, t) { + for (let s = 0; s < this.length; s++) { + if (i < 0 && !e) { + return -1; + } + i = (this.length + i % this.length) % this.length; + if (!t || t(this.element(i))) { + return i; + } + i--; + } + return -1; + } + getFocus() { + return this.d.get(); + } + getFocusedElements() { + return this.getFocus().map(i => this.o.element(i)); + } + reveal(i, e, t = 0) { + if (i < 0 || i >= this.length) { + throw new BM(this.B, `Invalid index ${i}`); + } + const s = this.o.getScrollTop(); + const n = this.o.elementTop(i); + const r = this.o.elementHeight(i); + if (Od(e)) { + const o = r - this.o.renderHeight + t; + this.o.setScrollTop(o * yc(e, 0, 1) + n - t); + } else { + const o = n + r; + const a = s + this.o.renderHeight; + if (!(n < s + t) || !(o >= a)) { + if (n < s + t || o >= a && r >= this.o.renderHeight) { + this.o.setScrollTop(n - t); + } else if (o >= a) { + this.o.setScrollTop(o - this.o.renderHeight); + } + } + } + } + getRelativeTop(i, e = 0) { + if (i < 0 || i >= this.length) { + throw new BM(this.B, `Invalid index ${i}`); + } + const t = this.o.getScrollTop(); + const s = this.o.elementTop(i); + const n = this.o.elementHeight(i); + if (s < t + e || s + n > t + this.o.renderHeight) { + return null; + } + const r = n - this.o.renderHeight + e; + return Math.abs((t + e - s) / r); + } + isDOMFocused() { + return Jg(this.o.domNode); + } + getHTMLElement() { + return this.o.domNode; + } + getScrollableElement() { + return this.o.scrollableElementDomNode; + } + getElementID(i) { + return this.o.getElementDomId(i); + } + getElementTop(i) { + return this.o.elementTop(i); + } + style(i) { + this.t.style(i); + } + H({ + indexes: i, + browserEvent: e + }) { + return { + indexes: i, + elements: i.map(t => this.o.element(t)), + browserEvent: e + }; + } + I() { + const i = this.d.get(); + this.o.domNode.classList.toggle("element-focused", i.length > 0); + this.J(); + } + J() { + const i = this.d.get(); + if (i.length > 0) { + let e; + if (this.v?.getActiveDescendantId) { + e = this.v.getActiveDescendantId(this.o.element(i[0])); + } + this.o.domNode.setAttribute("aria-activedescendant", e || this.o.getElementDomId(i[0])); + } else { + this.o.domNode.removeAttribute("aria-activedescendant"); + } + } + K() { + const i = this.f.get(); + this.o.domNode.classList.toggle("selection-none", i.length === 0); + this.o.domNode.classList.toggle("selection-single", i.length === 1); + this.o.domNode.classList.toggle("selection-multiple", i.length > 1); + } + dispose() { + this.A.fire(); + this.z.dispose(); + this.A.dispose(); + } + }; + __decorate([Hs], Cg.prototype, "onDidChangeFocus", null); + __decorate([Hs], Cg.prototype, "onDidChangeSelection", null); + __decorate([Hs], Cg.prototype, "onContextMenu", null); + __decorate([Hs], Cg.prototype, "onKeyDown", null); + __decorate([Hs], Cg.prototype, "onKeyUp", null); + __decorate([Hs], Cg.prototype, "onKeyPress", null); + __decorate([Hs], Cg.prototype, "onDidFocus", null); + __decorate([Hs], Cg.prototype, "onDidBlur", null); + } +}); +function GXn(i) { + return i.replace(Zls, (e, t) => t ? e : `\\${e}`); +} +function KXn(i) { + return i.replace(ecs, e => `\\${e}`); +} +function KI(i) { + if (i.indexOf(Qls) === -1) { + return i; + } else { + return i.replace(tcs, (e, t, s, n) => s ? e : t || n || ""); + } +} +function TWt(i) { + if (i) { + return i.replace(/\$\((.*?)\)/g, (e, t) => ` ${t} `).trim(); + } else { + return ""; + } +} +function b7(i) { + mct.lastIndex = 0; + let e = ""; + const t = []; + let s = 0; + while (true) { + const n = mct.lastIndex; + const r = mct.exec(i); + const o = i.substring(n, r?.index); + if (o.length > 0) { + e += o; + for (let a = 0; a < o.length; a++) { + t.push(s); + } + } + if (!r) { + break; + } + s += r[0].length; + } + return { + text: e, + iconOffsets: t + }; +} +function vie(i, e, t = false) { + const { + text: s, + iconOffsets: n + } = e; + if (!n || n.length === 0) { + return rS(i, s, t); + } + const r = F2(s, " "); + const o = s.length - r.length; + const a = rS(i, r, t); + if (a) { + for (const l of a) { + const c = n[l.start + o] + o; + l.start += c; + l.end += c; + } + } + return a; +} +var Qls; +var pct; +var Zls; +var ecs; +var tcs; +var mct; +var Q0 = ue({ + "out-build/vs/base/common/iconLabels.js"() { + "use strict"; + + Pc(); + $i(); + Rt(); + Qls = "$("; + pct = new RegExp(`\\$\\(${le.iconNameExpression}(?:${le.iconModifierExpression})?\\)`, "g"); + Zls = new RegExp(`(\\\\)?${pct.source}`, "g"); + ecs = new RegExp(`\\\\${pct.source}`, "g"); + tcs = new RegExp(`(\\s)?(\\\\)?${pct.source}(\\s)?`, "g"); + mct = new RegExp(`\\$\\(${le.iconNameCharacter}+\\)`, "g"); + } +}); +function yie(i) { + if (Sg(i)) { + return !i.value; + } else if (Array.isArray(i)) { + return i.every(yie); + } else { + return true; + } +} +function Sg(i) { + if (i instanceof hs) { + return true; + } else if (i && typeof i == "object") { + return typeof i.value == "string" && (typeof i.isTrusted == "boolean" || typeof i.isTrusted == "object" || i.isTrusted === undefined) && (typeof i.supportThemeIcons == "boolean" || i.supportThemeIcons === undefined); + } else { + return false; + } +} +function ics(i, e) { + if (i === e) { + return true; + } else if (!i || !e) { + return false; + } else { + return i.value === e.value && i.isTrusted === e.isTrusted && i.supportThemeIcons === e.supportThemeIcons && i.supportHtml === e.supportHtml && (i.baseUri === e.baseUri || !!i.baseUri && !!e.baseUri && Ls(V.from(i.baseUri), V.from(e.baseUri))); + } +} +function yz(i) { + return i.replace(/[\\`*_{}[\]()#+\-!~]/g, "\\$&"); +} +function YXn(i, e) { + const t = i.match(/^`+/gm)?.reduce((n, r) => n.length > r.length ? n : r).length ?? 0; + const s = t >= 3 ? t + 1 : 3; + return [`${"`".repeat(s)}${e}`, i, `${"`".repeat(s)}`].join(` +`); +} +function bct(i) { + return i.replace(/"/g, """); +} +function PWt(i) { + return i && i.replace(/\\([\\`*_{}[\]()#+\-.!~])/g, "$1"); +} +function scs(i) { + const e = []; + const t = i.split("|").map(n => n.trim()); + i = t[0]; + const s = t[1]; + if (s) { + const n = /height=(\d+)/.exec(s); + const r = /width=(\d+)/.exec(s); + const o = n ? n[1] : ""; + const a = r ? r[1] : ""; + const l = isFinite(parseInt(a)); + const c = isFinite(parseInt(o)); + if (l) { + e.push(`width="${a}"`); + } + if (c) { + e.push(`height="${o}"`); + } + } + return { + href: i, + dimensions: e + }; +} +var ncs; +var hs; +var No = ue({ + "out-build/vs/base/common/htmlContent.js"() { + "use strict"; + + Ut(); + Q0(); + Et(); + $i(); + Le(); + (function (i) { + i[i.Paragraph = 0] = "Paragraph"; + i[i.Break = 1] = "Break"; + })(ncs ||= {}); + hs = class { + constructor(i = "", e = false) { + this.value = i; + if (typeof this.value != "string") { + throw Hl("value"); + } + if (typeof e == "boolean") { + this.isTrusted = e; + this.supportThemeIcons = false; + this.supportHtml = false; + } else { + this.isTrusted = e.isTrusted ?? undefined; + this.supportThemeIcons = e.supportThemeIcons ?? false; + this.supportHtml = e.supportHtml ?? false; + } + } + appendText(i, e = 0) { + this.value += yz(this.supportThemeIcons ? GXn(i) : i).replace(/([ \t]+)/g, (t, s) => " ".repeat(s.length)).replace(/\>/gm, "\\>").replace(/\n/g, e === 1 ? `\\ +` : ` + +`); + return this; + } + appendMarkdown(i) { + this.value += i; + return this; + } + appendCodeblock(i, e) { + this.value += ` +${YXn(e, i)} +`; + return this; + } + appendLink(i, e, t) { + this.value += "["; + this.value += this.c(e, "]"); + this.value += "]("; + this.value += this.c(String(i), ")"); + if (t) { + this.value += ` "${this.c(this.c(t, "\""), ")")}"`; + } + this.value += ")"; + return this; + } + c(i, e) { + const t = new RegExp(zg(e), "g"); + return i.replace(t, (s, n) => i.charAt(n - 1) !== "\\" ? `\\${s}` : s); + } + }; + } +}); +var vct; +var wz; +var Cz = ue({ + "out-build/vs/base/common/idGenerator.js"() { + "use strict"; + + vct = class { + constructor(i) { + this.a = i; + this.b = 0; + } + nextId() { + return this.a + ++this.b; + } + }; + wz = new vct("id#"); + } +}); +function LWt() { + return { + async: false, + breaks: false, + extensions: null, + gfm: true, + hooks: null, + pedantic: false, + renderer: null, + silent: false, + tokenizer: null, + walkTokens: null + }; +} +function rcs(i) { + H4 = i; +} +function jT(i, e) { + if (e) { + if (RWt.test(i)) { + return i.replace(ccs, MWt); + } + } else if (NWt.test(i)) { + return i.replace(ucs, MWt); + } + return i; +} +function Cp(i, e) { + let t = typeof i == "string" ? i : i.source; + e = e || ""; + const s = { + replace: (n, r) => { + let o = typeof r == "string" ? r : r.source; + o = o.replace(hcs, "$1"); + t = t.replace(n, o); + return s; + }, + getRegex: () => new RegExp(t, e) + }; + return s; +} +function ocs(i) { + try { + i = encodeURI(i).replace(/%25/g, "%"); + } catch { + return null; + } + return i; +} +function acs(i, e) { + const t = i.replace(/\|/g, (r, o, a) => { + let l = false; + let c = o; + while (--c >= 0 && a[c] === "\\") { + l = !l; + } + if (l) { + return "|"; + } else { + return " |"; + } + }); + const s = t.split(/ \|/); + let n = 0; + if (!s[0].trim()) { + s.shift(); + } + if (s.length > 0 && !s[s.length - 1].trim()) { + s.pop(); + } + if (e) { + if (s.length > e) { + s.splice(e); + } else { + while (s.length < e) { + s.push(""); + } + } + } + for (; n < s.length; n++) { + s[n] = s[n].trim().replace(/\\\|/g, "|"); + } + return s; +} +function Dme(i, e, t) { + const s = i.length; + if (s === 0) { + return ""; + } + let n = 0; + while (n < s) { + const r = i.charAt(s - n - 1); + if (r === e && !t) { + n++; + } else if (r !== e && t) { + n++; + } else { + break; + } + } + return i.slice(0, s - n); +} +function XXn(i, e) { + if (i.indexOf(e[1]) === -1) { + return -1; + } + let t = 0; + for (let s = 0; s < i.length; s++) { + if (i[s] === "\\") { + s++; + } else if (i[s] === e[0]) { + t++; + } else if (i[s] === e[1] && (t--, t < 0)) { + return s; + } + } + return -1; +} +function lcs(i, e, t, s) { + const n = e.href; + const r = e.title ? jT(e.title) : null; + const o = i[1].replace(/\\([\[\]])/g, "$1"); + if (i[0].charAt(0) !== "!") { + s.state.inLink = true; + const a = { + type: "link", + raw: t, + href: n, + title: r, + text: o, + tokens: s.inlineTokens(o) + }; + s.state.inLink = false; + return a; + } + return { + type: "image", + raw: t, + href: n, + title: r, + text: jT(o) + }; +} +function QXn(i, e) { + const t = i.match(/^(\s+)(?:```)/); + if (t === null) { + return e; + } + const s = t[1]; + return e.split(` +`).map(n => { + const r = n.match(/^\s+/); + if (r === null) { + return n; + } + const [o] = r; + if (o.length >= s.length) { + return n.slice(s.length); + } else { + return n; + } + }).join(` +`); +} +function th(i, e) { + return w7.parse(i, e); +} +var H4; +var RWt; +var ccs; +var NWt; +var ucs; +var dcs; +var MWt; +var hcs; +var wie; +var Tme; +var fcs; +var gcs; +var pcs; +var Cie; +var mcs; +var AWt; +var $Wt; +var yct; +var bcs; +var wct; +var vcs; +var ycs; +var Pme; +var Cct; +var wcs; +var FWt; +var Ccs; +var Sct; +var OWt; +var Scs; +var xcs; +var _Wt; +var kcs; +var BWt; +var Ecs; +var Sie; +var Ics; +var Dcs; +var Tcs; +var Pcs; +var Lcs; +var Rcs; +var Ncs; +var Mcs; +var Acs; +var Lme; +var $cs; +var UWt; +var WWt; +var Fcs; +var xct; +var Ocs; +var kct; +var _cs; +var Rme; +var xie; +var v7; +var Sz; +var Ect; +var y7; +var Nme; +var Ict; +var w7; +var ZXn; +var eQn; +var tQn; +var Bcs; +var iQn; +var VWt; +var Ucs; +var kie; +var kF = ue({ + "out-build/vs/base/common/marked/marked.js"() { + "use strict"; + + H4 = LWt(); + RWt = /[&<>"']/; + ccs = new RegExp(RWt.source, "g"); + NWt = /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/; + ucs = new RegExp(NWt.source, "g"); + dcs = { + "&": "&", + "<": "<", + ">": ">", + "\"": """, + "'": "'" + }; + MWt = i => dcs[i]; + hcs = /(^|[^\[])\^/g; + wie = { + exec: () => null + }; + Tme = class { + options; + rules; + lexer; + constructor(i) { + this.options = i || H4; + } + space(i) { + const e = this.rules.block.newline.exec(i); + if (e && e[0].length > 0) { + return { + type: "space", + raw: e[0] + }; + } + } + code(i) { + const e = this.rules.block.code.exec(i); + if (e) { + const t = e[0].replace(/^ {1,4}/gm, ""); + return { + type: "code", + raw: e[0], + codeBlockStyle: "indented", + text: this.options.pedantic ? t : Dme(t, ` +`) + }; + } + } + fences(i) { + const e = this.rules.block.fences.exec(i); + if (e) { + const t = e[0]; + const s = QXn(t, e[3] || ""); + return { + type: "code", + raw: t, + lang: e[2] ? e[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : e[2], + text: s + }; + } + } + heading(i) { + const e = this.rules.block.heading.exec(i); + if (e) { + let t = e[2].trim(); + if (/#$/.test(t)) { + const s = Dme(t, "#"); + if (this.options.pedantic || !s || / $/.test(s)) { + t = s.trim(); + } + } + return { + type: "heading", + raw: e[0], + depth: e[1].length, + text: t, + tokens: this.lexer.inline(t) + }; + } + } + hr(i) { + const e = this.rules.block.hr.exec(i); + if (e) { + return { + type: "hr", + raw: Dme(e[0], ` +`) + }; + } + } + blockquote(i) { + const e = this.rules.block.blockquote.exec(i); + if (e) { + let t = Dme(e[0], ` +`).split(` +`); + let s = ""; + let n = ""; + const r = []; + while (t.length > 0) { + let o = false; + const a = []; + let l; + for (l = 0; l < t.length; l++) { + if (/^ {0,3}>/.test(t[l])) { + a.push(t[l]); + o = true; + } else if (!o) { + a.push(t[l]); + } else { + break; + } + } + t = t.slice(l); + const c = a.join(` +`); + const u = c.replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g, ` + $1`).replace(/^ {0,3}>[ \t]?/gm, ""); + s = s ? `${s} +${c}` : c; + n = n ? `${n} +${u}` : u; + const d = this.lexer.state.top; + this.lexer.state.top = true; + this.lexer.blockTokens(u, r, true); + this.lexer.state.top = d; + if (t.length === 0) { + break; + } + const h = r[r.length - 1]; + if (h?.type === "code") { + break; + } + if (h?.type === "blockquote") { + const g = h; + const p = `${g.raw} +${t.join(` +`)}`; + const b = this.blockquote(p); + r[r.length - 1] = b; + s = s.substring(0, s.length - g.raw.length) + b.raw; + n = n.substring(0, n.length - g.text.length) + b.text; + break; + } else if (h?.type === "list") { + const g = h; + const p = `${g.raw} +${t.join(` +`)}`; + const b = this.list(p); + r[r.length - 1] = b; + s = s.substring(0, s.length - h.raw.length) + b.raw; + n = n.substring(0, n.length - g.raw.length) + b.raw; + t = p.substring(r[r.length - 1].raw.length).split(` +`); + continue; + } + } + return { + type: "blockquote", + raw: s, + tokens: r, + text: n + }; + } + } + list(i) { + let e = this.rules.block.list.exec(i); + if (e) { + let t = e[1].trim(); + const s = t.length > 1; + const n = { + type: "list", + raw: "", + ordered: s, + start: s ? +t.slice(0, -1) : "", + loose: false, + items: [] + }; + t = s ? `\\d{1,9}\\${t.slice(-1)}` : `\\${t}`; + if (this.options.pedantic) { + t = s ? t : "[*+-]"; + } + const r = new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`); + let o = false; + while (i) { + let a = false; + let l = ""; + let c = ""; + if (!(e = r.exec(i)) || this.rules.block.hr.test(i)) { + break; + } + l = e[0]; + i = i.substring(l.length); + let u = e[2].split(` +`, 1)[0].replace(/^\t+/, v => " ".repeat(v.length * 3)); + let d = i.split(` +`, 1)[0]; + let h = !u.trim(); + let g = 0; + if (this.options.pedantic) { + g = 2; + c = u.trimStart(); + } else if (h) { + g = e[1].length + 1; + } else { + g = e[2].search(/[^ ]/); + g = g > 4 ? 1 : g; + c = u.slice(g); + g += e[1].length; + } + if (h && /^ *$/.test(d)) { + l += `${d} +`; + i = i.substring(d.length + 1); + a = true; + } + if (!a) { + const v = new RegExp(`^ {0,${Math.min(3, g - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`); + const y = new RegExp(`^ {0,${Math.min(3, g - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`); + const w = new RegExp(`^ {0,${Math.min(3, g - 1)}}(?:\`\`\`|~~~)`); + const C = new RegExp(`^ {0,${Math.min(3, g - 1)}}#`); + while (i) { + const S = i.split(` +`, 1)[0]; + d = S; + if (this.options.pedantic) { + d = d.replace(/^ {1,4}(?=( {4})*[^ ])/g, " "); + } + if (w.test(d) || C.test(d) || v.test(d) || y.test(i)) { + break; + } + if (d.search(/[^ ]/) >= g || !d.trim()) { + c += ` +${d.slice(g)}`; + } else { + if (h || u.search(/[^ ]/) >= 4 || w.test(u) || C.test(u) || y.test(u)) { + break; + } + c += ` +${d}`; + } + if (!h && !d.trim()) { + h = true; + } + l += `${S} +`; + i = i.substring(S.length + 1); + u = d.slice(g); + } + } + if (!n.loose) { + if (o) { + n.loose = true; + } else if (/\n *\n *$/.test(l)) { + o = true; + } + } + let p = null; + let b; + if (this.options.gfm) { + p = /^\[[ xX]\] /.exec(c); + if (p) { + b = p[0] !== "[ ] "; + c = c.replace(/^\[[ xX]\] +/, ""); + } + } + n.items.push({ + type: "list_item", + raw: l, + task: !!p, + checked: b, + loose: false, + text: c, + tokens: [] + }); + n.raw += l; + } + n.items[n.items.length - 1].raw = n.items[n.items.length - 1].raw.trimEnd(); + n.items[n.items.length - 1].text = n.items[n.items.length - 1].text.trimEnd(); + n.raw = n.raw.trimEnd(); + for (let a = 0; a < n.items.length; a++) { + this.lexer.state.top = false; + n.items[a].tokens = this.lexer.blockTokens(n.items[a].text, []); + if (!n.loose) { + const l = n.items[a].tokens.filter(u => u.type === "space"); + const c = l.length > 0 && l.some(u => /\n.*\n/.test(u.raw)); + n.loose = c; + } + } + if (n.loose) { + for (let a = 0; a < n.items.length; a++) { + n.items[a].loose = true; + } + } + return n; + } + } + html(i) { + const e = this.rules.block.html.exec(i); + if (e) { + return { + type: "html", + block: true, + raw: e[0], + pre: e[1] === "pre" || e[1] === "script" || e[1] === "style", + text: e[0] + }; + } + } + def(i) { + const e = this.rules.block.def.exec(i); + if (e) { + const t = e[1].toLowerCase().replace(/\s+/g, " "); + const s = e[2] ? e[2].replace(/^<(.*)>$/, "$1").replace(this.rules.inline.anyPunctuation, "$1") : ""; + const n = e[3] ? e[3].substring(1, e[3].length - 1).replace(this.rules.inline.anyPunctuation, "$1") : e[3]; + return { + type: "def", + tag: t, + raw: e[0], + href: s, + title: n + }; + } + } + table(i) { + const e = this.rules.block.table.exec(i); + if (!e || !/[:|]/.test(e[2])) { + return; + } + const t = acs(e[1]); + const s = e[2].replace(/^\||\| *$/g, "").split("|"); + const n = e[3] && e[3].trim() ? e[3].replace(/\n[ \t]*$/, "").split(` +`) : []; + const r = { + type: "table", + raw: e[0], + header: [], + align: [], + rows: [] + }; + if (t.length === s.length) { + for (const o of s) { + if (/^ *-+: *$/.test(o)) { + r.align.push("right"); + } else if (/^ *:-+: *$/.test(o)) { + r.align.push("center"); + } else if (/^ *:-+ *$/.test(o)) { + r.align.push("left"); + } else { + r.align.push(null); + } + } + for (let o = 0; o < t.length; o++) { + r.header.push({ + text: t[o], + tokens: this.lexer.inline(t[o]), + header: true, + align: r.align[o] + }); + } + for (const o of n) { + r.rows.push(acs(o, r.header.length).map((a, l) => ({ + text: a, + tokens: this.lexer.inline(a), + header: false, + align: r.align[l] + }))); + } + return r; + } + } + lheading(i) { + const e = this.rules.block.lheading.exec(i); + if (e) { + return { + type: "heading", + raw: e[0], + depth: e[2].charAt(0) === "=" ? 1 : 2, + text: e[1], + tokens: this.lexer.inline(e[1]) + }; + } + } + paragraph(i) { + const e = this.rules.block.paragraph.exec(i); + if (e) { + const t = e[1].charAt(e[1].length - 1) === ` +` ? e[1].slice(0, -1) : e[1]; + return { + type: "paragraph", + raw: e[0], + text: t, + tokens: this.lexer.inline(t) + }; + } + } + text(i) { + const e = this.rules.block.text.exec(i); + if (e) { + return { + type: "text", + raw: e[0], + text: e[0], + tokens: this.lexer.inline(e[0]) + }; + } + } + escape(i) { + const e = this.rules.inline.escape.exec(i); + if (e) { + return { + type: "escape", + raw: e[0], + text: jT(e[1]) + }; + } + } + tag(i) { + const e = this.rules.inline.tag.exec(i); + if (e) { + if (!this.lexer.state.inLink && /^
/i.test(e[0])) { + this.lexer.state.inLink = false; + } + if (!this.lexer.state.inRawBlock && /^<(pre|code|kbd|script)(\s|>)/i.test(e[0])) { + this.lexer.state.inRawBlock = true; + } else if (this.lexer.state.inRawBlock && /^<\/(pre|code|kbd|script)(\s|>)/i.test(e[0])) { + this.lexer.state.inRawBlock = false; + } + return { + type: "html", + raw: e[0], + inLink: this.lexer.state.inLink, + inRawBlock: this.lexer.state.inRawBlock, + block: false, + text: e[0] + }; + } + } + link(i) { + const e = this.rules.inline.link.exec(i); + if (e) { + const t = e[2].trim(); + if (!this.options.pedantic && /^$/.test(t)) { + return; + } + const r = Dme(t.slice(0, -1), "\\"); + if ((t.length - r.length) % 2 === 0) { + return; + } + } else { + const r = XXn(e[2], "()"); + if (r > -1) { + const a = (e[0].indexOf("!") === 0 ? 5 : 4) + e[1].length + r; + e[2] = e[2].substring(0, r); + e[0] = e[0].substring(0, a).trim(); + e[3] = ""; + } + } + let s = e[2]; + let n = ""; + if (this.options.pedantic) { + const r = /^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(s); + if (r) { + s = r[1]; + n = r[3]; + } + } else { + n = e[3] ? e[3].slice(1, -1) : ""; + } + s = s.trim(); + if (/^$/.test(t)) { + s = s.slice(1); + } else { + s = s.slice(1, -1); + } + } + return lcs(e, { + href: s && s.replace(this.rules.inline.anyPunctuation, "$1"), + title: n && n.replace(this.rules.inline.anyPunctuation, "$1") + }, e[0], this.lexer); + } + } + reflink(i, e) { + let t; + if ((t = this.rules.inline.reflink.exec(i)) || (t = this.rules.inline.nolink.exec(i))) { + const s = (t[2] || t[1]).replace(/\s+/g, " "); + const n = e[s.toLowerCase()]; + if (!n) { + const r = t[0].charAt(0); + return { + type: "text", + raw: r, + text: r + }; + } + return lcs(t, n, t[0], this.lexer); + } + } + emStrong(i, e, t = "") { + let s = this.rules.inline.emStrongLDelim.exec(i); + if (!s || s[3] && t.match(/[\p{L}\p{N}]/u)) { + return; + } + if (!s[1] && !s[2] && !"" || !t || this.rules.inline.punctuation.exec(t)) { + const r = [...s[0]].length - 1; + let o; + let a; + let l = r; + let c = 0; + const u = s[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd; + u.lastIndex = 0; + e = e.slice(i.length * -1 + r); + while ((s = u.exec(e)) != null) { + o = s[1] || s[2] || s[3] || s[4] || s[5] || s[6]; + if (!o) { + continue; + } + a = [...o].length; + if (s[3] || s[4]) { + l += a; + continue; + } else if ((s[5] || s[6]) && r % 3 && !((r + a) % 3)) { + c += a; + continue; + } + l -= a; + if (l > 0) { + continue; + } + a = Math.min(a, a + l + c); + const d = [...s[0]][0].length; + const h = i.slice(0, r + s.index + d + a); + if (Math.min(r, a) % 2) { + const p = h.slice(1, -1); + return { + type: "em", + raw: h, + text: p, + tokens: this.lexer.inlineTokens(p) + }; + } + const g = h.slice(2, -2); + return { + type: "strong", + raw: h, + text: g, + tokens: this.lexer.inlineTokens(g) + }; + } + } + } + codespan(i) { + const e = this.rules.inline.code.exec(i); + if (e) { + let t = e[2].replace(/\n/g, " "); + const s = /[^ ]/.test(t); + const n = /^ /.test(t) && / $/.test(t); + if (s && n) { + t = t.substring(1, t.length - 1); + } + t = jT(t, true); + return { + type: "codespan", + raw: e[0], + text: t + }; + } + } + br(i) { + const e = this.rules.inline.br.exec(i); + if (e) { + return { + type: "br", + raw: e[0] + }; + } + } + del(i) { + const e = this.rules.inline.del.exec(i); + if (e) { + return { + type: "del", + raw: e[0], + text: e[2], + tokens: this.lexer.inlineTokens(e[2]) + }; + } + } + autolink(i) { + const e = this.rules.inline.autolink.exec(i); + if (e) { + let t; + let s; + if (e[2] === "@") { + t = jT(e[1]); + s = "mailto:" + t; + } else { + t = jT(e[1]); + s = t; + } + return { + type: "link", + raw: e[0], + text: t, + href: s, + tokens: [{ + type: "text", + raw: t, + text: t + }] + }; + } + } + url(i) { + let e; + if (e = this.rules.inline.url.exec(i)) { + let t; + let s; + if (e[2] === "@") { + t = jT(e[0]); + s = "mailto:" + t; + } else { + let n; + do { + n = e[0]; + e[0] = this.rules.inline._backpedal.exec(e[0])?.[0] ?? ""; + } while (n !== e[0]); + t = jT(e[0]); + if (e[1] === "www.") { + s = "http://" + e[0]; + } else { + s = e[0]; + } + } + return { + type: "link", + raw: e[0], + text: t, + href: s, + tokens: [{ + type: "text", + raw: t, + text: t + }] + }; + } + } + inlineText(i) { + const e = this.rules.inline.text.exec(i); + if (e) { + let t; + if (this.lexer.state.inRawBlock) { + t = e[0]; + } else { + t = jT(e[0]); + } + return { + type: "text", + raw: e[0], + text: t + }; + } + } + }; + fcs = /^(?: *(?:\n|$))+/; + gcs = /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/; + pcs = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/; + Cie = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/; + mcs = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/; + AWt = /(?:[*+-]|\d{1,9}[.)])/; + $Wt = Cp(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g, AWt).replace(/blockCode/g, / {4}/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).getRegex(); + yct = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/; + bcs = /^[^\n]+/; + wct = /(?!\s*\])(?:\\.|[^\[\]\\])+/; + vcs = Cp(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label", wct).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(); + ycs = Cp(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, AWt).getRegex(); + Pme = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul"; + Cct = /|$))/; + wcs = Cp("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))", "i").replace("comment", Cct).replace("tag", Pme).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(); + FWt = Cp(yct).replace("hr", Cie).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", ")|<(?:script|pre|style|textarea|!--)").replace("tag", Pme).getRegex(); + Ccs = Cp(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", FWt).getRegex(); + Sct = { + blockquote: Ccs, + code: gcs, + def: vcs, + fences: pcs, + heading: mcs, + hr: Cie, + html: wcs, + lheading: $Wt, + list: ycs, + newline: fcs, + paragraph: FWt, + table: wie, + text: bcs + }; + OWt = Cp("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", Cie).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", " {4}[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", ")|<(?:script|pre|style|textarea|!--)").replace("tag", Pme).getRegex(); + Scs = { + ...Sct, + table: OWt, + paragraph: Cp(yct).replace("hr", Cie).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", OWt).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", ")|<(?:script|pre|style|textarea|!--)").replace("tag", Pme).getRegex() + }; + xcs = { + ...Sct, + html: Cp(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", Cct).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), + def: /^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, + heading: /^(#{1,6})(.*)(?:\n+|$)/, + fences: wie, + lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, + paragraph: Cp(yct).replace("hr", Cie).replace("heading", ` *#{1,6} *[^ +]`).replace("lheading", $Wt).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() + }; + _Wt = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/; + kcs = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/; + BWt = /^( {2,}|\\)\n(?!\s*$)/; + Ecs = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g; + Tcs = Cp(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/, "u").replace(/punct/g, Sie).getRegex(); + Pcs = Cp("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])", "gu").replace(/punct/g, Sie).getRegex(); + Lcs = Cp("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])", "gu").replace(/punct/g, Sie).getRegex(); + Rcs = Cp(/\\([punct])/, "gu").replace(/punct/g, Sie).getRegex(); + Ncs = Cp(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(); + Mcs = Cp(Cct).replace("(?:-->|$)", "-->").getRegex(); + Acs = Cp("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment", Mcs).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(); + Lme = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/; + $cs = Cp(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label", Lme).replace("href", /<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(); + UWt = Cp(/^!?\[(label)\]\[(ref)\]/).replace("label", Lme).replace("ref", wct).getRegex(); + WWt = Cp(/^!?\[(ref)\](?:\[\])?/).replace("ref", wct).getRegex(); + Fcs = Cp("reflink|nolink(?!\\()", "g").replace("reflink", UWt).replace("nolink", WWt).getRegex(); + xct = { + _backpedal: wie, + anyPunctuation: Rcs, + autolink: Ncs, + blockSkip: Dcs, + br: BWt, + code: kcs, + del: wie, + emStrongLDelim: Tcs, + emStrongRDelimAst: Pcs, + emStrongRDelimUnd: Lcs, + escape: _Wt, + link: $cs, + nolink: WWt, + punctuation: Ics, + reflink: UWt, + reflinkSearch: Fcs, + tag: Acs, + text: Ecs, + url: wie + }; + Ocs = { + ...xct, + link: Cp(/^!?\[(label)\]\((.*?)\)/).replace("label", Lme).getRegex(), + reflink: Cp(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Lme).getRegex() + }; + kct = { + ...xct, + escape: Cp(_Wt).replace("])", "~|])").getRegex(), + url: Cp(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/, "i").replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), + _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, + del: /^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/, + text: /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\ l + " ".repeat(c.length)); + } + let n; + let r; + let o; + while (e) { + if (!this.options.extensions || !this.options.extensions.block || !this.options.extensions.block.some(a => (n = a.call({ + lexer: this + }, e, t)) ? (e = e.substring(n.raw.length), t.push(n), true) : false)) { + if (n = this.tokenizer.space(e)) { + e = e.substring(n.raw.length); + if (n.raw.length === 1 && t.length > 0) { + t[t.length - 1].raw += ` +`; + } else { + t.push(n); + } + continue; + } + if (n = this.tokenizer.code(e)) { + e = e.substring(n.raw.length); + r = t[t.length - 1]; + if (r && (r.type === "paragraph" || r.type === "text")) { + r.raw += ` +${n.raw}`; + r.text += ` +${n.text}`; + this.inlineQueue[this.inlineQueue.length - 1].src = r.text; + } else { + t.push(n); + } + continue; + } + if (n = this.tokenizer.fences(e)) { + e = e.substring(n.raw.length); + t.push(n); + continue; + } + if (n = this.tokenizer.heading(e)) { + e = e.substring(n.raw.length); + t.push(n); + continue; + } + if (n = this.tokenizer.hr(e)) { + e = e.substring(n.raw.length); + t.push(n); + continue; + } + if (n = this.tokenizer.blockquote(e)) { + e = e.substring(n.raw.length); + t.push(n); + continue; + } + if (n = this.tokenizer.list(e)) { + e = e.substring(n.raw.length); + t.push(n); + continue; + } + if (n = this.tokenizer.html(e)) { + e = e.substring(n.raw.length); + t.push(n); + continue; + } + if (n = this.tokenizer.def(e)) { + e = e.substring(n.raw.length); + r = t[t.length - 1]; + if (r && (r.type === "paragraph" || r.type === "text")) { + r.raw += ` +${n.raw}`; + r.text += ` +${n.raw}`; + this.inlineQueue[this.inlineQueue.length - 1].src = r.text; + } else { + this.tokens.links[n.tag] ||= { + href: n.href, + title: n.title + }; + } + continue; + } + if (n = this.tokenizer.table(e)) { + e = e.substring(n.raw.length); + t.push(n); + continue; + } + if (n = this.tokenizer.lheading(e)) { + e = e.substring(n.raw.length); + t.push(n); + continue; + } + o = e; + if (this.options.extensions && this.options.extensions.startBlock) { + let a = Infinity; + const l = e.slice(1); + let c; + this.options.extensions.startBlock.forEach(u => { + c = u.call({ + lexer: this + }, l); + if (typeof c == "number" && c >= 0) { + a = Math.min(a, c); + } + }); + if (a < Infinity && a >= 0) { + o = e.substring(0, a + 1); + } + } + if (this.state.top && (n = this.tokenizer.paragraph(o))) { + r = t[t.length - 1]; + if (s && r?.type === "paragraph") { + r.raw += ` +${n.raw}`; + r.text += ` +${n.text}`; + this.inlineQueue.pop(); + this.inlineQueue[this.inlineQueue.length - 1].src = r.text; + } else { + t.push(n); + } + s = o.length !== e.length; + e = e.substring(n.raw.length); + continue; + } + if (n = this.tokenizer.text(e)) { + e = e.substring(n.raw.length); + r = t[t.length - 1]; + if (r && r.type === "text") { + r.raw += ` +${n.raw}`; + r.text += ` +${n.text}`; + this.inlineQueue.pop(); + this.inlineQueue[this.inlineQueue.length - 1].src = r.text; + } else { + t.push(n); + } + continue; + } + if (e) { + const a = "Infinite loop on byte: " + e.charCodeAt(0); + if (this.options.silent) { + console.error(a); + break; + } else { + throw new Error(a); + } + } + } + } + this.state.top = true; + return t; + } + inline(e, t = []) { + this.inlineQueue.push({ + src: e, + tokens: t + }); + return t; + } + inlineTokens(e, t = []) { + let s; + let n; + let r; + let o = e; + let a; + let l; + let c; + if (this.tokens.links) { + const u = Object.keys(this.tokens.links); + if (u.length > 0) { + while ((a = this.tokenizer.rules.inline.reflinkSearch.exec(o)) != null) { + if (u.includes(a[0].slice(a[0].lastIndexOf("[") + 1, -1))) { + o = o.slice(0, a.index) + "[" + "a".repeat(a[0].length - 2) + "]" + o.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex); + } + } + } + } + while ((a = this.tokenizer.rules.inline.blockSkip.exec(o)) != null) { + o = o.slice(0, a.index) + "[" + "a".repeat(a[0].length - 2) + "]" + o.slice(this.tokenizer.rules.inline.blockSkip.lastIndex); + } + while ((a = this.tokenizer.rules.inline.anyPunctuation.exec(o)) != null) { + o = o.slice(0, a.index) + "++" + o.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex); + } + while (e) { + if (!l) { + c = ""; + } + l = false; + if (!this.options.extensions || !this.options.extensions.inline || !this.options.extensions.inline.some(u => (s = u.call({ + lexer: this + }, e, t)) ? (e = e.substring(s.raw.length), t.push(s), true) : false)) { + if (s = this.tokenizer.escape(e)) { + e = e.substring(s.raw.length); + t.push(s); + continue; + } + if (s = this.tokenizer.tag(e)) { + e = e.substring(s.raw.length); + n = t[t.length - 1]; + if (n && s.type === "text" && n.type === "text") { + n.raw += s.raw; + n.text += s.text; + } else { + t.push(s); + } + continue; + } + if (s = this.tokenizer.link(e)) { + e = e.substring(s.raw.length); + t.push(s); + continue; + } + if (s = this.tokenizer.reflink(e, this.tokens.links)) { + e = e.substring(s.raw.length); + n = t[t.length - 1]; + if (n && s.type === "text" && n.type === "text") { + n.raw += s.raw; + n.text += s.text; + } else { + t.push(s); + } + continue; + } + if (s = this.tokenizer.emStrong(e, o, c)) { + e = e.substring(s.raw.length); + t.push(s); + continue; + } + if (s = this.tokenizer.codespan(e)) { + e = e.substring(s.raw.length); + t.push(s); + continue; + } + if (s = this.tokenizer.br(e)) { + e = e.substring(s.raw.length); + t.push(s); + continue; + } + if (s = this.tokenizer.del(e)) { + e = e.substring(s.raw.length); + t.push(s); + continue; + } + if (s = this.tokenizer.autolink(e)) { + e = e.substring(s.raw.length); + t.push(s); + continue; + } + if (!this.state.inLink && (s = this.tokenizer.url(e))) { + e = e.substring(s.raw.length); + t.push(s); + continue; + } + r = e; + if (this.options.extensions && this.options.extensions.startInline) { + let u = Infinity; + const d = e.slice(1); + let h; + this.options.extensions.startInline.forEach(g => { + h = g.call({ + lexer: this + }, d); + if (typeof h == "number" && h >= 0) { + u = Math.min(u, h); + } + }); + if (u < Infinity && u >= 0) { + r = e.substring(0, u + 1); + } + } + if (s = this.tokenizer.inlineText(r)) { + e = e.substring(s.raw.length); + if (s.raw.slice(-1) !== "_") { + c = s.raw.slice(-1); + } + l = true; + n = t[t.length - 1]; + if (n && n.type === "text") { + n.raw += s.raw; + n.text += s.text; + } else { + t.push(s); + } + continue; + } + if (e) { + const u = "Infinite loop on byte: " + e.charCodeAt(0); + if (this.options.silent) { + console.error(u); + break; + } else { + throw new Error(u); + } + } + } + } + return t; + } + }; + Sz = class { + options; + parser; + constructor(i) { + this.options = i || H4; + } + space(i) { + return ""; + } + code({ + text: i, + lang: e, + escaped: t + }) { + const s = (e || "").match(/^\S*/)?.[0]; + const n = `${i.replace(/\n$/, "")} +`; + if (s) { + return `${"
" + (t ? n : jT(n, true))}
+`; + } else { + return `${"
" + (t ? n : jT(n, true))}
+`; + } + } + blockquote({ + tokens: i + }) { + return `
+${this.parser.parse(i)}
+`; + } + html({ + text: i + }) { + return i; + } + heading({ + tokens: i, + depth: e + }) { + return `${this.parser.parseInline(i)} +`; + } + hr(i) { + return `
+`; + } + list(i) { + const e = i.ordered; + const t = i.start; + let s = ""; + for (let o = 0; o < i.items.length; o++) { + const a = i.items[o]; + s += this.listitem(a); + } + const n = e ? "ol" : "ul"; + const r = e && t !== 1 ? " start=\"" + t + "\"" : ""; + return `${"<" + n + r}> +${s} +`; + } + listitem(i) { + let e = ""; + if (i.task) { + const t = this.checkbox({ + checked: !!i.checked + }); + if (i.loose) { + if (i.tokens.length > 0 && i.tokens[0].type === "paragraph") { + i.tokens[0].text = t + " " + i.tokens[0].text; + if (i.tokens[0].tokens && i.tokens[0].tokens.length > 0 && i.tokens[0].tokens[0].type === "text") { + i.tokens[0].tokens[0].text = t + " " + i.tokens[0].tokens[0].text; + } + } else { + i.tokens.unshift({ + type: "text", + raw: t + " ", + text: t + " " + }); + } + } else { + e += t + " "; + } + } + e += this.parser.parse(i.tokens, !!i.loose); + return `
  • ${e}
  • +`; + } + checkbox({ + checked: i + }) { + return ""; + } + paragraph({ + tokens: i + }) { + return `

    ${this.parser.parseInline(i)}

    +`; + } + table(i) { + let e = ""; + let t = ""; + for (let n = 0; n < i.header.length; n++) { + t += this.tablecell(i.header[n]); + } + e += this.tablerow({ + text: t + }); + let s = ""; + for (let n = 0; n < i.rows.length; n++) { + const r = i.rows[n]; + t = ""; + for (let o = 0; o < r.length; o++) { + t += this.tablecell(r[o]); + } + s += this.tablerow({ + text: t + }); + } + s &&= `${s}`; + return ` + +${e} +${s}
    +`; + } + tablerow({ + text: i + }) { + return ` +${i} +`; + } + tablecell(i) { + const e = this.parser.parseInline(i.tokens); + const t = i.header ? "th" : "td"; + return `${(i.align ? `<${t} align="${i.align}">` : `<${t}>`) + e} +`; + } + strong({ + tokens: i + }) { + return `${this.parser.parseInline(i)}`; + } + em({ + tokens: i + }) { + return `${this.parser.parseInline(i)}`; + } + codespan({ + text: i + }) { + return `${i}`; + } + br(i) { + return "
    "; + } + del({ + tokens: i + }) { + return `${this.parser.parseInline(i)}`; + } + link({ + href: i, + title: e, + tokens: t + }) { + const s = this.parser.parseInline(t); + const n = ocs(i); + if (n === null) { + return s; + } + i = n; + let r = "
    "; + return r; + } + image({ + href: i, + title: e, + text: t + }) { + const s = ocs(i); + if (s === null) { + return t; + } + i = s; + let n = `${t} { + const o = n[r].flat(Infinity); + t = t.concat(this.walkTokens(o, e)); + }); + } else if (n.tokens) { + t = t.concat(this.walkTokens(n.tokens, e)); + } + } + } + } + return t; + } + use(...i) { + const e = this.defaults.extensions || { + renderers: {}, + childTokens: {} + }; + i.forEach(t => { + const s = { + ...t + }; + s.async = this.defaults.async || s.async || false; + if (t.extensions) { + t.extensions.forEach(n => { + if (!n.name) { + throw new Error("extension name required"); + } + if ("renderer" in n) { + const r = e.renderers[n.name]; + if (r) { + e.renderers[n.name] = function (...o) { + let a = n.renderer.apply(this, o); + if (a === false) { + a = r.apply(this, o); + } + return a; + }; + } else { + e.renderers[n.name] = n.renderer; + } + } + if ("tokenizer" in n) { + if (!n.level || n.level !== "block" && n.level !== "inline") { + throw new Error("extension level must be 'block' or 'inline'"); + } + const r = e[n.level]; + if (r) { + r.unshift(n.tokenizer); + } else { + e[n.level] = [n.tokenizer]; + } + if (n.start) { + if (n.level === "block") { + if (e.startBlock) { + e.startBlock.push(n.start); + } else { + e.startBlock = [n.start]; + } + } else if (n.level === "inline") { + if (e.startInline) { + e.startInline.push(n.start); + } else { + e.startInline = [n.start]; + } + } + } + } + if ("childTokens" in n && n.childTokens) { + e.childTokens[n.name] = n.childTokens; + } + }); + s.extensions = e; + } + if (t.renderer) { + const n = this.defaults.renderer || new Sz(this.defaults); + for (const r in t.renderer) { + if (!(r in n)) { + throw new Error(`renderer '${r}' does not exist`); + } + if (["options", "parser"].includes(r)) { + continue; + } + const o = r; + const a = t.renderer[o]; + const l = n[o]; + n[o] = (...c) => { + let u = a.apply(n, c); + if (u === false) { + u = l.apply(n, c); + } + return u || ""; + }; + } + s.renderer = n; + } + if (t.tokenizer) { + const n = this.defaults.tokenizer || new Tme(this.defaults); + for (const r in t.tokenizer) { + if (!(r in n)) { + throw new Error(`tokenizer '${r}' does not exist`); + } + if (["options", "rules", "lexer"].includes(r)) { + continue; + } + const o = r; + const a = t.tokenizer[o]; + const l = n[o]; + n[o] = (...c) => { + let u = a.apply(n, c); + if (u === false) { + u = l.apply(n, c); + } + return u; + }; + } + s.tokenizer = n; + } + if (t.hooks) { + const n = this.defaults.hooks || new Nme(); + for (const r in t.hooks) { + if (!(r in n)) { + throw new Error(`hook '${r}' does not exist`); + } + if (r === "options") { + continue; + } + const o = r; + const a = t.hooks[o]; + const l = n[o]; + if (Nme.passThroughHooks.has(r)) { + n[o] = c => { + if (this.defaults.async) { + return Promise.resolve(a.call(n, c)).then(d => l.call(n, d)); + } + const u = a.call(n, c); + return l.call(n, u); + }; + } else { + n[o] = (...c) => { + let u = a.apply(n, c); + if (u === false) { + u = l.apply(n, c); + } + return u; + }; + } + } + s.hooks = n; + } + if (t.walkTokens) { + const n = this.defaults.walkTokens; + const r = t.walkTokens; + s.walkTokens = function (o) { + let a = []; + a.push(r.call(this, o)); + if (n) { + a = a.concat(n.call(this, o)); + } + return a; + }; + } + this.defaults = { + ...this.defaults, + ...s + }; + }); + return this; + } + setOptions(i) { + this.defaults = { + ...this.defaults, + ...i + }; + return this; + } + lexer(i, e) { + return v7.lex(i, e ?? this.defaults); + } + parser(i, e) { + return y7.parse(i, e ?? this.defaults); + } + parseMarkdown(i, e) { + return (s, n) => { + const r = { + ...n + }; + const o = { + ...this.defaults, + ...r + }; + const a = this.onError(!!o.silent, !!o.async); + if (this.defaults.async === true && r.async === false) { + return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise.")); + } + if (typeof s === "undefined" || s === null) { + return a(new Error("marked(): input parameter is undefined or null")); + } + if (typeof s != "string") { + return a(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(s) + ", string expected")); + } + if (o.hooks) { + o.hooks.options = o; + } + if (o.async) { + return Promise.resolve(o.hooks ? o.hooks.preprocess(s) : s).then(l => i(l, o)).then(l => o.hooks ? o.hooks.processAllTokens(l) : l).then(l => o.walkTokens ? Promise.all(this.walkTokens(l, o.walkTokens)).then(() => l) : l).then(l => e(l, o)).then(l => o.hooks ? o.hooks.postprocess(l) : l).catch(a); + } + try { + if (o.hooks) { + s = o.hooks.preprocess(s); + } + let l = i(s, o); + if (o.hooks) { + l = o.hooks.processAllTokens(l); + } + if (o.walkTokens) { + this.walkTokens(l, o.walkTokens); + } + let c = e(l, o); + if (o.hooks) { + c = o.hooks.postprocess(c); + } + return c; + } catch (l) { + return a(l); + } + }; + } + onError(i, e) { + return t => { + t.message += ` +Please report this to https://github.com/markedjs/marked.`; + if (i) { + const s = "

    An error occurred:

    " + jT(t.message + "", true) + "
    "; + if (e) { + return Promise.resolve(s); + } else { + return s; + } + } + if (e) { + return Promise.reject(t); + } + throw t; + }; + } + }; + w7 = new Ict(); + th.options = th.setOptions = function (i) { + w7.setOptions(i); + th.defaults = w7.defaults; + rcs(th.defaults); + return th; + }; + th.getDefaults = LWt; + th.defaults = H4; + th.use = function (...i) { + w7.use(...i); + th.defaults = w7.defaults; + rcs(th.defaults); + return th; + }; + th.walkTokens = function (i, e) { + return w7.walkTokens(i, e); + }; + th.parseInline = w7.parseInline; + th.Parser = y7; + th.parser = y7.parse; + th.Renderer = Sz; + th.TextRenderer = Ect; + th.Lexer = v7; + th.lexer = v7.lex; + th.Tokenizer = Tme; + th.Hooks = Nme; + th.parse = th; + ZXn = th.options; + eQn = th.setOptions; + tQn = th.use; + Bcs = th.walkTokens; + iQn = th.parseInline; + VWt = th; + Ucs = y7.parse; + kie = v7.lex; + } +}); +function sQn(i, e = {}) { + const t = HWt(e); + t.textContent = i; + return t; +} +function xz(i, e = {}) { + const t = HWt(e); + Wcs(t, nQn(i, !!e.renderCodeSegments), e.actionHandler, e.renderCodeSegments); + return t; +} +function HWt(i) { + const e = i.inline ? "span" : "div"; + const t = document.createElement(e); + if (i.className) { + t.className = i.className; + } + return t; +} +function Wcs(i, e, t, s) { + let n; + if (e.type === 2) { + n = document.createTextNode(e.content || ""); + } else if (e.type === 3) { + n = document.createElement("b"); + } else if (e.type === 4) { + n = document.createElement("i"); + } else if (e.type === 7 && s) { + n = document.createElement("code"); + } else if (e.type === 5 && t) { + const r = document.createElement("a"); + t.disposables.add(ko(r, "click", o => { + t.callback(String(e.index), o); + })); + n = r; + } else if (e.type === 8) { + n = document.createElement("br"); + } else if (e.type === 1) { + n = i; + } + if (n && i !== n) { + i.appendChild(n); + } + if (n && Array.isArray(e.children)) { + e.children.forEach(r => { + Wcs(n, r, t, s); + }); + } +} +function nQn(i, e) { + const t = { + type: 1, + children: [] + }; + let s = 0; + let n = t; + const r = []; + const o = new Vcs(i); + while (!o.eos()) { + let a = o.next(); + const l = a === "\\" && qWt(o.peek(), e) !== 0; + if (l) { + a = o.next(); + } + if (!l && rQn(a, e) && a === o.peek()) { + o.advance(); + if (n.type === 2) { + n = r.pop(); + } + const c = qWt(a, e); + if (n.type === c || n.type === 5 && c === 6) { + n = r.pop(); + } else { + const u = { + type: c, + children: [] + }; + if (c === 5) { + u.index = s; + s++; + } + n.children.push(u); + r.push(n); + n = u; + } + } else if (a === ` +`) { + if (n.type === 2) { + n = r.pop(); + } + n.children.push({ + type: 8 + }); + } else if (n.type !== 2) { + const c = { + type: 2, + content: a + }; + n.children.push(c); + r.push(n); + n = c; + } else { + n.content += a; + } + } + if (n.type === 2) { + n = r.pop(); + } + r.length; + return t; +} +function rQn(i, e) { + return qWt(i, e) !== 0; +} +function qWt(i, e) { + switch (i) { + case "*": + return 3; + case "_": + return 4; + case "[": + return 5; + case "]": + return 6; + case "`": + if (e) { + return 7; + } else { + return 0; + } + default: + return 0; + } +} +var Vcs; +var Hcs; +var kz = ue({ + "out-build/vs/base/browser/formattedTextRenderer.js"() { + "use strict"; + + xe(); + Vcs = class { + constructor(i) { + this.b = i; + this.c = 0; + } + eos() { + return this.c >= this.b.length; + } + next() { + const i = this.peek(); + this.advance(); + return i; + } + peek() { + return this.b[this.c]; + } + advance() { + this.c++; + } + }; + (function (i) { + i[i.Invalid = 0] = "Invalid"; + i[i.Root = 1] = "Root"; + i[i.Text = 2] = "Text"; + i[i.Bold = 3] = "Bold"; + i[i.Italics = 4] = "Italics"; + i[i.Action = 5] = "Action"; + i[i.ActionClose = 6] = "ActionClose"; + i[i.Code = 7] = "Code"; + i[i.NewLine = 8] = "NewLine"; + })(Hcs ||= {}); + } +}); +function Vu(i) { + const e = new Array(); + let t; + let s = 0; + let n = 0; + while ((t = qcs.exec(i)) !== null) { + n = t.index || 0; + if (s < n) { + e.push(i.substring(s, n)); + } + s = (t.index || 0) + t[0].length; + const [, r, o, a] = t; + e.push(r ? `$(${o}${a ? `#${a}` : ""})` : Gp({ + id: o + }, a)); + } + if (s < i.length) { + e.push(i.substring(s)); + } + return e; +} +function Gp(i, e) { + const t = G("span"); + t.classList.add(...le.asClassNameArray(i)); + if (e) { + t.classList.add(e); + } + return t; +} +var qcs; +var vd = ue({ + "out-build/vs/base/browser/ui/iconLabel/iconLabels.js"() { + "use strict"; + + xe(); + Rt(); + qcs = new RegExp(`(\\\\)?\\$\\((${le.iconNameExpression}(?:${le.iconModifierExpression})?)(?:#([\\w-]+))?\\)`, "g"); + } +}); +function EF(i, e = {}, t = {}) { + const s = new Q(); + let n = false; + const r = HWt(e); + const { + renderer: o, + codeBlocks: a, + syncCodeBlocks: l + } = aQn(e, i); + const c = lQn(i); + let u; + if (e.fillInIncompleteTokens) { + const g = { + ...H4, + ...t, + renderer: o + }; + const p = kie(c, g); + const b = gQn(p); + u = Ucs(b, g); + } else { + u = VWt(c, { + ...t, + renderer: o, + async: false + }); + } + if (i.supportThemeIcons) { + u = Vu(u).map(p => typeof p == "string" ? p : p.outerHTML).join(""); + } + const h = new DOMParser().parseFromString(zWt({ + isTrusted: i.isTrusted, + ...e.sanitizerOptions + }, u), "text/html"); + oQn(i, e, h.body); + r.innerHTML = zWt({ + isTrusted: i.isTrusted, + ...e.sanitizerOptions + }, h.body.innerHTML); + if (a.length > 0) { + Promise.all(a).then(g => { + if (n) { + return; + } + const p = new Map(g); + const b = r.querySelectorAll("div[data-code]"); + for (const v of b) { + const y = p.get(v.dataset.code ?? ""); + if (y) { + mo(v, y); + } + } + e.asyncRenderCallback?.(); + }); + } else if (l.length > 0) { + const g = new Map(l); + const p = r.querySelectorAll("div[data-code]"); + for (const b of p) { + const v = g.get(b.dataset.code ?? ""); + if (v) { + mo(b, v); + } + } + } + if (e.asyncRenderCallback) { + for (const g of r.getElementsByTagName("img")) { + const p = s.add(Ce(g, "load", () => { + p.dispose(); + e.asyncRenderCallback(); + })); + } + } + if (e.actionHandler) { + const g = e.actionHandler.disposables.add(new Co(r, "click")); + const p = e.actionHandler.disposables.add(new Co(r, "auxclick")); + e.actionHandler.disposables.add(de.any(g.event, p.event)(b => { + const v = new Xc(Kt(r), b); + if (!!v.leftButton || !!v.middleButton) { + jcs(i, e, v); + } + })); + e.actionHandler.disposables.add(Ce(r, "keydown", b => { + const v = new wr(b); + if (!!v.equals(10) || !!v.equals(3)) { + jcs(i, e, v); + } + })); + } + return { + element: r, + dispose: () => { + n = true; + s.dispose(); + } + }; +} +function oQn(i, e, t) { + for (const s of t.querySelectorAll("img, audio, video, source")) { + const n = s.getAttribute("src"); + if (n) { + let r = n; + try { + if (i.baseUri) { + r = jWt(V.from(i.baseUri), r); + } + } catch {} + s.setAttribute("src", zcs(i, r, true)); + if (e.remoteImageIsAllowed) { + const o = V.parse(r); + if (o.scheme !== me.file && o.scheme !== me.data && !e.remoteImageIsAllowed(o)) { + s.replaceWith(G("", undefined, s.outerHTML)); + } + } + } + } + for (const s of t.querySelectorAll("a")) { + const n = s.getAttribute("href"); + s.setAttribute("href", ""); + if (!n || /^data:|javascript:/i.test(n) || /^command:/i.test(n) && !i.isTrusted || /^command:(\/\/\/)?_workbench\.downloadResource/i.test(n)) { + s.replaceWith(...s.childNodes); + } else { + let r = zcs(i, n, false); + if (i.baseUri) { + r = jWt(V.from(i.baseUri), n); + } + s.dataset.href = r; + } + } +} +function aQn(i, e) { + const t = new Sz(); + t.image = Tct.image; + t.link = Tct.link; + t.paragraph = Tct.paragraph; + const s = []; + const n = []; + if (i.codeBlockRendererSync) { + t.code = ({ + text: r, + lang: o, + raw: a + }) => { + const l = wz.nextId(); + const c = i.codeBlockRendererSync(Jcs(o), r, a); + n.push([l, c]); + return `
    ${Ol(r)}
    `; + }; + } else if (i.codeBlockRenderer) { + t.code = ({ + text: r, + lang: o + }) => { + const a = wz.nextId(); + const l = i.codeBlockRenderer(Jcs(o), r); + s.push(l.then(c => [a, c])); + return `
    ${Ol(r)}
    `; + }; + } + if (!e.supportHtml) { + t.html = ({ + text: r + }) => i.sanitizerOptions?.replaceWithPlaintext ? Ol(r) : (e.isTrusted ? r.match(/^(]+>)|(<\/\s*span>)$/) : undefined) ? r : ""; + } + return { + renderer: t, + codeBlocks: s, + syncCodeBlocks: n + }; +} +function lQn(i) { + let e = i.value; + if (e.length > 100000) { + e = `${e.substr(0, 100000)}\u2026`; + } + if (i.supportThemeIcons) { + e = KXn(e); + } + return e; +} +function jcs(i, e, t) { + const s = t.target.closest("a[data-href]"); + if (Bl(s)) { + try { + let n = s.dataset.href; + if (n) { + if (i.baseUri) { + n = jWt(V.from(i.baseUri), n); + } + e.actionHandler.callback(n, t); + } + } catch (n) { + xs(n); + } finally { + t.preventDefault(); + } + } +} +function cQn(i, e) { + let t; + try { + t = VI(decodeURIComponent(e)); + } catch {} + if (t) { + t = Uee(t, s => { + if (i.uris && i.uris[s]) { + return V.revive(i.uris[s]); + } + }); + return encodeURIComponent(JSON.stringify(t)); + } else { + return e; + } +} +function zcs(i, e, t) { + const s = i.uris && i.uris[e]; + let n = V.revive(s); + if (t) { + if (e.startsWith(me.data + ":")) { + return e; + } else { + n ||= V.parse(e); + return Na.uriToBrowserUri(n).toString(true); + } + } else if (!n || V.parse(e).toString() === n.toString()) { + return e; + } else { + if (n.query) { + n = n.with({ + query: cQn(i, n.query) + }); + } + return n.toString(); + } +} +function Jcs(i) { + if (!i) { + return ""; + } + const e = i.split(/[\s+|:|,|\{|\?]/, 1); + if (e.length) { + return e[0]; + } else { + return i; + } +} +function jWt(i, e) { + if (/^\w[\w\d+.-]*:/.test(e)) { + return e; + } else if (i.path.endsWith("/")) { + return B4t(i, e).toString(); + } else { + return B4t(Ir(i), e).toString(); + } +} +function zWt(i, e) { + const { + config: t, + allowedSchemes: s + } = uQn(i); + const n = new Q(); + n.add(Ycs("uponSanitizeAttribute", (r, o) => { + if (o.attrName === "style" || o.attrName === "class") { + if (r.tagName === "SPAN") { + if (o.attrName === "style") { + o.keepAttr = /^(color\:(#[0-9a-fA-F]+|var\(--vscode(-[a-zA-Z0-9]+)+\));)?(background-color\:(#[0-9a-fA-F]+|var\(--vscode(-[a-zA-Z0-9]+)+\));)?(border-radius:[0-9]+px;)?$/.test(o.attrValue); + return; + } else if (o.attrName === "class") { + o.keepAttr = /^codicon codicon-[a-z\-]+( codicon-modifier-[a-z\-]+)?$/.test(o.attrValue); + return; + } + } + o.keepAttr = false; + return; + } else if (r.tagName === "INPUT" && r.attributes.getNamedItem("type")?.value === "checkbox") { + if (o.attrName === "type" && o.attrValue === "checkbox" || o.attrName === "disabled" || o.attrName === "checked") { + o.keepAttr = true; + return; + } + o.keepAttr = false; + } + })); + n.add(Ycs("uponSanitizeElement", (r, o) => { + if (o.tagName === "input") { + if (r.attributes.getNamedItem("type")?.value === "checkbox") { + r.setAttribute("disabled", ""); + } else if (!i.replaceWithPlaintext) { + r.remove(); + } + } + if (i.replaceWithPlaintext && !o.allowedTags[o.tagName] && o.tagName !== "body" && r.parentElement) { + let a; + let l; + if (o.tagName === "#comment") { + a = ``; + } else { + const h = Xcs.includes(o.tagName); + const g = r.attributes.length ? " " + Array.from(r.attributes).map(p => `${p.name}="${p.value}"`).join(" ") : ""; + a = `<${o.tagName}${g}>`; + if (!h) { + l = ``; + } + } + const c = document.createDocumentFragment(); + const u = r.parentElement.ownerDocument.createTextNode(a); + c.appendChild(u); + const d = l ? r.parentElement.ownerDocument.createTextNode(l) : undefined; + while (r.firstChild) { + c.appendChild(r.firstChild); + } + if (d) { + c.appendChild(d); + } + if (r.nodeType === Node.COMMENT_NODE) { + r.parentElement.insertBefore(c, r); + } else { + r.parentElement.replaceChild(c, r); + } + } + })); + n.add(x6t(s)); + try { + return H2.sanitize(e, { + ...t, + RETURN_TRUSTED_TYPE: true + }); + } finally { + n.dispose(); + } +} +function uQn(i) { + const e = [me.http, me.https, me.mailto, me.data, me.file, me.vscodeFileResource, me.vscodeRemote, me.vscodeRemoteResource]; + if (i.isTrusted) { + e.push(me.command); + } + return { + config: { + ALLOWED_TAGS: i.allowedTags ?? [...R6t], + ALLOWED_ATTR: JWt, + ALLOW_UNKNOWN_PROTOCOLS: true + }, + allowedSchemes: e + }; +} +function Ez(i) { + if (typeof i == "string") { + return i; + } else { + return Iz(i); + } +} +function Iz(i, e) { + let t = i.value ?? ""; + if (t.length > 100000) { + t = `${t.substr(0, 100000)}\u2026`; + } + const s = VWt(t, { + async: false, + renderer: e ? eus.value : Zcs.value + }); + return zWt({ + isTrusted: false + }, s).toString().replace(/&(#\d+|[a-zA-Z]+);/g, n => Qcs.get(n) ?? n).trim(); +} +function Gcs() { + const i = new Sz(); + i.code = ({ + text: e + }) => Ol(e); + i.blockquote = ({ + text: e + }) => `${e} +`; + i.html = e => ""; + i.heading = function ({ + tokens: e + }) { + return `${this.parser.parseInline(e)} +`; + }; + i.hr = () => ""; + i.list = function ({ + items: e + }) { + return `${e.map(t => this.listitem(t)).join(` +`)} +`; + }; + i.listitem = ({ + text: e + }) => `${e} +`; + i.paragraph = function ({ + tokens: e + }) { + return `${this.parser.parseInline(e)} +`; + }; + i.table = function ({ + header: e, + rows: t + }) { + return `${e.map(s => this.tablecell(s)).join(" ")} +${t.map(s => s.map(n => this.tablecell(n)).join(" ")).join(` +`)} +`; + }; + i.tablerow = ({ + text: e + }) => e; + i.tablecell = function ({ + tokens: e + }) { + return this.parser.parseInline(e); + }; + i.strong = ({ + text: e + }) => e; + i.em = ({ + text: e + }) => e; + i.codespan = ({ + text: e + }) => Ol(e); + i.br = e => ` +`; + i.del = ({ + text: e + }) => e; + i.image = e => ""; + i.text = ({ + text: e + }) => e; + i.link = ({ + text: e + }) => e; + return i; +} +function Dct(i) { + let e = ""; + i.forEach(t => { + e += t.raw; + }); + return e; +} +function Kcs(i) { + if (i.tokens) { + for (let e = i.tokens.length - 1; e >= 0; e--) { + const t = i.tokens[e]; + if (t.type === "text") { + const s = t.raw.split(` +`); + const n = s[s.length - 1]; + if (n.includes("`")) { + return mQn(i); + } + if (n.includes("**")) { + return SQn(i); + } + if (n.match(/\*\w/)) { + return bQn(i); + } + if (n.match(/(^|\s)__\w/)) { + return xQn(i); + } + if (n.match(/(^|\s)_\w/)) { + return vQn(i); + } + if (dQn(n) || hQn(n) && i.tokens.slice(0, e).some(r => r.type === "text" && r.raw.match(/\[[^\]]*$/))) { + const r = i.tokens.slice(e + 1); + if (r[0]?.type === "link" && r[1]?.type === "text" && r[1].raw.match(/^ *"[^"]*$/) || n.match(/^[^"]* +"[^"]*$/)) { + return wQn(i); + } else { + return yQn(i); + } + } else if (n.match(/(^|\s)\[\w*/)) { + return CQn(i); + } + } + } + } +} +function dQn(i) { + return !!i.match(/(^|\s)\[.*\]\(\w*/); +} +function hQn(i) { + return !!i.match(/^[^\[]*\]\([^\)]*$/); +} +function fQn(i) { + const e = i.items[i.items.length - 1]; + const t = e.tokens ? e.tokens[e.tokens.length - 1] : undefined; + let s; + if (t?.type === "text" && !("inRawBlock" in e)) { + s = Kcs(t); + } + if (!s || s.type !== "paragraph") { + return; + } + const n = Dct(i.items.slice(0, -1)); + const r = e.raw.match(/^(\s*(-|\d+\.|\*) +)/)?.[0]; + if (!r) { + return; + } + const o = r + Dct(e.tokens.slice(0, -1)) + s.raw; + const a = kie(n + o)[0]; + if (a.type === "list") { + return a; + } +} +function gQn(i) { + for (let e = 0; e < tus; e++) { + const t = pQn(i); + if (t) { + i = t; + } else { + break; + } + } + return i; +} +function pQn(i) { + let e; + let t; + for (e = 0; e < i.length; e++) { + const s = i[e]; + if (s.type === "paragraph" && s.raw.match(/(\n|^)\|/)) { + t = kQn(i.slice(e)); + break; + } + if (e === i.length - 1 && s.type === "list") { + const n = fQn(s); + if (n) { + t = [n]; + break; + } + } + if (e === i.length - 1 && s.type === "paragraph") { + const n = Kcs(s); + if (n) { + t = [n]; + break; + } + } + } + if (t) { + const s = [...i.slice(0, e), ...t]; + s.links = i.links; + return s; + } + return null; +} +function mQn(i) { + return C7(i, "`"); +} +function bQn(i) { + return C7(i, "*"); +} +function vQn(i) { + return C7(i, "_"); +} +function yQn(i) { + return C7(i, ")"); +} +function wQn(i) { + return C7(i, "\")"); +} +function CQn(i) { + return C7(i, "](https://microsoft.com)"); +} +function SQn(i) { + return C7(i, "**"); +} +function xQn(i) { + return C7(i, "__"); +} +function C7(i, e) { + const t = Dct(Array.isArray(i) ? i : [i]); + return kie(t + e)[0]; +} +function kQn(i) { + const e = Dct(i); + const t = e.split(` +`); + let s; + let n = false; + for (let r = 0; r < t.length; r++) { + const o = t[r].trim(); + if (typeof s === "undefined" && o.match(/^\s*\|/)) { + const a = o.match(/(\|[^\|]+)(?=\||$)/g); + if (a) { + s = a.length; + } + } else if (typeof s == "number") { + if (o.match(/^\s*\|/)) { + if (r !== t.length - 1) { + return; + } + n = true; + } else { + return; + } + } + } + if (typeof s == "number" && s > 0) { + const r = n ? t.slice(0, -1).join(` +`) : e; + const o = !!r.match(/\|\s*$/); + const a = `${r + (o ? "" : "|")} +|${" --- |".repeat(s)}`; + return kie(a); + } +} +function Ycs(i, e) { + H2.addHook(i, e); + return Ue(() => H2.removeHook(i)); +} +var Tct; +var Xcs; +var JWt; +var Qcs; +var Zcs; +var eus; +var tus; +var qy = ue({ + "out-build/vs/base/browser/markdownRenderer.js"() { + "use strict"; + + Ut(); + pe(); + No(); + Q0(); + Cz(); + pu(); + q(); + kF(); + yg(); + At(); + Jr(); + Et(); + $i(); + Le(); + xe(); + Rfe(); + q0(); + kz(); + _a(); + gd(); + vd(); + Tct = Object.freeze({ + image: ({ + href: i, + title: e, + text: t + }) => { + let s = []; + let n = []; + if (i) { + ({ + href: i, + dimensions: s + } = scs(i)); + n.push(`src="${bct(i)}"`); + } + if (t) { + n.push(`alt="${bct(t)}"`); + } + if (e) { + n.push(`title="${bct(e)}"`); + } + if (s.length) { + n = n.concat(s); + } + return ""; + }, + paragraph({ + tokens: i + }) { + return `

    ${this.parser.parseInline(i)}

    `; + }, + link({ + href: i, + title: e, + tokens: t + }) { + let s = this.parser.parseInline(t); + if (typeof i != "string") { + return ""; + } else { + if (i === s) { + s = PWt(s); + } + e = typeof e == "string" ? bct(PWt(e)) : ""; + i = PWt(i); + i = i.replace(/&/g, "&").replace(//g, ">").replace(/"/g, """).replace(/'/g, "'"); + return `
    ${s}`; + } + } + }); + Xcs = ["area", "base", "br", "col", "command", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]; + JWt = ["align", "autoplay", "alt", "checked", "class", "colspan", "controls", "data-code", "data-href", "disabled", "draggable", "height", "href", "loop", "muted", "playsinline", "poster", "rowspan", "src", "style", "target", "title", "type", "width", "start"]; + Qcs = new Map([[""", "\""], [" ", " "], ["&", "&"], ["'", "'"], ["<", "<"], [">", ">"]]); + Zcs = new ol(Gcs); + eus = new ol(() => { + const i = Gcs(); + i.code = ({ + text: e + }) => ` +\`\`\` +${Ol(e)} +\`\`\` +`; + return i; + }); + tus = 3; + } +}); +function EQn(i) { + GWt = i; +} +function d1() { + return GWt; +} +var GWt; +var aS = ue({ + "out-build/vs/base/browser/ui/hover/hoverDelegate2.js"() { + "use strict"; + + q(); + GWt = { + showHover: () => {}, + showDelayedHover: () => {}, + setupDelayedHover: () => H.None, + setupDelayedHoverAtMouse: () => H.None, + hideHover: () => {}, + showAndFocusLastHover: () => {}, + setupManagedHover: () => null, + showManagedHover: () => {} + }; + } +}); +var IQn = ue({ + "out-build/vs/base/browser/ui/selectBox/selectBoxCustom.css"() {} +}); +var S7; +var KWt; +var ius; +var sus; +var DQn = ue({ + "out-build/vs/base/browser/ui/selectBox/selectBoxCustom.js"() { + "use strict"; + + xe(); + md(); + wb(); + q0(); + _a(); + qy(); + aS(); + oa(); + oS(); + Jt(); + pe(); + Yc(); + q(); + rt(); + IQn(); + X(); + S7 = G; + KWt = "selectOption.entry.template"; + ius = class { + get templateId() { + return KWt; + } + renderTemplate(i) { + const e = Object.create(null); + e.root = i; + e.text = z(i, S7(".option-text")); + e.detail = z(i, S7(".option-detail")); + e.decoratorRight = z(i, S7(".option-decorator-right")); + return e; + } + renderElement(i, e, t) { + const s = t; + const n = i.text; + const r = i.detail; + const o = i.decoratorRight; + const a = i.isDisabled; + s.text.textContent = n; + s.detail.textContent = r || ""; + s.decoratorRight.innerText = o || ""; + if (a) { + s.root.classList.add("option-disabled"); + } else { + s.root.classList.remove("option-disabled"); + } + } + disposeTemplate(i) {} + }; + sus = class Tde extends H { + static { + this.a = 32; + } + static { + this.b = 2; + } + static { + this.c = 3; + } + constructor(e, t, s, n, r) { + super(); + this.m = []; + this.F = 0; + this.H = false; + this.J = false; + this.N = false; + this.f = false; + this.r = n; + this.g = r || Object.create(null); + if (typeof this.g.minBottomMargin != "number") { + this.g.minBottomMargin = Tde.a; + } else if (this.g.minBottomMargin < 0) { + this.g.minBottomMargin = 0; + } + this.h = document.createElement("select"); + this.h.className = "monaco-select-box monaco-select-box-dropdown-padding"; + if (typeof this.g.ariaLabel == "string") { + this.h.setAttribute("aria-label", this.g.ariaLabel); + } + if (typeof this.g.ariaDescription == "string") { + this.h.setAttribute("aria-description", this.g.ariaDescription); + } + this.q = new B(); + this.D(this.q); + this.Q(); + this.P(s); + this.n = t || 0; + if (e) { + this.setOptions(e, t); + } + this.S(); + } + O(e) { + if (!this.M && e) { + this.M = this.D(d1().setupManagedHover(cr("mouse"), this.h, e)); + } else if (this.M) { + this.M.update(e); + } + } + getHeight() { + return 22; + } + getTemplateId() { + return KWt; + } + P(e) { + this.t = e; + this.u = G(".monaco-select-box-dropdown-container"); + this.u.classList.add("monaco-select-box-dropdown-padding"); + this.I = z(this.u, S7(".select-box-details-pane")); + const t = z(this.u, S7(".select-box-dropdown-container-width-control")); + const s = z(t, S7(".width-control-div")); + this.C = document.createElement("span"); + this.C.className = "option-text-width-control"; + z(s, this.C); + this.G = 0; + this.w = pd(this.u); + this.u.setAttribute("draggable", "true"); + this.D(Ce(this.u, Oe.DRAG_START, n => { + yn.stop(n, true); + })); + } + Q() { + this.D(ko(this.h, "change", t => { + this.n = t.target.selectedIndex; + this.q.fire({ + index: t.target.selectedIndex, + selected: t.target.value + }); + if (this.m[this.n] && this.m[this.n].text) { + this.O(this.m[this.n].text); + } + })); + this.D(Ce(this.h, Oe.CLICK, t => { + yn.stop(t); + if (this.f) { + this.Z(true); + } else { + this.Y(); + } + })); + this.D(Ce(this.h, Oe.MOUSE_DOWN, t => { + yn.stop(t); + })); + let e; + this.D(Ce(this.h, "touchstart", t => { + e = this.f; + })); + this.D(Ce(this.h, "touchend", t => { + yn.stop(t); + if (e) { + this.Z(true); + } else { + this.Y(); + } + })); + this.D(Ce(this.h, Oe.KEY_DOWN, t => { + const s = new wr(t); + let n = false; + if (Gt) { + if (s.keyCode === 18 || s.keyCode === 16 || s.keyCode === 10 || s.keyCode === 3) { + n = true; + } + } else if (s.keyCode === 18 && s.altKey || s.keyCode === 16 && s.altKey || s.keyCode === 10 || s.keyCode === 3) { + n = true; + } + if (n) { + this.Y(); + yn.stop(t, true); + } + })); + } + get onDidSelect() { + return this.q.event; + } + setOptions(e, t) { + if (!Go(this.m, e)) { + this.m = e; + this.h.options.length = 0; + this.H = false; + this.L = undefined; + this.m.forEach((s, n) => { + this.h.add(this.X(s.text, n, s.isDisabled)); + if (typeof s.description == "string") { + this.H = true; + } + }); + } + if (t !== undefined) { + this.select(t); + this.F = this.n; + } + } + setEnabled(e) { + this.h.disabled = !e; + } + R() { + this.y?.splice(0, this.y.length, this.m); + } + select(e) { + if (e >= 0 && e < this.m.length) { + this.n = e; + } else if (e > this.m.length - 1) { + this.select(this.m.length - 1); + } else if (this.n < 0) { + this.n = 0; + } + this.h.selectedIndex = this.n; + if (this.m[this.n] && this.m[this.n].text) { + this.O(this.m[this.n].text); + } + } + setAriaLabel(e) { + this.g.ariaLabel = e; + this.h.setAttribute("aria-label", this.g.ariaLabel); + } + focus() { + if (this.h) { + this.h.tabIndex = 0; + this.h.focus(); + } + } + blur() { + if (this.h) { + this.h.tabIndex = -1; + this.h.blur(); + } + } + setFocusable(e) { + this.h.tabIndex = e ? 0 : -1; + } + render(e) { + this.j = e; + e.classList.add("select-container"); + e.appendChild(this.h); + this.U(); + } + S() { + const e = []; + if (this.r.listFocusBackground) { + e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { background-color: ${this.r.listFocusBackground} !important; }`); + } + if (this.r.listFocusForeground) { + e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { color: ${this.r.listFocusForeground} !important; }`); + } + if (this.r.decoratorRightForeground) { + e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.focused) .option-decorator-right { color: ${this.r.decoratorRightForeground}; }`); + } + if (this.r.selectBackground && this.r.selectBorder && this.r.selectBorder !== this.r.selectBackground) { + e.push(`.monaco-select-box-dropdown-container { border: 1px solid ${this.r.selectBorder} } `); + e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-top { border-top: 1px solid ${this.r.selectBorder} } `); + e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-bottom { border-bottom: 1px solid ${this.r.selectBorder} } `); + } else if (this.r.selectListBorder) { + e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-top { border-top: 1px solid ${this.r.selectListBorder} } `); + e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-bottom { border-bottom: 1px solid ${this.r.selectListBorder} } `); + } + if (this.r.listHoverForeground) { + e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { color: ${this.r.listHoverForeground} !important; }`); + } + if (this.r.listHoverBackground) { + e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { background-color: ${this.r.listHoverBackground} !important; }`); + } + if (this.r.listFocusOutline) { + e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { outline: 1.6px dotted ${this.r.listFocusOutline} !important; outline-offset: -1.6px !important; }`); + } + if (this.r.listHoverOutline) { + e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { outline: 1.6px dashed ${this.r.listHoverOutline} !important; outline-offset: -1.6px !important; }`); + } + e.push(".monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.option-disabled.focused { background-color: transparent !important; color: inherit !important; outline: none !important; }"); + e.push(".monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.option-disabled:hover { background-color: transparent !important; color: inherit !important; outline: none !important; }"); + this.w.textContent = e.join(` +`); + } + U() { + const e = this.r.selectBackground ?? ""; + const t = this.r.selectForeground ?? ""; + const s = this.r.selectBorder ?? ""; + this.h.style.backgroundColor = e; + this.h.style.color = t; + this.h.style.borderColor = s; + } + W() { + const e = this.r.selectBackground ?? ""; + const t = CF(this.r.selectListBackground, e); + this.z.style.backgroundColor = t; + this.I.style.backgroundColor = t; + const s = this.r.focusBorder ?? ""; + this.u.style.outlineColor = s; + this.u.style.outlineOffset = "-1px"; + this.y.style(this.r); + } + X(e, t, s) { + const n = document.createElement("option"); + n.value = e; + n.text = e; + n.disabled = !!s; + return n; + } + Y() { + this.I.innerText = ""; + if (!!this.t && !this.f) { + this.eb(this.u); + this.R(); + this.t.showContextView({ + getAnchor: () => this.h, + render: e => this.ab(e, true), + layout: () => { + this.cb(); + }, + onHide: () => { + this.u.classList.remove("visible"); + this.h.classList.remove("synthetic-focus"); + }, + anchorPosition: this.G + }, this.g.optionsAsChildren ? this.j : undefined); + this.f = true; + this.Z(false); + this.t.showContextView({ + getAnchor: () => this.h, + render: e => this.ab(e), + layout: () => this.cb(), + onHide: () => { + this.u.classList.remove("visible"); + this.h.classList.remove("synthetic-focus"); + }, + anchorPosition: this.G + }, this.g.optionsAsChildren ? this.j : undefined); + this.F = this.n; + this.f = true; + this.h.setAttribute("aria-expanded", "true"); + } + } + Z(e) { + if (!!this.t && !!this.f) { + this.f = false; + this.h.setAttribute("aria-expanded", "false"); + if (e) { + this.h.focus(); + } + this.t.hideContextView(); + } + } + ab(e, t) { + e.appendChild(this.u); + this.cb(t); + return { + dispose: () => { + this.u.remove(); + } + }; + } + bb() { + let e = 0; + this.m.forEach((t, s) => { + this.jb(s); + if (this.I.offsetHeight > e) { + e = this.I.offsetHeight; + } + }); + return e; + } + cb(e) { + if (this.J) { + return false; + } + if (this.y) { + this.u.classList.add("visible"); + const t = Kt(this.h); + const s = sd(this.h); + const n = Kt(this.h).getComputedStyle(this.h); + const r = parseFloat(n.getPropertyValue("--dropdown-padding-top")) + parseFloat(n.getPropertyValue("--dropdown-padding-bottom")); + const o = t.innerHeight - s.top - s.height - (this.g.minBottomMargin || 0); + const a = s.top - Tde.b; + const l = this.h.offsetWidth; + const c = this.db(this.C); + const u = Math.max(c, Math.round(l)).toString() + "px"; + this.u.style.width = u; + this.y.getHTMLElement().style.height = ""; + this.y.layout(); + let d = this.y.contentHeight; + if (this.H && this.L === undefined) { + this.L = this.bb(); + } + const h = this.H ? this.L : 0; + const g = d + r + h; + const p = Math.floor((o - r - h) / this.getHeight()); + const b = Math.floor((a - r - h) / this.getHeight()); + if (e) { + if (s.top + s.height > t.innerHeight - 22 || s.top < Tde.b || p < 1 && b < 1) { + return false; + } else { + if (p < Tde.c && b > p && this.m.length > p) { + this.G = 1; + this.z.remove(); + this.I.remove(); + this.u.appendChild(this.I); + this.u.appendChild(this.z); + this.I.classList.remove("border-top"); + this.I.classList.add("border-bottom"); + } else { + this.G = 0; + this.z.remove(); + this.I.remove(); + this.u.appendChild(this.z); + this.u.appendChild(this.I); + this.I.classList.remove("border-bottom"); + this.I.classList.add("border-top"); + } + return true; + } + } + if (s.top + s.height > t.innerHeight - 22 || s.top < Tde.b || this.G === 0 && p < 1 || this.G === 1 && b < 1) { + this.Z(true); + return false; + } + if (this.G === 0) { + if (this.f && p + b < 1) { + this.Z(true); + return false; + } + if (g > o) { + d = p * this.getHeight(); + } + } else if (g > a) { + d = b * this.getHeight(); + } + this.y.layout(d); + this.y.domFocus(); + if (this.y.length > 0) { + this.y.setFocus([this.n || 0]); + this.y.reveal(this.y.getFocus()[0] || 0); + } + if (this.H) { + this.y.getHTMLElement().style.height = d + r + "px"; + this.u.style.height = ""; + } else { + this.u.style.height = d + r + "px"; + } + this.jb(this.n); + this.u.style.width = u; + this.z.setAttribute("tabindex", "0"); + this.h.classList.add("synthetic-focus"); + this.u.classList.add("synthetic-focus"); + return true; + } else { + return false; + } + } + db(e) { + let t = 0; + if (e) { + let s = 0; + let n = 0; + this.m.forEach((r, o) => { + const a = r.detail ? r.detail.length : 0; + const l = r.decoratorRight ? r.decoratorRight.length : 0; + const c = r.text.length + a + l; + if (c > n) { + s = o; + n = c; + } + }); + e.textContent = this.m[s].text + (this.m[s].decoratorRight ? this.m[s].decoratorRight + " " : ""); + t = qp(e); + } + return t; + } + eb(e) { + if (this.y) { + return; + } + this.z = z(e, S7(".select-box-dropdown-list-container")); + this.s = new ius(); + this.y = this.D(new Cg("SelectBoxCustom", this.z, this, [this.s], { + useShadows: false, + verticalScrollMode: 3, + keyboardSupport: false, + mouseSupport: false, + accessibilityProvider: { + getAriaLabel: n => { + let r = n.text; + if (n.detail) { + r += `. ${n.detail}`; + } + if (n.decoratorRight) { + r += `. ${n.decoratorRight}`; + } + if (n.description) { + r += `. ${n.description}`; + } + return r; + }, + getWidgetAriaLabel: () => f(28, null), + getRole: () => Gt ? "" : "option", + getWidgetRole: () => "listbox" + } + })); + if (this.g.ariaLabel) { + this.y.ariaLabel = this.g.ariaLabel; + } + const t = this.D(new Co(this.z, "keydown")); + const s = de.chain(t.event, n => n.filter(() => this.y.length > 0).map(r => new wr(r))); + this.D(de.chain(s, n => n.filter(r => r.keyCode === 3))(this.lb, this)); + this.D(de.chain(s, n => n.filter(r => r.keyCode === 2))(this.lb, this)); + this.D(de.chain(s, n => n.filter(r => r.keyCode === 9))(this.kb, this)); + this.D(de.chain(s, n => n.filter(r => r.keyCode === 16))(this.nb, this)); + this.D(de.chain(s, n => n.filter(r => r.keyCode === 18))(this.mb, this)); + this.D(de.chain(s, n => n.filter(r => r.keyCode === 12))(this.pb, this)); + this.D(de.chain(s, n => n.filter(r => r.keyCode === 11))(this.ob, this)); + this.D(de.chain(s, n => n.filter(r => r.keyCode === 14))(this.qb, this)); + this.D(de.chain(s, n => n.filter(r => r.keyCode === 13))(this.rb, this)); + this.D(de.chain(s, n => n.filter(r => r.keyCode >= 21 && r.keyCode <= 56 || r.keyCode >= 85 && r.keyCode <= 113))(this.sb, this)); + this.D(Ce(this.y.getHTMLElement(), Oe.POINTER_UP, n => this.fb(n))); + this.D(this.y.onMouseOver(n => typeof n.index !== "undefined" && this.y.setFocus([n.index]))); + this.D(this.y.onDidChangeFocus(n => this.ib(n))); + this.D(Ce(this.u, Oe.FOCUS_OUT, n => { + if (!!this.f && !Kd(n.relatedTarget, this.u)) { + this.gb(); + } + })); + this.y.getHTMLElement().setAttribute("aria-label", this.g.ariaLabel || ""); + this.y.getHTMLElement().setAttribute("aria-expanded", "true"); + this.W(); + } + fb(e) { + if (!this.y.length) { + return; + } + yn.stop(e); + const t = e.target; + if (!t || t.classList.contains("slider")) { + return; + } + const s = t.closest(".monaco-list-row"); + if (!s) { + return; + } + const n = Number(s.getAttribute("data-index")); + const r = s.classList.contains("option-disabled"); + if (n >= 0 && n < this.m.length && !r) { + this.n = n; + this.select(this.n); + this.y.setFocus([this.n]); + this.y.reveal(this.y.getFocus()[0]); + if (this.n !== this.F) { + this.F = this.n; + this.q.fire({ + index: this.h.selectedIndex, + selected: this.m[this.n].text + }); + if (this.m[this.n] && this.m[this.n].text) { + this.O(this.m[this.n].text); + } + } + this.Z(true); + } + } + gb() { + if (!this.N) { + if (this.n !== this.F) { + this.select(this.F); + } + this.Z(false); + } + } + hb(e, t) { + const s = r => { + for (let o = 0; o < r.childNodes.length; o++) { + const a = r.childNodes.item(o); + if ((a.tagName && a.tagName.toLowerCase()) === "img") { + a.remove(); + } else { + s(a); + } + } + }; + const n = EF({ + value: e, + supportThemeIcons: true + }, { + actionHandler: t + }); + n.element.classList.add("select-box-description-markdown"); + s(n.element); + return n.element; + } + ib(e) { + if (!!this.f && !!this.H) { + this.jb(e.indexes[0]); + } + } + jb(e) { + this.I.innerText = ""; + const t = this.m[e]; + const s = t?.description ?? ""; + const n = t?.descriptionIsMarkdown ?? false; + if (s) { + if (n) { + const r = t.descriptionMarkdownActionHandler; + this.I.appendChild(this.hb(s, r)); + } else { + this.I.innerText = s; + } + this.I.style.display = "block"; + } else { + this.I.style.display = "none"; + } + this.J = true; + this.t.layout(); + this.J = false; + } + kb(e) { + yn.stop(e); + this.select(this.F); + this.Z(true); + } + lb(e) { + yn.stop(e); + if (this.n !== this.F) { + this.F = this.n; + this.q.fire({ + index: this.h.selectedIndex, + selected: this.m[this.n].text + }); + if (this.m[this.n] && this.m[this.n].text) { + this.O(this.m[this.n].text); + } + } + this.Z(true); + } + mb(e) { + if (this.n < this.m.length - 1) { + yn.stop(e, true); + const t = this.m[this.n + 1].isDisabled; + if (t && this.m.length > this.n + 2) { + this.n += 2; + } else { + if (t) { + return; + } + this.n++; + } + this.select(this.n); + this.y.setFocus([this.n]); + this.y.reveal(this.y.getFocus()[0]); + } + } + nb(e) { + if (this.n > 0) { + yn.stop(e, true); + if (this.m[this.n - 1].isDisabled && this.n > 1) { + this.n -= 2; + } else { + this.n--; + } + this.select(this.n); + this.y.setFocus([this.n]); + this.y.reveal(this.y.getFocus()[0]); + } + } + ob(e) { + yn.stop(e); + this.y.focusPreviousPage(); + setTimeout(() => { + this.n = this.y.getFocus()[0]; + if (this.m[this.n].isDisabled && this.n < this.m.length - 1) { + this.n++; + this.y.setFocus([this.n]); + } + this.y.reveal(this.n); + this.select(this.n); + }, 1); + } + pb(e) { + yn.stop(e); + this.y.focusNextPage(); + setTimeout(() => { + this.n = this.y.getFocus()[0]; + if (this.m[this.n].isDisabled && this.n > 0) { + this.n--; + this.y.setFocus([this.n]); + } + this.y.reveal(this.n); + this.select(this.n); + }, 1); + } + qb(e) { + yn.stop(e); + if (!(this.m.length < 2)) { + this.n = 0; + if (this.m[this.n].isDisabled && this.n > 1) { + this.n++; + } + this.y.setFocus([this.n]); + this.y.reveal(this.n); + this.select(this.n); + } + } + rb(e) { + yn.stop(e); + if (!(this.m.length < 2)) { + this.n = this.m.length - 1; + if (this.m[this.n].isDisabled && this.n > 1) { + this.n--; + } + this.y.setFocus([this.n]); + this.y.reveal(this.n); + this.select(this.n); + } + } + sb(e) { + const t = Hp.toString(e.keyCode); + let s = -1; + for (let n = 0; n < this.m.length - 1; n++) { + s = (n + this.n + 1) % this.m.length; + if (this.m[s].text.charAt(0).toUpperCase() === t && !this.m[s].isDisabled) { + this.select(s); + this.y.setFocus([s]); + this.y.reveal(this.y.getFocus()[0]); + yn.stop(e); + break; + } + } + } + dispose() { + this.Z(false); + super.dispose(); + } + }; + } +}); +var nus; +var TQn = ue({ + "out-build/vs/base/browser/ui/selectBox/selectBoxNative.js"() { + "use strict"; + + xe(); + hh(); + Jt(); + pe(); + q(); + rt(); + nus = class extends H { + constructor(i, e, t, s) { + super(); + this.f = 0; + this.b = s || Object.create(null); + this.c = []; + this.a = document.createElement("select"); + this.a.className = "monaco-select-box"; + if (typeof this.b.ariaLabel == "string") { + this.a.setAttribute("aria-label", this.b.ariaLabel); + } + if (typeof this.b.ariaDescription == "string") { + this.a.setAttribute("aria-description", this.b.ariaDescription); + } + this.g = this.D(new B()); + this.h = t; + this.j(); + this.setOptions(i, e); + } + j() { + this.D(bd.addTarget(this.a)); + [ul.Tap].forEach(i => { + this.D(Ce(this.a, i, e => { + this.a.focus(); + })); + }); + this.D(ko(this.a, "click", i => { + yn.stop(i, true); + })); + this.D(ko(this.a, "change", i => { + this.a.title = i.target.value; + this.g.fire({ + index: i.target.selectedIndex, + selected: i.target.value + }); + })); + this.D(ko(this.a, "keydown", i => { + let e = false; + if (Gt) { + if (i.keyCode === 18 || i.keyCode === 16 || i.keyCode === 10) { + e = true; + } + } else if (i.keyCode === 18 && i.altKey || i.keyCode === 10 || i.keyCode === 3) { + e = true; + } + if (e) { + i.stopPropagation(); + } + })); + } + get onDidSelect() { + return this.g.event; + } + setOptions(i, e) { + if (!this.c || !Go(this.c, i)) { + this.c = i; + this.a.options.length = 0; + this.c.forEach((t, s) => { + this.a.add(this.m(t.text, s, t.isDisabled)); + }); + } + if (e !== undefined) { + this.select(e); + } + } + select(i) { + if (this.c.length === 0) { + this.f = 0; + } else if (i >= 0 && i < this.c.length) { + this.f = i; + } else if (i > this.c.length - 1) { + this.select(this.c.length - 1); + } else if (this.f < 0) { + this.f = 0; + } + this.a.selectedIndex = this.f; + if (this.f < this.c.length && typeof this.c[this.f].text == "string") { + this.a.title = this.c[this.f].text; + } else { + this.a.title = ""; + } + } + setAriaLabel(i) { + this.b.ariaLabel = i; + this.a.setAttribute("aria-label", i); + } + focus() { + if (this.a) { + this.a.tabIndex = 0; + this.a.focus(); + } + } + blur() { + if (this.a) { + this.a.tabIndex = -1; + this.a.blur(); + } + } + setEnabled(i) { + this.a.disabled = !i; + } + setFocusable(i) { + this.a.tabIndex = i ? 0 : -1; + } + render(i) { + i.classList.add("select-container"); + i.appendChild(this.a); + this.setOptions(this.c, this.f); + this.applyStyles(); + } + style(i) { + this.h = i; + this.applyStyles(); + } + applyStyles() { + if (this.a) { + this.a.style.backgroundColor = this.h.selectBackground ?? ""; + this.a.style.color = this.h.selectForeground ?? ""; + this.a.style.borderColor = this.h.selectBorder ?? ""; + } + } + m(i, e, t) { + const s = document.createElement("option"); + s.value = i; + s.text = i; + s.disabled = !!t; + return s; + } + }; + } +}); +var PQn = ue({ + "out-build/vs/base/browser/ui/selectBox/selectBox.css"() {} +}); +var LQn; +var q4; +var Dz = ue({ + "out-build/vs/base/browser/ui/selectBox/selectBox.js"() { + "use strict"; + + oS(); + DQn(); + TQn(); + bb(); + rt(); + PQn(); + LQn = { + ...IWt, + selectBackground: "#3C3C3C", + selectForeground: "#F0F0F0", + selectBorder: "#3C3C3C", + decoratorRightForeground: undefined, + selectListBackground: undefined, + selectListBorder: undefined, + focusBorder: undefined + }; + q4 = class extends Gg { + constructor(i, e, t, s, n) { + super(); + if (Gt && !n?.useCustomDrawn) { + this.a = new nus(i, e, s, n); + } else { + this.a = new sus(i, e, t, s, n); + } + this.D(this.a); + } + get onDidSelect() { + return this.a.onDidSelect; + } + setOptions(i, e) { + this.a.setOptions(i, e); + } + select(i) { + this.a.select(i); + } + setAriaLabel(i) { + this.a.setAriaLabel(i); + } + focus() { + this.a.focus(); + } + blur() { + this.a.blur(); + } + setFocusable(i) { + this.a.setFocusable(i); + } + setEnabled(i) { + this.a.setEnabled(i); + } + render(i) { + this.a.render(i); + } + }; + } +}); +var rus = ue({ + "out-build/vs/base/browser/ui/actionbar/actionbar.css"() {} +}); +var jv; +var $f; +var Mme; +var zh = ue({ + "out-build/vs/base/browser/ui/actionbar/actionViewItems.js"() { + "use strict"; + + hc(); + sS(); + xe(); + hh(); + oa(); + Dz(); + Fs(); + q(); + rt(); + zt(); + rus(); + X(); + aS(); + jv = class extends H { + get action() { + return this._action; + } + constructor(i, e, t = {}) { + super(); + this.q = t; + this._context = i || this; + this._action = e; + if (e instanceof Yt) { + this.D(e.onDidChange(s => { + if (this.element) { + this.u(s); + } + })); + } + } + u(i) { + if (i.enabled !== undefined) { + this.w(); + } + if (i.checked !== undefined) { + this.J(); + } + if (i.class !== undefined) { + this.I(); + } + if (i.label !== undefined) { + this.z(); + this.G(); + } + if (i.tooltip !== undefined) { + this.G(); + } + } + get actionRunner() { + this.j ||= this.D(new ff()); + return this.j; + } + set actionRunner(i) { + this.j = i; + } + isEnabled() { + return this._action.enabled; + } + setActionContext(i) { + this._context = i; + } + render(i) { + const e = this.element = i; + this.D(bd.addTarget(i)); + const t = this.q && this.q.draggable; + if (t) { + i.draggable = true; + if (Bv) { + this.D(Ce(i, Oe.DRAG_START, s => s.dataTransfer?.setData(jh.TEXT, this._action.label))); + } + } + this.D(Ce(e, ul.Tap, s => this.onClick(s, true))); + this.D(Ce(e, Oe.MOUSE_DOWN, s => { + if (!t) { + yn.stop(s, true); + } + if (this._action.enabled && s.button === 0) { + e.classList.add("active"); + } + })); + if (Gt) { + this.D(Ce(e, Oe.CONTEXT_MENU, s => { + if (s.button === 0 && s.ctrlKey === true) { + this.onClick(s); + } + })); + } + this.D(Ce(e, Oe.CLICK, s => { + yn.stop(s, true); + if (!this.q || !this.q.isMenu) { + this.onClick(s); + } + })); + this.D(Ce(e, Oe.DBLCLICK, s => { + yn.stop(s, true); + })); + [Oe.MOUSE_UP, Oe.MOUSE_OUT].forEach(s => { + this.D(Ce(e, s, n => { + yn.stop(n); + e.classList.remove("active"); + })); + }); + } + onClick(i, e = false) { + yn.stop(i, true); + const t = Ga(this._context) ? this.q?.useEventAsContext ? i : { + preserveFocus: e + } : this._context; + this.actionRunner.run(this._action, t); + } + focus() { + if (this.element) { + this.element.tabIndex = 0; + this.element.focus(); + this.element.classList.add("focused"); + } + } + isFocused() { + return !!this.element?.classList.contains("focused"); + } + blur() { + if (this.element) { + this.element.blur(); + this.element.tabIndex = -1; + this.element.classList.remove("focused"); + } + } + setFocusable(i) { + if (this.element) { + this.element.tabIndex = i ? 0 : -1; + } + } + get trapsArrowNavigation() { + return false; + } + w() {} + z() {} + C() { + return this.action.class; + } + F() { + return this.action.tooltip; + } + G() { + if (!this.element) { + return; + } + const i = this.F() ?? ""; + this.H(); + if (this.q.hoverDelegate?.showNativeHover) { + this.element.title = i; + } else if (!this.f && i !== "") { + const e = this.q.hoverDelegate ?? cr("element"); + this.f = this.B.add(d1().setupManagedHover(e, this.element, i)); + } else if (this.f) { + this.f.update(i); + } + } + H() { + if (this.element) { + const i = this.F() ?? ""; + this.element.setAttribute("aria-label", i); + } + } + I() {} + J() {} + dispose() { + if (this.element) { + this.element.remove(); + this.element = undefined; + } + this._context = undefined; + super.dispose(); + } + }; + $f = class extends jv { + constructor(i, e, t) { + super(i, e, t); + this.q = t; + this.q.icon = t.icon !== undefined ? t.icon : false; + this.q.label = t.label !== undefined ? t.label : true; + this.N = ""; + } + render(i) { + super.render(i); + yr(this.element); + const e = document.createElement("a"); + e.classList.add("action-label"); + e.setAttribute("role", this.O()); + this.L = e; + this.element.appendChild(e); + if (this.q.label && this.q.keybinding && !this.q.keybindingNotRenderedWithLabel) { + const t = document.createElement("span"); + t.classList.add("keybinding"); + t.textContent = this.q.keybinding; + this.element.appendChild(t); + } + this.I(); + this.z(); + this.G(); + this.w(); + this.J(); + } + O() { + if (this._action.id === gr.ID) { + return "presentation"; + } else if (this.q.isMenu) { + return "menuitem"; + } else if (this.q.isTabList) { + return "tab"; + } else { + return "button"; + } + } + focus() { + if (this.L) { + this.L.tabIndex = 0; + this.L.focus(); + } + } + isFocused() { + return !!this.L && this.L?.tabIndex === 0; + } + blur() { + if (this.L) { + this.L.tabIndex = -1; + } + } + setFocusable(i) { + if (this.L) { + this.L.tabIndex = i ? 0 : -1; + } + } + z() { + if (this.q.label && this.L) { + this.L.textContent = this.action.label; + } + } + F() { + let i = null; + if (this.action.tooltip) { + i = this.action.tooltip; + } else if (this.action.label) { + i = this.action.label; + if (this.q.keybinding) { + i = f(0, null, i, this.q.keybinding); + } + } + return i ?? undefined; + } + I() { + if (this.N && this.L) { + this.L.classList.remove(...this.N.split(" ")); + } + if (this.q.icon) { + this.N = this.C(); + if (this.L) { + this.L.classList.add("codicon"); + if (this.N) { + this.L.classList.add(...this.N.split(" ")); + } + } + this.w(); + } else { + this.L?.classList.remove("codicon"); + } + } + w() { + if (this.action.enabled) { + if (this.L) { + this.L.removeAttribute("aria-disabled"); + this.L.classList.remove("disabled"); + } + this.element?.classList.remove("disabled"); + } else { + if (this.L) { + this.L.setAttribute("aria-disabled", "true"); + this.L.classList.add("disabled"); + } + this.element?.classList.add("disabled"); + } + } + H() { + if (this.L) { + const i = this.F() ?? ""; + this.L.setAttribute("aria-label", i); + } + } + J() { + if (this.L) { + if (this.action.checked !== undefined) { + this.L.classList.toggle("checked", this.action.checked); + if (this.q.isTabList) { + this.L.setAttribute("aria-selected", this.action.checked ? "true" : "false"); + } else { + this.L.setAttribute("aria-checked", this.action.checked ? "true" : "false"); + this.L.setAttribute("role", "checkbox"); + } + } else { + this.L.classList.remove("checked"); + this.L.removeAttribute(this.q.isTabList ? "aria-selected" : "aria-checked"); + this.L.setAttribute("role", this.O()); + } + } + } + }; + Mme = class extends jv { + constructor(i, e, t, s, n, r, o) { + super(i, e); + this.b = new q4(t, s, n, r, o); + this.b.setFocusable(false); + this.D(this.b); + this.g(); + } + setOptions(i, e) { + this.b.setOptions(i, e); + } + select(i) { + this.b.select(i); + } + g() { + this.D(this.b.onDidSelect(i => this.m(i.selected, i.index))); + } + m(i, e) { + this.actionRunner.run(this._action, this.n(i, e)); + } + n(i, e) { + return i; + } + setFocusable(i) { + this.b.setFocusable(i); + } + focus() { + this.b?.focus(); + } + blur() { + this.b?.blur(); + } + render(i) { + this.b.render(i); + } + }; + } +}); +function YI(i) { + if (!i.length) { + return i; + } + let e = -1; + for (let s = 0; s < i.length; s++) { + if (i[s].id !== gr.ID) { + e = s; + break; + } + } + if (e === -1) { + return []; + } + i = i.slice(e); + for (let s = i.length - 1; s >= 0 && i[s].id === gr.ID; s--) { + i.splice(s, 1); + } + let t = false; + for (let s = i.length - 1; s >= 0; s--) { + const n = i[s].id === gr.ID; + if (n && !t) { + i.splice(s, 1); + } else if (n) { + if (n) { + t = false; + } + } else { + t = true; + } + } + return i; +} +var ous; +var ea; +var sl = ue({ + "out-build/vs/base/browser/ui/actionbar/actionbar.js"() { + "use strict"; + + xe(); + _a(); + zh(); + oa(); + Fs(); + pe(); + q(); + zt(); + rus(); + (function (i) { + i[i.HORIZONTAL = 0] = "HORIZONTAL"; + i[i.VERTICAL = 1] = "VERTICAL"; + })(ous ||= {}); + ea = class extends H { + constructor(i, e = {}) { + super(); + this.j = this.D(new Q()); + this.r = this.D(new Bo()); + this.w = false; + this.y = true; + this.C = this.D(new B()); + this.onDidBlur = this.C.event; + this.F = this.D(new B({ + onWillAddFirstListener: () => this.G = true + })); + this.onDidCancel = this.F.event; + this.G = false; + this.H = this.D(new B()); + this.onDidRun = this.H.event; + this.I = this.D(new B()); + this.onWillRun = this.I.event; + this.b = e; + this.m = e.context ?? null; + this.n = this.b.orientation ?? 0; + this.q = { + keyDown: this.b.triggerKeys?.keyDown ?? false, + keys: this.b.triggerKeys?.keys ?? [3, 10] + }; + this.f = e.hoverDelegate ?? this.D(Hy()); + if (this.b.actionRunner) { + this.g = this.b.actionRunner; + } else { + this.g = new ff(); + this.j.add(this.g); + } + this.j.add(this.g.onDidRun(n => this.H.fire(n))); + this.j.add(this.g.onWillRun(n => this.I.fire(n))); + this.viewItems = []; + this.t = undefined; + this.domNode = document.createElement("div"); + this.domNode.className = "monaco-action-bar"; + let t; + let s; + switch (this.n) { + case 0: + t = [15]; + s = [17]; + break; + case 1: + t = [16]; + s = [18]; + this.domNode.className += " vertical"; + break; + } + this.D(Ce(this.domNode, Oe.KEY_DOWN, n => { + const r = new wr(n); + let o = true; + const a = typeof this.t == "number" ? this.viewItems[this.t] : undefined; + if (t && (r.equals(t[0]) || r.equals(t[1]))) { + o = this.Q(); + } else if (s && (r.equals(s[0]) || r.equals(s[1]))) { + o = this.P(); + } else if (r.equals(9) && this.G) { + this.F.fire(); + } else if (r.equals(14)) { + o = this.N(); + } else if (r.equals(13)) { + o = this.O(); + } else if (r.equals(2) && a instanceof jv && a.trapsArrowNavigation) { + o = this.P(undefined, true); + } else if (this.L(r)) { + if (this.q.keyDown) { + this.S(r); + } else { + this.w = true; + } + } else { + o = false; + } + if (o) { + r.preventDefault(); + r.stopPropagation(); + } + })); + this.D(Ce(this.domNode, Oe.KEY_UP, n => { + const r = new wr(n); + if (this.L(r)) { + if (!this.q.keyDown && this.w) { + this.w = false; + this.S(r); + } + r.preventDefault(); + r.stopPropagation(); + } else if (r.equals(2) || r.equals(1026) || r.equals(16) || r.equals(18) || r.equals(15) || r.equals(17)) { + this.M(); + } + })); + this.u = this.D(Pu(this.domNode)); + this.D(this.u.onDidBlur(() => { + if (Tu() === this.domNode || !Kd(Tu(), this.domNode)) { + this.C.fire(); + this.s = this.t; + this.t = undefined; + this.w = false; + } + })); + this.D(this.u.onDidFocus(() => this.M())); + this.z = document.createElement("ul"); + this.z.className = "actions-container"; + if (this.b.highlightToggledItems) { + this.z.classList.add("highlight-toggled"); + } + this.z.setAttribute("role", this.b.ariaRole || "toolbar"); + if (this.b.ariaLabel) { + this.z.setAttribute("aria-label", this.b.ariaLabel); + } + this.domNode.appendChild(this.z); + i.appendChild(this.domNode); + } + J() { + if (this.length() >= 1) { + this.z.setAttribute("role", this.b.ariaRole || "toolbar"); + } else { + this.z.setAttribute("role", "presentation"); + } + } + setAriaLabel(i) { + if (i) { + this.z.setAttribute("aria-label", i); + } else { + this.z.removeAttribute("aria-label"); + } + } + setFocusable(i) { + this.y = i; + if (this.y) { + const e = this.viewItems.find(t => t instanceof jv && t.isEnabled()); + if (e instanceof jv) { + e.setFocusable(true); + } + } else { + this.viewItems.forEach(e => { + if (e instanceof jv) { + e.setFocusable(false); + } + }); + } + } + L(i) { + let e = false; + this.q.keys.forEach(t => { + e = e || i.equals(t); + }); + return e; + } + M() { + for (let i = 0; i < this.z.children.length; i++) { + const e = this.z.children[i]; + if (Kd(Tu(), e)) { + this.t = i; + this.viewItems[this.t]?.showHover?.(); + break; + } + } + } + get context() { + return this.m; + } + set context(i) { + this.m = i; + this.viewItems.forEach(e => e.setActionContext(i)); + } + get actionRunner() { + return this.g; + } + set actionRunner(i) { + this.g = i; + this.j.clear(); + this.j.add(this.g.onDidRun(e => this.H.fire(e))); + this.j.add(this.g.onWillRun(e => this.I.fire(e))); + this.viewItems.forEach(e => e.actionRunner = i); + } + getContainer() { + return this.domNode; + } + hasAction(i) { + return this.viewItems.findIndex(e => e.action.id === i.id) !== -1; + } + getAction(i) { + if (typeof i == "number") { + return this.viewItems[i]?.action; + } + if (Bl(i)) { + while (i.parentElement !== this.z) { + if (!i.parentElement) { + return; + } + i = i.parentElement; + } + for (let e = 0; e < this.z.childNodes.length; e++) { + if (this.z.childNodes[e] === i) { + return this.viewItems[e].action; + } + } + } + } + push(i, e = {}) { + const t = Array.isArray(i) ? i : [i]; + let s = Od(e.index) ? e.index : null; + t.forEach(n => { + const r = document.createElement("li"); + r.className = "action-item"; + r.setAttribute("role", "presentation"); + let o; + const a = { + hoverDelegate: this.f, + ...e, + isTabList: this.b.ariaRole === "tablist" + }; + if (this.b.actionViewItemProvider) { + o = this.b.actionViewItemProvider(n, a); + } + o ||= new $f(this.context, n, a); + if (!this.b.allowContextMenu) { + this.r.set(o, Ce(r, Oe.CONTEXT_MENU, l => { + yn.stop(l, true); + })); + } + o.actionRunner = this.g; + o.setActionContext(this.context); + o.render(r); + if (this.y && o instanceof jv && this.viewItems.length === 0) { + o.setFocusable(true); + } + if (s === null || s < 0 || s >= this.z.children.length) { + this.z.appendChild(r); + this.viewItems.push(o); + } else { + this.z.insertBefore(r, this.z.children[s]); + this.viewItems.splice(s, 0, o); + s++; + } + }); + if (typeof this.t == "number") { + this.focus(this.t); + } + this.J(); + } + getWidth(i) { + if (i >= 0 && i < this.z.children.length) { + const e = this.z.children.item(i); + if (e) { + return e.clientWidth; + } + } + return 0; + } + getHeight(i) { + if (i >= 0 && i < this.z.children.length) { + const e = this.z.children.item(i); + if (e) { + return e.clientHeight; + } + } + return 0; + } + pull(i) { + if (i >= 0 && i < this.viewItems.length) { + this.z.childNodes[i].remove(); + this.r.deleteAndDispose(this.viewItems[i]); + si(this.viewItems.splice(i, 1)); + this.J(); + } + } + clear() { + if (!this.isEmpty()) { + this.viewItems = si(this.viewItems); + this.r.clearAndDisposeAll(); + Lr(this.z); + this.J(); + } + } + length() { + return this.viewItems.length; + } + isEmpty() { + return this.viewItems.length === 0; + } + focus(i) { + let e = false; + let t; + if (i === undefined) { + e = true; + } else if (typeof i == "number") { + t = i; + } else if (typeof i == "boolean") { + e = i; + } + if (e && typeof this.t === "undefined") { + const s = this.viewItems.findIndex(n => n.isEnabled()); + this.t = s === -1 ? undefined : s; + this.R(undefined, undefined, true); + } else { + if (t !== undefined) { + this.t = t; + } + this.R(undefined, undefined, true); + } + } + N() { + this.t = this.length() - 1; + return this.P(true); + } + O() { + this.t = 0; + return this.Q(true); + } + P(i, e) { + if (typeof this.t === "undefined") { + this.t = this.viewItems.length - 1; + } else if (this.viewItems.length <= 1) { + return false; + } + const t = this.t; + let s; + do { + if (!i && this.b.preventLoopNavigation && this.t + 1 >= this.viewItems.length) { + this.t = t; + return false; + } + this.t = (this.t + 1) % this.viewItems.length; + s = this.viewItems[this.t]; + } while (this.t !== t && (this.b.focusOnlyEnabledItems && !s.isEnabled() || s.action.id === gr.ID)); + this.R(undefined, undefined, e); + return true; + } + Q(i) { + if (typeof this.t === "undefined") { + this.t = 0; + } else if (this.viewItems.length <= 1) { + return false; + } + const e = this.t; + let t; + do { + this.t = this.t - 1; + if (this.t < 0) { + if (!i && this.b.preventLoopNavigation) { + this.t = e; + return false; + } + this.t = this.viewItems.length - 1; + } + t = this.viewItems[this.t]; + } while (this.t !== e && (this.b.focusOnlyEnabledItems && !t.isEnabled() || t.action.id === gr.ID)); + this.R(true); + return true; + } + R(i, e, t = false) { + if (typeof this.t === "undefined") { + this.z.focus({ + preventScroll: e + }); + } + if (this.s !== undefined && this.s !== this.t) { + this.viewItems[this.s]?.blur(); + } + const s = this.t !== undefined ? this.viewItems[this.t] : undefined; + if (s) { + let n = true; + if (!Wq(s.focus)) { + n = false; + } + if (this.b.focusOnlyEnabledItems && Wq(s.isEnabled) && !s.isEnabled()) { + n = false; + } + if (s.action.id === gr.ID) { + n = false; + } + if (n) { + if (t || this.s !== this.t) { + s.focus(i); + this.s = this.t; + } + } else { + this.z.focus({ + preventScroll: e + }); + this.s = undefined; + } + if (n) { + s.showHover?.(); + } + } + } + S(i) { + if (typeof this.t === "undefined") { + return; + } + const e = this.viewItems[this.t]; + if (e instanceof jv) { + const t = e._context === null || e._context === undefined ? i : e._context; + this.run(e._action, t); + } + } + async run(i, e) { + await this.g.run(i, e); + } + dispose() { + this.m = undefined; + this.viewItems = si(this.viewItems); + this.getContainer().remove(); + super.dispose(); + } + }; + } +}); +function dt(i, e, t, s) { + return x7.registerIcon(i, e, t, s); +} +function WM() { + return x7; +} +function RQn() { + const i = UJi(); + for (const e in i) { + const t = "\\" + i[e].toString(16); + x7.registerIcon(e, { + fontCharacter: t + }); + } +} +var YWt; +var aus; +var Pct; +var lus; +var x7; +var Lct; +var XWt; +var QWt; +var j4; +var cus; +var uus; +var Rct; +var Tz; +var Br = ue({ + "out-build/vs/platform/theme/common/iconRegistry.js"() { + "use strict"; + + nt(); + He(); + qrt(); + Rt(); + pe(); + zt(); + Le(); + X(); + Gb(); + Ht(); + YWt = { + IconContribution: "base.contributions.icons" + }; + (function (i) { + function e(t, s) { + let n = t.defaults; + while (le.isThemeIcon(n)) { + const r = x7.getIcon(n.id); + if (!r) { + return; + } + n = r.defaults; + } + return n; + } + i.getDefinition = e; + })(aus ||= {}); + (function (i) { + function e(s) { + return { + weight: s.weight, + style: s.style, + src: s.src.map(n => ({ + format: n.format, + location: n.location.toString() + })) + }; + } + i.toJSONObject = e; + function t(s) { + const n = r => yi(r) ? r : undefined; + if (s && Array.isArray(s.src) && s.src.every(r => yi(r.format) && yi(r.location))) { + return { + weight: n(s.weight), + style: n(s.style), + src: s.src.map(r => ({ + format: r.format, + location: V.parse(r.location) + })) + }; + } + } + i.fromJSONObject = t; + })(Pct ||= {}); + lus = class { + constructor() { + this.a = new B(); + this.onDidChange = this.a.event; + this.d = { + definitions: { + icons: { + type: "object", + properties: { + fontId: { + type: "string", + description: f(2407, null) + }, + fontCharacter: { + type: "string", + description: f(2408, null) + } + }, + additionalProperties: false, + defaultSnippets: [{ + body: { + fontCharacter: "\\\\e030" + } + }] + } + }, + type: "object", + properties: {} + }; + this.e = { + type: "string", + pattern: `^${le.iconNameExpression}$`, + enum: [], + enumDescriptions: [] + }; + this.b = {}; + this.f = {}; + } + registerIcon(i, e, t, s) { + const n = this.b[i]; + if (n) { + if (t && !n.description) { + n.description = t; + this.d.properties[i].markdownDescription = `${t} $(${i})`; + const a = this.e.enum.indexOf(i); + if (a !== -1) { + this.e.enumDescriptions[a] = t; + } + this.a.fire(); + } + return n; + } + const r = { + id: i, + description: t, + defaults: e, + deprecationMessage: s + }; + this.b[i] = r; + const o = { + $ref: "#/definitions/icons" + }; + if (s) { + o.deprecationMessage = s; + } + if (t) { + o.markdownDescription = `${t}: $(${i})`; + } + this.d.properties[i] = o; + this.e.enum.push(i); + this.e.enumDescriptions.push(t || ""); + this.a.fire(); + return { + id: i + }; + } + deregisterIcon(i) { + delete this.b[i]; + delete this.d.properties[i]; + const e = this.e.enum.indexOf(i); + if (e !== -1) { + this.e.enum.splice(e, 1); + this.e.enumDescriptions.splice(e, 1); + } + this.a.fire(); + } + getIcons() { + return Object.keys(this.b).map(i => this.b[i]); + } + getIcon(i) { + return this.b[i]; + } + getIconSchema() { + return this.d; + } + getIconReferenceSchema() { + return this.e; + } + registerIconFont(i, e) { + const t = this.f[i]; + return t || (this.f[i] = e, this.a.fire(), e); + } + deregisterIconFont(i) { + delete this.f[i]; + } + getIconFont(i) { + return this.f[i]; + } + toString() { + const i = (n, r) => n.id.localeCompare(r.id); + const e = n => { + while (le.isThemeIcon(n.defaults)) { + n = this.b[n.defaults.id]; + } + return `codicon codicon-${n ? n.id : ""}`; + }; + const t = []; + t.push("| preview | identifier | default codicon ID | description"); + t.push("| ----------- | --------------------------------- | --------------------------------- | --------------------------------- |"); + const s = Object.keys(this.b).map(n => this.b[n]); + for (const n of s.filter(r => !!r.description).sort(i)) { + t.push(`||${n.id}|${le.isThemeIcon(n.defaults) ? n.defaults.id : n.id}|${n.description || ""}|`); + } + t.push("| preview | identifier "); + t.push("| ----------- | --------------------------------- |"); + for (const n of s.filter(r => !le.isThemeIcon(r.defaults)).sort(i)) { + t.push(`||${n.id}|`); + } + return t.join(` +`); + } + }; + x7 = new lus(); + Pe.add(YWt.IconContribution, x7); + RQn(); + Lct = "vscode://schemas/icons"; + XWt = Pe.as(Vm.JSONContribution); + XWt.registerSchema(Lct, x7.getIconSchema()); + QWt = new Vn(() => XWt.notifySchemaChanged(Lct), 200); + x7.onDidChange(() => { + if (!QWt.isScheduled()) { + QWt.schedule(); + } + }); + j4 = dt("widget-close", A.close, f(2409, null)); + cus = dt("goto-previous-location", A.arrowUp, f(2410, null)); + uus = dt("goto-next-location", A.arrowDown, f(2411, null)); + Rct = le.modify(A.sync, "spin"); + Tz = le.modify(A.loading, "spin"); + } +}); +var Zr; +var Xa = ue({ + "out-build/vs/platform/clipboard/common/clipboardService.js"() { + "use strict"; + + te(); + Zr = Ve("clipboardService"); + } +}); +var Sc; +var ts; +var ks = ue({ + "out-build/vs/platform/contextview/browser/contextView.js"() { + "use strict"; + + te(); + Sc = Ve("contextViewService"); + ts = Ve("contextMenuService"); + } +}); +function NQn(i, e, t) { + if (e === null) { + return ""; + } + const s = []; + if (i.ctrlKey) { + s.push(t.ctrlKey); + } + if (i.shiftKey) { + s.push(t.shiftKey); + } + if (i.altKey) { + s.push(t.altKey); + } + if (i.metaKey) { + s.push(t.metaKey); + } + if (e !== "") { + s.push(e); + } + return s.join(t.separator); +} +var Ame; +var k7; +var ZWt; +var dus; +var Nct; +var E7 = ue({ + "out-build/vs/base/common/keybindingLabels.js"() { + "use strict"; + + X(); + Ame = class { + constructor(i, e, t = e) { + this.modifierLabels = [null]; + this.modifierLabels[2] = i; + this.modifierLabels[1] = e; + this.modifierLabels[3] = t; + } + toLabel(i, e, t) { + if (e.length === 0) { + return null; + } + const s = []; + for (let n = 0, r = e.length; n < r; n++) { + const o = e[n]; + const a = t(o); + if (a === null) { + return null; + } + s[n] = NQn(o, a, this.modifierLabels[i]); + } + return s.join(" "); + } + }; + k7 = new Ame({ + ctrlKey: "⌃", + shiftKey: "⇧", + altKey: "⌥", + metaKey: "⌘", + separator: "" + }, { + ctrlKey: f(125, null), + shiftKey: f(126, null), + altKey: f(127, null), + metaKey: f(128, null), + separator: "+" + }, { + ctrlKey: f(129, null), + shiftKey: f(130, null), + altKey: f(131, null), + metaKey: f(132, null), + separator: "+" + }); + ZWt = new Ame({ + ctrlKey: f(133, null), + shiftKey: f(134, null), + altKey: f(135, null), + metaKey: f(136, null), + separator: "+" + }, { + ctrlKey: f(137, null), + shiftKey: f(138, null), + altKey: f(139, null), + metaKey: f(140, null), + separator: "+" + }, { + ctrlKey: f(141, null), + shiftKey: f(142, null), + altKey: f(143, null), + metaKey: f(144, null), + separator: "+" + }); + dus = new Ame({ + ctrlKey: "Ctrl", + shiftKey: "Shift", + altKey: "Alt", + metaKey: "Cmd", + separator: "+" + }, { + ctrlKey: "Ctrl", + shiftKey: "Shift", + altKey: "Alt", + metaKey: "Super", + separator: "+" + }); + Nct = new Ame({ + ctrlKey: "ctrl", + shiftKey: "shift", + altKey: "alt", + metaKey: "cmd", + separator: "+" + }, { + ctrlKey: "ctrl", + shiftKey: "shift", + altKey: "alt", + metaKey: "win", + separator: "+" + }, { + ctrlKey: "ctrl", + shiftKey: "shift", + altKey: "alt", + metaKey: "meta", + separator: "+" + }); + } +}); +function eVt(i, e) { + const t = { + ...e + }; + for (const s in i) { + const n = i[s]; + t[s] = n !== undefined ? Ui(n) : undefined; + } + return t; +} +function I7(i) { + return eVt(i, Kp); +} +function VM(i) { + return eVt(i, Lz); +} +function hus(i) { + return eVt(i, qM); +} +var Eie; +var yd; +var HM; +var lS; +var MQn; +var Pz; +var tVt; +var Kp; +var fus; +var sR; +var iVt; +var Lz; +var qM; +var sVt; +var ya = ue({ + "out-build/vs/platform/theme/browser/defaultStyles.js"() { + "use strict"; + + Qs(); + Zo(); + Eie = { + keybindingLabelBackground: Ui(JQi), + keybindingLabelForeground: Ui(GQi), + keybindingLabelBorder: Ui(KQi), + keybindingLabelBottomBorder: Ui(YQi), + keybindingLabelShadow: Ui(OT) + }; + yd = { + buttonForeground: Ui(zL), + buttonSeparator: Ui(oat), + buttonBackground: Ui(PI), + buttonHoverBackground: Ui(M9), + buttonSecondaryForeground: Ui(s3t), + buttonSecondaryBackground: Ui(ite), + buttonSecondaryHoverBackground: Ui(n3t), + buttonBorder: Ui(UQi) + }; + HM = { + progressBarBackground: Ui(XXi) + }; + lS = { + inputActiveOptionBorder: Ui(L9), + inputActiveOptionForeground: Ui(Lj), + inputActiveOptionBackground: Ui(R9) + }; + MQn = { + activeForeground: Ui(ste), + activeBackground: Ui(WQi), + activeBorder: Ui(VQi), + inactiveForeground: Ui(HQi), + inactiveBackground: Ui(qQi), + inactiveBorder: Ui(jQi), + inactiveHoverBackground: Ui(zQi) + }; + Pz = { + checkboxBackground: Ui(r3t), + checkboxBorder: Ui(a3t), + checkboxForeground: Ui(o3t) + }; + tVt = { + dialogBackground: Ui($w), + dialogForeground: Ui(r4), + dialogShadow: Ui(OT), + dialogBorder: Ui(cn), + errorIconForeground: Ui(wQi), + warningIconForeground: Ui(CQi), + infoIconForeground: Ui(SQi), + textLinkForeground: Ui(Zk) + }; + Kp = { + inputBackground: Ui(_T), + inputForeground: Ui(c4), + inputBorder: Ui(jL), + inputValidationInfoBorder: Ui($Qi), + inputValidationInfoBackground: Ui(MQi), + inputValidationInfoForeground: Ui(AQi), + inputValidationWarningBorder: Ui(_Qi), + inputValidationWarningBackground: Ui(FQi), + inputValidationWarningForeground: Ui(OQi), + inputValidationErrorBorder: Ui(rat), + inputValidationErrorBackground: Ui(sat), + inputValidationErrorForeground: Ui(nat) + }; + fus = { + listFilterWidgetBackground: Ui(nZi), + listFilterWidgetOutline: Ui(rZi), + listFilterWidgetNoMatchesOutline: Ui(oZi), + listFilterWidgetShadow: Ui(aZi), + inputBoxStyles: Kp, + toggleStyles: lS + }; + sR = { + badgeBackground: Ui(kx), + badgeForeground: Ui(qL), + badgeBorder: Ui(cn) + }; + iVt = { + breadcrumbsBackground: Ui(vQi), + breadcrumbsForeground: Ui(bQi), + breadcrumbsHoverForeground: Ui(Y8t), + breadcrumbsFocusForeground: Ui(Y8t), + breadcrumbsFocusAndSelectionForeground: Ui(yQi) + }; + Lz = { + listBackground: undefined, + listInactiveFocusForeground: undefined, + listFocusBackground: Ui(nte), + listFocusForeground: Ui(epe), + listFocusOutline: Ui(tpe), + listActiveSelectionBackground: Ui(a1), + listActiveSelectionForeground: Ui(CM), + listActiveSelectionIconForeground: Ui(l3t), + listFocusAndSelectionOutline: Ui(QQi), + listFocusAndSelectionBackground: Ui(a1), + listFocusAndSelectionForeground: Ui(CM), + listInactiveSelectionBackground: Ui(Ix), + listInactiveSelectionIconForeground: Ui(ZQi), + listInactiveSelectionForeground: Ui(c3t), + listInactiveFocusBackground: Ui(u3t), + listInactiveFocusOutline: Ui(eZi), + listHoverBackground: Ui(u4), + listHoverForeground: Ui(ipe), + listDropOverBackground: Ui(d3t), + listDropBetweenBackground: Ui(tZi), + listSelectionOutline: Ui(Oc), + listHoverOutline: Ui(Oc), + treeIndentGuidesStroke: Ui(npe), + treeInactiveIndentGuidesStroke: Ui(uZi), + treeStickyScrollBackground: undefined, + treeStickyScrollBorder: undefined, + treeStickyScrollShadow: Ui(xj), + tableColumnsBorder: Ui(dZi), + tableOddRowsBackgroundColor: Ui(aat) + }; + qM = { + selectBackground: Ui(Rj), + selectListBackground: Ui(BQi), + selectForeground: Ui(Zge), + decoratorRightForeground: Ui(p3t), + selectBorder: Ui(N9), + focusBorder: Ui(bp), + listFocusBackground: Ui(ote), + listInactiveSelectionIconForeground: Ui(cat), + listFocusForeground: Ui(rte), + listFocusOutline: Jot(Oc, ut.transparent.toString()), + listHoverBackground: Ui(u4), + listHoverForeground: Ui(ipe), + listHoverOutline: Ui(Oc), + selectListBorder: Ui(Ij), + listBackground: undefined, + listActiveSelectionBackground: undefined, + listActiveSelectionForeground: undefined, + listActiveSelectionIconForeground: undefined, + listFocusAndSelectionBackground: undefined, + listDropOverBackground: undefined, + listDropBetweenBackground: undefined, + listInactiveSelectionBackground: undefined, + listInactiveSelectionForeground: undefined, + listInactiveFocusBackground: undefined, + listInactiveFocusOutline: undefined, + listSelectionOutline: undefined, + listFocusAndSelectionForeground: undefined, + listFocusAndSelectionOutline: undefined, + listInactiveFocusForeground: undefined, + tableColumnsBorder: undefined, + tableOddRowsBackgroundColor: undefined, + treeIndentGuidesStroke: undefined, + treeInactiveIndentGuidesStroke: undefined, + treeStickyScrollBackground: undefined, + treeStickyScrollBorder: undefined, + treeStickyScrollShadow: undefined + }; + sVt = { + shadowColor: Ui(OT), + borderColor: Ui(hZi), + foregroundColor: Ui(fZi), + backgroundColor: Ui(gZi), + selectionForegroundColor: Ui(pZi), + selectionBackgroundColor: Ui(mZi), + selectionBorderColor: Ui(bZi), + separatorColor: Ui(vZi), + scrollbarShadow: Ui(xj), + scrollbarSliderBackground: Ui(Yee), + scrollbarSliderHoverBackground: Ui(kj), + scrollbarSliderActiveBackground: Ui(Ej) + }; + } +}); +function IF(i) { + return { + asString: async () => i, + asFile: () => {}, + value: typeof i == "string" ? i : undefined + }; +} +function AQn(i, e, t) { + const s = { + id: Ft(), + name: i, + uri: e, + data: t + }; + return { + asString: async () => "", + asFile: () => s, + value: undefined + }; +} +function Mct(i) { + return i.toLowerCase(); +} +function $Qn(i, e) { + return gus(Mct(i), e.map(Mct)); +} +function gus(i, e) { + if (i === "*/*") { + return e.length > 0; + } + if (e.includes(i)) { + return true; + } + const t = i.match(/^([a-z]+)\/([a-z]+|\*)$/i); + if (!t) { + return false; + } + const [s, n, r] = t; + if (r === "*") { + return e.some(o => o.startsWith(n + "/")); + } else { + return false; + } +} +var D7; +var jM; +var zM = ue({ + "out-build/vs/base/common/dataTransfer.js"() { + "use strict"; + + Jt(); + sa(); + Ps(); + D7 = class { + constructor() { + this.a = new Map(); + } + get size() { + let i = 0; + for (const e of this.a) { + i++; + } + return i; + } + has(i) { + return this.a.has(this.b(i)); + } + matches(i) { + const e = [...this.a.keys()]; + if (Ws.some(this, ([t, s]) => s.asFile())) { + e.push("files"); + } + return gus(Mct(i), e); + } + get(i) { + return this.a.get(this.b(i))?.[0]; + } + append(i, e) { + const t = this.a.get(i); + if (t) { + t.push(e); + } else { + this.a.set(this.b(i), [e]); + } + } + replace(i, e) { + this.a.set(this.b(i), [e]); + } + delete(i) { + this.a.delete(this.b(i)); + } + *[Symbol.iterator]() { + for (const [i, e] of this.a) { + for (const t of e) { + yield [i, t]; + } + } + } + b(i) { + return Mct(i); + } + }; + jM = Object.freeze({ + create: i => Ea(i.map(e => e.toString())).join(`\r +`), + split: i => i.split(`\r +`), + parse: i => jM.split(i).filter(e => !e.startsWith("#")) + }); + } +}); +var _c; +var Mx = ue({ + "out-build/vs/base/common/hierarchicalKind.js"() { + "use strict"; + + _c = class Pde { + static { + this.sep = "."; + } + static { + this.None = new Pde("@@none@@"); + } + static { + this.Empty = new Pde(""); + } + constructor(e) { + this.value = e; + } + equals(e) { + return this.value === e.value; + } + contains(e) { + return this.equals(e) || this.value === "" || e.value.startsWith(this.value + Pde.sep); + } + intersects(e) { + return this.contains(e) || e.contains(this); + } + append(...e) { + return new Pde((this.value ? [this.value, ...e] : e).join(Pde.sep)); + } + }; + } +}); +var pus; +var z4; +var mus; +var h1; +var ph; +var Rz; +var nVt; +var Vw; +var zi; +var mn = ue({ + "out-build/vs/platform/quickinput/common/quickInput.js"() { + "use strict"; + + te(); + At(); + pus = { + ctrlCmd: false, + alt: false, + shift: false + }; + (function (i) { + i[i.Blur = 1] = "Blur"; + i[i.Gesture = 2] = "Gesture"; + i[i.Other = 3] = "Other"; + })(z4 ||= {}); + (function (i) { + i.QuickPick = "quickPick"; + i.InputBox = "inputBox"; + i.QuickWidget = "quickWidget"; + })(mus ||= {}); + (function (i) { + i[i.NONE = 0] = "NONE"; + i[i.FIRST = 1] = "FIRST"; + i[i.SECOND = 2] = "SECOND"; + i[i.LAST = 3] = "LAST"; + })(h1 ||= {}); + (function (i) { + i[i.First = 1] = "First"; + i[i.Second = 2] = "Second"; + i[i.Last = 3] = "Last"; + i[i.Next = 4] = "Next"; + i[i.Previous = 5] = "Previous"; + i[i.NextPage = 6] = "NextPage"; + i[i.PreviousPage = 7] = "PreviousPage"; + i[i.NextSeparator = 8] = "NextSeparator"; + i[i.PreviousSeparator = 9] = "PreviousSeparator"; + })(ph ||= {}); + (function (i) { + i[i.Title = 1] = "Title"; + i[i.Inline = 2] = "Inline"; + i[i.Left = 3] = "Left"; + })(Rz ||= {}); + nVt = class { + constructor(i) { + this.a = i; + } + getItemLabel(i) { + return i.label; + } + getItemDescription(i) { + if (!this.a?.skipDescription) { + return i.description; + } + } + getItemPath(i) { + if (!this.a?.skipPath) { + if (i.resource?.scheme === me.file) { + return i.resource.fsPath; + } else { + return i.resource?.path; + } + } + } + }; + Vw = new nVt(); + zi = Ve("quickInputService"); + } +}); +function FQn(i, e) { + const { + os: t, + tildify: s, + relative: n + } = e; + if (n) { + const a = OQn(i, n, t); + if (typeof a == "string") { + return a; + } + } + let r = i.fsPath; + if (t === 1 && !ln) { + r = r.replace(/\//g, "\\"); + } else if (t !== 1 && ln) { + r = r.replace(/\\/g, "/"); + } + if (t !== 1 && s?.userHome) { + const a = s.userHome.fsPath; + let l; + if (i.scheme !== s.userHome.scheme && i.path[0] === ao.sep && i.path[1] !== ao.sep) { + l = s.userHome.with({ + path: i.path + }).fsPath; + } else { + l = r; + } + r = rVt(l, a, t); + } + return (t === 1 ? Sh : ao).normalize(f1(r, t === 1)); +} +function OQn(i, e, t) { + const s = t === 1 ? Sh : ao; + const n = t === 3 ? sr : dM; + const r = e.getWorkspace(); + const o = r.folders.at(0); + if (!o) { + return; + } + if (i.scheme !== o.uri.scheme && i.path[0] === ao.sep && i.path[1] !== ao.sep) { + i = o.uri.with({ + path: i.path + }); + } + const a = e.getWorkspaceFolder(i); + if (!a) { + return; + } + let l; + if (n.isEqual(a.uri, i)) { + l = ""; + } else { + l = n.relativePath(a.uri, i) ?? ""; + } + l &&= s.normalize(l); + if (r.folders.length > 1 && !e.noPrefix) { + const c = a.name ? a.name : n.basenameOrAuthority(a.uri); + l = l ? `${c} \u2022 ${l}` : c; + } + return l; +} +function f1(i, e = ln) { + if (ufe(i, e)) { + return i.charAt(0).toUpperCase() + i.slice(1); + } else { + return i; + } +} +function rVt(i, e, t = Ia) { + if (t === 1 || !i || !e) { + return i; + } + let s = Act.original === e ? Act.normalized : undefined; + if (!s) { + s = e; + if (ln) { + s = qZ(s); + } + s = `${_0(s, ao.sep)}${ao.sep}`; + Act = { + original: e, + normalized: s + }; + } + let n = i; + if (ln) { + n = qZ(n); + } + if (t === 3 ? n.startsWith(s) : Oq(n, s)) { + return `~/${n.substr(s.length)}`; + } else { + return i; + } +} +function bus(i, e) { + return i.replace(/^~($|\/|\\)/, `${e}$1`); +} +function vus(i, e = _h) { + const t = new Array(i.length); + let s = false; + for (let n = 0; n < i.length; n++) { + const r = i[n]; + if (r === "") { + t[n] = `.${e}`; + continue; + } + if (!r) { + t[n] = r; + continue; + } + s = true; + let o = ""; + let a = r; + if (a.indexOf(Die) === 0) { + o = a.substr(0, a.indexOf(Die) + Die.length); + a = a.substr(a.indexOf(Die) + Die.length); + } else if (a.indexOf(e) === 0) { + o = a.substr(0, a.indexOf(e) + e.length); + a = a.substr(a.indexOf(e) + e.length); + } else if (a.indexOf(Tie) === 0) { + o = a.substr(0, a.indexOf(Tie) + Tie.length); + a = a.substr(a.indexOf(Tie) + Tie.length); + } + const l = a.split(e); + for (let c = 1; s && c <= l.length; c++) { + for (let u = l.length - c; s && u >= 0; u--) { + s = false; + let d = l.slice(u, u + c).join(e); + for (let h = 0; !s && h < i.length; h++) { + if (h !== n && i[h] && i[h].indexOf(d) > -1) { + const g = u + c === l.length; + const p = u > 0 && i[h].indexOf(e) > -1 ? e + d : d; + const b = i[h].endsWith(p); + s = !g || b; + } + } + if (!s) { + let h = ""; + if (l[0].endsWith(":") || o !== "") { + if (u === 1) { + u = 0; + c++; + d = l[0] + e + d; + } + if (u > 0) { + h = l[0] + e; + } + h = o + h; + } + if (u > 0) { + h = h + aVt + e; + } + h = h + d; + if (u + c < l.length) { + h = h + e + aVt; + } + t[n] = h; + } + } + } + if (s) { + t[n] = r; + } + } + return t; +} +function yus(i, e = Object.create(null)) { + const t = []; + let s = false; + let n = ""; + for (const r of i) { + if (r === "$" || s && r === "{") { + if (n) { + t.push({ + value: n, + type: DF.TEXT + }); + } + n = ""; + s = true; + } else if (r === "}" && s) { + const o = e[n]; + if (typeof o == "string") { + if (o.length) { + t.push({ + value: o, + type: DF.VARIABLE + }); + } + } else if (o) { + const a = t[t.length - 1]; + if (!a || a.type !== DF.SEPARATOR) { + t.push({ + value: o.label, + type: DF.SEPARATOR + }); + } + } + n = ""; + s = false; + } else { + n += r; + } + } + if (n && !s) { + t.push({ + value: n, + type: DF.TEXT + }); + } + return t.filter((r, o) => { + if (r.type === DF.SEPARATOR) { + const a = t[o - 1]; + const l = t[o + 1]; + return [a, l].every(c => c && (c.type === DF.VARIABLE || c.type === DF.TEXT) && c.value.length > 0); + } + return true; + }).map(r => r.value).join(""); +} +function T7(i, e) { + if (Gt || e) { + return i.replace(/\(&&\w\)|&&/g, "").replace(/&/g, Gt ? "&" : "&&"); + } else { + return i.replace(/&&|&/g, t => t === "&" ? "&&" : "&"); + } +} +function Iie(i, e) { + if (Gt || e) { + return i.replace(/\(&&\w\)|&&/g, ""); + } else if (ln) { + return i.replace(/&&|&/g, t => t === "&" ? "&&" : "&"); + } else { + return i.replace(/&&/g, "_"); + } +} +function oVt(i) { + return i.replace(/&/g, "&&"); +} +function wus(i) { + if (i.endsWith("]")) { + const e = i.lastIndexOf(" [", i.length - 2); + if (e !== -1) { + const t = Cus(i.substring(0, e)); + const s = i.substring(e); + return { + name: t.name + s, + parentPath: t.parentPath + }; + } + } + return Cus(i); +} +function Cus(i) { + const e = i.indexOf("/") !== -1 ? ao : Sh; + const t = e.basename(i); + const s = e.dirname(i); + if (t.length) { + return { + name: t, + parentPath: s + }; + } else { + return { + name: s, + parentPath: "" + }; + } +} +var Act; +var aVt; +var Die; +var Tie; +var DF; +var Yp = ue({ + "out-build/vs/base/common/labels.js"() { + "use strict"; + + zb(); + pn(); + rt(); + Et(); + $i(); + Act = Object.create(null); + aVt = "…"; + Die = "\\\\"; + Tie = "~"; + (function (i) { + i[i.TEXT = 0] = "TEXT"; + i[i.VARIABLE = 1] = "VARIABLE"; + i[i.SEPARATOR = 2] = "SEPARATOR"; + })(DF ||= {}); + } +}); +function nR(i) { + const e = []; + e.push(...i.slice(0, $me).map(t => typeof t == "string" ? t : ji(t))); + if (i.length > $me) { + if (i.length - $me === 1) { + e.push(f(1740, null)); + } else { + e.push(f(1741, null, i.length - $me)); + } + } + e.push(""); + return e.join(` +`); +} +var Js; +var P7; +var lVt; +var Xl; +var Sus; +var $me; +var fn = ue({ + "out-build/vs/platform/dialogs/common/dialogs.js"() { + "use strict"; + + Et(); + Wa(); + X(); + te(); + Yp(); + rt(); + Jr(); + Js = Ve("dialogService"); + (function (i) { + i[i.Confirmation = 1] = "Confirmation"; + i[i.Prompt = 2] = "Prompt"; + i[i.Input = 3] = "Input"; + })(P7 ||= {}); + lVt = class { + a(i) { + return this.d(i, P7.Confirmation); + } + b(i) { + return this.d(i, P7.Prompt); + } + c(i) { + return this.d(i, P7.Input); + } + d(i, e) { + const t = []; + switch (e) { + case P7.Confirmation: + { + const s = i; + if (s.primaryButton) { + t.push(s.primaryButton); + } else { + t.push(f(1733, null)); + } + if (s.cancelButton) { + t.push(s.cancelButton); + } else { + t.push(f(1734, null)); + } + break; + } + case P7.Prompt: + { + const s = i; + if (Array.isArray(s.buttons) && s.buttons.length > 0) { + t.push(...s.buttons.map(n => n.label)); + } + if (s.cancelButton) { + if (s.cancelButton === true) { + t.push(f(1735, null)); + } else if (typeof s.cancelButton == "string") { + t.push(s.cancelButton); + } else if (s.cancelButton.label) { + t.push(s.cancelButton.label); + } else { + t.push(f(1736, null)); + } + } + if (t.length === 0) { + t.push(f(1737, null)); + } + break; + } + case P7.Input: + { + const s = i; + if (s.primaryButton) { + t.push(s.primaryButton); + } else { + t.push(f(1738, null)); + } + if (s.cancelButton) { + t.push(s.cancelButton); + } else { + t.push(f(1739, null)); + } + break; + } + } + return t; + } + e(i) { + if (typeof i == "string") { + return i; + } + if (typeof i == "number") { + if (i === cs.Info) { + return "info"; + } else if (i === cs.Error) { + return "error"; + } else if (i === cs.Warning) { + return "warning"; + } else { + return "none"; + } + } + } + f(i, e, t) { + const s = [...(i.buttons ?? [])]; + if (i.cancelButton && typeof i.cancelButton != "string" && typeof i.cancelButton != "boolean") { + s.push(i.cancelButton); + } + let n = s[e]?.run({ + checkboxChecked: t + }); + if (!(n instanceof Promise)) { + n = Promise.resolve(n); + } + return { + result: n, + checkboxChecked: t + }; + } + }; + Xl = Ve("fileDialogService"); + (function (i) { + i[i.SAVE = 0] = "SAVE"; + i[i.DONT_SAVE = 1] = "DONT_SAVE"; + i[i.CANCEL = 2] = "CANCEL"; + })(Sus ||= {}); + $me = 10; + } +}); +var zT; +var cVt; +var Fme = ue({ + "out-build/vs/platform/files/browser/webFileSystemAccess.js"() { + "use strict"; + + (function (i) { + function e(r) { + return typeof r?.showDirectoryPicker == "function"; + } + i.supported = e; + function t(r) { + const o = r; + if (o) { + return typeof o.kind == "string" && typeof o.queryPermission == "function" && typeof o.requestPermission == "function"; + } else { + return false; + } + } + i.isFileSystemHandle = t; + function s(r) { + return r.kind === "file"; + } + i.isFileSystemFileHandle = s; + function n(r) { + return r.kind === "directory"; + } + i.isFileSystemDirectoryHandle = n; + })(zT ||= {}); + (function (i) { + function e(t) { + return typeof t?.FileSystemObserver == "function"; + } + i.supported = e; + })(cVt ||= {}); + } +}); +var xus; +var _Qn = ue({ + "out-build/vs/platform/files/browser/htmlFileSystemProvider.js"() { + "use strict"; + + X(); + Le(); + nr(); + pe(); + q(); + At(); + pn(); + rt(); + Et(); + OL(); + Nt(); + Fme(); + Zt(); + xus = class extends H { + get capabilities() { + if (!this.b) { + this.b = 18; + if (yl) { + this.b |= 1024; + } + } + return this.b; + } + constructor(i, e, t) { + super(); + this.c = i; + this.f = e; + this.g = t; + this.onDidChangeCapabilities = de.None; + this.a = yl ? sr : dM; + this.h = this.D(new B()); + this.onDidChangeFile = this.h.event; + this.m = new Map(); + this.n = new Map(); + } + async stat(i) { + try { + const e = await this.getHandle(i); + if (!e) { + throw this.w(i, "No such file or directory, stat", io.FileNotFound); + } + if (zT.isFileSystemFileHandle(e)) { + const t = await e.getFile(); + return { + type: wg.File, + mtime: t.lastModified, + ctime: 0, + size: t.size + }; + } + return { + type: wg.Directory, + mtime: 0, + ctime: 0, + size: 0 + }; + } catch (e) { + throw this.u(e); + } + } + async readdir(i) { + try { + const e = await this.s(i); + if (!e) { + throw this.w(i, "No such file or directory, readdir", io.FileNotFound); + } + const t = []; + for await (const [s, n] of e) { + t.push([s, zT.isFileSystemFileHandle(n) ? wg.File : wg.Directory]); + } + return t; + } catch (e) { + throw this.u(e); + } + } + readFileStream(i, e, t) { + const s = q2(n => Ii.concat(n.map(r => Ii.wrap(r))).buffer, { + highWaterMark: 10 + }); + (async () => { + try { + const n = await this.r(i); + if (!n) { + throw this.w(i, "No such file or directory, readFile", io.FileNotFound); + } + const r = await n.getFile(); + if (typeof e.length == "number" || typeof e.position == "number") { + let o = new Uint8Array(await r.arrayBuffer()); + if (typeof e?.position == "number") { + o = o.slice(e.position); + } + if (typeof e?.length == "number") { + o = o.slice(0, e.length); + } + s.end(o); + } else { + const o = r.stream().getReader(); + let a = await o.read(); + while (!a.done && !t.isCancellationRequested && !(await s.write(a.value), t.isCancellationRequested)) { + a = await o.read(); + } + s.end(undefined); + } + } catch (n) { + s.error(this.u(n)); + s.end(); + } + })(); + return s; + } + async readFile(i) { + try { + const e = await this.r(i); + if (!e) { + throw this.w(i, "No such file or directory, readFile", io.FileNotFound); + } + const t = await e.getFile(); + return new Uint8Array(await t.arrayBuffer()); + } catch (e) { + throw this.u(e); + } + } + async writeFile(i, e, t) { + try { + let s = await this.r(i); + if (!t.create || !t.overwrite) { + if (s) { + if (!t.overwrite) { + throw this.w(i, "File already exists, writeFile", io.FileExists); + } + } else if (!t.create) { + throw this.w(i, "No such file, writeFile", io.FileNotFound); + } + } + if (!s) { + const r = await this.s(this.a.dirname(i)); + if (!r) { + throw this.w(i, "No such parent directory, writeFile", io.FileNotFound); + } + s = await r.getFileHandle(this.a.basename(i), { + create: true + }); + if (!s) { + throw this.w(i, "Unable to create file , writeFile", io.Unknown); + } + } + const n = await s.createWritable(); + await n.write(e); + await n.close(); + } catch (s) { + throw this.u(s); + } + } + async mkdir(i) { + try { + const e = await this.s(this.a.dirname(i)); + if (!e) { + throw this.w(i, "No such parent directory, mkdir", io.FileNotFound); + } + await e.getDirectoryHandle(this.a.basename(i), { + create: true + }); + } catch (e) { + throw this.u(e); + } + } + async delete(i, e) { + try { + const t = await this.s(this.a.dirname(i)); + if (!t) { + throw this.w(i, "No such parent directory, delete", io.FileNotFound); + } + return t.removeEntry(this.a.basename(i), { + recursive: e.recursive + }); + } catch (t) { + throw this.u(t); + } + } + async rename(i, e, t) { + try { + if (this.a.isEqual(i, e)) { + return; + } + const s = await this.r(i); + if (s) { + const n = await s.getFile(); + const r = new Uint8Array(await n.arrayBuffer()); + await this.writeFile(e, r, { + create: true, + overwrite: t.overwrite, + unlock: false, + atomic: false + }); + await this.delete(i, { + recursive: false, + useTrash: false, + atomic: false + }); + } else { + throw this.w(i, f(1906, null), io.Unavailable); + } + } catch (s) { + throw this.u(s); + } + } + watch(i, e) { + const t = new Q(); + this.j(i, e, t).catch(s => this.g.error(`[File Watcher ('FileSystemObserver')] Error: ${s} (${i})`)); + return t; + } + async j(i, e, t) { + if (!cVt.supported(globalThis)) { + return; + } + const s = await this.getHandle(i); + if (!s || t.isDisposed) { + return; + } + const n = new globalThis.FileSystemObserver(r => { + if (t.isDisposed) { + return; + } + const o = []; + for (const a of r) { + if (this.g.getLevel() === pr.Trace) { + this.g.trace(`[File Watcher ('FileSystemObserver')] [${a.type}] ${Li(i, ...a.relativePathComponents)}`); + } + switch (a.type) { + case "appeared": + o.push({ + resource: Li(i, ...a.relativePathComponents), + type: 1 + }); + break; + case "disappeared": + o.push({ + resource: Li(i, ...a.relativePathComponents), + type: 2 + }); + break; + case "modified": + o.push({ + resource: Li(i, ...a.relativePathComponents), + type: 0 + }); + break; + case "errored": + this.g.trace(`[File Watcher ('FileSystemObserver')] errored, disposing observer (${i})`); + t.dispose(); + } + } + if (o.length) { + this.h.fire(o); + } + }); + try { + await n.observe(s, e.recursive ? { + recursive: true + } : undefined); + } finally { + if (t.isDisposed) { + n.disconnect(); + } else { + t.add(Ue(() => n.disconnect())); + } + } + } + registerFileHandle(i) { + return this.q(i, this.m); + } + registerDirectoryHandle(i) { + return this.q(i, this.n); + } + get directories() { + return this.n.values(); + } + async q(i, e) { + let t = `/${i.name}`; + if (e.has(t) && !(await e.get(t)?.isSameEntry(i))) { + const s = Iw(i.name); + const n = ir(i.name, s); + let r = 1; + do { + t = `/${n}-${r++}${s}`; + } while (e.has(t) && !(await e.get(t)?.isSameEntry(i))); + } + e.set(t, i); + try { + await this.c?.runInTransaction(this.f, "readwrite", s => s.put(i, t)); + } catch (s) { + this.g.error(s); + } + return V.from({ + scheme: me.file, + path: t + }); + } + async getHandle(i) { + let e = await this.t(i); + if (!e) { + const t = await this.s(this.a.dirname(i)); + if (t) { + const s = sr.basename(i); + try { + e = await t.getFileHandle(s); + } catch { + try { + e = await t.getDirectoryHandle(s); + } catch {} + } + } + } + return e; + } + async r(i) { + const e = await this.t(i); + if (e instanceof FileSystemFileHandle) { + return e; + } + const t = await this.s(this.a.dirname(i)); + try { + return await t?.getFileHandle(sr.basename(i)); + } catch { + return; + } + } + async s(i) { + const e = await this.t(i); + if (e instanceof FileSystemDirectoryHandle) { + return e; + } + const t = this.a.dirname(i); + if (this.a.isEqual(t, i)) { + return; + } + const s = await this.s(t); + try { + return await s?.getDirectoryHandle(sr.basename(i)); + } catch { + return; + } + } + async t(i) { + if (this.a.dirname(i).path !== "/") { + return; + } + const e = i.path.replace(/\/$/, ""); + const t = this.m.get(e) ?? this.n.get(e); + if (t) { + return t; + } + const s = await this.c?.runInTransaction(this.f, "readonly", n => n.get(e)); + if (zT.isFileSystemHandle(s)) { + let n = (await s.queryPermission()) === "granted"; + try { + n ||= (await s.requestPermission()) === "granted"; + } catch (r) { + this.g.error(r); + } + if (n) { + if (zT.isFileSystemFileHandle(s)) { + this.m.set(e, s); + } else if (zT.isFileSystemDirectoryHandle(s)) { + this.n.set(e, s); + } + return s; + } + } + throw this.w(i, "No file system handle registered", io.Unavailable); + } + u(i) { + if (i instanceof Mlt) { + return i; + } + let e = io.Unknown; + if (i.name === "NotAllowedError") { + i = new Error(f(1907, null)); + e = io.Unavailable; + } + return wp(i, e); + } + w(i, e, t) { + return wp(new Error(`${e} (${My(i.path)})`), t); + } + }; + } +}); +function xg(i, e) { + return i.with({ + fragment: `${e.startLineNumber},${e.startColumn}${e.endLineNumber ? `-${e.endLineNumber}${e.endColumn ? `,${e.endColumn}` : ""}` : ""}` + }); +} +function $ct(i) { + let e; + const t = /^L?(\d+)(?:,(\d+))?(-L?(\d+)(?:,(\d+))?)?/.exec(i.fragment); + if (t) { + e = { + startLineNumber: parseInt(t[1]), + startColumn: t[2] ? parseInt(t[2]) : 1, + endLineNumber: t[4] ? parseInt(t[4]) : undefined, + endColumn: t[4] ? t[5] ? parseInt(t[5]) : 1 : undefined + }; + i = i.with({ + fragment: "" + }); + } + return { + selection: e, + uri: i + }; +} +var os; +var gs = ue({ + "out-build/vs/platform/opener/common/opener.js"() { + "use strict"; + + te(); + os = Ve("openerService"); + } +}); +function kus(i) { + const e = []; + if (i.dataTransfer && i.dataTransfer.types.length > 0) { + const n = i.dataTransfer.getData(zv.EDITORS); + if (n) { + try { + e.push(...VI(n)); + } catch {} + } else { + try { + const a = i.dataTransfer.getData(jh.RESOURCES); + e.push(...Eus(a)); + } catch {} + } + if (i.dataTransfer?.files) { + for (let a = 0; a < i.dataTransfer.files.length; a++) { + const l = i.dataTransfer.files[a]; + if (l && JM(l)) { + try { + e.push({ + resource: V.file(JM(l)), + isExternal: true, + allowWorkspaceOpen: true + }); + } catch {} + } + } + } + const r = i.dataTransfer.getData(zv.FILES); + if (r) { + try { + const a = JSON.parse(r); + for (const l of a) { + e.push({ + resource: V.file(l), + isExternal: true, + allowWorkspaceOpen: true + }); + } + } catch {} + } + const o = Pe.as(Pie.DragAndDropContribution).getAll(); + for (const a of o) { + const l = i.dataTransfer.getData(a.dataFormatKey); + if (l) { + try { + e.push(...a.getEditorInputs(l)); + } catch {} + } + } + } + const t = []; + const s = new dn(); + for (const n of e) { + if (n.resource) { + if (!s.has(n.resource)) { + t.push(n); + s.set(n.resource, true); + } + } else { + t.push(n); + } + } + return t; +} +async function Fct(i, e) { + const t = kus(e); + if (e.dataTransfer && tn && Ax(e, jh.FILES) && e.dataTransfer.items) { + const r = await i.get(re).invokeFunction(o => BQn(o, e)); + for (const o of r) { + t.push({ + resource: o.resource, + contents: o.contents?.toString(), + isExternal: true, + allowWorkspaceOpen: o.isDirectory + }); + } + } + return t; +} +function Eus(i) { + const e = []; + if (i) { + const t = JSON.parse(i); + for (const s of t) { + if (s.indexOf(":") > 0) { + const { + selection: n, + uri: r + } = $ct(V.parse(s)); + e.push({ + resource: r, + options: { + selection: n + } + }); + } + } + } + return e; +} +async function BQn(i, e) { + if (zT.supported(xt)) { + const s = e.dataTransfer?.items; + if (s) { + return UQn(i, s); + } + } + const t = e.dataTransfer?.files; + if (t) { + return WQn(i, t); + } else { + return []; + } +} +async function UQn(i, e) { + const t = i.get(Ct).getProvider(me.file); + if (!(t instanceof xus)) { + return []; + } + const s = []; + for (let n = 0; n < e.length; n++) { + const r = e[n]; + if (r) { + const o = new uc(); + s.push(o); + (async () => { + try { + const a = await r.getAsFileSystemHandle(); + if (!a) { + o.complete(undefined); + return; + } + if (zT.isFileSystemFileHandle(a)) { + o.complete({ + resource: await t.registerFileHandle(a), + isDirectory: false + }); + } else if (zT.isFileSystemDirectoryHandle(a)) { + o.complete({ + resource: await t.registerDirectoryHandle(a), + isDirectory: true + }); + } else { + o.complete(undefined); + } + } catch { + o.complete(undefined); + } + })(); + } + } + return dr(await Promise.all(s.map(n => n.p))); +} +async function WQn(i, e) { + const t = i.get(Js); + const s = []; + for (let n = 0; n < e.length; n++) { + const r = e.item(n); + if (r) { + if (r.size > Af.MB * 100) { + t.warn(f(1747, null)); + continue; + } + const o = new uc(); + s.push(o); + const a = new FileReader(); + a.onerror = () => o.complete(undefined); + a.onabort = () => o.complete(undefined); + a.onload = async l => { + const c = r.name; + const u = l.target?.result ?? undefined; + if (typeof c != "string" || typeof u === "undefined") { + o.complete(undefined); + return; + } + o.complete({ + resource: V.from({ + scheme: me.untitled, + path: c + }), + contents: typeof u == "string" ? Ii.fromString(u) : Ii.wrap(new Uint8Array(u)) + }); + }; + a.readAsArrayBuffer(r); + } + } + return dr(await Promise.all(s.map(n => n.p))); +} +function Ax(i, ...e) { + if (!i.dataTransfer) { + return false; + } + const t = i.dataTransfer.types; + const s = []; + for (let n = 0; n < t.length; n++) { + s.push(t[n].toLowerCase()); + } + for (const n of e) { + if (s.indexOf(n.toLowerCase()) >= 0) { + return true; + } + } + return false; +} +function VQn(i) { + const e = i.dataTransfer?.getData(zv.SYMBOLS); + if (e) { + try { + return JSON.parse(e); + } catch {} + } + return []; +} +function uVt(i, e) { + e.dataTransfer?.setData(zv.SYMBOLS, JSON.stringify(i)); +} +function JM(i) { + if (sc && typeof globalThis.vscode?.webUtils?.getPathForFile == "function") { + return globalThis.vscode.webUtils.getPathForFile(i); + } +} +var zv; +var Ius; +var Pie; +var rR; +var Hw = ue({ + "out-build/vs/platform/dnd/browser/dnd.js"() { + "use strict"; + + sS(); + fr(); + Jt(); + nt(); + nr(); + In(); + yg(); + At(); + rt(); + Le(); + X(); + fn(); + rt(); + _Qn(); + Fme(); + Nt(); + te(); + gs(); + Ht(); + zv = { + EDITORS: "CodeEditors", + FILES: "CodeFiles", + SYMBOLS: "application/vnd.code.symbols" + }; + Ius = class { + constructor() { + this.a = new Map(); + } + register(i) { + if (this.a.has(i.dataFormatKey)) { + throw new Error(`A drag and drop contributiont with key '${i.dataFormatKey}' was already registered.`); + } + this.a.set(i.dataFormatKey, i); + } + getAll() { + return this.a.values(); + } + }; + Pie = { + DragAndDropContribution: "workbench.contributions.dragAndDrop" + }; + Pe.add(Pie.DragAndDropContribution, new Ius()); + rR = class K3i { + static { + this.a = new K3i(); + } + constructor() {} + static getInstance() { + return K3i.a; + } + hasData(e) { + return e && e === this.c; + } + clearData(e) { + if (this.hasData(e)) { + this.c = undefined; + this.b = undefined; + } + } + getData(e) { + if (this.hasData(e)) { + return this.b; + } + } + setData(e, t) { + if (t) { + this.b = e; + this.c = t; + } + } + }; + } +}); +function Dus(i) { + const e = new D7(); + for (const t of i.items) { + const s = t.type; + if (t.kind === "string") { + const n = new Promise(r => t.getAsString(r)); + e.append(s, IF(n)); + } else if (t.kind === "file") { + const n = t.getAsFile(); + if (n) { + e.append(s, HQn(n)); + } + } + } + return e; +} +function HQn(i) { + const e = JM(i); + const t = e ? V.parse(e) : undefined; + return AQn(i.name, t, async () => new Uint8Array(await i.arrayBuffer())); +} +function Oct(i, e = false) { + const t = Dus(i); + const s = t.get(jh.INTERNAL_URI_LIST); + if (s) { + t.replace(pl.uriList, s); + } else if (e || !t.has(pl.uriList)) { + const n = []; + for (const r of i.items) { + const o = r.getAsFile(); + if (o) { + const a = JM(o); + try { + if (a) { + n.push(V.file(a).toString()); + } else { + n.push(V.parse(o.name, true).toString()); + } + } catch {} + } + } + if (n.length) { + t.replace(pl.uriList, IF(jM.create(n))); + } + } + for (const n of Tus) { + t.delete(n); + } + return t; +} +var Tus; +var dVt = ue({ + "out-build/vs/editor/browser/dnd.js"() { + "use strict"; + + sS(); + zM(); + Jb(); + Le(); + Hw(); + Tus = Object.freeze([zv.EDITORS, zv.FILES, jh.RESOURCES, jh.INTERNAL_URI_LIST]); + } +}); +var eg; +var Ome; +var Ff; +var Sp; +var yf = ue({ + "out-build/vs/editor/browser/services/bulkEditService.js"() { + "use strict"; + + te(); + Le(); + zt(); + eg = Ve("IWorkspaceEditService"); + Ome = class { + constructor(i) { + this.metadata = i; + } + static convert(i) { + return i.edits.map(e => { + if (Ff.is(e)) { + return Ff.lift(e); + } + if (Sp.is(e)) { + return Sp.lift(e); + } + throw new Error("Unsupported edit"); + }); + } + }; + Ff = class wFt extends Ome { + static is(e) { + if (e instanceof wFt) { + return true; + } else { + return xo(e) && V.isUri(e.resource) && xo(e.textEdit); + } + } + static lift(e) { + if (e instanceof wFt) { + return e; + } else { + return new wFt(e.resource, e.textEdit, e.versionId, e.metadata); + } + } + constructor(e, t, s = undefined, n) { + super(n); + this.resource = e; + this.textEdit = t; + this.versionId = s; + } + }; + Sp = class CFt extends Ome { + static is(e) { + if (e instanceof CFt) { + return true; + } else { + return xo(e) && (!!e.newResource || !!e.oldResource); + } + } + static lift(e) { + if (e instanceof CFt) { + return e; + } else { + return new CFt(e.oldResource, e.newResource, e.options, e.metadata); + } + } + constructor(e, t, s = {}, n) { + super(n); + this.oldResource = e; + this.newResource = t; + this.options = s; + } + }; + } +}); +async function Pus(i) { + const e = i.get(pl.uriList); + if (!e) { + return []; + } + const t = await e.asString(); + const s = []; + for (const n of jM.parse(t)) { + try { + s.push({ + uri: V.parse(n), + originalText: n + }); + } catch {} + } + return s; +} +var _ct; +var Lie; +var hVt; +var _me; +var Lus; +var L7; +var Bct; +var fVt; +var gVt = ue({ + "out-build/vs/editor/contrib/dropOrPasteInto/browser/defaultProviders.js"() { + "use strict"; + + Jt(); + zM(); + Mx(); + q(); + Jb(); + At(); + Et(); + Le(); + Eo(); + Tr(); + X(); + ii(); + _ct = class { + constructor(i) { + this.copyMimeTypes = []; + this.kind = i; + this.providedDropEditKinds = [this.kind]; + this.providedPasteEditKinds = [this.kind]; + } + async provideDocumentPasteEdits(i, e, t, s, n) { + const r = await this.a(t, n); + if (r) { + return { + edits: [{ + insertText: r.insertText, + title: r.title, + kind: r.kind, + handledMimeType: r.handledMimeType, + yieldTo: r.yieldTo + }], + dispose() {} + }; + } + } + async provideDocumentDropEdits(i, e, t, s) { + const n = await this.a(t, s); + if (n) { + return { + edits: [{ + insertText: n.insertText, + title: n.title, + kind: n.kind, + handledMimeType: n.handledMimeType, + yieldTo: n.yieldTo + }], + dispose() {} + }; + } + } + }; + Lie = class xOn extends _ct { + static { + this.id = "text"; + } + constructor() { + super(_c.Empty.append("text", "plain")); + this.id = xOn.id; + this.dropMimeTypes = [pl.text]; + this.pasteMimeTypes = [pl.text]; + } + async a(e, t) { + const s = e.get(pl.text); + if (!s || e.has(pl.uriList)) { + return; + } + const n = await s.asString(); + return { + handledMimeType: pl.text, + title: f(1003, null), + insertText: n, + kind: this.kind + }; + } + }; + hVt = class extends _ct { + constructor() { + super(_c.Empty.append("uri", "path", "absolute")); + this.dropMimeTypes = [pl.uriList]; + this.pasteMimeTypes = [pl.uriList]; + } + async a(i, e) { + const t = await Pus(i); + if (!t.length || e.isCancellationRequested) { + return; + } + let s = 0; + const n = t.map(({ + uri: o, + originalText: a + }) => o.scheme === me.file ? o.fsPath : (s++, a)).join(" "); + let r; + if (s > 0) { + r = t.length > 1 ? f(1004, null) : f(1005, null); + } else { + r = t.length > 1 ? f(1006, null) : f(1007, null); + } + return { + handledMimeType: pl.uriList, + insertText: n, + title: r, + kind: this.kind + }; + } + }; + _me = class extends _ct { + constructor(e) { + super(_c.Empty.append("uri", "path", "relative")); + this.b = e; + this.dropMimeTypes = [pl.uriList]; + this.pasteMimeTypes = [pl.uriList]; + } + async a(e, t) { + const s = await Pus(e); + if (!s.length || t.isCancellationRequested) { + return; + } + const n = dr(s.map(({ + uri: r + }) => { + const o = this.b.getWorkspaceFolder(r); + if (o) { + return fb(o.uri, r); + } else { + return undefined; + } + })); + if (n.length) { + return { + handledMimeType: pl.uriList, + insertText: n.join(" "), + title: s.length > 1 ? f(1008, null) : f(1009, null), + kind: this.kind + }; + } + } + }; + _me = __decorate([__param(0, kt)], _me); + Lus = class { + constructor() { + this.kind = new _c("html"); + this.providedPasteEditKinds = [this.kind]; + this.copyMimeTypes = []; + this.pasteMimeTypes = ["text/html"]; + this.a = [{ + mimeType: pl.text + }]; + } + async provideDocumentPasteEdits(i, e, t, s, n) { + if (s.triggerKind !== mpe.PasteAs && !s.only?.contains(this.kind)) { + return; + } + const o = await t.get("text/html")?.asString(); + if (!!o && !n.isCancellationRequested) { + return { + dispose() {}, + edits: [{ + insertText: o, + yieldTo: this.a, + title: f(1010, null), + kind: this.kind + }] + }; + } + } + }; + L7 = { + scheme: "*", + hasAccessToAllModels: true + }; + Bct = class extends H { + constructor(e, t) { + super(); + this.D(e.documentDropEditProvider.register(L7, new Lie())); + this.D(e.documentDropEditProvider.register(L7, new hVt())); + this.D(e.documentDropEditProvider.register(L7, new _me(t))); + } + }; + Bct = __decorate([__param(0, nn), __param(1, kt)], Bct); + fVt = class extends H { + constructor(e, t) { + super(); + this.D(e.documentPasteEditProvider.register(L7, new Lie())); + this.D(e.documentPasteEditProvider.register(L7, new hVt())); + this.D(e.documentPasteEditProvider.register(L7, new _me(t))); + this.D(e.documentPasteEditProvider.register(L7, new Lus())); + } + }; + fVt = __decorate([__param(0, nn), __param(1, kt)], fVt); + } +}); +function Rus(i, e) { + const t = [...i]; + while (t.length > 0) { + const s = t.shift(); + if (!e(s)) { + break; + } + t.unshift(...s.children); + } +} +var Nus; +var Mus; +var Nz; +var g1; +var pVt; +var XI; +var Bme; +var Aus; +var TF; +var Ume; +var Uct; +var oE; +var JT = ue({ + "out-build/vs/editor/contrib/snippet/browser/snippetParser.js"() { + "use strict"; + + (function (i) { + i[i.Dollar = 0] = "Dollar"; + i[i.Colon = 1] = "Colon"; + i[i.Comma = 2] = "Comma"; + i[i.CurlyOpen = 3] = "CurlyOpen"; + i[i.CurlyClose = 4] = "CurlyClose"; + i[i.Backslash = 5] = "Backslash"; + i[i.Forwardslash = 6] = "Forwardslash"; + i[i.Pipe = 7] = "Pipe"; + i[i.Int = 8] = "Int"; + i[i.VariableName = 9] = "VariableName"; + i[i.Format = 10] = "Format"; + i[i.Plus = 11] = "Plus"; + i[i.Dash = 12] = "Dash"; + i[i.QuestionMark = 13] = "QuestionMark"; + i[i.EOF = 14] = "EOF"; + })(Nus ||= {}); + Mus = class gB { + constructor() { + this.value = ""; + this.pos = 0; + } + static { + this.d = { + 36: 0, + 58: 1, + 44: 2, + 123: 3, + 125: 4, + 92: 5, + 47: 6, + 124: 7, + 43: 11, + 45: 12, + 63: 13 + }; + } + static isDigitCharacter(e) { + return e >= 48 && e <= 57; + } + static isVariableCharacter(e) { + return e === 95 || e >= 97 && e <= 122 || e >= 65 && e <= 90; + } + text(e) { + this.value = e; + this.pos = 0; + } + tokenText(e) { + return this.value.substr(e.pos, e.len); + } + next() { + if (this.pos >= this.value.length) { + return { + type: 14, + pos: this.pos, + len: 0 + }; + } + const e = this.pos; + let t = 0; + let s = this.value.charCodeAt(e); + let n; + n = gB.d[s]; + if (typeof n == "number") { + this.pos += 1; + return { + type: n, + pos: e, + len: 1 + }; + } + if (gB.isDigitCharacter(s)) { + n = 8; + do { + t += 1; + s = this.value.charCodeAt(e + t); + } while (gB.isDigitCharacter(s)); + this.pos += t; + return { + type: n, + pos: e, + len: t + }; + } + if (gB.isVariableCharacter(s)) { + n = 9; + do { + s = this.value.charCodeAt(e + ++t); + } while (gB.isVariableCharacter(s) || gB.isDigitCharacter(s)); + this.pos += t; + return { + type: n, + pos: e, + len: t + }; + } + n = 10; + do { + t += 1; + s = this.value.charCodeAt(e + t); + } while (!isNaN(s) && typeof gB.d[s] === "undefined" && !gB.isDigitCharacter(s) && !gB.isVariableCharacter(s)); + this.pos += t; + return { + type: n, + pos: e, + len: t + }; + } + }; + Nz = class { + constructor() { + this.d = []; + } + appendChild(i) { + if (i instanceof g1 && this.d[this.d.length - 1] instanceof g1) { + this.d[this.d.length - 1].value += i.value; + } else { + i.parent = this; + this.d.push(i); + } + return this; + } + replace(i, e) { + const { + parent: t + } = i; + const s = t.children.indexOf(i); + const n = t.children.slice(0); + n.splice(s, 1, ...e); + t.d = n; + (function r(o, a) { + for (const l of o) { + l.parent = a; + r(l.children, l); + } + })(e, t); + } + get children() { + return this.d; + } + get rightMostDescendant() { + if (this.d.length > 0) { + return this.d[this.d.length - 1].rightMostDescendant; + } else { + return this; + } + } + get snippet() { + let i = this; + while (true) { + if (!i) { + return; + } + if (i instanceof Uct) { + return i; + } + i = i.parent; + } + } + toString() { + return this.children.reduce((i, e) => i + e.toString(), ""); + } + len() { + return 0; + } + }; + g1 = class Y3i extends Nz { + static escape(e) { + return e.replace(/\$|}|\\/g, "\\$&"); + } + constructor(e) { + super(); + this.value = e; + } + toString() { + return this.value; + } + toTextmateString() { + return Y3i.escape(this.value); + } + len() { + return this.value.length; + } + clone() { + return new Y3i(this.value); + } + }; + pVt = class extends Nz {}; + XI = class kOn extends pVt { + static compareByIndex(e, t) { + if (e.index === t.index) { + return 0; + } else if (e.isFinalTabstop) { + return 1; + } else if (t.isFinalTabstop || e.index < t.index) { + return -1; + } else if (e.index > t.index) { + return 1; + } else { + return 0; + } + } + constructor(e) { + super(); + this.index = e; + } + get isFinalTabstop() { + return this.index === 0; + } + get choice() { + if (this.d.length === 1 && this.d[0] instanceof Bme) { + return this.d[0]; + } else { + return undefined; + } + } + toTextmateString() { + let e = ""; + if (this.transform) { + e = this.transform.toTextmateString(); + } + if (this.children.length === 0 && !this.transform) { + return `$${this.index}`; + } else if (this.children.length === 0) { + return `\${${this.index}${e}}`; + } else if (this.choice) { + return `\${${this.index}|${this.choice.toTextmateString()}|${e}}`; + } else { + return `\${${this.index}:${this.children.map(t => t.toTextmateString()).join("")}${e}}`; + } + } + clone() { + const e = new kOn(this.index); + if (this.transform) { + e.transform = this.transform.clone(); + } + e.d = this.children.map(t => t.clone()); + return e; + } + }; + Bme = class EOn extends Nz { + constructor() { + super(...arguments); + this.options = []; + } + appendChild(e) { + if (e instanceof g1) { + e.parent = this; + this.options.push(e); + } + return this; + } + toString() { + return this.options[0].value; + } + toTextmateString() { + return this.options.map(e => e.value.replace(/\||,|\\/g, "\\$&")).join(","); + } + len() { + return this.options[0].len(); + } + clone() { + const e = new EOn(); + this.options.forEach(e.appendChild, e); + return e; + } + }; + Aus = class IOn extends Nz { + constructor() { + super(...arguments); + this.regexp = new RegExp(""); + } + resolve(e) { + const t = this; + let s = false; + let n = e.replace(this.regexp, function () { + s = true; + return t.f(Array.prototype.slice.call(arguments, 0, -2)); + }); + if (!s && this.d.some(r => r instanceof TF && !!r.elseValue)) { + n = this.f([]); + } + return n; + } + f(e) { + let t = ""; + for (const s of this.d) { + if (s instanceof TF) { + let n = e[s.index] || ""; + n = s.resolve(n); + t += n; + } else { + t += s.toString(); + } + } + return t; + } + toString() { + return ""; + } + toTextmateString() { + return `/${this.regexp.source}/${this.children.map(e => e.toTextmateString())}/${(this.regexp.ignoreCase ? "i" : "") + (this.regexp.global ? "g" : "")}`; + } + clone() { + const e = new IOn(); + e.regexp = new RegExp(this.regexp.source, (this.regexp.ignoreCase ? "i" : "") + (this.regexp.global ? "g" : "")); + e.d = this.children.map(t => t.clone()); + return e; + } + }; + TF = class DOn extends Nz { + constructor(e, t, s, n) { + super(); + this.index = e; + this.shorthandName = t; + this.ifValue = s; + this.elseValue = n; + } + resolve(e) { + if (this.shorthandName === "upcase") { + if (e) { + return e.toLocaleUpperCase(); + } else { + return ""; + } + } else if (this.shorthandName === "downcase") { + if (e) { + return e.toLocaleLowerCase(); + } else { + return ""; + } + } else if (this.shorthandName === "capitalize") { + if (e) { + return e[0].toLocaleUpperCase() + e.substr(1); + } else { + return ""; + } + } else if (this.shorthandName === "pascalcase") { + if (e) { + return this.f(e); + } else { + return ""; + } + } else if (this.shorthandName === "camelcase") { + if (e) { + return this.g(e); + } else { + return ""; + } + } else if (e && typeof this.ifValue == "string") { + return this.ifValue; + } else if (!e && typeof this.elseValue == "string") { + return this.elseValue; + } else { + return e || ""; + } + } + f(e) { + const t = e.match(/[a-z0-9]+/gi); + if (t) { + return t.map(s => s.charAt(0).toUpperCase() + s.substr(1)).join(""); + } else { + return e; + } + } + g(e) { + const t = e.match(/[a-z0-9]+/gi); + if (t) { + return t.map((s, n) => n === 0 ? s.charAt(0).toLowerCase() + s.substr(1) : s.charAt(0).toUpperCase() + s.substr(1)).join(""); + } else { + return e; + } + } + toTextmateString() { + let e = "${"; + e += this.index; + if (this.shorthandName) { + e += `:/${this.shorthandName}`; + } else if (this.ifValue && this.elseValue) { + e += `:?${this.ifValue}:${this.elseValue}`; + } else if (this.ifValue) { + e += `:+${this.ifValue}`; + } else if (this.elseValue) { + e += `:-${this.elseValue}`; + } + e += "}"; + return e; + } + clone() { + return new DOn(this.index, this.shorthandName, this.ifValue, this.elseValue); + } + }; + Ume = class TOn extends pVt { + constructor(e) { + super(); + this.name = e; + } + resolve(e) { + let t = e.resolve(this); + if (this.transform) { + t = this.transform.resolve(t || ""); + } + if (t !== undefined) { + this.d = [new g1(t)]; + return true; + } else { + return false; + } + } + toTextmateString() { + let e = ""; + if (this.transform) { + e = this.transform.toTextmateString(); + } + if (this.children.length === 0) { + return `\${${this.name}${e}}`; + } else { + return `\${${this.name}:${this.children.map(t => t.toTextmateString()).join("")}${e}}`; + } + } + clone() { + const e = new TOn(this.name); + if (this.transform) { + e.transform = this.transform.clone(); + } + e.d = this.children.map(t => t.clone()); + return e; + } + }; + Uct = class POn extends Nz { + get placeholderInfo() { + if (!this.f) { + const e = []; + let t; + this.walk(function (s) { + if (s instanceof XI) { + e.push(s); + t = !t || t.index < s.index ? s : t; + } + return true; + }); + this.f = { + all: e, + last: t + }; + } + return this.f; + } + get placeholders() { + const { + all: e + } = this.placeholderInfo; + return e; + } + offset(e) { + let t = 0; + let s = false; + this.walk(n => n === e ? (s = true, false) : (t += n.len(), true)); + if (s) { + return t; + } else { + return -1; + } + } + fullLen(e) { + let t = 0; + Rus([e], s => { + t += s.len(); + return true; + }); + return t; + } + enclosingPlaceholders(e) { + const t = []; + let { + parent: s + } = e; + while (s) { + if (s instanceof XI) { + t.push(s); + } + s = s.parent; + } + return t; + } + resolveVariables(e) { + this.walk(t => { + if (t instanceof Ume && t.resolve(e)) { + this.f = undefined; + } + return true; + }); + return this; + } + appendChild(e) { + this.f = undefined; + return super.appendChild(e); + } + replace(e, t) { + this.f = undefined; + return super.replace(e, t); + } + toTextmateString() { + return this.children.reduce((e, t) => e + t.toTextmateString(), ""); + } + clone() { + const e = new POn(); + this.d = this.children.map(t => t.clone()); + return e; + } + walk(e) { + Rus(this.children, e); + } + }; + oE = class LOn { + constructor() { + this.d = new Mus(); + this.f = { + type: 14, + pos: 0, + len: 0 + }; + } + static escape(e) { + return e.replace(/\$|}|\\/g, "\\$&"); + } + static asInsertText(e) { + return new LOn().parse(e).toString(); + } + static guessNeedsClipboard(e) { + return /\${?CLIPBOARD/.test(e); + } + parse(e, t, s) { + const n = new Uct(); + this.parseFragment(e, n); + this.ensureFinalTabstop(n, s ?? false, t ?? false); + return n; + } + parseFragment(e, t) { + const s = t.children.length; + this.d.text(e); + this.f = this.d.next(); + while (this.j(t)); + const n = new Map(); + const r = []; + t.walk(l => { + if (l instanceof XI) { + if (l.isFinalTabstop) { + n.set(0, undefined); + } else if (!n.has(l.index) && l.children.length > 0) { + n.set(l.index, l.children); + } else { + r.push(l); + } + } + return true; + }); + const o = (l, c) => { + const u = n.get(l.index); + if (!u) { + return; + } + const d = new XI(l.index); + d.transform = l.transform; + for (const h of u) { + const g = h.clone(); + d.appendChild(g); + if (g instanceof XI && n.has(g.index) && !c.has(g.index)) { + c.add(g.index); + o(g, c); + c.delete(g.index); + } + } + t.replace(l, [d]); + }; + const a = new Set(); + for (const l of r) { + o(l, a); + } + return t.children.slice(s); + } + ensureFinalTabstop(e, t, s) { + if (t || s && e.placeholders.length > 0) { + if (!e.placeholders.find(r => r.index === 0)) { + e.appendChild(new XI(0)); + } + } + } + g(e, t) { + if (e === undefined || this.f.type === e) { + const s = t ? this.d.tokenText(this.f) : true; + this.f = this.d.next(); + return s; + } + return false; + } + h(e) { + this.d.pos = e.pos + e.len; + this.f = e; + return false; + } + i(e) { + const t = this.f; + while (this.f.type !== e) { + if (this.f.type === 14) { + return false; + } + if (this.f.type === 5) { + const n = this.d.next(); + if (n.type !== 0 && n.type !== 4 && n.type !== 5) { + return false; + } + } + this.f = this.d.next(); + } + const s = this.d.value.substring(t.pos, this.f.pos).replace(/\\(\$|}|\\)/g, "$1"); + this.f = this.d.next(); + return s; + } + j(e) { + return this.k(e) || this.l(e) || this.m(e) || this.o(e) || this.s(e); + } + k(e) { + let t; + if (t = this.g(5, true)) { + t = this.g(0, true) || this.g(4, true) || this.g(5, true) || t; + e.appendChild(new g1(t)); + return true; + } else { + return false; + } + } + l(e) { + let t; + const s = this.f; + if (this.g(0) && (t = this.g(9, true) || this.g(8, true))) { + e.appendChild(/^\d+$/.test(t) ? new XI(Number(t)) : new Ume(t)); + return true; + } else { + return this.h(s); + } + } + m(e) { + let t; + const s = this.f; + if (!this.g(0) || !this.g(3) || !(t = this.g(8, true))) { + return this.h(s); + } + const r = new XI(Number(t)); + if (this.g(1)) { + while (true) { + if (this.g(4)) { + e.appendChild(r); + return true; + } + if (!this.j(r)) { + e.appendChild(new g1("${" + t + ":")); + r.children.forEach(e.appendChild, e); + return true; + } + } + } else if (r.index > 0 && this.g(7)) { + const o = new Bme(); + while (true) { + if (this.n(o)) { + if (this.g(2)) { + continue; + } + if (this.g(7) && (r.appendChild(o), this.g(4))) { + e.appendChild(r); + return true; + } + } + this.h(s); + return false; + } + } else if (this.g(6)) { + if (this.q(r)) { + e.appendChild(r); + return true; + } else { + this.h(s); + return false; + } + } else if (this.g(4)) { + e.appendChild(r); + return true; + } else { + return this.h(s); + } + } + n(e) { + const t = this.f; + const s = []; + while (this.f.type !== 2 && this.f.type !== 7) { + let n; + if (n = this.g(5, true)) { + n = this.g(2, true) || this.g(7, true) || this.g(5, true) || n; + } else { + n = this.g(undefined, true); + } + if (!n) { + this.h(t); + return false; + } + s.push(n); + } + if (s.length === 0) { + this.h(t); + return false; + } else { + e.appendChild(new g1(s.join(""))); + return true; + } + } + o(e) { + let t; + const s = this.f; + if (!this.g(0) || !this.g(3) || !(t = this.g(9, true))) { + return this.h(s); + } + const r = new Ume(t); + if (this.g(1)) { + while (true) { + if (this.g(4)) { + e.appendChild(r); + return true; + } + if (!this.j(r)) { + e.appendChild(new g1("${" + t + ":")); + r.children.forEach(e.appendChild, e); + return true; + } + } + } else if (this.g(6)) { + if (this.q(r)) { + e.appendChild(r); + return true; + } else { + this.h(s); + return false; + } + } else if (this.g(4)) { + e.appendChild(r); + return true; + } else { + return this.h(s); + } + } + q(e) { + const t = new Aus(); + let s = ""; + let n = ""; + while (!this.g(6)) { + let r; + if (r = this.g(5, true)) { + r = this.g(6, true) || r; + s += r; + continue; + } + if (this.f.type !== 14) { + s += this.g(undefined, true); + continue; + } + return false; + } + while (!this.g(6)) { + let r; + if (r = this.g(5, true)) { + r = this.g(5, true) || this.g(6, true) || r; + t.appendChild(new g1(r)); + continue; + } + if (!this.r(t) && !this.s(t)) { + return false; + } + } + while (!this.g(4)) { + if (this.f.type !== 14) { + n += this.g(undefined, true); + continue; + } + return false; + } + try { + t.regexp = new RegExp(s, n); + } catch { + return false; + } + e.transform = t; + return true; + } + r(e) { + const t = this.f; + if (!this.g(0)) { + return false; + } + let s = false; + if (this.g(3)) { + s = true; + } + const n = this.g(8, true); + if (n) { + if (s) { + if (this.g(4)) { + e.appendChild(new TF(Number(n))); + return true; + } + if (!this.g(1)) { + this.h(t); + return false; + } + } else { + e.appendChild(new TF(Number(n))); + return true; + } + } else { + this.h(t); + return false; + } + if (this.g(6)) { + const r = this.g(9, true); + if (!r || !this.g(4)) { + this.h(t); + return false; + } else { + e.appendChild(new TF(Number(n), r)); + return true; + } + } else if (this.g(11)) { + const r = this.i(4); + if (r) { + e.appendChild(new TF(Number(n), undefined, r, undefined)); + return true; + } + } else if (this.g(12)) { + const r = this.i(4); + if (r) { + e.appendChild(new TF(Number(n), undefined, undefined, r)); + return true; + } + } else if (this.g(13)) { + const r = this.i(1); + if (r) { + const o = this.i(4); + if (o) { + e.appendChild(new TF(Number(n), undefined, r, o)); + return true; + } + } + } else { + const r = this.i(4); + if (r) { + e.appendChild(new TF(Number(n), undefined, undefined, r)); + return true; + } + } + this.h(t); + return false; + } + s(e) { + if (this.f.type !== 14) { + e.appendChild(new g1(this.d.tokenText(this.f))); + this.g(undefined); + return true; + } else { + return false; + } + } + }; + } +}); +function $us(i, e, t) { + if (typeof t.insertText == "string" ? t.insertText === "" : t.insertText.snippet === "") { + return { + edits: t.additionalEdit?.edits ?? [] + }; + } else { + return { + edits: [...e.map(s => new Ff(i, { + range: s, + text: typeof t.insertText == "string" ? oE.escape(t.insertText) + "$0" : t.insertText.snippet, + insertAsSnippet: true + })), ...(t.additionalEdit?.edits ?? [])] + }; + } +} +function Fus(i) { + function e(o, a) { + if ("mimeType" in o) { + return o.mimeType === a.handledMimeType; + } else { + return !!a.kind && o.kind.contains(a.kind); + } + } + const t = new Map(); + for (const o of i) { + for (const a of o.yieldTo ?? []) { + for (const l of i) { + if (l !== o && e(a, l)) { + let c = t.get(o); + if (!c) { + c = []; + t.set(o, c); + } + c.push(l); + } + } + } + } + if (!t.size) { + return Array.from(i); + } + const s = new Set(); + const n = []; + function r(o) { + if (!o.length) { + return []; + } + const a = o[0]; + if (n.includes(a)) { + console.warn("Yield to cycle detected", a); + return o; + } + if (s.has(a)) { + return r(o.slice(1)); + } + let l = []; + const c = t.get(a); + if (c) { + n.push(a); + l = r(c); + n.pop(); + } + s.add(a); + return [...l, a, ...r(o.slice(1))]; + } + return r(Array.from(i)); +} +var mVt = ue({ + "out-build/vs/editor/contrib/dropOrPasteInto/browser/edit.js"() { + "use strict"; + + yf(); + JT(); + } +}); +var Wct; +var bVt; +var Ous; +var qQn = ue({ + "out-build/vs/editor/contrib/editorState/browser/keybindingCancellation.js"() { + "use strict"; + + en(); + Ee(); + ri(); + Av(); + te(); + It(); + X(); + Wct = Ve("IEditorCancelService"); + bVt = new fe("cancellableOperation", false, f(1016, null)); + it(Wct, class { + constructor() { + this.a = new WeakMap(); + } + add(i, e) { + let t = this.a.get(i); + if (!t) { + t = i.invokeWithinContext(n => { + const r = bVt.bindTo(n.get(Ne)); + const o = new hp(); + return { + key: r, + tokens: o + }; + }); + this.a.set(i, t); + } + let s; + t.key.set(true); + s = t.tokens.push(e); + return () => { + if (s) { + s(); + t.key.set(!t.tokens.isEmpty()); + s = undefined; + } + }; + } + cancel(i) { + const e = this.a.get(i); + if (!e) { + return; + } + const t = e.tokens.pop(); + if (t) { + t.cancel(); + e.key.set(!e.tokens.isEmpty()); + } + } + }, 1); + Ous = class extends Xi { + constructor(i, e) { + super(e); + this.editor = i; + this.a = i.invokeWithinContext(t => t.get(Wct).add(i, this)); + } + dispose() { + this.a(); + super.dispose(); + } + }; + Sn(new class extends Wm { + constructor() { + super({ + id: "editor.cancelOperation", + kbOpts: { + weight: 100, + primary: 9 + }, + precondition: bVt + }); + } + runEditorCommand(i, e) { + i.get(Wct).cancel(e); + } + }()); + } +}); +var _us; +var Wme; +var J4; +var Vme; +var GM = ue({ + "out-build/vs/editor/contrib/editorState/browser/editorState.js"() { + "use strict"; + + $i(); + yt(); + ri(); + q(); + qQn(); + (function (i) { + i[i.Value = 1] = "Value"; + i[i.Selection = 2] = "Selection"; + i[i.Position = 4] = "Position"; + i[i.Scroll = 8] = "Scroll"; + })(_us ||= {}); + Wme = class X3i { + constructor(e, t) { + this.a = t; + if (this.a & 1) { + const s = e.getModel(); + this.d = s ? Fv("{0}#{1}", s.uri.toString(), s.getVersionId()) : null; + } else { + this.d = null; + } + if (this.a & 4) { + this.b = e.getPosition(); + } else { + this.b = null; + } + if (this.a & 2) { + this.c = e.getSelection(); + } else { + this.c = null; + } + if (this.a & 8) { + this.f = e.getScrollLeft(); + this.g = e.getScrollTop(); + } else { + this.f = -1; + this.g = -1; + } + } + h(e) { + if (!(e instanceof X3i)) { + return false; + } + const t = e; + return this.d === t.d && this.f === t.f && this.g === t.g && (!!this.b || !t.b) && (!this.b || !!t.b) && (!this.b || !t.b || !!this.b.equals(t.b)) && (!!this.c || !t.c) && (!this.c || !!t.c) && (!this.c || !t.c || !!this.c.equalsRange(t.c)); + } + validate(e) { + return this.h(new X3i(e, this.a)); + } + }; + J4 = class extends Ous { + constructor(i, e, t, s) { + super(i, s); + this.b = new Q(); + if (e & 4) { + this.b.add(i.onDidChangeCursorPosition(n => { + if (!t || !Z.containsPosition(t, n.position)) { + this.cancel(); + } + })); + } + if (e & 2) { + this.b.add(i.onDidChangeCursorSelection(n => { + if (!t || !Z.containsRange(t, n.selection)) { + this.cancel(); + } + })); + } + if (e & 8) { + this.b.add(i.onDidScrollChange(n => this.cancel())); + } + if (e & 1) { + this.b.add(i.onDidChangeModel(n => this.cancel())); + this.b.add(i.onDidChangeModelContent(n => this.cancel())); + } + } + dispose() { + this.b.dispose(); + super.dispose(); + } + }; + Vme = class extends Xi { + constructor(i, e) { + super(e); + this.a = i.onDidChangeContent(() => this.cancel()); + } + dispose() { + this.a.dispose(); + super.dispose(); + } + }; + } +}); +var jQn = ue({ + "out-build/vs/editor/contrib/inlineProgress/browser/inlineProgressWidget.css"() {} +}); +var Bus; +var Uus; +var Hme; +var vVt = ue({ + "out-build/vs/editor/contrib/inlineProgress/browser/inlineProgress.js"() { + "use strict"; + + xe(); + nt(); + He(); + q(); + $i(); + Rt(); + jQn(); + yt(); + Ya(); + te(); + Bus = Cr.register({ + description: "inline-progress-widget", + stickiness: 1, + showIfCollapsed: true, + after: { + content: s9, + inlineClassName: "inline-editor-progress-decoration", + inlineClassNameAffectsLetterSpacing: true + } + }); + Uus = class ROn extends H { + static { + this.a = "editor.widget.inlineProgressWidget"; + } + constructor(e, t, s, n, r) { + super(); + this.f = e; + this.g = t; + this.h = s; + this.j = r; + this.allowEditorOverflow = false; + this.suppressMouseDown = true; + this.m(n); + this.g.addContentWidget(this); + this.g.layoutContentWidget(this); + } + m(e) { + this.b = G(".inline-progress-widget"); + this.b.role = "button"; + this.b.title = e; + const t = G("span.icon"); + this.b.append(t); + t.classList.add(...le.asClassNameArray(A.loading), "codicon-modifier-spin"); + const s = () => { + const n = this.g.getOption(68); + this.b.style.height = `${n}px`; + this.b.style.width = `${Math.ceil(n * 0.8)}px`; + }; + s(); + this.D(this.g.onDidChangeConfiguration(n => { + if (n.hasChanged(54) || n.hasChanged(68)) { + s(); + } + })); + this.D(Ce(this.b, Oe.CLICK, n => { + this.j.cancel(); + })); + } + getId() { + return ROn.a + "." + this.f; + } + getDomNode() { + return this.b; + } + getPosition() { + return { + position: { + lineNumber: this.h.startLineNumber, + column: this.h.startColumn + }, + preference: [0] + }; + } + dispose() { + super.dispose(); + this.g.removeContentWidget(this); + } + }; + Hme = class extends H { + constructor(e, t, s) { + super(); + this.m = e; + this.n = t; + this.q = s; + this.a = 500; + this.b = this.D(new ki()); + this.g = this.D(new ki()); + this.h = 0; + this.f = t.createDecorationsCollection(); + } + dispose() { + super.dispose(); + this.f.clear(); + } + async showWhile(e, t, s, n, r) { + const o = this.h++; + this.j = o; + this.r(); + this.b.value = Gd(() => { + const a = Z.fromPositions(e); + if (this.f.set([{ + range: a, + options: Bus + }]).length > 0) { + this.g.value = this.q.createInstance(Uus, this.m, this.n, a, t, n); + } + }, r ?? this.a); + try { + return await s; + } finally { + if (this.j === o) { + this.r(); + this.j = undefined; + } + } + } + r() { + this.b.clear(); + this.f.clear(); + this.g.clear(); + } + }; + Hme = __decorate([__param(2, re)], Hme); + } +}); +var zQn = ue({ + "out-build/vs/editor/contrib/message/browser/messageController.css"() {} +}); +var JQn = ue({ + "out-build/vs/editor/browser/widget/markdownRenderer/browser/renderedMarkdown.css"() {} +}); +async function qme(i, e, t) { + try { + return await i.open(e, { + fromUserGesture: true, + allowContributedOpeners: true, + allowCommands: GQn(t) + }); + } catch (s) { + xs(s); + return false; + } +} +function GQn(i) { + if (i === true) { + return true; + } else if (i && Array.isArray(i.enabledCommands)) { + return i.enabledCommands; + } else { + return false; + } +} +var yVt; +var Cb; +var tv = ue({ + "out-build/vs/editor/browser/widget/markdownRenderer/browser/markdownRenderer.js"() { + "use strict"; + + qy(); + KL(); + Ut(); + pe(); + q(); + JQn(); + s1(); + wn(); + gf(); + u7(); + gs(); + Cb = class { + static { + yVt = this; + } + static { + this._ttpTokenizer = GL("tokenizeToString", { + createHTML(e) { + return e; + } + }); + } + constructor(e, t, s) { + this.b = e; + this.c = t; + this.d = s; + this.a = new B(); + this.onDidRenderAsync = this.a.event; + } + dispose() { + this.a.dispose(); + } + render(e, t, s) { + if (!e) { + return { + element: document.createElement("span"), + dispose: () => {} + }; + } + const n = new Q(); + const r = n.add(EF(e, { + ...this.f(e, n), + ...t + }, s)); + r.element.classList.add("rendered-markdown"); + return { + element: r.element, + dispose: () => n.dispose() + }; + } + f(e, t) { + return { + codeBlockRenderer: async (s, n) => { + let r; + if (s) { + r = this.c.getLanguageIdByLanguageName(s); + } else if (this.b.editor) { + r = this.b.editor.getModel()?.getLanguageId(); + } + r ||= Ju; + const o = await Ylt(this.c, n, r); + const a = document.createElement("span"); + a.innerHTML = yVt._ttpTokenizer?.createHTML(o) ?? o; + if (this.b.editor) { + const l = this.b.editor.getOption(52); + Hm(a, l); + } else if (this.b.codeBlockFontFamily) { + a.style.fontFamily = this.b.codeBlockFontFamily; + } + if (this.b.codeBlockFontSize !== undefined) { + a.style.fontSize = this.b.codeBlockFontSize; + } + return a; + }, + asyncRenderCallback: () => this.a.fire(), + actionHandler: { + callback: s => this.g(s, e), + disposables: t + } + }; + } + async g(e, t) { + await qme(this.d, e, t.isTrusted); + } + }; + Cb = yVt = __decorate([__param(1, As), __param(2, os)], Cb); + } +}); +var Vct; +var iv; +var Wus; +var wVt; +var PF = ue({ + "out-build/vs/editor/contrib/message/browser/messageController.js"() { + "use strict"; + + qy(); + wc(); + pe(); + No(); + q(); + zQn(); + en(); + yt(); + tv(); + X(); + Ee(); + gs(); + xe(); + iv = class { + static { + Vct = this; + } + static { + this.ID = "editor.contrib.messageController"; + } + static { + this.MESSAGE_VISIBLE = new fe("messageVisible", false, f(1336, null)); + } + static get(e) { + return e.getContribution(Vct.ID); + } + constructor(e, t, s) { + this.i = s; + this.d = new ki(); + this.f = new Q(); + this.h = false; + this.a = e; + this.b = Vct.MESSAGE_VISIBLE.bindTo(t); + } + dispose() { + this.g?.dispose(); + this.f.dispose(); + this.d.dispose(); + this.b.reset(); + } + isVisible() { + return this.b.get(); + } + showMessage(e, t) { + Fc(Sg(e) ? e.value : e); + this.b.set(true); + this.d.clear(); + this.f.clear(); + this.g = Sg(e) ? EF(e, { + actionHandler: { + callback: n => { + this.closeMessage(); + qme(this.i, n, Sg(e) ? e.isTrusted : undefined); + }, + disposables: this.f + } + }) : undefined; + this.d.value = new wVt(this.a, t, typeof e == "string" ? e : this.g.element); + this.f.add(de.debounce(this.a.onDidBlurEditorText, (n, r) => r, 0)(() => { + if (!this.h && (!this.d.value || !Kd(Tu(), this.d.value.getDomNode()))) { + this.closeMessage(); + } + })); + this.f.add(this.a.onDidChangeCursorPosition(() => this.closeMessage())); + this.f.add(this.a.onDidDispose(() => this.closeMessage())); + this.f.add(this.a.onDidChangeModel(() => this.closeMessage())); + this.f.add(Ce(this.d.value.getDomNode(), Oe.MOUSE_ENTER, () => this.h = true, true)); + this.f.add(Ce(this.d.value.getDomNode(), Oe.MOUSE_LEAVE, () => this.h = false, true)); + let s; + this.f.add(this.a.onMouseMove(n => { + if (n.target.position) { + if (s) { + if (!s.containsPosition(n.target.position)) { + this.closeMessage(); + } + } else { + s = new Z(t.lineNumber - 3, 1, n.target.position.lineNumber + 3, 1); + } + } + })); + } + closeMessage() { + this.b.reset(); + this.f.clear(); + if (this.d.value) { + this.f.add(wVt.fadeOut(this.d.value)); + } + } + }; + iv = Vct = __decorate([__param(1, Ne), __param(2, os)], iv); + Wus = Wm.bindToContribution(iv.get); + Sn(new Wus({ + id: "leaveEditorMessage", + precondition: iv.MESSAGE_VISIBLE, + handler: i => i.closeMessage(), + kbOpts: { + weight: 130, + primary: 9 + } + })); + wVt = class { + static fadeOut(i) { + const e = () => { + i.dispose(); + clearTimeout(t); + i.getDomNode().removeEventListener("animationend", e); + }; + const t = setTimeout(e, 110); + i.getDomNode().addEventListener("animationend", e); + i.getDomNode().classList.add("fadeOut"); + return { + dispose: e + }; + } + constructor(i, { + lineNumber: e, + column: t + }, s) { + this.allowEditorOverflow = true; + this.suppressMouseDown = false; + this.a = i; + this.a.revealLinesInCenterIfOutsideViewport(e, e, 0); + this.b = { + lineNumber: e, + column: t + }; + this.d = document.createElement("div"); + this.d.classList.add("monaco-editor-overlaymessage"); + this.d.style.marginLeft = "-6px"; + const n = document.createElement("div"); + n.classList.add("anchor", "top"); + this.d.appendChild(n); + const r = document.createElement("div"); + if (typeof s == "string") { + r.classList.add("message"); + r.textContent = s; + } else { + s.classList.add("message"); + r.appendChild(s); + } + this.d.appendChild(r); + const o = document.createElement("div"); + o.classList.add("anchor", "below"); + this.d.appendChild(o); + this.a.addContentWidget(this); + this.d.classList.add("fadeIn"); + } + dispose() { + this.a.removeContentWidget(this); + } + getId() { + return "messageoverlay"; + } + getDomNode() { + return this.d; + } + getPosition() { + return { + position: this.b, + preference: [1, 2], + positionAffinity: 1 + }; + } + afterRender(i) { + this.d.classList.toggle("below", i === 2); + } + }; + bo(iv.ID, iv, 4); + } +}); +var KQn = ue({ + "out-build/vs/base/browser/ui/button/button.css"() {} +}); +var Vus; +var Ql; +var Rie; +var CVt; +var G4; +var Wd = ue({ + "out-build/vs/base/browser/ui/button/button.js"() { + "use strict"; + + xe(); + Rfe(); + _a(); + qy(); + hh(); + oa(); + vd(); + Fs(); + He(); + Zo(); + pe(); + No(); + q(); + Rt(); + KQn(); + X(); + aS(); + Vus = { + buttonBackground: "#0E639C", + buttonHoverBackground: "#006BB3", + buttonSeparator: ut.white.toString(), + buttonForeground: ut.white.toString(), + buttonBorder: undefined, + buttonSecondaryBackground: undefined, + buttonSecondaryForeground: undefined, + buttonSecondaryHoverBackground: undefined + }; + Ql = class extends H { + get onDidClick() { + return this.j.event; + } + get onDidEscape() { + return this.m.event; + } + constructor(i, e) { + super(); + this.c = ""; + this.j = this.D(new B()); + this.m = this.D(new B()); + this.a = e; + this.b = document.createElement("a"); + this.b.classList.add("monaco-button"); + this.b.tabIndex = 0; + this.b.setAttribute("role", "button"); + this.b.classList.toggle("secondary", !!e.secondary); + const t = e.secondary ? e.buttonSecondaryBackground : e.buttonBackground; + const s = e.secondary ? e.buttonSecondaryForeground : e.buttonForeground; + this.b.style.color = s || ""; + this.b.style.backgroundColor = t || ""; + if (e.supportShortLabel) { + this.g = document.createElement("div"); + this.g.classList.add("monaco-button-label-short"); + this.b.appendChild(this.g); + this.f = document.createElement("div"); + this.f.classList.add("monaco-button-label"); + this.b.appendChild(this.f); + this.b.classList.add("monaco-text-button-with-short-label"); + } + if (typeof e.title == "string") { + this.setTitle(e.title); + } + if (typeof e.ariaLabel == "string") { + this.b.setAttribute("aria-label", e.ariaLabel); + } + i.appendChild(this.b); + this.D(bd.addTarget(this.b)); + [Oe.CLICK, ul.Tap].forEach(n => { + this.D(Ce(this.b, n, r => { + if (!this.enabled) { + yn.stop(r); + return; + } + this.j.fire(r); + })); + }); + this.D(Ce(this.b, Oe.KEY_DOWN, n => { + const r = new wr(n); + let o = false; + if (this.enabled && (r.equals(3) || r.equals(10))) { + this.j.fire(n); + o = true; + } else if (r.equals(9)) { + this.m.fire(n); + this.b.blur(); + o = true; + } + if (o) { + yn.stop(r, true); + } + })); + this.D(Ce(this.b, Oe.MOUSE_OVER, n => { + if (!this.b.classList.contains("disabled")) { + this.r(true); + } + })); + this.D(Ce(this.b, Oe.MOUSE_OUT, n => { + this.r(false); + })); + this.n = this.D(Pu(this.b)); + this.D(this.n.onDidFocus(() => { + if (this.enabled) { + this.r(true); + } + })); + this.D(this.n.onDidBlur(() => { + if (this.enabled) { + this.r(false); + } + })); + } + dispose() { + super.dispose(); + this.b.remove(); + } + q(i) { + const e = []; + for (let t of Vu(i)) { + if (typeof t == "string") { + t = t.trim(); + if (t === "") { + continue; + } + const s = document.createElement("span"); + s.textContent = t; + e.push(s); + } else { + e.push(t); + } + } + return e; + } + r(i) { + let e; + if (this.a.secondary) { + e = i ? this.a.buttonSecondaryHoverBackground : this.a.buttonSecondaryBackground; + } else { + e = i ? this.a.buttonHoverBackground : this.a.buttonBackground; + } + if (e) { + this.b.style.backgroundColor = e; + } + } + get element() { + return this.b; + } + set label(i) { + if (this.c === i || Sg(this.c) && Sg(i) && ics(this.c, i)) { + return; + } + this.b.classList.add("monaco-text-button"); + const e = this.a.supportShortLabel ? this.f : this.b; + if (Sg(i)) { + const s = EF(i, { + inline: true + }); + s.dispose(); + const n = s.element.querySelector("p")?.innerHTML; + if (n) { + const r = H2.sanitize(n, { + ADD_TAGS: ["b", "i", "u", "code", "span"], + ALLOWED_ATTR: ["class"], + RETURN_TRUSTED_TYPE: true + }); + e.innerHTML = r; + } else { + mo(e); + } + } else if (this.a.supportIcons) { + mo(e, ...this.q(i)); + } else { + e.textContent = i; + } + let t = ""; + if (typeof this.a.title == "string") { + t = this.a.title; + } else if (this.a.title) { + t = Ez(i); + } + this.setTitle(t); + if (typeof this.a.ariaLabel == "string") { + this.b.setAttribute("aria-label", this.a.ariaLabel); + } else if (this.a.ariaLabel) { + this.b.setAttribute("aria-label", t); + } + this.c = i; + } + get label() { + return this.c; + } + set labelShort(i) { + if (!!this.a.supportShortLabel && !!this.g) { + if (this.a.supportIcons) { + mo(this.g, ...this.q(i)); + } else { + this.g.textContent = i; + } + } + } + set icon(i) { + this.b.classList.add(...le.asClassNameArray(i)); + } + set enabled(i) { + if (i) { + this.b.classList.remove("disabled"); + this.b.setAttribute("aria-disabled", String(false)); + this.b.tabIndex = 0; + } else { + this.b.classList.add("disabled"); + this.b.setAttribute("aria-disabled", String(true)); + } + } + get enabled() { + return !this.b.classList.contains("disabled"); + } + set checked(i) { + if (i) { + this.b.classList.add("checked"); + this.b.setAttribute("aria-checked", "true"); + } else { + this.b.classList.remove("checked"); + this.b.setAttribute("aria-checked", "false"); + } + } + get checked() { + return this.b.classList.contains("checked"); + } + setTitle(i) { + if (!this.h && i !== "") { + this.h = this.D(d1().setupManagedHover(this.a.hoverDelegate ?? cr("element"), this.b, i)); + } else if (this.h) { + this.h.update(i); + } + } + focus() { + this.b.focus(); + } + hasFocus() { + return Jg(this.b); + } + }; + Rie = class extends H { + constructor(i, e) { + super(); + this.h = this.D(new B()); + this.onDidClick = this.h.event; + this.element = document.createElement("div"); + this.element.classList.add("monaco-button-dropdown"); + i.appendChild(this.element); + if (!e.hoverDelegate) { + e = { + ...e, + hoverDelegate: this.D(Hy()) + }; + } + this.a = this.D(new Ql(this.element, e)); + this.D(this.a.onDidClick(n => this.h.fire(n))); + this.b = this.D(new Yt("primaryAction", Ez(this.a.label), undefined, true, async () => this.h.fire(undefined))); + this.f = document.createElement("div"); + this.f.classList.add("monaco-button-dropdown-separator"); + this.g = document.createElement("div"); + this.f.appendChild(this.g); + this.element.appendChild(this.f); + const t = e.buttonBorder; + if (t) { + this.f.style.borderTop = "1px solid " + t; + this.f.style.borderBottom = "1px solid " + t; + } + const s = e.secondary ? e.buttonSecondaryBackground : e.buttonBackground; + this.f.style.backgroundColor = s ?? ""; + this.g.style.backgroundColor = e.buttonSeparator ?? ""; + this.c = this.D(new Ql(this.element, { + ...e, + title: f(1, null), + supportIcons: true + })); + this.c.element.setAttribute("aria-haspopup", "true"); + this.c.element.setAttribute("aria-expanded", "false"); + this.c.element.classList.add("monaco-dropdown-button"); + this.c.icon = A.dropDownButton; + this.D(this.c.onDidClick(n => { + const r = Array.isArray(e.actions) ? e.actions : e.actions.getActions(); + e.contextMenuProvider.showContextMenu({ + getAnchor: () => this.c.element, + getActions: () => e.addPrimaryActionToDropdown === false ? [...r] : [this.b, ...r], + actionRunner: e.actionRunner, + onHide: () => this.c.element.setAttribute("aria-expanded", "false") + }); + this.c.element.setAttribute("aria-expanded", "true"); + })); + } + dispose() { + super.dispose(); + this.element.remove(); + } + set label(i) { + this.a.label = i; + this.b.label = i; + } + set icon(i) { + this.a.icon = i; + } + set enabled(i) { + this.a.enabled = i; + this.c.enabled = i; + this.element.classList.toggle("disabled", !i); + } + get enabled() { + return this.a.enabled; + } + set checked(i) { + this.a.checked = i; + } + get checked() { + return this.a.checked; + } + focus() { + this.a.focus(); + } + hasFocus() { + return this.a.hasFocus() || this.c.hasFocus(); + } + }; + CVt = class { + constructor(i, e) { + this.d = e; + this.b = document.createElement("div"); + this.b.classList.add("monaco-description-button"); + this.a = new Ql(this.b, e); + this.c = document.createElement("div"); + this.c.classList.add("monaco-button-description"); + this.b.appendChild(this.c); + i.appendChild(this.b); + } + get onDidClick() { + return this.a.onDidClick; + } + get element() { + return this.b; + } + set label(i) { + this.a.label = i; + } + set icon(i) { + this.a.icon = i; + } + get enabled() { + return this.a.enabled; + } + set enabled(i) { + this.a.enabled = i; + } + set checked(i) { + this.a.checked = i; + } + get checked() { + return this.a.checked; + } + focus() { + this.a.focus(); + } + hasFocus() { + return this.a.hasFocus(); + } + dispose() { + this.a.dispose(); + } + set description(i) { + if (this.d.supportIcons) { + mo(this.c, ...Vu(i)); + } else { + this.c.textContent = i; + } + } + }; + G4 = class { + constructor(i) { + this.c = i; + this.a = []; + this.b = new Q(); + } + dispose() { + this.b.dispose(); + } + get buttons() { + return this.a; + } + clear() { + this.b.clear(); + this.a.length = 0; + } + addButton(i) { + const e = this.b.add(new Ql(this.c, i)); + this.d(e); + return e; + } + addButtonWithDescription(i) { + const e = this.b.add(new CVt(this.c, i)); + this.d(e); + return e; + } + addButtonWithDropdown(i) { + const e = this.b.add(new Rie(this.c, i)); + this.d(e); + return e; + } + d(i) { + this.a.push(i); + const e = this.a.length - 1; + this.b.add(Ce(i.element, Oe.KEY_DOWN, t => { + const s = new wr(t); + let n = true; + let r; + if (s.equals(15)) { + r = e > 0 ? e - 1 : this.a.length - 1; + } else if (s.equals(17)) { + r = e === this.a.length - 1 ? 0 : e + 1; + } else { + n = false; + } + if (n && typeof r == "number") { + this.a[r].focus(); + yn.stop(t, true); + } + })); + } + }; + } +}); +var Hus = ue({ + "out-build/vs/platform/actionWidget/browser/actionWidget.css"() {} +}); +var YQn = ue({ + "out-build/vs/base/browser/ui/keybindingLabel/keybindingLabel.css"() {} +}); +var jme; +var SVt; +var oR; +var LF = ue({ + "out-build/vs/base/browser/ui/keybindingLabel/keybindingLabel.js"() { + "use strict"; + + xe(); + aS(); + oa(); + E7(); + q(); + Jr(); + YQn(); + X(); + jme = G; + SVt = { + keybindingLabelBackground: undefined, + keybindingLabelForeground: undefined, + keybindingLabelBorder: undefined, + keybindingLabelBottomBorder: undefined, + keybindingLabelShadow: undefined + }; + oR = class NOn extends H { + constructor(e, t, s) { + super(); + this.q = t; + this.g = new Set(); + this.f = s || Object.create(null); + const n = this.f.keybindingLabelForeground; + this.c = z(e, jme(".monaco-keybinding")); + if (n) { + this.c.style.color = n; + } + this.h = this.D(d1().setupManagedHover(cr("mouse"), this.c, "")); + this.n = false; + e.appendChild(this.c); + } + get element() { + return this.c; + } + set(e, t) { + if (!this.n || this.j !== e || !NOn.z(this.m, t)) { + this.j = e; + this.m = t; + this.r(); + } + } + r() { + this.s(); + if (this.j) { + const e = this.j.getChords(); + if (e[0]) { + this.t(this.c, e[0], this.m ? this.m.firstPart : null); + } + for (let s = 1; s < e.length; s++) { + z(this.c, jme("span.monaco-keybinding-key-chord-separator", undefined, " ")); + this.t(this.c, e[s], this.m ? this.m.chordPart : null); + } + const t = this.f.disableTitle ?? false ? undefined : this.j.getAriaLabel() || undefined; + this.h.update(t); + this.c.setAttribute("aria-label", t || ""); + } else if (this.f && this.f.renderUnboundKeybindings) { + this.w(this.c); + } + this.n = true; + } + s() { + Lr(this.c); + this.g.clear(); + } + t(e, t, s) { + const n = k7.modifierLabels[this.q]; + if (t.ctrlKey) { + this.u(e, n.ctrlKey, !!s?.ctrlKey, n.separator); + } + if (t.shiftKey) { + this.u(e, n.shiftKey, !!s?.shiftKey, n.separator); + } + if (t.altKey) { + this.u(e, n.altKey, !!s?.altKey, n.separator); + } + if (t.metaKey) { + this.u(e, n.metaKey, !!s?.metaKey, n.separator); + } + const r = t.keyLabel; + if (r) { + this.u(e, r, !!s?.keyCode, ""); + } + } + u(e, t, s, n) { + z(e, this.y(t, s ? ".highlight" : "")); + if (n) { + z(e, jme("span.monaco-keybinding-key-separator", undefined, n)); + } + } + w(e) { + z(e, this.y(f(25, null))); + } + y(e, t = "") { + const s = jme("span.monaco-keybinding-key" + t, undefined, e); + this.g.add(s); + if (this.f.keybindingLabelBackground) { + s.style.backgroundColor = this.f.keybindingLabelBackground; + } + if (this.f.keybindingLabelBorder) { + s.style.borderColor = this.f.keybindingLabelBorder; + } + if (this.f.keybindingLabelBottomBorder) { + s.style.borderBottomColor = this.f.keybindingLabelBottomBorder; + } + if (this.f.keybindingLabelShadow) { + s.style.boxShadow = `inset 0 -1px 0 ${this.f.keybindingLabelShadow}`; + } + return s; + } + static z(e, t) { + if (e === t || !e && !t) { + return true; + } else { + return !!e && !!t && Ul(e.firstPart, t.firstPart) && Ul(e.chordPart, t.chordPart); + } + } + }; + } +}); +function XQn(i) { + if (i.kind === "action") { + return i.label; + } +} +function qus(i) { + return i.replace(/\r\n|\r|\n/g, " "); +} +var xVt; +var kVt; +var jus; +var zus; +var Hct; +var Jus; +var EVt; +var qct; +var QQn = ue({ + "out-build/vs/platform/actionWidget/browser/actionList.js"() { + "use strict"; + + xe(); + LF(); + oS(); + ri(); + He(); + q(); + rt(); + Rt(); + Hus(); + X(); + ks(); + Fi(); + ya(); + Qs(); + xVt = "acceptSelectedCodeAction"; + kVt = "previewSelectedCodeAction"; + (function (i) { + i.Action = "action"; + i.Header = "header"; + })(jus ||= {}); + zus = class { + get templateId() { + return "header"; + } + renderTemplate(i) { + i.classList.add("group-header"); + const e = document.createElement("span"); + i.append(e); + return { + container: i, + text: e + }; + } + renderElement(i, e, t) { + t.text.textContent = i.group?.title ?? ""; + } + disposeTemplate(i) {} + }; + Hct = class { + get templateId() { + return "action"; + } + constructor(e, t) { + this.a = e; + this.b = t; + } + renderTemplate(e) { + e.classList.add(this.templateId); + const t = document.createElement("div"); + t.className = "icon"; + e.append(t); + const s = document.createElement("span"); + s.className = "title"; + e.append(s); + const n = new oR(e, Ia); + return { + container: e, + icon: t, + text: s, + keybinding: n + }; + } + renderElement(e, t, s) { + if (e.group?.icon) { + s.icon.className = le.asClassName(e.group.icon); + if (e.group.icon.color) { + s.icon.style.color = Ui(e.group.icon.color.id); + } + } else { + s.icon.className = le.asClassName(A.lightBulb); + s.icon.style.color = "var(--vscode-editorLightBulb-foreground)"; + } + if (!e.item || !e.label) { + return; + } + gM(!e.hideIcon, s.icon); + s.text.textContent = qus(e.label); + s.keybinding.set(e.keybinding); + gM(!!e.keybinding, s.keybinding.element); + const n = this.b.lookupKeybinding(xVt)?.getLabel(); + const r = this.b.lookupKeybinding(kVt)?.getLabel(); + s.container.classList.toggle("option-disabled", e.disabled); + if (e.disabled) { + s.container.title = e.label; + } else if (n && r) { + if (this.a && e.canPreview) { + s.container.title = f(1686, null, n, r); + } else { + s.container.title = f(1687, null, n); + } + } else { + s.container.title = ""; + } + } + disposeTemplate(e) { + e.keybinding.dispose(); + } + }; + Hct = __decorate([__param(1, oi)], Hct); + Jus = class extends UIEvent { + constructor() { + super("acceptSelectedAction"); + } + }; + EVt = class extends UIEvent { + constructor() { + super("previewSelectedAction"); + } + }; + qct = class extends H { + constructor(e, t, s, n, r, o) { + super(); + this.h = n; + this.j = r; + this.m = o; + this.b = 24; + this.c = 26; + this.g = this.D(new Xi()); + this.domNode = document.createElement("div"); + this.domNode.classList.add("actionList"); + const a = { + getHeight: l => l.kind === "header" ? this.c : this.b, + getTemplateId: l => l.kind + }; + this.a = this.D(new Cg(e, this.domNode, a, [new Hct(t, this.m), new zus()], { + keyboardSupport: false, + typeNavigationEnabled: true, + keyboardNavigationLabelProvider: { + getKeyboardNavigationLabel: XQn + }, + accessibilityProvider: { + getAriaLabel: l => { + if (l.kind === "action") { + let c = l.label ? qus(l?.label) : ""; + if (l.disabled) { + c = f(1688, null, c, l.disabled); + } + return c; + } + return null; + }, + getWidgetAriaLabel: () => f(1689, null), + getRole: l => l.kind === "action" ? "option" : "separator", + getWidgetRole: () => "listbox" + } + })); + this.a.style(Lz); + this.D(this.a.onMouseClick(l => this.t(l))); + this.D(this.a.onMouseOver(l => this.s(l))); + this.D(this.a.onDidChangeFocus(() => this.r())); + this.D(this.a.onDidChangeSelection(l => this.q(l))); + this.f = s; + this.a.splice(0, this.a.length, this.f); + if (this.a.length) { + this.focusNext(); + } + } + n(e) { + return !e.disabled && e.kind === "action"; + } + hide(e) { + this.h.onHide(e); + this.g.cancel(); + this.j.hideContextView(); + } + layout(e) { + const t = this.f.filter(l => l.kind === "header").length; + const n = this.f.length * this.b + t * this.c - t * this.b; + this.a.layout(n); + let r = e; + if (this.f.length >= 50) { + r = 380; + } else { + const l = this.f.map((c, u) => { + const d = this.domNode.ownerDocument.getElementById(this.a.getElementID(u)); + if (d) { + d.style.width = "auto"; + const h = d.getBoundingClientRect().width; + d.style.width = ""; + return h; + } + return 0; + }); + r = Math.max(...l, e); + } + const a = Math.min(n, this.domNode.ownerDocument.body.clientHeight * 0.7); + this.a.layout(a, r); + this.domNode.style.height = `${a}px`; + this.a.domFocus(); + return r; + } + focusPrevious() { + this.a.focusPrevious(1, true, undefined, this.n); + } + focusNext() { + this.a.focusNext(1, true, undefined, this.n); + } + acceptSelected(e) { + const t = this.a.getFocus(); + if (t.length === 0) { + return; + } + const s = t[0]; + const n = this.a.element(s); + if (!this.n(n)) { + return; + } + const r = e ? new EVt() : new Jus(); + this.a.setSelection([s], r); + } + q(e) { + if (!e.elements.length) { + return; + } + const t = e.elements[0]; + if (t.item && this.n(t)) { + this.h.onSelect(t.item, e.browserEvent instanceof EVt); + } else { + this.a.setSelection([]); + } + } + r() { + const e = this.a.getFocus(); + if (e.length === 0) { + return; + } + const t = e[0]; + const s = this.a.element(t); + this.h.onFocus?.(s.item); + } + async s(e) { + const t = e.element; + if (t && t.item && this.n(t)) { + if (this.h.onHover && !t.disabled && t.kind === "action") { + const s = await this.h.onHover(t.item, this.g.token); + t.canPreview = s ? s.canPreview : undefined; + } + if (e.index) { + this.a.splice(e.index, 1, [t]); + } + } + this.a.setFocus(typeof e.index == "number" ? [e.index] : []); + } + t(e) { + if (e.element && this.n(e.element)) { + this.a.setFocus([]); + } + } + }; + qct = __decorate([__param(4, Sc), __param(5, oi)], qct); + } +}); +var R7; +var RF; +var N7; +var Nie; +var IVt = ue({ + "out-build/vs/platform/actionWidget/browser/actionWidget.js"() { + "use strict"; + + xe(); + sl(); + q(); + Hus(); + X(); + QQn(); + Je(); + Ee(); + ks(); + It(); + te(); + Qs(); + he("actionBar.toggledBackground", R9, f(1690, null)); + R7 = { + Visible: new fe("codeActionMenuVisible", false, f(1691, null)) + }; + RF = Ve("actionWidgetService"); + N7 = class extends H { + get isVisible() { + return R7.Visible.getValue(this.c) || false; + } + constructor(e, t, s) { + super(); + this.b = e; + this.c = t; + this.f = s; + this.a = this.D(new ki()); + } + show(e, t, s, n, r, o, a) { + const l = R7.Visible.bindTo(this.c); + const c = this.f.createInstance(qct, e, t, s, n); + this.b.showContextView({ + getAnchor: () => r, + render: u => { + l.set(true); + return this.g(u, c, a ?? []); + }, + onHide: u => { + l.reset(); + this.j(u); + } + }, o, false); + } + acceptSelected(e) { + this.a.value?.acceptSelected(e); + } + focusPrevious() { + this.a?.value?.focusPrevious(); + } + focusNext() { + this.a?.value?.focusNext(); + } + hide(e) { + this.a.value?.hide(e); + this.a.clear(); + } + clear() { + this.a.clear(); + } + g(e, t, s) { + const n = document.createElement("div"); + n.classList.add("action-widget"); + e.appendChild(n); + this.a.value = t; + if (this.a.value) { + n.appendChild(this.a.value.domNode); + } else { + throw new Error("List has no value"); + } + const r = new Q(); + const o = document.createElement("div"); + const a = e.appendChild(o); + a.classList.add("context-view-block"); + r.add(Ce(a, Oe.MOUSE_DOWN, g => g.stopPropagation())); + const l = document.createElement("div"); + const c = e.appendChild(l); + c.classList.add("context-view-pointerBlock"); + r.add(Ce(c, Oe.POINTER_MOVE, () => c.remove())); + r.add(Ce(c, Oe.MOUSE_DOWN, () => c.remove())); + let u = 0; + if (s.length) { + const g = this.h(".action-widget-action-bar", s); + if (g) { + n.appendChild(g.getContainer().parentElement); + r.add(g); + u = g.getContainer().offsetWidth; + } + } + const d = this.a.value?.layout(u); + n.style.width = `${d}px`; + const h = r.add(Pu(e)); + r.add(h.onDidBlur(() => this.hide(true))); + return r; + } + h(e, t) { + if (!t.length) { + return; + } + const s = G(e); + const n = new ea(s); + n.push(t, { + icon: false, + label: true + }); + return n; + } + j(e) { + this.a.value?.hide(e); + } + }; + N7 = __decorate([__param(0, Sc), __param(1, Ne), __param(2, re)], N7); + it(RF, N7, 1); + Nie = 1100; + J(class extends se { + constructor() { + super({ + id: "hideCodeActionWidget", + title: W(1692, "Hide action widget"), + precondition: R7.Visible, + keybinding: { + weight: Nie, + primary: 9, + secondary: [1033] + } + }); + } + run(i) { + i.get(RF).hide(true); + } + }); + J(class extends se { + constructor() { + super({ + id: "selectPrevCodeAction", + title: W(1693, "Select previous action"), + precondition: R7.Visible, + keybinding: { + weight: Nie, + primary: 16, + secondary: [2064], + mac: { + primary: 16, + secondary: [2064, 302] + } + } + }); + } + run(i) { + const e = i.get(RF); + if (e instanceof N7) { + e.focusPrevious(); + } + } + }); + J(class extends se { + constructor() { + super({ + id: "selectNextCodeAction", + title: W(1694, "Select next action"), + precondition: R7.Visible, + keybinding: { + weight: Nie, + primary: 18, + secondary: [2066], + mac: { + primary: 18, + secondary: [2066, 300] + } + } + }); + } + run(i) { + const e = i.get(RF); + if (e instanceof N7) { + e.focusNext(); + } + } + }); + J(class extends se { + constructor() { + super({ + id: xVt, + title: W(1695, "Accept selected action"), + precondition: R7.Visible, + keybinding: { + weight: Nie, + primary: 3, + secondary: [2137] + } + }); + } + run(i) { + const e = i.get(RF); + if (e instanceof N7) { + e.acceptSelected(); + } + } + }); + J(class extends se { + constructor() { + super({ + id: kVt, + title: W(1696, "Preview selected action"), + precondition: R7.Visible, + keybinding: { + weight: Nie, + primary: 2051 + } + }); + } + run(i) { + const e = i.get(RF); + if (e instanceof N7) { + e.acceptSelected(true); + } + } + }); + } +}); +var ZQn = ue({ + "out-build/vs/editor/contrib/dropOrPasteInto/browser/postEditWidget.css"() {} +}); +var DVt; +var jct; +var zme; +var Gus = ue({ + "out-build/vs/editor/contrib/dropOrPasteInto/browser/postEditWidget.js"() { + "use strict"; + + xe(); + Wd(); + He(); + Yd(); + Ut(); + pe(); + q(); + Rt(); + X(); + IVt(); + Ee(); + te(); + Fi(); + Wi(); + yf(); + mVt(); + ZQn(); + jct = class extends H { + static { + DVt = this; + } + static { + this.a = "editor.widget.postEditWidget"; + } + constructor(e, t, s, n, r, o, a, l, c, u, d) { + super(); + this.g = e; + this.h = t; + this.j = n; + this.m = r; + this.n = o; + this.q = a; + this.r = l; + this.s = u; + this.t = d; + this.allowEditorOverflow = true; + this.suppressMouseDown = true; + this.w(); + this.f = s.bindTo(c); + this.f.set(true); + this.D(Ue(() => this.f.reset())); + this.h.addContentWidget(this); + this.h.layoutContentWidget(this); + this.D(Ue(() => this.h.removeContentWidget(this))); + this.D(this.h.onDidChangeCursorPosition(h => { + this.dispose(); + })); + this.D(de.runAndSubscribe(u.onDidUpdateKeybindings, () => { + this.u(); + })); + } + u() { + const e = this.s.lookupKeybinding(this.j.id)?.getLabel(); + this.c.element.title = this.j.label + (e ? ` (${e})` : ""); + } + w() { + this.b = G(".post-edit-widget"); + this.c = this.D(new Ql(this.b, { + supportIcons: true + })); + this.c.label = "$(insert)"; + this.D(Ce(this.b, Oe.CLICK, () => this.showSelector())); + } + getId() { + return DVt.a + "." + this.g; + } + getDomNode() { + return this.b; + } + getPosition() { + return { + position: this.m.getEndPosition(), + preference: [2] + }; + } + showSelector() { + const e = sd(this.c.element); + const t = { + x: e.left + e.width, + y: e.top + e.height + }; + this.t.show("postEditWidget", false, this.n.allEdits.map((s, n) => ({ + kind: "action", + item: s, + label: s.title, + disabled: false, + canPreview: false, + group: { + title: "", + icon: le.fromId(n === this.n.activeEditIndex ? A.check.id : A.blank.id) + } + })), { + onHide: () => { + this.h.focus(); + }, + onSelect: s => { + this.t.hide(false); + const n = this.n.allEdits.findIndex(r => r === s); + if (n !== this.n.activeEditIndex) { + return this.q(n); + } + } + }, t, this.h.getDomNode() ?? undefined, this.r); + } + }; + jct = DVt = __decorate([__param(8, Ne), __param(9, oi), __param(10, RF)], jct); + zme = class extends H { + constructor(e, t, s, n, r, o, a, l) { + super(); + this.b = e; + this.c = t; + this.f = s; + this.g = n; + this.h = r; + this.j = o; + this.m = a; + this.n = l; + this.a = this.D(new ki()); + this.D(de.any(t.onDidChangeModel, t.onDidChangeModelContent)(() => this.clear())); + } + async applyEditAndShowIfNeeded(e, t, s, n, r) { + const o = this.c.getModel(); + if (!o || !e.length) { + return; + } + const a = t.allEdits.at(t.activeEditIndex); + if (!a) { + return; + } + const l = async v => { + const y = this.c.getModel(); + if (y) { + await y.undo(); + this.applyEditAndShowIfNeeded(e, { + activeEditIndex: v, + allEdits: t.allEdits + }, s, n, r); + } + }; + const c = (v, y) => { + if (!ca(v)) { + this.n.error(y); + if (s) { + this.show(e[0], t, l); + } + } + }; + let u; + try { + u = await n(a, r); + } catch (v) { + return c(v, f(1014, null, a.title, ou(v))); + } + if (r.isCancellationRequested) { + return; + } + const d = $us(o.uri, e, u); + const h = e[0]; + const g = o.deltaDecorations([], [{ + range: h, + options: { + description: "paste-line-suffix", + stickiness: 0 + } + }]); + this.c.focus(); + let p; + let b; + try { + p = await this.m.apply(d, { + editor: this.c, + token: r + }); + b = o.getDecorationRange(g[0]); + } catch (v) { + return c(v, f(1015, null, a.title, ou(v))); + } finally { + o.deltaDecorations(g, []); + } + if (!r.isCancellationRequested) { + if (s && p.isApplied && t.allEdits.length > 1) { + this.show(b ?? h, t, l); + } + } + } + show(e, t, s) { + this.clear(); + if (this.c.hasModel()) { + this.a.value = this.j.createInstance(jct, this.b, this.c, this.f, this.g, e, t, s, this.h()); + } + } + clear() { + this.a.clear(); + } + tryShowSelector() { + this.a.value?.showSelector(); + } + }; + zme = __decorate([__param(5, re), __param(6, eg), __param(7, ni)], zme); + } +}); +function eZn(i, e) { + const t = Zus[i]; + if (typeof t == "object") { + if (t[e]) { + return t.$; + } else { + return undefined; + } + } else { + return t; + } +} +var Kus; +var Yus; +var Xus; +var Qus; +var Zus; +var TVt; +var eds; +var tds; +var ids = ue({ + "out-build/external/solid/dom-expressions/constants.js"() { + "use strict"; + + Kus = ["allowfullscreen", "async", "autofocus", "autoplay", "checked", "controls", "default", "disabled", "formnovalidate", "hidden", "indeterminate", "ismap", "loop", "multiple", "muted", "nomodule", "novalidate", "open", "playsinline", "readonly", "required", "reversed", "seamless", "selected"]; + Yus = new Set(["className", "value", "readOnly", "formNoValidate", "isMap", "noModule", "playsInline", ...Kus]); + Xus = new Set(["innerHTML", "textContent", "innerText", "children"]); + Qus = Object.assign(Object.create(null), { + className: "class", + htmlFor: "for" + }); + Zus = Object.assign(Object.create(null), { + class: "className", + formnovalidate: { + $: "formNoValidate", + BUTTON: 1, + INPUT: 1 + }, + ismap: { + $: "isMap", + IMG: 1 + }, + nomodule: { + $: "noModule", + SCRIPT: 1 + }, + playsinline: { + $: "playsInline", + VIDEO: 1 + }, + readonly: { + $: "readOnly", + INPUT: 1, + TEXTAREA: 1 + } + }); + TVt = new Set(["beforeinput", "click", "dblclick", "contextmenu", "focusin", "focusout", "input", "keydown", "keyup", "mousedown", "mousemove", "mouseout", "mouseover", "mouseup", "pointerdown", "pointermove", "pointerout", "pointerover", "pointerup", "touchend", "touchmove", "touchstart"]); + eds = new Set(["altGlyph", "altGlyphDef", "altGlyphItem", "animate", "animateColor", "animateMotion", "animateTransform", "circle", "clipPath", "color-profile", "cursor", "defs", "desc", "ellipse", "feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence", "filter", "font", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignObject", "g", "glyph", "glyphRef", "hkern", "image", "line", "linearGradient", "marker", "mask", "metadata", "missing-glyph", "mpath", "path", "pattern", "polygon", "polyline", "radialGradient", "rect", "set", "stop", "svg", "switch", "symbol", "text", "textPath", "tref", "tspan", "use", "view", "vkern"]); + tds = { + xlink: "http://www.w3.org/1999/xlink", + xml: "http://www.w3.org/XML/1998/namespace" + }; + } +}); +var tZn = ue({ + "out-build/external/solid/web/core.js"() { + "use strict"; + + We(); + } +}); +function iZn(i, e, t) { + let s = t.length; + let n = e.length; + let r = s; + let o = 0; + let a = 0; + let l = e[n - 1].nextSibling; + let c = null; + while (o < n || a < r) { + if (e[o] === t[a]) { + o++; + a++; + continue; + } + while (e[n - 1] === t[r - 1]) { + n--; + r--; + } + if (n === o) { + const u = r < s ? a ? t[a - 1].nextSibling : t[r - a] : l; + while (a < r) { + i.insertBefore(t[a++], u); + } + } else if (r === a) { + while (o < n) { + if (!c || !c.has(e[o])) { + e[o].remove(); + } + o++; + } + } else if (e[o] === t[r - 1] && t[a] === e[n - 1]) { + const u = e[--n].nextSibling; + i.insertBefore(t[a++], e[o++].nextSibling); + i.insertBefore(t[--r], u); + e[n] = t[r]; + } else { + if (!c) { + c = new Map(); + let d = a; + while (d < r) { + c.set(t[d], d++); + } + } + const u = c.get(e[o]); + if (u != null) { + if (a < u && u < r) { + let d = o; + let h = 1; + let g; + while (++d < n && d < r && (g = c.get(e[d])) != null && g === u + h) { + h++; + } + if (h > u - a) { + const p = e[o]; + while (a < u) { + i.insertBefore(t[a++], p); + } + } else { + i.replaceChild(t[a++], e[o++]); + } + } else { + o++; + } + } else { + e[o++].remove(); + } + } + } +} +var sZn = ue({ + "out-build/external/solid/dom-expressions/reconcile.js"() { + "use strict"; + } +}); +function Jme(i, e, t, s = {}) { + let n; + Qb(r => { + n = r; + if (e === document) { + i(); + } else { + M(e, i(), e.firstChild ? null : undefined, t); + } + }, s.owner); + return () => { + n(); + e.textContent = ""; + }; +} +function Y(i, e, t) { + let s; + const n = () => { + const o = document.createElement("template"); + o.innerHTML = NVt ? NVt.createHTML(i) : i; + if (t) { + return o.content.firstChild.firstChild; + } else { + return o.content.firstChild; + } + }; + const r = e ? () => (s ||= n()).cloneNode(true) : () => El(() => document.importNode(s ||= n(), true)); + r.cloneNode = r; + return r; +} +function nZn(i, e = window.document) { + const t = e[RVt] ||= new Set(); + for (let s = 0, n = i.length; s < n; s++) { + const r = i[s]; + if (!t.has(r)) { + t.add(r); + e.addEventListener(r, cZn); + } + } +} +function Gr(i, e, t) { + if (t == null) { + i.removeAttribute(e); + } else { + i.setAttribute(e, t); + } +} +function rZn(i, e, t, s) { + if (s == null) { + i.removeAttributeNS(e, t); + } else { + i.setAttributeNS(e, t, s); + } +} +function Xe(i, e) { + if (e == null) { + i.removeAttribute("class"); + } else { + i.className = e; + } +} +function wf(i, e, t, s) { + if (s) { + if (Array.isArray(t)) { + i[`$$${e}`] = t[0]; + i[`$$${e}Data`] = t[1]; + } else { + i[`$$${e}`] = t; + } + } else if (Array.isArray(t)) { + const n = t[0]; + i.addEventListener(e, t[0] = r => n.call(i, t[1], r)); + } else { + i.addEventListener(e, t); + } +} +function PVt(i, e, t = {}) { + const s = Object.keys(e || {}); + const n = Object.keys(t); + let r; + let o; + r = 0; + o = n.length; + for (; r < o; r++) { + const a = n[r]; + if (!!a && a !== "undefined" && !e[a]) { + sds(i, a, false); + delete t[a]; + } + } + r = 0; + o = s.length; + for (; r < o; r++) { + const a = s[r]; + const l = !!e[a]; + if (!!a && a !== "undefined" && t[a] !== l && !!l) { + sds(i, a, true); + t[a] = l; + } + } + return t; +} +function is(i, e, t) { + if (!e) { + if (t) { + return Gr(i, "style"); + } else { + return e; + } + } + const s = i.style; + if (typeof e == "string") { + return s.cssText = e; + } + if (typeof t == "string") { + s.cssText = t = undefined; + } + t ||= {}; + e ||= {}; + let n; + let r; + for (r in t) { + if (e[r] == null) { + s.removeProperty(r); + } + delete t[r]; + } + for (r in e) { + n = e[r]; + if (n !== t[r]) { + s.setProperty(r, n); + t[r] = n; + } + } + return t; +} +function Z0(i, e = {}, t, s) { + const n = {}; + if (!s) { + Ie(() => n.children = Mie(i, e.children, n.children)); + } + Ie(() => e.ref && e.ref(i)); + Ie(() => oZn(i, e, t, true, n, true)); + return n; +} +function Kn(i, e, t) { + return El(() => i(e, t)); +} +function M(i, e, t, s) { + if (t !== undefined && !s) { + s = []; + } + if (typeof e != "function") { + return Mie(i, e, s, t); + } + Ie(n => Mie(i, e(), n, t), s); +} +function oZn(i, e, t, s, n = {}, r = false) { + e ||= {}; + for (const o in n) { + if (!(o in e)) { + if (o === "children") { + continue; + } + n[o] = nds(i, o, null, n[o], t, r); + } + } + for (const o in e) { + if (o === "children") { + if (!s) { + Mie(i, e.children); + } + continue; + } + const a = e[o]; + n[o] = nds(i, o, a, n[o], t, r); + } +} +function aZn(i) { + let e; + let t; + if (!Yl.context || !(e = Yl.registry.get(t = uZn()))) { + return i(); + } else { + if (Yl.completed) { + Yl.completed.add(e); + } + Yl.registry.delete(t); + return e; + } +} +function lZn(i) { + return i.toLowerCase().replace(/-([a-z])/g, (e, t) => t.toUpperCase()); +} +function sds(i, e, t) { + const s = e.trim().split(/\s+/); + for (let n = 0, r = s.length; n < r; n++) { + i.classList.toggle(s[n], t); + } +} +function nds(i, e, t, s, n, r) { + let o; + let a; + let l; + let c; + let u; + if (e === "style") { + return is(i, t, s); + } + if (e === "classList") { + return PVt(i, t, s); + } + if (t === s) { + return s; + } + if (e === "ref") { + if (!r) { + t(i); + } + } else if (e.slice(0, 3) === "on:") { + const d = e.slice(3); + if (s) { + i.removeEventListener(d, s); + } + if (t) { + i.addEventListener(d, t); + } + } else if (e.slice(0, 10) === "oncapture:") { + const d = e.slice(10); + if (s) { + i.removeEventListener(d, s, true); + } + if (t) { + i.addEventListener(d, t, true); + } + } else if (e.slice(0, 2) === "on") { + const d = e.slice(2).toLowerCase(); + const h = TVt.has(d); + if (!h && s) { + const g = Array.isArray(s) ? s[0] : s; + i.removeEventListener(d, g); + } + if (h || t) { + wf(i, d, t, h); + if (h) { + nZn([d]); + } + } + } else if (e.slice(0, 5) === "attr:") { + Gr(i, e.slice(5), t); + } else if ((u = e.slice(0, 5) === "prop:") || (l = Xus.has(e)) || !n && ((c = eZn(e, i.tagName)) || (a = Yus.has(e))) || (o = i.nodeName.includes("-"))) { + if (u) { + e = e.slice(5); + a = true; + } + if (e === "class" || e === "className") { + Xe(i, t); + } else if (o && !a && !l) { + i[lZn(e)] = t; + } else { + i[c || e] = t; + } + } else { + const d = n && e.indexOf(":") > -1 && tds[e.split(":")[0]]; + if (d) { + rZn(i, d, e, t); + } else { + Gr(i, Qus[e] || e, t); + } + } + return t; +} +function cZn(i) { + const e = `$$${i.type}`; + let t = i.composedPath && i.composedPath()[0] || i.target; + if (i.target !== t) { + Object.defineProperty(i, "target", { + configurable: true, + value: t + }); + } + Object.defineProperty(i, "currentTarget", { + configurable: true, + get() { + return t || document; + } + }); + if (Yl.registry && !Yl.done) { + Yl.done = _$HY.done = true; + } + while (t) { + const s = t[e]; + if (s && !t.disabled) { + const n = t[`${e}Data`]; + if (n !== undefined) { + s.call(t, n, i); + } else { + s.call(t, i); + } + if (i.cancelBubble) { + return; + } + } + t = t._$host || t.parentNode || t.host; + } +} +function Mie(i, e, t, s, n) { + if (Yl.context) { + if (!t) { + t = [...i.childNodes]; + } + let a = []; + for (let l = 0; l < t.length; l++) { + const c = t[l]; + if (c.nodeType === 8 && c.data.slice(0, 2) === "!$") { + c.remove(); + } else { + a.push(c); + } + } + t = a; + } + while (typeof t == "function") { + t = t(); + } + if (e === t) { + return t; + } + const r = typeof e; + const o = s !== undefined; + i = o && t[0] && t[0].parentNode || i; + if (r === "string" || r === "number") { + if (Yl.context) { + return t; + } + if (r === "number") { + e = e.toString(); + } + if (o) { + let a = t[0]; + if (a && a.nodeType === 3) { + a.data = e; + } else { + a = document.createTextNode(e); + } + t = Aie(i, t, s, a); + } else if (t !== "" && typeof t == "string") { + t = i.firstChild.data = e; + } else { + t = i.textContent = e; + } + } else if (e == null || r === "boolean") { + if (Yl.context) { + return t; + } + t = Aie(i, t, s); + } else { + if (r === "function") { + Ie(() => { + let a = e(); + while (typeof a == "function") { + a = a(); + } + t = Mie(i, a, t, s); + }); + return () => t; + } + if (Array.isArray(e)) { + const a = []; + const l = t && Array.isArray(t); + if (LVt(a, e, t, n)) { + Ie(() => t = Mie(i, a, t, s, true)); + return () => t; + } + if (Yl.context) { + if (!a.length) { + return t; + } + for (let c = 0; c < a.length; c++) { + if (a[c].parentNode) { + return t = a; + } + } + } + if (a.length === 0) { + t = Aie(i, t, s); + if (o) { + return t; + } + } else if (l) { + if (t.length === 0) { + rds(i, a, s); + } else { + iZn(i, t, a); + } + } else { + if (t) { + Aie(i); + } + rds(i, a); + } + t = a; + } else if (e instanceof Node) { + if (Yl.context && e.parentNode) { + return t = o ? [e] : e; + } + if (Array.isArray(t)) { + if (o) { + return t = Aie(i, t, s, e); + } + Aie(i, t, null, e); + } else if (t == null || t === "" || !i.firstChild) { + i.appendChild(e); + } else { + i.replaceChild(e, i.firstChild); + } + t = e; + } + } + return t; +} +function LVt(i, e, t, s) { + let n = false; + for (let r = 0, o = e.length; r < o; r++) { + let a = e[r]; + let l = t && t[r]; + let c; + if (a instanceof Node) { + i.push(a); + } else if (a != null && a !== true && a !== false) { + if (Array.isArray(a)) { + n = LVt(i, a, l) || n; + } else if ((c = typeof a) == "function") { + if (s) { + while (typeof a == "function") { + a = a(); + } + n = LVt(i, Array.isArray(a) ? a : [a], Array.isArray(l) ? l : [l]) || n; + } else { + i.push(a); + n = true; + } + } else { + const u = String(a); + if (l && l.nodeType === 3) { + l.data = u; + i.push(l); + } else { + i.push(document.createTextNode(u)); + } + } + } + } + return n; +} +function rds(i, e, t = null) { + for (let s = 0, n = e.length; s < n; s++) { + i.insertBefore(e[s], t); + } +} +function Aie(i, e, t, s) { + if (t === undefined) { + return i.textContent = ""; + } + const n = s || document.createTextNode(""); + if (e.length) { + let r = false; + for (let o = e.length - 1; o >= 0; o--) { + const a = e[o]; + if (n !== a) { + const l = a.parentNode === i; + if (!r && !o) { + if (l) { + i.replaceChild(n, a); + } else { + i.insertBefore(n, t); + } + } else if (l) { + a.remove(); + } + } else { + r = true; + } + } + } else { + i.insertBefore(n, t); + } + return [n]; +} +function uZn() { + const i = Yl.context; + return `${i.id}${i.count++}`; +} +var RVt; +var NVt; +var dZn = ue({ + "out-build/external/solid/dom-expressions/client.js"() { + "use strict"; + + ids(); + tZn(); + sZn(); + ids(); + RVt = "_$DX_DELEGATE"; + NVt = window.trustedTypes?.createPolicy("solidjs", { + createHTML: i => i + }); + } +}); +var ods = ue({ + "out-build/external/solid/web/client.js"() { + "use strict"; + + dZn(); + } +}); +var hZn = ue({ + "out-build/external/solid/web/server-mock.js"() { + "use strict"; + } +}); +function ads(i, e = false) { + if (e) { + return document.createElementNS(cds, i); + } else { + return document.createElement(i); + } +} +function K4(i) { + const { + useShadow: e + } = i; + const t = document.createTextNode(""); + const s = () => i.mount || document.body; + const n = wlt(); + let r; + let o = !!Yl.context; + Fe(() => { + if (o) { + wlt().user = o = false; + } + r ||= nz(n, () => K(() => i.children)); + const a = s(); + if (a instanceof HTMLHeadElement) { + const [l, c] = ae(false); + const u = () => c(true); + Qb(d => M(a, () => l() ? d() : r(), null)); + Qt(u); + } else { + const l = ads(i.isSVG ? "g" : "div", i.isSVG); + const c = e && l.attachShadow ? l.attachShadow({ + mode: "open" + }) : l; + Object.defineProperty(l, "_$host", { + get() { + return t.parentNode; + }, + configurable: true + }); + M(c, r); + a.appendChild(l); + if (i.ref) { + i.ref(l); + } + Qt(() => a.removeChild(l)); + } + }, undefined, { + render: !o + }); + return t; +} +function fZn(i, e) { + const t = K(i); + return K(() => { + const s = t(); + switch (typeof s) { + case "function": + if (lds) { + Object.assign(s, { + [nUt]: true + }); + } + return El(() => s(e)); + case "string": + const n = eds.has(s); + const r = Yl.context ? aZn() : ads(s, n); + Z0(r, e, n); + return r; + default: + break; + } + }); +} +function MVt(i) { + const [, e] = UI(i, ["component"]); + return fZn(() => i.component, e); +} +var zct; +var lds; +var cds; +var $ = ue({ + "out-build/external/solid/web.js"() { + "use strict"; + + ods(); + We(); + ods(); + We(); + hZn(); + zct = false; + lds = false; + cds = "http://www.w3.org/2000/svg"; + } +}); +function Jv(i, e) { + if (!i) { + throw new Error(e); + } +} +function Jct(i) { + if (typeof i != "number") { + throw new Error("invalid int 32: " + typeof i); + } + if (!Number.isInteger(i) || i > gds || i < pds) { + throw new Error("invalid int 32: " + i); + } +} +function AVt(i) { + if (typeof i != "number") { + throw new Error("invalid uint 32: " + typeof i); + } + if (!Number.isInteger(i) || i > fds || i < 0) { + throw new Error("invalid uint 32: " + i); + } +} +function uds(i) { + if (typeof i != "number") { + throw new Error("invalid float 32: " + typeof i); + } + if (Number.isFinite(i) && (i > dds || i < hds)) { + throw new Error("invalid float 32: " + i); + } +} +var dds; +var hds; +var fds; +var gds; +var pds; +var NF = ue({ + "out-build/external/bufbuild/protobuf/private/assert.js"() { + "use strict"; + + dds = 3.4028234663852886e+38; + hds = -3.4028234663852886e+38; + fds = 4294967295; + gds = 2147483647; + pds = -2147483648; + } +}); +function mds(i) { + const e = i[$Vt]; + Jv(e, "missing enum type on enum object"); + return e; +} +function bds(i, e, t, s) { + i[$Vt] = vds(e, t.map(n => ({ + no: n.no, + name: n.name, + localName: i[n.no] + })), s); +} +function vds(i, e, t) { + const s = Object.create(null); + const n = Object.create(null); + const r = []; + for (const o of e) { + const a = yds(o); + r.push(a); + s[o.name] = a; + n[o.no] = a; + } + return { + typeName: i, + values: r, + findName(o) { + return s[o]; + }, + findNumber(o) { + return n[o]; + } + }; +} +function gZn(i, e, t) { + const s = {}; + for (const n of e) { + const r = yds(n); + s[r.localName] = r.no; + s[r.no] = r.localName; + } + bds(s, i, e, t); + return s; +} +function yds(i) { + if ("localName" in i) { + return i; + } else { + return { + ...i, + localName: i.name + }; + } +} +var $Vt; +var FVt = ue({ + "out-build/external/bufbuild/protobuf/private/enum.js"() { + "use strict"; + + NF(); + $Vt = Symbol("@bufbuild/protobuf/enum-type"); + } +}); +var N; +var aE = ue({ + "out-build/external/bufbuild/protobuf/message.js"() { + "use strict"; + + N = class { + equals(i) { + return this.getType().runtime.util.equals(this.getType(), this, i); + } + clone() { + return this.getType().runtime.util.clone(this); + } + fromBinary(i, e) { + const t = this.getType(); + const s = t.runtime.bin; + const n = s.makeReadOptions(e); + s.readMessage(this, n.readerFactory(i), i.byteLength, n); + return this; + } + fromJson(i, e) { + const t = this.getType(); + const s = t.runtime.json; + const n = s.makeReadOptions(e); + s.readMessage(t, i, n, this); + return this; + } + fromJsonString(i, e) { + let t; + try { + t = JSON.parse(i); + } catch (s) { + throw new Error(`cannot decode ${this.getType().typeName} from JSON: ${s instanceof Error ? s.message : String(s)}`); + } + return this.fromJson(t, e); + } + toBinary(i) { + const e = this.getType(); + const t = e.runtime.bin; + const s = t.makeWriteOptions(i); + const n = s.writerFactory(); + t.writeMessage(this, n, s); + return n.finish(); + } + toJson(i) { + const e = this.getType(); + const t = e.runtime.json; + const s = t.makeWriteOptions(i); + return t.writeMessage(this, s); + } + toJsonString(i) { + const e = this.toJson(i); + return JSON.stringify(e, null, i?.prettySpaces ?? 0); + } + toJSON() { + return this.toJson({ + emitDefaultValues: true + }); + } + getType() { + return Object.getPrototypeOf(this).constructor; + } + }; + } +}); +function pZn(i, e, t, s) { + const n = s?.localName ?? e.substring(e.lastIndexOf(".") + 1); + const r = { + [n]: function (o) { + i.util.initFields(this); + i.util.initPartial(o, this); + } + }[n]; + Object.setPrototypeOf(r.prototype, new N()); + Object.assign(r, { + runtime: i, + typeName: e, + fields: i.util.newFieldList(t), + fromBinary(o, a) { + return new r().fromBinary(o, a); + }, + fromJson(o, a) { + return new r().fromJson(o, a); + }, + fromJsonString(o, a) { + return new r().fromJsonString(o, a); + }, + equals(o, a) { + return i.util.equals(r, o, a); + } + }); + return r; +} +var mZn = ue({ + "out-build/external/bufbuild/protobuf/private/message-type.js"() { + "use strict"; + + aE(); + } +}); +function bZn() { + let i = 0; + let e = 0; + for (let s = 0; s < 28; s += 7) { + let n = this.buf[this.pos++]; + i |= (n & 127) << s; + if (!(n & 128)) { + this.assertBounds(); + return [i, e]; + } + } + let t = this.buf[this.pos++]; + i |= (t & 15) << 28; + e = (t & 112) >> 4; + if (!(t & 128)) { + this.assertBounds(); + return [i, e]; + } + for (let s = 3; s <= 31; s += 7) { + let n = this.buf[this.pos++]; + e |= (n & 127) << s; + if (!(n & 128)) { + this.assertBounds(); + return [i, e]; + } + } + throw new Error("invalid varint"); +} +function OVt(i, e, t) { + for (let r = 0; r < 28; r = r + 7) { + const o = i >>> r; + const a = !!(o >>> 7) || e != 0; + const l = (a ? o | 128 : o) & 255; + t.push(l); + if (!a) { + return; + } + } + const s = i >>> 28 & 15 | (e & 7) << 4; + const n = !!(e >> 3); + t.push((n ? s | 128 : s) & 255); + if (n) { + for (let r = 3; r < 31; r = r + 7) { + const o = e >>> r; + const a = !!(o >>> 7); + const l = (a ? o | 128 : o) & 255; + t.push(l); + if (!a) { + return; + } + } + t.push(e >>> 31 & 1); + } +} +function wds(i) { + const e = i[0] === "-"; + if (e) { + i = i.slice(1); + } + const t = 1000000; + let s = 0; + let n = 0; + function r(o, a) { + const l = Number(i.slice(o, a)); + n *= t; + s = s * t + l; + if (s >= Gme) { + n = n + (s / Gme | 0); + s = s % Gme; + } + } + r(-24, -18); + r(-18, -12); + r(-12, -6); + r(-6); + if (e) { + return Sds(s, n); + } else { + return _Vt(s, n); + } +} +function vZn(i, e) { + let t = _Vt(i, e); + const s = t.hi & -2147483648; + if (s) { + t = Sds(t.lo, t.hi); + } + const n = Cds(t.lo, t.hi); + if (s) { + return "-" + n; + } else { + return n; + } +} +function Cds(i, e) { + ({ + lo: i, + hi: e + } = yZn(i, e)); + if (e <= 2097151) { + return String(Gme * e + i); + } + const t = i & 16777215; + const s = (i >>> 24 | e << 8) & 16777215; + const n = e >> 16 & 65535; + let r = t + s * 6777216 + n * 6710656; + let o = s + n * 8147497; + let a = n * 2; + const l = 10000000; + if (r >= l) { + o += Math.floor(r / l); + r %= l; + } + if (o >= l) { + a += Math.floor(o / l); + o %= l; + } + return a.toString() + BVt(o) + BVt(r); +} +function yZn(i, e) { + return { + lo: i >>> 0, + hi: e >>> 0 + }; +} +function _Vt(i, e) { + return { + lo: i | 0, + hi: e | 0 + }; +} +function Sds(i, e) { + e = ~e; + if (i) { + i = ~i + 1; + } else { + e += 1; + } + return _Vt(i, e); +} +function xds(i, e) { + if (i >= 0) { + while (i > 127) { + e.push(i & 127 | 128); + i = i >>> 7; + } + e.push(i); + } else { + for (let t = 0; t < 9; t++) { + e.push(i & 127 | 128); + i = i >> 7; + } + e.push(1); + } +} +function wZn() { + let i = this.buf[this.pos++]; + let e = i & 127; + if (!(i & 128)) { + this.assertBounds(); + return e; + } + i = this.buf[this.pos++]; + e |= (i & 127) << 7; + if (!(i & 128)) { + this.assertBounds(); + return e; + } + i = this.buf[this.pos++]; + e |= (i & 127) << 14; + if (!(i & 128)) { + this.assertBounds(); + return e; + } + i = this.buf[this.pos++]; + e |= (i & 127) << 21; + if (!(i & 128)) { + this.assertBounds(); + return e; + } + i = this.buf[this.pos++]; + e |= (i & 15) << 28; + for (let t = 5; i & 128 && t < 10; t++) { + i = this.buf[this.pos++]; + } + if (i & 128) { + throw new Error("invalid varint"); + } + this.assertBounds(); + return e >>> 0; +} +var Gme; +var BVt; +var kds = ue({ + "out-build/external/bufbuild/protobuf/google/varint.js"() { + "use strict"; + + Gme = 4294967296; + BVt = i => { + const e = String(i); + return "0000000".slice(e.length) + e; + }; + } +}); +function CZn() { + const i = new DataView(new ArrayBuffer(8)); + if (typeof BigInt == "function" && typeof i.getBigInt64 == "function" && typeof i.getBigUint64 == "function" && typeof i.setBigInt64 == "function" && typeof i.setBigUint64 == "function" && (typeof process != "object" || typeof process.env != "object" || process.env.BUF_BIGINT_DISABLE !== "1")) { + const n = BigInt("-9223372036854775808"); + const r = BigInt("9223372036854775807"); + const o = BigInt("0"); + const a = BigInt("18446744073709551615"); + return { + zero: BigInt(0), + supported: true, + parse(l) { + const c = typeof l == "bigint" ? l : BigInt(l); + if (c > r || c < n) { + throw new Error(`int64 invalid: ${l}`); + } + return c; + }, + uParse(l) { + const c = typeof l == "bigint" ? l : BigInt(l); + if (c > a || c < o) { + throw new Error(`uint64 invalid: ${l}`); + } + return c; + }, + enc(l) { + i.setBigInt64(0, this.parse(l), true); + return { + lo: i.getInt32(0, true), + hi: i.getInt32(4, true) + }; + }, + uEnc(l) { + i.setBigInt64(0, this.uParse(l), true); + return { + lo: i.getInt32(0, true), + hi: i.getInt32(4, true) + }; + }, + dec(l, c) { + i.setInt32(0, l, true); + i.setInt32(4, c, true); + return i.getBigInt64(0, true); + }, + uDec(l, c) { + i.setInt32(0, l, true); + i.setInt32(4, c, true); + return i.getBigUint64(0, true); + } + }; + } + const t = n => Jv(/^-?[0-9]+$/.test(n), `int64 invalid: ${n}`); + const s = n => Jv(/^[0-9]+$/.test(n), `uint64 invalid: ${n}`); + return { + zero: "0", + supported: false, + parse(n) { + if (typeof n != "string") { + n = n.toString(); + } + t(n); + return n; + }, + uParse(n) { + if (typeof n != "string") { + n = n.toString(); + } + s(n); + return n; + }, + enc(n) { + if (typeof n != "string") { + n = n.toString(); + } + t(n); + return wds(n); + }, + uEnc(n) { + if (typeof n != "string") { + n = n.toString(); + } + s(n); + return wds(n); + }, + dec(n, r) { + return vZn(n, r); + }, + uDec(n, r) { + return Cds(n, r); + } + }; +} +var wd; +var M7 = ue({ + "out-build/external/bufbuild/protobuf/proto-int64.js"() { + "use strict"; + + NF(); + kds(); + wd = CZn(); + } +}); +var xn; +var A7; +var KM = ue({ + "out-build/external/bufbuild/protobuf/scalar.js"() { + "use strict"; + + (function (i) { + i[i.DOUBLE = 1] = "DOUBLE"; + i[i.FLOAT = 2] = "FLOAT"; + i[i.INT64 = 3] = "INT64"; + i[i.UINT64 = 4] = "UINT64"; + i[i.INT32 = 5] = "INT32"; + i[i.FIXED64 = 6] = "FIXED64"; + i[i.FIXED32 = 7] = "FIXED32"; + i[i.BOOL = 8] = "BOOL"; + i[i.STRING = 9] = "STRING"; + i[i.BYTES = 12] = "BYTES"; + i[i.UINT32 = 13] = "UINT32"; + i[i.SFIXED32 = 15] = "SFIXED32"; + i[i.SFIXED64 = 16] = "SFIXED64"; + i[i.SINT32 = 17] = "SINT32"; + i[i.SINT64 = 18] = "SINT64"; + })(xn ||= {}); + (function (i) { + i[i.BIGINT = 0] = "BIGINT"; + i[i.STRING = 1] = "STRING"; + })(A7 ||= {}); + } +}); +function $7(i, e, t) { + if (e === t) { + return true; + } + if (i == xn.BYTES) { + if (!(e instanceof Uint8Array) || !(t instanceof Uint8Array) || e.length !== t.length) { + return false; + } + for (let s = 0; s < e.length; s++) { + if (e[s] !== t[s]) { + return false; + } + } + return true; + } + switch (i) { + case xn.UINT64: + case xn.FIXED64: + case xn.INT64: + case xn.SFIXED64: + case xn.SINT64: + return e == t; + } + return false; +} +function $ie(i, e) { + switch (i) { + case xn.BOOL: + return false; + case xn.UINT64: + case xn.FIXED64: + case xn.INT64: + case xn.SFIXED64: + case xn.SINT64: + if (e == 0) { + return wd.zero; + } else { + return "0"; + } + case xn.DOUBLE: + case xn.FLOAT: + return 0; + case xn.BYTES: + return new Uint8Array(0); + case xn.STRING: + return ""; + default: + return 0; + } +} +function Eds(i, e) { + switch (i) { + case xn.BOOL: + return e === false; + case xn.STRING: + return e === ""; + case xn.BYTES: + return e instanceof Uint8Array && !e.byteLength; + default: + return e == 0; + } +} +var F7 = ue({ + "out-build/external/bufbuild/protobuf/private/scalars.js"() { + "use strict"; + + M7(); + KM(); + } +}); +function SZn(i, e, t, s) { + let n; + return { + typeName: e, + extendee: t, + get field() { + if (!n) { + const r = typeof s == "function" ? s() : s; + r.name = e.split(".").pop(); + r.jsonName = `[${e}]`; + n = i.util.newFieldList([r]).list()[0]; + } + return n; + }, + runtime: i + }; +} +function Ids(i) { + const e = i.field.localName; + const t = Object.create(null); + t[e] = xZn(i); + return [t, () => t[e]]; +} +function xZn(i) { + const e = i.field; + if (e.repeated) { + return []; + } + if (e.default !== undefined) { + return e.default; + } + switch (e.kind) { + case "enum": + return e.T.values[0].no; + case "scalar": + return $ie(e.T, e.L); + case "message": + const t = e.T; + const s = new t(); + if (t.fieldWrapper) { + return t.fieldWrapper.unwrapField(s); + } else { + return s; + } + case "map": + throw "map fields are not allowed to be extensions"; + } +} +function kZn(i, e) { + if (!e.repeated && (e.kind == "enum" || e.kind == "scalar")) { + for (let t = i.length - 1; t >= 0; --t) { + if (i[t].no == e.no) { + return [i[t]]; + } + } + return []; + } + return i.filter(t => t.no === e.no); +} +var UVt = ue({ + "out-build/external/bufbuild/protobuf/private/extensions.js"() { + "use strict"; + + F7(); + } +}); +var MF; +var Kme; +var WVt; +var VVt = ue({ + "out-build/external/bufbuild/protobuf/proto-base64.js"() { + "use strict"; + + MF = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""); + Kme = []; + for (let i = 0; i < MF.length; i++) { + Kme[MF[i].charCodeAt(0)] = i; + } + Kme[45] = MF.indexOf("+"); + Kme[95] = MF.indexOf("/"); + WVt = { + dec(i) { + let e = i.length * 3 / 4; + if (i[i.length - 2] == "=") { + e -= 2; + } else if (i[i.length - 1] == "=") { + e -= 1; + } + let t = new Uint8Array(e); + let s = 0; + let n = 0; + let r; + let o = 0; + for (let a = 0; a < i.length; a++) { + r = Kme[i.charCodeAt(a)]; + if (r === undefined) { + switch (i[a]) { + case "=": + n = 0; + case ` +`: + case "\r": + case "\t": + case " ": + continue; + default: + throw Error("invalid base64 string."); + } + } + switch (n) { + case 0: + o = r; + n = 1; + break; + case 1: + t[s++] = o << 2 | (r & 48) >> 4; + o = r; + n = 2; + break; + case 2: + t[s++] = (o & 15) << 4 | (r & 60) >> 2; + o = r; + n = 3; + break; + case 3: + t[s++] = (o & 3) << 6 | r; + n = 0; + break; + } + } + if (n == 1) { + throw Error("invalid base64 string."); + } + return t.subarray(0, s); + }, + enc(i) { + let e = ""; + let t = 0; + let s; + let n = 0; + for (let r = 0; r < i.length; r++) { + s = i[r]; + switch (t) { + case 0: + e += MF[s >> 2]; + n = (s & 3) << 4; + t = 1; + break; + case 1: + e += MF[n | s >> 4]; + n = (s & 15) << 2; + t = 2; + break; + case 2: + e += MF[n | s >> 6]; + e += MF[s & 63]; + t = 0; + break; + } + } + if (t) { + e += MF[n]; + e += "="; + if (t == 1) { + e += "="; + } + } + return e; + } + }; + } +}); +function EZn(i, e, t) { + Tds(e, i); + const s = e.runtime.bin.makeReadOptions(t); + const n = kZn(i.getType().runtime.bin.listUnknownFields(i), e.field); + const [r, o] = Ids(e); + for (const a of n) { + e.runtime.bin.readField(r, s.readerFactory(a.data), e.field, a.wireType, s); + } + return o(); +} +function IZn(i, e, t, s) { + Tds(e, i); + const n = e.runtime.bin.makeReadOptions(s); + const r = e.runtime.bin.makeWriteOptions(s); + if (Dds(i, e)) { + const c = i.getType().runtime.bin.listUnknownFields(i).filter(u => u.no != e.field.no); + i.getType().runtime.bin.discardUnknownFields(i); + for (const u of c) { + i.getType().runtime.bin.onUnknownField(i, u.no, u.wireType, u.data); + } + } + const o = r.writerFactory(); + let a = e.field; + if (!a.opt && !a.repeated && (a.kind == "enum" || a.kind == "scalar")) { + a = { + ...e.field, + opt: true + }; + } + e.runtime.bin.writeField(a, t, o, r); + const l = n.readerFactory(o.finish()); + while (l.pos < l.len) { + const [c, u] = l.tag(); + const d = l.skip(u, c); + i.getType().runtime.bin.onUnknownField(i, c, u, d); + } +} +function Dds(i, e) { + const t = i.getType(); + return e.extendee.typeName === t.typeName && !!t.runtime.bin.listUnknownFields(i).find(s => s.no == e.field.no); +} +function Tds(i, e) { + Jv(i.extendee.typeName == e.getType().typeName, `extension ${i.typeName} can only be applied to message ${i.extendee.typeName}`); +} +var Pds = ue({ + "out-build/external/bufbuild/protobuf/extension-accessor.js"() { + "use strict"; + + NF(); + UVt(); + } +}); +function Lds(i, e) { + const t = i.localName; + if (i.repeated) { + return e[t].length > 0; + } + if (i.oneof) { + return e[i.oneof.localName].case === t; + } + switch (i.kind) { + case "enum": + case "scalar": + if (i.opt || i.req) { + return e[t] !== undefined; + } else if (i.kind == "enum") { + return e[t] !== i.T.values[0].no; + } else { + return !Eds(i.T, e[t]); + } + case "message": + return e[t] !== undefined; + case "map": + return Object.keys(e[t]).length > 0; + } +} +function Rds(i, e) { + const t = i.localName; + const s = !i.opt && !i.req; + if (i.repeated) { + e[t] = []; + } else if (i.oneof) { + e[i.oneof.localName] = { + case: undefined + }; + } else { + switch (i.kind) { + case "map": + e[t] = {}; + break; + case "enum": + e[t] = s ? i.T.values[0].no : undefined; + break; + case "scalar": + e[t] = s ? $ie(i.T, i.L) : undefined; + break; + case "message": + e[t] = undefined; + break; + } + } +} +var Nds = ue({ + "out-build/external/bufbuild/protobuf/private/reflect.js"() { + "use strict"; + + F7(); + } +}); +function Mz(i, e) { + if (i === null || typeof i != "object" || !Object.getOwnPropertyNames(N.prototype).every(s => s in i && typeof i[s] == "function")) { + return false; + } + const t = i.getType(); + if (t === null || typeof t != "function" || !("typeName" in t) || typeof t.typeName != "string") { + return false; + } else if (e === undefined) { + return true; + } else { + return t.typeName == e.typeName; + } +} +var O7 = ue({ + "out-build/external/bufbuild/protobuf/is-message.js"() { + "use strict"; + + aE(); + } +}); +function Mds(i, e) { + if (Mz(e) || !i.fieldWrapper) { + return e; + } else { + return i.fieldWrapper.wrapField(e); + } +} +var DZn; +var HVt = ue({ + "out-build/external/bufbuild/protobuf/private/field-wrapper.js"() { + "use strict"; + + KM(); + O7(); + DZn = { + "google.protobuf.DoubleValue": xn.DOUBLE, + "google.protobuf.FloatValue": xn.FLOAT, + "google.protobuf.Int64Value": xn.INT64, + "google.protobuf.UInt64Value": xn.UINT64, + "google.protobuf.Int32Value": xn.INT32, + "google.protobuf.UInt32Value": xn.UINT32, + "google.protobuf.BoolValue": xn.BOOL, + "google.protobuf.StringValue": xn.STRING, + "google.protobuf.BytesValue": xn.BYTES + }; + } +}); +function TZn(i) { + if (i) { + return { + ...zVt, + ...i + }; + } else { + return zVt; + } +} +function PZn(i) { + if (i) { + return { + ...JVt, + ...i + }; + } else { + return JVt; + } +} +function LZn() { + return { + makeReadOptions: TZn, + makeWriteOptions: PZn, + readMessage(i, e, t, s) { + if (e == null || Array.isArray(e) || typeof e != "object") { + throw new Error(`cannot decode message ${i.typeName} from JSON: ${AF(e)}`); + } + s = s ?? new i(); + const n = new Map(); + const r = t.typeRegistry; + for (const [o, a] of Object.entries(e)) { + const l = i.fields.findJsonName(o); + if (l) { + if (l.oneof) { + if (a === null && l.kind == "scalar") { + continue; + } + const c = n.get(l.oneof); + if (c !== undefined) { + throw new Error(`cannot decode message ${i.typeName} from JSON: multiple keys for oneof "${l.oneof.name}" present: "${c}", "${o}"`); + } + n.set(l.oneof, o); + } + Ads(s, a, l, t, i); + } else { + let c = false; + if (r?.findExtension && o.startsWith("[") && o.endsWith("]")) { + const u = r.findExtension(o.substring(1, o.length - 1)); + if (u && u.extendee.typeName == i.typeName) { + c = true; + const [d, h] = Ids(u); + Ads(d, a, u.field, t, u); + IZn(s, u, h(), t); + } + } + if (!c && !t.ignoreUnknownFields) { + throw new Error(`cannot decode message ${i.typeName} from JSON: key "${o}" is unknown`); + } + } + } + return s; + }, + writeMessage(i, e) { + const t = i.getType(); + const s = {}; + let n; + try { + for (n of t.fields.byNumber()) { + if (!Lds(n, i)) { + if (n.req) { + throw "required field not set"; + } + if (!e.emitDefaultValues || !NZn(n)) { + continue; + } + } + const o = n.oneof ? i[n.oneof.localName].value : i[n.localName]; + const a = $ds(n, o, e); + if (a !== undefined) { + s[e.useProtoFieldName ? n.name : n.jsonName] = a; + } + } + const r = e.typeRegistry; + if (r?.findExtensionFor) { + for (const o of t.runtime.bin.listUnknownFields(i)) { + const a = r.findExtensionFor(t.typeName, o.no); + if (a && Dds(i, a)) { + const l = EZn(i, a, e); + const c = $ds(a.field, l, e); + if (c !== undefined) { + s[a.field.jsonName] = c; + } + } + } + } + } catch (r) { + const o = n ? `cannot encode field ${t.typeName}.${n.name} to JSON` : `cannot encode message ${t.typeName} to JSON`; + const a = r instanceof Error ? r.message : String(r); + throw new Error(o + (a.length > 0 ? `: ${a}` : "")); + } + return s; + }, + readScalar(i, e, t) { + return Yme(i, e, t ?? A7.BIGINT, true); + }, + writeScalar(i, e, t) { + if (e !== undefined && (t || Eds(i, e))) { + return Gct(i, e); + } + }, + debug: AF + }; +} +function AF(i) { + if (i === null) { + return "null"; + } + switch (typeof i) { + case "object": + if (Array.isArray(i)) { + return "array"; + } else { + return "object"; + } + case "string": + if (i.length > 100) { + return "string"; + } else { + return `"${i.split("\"").join("\\\"")}"`; + } + default: + return String(i); + } +} +function Ads(i, e, t, s, n) { + let r = t.localName; + if (t.repeated) { + Jv(t.kind != "map"); + if (e === null) { + return; + } + if (!Array.isArray(e)) { + throw new Error(`cannot decode field ${n.typeName}.${t.name} from JSON: ${AF(e)}`); + } + const o = i[r]; + for (const a of e) { + if (a === null) { + throw new Error(`cannot decode field ${n.typeName}.${t.name} from JSON: ${AF(a)}`); + } + switch (t.kind) { + case "message": + o.push(t.T.fromJson(a, s)); + break; + case "enum": + const l = qVt(t.T, a, s.ignoreUnknownFields, true); + if (l !== Qme) { + o.push(l); + } + break; + case "scalar": + try { + o.push(Yme(t.T, a, t.L, true)); + } catch (c) { + let u = `cannot decode field ${n.typeName}.${t.name} from JSON: ${AF(a)}`; + if (c instanceof Error && c.message.length > 0) { + u += `: ${c.message}`; + } + throw new Error(u); + } + break; + } + } + } else if (t.kind == "map") { + if (e === null) { + return; + } + if (typeof e != "object" || Array.isArray(e)) { + throw new Error(`cannot decode field ${n.typeName}.${t.name} from JSON: ${AF(e)}`); + } + const o = i[r]; + for (const [a, l] of Object.entries(e)) { + if (l === null) { + throw new Error(`cannot decode field ${n.typeName}.${t.name} from JSON: map value null`); + } + let c; + try { + c = RZn(t.K, a); + } catch (u) { + let d = `cannot decode map key for field ${n.typeName}.${t.name} from JSON: ${AF(e)}`; + if (u instanceof Error && u.message.length > 0) { + d += `: ${u.message}`; + } + throw new Error(d); + } + switch (t.V.kind) { + case "message": + o[c] = t.V.T.fromJson(l, s); + break; + case "enum": + const u = qVt(t.V.T, l, s.ignoreUnknownFields, true); + if (u !== Qme) { + o[c] = u; + } + break; + case "scalar": + try { + o[c] = Yme(t.V.T, l, A7.BIGINT, true); + } catch (d) { + let h = `cannot decode map value for field ${n.typeName}.${t.name} from JSON: ${AF(e)}`; + if (d instanceof Error && d.message.length > 0) { + h += `: ${d.message}`; + } + throw new Error(h); + } + break; + } + } + } else { + if (t.oneof) { + i = i[t.oneof.localName] = { + case: r + }; + r = "value"; + } + switch (t.kind) { + case "message": + const o = t.T; + if (e === null && o.typeName != "google.protobuf.Value") { + return; + } + let a = i[r]; + if (Mz(a)) { + a.fromJson(e, s); + } else { + i[r] = a = o.fromJson(e, s); + if (o.fieldWrapper && !t.oneof) { + i[r] = o.fieldWrapper.unwrapField(a); + } + } + break; + case "enum": + const l = qVt(t.T, e, s.ignoreUnknownFields, false); + switch (l) { + case Xme: + Rds(t, i); + break; + case Qme: + break; + default: + i[r] = l; + break; + } + break; + case "scalar": + try { + const c = Yme(t.T, e, t.L, false); + switch (c) { + case Xme: + Rds(t, i); + break; + default: + i[r] = c; + break; + } + } catch (c) { + let u = `cannot decode field ${n.typeName}.${t.name} from JSON: ${AF(e)}`; + if (c instanceof Error && c.message.length > 0) { + u += `: ${c.message}`; + } + throw new Error(u); + } + break; + } + } +} +function RZn(i, e) { + if (i === xn.BOOL) { + switch (e) { + case "true": + e = true; + break; + case "false": + e = false; + break; + } + } + return Yme(i, e, A7.BIGINT, true).toString(); +} +function Yme(i, e, t, s) { + if (e === null) { + if (s) { + return $ie(i, t); + } else { + return Xme; + } + } + switch (i) { + case xn.DOUBLE: + case xn.FLOAT: + if (e === "NaN") { + return Number.NaN; + } + if (e === "Infinity") { + return Number.POSITIVE_INFINITY; + } + if (e === "-Infinity") { + return Number.NEGATIVE_INFINITY; + } + if (e === "" || typeof e == "string" && e.trim().length !== e.length || typeof e != "string" && typeof e != "number") { + break; + } + const n = Number(e); + if (Number.isNaN(n) || !Number.isFinite(n)) { + break; + } + if (i == xn.FLOAT) { + uds(n); + } + return n; + case xn.INT32: + case xn.FIXED32: + case xn.SFIXED32: + case xn.SINT32: + case xn.UINT32: + let r; + if (typeof e == "number") { + r = e; + } else if (typeof e == "string" && e.length > 0 && e.trim().length === e.length) { + r = Number(e); + } + if (r === undefined) { + break; + } + if (i == xn.UINT32 || i == xn.FIXED32) { + AVt(r); + } else { + Jct(r); + } + return r; + case xn.INT64: + case xn.SFIXED64: + case xn.SINT64: + if (typeof e != "number" && typeof e != "string") { + break; + } + const o = wd.parse(e); + if (t) { + return o.toString(); + } else { + return o; + } + case xn.FIXED64: + case xn.UINT64: + if (typeof e != "number" && typeof e != "string") { + break; + } + const a = wd.uParse(e); + if (t) { + return a.toString(); + } else { + return a; + } + case xn.BOOL: + if (typeof e != "boolean") { + break; + } + return e; + case xn.STRING: + if (typeof e != "string") { + break; + } + try { + encodeURIComponent(e); + } catch { + throw new Error("invalid UTF8"); + } + return e; + case xn.BYTES: + if (e === "") { + return new Uint8Array(0); + } + if (typeof e != "string") { + break; + } + return WVt.dec(e); + } + throw new Error(); +} +function qVt(i, e, t, s) { + if (e === null) { + if (i.typeName == "google.protobuf.NullValue") { + return 0; + } else if (s) { + return i.values[0].no; + } else { + return Xme; + } + } + switch (typeof e) { + case "number": + if (Number.isInteger(e)) { + return e; + } + break; + case "string": + const n = i.findName(e); + if (n !== undefined) { + return n.no; + } + if (t) { + return Qme; + } + break; + } + throw new Error(`cannot decode enum ${i.typeName} from JSON: ${AF(e)}`); +} +function NZn(i) { + if (i.repeated || i.kind == "map") { + return true; + } else { + return !i.oneof && i.kind != "message" && !i.opt && !i.req; + } +} +function $ds(i, e, t) { + if (i.kind == "map") { + Jv(typeof e == "object" && e != null); + const s = {}; + const n = Object.entries(e); + switch (i.V.kind) { + case "scalar": + for (const [o, a] of n) { + s[o.toString()] = Gct(i.V.T, a); + } + break; + case "message": + for (const [o, a] of n) { + s[o.toString()] = a.toJson(t); + } + break; + case "enum": + const r = i.V.T; + for (const [o, a] of n) { + s[o.toString()] = jVt(r, a, t.enumAsInteger); + } + break; + } + if (t.emitDefaultValues || n.length > 0) { + return s; + } else { + return undefined; + } + } + if (i.repeated) { + Jv(Array.isArray(e)); + const s = []; + switch (i.kind) { + case "scalar": + for (let n = 0; n < e.length; n++) { + s.push(Gct(i.T, e[n])); + } + break; + case "enum": + for (let n = 0; n < e.length; n++) { + s.push(jVt(i.T, e[n], t.enumAsInteger)); + } + break; + case "message": + for (let n = 0; n < e.length; n++) { + s.push(e[n].toJson(t)); + } + break; + } + if (t.emitDefaultValues || s.length > 0) { + return s; + } else { + return undefined; + } + } + switch (i.kind) { + case "scalar": + return Gct(i.T, e); + case "enum": + return jVt(i.T, e, t.enumAsInteger); + case "message": + return Mds(i.T, e).toJson(t); + } +} +function jVt(i, e, t) { + Jv(typeof e == "number"); + if (i.typeName == "google.protobuf.NullValue") { + return null; + } else if (t) { + return e; + } else { + return i.findNumber(e)?.name ?? e; + } +} +function Gct(i, e) { + switch (i) { + case xn.INT32: + case xn.SFIXED32: + case xn.SINT32: + case xn.FIXED32: + case xn.UINT32: + Jv(typeof e == "number"); + return e; + case xn.FLOAT: + case xn.DOUBLE: + Jv(typeof e == "number"); + if (Number.isNaN(e)) { + return "NaN"; + } else if (e === Number.POSITIVE_INFINITY) { + return "Infinity"; + } else if (e === Number.NEGATIVE_INFINITY) { + return "-Infinity"; + } else { + return e; + } + case xn.STRING: + Jv(typeof e == "string"); + return e; + case xn.BOOL: + Jv(typeof e == "boolean"); + return e; + case xn.UINT64: + case xn.FIXED64: + case xn.INT64: + case xn.SFIXED64: + case xn.SINT64: + Jv(typeof e == "bigint" || typeof e == "string" || typeof e == "number"); + return e.toString(); + case xn.BYTES: + Jv(e instanceof Uint8Array); + return WVt.enc(e); + } +} +var zVt; +var JVt; +var Xme; +var Qme; +var MZn = ue({ + "out-build/external/bufbuild/protobuf/private/json-format.js"() { + "use strict"; + + NF(); + M7(); + VVt(); + UVt(); + Pds(); + Nds(); + HVt(); + F7(); + F7(); + KM(); + O7(); + zVt = { + ignoreUnknownFields: false + }; + JVt = { + emitDefaultValues: false, + enumAsInteger: false, + useProtoFieldName: false, + prettySpaces: 0 + }; + Xme = Symbol(); + Qme = Symbol(); + } +}); +var jy; +var Fds; +var Ods; +var GVt = ue({ + "out-build/external/bufbuild/protobuf/binary-encoding.js"() { + "use strict"; + + kds(); + NF(); + M7(); + (function (i) { + i[i.Varint = 0] = "Varint"; + i[i.Bit64 = 1] = "Bit64"; + i[i.LengthDelimited = 2] = "LengthDelimited"; + i[i.StartGroup = 3] = "StartGroup"; + i[i.EndGroup = 4] = "EndGroup"; + i[i.Bit32 = 5] = "Bit32"; + })(jy ||= {}); + Fds = class { + constructor(i) { + this.stack = []; + this.textEncoder = i ?? new TextEncoder(); + this.chunks = []; + this.buf = []; + } + finish() { + this.chunks.push(new Uint8Array(this.buf)); + let i = 0; + for (let s = 0; s < this.chunks.length; s++) { + i += this.chunks[s].length; + } + let e = new Uint8Array(i); + let t = 0; + for (let s = 0; s < this.chunks.length; s++) { + e.set(this.chunks[s], t); + t += this.chunks[s].length; + } + this.chunks = []; + return e; + } + fork() { + this.stack.push({ + chunks: this.chunks, + buf: this.buf + }); + this.chunks = []; + this.buf = []; + return this; + } + join() { + let i = this.finish(); + let e = this.stack.pop(); + if (!e) { + throw new Error("invalid state, fork stack empty"); + } + this.chunks = e.chunks; + this.buf = e.buf; + this.uint32(i.byteLength); + return this.raw(i); + } + tag(i, e) { + return this.uint32((i << 3 | e) >>> 0); + } + raw(i) { + if (this.buf.length) { + this.chunks.push(new Uint8Array(this.buf)); + this.buf = []; + } + this.chunks.push(i); + return this; + } + uint32(i) { + for (AVt(i); i > 127;) { + this.buf.push(i & 127 | 128); + i = i >>> 7; + } + this.buf.push(i); + return this; + } + int32(i) { + Jct(i); + xds(i, this.buf); + return this; + } + bool(i) { + this.buf.push(i ? 1 : 0); + return this; + } + bytes(i) { + this.uint32(i.byteLength); + return this.raw(i); + } + string(i) { + let e = this.textEncoder.encode(i); + this.uint32(e.byteLength); + return this.raw(e); + } + float(i) { + uds(i); + let e = new Uint8Array(4); + new DataView(e.buffer).setFloat32(0, i, true); + return this.raw(e); + } + double(i) { + let e = new Uint8Array(8); + new DataView(e.buffer).setFloat64(0, i, true); + return this.raw(e); + } + fixed32(i) { + AVt(i); + let e = new Uint8Array(4); + new DataView(e.buffer).setUint32(0, i, true); + return this.raw(e); + } + sfixed32(i) { + Jct(i); + let e = new Uint8Array(4); + new DataView(e.buffer).setInt32(0, i, true); + return this.raw(e); + } + sint32(i) { + Jct(i); + i = (i << 1 ^ i >> 31) >>> 0; + xds(i, this.buf); + return this; + } + sfixed64(i) { + let e = new Uint8Array(8); + let t = new DataView(e.buffer); + let s = wd.enc(i); + t.setInt32(0, s.lo, true); + t.setInt32(4, s.hi, true); + return this.raw(e); + } + fixed64(i) { + let e = new Uint8Array(8); + let t = new DataView(e.buffer); + let s = wd.uEnc(i); + t.setInt32(0, s.lo, true); + t.setInt32(4, s.hi, true); + return this.raw(e); + } + int64(i) { + let e = wd.enc(i); + OVt(e.lo, e.hi, this.buf); + return this; + } + sint64(i) { + let e = wd.enc(i); + let t = e.hi >> 31; + let s = e.lo << 1 ^ t; + let n = (e.hi << 1 | e.lo >>> 31) ^ t; + OVt(s, n, this.buf); + return this; + } + uint64(i) { + let e = wd.uEnc(i); + OVt(e.lo, e.hi, this.buf); + return this; + } + }; + Ods = class { + constructor(i, e) { + this.varint64 = bZn; + this.uint32 = wZn; + this.buf = i; + this.len = i.length; + this.pos = 0; + this.view = new DataView(i.buffer, i.byteOffset, i.byteLength); + this.textDecoder = e ?? new TextDecoder(); + } + tag() { + let i = this.uint32(); + let e = i >>> 3; + let t = i & 7; + if (e <= 0 || t < 0 || t > 5) { + throw new Error("illegal tag: field no " + e + " wire type " + t); + } + return [e, t]; + } + skip(i, e) { + let t = this.pos; + switch (i) { + case jy.Varint: + while (this.buf[this.pos++] & 128); + break; + case jy.Bit64: + this.pos += 4; + case jy.Bit32: + this.pos += 4; + break; + case jy.LengthDelimited: + let s = this.uint32(); + this.pos += s; + break; + case jy.StartGroup: + while (true) { + const [n, r] = this.tag(); + if (r === jy.EndGroup) { + if (e !== undefined && n !== e) { + throw new Error("invalid end group tag"); + } + break; + } + this.skip(r, n); + } + break; + default: + throw new Error("cant skip wire type " + i); + } + this.assertBounds(); + return this.buf.subarray(t, this.pos); + } + assertBounds() { + if (this.pos > this.len) { + throw new RangeError("premature EOF"); + } + } + int32() { + return this.uint32() | 0; + } + sint32() { + let i = this.uint32(); + return i >>> 1 ^ -(i & 1); + } + int64() { + return wd.dec(...this.varint64()); + } + uint64() { + return wd.uDec(...this.varint64()); + } + sint64() { + let [i, e] = this.varint64(); + let t = -(i & 1); + i = (i >>> 1 | (e & 1) << 31) ^ t; + e = e >>> 1 ^ t; + return wd.dec(i, e); + } + bool() { + let [i, e] = this.varint64(); + return i !== 0 || e !== 0; + } + fixed32() { + return this.view.getUint32((this.pos += 4) - 4, true); + } + sfixed32() { + return this.view.getInt32((this.pos += 4) - 4, true); + } + fixed64() { + return wd.uDec(this.sfixed32(), this.sfixed32()); + } + sfixed64() { + return wd.dec(this.sfixed32(), this.sfixed32()); + } + float() { + return this.view.getFloat32((this.pos += 4) - 4, true); + } + double() { + return this.view.getFloat64((this.pos += 8) - 8, true); + } + bytes() { + let i = this.uint32(); + let e = this.pos; + this.pos += i; + this.assertBounds(); + return this.buf.subarray(e, e + i); + } + string() { + return this.textDecoder.decode(this.bytes()); + } + }; + } +}); +function AZn(i) { + if (i) { + return { + ...KVt, + ...i + }; + } else { + return KVt; + } +} +function $Zn(i) { + if (i) { + return { + ...YVt, + ...i + }; + } else { + return YVt; + } +} +function FZn() { + return { + makeReadOptions: AZn, + makeWriteOptions: $Zn, + listUnknownFields(i) { + return i[Az] ?? []; + }, + discardUnknownFields(i) { + delete i[Az]; + }, + writeUnknownFields(i, e) { + const s = i[Az]; + if (s) { + for (const n of s) { + e.tag(n.no, n.wireType).raw(n.data); + } + } + }, + onUnknownField(i, e, t, s) { + const n = i; + if (!Array.isArray(n[Az])) { + n[Az] = []; + } + n[Az].push({ + no: e, + wireType: t, + data: s + }); + }, + readMessage(i, e, t, s, n) { + const r = i.getType(); + const o = n ? e.len : e.pos + t; + let a; + let l; + while (e.pos < o && ([a, l] = e.tag(), n !== true || l != jy.EndGroup)) { + const c = r.fields.find(a); + if (!c) { + const u = e.skip(l, a); + if (s.readUnknownFields) { + this.onUnknownField(i, a, l, u); + } + continue; + } + _ds(i, e, c, l, s); + } + if (n && (l != jy.EndGroup || a !== t)) { + throw new Error("invalid end group tag"); + } + }, + readField: _ds, + writeMessage(i, e, t) { + const s = i.getType(); + for (const n of s.fields.byNumber()) { + if (!Lds(n, i)) { + if (n.req) { + throw new Error(`cannot encode field ${s.typeName}.${n.name} to binary: required field not set`); + } + continue; + } + const r = n.oneof ? i[n.oneof.localName].value : i[n.localName]; + Bds(n, r, e, t); + } + if (t.writeUnknownFields) { + this.writeUnknownFields(i, e); + } + return e; + }, + writeField(i, e, t, s) { + if (e !== undefined) { + Bds(i, e, t, s); + } + } + }; +} +function _ds(i, e, t, s, n) { + let { + repeated: r, + localName: o + } = t; + if (t.oneof) { + i = i[t.oneof.localName]; + if (i.case != o) { + delete i.value; + } + i.case = o; + o = "value"; + } + switch (t.kind) { + case "scalar": + case "enum": + const a = t.kind == "enum" ? xn.INT32 : t.T; + let l = Yct; + if (t.kind == "scalar" && t.L > 0) { + l = _Zn; + } + if (r) { + let h = i[o]; + if (s == jy.LengthDelimited && a != xn.STRING && a != xn.BYTES) { + let p = e.uint32() + e.pos; + while (e.pos < p) { + h.push(l(e, a)); + } + } else { + h.push(l(e, a)); + } + } else { + i[o] = l(e, a); + } + break; + case "message": + const c = t.T; + if (r) { + i[o].push(Kct(e, new c(), n, t)); + } else if (Mz(i[o])) { + Kct(e, i[o], n, t); + } else { + i[o] = Kct(e, new c(), n, t); + if (c.fieldWrapper && !t.oneof && !t.repeated) { + i[o] = c.fieldWrapper.unwrapField(i[o]); + } + } + break; + case "map": + let [u, d] = OZn(t, e, n); + i[o][u] = d; + break; + } +} +function Kct(i, e, t, s) { + const n = e.getType().runtime.bin; + const r = s?.delimited; + n.readMessage(e, i, r ? s.no : i.uint32(), t, r); + return e; +} +function OZn(i, e, t) { + const s = e.uint32(); + const n = e.pos + s; + let r; + let o; + while (e.pos < n) { + const [a] = e.tag(); + switch (a) { + case 1: + r = Yct(e, i.K); + break; + case 2: + switch (i.V.kind) { + case "scalar": + o = Yct(e, i.V.T); + break; + case "enum": + o = e.int32(); + break; + case "message": + o = Kct(e, new i.V.T(), t, undefined); + break; + } + break; + } + } + if (r === undefined) { + r = $ie(i.K, A7.BIGINT); + } + if (typeof r != "string" && typeof r != "number") { + r = r.toString(); + } + if (o === undefined) { + switch (i.V.kind) { + case "scalar": + o = $ie(i.V.T, A7.BIGINT); + break; + case "enum": + o = i.V.T.values[0].no; + break; + case "message": + o = new i.V.T(); + break; + } + } + return [r, o]; +} +function _Zn(i, e) { + const t = Yct(i, e); + if (typeof t == "bigint") { + return t.toString(); + } else { + return t; + } +} +function Yct(i, e) { + switch (e) { + case xn.STRING: + return i.string(); + case xn.BOOL: + return i.bool(); + case xn.DOUBLE: + return i.double(); + case xn.FLOAT: + return i.float(); + case xn.INT32: + return i.int32(); + case xn.INT64: + return i.int64(); + case xn.UINT64: + return i.uint64(); + case xn.FIXED64: + return i.fixed64(); + case xn.BYTES: + return i.bytes(); + case xn.FIXED32: + return i.fixed32(); + case xn.SFIXED32: + return i.sfixed32(); + case xn.SFIXED64: + return i.sfixed64(); + case xn.SINT64: + return i.sint64(); + case xn.UINT32: + return i.uint32(); + case xn.SINT32: + return i.sint32(); + } +} +function Bds(i, e, t, s) { + Jv(e !== undefined); + const n = i.repeated; + switch (i.kind) { + case "scalar": + case "enum": + let r = i.kind == "enum" ? xn.INT32 : i.T; + if (n) { + Jv(Array.isArray(e)); + if (i.packed) { + UZn(t, r, i.no, e); + } else { + for (const o of e) { + Zme(t, r, i.no, o); + } + } + } else { + Zme(t, r, i.no, e); + } + break; + case "message": + if (n) { + Jv(Array.isArray(e)); + for (const o of e) { + Uds(t, s, i, o); + } + } else { + Uds(t, s, i, e); + } + break; + case "map": + Jv(typeof e == "object" && e != null); + for (const [o, a] of Object.entries(e)) { + BZn(t, s, i, o, a); + } + break; + } +} +function BZn(i, e, t, s, n) { + i.tag(t.no, jy.LengthDelimited); + i.fork(); + let r = s; + switch (t.K) { + case xn.INT32: + case xn.FIXED32: + case xn.UINT32: + case xn.SFIXED32: + case xn.SINT32: + r = Number.parseInt(s); + break; + case xn.BOOL: + Jv(s == "true" || s == "false"); + r = s == "true"; + break; + } + Zme(i, t.K, 1, r); + switch (t.V.kind) { + case "scalar": + Zme(i, t.V.T, 2, n); + break; + case "enum": + Zme(i, xn.INT32, 2, n); + break; + case "message": + Jv(n !== undefined); + i.tag(2, jy.LengthDelimited).bytes(n.toBinary(e)); + break; + } + i.join(); +} +function Uds(i, e, t, s) { + const n = Mds(t.T, s); + if (t.delimited) { + i.tag(t.no, jy.StartGroup).raw(n.toBinary(e)).tag(t.no, jy.EndGroup); + } else { + i.tag(t.no, jy.LengthDelimited).bytes(n.toBinary(e)); + } +} +function Zme(i, e, t, s) { + Jv(s !== undefined); + let [n, r] = Wds(e); + i.tag(t, n)[r](s); +} +function UZn(i, e, t, s) { + if (!s.length) { + return; + } + i.tag(t, jy.LengthDelimited).fork(); + let [, n] = Wds(e); + for (let r = 0; r < s.length; r++) { + i[n](s[r]); + } + i.join(); +} +function Wds(i) { + let e = jy.Varint; + switch (i) { + case xn.BYTES: + case xn.STRING: + e = jy.LengthDelimited; + break; + case xn.DOUBLE: + case xn.FIXED64: + case xn.SFIXED64: + e = jy.Bit64; + break; + case xn.FIXED32: + case xn.SFIXED32: + case xn.FLOAT: + e = jy.Bit32; + break; + } + const t = xn[i].toLowerCase(); + return [e, t]; +} +var Az; +var KVt; +var YVt; +var WZn = ue({ + "out-build/external/bufbuild/protobuf/private/binary-format.js"() { + "use strict"; + + GVt(); + HVt(); + F7(); + NF(); + Nds(); + KM(); + O7(); + Az = Symbol("@bufbuild/protobuf/unknown-fields"); + KVt = { + readUnknownFields: true, + readerFactory: i => new Ods(i) + }; + YVt = { + writeUnknownFields: true, + writerFactory: () => new Fds() + }; + } +}); +function VZn() { + return { + setEnumType: bds, + initPartial(i, e) { + if (i === undefined) { + return; + } + const t = e.getType(); + for (const s of t.fields.byMember()) { + const n = s.localName; + const r = e; + const o = i; + if (o[n] != null) { + switch (s.kind) { + case "oneof": + const a = o[n].case; + if (a === undefined) { + continue; + } + const l = s.findField(a); + let c = o[n].value; + if (l && l.kind == "message" && !Mz(c, l.T)) { + c = new l.T(c); + } else if (l && l.kind === "scalar" && l.T === xn.BYTES) { + c = ebe(c); + } + r[n] = { + case: a, + value: c + }; + break; + case "scalar": + case "enum": + let u = o[n]; + if (s.T === xn.BYTES) { + u = s.repeated ? u.map(ebe) : ebe(u); + } + r[n] = u; + break; + case "map": + switch (s.V.kind) { + case "scalar": + case "enum": + if (s.V.T === xn.BYTES) { + for (const [g, p] of Object.entries(o[n])) { + r[n][g] = ebe(p); + } + } else { + Object.assign(r[n], o[n]); + } + break; + case "message": + const h = s.V.T; + for (const g of Object.keys(o[n])) { + let p = o[n][g]; + if (!h.fieldWrapper) { + p = new h(p); + } + r[n][g] = p; + } + break; + } + break; + case "message": + const d = s.T; + if (s.repeated) { + r[n] = o[n].map(h => Mz(h, d) ? h : new d(h)); + } else { + const h = o[n]; + if (d.fieldWrapper) { + if (d.typeName === "google.protobuf.BytesValue") { + r[n] = ebe(h); + } else { + r[n] = h; + } + } else { + r[n] = Mz(h, d) ? h : new d(h); + } + } + break; + } + } + } + }, + equals(i, e, t) { + if (e === t) { + return true; + } else if (!e || !t) { + return false; + } else { + return i.fields.byMember().every(s => { + const n = e[s.localName]; + const r = t[s.localName]; + if (s.repeated) { + if (n.length !== r.length) { + return false; + } + switch (s.kind) { + case "message": + return n.every((o, a) => s.T.equals(o, r[a])); + case "scalar": + return n.every((o, a) => $7(s.T, o, r[a])); + case "enum": + return n.every((o, a) => $7(xn.INT32, o, r[a])); + } + throw new Error(`repeated cannot contain ${s.kind}`); + } + switch (s.kind) { + case "message": + return s.T.equals(n, r); + case "enum": + return $7(xn.INT32, n, r); + case "scalar": + return $7(s.T, n, r); + case "oneof": + if (n.case !== r.case) { + return false; + } + const o = s.findField(n.case); + if (o === undefined) { + return true; + } + switch (o.kind) { + case "message": + return o.T.equals(n.value, r.value); + case "enum": + return $7(xn.INT32, n.value, r.value); + case "scalar": + return $7(o.T, n.value, r.value); + } + throw new Error(`oneof cannot contain ${o.kind}`); + case "map": + const a = Object.keys(n).concat(Object.keys(r)); + switch (s.V.kind) { + case "message": + const l = s.V.T; + return a.every(u => l.equals(n[u], r[u])); + case "enum": + return a.every(u => $7(xn.INT32, n[u], r[u])); + case "scalar": + const c = s.V.T; + return a.every(u => $7(c, n[u], r[u])); + } + break; + } + }); + } + }, + clone(i) { + const e = i.getType(); + const t = new e(); + const s = t; + for (const n of e.fields.byMember()) { + const r = i[n.localName]; + let o; + if (n.repeated) { + o = r.map(Xct); + } else if (n.kind == "map") { + o = s[n.localName]; + for (const [a, l] of Object.entries(r)) { + o[a] = Xct(l); + } + } else if (n.kind == "oneof") { + o = n.findField(r.case) ? { + case: r.case, + value: Xct(r.value) + } : { + case: undefined + }; + } else { + o = Xct(r); + } + s[n.localName] = o; + } + for (const n of e.runtime.bin.listUnknownFields(i)) { + e.runtime.bin.onUnknownField(s, n.no, n.wireType, n.data); + } + return t; + } + }; +} +function Xct(i) { + if (i === undefined) { + return i; + } + if (Mz(i)) { + return i.clone(); + } + if (i instanceof Uint8Array) { + const e = new Uint8Array(i.byteLength); + e.set(i); + return e; + } + return i; +} +function ebe(i) { + if (i instanceof Uint8Array) { + return i; + } else { + return new Uint8Array(i); + } +} +var HZn = ue({ + "out-build/external/bufbuild/protobuf/private/util-common.js"() { + "use strict"; + + FVt(); + F7(); + KM(); + O7(); + } +}); +function Vds(i, e, t) { + return { + syntax: i, + json: LZn(), + bin: FZn(), + util: { + ...VZn(), + newFieldList: e, + initFields: t + }, + makeMessageType(s, n, r) { + return pZn(this, s, n, r); + }, + makeEnum: gZn, + makeEnumType: vds, + getEnumType: mds, + makeExtension(s, n, r) { + return SZn(this, s, n, r); + } + }; +} +var Hds = ue({ + "out-build/external/bufbuild/protobuf/private/proto-runtime.js"() { + "use strict"; + + FVt(); + mZn(); + UVt(); + MZn(); + WZn(); + HZn(); + } +}); +var XVt; +var qds = ue({ + "out-build/external/bufbuild/protobuf/private/field-list.js"() { + "use strict"; + + XVt = class { + constructor(i, e) { + this._fields = i; + this._normalizer = e; + } + findJsonName(i) { + if (!this.jsonNames) { + const e = {}; + for (const t of this.list()) { + e[t.jsonName] = e[t.name] = t; + } + this.jsonNames = e; + } + return this.jsonNames[i]; + } + find(i) { + if (!this.numbers) { + const e = {}; + for (const t of this.list()) { + e[t.no] = t; + } + this.numbers = e; + } + return this.numbers[i]; + } + list() { + this.all ||= this._normalizer(this._fields); + return this.all; + } + byNumber() { + this.numbersAsc ||= this.list().concat().sort((i, e) => i.no - e.no); + return this.numbersAsc; + } + byMember() { + if (!this.members) { + this.members = []; + const i = this.members; + let e; + for (const t of this.list()) { + if (t.oneof) { + if (t.oneof !== e) { + e = t.oneof; + i.push(e); + } + } else { + i.push(t); + } + } + } + return this.members; + } + }; + } +}); +function jds(i, e) { + const t = zds(i); + if (e) { + return t; + } else { + return Xds(Yds(t)); + } +} +function qZn(i) { + return jds(i, false); +} +function zds(i) { + let e = false; + const t = []; + for (let s = 0; s < i.length; s++) { + let n = i.charAt(s); + switch (n) { + case "_": + e = true; + break; + case "0": + case "1": + case "2": + case "3": + case "4": + case "5": + case "6": + case "7": + case "8": + case "9": + t.push(n); + e = false; + break; + default: + if (e) { + e = false; + n = n.toUpperCase(); + } + t.push(n); + break; + } + } + return t.join(""); +} +var Jds; +var Gds; +var Kds; +var QVt; +var Yds; +var Xds; +var tbe = ue({ + "out-build/external/bufbuild/protobuf/private/names.js"() { + "use strict"; + + Jds = zds; + Gds = new Set(["constructor", "toString", "toJSON", "valueOf"]); + Kds = new Set(["getType", "clone", "equals", "fromBinary", "fromJson", "fromJsonString", "toBinary", "toJson", "toJsonString", "toObject"]); + QVt = i => `${i}$`; + Yds = i => Kds.has(i) ? QVt(i) : i; + Xds = i => Gds.has(i) ? QVt(i) : i; + } +}); +var Qds; +var jZn = ue({ + "out-build/external/bufbuild/protobuf/private/field.js"() { + "use strict"; + + tbe(); + NF(); + Qds = class { + constructor(i) { + this.kind = "oneof"; + this.repeated = false; + this.packed = false; + this.opt = false; + this.req = false; + this.default = undefined; + this.fields = []; + this.name = i; + this.localName = qZn(i); + } + addField(i) { + Jv(i.oneof === this, `field ${i.name} not one of ${this.name}`); + this.fields.push(i); + } + findField(i) { + if (!this._lookup) { + this._lookup = Object.create(null); + for (let e = 0; e < this.fields.length; e++) { + this._lookup[this.fields[e].localName] = this.fields[e]; + } + } + return this._lookup[i]; + } + }; + } +}); +function Zds(i, e) { + const t = []; + let s; + for (const n of typeof i == "function" ? i() : i) { + const r = n; + r.localName = jds(n.name, n.oneof !== undefined); + r.jsonName = n.jsonName ?? Jds(n.name); + r.repeated = n.repeated ?? false; + if (n.kind == "scalar") { + r.L = n.L ?? A7.BIGINT; + } + r.delimited = n.delimited ?? false; + r.req = n.req ?? false; + r.opt = n.opt ?? false; + if (n.packed === undefined) { + if (e) { + r.packed = n.kind == "enum" || n.kind == "scalar" && n.T != xn.BYTES && n.T != xn.STRING; + } else { + r.packed = false; + } + } + if (n.oneof !== undefined) { + const o = typeof n.oneof == "string" ? n.oneof : n.oneof.name; + if (!s || s.name != o) { + s = new Qds(o); + } + r.oneof = s; + s.addField(r); + } + t.push(r); + } + return t; +} +var ehs = ue({ + "out-build/external/bufbuild/protobuf/private/field-normalize.js"() { + "use strict"; + + jZn(); + tbe(); + KM(); + } +}); +var m; +var aR = ue({ + "out-build/external/bufbuild/protobuf/proto3.js"() { + "use strict"; + + Hds(); + qds(); + F7(); + ehs(); + m = Vds("proto3", i => new XVt(i, e => Zds(e, true)), i => { + for (const e of i.getType().fields.byMember()) { + if (e.opt) { + continue; + } + const t = e.localName; + const s = i; + if (e.repeated) { + s[t] = []; + continue; + } + switch (e.kind) { + case "oneof": + s[t] = { + case: undefined + }; + break; + case "enum": + s[t] = 0; + break; + case "map": + s[t] = {}; + break; + case "scalar": + s[t] = $ie(e.T, e.L); + break; + case "message": + break; + } + } + }); + } +}); +var rs; +var Qct = ue({ + "out-build/external/bufbuild/protobuf/proto2.js"() { + "use strict"; + + Hds(); + qds(); + ehs(); + rs = Vds("proto2", i => new XVt(i, e => Zds(e, false)), i => { + for (const e of i.getType().fields.byMember()) { + const t = e.localName; + const s = i; + if (e.repeated) { + s[t] = []; + continue; + } + switch (e.kind) { + case "oneof": + s[t] = { + case: undefined + }; + break; + case "map": + s[t] = {}; + break; + case "scalar": + case "enum": + case "message": + break; + } + } + }); + } +}); +var zZn; +var JZn = ue({ + "out-build/external/bufbuild/protobuf/proto-double.js"() { + "use strict"; + + zZn = { + NaN: Number.NaN, + POSITIVE_INFINITY: Number.POSITIVE_INFINITY, + NEGATIVE_INFINITY: Number.NEGATIVE_INFINITY + }; + } +}); +var GZn = ue({ + "out-build/external/bufbuild/protobuf/proto-delimited.js"() { + "use strict"; + + GVt(); + } +}); +var KZn = ue({ + "out-build/external/bufbuild/protobuf/private/reify-wkt.js"() { + "use strict"; + + KM(); + } +}); +var YZn = ue({ + "out-build/external/bufbuild/protobuf/codegen-info.js"() { + "use strict"; + + tbe(); + HVt(); + F7(); + KZn(); + } +}); +var Ge; +var ths; +var ihs = ue({ + "out-build/external/bufbuild/protobuf/service-type.js"() { + "use strict"; + + (function (i) { + i[i.Unary = 0] = "Unary"; + i[i.ServerStreaming = 1] = "ServerStreaming"; + i[i.ClientStreaming = 2] = "ClientStreaming"; + i[i.BiDiStreaming = 3] = "BiDiStreaming"; + })(Ge ||= {}); + (function (i) { + i[i.NoSideEffects = 1] = "NoSideEffects"; + i[i.Idempotent = 2] = "Idempotent"; + })(ths ||= {}); + } +}); +var YM; +var XZn; +var Zct; +var shs; +var nhs; +var rhs; +var ohs; +var ibe; +var ahs; +var eut; +var Gv; +var tut; +var lhs; +var ZVt; +var chs; +var uhs; +var dhs; +var hhs; +var fhs; +var sbe; +var ghs; +var phs; +var nbe; +var rbe; +var iut; +var sut; +var mhs; +var eHt; +var bhs; +var vhs; +var yhs; +var whs; +var Chs; +var obe; +var $F; +var Shs; +var lR; +var nut; +var rut; +var out; +var aut; +var lut; +var cut; +var QZn; +var xhs; +var khs; +var Ehs; +var Ihs; +var Dhs; +var uut; +var abe = ue({ + "out-build/external/bufbuild/protobuf/google/protobuf/descriptor_pb.js"() { + "use strict"; + + Qct(); + aE(); + (function (i) { + i[i.EDITION_UNKNOWN = 0] = "EDITION_UNKNOWN"; + i[i.EDITION_LEGACY = 900] = "EDITION_LEGACY"; + i[i.EDITION_PROTO2 = 998] = "EDITION_PROTO2"; + i[i.EDITION_PROTO3 = 999] = "EDITION_PROTO3"; + i[i.EDITION_2023 = 1000] = "EDITION_2023"; + i[i.EDITION_2024 = 1001] = "EDITION_2024"; + i[i.EDITION_1_TEST_ONLY = 1] = "EDITION_1_TEST_ONLY"; + i[i.EDITION_2_TEST_ONLY = 2] = "EDITION_2_TEST_ONLY"; + i[i.EDITION_99997_TEST_ONLY = 99997] = "EDITION_99997_TEST_ONLY"; + i[i.EDITION_99998_TEST_ONLY = 99998] = "EDITION_99998_TEST_ONLY"; + i[i.EDITION_99999_TEST_ONLY = 99999] = "EDITION_99999_TEST_ONLY"; + i[i.EDITION_MAX = 2147483647] = "EDITION_MAX"; + })(YM ||= {}); + rs.util.setEnumType(YM, "google.protobuf.Edition", [{ + no: 0, + name: "EDITION_UNKNOWN" + }, { + no: 900, + name: "EDITION_LEGACY" + }, { + no: 998, + name: "EDITION_PROTO2" + }, { + no: 999, + name: "EDITION_PROTO3" + }, { + no: 1000, + name: "EDITION_2023" + }, { + no: 1001, + name: "EDITION_2024" + }, { + no: 1, + name: "EDITION_1_TEST_ONLY" + }, { + no: 2, + name: "EDITION_2_TEST_ONLY" + }, { + no: 99997, + name: "EDITION_99997_TEST_ONLY" + }, { + no: 99998, + name: "EDITION_99998_TEST_ONLY" + }, { + no: 99999, + name: "EDITION_99999_TEST_ONLY" + }, { + no: 2147483647, + name: "EDITION_MAX" + }]); + XZn = class eLe extends N { + constructor(e) { + super(); + this.file = []; + rs.util.initPartial(e, this); + } + static { + this.runtime = rs; + } + static { + this.typeName = "google.protobuf.FileDescriptorSet"; + } + static { + this.fields = rs.util.newFieldList(() => [{ + no: 1, + name: "file", + kind: "message", + T: Zct, + repeated: true + }]); + } + static fromBinary(e, t) { + return new eLe().fromBinary(e, t); + } + static fromJson(e, t) { + return new eLe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new eLe().fromJsonString(e, t); + } + static equals(e, t) { + return rs.util.equals(eLe, e, t); + } + }; + Zct = class tLe extends N { + constructor(e) { + super(); + this.dependency = []; + this.publicDependency = []; + this.weakDependency = []; + this.messageType = []; + this.enumType = []; + this.service = []; + this.extension = []; + rs.util.initPartial(e, this); + } + static { + this.runtime = rs; + } + static { + this.typeName = "google.protobuf.FileDescriptorProto"; + } + static { + this.fields = rs.util.newFieldList(() => [{ + no: 1, + name: "name", + kind: "scalar", + T: 9, + opt: true + }, { + no: 2, + name: "package", + kind: "scalar", + T: 9, + opt: true + }, { + no: 3, + name: "dependency", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 10, + name: "public_dependency", + kind: "scalar", + T: 5, + repeated: true + }, { + no: 11, + name: "weak_dependency", + kind: "scalar", + T: 5, + repeated: true + }, { + no: 4, + name: "message_type", + kind: "message", + T: shs, + repeated: true + }, { + no: 5, + name: "enum_type", + kind: "message", + T: ZVt, + repeated: true + }, { + no: 6, + name: "service", + kind: "message", + T: dhs, + repeated: true + }, { + no: 7, + name: "extension", + kind: "message", + T: eut, + repeated: true + }, { + no: 8, + name: "options", + kind: "message", + T: fhs, + opt: true + }, { + no: 9, + name: "source_code_info", + kind: "message", + T: khs, + opt: true + }, { + no: 12, + name: "syntax", + kind: "scalar", + T: 9, + opt: true + }, { + no: 14, + name: "edition", + kind: "enum", + T: rs.getEnumType(YM), + opt: true + }]); + } + static fromBinary(e, t) { + return new tLe().fromBinary(e, t); + } + static fromJson(e, t) { + return new tLe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new tLe().fromJsonString(e, t); + } + static equals(e, t) { + return rs.util.equals(tLe, e, t); + } + }; + shs = class Lde extends N { + constructor(e) { + super(); + this.field = []; + this.extension = []; + this.nestedType = []; + this.enumType = []; + this.extensionRange = []; + this.oneofDecl = []; + this.reservedRange = []; + this.reservedName = []; + rs.util.initPartial(e, this); + } + static { + this.runtime = rs; + } + static { + this.typeName = "google.protobuf.DescriptorProto"; + } + static { + this.fields = rs.util.newFieldList(() => [{ + no: 1, + name: "name", + kind: "scalar", + T: 9, + opt: true + }, { + no: 2, + name: "field", + kind: "message", + T: eut, + repeated: true + }, { + no: 6, + name: "extension", + kind: "message", + T: eut, + repeated: true + }, { + no: 3, + name: "nested_type", + kind: "message", + T: Lde, + repeated: true + }, { + no: 4, + name: "enum_type", + kind: "message", + T: ZVt, + repeated: true + }, { + no: 5, + name: "extension_range", + kind: "message", + T: nhs, + repeated: true + }, { + no: 8, + name: "oneof_decl", + kind: "message", + T: lhs, + repeated: true + }, { + no: 7, + name: "options", + kind: "message", + T: ghs, + opt: true + }, { + no: 9, + name: "reserved_range", + kind: "message", + T: rhs, + repeated: true + }, { + no: 10, + name: "reserved_name", + kind: "scalar", + T: 9, + repeated: true + }]); + } + static fromBinary(e, t) { + return new Lde().fromBinary(e, t); + } + static fromJson(e, t) { + return new Lde().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Lde().fromJsonString(e, t); + } + static equals(e, t) { + return rs.util.equals(Lde, e, t); + } + }; + nhs = class iLe extends N { + constructor(e) { + super(); + rs.util.initPartial(e, this); + } + static { + this.runtime = rs; + } + static { + this.typeName = "google.protobuf.DescriptorProto.ExtensionRange"; + } + static { + this.fields = rs.util.newFieldList(() => [{ + no: 1, + name: "start", + kind: "scalar", + T: 5, + opt: true + }, { + no: 2, + name: "end", + kind: "scalar", + T: 5, + opt: true + }, { + no: 3, + name: "options", + kind: "message", + T: ohs, + opt: true + }]); + } + static fromBinary(e, t) { + return new iLe().fromBinary(e, t); + } + static fromJson(e, t) { + return new iLe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new iLe().fromJsonString(e, t); + } + static equals(e, t) { + return rs.util.equals(iLe, e, t); + } + }; + rhs = class sLe extends N { + constructor(e) { + super(); + rs.util.initPartial(e, this); + } + static { + this.runtime = rs; + } + static { + this.typeName = "google.protobuf.DescriptorProto.ReservedRange"; + } + static { + this.fields = rs.util.newFieldList(() => [{ + no: 1, + name: "start", + kind: "scalar", + T: 5, + opt: true + }, { + no: 2, + name: "end", + kind: "scalar", + T: 5, + opt: true + }]); + } + static fromBinary(e, t) { + return new sLe().fromBinary(e, t); + } + static fromJson(e, t) { + return new sLe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new sLe().fromJsonString(e, t); + } + static equals(e, t) { + return rs.util.equals(sLe, e, t); + } + }; + ohs = class nLe extends N { + constructor(e) { + super(); + this.uninterpretedOption = []; + this.declaration = []; + rs.util.initPartial(e, this); + } + static { + this.runtime = rs; + } + static { + this.typeName = "google.protobuf.ExtensionRangeOptions"; + } + static { + this.fields = rs.util.newFieldList(() => [{ + no: 999, + name: "uninterpreted_option", + kind: "message", + T: $F, + repeated: true + }, { + no: 2, + name: "declaration", + kind: "message", + T: ahs, + repeated: true + }, { + no: 50, + name: "features", + kind: "message", + T: lR, + opt: true + }, { + no: 3, + name: "verification", + kind: "enum", + T: rs.getEnumType(ibe), + opt: true, + default: ibe.UNVERIFIED + }]); + } + static fromBinary(e, t) { + return new nLe().fromBinary(e, t); + } + static fromJson(e, t) { + return new nLe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new nLe().fromJsonString(e, t); + } + static equals(e, t) { + return rs.util.equals(nLe, e, t); + } + }; + (function (i) { + i[i.DECLARATION = 0] = "DECLARATION"; + i[i.UNVERIFIED = 1] = "UNVERIFIED"; + })(ibe ||= {}); + rs.util.setEnumType(ibe, "google.protobuf.ExtensionRangeOptions.VerificationState", [{ + no: 0, + name: "DECLARATION" + }, { + no: 1, + name: "UNVERIFIED" + }]); + ahs = class rLe extends N { + constructor(e) { + super(); + rs.util.initPartial(e, this); + } + static { + this.runtime = rs; + } + static { + this.typeName = "google.protobuf.ExtensionRangeOptions.Declaration"; + } + static { + this.fields = rs.util.newFieldList(() => [{ + no: 1, + name: "number", + kind: "scalar", + T: 5, + opt: true + }, { + no: 2, + name: "full_name", + kind: "scalar", + T: 9, + opt: true + }, { + no: 3, + name: "type", + kind: "scalar", + T: 9, + opt: true + }, { + no: 5, + name: "reserved", + kind: "scalar", + T: 8, + opt: true + }, { + no: 6, + name: "repeated", + kind: "scalar", + T: 8, + opt: true + }]); + } + static fromBinary(e, t) { + return new rLe().fromBinary(e, t); + } + static fromJson(e, t) { + return new rLe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new rLe().fromJsonString(e, t); + } + static equals(e, t) { + return rs.util.equals(rLe, e, t); + } + }; + eut = class oLe extends N { + constructor(e) { + super(); + rs.util.initPartial(e, this); + } + static { + this.runtime = rs; + } + static { + this.typeName = "google.protobuf.FieldDescriptorProto"; + } + static { + this.fields = rs.util.newFieldList(() => [{ + no: 1, + name: "name", + kind: "scalar", + T: 9, + opt: true + }, { + no: 3, + name: "number", + kind: "scalar", + T: 5, + opt: true + }, { + no: 4, + name: "label", + kind: "enum", + T: rs.getEnumType(tut), + opt: true + }, { + no: 5, + name: "type", + kind: "enum", + T: rs.getEnumType(Gv), + opt: true + }, { + no: 6, + name: "type_name", + kind: "scalar", + T: 9, + opt: true + }, { + no: 2, + name: "extendee", + kind: "scalar", + T: 9, + opt: true + }, { + no: 7, + name: "default_value", + kind: "scalar", + T: 9, + opt: true + }, { + no: 9, + name: "oneof_index", + kind: "scalar", + T: 5, + opt: true + }, { + no: 10, + name: "json_name", + kind: "scalar", + T: 9, + opt: true + }, { + no: 8, + name: "options", + kind: "message", + T: phs, + opt: true + }, { + no: 17, + name: "proto3_optional", + kind: "scalar", + T: 8, + opt: true + }]); + } + static fromBinary(e, t) { + return new oLe().fromBinary(e, t); + } + static fromJson(e, t) { + return new oLe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new oLe().fromJsonString(e, t); + } + static equals(e, t) { + return rs.util.equals(oLe, e, t); + } + }; + (function (i) { + i[i.DOUBLE = 1] = "DOUBLE"; + i[i.FLOAT = 2] = "FLOAT"; + i[i.INT64 = 3] = "INT64"; + i[i.UINT64 = 4] = "UINT64"; + i[i.INT32 = 5] = "INT32"; + i[i.FIXED64 = 6] = "FIXED64"; + i[i.FIXED32 = 7] = "FIXED32"; + i[i.BOOL = 8] = "BOOL"; + i[i.STRING = 9] = "STRING"; + i[i.GROUP = 10] = "GROUP"; + i[i.MESSAGE = 11] = "MESSAGE"; + i[i.BYTES = 12] = "BYTES"; + i[i.UINT32 = 13] = "UINT32"; + i[i.ENUM = 14] = "ENUM"; + i[i.SFIXED32 = 15] = "SFIXED32"; + i[i.SFIXED64 = 16] = "SFIXED64"; + i[i.SINT32 = 17] = "SINT32"; + i[i.SINT64 = 18] = "SINT64"; + })(Gv ||= {}); + rs.util.setEnumType(Gv, "google.protobuf.FieldDescriptorProto.Type", [{ + no: 1, + name: "TYPE_DOUBLE" + }, { + no: 2, + name: "TYPE_FLOAT" + }, { + no: 3, + name: "TYPE_INT64" + }, { + no: 4, + name: "TYPE_UINT64" + }, { + no: 5, + name: "TYPE_INT32" + }, { + no: 6, + name: "TYPE_FIXED64" + }, { + no: 7, + name: "TYPE_FIXED32" + }, { + no: 8, + name: "TYPE_BOOL" + }, { + no: 9, + name: "TYPE_STRING" + }, { + no: 10, + name: "TYPE_GROUP" + }, { + no: 11, + name: "TYPE_MESSAGE" + }, { + no: 12, + name: "TYPE_BYTES" + }, { + no: 13, + name: "TYPE_UINT32" + }, { + no: 14, + name: "TYPE_ENUM" + }, { + no: 15, + name: "TYPE_SFIXED32" + }, { + no: 16, + name: "TYPE_SFIXED64" + }, { + no: 17, + name: "TYPE_SINT32" + }, { + no: 18, + name: "TYPE_SINT64" + }]); + (function (i) { + i[i.OPTIONAL = 1] = "OPTIONAL"; + i[i.REPEATED = 3] = "REPEATED"; + i[i.REQUIRED = 2] = "REQUIRED"; + })(tut ||= {}); + rs.util.setEnumType(tut, "google.protobuf.FieldDescriptorProto.Label", [{ + no: 1, + name: "LABEL_OPTIONAL" + }, { + no: 3, + name: "LABEL_REPEATED" + }, { + no: 2, + name: "LABEL_REQUIRED" + }]); + lhs = class aLe extends N { + constructor(e) { + super(); + rs.util.initPartial(e, this); + } + static { + this.runtime = rs; + } + static { + this.typeName = "google.protobuf.OneofDescriptorProto"; + } + static { + this.fields = rs.util.newFieldList(() => [{ + no: 1, + name: "name", + kind: "scalar", + T: 9, + opt: true + }, { + no: 2, + name: "options", + kind: "message", + T: bhs, + opt: true + }]); + } + static fromBinary(e, t) { + return new aLe().fromBinary(e, t); + } + static fromJson(e, t) { + return new aLe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new aLe().fromJsonString(e, t); + } + static equals(e, t) { + return rs.util.equals(aLe, e, t); + } + }; + ZVt = class lLe extends N { + constructor(e) { + super(); + this.value = []; + this.reservedRange = []; + this.reservedName = []; + rs.util.initPartial(e, this); + } + static { + this.runtime = rs; + } + static { + this.typeName = "google.protobuf.EnumDescriptorProto"; + } + static { + this.fields = rs.util.newFieldList(() => [{ + no: 1, + name: "name", + kind: "scalar", + T: 9, + opt: true + }, { + no: 2, + name: "value", + kind: "message", + T: uhs, + repeated: true + }, { + no: 3, + name: "options", + kind: "message", + T: vhs, + opt: true + }, { + no: 4, + name: "reserved_range", + kind: "message", + T: chs, + repeated: true + }, { + no: 5, + name: "reserved_name", + kind: "scalar", + T: 9, + repeated: true + }]); + } + static fromBinary(e, t) { + return new lLe().fromBinary(e, t); + } + static fromJson(e, t) { + return new lLe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new lLe().fromJsonString(e, t); + } + static equals(e, t) { + return rs.util.equals(lLe, e, t); + } + }; + chs = class cLe extends N { + constructor(e) { + super(); + rs.util.initPartial(e, this); + } + static { + this.runtime = rs; + } + static { + this.typeName = "google.protobuf.EnumDescriptorProto.EnumReservedRange"; + } + static { + this.fields = rs.util.newFieldList(() => [{ + no: 1, + name: "start", + kind: "scalar", + T: 5, + opt: true + }, { + no: 2, + name: "end", + kind: "scalar", + T: 5, + opt: true + }]); + } + static fromBinary(e, t) { + return new cLe().fromBinary(e, t); + } + static fromJson(e, t) { + return new cLe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new cLe().fromJsonString(e, t); + } + static equals(e, t) { + return rs.util.equals(cLe, e, t); + } + }; + uhs = class uLe extends N { + constructor(e) { + super(); + rs.util.initPartial(e, this); + } + static { + this.runtime = rs; + } + static { + this.typeName = "google.protobuf.EnumValueDescriptorProto"; + } + static { + this.fields = rs.util.newFieldList(() => [{ + no: 1, + name: "name", + kind: "scalar", + T: 9, + opt: true + }, { + no: 2, + name: "number", + kind: "scalar", + T: 5, + opt: true + }, { + no: 3, + name: "options", + kind: "message", + T: yhs, + opt: true + }]); + } + static fromBinary(e, t) { + return new uLe().fromBinary(e, t); + } + static fromJson(e, t) { + return new uLe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new uLe().fromJsonString(e, t); + } + static equals(e, t) { + return rs.util.equals(uLe, e, t); + } + }; + dhs = class dLe extends N { + constructor(e) { + super(); + this.method = []; + rs.util.initPartial(e, this); + } + static { + this.runtime = rs; + } + static { + this.typeName = "google.protobuf.ServiceDescriptorProto"; + } + static { + this.fields = rs.util.newFieldList(() => [{ + no: 1, + name: "name", + kind: "scalar", + T: 9, + opt: true + }, { + no: 2, + name: "method", + kind: "message", + T: hhs, + repeated: true + }, { + no: 3, + name: "options", + kind: "message", + T: whs, + opt: true + }]); + } + static fromBinary(e, t) { + return new dLe().fromBinary(e, t); + } + static fromJson(e, t) { + return new dLe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new dLe().fromJsonString(e, t); + } + static equals(e, t) { + return rs.util.equals(dLe, e, t); + } + }; + hhs = class hLe extends N { + constructor(e) { + super(); + rs.util.initPartial(e, this); + } + static { + this.runtime = rs; + } + static { + this.typeName = "google.protobuf.MethodDescriptorProto"; + } + static { + this.fields = rs.util.newFieldList(() => [{ + no: 1, + name: "name", + kind: "scalar", + T: 9, + opt: true + }, { + no: 2, + name: "input_type", + kind: "scalar", + T: 9, + opt: true + }, { + no: 3, + name: "output_type", + kind: "scalar", + T: 9, + opt: true + }, { + no: 4, + name: "options", + kind: "message", + T: Chs, + opt: true + }, { + no: 5, + name: "client_streaming", + kind: "scalar", + T: 8, + opt: true, + default: false + }, { + no: 6, + name: "server_streaming", + kind: "scalar", + T: 8, + opt: true, + default: false + }]); + } + static fromBinary(e, t) { + return new hLe().fromBinary(e, t); + } + static fromJson(e, t) { + return new hLe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new hLe().fromJsonString(e, t); + } + static equals(e, t) { + return rs.util.equals(hLe, e, t); + } + }; + fhs = class fLe extends N { + constructor(e) { + super(); + this.uninterpretedOption = []; + rs.util.initPartial(e, this); + } + static { + this.runtime = rs; + } + static { + this.typeName = "google.protobuf.FileOptions"; + } + static { + this.fields = rs.util.newFieldList(() => [{ + no: 1, + name: "java_package", + kind: "scalar", + T: 9, + opt: true + }, { + no: 8, + name: "java_outer_classname", + kind: "scalar", + T: 9, + opt: true + }, { + no: 10, + name: "java_multiple_files", + kind: "scalar", + T: 8, + opt: true, + default: false + }, { + no: 20, + name: "java_generate_equals_and_hash", + kind: "scalar", + T: 8, + opt: true + }, { + no: 27, + name: "java_string_check_utf8", + kind: "scalar", + T: 8, + opt: true, + default: false + }, { + no: 9, + name: "optimize_for", + kind: "enum", + T: rs.getEnumType(sbe), + opt: true, + default: sbe.SPEED + }, { + no: 11, + name: "go_package", + kind: "scalar", + T: 9, + opt: true + }, { + no: 16, + name: "cc_generic_services", + kind: "scalar", + T: 8, + opt: true, + default: false + }, { + no: 17, + name: "java_generic_services", + kind: "scalar", + T: 8, + opt: true, + default: false + }, { + no: 18, + name: "py_generic_services", + kind: "scalar", + T: 8, + opt: true, + default: false + }, { + no: 23, + name: "deprecated", + kind: "scalar", + T: 8, + opt: true, + default: false + }, { + no: 31, + name: "cc_enable_arenas", + kind: "scalar", + T: 8, + opt: true, + default: true + }, { + no: 36, + name: "objc_class_prefix", + kind: "scalar", + T: 9, + opt: true + }, { + no: 37, + name: "csharp_namespace", + kind: "scalar", + T: 9, + opt: true + }, { + no: 39, + name: "swift_prefix", + kind: "scalar", + T: 9, + opt: true + }, { + no: 40, + name: "php_class_prefix", + kind: "scalar", + T: 9, + opt: true + }, { + no: 41, + name: "php_namespace", + kind: "scalar", + T: 9, + opt: true + }, { + no: 44, + name: "php_metadata_namespace", + kind: "scalar", + T: 9, + opt: true + }, { + no: 45, + name: "ruby_package", + kind: "scalar", + T: 9, + opt: true + }, { + no: 50, + name: "features", + kind: "message", + T: lR, + opt: true + }, { + no: 999, + name: "uninterpreted_option", + kind: "message", + T: $F, + repeated: true + }]); + } + static fromBinary(e, t) { + return new fLe().fromBinary(e, t); + } + static fromJson(e, t) { + return new fLe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new fLe().fromJsonString(e, t); + } + static equals(e, t) { + return rs.util.equals(fLe, e, t); + } + }; + (function (i) { + i[i.SPEED = 1] = "SPEED"; + i[i.CODE_SIZE = 2] = "CODE_SIZE"; + i[i.LITE_RUNTIME = 3] = "LITE_RUNTIME"; + })(sbe ||= {}); + rs.util.setEnumType(sbe, "google.protobuf.FileOptions.OptimizeMode", [{ + no: 1, + name: "SPEED" + }, { + no: 2, + name: "CODE_SIZE" + }, { + no: 3, + name: "LITE_RUNTIME" + }]); + ghs = class gLe extends N { + constructor(e) { + super(); + this.uninterpretedOption = []; + rs.util.initPartial(e, this); + } + static { + this.runtime = rs; + } + static { + this.typeName = "google.protobuf.MessageOptions"; + } + static { + this.fields = rs.util.newFieldList(() => [{ + no: 1, + name: "message_set_wire_format", + kind: "scalar", + T: 8, + opt: true, + default: false + }, { + no: 2, + name: "no_standard_descriptor_accessor", + kind: "scalar", + T: 8, + opt: true, + default: false + }, { + no: 3, + name: "deprecated", + kind: "scalar", + T: 8, + opt: true, + default: false + }, { + no: 7, + name: "map_entry", + kind: "scalar", + T: 8, + opt: true + }, { + no: 11, + name: "deprecated_legacy_json_field_conflicts", + kind: "scalar", + T: 8, + opt: true + }, { + no: 12, + name: "features", + kind: "message", + T: lR, + opt: true + }, { + no: 999, + name: "uninterpreted_option", + kind: "message", + T: $F, + repeated: true + }]); + } + static fromBinary(e, t) { + return new gLe().fromBinary(e, t); + } + static fromJson(e, t) { + return new gLe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new gLe().fromJsonString(e, t); + } + static equals(e, t) { + return rs.util.equals(gLe, e, t); + } + }; + phs = class pLe extends N { + constructor(e) { + super(); + this.targets = []; + this.editionDefaults = []; + this.uninterpretedOption = []; + rs.util.initPartial(e, this); + } + static { + this.runtime = rs; + } + static { + this.typeName = "google.protobuf.FieldOptions"; + } + static { + this.fields = rs.util.newFieldList(() => [{ + no: 1, + name: "ctype", + kind: "enum", + T: rs.getEnumType(nbe), + opt: true, + default: nbe.STRING + }, { + no: 2, + name: "packed", + kind: "scalar", + T: 8, + opt: true + }, { + no: 6, + name: "jstype", + kind: "enum", + T: rs.getEnumType(rbe), + opt: true, + default: rbe.JS_NORMAL + }, { + no: 5, + name: "lazy", + kind: "scalar", + T: 8, + opt: true, + default: false + }, { + no: 15, + name: "unverified_lazy", + kind: "scalar", + T: 8, + opt: true, + default: false + }, { + no: 3, + name: "deprecated", + kind: "scalar", + T: 8, + opt: true, + default: false + }, { + no: 10, + name: "weak", + kind: "scalar", + T: 8, + opt: true, + default: false + }, { + no: 16, + name: "debug_redact", + kind: "scalar", + T: 8, + opt: true, + default: false + }, { + no: 17, + name: "retention", + kind: "enum", + T: rs.getEnumType(iut), + opt: true + }, { + no: 19, + name: "targets", + kind: "enum", + T: rs.getEnumType(sut), + repeated: true + }, { + no: 20, + name: "edition_defaults", + kind: "message", + T: mhs, + repeated: true + }, { + no: 21, + name: "features", + kind: "message", + T: lR, + opt: true + }, { + no: 22, + name: "feature_support", + kind: "message", + T: eHt, + opt: true + }, { + no: 999, + name: "uninterpreted_option", + kind: "message", + T: $F, + repeated: true + }]); + } + static fromBinary(e, t) { + return new pLe().fromBinary(e, t); + } + static fromJson(e, t) { + return new pLe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new pLe().fromJsonString(e, t); + } + static equals(e, t) { + return rs.util.equals(pLe, e, t); + } + }; + (function (i) { + i[i.STRING = 0] = "STRING"; + i[i.CORD = 1] = "CORD"; + i[i.STRING_PIECE = 2] = "STRING_PIECE"; + })(nbe ||= {}); + rs.util.setEnumType(nbe, "google.protobuf.FieldOptions.CType", [{ + no: 0, + name: "STRING" + }, { + no: 1, + name: "CORD" + }, { + no: 2, + name: "STRING_PIECE" + }]); + (function (i) { + i[i.JS_NORMAL = 0] = "JS_NORMAL"; + i[i.JS_STRING = 1] = "JS_STRING"; + i[i.JS_NUMBER = 2] = "JS_NUMBER"; + })(rbe ||= {}); + rs.util.setEnumType(rbe, "google.protobuf.FieldOptions.JSType", [{ + no: 0, + name: "JS_NORMAL" + }, { + no: 1, + name: "JS_STRING" + }, { + no: 2, + name: "JS_NUMBER" + }]); + (function (i) { + i[i.RETENTION_UNKNOWN = 0] = "RETENTION_UNKNOWN"; + i[i.RETENTION_RUNTIME = 1] = "RETENTION_RUNTIME"; + i[i.RETENTION_SOURCE = 2] = "RETENTION_SOURCE"; + })(iut ||= {}); + rs.util.setEnumType(iut, "google.protobuf.FieldOptions.OptionRetention", [{ + no: 0, + name: "RETENTION_UNKNOWN" + }, { + no: 1, + name: "RETENTION_RUNTIME" + }, { + no: 2, + name: "RETENTION_SOURCE" + }]); + (function (i) { + i[i.TARGET_TYPE_UNKNOWN = 0] = "TARGET_TYPE_UNKNOWN"; + i[i.TARGET_TYPE_FILE = 1] = "TARGET_TYPE_FILE"; + i[i.TARGET_TYPE_EXTENSION_RANGE = 2] = "TARGET_TYPE_EXTENSION_RANGE"; + i[i.TARGET_TYPE_MESSAGE = 3] = "TARGET_TYPE_MESSAGE"; + i[i.TARGET_TYPE_FIELD = 4] = "TARGET_TYPE_FIELD"; + i[i.TARGET_TYPE_ONEOF = 5] = "TARGET_TYPE_ONEOF"; + i[i.TARGET_TYPE_ENUM = 6] = "TARGET_TYPE_ENUM"; + i[i.TARGET_TYPE_ENUM_ENTRY = 7] = "TARGET_TYPE_ENUM_ENTRY"; + i[i.TARGET_TYPE_SERVICE = 8] = "TARGET_TYPE_SERVICE"; + i[i.TARGET_TYPE_METHOD = 9] = "TARGET_TYPE_METHOD"; + })(sut ||= {}); + rs.util.setEnumType(sut, "google.protobuf.FieldOptions.OptionTargetType", [{ + no: 0, + name: "TARGET_TYPE_UNKNOWN" + }, { + no: 1, + name: "TARGET_TYPE_FILE" + }, { + no: 2, + name: "TARGET_TYPE_EXTENSION_RANGE" + }, { + no: 3, + name: "TARGET_TYPE_MESSAGE" + }, { + no: 4, + name: "TARGET_TYPE_FIELD" + }, { + no: 5, + name: "TARGET_TYPE_ONEOF" + }, { + no: 6, + name: "TARGET_TYPE_ENUM" + }, { + no: 7, + name: "TARGET_TYPE_ENUM_ENTRY" + }, { + no: 8, + name: "TARGET_TYPE_SERVICE" + }, { + no: 9, + name: "TARGET_TYPE_METHOD" + }]); + mhs = class mLe extends N { + constructor(e) { + super(); + rs.util.initPartial(e, this); + } + static { + this.runtime = rs; + } + static { + this.typeName = "google.protobuf.FieldOptions.EditionDefault"; + } + static { + this.fields = rs.util.newFieldList(() => [{ + no: 3, + name: "edition", + kind: "enum", + T: rs.getEnumType(YM), + opt: true + }, { + no: 2, + name: "value", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new mLe().fromBinary(e, t); + } + static fromJson(e, t) { + return new mLe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new mLe().fromJsonString(e, t); + } + static equals(e, t) { + return rs.util.equals(mLe, e, t); + } + }; + eHt = class bLe extends N { + constructor(e) { + super(); + rs.util.initPartial(e, this); + } + static { + this.runtime = rs; + } + static { + this.typeName = "google.protobuf.FieldOptions.FeatureSupport"; + } + static { + this.fields = rs.util.newFieldList(() => [{ + no: 1, + name: "edition_introduced", + kind: "enum", + T: rs.getEnumType(YM), + opt: true + }, { + no: 2, + name: "edition_deprecated", + kind: "enum", + T: rs.getEnumType(YM), + opt: true + }, { + no: 3, + name: "deprecation_warning", + kind: "scalar", + T: 9, + opt: true + }, { + no: 4, + name: "edition_removed", + kind: "enum", + T: rs.getEnumType(YM), + opt: true + }]); + } + static fromBinary(e, t) { + return new bLe().fromBinary(e, t); + } + static fromJson(e, t) { + return new bLe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new bLe().fromJsonString(e, t); + } + static equals(e, t) { + return rs.util.equals(bLe, e, t); + } + }; + bhs = class vLe extends N { + constructor(e) { + super(); + this.uninterpretedOption = []; + rs.util.initPartial(e, this); + } + static { + this.runtime = rs; + } + static { + this.typeName = "google.protobuf.OneofOptions"; + } + static { + this.fields = rs.util.newFieldList(() => [{ + no: 1, + name: "features", + kind: "message", + T: lR, + opt: true + }, { + no: 999, + name: "uninterpreted_option", + kind: "message", + T: $F, + repeated: true + }]); + } + static fromBinary(e, t) { + return new vLe().fromBinary(e, t); + } + static fromJson(e, t) { + return new vLe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new vLe().fromJsonString(e, t); + } + static equals(e, t) { + return rs.util.equals(vLe, e, t); + } + }; + vhs = class yLe extends N { + constructor(e) { + super(); + this.uninterpretedOption = []; + rs.util.initPartial(e, this); + } + static { + this.runtime = rs; + } + static { + this.typeName = "google.protobuf.EnumOptions"; + } + static { + this.fields = rs.util.newFieldList(() => [{ + no: 2, + name: "allow_alias", + kind: "scalar", + T: 8, + opt: true + }, { + no: 3, + name: "deprecated", + kind: "scalar", + T: 8, + opt: true, + default: false + }, { + no: 6, + name: "deprecated_legacy_json_field_conflicts", + kind: "scalar", + T: 8, + opt: true + }, { + no: 7, + name: "features", + kind: "message", + T: lR, + opt: true + }, { + no: 999, + name: "uninterpreted_option", + kind: "message", + T: $F, + repeated: true + }]); + } + static fromBinary(e, t) { + return new yLe().fromBinary(e, t); + } + static fromJson(e, t) { + return new yLe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new yLe().fromJsonString(e, t); + } + static equals(e, t) { + return rs.util.equals(yLe, e, t); + } + }; + yhs = class wLe extends N { + constructor(e) { + super(); + this.uninterpretedOption = []; + rs.util.initPartial(e, this); + } + static { + this.runtime = rs; + } + static { + this.typeName = "google.protobuf.EnumValueOptions"; + } + static { + this.fields = rs.util.newFieldList(() => [{ + no: 1, + name: "deprecated", + kind: "scalar", + T: 8, + opt: true, + default: false + }, { + no: 2, + name: "features", + kind: "message", + T: lR, + opt: true + }, { + no: 3, + name: "debug_redact", + kind: "scalar", + T: 8, + opt: true, + default: false + }, { + no: 4, + name: "feature_support", + kind: "message", + T: eHt, + opt: true + }, { + no: 999, + name: "uninterpreted_option", + kind: "message", + T: $F, + repeated: true + }]); + } + static fromBinary(e, t) { + return new wLe().fromBinary(e, t); + } + static fromJson(e, t) { + return new wLe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new wLe().fromJsonString(e, t); + } + static equals(e, t) { + return rs.util.equals(wLe, e, t); + } + }; + whs = class CLe extends N { + constructor(e) { + super(); + this.uninterpretedOption = []; + rs.util.initPartial(e, this); + } + static { + this.runtime = rs; + } + static { + this.typeName = "google.protobuf.ServiceOptions"; + } + static { + this.fields = rs.util.newFieldList(() => [{ + no: 34, + name: "features", + kind: "message", + T: lR, + opt: true + }, { + no: 33, + name: "deprecated", + kind: "scalar", + T: 8, + opt: true, + default: false + }, { + no: 999, + name: "uninterpreted_option", + kind: "message", + T: $F, + repeated: true + }]); + } + static fromBinary(e, t) { + return new CLe().fromBinary(e, t); + } + static fromJson(e, t) { + return new CLe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new CLe().fromJsonString(e, t); + } + static equals(e, t) { + return rs.util.equals(CLe, e, t); + } + }; + Chs = class SLe extends N { + constructor(e) { + super(); + this.uninterpretedOption = []; + rs.util.initPartial(e, this); + } + static { + this.runtime = rs; + } + static { + this.typeName = "google.protobuf.MethodOptions"; + } + static { + this.fields = rs.util.newFieldList(() => [{ + no: 33, + name: "deprecated", + kind: "scalar", + T: 8, + opt: true, + default: false + }, { + no: 34, + name: "idempotency_level", + kind: "enum", + T: rs.getEnumType(obe), + opt: true, + default: obe.IDEMPOTENCY_UNKNOWN + }, { + no: 35, + name: "features", + kind: "message", + T: lR, + opt: true + }, { + no: 999, + name: "uninterpreted_option", + kind: "message", + T: $F, + repeated: true + }]); + } + static fromBinary(e, t) { + return new SLe().fromBinary(e, t); + } + static fromJson(e, t) { + return new SLe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new SLe().fromJsonString(e, t); + } + static equals(e, t) { + return rs.util.equals(SLe, e, t); + } + }; + (function (i) { + i[i.IDEMPOTENCY_UNKNOWN = 0] = "IDEMPOTENCY_UNKNOWN"; + i[i.NO_SIDE_EFFECTS = 1] = "NO_SIDE_EFFECTS"; + i[i.IDEMPOTENT = 2] = "IDEMPOTENT"; + })(obe ||= {}); + rs.util.setEnumType(obe, "google.protobuf.MethodOptions.IdempotencyLevel", [{ + no: 0, + name: "IDEMPOTENCY_UNKNOWN" + }, { + no: 1, + name: "NO_SIDE_EFFECTS" + }, { + no: 2, + name: "IDEMPOTENT" + }]); + $F = class xLe extends N { + constructor(e) { + super(); + this.name = []; + rs.util.initPartial(e, this); + } + static { + this.runtime = rs; + } + static { + this.typeName = "google.protobuf.UninterpretedOption"; + } + static { + this.fields = rs.util.newFieldList(() => [{ + no: 2, + name: "name", + kind: "message", + T: Shs, + repeated: true + }, { + no: 3, + name: "identifier_value", + kind: "scalar", + T: 9, + opt: true + }, { + no: 4, + name: "positive_int_value", + kind: "scalar", + T: 4, + opt: true + }, { + no: 5, + name: "negative_int_value", + kind: "scalar", + T: 3, + opt: true + }, { + no: 6, + name: "double_value", + kind: "scalar", + T: 1, + opt: true + }, { + no: 7, + name: "string_value", + kind: "scalar", + T: 12, + opt: true + }, { + no: 8, + name: "aggregate_value", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new xLe().fromBinary(e, t); + } + static fromJson(e, t) { + return new xLe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new xLe().fromJsonString(e, t); + } + static equals(e, t) { + return rs.util.equals(xLe, e, t); + } + }; + Shs = class kLe extends N { + constructor(e) { + super(); + rs.util.initPartial(e, this); + } + static { + this.runtime = rs; + } + static { + this.typeName = "google.protobuf.UninterpretedOption.NamePart"; + } + static { + this.fields = rs.util.newFieldList(() => [{ + no: 1, + name: "name_part", + kind: "scalar", + T: 9, + req: true + }, { + no: 2, + name: "is_extension", + kind: "scalar", + T: 8, + req: true + }]); + } + static fromBinary(e, t) { + return new kLe().fromBinary(e, t); + } + static fromJson(e, t) { + return new kLe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new kLe().fromJsonString(e, t); + } + static equals(e, t) { + return rs.util.equals(kLe, e, t); + } + }; + lR = class ELe extends N { + constructor(e) { + super(); + rs.util.initPartial(e, this); + } + static { + this.runtime = rs; + } + static { + this.typeName = "google.protobuf.FeatureSet"; + } + static { + this.fields = rs.util.newFieldList(() => [{ + no: 1, + name: "field_presence", + kind: "enum", + T: rs.getEnumType(nut), + opt: true + }, { + no: 2, + name: "enum_type", + kind: "enum", + T: rs.getEnumType(rut), + opt: true + }, { + no: 3, + name: "repeated_field_encoding", + kind: "enum", + T: rs.getEnumType(out), + opt: true + }, { + no: 4, + name: "utf8_validation", + kind: "enum", + T: rs.getEnumType(aut), + opt: true + }, { + no: 5, + name: "message_encoding", + kind: "enum", + T: rs.getEnumType(lut), + opt: true + }, { + no: 6, + name: "json_format", + kind: "enum", + T: rs.getEnumType(cut), + opt: true + }]); + } + static fromBinary(e, t) { + return new ELe().fromBinary(e, t); + } + static fromJson(e, t) { + return new ELe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new ELe().fromJsonString(e, t); + } + static equals(e, t) { + return rs.util.equals(ELe, e, t); + } + }; + (function (i) { + i[i.FIELD_PRESENCE_UNKNOWN = 0] = "FIELD_PRESENCE_UNKNOWN"; + i[i.EXPLICIT = 1] = "EXPLICIT"; + i[i.IMPLICIT = 2] = "IMPLICIT"; + i[i.LEGACY_REQUIRED = 3] = "LEGACY_REQUIRED"; + })(nut ||= {}); + rs.util.setEnumType(nut, "google.protobuf.FeatureSet.FieldPresence", [{ + no: 0, + name: "FIELD_PRESENCE_UNKNOWN" + }, { + no: 1, + name: "EXPLICIT" + }, { + no: 2, + name: "IMPLICIT" + }, { + no: 3, + name: "LEGACY_REQUIRED" + }]); + (function (i) { + i[i.ENUM_TYPE_UNKNOWN = 0] = "ENUM_TYPE_UNKNOWN"; + i[i.OPEN = 1] = "OPEN"; + i[i.CLOSED = 2] = "CLOSED"; + })(rut ||= {}); + rs.util.setEnumType(rut, "google.protobuf.FeatureSet.EnumType", [{ + no: 0, + name: "ENUM_TYPE_UNKNOWN" + }, { + no: 1, + name: "OPEN" + }, { + no: 2, + name: "CLOSED" + }]); + (function (i) { + i[i.REPEATED_FIELD_ENCODING_UNKNOWN = 0] = "REPEATED_FIELD_ENCODING_UNKNOWN"; + i[i.PACKED = 1] = "PACKED"; + i[i.EXPANDED = 2] = "EXPANDED"; + })(out ||= {}); + rs.util.setEnumType(out, "google.protobuf.FeatureSet.RepeatedFieldEncoding", [{ + no: 0, + name: "REPEATED_FIELD_ENCODING_UNKNOWN" + }, { + no: 1, + name: "PACKED" + }, { + no: 2, + name: "EXPANDED" + }]); + (function (i) { + i[i.UTF8_VALIDATION_UNKNOWN = 0] = "UTF8_VALIDATION_UNKNOWN"; + i[i.VERIFY = 2] = "VERIFY"; + i[i.NONE = 3] = "NONE"; + })(aut ||= {}); + rs.util.setEnumType(aut, "google.protobuf.FeatureSet.Utf8Validation", [{ + no: 0, + name: "UTF8_VALIDATION_UNKNOWN" + }, { + no: 2, + name: "VERIFY" + }, { + no: 3, + name: "NONE" + }]); + (function (i) { + i[i.MESSAGE_ENCODING_UNKNOWN = 0] = "MESSAGE_ENCODING_UNKNOWN"; + i[i.LENGTH_PREFIXED = 1] = "LENGTH_PREFIXED"; + i[i.DELIMITED = 2] = "DELIMITED"; + })(lut ||= {}); + rs.util.setEnumType(lut, "google.protobuf.FeatureSet.MessageEncoding", [{ + no: 0, + name: "MESSAGE_ENCODING_UNKNOWN" + }, { + no: 1, + name: "LENGTH_PREFIXED" + }, { + no: 2, + name: "DELIMITED" + }]); + (function (i) { + i[i.JSON_FORMAT_UNKNOWN = 0] = "JSON_FORMAT_UNKNOWN"; + i[i.ALLOW = 1] = "ALLOW"; + i[i.LEGACY_BEST_EFFORT = 2] = "LEGACY_BEST_EFFORT"; + })(cut ||= {}); + rs.util.setEnumType(cut, "google.protobuf.FeatureSet.JsonFormat", [{ + no: 0, + name: "JSON_FORMAT_UNKNOWN" + }, { + no: 1, + name: "ALLOW" + }, { + no: 2, + name: "LEGACY_BEST_EFFORT" + }]); + QZn = class ILe extends N { + constructor(e) { + super(); + this.defaults = []; + rs.util.initPartial(e, this); + } + static { + this.runtime = rs; + } + static { + this.typeName = "google.protobuf.FeatureSetDefaults"; + } + static { + this.fields = rs.util.newFieldList(() => [{ + no: 1, + name: "defaults", + kind: "message", + T: xhs, + repeated: true + }, { + no: 4, + name: "minimum_edition", + kind: "enum", + T: rs.getEnumType(YM), + opt: true + }, { + no: 5, + name: "maximum_edition", + kind: "enum", + T: rs.getEnumType(YM), + opt: true + }]); + } + static fromBinary(e, t) { + return new ILe().fromBinary(e, t); + } + static fromJson(e, t) { + return new ILe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new ILe().fromJsonString(e, t); + } + static equals(e, t) { + return rs.util.equals(ILe, e, t); + } + }; + xhs = class DLe extends N { + constructor(e) { + super(); + rs.util.initPartial(e, this); + } + static { + this.runtime = rs; + } + static { + this.typeName = "google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault"; + } + static { + this.fields = rs.util.newFieldList(() => [{ + no: 3, + name: "edition", + kind: "enum", + T: rs.getEnumType(YM), + opt: true + }, { + no: 4, + name: "overridable_features", + kind: "message", + T: lR, + opt: true + }, { + no: 5, + name: "fixed_features", + kind: "message", + T: lR, + opt: true + }]); + } + static fromBinary(e, t) { + return new DLe().fromBinary(e, t); + } + static fromJson(e, t) { + return new DLe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new DLe().fromJsonString(e, t); + } + static equals(e, t) { + return rs.util.equals(DLe, e, t); + } + }; + khs = class TLe extends N { + constructor(e) { + super(); + this.location = []; + rs.util.initPartial(e, this); + } + static { + this.runtime = rs; + } + static { + this.typeName = "google.protobuf.SourceCodeInfo"; + } + static { + this.fields = rs.util.newFieldList(() => [{ + no: 1, + name: "location", + kind: "message", + T: Ehs, + repeated: true + }]); + } + static fromBinary(e, t) { + return new TLe().fromBinary(e, t); + } + static fromJson(e, t) { + return new TLe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new TLe().fromJsonString(e, t); + } + static equals(e, t) { + return rs.util.equals(TLe, e, t); + } + }; + Ehs = class PLe extends N { + constructor(e) { + super(); + this.path = []; + this.span = []; + this.leadingDetachedComments = []; + rs.util.initPartial(e, this); + } + static { + this.runtime = rs; + } + static { + this.typeName = "google.protobuf.SourceCodeInfo.Location"; + } + static { + this.fields = rs.util.newFieldList(() => [{ + no: 1, + name: "path", + kind: "scalar", + T: 5, + repeated: true, + packed: true + }, { + no: 2, + name: "span", + kind: "scalar", + T: 5, + repeated: true, + packed: true + }, { + no: 3, + name: "leading_comments", + kind: "scalar", + T: 9, + opt: true + }, { + no: 4, + name: "trailing_comments", + kind: "scalar", + T: 9, + opt: true + }, { + no: 6, + name: "leading_detached_comments", + kind: "scalar", + T: 9, + repeated: true + }]); + } + static fromBinary(e, t) { + return new PLe().fromBinary(e, t); + } + static fromJson(e, t) { + return new PLe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new PLe().fromJsonString(e, t); + } + static equals(e, t) { + return rs.util.equals(PLe, e, t); + } + }; + Ihs = class LLe extends N { + constructor(e) { + super(); + this.annotation = []; + rs.util.initPartial(e, this); + } + static { + this.runtime = rs; + } + static { + this.typeName = "google.protobuf.GeneratedCodeInfo"; + } + static { + this.fields = rs.util.newFieldList(() => [{ + no: 1, + name: "annotation", + kind: "message", + T: Dhs, + repeated: true + }]); + } + static fromBinary(e, t) { + return new LLe().fromBinary(e, t); + } + static fromJson(e, t) { + return new LLe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new LLe().fromJsonString(e, t); + } + static equals(e, t) { + return rs.util.equals(LLe, e, t); + } + }; + Dhs = class RLe extends N { + constructor(e) { + super(); + this.path = []; + rs.util.initPartial(e, this); + } + static { + this.runtime = rs; + } + static { + this.typeName = "google.protobuf.GeneratedCodeInfo.Annotation"; + } + static { + this.fields = rs.util.newFieldList(() => [{ + no: 1, + name: "path", + kind: "scalar", + T: 5, + repeated: true, + packed: true + }, { + no: 2, + name: "source_file", + kind: "scalar", + T: 9, + opt: true + }, { + no: 3, + name: "begin", + kind: "scalar", + T: 5, + opt: true + }, { + no: 4, + name: "end", + kind: "scalar", + T: 5, + opt: true + }, { + no: 5, + name: "semantic", + kind: "enum", + T: rs.getEnumType(uut), + opt: true + }]); + } + static fromBinary(e, t) { + return new RLe().fromBinary(e, t); + } + static fromJson(e, t) { + return new RLe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new RLe().fromJsonString(e, t); + } + static equals(e, t) { + return rs.util.equals(RLe, e, t); + } + }; + (function (i) { + i[i.NONE = 0] = "NONE"; + i[i.SET = 1] = "SET"; + i[i.ALIAS = 2] = "ALIAS"; + })(uut ||= {}); + rs.util.setEnumType(uut, "google.protobuf.GeneratedCodeInfo.Annotation.Semantic", [{ + no: 0, + name: "NONE" + }, { + no: 1, + name: "SET" + }, { + no: 2, + name: "ALIAS" + }]); + } +}); +var ZZn = ue({ + "out-build/external/bufbuild/protobuf/private/text-format.js"() { + "use strict"; + + NF(); + M7(); + KM(); + } +}); +var eer = ue({ + "out-build/external/bufbuild/protobuf/private/feature-set.js"() { + "use strict"; + + abe(); + VVt(); + } +}); +var ter; +var Ths; +var Phs = ue({ + "out-build/external/bufbuild/protobuf/create-descriptor-set.js"() { + "use strict"; + + abe(); + NF(); + ihs(); + tbe(); + ZZn(); + eer(); + KM(); + O7(); + ter = { + [Gv.DOUBLE]: xn.DOUBLE, + [Gv.FLOAT]: xn.FLOAT, + [Gv.INT64]: xn.INT64, + [Gv.UINT64]: xn.UINT64, + [Gv.INT32]: xn.INT32, + [Gv.FIXED64]: xn.FIXED64, + [Gv.FIXED32]: xn.FIXED32, + [Gv.BOOL]: xn.BOOL, + [Gv.STRING]: xn.STRING, + [Gv.GROUP]: undefined, + [Gv.MESSAGE]: undefined, + [Gv.BYTES]: xn.BYTES, + [Gv.UINT32]: xn.UINT32, + [Gv.ENUM]: undefined, + [Gv.SFIXED32]: xn.SFIXED32, + [Gv.SFIXED64]: xn.SFIXED64, + [Gv.SINT32]: xn.SINT32, + [Gv.SINT64]: xn.SINT64 + }; + (function (i) { + i[i.FileDescriptorProto_Package = 2] = "FileDescriptorProto_Package"; + i[i.FileDescriptorProto_MessageType = 4] = "FileDescriptorProto_MessageType"; + i[i.FileDescriptorProto_EnumType = 5] = "FileDescriptorProto_EnumType"; + i[i.FileDescriptorProto_Service = 6] = "FileDescriptorProto_Service"; + i[i.FileDescriptorProto_Extension = 7] = "FileDescriptorProto_Extension"; + i[i.FileDescriptorProto_Syntax = 12] = "FileDescriptorProto_Syntax"; + i[i.DescriptorProto_Field = 2] = "DescriptorProto_Field"; + i[i.DescriptorProto_NestedType = 3] = "DescriptorProto_NestedType"; + i[i.DescriptorProto_EnumType = 4] = "DescriptorProto_EnumType"; + i[i.DescriptorProto_Extension = 6] = "DescriptorProto_Extension"; + i[i.DescriptorProto_OneofDecl = 8] = "DescriptorProto_OneofDecl"; + i[i.EnumDescriptorProto_Value = 2] = "EnumDescriptorProto_Value"; + i[i.ServiceDescriptorProto_Method = 2] = "ServiceDescriptorProto_Method"; + })(Ths ||= {}); + } +}); +var ier = ue({ + "out-build/external/bufbuild/protobuf/create-registry.js"() { + "use strict"; + } +}); +var $z; +var tHt = ue({ + "out-build/external/bufbuild/protobuf/google/protobuf/timestamp_pb.js"() { + "use strict"; + + aE(); + M7(); + aR(); + $z = class eZ extends N { + constructor(e) { + super(); + this.seconds = wd.zero; + this.nanos = 0; + m.util.initPartial(e, this); + } + fromJson(e, t) { + if (typeof e != "string") { + throw new Error(`cannot decode google.protobuf.Timestamp from JSON: ${m.json.debug(e)}`); + } + const s = e.match(/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(?:Z|\.([0-9]{3,9})Z|([+-][0-9][0-9]:[0-9][0-9]))$/); + if (!s) { + throw new Error("cannot decode google.protobuf.Timestamp from JSON: invalid RFC 3339 string"); + } + const n = Date.parse(s[1] + "-" + s[2] + "-" + s[3] + "T" + s[4] + ":" + s[5] + ":" + s[6] + (s[8] ? s[8] : "Z")); + if (Number.isNaN(n)) { + throw new Error("cannot decode google.protobuf.Timestamp from JSON: invalid RFC 3339 string"); + } + if (n < Date.parse("0001-01-01T00:00:00Z") || n > Date.parse("9999-12-31T23:59:59Z")) { + throw new Error("cannot decode message google.protobuf.Timestamp from JSON: must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive"); + } + this.seconds = wd.parse(n / 1000); + this.nanos = 0; + if (s[7]) { + this.nanos = parseInt("1" + s[7] + "0".repeat(9 - s[7].length)) - 1000000000; + } + return this; + } + toJson(e) { + const t = Number(this.seconds) * 1000; + if (t < Date.parse("0001-01-01T00:00:00Z") || t > Date.parse("9999-12-31T23:59:59Z")) { + throw new Error("cannot encode google.protobuf.Timestamp to JSON: must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive"); + } + if (this.nanos < 0) { + throw new Error("cannot encode google.protobuf.Timestamp to JSON: nanos must not be negative"); + } + let s = "Z"; + if (this.nanos > 0) { + const n = (this.nanos + 1000000000).toString().substring(1); + if (n.substring(3) === "000000") { + s = "." + n.substring(0, 3) + "Z"; + } else if (n.substring(6) === "000") { + s = "." + n.substring(0, 6) + "Z"; + } else { + s = "." + n + "Z"; + } + } + return new Date(t).toISOString().replace(".000Z", s); + } + toDate() { + return new Date(Number(this.seconds) * 1000 + Math.ceil(this.nanos / 1000000)); + } + static { + this.runtime = m; + } + static { + this.typeName = "google.protobuf.Timestamp"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "seconds", + kind: "scalar", + T: 3 + }, { + no: 2, + name: "nanos", + kind: "scalar", + T: 5 + }]); + } + static now() { + return eZ.fromDate(new Date()); + } + static fromDate(e) { + const t = e.getTime(); + return new eZ({ + seconds: wd.parse(Math.floor(t / 1000)), + nanos: t % 1000 * 1000000 + }); + } + static fromBinary(e, t) { + return new eZ().fromBinary(e, t); + } + static fromJson(e, t) { + return new eZ().fromJson(e, t); + } + static fromJsonString(e, t) { + return new eZ().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(eZ, e, t); + } + }; + } +}); +var iHt; +var sHt = ue({ + "out-build/external/bufbuild/protobuf/google/protobuf/duration_pb.js"() { + "use strict"; + + aE(); + M7(); + aR(); + iHt = class NLe extends N { + constructor(e) { + super(); + this.seconds = wd.zero; + this.nanos = 0; + m.util.initPartial(e, this); + } + fromJson(e, t) { + if (typeof e != "string") { + throw new Error(`cannot decode google.protobuf.Duration from JSON: ${m.json.debug(e)}`); + } + const s = e.match(/^(-?[0-9]+)(?:\.([0-9]+))?s/); + if (s === null) { + throw new Error(`cannot decode google.protobuf.Duration from JSON: ${m.json.debug(e)}`); + } + const n = Number(s[1]); + if (n > 315576000000 || n < -315576000000) { + throw new Error(`cannot decode google.protobuf.Duration from JSON: ${m.json.debug(e)}`); + } + this.seconds = wd.parse(n); + if (typeof s[2] == "string") { + const r = s[2] + "0".repeat(9 - s[2].length); + this.nanos = parseInt(r); + if (n < 0 || Object.is(n, -0)) { + this.nanos = -this.nanos; + } + } + return this; + } + toJson(e) { + if (Number(this.seconds) > 315576000000 || Number(this.seconds) < -315576000000) { + throw new Error("cannot encode google.protobuf.Duration to JSON: value out of range"); + } + let t = this.seconds.toString(); + if (this.nanos !== 0) { + let s = Math.abs(this.nanos).toString(); + s = "0".repeat(9 - s.length) + s; + if (s.substring(3) === "000000") { + s = s.substring(0, 3); + } else if (s.substring(6) === "000") { + s = s.substring(0, 6); + } + t += "." + s; + if (this.nanos < 0 && Number(this.seconds) == 0) { + t = "-" + t; + } + } + return t + "s"; + } + static { + this.runtime = m; + } + static { + this.typeName = "google.protobuf.Duration"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "seconds", + kind: "scalar", + T: 3 + }, { + no: 2, + name: "nanos", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new NLe().fromBinary(e, t); + } + static fromJson(e, t) { + return new NLe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new NLe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(NLe, e, t); + } + }; + } +}); +var nHt; +var rHt = ue({ + "out-build/external/bufbuild/protobuf/google/protobuf/any_pb.js"() { + "use strict"; + + aE(); + aR(); + nHt = class Rde extends N { + constructor(e) { + super(); + this.typeUrl = ""; + this.value = new Uint8Array(0); + m.util.initPartial(e, this); + } + toJson(e) { + if (this.typeUrl === "") { + return {}; + } + const t = this.typeUrlToName(this.typeUrl); + const s = e?.typeRegistry?.findMessage(t); + if (!s) { + throw new Error(`cannot encode message google.protobuf.Any to JSON: "${this.typeUrl}" is not in the type registry`); + } + let r = s.fromBinary(this.value).toJson(e); + if (t.startsWith("google.protobuf.") || r === null || Array.isArray(r) || typeof r != "object") { + r = { + value: r + }; + } + r["@type"] = this.typeUrl; + return r; + } + fromJson(e, t) { + if (e === null || Array.isArray(e) || typeof e != "object") { + throw new Error(`cannot decode message google.protobuf.Any from JSON: expected object but got ${e === null ? "null" : Array.isArray(e) ? "array" : typeof e}`); + } + if (Object.keys(e).length == 0) { + return this; + } + const s = e["@type"]; + if (typeof s != "string" || s == "") { + throw new Error("cannot decode message google.protobuf.Any from JSON: \"@type\" is empty"); + } + const n = this.typeUrlToName(s); + const r = t?.typeRegistry?.findMessage(n); + if (!r) { + throw new Error(`cannot decode message google.protobuf.Any from JSON: ${s} is not in the type registry`); + } + let o; + if (n.startsWith("google.protobuf.") && Object.prototype.hasOwnProperty.call(e, "value")) { + o = r.fromJson(e.value, t); + } else { + const a = Object.assign({}, e); + delete a["@type"]; + o = r.fromJson(a, t); + } + this.packFrom(o); + return this; + } + packFrom(e) { + this.value = e.toBinary(); + this.typeUrl = this.typeNameToUrl(e.getType().typeName); + } + unpackTo(e) { + if (this.is(e.getType())) { + e.fromBinary(this.value); + return true; + } else { + return false; + } + } + unpack(e) { + if (this.typeUrl === "") { + return; + } + const t = e.findMessage(this.typeUrlToName(this.typeUrl)); + if (t) { + return t.fromBinary(this.value); + } + } + is(e) { + if (this.typeUrl === "") { + return false; + } + const t = this.typeUrlToName(this.typeUrl); + let s = ""; + if (typeof e == "string") { + s = e; + } else { + s = e.typeName; + } + return t === s; + } + typeNameToUrl(e) { + return `type.googleapis.com/${e}`; + } + typeUrlToName(e) { + if (!e.length) { + throw new Error(`invalid type url: ${e}`); + } + const t = e.lastIndexOf("/"); + const s = t >= 0 ? e.substring(t + 1) : e; + if (!s.length) { + throw new Error(`invalid type url: ${e}`); + } + return s; + } + static { + this.runtime = m; + } + static { + this.typeName = "google.protobuf.Any"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "type_url", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "value", + kind: "scalar", + T: 12 + }]); + } + static pack(e) { + const t = new Rde(); + t.packFrom(e); + return t; + } + static fromBinary(e, t) { + return new Rde().fromBinary(e, t); + } + static fromJson(e, t) { + return new Rde().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Rde().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Rde, e, t); + } + }; + } +}); +var p1; +var Lhs = ue({ + "out-build/external/bufbuild/protobuf/google/protobuf/empty_pb.js"() { + "use strict"; + + aE(); + aR(); + p1 = class MLe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "google.protobuf.Empty"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new MLe().fromBinary(e, t); + } + static fromJson(e, t) { + return new MLe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new MLe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(MLe, e, t); + } + }; + } +}); +var ser; +var Rhs = ue({ + "out-build/external/bufbuild/protobuf/google/protobuf/field_mask_pb.js"() { + "use strict"; + + aE(); + aR(); + ser = class ALe extends N { + constructor(e) { + super(); + this.paths = []; + m.util.initPartial(e, this); + } + toJson(e) { + function t(s) { + let n = false; + const r = []; + for (let o = 0; o < s.length; o++) { + let a = s.charAt(o); + switch (a) { + case "_": + n = true; + break; + case "0": + case "1": + case "2": + case "3": + case "4": + case "5": + case "6": + case "7": + case "8": + case "9": + r.push(a); + n = false; + break; + default: + if (n) { + n = false; + a = a.toUpperCase(); + } + r.push(a); + break; + } + } + return r.join(""); + } + return this.paths.map(s => { + if (s.match(/_[0-9]?_/g) || s.match(/[A-Z]/g)) { + throw new Error("cannot encode google.protobuf.FieldMask to JSON: lowerCamelCase of path name \"" + s + "\" is irreversible"); + } + return t(s); + }).join(","); + } + fromJson(e, t) { + if (typeof e != "string") { + throw new Error("cannot decode google.protobuf.FieldMask from JSON: " + m.json.debug(e)); + } + if (e === "") { + return this; + } + function s(n) { + if (n.includes("_")) { + throw new Error("cannot decode google.protobuf.FieldMask from JSON: path names must be lowerCamelCase"); + } + const r = n.replace(/[A-Z]/g, o => "_" + o.toLowerCase()); + if (r[0] === "_") { + return r.substring(1); + } else { + return r; + } + } + this.paths = e.split(",").map(s); + return this; + } + static { + this.runtime = m; + } + static { + this.typeName = "google.protobuf.FieldMask"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "paths", + kind: "scalar", + T: 9, + repeated: true + }]); + } + static fromBinary(e, t) { + return new ALe().fromBinary(e, t); + } + static fromJson(e, t) { + return new ALe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new ALe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(ALe, e, t); + } + }; + } +}); +var Fie; +var oHt; +var lbe; +var aHt; +var Nhs = ue({ + "out-build/external/bufbuild/protobuf/google/protobuf/struct_pb.js"() { + "use strict"; + + aR(); + aE(); + (function (i) { + i[i.NULL_VALUE = 0] = "NULL_VALUE"; + })(Fie ||= {}); + m.util.setEnumType(Fie, "google.protobuf.NullValue", [{ + no: 0, + name: "NULL_VALUE" + }]); + oHt = class $Le extends N { + constructor(e) { + super(); + this.fields = {}; + m.util.initPartial(e, this); + } + toJson(e) { + const t = {}; + for (const [s, n] of Object.entries(this.fields)) { + t[s] = n.toJson(e); + } + return t; + } + fromJson(e, t) { + if (typeof e != "object" || e == null || Array.isArray(e)) { + throw new Error("cannot decode google.protobuf.Struct from JSON " + m.json.debug(e)); + } + for (const [s, n] of Object.entries(e)) { + this.fields[s] = lbe.fromJson(n); + } + return this; + } + static { + this.runtime = m; + } + static { + this.typeName = "google.protobuf.Struct"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "fields", + kind: "map", + K: 9, + V: { + kind: "message", + T: lbe + } + }]); + } + static fromBinary(e, t) { + return new $Le().fromBinary(e, t); + } + static fromJson(e, t) { + return new $Le().fromJson(e, t); + } + static fromJsonString(e, t) { + return new $Le().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals($Le, e, t); + } + }; + lbe = class FLe extends N { + constructor(e) { + super(); + this.kind = { + case: undefined + }; + m.util.initPartial(e, this); + } + toJson(e) { + switch (this.kind.case) { + case "nullValue": + return null; + case "numberValue": + if (!Number.isFinite(this.kind.value)) { + throw new Error("google.protobuf.Value cannot be NaN or Infinity"); + } + return this.kind.value; + case "boolValue": + return this.kind.value; + case "stringValue": + return this.kind.value; + case "structValue": + case "listValue": + return this.kind.value.toJson({ + ...e, + emitDefaultValues: true + }); + } + throw new Error("google.protobuf.Value must have a value"); + } + fromJson(e, t) { + switch (typeof e) { + case "number": + this.kind = { + case: "numberValue", + value: e + }; + break; + case "string": + this.kind = { + case: "stringValue", + value: e + }; + break; + case "boolean": + this.kind = { + case: "boolValue", + value: e + }; + break; + case "object": + if (e === null) { + this.kind = { + case: "nullValue", + value: Fie.NULL_VALUE + }; + } else if (Array.isArray(e)) { + this.kind = { + case: "listValue", + value: aHt.fromJson(e) + }; + } else { + this.kind = { + case: "structValue", + value: oHt.fromJson(e) + }; + } + break; + default: + throw new Error("cannot decode google.protobuf.Value from JSON " + m.json.debug(e)); + } + return this; + } + static { + this.runtime = m; + } + static { + this.typeName = "google.protobuf.Value"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "null_value", + kind: "enum", + T: m.getEnumType(Fie), + oneof: "kind" + }, { + no: 2, + name: "number_value", + kind: "scalar", + T: 1, + oneof: "kind" + }, { + no: 3, + name: "string_value", + kind: "scalar", + T: 9, + oneof: "kind" + }, { + no: 4, + name: "bool_value", + kind: "scalar", + T: 8, + oneof: "kind" + }, { + no: 5, + name: "struct_value", + kind: "message", + T: oHt, + oneof: "kind" + }, { + no: 6, + name: "list_value", + kind: "message", + T: aHt, + oneof: "kind" + }]); + } + static fromBinary(e, t) { + return new FLe().fromBinary(e, t); + } + static fromJson(e, t) { + return new FLe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new FLe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(FLe, e, t); + } + }; + aHt = class OLe extends N { + constructor(e) { + super(); + this.values = []; + m.util.initPartial(e, this); + } + toJson(e) { + return this.values.map(t => t.toJson()); + } + fromJson(e, t) { + if (!Array.isArray(e)) { + throw new Error("cannot decode google.protobuf.ListValue from JSON " + m.json.debug(e)); + } + for (let s of e) { + this.values.push(lbe.fromJson(s)); + } + return this; + } + static { + this.runtime = m; + } + static { + this.typeName = "google.protobuf.ListValue"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "values", + kind: "message", + T: lbe, + repeated: true + }]); + } + static fromBinary(e, t) { + return new OLe().fromBinary(e, t); + } + static fromJson(e, t) { + return new OLe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new OLe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(OLe, e, t); + } + }; + } +}); +var ner; +var rer; +var oer; +var aer; +var ler; +var cer; +var uer; +var der; +var her; +var Mhs = ue({ + "out-build/external/bufbuild/protobuf/google/protobuf/wrappers_pb.js"() { + "use strict"; + + aE(); + aR(); + KM(); + M7(); + ner = class Nde extends N { + constructor(e) { + super(); + this.value = 0; + m.util.initPartial(e, this); + } + toJson(e) { + return m.json.writeScalar(xn.DOUBLE, this.value, true); + } + fromJson(e, t) { + try { + this.value = m.json.readScalar(xn.DOUBLE, e); + } catch (s) { + let n = "cannot decode message google.protobuf.DoubleValue from JSON\""; + if (s instanceof Error && s.message.length > 0) { + n += `: ${s.message}`; + } + throw new Error(n); + } + return this; + } + static { + this.runtime = m; + } + static { + this.typeName = "google.protobuf.DoubleValue"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "value", + kind: "scalar", + T: 1 + }]); + } + static { + this.fieldWrapper = { + wrapField(e) { + return new Nde({ + value: e + }); + }, + unwrapField(e) { + return e.value; + } + }; + } + static fromBinary(e, t) { + return new Nde().fromBinary(e, t); + } + static fromJson(e, t) { + return new Nde().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Nde().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Nde, e, t); + } + }; + rer = class Mde extends N { + constructor(e) { + super(); + this.value = 0; + m.util.initPartial(e, this); + } + toJson(e) { + return m.json.writeScalar(xn.FLOAT, this.value, true); + } + fromJson(e, t) { + try { + this.value = m.json.readScalar(xn.FLOAT, e); + } catch (s) { + let n = "cannot decode message google.protobuf.FloatValue from JSON\""; + if (s instanceof Error && s.message.length > 0) { + n += `: ${s.message}`; + } + throw new Error(n); + } + return this; + } + static { + this.runtime = m; + } + static { + this.typeName = "google.protobuf.FloatValue"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "value", + kind: "scalar", + T: 2 + }]); + } + static { + this.fieldWrapper = { + wrapField(e) { + return new Mde({ + value: e + }); + }, + unwrapField(e) { + return e.value; + } + }; + } + static fromBinary(e, t) { + return new Mde().fromBinary(e, t); + } + static fromJson(e, t) { + return new Mde().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Mde().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Mde, e, t); + } + }; + oer = class Ade extends N { + constructor(e) { + super(); + this.value = wd.zero; + m.util.initPartial(e, this); + } + toJson(e) { + return m.json.writeScalar(xn.INT64, this.value, true); + } + fromJson(e, t) { + try { + this.value = m.json.readScalar(xn.INT64, e); + } catch (s) { + let n = "cannot decode message google.protobuf.Int64Value from JSON\""; + if (s instanceof Error && s.message.length > 0) { + n += `: ${s.message}`; + } + throw new Error(n); + } + return this; + } + static { + this.runtime = m; + } + static { + this.typeName = "google.protobuf.Int64Value"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "value", + kind: "scalar", + T: 3 + }]); + } + static { + this.fieldWrapper = { + wrapField(e) { + return new Ade({ + value: e + }); + }, + unwrapField(e) { + return e.value; + } + }; + } + static fromBinary(e, t) { + return new Ade().fromBinary(e, t); + } + static fromJson(e, t) { + return new Ade().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Ade().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Ade, e, t); + } + }; + aer = class $de extends N { + constructor(e) { + super(); + this.value = wd.zero; + m.util.initPartial(e, this); + } + toJson(e) { + return m.json.writeScalar(xn.UINT64, this.value, true); + } + fromJson(e, t) { + try { + this.value = m.json.readScalar(xn.UINT64, e); + } catch (s) { + let n = "cannot decode message google.protobuf.UInt64Value from JSON\""; + if (s instanceof Error && s.message.length > 0) { + n += `: ${s.message}`; + } + throw new Error(n); + } + return this; + } + static { + this.runtime = m; + } + static { + this.typeName = "google.protobuf.UInt64Value"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "value", + kind: "scalar", + T: 4 + }]); + } + static { + this.fieldWrapper = { + wrapField(e) { + return new $de({ + value: e + }); + }, + unwrapField(e) { + return e.value; + } + }; + } + static fromBinary(e, t) { + return new $de().fromBinary(e, t); + } + static fromJson(e, t) { + return new $de().fromJson(e, t); + } + static fromJsonString(e, t) { + return new $de().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals($de, e, t); + } + }; + ler = class Fde extends N { + constructor(e) { + super(); + this.value = 0; + m.util.initPartial(e, this); + } + toJson(e) { + return m.json.writeScalar(xn.INT32, this.value, true); + } + fromJson(e, t) { + try { + this.value = m.json.readScalar(xn.INT32, e); + } catch (s) { + let n = "cannot decode message google.protobuf.Int32Value from JSON\""; + if (s instanceof Error && s.message.length > 0) { + n += `: ${s.message}`; + } + throw new Error(n); + } + return this; + } + static { + this.runtime = m; + } + static { + this.typeName = "google.protobuf.Int32Value"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "value", + kind: "scalar", + T: 5 + }]); + } + static { + this.fieldWrapper = { + wrapField(e) { + return new Fde({ + value: e + }); + }, + unwrapField(e) { + return e.value; + } + }; + } + static fromBinary(e, t) { + return new Fde().fromBinary(e, t); + } + static fromJson(e, t) { + return new Fde().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Fde().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Fde, e, t); + } + }; + cer = class Ode extends N { + constructor(e) { + super(); + this.value = 0; + m.util.initPartial(e, this); + } + toJson(e) { + return m.json.writeScalar(xn.UINT32, this.value, true); + } + fromJson(e, t) { + try { + this.value = m.json.readScalar(xn.UINT32, e); + } catch (s) { + let n = "cannot decode message google.protobuf.UInt32Value from JSON\""; + if (s instanceof Error && s.message.length > 0) { + n += `: ${s.message}`; + } + throw new Error(n); + } + return this; + } + static { + this.runtime = m; + } + static { + this.typeName = "google.protobuf.UInt32Value"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "value", + kind: "scalar", + T: 13 + }]); + } + static { + this.fieldWrapper = { + wrapField(e) { + return new Ode({ + value: e + }); + }, + unwrapField(e) { + return e.value; + } + }; + } + static fromBinary(e, t) { + return new Ode().fromBinary(e, t); + } + static fromJson(e, t) { + return new Ode().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Ode().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Ode, e, t); + } + }; + uer = class _de extends N { + constructor(e) { + super(); + this.value = false; + m.util.initPartial(e, this); + } + toJson(e) { + return m.json.writeScalar(xn.BOOL, this.value, true); + } + fromJson(e, t) { + try { + this.value = m.json.readScalar(xn.BOOL, e); + } catch (s) { + let n = "cannot decode message google.protobuf.BoolValue from JSON\""; + if (s instanceof Error && s.message.length > 0) { + n += `: ${s.message}`; + } + throw new Error(n); + } + return this; + } + static { + this.runtime = m; + } + static { + this.typeName = "google.protobuf.BoolValue"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "value", + kind: "scalar", + T: 8 + }]); + } + static { + this.fieldWrapper = { + wrapField(e) { + return new _de({ + value: e + }); + }, + unwrapField(e) { + return e.value; + } + }; + } + static fromBinary(e, t) { + return new _de().fromBinary(e, t); + } + static fromJson(e, t) { + return new _de().fromJson(e, t); + } + static fromJsonString(e, t) { + return new _de().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(_de, e, t); + } + }; + der = class Bde extends N { + constructor(e) { + super(); + this.value = ""; + m.util.initPartial(e, this); + } + toJson(e) { + return m.json.writeScalar(xn.STRING, this.value, true); + } + fromJson(e, t) { + try { + this.value = m.json.readScalar(xn.STRING, e); + } catch (s) { + let n = "cannot decode message google.protobuf.StringValue from JSON\""; + if (s instanceof Error && s.message.length > 0) { + n += `: ${s.message}`; + } + throw new Error(n); + } + return this; + } + static { + this.runtime = m; + } + static { + this.typeName = "google.protobuf.StringValue"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "value", + kind: "scalar", + T: 9 + }]); + } + static { + this.fieldWrapper = { + wrapField(e) { + return new Bde({ + value: e + }); + }, + unwrapField(e) { + return e.value; + } + }; + } + static fromBinary(e, t) { + return new Bde().fromBinary(e, t); + } + static fromJson(e, t) { + return new Bde().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Bde().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Bde, e, t); + } + }; + her = class Ude extends N { + constructor(e) { + super(); + this.value = new Uint8Array(0); + m.util.initPartial(e, this); + } + toJson(e) { + return m.json.writeScalar(xn.BYTES, this.value, true); + } + fromJson(e, t) { + try { + this.value = m.json.readScalar(xn.BYTES, e); + } catch (s) { + let n = "cannot decode message google.protobuf.BytesValue from JSON\""; + if (s instanceof Error && s.message.length > 0) { + n += `: ${s.message}`; + } + throw new Error(n); + } + return this; + } + static { + this.runtime = m; + } + static { + this.typeName = "google.protobuf.BytesValue"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "value", + kind: "scalar", + T: 12 + }]); + } + static { + this.fieldWrapper = { + wrapField(e) { + return new Ude({ + value: e + }); + }, + unwrapField(e) { + return e.value; + } + }; + } + static fromBinary(e, t) { + return new Ude().fromBinary(e, t); + } + static fromJson(e, t) { + return new Ude().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Ude().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Ude, e, t); + } + }; + } +}); +var fer; +var ger = ue({ + "out-build/external/bufbuild/protobuf/create-registry-from-desc.js"() { + "use strict"; + + NF(); + aR(); + Qct(); + tbe(); + tHt(); + sHt(); + rHt(); + Lhs(); + Rhs(); + Nhs(); + FVt(); + Mhs(); + abe(); + Phs(); + O7(); + fer = [mds(Fie)]; + } +}); +var per = ue({ + "out-build/external/bufbuild/protobuf/to-plain-message.js"() { + "use strict"; + + O7(); + } +}); +var Ahs; +var mer; +var ber; +var lHt; +var $hs; +var ver = ue({ + "out-build/external/bufbuild/protobuf/google/protobuf/compiler/plugin_pb.js"() { + "use strict"; + + aE(); + Qct(); + abe(); + Ahs = class _Le extends N { + constructor(e) { + super(); + rs.util.initPartial(e, this); + } + static { + this.runtime = rs; + } + static { + this.typeName = "google.protobuf.compiler.Version"; + } + static { + this.fields = rs.util.newFieldList(() => [{ + no: 1, + name: "major", + kind: "scalar", + T: 5, + opt: true + }, { + no: 2, + name: "minor", + kind: "scalar", + T: 5, + opt: true + }, { + no: 3, + name: "patch", + kind: "scalar", + T: 5, + opt: true + }, { + no: 4, + name: "suffix", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new _Le().fromBinary(e, t); + } + static fromJson(e, t) { + return new _Le().fromJson(e, t); + } + static fromJsonString(e, t) { + return new _Le().fromJsonString(e, t); + } + static equals(e, t) { + return rs.util.equals(_Le, e, t); + } + }; + mer = class BLe extends N { + constructor(e) { + super(); + this.fileToGenerate = []; + this.protoFile = []; + this.sourceFileDescriptors = []; + rs.util.initPartial(e, this); + } + static { + this.runtime = rs; + } + static { + this.typeName = "google.protobuf.compiler.CodeGeneratorRequest"; + } + static { + this.fields = rs.util.newFieldList(() => [{ + no: 1, + name: "file_to_generate", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 2, + name: "parameter", + kind: "scalar", + T: 9, + opt: true + }, { + no: 15, + name: "proto_file", + kind: "message", + T: Zct, + repeated: true + }, { + no: 17, + name: "source_file_descriptors", + kind: "message", + T: Zct, + repeated: true + }, { + no: 3, + name: "compiler_version", + kind: "message", + T: Ahs, + opt: true + }]); + } + static fromBinary(e, t) { + return new BLe().fromBinary(e, t); + } + static fromJson(e, t) { + return new BLe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new BLe().fromJsonString(e, t); + } + static equals(e, t) { + return rs.util.equals(BLe, e, t); + } + }; + ber = class ULe extends N { + constructor(e) { + super(); + this.file = []; + rs.util.initPartial(e, this); + } + static { + this.runtime = rs; + } + static { + this.typeName = "google.protobuf.compiler.CodeGeneratorResponse"; + } + static { + this.fields = rs.util.newFieldList(() => [{ + no: 1, + name: "error", + kind: "scalar", + T: 9, + opt: true + }, { + no: 2, + name: "supported_features", + kind: "scalar", + T: 4, + opt: true + }, { + no: 3, + name: "minimum_edition", + kind: "scalar", + T: 5, + opt: true + }, { + no: 4, + name: "maximum_edition", + kind: "scalar", + T: 5, + opt: true + }, { + no: 15, + name: "file", + kind: "message", + T: $hs, + repeated: true + }]); + } + static fromBinary(e, t) { + return new ULe().fromBinary(e, t); + } + static fromJson(e, t) { + return new ULe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new ULe().fromJsonString(e, t); + } + static equals(e, t) { + return rs.util.equals(ULe, e, t); + } + }; + (function (i) { + i[i.NONE = 0] = "NONE"; + i[i.PROTO3_OPTIONAL = 1] = "PROTO3_OPTIONAL"; + i[i.SUPPORTS_EDITIONS = 2] = "SUPPORTS_EDITIONS"; + })(lHt ||= {}); + rs.util.setEnumType(lHt, "google.protobuf.compiler.CodeGeneratorResponse.Feature", [{ + no: 0, + name: "FEATURE_NONE" + }, { + no: 1, + name: "FEATURE_PROTO3_OPTIONAL" + }, { + no: 2, + name: "FEATURE_SUPPORTS_EDITIONS" + }]); + $hs = class WLe extends N { + constructor(e) { + super(); + rs.util.initPartial(e, this); + } + static { + this.runtime = rs; + } + static { + this.typeName = "google.protobuf.compiler.CodeGeneratorResponse.File"; + } + static { + this.fields = rs.util.newFieldList(() => [{ + no: 1, + name: "name", + kind: "scalar", + T: 9, + opt: true + }, { + no: 2, + name: "insertion_point", + kind: "scalar", + T: 9, + opt: true + }, { + no: 15, + name: "content", + kind: "scalar", + T: 9, + opt: true + }, { + no: 16, + name: "generated_code_info", + kind: "message", + T: Ihs, + opt: true + }]); + } + static fromBinary(e, t) { + return new WLe().fromBinary(e, t); + } + static fromJson(e, t) { + return new WLe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new WLe().fromJsonString(e, t); + } + static equals(e, t) { + return rs.util.equals(WLe, e, t); + } + }; + } +}); +var dut; +var cHt = ue({ + "out-build/external/bufbuild/protobuf/google/protobuf/source_context_pb.js"() { + "use strict"; + + aE(); + aR(); + dut = class VLe extends N { + constructor(e) { + super(); + this.fileName = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "google.protobuf.SourceContext"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "file_name", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new VLe().fromBinary(e, t); + } + static fromJson(e, t) { + return new VLe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new VLe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(VLe, e, t); + } + }; + } +}); +var XM; +var yer; +var Fhs; +var cbe; +var ube; +var wer; +var Ohs; +var Fz; +var _hs = ue({ + "out-build/external/bufbuild/protobuf/google/protobuf/type_pb.js"() { + "use strict"; + + aR(); + aE(); + cHt(); + rHt(); + (function (i) { + i[i.PROTO2 = 0] = "PROTO2"; + i[i.PROTO3 = 1] = "PROTO3"; + i[i.EDITIONS = 2] = "EDITIONS"; + })(XM ||= {}); + m.util.setEnumType(XM, "google.protobuf.Syntax", [{ + no: 0, + name: "SYNTAX_PROTO2" + }, { + no: 1, + name: "SYNTAX_PROTO3" + }, { + no: 2, + name: "SYNTAX_EDITIONS" + }]); + yer = class HLe extends N { + constructor(e) { + super(); + this.name = ""; + this.fields = []; + this.oneofs = []; + this.options = []; + this.syntax = XM.PROTO2; + this.edition = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "google.protobuf.Type"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "name", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "fields", + kind: "message", + T: Fhs, + repeated: true + }, { + no: 3, + name: "oneofs", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 4, + name: "options", + kind: "message", + T: Fz, + repeated: true + }, { + no: 5, + name: "source_context", + kind: "message", + T: dut + }, { + no: 6, + name: "syntax", + kind: "enum", + T: m.getEnumType(XM) + }, { + no: 7, + name: "edition", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new HLe().fromBinary(e, t); + } + static fromJson(e, t) { + return new HLe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new HLe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(HLe, e, t); + } + }; + Fhs = class qLe extends N { + constructor(e) { + super(); + this.kind = cbe.TYPE_UNKNOWN; + this.cardinality = ube.UNKNOWN; + this.number = 0; + this.name = ""; + this.typeUrl = ""; + this.oneofIndex = 0; + this.packed = false; + this.options = []; + this.jsonName = ""; + this.defaultValue = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "google.protobuf.Field"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "kind", + kind: "enum", + T: m.getEnumType(cbe) + }, { + no: 2, + name: "cardinality", + kind: "enum", + T: m.getEnumType(ube) + }, { + no: 3, + name: "number", + kind: "scalar", + T: 5 + }, { + no: 4, + name: "name", + kind: "scalar", + T: 9 + }, { + no: 6, + name: "type_url", + kind: "scalar", + T: 9 + }, { + no: 7, + name: "oneof_index", + kind: "scalar", + T: 5 + }, { + no: 8, + name: "packed", + kind: "scalar", + T: 8 + }, { + no: 9, + name: "options", + kind: "message", + T: Fz, + repeated: true + }, { + no: 10, + name: "json_name", + kind: "scalar", + T: 9 + }, { + no: 11, + name: "default_value", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new qLe().fromBinary(e, t); + } + static fromJson(e, t) { + return new qLe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new qLe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(qLe, e, t); + } + }; + (function (i) { + i[i.TYPE_UNKNOWN = 0] = "TYPE_UNKNOWN"; + i[i.TYPE_DOUBLE = 1] = "TYPE_DOUBLE"; + i[i.TYPE_FLOAT = 2] = "TYPE_FLOAT"; + i[i.TYPE_INT64 = 3] = "TYPE_INT64"; + i[i.TYPE_UINT64 = 4] = "TYPE_UINT64"; + i[i.TYPE_INT32 = 5] = "TYPE_INT32"; + i[i.TYPE_FIXED64 = 6] = "TYPE_FIXED64"; + i[i.TYPE_FIXED32 = 7] = "TYPE_FIXED32"; + i[i.TYPE_BOOL = 8] = "TYPE_BOOL"; + i[i.TYPE_STRING = 9] = "TYPE_STRING"; + i[i.TYPE_GROUP = 10] = "TYPE_GROUP"; + i[i.TYPE_MESSAGE = 11] = "TYPE_MESSAGE"; + i[i.TYPE_BYTES = 12] = "TYPE_BYTES"; + i[i.TYPE_UINT32 = 13] = "TYPE_UINT32"; + i[i.TYPE_ENUM = 14] = "TYPE_ENUM"; + i[i.TYPE_SFIXED32 = 15] = "TYPE_SFIXED32"; + i[i.TYPE_SFIXED64 = 16] = "TYPE_SFIXED64"; + i[i.TYPE_SINT32 = 17] = "TYPE_SINT32"; + i[i.TYPE_SINT64 = 18] = "TYPE_SINT64"; + })(cbe ||= {}); + m.util.setEnumType(cbe, "google.protobuf.Field.Kind", [{ + no: 0, + name: "TYPE_UNKNOWN" + }, { + no: 1, + name: "TYPE_DOUBLE" + }, { + no: 2, + name: "TYPE_FLOAT" + }, { + no: 3, + name: "TYPE_INT64" + }, { + no: 4, + name: "TYPE_UINT64" + }, { + no: 5, + name: "TYPE_INT32" + }, { + no: 6, + name: "TYPE_FIXED64" + }, { + no: 7, + name: "TYPE_FIXED32" + }, { + no: 8, + name: "TYPE_BOOL" + }, { + no: 9, + name: "TYPE_STRING" + }, { + no: 10, + name: "TYPE_GROUP" + }, { + no: 11, + name: "TYPE_MESSAGE" + }, { + no: 12, + name: "TYPE_BYTES" + }, { + no: 13, + name: "TYPE_UINT32" + }, { + no: 14, + name: "TYPE_ENUM" + }, { + no: 15, + name: "TYPE_SFIXED32" + }, { + no: 16, + name: "TYPE_SFIXED64" + }, { + no: 17, + name: "TYPE_SINT32" + }, { + no: 18, + name: "TYPE_SINT64" + }]); + (function (i) { + i[i.UNKNOWN = 0] = "UNKNOWN"; + i[i.OPTIONAL = 1] = "OPTIONAL"; + i[i.REQUIRED = 2] = "REQUIRED"; + i[i.REPEATED = 3] = "REPEATED"; + })(ube ||= {}); + m.util.setEnumType(ube, "google.protobuf.Field.Cardinality", [{ + no: 0, + name: "CARDINALITY_UNKNOWN" + }, { + no: 1, + name: "CARDINALITY_OPTIONAL" + }, { + no: 2, + name: "CARDINALITY_REQUIRED" + }, { + no: 3, + name: "CARDINALITY_REPEATED" + }]); + wer = class jLe extends N { + constructor(e) { + super(); + this.name = ""; + this.enumvalue = []; + this.options = []; + this.syntax = XM.PROTO2; + this.edition = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "google.protobuf.Enum"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "name", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "enumvalue", + kind: "message", + T: Ohs, + repeated: true + }, { + no: 3, + name: "options", + kind: "message", + T: Fz, + repeated: true + }, { + no: 4, + name: "source_context", + kind: "message", + T: dut + }, { + no: 5, + name: "syntax", + kind: "enum", + T: m.getEnumType(XM) + }, { + no: 6, + name: "edition", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new jLe().fromBinary(e, t); + } + static fromJson(e, t) { + return new jLe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new jLe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(jLe, e, t); + } + }; + Ohs = class zLe extends N { + constructor(e) { + super(); + this.name = ""; + this.number = 0; + this.options = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "google.protobuf.EnumValue"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "name", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "number", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "options", + kind: "message", + T: Fz, + repeated: true + }]); + } + static fromBinary(e, t) { + return new zLe().fromBinary(e, t); + } + static fromJson(e, t) { + return new zLe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new zLe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(zLe, e, t); + } + }; + Fz = class JLe extends N { + constructor(e) { + super(); + this.name = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "google.protobuf.Option"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "name", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "value", + kind: "message", + T: nHt + }]); + } + static fromBinary(e, t) { + return new JLe().fromBinary(e, t); + } + static fromJson(e, t) { + return new JLe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new JLe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(JLe, e, t); + } + }; + } +}); +var Cer; +var Bhs; +var Uhs; +var Ser = ue({ + "out-build/external/bufbuild/protobuf/google/protobuf/api_pb.js"() { + "use strict"; + + aE(); + _hs(); + cHt(); + aR(); + Cer = class GLe extends N { + constructor(e) { + super(); + this.name = ""; + this.methods = []; + this.options = []; + this.version = ""; + this.mixins = []; + this.syntax = XM.PROTO2; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "google.protobuf.Api"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "name", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "methods", + kind: "message", + T: Bhs, + repeated: true + }, { + no: 3, + name: "options", + kind: "message", + T: Fz, + repeated: true + }, { + no: 4, + name: "version", + kind: "scalar", + T: 9 + }, { + no: 5, + name: "source_context", + kind: "message", + T: dut + }, { + no: 6, + name: "mixins", + kind: "message", + T: Uhs, + repeated: true + }, { + no: 7, + name: "syntax", + kind: "enum", + T: m.getEnumType(XM) + }]); + } + static fromBinary(e, t) { + return new GLe().fromBinary(e, t); + } + static fromJson(e, t) { + return new GLe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new GLe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(GLe, e, t); + } + }; + Bhs = class KLe extends N { + constructor(e) { + super(); + this.name = ""; + this.requestTypeUrl = ""; + this.requestStreaming = false; + this.responseTypeUrl = ""; + this.responseStreaming = false; + this.options = []; + this.syntax = XM.PROTO2; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "google.protobuf.Method"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "name", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "request_type_url", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "request_streaming", + kind: "scalar", + T: 8 + }, { + no: 4, + name: "response_type_url", + kind: "scalar", + T: 9 + }, { + no: 5, + name: "response_streaming", + kind: "scalar", + T: 8 + }, { + no: 6, + name: "options", + kind: "message", + T: Fz, + repeated: true + }, { + no: 7, + name: "syntax", + kind: "enum", + T: m.getEnumType(XM) + }]); + } + static fromBinary(e, t) { + return new KLe().fromBinary(e, t); + } + static fromJson(e, t) { + return new KLe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new KLe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(KLe, e, t); + } + }; + Uhs = class YLe extends N { + constructor(e) { + super(); + this.name = ""; + this.root = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "google.protobuf.Mixin"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "name", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "root", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new YLe().fromBinary(e, t); + } + static fromJson(e, t) { + return new YLe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new YLe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(YLe, e, t); + } + }; + } +}); +var xer = ue({ + "out-build/external/bufbuild/protobuf/index.js"() { + "use strict"; + + aR(); + Qct(); + JZn(); + M7(); + VVt(); + GZn(); + YZn(); + aE(); + O7(); + KM(); + Pds(); + ihs(); + GVt(); + Phs(); + ier(); + ger(); + per(); + ver(); + Ser(); + rHt(); + abe(); + sHt(); + Lhs(); + Rhs(); + cHt(); + Nhs(); + tHt(); + _hs(); + Mhs(); + } +}); +var Hr = ue({ + "out-build/external/bufbuild/protobuf.js"() { + "use strict"; + + xer(); + } +}); +var GT; +var dbe; +var Y4; +var sv; +var hut; +var Whs; +var uHt; +var hbe; +var Vhs; +var Hhs; +var QI; +var dHt; +var Sb; +var ZI; +var X4; +var fbe; +var Of; +var qhs; +var KT; +var jhs; +var zhs; +var Jhs; +var Ghs; +var Kv; +var eD; +var fut; +var Xg; +var Khs; +var $x; +var hHt; +var cR; +var gut; +var Yhs; +var Xhs; +var tu; +var Qhs; +var Zhs; +var efs; +var Qa; +var put; +var fHt; +var YT; +var xp; +var tfs; +var XT; +var gHt; +var gbe; +var pHt; +var mHt; +var Qg; +var Oie; +var pbe; +var mbe; +var bbe; +var bHt; +var vHt; +var ifs; +var vbe; +var QM; +var yo; +var yHt; +var tD; +var sfs; +var ybe; +var nfs; +var Oz; +var mut; +var but; +var rfs; +var ofs; +var ker; +var afs; +var wHt; +var CHt; +var SHt; +var vut; +var yut; +var lfs; +var cfs; +var xHt; +var wut; +var ufs; +var Eer; +var Wo = ue({ + "out-build/proto/aiserver/v1/utils_pb.js"() { + "use strict"; + + Hr(); + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.ERROR = 1] = "ERROR"; + i[i.WARNING = 2] = "WARNING"; + i[i.INFO = 3] = "INFO"; + i[i.HINT = 4] = "HINT"; + i[i.AI = 5] = "AI"; + })(GT ||= {}); + m.util.setEnumType(GT, "aiserver.v1.LintSeverity", [{ + no: 0, + name: "LINT_SEVERITY_UNSPECIFIED" + }, { + no: 1, + name: "LINT_SEVERITY_ERROR" + }, { + no: 2, + name: "LINT_SEVERITY_WARNING" + }, { + no: 3, + name: "LINT_SEVERITY_INFO" + }, { + no: 4, + name: "LINT_SEVERITY_HINT" + }, { + no: 5, + name: "LINT_SEVERITY_AI" + }]); + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.EDIT = 1] = "EDIT"; + i[i.GENERATE = 2] = "GENERATE"; + i[i.INLINE_LONG_COMPLETION = 3] = "INLINE_LONG_COMPLETION"; + })(dbe ||= {}); + m.util.setEnumType(dbe, "aiserver.v1.FeatureType", [{ + no: 0, + name: "FEATURE_TYPE_UNSPECIFIED" + }, { + no: 1, + name: "FEATURE_TYPE_EDIT" + }, { + no: 2, + name: "FEATURE_TYPE_GENERATE" + }, { + no: 3, + name: "FEATURE_TYPE_INLINE_LONG_COMPLETION" + }]); + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.VOYAGE_CODE_2 = 1] = "VOYAGE_CODE_2"; + i[i.TEXT_EMBEDDINGS_LARGE_3 = 2] = "TEXT_EMBEDDINGS_LARGE_3"; + i[i.QWEN_1_5B_CUSTOM = 3] = "QWEN_1_5B_CUSTOM"; + })(Y4 ||= {}); + m.util.setEnumType(Y4, "aiserver.v1.EmbeddingModel", [{ + no: 0, + name: "EMBEDDING_MODEL_UNSPECIFIED" + }, { + no: 1, + name: "EMBEDDING_MODEL_VOYAGE_CODE_2" + }, { + no: 2, + name: "EMBEDDING_MODEL_TEXT_EMBEDDINGS_LARGE_3" + }, { + no: 3, + name: "EMBEDDING_MODEL_QWEN_1_5B_CUSTOM" + }]); + sv = class XLe extends N { + constructor(e) { + super(); + this.line = 0; + this.column = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CursorPosition"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "line", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "column", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new XLe().fromBinary(e, t); + } + static fromJson(e, t) { + return new XLe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new XLe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(XLe, e, t); + } + }; + hut = class QLe extends N { + constructor(e) { + super(); + this.workspaceUris = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.EnvironmentInfo"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "exthost_platform", + kind: "scalar", + T: 9, + opt: true + }, { + no: 2, + name: "exthost_arch", + kind: "scalar", + T: 9, + opt: true + }, { + no: 3, + name: "exthost_release", + kind: "scalar", + T: 9, + opt: true + }, { + no: 4, + name: "exthost_shell", + kind: "scalar", + T: 9, + opt: true + }, { + no: 5, + name: "local_timestamp", + kind: "scalar", + T: 9, + opt: true + }, { + no: 6, + name: "workspace_uris", + kind: "scalar", + T: 9, + repeated: true + }]); + } + static fromBinary(e, t) { + return new QLe().fromBinary(e, t); + } + static fromJson(e, t) { + return new QLe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new QLe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(QLe, e, t); + } + }; + Whs = class ZLe extends N { + constructor(e) { + super(); + this.selectionStartLineNumber = 0; + this.selectionStartColumn = 0; + this.positionLineNumber = 0; + this.positionColumn = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SelectionWithOrientation"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "selection_start_line_number", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "selection_start_column", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "position_line_number", + kind: "scalar", + T: 5 + }, { + no: 4, + name: "position_column", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new ZLe().fromBinary(e, t); + } + static fromJson(e, t) { + return new ZLe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new ZLe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(ZLe, e, t); + } + }; + uHt = class eRe extends N { + constructor(e) { + super(); + this.cwd = ""; + this.ref = ""; + this.baseRef = ""; + this.mergeBase = false; + this.targetPaths = []; + this.maxUntrackedFiles = 0; + this.submoduleRecurseDepth = 0; + this.includeSpaceChanges = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetDiffRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "cwd", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "ref", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "base_ref", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "merge_base", + kind: "scalar", + T: 8 + }, { + no: 5, + name: "target_paths", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 6, + name: "unified_context_lines", + kind: "scalar", + T: 5, + opt: true + }, { + no: 7, + name: "max_untracked_files", + kind: "scalar", + T: 5 + }, { + no: 9, + name: "submodule_recurse_depth", + kind: "scalar", + T: 5 + }, { + no: 10, + name: "include_space_changes", + kind: "scalar", + T: 8 + }, { + no: 8, + name: "output_format", + kind: "enum", + T: m.getEnumType(hbe), + opt: true + }]); + } + static fromBinary(e, t) { + return new eRe().fromBinary(e, t); + } + static fromJson(e, t) { + return new eRe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new eRe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(eRe, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.NAME_STATUS = 1] = "NAME_STATUS"; + i[i.NAME_STATUS_AND_NUMSTAT = 2] = "NAME_STATUS_AND_NUMSTAT"; + i[i.FILE_DIFFS = 3] = "FILE_DIFFS"; + })(hbe ||= {}); + m.util.setEnumType(hbe, "aiserver.v1.GetDiffRequest.OutputFormat", [{ + no: 0, + name: "OUTPUT_FORMAT_UNSPECIFIED" + }, { + no: 1, + name: "OUTPUT_FORMAT_NAME_STATUS" + }, { + no: 2, + name: "OUTPUT_FORMAT_NAME_STATUS_AND_NUMSTAT" + }, { + no: 3, + name: "OUTPUT_FORMAT_FILE_DIFFS" + }]); + Vhs = class tRe extends N { + constructor(e) { + super(); + this.submoduleDiffs = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetDiffResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "diff", + kind: "message", + T: Sb + }, { + no: 2, + name: "submodule_diffs", + kind: "message", + T: Hhs, + repeated: true + }]); + } + static fromBinary(e, t) { + return new tRe().fromBinary(e, t); + } + static fromJson(e, t) { + return new tRe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new tRe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(tRe, e, t); + } + }; + Hhs = class iRe extends N { + constructor(e) { + super(); + this.relativePath = ""; + this.errored = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetDiffResponse.SubmoduleDiff"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "diff", + kind: "message", + T: Sb + }, { + no: 3, + name: "errored", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new iRe().fromBinary(e, t); + } + static fromJson(e, t) { + return new iRe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new iRe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(iRe, e, t); + } + }; + QI = class sRe extends N { + constructor(e) { + super(); + this.startLine = 0; + this.endLineInclusive = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SimplestRange"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "start_line", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "end_line_inclusive", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new sRe().fromBinary(e, t); + } + static fromJson(e, t) { + return new sRe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new sRe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(sRe, e, t); + } + }; + dHt = class nRe extends N { + constructor(e) { + super(); + this.original = []; + this.modified = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ComputeLinesDiffOriginalAndModified"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "original", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 2, + name: "modified", + kind: "scalar", + T: 9, + repeated: true + }]); + } + static fromBinary(e, t) { + return new nRe().fromBinary(e, t); + } + static fromJson(e, t) { + return new nRe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new nRe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(nRe, e, t); + } + }; + Sb = class rRe extends N { + constructor(e) { + super(); + this.diffs = []; + this.diffType = ZI.UNSPECIFIED; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GitDiff"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "diffs", + kind: "message", + T: X4, + repeated: true + }, { + no: 2, + name: "diff_type", + kind: "enum", + T: m.getEnumType(ZI) + }]); + } + static fromBinary(e, t) { + return new rRe().fromBinary(e, t); + } + static fromJson(e, t) { + return new rRe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new rRe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(rRe, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.DIFF_TO_HEAD = 1] = "DIFF_TO_HEAD"; + i[i.DIFF_FROM_BRANCH_TO_MAIN = 2] = "DIFF_FROM_BRANCH_TO_MAIN"; + })(ZI ||= {}); + m.util.setEnumType(ZI, "aiserver.v1.GitDiff.DiffType", [{ + no: 0, + name: "DIFF_TYPE_UNSPECIFIED" + }, { + no: 1, + name: "DIFF_TYPE_DIFF_TO_HEAD" + }, { + no: 2, + name: "DIFF_TYPE_DIFF_FROM_BRANCH_TO_MAIN" + }]); + X4 = class oRe extends N { + constructor(e) { + super(); + this.added = 0; + this.removed = 0; + this.from = ""; + this.to = ""; + this.chunks = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.FileDiff"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 4, + name: "added", + kind: "scalar", + T: 5 + }, { + no: 5, + name: "removed", + kind: "scalar", + T: 5 + }, { + no: 1, + name: "from", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "to", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "chunks", + kind: "message", + T: fbe, + repeated: true + }]); + } + static fromBinary(e, t) { + return new oRe().fromBinary(e, t); + } + static fromJson(e, t) { + return new oRe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new oRe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(oRe, e, t); + } + }; + fbe = class aRe extends N { + constructor(e) { + super(); + this.content = ""; + this.lines = []; + this.oldStart = 0; + this.oldLines = 0; + this.newStart = 0; + this.newLines = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.FileDiff.Chunk"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "content", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "lines", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 3, + name: "old_start", + kind: "scalar", + T: 5 + }, { + no: 4, + name: "old_lines", + kind: "scalar", + T: 5 + }, { + no: 5, + name: "new_start", + kind: "scalar", + T: 5 + }, { + no: 6, + name: "new_lines", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new aRe().fromBinary(e, t); + } + static fromJson(e, t) { + return new aRe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new aRe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(aRe, e, t); + } + }; + Of = class lRe extends N { + constructor(e) { + super(); + this.startLineNumber = 0; + this.startColumn = 0; + this.endLineNumberInclusive = 0; + this.endColumn = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SimpleRange"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "start_line_number", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "start_column", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "end_line_number_inclusive", + kind: "scalar", + T: 5 + }, { + no: 4, + name: "end_column", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new lRe().fromBinary(e, t); + } + static fromJson(e, t) { + return new lRe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new lRe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(lRe, e, t); + } + }; + qhs = class cRe extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.chunkHash = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SimpleFileChunk"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "range", + kind: "message", + T: QI + }, { + no: 3, + name: "chunk_hash", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new cRe().fromBinary(e, t); + } + static fromJson(e, t) { + return new cRe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new cRe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(cRe, e, t); + } + }; + KT = class uRe extends N { + constructor(e) { + super(); + this.remoteUrl = ""; + this.commitId = ""; + this.gitPatch = ""; + this.unsavedFiles = []; + this.unixTimestampMs = 0; + this.openEditors = []; + this.fileDiffHistories = []; + this.branchName = ""; + this.branchNotes = ""; + this.branchNotesRich = ""; + this.globalNotes = ""; + this.pastThoughts = []; + this.baseBranchName = ""; + this.baseBranchCommitId = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CmdKDebugInfo"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "remote_url", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "commit_id", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "git_patch", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "unsaved_files", + kind: "message", + T: jhs, + repeated: true + }, { + no: 5, + name: "unix_timestamp_ms", + kind: "scalar", + T: 1 + }, { + no: 6, + name: "open_editors", + kind: "message", + T: zhs, + repeated: true + }, { + no: 7, + name: "file_diff_histories", + kind: "message", + T: Jhs, + repeated: true + }, { + no: 8, + name: "branch_name", + kind: "scalar", + T: 9 + }, { + no: 9, + name: "branch_notes", + kind: "scalar", + T: 9 + }, { + no: 12, + name: "branch_notes_rich", + kind: "scalar", + T: 9 + }, { + no: 10, + name: "global_notes", + kind: "scalar", + T: 9 + }, { + no: 11, + name: "past_thoughts", + kind: "message", + T: Ghs, + repeated: true + }, { + no: 13, + name: "base_branch_name", + kind: "scalar", + T: 9 + }, { + no: 14, + name: "base_branch_commit_id", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new uRe().fromBinary(e, t); + } + static fromJson(e, t) { + return new uRe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new uRe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(uRe, e, t); + } + }; + jhs = class dRe extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.contents = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CmdKDebugInfo.UnsavedFiles"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "contents", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new dRe().fromBinary(e, t); + } + static fromJson(e, t) { + return new dRe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new dRe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(dRe, e, t); + } + }; + zhs = class hRe extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.editorGroupIndex = 0; + this.editorGroupId = 0; + this.isActive = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CmdKDebugInfo.OpenEditor"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "editor_group_index", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "editor_group_id", + kind: "scalar", + T: 5 + }, { + no: 4, + name: "is_active", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new hRe().fromBinary(e, t); + } + static fromJson(e, t) { + return new hRe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new hRe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(hRe, e, t); + } + }; + Jhs = class fRe extends N { + constructor(e) { + super(); + this.fileName = ""; + this.diffHistory = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CmdKDebugInfo.CppFileDiffHistory"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "file_name", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "diff_history", + kind: "scalar", + T: 9, + repeated: true + }]); + } + static fromBinary(e, t) { + return new fRe().fromBinary(e, t); + } + static fromJson(e, t) { + return new fRe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new fRe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(fRe, e, t); + } + }; + Ghs = class gRe extends N { + constructor(e) { + super(); + this.text = ""; + this.timeInUnixSeconds = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CmdKDebugInfo.PastThought"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "text", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "time_in_unix_seconds", + kind: "scalar", + T: 1 + }]); + } + static fromBinary(e, t) { + return new gRe().fromBinary(e, t); + } + static fromJson(e, t) { + return new gRe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new gRe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(gRe, e, t); + } + }; + Kv = class pRe extends N { + constructor(e) { + super(); + this.startLineNumber = 0; + this.endLineNumberInclusive = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.LineRange"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "start_line_number", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "end_line_number_inclusive", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new pRe().fromBinary(e, t); + } + static fromJson(e, t) { + return new pRe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new pRe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(pRe, e, t); + } + }; + eD = class mRe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CursorRange"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "start_position", + kind: "message", + T: sv + }, { + no: 2, + name: "end_position", + kind: "message", + T: sv + }]); + } + static fromBinary(e, t) { + return new mRe().fromBinary(e, t); + } + static fromJson(e, t) { + return new mRe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new mRe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(mRe, e, t); + } + }; + fut = class bRe extends N { + constructor(e) { + super(); + this.text = ""; + this.lineNumber = 0; + this.isSignature = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.DetailedLine"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "text", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "line_number", + kind: "scalar", + T: 2 + }, { + no: 3, + name: "is_signature", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new bRe().fromBinary(e, t); + } + static fromJson(e, t) { + return new bRe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new bRe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(bRe, e, t); + } + }; + Xg = class vRe extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.contents = ""; + this.detailedLines = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CodeBlock"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "file_contents", + kind: "scalar", + T: 9, + opt: true + }, { + no: 9, + name: "file_contents_length", + kind: "scalar", + T: 5, + opt: true + }, { + no: 3, + name: "range", + kind: "message", + T: eD + }, { + no: 4, + name: "contents", + kind: "scalar", + T: 9 + }, { + no: 5, + name: "signatures", + kind: "message", + T: Khs + }, { + no: 6, + name: "override_contents", + kind: "scalar", + T: 9, + opt: true + }, { + no: 7, + name: "original_contents", + kind: "scalar", + T: 9, + opt: true + }, { + no: 8, + name: "detailed_lines", + kind: "message", + T: fut, + repeated: true + }]); + } + static fromBinary(e, t) { + return new vRe().fromBinary(e, t); + } + static fromJson(e, t) { + return new vRe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new vRe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(vRe, e, t); + } + }; + Khs = class yRe extends N { + constructor(e) { + super(); + this.ranges = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CodeBlock.Signatures"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "ranges", + kind: "message", + T: eD, + repeated: true + }]); + } + static fromBinary(e, t) { + return new yRe().fromBinary(e, t); + } + static fromJson(e, t) { + return new yRe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new yRe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(yRe, e, t); + } + }; + $x = class wRe extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.contents = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.File"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "contents", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new wRe().fromBinary(e, t); + } + static fromJson(e, t) { + return new wRe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new wRe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(wRe, e, t); + } + }; + hHt = class CRe extends N { + constructor(e) { + super(); + this.message = ""; + this.severity = cR.UNSPECIFIED; + this.relatedInformation = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.Diagnostic"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "message", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "range", + kind: "message", + T: eD + }, { + no: 3, + name: "severity", + kind: "enum", + T: m.getEnumType(cR) + }, { + no: 4, + name: "related_information", + kind: "message", + T: gut, + repeated: true + }]); + } + static fromBinary(e, t) { + return new CRe().fromBinary(e, t); + } + static fromJson(e, t) { + return new CRe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new CRe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(CRe, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.ERROR = 1] = "ERROR"; + i[i.WARNING = 2] = "WARNING"; + i[i.INFORMATION = 3] = "INFORMATION"; + i[i.HINT = 4] = "HINT"; + })(cR ||= {}); + m.util.setEnumType(cR, "aiserver.v1.Diagnostic.DiagnosticSeverity", [{ + no: 0, + name: "DIAGNOSTIC_SEVERITY_UNSPECIFIED" + }, { + no: 1, + name: "DIAGNOSTIC_SEVERITY_ERROR" + }, { + no: 2, + name: "DIAGNOSTIC_SEVERITY_WARNING" + }, { + no: 3, + name: "DIAGNOSTIC_SEVERITY_INFORMATION" + }, { + no: 4, + name: "DIAGNOSTIC_SEVERITY_HINT" + }]); + gut = class SRe extends N { + constructor(e) { + super(); + this.message = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.Diagnostic.RelatedInformation"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "message", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "range", + kind: "message", + T: eD + }]); + } + static fromBinary(e, t) { + return new SRe().fromBinary(e, t); + } + static fromJson(e, t) { + return new SRe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new SRe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(SRe, e, t); + } + }; + Yhs = class xRe extends N { + constructor(e) { + super(); + this.message = ""; + this.severity = GT.UNSPECIFIED; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.Lint"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "message", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "range", + kind: "message", + T: Of + }, { + no: 3, + name: "severity", + kind: "enum", + T: m.getEnumType(GT) + }]); + } + static fromBinary(e, t) { + return new xRe().fromBinary(e, t); + } + static fromJson(e, t) { + return new xRe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new xRe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(xRe, e, t); + } + }; + Xhs = class kRe extends N { + constructor(e) { + super(); + this.content = ""; + this.score = 0; + this.relativePath = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.BM25Chunk"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "content", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "range", + kind: "message", + T: QI + }, { + no: 3, + name: "score", + kind: "scalar", + T: 5 + }, { + no: 4, + name: "relative_path", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new kRe().fromBinary(e, t); + } + static fromJson(e, t) { + return new kRe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new kRe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(kRe, e, t); + } + }; + tu = class ERe extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.contents = ""; + this.relyOnFilesync = false; + this.cells = []; + this.topChunks = []; + this.contentsStartAtLine = 0; + this.dataframes = []; + this.totalNumberOfLines = 0; + this.languageId = ""; + this.diagnostics = []; + this.cellStartLines = []; + this.workspaceRootPath = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CurrentFileInfo"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "contents", + kind: "scalar", + T: 9 + }, { + no: 18, + name: "rely_on_filesync", + kind: "scalar", + T: 8 + }, { + no: 17, + name: "sha_256_hash", + kind: "scalar", + T: 9, + opt: true + }, { + no: 16, + name: "cells", + kind: "message", + T: Qhs, + repeated: true + }, { + no: 10, + name: "top_chunks", + kind: "message", + T: Xhs, + repeated: true + }, { + no: 9, + name: "contents_start_at_line", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "cursor_position", + kind: "message", + T: sv + }, { + no: 4, + name: "dataframes", + kind: "message", + T: put, + repeated: true + }, { + no: 8, + name: "total_number_of_lines", + kind: "scalar", + T: 5 + }, { + no: 5, + name: "language_id", + kind: "scalar", + T: 9 + }, { + no: 6, + name: "selection", + kind: "message", + T: eD + }, { + no: 11, + name: "alternative_version_id", + kind: "scalar", + T: 5, + opt: true + }, { + no: 7, + name: "diagnostics", + kind: "message", + T: hHt, + repeated: true + }, { + no: 14, + name: "file_version", + kind: "scalar", + T: 5, + opt: true + }, { + no: 15, + name: "cell_start_lines", + kind: "scalar", + T: 5, + repeated: true + }, { + no: 19, + name: "workspace_root_path", + kind: "scalar", + T: 9 + }, { + no: 20, + name: "line_ending", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new ERe().fromBinary(e, t); + } + static fromJson(e, t) { + return new ERe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new ERe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(ERe, e, t); + } + }; + Qhs = class IRe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CurrentFileInfo.NotebookCell"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new IRe().fromBinary(e, t); + } + static fromJson(e, t) { + return new IRe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new IRe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(IRe, e, t); + } + }; + Zhs = class DRe extends N { + constructor(e) { + super(); + this.apiKey = ""; + this.baseUrl = ""; + this.deployment = ""; + this.useAzure = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.AzureState"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "api_key", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "base_url", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "deployment", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "use_azure", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new DRe().fromBinary(e, t); + } + static fromJson(e, t) { + return new DRe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new DRe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(DRe, e, t); + } + }; + efs = class TRe extends N { + constructor(e) { + super(); + this.accessKey = ""; + this.secretKey = ""; + this.region = ""; + this.useBedrock = false; + this.sessionToken = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.BedrockState"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "access_key", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "secret_key", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "region", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "use_bedrock", + kind: "scalar", + T: 8 + }, { + no: 5, + name: "session_token", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new TRe().fromBinary(e, t); + } + static fromJson(e, t) { + return new TRe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new TRe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(TRe, e, t); + } + }; + Qa = class PRe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ModelDetails"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "model_name", + kind: "scalar", + T: 9, + opt: true + }, { + no: 2, + name: "api_key", + kind: "scalar", + T: 9, + opt: true + }, { + no: 3, + name: "enable_ghost_mode", + kind: "scalar", + T: 8, + opt: true + }, { + no: 4, + name: "azure_state", + kind: "message", + T: Zhs, + opt: true + }, { + no: 5, + name: "enable_slow_pool", + kind: "scalar", + T: 8, + opt: true + }, { + no: 6, + name: "openai_api_base_url", + kind: "scalar", + T: 9, + opt: true + }, { + no: 7, + name: "bedrock_state", + kind: "message", + T: efs, + opt: true + }, { + no: 8, + name: "max_mode", + kind: "scalar", + T: 8, + opt: true + }]); + } + static fromBinary(e, t) { + return new PRe().fromBinary(e, t); + } + static fromJson(e, t) { + return new PRe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new PRe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(PRe, e, t); + } + }; + put = class LRe extends N { + constructor(e) { + super(); + this.name = ""; + this.shape = ""; + this.dataDimensionality = 0; + this.columns = []; + this.rowCount = 0; + this.indexColumn = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.DataframeInfo"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "name", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "shape", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "data_dimensionality", + kind: "scalar", + T: 5 + }, { + no: 6, + name: "columns", + kind: "message", + T: fHt, + repeated: true + }, { + no: 7, + name: "row_count", + kind: "scalar", + T: 5 + }, { + no: 8, + name: "index_column", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new LRe().fromBinary(e, t); + } + static fromJson(e, t) { + return new LRe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new LRe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(LRe, e, t); + } + }; + fHt = class RRe extends N { + constructor(e) { + super(); + this.key = ""; + this.type = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.DataframeInfo.Column"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "key", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "type", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new RRe().fromBinary(e, t); + } + static fromJson(e, t) { + return new RRe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new RRe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(RRe, e, t); + } + }; + YT = class NRe extends N { + constructor(e) { + super(); + this.message = ""; + this.relatedInformation = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.LinterError"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "message", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "range", + kind: "message", + T: eD + }, { + no: 3, + name: "source", + kind: "scalar", + T: 9, + opt: true + }, { + no: 4, + name: "related_information", + kind: "message", + T: gut, + repeated: true + }, { + no: 5, + name: "severity", + kind: "enum", + T: m.getEnumType(cR), + opt: true + }]); + } + static fromBinary(e, t) { + return new NRe().fromBinary(e, t); + } + static fromJson(e, t) { + return new NRe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new NRe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(NRe, e, t); + } + }; + xp = class MRe extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.errors = []; + this.fileContents = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.LinterErrors"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "errors", + kind: "message", + T: YT, + repeated: true + }, { + no: 3, + name: "file_contents", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new MRe().fromBinary(e, t); + } + static fromJson(e, t) { + return new MRe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new MRe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(MRe, e, t); + } + }; + tfs = class ARe extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.errors = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.LinterErrorsWithoutFileContents"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "errors", + kind: "message", + T: YT, + repeated: true + }]); + } + static fromBinary(e, t) { + return new ARe().fromBinary(e, t); + } + static fromJson(e, t) { + return new ARe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new ARe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(ARe, e, t); + } + }; + XT = class $Re extends N { + constructor(e) { + super(); + this.name = ""; + this.description = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CursorRule"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "name", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "description", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "body", + kind: "scalar", + T: 9, + opt: true + }, { + no: 4, + name: "is_from_glob", + kind: "scalar", + T: 8, + opt: true + }, { + no: 5, + name: "always_apply", + kind: "scalar", + T: 8, + opt: true + }]); + } + static fromBinary(e, t) { + return new $Re().fromBinary(e, t); + } + static fromJson(e, t) { + return new $Re().fromJson(e, t); + } + static fromJsonString(e, t) { + return new $Re().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals($Re, e, t); + } + }; + gHt = class FRe extends N { + constructor(e) { + super(); + this.rootPath = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ProjectLayout"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "root_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "content", + kind: "message", + T: gbe + }]); + } + static fromBinary(e, t) { + return new FRe().fromBinary(e, t); + } + static fromJson(e, t) { + return new FRe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new FRe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(FRe, e, t); + } + }; + gbe = class ORe extends N { + constructor(e) { + super(); + this.directories = []; + this.files = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ProjectLayoutDirectoryContent"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "directories", + kind: "message", + T: pHt, + repeated: true + }, { + no: 2, + name: "files", + kind: "message", + T: mHt, + repeated: true + }]); + } + static fromBinary(e, t) { + return new ORe().fromBinary(e, t); + } + static fromJson(e, t) { + return new ORe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new ORe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(ORe, e, t); + } + }; + pHt = class _Re extends N { + constructor(e) { + super(); + this.name = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ProjectLayoutDirectory"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "name", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "content", + kind: "message", + T: gbe + }]); + } + static fromBinary(e, t) { + return new _Re().fromBinary(e, t); + } + static fromJson(e, t) { + return new _Re().fromJson(e, t); + } + static fromJsonString(e, t) { + return new _Re().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(_Re, e, t); + } + }; + mHt = class BRe extends N { + constructor(e) { + super(); + this.name = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ProjectLayoutFile"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "name", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new BRe().fromBinary(e, t); + } + static fromJson(e, t) { + return new BRe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new BRe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(BRe, e, t); + } + }; + Qg = class URe extends N { + constructor(e) { + super(); + this.context = ""; + this.rules = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ExplicitContext"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "context", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "repo_context", + kind: "scalar", + T: 9, + opt: true + }, { + no: 3, + name: "rules", + kind: "message", + T: XT, + repeated: true + }, { + no: 4, + name: "mode_specific_context", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new URe().fromBinary(e, t); + } + static fromJson(e, t) { + return new URe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new URe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(URe, e, t); + } + }; + Oie = class WRe extends N { + constructor(e) { + super(); + this.messageType = pbe.UNSPECIFIED; + this.content = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.PureMessage"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "message_type", + kind: "enum", + T: m.getEnumType(pbe) + }, { + no: 2, + name: "content", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new WRe().fromBinary(e, t); + } + static fromJson(e, t) { + return new WRe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new WRe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(WRe, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.SYSTEM = 1] = "SYSTEM"; + i[i.USER = 2] = "USER"; + i[i.ASSISTANT = 3] = "ASSISTANT"; + })(pbe ||= {}); + m.util.setEnumType(pbe, "aiserver.v1.PureMessage.MessageType", [{ + no: 0, + name: "MESSAGE_TYPE_UNSPECIFIED" + }, { + no: 1, + name: "MESSAGE_TYPE_SYSTEM" + }, { + no: 2, + name: "MESSAGE_TYPE_USER" + }, { + no: 3, + name: "MESSAGE_TYPE_ASSISTANT" + }]); + mbe = class Wde extends N { + constructor(e) { + super(); + this.name = ""; + this.detail = ""; + this.kind = bbe.UNSPECIFIED; + this.containerName = ""; + this.children = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.DocumentSymbol"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "name", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "detail", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "kind", + kind: "enum", + T: m.getEnumType(bbe) + }, { + no: 5, + name: "container_name", + kind: "scalar", + T: 9 + }, { + no: 6, + name: "range", + kind: "message", + T: bHt + }, { + no: 7, + name: "selection_range", + kind: "message", + T: bHt + }, { + no: 8, + name: "children", + kind: "message", + T: Wde, + repeated: true + }]); + } + static fromBinary(e, t) { + return new Wde().fromBinary(e, t); + } + static fromJson(e, t) { + return new Wde().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Wde().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Wde, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.FILE = 1] = "FILE"; + i[i.MODULE = 2] = "MODULE"; + i[i.NAMESPACE = 3] = "NAMESPACE"; + i[i.PACKAGE = 4] = "PACKAGE"; + i[i.CLASS = 5] = "CLASS"; + i[i.METHOD = 6] = "METHOD"; + i[i.PROPERTY = 7] = "PROPERTY"; + i[i.FIELD = 8] = "FIELD"; + i[i.CONSTRUCTOR = 9] = "CONSTRUCTOR"; + i[i.ENUM = 10] = "ENUM"; + i[i.INTERFACE = 11] = "INTERFACE"; + i[i.FUNCTION = 12] = "FUNCTION"; + i[i.VARIABLE = 13] = "VARIABLE"; + i[i.CONSTANT = 14] = "CONSTANT"; + i[i.STRING = 15] = "STRING"; + i[i.NUMBER = 16] = "NUMBER"; + i[i.BOOLEAN = 17] = "BOOLEAN"; + i[i.ARRAY = 18] = "ARRAY"; + i[i.OBJECT = 19] = "OBJECT"; + i[i.KEY = 20] = "KEY"; + i[i.NULL = 21] = "NULL"; + i[i.ENUM_MEMBER = 22] = "ENUM_MEMBER"; + i[i.STRUCT = 23] = "STRUCT"; + i[i.EVENT = 24] = "EVENT"; + i[i.OPERATOR = 25] = "OPERATOR"; + i[i.TYPE_PARAMETER = 26] = "TYPE_PARAMETER"; + })(bbe ||= {}); + m.util.setEnumType(bbe, "aiserver.v1.DocumentSymbol.SymbolKind", [{ + no: 0, + name: "SYMBOL_KIND_UNSPECIFIED" + }, { + no: 1, + name: "SYMBOL_KIND_FILE" + }, { + no: 2, + name: "SYMBOL_KIND_MODULE" + }, { + no: 3, + name: "SYMBOL_KIND_NAMESPACE" + }, { + no: 4, + name: "SYMBOL_KIND_PACKAGE" + }, { + no: 5, + name: "SYMBOL_KIND_CLASS" + }, { + no: 6, + name: "SYMBOL_KIND_METHOD" + }, { + no: 7, + name: "SYMBOL_KIND_PROPERTY" + }, { + no: 8, + name: "SYMBOL_KIND_FIELD" + }, { + no: 9, + name: "SYMBOL_KIND_CONSTRUCTOR" + }, { + no: 10, + name: "SYMBOL_KIND_ENUM" + }, { + no: 11, + name: "SYMBOL_KIND_INTERFACE" + }, { + no: 12, + name: "SYMBOL_KIND_FUNCTION" + }, { + no: 13, + name: "SYMBOL_KIND_VARIABLE" + }, { + no: 14, + name: "SYMBOL_KIND_CONSTANT" + }, { + no: 15, + name: "SYMBOL_KIND_STRING" + }, { + no: 16, + name: "SYMBOL_KIND_NUMBER" + }, { + no: 17, + name: "SYMBOL_KIND_BOOLEAN" + }, { + no: 18, + name: "SYMBOL_KIND_ARRAY" + }, { + no: 19, + name: "SYMBOL_KIND_OBJECT" + }, { + no: 20, + name: "SYMBOL_KIND_KEY" + }, { + no: 21, + name: "SYMBOL_KIND_NULL" + }, { + no: 22, + name: "SYMBOL_KIND_ENUM_MEMBER" + }, { + no: 23, + name: "SYMBOL_KIND_STRUCT" + }, { + no: 24, + name: "SYMBOL_KIND_EVENT" + }, { + no: 25, + name: "SYMBOL_KIND_OPERATOR" + }, { + no: 26, + name: "SYMBOL_KIND_TYPE_PARAMETER" + }]); + bHt = class VRe extends N { + constructor(e) { + super(); + this.startLineNumber = 0; + this.startColumn = 0; + this.endLineNumber = 0; + this.endColumn = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.DocumentSymbol.Range"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "start_line_number", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "start_column", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "end_line_number", + kind: "scalar", + T: 5 + }, { + no: 4, + name: "end_column", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new VRe().fromBinary(e, t); + } + static fromJson(e, t) { + return new VRe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new VRe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(VRe, e, t); + } + }; + vHt = class HRe extends N { + constructor(e) { + super(); + this.codeDetails = ""; + this.markdownBlocks = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.HoverDetails"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "code_details", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "markdown_blocks", + kind: "scalar", + T: 9, + repeated: true + }]); + } + static fromBinary(e, t) { + return new HRe().fromBinary(e, t); + } + static fromJson(e, t) { + return new HRe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new HRe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(HRe, e, t); + } + }; + ifs = class qRe extends N { + constructor(e) { + super(); + this.scheme = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.UriComponents"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "scheme", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "authority", + kind: "scalar", + T: 9, + opt: true + }, { + no: 3, + name: "path", + kind: "scalar", + T: 9, + opt: true + }, { + no: 4, + name: "query", + kind: "scalar", + T: 9, + opt: true + }, { + no: 5, + name: "fragment", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new qRe().fromBinary(e, t); + } + static fromJson(e, t) { + return new qRe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new qRe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(qRe, e, t); + } + }; + vbe = class jRe extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.textInSymbolRange = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.DocumentSymbolWithText"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "symbol", + kind: "message", + T: mbe + }, { + no: 2, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "text_in_symbol_range", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "uri_components", + kind: "message", + T: ifs + }]); + } + static fromBinary(e, t) { + return new jRe().fromBinary(e, t); + } + static fromJson(e, t) { + return new jRe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new jRe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(jRe, e, t); + } + }; + QM = class zRe extends N { + constructor(e) { + super(); + this.error = yo.UNSPECIFIED; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ErrorDetails"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "error", + kind: "enum", + T: m.getEnumType(yo) + }, { + no: 2, + name: "details", + kind: "message", + T: yHt + }, { + no: 3, + name: "is_expected", + kind: "scalar", + T: 8, + opt: true + }]); + } + static fromBinary(e, t) { + return new zRe().fromBinary(e, t); + } + static fromJson(e, t) { + return new zRe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new zRe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(zRe, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.BAD_API_KEY = 1] = "BAD_API_KEY"; + i[i.BAD_USER_API_KEY = 42] = "BAD_USER_API_KEY"; + i[i.NOT_LOGGED_IN = 2] = "NOT_LOGGED_IN"; + i[i.INVALID_AUTH_ID = 3] = "INVALID_AUTH_ID"; + i[i.NOT_HIGH_ENOUGH_PERMISSIONS = 4] = "NOT_HIGH_ENOUGH_PERMISSIONS"; + i[i.AGENT_REQUIRES_LOGIN = 18] = "AGENT_REQUIRES_LOGIN"; + i[i.BAD_MODEL_NAME = 5] = "BAD_MODEL_NAME"; + i[i.NOT_FOUND = 39] = "NOT_FOUND"; + i[i.DEPRECATED = 40] = "DEPRECATED"; + i[i.USER_NOT_FOUND = 6] = "USER_NOT_FOUND"; + i[i.FREE_USER_RATE_LIMIT_EXCEEDED = 7] = "FREE_USER_RATE_LIMIT_EXCEEDED"; + i[i.PRO_USER_RATE_LIMIT_EXCEEDED = 8] = "PRO_USER_RATE_LIMIT_EXCEEDED"; + i[i.FREE_USER_USAGE_LIMIT = 9] = "FREE_USER_USAGE_LIMIT"; + i[i.PRO_USER_USAGE_LIMIT = 10] = "PRO_USER_USAGE_LIMIT"; + i[i.RESOURCE_EXHAUSTED = 41] = "RESOURCE_EXHAUSTED"; + i[i.AUTH_TOKEN_NOT_FOUND = 11] = "AUTH_TOKEN_NOT_FOUND"; + i[i.AUTH_TOKEN_EXPIRED = 12] = "AUTH_TOKEN_EXPIRED"; + i[i.OPENAI = 13] = "OPENAI"; + i[i.OPENAI_RATE_LIMIT_EXCEEDED = 14] = "OPENAI_RATE_LIMIT_EXCEEDED"; + i[i.OPENAI_ACCOUNT_LIMIT_EXCEEDED = 15] = "OPENAI_ACCOUNT_LIMIT_EXCEEDED"; + i[i.TASK_UUID_NOT_FOUND = 16] = "TASK_UUID_NOT_FOUND"; + i[i.TASK_NO_PERMISSIONS = 17] = "TASK_NO_PERMISSIONS"; + i[i.AGENT_ENGINE_NOT_FOUND = 19] = "AGENT_ENGINE_NOT_FOUND"; + i[i.MAX_TOKENS = 20] = "MAX_TOKENS"; + i[i.PRO_USER_ONLY = 23] = "PRO_USER_ONLY"; + i[i.API_KEY_NOT_SUPPORTED = 24] = "API_KEY_NOT_SUPPORTED"; + i[i.USER_ABORTED_REQUEST = 21] = "USER_ABORTED_REQUEST"; + i[i.TIMEOUT = 25] = "TIMEOUT"; + i[i.GENERIC_RATE_LIMIT_EXCEEDED = 22] = "GENERIC_RATE_LIMIT_EXCEEDED"; + i[i.SLASH_EDIT_FILE_TOO_LONG = 26] = "SLASH_EDIT_FILE_TOO_LONG"; + i[i.FILE_UNSUPPORTED = 27] = "FILE_UNSUPPORTED"; + i[i.GPT_4_VISION_PREVIEW_RATE_LIMIT = 28] = "GPT_4_VISION_PREVIEW_RATE_LIMIT"; + i[i.CUSTOM_MESSAGE = 29] = "CUSTOM_MESSAGE"; + i[i.OUTDATED_CLIENT = 30] = "OUTDATED_CLIENT"; + i[i.CLAUDE_IMAGE_TOO_LARGE = 31] = "CLAUDE_IMAGE_TOO_LARGE"; + i[i.GITGRAPH_NOT_FOUND = 32] = "GITGRAPH_NOT_FOUND"; + i[i.FILE_NOT_FOUND = 33] = "FILE_NOT_FOUND"; + i[i.API_KEY_RATE_LIMIT = 34] = "API_KEY_RATE_LIMIT"; + i[i.DEBOUNCED = 35] = "DEBOUNCED"; + i[i.BAD_REQUEST = 36] = "BAD_REQUEST"; + i[i.REPOSITORY_SERVICE_REPOSITORY_IS_NOT_INITIALIZED = 37] = "REPOSITORY_SERVICE_REPOSITORY_IS_NOT_INITIALIZED"; + i[i.UNAUTHORIZED = 38] = "UNAUTHORIZED"; + i[i.CONVERSATION_TOO_LONG = 43] = "CONVERSATION_TOO_LONG"; + i[i.USAGE_PRICING_REQUIRED = 44] = "USAGE_PRICING_REQUIRED"; + i[i.USAGE_PRICING_REQUIRED_CHANGEABLE = 45] = "USAGE_PRICING_REQUIRED_CHANGEABLE"; + i[i.GITHUB_NO_USER_CREDENTIALS = 46] = "GITHUB_NO_USER_CREDENTIALS"; + i[i.GITHUB_USER_NO_ACCESS = 47] = "GITHUB_USER_NO_ACCESS"; + i[i.GITHUB_APP_NO_ACCESS = 48] = "GITHUB_APP_NO_ACCESS"; + i[i.GITHUB_MULTIPLE_OWNERS = 49] = "GITHUB_MULTIPLE_OWNERS"; + })(yo ||= {}); + m.util.setEnumType(yo, "aiserver.v1.ErrorDetails.Error", [{ + no: 0, + name: "ERROR_UNSPECIFIED" + }, { + no: 1, + name: "ERROR_BAD_API_KEY" + }, { + no: 42, + name: "ERROR_BAD_USER_API_KEY" + }, { + no: 2, + name: "ERROR_NOT_LOGGED_IN" + }, { + no: 3, + name: "ERROR_INVALID_AUTH_ID" + }, { + no: 4, + name: "ERROR_NOT_HIGH_ENOUGH_PERMISSIONS" + }, { + no: 18, + name: "ERROR_AGENT_REQUIRES_LOGIN" + }, { + no: 5, + name: "ERROR_BAD_MODEL_NAME" + }, { + no: 39, + name: "ERROR_NOT_FOUND" + }, { + no: 40, + name: "ERROR_DEPRECATED" + }, { + no: 6, + name: "ERROR_USER_NOT_FOUND" + }, { + no: 7, + name: "ERROR_FREE_USER_RATE_LIMIT_EXCEEDED" + }, { + no: 8, + name: "ERROR_PRO_USER_RATE_LIMIT_EXCEEDED" + }, { + no: 9, + name: "ERROR_FREE_USER_USAGE_LIMIT" + }, { + no: 10, + name: "ERROR_PRO_USER_USAGE_LIMIT" + }, { + no: 41, + name: "ERROR_RESOURCE_EXHAUSTED" + }, { + no: 11, + name: "ERROR_AUTH_TOKEN_NOT_FOUND" + }, { + no: 12, + name: "ERROR_AUTH_TOKEN_EXPIRED" + }, { + no: 13, + name: "ERROR_OPENAI" + }, { + no: 14, + name: "ERROR_OPENAI_RATE_LIMIT_EXCEEDED" + }, { + no: 15, + name: "ERROR_OPENAI_ACCOUNT_LIMIT_EXCEEDED" + }, { + no: 16, + name: "ERROR_TASK_UUID_NOT_FOUND" + }, { + no: 17, + name: "ERROR_TASK_NO_PERMISSIONS" + }, { + no: 19, + name: "ERROR_AGENT_ENGINE_NOT_FOUND" + }, { + no: 20, + name: "ERROR_MAX_TOKENS" + }, { + no: 23, + name: "ERROR_PRO_USER_ONLY" + }, { + no: 24, + name: "ERROR_API_KEY_NOT_SUPPORTED" + }, { + no: 21, + name: "ERROR_USER_ABORTED_REQUEST" + }, { + no: 25, + name: "ERROR_TIMEOUT" + }, { + no: 22, + name: "ERROR_GENERIC_RATE_LIMIT_EXCEEDED" + }, { + no: 26, + name: "ERROR_SLASH_EDIT_FILE_TOO_LONG" + }, { + no: 27, + name: "ERROR_FILE_UNSUPPORTED" + }, { + no: 28, + name: "ERROR_GPT_4_VISION_PREVIEW_RATE_LIMIT" + }, { + no: 29, + name: "ERROR_CUSTOM_MESSAGE" + }, { + no: 30, + name: "ERROR_OUTDATED_CLIENT" + }, { + no: 31, + name: "ERROR_CLAUDE_IMAGE_TOO_LARGE" + }, { + no: 32, + name: "ERROR_GITGRAPH_NOT_FOUND" + }, { + no: 33, + name: "ERROR_FILE_NOT_FOUND" + }, { + no: 34, + name: "ERROR_API_KEY_RATE_LIMIT" + }, { + no: 35, + name: "ERROR_DEBOUNCED" + }, { + no: 36, + name: "ERROR_BAD_REQUEST" + }, { + no: 37, + name: "ERROR_REPOSITORY_SERVICE_REPOSITORY_IS_NOT_INITIALIZED" + }, { + no: 38, + name: "ERROR_UNAUTHORIZED" + }, { + no: 43, + name: "ERROR_CONVERSATION_TOO_LONG" + }, { + no: 44, + name: "ERROR_USAGE_PRICING_REQUIRED" + }, { + no: 45, + name: "ERROR_USAGE_PRICING_REQUIRED_CHANGEABLE" + }, { + no: 46, + name: "ERROR_GITHUB_NO_USER_CREDENTIALS" + }, { + no: 47, + name: "ERROR_GITHUB_USER_NO_ACCESS" + }, { + no: 48, + name: "ERROR_GITHUB_APP_NO_ACCESS" + }, { + no: 49, + name: "ERROR_GITHUB_MULTIPLE_OWNERS" + }]); + yHt = class JRe extends N { + constructor(e) { + super(); + this.title = ""; + this.detail = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CustomErrorDetails"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "title", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "detail", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "allow_command_links_potentially_unsafe_please_only_use_for_handwritten_trusted_markdown", + kind: "scalar", + T: 8, + opt: true + }, { + no: 4, + name: "is_retryable", + kind: "scalar", + T: 8, + opt: true + }, { + no: 5, + name: "show_request_id", + kind: "scalar", + T: 8, + opt: true + }, { + no: 6, + name: "should_show_immediate_error", + kind: "scalar", + T: 8, + opt: true + }]); + } + static fromBinary(e, t) { + return new JRe().fromBinary(e, t); + } + static fromJson(e, t) { + return new JRe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new JRe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(JRe, e, t); + } + }; + tD = class GRe extends N { + constructor(e) { + super(); + this.data = new Uint8Array(0); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ImageProto"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "data", + kind: "scalar", + T: 12 + }, { + no: 2, + name: "dimension", + kind: "message", + T: sfs + }]); + } + static fromBinary(e, t) { + return new GRe().fromBinary(e, t); + } + static fromJson(e, t) { + return new GRe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new GRe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(GRe, e, t); + } + }; + sfs = class KRe extends N { + constructor(e) { + super(); + this.width = 0; + this.height = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ImageProto.Dimension"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "width", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "height", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new KRe().fromBinary(e, t); + } + static fromJson(e, t) { + return new KRe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new KRe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(KRe, e, t); + } + }; + ybe = class YRe extends N { + constructor(e) { + super(); + this.markdown = ""; + this.bubbleId = ""; + this.sectionIndex = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ChatQuote"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "markdown", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "bubble_id", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "section_index", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new YRe().fromBinary(e, t); + } + static fromJson(e, t) { + return new YRe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new YRe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(YRe, e, t); + } + }; + nfs = class XRe extends N { + constructor(e) { + super(); + this.url = ""; + this.uuid = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ChatExternalLink"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "url", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "uuid", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new XRe().fromBinary(e, t); + } + static fromJson(e, t) { + return new XRe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new XRe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(XRe, e, t); + } + }; + Oz = class QRe extends N { + constructor(e) { + super(); + this.url = ""; + this.uuid = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ComposerExternalLink"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "url", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "uuid", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new QRe().fromBinary(e, t); + } + static fromJson(e, t) { + return new QRe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new QRe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(QRe, e, t); + } + }; + mut = class ZRe extends N { + constructor(e) { + super(); + this.url = ""; + this.uuid = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CmdKExternalLink"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "url", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "uuid", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new ZRe().fromBinary(e, t); + } + static fromJson(e, t) { + return new ZRe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new ZRe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(ZRe, e, t); + } + }; + but = class eNe extends N { + constructor(e) { + super(); + this.note = ""; + this.commitHash = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CommitNote"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "note", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "commit_hash", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new eNe().fromBinary(e, t); + } + static fromJson(e, t) { + return new eNe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new eNe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(eNe, e, t); + } + }; + rfs = class tNe extends N { + constructor(e) { + super(); + this.note = ""; + this.commitHash = ""; + this.embeddings = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CommitNoteWithEmbeddings"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "note", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "commit_hash", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "embeddings", + kind: "scalar", + T: 1, + repeated: true + }]); + } + static fromBinary(e, t) { + return new tNe().fromBinary(e, t); + } + static fromJson(e, t) { + return new tNe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new tNe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(tNe, e, t); + } + }; + ofs = class iNe extends N { + constructor(e) { + super(); + this.diff = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CommitDiffString"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "diff", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new iNe().fromBinary(e, t); + } + static fromJson(e, t) { + return new iNe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new iNe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(iNe, e, t); + } + }; + ker = class sNe extends N { + constructor(e) { + super(); + this.notes = []; + this.commitHash = ""; + this.repoUrl = ""; + this.filesChangedRelativePath = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.FullCommitNotes"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "notes", + kind: "message", + T: but, + repeated: true + }, { + no: 2, + name: "commit_hash", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "repo_url", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "files_changed_relative_path", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new sNe().fromBinary(e, t); + } + static fromJson(e, t) { + return new sNe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new sNe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(sNe, e, t); + } + }; + afs = class nNe extends N { + constructor(e) { + super(); + this.key = ""; + this.value = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CrossExtHostHeader"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "key", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "value", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new nNe().fromBinary(e, t); + } + static fromJson(e, t) { + return new nNe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new nNe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(nNe, e, t); + } + }; + wHt = class rNe extends N { + constructor(e) { + super(); + this.headers = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CrossExtHostHeaders"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "headers", + kind: "message", + T: afs, + repeated: true + }]); + } + static fromBinary(e, t) { + return new rNe().fromBinary(e, t); + } + static fromJson(e, t) { + return new rNe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new rNe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(rNe, e, t); + } + }; + CHt = class oNe extends N { + constructor(e) { + super(); + this.message = new Uint8Array(0); + this.isError = false; + this.connectError = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SimpleUnaryCrossExtensionHostMessage"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "message", + kind: "scalar", + T: 12 + }, { + no: 2, + name: "header", + kind: "message", + T: wHt + }, { + no: 3, + name: "trailer", + kind: "message", + T: wHt + }, { + no: 4, + name: "is_error", + kind: "scalar", + T: 8 + }, { + no: 5, + name: "connect_error", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new oNe().fromBinary(e, t); + } + static fromJson(e, t) { + return new oNe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new oNe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(oNe, e, t); + } + }; + SHt = class aNe extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.startLineNumber = 0; + this.lines = []; + this.languageIdentifier = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CodeChunk"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "start_line_number", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "lines", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 4, + name: "summarization_strategy", + kind: "enum", + T: m.getEnumType(yut), + opt: true + }, { + no: 5, + name: "language_identifier", + kind: "scalar", + T: 9 + }, { + no: 6, + name: "intent", + kind: "enum", + T: m.getEnumType(vut), + opt: true + }, { + no: 7, + name: "is_final_version", + kind: "scalar", + T: 8, + opt: true + }, { + no: 8, + name: "is_first_version", + kind: "scalar", + T: 8, + opt: true + }]); + } + static fromBinary(e, t) { + return new aNe().fromBinary(e, t); + } + static fromJson(e, t) { + return new aNe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new aNe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(aNe, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.COMPOSER_FILE = 1] = "COMPOSER_FILE"; + i[i.COMPRESSED_COMPOSER_FILE = 2] = "COMPRESSED_COMPOSER_FILE"; + })(vut ||= {}); + m.util.setEnumType(vut, "aiserver.v1.CodeChunk.Intent", [{ + no: 0, + name: "INTENT_UNSPECIFIED" + }, { + no: 1, + name: "INTENT_COMPOSER_FILE" + }, { + no: 2, + name: "INTENT_COMPRESSED_COMPOSER_FILE" + }]); + (function (i) { + i[i.NONE_UNSPECIFIED = 0] = "NONE_UNSPECIFIED"; + i[i.SUMMARIZED = 1] = "SUMMARIZED"; + i[i.EMBEDDED = 2] = "EMBEDDED"; + })(yut ||= {}); + m.util.setEnumType(yut, "aiserver.v1.CodeChunk.SummarizationStrategy", [{ + no: 0, + name: "SUMMARIZATION_STRATEGY_NONE_UNSPECIFIED" + }, { + no: 1, + name: "SUMMARIZATION_STRATEGY_SUMMARIZED" + }, { + no: 2, + name: "SUMMARIZATION_STRATEGY_EMBEDDED" + }]); + lfs = class lNe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RCPCallFrame"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "function_name", + kind: "scalar", + T: 9, + opt: true + }, { + no: 2, + name: "url", + kind: "scalar", + T: 9, + opt: true + }, { + no: 3, + name: "line_number", + kind: "scalar", + T: 5, + opt: true + }, { + no: 4, + name: "column_number", + kind: "scalar", + T: 5, + opt: true + }]); + } + static fromBinary(e, t) { + return new lNe().fromBinary(e, t); + } + static fromJson(e, t) { + return new lNe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new lNe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(lNe, e, t); + } + }; + cfs = class cNe extends N { + constructor(e) { + super(); + this.callFrames = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RCPStackTrace"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "call_frames", + kind: "message", + T: lfs, + repeated: true + }, { + no: 2, + name: "raw_stack_trace", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new cNe().fromBinary(e, t); + } + static fromJson(e, t) { + return new cNe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new cNe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(cNe, e, t); + } + }; + xHt = class uNe extends N { + constructor(e) { + super(); + this.message = ""; + this.timestamp = 0; + this.level = ""; + this.clientName = ""; + this.sessionId = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RCPLogEntry"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "message", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "timestamp", + kind: "scalar", + T: 1 + }, { + no: 3, + name: "level", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "client_name", + kind: "scalar", + T: 9 + }, { + no: 5, + name: "session_id", + kind: "scalar", + T: 9 + }, { + no: 6, + name: "stack_trace", + kind: "message", + T: cfs, + opt: true + }, { + no: 7, + name: "object_data_json", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new uNe().fromBinary(e, t); + } + static fromJson(e, t) { + return new uNe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new uNe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(uNe, e, t); + } + }; + wut = class dNe extends N { + constructor(e) { + super(); + this.element = ""; + this.xpath = ""; + this.textContent = ""; + this.extra = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RCPUIElementPicked"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "element", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "xpath", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "text_content", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "extra", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new dNe().fromBinary(e, t); + } + static fromJson(e, t) { + return new dNe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new dNe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(dNe, e, t); + } + }; + ufs = class hNe extends N { + constructor(e) { + super(); + this.text = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RCPChatMessage"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "text", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new hNe().fromBinary(e, t); + } + static fromJson(e, t) { + return new hNe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new hNe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(hNe, e, t); + } + }; + Eer = class fNe extends N { + constructor(e) { + super(); + this.message = { + case: undefined + }; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RCPMessage"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "console", + kind: "message", + T: xHt, + oneof: "message" + }, { + no: 2, + name: "ui_element_picked", + kind: "message", + T: wut, + oneof: "message" + }, { + no: 3, + name: "chat_message", + kind: "message", + T: ufs, + oneof: "message" + }]); + } + static fromBinary(e, t) { + return new fNe().fromBinary(e, t); + } + static fromJson(e, t) { + return new fNe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new fNe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(fNe, e, t); + } + }; + } +}); +var kHt; +var dfs; +var EHt; +var hfs; +var Cut; +var ffs; +var gfs; +var pfs; +var mfs; +var bfs; +var vfs; +var wbe; +var yfs; +var IHt; +var wfs; +var DHt; +var Cfs; +var Cbe; +var Sfs; +var THt; +var xfs; +var PHt; +var kfs; +var LHt; +var Efs; +var Sbe; +var Ifs; +var Dfs; +var Tfs; +var Sut; +var Pfs; +var RHt; +var NHt; +var MHt; +var AHt; +var $Ht; +var Lfs; +var Rfs; +var FHt; +var xut; +var _ie; +var kut; +var xbe; +var Q4; +var Bie = ue({ + "out-build/proto/aiserver/v1/symbolic_context_pb.js"() { + "use strict"; + + Hr(); + Wo(); + kHt = class gNe extends N { + constructor(e) { + super(); + this.files = []; + this.targetDir = ""; + this.repo = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CreateExperimentalIndexRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "files", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 2, + name: "target_dir", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "repo", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new gNe().fromBinary(e, t); + } + static fromJson(e, t) { + return new gNe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new gNe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(gNe, e, t); + } + }; + dfs = class pNe extends N { + constructor(e) { + super(); + this.indexId = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CreateExperimentalIndexResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "index_id", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new pNe().fromBinary(e, t); + } + static fromJson(e, t) { + return new pNe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new pNe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(pNe, e, t); + } + }; + EHt = class mNe extends N { + constructor(e) { + super(); + this.indexId = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ListExperimentalIndexFilesRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "index_id", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new mNe().fromBinary(e, t); + } + static fromJson(e, t) { + return new mNe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new mNe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(mNe, e, t); + } + }; + hfs = class bNe extends N { + constructor(e) { + super(); + this.indexId = ""; + this.files = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ListExperimentalIndexFilesResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "index_id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "files", + kind: "message", + T: RHt, + repeated: true + }]); + } + static fromBinary(e, t) { + return new bNe().fromBinary(e, t); + } + static fromJson(e, t) { + return new bNe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new bNe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(bNe, e, t); + } + }; + Cut = class vNe extends N { + constructor(e) { + super(); + this.indexId = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ListenExperimentalIndexRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "index_id", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new vNe().fromBinary(e, t); + } + static fromJson(e, t) { + return new vNe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new vNe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(vNe, e, t); + } + }; + ffs = class yNe extends N { + constructor(e) { + super(); + this.indexId = ""; + this.item = { + case: undefined + }; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ListenExperimentalIndexResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "index_id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "ready", + kind: "message", + T: gfs, + oneof: "item" + }, { + no: 3, + name: "register", + kind: "message", + T: pfs, + oneof: "item" + }, { + no: 4, + name: "choose", + kind: "message", + T: mfs, + oneof: "item" + }, { + no: 5, + name: "summarize", + kind: "message", + T: bfs, + oneof: "item" + }, { + no: 6, + name: "error", + kind: "message", + T: vfs, + oneof: "item" + }]); + } + static fromBinary(e, t) { + return new yNe().fromBinary(e, t); + } + static fromJson(e, t) { + return new yNe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new yNe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(yNe, e, t); + } + }; + gfs = class wNe extends N { + constructor(e) { + super(); + this.indexId = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ListenExperimentalIndexResponse.ReadyItem"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "index_id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "request", + kind: "message", + T: Cut + }]); + } + static fromBinary(e, t) { + return new wNe().fromBinary(e, t); + } + static fromJson(e, t) { + return new wNe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new wNe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(wNe, e, t); + } + }; + pfs = class CNe extends N { + constructor(e) { + super(); + this.reqUuid = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ListenExperimentalIndexResponse.RegisterItem"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "response", + kind: "message", + T: yfs + }, { + no: 2, + name: "request", + kind: "message", + T: wbe + }, { + no: 3, + name: "req_uuid", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new CNe().fromBinary(e, t); + } + static fromJson(e, t) { + return new CNe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new CNe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(CNe, e, t); + } + }; + mfs = class SNe extends N { + constructor(e) { + super(); + this.reqUuid = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ListenExperimentalIndexResponse.ChooseItem"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "response", + kind: "message", + T: xfs + }, { + no: 2, + name: "request", + kind: "message", + T: Cbe + }, { + no: 3, + name: "req_uuid", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new SNe().fromBinary(e, t); + } + static fromJson(e, t) { + return new SNe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new SNe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(SNe, e, t); + } + }; + bfs = class xNe extends N { + constructor(e) { + super(); + this.reqUuid = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ListenExperimentalIndexResponse.SummarizeItem"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "response", + kind: "message", + T: Ifs + }, { + no: 2, + name: "request", + kind: "message", + T: Sbe + }, { + no: 3, + name: "req_uuid", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new xNe().fromBinary(e, t); + } + static fromJson(e, t) { + return new xNe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new xNe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(xNe, e, t); + } + }; + vfs = class kNe extends N { + constructor(e) { + super(); + this.message = ""; + this.statusCode = 0; + this.request = { + case: undefined + }; + this.reqUuid = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ListenExperimentalIndexResponse.ErrorItem"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "message", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "status_code", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "register", + kind: "message", + T: wbe, + oneof: "request" + }, { + no: 4, + name: "choose", + kind: "message", + T: Cbe, + oneof: "request" + }, { + no: 5, + name: "summarize", + kind: "message", + T: Sbe, + oneof: "request" + }, { + no: 6, + name: "req_uuid", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new kNe().fromBinary(e, t); + } + static fromJson(e, t) { + return new kNe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new kNe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(kNe, e, t); + } + }; + wbe = class ENe extends N { + constructor(e) { + super(); + this.indexId = ""; + this.workspaceRelativePath = ""; + this.content = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RegisterFileToIndexRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "index_id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "workspace_relative_path", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "root_context_node", + kind: "message", + T: MHt + }, { + no: 4, + name: "content", + kind: "scalar", + T: 9, + repeated: true + }]); + } + static fromBinary(e, t) { + return new ENe().fromBinary(e, t); + } + static fromJson(e, t) { + return new ENe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new ENe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(ENe, e, t); + } + }; + yfs = class INe extends N { + constructor(e) { + super(); + this.fileId = ""; + this.rootContextNodeId = ""; + this.dependencyResolutionAttempts = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RegisterFileToIndexResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "file_id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "root_context_node_id", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "dependency_resolution_attempts", + kind: "message", + T: AHt, + repeated: true + }, { + no: 4, + name: "file_data", + kind: "message", + T: RHt + }]); + } + static fromBinary(e, t) { + return new INe().fromBinary(e, t); + } + static fromJson(e, t) { + return new INe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new INe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(INe, e, t); + } + }; + IHt = class DNe extends N { + constructor(e) { + super(); + this.indexId = ""; + this.fileId = ""; + this.dependencyResolutionResults = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SetupIndexDependenciesRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "index_id", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "file_id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "dependency_resolution_results", + kind: "message", + T: $Ht, + repeated: true + }]); + } + static fromBinary(e, t) { + return new DNe().fromBinary(e, t); + } + static fromJson(e, t) { + return new DNe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new DNe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(DNe, e, t); + } + }; + wfs = class TNe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SetupIndexDependenciesResponse"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new TNe().fromBinary(e, t); + } + static fromJson(e, t) { + return new TNe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new TNe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(TNe, e, t); + } + }; + DHt = class PNe extends N { + constructor(e) { + super(); + this.indexId = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ComputeIndexTopoSortRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "index_id", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new PNe().fromBinary(e, t); + } + static fromJson(e, t) { + return new PNe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new PNe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(PNe, e, t); + } + }; + Cfs = class LNe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ComputeIndexTopoSortResponse"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new LNe().fromBinary(e, t); + } + static fromJson(e, t) { + return new LNe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new LNe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(LNe, e, t); + } + }; + Cbe = class RNe extends N { + constructor(e) { + super(); + this.indexId = ""; + this.request = { + case: undefined + }; + this.recompute = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ChooseCodeReferencesRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "index_id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "file", + kind: "message", + T: Sfs, + oneof: "request" + }, { + no: 3, + name: "node", + kind: "message", + T: THt, + oneof: "request" + }, { + no: 4, + name: "recompute", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new RNe().fromBinary(e, t); + } + static fromJson(e, t) { + return new RNe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new RNe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(RNe, e, t); + } + }; + Sfs = class NNe extends N { + constructor(e) { + super(); + this.fileId = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ChooseCodeReferencesRequest.FileRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "file_id", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new NNe().fromBinary(e, t); + } + static fromJson(e, t) { + return new NNe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new NNe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(NNe, e, t); + } + }; + THt = class MNe extends N { + constructor(e) { + super(); + this.nodeId = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ChooseCodeReferencesRequest.NodeRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "node_id", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new MNe().fromBinary(e, t); + } + static fromJson(e, t) { + return new MNe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new MNe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(MNe, e, t); + } + }; + xfs = class ANe extends N { + constructor(e) { + super(); + this.response = { + case: undefined + }; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ChooseCodeReferencesResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "file", + kind: "message", + T: kfs, + oneof: "response" + }, { + no: 2, + name: "node", + kind: "message", + T: PHt, + oneof: "response" + }]); + } + static fromBinary(e, t) { + return new ANe().fromBinary(e, t); + } + static fromJson(e, t) { + return new ANe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new ANe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(ANe, e, t); + } + }; + PHt = class $Ne extends N { + constructor(e) { + super(); + this.nodeId = ""; + this.actions = []; + this.skipped = false; + this.dependencies = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ChooseCodeReferencesResponse.NodeResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "node_id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "actions", + kind: "message", + T: xbe, + repeated: true + }, { + no: 3, + name: "skipped", + kind: "scalar", + T: 8 + }, { + no: 4, + name: "dependencies", + kind: "scalar", + T: 9, + repeated: true + }]); + } + static fromBinary(e, t) { + return new $Ne().fromBinary(e, t); + } + static fromJson(e, t) { + return new $Ne().fromJson(e, t); + } + static fromJsonString(e, t) { + return new $Ne().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals($Ne, e, t); + } + }; + kfs = class FNe extends N { + constructor(e) { + super(); + this.fileId = ""; + this.nodeResponses = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ChooseCodeReferencesResponse.FileResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "file_id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "node_responses", + kind: "message", + T: PHt, + repeated: true + }]); + } + static fromBinary(e, t) { + return new FNe().fromBinary(e, t); + } + static fromJson(e, t) { + return new FNe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new FNe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(FNe, e, t); + } + }; + LHt = class ONe extends N { + constructor(e) { + super(); + this.nodeId = ""; + this.references = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RegisterCodeReferencesRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "node_id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "references", + kind: "message", + T: FHt, + repeated: true + }]); + } + static fromBinary(e, t) { + return new ONe().fromBinary(e, t); + } + static fromJson(e, t) { + return new ONe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new ONe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(ONe, e, t); + } + }; + Efs = class _Ne extends N { + constructor(e) { + super(); + this.dependencies = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RegisterCodeReferencesResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "dependencies", + kind: "scalar", + T: 9, + repeated: true + }]); + } + static fromBinary(e, t) { + return new _Ne().fromBinary(e, t); + } + static fromJson(e, t) { + return new _Ne().fromJson(e, t); + } + static fromJsonString(e, t) { + return new _Ne().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(_Ne, e, t); + } + }; + Sbe = class BNe extends N { + constructor(e) { + super(); + this.indexId = ""; + this.nodeId = ""; + this.recompute = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SummarizeWithReferencesRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "index_id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "node_id", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "recompute", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new BNe().fromBinary(e, t); + } + static fromJson(e, t) { + return new BNe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new BNe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(BNe, e, t); + } + }; + Ifs = class UNe extends N { + constructor(e) { + super(); + this.response = { + case: undefined + }; + this.nodeId = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SummarizeWithReferencesResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "success", + kind: "message", + T: Dfs, + oneof: "response" + }, { + no: 2, + name: "dependency", + kind: "message", + T: Tfs, + oneof: "response" + }, { + no: 3, + name: "node_id", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new UNe().fromBinary(e, t); + } + static fromJson(e, t) { + return new UNe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new UNe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(UNe, e, t); + } + }; + Dfs = class WNe extends N { + constructor(e) { + super(); + this.summary = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SummarizeWithReferencesResponse.Success"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "summary", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new WNe().fromBinary(e, t); + } + static fromJson(e, t) { + return new WNe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new WNe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(WNe, e, t); + } + }; + Tfs = class VNe extends N { + constructor(e) { + super(); + this.nodes = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SummarizeWithReferencesResponse.Dependency"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 2, + name: "nodes", + kind: "scalar", + T: 9, + repeated: true + }]); + } + static fromBinary(e, t) { + return new VNe().fromBinary(e, t); + } + static fromJson(e, t) { + return new VNe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new VNe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(VNe, e, t); + } + }; + Sut = class HNe extends N { + constructor(e) { + super(); + this.reqUuid = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RequestReceivedResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "req_uuid", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new HNe().fromBinary(e, t); + } + static fromJson(e, t) { + return new HNe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new HNe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(HNe, e, t); + } + }; + Pfs = class qNe extends N { + constructor(e) { + super(); + this.indexId = ""; + this.id = ""; + this.summary = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ReflectionData"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "index_id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "id", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "summary", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new qNe().fromBinary(e, t); + } + static fromJson(e, t) { + return new qNe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new qNe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(qNe, e, t); + } + }; + RHt = class jNe extends N { + constructor(e) { + super(); + this.indexId = ""; + this.workspaceRelativePath = ""; + this.stage = ""; + this.order = 0; + this.nodes = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.IndexFileData"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "index_id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "workspace_relative_path", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "stage", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "order", + kind: "scalar", + T: 5 + }, { + no: 5, + name: "nodes", + kind: "message", + T: NHt, + repeated: true + }]); + } + static fromBinary(e, t) { + return new jNe().fromBinary(e, t); + } + static fromJson(e, t) { + return new jNe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new jNe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(jNe, e, t); + } + }; + NHt = class zNe extends N { + constructor(e) { + super(); + this.nodeId = ""; + this.stage = ""; + this.content = ""; + this.summary = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.IndexFileData.NodeData"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "node_id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "stage", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "content", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "summary", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new zNe().fromBinary(e, t); + } + static fromJson(e, t) { + return new zNe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new zNe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(zNe, e, t); + } + }; + MHt = class Vde extends N { + constructor(e) { + super(); + this.workspaceRelativePath = ""; + this.startLineNumber = 0; + this.endLineNumber = 0; + this.children = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SerializedContextNode"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "workspace_relative_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "start_line_number", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "end_line_number", + kind: "scalar", + T: 5 + }, { + no: 4, + name: "children", + kind: "message", + T: Vde, + repeated: true + }, { + no: 5, + name: "node_snippets", + kind: "message", + T: _ie + }]); + } + static fromBinary(e, t) { + return new Vde().fromBinary(e, t); + } + static fromJson(e, t) { + return new Vde().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Vde().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Vde, e, t); + } + }; + AHt = class JNe extends N { + constructor(e) { + super(); + this.workspaceRelativePath = ""; + this.nodeId = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.URIResolutionAttempt"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "workspace_relative_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "node_id", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "symbol", + kind: "message", + T: xbe + }]); + } + static fromBinary(e, t) { + return new JNe().fromBinary(e, t); + } + static fromJson(e, t) { + return new JNe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new JNe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(JNe, e, t); + } + }; + $Ht = class GNe extends N { + constructor(e) { + super(); + this.resolvedPaths = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.URIResolutionResult"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "request", + kind: "message", + T: AHt + }, { + no: 2, + name: "resolved_paths", + kind: "scalar", + T: 9, + repeated: true + }]); + } + static fromBinary(e, t) { + return new GNe().fromBinary(e, t); + } + static fromJson(e, t) { + return new GNe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new GNe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(GNe, e, t); + } + }; + Lfs = class KNe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ExtractPathsRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "file_code_snippets", + kind: "message", + T: _ie + }]); + } + static fromBinary(e, t) { + return new KNe().fromBinary(e, t); + } + static fromJson(e, t) { + return new KNe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new KNe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(KNe, e, t); + } + }; + Rfs = class YNe extends N { + constructor(e) { + super(); + this.paths = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ExtractPathsResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "paths", + kind: "message", + T: xbe, + repeated: true + }]); + } + static fromBinary(e, t) { + return new YNe().fromBinary(e, t); + } + static fromJson(e, t) { + return new YNe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new YNe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(YNe, e, t); + } + }; + FHt = class XNe extends N { + constructor(e) { + super(); + this.references = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SymbolActionResults"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "action", + kind: "message", + T: xbe + }, { + no: 2, + name: "references", + kind: "message", + T: xut, + repeated: true + }]); + } + static fromBinary(e, t) { + return new XNe().fromBinary(e, t); + } + static fromJson(e, t) { + return new XNe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new XNe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(XNe, e, t); + } + }; + xut = class QNe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SymbolActionResultReference"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "range", + kind: "message", + T: Of + }, { + no: 2, + name: "reference", + kind: "message", + T: _ie + }]); + } + static fromBinary(e, t) { + return new QNe().fromBinary(e, t); + } + static fromJson(e, t) { + return new QNe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new QNe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(QNe, e, t); + } + }; + _ie = class ZNe extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.totalLines = 0; + this.snippets = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.FileCodeSnippets"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "total_lines", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "snippets", + kind: "message", + T: kut, + repeated: true + }]); + } + static fromBinary(e, t) { + return new ZNe().fromBinary(e, t); + } + static fromJson(e, t) { + return new ZNe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new ZNe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(ZNe, e, t); + } + }; + kut = class eMe extends N { + constructor(e) { + super(); + this.startLineNumber = 0; + this.endLineNumber = 0; + this.lines = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CodeSnippet"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "start_line_number", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "end_line_number", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "lines", + kind: "scalar", + T: 9, + repeated: true + }]); + } + static fromBinary(e, t) { + return new eMe().fromBinary(e, t); + } + static fromJson(e, t) { + return new eMe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new eMe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(eMe, e, t); + } + }; + xbe = class tMe extends N { + constructor(e) { + super(); + this.workspaceRelativePath = ""; + this.lineNumber = 0; + this.symbolStartColumn = 0; + this.symbolEndColumn = 0; + this.action = Q4.UNSPECIFIED; + this.symbol = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CodeSymbolWithAction"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "workspace_relative_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "line_number", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "symbol_start_column", + kind: "scalar", + T: 5 + }, { + no: 4, + name: "symbol_end_column", + kind: "scalar", + T: 5 + }, { + no: 5, + name: "action", + kind: "enum", + T: m.getEnumType(Q4) + }, { + no: 6, + name: "symbol", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new tMe().fromBinary(e, t); + } + static fromJson(e, t) { + return new tMe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new tMe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(tMe, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.GO_TO_DEFINITION = 1] = "GO_TO_DEFINITION"; + i[i.GO_TO_IMPLEMENTATION = 2] = "GO_TO_IMPLEMENTATION"; + i[i.REFERENCES = 3] = "REFERENCES"; + })(Q4 ||= {}); + m.util.setEnumType(Q4, "aiserver.v1.CodeSymbolWithAction.CodeSymbolAction", [{ + no: 0, + name: "CODE_SYMBOL_ACTION_UNSPECIFIED" + }, { + no: 1, + name: "CODE_SYMBOL_ACTION_GO_TO_DEFINITION" + }, { + no: 2, + name: "CODE_SYMBOL_ACTION_GO_TO_IMPLEMENTATION" + }, { + no: 3, + name: "CODE_SYMBOL_ACTION_REFERENCES" + }]); + } +}); +var Eut; +var _z; +var Bz; +var Uie; +var Iut; +var Nfs; +var Mfs; +var Afs; +var $fs; +var Ffs; +var Z4; +var Ofs; +var _fs; +var kbe; +var Bfs; +var Ufs; +var Wfs; +var Vfs; +var Ebe; +var Hfs; +var Ibe; +var qfs; +var Dbe; +var jfs; +var zfs; +var Jfs; +var Gfs; +var Kfs; +var OHt; +var Yfs; +var Xfs; +var Qfs; +var Zfs; +var Tbe; +var egs; +var tgs; +var Pbe; +var igs; +var Lbe; +var sgs; +var ngs; +var Rbe; +var rgs; +var ogs; +var ags; +var lgs; +var cgs; +var ugs; +var dgs; +var hgs; +var fgs; +var Ier; +var Der; +var Ter; +var Per; +var Ler; +var Rer; +var Nbe; +var Ner; +var Mer; +var Mbe; +var Aer; +var $er; +var Abe; +var Fer; +var Oer; +var $be; +var _er; +var Ber; +var Fbe; +var Uer; +var Wer; +var Obe; +var Ver; +var Her; +var qer; +var jer; +var _be; +var zer; +var Jer; +var Bbe; +var _Ht; +var ggs; +var Ube; +var Ger; +var Ker; +var Wbe; +var BHt; +var Uz; +var xb; +var Dut; +var UHt; +var WHt; +var VHt; +var pgs; +var HHt; +var mgs; +var Yer; +var Xer; +var Qer; +var Zer; +var etr; +var ttr; +var Vbe; +var itr; +var str; +var Hbe; +var ntr; +var rtr; +var otr; +var atr; +var qbe; +var bgs; +var vgs; +var ygs; +var wgs; +var Cgs; +var Sgs; +var xgs; +var kgs; +var Egs; +var Igs; +var qHt; +var pc; +var ltr; +var Dgs; +var Tgs; +var Pgs; +var Lgs; +var Rgs; +var Ngs; +var Mgs; +var jbe; +var Tut; +var cS = ue({ + "out-build/proto/aiserver/v1/repository_pb.js"() { + "use strict"; + + Hr(); + Wo(); + Bie(); + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.DEFAULT = 1] = "DEFAULT"; + })(Eut ||= {}); + m.util.setEnumType(Eut, "aiserver.v1.ChunkingStrategy", [{ + no: 0, + name: "CHUNKING_STRATEGY_UNSPECIFIED" + }, { + no: 1, + name: "CHUNKING_STRATEGY_DEFAULT" + }]); + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.SIMHASH = 1] = "SIMHASH"; + })(_z ||= {}); + m.util.setEnumType(_z, "aiserver.v1.SimilarityMetricType", [{ + no: 0, + name: "SIMILARITY_METRIC_TYPE_UNSPECIFIED" + }, { + no: 1, + name: "SIMILARITY_METRIC_TYPE_SIMHASH" + }]); + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.SHA256 = 1] = "SHA256"; + })(Bz ||= {}); + m.util.setEnumType(Bz, "aiserver.v1.PathKeyHashType", [{ + no: 0, + name: "PATH_KEY_HASH_TYPE_UNSPECIFIED" + }, { + no: 1, + name: "PATH_KEY_HASH_TYPE_SHA256" + }]); + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.LULEA = 1] = "LULEA"; + i[i.UMEA = 2] = "UMEA"; + i[i.NONE = 3] = "NONE"; + i[i.LLAMA = 4] = "LLAMA"; + i[i.STARCODER_V1 = 5] = "STARCODER_V1"; + i[i.GPT_3_5_LOGPROBS = 6] = "GPT_3_5_LOGPROBS"; + i[i.LULEA_HAIKU = 7] = "LULEA_HAIKU"; + i[i.COHERE = 8] = "COHERE"; + i[i.VOYAGE = 9] = "VOYAGE"; + i[i.VOYAGE_EMBEDS = 10] = "VOYAGE_EMBEDS"; + i[i.IDENTITY = 11] = "IDENTITY"; + i[i.ADA_EMBEDS = 12] = "ADA_EMBEDS"; + })(Uie ||= {}); + m.util.setEnumType(Uie, "aiserver.v1.RerankerAlgorithm", [{ + no: 0, + name: "RERANKER_ALGORITHM_UNSPECIFIED" + }, { + no: 1, + name: "RERANKER_ALGORITHM_LULEA" + }, { + no: 2, + name: "RERANKER_ALGORITHM_UMEA" + }, { + no: 3, + name: "RERANKER_ALGORITHM_NONE" + }, { + no: 4, + name: "RERANKER_ALGORITHM_LLAMA" + }, { + no: 5, + name: "RERANKER_ALGORITHM_STARCODER_V1" + }, { + no: 6, + name: "RERANKER_ALGORITHM_GPT_3_5_LOGPROBS" + }, { + no: 7, + name: "RERANKER_ALGORITHM_LULEA_HAIKU" + }, { + no: 8, + name: "RERANKER_ALGORITHM_COHERE" + }, { + no: 9, + name: "RERANKER_ALGORITHM_VOYAGE" + }, { + no: 10, + name: "RERANKER_ALGORITHM_VOYAGE_EMBEDS" + }, { + no: 11, + name: "RERANKER_ALGORITHM_IDENTITY" + }, { + no: 12, + name: "RERANKER_ALGORITHM_ADA_EMBEDS" + }]); + (function (i) { + i[i.RECHUNKER_CHOICE_UNSPECIFIED = 0] = "RECHUNKER_CHOICE_UNSPECIFIED"; + i[i.RECHUNKER_CHOICE_IDENTITY = 1] = "RECHUNKER_CHOICE_IDENTITY"; + i[i.RECHUNKER_CHOICE_600_TOKS = 2] = "RECHUNKER_CHOICE_600_TOKS"; + i[i.RECHUNKER_CHOICE_2400_TOKS = 3] = "RECHUNKER_CHOICE_2400_TOKS"; + i[i.RECHUNKER_CHOICE_4000_TOKS = 4] = "RECHUNKER_CHOICE_4000_TOKS"; + })(Iut ||= {}); + m.util.setEnumType(Iut, "aiserver.v1.RechunkerChoice", [{ + no: 0, + name: "RECHUNKER_CHOICE_UNSPECIFIED" + }, { + no: 1, + name: "RECHUNKER_CHOICE_IDENTITY" + }, { + no: 2, + name: "RECHUNKER_CHOICE_600_TOKS" + }, { + no: 3, + name: "RECHUNKER_CHOICE_2400_TOKS" + }, { + no: 4, + name: "RECHUNKER_CHOICE_4000_TOKS" + }]); + Nfs = class iMe extends N { + constructor(e) { + super(); + this.readmes = []; + this.topLevelRelativeWorkspacePaths = []; + this.workspaceRootPath = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetHighLevelFolderDescriptionRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "readmes", + kind: "message", + T: Mfs, + repeated: true + }, { + no: 2, + name: "top_level_relative_workspace_paths", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 4, + name: "workspace_root_path", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new iMe().fromBinary(e, t); + } + static fromJson(e, t) { + return new iMe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new iMe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(iMe, e, t); + } + }; + Mfs = class sMe extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.contents = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetHighLevelFolderDescriptionRequest.Readme"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "contents", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new sMe().fromBinary(e, t); + } + static fromJson(e, t) { + return new sMe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new sMe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(sMe, e, t); + } + }; + Afs = class nMe extends N { + constructor(e) { + super(); + this.description = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetHighLevelFolderDescriptionResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "description", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new nMe().fromBinary(e, t); + } + static fromJson(e, t) { + return new nMe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new nMe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(nMe, e, t); + } + }; + $fs = class rMe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.EnsureIndexCreatedRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "repository", + kind: "message", + T: pc + }]); + } + static fromBinary(e, t) { + return new rMe().fromBinary(e, t); + } + static fromJson(e, t) { + return new rMe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new rMe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(rMe, e, t); + } + }; + Ffs = class oMe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.EnsureIndexCreatedResponse"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new oMe().fromBinary(e, t); + } + static fromJson(e, t) { + return new oMe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new oMe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(oMe, e, t); + } + }; + Z4 = class aMe extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.hashOfNode = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.PartialPathItem"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "hash_of_node", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new aMe().fromBinary(e, t); + } + static fromJson(e, t) { + return new aMe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new aMe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(aMe, e, t); + } + }; + Ofs = class lMe extends N { + constructor(e) { + super(); + this.rootHash = ""; + this.potentialLegacyRepoName = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.FastRepoInitHandshakeRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "repository", + kind: "message", + T: pc + }, { + no: 2, + name: "root_hash", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "potential_legacy_repo_name", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new lMe().fromBinary(e, t); + } + static fromJson(e, t) { + return new lMe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new lMe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(lMe, e, t); + } + }; + _fs = class cMe extends N { + constructor(e) { + super(); + this.status = kbe.UNSPECIFIED; + this.repoName = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.FastRepoInitHandshakeResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "status", + kind: "enum", + T: m.getEnumType(kbe) + }, { + no: 2, + name: "repo_name", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new cMe().fromBinary(e, t); + } + static fromJson(e, t) { + return new cMe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new cMe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(cMe, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.UP_TO_DATE = 1] = "UP_TO_DATE"; + i[i.OUT_OF_SYNC = 2] = "OUT_OF_SYNC"; + i[i.FAILURE = 3] = "FAILURE"; + i[i.EMPTY = 4] = "EMPTY"; + })(kbe ||= {}); + m.util.setEnumType(kbe, "aiserver.v1.FastRepoInitHandshakeResponse.Status", [{ + no: 0, + name: "STATUS_UNSPECIFIED" + }, { + no: 1, + name: "STATUS_UP_TO_DATE" + }, { + no: 2, + name: "STATUS_OUT_OF_SYNC" + }, { + no: 3, + name: "STATUS_FAILURE" + }, { + no: 4, + name: "STATUS_EMPTY" + }]); + Bfs = class Hde extends N { + constructor(e) { + super(); + this.encryptedRelativePath = ""; + this.hash = ""; + this.children = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.LocalCodebaseFileInfo"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "encrypted_relative_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "hash", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "children", + kind: "message", + T: Hde, + repeated: true + }]); + } + static fromBinary(e, t) { + return new Hde().fromBinary(e, t); + } + static fromJson(e, t) { + return new Hde().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Hde().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Hde, e, t); + } + }; + Ufs = class uMe extends N { + constructor(e) { + super(); + this.rootHash = ""; + this.similarityMetricType = _z.UNSPECIFIED; + this.similarityMetric = []; + this.pathKeyHash = ""; + this.pathKeyHashType = Bz.UNSPECIFIED; + this.doCopy = false; + this.pathKey = ""; + this.returnAfterBackgroundCopyStarted = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.FastRepoInitHandshakeV2Request"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "repository", + kind: "message", + T: pc + }, { + no: 2, + name: "root_hash", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "similarity_metric_type", + kind: "enum", + T: m.getEnumType(_z) + }, { + no: 4, + name: "similarity_metric", + kind: "scalar", + T: 2, + repeated: true + }, { + no: 5, + name: "path_key_hash", + kind: "scalar", + T: 9 + }, { + no: 6, + name: "path_key_hash_type", + kind: "enum", + T: m.getEnumType(Bz) + }, { + no: 7, + name: "do_copy", + kind: "scalar", + T: 8 + }, { + no: 8, + name: "path_key", + kind: "scalar", + T: 9 + }, { + no: 9, + name: "local_codebase_root_info", + kind: "message", + T: Bfs + }, { + no: 10, + name: "return_after_background_copy_started", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new uMe().fromBinary(e, t); + } + static fromJson(e, t) { + return new uMe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new uMe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(uMe, e, t); + } + }; + Wfs = class dMe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.QueryOnlyRepositoryInfo"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "repository", + kind: "message", + T: pc + }, { + no: 2, + name: "query_only_repo_access", + kind: "message", + T: Uz + }]); + } + static fromBinary(e, t) { + return new dMe().fromBinary(e, t); + } + static fromJson(e, t) { + return new dMe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new dMe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(dMe, e, t); + } + }; + Vfs = class hMe extends N { + constructor(e) { + super(); + this.codebaseId = ""; + this.status = Ebe.UNSPECIFIED; + this.copyTaskHandle = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RepositoryCodebaseInfo"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "codebase_id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "status", + kind: "enum", + T: m.getEnumType(Ebe) + }, { + no: 3, + name: "query_only_similar_repo", + kind: "message", + T: Wfs + }, { + no: 4, + name: "copy_task_handle", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new hMe().fromBinary(e, t); + } + static fromJson(e, t) { + return new hMe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new hMe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(hMe, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.UP_TO_DATE = 1] = "UP_TO_DATE"; + i[i.OUT_OF_SYNC = 2] = "OUT_OF_SYNC"; + i[i.EMPTY = 3] = "EMPTY"; + i[i.EMPTY_WITH_COPY_AVAILABLE = 4] = "EMPTY_WITH_COPY_AVAILABLE"; + i[i.COPY_IN_PROGRESS = 5] = "COPY_IN_PROGRESS"; + })(Ebe ||= {}); + m.util.setEnumType(Ebe, "aiserver.v1.RepositoryCodebaseInfo.Status", [{ + no: 0, + name: "STATUS_UNSPECIFIED" + }, { + no: 1, + name: "STATUS_UP_TO_DATE" + }, { + no: 2, + name: "STATUS_OUT_OF_SYNC" + }, { + no: 3, + name: "STATUS_EMPTY" + }, { + no: 4, + name: "STATUS_EMPTY_WITH_COPY_AVAILABLE" + }, { + no: 5, + name: "STATUS_COPY_IN_PROGRESS" + }]); + Hfs = class fMe extends N { + constructor(e) { + super(); + this.status = Ibe.UNSPECIFIED; + this.codebases = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.FastRepoInitHandshakeV2Response"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "status", + kind: "enum", + T: m.getEnumType(Ibe) + }, { + no: 2, + name: "codebases", + kind: "message", + T: Vfs, + repeated: true + }]); + } + static fromBinary(e, t) { + return new fMe().fromBinary(e, t); + } + static fromJson(e, t) { + return new fMe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new fMe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(fMe, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.FAILURE = 1] = "FAILURE"; + i[i.SUCCESS = 2] = "SUCCESS"; + })(Ibe ||= {}); + m.util.setEnumType(Ibe, "aiserver.v1.FastRepoInitHandshakeV2Response.Status", [{ + no: 0, + name: "STATUS_UNSPECIFIED" + }, { + no: 1, + name: "STATUS_FAILURE" + }, { + no: 2, + name: "STATUS_SUCCESS" + }]); + qfs = class gMe extends N { + constructor(e) { + super(); + this.codebaseId = ""; + this.status = Dbe.UNSPECIFIED; + this.similarityMetricType = _z.UNSPECIFIED; + this.similarityMetric = []; + this.pathKeyHash = ""; + this.pathKeyHashType = Bz.UNSPECIFIED; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RepositoryCodebaseSyncStatus"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "codebase_id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "status", + kind: "enum", + T: m.getEnumType(Dbe) + }, { + no: 3, + name: "similarity_metric_type", + kind: "enum", + T: m.getEnumType(_z) + }, { + no: 4, + name: "similarity_metric", + kind: "scalar", + T: 2, + repeated: true + }, { + no: 5, + name: "path_key_hash", + kind: "scalar", + T: 9 + }, { + no: 6, + name: "path_key_hash_type", + kind: "enum", + T: m.getEnumType(Bz) + }]); + } + static fromBinary(e, t) { + return new gMe().fromBinary(e, t); + } + static fromJson(e, t) { + return new gMe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new gMe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(gMe, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.SUCCESS = 1] = "SUCCESS"; + i[i.FAILURE = 2] = "FAILURE"; + })(Dbe ||= {}); + m.util.setEnumType(Dbe, "aiserver.v1.RepositoryCodebaseSyncStatus.Status", [{ + no: 0, + name: "STATUS_UNSPECIFIED" + }, { + no: 1, + name: "STATUS_SUCCESS" + }, { + no: 2, + name: "STATUS_FAILURE" + }]); + jfs = class pMe extends N { + constructor(e) { + super(); + this.codebases = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.FastRepoSyncCompleteRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "codebases", + kind: "message", + T: qfs, + repeated: true + }]); + } + static fromBinary(e, t) { + return new pMe().fromBinary(e, t); + } + static fromJson(e, t) { + return new pMe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new pMe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(pMe, e, t); + } + }; + zfs = class mMe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.FastRepoSyncCompleteResponse"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new mMe().fromBinary(e, t); + } + static fromJson(e, t) { + return new mMe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new mMe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(mMe, e, t); + } + }; + Jfs = class bMe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SyncMerkleSubtreeRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "repository", + kind: "message", + T: pc + }, { + no: 2, + name: "local_partial_path", + kind: "message", + T: Z4 + }]); + } + static fromBinary(e, t) { + return new bMe().fromBinary(e, t); + } + static fromJson(e, t) { + return new bMe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new bMe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(bMe, e, t); + } + }; + Gfs = class vMe extends N { + constructor(e) { + super(); + this.result = { + case: undefined + }; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SyncMerkleSubtreeResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "match", + kind: "scalar", + T: 8, + oneof: "result" + }, { + no: 2, + name: "mismatch", + kind: "message", + T: Kfs, + oneof: "result" + }]); + } + static fromBinary(e, t) { + return new vMe().fromBinary(e, t); + } + static fromJson(e, t) { + return new vMe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new vMe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(vMe, e, t); + } + }; + Kfs = class yMe extends N { + constructor(e) { + super(); + this.children = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SyncMerkleSubtreeResponse.Mismatch"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "children", + kind: "message", + T: Z4, + repeated: true + }]); + } + static fromBinary(e, t) { + return new yMe().fromBinary(e, t); + } + static fromJson(e, t) { + return new yMe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new yMe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(yMe, e, t); + } + }; + OHt = class wMe extends N { + constructor(e) { + super(); + this.orthogonalTransformSeed = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ClientRepositoryInfo"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "orthogonal_transform_seed", + kind: "scalar", + T: 1 + }]); + } + static fromBinary(e, t) { + return new wMe().fromBinary(e, t); + } + static fromJson(e, t) { + return new wMe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new wMe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(wMe, e, t); + } + }; + Yfs = class CMe extends N { + constructor(e) { + super(); + this.codebaseId = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SyncMerkleSubtreeV2Request"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "client_repository_info", + kind: "message", + T: OHt + }, { + no: 2, + name: "codebase_id", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "local_partial_path", + kind: "message", + T: Z4 + }]); + } + static fromBinary(e, t) { + return new CMe().fromBinary(e, t); + } + static fromJson(e, t) { + return new CMe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new CMe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(CMe, e, t); + } + }; + Xfs = class SMe extends N { + constructor(e) { + super(); + this.result = { + case: undefined + }; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SyncMerkleSubtreeV2Response"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "match", + kind: "scalar", + T: 8, + oneof: "result" + }, { + no: 2, + name: "mismatch", + kind: "message", + T: Qfs, + oneof: "result" + }]); + } + static fromBinary(e, t) { + return new SMe().fromBinary(e, t); + } + static fromJson(e, t) { + return new SMe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new SMe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(SMe, e, t); + } + }; + Qfs = class xMe extends N { + constructor(e) { + super(); + this.children = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SyncMerkleSubtreeV2Response.Mismatch"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "children", + kind: "message", + T: Z4, + repeated: true + }]); + } + static fromBinary(e, t) { + return new xMe().fromBinary(e, t); + } + static fromJson(e, t) { + return new xMe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new xMe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(xMe, e, t); + } + }; + Zfs = class kMe extends N { + constructor(e) { + super(); + this.partialPath = { + case: undefined + }; + this.ancestorSpline = []; + this.updateType = Tbe.UNSPECIFIED; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.FastUpdateFileRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "repository", + kind: "message", + T: pc + }, { + no: 2, + name: "directory", + kind: "message", + T: Z4, + oneof: "partial_path" + }, { + no: 3, + name: "local_file", + kind: "message", + T: egs, + oneof: "partial_path" + }, { + no: 4, + name: "ancestor_spline", + kind: "message", + T: Z4, + repeated: true + }, { + no: 5, + name: "update_type", + kind: "enum", + T: m.getEnumType(Tbe) + }]); + } + static fromBinary(e, t) { + return new kMe().fromBinary(e, t); + } + static fromJson(e, t) { + return new kMe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new kMe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(kMe, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.ADD = 1] = "ADD"; + i[i.DELETE = 2] = "DELETE"; + i[i.MODIFY = 3] = "MODIFY"; + })(Tbe ||= {}); + m.util.setEnumType(Tbe, "aiserver.v1.FastUpdateFileRequest.UpdateType", [{ + no: 0, + name: "UPDATE_TYPE_UNSPECIFIED" + }, { + no: 1, + name: "UPDATE_TYPE_ADD" + }, { + no: 2, + name: "UPDATE_TYPE_DELETE" + }, { + no: 3, + name: "UPDATE_TYPE_MODIFY" + }]); + egs = class EMe extends N { + constructor(e) { + super(); + this.hash = ""; + this.unencryptedRelativeWorkspacePath = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.FastUpdateFileRequest.LocalFile"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "file", + kind: "message", + T: $x + }, { + no: 2, + name: "hash", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "unencrypted_relative_workspace_path", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new EMe().fromBinary(e, t); + } + static fromJson(e, t) { + return new EMe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new EMe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(EMe, e, t); + } + }; + tgs = class IMe extends N { + constructor(e) { + super(); + this.status = Pbe.UNSPECIFIED; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.FastUpdateFileResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "status", + kind: "enum", + T: m.getEnumType(Pbe) + }]); + } + static fromBinary(e, t) { + return new IMe().fromBinary(e, t); + } + static fromJson(e, t) { + return new IMe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new IMe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(IMe, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.SUCCESS = 1] = "SUCCESS"; + i[i.FAILURE = 2] = "FAILURE"; + i[i.EXPECTED_FAILURE = 3] = "EXPECTED_FAILURE"; + })(Pbe ||= {}); + m.util.setEnumType(Pbe, "aiserver.v1.FastUpdateFileResponse.Status", [{ + no: 0, + name: "STATUS_UNSPECIFIED" + }, { + no: 1, + name: "STATUS_SUCCESS" + }, { + no: 2, + name: "STATUS_FAILURE" + }, { + no: 3, + name: "STATUS_EXPECTED_FAILURE" + }]); + igs = class DMe extends N { + constructor(e) { + super(); + this.codebaseId = ""; + this.partialPath = { + case: undefined + }; + this.ancestorSpline = []; + this.updateType = Lbe.UNSPECIFIED; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.FastUpdateFileV2Request"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "client_repository_info", + kind: "message", + T: OHt + }, { + no: 2, + name: "codebase_id", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "directory", + kind: "message", + T: Z4, + oneof: "partial_path" + }, { + no: 4, + name: "local_file", + kind: "message", + T: sgs, + oneof: "partial_path" + }, { + no: 5, + name: "ancestor_spline", + kind: "message", + T: Z4, + repeated: true + }, { + no: 6, + name: "update_type", + kind: "enum", + T: m.getEnumType(Lbe) + }]); + } + static fromBinary(e, t) { + return new DMe().fromBinary(e, t); + } + static fromJson(e, t) { + return new DMe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new DMe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(DMe, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.ADD = 1] = "ADD"; + i[i.DELETE = 2] = "DELETE"; + i[i.MODIFY = 3] = "MODIFY"; + })(Lbe ||= {}); + m.util.setEnumType(Lbe, "aiserver.v1.FastUpdateFileV2Request.UpdateType", [{ + no: 0, + name: "UPDATE_TYPE_UNSPECIFIED" + }, { + no: 1, + name: "UPDATE_TYPE_ADD" + }, { + no: 2, + name: "UPDATE_TYPE_DELETE" + }, { + no: 3, + name: "UPDATE_TYPE_MODIFY" + }]); + sgs = class TMe extends N { + constructor(e) { + super(); + this.hash = ""; + this.unencryptedRelativeWorkspacePath = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.FastUpdateFileV2Request.LocalFile"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "file", + kind: "message", + T: $x + }, { + no: 2, + name: "hash", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "unencrypted_relative_workspace_path", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new TMe().fromBinary(e, t); + } + static fromJson(e, t) { + return new TMe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new TMe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(TMe, e, t); + } + }; + ngs = class PMe extends N { + constructor(e) { + super(); + this.status = Rbe.UNSPECIFIED; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.FastUpdateFileV2Response"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "status", + kind: "enum", + T: m.getEnumType(Rbe) + }]); + } + static fromBinary(e, t) { + return new PMe().fromBinary(e, t); + } + static fromJson(e, t) { + return new PMe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new PMe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(PMe, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.SUCCESS = 1] = "SUCCESS"; + i[i.FAILURE = 2] = "FAILURE"; + i[i.EXPECTED_FAILURE = 3] = "EXPECTED_FAILURE"; + })(Rbe ||= {}); + m.util.setEnumType(Rbe, "aiserver.v1.FastUpdateFileV2Response.Status", [{ + no: 0, + name: "STATUS_UNSPECIFIED" + }, { + no: 1, + name: "STATUS_SUCCESS" + }, { + no: 2, + name: "STATUS_FAILURE" + }, { + no: 3, + name: "STATUS_EXPECTED_FAILURE" + }]); + rgs = class LMe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetUploadLimitsRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "repository", + kind: "message", + T: pc, + opt: true + }]); + } + static fromBinary(e, t) { + return new LMe().fromBinary(e, t); + } + static fromJson(e, t) { + return new LMe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new LMe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(LMe, e, t); + } + }; + ogs = class RMe extends N { + constructor(e) { + super(); + this.softLimit = 0; + this.hardLimit = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetUploadLimitsResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "soft_limit", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "hard_limit", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new RMe().fromBinary(e, t); + } + static fromJson(e, t) { + return new RMe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new RMe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(RMe, e, t); + } + }; + ags = class NMe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetNumFilesToSendRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "repository", + kind: "message", + T: pc + }]); + } + static fromBinary(e, t) { + return new NMe().fromBinary(e, t); + } + static fromJson(e, t) { + return new NMe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new NMe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(NMe, e, t); + } + }; + lgs = class MMe extends N { + constructor(e) { + super(); + this.numFiles = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetNumFilesToSendResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "num_files", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new MMe().fromBinary(e, t); + } + static fromJson(e, t) { + return new MMe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new MMe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(MMe, e, t); + } + }; + cgs = class AMe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetAvailableChunkingStrategiesRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "repository", + kind: "message", + T: pc + }]); + } + static fromBinary(e, t) { + return new AMe().fromBinary(e, t); + } + static fromJson(e, t) { + return new AMe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new AMe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(AMe, e, t); + } + }; + ugs = class $Me extends N { + constructor(e) { + super(); + this.chunkingStrategies = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetAvailableChunkingStrategiesResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "chunking_strategies", + kind: "enum", + T: m.getEnumType(Eut), + repeated: true + }]); + } + static fromBinary(e, t) { + return new $Me().fromBinary(e, t); + } + static fromJson(e, t) { + return new $Me().fromJson(e, t); + } + static fromJsonString(e, t) { + return new $Me().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals($Me, e, t); + } + }; + dgs = class FMe extends N { + constructor(e) { + super(); + this.texts = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetEmbeddingsRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "texts", + kind: "scalar", + T: 9, + repeated: true + }]); + } + static fromBinary(e, t) { + return new FMe().fromBinary(e, t); + } + static fromJson(e, t) { + return new FMe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new FMe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(FMe, e, t); + } + }; + hgs = class OMe extends N { + constructor(e) { + super(); + this.embeddings = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetEmbeddingsResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 2, + name: "embeddings", + kind: "message", + T: fgs, + repeated: true + }]); + } + static fromBinary(e, t) { + return new OMe().fromBinary(e, t); + } + static fromJson(e, t) { + return new OMe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new OMe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(OMe, e, t); + } + }; + fgs = class _Me extends N { + constructor(e) { + super(); + this.embedding = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetEmbeddingsResponse.Embedding"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "embedding", + kind: "scalar", + T: 2, + repeated: true + }]); + } + static fromBinary(e, t) { + return new _Me().fromBinary(e, t); + } + static fromJson(e, t) { + return new _Me().fromJson(e, t); + } + static fromJsonString(e, t) { + return new _Me().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(_Me, e, t); + } + }; + Ier = class BMe extends N { + constructor(e) { + super(); + this.codebaseId = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.AdminRemoveRepositoryRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "codebase_id", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new BMe().fromBinary(e, t); + } + static fromJson(e, t) { + return new BMe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new BMe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(BMe, e, t); + } + }; + Der = class UMe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.AdminRemoveRepositoryResponse"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new UMe().fromBinary(e, t); + } + static fromJson(e, t) { + return new UMe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new UMe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(UMe, e, t); + } + }; + Ter = class WMe extends N { + constructor(e) { + super(); + this.codebaseId = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SyncRepositoryRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "codebase_id", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new WMe().fromBinary(e, t); + } + static fromJson(e, t) { + return new WMe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new WMe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(WMe, e, t); + } + }; + Per = class VMe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SyncRepositoryResponse"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new VMe().fromBinary(e, t); + } + static fromJson(e, t) { + return new VMe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new VMe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(VMe, e, t); + } + }; + Ler = class HMe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StartUploadRepoRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "repository", + kind: "message", + T: pc + }]); + } + static fromBinary(e, t) { + return new HMe().fromBinary(e, t); + } + static fromJson(e, t) { + return new HMe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new HMe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(HMe, e, t); + } + }; + Rer = class qMe extends N { + constructor(e) { + super(); + this.status = Nbe.UNSPECIFIED; + this.seenFiles = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StartUploadRepoResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "status", + kind: "enum", + T: m.getEnumType(Nbe) + }, { + no: 2, + name: "seen_files", + kind: "scalar", + T: 9, + repeated: true + }]); + } + static fromBinary(e, t) { + return new qMe().fromBinary(e, t); + } + static fromJson(e, t) { + return new qMe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new qMe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(qMe, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.SUCCESS = 1] = "SUCCESS"; + i[i.FAILURE = 2] = "FAILURE"; + i[i.ALREADY_EXISTS = 3] = "ALREADY_EXISTS"; + })(Nbe ||= {}); + m.util.setEnumType(Nbe, "aiserver.v1.StartUploadRepoResponse.Status", [{ + no: 0, + name: "STATUS_UNSPECIFIED" + }, { + no: 1, + name: "STATUS_SUCCESS" + }, { + no: 2, + name: "STATUS_FAILURE" + }, { + no: 3, + name: "STATUS_ALREADY_EXISTS" + }]); + Ner = class jMe extends N { + constructor(e) { + super(); + this.commitSha = ""; + this.queueId = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.UploadFileRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "repository", + kind: "message", + T: pc + }, { + no: 2, + name: "file", + kind: "message", + T: $x + }, { + no: 3, + name: "commit_sha", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "queue_id", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new jMe().fromBinary(e, t); + } + static fromJson(e, t) { + return new jMe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new jMe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(jMe, e, t); + } + }; + Mer = class zMe extends N { + constructor(e) { + super(); + this.status = Mbe.UNSPECIFIED; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.UploadFileResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "status", + kind: "enum", + T: m.getEnumType(Mbe) + }]); + } + static fromBinary(e, t) { + return new zMe().fromBinary(e, t); + } + static fromJson(e, t) { + return new zMe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new zMe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(zMe, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.SUCCESS = 1] = "SUCCESS"; + i[i.FAILURE = 2] = "FAILURE"; + i[i.EXPECTED_FAILURE = 3] = "EXPECTED_FAILURE"; + i[i.QUEUE_BACKED_UP = 4] = "QUEUE_BACKED_UP"; + })(Mbe ||= {}); + m.util.setEnumType(Mbe, "aiserver.v1.UploadFileResponse.Status", [{ + no: 0, + name: "STATUS_UNSPECIFIED" + }, { + no: 1, + name: "STATUS_SUCCESS" + }, { + no: 2, + name: "STATUS_FAILURE" + }, { + no: 3, + name: "STATUS_EXPECTED_FAILURE" + }, { + no: 4, + name: "STATUS_QUEUE_BACKED_UP" + }]); + Aer = class JMe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.FinishUploadRepoRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "repository", + kind: "message", + T: pc + }]); + } + static fromBinary(e, t) { + return new JMe().fromBinary(e, t); + } + static fromJson(e, t) { + return new JMe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new JMe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(JMe, e, t); + } + }; + $er = class GMe extends N { + constructor(e) { + super(); + this.status = Abe.UNSPECIFIED; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.FinishUploadRepoResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "status", + kind: "enum", + T: m.getEnumType(Abe) + }]); + } + static fromBinary(e, t) { + return new GMe().fromBinary(e, t); + } + static fromJson(e, t) { + return new GMe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new GMe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(GMe, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.SUCCESS = 1] = "SUCCESS"; + i[i.FAILURE = 2] = "FAILURE"; + })(Abe ||= {}); + m.util.setEnumType(Abe, "aiserver.v1.FinishUploadRepoResponse.Status", [{ + no: 0, + name: "STATUS_UNSPECIFIED" + }, { + no: 1, + name: "STATUS_SUCCESS" + }, { + no: 2, + name: "STATUS_FAILURE" + }]); + Fer = class KMe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StartUpdateRepoRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "repository", + kind: "message", + T: pc + }]); + } + static fromBinary(e, t) { + return new KMe().fromBinary(e, t); + } + static fromJson(e, t) { + return new KMe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new KMe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(KMe, e, t); + } + }; + Oer = class YMe extends N { + constructor(e) { + super(); + this.status = $be.UNSPECIFIED; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StartUpdateRepoResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "status", + kind: "enum", + T: m.getEnumType($be) + }]); + } + static fromBinary(e, t) { + return new YMe().fromBinary(e, t); + } + static fromJson(e, t) { + return new YMe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new YMe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(YMe, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.SUCCESS = 1] = "SUCCESS"; + i[i.FAILURE = 2] = "FAILURE"; + i[i.NOT_FOUND = 3] = "NOT_FOUND"; + i[i.ALREADY_SYNCING = 4] = "ALREADY_SYNCING"; + })($be ||= {}); + m.util.setEnumType($be, "aiserver.v1.StartUpdateRepoResponse.Status", [{ + no: 0, + name: "STATUS_UNSPECIFIED" + }, { + no: 1, + name: "STATUS_SUCCESS" + }, { + no: 2, + name: "STATUS_FAILURE" + }, { + no: 3, + name: "STATUS_NOT_FOUND" + }, { + no: 4, + name: "STATUS_ALREADY_SYNCING" + }]); + _er = class XMe extends N { + constructor(e) { + super(); + this.commitSha = ""; + this.queueId = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.UpdateFileRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "repository", + kind: "message", + T: pc + }, { + no: 2, + name: "added_file", + kind: "message", + T: $x + }, { + no: 3, + name: "deleted_file_path", + kind: "scalar", + T: 9, + opt: true + }, { + no: 4, + name: "commit_sha", + kind: "scalar", + T: 9 + }, { + no: 5, + name: "queue_id", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new XMe().fromBinary(e, t); + } + static fromJson(e, t) { + return new XMe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new XMe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(XMe, e, t); + } + }; + Ber = class QMe extends N { + constructor(e) { + super(); + this.status = Fbe.UNSPECIFIED; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.UpdateFileResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "status", + kind: "enum", + T: m.getEnumType(Fbe) + }]); + } + static fromBinary(e, t) { + return new QMe().fromBinary(e, t); + } + static fromJson(e, t) { + return new QMe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new QMe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(QMe, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.SUCCESS = 1] = "SUCCESS"; + i[i.FAILURE = 2] = "FAILURE"; + i[i.EXPECTED_FAILURE = 3] = "EXPECTED_FAILURE"; + i[i.QUEUE_BACKED_UP = 4] = "QUEUE_BACKED_UP"; + })(Fbe ||= {}); + m.util.setEnumType(Fbe, "aiserver.v1.UpdateFileResponse.Status", [{ + no: 0, + name: "STATUS_UNSPECIFIED" + }, { + no: 1, + name: "STATUS_SUCCESS" + }, { + no: 2, + name: "STATUS_FAILURE" + }, { + no: 3, + name: "STATUS_EXPECTED_FAILURE" + }, { + no: 4, + name: "STATUS_QUEUE_BACKED_UP" + }]); + Uer = class ZMe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.FinishUpdateRepoRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "repository", + kind: "message", + T: pc + }]); + } + static fromBinary(e, t) { + return new ZMe().fromBinary(e, t); + } + static fromJson(e, t) { + return new ZMe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new ZMe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(ZMe, e, t); + } + }; + Wer = class eAe extends N { + constructor(e) { + super(); + this.status = Obe.UNSPECIFIED; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.FinishUpdateRepoResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "status", + kind: "enum", + T: m.getEnumType(Obe) + }]); + } + static fromBinary(e, t) { + return new eAe().fromBinary(e, t); + } + static fromJson(e, t) { + return new eAe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new eAe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(eAe, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.SUCCESS = 1] = "SUCCESS"; + i[i.FAILURE = 2] = "FAILURE"; + })(Obe ||= {}); + m.util.setEnumType(Obe, "aiserver.v1.FinishUpdateRepoResponse.Status", [{ + no: 0, + name: "STATUS_UNSPECIFIED" + }, { + no: 1, + name: "STATUS_SUCCESS" + }, { + no: 2, + name: "STATUS_FAILURE" + }]); + Ver = class tAe extends N { + constructor(e) { + super(); + this.requests = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.BatchRepositoryStatusRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "requests", + kind: "message", + T: bgs, + repeated: true + }]); + } + static fromBinary(e, t) { + return new tAe().fromBinary(e, t); + } + static fromJson(e, t) { + return new tAe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new tAe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(tAe, e, t); + } + }; + Her = class iAe extends N { + constructor(e) { + super(); + this.responses = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.BatchRepositoryStatusResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "responses", + kind: "message", + T: vgs, + repeated: true + }]); + } + static fromBinary(e, t) { + return new iAe().fromBinary(e, t); + } + static fromJson(e, t) { + return new iAe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new iAe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(iAe, e, t); + } + }; + qer = class sAe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.UnsubscribeRepositoryRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "repository", + kind: "message", + T: pc + }]); + } + static fromBinary(e, t) { + return new sAe().fromBinary(e, t); + } + static fromJson(e, t) { + return new sAe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new sAe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(sAe, e, t); + } + }; + jer = class nAe extends N { + constructor(e) { + super(); + this.status = _be.UNSPECIFIED; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.UnsubscribeRepositoryResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "status", + kind: "enum", + T: m.getEnumType(_be) + }]); + } + static fromBinary(e, t) { + return new nAe().fromBinary(e, t); + } + static fromJson(e, t) { + return new nAe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new nAe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(nAe, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.NOT_FOUND = 1] = "NOT_FOUND"; + i[i.NOT_SUBSCRIBED = 2] = "NOT_SUBSCRIBED"; + i[i.SUCCESS = 3] = "SUCCESS"; + })(_be ||= {}); + m.util.setEnumType(_be, "aiserver.v1.UnsubscribeRepositoryResponse.Status", [{ + no: 0, + name: "STATUS_UNSPECIFIED" + }, { + no: 1, + name: "STATUS_NOT_FOUND" + }, { + no: 2, + name: "STATUS_NOT_SUBSCRIBED" + }, { + no: 3, + name: "STATUS_SUCCESS" + }]); + zer = class rAe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.LogoutRequest"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new rAe().fromBinary(e, t); + } + static fromJson(e, t) { + return new rAe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new rAe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(rAe, e, t); + } + }; + Jer = class oAe extends N { + constructor(e) { + super(); + this.status = Bbe.UNSPECIFIED; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.LogoutResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "status", + kind: "enum", + T: m.getEnumType(Bbe) + }]); + } + static fromBinary(e, t) { + return new oAe().fromBinary(e, t); + } + static fromJson(e, t) { + return new oAe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new oAe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(oAe, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.SUCCESS = 1] = "SUCCESS"; + i[i.FAILURE = 2] = "FAILURE"; + i[i.NOT_LOGGED_IN = 3] = "NOT_LOGGED_IN"; + })(Bbe ||= {}); + m.util.setEnumType(Bbe, "aiserver.v1.LogoutResponse.Status", [{ + no: 0, + name: "STATUS_UNSPECIFIED" + }, { + no: 1, + name: "STATUS_SUCCESS" + }, { + no: 2, + name: "STATUS_FAILURE" + }, { + no: 3, + name: "STATUS_NOT_LOGGED_IN" + }]); + _Ht = class aAe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RemoveRepositoryRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "repository", + kind: "message", + T: pc + }]); + } + static fromBinary(e, t) { + return new aAe().fromBinary(e, t); + } + static fromJson(e, t) { + return new aAe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new aAe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(aAe, e, t); + } + }; + ggs = class lAe extends N { + constructor(e) { + super(); + this.status = Ube.UNSPECIFIED; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RemoveRepositoryResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "status", + kind: "enum", + T: m.getEnumType(Ube) + }]); + } + static fromBinary(e, t) { + return new lAe().fromBinary(e, t); + } + static fromJson(e, t) { + return new lAe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new lAe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(lAe, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.NOT_FOUND = 1] = "NOT_FOUND"; + i[i.NOT_AUTHORIZED = 2] = "NOT_AUTHORIZED"; + i[i.STARTED = 3] = "STARTED"; + i[i.SUCCESS = 4] = "SUCCESS"; + })(Ube ||= {}); + m.util.setEnumType(Ube, "aiserver.v1.RemoveRepositoryResponse.Status", [{ + no: 0, + name: "STATUS_UNSPECIFIED" + }, { + no: 1, + name: "STATUS_NOT_FOUND" + }, { + no: 2, + name: "STATUS_NOT_AUTHORIZED" + }, { + no: 3, + name: "STATUS_STARTED" + }, { + no: 4, + name: "STATUS_SUCCESS" + }]); + Ger = class cAe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SubscribeRepositoryRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "repository", + kind: "message", + T: pc + }]); + } + static fromBinary(e, t) { + return new cAe().fromBinary(e, t); + } + static fromJson(e, t) { + return new cAe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new cAe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(cAe, e, t); + } + }; + Ker = class uAe extends N { + constructor(e) { + super(); + this.status = Wbe.UNSPECIFIED; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SubscribeRepositoryResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "status", + kind: "enum", + T: m.getEnumType(Wbe) + }]); + } + static fromBinary(e, t) { + return new uAe().fromBinary(e, t); + } + static fromJson(e, t) { + return new uAe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new uAe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(uAe, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.NOT_FOUND = 1] = "NOT_FOUND"; + i[i.NOT_AUTHORIZED = 2] = "NOT_AUTHORIZED"; + i[i.ALREADY_SUBSCRIBED = 3] = "ALREADY_SUBSCRIBED"; + i[i.SUCCESS = 4] = "SUCCESS"; + })(Wbe ||= {}); + m.util.setEnumType(Wbe, "aiserver.v1.SubscribeRepositoryResponse.Status", [{ + no: 0, + name: "STATUS_UNSPECIFIED" + }, { + no: 1, + name: "STATUS_NOT_FOUND" + }, { + no: 2, + name: "STATUS_NOT_AUTHORIZED" + }, { + no: 3, + name: "STATUS_ALREADY_SUBSCRIBED" + }, { + no: 4, + name: "STATUS_SUCCESS" + }]); + BHt = class dAe extends N { + constructor(e) { + super(); + this.query = ""; + this.topK = 0; + this.rerank = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SearchRepositoryRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "query", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "repository", + kind: "message", + T: pc + }, { + no: 3, + name: "top_k", + kind: "scalar", + T: 5 + }, { + no: 4, + name: "model_details", + kind: "message", + T: Qa + }, { + no: 5, + name: "rerank", + kind: "scalar", + T: 8 + }, { + no: 6, + name: "context_cache_request", + kind: "scalar", + T: 8, + opt: true + }, { + no: 7, + name: "glob_filter", + kind: "scalar", + T: 9, + opt: true + }, { + no: 8, + name: "not_glob_filter", + kind: "scalar", + T: 9, + opt: true + }, { + no: 9, + name: "race_n_requests", + kind: "scalar", + T: 5, + opt: true + }, { + no: 10, + name: "query_only_repo_access", + kind: "message", + T: Uz + }]); + } + static fromBinary(e, t) { + return new dAe().fromBinary(e, t); + } + static fromJson(e, t) { + return new dAe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new dAe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(dAe, e, t); + } + }; + Uz = class hAe extends N { + constructor(e) { + super(); + this.ownerAuthId = ""; + this.accessToken = ""; + this.userRepoOwner = ""; + this.userRepoName = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.QueryOnlyRepoAccess"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "owner_auth_id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "access_token", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "user_repo_owner", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "user_repo_name", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new hAe().fromBinary(e, t); + } + static fromJson(e, t) { + return new hAe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new hAe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(hAe, e, t); + } + }; + xb = class fAe extends N { + constructor(e) { + super(); + this.score = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CodeResult"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "code_block", + kind: "message", + T: Xg + }, { + no: 2, + name: "score", + kind: "scalar", + T: 2 + }]); + } + static fromBinary(e, t) { + return new fAe().fromBinary(e, t); + } + static fromJson(e, t) { + return new fAe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new fAe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(fAe, e, t); + } + }; + Dut = class gAe extends N { + constructor(e) { + super(); + this.score = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.FileResult"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "file", + kind: "message", + T: $x + }, { + no: 2, + name: "score", + kind: "scalar", + T: 2 + }]); + } + static fromBinary(e, t) { + return new gAe().fromBinary(e, t); + } + static fromJson(e, t) { + return new gAe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new gAe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(gAe, e, t); + } + }; + UHt = class pAe extends N { + constructor(e) { + super(); + this.codeResults = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SearchRepositoryResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "code_results", + kind: "message", + T: xb, + repeated: true + }]); + } + static fromBinary(e, t) { + return new pAe().fromBinary(e, t); + } + static fromJson(e, t) { + return new pAe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new pAe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(pAe, e, t); + } + }; + WHt = class mAe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SemSearchRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "request", + kind: "message", + T: BHt + }]); + } + static fromBinary(e, t) { + return new mAe().fromBinary(e, t); + } + static fromJson(e, t) { + return new mAe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new mAe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(mAe, e, t); + } + }; + VHt = class bAe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CodeResultWithClassificationInfo"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "code_result", + kind: "message", + T: xb + }, { + no: 2, + name: "line_number_classification", + kind: "message", + T: pgs, + opt: true + }]); + } + static fromBinary(e, t) { + return new bAe().fromBinary(e, t); + } + static fromJson(e, t) { + return new bAe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new bAe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(bAe, e, t); + } + }; + pgs = class vAe extends N { + constructor(e) { + super(); + this.queryComputedFor = ""; + this.matchedStrings = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CodeResultWithClassificationInfo.LineNumberClassification"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "detailed_line", + kind: "message", + T: fut + }, { + no: 2, + name: "query_computed_for", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "matched_strings", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 4, + name: "highlight_range", + kind: "message", + T: Of + }]); + } + static fromBinary(e, t) { + return new vAe().fromBinary(e, t); + } + static fromJson(e, t) { + return new vAe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new vAe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(vAe, e, t); + } + }; + HHt = class yAe extends N { + constructor(e) { + super(); + this.codeResults = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SemSearchResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "response", + kind: "message", + T: UHt + }, { + no: 2, + name: "metadata", + kind: "message", + T: mgs, + opt: true + }, { + no: 3, + name: "code_results", + kind: "message", + T: VHt, + repeated: true + }]); + } + static fromBinary(e, t) { + return new yAe().fromBinary(e, t); + } + static fromJson(e, t) { + return new yAe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new yAe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(yAe, e, t); + } + }; + mgs = class wAe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SemSearchResponse.SemSearchMetadata"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "query_embedding_model", + kind: "scalar", + T: 9, + opt: true + }, { + no: 2, + name: "server_side_latency_ms", + kind: "scalar", + T: 5, + opt: true + }, { + no: 3, + name: "embed_latency_ms", + kind: "scalar", + T: 5, + opt: true + }, { + no: 4, + name: "knn_latency_ms", + kind: "scalar", + T: 5, + opt: true + }]); + } + static fromBinary(e, t) { + return new wAe().fromBinary(e, t); + } + static fromJson(e, t) { + return new wAe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new wAe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(wAe, e, t); + } + }; + Yer = class CAe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.LoginRequest"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new CAe().fromBinary(e, t); + } + static fromJson(e, t) { + return new CAe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new CAe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(CAe, e, t); + } + }; + Xer = class SAe extends N { + constructor(e) { + super(); + this.loginUrl = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.LoginResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "login_url", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new SAe().fromBinary(e, t); + } + static fromJson(e, t) { + return new SAe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new SAe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(SAe, e, t); + } + }; + Qer = class xAe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.IsLoggedInRequest"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new xAe().fromBinary(e, t); + } + static fromJson(e, t) { + return new xAe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new xAe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(xAe, e, t); + } + }; + Zer = class kAe extends N { + constructor(e) { + super(); + this.loggedIn = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.IsLoggedInResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "logged_in", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new kAe().fromBinary(e, t); + } + static fromJson(e, t) { + return new kAe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new kAe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(kAe, e, t); + } + }; + etr = class EAe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.PollLoginRequest"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new EAe().fromBinary(e, t); + } + static fromJson(e, t) { + return new EAe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new EAe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(EAe, e, t); + } + }; + ttr = class IAe extends N { + constructor(e) { + super(); + this.status = Vbe.UNSPECIFIED; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.PollLoginResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "status", + kind: "enum", + T: m.getEnumType(Vbe) + }]); + } + static fromBinary(e, t) { + return new IAe().fromBinary(e, t); + } + static fromJson(e, t) { + return new IAe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new IAe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(IAe, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.LOGGED_IN = 1] = "LOGGED_IN"; + i[i.FAILURE = 2] = "FAILURE"; + i[i.CHECKING = 3] = "CHECKING"; + })(Vbe ||= {}); + m.util.setEnumType(Vbe, "aiserver.v1.PollLoginResponse.Status", [{ + no: 0, + name: "STATUS_UNSPECIFIED" + }, { + no: 1, + name: "STATUS_LOGGED_IN" + }, { + no: 2, + name: "STATUS_FAILURE" + }, { + no: 3, + name: "STATUS_CHECKING" + }]); + itr = class DAe extends N { + constructor(e) { + super(); + this.scopes = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.UpgradeScopeRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 2, + name: "scopes", + kind: "scalar", + T: 9, + repeated: true + }]); + } + static fromBinary(e, t) { + return new DAe().fromBinary(e, t); + } + static fromJson(e, t) { + return new DAe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new DAe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(DAe, e, t); + } + }; + str = class TAe extends N { + constructor(e) { + super(); + this.status = Hbe.UNSPECIFIED; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.UpgradeScopeResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "status", + kind: "enum", + T: m.getEnumType(Hbe) + }]); + } + static fromBinary(e, t) { + return new TAe().fromBinary(e, t); + } + static fromJson(e, t) { + return new TAe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new TAe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(TAe, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.SUCCESS = 1] = "SUCCESS"; + i[i.FAILURE = 2] = "FAILURE"; + })(Hbe ||= {}); + m.util.setEnumType(Hbe, "aiserver.v1.UpgradeScopeResponse.Status", [{ + no: 0, + name: "STATUS_UNSPECIFIED" + }, { + no: 1, + name: "STATUS_SUCCESS" + }, { + no: 2, + name: "STATUS_FAILURE" + }]); + ntr = class PAe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RepositoriesRequest"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new PAe().fromBinary(e, t); + } + static fromJson(e, t) { + return new PAe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new PAe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(PAe, e, t); + } + }; + rtr = class LAe extends N { + constructor(e) { + super(); + this.repositories = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RepositoriesResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "repositories", + kind: "message", + T: pc, + repeated: true + }]); + } + static fromBinary(e, t) { + return new LAe().fromBinary(e, t); + } + static fromJson(e, t) { + return new LAe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new LAe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(LAe, e, t); + } + }; + otr = class RAe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.UploadRepositoryRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "repository", + kind: "message", + T: pc + }]); + } + static fromBinary(e, t) { + return new RAe().fromBinary(e, t); + } + static fromJson(e, t) { + return new RAe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new RAe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(RAe, e, t); + } + }; + atr = class NAe extends N { + constructor(e) { + super(); + this.status = qbe.UNSPECIFIED; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.UploadRepositoryResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "status", + kind: "enum", + T: m.getEnumType(qbe) + }]); + } + static fromBinary(e, t) { + return new NAe().fromBinary(e, t); + } + static fromJson(e, t) { + return new NAe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new NAe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(NAe, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.SUCCESS = 1] = "SUCCESS"; + i[i.FAILURE = 2] = "FAILURE"; + i[i.AUTH_TOKEN_BAD_PERMISSIONS = 3] = "AUTH_TOKEN_BAD_PERMISSIONS"; + i[i.ALREADY_EXISTS = 4] = "ALREADY_EXISTS"; + })(qbe ||= {}); + m.util.setEnumType(qbe, "aiserver.v1.UploadRepositoryResponse.Status", [{ + no: 0, + name: "STATUS_UNSPECIFIED" + }, { + no: 1, + name: "STATUS_SUCCESS" + }, { + no: 2, + name: "STATUS_FAILURE" + }, { + no: 3, + name: "STATUS_AUTH_TOKEN_BAD_PERMISSIONS" + }, { + no: 4, + name: "STATUS_ALREADY_EXISTS" + }]); + bgs = class MAe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RepositoryStatusRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "repository", + kind: "message", + T: pc + }]); + } + static fromBinary(e, t) { + return new MAe().fromBinary(e, t); + } + static fromJson(e, t) { + return new MAe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new MAe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(MAe, e, t); + } + }; + vgs = class AAe extends N { + constructor(e) { + super(); + this.status = { + case: undefined + }; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RepositoryStatusResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "not_found", + kind: "message", + T: ygs, + oneof: "status" + }, { + no: 2, + name: "uploading", + kind: "message", + T: Cgs, + oneof: "status" + }, { + no: 3, + name: "syncing", + kind: "message", + T: Sgs, + oneof: "status" + }, { + no: 4, + name: "synced", + kind: "message", + T: xgs, + oneof: "status" + }, { + no: 5, + name: "not_subscribed", + kind: "message", + T: wgs, + oneof: "status" + }, { + no: 6, + name: "too_big", + kind: "message", + T: kgs, + oneof: "status" + }, { + no: 7, + name: "auth_token_not_found", + kind: "message", + T: Egs, + oneof: "status" + }, { + no: 8, + name: "auth_token_not_authorized", + kind: "message", + T: Igs, + oneof: "status" + }, { + no: 10, + name: "error_uploading", + kind: "message", + T: qHt, + oneof: "status" + }, { + no: 11, + name: "error_syncing", + kind: "message", + T: qHt, + oneof: "status" + }, { + no: 9, + name: "is_owner", + kind: "scalar", + T: 8, + opt: true + }]); + } + static fromBinary(e, t) { + return new AAe().fromBinary(e, t); + } + static fromJson(e, t) { + return new AAe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new AAe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(AAe, e, t); + } + }; + ygs = class $Ae extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RepositoryStatusResponse.NotFound"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new $Ae().fromBinary(e, t); + } + static fromJson(e, t) { + return new $Ae().fromJson(e, t); + } + static fromJsonString(e, t) { + return new $Ae().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals($Ae, e, t); + } + }; + wgs = class FAe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RepositoryStatusResponse.NotSubscribed"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new FAe().fromBinary(e, t); + } + static fromJson(e, t) { + return new FAe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new FAe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(FAe, e, t); + } + }; + Cgs = class OAe extends N { + constructor(e) { + super(); + this.progress = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RepositoryStatusResponse.Uploading"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "progress", + kind: "scalar", + T: 2 + }]); + } + static fromBinary(e, t) { + return new OAe().fromBinary(e, t); + } + static fromJson(e, t) { + return new OAe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new OAe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(OAe, e, t); + } + }; + Sgs = class _Ae extends N { + constructor(e) { + super(); + this.branch = ""; + this.oldCommit = ""; + this.newCommit = ""; + this.progress = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RepositoryStatusResponse.Syncing"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "branch", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "old_commit", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "new_commit", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "progress", + kind: "scalar", + T: 2 + }]); + } + static fromBinary(e, t) { + return new _Ae().fromBinary(e, t); + } + static fromJson(e, t) { + return new _Ae().fromJson(e, t); + } + static fromJsonString(e, t) { + return new _Ae().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(_Ae, e, t); + } + }; + xgs = class BAe extends N { + constructor(e) { + super(); + this.branch = ""; + this.commit = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RepositoryStatusResponse.Synced"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "branch", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "commit", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new BAe().fromBinary(e, t); + } + static fromJson(e, t) { + return new BAe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new BAe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(BAe, e, t); + } + }; + kgs = class UAe extends N { + constructor(e) { + super(); + this.maxSize = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RepositoryStatusResponse.TooBig"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "max_size", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new UAe().fromBinary(e, t); + } + static fromJson(e, t) { + return new UAe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new UAe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(UAe, e, t); + } + }; + Egs = class WAe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RepositoryStatusResponse.AuthTokenNotFound"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new WAe().fromBinary(e, t); + } + static fromJson(e, t) { + return new WAe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new WAe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(WAe, e, t); + } + }; + Igs = class VAe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RepositoryStatusResponse.AuthTokenNotAuthorized"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new VAe().fromBinary(e, t); + } + static fromJson(e, t) { + return new VAe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new VAe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(VAe, e, t); + } + }; + qHt = class HAe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RepositoryStatusResponse.EmptyMessage"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new HAe().fromBinary(e, t); + } + static fromJson(e, t) { + return new HAe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new HAe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(HAe, e, t); + } + }; + pc = class qAe extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.remoteUrls = []; + this.remoteNames = []; + this.repoName = ""; + this.repoOwner = ""; + this.isTracked = false; + this.isLocal = false; + this.workspaceUri = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RepositoryInfo"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "remote_urls", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 3, + name: "remote_names", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 4, + name: "repo_name", + kind: "scalar", + T: 9 + }, { + no: 5, + name: "repo_owner", + kind: "scalar", + T: 9 + }, { + no: 6, + name: "is_tracked", + kind: "scalar", + T: 8 + }, { + no: 7, + name: "is_local", + kind: "scalar", + T: 8 + }, { + no: 8, + name: "num_files", + kind: "scalar", + T: 5, + opt: true + }, { + no: 9, + name: "orthogonal_transform_seed", + kind: "scalar", + T: 1, + opt: true + }, { + no: 10, + name: "preferred_embedding_model", + kind: "enum", + T: m.getEnumType(Y4), + opt: true + }, { + no: 11, + name: "workspace_uri", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new qAe().fromBinary(e, t); + } + static fromJson(e, t) { + return new qAe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new qAe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(qAe, e, t); + } + }; + ltr = class jAe extends N { + constructor(e) { + super(); + this.query = ""; + this.topK = 0; + this.topReflectionsK = 0; + this.indexIds = []; + this.useModelOnFiles = false; + this.useReflections = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SearchRepositoryDeepContextRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "query", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "top_k", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "top_reflections_k", + kind: "scalar", + T: 5 + }, { + no: 4, + name: "index_ids", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 5, + name: "use_model_on_files", + kind: "scalar", + T: 8 + }, { + no: 6, + name: "use_reflections", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new jAe().fromBinary(e, t); + } + static fromJson(e, t) { + return new jAe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new jAe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(jAe, e, t); + } + }; + Dgs = class zAe extends N { + constructor(e) { + super(); + this.score = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.NodeResult"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "node", + kind: "message", + T: NHt + }, { + no: 2, + name: "file", + kind: "message", + T: $x + }, { + no: 3, + name: "score", + kind: "scalar", + T: 2 + }]); + } + static fromBinary(e, t) { + return new zAe().fromBinary(e, t); + } + static fromJson(e, t) { + return new zAe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new zAe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(zAe, e, t); + } + }; + Tgs = class JAe extends N { + constructor(e) { + super(); + this.score = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ReflectionResult"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "reflection", + kind: "message", + T: Pfs + }, { + no: 2, + name: "score", + kind: "scalar", + T: 2 + }]); + } + static fromBinary(e, t) { + return new JAe().fromBinary(e, t); + } + static fromJson(e, t) { + return new JAe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new JAe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(JAe, e, t); + } + }; + Pgs = class GAe extends N { + constructor(e) { + super(); + this.topNodes = []; + this.reflections = []; + this.indexId = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SearchRepositoryDeepContextResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "top_nodes", + kind: "message", + T: Dgs, + repeated: true + }, { + no: 2, + name: "reflections", + kind: "message", + T: Tgs, + repeated: true + }, { + no: 3, + name: "index_id", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new GAe().fromBinary(e, t); + } + static fromJson(e, t) { + return new GAe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new GAe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(GAe, e, t); + } + }; + Lgs = class KAe extends N { + constructor(e) { + super(); + this.query = ""; + this.codeResults = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetLineNumberClassificationsRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "query", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "code_results", + kind: "message", + T: xb, + repeated: true + }]); + } + static fromBinary(e, t) { + return new KAe().fromBinary(e, t); + } + static fromJson(e, t) { + return new KAe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new KAe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(KAe, e, t); + } + }; + Rgs = class YAe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetLineNumberClassificationsResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "classified_result", + kind: "message", + T: VHt + }]); + } + static fromBinary(e, t) { + return new YAe().fromBinary(e, t); + } + static fromJson(e, t) { + return new YAe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new YAe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(YAe, e, t); + } + }; + Ngs = class XAe extends N { + constructor(e) { + super(); + this.codebaseId = ""; + this.copyTaskHandle = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetCopyStatusRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "codebase_id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "copy_task_handle", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new XAe().fromBinary(e, t); + } + static fromJson(e, t) { + return new XAe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new XAe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(XAe, e, t); + } + }; + Mgs = class QAe extends N { + constructor(e) { + super(); + this.phase = jbe.UNSPECIFIED; + this.percentDone = 0; + this.errorMessage = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetCopyStatusResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "phase", + kind: "enum", + T: m.getEnumType(jbe) + }, { + no: 2, + name: "percent_done", + kind: "scalar", + T: 2 + }, { + no: 3, + name: "error_message", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "completed_status", + kind: "enum", + T: m.getEnumType(Tut), + opt: true + }]); + } + static fromBinary(e, t) { + return new QAe().fromBinary(e, t); + } + static fromJson(e, t) { + return new QAe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new QAe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(QAe, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.INITIALIZING = 1] = "INITIALIZING"; + i[i.COPYING = 2] = "COPYING"; + i[i.COMPLETED = 3] = "COMPLETED"; + i[i.CREATING_SEARCH_FILTERS = 4] = "CREATING_SEARCH_FILTERS"; + i[i.COPYING_SEARCH_STATE = 5] = "COPYING_SEARCH_STATE"; + i[i.COPYING_TREE_STATE = 6] = "COPYING_TREE_STATE"; + i[i.SYNCING_COPY = 7] = "SYNCING_COPY"; + })(jbe ||= {}); + m.util.setEnumType(jbe, "aiserver.v1.GetCopyStatusResponse.Phase", [{ + no: 0, + name: "PHASE_UNSPECIFIED" + }, { + no: 1, + name: "PHASE_INITIALIZING" + }, { + no: 2, + name: "PHASE_COPYING" + }, { + no: 3, + name: "PHASE_COMPLETED" + }, { + no: 4, + name: "PHASE_CREATING_SEARCH_FILTERS" + }, { + no: 5, + name: "PHASE_COPYING_SEARCH_STATE" + }, { + no: 6, + name: "PHASE_COPYING_TREE_STATE" + }, { + no: 7, + name: "PHASE_SYNCING_COPY" + }]); + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.UP_TO_DATE = 1] = "UP_TO_DATE"; + i[i.OUT_OF_SYNC = 2] = "OUT_OF_SYNC"; + i[i.FAILURE = 3] = "FAILURE"; + })(Tut ||= {}); + m.util.setEnumType(Tut, "aiserver.v1.GetCopyStatusResponse.CompletedStatus", [{ + no: 0, + name: "COMPLETED_STATUS_UNSPECIFIED" + }, { + no: 1, + name: "COMPLETED_STATUS_UP_TO_DATE" + }, { + no: 2, + name: "COMPLETED_STATUS_OUT_OF_SYNC" + }, { + no: 3, + name: "COMPLETED_STATUS_FAILURE" + }]); + } +}); +var at; +var Wz; +var Vz; +var e5; +var jHt; +var zbe; +var zHt; +var Put; +var JHt; +var Jbe; +var GHt; +var KHt; +var Ags; +var $gs; +var ctr; +var utr; +var Wie; +var Fgs; +var Ogs; +var Hz; +var Zl; +var _gs; +var YHt; +var Lut; +var ZM; +var uR; +var Gbe; +var Bgs; +var Ugs; +var XHt; +var dtr; +var Wgs; +var Rut; +var Vgs; +var QHt; +var qz; +var Hgs; +var qgs; +var ZHt; +var Vie; +var jgs; +var eqt; +var zgs; +var Jgs; +var Ggs; +var Kgs; +var Ygs; +var Xgs; +var tqt; +var Qgs; +var Zgs; +var Nut; +var iqt; +var _7; +var jz; +var sqt; +var Mut; +var nqt; +var rqt; +var eps; +var Aut; +var tps; +var oqt; +var B7; +var aqt; +var t5; +var $ut; +var lqt; +var cqt; +var ips; +var Fut; +var uqt; +var U7; +var dqt; +var Hie; +var sps; +var nps; +var hqt; +var Out; +var rps; +var ops; +var _ut; +var fqt; +var aps; +var But; +var Uut; +var Wut; +var W7; +var lps; +var gqt; +var cps; +var Vut; +var ups; +var dps; +var hps; +var fps; +var gps; +var pps; +var mps; +var htr; +var pqt; +var Hut; +var bps; +var vps; +var yps; +var wps; +var Cps; +var Sps; +var xps; +var kps; +var Eps; +var Ips; +var Dps; +var mqt; +var bqt; +var Tps; +var Pps; +var Lps; +var Rps; +var Nps; +var Mps; +var Aps; +var $ps; +var Fps; +var Ops; +var _ps; +var Bps; +var Ups; +var Wps; +var ftr; +var Vps; +var Hps; +var qps; +var jps; +var zps; +var Jps; +var Gps; +var Kps; +var Yps; +var Kbe; +var Xps; +var Qps; +var Zps; +var ems; +var tms; +var ims; +var sms; +var nms; +var rms; +var oms; +var ams; +var lms; +var cms; +var ums; +var dms; +var hms; +var fms; +var gms; +var pms; +var vqt; +var mms; +var Ybe; +var Xbe; +var bms; +var yqt; +var vms; +var i5; +var yms; +var wms; +var Cms; +var wqt; +var zz; +var Sms; +var xms; +var Cqt; +var kms; +var Ems; +var Ims; +var Dms; +var Tms; +var Pms; +var Lms; +var Rms; +var Nms; +var Mms; +var Ams; +var $ms; +var Fms; +var Oms; +var Qbe; +var Zbe; +var Sqt; +var _ms; +var xqt; +var qut; +var jut; +var Bms; +var kqt; +var zut; +var Ums; +var Eqt; +var Wms; +var Jut; +var eve; +var gtr; +var tve; +var Vms; +var Hms; +var Iqt; +var Gut; +var Dqt; +var qms; +var Tqt; +var Jz; +var jms; +var ptr; +var mtr; +var btr; +var Pqt; +var ive; +var zms; +var jl = ue({ + "out-build/proto/aiserver/v1/tools_pb.js"() { + "use strict"; + + Hr(); + Wo(); + cS(); + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.READ_SEMSEARCH_FILES = 1] = "READ_SEMSEARCH_FILES"; + i[i.READ_FILE_FOR_IMPORTS = 2] = "READ_FILE_FOR_IMPORTS"; + i[i.RIPGREP_SEARCH = 3] = "RIPGREP_SEARCH"; + i[i.RUN_TERMINAL_COMMAND = 4] = "RUN_TERMINAL_COMMAND"; + i[i.READ_FILE = 5] = "READ_FILE"; + i[i.LIST_DIR = 6] = "LIST_DIR"; + i[i.EDIT_FILE = 7] = "EDIT_FILE"; + i[i.FILE_SEARCH = 8] = "FILE_SEARCH"; + i[i.SEMANTIC_SEARCH_FULL = 9] = "SEMANTIC_SEARCH_FULL"; + i[i.CREATE_FILE = 10] = "CREATE_FILE"; + i[i.DELETE_FILE = 11] = "DELETE_FILE"; + i[i.REAPPLY = 12] = "REAPPLY"; + i[i.GET_RELATED_FILES = 13] = "GET_RELATED_FILES"; + i[i.PARALLEL_APPLY = 14] = "PARALLEL_APPLY"; + i[i.RUN_TERMINAL_COMMAND_V2 = 15] = "RUN_TERMINAL_COMMAND_V2"; + i[i.FETCH_RULES = 16] = "FETCH_RULES"; + i[i.PLANNER = 17] = "PLANNER"; + i[i.WEB_SEARCH = 18] = "WEB_SEARCH"; + i[i.MCP = 19] = "MCP"; + i[i.WEB_VIEWER = 20] = "WEB_VIEWER"; + i[i.DIFF_HISTORY = 21] = "DIFF_HISTORY"; + i[i.IMPLEMENTER = 22] = "IMPLEMENTER"; + i[i.SEARCH_SYMBOLS = 23] = "SEARCH_SYMBOLS"; + i[i.BACKGROUND_COMPOSER_FOLLOWUP = 24] = "BACKGROUND_COMPOSER_FOLLOWUP"; + i[i.KNOWLEDGE_BASE = 25] = "KNOWLEDGE_BASE"; + })(at ||= {}); + m.util.setEnumType(at, "aiserver.v1.ClientSideToolV2", [{ + no: 0, + name: "CLIENT_SIDE_TOOL_V2_UNSPECIFIED" + }, { + no: 1, + name: "CLIENT_SIDE_TOOL_V2_READ_SEMSEARCH_FILES" + }, { + no: 2, + name: "CLIENT_SIDE_TOOL_V2_READ_FILE_FOR_IMPORTS" + }, { + no: 3, + name: "CLIENT_SIDE_TOOL_V2_RIPGREP_SEARCH" + }, { + no: 4, + name: "CLIENT_SIDE_TOOL_V2_RUN_TERMINAL_COMMAND" + }, { + no: 5, + name: "CLIENT_SIDE_TOOL_V2_READ_FILE" + }, { + no: 6, + name: "CLIENT_SIDE_TOOL_V2_LIST_DIR" + }, { + no: 7, + name: "CLIENT_SIDE_TOOL_V2_EDIT_FILE" + }, { + no: 8, + name: "CLIENT_SIDE_TOOL_V2_FILE_SEARCH" + }, { + no: 9, + name: "CLIENT_SIDE_TOOL_V2_SEMANTIC_SEARCH_FULL" + }, { + no: 10, + name: "CLIENT_SIDE_TOOL_V2_CREATE_FILE" + }, { + no: 11, + name: "CLIENT_SIDE_TOOL_V2_DELETE_FILE" + }, { + no: 12, + name: "CLIENT_SIDE_TOOL_V2_REAPPLY" + }, { + no: 13, + name: "CLIENT_SIDE_TOOL_V2_GET_RELATED_FILES" + }, { + no: 14, + name: "CLIENT_SIDE_TOOL_V2_PARALLEL_APPLY" + }, { + no: 15, + name: "CLIENT_SIDE_TOOL_V2_RUN_TERMINAL_COMMAND_V2" + }, { + no: 16, + name: "CLIENT_SIDE_TOOL_V2_FETCH_RULES" + }, { + no: 17, + name: "CLIENT_SIDE_TOOL_V2_PLANNER" + }, { + no: 18, + name: "CLIENT_SIDE_TOOL_V2_WEB_SEARCH" + }, { + no: 19, + name: "CLIENT_SIDE_TOOL_V2_MCP" + }, { + no: 20, + name: "CLIENT_SIDE_TOOL_V2_WEB_VIEWER" + }, { + no: 21, + name: "CLIENT_SIDE_TOOL_V2_DIFF_HISTORY" + }, { + no: 22, + name: "CLIENT_SIDE_TOOL_V2_IMPLEMENTER" + }, { + no: 23, + name: "CLIENT_SIDE_TOOL_V2_SEARCH_SYMBOLS" + }, { + no: 24, + name: "CLIENT_SIDE_TOOL_V2_BACKGROUND_COMPOSER_FOLLOWUP" + }, { + no: 25, + name: "CLIENT_SIDE_TOOL_V2_KNOWLEDGE_BASE" + }]); + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.BASH = 1] = "BASH"; + i[i.POWERSHELL = 2] = "POWERSHELL"; + })(Wz ||= {}); + m.util.setEnumType(Wz, "aiserver.v1.ShellType", [{ + no: 0, + name: "SHELL_TYPE_UNSPECIFIED" + }, { + no: 1, + name: "SHELL_TYPE_BASH" + }, { + no: 2, + name: "SHELL_TYPE_POWERSHELL" + }]); + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.SEARCH = 1] = "SEARCH"; + i[i.READ_CHUNK = 2] = "READ_CHUNK"; + i[i.GOTODEF = 3] = "GOTODEF"; + i[i.EDIT = 4] = "EDIT"; + i[i.UNDO_EDIT = 5] = "UNDO_EDIT"; + i[i.END = 6] = "END"; + i[i.NEW_FILE = 7] = "NEW_FILE"; + i[i.ADD_TEST = 8] = "ADD_TEST"; + i[i.RUN_TEST = 9] = "RUN_TEST"; + i[i.DELETE_TEST = 10] = "DELETE_TEST"; + i[i.SAVE_FILE = 11] = "SAVE_FILE"; + i[i.GET_TESTS = 12] = "GET_TESTS"; + i[i.GET_SYMBOLS = 13] = "GET_SYMBOLS"; + i[i.SEMANTIC_SEARCH = 14] = "SEMANTIC_SEARCH"; + i[i.GET_PROJECT_STRUCTURE = 15] = "GET_PROJECT_STRUCTURE"; + i[i.CREATE_RM_FILES = 16] = "CREATE_RM_FILES"; + i[i.RUN_TERMINAL_COMMANDS = 17] = "RUN_TERMINAL_COMMANDS"; + i[i.NEW_EDIT = 18] = "NEW_EDIT"; + i[i.READ_WITH_LINTER = 19] = "READ_WITH_LINTER"; + })(Vz ||= {}); + m.util.setEnumType(Vz, "aiserver.v1.BuiltinTool", [{ + no: 0, + name: "BUILTIN_TOOL_UNSPECIFIED" + }, { + no: 1, + name: "BUILTIN_TOOL_SEARCH" + }, { + no: 2, + name: "BUILTIN_TOOL_READ_CHUNK" + }, { + no: 3, + name: "BUILTIN_TOOL_GOTODEF" + }, { + no: 4, + name: "BUILTIN_TOOL_EDIT" + }, { + no: 5, + name: "BUILTIN_TOOL_UNDO_EDIT" + }, { + no: 6, + name: "BUILTIN_TOOL_END" + }, { + no: 7, + name: "BUILTIN_TOOL_NEW_FILE" + }, { + no: 8, + name: "BUILTIN_TOOL_ADD_TEST" + }, { + no: 9, + name: "BUILTIN_TOOL_RUN_TEST" + }, { + no: 10, + name: "BUILTIN_TOOL_DELETE_TEST" + }, { + no: 11, + name: "BUILTIN_TOOL_SAVE_FILE" + }, { + no: 12, + name: "BUILTIN_TOOL_GET_TESTS" + }, { + no: 13, + name: "BUILTIN_TOOL_GET_SYMBOLS" + }, { + no: 14, + name: "BUILTIN_TOOL_SEMANTIC_SEARCH" + }, { + no: 15, + name: "BUILTIN_TOOL_GET_PROJECT_STRUCTURE" + }, { + no: 16, + name: "BUILTIN_TOOL_CREATE_RM_FILES" + }, { + no: 17, + name: "BUILTIN_TOOL_RUN_TERMINAL_COMMANDS" + }, { + no: 18, + name: "BUILTIN_TOOL_NEW_EDIT" + }, { + no: 19, + name: "BUILTIN_TOOL_READ_WITH_LINTER" + }]); + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.EXECUTION_COMPLETED = 1] = "EXECUTION_COMPLETED"; + i[i.EXECUTION_ABORTED = 2] = "EXECUTION_ABORTED"; + i[i.EXECUTION_FAILED = 3] = "EXECUTION_FAILED"; + i[i.ERROR_OCCURRED_CHECKING_REASON = 4] = "ERROR_OCCURRED_CHECKING_REASON"; + })(e5 ||= {}); + m.util.setEnumType(e5, "aiserver.v1.RunTerminalCommandEndedReason", [{ + no: 0, + name: "RUN_TERMINAL_COMMAND_ENDED_REASON_UNSPECIFIED" + }, { + no: 1, + name: "RUN_TERMINAL_COMMAND_ENDED_REASON_EXECUTION_COMPLETED" + }, { + no: 2, + name: "RUN_TERMINAL_COMMAND_ENDED_REASON_EXECUTION_ABORTED" + }, { + no: 3, + name: "RUN_TERMINAL_COMMAND_ENDED_REASON_EXECUTION_FAILED" + }, { + no: 4, + name: "RUN_TERMINAL_COMMAND_ENDED_REASON_ERROR_OCCURRED_CHECKING_REASON" + }]); + jHt = class ZAe extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ReapplyParams"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new ZAe().fromBinary(e, t); + } + static fromJson(e, t) { + return new ZAe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new ZAe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(ZAe, e, t); + } + }; + zbe = class e$e extends N { + constructor(e) { + super(); + this.isApplied = false; + this.applyFailed = false; + this.linterErrors = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ReapplyResult"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "diff", + kind: "message", + T: uR + }, { + no: 2, + name: "is_applied", + kind: "scalar", + T: 8 + }, { + no: 3, + name: "apply_failed", + kind: "scalar", + T: 8 + }, { + no: 4, + name: "linter_errors", + kind: "message", + T: YT, + repeated: true + }, { + no: 5, + name: "rejected", + kind: "scalar", + T: 8, + opt: true + }]); + } + static fromBinary(e, t) { + return new e$e().fromBinary(e, t); + } + static fromJson(e, t) { + return new e$e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new e$e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(e$e, e, t); + } + }; + zHt = class t$e extends N { + constructor(e) { + super(); + this.ruleNames = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.FetchRulesParams"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "rule_names", + kind: "scalar", + T: 9, + repeated: true + }]); + } + static fromBinary(e, t) { + return new t$e().fromBinary(e, t); + } + static fromJson(e, t) { + return new t$e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new t$e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(t$e, e, t); + } + }; + Put = class i$e extends N { + constructor(e) { + super(); + this.rules = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.FetchRulesResult"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "rules", + kind: "message", + T: XT, + repeated: true + }]); + } + static fromBinary(e, t) { + return new i$e().fromBinary(e, t); + } + static fromJson(e, t) { + return new i$e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new i$e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(i$e, e, t); + } + }; + JHt = class s$e extends N { + constructor(e) { + super(); + this.instruction = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.PlannerParams"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "instruction", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "plan", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new s$e().fromBinary(e, t); + } + static fromJson(e, t) { + return new s$e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new s$e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(s$e, e, t); + } + }; + Jbe = class n$e extends N { + constructor(e) { + super(); + this.plan = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.PlannerResult"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "plan", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new n$e().fromBinary(e, t); + } + static fromJson(e, t) { + return new n$e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new n$e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(n$e, e, t); + } + }; + GHt = class r$e extends N { + constructor(e) { + super(); + this.targetFiles = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetRelatedFilesParams"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "target_files", + kind: "scalar", + T: 9, + repeated: true + }]); + } + static fromBinary(e, t) { + return new r$e().fromBinary(e, t); + } + static fromJson(e, t) { + return new r$e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new r$e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(r$e, e, t); + } + }; + KHt = class o$e extends N { + constructor(e) { + super(); + this.files = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetRelatedFilesResult"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "files", + kind: "message", + T: Ags, + repeated: true + }]); + } + static fromBinary(e, t) { + return new o$e().fromBinary(e, t); + } + static fromJson(e, t) { + return new o$e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new o$e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(o$e, e, t); + } + }; + Ags = class a$e extends N { + constructor(e) { + super(); + this.uri = ""; + this.score = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetRelatedFilesResult.File"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "uri", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "score", + kind: "scalar", + T: 2 + }]); + } + static fromBinary(e, t) { + return new a$e().fromBinary(e, t); + } + static fromJson(e, t) { + return new a$e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new a$e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(a$e, e, t); + } + }; + $gs = class l$e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ReapplyStream"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new l$e().fromBinary(e, t); + } + static fromJson(e, t) { + return new l$e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new l$e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(l$e, e, t); + } + }; + ctr = class c$e extends N { + constructor(e) { + super(); + this.command = ""; + this.explanation = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RunTerminalCommandArguments"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "command", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "explanation", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new c$e().fromBinary(e, t); + } + static fromJson(e, t) { + return new c$e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new c$e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(c$e, e, t); + } + }; + utr = class u$e extends N { + constructor(e) { + super(); + this.query = ""; + this.targetDirectories = []; + this.explanation = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SemanticSearchArguments"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "query", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "target_directories", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 3, + name: "explanation", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new u$e().fromBinary(e, t); + } + static fromJson(e, t) { + return new u$e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new u$e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(u$e, e, t); + } + }; + Wie = class d$e extends N { + constructor(e) { + super(); + this.clientVisibleErrorMessage = ""; + this.modelVisibleErrorMessage = ""; + this.errorDetails = { + case: undefined + }; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ToolResultError"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "client_visible_error_message", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "model_visible_error_message", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "actual_error_message_only_send_from_client_to_server_never_the_other_way_around_because_that_may_be_a_security_risk", + kind: "scalar", + T: 9, + opt: true + }, { + no: 5, + name: "edit_file_error_details", + kind: "message", + T: Fgs, + oneof: "error_details" + }, { + no: 6, + name: "search_replace_error_details", + kind: "message", + T: Ogs, + oneof: "error_details" + }]); + } + static fromBinary(e, t) { + return new d$e().fromBinary(e, t); + } + static fromJson(e, t) { + return new d$e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new d$e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(d$e, e, t); + } + }; + Fgs = class h$e extends N { + constructor(e) { + super(); + this.numLinesInFileBeforeEdit = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ToolResultError.EditFileError"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "num_lines_in_file_before_edit", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new h$e().fromBinary(e, t); + } + static fromJson(e, t) { + return new h$e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new h$e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(h$e, e, t); + } + }; + Ogs = class f$e extends N { + constructor(e) { + super(); + this.numLinesInFileBeforeEdit = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ToolResultError.SearchReplaceError"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "num_lines_in_file_before_edit", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new f$e().fromBinary(e, t); + } + static fromJson(e, t) { + return new f$e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new f$e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(f$e, e, t); + } + }; + Hz = class g$e extends N { + constructor(e) { + super(); + this.tool = at.UNSPECIFIED; + this.params = { + case: undefined + }; + this.toolCallId = ""; + this.name = ""; + this.isStreaming = false; + this.isLastMessage = false; + this.rawArgs = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ClientSideToolV2Call"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "tool", + kind: "enum", + T: m.getEnumType(at) + }, { + no: 2, + name: "read_semsearch_files_params", + kind: "message", + T: Fut, + oneof: "params" + }, { + no: 4, + name: "read_file_for_imports_params", + kind: "message", + T: _ut, + oneof: "params" + }, { + no: 5, + name: "ripgrep_search_params", + kind: "message", + T: eqt, + oneof: "params" + }, { + no: 7, + name: "run_terminal_command_params", + kind: "message", + T: gqt, + oneof: "params" + }, { + no: 8, + name: "read_file_params", + kind: "message", + T: ZHt, + oneof: "params" + }, { + no: 12, + name: "list_dir_params", + kind: "message", + T: QHt, + oneof: "params" + }, { + no: 13, + name: "edit_file_params", + kind: "message", + T: Lut, + oneof: "params" + }, { + no: 16, + name: "file_search_params", + kind: "message", + T: XHt, + oneof: "params" + }, { + no: 17, + name: "semantic_search_full_params", + kind: "message", + T: hqt, + oneof: "params" + }, { + no: 18, + name: "create_file_params", + kind: "message", + T: But, + oneof: "params" + }, { + no: 19, + name: "delete_file_params", + kind: "message", + T: Wut, + oneof: "params" + }, { + no: 20, + name: "reapply_params", + kind: "message", + T: jHt, + oneof: "params" + }, { + no: 21, + name: "get_related_files_params", + kind: "message", + T: GHt, + oneof: "params" + }, { + no: 22, + name: "parallel_apply_params", + kind: "message", + T: vqt, + oneof: "params" + }, { + no: 23, + name: "run_terminal_command_v2_params", + kind: "message", + T: yqt, + oneof: "params" + }, { + no: 24, + name: "fetch_rules_params", + kind: "message", + T: zHt, + oneof: "params" + }, { + no: 25, + name: "planner_params", + kind: "message", + T: JHt, + oneof: "params" + }, { + no: 26, + name: "web_search_params", + kind: "message", + T: wqt, + oneof: "params" + }, { + no: 27, + name: "mcp_params", + kind: "message", + T: xqt, + oneof: "params" + }, { + no: 28, + name: "web_viewer_params", + kind: "message", + T: Cqt, + oneof: "params" + }, { + no: 29, + name: "diff_history_params", + kind: "message", + T: kqt, + oneof: "params" + }, { + no: 30, + name: "implementer_params", + kind: "message", + T: Jut, + oneof: "params" + }, { + no: 31, + name: "search_symbols_params", + kind: "message", + T: Iqt, + oneof: "params" + }, { + no: 32, + name: "background_composer_followup_params", + kind: "message", + T: Tqt, + oneof: "params" + }, { + no: 33, + name: "knowledge_base_params", + kind: "message", + T: Pqt, + oneof: "params" + }, { + no: 3, + name: "tool_call_id", + kind: "scalar", + T: 9 + }, { + no: 6, + name: "timeout_ms", + kind: "scalar", + T: 1, + opt: true + }, { + no: 9, + name: "name", + kind: "scalar", + T: 9 + }, { + no: 14, + name: "is_streaming", + kind: "scalar", + T: 8 + }, { + no: 15, + name: "is_last_message", + kind: "scalar", + T: 8 + }, { + no: 10, + name: "raw_args", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new g$e().fromBinary(e, t); + } + static fromJson(e, t) { + return new g$e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new g$e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(g$e, e, t); + } + }; + Zl = class p$e extends N { + constructor(e) { + super(); + this.tool = at.UNSPECIFIED; + this.result = { + case: undefined + }; + this.toolCallId = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ClientSideToolV2Result"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "tool", + kind: "enum", + T: m.getEnumType(at) + }, { + no: 2, + name: "read_semsearch_files_result", + kind: "message", + T: Hie, + oneof: "result" + }, { + no: 3, + name: "read_file_for_imports_result", + kind: "message", + T: fqt, + oneof: "result" + }, { + no: 4, + name: "ripgrep_search_result", + kind: "message", + T: Nut, + oneof: "result" + }, { + no: 5, + name: "run_terminal_command_result", + kind: "message", + T: Vut, + oneof: "result" + }, { + no: 6, + name: "read_file_result", + kind: "message", + T: Vie, + oneof: "result" + }, { + no: 9, + name: "list_dir_result", + kind: "message", + T: qz, + oneof: "result" + }, { + no: 10, + name: "edit_file_result", + kind: "message", + T: ZM, + oneof: "result" + }, { + no: 11, + name: "file_search_result", + kind: "message", + T: Rut, + oneof: "result" + }, { + no: 18, + name: "semantic_search_full_result", + kind: "message", + T: Out, + oneof: "result" + }, { + no: 19, + name: "create_file_result", + kind: "message", + T: Uut, + oneof: "result" + }, { + no: 20, + name: "delete_file_result", + kind: "message", + T: W7, + oneof: "result" + }, { + no: 21, + name: "reapply_result", + kind: "message", + T: zbe, + oneof: "result" + }, { + no: 22, + name: "get_related_files_result", + kind: "message", + T: KHt, + oneof: "result" + }, { + no: 23, + name: "parallel_apply_result", + kind: "message", + T: Ybe, + oneof: "result" + }, { + no: 24, + name: "run_terminal_command_v2_result", + kind: "message", + T: i5, + oneof: "result" + }, { + no: 25, + name: "fetch_rules_result", + kind: "message", + T: Put, + oneof: "result" + }, { + no: 26, + name: "planner_result", + kind: "message", + T: Jbe, + oneof: "result" + }, { + no: 27, + name: "web_search_result", + kind: "message", + T: zz, + oneof: "result" + }, { + no: 28, + name: "mcp_result", + kind: "message", + T: jut, + oneof: "result" + }, { + no: 29, + name: "web_viewer_result", + kind: "message", + T: Zbe, + oneof: "result" + }, { + no: 30, + name: "diff_history_result", + kind: "message", + T: zut, + oneof: "result" + }, { + no: 31, + name: "implementer_result", + kind: "message", + T: eve, + oneof: "result" + }, { + no: 32, + name: "search_symbols_result", + kind: "message", + T: Gut, + oneof: "result" + }, { + no: 33, + name: "background_composer_followup_result", + kind: "message", + T: Jz, + oneof: "result" + }, { + no: 34, + name: "knowledge_base_result", + kind: "message", + T: ive, + oneof: "result" + }, { + no: 35, + name: "tool_call_id", + kind: "scalar", + T: 9 + }, { + no: 8, + name: "error", + kind: "message", + T: Wie, + opt: true + }]); + } + static fromBinary(e, t) { + return new p$e().fromBinary(e, t); + } + static fromJson(e, t) { + return new p$e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new p$e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(p$e, e, t); + } + }; + _gs = class m$e extends N { + constructor(e) { + super(); + this.tool = at.UNSPECIFIED; + this.toolCallId = ""; + this.name = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamedBackPartialToolCall"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "tool", + kind: "enum", + T: m.getEnumType(at) + }, { + no: 2, + name: "tool_call_id", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "name", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new m$e().fromBinary(e, t); + } + static fromJson(e, t) { + return new m$e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new m$e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(m$e, e, t); + } + }; + YHt = class b$e extends N { + constructor(e) { + super(); + this.tool = at.UNSPECIFIED; + this.toolCallId = ""; + this.params = { + case: undefined + }; + this.name = ""; + this.rawArgs = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamedBackToolCall"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "tool", + kind: "enum", + T: m.getEnumType(at) + }, { + no: 2, + name: "tool_call_id", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "read_semsearch_files_stream", + kind: "message", + T: sps, + oneof: "params" + }, { + no: 4, + name: "read_file_for_imports_stream", + kind: "message", + T: ops, + oneof: "params" + }, { + no: 5, + name: "ripgrep_search_stream", + kind: "message", + T: ips, + oneof: "params" + }, { + no: 6, + name: "run_terminal_command_stream", + kind: "message", + T: ups, + oneof: "params" + }, { + no: 7, + name: "read_file_stream", + kind: "message", + T: jgs, + oneof: "params" + }, { + no: 12, + name: "list_dir_stream", + kind: "message", + T: qgs, + oneof: "params" + }, { + no: 13, + name: "edit_file_stream", + kind: "message", + T: Ugs, + oneof: "params" + }, { + no: 14, + name: "file_search_stream", + kind: "message", + T: Wgs, + oneof: "params" + }, { + no: 19, + name: "semantic_search_full_stream", + kind: "message", + T: rps, + oneof: "params" + }, { + no: 20, + name: "create_file_stream", + kind: "message", + T: aps, + oneof: "params" + }, { + no: 21, + name: "delete_file_stream", + kind: "message", + T: lps, + oneof: "params" + }, { + no: 22, + name: "reapply_stream", + kind: "message", + T: $gs, + oneof: "params" + }, { + no: 23, + name: "get_related_files_stream", + kind: "message", + T: nps, + oneof: "params" + }, { + no: 24, + name: "parallel_apply_stream", + kind: "message", + T: bms, + oneof: "params" + }, { + no: 25, + name: "run_terminal_command_v2_stream", + kind: "message", + T: yms, + oneof: "params" + }, { + no: 26, + name: "fetch_rules_stream", + kind: "message", + T: wms, + oneof: "params" + }, { + no: 27, + name: "planner_stream", + kind: "message", + T: Cms, + oneof: "params" + }, { + no: 28, + name: "web_search_stream", + kind: "message", + T: xms, + oneof: "params" + }, { + no: 29, + name: "mcp_stream", + kind: "message", + T: Bms, + oneof: "params" + }, { + no: 30, + name: "web_viewer_stream", + kind: "message", + T: _ms, + oneof: "params" + }, { + no: 31, + name: "diff_history_stream", + kind: "message", + T: Wms, + oneof: "params" + }, { + no: 32, + name: "implementer_stream", + kind: "message", + T: Hms, + oneof: "params" + }, { + no: 33, + name: "search_symbols_stream", + kind: "message", + T: qms, + oneof: "params" + }, { + no: 34, + name: "background_composer_followup_stream", + kind: "message", + T: jms, + oneof: "params" + }, { + no: 35, + name: "knowledge_base_stream", + kind: "message", + T: zms, + oneof: "params" + }, { + no: 8, + name: "name", + kind: "scalar", + T: 9 + }, { + no: 9, + name: "raw_args", + kind: "scalar", + T: 9 + }, { + no: 10, + name: "error", + kind: "message", + T: Wie, + opt: true + }]); + } + static fromBinary(e, t) { + return new b$e().fromBinary(e, t); + } + static fromJson(e, t) { + return new b$e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new b$e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(b$e, e, t); + } + }; + Lut = class v$e extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.language = ""; + this.blocking = false; + this.contents = ""; + this.lineRanges = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.EditFileParams"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "language", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "blocking", + kind: "scalar", + T: 8 + }, { + no: 3, + name: "contents", + kind: "scalar", + T: 9 + }, { + no: 5, + name: "instructions", + kind: "scalar", + T: 9, + opt: true + }, { + no: 12, + name: "should_edit_file_fail_for_large_files", + kind: "scalar", + T: 8, + opt: true + }, { + no: 6, + name: "old_string", + kind: "scalar", + T: 9, + opt: true + }, { + no: 7, + name: "new_string", + kind: "scalar", + T: 9, + opt: true + }, { + no: 8, + name: "allow_multiple_matches", + kind: "scalar", + T: 8, + opt: true + }, { + no: 10, + name: "use_whitespace_insensitive_fallback", + kind: "scalar", + T: 8, + opt: true + }, { + no: 11, + name: "use_did_you_mean_fuzzy_match", + kind: "scalar", + T: 8, + opt: true + }, { + no: 9, + name: "line_ranges", + kind: "message", + T: Kv, + repeated: true + }]); + } + static fromBinary(e, t) { + return new v$e().fromBinary(e, t); + } + static fromJson(e, t) { + return new v$e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new v$e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(v$e, e, t); + } + }; + ZM = class y$e extends N { + constructor(e) { + super(); + this.isApplied = false; + this.applyFailed = false; + this.linterErrors = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.EditFileResult"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "diff", + kind: "message", + T: uR + }, { + no: 2, + name: "is_applied", + kind: "scalar", + T: 8 + }, { + no: 3, + name: "apply_failed", + kind: "scalar", + T: 8 + }, { + no: 4, + name: "linter_errors", + kind: "message", + T: YT, + repeated: true + }, { + no: 5, + name: "rejected", + kind: "scalar", + T: 8, + opt: true + }, { + no: 6, + name: "num_matches", + kind: "scalar", + T: 5, + opt: true + }, { + no: 7, + name: "whitespace_insensitive_fallback_found_match", + kind: "scalar", + T: 8, + opt: true + }, { + no: 8, + name: "no_match_found_in_line_ranges", + kind: "scalar", + T: 8, + opt: true + }, { + no: 9, + name: "num_lines_in_file", + kind: "scalar", + T: 5, + opt: true + }]); + } + static fromBinary(e, t) { + return new y$e().fromBinary(e, t); + } + static fromJson(e, t) { + return new y$e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new y$e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(y$e, e, t); + } + }; + uR = class w$e extends N { + constructor(e) { + super(); + this.chunks = []; + this.editor = Gbe.UNSPECIFIED; + this.hitTimeout = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.EditFileResult.FileDiff"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "chunks", + kind: "message", + T: Bgs, + repeated: true + }, { + no: 2, + name: "editor", + kind: "enum", + T: m.getEnumType(Gbe) + }, { + no: 3, + name: "hit_timeout", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new w$e().fromBinary(e, t); + } + static fromJson(e, t) { + return new w$e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new w$e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(w$e, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.AI = 1] = "AI"; + i[i.HUMAN = 2] = "HUMAN"; + })(Gbe ||= {}); + m.util.setEnumType(Gbe, "aiserver.v1.EditFileResult.FileDiff.Editor", [{ + no: 0, + name: "EDITOR_UNSPECIFIED" + }, { + no: 1, + name: "EDITOR_AI" + }, { + no: 2, + name: "EDITOR_HUMAN" + }]); + Bgs = class C$e extends N { + constructor(e) { + super(); + this.diffString = ""; + this.oldStart = 0; + this.newStart = 0; + this.oldLines = 0; + this.newLines = 0; + this.linesRemoved = 0; + this.linesAdded = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.EditFileResult.FileDiff.ChunkDiff"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "diff_string", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "old_start", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "new_start", + kind: "scalar", + T: 5 + }, { + no: 4, + name: "old_lines", + kind: "scalar", + T: 5 + }, { + no: 5, + name: "new_lines", + kind: "scalar", + T: 5 + }, { + no: 6, + name: "lines_removed", + kind: "scalar", + T: 5 + }, { + no: 7, + name: "lines_added", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new C$e().fromBinary(e, t); + } + static fromJson(e, t) { + return new C$e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new C$e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(C$e, e, t); + } + }; + Ugs = class S$e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.EditFileStream"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new S$e().fromBinary(e, t); + } + static fromJson(e, t) { + return new S$e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new S$e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(S$e, e, t); + } + }; + XHt = class x$e extends N { + constructor(e) { + super(); + this.query = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ToolCallFileSearchParams"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "query", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new x$e().fromBinary(e, t); + } + static fromJson(e, t) { + return new x$e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new x$e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(x$e, e, t); + } + }; + dtr = class k$e extends N { + constructor(e) { + super(); + this.targetFiles = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ToolCallGetRelatedFilesParams"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "target_files", + kind: "scalar", + T: 9, + repeated: true + }]); + } + static fromBinary(e, t) { + return new k$e().fromBinary(e, t); + } + static fromJson(e, t) { + return new k$e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new k$e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(k$e, e, t); + } + }; + Wgs = class E$e extends N { + constructor(e) { + super(); + this.query = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ToolCallFileSearchStream"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "query", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new E$e().fromBinary(e, t); + } + static fromJson(e, t) { + return new E$e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new E$e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(E$e, e, t); + } + }; + Rut = class I$e extends N { + constructor(e) { + super(); + this.files = []; + this.numResults = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ToolCallFileSearchResult"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "files", + kind: "message", + T: Vgs, + repeated: true + }, { + no: 2, + name: "limit_hit", + kind: "scalar", + T: 8, + opt: true + }, { + no: 3, + name: "num_results", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new I$e().fromBinary(e, t); + } + static fromJson(e, t) { + return new I$e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new I$e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(I$e, e, t); + } + }; + Vgs = class D$e extends N { + constructor(e) { + super(); + this.uri = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ToolCallFileSearchResult.File"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "uri", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new D$e().fromBinary(e, t); + } + static fromJson(e, t) { + return new D$e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new D$e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(D$e, e, t); + } + }; + QHt = class T$e extends N { + constructor(e) { + super(); + this.directoryPath = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ListDirParams"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "directory_path", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new T$e().fromBinary(e, t); + } + static fromJson(e, t) { + return new T$e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new T$e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(T$e, e, t); + } + }; + qz = class P$e extends N { + constructor(e) { + super(); + this.files = []; + this.directoryRelativeWorkspacePath = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ListDirResult"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "files", + kind: "message", + T: Hgs, + repeated: true + }, { + no: 2, + name: "directory_relative_workspace_path", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new P$e().fromBinary(e, t); + } + static fromJson(e, t) { + return new P$e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new P$e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(P$e, e, t); + } + }; + Hgs = class L$e extends N { + constructor(e) { + super(); + this.name = ""; + this.isDirectory = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ListDirResult.File"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "name", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "is_directory", + kind: "scalar", + T: 8 + }, { + no: 3, + name: "size", + kind: "scalar", + T: 3, + opt: true + }, { + no: 4, + name: "last_modified", + kind: "message", + T: $z, + opt: true + }, { + no: 5, + name: "num_children", + kind: "scalar", + T: 5, + opt: true + }, { + no: 6, + name: "num_lines", + kind: "scalar", + T: 5, + opt: true + }]); + } + static fromBinary(e, t) { + return new L$e().fromBinary(e, t); + } + static fromJson(e, t) { + return new L$e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new L$e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(L$e, e, t); + } + }; + qgs = class R$e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ListDirStream"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new R$e().fromBinary(e, t); + } + static fromJson(e, t) { + return new R$e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new R$e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(R$e, e, t); + } + }; + ZHt = class N$e extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.readEntireFile = false; + this.fileIsAllowedToBeReadEntirely = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ReadFileParams"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "read_entire_file", + kind: "scalar", + T: 8 + }, { + no: 3, + name: "start_line_one_indexed", + kind: "scalar", + T: 5, + opt: true + }, { + no: 4, + name: "end_line_one_indexed_inclusive", + kind: "scalar", + T: 5, + opt: true + }, { + no: 5, + name: "file_is_allowed_to_be_read_entirely", + kind: "scalar", + T: 8 + }, { + no: 6, + name: "max_lines", + kind: "scalar", + T: 5, + opt: true + }, { + no: 7, + name: "max_chars", + kind: "scalar", + T: 5, + opt: true + }, { + no: 8, + name: "min_lines", + kind: "scalar", + T: 5, + opt: true + }]); + } + static fromBinary(e, t) { + return new N$e().fromBinary(e, t); + } + static fromJson(e, t) { + return new N$e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new N$e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(N$e, e, t); + } + }; + Vie = class M$e extends N { + constructor(e) { + super(); + this.contents = ""; + this.didDowngradeToLineRange = false; + this.didShortenLineRange = false; + this.didSetDefaultLineRange = false; + this.relativeWorkspacePath = ""; + this.didShortenCharRange = false; + this.matchingCursorRules = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ReadFileResult"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "contents", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "did_downgrade_to_line_range", + kind: "scalar", + T: 8 + }, { + no: 3, + name: "did_shorten_line_range", + kind: "scalar", + T: 8 + }, { + no: 4, + name: "did_set_default_line_range", + kind: "scalar", + T: 8 + }, { + no: 5, + name: "full_file_contents", + kind: "scalar", + T: 9, + opt: true + }, { + no: 6, + name: "outline", + kind: "scalar", + T: 9, + opt: true + }, { + no: 7, + name: "start_line_one_indexed", + kind: "scalar", + T: 5, + opt: true + }, { + no: 8, + name: "end_line_one_indexed_inclusive", + kind: "scalar", + T: 5, + opt: true + }, { + no: 9, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 10, + name: "did_shorten_char_range", + kind: "scalar", + T: 8 + }, { + no: 11, + name: "read_full_file", + kind: "scalar", + T: 8, + opt: true + }, { + no: 12, + name: "total_lines", + kind: "scalar", + T: 5, + opt: true + }, { + no: 13, + name: "matching_cursor_rules", + kind: "message", + T: XT, + repeated: true + }]); + } + static fromBinary(e, t) { + return new M$e().fromBinary(e, t); + } + static fromJson(e, t) { + return new M$e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new M$e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(M$e, e, t); + } + }; + jgs = class A$e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ReadFileStream"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new A$e().fromBinary(e, t); + } + static fromJson(e, t) { + return new A$e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new A$e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(A$e, e, t); + } + }; + eqt = class $$e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RipgrepSearchParams"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "options", + kind: "message", + T: Ggs + }, { + no: 2, + name: "pattern_info", + kind: "message", + T: zgs + }]); + } + static fromBinary(e, t) { + return new $$e().fromBinary(e, t); + } + static fromJson(e, t) { + return new $$e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new $$e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals($$e, e, t); + } + }; + zgs = class F$e extends N { + constructor(e) { + super(); + this.pattern = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RipgrepSearchParams.IPatternInfoProto"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "pattern", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "is_reg_exp", + kind: "scalar", + T: 8, + opt: true + }, { + no: 3, + name: "is_word_match", + kind: "scalar", + T: 8, + opt: true + }, { + no: 4, + name: "word_separators", + kind: "scalar", + T: 9, + opt: true + }, { + no: 5, + name: "is_multiline", + kind: "scalar", + T: 8, + opt: true + }, { + no: 6, + name: "is_unicode", + kind: "scalar", + T: 8, + opt: true + }, { + no: 7, + name: "is_case_sensitive", + kind: "scalar", + T: 8, + opt: true + }, { + no: 8, + name: "notebook_info", + kind: "message", + T: Jgs + }, { + no: 9, + name: "pattern_was_escaped", + kind: "scalar", + T: 8, + opt: true + }]); + } + static fromBinary(e, t) { + return new F$e().fromBinary(e, t); + } + static fromJson(e, t) { + return new F$e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new F$e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(F$e, e, t); + } + }; + Jgs = class O$e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RipgrepSearchParams.IPatternInfoProto.INotebookPatternInfoProto"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "is_in_notebook_markdown_input", + kind: "scalar", + T: 8, + opt: true + }, { + no: 2, + name: "is_in_notebook_markdown_preview", + kind: "scalar", + T: 8, + opt: true + }, { + no: 3, + name: "is_in_notebook_cell_input", + kind: "scalar", + T: 8, + opt: true + }, { + no: 4, + name: "is_in_notebook_cell_output", + kind: "scalar", + T: 8, + opt: true + }]); + } + static fromBinary(e, t) { + return new O$e().fromBinary(e, t); + } + static fromJson(e, t) { + return new O$e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new O$e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(O$e, e, t); + } + }; + Ggs = class _$e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RipgrepSearchParams.ITextQueryBuilderOptionsProto"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "preview_options", + kind: "message", + T: Qgs + }, { + no: 2, + name: "file_encoding", + kind: "scalar", + T: 9, + opt: true + }, { + no: 3, + name: "surrounding_context", + kind: "scalar", + T: 5, + opt: true + }, { + no: 4, + name: "is_smart_case", + kind: "scalar", + T: 8, + opt: true + }, { + no: 5, + name: "notebook_search_config", + kind: "message", + T: Zgs + }, { + no: 6, + name: "exclude_pattern", + kind: "message", + T: Ygs + }, { + no: 7, + name: "include_pattern", + kind: "message", + T: tqt + }, { + no: 8, + name: "expand_patterns", + kind: "scalar", + T: 8, + opt: true + }, { + no: 9, + name: "max_results", + kind: "scalar", + T: 5, + opt: true + }, { + no: 10, + name: "max_file_size", + kind: "scalar", + T: 5, + opt: true + }, { + no: 11, + name: "disregard_ignore_files", + kind: "scalar", + T: 8, + opt: true + }, { + no: 12, + name: "disregard_global_ignore_files", + kind: "scalar", + T: 8, + opt: true + }, { + no: 13, + name: "disregard_parent_ignore_files", + kind: "scalar", + T: 8, + opt: true + }, { + no: 14, + name: "disregard_exclude_settings", + kind: "scalar", + T: 8, + opt: true + }, { + no: 15, + name: "disregard_search_exclude_settings", + kind: "scalar", + T: 8, + opt: true + }, { + no: 16, + name: "ignore_symlinks", + kind: "scalar", + T: 8, + opt: true + }, { + no: 17, + name: "only_open_editors", + kind: "scalar", + T: 8, + opt: true + }, { + no: 18, + name: "only_file_scheme", + kind: "scalar", + T: 8, + opt: true + }, { + no: 19, + name: "reason", + kind: "scalar", + T: 9, + opt: true + }, { + no: 20, + name: "extra_file_resources", + kind: "message", + T: Kgs + }]); + } + static fromBinary(e, t) { + return new _$e().fromBinary(e, t); + } + static fromJson(e, t) { + return new _$e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new _$e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(_$e, e, t); + } + }; + Kgs = class B$e extends N { + constructor(e) { + super(); + this.extraFileResources = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RipgrepSearchParams.ITextQueryBuilderOptionsProto.ExtraFileResourcesProto"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "extra_file_resources", + kind: "scalar", + T: 9, + repeated: true + }]); + } + static fromBinary(e, t) { + return new B$e().fromBinary(e, t); + } + static fromJson(e, t) { + return new B$e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new B$e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(B$e, e, t); + } + }; + Ygs = class U$e extends N { + constructor(e) { + super(); + this.excludePattern = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RipgrepSearchParams.ITextQueryBuilderOptionsProto.ExcludePatternProto"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "exclude_pattern", + kind: "message", + T: Xgs, + repeated: true + }]); + } + static fromBinary(e, t) { + return new U$e().fromBinary(e, t); + } + static fromJson(e, t) { + return new U$e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new U$e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(U$e, e, t); + } + }; + Xgs = class W$e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RipgrepSearchParams.ITextQueryBuilderOptionsProto.ISearchPatternBuilderProto"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "uri", + kind: "scalar", + T: 9, + opt: true + }, { + no: 2, + name: "pattern", + kind: "message", + T: tqt + }]); + } + static fromBinary(e, t) { + return new W$e().fromBinary(e, t); + } + static fromJson(e, t) { + return new W$e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new W$e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(W$e, e, t); + } + }; + tqt = class V$e extends N { + constructor(e) { + super(); + this.patterns = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RipgrepSearchParams.ITextQueryBuilderOptionsProto.ISearchPathPatternBuilderProto"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "pattern", + kind: "scalar", + T: 9, + opt: true + }, { + no: 2, + name: "patterns", + kind: "scalar", + T: 9, + repeated: true + }]); + } + static fromBinary(e, t) { + return new V$e().fromBinary(e, t); + } + static fromJson(e, t) { + return new V$e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new V$e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(V$e, e, t); + } + }; + Qgs = class H$e extends N { + constructor(e) { + super(); + this.matchLines = 0; + this.charsPerLine = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RipgrepSearchParams.ITextQueryBuilderOptionsProto.ITextSearchPreviewOptionsProto"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "match_lines", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "chars_per_line", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new H$e().fromBinary(e, t); + } + static fromJson(e, t) { + return new H$e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new H$e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(H$e, e, t); + } + }; + Zgs = class q$e extends N { + constructor(e) { + super(); + this.includeMarkupInput = false; + this.includeMarkupPreview = false; + this.includeCodeInput = false; + this.includeOutput = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RipgrepSearchParams.ITextQueryBuilderOptionsProto.INotebookSearchConfigProto"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "include_markup_input", + kind: "scalar", + T: 8 + }, { + no: 2, + name: "include_markup_preview", + kind: "scalar", + T: 8 + }, { + no: 3, + name: "include_code_input", + kind: "scalar", + T: 8 + }, { + no: 4, + name: "include_output", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new q$e().fromBinary(e, t); + } + static fromJson(e, t) { + return new q$e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new q$e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(q$e, e, t); + } + }; + Nut = class j$e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RipgrepSearchResult"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "internal", + kind: "message", + T: iqt + }]); + } + static fromBinary(e, t) { + return new j$e().fromBinary(e, t); + } + static fromJson(e, t) { + return new j$e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new j$e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(j$e, e, t); + } + }; + iqt = class z$e extends N { + constructor(e) { + super(); + this.results = []; + this.messages = []; + this.stats = { + case: undefined + }; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RipgrepSearchResultInternal"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "results", + kind: "message", + T: sqt, + repeated: true + }, { + no: 2, + name: "exit", + kind: "enum", + T: m.getEnumType(jz), + opt: true + }, { + no: 3, + name: "limit_hit", + kind: "scalar", + T: 8, + opt: true + }, { + no: 4, + name: "messages", + kind: "message", + T: tps, + repeated: true + }, { + no: 5, + name: "file_search_stats", + kind: "message", + T: oqt, + oneof: "stats" + }, { + no: 6, + name: "text_search_stats", + kind: "message", + T: aqt, + oneof: "stats" + }]); + } + static fromBinary(e, t) { + return new z$e().fromBinary(e, t); + } + static fromJson(e, t) { + return new z$e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new z$e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(z$e, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.INFORMATION = 1] = "INFORMATION"; + i[i.WARNING = 2] = "WARNING"; + })(_7 ||= {}); + m.util.setEnumType(_7, "aiserver.v1.RipgrepSearchResultInternal.TextSearchCompleteMessageType", [{ + no: 0, + name: "TEXT_SEARCH_COMPLETE_MESSAGE_TYPE_UNSPECIFIED" + }, { + no: 1, + name: "TEXT_SEARCH_COMPLETE_MESSAGE_TYPE_INFORMATION" + }, { + no: 2, + name: "TEXT_SEARCH_COMPLETE_MESSAGE_TYPE_WARNING" + }]); + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.NORMAL = 1] = "NORMAL"; + i[i.NEW_SEARCH_STARTED = 2] = "NEW_SEARCH_STARTED"; + })(jz ||= {}); + m.util.setEnumType(jz, "aiserver.v1.RipgrepSearchResultInternal.SearchCompletionExitCode", [{ + no: 0, + name: "SEARCH_COMPLETION_EXIT_CODE_UNSPECIFIED" + }, { + no: 1, + name: "SEARCH_COMPLETION_EXIT_CODE_NORMAL" + }, { + no: 2, + name: "SEARCH_COMPLETION_EXIT_CODE_NEW_SEARCH_STARTED" + }]); + sqt = class J$e extends N { + constructor(e) { + super(); + this.resource = ""; + this.results = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RipgrepSearchResultInternal.IFileMatch"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "resource", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "results", + kind: "message", + T: Mut, + repeated: true + }]); + } + static fromBinary(e, t) { + return new J$e().fromBinary(e, t); + } + static fromJson(e, t) { + return new J$e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new J$e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(J$e, e, t); + } + }; + Mut = class G$e extends N { + constructor(e) { + super(); + this.result = { + case: undefined + }; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RipgrepSearchResultInternal.ITextSearchResult"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "match", + kind: "message", + T: nqt, + oneof: "result" + }, { + no: 2, + name: "context", + kind: "message", + T: rqt, + oneof: "result" + }]); + } + static fromBinary(e, t) { + return new G$e().fromBinary(e, t); + } + static fromJson(e, t) { + return new G$e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new G$e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(G$e, e, t); + } + }; + nqt = class K$e extends N { + constructor(e) { + super(); + this.rangeLocations = []; + this.previewText = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RipgrepSearchResultInternal.ITextSearchMatch"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "uri", + kind: "scalar", + T: 9, + opt: true + }, { + no: 2, + name: "range_locations", + kind: "message", + T: eps, + repeated: true + }, { + no: 3, + name: "preview_text", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "webview_index", + kind: "scalar", + T: 5, + opt: true + }, { + no: 5, + name: "cell_fragment", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new K$e().fromBinary(e, t); + } + static fromJson(e, t) { + return new K$e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new K$e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(K$e, e, t); + } + }; + rqt = class Y$e extends N { + constructor(e) { + super(); + this.text = ""; + this.lineNumber = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RipgrepSearchResultInternal.ITextSearchContext"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "uri", + kind: "scalar", + T: 9, + opt: true + }, { + no: 2, + name: "text", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "line_number", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new Y$e().fromBinary(e, t); + } + static fromJson(e, t) { + return new Y$e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Y$e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Y$e, e, t); + } + }; + eps = class X$e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RipgrepSearchResultInternal.ISearchRangeSetPairing"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "source", + kind: "message", + T: Aut + }, { + no: 2, + name: "preview", + kind: "message", + T: Aut + }]); + } + static fromBinary(e, t) { + return new X$e().fromBinary(e, t); + } + static fromJson(e, t) { + return new X$e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new X$e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(X$e, e, t); + } + }; + Aut = class Q$e extends N { + constructor(e) { + super(); + this.startLineNumber = 0; + this.startColumn = 0; + this.endLineNumber = 0; + this.endColumn = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RipgrepSearchResultInternal.ISearchRange"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "start_line_number", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "start_column", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "end_line_number", + kind: "scalar", + T: 5 + }, { + no: 4, + name: "end_column", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new Q$e().fromBinary(e, t); + } + static fromJson(e, t) { + return new Q$e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Q$e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Q$e, e, t); + } + }; + tps = class Z$e extends N { + constructor(e) { + super(); + this.text = ""; + this.type = _7.UNSPECIFIED; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RipgrepSearchResultInternal.ITextSearchCompleteMessage"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "text", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "type", + kind: "enum", + T: m.getEnumType(_7) + }, { + no: 3, + name: "trusted", + kind: "scalar", + T: 8, + opt: true + }]); + } + static fromBinary(e, t) { + return new Z$e().fromBinary(e, t); + } + static fromJson(e, t) { + return new Z$e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Z$e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Z$e, e, t); + } + }; + oqt = class e2e extends N { + constructor(e) { + super(); + this.fromCache = false; + this.detailStats = { + case: undefined + }; + this.resultCount = 0; + this.type = B7.UNSPECIFIED; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RipgrepSearchResultInternal.IFileSearchStats"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "from_cache", + kind: "scalar", + T: 8 + }, { + no: 2, + name: "search_engine_stats", + kind: "message", + T: $ut, + oneof: "detail_stats" + }, { + no: 3, + name: "cached_search_stats", + kind: "message", + T: lqt, + oneof: "detail_stats" + }, { + no: 4, + name: "file_search_provider_stats", + kind: "message", + T: cqt, + oneof: "detail_stats" + }, { + no: 5, + name: "result_count", + kind: "scalar", + T: 5 + }, { + no: 6, + name: "type", + kind: "enum", + T: m.getEnumType(B7) + }, { + no: 7, + name: "sorting_time", + kind: "scalar", + T: 5, + opt: true + }]); + } + static fromBinary(e, t) { + return new e2e().fromBinary(e, t); + } + static fromJson(e, t) { + return new e2e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new e2e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(e2e, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.FILE_SEARCH_PROVIDER = 1] = "FILE_SEARCH_PROVIDER"; + i[i.SEARCH_PROCESS = 2] = "SEARCH_PROCESS"; + })(B7 ||= {}); + m.util.setEnumType(B7, "aiserver.v1.RipgrepSearchResultInternal.IFileSearchStats.FileSearchProviderType", [{ + no: 0, + name: "FILE_SEARCH_PROVIDER_TYPE_UNSPECIFIED" + }, { + no: 1, + name: "FILE_SEARCH_PROVIDER_TYPE_FILE_SEARCH_PROVIDER" + }, { + no: 2, + name: "FILE_SEARCH_PROVIDER_TYPE_SEARCH_PROCESS" + }]); + aqt = class t2e extends N { + constructor(e) { + super(); + this.type = t5.UNSPECIFIED; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RipgrepSearchResultInternal.ITextSearchStats"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "type", + kind: "enum", + T: m.getEnumType(t5) + }]); + } + static fromBinary(e, t) { + return new t2e().fromBinary(e, t); + } + static fromJson(e, t) { + return new t2e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new t2e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(t2e, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.TEXT_SEARCH_PROVIDER = 1] = "TEXT_SEARCH_PROVIDER"; + i[i.SEARCH_PROCESS = 2] = "SEARCH_PROCESS"; + i[i.AI_TEXT_SEARCH_PROVIDER = 3] = "AI_TEXT_SEARCH_PROVIDER"; + })(t5 ||= {}); + m.util.setEnumType(t5, "aiserver.v1.RipgrepSearchResultInternal.ITextSearchStats.TextSearchProviderType", [{ + no: 0, + name: "TEXT_SEARCH_PROVIDER_TYPE_UNSPECIFIED" + }, { + no: 1, + name: "TEXT_SEARCH_PROVIDER_TYPE_TEXT_SEARCH_PROVIDER" + }, { + no: 2, + name: "TEXT_SEARCH_PROVIDER_TYPE_SEARCH_PROCESS" + }, { + no: 3, + name: "TEXT_SEARCH_PROVIDER_TYPE_AI_TEXT_SEARCH_PROVIDER" + }]); + $ut = class i2e extends N { + constructor(e) { + super(); + this.fileWalkTime = 0; + this.directoriesWalked = 0; + this.filesWalked = 0; + this.cmdTime = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RipgrepSearchResultInternal.ISearchEngineStats"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "file_walk_time", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "directories_walked", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "files_walked", + kind: "scalar", + T: 5 + }, { + no: 4, + name: "cmd_time", + kind: "scalar", + T: 5 + }, { + no: 5, + name: "cmd_result_count", + kind: "scalar", + T: 5, + opt: true + }]); + } + static fromBinary(e, t) { + return new i2e().fromBinary(e, t); + } + static fromJson(e, t) { + return new i2e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new i2e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(i2e, e, t); + } + }; + lqt = class s2e extends N { + constructor(e) { + super(); + this.cacheWasResolved = false; + this.cacheLookupTime = 0; + this.cacheFilterTime = 0; + this.cacheEntryCount = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RipgrepSearchResultInternal.ICachedSearchStats"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "cache_was_resolved", + kind: "scalar", + T: 8 + }, { + no: 2, + name: "cache_lookup_time", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "cache_filter_time", + kind: "scalar", + T: 5 + }, { + no: 4, + name: "cache_entry_count", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new s2e().fromBinary(e, t); + } + static fromJson(e, t) { + return new s2e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new s2e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(s2e, e, t); + } + }; + cqt = class n2e extends N { + constructor(e) { + super(); + this.providerTime = 0; + this.postProcessTime = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RipgrepSearchResultInternal.IFileSearchProviderStats"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "provider_time", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "post_process_time", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new n2e().fromBinary(e, t); + } + static fromJson(e, t) { + return new n2e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new n2e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(n2e, e, t); + } + }; + ips = class r2e extends N { + constructor(e) { + super(); + this.query = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RipgrepSearchStream"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "query", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new r2e().fromBinary(e, t); + } + static fromJson(e, t) { + return new r2e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new r2e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(r2e, e, t); + } + }; + Fut = class o2e extends N { + constructor(e) { + super(); + this.codeResults = []; + this.query = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ReadSemsearchFilesParams"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "repository_info", + kind: "message", + T: pc + }, { + no: 2, + name: "code_results", + kind: "message", + T: xb, + repeated: true + }, { + no: 3, + name: "query", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new o2e().fromBinary(e, t); + } + static fromJson(e, t) { + return new o2e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new o2e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(o2e, e, t); + } + }; + uqt = class a2e extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.missingReason = U7.UNSPECIFIED; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.MissingFile"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "missing_reason", + kind: "enum", + T: m.getEnumType(U7) + }, { + no: 3, + name: "num_lines", + kind: "scalar", + T: 5, + opt: true + }]); + } + static fromBinary(e, t) { + return new a2e().fromBinary(e, t); + } + static fromJson(e, t) { + return new a2e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new a2e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(a2e, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.TOO_LARGE = 1] = "TOO_LARGE"; + i[i.NOT_FOUND = 2] = "NOT_FOUND"; + })(U7 ||= {}); + m.util.setEnumType(U7, "aiserver.v1.MissingFile.MissingReason", [{ + no: 0, + name: "MISSING_REASON_UNSPECIFIED" + }, { + no: 1, + name: "MISSING_REASON_TOO_LARGE" + }, { + no: 2, + name: "MISSING_REASON_NOT_FOUND" + }]); + dqt = class l2e extends N { + constructor(e) { + super(); + this.knowledge = ""; + this.title = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.Knowledge"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "knowledge", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "title", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new l2e().fromBinary(e, t); + } + static fromJson(e, t) { + return new l2e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new l2e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(l2e, e, t); + } + }; + Hie = class c2e extends N { + constructor(e) { + super(); + this.codeResults = []; + this.allFiles = []; + this.missingFiles = []; + this.knowledgeResults = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ReadSemsearchFilesResult"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "code_results", + kind: "message", + T: xb, + repeated: true + }, { + no: 2, + name: "all_files", + kind: "message", + T: $x, + repeated: true + }, { + no: 3, + name: "missing_files", + kind: "message", + T: uqt, + repeated: true + }, { + no: 4, + name: "knowledge_results", + kind: "message", + T: dqt, + repeated: true + }]); + } + static fromBinary(e, t) { + return new c2e().fromBinary(e, t); + } + static fromJson(e, t) { + return new c2e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new c2e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(c2e, e, t); + } + }; + sps = class u2e extends N { + constructor(e) { + super(); + this.numFiles = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ReadSemsearchFilesStream"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "num_files", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new u2e().fromBinary(e, t); + } + static fromJson(e, t) { + return new u2e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new u2e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(u2e, e, t); + } + }; + nps = class d2e extends N { + constructor(e) { + super(); + this.targetFiles = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetRelatedFilesStream"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "target_files", + kind: "scalar", + T: 9, + repeated: true + }]); + } + static fromBinary(e, t) { + return new d2e().fromBinary(e, t); + } + static fromJson(e, t) { + return new d2e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new d2e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(d2e, e, t); + } + }; + hqt = class h2e extends N { + constructor(e) { + super(); + this.query = ""; + this.topK = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SemanticSearchFullParams"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "repository_info", + kind: "message", + T: pc + }, { + no: 2, + name: "query", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "include_pattern", + kind: "scalar", + T: 9, + opt: true + }, { + no: 4, + name: "exclude_pattern", + kind: "scalar", + T: 9, + opt: true + }, { + no: 5, + name: "top_k", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new h2e().fromBinary(e, t); + } + static fromJson(e, t) { + return new h2e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new h2e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(h2e, e, t); + } + }; + Out = class f2e extends N { + constructor(e) { + super(); + this.codeResults = []; + this.allFiles = []; + this.missingFiles = []; + this.knowledgeResults = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SemanticSearchFullResult"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "code_results", + kind: "message", + T: xb, + repeated: true + }, { + no: 2, + name: "all_files", + kind: "message", + T: $x, + repeated: true + }, { + no: 3, + name: "missing_files", + kind: "message", + T: uqt, + repeated: true + }, { + no: 4, + name: "knowledge_results", + kind: "message", + T: dqt, + repeated: true + }]); + } + static fromBinary(e, t) { + return new f2e().fromBinary(e, t); + } + static fromJson(e, t) { + return new f2e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new f2e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(f2e, e, t); + } + }; + rps = class g2e extends N { + constructor(e) { + super(); + this.numFiles = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SemanticSearchFullStream"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "num_files", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new g2e().fromBinary(e, t); + } + static fromJson(e, t) { + return new g2e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new g2e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(g2e, e, t); + } + }; + ops = class p2e extends N { + constructor(e) { + super(); + this.relativeFilePath = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ReadFileForImportsStream"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_file_path", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new p2e().fromBinary(e, t); + } + static fromJson(e, t) { + return new p2e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new p2e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(p2e, e, t); + } + }; + _ut = class m2e extends N { + constructor(e) { + super(); + this.relativeFilePath = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ReadFileForImportsParams"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_file_path", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new m2e().fromBinary(e, t); + } + static fromJson(e, t) { + return new m2e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new m2e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(m2e, e, t); + } + }; + fqt = class b2e extends N { + constructor(e) { + super(); + this.contents = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ReadFileForImportsResult"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "contents", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new b2e().fromBinary(e, t); + } + static fromJson(e, t) { + return new b2e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new b2e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(b2e, e, t); + } + }; + aps = class v2e extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CreateFileStream"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new v2e().fromBinary(e, t); + } + static fromJson(e, t) { + return new v2e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new v2e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(v2e, e, t); + } + }; + But = class y2e extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CreateFileParams"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new y2e().fromBinary(e, t); + } + static fromJson(e, t) { + return new y2e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new y2e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(y2e, e, t); + } + }; + Uut = class w2e extends N { + constructor(e) { + super(); + this.fileCreatedSuccessfully = false; + this.fileAlreadyExists = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CreateFileResult"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "file_created_successfully", + kind: "scalar", + T: 8 + }, { + no: 2, + name: "file_already_exists", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new w2e().fromBinary(e, t); + } + static fromJson(e, t) { + return new w2e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new w2e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(w2e, e, t); + } + }; + Wut = class C2e extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.DeleteFileParams"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new C2e().fromBinary(e, t); + } + static fromJson(e, t) { + return new C2e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new C2e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(C2e, e, t); + } + }; + W7 = class S2e extends N { + constructor(e) { + super(); + this.rejected = false; + this.fileNonExistent = false; + this.fileDeletedSuccessfully = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.DeleteFileResult"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "rejected", + kind: "scalar", + T: 8 + }, { + no: 2, + name: "file_non_existent", + kind: "scalar", + T: 8 + }, { + no: 3, + name: "file_deleted_successfully", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new S2e().fromBinary(e, t); + } + static fromJson(e, t) { + return new S2e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new S2e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(S2e, e, t); + } + }; + lps = class x2e extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.DeleteFileStream"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new x2e().fromBinary(e, t); + } + static fromJson(e, t) { + return new x2e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new x2e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(x2e, e, t); + } + }; + gqt = class k2e extends N { + constructor(e) { + super(); + this.command = ""; + this.requireUserApproval = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RunTerminalCommandParams"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "command", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "cwd", + kind: "scalar", + T: 9, + opt: true + }, { + no: 3, + name: "new_session", + kind: "scalar", + T: 8, + opt: true + }, { + no: 5, + name: "require_user_approval", + kind: "scalar", + T: 8 + }, { + no: 4, + name: "options", + kind: "message", + T: cps, + opt: true + }]); + } + static fromBinary(e, t) { + return new k2e().fromBinary(e, t); + } + static fromJson(e, t) { + return new k2e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new k2e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(k2e, e, t); + } + }; + cps = class E2e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RunTerminalCommandParams.ExecutionOptions"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "timeout", + kind: "scalar", + T: 5, + opt: true + }, { + no: 2, + name: "skip_ai_check", + kind: "scalar", + T: 8, + opt: true + }, { + no: 3, + name: "command_run_timeout_ms", + kind: "scalar", + T: 5, + opt: true + }, { + no: 4, + name: "command_change_check_interval_ms", + kind: "scalar", + T: 5, + opt: true + }, { + no: 5, + name: "ai_finish_check_max_attempts", + kind: "scalar", + T: 5, + opt: true + }, { + no: 6, + name: "ai_finish_check_interval_ms", + kind: "scalar", + T: 5, + opt: true + }, { + no: 7, + name: "delayer_interval_ms", + kind: "scalar", + T: 5, + opt: true + }]); + } + static fromBinary(e, t) { + return new E2e().fromBinary(e, t); + } + static fromJson(e, t) { + return new E2e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new E2e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(E2e, e, t); + } + }; + Vut = class I2e extends N { + constructor(e) { + super(); + this.output = ""; + this.exitCode = 0; + this.poppedOutIntoBackground = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RunTerminalCommandResult"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "output", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "exit_code", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "rejected", + kind: "scalar", + T: 8, + opt: true + }, { + no: 4, + name: "popped_out_into_background", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new I2e().fromBinary(e, t); + } + static fromJson(e, t) { + return new I2e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new I2e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(I2e, e, t); + } + }; + ups = class D2e extends N { + constructor(e) { + super(); + this.command = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RunTerminalCommandStream"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "command", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new D2e().fromBinary(e, t); + } + static fromJson(e, t) { + return new D2e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new D2e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(D2e, e, t); + } + }; + dps = class T2e extends N { + constructor(e) { + super(); + this.tool = Vz.UNSPECIFIED; + this.params = { + case: undefined + }; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.BuiltinToolCall"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "tool", + kind: "enum", + T: m.getEnumType(Vz) + }, { + no: 2, + name: "search_params", + kind: "message", + T: Lps, + oneof: "params" + }, { + no: 3, + name: "read_chunk_params", + kind: "message", + T: Aps, + oneof: "params" + }, { + no: 4, + name: "gotodef_params", + kind: "message", + T: Hps, + oneof: "params" + }, { + no: 5, + name: "edit_params", + kind: "message", + T: Yps, + oneof: "params" + }, { + no: 6, + name: "undo_edit_params", + kind: "message", + T: Fps, + oneof: "params" + }, { + no: 7, + name: "end_params", + kind: "message", + T: Ops, + oneof: "params" + }, { + no: 8, + name: "new_file_params", + kind: "message", + T: Ips, + oneof: "params" + }, { + no: 9, + name: "add_test_params", + kind: "message", + T: ems, + oneof: "params" + }, { + no: 10, + name: "run_test_params", + kind: "message", + T: nms, + oneof: "params" + }, { + no: 11, + name: "delete_test_params", + kind: "message", + T: cms, + oneof: "params" + }, { + no: 12, + name: "save_file_params", + kind: "message", + T: dms, + oneof: "params" + }, { + no: 13, + name: "get_tests_params", + kind: "message", + T: oms, + oneof: "params" + }, { + no: 14, + name: "get_symbols_params", + kind: "message", + T: fms, + oneof: "params" + }, { + no: 15, + name: "semantic_search_params", + kind: "message", + T: Dps, + oneof: "params" + }, { + no: 16, + name: "get_project_structure_params", + kind: "message", + T: xps, + oneof: "params" + }, { + no: 17, + name: "create_rm_files_params", + kind: "message", + T: Cps, + oneof: "params" + }, { + no: 18, + name: "run_terminal_commands_params", + kind: "message", + T: yps, + oneof: "params" + }, { + no: 19, + name: "new_edit_params", + kind: "message", + T: Gps, + oneof: "params" + }, { + no: 20, + name: "read_with_linter_params", + kind: "message", + T: bps, + oneof: "params" + }, { + no: 21, + name: "add_ui_step_params", + kind: "message", + T: fps, + oneof: "params" + }, { + no: 23, + name: "read_semsearch_files_params", + kind: "message", + T: Fut, + oneof: "params" + }, { + no: 24, + name: "read_file_for_imports_params", + kind: "message", + T: _ut, + oneof: "params" + }, { + no: 25, + name: "create_file_params", + kind: "message", + T: But, + oneof: "params" + }, { + no: 26, + name: "delete_file_params", + kind: "message", + T: Wut, + oneof: "params" + }, { + no: 22, + name: "tool_call_id", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new T2e().fromBinary(e, t); + } + static fromJson(e, t) { + return new T2e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new T2e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(T2e, e, t); + } + }; + hps = class P2e extends N { + constructor(e) { + super(); + this.tool = Vz.UNSPECIFIED; + this.result = { + case: undefined + }; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.BuiltinToolResult"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "tool", + kind: "enum", + T: m.getEnumType(Vz) + }, { + no: 2, + name: "search_result", + kind: "message", + T: Mps, + oneof: "result" + }, { + no: 3, + name: "read_chunk_result", + kind: "message", + T: $ps, + oneof: "result" + }, { + no: 4, + name: "gotodef_result", + kind: "message", + T: zps, + oneof: "result" + }, { + no: 5, + name: "edit_result", + kind: "message", + T: Xps, + oneof: "result" + }, { + no: 6, + name: "undo_edit_result", + kind: "message", + T: Bps, + oneof: "result" + }, { + no: 7, + name: "end_result", + kind: "message", + T: Ups, + oneof: "result" + }, { + no: 8, + name: "new_file_result", + kind: "message", + T: _ps, + oneof: "result" + }, { + no: 9, + name: "add_test_result", + kind: "message", + T: tms, + oneof: "result" + }, { + no: 10, + name: "run_test_result", + kind: "message", + T: rms, + oneof: "result" + }, { + no: 11, + name: "delete_test_result", + kind: "message", + T: ums, + oneof: "result" + }, { + no: 12, + name: "save_file_result", + kind: "message", + T: hms, + oneof: "result" + }, { + no: 13, + name: "get_tests_result", + kind: "message", + T: ams, + oneof: "result" + }, { + no: 14, + name: "get_symbols_result", + kind: "message", + T: pms, + oneof: "result" + }, { + no: 15, + name: "semantic_search_result", + kind: "message", + T: Tps, + oneof: "result" + }, { + no: 16, + name: "get_project_structure_result", + kind: "message", + T: kps, + oneof: "result" + }, { + no: 17, + name: "create_rm_files_result", + kind: "message", + T: Sps, + oneof: "result" + }, { + no: 18, + name: "run_terminal_commands_result", + kind: "message", + T: wps, + oneof: "result" + }, { + no: 19, + name: "new_edit_result", + kind: "message", + T: Kps, + oneof: "result" + }, { + no: 20, + name: "read_with_linter_result", + kind: "message", + T: vps, + oneof: "result" + }, { + no: 21, + name: "add_ui_step_result", + kind: "message", + T: mps, + oneof: "result" + }, { + no: 22, + name: "read_semsearch_files_result", + kind: "message", + T: Hie, + oneof: "result" + }, { + no: 23, + name: "create_file_result", + kind: "message", + T: Uut, + oneof: "result" + }, { + no: 24, + name: "delete_file_result", + kind: "message", + T: W7, + oneof: "result" + }]); + } + static fromBinary(e, t) { + return new P2e().fromBinary(e, t); + } + static fromJson(e, t) { + return new P2e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new P2e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(P2e, e, t); + } + }; + fps = class L2e extends N { + constructor(e) { + super(); + this.conversationId = ""; + this.step = { + case: undefined + }; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.AddUiStepParams"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "conversation_id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "search_results", + kind: "message", + T: pps, + oneof: "step" + }]); + } + static fromBinary(e, t) { + return new L2e().fromBinary(e, t); + } + static fromJson(e, t) { + return new L2e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new L2e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(L2e, e, t); + } + }; + gps = class R2e extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.AddUiStepParams.SearchResult"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new R2e().fromBinary(e, t); + } + static fromJson(e, t) { + return new R2e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new R2e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(R2e, e, t); + } + }; + pps = class N2e extends N { + constructor(e) { + super(); + this.searchResults = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.AddUiStepParams.SearchResults"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "search_results", + kind: "message", + T: gps, + repeated: true + }]); + } + static fromBinary(e, t) { + return new N2e().fromBinary(e, t); + } + static fromJson(e, t) { + return new N2e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new N2e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(N2e, e, t); + } + }; + mps = class M2e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.AddUiStepResult"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new M2e().fromBinary(e, t); + } + static fromJson(e, t) { + return new M2e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new M2e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(M2e, e, t); + } + }; + htr = class A2e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ServerSideToolResult"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new A2e().fromBinary(e, t); + } + static fromJson(e, t) { + return new A2e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new A2e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(A2e, e, t); + } + }; + pqt = class $2e extends N { + constructor(e) { + super(); + this.toolCall = { + case: undefined + }; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ToolCall"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "builtin_tool_call", + kind: "message", + T: dps, + oneof: "tool_call" + }, { + no: 2, + name: "custom_tool_call", + kind: "message", + T: Wps, + oneof: "tool_call" + }]); + } + static fromBinary(e, t) { + return new $2e().fromBinary(e, t); + } + static fromJson(e, t) { + return new $2e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new $2e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals($2e, e, t); + } + }; + Hut = class F2e extends N { + constructor(e) { + super(); + this.toolResult = { + case: undefined + }; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ToolResult"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "builtin_tool_result", + kind: "message", + T: hps, + oneof: "tool_result" + }, { + no: 2, + name: "custom_tool_result", + kind: "message", + T: Vps, + oneof: "tool_result" + }, { + no: 3, + name: "error_tool_result", + kind: "message", + T: Jps, + oneof: "tool_result" + }]); + } + static fromBinary(e, t) { + return new F2e().fromBinary(e, t); + } + static fromJson(e, t) { + return new F2e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new F2e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(F2e, e, t); + } + }; + bps = class O2e extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ReadWithLinterParams"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new O2e().fromBinary(e, t); + } + static fromJson(e, t) { + return new O2e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new O2e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(O2e, e, t); + } + }; + vps = class _2e extends N { + constructor(e) { + super(); + this.contents = ""; + this.diagnostics = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ReadWithLinterResult"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "contents", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "diagnostics", + kind: "message", + T: hHt, + repeated: true + }]); + } + static fromBinary(e, t) { + return new _2e().fromBinary(e, t); + } + static fromJson(e, t) { + return new _2e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new _2e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(_2e, e, t); + } + }; + yps = class B2e extends N { + constructor(e) { + super(); + this.commands = []; + this.commandsUuid = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RunTerminalCommandsParams"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "commands", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 2, + name: "commands_uuid", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new B2e().fromBinary(e, t); + } + static fromJson(e, t) { + return new B2e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new B2e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(B2e, e, t); + } + }; + wps = class U2e extends N { + constructor(e) { + super(); + this.outputs = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RunTerminalCommandsResult"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "outputs", + kind: "scalar", + T: 9, + repeated: true + }]); + } + static fromBinary(e, t) { + return new U2e().fromBinary(e, t); + } + static fromJson(e, t) { + return new U2e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new U2e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(U2e, e, t); + } + }; + Cps = class W2e extends N { + constructor(e) { + super(); + this.removedFilePaths = []; + this.createdFilePaths = []; + this.createdDirectoryPaths = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CreateRmFilesParams"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "removed_file_paths", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 2, + name: "created_file_paths", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 3, + name: "created_directory_paths", + kind: "scalar", + T: 9, + repeated: true + }]); + } + static fromBinary(e, t) { + return new W2e().fromBinary(e, t); + } + static fromJson(e, t) { + return new W2e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new W2e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(W2e, e, t); + } + }; + Sps = class V2e extends N { + constructor(e) { + super(); + this.createdFilePaths = []; + this.removedFilePaths = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CreateRmFilesResult"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "created_file_paths", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 2, + name: "removed_file_paths", + kind: "scalar", + T: 9, + repeated: true + }]); + } + static fromBinary(e, t) { + return new V2e().fromBinary(e, t); + } + static fromJson(e, t) { + return new V2e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new V2e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(V2e, e, t); + } + }; + xps = class H2e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetProjectStructureParams"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new H2e().fromBinary(e, t); + } + static fromJson(e, t) { + return new H2e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new H2e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(H2e, e, t); + } + }; + kps = class q2e extends N { + constructor(e) { + super(); + this.files = []; + this.rootWorkspacePath = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetProjectStructureResult"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "files", + kind: "message", + T: Eps, + repeated: true + }, { + no: 2, + name: "root_workspace_path", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new q2e().fromBinary(e, t); + } + static fromJson(e, t) { + return new q2e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new q2e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(q2e, e, t); + } + }; + Eps = class j2e extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.outline = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetProjectStructureResult.File"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "outline", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new j2e().fromBinary(e, t); + } + static fromJson(e, t) { + return new j2e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new j2e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(j2e, e, t); + } + }; + Ips = class z2e extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.NewFileParams"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new z2e().fromBinary(e, t); + } + static fromJson(e, t) { + return new z2e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new z2e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(z2e, e, t); + } + }; + Dps = class J2e extends N { + constructor(e) { + super(); + this.query = ""; + this.topK = 0; + this.grabWholeFile = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SemanticSearchParams"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "query", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "include_pattern", + kind: "scalar", + T: 9, + opt: true + }, { + no: 3, + name: "exclude_pattern", + kind: "scalar", + T: 9, + opt: true + }, { + no: 4, + name: "top_k", + kind: "scalar", + T: 5 + }, { + no: 5, + name: "index_id", + kind: "scalar", + T: 9, + opt: true + }, { + no: 6, + name: "grab_whole_file", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new J2e().fromBinary(e, t); + } + static fromJson(e, t) { + return new J2e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new J2e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(J2e, e, t); + } + }; + mqt = class G2e extends N { + constructor(e) { + super(); + this.startLine = 0; + this.startCharacter = 0; + this.endLine = 0; + this.endCharacter = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.Range"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "start_line", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "start_character", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "end_line", + kind: "scalar", + T: 5 + }, { + no: 4, + name: "end_character", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new G2e().fromBinary(e, t); + } + static fromJson(e, t) { + return new G2e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new G2e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(G2e, e, t); + } + }; + bqt = class K2e extends N { + constructor(e) { + super(); + this.start = 0; + this.end = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.MatchRange"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "start", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "end", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new K2e().fromBinary(e, t); + } + static fromJson(e, t) { + return new K2e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new K2e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(K2e, e, t); + } + }; + Tps = class Y2e extends N { + constructor(e) { + super(); + this.results = []; + this.files = {}; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SemanticSearchResult"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "results", + kind: "message", + T: Pps, + repeated: true + }, { + no: 2, + name: "files", + kind: "map", + K: 9, + V: { + kind: "scalar", + T: 9 + } + }]); + } + static fromBinary(e, t) { + return new Y2e().fromBinary(e, t); + } + static fromJson(e, t) { + return new Y2e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Y2e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Y2e, e, t); + } + }; + Pps = class X2e extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.score = 0; + this.content = ""; + this.detailedLines = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SemanticSearchResult.Item"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "score", + kind: "scalar", + T: 2 + }, { + no: 3, + name: "content", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "range", + kind: "message", + T: Of + }, { + no: 5, + name: "original_content", + kind: "scalar", + T: 9, + opt: true + }, { + no: 6, + name: "detailed_lines", + kind: "message", + T: fut, + repeated: true + }]); + } + static fromBinary(e, t) { + return new X2e().fromBinary(e, t); + } + static fromJson(e, t) { + return new X2e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new X2e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(X2e, e, t); + } + }; + Lps = class Q2e extends N { + constructor(e) { + super(); + this.query = ""; + this.regex = false; + this.includePattern = ""; + this.excludePattern = ""; + this.filenameSearch = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SearchParams"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "query", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "regex", + kind: "scalar", + T: 8 + }, { + no: 3, + name: "include_pattern", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "exclude_pattern", + kind: "scalar", + T: 9 + }, { + no: 5, + name: "filename_search", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new Q2e().fromBinary(e, t); + } + static fromJson(e, t) { + return new Q2e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Q2e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Q2e, e, t); + } + }; + Rps = class Z2e extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.numMatches = 0; + this.potentiallyRelevantLines = []; + this.cropped = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SearchToolFileSearchResult"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "num_matches", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "potentially_relevant_lines", + kind: "message", + T: Nps, + repeated: true + }, { + no: 4, + name: "cropped", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new Z2e().fromBinary(e, t); + } + static fromJson(e, t) { + return new Z2e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Z2e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Z2e, e, t); + } + }; + Nps = class eFe extends N { + constructor(e) { + super(); + this.lineNumber = 0; + this.text = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SearchToolFileSearchResult.Line"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "line_number", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "text", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new eFe().fromBinary(e, t); + } + static fromJson(e, t) { + return new eFe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new eFe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(eFe, e, t); + } + }; + Mps = class tFe extends N { + constructor(e) { + super(); + this.fileResults = []; + this.numTotalMatches = 0; + this.numTotalMatchedFiles = 0; + this.numTotalMayBeIncomplete = false; + this.filesOnly = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SearchResult"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "file_results", + kind: "message", + T: Rps, + repeated: true + }, { + no: 2, + name: "num_total_matches", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "num_total_matched_files", + kind: "scalar", + T: 5 + }, { + no: 4, + name: "num_total_may_be_incomplete", + kind: "scalar", + T: 8 + }, { + no: 5, + name: "files_only", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new tFe().fromBinary(e, t); + } + static fromJson(e, t) { + return new tFe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new tFe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(tFe, e, t); + } + }; + Aps = class iFe extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.startLineNumber = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ReadChunkParams"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "start_line_number", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "num_lines", + kind: "scalar", + T: 5, + opt: true + }]); + } + static fromBinary(e, t) { + return new iFe().fromBinary(e, t); + } + static fromJson(e, t) { + return new iFe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new iFe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(iFe, e, t); + } + }; + $ps = class sFe extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.startLineNumber = 0; + this.lines = []; + this.totalNumLines = 0; + this.cropped = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ReadChunkResult"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "start_line_number", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "lines", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 4, + name: "total_num_lines", + kind: "scalar", + T: 5 + }, { + no: 5, + name: "cropped", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new sFe().fromBinary(e, t); + } + static fromJson(e, t) { + return new sFe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new sFe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(sFe, e, t); + } + }; + Fps = class nFe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.UndoEditParams"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new nFe().fromBinary(e, t); + } + static fromJson(e, t) { + return new nFe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new nFe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(nFe, e, t); + } + }; + Ops = class rFe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.EndParams"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new rFe().fromBinary(e, t); + } + static fromJson(e, t) { + return new rFe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new rFe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(rFe, e, t); + } + }; + _ps = class oFe extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.fileTotalLines = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.NewFileResult"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "file_total_lines", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new oFe().fromBinary(e, t); + } + static fromJson(e, t) { + return new oFe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new oFe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(oFe, e, t); + } + }; + Bps = class aFe extends N { + constructor(e) { + super(); + this.feedback = []; + this.relativeWorkspacePath = ""; + this.contextStartLineNumber = 0; + this.contextLines = []; + this.contextTotalNumLines = 0; + this.fileTotalLines = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.UndoEditResult"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "feedback", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 4, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "context_start_line_number", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "context_lines", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 5, + name: "context_total_num_lines", + kind: "scalar", + T: 5 + }, { + no: 6, + name: "file_total_lines", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new aFe().fromBinary(e, t); + } + static fromJson(e, t) { + return new aFe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new aFe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(aFe, e, t); + } + }; + Ups = class lFe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.EndResult"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new lFe().fromBinary(e, t); + } + static fromJson(e, t) { + return new lFe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new lFe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(lFe, e, t); + } + }; + Wps = class cFe extends N { + constructor(e) { + super(); + this.toolId = ""; + this.params = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CustomToolCall"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "tool_id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "params", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new cFe().fromBinary(e, t); + } + static fromJson(e, t) { + return new cFe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new cFe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(cFe, e, t); + } + }; + ftr = class uFe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ScratchpadResult"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new uFe().fromBinary(e, t); + } + static fromJson(e, t) { + return new uFe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new uFe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(uFe, e, t); + } + }; + Vps = class dFe extends N { + constructor(e) { + super(); + this.toolId = ""; + this.result = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CustomToolResult"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "tool_id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "result", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new dFe().fromBinary(e, t); + } + static fromJson(e, t) { + return new dFe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new dFe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(dFe, e, t); + } + }; + Hps = class hFe extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.lineNumber = 0; + this.symbol = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GotodefParams"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "line_number", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "symbol", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new hFe().fromBinary(e, t); + } + static fromJson(e, t) { + return new hFe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new hFe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(hFe, e, t); + } + }; + qps = class fFe extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.potentiallyRelevantLines = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GotodefToolFileSearchResult"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "potentially_relevant_lines", + kind: "message", + T: jps, + repeated: true + }]); + } + static fromBinary(e, t) { + return new fFe().fromBinary(e, t); + } + static fromJson(e, t) { + return new fFe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new fFe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(fFe, e, t); + } + }; + jps = class gFe extends N { + constructor(e) { + super(); + this.lineNumber = 0; + this.text = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GotodefToolFileSearchResult.Line"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "line_number", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "text", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new gFe().fromBinary(e, t); + } + static fromJson(e, t) { + return new gFe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new gFe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(gFe, e, t); + } + }; + zps = class pFe extends N { + constructor(e) { + super(); + this.results = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GotodefResult"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "results", + kind: "message", + T: qps, + repeated: true + }]); + } + static fromBinary(e, t) { + return new pFe().fromBinary(e, t); + } + static fromJson(e, t) { + return new pFe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new pFe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(pFe, e, t); + } + }; + Jps = class mFe extends N { + constructor(e) { + super(); + this.errorMessage = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ErrorToolResult"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "error_message", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new mFe().fromBinary(e, t); + } + static fromJson(e, t) { + return new mFe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new mFe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(mFe, e, t); + } + }; + Gps = class bFe extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.text = ""; + this.editId = ""; + this.firstEdit = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.NewEditParams"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "start_line_number", + kind: "scalar", + T: 5, + opt: true + }, { + no: 3, + name: "end_line_number", + kind: "scalar", + T: 5, + opt: true + }, { + no: 4, + name: "text", + kind: "scalar", + T: 9 + }, { + no: 5, + name: "edit_id", + kind: "scalar", + T: 9 + }, { + no: 6, + name: "first_edit", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new bFe().fromBinary(e, t); + } + static fromJson(e, t) { + return new bFe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new bFe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(bFe, e, t); + } + }; + Kps = class vFe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.NewEditResult"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new vFe().fromBinary(e, t); + } + static fromJson(e, t) { + return new vFe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new vFe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(vFe, e, t); + } + }; + Yps = class yFe extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.replaceNumLines = 0; + this.newLines = []; + this.editId = ""; + this.frontendEditType = Kbe.UNSPECIFIED; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.EditParams"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "line_number", + kind: "scalar", + T: 5, + opt: true + }, { + no: 3, + name: "replace_num_lines", + kind: "scalar", + T: 5 + }, { + no: 4, + name: "new_lines", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 7, + name: "replace_whole_file", + kind: "scalar", + T: 8, + opt: true + }, { + no: 5, + name: "edit_id", + kind: "scalar", + T: 9 + }, { + no: 6, + name: "frontend_edit_type", + kind: "enum", + T: m.getEnumType(Kbe) + }, { + no: 8, + name: "auto_fix_all_linter_errors_in_file", + kind: "scalar", + T: 8, + opt: true + }]); + } + static fromBinary(e, t) { + return new yFe().fromBinary(e, t); + } + static fromJson(e, t) { + return new yFe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new yFe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(yFe, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.INLINE_DIFFS = 1] = "INLINE_DIFFS"; + i[i.SIMPLE = 2] = "SIMPLE"; + })(Kbe ||= {}); + m.util.setEnumType(Kbe, "aiserver.v1.EditParams.FrontendEditType", [{ + no: 0, + name: "FRONTEND_EDIT_TYPE_UNSPECIFIED" + }, { + no: 1, + name: "FRONTEND_EDIT_TYPE_INLINE_DIFFS" + }, { + no: 2, + name: "FRONTEND_EDIT_TYPE_SIMPLE" + }]); + Xps = class wFe extends N { + constructor(e) { + super(); + this.feedback = []; + this.contextStartLineNumber = 0; + this.contextLines = []; + this.file = ""; + this.fileTotalLines = 0; + this.structuredFeedback = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.EditResult"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "feedback", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 2, + name: "context_start_line_number", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "context_lines", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 4, + name: "file", + kind: "scalar", + T: 9 + }, { + no: 5, + name: "file_total_lines", + kind: "scalar", + T: 5 + }, { + no: 6, + name: "structured_feedback", + kind: "message", + T: Zps, + repeated: true + }]); + } + static fromBinary(e, t) { + return new wFe().fromBinary(e, t); + } + static fromJson(e, t) { + return new wFe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new wFe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(wFe, e, t); + } + }; + Qps = class CFe extends N { + constructor(e) { + super(); + this.message = ""; + this.startLineNumber = 0; + this.endLineNumber = 0; + this.relativeWorkspacePath = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.EditResult.RelatedInformation"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "message", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "start_line_number", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "end_line_number", + kind: "scalar", + T: 5 + }, { + no: 4, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new CFe().fromBinary(e, t); + } + static fromJson(e, t) { + return new CFe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new CFe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(CFe, e, t); + } + }; + Zps = class SFe extends N { + constructor(e) { + super(); + this.message = ""; + this.severity = ""; + this.startLineNumber = 0; + this.endLineNumber = 0; + this.relatedInformation = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.EditResult.Feedback"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "message", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "severity", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "start_line_number", + kind: "scalar", + T: 5 + }, { + no: 4, + name: "end_line_number", + kind: "scalar", + T: 5 + }, { + no: 5, + name: "related_information", + kind: "message", + T: Qps, + repeated: true + }]); + } + static fromBinary(e, t) { + return new SFe().fromBinary(e, t); + } + static fromJson(e, t) { + return new SFe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new SFe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(SFe, e, t); + } + }; + ems = class xFe extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.testName = ""; + this.testCode = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.AddTestParams"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "test_name", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "test_code", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new xFe().fromBinary(e, t); + } + static fromJson(e, t) { + return new xFe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new xFe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(xFe, e, t); + } + }; + tms = class kFe extends N { + constructor(e) { + super(); + this.feedback = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.AddTestResult"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "feedback", + kind: "message", + T: sms, + repeated: true + }]); + } + static fromBinary(e, t) { + return new kFe().fromBinary(e, t); + } + static fromJson(e, t) { + return new kFe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new kFe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(kFe, e, t); + } + }; + ims = class EFe extends N { + constructor(e) { + super(); + this.message = ""; + this.startLineNumber = 0; + this.endLineNumber = 0; + this.relativeWorkspacePath = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.AddTestResult.RelatedInformation"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "message", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "start_line_number", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "end_line_number", + kind: "scalar", + T: 5 + }, { + no: 4, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new EFe().fromBinary(e, t); + } + static fromJson(e, t) { + return new EFe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new EFe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(EFe, e, t); + } + }; + sms = class IFe extends N { + constructor(e) { + super(); + this.message = ""; + this.severity = ""; + this.startLineNumber = 0; + this.endLineNumber = 0; + this.relatedInformation = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.AddTestResult.Feedback"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "message", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "severity", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "start_line_number", + kind: "scalar", + T: 5 + }, { + no: 4, + name: "end_line_number", + kind: "scalar", + T: 5 + }, { + no: 5, + name: "related_information", + kind: "message", + T: ims, + repeated: true + }]); + } + static fromBinary(e, t) { + return new IFe().fromBinary(e, t); + } + static fromJson(e, t) { + return new IFe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new IFe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(IFe, e, t); + } + }; + nms = class DFe extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RunTestParams"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "test_name", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new DFe().fromBinary(e, t); + } + static fromJson(e, t) { + return new DFe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new DFe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(DFe, e, t); + } + }; + rms = class TFe extends N { + constructor(e) { + super(); + this.result = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RunTestResult"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "result", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new TFe().fromBinary(e, t); + } + static fromJson(e, t) { + return new TFe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new TFe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(TFe, e, t); + } + }; + oms = class PFe extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetTestsParams"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new PFe().fromBinary(e, t); + } + static fromJson(e, t) { + return new PFe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new PFe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(PFe, e, t); + } + }; + ams = class LFe extends N { + constructor(e) { + super(); + this.tests = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetTestsResult"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "tests", + kind: "message", + T: lms, + repeated: true + }]); + } + static fromBinary(e, t) { + return new LFe().fromBinary(e, t); + } + static fromJson(e, t) { + return new LFe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new LFe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(LFe, e, t); + } + }; + lms = class RFe extends N { + constructor(e) { + super(); + this.name = ""; + this.lines = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetTestsResult.Test"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "name", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "lines", + kind: "scalar", + T: 9, + repeated: true + }]); + } + static fromBinary(e, t) { + return new RFe().fromBinary(e, t); + } + static fromJson(e, t) { + return new RFe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new RFe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(RFe, e, t); + } + }; + cms = class NFe extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.DeleteTestParams"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "test_name", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new NFe().fromBinary(e, t); + } + static fromJson(e, t) { + return new NFe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new NFe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(NFe, e, t); + } + }; + ums = class MFe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.DeleteTestResult"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new MFe().fromBinary(e, t); + } + static fromJson(e, t) { + return new MFe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new MFe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(MFe, e, t); + } + }; + dms = class AFe extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SaveFileParams"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new AFe().fromBinary(e, t); + } + static fromJson(e, t) { + return new AFe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new AFe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(AFe, e, t); + } + }; + hms = class $Fe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SaveFileResult"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new $Fe().fromBinary(e, t); + } + static fromJson(e, t) { + return new $Fe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new $Fe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals($Fe, e, t); + } + }; + fms = class FFe extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.includeChildren = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetSymbolsParams"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "line_range", + kind: "message", + T: gms, + opt: true + }, { + no: 3, + name: "include_children", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new FFe().fromBinary(e, t); + } + static fromJson(e, t) { + return new FFe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new FFe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(FFe, e, t); + } + }; + gms = class OFe extends N { + constructor(e) { + super(); + this.startLineNumber = 0; + this.endLineNumberInclusive = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetSymbolsParams.LineRange"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "start_line_number", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "end_line_number_inclusive", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new OFe().fromBinary(e, t); + } + static fromJson(e, t) { + return new OFe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new OFe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(OFe, e, t); + } + }; + pms = class _Fe extends N { + constructor(e) { + super(); + this.symbols = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetSymbolsResult"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "symbols", + kind: "message", + T: mbe, + repeated: true + }]); + } + static fromBinary(e, t) { + return new _Fe().fromBinary(e, t); + } + static fromJson(e, t) { + return new _Fe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new _Fe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(_Fe, e, t); + } + }; + vqt = class BFe extends N { + constructor(e) { + super(); + this.editPlan = ""; + this.fileRegions = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ParallelApplyParams"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "edit_plan", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "file_regions", + kind: "message", + T: mms, + repeated: true + }]); + } + static fromBinary(e, t) { + return new BFe().fromBinary(e, t); + } + static fromJson(e, t) { + return new BFe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new BFe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(BFe, e, t); + } + }; + mms = class UFe extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ParallelApplyParams.FileRegion"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "range", + kind: "message", + T: Of + }]); + } + static fromBinary(e, t) { + return new UFe().fromBinary(e, t); + } + static fromJson(e, t) { + return new UFe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new UFe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(UFe, e, t); + } + }; + Ybe = class WFe extends N { + constructor(e) { + super(); + this.fileResults = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ParallelApplyResult"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "file_results", + kind: "message", + T: Xbe, + repeated: true + }, { + no: 2, + name: "error", + kind: "scalar", + T: 9, + opt: true + }, { + no: 3, + name: "rejected", + kind: "scalar", + T: 8, + opt: true + }]); + } + static fromBinary(e, t) { + return new WFe().fromBinary(e, t); + } + static fromJson(e, t) { + return new WFe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new WFe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(WFe, e, t); + } + }; + Xbe = class VFe extends N { + constructor(e) { + super(); + this.filePath = ""; + this.isApplied = false; + this.applyFailed = false; + this.linterErrors = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ParallelApplyResult.FileResult"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "file_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "diff", + kind: "message", + T: uR + }, { + no: 3, + name: "is_applied", + kind: "scalar", + T: 8 + }, { + no: 4, + name: "apply_failed", + kind: "scalar", + T: 8 + }, { + no: 5, + name: "error", + kind: "scalar", + T: 9, + opt: true + }, { + no: 6, + name: "linter_errors", + kind: "message", + T: YT, + repeated: true + }]); + } + static fromBinary(e, t) { + return new VFe().fromBinary(e, t); + } + static fromJson(e, t) { + return new VFe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new VFe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(VFe, e, t); + } + }; + bms = class HFe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ParallelApplyStream"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new HFe().fromBinary(e, t); + } + static fromJson(e, t) { + return new HFe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new HFe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(HFe, e, t); + } + }; + yqt = class qFe extends N { + constructor(e) { + super(); + this.command = ""; + this.isBackground = false; + this.requireUserApproval = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RunTerminalCommandV2Params"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "command", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "cwd", + kind: "scalar", + T: 9, + opt: true + }, { + no: 3, + name: "new_session", + kind: "scalar", + T: 8, + opt: true + }, { + no: 4, + name: "options", + kind: "message", + T: vms, + opt: true + }, { + no: 5, + name: "is_background", + kind: "scalar", + T: 8 + }, { + no: 6, + name: "require_user_approval", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new qFe().fromBinary(e, t); + } + static fromJson(e, t) { + return new qFe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new qFe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(qFe, e, t); + } + }; + vms = class jFe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RunTerminalCommandV2Params.ExecutionOptions"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "timeout", + kind: "scalar", + T: 5, + opt: true + }, { + no: 2, + name: "skip_ai_check", + kind: "scalar", + T: 8, + opt: true + }, { + no: 3, + name: "command_run_timeout_ms", + kind: "scalar", + T: 5, + opt: true + }, { + no: 4, + name: "command_change_check_interval_ms", + kind: "scalar", + T: 5, + opt: true + }, { + no: 5, + name: "ai_finish_check_max_attempts", + kind: "scalar", + T: 5, + opt: true + }, { + no: 6, + name: "ai_finish_check_interval_ms", + kind: "scalar", + T: 5, + opt: true + }, { + no: 7, + name: "delayer_interval_ms", + kind: "scalar", + T: 5, + opt: true + }]); + } + static fromBinary(e, t) { + return new jFe().fromBinary(e, t); + } + static fromJson(e, t) { + return new jFe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new jFe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(jFe, e, t); + } + }; + i5 = class zFe extends N { + constructor(e) { + super(); + this.output = ""; + this.exitCode = 0; + this.poppedOutIntoBackground = false; + this.isRunningInBackground = false; + this.notInterrupted = false; + this.resultingWorkingDirectory = ""; + this.didUserChange = false; + this.endedReason = e5.UNSPECIFIED; + this.outputRaw = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RunTerminalCommandV2Result"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "output", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "exit_code", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "rejected", + kind: "scalar", + T: 8, + opt: true + }, { + no: 4, + name: "popped_out_into_background", + kind: "scalar", + T: 8 + }, { + no: 5, + name: "is_running_in_background", + kind: "scalar", + T: 8 + }, { + no: 6, + name: "not_interrupted", + kind: "scalar", + T: 8 + }, { + no: 7, + name: "resulting_working_directory", + kind: "scalar", + T: 9 + }, { + no: 8, + name: "did_user_change", + kind: "scalar", + T: 8 + }, { + no: 9, + name: "ended_reason", + kind: "enum", + T: m.getEnumType(e5) + }, { + no: 10, + name: "exit_code_v2", + kind: "scalar", + T: 5, + opt: true + }, { + no: 11, + name: "updated_command", + kind: "scalar", + T: 9, + opt: true + }, { + no: 12, + name: "output_raw", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new zFe().fromBinary(e, t); + } + static fromJson(e, t) { + return new zFe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new zFe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(zFe, e, t); + } + }; + yms = class JFe extends N { + constructor(e) { + super(); + this.command = ""; + this.isBackground = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RunTerminalCommandV2Stream"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "command", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "is_background", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new JFe().fromBinary(e, t); + } + static fromJson(e, t) { + return new JFe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new JFe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(JFe, e, t); + } + }; + wms = class GFe extends N { + constructor(e) { + super(); + this.ruleNames = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.FetchRulesStream"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "rule_names", + kind: "scalar", + T: 9, + repeated: true + }]); + } + static fromBinary(e, t) { + return new GFe().fromBinary(e, t); + } + static fromJson(e, t) { + return new GFe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new GFe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(GFe, e, t); + } + }; + Cms = class KFe extends N { + constructor(e) { + super(); + this.instruction = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.PlannerStream"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "instruction", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "plan", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new KFe().fromBinary(e, t); + } + static fromJson(e, t) { + return new KFe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new KFe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(KFe, e, t); + } + }; + wqt = class YFe extends N { + constructor(e) { + super(); + this.searchTerm = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.WebSearchParams"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "search_term", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new YFe().fromBinary(e, t); + } + static fromJson(e, t) { + return new YFe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new YFe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(YFe, e, t); + } + }; + zz = class XFe extends N { + constructor(e) { + super(); + this.references = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.WebSearchResult"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "references", + kind: "message", + T: Sms, + repeated: true + }, { + no: 2, + name: "is_final", + kind: "scalar", + T: 8, + opt: true + }, { + no: 3, + name: "rejected", + kind: "scalar", + T: 8, + opt: true + }]); + } + static fromBinary(e, t) { + return new XFe().fromBinary(e, t); + } + static fromJson(e, t) { + return new XFe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new XFe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(XFe, e, t); + } + }; + Sms = class QFe extends N { + constructor(e) { + super(); + this.title = ""; + this.url = ""; + this.chunk = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.WebSearchResult.WebReference"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "title", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "url", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "chunk", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new QFe().fromBinary(e, t); + } + static fromJson(e, t) { + return new QFe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new QFe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(QFe, e, t); + } + }; + xms = class ZFe extends N { + constructor(e) { + super(); + this.searchTerm = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.WebSearchStream"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "search_term", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new ZFe().fromBinary(e, t); + } + static fromJson(e, t) { + return new ZFe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new ZFe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(ZFe, e, t); + } + }; + Cqt = class eOe extends N { + constructor(e) { + super(); + this.url = ""; + this.instructions = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.WebViewerParams"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "url", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "instructions", + kind: "message", + T: kms, + repeated: true + }, { + no: 4, + name: "new_session", + kind: "scalar", + T: 8, + opt: true + }, { + no: 5, + name: "console_log_params", + kind: "message", + T: Oms, + opt: true + }]); + } + static fromBinary(e, t) { + return new eOe().fromBinary(e, t); + } + static fromJson(e, t) { + return new eOe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new eOe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(eOe, e, t); + } + }; + kms = class tOe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.WebViewerParams.DOMInstruction"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "target", + kind: "message", + T: Ems + }, { + no: 2, + name: "action", + kind: "message", + T: Rms + }, { + no: 3, + name: "delay_after_ms", + kind: "scalar", + T: 5, + opt: true + }, { + no: 4, + name: "take_screenshot", + kind: "scalar", + T: 8, + opt: true + }]); + } + static fromBinary(e, t) { + return new tOe().fromBinary(e, t); + } + static fromJson(e, t) { + return new tOe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new tOe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(tOe, e, t); + } + }; + Ems = class iOe extends N { + constructor(e) { + super(); + this.target = { + case: undefined + }; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.WebViewerParams.DOMInstruction.Target"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "selector", + kind: "message", + T: Ims, + oneof: "target" + }, { + no: 2, + name: "position", + kind: "message", + T: Dms, + oneof: "target" + }]); + } + static fromBinary(e, t) { + return new iOe().fromBinary(e, t); + } + static fromJson(e, t) { + return new iOe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new iOe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(iOe, e, t); + } + }; + Ims = class sOe extends N { + constructor(e) { + super(); + this.selector = { + case: undefined + }; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.WebViewerParams.DOMInstruction.Selector"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "css", + kind: "scalar", + T: 9, + oneof: "selector" + }, { + no: 2, + name: "xpath", + kind: "scalar", + T: 9, + oneof: "selector" + }, { + no: 3, + name: "text", + kind: "scalar", + T: 9, + oneof: "selector" + }, { + no: 4, + name: "aria_label", + kind: "scalar", + T: 9, + oneof: "selector" + }, { + no: 5, + name: "id", + kind: "scalar", + T: 9, + oneof: "selector" + }, { + no: 6, + name: "wait_for_element", + kind: "scalar", + T: 8, + opt: true + }, { + no: 7, + name: "timeout_ms", + kind: "scalar", + T: 5, + opt: true + }]); + } + static fromBinary(e, t) { + return new sOe().fromBinary(e, t); + } + static fromJson(e, t) { + return new sOe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new sOe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(sOe, e, t); + } + }; + Dms = class nOe extends N { + constructor(e) { + super(); + this.positionType = { + case: undefined + }; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.WebViewerParams.DOMInstruction.Position"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "absolute", + kind: "message", + T: Tms, + oneof: "position_type" + }, { + no: 2, + name: "percentage", + kind: "message", + T: Pms, + oneof: "position_type" + }, { + no: 3, + name: "relative", + kind: "message", + T: Lms, + oneof: "position_type" + }]); + } + static fromBinary(e, t) { + return new nOe().fromBinary(e, t); + } + static fromJson(e, t) { + return new nOe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new nOe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(nOe, e, t); + } + }; + Tms = class rOe extends N { + constructor(e) { + super(); + this.x = 0; + this.y = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.WebViewerParams.DOMInstruction.Position.AbsolutePosition"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "x", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "y", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new rOe().fromBinary(e, t); + } + static fromJson(e, t) { + return new rOe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new rOe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(rOe, e, t); + } + }; + Pms = class oOe extends N { + constructor(e) { + super(); + this.x = 0; + this.y = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.WebViewerParams.DOMInstruction.Position.PercentagePosition"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "x", + kind: "scalar", + T: 2 + }, { + no: 2, + name: "y", + kind: "scalar", + T: 2 + }]); + } + static fromBinary(e, t) { + return new oOe().fromBinary(e, t); + } + static fromJson(e, t) { + return new oOe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new oOe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(oOe, e, t); + } + }; + Lms = class aOe extends N { + constructor(e) { + super(); + this.dx = 0; + this.dy = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.WebViewerParams.DOMInstruction.Position.RelativePosition"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "dx", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "dy", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new aOe().fromBinary(e, t); + } + static fromJson(e, t) { + return new aOe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new aOe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(aOe, e, t); + } + }; + Rms = class lOe extends N { + constructor(e) { + super(); + this.action = { + case: undefined + }; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.WebViewerParams.DOMInstruction.Action"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "click", + kind: "message", + T: Nms, + oneof: "action" + }, { + no: 2, + name: "input", + kind: "message", + T: Mms, + oneof: "action" + }, { + no: 3, + name: "hover", + kind: "message", + T: Ams, + oneof: "action" + }, { + no: 4, + name: "wait_for_navigation", + kind: "message", + T: $ms, + oneof: "action" + }, { + no: 5, + name: "scroll", + kind: "message", + T: Fms, + oneof: "action" + }]); + } + static fromBinary(e, t) { + return new lOe().fromBinary(e, t); + } + static fromJson(e, t) { + return new lOe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new lOe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(lOe, e, t); + } + }; + Nms = class cOe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.WebViewerParams.DOMInstruction.Click"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "double_click", + kind: "scalar", + T: 8, + opt: true + }, { + no: 2, + name: "right_click", + kind: "scalar", + T: 8, + opt: true + }]); + } + static fromBinary(e, t) { + return new cOe().fromBinary(e, t); + } + static fromJson(e, t) { + return new cOe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new cOe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(cOe, e, t); + } + }; + Mms = class uOe extends N { + constructor(e) { + super(); + this.value = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.WebViewerParams.DOMInstruction.Input"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "value", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "press_enter", + kind: "scalar", + T: 8, + opt: true + }]); + } + static fromBinary(e, t) { + return new uOe().fromBinary(e, t); + } + static fromJson(e, t) { + return new uOe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new uOe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(uOe, e, t); + } + }; + Ams = class dOe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.WebViewerParams.DOMInstruction.Hover"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new dOe().fromBinary(e, t); + } + static fromJson(e, t) { + return new dOe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new dOe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(dOe, e, t); + } + }; + $ms = class hOe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.WebViewerParams.DOMInstruction.WaitForNavigation"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new hOe().fromBinary(e, t); + } + static fromJson(e, t) { + return new hOe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new hOe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(hOe, e, t); + } + }; + Fms = class fOe extends N { + constructor(e) { + super(); + this.scrollType = { + case: undefined + }; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.WebViewerParams.DOMInstruction.Scroll"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "pixels", + kind: "scalar", + T: 5, + oneof: "scroll_type" + }, { + no: 2, + name: "percentage", + kind: "scalar", + T: 5, + oneof: "scroll_type" + }]); + } + static fromBinary(e, t) { + return new fOe().fromBinary(e, t); + } + static fromJson(e, t) { + return new fOe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new fOe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(fOe, e, t); + } + }; + Oms = class gOe extends N { + constructor(e) { + super(); + this.severity = Qbe.UNSPECIFIED; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.WebViewerParams.ConsoleLogParams"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "severity", + kind: "enum", + T: m.getEnumType(Qbe) + }, { + no: 2, + name: "filter", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new gOe().fromBinary(e, t); + } + static fromJson(e, t) { + return new gOe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new gOe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(gOe, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.ALL = 1] = "ALL"; + i[i.WARNINGS_AND_ERRORS = 2] = "WARNINGS_AND_ERRORS"; + i[i.ERRORS_ONLY = 3] = "ERRORS_ONLY"; + })(Qbe ||= {}); + m.util.setEnumType(Qbe, "aiserver.v1.WebViewerParams.ConsoleLogParams.ConsoleLogSeverity", [{ + no: 0, + name: "CONSOLE_LOG_SEVERITY_UNSPECIFIED" + }, { + no: 1, + name: "CONSOLE_LOG_SEVERITY_ALL" + }, { + no: 2, + name: "CONSOLE_LOG_SEVERITY_WARNINGS_AND_ERRORS" + }, { + no: 3, + name: "CONSOLE_LOG_SEVERITY_ERRORS_ONLY" + }]); + Zbe = class pOe extends N { + constructor(e) { + super(); + this.url = ""; + this.screenshots = []; + this.consoleLogs = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.WebViewerResult"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "url", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "screenshot", + kind: "message", + T: tD + }, { + no: 3, + name: "screenshots", + kind: "message", + T: tD, + repeated: true + }, { + no: 4, + name: "console_logs", + kind: "message", + T: Sqt, + repeated: true + }]); + } + static fromBinary(e, t) { + return new pOe().fromBinary(e, t); + } + static fromJson(e, t) { + return new pOe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new pOe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(pOe, e, t); + } + }; + Sqt = class mOe extends N { + constructor(e) { + super(); + this.type = ""; + this.text = ""; + this.source = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.WebViewerResult.ConsoleLog"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "type", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "text", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "source", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new mOe().fromBinary(e, t); + } + static fromJson(e, t) { + return new mOe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new mOe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(mOe, e, t); + } + }; + _ms = class bOe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.WebViewerStream"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new bOe().fromBinary(e, t); + } + static fromJson(e, t) { + return new bOe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new bOe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(bOe, e, t); + } + }; + xqt = class vOe extends N { + constructor(e) { + super(); + this.tools = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.MCPParams"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "tools", + kind: "message", + T: qut, + repeated: true + }]); + } + static fromBinary(e, t) { + return new vOe().fromBinary(e, t); + } + static fromJson(e, t) { + return new vOe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new vOe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(vOe, e, t); + } + }; + qut = class yOe extends N { + constructor(e) { + super(); + this.name = ""; + this.description = ""; + this.parameters = ""; + this.serverName = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.MCPParams.Tool"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "name", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "description", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "parameters", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "server_name", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new yOe().fromBinary(e, t); + } + static fromJson(e, t) { + return new yOe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new yOe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(yOe, e, t); + } + }; + jut = class wOe extends N { + constructor(e) { + super(); + this.selectedTool = ""; + this.result = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.MCPResult"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "selected_tool", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "result", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new wOe().fromBinary(e, t); + } + static fromJson(e, t) { + return new wOe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new wOe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(wOe, e, t); + } + }; + Bms = class COe extends N { + constructor(e) { + super(); + this.tools = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.MCPStream"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "tools", + kind: "message", + T: qut, + repeated: true + }]); + } + static fromBinary(e, t) { + return new COe().fromBinary(e, t); + } + static fromJson(e, t) { + return new COe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new COe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(COe, e, t); + } + }; + kqt = class SOe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.DiffHistoryParams"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new SOe().fromBinary(e, t); + } + static fromJson(e, t) { + return new SOe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new SOe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(SOe, e, t); + } + }; + zut = class xOe extends N { + constructor(e) { + super(); + this.humanChanges = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.DiffHistoryResult"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 40, + name: "human_changes", + kind: "message", + T: Eqt, + repeated: true + }]); + } + static fromBinary(e, t) { + return new xOe().fromBinary(e, t); + } + static fromJson(e, t) { + return new xOe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new xOe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(xOe, e, t); + } + }; + Ums = class kOe extends N { + constructor(e) { + super(); + this.startLineNumber = 0; + this.endLineNumberExclusive = 0; + this.beforeContextLines = []; + this.removedLines = []; + this.addedLines = []; + this.afterContextLines = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.DiffHistoryResult.RenderedDiff"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "start_line_number", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "end_line_number_exclusive", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "before_context_lines", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 4, + name: "removed_lines", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 5, + name: "added_lines", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 6, + name: "after_context_lines", + kind: "scalar", + T: 9, + repeated: true + }]); + } + static fromBinary(e, t) { + return new kOe().fromBinary(e, t); + } + static fromJson(e, t) { + return new kOe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new kOe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(kOe, e, t); + } + }; + Eqt = class EOe extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.renderedDiffs = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.DiffHistoryResult.HumanChange"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "rendered_diffs", + kind: "message", + T: Ums, + repeated: true + }]); + } + static fromBinary(e, t) { + return new EOe().fromBinary(e, t); + } + static fromJson(e, t) { + return new EOe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new EOe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(EOe, e, t); + } + }; + Wms = class IOe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.DiffHistoryStream"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new IOe().fromBinary(e, t); + } + static fromJson(e, t) { + return new IOe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new IOe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(IOe, e, t); + } + }; + Jut = class DOe extends N { + constructor(e) { + super(); + this.instruction = ""; + this.implementation = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ImplementerParams"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "instruction", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "implementation", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new DOe().fromBinary(e, t); + } + static fromJson(e, t) { + return new DOe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new DOe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(DOe, e, t); + } + }; + eve = class TOe extends N { + constructor(e) { + super(); + this.isApplied = false; + this.applyFailed = false; + this.linterErrors = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ImplementerResult"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "diff", + kind: "message", + T: uR + }, { + no: 2, + name: "is_applied", + kind: "scalar", + T: 8 + }, { + no: 3, + name: "apply_failed", + kind: "scalar", + T: 8 + }, { + no: 4, + name: "linter_errors", + kind: "message", + T: YT, + repeated: true + }]); + } + static fromBinary(e, t) { + return new TOe().fromBinary(e, t); + } + static fromJson(e, t) { + return new TOe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new TOe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(TOe, e, t); + } + }; + gtr = class POe extends N { + constructor(e) { + super(); + this.chunks = []; + this.editor = tve.UNSPECIFIED; + this.hitTimeout = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ImplementerResult.FileDiff"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "chunks", + kind: "message", + T: Vms, + repeated: true + }, { + no: 2, + name: "editor", + kind: "enum", + T: m.getEnumType(tve) + }, { + no: 3, + name: "hit_timeout", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new POe().fromBinary(e, t); + } + static fromJson(e, t) { + return new POe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new POe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(POe, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.AI = 1] = "AI"; + i[i.HUMAN = 2] = "HUMAN"; + })(tve ||= {}); + m.util.setEnumType(tve, "aiserver.v1.ImplementerResult.FileDiff.Editor", [{ + no: 0, + name: "EDITOR_UNSPECIFIED" + }, { + no: 1, + name: "EDITOR_AI" + }, { + no: 2, + name: "EDITOR_HUMAN" + }]); + Vms = class LOe extends N { + constructor(e) { + super(); + this.diffString = ""; + this.oldStart = 0; + this.newStart = 0; + this.oldLines = 0; + this.newLines = 0; + this.linesRemoved = 0; + this.linesAdded = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ImplementerResult.FileDiff.ChunkDiff"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "diff_string", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "old_start", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "new_start", + kind: "scalar", + T: 5 + }, { + no: 4, + name: "old_lines", + kind: "scalar", + T: 5 + }, { + no: 5, + name: "new_lines", + kind: "scalar", + T: 5 + }, { + no: 6, + name: "lines_removed", + kind: "scalar", + T: 5 + }, { + no: 7, + name: "lines_added", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new LOe().fromBinary(e, t); + } + static fromJson(e, t) { + return new LOe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new LOe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(LOe, e, t); + } + }; + Hms = class ROe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ImplementerStream"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new ROe().fromBinary(e, t); + } + static fromJson(e, t) { + return new ROe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new ROe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(ROe, e, t); + } + }; + Iqt = class NOe extends N { + constructor(e) { + super(); + this.query = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SearchSymbolsParams"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "query", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new NOe().fromBinary(e, t); + } + static fromJson(e, t) { + return new NOe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new NOe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(NOe, e, t); + } + }; + Gut = class MOe extends N { + constructor(e) { + super(); + this.matches = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SearchSymbolsResult"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "matches", + kind: "message", + T: Dqt, + repeated: true + }, { + no: 2, + name: "rejected", + kind: "scalar", + T: 8, + opt: true + }]); + } + static fromBinary(e, t) { + return new MOe().fromBinary(e, t); + } + static fromJson(e, t) { + return new MOe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new MOe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(MOe, e, t); + } + }; + Dqt = class AOe extends N { + constructor(e) { + super(); + this.name = ""; + this.uri = ""; + this.secondaryText = ""; + this.labelMatches = []; + this.descriptionMatches = []; + this.score = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SearchSymbolsResult.SymbolMatch"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "name", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "uri", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "range", + kind: "message", + T: mqt + }, { + no: 4, + name: "secondary_text", + kind: "scalar", + T: 9 + }, { + no: 5, + name: "label_matches", + kind: "message", + T: bqt, + repeated: true + }, { + no: 6, + name: "description_matches", + kind: "message", + T: bqt, + repeated: true + }, { + no: 7, + name: "score", + kind: "scalar", + T: 1 + }]); + } + static fromBinary(e, t) { + return new AOe().fromBinary(e, t); + } + static fromJson(e, t) { + return new AOe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new AOe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(AOe, e, t); + } + }; + qms = class $Oe extends N { + constructor(e) { + super(); + this.query = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SearchSymbolsStream"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "query", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new $Oe().fromBinary(e, t); + } + static fromJson(e, t) { + return new $Oe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new $Oe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals($Oe, e, t); + } + }; + Tqt = class FOe extends N { + constructor(e) { + super(); + this.proposedFollowup = ""; + this.bcId = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.BackgroundComposerFollowupParams"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "proposed_followup", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "bc_id", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new FOe().fromBinary(e, t); + } + static fromJson(e, t) { + return new FOe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new FOe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(FOe, e, t); + } + }; + Jz = class OOe extends N { + constructor(e) { + super(); + this.proposedFollowup = ""; + this.isSent = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.BackgroundComposerFollowupResult"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "proposed_followup", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "is_sent", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new OOe().fromBinary(e, t); + } + static fromJson(e, t) { + return new OOe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new OOe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(OOe, e, t); + } + }; + jms = class _Oe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.BackgroundComposerFollowupStream"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new _Oe().fromBinary(e, t); + } + static fromJson(e, t) { + return new _Oe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new _Oe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(_Oe, e, t); + } + }; + ptr = class BOe extends N { + constructor(e) { + super(); + this.targetFiles = []; + this.focusQuery = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SummarizeCodeParams"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "target_files", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 2, + name: "focus_query", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new BOe().fromBinary(e, t); + } + static fromJson(e, t) { + return new BOe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new BOe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(BOe, e, t); + } + }; + mtr = class UOe extends N { + constructor(e) { + super(); + this.summary = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SummarizeCodeResult"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "summary", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new UOe().fromBinary(e, t); + } + static fromJson(e, t) { + return new UOe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new UOe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(UOe, e, t); + } + }; + btr = class WOe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SummarizeCodeStream"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new WOe().fromBinary(e, t); + } + static fromJson(e, t) { + return new WOe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new WOe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(WOe, e, t); + } + }; + Pqt = class VOe extends N { + constructor(e) { + super(); + this.knowledgeToStore = ""; + this.title = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.KnowledgeBaseParams"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "knowledge_to_store", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "title", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new VOe().fromBinary(e, t); + } + static fromJson(e, t) { + return new VOe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new VOe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(VOe, e, t); + } + }; + ive = class HOe extends N { + constructor(e) { + super(); + this.success = false; + this.confirmationMessage = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.KnowledgeBaseResult"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "success", + kind: "scalar", + T: 8 + }, { + no: 2, + name: "confirmation_message", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new HOe().fromBinary(e, t); + } + static fromJson(e, t) { + return new HOe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new HOe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(HOe, e, t); + } + }; + zms = class qOe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.KnowledgeBaseStream"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new qOe().fromBinary(e, t); + } + static fromJson(e, t) { + return new qOe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new qOe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(qOe, e, t); + } + }; + } +}); +var Kut; +var qie; +var Lqt; +var Yut; +var Jms; +var vtr; +var Gms; +var ytr; +var jie = ue({ + "out-build/proto/aiserver/v1/bugbot_pb.js"() { + "use strict"; + + Hr(); + Wo(); + Kut = class jOe extends N { + constructor(e) { + super(); + this.file = ""; + this.startLine = 0; + this.endLine = 0; + this.codeLines = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.BugLocation"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "file", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "start_line", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "end_line", + kind: "scalar", + T: 5 + }, { + no: 4, + name: "code_lines", + kind: "scalar", + T: 9, + repeated: true + }]); + } + static fromBinary(e, t) { + return new jOe().fromBinary(e, t); + } + static fromJson(e, t) { + return new jOe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new jOe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(jOe, e, t); + } + }; + qie = class zOe extends N { + constructor(e) { + super(); + this.locations = []; + this.id = ""; + this.description = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.BugReport"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "locations", + kind: "message", + T: Kut, + repeated: true + }, { + no: 2, + name: "id", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "description", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "confidence", + kind: "scalar", + T: 2, + opt: true + }]); + } + static fromBinary(e, t) { + return new zOe().fromBinary(e, t); + } + static fromJson(e, t) { + return new zOe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new zOe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(zOe, e, t); + } + }; + Lqt = class JOe extends N { + constructor(e) { + super(); + this.bugReports = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.BugReports"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "bug_reports", + kind: "message", + T: qie, + repeated: true + }]); + } + static fromBinary(e, t) { + return new JOe().fromBinary(e, t); + } + static fromJson(e, t) { + return new JOe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new JOe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(JOe, e, t); + } + }; + Yut = class GOe extends N { + constructor(e) { + super(); + this.inBackgroundSubsidized = false; + this.hasTelemetry = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamBugBotRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "git_diff", + kind: "message", + T: Sb + }, { + no: 2, + name: "model_details", + kind: "message", + T: Qa + }, { + no: 3, + name: "user_instructions", + kind: "scalar", + T: 9, + opt: true + }, { + no: 4, + name: "bug_detection_guidelines", + kind: "scalar", + T: 9, + opt: true + }, { + no: 5, + name: "iterations", + kind: "scalar", + T: 5, + opt: true + }, { + no: 12, + name: "unified_context_lines", + kind: "scalar", + T: 5, + opt: true + }, { + no: 6, + name: "in_background_subsidized", + kind: "scalar", + T: 8 + }, { + no: 7, + name: "session_id", + kind: "scalar", + T: 9, + opt: true + }, { + no: 8, + name: "price_id", + kind: "scalar", + T: 9, + opt: true + }, { + no: 9, + name: "has_telemetry", + kind: "scalar", + T: 8 + }, { + no: 10, + name: "constrain_to_file", + kind: "scalar", + T: 9, + opt: true + }, { + no: 11, + name: "constrain_to_range", + kind: "message", + T: Jms, + opt: true + }]); + } + static fromBinary(e, t) { + return new GOe().fromBinary(e, t); + } + static fromJson(e, t) { + return new GOe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new GOe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(GOe, e, t); + } + }; + Jms = class KOe extends N { + constructor(e) { + super(); + this.startLine = 0; + this.endLineInclusive = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamBugBotRequest.Range"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "start_line", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "end_line_inclusive", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new KOe().fromBinary(e, t); + } + static fromJson(e, t) { + return new KOe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new KOe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(KOe, e, t); + } + }; + vtr = class YOe extends N { + constructor(e) { + super(); + this.seed = ""; + this.date = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RunBugBotPromptProps"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "req", + kind: "message", + T: Yut + }, { + no: 2, + name: "seed", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "date", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new YOe().fromBinary(e, t); + } + static fromJson(e, t) { + return new YOe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new YOe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(YOe, e, t); + } + }; + Gms = class XOe extends N { + constructor(e) { + super(); + this.date = ""; + this.seed = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.BugBotDiscriminatorPromptProps"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "req", + kind: "message", + T: Yut + }, { + no: 2, + name: "bug", + kind: "message", + T: qie + }, { + no: 3, + name: "date", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "seed", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new XOe().fromBinary(e, t); + } + static fromJson(e, t) { + return new XOe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new XOe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(XOe, e, t); + } + }; + ytr = class QOe extends N { + constructor(e) { + super(); + this.isRealBug = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.BugBotDiscriminatorTrainingPromptProps"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "props", + kind: "message", + T: Gms + }, { + no: 2, + name: "is_real_bug", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new QOe().fromBinary(e, t); + } + static fromJson(e, t) { + return new QOe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new QOe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(QOe, e, t); + } + }; + } +}); +var Rqt; +var Nqt; +var Kms; +var Yms; +var sve; +var Xut = ue({ + "out-build/proto/aiserver/v1/docs_pb.js"() { + "use strict"; + + Hr(); + Rqt = class ZOe extends N { + constructor(e) { + super(); + this.prefixUrl = ""; + this.docName = ""; + this.isDifferentPrefixOrigin = false; + this.truePrefixUrl = ""; + this.public = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.DocumentationMetadata"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "prefix_url", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "doc_name", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "is_different_prefix_origin", + kind: "scalar", + T: 8 + }, { + no: 4, + name: "true_prefix_url", + kind: "scalar", + T: 9 + }, { + no: 5, + name: "public", + kind: "scalar", + T: 8 + }, { + no: 6, + name: "team_id", + kind: "scalar", + T: 5, + opt: true + }]); + } + static fromBinary(e, t) { + return new ZOe().fromBinary(e, t); + } + static fromJson(e, t) { + return new ZOe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new ZOe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(ZOe, e, t); + } + }; + Nqt = class e_e extends N { + constructor(e) { + super(); + this.docName = ""; + this.pageUrl = ""; + this.documentationChunk = ""; + this.score = 0; + this.pageTitle = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.DocumentationChunk"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "doc_name", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "page_url", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "documentation_chunk", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "score", + kind: "scalar", + T: 2 + }, { + no: 5, + name: "page_title", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new e_e().fromBinary(e, t); + } + static fromJson(e, t) { + return new e_e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new e_e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(e_e, e, t); + } + }; + Kms = class t_e extends N { + constructor(e) { + super(); + this.docIdentifier = ""; + this.query = ""; + this.topK = 0; + this.rerankResults = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.DocumentationQueryRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "doc_identifier", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "query", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "top_k", + kind: "scalar", + T: 13 + }, { + no: 4, + name: "rerank_results", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new t_e().fromBinary(e, t); + } + static fromJson(e, t) { + return new t_e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new t_e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(t_e, e, t); + } + }; + Yms = class i_e extends N { + constructor(e) { + super(); + this.docIdentifier = ""; + this.docName = ""; + this.docChunks = []; + this.status = sve.UNSPECIFIED; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.DocumentationQueryResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "doc_identifier", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "doc_name", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "doc_chunks", + kind: "message", + T: Nqt, + repeated: true + }, { + no: 4, + name: "status", + kind: "enum", + T: m.getEnumType(sve) + }]); + } + static fromBinary(e, t) { + return new i_e().fromBinary(e, t); + } + static fromJson(e, t) { + return new i_e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new i_e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(i_e, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.NOT_FOUND = 1] = "NOT_FOUND"; + i[i.SUCCESS = 2] = "SUCCESS"; + i[i.FAILURE = 3] = "FAILURE"; + })(sve ||= {}); + m.util.setEnumType(sve, "aiserver.v1.DocumentationQueryResponse.Status", [{ + no: 0, + name: "STATUS_UNSPECIFIED" + }, { + no: 1, + name: "STATUS_NOT_FOUND" + }, { + no: 2, + name: "STATUS_SUCCESS" + }, { + no: 3, + name: "STATUS_FAILURE" + }]); + } +}); +var Xms; +var as; +var eC; +var Qms; +var Zms; +var ebs; +var tbs; +var ibs; +var sbs; +var nbs; +var rbs; +var Mqt; +var Aqt; +var obs; +var abs; +var lbs; +var cbs; +var ubs; +var dbs; +var hbs; +var iu = ue({ + "out-build/proto/aiserver/v1/composer_pb.js"() { + "use strict"; + + Hr(); + Wo(); + Xms = class s_e extends N { + constructor(e) { + super(); + this.type = as.UNSPECIFIED; + this.data = { + case: undefined + }; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ComposerCapabilityRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "type", + kind: "enum", + T: m.getEnumType(as) + }, { + no: 2, + name: "loop_on_lints", + kind: "message", + T: ebs, + oneof: "data" + }, { + no: 3, + name: "loop_on_tests", + kind: "message", + T: tbs, + oneof: "data" + }, { + no: 4, + name: "mega_planner", + kind: "message", + T: ibs, + oneof: "data" + }, { + no: 5, + name: "loop_on_command", + kind: "message", + T: sbs, + oneof: "data" + }, { + no: 6, + name: "tool_call", + kind: "message", + T: nbs, + oneof: "data" + }, { + no: 7, + name: "diff_review", + kind: "message", + T: rbs, + oneof: "data" + }, { + no: 8, + name: "context_picking", + kind: "message", + T: abs, + oneof: "data" + }, { + no: 9, + name: "edit_trail", + kind: "message", + T: lbs, + oneof: "data" + }, { + no: 10, + name: "auto_context", + kind: "message", + T: cbs, + oneof: "data" + }, { + no: 11, + name: "context_planner", + kind: "message", + T: ubs, + oneof: "data" + }, { + no: 12, + name: "remember_this", + kind: "message", + T: dbs, + oneof: "data" + }, { + no: 13, + name: "decomposer", + kind: "message", + T: obs, + oneof: "data" + }, { + no: 14, + name: "cursor_rules", + kind: "message", + T: hbs, + oneof: "data" + }]); + } + static fromBinary(e, t) { + return new s_e().fromBinary(e, t); + } + static fromJson(e, t) { + return new s_e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new s_e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(s_e, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.LOOP_ON_LINTS = 1] = "LOOP_ON_LINTS"; + i[i.LOOP_ON_TESTS = 2] = "LOOP_ON_TESTS"; + i[i.MEGA_PLANNER = 3] = "MEGA_PLANNER"; + i[i.LOOP_ON_COMMAND = 4] = "LOOP_ON_COMMAND"; + i[i.TOOL_CALL = 5] = "TOOL_CALL"; + i[i.DIFF_REVIEW = 6] = "DIFF_REVIEW"; + i[i.CONTEXT_PICKING = 7] = "CONTEXT_PICKING"; + i[i.EDIT_TRAIL = 8] = "EDIT_TRAIL"; + i[i.AUTO_CONTEXT = 9] = "AUTO_CONTEXT"; + i[i.CONTEXT_PLANNER = 10] = "CONTEXT_PLANNER"; + i[i.DIFF_HISTORY = 11] = "DIFF_HISTORY"; + i[i.REMEMBER_THIS = 12] = "REMEMBER_THIS"; + i[i.DECOMPOSER = 13] = "DECOMPOSER"; + i[i.USES_CODEBASE = 14] = "USES_CODEBASE"; + i[i.TOOL_FORMER = 15] = "TOOL_FORMER"; + i[i.CURSOR_RULES = 16] = "CURSOR_RULES"; + i[i.TOKEN_COUNTER = 17] = "TOKEN_COUNTER"; + i[i.USAGE_DATA = 18] = "USAGE_DATA"; + i[i.CHIMES = 19] = "CHIMES"; + i[i.CODE_DECAY_TRACKER = 20] = "CODE_DECAY_TRACKER"; + i[i.BACKGROUND_COMPOSER = 21] = "BACKGROUND_COMPOSER"; + i[i.SUMMARIZATION = 22] = "SUMMARIZATION"; + i[i.AI_CODE_TRACKING = 23] = "AI_CODE_TRACKING"; + i[i.QUEUING = 24] = "QUEUING"; + i[i.MEMORIES = 25] = "MEMORIES"; + i[i.RCP_LOGS = 26] = "RCP_LOGS"; + i[i.KNOWLEDGE_FETCH = 27] = "KNOWLEDGE_FETCH"; + })(as ||= {}); + m.util.setEnumType(as, "aiserver.v1.ComposerCapabilityRequest.ComposerCapabilityType", [{ + no: 0, + name: "COMPOSER_CAPABILITY_TYPE_UNSPECIFIED" + }, { + no: 1, + name: "COMPOSER_CAPABILITY_TYPE_LOOP_ON_LINTS" + }, { + no: 2, + name: "COMPOSER_CAPABILITY_TYPE_LOOP_ON_TESTS" + }, { + no: 3, + name: "COMPOSER_CAPABILITY_TYPE_MEGA_PLANNER" + }, { + no: 4, + name: "COMPOSER_CAPABILITY_TYPE_LOOP_ON_COMMAND" + }, { + no: 5, + name: "COMPOSER_CAPABILITY_TYPE_TOOL_CALL" + }, { + no: 6, + name: "COMPOSER_CAPABILITY_TYPE_DIFF_REVIEW" + }, { + no: 7, + name: "COMPOSER_CAPABILITY_TYPE_CONTEXT_PICKING" + }, { + no: 8, + name: "COMPOSER_CAPABILITY_TYPE_EDIT_TRAIL" + }, { + no: 9, + name: "COMPOSER_CAPABILITY_TYPE_AUTO_CONTEXT" + }, { + no: 10, + name: "COMPOSER_CAPABILITY_TYPE_CONTEXT_PLANNER" + }, { + no: 11, + name: "COMPOSER_CAPABILITY_TYPE_DIFF_HISTORY" + }, { + no: 12, + name: "COMPOSER_CAPABILITY_TYPE_REMEMBER_THIS" + }, { + no: 13, + name: "COMPOSER_CAPABILITY_TYPE_DECOMPOSER" + }, { + no: 14, + name: "COMPOSER_CAPABILITY_TYPE_USES_CODEBASE" + }, { + no: 15, + name: "COMPOSER_CAPABILITY_TYPE_TOOL_FORMER" + }, { + no: 16, + name: "COMPOSER_CAPABILITY_TYPE_CURSOR_RULES" + }, { + no: 17, + name: "COMPOSER_CAPABILITY_TYPE_TOKEN_COUNTER" + }, { + no: 18, + name: "COMPOSER_CAPABILITY_TYPE_USAGE_DATA" + }, { + no: 19, + name: "COMPOSER_CAPABILITY_TYPE_CHIMES" + }, { + no: 20, + name: "COMPOSER_CAPABILITY_TYPE_CODE_DECAY_TRACKER" + }, { + no: 21, + name: "COMPOSER_CAPABILITY_TYPE_BACKGROUND_COMPOSER" + }, { + no: 22, + name: "COMPOSER_CAPABILITY_TYPE_SUMMARIZATION" + }, { + no: 23, + name: "COMPOSER_CAPABILITY_TYPE_AI_CODE_TRACKING" + }, { + no: 24, + name: "COMPOSER_CAPABILITY_TYPE_QUEUING" + }, { + no: 25, + name: "COMPOSER_CAPABILITY_TYPE_MEMORIES" + }, { + no: 26, + name: "COMPOSER_CAPABILITY_TYPE_RCP_LOGS" + }, { + no: 27, + name: "COMPOSER_CAPABILITY_TYPE_KNOWLEDGE_FETCH" + }]); + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.ADD_FILE_TO_CONTEXT = 1] = "ADD_FILE_TO_CONTEXT"; + i[i.RUN_TERMINAL_COMMAND = 2] = "RUN_TERMINAL_COMMAND"; + i[i.ITERATE = 3] = "ITERATE"; + i[i.REMOVE_FILE_FROM_CONTEXT = 4] = "REMOVE_FILE_FROM_CONTEXT"; + i[i.SEMANTIC_SEARCH_CODEBASE = 5] = "SEMANTIC_SEARCH_CODEBASE"; + })(eC ||= {}); + m.util.setEnumType(eC, "aiserver.v1.ComposerCapabilityRequest.ToolType", [{ + no: 0, + name: "TOOL_TYPE_UNSPECIFIED" + }, { + no: 1, + name: "TOOL_TYPE_ADD_FILE_TO_CONTEXT" + }, { + no: 2, + name: "TOOL_TYPE_RUN_TERMINAL_COMMAND" + }, { + no: 3, + name: "TOOL_TYPE_ITERATE" + }, { + no: 4, + name: "TOOL_TYPE_REMOVE_FILE_FROM_CONTEXT" + }, { + no: 5, + name: "TOOL_TYPE_SEMANTIC_SEARCH_CODEBASE" + }]); + Qms = class n_e extends N { + constructor(e) { + super(); + this.type = eC.UNSPECIFIED; + this.name = ""; + this.properties = {}; + this.required = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ComposerCapabilityRequest.ToolSchema"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "type", + kind: "enum", + T: m.getEnumType(eC) + }, { + no: 2, + name: "name", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "properties", + kind: "map", + K: 9, + V: { + kind: "message", + T: Zms + } + }, { + no: 4, + name: "required", + kind: "scalar", + T: 9, + repeated: true + }]); + } + static fromBinary(e, t) { + return new n_e().fromBinary(e, t); + } + static fromJson(e, t) { + return new n_e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new n_e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(n_e, e, t); + } + }; + Zms = class r_e extends N { + constructor(e) { + super(); + this.type = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ComposerCapabilityRequest.SchemaProperty"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "type", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "description", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new r_e().fromBinary(e, t); + } + static fromJson(e, t) { + return new r_e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new r_e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(r_e, e, t); + } + }; + ebs = class o_e extends N { + constructor(e) { + super(); + this.linterErrors = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ComposerCapabilityRequest.LoopOnLintsCapability"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "linter_errors", + kind: "message", + T: xp, + repeated: true + }, { + no: 2, + name: "custom_instructions", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new o_e().fromBinary(e, t); + } + static fromJson(e, t) { + return new o_e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new o_e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(o_e, e, t); + } + }; + tbs = class a_e extends N { + constructor(e) { + super(); + this.testNames = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ComposerCapabilityRequest.LoopOnTestsCapability"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "test_names", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 2, + name: "custom_instructions", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new a_e().fromBinary(e, t); + } + static fromJson(e, t) { + return new a_e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new a_e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(a_e, e, t); + } + }; + ibs = class l_e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ComposerCapabilityRequest.MegaPlannerCapability"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "custom_instructions", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new l_e().fromBinary(e, t); + } + static fromJson(e, t) { + return new l_e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new l_e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(l_e, e, t); + } + }; + sbs = class c_e extends N { + constructor(e) { + super(); + this.command = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ComposerCapabilityRequest.LoopOnCommandCapability"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "command", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "custom_instructions", + kind: "scalar", + T: 9, + opt: true + }, { + no: 3, + name: "output", + kind: "scalar", + T: 9, + opt: true + }, { + no: 4, + name: "exit_code", + kind: "scalar", + T: 5, + opt: true + }]); + } + static fromBinary(e, t) { + return new c_e().fromBinary(e, t); + } + static fromJson(e, t) { + return new c_e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new c_e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(c_e, e, t); + } + }; + nbs = class u_e extends N { + constructor(e) { + super(); + this.toolSchemas = []; + this.relevantFiles = []; + this.filesInContext = []; + this.semanticSearchFiles = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ComposerCapabilityRequest.ToolCallCapability"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "custom_instructions", + kind: "scalar", + T: 9, + opt: true + }, { + no: 2, + name: "tool_schemas", + kind: "message", + T: Qms, + repeated: true + }, { + no: 3, + name: "relevant_files", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 4, + name: "files_in_context", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 5, + name: "semantic_search_files", + kind: "scalar", + T: 9, + repeated: true + }]); + } + static fromBinary(e, t) { + return new u_e().fromBinary(e, t); + } + static fromJson(e, t) { + return new u_e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new u_e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(u_e, e, t); + } + }; + rbs = class d_e extends N { + constructor(e) { + super(); + this.diffs = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ComposerCapabilityRequest.DiffReviewCapability"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "custom_instructions", + kind: "scalar", + T: 9, + opt: true + }, { + no: 2, + name: "diffs", + kind: "message", + T: Mqt, + repeated: true + }]); + } + static fromBinary(e, t) { + return new d_e().fromBinary(e, t); + } + static fromJson(e, t) { + return new d_e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new d_e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(d_e, e, t); + } + }; + Mqt = class h_e extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.chunks = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ComposerCapabilityRequest.DiffReviewCapability.SimpleFileDiff"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "chunks", + kind: "message", + T: Aqt, + repeated: true + }]); + } + static fromBinary(e, t) { + return new h_e().fromBinary(e, t); + } + static fromJson(e, t) { + return new h_e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new h_e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(h_e, e, t); + } + }; + Aqt = class f_e extends N { + constructor(e) { + super(); + this.oldLines = []; + this.newLines = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ComposerCapabilityRequest.DiffReviewCapability.SimpleFileDiff.Chunk"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "old_lines", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 2, + name: "new_lines", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 3, + name: "old_range", + kind: "message", + T: Kv + }, { + no: 4, + name: "new_range", + kind: "message", + T: Kv + }]); + } + static fromBinary(e, t) { + return new f_e().fromBinary(e, t); + } + static fromJson(e, t) { + return new f_e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new f_e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(f_e, e, t); + } + }; + obs = class g_e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ComposerCapabilityRequest.DecomposerCapability"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "custom_instructions", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new g_e().fromBinary(e, t); + } + static fromJson(e, t) { + return new g_e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new g_e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(g_e, e, t); + } + }; + abs = class p_e extends N { + constructor(e) { + super(); + this.potentialContextFiles = []; + this.potentialContextCodeChunks = []; + this.filesInContext = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ComposerCapabilityRequest.ContextPickingCapability"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "custom_instructions", + kind: "scalar", + T: 9, + opt: true + }, { + no: 2, + name: "potential_context_files", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 3, + name: "potential_context_code_chunks", + kind: "message", + T: SHt, + repeated: true + }, { + no: 4, + name: "files_in_context", + kind: "scalar", + T: 9, + repeated: true + }]); + } + static fromBinary(e, t) { + return new p_e().fromBinary(e, t); + } + static fromJson(e, t) { + return new p_e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new p_e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(p_e, e, t); + } + }; + lbs = class m_e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ComposerCapabilityRequest.EditTrailCapability"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "custom_instructions", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new m_e().fromBinary(e, t); + } + static fromJson(e, t) { + return new m_e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new m_e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(m_e, e, t); + } + }; + cbs = class b_e extends N { + constructor(e) { + super(); + this.additionalFiles = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ComposerCapabilityRequest.AutoContextCapability"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "custom_instructions", + kind: "scalar", + T: 9, + opt: true + }, { + no: 2, + name: "additional_files", + kind: "scalar", + T: 9, + repeated: true + }]); + } + static fromBinary(e, t) { + return new b_e().fromBinary(e, t); + } + static fromJson(e, t) { + return new b_e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new b_e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(b_e, e, t); + } + }; + ubs = class v_e extends N { + constructor(e) { + super(); + this.attachedCodeChunks = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ComposerCapabilityRequest.ContextPlannerCapability"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "custom_instructions", + kind: "scalar", + T: 9, + opt: true + }, { + no: 2, + name: "attached_code_chunks", + kind: "message", + T: SHt, + repeated: true + }]); + } + static fromBinary(e, t) { + return new v_e().fromBinary(e, t); + } + static fromJson(e, t) { + return new v_e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new v_e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(v_e, e, t); + } + }; + dbs = class y_e extends N { + constructor(e) { + super(); + this.memory = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ComposerCapabilityRequest.RememberThisCapability"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "custom_instructions", + kind: "scalar", + T: 9, + opt: true + }, { + no: 2, + name: "memory", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new y_e().fromBinary(e, t); + } + static fromJson(e, t) { + return new y_e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new y_e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(y_e, e, t); + } + }; + hbs = class w_e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ComposerCapabilityRequest.CursorRulesCapability"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "custom_instructions", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new w_e().fromBinary(e, t); + } + static fromJson(e, t) { + return new w_e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new w_e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(w_e, e, t); + } + }; + } +}); +var fbs; +var $qt; +var gbs; +var Fqt; +var pbs; +var Oqt; +var mbs; +var nve; +var _qt; +var Qut; +var bbs; +var Bqt; +var Uqt; +var Wqt; +var vbs; +var Vqt; +var ybs; +var wbs; +var Cbs; +var Sbs; +var Gz; +var Zut; +var Hqt; +var qqt; +var V7 = ue({ + "out-build/proto/aiserver/v1/shadow_workspace_pb.js"() { + "use strict"; + + Hr(); + Wo(); + jl(); + cS(); + fbs = class C_e extends N { + constructor(e) { + super(); + this.absolutePath = ""; + this.newContents = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SwWriteTextFileWithLintsRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "absolute_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "new_contents", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new C_e().fromBinary(e, t); + } + static fromJson(e, t) { + return new C_e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new C_e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(C_e, e, t); + } + }; + $qt = class S_e extends N { + constructor(e) { + super(); + this.newLinterErrors = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SwWriteTextFileWithLintsResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "new_linter_errors", + kind: "message", + T: YT, + repeated: true + }]); + } + static fromBinary(e, t) { + return new S_e().fromBinary(e, t); + } + static fromJson(e, t) { + return new S_e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new S_e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(S_e, e, t); + } + }; + gbs = class x_e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SwGetExplicitContextRequest"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new x_e().fromBinary(e, t); + } + static fromJson(e, t) { + return new x_e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new x_e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(x_e, e, t); + } + }; + Fqt = class k_e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SwGetExplicitContextResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "explicit_context", + kind: "message", + T: Qg + }]); + } + static fromBinary(e, t) { + return new k_e().fromBinary(e, t); + } + static fromJson(e, t) { + return new k_e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new k_e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(k_e, e, t); + } + }; + pbs = class E_e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SwGetEnvironmentInfoRequest"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new E_e().fromBinary(e, t); + } + static fromJson(e, t) { + return new E_e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new E_e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(E_e, e, t); + } + }; + Oqt = class I_e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SwGetEnvironmentInfoResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "environment_info", + kind: "message", + T: hut + }]); + } + static fromBinary(e, t) { + return new I_e().fromBinary(e, t); + } + static fromJson(e, t) { + return new I_e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new I_e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(I_e, e, t); + } + }; + mbs = class D_e extends N { + constructor(e) { + super(); + this.composerId = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SwCallClientSideV2ToolRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "tool_call", + kind: "message", + T: Hz + }, { + no: 2, + name: "composer_id", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new D_e().fromBinary(e, t); + } + static fromJson(e, t) { + return new D_e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new D_e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(D_e, e, t); + } + }; + nve = class T_e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SwCallClientSideV2ToolResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "tool_result", + kind: "message", + T: Zl + }]); + } + static fromBinary(e, t) { + return new T_e().fromBinary(e, t); + } + static fromJson(e, t) { + return new T_e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new T_e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(T_e, e, t); + } + }; + _qt = class P_e extends N { + constructor(e) { + super(); + this.pathEncryptionKey = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SwCompileRepoIncludeExcludePatternsRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "include_pattern", + kind: "scalar", + T: 9, + opt: true + }, { + no: 2, + name: "exclude_pattern", + kind: "scalar", + T: 9, + opt: true + }, { + no: 3, + name: "path_encryption_key", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "repository_info", + kind: "message", + T: pc + }]); + } + static fromBinary(e, t) { + return new P_e().fromBinary(e, t); + } + static fromJson(e, t) { + return new P_e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new P_e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(P_e, e, t); + } + }; + Qut = class L_e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SwCompileRepoIncludeExcludePatternsResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "glob_filter", + kind: "scalar", + T: 9, + opt: true + }, { + no: 2, + name: "not_glob_filter", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new L_e().fromBinary(e, t); + } + static fromJson(e, t) { + return new L_e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new L_e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(L_e, e, t); + } + }; + bbs = class R_e extends N { + constructor(e) { + super(); + this.accessToken = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SwProvideTemporaryAccessTokenRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "access_token", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new R_e().fromBinary(e, t); + } + static fromJson(e, t) { + return new R_e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new R_e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(R_e, e, t); + } + }; + Bqt = class N_e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SwProvideTemporaryAccessTokenResponse"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new N_e().fromBinary(e, t); + } + static fromJson(e, t) { + return new N_e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new N_e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(N_e, e, t); + } + }; + Uqt = class M_e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ShadowHealthCheckRequest"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new M_e().fromBinary(e, t); + } + static fromJson(e, t) { + return new M_e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new M_e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(M_e, e, t); + } + }; + Wqt = class A_e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ShadowHealthCheckResponse"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new A_e().fromBinary(e, t); + } + static fromJson(e, t) { + return new A_e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new A_e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(A_e, e, t); + } + }; + vbs = class $_e extends N { + constructor(e) { + super(); + this.pathEncryptionKey = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SwSyncIndexRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "repository_info", + kind: "message", + T: pc + }, { + no: 2, + name: "path_encryption_key", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new $_e().fromBinary(e, t); + } + static fromJson(e, t) { + return new $_e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new $_e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals($_e, e, t); + } + }; + Vqt = class F_e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SwSyncIndexResponse"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new F_e().fromBinary(e, t); + } + static fromJson(e, t) { + return new F_e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new F_e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(F_e, e, t); + } + }; + ybs = class O_e extends N { + constructor(e) { + super(); + this.files = []; + this.includeQuickFixes = false; + this.doNotUseInProdNewFilesShouldBeTemporarilyCreatedForIncreasedAccuracy = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetLintsForChangeRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "files", + kind: "message", + T: wbs, + repeated: true + }, { + no: 2, + name: "include_quick_fixes", + kind: "scalar", + T: 8 + }, { + no: 3, + name: "do_not_use_in_prod_new_files_should_be_temporarily_created_for_increased_accuracy", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new O_e().fromBinary(e, t); + } + static fromJson(e, t) { + return new O_e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new O_e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(O_e, e, t); + } + }; + wbs = class __e extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.initialContent = ""; + this.finalContent = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetLintsForChangeRequest.File"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "initial_content", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "final_content", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "get_all_lints_not_just_delta_lints_for_ranges_in_final_model", + kind: "message", + T: Cbs, + opt: true + }]); + } + static fromBinary(e, t) { + return new __e().fromBinary(e, t); + } + static fromJson(e, t) { + return new __e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new __e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(__e, e, t); + } + }; + Cbs = class B_e extends N { + constructor(e) { + super(); + this.ranges = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetLintsForChangeRequest.File.RangeCollection"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "ranges", + kind: "message", + T: Sbs, + repeated: true + }]); + } + static fromBinary(e, t) { + return new B_e().fromBinary(e, t); + } + static fromJson(e, t) { + return new B_e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new B_e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(B_e, e, t); + } + }; + Sbs = class U_e extends N { + constructor(e) { + super(); + this.startLineNumber = 0; + this.startColumn = 0; + this.endLineNumber = 0; + this.endColumn = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetLintsForChangeRequest.File.IRange"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "start_line_number", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "start_column", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "end_line_number", + kind: "scalar", + T: 5 + }, { + no: 4, + name: "end_column", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new U_e().fromBinary(e, t); + } + static fromJson(e, t) { + return new U_e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new U_e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(U_e, e, t); + } + }; + Gz = class W_e extends N { + constructor(e) { + super(); + this.lints = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetLintsForChangeResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "lints", + kind: "message", + T: Zut, + repeated: true + }]); + } + static fromBinary(e, t) { + return new W_e().fromBinary(e, t); + } + static fromJson(e, t) { + return new W_e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new W_e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(W_e, e, t); + } + }; + Zut = class V_e extends N { + constructor(e) { + super(); + this.message = ""; + this.severity = ""; + this.relativeWorkspacePath = ""; + this.startLineNumberOneIndexed = 0; + this.startColumnOneIndexed = 0; + this.endLineNumberInclusiveOneIndexed = 0; + this.endColumnOneIndexed = 0; + this.quickFixes = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetLintsForChangeResponse.Lint"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "message", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "severity", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "start_line_number_one_indexed", + kind: "scalar", + T: 5 + }, { + no: 5, + name: "start_column_one_indexed", + kind: "scalar", + T: 5 + }, { + no: 6, + name: "end_line_number_inclusive_one_indexed", + kind: "scalar", + T: 5 + }, { + no: 7, + name: "end_column_one_indexed", + kind: "scalar", + T: 5 + }, { + no: 9, + name: "quick_fixes", + kind: "message", + T: Hqt, + repeated: true + }]); + } + static fromBinary(e, t) { + return new V_e().fromBinary(e, t); + } + static fromJson(e, t) { + return new V_e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new V_e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(V_e, e, t); + } + }; + Hqt = class H_e extends N { + constructor(e) { + super(); + this.message = ""; + this.kind = ""; + this.isPreferred = false; + this.edits = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetLintsForChangeResponse.Lint.QuickFix"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "message", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "kind", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "is_preferred", + kind: "scalar", + T: 8 + }, { + no: 4, + name: "edits", + kind: "message", + T: qqt, + repeated: true + }]); + } + static fromBinary(e, t) { + return new H_e().fromBinary(e, t); + } + static fromJson(e, t) { + return new H_e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new H_e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(H_e, e, t); + } + }; + qqt = class q_e extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.text = ""; + this.startLineNumberOneIndexed = 0; + this.startColumnOneIndexed = 0; + this.endLineNumberInclusiveOneIndexed = 0; + this.endColumnOneIndexed = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetLintsForChangeResponse.Lint.QuickFix.Edit"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "text", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "start_line_number_one_indexed", + kind: "scalar", + T: 5 + }, { + no: 4, + name: "start_column_one_indexed", + kind: "scalar", + T: 5 + }, { + no: 5, + name: "end_line_number_inclusive_one_indexed", + kind: "scalar", + T: 5 + }, { + no: 6, + name: "end_column_one_indexed", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new q_e().fromBinary(e, t); + } + static fromJson(e, t) { + return new q_e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new q_e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(q_e, e, t); + } + }; + } +}); +var QT; +var xbs; +var kbs; +var s5; +var edt; +var wtr; +var Ebs; +var eA; +var jqt; +var tdt; +var idt; +var zqt; +var Jqt; +var rve; +var Ibs; +var Gqt; +var Dbs; +var Tbs; +var Pbs; +var Lbs; +var sdt; +var dR; +var tA; +var Kz; +var Rbs; +var Nbs; +var Mbs; +var Abs; +var Kqt; +var $bs; +var Yqt; +var Fbs; +var Xqt; +var Obs; +var _bs; +var Bbs; +var Ubs; +var Qqt; +var ove; +var ndt; +var Wbs; +var Vbs; +var rdt; +var Hbs; +var qbs; +var jbs; +var Zqt; +var Al; +var _n; +var hR; +var Xp; +var ZT; +var odt; +var Ctr; +var zbs; +var Jbs; +var ave; +var Gbs; +var Kbs; +var Ybs; +var Xbs; +var ejt; +var Qbs; +var Zbs; +var adt; +var lve; +var evs; +var tvs; +var ivs; +var tjt; +var Str; +var svs; +var nvs; +var rvs; +var ovs; +var avs; +var lvs; +var iA; +var ldt; +var cvs; +var uvs; +var cve; +var dvs; +var zie; +var uve; +var dve; +var hvs; +var ijt; +var fvs; +var Jie; +var eP; +var gvs; +var sjt; +var pvs; +var hve; +var fve; +var mvs; +var Lc = ue({ + "out-build/proto/aiserver/v1/chat_pb.js"() { + "use strict"; + + Hr(); + Wo(); + jl(); + Xut(); + cS(); + iu(); + V7(); + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.CODEBASE = 1] = "CODEBASE"; + i[i.LONG_FILE = 2] = "LONG_FILE"; + i[i.DOCS = 3] = "DOCS"; + })(QT ||= {}); + m.util.setEnumType(QT, "aiserver.v1.ChunkType", [{ + no: 0, + name: "CHUNK_TYPE_UNSPECIFIED" + }, { + no: 1, + name: "CHUNK_TYPE_CODEBASE" + }, { + no: 2, + name: "CHUNK_TYPE_LONG_FILE" + }, { + no: 3, + name: "CHUNK_TYPE_DOCS" + }]); + xbs = class j_e extends N { + constructor(e) { + super(); + this.editPlan = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamParallelApplyRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "code_block", + kind: "message", + T: Xg + }, { + no: 2, + name: "file", + kind: "message", + T: $x + }, { + no: 3, + name: "edit_plan", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new j_e().fromBinary(e, t); + } + static fromJson(e, t) { + return new j_e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new j_e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(j_e, e, t); + } + }; + kbs = class z_e extends N { + constructor(e) { + super(); + this.text = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamParallelApplyResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "text", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new z_e().fromBinary(e, t); + } + static fromJson(e, t) { + return new z_e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new z_e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(z_e, e, t); + } + }; + s5 = class J_e extends N { + constructor(e) { + super(); + this.request = { + case: undefined + }; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamUnifiedChatRequestWithTools"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "stream_unified_chat_request", + kind: "message", + T: dR, + oneof: "request" + }, { + no: 2, + name: "client_side_tool_v2_result", + kind: "message", + T: Zl, + oneof: "request" + }]); + } + static fromBinary(e, t) { + return new J_e().fromBinary(e, t); + } + static fromJson(e, t) { + return new J_e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new J_e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(J_e, e, t); + } + }; + edt = class G_e extends N { + constructor(e) { + super(); + this.response = { + case: undefined + }; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamUnifiedChatResponseWithTools"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "client_side_tool_v2_call", + kind: "message", + T: Hz, + oneof: "response" + }, { + no: 2, + name: "stream_unified_chat_response", + kind: "message", + T: Xqt, + oneof: "response" + }, { + no: 3, + name: "conversation_summary", + kind: "message", + T: eA, + oneof: "response" + }]); + } + static fromBinary(e, t) { + return new G_e().fromBinary(e, t); + } + static fromJson(e, t) { + return new G_e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new G_e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(G_e, e, t); + } + }; + wtr = class K_e extends N { + constructor(e) { + super(); + this.strategy = { + case: undefined + }; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ConversationSummaryStrategy"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "plain_text_summary", + kind: "scalar", + T: 9, + oneof: "strategy" + }, { + no: 2, + name: "arbitrary_summary_plus_tool_result_truncation", + kind: "message", + T: Ebs, + oneof: "strategy" + }]); + } + static fromBinary(e, t) { + return new K_e().fromBinary(e, t); + } + static fromJson(e, t) { + return new K_e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new K_e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(K_e, e, t); + } + }; + Ebs = class Y_e extends N { + constructor(e) { + super(); + this.toolResultTruncationLength = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ConversationSummaryStrategy.ArbitrarySummaryPlusToolResultTruncation"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "arbitrary_summary", + kind: "message", + T: eA + }, { + no: 2, + name: "tool_result_truncation_length", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new Y_e().fromBinary(e, t); + } + static fromJson(e, t) { + return new Y_e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Y_e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Y_e, e, t); + } + }; + eA = class X_e extends N { + constructor(e) { + super(); + this.summary = ""; + this.truncationLastBubbleIdInclusive = ""; + this.clientShouldStartSendingFromInclusiveBubbleId = ""; + this.previousConversationSummaryBubbleId = ""; + this.includesToolResults = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ConversationSummary"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "summary", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "truncation_last_bubble_id_inclusive", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "client_should_start_sending_from_inclusive_bubble_id", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "previous_conversation_summary_bubble_id", + kind: "scalar", + T: 9 + }, { + no: 5, + name: "includes_tool_results", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new X_e().fromBinary(e, t); + } + static fromJson(e, t) { + return new X_e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new X_e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(X_e, e, t); + } + }; + jqt = class Q_e extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.contents = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ContextToRank"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "contents", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "line_range", + kind: "message", + T: Kv, + opt: true + }, { + no: 4, + name: "code_block", + kind: "message", + T: Xg, + opt: true + }]); + } + static fromBinary(e, t) { + return new Q_e().fromBinary(e, t); + } + static fromJson(e, t) { + return new Q_e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Q_e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Q_e, e, t); + } + }; + tdt = class Z_e extends N { + constructor(e) { + super(); + this.score = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RankedContext"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "context", + kind: "message", + T: jqt + }, { + no: 2, + name: "score", + kind: "scalar", + T: 2 + }]); + } + static fromBinary(e, t) { + return new Z_e().fromBinary(e, t); + } + static fromJson(e, t) { + return new Z_e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Z_e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Z_e, e, t); + } + }; + idt = class eBe extends N { + constructor(e) { + super(); + this.chunks = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.DocumentationCitation"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "chunks", + kind: "message", + T: Nqt, + repeated: true + }]); + } + static fromBinary(e, t) { + return new eBe().fromBinary(e, t); + } + static fromJson(e, t) { + return new eBe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new eBe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(eBe, e, t); + } + }; + zqt = class tBe extends N { + constructor(e) { + super(); + this.references = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.WebCitation"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "references", + kind: "message", + T: Jqt, + repeated: true + }]); + } + static fromBinary(e, t) { + return new tBe().fromBinary(e, t); + } + static fromJson(e, t) { + return new tBe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new tBe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(tBe, e, t); + } + }; + Jqt = class iBe extends N { + constructor(e) { + super(); + this.title = ""; + this.url = ""; + this.chunk = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.WebReference"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 2, + name: "title", + kind: "scalar", + T: 9 + }, { + no: 1, + name: "url", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "chunk", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new iBe().fromBinary(e, t); + } + static fromJson(e, t) { + return new iBe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new iBe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(iBe, e, t); + } + }; + rve = class sBe extends N { + constructor(e) { + super(); + this.title = ""; + this.url = ""; + this.chunk = ""; + this.name = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.DocsReference"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "title", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "url", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "chunk", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "name", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new sBe().fromBinary(e, t); + } + static fromJson(e, t) { + return new sBe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new sBe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(sBe, e, t); + } + }; + Ibs = class nBe extends N { + constructor(e) { + super(); + this.message = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StatusUpdate"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "message", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "metadata", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new nBe().fromBinary(e, t); + } + static fromJson(e, t) { + return new nBe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new nBe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(nBe, e, t); + } + }; + Gqt = class rBe extends N { + constructor(e) { + super(); + this.updates = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StatusUpdates"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "updates", + kind: "message", + T: Ibs, + repeated: true + }]); + } + static fromBinary(e, t) { + return new rBe().fromBinary(e, t); + } + static fromJson(e, t) { + return new rBe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new rBe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(rBe, e, t); + } + }; + Dbs = class oBe extends N { + constructor(e) { + super(); + this.query = ""; + this.documents = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RerankDocumentsRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "query", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "documents", + kind: "message", + T: Pbs, + repeated: true + }]); + } + static fromBinary(e, t) { + return new oBe().fromBinary(e, t); + } + static fromJson(e, t) { + return new oBe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new oBe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(oBe, e, t); + } + }; + Tbs = class aBe extends N { + constructor(e) { + super(); + this.documents = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RerankDocumentsResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "documents", + kind: "message", + T: Lbs, + repeated: true + }]); + } + static fromBinary(e, t) { + return new aBe().fromBinary(e, t); + } + static fromJson(e, t) { + return new aBe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new aBe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(aBe, e, t); + } + }; + Pbs = class lBe extends N { + constructor(e) { + super(); + this.content = ""; + this.id = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.Document"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "content", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "id", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new lBe().fromBinary(e, t); + } + static fromJson(e, t) { + return new lBe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new lBe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(lBe, e, t); + } + }; + Lbs = class cBe extends N { + constructor(e) { + super(); + this.documentId = ""; + this.score = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.DocumentIdsWithScores"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "document_id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "score", + kind: "scalar", + T: 2 + }]); + } + static fromBinary(e, t) { + return new cBe().fromBinary(e, t); + } + static fromJson(e, t) { + return new cBe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new cBe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(cBe, e, t); + } + }; + sdt = class uBe extends N { + constructor(e) { + super(); + this.fileName = ""; + this.diffHistory = []; + this.diffHistoryTimestamps = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ComposerFileDiffHistory"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "file_name", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "diff_history", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 3, + name: "diff_history_timestamps", + kind: "scalar", + T: 1, + repeated: true + }]); + } + static fromBinary(e, t) { + return new uBe().fromBinary(e, t); + } + static fromJson(e, t) { + return new uBe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new uBe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(uBe, e, t); + } + }; + dR = class dBe extends N { + constructor(e) { + super(); + this.conversation = []; + this.fullConversationHeadersOnly = []; + this.documentationIdentifiers = []; + this.externalLinks = []; + this.diffsForCompressingFiles = []; + this.multiFileLinterErrors = []; + this.fileDiffHistories = []; + this.quotes = []; + this.additionalRankedContext = []; + this.isChat = false; + this.conversationId = ""; + this.repositoryInfoShouldQueryStaging = false; + this.repositoryInfoShouldQueryProd = false; + this.repoQueryAuthToken = ""; + this.isAgentic = false; + this.supportedTools = []; + this.enableYoloMode = false; + this.yoloPrompt = ""; + this.useUnifiedChatPrompt = false; + this.mcpTools = []; + this.isHeadless = false; + this.toolsRequiringAcceptedReturn = []; + this.projectLayouts = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamUnifiedChatRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "conversation", + kind: "message", + T: Al, + repeated: true + }, { + no: 30, + name: "full_conversation_headers_only", + kind: "message", + T: Vbs, + repeated: true + }, { + no: 2, + name: "allow_long_file_scan", + kind: "scalar", + T: 8, + opt: true + }, { + no: 3, + name: "explicit_context", + kind: "message", + T: Qg + }, { + no: 4, + name: "can_handle_filenames_after_language_ids", + kind: "scalar", + T: 8, + opt: true + }, { + no: 5, + name: "model_details", + kind: "message", + T: Qa + }, { + no: 6, + name: "linter_errors", + kind: "message", + T: xp + }, { + no: 7, + name: "documentation_identifiers", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 8, + name: "use_web", + kind: "scalar", + T: 9, + opt: true + }, { + no: 9, + name: "external_links", + kind: "message", + T: Oz, + repeated: true + }, { + no: 10, + name: "project_context", + kind: "message", + T: Al, + opt: true + }, { + no: 11, + name: "diffs_for_compressing_files", + kind: "message", + T: Rbs, + repeated: true + }, { + no: 12, + name: "compress_edits", + kind: "scalar", + T: 8, + opt: true + }, { + no: 13, + name: "should_cache", + kind: "scalar", + T: 8, + opt: true + }, { + no: 14, + name: "multi_file_linter_errors", + kind: "message", + T: xp, + repeated: true + }, { + no: 15, + name: "current_file", + kind: "message", + T: tu + }, { + no: 16, + name: "recent_edits", + kind: "message", + T: Nbs, + opt: true + }, { + no: 17, + name: "use_reference_composer_diff_prompt", + kind: "scalar", + T: 8, + opt: true + }, { + no: 18, + name: "file_diff_histories", + kind: "message", + T: sdt, + repeated: true + }, { + no: 19, + name: "use_new_compression_scheme", + kind: "scalar", + T: 8, + opt: true + }, { + no: 21, + name: "quotes", + kind: "message", + T: ybe, + repeated: true + }, { + no: 20, + name: "additional_ranked_context", + kind: "message", + T: tdt, + repeated: true + }, { + no: 22, + name: "is_chat", + kind: "scalar", + T: 8 + }, { + no: 23, + name: "conversation_id", + kind: "scalar", + T: 9 + }, { + no: 24, + name: "repository_info", + kind: "message", + T: pc + }, { + no: 25, + name: "repository_info_should_query_staging", + kind: "scalar", + T: 8 + }, { + no: 39, + name: "repository_info_should_query_prod", + kind: "scalar", + T: 8 + }, { + no: 52, + name: "query_only_repo_access", + kind: "message", + T: Uz + }, { + no: 44, + name: "repo_query_auth_token", + kind: "scalar", + T: 9 + }, { + no: 26, + name: "environment_info", + kind: "message", + T: hut + }, { + no: 27, + name: "is_agentic", + kind: "scalar", + T: 8 + }, { + no: 28, + name: "conversation_summary", + kind: "message", + T: eA, + opt: true + }, { + no: 29, + name: "supported_tools", + kind: "enum", + T: m.getEnumType(at), + repeated: true + }, { + no: 31, + name: "enable_yolo_mode", + kind: "scalar", + T: 8 + }, { + no: 32, + name: "yolo_prompt", + kind: "scalar", + T: 9 + }, { + no: 33, + name: "use_unified_chat_prompt", + kind: "scalar", + T: 8 + }, { + no: 34, + name: "mcp_tools", + kind: "message", + T: qut, + repeated: true + }, { + no: 35, + name: "use_full_inputs_context", + kind: "scalar", + T: 8, + opt: true + }, { + no: 36, + name: "is_resume", + kind: "scalar", + T: 8, + opt: true + }, { + no: 37, + name: "allow_model_fallbacks", + kind: "scalar", + T: 8, + opt: true + }, { + no: 38, + name: "number_of_times_shown_fallback_model_warning", + kind: "scalar", + T: 5, + opt: true + }, { + no: 40, + name: "context_bank_session_id", + kind: "scalar", + T: 9, + opt: true + }, { + no: 41, + name: "context_bank_version", + kind: "scalar", + T: 5, + opt: true + }, { + no: 43, + name: "context_bank_encryption_key", + kind: "scalar", + T: 12, + opt: true + }, { + no: 45, + name: "is_headless", + kind: "scalar", + T: 8 + }, { + no: 42, + name: "uses_codebase_results", + kind: "message", + T: Kqt, + opt: true + }, { + no: 46, + name: "unified_mode", + kind: "enum", + T: m.getEnumType(tA), + opt: true + }, { + no: 47, + name: "tools_requiring_accepted_return", + kind: "enum", + T: m.getEnumType(at), + repeated: true + }, { + no: 48, + name: "should_disable_tools", + kind: "scalar", + T: 8, + opt: true + }, { + no: 49, + name: "thinking_level", + kind: "enum", + T: m.getEnumType(Kz), + opt: true + }, { + no: 50, + name: "should_use_chat_prompt", + kind: "scalar", + T: 8, + opt: true + }, { + no: 55, + name: "background_composer_id", + kind: "scalar", + T: 9, + opt: true + }, { + no: 51, + name: "uses_rules", + kind: "scalar", + T: 8, + opt: true + }, { + no: 53, + name: "mode_uses_auto_apply", + kind: "scalar", + T: 8, + opt: true + }, { + no: 54, + name: "unified_mode_name", + kind: "scalar", + T: 9, + opt: true + }, { + no: 56, + name: "use_generate_rules_prompt", + kind: "scalar", + T: 8, + opt: true + }, { + no: 57, + name: "edit_tool_supports_search_and_replace", + kind: "scalar", + T: 8, + opt: true + }, { + no: 58, + name: "project_layouts", + kind: "message", + T: gHt, + repeated: true + }, { + no: 59, + name: "repository_name_if_unindexed", + kind: "scalar", + T: 9, + opt: true + }, { + no: 60, + name: "indexing_progress", + kind: "scalar", + T: 1, + opt: true + }, { + no: 61, + name: "full_file_cmd_k_options", + kind: "message", + T: $bs, + opt: true + }, { + no: 62, + name: "indexing_phase_if_unindexed", + kind: "scalar", + T: 9, + opt: true + }, { + no: 63, + name: "use_knowledge_base_prompt", + kind: "scalar", + T: 8, + opt: true + }, { + no: 64, + name: "indexing_num_files_if_unindexed", + kind: "scalar", + T: 5, + opt: true + }]); + } + static fromBinary(e, t) { + return new dBe().fromBinary(e, t); + } + static fromJson(e, t) { + return new dBe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new dBe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(dBe, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.CHAT = 1] = "CHAT"; + i[i.AGENT = 2] = "AGENT"; + i[i.EDIT = 3] = "EDIT"; + i[i.CUSTOM = 4] = "CUSTOM"; + })(tA ||= {}); + m.util.setEnumType(tA, "aiserver.v1.StreamUnifiedChatRequest.UnifiedMode", [{ + no: 0, + name: "UNIFIED_MODE_UNSPECIFIED" + }, { + no: 1, + name: "UNIFIED_MODE_CHAT" + }, { + no: 2, + name: "UNIFIED_MODE_AGENT" + }, { + no: 3, + name: "UNIFIED_MODE_EDIT" + }, { + no: 4, + name: "UNIFIED_MODE_CUSTOM" + }]); + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.MEDIUM = 1] = "MEDIUM"; + i[i.HIGH = 2] = "HIGH"; + })(Kz ||= {}); + m.util.setEnumType(Kz, "aiserver.v1.StreamUnifiedChatRequest.ThinkingLevel", [{ + no: 0, + name: "THINKING_LEVEL_UNSPECIFIED" + }, { + no: 1, + name: "THINKING_LEVEL_MEDIUM" + }, { + no: 2, + name: "THINKING_LEVEL_HIGH" + }]); + Rbs = class hBe extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.redRanges = []; + this.redRangesReversed = []; + this.startHash = ""; + this.endHash = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamUnifiedChatRequest.RedDiff"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "red_ranges", + kind: "message", + T: QI, + repeated: true + }, { + no: 3, + name: "red_ranges_reversed", + kind: "message", + T: QI, + repeated: true + }, { + no: 4, + name: "start_hash", + kind: "scalar", + T: 9 + }, { + no: 5, + name: "end_hash", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new hBe().fromBinary(e, t); + } + static fromJson(e, t) { + return new hBe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new hBe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(hBe, e, t); + } + }; + Nbs = class fBe extends N { + constructor(e) { + super(); + this.codeBlockInfo = []; + this.finalFileValues = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamUnifiedChatRequest.RecentEdits"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "code_block_info", + kind: "message", + T: Mbs, + repeated: true + }, { + no: 2, + name: "final_file_values", + kind: "message", + T: Abs, + repeated: true + }, { + no: 3, + name: "edits_belong_to_composer_generation_uuid", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new fBe().fromBinary(e, t); + } + static fromJson(e, t) { + return new fBe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new fBe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(fBe, e, t); + } + }; + Mbs = class gBe extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamUnifiedChatRequest.RecentEdits.CodeBlockInfo"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "content_before", + kind: "scalar", + T: 9, + opt: true + }, { + no: 3, + name: "content_after", + kind: "scalar", + T: 9, + opt: true + }, { + no: 4, + name: "generation_uuid", + kind: "scalar", + T: 9, + opt: true + }, { + no: 5, + name: "version", + kind: "scalar", + T: 5, + opt: true + }]); + } + static fromBinary(e, t) { + return new gBe().fromBinary(e, t); + } + static fromJson(e, t) { + return new gBe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new gBe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(gBe, e, t); + } + }; + Abs = class pBe extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.content = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamUnifiedChatRequest.RecentEdits.FileInfo"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "content", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new pBe().fromBinary(e, t); + } + static fromJson(e, t) { + return new pBe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new pBe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(pBe, e, t); + } + }; + Kqt = class mBe extends N { + constructor(e) { + super(); + this.results = []; + this.allFiles = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamUnifiedChatRequest.CodeSearchResult"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "results", + kind: "message", + T: xb, + repeated: true + }, { + no: 2, + name: "all_files", + kind: "message", + T: $x, + repeated: true + }]); + } + static fromBinary(e, t) { + return new mBe().fromBinary(e, t); + } + static fromJson(e, t) { + return new mBe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new mBe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(mBe, e, t); + } + }; + $bs = class bBe extends N { + constructor(e) { + super(); + this.filePath = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamUnifiedChatRequest.FullFileCmdKOptions"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "file_path", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new bBe().fromBinary(e, t); + } + static fromJson(e, t) { + return new bBe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new bBe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(bBe, e, t); + } + }; + Yqt = class vBe extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.content = ""; + this.score = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ContextPiece"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "content", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "score", + kind: "scalar", + T: 2 + }]); + } + static fromBinary(e, t) { + return new vBe().fromBinary(e, t); + } + static fromJson(e, t) { + return new vBe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new vBe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(vBe, e, t); + } + }; + Fbs = class yBe extends N { + constructor(e) { + super(); + this.pieces = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ContextPieceUpdate"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "pieces", + kind: "message", + T: Yqt, + repeated: true + }]); + } + static fromBinary(e, t) { + return new yBe().fromBinary(e, t); + } + static fromJson(e, t) { + return new yBe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new yBe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(yBe, e, t); + } + }; + Xqt = class wBe extends N { + constructor(e) { + super(); + this.text = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamUnifiedChatResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "text", + kind: "scalar", + T: 9 + }, { + no: 22, + name: "server_bubble_id", + kind: "scalar", + T: 9, + opt: true + }, { + no: 2, + name: "debugging_only_chat_prompt", + kind: "scalar", + T: 9, + opt: true + }, { + no: 3, + name: "debugging_only_token_count", + kind: "scalar", + T: 5, + opt: true + }, { + no: 4, + name: "document_citation", + kind: "message", + T: idt + }, { + no: 5, + name: "filled_prompt", + kind: "scalar", + T: 9, + opt: true + }, { + no: 6, + name: "is_big_file", + kind: "scalar", + T: 8, + opt: true + }, { + no: 7, + name: "intermediate_text", + kind: "scalar", + T: 9, + opt: true + }, { + no: 10, + name: "is_using_slow_request", + kind: "scalar", + T: 8, + opt: true + }, { + no: 8, + name: "chunk_identity", + kind: "message", + T: _bs, + opt: true + }, { + no: 9, + name: "docs_reference", + kind: "message", + T: rve, + opt: true + }, { + no: 11, + name: "web_citation", + kind: "message", + T: zqt, + opt: true + }, { + no: 12, + name: "status_updates", + kind: "message", + T: Gqt, + opt: true + }, { + no: 13, + name: "tool_call", + kind: "message", + T: YHt, + opt: true + }, { + no: 14, + name: "should_break_ai_message", + kind: "scalar", + T: 8, + opt: true + }, { + no: 15, + name: "partial_tool_call", + kind: "message", + T: _gs, + opt: true + }, { + no: 16, + name: "final_tool_result", + kind: "message", + T: Bbs, + opt: true + }, { + no: 17, + name: "symbol_link", + kind: "message", + T: ove, + opt: true + }, { + no: 19, + name: "file_link", + kind: "message", + T: ndt, + opt: true + }, { + no: 18, + name: "conversation_summary", + kind: "message", + T: eA, + opt: true + }, { + no: 20, + name: "service_status_update", + kind: "message", + T: Qqt, + opt: true + }, { + no: 21, + name: "viewable_git_context", + kind: "message", + T: Zqt, + opt: true + }, { + no: 23, + name: "context_piece_update", + kind: "message", + T: Fbs, + opt: true + }, { + no: 24, + name: "used_code", + kind: "message", + T: Obs, + opt: true + }, { + no: 25, + name: "thinking", + kind: "message", + T: adt, + opt: true + }, { + no: 26, + name: "stop_using_dsv3_agentic_model", + kind: "scalar", + T: 8, + opt: true + }, { + no: 27, + name: "usage_uuid", + kind: "scalar", + T: 9, + opt: true + }, { + no: 28, + name: "conversation_summary_starter", + kind: "message", + T: Ubs, + opt: true + }]); + } + static fromBinary(e, t) { + return new wBe().fromBinary(e, t); + } + static fromJson(e, t) { + return new wBe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new wBe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(wBe, e, t); + } + }; + Obs = class CBe extends N { + constructor(e) { + super(); + this.codeResults = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamUnifiedChatResponse.UsedCode"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "code_results", + kind: "message", + T: xb, + repeated: true + }]); + } + static fromBinary(e, t) { + return new CBe().fromBinary(e, t); + } + static fromJson(e, t) { + return new CBe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new CBe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(CBe, e, t); + } + }; + _bs = class SBe extends N { + constructor(e) { + super(); + this.fileName = ""; + this.startLine = 0; + this.endLine = 0; + this.text = ""; + this.chunkType = QT.UNSPECIFIED; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamUnifiedChatResponse.ChunkIdentity"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "file_name", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "start_line", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "end_line", + kind: "scalar", + T: 5 + }, { + no: 4, + name: "text", + kind: "scalar", + T: 9 + }, { + no: 5, + name: "chunk_type", + kind: "enum", + T: m.getEnumType(QT) + }]); + } + static fromBinary(e, t) { + return new SBe().fromBinary(e, t); + } + static fromJson(e, t) { + return new SBe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new SBe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(SBe, e, t); + } + }; + Bbs = class xBe extends N { + constructor(e) { + super(); + this.toolCallId = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamUnifiedChatResponse.FinalToolResult"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "tool_call_id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "result", + kind: "message", + T: Zl + }]); + } + static fromBinary(e, t) { + return new xBe().fromBinary(e, t); + } + static fromJson(e, t) { + return new xBe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new xBe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(xBe, e, t); + } + }; + Ubs = class kBe extends N { + constructor(e) { + super(); + this.message = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ConversationSummaryStarter"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "message", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new kBe().fromBinary(e, t); + } + static fromJson(e, t) { + return new kBe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new kBe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(kBe, e, t); + } + }; + Qqt = class EBe extends N { + constructor(e) { + super(); + this.message = ""; + this.codicon = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ServiceStatusUpdate"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "message", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "codicon", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "allow_command_links_potentially_unsafe_please_only_use_for_handwritten_trusted_markdown", + kind: "scalar", + T: 8, + opt: true + }, { + no: 4, + name: "action_to_run_on_status_update", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new EBe().fromBinary(e, t); + } + static fromJson(e, t) { + return new EBe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new EBe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(EBe, e, t); + } + }; + ove = class IBe extends N { + constructor(e) { + super(); + this.symbolName = ""; + this.symbolSearchString = ""; + this.relativeWorkspacePath = ""; + this.roughLineNumber = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SymbolLink"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "symbol_name", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "symbol_search_string", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "rough_line_number", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new IBe().fromBinary(e, t); + } + static fromJson(e, t) { + return new IBe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new IBe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(IBe, e, t); + } + }; + ndt = class DBe extends N { + constructor(e) { + super(); + this.displayName = ""; + this.relativeWorkspacePath = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.FileLink"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "display_name", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new DBe().fromBinary(e, t); + } + static fromJson(e, t) { + return new DBe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new DBe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(DBe, e, t); + } + }; + Wbs = class TBe extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.redRanges = []; + this.redRangesReversed = []; + this.startHash = ""; + this.endHash = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RedDiff"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "red_ranges", + kind: "message", + T: QI, + repeated: true + }, { + no: 3, + name: "red_ranges_reversed", + kind: "message", + T: QI, + repeated: true + }, { + no: 4, + name: "start_hash", + kind: "scalar", + T: 9 + }, { + no: 5, + name: "end_hash", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new TBe().fromBinary(e, t); + } + static fromJson(e, t) { + return new TBe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new TBe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(TBe, e, t); + } + }; + Vbs = class PBe extends N { + constructor(e) { + super(); + this.bubbleId = ""; + this.type = _n.UNSPECIFIED; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ConversationMessageHeader"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "bubble_id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "server_bubble_id", + kind: "scalar", + T: 9, + opt: true + }, { + no: 3, + name: "type", + kind: "enum", + T: m.getEnumType(_n) + }]); + } + static fromBinary(e, t) { + return new PBe().fromBinary(e, t); + } + static fromJson(e, t) { + return new PBe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new PBe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(PBe, e, t); + } + }; + rdt = class LBe extends N { + constructor(e) { + super(); + this.fileDetails = ""; + this.fileName = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.DiffFile"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "file_details", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "file_name", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new LBe().fromBinary(e, t); + } + static fromJson(e, t) { + return new LBe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new LBe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(LBe, e, t); + } + }; + Hbs = class RBe extends N { + constructor(e) { + super(); + this.description = ""; + this.message = ""; + this.files = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ViewableCommitProps"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "description", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "message", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "files", + kind: "message", + T: rdt, + repeated: true + }]); + } + static fromBinary(e, t) { + return new RBe().fromBinary(e, t); + } + static fromJson(e, t) { + return new RBe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new RBe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(RBe, e, t); + } + }; + qbs = class NBe extends N { + constructor(e) { + super(); + this.title = ""; + this.body = ""; + this.files = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ViewablePRProps"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "title", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "body", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "files", + kind: "message", + T: rdt, + repeated: true + }]); + } + static fromBinary(e, t) { + return new NBe().fromBinary(e, t); + } + static fromJson(e, t) { + return new NBe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new NBe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(NBe, e, t); + } + }; + jbs = class MBe extends N { + constructor(e) { + super(); + this.files = []; + this.diffPreface = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ViewableDiffProps"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "files", + kind: "message", + T: rdt, + repeated: true + }, { + no: 2, + name: "diff_preface", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new MBe().fromBinary(e, t); + } + static fromJson(e, t) { + return new MBe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new MBe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(MBe, e, t); + } + }; + Zqt = class ABe extends N { + constructor(e) { + super(); + this.diffData = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ViewableGitContext"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "commit_data", + kind: "message", + T: Hbs, + opt: true + }, { + no: 2, + name: "pull_request_data", + kind: "message", + T: qbs, + opt: true + }, { + no: 3, + name: "diff_data", + kind: "message", + T: jbs, + repeated: true + }]); + } + static fromBinary(e, t) { + return new ABe().fromBinary(e, t); + } + static fromJson(e, t) { + return new ABe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new ABe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(ABe, e, t); + } + }; + Al = class $Be extends N { + constructor(e) { + super(); + this.text = ""; + this.type = _n.UNSPECIFIED; + this.attachedCodeChunks = []; + this.codebaseContextChunks = []; + this.commits = []; + this.pullRequests = []; + this.gitDiffs = []; + this.assistantSuggestedDiffs = []; + this.interpreterResults = []; + this.images = []; + this.attachedFolders = []; + this.approximateLintErrors = []; + this.bubbleId = ""; + this.attachedFoldersNew = []; + this.lints = []; + this.userResponsesToSuggestedCodeBlocks = []; + this.relevantFiles = []; + this.toolResults = []; + this.notepads = []; + this.capabilities = []; + this.editTrailContexts = []; + this.suggestedCodeBlocks = []; + this.diffsForCompressingFiles = []; + this.multiFileLinterErrors = []; + this.diffHistories = []; + this.recentlyViewedFiles = []; + this.recentLocationsHistory = []; + this.isAgentic = false; + this.fileDiffTrajectories = []; + this.existedSubsequentTerminalCommand = false; + this.existedPreviousTerminalCommand = false; + this.docsReferences = []; + this.webReferences = []; + this.attachedFoldersListDirResults = []; + this.humanChanges = []; + this.attachedHumanChanges = false; + this.summarizedComposers = []; + this.cursorRules = []; + this.contextPieces = []; + this.allThinkingBlocks = []; + this.diffsSinceLastApply = []; + this.deletedFiles = []; + this.supportedTools = []; + this.consoleLogs = []; + this.knowledgeItems = []; + this.uiElementPicked = []; + this.documentationSelections = []; + this.externalLinks = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ConversationMessage"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "text", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "type", + kind: "enum", + T: m.getEnumType(_n) + }, { + no: 3, + name: "attached_code_chunks", + kind: "message", + T: hR, + repeated: true + }, { + no: 4, + name: "codebase_context_chunks", + kind: "message", + T: Xg, + repeated: true + }, { + no: 5, + name: "commits", + kind: "message", + T: iA, + repeated: true + }, { + no: 6, + name: "pull_requests", + kind: "message", + T: ldt, + repeated: true + }, { + no: 7, + name: "git_diffs", + kind: "message", + T: Sb, + repeated: true + }, { + no: 8, + name: "assistant_suggested_diffs", + kind: "message", + T: avs, + repeated: true + }, { + no: 9, + name: "interpreter_results", + kind: "message", + T: ovs, + repeated: true + }, { + no: 10, + name: "images", + kind: "message", + T: tD, + repeated: true + }, { + no: 11, + name: "attached_folders", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 12, + name: "approximate_lint_errors", + kind: "message", + T: Ybs, + repeated: true + }, { + no: 13, + name: "bubble_id", + kind: "scalar", + T: 9 + }, { + no: 32, + name: "server_bubble_id", + kind: "scalar", + T: 9, + opt: true + }, { + no: 14, + name: "attached_folders_new", + kind: "message", + T: nvs, + repeated: true + }, { + no: 15, + name: "lints", + kind: "message", + T: Xbs, + repeated: true + }, { + no: 16, + name: "user_responses_to_suggested_code_blocks", + kind: "message", + T: uvs, + repeated: true + }, { + no: 17, + name: "relevant_files", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 18, + name: "tool_results", + kind: "message", + T: odt, + repeated: true + }, { + no: 19, + name: "notepads", + kind: "message", + T: Jbs, + repeated: true + }, { + no: 20, + name: "is_capability_iteration", + kind: "scalar", + T: 8, + opt: true + }, { + no: 21, + name: "capabilities", + kind: "message", + T: Xms, + repeated: true + }, { + no: 22, + name: "edit_trail_contexts", + kind: "message", + T: Kbs, + repeated: true + }, { + no: 23, + name: "suggested_code_blocks", + kind: "message", + T: cvs, + repeated: true + }, { + no: 24, + name: "diffs_for_compressing_files", + kind: "message", + T: Wbs, + repeated: true + }, { + no: 25, + name: "multi_file_linter_errors", + kind: "message", + T: tfs, + repeated: true + }, { + no: 26, + name: "diff_histories", + kind: "message", + T: hvs, + repeated: true + }, { + no: 27, + name: "recently_viewed_files", + kind: "message", + T: hR, + repeated: true + }, { + no: 28, + name: "recent_locations_history", + kind: "message", + T: ejt, + repeated: true + }, { + no: 29, + name: "is_agentic", + kind: "scalar", + T: 8 + }, { + no: 30, + name: "file_diff_trajectories", + kind: "message", + T: sdt, + repeated: true + }, { + no: 31, + name: "conversation_summary", + kind: "message", + T: eA, + opt: true + }, { + no: 33, + name: "existed_subsequent_terminal_command", + kind: "scalar", + T: 8 + }, { + no: 34, + name: "existed_previous_terminal_command", + kind: "scalar", + T: 8 + }, { + no: 35, + name: "docs_references", + kind: "message", + T: rve, + repeated: true + }, { + no: 36, + name: "web_references", + kind: "message", + T: Jqt, + repeated: true + }, { + no: 37, + name: "git_context", + kind: "message", + T: Zqt, + opt: true + }, { + no: 38, + name: "attached_folders_list_dir_results", + kind: "message", + T: qz, + repeated: true + }, { + no: 39, + name: "cached_conversation_summary", + kind: "message", + T: eA, + opt: true + }, { + no: 40, + name: "human_changes", + kind: "message", + T: Zbs, + repeated: true + }, { + no: 41, + name: "attached_human_changes", + kind: "scalar", + T: 8 + }, { + no: 42, + name: "summarized_composers", + kind: "message", + T: ave, + repeated: true + }, { + no: 43, + name: "cursor_rules", + kind: "message", + T: XT, + repeated: true + }, { + no: 44, + name: "context_pieces", + kind: "message", + T: Yqt, + repeated: true + }, { + no: 45, + name: "thinking", + kind: "message", + T: adt, + opt: true + }, { + no: 46, + name: "all_thinking_blocks", + kind: "message", + T: adt, + repeated: true + }, { + no: 47, + name: "unified_mode", + kind: "enum", + T: m.getEnumType(tA), + opt: true + }, { + no: 48, + name: "diffs_since_last_apply", + kind: "message", + T: lve, + repeated: true + }, { + no: 49, + name: "deleted_files", + kind: "message", + T: evs, + repeated: true + }, { + no: 50, + name: "usage_uuid", + kind: "scalar", + T: 9, + opt: true + }, { + no: 51, + name: "supported_tools", + kind: "enum", + T: m.getEnumType(at), + repeated: true + }, { + no: 52, + name: "current_file_location_data", + kind: "message", + T: tjt, + opt: true + }, { + no: 53, + name: "edit_tool_supports_search_and_replace", + kind: "scalar", + T: 8, + opt: true + }, { + no: 54, + name: "last_terminal_cwd", + kind: "scalar", + T: 9, + opt: true + }, { + no: 55, + name: "user_explicitly_asked_to_generate_cursor_rules", + kind: "scalar", + T: 8, + opt: true + }, { + no: 56, + name: "console_logs", + kind: "message", + T: xHt, + repeated: true + }, { + no: 57, + name: "rich_text", + kind: "scalar", + T: 9, + opt: true + }, { + no: 58, + name: "knowledge_items", + kind: "message", + T: tvs, + repeated: true + }, { + no: 59, + name: "ui_element_picked", + kind: "message", + T: wut, + repeated: true + }, { + no: 60, + name: "user_explicitly_asked_to_add_to_knowledge_base", + kind: "scalar", + T: 8, + opt: true + }, { + no: 61, + name: "documentation_selections", + kind: "message", + T: ivs, + repeated: true + }, { + no: 62, + name: "external_links", + kind: "message", + T: Oz, + repeated: true + }, { + no: 63, + name: "use_web", + kind: "scalar", + T: 8, + opt: true + }]); + } + static fromBinary(e, t) { + return new $Be().fromBinary(e, t); + } + static fromJson(e, t) { + return new $Be().fromJson(e, t); + } + static fromJsonString(e, t) { + return new $Be().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals($Be, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.HUMAN = 1] = "HUMAN"; + i[i.AI = 2] = "AI"; + })(_n ||= {}); + m.util.setEnumType(_n, "aiserver.v1.ConversationMessage.MessageType", [{ + no: 0, + name: "MESSAGE_TYPE_UNSPECIFIED" + }, { + no: 1, + name: "MESSAGE_TYPE_HUMAN" + }, { + no: 2, + name: "MESSAGE_TYPE_AI" + }]); + hR = class FBe extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.startLineNumber = 0; + this.lines = []; + this.languageIdentifier = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ConversationMessage.CodeChunk"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "start_line_number", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "lines", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 4, + name: "summarization_strategy", + kind: "enum", + T: m.getEnumType(ZT), + opt: true + }, { + no: 5, + name: "language_identifier", + kind: "scalar", + T: 9 + }, { + no: 6, + name: "intent", + kind: "enum", + T: m.getEnumType(Xp), + opt: true + }, { + no: 7, + name: "is_final_version", + kind: "scalar", + T: 8, + opt: true + }, { + no: 8, + name: "is_first_version", + kind: "scalar", + T: 8, + opt: true + }, { + no: 9, + name: "contents_are_missing", + kind: "scalar", + T: 8, + opt: true + }, { + no: 10, + name: "is_only_included_from_folder", + kind: "scalar", + T: 8, + opt: true + }]); + } + static fromBinary(e, t) { + return new FBe().fromBinary(e, t); + } + static fromJson(e, t) { + return new FBe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new FBe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(FBe, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.COMPOSER_FILE = 1] = "COMPOSER_FILE"; + i[i.COMPRESSED_COMPOSER_FILE = 2] = "COMPRESSED_COMPOSER_FILE"; + i[i.RECENTLY_VIEWED_FILE = 3] = "RECENTLY_VIEWED_FILE"; + i[i.OUTLINE = 4] = "OUTLINE"; + i[i.MENTIONED_FILE = 5] = "MENTIONED_FILE"; + i[i.CODE_SELECTION = 6] = "CODE_SELECTION"; + })(Xp ||= {}); + m.util.setEnumType(Xp, "aiserver.v1.ConversationMessage.CodeChunk.Intent", [{ + no: 0, + name: "INTENT_UNSPECIFIED" + }, { + no: 1, + name: "INTENT_COMPOSER_FILE" + }, { + no: 2, + name: "INTENT_COMPRESSED_COMPOSER_FILE" + }, { + no: 3, + name: "INTENT_RECENTLY_VIEWED_FILE" + }, { + no: 4, + name: "INTENT_OUTLINE" + }, { + no: 5, + name: "INTENT_MENTIONED_FILE" + }, { + no: 6, + name: "INTENT_CODE_SELECTION" + }]); + (function (i) { + i[i.NONE_UNSPECIFIED = 0] = "NONE_UNSPECIFIED"; + i[i.SUMMARIZED = 1] = "SUMMARIZED"; + i[i.EMBEDDED = 2] = "EMBEDDED"; + })(ZT ||= {}); + m.util.setEnumType(ZT, "aiserver.v1.ConversationMessage.CodeChunk.SummarizationStrategy", [{ + no: 0, + name: "SUMMARIZATION_STRATEGY_NONE_UNSPECIFIED" + }, { + no: 1, + name: "SUMMARIZATION_STRATEGY_SUMMARIZED" + }, { + no: 2, + name: "SUMMARIZATION_STRATEGY_EMBEDDED" + }]); + odt = class OBe extends N { + constructor(e) { + super(); + this.toolCallId = ""; + this.toolName = ""; + this.toolIndex = 0; + this.args = ""; + this.rawArgs = ""; + this.attachedCodeChunks = []; + this.images = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ConversationMessage.ToolResult"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "tool_call_id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "tool_name", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "tool_index", + kind: "scalar", + T: 13 + }, { + no: 4, + name: "args", + kind: "scalar", + T: 9 + }, { + no: 5, + name: "raw_args", + kind: "scalar", + T: 9 + }, { + no: 6, + name: "attached_code_chunks", + kind: "message", + T: hR, + repeated: true + }, { + no: 7, + name: "content", + kind: "scalar", + T: 9, + opt: true + }, { + no: 8, + name: "result", + kind: "message", + T: Zl + }, { + no: 9, + name: "error", + kind: "message", + T: Wie, + opt: true + }, { + no: 10, + name: "images", + kind: "message", + T: tD, + repeated: true + }, { + no: 11, + name: "tool_call", + kind: "message", + T: Hz, + opt: true + }]); + } + static fromBinary(e, t) { + return new OBe().fromBinary(e, t); + } + static fromJson(e, t) { + return new OBe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new OBe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(OBe, e, t); + } + }; + Ctr = class _Be extends N { + constructor(e) { + super(); + this.ranges = []; + this.content = ""; + this.relativeWorkspacePath = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ConversationMessage.MultiRangeCodeChunk"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "ranges", + kind: "message", + T: zbs, + repeated: true + }, { + no: 2, + name: "content", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new _Be().fromBinary(e, t); + } + static fromJson(e, t) { + return new _Be().fromJson(e, t); + } + static fromJsonString(e, t) { + return new _Be().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(_Be, e, t); + } + }; + zbs = class BBe extends N { + constructor(e) { + super(); + this.priority = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ConversationMessage.MultiRangeCodeChunk.RangeWithPriority"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "range", + kind: "message", + T: QI + }, { + no: 2, + name: "priority", + kind: "scalar", + T: 1 + }]); + } + static fromBinary(e, t) { + return new BBe().fromBinary(e, t); + } + static fromJson(e, t) { + return new BBe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new BBe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(BBe, e, t); + } + }; + Jbs = class UBe extends N { + constructor(e) { + super(); + this.name = ""; + this.text = ""; + this.attachedCodeChunks = []; + this.attachedFolders = []; + this.commits = []; + this.pullRequests = []; + this.gitDiffs = []; + this.images = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ConversationMessage.NotepadContext"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "name", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "text", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "attached_code_chunks", + kind: "message", + T: hR, + repeated: true + }, { + no: 4, + name: "attached_folders", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 5, + name: "commits", + kind: "message", + T: iA, + repeated: true + }, { + no: 6, + name: "pull_requests", + kind: "message", + T: ldt, + repeated: true + }, { + no: 7, + name: "git_diffs", + kind: "message", + T: Sb, + repeated: true + }, { + no: 8, + name: "images", + kind: "message", + T: tD, + repeated: true + }]); + } + static fromBinary(e, t) { + return new UBe().fromBinary(e, t); + } + static fromJson(e, t) { + return new UBe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new UBe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(UBe, e, t); + } + }; + ave = class WBe extends N { + constructor(e) { + super(); + this.name = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ConversationMessage.ComposerContext"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "name", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "conversation_summary", + kind: "message", + T: eA + }]); + } + static fromBinary(e, t) { + return new WBe().fromBinary(e, t); + } + static fromJson(e, t) { + return new WBe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new WBe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(WBe, e, t); + } + }; + Gbs = class VBe extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.contextLines = ""; + this.text = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ConversationMessage.EditLocation"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "range", + kind: "message", + T: QI + }, { + no: 4, + name: "initial_range", + kind: "message", + T: QI + }, { + no: 5, + name: "context_lines", + kind: "scalar", + T: 9 + }, { + no: 6, + name: "text", + kind: "scalar", + T: 9 + }, { + no: 7, + name: "text_range", + kind: "message", + T: QI + }]); + } + static fromBinary(e, t) { + return new VBe().fromBinary(e, t); + } + static fromJson(e, t) { + return new VBe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new VBe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(VBe, e, t); + } + }; + Kbs = class HBe extends N { + constructor(e) { + super(); + this.uniqueId = ""; + this.editTrailSorted = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ConversationMessage.EditTrailContext"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "unique_id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "edit_trail_sorted", + kind: "message", + T: Gbs, + repeated: true + }]); + } + static fromBinary(e, t) { + return new HBe().fromBinary(e, t); + } + static fromJson(e, t) { + return new HBe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new HBe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(HBe, e, t); + } + }; + Ybs = class qBe extends N { + constructor(e) { + super(); + this.message = ""; + this.value = ""; + this.startLine = 0; + this.endLine = 0; + this.startColumn = 0; + this.endColumn = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ConversationMessage.ApproximateLintError"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "message", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "value", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "start_line", + kind: "scalar", + T: 5 + }, { + no: 4, + name: "end_line", + kind: "scalar", + T: 5 + }, { + no: 5, + name: "start_column", + kind: "scalar", + T: 5 + }, { + no: 6, + name: "end_column", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new qBe().fromBinary(e, t); + } + static fromJson(e, t) { + return new qBe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new qBe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(qBe, e, t); + } + }; + Xbs = class jBe extends N { + constructor(e) { + super(); + this.chatCodeblockModelValue = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ConversationMessage.Lints"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "lints", + kind: "message", + T: Gz + }, { + no: 2, + name: "chat_codeblock_model_value", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new jBe().fromBinary(e, t); + } + static fromJson(e, t) { + return new jBe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new jBe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(jBe, e, t); + } + }; + ejt = class zBe extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.lineNumber = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ConversationMessage.RecentLocation"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "line_number", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new zBe().fromBinary(e, t); + } + static fromJson(e, t) { + return new zBe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new zBe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(zBe, e, t); + } + }; + Qbs = class JBe extends N { + constructor(e) { + super(); + this.startLineNumber = 0; + this.endLineNumberExclusive = 0; + this.beforeContextLines = []; + this.removedLines = []; + this.addedLines = []; + this.afterContextLines = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ConversationMessage.RenderedDiff"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "start_line_number", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "end_line_number_exclusive", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "before_context_lines", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 4, + name: "removed_lines", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 5, + name: "added_lines", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 6, + name: "after_context_lines", + kind: "scalar", + T: 9, + repeated: true + }]); + } + static fromBinary(e, t) { + return new JBe().fromBinary(e, t); + } + static fromJson(e, t) { + return new JBe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new JBe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(JBe, e, t); + } + }; + Zbs = class GBe extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.renderedDiffs = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ConversationMessage.HumanChange"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "rendered_diffs", + kind: "message", + T: Qbs, + repeated: true + }]); + } + static fromBinary(e, t) { + return new GBe().fromBinary(e, t); + } + static fromJson(e, t) { + return new GBe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new GBe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(GBe, e, t); + } + }; + adt = class KBe extends N { + constructor(e) { + super(); + this.text = ""; + this.signature = ""; + this.redactedThinking = ""; + this.isLastThinkingChunk = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ConversationMessage.Thinking"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "text", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "signature", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "redacted_thinking", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "is_last_thinking_chunk", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new KBe().fromBinary(e, t); + } + static fromJson(e, t) { + return new KBe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new KBe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(KBe, e, t); + } + }; + lve = class YBe extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ConversationMessage.DiffSinceLastApply"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "diff", + kind: "message", + T: uR, + opt: true + }, { + no: 4, + name: "is_accepted", + kind: "scalar", + T: 8, + opt: true + }, { + no: 5, + name: "is_rejected", + kind: "scalar", + T: 8, + opt: true + }, { + no: 6, + name: "last_apply_chained_from_n_human_messages_ago", + kind: "scalar", + T: 5, + opt: true + }]); + } + static fromBinary(e, t) { + return new YBe().fromBinary(e, t); + } + static fromJson(e, t) { + return new YBe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new YBe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(YBe, e, t); + } + }; + evs = class XBe extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ConversationMessage.DeletedFile"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new XBe().fromBinary(e, t); + } + static fromJson(e, t) { + return new XBe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new XBe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(XBe, e, t); + } + }; + tvs = class QBe extends N { + constructor(e) { + super(); + this.title = ""; + this.knowledge = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ConversationMessage.KnowledgeItem"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "title", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "knowledge", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new QBe().fromBinary(e, t); + } + static fromJson(e, t) { + return new QBe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new QBe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(QBe, e, t); + } + }; + ivs = class ZBe extends N { + constructor(e) { + super(); + this.docId = ""; + this.name = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ConversationMessage.DocumentationSelection"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "doc_id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "name", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new ZBe().fromBinary(e, t); + } + static fromJson(e, t) { + return new ZBe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new ZBe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(ZBe, e, t); + } + }; + tjt = class e4e extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.lineNumber = 0; + this.text = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CurrentFileLocationData"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "line_number", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "text", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new e4e().fromBinary(e, t); + } + static fromJson(e, t) { + return new e4e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new e4e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(e4e, e, t); + } + }; + Str = class t4e extends N { + constructor(e) { + super(); + this.query = ""; + this.files = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SearchInfo"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "query", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "files", + kind: "message", + T: svs, + repeated: true + }]); + } + static fromBinary(e, t) { + return new t4e().fromBinary(e, t); + } + static fromJson(e, t) { + return new t4e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new t4e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(t4e, e, t); + } + }; + svs = class i4e extends N { + constructor(e) { + super(); + this.relativePath = ""; + this.content = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SearchFileInfo"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "content", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new i4e().fromBinary(e, t); + } + static fromJson(e, t) { + return new i4e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new i4e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(i4e, e, t); + } + }; + nvs = class s4e extends N { + constructor(e) { + super(); + this.relativePath = ""; + this.files = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.FolderInfo"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "files", + kind: "message", + T: rvs, + repeated: true + }]); + } + static fromBinary(e, t) { + return new s4e().fromBinary(e, t); + } + static fromJson(e, t) { + return new s4e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new s4e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(s4e, e, t); + } + }; + rvs = class n4e extends N { + constructor(e) { + super(); + this.relativePath = ""; + this.content = ""; + this.truncated = false; + this.score = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.FolderFileInfo"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "content", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "truncated", + kind: "scalar", + T: 8 + }, { + no: 4, + name: "score", + kind: "scalar", + T: 2 + }]); + } + static fromBinary(e, t) { + return new n4e().fromBinary(e, t); + } + static fromJson(e, t) { + return new n4e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new n4e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(n4e, e, t); + } + }; + ovs = class r4e extends N { + constructor(e) { + super(); + this.output = ""; + this.success = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.InterpreterResult"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "output", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "success", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new r4e().fromBinary(e, t); + } + static fromJson(e, t) { + return new r4e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new r4e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(r4e, e, t); + } + }; + avs = class o4e extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.chunks = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SimpleFileDiff"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "chunks", + kind: "message", + T: lvs, + repeated: true + }]); + } + static fromBinary(e, t) { + return new o4e().fromBinary(e, t); + } + static fromJson(e, t) { + return new o4e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new o4e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(o4e, e, t); + } + }; + lvs = class a4e extends N { + constructor(e) { + super(); + this.oldLines = []; + this.newLines = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SimpleFileDiff.Chunk"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "old_lines", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 2, + name: "new_lines", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 3, + name: "old_range", + kind: "message", + T: Kv + }, { + no: 4, + name: "new_range", + kind: "message", + T: Kv + }]); + } + static fromBinary(e, t) { + return new a4e().fromBinary(e, t); + } + static fromJson(e, t) { + return new a4e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new a4e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(a4e, e, t); + } + }; + iA = class l4e extends N { + constructor(e) { + super(); + this.sha = ""; + this.message = ""; + this.description = ""; + this.diff = []; + this.author = ""; + this.date = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.Commit"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "sha", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "message", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "description", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "diff", + kind: "message", + T: X4, + repeated: true + }, { + no: 5, + name: "author", + kind: "scalar", + T: 9 + }, { + no: 6, + name: "date", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new l4e().fromBinary(e, t); + } + static fromJson(e, t) { + return new l4e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new l4e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(l4e, e, t); + } + }; + ldt = class c4e extends N { + constructor(e) { + super(); + this.title = ""; + this.body = ""; + this.diff = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.PullRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "title", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "body", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "diff", + kind: "message", + T: X4, + repeated: true + }]); + } + static fromBinary(e, t) { + return new c4e().fromBinary(e, t); + } + static fromJson(e, t) { + return new c4e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new c4e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(c4e, e, t); + } + }; + cvs = class u4e extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SuggestedCodeBlock"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new u4e().fromBinary(e, t); + } + static fromJson(e, t) { + return new u4e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new u4e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(u4e, e, t); + } + }; + uvs = class d4e extends N { + constructor(e) { + super(); + this.userResponseType = cve.UNSPECIFIED; + this.filePath = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.UserResponseToSuggestedCodeBlock"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "user_response_type", + kind: "enum", + T: m.getEnumType(cve) + }, { + no: 2, + name: "file_path", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "user_modifications_to_suggested_code_blocks", + kind: "message", + T: X4, + opt: true + }]); + } + static fromBinary(e, t) { + return new d4e().fromBinary(e, t); + } + static fromJson(e, t) { + return new d4e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new d4e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(d4e, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.ACCEPT = 1] = "ACCEPT"; + i[i.REJECT = 2] = "REJECT"; + i[i.MODIFY = 3] = "MODIFY"; + })(cve ||= {}); + m.util.setEnumType(cve, "aiserver.v1.UserResponseToSuggestedCodeBlock.UserResponseType", [{ + no: 0, + name: "USER_RESPONSE_TYPE_UNSPECIFIED" + }, { + no: 1, + name: "USER_RESPONSE_TYPE_ACCEPT" + }, { + no: 2, + name: "USER_RESPONSE_TYPE_REJECT" + }, { + no: 3, + name: "USER_RESPONSE_TYPE_MODIFY" + }]); + dvs = class h4e extends N { + constructor(e) { + super(); + this.fileName = ""; + this.fileContent = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ContextRerankingCandidateFile"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "file_name", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "file_content", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new h4e().fromBinary(e, t); + } + static fromJson(e, t) { + return new h4e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new h4e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(h4e, e, t); + } + }; + zie = class f4e extends N { + constructor(e) { + super(); + this.chunks = []; + this.editor = uve.UNSPECIFIED; + this.hitTimeout = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ComposerFileDiff"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "chunks", + kind: "message", + T: dve, + repeated: true + }, { + no: 2, + name: "editor", + kind: "enum", + T: m.getEnumType(uve) + }, { + no: 3, + name: "hit_timeout", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new f4e().fromBinary(e, t); + } + static fromJson(e, t) { + return new f4e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new f4e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(f4e, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.AI = 1] = "AI"; + i[i.HUMAN = 2] = "HUMAN"; + })(uve ||= {}); + m.util.setEnumType(uve, "aiserver.v1.ComposerFileDiff.Editor", [{ + no: 0, + name: "EDITOR_UNSPECIFIED" + }, { + no: 1, + name: "EDITOR_AI" + }, { + no: 2, + name: "EDITOR_HUMAN" + }]); + dve = class g4e extends N { + constructor(e) { + super(); + this.diffString = ""; + this.oldStart = 0; + this.newStart = 0; + this.oldLines = 0; + this.newLines = 0; + this.linesRemoved = 0; + this.linesAdded = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ComposerFileDiff.ChunkDiff"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "diff_string", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "old_start", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "new_start", + kind: "scalar", + T: 5 + }, { + no: 4, + name: "old_lines", + kind: "scalar", + T: 5 + }, { + no: 5, + name: "new_lines", + kind: "scalar", + T: 5 + }, { + no: 6, + name: "lines_removed", + kind: "scalar", + T: 5 + }, { + no: 7, + name: "lines_added", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new g4e().fromBinary(e, t); + } + static fromJson(e, t) { + return new g4e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new g4e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(g4e, e, t); + } + }; + hvs = class p4e extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.diffs = []; + this.timestamp = 0; + this.uniqueId = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.DiffHistoryData"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "diffs", + kind: "message", + T: zie, + repeated: true + }, { + no: 3, + name: "timestamp", + kind: "scalar", + T: 1 + }, { + no: 4, + name: "unique_id", + kind: "scalar", + T: 9 + }, { + no: 5, + name: "start_to_end_diff", + kind: "message", + T: zie + }]); + } + static fromBinary(e, t) { + return new p4e().fromBinary(e, t); + } + static fromJson(e, t) { + return new p4e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new p4e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(p4e, e, t); + } + }; + ijt = class m4e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.WarmStreamUnifiedChatWithToolsResponse"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new m4e().fromBinary(e, t); + } + static fromJson(e, t) { + return new m4e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new m4e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(m4e, e, t); + } + }; + fvs = class b4e extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.startLineNumber = 0; + this.endLineNumberInclusive = 0; + this.intent = Jie.UNSPECIFIED; + this.inclusionType = eP.UNSPECIFIED; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CodeChunkContextInclusionInfoV2"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "start_line_number", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "end_line_number_inclusive", + kind: "scalar", + T: 5 + }, { + no: 4, + name: "intent", + kind: "enum", + T: m.getEnumType(Jie) + }, { + no: 10, + name: "inclusion_type", + kind: "enum", + T: m.getEnumType(eP) + }, { + no: 6, + name: "tooltip_text", + kind: "scalar", + T: 9, + opt: true + }, { + no: 9, + name: "pill_is_dashed", + kind: "scalar", + T: 8, + opt: true + }, { + no: 8, + name: "pill_sub_codicon_name", + kind: "scalar", + T: 9, + opt: true + }, { + no: 5, + name: "detail_text", + kind: "scalar", + T: 9, + opt: true + }, { + no: 7, + name: "codicon_name", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new b4e().fromBinary(e, t); + } + static fromJson(e, t) { + return new b4e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new b4e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(b4e, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.FILE = 1] = "FILE"; + i[i.SELECTION = 2] = "SELECTION"; + })(Jie ||= {}); + m.util.setEnumType(Jie, "aiserver.v1.CodeChunkContextInclusionInfoV2.Intent", [{ + no: 0, + name: "INTENT_UNSPECIFIED" + }, { + no: 1, + name: "INTENT_FILE" + }, { + no: 2, + name: "INTENT_SELECTION" + }]); + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.FULL = 1] = "FULL"; + i[i.OUTLINE = 2] = "OUTLINE"; + i[i.FILENAME = 3] = "FILENAME"; + })(eP ||= {}); + m.util.setEnumType(eP, "aiserver.v1.CodeChunkContextInclusionInfoV2.InclusionType", [{ + no: 0, + name: "INCLUSION_TYPE_UNSPECIFIED" + }, { + no: 1, + name: "INCLUSION_TYPE_FULL" + }, { + no: 2, + name: "INCLUSION_TYPE_OUTLINE" + }, { + no: 3, + name: "INCLUSION_TYPE_FILENAME" + }]); + gvs = class v4e extends N { + constructor(e) { + super(); + this.codeChunks = []; + this.userMessageTokenLimit = 0; + this.codeChunksV2 = []; + this.folderExclusionTooltip = ""; + this.barFraction = 0; + this.didBarOverflow = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetPromptDryRunResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "code_chunks", + kind: "message", + T: pvs, + repeated: true + }, { + no: 3, + name: "user_message_token_limit", + kind: "scalar", + T: 5 + }, { + no: 4, + name: "user_message_token_count", + kind: "message", + T: sjt + }, { + no: 5, + name: "full_conversation_token_count", + kind: "message", + T: sjt + }, { + no: 6, + name: "code_chunks_v2", + kind: "message", + T: fvs, + repeated: true + }, { + no: 2, + name: "folder_exclusion_tooltip", + kind: "scalar", + T: 9 + }, { + no: 7, + name: "bar_fraction", + kind: "scalar", + T: 2 + }, { + no: 8, + name: "did_bar_overflow", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new v4e().fromBinary(e, t); + } + static fromJson(e, t) { + return new v4e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new v4e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(v4e, e, t); + } + }; + sjt = class y4e extends N { + constructor(e) { + super(); + this.isOverTokenLimit = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetPromptDryRunResponse.TokenCount"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "is_over_token_limit", + kind: "scalar", + T: 8 + }, { + no: 2, + name: "num_tokens", + kind: "scalar", + T: 5, + opt: true + }]); + } + static fromBinary(e, t) { + return new y4e().fromBinary(e, t); + } + static fromJson(e, t) { + return new y4e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new y4e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(y4e, e, t); + } + }; + pvs = class w4e extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.startLineNumber = 0; + this.endLineNumberInclusive = 0; + this.inclusionType = hve.UNSPECIFIED; + this.fullFileTokenCount = 0; + this.promptTokenCount = 0; + this.intent = fve.UNSPECIFIED; + this.chunkIsFromLastUserMessage = false; + this.isCompressed = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CodeChunkContextInclusionInfo"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "start_line_number", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "end_line_number_inclusive", + kind: "scalar", + T: 5 + }, { + no: 4, + name: "inclusion_type", + kind: "enum", + T: m.getEnumType(hve) + }, { + no: 5, + name: "full_file_token_count", + kind: "scalar", + T: 5 + }, { + no: 6, + name: "prompt_token_count", + kind: "scalar", + T: 5 + }, { + no: 11, + name: "full_file_tokens_count", + kind: "message", + T: mvs + }, { + no: 7, + name: "exclusion_tooltip", + kind: "scalar", + T: 9, + opt: true + }, { + no: 8, + name: "intent", + kind: "enum", + T: m.getEnumType(fve) + }, { + no: 9, + name: "chunk_is_from_last_user_message", + kind: "scalar", + T: 8 + }, { + no: 10, + name: "is_compressed", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new w4e().fromBinary(e, t); + } + static fromJson(e, t) { + return new w4e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new w4e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(w4e, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.FULL = 1] = "FULL"; + i[i.OUTLINE = 2] = "OUTLINE"; + i[i.FILENAME = 3] = "FILENAME"; + })(hve ||= {}); + m.util.setEnumType(hve, "aiserver.v1.CodeChunkContextInclusionInfo.InclusionType", [{ + no: 0, + name: "INCLUSION_TYPE_UNSPECIFIED" + }, { + no: 1, + name: "INCLUSION_TYPE_FULL" + }, { + no: 2, + name: "INCLUSION_TYPE_OUTLINE" + }, { + no: 3, + name: "INCLUSION_TYPE_FILENAME" + }]); + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.FILE = 1] = "FILE"; + i[i.SELECTION = 2] = "SELECTION"; + })(fve ||= {}); + m.util.setEnumType(fve, "aiserver.v1.CodeChunkContextInclusionInfo.Intent", [{ + no: 0, + name: "INTENT_UNSPECIFIED" + }, { + no: 1, + name: "INTENT_FILE" + }, { + no: 2, + name: "INTENT_SELECTION" + }]); + mvs = class C4e extends N { + constructor(e) { + super(); + this.isTooLargeToCount = false; + this.numTokens = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CodeChunkContextInclusionInfo.TokenCount"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "is_too_large_to_count", + kind: "scalar", + T: 8 + }, { + no: 2, + name: "num_tokens", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new C4e().fromBinary(e, t); + } + static fromJson(e, t) { + return new C4e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new C4e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(C4e, e, t); + } + }; + } +}); +var bvs; +var vvs; +var yvs; +var cdt; +var njt = ue({ + "out-build/proto/aiserver/v1/lsp_subgraph_pb.js"() { + "use strict"; + + Hr(); + bvs = class S4e extends N { + constructor(e) { + super(); + this.line = 0; + this.character = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.LspSubgraphPosition"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "line", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "character", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new S4e().fromBinary(e, t); + } + static fromJson(e, t) { + return new S4e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new S4e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(S4e, e, t); + } + }; + vvs = class x4e extends N { + constructor(e) { + super(); + this.startLine = 0; + this.startCharacter = 0; + this.endLine = 0; + this.endCharacter = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.LspSubgraphRange"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "start_line", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "start_character", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "end_line", + kind: "scalar", + T: 5 + }, { + no: 4, + name: "end_character", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new x4e().fromBinary(e, t); + } + static fromJson(e, t) { + return new x4e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new x4e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(x4e, e, t); + } + }; + yvs = class k4e extends N { + constructor(e) { + super(); + this.type = ""; + this.content = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.LspSubgraphContextItem"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "uri", + kind: "scalar", + T: 9, + opt: true + }, { + no: 2, + name: "type", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "content", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "range", + kind: "message", + T: vvs, + opt: true + }]); + } + static fromBinary(e, t) { + return new k4e().fromBinary(e, t); + } + static fromJson(e, t) { + return new k4e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new k4e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(k4e, e, t); + } + }; + cdt = class E4e extends N { + constructor(e) { + super(); + this.uri = ""; + this.symbolName = ""; + this.positions = []; + this.contextItems = []; + this.score = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.LspSubgraphFullContext"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "uri", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "symbol_name", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "positions", + kind: "message", + T: bvs, + repeated: true + }, { + no: 4, + name: "context_items", + kind: "message", + T: yvs, + repeated: true + }, { + no: 5, + name: "score", + kind: "scalar", + T: 2 + }]); + } + static fromBinary(e, t) { + return new E4e().fromBinary(e, t); + } + static fromJson(e, t) { + return new E4e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new E4e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(E4e, e, t); + } + }; + } +}); +var gve; +var pve; +var rjt; +var ojt; +var Yz; +var wvs; +var ajt; +var ljt; +var Cvs; +var Svs; +var xvs; +var kvs; +var Evs; +var Ivs; +var Dvs; +var Tvs; +var Pvs; +var Lvs; +var Rvs; +var Nvs; +var udt = ue({ + "out-build/proto/aiserver/v1/filesyncserver_pb.js"() { + "use strict"; + + Hr(); + Wo(); + (function (i) { + i[i.FS_UPLOAD_ERROR_TYPE_UNSPECIFIED = 0] = "FS_UPLOAD_ERROR_TYPE_UNSPECIFIED"; + i[i.FS_UPLOAD_ERROR_TYPE_NON_EXISTANT = 1] = "FS_UPLOAD_ERROR_TYPE_NON_EXISTANT"; + i[i.FS_UPLOAD_ERROR_TYPE_HASH_MISMATCH = 2] = "FS_UPLOAD_ERROR_TYPE_HASH_MISMATCH"; + })(gve ||= {}); + m.util.setEnumType(gve, "aiserver.v1.FSUploadErrorType", [{ + no: 0, + name: "FS_UPLOAD_ERROR_TYPE_UNSPECIFIED" + }, { + no: 1, + name: "FS_UPLOAD_ERROR_TYPE_NON_EXISTANT" + }, { + no: 2, + name: "FS_UPLOAD_ERROR_TYPE_HASH_MISMATCH" + }]); + (function (i) { + i[i.FS_SYNC_ERROR_TYPE_UNSPECIFIED = 0] = "FS_SYNC_ERROR_TYPE_UNSPECIFIED"; + i[i.FS_SYNC_ERROR_TYPE_NON_EXISTANT = 1] = "FS_SYNC_ERROR_TYPE_NON_EXISTANT"; + i[i.FS_SYNC_ERROR_TYPE_HASH_MISMATCH = 2] = "FS_SYNC_ERROR_TYPE_HASH_MISMATCH"; + })(pve ||= {}); + m.util.setEnumType(pve, "aiserver.v1.FSSyncErrorType", [{ + no: 0, + name: "FS_SYNC_ERROR_TYPE_UNSPECIFIED" + }, { + no: 1, + name: "FS_SYNC_ERROR_TYPE_NON_EXISTANT" + }, { + no: 2, + name: "FS_SYNC_ERROR_TYPE_HASH_MISMATCH" + }]); + rjt = class I4e extends N { + constructor(e) { + super(); + this.uuid = ""; + this.relativeWorkspacePath = ""; + this.contents = ""; + this.modelVersion = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.FSUploadFileRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "uuid", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "contents", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "model_version", + kind: "scalar", + T: 5 + }, { + no: 5, + name: "sha256_hash", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new I4e().fromBinary(e, t); + } + static fromJson(e, t) { + return new I4e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new I4e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(I4e, e, t); + } + }; + ojt = class D4e extends N { + constructor(e) { + super(); + this.error = gve.FS_UPLOAD_ERROR_TYPE_UNSPECIFIED; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.FSUploadFileResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "error", + kind: "enum", + T: m.getEnumType(gve) + }]); + } + static fromBinary(e, t) { + return new D4e().fromBinary(e, t); + } + static fromJson(e, t) { + return new D4e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new D4e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(D4e, e, t); + } + }; + Yz = class T4e extends N { + constructor(e) { + super(); + this.modelVersion = 0; + this.relativeWorkspacePath = ""; + this.updates = []; + this.expectedFileLength = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.FilesyncUpdateWithModelVersion"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "model_version", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "updates", + kind: "message", + T: wvs, + repeated: true + }, { + no: 4, + name: "expected_file_length", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new T4e().fromBinary(e, t); + } + static fromJson(e, t) { + return new T4e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new T4e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(T4e, e, t); + } + }; + wvs = class P4e extends N { + constructor(e) { + super(); + this.startPosition = 0; + this.endPosition = 0; + this.changeLength = 0; + this.replacedString = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SingleUpdateRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "start_position", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "end_position", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "change_length", + kind: "scalar", + T: 5 + }, { + no: 4, + name: "replaced_string", + kind: "scalar", + T: 9 + }, { + no: 5, + name: "range", + kind: "message", + T: Of + }]); + } + static fromBinary(e, t) { + return new P4e().fromBinary(e, t); + } + static fromJson(e, t) { + return new P4e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new P4e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(P4e, e, t); + } + }; + ajt = class L4e extends N { + constructor(e) { + super(); + this.uuid = ""; + this.relativeWorkspacePath = ""; + this.modelVersion = 0; + this.filesyncUpdates = []; + this.sha256Hash = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.FSSyncFileRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "uuid", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "model_version", + kind: "scalar", + T: 5 + }, { + no: 4, + name: "filesync_updates", + kind: "message", + T: Yz, + repeated: true + }, { + no: 5, + name: "sha256_hash", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new L4e().fromBinary(e, t); + } + static fromJson(e, t) { + return new L4e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new L4e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(L4e, e, t); + } + }; + ljt = class R4e extends N { + constructor(e) { + super(); + this.error = pve.FS_SYNC_ERROR_TYPE_UNSPECIFIED; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.FSSyncFileResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "error", + kind: "enum", + T: m.getEnumType(pve) + }]); + } + static fromBinary(e, t) { + return new R4e().fromBinary(e, t); + } + static fromJson(e, t) { + return new R4e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new R4e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(R4e, e, t); + } + }; + Cvs = class N4e extends N { + constructor(e) { + super(); + this.uuid = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.FSIsEnabledForUserRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "uuid", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new N4e().fromBinary(e, t); + } + static fromJson(e, t) { + return new N4e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new N4e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(N4e, e, t); + } + }; + Svs = class M4e extends N { + constructor(e) { + super(); + this.enabled = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.FSIsEnabledForUserResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "enabled", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new M4e().fromBinary(e, t); + } + static fromJson(e, t) { + return new M4e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new M4e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(M4e, e, t); + } + }; + xvs = class A4e extends N { + constructor(e) { + super(); + this.uuid = ""; + this.authId = ""; + this.relativeWorkspacePath = ""; + this.modelVersion = 0; + this.filesyncUpdates = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.FSGetFileContentsRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "uuid", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "auth_id", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "model_version", + kind: "scalar", + T: 5 + }, { + no: 5, + name: "filesync_updates", + kind: "message", + T: Yz, + repeated: true + }, { + no: 6, + name: "sha256_hash", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new A4e().fromBinary(e, t); + } + static fromJson(e, t) { + return new A4e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new A4e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(A4e, e, t); + } + }; + kvs = class $4e extends N { + constructor(e) { + super(); + this.contents = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.FSGetFileContentsResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "contents", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "sha256_hash", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new $4e().fromBinary(e, t); + } + static fromJson(e, t) { + return new $4e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new $4e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals($4e, e, t); + } + }; + Evs = class F4e extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.required = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.FileRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "requested_version", + kind: "scalar", + T: 5, + opt: true + }, { + no: 3, + name: "sha256_hash", + kind: "scalar", + T: 9, + opt: true + }, { + no: 4, + name: "required", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new F4e().fromBinary(e, t); + } + static fromJson(e, t) { + return new F4e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new F4e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(F4e, e, t); + } + }; + Ivs = class O4e extends N { + constructor(e) { + super(); + this.authId = ""; + this.filesyncUpdates = []; + this.fileRequests = []; + this.getAllRecentFiles = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.FSGetMultiFileContentsRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "auth_id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "filesync_updates", + kind: "message", + T: Yz, + repeated: true + }, { + no: 3, + name: "file_requests", + kind: "message", + T: Evs, + repeated: true + }, { + no: 4, + name: "get_all_recent_files", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new O4e().fromBinary(e, t); + } + static fromJson(e, t) { + return new O4e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new O4e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(O4e, e, t); + } + }; + Dvs = class _4e extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.contents = ""; + this.modelVersion = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.FileRetrieved"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "contents", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "model_version", + kind: "scalar", + T: 5 + }, { + no: 4, + name: "last_modified", + kind: "message", + T: $z + }]); + } + static fromBinary(e, t) { + return new _4e().fromBinary(e, t); + } + static fromJson(e, t) { + return new _4e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new _4e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(_4e, e, t); + } + }; + Tvs = class B4e extends N { + constructor(e) { + super(); + this.files = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.FSGetMultiFileContentsResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "files", + kind: "message", + T: Dvs, + repeated: true + }]); + } + static fromBinary(e, t) { + return new B4e().fromBinary(e, t); + } + static fromJson(e, t) { + return new B4e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new B4e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(B4e, e, t); + } + }; + Pvs = class U4e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.FSInternalHealthCheckRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "from_server", + kind: "scalar", + T: 8, + opt: true + }]); + } + static fromBinary(e, t) { + return new U4e().fromBinary(e, t); + } + static fromJson(e, t) { + return new U4e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new U4e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(U4e, e, t); + } + }; + Lvs = class W4e extends N { + constructor(e) { + super(); + this.success = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.FSInternalHealthCheckResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "success", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new W4e().fromBinary(e, t); + } + static fromJson(e, t) { + return new W4e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new W4e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(W4e, e, t); + } + }; + Rvs = class V4e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.FSConfigRequest"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new V4e().fromBinary(e, t); + } + static fromJson(e, t) { + return new V4e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new V4e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(V4e, e, t); + } + }; + Nvs = class H4e extends N { + constructor(e) { + super(); + this.checkFilesyncHashPercent = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.FSConfigResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "check_filesync_hash_percent", + kind: "scalar", + T: 2 + }, { + no: 2, + name: "rate_limiter_breaker_reset_time_ms", + kind: "scalar", + T: 5, + opt: true + }, { + no: 3, + name: "rate_limiter_rps", + kind: "scalar", + T: 5, + opt: true + }, { + no: 4, + name: "rate_limiter_burst_capacity", + kind: "scalar", + T: 5, + opt: true + }, { + no: 5, + name: "max_recent_updates_stored", + kind: "scalar", + T: 5, + opt: true + }, { + no: 6, + name: "max_model_version_cache_size", + kind: "scalar", + T: 5, + opt: true + }, { + no: 7, + name: "max_file_size_to_sync_bytes", + kind: "scalar", + T: 5, + opt: true + }, { + no: 8, + name: "sync_retry_max_attempts", + kind: "scalar", + T: 5, + opt: true + }, { + no: 9, + name: "sync_retry_initial_delay_ms", + kind: "scalar", + T: 5, + opt: true + }, { + no: 10, + name: "sync_retry_time_multiplier", + kind: "scalar", + T: 5, + opt: true + }, { + no: 11, + name: "file_sync_status_max_cache_size", + kind: "scalar", + T: 5, + opt: true + }, { + no: 12, + name: "successive_syncs_required_for_reliance", + kind: "scalar", + T: 5, + opt: true + }, { + no: 13, + name: "extra_successful_syncs_needed_after_errors", + kind: "scalar", + T: 5, + opt: true + }, { + no: 14, + name: "big_change_stripping_threshold_bytes", + kind: "scalar", + T: 5, + opt: true + }, { + no: 15, + name: "last_n_updates_to_send", + kind: "scalar", + T: 5, + opt: true + }, { + no: 16, + name: "file_sync_status_ttl_ms", + kind: "scalar", + T: 5, + opt: true + }, { + no: 17, + name: "sync_debounce_ms", + kind: "scalar", + T: 5, + opt: true + }, { + no: 18, + name: "sync_update_threshold", + kind: "scalar", + T: 5, + opt: true + }]); + } + static fromBinary(e, t) { + return new H4e().fromBinary(e, t); + } + static fromJson(e, t) { + return new H4e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new H4e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(H4e, e, t); + } + }; + } +}); +var H7; +var lE; +var cjt; +var Mvs; +var Avs; +var $vs; +var Fvs; +var ddt; +var Gie; +var Ovs; +var _vs; +var Bvs; +var hdt; +var Uvs; +var n5; +var Wvs; +var Vvs; +var Hvs; +var qvs; +var fdt; +var ujt; +var jvs; +var zvs; +var gdt; +var Jvs; +var djt; +var Gvs; +var Kvs; +var Yvs; +var Xvs; +var Qvs; +var Fx; +var Zvs; +var xtr; +var pdt; +var eys; +var mve; +var tys; +var hjt; +var iys; +var iD; +var Kie; +var sys; +var Xz; +var bve; +var nys; +var fjt; +var rys; +var oys; +var ays; +var lys; +var cys; +var uys; +var mdt; +var sA; +var dys; +var hys; +var fys; +var gjt; +var Yv; +var gys; +var pys; +var Qz; +var mys; +var bys; +var vys; +var yys; +var pjt; +var vve; +var wys; +var Cys; +var Sys; +var xys; +var kys; +var Eys; +var Iys; +var Dys; +var Tys; +var Pys; +var Lys; +var Rys; +var Nys; +var Mys; +var Ays; +var $ys; +var Fys; +var Oys; +var _ys; +var Bys; +var Uys; +var Wys; +var Vys; +var Hys; +var q7; +var qys; +var m1; +var jys; +var zys; +var Jys; +var Gys; +var Kys; +var Yys; +var mjt; +var Xys; +var Qys; +var Zys; +var ews; +var tws; +var iws; +var r5; +var Ox; +var sws; +var nws; +var rws; +var ows; +var aws; +var lws; +var cws; +var uws; +var dws; +var hws; +var fws; +var bdt; +var gws; +var pws; +var bjt; +var o5; +var mws; +var vjt; +var yjt; +var bws; +var vdt; +var vws; +var yws; +var wws; +var Cws; +var Sws; +var xws; +var wjt; +var ktr; +var Etr; +var kws; +var yve; +var Ews; +var Iws; +var cE; +var uS = ue({ + "out-build/proto/aiserver/v1/cpp_pb.js"() { + "use strict"; + + Hr(); + Wo(); + njt(); + udt(); + jie(); + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.ACCEPT = 1] = "ACCEPT"; + i[i.REJECT = 2] = "REJECT"; + i[i.PARTIAL_ACCEPT = 3] = "PARTIAL_ACCEPT"; + })(H7 ||= {}); + m.util.setEnumType(H7, "aiserver.v1.CppFate", [{ + no: 0, + name: "CPP_FATE_UNSPECIFIED" + }, { + no: 1, + name: "CPP_FATE_ACCEPT" + }, { + no: 2, + name: "CPP_FATE_REJECT" + }, { + no: 3, + name: "CPP_FATE_PARTIAL_ACCEPT" + }]); + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.LINE_CHANGE = 1] = "LINE_CHANGE"; + i[i.TYPING = 2] = "TYPING"; + i[i.OPTION_HOLD = 3] = "OPTION_HOLD"; + i[i.LINTER_ERRORS = 4] = "LINTER_ERRORS"; + i[i.PARAMETER_HINTS = 5] = "PARAMETER_HINTS"; + i[i.CURSOR_PREDICTION = 6] = "CURSOR_PREDICTION"; + i[i.MANUAL_TRIGGER = 7] = "MANUAL_TRIGGER"; + i[i.EDITOR_CHANGE = 8] = "EDITOR_CHANGE"; + i[i.LSP_SUGGESTIONS = 9] = "LSP_SUGGESTIONS"; + })(lE ||= {}); + m.util.setEnumType(lE, "aiserver.v1.CppSource", [{ + no: 0, + name: "CPP_SOURCE_UNSPECIFIED" + }, { + no: 1, + name: "CPP_SOURCE_LINE_CHANGE" + }, { + no: 2, + name: "CPP_SOURCE_TYPING" + }, { + no: 3, + name: "CPP_SOURCE_OPTION_HOLD" + }, { + no: 4, + name: "CPP_SOURCE_LINTER_ERRORS" + }, { + no: 5, + name: "CPP_SOURCE_PARAMETER_HINTS" + }, { + no: 6, + name: "CPP_SOURCE_CURSOR_PREDICTION" + }, { + no: 7, + name: "CPP_SOURCE_MANUAL_TRIGGER" + }, { + no: 8, + name: "CPP_SOURCE_EDITOR_CHANGE" + }, { + no: 9, + name: "CPP_SOURCE_LSP_SUGGESTIONS" + }]); + cjt = class q4e extends N { + constructor(e) { + super(); + this.source = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CppIntentInfo"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "source", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new q4e().fromBinary(e, t); + } + static fromJson(e, t) { + return new q4e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new q4e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(q4e, e, t); + } + }; + Mvs = class j4e extends N { + constructor(e) { + super(); + this.label = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.LspSuggestion"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "label", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new j4e().fromBinary(e, t); + } + static fromJson(e, t) { + return new j4e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new j4e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(j4e, e, t); + } + }; + Avs = class z4e extends N { + constructor(e) { + super(); + this.suggestions = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.LspSuggestedItems"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "suggestions", + kind: "message", + T: Mvs, + repeated: true + }]); + } + static fromBinary(e, t) { + return new z4e().fromBinary(e, t); + } + static fromJson(e, t) { + return new z4e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new z4e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(z4e, e, t); + } + }; + $vs = class J4e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ShouldTurnOnCppOnboardingRequest"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new J4e().fromBinary(e, t); + } + static fromJson(e, t) { + return new J4e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new J4e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(J4e, e, t); + } + }; + Fvs = class G4e extends N { + constructor(e) { + super(); + this.shouldTurnOnCppOnboarding = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ShouldTurnOnCppOnboardingResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "should_turn_on_cpp_onboarding", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new G4e().fromBinary(e, t); + } + static fromJson(e, t) { + return new G4e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new G4e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(G4e, e, t); + } + }; + ddt = class K4e extends N { + constructor(e) { + super(); + this.diffHistory = []; + this.contextItems = []; + this.diffHistoryKeys = []; + this.fileDiffHistories = []; + this.mergedDiffHistories = []; + this.blockDiffPatches = []; + this.parameterHints = []; + this.lspContexts = []; + this.additionalFiles = []; + this.filesyncUpdates = []; + this.timeSinceRequestStart = 0; + this.timeAtRequestSend = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamCppRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "current_file", + kind: "message", + T: tu + }, { + no: 2, + name: "diff_history", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 3, + name: "model_name", + kind: "scalar", + T: 9, + opt: true + }, { + no: 4, + name: "linter_errors", + kind: "message", + T: xp, + opt: true + }, { + no: 13, + name: "context_items", + kind: "message", + T: pdt, + repeated: true + }, { + no: 5, + name: "diff_history_keys", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 6, + name: "give_debug_output", + kind: "scalar", + T: 8, + opt: true + }, { + no: 7, + name: "file_diff_histories", + kind: "message", + T: Fx, + repeated: true + }, { + no: 8, + name: "merged_diff_histories", + kind: "message", + T: Fx, + repeated: true + }, { + no: 9, + name: "block_diff_patches", + kind: "message", + T: vdt, + repeated: true + }, { + no: 10, + name: "is_nightly", + kind: "scalar", + T: 8, + opt: true + }, { + no: 11, + name: "is_debug", + kind: "scalar", + T: 8, + opt: true + }, { + no: 12, + name: "immediately_ack", + kind: "scalar", + T: 8, + opt: true + }, { + no: 17, + name: "enable_more_context", + kind: "scalar", + T: 8, + opt: true + }, { + no: 14, + name: "parameter_hints", + kind: "message", + T: hjt, + repeated: true + }, { + no: 15, + name: "lsp_contexts", + kind: "message", + T: cdt, + repeated: true + }, { + no: 16, + name: "cpp_intent_info", + kind: "message", + T: cjt, + opt: true + }, { + no: 18, + name: "workspace_id", + kind: "scalar", + T: 9, + opt: true + }, { + no: 19, + name: "additional_files", + kind: "message", + T: Jvs, + repeated: true + }, { + no: 20, + name: "control_token", + kind: "enum", + T: m.getEnumType(Gie), + opt: true + }, { + no: 21, + name: "client_time", + kind: "scalar", + T: 1, + opt: true + }, { + no: 22, + name: "filesync_updates", + kind: "message", + T: Yz, + repeated: true + }, { + no: 23, + name: "time_since_request_start", + kind: "scalar", + T: 1 + }, { + no: 24, + name: "time_at_request_send", + kind: "scalar", + T: 1 + }, { + no: 25, + name: "client_timezone_offset", + kind: "scalar", + T: 1, + opt: true + }, { + no: 26, + name: "lsp_suggested_items", + kind: "message", + T: Avs, + opt: true + }, { + no: 27, + name: "supports_cpt", + kind: "scalar", + T: 8, + opt: true + }]); + } + static fromBinary(e, t) { + return new K4e().fromBinary(e, t); + } + static fromJson(e, t) { + return new K4e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new K4e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(K4e, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.QUIET = 1] = "QUIET"; + i[i.LOUD = 2] = "LOUD"; + i[i.OP = 3] = "OP"; + })(Gie ||= {}); + m.util.setEnumType(Gie, "aiserver.v1.StreamCppRequest.ControlToken", [{ + no: 0, + name: "CONTROL_TOKEN_UNSPECIFIED" + }, { + no: 1, + name: "CONTROL_TOKEN_QUIET" + }, { + no: 2, + name: "CONTROL_TOKEN_LOUD" + }, { + no: 3, + name: "CONTROL_TOKEN_OP" + }]); + Ovs = class Y4e extends N { + constructor(e) { + super(); + this.text = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamCppResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "text", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "suggestion_start_line", + kind: "scalar", + T: 5, + opt: true + }, { + no: 3, + name: "suggestion_confidence", + kind: "scalar", + T: 5, + opt: true + }, { + no: 4, + name: "done_stream", + kind: "scalar", + T: 8, + opt: true + }, { + no: 5, + name: "debug_model_output", + kind: "scalar", + T: 9, + opt: true + }, { + no: 6, + name: "debug_model_input", + kind: "scalar", + T: 9, + opt: true + }, { + no: 7, + name: "debug_stream_time", + kind: "scalar", + T: 9, + opt: true + }, { + no: 8, + name: "debug_total_time", + kind: "scalar", + T: 9, + opt: true + }, { + no: 9, + name: "debug_ttft_time", + kind: "scalar", + T: 9, + opt: true + }, { + no: 10, + name: "debug_server_timing", + kind: "scalar", + T: 9, + opt: true + }, { + no: 11, + name: "range_to_replace", + kind: "message", + T: Kv, + opt: true + }, { + no: 12, + name: "cursor_prediction_target", + kind: "message", + T: _vs, + opt: true + }, { + no: 13, + name: "done_edit", + kind: "scalar", + T: 8, + opt: true + }, { + no: 14, + name: "model_info", + kind: "message", + T: Bvs, + opt: true + }, { + no: 15, + name: "begin_edit", + kind: "scalar", + T: 8, + opt: true + }, { + no: 16, + name: "should_remove_leading_eol", + kind: "scalar", + T: 8, + opt: true + }, { + no: 17, + name: "binding_id", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new Y4e().fromBinary(e, t); + } + static fromJson(e, t) { + return new Y4e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Y4e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Y4e, e, t); + } + }; + _vs = class X4e extends N { + constructor(e) { + super(); + this.relativePath = ""; + this.lineNumberOneIndexed = 0; + this.expectedContent = ""; + this.shouldRetriggerCpp = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamCppResponse.CursorPredictionTarget"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "line_number_one_indexed", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "expected_content", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "should_retrigger_cpp", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new X4e().fromBinary(e, t); + } + static fromJson(e, t) { + return new X4e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new X4e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(X4e, e, t); + } + }; + Bvs = class Q4e extends N { + constructor(e) { + super(); + this.isFusedCursorPredictionModel = false; + this.isMultidiffModel = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamCppResponse.ModelInfo"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "is_fused_cursor_prediction_model", + kind: "scalar", + T: 8 + }, { + no: 2, + name: "is_multidiff_model", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new Q4e().fromBinary(e, t); + } + static fromJson(e, t) { + return new Q4e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Q4e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Q4e, e, t); + } + }; + hdt = class Z4e extends N { + constructor(e) { + super(); + this.model = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CppConfigRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "is_nightly", + kind: "scalar", + T: 8, + opt: true + }, { + no: 2, + name: "model", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "supports_cpt", + kind: "scalar", + T: 8, + opt: true + }]); + } + static fromBinary(e, t) { + return new Z4e().fromBinary(e, t); + } + static fromJson(e, t) { + return new Z4e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Z4e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Z4e, e, t); + } + }; + Uvs = class e5e extends N { + constructor(e) { + super(); + this.heuristics = []; + this.excludeRecentlyViewedFilesPatterns = []; + this.enableRvfTracking = false; + this.globalDebounceDurationMillis = 0; + this.clientDebounceDurationMillis = 0; + this.cppUrl = ""; + this.useWhitespaceDiffHistory = false; + this.enableFilesyncDebounceSkipping = false; + this.checkFilesyncHashPercent = 0; + this.geoCppBackendUrl = ""; + this.isFusedCursorPredictionModel = false; + this.includeUnchangedLines = false; + this.shouldFetchRvfText = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CppConfigResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "above_radius", + kind: "scalar", + T: 5, + opt: true + }, { + no: 2, + name: "below_radius", + kind: "scalar", + T: 5, + opt: true + }, { + no: 4, + name: "merge_behavior", + kind: "message", + T: Vvs, + opt: true + }, { + no: 5, + name: "is_on", + kind: "scalar", + T: 8, + opt: true + }, { + no: 6, + name: "is_ghost_text", + kind: "scalar", + T: 8, + opt: true + }, { + no: 7, + name: "should_let_user_enable_cpp_even_if_not_pro", + kind: "scalar", + T: 8, + opt: true + }, { + no: 8, + name: "heuristics", + kind: "enum", + T: m.getEnumType(n5), + repeated: true + }, { + no: 9, + name: "exclude_recently_viewed_files_patterns", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 10, + name: "enable_rvf_tracking", + kind: "scalar", + T: 8 + }, { + no: 11, + name: "global_debounce_duration_millis", + kind: "scalar", + T: 5 + }, { + no: 12, + name: "client_debounce_duration_millis", + kind: "scalar", + T: 5 + }, { + no: 13, + name: "cpp_url", + kind: "scalar", + T: 9 + }, { + no: 14, + name: "use_whitespace_diff_history", + kind: "scalar", + T: 8 + }, { + no: 15, + name: "import_prediction_config", + kind: "message", + T: Wvs + }, { + no: 16, + name: "enable_filesync_debounce_skipping", + kind: "scalar", + T: 8 + }, { + no: 17, + name: "check_filesync_hash_percent", + kind: "scalar", + T: 2 + }, { + no: 18, + name: "geo_cpp_backend_url", + kind: "scalar", + T: 9 + }, { + no: 19, + name: "recently_rejected_edit_thresholds", + kind: "message", + T: Hvs, + opt: true + }, { + no: 20, + name: "is_fused_cursor_prediction_model", + kind: "scalar", + T: 8 + }, { + no: 21, + name: "include_unchanged_lines", + kind: "scalar", + T: 8 + }, { + no: 22, + name: "should_fetch_rvf_text", + kind: "scalar", + T: 8 + }, { + no: 23, + name: "max_number_of_cleared_suggestions_since_last_accept", + kind: "scalar", + T: 5, + opt: true + }, { + no: 24, + name: "suggestion_hint_config", + kind: "message", + T: qvs, + opt: true + }]); + } + static fromBinary(e, t) { + return new e5e().fromBinary(e, t); + } + static fromJson(e, t) { + return new e5e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new e5e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(e5e, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.LOTS_OF_ADDED_TEXT = 1] = "LOTS_OF_ADDED_TEXT"; + i[i.DUPLICATING_LINE_AFTER_SUGGESTION = 2] = "DUPLICATING_LINE_AFTER_SUGGESTION"; + i[i.DUPLICATING_MULTIPLE_LINES_AFTER_SUGGESTION = 3] = "DUPLICATING_MULTIPLE_LINES_AFTER_SUGGESTION"; + i[i.REVERTING_USER_CHANGE = 4] = "REVERTING_USER_CHANGE"; + i[i.OUTPUT_EXTENDS_BEYOND_RANGE_AND_IS_REPEATED = 5] = "OUTPUT_EXTENDS_BEYOND_RANGE_AND_IS_REPEATED"; + i[i.SUGGESTING_RECENTLY_REJECTED_EDIT = 6] = "SUGGESTING_RECENTLY_REJECTED_EDIT"; + })(n5 ||= {}); + m.util.setEnumType(n5, "aiserver.v1.CppConfigResponse.Heuristic", [{ + no: 0, + name: "HEURISTIC_UNSPECIFIED" + }, { + no: 1, + name: "HEURISTIC_LOTS_OF_ADDED_TEXT" + }, { + no: 2, + name: "HEURISTIC_DUPLICATING_LINE_AFTER_SUGGESTION" + }, { + no: 3, + name: "HEURISTIC_DUPLICATING_MULTIPLE_LINES_AFTER_SUGGESTION" + }, { + no: 4, + name: "HEURISTIC_REVERTING_USER_CHANGE" + }, { + no: 5, + name: "HEURISTIC_OUTPUT_EXTENDS_BEYOND_RANGE_AND_IS_REPEATED" + }, { + no: 6, + name: "HEURISTIC_SUGGESTING_RECENTLY_REJECTED_EDIT" + }]); + Wvs = class t5e extends N { + constructor(e) { + super(); + this.isDisabledByBackend = false; + this.shouldTurnOnAutomatically = false; + this.pythonEnabled = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CppConfigResponse.ImportPredictionConfig"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "is_disabled_by_backend", + kind: "scalar", + T: 8 + }, { + no: 2, + name: "should_turn_on_automatically", + kind: "scalar", + T: 8 + }, { + no: 3, + name: "python_enabled", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new t5e().fromBinary(e, t); + } + static fromJson(e, t) { + return new t5e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new t5e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(t5e, e, t); + } + }; + Vvs = class i5e extends N { + constructor(e) { + super(); + this.type = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CppConfigResponse.MergeBehavior"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "type", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "limit", + kind: "scalar", + T: 5, + opt: true + }, { + no: 3, + name: "radius", + kind: "scalar", + T: 5, + opt: true + }]); + } + static fromBinary(e, t) { + return new i5e().fromBinary(e, t); + } + static fromJson(e, t) { + return new i5e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new i5e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(i5e, e, t); + } + }; + Hvs = class s5e extends N { + constructor(e) { + super(); + this.hardRejectThreshold = 0; + this.softRejectThreshold = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CppConfigResponse.RecentlyRejectedEditThresholds"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "hard_reject_threshold", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "soft_reject_threshold", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new s5e().fromBinary(e, t); + } + static fromJson(e, t) { + return new s5e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new s5e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(s5e, e, t); + } + }; + qvs = class n5e extends N { + constructor(e) { + super(); + this.importantLspExtensions = []; + this.enabledForPathExtensions = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CppConfigResponse.SuggestionHintConfig"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "important_lsp_extensions", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 2, + name: "enabled_for_path_extensions", + kind: "scalar", + T: 9, + repeated: true + }]); + } + static fromBinary(e, t) { + return new n5e().fromBinary(e, t); + } + static fromJson(e, t) { + return new n5e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new n5e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(n5e, e, t); + } + }; + fdt = class r5e extends N { + constructor(e) { + super(); + this.text = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SuggestedEdit"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "edit_range", + kind: "message", + T: Of + }, { + no: 2, + name: "text", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new r5e().fromBinary(e, t); + } + static fromJson(e, t) { + return new r5e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new r5e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(r5e, e, t); + } + }; + ujt = class o5e extends N { + constructor(e) { + super(); + this.suggestedEdits = []; + this.markerTouchesGreen = false; + this.currentFileContentsForLinterErrors = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetCppEditClassificationRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "cpp_request", + kind: "message", + T: ddt + }, { + no: 25, + name: "suggested_edits", + kind: "message", + T: fdt, + repeated: true + }, { + no: 26, + name: "marker_touches_green", + kind: "scalar", + T: 8 + }, { + no: 27, + name: "current_file_contents_for_linter_errors", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new o5e().fromBinary(e, t); + } + static fromJson(e, t) { + return new o5e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new o5e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(o5e, e, t); + } + }; + jvs = class a5e extends N { + constructor(e) { + super(); + this.scoredEdits = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetCppEditClassificationResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "scored_edits", + kind: "message", + T: gdt, + repeated: true + }, { + no: 2, + name: "noop_edit", + kind: "message", + T: gdt + }, { + no: 3, + name: "should_noop", + kind: "scalar", + T: 8, + opt: true + }, { + no: 4, + name: "generation_edit", + kind: "message", + T: gdt + }]); + } + static fromBinary(e, t) { + return new a5e().fromBinary(e, t); + } + static fromJson(e, t) { + return new a5e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new a5e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(a5e, e, t); + } + }; + zvs = class l5e extends N { + constructor(e) { + super(); + this.tokens = []; + this.tokenLogprobs = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetCppEditClassificationResponse.LogProbs"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "tokens", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 2, + name: "token_logprobs", + kind: "scalar", + T: 1, + repeated: true + }]); + } + static fromBinary(e, t) { + return new l5e().fromBinary(e, t); + } + static fromJson(e, t) { + return new l5e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new l5e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(l5e, e, t); + } + }; + gdt = class c5e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetCppEditClassificationResponse.ScoredEdit"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "edit", + kind: "message", + T: fdt + }, { + no: 2, + name: "log_probs", + kind: "message", + T: zvs + }]); + } + static fromBinary(e, t) { + return new c5e().fromBinary(e, t); + } + static fromJson(e, t) { + return new c5e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new c5e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(c5e, e, t); + } + }; + Jvs = class u5e extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.isOpen = false; + this.visibleRangeContent = []; + this.startLineNumberOneIndexed = []; + this.visibleRanges = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.AdditionalFile"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "is_open", + kind: "scalar", + T: 8 + }, { + no: 3, + name: "visible_range_content", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 4, + name: "last_viewed_at", + kind: "scalar", + T: 1, + opt: true + }, { + no: 5, + name: "start_line_number_one_indexed", + kind: "scalar", + T: 5, + repeated: true + }, { + no: 6, + name: "visible_ranges", + kind: "message", + T: Kv, + repeated: true + }]); + } + static fromBinary(e, t) { + return new u5e().fromBinary(e, t); + } + static fromJson(e, t) { + return new u5e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new u5e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(u5e, e, t); + } + }; + djt = class d5e extends N { + constructor(e) { + super(); + this.requestId = ""; + this.performanceNowTime = 0; + this.fate = H7.UNSPECIFIED; + this.extension = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RecordCppFateRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "request_id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "performance_now_time", + kind: "scalar", + T: 2 + }, { + no: 3, + name: "fate", + kind: "enum", + T: m.getEnumType(H7) + }, { + no: 4, + name: "extension", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new d5e().fromBinary(e, t); + } + static fromJson(e, t) { + return new d5e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new d5e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(d5e, e, t); + } + }; + Gvs = class h5e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RecordCppFateResponse"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new h5e().fromBinary(e, t); + } + static fromJson(e, t) { + return new h5e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new h5e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(h5e, e, t); + } + }; + Kvs = class f5e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.AvailableCppModelsRequest"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new f5e().fromBinary(e, t); + } + static fromJson(e, t) { + return new f5e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new f5e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(f5e, e, t); + } + }; + Yvs = class g5e extends N { + constructor(e) { + super(); + this.models = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.AvailableCppModelsResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "models", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 2, + name: "default_model", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new g5e().fromBinary(e, t); + } + static fromJson(e, t) { + return new g5e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new g5e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(g5e, e, t); + } + }; + Xvs = class p5e extends N { + constructor(e) { + super(); + this.contextItems = []; + this.fileDiffHistories = []; + this.mergedDiffHistories = []; + this.blockDiffPatches = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamHoldCppRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "current_file", + kind: "message", + T: tu + }, { + no: 4, + name: "linter_errors", + kind: "message", + T: xp, + opt: true + }, { + no: 13, + name: "context_items", + kind: "message", + T: pdt, + repeated: true + }, { + no: 7, + name: "file_diff_histories", + kind: "message", + T: Fx, + repeated: true + }, { + no: 8, + name: "merged_diff_histories", + kind: "message", + T: Fx, + repeated: true + }, { + no: 9, + name: "block_diff_patches", + kind: "message", + T: vdt, + repeated: true + }, { + no: 10, + name: "model_details", + kind: "message", + T: Qa + }]); + } + static fromBinary(e, t) { + return new p5e().fromBinary(e, t); + } + static fromJson(e, t) { + return new p5e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new p5e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(p5e, e, t); + } + }; + Qvs = class m5e extends N { + constructor(e) { + super(); + this.text = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamHoldCppResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "text", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new m5e().fromBinary(e, t); + } + static fromJson(e, t) { + return new m5e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new m5e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(m5e, e, t); + } + }; + Fx = class b5e extends N { + constructor(e) { + super(); + this.fileName = ""; + this.diffHistory = []; + this.diffHistoryTimestamps = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CppFileDiffHistory"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "file_name", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "diff_history", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 3, + name: "diff_history_timestamps", + kind: "scalar", + T: 1, + repeated: true + }]); + } + static fromBinary(e, t) { + return new b5e().fromBinary(e, t); + } + static fromJson(e, t) { + return new b5e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new b5e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(b5e, e, t); + } + }; + Zvs = class v5e extends N { + constructor(e) { + super(); + this.relativePath = ""; + this.lineNumber = 0; + this.deletedLines = []; + this.insertedLines = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.EditPatch"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "line_number", + kind: "scalar", + T: 13 + }, { + no: 3, + name: "deleted_lines", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 4, + name: "inserted_lines", + kind: "scalar", + T: 9, + repeated: true + }]); + } + static fromBinary(e, t) { + return new v5e().fromBinary(e, t); + } + static fromJson(e, t) { + return new v5e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new v5e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(v5e, e, t); + } + }; + xtr = class y5e extends N { + constructor(e) { + super(); + this.fileName = ""; + this.editPatches = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CptFileDiffHistory"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "file_name", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "edit_patches", + kind: "message", + T: Zvs, + repeated: true + }]); + } + static fromBinary(e, t) { + return new y5e().fromBinary(e, t); + } + static fromJson(e, t) { + return new y5e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new y5e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(y5e, e, t); + } + }; + pdt = class w5e extends N { + constructor(e) { + super(); + this.contents = ""; + this.relativeWorkspacePath = ""; + this.score = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CppContextItem"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "contents", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "symbol", + kind: "scalar", + T: 9, + opt: true + }, { + no: 3, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "score", + kind: "scalar", + T: 2 + }]); + } + static fromBinary(e, t) { + return new w5e().fromBinary(e, t); + } + static fromJson(e, t) { + return new w5e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new w5e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(w5e, e, t); + } + }; + eys = class C5e extends N { + constructor(e) { + super(); + this.requestId = ""; + this.sessionId = ""; + this.responseType = mve.UNSPECIFIED; + this.modelCodeName = ""; + this.modelOpenaiName = ""; + this.currentPerformanceNowTime = 0; + this.sessionPerformanceOriginTime = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.MarkCppRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "request_id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "session_id", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "response_type", + kind: "enum", + T: m.getEnumType(mve) + }, { + no: 4, + name: "desired_completion", + kind: "scalar", + T: 9, + opt: true + }, { + no: 5, + name: "range_transformation", + kind: "message", + T: tys + }, { + no: 10, + name: "model_code_name", + kind: "scalar", + T: 9 + }, { + no: 11, + name: "model_openai_name", + kind: "scalar", + T: 9 + }, { + no: 12, + name: "current_performance_now_time", + kind: "scalar", + T: 1 + }, { + no: 13, + name: "session_performance_origin_time", + kind: "scalar", + T: 1 + }]); + } + static fromBinary(e, t) { + return new C5e().fromBinary(e, t); + } + static fromJson(e, t) { + return new C5e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new C5e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(C5e, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.GOOD = 1] = "GOOD"; + i[i.BAD = 2] = "BAD"; + i[i.BAD_CONTEXT = 3] = "BAD_CONTEXT"; + i[i.BAD_REASONING = 4] = "BAD_REASONING"; + i[i.BAD_STUPID_MISTAKE = 5] = "BAD_STUPID_MISTAKE"; + i[i.BAD_FORMATTING = 6] = "BAD_FORMATTING"; + i[i.BAD_RANGE = 7] = "BAD_RANGE"; + i[i.GOOD_PREDICTION = 8] = "GOOD_PREDICTION"; + i[i.BAD_FALSE_POSITIVE_TRIGGER = 9] = "BAD_FALSE_POSITIVE_TRIGGER"; + i[i.BAD_FALSE_NEGATIVE_TRIGGER = 10] = "BAD_FALSE_NEGATIVE_TRIGGER"; + })(mve ||= {}); + m.util.setEnumType(mve, "aiserver.v1.MarkCppRequest.CppResponseTypes", [{ + no: 0, + name: "CPP_RESPONSE_TYPES_UNSPECIFIED" + }, { + no: 1, + name: "CPP_RESPONSE_TYPES_GOOD" + }, { + no: 2, + name: "CPP_RESPONSE_TYPES_BAD" + }, { + no: 3, + name: "CPP_RESPONSE_TYPES_BAD_CONTEXT" + }, { + no: 4, + name: "CPP_RESPONSE_TYPES_BAD_REASONING" + }, { + no: 5, + name: "CPP_RESPONSE_TYPES_BAD_STUPID_MISTAKE" + }, { + no: 6, + name: "CPP_RESPONSE_TYPES_BAD_FORMATTING" + }, { + no: 7, + name: "CPP_RESPONSE_TYPES_BAD_RANGE" + }, { + no: 8, + name: "CPP_RESPONSE_TYPES_GOOD_PREDICTION" + }, { + no: 9, + name: "CPP_RESPONSE_TYPES_BAD_FALSE_POSITIVE_TRIGGER" + }, { + no: 10, + name: "CPP_RESPONSE_TYPES_BAD_FALSE_NEGATIVE_TRIGGER" + }]); + tys = class S5e extends N { + constructor(e) { + super(); + this.startLineNumber = 0; + this.endLineNumber = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.MarkCppRequest.RangeTransformation"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "start_line_number", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "end_line_number", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new S5e().fromBinary(e, t); + } + static fromJson(e, t) { + return new S5e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new S5e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(S5e, e, t); + } + }; + hjt = class x5e extends N { + constructor(e) { + super(); + this.label = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CppParameterHint"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "label", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "documentation", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new x5e().fromBinary(e, t); + } + static fromJson(e, t) { + return new x5e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new x5e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(x5e, e, t); + } + }; + iys = class k5e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.MarkCppResponse"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new k5e().fromBinary(e, t); + } + static fromJson(e, t) { + return new k5e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new k5e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(k5e, e, t); + } + }; + iD = class E5e extends N { + constructor(e) { + super(); + this.startLineNumber = 0; + this.startColumn = 0; + this.endLineNumber = 0; + this.endColumn = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.IRange"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "start_line_number", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "start_column", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "end_line_number", + kind: "scalar", + T: 5 + }, { + no: 4, + name: "end_column", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new E5e().fromBinary(e, t); + } + static fromJson(e, t) { + return new E5e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new E5e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(E5e, e, t); + } + }; + Kie = class I5e extends N { + constructor(e) { + super(); + this.lineNumberOneIndexed = 0; + this.columnOneIndexed = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.OneIndexedPosition"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "line_number_one_indexed", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "column_one_indexed", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new I5e().fromBinary(e, t); + } + static fromJson(e, t) { + return new I5e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new I5e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(I5e, e, t); + } + }; + sys = class D5e extends N { + constructor(e) { + super(); + this.selectionStartLineNumber = 0; + this.selectionStartColumn = 0; + this.positionLineNumber = 0; + this.positionColumn = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CursorSelection"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "selection_start_line_number", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "selection_start_column", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "position_line_number", + kind: "scalar", + T: 5 + }, { + no: 4, + name: "position_column", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new D5e().fromBinary(e, t); + } + static fromJson(e, t) { + return new D5e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new D5e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(D5e, e, t); + } + }; + Xz = class T5e extends N { + constructor(e) { + super(); + this.text = ""; + this.modelIsAttachedToEditor = false; + this.modelIsAttachedToTheActiveEditor = false; + this.cursorSelections = []; + this.modelVersionAtMetadataRetrievalTime = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ModelChange"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "text", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "range", + kind: "message", + T: iD + }, { + no: 3, + name: "final_model_hash", + kind: "scalar", + T: 9, + opt: true + }, { + no: 4, + name: "model_version_immediately_after_this_change", + kind: "scalar", + T: 5, + opt: true + }, { + no: 5, + name: "performance_now_timestamp", + kind: "scalar", + T: 1, + opt: true + }, { + no: 7, + name: "is_undoing", + kind: "scalar", + T: 8, + opt: true + }, { + no: 8, + name: "is_redoing", + kind: "scalar", + T: 8, + opt: true + }, { + no: 9, + name: "model_is_attached_to_editor", + kind: "scalar", + T: 8 + }, { + no: 10, + name: "model_is_attached_to_the_active_editor", + kind: "scalar", + T: 8 + }, { + no: 11, + name: "cursor_selections", + kind: "message", + T: sys, + repeated: true + }, { + no: 12, + name: "model_version_at_metadata_retrieval_time", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new T5e().fromBinary(e, t); + } + static fromJson(e, t) { + return new T5e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new T5e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(T5e, e, t); + } + }; + bve = class P5e extends N { + constructor(e) { + super(); + this.suggestionId = 0; + this.suggestionText = ""; + this.modelVersionWhenTheChangeIsFirstIndicatedToTheUserButNotShownInTheModel = 0; + this.originalText = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CurrentlyShownCppSuggestion"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "suggestion_id", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "suggestion_text", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "model_version_when_the_change_is_first_indicated_to_the_user_but_not_shown_in_the_model", + kind: "scalar", + T: 5 + }, { + no: 4, + name: "range_of_suggestion_in_current_model", + kind: "message", + T: iD, + opt: true + }, { + no: 5, + name: "original_text", + kind: "scalar", + T: 9 + }, { + no: 6, + name: "binding_id", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new P5e().fromBinary(e, t); + } + static fromJson(e, t) { + return new P5e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new P5e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(P5e, e, t); + } + }; + nys = class L5e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CppAcceptEventNew"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "cpp_suggestion", + kind: "message", + T: bve + }, { + no: 7, + name: "point_in_time_model", + kind: "message", + T: Yv + }]); + } + static fromBinary(e, t) { + return new L5e().fromBinary(e, t); + } + static fromJson(e, t) { + return new L5e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new L5e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(L5e, e, t); + } + }; + fjt = class R5e extends N { + constructor(e) { + super(); + this.requestId = ""; + this.suggestionText = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RecoverableCppData"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "request_id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "suggestion_text", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "suggestion_range", + kind: "message", + T: iD + }, { + no: 4, + name: "position", + kind: "message", + T: Kie + }]); + } + static fromBinary(e, t) { + return new R5e().fromBinary(e, t); + } + static fromJson(e, t) { + return new R5e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new R5e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(R5e, e, t); + } + }; + rys = class N5e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CppSuggestEvent"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "cpp_suggestion", + kind: "message", + T: bve + }, { + no: 2, + name: "point_in_time_model", + kind: "message", + T: Yv + }, { + no: 3, + name: "recoverable_cpp_data", + kind: "message", + T: fjt + }]); + } + static fromBinary(e, t) { + return new N5e().fromBinary(e, t); + } + static fromJson(e, t) { + return new N5e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new N5e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(N5e, e, t); + } + }; + oys = class M5e extends N { + constructor(e) { + super(); + this.generationUuid = ""; + this.modelVersion = 0; + this.source = lE.UNSPECIFIED; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CppTriggerEvent"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "generation_uuid", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "model_version", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "cursor_position", + kind: "message", + T: Kie + }, { + no: 4, + name: "point_in_time_model", + kind: "message", + T: Yv + }, { + no: 5, + name: "source", + kind: "enum", + T: m.getEnumType(lE) + }]); + } + static fromBinary(e, t) { + return new M5e().fromBinary(e, t); + } + static fromJson(e, t) { + return new M5e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new M5e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(M5e, e, t); + } + }; + ays = class A5e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.FinishedCppGenerationEvent"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "point_in_time_model", + kind: "message", + T: Yv + }, { + no: 2, + name: "recoverable_cpp_data", + kind: "message", + T: fjt + }]); + } + static fromBinary(e, t) { + return new A5e().fromBinary(e, t); + } + static fromJson(e, t) { + return new A5e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new A5e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(A5e, e, t); + } + }; + lys = class $5e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CppRejectEventNew"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "cpp_suggestion", + kind: "message", + T: bve + }, { + no: 7, + name: "point_in_time_model", + kind: "message", + T: Yv + }]); + } + static fromBinary(e, t) { + return new $5e().fromBinary(e, t); + } + static fromJson(e, t) { + return new $5e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new $5e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals($5e, e, t); + } + }; + cys = class F5e extends N { + constructor(e) { + super(); + this.text = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.Edit"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "text", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "range", + kind: "message", + T: iD + }]); + } + static fromBinary(e, t) { + return new F5e().fromBinary(e, t); + } + static fromJson(e, t) { + return new F5e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new F5e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(F5e, e, t); + } + }; + uys = class O5e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CppPartialAcceptEvent"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "cpp_suggestion", + kind: "message", + T: bve + }, { + no: 2, + name: "edit", + kind: "message", + T: cys + }, { + no: 3, + name: "point_in_time_model", + kind: "message", + T: Yv + }]); + } + static fromBinary(e, t) { + return new O5e().fromBinary(e, t); + } + static fromJson(e, t) { + return new O5e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new O5e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(O5e, e, t); + } + }; + mdt = class _5e extends N { + constructor(e) { + super(); + this.requestId = ""; + this.predictionId = 0; + this.lineNumber = 0; + this.source = sA.UNSPECIFIED; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CursorPrediction"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "request_id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "prediction_id", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "line_number", + kind: "scalar", + T: 5 + }, { + no: 4, + name: "source", + kind: "enum", + T: m.getEnumType(sA) + }, { + no: 5, + name: "binding_id", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new _5e().fromBinary(e, t); + } + static fromJson(e, t) { + return new _5e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new _5e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(_5e, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.ALWAYS_ON = 1] = "ALWAYS_ON"; + i[i.ACCEPT = 2] = "ACCEPT"; + i[i.UNDO = 3] = "UNDO"; + i[i.EDITOR_CHANGE = 4] = "EDITOR_CHANGE"; + })(sA ||= {}); + m.util.setEnumType(sA, "aiserver.v1.CursorPrediction.CursorPredictionSource", [{ + no: 0, + name: "CURSOR_PREDICTION_SOURCE_UNSPECIFIED" + }, { + no: 1, + name: "CURSOR_PREDICTION_SOURCE_ALWAYS_ON" + }, { + no: 2, + name: "CURSOR_PREDICTION_SOURCE_ACCEPT" + }, { + no: 3, + name: "CURSOR_PREDICTION_SOURCE_UNDO" + }, { + no: 4, + name: "CURSOR_PREDICTION_SOURCE_EDITOR_CHANGE" + }]); + dys = class B5e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SuggestCursorPredictionEvent"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "cursor_prediction", + kind: "message", + T: mdt + }, { + no: 2, + name: "point_in_time_model", + kind: "message", + T: Yv + }]); + } + static fromBinary(e, t) { + return new B5e().fromBinary(e, t); + } + static fromJson(e, t) { + return new B5e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new B5e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(B5e, e, t); + } + }; + hys = class U5e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.AcceptCursorPredictionEvent"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "cursor_prediction", + kind: "message", + T: mdt + }, { + no: 2, + name: "point_in_time_model", + kind: "message", + T: Yv + }]); + } + static fromBinary(e, t) { + return new U5e().fromBinary(e, t); + } + static fromJson(e, t) { + return new U5e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new U5e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(U5e, e, t); + } + }; + fys = class W5e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RejectCursorPredictionEvent"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "cursor_prediction", + kind: "message", + T: mdt + }, { + no: 2, + name: "point_in_time_model", + kind: "message", + T: Yv + }]); + } + static fromBinary(e, t) { + return new W5e().fromBinary(e, t); + } + static fromJson(e, t) { + return new W5e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new W5e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(W5e, e, t); + } + }; + gjt = class V5e extends N { + constructor(e) { + super(); + this.modelVersion = 0; + this.relativePath = ""; + this.modelId = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.MaybeDefinedPointInTimeModel"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "model_uuid", + kind: "scalar", + T: 9, + opt: true + }, { + no: 2, + name: "model_version", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "relative_path", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "model_id", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new V5e().fromBinary(e, t); + } + static fromJson(e, t) { + return new V5e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new V5e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(V5e, e, t); + } + }; + Yv = class H5e extends N { + constructor(e) { + super(); + this.modelUuid = ""; + this.modelVersion = 0; + this.relativePath = ""; + this.modelId = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.PointInTimeModel"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "model_uuid", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "model_version", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "relative_path", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "model_id", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new H5e().fromBinary(e, t); + } + static fromJson(e, t) { + return new H5e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new H5e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(H5e, e, t); + } + }; + gys = class q5e extends N { + constructor(e) { + super(); + this.lineNumberOneIndexed = 0; + this.columnNumberOneIndexed = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CppManualTriggerEventNew"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "line_number_one_indexed", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "column_number_one_indexed", + kind: "scalar", + T: 5 + }, { + no: 7, + name: "point_in_time_model", + kind: "message", + T: Yv + }]); + } + static fromBinary(e, t) { + return new q5e().fromBinary(e, t); + } + static fromJson(e, t) { + return new q5e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new q5e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(q5e, e, t); + } + }; + pys = class j5e extends N { + constructor(e) { + super(); + this.modelUuid = ""; + this.relativePath = ""; + this.reason = Qz.UNSPECIFIED; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CppStoppedTrackingModelEvent"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "model_uuid", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "relative_path", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "reason", + kind: "enum", + T: m.getEnumType(Qz) + }]); + } + static fromBinary(e, t) { + return new j5e().fromBinary(e, t); + } + static fromJson(e, t) { + return new j5e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new j5e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(j5e, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.FILE_TOO_BIG = 1] = "FILE_TOO_BIG"; + i[i.FILE_DISPOSED = 2] = "FILE_DISPOSED"; + i[i.CHANGE_TOO_BIG = 3] = "CHANGE_TOO_BIG"; + })(Qz ||= {}); + m.util.setEnumType(Qz, "aiserver.v1.CppStoppedTrackingModelEvent.StoppedTrackingModelReason", [{ + no: 0, + name: "STOPPED_TRACKING_MODEL_REASON_UNSPECIFIED" + }, { + no: 1, + name: "STOPPED_TRACKING_MODEL_REASON_FILE_TOO_BIG" + }, { + no: 2, + name: "STOPPED_TRACKING_MODEL_REASON_FILE_DISPOSED" + }, { + no: 3, + name: "STOPPED_TRACKING_MODEL_REASON_CHANGE_TOO_BIG" + }]); + mys = class z5e extends N { + constructor(e) { + super(); + this.addedErrors = []; + this.removedErrors = []; + this.errors = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CppLinterErrorEvent"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "point_in_time_model", + kind: "message", + T: Yv + }, { + no: 2, + name: "added_errors", + kind: "message", + T: YT, + repeated: true + }, { + no: 3, + name: "removed_errors", + kind: "message", + T: YT, + repeated: true + }, { + no: 4, + name: "errors", + kind: "message", + T: YT, + repeated: true + }]); + } + static fromBinary(e, t) { + return new z5e().fromBinary(e, t); + } + static fromJson(e, t) { + return new z5e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new z5e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(z5e, e, t); + } + }; + bys = class J5e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CppDebouncedCursorMovementEvent"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "point_in_time_model", + kind: "message", + T: Yv + }, { + no: 2, + name: "cursor_position", + kind: "message", + T: Kie + }]); + } + static fromBinary(e, t) { + return new J5e().fromBinary(e, t); + } + static fromJson(e, t) { + return new J5e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new J5e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(J5e, e, t); + } + }; + vys = class G5e extends N { + constructor(e) { + super(); + this.visibleRanges = []; + this.editorId = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CppEditorChangedEvent"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "point_in_time_model", + kind: "message", + T: Yv + }, { + no: 2, + name: "cursor_position", + kind: "message", + T: Kie + }, { + no: 3, + name: "visible_ranges", + kind: "message", + T: iD, + repeated: true + }, { + no: 4, + name: "editor_id", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new G5e().fromBinary(e, t); + } + static fromJson(e, t) { + return new G5e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new G5e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(G5e, e, t); + } + }; + yys = class K5e extends N { + constructor(e) { + super(); + this.clipboardContents = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CppCopyEvent"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "clipboard_contents", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new K5e().fromBinary(e, t); + } + static fromJson(e, t) { + return new K5e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new K5e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(K5e, e, t); + } + }; + pjt = class Y5e extends N { + constructor(e) { + super(); + this.title = ""; + this.id = ""; + this.arguments = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CppQuickActionCommand"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "title", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "id", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "arguments", + kind: "scalar", + T: 9, + repeated: true + }]); + } + static fromBinary(e, t) { + return new Y5e().fromBinary(e, t); + } + static fromJson(e, t) { + return new Y5e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Y5e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Y5e, e, t); + } + }; + vve = class X5e extends N { + constructor(e) { + super(); + this.title = ""; + this.edits = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CppQuickAction"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "title", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "edits", + kind: "message", + T: wys, + repeated: true + }, { + no: 3, + name: "is_preferred", + kind: "scalar", + T: 8, + opt: true + }, { + no: 4, + name: "command", + kind: "message", + T: pjt + }]); + } + static fromBinary(e, t) { + return new X5e().fromBinary(e, t); + } + static fromJson(e, t) { + return new X5e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new X5e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(X5e, e, t); + } + }; + wys = class Q5e extends N { + constructor(e) { + super(); + this.text = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CppQuickAction.Edit"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "text", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "range", + kind: "message", + T: iD + }]); + } + static fromBinary(e, t) { + return new Q5e().fromBinary(e, t); + } + static fromJson(e, t) { + return new Q5e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Q5e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Q5e, e, t); + } + }; + Cys = class Z5e extends N { + constructor(e) { + super(); + this.added = []; + this.removed = []; + this.actions = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CppChangeQuickActionEvent"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "point_in_time_model", + kind: "message", + T: Yv + }, { + no: 2, + name: "added", + kind: "message", + T: vve, + repeated: true + }, { + no: 3, + name: "removed", + kind: "message", + T: vve, + repeated: true + }, { + no: 4, + name: "actions", + kind: "message", + T: vve, + repeated: true + }]); + } + static fromBinary(e, t) { + return new Z5e().fromBinary(e, t); + } + static fromJson(e, t) { + return new Z5e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Z5e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Z5e, e, t); + } + }; + Sys = class e6e extends N { + constructor(e) { + super(); + this.actionIdentifier = { + case: undefined + }; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CppQuickActionFireEvent"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "point_in_time_model", + kind: "message", + T: Yv + }, { + no: 2, + name: "quick_action_command", + kind: "message", + T: pjt, + oneof: "action_identifier" + }, { + no: 3, + name: "quick_action_event", + kind: "message", + T: vve, + oneof: "action_identifier" + }]); + } + static fromBinary(e, t) { + return new e6e().fromBinary(e, t); + } + static fromJson(e, t) { + return new e6e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new e6e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(e6e, e, t); + } + }; + xys = class t6e extends N { + constructor(e) { + super(); + this.requestId = ""; + this.eventType = { + case: undefined + }; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CmdKEvent"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "point_in_time_model", + kind: "message", + T: Yv + }, { + no: 2, + name: "request_id", + kind: "scalar", + T: 9 + }, { + no: 20, + name: "prompt_bar_id", + kind: "scalar", + T: 9, + opt: true + }, { + no: 3, + name: "submit_prompt", + kind: "message", + T: kys, + oneof: "event_type" + }, { + no: 4, + name: "end_of_generation", + kind: "message", + T: Eys, + oneof: "event_type" + }, { + no: 5, + name: "interrupt_generation", + kind: "message", + T: Iys, + oneof: "event_type" + }, { + no: 6, + name: "accept_all", + kind: "message", + T: Dys, + oneof: "event_type" + }, { + no: 7, + name: "reject_all", + kind: "message", + T: Tys, + oneof: "event_type" + }, { + no: 8, + name: "reject_partial_diff", + kind: "message", + T: Lys, + oneof: "event_type" + }, { + no: 9, + name: "accept_partial_diff", + kind: "message", + T: Pys, + oneof: "event_type" + }, { + no: 10, + name: "after_reject", + kind: "message", + T: Rys, + oneof: "event_type" + }]); + } + static fromBinary(e, t) { + return new t6e().fromBinary(e, t); + } + static fromJson(e, t) { + return new t6e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new t6e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(t6e, e, t); + } + }; + kys = class i6e extends N { + constructor(e) { + super(); + this.originalText = ""; + this.prompt = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CmdKEvent.SubmitPrompt"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "original_range", + kind: "message", + T: iD + }, { + no: 2, + name: "original_text", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "prompt", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new i6e().fromBinary(e, t); + } + static fromJson(e, t) { + return new i6e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new i6e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(i6e, e, t); + } + }; + Eys = class s6e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CmdKEvent.EndOfGeneration"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new s6e().fromBinary(e, t); + } + static fromJson(e, t) { + return new s6e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new s6e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(s6e, e, t); + } + }; + Iys = class n6e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CmdKEvent.InterruptGeneration"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new n6e().fromBinary(e, t); + } + static fromJson(e, t) { + return new n6e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new n6e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(n6e, e, t); + } + }; + Dys = class r6e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CmdKEvent.AcceptDiffs"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new r6e().fromBinary(e, t); + } + static fromJson(e, t) { + return new r6e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new r6e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(r6e, e, t); + } + }; + Tys = class o6e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CmdKEvent.RejectDiffs"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new o6e().fromBinary(e, t); + } + static fromJson(e, t) { + return new o6e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new o6e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(o6e, e, t); + } + }; + Pys = class a6e extends N { + constructor(e) { + super(); + this.greenLines = []; + this.redLines = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CmdKEvent.AcceptPartialDiff"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "green_range", + kind: "message", + T: iD + }, { + no: 2, + name: "green_lines", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 3, + name: "red_lines", + kind: "scalar", + T: 9, + repeated: true + }]); + } + static fromBinary(e, t) { + return new a6e().fromBinary(e, t); + } + static fromJson(e, t) { + return new a6e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new a6e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(a6e, e, t); + } + }; + Lys = class l6e extends N { + constructor(e) { + super(); + this.greenLines = []; + this.redLines = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CmdKEvent.RejectPartialDiff"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "green_range", + kind: "message", + T: iD + }, { + no: 2, + name: "green_lines", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 3, + name: "red_lines", + kind: "scalar", + T: 9, + repeated: true + }]); + } + static fromBinary(e, t) { + return new l6e().fromBinary(e, t); + } + static fromJson(e, t) { + return new l6e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new l6e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(l6e, e, t); + } + }; + Rys = class c6e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CmdKEvent.AfterReject"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new c6e().fromBinary(e, t); + } + static fromJson(e, t) { + return new c6e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new c6e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(c6e, e, t); + } + }; + Nys = class u6e extends N { + constructor(e) { + super(); + this.requestId = ""; + this.eventType = { + case: undefined + }; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ChatEvent"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "request_id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "submit_prompt", + kind: "message", + T: Mys, + oneof: "event_type" + }, { + no: 3, + name: "end_of_any_generation", + kind: "message", + T: Ays, + oneof: "event_type" + }, { + no: 4, + name: "end_of_uninterrupted_generation", + kind: "message", + T: $ys, + oneof: "event_type" + }]); + } + static fromBinary(e, t) { + return new u6e().fromBinary(e, t); + } + static fromJson(e, t) { + return new u6e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new u6e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(u6e, e, t); + } + }; + Mys = class d6e extends N { + constructor(e) { + super(); + this.prompt = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ChatEvent.SubmitPrompt"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "prompt", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new d6e().fromBinary(e, t); + } + static fromJson(e, t) { + return new d6e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new d6e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(d6e, e, t); + } + }; + Ays = class h6e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ChatEvent.EndOfAnyGeneration"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new h6e().fromBinary(e, t); + } + static fromJson(e, t) { + return new h6e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new h6e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(h6e, e, t); + } + }; + $ys = class f6e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ChatEvent.EndOfUninterruptedGeneration"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new f6e().fromBinary(e, t); + } + static fromJson(e, t) { + return new f6e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new f6e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(f6e, e, t); + } + }; + Fys = class g6e extends N { + constructor(e) { + super(); + this.requestId = ""; + this.eventType = { + case: undefined + }; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.BugBotLinterEvent"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "request_id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "point_in_time_model", + kind: "message", + T: Yv + }, { + no: 3, + name: "lint_generated", + kind: "message", + T: _ys, + oneof: "event_type" + }, { + no: 4, + name: "lint_dismissed", + kind: "message", + T: Bys, + oneof: "event_type" + }, { + no: 5, + name: "user_feedback", + kind: "message", + T: Uys, + oneof: "event_type" + }, { + no: 6, + name: "viewed_report", + kind: "message", + T: Wys, + oneof: "event_type" + }, { + no: 7, + name: "unviewed_report", + kind: "message", + T: Vys, + oneof: "event_type" + }, { + no: 8, + name: "started", + kind: "message", + T: Oys, + oneof: "event_type" + }, { + no: 9, + name: "not_shown_because_heuristic", + kind: "message", + T: Hys, + oneof: "event_type" + }]); + } + static fromBinary(e, t) { + return new g6e().fromBinary(e, t); + } + static fromJson(e, t) { + return new g6e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new g6e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(g6e, e, t); + } + }; + Oys = class p6e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.BugBotLinterEvent.Started"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new p6e().fromBinary(e, t); + } + static fromJson(e, t) { + return new p6e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new p6e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(p6e, e, t); + } + }; + _ys = class m6e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.BugBotLinterEvent.LintGenerated"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "bug_report", + kind: "message", + T: qie + }]); + } + static fromBinary(e, t) { + return new m6e().fromBinary(e, t); + } + static fromJson(e, t) { + return new m6e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new m6e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(m6e, e, t); + } + }; + Bys = class b6e extends N { + constructor(e) { + super(); + this.bugReportId = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.BugBotLinterEvent.LintDismissed"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "bug_report_id", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new b6e().fromBinary(e, t); + } + static fromJson(e, t) { + return new b6e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new b6e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(b6e, e, t); + } + }; + Uys = class v6e extends N { + constructor(e) { + super(); + this.bugReportId = ""; + this.feedback = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.BugBotLinterEvent.UserFeedback"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "bug_report_id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "feedback", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new v6e().fromBinary(e, t); + } + static fromJson(e, t) { + return new v6e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new v6e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(v6e, e, t); + } + }; + Wys = class y6e extends N { + constructor(e) { + super(); + this.bugReportId = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.BugBotLinterEvent.ViewedReport"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "bug_report_id", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new y6e().fromBinary(e, t); + } + static fromJson(e, t) { + return new y6e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new y6e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(y6e, e, t); + } + }; + Vys = class w6e extends N { + constructor(e) { + super(); + this.bugReportId = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.BugBotLinterEvent.UnviewedReport"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "bug_report_id", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new w6e().fromBinary(e, t); + } + static fromJson(e, t) { + return new w6e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new w6e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(w6e, e, t); + } + }; + Hys = class C6e extends N { + constructor(e) { + super(); + this.heuristic = q7.UNSPECIFIED; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.BugBotLinterEvent.NotShownBecauseHeuristic"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "heuristic", + kind: "enum", + T: m.getEnumType(q7) + }]); + } + static fromBinary(e, t) { + return new C6e().fromBinary(e, t); + } + static fromJson(e, t) { + return new C6e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new C6e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(C6e, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.LINT_OVERLAP = 1] = "LINT_OVERLAP"; + i[i.LINES_MISMATCH = 2] = "LINES_MISMATCH"; + })(q7 ||= {}); + m.util.setEnumType(q7, "aiserver.v1.BugBotLinterEvent.NotShownBecauseHeuristic.Heuristic", [{ + no: 0, + name: "HEURISTIC_UNSPECIFIED" + }, { + no: 1, + name: "HEURISTIC_LINT_OVERLAP" + }, { + no: 2, + name: "HEURISTIC_LINES_MISMATCH" + }]); + qys = class S6e extends N { + constructor(e) { + super(); + this.requestId = ""; + this.eventType = { + case: undefined + }; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.BugBotEvent"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "request_id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "started", + kind: "message", + T: jys, + oneof: "event_type" + }, { + no: 3, + name: "reports_generated", + kind: "message", + T: zys, + oneof: "event_type" + }, { + no: 4, + name: "pressed_fix_in_composer", + kind: "message", + T: Jys, + oneof: "event_type" + }, { + no: 5, + name: "pressed_open_in_editor", + kind: "message", + T: Kys, + oneof: "event_type" + }, { + no: 6, + name: "viewed_report", + kind: "message", + T: Yys, + oneof: "event_type" + }, { + no: 7, + name: "user_feedback", + kind: "message", + T: Xys, + oneof: "event_type" + }, { + no: 8, + name: "pressed_add_to_chat", + kind: "message", + T: Gys, + oneof: "event_type" + }, { + no: 9, + name: "background_interval_started", + kind: "message", + T: Qys, + oneof: "event_type" + }, { + no: 10, + name: "background_interval_ended", + kind: "message", + T: Zys, + oneof: "event_type" + }, { + no: 11, + name: "background_interval_interrupted", + kind: "message", + T: ews, + oneof: "event_type" + }, { + no: 12, + name: "background_interval_errored", + kind: "message", + T: tws, + oneof: "event_type" + }]); + } + static fromBinary(e, t) { + return new S6e().fromBinary(e, t); + } + static fromJson(e, t) { + return new S6e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new S6e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(S6e, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.DISABLED = 1] = "DISABLED"; + i[i.TOO_RECENT = 2] = "TOO_RECENT"; + i[i.UNVIEWED_BUG_REPORTS = 3] = "UNVIEWED_BUG_REPORTS"; + i[i.NOT_IN_GIT_REPO = 4] = "NOT_IN_GIT_REPO"; + i[i.DEFAULT_BRANCH_IS_NOT_CURRENT_BRANCH = 5] = "DEFAULT_BRANCH_IS_NOT_CURRENT_BRANCH"; + i[i.NO_GIT_USER = 6] = "NO_GIT_USER"; + i[i.NO_LAST_COMMIT = 7] = "NO_LAST_COMMIT"; + i[i.LAST_COMMIT_NOT_MADE_BY_USER = 8] = "LAST_COMMIT_NOT_MADE_BY_USER"; + i[i.LAST_COMMIT_TOO_OLD = 9] = "LAST_COMMIT_TOO_OLD"; + i[i.DIFF_TOO_LONG = 10] = "DIFF_TOO_LONG"; + i[i.DIFF_TOO_SHORT = 11] = "DIFF_TOO_SHORT"; + i[i.TELEMETRY_UNHEALTHY = 12] = "TELEMETRY_UNHEALTHY"; + })(m1 ||= {}); + m.util.setEnumType(m1, "aiserver.v1.BugBotEvent.BackgroundIntervalInterruptedReason", [{ + no: 0, + name: "BACKGROUND_INTERVAL_INTERRUPTED_REASON_UNSPECIFIED" + }, { + no: 1, + name: "BACKGROUND_INTERVAL_INTERRUPTED_REASON_DISABLED" + }, { + no: 2, + name: "BACKGROUND_INTERVAL_INTERRUPTED_REASON_TOO_RECENT" + }, { + no: 3, + name: "BACKGROUND_INTERVAL_INTERRUPTED_REASON_UNVIEWED_BUG_REPORTS" + }, { + no: 4, + name: "BACKGROUND_INTERVAL_INTERRUPTED_REASON_NOT_IN_GIT_REPO" + }, { + no: 5, + name: "BACKGROUND_INTERVAL_INTERRUPTED_REASON_DEFAULT_BRANCH_IS_NOT_CURRENT_BRANCH" + }, { + no: 6, + name: "BACKGROUND_INTERVAL_INTERRUPTED_REASON_NO_GIT_USER" + }, { + no: 7, + name: "BACKGROUND_INTERVAL_INTERRUPTED_REASON_NO_LAST_COMMIT" + }, { + no: 8, + name: "BACKGROUND_INTERVAL_INTERRUPTED_REASON_LAST_COMMIT_NOT_MADE_BY_USER" + }, { + no: 9, + name: "BACKGROUND_INTERVAL_INTERRUPTED_REASON_LAST_COMMIT_TOO_OLD" + }, { + no: 10, + name: "BACKGROUND_INTERVAL_INTERRUPTED_REASON_DIFF_TOO_LONG" + }, { + no: 11, + name: "BACKGROUND_INTERVAL_INTERRUPTED_REASON_DIFF_TOO_SHORT" + }, { + no: 12, + name: "BACKGROUND_INTERVAL_INTERRUPTED_REASON_TELEMETRY_UNHEALTHY" + }]); + jys = class x6e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.BugBotEvent.Started"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new x6e().fromBinary(e, t); + } + static fromJson(e, t) { + return new x6e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new x6e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(x6e, e, t); + } + }; + zys = class k6e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.BugBotEvent.ReportsGenerated"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "bug_reports", + kind: "message", + T: Lqt + }]); + } + static fromBinary(e, t) { + return new k6e().fromBinary(e, t); + } + static fromJson(e, t) { + return new k6e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new k6e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(k6e, e, t); + } + }; + Jys = class E6e extends N { + constructor(e) { + super(); + this.bugReportId = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.BugBotEvent.PressedFixInComposer"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "bug_report_id", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new E6e().fromBinary(e, t); + } + static fromJson(e, t) { + return new E6e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new E6e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(E6e, e, t); + } + }; + Gys = class I6e extends N { + constructor(e) { + super(); + this.bugReportId = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.BugBotEvent.PressedAddToChat"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "bug_report_id", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new I6e().fromBinary(e, t); + } + static fromJson(e, t) { + return new I6e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new I6e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(I6e, e, t); + } + }; + Kys = class D6e extends N { + constructor(e) { + super(); + this.bugReportId = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.BugBotEvent.PressedOpenInEditor"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "bug_location", + kind: "message", + T: Kut + }, { + no: 2, + name: "bug_report_id", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new D6e().fromBinary(e, t); + } + static fromJson(e, t) { + return new D6e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new D6e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(D6e, e, t); + } + }; + Yys = class T6e extends N { + constructor(e) { + super(); + this.secondsViewed = 0; + this.reportViews = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.BugBotEvent.ViewedReport"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "seconds_viewed", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "report_views", + kind: "message", + T: mjt, + repeated: true + }]); + } + static fromBinary(e, t) { + return new T6e().fromBinary(e, t); + } + static fromJson(e, t) { + return new T6e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new T6e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(T6e, e, t); + } + }; + mjt = class P6e extends N { + constructor(e) { + super(); + this.bugReportId = ""; + this.viewPercentage = 0; + this.textPercentage = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.BugBotEvent.ViewedReport.ReportView"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "bug_report_id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "view_percentage", + kind: "scalar", + T: 1 + }, { + no: 3, + name: "text_percentage", + kind: "scalar", + T: 1 + }]); + } + static fromBinary(e, t) { + return new P6e().fromBinary(e, t); + } + static fromJson(e, t) { + return new P6e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new P6e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(P6e, e, t); + } + }; + Xys = class L6e extends N { + constructor(e) { + super(); + this.bugReportId = ""; + this.feedback = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.BugBotEvent.UserFeedback"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "bug_report_id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "feedback", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new L6e().fromBinary(e, t); + } + static fromJson(e, t) { + return new L6e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new L6e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(L6e, e, t); + } + }; + Qys = class R6e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.BugBotEvent.BackgroundIntervalStarted"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new R6e().fromBinary(e, t); + } + static fromJson(e, t) { + return new R6e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new R6e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(R6e, e, t); + } + }; + Zys = class N6e extends N { + constructor(e) { + super(); + this.success = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.BugBotEvent.BackgroundIntervalEnded"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "success", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new N6e().fromBinary(e, t); + } + static fromJson(e, t) { + return new N6e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new N6e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(N6e, e, t); + } + }; + ews = class M6e extends N { + constructor(e) { + super(); + this.reason = m1.UNSPECIFIED; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.BugBotEvent.BackgroundIntervalInterrupted"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "reason", + kind: "enum", + T: m.getEnumType(m1) + }]); + } + static fromBinary(e, t) { + return new M6e().fromBinary(e, t); + } + static fromJson(e, t) { + return new M6e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new M6e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(M6e, e, t); + } + }; + tws = class A6e extends N { + constructor(e) { + super(); + this.errorMessage = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.BugBotEvent.BackgroundIntervalErrored"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "error_message", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new A6e().fromBinary(e, t); + } + static fromJson(e, t) { + return new A6e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new A6e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(A6e, e, t); + } + }; + iws = class $6e extends N { + constructor(e) { + super(); + this.requestType = r5.UNSPECIFIED; + this.requestId = ""; + this.source = Ox.UNSPECIFIED; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.AiRequestEvent"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "request_type", + kind: "enum", + T: m.getEnumType(r5) + }, { + no: 2, + name: "request_id", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "source", + kind: "enum", + T: m.getEnumType(Ox) + }]); + } + static fromBinary(e, t) { + return new $6e().fromBinary(e, t); + } + static fromJson(e, t) { + return new $6e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new $6e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals($6e, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.START = 1] = "START"; + i[i.END = 2] = "END"; + })(r5 ||= {}); + m.util.setEnumType(r5, "aiserver.v1.AiRequestEvent.RequestType", [{ + no: 0, + name: "REQUEST_TYPE_UNSPECIFIED" + }, { + no: 1, + name: "REQUEST_TYPE_START" + }, { + no: 2, + name: "REQUEST_TYPE_END" + }]); + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.CHAT = 1] = "CHAT"; + i[i.CMDK = 2] = "CMDK"; + i[i.APPLY = 3] = "APPLY"; + i[i.COMPOSER = 4] = "COMPOSER"; + i[i.TASK = 5] = "TASK"; + i[i.CODE_INTERPRETER = 6] = "CODE_INTERPRETER"; + i[i.INTERPRETER_EXECUTION = 7] = "INTERPRETER_EXECUTION"; + })(Ox ||= {}); + m.util.setEnumType(Ox, "aiserver.v1.AiRequestEvent.Source", [{ + no: 0, + name: "SOURCE_UNSPECIFIED" + }, { + no: 1, + name: "SOURCE_CHAT" + }, { + no: 2, + name: "SOURCE_CMDK" + }, { + no: 3, + name: "SOURCE_APPLY" + }, { + no: 4, + name: "SOURCE_COMPOSER" + }, { + no: 5, + name: "SOURCE_TASK" + }, { + no: 6, + name: "SOURCE_CODE_INTERPRETER" + }, { + no: 7, + name: "SOURCE_INTERPRETER_EXECUTION" + }]); + sws = class F6e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ModelOpenedEvent"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "point_in_time_model", + kind: "message", + T: Yv + }]); + } + static fromBinary(e, t) { + return new F6e().fromBinary(e, t); + } + static fromJson(e, t) { + return new F6e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new F6e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(F6e, e, t); + } + }; + nws = class O6e extends N { + constructor(e) { + super(); + this.files = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.BackgroundFilesEvent"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 2, + name: "files", + kind: "message", + T: rws, + repeated: true + }]); + } + static fromBinary(e, t) { + return new O6e().fromBinary(e, t); + } + static fromJson(e, t) { + return new O6e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new O6e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(O6e, e, t); + } + }; + rws = class _6e extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.contents = ""; + this.hash = ""; + this.fullPath = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.BackgroundFilesEvent.BackgroundFile"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "contents", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "hash", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "full_path", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new _6e().fromBinary(e, t); + } + static fromJson(e, t) { + return new _6e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new _6e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(_6e, e, t); + } + }; + ows = class B6e extends N { + constructor(e) { + super(); + this.visibleRanges = []; + this.editorId = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ScrollEvent"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "point_in_time_model", + kind: "message", + T: Yv + }, { + no: 2, + name: "visible_ranges", + kind: "message", + T: iD, + repeated: true + }, { + no: 3, + name: "editor_id", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new B6e().fromBinary(e, t); + } + static fromJson(e, t) { + return new B6e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new B6e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(B6e, e, t); + } + }; + aws = class U6e extends N { + constructor(e) { + super(); + this.editorId = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.EditorCloseEvent"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "editor_id", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new U6e().fromBinary(e, t); + } + static fromJson(e, t) { + return new U6e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new U6e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(U6e, e, t); + } + }; + lws = class W6e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.TabCloseEvent"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "point_in_time_model", + kind: "message", + T: gjt + }]); + } + static fromBinary(e, t) { + return new W6e().fromBinary(e, t); + } + static fromJson(e, t) { + return new W6e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new W6e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(W6e, e, t); + } + }; + cws = class V6e extends N { + constructor(e) { + super(); + this.fullUri = ""; + this.modelId = ""; + this.uriScheme = ""; + this.isTooLargeForSyncing = false; + this.isTooLargeForTokenization = false; + this.isTooLargeForHeapOperation = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ModelAddedEvent"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "point_in_time_model", + kind: "message", + T: gjt + }, { + no: 2, + name: "full_uri", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "model_id", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "uri_scheme", + kind: "scalar", + T: 9 + }, { + no: 5, + name: "is_too_large_for_syncing", + kind: "scalar", + T: 8 + }, { + no: 6, + name: "is_too_large_for_tokenization", + kind: "scalar", + T: 8 + }, { + no: 7, + name: "is_too_large_for_heap_operation", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new V6e().fromBinary(e, t); + } + static fromJson(e, t) { + return new V6e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new V6e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(V6e, e, t); + } + }; + uws = class H6e extends N { + constructor(e) { + super(); + this.item = { + case: undefined + }; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.AnythingQuickAccessItem"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "resource", + kind: "message", + T: dws, + oneof: "item" + }, { + no: 2, + name: "separator", + kind: "scalar", + T: 9, + oneof: "item" + }, { + no: 3, + name: "section", + kind: "scalar", + T: 9, + oneof: "item" + }]); + } + static fromBinary(e, t) { + return new H6e().fromBinary(e, t); + } + static fromJson(e, t) { + return new H6e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new H6e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(H6e, e, t); + } + }; + dws = class q6e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.AnythingQuickAccessItem.Resource"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "model", + kind: "message", + T: Yv, + opt: true + }, { + no: 2, + name: "range", + kind: "message", + T: iD, + opt: true + }, { + no: 3, + name: "uri", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new q6e().fromBinary(e, t); + } + static fromJson(e, t) { + return new q6e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new q6e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(q6e, e, t); + } + }; + hws = class j6e extends N { + constructor(e) { + super(); + this.query = ""; + this.items = []; + this.selectedIndices = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.AnythingQuickAccessSelectionEvent"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "query", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "items", + kind: "message", + T: uws, + repeated: true + }, { + no: 3, + name: "selected_indices", + kind: "scalar", + T: 5, + repeated: true + }]); + } + static fromBinary(e, t) { + return new j6e().fromBinary(e, t); + } + static fromJson(e, t) { + return new j6e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new j6e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(j6e, e, t); + } + }; + fws = class z6e extends N { + constructor(e) { + super(); + this.suggestions = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.LspSuggestionEvent"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "suggestions", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 2, + name: "request_id", + kind: "scalar", + T: 9, + opt: true + }, { + no: 3, + name: "editor_id", + kind: "scalar", + T: 9, + opt: true + }, { + no: 4, + name: "point_in_time_model", + kind: "message", + T: Yv + }]); + } + static fromBinary(e, t) { + return new z6e().fromBinary(e, t); + } + static fromJson(e, t) { + return new z6e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new z6e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(z6e, e, t); + } + }; + bdt = class J6e extends N { + constructor(e) { + super(); + this.event = { + case: undefined + }; + this.performanceNowTimestamp = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CppSessionEvent"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 2, + name: "accept_event", + kind: "message", + T: nys, + oneof: "event" + }, { + no: 3, + name: "reject_event", + kind: "message", + T: lys, + oneof: "event" + }, { + no: 4, + name: "manual_trigger_event", + kind: "message", + T: gys, + oneof: "event" + }, { + no: 6, + name: "stopped_tracking_model_event", + kind: "message", + T: pys, + oneof: "event" + }, { + no: 7, + name: "suggest_event", + kind: "message", + T: rys, + oneof: "event" + }, { + no: 8, + name: "linter_error_event", + kind: "message", + T: mys, + oneof: "event" + }, { + no: 9, + name: "debounced_cursor_movement_event", + kind: "message", + T: bys, + oneof: "event" + }, { + no: 10, + name: "editor_changed_event", + kind: "message", + T: vys, + oneof: "event" + }, { + no: 11, + name: "copy_event", + kind: "message", + T: yys, + oneof: "event" + }, { + no: 13, + name: "quick_action_event", + kind: "message", + T: Cys, + oneof: "event" + }, { + no: 14, + name: "quick_action_fire_event", + kind: "message", + T: Sys, + oneof: "event" + }, { + no: 15, + name: "model_opened_event", + kind: "message", + T: sws, + oneof: "event" + }, { + no: 17, + name: "cmd_k_event", + kind: "message", + T: xys, + oneof: "event" + }, { + no: 18, + name: "chat_event", + kind: "message", + T: Nys, + oneof: "event" + }, { + no: 19, + name: "ai_event", + kind: "message", + T: iws, + oneof: "event" + }, { + no: 21, + name: "scroll_event", + kind: "message", + T: ows, + oneof: "event" + }, { + no: 22, + name: "editor_close_event", + kind: "message", + T: aws, + oneof: "event" + }, { + no: 23, + name: "tab_close_event", + kind: "message", + T: lws, + oneof: "event" + }, { + no: 33, + name: "model_added_event", + kind: "message", + T: cws, + oneof: "event" + }, { + no: 26, + name: "partial_accept_event", + kind: "message", + T: uys, + oneof: "event" + }, { + no: 27, + name: "accept_cursor_prediction_event", + kind: "message", + T: hys, + oneof: "event" + }, { + no: 28, + name: "reject_cursor_prediction_event", + kind: "message", + T: fys, + oneof: "event" + }, { + no: 29, + name: "suggest_cursor_prediction_event", + kind: "message", + T: dys, + oneof: "event" + }, { + no: 30, + name: "cpp_trigger_event", + kind: "message", + T: oys, + oneof: "event" + }, { + no: 31, + name: "finished_cpp_generation_event", + kind: "message", + T: ays, + oneof: "event" + }, { + no: 32, + name: "bug_bot_event", + kind: "message", + T: qys, + oneof: "event" + }, { + no: 34, + name: "bug_bot_linter_event", + kind: "message", + T: Fys, + oneof: "event" + }, { + no: 35, + name: "anything_quick_access_selection_event", + kind: "message", + T: hws, + oneof: "event" + }, { + no: 36, + name: "lsp_suggestion_event", + kind: "message", + T: fws, + oneof: "event" + }, { + no: 37, + name: "ntp_event", + kind: "message", + T: Ews, + oneof: "event" + }, { + no: 38, + name: "repo_event", + kind: "message", + T: Iws, + oneof: "event" + }, { + no: 16, + name: "background_files_event", + kind: "message", + T: nws, + oneof: "event" + }, { + no: 5, + name: "performance_now_timestamp", + kind: "scalar", + T: 1 + }, { + no: 25, + name: "performance_time_origin", + kind: "scalar", + T: 1, + opt: true + }]); + } + static fromBinary(e, t) { + return new J6e().fromBinary(e, t); + } + static fromJson(e, t) { + return new J6e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new J6e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(J6e, e, t); + } + }; + gws = class G6e extends N { + constructor(e) { + super(); + this.changes = new Uint8Array(0); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CppAppendRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "changes", + kind: "scalar", + T: 12 + }]); + } + static fromBinary(e, t) { + return new G6e().fromBinary(e, t); + } + static fromJson(e, t) { + return new G6e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new G6e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(G6e, e, t); + } + }; + pws = class K6e extends N { + constructor(e) { + super(); + this.success = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CppAppendResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "success", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new K6e().fromBinary(e, t); + } + static fromJson(e, t) { + return new K6e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new K6e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(K6e, e, t); + } + }; + bjt = class Y6e extends N { + constructor(e) { + super(); + this.sessionId = ""; + this.modelUuid = ""; + this.relativePath = ""; + this.uri = ""; + this.clientVersion = ""; + this.changes = []; + this.sessionEvents = []; + this.modelChangesMayBeOutOfOrder = false; + this.privacyModeStatus = o5.UNSPECIFIED; + this.events = []; + this.timeOrigin = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.EditHistoryAppendChangesRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "session_id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "model_uuid", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "starting_model_value", + kind: "scalar", + T: 9, + opt: true + }, { + no: 10, + name: "starting_model_version", + kind: "scalar", + T: 5, + opt: true + }, { + no: 5, + name: "relative_path", + kind: "scalar", + T: 9 + }, { + no: 14, + name: "uri", + kind: "scalar", + T: 9 + }, { + no: 6, + name: "client_version", + kind: "scalar", + T: 9 + }, { + no: 8, + name: "client_commit", + kind: "scalar", + T: 9, + opt: true + }, { + no: 4, + name: "changes", + kind: "message", + T: Xz, + repeated: true + }, { + no: 9, + name: "session_events", + kind: "message", + T: bdt, + repeated: true + }, { + no: 11, + name: "model_changes_may_be_out_of_order", + kind: "scalar", + T: 8 + }, { + no: 12, + name: "privacy_mode_status", + kind: "enum", + T: m.getEnumType(o5) + }, { + no: 7, + name: "events", + kind: "message", + T: wws, + repeated: true + }, { + no: 13, + name: "time_origin", + kind: "scalar", + T: 2 + }]); + } + static fromBinary(e, t) { + return new Y6e().fromBinary(e, t); + } + static fromJson(e, t) { + return new Y6e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Y6e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Y6e, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.PRIVACY_ENABLED = 1] = "PRIVACY_ENABLED"; + i[i.IMPLICIT_NO_PRIVACY = 2] = "IMPLICIT_NO_PRIVACY"; + i[i.EXPLICIT_NO_PRIVACY = 3] = "EXPLICIT_NO_PRIVACY"; + })(o5 ||= {}); + m.util.setEnumType(o5, "aiserver.v1.EditHistoryAppendChangesRequest.PrivacyModeStatus", [{ + no: 0, + name: "PRIVACY_MODE_STATUS_UNSPECIFIED" + }, { + no: 1, + name: "PRIVACY_MODE_STATUS_PRIVACY_ENABLED" + }, { + no: 2, + name: "PRIVACY_MODE_STATUS_IMPLICIT_NO_PRIVACY" + }, { + no: 3, + name: "PRIVACY_MODE_STATUS_EXPLICIT_NO_PRIVACY" + }]); + mws = class X6e extends N { + constructor(e) { + super(); + this.success = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.EditHistoryAppendChangesResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "success", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new X6e().fromBinary(e, t); + } + static fromJson(e, t) { + return new X6e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new X6e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(X6e, e, t); + } + }; + vjt = class Q6e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CppEditHistoryStatusRequest"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new Q6e().fromBinary(e, t); + } + static fromJson(e, t) { + return new Q6e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Q6e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Q6e, e, t); + } + }; + yjt = class Z6e extends N { + constructor(e) { + super(); + this.on = false; + this.onlyIfExplicit = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CppEditHistoryStatusResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "on", + kind: "scalar", + T: 8 + }, { + no: 2, + name: "only_if_explicit", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new Z6e().fromBinary(e, t); + } + static fromJson(e, t) { + return new Z6e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Z6e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Z6e, e, t); + } + }; + bws = class e8e extends N { + constructor(e) { + super(); + this.relativePath = ""; + this.startingContents = ""; + this.beforeStartModelChanges = []; + this.clientVersion = ""; + this.modelUuid = ""; + this.sessionId = ""; + this.uri = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StartingModel"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "starting_contents", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "starting_model_version", + kind: "scalar", + T: 5, + opt: true + }, { + no: 4, + name: "before_start_model_changes", + kind: "message", + T: Xz, + repeated: true + }, { + no: 5, + name: "client_version", + kind: "scalar", + T: 9 + }, { + no: 6, + name: "client_commit", + kind: "scalar", + T: 9, + opt: true + }, { + no: 7, + name: "model_uuid", + kind: "scalar", + T: 9 + }, { + no: 8, + name: "session_id", + kind: "scalar", + T: 9 + }, { + no: 9, + name: "uri", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new e8e().fromBinary(e, t); + } + static fromJson(e, t) { + return new e8e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new e8e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(e8e, e, t); + } + }; + vdt = class t8e extends N { + constructor(e) { + super(); + this.changes = []; + this.relativePath = ""; + this.modelUuid = ""; + this.startFromChangeIndex = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.BlockDiffPatch"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "start_model_window", + kind: "message", + T: yws + }, { + no: 3, + name: "changes", + kind: "message", + T: vws, + repeated: true + }, { + no: 4, + name: "relative_path", + kind: "scalar", + T: 9 + }, { + no: 7, + name: "model_uuid", + kind: "scalar", + T: 9 + }, { + no: 5, + name: "start_from_change_index", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new t8e().fromBinary(e, t); + } + static fromJson(e, t) { + return new t8e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new t8e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(t8e, e, t); + } + }; + vws = class i8e extends N { + constructor(e) { + super(); + this.text = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.BlockDiffPatch.Change"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "text", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "range", + kind: "message", + T: iD + }]); + } + static fromBinary(e, t) { + return new i8e().fromBinary(e, t); + } + static fromJson(e, t) { + return new i8e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new i8e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(i8e, e, t); + } + }; + yws = class s8e extends N { + constructor(e) { + super(); + this.lines = []; + this.startLineNumber = 0; + this.endLineNumber = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.BlockDiffPatch.ModelWindow"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "lines", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 2, + name: "start_line_number", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "end_line_number", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new s8e().fromBinary(e, t); + } + static fromJson(e, t) { + return new s8e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new s8e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(s8e, e, t); + } + }; + wws = class n8e extends N { + constructor(e) { + super(); + this.event = { + case: undefined + }; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CppHistoryAppendEvent"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "model_change", + kind: "message", + T: Xz, + oneof: "event" + }, { + no: 2, + name: "accept_event", + kind: "message", + T: Sws, + oneof: "event" + }, { + no: 3, + name: "reject_event", + kind: "message", + T: xws, + oneof: "event" + }, { + no: 4, + name: "manual_trigger_event", + kind: "message", + T: Cws, + oneof: "event" + }, { + no: 10, + name: "final_model_hash", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new n8e().fromBinary(e, t); + } + static fromJson(e, t) { + return new n8e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new n8e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(n8e, e, t); + } + }; + Cws = class r8e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CppManualTriggerEvent"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 2, + name: "position", + kind: "message", + T: sv + }]); + } + static fromBinary(e, t) { + return new r8e().fromBinary(e, t); + } + static fromJson(e, t) { + return new r8e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new r8e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(r8e, e, t); + } + }; + Sws = class o8e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CppAcceptEvent"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "cpp_suggestion", + kind: "message", + T: wjt + }]); + } + static fromBinary(e, t) { + return new o8e().fromBinary(e, t); + } + static fromJson(e, t) { + return new o8e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new o8e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(o8e, e, t); + } + }; + xws = class a8e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CppRejectEvent"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "cpp_suggestion", + kind: "message", + T: wjt + }]); + } + static fromBinary(e, t) { + return new a8e().fromBinary(e, t); + } + static fromJson(e, t) { + return new a8e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new a8e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(a8e, e, t); + } + }; + wjt = class l8e extends N { + constructor(e) { + super(); + this.suggestionText = ""; + this.seen = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CppSuggestion"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "suggestion_text", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "range", + kind: "message", + T: iD + }, { + no: 5, + name: "seen", + kind: "scalar", + T: 8 + }, { + no: 6, + name: "editor_selection_before_peek", + kind: "message", + T: Whs + }, { + no: 7, + name: "binding_id", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new l8e().fromBinary(e, t); + } + static fromJson(e, t) { + return new l8e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new l8e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(l8e, e, t); + } + }; + ktr = class c8e extends N { + constructor(e) { + super(); + this.changes = []; + this.modelUuid = ""; + this.numCorrectChanges = 0; + this.numUnvalidatedChanges = 0; + this.numIncorrectChanges = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ModelWithHistory"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "changes", + kind: "message", + T: Xz, + repeated: true + }, { + no: 2, + name: "model_uuid", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "starting_model", + kind: "message", + T: bws + }, { + no: 4, + name: "num_correct_changes", + kind: "scalar", + T: 5 + }, { + no: 5, + name: "num_unvalidated_changes", + kind: "scalar", + T: 5 + }, { + no: 6, + name: "num_incorrect_changes", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new c8e().fromBinary(e, t); + } + static fromJson(e, t) { + return new c8e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new c8e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(c8e, e, t); + } + }; + Etr = class u8e extends N { + constructor(e) { + super(); + this.timestamp = 0; + this.v = { + case: undefined + }; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CppTimelineEvent"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "timestamp", + kind: "scalar", + T: 1 + }, { + no: 2, + name: "event", + kind: "message", + T: bdt, + oneof: "v" + }, { + no: 3, + name: "change", + kind: "message", + T: kws, + oneof: "v" + }]); + } + static fromBinary(e, t) { + return new u8e().fromBinary(e, t); + } + static fromJson(e, t) { + return new u8e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new u8e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(u8e, e, t); + } + }; + kws = class d8e extends N { + constructor(e) { + super(); + this.modelUuid = ""; + this.changeIndex = 0; + this.status = yve.UNSPECIFIED; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CppTimelineEvent.Change"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "model_uuid", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "change_index", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "change", + kind: "message", + T: Xz + }, { + no: 4, + name: "status", + kind: "enum", + T: m.getEnumType(yve) + }]); + } + static fromBinary(e, t) { + return new d8e().fromBinary(e, t); + } + static fromJson(e, t) { + return new d8e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new d8e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(d8e, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.CORRECT = 1] = "CORRECT"; + i[i.UNVALIDATED = 2] = "UNVALIDATED"; + i[i.INCORRECT = 3] = "INCORRECT"; + })(yve ||= {}); + m.util.setEnumType(yve, "aiserver.v1.CppTimelineEvent.Change.Status", [{ + no: 0, + name: "STATUS_UNSPECIFIED" + }, { + no: 1, + name: "STATUS_CORRECT" + }, { + no: 2, + name: "STATUS_UNVALIDATED" + }, { + no: 3, + name: "STATUS_INCORRECT" + }]); + Ews = class h8e extends N { + constructor(e) { + super(); + this.originateTimestamp = 0; + this.receiveTimestamp = 0; + this.transmitTimestamp = 0; + this.destinationTimestamp = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.NtpEvent"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "originate_timestamp", + kind: "scalar", + T: 1 + }, { + no: 2, + name: "receive_timestamp", + kind: "scalar", + T: 1 + }, { + no: 3, + name: "transmit_timestamp", + kind: "scalar", + T: 1 + }, { + no: 4, + name: "destination_timestamp", + kind: "scalar", + T: 1 + }]); + } + static fromBinary(e, t) { + return new h8e().fromBinary(e, t); + } + static fromJson(e, t) { + return new h8e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new h8e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(h8e, e, t); + } + }; + Iws = class f8e extends N { + constructor(e) { + super(); + this.repoOwner = ""; + this.repoName = ""; + this.eventType = cE.UNSPECIFIED; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RepoEvent"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "repo_owner", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "repo_name", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "event_type", + kind: "enum", + T: m.getEnumType(cE) + }]); + } + static fromBinary(e, t) { + return new f8e().fromBinary(e, t); + } + static fromJson(e, t) { + return new f8e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new f8e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(f8e, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.SYNCED = 1] = "SYNCED"; + i[i.LOADING = 2] = "LOADING"; + i[i.INDEXING_SETUP = 3] = "INDEXING_SETUP"; + i[i.INDEXING_INIT_FROM_SIMILAR_CODEBASE = 4] = "INDEXING_INIT_FROM_SIMILAR_CODEBASE"; + i[i.PAUSED = 5] = "PAUSED"; + i[i.INDEXING = 6] = "INDEXING"; + i[i.ERROR = 7] = "ERROR"; + i[i.NOT_AUTO_INDEXING = 8] = "NOT_AUTO_INDEXING"; + i[i.NOT_INDEXED = 9] = "NOT_INDEXED"; + })(cE ||= {}); + m.util.setEnumType(cE, "aiserver.v1.RepoEvent.Type", [{ + no: 0, + name: "TYPE_UNSPECIFIED" + }, { + no: 1, + name: "TYPE_SYNCED" + }, { + no: 2, + name: "TYPE_LOADING" + }, { + no: 3, + name: "TYPE_INDEXING_SETUP" + }, { + no: 4, + name: "TYPE_INDEXING_INIT_FROM_SIMILAR_CODEBASE" + }, { + no: 5, + name: "TYPE_PAUSED" + }, { + no: 6, + name: "TYPE_INDEXING" + }, { + no: 7, + name: "TYPE_ERROR" + }, { + no: 8, + name: "TYPE_NOT_AUTO_INDEXING" + }, { + no: 9, + name: "TYPE_NOT_INDEXED" + }]); + } +}); +var j7; +var wve; +var Cve; +var Dws; +var Sve; +var xve; +var ydt; +var Tws; +var Pws; +var Lws; +var Cjt; +var Rws; +var Sjt; +var Nws; +var wdt; +var xjt; +var Mws; +var Aws; +var $ws; +var Fws; +var Ows; +var _ws; +var Bws; +var kjt; +var Uws; +var Wws; +var Vws; +var Hws; +var qws; +var jws; +var Yie; +var Dh; +var zws; +var Jws; +var nv; +var Gws; +var Itr; +var Kws; +var Yws; +var Xws; +var Qws; +var Zws; +var e0s; +var t0s; +var Dtr; +var i0s; +var s0s; +var n0s; +var r0s; +var o0s; +var a0s; +var l0s; +var c0s; +var u0s; +var Xv = ue({ + "out-build/proto/aiserver/v1/context_pb.js"() { + "use strict"; + + Hr(); + Wo(); + uS(); + njt(); + j7 = class g8e extends N { + constructor(e) { + super(); + this.item = { + case: undefined + }; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.PotentiallyCachedContextItem"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "context_item", + kind: "message", + T: xve, + oneof: "item" + }, { + no: 2, + name: "context_item_hash", + kind: "scalar", + T: 9, + oneof: "item" + }]); + } + static fromBinary(e, t) { + return new g8e().fromBinary(e, t); + } + static fromJson(e, t) { + return new g8e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new g8e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(g8e, e, t); + } + }; + wve = class p8e extends N { + constructor(e) { + super(); + this.contextItemStatuses = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ContextStatusUpdate"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "context_item_statuses", + kind: "message", + T: Dws, + repeated: true + }]); + } + static fromBinary(e, t) { + return new p8e().fromBinary(e, t); + } + static fromJson(e, t) { + return new p8e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new p8e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(p8e, e, t); + } + }; + Cve = class m8e extends N { + constructor(e) { + super(); + this.missingContextItemHashes = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.MissingContextItems"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 2, + name: "missing_context_item_hashes", + kind: "scalar", + T: 9, + repeated: true + }]); + } + static fromBinary(e, t) { + return new m8e().fromBinary(e, t); + } + static fromJson(e, t) { + return new m8e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new m8e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(m8e, e, t); + } + }; + Dws = class b8e extends N { + constructor(e) { + super(); + this.contextItemHash = ""; + this.shownToTheModel = false; + this.score = 0; + this.percentageOfAvailableSpace = 0; + this.postGenerationEvaluation = Sve.UNSPECIFIED; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ContextItemStatus"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "context_item_hash", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "shown_to_the_model", + kind: "scalar", + T: 8 + }, { + no: 3, + name: "score", + kind: "scalar", + T: 2 + }, { + no: 4, + name: "percentage_of_available_space", + kind: "scalar", + T: 2 + }, { + no: 5, + name: "post_generation_evaluation", + kind: "enum", + T: m.getEnumType(Sve) + }]); + } + static fromBinary(e, t) { + return new b8e().fromBinary(e, t); + } + static fromJson(e, t) { + return new b8e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new b8e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(b8e, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.USEFUL = 1] = "USEFUL"; + i[i.USELESS = 2] = "USELESS"; + })(Sve ||= {}); + m.util.setEnumType(Sve, "aiserver.v1.ContextItemStatus.PostGenerationEvaluation", [{ + no: 0, + name: "POST_GENERATION_EVALUATION_UNSPECIFIED" + }, { + no: 1, + name: "POST_GENERATION_EVALUATION_USEFUL" + }, { + no: 2, + name: "POST_GENERATION_EVALUATION_USELESS" + }]); + xve = class v8e extends N { + constructor(e) { + super(); + this.item = { + case: undefined + }; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ContextItem"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "intent", + kind: "message", + T: Yie + }, { + no: 2, + name: "file_chunk", + kind: "message", + T: ydt, + oneof: "item" + }, { + no: 3, + name: "outline_chunk", + kind: "message", + T: Lws, + oneof: "item" + }, { + no: 4, + name: "cmd_k_selection", + kind: "message", + T: Cjt, + oneof: "item" + }, { + no: 5, + name: "cmd_k_immediate_context", + kind: "message", + T: Sjt, + oneof: "item" + }, { + no: 6, + name: "cmd_k_query", + kind: "message", + T: wdt, + oneof: "item" + }, { + no: 7, + name: "cmd_k_query_history", + kind: "message", + T: Aws, + oneof: "item" + }, { + no: 8, + name: "custom_instructions", + kind: "message", + T: Bws, + oneof: "item" + }, { + no: 9, + name: "go_to_definition_result", + kind: "message", + T: kjt, + oneof: "item" + }, { + no: 10, + name: "documentation_chunk", + kind: "message", + T: Uws, + oneof: "item" + }, { + no: 11, + name: "lints", + kind: "message", + T: Wws, + oneof: "item" + }, { + no: 12, + name: "chat_history", + kind: "message", + T: Ows, + oneof: "item" + }, { + no: 13, + name: "notebook_cell_output", + kind: "message", + T: Hws, + oneof: "item" + }, { + no: 14, + name: "terminal_history", + kind: "message", + T: _ws, + oneof: "item" + }, { + no: 15, + name: "terminal_cmd_k_query", + kind: "message", + T: xjt, + oneof: "item" + }, { + no: 16, + name: "terminal_cmd_k_query_history", + kind: "message", + T: Mws, + oneof: "item" + }, { + no: 17, + name: "sparse_file_chunk", + kind: "message", + T: Tws, + oneof: "item" + }, { + no: 18, + name: "lsp_subgraph_chunk", + kind: "message", + T: qws, + oneof: "item" + }, { + no: 19, + name: "commit_note_chunk", + kind: "message", + T: jws, + oneof: "item" + }, { + no: 20, + name: "file_diff_history", + kind: "message", + T: Rws, + oneof: "item" + }, { + no: 21, + name: "cmd_k_query_history_in_diff_session", + kind: "message", + T: $ws, + oneof: "item" + }, { + no: 22, + name: "project_rule", + kind: "message", + T: XT, + oneof: "item" + }]); + } + static fromBinary(e, t) { + return new v8e().fromBinary(e, t); + } + static fromJson(e, t) { + return new v8e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new v8e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(v8e, e, t); + } + }; + ydt = class y8e extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.chunkContents = ""; + this.startLineNumber = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ContextItem.FileChunk"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "chunk_contents", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "start_line_number", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new y8e().fromBinary(e, t); + } + static fromJson(e, t) { + return new y8e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new y8e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(y8e, e, t); + } + }; + Tws = class w8e extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.lines = []; + this.totalNumberOfLinesInFile = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ContextItem.SparseFileChunk"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "lines", + kind: "message", + T: Pws, + repeated: true + }, { + no: 3, + name: "total_number_of_lines_in_file", + kind: "scalar", + T: 5 + }, { + no: 4, + name: "cell_number", + kind: "scalar", + T: 5, + opt: true + }]); + } + static fromBinary(e, t) { + return new w8e().fromBinary(e, t); + } + static fromJson(e, t) { + return new w8e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new w8e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(w8e, e, t); + } + }; + Pws = class C8e extends N { + constructor(e) { + super(); + this.line = ""; + this.lineNumber = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ContextItem.SparseFileChunk.Line"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "line", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "line_number", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new C8e().fromBinary(e, t); + } + static fromJson(e, t) { + return new C8e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new C8e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(C8e, e, t); + } + }; + Lws = class S8e extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.contents = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ContextItem.OutlineChunk"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "contents", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "full_range", + kind: "message", + T: Kv + }]); + } + static fromBinary(e, t) { + return new S8e().fromBinary(e, t); + } + static fromJson(e, t) { + return new S8e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new S8e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(S8e, e, t); + } + }; + Cjt = class x8e extends N { + constructor(e) { + super(); + this.lines = []; + this.startLineNumber = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ContextItem.CmdKSelection"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "lines", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 2, + name: "start_line_number", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new x8e().fromBinary(e, t); + } + static fromJson(e, t) { + return new x8e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new x8e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(x8e, e, t); + } + }; + Rws = class k8e extends N { + constructor(e) { + super(); + this.howManyDiffsAgo = 0; + this.isVeryRecent = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ContextItem.FileDiffHistory"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "cpp_file_diff_history", + kind: "message", + T: Fx + }, { + no: 2, + name: "how_many_diffs_ago", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "is_very_recent", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new k8e().fromBinary(e, t); + } + static fromJson(e, t) { + return new k8e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new k8e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(k8e, e, t); + } + }; + Sjt = class E8e extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.lines = []; + this.totalNumberOfLinesInFile = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ContextItem.CmdKImmediateContext"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "lines", + kind: "message", + T: Nws, + repeated: true + }, { + no: 3, + name: "total_number_of_lines_in_file", + kind: "scalar", + T: 5 + }, { + no: 4, + name: "cell_number", + kind: "scalar", + T: 5, + opt: true + }]); + } + static fromBinary(e, t) { + return new E8e().fromBinary(e, t); + } + static fromJson(e, t) { + return new E8e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new E8e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(E8e, e, t); + } + }; + Nws = class I8e extends N { + constructor(e) { + super(); + this.line = ""; + this.lineNumber = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ContextItem.CmdKImmediateContext.Line"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "line", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "line_number", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new I8e().fromBinary(e, t); + } + static fromJson(e, t) { + return new I8e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new I8e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(I8e, e, t); + } + }; + wdt = class D8e extends N { + constructor(e) { + super(); + this.query = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ContextItem.CmdKQuery"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "query", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new D8e().fromBinary(e, t); + } + static fromJson(e, t) { + return new D8e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new D8e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(D8e, e, t); + } + }; + xjt = class T8e extends N { + constructor(e) { + super(); + this.query = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ContextItem.TerminalCmdKQuery"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "query", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new T8e().fromBinary(e, t); + } + static fromJson(e, t) { + return new T8e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new T8e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(T8e, e, t); + } + }; + Mws = class qde extends N { + constructor(e) { + super(); + this.contextItemHashes = []; + this.suggestedCommand = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ContextItem.TerminalCmdKQueryHistory"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "query", + kind: "message", + T: xjt + }, { + no: 2, + name: "query_history", + kind: "message", + T: qde + }, { + no: 5, + name: "context_item_hashes", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 6, + name: "suggested_command", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new qde().fromBinary(e, t); + } + static fromJson(e, t) { + return new qde().fromJson(e, t); + } + static fromJsonString(e, t) { + return new qde().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(qde, e, t); + } + }; + Aws = class jde extends N { + constructor(e) { + super(); + this.contextItemHashes = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ContextItem.CmdKQueryHistory"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "query", + kind: "message", + T: wdt + }, { + no: 2, + name: "immediate_context", + kind: "message", + T: Sjt + }, { + no: 3, + name: "selection", + kind: "message", + T: Cjt + }, { + no: 4, + name: "query_history", + kind: "message", + T: jde + }, { + no: 5, + name: "context_item_hashes", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 6, + name: "timestamp", + kind: "scalar", + T: 3, + opt: true + }, { + no: 7, + name: "timestamp_double", + kind: "scalar", + T: 1, + opt: true + }]); + } + static fromBinary(e, t) { + return new jde().fromBinary(e, t); + } + static fromJson(e, t) { + return new jde().fromJson(e, t); + } + static fromJsonString(e, t) { + return new jde().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(jde, e, t); + } + }; + $ws = class P8e extends N { + constructor(e) { + super(); + this.pastCmdkQueries = []; + this.currTimestampDouble = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ContextItem.CmdKQueryHistoryInDiffSession"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "past_cmdk_queries", + kind: "message", + T: Fws, + repeated: true + }, { + no: 3, + name: "curr_timestamp_double", + kind: "scalar", + T: 1 + }]); + } + static fromBinary(e, t) { + return new P8e().fromBinary(e, t); + } + static fromJson(e, t) { + return new P8e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new P8e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(P8e, e, t); + } + }; + Fws = class L8e extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.timestampDouble = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ContextItem.CmdKQueryHistoryInDiffSession.PastCmdKQueryInDiffSession"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "query", + kind: "message", + T: wdt + }, { + no: 2, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 5, + name: "cmdk_was_accepted", + kind: "scalar", + T: 8, + opt: true + }, { + no: 6, + name: "timestamp_double", + kind: "scalar", + T: 1 + }, { + no: 7, + name: "timestamp_for_diff_interleaving", + kind: "scalar", + T: 1, + opt: true + }, { + no: 8, + name: "request_id", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new L8e().fromBinary(e, t); + } + static fromJson(e, t) { + return new L8e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new L8e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(L8e, e, t); + } + }; + Ows = class zde extends N { + constructor(e) { + super(); + this.userMessage = ""; + this.assistantResponse = ""; + this.activeForCmdK = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ContextItem.ChatHistory"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "user_message", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "assistant_response", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "chat_history", + kind: "message", + T: zde + }, { + no: 4, + name: "active_for_cmd_k", + kind: "scalar", + T: 8 + }, { + no: 5, + name: "timestamp", + kind: "scalar", + T: 3, + opt: true + }, { + no: 6, + name: "timestamp_double", + kind: "scalar", + T: 1, + opt: true + }]); + } + static fromBinary(e, t) { + return new zde().fromBinary(e, t); + } + static fromJson(e, t) { + return new zde().fromJson(e, t); + } + static fromJsonString(e, t) { + return new zde().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(zde, e, t); + } + }; + _ws = class R8e extends N { + constructor(e) { + super(); + this.history = ""; + this.cwdFull = ""; + this.cwdRelativeWorkspacePath = ""; + this.activeForCmdK = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ContextItem.TerminalHistory"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "history", + kind: "scalar", + T: 9 + }, { + no: 5, + name: "cwd_full", + kind: "scalar", + T: 9 + }, { + no: 6, + name: "cwd_relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "active_for_cmd_k", + kind: "scalar", + T: 8 + }, { + no: 7, + name: "timestamp", + kind: "scalar", + T: 3, + opt: true + }, { + no: 8, + name: "timestamp_double", + kind: "scalar", + T: 1, + opt: true + }]); + } + static fromBinary(e, t) { + return new R8e().fromBinary(e, t); + } + static fromJson(e, t) { + return new R8e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new R8e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(R8e, e, t); + } + }; + Bws = class N8e extends N { + constructor(e) { + super(); + this.instructions = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ContextItem.CustomInstructions"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "instructions", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new N8e().fromBinary(e, t); + } + static fromJson(e, t) { + return new N8e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new N8e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(N8e, e, t); + } + }; + kjt = class M8e extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.line = ""; + this.lineNumber = 0; + this.columnNumber = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ContextItem.GoToDefinitionResult"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "line", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "line_number", + kind: "scalar", + T: 5 + }, { + no: 4, + name: "column_number", + kind: "scalar", + T: 5 + }, { + no: 5, + name: "definition_chunk", + kind: "message", + T: ydt + }]); + } + static fromBinary(e, t) { + return new M8e().fromBinary(e, t); + } + static fromJson(e, t) { + return new M8e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new M8e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(M8e, e, t); + } + }; + Uws = class A8e extends N { + constructor(e) { + super(); + this.docName = ""; + this.pageUrl = ""; + this.documentationChunk = ""; + this.score = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ContextItem.DocumentationChunk"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "doc_name", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "page_url", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "documentation_chunk", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "score", + kind: "scalar", + T: 2 + }]); + } + static fromBinary(e, t) { + return new A8e().fromBinary(e, t); + } + static fromJson(e, t) { + return new A8e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new A8e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(A8e, e, t); + } + }; + Wws = class $8e extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.lints = []; + this.contextLines = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ContextItem.Lints"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "lints", + kind: "message", + T: Yhs, + repeated: true + }, { + no: 3, + name: "context_lines", + kind: "message", + T: Vws, + repeated: true + }]); + } + static fromBinary(e, t) { + return new $8e().fromBinary(e, t); + } + static fromJson(e, t) { + return new $8e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new $8e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals($8e, e, t); + } + }; + Vws = class F8e extends N { + constructor(e) { + super(); + this.line = ""; + this.lineNumber = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ContextItem.Lints.Line"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "line", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "line_number", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new F8e().fromBinary(e, t); + } + static fromJson(e, t) { + return new F8e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new F8e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(F8e, e, t); + } + }; + Hws = class O8e extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.cellOutput = ""; + this.cellNumber = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ContextItem.NotebookCellOutput"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "cell_output", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "cell_number", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new O8e().fromBinary(e, t); + } + static fromJson(e, t) { + return new O8e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new O8e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(O8e, e, t); + } + }; + qws = class _8e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ContextItem.LspSubgraphChunk"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "lsp_subgraph_full_context", + kind: "message", + T: cdt + }]); + } + static fromBinary(e, t) { + return new _8e().fromBinary(e, t); + } + static fromJson(e, t) { + return new _8e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new _8e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(_8e, e, t); + } + }; + jws = class B8e extends N { + constructor(e) { + super(); + this.note = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ContextItem.CommitNoteChunk"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "note", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new B8e().fromBinary(e, t); + } + static fromJson(e, t) { + return new B8e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new B8e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(B8e, e, t); + } + }; + Yie = class U8e extends N { + constructor(e) { + super(); + this.type = Dh.UNSPECIFIED; + this.uuid = ""; + this.intent = { + case: undefined + }; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ContextIntent"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "type", + kind: "enum", + T: m.getEnumType(Dh) + }, { + no: 15, + name: "uuid", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "file", + kind: "message", + T: Jws, + oneof: "intent" + }, { + no: 3, + name: "code_selection", + kind: "message", + T: Gws, + oneof: "intent" + }, { + no: 5, + name: "lints", + kind: "message", + T: Yws, + oneof: "intent" + }, { + no: 6, + name: "recent_locations", + kind: "message", + T: Zws, + oneof: "intent" + }, { + no: 8, + name: "cmd_k_current_file", + kind: "message", + T: i0s, + oneof: "intent" + }, { + no: 9, + name: "cmd_k_query_etc", + kind: "message", + T: s0s, + oneof: "intent" + }, { + no: 14, + name: "terminal_cmd_k_defaults", + kind: "message", + T: l0s, + oneof: "intent" + }, { + no: 10, + name: "cmd_k_definitions", + kind: "message", + T: r0s, + oneof: "intent" + }, { + no: 11, + name: "documentation", + kind: "message", + T: zws, + oneof: "intent" + }, { + no: 12, + name: "custom_instructions", + kind: "message", + T: n0s, + oneof: "intent" + }, { + no: 13, + name: "chat_history", + kind: "message", + T: o0s, + oneof: "intent" + }, { + no: 16, + name: "terminal_history", + kind: "message", + T: c0s, + oneof: "intent" + }, { + no: 17, + name: "visible_tabs", + kind: "message", + T: t0s, + oneof: "intent" + }, { + no: 18, + name: "lsp_subgraph", + kind: "message", + T: u0s, + oneof: "intent" + }, { + no: 19, + name: "commit_notes", + kind: "message", + T: Kws, + oneof: "intent" + }, { + no: 20, + name: "diff_history", + kind: "message", + T: a0s, + oneof: "intent" + }, { + no: 21, + name: "past_cmdk_messages_in_diff_sessions", + kind: "message", + T: e0s, + oneof: "intent" + }]); + } + static fromBinary(e, t) { + return new U8e().fromBinary(e, t); + } + static fromJson(e, t) { + return new U8e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new U8e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(U8e, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.USER_ADDED = 1] = "USER_ADDED"; + i[i.AUTOMATIC = 2] = "AUTOMATIC"; + })(Dh ||= {}); + m.util.setEnumType(Dh, "aiserver.v1.ContextIntent.Type", [{ + no: 0, + name: "TYPE_UNSPECIFIED" + }, { + no: 1, + name: "TYPE_USER_ADDED" + }, { + no: 2, + name: "TYPE_AUTOMATIC" + }]); + zws = class W8e extends N { + constructor(e) { + super(); + this.documentationIdentifier = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ContextIntent.Documentation"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "documentation_identifier", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new W8e().fromBinary(e, t); + } + static fromJson(e, t) { + return new W8e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new W8e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(W8e, e, t); + } + }; + Jws = class V8e extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.mode = nv.UNSPECIFIED; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ContextIntent.File"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "mode", + kind: "enum", + T: m.getEnumType(nv) + }]); + } + static fromBinary(e, t) { + return new V8e().fromBinary(e, t); + } + static fromJson(e, t) { + return new V8e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new V8e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(V8e, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.FULL = 1] = "FULL"; + i[i.OUTLINE = 2] = "OUTLINE"; + i[i.CHUNKS = 3] = "CHUNKS"; + })(nv ||= {}); + m.util.setEnumType(nv, "aiserver.v1.ContextIntent.File.Mode", [{ + no: 0, + name: "MODE_UNSPECIFIED" + }, { + no: 1, + name: "MODE_FULL" + }, { + no: 2, + name: "MODE_OUTLINE" + }, { + no: 3, + name: "MODE_CHUNKS" + }]); + Gws = class H8e extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.text = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ContextIntent.CodeSelection"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "potentially_out_of_date_range", + kind: "message", + T: Of + }, { + no: 3, + name: "text", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new H8e().fromBinary(e, t); + } + static fromJson(e, t) { + return new H8e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new H8e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(H8e, e, t); + } + }; + Itr = class q8e extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ContextIntent.Symbol"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "symbol", + kind: "message", + T: mbe + }, { + no: 2, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new q8e().fromBinary(e, t); + } + static fromJson(e, t) { + return new q8e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new q8e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(q8e, e, t); + } + }; + Kws = class j8e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ContextIntent.CommitNotes"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new j8e().fromBinary(e, t); + } + static fromJson(e, t) { + return new j8e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new j8e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(j8e, e, t); + } + }; + Yws = class z8e extends N { + constructor(e) { + super(); + this.scope = { + case: undefined + }; + this.filterToSeverities = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ContextIntent.Lints"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "cmdk_scope", + kind: "message", + T: Xws, + oneof: "scope" + }, { + no: 2, + name: "file_scope", + kind: "message", + T: Qws, + oneof: "scope" + }, { + no: 3, + name: "filter_to_severities", + kind: "enum", + T: m.getEnumType(GT), + repeated: true + }]); + } + static fromBinary(e, t) { + return new z8e().fromBinary(e, t); + } + static fromJson(e, t) { + return new z8e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new z8e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(z8e, e, t); + } + }; + Xws = class J8e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ContextIntent.Lints.CmdKScope"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new J8e().fromBinary(e, t); + } + static fromJson(e, t) { + return new J8e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new J8e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(J8e, e, t); + } + }; + Qws = class G8e extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ContextIntent.Lints.FileScope"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "filter_range", + kind: "message", + T: Kv, + opt: true + }]); + } + static fromBinary(e, t) { + return new G8e().fromBinary(e, t); + } + static fromJson(e, t) { + return new G8e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new G8e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(G8e, e, t); + } + }; + Zws = class K8e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ContextIntent.RecentLocations"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 2, + name: "timestamp", + kind: "scalar", + T: 1, + opt: true + }]); + } + static fromBinary(e, t) { + return new K8e().fromBinary(e, t); + } + static fromJson(e, t) { + return new K8e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new K8e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(K8e, e, t); + } + }; + e0s = class Y8e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ContextIntent.PastCmdkConversationsInDiffSessions"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new Y8e().fromBinary(e, t); + } + static fromJson(e, t) { + return new Y8e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Y8e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Y8e, e, t); + } + }; + t0s = class X8e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ContextIntent.VisibleTabs"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new X8e().fromBinary(e, t); + } + static fromJson(e, t) { + return new X8e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new X8e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(X8e, e, t); + } + }; + Dtr = class Q8e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ContextIntent.CodebaseChunks"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new Q8e().fromBinary(e, t); + } + static fromJson(e, t) { + return new Q8e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Q8e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Q8e, e, t); + } + }; + i0s = class Z8e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ContextIntent.CmdKCurrentFile"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new Z8e().fromBinary(e, t); + } + static fromJson(e, t) { + return new Z8e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Z8e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Z8e, e, t); + } + }; + s0s = class e3e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ContextIntent.CmdKQueryEtc"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new e3e().fromBinary(e, t); + } + static fromJson(e, t) { + return new e3e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new e3e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(e3e, e, t); + } + }; + n0s = class t3e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ContextIntent.CustomInstructions"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new t3e().fromBinary(e, t); + } + static fromJson(e, t) { + return new t3e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new t3e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(t3e, e, t); + } + }; + r0s = class i3e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ContextIntent.CmdKDefinitions"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new i3e().fromBinary(e, t); + } + static fromJson(e, t) { + return new i3e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new i3e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(i3e, e, t); + } + }; + o0s = class s3e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ContextIntent.ChatHistory"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new s3e().fromBinary(e, t); + } + static fromJson(e, t) { + return new s3e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new s3e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(s3e, e, t); + } + }; + a0s = class n3e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ContextIntent.DiffHistory"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new n3e().fromBinary(e, t); + } + static fromJson(e, t) { + return new n3e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new n3e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(n3e, e, t); + } + }; + l0s = class r3e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ContextIntent.TerminalCmdKDefaults"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new r3e().fromBinary(e, t); + } + static fromJson(e, t) { + return new r3e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new r3e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(r3e, e, t); + } + }; + c0s = class o3e extends N { + constructor(e) { + super(); + this.instanceId = 0; + this.activeForCmdK = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ContextIntent.TerminalHistory"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "instance_id", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "active_for_cmd_k", + kind: "scalar", + T: 8 + }, { + no: 3, + name: "use_active_instance_as_fallback", + kind: "scalar", + T: 8, + opt: true + }]); + } + static fromBinary(e, t) { + return new o3e().fromBinary(e, t); + } + static fromJson(e, t) { + return new o3e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new o3e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(o3e, e, t); + } + }; + u0s = class a3e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ContextIntent.LspSubgraph"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new a3e().fromBinary(e, t); + } + static fromJson(e, t) { + return new a3e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new a3e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(a3e, e, t); + } + }; + } +}); +var Cdt; +var d0s; +var h0s; +var f0s; +var Ejt; +var kve; +var Ijt; +var Eve; +var g0s; +var Djt; +var p0s; +var m0s; +var Tjt; +var Pjt; +var FF; +var Ljt; +var b0s; +var v0s; +var y0s; +var w0s; +var C0s; +var Ive; +var S0s; +var x0s; +var k0s; +var E0s; +var I0s; +var D0s; +var T0s; +var P0s; +var L0s; +var R0s; +var Dve = ue({ + "out-build/proto/aiserver/v1/cmdk_pb.js"() { + "use strict"; + + Hr(); + Xv(); + Wo(); + uS(); + Lc(); + Cdt = class l3e extends N { + constructor(e) { + super(); + this.contextItems = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RerankCmdKContextRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "context_items", + kind: "message", + T: j7, + repeated: true + }, { + no: 3, + name: "legacy_context", + kind: "message", + T: FF + }, { + no: 2, + name: "cmd_k_options", + kind: "message", + T: kve + }]); + } + static fromBinary(e, t) { + return new l3e().fromBinary(e, t); + } + static fromJson(e, t) { + return new l3e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new l3e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(l3e, e, t); + } + }; + d0s = class c3e extends N { + constructor(e) { + super(); + this.response = { + case: undefined + }; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RerankCmdKContextResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "context_status_update", + kind: "message", + T: wve, + oneof: "response" + }, { + no: 2, + name: "missing_context_items", + kind: "message", + T: Cve, + oneof: "response" + }, { + no: 3, + name: "did_call", + kind: "scalar", + T: 8, + opt: true + }]); + } + static fromBinary(e, t) { + return new c3e().fromBinary(e, t); + } + static fromJson(e, t) { + return new c3e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new c3e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(c3e, e, t); + } + }; + h0s = class u3e extends N { + constructor(e) { + super(); + this.contextItems = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RerankTerminalCmdKContextRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "context_items", + kind: "message", + T: j7, + repeated: true + }, { + no: 2, + name: "cmd_k_options", + kind: "message", + T: Ejt + }]); + } + static fromBinary(e, t) { + return new u3e().fromBinary(e, t); + } + static fromJson(e, t) { + return new u3e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new u3e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(u3e, e, t); + } + }; + f0s = class d3e extends N { + constructor(e) { + super(); + this.response = { + case: undefined + }; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RerankTerminalCmdKContextResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "context_status_update", + kind: "message", + T: wve, + oneof: "response" + }, { + no: 2, + name: "missing_context_items", + kind: "message", + T: Cve, + oneof: "response" + }]); + } + static fromBinary(e, t) { + return new d3e().fromBinary(e, t); + } + static fromJson(e, t) { + return new d3e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new d3e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(d3e, e, t); + } + }; + Ejt = class h3e extends N { + constructor(e) { + super(); + this.chatMode = false; + this.adaCmdKContext = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.TerminalCmdKOptions"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 3, + name: "model_details", + kind: "message", + T: Qa + }, { + no: 1, + name: "chat_mode", + kind: "scalar", + T: 8 + }, { + no: 2, + name: "ada_cmd_k_context", + kind: "scalar", + T: 8 + }, { + no: 4, + name: "use_web", + kind: "scalar", + T: 8, + opt: true + }]); + } + static fromBinary(e, t) { + return new h3e().fromBinary(e, t); + } + static fromJson(e, t) { + return new h3e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new h3e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(h3e, e, t); + } + }; + kve = class f3e extends N { + constructor(e) { + super(); + this.chatMode = false; + this.adaCmdKContext = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CmdKOptions"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 3, + name: "model_details", + kind: "message", + T: Qa + }, { + no: 1, + name: "chat_mode", + kind: "scalar", + T: 8 + }, { + no: 2, + name: "ada_cmd_k_context", + kind: "scalar", + T: 8 + }, { + no: 4, + name: "use_reranker", + kind: "scalar", + T: 8, + opt: true + }, { + no: 5, + name: "use_web", + kind: "scalar", + T: 8, + opt: true + }, { + no: 6, + name: "request_is_for_caching", + kind: "scalar", + T: 8, + opt: true + }]); + } + static fromBinary(e, t) { + return new f3e().fromBinary(e, t); + } + static fromJson(e, t) { + return new f3e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new f3e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(f3e, e, t); + } + }; + Ijt = class g3e extends N { + constructor(e) { + super(); + this.originalLines = []; + this.relativePath = ""; + this.extraContextAbove = []; + this.extraContextBelow = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CmdKUpcomingEdit"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "original_lines", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 3, + name: "relative_path", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "extra_context_above", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 5, + name: "extra_context_below", + kind: "scalar", + T: 9, + repeated: true + }]); + } + static fromBinary(e, t) { + return new g3e().fromBinary(e, t); + } + static fromJson(e, t) { + return new g3e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new g3e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(g3e, e, t); + } + }; + Eve = class p3e extends N { + constructor(e) { + super(); + this.originalLines = []; + this.newLines = []; + this.relativePath = ""; + this.extraContextAbove = []; + this.extraContextBelow = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CmdKPreviousEdit"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "original_lines", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 2, + name: "new_lines", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 3, + name: "relative_path", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "extra_context_above", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 5, + name: "extra_context_below", + kind: "scalar", + T: 9, + repeated: true + }]); + } + static fromBinary(e, t) { + return new p3e().fromBinary(e, t); + } + static fromJson(e, t) { + return new p3e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new p3e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(p3e, e, t); + } + }; + g0s = class m3e extends N { + constructor(e) { + super(); + this.contextItems = []; + this.sessionId = ""; + this.previousEdits = []; + this.upcomingEdits = []; + this.images = []; + this.links = []; + this.diffHistory = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamHypermodeRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "context_items", + kind: "message", + T: j7, + repeated: true + }, { + no: 2, + name: "cmd_k_options", + kind: "message", + T: kve + }, { + no: 4, + name: "cmd_k_debug_info", + kind: "message", + T: KT + }, { + no: 6, + name: "session_id", + kind: "scalar", + T: 9 + }, { + no: 5, + name: "legacy_context", + kind: "message", + T: FF + }, { + no: 7, + name: "previous_edit", + kind: "message", + T: Eve, + opt: true + }, { + no: 8, + name: "previous_edits", + kind: "message", + T: Eve, + repeated: true + }, { + no: 12, + name: "upcoming_edits", + kind: "message", + T: Ijt, + repeated: true + }, { + no: 9, + name: "use_big_cmdk_for_multi_file_edit", + kind: "scalar", + T: 8, + opt: true + }, { + no: 10, + name: "images", + kind: "message", + T: tD, + repeated: true + }, { + no: 11, + name: "links", + kind: "message", + T: mut, + repeated: true + }, { + no: 13, + name: "diff_history", + kind: "message", + T: Fx, + repeated: true + }, { + no: 14, + name: "hyper_model", + kind: "scalar", + T: 9, + opt: true + }, { + no: 15, + name: "timing_info", + kind: "message", + T: Tjt, + opt: true + }]); + } + static fromBinary(e, t) { + return new m3e().fromBinary(e, t); + } + static fromJson(e, t) { + return new m3e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new m3e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(m3e, e, t); + } + }; + Djt = class b3e extends N { + constructor(e) { + super(); + this.contextItems = []; + this.sessionId = ""; + this.previousEdits = []; + this.upcomingEdits = []; + this.images = []; + this.links = []; + this.diffHistory = []; + this.rules = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamCmdKRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "context_items", + kind: "message", + T: j7, + repeated: true + }, { + no: 2, + name: "cmd_k_options", + kind: "message", + T: kve + }, { + no: 4, + name: "cmd_k_debug_info", + kind: "message", + T: KT + }, { + no: 6, + name: "session_id", + kind: "scalar", + T: 9 + }, { + no: 5, + name: "legacy_context", + kind: "message", + T: FF + }, { + no: 7, + name: "previous_edit", + kind: "message", + T: Eve, + opt: true + }, { + no: 8, + name: "previous_edits", + kind: "message", + T: Eve, + repeated: true + }, { + no: 12, + name: "upcoming_edits", + kind: "message", + T: Ijt, + repeated: true + }, { + no: 9, + name: "use_big_cmdk_for_multi_file_edit", + kind: "scalar", + T: 8, + opt: true + }, { + no: 10, + name: "images", + kind: "message", + T: tD, + repeated: true + }, { + no: 11, + name: "links", + kind: "message", + T: mut, + repeated: true + }, { + no: 13, + name: "diff_history", + kind: "message", + T: Fx, + repeated: true + }, { + no: 14, + name: "diff_to_base_branch", + kind: "message", + T: p0s, + opt: true + }, { + no: 15, + name: "timing_info", + kind: "message", + T: Tjt, + opt: true + }, { + no: 16, + name: "rules", + kind: "message", + T: XT, + repeated: true + }]); + } + static fromBinary(e, t) { + return new b3e().fromBinary(e, t); + } + static fromJson(e, t) { + return new b3e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new b3e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(b3e, e, t); + } + }; + p0s = class v3e extends N { + constructor(e) { + super(); + this.fileDiffs = []; + this.commits = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamCmdKRequest.BranchDiff"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "file_diffs", + kind: "message", + T: m0s, + repeated: true + }, { + no: 2, + name: "commits", + kind: "message", + T: iA, + repeated: true + }]); + } + static fromBinary(e, t) { + return new v3e().fromBinary(e, t); + } + static fromJson(e, t) { + return new v3e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new v3e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(v3e, e, t); + } + }; + m0s = class y3e extends N { + constructor(e) { + super(); + this.fileName = ""; + this.diff = ""; + this.tooBig = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamCmdKRequest.BranchDiff.FileDiff"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "file_name", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "diff", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "too_big", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new y3e().fromBinary(e, t); + } + static fromJson(e, t) { + return new y3e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new y3e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(y3e, e, t); + } + }; + Tjt = class w3e extends N { + constructor(e) { + super(); + this.userInputTime = 0; + this.streamCmdkTime = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.TimingInfo"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "user_input_time", + kind: "scalar", + T: 1 + }, { + no: 2, + name: "stream_cmdk_time", + kind: "scalar", + T: 1 + }]); + } + static fromBinary(e, t) { + return new w3e().fromBinary(e, t); + } + static fromJson(e, t) { + return new w3e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new w3e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(w3e, e, t); + } + }; + Pjt = class C3e extends N { + constructor(e) { + super(); + this.contextItems = []; + this.sessionId = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamTerminalCmdKRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "context_items", + kind: "message", + T: j7, + repeated: true + }, { + no: 2, + name: "cmd_k_options", + kind: "message", + T: Ejt + }, { + no: 6, + name: "session_id", + kind: "scalar", + T: 9 + }, { + no: 5, + name: "legacy_context", + kind: "message", + T: FF + }]); + } + static fromBinary(e, t) { + return new C3e().fromBinary(e, t); + } + static fromJson(e, t) { + return new C3e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new C3e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(C3e, e, t); + } + }; + FF = class S3e extends N { + constructor(e) { + super(); + this.promptCodeBlocks = []; + this.documentationIdentifiers = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CmdKLegacyContext"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 4, + name: "explicit_context", + kind: "message", + T: Qg + }, { + no: 12, + name: "prompt_code_blocks", + kind: "message", + T: Xg, + repeated: true + }, { + no: 10, + name: "documentation_identifiers", + kind: "scalar", + T: 9, + repeated: true + }]); + } + static fromBinary(e, t) { + return new S3e().fromBinary(e, t); + } + static fromJson(e, t) { + return new S3e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new S3e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(S3e, e, t); + } + }; + Ljt = class x3e extends N { + constructor(e) { + super(); + this.response = { + case: undefined + }; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamCmdKResponseContextWrapped"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "real_response", + kind: "message", + T: Ive, + oneof: "response" + }, { + no: 2, + name: "context_status_update", + kind: "message", + T: wve, + oneof: "response" + }, { + no: 3, + name: "missing_context_items", + kind: "message", + T: Cve, + oneof: "response" + }]); + } + static fromBinary(e, t) { + return new x3e().fromBinary(e, t); + } + static fromJson(e, t) { + return new x3e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new x3e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(x3e, e, t); + } + }; + b0s = class k3e extends N { + constructor(e) { + super(); + this.response = { + case: undefined + }; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamTerminalCmdKResponseContextWrapped"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "real_response", + kind: "message", + T: v0s, + oneof: "response" + }, { + no: 2, + name: "context_status_update", + kind: "message", + T: wve, + oneof: "response" + }, { + no: 3, + name: "missing_context_items", + kind: "message", + T: Cve, + oneof: "response" + }]); + } + static fromBinary(e, t) { + return new k3e().fromBinary(e, t); + } + static fromJson(e, t) { + return new k3e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new k3e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(k3e, e, t); + } + }; + v0s = class E3e extends N { + constructor(e) { + super(); + this.response = { + case: undefined + }; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamTerminalCmdKResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "terminal_command", + kind: "message", + T: y0s, + oneof: "response" + }, { + no: 4, + name: "chat", + kind: "message", + T: w0s, + oneof: "response" + }, { + no: 5, + name: "status_update", + kind: "message", + T: C0s, + oneof: "response" + }]); + } + static fromBinary(e, t) { + return new E3e().fromBinary(e, t); + } + static fromJson(e, t) { + return new E3e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new E3e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(E3e, e, t); + } + }; + y0s = class I3e extends N { + constructor(e) { + super(); + this.partialCommand = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamTerminalCmdKResponse.TerminalCommand"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "partial_command", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new I3e().fromBinary(e, t); + } + static fromJson(e, t) { + return new I3e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new I3e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(I3e, e, t); + } + }; + w0s = class D3e extends N { + constructor(e) { + super(); + this.text = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamTerminalCmdKResponse.Chat"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "text", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new D3e().fromBinary(e, t); + } + static fromJson(e, t) { + return new D3e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new D3e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(D3e, e, t); + } + }; + C0s = class T3e extends N { + constructor(e) { + super(); + this.messages = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamTerminalCmdKResponse.StatusUpdate"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "messages", + kind: "scalar", + T: 9, + repeated: true + }]); + } + static fromBinary(e, t) { + return new T3e().fromBinary(e, t); + } + static fromJson(e, t) { + return new T3e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new T3e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(T3e, e, t); + } + }; + Ive = class P3e extends N { + constructor(e) { + super(); + this.response = { + case: undefined + }; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamCmdKResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "edit_start", + kind: "message", + T: S0s, + oneof: "response" + }, { + no: 2, + name: "edit_stream", + kind: "message", + T: x0s, + oneof: "response" + }, { + no: 3, + name: "edit_end", + kind: "message", + T: k0s, + oneof: "response" + }, { + no: 4, + name: "chat", + kind: "message", + T: E0s, + oneof: "response" + }, { + no: 5, + name: "status_update", + kind: "message", + T: I0s, + oneof: "response" + }]); + } + static fromBinary(e, t) { + return new P3e().fromBinary(e, t); + } + static fromJson(e, t) { + return new P3e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new P3e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(P3e, e, t); + } + }; + S0s = class L3e extends N { + constructor(e) { + super(); + this.startLineNumber = 0; + this.editId = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamCmdKResponse.EditStart"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "start_line_number", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "edit_id", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "max_end_line_number_exclusive", + kind: "scalar", + T: 5, + opt: true + }, { + no: 4, + name: "file_path", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new L3e().fromBinary(e, t); + } + static fromJson(e, t) { + return new L3e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new L3e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(L3e, e, t); + } + }; + x0s = class R3e extends N { + constructor(e) { + super(); + this.text = ""; + this.editId = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamCmdKResponse.EditStream"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "text", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "edit_id", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "file_path", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new R3e().fromBinary(e, t); + } + static fromJson(e, t) { + return new R3e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new R3e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(R3e, e, t); + } + }; + k0s = class N3e extends N { + constructor(e) { + super(); + this.endLineNumberExclusive = 0; + this.editId = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamCmdKResponse.EditEnd"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "end_line_number_exclusive", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "edit_id", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "file_path", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new N3e().fromBinary(e, t); + } + static fromJson(e, t) { + return new N3e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new N3e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(N3e, e, t); + } + }; + E0s = class M3e extends N { + constructor(e) { + super(); + this.text = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamCmdKResponse.Chat"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "text", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new M3e().fromBinary(e, t); + } + static fromJson(e, t) { + return new M3e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new M3e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(M3e, e, t); + } + }; + I0s = class A3e extends N { + constructor(e) { + super(); + this.messages = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamCmdKResponse.StatusUpdate"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "messages", + kind: "scalar", + T: 9, + repeated: true + }]); + } + static fromBinary(e, t) { + return new A3e().fromBinary(e, t); + } + static fromJson(e, t) { + return new A3e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new A3e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(A3e, e, t); + } + }; + D0s = class $3e extends N { + constructor(e) { + super(); + this.codeBlocks = []; + this.contextItems = []; + this.sessionId = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetRelevantChunksRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "code_blocks", + kind: "message", + T: Xg, + repeated: true + }, { + no: 2, + name: "cmd_k_options", + kind: "message", + T: kve + }, { + no: 3, + name: "context_items", + kind: "message", + T: j7, + repeated: true + }, { + no: 4, + name: "session_id", + kind: "scalar", + T: 9 + }, { + no: 5, + name: "legacy_context", + kind: "message", + T: FF + }]); + } + static fromBinary(e, t) { + return new $3e().fromBinary(e, t); + } + static fromJson(e, t) { + return new $3e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new $3e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals($3e, e, t); + } + }; + T0s = class F3e extends N { + constructor(e) { + super(); + this.response = { + case: undefined + }; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamGetRelevantChunksResponseContextWrapped"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "real_response", + kind: "message", + T: P0s, + oneof: "response" + }]); + } + static fromBinary(e, t) { + return new F3e().fromBinary(e, t); + } + static fromJson(e, t) { + return new F3e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new F3e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(F3e, e, t); + } + }; + P0s = class O3e extends N { + constructor(e) { + super(); + this.response = { + case: undefined + }; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetRelevantChunksResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "code_blocks", + kind: "message", + T: R0s, + oneof: "response" + }, { + no: 2, + name: "chain_of_thought_stream", + kind: "message", + T: L0s, + oneof: "response" + }]); + } + static fromBinary(e, t) { + return new O3e().fromBinary(e, t); + } + static fromJson(e, t) { + return new O3e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new O3e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(O3e, e, t); + } + }; + L0s = class _3e extends N { + constructor(e) { + super(); + this.text = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetRelevantChunksResponse.ChainOfThoughtStream"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "text", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new _3e().fromBinary(e, t); + } + static fromJson(e, t) { + return new _3e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new _3e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(_3e, e, t); + } + }; + R0s = class B3e extends N { + constructor(e) { + super(); + this.codeBlocks = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetRelevantChunksResponse.CodeBlocks"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "code_blocks", + kind: "message", + T: Xg, + repeated: true + }]); + } + static fromBinary(e, t) { + return new B3e().fromBinary(e, t); + } + static fromJson(e, t) { + return new B3e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new B3e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(B3e, e, t); + } + }; + } +}); +var nA; +var qw; +var N0s; +var M0s; +var A0s; +var $0s; +var Zz = ue({ + "out-build/proto/aiserver/v1/fastapply_pb.js"() { + "use strict"; + + Hr(); + Wo(); + Lc(); + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.ACCEPTED = 1] = "ACCEPTED"; + i[i.REJECTED = 2] = "REJECTED"; + i[i.PARTIALLY_ACCEPTED = 3] = "PARTIALLY_ACCEPTED"; + })(nA ||= {}); + m.util.setEnumType(nA, "aiserver.v1.EditFate", [{ + no: 0, + name: "EDIT_FATE_UNSPECIFIED" + }, { + no: 1, + name: "EDIT_FATE_ACCEPTED" + }, { + no: 2, + name: "EDIT_FATE_REJECTED" + }, { + no: 3, + name: "EDIT_FATE_PARTIALLY_ACCEPTED" + }]); + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.COMPOSER = 1] = "COMPOSER"; + i[i.CLICKED_APPLY = 2] = "CLICKED_APPLY"; + i[i.CACHED_APPLY = 3] = "CACHED_APPLY"; + i[i.COMPOSER_AGENT = 4] = "COMPOSER_AGENT"; + })(qw ||= {}); + m.util.setEnumType(qw, "aiserver.v1.FastApplySource", [{ + no: 0, + name: "FAST_APPLY_SOURCE_UNSPECIFIED" + }, { + no: 1, + name: "FAST_APPLY_SOURCE_COMPOSER" + }, { + no: 2, + name: "FAST_APPLY_SOURCE_CLICKED_APPLY" + }, { + no: 3, + name: "FAST_APPLY_SOURCE_CACHED_APPLY" + }, { + no: 4, + name: "FAST_APPLY_SOURCE_COMPOSER_AGENT" + }]); + N0s = class U3e extends N { + constructor(e) { + super(); + this.requestId = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ReportEditFateRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "request_id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "fate", + kind: "enum", + T: m.getEnumType(nA), + opt: true + }, { + no: 3, + name: "num_accepted_partial_diffs", + kind: "scalar", + T: 5, + opt: true + }, { + no: 4, + name: "num_rejected_partial_diffs", + kind: "scalar", + T: 5, + opt: true + }]); + } + static fromBinary(e, t) { + return new U3e().fromBinary(e, t); + } + static fromJson(e, t) { + return new U3e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new U3e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(U3e, e, t); + } + }; + M0s = class W3e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ReportEditFateResponse"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new W3e().fromBinary(e, t); + } + static fromJson(e, t) { + return new W3e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new W3e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(W3e, e, t); + } + }; + A0s = class V3e extends N { + constructor(e) { + super(); + this.conversation = []; + this.source = qw.UNSPECIFIED; + this.willingToPayExtraForSpeed = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.WarmApplyRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 2, + name: "current_file", + kind: "message", + T: tu + }, { + no: 3, + name: "conversation", + kind: "message", + T: Al, + repeated: true + }, { + no: 4, + name: "explicit_context", + kind: "message", + T: Qg + }, { + no: 5, + name: "source", + kind: "enum", + T: m.getEnumType(qw) + }, { + no: 6, + name: "willing_to_pay_extra_for_speed", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new V3e().fromBinary(e, t); + } + static fromJson(e, t) { + return new V3e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new V3e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(V3e, e, t); + } + }; + $0s = class H3e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.WarmApplyResponse"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new H3e().fromBinary(e, t); + } + static fromJson(e, t) { + return new H3e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new H3e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(H3e, e, t); + } + }; + } +}); +var eJ; +var tJ; +var Rjt; +var F0s; +var O0s; +var Xie; +var _0s; +var B0s; +var U0s; +var W0s; +var V0s; +var H0s; +var Sdt; +var q0s; +var j0s; +var Qie; +var z0s; +var Ttr; +var Ptr; +var Njt; +var Mjt = ue({ + "out-build/proto/aiserver/v1/lint_pb.js"() { + "use strict"; + + Hr(); + Wo(); + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.SPECIFIC_RULES = 1] = "SPECIFIC_RULES"; + i[i.COMPILE_ERRORS = 2] = "COMPILE_ERRORS"; + i[i.CHANGE_BEHAVIOR = 3] = "CHANGE_BEHAVIOR"; + i[i.RELEVANCE = 5] = "RELEVANCE"; + i[i.USER_AWARENESS = 6] = "USER_AWARENESS"; + i[i.CORRECTNESS = 7] = "CORRECTNESS"; + i[i.CHUNKING = 8] = "CHUNKING"; + i[i.TYPO = 9] = "TYPO"; + i[i.CONFIDENCE = 10] = "CONFIDENCE"; + i[i.DISMISSED_BUGS = 11] = "DISMISSED_BUGS"; + })(eJ ||= {}); + m.util.setEnumType(eJ, "aiserver.v1.LintDiscriminator", [{ + no: 0, + name: "LINT_DISCRIMINATOR_UNSPECIFIED" + }, { + no: 1, + name: "LINT_DISCRIMINATOR_SPECIFIC_RULES" + }, { + no: 2, + name: "LINT_DISCRIMINATOR_COMPILE_ERRORS" + }, { + no: 3, + name: "LINT_DISCRIMINATOR_CHANGE_BEHAVIOR" + }, { + no: 5, + name: "LINT_DISCRIMINATOR_RELEVANCE" + }, { + no: 6, + name: "LINT_DISCRIMINATOR_USER_AWARENESS" + }, { + no: 7, + name: "LINT_DISCRIMINATOR_CORRECTNESS" + }, { + no: 8, + name: "LINT_DISCRIMINATOR_CHUNKING" + }, { + no: 9, + name: "LINT_DISCRIMINATOR_TYPO" + }, { + no: 10, + name: "LINT_DISCRIMINATOR_CONFIDENCE" + }, { + no: 11, + name: "LINT_DISCRIMINATOR_DISMISSED_BUGS" + }]); + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.NAIVE = 1] = "NAIVE"; + i[i.COMMENT_PIPELINE = 2] = "COMMENT_PIPELINE"; + i[i.SIMPLE_BUG = 3] = "SIMPLE_BUG"; + i[i.SIMPLE_LINT_RULES = 4] = "SIMPLE_LINT_RULES"; + })(tJ ||= {}); + m.util.setEnumType(tJ, "aiserver.v1.LintGenerator", [{ + no: 0, + name: "LINT_GENERATOR_UNSPECIFIED" + }, { + no: 1, + name: "LINT_GENERATOR_NAIVE" + }, { + no: 2, + name: "LINT_GENERATOR_COMMENT_PIPELINE" + }, { + no: 3, + name: "LINT_GENERATOR_SIMPLE_BUG" + }, { + no: 4, + name: "LINT_GENERATOR_SIMPLE_LINT_RULES" + }]); + Rjt = class q3e extends N { + constructor(e) { + super(); + this.relativeFilePath = ""; + this.lineSelection = ""; + this.tokenStartIndex = 0; + this.tokenEndIndex = 0; + this.likelyAlternateToken = ""; + this.lineChunkIndexZeroBased = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.LintExplanationRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_file_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "chunk", + kind: "message", + T: Xie + }, { + no: 3, + name: "line_selection", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "token_start_index", + kind: "scalar", + T: 5 + }, { + no: 5, + name: "token_end_index", + kind: "scalar", + T: 5 + }, { + no: 6, + name: "likely_alternate_token", + kind: "scalar", + T: 9 + }, { + no: 7, + name: "line_chunk_index_zero_based", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new q3e().fromBinary(e, t); + } + static fromJson(e, t) { + return new q3e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new q3e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(q3e, e, t); + } + }; + F0s = class j3e extends N { + constructor(e) { + super(); + this.explanation = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.LintExplanationResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "explanation", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new j3e().fromBinary(e, t); + } + static fromJson(e, t) { + return new j3e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new j3e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(j3e, e, t); + } + }; + O0s = class z3e extends N { + constructor(e) { + super(); + this.origLine = ""; + this.newLine = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.LintExplanationResponse2"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "orig_line", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "new_line", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new z3e().fromBinary(e, t); + } + static fromJson(e, t) { + return new z3e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new z3e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(z3e, e, t); + } + }; + Xie = class J3e extends N { + constructor(e) { + super(); + this.chunkContents = ""; + this.startLineNumber = 0; + this.numRemainingLines = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.LintChunk"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 2, + name: "chunk_contents", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "start_line_number", + kind: "scalar", + T: 5 + }, { + no: 4, + name: "num_remaining_lines", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new J3e().fromBinary(e, t); + } + static fromJson(e, t) { + return new J3e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new J3e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(J3e, e, t); + } + }; + _0s = class G3e extends N { + constructor(e) { + super(); + this.relativeFilePath = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.LintChunkRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_file_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "chunk", + kind: "message", + T: Xie + }, { + no: 3, + name: "use_speculative_linter", + kind: "scalar", + T: 8, + opt: true + }]); + } + static fromBinary(e, t) { + return new G3e().fromBinary(e, t); + } + static fromJson(e, t) { + return new G3e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new G3e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(G3e, e, t); + } + }; + B0s = class K3e extends N { + constructor(e) { + super(); + this.chunkTokens = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.LintChunkResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "chunk_tokens", + kind: "message", + T: Sdt, + repeated: true + }]); + } + static fromBinary(e, t) { + return new K3e().fromBinary(e, t); + } + static fromJson(e, t) { + return new K3e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new K3e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(K3e, e, t); + } + }; + U0s = class Y3e extends N { + constructor(e) { + super(); + this.relativeFilePath = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.LintFimChunkRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_file_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "prefix", + kind: "message", + T: Xie + }, { + no: 3, + name: "suffix", + kind: "message", + T: Xie + }, { + no: 4, + name: "middle", + kind: "message", + T: Xie + }]); + } + static fromBinary(e, t) { + return new Y3e().fromBinary(e, t); + } + static fromJson(e, t) { + return new Y3e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Y3e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Y3e, e, t); + } + }; + W0s = class X3e extends N { + constructor(e) { + super(); + this.middleChunkTokens = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.LintFimChunkResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "middle_chunk_tokens", + kind: "message", + T: Sdt, + repeated: true + }]); + } + static fromBinary(e, t) { + return new X3e().fromBinary(e, t); + } + static fromJson(e, t) { + return new X3e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new X3e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(X3e, e, t); + } + }; + V0s = class Q3e extends N { + constructor(e) { + super(); + this.relativeFilePath = ""; + this.fileContents = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.LintFileRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_file_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "file_contents", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new Q3e().fromBinary(e, t); + } + static fromJson(e, t) { + return new Q3e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Q3e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Q3e, e, t); + } + }; + H0s = class Z3e extends N { + constructor(e) { + super(); + this.token = ""; + this.logProbability = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.TokensWithLogprobs"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "token", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "log_probability", + kind: "scalar", + T: 2 + }]); + } + static fromBinary(e, t) { + return new Z3e().fromBinary(e, t); + } + static fromJson(e, t) { + return new Z3e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Z3e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Z3e, e, t); + } + }; + Sdt = class e9e extends N { + constructor(e) { + super(); + this.tokensWithLogprobs = []; + this.actualToken = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.TokenIndex"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "tokens_with_logprobs", + kind: "message", + T: H0s, + repeated: true + }, { + no: 2, + name: "actual_token", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new e9e().fromBinary(e, t); + } + static fromJson(e, t) { + return new e9e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new e9e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(e9e, e, t); + } + }; + q0s = class t9e extends N { + constructor(e) { + super(); + this.tokens = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.LintFileResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "tokens", + kind: "message", + T: Sdt, + repeated: true + }]); + } + static fromBinary(e, t) { + return new t9e().fromBinary(e, t); + } + static fromJson(e, t) { + return new t9e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new t9e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(t9e, e, t); + } + }; + j0s = class i9e extends N { + constructor(e) { + super(); + this.discriminator = eJ.UNSPECIFIED; + this.allow = false; + this.reasoning = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.LintDiscriminatorResult"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "discriminator", + kind: "enum", + T: m.getEnumType(eJ) + }, { + no: 2, + name: "allow", + kind: "scalar", + T: 8 + }, { + no: 3, + name: "reasoning", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new i9e().fromBinary(e, t); + } + static fromJson(e, t) { + return new i9e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new i9e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(i9e, e, t); + } + }; + Qie = class s9e extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.uuid = ""; + this.message = ""; + this.replaceText = ""; + this.replaceInitialText = ""; + this.reevaluateInitialText = ""; + this.generator = tJ.UNSPECIFIED; + this.discriminatorResults = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.AiLintBug"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 8, + name: "uuid", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "message", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "replace_range", + kind: "message", + T: Of + }, { + no: 4, + name: "replace_text", + kind: "scalar", + T: 9 + }, { + no: 5, + name: "replace_initial_text", + kind: "scalar", + T: 9 + }, { + no: 6, + name: "reevaluate_range", + kind: "message", + T: Of + }, { + no: 7, + name: "reevaluate_initial_text", + kind: "scalar", + T: 9 + }, { + no: 9, + name: "generator", + kind: "enum", + T: m.getEnumType(tJ) + }, { + no: 10, + name: "discriminator_results", + kind: "message", + T: j0s, + repeated: true + }, { + no: 11, + name: "logprobs_payload", + kind: "message", + T: z0s + }]); + } + static fromBinary(e, t) { + return new s9e().fromBinary(e, t); + } + static fromJson(e, t) { + return new s9e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new s9e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(s9e, e, t); + } + }; + z0s = class n9e extends N { + constructor(e) { + super(); + this.chunk = ""; + this.problematicLine = ""; + this.startCol = 0; + this.endCol = 0; + this.mostLikelyReplace = ""; + this.lineChunkIndexZeroBased = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.LogprobsLintPayload"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "chunk", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "problematic_line", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "start_col", + kind: "scalar", + T: 5 + }, { + no: 4, + name: "end_col", + kind: "scalar", + T: 5 + }, { + no: 5, + name: "most_likely_replace", + kind: "scalar", + T: 9 + }, { + no: 6, + name: "line_chunk_index_zero_based", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new n9e().fromBinary(e, t); + } + static fromJson(e, t) { + return new n9e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new n9e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(n9e, e, t); + } + }; + Ttr = class r9e extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.uuid = ""; + this.message = ""; + this.lineNumber = 0; + this.reevaluateInitialText = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.AiLintInlineSuggestion"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 8, + name: "uuid", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "message", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "line_number", + kind: "scalar", + T: 5 + }, { + no: 4, + name: "reevaluate_range", + kind: "message", + T: Of + }, { + no: 5, + name: "reevaluate_initial_text", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new r9e().fromBinary(e, t); + } + static fromJson(e, t) { + return new r9e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new r9e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(r9e, e, t); + } + }; + Ptr = class o9e extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.uuid = ""; + this.message = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.AiLintOutOfFlowSuggestion"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 8, + name: "uuid", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "message", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new o9e().fromBinary(e, t); + } + static fromJson(e, t) { + return new o9e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new o9e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(o9e, e, t); + } + }; + Njt = class a9e extends N { + constructor(e) { + super(); + this.text = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.AiLintRule"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "text", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new a9e().fromBinary(e, t); + } + static fromJson(e, t) { + return new a9e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new a9e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(a9e, e, t); + } + }; + } +}); +var Ajt; +var J0s; +var $jt; +var G0s; +var K0s; +var Y0s; +var Fjt; +var X0s = ue({ + "out-build/proto/aiserver/v1/context_ast_pb.js"() { + "use strict"; + + Hr(); + Ajt = class l9e extends N { + constructor(e) { + super(); + this.files = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ContextAST"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "files", + kind: "message", + T: J0s, + repeated: true + }]); + } + static fromBinary(e, t) { + return new l9e().fromBinary(e, t); + } + static fromJson(e, t) { + return new l9e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new l9e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(l9e, e, t); + } + }; + J0s = class c9e extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.nodes = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ContainerTree"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "nodes", + kind: "message", + T: $jt, + repeated: true + }]); + } + static fromBinary(e, t) { + return new c9e().fromBinary(e, t); + } + static fromJson(e, t) { + return new c9e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new c9e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(c9e, e, t); + } + }; + $jt = class u9e extends N { + constructor(e) { + super(); + this.node = { + case: undefined + }; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ContainerTreeNode"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "container", + kind: "message", + T: K0s, + oneof: "node" + }, { + no: 2, + name: "blob", + kind: "message", + T: Y0s, + oneof: "node" + }, { + no: 3, + name: "symbol", + kind: "message", + T: G0s, + oneof: "node" + }]); + } + static fromBinary(e, t) { + return new u9e().fromBinary(e, t); + } + static fromJson(e, t) { + return new u9e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new u9e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(u9e, e, t); + } + }; + G0s = class d9e extends N { + constructor(e) { + super(); + this.docString = ""; + this.value = ""; + this.references = []; + this.score = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ContainerTreeNode.Symbol"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "doc_string", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "value", + kind: "scalar", + T: 9 + }, { + no: 6, + name: "references", + kind: "message", + T: Fjt, + repeated: true + }, { + no: 7, + name: "score", + kind: "scalar", + T: 1 + }]); + } + static fromBinary(e, t) { + return new d9e().fromBinary(e, t); + } + static fromJson(e, t) { + return new d9e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new d9e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(d9e, e, t); + } + }; + K0s = class h9e extends N { + constructor(e) { + super(); + this.docString = ""; + this.header = ""; + this.trailer = ""; + this.children = []; + this.references = []; + this.score = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ContainerTreeNode.Container"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "doc_string", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "header", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "trailer", + kind: "scalar", + T: 9 + }, { + no: 5, + name: "children", + kind: "message", + T: $jt, + repeated: true + }, { + no: 6, + name: "references", + kind: "message", + T: Fjt, + repeated: true + }, { + no: 7, + name: "score", + kind: "scalar", + T: 1 + }]); + } + static fromBinary(e, t) { + return new h9e().fromBinary(e, t); + } + static fromJson(e, t) { + return new h9e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new h9e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(h9e, e, t); + } + }; + Y0s = class f9e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ContainerTreeNode.Blob"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "value", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new f9e().fromBinary(e, t); + } + static fromJson(e, t) { + return new f9e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new f9e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(f9e, e, t); + } + }; + Fjt = class g9e extends N { + constructor(e) { + super(); + this.value = ""; + this.relativeWorkspacePath = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ContainerTreeNode.Reference"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "value", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new g9e().fromBinary(e, t); + } + static fromJson(e, t) { + return new g9e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new g9e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(g9e, e, t); + } + }; + } +}); +var xdt; +var Q0s; +var Z0s; +var eCs; +var tCs; +var iCs; +var sCs; +var nCs; +var rCs; +var oCs; +var aCs; +var lCs; +var cCs; +var Ojt; +var z7; +var uCs = ue({ + "out-build/proto/aiserver/v1/usage_pb.js"() { + "use strict"; + + Hr(); + xdt = class p9e extends N { + constructor(e) { + super(); + this.feature = { + case: undefined + }; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.UsageEventDetails"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "chat", + kind: "message", + T: Z0s, + oneof: "feature" + }, { + no: 2, + name: "context_chat", + kind: "message", + T: nCs, + oneof: "feature" + }, { + no: 3, + name: "cmd_k", + kind: "message", + T: rCs, + oneof: "feature" + }, { + no: 4, + name: "terminal_cmd_k", + kind: "message", + T: oCs, + oneof: "feature" + }, { + no: 5, + name: "ai_review_accepted_comment", + kind: "message", + T: aCs, + oneof: "feature" + }, { + no: 6, + name: "interpreter_chat", + kind: "message", + T: lCs, + oneof: "feature" + }, { + no: 7, + name: "slash_edit", + kind: "message", + T: cCs, + oneof: "feature" + }, { + no: 8, + name: "composer", + kind: "message", + T: tCs, + oneof: "feature" + }, { + no: 9, + name: "fast_apply", + kind: "message", + T: eCs, + oneof: "feature" + }, { + no: 10, + name: "warm_composer", + kind: "message", + T: sCs, + oneof: "feature" + }, { + no: 11, + name: "bug_finder_trigger_v1", + kind: "message", + T: Q0s, + oneof: "feature" + }, { + no: 12, + name: "tool_call_composer", + kind: "message", + T: iCs, + oneof: "feature" + }, { + no: 13, + name: "override_num_requests_counted", + kind: "scalar", + T: 5, + opt: true + }]); + } + static fromBinary(e, t) { + return new p9e().fromBinary(e, t); + } + static fromJson(e, t) { + return new p9e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new p9e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(p9e, e, t); + } + }; + Q0s = class m9e extends N { + constructor(e) { + super(); + this.inBackgroundSubsidized = false; + this.costCents = 0; + this.isFast = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.UsageEventDetails.BugFinderTriggerV1"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "in_background_subsidized", + kind: "scalar", + T: 8 + }, { + no: 2, + name: "cost_cents", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "is_fast", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new m9e().fromBinary(e, t); + } + static fromJson(e, t) { + return new m9e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new m9e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(m9e, e, t); + } + }; + Z0s = class b9e extends N { + constructor(e) { + super(); + this.modelIntent = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.UsageEventDetails.Chat"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "model_intent", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "override_num_requests_counted", + kind: "scalar", + T: 5, + opt: true + }, { + no: 3, + name: "is_token_based_call", + kind: "scalar", + T: 8, + opt: true + }, { + no: 4, + name: "token_usage", + kind: "message", + T: z7, + opt: true + }, { + no: 5, + name: "max_mode", + kind: "scalar", + T: 8, + opt: true + }]); + } + static fromBinary(e, t) { + return new b9e().fromBinary(e, t); + } + static fromJson(e, t) { + return new b9e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new b9e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(b9e, e, t); + } + }; + eCs = class v9e extends N { + constructor(e) { + super(); + this.isOptimistic = false; + this.willingToPayExtraForSpeed = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.UsageEventDetails.FastApply"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "is_optimistic", + kind: "scalar", + T: 8 + }, { + no: 2, + name: "willing_to_pay_extra_for_speed", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new v9e().fromBinary(e, t); + } + static fromJson(e, t) { + return new v9e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new v9e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(v9e, e, t); + } + }; + tCs = class y9e extends N { + constructor(e) { + super(); + this.modelIntent = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.UsageEventDetails.Composer"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "model_intent", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "override_num_requests_counted", + kind: "scalar", + T: 5, + opt: true + }, { + no: 3, + name: "is_headless", + kind: "scalar", + T: 8, + opt: true + }, { + no: 4, + name: "is_token_based_call", + kind: "scalar", + T: 8, + opt: true + }, { + no: 5, + name: "token_usage", + kind: "message", + T: z7, + opt: true + }, { + no: 6, + name: "max_mode", + kind: "scalar", + T: 8, + opt: true + }]); + } + static fromBinary(e, t) { + return new y9e().fromBinary(e, t); + } + static fromJson(e, t) { + return new y9e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new y9e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(y9e, e, t); + } + }; + iCs = class w9e extends N { + constructor(e) { + super(); + this.modelIntent = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.UsageEventDetails.ToolCallComposer"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "model_intent", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "override_num_requests_counted", + kind: "scalar", + T: 5, + opt: true + }, { + no: 3, + name: "is_headless", + kind: "scalar", + T: 8, + opt: true + }, { + no: 4, + name: "is_token_based_call", + kind: "scalar", + T: 8, + opt: true + }, { + no: 5, + name: "token_usage", + kind: "message", + T: z7, + opt: true + }, { + no: 6, + name: "max_mode", + kind: "scalar", + T: 8, + opt: true + }]); + } + static fromBinary(e, t) { + return new w9e().fromBinary(e, t); + } + static fromJson(e, t) { + return new w9e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new w9e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(w9e, e, t); + } + }; + sCs = class C9e extends N { + constructor(e) { + super(); + this.modelIntent = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.UsageEventDetails.WarmComposer"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "model_intent", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "max_mode", + kind: "scalar", + T: 8, + opt: true + }]); + } + static fromBinary(e, t) { + return new C9e().fromBinary(e, t); + } + static fromJson(e, t) { + return new C9e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new C9e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(C9e, e, t); + } + }; + nCs = class S9e extends N { + constructor(e) { + super(); + this.modelIntent = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.UsageEventDetails.ContextChat"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "model_intent", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "override_num_requests_counted", + kind: "scalar", + T: 5, + opt: true + }, { + no: 3, + name: "is_token_based_call", + kind: "scalar", + T: 8, + opt: true + }, { + no: 4, + name: "token_usage", + kind: "message", + T: z7, + opt: true + }, { + no: 5, + name: "max_mode", + kind: "scalar", + T: 8, + opt: true + }]); + } + static fromBinary(e, t) { + return new S9e().fromBinary(e, t); + } + static fromJson(e, t) { + return new S9e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new S9e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(S9e, e, t); + } + }; + rCs = class x9e extends N { + constructor(e) { + super(); + this.modelIntent = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.UsageEventDetails.CmdK"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "model_intent", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "override_num_requests_counted", + kind: "scalar", + T: 5, + opt: true + }, { + no: 3, + name: "is_token_based_call", + kind: "scalar", + T: 8, + opt: true + }, { + no: 4, + name: "token_usage", + kind: "message", + T: z7, + opt: true + }, { + no: 5, + name: "max_mode", + kind: "scalar", + T: 8, + opt: true + }]); + } + static fromBinary(e, t) { + return new x9e().fromBinary(e, t); + } + static fromJson(e, t) { + return new x9e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new x9e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(x9e, e, t); + } + }; + oCs = class k9e extends N { + constructor(e) { + super(); + this.modelIntent = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.UsageEventDetails.TerminalCmdK"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "model_intent", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "override_num_requests_counted", + kind: "scalar", + T: 5, + opt: true + }, { + no: 3, + name: "is_token_based_call", + kind: "scalar", + T: 8, + opt: true + }, { + no: 4, + name: "token_usage", + kind: "message", + T: z7, + opt: true + }, { + no: 5, + name: "max_mode", + kind: "scalar", + T: 8, + opt: true + }]); + } + static fromBinary(e, t) { + return new k9e().fromBinary(e, t); + } + static fromJson(e, t) { + return new k9e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new k9e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(k9e, e, t); + } + }; + aCs = class E9e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.UsageEventDetails.AiReviewAcceptedComment"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new E9e().fromBinary(e, t); + } + static fromJson(e, t) { + return new E9e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new E9e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(E9e, e, t); + } + }; + lCs = class I9e extends N { + constructor(e) { + super(); + this.modelIntent = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.UsageEventDetails.InterpreterChat"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "model_intent", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "override_num_requests_counted", + kind: "scalar", + T: 5, + opt: true + }, { + no: 3, + name: "is_token_based_call", + kind: "scalar", + T: 8, + opt: true + }, { + no: 4, + name: "token_usage", + kind: "message", + T: z7, + opt: true + }, { + no: 5, + name: "max_mode", + kind: "scalar", + T: 8, + opt: true + }]); + } + static fromBinary(e, t) { + return new I9e().fromBinary(e, t); + } + static fromJson(e, t) { + return new I9e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new I9e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(I9e, e, t); + } + }; + cCs = class D9e extends N { + constructor(e) { + super(); + this.modelIntent = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.UsageEventDetails.SlashEdit"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "model_intent", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "max_mode", + kind: "scalar", + T: 8, + opt: true + }]); + } + static fromBinary(e, t) { + return new D9e().fromBinary(e, t); + } + static fromJson(e, t) { + return new D9e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new D9e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(D9e, e, t); + } + }; + Ojt = class T9e extends N { + constructor(e) { + super(); + this.timestamp = wd.zero; + this.isSlow = false; + this.status = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.UsageEvent"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "timestamp", + kind: "scalar", + T: 3 + }, { + no: 2, + name: "details", + kind: "message", + T: xdt + }, { + no: 3, + name: "subscription_product_id", + kind: "scalar", + T: 9, + opt: true + }, { + no: 4, + name: "usage_price_id", + kind: "scalar", + T: 9, + opt: true + }, { + no: 5, + name: "is_slow", + kind: "scalar", + T: 8 + }, { + no: 6, + name: "status", + kind: "scalar", + T: 9 + }, { + no: 7, + name: "owning_user", + kind: "scalar", + T: 9, + opt: true + }, { + no: 8, + name: "owning_team", + kind: "scalar", + T: 9, + opt: true + }, { + no: 9, + name: "price_cents", + kind: "scalar", + T: 2, + opt: true + }]); + } + static fromBinary(e, t) { + return new T9e().fromBinary(e, t); + } + static fromJson(e, t) { + return new T9e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new T9e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(T9e, e, t); + } + }; + z7 = class P9e extends N { + constructor(e) { + super(); + this.inputTokens = 0; + this.outputTokens = 0; + this.cacheWriteTokens = 0; + this.cacheReadTokens = 0; + this.totalCents = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.TokenUsage"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "input_tokens", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "output_tokens", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "cache_write_tokens", + kind: "scalar", + T: 5 + }, { + no: 4, + name: "cache_read_tokens", + kind: "scalar", + T: 5 + }, { + no: 5, + name: "total_cents", + kind: "scalar", + T: 2 + }]); + } + static fromBinary(e, t) { + return new P9e().fromBinary(e, t); + } + static fromJson(e, t) { + return new P9e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new P9e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(P9e, e, t); + } + }; + } +}); +var _jt; +var Bjt; +var tC; +var Ltr = ue({ + "out-build/proto/aiserver/v1/interface_agent_pb.js"() { + "use strict"; + + Hr(); + _jt = class L9e extends N { + constructor(e) { + super(); + this.interfaceRelativeWorkspacePath = ""; + this.interfaceLines = []; + this.testLines = []; + this.implementationLines = []; + this.language = ""; + this.testingFramework = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.InterfaceAgentClientState"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 3, + name: "interface_relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "interface_lines", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 5, + name: "test_relative_workspace_path", + kind: "scalar", + T: 9, + opt: true + }, { + no: 10, + name: "test_lines", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 6, + name: "implementation_relative_workspace_path", + kind: "scalar", + T: 9, + opt: true + }, { + no: 7, + name: "implementation_lines", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 8, + name: "language", + kind: "scalar", + T: 9 + }, { + no: 9, + name: "testing_framework", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new L9e().fromBinary(e, t); + } + static fromJson(e, t) { + return new L9e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new L9e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(L9e, e, t); + } + }; + Bjt = class R9e extends N { + constructor(e) { + super(); + this.validateConfiguration = tC.UNSPECIFIED; + this.stubNewFunction = tC.UNSPECIFIED; + this.verifySpec = tC.UNSPECIFIED; + this.writeTestPlan = tC.UNSPECIFIED; + this.writeTests = tC.UNSPECIFIED; + this.writeImplementation = tC.UNSPECIFIED; + this.implementNewFunction = tC.UNSPECIFIED; + this.runTests = tC.UNSPECIFIED; + this.validateConfigurationMessage = ""; + this.stubNewFunctionMessage = ""; + this.verifySpecMessage = ""; + this.writeTestPlanMessage = ""; + this.writeTestsMessage = ""; + this.writeImplementationMessage = ""; + this.implementNewFunctionMessage = ""; + this.runTestsMessage = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.InterfaceAgentStatus"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "validate_configuration", + kind: "enum", + T: m.getEnumType(tC) + }, { + no: 2, + name: "stub_new_function", + kind: "enum", + T: m.getEnumType(tC) + }, { + no: 3, + name: "verify_spec", + kind: "enum", + T: m.getEnumType(tC) + }, { + no: 15, + name: "write_test_plan", + kind: "enum", + T: m.getEnumType(tC) + }, { + no: 4, + name: "write_tests", + kind: "enum", + T: m.getEnumType(tC) + }, { + no: 5, + name: "write_implementation", + kind: "enum", + T: m.getEnumType(tC) + }, { + no: 6, + name: "implement_new_function", + kind: "enum", + T: m.getEnumType(tC) + }, { + no: 7, + name: "run_tests", + kind: "enum", + T: m.getEnumType(tC) + }, { + no: 8, + name: "validate_configuration_message", + kind: "scalar", + T: 9 + }, { + no: 9, + name: "stub_new_function_message", + kind: "scalar", + T: 9 + }, { + no: 10, + name: "verify_spec_message", + kind: "scalar", + T: 9 + }, { + no: 16, + name: "write_test_plan_message", + kind: "scalar", + T: 9 + }, { + no: 11, + name: "write_tests_message", + kind: "scalar", + T: 9 + }, { + no: 12, + name: "write_implementation_message", + kind: "scalar", + T: 9 + }, { + no: 13, + name: "implement_new_function_message", + kind: "scalar", + T: 9 + }, { + no: 14, + name: "run_tests_message", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new R9e().fromBinary(e, t); + } + static fromJson(e, t) { + return new R9e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new R9e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(R9e, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.WAITING = 1] = "WAITING"; + i[i.RUNNING = 2] = "RUNNING"; + i[i.SUCCESS = 3] = "SUCCESS"; + i[i.FAILURE = 4] = "FAILURE"; + })(tC ||= {}); + m.util.setEnumType(tC, "aiserver.v1.InterfaceAgentStatus.Status", [{ + no: 0, + name: "STATUS_UNSPECIFIED" + }, { + no: 1, + name: "STATUS_WAITING" + }, { + no: 2, + name: "STATUS_RUNNING" + }, { + no: 3, + name: "STATUS_SUCCESS" + }, { + no: 4, + name: "STATUS_FAILURE" + }]); + } +}); +var Zie; +var Ujt; +var dCs; +var hCs; +var fCs; +var gCs; +var pCs; +var mCs; +var bCs; +var vCs; +var yCs; +var wCs; +var CCs; +var SCs; +var xCs; +var kCs; +var ECs; +var ese; +var ICs; +var DCs; +var TCs; +var PCs; +var LCs; +var RCs; +var NCs; +var MCs; +var ACs; +var $Cs; +var FCs; +var OCs; +var Rtr; +var Ntr; +var _Cs; +var BCs; +var UCs; +var WCs; +var kdt; +var Wjt; +var VCs; +var HCs; +var qCs; +var jCs; +var Vjt; +var J7; +var Hjt; +var zCs; +var JCs; +var GCs; +var KCs; +var YCs; +var XCs; +var Tve; +var qjt; +var QCs; +var ZCs; +var eSs; +var tSs; +var iSs; +var sSs; +var nSs; +var rSs; +var oSs; +var Pve; +var aSs; +var lSs; +var cSs; +var uSs; +var dSs; +var hSs; +var fSs; +var gSs; +var pSs; +var mSs; +var bSs; +var vSs; +var ySs; +var wSs; +var CSs; +var SSs; +var xSs; +var kSs; +var ESs; +var ISs; +var DSs; +var TSs; +var jjt; +var PSs; +var LSs; +var RSs; +var NSs; +var MSs; +var zjt; +var Jjt; +var ASs; +var $Ss; +var FSs; +var OSs; +var _Ss; +var BSs; +var b1; +var USs; +var WSs; +var VSs; +var Gjt; +var HSs; +var qSs; +var jSs; +var Kjt; +var zSs; +var Yjt; +var Xjt; +var JSs; +var Qjt; +var Zjt; +var ezt; +var GSs; +var KSs; +var YSs; +var XSs; +var QSs; +var ZSs; +var e1s; +var t1s; +var i1s; +var s1s; +var tzt; +var n1s; +var izt; +var r1s; +var Lve; +var a5; +var o1s; +var a1s; +var l1s; +var c1s; +var u1s; +var Rve; +var tse; +var d1s; +var h1s; +var f1s; +var g1s; +var p1s; +var m1s; +var b1s; +var v1s; +var y1s; +var w1s; +var C1s; +var S1s; +var x1s; +var k1s; +var E1s; +var Edt; +var I1s; +var szt; +var D1s; +var T1s; +var P1s; +var L1s; +var R1s; +var N1s; +var M1s; +var A1s; +var $1s; +var F1s; +var nzt; +var O1s; +var fR; +var rzt; +var _1s; +var B1s; +var U1s; +var ozt; +var W1s; +var Nve; +var V1s; +var H1s; +var q1s; +var j1s; +var z1s; +var azt; +var Mve; +var J1s; +var G1s; +var K1s; +var Y1s; +var X1s; +var iJ; +var Q1s; +var lzt; +var Z1s; +var exs; +var txs; +var ixs; +var sxs; +var nxs; +var czt; +var rxs; +var oxs; +var uzt; +var Idt; +var dzt; +var axs; +var lxs; +var cxs; +var uxs; +var dxs; +var Ave; +var hxs; +var hzt; +var fzt; +var fxs; +var gxs; +var pxs; +var mxs; +var gzt; +var bxs; +var vxs; +var yxs; +var wxs; +var Cxs; +var pzt; +var Sxs; +var xxs; +var kxs; +var Exs; +var Ixs; +var l5; +var Dxs; +var Txs; +var Pxs; +var Lxs; +var Rxs; +var Nxs; +var Mxs; +var $ve; +var Axs; +var $xs; +var Fxs; +var Oxs; +var Mtr; +var _xs; +var Bxs; +var Uxs; +var mzt; +var Wxs; +var Vxs; +var Hxs; +var qxs; +var jxs; +var bzt; +var zxs; +var vzt; +var Jxs; +var yzt; +var Gxs; +var Kxs; +var Yxs; +var Fve; +var Ove; +var Xxs; +var Qxs; +var Zxs; +var eks; +var tks; +var iks; +var Atr; +var sks; +var sD; +var nks; +var rks; +var oks; +var aks; +var lks; +var cks; +var uks; +var dks; +var hks; +var fks; +var gks; +var pks; +var mks; +var bks; +var vks; +var yks; +var wks; +var Cks; +var wzt; +var Sks; +var xks; +var kks; +var Eks; +var Iks; +var Dks; +var Tks; +var Pks; +var Lks; +var Czt; +var Rks; +var Nks; +var Mks; +var Szt; +var Aks; +var xzt; +var $ks; +var Fks; +var Oks; +var _ks; +var Bks; +var Uks; +var Wks; +var Vks; +var Hks; +var qks; +var jks; +var zks; +var Jks; +var Gks; +var Kks; +var Yks; +var Xks; +var Qks; +var Zks; +var eEs; +var tEs; +var iEs; +var sEs; +var nEs; +var rEs; +var kzt; +var oEs; +var aEs; +var lEs; +var cEs; +var uEs; +var dEs; +var hEs; +var _ve; +var fEs; +var gEs; +var pEs; +var mEs; +var tg; +var bEs; +var vEs; +var yEs; +var wEs; +var CEs; +var SEs; +var xEs; +var kEs; +var EEs; +var IEs; +var DEs; +var TEs; +var PEs; +var LEs; +var REs; +var Ezt; +var NEs; +var MEs; +var AEs; +var Bve; +var $Es; +var $tr; +var FEs; +var OEs; +var Izt; +var _Es; +var BEs; +var UEs; +var WEs; +var VEs; +var HEs; +var qEs; +var jEs; +var zEs; +var JEs; +var GEs; +var KEs; +var YEs; +var XEs; +var QEs; +var ZEs; +var eIs; +var tIs; +var Dzt; +var iIs; +var sIs; +var nIs; +var Ftr; +var Otr; +var rIs; +var oIs; +var aIs; +var lIs; +var cIs; +var uIs; +var dIs; +var hIs; +var fIs; +var gIs; +var pIs; +var mIs; +var _tr; +var Btr; +var bIs; +var vIs; +var yIs; +var wIs; +var CIs; +var SIs; +var xIs; +var kIs; +var EIs; +var jm = ue({ + "out-build/proto/aiserver/v1/aiserver_pb.js"() { + "use strict"; + + Hr(); + jl(); + Wo(); + jie(); + Lc(); + uS(); + njt(); + udt(); + Dve(); + cS(); + Xut(); + Zz(); + Mjt(); + X0s(); + uCs(); + Ltr(); + Xv(); + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.RUNNING = 1] = "RUNNING"; + i[i.PAUSED = 2] = "PAUSED"; + i[i.DONE = 3] = "DONE"; + i[i.NOT_STARTED = 4] = "NOT_STARTED"; + })(Zie ||= {}); + m.util.setEnumType(Zie, "aiserver.v1.TaskStatus", [{ + no: 0, + name: "TASK_STATUS_UNSPECIFIED" + }, { + no: 1, + name: "TASK_STATUS_RUNNING" + }, { + no: 2, + name: "TASK_STATUS_PAUSED" + }, { + no: 3, + name: "TASK_STATUS_DONE" + }, { + no: 4, + name: "TASK_STATUS_NOT_STARTED" + }]); + Ujt = class N9e extends N { + constructor(e) { + super(); + this.terminalContent = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.IsTerminalFinishedRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "terminal_content", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new N9e().fromBinary(e, t); + } + static fromJson(e, t) { + return new N9e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new N9e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(N9e, e, t); + } + }; + dCs = class M9e extends N { + constructor(e) { + super(); + this.isFinished = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.IsTerminalFinishedResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "is_finished", + kind: "scalar", + T: 8 + }, { + no: 2, + name: "reason", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new M9e().fromBinary(e, t); + } + static fromJson(e, t) { + return new M9e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new M9e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(M9e, e, t); + } + }; + hCs = class A9e extends N { + constructor(e) { + super(); + this.isFinished = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.IsTerminalFinishedResponseV2"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "is_finished", + kind: "scalar", + T: 8 + }, { + no: 2, + name: "ended_reason", + kind: "enum", + T: m.getEnumType(e5), + opt: true + }, { + no: 3, + name: "exit_code", + kind: "scalar", + T: 5, + opt: true + }]); + } + static fromBinary(e, t) { + return new A9e().fromBinary(e, t); + } + static fromJson(e, t) { + return new A9e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new A9e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(A9e, e, t); + } + }; + fCs = class $9e extends N { + constructor(e) { + super(); + this.message = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.TestBidiRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "message", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new $9e().fromBinary(e, t); + } + static fromJson(e, t) { + return new $9e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new $9e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals($9e, e, t); + } + }; + gCs = class F9e extends N { + constructor(e) { + super(); + this.message = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.TestBidiResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "message", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new F9e().fromBinary(e, t); + } + static fromJson(e, t) { + return new F9e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new F9e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(F9e, e, t); + } + }; + pCs = class O9e extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.fileContent = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.AutoContextFile"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "file_content", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new O9e().fromBinary(e, t); + } + static fromJson(e, t) { + return new O9e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new O9e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(O9e, e, t); + } + }; + mCs = class _9e extends N { + constructor(e) { + super(); + this.text = ""; + this.candidateFiles = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.AutoContextRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "text", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "candidate_files", + kind: "message", + T: pCs, + repeated: true + }, { + no: 3, + name: "model_details", + kind: "message", + T: Qa + }]); + } + static fromBinary(e, t) { + return new _9e().fromBinary(e, t); + } + static fromJson(e, t) { + return new _9e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new _9e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(_9e, e, t); + } + }; + bCs = class B9e extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.rerankingScore = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.AutoContextRankedFile"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "reranking_score", + kind: "scalar", + T: 2 + }]); + } + static fromBinary(e, t) { + return new B9e().fromBinary(e, t); + } + static fromJson(e, t) { + return new B9e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new B9e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(B9e, e, t); + } + }; + vCs = class U9e extends N { + constructor(e) { + super(); + this.rankedFiles = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.AutoContextResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "ranked_files", + kind: "message", + T: bCs, + repeated: true + }]); + } + static fromBinary(e, t) { + return new U9e().fromBinary(e, t); + } + static fromJson(e, t) { + return new U9e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new U9e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(U9e, e, t); + } + }; + yCs = class W9e extends N { + constructor(e) { + super(); + this.diffCharLen = 0; + this.iterations = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CheckBugBotPriceRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "diff_char_len", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "iterations", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "model_details", + kind: "message", + T: Qa + }, { + no: 4, + name: "session_id", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new W9e().fromBinary(e, t); + } + static fromJson(e, t) { + return new W9e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new W9e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(W9e, e, t); + } + }; + wCs = class V9e extends N { + constructor(e) { + super(); + this.cost = 0; + this.priceId = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CheckBugBotPriceResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "cost", + kind: "scalar", + T: 1 + }, { + no: 2, + name: "price_id", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new V9e().fromBinary(e, t); + } + static fromJson(e, t) { + return new V9e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new V9e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(V9e, e, t); + } + }; + CCs = class H9e extends N { + constructor(e) { + super(); + this.sessionId = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CheckBugBotTelemetryHealthyRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "session_id", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new H9e().fromBinary(e, t); + } + static fromJson(e, t) { + return new H9e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new H9e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(H9e, e, t); + } + }; + SCs = class q9e extends N { + constructor(e) { + super(); + this.isHealthy = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CheckBugBotTelemetryHealthyResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "is_healthy", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new q9e().fromBinary(e, t); + } + static fromJson(e, t) { + return new q9e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new q9e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(q9e, e, t); + } + }; + xCs = class j9e extends N { + constructor(e) { + super(); + this.diffCharLen = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetSuggestedBugBotIterationsRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "diff_char_len", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "model_details", + kind: "message", + T: Qa + }]); + } + static fromBinary(e, t) { + return new j9e().fromBinary(e, t); + } + static fromJson(e, t) { + return new j9e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new j9e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(j9e, e, t); + } + }; + kCs = class z9e extends N { + constructor(e) { + super(); + this.iterations = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetSuggestedBugBotIterationsResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "iterations", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new z9e().fromBinary(e, t); + } + static fromJson(e, t) { + return new z9e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new z9e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(z9e, e, t); + } + }; + ECs = class J9e extends N { + constructor(e) { + super(); + this.status = ese.UNSPECIFIED; + this.message = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.BugBotStatus"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "status", + kind: "enum", + T: m.getEnumType(ese) + }, { + no: 2, + name: "message", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "iterations_completed", + kind: "scalar", + T: 5, + opt: true + }, { + no: 4, + name: "total_iterations", + kind: "scalar", + T: 5, + opt: true + }, { + no: 5, + name: "total_tokens", + kind: "scalar", + T: 5, + opt: true + }, { + no: 6, + name: "processed_tokens", + kind: "scalar", + T: 5, + opt: true + }, { + no: 7, + name: "processed_cost", + kind: "scalar", + T: 2, + opt: true + }, { + no: 8, + name: "thinking_tokens", + kind: "scalar", + T: 5, + opt: true + }, { + no: 9, + name: "thinking_cost", + kind: "scalar", + T: 2, + opt: true + }]); + } + static fromBinary(e, t) { + return new J9e().fromBinary(e, t); + } + static fromJson(e, t) { + return new J9e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new J9e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(J9e, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.IN_PROGRESS = 1] = "IN_PROGRESS"; + i[i.IN_PROGRESS_ITERATIONS = 2] = "IN_PROGRESS_ITERATIONS"; + i[i.DONE = 3] = "DONE"; + })(ese ||= {}); + m.util.setEnumType(ese, "aiserver.v1.BugBotStatus.Status", [{ + no: 0, + name: "STATUS_UNSPECIFIED" + }, { + no: 1, + name: "STATUS_IN_PROGRESS" + }, { + no: 2, + name: "STATUS_IN_PROGRESS_ITERATIONS" + }, { + no: 3, + name: "STATUS_DONE" + }]); + ICs = class G9e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamBugBotResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "bug_reports", + kind: "message", + T: Lqt, + opt: true + }, { + no: 2, + name: "status", + kind: "message", + T: ECs + }]); + } + static fromBinary(e, t) { + return new G9e().fromBinary(e, t); + } + static fromJson(e, t) { + return new G9e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new G9e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(G9e, e, t); + } + }; + DCs = class K9e extends N { + constructor(e) { + super(); + this.chatConversationHistory = []; + this.cppDiffTrajectories = []; + this.candidateFiles = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ContextRerankingRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "current_file", + kind: "message", + T: tu, + opt: true + }, { + no: 2, + name: "chat_conversation_history", + kind: "message", + T: Al, + repeated: true + }, { + no: 3, + name: "cpp_diff_trajectories", + kind: "message", + T: Fx, + repeated: true + }, { + no: 4, + name: "candidate_files", + kind: "message", + T: dvs, + repeated: true + }]); + } + static fromBinary(e, t) { + return new K9e().fromBinary(e, t); + } + static fromJson(e, t) { + return new K9e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new K9e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(K9e, e, t); + } + }; + TCs = class Y9e extends N { + constructor(e) { + super(); + this.rerankingScores = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ContextRerankingResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "reranking_scores", + kind: "scalar", + T: 2, + repeated: true + }]); + } + static fromBinary(e, t) { + return new Y9e().fromBinary(e, t); + } + static fromJson(e, t) { + return new Y9e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Y9e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Y9e, e, t); + } + }; + PCs = class X9e extends N { + constructor(e) { + super(); + this.messages = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.NameTabRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "messages", + kind: "message", + T: Al, + repeated: true + }]); + } + static fromBinary(e, t) { + return new X9e().fromBinary(e, t); + } + static fromJson(e, t) { + return new X9e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new X9e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(X9e, e, t); + } + }; + LCs = class Q9e extends N { + constructor(e) { + super(); + this.name = ""; + this.reason = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.NameTabResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "name", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "reason", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new Q9e().fromBinary(e, t); + } + static fromJson(e, t) { + return new Q9e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Q9e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Q9e, e, t); + } + }; + RCs = class Z9e extends N { + constructor(e) { + super(); + this.modelName = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.TestModelStatusRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "model_name", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new Z9e().fromBinary(e, t); + } + static fromJson(e, t) { + return new Z9e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Z9e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Z9e, e, t); + } + }; + NCs = class e7e extends N { + constructor(e) { + super(); + this.text = ""; + this.latency = 0; + this.ttft = 0; + this.maxTimeBetweenChunks = 0; + this.serverTiming = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.TestModelStatusResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "text", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "latency", + kind: "scalar", + T: 2 + }, { + no: 3, + name: "ttft", + kind: "scalar", + T: 2 + }, { + no: 4, + name: "max_time_between_chunks", + kind: "scalar", + T: 2 + }, { + no: 5, + name: "server_timing", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new e7e().fromBinary(e, t); + } + static fromJson(e, t) { + return new e7e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new e7e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(e7e, e, t); + } + }; + MCs = class t7e extends N { + constructor(e) { + super(); + this.workspaceRelativePath = ""; + this.text = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.TryParseTypeScriptTreeSitterRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "workspace_relative_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "text", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new t7e().fromBinary(e, t); + } + static fromJson(e, t) { + return new t7e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new t7e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(t7e, e, t); + } + }; + ACs = class i7e extends N { + constructor(e) { + super(); + this.text = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.TryParseTypeScriptTreeSitterResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "text", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new i7e().fromBinary(e, t); + } + static fromJson(e, t) { + return new i7e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new i7e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(i7e, e, t); + } + }; + $Cs = class s7e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.DevOnlyGetPastRequestIdsRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "count", + kind: "scalar", + T: 5, + opt: true + }, { + no: 2, + name: "page", + kind: "scalar", + T: 5, + opt: true + }]); + } + static fromBinary(e, t) { + return new s7e().fromBinary(e, t); + } + static fromJson(e, t) { + return new s7e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new s7e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(s7e, e, t); + } + }; + FCs = class n7e extends N { + constructor(e) { + super(); + this.requestId = ""; + this.dateTime = ""; + this.modelName = ""; + this.featureName = ""; + this.s3Uri = ""; + this.status = ""; + this.numPromptTokens = 0; + this.numCompletionTokens = 0; + this.apiCallMethod = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.DevOnlyPastRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "request_id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "date_time", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "model_name", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "feature_name", + kind: "scalar", + T: 9 + }, { + no: 5, + name: "s3_uri", + kind: "scalar", + T: 9 + }, { + no: 6, + name: "status", + kind: "scalar", + T: 9 + }, { + no: 7, + name: "num_prompt_tokens", + kind: "scalar", + T: 5 + }, { + no: 8, + name: "num_completion_tokens", + kind: "scalar", + T: 5 + }, { + no: 9, + name: "api_call_method", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new n7e().fromBinary(e, t); + } + static fromJson(e, t) { + return new n7e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new n7e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(n7e, e, t); + } + }; + OCs = class r7e extends N { + constructor(e) { + super(); + this.pastRequests = []; + this.totalCount = 0; + this.hasMore = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.DevOnlyGetPastRequestIdsResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "past_requests", + kind: "message", + T: FCs, + repeated: true + }, { + no: 10, + name: "total_count", + kind: "scalar", + T: 5 + }, { + no: 11, + name: "has_more", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new r7e().fromBinary(e, t); + } + static fromJson(e, t) { + return new r7e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new r7e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(r7e, e, t); + } + }; + Rtr = class o7e extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.fileContent = ""; + this.query = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetContextBankContextRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "file_content", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "query", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new o7e().fromBinary(e, t); + } + static fromJson(e, t) { + return new o7e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new o7e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(o7e, e, t); + } + }; + Ntr = class a7e extends N { + constructor(e) { + super(); + this.context = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetContextBankContextResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "context", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new a7e().fromBinary(e, t); + } + static fromJson(e, t) { + return new a7e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new a7e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(a7e, e, t); + } + }; + _Cs = class l7e extends N { + constructor(e) { + super(); + this.contextToRank = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetRankedContextFromContextBankRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "composer_request", + kind: "message", + T: $ve + }, { + no: 2, + name: "context_to_rank", + kind: "message", + T: jqt, + repeated: true + }]); + } + static fromBinary(e, t) { + return new l7e().fromBinary(e, t); + } + static fromJson(e, t) { + return new l7e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new l7e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(l7e, e, t); + } + }; + BCs = class c7e extends N { + constructor(e) { + super(); + this.rankedContext = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetRankedContextFromContextBankResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "ranked_context", + kind: "message", + T: tdt, + repeated: true + }]); + } + static fromBinary(e, t) { + return new c7e().fromBinary(e, t); + } + static fromJson(e, t) { + return new c7e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new c7e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(c7e, e, t); + } + }; + UCs = class u7e extends N { + constructor(e) { + super(); + this.questions = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetCodebaseQuestionsResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "questions", + kind: "scalar", + T: 9, + repeated: true + }]); + } + static fromBinary(e, t) { + return new u7e().fromBinary(e, t); + } + static fromJson(e, t) { + return new u7e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new u7e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(u7e, e, t); + } + }; + WCs = class d7e extends N { + constructor(e) { + super(); + this.index = 0; + this.text = ""; + this.type = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.AtSymbolOption"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "index", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "text", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "type", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new d7e().fromBinary(e, t); + } + static fromJson(e, t) { + return new d7e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new d7e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(d7e, e, t); + } + }; + kdt = class h7e extends N { + constructor(e) { + super(); + this.name = ""; + this.fromFile = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.AtSymbolDependencyInformation"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "name", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "from_file", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new h7e().fromBinary(e, t); + } + static fromJson(e, t) { + return new h7e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new h7e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(h7e, e, t); + } + }; + Wjt = class f7e extends N { + constructor(e) { + super(); + this.atSymbolDependencies = []; + this.atSymbolOptions = []; + this.userQuery = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetAtSymbolSuggestionsRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "current_file_info", + kind: "message", + T: tu + }, { + no: 2, + name: "at_symbol_dependencies", + kind: "message", + T: kdt, + repeated: true + }, { + no: 3, + name: "at_symbol_options", + kind: "message", + T: WCs, + repeated: true + }, { + no: 4, + name: "user_query", + kind: "scalar", + T: 9 + }, { + no: 5, + name: "model_details", + kind: "message", + T: Qa + }]); + } + static fromBinary(e, t) { + return new f7e().fromBinary(e, t); + } + static fromJson(e, t) { + return new f7e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new f7e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(f7e, e, t); + } + }; + VCs = class g7e extends N { + constructor(e) { + super(); + this.indices = []; + this.explanation = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetAtSymbolSuggestionsResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "indices", + kind: "scalar", + T: 5, + repeated: true + }, { + no: 2, + name: "explanation", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new g7e().fromBinary(e, t); + } + static fromJson(e, t) { + return new g7e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new g7e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(g7e, e, t); + } + }; + HCs = class p7e extends N { + constructor(e) { + super(); + this.name = ""; + this.isFolder = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CurrentFolderFileOrFolder"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "name", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "is_folder", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new p7e().fromBinary(e, t); + } + static fromJson(e, t) { + return new p7e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new p7e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(p7e, e, t); + } + }; + qCs = class m7e extends N { + constructor(e) { + super(); + this.currentCommand = ""; + this.commandHistory = []; + this.fileDiffHistories = []; + this.commitHistory = []; + this.pastResults = []; + this.userPlatform = ""; + this.currentFolder = ""; + this.currentFolderStructure = []; + this.relevantFiles = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetTerminalCompletionRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "current_command", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "command_history", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 3, + name: "model_name", + kind: "scalar", + T: 9, + opt: true + }, { + no: 4, + name: "file_diff_histories", + kind: "message", + T: Fx, + repeated: true + }, { + no: 5, + name: "git_diff", + kind: "scalar", + T: 9, + opt: true + }, { + no: 6, + name: "commit_history", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 7, + name: "past_results", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 8, + name: "model_details", + kind: "message", + T: Qa + }, { + no: 9, + name: "user_platform", + kind: "scalar", + T: 9 + }, { + no: 10, + name: "current_folder", + kind: "scalar", + T: 9 + }, { + no: 11, + name: "current_folder_structure", + kind: "message", + T: HCs, + repeated: true + }, { + no: 12, + name: "relevant_files", + kind: "message", + T: $x, + repeated: true + }]); + } + static fromBinary(e, t) { + return new m7e().fromBinary(e, t); + } + static fromJson(e, t) { + return new m7e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new m7e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(m7e, e, t); + } + }; + jCs = class b7e extends N { + constructor(e) { + super(); + this.command = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetTerminalCompletionResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "command", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new b7e().fromBinary(e, t); + } + static fromJson(e, t) { + return new b7e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new b7e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(b7e, e, t); + } + }; + Vjt = class v7e extends N { + constructor(e) { + super(); + this.type = J7.UNSPECIFIED; + this.startLine = 0; + this.endLine = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.HeuristicsSelection"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "type", + kind: "enum", + T: m.getEnumType(J7) + }, { + no: 2, + name: "start_line", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "end_line", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new v7e().fromBinary(e, t); + } + static fromJson(e, t) { + return new v7e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new v7e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(v7e, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.GROUP = 1] = "GROUP"; + i[i.LINE = 2] = "LINE"; + i[i.FOLDING = 3] = "FOLDING"; + })(J7 ||= {}); + m.util.setEnumType(J7, "aiserver.v1.HeuristicsSelection.HeuristicsSelectionType", [{ + no: 0, + name: "HEURISTICS_SELECTION_TYPE_UNSPECIFIED" + }, { + no: 1, + name: "HEURISTICS_SELECTION_TYPE_GROUP" + }, { + no: 2, + name: "HEURISTICS_SELECTION_TYPE_LINE" + }, { + no: 3, + name: "HEURISTICS_SELECTION_TYPE_FOLDING" + }]); + Hjt = class y7e extends N { + constructor(e) { + super(); + this.heuristicsSelections = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CalculateAutoSelectionRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "current_file_info", + kind: "message", + T: tu + }, { + no: 2, + name: "cursor_position", + kind: "message", + T: sv + }, { + no: 3, + name: "selection_range", + kind: "message", + T: Of + }, { + no: 4, + name: "model_details", + kind: "message", + T: Qa + }, { + no: 5, + name: "heuristics_selections", + kind: "message", + T: Vjt, + repeated: true + }]); + } + static fromBinary(e, t) { + return new y7e().fromBinary(e, t); + } + static fromJson(e, t) { + return new y7e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new y7e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(y7e, e, t); + } + }; + zCs = class w7e extends N { + constructor(e) { + super(); + this.text = ""; + this.startLine = 0; + this.endLine = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.AutoSelectionInstructions"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "text", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "start_line", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "end_line", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new w7e().fromBinary(e, t); + } + static fromJson(e, t) { + return new w7e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new w7e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(w7e, e, t); + } + }; + JCs = class C7e extends N { + constructor(e) { + super(); + this.startLine = 0; + this.endLine = 0; + this.instructions = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.AutoSelectionResult"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "start_line", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "end_line", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "instructions", + kind: "message", + T: zCs, + repeated: true + }]); + } + static fromBinary(e, t) { + return new C7e().fromBinary(e, t); + } + static fromJson(e, t) { + return new C7e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new C7e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(C7e, e, t); + } + }; + GCs = class S7e extends N { + constructor(e) { + super(); + this.results = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CalculateAutoSelectionResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "results", + kind: "message", + T: JCs, + repeated: true + }]); + } + static fromBinary(e, t) { + return new S7e().fromBinary(e, t); + } + static fromJson(e, t) { + return new S7e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new S7e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(S7e, e, t); + } + }; + KCs = class x7e extends N { + constructor(e) { + super(); + this.instruction = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamCursorMotionRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "current_file_info", + kind: "message", + T: tu + }, { + no: 2, + name: "selection_range", + kind: "message", + T: Of + }, { + no: 3, + name: "instruction", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "model_details", + kind: "message", + T: Qa + }]); + } + static fromBinary(e, t) { + return new x7e().fromBinary(e, t); + } + static fromJson(e, t) { + return new x7e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new x7e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(x7e, e, t); + } + }; + YCs = class k7e extends N { + constructor(e) { + super(); + this.text = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamCursorMotionResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "text", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new k7e().fromBinary(e, t); + } + static fromJson(e, t) { + return new k7e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new k7e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(k7e, e, t); + } + }; + XCs = class E7e extends N { + constructor(e) { + super(); + this.instruction = ""; + this.type = Tve.UNSPECIFIED; + this.proposedChangeHistory = []; + this.relatedCodeBlocks = []; + this.diffHistory = []; + this.linterErrors = []; + this.usefulTypes = []; + this.recentlyViewedFiles = []; + this.recentDiffs = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.BackgroundCmdKRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "instruction", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "current_file", + kind: "message", + T: tu + }, { + no: 3, + name: "selection_range", + kind: "message", + T: Of + }, { + no: 4, + name: "type", + kind: "enum", + T: m.getEnumType(Tve) + }, { + no: 5, + name: "proposed_change_history", + kind: "message", + T: eSs, + repeated: true + }, { + no: 6, + name: "related_code_blocks", + kind: "message", + T: Xg, + repeated: true + }, { + no: 7, + name: "diff_history", + kind: "message", + T: Fx, + repeated: true + }, { + no: 8, + name: "linter_errors", + kind: "message", + T: qjt, + repeated: true + }, { + no: 9, + name: "useful_types", + kind: "message", + T: tSs, + repeated: true + }, { + no: 10, + name: "recently_viewed_files", + kind: "message", + T: iSs, + repeated: true + }, { + no: 11, + name: "recent_diffs", + kind: "message", + T: nSs, + repeated: true + }, { + no: 12, + name: "multiple_completions", + kind: "scalar", + T: 8, + opt: true + }]); + } + static fromBinary(e, t) { + return new E7e().fromBinary(e, t); + } + static fromJson(e, t) { + return new E7e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new E7e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(E7e, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.REFLECT = 1] = "REFLECT"; + i[i.LOOP_ON_LINTS = 2] = "LOOP_ON_LINTS"; + i[i.CHAT_AND_APPLY = 3] = "CHAT_AND_APPLY"; + i[i.COALESCE_GENERATIONS = 4] = "COALESCE_GENERATIONS"; + i[i.CODEBASE_CHUNKS = 5] = "CODEBASE_CHUNKS"; + i[i.SPEC_AND_APPLY = 6] = "SPEC_AND_APPLY"; + i[i.ASK_CODEBASE = 7] = "ASK_CODEBASE"; + i[i.FINETUNED_INSTRUCTIONS = 8] = "FINETUNED_INSTRUCTIONS"; + i[i.USEFUL_TYPES = 9] = "USEFUL_TYPES"; + i[i.CHAT_AND_APPLY_UNDERSPECIFIED = 10] = "CHAT_AND_APPLY_UNDERSPECIFIED"; + })(Tve ||= {}); + m.util.setEnumType(Tve, "aiserver.v1.BackgroundCmdKRequest.Type", [{ + no: 0, + name: "TYPE_UNSPECIFIED" + }, { + no: 1, + name: "TYPE_REFLECT" + }, { + no: 2, + name: "TYPE_LOOP_ON_LINTS" + }, { + no: 3, + name: "TYPE_CHAT_AND_APPLY" + }, { + no: 4, + name: "TYPE_COALESCE_GENERATIONS" + }, { + no: 5, + name: "TYPE_CODEBASE_CHUNKS" + }, { + no: 6, + name: "TYPE_SPEC_AND_APPLY" + }, { + no: 7, + name: "TYPE_ASK_CODEBASE" + }, { + no: 8, + name: "TYPE_FINETUNED_INSTRUCTIONS" + }, { + no: 9, + name: "TYPE_USEFUL_TYPES" + }, { + no: 10, + name: "TYPE_CHAT_AND_APPLY_UNDERSPECIFIED" + }]); + qjt = class I7e extends N { + constructor(e) { + super(); + this.message = ""; + this.severity = ""; + this.relativeWorkspacePath = ""; + this.startLineNumberOneIndexed = 0; + this.startColumnOneIndexed = 0; + this.endLineNumberInclusiveOneIndexed = 0; + this.endColumnOneIndexed = 0; + this.quickFixes = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.BackgroundCmdKRequest.Lint"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "message", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "severity", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "start_line_number_one_indexed", + kind: "scalar", + T: 5 + }, { + no: 5, + name: "start_column_one_indexed", + kind: "scalar", + T: 5 + }, { + no: 6, + name: "end_line_number_inclusive_one_indexed", + kind: "scalar", + T: 5 + }, { + no: 7, + name: "end_column_one_indexed", + kind: "scalar", + T: 5 + }, { + no: 9, + name: "quick_fixes", + kind: "message", + T: QCs, + repeated: true + }]); + } + static fromBinary(e, t) { + return new I7e().fromBinary(e, t); + } + static fromJson(e, t) { + return new I7e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new I7e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(I7e, e, t); + } + }; + QCs = class D7e extends N { + constructor(e) { + super(); + this.message = ""; + this.kind = ""; + this.isPreferred = false; + this.edits = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.BackgroundCmdKRequest.Lint.QuickFix"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "message", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "kind", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "is_preferred", + kind: "scalar", + T: 8 + }, { + no: 4, + name: "edits", + kind: "message", + T: ZCs, + repeated: true + }]); + } + static fromBinary(e, t) { + return new D7e().fromBinary(e, t); + } + static fromJson(e, t) { + return new D7e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new D7e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(D7e, e, t); + } + }; + ZCs = class T7e extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.text = ""; + this.startLineNumberOneIndexed = 0; + this.startColumnOneIndexed = 0; + this.endLineNumberInclusiveOneIndexed = 0; + this.endColumnOneIndexed = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.BackgroundCmdKRequest.Lint.QuickFix.Edit"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "text", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "start_line_number_one_indexed", + kind: "scalar", + T: 5 + }, { + no: 4, + name: "start_column_one_indexed", + kind: "scalar", + T: 5 + }, { + no: 5, + name: "end_line_number_inclusive_one_indexed", + kind: "scalar", + T: 5 + }, { + no: 6, + name: "end_column_one_indexed", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new T7e().fromBinary(e, t); + } + static fromJson(e, t) { + return new T7e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new T7e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(T7e, e, t); + } + }; + eSs = class P7e extends N { + constructor(e) { + super(); + this.change = ""; + this.linterErrors = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.BackgroundCmdKRequest.ProposedChange"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "change", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "linter_errors", + kind: "message", + T: qjt, + repeated: true + }]); + } + static fromBinary(e, t) { + return new P7e().fromBinary(e, t); + } + static fromJson(e, t) { + return new P7e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new P7e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(P7e, e, t); + } + }; + tSs = class L7e extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.startLine = 0; + this.text = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.BackgroundCmdKRequest.UsefulType"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "start_line", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "text", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "score", + kind: "scalar", + T: 1, + opt: true + }]); + } + static fromBinary(e, t) { + return new L7e().fromBinary(e, t); + } + static fromJson(e, t) { + return new L7e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new L7e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(L7e, e, t); + } + }; + iSs = class R7e extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.contents = ""; + this.visibleRanges = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.BackgroundCmdKRequest.RecentlyViewedFile"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "contents", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "visible_ranges", + kind: "message", + T: sSs, + repeated: true + }]); + } + static fromBinary(e, t) { + return new R7e().fromBinary(e, t); + } + static fromJson(e, t) { + return new R7e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new R7e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(R7e, e, t); + } + }; + sSs = class N7e extends N { + constructor(e) { + super(); + this.startLineNumberInclusive = 0; + this.endLineNumberExclusive = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.BackgroundCmdKRequest.RecentlyViewedFile.VisibleRange"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "start_line_number_inclusive", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "end_line_number_exclusive", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "viewed_at", + kind: "scalar", + T: 5, + opt: true + }, { + no: 4, + name: "global_order_descending", + kind: "scalar", + T: 5, + opt: true + }]); + } + static fromBinary(e, t) { + return new N7e().fromBinary(e, t); + } + static fromJson(e, t) { + return new N7e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new N7e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(N7e, e, t); + } + }; + nSs = class M7e extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.diff = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.BackgroundCmdKRequest.Diff"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "diff", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new M7e().fromBinary(e, t); + } + static fromJson(e, t) { + return new M7e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new M7e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(M7e, e, t); + } + }; + rSs = class A7e extends N { + constructor(e) { + super(); + this.proposedChange = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.BackgroundCmdKResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "proposed_change", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new A7e().fromBinary(e, t); + } + static fromJson(e, t) { + return new A7e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new A7e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(A7e, e, t); + } + }; + oSs = class $7e extends N { + constructor(e) { + super(); + this.instruction = ""; + this.groundTruth = ""; + this.experiment = Pve.UNSPECIFIED; + this.runAutomatedEval = false; + this.proposedChangeHistory = []; + this.commitNotes = []; + this.relatedCodeBlocks = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.BackgroundCmdKEvalRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "instruction", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "current_file", + kind: "message", + T: tu + }, { + no: 3, + name: "selection_range", + kind: "message", + T: Of + }, { + no: 4, + name: "ground_truth", + kind: "scalar", + T: 9 + }, { + no: 5, + name: "experiment", + kind: "enum", + T: m.getEnumType(Pve) + }, { + no: 6, + name: "run_automated_eval", + kind: "scalar", + T: 8 + }, { + no: 7, + name: "proposed_change_history", + kind: "message", + T: uSs, + repeated: true + }, { + no: 8, + name: "commit_notes", + kind: "message", + T: but, + repeated: true + }, { + no: 9, + name: "related_code_blocks", + kind: "message", + T: Xg, + repeated: true + }]); + } + static fromBinary(e, t) { + return new $7e().fromBinary(e, t); + } + static fromJson(e, t) { + return new $7e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new $7e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals($7e, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.REFLECT = 1] = "REFLECT"; + i[i.CMD_K_ORIGINAL_RADIUS = 2] = "CMD_K_ORIGINAL_RADIUS"; + i[i.LOOP_ON_LINTS = 3] = "LOOP_ON_LINTS"; + i[i.CHAT_AND_APPLY = 4] = "CHAT_AND_APPLY"; + i[i.COMMIT_NOTES = 5] = "COMMIT_NOTES"; + i[i.COALESCE_GENERATIONS = 6] = "COALESCE_GENERATIONS"; + i[i.REWORD_INSTRUCTIONS = 7] = "REWORD_INSTRUCTIONS"; + i[i.CODEBASE_CHUNKS = 8] = "CODEBASE_CHUNKS"; + i[i.SPEC_AND_APPLY = 9] = "SPEC_AND_APPLY"; + i[i.ASK_CODEBASE = 10] = "ASK_CODEBASE"; + })(Pve ||= {}); + m.util.setEnumType(Pve, "aiserver.v1.BackgroundCmdKEvalRequest.Experiment", [{ + no: 0, + name: "EXPERIMENT_UNSPECIFIED" + }, { + no: 1, + name: "EXPERIMENT_REFLECT" + }, { + no: 2, + name: "EXPERIMENT_CMD_K_ORIGINAL_RADIUS" + }, { + no: 3, + name: "EXPERIMENT_LOOP_ON_LINTS" + }, { + no: 4, + name: "EXPERIMENT_CHAT_AND_APPLY" + }, { + no: 5, + name: "EXPERIMENT_COMMIT_NOTES" + }, { + no: 6, + name: "EXPERIMENT_COALESCE_GENERATIONS" + }, { + no: 7, + name: "EXPERIMENT_REWORD_INSTRUCTIONS" + }, { + no: 8, + name: "EXPERIMENT_CODEBASE_CHUNKS" + }, { + no: 9, + name: "EXPERIMENT_SPEC_AND_APPLY" + }, { + no: 10, + name: "EXPERIMENT_ASK_CODEBASE" + }]); + aSs = class F7e extends N { + constructor(e) { + super(); + this.message = ""; + this.severity = ""; + this.relativeWorkspacePath = ""; + this.startLineNumberOneIndexed = 0; + this.startColumnOneIndexed = 0; + this.endLineNumberInclusiveOneIndexed = 0; + this.endColumnOneIndexed = 0; + this.quickFixes = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.BackgroundCmdKEvalRequest.Lint"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "message", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "severity", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "start_line_number_one_indexed", + kind: "scalar", + T: 5 + }, { + no: 5, + name: "start_column_one_indexed", + kind: "scalar", + T: 5 + }, { + no: 6, + name: "end_line_number_inclusive_one_indexed", + kind: "scalar", + T: 5 + }, { + no: 7, + name: "end_column_one_indexed", + kind: "scalar", + T: 5 + }, { + no: 9, + name: "quick_fixes", + kind: "message", + T: lSs, + repeated: true + }]); + } + static fromBinary(e, t) { + return new F7e().fromBinary(e, t); + } + static fromJson(e, t) { + return new F7e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new F7e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(F7e, e, t); + } + }; + lSs = class O7e extends N { + constructor(e) { + super(); + this.message = ""; + this.kind = ""; + this.isPreferred = false; + this.edits = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.BackgroundCmdKEvalRequest.Lint.QuickFix"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "message", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "kind", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "is_preferred", + kind: "scalar", + T: 8 + }, { + no: 4, + name: "edits", + kind: "message", + T: cSs, + repeated: true + }]); + } + static fromBinary(e, t) { + return new O7e().fromBinary(e, t); + } + static fromJson(e, t) { + return new O7e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new O7e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(O7e, e, t); + } + }; + cSs = class _7e extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.text = ""; + this.startLineNumberOneIndexed = 0; + this.startColumnOneIndexed = 0; + this.endLineNumberInclusiveOneIndexed = 0; + this.endColumnOneIndexed = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.BackgroundCmdKEvalRequest.Lint.QuickFix.Edit"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "text", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "start_line_number_one_indexed", + kind: "scalar", + T: 5 + }, { + no: 4, + name: "start_column_one_indexed", + kind: "scalar", + T: 5 + }, { + no: 5, + name: "end_line_number_inclusive_one_indexed", + kind: "scalar", + T: 5 + }, { + no: 6, + name: "end_column_one_indexed", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new _7e().fromBinary(e, t); + } + static fromJson(e, t) { + return new _7e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new _7e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(_7e, e, t); + } + }; + uSs = class B7e extends N { + constructor(e) { + super(); + this.change = ""; + this.linterErrors = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.BackgroundCmdKEvalRequest.ProposedChange"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "change", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "linter_errors", + kind: "message", + T: aSs, + repeated: true + }]); + } + static fromBinary(e, t) { + return new B7e().fromBinary(e, t); + } + static fromJson(e, t) { + return new B7e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new B7e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(B7e, e, t); + } + }; + dSs = class U7e extends N { + constructor(e) { + super(); + this.proposedChange = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.BackgroundCmdKEvalResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "proposed_change", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new U7e().fromBinary(e, t); + } + static fromJson(e, t) { + return new U7e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new U7e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(U7e, e, t); + } + }; + hSs = class W7e extends N { + constructor(e) { + super(); + this.requestId = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetThoughtAnnotationRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "request_id", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new W7e().fromBinary(e, t); + } + static fromJson(e, t) { + return new W7e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new W7e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(W7e, e, t); + } + }; + fSs = class V7e extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetThoughtAnnotationResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "thought_annotation", + kind: "message", + T: gSs + }]); + } + static fromBinary(e, t) { + return new V7e().fromBinary(e, t); + } + static fromJson(e, t) { + return new V7e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new V7e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(V7e, e, t); + } + }; + gSs = class H7e extends N { + constructor(e) { + super(); + this.requestId = ""; + this.authId = ""; + this.thought = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.AiThoughtAnnotation"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "request_id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "auth_id", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "debug_info", + kind: "message", + T: KT + }, { + no: 4, + name: "thought", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new H7e().fromBinary(e, t); + } + static fromJson(e, t) { + return new H7e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new H7e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(H7e, e, t); + } + }; + pSs = class q7e extends N { + constructor(e) { + super(); + this.texts = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.BulkEmbedRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "texts", + kind: "scalar", + T: 9, + repeated: true + }]); + } + static fromBinary(e, t) { + return new q7e().fromBinary(e, t); + } + static fromJson(e, t) { + return new q7e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new q7e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(q7e, e, t); + } + }; + mSs = class j7e extends N { + constructor(e) { + super(); + this.embeddings = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.BulkEmbedResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "embeddings", + kind: "message", + T: bSs, + repeated: true + }]); + } + static fromBinary(e, t) { + return new j7e().fromBinary(e, t); + } + static fromJson(e, t) { + return new j7e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new j7e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(j7e, e, t); + } + }; + bSs = class z7e extends N { + constructor(e) { + super(); + this.embedding = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.EmbeddingResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "embedding", + kind: "scalar", + T: 1, + repeated: true + }]); + } + static fromBinary(e, t) { + return new z7e().fromBinary(e, t); + } + static fromJson(e, t) { + return new z7e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new z7e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(z7e, e, t); + } + }; + vSs = class J7e extends N { + constructor(e) { + super(); + this.commitHash = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.TakeNotesOnCommitDiffRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "diff", + kind: "message", + T: ofs + }, { + no: 2, + name: "commit_hash", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new J7e().fromBinary(e, t); + } + static fromJson(e, t) { + return new J7e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new J7e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(J7e, e, t); + } + }; + ySs = class G7e extends N { + constructor(e) { + super(); + this.notes = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.TakeNotesOnCommitDiffResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "notes", + kind: "message", + T: rfs, + repeated: true + }]); + } + static fromBinary(e, t) { + return new G7e().fromBinary(e, t); + } + static fromJson(e, t) { + return new G7e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new G7e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(G7e, e, t); + } + }; + wSs = class K7e extends N { + constructor(e) { + super(); + this.sessionId = ""; + this.commits = []; + this.requestId = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ContinueChatRequestWithCommitsRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "session_id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "commits", + kind: "message", + T: CSs, + repeated: true + }, { + no: 3, + name: "request_id", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new K7e().fromBinary(e, t); + } + static fromJson(e, t) { + return new K7e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new K7e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(K7e, e, t); + } + }; + CSs = class Y7e extends N { + constructor(e) { + super(); + this.commitHash = ""; + this.diff = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SimpleCommitWithDiff"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "commit_hash", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "diff", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new Y7e().fromBinary(e, t); + } + static fromJson(e, t) { + return new Y7e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Y7e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Y7e, e, t); + } + }; + SSs = class X7e extends N { + constructor(e) { + super(); + this.aiResponse = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamBranchFileSelectionsRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "ai_response", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "override_model", + kind: "scalar", + T: 9, + opt: true + }, { + no: 3, + name: "override_token_limit", + kind: "scalar", + T: 5, + opt: true + }]); + } + static fromBinary(e, t) { + return new X7e().fromBinary(e, t); + } + static fromJson(e, t) { + return new X7e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new X7e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(X7e, e, t); + } + }; + xSs = class Q7e extends N { + constructor(e) { + super(); + this.fileInstructions = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamBranchFileSelectionsResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "file_instructions", + kind: "message", + T: kSs, + repeated: true + }]); + } + static fromBinary(e, t) { + return new Q7e().fromBinary(e, t); + } + static fromJson(e, t) { + return new Q7e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Q7e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Q7e, e, t); + } + }; + kSs = class Z7e extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.instruction = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamBranchFileSelectionsResponse.FileInstruction"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "instruction", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new Z7e().fromBinary(e, t); + } + static fromJson(e, t) { + return new Z7e().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Z7e().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Z7e, e, t); + } + }; + ESs = class eUe extends N { + constructor(e) { + super(); + this.branchName = ""; + this.branchNotes = ""; + this.globalNotes = ""; + this.pastThoughts = []; + this.potentiallyRelevantCommits = []; + this.files = []; + this.contextGraphFiles = []; + this.crucialFiles = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamBranchGeminiRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "branch_name", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "branch_notes", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "global_notes", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "past_thoughts", + kind: "message", + T: TSs, + repeated: true + }, { + no: 5, + name: "diff_to_base_branch", + kind: "message", + T: ISs + }, { + no: 6, + name: "potentially_relevant_commits", + kind: "message", + T: iA, + repeated: true + }, { + no: 7, + name: "files", + kind: "message", + T: jjt, + repeated: true + }, { + no: 8, + name: "context_graph_files", + kind: "message", + T: PSs, + repeated: true + }, { + no: 12, + name: "crucial_files", + kind: "message", + T: jjt, + repeated: true + }, { + no: 9, + name: "override_model", + kind: "scalar", + T: 9, + opt: true + }, { + no: 10, + name: "override_token_limit", + kind: "scalar", + T: 5, + opt: true + }]); + } + static fromBinary(e, t) { + return new eUe().fromBinary(e, t); + } + static fromJson(e, t) { + return new eUe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new eUe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(eUe, e, t); + } + }; + ISs = class tUe extends N { + constructor(e) { + super(); + this.fileDiffs = []; + this.commits = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamBranchGeminiRequest.BranchDiff"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "file_diffs", + kind: "message", + T: DSs, + repeated: true + }, { + no: 2, + name: "commits", + kind: "message", + T: iA, + repeated: true + }]); + } + static fromBinary(e, t) { + return new tUe().fromBinary(e, t); + } + static fromJson(e, t) { + return new tUe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new tUe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(tUe, e, t); + } + }; + DSs = class iUe extends N { + constructor(e) { + super(); + this.fileName = ""; + this.diff = ""; + this.tooBig = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamBranchGeminiRequest.BranchDiff.FileDiff"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "file_name", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "diff", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "too_big", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new iUe().fromBinary(e, t); + } + static fromJson(e, t) { + return new iUe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new iUe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(iUe, e, t); + } + }; + TSs = class sUe extends N { + constructor(e) { + super(); + this.text = ""; + this.timeInUnixSeconds = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamBranchGeminiRequest.PastThought"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "text", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "time_in_unix_seconds", + kind: "scalar", + T: 1 + }]); + } + static fromBinary(e, t) { + return new sUe().fromBinary(e, t); + } + static fromJson(e, t) { + return new sUe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new sUe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(sUe, e, t); + } + }; + jjt = class nUe extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.text = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamBranchGeminiRequest.File"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "text", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new nUe().fromBinary(e, t); + } + static fromJson(e, t) { + return new nUe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new nUe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(nUe, e, t); + } + }; + PSs = class rUe extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.text = ""; + this.priority = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamBranchGeminiRequest.FileWithPriority"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "text", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "priority", + kind: "scalar", + T: 2 + }]); + } + static fromBinary(e, t) { + return new rUe().fromBinary(e, t); + } + static fromJson(e, t) { + return new rUe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new rUe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(rUe, e, t); + } + }; + LSs = class oUe extends N { + constructor(e) { + super(); + this.text = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamBranchGeminiResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "text", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "cached_prompt", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new oUe().fromBinary(e, t); + } + static fromJson(e, t) { + return new oUe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new oUe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(oUe, e, t); + } + }; + RSs = class aUe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.IsCursorPredictionEnabledRequest"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new aUe().fromBinary(e, t); + } + static fromJson(e, t) { + return new aUe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new aUe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(aUe, e, t); + } + }; + NSs = class lUe extends N { + constructor(e) { + super(); + this.enabled = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.IsCursorPredictionEnabledResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "enabled", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new lUe().fromBinary(e, t); + } + static fromJson(e, t) { + return new lUe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new lUe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(lUe, e, t); + } + }; + MSs = class cUe extends N { + constructor(e) { + super(); + this.diffHistory = []; + this.contextItems = []; + this.diffHistoryKeys = []; + this.fileDiffHistories = []; + this.mergedDiffHistories = []; + this.blockDiffPatches = []; + this.parameterHints = []; + this.lspContexts = []; + this.fileSyncUpdates = []; + this.fileVisibleRanges = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamNextCursorPredictionRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "current_file", + kind: "message", + T: tu + }, { + no: 2, + name: "diff_history", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 3, + name: "model_name", + kind: "scalar", + T: 9, + opt: true + }, { + no: 4, + name: "linter_errors", + kind: "message", + T: xp, + opt: true + }, { + no: 13, + name: "context_items", + kind: "message", + T: pdt, + repeated: true + }, { + no: 5, + name: "diff_history_keys", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 6, + name: "give_debug_output", + kind: "scalar", + T: 8, + opt: true + }, { + no: 7, + name: "file_diff_histories", + kind: "message", + T: Fx, + repeated: true + }, { + no: 8, + name: "merged_diff_histories", + kind: "message", + T: Fx, + repeated: true + }, { + no: 9, + name: "block_diff_patches", + kind: "message", + T: vdt, + repeated: true + }, { + no: 10, + name: "is_nightly", + kind: "scalar", + T: 8, + opt: true + }, { + no: 11, + name: "is_debug", + kind: "scalar", + T: 8, + opt: true + }, { + no: 12, + name: "immediately_ack", + kind: "scalar", + T: 8, + opt: true + }, { + no: 17, + name: "enable_more_context", + kind: "scalar", + T: 8, + opt: true + }, { + no: 14, + name: "parameter_hints", + kind: "message", + T: hjt, + repeated: true + }, { + no: 15, + name: "lsp_contexts", + kind: "message", + T: cdt, + repeated: true + }, { + no: 16, + name: "cpp_intent_info", + kind: "message", + T: cjt, + opt: true + }, { + no: 18, + name: "workspace_id", + kind: "scalar", + T: 9, + opt: true + }, { + no: 19, + name: "file_sync_updates", + kind: "message", + T: Yz, + repeated: true + }, { + no: 20, + name: "file_visible_ranges", + kind: "message", + T: Jjt, + repeated: true + }]); + } + static fromBinary(e, t) { + return new cUe().fromBinary(e, t); + } + static fromJson(e, t) { + return new cUe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new cUe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(cUe, e, t); + } + }; + zjt = class uUe extends N { + constructor(e) { + super(); + this.startLineNumberInclusive = 0; + this.endLineNumberExclusive = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamNextCursorPredictionRequest.VisibleRange"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "start_line_number_inclusive", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "end_line_number_exclusive", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new uUe().fromBinary(e, t); + } + static fromJson(e, t) { + return new uUe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new uUe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(uUe, e, t); + } + }; + Jjt = class dUe extends N { + constructor(e) { + super(); + this.filename = ""; + this.visibleRanges = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamNextCursorPredictionRequest.FileVisibleRange"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "filename", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "visible_ranges", + kind: "message", + T: zjt, + repeated: true + }]); + } + static fromBinary(e, t) { + return new dUe().fromBinary(e, t); + } + static fromJson(e, t) { + return new dUe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new dUe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(dUe, e, t); + } + }; + ASs = class hUe extends N { + constructor(e) { + super(); + this.response = { + case: undefined + }; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamNextCursorPredictionResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "text", + kind: "scalar", + T: 9, + oneof: "response" + }, { + no: 2, + name: "line_number", + kind: "scalar", + T: 5, + oneof: "response" + }, { + no: 3, + name: "is_not_in_range", + kind: "scalar", + T: 8, + oneof: "response" + }, { + no: 4, + name: "file_name", + kind: "scalar", + T: 9, + oneof: "response" + }]); + } + static fromBinary(e, t) { + return new hUe().fromBinary(e, t); + } + static fromJson(e, t) { + return new hUe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new hUe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(hUe, e, t); + } + }; + $Ss = class fUe extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.fileContents = ""; + this.prompt = ""; + this.images = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamWebCmdKV1Request"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "file_contents", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "prompt", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "selection_range", + kind: "message", + T: Kv + }, { + no: 5, + name: "model_details", + kind: "message", + T: Qa + }, { + no: 10, + name: "images", + kind: "message", + T: tD, + repeated: true + }]); + } + static fromBinary(e, t) { + return new fUe().fromBinary(e, t); + } + static fromJson(e, t) { + return new fUe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new fUe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(fUe, e, t); + } + }; + FSs = class gUe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamWebCmdKV1Response"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "cmd_k_response", + kind: "message", + T: Ive + }]); + } + static fromBinary(e, t) { + return new gUe().fromBinary(e, t); + } + static fromJson(e, t) { + return new gUe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new gUe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(gUe, e, t); + } + }; + OSs = class pUe extends N { + constructor(e) { + super(); + this.sourceRange = ""; + this.methodSignatures = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ContextScoresRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "source_range", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "method_signatures", + kind: "scalar", + T: 9, + repeated: true + }]); + } + static fromBinary(e, t) { + return new pUe().fromBinary(e, t); + } + static fromJson(e, t) { + return new pUe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new pUe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(pUe, e, t); + } + }; + _Ss = class mUe extends N { + constructor(e) { + super(); + this.scores = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ContextScoresResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "scores", + kind: "scalar", + T: 2, + repeated: true + }]); + } + static fromBinary(e, t) { + return new mUe().fromBinary(e, t); + } + static fromJson(e, t) { + return new mUe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new mUe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(mUe, e, t); + } + }; + BSs = class bUe extends N { + constructor(e) { + super(); + this.feedbackType = b1.UNSPECIFIED; + this.requestId = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ReportGenerationFeedbackRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "feedback_type", + kind: "enum", + T: m.getEnumType(b1) + }, { + no: 2, + name: "request_id", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "comment", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new bUe().fromBinary(e, t); + } + static fromJson(e, t) { + return new bUe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new bUe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(bUe, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.THUMBS_UP = 1] = "THUMBS_UP"; + i[i.THUMBS_DOWN = 2] = "THUMBS_DOWN"; + i[i.NEUTRAL = 3] = "NEUTRAL"; + })(b1 ||= {}); + m.util.setEnumType(b1, "aiserver.v1.ReportGenerationFeedbackRequest.FeedbackType", [{ + no: 0, + name: "FEEDBACK_TYPE_UNSPECIFIED" + }, { + no: 1, + name: "FEEDBACK_TYPE_THUMBS_UP" + }, { + no: 2, + name: "FEEDBACK_TYPE_THUMBS_DOWN" + }, { + no: 3, + name: "FEEDBACK_TYPE_NEUTRAL" + }]); + USs = class vUe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ReportGenerationFeedbackResponse"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new vUe().fromBinary(e, t); + } + static fromJson(e, t) { + return new vUe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new vUe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(vUe, e, t); + } + }; + WSs = class yUe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ShowWelcomeScreenRequest"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new yUe().fromBinary(e, t); + } + static fromJson(e, t) { + return new yUe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new yUe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(yUe, e, t); + } + }; + VSs = class wUe extends N { + constructor(e) { + super(); + this.enableCards = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ShowWelcomeScreenResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "enable_cards", + kind: "scalar", + T: 9, + repeated: true + }]); + } + static fromBinary(e, t) { + return new wUe().fromBinary(e, t); + } + static fromJson(e, t) { + return new wUe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new wUe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(wUe, e, t); + } + }; + Gjt = class CUe extends N { + constructor(e) { + super(); + this.description = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.AiProjectRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "description", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "model_details", + kind: "message", + T: Qa + }]); + } + static fromBinary(e, t) { + return new CUe().fromBinary(e, t); + } + static fromJson(e, t) { + return new CUe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new CUe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(CUe, e, t); + } + }; + HSs = class SUe extends N { + constructor(e) { + super(); + this.text = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.AiProjectResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "text", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new SUe().fromBinary(e, t); + } + static fromJson(e, t) { + return new SUe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new SUe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(SUe, e, t); + } + }; + qSs = class xUe extends N { + constructor(e) { + super(); + this.text = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ToCamelCaseRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "text", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new xUe().fromBinary(e, t); + } + static fromJson(e, t) { + return new xUe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new xUe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(xUe, e, t); + } + }; + jSs = class kUe extends N { + constructor(e) { + super(); + this.text = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ToCamelCaseResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "text", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new kUe().fromBinary(e, t); + } + static fromJson(e, t) { + return new kUe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new kUe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(kUe, e, t); + } + }; + Kjt = class EUe extends N { + constructor(e) { + super(); + this.promptProps = ""; + this.promptPropsTypeName = ""; + this.skipLoginCheck = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamPriomptPromptRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 2, + name: "prompt_props", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "prompt_props_type_name", + kind: "scalar", + T: 9 + }, { + no: 5, + name: "skip_login_check", + kind: "scalar", + T: 8 + }, { + no: 4, + name: "model_details", + kind: "message", + T: Qa + }]); + } + static fromBinary(e, t) { + return new EUe().fromBinary(e, t); + } + static fromJson(e, t) { + return new EUe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new EUe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(EUe, e, t); + } + }; + zSs = class IUe extends N { + constructor(e) { + super(); + this.text = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamPriomptPromptResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "text", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new IUe().fromBinary(e, t); + } + static fromJson(e, t) { + return new IUe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new IUe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(IUe, e, t); + } + }; + Yjt = class DUe extends N { + constructor(e) { + super(); + this.featureName = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CheckFeatureStatusRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "feature_name", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new DUe().fromBinary(e, t); + } + static fromJson(e, t) { + return new DUe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new DUe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(DUe, e, t); + } + }; + Xjt = class TUe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetEffectiveTokenLimitRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "model_details", + kind: "message", + T: Qa + }]); + } + static fromBinary(e, t) { + return new TUe().fromBinary(e, t); + } + static fromJson(e, t) { + return new TUe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new TUe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(TUe, e, t); + } + }; + JSs = class PUe extends N { + constructor(e) { + super(); + this.tokenLimit = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetEffectiveTokenLimitResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "token_limit", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new PUe().fromBinary(e, t); + } + static fromJson(e, t) { + return new PUe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new PUe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(PUe, e, t); + } + }; + Qjt = class LUe extends N { + constructor(e) { + super(); + this.enabled = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CheckFeatureStatusResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "enabled", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new LUe().fromBinary(e, t); + } + static fromJson(e, t) { + return new LUe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new LUe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(LUe, e, t); + } + }; + Zjt = class RUe extends N { + constructor(e) { + super(); + this.key = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CheckNumberConfigRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "key", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new RUe().fromBinary(e, t); + } + static fromJson(e, t) { + return new RUe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new RUe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(RUe, e, t); + } + }; + ezt = class NUe extends N { + constructor(e) { + super(); + this.value = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CheckNumberConfigResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "value", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new NUe().fromBinary(e, t); + } + static fromJson(e, t) { + return new NUe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new NUe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(NUe, e, t); + } + }; + GSs = class MUe extends N { + constructor(e) { + super(); + this.messages = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.IntentPredictionRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "messages", + kind: "message", + T: Al, + repeated: true + }, { + no: 2, + name: "context_options", + kind: "message", + T: ZSs + }, { + no: 3, + name: "model_details", + kind: "message", + T: Qa + }]); + } + static fromBinary(e, t) { + return new MUe().fromBinary(e, t); + } + static fromJson(e, t) { + return new MUe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new MUe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(MUe, e, t); + } + }; + KSs = class AUe extends N { + constructor(e) { + super(); + this.useGlobalContext = false; + this.useWithFolderContext = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.IntentPredictionResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "chosen_documentation", + kind: "message", + T: YSs + }, { + no: 2, + name: "chosen_file_contents", + kind: "message", + T: XSs + }, { + no: 3, + name: "chosen_linter_diagnostics", + kind: "message", + T: QSs + }, { + no: 4, + name: "use_global_context", + kind: "scalar", + T: 8 + }, { + no: 5, + name: "use_with_folder_context", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new AUe().fromBinary(e, t); + } + static fromJson(e, t) { + return new AUe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new AUe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(AUe, e, t); + } + }; + YSs = class $Ue extends N { + constructor(e) { + super(); + this.docIndices = []; + this.docIdentifiers = []; + this.docNames = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.IntentPredictionResponse.ChosenDocumentation"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "doc_indices", + kind: "scalar", + T: 5, + repeated: true + }, { + no: 2, + name: "doc_identifiers", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 3, + name: "doc_names", + kind: "scalar", + T: 9, + repeated: true + }]); + } + static fromBinary(e, t) { + return new $Ue().fromBinary(e, t); + } + static fromJson(e, t) { + return new $Ue().fromJson(e, t); + } + static fromJsonString(e, t) { + return new $Ue().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals($Ue, e, t); + } + }; + XSs = class FUe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.IntentPredictionResponse.ChosenFileContents"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new FUe().fromBinary(e, t); + } + static fromJson(e, t) { + return new FUe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new FUe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(FUe, e, t); + } + }; + QSs = class OUe extends N { + constructor(e) { + super(); + this.diagnosticIndices = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.IntentPredictionResponse.ChosenLinterDiagnostics"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "diagnostic_indices", + kind: "scalar", + T: 5, + repeated: true + }]); + } + static fromBinary(e, t) { + return new OUe().fromBinary(e, t); + } + static fromJson(e, t) { + return new OUe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new OUe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(OUe, e, t); + } + }; + ZSs = class _Ue extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ContextOptions"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "all_documentation", + kind: "message", + T: e1s + }, { + no: 2, + name: "current_file_contents", + kind: "message", + T: i1s + }, { + no: 3, + name: "linter_diagnostics", + kind: "message", + T: s1s + }, { + no: 4, + name: "global_context", + kind: "message", + T: n1s + }]); + } + static fromBinary(e, t) { + return new _Ue().fromBinary(e, t); + } + static fromJson(e, t) { + return new _Ue().fromJson(e, t); + } + static fromJsonString(e, t) { + return new _Ue().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(_Ue, e, t); + } + }; + e1s = class BUe extends N { + constructor(e) { + super(); + this.availableDocs = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ContextOptions.AllDocumentation"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "available_docs", + kind: "message", + T: t1s, + repeated: true + }]); + } + static fromBinary(e, t) { + return new BUe().fromBinary(e, t); + } + static fromJson(e, t) { + return new BUe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new BUe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(BUe, e, t); + } + }; + t1s = class UUe extends N { + constructor(e) { + super(); + this.name = ""; + this.url = ""; + this.identifier = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ContextOptions.AllDocumentation.Documentation"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "name", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "url", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "identifier", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new UUe().fromBinary(e, t); + } + static fromJson(e, t) { + return new UUe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new UUe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(UUe, e, t); + } + }; + i1s = class WUe extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.contents = ""; + this.dataframes = []; + this.languageId = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ContextOptions.CurrentFileContents"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "contents", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "cursor_position", + kind: "message", + T: sv + }, { + no: 4, + name: "dataframes", + kind: "message", + T: put, + repeated: true + }, { + no: 5, + name: "language_id", + kind: "scalar", + T: 9 + }, { + no: 6, + name: "selection", + kind: "message", + T: eD + }]); + } + static fromBinary(e, t) { + return new WUe().fromBinary(e, t); + } + static fromJson(e, t) { + return new WUe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new WUe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(WUe, e, t); + } + }; + s1s = class VUe extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.contents = ""; + this.diagnostics = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ContextOptions.LinterDiagnostics"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "contents", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "diagnostics", + kind: "message", + T: tzt, + repeated: true + }]); + } + static fromBinary(e, t) { + return new VUe().fromBinary(e, t); + } + static fromJson(e, t) { + return new VUe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new VUe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(VUe, e, t); + } + }; + tzt = class HUe extends N { + constructor(e) { + super(); + this.message = ""; + this.source = ""; + this.relativeWorkspacePath = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ContextOptions.LinterDiagnostics.Diagnostic"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "message", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "source", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "range", + kind: "message", + T: eD + }, { + no: 4, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new HUe().fromBinary(e, t); + } + static fromJson(e, t) { + return new HUe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new HUe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(HUe, e, t); + } + }; + n1s = class qUe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ContextOptions.GlobalContext"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new qUe().fromBinary(e, t); + } + static fromJson(e, t) { + return new qUe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new qUe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(qUe, e, t); + } + }; + izt = class jUe extends N { + constructor(e) { + super(); + this.conversation = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamCursorTutorRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "conversation", + kind: "message", + T: Al, + repeated: true + }, { + no: 2, + name: "model_details", + kind: "message", + T: Qa + }]); + } + static fromBinary(e, t) { + return new jUe().fromBinary(e, t); + } + static fromJson(e, t) { + return new jUe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new jUe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(jUe, e, t); + } + }; + r1s = class zUe extends N { + constructor(e) { + super(); + this.text = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamCursorTutorResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "text", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new zUe().fromBinary(e, t); + } + static fromJson(e, t) { + return new zUe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new zUe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(zUe, e, t); + } + }; + Lve = class JUe extends N { + constructor(e) { + super(); + this.conversation = []; + this.repositories = []; + this.codeBlocks = []; + this.queryType = a5.UNSPECIFIED; + this.fasterAndStupider = false; + this.useGlobs = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ModelQueryRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "current_file", + kind: "message", + T: tu + }, { + no: 2, + name: "conversation", + kind: "message", + T: Al, + repeated: true + }, { + no: 3, + name: "repositories", + kind: "message", + T: pc, + repeated: true + }, { + no: 4, + name: "explicit_context", + kind: "message", + T: Qg + }, { + no: 5, + name: "workspace_root_path", + kind: "scalar", + T: 9, + opt: true + }, { + no: 6, + name: "code_blocks", + kind: "message", + T: Xg, + repeated: true + }, { + no: 7, + name: "model_details", + kind: "message", + T: Qa + }, { + no: 8, + name: "query_type", + kind: "enum", + T: m.getEnumType(a5) + }, { + no: 9, + name: "repository_info", + kind: "message", + T: pc + }, { + no: 10, + name: "faster_and_stupider", + kind: "scalar", + T: 8 + }, { + no: 11, + name: "use_globs", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new JUe().fromBinary(e, t); + } + static fromJson(e, t) { + return new JUe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new JUe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(JUe, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.KEYWORDS = 1] = "KEYWORDS"; + i[i.EMBEDDINGS = 2] = "EMBEDDINGS"; + })(a5 ||= {}); + m.util.setEnumType(a5, "aiserver.v1.ModelQueryRequest.QueryType", [{ + no: 0, + name: "QUERY_TYPE_UNSPECIFIED" + }, { + no: 1, + name: "QUERY_TYPE_KEYWORDS" + }, { + no: 2, + name: "QUERY_TYPE_EMBEDDINGS" + }]); + o1s = class GUe extends N { + constructor(e) { + super(); + this.queries = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ModelQueryResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "queries", + kind: "message", + T: a1s, + repeated: true + }]); + } + static fromBinary(e, t) { + return new GUe().fromBinary(e, t); + } + static fromJson(e, t) { + return new GUe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new GUe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(GUe, e, t); + } + }; + a1s = class KUe extends N { + constructor(e) { + super(); + this.query = ""; + this.successfulParse = false; + this.goodFileExtensions = []; + this.badFileExtensions = []; + this.goodPaths = []; + this.badPaths = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ModelQueryResponse.Query"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "query", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "successful_parse", + kind: "scalar", + T: 8 + }, { + no: 3, + name: "good_file_extensions", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 4, + name: "bad_file_extensions", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 5, + name: "good_paths", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 6, + name: "bad_paths", + kind: "scalar", + T: 9, + repeated: true + }]); + } + static fromBinary(e, t) { + return new KUe().fromBinary(e, t); + } + static fromJson(e, t) { + return new KUe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new KUe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(KUe, e, t); + } + }; + l1s = class YUe extends N { + constructor(e) { + super(); + this.queryOrReasoning = { + case: undefined + }; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ModelQueryResponseV2"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "query", + kind: "message", + T: c1s, + oneof: "query_or_reasoning" + }, { + no: 2, + name: "reasoning", + kind: "scalar", + T: 9, + oneof: "query_or_reasoning" + }]); + } + static fromBinary(e, t) { + return new YUe().fromBinary(e, t); + } + static fromJson(e, t) { + return new YUe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new YUe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(YUe, e, t); + } + }; + c1s = class XUe extends N { + constructor(e) { + super(); + this.partialQuery = { + case: undefined + }; + this.index = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ModelQueryResponseV2.QueryItem"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "text", + kind: "scalar", + T: 9, + oneof: "partial_query" + }, { + no: 2, + name: "glob", + kind: "scalar", + T: 9, + oneof: "partial_query" + }, { + no: 3, + name: "index", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new XUe().fromBinary(e, t); + } + static fromJson(e, t) { + return new XUe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new XUe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(XUe, e, t); + } + }; + u1s = class QUe extends N { + constructor(e) { + super(); + this.apiKey = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ApiDetails"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "api_key", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "enable_ghost_mode", + kind: "scalar", + T: 8, + opt: true + }]); + } + static fromBinary(e, t) { + return new QUe().fromBinary(e, t); + } + static fromJson(e, t) { + return new QUe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new QUe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(QUe, e, t); + } + }; + Rve = class ZUe extends N { + constructor(e) { + super(); + this.results = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.FullFileSearchResult"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "results", + kind: "message", + T: Dut, + repeated: true + }]); + } + static fromBinary(e, t) { + return new ZUe().fromBinary(e, t); + } + static fromJson(e, t) { + return new ZUe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new ZUe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(ZUe, e, t); + } + }; + tse = class eWe extends N { + constructor(e) { + super(); + this.results = []; + this.allFiles = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CodeSearchResult"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "results", + kind: "message", + T: xb, + repeated: true + }, { + no: 2, + name: "all_files", + kind: "message", + T: $x, + repeated: true + }]); + } + static fromBinary(e, t) { + return new eWe().fromBinary(e, t); + } + static fromJson(e, t) { + return new eWe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new eWe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(eWe, e, t); + } + }; + d1s = class tWe extends N { + constructor(e) { + super(); + this.codeResults = []; + this.query = ""; + this.numBlocks = 0; + this.conversation = []; + this.contextResults = { + case: undefined + }; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RerankerRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "code_results", + kind: "message", + T: xb, + repeated: true + }, { + no: 2, + name: "query", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "num_blocks", + kind: "scalar", + T: 5 + }, { + no: 4, + name: "current_file", + kind: "message", + T: tu + }, { + no: 5, + name: "conversation", + kind: "message", + T: Al, + repeated: true + }, { + no: 6, + name: "api_details", + kind: "message", + T: u1s + }, { + no: 7, + name: "file_search_results", + kind: "message", + T: Rve, + oneof: "context_results" + }, { + no: 8, + name: "code_search_results", + kind: "message", + T: tse, + oneof: "context_results" + }]); + } + static fromBinary(e, t) { + return new tWe().fromBinary(e, t); + } + static fromJson(e, t) { + return new tWe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new tWe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(tWe, e, t); + } + }; + h1s = class iWe extends N { + constructor(e) { + super(); + this.results = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RerankerResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "results", + kind: "message", + T: xb, + repeated: true + }]); + } + static fromBinary(e, t) { + return new iWe().fromBinary(e, t); + } + static fromJson(e, t) { + return new iWe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new iWe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(iWe, e, t); + } + }; + f1s = class sWe extends N { + constructor(e) { + super(); + this.text = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GenerateTldrRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "text", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new sWe().fromBinary(e, t); + } + static fromJson(e, t) { + return new sWe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new sWe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(sWe, e, t); + } + }; + g1s = class nWe extends N { + constructor(e) { + super(); + this.summary = ""; + this.all = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GenerateTldrResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "summary", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "all", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new nWe().fromBinary(e, t); + } + static fromJson(e, t) { + return new nWe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new nWe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(nWe, e, t); + } + }; + p1s = class rWe extends N { + constructor(e) { + super(); + this.conversation = []; + this.repositories = []; + this.codeBlocks = []; + this.documentationIdentifiers = []; + this.requestId = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.TaskStreamChatContextRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "current_file", + kind: "message", + T: tu + }, { + no: 2, + name: "conversation", + kind: "message", + T: Al, + repeated: true + }, { + no: 3, + name: "repositories", + kind: "message", + T: pc, + repeated: true + }, { + no: 4, + name: "explicit_context", + kind: "message", + T: Qg + }, { + no: 5, + name: "workspace_root_path", + kind: "scalar", + T: 9, + opt: true + }, { + no: 6, + name: "code_blocks", + kind: "message", + T: Xg, + repeated: true + }, { + no: 7, + name: "model_details", + kind: "message", + T: Qa + }, { + no: 8, + name: "documentation_identifiers", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 14, + name: "linter_errors", + kind: "message", + T: xp + }, { + no: 15, + name: "advanced_codebase_context", + kind: "message", + T: m1s + }, { + no: 16, + name: "is_eval", + kind: "scalar", + T: 8, + opt: true + }, { + no: 17, + name: "request_id", + kind: "scalar", + T: 9 + }, { + no: 18, + name: "desired_token_limit", + kind: "scalar", + T: 5, + opt: true + }]); + } + static fromBinary(e, t) { + return new rWe().fromBinary(e, t); + } + static fromJson(e, t) { + return new rWe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new rWe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(rWe, e, t); + } + }; + m1s = class oWe extends N { + constructor(e) { + super(); + this.numResultsPerSearch = 0; + this.reranker = Uie.UNSPECIFIED; + this.reasoningStep = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.AdvancedCodebaseContextOptions"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "num_results_per_search", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "include_pattern", + kind: "scalar", + T: 9, + opt: true + }, { + no: 3, + name: "exclude_pattern", + kind: "scalar", + T: 9, + opt: true + }, { + no: 4, + name: "reranker", + kind: "enum", + T: m.getEnumType(Uie) + }, { + no: 5, + name: "index_id", + kind: "scalar", + T: 9, + opt: true + }, { + no: 6, + name: "reasoning_step", + kind: "scalar", + T: 8 + }, { + no: 7, + name: "rechunker", + kind: "enum", + T: m.getEnumType(Iut), + opt: true + }]); + } + static fromBinary(e, t) { + return new oWe().fromBinary(e, t); + } + static fromJson(e, t) { + return new oWe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new oWe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(oWe, e, t); + } + }; + b1s = class aWe extends N { + constructor(e) { + super(); + this.response = { + case: undefined + }; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.TaskStreamChatContextResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "output", + kind: "message", + T: v1s, + oneof: "response" + }, { + no: 2, + name: "gathering_step", + kind: "message", + T: w1s, + oneof: "response" + }, { + no: 3, + name: "gathering_file", + kind: "message", + T: y1s, + oneof: "response" + }, { + no: 4, + name: "reranking_step", + kind: "message", + T: C1s, + oneof: "response" + }, { + no: 5, + name: "reranking_file", + kind: "message", + T: S1s, + oneof: "response" + }, { + no: 6, + name: "reasoning_step", + kind: "message", + T: x1s, + oneof: "response" + }, { + no: 7, + name: "reasoning_substep", + kind: "message", + T: k1s, + oneof: "response" + }]); + } + static fromBinary(e, t) { + return new aWe().fromBinary(e, t); + } + static fromJson(e, t) { + return new aWe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new aWe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(aWe, e, t); + } + }; + v1s = class lWe extends N { + constructor(e) { + super(); + this.text = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.TaskStreamChatContextResponse.Output"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "text", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new lWe().fromBinary(e, t); + } + static fromJson(e, t) { + return new lWe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new lWe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(lWe, e, t); + } + }; + y1s = class cWe extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.stepIndex = 0; + this.score = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.TaskStreamChatContextResponse.GatheringFile"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "range", + kind: "message", + T: Of + }, { + no: 3, + name: "step_index", + kind: "scalar", + T: 5 + }, { + no: 4, + name: "score", + kind: "scalar", + T: 2 + }]); + } + static fromBinary(e, t) { + return new cWe().fromBinary(e, t); + } + static fromJson(e, t) { + return new cWe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new cWe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(cWe, e, t); + } + }; + w1s = class uWe extends N { + constructor(e) { + super(); + this.title = ""; + this.index = 0; + this.query = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.TaskStreamChatContextResponse.GatheringStep"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "title", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "index", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "query", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new uWe().fromBinary(e, t); + } + static fromJson(e, t) { + return new uWe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new uWe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(uWe, e, t); + } + }; + C1s = class dWe extends N { + constructor(e) { + super(); + this.title = ""; + this.index = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.TaskStreamChatContextResponse.RerankingStep"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "title", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "index", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new dWe().fromBinary(e, t); + } + static fromJson(e, t) { + return new dWe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new dWe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(dWe, e, t); + } + }; + S1s = class hWe extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.reason = ""; + this.failed = false; + this.score = 0; + this.stepIndex = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.TaskStreamChatContextResponse.RerankingFile"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "range", + kind: "message", + T: Of + }, { + no: 3, + name: "reason", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "failed", + kind: "scalar", + T: 8 + }, { + no: 5, + name: "score", + kind: "scalar", + T: 2 + }, { + no: 6, + name: "step_index", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new hWe().fromBinary(e, t); + } + static fromJson(e, t) { + return new hWe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new hWe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(hWe, e, t); + } + }; + x1s = class fWe extends N { + constructor(e) { + super(); + this.title = ""; + this.index = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.TaskStreamChatContextResponse.ReasoningStep"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "title", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "index", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new fWe().fromBinary(e, t); + } + static fromJson(e, t) { + return new fWe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new fWe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(fWe, e, t); + } + }; + k1s = class gWe extends N { + constructor(e) { + super(); + this.markdownExplanation = ""; + this.stepIndex = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.TaskStreamChatContextResponse.ReasoningSubstep"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "markdown_explanation", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "step_index", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new gWe().fromBinary(e, t); + } + static fromJson(e, t) { + return new gWe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new gWe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(gWe, e, t); + } + }; + E1s = class pWe extends N { + constructor(e) { + super(); + this.response = { + case: undefined + }; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.TaskStreamChatContextResponseWrapped"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "real_response", + kind: "message", + T: b1s, + oneof: "response" + }, { + no: 2, + name: "background_task_uuid", + kind: "scalar", + T: 9, + oneof: "response" + }]); + } + static fromBinary(e, t) { + return new pWe().fromBinary(e, t); + } + static fromJson(e, t) { + return new pWe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new pWe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(pWe, e, t); + } + }; + Edt = class mWe extends N { + constructor(e) { + super(); + this.conversation = []; + this.repositories = []; + this.codeBlocks = []; + this.documentationIdentifiers = []; + this.query = ""; + this.rerankResults = false; + this.contextResults = { + case: undefined + }; + this.rerankResultsV2 = false; + this.conversationId = ""; + this.canHandleFilenamesAfterLanguageIds = false; + this.longContextMode = false; + this.isEval = false; + this.requestId = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamChatContextRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "current_file", + kind: "message", + T: tu + }, { + no: 2, + name: "conversation", + kind: "message", + T: Al, + repeated: true + }, { + no: 3, + name: "repositories", + kind: "message", + T: pc, + repeated: true + }, { + no: 4, + name: "explicit_context", + kind: "message", + T: Qg + }, { + no: 5, + name: "workspace_root_path", + kind: "scalar", + T: 9, + opt: true + }, { + no: 6, + name: "code_blocks", + kind: "message", + T: Xg, + repeated: true + }, { + no: 7, + name: "model_details", + kind: "message", + T: Qa + }, { + no: 8, + name: "documentation_identifiers", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 9, + name: "query", + kind: "scalar", + T: 9 + }, { + no: 10, + name: "code_context", + kind: "message", + T: I1s + }, { + no: 11, + name: "rerank_results", + kind: "scalar", + T: 8 + }, { + no: 12, + name: "file_search_results", + kind: "message", + T: Rve, + oneof: "context_results" + }, { + no: 13, + name: "code_search_results", + kind: "message", + T: tse, + oneof: "context_results" + }, { + no: 14, + name: "linter_errors", + kind: "message", + T: xp + }, { + no: 15, + name: "is_bash", + kind: "scalar", + T: 8, + opt: true + }, { + no: 16, + name: "rerank_results_v2", + kind: "scalar", + T: 8 + }, { + no: 17, + name: "conversation_id", + kind: "scalar", + T: 9 + }, { + no: 18, + name: "can_handle_filenames_after_language_ids", + kind: "scalar", + T: 8 + }, { + no: 19, + name: "long_context_mode", + kind: "scalar", + T: 8 + }, { + no: 20, + name: "is_eval", + kind: "scalar", + T: 8 + }, { + no: 21, + name: "request_id", + kind: "scalar", + T: 9 + }, { + no: 22, + name: "desired_max_tokens", + kind: "scalar", + T: 5, + opt: true + }, { + no: 23, + name: "runnable_code_blocks", + kind: "scalar", + T: 8, + opt: true + }]); + } + static fromBinary(e, t) { + return new mWe().fromBinary(e, t); + } + static fromJson(e, t) { + return new mWe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new mWe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(mWe, e, t); + } + }; + I1s = class bWe extends N { + constructor(e) { + super(); + this.chunks = []; + this.scoredChunks = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamChatContextRequest.CodeContext"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "chunks", + kind: "message", + T: Xg, + repeated: true + }, { + no: 2, + name: "scored_chunks", + kind: "message", + T: xb, + repeated: true + }]); + } + static fromBinary(e, t) { + return new bWe().fromBinary(e, t); + } + static fromJson(e, t) { + return new bWe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new bWe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(bWe, e, t); + } + }; + szt = class vWe extends N { + constructor(e) { + super(); + this.text = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamChatContextResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "text", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "debugging_only_chat_prompt", + kind: "scalar", + T: 9, + opt: true + }, { + no: 3, + name: "debugging_only_token_count", + kind: "scalar", + T: 5, + opt: true + }, { + no: 4, + name: "document_citation", + kind: "message", + T: idt + }, { + no: 5, + name: "filled_prompt", + kind: "scalar", + T: 9, + opt: true + }, { + no: 6, + name: "used_code", + kind: "message", + T: D1s + }, { + no: 7, + name: "code_link", + kind: "message", + T: T1s + }, { + no: 8, + name: "chunk_identity", + kind: "message", + T: P1s, + opt: true + }, { + no: 9, + name: "docs_reference", + kind: "message", + T: rve, + opt: true + }, { + no: 10, + name: "symbol_link", + kind: "message", + T: ove, + opt: true + }, { + no: 11, + name: "file_link", + kind: "message", + T: ndt, + opt: true + }]); + } + static fromBinary(e, t) { + return new vWe().fromBinary(e, t); + } + static fromJson(e, t) { + return new vWe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new vWe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(vWe, e, t); + } + }; + D1s = class yWe extends N { + constructor(e) { + super(); + this.codeResults = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamChatContextResponse.UsedCode"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "code_results", + kind: "message", + T: xb, + repeated: true + }]); + } + static fromBinary(e, t) { + return new yWe().fromBinary(e, t); + } + static fromJson(e, t) { + return new yWe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new yWe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(yWe, e, t); + } + }; + T1s = class wWe extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.startLineNumber = 0; + this.endLineNumber = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamChatContextResponse.CodeLink"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "start_line_number", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "end_line_number", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new wWe().fromBinary(e, t); + } + static fromJson(e, t) { + return new wWe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new wWe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(wWe, e, t); + } + }; + P1s = class CWe extends N { + constructor(e) { + super(); + this.fileName = ""; + this.startLine = 0; + this.endLine = 0; + this.text = ""; + this.chunkType = QT.UNSPECIFIED; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamChatContextResponse.ChunkIdentity"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "file_name", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "start_line", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "end_line", + kind: "scalar", + T: 5 + }, { + no: 4, + name: "text", + kind: "scalar", + T: 9 + }, { + no: 5, + name: "chunk_type", + kind: "enum", + T: m.getEnumType(QT) + }]); + } + static fromBinary(e, t) { + return new CWe().fromBinary(e, t); + } + static fromJson(e, t) { + return new CWe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new CWe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(CWe, e, t); + } + }; + L1s = class SWe extends N { + constructor(e) { + super(); + this.conversation = []; + this.rerankResults = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamChatDeepContextRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "conversation", + kind: "message", + T: Al, + repeated: true + }, { + no: 2, + name: "explicit_context", + kind: "message", + T: Qg + }, { + no: 3, + name: "model_details", + kind: "message", + T: Qa + }, { + no: 4, + name: "context_results", + kind: "message", + T: Pgs + }, { + no: 5, + name: "rerank_results", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new SWe().fromBinary(e, t); + } + static fromJson(e, t) { + return new SWe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new SWe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(SWe, e, t); + } + }; + R1s = class xWe extends N { + constructor(e) { + super(); + this.text = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamChatDeepContextResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "text", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new xWe().fromBinary(e, t); + } + static fromJson(e, t) { + return new xWe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new xWe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(xWe, e, t); + } + }; + N1s = class kWe extends N { + constructor(e) { + super(); + this.docIdentifier = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.DocumentationInfo"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "doc_identifier", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "metadata", + kind: "message", + T: Rqt + }]); + } + static fromBinary(e, t) { + return new kWe().fromBinary(e, t); + } + static fromJson(e, t) { + return new kWe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new kWe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(kWe, e, t); + } + }; + M1s = class EWe extends N { + constructor(e) { + super(); + this.partialDoc = { + case: undefined + }; + this.additionalDocIdentifiers = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.AvailableDocsRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "partial_url", + kind: "scalar", + T: 9, + oneof: "partial_doc" + }, { + no: 2, + name: "partial_doc_name", + kind: "scalar", + T: 9, + oneof: "partial_doc" + }, { + no: 3, + name: "get_all", + kind: "scalar", + T: 8, + oneof: "partial_doc" + }, { + no: 4, + name: "additional_doc_identifiers", + kind: "scalar", + T: 9, + repeated: true + }]); + } + static fromBinary(e, t) { + return new EWe().fromBinary(e, t); + } + static fromJson(e, t) { + return new EWe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new EWe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(EWe, e, t); + } + }; + A1s = class IWe extends N { + constructor(e) { + super(); + this.docs = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.AvailableDocsResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "docs", + kind: "message", + T: N1s, + repeated: true + }]); + } + static fromBinary(e, t) { + return new IWe().fromBinary(e, t); + } + static fromJson(e, t) { + return new IWe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new IWe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(IWe, e, t); + } + }; + $1s = class DWe extends N { + constructor(e) { + super(); + this.error = yo.UNSPECIFIED; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ThrowErrorCheckRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "error", + kind: "enum", + T: m.getEnumType(yo) + }]); + } + static fromBinary(e, t) { + return new DWe().fromBinary(e, t); + } + static fromJson(e, t) { + return new DWe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new DWe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(DWe, e, t); + } + }; + F1s = class TWe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ThrowErrorCheckResponse"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new TWe().fromBinary(e, t); + } + static fromJson(e, t) { + return new TWe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new TWe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(TWe, e, t); + } + }; + nzt = class PWe extends N { + constructor(e) { + super(); + this.isNightly = false; + this.includeLongContextModels = false; + this.excludeMaxNamedModels = false; + this.additionalModelNames = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.AvailableModelsRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "is_nightly", + kind: "scalar", + T: 8 + }, { + no: 2, + name: "include_long_context_models", + kind: "scalar", + T: 8 + }, { + no: 3, + name: "exclude_max_named_models", + kind: "scalar", + T: 8 + }, { + no: 4, + name: "additional_model_names", + kind: "scalar", + T: 9, + repeated: true + }]); + } + static fromBinary(e, t) { + return new PWe().fromBinary(e, t); + } + static fromJson(e, t) { + return new PWe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new PWe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(PWe, e, t); + } + }; + O1s = class LWe extends N { + constructor(e) { + super(); + this.models = []; + this.modelNames = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.AvailableModelsResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 2, + name: "models", + kind: "message", + T: _1s, + repeated: true + }, { + no: 1, + name: "model_names", + kind: "scalar", + T: 9, + repeated: true + }]); + } + static fromBinary(e, t) { + return new LWe().fromBinary(e, t); + } + static fromJson(e, t) { + return new LWe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new LWe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(LWe, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.DEGRADED = 1] = "DEGRADED"; + i[i.DISABLED = 2] = "DISABLED"; + })(fR ||= {}); + m.util.setEnumType(fR, "aiserver.v1.AvailableModelsResponse.DegradationStatus", [{ + no: 0, + name: "DEGRADATION_STATUS_UNSPECIFIED" + }, { + no: 1, + name: "DEGRADATION_STATUS_DEGRADED" + }, { + no: 2, + name: "DEGRADATION_STATUS_DISABLED" + }]); + rzt = class RWe extends N { + constructor(e) { + super(); + this.primaryText = ""; + this.secondaryText = ""; + this.secondaryWarningText = false; + this.icon = ""; + this.tertiaryText = ""; + this.tertiaryTextUrl = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.AvailableModelsResponse.TooltipData"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "primary_text", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "secondary_text", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "secondary_warning_text", + kind: "scalar", + T: 8 + }, { + no: 4, + name: "icon", + kind: "scalar", + T: 9 + }, { + no: 5, + name: "tertiary_text", + kind: "scalar", + T: 9 + }, { + no: 6, + name: "tertiary_text_url", + kind: "scalar", + T: 9 + }, { + no: 7, + name: "markdown_content", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new RWe().fromBinary(e, t); + } + static fromJson(e, t) { + return new RWe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new RWe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(RWe, e, t); + } + }; + _1s = class NWe extends N { + constructor(e) { + super(); + this.name = ""; + this.defaultOn = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.AvailableModelsResponse.AvailableModel"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "name", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "default_on", + kind: "scalar", + T: 8 + }, { + no: 3, + name: "is_long_context_only", + kind: "scalar", + T: 8, + opt: true + }, { + no: 4, + name: "is_chat_only", + kind: "scalar", + T: 8, + opt: true + }, { + no: 5, + name: "supports_agent", + kind: "scalar", + T: 8, + opt: true + }, { + no: 6, + name: "degradation_status", + kind: "enum", + T: m.getEnumType(fR), + opt: true + }, { + no: 7, + name: "price", + kind: "scalar", + T: 1, + opt: true + }, { + no: 8, + name: "tooltip_data", + kind: "message", + T: rzt, + opt: true + }, { + no: 20, + name: "tooltip_data_for_max_mode", + kind: "message", + T: rzt, + opt: true + }, { + no: 9, + name: "supports_thinking", + kind: "scalar", + T: 8, + opt: true + }, { + no: 10, + name: "supports_images", + kind: "scalar", + T: 8, + opt: true + }, { + no: 11, + name: "supports_auto_context", + kind: "scalar", + T: 8, + opt: true + }, { + no: 12, + name: "auto_context_max_tokens", + kind: "scalar", + T: 5, + opt: true + }, { + no: 13, + name: "auto_context_extended_max_tokens", + kind: "scalar", + T: 5, + opt: true + }, { + no: 14, + name: "supports_max_mode", + kind: "scalar", + T: 8, + opt: true + }, { + no: 19, + name: "supports_non_max_mode", + kind: "scalar", + T: 8, + opt: true + }, { + no: 15, + name: "context_token_limit", + kind: "scalar", + T: 5, + opt: true + }, { + no: 16, + name: "context_token_limit_for_max_mode", + kind: "scalar", + T: 5, + opt: true + }, { + no: 17, + name: "client_display_name", + kind: "scalar", + T: 9, + opt: true + }, { + no: 18, + name: "server_model_name", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new NWe().fromBinary(e, t); + } + static fromJson(e, t) { + return new NWe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new NWe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(NWe, e, t); + } + }; + B1s = class MWe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ServerTimeRequest"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new MWe().fromBinary(e, t); + } + static fromJson(e, t) { + return new MWe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new MWe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(MWe, e, t); + } + }; + U1s = class AWe extends N { + constructor(e) { + super(); + this.receiveTimestamp = 0; + this.transmitTimestamp = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ServerTimeResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "receive_timestamp", + kind: "scalar", + T: 1 + }, { + no: 2, + name: "transmit_timestamp", + kind: "scalar", + T: 1 + }]); + } + static fromBinary(e, t) { + return new AWe().fromBinary(e, t); + } + static fromJson(e, t) { + return new AWe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new AWe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(AWe, e, t); + } + }; + ozt = class $We extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.HealthCheckRequest"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new $We().fromBinary(e, t); + } + static fromJson(e, t) { + return new $We().fromJson(e, t); + } + static fromJsonString(e, t) { + return new $We().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals($We, e, t); + } + }; + W1s = class FWe extends N { + constructor(e) { + super(); + this.status = Nve.UNSPECIFIED; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.HealthCheckResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "status", + kind: "enum", + T: m.getEnumType(Nve) + }]); + } + static fromBinary(e, t) { + return new FWe().fromBinary(e, t); + } + static fromJson(e, t) { + return new FWe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new FWe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(FWe, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.HEALTHY = 1] = "HEALTHY"; + })(Nve ||= {}); + m.util.setEnumType(Nve, "aiserver.v1.HealthCheckResponse.Status", [{ + no: 0, + name: "STATUS_UNSPECIFIED" + }, { + no: 1, + name: "STATUS_HEALTHY" + }]); + V1s = class OWe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.PrivacyCheckRequest"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new OWe().fromBinary(e, t); + } + static fromJson(e, t) { + return new OWe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new OWe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(OWe, e, t); + } + }; + H1s = class _We extends N { + constructor(e) { + super(); + this.isOnPrivacyPod = false; + this.isGhostModeOn = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.PrivacyCheckResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "is_on_privacy_pod", + kind: "scalar", + T: 8 + }, { + no: 2, + name: "is_ghost_mode_on", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new _We().fromBinary(e, t); + } + static fromJson(e, t) { + return new _We().fromJson(e, t); + } + static fromJsonString(e, t) { + return new _We().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(_We, e, t); + } + }; + q1s = class BWe extends N { + constructor(e) { + super(); + this.timeLeft = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.TimeLeftHealthCheckResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "time_left", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new BWe().fromBinary(e, t); + } + static fromJson(e, t) { + return new BWe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new BWe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(BWe, e, t); + } + }; + j1s = class Jde extends N { + constructor(e) { + super(); + this.conversation = []; + this.repositories = []; + this.query = ""; + this.codeBlocks = []; + this.documentationIdentifiers = []; + this.promptCodeBlocks = []; + this.sessionId = ""; + this.fastMode = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamGenerateRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "current_file", + kind: "message", + T: tu + }, { + no: 2, + name: "conversation", + kind: "message", + T: Al, + repeated: true + }, { + no: 3, + name: "repositories", + kind: "message", + T: pc, + repeated: true + }, { + no: 4, + name: "explicit_context", + kind: "message", + T: Qg + }, { + no: 5, + name: "workspace_root_path", + kind: "scalar", + T: 9, + opt: true + }, { + no: 6, + name: "query", + kind: "scalar", + T: 9 + }, { + no: 7, + name: "code_blocks", + kind: "message", + T: Xg, + repeated: true + }, { + no: 9, + name: "model_details", + kind: "message", + T: Qa + }, { + no: 10, + name: "documentation_identifiers", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 11, + name: "linter_errors", + kind: "message", + T: xp + }, { + no: 12, + name: "prompt_code_blocks", + kind: "message", + T: Xg, + repeated: true + }, { + no: 14, + name: "session_id", + kind: "scalar", + T: 9 + }, { + no: 13, + name: "cmd_k_debug_info", + kind: "message", + T: KT + }, { + no: 15, + name: "fast_mode", + kind: "scalar", + T: 8 + }, { + no: 16, + name: "original_request", + kind: "message", + T: Jde + }]); + } + static fromBinary(e, t) { + return new Jde().fromBinary(e, t); + } + static fromJson(e, t) { + return new Jde().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Jde().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Jde, e, t); + } + }; + z1s = class UWe extends N { + constructor(e) { + super(); + this.chunk = ""; + this.fileContext = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ReviewRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "chunk", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "file_context", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "chunk_range", + kind: "message", + T: Kv + }, { + no: 4, + name: "diff_string", + kind: "scalar", + T: 9, + opt: true + }, { + no: 5, + name: "custom_instructions", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new UWe().fromBinary(e, t); + } + static fromJson(e, t) { + return new UWe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new UWe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(UWe, e, t); + } + }; + azt = class WWe extends N { + constructor(e) { + super(); + this.text = ""; + this.type = Mve.UNSPECIFIED; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ReviewChatMessage"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "text", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "type", + kind: "enum", + T: m.getEnumType(Mve) + }]); + } + static fromBinary(e, t) { + return new WWe().fromBinary(e, t); + } + static fromJson(e, t) { + return new WWe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new WWe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(WWe, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.HUMAN = 1] = "HUMAN"; + i[i.AI = 2] = "AI"; + })(Mve ||= {}); + m.util.setEnumType(Mve, "aiserver.v1.ReviewChatMessage.ReviewChatMessageType", [{ + no: 0, + name: "REVIEW_CHAT_MESSAGE_TYPE_UNSPECIFIED" + }, { + no: 1, + name: "REVIEW_CHAT_MESSAGE_TYPE_HUMAN" + }, { + no: 2, + name: "REVIEW_CHAT_MESSAGE_TYPE_AI" + }]); + J1s = class VWe extends N { + constructor(e) { + super(); + this.chunk = ""; + this.fileContext = ""; + this.messages = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ReviewChatRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "chunk", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "file_context", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "chunk_range", + kind: "message", + T: Kv + }, { + no: 4, + name: "messages", + kind: "message", + T: azt, + repeated: true + }]); + } + static fromBinary(e, t) { + return new VWe().fromBinary(e, t); + } + static fromJson(e, t) { + return new VWe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new VWe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(VWe, e, t); + } + }; + G1s = class HWe extends N { + constructor(e) { + super(); + this.text = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ReviewChatResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "text", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "should_resolve", + kind: "scalar", + T: 8, + opt: true + }]); + } + static fromBinary(e, t) { + return new HWe().fromBinary(e, t); + } + static fromJson(e, t) { + return new HWe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new HWe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(HWe, e, t); + } + }; + K1s = class qWe extends N { + constructor(e) { + super(); + this.id = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ReviewBug"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "start_line", + kind: "scalar", + T: 5, + opt: true + }, { + no: 3, + name: "end_line", + kind: "scalar", + T: 5, + opt: true + }, { + no: 4, + name: "description", + kind: "scalar", + T: 9, + opt: true + }, { + no: 5, + name: "severity", + kind: "scalar", + T: 5, + opt: true + }, { + no: 6, + name: "tldr", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new qWe().fromBinary(e, t); + } + static fromJson(e, t) { + return new qWe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new qWe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(qWe, e, t); + } + }; + Y1s = class jWe extends N { + constructor(e) { + super(); + this.text = ""; + this.bugs = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ReviewResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "text", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "prompt", + kind: "scalar", + T: 9, + opt: true + }, { + no: 3, + name: "tldr", + kind: "scalar", + T: 9, + opt: true + }, { + no: 4, + name: "is_bug", + kind: "scalar", + T: 8, + opt: true + }, { + no: 5, + name: "bugs", + kind: "message", + T: K1s, + repeated: true + }]); + } + static fromBinary(e, t) { + return new jWe().fromBinary(e, t); + } + static fromJson(e, t) { + return new jWe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new jWe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(jWe, e, t); + } + }; + X1s = class zWe extends N { + constructor(e) { + super(); + this.conversation = []; + this.isCmdI = false; + this.files = []; + this.useFastApply = false; + this.fastApplyModelType = iJ.UNSPECIFIED; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SlashEditRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 2, + name: "current_file", + kind: "message", + T: tu + }, { + no: 3, + name: "conversation", + kind: "message", + T: Al, + repeated: true + }, { + no: 4, + name: "explicit_context", + kind: "message", + T: Qg + }, { + no: 7, + name: "model_details", + kind: "message", + T: Qa + }, { + no: 8, + name: "is_cmd_i", + kind: "scalar", + T: 8 + }, { + no: 11, + name: "summary", + kind: "scalar", + T: 9, + opt: true + }, { + no: 12, + name: "summary_up_until_index", + kind: "scalar", + T: 5, + opt: true + }, { + no: 13, + name: "should_use_turbo_debug_prompt", + kind: "scalar", + T: 8, + opt: true + }, { + no: 14, + name: "edit_selection", + kind: "message", + T: Kv, + opt: true + }, { + no: 15, + name: "files", + kind: "message", + T: tu, + repeated: true + }, { + no: 16, + name: "clicked_code_block_contents", + kind: "scalar", + T: 9, + opt: true + }, { + no: 17, + name: "is_an_optimistic_request_for_caching_and_linting", + kind: "scalar", + T: 8, + opt: true + }, { + no: 18, + name: "specific_instructions", + kind: "scalar", + T: 9, + opt: true + }, { + no: 19, + name: "use_fast_apply", + kind: "scalar", + T: 8 + }, { + no: 20, + name: "fast_apply_model_type", + kind: "enum", + T: m.getEnumType(iJ) + }, { + no: 25, + name: "use_chunk_speculation_for_long_files", + kind: "scalar", + T: 8, + opt: true + }, { + no: 26, + name: "parent_request_id", + kind: "scalar", + T: 9, + opt: true + }, { + no: 27, + name: "source", + kind: "enum", + T: m.getEnumType(qw), + opt: true + }, { + no: 28, + name: "is_reapply", + kind: "scalar", + T: 8, + opt: true + }, { + no: 29, + name: "willing_to_pay_extra_for_speed", + kind: "scalar", + T: 8, + opt: true + }, { + no: 30, + name: "attempt_number", + kind: "scalar", + T: 5, + opt: true + }, { + no: 31, + name: "should_throw_timeout_error", + kind: "scalar", + T: 8, + opt: true + }]); + } + static fromBinary(e, t) { + return new zWe().fromBinary(e, t); + } + static fromJson(e, t) { + return new zWe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new zWe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(zWe, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.DEFAULT = 1] = "DEFAULT"; + i[i.DEEPSEEK = 2] = "DEEPSEEK"; + i[i.SONNET = 3] = "SONNET"; + i[i.OPUS_DIFF = 4] = "OPUS_DIFF"; + i[i.SMART_REWRITE = 5] = "SMART_REWRITE"; + i[i.GPT4 = 6] = "GPT4"; + i[i.GPT4_NOSPEC = 7] = "GPT4_NOSPEC"; + i[i.SMART_REWRITE_NOSPEC = 8] = "SMART_REWRITE_NOSPEC"; + i[i.OPUS = 9] = "OPUS"; + i[i.HAIKU = 10] = "HAIKU"; + i[i.GPT4O_NOSPEC = 11] = "GPT4O_NOSPEC"; + i[i.GPT4O_DIFF = 12] = "GPT4O_DIFF"; + i[i.CODESTRAL_REWRITE = 13] = "CODESTRAL_REWRITE"; + i[i.DEEPSEEK_33B = 14] = "DEEPSEEK_33B"; + i[i.SONNET_35_DIFF = 15] = "SONNET_35_DIFF"; + i[i.SONNET_35_REWRITE = 16] = "SONNET_35_REWRITE"; + i[i.PROMPTED_DEEPSEEK_V2 = 17] = "PROMPTED_DEEPSEEK_V2"; + i[i.CODESTRAL_REWRITE_OLD = 18] = "CODESTRAL_REWRITE_OLD"; + i[i.CODESTRAL_REWRITE_FP16 = 19] = "CODESTRAL_REWRITE_FP16"; + i[i.DEEPSEEK_33B_V2 = 20] = "DEEPSEEK_33B_V2"; + i[i.CODESTRAL_V4 = 21] = "CODESTRAL_V4"; + i[i.CODESTRAL_V5 = 22] = "CODESTRAL_V5"; + i[i.CODESTRAL_V6 = 23] = "CODESTRAL_V6"; + i[i.CODESTRAL_V7 = 24] = "CODESTRAL_V7"; + })(iJ ||= {}); + m.util.setEnumType(iJ, "aiserver.v1.SlashEditRequest.FastApplyModelType", [{ + no: 0, + name: "FAST_APPLY_MODEL_TYPE_UNSPECIFIED" + }, { + no: 1, + name: "FAST_APPLY_MODEL_TYPE_DEFAULT" + }, { + no: 2, + name: "FAST_APPLY_MODEL_TYPE_DEEPSEEK" + }, { + no: 3, + name: "FAST_APPLY_MODEL_TYPE_SONNET" + }, { + no: 4, + name: "FAST_APPLY_MODEL_TYPE_OPUS_DIFF" + }, { + no: 5, + name: "FAST_APPLY_MODEL_TYPE_SMART_REWRITE" + }, { + no: 6, + name: "FAST_APPLY_MODEL_TYPE_GPT4" + }, { + no: 7, + name: "FAST_APPLY_MODEL_TYPE_GPT4_NOSPEC" + }, { + no: 8, + name: "FAST_APPLY_MODEL_TYPE_SMART_REWRITE_NOSPEC" + }, { + no: 9, + name: "FAST_APPLY_MODEL_TYPE_OPUS" + }, { + no: 10, + name: "FAST_APPLY_MODEL_TYPE_HAIKU" + }, { + no: 11, + name: "FAST_APPLY_MODEL_TYPE_GPT4O_NOSPEC" + }, { + no: 12, + name: "FAST_APPLY_MODEL_TYPE_GPT4O_DIFF" + }, { + no: 13, + name: "FAST_APPLY_MODEL_TYPE_CODESTRAL_REWRITE" + }, { + no: 14, + name: "FAST_APPLY_MODEL_TYPE_DEEPSEEK_33B" + }, { + no: 15, + name: "FAST_APPLY_MODEL_TYPE_SONNET_35_DIFF" + }, { + no: 16, + name: "FAST_APPLY_MODEL_TYPE_SONNET_35_REWRITE" + }, { + no: 17, + name: "FAST_APPLY_MODEL_TYPE_PROMPTED_DEEPSEEK_V2" + }, { + no: 18, + name: "FAST_APPLY_MODEL_TYPE_CODESTRAL_REWRITE_OLD" + }, { + no: 19, + name: "FAST_APPLY_MODEL_TYPE_CODESTRAL_REWRITE_FP16" + }, { + no: 20, + name: "FAST_APPLY_MODEL_TYPE_DEEPSEEK_33B_V2" + }, { + no: 21, + name: "FAST_APPLY_MODEL_TYPE_CODESTRAL_V4" + }, { + no: 22, + name: "FAST_APPLY_MODEL_TYPE_CODESTRAL_V5" + }, { + no: 23, + name: "FAST_APPLY_MODEL_TYPE_CODESTRAL_V6" + }, { + no: 24, + name: "FAST_APPLY_MODEL_TYPE_CODESTRAL_V7" + }]); + Q1s = class JWe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SlashEditResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "cmd_k_response", + kind: "message", + T: Ive + }]); + } + static fromBinary(e, t) { + return new JWe().fromBinary(e, t); + } + static fromJson(e, t) { + return new JWe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new JWe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(JWe, e, t); + } + }; + lzt = class GWe extends N { + constructor(e) { + super(); + this.originalLines = []; + this.newLines = []; + this.relativeWorkspacePath = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SlashEditPreviousEdit"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "original_lines", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 2, + name: "new_lines", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 3, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "range", + kind: "message", + T: Kv + }]); + } + static fromBinary(e, t) { + return new GWe().fromBinary(e, t); + } + static fromJson(e, t) { + return new GWe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new GWe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(GWe, e, t); + } + }; + Z1s = class KWe extends N { + constructor(e) { + super(); + this.conversation = []; + this.previousEdits = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SlashEditFollowUpWithPreviousEditsRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "conversation", + kind: "message", + T: Al, + repeated: true + }, { + no: 2, + name: "model_details", + kind: "message", + T: Qa + }, { + no: 3, + name: "previous_edits", + kind: "message", + T: lzt, + repeated: true + }]); + } + static fromBinary(e, t) { + return new KWe().fromBinary(e, t); + } + static fromJson(e, t) { + return new KWe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new KWe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(KWe, e, t); + } + }; + exs = class YWe extends N { + constructor(e) { + super(); + this.response = { + case: undefined + }; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamSlashEditFollowUpWithPreviousEditsResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "chat", + kind: "message", + T: txs, + oneof: "response" + }, { + no: 2, + name: "edits_to_update", + kind: "message", + T: ixs, + oneof: "response" + }]); + } + static fromBinary(e, t) { + return new YWe().fromBinary(e, t); + } + static fromJson(e, t) { + return new YWe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new YWe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(YWe, e, t); + } + }; + txs = class XWe extends N { + constructor(e) { + super(); + this.text = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamSlashEditFollowUpWithPreviousEditsResponse.Chat"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "text", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new XWe().fromBinary(e, t); + } + static fromJson(e, t) { + return new XWe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new XWe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(XWe, e, t); + } + }; + ixs = class QWe extends N { + constructor(e) { + super(); + this.previousEdits = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamSlashEditFollowUpWithPreviousEditsResponse.EditsToUpdate"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "previous_edits", + kind: "message", + T: lzt, + repeated: true + }]); + } + static fromBinary(e, t) { + return new QWe().fromBinary(e, t); + } + static fromJson(e, t) { + return new QWe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new QWe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(QWe, e, t); + } + }; + sxs = class ZWe extends N { + constructor(e) { + super(); + this.repositories = []; + this.query = ""; + this.codeBlocks = []; + this.documentationIdentifiers = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamFastEditRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "current_file", + kind: "message", + T: tu + }, { + no: 3, + name: "repositories", + kind: "message", + T: pc, + repeated: true + }, { + no: 4, + name: "explicit_context", + kind: "message", + T: Qg + }, { + no: 5, + name: "workspace_root_path", + kind: "scalar", + T: 9, + opt: true + }, { + no: 6, + name: "query", + kind: "scalar", + T: 9 + }, { + no: 7, + name: "code_blocks", + kind: "message", + T: Xg, + repeated: true + }, { + no: 9, + name: "model_details", + kind: "message", + T: Qa + }, { + no: 10, + name: "documentation_identifiers", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 11, + name: "linter_errors", + kind: "message", + T: xp + }]); + } + static fromBinary(e, t) { + return new ZWe().fromBinary(e, t); + } + static fromJson(e, t) { + return new ZWe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new ZWe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(ZWe, e, t); + } + }; + nxs = class eVe extends N { + constructor(e) { + super(); + this.lineNumber = 0; + this.replaceNumLines = 0; + this.editUuid = ""; + this.resetNewLines = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamFastEditResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 2, + name: "line_number", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "replace_num_lines", + kind: "scalar", + T: 5 + }, { + no: 5, + name: "edit_uuid", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "done", + kind: "scalar", + T: 8, + opt: true + }, { + no: 6, + name: "new_line", + kind: "scalar", + T: 9, + opt: true + }, { + no: 7, + name: "reset_new_lines", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new eVe().fromBinary(e, t); + } + static fromJson(e, t) { + return new eVe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new eVe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(eVe, e, t); + } + }; + czt = class Gde extends N { + constructor(e) { + super(); + this.conversation = []; + this.repositories = []; + this.query = ""; + this.codeBlocks = []; + this.documentationIdentifiers = []; + this.promptCodeBlocks = []; + this.sessionId = ""; + this.fastMode = false; + this.images = []; + this.links = []; + this.rules = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamEditRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "current_file", + kind: "message", + T: tu + }, { + no: 2, + name: "conversation", + kind: "message", + T: Al, + repeated: true + }, { + no: 3, + name: "repositories", + kind: "message", + T: pc, + repeated: true + }, { + no: 4, + name: "explicit_context", + kind: "message", + T: Qg + }, { + no: 5, + name: "workspace_root_path", + kind: "scalar", + T: 9, + opt: true + }, { + no: 6, + name: "query", + kind: "scalar", + T: 9 + }, { + no: 7, + name: "code_blocks", + kind: "message", + T: Xg, + repeated: true + }, { + no: 9, + name: "model_details", + kind: "message", + T: Qa + }, { + no: 10, + name: "documentation_identifiers", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 11, + name: "linter_errors", + kind: "message", + T: xp + }, { + no: 12, + name: "prompt_code_blocks", + kind: "message", + T: Xg, + repeated: true + }, { + no: 14, + name: "session_id", + kind: "scalar", + T: 9 + }, { + no: 13, + name: "cmd_k_debug_info", + kind: "message", + T: KT + }, { + no: 15, + name: "fast_mode", + kind: "scalar", + T: 8 + }, { + no: 16, + name: "original_request", + kind: "message", + T: Gde + }, { + no: 17, + name: "images", + kind: "message", + T: tD, + repeated: true + }, { + no: 18, + name: "links", + kind: "message", + T: mut, + repeated: true + }, { + no: 19, + name: "rules", + kind: "message", + T: XT, + repeated: true + }]); + } + static fromBinary(e, t) { + return new Gde().fromBinary(e, t); + } + static fromJson(e, t) { + return new Gde().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Gde().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Gde, e, t); + } + }; + rxs = class tVe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.PreloadEditRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "req", + kind: "message", + T: czt + }]); + } + static fromBinary(e, t) { + return new tVe().fromBinary(e, t); + } + static fromJson(e, t) { + return new tVe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new tVe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(tVe, e, t); + } + }; + oxs = class iVe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.PreloadEditResponse"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new iVe().fromBinary(e, t); + } + static fromJson(e, t) { + return new iVe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new iVe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(iVe, e, t); + } + }; + uzt = class sVe extends N { + constructor(e) { + super(); + this.chunksToAnalyze = []; + this.dismissedBugs = []; + this.activeBugs = []; + this.lintRules = []; + this.clients = []; + this.forceEnableDiscriminators = []; + this.forceDisableDiscriminators = []; + this.forceEnableGenerators = []; + this.forceDisableGenerators = []; + this.version = 0; + this.debugMode = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamAiLintBugRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "chunks_to_analyze", + kind: "message", + T: Idt, + repeated: true + }, { + no: 4, + name: "explicit_context", + kind: "message", + T: Qg + }, { + no: 5, + name: "workspace_root_path", + kind: "scalar", + T: 9, + opt: true + }, { + no: 9, + name: "model_details", + kind: "message", + T: Qa + }, { + no: 10, + name: "dismissed_bugs", + kind: "message", + T: Qie, + repeated: true + }, { + no: 11, + name: "active_bugs", + kind: "message", + T: Qie, + repeated: true + }, { + no: 12, + name: "lint_rules", + kind: "message", + T: Njt, + repeated: true + }, { + no: 14, + name: "clients", + kind: "message", + T: dzt, + repeated: true + }, { + no: 17, + name: "force_enable_discriminators", + kind: "enum", + T: m.getEnumType(eJ), + repeated: true + }, { + no: 18, + name: "force_disable_discriminators", + kind: "enum", + T: m.getEnumType(eJ), + repeated: true + }, { + no: 19, + name: "force_enable_generators", + kind: "enum", + T: m.getEnumType(tJ), + repeated: true + }, { + no: 20, + name: "force_disable_generators", + kind: "enum", + T: m.getEnumType(tJ), + repeated: true + }, { + no: 21, + name: "version", + kind: "scalar", + T: 5 + }, { + no: 15, + name: "discriminator_options", + kind: "message", + T: axs, + opt: true + }, { + no: 16, + name: "debug_mode", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new sVe().fromBinary(e, t); + } + static fromJson(e, t) { + return new sVe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new sVe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(sVe, e, t); + } + }; + Idt = class nVe extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.startLineNumber = 0; + this.lines = []; + this.contextLinesBefore = []; + this.contextLinesAfter = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamAiLintBugRequest.CodeChunk"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "start_line_number", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "lines", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 4, + name: "context_lines_before", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 5, + name: "context_lines_after", + kind: "scalar", + T: 9, + repeated: true + }]); + } + static fromBinary(e, t) { + return new nVe().fromBinary(e, t); + } + static fromJson(e, t) { + return new nVe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new nVe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(nVe, e, t); + } + }; + dzt = class rVe extends N { + constructor(e) { + super(); + this.chunks = []; + this.referredStartLines = []; + this.referredEndLines = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamAiLintBugRequest.CodeChunkList"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 13, + name: "chunks", + kind: "message", + T: Idt, + repeated: true + }, { + no: 14, + name: "referred_start_lines", + kind: "scalar", + T: 5, + repeated: true + }, { + no: 15, + name: "referred_end_lines", + kind: "scalar", + T: 5, + repeated: true + }]); + } + static fromBinary(e, t) { + return new rVe().fromBinary(e, t); + } + static fromJson(e, t) { + return new rVe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new rVe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(rVe, e, t); + } + }; + axs = class oVe extends N { + constructor(e) { + super(); + this.specificRules = false; + this.compileErrors = false; + this.changeBehavior = false; + this.matchCode = false; + this.relevance = false; + this.userAwareness = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamAiLintBugRequest.DiscriminatorOptions"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "specific_rules", + kind: "scalar", + T: 8 + }, { + no: 2, + name: "compile_errors", + kind: "scalar", + T: 8 + }, { + no: 3, + name: "change_behavior", + kind: "scalar", + T: 8 + }, { + no: 4, + name: "match_code", + kind: "scalar", + T: 8 + }, { + no: 5, + name: "relevance", + kind: "scalar", + T: 8 + }, { + no: 6, + name: "user_awareness", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new oVe().fromBinary(e, t); + } + static fromJson(e, t) { + return new oVe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new oVe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(oVe, e, t); + } + }; + lxs = class aVe extends N { + constructor(e) { + super(); + this.response = { + case: undefined + }; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamAiLintBugResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "bug", + kind: "message", + T: Qie, + oneof: "response" + }, { + no: 2, + name: "background_task_uuid", + kind: "scalar", + T: 9, + oneof: "response" + }]); + } + static fromBinary(e, t) { + return new aVe().fromBinary(e, t); + } + static fromJson(e, t) { + return new aVe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new aVe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(aVe, e, t); + } + }; + cxs = class lVe extends N { + constructor(e) { + super(); + this.uuid = ""; + this.userAction = ""; + this.debugMode = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.LogUserLintReplyRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "uuid", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "user_action", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "debug_mode", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new lVe().fromBinary(e, t); + } + static fromJson(e, t) { + return new lVe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new lVe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(lVe, e, t); + } + }; + uxs = class cVe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.LogUserLintReplyResponse"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new cVe().fromBinary(e, t); + } + static fromJson(e, t) { + return new cVe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new cVe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(cVe, e, t); + } + }; + dxs = class uVe extends N { + constructor(e) { + super(); + this.userFeedback = Ave.UNSPECIFIED; + this.userFeedbackDetails = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.LogLinterExplicitUserFeedbackRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "bug", + kind: "message", + T: Qie + }, { + no: 3, + name: "user_feedback", + kind: "enum", + T: m.getEnumType(Ave) + }, { + no: 4, + name: "user_feedback_details", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new uVe().fromBinary(e, t); + } + static fromJson(e, t) { + return new uVe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new uVe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(uVe, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.CORRECT = 1] = "CORRECT"; + i[i.INCORRECT = 2] = "INCORRECT"; + i[i.OTHER = 3] = "OTHER"; + })(Ave ||= {}); + m.util.setEnumType(Ave, "aiserver.v1.LogLinterExplicitUserFeedbackRequest.LinterUserFeedback", [{ + no: 0, + name: "LINTER_USER_FEEDBACK_UNSPECIFIED" + }, { + no: 1, + name: "LINTER_USER_FEEDBACK_CORRECT" + }, { + no: 2, + name: "LINTER_USER_FEEDBACK_INCORRECT" + }, { + no: 3, + name: "LINTER_USER_FEEDBACK_OTHER" + }]); + hxs = class dVe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.LogLinterExplicitUserFeedbackResponse"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new dVe().fromBinary(e, t); + } + static fromJson(e, t) { + return new dVe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new dVe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(dVe, e, t); + } + }; + hzt = class hVe extends N { + constructor(e) { + super(); + this.currentRules = ""; + this.dismissedBug = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamNewRuleRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "current_rules", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "dismissed_bug", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new hVe().fromBinary(e, t); + } + static fromJson(e, t) { + return new hVe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new hVe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(hVe, e, t); + } + }; + fzt = class fVe extends N { + constructor(e) { + super(); + this.conversation = []; + this.repositories = []; + this.query = ""; + this.codeBlocks = []; + this.sessionId = ""; + this.documentationIdentifiers = []; + this.promptCodeBlocks = []; + this.fastMode = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamGPTFourEditRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "current_file", + kind: "message", + T: tu + }, { + no: 2, + name: "conversation", + kind: "message", + T: Al, + repeated: true + }, { + no: 3, + name: "repositories", + kind: "message", + T: pc, + repeated: true + }, { + no: 4, + name: "explicit_context", + kind: "message", + T: Qg + }, { + no: 5, + name: "workspace_root_path", + kind: "scalar", + T: 9, + opt: true + }, { + no: 6, + name: "query", + kind: "scalar", + T: 9 + }, { + no: 7, + name: "code_blocks", + kind: "message", + T: Xg, + repeated: true + }, { + no: 14, + name: "session_id", + kind: "scalar", + T: 9 + }, { + no: 9, + name: "model_details", + kind: "message", + T: Qa + }, { + no: 10, + name: "documentation_identifiers", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 11, + name: "linter_errors", + kind: "message", + T: xp + }, { + no: 12, + name: "prompt_code_blocks", + kind: "message", + T: Xg, + repeated: true + }, { + no: 13, + name: "fast_mode", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new fVe().fromBinary(e, t); + } + static fromJson(e, t) { + return new fVe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new fVe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(fVe, e, t); + } + }; + fxs = class gVe extends N { + constructor(e) { + super(); + this.id = ""; + this.role = ""; + this.content = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CursorHelpConversationMessage"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "role", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "content", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new gVe().fromBinary(e, t); + } + static fromJson(e, t) { + return new gVe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new gVe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(gVe, e, t); + } + }; + gxs = class pVe extends N { + constructor(e) { + super(); + this.messages = []; + this.userOs = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamAiCursorHelpRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "messages", + kind: "message", + T: fxs, + repeated: true + }, { + no: 2, + name: "user_os", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "model_details", + kind: "message", + T: Qa + }]); + } + static fromBinary(e, t) { + return new pVe().fromBinary(e, t); + } + static fromJson(e, t) { + return new pVe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new pVe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(pVe, e, t); + } + }; + pxs = class mVe extends N { + constructor(e) { + super(); + this.text = ""; + this.actions = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamAiCursorHelpResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "text", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "actions", + kind: "scalar", + T: 9, + repeated: true + }]); + } + static fromBinary(e, t) { + return new mVe().fromBinary(e, t); + } + static fromJson(e, t) { + return new mVe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new mVe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(mVe, e, t); + } + }; + mxs = class bVe extends N { + constructor(e) { + super(); + this.currentCommand = ""; + this.commandHistory = []; + this.fileDiffHistories = []; + this.commitHistory = []; + this.pastResults = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamTerminalAutocompleteRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "current_command", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "command_history", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 3, + name: "model_name", + kind: "scalar", + T: 9, + opt: true + }, { + no: 4, + name: "file_diff_histories", + kind: "message", + T: Fx, + repeated: true + }, { + no: 5, + name: "git_diff", + kind: "scalar", + T: 9, + opt: true + }, { + no: 6, + name: "commit_history", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 7, + name: "past_results", + kind: "scalar", + T: 9, + repeated: true + }]); + } + static fromBinary(e, t) { + return new bVe().fromBinary(e, t); + } + static fromJson(e, t) { + return new bVe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new bVe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(bVe, e, t); + } + }; + gzt = class vVe extends N { + constructor(e) { + super(); + this.content = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.PseudocodeTarget"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "range", + kind: "message", + T: Of + }, { + no: 2, + name: "content", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new vVe().fromBinary(e, t); + } + static fromJson(e, t) { + return new vVe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new vVe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(vVe, e, t); + } + }; + bxs = class yVe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamPseudocodeGeneratorRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "current_file", + kind: "message", + T: tu + }, { + no: 2, + name: "target", + kind: "message", + T: gzt + }]); + } + static fromBinary(e, t) { + return new yVe().fromBinary(e, t); + } + static fromJson(e, t) { + return new yVe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new yVe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(yVe, e, t); + } + }; + vxs = class wVe extends N { + constructor(e) { + super(); + this.text = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamPseudocodeGeneratorResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "text", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new wVe().fromBinary(e, t); + } + static fromJson(e, t) { + return new wVe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new wVe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(wVe, e, t); + } + }; + yxs = class CVe extends N { + constructor(e) { + super(); + this.pseudocode = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamPseudocodeMapperRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 2, + name: "target", + kind: "message", + T: gzt + }, { + no: 1, + name: "pseudocode", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new CVe().fromBinary(e, t); + } + static fromJson(e, t) { + return new CVe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new CVe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(CVe, e, t); + } + }; + wxs = class SVe extends N { + constructor(e) { + super(); + this.text = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamPseudocodeMapperResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "text", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new SVe().fromBinary(e, t); + } + static fromJson(e, t) { + return new SVe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new SVe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(SVe, e, t); + } + }; + Cxs = class xVe extends N { + constructor(e) { + super(); + this.text = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamTerminalAutocompleteResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "text", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "done_stream", + kind: "scalar", + T: 8, + opt: true + }]); + } + static fromBinary(e, t) { + return new xVe().fromBinary(e, t); + } + static fromJson(e, t) { + return new xVe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new xVe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(xVe, e, t); + } + }; + pzt = class kVe extends N { + constructor(e) { + super(); + this.repositories = []; + this.gitDiff = ""; + this.conversation = []; + this.query = ""; + this.stop = ""; + this.importLineInDiff = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamBackgroundEditRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "current_file", + kind: "message", + T: tu + }, { + no: 2, + name: "repositories", + kind: "message", + T: pc, + repeated: true + }, { + no: 3, + name: "explicit_context", + kind: "message", + T: Qg + }, { + no: 4, + name: "workspace_root_path", + kind: "scalar", + T: 9, + opt: true + }, { + no: 5, + name: "git_diff", + kind: "scalar", + T: 9 + }, { + no: 6, + name: "conversation", + kind: "message", + T: Al, + repeated: true + }, { + no: 7, + name: "query", + kind: "scalar", + T: 9 + }, { + no: 8, + name: "model_details", + kind: "message", + T: Qa + }, { + no: 9, + name: "stop", + kind: "scalar", + T: 9 + }, { + no: 10, + name: "import_line_in_diff", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new kVe().fromBinary(e, t); + } + static fromJson(e, t) { + return new kVe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new kVe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(kVe, e, t); + } + }; + Sxs = class EVe extends N { + constructor(e) { + super(); + this.callStack = []; + this.history = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.DebugInfo"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "breakpoint", + kind: "message", + T: Ixs + }, { + no: 2, + name: "call_stack", + kind: "message", + T: Exs, + repeated: true + }, { + no: 3, + name: "history", + kind: "message", + T: Xg, + repeated: true + }]); + } + static fromBinary(e, t) { + return new EVe().fromBinary(e, t); + } + static fromJson(e, t) { + return new EVe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new EVe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(EVe, e, t); + } + }; + xxs = class IVe extends N { + constructor(e) { + super(); + this.name = ""; + this.value = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.DebugInfo.Variable"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "name", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "value", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "type", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new IVe().fromBinary(e, t); + } + static fromJson(e, t) { + return new IVe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new IVe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(IVe, e, t); + } + }; + kxs = class DVe extends N { + constructor(e) { + super(); + this.name = ""; + this.variables = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.DebugInfo.Scope"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "name", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "variables", + kind: "message", + T: xxs, + repeated: true + }]); + } + static fromBinary(e, t) { + return new DVe().fromBinary(e, t); + } + static fromJson(e, t) { + return new DVe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new DVe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(DVe, e, t); + } + }; + Exs = class TVe extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.lineNumber = 0; + this.functionName = ""; + this.scopes = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.DebugInfo.CallStackFrame"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "line_number", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "function_name", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "scopes", + kind: "message", + T: kxs, + repeated: true + }]); + } + static fromBinary(e, t) { + return new TVe().fromBinary(e, t); + } + static fromJson(e, t) { + return new TVe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new TVe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(TVe, e, t); + } + }; + Ixs = class PVe extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.lineNumber = 0; + this.linesBeforeBreakpoint = []; + this.linesAfterBreakpoint = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.DebugInfo.Breakpoint"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "line_number", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "lines_before_breakpoint", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 4, + name: "lines_after_breakpoint", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 5, + name: "exception_info", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new PVe().fromBinary(e, t); + } + static fromJson(e, t) { + return new PVe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new PVe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(PVe, e, t); + } + }; + l5 = class LVe extends N { + constructor(e) { + super(); + this.conversation = []; + this.repositories = []; + this.codeBlocks = []; + this.documentationIdentifiers = []; + this.requestId = ""; + this.conversationId = ""; + this.quotes = []; + this.externalLinks = []; + this.commitNotes = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetChatRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "current_file", + kind: "message", + T: tu + }, { + no: 2, + name: "conversation", + kind: "message", + T: Al, + repeated: true + }, { + no: 3, + name: "repositories", + kind: "message", + T: pc, + repeated: true + }, { + no: 4, + name: "explicit_context", + kind: "message", + T: Qg + }, { + no: 5, + name: "workspace_root_path", + kind: "scalar", + T: 9, + opt: true + }, { + no: 6, + name: "code_blocks", + kind: "message", + T: Xg, + repeated: true + }, { + no: 7, + name: "model_details", + kind: "message", + T: Qa + }, { + no: 8, + name: "documentation_identifiers", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 9, + name: "request_id", + kind: "scalar", + T: 9 + }, { + no: 10, + name: "linter_errors", + kind: "message", + T: xp + }, { + no: 11, + name: "summary", + kind: "scalar", + T: 9, + opt: true + }, { + no: 12, + name: "summary_up_until_index", + kind: "scalar", + T: 5, + opt: true + }, { + no: 13, + name: "allow_long_file_scan", + kind: "scalar", + T: 8, + opt: true + }, { + no: 14, + name: "is_bash", + kind: "scalar", + T: 8, + opt: true + }, { + no: 15, + name: "conversation_id", + kind: "scalar", + T: 9 + }, { + no: 16, + name: "can_handle_filenames_after_language_ids", + kind: "scalar", + T: 8, + opt: true + }, { + no: 17, + name: "use_web", + kind: "scalar", + T: 9, + opt: true + }, { + no: 18, + name: "quotes", + kind: "message", + T: ybe, + repeated: true + }, { + no: 19, + name: "debug_info", + kind: "message", + T: Sxs, + opt: true + }, { + no: 20, + name: "workspace_id", + kind: "scalar", + T: 9, + opt: true + }, { + no: 21, + name: "external_links", + kind: "message", + T: nfs, + repeated: true + }, { + no: 23, + name: "commit_notes", + kind: "message", + T: but, + repeated: true + }, { + no: 22, + name: "long_context_mode", + kind: "scalar", + T: 8, + opt: true + }, { + no: 24, + name: "is_eval", + kind: "scalar", + T: 8, + opt: true + }, { + no: 26, + name: "desired_max_tokens", + kind: "scalar", + T: 5, + opt: true + }, { + no: 25, + name: "context_ast", + kind: "message", + T: Ajt + }, { + no: 27, + name: "is_composer", + kind: "scalar", + T: 8, + opt: true + }, { + no: 28, + name: "runnable_code_blocks", + kind: "scalar", + T: 8, + opt: true + }, { + no: 29, + name: "should_cache", + kind: "scalar", + T: 8, + opt: true + }, { + no: 30, + name: "allow_model_fallbacks", + kind: "scalar", + T: 8, + opt: true + }, { + no: 31, + name: "number_of_times_shown_fallback_model_warning", + kind: "scalar", + T: 5, + opt: true + }]); + } + static fromBinary(e, t) { + return new LVe().fromBinary(e, t); + } + static fromJson(e, t) { + return new LVe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new LVe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(LVe, e, t); + } + }; + Dxs = class RVe extends N { + constructor(e) { + super(); + this.conversation = []; + this.documentationIdentifiers = []; + this.externalLinks = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetNotepadChatRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "conversation", + kind: "message", + T: Al, + repeated: true + }, { + no: 2, + name: "allow_long_file_scan", + kind: "scalar", + T: 8, + opt: true + }, { + no: 3, + name: "explicit_context", + kind: "message", + T: Qg + }, { + no: 4, + name: "can_handle_filenames_after_language_ids", + kind: "scalar", + T: 8, + opt: true + }, { + no: 5, + name: "model_details", + kind: "message", + T: Qa + }, { + no: 6, + name: "linter_errors", + kind: "message", + T: xp + }, { + no: 7, + name: "documentation_identifiers", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 8, + name: "use_web", + kind: "scalar", + T: 9, + opt: true + }, { + no: 9, + name: "external_links", + kind: "message", + T: Oz, + repeated: true + }, { + no: 10, + name: "project_context", + kind: "message", + T: Al, + opt: true + }]); + } + static fromBinary(e, t) { + return new RVe().fromBinary(e, t); + } + static fromJson(e, t) { + return new RVe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new RVe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(RVe, e, t); + } + }; + Txs = class NVe extends N { + constructor(e) { + super(); + this.query = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.PotentialLocsInitialQueriesRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "query", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new NVe().fromBinary(e, t); + } + static fromJson(e, t) { + return new NVe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new NVe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(NVe, e, t); + } + }; + Pxs = class MVe extends N { + constructor(e) { + super(); + this.hydeQuery = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.PotentialLocsInitialQueriesResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "hyde_query", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new MVe().fromBinary(e, t); + } + static fromJson(e, t) { + return new MVe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new MVe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(MVe, e, t); + } + }; + Lxs = class AVe extends N { + constructor(e) { + super(); + this.file = ""; + this.ranges = []; + this.query = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.PotentialLocsUnderneathRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "file", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "ranges", + kind: "message", + T: QI, + repeated: true + }, { + no: 3, + name: "query", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new AVe().fromBinary(e, t); + } + static fromJson(e, t) { + return new AVe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new AVe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(AVe, e, t); + } + }; + Rxs = class $Ve extends N { + constructor(e) { + super(); + this.text = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.PotentialLocsUnderneathResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "text", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new $Ve().fromBinary(e, t); + } + static fromJson(e, t) { + return new $Ve().fromJson(e, t); + } + static fromJsonString(e, t) { + return new $Ve().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals($Ve, e, t); + } + }; + Nxs = class FVe extends N { + constructor(e) { + super(); + this.text = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.PotentialLocsRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "text", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new FVe().fromBinary(e, t); + } + static fromJson(e, t) { + return new FVe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new FVe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(FVe, e, t); + } + }; + Mxs = class OVe extends N { + constructor(e) { + super(); + this.potentialLoc = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.PotentialLocsResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "potential_loc", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new OVe().fromBinary(e, t); + } + static fromJson(e, t) { + return new OVe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new OVe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(OVe, e, t); + } + }; + $ve = class _Ve extends N { + constructor(e) { + super(); + this.conversation = []; + this.documentationIdentifiers = []; + this.externalLinks = []; + this.diffsForCompressingFiles = []; + this.multiFileLinterErrors = []; + this.fileDiffHistories = []; + this.additionalRankedContext = []; + this.quotes = []; + this.conversationId = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetComposerChatRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "conversation", + kind: "message", + T: Al, + repeated: true + }, { + no: 2, + name: "allow_long_file_scan", + kind: "scalar", + T: 8, + opt: true + }, { + no: 3, + name: "explicit_context", + kind: "message", + T: Qg + }, { + no: 4, + name: "can_handle_filenames_after_language_ids", + kind: "scalar", + T: 8, + opt: true + }, { + no: 5, + name: "model_details", + kind: "message", + T: Qa + }, { + no: 6, + name: "linter_errors", + kind: "message", + T: xp + }, { + no: 7, + name: "documentation_identifiers", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 8, + name: "use_web", + kind: "scalar", + T: 9, + opt: true + }, { + no: 9, + name: "external_links", + kind: "message", + T: Oz, + repeated: true + }, { + no: 10, + name: "project_context", + kind: "message", + T: Al, + opt: true + }, { + no: 11, + name: "diffs_for_compressing_files", + kind: "message", + T: Axs, + repeated: true + }, { + no: 12, + name: "compress_edits", + kind: "scalar", + T: 8, + opt: true + }, { + no: 13, + name: "should_cache", + kind: "scalar", + T: 8, + opt: true + }, { + no: 14, + name: "multi_file_linter_errors", + kind: "message", + T: xp, + repeated: true + }, { + no: 15, + name: "current_file", + kind: "message", + T: tu + }, { + no: 16, + name: "recent_edits", + kind: "message", + T: $xs, + opt: true + }, { + no: 17, + name: "use_reference_composer_diff_prompt", + kind: "scalar", + T: 8, + opt: true + }, { + no: 18, + name: "file_diff_histories", + kind: "message", + T: sdt, + repeated: true + }, { + no: 19, + name: "use_new_compression_scheme", + kind: "scalar", + T: 8, + opt: true + }, { + no: 20, + name: "additional_ranked_context", + kind: "message", + T: tdt, + repeated: true + }, { + no: 21, + name: "quotes", + kind: "message", + T: ybe, + repeated: true + }, { + no: 22, + name: "willing_to_pay_extra_for_speed", + kind: "scalar", + T: 8, + opt: true + }, { + no: 23, + name: "conversation_id", + kind: "scalar", + T: 9 + }, { + no: 24, + name: "use_unified_chat_prompt", + kind: "scalar", + T: 8, + opt: true + }, { + no: 25, + name: "use_full_inputs_context", + kind: "scalar", + T: 8, + opt: true + }, { + no: 26, + name: "is_resume", + kind: "scalar", + T: 8, + opt: true + }, { + no: 27, + name: "context_bank_session_id", + kind: "scalar", + T: 9, + opt: true + }, { + no: 28, + name: "context_bank_version", + kind: "scalar", + T: 5, + opt: true + }, { + no: 31, + name: "context_bank_encryption_key", + kind: "scalar", + T: 12, + opt: true + }, { + no: 29, + name: "uses_codebase_results", + kind: "message", + T: tse + }]); + } + static fromBinary(e, t) { + return new _Ve().fromBinary(e, t); + } + static fromJson(e, t) { + return new _Ve().fromJson(e, t); + } + static fromJsonString(e, t) { + return new _Ve().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(_Ve, e, t); + } + }; + Axs = class BVe extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.redRanges = []; + this.redRangesReversed = []; + this.startHash = ""; + this.endHash = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetComposerChatRequest.RedDiff"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "red_ranges", + kind: "message", + T: QI, + repeated: true + }, { + no: 3, + name: "red_ranges_reversed", + kind: "message", + T: QI, + repeated: true + }, { + no: 4, + name: "start_hash", + kind: "scalar", + T: 9 + }, { + no: 5, + name: "end_hash", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new BVe().fromBinary(e, t); + } + static fromJson(e, t) { + return new BVe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new BVe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(BVe, e, t); + } + }; + $xs = class UVe extends N { + constructor(e) { + super(); + this.codeBlockInfo = []; + this.finalFileValues = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetComposerChatRequest.RecentEdits"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "code_block_info", + kind: "message", + T: Fxs, + repeated: true + }, { + no: 2, + name: "final_file_values", + kind: "message", + T: Oxs, + repeated: true + }, { + no: 3, + name: "edits_belong_to_composer_generation_uuid", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new UVe().fromBinary(e, t); + } + static fromJson(e, t) { + return new UVe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new UVe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(UVe, e, t); + } + }; + Fxs = class WVe extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetComposerChatRequest.RecentEdits.CodeBlockInfo"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "content_before", + kind: "scalar", + T: 9, + opt: true + }, { + no: 3, + name: "content_after", + kind: "scalar", + T: 9, + opt: true + }, { + no: 4, + name: "generation_uuid", + kind: "scalar", + T: 9, + opt: true + }, { + no: 5, + name: "version", + kind: "scalar", + T: 5, + opt: true + }]); + } + static fromBinary(e, t) { + return new WVe().fromBinary(e, t); + } + static fromJson(e, t) { + return new WVe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new WVe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(WVe, e, t); + } + }; + Oxs = class VVe extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.content = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetComposerChatRequest.RecentEdits.FileInfo"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "content", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new VVe().fromBinary(e, t); + } + static fromJson(e, t) { + return new VVe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new VVe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(VVe, e, t); + } + }; + Mtr = class HVe extends N { + constructor(e) { + super(); + this.conversation = []; + this.repositories = []; + this.codeBlocks = []; + this.documentationIdentifiers = []; + this.query = ""; + this.rerankResults = false; + this.contextResults = { + case: undefined + }; + this.rerankResultsV2 = false; + this.conversationId = ""; + this.canHandleFilenamesAfterLanguageIds = false; + this.longContextMode = false; + this.isEval = false; + this.requestId = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamComposerContextRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "current_file", + kind: "message", + T: tu + }, { + no: 2, + name: "conversation", + kind: "message", + T: Al, + repeated: true + }, { + no: 3, + name: "repositories", + kind: "message", + T: pc, + repeated: true + }, { + no: 4, + name: "explicit_context", + kind: "message", + T: Qg + }, { + no: 5, + name: "workspace_root_path", + kind: "scalar", + T: 9, + opt: true + }, { + no: 6, + name: "code_blocks", + kind: "message", + T: Xg, + repeated: true + }, { + no: 7, + name: "model_details", + kind: "message", + T: Qa + }, { + no: 8, + name: "documentation_identifiers", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 9, + name: "query", + kind: "scalar", + T: 9 + }, { + no: 10, + name: "code_context", + kind: "message", + T: _xs + }, { + no: 11, + name: "rerank_results", + kind: "scalar", + T: 8 + }, { + no: 12, + name: "file_search_results", + kind: "message", + T: Rve, + oneof: "context_results" + }, { + no: 13, + name: "code_search_results", + kind: "message", + T: tse, + oneof: "context_results" + }, { + no: 14, + name: "linter_errors", + kind: "message", + T: xp + }, { + no: 15, + name: "is_bash", + kind: "scalar", + T: 8, + opt: true + }, { + no: 16, + name: "rerank_results_v2", + kind: "scalar", + T: 8 + }, { + no: 17, + name: "conversation_id", + kind: "scalar", + T: 9 + }, { + no: 18, + name: "can_handle_filenames_after_language_ids", + kind: "scalar", + T: 8 + }, { + no: 19, + name: "long_context_mode", + kind: "scalar", + T: 8 + }, { + no: 20, + name: "is_eval", + kind: "scalar", + T: 8 + }, { + no: 21, + name: "request_id", + kind: "scalar", + T: 9 + }, { + no: 22, + name: "desired_max_tokens", + kind: "scalar", + T: 5, + opt: true + }, { + no: 23, + name: "runnable_code_blocks", + kind: "scalar", + T: 8, + opt: true + }]); + } + static fromBinary(e, t) { + return new HVe().fromBinary(e, t); + } + static fromJson(e, t) { + return new HVe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new HVe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(HVe, e, t); + } + }; + _xs = class qVe extends N { + constructor(e) { + super(); + this.chunks = []; + this.scoredChunks = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamComposerContextRequest.CodeContext"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "chunks", + kind: "message", + T: Xg, + repeated: true + }, { + no: 2, + name: "scored_chunks", + kind: "message", + T: xb, + repeated: true + }]); + } + static fromBinary(e, t) { + return new qVe().fromBinary(e, t); + } + static fromJson(e, t) { + return new qVe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new qVe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(qVe, e, t); + } + }; + Bxs = class jVe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CheckUsageBasedPriceRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "usage_event_details", + kind: "message", + T: xdt + }]); + } + static fromBinary(e, t) { + return new jVe().fromBinary(e, t); + } + static fromJson(e, t) { + return new jVe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new jVe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(jVe, e, t); + } + }; + Uxs = class zVe extends N { + constructor(e) { + super(); + this.markdownResponse = ""; + this.cents = 0; + this.priceId = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CheckUsageBasedPriceResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "markdown_response", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "cents", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "price_id", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new zVe().fromBinary(e, t); + } + static fromJson(e, t) { + return new zVe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new zVe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(zVe, e, t); + } + }; + mzt = class JVe extends N { + constructor(e) { + super(); + this.origRequestId = ""; + this.usageUuid = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CheckQueuePositionRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "orig_request_id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "model_details", + kind: "message", + T: Qa + }, { + no: 3, + name: "usage_uuid", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new JVe().fromBinary(e, t); + } + static fromJson(e, t) { + return new JVe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new JVe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(JVe, e, t); + } + }; + Wxs = class GVe extends N { + constructor(e) { + super(); + this.position = 0; + this.hitHardLimit = false; + this.couldEnableUsageBasedPricingToSkip = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CheckQueuePositionResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "position", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "seconds_left_to_wait", + kind: "scalar", + T: 5, + opt: true + }, { + no: 7, + name: "new_queue_position", + kind: "scalar", + T: 5, + opt: true + }, { + no: 3, + name: "hit_hard_limit", + kind: "scalar", + T: 8 + }, { + no: 4, + name: "could_enable_usage_based_pricing_to_skip", + kind: "scalar", + T: 8 + }, { + no: 5, + name: "usage_event_details", + kind: "message", + T: xdt + }, { + no: 6, + name: "custom_link", + kind: "message", + T: Vxs + }, { + no: 8, + name: "model_for_slow_pool_nudge_data", + kind: "message", + T: Hxs, + opt: true + }]); + } + static fromBinary(e, t) { + return new GVe().fromBinary(e, t); + } + static fromJson(e, t) { + return new GVe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new GVe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(GVe, e, t); + } + }; + Vxs = class KVe extends N { + constructor(e) { + super(); + this.address = ""; + this.message = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CheckQueuePositionResponse.CustomLink"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "address", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "message", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new KVe().fromBinary(e, t); + } + static fromJson(e, t) { + return new KVe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new KVe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(KVe, e, t); + } + }; + Hxs = class YVe extends N { + constructor(e) { + super(); + this.model = ""; + this.message = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CheckQueuePositionResponse.ModelForSlowPoolNudgeData"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "model", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "message", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new YVe().fromBinary(e, t); + } + static fromJson(e, t) { + return new YVe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new YVe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(YVe, e, t); + } + }; + qxs = class XVe extends N { + constructor(e) { + super(); + this.fileContent = ""; + this.languageId = ""; + this.commandId = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.IsolatedTreesitterRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "file_content", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "language_id", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "command_id", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new XVe().fromBinary(e, t); + } + static fromJson(e, t) { + return new XVe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new XVe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(XVe, e, t); + } + }; + jxs = class QVe extends N { + constructor(e) { + super(); + this.items = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.IsolatedTreesitterResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "items", + kind: "message", + T: zxs, + repeated: true + }]); + } + static fromBinary(e, t) { + return new QVe().fromBinary(e, t); + } + static fromJson(e, t) { + return new QVe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new QVe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(QVe, e, t); + } + }; + bzt = class ZVe extends N { + constructor(e) { + super(); + this.row = 0; + this.column = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.IsolatedTreesitterResponse.TreeSitterPosition"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "row", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "column", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new ZVe().fromBinary(e, t); + } + static fromJson(e, t) { + return new ZVe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new ZVe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(ZVe, e, t); + } + }; + zxs = class eHe extends N { + constructor(e) { + super(); + this.symbolName = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.IsolatedTreesitterResponse.TreesitterSymbolNameItem"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "symbol_name", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "start_position", + kind: "message", + T: bzt, + opt: true + }, { + no: 3, + name: "end_position", + kind: "message", + T: bzt, + opt: true + }]); + } + static fromBinary(e, t) { + return new eHe().fromBinary(e, t); + } + static fromJson(e, t) { + return new eHe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new eHe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(eHe, e, t); + } + }; + vzt = class tHe extends N { + constructor(e) { + super(); + this.query = ""; + this.answerPlaceholder = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetSimplePromptRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "query", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "answer_placeholder", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new tHe().fromBinary(e, t); + } + static fromJson(e, t) { + return new tHe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new tHe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(tHe, e, t); + } + }; + Jxs = class iHe extends N { + constructor(e) { + super(); + this.result = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetSimplePromptResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "result", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new iHe().fromBinary(e, t); + } + static fromJson(e, t) { + return new iHe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new iHe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(iHe, e, t); + } + }; + yzt = class sHe extends N { + constructor(e) { + super(); + this.query = ""; + this.modelName = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetPassthroughPromptRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "query", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "model_name", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new sHe().fromBinary(e, t); + } + static fromJson(e, t) { + return new sHe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new sHe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(sHe, e, t); + } + }; + Gxs = class nHe extends N { + constructor(e) { + super(); + this.result = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetPassthroughPromptResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "result", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new nHe().fromBinary(e, t); + } + static fromJson(e, t) { + return new nHe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new nHe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(nHe, e, t); + } + }; + Kxs = class rHe extends N { + constructor(e) { + super(); + this.didFit = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CheckLongFilesFitResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "did_fit", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new rHe().fromBinary(e, t); + } + static fromJson(e, t) { + return new rHe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new rHe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(rHe, e, t); + } + }; + Yxs = class oHe extends N { + constructor(e) { + super(); + this.promptType = Fve.UNSPECIFIED; + this.query = ""; + this.bucketId = ""; + this.queryStrategy = ""; + this.tokenLimit = 0; + this.rerankingStrategy = Ove.UNSPECIFIED; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetEvaluationPromptRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "prompt_type", + kind: "enum", + T: m.getEnumType(Fve) + }, { + no: 2, + name: "current_file", + kind: "message", + T: tu + }, { + no: 3, + name: "query", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "bucket_id", + kind: "scalar", + T: 9 + }, { + no: 5, + name: "query_strategy", + kind: "scalar", + T: 9 + }, { + no: 6, + name: "token_limit", + kind: "scalar", + T: 5 + }, { + no: 7, + name: "reranking_strategy", + kind: "enum", + T: m.getEnumType(Ove) + }]); + } + static fromBinary(e, t) { + return new oHe().fromBinary(e, t); + } + static fromJson(e, t) { + return new oHe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new oHe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(oHe, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.GENERATE = 1] = "GENERATE"; + i[i.CHAT = 2] = "CHAT"; + })(Fve ||= {}); + m.util.setEnumType(Fve, "aiserver.v1.GetEvaluationPromptRequest.EvaluationPromptType", [{ + no: 0, + name: "EVALUATION_PROMPT_TYPE_UNSPECIFIED" + }, { + no: 1, + name: "EVALUATION_PROMPT_TYPE_GENERATE" + }, { + no: 2, + name: "EVALUATION_PROMPT_TYPE_CHAT" + }]); + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.DISTANCE_ONLY = 1] = "DISTANCE_ONLY"; + i[i.GPT4_RELEVANCE = 2] = "GPT4_RELEVANCE"; + })(Ove ||= {}); + m.util.setEnumType(Ove, "aiserver.v1.GetEvaluationPromptRequest.RerankingStrategy", [{ + no: 0, + name: "RERANKING_STRATEGY_UNSPECIFIED" + }, { + no: 1, + name: "RERANKING_STRATEGY_DISTANCE_ONLY" + }, { + no: 2, + name: "RERANKING_STRATEGY_GPT4_RELEVANCE" + }]); + Xxs = class aHe extends N { + constructor(e) { + super(); + this.prompt = ""; + this.tokenCount = 0; + this.estimatedTokenCount = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetEvaluationPromptResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "prompt", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "token_count", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "estimated_token_count", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new aHe().fromBinary(e, t); + } + static fromJson(e, t) { + return new aHe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new aHe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(aHe, e, t); + } + }; + Qxs = class lHe extends N { + constructor(e) { + super(); + this.prompt = ""; + this.repositories = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamInlineEditsRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "current_file", + kind: "message", + T: tu + }, { + no: 2, + name: "prompt", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "repositories", + kind: "message", + T: pc, + repeated: true + }, { + no: 4, + name: "explicit_context", + kind: "message", + T: Qg + }]); + } + static fromBinary(e, t) { + return new lHe().fromBinary(e, t); + } + static fromJson(e, t) { + return new lHe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new lHe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(lHe, e, t); + } + }; + Zxs = class cHe extends N { + constructor(e) { + super(); + this.line = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamInlineEditsResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "line", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "debugging_only_prompt", + kind: "scalar", + T: 9, + opt: true + }, { + no: 3, + name: "debugging_only_token_count", + kind: "scalar", + T: 5, + opt: true + }]); + } + static fromBinary(e, t) { + return new cHe().fromBinary(e, t); + } + static fromJson(e, t) { + return new cHe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new cHe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(cHe, e, t); + } + }; + eks = class uHe extends N { + constructor(e) { + super(); + this.didSummarize = false; + this.upUntilIndex = 0; + this.summary = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SummarizeConversationResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "did_summarize", + kind: "scalar", + T: 8 + }, { + no: 2, + name: "up_until_index", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "summary", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new uHe().fromBinary(e, t); + } + static fromJson(e, t) { + return new uHe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new uHe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(uHe, e, t); + } + }; + tks = class dHe extends N { + constructor(e) { + super(); + this.conversation = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetChatTitleRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 2, + name: "conversation", + kind: "message", + T: Al, + repeated: true + }]); + } + static fromBinary(e, t) { + return new dHe().fromBinary(e, t); + } + static fromJson(e, t) { + return new dHe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new dHe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(dHe, e, t); + } + }; + iks = class hHe extends N { + constructor(e) { + super(); + this.title = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetChatTitleResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "title", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new hHe().fromBinary(e, t); + } + static fromJson(e, t) { + return new hHe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new hHe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(hHe, e, t); + } + }; + Atr = class fHe extends N { + constructor(e) { + super(); + this.prompt = ""; + this.tokenCount = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetChatPromptResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "prompt", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "token_count", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new fHe().fromBinary(e, t); + } + static fromJson(e, t) { + return new fHe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new fHe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(fHe, e, t); + } + }; + sks = class gHe extends N { + constructor(e) { + super(); + this.serverStartTime = 0; + this.serverFirstTokenTime = 0; + this.serverRequestSentTime = 0; + this.serverEndTime = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ServerTimingInfo"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "server_start_time", + kind: "scalar", + T: 1 + }, { + no: 2, + name: "server_first_token_time", + kind: "scalar", + T: 1 + }, { + no: 3, + name: "server_request_sent_time", + kind: "scalar", + T: 1 + }, { + no: 4, + name: "server_end_time", + kind: "scalar", + T: 1 + }]); + } + static fromBinary(e, t) { + return new gHe().fromBinary(e, t); + } + static fromJson(e, t) { + return new gHe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new gHe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(gHe, e, t); + } + }; + sD = class pHe extends N { + constructor(e) { + super(); + this.text = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamChatResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "text", + kind: "scalar", + T: 9 + }, { + no: 22, + name: "server_bubble_id", + kind: "scalar", + T: 9, + opt: true + }, { + no: 2, + name: "debugging_only_chat_prompt", + kind: "scalar", + T: 9, + opt: true + }, { + no: 3, + name: "debugging_only_token_count", + kind: "scalar", + T: 5, + opt: true + }, { + no: 4, + name: "document_citation", + kind: "message", + T: idt + }, { + no: 5, + name: "filled_prompt", + kind: "scalar", + T: 9, + opt: true + }, { + no: 6, + name: "is_big_file", + kind: "scalar", + T: 8, + opt: true + }, { + no: 7, + name: "intermediate_text", + kind: "scalar", + T: 9, + opt: true + }, { + no: 10, + name: "is_using_slow_request", + kind: "scalar", + T: 8, + opt: true + }, { + no: 8, + name: "chunk_identity", + kind: "message", + T: rks, + opt: true + }, { + no: 9, + name: "docs_reference", + kind: "message", + T: rve, + opt: true + }, { + no: 11, + name: "web_citation", + kind: "message", + T: zqt, + opt: true + }, { + no: 12, + name: "status_updates", + kind: "message", + T: Gqt, + opt: true + }, { + no: 13, + name: "timing_info", + kind: "message", + T: sks, + opt: true + }, { + no: 14, + name: "symbol_link", + kind: "message", + T: ove, + opt: true + }, { + no: 15, + name: "file_link", + kind: "message", + T: ndt, + opt: true + }, { + no: 16, + name: "conversation_summary", + kind: "message", + T: eA, + opt: true + }, { + no: 17, + name: "service_status_update", + kind: "message", + T: Qqt, + opt: true + }, { + no: 18, + name: "used_code", + kind: "message", + T: nks, + opt: true + }, { + no: 26, + name: "stop_using_dsv3_agentic_model", + kind: "scalar", + T: 8, + opt: true + }, { + no: 27, + name: "usage_uuid", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new pHe().fromBinary(e, t); + } + static fromJson(e, t) { + return new pHe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new pHe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(pHe, e, t); + } + }; + nks = class mHe extends N { + constructor(e) { + super(); + this.codeResults = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamChatResponse.UsedCode"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "code_results", + kind: "message", + T: xb, + repeated: true + }]); + } + static fromBinary(e, t) { + return new mHe().fromBinary(e, t); + } + static fromJson(e, t) { + return new mHe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new mHe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(mHe, e, t); + } + }; + rks = class bHe extends N { + constructor(e) { + super(); + this.fileName = ""; + this.startLine = 0; + this.endLine = 0; + this.text = ""; + this.chunkType = QT.UNSPECIFIED; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamChatResponse.ChunkIdentity"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "file_name", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "start_line", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "end_line", + kind: "scalar", + T: 5 + }, { + no: 4, + name: "text", + kind: "scalar", + T: 9 + }, { + no: 5, + name: "chunk_type", + kind: "enum", + T: m.getEnumType(QT) + }]); + } + static fromBinary(e, t) { + return new bHe().fromBinary(e, t); + } + static fromJson(e, t) { + return new bHe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new bHe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(bHe, e, t); + } + }; + oks = class vHe extends N { + constructor(e) { + super(); + this.didWarmCache = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.WarmComposerCacheResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "did_warm_cache", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new vHe().fromBinary(e, t); + } + static fromJson(e, t) { + return new vHe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new vHe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(vHe, e, t); + } + }; + aks = class yHe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.WarmChatCacheRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "request", + kind: "message", + T: l5 + }]); + } + static fromBinary(e, t) { + return new yHe().fromBinary(e, t); + } + static fromJson(e, t) { + return new yHe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new yHe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(yHe, e, t); + } + }; + lks = class wHe extends N { + constructor(e) { + super(); + this.didWarmCache = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.WarmChatCacheResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "did_warm_cache", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new wHe().fromBinary(e, t); + } + static fromJson(e, t) { + return new wHe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new wHe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(wHe, e, t); + } + }; + cks = class CHe extends N { + constructor(e) { + super(); + this.startLine = 0; + this.lines = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SurroundingLines"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "start_line", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "lines", + kind: "scalar", + T: 9, + repeated: true + }]); + } + static fromBinary(e, t) { + return new CHe().fromBinary(e, t); + } + static fromJson(e, t) { + return new CHe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new CHe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(CHe, e, t); + } + }; + uks = class SHe extends N { + constructor(e) { + super(); + this.suggestionsFromEditor = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetCompletionRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "file_identifier", + kind: "message", + T: pks + }, { + no: 2, + name: "cursor_position", + kind: "message", + T: sv + }, { + no: 3, + name: "surrounding_lines", + kind: "message", + T: cks + }, { + no: 4, + name: "explicit_context", + kind: "message", + T: Qg + }, { + no: 5, + name: "suggestions_from_editor", + kind: "scalar", + T: 9, + repeated: true + }]); + } + static fromBinary(e, t) { + return new SHe().fromBinary(e, t); + } + static fromJson(e, t) { + return new SHe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new SHe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(SHe, e, t); + } + }; + dks = class xHe extends N { + constructor(e) { + super(); + this.completion = ""; + this.score = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetCompletionResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "completion", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "score", + kind: "scalar", + T: 2 + }, { + no: 3, + name: "debugging_only_completion_prompt", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new xHe().fromBinary(e, t); + } + static fromJson(e, t) { + return new xHe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new xHe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(xHe, e, t); + } + }; + hks = class kHe extends N { + constructor(e) { + super(); + this.query = ""; + this.repositories = []; + this.topK = 0; + this.restrictToBuckets = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetSearchRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "query", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "repositories", + kind: "message", + T: pc, + repeated: true + }, { + no: 3, + name: "top_k", + kind: "scalar", + T: 5 + }, { + no: 4, + name: "restrict_to_buckets", + kind: "scalar", + T: 9, + repeated: true + }]); + } + static fromBinary(e, t) { + return new kHe().fromBinary(e, t); + } + static fromJson(e, t) { + return new kHe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new kHe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(kHe, e, t); + } + }; + fks = class EHe extends N { + constructor(e) { + super(); + this.repositoryRelativeWorkspacePath = ""; + this.fileRelativeRepositoryPath = ""; + this.chunk = ""; + this.distance = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.FileSearchResult"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "repository_relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "file_relative_repository_path", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "chunk", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "distance", + kind: "scalar", + T: 2 + }]); + } + static fromBinary(e, t) { + return new EHe().fromBinary(e, t); + } + static fromJson(e, t) { + return new EHe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new EHe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(EHe, e, t); + } + }; + gks = class IHe extends N { + constructor(e) { + super(); + this.results = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetSearchResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "results", + kind: "message", + T: fks, + repeated: true + }]); + } + static fromBinary(e, t) { + return new IHe().fromBinary(e, t); + } + static fromJson(e, t) { + return new IHe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new IHe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(IHe, e, t); + } + }; + pks = class DHe extends N { + constructor(e) { + super(); + this.projectUuid = ""; + this.relativePath = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.UniqueFileIdentifier"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "project_uuid", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "relative_path", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "language_id", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new DHe().fromBinary(e, t); + } + static fromJson(e, t) { + return new DHe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new DHe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(DHe, e, t); + } + }; + mks = class THe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetUserInfoRequest"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new THe().fromBinary(e, t); + } + static fromJson(e, t) { + return new THe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new THe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(THe, e, t); + } + }; + bks = class PHe extends N { + constructor(e) { + super(); + this.gpt4Requests = 0; + this.gpt4MaxRequests = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.UsageData"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 2, + name: "gpt4_requests", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "gpt4_max_requests", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new PHe().fromBinary(e, t); + } + static fromJson(e, t) { + return new PHe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new PHe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(PHe, e, t); + } + }; + vks = class LHe extends N { + constructor(e) { + super(); + this.userId = ""; + this.jupyterToken = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetUserInfoResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "user_id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "jupyter_token", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "usage", + kind: "message", + T: bks + }]); + } + static fromBinary(e, t) { + return new LHe().fromBinary(e, t); + } + static fromJson(e, t) { + return new LHe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new LHe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(LHe, e, t); + } + }; + yks = class RHe extends N { + constructor(e) { + super(); + this.bucketId = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ClearAndRedoEntireBucketRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "bucket_id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "commit", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new RHe().fromBinary(e, t); + } + static fromJson(e, t) { + return new RHe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new RHe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(RHe, e, t); + } + }; + wks = class NHe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ClearAndRedoEntireBucketResponse"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new NHe().fromBinary(e, t); + } + static fromJson(e, t) { + return new NHe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new NHe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(NHe, e, t); + } + }; + Cks = class MHe extends N { + constructor(e) { + super(); + this.generationUuid = ""; + this.completion = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.DoThisForMeCheckRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "generation_uuid", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "completion", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new MHe().fromBinary(e, t); + } + static fromJson(e, t) { + return new MHe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new MHe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(MHe, e, t); + } + }; + wzt = class AHe extends N { + constructor(e) { + super(); + this.action = { + case: undefined + }; + this.reasoning = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.DoThisForMeCheckResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "skip_action", + kind: "message", + T: Sks, + oneof: "action" + }, { + no: 2, + name: "edit_action", + kind: "message", + T: xks, + oneof: "action" + }, { + no: 3, + name: "create_action", + kind: "message", + T: kks, + oneof: "action" + }, { + no: 4, + name: "run_action", + kind: "message", + T: Eks, + oneof: "action" + }, { + no: 5, + name: "reasoning", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new AHe().fromBinary(e, t); + } + static fromJson(e, t) { + return new AHe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new AHe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(AHe, e, t); + } + }; + Sks = class $He extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.DoThisForMeCheckResponse.SkipAction"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new $He().fromBinary(e, t); + } + static fromJson(e, t) { + return new $He().fromJson(e, t); + } + static fromJsonString(e, t) { + return new $He().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals($He, e, t); + } + }; + xks = class FHe extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.DoThisForMeCheckResponse.EditAction"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new FHe().fromBinary(e, t); + } + static fromJson(e, t) { + return new FHe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new FHe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(FHe, e, t); + } + }; + kks = class OHe extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.DoThisForMeCheckResponse.CreateAction"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new OHe().fromBinary(e, t); + } + static fromJson(e, t) { + return new OHe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new OHe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(OHe, e, t); + } + }; + Eks = class _He extends N { + constructor(e) { + super(); + this.command = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.DoThisForMeCheckResponse.RunAction"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "command", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new _He().fromBinary(e, t); + } + static fromJson(e, t) { + return new _He().fromJson(e, t); + } + static fromJsonString(e, t) { + return new _He().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(_He, e, t); + } + }; + Iks = class BHe extends N { + constructor(e) { + super(); + this.generationUuid = ""; + this.completion = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.DoThisForMeRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "generation_uuid", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "completion", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "action", + kind: "message", + T: wzt + }]); + } + static fromBinary(e, t) { + return new BHe().fromBinary(e, t); + } + static fromJson(e, t) { + return new BHe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new BHe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(BHe, e, t); + } + }; + Dks = class UHe extends N { + constructor(e) { + super(); + this.event = { + case: undefined + }; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.DoThisForMeResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "update_status", + kind: "message", + T: Tks, + oneof: "event" + }]); + } + static fromBinary(e, t) { + return new UHe().fromBinary(e, t); + } + static fromJson(e, t) { + return new UHe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new UHe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(UHe, e, t); + } + }; + Tks = class WHe extends N { + constructor(e) { + super(); + this.status = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.DoThisForMeResponse.UpdateStatus"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "status", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new WHe().fromBinary(e, t); + } + static fromJson(e, t) { + return new WHe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new WHe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(WHe, e, t); + } + }; + Pks = class VHe extends N { + constructor(e) { + super(); + this.response = { + case: undefined + }; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.DoThisForMeResponseWrapped"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "real_response", + kind: "message", + T: Dks, + oneof: "response" + }, { + no: 2, + name: "background_task_uuid", + kind: "scalar", + T: 9, + oneof: "response" + }]); + } + static fromBinary(e, t) { + return new VHe().fromBinary(e, t); + } + static fromJson(e, t) { + return new VHe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new VHe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(VHe, e, t); + } + }; + Lks = class HHe extends N { + constructor(e) { + super(); + this.toolformerSessionId = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamChatToolformerContinueRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "toolformer_session_id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "tool_result", + kind: "message", + T: Hut + }]); + } + static fromBinary(e, t) { + return new HHe().fromBinary(e, t); + } + static fromJson(e, t) { + return new HHe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new HHe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(HHe, e, t); + } + }; + Czt = class qHe extends N { + constructor(e) { + super(); + this.responseType = { + case: undefined + }; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamChatToolformerResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "toolformer_session_id", + kind: "scalar", + T: 9, + opt: true + }, { + no: 2, + name: "output", + kind: "message", + T: Rks, + oneof: "response_type" + }, { + no: 3, + name: "tool_action", + kind: "message", + T: Mks, + oneof: "response_type" + }, { + no: 4, + name: "thought", + kind: "message", + T: Nks, + oneof: "response_type" + }]); + } + static fromBinary(e, t) { + return new qHe().fromBinary(e, t); + } + static fromJson(e, t) { + return new qHe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new qHe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(qHe, e, t); + } + }; + Rks = class jHe extends N { + constructor(e) { + super(); + this.text = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamChatToolformerResponse.Output"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "text", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new jHe().fromBinary(e, t); + } + static fromJson(e, t) { + return new jHe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new jHe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(jHe, e, t); + } + }; + Nks = class zHe extends N { + constructor(e) { + super(); + this.text = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamChatToolformerResponse.Thought"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "text", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new zHe().fromBinary(e, t); + } + static fromJson(e, t) { + return new zHe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new zHe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(zHe, e, t); + } + }; + Mks = class JHe extends N { + constructor(e) { + super(); + this.userFacingText = ""; + this.rawModelOutput = ""; + this.moreToCome = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamChatToolformerResponse.ToolAction"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "user_facing_text", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "raw_model_output", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "tool_call", + kind: "message", + T: pqt + }, { + no: 4, + name: "more_to_come", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new JHe().fromBinary(e, t); + } + static fromJson(e, t) { + return new JHe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new JHe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(JHe, e, t); + } + }; + Szt = class GHe extends N { + constructor(e) { + super(); + this.text = ""; + this.attachedCodeChunks = []; + this.repositories = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.TaskInstruction"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "text", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "attached_code_chunks", + kind: "message", + T: Aks, + repeated: true + }, { + no: 3, + name: "current_file", + kind: "message", + T: tu + }, { + no: 4, + name: "repositories", + kind: "message", + T: pc, + repeated: true + }, { + no: 5, + name: "explicit_context", + kind: "message", + T: Qg + }]); + } + static fromBinary(e, t) { + return new GHe().fromBinary(e, t); + } + static fromJson(e, t) { + return new GHe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new GHe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(GHe, e, t); + } + }; + Aks = class KHe extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.startLineNumber = 0; + this.lines = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.TaskInstruction.CodeChunk"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "start_line_number", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "lines", + kind: "scalar", + T: 9, + repeated: true + }]); + } + static fromBinary(e, t) { + return new KHe().fromBinary(e, t); + } + static fromJson(e, t) { + return new KHe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new KHe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(KHe, e, t); + } + }; + xzt = class YHe extends N { + constructor(e) { + super(); + this.text = ""; + this.attachedCodeChunks = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.TaskUserMessage"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "text", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "attached_code_chunks", + kind: "message", + T: $ks, + repeated: true + }]); + } + static fromBinary(e, t) { + return new YHe().fromBinary(e, t); + } + static fromJson(e, t) { + return new YHe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new YHe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(YHe, e, t); + } + }; + $ks = class XHe extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.startLineNumber = 0; + this.lines = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.TaskUserMessage.CodeChunk"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "start_line_number", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "lines", + kind: "scalar", + T: 9, + repeated: true + }]); + } + static fromBinary(e, t) { + return new XHe().fromBinary(e, t); + } + static fromJson(e, t) { + return new XHe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new XHe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(XHe, e, t); + } + }; + Fks = class QHe extends N { + constructor(e) { + super(); + this.thought = ""; + this.automated = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.PushAiThoughtRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "thought", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "cmd_k_debug_info", + kind: "message", + T: KT + }, { + no: 3, + name: "automated", + kind: "scalar", + T: 8 + }, { + no: 4, + name: "metadata", + kind: "message", + T: Oks, + opt: true + }]); + } + static fromBinary(e, t) { + return new QHe().fromBinary(e, t); + } + static fromJson(e, t) { + return new QHe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new QHe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(QHe, e, t); + } + }; + Oks = class ZHe extends N { + constructor(e) { + super(); + this.event = { + case: undefined + }; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.PushAiThoughtRequest.Metadata"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "accepted_hallucinated_function_event", + kind: "message", + T: _ks, + oneof: "event" + }]); + } + static fromBinary(e, t) { + return new ZHe().fromBinary(e, t); + } + static fromJson(e, t) { + return new ZHe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new ZHe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(ZHe, e, t); + } + }; + _ks = class eqe extends N { + constructor(e) { + super(); + this.implementationUuid = ""; + this.hallucinatedFunctionUuid = ""; + this.implementation = ""; + this.source = ""; + this.implementationReqid = ""; + this.planReqid = ""; + this.reflectionReqid = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.PushAiThoughtRequest.Metadata.AcceptedHallucinatedFunctionEvent"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "implementation_uuid", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "hallucinated_function_uuid", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "implementation", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "source", + kind: "scalar", + T: 9 + }, { + no: 5, + name: "implementation_reqid", + kind: "scalar", + T: 9 + }, { + no: 6, + name: "plan_reqid", + kind: "scalar", + T: 9 + }, { + no: 7, + name: "reflection_reqid", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new eqe().fromBinary(e, t); + } + static fromJson(e, t) { + return new eqe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new eqe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(eqe, e, t); + } + }; + Bks = class tqe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.PushAiThoughtResponse"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new tqe().fromBinary(e, t); + } + static fromJson(e, t) { + return new tqe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new tqe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(tqe, e, t); + } + }; + Uks = class iqe extends N { + constructor(e) { + super(); + this.modelOutput = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CheckDoableAsTaskRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "model_output", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "model_details", + kind: "message", + T: Qa + }]); + } + static fromBinary(e, t) { + return new iqe().fromBinary(e, t); + } + static fromJson(e, t) { + return new iqe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new iqe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(iqe, e, t); + } + }; + Wks = class sqe extends N { + constructor(e) { + super(); + this.doableAsTask = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CheckDoableAsTaskResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "doable_as_task", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new sqe().fromBinary(e, t); + } + static fromJson(e, t) { + return new sqe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new sqe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(sqe, e, t); + } + }; + Vks = class nqe extends N { + constructor(e) { + super(); + this.debuggingOnlyLiveMode = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.InterfaceAgentInitRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "model_details", + kind: "message", + T: Qa + }, { + no: 2, + name: "debugging_only_live_mode", + kind: "scalar", + T: 8 + }, { + no: 3, + name: "interface_agent_client_state", + kind: "message", + T: _jt + }]); + } + static fromBinary(e, t) { + return new nqe().fromBinary(e, t); + } + static fromJson(e, t) { + return new nqe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new nqe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(nqe, e, t); + } + }; + Hks = class rqe extends N { + constructor(e) { + super(); + this.taskUuid = ""; + this.humanReadableTitle = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.InterfaceAgentInitResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "task_uuid", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "human_readable_title", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new rqe().fromBinary(e, t); + } + static fromJson(e, t) { + return new rqe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new rqe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(rqe, e, t); + } + }; + qks = class oqe extends N { + constructor(e) { + super(); + this.taskUuid = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamInterfaceAgentStatusRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "task_uuid", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new oqe().fromBinary(e, t); + } + static fromJson(e, t) { + return new oqe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new oqe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(oqe, e, t); + } + }; + jks = class aqe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamInterfaceAgentStatusResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "status", + kind: "message", + T: Bjt + }]); + } + static fromBinary(e, t) { + return new aqe().fromBinary(e, t); + } + static fromJson(e, t) { + return new aqe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new aqe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(aqe, e, t); + } + }; + zks = class lqe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.TaskGetInterfaceAgentStatusRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "interface_agent_client_state", + kind: "message", + T: _jt + }]); + } + static fromBinary(e, t) { + return new lqe().fromBinary(e, t); + } + static fromJson(e, t) { + return new lqe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new lqe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(lqe, e, t); + } + }; + Jks = class cqe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.TaskGetInterfaceAgentStatusResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "status", + kind: "message", + T: Bjt + }]); + } + static fromBinary(e, t) { + return new cqe().fromBinary(e, t); + } + static fromJson(e, t) { + return new cqe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new cqe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(cqe, e, t); + } + }; + Gks = class uqe extends N { + constructor(e) { + super(); + this.response = { + case: undefined + }; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.TaskGetInterfaceAgentStatusResponseWrapped"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "real_response", + kind: "message", + T: Jks, + oneof: "response" + }, { + no: 2, + name: "background_task_uuid", + kind: "scalar", + T: 9, + oneof: "response" + }]); + } + static fromBinary(e, t) { + return new uqe().fromBinary(e, t); + } + static fromJson(e, t) { + return new uqe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new uqe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(uqe, e, t); + } + }; + Kks = class dqe extends N { + constructor(e) { + super(); + this.debuggingOnlyLiveMode = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.TaskInitRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "instruction", + kind: "message", + T: Szt + }, { + no: 2, + name: "model_details", + kind: "message", + T: Qa + }, { + no: 3, + name: "debugging_only_live_mode", + kind: "scalar", + T: 8 + }, { + no: 4, + name: "engine_id", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new dqe().fromBinary(e, t); + } + static fromJson(e, t) { + return new dqe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new dqe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(dqe, e, t); + } + }; + Yks = class hqe extends N { + constructor(e) { + super(); + this.taskUuid = ""; + this.humanReadableTitle = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.TaskInitResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "task_uuid", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "human_readable_title", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new hqe().fromBinary(e, t); + } + static fromJson(e, t) { + return new hqe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new hqe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(hqe, e, t); + } + }; + Xks = class fqe extends N { + constructor(e) { + super(); + this.taskUuid = ""; + this.startSequenceNumber = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.TaskStreamLogRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "task_uuid", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "start_sequence_number", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new fqe().fromBinary(e, t); + } + static fromJson(e, t) { + return new fqe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new fqe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(fqe, e, t); + } + }; + Qks = class gqe extends N { + constructor(e) { + super(); + this.text = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.TaskLogOutput"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "text", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new gqe().fromBinary(e, t); + } + static fromJson(e, t) { + return new gqe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new gqe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(gqe, e, t); + } + }; + Zks = class pqe extends N { + constructor(e) { + super(); + this.userFacingText = ""; + this.rawModelOutput = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.TaskLogToolAction"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "user_facing_text", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "raw_model_output", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "tool_call", + kind: "message", + T: pqt + }]); + } + static fromBinary(e, t) { + return new pqe().fromBinary(e, t); + } + static fromJson(e, t) { + return new pqe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new pqe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(pqe, e, t); + } + }; + eEs = class mqe extends N { + constructor(e) { + super(); + this.text = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.TaskLogThought"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "text", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new mqe().fromBinary(e, t); + } + static fromJson(e, t) { + return new mqe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new mqe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(mqe, e, t); + } + }; + tEs = class bqe extends N { + constructor(e) { + super(); + this.actionSequenceNumber = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.TaskLogToolResult"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "tool_result", + kind: "message", + T: Hut + }, { + no: 2, + name: "action_sequence_number", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new bqe().fromBinary(e, t); + } + static fromJson(e, t) { + return new bqe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new bqe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(bqe, e, t); + } + }; + iEs = class vqe extends N { + constructor(e) { + super(); + this.sequenceNumber = 0; + this.isNotDone = false; + this.logItem = { + case: undefined + }; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.TaskLogItem"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "sequence_number", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "is_not_done", + kind: "scalar", + T: 8 + }, { + no: 3, + name: "output", + kind: "message", + T: Qks, + oneof: "log_item" + }, { + no: 4, + name: "tool_action", + kind: "message", + T: Zks, + oneof: "log_item" + }, { + no: 5, + name: "thought", + kind: "message", + T: eEs, + oneof: "log_item" + }, { + no: 6, + name: "user_message", + kind: "message", + T: xzt, + oneof: "log_item" + }, { + no: 7, + name: "instruction", + kind: "message", + T: Szt, + oneof: "log_item" + }, { + no: 8, + name: "tool_result", + kind: "message", + T: tEs, + oneof: "log_item" + }]); + } + static fromBinary(e, t) { + return new vqe().fromBinary(e, t); + } + static fromJson(e, t) { + return new vqe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new vqe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(vqe, e, t); + } + }; + sEs = class yqe extends N { + constructor(e) { + super(); + this.taskUuid = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.TaskInfoRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "task_uuid", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new yqe().fromBinary(e, t); + } + static fromJson(e, t) { + return new yqe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new yqe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(yqe, e, t); + } + }; + nEs = class wqe extends N { + constructor(e) { + super(); + this.taskUuid = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.TaskPauseRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "task_uuid", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new wqe().fromBinary(e, t); + } + static fromJson(e, t) { + return new wqe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new wqe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(wqe, e, t); + } + }; + rEs = class Cqe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.TaskPauseResponse"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new Cqe().fromBinary(e, t); + } + static fromJson(e, t) { + return new Cqe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Cqe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Cqe, e, t); + } + }; + kzt = class Sqe extends N { + constructor(e) { + super(); + this.humanReadableTitle = ""; + this.taskStatus = Zie.UNSPECIFIED; + this.lastLogSequenceNumber = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.TaskInfoResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "human_readable_title", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "task_status", + kind: "enum", + T: m.getEnumType(Zie) + }, { + no: 3, + name: "last_log_sequence_number", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new Sqe().fromBinary(e, t); + } + static fromJson(e, t) { + return new Sqe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Sqe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Sqe, e, t); + } + }; + oEs = class xqe extends N { + constructor(e) { + super(); + this.response = { + case: undefined + }; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.TaskStreamLogResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "streamed_log_item", + kind: "message", + T: iEs, + oneof: "response" + }, { + no: 2, + name: "info_update", + kind: "message", + T: aEs, + oneof: "response" + }, { + no: 3, + name: "initial_task_info", + kind: "message", + T: kzt, + oneof: "response" + }]); + } + static fromBinary(e, t) { + return new xqe().fromBinary(e, t); + } + static fromJson(e, t) { + return new xqe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new xqe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(xqe, e, t); + } + }; + aEs = class kqe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.TaskStreamLogResponse.InfoUpdate"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "human_readable_title", + kind: "scalar", + T: 9, + opt: true + }, { + no: 2, + name: "task_status", + kind: "enum", + T: m.getEnumType(Zie), + opt: true + }]); + } + static fromBinary(e, t) { + return new kqe().fromBinary(e, t); + } + static fromJson(e, t) { + return new kqe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new kqe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(kqe, e, t); + } + }; + lEs = class Eqe extends N { + constructor(e) { + super(); + this.taskUuid = ""; + this.actionSequenceNumber = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.TaskProvideResultRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "task_uuid", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "action_sequence_number", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "tool_result", + kind: "message", + T: Hut + }]); + } + static fromBinary(e, t) { + return new Eqe().fromBinary(e, t); + } + static fromJson(e, t) { + return new Eqe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Eqe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Eqe, e, t); + } + }; + cEs = class Iqe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.TaskProvideResultResponse"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new Iqe().fromBinary(e, t); + } + static fromJson(e, t) { + return new Iqe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Iqe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Iqe, e, t); + } + }; + uEs = class Dqe extends N { + constructor(e) { + super(); + this.taskUuid = ""; + this.wantsAttentionRightNow = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.TaskSendMessageRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "task_uuid", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "user_message", + kind: "message", + T: xzt + }, { + no: 3, + name: "wants_attention_right_now", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new Dqe().fromBinary(e, t); + } + static fromJson(e, t) { + return new Dqe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Dqe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Dqe, e, t); + } + }; + dEs = class Tqe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.TaskSendMessageResponse"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new Tqe().fromBinary(e, t); + } + static fromJson(e, t) { + return new Tqe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Tqe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Tqe, e, t); + } + }; + hEs = class Pqe extends N { + constructor(e) { + super(); + this.feedback = ""; + this.feedbackType = _ve.UNSPECIFIED; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ReportFeedbackRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "feedback", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "feedback_type", + kind: "enum", + T: m.getEnumType(_ve) + }]); + } + static fromBinary(e, t) { + return new Pqe().fromBinary(e, t); + } + static fromJson(e, t) { + return new Pqe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Pqe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Pqe, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.LOW_PRIORITY = 1] = "LOW_PRIORITY"; + i[i.HIGH_PRIORITY = 2] = "HIGH_PRIORITY"; + })(_ve ||= {}); + m.util.setEnumType(_ve, "aiserver.v1.ReportFeedbackRequest.FeedbackType", [{ + no: 0, + name: "FEEDBACK_TYPE_UNSPECIFIED" + }, { + no: 1, + name: "FEEDBACK_TYPE_LOW_PRIORITY" + }, { + no: 2, + name: "FEEDBACK_TYPE_HIGH_PRIORITY" + }]); + fEs = class Lqe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ReportFeedbackResponse"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new Lqe().fromBinary(e, t); + } + static fromJson(e, t) { + return new Lqe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Lqe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Lqe, e, t); + } + }; + gEs = class Rqe extends N { + constructor(e) { + super(); + this.relativePathToCursorFolder = ""; + this.contents = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.LogFile"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_path_to_cursor_folder", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "contents", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new Rqe().fromBinary(e, t); + } + static fromJson(e, t) { + return new Rqe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Rqe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Rqe, e, t); + } + }; + pEs = class Nqe extends N { + constructor(e) { + super(); + this.screenshots = []; + this.conversation = []; + this.logs = []; + this.consoleLogs = ""; + this.cursorVersion = ""; + this.os = ""; + this.protoUrl = ""; + this.failingRequstId = ""; + this.connectionErrorRaw = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.BugContext"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "screenshots", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 2, + name: "current_file", + kind: "message", + T: tu + }, { + no: 3, + name: "conversation", + kind: "message", + T: Al, + repeated: true + }, { + no: 4, + name: "logs", + kind: "message", + T: gEs, + repeated: true + }, { + no: 5, + name: "console_logs", + kind: "scalar", + T: 9 + }, { + no: 6, + name: "cursor_version", + kind: "scalar", + T: 9 + }, { + no: 7, + name: "os", + kind: "scalar", + T: 9 + }, { + no: 8, + name: "proto_url", + kind: "scalar", + T: 9 + }, { + no: 9, + name: "failing_requst_id", + kind: "scalar", + T: 9 + }, { + no: 10, + name: "connection_error_raw", + kind: "scalar", + T: 9 + }, { + no: 12, + name: "debug_info", + kind: "message", + T: KT + }, { + no: 13, + name: "connect_error_code", + kind: "scalar", + T: 5, + opt: true + }, { + no: 14, + name: "error_detail_code", + kind: "enum", + T: m.getEnumType(yo), + opt: true + }, { + no: 15, + name: "error_detail_title", + kind: "scalar", + T: 9, + opt: true + }, { + no: 16, + name: "error_detail_detail", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new Nqe().fromBinary(e, t); + } + static fromJson(e, t) { + return new Nqe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Nqe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Nqe, e, t); + } + }; + mEs = class Mqe extends N { + constructor(e) { + super(); + this.bug = ""; + this.bugType = tg.UNSPECIFIED; + this.contactEmail = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ReportBugRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "bug", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "bug_type", + kind: "enum", + T: m.getEnumType(tg) + }, { + no: 3, + name: "context", + kind: "message", + T: pEs + }, { + no: 4, + name: "contact_email", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new Mqe().fromBinary(e, t); + } + static fromJson(e, t) { + return new Mqe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Mqe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Mqe, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.LOW = 1] = "LOW"; + i[i.MEDIUM = 2] = "MEDIUM"; + i[i.URGENT = 3] = "URGENT"; + i[i.CRASH = 4] = "CRASH"; + i[i.CONNECTION_ERROR = 5] = "CONNECTION_ERROR"; + i[i.IDEA = 6] = "IDEA"; + i[i.MISC_AUTOMATIC_ERROR = 7] = "MISC_AUTOMATIC_ERROR"; + })(tg ||= {}); + m.util.setEnumType(tg, "aiserver.v1.ReportBugRequest.BugType", [{ + no: 0, + name: "BUG_TYPE_UNSPECIFIED" + }, { + no: 1, + name: "BUG_TYPE_LOW" + }, { + no: 2, + name: "BUG_TYPE_MEDIUM" + }, { + no: 3, + name: "BUG_TYPE_URGENT" + }, { + no: 4, + name: "BUG_TYPE_CRASH" + }, { + no: 5, + name: "BUG_TYPE_CONNECTION_ERROR" + }, { + no: 6, + name: "BUG_TYPE_IDEA" + }, { + no: 7, + name: "BUG_TYPE_MISC_AUTOMATIC_ERROR" + }]); + bEs = class Aqe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ReportBugResponse"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new Aqe().fromBinary(e, t); + } + static fromJson(e, t) { + return new Aqe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Aqe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Aqe, e, t); + } + }; + vEs = class $qe extends N { + constructor(e) { + super(); + this.markers = []; + this.iterationNumber = 0; + this.sequenceId = ""; + this.userInstruction = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.FixMarkersRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "markers", + kind: "message", + T: yEs, + repeated: true + }, { + no: 2, + name: "model_details", + kind: "message", + T: Qa + }, { + no: 3, + name: "iteration_number", + kind: "scalar", + T: 5 + }, { + no: 4, + name: "sequence_id", + kind: "scalar", + T: 9 + }, { + no: 5, + name: "user_instruction", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new $qe().fromBinary(e, t); + } + static fromJson(e, t) { + return new $qe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new $qe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals($qe, e, t); + } + }; + yEs = class Fqe extends N { + constructor(e) { + super(); + this.lines = []; + this.startLine = 0; + this.endLineInclusive = 0; + this.message = ""; + this.relativeWorkspacePath = ""; + this.relatedInformation = []; + this.contextRanges = []; + this.ancestorTypeDefinitions = []; + this.insertedSymbolTypes = []; + this.quickFixes = []; + this.startColumn = 0; + this.endColumnInclusive = 0; + this.classInformation = []; + this.functionSignatures = []; + this.snapshot = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.FixMarkersRequest.Marker"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "lines", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 2, + name: "start_line", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "end_line_inclusive", + kind: "scalar", + T: 5 + }, { + no: 4, + name: "message", + kind: "scalar", + T: 9 + }, { + no: 5, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 6, + name: "related_information", + kind: "message", + T: wEs, + repeated: true + }, { + no: 7, + name: "context_ranges", + kind: "message", + T: CEs, + repeated: true + }, { + no: 8, + name: "ancestor_type_definitions", + kind: "message", + T: SEs, + repeated: true + }, { + no: 9, + name: "inserted_symbol_types", + kind: "message", + T: xEs, + repeated: true + }, { + no: 10, + name: "quick_fixes", + kind: "message", + T: kEs, + repeated: true + }, { + no: 11, + name: "start_column", + kind: "scalar", + T: 5 + }, { + no: 12, + name: "end_column_inclusive", + kind: "scalar", + T: 5 + }, { + no: 13, + name: "class_information", + kind: "message", + T: IEs, + repeated: true + }, { + no: 14, + name: "function_signatures", + kind: "message", + T: TEs, + repeated: true + }, { + no: 15, + name: "snapshot", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new Fqe().fromBinary(e, t); + } + static fromJson(e, t) { + return new Fqe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Fqe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Fqe, e, t); + } + }; + wEs = class Oqe extends N { + constructor(e) { + super(); + this.message = ""; + this.relativeWorkspacePath = ""; + this.relevantLines = []; + this.startLine = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.FixMarkersRequest.Marker.RelatedInformation"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "message", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "relevant_lines", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 4, + name: "start_line", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new Oqe().fromBinary(e, t); + } + static fromJson(e, t) { + return new Oqe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Oqe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Oqe, e, t); + } + }; + CEs = class _qe extends N { + constructor(e) { + super(); + this.startLine = 0; + this.endLineInclusive = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.FixMarkersRequest.Marker.ContextRange"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "start_line", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "end_line_inclusive", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new _qe().fromBinary(e, t); + } + static fromJson(e, t) { + return new _qe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new _qe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(_qe, e, t); + } + }; + SEs = class Bqe extends N { + constructor(e) { + super(); + this.name = ""; + this.relativeWorkspacePath = ""; + this.startLine = 0; + this.lines = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.FixMarkersRequest.Marker.AncestorTypeDefinition"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "name", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "start_line", + kind: "scalar", + T: 5 + }, { + no: 4, + name: "lines", + kind: "scalar", + T: 9, + repeated: true + }]); + } + static fromBinary(e, t) { + return new Bqe().fromBinary(e, t); + } + static fromJson(e, t) { + return new Bqe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Bqe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Bqe, e, t); + } + }; + xEs = class Uqe extends N { + constructor(e) { + super(); + this.symbolName = ""; + this.symbolType = ""; + this.relativeWorkspacePath = ""; + this.symbolLine = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.FixMarkersRequest.Marker.InsertedSymbolType"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "symbol_name", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "symbol_type", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "symbol_line", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new Uqe().fromBinary(e, t); + } + static fromJson(e, t) { + return new Uqe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Uqe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Uqe, e, t); + } + }; + kEs = class Wqe extends N { + constructor(e) { + super(); + this.message = ""; + this.kind = ""; + this.isPreferred = false; + this.edits = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.FixMarkersRequest.Marker.QuickFix"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "message", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "kind", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "is_preferred", + kind: "scalar", + T: 8 + }, { + no: 4, + name: "edits", + kind: "message", + T: EEs, + repeated: true + }]); + } + static fromBinary(e, t) { + return new Wqe().fromBinary(e, t); + } + static fromJson(e, t) { + return new Wqe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Wqe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Wqe, e, t); + } + }; + EEs = class Vqe extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.startLine = 0; + this.endLineInclusive = 0; + this.deletedLines = []; + this.addLines = []; + this.snapshot = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.FixMarkersRequest.Marker.QuickFix.Edit"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "start_line", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "end_line_inclusive", + kind: "scalar", + T: 5 + }, { + no: 4, + name: "deleted_lines", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 5, + name: "add_lines", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 6, + name: "snapshot", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new Vqe().fromBinary(e, t); + } + static fromJson(e, t) { + return new Vqe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Vqe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Vqe, e, t); + } + }; + IEs = class Hqe extends N { + constructor(e) { + super(); + this.className = ""; + this.startLine = 0; + this.topLevelLines = []; + this.lines = []; + this.constructors = []; + this.detail = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.FixMarkersRequest.Marker.ClassInformation"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "class_name", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "start_line", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "top_level_lines", + kind: "scalar", + T: 5, + repeated: true + }, { + no: 4, + name: "lines", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 5, + name: "constructors", + kind: "message", + T: DEs, + repeated: true + }, { + no: 6, + name: "detail", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new Hqe().fromBinary(e, t); + } + static fromJson(e, t) { + return new Hqe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Hqe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Hqe, e, t); + } + }; + DEs = class qqe extends N { + constructor(e) { + super(); + this.startLine = 0; + this.endLineInclusive = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.FixMarkersRequest.Marker.ClassInformation.Constructor"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "start_line", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "end_line_inclusive", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new qqe().fromBinary(e, t); + } + static fromJson(e, t) { + return new qqe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new qqe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(qqe, e, t); + } + }; + TEs = class jqe extends N { + constructor(e) { + super(); + this.label = ""; + this.documentation = ""; + this.parameters = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.FixMarkersRequest.Marker.FunctionSignature"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "label", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "documentation", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "parameters", + kind: "message", + T: PEs, + repeated: true + }]); + } + static fromBinary(e, t) { + return new jqe().fromBinary(e, t); + } + static fromJson(e, t) { + return new jqe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new jqe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(jqe, e, t); + } + }; + PEs = class zqe extends N { + constructor(e) { + super(); + this.label = ""; + this.documentation = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.FixMarkersRequest.Marker.FunctionSignature.FunctionParameter"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "label", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "documentation", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new zqe().fromBinary(e, t); + } + static fromJson(e, t) { + return new zqe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new zqe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(zqe, e, t); + } + }; + LEs = class Jqe extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.changes = []; + this.success = false; + this.iterationNumber = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.FixMarkersResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "changes", + kind: "message", + T: REs, + repeated: true + }, { + no: 3, + name: "success", + kind: "scalar", + T: 8 + }, { + no: 4, + name: "iteration_number", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new Jqe().fromBinary(e, t); + } + static fromJson(e, t) { + return new Jqe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Jqe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Jqe, e, t); + } + }; + REs = class Gqe extends N { + constructor(e) { + super(); + this.startLine = 0; + this.endLineExclusive = 0; + this.deletedLines = []; + this.addLines = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.FixMarkersResponse.Change"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "start_line", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "end_line_exclusive", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "deleted_lines", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 4, + name: "add_lines", + kind: "scalar", + T: 9, + repeated: true + }]); + } + static fromBinary(e, t) { + return new Gqe().fromBinary(e, t); + } + static fromJson(e, t) { + return new Gqe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Gqe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Gqe, e, t); + } + }; + Ezt = class Kqe extends N { + constructor(e) { + super(); + this.conversation = []; + this.repositories = []; + this.query = ""; + this.codeBlocks = []; + this.documentationIdentifiers = []; + this.badNotifications = []; + this.lintRules = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamLintRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "current_file", + kind: "message", + T: tu + }, { + no: 2, + name: "conversation", + kind: "message", + T: Al, + repeated: true + }, { + no: 3, + name: "repositories", + kind: "message", + T: pc, + repeated: true + }, { + no: 4, + name: "explicit_context", + kind: "message", + T: Qg + }, { + no: 5, + name: "workspace_root_path", + kind: "scalar", + T: 9, + opt: true + }, { + no: 6, + name: "query", + kind: "scalar", + T: 9 + }, { + no: 7, + name: "code_blocks", + kind: "message", + T: Xg, + repeated: true + }, { + no: 9, + name: "model_details", + kind: "message", + T: Qa + }, { + no: 10, + name: "documentation_identifiers", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 11, + name: "bad_notifications", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 12, + name: "lint_rules", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new Kqe().fromBinary(e, t); + } + static fromJson(e, t) { + return new Kqe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Kqe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Kqe, e, t); + } + }; + NEs = class Yqe extends N { + constructor(e) { + super(); + this.requestId = ""; + this.timeSinceCompletedActionMs = 0; + this.featureType = dbe.UNSPECIFIED; + this.relativeWorkspacePath = ""; + this.contents = ""; + this.linesAboveAndBelow = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ReportGroundTruthCandidateRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "request_id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "time_since_completed_action_ms", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "feature_type", + kind: "enum", + T: m.getEnumType(dbe) + }, { + no: 4, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 5, + name: "contents", + kind: "scalar", + T: 9 + }, { + no: 6, + name: "selection_in_question", + kind: "message", + T: Kv + }, { + no: 7, + name: "lines_above_and_below", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new Yqe().fromBinary(e, t); + } + static fromJson(e, t) { + return new Yqe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Yqe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Yqe, e, t); + } + }; + MEs = class Xqe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ReportGroundTruthCandidateResponse"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new Xqe().fromBinary(e, t); + } + static fromJson(e, t) { + return new Xqe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Xqe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Xqe, e, t); + } + }; + AEs = class Qqe extends N { + constructor(e) { + super(); + this.requestId = ""; + this.fate = Bve.UNSPECIFIED; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ReportCmdKFateRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "request_id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "fate", + kind: "enum", + T: m.getEnumType(Bve) + }]); + } + static fromBinary(e, t) { + return new Qqe().fromBinary(e, t); + } + static fromJson(e, t) { + return new Qqe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Qqe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Qqe, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.CANCELLED = 1] = "CANCELLED"; + i[i.ACCEPTED = 2] = "ACCEPTED"; + i[i.REJECTED = 3] = "REJECTED"; + i[i.FOLLOWED_UP = 4] = "FOLLOWED_UP"; + i[i.REPROMPTED = 5] = "REPROMPTED"; + })(Bve ||= {}); + m.util.setEnumType(Bve, "aiserver.v1.ReportCmdKFateRequest.Fate", [{ + no: 0, + name: "FATE_UNSPECIFIED" + }, { + no: 1, + name: "FATE_CANCELLED" + }, { + no: 2, + name: "FATE_ACCEPTED" + }, { + no: 3, + name: "FATE_REJECTED" + }, { + no: 4, + name: "FATE_FOLLOWED_UP" + }, { + no: 5, + name: "FATE_REPROMPTED" + }]); + $Es = class Zqe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ReportCmdKFateResponse"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new Zqe().fromBinary(e, t); + } + static fromJson(e, t) { + return new Zqe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Zqe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Zqe, e, t); + } + }; + $tr = class eje extends N { + constructor(e) { + super(); + this.sshString = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SshConfigPromptProps"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "ssh_string", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new eje().fromBinary(e, t); + } + static fromJson(e, t) { + return new eje().fromJson(e, t); + } + static fromJsonString(e, t) { + return new eje().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(eje, e, t); + } + }; + FEs = class tje extends N { + constructor(e) { + super(); + this.conversation = []; + this.files = []; + this.contextResults = { + case: undefined + }; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetFilesForComposerRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "conversation", + kind: "message", + T: Al, + repeated: true + }, { + no: 2, + name: "files", + kind: "message", + T: tu, + repeated: true + }, { + no: 3, + name: "rerank_results", + kind: "scalar", + T: 8, + opt: true + }, { + no: 4, + name: "file_search_results", + kind: "message", + T: Rve, + oneof: "context_results" + }, { + no: 5, + name: "code_search_results", + kind: "message", + T: tse, + oneof: "context_results" + }, { + no: 6, + name: "rerank_results_v2", + kind: "scalar", + T: 8, + opt: true + }, { + no: 7, + name: "long_context_mode", + kind: "scalar", + T: 8, + opt: true + }, { + no: 8, + name: "is_eval", + kind: "scalar", + T: 8, + opt: true + }, { + no: 9, + name: "request_id", + kind: "scalar", + T: 9, + opt: true + }, { + no: 10, + name: "model_details", + kind: "message", + T: Qa + }]); + } + static fromBinary(e, t) { + return new tje().fromBinary(e, t); + } + static fromJson(e, t) { + return new tje().fromJson(e, t); + } + static fromJsonString(e, t) { + return new tje().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(tje, e, t); + } + }; + OEs = class ije extends N { + constructor(e) { + super(); + this.relativeWorkspacePaths = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetFilesForComposerResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_paths", + kind: "scalar", + T: 9, + repeated: true + }]); + } + static fromBinary(e, t) { + return new ije().fromBinary(e, t); + } + static fromJson(e, t) { + return new ije().fromJson(e, t); + } + static fromJsonString(e, t) { + return new ije().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(ije, e, t); + } + }; + Izt = class sje extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.FindBugsRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "current_file", + kind: "message", + T: tu + }, { + no: 2, + name: "model_details", + kind: "message", + T: Qa + }]); + } + static fromBinary(e, t) { + return new sje().fromBinary(e, t); + } + static fromJson(e, t) { + return new sje().fromJson(e, t); + } + static fromJsonString(e, t) { + return new sje().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(sje, e, t); + } + }; + _Es = class nje extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.FindBugsResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "bug", + kind: "message", + T: BEs, + opt: true + }]); + } + static fromBinary(e, t) { + return new nje().fromBinary(e, t); + } + static fromJson(e, t) { + return new nje().fromJson(e, t); + } + static fromJsonString(e, t) { + return new nje().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(nje, e, t); + } + }; + BEs = class rje extends N { + constructor(e) { + super(); + this.description = ""; + this.lineNumber = 0; + this.confidence = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.FindBugsResponse.Bug"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "description", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "line_number", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "confidence", + kind: "scalar", + T: 2 + }]); + } + static fromBinary(e, t) { + return new rje().fromBinary(e, t); + } + static fromJson(e, t) { + return new rje().fromJson(e, t); + } + static fromJsonString(e, t) { + return new rje().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(rje, e, t); + } + }; + UEs = class oje extends N { + constructor(e) { + super(); + this.diffs = []; + this.previousCommitMessages = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.WriteGitCommitMessageRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "diffs", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 2, + name: "previous_commit_messages", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 3, + name: "explicit_context", + kind: "message", + T: Qg + }]); + } + static fromBinary(e, t) { + return new oje().fromBinary(e, t); + } + static fromJson(e, t) { + return new oje().fromJson(e, t); + } + static fromJsonString(e, t) { + return new oje().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(oje, e, t); + } + }; + WEs = class aje extends N { + constructor(e) { + super(); + this.commitMessage = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.WriteGitCommitMessageResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "commit_message", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new aje().fromBinary(e, t); + } + static fromJson(e, t) { + return new aje().fromJson(e, t); + } + static fromJsonString(e, t) { + return new aje().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(aje, e, t); + } + }; + VEs = class lje extends N { + constructor(e) { + super(); + this.requestId = ""; + this.isComposerVisible = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.KeepComposerCacheWarmRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "request", + kind: "message", + T: $ve + }, { + no: 2, + name: "request_id", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "is_composer_visible", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new lje().fromBinary(e, t); + } + static fromJson(e, t) { + return new lje().fromJson(e, t); + } + static fromJsonString(e, t) { + return new lje().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(lje, e, t); + } + }; + HEs = class cje extends N { + constructor(e) { + super(); + this.didKeepWarm = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.KeepComposerCacheWarmResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "did_keep_warm", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new cje().fromBinary(e, t); + } + static fromJson(e, t) { + return new cje().fromJson(e, t); + } + static fromJsonString(e, t) { + return new cje().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(cje, e, t); + } + }; + qEs = class uje extends N { + constructor(e) { + super(); + this.diffs = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetDiffReviewRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "diffs", + kind: "message", + T: jEs, + repeated: true + }, { + no: 2, + name: "custom_instructions", + kind: "scalar", + T: 9, + opt: true + }, { + no: 3, + name: "use_premium_model", + kind: "scalar", + T: 8, + opt: true + }]); + } + static fromBinary(e, t) { + return new uje().fromBinary(e, t); + } + static fromJson(e, t) { + return new uje().fromJson(e, t); + } + static fromJsonString(e, t) { + return new uje().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(uje, e, t); + } + }; + jEs = class dje extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.chunks = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetDiffReviewRequest.SimpleFileDiff"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "chunks", + kind: "message", + T: zEs, + repeated: true + }]); + } + static fromBinary(e, t) { + return new dje().fromBinary(e, t); + } + static fromJson(e, t) { + return new dje().fromJson(e, t); + } + static fromJsonString(e, t) { + return new dje().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(dje, e, t); + } + }; + zEs = class hje extends N { + constructor(e) { + super(); + this.oldLines = []; + this.newLines = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetDiffReviewRequest.SimpleFileDiff.Chunk"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "old_lines", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 2, + name: "new_lines", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 3, + name: "old_range", + kind: "message", + T: Kv + }, { + no: 4, + name: "new_range", + kind: "message", + T: Kv + }]); + } + static fromBinary(e, t) { + return new hje().fromBinary(e, t); + } + static fromJson(e, t) { + return new hje().fromJson(e, t); + } + static fromJsonString(e, t) { + return new hje().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(hje, e, t); + } + }; + JEs = class fje extends N { + constructor(e) { + super(); + this.text = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamDiffReviewResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "text", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new fje().fromBinary(e, t); + } + static fromJson(e, t) { + return new fje().fromJson(e, t); + } + static fromJsonString(e, t) { + return new fje().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(fje, e, t); + } + }; + GEs = class gje extends N { + constructor(e) { + super(); + this.contextItems = []; + this.modelName = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CountTokensRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "context_items", + kind: "message", + T: xve, + repeated: true + }, { + no: 2, + name: "model_name", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new gje().fromBinary(e, t); + } + static fromJson(e, t) { + return new gje().fromJson(e, t); + } + static fromJsonString(e, t) { + return new gje().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(gje, e, t); + } + }; + KEs = class pje extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.count = 0; + this.lineCount = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ContextItemTokenDetail"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "count", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "line_count", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new pje().fromBinary(e, t); + } + static fromJson(e, t) { + return new pje().fromJson(e, t); + } + static fromJsonString(e, t) { + return new pje().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(pje, e, t); + } + }; + YEs = class mje extends N { + constructor(e) { + super(); + this.count = 0; + this.tokenDetails = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CountTokensResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "count", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "token_details", + kind: "message", + T: KEs, + repeated: true + }]); + } + static fromBinary(e, t) { + return new mje().fromBinary(e, t); + } + static fromJson(e, t) { + return new mje().fromJson(e, t); + } + static fromJsonString(e, t) { + return new mje().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(mje, e, t); + } + }; + XEs = class bje extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetModelLabelsRequest"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new bje().fromBinary(e, t); + } + static fromJson(e, t) { + return new bje().fromJson(e, t); + } + static fromJsonString(e, t) { + return new bje().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(bje, e, t); + } + }; + QEs = class vje extends N { + constructor(e) { + super(); + this.modelLabels = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetModelLabelsResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "model_labels", + kind: "message", + T: ZEs, + repeated: true + }]); + } + static fromBinary(e, t) { + return new vje().fromBinary(e, t); + } + static fromJson(e, t) { + return new vje().fromJson(e, t); + } + static fromJsonString(e, t) { + return new vje().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(vje, e, t); + } + }; + ZEs = class yje extends N { + constructor(e) { + super(); + this.name = ""; + this.label = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetModelLabelsResponse.ModelLabel"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "name", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "label", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "short_label", + kind: "scalar", + T: 9, + opt: true + }, { + no: 4, + name: "supports_agent", + kind: "scalar", + T: 8, + opt: true + }]); + } + static fromBinary(e, t) { + return new yje().fromBinary(e, t); + } + static fromJson(e, t) { + return new yje().fromJson(e, t); + } + static fromJsonString(e, t) { + return new yje().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(yje, e, t); + } + }; + eIs = class wje extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetLastDefaultModelNudgeRequest"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new wje().fromBinary(e, t); + } + static fromJson(e, t) { + return new wje().fromJson(e, t); + } + static fromJsonString(e, t) { + return new wje().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(wje, e, t); + } + }; + tIs = class Cje extends N { + constructor(e) { + super(); + this.nudgeDate = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetLastDefaultModelNudgeResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "nudge_date", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new Cje().fromBinary(e, t); + } + static fromJson(e, t) { + return new Cje().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Cje().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Cje, e, t); + } + }; + Dzt = class Sje extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetDefaultModelNudgeDataRequest"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new Sje().fromBinary(e, t); + } + static fromJson(e, t) { + return new Sje().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Sje().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Sje, e, t); + } + }; + iIs = class xje extends N { + constructor(e) { + super(); + this.nudgeDate = ""; + this.shouldDefaultSwitchOnNewChat = false; + this.modelsWithNoDefaultSwitch = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetDefaultModelNudgeDataResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "nudge_date", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "should_default_switch_on_new_chat", + kind: "scalar", + T: 8 + }, { + no: 3, + name: "models_with_no_default_switch", + kind: "scalar", + T: 9, + repeated: true + }]); + } + static fromBinary(e, t) { + return new xje().fromBinary(e, t); + } + static fromJson(e, t) { + return new xje().fromJson(e, t); + } + static fromJsonString(e, t) { + return new xje().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(xje, e, t); + } + }; + sIs = class kje extends N { + constructor(e) { + super(); + this.accessKey = ""; + this.secretKey = ""; + this.region = ""; + this.modelName = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.TestBedrockCredentialsRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "access_key", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "secret_key", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "region", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "model_name", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new kje().fromBinary(e, t); + } + static fromJson(e, t) { + return new kje().fromJson(e, t); + } + static fromJsonString(e, t) { + return new kje().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(kje, e, t); + } + }; + nIs = class Eje extends N { + constructor(e) { + super(); + this.success = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.TestBedrockCredentialsResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "success", + kind: "scalar", + T: 8 + }, { + no: 2, + name: "error", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new Eje().fromBinary(e, t); + } + static fromJson(e, t) { + return new Eje().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Eje().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Eje, e, t); + } + }; + Ftr = class Ije extends N { + constructor(e) { + super(); + this.accessKey = ""; + this.secretKey = ""; + this.region = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetBedrockModelsRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "access_key", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "secret_key", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "region", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new Ije().fromBinary(e, t); + } + static fromJson(e, t) { + return new Ije().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Ije().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Ije, e, t); + } + }; + Otr = class Dje extends N { + constructor(e) { + super(); + this.models = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetBedrockModelsResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "models", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 2, + name: "error", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new Dje().fromBinary(e, t); + } + static fromJson(e, t) { + return new Dje().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Dje().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Dje, e, t); + } + }; + rIs = class Tje extends N { + constructor(e) { + super(); + this.commitHash = ""; + this.totalLinesAdded = 0; + this.totalLinesDeleted = 0; + this.tabLinesAdded = 0; + this.tabLinesDeleted = 0; + this.composerLinesAdded = 0; + this.composerLinesDeleted = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ReportCommitAiAnalyticsRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "commit_hash", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "total_lines_added", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "total_lines_deleted", + kind: "scalar", + T: 5 + }, { + no: 4, + name: "tab_lines_added", + kind: "scalar", + T: 5 + }, { + no: 5, + name: "tab_lines_deleted", + kind: "scalar", + T: 5 + }, { + no: 6, + name: "composer_lines_added", + kind: "scalar", + T: 5 + }, { + no: 7, + name: "composer_lines_deleted", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new Tje().fromBinary(e, t); + } + static fromJson(e, t) { + return new Tje().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Tje().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Tje, e, t); + } + }; + oIs = class Pje extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ReportCommitAiAnalyticsResponse"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new Pje().fromBinary(e, t); + } + static fromJson(e, t) { + return new Pje().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Pje().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Pje, e, t); + } + }; + aIs = class Lje extends N { + constructor(e) { + super(); + this.knowledge = ""; + this.title = ""; + this.gitOrigin = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.KnowledgeBaseAddRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "knowledge", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "title", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "git_origin", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new Lje().fromBinary(e, t); + } + static fromJson(e, t) { + return new Lje().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Lje().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Lje, e, t); + } + }; + lIs = class Rje extends N { + constructor(e) { + super(); + this.success = false; + this.id = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.KnowledgeBaseAddResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "success", + kind: "scalar", + T: 8 + }, { + no: 2, + name: "id", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new Rje().fromBinary(e, t); + } + static fromJson(e, t) { + return new Rje().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Rje().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Rje, e, t); + } + }; + cIs = class Nje extends N { + constructor(e) { + super(); + this.id = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.KnowledgeBaseRemoveRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "id", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new Nje().fromBinary(e, t); + } + static fromJson(e, t) { + return new Nje().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Nje().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Nje, e, t); + } + }; + uIs = class Mje extends N { + constructor(e) { + super(); + this.success = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.KnowledgeBaseRemoveResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "success", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new Mje().fromBinary(e, t); + } + static fromJson(e, t) { + return new Mje().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Mje().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Mje, e, t); + } + }; + dIs = class Aje extends N { + constructor(e) { + super(); + this.query = ""; + this.indexName = ""; + this.gitOrigin = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.KnowledgeBaseSearchRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "query", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "index_name", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "limit", + kind: "scalar", + T: 5, + opt: true + }, { + no: 4, + name: "min_score", + kind: "scalar", + T: 2, + opt: true + }, { + no: 5, + name: "git_origin", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new Aje().fromBinary(e, t); + } + static fromJson(e, t) { + return new Aje().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Aje().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Aje, e, t); + } + }; + hIs = class $je extends N { + constructor(e) { + super(); + this.success = false; + this.searchResults = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.KnowledgeBaseSearchResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "success", + kind: "scalar", + T: 8 + }, { + no: 2, + name: "search_results", + kind: "message", + T: fIs, + repeated: true + }]); + } + static fromBinary(e, t) { + return new $je().fromBinary(e, t); + } + static fromJson(e, t) { + return new $je().fromJson(e, t); + } + static fromJsonString(e, t) { + return new $je().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals($je, e, t); + } + }; + fIs = class Fje extends N { + constructor(e) { + super(); + this.id = ""; + this.knowledge = ""; + this.title = ""; + this.createdAt = ""; + this.score = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.KnowledgeBaseSearchResponse.MatchedItems"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "knowledge", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "title", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "created_at", + kind: "scalar", + T: 9 + }, { + no: 5, + name: "score", + kind: "scalar", + T: 2 + }]); + } + static fromBinary(e, t) { + return new Fje().fromBinary(e, t); + } + static fromJson(e, t) { + return new Fje().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Fje().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Fje, e, t); + } + }; + gIs = class Oje extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.KnowledgeBaseListRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "limit", + kind: "scalar", + T: 5, + opt: true + }, { + no: 2, + name: "git_origin", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new Oje().fromBinary(e, t); + } + static fromJson(e, t) { + return new Oje().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Oje().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Oje, e, t); + } + }; + pIs = class _je extends N { + constructor(e) { + super(); + this.success = false; + this.allResults = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.KnowledgeBaseListResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "success", + kind: "scalar", + T: 8 + }, { + no: 2, + name: "all_results", + kind: "message", + T: mIs, + repeated: true + }]); + } + static fromBinary(e, t) { + return new _je().fromBinary(e, t); + } + static fromJson(e, t) { + return new _je().fromJson(e, t); + } + static fromJsonString(e, t) { + return new _je().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(_je, e, t); + } + }; + mIs = class Bje extends N { + constructor(e) { + super(); + this.id = ""; + this.knowledge = ""; + this.title = ""; + this.createdAt = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.KnowledgeBaseListResponse.Item"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "knowledge", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "title", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "created_at", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new Bje().fromBinary(e, t); + } + static fromJson(e, t) { + return new Bje().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Bje().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Bje, e, t); + } + }; + _tr = class Uje extends N { + constructor(e) { + super(); + this.id = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.KnowledgeBaseGetRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "id", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new Uje().fromBinary(e, t); + } + static fromJson(e, t) { + return new Uje().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Uje().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Uje, e, t); + } + }; + Btr = class Wje extends N { + constructor(e) { + super(); + this.success = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.KnowledgeBaseGetResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "success", + kind: "scalar", + T: 8 + }, { + no: 2, + name: "result", + kind: "message", + T: bIs + }]); + } + static fromBinary(e, t) { + return new Wje().fromBinary(e, t); + } + static fromJson(e, t) { + return new Wje().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Wje().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Wje, e, t); + } + }; + bIs = class Vje extends N { + constructor(e) { + super(); + this.id = ""; + this.knowledge = ""; + this.title = ""; + this.createdAt = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.KnowledgeBaseGetResponse.Item"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "knowledge", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "title", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "created_at", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new Vje().fromBinary(e, t); + } + static fromJson(e, t) { + return new Vje().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Vje().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Vje, e, t); + } + }; + vIs = class Hje extends N { + constructor(e) { + super(); + this.audio = new Uint8Array(0); + this.fileName = ""; + this.language = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SpeechToTextRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "audio", + kind: "scalar", + T: 12 + }, { + no: 2, + name: "file_name", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "language", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new Hje().fromBinary(e, t); + } + static fromJson(e, t) { + return new Hje().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Hje().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Hje, e, t); + } + }; + yIs = class qje extends N { + constructor(e) { + super(); + this.text = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SpeechToTextResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "text", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new qje().fromBinary(e, t); + } + static fromJson(e, t) { + return new qje().fromJson(e, t); + } + static fromJsonString(e, t) { + return new qje().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(qje, e, t); + } + }; + wIs = class jje extends N { + constructor(e) { + super(); + this.commands = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.InferBackgroundComposerScriptsRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "commands", + kind: "message", + T: CIs, + repeated: true + }]); + } + static fromBinary(e, t) { + return new jje().fromBinary(e, t); + } + static fromJson(e, t) { + return new jje().fromJson(e, t); + } + static fromJsonString(e, t) { + return new jje().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(jje, e, t); + } + }; + CIs = class zje extends N { + constructor(e) { + super(); + this.command = ""; + this.timestamp = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.InferBackgroundComposerScriptsRequest.Command"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "command", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "timestamp", + kind: "scalar", + T: 2 + }, { + no: 3, + name: "cwd", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new zje().fromBinary(e, t); + } + static fromJson(e, t) { + return new zje().fromJson(e, t); + } + static fromJsonString(e, t) { + return new zje().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(zje, e, t); + } + }; + SIs = class Jje extends N { + constructor(e) { + super(); + this.installScript = ""; + this.startScript = ""; + this.terminals = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.InferBackgroundComposerScriptsResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "install_script", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "start_script", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "terminals", + kind: "message", + T: xIs, + repeated: true + }]); + } + static fromBinary(e, t) { + return new Jje().fromBinary(e, t); + } + static fromJson(e, t) { + return new Jje().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Jje().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Jje, e, t); + } + }; + xIs = class Gje extends N { + constructor(e) { + super(); + this.name = ""; + this.command = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.InferBackgroundComposerScriptsResponse.Terminal"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "name", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "command", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new Gje().fromBinary(e, t); + } + static fromJson(e, t) { + return new Gje().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Gje().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Gje, e, t); + } + }; + kIs = class Kje extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetBackgroundComposerFeedbackLinkRequest"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new Kje().fromBinary(e, t); + } + static fromJson(e, t) { + return new Kje().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Kje().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Kje, e, t); + } + }; + EIs = class Yje extends N { + constructor(e) { + super(); + this.url = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetBackgroundComposerFeedbackLinkResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "url", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new Yje().fromBinary(e, t); + } + static fromJson(e, t) { + return new Yje().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Yje().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Yje, e, t); + } + }; + } +}); +function sJ(i) { + if (i === true) { + return "true"; + } + if (i === false) { + return "false"; + } + if (i === undefined) { + return "implicit-false"; + } + { + let e = i; + e = e; + return "true"; + } +} +function Utr(i) { + let e = 165; + for (let t = 0; t < i.length; t++) { + i[t] = (i[t] ^ e) + t % 256; + e = i[t]; + } + return i; +} +function Wtr({ + req: i, + machineId: e, + macMachineId: t, + base64Fn: s, + cursorVersion: n, + privacyMode: r, + eligibleForSnippetLearning: o, + backupRequestId: a, + clientKey: l, + sessionId: c, + configVersion: u +}) { + try { + const d = Math.floor(Date.now() / 1000000); + const h = new Uint8Array([d >> 8 & 255, d >> 0 & 255, d >> 24 & 255, d >> 16 & 255, d >> 8 & 255, d & 255]); + const g = Utr(h); + const p = s(g); + i.header.set("x-cursor-checksum", t === undefined ? `${p}${e}` : `${p}${e}/${t}`); + } catch {} + i.header.set("x-cursor-client-version", n); + if (u !== undefined && u !== "") { + i.header.set("x-cursor-config-version", u); + } + if (c !== undefined) { + i.header.set(MIs, c); + } + i.header.set(rJ, o && r === false ? "true" : "false"); + i.header.set(nJ, sJ(r)); + if (l !== undefined) { + i.header.set(NIs, l); + } + try { + const d = Intl.DateTimeFormat().resolvedOptions().timeZone; + i.header.set("x-cursor-timezone", d); + } catch {} + try { + if (a) { + if (!i.header.has("x-request-id")) { + i.header.set("x-request-id", a); + } + if (!i.header.has("x-amzn-trace-id")) { + i.header.set("x-amzn-trace-id", `Root=${a}`); + } + } + } catch {} +} +function IIs(i) { + return i === zr.PRO || i === zr.ENTERPRISE || i === zr.FREE_TRIAL; +} +function Vtr(i, e, t) { + if (i === undefined || i.isOn === false) { + return false; + } else { + return e !== false && (t !== false || !!i.shouldLetUserEnableCppEvenIfNotPro); + } +} +function Htr(i, e, t) { + if (e !== undefined) { + const s = [".env", ".env.local", ".env.development", ".env.production", ".env.test", ".env.testing", ".env.development.local", ".env.production.local", ".env.test.local", ".env.testing.local"]; + if (e.languageId === "plaintext" && s.some(n => e.fsPath.endsWith(n)) || DIs(e.languageId, t)) { + return false; + } + } + return i === true; +} +function DIs(i, e) { + return !!Array.isArray(e) && !!e.includes(i); +} +var OF; +var TIs; +var dS; +var PIs; +var LIs; +var RIs; +var G7; +var _F; +var NIs; +var nJ; +var rJ; +var MIs; +var Tzt; +var uE; +var Pzt; +var K7; +var ise; +var AIs; +var Ddt; +var Lzt; +var $Is; +var Rzt; +var FIs; +var OIs; +var _Is; +var Tdt; +var Y7; +var Nzt; +var Ku; +var zr; +var c5; +var BIs; +var Mzt; +var Azt; +var xc = ue({ + "out-build/vs/platform/reactivestorage/common/reactiveStorageTypes.js"() { + "use strict"; + + (function (i) { + i.keyword = "keyword"; + i.vector = "vector"; + })(OF ||= {}); + (function (i) { + i.OPEN = "open"; + i.CLOSED = "closed"; + i.MERGED = "merged"; + })(TIs ||= {}); + (function (i) { + i.TO_MAIN_FROM_BRANCH = "to_main_from_branch"; + i.TO_HEAD = "to_head"; + })(dS ||= {}); + (function (i) { + i.Diff = "diff"; + i.Pr = "pr"; + })(PIs ||= {}); + (function (i) { + i.Upload = "upload"; + i.Syncing = "syncing"; + })(LIs ||= {}); + (function (i) { + i.Hover = "Hover"; + i.Definition = "Definition"; + i.TypeDefinition = "TypeDefinition"; + i.Reference = "Reference"; + i.Implementation = "Implementation"; + })(RIs ||= {}); + (function (i) { + i.OK = "OK"; + i.ERROR = "ERROR"; + i.NO_CHANGES_FOUND = "NO_CHANGES_FOUND"; + i.NONE = "NONE"; + })(G7 ||= {}); + (function (i) { + i.id = "local"; + })(_F ||= {}); + NIs = "x-client-key"; + nJ = "x-ghost-mode"; + rJ = "x-new-onboarding-completed"; + MIs = "x-session-id"; + (function (i) { + i.GetCachedServerConfig = "aiServerConfigService.getCachedServerConfig"; + })(Tzt ||= {}); + (function (i) { + i.Ack = "editHistoryDiffFormatter.ack"; + i.GetModelValueInRanges = "editHistoryDiffFormatter.getModelValueInRanges"; + i.GetModelValue = "editHistoryDiffFormatter.getModelValue"; + i.FormatDiffHistory = "editHistoryDiffFormatter.formatDiffHistory"; + i.InitModel = "editHistoryDiffFormatter.initModel"; + i.CompileGlobalDiffTrajectories = "editHistoryDiffFormatter.compileGlobalDiffTrajectories"; + i.CompileGlobalDiffTrajectoriesForCmdk = "editHistoryDiffFormatter.compileGlobalDiffTrajectoriesForCmdk"; + i.IsRevertingToRecentModel = "editHistoryDiffFormatter.isRevertingToRecentModel"; + i.IsSuggestingRecentlyRejectedEdit = "editHistoryDiffFormatter.isSuggestingRecentlyRejectedEdit"; + i.RecordRejectedEdit = "editHistoryDiffFormatter.recordRejectedEdit"; + i.ProcessModelChangeLoop = "editHistoryDiffFormatter.processModelChangeLoop"; + i.SetEnableCppWhitespaceDiffHistoryMode = "editHistoryDiffFormatter.setEnableCppWhitespaceDiffHistoryMode"; + i.SetEnableCppIncludeUnchangedLines = "editHistoryDiffFormatter.setEnableCppIncludeUnchangedLines"; + })(uE ||= {}); + (function (i) { + i.GetExtHostInfo = "extHostInfo.getExtHostInfo"; + })(Pzt ||= {}); + (function (i) { + i.GetFileSyncUpdates = "fileSync.getFileSyncUpdates"; + i.ShouldRelyOnFileSyncForFile = "fileSync.shouldRelyOnFileSyncForFile"; + i.GetFileSyncEncryptionHeader = "fileSync.getFileSyncEncryptionHeader"; + i.ResetSequentialSuccessfulSync = "fileSync.resetSequentialSuccessfulSync"; + })(K7 ||= {}); + (function (i) { + i.GetRelatedFiles = "contextGraph.getRelatedFiles"; + i.InitializeWorkspace = "contextGraph.initializeWorkspace"; + i.GetWorkspaceSyncStatus = "contextGraph.getWorkspaceSyncStatus"; + i.ResetWorkspace = "contextGraph.resetWorkspace"; + i.GetRelatedFilesForLine = "contextGraph.getRelatedFilesForLine"; + i.GetRelatedFilesForRange = "contextGraph.getRelatedFilesForRange"; + })(ise ||= {}); + (function (i) { + i.GetDirectory = "fileRetrievalActions.readDirectory"; + })(AIs ||= {}); + (function (i) { + i.CheckClaudeAPIKey = "misc.checkClaudeAPIKey"; + i.CheckGoogleAPIKey = "misc.checkGoogleAPIKey"; + })(Ddt ||= {}); + (function (i) { + i.GetReferencedSymbols = "treesitter.getReferencedSymbols"; + i.GetDefinedSymbols = "treesitter.getDefinedSymbols"; + i.GetImportantDefinitionNames = "treesitter.getImportantDefinitionNames"; + })(Lzt ||= {}); + (function (i) { + i.GetBFSPath = "gitgraph.getBfsPath"; + i.GetRelevantPaths = "gitgraph.getRelevantPaths"; + })($Is ||= {}); + (function (i) { + i.GetRecentCommits = "git.getRecentCommits"; + i.GetRecentCommitHashesTouchingFile = "git.getRecentCommitHashesTouchingFile"; + i.GetCommitByHash = "git.getCommitByHash"; + i.GetCommitDetailsByHashes = "git.getCommitDetailsByHashes"; + i.GetCurrentIndexAndRecentCommits = "git.getCurrentIndexAndRecentCommits"; + })(Rzt ||= {}); + (function (i) { + i.GetFileImports = "lsp.getFileImports"; + })(FIs ||= {}); + (function (i) { + i.Get = "devOnlyRedis.get"; + i.Set = "devOnlyRedis.set"; + i.SubscribeToChannelForKey = "devOnlyRedis.subscribeToChannelForKey"; + i.UnsubscribeFromChannelForKey = "devOnlyRedis.unsubscribeFromChannelForKey"; + })(OIs ||= {}); + (function (i) { + i.ValueChanged = "devOnlyRedis.valueChanged"; + })(_Is ||= {}); + (function (i) { + i.TakeScreenshot = "puppeteer.takeScreenshot"; + })(Tdt ||= {}); + (function (i) { + i.CallTool = "mcp.callTool"; + i.CreateClient = "mcp.createClient"; + i.DeleteClient = "mcp.deleteClient"; + i.ReloadClient = "mcp.reloadClient"; + i.ReadResource = "mcp.readResource"; + i.ListOfferings = "mcp.listOfferings"; + })(Y7 ||= {}); + (function (i) { + i.StoreCursorServerUrlCache = "backgroundComposer.storeCursorServerUrlCache"; + })(Nzt ||= {}); + (function (i) { + i.Unknown = "unknown"; + i.LineChange = "line_change"; + i.Typing = "typing"; + i.OptionHold = "option_hold"; + i.LinterErrors = "lint_errors"; + i.ParameterHints = "parameter_hints"; + i.CursorPrediction = "cursor_prediction"; + i.ManualTrigger = "manual_trigger"; + i.EditorChange = "editor_change"; + i.LspSuggestions = "lsp_suggestions"; + })(Ku ||= {}); + (function (i) { + i.FREE = "free"; + i.PRO = "pro"; + i.ENTERPRISE = "enterprise"; + i.FREE_TRIAL = "free_trial"; + })(zr ||= {}); + c5 = "cursor.cpp.disabledLanguages"; + BIs = "cursor.general.disableHttp2"; + Mzt = "cursor.general.gitGraphIndexing"; + Azt = "not a real key"; + } +}); +var BF; +var UIs = ue({ + "out-build/external/lexical/shared/canUseDOM.js"() { + "use strict"; + + BF = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined"; + } +}); +var WIs; +var gR; +var X7; +var sse; +var Uve; +var Wve; +var VIs; +var Vve; +var HIs = ue({ + "out-build/external/lexical/shared/environment.js"() { + "use strict"; + + UIs(); + WIs = BF && "documentMode" in document ? document.documentMode : null; + gR = BF && /Mac|iPod|iPhone|iPad/.test(navigator.platform); + X7 = BF && /^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent); + sse = BF && "InputEvent" in window && !WIs ? "getTargetRanges" in new window.InputEvent("input") : false; + Uve = BF && /Version\/[\d.]+.*Safari/.test(navigator.userAgent); + Wve = BF && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream; + VIs = BF && /^(?=.*Chrome).*/i.test(navigator.userAgent); + Vve = BF && /AppleWebKit\/[\d.]+/.test(navigator.userAgent) && !VIs; + } +}); +function ta(i, e, ...t) { + if (!i) { + throw new Error("Internal Lexical error: invariant() is meant to be replaced at compile time. There is no runtime version. Error: " + e); + } +} +var qIs = ue({ + "out-build/external/lexical/shared/invariant.js"() { + "use strict"; + } +}); +function jIs(i, e, t, s) { + const n = i._keyToDOMMap; + n.clear(); + i._editorState = $zt(); + i._pendingEditorState = s; + i._compositionKey = null; + i._dirtyType = aU; + i._cloneNotNeeded.clear(); + i._dirtyLeaves = new Set(); + i._dirtyElements.clear(); + i._normalizedNodes = new Set(); + i._updateTags = new Set(); + i._updates = []; + i._blockCursorElement = null; + const r = i._observer; + if (r !== null) { + r.disconnect(); + i._observer = null; + } + if (e !== null) { + e.textContent = ""; + } + if (t !== null) { + t.textContent = ""; + n.set("root", t); + } +} +function qtr(i) { + const e = new Map(); + const t = new Set(); + i.forEach(s => { + const n = s.klass.importDOM != null ? s.klass.importDOM.bind(s.klass) : null; + if (n == null || t.has(n)) { + return; + } + t.add(n); + const r = n(); + if (r !== null) { + Object.keys(r).forEach(o => { + let a = e.get(o); + if (a === undefined) { + a = []; + e.set(o, a); + } + a.push(r[o]); + }); + } + }); + return e; +} +function jtr(i) { + const e = i || {}; + const t = Air(); + const s = e.theme || {}; + const n = i === undefined ? t : e.parentEditor || null; + const r = e.disableEvents || false; + const o = $zt(); + const a = e.namespace || (n !== null ? n._config.namespace : zDs()); + const l = e.editorState; + const c = [xht, yJ, Sht, JJt, CJ, ...(e.nodes || [])]; + const u = e.onError; + const d = e.editable !== undefined ? e.editable : true; + let h; + if (i === undefined && t !== null) { + h = t._nodes; + } else { + h = new Map(); + for (let p = 0; p < c.length; p++) { + let b = c[p]; + let v = null; + let y = null; + if (typeof b != "function") { + const x = b; + b = x.replace; + v = x.with; + y = x.withKlass ? x.withKlass : null; + } + const w = b.getType(); + const C = b.transform(); + const S = new Set(); + if (C !== null) { + S.add(C); + } + h.set(w, { + klass: b, + replace: v, + replaceWithKlass: y, + transforms: S + }); + } + } + const g = new rTs(o, n, h, { + disableEvents: r, + namespace: a, + theme: s + }, u || console.error, qtr(h), d); + if (l !== undefined) { + g._pendingEditorState = l; + g._dirtyType = vJ; + } + return g; +} +function ztr(i, e) { + const t = e.getEditorState()._selection; + const s = i._selection; + if (s !== null) { + if (s.dirty || !s.is(t)) { + return true; + } + } else if (t !== null) { + return true; + } + return false; +} +function Jtr(i) { + return new uJt(new Map(i._nodeMap)); +} +function $zt() { + return new uJt(new Map([["root", qsr()]])); +} +function zIs(i) { + const e = i.exportJSON(); + const t = i.constructor; + if (e.type !== t.getType()) { + ta(false, "LexicalNode: Node %s does not implement .exportJSON().", t.name); + } + const s = e.children; + if (Or(i)) { + if (!Array.isArray(s)) { + ta(false, "LexicalNode: Node %s is an element but .exportJSON() does not have a children array.", t.name); + } + const n = i.getChildren(); + for (let r = 0; r < n.length; r++) { + const o = n[r]; + const a = zIs(o); + s.push(a); + } + } + return e; +} +function JIs(i, e, t, s, n) { + const r = i.anchor; + const o = i.focus; + const a = r.getNode(); + const l = jw(); + const c = WF(l._window); + const u = c !== null ? c.anchorNode : null; + const d = r.key; + const h = l.getElementByKey(d); + const g = t.length; + return d !== o.key || !Po(a) || (!n && (!sse || hJt < s + 50) || a.isDirty() && g < 2 || jDs(t)) && r.offset !== o.offset && !a.isComposing() || zzt(a) || a.isDirty() && g > 1 || (n || !sse) && h !== null && !a.isComposing() && u !== _dt(h) || c !== null && e !== null && (!e.collapsed || e.startContainer !== c.anchorNode || e.startOffset !== c.anchorOffset) || a.getFormat() !== i.format || a.getStyle() !== i.style || esr(i, a); +} +function GIs(i, e) { + return i !== null && i.nodeValue !== null && i.nodeType === qF && e !== 0 && e !== i.nodeValue.length; +} +function KIs(i, e, t) { + const { + anchorNode: s, + anchorOffset: n, + focusNode: r, + focusOffset: o + } = i; + if (!Ydt || !(Ydt = false, GIs(s, n) && GIs(r, o))) { + tP(e, () => { + if (!t) { + d5(null); + return; + } + if (!Odt(e, s, r)) { + return; + } + const a = Za(); + if (Oo(a)) { + const l = a.anchor; + const c = l.getNode(); + if (a.isCollapsed()) { + if (i.type === "Range" && i.anchorNode === i.focusNode) { + a.dirty = true; + } + const u = qdt(e).event; + const d = u ? u.timeStamp : performance.now(); + const [h, g, p, b, v] = fJt; + if (d < v + 200 && l.offset === p && l.key === b) { + a.format = h; + a.style = g; + } else if (l.type === "text") { + a.format = c.getFormat(); + a.style = c.getStyle(); + } else if (l.type === "element") { + a.format = 0; + a.style = ""; + } + } else { + let u = uPs; + let d = false; + const h = a.getNodes(); + const g = h.length; + for (let p = 0; p < g; p++) { + const b = h[p]; + if (Po(b) && (d = true, u &= b.getFormat(), u === 0)) { + break; + } + } + a.format = d ? u : 0; + } + } + $n(e, sht, undefined); + }); + } +} +function Gtr(i, e) { + tP(e, () => { + const t = Za(); + const s = WF(e._window); + const n = Adt(); + if (s) { + if (Oo(t)) { + const r = t.anchor; + const o = r.getNode(); + if (r.type === "element" && r.offset === 0 && t.isCollapsed() && !dE(o) && kp().getChildrenSize() === 1 && o.getTopLevelElementOrThrow().isEmpty() && n !== null && t.is(n)) { + s.removeAllRanges(); + t.dirty = true; + } else if (i.detail === 3 && !t.isCollapsed()) { + const l = t.focus.getNode(); + if (o !== l) { + if (Or(o)) { + o.select(0); + } else { + o.getParentOrThrow().select(0); + } + } + } + } else if (i.pointerType === "touch") { + const r = s.anchorNode; + if (r !== null) { + const o = r.nodeType; + if (o === gse || o === qF) { + const a = jzt(n, s, e); + d5(a); + } + } + } + } + $n(e, hTs, i); + }); +} +function Ktr(i, e) { + const t = i.target; + const s = i.pointerType; + if (t instanceof Node && s !== "touch") { + tP(e, () => { + if (!qir(t)) { + Xdt = true; + } + }); + } +} +function YIs(i) { + if (!i.getTargetRanges) { + return null; + } + const e = i.getTargetRanges(); + if (e.length === 0) { + return null; + } else { + return e[0]; + } +} +function Ytr(i, e) { + return i !== e || Or(i) || Or(e) || !i.isToken() || !e.isToken(); +} +function Xtr(i) { + return dJt === 229 && i < ase + Gdt; +} +function Qtr(i, e) { + const t = i.inputType; + const s = YIs(i); + if (t !== "deleteCompositionText" && (!X7 || !XDs(e))) { + if (t !== "insertCompositionText") { + tP(e, () => { + const n = Za(); + if (t === "deleteContentBackward") { + if (n === null) { + const u = Adt(); + if (!Oo(u)) { + return; + } + d5(u.clone()); + } + if (Oo(n)) { + if (Xtr(i.timeStamp) && e.isComposing() && n.anchor.key === n.focus.key) { + _x(null); + ase = 0; + setTimeout(() => { + tP(e, () => { + _x(null); + }); + }, Gdt); + if (Oo(n)) { + const u = n.anchor.getNode(); + u.markDirty(); + n.format = u.getFormat(); + n.style = u.getStyle(); + } + } else { + i.preventDefault(); + $n(e, h5, true); + } + return; + } + } + if (!Oo(n)) { + return; + } + const r = i.data; + if (cJ !== null) { + Gzt(false, e, cJ); + } + if ((!n.dirty || cJ !== null) && n.isCollapsed() && !dE(n.anchor.getNode()) && s !== null) { + n.applyDOMRange(s); + } + cJ = null; + const o = n.anchor; + const a = n.focus; + const l = o.getNode(); + const c = a.getNode(); + if (t === "insertText" || t === "insertTranspose") { + if (r === ` +`) { + i.preventDefault(); + $n(e, hJ, false); + } else if (r === jF) { + i.preventDefault(); + $n(e, nht, undefined); + } else if (r == null && i.dataTransfer) { + const u = i.dataTransfer.getData("text/plain"); + i.preventDefault(); + n.insertRawText(u); + } else if (r != null && JIs(n, s, r, i.timeStamp, true)) { + i.preventDefault(); + $n(e, fJ, r); + } else { + cJ = r; + } + hJt = i.timeStamp; + return; + } + i.preventDefault(); + switch (t) { + case "insertFromYank": + case "insertFromDrop": + case "insertReplacementText": + { + $n(e, fJ, i); + break; + } + case "insertFromComposition": + { + _x(null); + $n(e, fJ, i); + break; + } + case "insertLineBreak": + { + _x(null); + $n(e, hJ, false); + break; + } + case "insertParagraph": + { + _x(null); + if (cse) { + cse = false; + $n(e, hJ, false); + } else { + $n(e, nht, undefined); + } + break; + } + case "insertFromPaste": + case "insertFromPasteAsQuotation": + { + $n(e, dse, i); + break; + } + case "deleteByComposition": + { + if (Ytr(l, c)) { + $n(e, rht, undefined); + } + break; + } + case "deleteByDrag": + case "deleteByCut": + { + $n(e, rht, undefined); + break; + } + case "deleteContent": + { + $n(e, h5, false); + break; + } + case "deleteWordBackward": + { + $n(e, hse, true); + break; + } + case "deleteWordForward": + { + $n(e, hse, false); + break; + } + case "deleteHardLineBackward": + case "deleteSoftLineBackward": + { + $n(e, sU, true); + break; + } + case "deleteContentForward": + case "deleteHardLineForward": + case "deleteSoftLineForward": + { + $n(e, sU, false); + break; + } + case "formatStrikeThrough": + { + $n(e, nU, "strikethrough"); + break; + } + case "formatBold": + { + $n(e, nU, "bold"); + break; + } + case "formatItalic": + { + $n(e, nU, "italic"); + break; + } + case "formatUnderline": + { + $n(e, nU, "underline"); + break; + } + case "historyUndo": + { + $n(e, nye, undefined); + break; + } + case "historyRedo": + { + $n(e, rye, undefined); + break; + } + default: + } + }); + } + } +} +function Ztr(i, e) { + i.stopPropagation(); + tP(e, () => { + const t = Za(); + const s = i.data; + const n = YIs(i); + if (s != null && Oo(t) && JIs(t, n, s, i.timeStamp, false)) { + if (use) { + Fzt(e, s); + use = false; + } + const r = t.anchor; + const o = r.getNode(); + const a = WF(e._window); + if (a === null) { + return; + } + const l = r.offset; + if (!sse || t.isCollapsed() || !Po(o) || a.anchorNode === null || o.getTextContent().slice(0, l) + s + o.getTextContent().slice(l + t.focus.offset) !== JDs(a.anchorNode)) { + $n(e, fJ, s); + } + const c = s.length; + if (X7 && c > 1 && i.inputType === "insertCompositionText" && !e.isComposing()) { + t.anchor.offset -= c; + } + if (!Uve && !Wve && !Vve && e.isComposing()) { + ase = 0; + _x(null); + } + } else { + Gzt(false, e, s !== null ? s : undefined); + if (use) { + Fzt(e, s || undefined); + use = false; + } + } + Xir(); + }); + cJ = null; +} +function eir(i, e) { + tP(e, () => { + const t = Za(); + if (Oo(t) && !e.isComposing()) { + const s = t.anchor; + const n = t.anchor.getNode(); + _x(s.key); + if (i.timeStamp < ase + Gdt || s.type === "element" || !t.isCollapsed() || n.getFormat() !== t.format || n.getStyle() !== t.style) { + $n(e, fJ, hPs); + } + } + }); +} +function Fzt(i, e) { + const t = i._compositionKey; + _x(null); + if (t !== null && e != null) { + if (e === "") { + const s = iC(t); + const n = _dt(i.getElementByKey(t)); + if (n !== null && n.nodeValue !== null && Po(s)) { + Kzt(s, n.nodeValue, null, null, true); + } + return; + } + if (e[e.length - 1] === ` +`) { + const s = Za(); + if (Oo(s)) { + const n = s.focus; + s.anchor.set(n.key, n.offset, n.type); + $n(i, rU, null); + return; + } + } + } + Gzt(true, i, e); +} +function tir(i, e) { + if (X7) { + use = true; + } else { + tP(e, () => { + Fzt(e, i.data); + }); + } +} +function iir(i, e) { + const { + keyCode: t, + ctrlKey: s, + metaKey: n, + altKey: r + } = i; + if (t === 18 && !r) { + i.preventDefault(); + $n(e, AJt, i); + } else if (Gt ? t === 91 && !n : t === 17 && !s) { + $n(e, ePs, i); + } else if (t === 16) { + $n(e, aPs, i); + } +} +function sir(i, e) { + ase = i.timeStamp; + dJt = i.keyCode; + if (e.isComposing()) { + return; + } + const { + keyCode: t, + shiftKey: s, + ctrlKey: n, + metaKey: r, + altKey: o + } = i; + if ($n(e, oye, i)) { + return; + } + const a = () => { + i.stopPropagation(); + i.preventDefault(); + }; + if (t === 90 && !n && !r && !s) { + i.stopPropagation(); + } else if (t === 13 && (n || r)) { + if ($n(e, f5, i)) { + a(); + } + } else if (t === 8 && (n || r) && !s) { + i.stopPropagation(); + if ($n(e, lye, i)) { + i.preventDefault(); + } + } else if (Gt && t === 67 && n) { + if ($n(e, ETs, i)) { + a(); + } + } else if (t === 67 && n) { + if ($n(e, wTs, i)) { + a(); + } + } else if (t === 87 && (n || r)) { + if ($n(e, GTs, i)) { + a(); + } + } else if (t === 190 && (n || r)) { + if ($n(e, MJt, i)) { + a(); + } + } else if (t === 191 && (n || r) && !s) { + if ($n(e, NJt, i)) { + a(); + } + } else if (t === 191 && (n || r) && s) { + if ($n(e, KTs, i)) { + a(); + } + } else if (t === 16) { + if ($n(e, oPs, i)) { + a(); + } + } else if (t === 75 && (n || r) && s) { + if ($n(e, ATs, i)) { + a(); + } + } else if (t === 68 && (n || r) && s) { + if ($n(e, $Ts, i)) { + a(); + } + } else if (t === 83 && (n || r) && s) { + if ($n(e, FTs, i)) { + a(); + } + } else if (t === 83 && (n || r)) { + if ($n(e, OTs, i)) { + a(); + } + } else if (t === 75 && (n || r)) { + if ($n(e, CTs, i)) { + a(); + } + } else if (t === 89 && (n || r)) { + if ($n(e, STs, i)) { + a(); + } + } else if (t === 68 && (n || r)) { + if ($n(e, xTs, i)) { + a(); + } + } else if (t === 69 && (n || r)) { + if ($n(e, kTs, i)) { + a(); + } + } else if (t === 72 && (n || r)) { + if ($n(e, ITs, i)) { + a(); + } + } else if (t === 49 && (n || r)) { + if ($n(e, EJt, i)) { + a(); + } + } else if (t === 50 && (n || r)) { + if ($n(e, IJt, i)) { + a(); + } + } else if (t === 51 && (n || r)) { + if ($n(e, DJt, i)) { + a(); + } + } else if (t === 52 && (n || r)) { + if ($n(e, DTs, i)) { + a(); + } + } else if (t === 53 && (n || r)) { + if ($n(e, TTs, i)) { + a(); + } + } else if (t === 54 && (n || r)) { + if ($n(e, PTs, i)) { + a(); + } + } else if (t === 55 && (n || r)) { + if ($n(e, LTs, i)) { + a(); + } + } else if (t === 56 && (n || r)) { + if ($n(e, RTs, i)) { + a(); + } + } else if (t === 57 && (n || r)) { + if ($n(e, NTs, i)) { + a(); + } + } else if (t === 48 && (n || r)) { + if ($n(e, MTs, i)) { + a(); + } + } else if (t === 74 && (n || r)) { + if ($n(e, _Ts, i)) { + a(); + } + } else if (t === 76 && (n || r)) { + if ($n(e, VTs, i)) { + a(); + } + } else if (t === 89 && (n && s || r)) { + if ($n(e, BTs, i)) { + a(); + } + } else if (t === 85 && (n || r)) { + if ($n(e, UTs, i)) { + a(); + } + } else if (t === 84 && (n || r)) { + if ($n(e, HTs, i)) { + a(); + } + } else if (t === 80 && (n || r)) { + if ($n(e, qTs, i)) { + a(); + } + } else if (t === 66 && (n || r)) { + if ($n(e, jTs, i)) { + a(); + } + } else if (t === 65 && (n || r)) { + if ($n(e, TJt, i)) { + a(); + } + } else if (t === 73 && (n || r)) { + if ($n(e, WTs, i)) { + a(); + } + } else if (t === 78 && (n || r)) { + if ($n(e, PJt, i)) { + a(); + } + } else if (t === 82 && (n || r)) { + if ($n(e, LJt, i)) { + a(); + } + } else if (t === 77 && (n || r)) { + if ($n(e, zTs, i)) { + a(); + } + } else if (t === 86 && (n || r)) { + if ($n(e, RJt, i)) { + a(); + } + } else if (t === 71 && (n || r)) { + if ($n(e, JTs, i)) { + a(); + } + } else if (t === 219 && (n || r)) { + if ($n(e, YTs, i)) { + a(); + } + } else if (t === 221 && (n || r)) { + if ($n(e, XTs, i)) { + a(); + } + } else if (Qzt(t) && o) { + i.stopPropagation(); + $n(e, xJt, i); + } else if (Zzt(t) && o) { + i.stopPropagation(); + $n(e, kJt, i); + } else if (ysr(t, n, o, r)) { + i.stopPropagation(); + $n(e, wJt, i); + } else if (wsr(t, n, s, o, r)) { + i.stopPropagation(); + $n(e, fTs, i); + } else if (bsr(t, n, o, r)) { + i.stopPropagation(); + $n(e, CJt, i); + } else if (vsr(t, n, s, o, r)) { + i.stopPropagation(); + $n(e, gTs, i); + } else if (Csr(t, n, r)) { + i.stopPropagation(); + $n(e, gJ, i); + } else if (Zzt(t) && (n || r)) { + i.stopPropagation(); + $n(e, pTs, i); + } else if (Qzt(t) && (n || r)) { + i.stopPropagation(); + $n(e, mTs, i); + } else if (Yzt(t) && (n || r)) { + i.stopPropagation(); + $n(e, bTs, i); + } else if (Xzt(t) && (n || r)) { + i.stopPropagation(); + $n(e, vTs, i); + } else if (Ssr(t, n, r)) { + i.stopPropagation(); + $n(e, pJ, i); + } else if (osr(t, s)) { + i.stopPropagation(); + cse = true; + $n(e, rU, i); + } else if (ksr(t)) { + i.stopPropagation(); + $n(e, yTs, i); + } else if (asr(t, n)) { + a(); + cse = true; + $n(e, hJ, true); + } else if (rsr(t, s)) { + i.stopPropagation(); + cse = false; + $n(e, rU, i); + } else if (hsr(t, o, r, n)) { + if (zve(t)) { + i.stopPropagation(); + $n(e, aye, i); + } else { + a(); + $n(e, h5, true); + } + } else if (Esr(t)) { + i.stopPropagation(); + $n(e, oU, i); + } else if (fsr(t, n, s, o, r)) { + if (Jve(t)) { + i.stopPropagation(); + $n(e, SJt, i); + } else { + a(); + $n(e, h5, false); + } + } else if (lsr(t, o, n)) { + a(); + $n(e, hse, true); + } else if (csr(t, o, n)) { + a(); + $n(e, hse, false); + } else if (usr(t, r)) { + i.preventDefault(); + $n(e, sU, true); + } else if (dsr(t, r)) { + a(); + $n(e, sU, false); + } else if (isr(t, o, r, n)) { + a(); + $n(e, nU, "bold"); + } else if (nsr(t, o, r, n)) { + a(); + $n(e, nU, "underline"); + } else if (ssr(t, o, r, n)) { + a(); + $n(e, nU, "italic"); + } else if (tsr(t, o, n, r)) { + $n(e, cye, i); + } else if (gsr(t, s, r, n)) { + a(); + $n(e, nye, undefined); + } else if (psr(t, s, r, n)) { + a(); + $n(e, rye, undefined); + } else if (t === 49 && o) { + if ($n(e, tPs, i)) { + a(); + } + } else if (t === 50 && o) { + if ($n(e, iPs, i)) { + a(); + } + } else if (t === 51 && o) { + if ($n(e, sPs, i)) { + a(); + } + } else if (t === 52 && o) { + if ($n(e, nPs, i)) { + a(); + } + } else if (t === 53 && o) { + if ($n(e, rPs, i)) { + a(); + } + } else if (t === 18 && o) { + if ($n(e, QTs, i)) { + a(); + } + } else if (Gt ? t === 91 && r : t === 17 && n) { + if ($n(e, ZTs, i)) { + a(); + } + } else if (GDs(t, s, r, n)) { + if ($n(e, fse, i)) { + i.stopPropagation(); + } + } else { + const l = e._editorState._selection; + if (Ndt(l)) { + if (msr(t, s, r, n)) { + a(); + $n(e, dye, i); + } else if (GDs(t, s, r, n)) { + a(); + $n(e, fse, i); + } else if (Isr(t, r, n)) { + a(); + e.update(() => { + const c = kp(); + c.select(0, c.getChildrenSize()); + }); + } + } + } + if (xsr(n, s, o, r)) { + $n(e, cPs, i); + } +} +function XIs(i) { + let e = i.__lexicalEventHandles; + if (e === undefined) { + e = []; + i.__lexicalEventHandles = e; + } + return e; +} +function QIs(i) { + const e = js(); + const t = WF(e); + if (t === null) { + return; + } + const s = ODs(t.anchorNode); + if (s === null) { + return; + } + if (Xdt) { + Xdt = false; + tP(s, () => { + const c = Adt(); + const u = t.anchorNode; + if (u === null) { + return; + } + const d = u.nodeType; + if (d !== gse && d !== qF) { + return; + } + const h = jzt(c, t, s); + d5(h); + }); + } + const n = Jzt(s); + const r = n[n.length - 1]; + const o = r._key; + const a = uJ.get(o); + const l = a || r; + if (l !== s) { + KIs(t, l, false); + } + KIs(t, s, true); + if (s !== r) { + uJ.set(o, s); + } else if (a) { + uJ.delete(o); + } +} +function ZIs(i) { + i._lexicalHandled = true; +} +function eDs(i) { + return i._lexicalHandled === true; +} +function nir(i, e) { + if (lse === 0) { + hf().addEventListener("selectionchange", QIs); + } + lse++; + i.__lexicalEditor = e; + const t = XIs(i); + for (let s = 0; s < Kdt.length; s++) { + const [n, r] = Kdt[s]; + const o = typeof r == "function" ? a => { + if (!eDs(a)) { + ZIs(a); + if (e.isEditable()) { + r(a, e); + } + } + } : a => { + if (!eDs(a) && (ZIs(a), e.isEditable())) { + switch (n) { + case "cut": + return $n(e, fse, a); + case "copy": + return $n(e, dye, a); + case "paste": + return $n(e, dse, a); + case "dragstart": + return $n(e, $Jt, a); + case "dragover": + return $n(e, FJt, a); + case "dragend": + return $n(e, lPs, a); + case "focus": + return $n(e, oht, a); + case "blur": + return $n(e, BJt, a); + case "drop": + return $n(e, uye, a); + } + } + }; + i.addEventListener(n, o); + t.push(() => { + i.removeEventListener(n, o); + }); + } +} +function rir(i) { + if (lse !== 0) { + lse--; + if (lse === 0) { + hf().removeEventListener("selectionchange", QIs); + } + } + const e = i.__lexicalEditor; + if (e != null) { + oir(e); + i.__lexicalEditor = null; + } + const t = XIs(i); + for (let s = 0; s < t.length; s++) { + t[s](); + } + i.__lexicalEventHandles = []; +} +function oir(i) { + if (i._parentEditor !== null) { + const e = Jzt(i); + const s = e[e.length - 1]._key; + if (uJ.get(s) === i) { + uJ.delete(s); + } + } else { + uJ.delete(i._key); + } +} +function air() { + Ydt = true; +} +function lir(i, e, t, s, n) { + fJt = [i, e, t, s, n]; +} +function cir(i, e) { + const t = i._decorators; + let n = i._pendingDecorators || t; + const r = e._nodeMap; + let o; + for (o in n) { + if (!r.has(o)) { + if (n === t) { + n = WDs(i); + } + delete n[o]; + } + } +} +function tDs(i, e, t, s, n, r) { + let o = i.getFirstChild(); + while (o !== null) { + const a = o.__key; + if (o.__parent === e) { + if (Or(o)) { + tDs(o, a, t, s, n, r); + } + if (!t.has(a)) { + r.delete(a); + } + n.push(a); + } + o = o.getNextSibling(); + } +} +function uir(i, e, t, s) { + const n = i._nodeMap; + const r = e._nodeMap; + const o = []; + for (const [a] of s) { + const l = r.get(a); + if (l !== undefined) { + if (!l.isAttached()) { + if (Or(l)) { + tDs(l, a, n, r, o, s); + } + if (!n.has(a)) { + s.delete(a); + } + o.push(a); + } + } + } + for (const a of o) { + r.delete(a); + } + for (const a of t) { + const l = r.get(a); + if (l !== undefined && !l.isAttached()) { + if (!n.has(a)) { + t.delete(a); + } + r.delete(a); + } + } +} +function dir() { + return Qdt; +} +function hir(i) { + Zdt = i.timeStamp; +} +function fir(i) { + if (Zdt === 0) { + qdt(i).addEventListener("textInput", hir, true); + } +} +function Ozt(i, e, t) { + return e.__lexicalLineBreak === i || i[`__lexicalKey_${t._key}`] !== undefined; +} +function gir(i) { + return i.getEditorState().read(() => { + const e = Za(); + if (e !== null) { + return e.clone(); + } else { + return null; + } + }); +} +function pir(i, e, t) { + const s = WF(t._window); + let n = null; + let r = null; + if (s !== null && s.anchorNode === i) { + n = s.anchorOffset; + r = s.focusOffset; + } + const o = i.nodeValue; + if (o !== null) { + Kzt(e, o, n, r, false); + } +} +function mir(i, e, t) { + if (Oo(i)) { + const s = i.anchor.getNode(); + if (s.is(t) && i.format !== s.getFormat()) { + return false; + } + } + return e.nodeType === qF && t.isAttached(); +} +function iDs(i, e, t) { + Qdt = true; + const s = performance.now() - Zdt > oTs; + try { + tP(i, () => { + const n = Za() || gir(i); + const r = new Map(); + const o = i.getRootElement(); + const a = i._editorState; + const l = i._blockCursorElement; + let c = false; + let u = ""; + for (let h = 0; h < e.length; h++) { + const g = e[h]; + const p = g.type; + const b = g.target; + let v = Udt(b, a); + if ((v !== null || b === o) && !zm(v)) { + if (p === "characterData") { + if (s && Po(v) && mir(n, b, v)) { + pir(b, v, i); + } + } else if (p === "childList") { + c = true; + const y = g.addedNodes; + for (let S = 0; S < y.length; S++) { + const x = y[S]; + const k = UDs(x); + const E = x.parentNode; + if (E != null && x !== l && k === null && (x.nodeName !== "BR" || !Ozt(x, E, i))) { + if (X7) { + const D = x.innerText || x.nodeValue; + if (D) { + u += D; + } + } + E.removeChild(x); + } + } + const w = g.removedNodes; + const C = w.length; + if (C > 0) { + let S = 0; + for (let x = 0; x < C; x++) { + const k = w[x]; + if (k.nodeName === "BR" && Ozt(k, b, i) || l === k) { + b.appendChild(k); + S++; + } + } + if (C !== S) { + if (b === o) { + v = HDs(a); + } + r.set(b, v); + } + } + } + } + } + if (r.size > 0) { + for (const [h, g] of r) { + if (Or(g)) { + const p = g.getChildrenKeys(); + let b = h.firstChild; + for (let v = 0; v < p.length; v++) { + const y = p[v]; + const w = i.getElementByKey(y); + if (w !== null) { + if (b == null) { + h.appendChild(w); + b = w; + } else if (b !== w) { + h.replaceChild(w, b); + } + b = b.nextSibling; + } + } + } else if (Po(g)) { + g.markDirty(); + } + } + } + const d = t.takeRecords(); + if (d.length > 0) { + for (let h = 0; h < d.length; h++) { + const g = d[h]; + const p = g.addedNodes; + const b = g.target; + for (let v = 0; v < p.length; v++) { + const y = p[v]; + const w = y.parentNode; + if (w != null && y.nodeName === "BR" && !Ozt(y, b, i)) { + w.removeChild(y); + } + } + } + t.takeRecords(); + } + if (n !== null) { + if (c) { + n.dirty = true; + d5(n); + } + if (X7 && XDs(i)) { + n.insertRawText(u); + } + } + }); + } finally { + Qdt = false; + } +} +function sDs(i) { + const e = i._observer; + if (e !== null) { + const t = e.takeRecords(); + iDs(i, t, e); + } +} +function nDs(i) { + fir(i); + i._observer = new MutationObserver((e, t) => { + iDs(i, e, t); + }); +} +function _zt(i, e, t) { + nD(); + const s = i.__key; + const n = i.getParent(); + if (n === null) { + return; + } + const r = Tsr(i); + let o = false; + if (Oo(r) && e) { + const a = r.anchor; + const l = r.focus; + if (a.key === s) { + Fdt(a, i, n, i.getPreviousSibling(), i.getNextSibling()); + o = true; + } + if (l.key === s) { + Fdt(l, i, n, i.getPreviousSibling(), i.getNextSibling()); + o = true; + } + } + if (Oo(r) && e && !o) { + const a = i.getIndexWithinParent(); + lJ(i); + $dt(r, n, a, -1); + } else { + lJ(i); + } + if (!t && !UF(n) && !n.canBeEmpty() && n.isEmpty()) { + _zt(n, e); + } + if (e && dE(n) && n.isEmpty()) { + n.selectEnd(); + } +} +function rDs(i, e) { + const t = i.__mode; + const s = i.__format; + const n = i.__style; + const r = e.__mode; + const o = e.__format; + const a = e.__style; + return (t === null || t === r) && (s === null || s === o) && (n === null || n === a); +} +function oDs(i, e) { + const t = i.mergeWithSibling(e); + const s = jw()._normalizedNodes; + s.add(i.__key); + s.add(e.__key); + return t; +} +function aDs(i) { + let e = i; + if (e.__text === "" && e.isSimpleText() && !e.isUnmergeable()) { + e.remove(); + return; + } + let t; + while ((t = e.getPreviousSibling()) !== null && Po(t) && t.isSimpleText() && !t.isUnmergeable()) { + if (t.__text === "") { + t.remove(); + } else if (rDs(t, e)) { + e = oDs(t, e); + break; + } else { + break; + } + } + let s; + while ((s = e.getNextSibling()) !== null && Po(s) && s.isSimpleText() && !s.isUnmergeable()) { + if (s.__text === "") { + s.remove(); + } else if (rDs(e, s)) { + e = oDs(e, s); + break; + } else { + break; + } + } +} +function bir(i) { + lDs(i.anchor); + lDs(i.focus); + return i; +} +function lDs(i) { + while (i.type === "element") { + const e = i.getNode(); + const t = i.offset; + let s; + let n; + if (t === e.getChildrenSize()) { + s = e.getChildAtIndex(t - 1); + n = true; + } else { + s = e.getChildAtIndex(t); + n = false; + } + if (Po(s)) { + i.set(s.__key, n ? s.getTextContentSize() : 0, "text"); + break; + } else if (!Or(s)) { + break; + } + i.set(s.__key, n ? s.getChildrenSize() : 0, "element"); + } +} +function Pdt(i, e) { + const t = dJ.get(i); + if (e !== null) { + const s = Vzt(i); + if (s.parentNode === e) { + e.removeChild(s); + } + } + if (!iU.has(i)) { + hE._keyToDOMMap.delete(i); + } + if (Or(t)) { + const s = Rdt(t, dJ); + Bzt(s, 0, s.length - 1, null); + } + if (t !== undefined) { + eJt(tye, Zve, tht, t, "destroyed"); + } +} +function Bzt(i, e, t, s) { + let n = e; + for (; n <= t; ++n) { + const r = i[n]; + if (r !== undefined) { + Pdt(r, s); + } + } +} +function oJ(i, e) { + i.setProperty("text-align", e); +} +function cDs(i, e) { + const t = tU.theme.indent; + if (typeof t == "string") { + const n = i.classList.contains(t); + if (e > 0 && !n) { + i.classList.add(t); + } else if (e < 1 && n) { + i.classList.remove(t); + } + } + const s = getComputedStyle(i).getPropertyValue("--lexical-indent-base-value") || aTs; + i.style.setProperty("padding-inline-start", e === 0 ? "" : `calc(${e} * ${s})`); +} +function uDs(i, e) { + const t = i.style; + if (e === 0) { + oJ(t, ""); + } else if (e === mht) { + oJ(t, "left"); + } else if (e === bht) { + oJ(t, "center"); + } else if (e === vht) { + oJ(t, "right"); + } else if (e === yht) { + oJ(t, "justify"); + } else if (e === wht) { + oJ(t, "start"); + } else if (e === Cht) { + oJ(t, "end"); + } +} +function Ldt(i, e, t) { + const s = iU.get(i); + if (s === undefined) { + ta(false, "createNode: node does not exist in nodeMap"); + } + const n = s.createDOM(tU, hE); + kir(i, n, hE); + if (Po(s)) { + n.setAttribute("data-lexical-text", "true"); + } else if (zm(s)) { + n.setAttribute("data-lexical-decorator", "true"); + } + if (Or(s)) { + const r = s.__indent; + const o = s.__size; + if (r !== 0) { + cDs(n, r); + } + if (o !== 0) { + const l = o - 1; + const c = Rdt(s, iU); + vir(c, l, s, n); + } + const a = s.__format; + if (a !== 0) { + uDs(n, a); + } + if (!s.isInline()) { + hDs(null, s, n); + } + if (Wdt(s)) { + zw += jF; + HF += jF; + } + } else { + const r = s.getTextContent(); + if (zm(s)) { + const o = s.decorate(hE, tU); + if (o !== null) { + gDs(i, o); + } + n.contentEditable = "false"; + } else if (Po(s)) { + if (!s.isDirectionless()) { + Ux += r; + } + } + zw += r; + HF += r; + } + if (e !== null) { + if (t != null) { + e.insertBefore(n, t); + } else { + const r = e.__lexicalLineBreak; + if (r != null) { + e.insertBefore(n, r); + } else { + e.appendChild(n); + } + } + } + eJt(tye, Zve, tht, s, "created"); + return n; +} +function vir(i, e, t, s) { + const n = Ux; + Ux = ""; + Uzt(i, t, 0, e, s, null); + fDs(t, s); + Ux = n; +} +function Uzt(i, e, t, s, n, r) { + const o = zw; + zw = ""; + let a = t; + for (; a <= s; ++a) { + Ldt(i[a], n, r); + } + if (Wdt(e)) { + zw += jF; + } + n.__lexicalTextContent = zw; + zw = o + zw; +} +function dDs(i, e) { + const t = e.get(i); + return Jdt(t) || zm(t) && t.isInline(); +} +function hDs(i, e, t) { + const s = i !== null && (i.__size === 0 || dDs(i.__last, dJ)); + const n = e.__size === 0 || dDs(e.__last, iU); + if (s) { + if (!n) { + const r = t.__lexicalLineBreak; + if (r != null) { + t.removeChild(r); + } + t.__lexicalLineBreak = null; + } + } else if (n) { + const r = xt.document.createElement("br"); + t.__lexicalLineBreak = r; + t.appendChild(r); + } +} +function fDs(i, e) { + const t = e.__lexicalDirTextContent; + const s = e.__lexicalDir; + if (t !== Ux || s !== eye) { + const n = Ux === ""; + const r = n ? eye : jir(Ux); + if (r !== s) { + const o = e.classList; + const a = tU.theme; + let l = s !== null ? a[s] : undefined; + let c = r !== null ? a[r] : undefined; + if (l !== undefined) { + if (typeof l == "string") { + const u = l.split(" "); + l = a[s] = u; + } + o.remove(...l); + } + if (r === null || n && r === "ltr") { + e.removeAttribute("dir"); + } else { + if (c !== undefined) { + if (typeof c == "string") { + const u = c.split(" "); + c = a[r] = u; + } + if (c !== undefined) { + o.add(...c); + } + } + e.dir = r; + } + if (!eht) { + const u = i.getWritable(); + u.__dir = r; + } + } + eye = r; + e.__lexicalDirTextContent = Ux; + e.__lexicalDir = r; + } +} +function yir(i, e, t) { + const s = Ux; + Ux = ""; + wir(i, e, t); + fDs(e, t); + Ux = s; +} +function Rdt(i, e) { + const t = []; + let s = i.__first; + while (s !== null) { + const n = e.get(s); + if (n === undefined) { + ta(false, "createChildrenArray: node does not exist in nodeMap"); + } + t.push(s); + s = n.__next; + } + return t; +} +function wir(i, e, t) { + const s = zw; + const n = i.__size; + const r = e.__size; + zw = ""; + if (n === 1 && r === 1) { + const o = i.__first; + const a = e.__first; + if (o === a) { + Hve(o, t); + } else { + const l = Vzt(o); + const c = Ldt(a, null, null); + t.replaceChild(c, l); + Pdt(o, null); + } + } else { + const o = Rdt(i, dJ); + const a = Rdt(e, iU); + if (n === 0) { + if (r !== 0) { + Uzt(a, e, 0, r - 1, t, null); + } + } else if (r === 0) { + if (n !== 0) { + const c = t.__lexicalLineBreak == null; + Bzt(o, 0, n - 1, c ? null : t); + if (c) { + t.textContent = ""; + } + } + } else { + Sir(e, o, a, n, r, t); + } + } + if (Wdt(e)) { + zw += jF; + } + t.__lexicalTextContent = zw; + zw = s + zw; +} +function Hve(i, e) { + const t = dJ.get(i); + let s = iU.get(i); + if (t === undefined || s === undefined) { + ta(false, "reconcileNode: prevNode or nextNode does not exist in nodeMap"); + } + const n = gJt || mJt.has(i) || pJt.has(i); + const r = Vdt(hE, i); + if (t === s && !n) { + if (Or(t)) { + const o = r.__lexicalTextContent; + if (o !== undefined) { + zw += o; + HF += o; + } + const a = r.__lexicalDirTextContent; + if (a !== undefined) { + Ux += a; + } + } else { + const o = t.getTextContent(); + if (Po(t) && !t.isDirectionless()) { + Ux += o; + } + HF += o; + zw += o; + } + return r; + } + if (t !== s && n) { + eJt(tye, Zve, tht, s, "updated"); + } + if (s.updateDOM(t, r, tU)) { + const o = Ldt(i, null, null); + if (e === null) { + ta(false, "reconcileNode: parentDOM is null"); + } + e.replaceChild(o, r); + Pdt(i, null); + return o; + } + if (Or(t) && Or(s)) { + const o = s.__indent; + if (o !== t.__indent) { + cDs(r, o); + } + const a = s.__format; + if (a !== t.__format) { + uDs(r, a); + } + if (n) { + yir(t, s, r); + if (!dE(s) && !s.isInline()) { + hDs(t, s, r); + } + } + if (Wdt(s)) { + zw += jF; + HF += jF; + } + } else { + const o = s.getTextContent(); + if (zm(s)) { + const a = s.decorate(hE, tU); + if (a !== null) { + gDs(i, a); + } + } else if (Po(s) && !s.isDirectionless()) { + Ux += o; + } + zw += o; + HF += o; + } + if (!eht && dE(s) && s.__cachedText !== HF) { + s = s.getWritable(); + s.__cachedText = HF; + } + return r; +} +function gDs(i, e) { + let t = hE._pendingDecorators; + const s = hE._decorators; + if (t === null) { + if (s[i] === e) { + return; + } + t = WDs(hE); + } + t[i] = e; +} +function Cir(i) { + return i.firstChild; +} +function Wzt(i) { + let e = i.nextSibling; + if (e !== null && e === hE._blockCursorElement) { + e = e.nextSibling; + } + return e; +} +function Sir(i, e, t, s, n, r) { + const o = s - 1; + const a = n - 1; + let l; + let c; + let u = Cir(r); + let d = 0; + let h = 0; + while (d <= o && h <= a) { + const b = e[d]; + const v = t[h]; + if (b === v) { + u = Wzt(Hve(v, r)); + d++; + h++; + } else { + if (l === undefined) { + l = new Set(e); + } + if (c === undefined) { + c = new Set(t); + } + const y = c.has(b); + const w = l.has(v); + if (!y) { + u = Wzt(Vzt(b)); + Pdt(b, r); + d++; + } else if (!w) { + Ldt(v, r, u); + h++; + } else { + const C = Vdt(hE, v); + if (C === u) { + u = Wzt(Hve(v, r)); + } else { + if (u != null) { + r.insertBefore(C, u); + } else { + r.appendChild(C); + } + Hve(v, r); + } + d++; + h++; + } + } + } + const g = d > o; + const p = h > a; + if (g && !p) { + const b = t[a + 1]; + const v = b === undefined ? null : hE.getElementByKey(b); + Uzt(t, i, h, a, r, v); + } else if (p && !g) { + Bzt(e, d, o, r); + } +} +function xir(i, e, t, s, n, r) { + zw = ""; + HF = ""; + Ux = ""; + gJt = s === vJ; + eye = null; + hE = t; + tU = t._config; + Zve = t._nodes; + tht = hE._listeners.mutation; + pJt = n; + mJt = r; + dJ = i._nodeMap; + iU = e._nodeMap; + eht = e._readOnly; + bJt = new Map(t._keyToDOMMap); + const o = new Map(); + tye = o; + Hve("root", null); + hE = undefined; + Zve = undefined; + pJt = undefined; + mJt = undefined; + dJ = undefined; + iU = undefined; + tU = undefined; + bJt = undefined; + tye = undefined; + return o; +} +function kir(i, e, t) { + const s = t._keyToDOMMap; + e["__lexicalKey_" + t._key] = i; + s.set(i, e); +} +function Vzt(i) { + const e = bJt.get(i); + if (e === undefined) { + ta(false, "Reconciliation: could not find DOM element for node key %s", i); + } + return e; +} +function nse(i, e, t) { + return new lTs(i, e, t); +} +function Hzt(i, e) { + let t = e.__key; + let s = i.offset; + let n = "element"; + if (Po(e)) { + n = "text"; + const r = e.getTextContentSize(); + if (s > r) { + s = r; + } + } else if (!Or(e)) { + const r = e.getNextSibling(); + if (Po(r)) { + t = r.__key; + s = 0; + n = "text"; + } else { + const o = e.getParent(); + if (o) { + t = o.__key; + s = e.getIndexWithinParent() + 1; + } + } + } + i.set(t, s, n); +} +function pDs(i, e) { + if (Or(e)) { + const t = e.getLastDescendant(); + if (Or(t) || Po(t)) { + Hzt(i, t); + } else { + Hzt(i, e); + } + } else { + Hzt(i, e); + } +} +function mDs(i, e, t, s) { + const n = i.getNode(); + const r = n.getChildAtIndex(i.offset); + const o = Cf(); + const a = dE(n) ? Bx().append(o) : o; + o.setFormat(t); + o.setStyle(s); + if (r === null) { + n.append(a); + } else { + r.insertBefore(a); + } + if (i.is(e)) { + e.set(o.__key, 0, "text"); + } + i.set(o.__key, 0, "text"); +} +function Q7(i, e, t, s) { + i.key = e; + i.offset = t; + i.type = s; +} +function Oo(i) { + return i instanceof iye; +} +function qzt(i) { + return i instanceof cTs; +} +function Ndt(i) { + return i instanceof vJt; +} +function bDs(i) { + const e = i.offset; + if (i.type === "text") { + return e; + } + const t = i.getNode(); + if (e === t.getChildrenSize()) { + return t.getTextContent().length; + } else { + return 0; + } +} +function Mdt(i) { + const e = i.anchor; + const t = i.focus; + if (e.type === "element" && t.type === "element" && e.key === t.key && e.offset === t.offset) { + return [0, 0]; + } else { + return [bDs(e), bDs(t)]; + } +} +function Eir(i) { + const e = i.focus; + const t = i.anchor; + const s = t.key; + const n = t.offset; + const r = t.type; + Q7(t, e.key, e.offset, e.type); + Q7(e, s, n, r); + i._cachedNodes = null; +} +function Iir(i, e, t, s) { + i.modify(e, t, s); +} +function Dir(i, e) { + const t = i.anchor; + const s = i.focus; + const n = t.getNode(); + const r = s.getNode(); + if (n === r && t.type === "text" && s.type === "text") { + const o = t.offset; + const a = s.offset; + const l = o < a; + const c = l ? o : a; + const u = l ? a : o; + const d = u - 1; + if (c !== d) { + const h = n.getTextContent().slice(c, u); + if (!jDs(h)) { + if (e) { + s.offset = d; + } else { + t.offset = d; + } + } + } + } +} +function vDs(i, e, t) { + const s = i; + const r = s.getTextContent().split(/(?=\s)/g); + const o = r.length; + let a = 0; + let l = 0; + for (let u = 0; u < o; u++) { + const d = r[u]; + const h = u === o - 1; + l = a; + a += d.length; + if (e && a === t || a > t || h) { + r.splice(u, 1); + if (h) { + l = undefined; + } + break; + } + } + const c = r.join("").trim(); + if (c === "") { + s.remove(); + } else { + s.setTextContent(c); + s.select(l, l); + } +} +function Tir(i, e, t) { + const s = i.getParent(); + return t === null || s === null || !s.canBeEmpty() || s !== t.getNode(); +} +function yDs(i, e, t, s) { + let n = e; + let r; + if (i.nodeType === gse) { + let o = false; + const a = i.childNodes; + const l = a.length; + if (n === l) { + o = true; + n = l - 1; + } + let c = a[n]; + let u = false; + if (c === s._blockCursorElement) { + c = a[n + 1]; + u = true; + } else if (s._blockCursorElement !== null) { + n--; + } + r = ose(c); + if (Po(r)) { + n = qDs(r, o); + } else { + let d = ose(i); + if (d === null) { + return null; + } + if (Or(d)) { + let h = d.getChildAtIndex(n); + if (Or(h) && Tir(h, n, t)) { + const g = o ? h.getLastDescendant() : h.getFirstDescendant(); + if (g === null) { + d = h; + n = 0; + } else { + h = g; + d = Or(h) ? h : h.getParentOrThrow(); + } + } + if (Po(h)) { + r = h; + d = null; + n = qDs(h, o); + } else if (h !== d && o && !u) { + n++; + } + } else { + const h = d.getIndexWithinParent(); + if (e === 0 && zm(d) && ose(i) === d) { + n = h; + } else { + n = h + 1; + } + d = d.getParentOrThrow(); + } + if (Or(d)) { + return nse(d.__key, n, "element"); + } + } + } else { + r = ose(i); + } + if (Po(r)) { + return nse(r.__key, n, "text"); + } else { + return null; + } +} +function wDs(i, e, t) { + const s = i.offset; + const n = i.getNode(); + if (s === 0) { + const r = n.getPreviousSibling(); + const o = n.getParent(); + if (!e) { + if (Or(r) && !t && r.isInline()) { + i.key = r.__key; + i.offset = r.getChildrenSize(); + i.type = "element"; + } else if (Po(r)) { + i.key = r.__key; + i.offset = r.getTextContent().length; + } + } else if ((t || !e) && r === null && Or(o) && o.isInline()) { + const a = o.getPreviousSibling(); + if (Po(a)) { + i.key = a.__key; + i.offset = a.getTextContent().length; + } + } + } else if (s === n.getTextContent().length) { + const r = n.getNextSibling(); + const o = n.getParent(); + if (e && Or(r) && r.isInline()) { + i.key = r.__key; + i.offset = 0; + i.type = "element"; + } else if ((t || e) && r === null && Or(o) && o.isInline() && !o.canInsertTextAfter()) { + const a = o.getNextSibling(); + if (Po(a)) { + i.key = a.__key; + i.offset = 0; + } + } + } +} +function CDs(i, e, t) { + if (i.type === "text" && e.type === "text") { + const s = i.isBefore(e); + const n = i.is(e); + wDs(i, s, n); + wDs(e, !s, n); + if (n) { + e.key = i.key; + e.offset = i.offset; + e.type = i.type; + } + const r = jw(); + if (r.isComposing() && r._compositionKey !== i.key && Oo(t)) { + const o = t.anchor; + const a = t.focus; + Q7(i, o.key, o.offset, o.type); + Q7(e, a.key, a.offset, a.type); + } + } +} +function SDs(i, e, t, s, n, r) { + if (i === null || t === null || !Odt(n, i, t)) { + return null; + } + const o = yDs(i, e, Oo(r) ? r.anchor : null, n); + if (o === null) { + return null; + } + const a = yDs(t, s, Oo(r) ? r.focus : null, n); + if (a === null) { + return null; + } + if (o.type === "element" && a.type === "element") { + const l = ose(i); + const c = ose(t); + if (zm(l) && zm(c)) { + return null; + } + } + CDs(o, a, r); + return [o, a]; +} +function xDs(i) { + return Or(i) && !i.isInline(); +} +function kDs(i, e, t, s, n, r) { + const o = u5(); + const a = new iye(nse(i, e, n), nse(t, s, r), 0, ""); + a.dirty = true; + o._selection = a; + return a; +} +function EDs() { + return new vJt(new Set()); +} +function Pir(i) { + const t = i.getEditorState()._selection; + const s = WF(i._window); + if (Ndt(t) || qzt(t)) { + return t.clone(); + } else { + return jzt(t, s, i); + } +} +function jzt(i, e, t) { + const s = t._window; + if (s === null) { + return null; + } + const n = s.event; + const r = n ? n.type : undefined; + const o = r === "selectionchange"; + const a = !dir() && (o || r === "beforeinput" || r === "compositionstart" || r === "compositionend" || r === "click" && n && n.detail === 3 || r === "drop" || r === undefined); + let l; + let c; + let u; + let d; + if (!Oo(i) || a) { + if (e === null) { + return null; + } + l = e.anchorNode; + c = e.focusNode; + u = e.anchorOffset; + d = e.focusOffset; + if (o && Oo(i) && !Odt(t, l, c)) { + return i.clone(); + } + } else { + return i.clone(); + } + const h = SDs(l, u, c, d, t, i); + if (h === null) { + return null; + } + const [g, p] = h; + return new iye(g, p, Oo(i) ? i.format : 0, Oo(i) ? i.style : ""); +} +function Za() { + return u5()._selection; +} +function Adt() { + return jw()._editorState._selection; +} +function $dt(i, e, t, s = 1) { + const n = i.anchor; + const r = i.focus; + const o = n.getNode(); + const a = r.getNode(); + if (!e.is(o) && !e.is(a)) { + return; + } + const l = e.__key; + if (i.isCollapsed()) { + const c = n.offset; + if (t <= c && s > 0 || t < c && s < 0) { + const u = Math.max(0, c + s); + n.set(l, u, "element"); + r.set(l, u, "element"); + IDs(i); + } + } else { + const c = i.isBackward(); + const u = c ? r : n; + const d = u.getNode(); + const h = c ? n : r; + const g = h.getNode(); + if (e.is(d)) { + const p = u.offset; + if (t <= p && s > 0 || t < p && s < 0) { + u.set(l, Math.max(0, p + s), "element"); + } + } + if (e.is(g)) { + const p = h.offset; + if (t <= p && s > 0 || t < p && s < 0) { + h.set(l, Math.max(0, p + s), "element"); + } + } + } + IDs(i); +} +function IDs(i) { + const e = i.anchor; + const t = e.offset; + const s = i.focus; + const n = s.offset; + const r = e.getNode(); + const o = s.getNode(); + if (i.isCollapsed()) { + if (!Or(r)) { + return; + } + const a = r.getChildrenSize(); + const l = t >= a; + const c = l ? r.getChildAtIndex(a - 1) : r.getChildAtIndex(t); + if (Po(c)) { + let u = 0; + if (l) { + u = c.getTextContentSize(); + } + e.set(c.__key, u, "text"); + s.set(c.__key, u, "text"); + } + return; + } + if (Or(r)) { + const a = r.getChildrenSize(); + const l = t >= a; + const c = l ? r.getChildAtIndex(a - 1) : r.getChildAtIndex(t); + if (Po(c)) { + let u = 0; + if (l) { + u = c.getTextContentSize(); + } + e.set(c.__key, u, "text"); + } + } + if (Or(o)) { + const a = o.getChildrenSize(); + const l = n >= a; + const c = l ? o.getChildAtIndex(a - 1) : o.getChildAtIndex(n); + if (Po(c)) { + let u = 0; + if (l) { + u = c.getTextContentSize(); + } + s.set(c.__key, u, "text"); + } + } +} +function Lir(i, e) { + const s = e.getEditorState()._selection; + const n = i._selection; + if (Oo(n)) { + const r = n.anchor; + const o = n.focus; + let a; + if (r.type === "text") { + a = r.getNode(); + a.selectionTransform(s, n); + } + if (o.type === "text") { + const l = o.getNode(); + if (a !== l) { + l.selectionTransform(s, n); + } + } + } +} +function Fdt(i, e, t, s, n) { + let r = null; + let o = 0; + let a = null; + if (s !== null) { + r = s.__key; + if (Po(s)) { + o = s.getTextContentSize(); + a = "text"; + } else if (Or(s)) { + o = s.getChildrenSize(); + a = "element"; + } + } else if (n !== null) { + r = n.__key; + if (Po(n)) { + a = "text"; + } else if (Or(n)) { + a = "element"; + } + } + if (r !== null && a !== null) { + i.set(r, o, a); + } else { + o = e.getIndexWithinParent(); + if (o === -1) { + o = t.getChildrenSize(); + } + i.set(t.__key, o, "element"); + } +} +function DDs(i, e, t, s, n) { + if (i.type === "text") { + i.key = t; + if (!e) { + i.offset += n; + } + } else if (i.offset > s.getIndexWithinParent()) { + i.offset -= 1; + } +} +function Rir(i, e, t, s, n, r, o) { + const a = s.anchorNode; + const l = s.focusNode; + const c = s.anchorOffset; + const u = s.focusOffset; + const d = document.activeElement; + if (n.has("collaboration") && d !== r || d !== null && FDs(d)) { + return; + } + if (!Oo(e)) { + if (i !== null && Odt(t, a, l)) { + s.removeAllRanges(); + } + return; + } + const h = e.anchor; + const g = e.focus; + const p = h.key; + const b = g.key; + const v = Vdt(t, p); + const y = Vdt(t, b); + const w = h.offset; + const C = g.offset; + const S = e.format; + const x = e.style; + const k = e.isCollapsed(); + let E = v; + let D = y; + let P = false; + if (h.type === "text") { + E = _dt(v); + const R = h.getNode(); + P = R.getFormat() !== S || R.getStyle() !== x; + } else if (Oo(i) && i.anchor.type === "text") { + P = true; + } + if (g.type === "text") { + D = _dt(y); + } + if (E !== null && D !== null && (k && (i === null || P || Oo(i) && (i.format !== S || i.style !== x)) && lir(S, x, w, p, performance.now()), c !== w || u !== C || a !== E || l !== D || s.type === "Range" && !!k || !((d === null || !r.contains(d)) && r.focus({ + preventScroll: true + }), h.type !== "element"))) { + try { + s.setBaseAndExtent(E, w, D, C); + } catch {} + if (!n.has("skip-scroll-into-view") && e.isCollapsed() && r !== null && r === document.activeElement) { + const R = e instanceof iye && e.anchor.type === "element" ? E.childNodes[w] || null : s.rangeCount > 0 ? s.getRangeAt(0) : null; + if (R !== null) { + let L; + if (R instanceof Text) { + const F = document.createRange(); + F.selectNode(R); + L = F.getBoundingClientRect(); + } else { + L = R.getBoundingClientRect(); + } + Dsr(t, L, r); + } + } + air(); + } +} +function Nir(i, e) { + let t = Za(); + if (t === null) { + t = kp().selectEnd(); + } + return t.insertNodes(i, e); +} +function Mir(i, e, t) { + const s = []; + let n = null; + let r = null; + function o(c, u, d) { + const h = { + cell: d, + startColumn: u, + startRow: c + }; + const g = d.__rowSpan; + const p = d.__colSpan; + for (let b = 0; b < g; b++) { + if (s[c + b] === undefined) { + s[c + b] = []; + } + for (let v = 0; v < p; v++) { + s[c + b][u + v] = h; + } + } + if (e.is(d)) { + n = h; + } + if (t.is(d)) { + r = h; + } + } + function a(c, u) { + return s[c] === undefined || s[c][u] === undefined; + } + const l = i.getChildren(); + for (let c = 0; c < l.length; c++) { + const u = l[c]; + ta(cJt(u), "Expected GridNode children to be GridRowNode"); + const d = u.getChildren(); + let h = 0; + for (const g of d) { + for (ta(Yve(g), "Expected GridRowNode children to be GridCellNode"); !a(c, h);) { + h++; + } + o(c, h, g); + h += g.__colSpan; + } + } + ta(n !== null, "Anchor not found in Grid"); + ta(r !== null, "Focus not found in Grid"); + return [s, n, r]; +} +function rse() { + return fE || sC !== null && sC._readOnly; +} +function nD() { + if (fE) { + ta(false, "Cannot use method in read-only mode."); + } +} +function TDs() { + if (sye > 99) { + ta(false, "One or more transforms are endlessly triggering additional transforms. May have encountered infinite recursion caused by transforms that have their preconditions too lose and/or conflict with each other."); + } +} +function u5() { + if (sC === null) { + ta(false, "Unable to find an active editor state. State helpers or node methods can only be used synchronously during the callback of editor.update() or editorState.read()."); + } + return sC; +} +function jw() { + if (nC === null) { + ta(false, "Unable to find an active editor. This method can only be used synchronously during the callback of editor.update()."); + } + return nC; +} +function Air() { + return nC; +} +function PDs(i, e, t) { + const s = e.__type; + const n = Hir(i, s); + let r = t.get(s); + if (r === undefined) { + r = Array.from(n.transforms); + t.set(s, r); + } + const o = r.length; + for (let a = 0; a < o && (r[a](e), !!e.isAttached()); a++); +} +function LDs(i, e) { + return i !== undefined && i.__key !== e && i.isAttached(); +} +function $ir(i, e) { + const t = e._dirtyLeaves; + const s = i._nodeMap; + for (const n of t) { + const r = s.get(n); + if (Po(r) && r.isAttached() && r.isSimpleText() && !r.isUnmergeable()) { + aDs(r); + } + } +} +function Fir(i, e) { + const t = e._dirtyLeaves; + const s = e._dirtyElements; + const n = i._nodeMap; + const r = Z7(); + const o = new Map(); + let a = t; + let l = a.size; + let c = s; + let u = c.size; + while (l > 0 || u > 0) { + if (l > 0) { + e._dirtyLeaves = new Set(); + for (const d of a) { + const h = n.get(d); + if (Po(h) && h.isAttached() && h.isSimpleText() && !h.isUnmergeable()) { + aDs(h); + } + if (h !== undefined && LDs(h, r)) { + PDs(e, h, o); + } + t.add(d); + } + a = e._dirtyLeaves; + l = a.size; + if (l > 0) { + sye++; + continue; + } + } + e._dirtyLeaves = new Set(); + e._dirtyElements = new Map(); + for (const d of c) { + const h = d[0]; + const g = d[1]; + if (h !== "root" && !g) { + continue; + } + const p = n.get(h); + if (p !== undefined && LDs(p, r)) { + PDs(e, p, o); + } + s.set(h, g); + } + a = e._dirtyLeaves; + l = a.size; + c = e._dirtyElements; + u = c.size; + sye++; + } + e._dirtyLeaves = t; + e._dirtyElements = s; +} +function RDs(i, e) { + const t = i.type; + const s = e.get(t); + if (s === undefined) { + ta(false, "parseEditorState: type \"%s\" + not found", t); + } + const n = s.klass; + if (i.type !== n.getType()) { + ta(false, "LexicalNode: Node %s does not implement .importJSON().", n.name); + } + const r = n.importJSON(i); + const o = i.children; + if (Or(r) && Array.isArray(o)) { + for (let a = 0; a < o.length; a++) { + const l = o[a]; + const c = RDs(l, e); + r.append(c); + } + } + return r; +} +function Oir(i, e, t) { + const s = $zt(); + const n = sC; + const r = fE; + const o = nC; + const a = e._dirtyElements; + const l = e._dirtyLeaves; + const c = e._cloneNotNeeded; + const u = e._dirtyType; + e._dirtyElements = new Map(); + e._dirtyLeaves = new Set(); + e._cloneNotNeeded = new Set(); + e._dirtyType = 0; + sC = s; + fE = false; + nC = e; + try { + const d = e._nodes; + const h = i.root; + RDs(h, d); + if (t) { + t(); + } + s._readOnly = true; + } catch (d) { + if (d instanceof Error) { + e._onError(d); + } + } finally { + e._dirtyElements = a; + e._dirtyLeaves = l; + e._cloneNotNeeded = c; + e._dirtyType = u; + sC = n; + fE = r; + nC = o; + } + return s; +} +function NDs(i, e) { + const t = sC; + const s = fE; + const n = nC; + sC = i; + fE = true; + nC = null; + try { + return e(); + } finally { + sC = t; + fE = s; + nC = n; + } +} +function aJ(i) { + const e = i._pendingEditorState; + const t = i._rootElement; + const s = i._headless || t === null; + if (e === null) { + return; + } + const n = i._editorState; + const r = n._selection; + const o = e._selection; + const a = i._dirtyType !== aU; + const l = sC; + const c = fE; + const u = nC; + const d = i._updating; + const h = i._observer; + let g = null; + i._pendingEditorState = null; + i._editorState = e; + if (!s && a && h !== null) { + nC = i; + sC = e; + fE = false; + i._updating = true; + try { + const k = i._dirtyType; + const E = i._dirtyElements; + const D = i._dirtyLeaves; + h.disconnect(); + g = xir(n, e, i, k, E, D); + } catch (k) { + if (k instanceof Error) { + i._onError(k); + } + if (!iht) { + jIs(i, null, t, e); + nDs(i); + i._dirtyType = vJ; + iht = true; + aJ(i); + iht = false; + } else { + throw k; + } + return; + } finally { + h.observe(t, yJt); + i._updating = d; + sC = l; + fE = c; + nC = u; + } + } + e._readOnly ||= true; + const p = i._dirtyLeaves; + const b = i._dirtyElements; + const v = i._normalizedNodes; + const y = i._updateTags; + const w = i._deferred; + const C = e._nodeMap.size; + if (a) { + i._dirtyType = aU; + i._cloneNotNeeded.clear(); + i._dirtyLeaves = new Set(); + i._dirtyElements = new Map(); + i._normalizedNodes = new Set(); + i._updateTags = new Set(); + } + cir(i, e); + const S = s ? null : WF(i._window); + if (i._editable && S !== null && (a || o === null || o.dirty)) { + nC = i; + sC = e; + try { + if (h !== null) { + h.disconnect(); + } + if (a || o === null || o.dirty) { + const k = i._blockCursorElement; + if (k !== null) { + rJt(k, i, t); + } + Rir(r, o, i, S, y, t, C); + } + Msr(i, t, o); + if (h !== null) { + h.observe(t, yJt); + } + } finally { + nC = u; + sC = l; + } + } + if (g !== null) { + Bir(i, n, e, g, y, p); + } + if (!Oo(o) && o !== null && (r === null || !r.is(o))) { + i.dispatchCommand(sht, undefined); + } + const x = i._pendingDecorators; + if (x !== null) { + i._decorators = x; + i._pendingDecorators = null; + qve("decorator", i, true, x); + } + _ir(i, n, e); + qve("update", i, true, { + dirtyElements: b, + dirtyLeaves: p, + editorState: e, + normalizedNodes: v, + prevEditorState: n, + tags: y + }); + Wir(i, w); + Uir(i); +} +function _ir(i, e, t) { + const s = VDs(e); + const n = VDs(t); + if (s !== n) { + qve("textcontent", i, true, n); + } +} +function Bir(i, e, t, s, n, r) { + const o = Array.from(i._listeners.mutation); + const a = o.length; + for (let l = 0; l < a; l++) { + const [c, u] = o[l]; + const d = s.get(u); + if (d !== undefined) { + c(d, { + dirtyLeaves: r, + updateTags: n + }); + } + } +} +function qve(i, e, t, ...s) { + const n = e._updating; + e._updating = t; + try { + const r = Array.from(e._listeners[i]); + for (let o = 0; o < r.length; o++) { + r[o].apply(null, s); + } + } finally { + e._updating = n; + } +} +function MDs(i, e, t) { + if (i._updating === false || nC !== i) { + let n = false; + i.update(() => { + n = MDs(i, e, t); + }); + return n; + } + const s = Jzt(i); + for (let n = 4; n >= 0; n--) { + for (let r = 0; r < s.length; r++) { + const l = s[r]._commands.get(e); + if (l !== undefined) { + const c = l[n]; + if (c !== undefined) { + const u = Array.from(c); + const d = u.length; + for (let h = 0; h < d; h++) { + if (u[h](t, i) === true) { + return true; + } + } + } + } + } + } + return false; +} +function Uir(i) { + const e = i._updates; + if (e.length !== 0) { + const t = e.shift(); + if (t) { + const [s, n] = t; + $Ds(i, s, n); + } + } +} +function Wir(i, e) { + i._deferred = []; + if (e.length !== 0) { + const t = i._updating; + i._updating = true; + try { + for (let s = 0; s < e.length; s++) { + e[s](); + } + } finally { + i._updating = t; + } + } +} +function ADs(i, e) { + const t = i._updates; + let s = e || false; + while (t.length !== 0) { + const n = t.shift(); + if (n) { + const [r, o] = n; + let a; + let l; + if (o !== undefined) { + a = o.onUpdate; + l = o.tag; + if (o.skipTransforms) { + s = true; + } + if (a) { + i._deferred.push(a); + } + if (l) { + i._updateTags.add(l); + } + } + r(); + } + } + return s; +} +function $Ds(i, e, t) { + const s = i._updateTags; + let n; + let r; + let o = false; + let a = false; + if (t !== undefined) { + n = t.onUpdate; + r = t.tag; + if (r != null) { + s.add(r); + } + o = t.skipTransforms || false; + a = t.discrete || false; + } + if (n) { + i._deferred.push(n); + } + const l = i._editorState; + let c = i._pendingEditorState; + let u = false; + if (c === null || c._readOnly) { + c = i._pendingEditorState = Jtr(c || l); + u = true; + } + c._flushSync = a; + const d = sC; + const h = fE; + const g = nC; + const p = i._updating; + sC = c; + fE = false; + i._updating = true; + nC = i; + try { + if (u) { + if (i._headless) { + if (l._selection != null) { + c._selection = l._selection.clone(); + } + } else { + c._selection = Pir(i); + } + } + const v = i._compositionKey; + e(); + o = ADs(i, o); + Lir(c, i); + if (i._dirtyType !== aU) { + if (o) { + $ir(c, i); + } else { + Fir(c, i); + } + ADs(i); + uir(l, c, i._dirtyLeaves, i._dirtyElements); + } + const y = i._compositionKey; + if (v !== y) { + c._flushSync = true; + } + const w = c._selection; + if (Oo(w)) { + const C = c._nodeMap; + const S = w.anchor.key; + const x = w.focus.key; + if (C.get(S) === undefined || C.get(x) === undefined) { + ta(false, "updateEditor: selection has been lost because the previously selected nodes have been removed and selection wasn't moved to another node. Ensure selection changes after removing/replacing a selected node."); + } + } else if (Ndt(w) && w._nodes.size === 0) { + c._selection = null; + } + } catch (v) { + if (v instanceof Error) { + i._onError(v); + } + i._pendingEditorState = l; + i._dirtyType = vJ; + i._cloneNotNeeded.clear(); + i._dirtyLeaves = new Set(); + i._dirtyElements.clear(); + aJ(i); + return; + } finally { + sC = d; + fE = h; + nC = g; + i._updating = p; + sye = 0; + } + if (i._dirtyType !== aU || ztr(c, i)) { + if (c._flushSync) { + c._flushSync = false; + aJ(i); + } else if (u) { + dTs(() => { + aJ(i); + }); + } + } else { + c._flushSync = false; + if (u) { + s.clear(); + i._deferred = []; + i._pendingEditorState = null; + } + } +} +function tP(i, e, t) { + if (i._updating) { + i._updates.push([e, t]); + } else { + $Ds(i, e, t); + } +} +function Vir() { + return "" + uTs++; +} +function Hir(i, e) { + const t = i._nodes.get(e); + if (t === undefined) { + ta(false, "registeredNode: Type %s not found", e); + } + return t; +} +function qir(i) { + return zm(Udt(i)); +} +function FDs(i) { + const e = document.activeElement; + if (e === null) { + return false; + } + const t = e.nodeName; + return zm(Udt(i)) && (t === "INPUT" || t === "TEXTAREA" || e.contentEditable === "true" && e.__lexicalEditor == null); +} +function Odt(i, e, t) { + const s = i.getRootElement(); + try { + return s !== null && s.contains(e) && s.contains(t) && e !== null && !FDs(e) && ODs(e) === i; + } catch { + return false; + } +} +function ODs(i) { + let e = i; + while (e != null) { + const t = e.__lexicalEditor; + if (t != null) { + return t; + } + e = Hdt(e); + } + return null; +} +function jir(i) { + if (fPs.test(i)) { + return "rtl"; + } else if (gPs.test(i)) { + return "ltr"; + } else { + return null; + } +} +function zzt(i) { + return i.isToken() || i.isSegmented(); +} +function zir(i) { + return i.nodeType === qF; +} +function _dt(i) { + let e = i; + while (e != null) { + if (zir(e)) { + return e; + } + e = e.firstChild; + } + return null; +} +function _Ds(i, e, t) { + const s = lU[e]; + if (i & s && (t === null || !(t & s))) { + return i ^ s; + } else if (t === null || t & s) { + return i | s; + } else { + return i; + } +} +function Jir(i) { + return Po(i) || Jdt(i) || zm(i); +} +function BDs(i, e) { + if (e != null) { + i.__key = e; + return; + } + nD(); + TDs(); + const t = jw(); + const s = u5(); + const n = Vir(); + s._nodeMap.set(n, i); + if (Or(i)) { + t._dirtyElements.set(n, true); + } else { + t._dirtyLeaves.add(n); + } + t._cloneNotNeeded.add(n); + t._dirtyType = UJt; + i.__key = n; +} +function Gir(i, e, t) { + let s = i; + while (s !== null) { + if (t.has(s)) { + return; + } + const n = e.get(s); + if (n === undefined) { + break; + } + t.set(s, false); + s = n.__parent; + } +} +function lJ(i) { + const e = i.getParent(); + if (e !== null) { + const t = i.getWritable(); + const s = e.getWritable(); + const n = i.getPreviousSibling(); + const r = i.getNextSibling(); + if (n === null) { + if (r !== null) { + const o = r.getWritable(); + s.__first = r.__key; + o.__prev = null; + } else { + s.__first = null; + } + } else { + const o = n.getWritable(); + if (r !== null) { + const a = r.getWritable(); + a.__prev = o.__key; + o.__next = a.__key; + } else { + o.__next = null; + } + t.__prev = null; + } + if (r === null) { + if (n !== null) { + const o = n.getWritable(); + s.__last = n.__key; + o.__next = null; + } else { + s.__last = null; + } + } else { + const o = r.getWritable(); + if (n !== null) { + const a = n.getWritable(); + a.__next = o.__key; + o.__prev = a.__key; + } else { + o.__prev = null; + } + t.__next = null; + } + s.__size--; + t.__parent = null; + } +} +function Bdt(i) { + TDs(); + const e = i.getLatest(); + const t = e.__parent; + const s = u5(); + const n = jw(); + const r = s._nodeMap; + const o = n._dirtyElements; + if (t !== null) { + Gir(t, r, o); + } + const a = e.__key; + n._dirtyType = UJt; + if (Or(i)) { + o.set(a, true); + } else { + n._dirtyLeaves.add(a); + } +} +function Kir(i) { + const e = i.getPreviousSibling(); + const t = i.getNextSibling(); + if (e !== null) { + Bdt(e); + } + if (t !== null) { + Bdt(t); + } +} +function _x(i) { + nD(); + const e = jw(); + const t = e._compositionKey; + if (i !== t) { + e._compositionKey = i; + if (t !== null) { + const s = iC(t); + if (s !== null) { + s.getWritable(); + } + } + if (i !== null) { + const s = iC(i); + if (s !== null) { + s.getWritable(); + } + } + } +} +function Z7() { + if (rse()) { + return null; + } else { + return jw()._compositionKey; + } +} +function iC(i, e) { + const s = (e || u5())._nodeMap.get(i); + if (s === undefined) { + return null; + } else { + return s; + } +} +function UDs(i, e) { + const t = jw(); + const s = i[`__lexicalKey_${t._key}`]; + if (s !== undefined) { + return iC(s, e); + } else { + return null; + } +} +function Udt(i, e) { + let t = i; + while (t != null) { + const s = UDs(t, e); + if (s !== null) { + return s; + } + t = Hdt(t); + } + return null; +} +function WDs(i) { + const e = i._decorators; + const t = Object.assign({}, e); + i._pendingDecorators = t; + return t; +} +function VDs(i) { + return i.read(() => kp().getTextContent()); +} +function Yir(i, e) { + tP(i, () => { + const t = u5(); + if (t.isEmpty()) { + return; + } + if (e === "root") { + kp().markDirty(); + return; + } + const s = t._nodeMap; + for (const [, n] of s) { + n.markDirty(); + } + }, i._pendingEditorState === null ? { + tag: "history-merge" + } : undefined); +} +function kp() { + return HDs(u5()); +} +function HDs(i) { + return i._nodeMap.get("root"); +} +function d5(i) { + nD(); + const e = u5(); + if (i !== null) { + i.dirty = true; + i._cachedNodes = null; + } + e._selection = i; +} +function Xir() { + nD(); + const i = jw(); + sDs(i); +} +function ose(i) { + const e = jw(); + const t = Qir(i, e); + if (t === null) { + const s = e.getRootElement(); + if (i === s) { + return iC("root"); + } else { + return null; + } + } + return iC(t); +} +function qDs(i, e) { + if (e) { + return i.getTextContentSize(); + } else { + return 0; + } +} +function Qir(i, e) { + let t = i; + while (t != null) { + const s = t[`__lexicalKey_${e._key}`]; + if (s !== undefined) { + return s; + } + t = Hdt(t); + } + return null; +} +function jDs(i) { + return /[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(i); +} +function Jzt(i) { + const e = []; + let t = i; + while (t !== null) { + e.push(t); + t = t._parentEditor; + } + return e; +} +function zDs() { + return Math.random().toString(36).replace(/[^a-z]+/g, "").substr(0, 5); +} +function JDs(i) { + if (i.nodeType === qF) { + return i.nodeValue; + } else { + return null; + } +} +function Gzt(i, e, t) { + const s = WF(e._window); + if (s === null) { + return; + } + const n = s.anchorNode; + let { + anchorOffset: r, + focusOffset: o + } = s; + if (n !== null) { + let a = JDs(n); + const l = Udt(n); + if (a !== null && Po(l)) { + if (a === pye && t) { + const c = t.length; + a = t; + r = c; + o = c; + } + if (a !== null) { + Kzt(l, a, r, o, i); + } + } + } +} +function Kzt(i, e, t, s, n) { + let r = i; + if (r.isAttached() && (n || !r.isDirty())) { + const o = r.isComposing(); + let a = e; + if ((o || n) && e[e.length - 1] === pye) { + a = e.slice(0, -1); + } + const l = r.getTextContent(); + if (n || a !== l) { + if (a === "") { + _x(null); + if (!Uve && !Wve && !Vve) { + const b = jw(); + setTimeout(() => { + b.update(() => { + if (r.isAttached()) { + r.remove(); + } + }); + }, 20); + } else { + r.remove(); + } + return; + } + const c = r.getParent(); + const u = Adt(); + const d = r.getTextContentSize(); + const h = Z7(); + const g = r.getKey(); + if (r.isToken() || h !== null && g === h && !o || Oo(u) && (c !== null && !c.canInsertTextBefore() && u.anchor.offset === 0 || u.anchor.key === i.__key && u.anchor.offset === 0 && !r.canInsertTextBefore() || u.focus.key === i.__key && u.focus.offset === d && !r.canInsertTextAfter())) { + r.markDirty(); + return; + } + const p = Za(); + if (!Oo(p) || t === null || s === null) { + r.setTextContent(a); + return; + } + p.setTextNodeRange(r, t, r, s); + if (r.isSegmented()) { + const b = r.getTextContent(); + const v = Cf(b); + r.replace(v); + r = v; + } + r.setTextContent(a); + } + } +} +function Zir(i) { + const e = i.getPreviousSibling(); + return (Po(e) || Or(e) && e.isInline()) && !e.canInsertTextAfter(); +} +function esr(i, e) { + if (e.isSegmented()) { + return true; + } + if (!i.isCollapsed()) { + return false; + } + const t = i.anchor.offset; + const s = e.getParentOrThrow(); + const n = e.isToken(); + if (t === 0) { + return !e.canInsertTextBefore() || !s.canInsertTextBefore() || n || Zir(e); + } else if (t === e.getTextContentSize()) { + return !e.canInsertTextAfter() || !s.canInsertTextAfter() || n; + } else { + return false; + } +} +function tsr(i, e, t, s) { + return i === 9 && !e && !t && !s; +} +function isr(i, e, t, s) { + return i === 66 && !e && jve(t, s); +} +function ssr(i, e, t, s) { + return i === 73 && !e && jve(t, s); +} +function nsr(i, e, t, s) { + return i === 85 && !e && jve(t, s); +} +function rsr(i, e) { + return KDs(i) && !e; +} +function osr(i, e) { + return KDs(i) && e; +} +function asr(i, e) { + return gR && e && i === 79; +} +function lsr(i, e, t) { + return zve(i) && (gR ? e : t); +} +function csr(i, e, t) { + return Jve(i) && (gR ? e : t); +} +function usr(i, e) { + return gR && e && zve(i); +} +function dsr(i, e) { + return gR && e && Jve(i); +} +function hsr(i, e, t, s) { + if (gR) { + if (e || t) { + return false; + } else { + return zve(i) || i === 72 && s; + } + } else if (s || e || t) { + return false; + } else { + return zve(i); + } +} +function fsr(i, e, t, s, n) { + if (gR) { + if (t || s || n) { + return false; + } else { + return Jve(i) || i === 68 && e; + } + } else if (e || s || n) { + return false; + } else { + return Jve(i); + } +} +function gsr(i, e, t, s) { + return i === 90 && !e && jve(t, s); +} +function psr(i, e, t, s) { + if (gR) { + return i === 90 && t && e; + } else { + return i === 89 && s || i === 90 && s && e; + } +} +function msr(i, e, t, s) { + if (e) { + return false; + } else if (i === 67) { + if (gR) { + return t; + } else { + return s; + } + } else { + return false; + } +} +function GDs(i, e, t, s) { + if (e) { + return false; + } else if (i === 88) { + if (gR) { + return t; + } else { + return s; + } + } else { + return false; + } +} +function Yzt(i) { + return i === 37; +} +function Xzt(i) { + return i === 39; +} +function Qzt(i) { + return i === 38; +} +function Zzt(i) { + return i === 40; +} +function bsr(i, e, t, s) { + return Yzt(i) && !e && !s && !t; +} +function vsr(i, e, t, s, n) { + return Yzt(i) && !s && !t && (e || n); +} +function ysr(i, e, t, s) { + return Xzt(i) && !e && !s && !t; +} +function wsr(i, e, t, s, n) { + return Xzt(i) && !s && !t && (e || n); +} +function Csr(i, e, t) { + return Qzt(i) && !e && !t; +} +function Ssr(i, e, t) { + return Zzt(i) && !e && !t; +} +function xsr(i, e, t, s) { + return i || e || t || s; +} +function ksr(i) { + return i === 32; +} +function jve(i, e) { + if (gR) { + return i; + } else { + return e; + } +} +function KDs(i) { + return i === 13; +} +function zve(i) { + return i === 8; +} +function Esr(i) { + return i === 27; +} +function Jve(i) { + return i === 46; +} +function Isr(i, e, t) { + return i === 65 && jve(e, t); +} +function Gve(i, e) { + const t = i[e]; + if (typeof t == "string") { + const s = t.split(" "); + i[e] = s; + return s; + } + return t; +} +function eJt(i, e, t, s, n) { + if (t.size === 0) { + return; + } + const r = s.__type; + const o = s.__key; + const a = e.get(r); + if (a === undefined) { + ta(false, "Type %s not in registeredNodes", r); + } + const l = a.klass; + let c = i.get(l); + if (c === undefined) { + c = new Map(); + i.set(l, c); + } + const u = c.get(o); + const d = u === "destroyed" && n === "created"; + if (u === undefined || d) { + c.set(o, d ? "updated" : n); + } +} +function YDs(i, e, t) { + const s = i.getParent(); + let n = t; + let r = i; + if (s !== null) { + if (e && t === 0) { + n = r.getIndexWithinParent(); + r = s; + } else if (!e && t === r.getChildrenSize()) { + n = r.getIndexWithinParent() + 1; + r = s; + } + } + return r.getChildAtIndex(e ? n - 1 : n); +} +function tJt(i, e) { + const t = i.offset; + if (i.type === "element") { + const s = i.getNode(); + return YDs(s, e, t); + } else { + const s = i.getNode(); + if (e && t === 0 || !e && t === s.getTextContentSize()) { + const n = e ? s.getPreviousSibling() : s.getNextSibling(); + if (n === null) { + return YDs(s.getParentOrThrow(), e, s.getIndexWithinParent() + (e ? 0 : 1)); + } else { + return n; + } + } + } + return null; +} +function XDs(i) { + const e = qdt(i).event; + const t = e && e.inputType; + return t === "insertFromPaste" || t === "insertFromPasteAsQuotation"; +} +function $n(i, e, t) { + return MDs(i, e, t); +} +function Wdt(i) { + return !dE(i) && !i.isLastChild() && !i.isInline(); +} +function Vdt(i, e) { + const t = i._keyToDOMMap.get(e); + if (t === undefined) { + ta(false, "Reconciliation: could not find DOM element for node key %s", e); + } + return t; +} +function Hdt(i) { + const e = i.assignedSlot || i.parentElement; + if (e !== null && e.nodeType === 11) { + return e.host; + } else { + return e; + } +} +function Dsr(i, e, t) { + const s = hf(); + const n = s.defaultView; + if (n === null) { + return; + } + let { + top: r, + bottom: o + } = e; + let a = 0; + let l = 0; + let c = t; + while (c !== null) { + const u = c === s.body; + if (u) { + a = 0; + l = qdt(i).innerHeight; + } else { + const h = c.getBoundingClientRect(); + a = h.top; + l = h.bottom; + } + let d = 0; + if (r < a) { + d = -(a - r); + } else if (o > l) { + d = o - l; + } + if (d !== 0) { + if (u) { + n.scrollBy(0, d); + } else { + const h = c.scrollTop; + c.scrollTop += d; + const g = c.scrollTop - h; + r -= g; + o -= g; + } + } + if (u) { + break; + } + c = Hdt(c); + } +} +function Tsr(i, e = 0) { + if (e !== 0) { + ta(false, "TODO"); + } + const t = Za(); + if (!Oo(t) || !Or(i)) { + return t; + } + const { + anchor: s, + focus: n + } = t; + const r = s.getNode(); + const o = n.getNode(); + if (iJt(r, i)) { + s.set(i.__key, 0, "element"); + } + if (iJt(o, i)) { + n.set(i.__key, 0, "element"); + } + return t; +} +function iJt(i, e) { + let t = i.getParent(); + while (t !== null) { + if (t.is(e)) { + return true; + } + t = t.getParent(); + } + return false; +} +function Psr(i) { + const e = hf(); + return e && e.defaultView || null; +} +function qdt(i) { + const e = i._window; + if (e === null) { + ta(false, "window object not found"); + } + return e; +} +function Lsr(i) { + let e = i.getParentOrThrow(); + while (e !== null) { + if (UF(e)) { + return e; + } + e = e.getParentOrThrow(); + } + return e; +} +function UF(i) { + return dE(i) || Or(i) && i.isShadowRoot(); +} +function Rsr(i) { + const e = i.constructor.clone(i); + BDs(e, null); + return e; +} +function jdt(i) { + const e = jw(); + const t = i.constructor.getType(); + const s = e._nodes.get(t); + if (s === undefined) { + ta(false, "$initializeNode failed. Ensure node has been registered to the editor. You can do this by passing the node class via the \"nodes\" array in the editor config."); + } + const n = s.replace; + if (n !== null) { + const r = n(i); + if (!(r instanceof i.constructor)) { + ta(false, "$initializeNode failed. Ensure replacement node is a subclass of the original node."); + } + return r; + } + return i; +} +function sJt(i, e) { + const t = i.getParent(); + if (dE(t) && !Or(e) && !zm(e)) { + ta(false, "Only element or decorator nodes can be inserted in to the root node"); + } +} +function Nsr(i) { + const e = i.theme; + const t = xt.document.createElement("div"); + t.contentEditable = "false"; + t.setAttribute("data-lexical-cursor", "true"); + let s = e.blockCursor; + if (s !== undefined) { + if (typeof s == "string") { + const n = s.split(" "); + s = e.blockCursor = n; + } + if (s !== undefined) { + t.classList.add(...s); + } + } + return t; +} +function nJt(i) { + return (zm(i) || Or(i) && !i.canBeEmpty()) && !i.isInline(); +} +function rJt(i, e, t) { + t.style.removeProperty("caret-color"); + e._blockCursorElement = null; + const s = i.parentElement; + if (s !== null) { + s.removeChild(i); + } +} +function Msr(i, e, t) { + let s = i._blockCursorElement; + if (Oo(t) && t.isCollapsed() && t.anchor.type === "element" && e.contains(document.activeElement)) { + const n = t.anchor; + const r = n.getNode(); + const o = n.offset; + const a = r.getChildrenSize(); + let l = false; + let c = null; + if (o === a) { + const u = r.getChildAtIndex(o - 1); + if (nJt(u)) { + l = true; + } + } else { + const u = r.getChildAtIndex(o); + if (nJt(u)) { + const d = u.getPreviousSibling(); + if (d === null || nJt(d)) { + l = true; + c = i.getElementByKey(u.__key); + } + } + } + if (l) { + const u = i.getElementByKey(r.__key); + if (s === null) { + i._blockCursorElement = s = Nsr(i._config); + } + e.style.caretColor = "transparent"; + if (c === null) { + u.appendChild(s); + } else { + u.insertBefore(s, c); + } + return; + } + } + if (s !== null) { + rJt(s, i, e); + } +} +function WF(i) { + if (BF) { + return (i || window).getSelection(); + } else { + return null; + } +} +function Asr(i, e) { + let t = i.getChildAtIndex(e); + if (t == null) { + t = i; + } + ta(!UF(i), "Can not call $splitNode() on root element"); + const s = o => { + const a = o.getParentOrThrow(); + const l = UF(a); + const c = o === t && !l ? o : Rsr(o); + if (l) { + o.insertAfter(c); + return [o, c, c]; + } + { + const [u, d, h] = s(a); + const g = o.getNextSiblings(); + h.append(c, ...g); + return [u, d, c]; + } + }; + const [n, r] = s(t); + return [n, r]; +} +function QDs(i, e) { + let t = i; + while (t !== kp() && t != null) { + if (e(t)) { + return t; + } + t = t.getParent(); + } + return null; +} +function $sr(i) { + const e = []; + const t = [i]; + while (t.length > 0) { + const s = t.pop(); + ta(s !== undefined, "Stack.length > 0; can't be undefined"); + if (Or(s)) { + t.unshift(...s.getChildren()); + } + if (s !== i) { + e.push(s); + } + } + return e; +} +function mr(i) { + return {}; +} +function oJt(i, e) { + if (e & dht) { + return "code"; + } else if (e & ght) { + return "mark"; + } else if (e & hht) { + return "sub"; + } else if (e & fht) { + return "sup"; + } else { + return null; + } +} +function aJt(i, e) { + if (e & cht) { + return "strong"; + } else if (e & uht) { + return "em"; + } else { + return "span"; + } +} +function ZDs(i, e, t, s, n) { + const r = s.classList; + let o = Gve(n, "base"); + if (o !== undefined) { + r.add(...o); + } + o = Gve(n, "underlineStrikethrough"); + let a = false; + const l = e & fye && e & hye; + const c = t & fye && t & hye; + if (o !== undefined) { + if (c) { + a = true; + if (!l) { + r.add(...o); + } + } else if (l) { + r.remove(...o); + } + } + for (const u in lU) { + const h = lU[u]; + o = Gve(n, u); + if (o !== undefined) { + if (t & h) { + if (a && (u === "underline" || u === "strikethrough")) { + if (e & h) { + r.remove(...o); + } + continue; + } + if (!(e & h) || l && u === "underline" || u === "strikethrough") { + r.add(...o); + } + } else if (e & h) { + r.remove(...o); + } + } + } +} +function Fsr(i, e) { + const t = i.length; + const s = e.length; + let n = 0; + let r = 0; + while (n < t && n < s && i[n] === e[n]) { + n++; + } + while (r + n < t && r + n < s && i[t - r - 1] === e[s - r - 1]) { + r++; + } + return [n, t - n - r, e.slice(n, s - r)]; +} +function eTs(i, e, t) { + const s = e.firstChild; + const n = t.isComposing(); + const o = i + (n ? pye : ""); + if (s == null) { + e.textContent = o; + } else { + const a = s.nodeValue; + if (a !== o) { + if (n || X7) { + const [l, c, u] = Fsr(a, o); + if (c !== 0) { + s.deleteData(l, c); + } + s.insertData(l, u); + } else { + s.nodeValue = o; + } + } + } +} +function tTs(i, e, t, s, n, r) { + eTs(n, i, e); + const a = r.theme.text; + if (a !== undefined) { + ZDs(t, 0, s, i, a); + } +} +function zdt(i, e) { + const t = xt.document.createElement(e); + t.appendChild(i); + return t; +} +function Osr(i) { + const e = i; + const t = e.style.fontWeight === "700"; + const s = e.style.textDecoration === "line-through"; + const n = e.style.fontStyle === "italic"; + const r = e.style.textDecoration === "underline"; + const o = e.style.verticalAlign; + return { + forChild: a => { + if (Po(a)) { + if (t) { + a.toggleFormat("bold"); + } + if (s) { + a.toggleFormat("strikethrough"); + } + if (n) { + a.toggleFormat("italic"); + } + if (r) { + a.toggleFormat("underline"); + } + if (o === "sub") { + a.toggleFormat("subscript"); + } + if (o === "super") { + a.toggleFormat("superscript"); + } + } + return a; + }, + node: null + }; +} +function _sr(i) { + const t = i.style.fontWeight === "normal"; + return { + forChild: s => { + if (Po(s) && !t) { + s.toggleFormat("bold"); + } + return s; + }, + node: null + }; +} +function Bsr(i) { + return i.nodeName === "PRE" || i.nodeType === gse && i.style.whiteSpace.startsWith("pre"); +} +function Usr(i) { + let e; + let t = i.parentNode; + const s = [i]; + while (t !== null && (e = zJt.get(t)) === undefined && !Bsr(t)) { + s.push(t); + t = t.parentNode; + } + const n = e === undefined ? t : e; + for (let r = 0; r < s.length; r++) { + zJt.set(s[r], n); + } + return n; +} +function Wsr(i) { + const e = i; + const t = i.parentElement; + ta(t !== null, "Expected parentElement of Text not to be null"); + let s = e.textContent || ""; + if (Usr(e) !== null) { + const n = s.split(/(\r?\n|\t)/); + const r = []; + const o = n.length; + for (let a = 0; a < o; a++) { + const l = n[a]; + if (l === ` +` || l === `\r +`) { + r.push(Kve()); + } else if (l === "\t") { + r.push(lJt()); + } else if (l !== "") { + r.push(Cf(l)); + } + } + return { + node: r + }; + } + s = s.replace(/\r?\n|\t/gm, " ").replace("\r", "").replace(/\s+/g, " "); + if (s === "") { + return { + node: null + }; + } + if (s[0] === " ") { + let n = e; + let r = true; + while (n !== null && (n = iTs(n, false)) !== null) { + const o = n.textContent || ""; + if (o.length > 0) { + if (o.match(/(?:\s|\r?\n|\t)$/)) { + s = s.slice(1); + } + r = false; + break; + } + } + if (r) { + s = s.slice(1); + } + } + if (s[s.length - 1] === " ") { + let n = e; + let r = true; + while (n !== null && (n = iTs(n, true)) !== null) { + if ((n.textContent || "").replace(/^[\s|\r?\n|\t]+/, "").length > 0) { + r = false; + break; + } + } + if (r) { + s = s.slice(0, s.length - 1); + } + } + if (s === "") { + return { + node: null + }; + } else { + return { + node: Cf(s) + }; + } +} +function iTs(i, e) { + let t = i; + while (true) { + let s; + while ((s = e ? t.nextSibling : t.previousSibling) === null) { + const r = t.parentElement; + if (r === null) { + return null; + } + t = r; + } + t = s; + if (t.nodeType === gse) { + const r = t.style.display; + if (r === "" && t.nodeName.match(yPs) === null || r !== "" && !r.startsWith("inline")) { + return null; + } + } + let n = t; + while ((n = e ? t.firstChild : t.lastChild) !== null) { + t = n; + } + if (t.nodeType === qF) { + return t; + } + if (t.nodeName === "BR") { + return null; + } + } +} +function eU(i) { + const e = wPs[i.nodeName.toLowerCase()]; + if (e === undefined) { + return { + node: null + }; + } else { + return { + forChild: t => { + if (Po(t) && !t.hasFormat(e)) { + t.toggleFormat(e); + } + return t; + }, + node: null + }; + } +} +function Cf(i = "") { + return jdt(new yJ(i)); +} +function Po(i) { + return i instanceof yJ; +} +function lJt() { + return jdt(new JJt()); +} +function Or(i) { + return i instanceof wJ; +} +function sTs(i, e, t) { + let s = i.getNode(); + while (s) { + const n = s.__key; + if (e.has(n) && !t.has(n)) { + return true; + } + s = s.getParent(); + } + return false; +} +function Vsr(i) { + return { + node: Kve() + }; +} +function Kve() { + return jdt(new Sht()); +} +function Jdt(i) { + return i instanceof Sht; +} +function cJt(i) { + return i instanceof CPs; +} +function Yve(i) { + return i instanceof SPs; +} +function Hsr(i) { + return i instanceof xPs; +} +function zm(i) { + return i instanceof kPs; +} +function qsr() { + return new xht(); +} +function dE(i) { + return i instanceof xht; +} +function jsr(i) { + const e = Bx(); + if (i.style) { + e.setFormat(i.style.textAlign); + const t = parseInt(i.style.textIndent, 10) / 20; + if (t > 0) { + e.setIndent(t); + } + } + return { + node: e + }; +} +function Bx() { + return jdt(new CJ()); +} +function nTs(i) { + return i instanceof CJ; +} +var Cm; +var hS; +var Xve; +var pR; +var rTs; +var uJt; +var VF; +var Gdt; +var Kdt; +var ase; +var dJt; +var hJt; +var cJ; +var lse; +var Ydt; +var Xdt; +var cse; +var use; +var fJt; +var uJ; +var oTs; +var Qdt; +var Zdt; +var Qve; +var zw; +var Ux; +var HF; +var tU; +var hE; +var Zve; +var gJt; +var eht; +var tht; +var eye; +var pJt; +var mJt; +var dJ; +var iU; +var bJt; +var tye; +var aTs; +var lTs; +var vJt; +var cTs; +var iye; +var sC; +var nC; +var fE; +var iht; +var sye; +var yJt; +var uTs; +var zsr; +var dTs; +var sht; +var hTs; +var h5; +var hJ; +var nht; +var fJ; +var dse; +var rht; +var hse; +var sU; +var nU; +var nye; +var rye; +var oye; +var wJt; +var fTs; +var CJt; +var gTs; +var gJ; +var pJ; +var pTs; +var mTs; +var bTs; +var vTs; +var rU; +var yTs; +var aye; +var oU; +var SJt; +var xJt; +var kJt; +var f5; +var wTs; +var CTs; +var STs; +var xTs; +var kTs; +var ETs; +var ITs; +var EJt; +var IJt; +var DJt; +var DTs; +var TTs; +var PTs; +var LTs; +var RTs; +var NTs; +var MTs; +var ATs; +var $Ts; +var FTs; +var OTs; +var _Ts; +var BTs; +var UTs; +var WTs; +var VTs; +var Jsr; +var HTs; +var qTs; +var jTs; +var TJt; +var Gsr; +var PJt; +var zTs; +var JTs; +var GTs; +var LJt; +var RJt; +var NJt; +var MJt; +var KTs; +var lye; +var YTs; +var XTs; +var cye; +var QTs; +var AJt; +var ZTs; +var ePs; +var tPs; +var iPs; +var sPs; +var nPs; +var rPs; +var Ksr; +var oPs; +var aPs; +var Ysr; +var Xsr; +var Qsr; +var uye; +var Zsr; +var $Jt; +var FJt; +var lPs; +var dye; +var fse; +var OJt; +var _Jt; +var mJ; +var bJ; +var oht; +var BJt; +var cPs; +var gse; +var qF; +var aU; +var UJt; +var vJ; +var WJt; +var aht; +var lht; +var cht; +var uht; +var hye; +var fye; +var dht; +var hht; +var fht; +var ght; +var uPs; +var pht; +var gye; +var mht; +var bht; +var vht; +var yht; +var wht; +var Cht; +var VJt; +var dPs; +var pye; +var jF; +var hPs; +var HJt; +var qJt; +var fPs; +var gPs; +var lU; +var pPs; +var jJt; +var mPs; +var bPs; +var vPs; +var yJ; +var zJt; +var yPs; +var wPs; +var JJt; +var wJ; +var Sht; +var CPs; +var SPs; +var xPs; +var kPs; +var xht; +var CJ; +var ig = ue({ + "out-build/external/lexical/lexical/lexical.js"() { + "use strict"; + + UIs(); + HIs(); + qIs(); + xe(); + fr(); + rt(); + Cm = 0; + hS = 1; + Xve = 3; + pR = 4; + rTs = class { + constructor(i, e, t, s, n, r, o) { + this._parentEditor = e; + this._rootElement = null; + this._editorState = i; + this._pendingEditorState = null; + this._compositionKey = null; + this._deferred = []; + this._keyToDOMMap = new Map(); + this._updates = []; + this._updating = false; + this._listeners = { + decorator: new Set(), + editable: new Set(), + mutation: new Map(), + root: new Set(), + textcontent: new Set(), + update: new Set() + }; + this._commands = new Map(); + this._config = s; + this._nodes = t; + this._decorators = {}; + this._pendingDecorators = null; + this._dirtyType = aU; + this._cloneNotNeeded = new Set(); + this._dirtyLeaves = new Set(); + this._dirtyElements = new Map(); + this._normalizedNodes = new Set(); + this._updateTags = new Set(); + this._observer = null; + this._key = zDs(); + this._onError = n; + this._htmlConversions = r; + this._editable = o; + this._headless = e !== null && e._headless; + this._window = null; + this._blockCursorElement = null; + } + isComposing() { + return this._compositionKey != null; + } + registerUpdateListener(i) { + const e = this._listeners.update; + e.add(i); + return () => { + e.delete(i); + }; + } + registerEditableListener(i) { + const e = this._listeners.editable; + e.add(i); + return () => { + e.delete(i); + }; + } + registerDecoratorListener(i) { + const e = this._listeners.decorator; + e.add(i); + return () => { + e.delete(i); + }; + } + registerTextContentListener(i) { + const e = this._listeners.textcontent; + e.add(i); + return () => { + e.delete(i); + }; + } + registerRootListener(i) { + const e = this._listeners.root; + i(this._rootElement, null); + e.add(i); + return () => { + i(null, this._rootElement); + e.delete(i); + }; + } + registerCommand(i, e, t) { + if (t === undefined) { + ta(false, "Listener for type \"command\" requires a \"priority\"."); + } + const s = this._commands; + if (!s.has(i)) { + s.set(i, [new Set(), new Set(), new Set(), new Set(), new Set()]); + } + const n = s.get(i); + if (n === undefined) { + ta(false, "registerCommand: Command %s not found in command map", String(i)); + } + const r = n[t]; + r.add(e); + return () => { + r.delete(e); + if (n.every(o => o.size === 0)) { + s.delete(i); + } + }; + } + registerMutationListener(i, e) { + if (this._nodes.get(i.getType()) === undefined) { + ta(false, "Node %s has not been registered. Ensure node has been passed to createEditor.", i.name); + } + const s = this._listeners.mutation; + s.set(e, i); + return () => { + s.delete(e); + }; + } + registerNodeTransformToKlass(i, e) { + const t = i.getType(); + const s = this._nodes.get(t); + if (s === undefined) { + ta(false, "Node %s has not been registered. Ensure node has been passed to createEditor.", i.name); + } + s.transforms.add(e); + return s; + } + registerNodeTransform(i, e) { + const t = this.registerNodeTransformToKlass(i, e); + const s = [t]; + const n = t.replaceWithKlass; + if (n != null) { + const r = this.registerNodeTransformToKlass(n, e); + s.push(r); + } + Yir(this, i.getType()); + return () => { + s.forEach(r => r.transforms.delete(e)); + }; + } + hasNodes(i) { + for (let e = 0; e < i.length; e++) { + const s = i[e].getType(); + if (!this._nodes.has(s)) { + return false; + } + } + return true; + } + dispatchCommand(i, e) { + return $n(this, i, e); + } + getDecorators() { + return this._decorators; + } + getRootElement() { + return this._rootElement; + } + getKey() { + return this._key; + } + setRootElement(i) { + const e = this._rootElement; + if (i !== e) { + const t = Gve(this._config.theme, "root"); + const s = this._pendingEditorState || this._editorState; + this._rootElement = i; + jIs(this, e, i, s); + if (e !== null) { + if (!this._config.disableEvents) { + rir(e); + } + if (t != null) { + e.classList.remove(...t); + } + } + if (i !== null) { + const n = Psr(i); + const r = i.style; + r.userSelect = "text"; + r.whiteSpace = "pre-wrap"; + r.wordBreak = "break-word"; + i.setAttribute("data-lexical-editor", "true"); + this._window = n; + this._dirtyType = vJ; + nDs(this); + this._updateTags.add("history-merge"); + aJ(this); + if (!this._config.disableEvents) { + nir(i, this); + } + if (t != null) { + i.classList.add(...t); + } + } else { + this._window = null; + } + qve("root", this, false, i, e); + } + } + getElementByKey(i) { + return this._keyToDOMMap.get(i) || null; + } + getEditorState() { + return this._editorState; + } + setEditorState(i, e) { + if (i.isEmpty()) { + ta(false, "setEditorState: the editor state is empty. Ensure the editor state's root node never becomes empty."); + } + sDs(this); + const t = this._pendingEditorState; + const s = this._updateTags; + const n = e !== undefined ? e.tag : null; + if (t !== null && !t.isEmpty()) { + if (n != null) { + s.add(n); + } + aJ(this); + } + this._pendingEditorState = i; + this._dirtyType = vJ; + this._dirtyElements.set("root", false); + this._compositionKey = null; + if (n != null) { + s.add(n); + } + aJ(this); + } + parseEditorState(i, e) { + const t = typeof i == "string" ? JSON.parse(i) : i; + return Oir(t, this, e); + } + update(i, e) { + tP(this, i, e); + } + focus(i, e = {}) { + const t = this._rootElement; + if (t !== null) { + t.setAttribute("autocapitalize", "off"); + tP(this, () => { + const s = Za(); + const n = kp(); + if (s !== null) { + s.dirty = true; + } else if (n.getChildrenSize() !== 0) { + if (e.defaultSelection === "rootStart") { + n.selectStart(); + } else { + n.selectEnd(); + } + } + }, { + onUpdate: () => { + t.removeAttribute("autocapitalize"); + if (i) { + i(); + } + }, + tag: "focus" + }); + if (this._pendingEditorState === null) { + t.removeAttribute("autocapitalize"); + } + } + } + blur() { + const i = this._rootElement; + if (i !== null) { + i.blur(); + } + const e = WF(this._window); + if (e !== null) { + e.removeAllRanges(); + } + } + isEditable() { + return this._editable; + } + setEditable(i) { + if (this._editable !== i) { + this._editable = i; + qve("editable", this, true, i); + } + } + toJSON() { + return { + editorState: this._editorState.toJSON() + }; + } + }; + uJt = class MOn { + constructor(e, t) { + this._nodeMap = e; + this._selection = t || null; + this._flushSync = false; + this._readOnly = false; + } + isEmpty() { + return this._nodeMap.size === 1 && this._selection === null; + } + read(e) { + return NDs(this, e); + } + clone(e) { + const t = new MOn(this._nodeMap, e === undefined ? this._selection : e); + t._readOnly = true; + return t; + } + toJSON() { + return NDs(this, () => ({ + root: zIs(kp()) + })); + } + }; + VF = Object.freeze({}); + Gdt = 30; + Kdt = [["keydown", sir], ["keyup", iir], ["pointerdown", Ktr], ["compositionstart", eir], ["compositionend", tir], ["input", Ztr], ["click", Gtr], ["cut", VF], ["copy", VF], ["dragstart", VF], ["dragover", VF], ["dragend", VF], ["paste", VF], ["focus", VF], ["blur", VF], ["drop", VF]]; + if (sse) { + Kdt.push(["beforeinput", (i, e) => Qtr(i, e)]); + } + ase = 0; + dJt = 0; + hJt = 0; + cJ = null; + lse = 0; + Ydt = false; + Xdt = false; + cse = false; + use = false; + fJt = [0, "", 0, "root", 0]; + uJ = new Map(); + oTs = 100; + Qdt = false; + Zdt = 0; + Qve = class { + static getType() { + ta(false, "LexicalNode: Node %s does not implement .getType().", this.name); + } + static clone(i) { + ta(false, "LexicalNode: Node %s does not implement .clone().", this.name); + } + constructor(i) { + this.__type = this.constructor.getType(); + this.__parent = null; + this.__prev = null; + this.__next = null; + BDs(this, i); + } + getType() { + return this.__type; + } + isAttached() { + let i = this.__key; + while (i !== null) { + if (i === "root") { + return true; + } + const e = iC(i); + if (e === null) { + break; + } + i = e.__parent; + } + return false; + } + isSelected(i) { + const e = i || Za(); + if (e == null) { + return false; + } + const t = e.getNodes().some(s => s.__key === this.__key); + if (Po(this)) { + return t; + } else if (Oo(e) && e.anchor.type === "element" && e.focus.type === "element" && e.anchor.key === e.focus.key && e.anchor.offset === e.focus.offset) { + return false; + } else { + return t; + } + } + getKey() { + return this.__key; + } + getIndexWithinParent() { + const i = this.getParent(); + if (i === null) { + return -1; + } + let e = i.getFirstChild(); + let t = 0; + while (e !== null) { + if (this.is(e)) { + return t; + } + t++; + e = e.getNextSibling(); + } + return -1; + } + getParent() { + const i = this.getLatest().__parent; + if (i === null) { + return null; + } else { + return iC(i); + } + } + getParentOrThrow() { + const i = this.getParent(); + if (i === null) { + ta(false, "Expected node %s to have a parent.", this.__key); + } + return i; + } + getTopLevelElement() { + let i = this; + while (i !== null) { + const e = i.getParent(); + if (UF(e)) { + return i; + } + i = e; + } + return null; + } + getTopLevelElementOrThrow() { + const i = this.getTopLevelElement(); + if (i === null) { + ta(false, "Expected node %s to have a top parent element.", this.__key); + } + return i; + } + getParents() { + const i = []; + let e = this.getParent(); + while (e !== null) { + i.push(e); + e = e.getParent(); + } + return i; + } + getParentKeys() { + const i = []; + let e = this.getParent(); + while (e !== null) { + i.push(e.__key); + e = e.getParent(); + } + return i; + } + getPreviousSibling() { + const e = this.getLatest().__prev; + if (e === null) { + return null; + } else { + return iC(e); + } + } + getPreviousSiblings() { + const i = []; + const e = this.getParent(); + if (e === null) { + return i; + } + let t = e.getFirstChild(); + while (t !== null && !t.is(this)) { + i.push(t); + t = t.getNextSibling(); + } + return i; + } + getNextSibling() { + const e = this.getLatest().__next; + if (e === null) { + return null; + } else { + return iC(e); + } + } + getNextSiblings() { + const i = []; + let e = this.getNextSibling(); + while (e !== null) { + i.push(e); + e = e.getNextSibling(); + } + return i; + } + getCommonAncestor(i) { + const e = this.getParents(); + const t = i.getParents(); + if (Or(this)) { + e.unshift(this); + } + if (Or(i)) { + t.unshift(i); + } + const s = e.length; + const n = t.length; + if (s === 0 || n === 0 || e[s - 1] !== t[n - 1]) { + return null; + } + const r = new Set(t); + for (let o = 0; o < s; o++) { + const a = e[o]; + if (r.has(a)) { + return a; + } + } + return null; + } + is(i) { + if (i == null) { + return false; + } else { + return this.__key === i.__key; + } + } + isBefore(i) { + if (this === i) { + return false; + } + if (i.isParentOf(this)) { + return true; + } + if (this.isParentOf(i)) { + return false; + } + const e = this.getCommonAncestor(i); + let t = 0; + let s = 0; + let n = this; + while (true) { + const r = n.getParentOrThrow(); + if (r === e) { + t = n.getIndexWithinParent(); + break; + } + n = r; + } + for (n = i;;) { + const r = n.getParentOrThrow(); + if (r === e) { + s = n.getIndexWithinParent(); + break; + } + n = r; + } + return t < s; + } + isParentOf(i) { + const e = this.__key; + if (e === i.__key) { + return false; + } + let t = i; + while (t !== null) { + if (t.__key === e) { + return true; + } + t = t.getParent(); + } + return false; + } + getNodesBetween(i) { + const e = this.isBefore(i); + const t = []; + const s = new Set(); + let n = this; + while (true) { + const r = n.__key; + if (!s.has(r)) { + s.add(r); + t.push(n); + } + if (n === i) { + break; + } + const o = Or(n) ? e ? n.getFirstChild() : n.getLastChild() : null; + if (o !== null) { + n = o; + continue; + } + const a = e ? n.getNextSibling() : n.getPreviousSibling(); + if (a !== null) { + n = a; + continue; + } + const l = n.getParentOrThrow(); + if (!s.has(l.__key)) { + t.push(l); + } + if (l === i) { + break; + } + let c = null; + let u = l; + do { + if (u === null) { + ta(false, "getNodesBetween: ancestor is null"); + } + c = e ? u.getNextSibling() : u.getPreviousSibling(); + u = u.getParent(); + if (u !== null && c === null && !s.has(u.__key)) { + t.push(u); + } + } while (c === null); + n = c; + } + if (!e) { + t.reverse(); + } + return t; + } + isDirty() { + const e = jw()._dirtyLeaves; + return e !== null && e.has(this.__key); + } + getLatest() { + const i = iC(this.__key); + if (i === null) { + ta(false, "Lexical node does not exist in active editor state. Avoid using the same node references between nested closures from editorState.read/editor.update."); + } + return i; + } + getWritable() { + nD(); + const i = u5(); + const e = jw(); + const t = i._nodeMap; + const s = this.__key; + const n = this.getLatest(); + const r = n.__parent; + const o = e._cloneNotNeeded; + const a = Za(); + if (a !== null) { + a._cachedNodes = null; + } + if (o.has(s)) { + Bdt(n); + return n; + } + const c = n.constructor.clone(n); + c.__parent = r; + c.__next = n.__next; + c.__prev = n.__prev; + if (Or(n) && Or(c)) { + c.__first = n.__first; + c.__last = n.__last; + c.__size = n.__size; + c.__indent = n.__indent; + c.__format = n.__format; + c.__dir = n.__dir; + } else if (Po(n) && Po(c)) { + c.__format = n.__format; + c.__style = n.__style; + c.__mode = n.__mode; + c.__detail = n.__detail; + } + o.add(s); + c.__key = s; + Bdt(c); + t.set(s, c); + return c; + } + getTextContent() { + return ""; + } + getTextContentSize() { + return this.getTextContent().length; + } + createDOM(i, e) { + ta(false, "createDOM: base method not extended"); + } + updateDOM(i, e, t) { + ta(false, "updateDOM: base method not extended"); + } + exportDOM(i) { + return { + element: this.createDOM(i._config, i) + }; + } + exportJSON() { + ta(false, "exportJSON: base method not extended"); + } + static importJSON(i) { + ta(false, "LexicalNode: Node %s does not implement .importJSON().", this.name); + } + static transform() { + return null; + } + remove(i) { + _zt(this, true, i); + } + replace(i, e) { + nD(); + let t = Za(); + if (t !== null) { + t = t.clone(); + } + sJt(this, i); + const s = this.getLatest(); + const n = this.__key; + const r = i.__key; + const o = i.getWritable(); + const a = this.getParentOrThrow().getWritable(); + const l = a.__size; + lJ(o); + const c = s.getPreviousSibling(); + const u = s.getNextSibling(); + const d = s.__prev; + const h = s.__next; + const g = s.__parent; + _zt(s, false, true); + if (c === null) { + a.__first = r; + } else { + const p = c.getWritable(); + p.__next = r; + } + o.__prev = d; + if (u === null) { + a.__last = r; + } else { + const p = u.getWritable(); + p.__prev = r; + } + o.__next = h; + o.__parent = g; + a.__size = l; + if (e) { + this.getChildren().forEach(p => { + o.append(p); + }); + } + if (Oo(t)) { + d5(t); + const p = t.anchor; + const b = t.focus; + if (p.key === n) { + pDs(p, o); + } + if (b.key === n) { + pDs(b, o); + } + } + if (Z7() === n) { + _x(r); + } + return o; + } + insertAfter(i, e = true) { + nD(); + sJt(this, i); + const t = this.getWritable(); + const s = i.getWritable(); + const n = s.getParent(); + const r = Za(); + let o = false; + let a = false; + if (n !== null) { + const h = i.getIndexWithinParent(); + lJ(s); + if (Oo(r)) { + const g = n.__key; + const p = r.anchor; + const b = r.focus; + o = p.type === "element" && p.key === g && p.offset === h + 1; + a = b.type === "element" && b.key === g && b.offset === h + 1; + } + } + const l = this.getNextSibling(); + const c = this.getParentOrThrow().getWritable(); + const u = s.__key; + const d = t.__next; + if (l === null) { + c.__last = u; + } else { + const h = l.getWritable(); + h.__prev = u; + } + c.__size++; + t.__next = u; + s.__next = d; + s.__prev = t.__key; + s.__parent = t.__parent; + if (e && Oo(r)) { + const h = this.getIndexWithinParent(); + $dt(r, c, h + 1); + const g = c.__key; + if (o) { + r.anchor.set(g, h + 2, "element"); + } + if (a) { + r.focus.set(g, h + 2, "element"); + } + } + return i; + } + insertBefore(i, e = true) { + nD(); + sJt(this, i); + const t = this.getWritable(); + const s = i.getWritable(); + const n = s.__key; + lJ(s); + const r = this.getPreviousSibling(); + const o = this.getParentOrThrow().getWritable(); + const a = t.__prev; + const l = this.getIndexWithinParent(); + if (r === null) { + o.__first = n; + } else { + const u = r.getWritable(); + u.__next = n; + } + o.__size++; + t.__prev = n; + s.__prev = a; + s.__next = t.__key; + s.__parent = t.__parent; + const c = Za(); + if (e && Oo(c)) { + const u = this.getParentOrThrow(); + $dt(c, u, l); + } + return i; + } + isParentRequired() { + return false; + } + createParentElementNode() { + return Bx(); + } + selectPrevious(i, e) { + nD(); + const t = this.getPreviousSibling(); + const s = this.getParentOrThrow(); + if (t === null) { + return s.select(0, 0); + } + if (Or(t)) { + return t.select(); + } + if (!Po(t)) { + const n = t.getIndexWithinParent() + 1; + return s.select(n, n); + } + return t.select(i, e); + } + selectNext(i, e) { + nD(); + const t = this.getNextSibling(); + const s = this.getParentOrThrow(); + if (t === null) { + return s.select(); + } + if (Or(t)) { + return t.select(0, 0); + } + if (!Po(t)) { + const n = t.getIndexWithinParent(); + return s.select(n, n); + } + return t.select(i, e); + } + markDirty() { + this.getWritable(); + } + }; + zw = ""; + Ux = ""; + HF = ""; + gJt = false; + eht = false; + eye = null; + aTs = "40px"; + lTs = class { + constructor(i, e, t) { + this._selection = null; + this.key = i; + this.offset = e; + this.type = t; + } + is(i) { + return this.key === i.key && this.offset === i.offset && this.type === i.type; + } + isBefore(i) { + let e = this.getNode(); + let t = i.getNode(); + const s = this.offset; + const n = i.offset; + if (Or(e)) { + const r = e.getDescendantByIndex(s); + e = r ?? e; + } + if (Or(t)) { + const r = t.getDescendantByIndex(n); + t = r ?? t; + } + if (e === t) { + return s < n; + } else { + return e.isBefore(t); + } + } + getNode() { + const i = this.key; + const e = iC(i); + if (e === null) { + ta(false, "Point.getNode: node not found"); + } + return e; + } + set(i, e, t) { + const s = this._selection; + const n = this.key; + this.key = i; + this.offset = e; + this.type = t; + if (!rse()) { + if (Z7() === n) { + _x(i); + } + if (s !== null) { + s._cachedNodes = null; + s.dirty = true; + } + } + } + }; + vJt = class AOn { + constructor(e) { + this.dirty = false; + this._nodes = e; + this._cachedNodes = null; + } + is(e) { + if (!Ndt(e)) { + return false; + } + const t = this._nodes; + const s = e._nodes; + return t.size === s.size && Array.from(t).every(n => s.has(n)); + } + add(e) { + this.dirty = true; + this._nodes.add(e); + this._cachedNodes = null; + } + delete(e) { + this.dirty = true; + this._nodes.delete(e); + this._cachedNodes = null; + } + clear() { + this.dirty = true; + this._nodes.clear(); + this._cachedNodes = null; + } + has(e) { + return this._nodes.has(e); + } + clone() { + return new AOn(new Set(this._nodes)); + } + getStartEndPoints() { + return null; + } + extract() { + return this.getNodes(); + } + insertRawText(e) {} + insertText() {} + insertNodes(e, t) { + const s = this.getNodes(); + const n = s.length; + const r = s[n - 1]; + let o; + if (Po(r)) { + o = r.select(); + } else { + const a = r.getIndexWithinParent() + 1; + o = r.getParentOrThrow().select(a, a); + } + o.insertNodes(e, t); + for (let a = 0; a < n; a++) { + s[a].remove(); + } + return true; + } + getNodes() { + const e = this._cachedNodes; + if (e !== null) { + return e; + } + const t = this._nodes; + const s = []; + for (const n of t) { + const r = iC(n); + if (r !== null) { + s.push(r); + } + } + if (!rse()) { + this._cachedNodes = s; + } + return s; + } + getTextContent() { + const e = this.getNodes(); + let t = ""; + for (let s = 0; s < e.length; s++) { + t += e[s].getTextContent(); + } + return t; + } + }; + cTs = class $On { + constructor(e, t, s) { + this.gridKey = e; + this.anchor = t; + this.focus = s; + this.dirty = false; + this._cachedNodes = null; + t._selection = this; + s._selection = this; + } + is(e) { + if (qzt(e)) { + return this.gridKey === e.gridKey && this.anchor.is(e.anchor) && this.focus.is(e.focus); + } else { + return false; + } + } + set(e, t, s) { + this.dirty = true; + this.gridKey = e; + this.anchor.key = t; + this.focus.key = s; + this._cachedNodes = null; + } + clone() { + return new $On(this.gridKey, this.anchor, this.focus); + } + getStartEndPoints() { + return [this.anchor, this.focus]; + } + isCollapsed() { + return false; + } + isBackward() { + return this.focus.isBefore(this.anchor); + } + getCharacterOffsets() { + return Mdt(this); + } + extract() { + return this.getNodes(); + } + insertRawText(e) {} + insertText() {} + insertNodes(e, t) { + const s = this.focus.getNode(); + return bir(s.select(0, s.getChildrenSize())).insertNodes(e, t); + } + getShape() { + const e = iC(this.anchor.key); + ta(e !== null, "getNodes: expected to find AnchorNode"); + const t = e.getIndexWithinParent(); + const s = e.getParentOrThrow().getIndexWithinParent(); + const n = iC(this.focus.key); + ta(n !== null, "getNodes: expected to find FocusNode"); + const r = n.getIndexWithinParent(); + const o = n.getParentOrThrow().getIndexWithinParent(); + const a = Math.min(t, r); + const l = Math.max(t, r); + const c = Math.min(s, o); + const u = Math.max(s, o); + return { + fromX: Math.min(a, l), + fromY: Math.min(c, u), + toX: Math.max(a, l), + toY: Math.max(c, u) + }; + } + getNodes() { + const e = this._cachedNodes; + if (e !== null) { + return e; + } + const t = this.anchor.getNode(); + const s = this.focus.getNode(); + const n = QDs(t, Yve); + const r = QDs(s, Yve); + ta(Yve(n), "Expected GridSelection anchor to be (or a child of) GridCellNode"); + ta(Yve(r), "Expected GridSelection focus to be (or a child of) GridCellNode"); + const o = n.getParent(); + ta(cJt(o), "Expected anchorCell to have a parent GridRowNode"); + const a = o.getParent(); + ta(Hsr(a), "Expected tableNode to have a parent GridNode"); + const [l, c, u] = Mir(a, n, r); + let d = Math.min(c.startColumn, u.startColumn); + let h = Math.min(c.startRow, u.startRow); + let g = Math.max(c.startColumn + c.cell.__colSpan - 1, u.startColumn + u.cell.__colSpan - 1); + let p = Math.max(c.startRow + c.cell.__rowSpan - 1, u.startRow + u.cell.__rowSpan - 1); + let b = d; + let v = h; + let y = d; + let w = h; + function C(k) { + const { + cell: E, + startColumn: D, + startRow: P + } = k; + d = Math.min(d, D); + h = Math.min(h, P); + g = Math.max(g, D + E.__colSpan - 1); + p = Math.max(p, P + E.__rowSpan - 1); + } + while (d < b || h < v || g > y || p > w) { + if (d < b) { + const k = w - v; + const E = b - 1; + for (let D = 0; D <= k; D++) { + C(l[v + D][E]); + } + b = E; + } + if (h < v) { + const k = y - b; + const E = v - 1; + for (let D = 0; D <= k; D++) { + C(l[E][b + D]); + } + v = E; + } + if (g > y) { + const k = w - v; + const E = y + 1; + for (let D = 0; D <= k; D++) { + C(l[v + D][E]); + } + y = E; + } + if (p > w) { + const k = y - b; + const E = w + 1; + for (let D = 0; D <= k; D++) { + C(l[E][b + D]); + } + w = E; + } + } + const S = [a]; + let x = null; + for (let k = h; k <= p; k++) { + for (let E = d; E <= g; E++) { + const { + cell: D + } = l[k][E]; + const P = D.getParent(); + ta(cJt(P), "Expected GridCellNode parent to be a GridRowNode"); + if (P !== x) { + S.push(P); + } + S.push(D, ...$sr(D)); + x = P; + } + } + if (!rse()) { + this._cachedNodes = S; + } + return S; + } + getTextContent() { + const e = this.getNodes(); + let t = ""; + for (let s = 0; s < e.length; s++) { + t += e[s].getTextContent(); + } + return t; + } + }; + iye = class FOn { + constructor(e, t, s, n) { + this.anchor = e; + this.focus = t; + this.dirty = false; + this.format = s; + this.style = n; + this._cachedNodes = null; + e._selection = this; + t._selection = this; + } + is(e) { + if (Oo(e)) { + return this.anchor.is(e.anchor) && this.focus.is(e.focus) && this.format === e.format && this.style === e.style; + } else { + return false; + } + } + isBackward() { + return this.focus.isBefore(this.anchor); + } + isCollapsed() { + return this.anchor.is(this.focus); + } + getStartEndPoints() { + return [this.anchor, this.focus]; + } + getNodes() { + const e = this._cachedNodes; + if (e !== null) { + return e; + } + const t = this.anchor; + const s = this.focus; + const n = t.isBefore(s); + const r = n ? t : s; + const o = n ? s : t; + let a = r.getNode(); + let l = o.getNode(); + const c = r.offset; + const u = o.offset; + if (Or(a)) { + const h = a.getDescendantByIndex(c); + a = h ?? a; + } + if (Or(l)) { + let h = l.getDescendantByIndex(u); + if (h !== null && h !== a && l.getChildAtIndex(u) === h) { + h = h.getPreviousSibling(); + } + l = h ?? l; + } + let d; + if (a.is(l)) { + if (Or(a) && a.getChildrenSize() > 0) { + d = []; + } else { + d = [a]; + } + } else { + d = a.getNodesBetween(l); + } + if (!rse()) { + this._cachedNodes = d; + } + return d; + } + setTextNodeRange(e, t, s, n) { + Q7(this.anchor, e.__key, t, "text"); + Q7(this.focus, s.__key, n, "text"); + this._cachedNodes = null; + this.dirty = true; + } + getTextContent() { + const e = this.getNodes(); + if (e.length === 0) { + return ""; + } + const t = e[0]; + const s = e[e.length - 1]; + const n = this.anchor; + const r = this.focus; + const o = n.isBefore(r); + const [a, l] = Mdt(this); + let c = ""; + let u = true; + for (let d = 0; d < e.length; d++) { + const h = e[d]; + if (Or(h) && !h.isInline()) { + if (!u) { + c += ` +`; + } + if (h.isEmpty()) { + u = false; + } else { + u = true; + } + } else { + u = false; + if (Po(h)) { + let g = h.getTextContent(); + if (h === t) { + if (h === s) { + if (n.type !== "element" || r.type !== "element" || r.offset === n.offset) { + g = a < l ? g.slice(a, l) : g.slice(l, a); + } + } else { + g = o ? g.slice(a) : g.slice(l); + } + } else if (h === s) { + g = o ? g.slice(0, l) : g.slice(0, a); + } + c += g; + } else if ((zm(h) || Jdt(h)) && (h !== s || !this.isCollapsed())) { + c += h.getTextContent(); + } + } + } + return c; + } + applyDOMRange(e) { + const t = jw(); + const n = t.getEditorState()._selection; + const r = SDs(e.startContainer, e.startOffset, e.endContainer, e.endOffset, t, n); + if (r === null) { + return; + } + const [o, a] = r; + Q7(this.anchor, o.key, o.offset, o.type); + Q7(this.focus, a.key, a.offset, a.type); + this._cachedNodes = null; + } + clone() { + const e = this.anchor; + const t = this.focus; + return new FOn(nse(e.key, e.offset, e.type), nse(t.key, t.offset, t.type), this.format, this.style); + } + toggleFormat(e) { + this.format = _Ds(this.format, e, null); + this.dirty = true; + } + setStyle(e) { + this.style = e; + this.dirty = true; + } + hasFormat(e) { + const t = lU[e]; + return (this.format & t) !== 0; + } + insertRawText(e) { + const t = e.split(/(\r?\n|\t)/); + const s = []; + const n = t.length; + for (let r = 0; r < n; r++) { + const o = t[r]; + if (o === ` +` || o === `\r +`) { + s.push(Kve()); + } else if (o === "\t") { + s.push(lJt()); + } else { + s.push(Cf(o)); + } + } + this.insertNodes(s); + } + insertText(e) { + const t = this.anchor; + const s = this.focus; + const n = this.isCollapsed() || t.isBefore(s); + const r = this.format; + const o = this.style; + if (n && t.type === "element") { + mDs(t, s, r, o); + } else if (!n && s.type === "element") { + mDs(s, t, r, o); + } + const a = this.getNodes(); + const l = a.length; + const c = n ? t : s; + const u = n ? s : t; + const d = c.offset; + const h = u.offset; + let g = a[0]; + if (!Po(g)) { + ta(false, "insertText: first node is not a text node"); + } + const b = g.getTextContent().length; + const v = g.getParentOrThrow(); + const y = l - 1; + let w = a[y]; + if (this.isCollapsed() && d === b && (g.isSegmented() || g.isToken() || !g.canInsertTextAfter() || !v.canInsertTextAfter() && g.getNextSibling() === null)) { + let C = g.getNextSibling(); + if (!Po(C) || !C.canInsertTextBefore() || zzt(C)) { + C = Cf(); + C.setFormat(r); + if (v.canInsertTextAfter()) { + g.insertAfter(C); + } else { + v.insertAfter(C); + } + } + C.select(0, 0); + g = C; + if (e !== "") { + this.insertText(e); + return; + } + } else if (this.isCollapsed() && d === 0 && (g.isSegmented() || g.isToken() || !g.canInsertTextBefore() || !v.canInsertTextBefore() && g.getPreviousSibling() === null)) { + let C = g.getPreviousSibling(); + if (!Po(C) || zzt(C)) { + C = Cf(); + C.setFormat(r); + if (v.canInsertTextBefore()) { + g.insertBefore(C); + } else { + v.insertBefore(C); + } + } + C.select(); + g = C; + if (e !== "") { + this.insertText(e); + return; + } + } else if (g.isSegmented() && d !== b) { + const C = Cf(g.getTextContent()); + C.setFormat(r); + g.replace(C); + g = C; + } else if (!this.isCollapsed() && e !== "") { + const C = w.getParent(); + if (!v.canInsertTextBefore() || !v.canInsertTextAfter() || Or(C) && (!C.canInsertTextBefore() || !C.canInsertTextAfter())) { + this.insertText(""); + CDs(this.anchor, this.focus, null); + this.insertText(e); + return; + } + } + if (l === 1) { + if (g.isToken()) { + const k = Cf(e); + k.select(); + g.replace(k); + return; + } + const C = g.getFormat(); + const S = g.getStyle(); + if (d === h && (C !== r || S !== o)) { + if (g.getTextContent() === "") { + g.setFormat(r); + g.setStyle(o); + } else { + const k = Cf(e); + k.setFormat(r); + k.setStyle(o); + k.select(); + if (d === 0) { + g.insertBefore(k, false); + } else { + const [E] = g.splitText(d); + E.insertAfter(k, false); + } + if (k.isComposing() && this.anchor.type === "text") { + this.anchor.offset -= e.length; + } + return; + } + } + const x = h - d; + g = g.spliceText(d, x, e, true); + if (g.getTextContent() === "") { + g.remove(); + } else if (this.anchor.type === "text") { + if (g.isComposing()) { + this.anchor.offset -= e.length; + } else { + this.format = C; + this.style = S; + } + } + } else { + const C = new Set([...g.getParentKeys(), ...w.getParentKeys()]); + const S = Or(g) ? g : g.getParentOrThrow(); + let x = Or(w) ? w : w.getParentOrThrow(); + let k = w; + if (!S.is(x) && x.isInline()) { + do { + k = x; + x = x.getParentOrThrow(); + } while (x.isInline()); + } + if (u.type === "text" && (h !== 0 || w.getTextContent() === "") || u.type === "element" && w.getIndexWithinParent() < h) { + if (Po(w) && !w.isToken() && h !== w.getTextContentSize()) { + if (w.isSegmented()) { + const L = Cf(w.getTextContent()); + w.replace(L); + w = L; + } + w = w.spliceText(0, h, ""); + C.add(w.__key); + } else { + const L = w.getParentOrThrow(); + if (!L.canBeEmpty() && L.getChildrenSize() === 1) { + L.remove(); + } else { + w.remove(); + } + } + } else { + C.add(w.__key); + } + const E = x.getChildren(); + const D = new Set(a); + const P = S.is(x); + const R = S.isInline() && g.getNextSibling() === null ? S : g; + for (let L = E.length - 1; L >= 0; L--) { + const F = E[L]; + if (F.is(g) || Or(F) && F.isParentOf(g)) { + break; + } + if (F.isAttached()) { + if (!D.has(F) || F.is(k)) { + if (!P) { + R.insertAfter(F, false); + } + } else { + F.remove(); + } + } + } + if (!P) { + let L = x; + let F = null; + while (L !== null) { + const O = L.getChildren(); + const U = O.length; + if (U === 0 || O[U - 1].is(F)) { + C.delete(L.__key); + F = L; + } + L = L.getParent(); + } + } + if (!g.isToken()) { + g = g.spliceText(d, b - d, e, true); + if (g.getTextContent() === "") { + g.remove(); + } else if (g.isComposing() && this.anchor.type === "text") { + this.anchor.offset -= e.length; + } + } else if (d === b) { + g.select(); + } else { + const L = Cf(e); + L.select(); + g.replace(L); + } + for (let L = 1; L < l; L++) { + const F = a[L]; + const O = F.__key; + if (!C.has(O)) { + F.remove(); + } + } + } + } + removeText() { + this.insertText(""); + } + formatText(e) { + if (this.isCollapsed()) { + this.toggleFormat(e); + _x(null); + return; + } + const t = this.getNodes(); + const s = []; + for (const w of t) { + if (Po(w)) { + s.push(w); + } + } + const n = s.length; + if (n === 0) { + this.toggleFormat(e); + _x(null); + return; + } + const r = this.anchor; + const o = this.focus; + const a = this.isBackward(); + const l = a ? o : r; + const c = a ? r : o; + let u = 0; + let d = s[0]; + let h = l.type === "element" ? 0 : l.offset; + if (l.type === "text" && h === d.getTextContentSize()) { + u = 1; + d = s[1]; + h = 0; + } + if (d == null) { + return; + } + const g = d.getFormatFlags(e, null); + const p = n - 1; + let b = s[p]; + const v = c.type === "text" ? c.offset : b.getTextContentSize(); + if (d.is(b)) { + if (h === v) { + return; + } + if (h === 0 && v === d.getTextContentSize()) { + d.setFormat(g); + } else { + const w = d.splitText(h, v); + const C = h === 0 ? w[0] : w[1]; + C.setFormat(g); + if (l.type === "text") { + l.set(C.__key, 0, "text"); + } + if (c.type === "text") { + c.set(C.__key, v - h, "text"); + } + } + this.format = g; + return; + } + if (h !== 0) { + [, d] = d.splitText(h); + h = 0; + } + d.setFormat(g); + const y = b.getFormatFlags(e, g); + if (v > 0) { + if (v !== b.getTextContentSize()) { + [b] = b.splitText(v); + } + b.setFormat(y); + } + for (let w = u + 1; w < p; w++) { + const C = s[w]; + if (!C.isToken()) { + const S = C.getFormatFlags(e, y); + C.setFormat(S); + } + } + if (l.type === "text") { + l.set(d.__key, h, "text"); + } + if (c.type === "text") { + c.set(b.__key, v, "text"); + } + this.format = g | y; + } + insertNodes(e, t) { + if (!this.isCollapsed()) { + const p = this.isBackward() ? this.anchor : this.focus; + const b = p.getNode().getNextSibling(); + const v = b ? b.getKey() : null; + const y = p.getNode().getPreviousSibling(); + const w = y ? y.getKey() : null; + this.removeText(); + if (this.isCollapsed() && this.focus.type === "element") { + let C; + if (this.focus.key === v && this.focus.offset === 0) { + C = Cf(); + this.focus.getNode().insertBefore(C); + } else if (this.focus.key === w && this.focus.offset === this.focus.getNode().getChildrenSize()) { + C = Cf(); + this.focus.getNode().insertAfter(C); + } + if (C) { + this.focus.set(C.__key, 0, "text"); + this.anchor.set(C.__key, 0, "text"); + } + } + } + const s = this.anchor; + const n = s.offset; + const r = s.getNode(); + let o = r; + if (s.type === "element") { + const p = s.getNode(); + const b = p.getChildAtIndex(n - 1); + if (b === null) { + o = p; + } else { + o = b; + } + } + const a = []; + const l = r.getNextSiblings(); + const c = UF(r) ? null : r.getTopLevelElementOrThrow(); + if (Po(r)) { + const b = r.getTextContent().length; + if (n === 0 && b !== 0) { + const v = r.getPreviousSibling(); + if (v !== null) { + o = v; + } else { + o = r.getParentOrThrow(); + } + a.push(r); + } else if (n === b) { + o = r; + } else { + if (r.isToken()) { + return false; + } + { + let v; + [o, v] = r.splitText(n); + a.push(v); + } + } + } + const u = o; + a.push(...l); + const d = e[0]; + let h = false; + let g = null; + for (let p = 0; p < e.length; p++) { + const b = e[p]; + if (!UF(o) && !zm(o) && Or(b) && !b.isInline()) { + if (b.is(d)) { + if (Or(o) && o.isEmpty() && o.canReplaceWith(b)) { + o.replace(b); + o = b; + h = true; + continue; + } + const v = b.getFirstDescendant(); + if (Jir(v)) { + let y = v.getParentOrThrow(); + while (y.isInline()) { + y = y.getParentOrThrow(); + } + const w = y.getChildren(); + const C = w.length; + if (Or(o)) { + let S = o.getFirstChild(); + for (let x = 0; x < C; x++) { + const k = w[x]; + if (S === null) { + o.append(k); + } else { + S.insertAfter(k); + } + S = k; + } + } else { + for (let S = C - 1; S >= 0; S--) { + o.insertAfter(w[S]); + } + o = o.getParentOrThrow(); + } + g = w[C - 1]; + y.remove(); + h = true; + if (y.is(b)) { + continue; + } + } + } + if (Po(o)) { + if (c === null) { + ta(false, "insertNode: topLevelElement is root node"); + } + o = c; + } + } else if (h && !Or(b) && !zm(b) && UF(o.getParent())) { + ta(false, "insertNodes: cannot insert a non-element into a root node"); + } + h = false; + if (Or(o) && !o.isInline()) { + g = b; + if (zm(b) && !b.isInline()) { + o = o.insertAfter(b, false); + } else if (Or(b)) { + if (!b.canBeEmpty() && b.isEmpty()) { + continue; + } + if (dE(o)) { + const v = o.getChildAtIndex(n); + if (v !== null) { + v.insertBefore(b); + } else { + o.append(b); + } + o = b; + } else if (b.isInline()) { + o.append(b); + o = b; + } else { + o = o.insertAfter(b, false); + } + } else { + const v = o.getFirstChild(); + if (v !== null) { + v.insertBefore(b); + } else { + o.append(b); + } + o = b; + } + } else if (!Or(b) || Or(b) && b.isInline() || zm(o) && !o.isInline()) { + g = b; + if (Oo(this) && zm(b) && (Or(o) || Po(o)) && !b.isInline()) { + let v; + let y; + if (Po(o)) { + v = o.getParentOrThrow(); + const [C] = o.splitText(n); + y = C.getIndexWithinParent() + 1; + } else { + v = o; + y = n; + } + const [, w] = Asr(v, y); + o = w.insertBefore(b); + } else { + o = o.insertAfter(b, false); + } + } else { + const v = o.getParentOrThrow(); + if (Jdt(o)) { + o.remove(); + } + o = v; + p--; + continue; + } + } + if (t) { + if (Po(u)) { + u.select(); + } else { + const p = o.getPreviousSibling(); + if (Po(p)) { + p.select(); + } else { + const b = o.getIndexWithinParent(); + o.getParentOrThrow().select(b, b); + } + } + } + if (Or(o)) { + const p = Po(g) ? g : Or(g) && g.isInline() ? g.getLastDescendant() : o.getLastDescendant(); + if (!t) { + if (p === null) { + o.select(); + } else if (Po(p)) { + if (p.getTextContent() === "") { + p.selectPrevious(); + } else { + p.select(); + } + } else { + p.selectNext(); + } + } + if (a.length !== 0) { + const b = o; + for (let v = a.length - 1; v >= 0; v--) { + const y = a[v]; + const w = y.getParentOrThrow(); + if (Or(o) && !xDs(y) && (!zm(y) || !!y.isInline() && !y.isIsolated())) { + if (b === o) { + o.append(y); + } else { + o.insertBefore(y); + } + o = y; + } else if (!Or(o) && !xDs(y)) { + o.insertBefore(y); + o = y; + } else if (Or(y) && !y.canInsertAfter(o)) { + const C = w.constructor.clone(w); + if (!Or(C)) { + ta(false, "insertNodes: cloned parent clone is not an element"); + } + C.append(y); + o.insertAfter(C); + } else { + o.insertAfter(y); + } + if (w.isEmpty() && !w.canBeEmpty()) { + w.remove(); + } + } + } + } else if (!t) { + if (Po(o)) { + o.select(); + } else { + const p = o.getParentOrThrow(); + const b = o.getIndexWithinParent() + 1; + p.select(b, b); + } + } + return true; + } + insertParagraph() { + if (!this.isCollapsed()) { + this.removeText(); + } + const e = this.anchor; + const t = e.offset; + let s; + let n = []; + let r = []; + if (e.type === "text") { + const l = e.getNode(); + n = l.getNextSiblings().reverse(); + s = l.getParentOrThrow(); + const c = s.isInline(); + const u = c ? s.getTextContentSize() : l.getTextContentSize(); + if (t === 0) { + n.push(l); + } else { + if (c) { + r = s.getNextSiblings(); + } + if (t !== u && (!c || t !== l.getTextContentSize())) { + const [, d] = l.splitText(t); + n.push(d); + } + } + } else { + s = e.getNode(); + if (UF(s)) { + const l = Bx(); + const c = s.getChildAtIndex(t); + l.select(); + if (c !== null) { + c.insertBefore(l, false); + } else { + s.append(l); + } + return; + } + n = s.getChildren().slice(t).reverse(); + } + const o = n.length; + if (t === 0 && o > 0 && s.isInline()) { + const l = s.getParentOrThrow(); + const c = l.insertNewAfter(this, false); + if (Or(c)) { + const u = l.getChildren(); + for (let d = 0; d < u.length; d++) { + c.append(u[d]); + } + } + return; + } + const a = s.insertNewAfter(this, false); + if (a === null) { + this.insertLineBreak(); + } else if (Or(a)) { + const l = s.getFirstChild(); + if (t === 0 && (s.is(e.getNode()) || l && l.is(e.getNode())) && o > 0) { + s.insertBefore(a); + return; + } + let u = null; + const d = r.length; + const h = a.getParentOrThrow(); + if (d > 0) { + for (let g = 0; g < d; g++) { + const p = r[g]; + h.append(p); + } + } + if (o !== 0) { + for (let g = 0; g < o; g++) { + const p = n[g]; + if (u === null) { + a.append(p); + } else { + u.insertBefore(p); + } + u = p; + } + } + if (!a.canBeEmpty() && a.getChildrenSize() === 0) { + a.selectPrevious(); + a.remove(); + } else { + a.selectStart(); + } + } + } + insertLineBreak(e) { + const t = Kve(); + const s = this.anchor; + if (s.type === "element") { + const n = s.getNode(); + if (dE(n)) { + this.insertParagraph(); + } + } + if (e) { + this.insertNodes([t], true); + } else if (this.insertNodes([t])) { + t.selectNext(0, 0); + } + } + getCharacterOffsets() { + return Mdt(this); + } + extract() { + const e = this.getNodes(); + const t = e.length; + const s = t - 1; + const n = this.anchor; + const r = this.focus; + let o = e[0]; + let a = e[s]; + const [l, c] = Mdt(this); + if (t === 0) { + return []; + } + if (t === 1) { + if (Po(o) && !this.isCollapsed()) { + const d = l > c ? c : l; + const h = l > c ? l : c; + const g = o.splitText(d, h); + const p = d === 0 ? g[0] : g[1]; + if (p != null) { + return [p]; + } else { + return []; + } + } + return [o]; + } + const u = n.isBefore(r); + if (Po(o)) { + const d = u ? l : c; + if (d === o.getTextContentSize()) { + e.shift(); + } else if (d !== 0) { + [, o] = o.splitText(d); + e[0] = o; + } + } + if (Po(a)) { + const h = a.getTextContent().length; + const g = u ? c : l; + if (g === 0) { + e.pop(); + } else if (g !== h) { + [a] = a.splitText(g); + e[s] = a; + } + } + return e; + } + modify(e, t, s) { + const n = this.focus; + const r = this.anchor; + const o = e === "move"; + const a = tJt(n, t); + if (zm(a) && !a.isIsolated()) { + if (o && a.isKeyboardSelectable()) { + const g = EDs(); + g.add(a.__key); + d5(g); + return; + } + const h = t ? a.getPreviousSibling() : a.getNextSibling(); + if (Po(h)) { + const g = h.__key; + const p = t ? h.getTextContent().length : 0; + n.set(g, p, "text"); + if (o) { + r.set(g, p, "text"); + } + return; + } else { + const g = a.getParentOrThrow(); + let p; + let b; + if (Or(h)) { + b = h.__key; + p = t ? h.getChildrenSize() : 0; + } else { + p = a.getIndexWithinParent(); + b = g.__key; + if (!t) { + p++; + } + } + n.set(b, p, "element"); + if (o) { + r.set(b, p, "element"); + } + return; + } + } + const l = jw(); + const c = WF(l._window); + if (!c) { + return; + } + const u = l._blockCursorElement; + const d = l._rootElement; + if (d !== null && u !== null && Or(a) && !a.isInline() && !a.canBeEmpty()) { + rJt(u, l, d); + } + Iir(c, e, t ? "backward" : "forward", s); + if (c.rangeCount > 0) { + const h = c.getRangeAt(0); + const g = this.anchor.getNode(); + const p = dE(g) ? g : Lsr(g); + this.applyDOMRange(h); + this.dirty = true; + if (!o) { + const b = this.getNodes(); + const v = []; + let y = false; + for (let w = 0; w < b.length; w++) { + const C = b[w]; + if (iJt(C, p)) { + v.push(C); + } else { + y = true; + } + } + if (y && v.length > 0) { + if (t) { + const w = v[0]; + if (Or(w)) { + w.selectStart(); + } else { + w.getParentOrThrow().selectStart(); + } + } else { + const w = v[v.length - 1]; + if (Or(w)) { + w.selectEnd(); + } else { + w.getParentOrThrow().selectEnd(); + } + } + } + if (c.anchorNode !== h.startContainer || c.anchorOffset !== h.startOffset) { + Eir(this); + } + } + } + } + deleteCharacter(e) { + const t = this.isCollapsed(); + if (this.isCollapsed()) { + const s = this.anchor; + const n = this.focus; + let r = s.getNode(); + if (!e && (s.type === "element" && Or(r) && s.offset === r.getChildrenSize() || s.type === "text" && s.offset === r.getTextContentSize())) { + const a = r.getParent(); + const l = r.getNextSibling() || (a === null ? null : a.getNextSibling()); + if (Or(l) && l.isShadowRoot()) { + return; + } + } + const o = tJt(n, e); + if (zm(o) && !o.isIsolated()) { + if (o.isKeyboardSelectable() && Or(r) && r.getChildrenSize() === 0) { + r.remove(); + const a = EDs(); + a.add(o.__key); + d5(a); + } else { + o.remove(); + jw().dispatchCommand(sht, undefined); + } + return; + } else if (!e && Or(o) && Or(r) && r.isEmpty()) { + r.remove(); + o.selectStart(); + return; + } + this.modify("extend", e, "character"); + if (this.isCollapsed()) { + if (e && s.offset === 0 && (s.type === "element" ? s.getNode() : s.getNode().getParentOrThrow()).collapseAtStart(this)) { + return; + } + } else { + const a = n.type === "text" ? n.getNode() : null; + r = s.type === "text" ? s.getNode() : null; + if (a !== null && a.isSegmented()) { + const l = n.offset; + const c = a.getTextContentSize(); + if (a.is(r) || e && l !== c || !e && l !== 0) { + vDs(a, e, l); + return; + } + } else if (r !== null && r.isSegmented()) { + const l = s.offset; + const c = r.getTextContentSize(); + if (r.is(a) || e && l !== 0 || !e && l !== c) { + vDs(r, e, l); + return; + } + } + Dir(this, e); + } + } + this.removeText(); + if (e && !t && this.isCollapsed() && this.anchor.type === "element" && this.anchor.offset === 0) { + const s = this.anchor.getNode(); + if (s.isEmpty() && dE(s.getParent()) && s.getIndexWithinParent() === 0) { + s.collapseAtStart(this); + } + } + } + deleteLine(e) { + if (this.isCollapsed()) { + if (this.anchor.type === "text") { + this.modify("extend", e, "lineboundary"); + } + if ((e ? this.focus : this.anchor).offset === 0) { + this.modify("extend", e, "character"); + } + } + this.removeText(); + } + deleteWord(e) { + if (this.isCollapsed()) { + this.modify("extend", e, "word"); + } + this.removeText(); + } + }; + sC = null; + nC = null; + fE = false; + iht = false; + sye = 0; + yJt = { + characterData: true, + childList: true, + subtree: true + }; + uTs = 1; + zsr = Array.isArray; + dTs = typeof queueMicrotask == "function" ? queueMicrotask : i => { + Promise.resolve().then(i); + }; + sht = mr("SELECTION_CHANGE_COMMAND"); + hTs = mr("CLICK_COMMAND"); + h5 = mr("DELETE_CHARACTER_COMMAND"); + hJ = mr("INSERT_LINE_BREAK_COMMAND"); + nht = mr("INSERT_PARAGRAPH_COMMAND"); + fJ = mr("CONTROLLED_TEXT_INSERTION_COMMAND"); + dse = mr("PASTE_COMMAND"); + rht = mr("REMOVE_TEXT_COMMAND"); + hse = mr("DELETE_WORD_COMMAND"); + sU = mr("DELETE_LINE_COMMAND"); + nU = mr("FORMAT_TEXT_COMMAND"); + nye = mr("UNDO_COMMAND"); + rye = mr("REDO_COMMAND"); + oye = mr("KEYDOWN_COMMAND"); + wJt = mr("KEY_ARROW_RIGHT_COMMAND"); + fTs = mr("MOVE_TO_END"); + CJt = mr("KEY_ARROW_LEFT_COMMAND"); + gTs = mr("MOVE_TO_START"); + gJ = mr("KEY_ARROW_UP_COMMAND"); + pJ = mr("KEY_ARROW_DOWN_COMMAND"); + pTs = mr("KEY_COMMAND_ARROW_DOWN_COMMAND"); + mTs = mr("KEY_COMMAND_ARROW_UP_COMMAND"); + bTs = mr("KEY_COMMAND_ARROW_LEFT_COMMAND"); + vTs = mr("KEY_COMMAND_ARROW_RIGHT_COMMAND"); + rU = mr("KEY_ENTER_COMMAND"); + yTs = mr("KEY_SPACE_COMMAND"); + aye = mr("KEY_BACKSPACE_COMMAND"); + oU = mr("KEY_ESCAPE_COMMAND"); + SJt = mr("KEY_DELETE_COMMAND"); + xJt = mr("KEY_ALT_ARROW_UP_COMMAND"); + kJt = mr("KEY_ALT_ARROW_DOWN_COMMAND"); + f5 = mr("KEY_COMMAND_ENTER_COMMAND"); + wTs = mr("KEY_COMMAND_ABORT_COMMAND"); + CTs = mr("KEY_COMMAND_K_COMMAND"); + STs = mr("KEY_COMMAND_Y_COMMAND"); + xTs = mr("KEY_COMMAND_D_COMMAND"); + kTs = mr("KEY_COMMAND_E_COMMAND"); + ETs = mr("KEY_COMMAND_C_COMMAND"); + ITs = mr("KEY_COMMAND_H_COMMAND"); + EJt = mr("KEY_COMMAND_1_COMMAND"); + IJt = mr("KEY_COMMAND_2_COMMAND"); + DJt = mr("KEY_COMMAND_3_COMMAND"); + DTs = mr("KEY_COMMAND_4_COMMAND"); + TTs = mr("KEY_COMMAND_5_COMMAND"); + PTs = mr("KEY_COMMAND_6_COMMAND"); + LTs = mr("KEY_COMMAND_7_COMMAND"); + RTs = mr("KEY_COMMAND_8_COMMAND"); + NTs = mr("KEY_COMMAND_9_COMMAND"); + MTs = mr("KEY_COMMAND_0_COMMAND"); + ATs = mr("KEY_COMMAND_SHIFT_K_COMMAND"); + $Ts = mr("KEY_COMMAND_SHIFT_D_COMMAND"); + FTs = mr("KEY_COMMAND_SHIFT_S_COMMAND"); + OTs = mr("KEY_COMMAND_S_COMMAND"); + _Ts = mr("KEY_COMMAND_J_COMMAND"); + BTs = mr("KEY_COMMAND_Y_COMMAND"); + UTs = mr("KEY_COMMAND_U_COMMAND"); + WTs = mr("KEY_COMMAND_I_COMMAND"); + VTs = mr("KEY_COMMAND_L_COMMAND"); + Jsr = mr("KEY_COMMAND_Z_COMMAND"); + HTs = mr("KEY_COMMAND_T_COMMAND"); + qTs = mr("KEY_COMMAND_P_COMMAND"); + jTs = mr("KEY_COMMAND_B_COMMAND"); + TJt = mr("KEY_COMMAND_A_COMMAND"); + Gsr = mr("KEY_COMMAND_SHIFT_Z_COMMAND"); + PJt = mr("KEY_COMMAND_N_COMMAND"); + zTs = mr("KEY_COMMAND_M_COMMAND"); + JTs = mr("KEY_COMMAND_G_COMMAND"); + GTs = mr("KEY_COMMAND_W_COMMAND"); + LJt = mr("KEY_COMMAND_R_COMMAND"); + RJt = mr("KEY_COMMAND_V_COMMAND"); + NJt = mr("KEY_COMMAND_SLASH_COMMAND"); + MJt = mr("KEY_COMMAND_DOT_COMMAND"); + KTs = mr("KEY_COMMAND_SHIFT_SLASH_COMMAND"); + lye = mr("KEY_BACKSPACE_DELETE_COMMAND"); + YTs = mr("KEY_COMMAND_LEFT_BRACKET_COMMAND"); + XTs = mr("KEY_COMMAND_RIGHT_BRACKET_COMMAND"); + cye = mr("KEY_TAB_COMMAND"); + QTs = mr("KEY_ALT_COMMAND"); + AJt = mr("KEY_ALT_UP_COMMAND"); + ZTs = mr("KEY_COMMAND_COMMAND"); + ePs = mr("KEY_COMMAND_UP_COMMAND"); + tPs = mr("KEY_ALT_1_COMMAND"); + iPs = mr("KEY_ALT_2_COMMAND"); + sPs = mr("KEY_ALT_3_COMMAND"); + nPs = mr("KEY_ALT_4_COMMAND"); + rPs = mr("KEY_ALT_5_COMMAND"); + Ksr = mr("KEY_COMMAND_ESCAPE_COMMAND"); + oPs = mr("KEY_SHIFT_DOWN_COMMAND"); + aPs = mr("KEY_SHIFT_UP_COMMAND"); + Ysr = mr("INSERT_TAB_COMMAND"); + Xsr = mr("INDENT_CONTENT_COMMAND"); + Qsr = mr("OUTDENT_CONTENT_COMMAND"); + uye = mr("DROP_COMMAND"); + Zsr = mr("FORMAT_ELEMENT_COMMAND"); + $Jt = mr("DRAGSTART_COMMAND"); + FJt = mr("DRAGOVER_COMMAND"); + lPs = mr("DRAGEND_COMMAND"); + dye = mr("COPY_COMMAND"); + fse = mr("CUT_COMMAND"); + OJt = mr("CLEAR_EDITOR_COMMAND"); + _Jt = mr("CLEAR_HISTORY_COMMAND"); + mJ = mr("CAN_REDO_COMMAND"); + bJ = mr("CAN_UNDO_COMMAND"); + oht = mr("FOCUS_COMMAND"); + BJt = mr("BLUR_COMMAND"); + cPs = mr("KEY_MODIFIER_COMMAND"); + gse = 1; + qF = 3; + aU = 0; + UJt = 1; + vJ = 2; + WJt = 0; + aht = 1; + lht = 2; + cht = 1; + uht = 2; + hye = 4; + fye = 8; + dht = 16; + hht = 32; + fht = 64; + ght = 128; + uPs = cht | uht | hye | fye | dht | hht | fht | ght; + pht = 1; + gye = 2; + mht = 1; + bht = 2; + vht = 3; + yht = 4; + wht = 5; + Cht = 6; + VJt = "\xA0"; + dPs = "​"; + pye = Uve || Wve || Vve ? VJt : dPs; + jF = ` + +`; + hPs = X7 ? VJt : pye; + HJt = "֑-߿יִ-﷽ﹰ-ﻼ"; + qJt = "A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿"; + fPs = new RegExp("^[^" + qJt + "]*[" + HJt + "]"); + gPs = new RegExp("^[^" + HJt + "]*[" + qJt + "]"); + lU = { + bold: cht, + code: dht, + highlight: ght, + italic: uht, + strikethrough: hye, + subscript: hht, + superscript: fht, + underline: fye + }; + pPs = { + directionless: pht, + unmergeable: gye + }; + jJt = { + center: bht, + end: Cht, + justify: yht, + left: mht, + right: vht, + start: wht + }; + mPs = { + [bht]: "center", + [Cht]: "end", + [yht]: "justify", + [mht]: "left", + [vht]: "right", + [wht]: "start" + }; + bPs = { + normal: WJt, + segmented: lht, + token: aht + }; + vPs = { + [WJt]: "normal", + [lht]: "segmented", + [aht]: "token" + }; + yJ = class OOn extends Qve { + static getType() { + return "text"; + } + static clone(e) { + return new OOn(e.__text, e.__key); + } + constructor(e, t) { + super(t); + this.__text = e; + this.__format = 0; + this.__style = ""; + this.__mode = 0; + this.__detail = 0; + } + getFormat() { + return this.getLatest().__format; + } + getDetail() { + return this.getLatest().__detail; + } + getMode() { + const e = this.getLatest(); + return vPs[e.__mode]; + } + getStyle() { + return this.getLatest().__style; + } + isToken() { + return this.getLatest().__mode === aht; + } + isComposing() { + return this.__key === Z7(); + } + isSegmented() { + return this.getLatest().__mode === lht; + } + isDirectionless() { + return (this.getLatest().__detail & pht) !== 0; + } + isUnmergeable() { + return (this.getLatest().__detail & gye) !== 0; + } + hasFormat(e) { + const t = lU[e]; + return (this.getFormat() & t) !== 0; + } + isSimpleText() { + return this.__type === "text" && this.__mode === 0; + } + getTextContent() { + return this.getLatest().__text; + } + getFormatFlags(e, t) { + const n = this.getLatest().__format; + return _Ds(n, e, t); + } + createDOM(e) { + const t = this.__format; + const s = oJt(this, t); + const n = aJt(this, t); + const r = s === null ? n : s; + const o = xt.document.createElement(r); + let a = o; + if (s !== null) { + a = xt.document.createElement(n); + o.appendChild(a); + } + const l = this.__text; + tTs(a, this, n, t, l, e); + const c = this.__style; + if (c !== "") { + o.style.cssText = c; + } + return o; + } + updateDOM(e, t, s) { + const n = this.__text; + const r = e.__format; + const o = this.__format; + const a = oJt(this, r); + const l = oJt(this, o); + const c = aJt(this, r); + const u = aJt(this, o); + if ((a === null ? c : a) !== (l === null ? u : l)) { + return true; + } + if (a === l && c !== u) { + const w = t.firstChild; + if (w == null) { + ta(false, "updateDOM: prevInnerDOM is null or undefined"); + } + const C = xt.document.createElement(u); + tTs(C, this, u, o, n, s); + t.replaceChild(C, w); + return false; + } + let g = t; + if (l !== null && a !== null) { + g = t.firstChild; + if (g == null) { + ta(false, "updateDOM: innerDOM is null or undefined"); + } + } + eTs(n, g, this); + const b = s.theme.text; + if (b !== undefined && r !== o) { + ZDs(u, r, o, g, b); + } + const v = e.__style; + const y = this.__style; + if (v !== y) { + t.style.cssText = y; + } + return false; + } + static importDOM() { + return { + "#text": () => ({ + conversion: Wsr, + priority: 0 + }), + b: () => ({ + conversion: _sr, + priority: 0 + }), + code: () => ({ + conversion: eU, + priority: 0 + }), + em: () => ({ + conversion: eU, + priority: 0 + }), + i: () => ({ + conversion: eU, + priority: 0 + }), + s: () => ({ + conversion: eU, + priority: 0 + }), + span: () => ({ + conversion: Osr, + priority: 0 + }), + strong: () => ({ + conversion: eU, + priority: 0 + }), + sub: () => ({ + conversion: eU, + priority: 0 + }), + sup: () => ({ + conversion: eU, + priority: 0 + }), + u: () => ({ + conversion: eU, + priority: 0 + }) + }; + } + static importJSON(e) { + const t = Cf(e.text); + t.setFormat(e.format); + t.setDetail(e.detail); + t.setMode(e.mode); + t.setStyle(e.style); + return t; + } + exportDOM(e) { + let { + element: t + } = super.exportDOM(e); + if (t !== null) { + if (this.hasFormat("bold")) { + t = zdt(t, "b"); + } + if (this.hasFormat("italic")) { + t = zdt(t, "i"); + } + if (this.hasFormat("strikethrough")) { + t = zdt(t, "s"); + } + if (this.hasFormat("underline")) { + t = zdt(t, "u"); + } + } + return { + element: t + }; + } + exportJSON() { + return { + detail: this.getDetail(), + format: this.getFormat(), + mode: this.getMode(), + style: this.getStyle(), + text: this.getTextContent(), + type: "text", + version: 1 + }; + } + selectionTransform(e, t) {} + setFormat(e) { + const t = this.getWritable(); + t.__format = typeof e == "string" ? lU[e] : e; + return t; + } + setDetail(e) { + const t = this.getWritable(); + t.__detail = typeof e == "string" ? pPs[e] : e; + return t; + } + setStyle(e) { + const t = this.getWritable(); + t.__style = e; + return t; + } + toggleFormat(e) { + const t = lU[e]; + return this.setFormat(this.getFormat() ^ t); + } + toggleDirectionless() { + const e = this.getWritable(); + e.__detail ^= pht; + return e; + } + toggleUnmergeable() { + const e = this.getWritable(); + e.__detail ^= gye; + return e; + } + setMode(e) { + const t = bPs[e]; + if (this.__mode === t) { + return this; + } + const s = this.getWritable(); + s.__mode = t; + return s; + } + setTextContent(e) { + if (this.__text === e) { + return this; + } + const t = this.getWritable(); + t.__text = e; + return t; + } + select(e, t) { + nD(); + let s = e; + let n = t; + const r = Za(); + const o = this.getTextContent(); + const a = this.__key; + if (typeof o == "string") { + const l = o.length; + if (s === undefined) { + s = l; + } + if (n === undefined) { + n = l; + } + } else { + s = 0; + n = 0; + } + if (Oo(r)) { + const l = Z7(); + if (l === r.anchor.key || l === r.focus.key) { + _x(a); + } + r.setTextNodeRange(this, s, this, n); + } else { + return kDs(a, s, a, n, "text", "text"); + } + return r; + } + spliceText(e, t, s, n) { + const r = this.getWritable(); + const o = r.__text; + const a = s.length; + let l = e; + if (l < 0) { + l = a + l; + if (l < 0) { + l = 0; + } + } + const c = Za(); + if (n && Oo(c)) { + const d = e + a; + c.setTextNodeRange(r, d, r, d); + } + const u = o.slice(0, l) + s + o.slice(l + t); + r.__text = u; + return r; + } + canInsertTextBefore() { + return true; + } + canInsertTextAfter() { + return true; + } + splitText(...e) { + nD(); + const t = this.getLatest(); + const s = t.getTextContent(); + const n = t.__key; + const r = Z7(); + const o = new Set(e); + const a = []; + const l = s.length; + let c = ""; + for (let E = 0; E < l; E++) { + if (c !== "" && o.has(E)) { + a.push(c); + c = ""; + } + c += s[E]; + } + if (c !== "") { + a.push(c); + } + const u = a.length; + if (u === 0) { + return []; + } + if (a[0] === s) { + return [t]; + } + const d = a[0]; + const h = t.getParentOrThrow(); + let g; + const p = t.getFormat(); + const b = t.getStyle(); + const v = t.__detail; + let y = false; + if (t.isSegmented()) { + g = Cf(d); + g.__format = p; + g.__style = b; + g.__detail = v; + y = true; + } else { + g = t.getWritable(); + g.__text = d; + } + const w = Za(); + const C = [g]; + let S = d.length; + for (let E = 1; E < u; E++) { + const D = a[E]; + const P = D.length; + const R = Cf(D).getWritable(); + R.__format = p; + R.__style = b; + R.__detail = v; + const L = R.__key; + const F = S + P; + if (Oo(w)) { + const O = w.anchor; + const U = w.focus; + if (O.key === n && O.type === "text" && O.offset > S && O.offset <= F) { + O.key = L; + O.offset -= S; + w.dirty = true; + } + if (U.key === n && U.type === "text" && U.offset > S && U.offset <= F) { + U.key = L; + U.offset -= S; + w.dirty = true; + } + } + if (r === n) { + _x(L); + } + S = F; + C.push(R); + } + Kir(this); + const x = h.getWritable(); + const k = this.getIndexWithinParent(); + if (y) { + x.splice(k, 0, C); + this.remove(); + } else { + x.splice(k, 1, C); + } + if (Oo(w)) { + $dt(w, h, k, u - 1); + } + return C; + } + mergeWithSibling(e) { + const t = e === this.getPreviousSibling(); + if (!t && e !== this.getNextSibling()) { + ta(false, "mergeWithSibling: sibling must be a previous or next sibling"); + } + const s = this.__key; + const n = e.__key; + const r = this.__text; + const o = r.length; + if (Z7() === n) { + _x(s); + } + const l = Za(); + if (Oo(l)) { + const h = l.anchor; + const g = l.focus; + if (h !== null && h.key === n) { + DDs(h, t, s, e, o); + l.dirty = true; + } + if (g !== null && g.key === n) { + DDs(g, t, s, e, o); + l.dirty = true; + } + } + const c = e.__text; + const u = t ? c + r : r + c; + this.setTextContent(u); + const d = this.getWritable(); + e.remove(); + return d; + } + isTextEntity() { + return false; + } + }; + zJt = new WeakMap(); + yPs = new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/, "i"); + wPs = { + code: "code", + em: "italic", + i: "italic", + s: "strikethrough", + strong: "bold", + sub: "subscript", + sup: "superscript", + u: "underline" + }; + JJt = class _On extends yJ { + static getType() { + return "tab"; + } + static clone(e) { + const t = new _On(e.__key); + t.__text = e.__text; + t.__format = e.__format; + t.__style = e.__style; + return t; + } + constructor(e) { + super("\t", e); + this.__detail = gye; + } + static importDOM() { + return null; + } + static importJSON(e) { + const t = lJt(); + t.setFormat(e.format); + t.setStyle(e.style); + return t; + } + exportJSON() { + return { + ...super.exportJSON(), + type: "tab", + version: 1 + }; + } + setTextContent(e) { + ta(false, "TabNode does not support setTextContent"); + } + setDetail(e) { + ta(false, "TabNode does not support setDetail"); + } + setMode(e) { + ta(false, "TabNode does not support setMode"); + } + canInsertTextBefore() { + return false; + } + canInsertTextAfter() { + return false; + } + }; + wJ = class extends Qve { + constructor(i) { + super(i); + this.__first = null; + this.__last = null; + this.__size = 0; + this.__format = 0; + this.__indent = 0; + this.__dir = null; + } + getFormat() { + return this.getLatest().__format; + } + getFormatType() { + const i = this.getFormat(); + return mPs[i] || ""; + } + getIndent() { + return this.getLatest().__indent; + } + getChildren() { + const i = []; + let e = this.getFirstChild(); + while (e !== null) { + i.push(e); + e = e.getNextSibling(); + } + return i; + } + getChildrenKeys() { + const i = []; + let e = this.getFirstChild(); + while (e !== null) { + i.push(e.__key); + e = e.getNextSibling(); + } + return i; + } + getChildrenSize() { + return this.getLatest().__size; + } + isEmpty() { + return this.getChildrenSize() === 0; + } + isDirty() { + const e = jw()._dirtyElements; + return e !== null && e.has(this.__key); + } + isLastChild() { + const i = this.getLatest(); + const e = this.getParentOrThrow().getLastChild(); + return e !== null && e.is(i); + } + getAllTextNodes() { + const i = []; + let e = this.getFirstChild(); + while (e !== null) { + if (Po(e)) { + i.push(e); + } + if (Or(e)) { + const t = e.getAllTextNodes(); + i.push(...t); + } + e = e.getNextSibling(); + } + return i; + } + getFirstDescendant() { + let i = this.getFirstChild(); + while (i !== null) { + if (Or(i)) { + const e = i.getFirstChild(); + if (e !== null) { + i = e; + continue; + } + } + break; + } + return i; + } + getLastDescendant() { + let i = this.getLastChild(); + while (i !== null) { + if (Or(i)) { + const e = i.getLastChild(); + if (e !== null) { + i = e; + continue; + } + } + break; + } + return i; + } + getDescendantByIndex(i) { + const e = this.getChildren(); + const t = e.length; + if (i >= t) { + const n = e[t - 1]; + return Or(n) && n.getLastDescendant() || n || null; + } + const s = e[i]; + return Or(s) && s.getFirstDescendant() || s || null; + } + getFirstChild() { + const e = this.getLatest().__first; + if (e === null) { + return null; + } else { + return iC(e); + } + } + getFirstChildOrThrow() { + const i = this.getFirstChild(); + if (i === null) { + ta(false, "Expected node %s to have a first child.", this.__key); + } + return i; + } + getLastChild() { + const e = this.getLatest().__last; + if (e === null) { + return null; + } else { + return iC(e); + } + } + getLastChildOrThrow() { + const i = this.getLastChild(); + if (i === null) { + ta(false, "Expected node %s to have a last child.", this.__key); + } + return i; + } + getChildAtIndex(i) { + const e = this.getChildrenSize(); + let t; + let s; + if (i < e / 2) { + t = this.getFirstChild(); + s = 0; + while (t !== null && s <= i) { + if (s === i) { + return t; + } + t = t.getNextSibling(); + s++; + } + return null; + } + t = this.getLastChild(); + s = e - 1; + while (t !== null && s >= i) { + if (s === i) { + return t; + } + t = t.getPreviousSibling(); + s--; + } + return null; + } + getTextContent() { + let i = ""; + const e = this.getChildren(); + const t = e.length; + for (let s = 0; s < t; s++) { + const n = e[s]; + i += n.getTextContent(); + if (Or(n) && s !== t - 1 && !n.isInline()) { + i += jF; + } + } + return i; + } + getTextContentSize() { + let i = 0; + const e = this.getChildren(); + const t = e.length; + for (let s = 0; s < t; s++) { + const n = e[s]; + i += n.getTextContentSize(); + if (Or(n) && s !== t - 1 && !n.isInline()) { + i += jF.length; + } + } + return i; + } + getDirection() { + return this.getLatest().__dir; + } + hasFormat(i) { + if (i !== "") { + const e = jJt[i]; + return (this.getFormat() & e) !== 0; + } + return false; + } + select(i, e) { + nD(); + const t = Za(); + let s = i; + let n = e; + const r = this.getChildrenSize(); + if (!this.canBeEmpty()) { + if (i === 0 && e === 0) { + const a = this.getFirstChild(); + if (Po(a) || Or(a)) { + return a.select(0, 0); + } + } else if ((i === undefined || i === r) && (e === undefined || e === r)) { + const a = this.getLastChild(); + if (Po(a) || Or(a)) { + return a.select(); + } + } + } + if (s === undefined) { + s = r; + } + if (n === undefined) { + n = r; + } + const o = this.__key; + if (Oo(t)) { + t.anchor.set(o, s, "element"); + t.focus.set(o, n, "element"); + t.dirty = true; + } else { + return kDs(o, s, o, n, "element", "element"); + } + return t; + } + selectStart() { + const i = this.getFirstDescendant(); + if (Or(i) || Po(i)) { + return i.select(0, 0); + } else if (i !== null) { + return i.selectPrevious(); + } else { + return this.select(0, 0); + } + } + selectEnd() { + const i = this.getLastDescendant(); + if (Or(i) || Po(i)) { + return i.select(); + } else if (i !== null) { + return i.selectNext(); + } else { + return this.select(); + } + } + clear() { + const i = this.getWritable(); + this.getChildren().forEach(t => t.remove()); + return i; + } + append(...i) { + return this.splice(this.getChildrenSize(), 0, i); + } + setDirection(i) { + const e = this.getWritable(); + e.__dir = i; + return e; + } + setFormat(i) { + const e = this.getWritable(); + e.__format = i !== "" ? jJt[i] : 0; + return this; + } + setIndent(i) { + const e = this.getWritable(); + e.__indent = i; + return this; + } + splice(i, e, t) { + const s = t.length; + const n = this.getChildrenSize(); + const r = this.getWritable(); + const o = r.__key; + const a = []; + const l = []; + const c = this.getChildAtIndex(i + e); + let u = null; + let d = n - e + s; + if (i !== 0) { + if (i === n) { + u = this.getLastChild(); + } else { + const g = this.getChildAtIndex(i); + if (g !== null) { + u = g.getPreviousSibling(); + } + } + } + if (e > 0) { + let g = u === null ? this.getFirstChild() : u.getNextSibling(); + for (let p = 0; p < e; p++) { + if (g === null) { + ta(false, "splice: sibling not found"); + } + const b = g.getNextSibling(); + const v = g.__key; + const y = g.getWritable(); + lJ(y); + l.push(v); + g = b; + } + } + let h = u; + for (let g = 0; g < s; g++) { + const p = t[g]; + if (h !== null && p.is(h)) { + u = h = h.getPreviousSibling(); + } + const b = p.getWritable(); + if (b.__parent === o) { + d--; + } + lJ(b); + const v = p.__key; + if (h === null) { + r.__first = v; + b.__prev = null; + } else { + const y = h.getWritable(); + y.__next = v; + b.__prev = y.__key; + } + if (p.__key === o) { + ta(false, "append: attempting to append self"); + } + b.__parent = o; + a.push(v); + h = p; + } + if (i + e === n) { + if (h !== null) { + const g = h.getWritable(); + g.__next = null; + r.__last = h.__key; + } + } else if (c !== null) { + const g = c.getWritable(); + if (h !== null) { + const p = h.getWritable(); + g.__prev = h.__key; + p.__next = c.__key; + } else { + g.__prev = null; + } + } + r.__size = d; + if (l.length) { + const g = Za(); + if (Oo(g)) { + const p = new Set(l); + const b = new Set(a); + const { + anchor: v, + focus: y + } = g; + if (sTs(v, p, b)) { + Fdt(v, v.getNode(), this, u, c); + } + if (sTs(y, p, b)) { + Fdt(y, y.getNode(), this, u, c); + } + if (d === 0 && !this.canBeEmpty() && !UF(this)) { + this.remove(); + } + } + } + return r; + } + exportJSON() { + return { + children: [], + direction: this.getDirection(), + format: this.getFormatType(), + indent: this.getIndent(), + type: "element", + version: 1 + }; + } + insertNewAfter(i, e) { + return null; + } + canIndent() { + return true; + } + collapseAtStart(i) { + return false; + } + excludeFromCopy(i) { + return false; + } + canExtractContents() { + return true; + } + canReplaceWith(i) { + return true; + } + canInsertAfter(i) { + return true; + } + canBeEmpty() { + return true; + } + canInsertTextBefore() { + return true; + } + canInsertTextAfter() { + return true; + } + isInline() { + return false; + } + isShadowRoot() { + return false; + } + canMergeWith(i) { + return false; + } + extractWithChild(i, e, t) { + return false; + } + }; + Sht = class BOn extends Qve { + static getType() { + return "linebreak"; + } + static clone(e) { + return new BOn(e.__key); + } + constructor(e) { + super(e); + } + getTextContent() { + return ` +`; + } + createDOM() { + return xt.document.createElement("br"); + } + updateDOM() { + return false; + } + static importDOM() { + return { + br: e => { + const t = e.parentElement; + let s; + let n; + if (t !== null && ((s = t.firstChild) === e || s.nextSibling === e && s.nodeType === qF && (s.textContent || "").match(/^[\s|\r?\n|\t]+$/) !== null) && ((n = t.lastChild) === e || n.previousSibling === e && n.nodeType === qF && (n.textContent || "").match(/^[\s|\r?\n|\t]+$/) !== null)) { + return null; + } else { + return { + conversion: Vsr, + priority: 0 + }; + } + } + }; + } + static importJSON(e) { + return Kve(); + } + exportJSON() { + return { + type: "linebreak", + version: 1 + }; + } + }; + CPs = class extends wJ {}; + SPs = class extends wJ { + constructor(i, e) { + super(e); + this.__colSpan = i; + this.__rowSpan = 1; + } + exportJSON() { + return { + ...super.exportJSON(), + colSpan: this.__colSpan, + rowSpan: this.__rowSpan + }; + } + getColSpan() { + return this.__colSpan; + } + setColSpan(i) { + this.getWritable().__colSpan = i; + return this; + } + getRowSpan() { + return this.__rowSpan; + } + setRowSpan(i) { + this.getWritable().__rowSpan = i; + return this; + } + }; + xPs = class extends wJ {}; + kPs = class extends Qve { + constructor(i) { + super(i); + } + decorate(i, e) { + ta(false, "decorate: base method not extended"); + } + isIsolated() { + return false; + } + isInline() { + return true; + } + isKeyboardSelectable() { + return true; + } + }; + xht = class UOn extends wJ { + static getType() { + return "root"; + } + static clone() { + return new UOn(); + } + constructor() { + super("root"); + this.__cachedText = null; + } + getTopLevelElementOrThrow() { + ta(false, "getTopLevelElementOrThrow: root nodes are not top level elements"); + } + getTextContent() { + const e = this.__cachedText; + if ((rse() || jw()._dirtyType === aU) && e !== null) { + return e; + } else { + return super.getTextContent(); + } + } + remove() { + ta(false, "remove: cannot be called on root nodes"); + } + replace(e) { + ta(false, "replace: cannot be called on root nodes"); + } + insertBefore(e) { + ta(false, "insertBefore: cannot be called on root nodes"); + } + insertAfter(e) { + ta(false, "insertAfter: cannot be called on root nodes"); + } + updateDOM(e, t) { + return false; + } + append(...e) { + for (let t = 0; t < e.length; t++) { + const s = e[t]; + if (!Or(s) && !zm(s)) { + ta(false, "rootNode.append: Only element or decorator nodes can be appended to the root node"); + } + } + return super.append(...e); + } + static importJSON(e) { + const t = kp(); + t.setFormat(e.format); + t.setIndent(e.indent); + t.setDirection(e.direction); + return t; + } + exportJSON() { + return { + children: [], + direction: this.getDirection(), + format: this.getFormatType(), + indent: this.getIndent(), + type: "root", + version: 1 + }; + } + collapseAtStart() { + return true; + } + }; + CJ = class WOn extends wJ { + static getType() { + return "paragraph"; + } + static clone(e) { + return new WOn(e.__key); + } + createDOM(e) { + const t = xt.document.createElement("p"); + const s = Gve(e.theme, "paragraph"); + if (s !== undefined) { + t.classList.add(...s); + } + return t; + } + updateDOM(e, t, s) { + return false; + } + static importDOM() { + return { + p: e => ({ + conversion: jsr, + priority: 0 + }) + }; + } + exportDOM(e) { + const { + element: t + } = super.exportDOM(e); + if (t && this.isEmpty()) { + t.append(xt.document.createElement("br")); + } + if (t) { + const s = this.getFormatType(); + t.style.textAlign = s; + const n = this.getDirection(); + if (n) { + t.dir = n; + } + const r = this.getIndent(); + if (r > 0) { + t.style.textIndent = `${r * 20}px`; + } + } + return { + element: t + }; + } + static importJSON(e) { + const t = Bx(); + t.setFormat(e.format); + t.setIndent(e.indent); + t.setDirection(e.direction); + return t; + } + exportJSON() { + return { + ...super.exportJSON(), + type: "paragraph", + version: 1 + }; + } + insertNewAfter(e, t) { + const s = Bx(); + const n = this.getDirection(); + s.setDirection(n); + this.insertAfter(s, t); + return s; + } + collapseAtStart() { + const e = this.getChildren(); + if (e.length === 0 || Po(e[0]) && e[0].getTextContent().trim() === "") { + if (this.getNextSibling() !== null) { + this.selectNext(); + this.remove(); + return true; + } + if (this.getPreviousSibling() !== null) { + this.selectPrevious(); + this.remove(); + return true; + } + } + return false; + } + }; + } +}); +var sg; +var v1; +var EPs; +var kht; +var IPs; +var GJt; +var cU; +var DPs; +var mye; +var Eht; +var pse; +var TPs; +var zy = ue({ + "out-build/vs/platform/reactivestorage/browser/reactiveStorageTypes.js"() { + "use strict"; + + ig(); + xe(); + fr(); + (function (i) { + i[i.None = 0] = "None"; + i[i.Code = 1] = "Code"; + i[i.File = 2] = "File"; + i[i.Failure = 3] = "Failure"; + i[i.Image = 4] = "Image"; + i[i.Folder = 5] = "Folder"; + i[i.Docs = 6] = "Docs"; + i[i.CursorRule = 7] = "CursorRule"; + })(sg ||= {}); + v1 = class { + constructor() { + this.c = undefined; + this.d = undefined; + this.e = false; + } + registerTextAreaElement(i, e) { + this.c = i; + this.d = e; + if (this.e) { + this.focus(); + } + } + insertAtSymbol() { + if (this.d) { + this.d.update(() => { + const i = Cf(" @"); + const e = kp(); + let t = e.getLastChild(); + if (t === null) { + t = Bx(); + e.append(t); + } + t.append(i); + e.selectEnd(); + }); + } + } + focus(i, e) { + if (this.c) { + this.e = false; + if (e || js() !== xt) { + this.c?.focus(); + this.d?.update(() => { + kp().selectEnd(); + i?.(); + }); + } else { + setTimeout(() => { + this.c?.focus(); + this.d?.update(() => { + kp().selectEnd(); + i?.(); + }); + }, 25); + } + } else { + this.e = true; + } + } + isFocused() { + return this.c && this.c === Kt(this.c).document.activeElement; + } + getRef() { + return this.c; + } + }; + (function (i) { + i.initial = "initial"; + i.clarification = "clarification"; + i.plan = "plan"; + i.planFeedback = "planClarification"; + i.breakdown = "breakdown"; + i.breakdownFeedback = "breakdownClarification"; + i.steps = "steps"; + i.stepsFeedback = "stepsFeedback"; + i.undecided = "undecided"; + })(EPs ||= {}); + (function (i) { + i.SIDEBAR = "sidebar"; + i.EDITOR = "editor"; + })(kht ||= {}); + IPs = { + position: { + x: 0, + y: 0 + }, + horizontalBarSize: 0, + tabHeight: 0, + selectedView: "suggested", + devToolsPosition: { + x: 0, + y: 0 + }, + memories: [], + isComposerBarChatCollapsed: false, + composerBarPosition: null, + enableDataHandleDebugging: false + }; + GJt = { + explicitEnableOrDisable: undefined, + preferredModelName: "o1-preview", + lastBackgroundBugbotAt: undefined + }; + cU = { + alwaysKeepComposerInBound: true, + location2: "pane", + nonBarLocation: "pane", + nonBarChatLocation: "pane", + chatLocation: "pane", + hasMigratedChatLocation: false, + hasMigratedComposerGlobalConfigsToModeSpecificConfigs: false, + hasMigratedToAgentIsCmdI: false, + defaultCapabilities: [], + barAnchor: "center", + autoApplyFilesOutsideContext: true, + shouldAutoContinueToolCall: false, + defaultMode2: "agent", + useYoloMode: false, + yoloPrompt: "", + yoloCommandAllowlist: [], + yoloCommandDenylist: [], + yoloMcpToolsDisabled: false, + preferDiffInChat: true, + useStaticContextBank: false, + defaultUseToolsInEdit: false, + unification2: true, + unification12_useReactiveUnificationModeInstead: "merged", + shouldReviewChanges: "enabled", + wasBarPreviouslyOpen: false, + doNotShowYoloModeWarningAgain: false, + selectedFakeStreamerId: null, + yoloDeleteFileDisabled: false, + yoloDotFilesDisabled: true, + yoloOutsideWorkspaceDisabled: true, + webViewerAllowNonLocalhost: false, + isWebSearchToolEnabled: true, + isWebSearchToolEnabled2: false, + isWebSearchToolEnabled3: null, + autoAcceptWebSearchTool: false, + backgroundComposerEnv: "dev", + areSearchToolsEnabledForAskMode: true, + includeProjectLayout: false, + modes: undefined, + modes2: undefined, + modes3: undefined, + modes4: [{ + id: "agent", + name: "Agent", + actionId: "composerMode.agent", + icon: "infinity", + description: "Plan, search, make edits, run commands", + thinkingLevel: "none", + shouldAutoApplyIfNoEditTool: true, + autoFix: true, + autoRun: false, + enabledTools: [], + enabledMcpServers: [] + }, { + id: "chat", + name: "Ask", + actionId: "composerMode.chat", + icon: "chat", + description: "Ask Cursor questions about your codebase", + thinkingLevel: "none", + shouldAutoApplyIfNoEditTool: false, + autoFix: true, + autoRun: false, + enabledTools: [], + enabledMcpServers: [] + }, { + id: "edit", + name: "Manual", + actionId: "composerMode.edit", + icon: "targetTwo", + description: "Manually decide what gets added to the context (no tools)", + thinkingLevel: "none", + shouldAutoApplyIfNoEditTool: true, + autoFix: false, + autoRun: false, + enabledTools: [], + enabledMcpServers: [] + }, { + id: "background", + name: "Background", + actionId: "composerMode.background", + icon: "cloudTwo", + description: "Create background agent", + thinkingLevel: "none", + shouldAutoApplyIfNoEditTool: false, + autoFix: false, + autoRun: false, + enabledTools: [], + enabledMcpServers: [] + }], + codeBlockDisplayPreference: "expanded", + thinkingLevel: "none", + composerMigrationVersion: false, + hasShownBackgroundComposerModalControlPanelHint: false + }; + DPs = { + isNotepadEnabled: true + }; + mye = []; + Eht = []; + (function (i) { + i.NO_ERROR = "NO_ERROR"; + i.NO_REPO = "NO_REPO"; + i.EXTENSION_ERROR = "EXTENSION_ERROR"; + })(pse ||= {}); + TPs = { + cppModels: ["main", "turbo"], + defaultCppModel: "main" + }; + } +}); +function Iht({ + origObject: i, + pathToKey: e, + keyToKeep: t +}) { + if (typeof i == "object" && i !== null) { + if (e.length === 0) { + for (const s in i) { + if (s !== t) { + delete i[s]; + } + } + } else { + const [s, ...n] = e; + if (typeof s == "string") { + if (s in i) { + Iht({ + origObject: i[s], + pathToKey: n, + keyToKeep: t + }); + } + } else if (s === rD.array && Array.isArray(i)) { + i.forEach(r => { + Iht({ + origObject: r, + pathToKey: n, + keyToKeep: t + }); + }); + } + } + } +} +function mse({ + origObject: i, + pathToKey: e, + keyToRemove: t +}) { + if (typeof i == "object" && i !== null) { + if (e.length === 0) { + if (t in i) { + delete i[t]; + } + } else { + const [s, ...n] = e; + if (typeof s == "string") { + if (s in i) { + mse({ + origObject: i[s], + pathToKey: n, + keyToRemove: t + }); + } + } else if (s === rD.array && Array.isArray(i)) { + i.forEach(r => { + mse({ + origObject: r, + pathToKey: n, + keyToRemove: t + }); + }); + } + } + } +} +var rD; +var enr = ue({ + "out-build/vs/platform/reactivestorage/browser/stateMigrations.js"() { + "use strict"; + + (function (i) { + i[i.array = 0] = "array"; + })(rD ||= {}); + } +}); +function zF(i) { + const e = JSON.parse(JSON.stringify(i)); + e.uri = i.uri; + return e; +} +function tnr(i) { + const { + originalTextLines: e, + newTextLines: t, + changes: s, + uri: n, + ...r + } = i; + const o = JSON.parse(JSON.stringify(r)); + o.uri = n; + return o; +} +function bye(i) { + if (!i) { + return; + } + const e = JSON.parse(JSON.stringify(i)); + e.uri = i.uri; + const t = [...i.data.selections]; + e.data = { + ...i.data, + selections: t + }; + e.abortController = i.abortController; + return e; +} +function inr(i) { + for (const e of PPs) { + i.setApplicationUserPersistentStorage("haveNotSeen", { + ...i.applicationUserPersistentStorage.haveNotSeen, + [e]: true + }); + } +} +var _i; +var g5; +var vye; +var SJ; +var xJ; +var Dht; +var yye; +var KJt; +var Tht; +var Pht; +var Lht; +var PPs; +var YJt; +var LPs; +var XJt; +var QJt; +var ZJt; +var RPs; +var Rht; +var snr; +var kJ; +var Cs = ue({ + "out-build/vs/platform/reactivestorage/browser/reactiveStorageService.js"() { + "use strict"; + + We(); + kh(); + $(); + jm(); + Wo(); + q(); + Ps(); + Ee(); + te(); + xc(); + zy(); + enr(); + _i = Ve("reactiveStorageService"); + g5 = "claude-3.5-sonnet"; + vye = "https://cursor.com"; + SJ = "https://api2.cursor.sh"; + xJ = "https://api3.cursor.sh"; + Dht = "https://api4.cursor.sh"; + yye = "https://api4.cursor.sh"; + KJt = "https://api3.cursor.sh"; + Tht = "https://repo42.cursor.sh"; + Pht = "KbZUR41cY7W6zRSdpSUJ7I7mLYBKOCmB"; + Lht = "prod.authentication.cursor.sh"; + PPs = ["chat", "submit", "context"]; + YJt = Ft(); + LPs = { + composerState: { + ...cU + }, + mcpServers: [], + mcpDisabledTools: [], + availableDefaultModels2: [{ + defaultOn: true, + name: "claude-3.5-sonnet", + supportsAgent: true + }], + notepadState: { + ...DPs + }, + bugbotState: { + ...GJt + }, + backgroundComposerState: {}, + dialogDontAskAgainPreferences: {}, + aiFeaturesCopyPasteState: { + mentions: [] + }, + cursorIgnore: { + hierarchicalEnabled: false + }, + teamAdminSettings: { + cursorIgnore: { + hierarchicalEnabled: false + } + }, + shouldShowViewZoneWhenPreviewBoxIsClipped6: false, + syncDevModeColorTheme: true, + cppModelsState: TPs, + isLinterEnabled: false, + aiSettings: { + openAIModel: "claude-3.5-sonnet", + regularChatModel: "claude-3.5-sonnet", + cmdKModel: "claude-3.5-sonnet", + terminalCmdKModel: "claude-3.5-sonnet", + composerModel: "claude-3.5-sonnet", + backgroundComposerModel: "o3", + longContextOpenAIModel: "claude-3-5-sonnet-200k", + composerPreviousNonDefaultModel: "claude-3.5-sonnet", + modelsWithNoDefaultSwitch: [], + modelDefaultSwitchOnNewChat: false, + completedModelMigrations: [], + modelSettingToMaxMode: { + "background-composer": true + } + }, + authenticationSettings: { + githubLoggedIn: false + }, + cursorCreds: { + websiteUrl: vye, + backendUrl: SJ, + authClientId: Pht, + authDomain: Lht, + repoBackendUrl: Tht, + contextBankUrl: SJ, + telemBackendUrl: xJ, + cmdkBackendUrl: KJt, + geoCppBackendUrl: Dht, + cppConfigBackendUrl: yye, + bcProxyUrl: SJ, + credentialsDisplayName: "Prod" + }, + docState: { + visibleDocs: [], + usableDocs: [], + previosulyUsedDocs: [] + }, + lastUpdateHiddenTimeInUnixSeconds: 0, + lintRules: "", + bubbleTimesLeft: 0, + showAgentActionDebugger: false, + cmdLineHookState: { + ignored: false, + timesShown: 0 + }, + showLinterDebugger: false, + linterDebuggerState: { + specificRules: true, + compileErrors: false, + changeBehavior: true, + matchCode: false, + relevance: true, + userAwareness: true + }, + cacheChatPrompts: true, + cmdkDiffHistoryEnabled: false, + shouldOnlyImportOnAccept: true, + cppAutoImportDecorationStyle: "squiggle", + lintSettings: { + forceEnableDiscriminators: [], + forceDisableDiscriminators: [], + forceEnableGenerators: [], + forceDisableGenerators: [], + watcherThreshold: 0.2, + watcherDebounceTimeSeconds: 30, + runOnSaveInstead: true, + silenceIfOverlappingWithRegularLinter: true + }, + lastUpgradeToProNotificationTime: 0, + haveNotSeen: {}, + newUserData: { + toolUsageCount: { + plainChat: "legacy", + contextChat: "legacy", + intentChat: "legacy" + } + }, + azureState: { + useAzure: false + }, + interpreterModeSettings: { + interpreterModeByDefault: false + }, + cppFireOnEveryCursorChange: false, + personalDocs: [], + cppInCmdF: true, + cppManualTriggerWithOpToken: false, + cppTriggerInComments: true, + cppShowWhitespaceOnlyChanges: false, + fastCppEnabled: false, + cppEnabled: true, + cppConfig: undefined, + indexRepository: true, + haveNotImportedFromVSC: false, + shouldAutoParseCmdKLinks: false, + aiPreviewsEnabled: true, + autoCreateNewChatAfterTimeout: true, + aiPreviewSettings: { + enabledFeatures: { + summary: true, + relatedFiles: true, + relatedCommits: true + }, + summary: { + isExpanded: true + }, + relatedFiles: { + isExpanded: true + }, + relatedCommits: { + isExpanded: false + } + }, + chatFadeInAnimationEnabled: false, + isFileSyncClientEnabled: true, + membershipType: undefined, + useFastApplyModel: false, + fastApplyModelType: iJ.DEFAULT, + explicitlyEnableSemanticSearch: false, + aiCursorHelpEnabled: true, + showAllCmdKContexts: false, + backgroundComposerEnv: "prod", + markdownTestString: "", + cppInPeek: true, + fastSemanticSearchEnabled: false, + preferredEmbeddingModel: Y4.UNSPECIFIED, + cursorPredictionUIExperiments: [], + oneTimeSettings: { + shouldDisableGithubCopilot: true, + shouldMigrateFromGpt4ToGpt4o: false, + shouldMigrateFromGpt4oToClaudeSonnet: true, + didMigrateFromGpt4oToClaudeSonnet: false, + didMigrateBackFromClaudeSonnetToGpt4o: false, + didMigrateFromMaxModelNames: false, + hasAcceptedMaxModeConfirmation: false + }, + indexingState: { + lastAskedToIndexTime: 0 + }, + internalAnalyticsDebugMode: false, + fullContextOptions: { + compress: true, + hasDismissed: false + }, + eligibleForSnippetLearning: false, + goneThroughCodeSnippetOnboarding: false, + goneThroughCodeSnippetChangeManagement: false + }; + XJt = [(i, e) => e.isBashMode2 === true ? (delete e.isBashMode2, { + ...e, + isInterpreterMode: true, + interpreterModeSettings: { + interpreterModeByDefault: true + } + }) : e, (i, e) => e.cursorCreds?.cppBackendUrl === undefined ? { + ...e, + cursorCreds: { + ...(e.cursorCreds ?? {}), + cppBackendUrl: xJ + } + } : e, (i, e) => { + if (e.cppEnabled === undefined) { + e.cppEnabled = true; + } + return e; + }, (i, e) => { + if (!e.personalDocs || e.personalDocs.length === 0) { + return e; + } + if (e.personalDocs.some(s => s.numPages === undefined)) { + const s = e.personalDocs.map(n => { + const r = n.pages?.length ?? 0; + return { + ...n, + pages: [...(n.pages ?? []).slice(0, 10)], + numPages: r + }; + }); + return { + ...e, + personalDocs: s + }; + } + return e; + }]; + QJt = { + tasksData: { + tasksDataSchemaVersion: 1, + tasks: [{ + type: "draft", + taskId: YJt, + instruction: "" + }], + displayedTaskId: YJt, + showTabs: false, + activeServerTaskUuids: [] + }, + onboardingMetadata: { + shouldAskToIndex: true, + shouldHideWarning: false + }, + persistentChatMetadata: [], + aiPanePosition: kht.SIDEBAR, + shouldRerankByDefault: false, + indexingData: { + preferredEmbeddingModel: Y4.UNSPECIFIED + }, + composerState: IPs, + isCursorPredictionOutOfRangeIndicatorMinimized2: true, + needsComposerInitialOpening: true, + approvedProjectMcpServers: [], + disabledMcpServers: [], + eligibleForSnippetLearning: false, + isRcpServerEnabled: false + }; + ZJt = [(i, e) => !e.tasksData || !e.tasksData.tasksDataSchemaVersion ? { + ...e, + tasksData: QJt.tasksData + } : e, (i, e) => { + if (e.tasksData && e.tasksData.tasks && Array.isArray(e.tasksData.tasks)) { + const t = e.tasksData.tasks.map(s => typeof s == "object" && s && "type" in s && s.type === "started" ? { + ...s, + SPECIAL_KEY_doNotPersist: false + } : s); + return { + ...e, + tasksData: { + ...e.tasksData, + tasks: t + } + }; + } + return e; + }, (i, e) => !e.onboardingMetadata || !e.onboardingMetadata.shouldAskToIndex ? { + ...e, + onboardingMetadata: { + shouldAskToIndex: true + } + } : e, (i, e) => { + mse({ + origObject: e, + pathToKey: ["persistentChatMetadata", rD.array, "injectedContext", "usedCodebase", "fileResults", rD.array, "file"], + keyToRemove: "contents" + }); + mse({ + origObject: e, + pathToKey: ["persistentChatMetadata", rD.array, "injectedContext", "usedCodebase", "codeResults", rD.array, "codeBlock"], + keyToRemove: "fileContents" + }); + Iht({ + origObject: e, + pathToKey: ["persistentChatMetadata", rD.array, "injectedContext", "usedCurrentFile"], + keyToKeep: "relativeFilePath" + }); + mse({ + origObject: e, + pathToKey: ["persistentChatMetadata", rD.array, "predictedContext", "usedCodebase", "fileResults", rD.array, "file"], + keyToRemove: "contents" + }); + mse({ + origObject: e, + pathToKey: ["persistentChatMetadata", rD.array, "predictedContext", "usedCodebase", "codeResults", rD.array, "codeBlock"], + keyToRemove: "fileContents" + }); + Iht({ + origObject: e, + pathToKey: ["persistentChatMetadata", rD.array, "predictedContext", "usedCurrentFile"], + keyToKeep: "relativeFilePath" + }); + return e; + }]; + RPs = { + composerState: { + infoBoxMessage: undefined + }, + notepadState: { + notepadEditorFocusSignal: undefined + }, + webCmdKState: { + promptBar: undefined + }, + inprogressAIGenerations: [], + aiProjectSteps: [], + runningGeneration: false, + showingErrorMetadata: { + case: null, + error: undefined + }, + showingUpdate: false, + inlineDiffs: [], + simpleDiffs: [], + repositoryMetadata: { + startedPolling: false + }, + cppPopupState: { + cardState: undefined + }, + selectedTab: null, + promptBars: [], + maxTokensHit: false, + continueBubbles: [], + lintState: { + bugs: [], + dismissedBugs: [], + lastLintGenerationUuid: null, + lastLintResult: G7.NONE, + lastLintTimestamp: null, + hoveringOverBugUuid: null + }, + cppState: { + suggestion: undefined, + additionalSuggestions: [], + inProgressSuggestions: [], + candidateSuggestions: {}, + shouldNotTrigger: false, + shouldNotTriggerFromInlineDiffReject: false, + peekViewSuggestion: undefined + }, + holdCppState: { + isHoldingDownCmdK: false + }, + showingDocsModal: false, + newDoc: undefined, + lastCopy: undefined, + refactorDiffIDs: [], + shouldShowReleaseNotes: false, + nonPersistentTasksData: { + backgroundTasks: [] + }, + nonPersistentChatMetadata: [], + feedbackState: { + screenshots: [], + description: undefined, + type: undefined + }, + showUsageBasedPricingModal: undefined, + showReportFeedbackModal: undefined, + repoProgressBars: [], + repositoryIndexingError: undefined, + repositoryIndexingStatus: { + case: "loading" + }, + repositoryLastSyncedTime: undefined, + cmdkBackgroundContextSelections: [], + repositoryIndexingJobs: {}, + mainLocalRepositoryProgress: undefined, + cursorMotionState: { + bars: [] + }, + contextGraphState: { + relatedFiles: null + }, + chatState: { + isFocused: false, + recentlyViewedFiles: [] + }, + semSearchState: { + selectedFile: undefined, + codeSelection: undefined + }, + canWeTrackTelem: false + }; + Rht = class extends H { + constructor(i) { + super(); + this.a = { + context: null, + owner: null, + owned: null, + cleanups: null + }; + } + dispose() { + super.dispose(); + A4(this.a); + } + createImplicitEffect(i, e) { + nz(this.a, () => { + Fe(i, e); + }); + } + createImplicitResource({ + depFn: i, + produceFn: e, + initialValue: t + }) { + const s = nz(this.a, () => M4(i, e, { + initialValue: t + })); + if (s === undefined) { + throw new Error("createResource returned undefined"); + } + return s; + } + onChangeEffect({ + onChange: i, + deps: e, + runNowToo: t + }) { + let s = true; + if (t !== undefined) { + s = !t; + } + nz(this.a, () => { + const n = s ? Va(e, (r, o, a) => { + try { + return i({ + deps: r, + prevDeps: o, + prevReturnValue: a + }); + } catch (l) { + console.error(l); + } + }, { + defer: s + }) : Va(e, (r, o, a) => { + try { + return i({ + deps: r, + prevDeps: o, + prevReturnValue: a + }); + } catch (l) { + console.error(l); + } + }, { + defer: s + }); + Fe(n); + }); + } + render(i, e) { + const t = nz(this.a, () => Jme(i, e)); + if (t === undefined) { + throw new Error("render returned undefined"); + } + return { + dispose: () => t() + }; + } + createSignal(i, e) { + const t = nz(this.a, () => ae(i, e)); + if (t === undefined) { + throw new Error("signal returned undefined"); + } + return t; + } + createStore(...[i, e]) { + const t = nz(this.a, () => i ? yp(i, e) : yp(e)); + if (t === undefined) { + throw new Error("createStore returned undefined"); + } + return t; + } + }; + snr = class VOn extends rj { + static { + this.d = []; + } + static all() { + return VOn.d.values(); + } + constructor(e, t) { + super(e, null); + this.key = e; + this.f = t; + } + getValue(e) { + return this.f.nonPersistentStorage[this.key]; + } + toNegated() { + return this.negate(); + } + isEqualTo(e) { + return oj.create(this.key, e); + } + notEqualsTo(e) { + return hge.create(this.key, e); + } + }; + kJ = class { + constructor(i) { + this.current = i; + } + }; + } +}); +var iP; +var eGt; +var Nht; +var Mht; +var Aht; +var rC; +var JF = ue({ + "out-build/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js"() { + "use strict"; + + xe(); + Jt(); + nt(); + ri(); + zM(); + Ut(); + Mx(); + q(); + Jb(); + rt(); + Ps(); + zt(); + X(); + Xa(); + Wt(); + Me(); + Ee(); + te(); + so(); + mn(); + dpe(); + dVt(); + yf(); + yt(); + Eo(); + Tr(); + gVt(); + mVt(); + GM(); + vVt(); + PF(); + Gus(); + Cs(); + qT(); + eGt = "editor.changePasteType"; + Nht = "editor.pasteAs.preferences"; + Mht = new fe("pasteWidgetVisible", false, f(994, null)); + Aht = "application/vnd.code.copymetadata"; + rC = class extends H { + static { + iP = this; + } + static { + this.ID = "editor.contrib.copyPasteActionController"; + } + static get(e) { + return e.getContribution(iP.ID); + } + static setConfigureDefaultAction(e) { + iP.a = e; + } + constructor(e, t, s, n, r, o, a, l, c, u, d) { + super(); + this.m = s; + this.n = n; + this.q = r; + this.r = o; + this.s = a; + this.t = l; + this.u = c; + this.w = u; + this.y = d; + this.c = e; + const h = e.getContainerDomNode(); + this.D(Ce(h, "copy", g => this.C(g))); + this.D(Ce(h, "cut", g => this.C(g))); + this.D(Ce(h, "paste", g => this.F(g), true)); + this.h = this.D(new Hme("pasteIntoEditor", e, t)); + this.j = this.D(t.createInstance(zme, "pasteIntoEditor", e, Mht, { + id: eGt, + label: f(995, null) + }, () => iP.a ? [iP.a] : [])); + } + changePasteType() { + this.j.tryShowSelector(); + } + pasteAs(e) { + this.c.focus(); + try { + this.g = { + preferred: e + }; + this.q.executeCommand("editor.action.clipboardPasteAction"); + } finally { + this.g = undefined; + } + } + clearWidgets() { + this.j.clear(); + } + z() { + return this.c.getOption(89).enabled; + } + async finishedPaste() { + await this.f; + } + C(e) { + if (this.c.isChatCodeblock === true) { + this.y.registerEvent("chat.copy.codeblock.manual"); + } else if (this.c.isSimpleWidget === false) { + this.y.registerEvent("editor.copy.non_vim_mode"); + } + if (!this.c.hasTextFocus() || (this.n.clearInternalState?.(), !e.clipboardData)) { + return; + } + const t = this.c.getModel(); + const s = this.c.getSelections(); + if (!t || !s?.length) { + return; + } + const n = this.c.getOption(38); + let r = s; + const o = s.length === 1 && s[0].isEmpty(); + if (o) { + if (!n) { + return; + } + r = [new Z(r[0].startLineNumber, 1, r[0].startLineNumber, 1 + t.getLineLength(r[0].startLineNumber))]; + } + const a = this.c._getViewModel()?.getPlainTextToCopy(s, n, ln); + const l = Array.isArray(a) ? a : null; + this.w.setNonPersistentStorage({ + lastCopy: { + text: Array.isArray(a) ? a.join(` +`) : a ?? "", + range: { + selectionStartLineNumber: r[0].startLineNumber, + selectionStartColumn: r[0].startColumn, + positionLineNumber: r[0].endLineNumber, + positionColumn: r[0].endColumn + }, + languageId: t?.getLanguageIdAtPosition(r[0].startLineNumber, r[0].startColumn) ?? "", + uri: t.uri + } + }); + if (!this.z()) { + return; + } + const c = { + multicursorText: l, + pasteOnNewLine: o, + mode: null + }; + const u = this.s.documentPasteEditProvider.ordered(t).filter(b => !!b.prepareDocumentPaste); + if (!u.length) { + this.J(e.clipboardData, { + defaultPastePayload: c + }); + return; + } + const d = Dus(e.clipboardData); + const h = u.flatMap(b => b.copyMimeTypes ?? []); + const g = Ft(); + this.J(e.clipboardData, { + id: g, + providerCopyMimeTypes: h, + defaultPastePayload: c + }); + const p = ql(async b => { + const v = dr(await Promise.all(u.map(async y => { + try { + return await y.prepareDocumentPaste(t, r, d, b); + } catch (w) { + console.error(w); + return; + } + }))); + v.reverse(); + for (const y of v) { + for (const [w, C] of y) { + d.replace(w, C); + } + } + return d; + }); + iP.b?.dataTransferPromise.cancel(); + iP.b = { + handle: g, + dataTransferPromise: p + }; + } + async F(e) { + if (!e.clipboardData || !this.c.hasTextFocus()) { + return; + } + iv.get(this.c)?.closeMessage(); + this.f?.cancel(); + this.f = undefined; + const t = this.c.getModel(); + const s = this.c.getSelections(); + if (!s?.length || !t || this.c.getOption(96) || !this.z() && !this.g) { + return; + } + const n = this.L(e); + const r = Oct(e.clipboardData); + r.delete(Aht); + const o = Array.from(e.clipboardData.files).map(c => c.type); + const a = [...e.clipboardData.types, ...o, ...(n?.providerCopyMimeTypes ?? []), pl.uriList]; + const l = this.s.documentPasteEditProvider.ordered(t).filter(c => { + const u = this.g?.preferred; + if (u && !this.Q(c, u)) { + return false; + } else { + return c.pasteMimeTypes?.some(d => $Qn(d, a)); + } + }); + if (!l.length) { + if (this.g?.preferred) { + this.G(s, this.g.preferred); + e.preventDefault(); + e.stopImmediatePropagation(); + } + return; + } + e.preventDefault(); + e.stopImmediatePropagation(); + if (!this.c.isSimpleWidget && !this.c.isChatCodeblock) { + this.y.registerEvent("editor.paste"); + } + if (this.g) { + this.I(this.g.preferred, l, s, r, n); + } else { + this.H(l, s, r, n, e); + } + } + G(e, t) { + const s = "only" in t ? t.only.value : "preferences" in t ? t.preferences.length ? t.preferences.map(n => n.value).join(", ") : f(996, null) : t.providerId; + iv.get(this.c)?.showMessage(f(997, null, s), e[0].getStartPosition()); + } + H(e, t, s, n, r) { + const o = this.c; + if (!o.hasModel()) { + return; + } + const a = new J4(o, 3, undefined); + const l = ql(async c => { + const u = this.c; + if (!u.hasModel()) { + return; + } + const d = u.getModel(); + const h = new Q(); + const g = h.add(new Xi(c)); + h.add(a.token.onCancellationRequested(() => g.cancel())); + const p = g.token; + try { + await this.M(s, n, p); + if (p.isCancellationRequested) { + return; + } + const b = e.filter(w => this.P(w, s)); + if (!b.length || b.length === 1 && b[0] instanceof Lie) { + return this.O(s, n, p, r); + } + const v = { + triggerKind: mpe.Automatic + }; + const y = await this.N(b, s, d, t, v, p); + h.add(y); + if (p.isCancellationRequested) { + return; + } + if (y.edits.length === 1 && y.edits[0].provider instanceof Lie) { + return this.O(s, n, p, r); + } + if (y.edits.length) { + const w = u.getOption(89).showPasteSelector === "afterPaste"; + return this.j.applyEditAndShowIfNeeded(t, { + activeEditIndex: this.R(d, y.edits), + allEdits: y.edits + }, w, (C, S) => new Promise((x, k) => { + (async () => { + try { + const E = C.provider.resolveDocumentPasteEdit?.(C, S); + const D = new uc(); + const P = E && (await this.h.showWhile(t[0].getEndPosition(), f(998, null), Promise.race([D.p, E]), { + cancel: () => { + D.cancel(); + return k(new fl()); + } + }, 0)); + if (P) { + C.additionalEdit = P.additionalEdit; + } + return x(C); + } catch (E) { + return k(E); + } + })(); + }), p); + } + await this.O(s, n, p, r); + } finally { + h.dispose(); + if (this.f === l) { + this.f = undefined; + } + } + }); + this.h.showWhile(t[0].getEndPosition(), f(999, null), l, { + cancel: async () => { + try { + l.cancel(); + if (a.token.isCancellationRequested) { + return; + } + await this.O(s, n, a.token, r); + } finally { + a.dispose(); + } + } + }).then(() => { + a.dispose(); + }); + this.f = l; + } + I(e, t, s, n, r) { + const o = ql(async a => { + const l = this.c; + if (!l.hasModel()) { + return; + } + const c = l.getModel(); + const u = new Q(); + const d = u.add(new J4(l, 3, undefined, a)); + try { + await this.M(n, r, d.token); + if (d.token.isCancellationRequested) { + return; + } + let h = t.filter(y => this.P(y, n, e)); + if (e) { + h = h.filter(y => this.Q(y, e)); + } + const g = { + triggerKind: mpe.PasteAs, + only: e && "only" in e ? e.only : undefined + }; + let p = u.add(await this.N(h, n, c, s, g, d.token)); + if (d.token.isCancellationRequested) { + return; + } + if (e) { + p = { + edits: p.edits.filter(y => "only" in e ? e.only.contains(y.kind) : "preferences" in e ? e.preferences.some(w => w.contains(y.kind)) : e.providerId === y.provider.id), + dispose: p.dispose + }; + } + if (!p.edits.length) { + if (e) { + this.G(s, e); + } + return; + } + let b; + if (e) { + b = p.edits.at(0); + } else { + const y = { + id: "editor.pasteAs.default", + label: f(1000, null), + edit: undefined + }; + const w = await this.t.pick([...p.edits.map(C => ({ + label: C.title, + description: C.kind?.value, + edit: C + })), ...(iP.a ? [{ + type: "separator" + }, { + label: iP.a.label, + edit: undefined + }] : [])], { + placeHolder: f(1001, null) + }); + if (w === y) { + iP.a?.run(); + return; + } + b = w?.edit; + } + if (!b) { + return; + } + const v = $us(c.uri, s, b); + await this.m.apply(v, { + editor: this.c + }); + } finally { + u.dispose(); + if (this.f === o) { + this.f = undefined; + } + } + }); + this.u.withProgress({ + location: 10, + title: f(1002, null) + }, () => o); + } + J(e, t) { + e.setData(Aht, JSON.stringify(t)); + } + L(e) { + if (!e.clipboardData) { + return; + } + const t = e.clipboardData.getData(Aht); + if (t) { + try { + return JSON.parse(t); + } catch { + return; + } + } + const [s, n] = dte.getTextData(e.clipboardData); + if (n) { + return { + defaultPastePayload: { + mode: n.mode, + multicursorText: n.multicursorText ?? null, + pasteOnNewLine: !!n.isFromEmptySelection + } + }; + } + } + async M(e, t, s) { + if (t?.id && iP.b?.handle === t.id) { + const n = await iP.b.dataTransferPromise; + if (s.isCancellationRequested) { + return; + } + for (const [r, o] of n) { + e.replace(r, o); + } + } + if (!e.has(pl.uriList)) { + const n = await this.n.readResources(); + if (s.isCancellationRequested) { + return; + } + if (n.length) { + e.append(pl.uriList, IF(jM.create(n))); + } + } + } + async N(e, t, s, n, r, o) { + const a = new Q(); + const l = await mm(Promise.all(e.map(async u => { + try { + const d = await u.provideDocumentPasteEdits?.(s, n, t, r, o); + if (d) { + a.add(d); + } + return d?.edits?.map(h => ({ + ...h, + provider: u + })); + } catch (d) { + if (!ca(d)) { + console.error(d); + } + return; + } + })), o); + const c = dr(l ?? []).flat().filter(u => !r.only || r.only.contains(u.kind)); + return { + edits: Fus(c), + dispose: () => a.dispose() + }; + } + async O(e, t, s, n) { + const o = (await (e.get(pl.text) ?? e.get("text"))?.asString()) ?? ""; + if (s.isCancellationRequested) { + return; + } + const a = { + clipboardEvent: n, + text: o, + pasteOnNewLine: t?.defaultPastePayload.pasteOnNewLine ?? false, + multicursorText: t?.defaultPastePayload.multicursorText ?? null, + mode: null + }; + this.c.trigger("keyboard", "paste", a); + } + P(e, t, s) { + if (e.pasteMimeTypes?.some(n => t.matches(n))) { + return !s || this.Q(e, s); + } else { + return false; + } + } + Q(e, t) { + if ("only" in t) { + return e.providedPasteEditKinds.some(s => t.only.contains(s)); + } else if ("preferences" in t) { + return t.preferences.some(s => t.preferences.some(n => n.contains(s))); + } else { + return e.id === t.providerId; + } + } + R(e, t) { + const s = this.r.getValue(Nht, { + resource: e.uri + }); + for (const n of Array.isArray(s) ? s : []) { + const r = new _c(n); + const o = t.findIndex(a => r.contains(a.kind)); + if (o >= 0) { + return o; + } + } + return 0; + } + }; + rC = iP = __decorate([__param(1, re), __param(2, eg), __param(3, Zr), __param(4, gt), __param(5, ve), __param(6, nn), __param(7, zi), __param(8, ra), __param(9, _i), __param(10, Rx)], rC); + } +}); +var NPs; +var sn; +var uU; +var Nu; +var wl = ue({ + "out-build/vs/platform/markers/common/markers.js"() { + "use strict"; + + Wa(); + X(); + te(); + (function (i) { + i[i.Unnecessary = 1] = "Unnecessary"; + i[i.Deprecated = 2] = "Deprecated"; + })(NPs ||= {}); + (function (i) { + i[i.Hint = 1] = "Hint"; + i[i.Info = 2] = "Info"; + i[i.AI = 3] = "AI"; + i[i.Warning = 4] = "Warning"; + i[i.Error = 8] = "Error"; + })(sn ||= {}); + (function (i) { + function e(o, a) { + return a - o; + } + i.compare = e; + const t = Object.create(null); + t[i.Error] = f(2002, null); + t[i.Warning] = f(2003, null); + t[i.Info] = f(2004, null); + t[i.AI] = "AI Hint"; + function s(o) { + return t[o] || ""; + } + i.toString = s; + function n(o) { + switch (o) { + case cs.Error: + return i.Error; + case cs.Warning: + return i.Warning; + case cs.Info: + return i.Info; + case cs.Ignore: + return i.Hint; + case cs.AI: + return i.AI; + } + } + i.fromSeverity = n; + function r(o) { + switch (o) { + case i.Error: + return cs.Error; + case i.Warning: + return cs.Warning; + case i.Info: + return cs.Info; + case i.Hint: + return cs.Ignore; + case i.AI: + return cs.AI; + } + } + i.toSeverity = r; + })(sn ||= {}); + (function (i) { + const e = ""; + function t(n) { + return s(n, true); + } + i.makeKey = t; + function s(n, r) { + const o = [e]; + if (n.source) { + o.push(n.source.replace("¦", "\\¦")); + } else { + o.push(e); + } + if (n.code) { + if (typeof n.code == "string") { + o.push(n.code.replace("¦", "\\¦")); + } else { + o.push(n.code.value.replace("¦", "\\¦")); + } + } else { + o.push(e); + } + if (n.severity !== undefined && n.severity !== null) { + o.push(sn.toString(n.severity)); + } else { + o.push(e); + } + if (n.message && r) { + o.push(n.message.replace("¦", "\\¦")); + } else { + o.push(e); + } + if (n.startLineNumber !== undefined && n.startLineNumber !== null) { + o.push(n.startLineNumber.toString()); + } else { + o.push(e); + } + if (n.startColumn !== undefined && n.startColumn !== null) { + o.push(n.startColumn.toString()); + } else { + o.push(e); + } + if (n.endLineNumber !== undefined && n.endLineNumber !== null) { + o.push(n.endLineNumber.toString()); + } else { + o.push(e); + } + if (n.endColumn !== undefined && n.endColumn !== null) { + o.push(n.endColumn.toString()); + } else { + o.push(e); + } + o.push(e); + return o.join("¦"); + } + i.makeKeyOptionalMessage = s; + })(uU ||= {}); + Nu = Ve("markerService"); + } +}); +var gE; +var $ht; +var MPs; +var APs; +var Fht; +var mR = ue({ + "out-build/vs/editor/common/services/languageFeatureDebounce.js"() { + "use strict"; + + Gl(); + In(); + Xf(); + Aa(); + It(); + te(); + Zt(); + At(); + gE = Ve("ILanguageFeatureDebounceService"); + (function (i) { + const e = new WeakMap(); + let t = 0; + function s(n) { + let r = e.get(n); + if (r === undefined) { + r = ++t; + e.set(n, r); + } + return r; + } + i.of = s; + })($ht ||= {}); + MPs = class { + constructor(i) { + this.a = i; + } + get(i) { + return this.a; + } + update(i, e) { + return this.a; + } + default() { + return this.a; + } + }; + APs = class { + constructor(i, e, t, s, n, r) { + this.b = i; + this.c = e; + this.d = t; + this.e = s; + this.f = n; + this.g = r; + this.a = new vc(50, 0.7); + } + h(i) { + return i.id + this.d.all(i).reduce((e, t) => urt($ht.of(t), e), 0); + } + get(i) { + const e = this.h(i); + const t = this.a.get(e); + if (t) { + return yc(t.value, this.f, this.g); + } else { + return this.default(); + } + } + update(i, e) { + const t = this.h(i); + let s = this.a.get(t); + if (!s) { + s = new Ozi(6); + this.a.set(t, s); + } + const n = yc(s.update(e), this.f, this.g); + if (!_v(i.uri, "output")) { + this.b.trace(`[DEBOUNCE: ${this.c}] for ${i.uri.toString()} is ${n}ms`); + } + return n; + } + i() { + const i = new Afe(); + for (const [, e] of this.a) { + i.update(e.value); + } + return i.value; + } + default() { + const i = this.i() | 0 || this.e; + return yc(i, this.f, this.g); + } + }; + Fht = class { + constructor(e, t) { + this.c = e; + this.a = new Map(); + this.b = t.isExtensionDevelopment || !t.isBuilt; + } + for(e, t, s) { + const n = s?.min ?? 50; + const r = s?.max ?? n ** 2; + const o = s?.key ?? undefined; + const a = `${$ht.of(e)},${n}${o ? "," + o : ""}`; + let l = this.a.get(a); + if (!l) { + if (this.b) { + this.c.debug(`[DEBOUNCE: ${t}] is disabled in developed mode`); + l = new MPs(n * 1.5); + } else { + l = new APs(this.c, t, e, this.d() | 0 || n * 1.5, n, r); + } + this.a.set(a, l); + } + return l; + } + d() { + const e = new Afe(); + for (const t of this.a.values()) { + e.update(t.default()); + } + return e.value; + } + }; + Fht = __decorate([__param(0, Bt), __param(1, pa)], Fht); + it(gE, Fht, 1); + } +}); +var tGt; +var iGt; +var bse; +var rA; +var oA; +var GF; +var sP; +var p5; +var Sf; +var Jy; +var $Ps; +var FPs; +var wye; +var Cye; +var Oht; +var _ht; +var EJ; +var aA; +var vse; +var sGt; +var IJ; +var nGt; +var rGt; +var OPs; +var KF; +var oGt; +var _Ps; +var Sye; +var Bht; +var yse; +var Uht; +var Wht; +var YF; +var aGt; +var lGt; +var xye; +var wse; +var BPs; +var Vht; +var kye; +var cGt; +var uGt; +var dGt; +var hGt; +var Eye; +var Hht; +var qht; +var UPs; +var jht; +var zht; +var WPs; +var Jht; +var Ght; +var Cse; +var Kht; +var Yht; +var DJ; +var VPs; +var TJ; +var Sse; +var XF; +var Xht; +var Qht; +var Wx; +var dU; +var fGt; +var xse; +var gGt; +var kse; +var Zht; +var Ese; +var eft; +var pGt; +var tft; +var Iye; +var mGt; +var HPs; +var qPs; +var bGt; +var nnr; +var vGt; +var jPs; +var zPs; +var JPs; +var GPs; +var KPs; +var YPs; +var XPs; +var ift; +var sft; +var nft; +var rft; +var oft; +var QPs; +var aft; +var ZPs; +var eLs; +var yGt; +var tLs; +var PJ; +var wGt; +var lft; +var CGt; +var cft; +var uft; +var SGt; +var Dye; +var $l = ue({ + "out-build/vs/workbench/contrib/composer/browser/constants.js"() { + "use strict"; + + iu(); + He(); + Pn(); + tGt = { + none: "None", + applying: "Applying", + running: "Running", + generating: "Generating", + apply_pending: "Waiting to be applied", + cancelled: "Cancelled", + completed: "Completed", + accepted: "Accepted", + rejected: "Rejected", + aborted: "Aborted", + outdated: "Outdated" + }; + iGt = 100000; + bse = 24; + rA = 10; + oA = 0; + GF = 4; + sP = "transparent"; + p5 = "transparent"; + Sf = 10; + Jy = 6; + $Ps = 400; + FPs = 400; + wye = 320; + Cye = 320; + Oht = 800; + _ht = 800; + EJ = 20; + aA = 320; + vse = 5; + sGt = 320; + IJ = "New Chat"; + nGt = "Show Chat History"; + rGt = "Show Chat History (Editor)"; + OPs = 7200000; + KF = "composer.startComposerPrompt2"; + oGt = "composer.startComposerPrompt"; + _Ps = "composer.startComposerPromptFromSelection"; + Sye = "composer.addfilestocomposer"; + Bht = "composer.addfilestonnewcomposer"; + yse = "composer.showComposerHistory"; + Uht = "composer.showBackgroundAgentHistory"; + Wht = "composer.showComposerHistoryEditor"; + YF = J5t; + aGt = "composer.selectPreviousComposer"; + lGt = "composer.selectNextComposer"; + xye = "composer.addsymbolstonewcomposer"; + wse = "composer.addsymbolstocomposer"; + BPs = "aichat.newfollowupaction"; + Vht = "composer.fixerrormessage"; + kye = "composer.openAsPane"; + cGt = "composer.openAsBar"; + uGt = "composer.openAsEditor"; + dGt = "composer.exportChatAsMd"; + hGt = "composer.copyRequestId"; + Eye = "composer.cancelChat"; + Hht = "composer.reapplyCodeblock"; + qht = "composer.resumeCurrentChat"; + UPs = "composer.newAgentChat"; + jht = "composer.updateTitle"; + zht = "composer.updateStatus"; + WPs = "composer.cycleMode"; + Jht = "composer.toggleChatAsEditor"; + Ght = "composer.toggleAllVsSingleChatContext"; + Cse = "composer.closeComposerTab"; + Kht = "composer.previousChatTab"; + Yht = "composer.nextChatTab"; + DJ = "composer.openModelToggle"; + VPs = "composer.cycleModel"; + TJ = "composer.openModeMenu"; + Sse = "composer.openAddContextMenu"; + XF = "composer.openComposer"; + Xht = "composer.updateSummaryIfOutdated"; + Qht = "composer.getComposerHandleById"; + Wx = "composer.cancelComposerStep"; + dU = "composer.cancelTerminalToolCall"; + fGt = "composer.resetMode"; + xse = "composer.createNewBackgroundAgent"; + gGt = "composer.clearComposerTabs"; + kse = "composer.createNewComposerTab"; + Zht = "composer.duplicateChat"; + Ese = "composer.sendToAgent"; + eft = "composer.refundLastRequest"; + pGt = "composer.handleBugBotDeeplink"; + tft = "composer.getOrderedSelectedComposerIds"; + Iye = "Chat"; + mGt = A.files; + HPs = "workbench.panel.composerChatViewPane"; + qPs = "composer.reactiveStorageId"; + bGt = "aidebug.autodebugterminal"; + nnr = [eC.ITERATE]; + vGt = 3; + jPs = 2090; + zPs = 2087; + JPs = 3114; + GPs = 3111; + KPs = 546; + YPs = 3106; + XPs = 50; + ift = true; + sft = 5; + nft = 12; + rft = 100; + oft = 200; + QPs = 18; + aft = 240; + ZPs = 8; + eLs = 12; + yGt = 3; + tLs = 2; + PJ = [[A.infinity, A.editTwo, A.eraser, A.swirlSparkle, A.folder], [A.lightning, A.inboxTwo, A.brain, A.magnifyingGlass, A.microphone], [A.running, A.fileAddTwo, A.stopThree, A.chat, A.fileTwo], [A.list, A.calendarTwo, A.hammer, A.paperWords, A.mortarboard]]; + wGt = "Start New Chat"; + lft = "New Background Agent"; + CGt = "Go Back to Local Machine"; + cft = "cursorAuth/onboardingDate"; + uft = "cursorAuth/changeManagementCodeSnippets"; + SGt = "cursorAuth/workspaceOpenedDate"; + Dye = false; + } +}); +function no(i) { + if (i && typeof i.getEditorType == "function") { + return i.getEditorType() === PM.ICodeEditor; + } else { + return false; + } +} +function _f(i) { + if (i && typeof i.getEditorType == "function") { + return i.getEditorType() === PM.IDiffEditor; + } else { + return false; + } +} +function rnr(i) { + if (i && typeof i.getEditorType == "function") { + return i.getEditorType() === PM.InlineMultiDiffEditor; + } else { + return false; + } +} +function LJ(i) { + return !!i && typeof i == "object" && typeof i.onDidChangeActiveEditor == "function"; +} +function kb(i) { + if (no(i)) { + return i; + } else if (_f(i)) { + return i.getModifiedEditor(); + } else if (LJ(i) && no(i.activeCodeEditor)) { + return i.activeCodeEditor; + } else { + return null; + } +} +function onr(i) { + if (no(i) || _f(i)) { + return i; + } else { + return null; + } +} +var iLs; +var sLs; +var nLs; +var rLs; +var wa = ue({ + "out-build/vs/editor/browser/editorBrowser.js"() { + "use strict"; + + E4(); + (function (i) { + i[i.EXACT = 0] = "EXACT"; + i[i.ABOVE = 1] = "ABOVE"; + i[i.BELOW = 2] = "BELOW"; + })(iLs ||= {}); + (function (i) { + i[i.TOP_RIGHT_CORNER = 0] = "TOP_RIGHT_CORNER"; + i[i.BOTTOM_RIGHT_CORNER = 1] = "BOTTOM_RIGHT_CORNER"; + i[i.TOP_CENTER = 2] = "TOP_CENTER"; + i[i.BOTTOM_CENTER = 3] = "BOTTOM_CENTER"; + })(sLs ||= {}); + (function (i) { + i[i.UNKNOWN = 0] = "UNKNOWN"; + i[i.TEXTAREA = 1] = "TEXTAREA"; + i[i.GUTTER_GLYPH_MARGIN = 2] = "GUTTER_GLYPH_MARGIN"; + i[i.GUTTER_LINE_NUMBERS = 3] = "GUTTER_LINE_NUMBERS"; + i[i.GUTTER_LINE_DECORATIONS = 4] = "GUTTER_LINE_DECORATIONS"; + i[i.GUTTER_VIEW_ZONE = 5] = "GUTTER_VIEW_ZONE"; + i[i.CONTENT_TEXT = 6] = "CONTENT_TEXT"; + i[i.CONTENT_EMPTY = 7] = "CONTENT_EMPTY"; + i[i.CONTENT_VIEW_ZONE = 8] = "CONTENT_VIEW_ZONE"; + i[i.CONTENT_WIDGET = 9] = "CONTENT_WIDGET"; + i[i.OVERVIEW_RULER = 10] = "OVERVIEW_RULER"; + i[i.SCROLLBAR = 11] = "SCROLLBAR"; + i[i.OVERLAY_WIDGET = 12] = "OVERLAY_WIDGET"; + i[i.OUTSIDE_EDITOR = 13] = "OUTSIDE_EDITOR"; + })(nLs ||= {}); + (function (i) { + i[i.Idle = 0] = "Idle"; + i[i.ComputingDiff = 1] = "ComputingDiff"; + i[i.DiffComputed = 2] = "DiffComputed"; + })(rLs ||= {}); + } +}); +var Zs; +var oLs; +var jn = ue({ + "out-build/vs/platform/label/common/label.js"() { + "use strict"; + + te(); + Zs = Ve("labelService"); + (function (i) { + i[i.SHORT = 0] = "SHORT"; + i[i.MEDIUM = 1] = "MEDIUM"; + i[i.LONG = 2] = "LONG"; + })(oLs ||= {}); + } +}); +var bR; +var rv; +var y1; +var vR; +var fS; +var dft; +var Qv = ue({ + "out-build/vs/editor/contrib/documentSymbols/browser/outlineModel.js"() { + "use strict"; + + Jt(); + ri(); + Ut(); + sa(); + In(); + $i(); + Rs(); + yt(); + mR(); + te(); + It(); + Rn(); + q(); + Tr(); + bR = class Q3i { + remove() { + this.parent?.children.delete(this.id); + } + static findId(e, t) { + let s; + if (typeof e == "string") { + s = `${t.id}/${e}`; + } else { + s = `${t.id}/${e.name}`; + if (t.children.get(s) !== undefined) { + s = `${t.id}/${e.name}_${e.range.startLineNumber}_${e.range.startColumn}`; + } + } + let n = s; + for (let r = 0; t.children.get(n) !== undefined; r++) { + n = `${s}_${r}`; + } + return n; + } + static getElementById(e, t) { + if (!e) { + return; + } + const s = LL(e, t.id); + if (s === e.length) { + return t; + } + if (!(s < t.id.length)) { + for (const [, n] of t.children) { + const r = Q3i.getElementById(e, n); + if (r) { + return r; + } + } + } + } + static size(e) { + let t = 1; + for (const [, s] of e.children) { + t += Q3i.size(s); + } + return t; + } + static empty(e) { + return e.children.size === 0; + } + }; + rv = class extends bR { + constructor(i, e, t) { + super(); + this.id = i; + this.parent = e; + this.symbol = t; + this.children = new Map(); + } + getAllSymbols(i) { + const e = []; + e.push(this.symbol); + for (const [, t] of this.children) { + e.push(...t.getAllSymbols(i)); + } + return e; + } + }; + y1 = class extends bR { + constructor(i, e, t, s) { + super(); + this.id = i; + this.parent = e; + this.label = t; + this.order = s; + this.children = new Map(); + } + getAllSymbols(i) { + const e = []; + for (const [, t] of this.children) { + e.push(...t.getAllSymbols(i)); + } + return e; + } + getItemEnclosingPosition(i, e = false) { + if (i) { + return this.c(i, this.children, e); + } else { + return undefined; + } + } + c(i, e, t) { + for (const [, s] of e) { + if (!!s.symbol.range && !!Z.containsPosition(s.symbol.range, i)) { + if (t) { + return s; + } else { + return this.c(i, s.children, t) || s; + } + } + } + } + updateMarker(i) { + for (const [, e] of this.children) { + this.d(i, e); + } + } + d(i, e) { + e.marker = undefined; + const t = LB(i, e.symbol.range, Z.compareRangesUsingStarts); + let s; + if (t < 0) { + s = ~t; + if (s > 0 && Z.areIntersecting(i[s - 1], e.symbol.range)) { + s -= 1; + } + } else { + s = t; + } + const n = []; + let r; + for (; s < i.length && Z.areIntersecting(e.symbol.range, i[s]); s++) { + const o = i[s]; + n.push(o); + i[s] = undefined; + if (!r || o.severity > r) { + r = o.severity; + } + } + for (const [, o] of e.children) { + this.d(n, o); + } + if (r) { + e.marker = { + count: n.length, + topSev: r + }; + } + Y3(i); + } + }; + vR = class sq extends bR { + static create(e, t, s) { + const n = new Xi(s); + const r = new sq(t.uri); + const o = e.ordered(t); + const a = o.map((c, u) => { + const d = bR.findId(`provider_${u}`, r); + const h = new y1(d, r, c.displayName ?? "Unknown Outline Provider", u); + return Promise.resolve(c.provideDocumentSymbols(t, n.token)).then(g => { + for (const p of g || []) { + sq.c(p, h); + } + return h; + }, g => { + uh(g); + return h; + }).then(g => { + if (bR.empty(g)) { + g.remove(); + } else { + r.e.set(d, g); + } + }); + }); + const l = e.onDidChange(() => { + const c = e.ordered(t); + if (!Go(c, o)) { + n.cancel(); + } + }); + return Promise.all(a).then(() => n.token.isCancellationRequested && !s.isCancellationRequested ? sq.create(e, t, s) : r.f()).finally(() => { + n.dispose(); + l.dispose(); + n.dispose(); + }); + } + static c(e, t) { + const s = bR.findId(e, t); + const n = new rv(s, t, e); + if (e.children) { + for (const r of e.children) { + sq.c(r, n); + } + } + t.children.set(n.id, n); + } + static get(e) { + while (e) { + if (e instanceof sq) { + return e; + } + e = e.parent; + } + } + constructor(e) { + super(); + this.uri = e; + this.id = "root"; + this.parent = undefined; + this.e = new Map(); + this.children = new Map(); + this.id = "root"; + this.parent = undefined; + } + f() { + let e = 0; + for (const [t, s] of this.e) { + if (s.children.size === 0) { + this.e.delete(t); + } else { + e += 1; + } + } + if (e !== 1) { + this.children = this.e; + } else { + const t = Ws.first(this.e.values()); + for (const [, s] of t.children) { + s.parent = this; + this.children.set(s.id, s); + } + } + return this; + } + merge(e) { + if (this.uri.toString() !== e.uri.toString() || this.e.size !== e.e.size) { + return false; + } else { + this.e = e.e; + this.children = e.children; + return true; + } + } + getAllSymbols(e) { + const t = []; + for (const [, s] of this.e) { + t.push(...s.getAllSymbols(e)); + } + return t; + } + getGlobalItemEnclosingPosition(e) { + let t; + for (const [, s] of this.e) { + t = s.getItemEnclosingPosition(e, true); + if (t) { + break; + } + } + return t; + } + getItemEnclosingPosition(e, t) { + let s; + if (t) { + let r = t.parent; + while (r && !s) { + if (r instanceof y1) { + s = r; + } + r = r.parent; + } + } + let n; + for (const [, r] of this.e) { + n = r.getItemEnclosingPosition(e); + if (n && (!s || s === r)) { + break; + } + } + return n; + } + getItemById(e) { + return bR.getElementById(e, this); + } + updateMarker(e) { + e.sort(Z.compareRangesUsingStarts); + for (const [, t] of this.e) { + t.updateMarker(e.slice(0)); + } + } + getTopLevelSymbols() { + const e = []; + for (const t of this.children.values()) { + if (t instanceof rv) { + e.push(t.symbol); + } else { + e.push(...Ws.map(t.children.values(), s => s.symbol)); + } + } + return e.sort((t, s) => Z.compareRangesUsingStarts(t.range, s.range)); + } + asListOfDocumentSymbols() { + const e = this.getTopLevelSymbols(); + const t = []; + sq.g(t, e, ""); + return t.sort((s, n) => je.compare(Z.getStartPosition(s.range), Z.getStartPosition(n.range)) || je.compare(Z.getEndPosition(n.range), Z.getEndPosition(s.range))); + } + static g(e, t, s) { + for (const n of t) { + e.push({ + kind: n.kind, + tags: n.tags, + name: n.name, + detail: n.detail, + containerName: n.containerName || s, + range: n.range, + selectionRange: n.selectionRange, + children: undefined + }); + if (n.children) { + sq.g(e, n.children, n.name); + } + } + } + }; + fS = Ve("IOutlineModelService"); + dft = class { + constructor(e, t, s) { + this.f = e; + this.c = new Q(); + this.e = new vc(15, 0.7); + this.d = t.for(e.documentSymbolProvider, "DocumentSymbols", { + min: 350 + }); + this.c.add(s.onModelRemoved(n => { + this.e.delete(n.id); + })); + } + dispose() { + this.c.dispose(); + } + async getOrCreate(e, t) { + const s = this.f.documentSymbolProvider; + const n = s.ordered(e); + let r = this.e.get(e.id); + if (!r || r.versionId !== e.getVersionId() || !Go(r.provider, n)) { + const a = new Xi(); + r = { + versionId: e.getVersionId(), + provider: n, + promiseCnt: 0, + source: a, + promise: vR.create(s, e, a.token), + model: undefined + }; + this.e.set(e.id, r); + const l = Date.now(); + r.promise.then(c => { + r.model = c; + this.d.update(e, Date.now() - l); + }).catch(c => { + this.e.delete(e.id); + }); + } + if (r.model) { + return r.model; + } + r.promiseCnt += 1; + const o = t.onCancellationRequested(() => { + if (--r.promiseCnt === 0) { + r.source.cancel(); + this.e.delete(e.id); + } + }); + try { + return await r.promise; + } finally { + o.dispose(); + } + } + getDebounceValue(e) { + return this.d.get(e); + } + getCachedModels() { + return Ws.filter(Ws.map(this.e.values(), e => e.model), e => e !== undefined); + } + }; + dft = __decorate([__param(0, nn), __param(1, gE), __param(2, $s)], dft); + it(fS, dft, 1); + } +}); +function aLs() { + return Object.create(null); +} +function lLs(i, e) { + switch (i) { + case 0: + return ""; + case 1: + return `${Lye}*?`; + default: + return `(?:${Pye}|${Lye}+${Pye}${e ? `|${Pye}${Lye}+` : ""})*?`; + } +} +function Ise(i, e) { + if (!i) { + return []; + } + const t = []; + let s = false; + let n = false; + let r = ""; + for (const o of i) { + switch (o) { + case e: + if (!s && !n) { + t.push(r); + r = ""; + continue; + } + break; + case "{": + s = true; + break; + case "}": + s = false; + break; + case "[": + n = true; + break; + case "]": + n = false; + break; + } + r += o; + } + if (r) { + t.push(r); + } + return t; +} +function cLs(i) { + if (!i) { + return ""; + } + let e = ""; + const t = Ise(i, EGt); + if (t.every(s => s === Tye)) { + e = ".*"; + } else { + let s = false; + t.forEach((n, r) => { + if (n === Tye) { + if (s) { + return; + } + e += lLs(2, r === t.length - 1); + } else { + let o = false; + let a = ""; + let l = false; + let c = ""; + for (const u of n) { + if (u !== "}" && o) { + a += u; + continue; + } + if (l && (u !== "]" || !c)) { + let d; + if (u === "-") { + d = u; + } else if ((u === "^" || u === "!") && !c) { + d = "^"; + } else if (u === EGt) { + d = ""; + } else { + d = zg(u); + } + c += d; + continue; + } + switch (u) { + case "{": + o = true; + continue; + case "[": + l = true; + continue; + case "}": + { + const h = `(?:${Ise(a, ",").map(g => cLs(g)).join("|")})`; + e += h; + o = false; + a = ""; + break; + } + case "]": + { + e += "[" + c + "]"; + l = false; + c = ""; + break; + } + case "?": + e += Lye; + continue; + case "*": + e += lLs(1); + continue; + default: + e += zg(u); + } + } + if (r < t.length - 1 && (t[r + 1] !== Tye || r + 2 < t.length)) { + e += Pye; + } + } + s = n === Tye; + }); + } + return e; +} +function xGt(i, e) { + if (!i) { + return lA; + } + let t; + if (typeof i != "string") { + t = i.pattern; + } else { + t = i; + } + t = t.trim(); + const s = `${t}_${!!e.trimForExclusions}`; + let n = IGt.get(s); + if (n) { + return uLs(n, i); + } + let r; + if (pLs.test(t)) { + n = anr(t.substr(4), t); + } else if (r = mLs.exec(kGt(t, e))) { + n = lnr(r[1], t); + } else if ((e.trimForExclusions ? vLs : bLs).test(t)) { + n = cnr(t, e); + } else if (r = yLs.exec(kGt(t, e))) { + n = dLs(r[1].substr(1), t, true); + } else if (r = wLs.exec(kGt(t, e))) { + n = dLs(r[1], t, false); + } else { + n = unr(t); + } + IGt.set(s, n); + return uLs(n, i); +} +function uLs(i, e) { + if (typeof e == "string") { + return i; + } + const t = function (s, n) { + if (Hnt(s, e.base, !yl)) { + return i(F2(s.substr(e.base.length), _h), n); + } else { + return null; + } + }; + t.allBasenames = i.allBasenames; + t.allPaths = i.allPaths; + t.basenames = i.basenames; + t.patterns = i.patterns; + return t; +} +function kGt(i, e) { + if (e.trimForExclusions && i.endsWith("/**")) { + return i.substr(0, i.length - 2); + } else { + return i; + } +} +function anr(i, e) { + return function (t, s) { + if (typeof t == "string" && t.endsWith(i)) { + return e; + } else { + return null; + } + }; +} +function lnr(i, e) { + const t = `/${i}`; + const s = `\\${i}`; + const n = function (o, a) { + if (typeof o != "string") { + return null; + } else if (a) { + if (a === i) { + return e; + } else { + return null; + } + } else if (o === i || o.endsWith(t) || o.endsWith(s)) { + return e; + } else { + return null; + } + }; + const r = [i]; + n.basenames = r; + n.patterns = [e]; + n.allBasenames = r; + return n; +} +function cnr(i, e) { + const t = hLs(i.slice(1, -1).split(",").map(a => xGt(a, e)).filter(a => a !== lA), i); + const s = t.length; + if (!s) { + return lA; + } + if (s === 1) { + return t[0]; + } + const n = function (a, l) { + for (let c = 0, u = t.length; c < u; c++) { + if (t[c](a, l)) { + return i; + } + } + return null; + }; + const r = t.find(a => !!a.allBasenames); + if (r) { + n.allBasenames = r.allBasenames; + } + const o = t.reduce((a, l) => l.allPaths ? a.concat(l.allPaths) : a, []); + if (o.length) { + n.allPaths = o; + } + return n; +} +function dLs(i, e, t) { + const s = _h === ao.sep; + const n = s ? i : i.replace(gLs, _h); + const r = _h + n; + const o = ao.sep + i; + let a; + if (t) { + a = function (l, c) { + if (typeof l == "string" && (l === n || l.endsWith(r) || !s && (l === i || l.endsWith(o)))) { + return e; + } else { + return null; + } + }; + } else { + a = function (l, c) { + if (typeof l == "string" && (l === n || !s && l === i)) { + return e; + } else { + return null; + } + }; + } + a.allPaths = [(t ? "*/" : "./") + i]; + return a; +} +function unr(i) { + try { + const e = new RegExp(`^${cLs(i)}$`); + return function (t) { + e.lastIndex = 0; + if (typeof t == "string" && e.test(t)) { + return i; + } else { + return null; + } + }; + } catch { + return lA; + } +} +function Jw(i, e, t) { + if (!i || typeof e != "string") { + return false; + } else { + return nP(i)(e, undefined, t); + } +} +function nP(i, e = {}) { + if (!i) { + return DGt; + } + if (typeof i == "string" || hU(i)) { + const t = xGt(i, e); + if (t === lA) { + return DGt; + } + const s = function (n, r) { + return !!t(n, r); + }; + if (t.allBasenames) { + s.allBasenames = t.allBasenames; + } + if (t.allPaths) { + s.allPaths = t.allPaths; + } + return s; + } + return dnr(i, e); +} +function hU(i) { + const e = i; + if (e) { + return typeof e.base == "string" && typeof e.pattern == "string"; + } else { + return false; + } +} +function dnr(i, e) { + const t = hLs(Object.getOwnPropertyNames(i).map(a => hnr(a, i[a], e)).filter(a => a !== lA)); + const s = t.length; + if (!s) { + return lA; + } + if (!t.some(a => !!a.requiresSiblings)) { + if (s === 1) { + return t[0]; + } + const a = function (u, d) { + let h; + for (let g = 0, p = t.length; g < p; g++) { + const b = t[g](u, d); + if (typeof b == "string") { + return b; + } + if (YZ(b)) { + h ||= []; + h.push(b); + } + } + if (h) { + return (async () => { + for (const g of h) { + const p = await g; + if (typeof p == "string") { + return p; + } + } + return null; + })(); + } else { + return null; + } + }; + const l = t.find(u => !!u.allBasenames); + if (l) { + a.allBasenames = l.allBasenames; + } + const c = t.reduce((u, d) => d.allPaths ? u.concat(d.allPaths) : u, []); + if (c.length) { + a.allPaths = c; + } + return a; + } + const n = function (a, l, c) { + let u; + let d; + for (let h = 0, g = t.length; h < g; h++) { + const p = t[h]; + if (p.requiresSiblings && c) { + l ||= ir(a); + u ||= l.substr(0, l.length - Iw(a).length); + } + const b = p(a, l, u, c); + if (typeof b == "string") { + return b; + } + if (YZ(b)) { + d ||= []; + d.push(b); + } + } + if (d) { + return (async () => { + for (const h of d) { + const g = await h; + if (typeof g == "string") { + return g; + } + } + return null; + })(); + } else { + return null; + } + }; + const r = t.find(a => !!a.allBasenames); + if (r) { + n.allBasenames = r.allBasenames; + } + const o = t.reduce((a, l) => l.allPaths ? a.concat(l.allPaths) : a, []); + if (o.length) { + n.allPaths = o; + } + return n; +} +function hnr(i, e, t) { + if (e === false) { + return lA; + } + const s = xGt(i, t); + if (s === lA) { + return lA; + } + if (typeof e == "boolean") { + return s; + } + if (e) { + const n = e.when; + if (typeof n == "string") { + const r = (o, a, l, c) => { + if (!c || !s(o, a)) { + return null; + } + const u = n.replace("$(basename)", () => l); + const d = c(u); + if (YZ(d)) { + return d.then(h => h ? i : null); + } else if (d) { + return i; + } else { + return null; + } + }; + r.requiresSiblings = true; + return r; + } + } + return s; +} +function hLs(i, e) { + const t = i.filter(a => !!a.basenames); + if (t.length < 2) { + return i; + } + const s = t.reduce((a, l) => { + const c = l.basenames; + if (c) { + return a.concat(c); + } else { + return a; + } + }, []); + let n; + if (e) { + n = []; + for (let a = 0, l = s.length; a < l; a++) { + n.push(e); + } + } else { + n = t.reduce((a, l) => { + const c = l.patterns; + if (c) { + return a.concat(c); + } else { + return a; + } + }, []); + } + const r = function (a, l) { + if (typeof a != "string") { + return null; + } + if (!l) { + let u; + for (u = a.length; u > 0; u--) { + const d = a.charCodeAt(u - 1); + if (d === 47 || d === 92) { + break; + } + } + l = a.substr(u); + } + const c = s.indexOf(l); + if (c !== -1) { + return n[c]; + } else { + return null; + } + }; + r.basenames = s; + r.patterns = n; + r.allBasenames = s; + const o = i.filter(a => !a.basenames); + o.push(r); + return o; +} +function fnr(i) { + if (i.startsWith("{") && i.endsWith("}")) { + return i.slice(1, -1).split(","); + } else { + return [i]; + } +} +function gnr({ + globsNewLineSeparated: i, + properGlob: e +}) { + const t = []; + if (i) { + t.push(...i.split(` +`)); + } + if (e) { + t.push(...fnr(e)); + } + return t.filter(s => s !== "").map(s => s.match(/^[a-zA-Z0-9]/) ? "*" + s : s); +} +function fLs({ + globsNewLineSeparated: i, + properGlob: e +}) { + const t = gnr({ + globsNewLineSeparated: i, + properGlob: e + }); + if (t.length !== 0) { + return `{${t.join(",")}}`; + } +} +var Tye; +var EGt; +var Pye; +var Lye; +var gLs; +var pLs; +var mLs; +var bLs; +var vLs; +var yLs; +var wLs; +var IGt; +var DGt; +var lA; +var Qp = ue({ + "out-build/vs/base/common/glob.js"() { + "use strict"; + + Jt(); + nt(); + zb(); + In(); + pn(); + rt(); + $i(); + Tye = "**"; + EGt = "/"; + Pye = "[/\\\\]"; + Lye = "[^/\\\\]"; + gLs = /\//g; + pLs = /^\*\*\/\*\.[\w\.-]+$/; + mLs = /^\*\*\/([\w\.-]+)\/?$/; + bLs = /^{\*\*\/\*?[\w\.-]+\/?(,\*\*\/\*?[\w\.-]+\/?)*}$/; + vLs = /^{\*\*\/\*?[\w\.-]+(\/(\*\*)?)?(,\*\*\/\*?[\w\.-]+(\/(\*\*)?)?)*}$/; + yLs = /^\*\*((\/[\w\.-]+)+)\/?$/; + wLs = /^([\w\.-]+(\/[\w\.-]+)*)\/?$/; + IGt = new vc(10000); + DGt = function () { + return false; + }; + lA = function () { + return null; + }; + } +}); +function CLs(i) { + if (i.scheme !== me.vscodeNotebookCell) { + return; + } + const e = i.fragment.indexOf("s"); + if (e < 0) { + return; + } + const t = parseInt(i.fragment.substring(0, e).replace(SLs, ""), TGt); + const s = Xq(i.fragment.substring(e + 1)).toString(); + if (!isNaN(t)) { + return { + handle: t, + notebook: i.with({ + scheme: s, + fragment: null + }) + }; + } +} +function pnr(i, e) { + const t = e.toString(TGt); + const n = `${t.length < hft.length ? hft[t.length - 1] : "z"}${t}s${ET(Ii.fromString(i.scheme), true, true)}`; + return i.with({ + scheme: me.vscodeNotebookCell, + fragment: n + }); +} +function mnr(i) { + if (i.scheme !== me.vscodeNotebookMetadata) { + return; + } + const e = Xq(i.fragment).toString(); + return i.with({ + scheme: e, + fragment: null + }); +} +function bnr(i) { + const e = `${ET(Ii.fromString(i.scheme), true, true)}`; + return i.with({ + scheme: me.vscodeNotebookMetadata, + fragment: e + }); +} +var Rye; +var hft; +var SLs; +var TGt; +var xLs; +var Nye = ue({ + "out-build/vs/workbench/services/notebook/common/notebookDocumentService.js"() { + "use strict"; + + nr(); + In(); + At(); + It(); + te(); + Rye = Ve("notebookDocumentService"); + hft = ["W", "X", "Y", "Z", "a", "b", "c", "d", "e", "f"]; + SLs = new RegExp(`^[${hft.join("")}]+`); + TGt = 7; + xLs = class { + constructor() { + this.a = new dn(); + } + getNotebook(i) { + if (i.scheme === me.vscodeNotebookCell) { + const e = CLs(i); + if (e) { + const t = this.a.get(e.notebook); + if (t) { + return t; + } + } + } + return this.a.get(i); + } + addNotebookDocument(i) { + this.a.set(i.uri, i); + } + removeNotebookDocument(i) { + this.a.delete(i.uri); + } + }; + it(Rye, xLs, 1); + } +}); +function PGt(i, e, t, s = (n, r) => n === r) { + const n = []; + function r(l, c, u) { + if (c === 0 && u.length === 0) { + return; + } + const d = n[n.length - 1]; + if (d && d.start + d.deleteCount === l) { + d.deleteCount += c; + d.toInsert.push(...u); + } else { + n.push({ + start: l, + deleteCount: c, + toInsert: u + }); + } + } + let o = 0; + let a = 0; + while (true) { + if (o === i.length) { + r(o, 0, e.slice(a)); + break; + } + if (a === e.length) { + r(o, i.length - o, []); + break; + } + const l = i[o]; + const c = e[a]; + if (s(l, c)) { + o += 1; + a += 1; + continue; + } + if (t(c)) { + r(o, 1, []); + o += 1; + } else { + r(o, 0, [c]); + a += 1; + } + } + return n; +} +function kLs(i) { + const e = i; + return (typeof e.include == "string" || !!hU(e.include)) && (typeof e.exclude == "string" || !!hU(e.exclude)); +} +function fU(i) { + return ["application/vnd.code.notebook.stdout", "application/vnd.code.notebook.stderr"].includes(i); +} +function vnr(i) { + const e = []; + let t = false; + for (const o of i) { + if (e.length === 0 || t) { + e.push(o); + t = true; + } + } + let s = ynr(e); + const n = Ii.concat(e.map(o => Ii.wrap(o))); + const r = Snr(n); + s = s || r.byteLength !== n.byteLength; + return { + data: r, + didCompression: s + }; +} +function ynr(i) { + let e = false; + i.forEach((t, s) => { + if (s === 0 || t.length < $ye.length) { + return; + } + const n = i[s - 1]; + const r = t.subarray(0, $ye.length); + if (r[0] === mft[0] && r[1] === mft[1] && r[2] === mft[2]) { + const o = n.lastIndexOf(FLs); + if (o === -1) { + return; + } + e = true; + i[s - 1] = n.subarray(0, o); + i[s] = t.subarray($ye.length); + } + }); + return e; +} +function wnr(i) { + let e = i; + do { + i = e; + e = i.replace(/[^\n]\x08/gm, ""); + } while (e.length < i.length); + return i; +} +function Cnr(i) { + for (i = i.replace(/\r+\n/gm, ` +`); i.search(/\r[^$]/g) > -1;) { + const e = i.match(/^(.*)\r+/m)[1]; + let t = i.match(/\r+(.*)$/m)[1]; + t = t + e.slice(t.length, e.length); + i = i.replace(/\r+.*$/m, "\r").replace(/^.*\r/m, t); + } + return i; +} +function Snr(i) { + if (!i.buffer.includes(OLs) && !i.buffer.includes(_Ls)) { + return i; + } else { + return Ii.fromString(Cnr(wnr($Ls.decode(i.buffer)))); + } +} +var gU; +var fft; +var ELs; +var Dse; +var gft; +var qn; +var LGt; +var ILs; +var DLs; +var RJ; +var TLs; +var mh; +var Tse; +var PLs; +var LLs; +var nl; +var _l; +var RLs; +var pft; +var Ha; +var Mye; +var NLs; +var QF; +var MLs; +var Aye; +var oD; +var ui; +var ALs; +var Pse; +var $Ls; +var $ye; +var mft; +var FLs; +var OLs; +var _Ls; +var Mr = ue({ + "out-build/vs/workbench/contrib/notebook/common/notebookCommon.js"() { + "use strict"; + + nr(); + Qp(); + sa(); + Jb(); + At(); + pn(); + rt(); + Ee(); + Nye(); + gU = "workbench.editor.notebook"; + fft = "workbench.editor.notebookTextDiffEditor"; + ELs = "workbench.editor.notebookMultiTextDiffEditor"; + Dse = "workbench.editor.interactive"; + gft = "workbench.editor.repl"; + (function (i) { + i[i.Markup = 1] = "Markup"; + i[i.Code = 2] = "Code"; + })(qn ||= {}); + LGt = ["application/json", "application/javascript", "text/html", "image/svg+xml", pl.latex, pl.markdown, "image/png", "image/jpeg", pl.text]; + ILs = [pl.latex, pl.markdown, "application/json", "text/html", "image/svg+xml", "image/png", "image/jpeg", pl.text]; + DLs = new Map([["ms-toolsai.jupyter", new Set(["jupyter-notebook", "interactive"])], ["ms-toolsai.jupyter-renderers", new Set(["jupyter-notebook", "interactive"])]]); + RJ = "_notAvailable"; + (function (i) { + i[i.Running = 1] = "Running"; + i[i.Idle = 2] = "Idle"; + })(TLs ||= {}); + (function (i) { + i[i.Unconfirmed = 1] = "Unconfirmed"; + i[i.Pending = 2] = "Pending"; + i[i.Executing = 3] = "Executing"; + })(mh ||= {}); + (function (i) { + i[i.Unconfirmed = 1] = "Unconfirmed"; + i[i.Pending = 2] = "Pending"; + i[i.Executing = 3] = "Executing"; + })(Tse ||= {}); + (function (i) { + i[i.WithHardKernelDependency = 0] = "WithHardKernelDependency"; + i[i.WithOptionalKernelDependency = 1] = "WithOptionalKernelDependency"; + i[i.Pure = 2] = "Pure"; + i[i.Never = 3] = "Never"; + })(PLs ||= {}); + (function (i) { + i.Always = "always"; + i.Never = "never"; + i.Optional = "optional"; + })(LLs ||= {}); + (function (i) { + i[i.ModelChange = 1] = "ModelChange"; + i[i.Move = 2] = "Move"; + i[i.ChangeCellLanguage = 5] = "ChangeCellLanguage"; + i[i.Initialize = 6] = "Initialize"; + i[i.ChangeCellMetadata = 7] = "ChangeCellMetadata"; + i[i.Output = 8] = "Output"; + i[i.OutputItem = 9] = "OutputItem"; + i[i.ChangeCellContent = 10] = "ChangeCellContent"; + i[i.ChangeDocumentMetadata = 11] = "ChangeDocumentMetadata"; + i[i.ChangeCellInternalMetadata = 12] = "ChangeCellInternalMetadata"; + i[i.ChangeCellMime = 13] = "ChangeCellMime"; + i[i.Unknown = 100] = "Unknown"; + })(nl ||= {}); + (function (i) { + i[i.Handle = 0] = "Handle"; + i[i.Index = 1] = "Index"; + })(_l ||= {}); + (function (i) { + i[i.Replace = 1] = "Replace"; + i[i.Output = 2] = "Output"; + i[i.Metadata = 3] = "Metadata"; + i[i.CellLanguage = 4] = "CellLanguage"; + i[i.DocumentMetadata = 5] = "DocumentMetadata"; + i[i.Move = 6] = "Move"; + i[i.OutputItems = 7] = "OutputItems"; + i[i.PartialMetadata = 8] = "PartialMetadata"; + i[i.PartialInternalMetadata = 9] = "PartialInternalMetadata"; + })(RLs ||= {}); + (function (i) { + i.scheme = me.vscodeNotebookMetadata; + function e(s) { + return bnr(s); + } + i.generate = e; + function t(s) { + return mnr(s); + } + i.parse = t; + })(pft ||= {}); + (function (i) { + i.scheme = me.vscodeNotebookCell; + function e(a, l) { + return pnr(a, l); + } + i.generate = e; + function t(a) { + return CLs(a); + } + i.parse = t; + function s(a, l) { + return a.with({ + scheme: me.vscodeNotebookCellOutput, + fragment: `op${l ?? ""},${a.scheme !== me.file ? a.scheme : ""}` + }); + } + i.generateCellOutputUri = s; + function n(a) { + if (a.scheme !== me.vscodeNotebookCellOutput) { + return; + } + const l = /^op([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})?\,(.*)$/i.exec(a.fragment); + if (!l) { + return; + } + const c = l[1] && l[1] !== "" ? l[1] : undefined; + const u = l[2]; + return { + outputId: c, + notebook: a.with({ + scheme: u || me.file, + fragment: null + }) + }; + } + i.parseCellOutputUri = n; + function r(a, l, c) { + return i.generate(a, l).with({ + scheme: c + }); + } + i.generateCellPropertyUri = r; + function o(a, l) { + if (a.scheme === l) { + return i.parse(a.with({ + scheme: i.scheme + })); + } + } + i.parseCellPropertyUri = o; + })(Ha ||= {}); + Mye = i => ln ? i.replace(/\//g, "\\") : i; + NLs = class { + constructor(i = [], e = LGt) { + this.e = e; + this.d = [...new Set(i)].map(t => ({ + pattern: t, + matches: nP(Mye(t)) + })); + } + sort(i) { + const e = new Map(Ws.map(i, s => [s, Mye(s)])); + let t = []; + for (const { + matches: s + } of this.d) { + for (const [n, r] of e) { + if (s(r)) { + t.push(n); + e.delete(n); + break; + } + } + } + if (e.size) { + t = t.concat([...e.keys()].sort((s, n) => this.e.indexOf(s) - this.e.indexOf(n))); + } + return t; + } + prioritize(i, e) { + const t = this.f(i); + if (t === -1) { + this.d.unshift({ + pattern: i, + matches: nP(Mye(i)) + }); + return; + } + const s = new Set(e.map(r => this.f(r, t))); + s.delete(-1); + const n = Array.from(s).sort(); + this.d.splice(t + 1, 0, ...n.map(r => this.d[r])); + for (let r = n.length - 1; r >= 0; r--) { + this.d.splice(n[r], 1); + } + } + toArray() { + return this.d.map(i => i.pattern); + } + f(i, e = this.d.length) { + const t = Mye(i); + for (let s = 0; s < e; s++) { + if (this.d[s].matches(t)) { + return s; + } + } + return -1; + } + }; + QF = new fe("notebookEditorCursorAtBoundary", "none"); + MLs = new fe("notebookEditorCursorAtLineBoundary", "none"); + (function (i) { + i.default = "default"; + i.option = "option"; + })(Aye ||= {}); + (function (i) { + i.Cells = "cells"; + i.Text = "text"; + i.None = "none"; + })(oD ||= {}); + ui = { + displayOrder: "notebook.displayOrder", + cellToolbarLocation: "notebook.cellToolbarLocation", + cellToolbarVisibility: "notebook.cellToolbarVisibility", + showCellStatusBar: "notebook.showCellStatusBar", + cellExecutionTimeVerbosity: "notebook.cellExecutionTimeVerbosity", + textDiffEditorPreview: "notebook.diff.enablePreview", + diffOverviewRuler: "notebook.diff.overviewRuler", + experimentalInsertToolbarAlignment: "notebook.experimental.insertToolbarAlignment", + compactView: "notebook.compactView", + focusIndicator: "notebook.cellFocusIndicator", + insertToolbarLocation: "notebook.insertToolbarLocation", + globalToolbar: "notebook.globalToolbar", + stickyScrollEnabled: "notebook.stickyScroll.enabled", + stickyScrollMode: "notebook.stickyScroll.mode", + undoRedoPerCell: "notebook.undoRedoPerCell", + consolidatedOutputButton: "notebook.consolidatedOutputButton", + showFoldingControls: "notebook.showFoldingControls", + dragAndDropEnabled: "notebook.dragAndDropEnabled", + cellEditorOptionsCustomizations: "notebook.editorOptionsCustomizations", + consolidatedRunButton: "notebook.consolidatedRunButton", + openGettingStarted: "notebook.experimental.openGettingStarted", + globalToolbarShowLabel: "notebook.globalToolbarShowLabel", + markupFontSize: "notebook.markup.fontSize", + markdownLineHeight: "notebook.markdown.lineHeight", + interactiveWindowCollapseCodeCells: "interactiveWindow.collapseCellInputCode", + outputScrollingDeprecated: "notebook.experimental.outputScrolling", + outputScrolling: "notebook.output.scrolling", + textOutputLineLimit: "notebook.output.textLineLimit", + LinkifyOutputFilePaths: "notebook.output.linkifyFilePaths", + minimalErrorRendering: "notebook.output.minimalErrorRendering", + formatOnSave: "notebook.formatOnSave.enabled", + insertFinalNewline: "notebook.insertFinalNewline", + defaultFormatter: "notebook.defaultFormatter", + formatOnCellExecution: "notebook.formatOnCellExecution", + codeActionsOnSave: "notebook.codeActionsOnSave", + outputWordWrap: "notebook.output.wordWrap", + outputLineHeightDeprecated: "notebook.outputLineHeight", + outputLineHeight: "notebook.output.lineHeight", + outputFontSizeDeprecated: "notebook.outputFontSize", + outputFontSize: "notebook.output.fontSize", + outputFontFamilyDeprecated: "notebook.outputFontFamily", + outputFontFamily: "notebook.output.fontFamily", + findFilters: "notebook.find.filters", + logging: "notebook.logging", + confirmDeleteRunningCell: "notebook.confirmDeleteRunningCell", + remoteSaving: "notebook.experimental.remoteSave", + gotoSymbolsAllSymbols: "notebook.gotoSymbols.showAllSymbols", + outlineShowMarkdownHeadersOnly: "notebook.outline.showMarkdownHeadersOnly", + outlineShowCodeCells: "notebook.outline.showCodeCells", + outlineShowCodeCellSymbols: "notebook.outline.showCodeCellSymbols", + breadcrumbsShowCodeCells: "notebook.breadcrumbs.showCodeCells", + scrollToRevealCell: "notebook.scrolling.revealNextCellOnExecute", + cellChat: "notebook.experimental.cellChat", + cellGenerate: "notebook.experimental.generate", + notebookVariablesView: "notebook.variablesView", + InteractiveWindowPromptToSave: "interactiveWindow.promptToSaveOnClose", + cellFailureDiagnostics: "notebook.cellFailureDiagnostics", + outputBackupSizeLimit: "notebook.backup.sizeLimit", + multiCursor: "notebook.multiCursor.enabled" + }; + (function (i) { + i[i.Left = 1] = "Left"; + i[i.Right = 2] = "Right"; + })(ALs ||= {}); + Pse = class SFt { + static { + this.d = "notebook/"; + } + static create(e, t) { + return `${SFt.d}${e}/${t ?? e}`; + } + static parse(e) { + if (e.startsWith(SFt.d)) { + const t = e.substring(SFt.d.length).split("/"); + if (t.length === 2) { + return { + notebookType: t[0], + viewType: t[1] + }; + } + } + } + }; + $Ls = new TextDecoder(); + $ye = ""; + mft = $ye.split("").map(i => i.charCodeAt(0)); + FLs = 10; + OLs = 8; + _Ls = 13; + } +}); +function BLs(i) { + if (!i || typeof i != "object") { + return false; + } else { + return typeof i.start == "number" && typeof i.end == "number"; + } +} +function Fye(i) { + i.sort((t, s) => t - s); + const e = i.shift(); + if (e === undefined) { + return []; + } else { + return i.reduce(function (t, s) { + if (s <= t[0][1]) { + t[0][1] = s + 1; + } else { + t.unshift([s, s + 1]); + } + return t; + }, [[e, e + 1]]).reverse().map(t => ({ + start: t[0], + end: t[1] + })); + } +} +function pE(i) { + return i.reduce((t, s) => { + for (let n = s.start; n < s.end; n++) { + t.push(n); + } + return t; + }, []); +} +function m5(i) { + const e = i.sort((n, r) => n.start - r.start); + const t = e[0]; + if (!t) { + return []; + } + const s = e.reduce((n, r) => { + const o = n[n.length - 1]; + if (o.end >= r.start) { + o.end = Math.max(o.end, r.end); + } else { + n.push(r); + } + return n; + }, [t]); + if (s.length > 1) { + return s.filter(n => n.start !== n.end || n.start !== 0); + } else { + return s; + } +} +function xnr(i, e) { + i = m5(i); + e = m5(e); + if (i.length !== e.length) { + return false; + } + for (let t = 0; t < i.length; t++) { + if (i[t].start !== e[t].start || i[t].end !== e[t].end) { + return false; + } + } + return true; +} +function RGt(i, e) { + return e.start >= i.start && e.end <= i.end; +} +var cA = ue({ + "out-build/vs/workbench/contrib/notebook/common/notebookRange.js"() { + "use strict"; + } +}); +var NGt; +var ULs = ue({ + "out-build/vs/workbench/contrib/ui/browser/aiInput/types.js"() { + "use strict"; + + NGt = class { + constructor(i) { + this.key = i; + } + setRefElement(i) {} + }; + } +}); +var Qe; +var MGt; +var Mu; +var Oye; +var qa; +var WLs; +var pU; +var _ye; +var Bye; +var ZF; +var Lse; +var Vx = ue({ + "out-build/vs/workbench/contrib/ui/browser/aiInput/plugins/mentions/types.js"() { + "use strict"; + + Ps(); + ULs(); + (function (i) { + i.none = "none"; + i.doc = "doc"; + i.web = "web"; + i.repo_map = "repo_map"; + i.code = "code"; + i.file = "file"; + i.folder = "folder"; + i.git_commit = "commits"; + i.git_pr = "pr"; + i.git_diff = "diffs"; + i.git = "git"; + i.heading = "heading"; + i.staticheading = "staticheading"; + i.divider = "divider"; + i.lint = "lint"; + i.link = "link"; + i.codebase = "codebase"; + i.current_file = "current_file"; + i.toggle_commit_options = "toggle_commit_options"; + i.commit_notes = "commit_notes"; + i.text_search = "text_search"; + i.image = "image"; + i.notepad = "notepad"; + i.composer = "composer"; + i.diff_review = "diff_review"; + i.reset = "reset"; + i.cursor_rules = "cursor_rules"; + i.reference_open_editors = "reference_open_editors"; + i.reference_active_editors = "reference_active_editors"; + i.toggle_agent_loop_on_lints = "toggle_agent_loop_on_lints"; + i.reset_context = "reset_context"; + i.auto_context = "auto_context"; + i.recent_changes = "recent_changes"; + i.files_and_folders = "files_and_folders"; + i.more = "more"; + i.terminal = "terminal"; + i.terminal_selection = "terminal_selection"; + i.generate_rules = "generate_rules"; + i.review_changes = "review_changes"; + i.knowledge_base = "knowledge_base"; + })(Qe ||= {}); + MGt = [Qe.auto_context, Qe.code, Qe.doc, Qe.file, Qe.folder, Qe.files_and_folders, Qe.git, Qe.repo_map, Qe.web, Qe.text_search, Qe.notepad, Qe.composer, Qe.cursor_rules, Qe.diff_review, Qe.codebase, Qe.reset, Qe.reference_open_editors, Qe.reference_active_editors, Qe.reset_context, Qe.recent_changes, Qe.toggle_agent_loop_on_lints, Qe.terminal, Qe.generate_rules, Qe.knowledge_base]; + Mu = { + [Qe.code]: "Code", + [Qe.web]: "Web", + [Qe.doc]: "Docs", + [Qe.file]: "Files", + [Qe.folder]: "Folders", + [Qe.lint]: "Linter Errors", + [Qe.repo_map]: "Repo Map", + [Qe.codebase]: "Codebase", + [Qe.auto_context]: "Suggested", + [Qe.git]: "Git", + [Qe.commit_notes]: "Commit History", + [Qe.text_search]: "Search", + [Qe.notepad]: "Notepads", + [Qe.composer]: "Past Chats", + [Qe.diff_review]: "Group Changes", + [Qe.reset]: "Reset", + [Qe.reference_open_editors]: "Add Open Files to Context", + [Qe.reference_active_editors]: "Add Active Files to Context", + [Qe.reset_context]: "Reset Context", + [Qe.recent_changes]: "Recent Changes", + [Qe.cursor_rules]: "Cursor Rules", + [Qe.files_and_folders]: "Files & Folders", + [Qe.toggle_agent_loop_on_lints]: "Toggle Iterate on Lints", + [Qe.terminal]: "Terminals", + [Qe.generate_rules]: "Generate Cursor Rules", + [Qe.knowledge_base]: "Add to Knowledge Base" + }; + Oye = [Qe.reset, Qe.reset_context, Qe.reference_open_editors, Qe.reference_active_editors, Qe.diff_review, Qe.toggle_agent_loop_on_lints, Qe.generate_rules, Qe.knowledge_base]; + qa = class HOn extends NGt { + constructor(e, t, s, n, r, o, a, l, c, u) { + super(e); + this.type = s; + this.selectionPrecursor = r; + this.docSelection = o; + this.secondaryText = a; + this.onSettingClick = l; + this.payload = c; + this.id = Ft(); + this.name = e; + this.picture = t; + this._score = n; + this.sizeBytes = u; + this.isSlash = Oye.includes(s); + if (c) { + this.pr = c.pr; + this.commit = c.commit; + this.diff = c.diff; + this.notepadId = c.notepadId; + this.composerId = c.composerId; + this.cursorRuleFilename = c.cursorRuleFilename; + this.terminalFile = c.terminalFile; + this.terminalSelection = c.terminalSelection; + this.isLoadMore = c.isLoadMore; + } + } + overrideScore(e) { + this._score = e; + } + set score(e) { + this._score = e; + } + get score() { + return this._score; + } + clone() { + return new HOn(this.name, this.picture, this.type, this._score, this.selectionPrecursor, this.docSelection, this.secondaryText, this.onSettingClick, this.payload, this.sizeBytes); + } + }; + WLs = { + "cmd-k": ["cmdKDefinitions"], + generic: [], + "terminal-cmd-k": [] + }; + pU = { + insertTextSearch: () => {}, + selectedTextSearches: [], + removeTextSearch: () => {}, + insertDocs: () => {}, + selectedDocs: [], + removeDocs: () => {}, + insertSelection: () => {}, + selections: [], + removeSelection: () => {}, + insertFileSelection: () => {}, + fileSelections: [], + removeFileSelection: () => {}, + replaceFileSelections: () => {}, + insertImage: () => {}, + imageSelections: [], + removeImage: () => {}, + insertCommit: () => {}, + commits: [], + removeCommit: () => {}, + insertPullRequest: () => {}, + pullRequests: [], + removePullRequest: () => {}, + insertGitDiff: () => {}, + removeGitDiff: () => {}, + gitDiffUuid: undefined, + insertDiffToMain: () => {}, + removeDiffToMain: () => {}, + diffToMainUuid: undefined, + addCurrentFile: () => {}, + removeCurrentFile: () => {}, + addLinterErrors: () => {}, + removeLinterErrors: () => {}, + addCodebase: () => {}, + removeCodebase: () => {}, + addWeb: () => {}, + removeWeb: () => {}, + addRecentChanges: () => {}, + removeRecentChanges: () => {}, + insertFolderSelection: () => {}, + folderSelections: [], + removeFolderSelection: () => {}, + mentionIdToDelete: null, + setMentionIdToDelete: () => {}, + insertLink: () => {}, + linksSelections: [], + removeLink: () => {}, + insertNotepad: () => {}, + notepadIds: [], + removeNotepad: () => {}, + addDiffReview: () => {}, + removeDiffReview: () => {}, + removeMention: i => false, + insertComposer: () => {}, + composers: [], + removeComposer: () => {}, + insertCursorRule: () => {}, + cursorRuleIds: [], + removeCursorRule: () => {}, + addGenerateRules: () => {}, + removeGenerateRules: () => {}, + insertAutoContext: () => {}, + removeAutoContext: () => {}, + addKnowledgeBase: () => {}, + removeKnowledgeBase: () => {}, + addUiElement: () => {}, + removeUiElement: () => {} + }; + _ye = "Commit (Diff of Working State)"; + Bye = "Branch (Diff with Main Branch)"; + ZF = 32; + Lse = 3; + } +}); +function ov(i, e) { + switch (i) { + case "fileSelections": + case "terminalFiles": + return V.revive(e.uri).toString(); + case "selections": + case "terminalSelections": + return qLs(e); + case "selectedDocs": + return e.docId; + case "notepads": + return e.notepadId; + case "composers": + return e.composerId; + case "cursorRules": + return e.filename; + case "selectedImages": + return e.path; + case "quotes": + return JSON.stringify({ + bubbleId: e.bubbleId, + sectionIndex: e.sectionIndex + }); + case "externalLinks": + return e.url; + case "uiElementSelections": + return e.xpath; + default: + { + const { + uuid: t, + ...s + } = e; + return JSON.stringify(s); + } + } +} +function mE(i, e, t) { + if (!e && !t) { + return true; + } else if (!e || !t) { + return false; + } else { + return ov(i, e) === ov(i, t); + } +} +function Jm() { + const i = {}; + mU.forEach(e => { + if (Gw(e)) { + i[e] = []; + } else { + i[e] = undefined; + } + }); + return { + ...i, + mentions: VLs() + }; +} +function VLs() { + const i = {}; + mU.forEach(e => { + if (Gw(e)) { + i[e] = {}; + } else { + i[e] = []; + } + }); + return i; +} +var AGt; +var bft; +var HLs; +var mU; +var Gw; +var qLs; +var av = ue({ + "out-build/vs/workbench/services/selectedContext/browser/selectedContextData.js"() { + "use strict"; + + cS(); + Le(); + Vx(); + AGt = "embeddings"; + bft = { + numResultsPerSearch: 100, + includePattern: "", + excludePattern: "", + reranker: Uie.LULEA, + reasoningStep: false + }; + HLs = ["notepads", "composers", "quotes", "selectedCommits", "selectedPullRequests", "gitDiff", "gitDiffFromBranchToMain", "selectedImages", "usesCodebase", "useWeb", "folderSelections", "fileSelections", "terminalFiles", "selections", "terminalSelections", "selectedDocs", "externalLinks", "useLinterErrors", "useDiffReview", "useGenerateRules", "useKnowledgeBase", "useContextPicking", "useRememberThis", "diffHistory", "cursorRules", "autoContext", "uiElementSelections"]; + mU = HLs; + Gw = i => ["selections", "fileSelections", "folderSelections", "selectedDocs", "selectedCommits", "selectedPullRequests", "terminalSelections", "terminalFiles", "quotes", "externalLinks", "selectedImages", "notepads", "composers", "cursorRules", "uiElementSelections"].includes(i); + qLs = i => JSON.stringify({ + uri: V.revive(i.uri).toString(), + range: i.range, + text: i.text + }); + } +}); +function jLs(i) { + const e = i; + return typeof e?.resolve == "function" && typeof e?.isResolved == "function"; +} +function knr(i, e, t) { + return e?.documentVersion === t?.documentVersion && i.extUri.isEqual(e?.original, t?.original) && i.extUri.isEqual(e?.modified, t?.modified) && Go(e?.changes, t?.changes, (s, n) => s[0] === n[0] && s[1] === n[1] && s[2] === n[2] && s[3] === n[3]); +} +var Zv; +var b5; +var Cd; +var zLs; +var JLs; +var od = ue({ + "out-build/vs/platform/editor/common/editor.js"() { + "use strict"; + + Jt(); + (function (i) { + i[i.ACTIVATE = 1] = "ACTIVATE"; + i[i.RESTORE = 2] = "RESTORE"; + i[i.PRESERVE = 3] = "PRESERVE"; + })(Zv ||= {}); + (function (i) { + i[i.PICK = 0] = "PICK"; + i[i.EXCLUSIVE_ONLY = 1] = "EXCLUSIVE_ONLY"; + })(b5 ||= {}); + (function (i) { + i[i.API = 0] = "API"; + i[i.USER = 1] = "USER"; + })(Cd ||= {}); + (function (i) { + i[i.Center = 0] = "Center"; + i[i.CenterIfOutsideViewport = 1] = "CenterIfOutsideViewport"; + i[i.NearTop = 2] = "NearTop"; + i[i.NearTopIfOutsideViewport = 3] = "NearTopIfOutsideViewport"; + })(zLs ||= {}); + (function (i) { + i.PROGRAMMATIC = "api"; + i.NAVIGATION = "code.navigation"; + i.JUMP = "code.jump"; + })(JLs ||= {}); + } +}); +function Uye(i) { + const e = i; + return !!e && typeof e.getSelection == "function" && !!e.onDidChangeSelection; +} +function $Gt(i) { + const e = i; + return !!e && typeof e.getScrollPosition == "function" && typeof e.setScrollPosition == "function" && !!e.onDidChangeScroll; +} +function Rse(i, e, t) { + for (const s of t.visibleEditorPanes) { + if (s.group.id === e && i.matches(s.input)) { + return s.getViewState(); + } + } +} +function w1(i) { + if (Bc(i)) { + return false; + } + const e = i; + return V.isUri(e?.resource); +} +function Hx(i) { + if (Bc(i)) { + return false; + } + const e = i; + return e?.original !== undefined && e.modified !== undefined; +} +function Nse(i) { + if (Bc(i)) { + return false; + } + const e = i; + if (!e || e.resources && !Array.isArray(e.resources)) { + return false; + } else { + return !!e.resources || !!e.multiDiffSource; + } +} +function Mse(i) { + if (Bc(i)) { + return false; + } + const e = i; + return Array.isArray(e?.resources) && e.resources.every(t => V.isUri(t)); +} +function uA(i) { + if (Bc(i) || Hx(i)) { + return false; + } + const e = i; + return e?.primary !== undefined && e.secondary !== undefined; +} +function FGt(i) { + if (Bc(i)) { + return false; + } + const e = i; + if (e) { + return e.resource === undefined || e.resource.scheme === me.untitled || e.forceUntitled === true; + } else { + return false; + } +} +function yR(i) { + if (Bc(i)) { + return false; + } + const e = i; + return V.isUri(e?.base?.resource) && V.isUri(e?.input1?.resource) && V.isUri(e?.input2?.resource) && V.isUri(e?.result?.resource); +} +function Bc(i) { + return i instanceof WGt; +} +function Enr(i) { + const e = i; + return V.isUri(e?.preferredResource); +} +function GLs(i) { + const e = i; + return Bc(e?.primary) && Bc(e?.secondary); +} +function Wye(i) { + const e = i; + return Bc(e?.modified) && Bc(e?.original); +} +function vft(i, e, t, s, n) { + return Ose(s, [Ba({ + id: "workbench.action.openLargeFile", + label: f(4137, null), + run: () => { + const r = { + ...t, + limits: { + size: Number.MAX_VALUE + } + }; + i.openEditor(e, r); + } + }), Ba({ + id: "workbench.action.configureEditorLargeFileConfirmation", + label: f(4138, null), + run: () => n.openUserSettings({ + query: "workbench.editorLargeFileConfirmation" + }) + })], { + forceMessage: true, + forceSeverity: cs.Warning + }); +} +function NJ(i) { + return Bc(i?.editor); +} +function Ase(i) { + const e = i; + return NJ(i) && e?.group !== undefined; +} +function OGt(i) { + const e = i; + return typeof e?.groupId == "number" && Bc(e.editor); +} +function _Gt(i) { + return typeof i?.groupId == "number"; +} +function BGt(i, e, t, s) { + if (!i.isSticky(e)) { + return false; + } + switch (s.preventPinnedEditorClose) { + case "keyboardAndMouse": + return t === v5.MOUSE || t === v5.KEYBOARD; + case "mouse": + return t === v5.MOUSE; + case "keyboard": + return t === v5.KEYBOARD; + } + return false; +} +async function yft(i, e, t) { + if (!i || !i.length) { + return []; + } else { + return await Promise.all(i.map(async s => { + const n = V.revive(s.fileUri); + if (!n) { + t.info("Cannot resolve the path because it is not valid.", s); + return; + } + if (!(await e.canHandleResource(n))) { + t.info("Cannot resolve the path because it cannot be handled", s); + return; + } + let o = s.exists; + let a = s.type; + if (typeof o != "boolean" || typeof a != "number") { + try { + a = (await e.stat(n)).isDirectory ? wg.Directory : wg.Unknown; + o = true; + } catch (c) { + t.error(c); + o = false; + } + } + if (!o && s.openOnlyIfExists) { + t.info("Cannot resolve the path because it does not exist", s); + return; + } + if (a === wg.Directory) { + t.info("Cannot resolve the path because it is a directory", s); + return; + } + const l = { + ...s.options, + pinned: true + }; + if (o) { + return { + resource: n, + options: l + }; + } else { + return { + resource: n, + options: l, + forceUntitled: true + }; + } + })); + } +} +function $se(i) { + const e = i; + if (!e) { + return false; + } + const t = e; + if (t.modified) { + return $se(t.modified); + } + const s = e; + return !!s.contributionsState && !!s.viewState && !!Array.isArray(s.cursorState); +} +function Fse(i) { + return iot(i); +} +function Ose(i, e, t) { + const s = Eee(i, e); + s.forceMessage = t?.forceMessage; + s.forceSeverity = t?.forceSeverity; + s.allowDialog = t?.allowDialog; + return s; +} +var _o; +var Hu; +var KLs; +var wft; +var UGt; +var YLs; +var XLs; +var QLs; +var ZLs; +var eRs; +var Gy; +var tRs; +var WGt; +var bE; +var iRs; +var fo; +var sRs; +var v5; +var vo; +var nRs; +var rRs; +var oRs; +var Nn = ue({ + "out-build/vs/workbench/common/editor.js"() { + "use strict"; + + X(); + zt(); + Le(); + q(); + te(); + Ht(); + Nt(); + At(); + Yd(); + Fs(); + Wa(); + _o = { + EditorPane: "workbench.contributions.editors", + EditorFactory: "workbench.contributions.editor.inputFactories" + }; + Hu = { + id: "default", + displayName: f(4135, null), + providerDisplayName: f(4136, null) + }; + KLs = "workbench.editor.sidebysideEditor"; + wft = "workbench.editors.textDiffEditor"; + UGt = "workbench.editors.binaryResourceDiffEditor"; + (function (i) { + i[i.PROGRAMMATIC = 1] = "PROGRAMMATIC"; + i[i.USER = 2] = "USER"; + i[i.EDIT = 3] = "EDIT"; + i[i.NAVIGATION = 4] = "NAVIGATION"; + i[i.JUMP = 5] = "JUMP"; + })(YLs ||= {}); + (function (i) { + i[i.IDENTICAL = 1] = "IDENTICAL"; + i[i.SIMILAR = 2] = "SIMILAR"; + i[i.DIFFERENT = 3] = "DIFFERENT"; + })(XLs ||= {}); + (function (i) { + i[i.SHORT = 0] = "SHORT"; + i[i.MEDIUM = 1] = "MEDIUM"; + i[i.LONG = 2] = "LONG"; + })(QLs ||= {}); + (function (i) { + i[i.EXPLICIT = 1] = "EXPLICIT"; + i[i.AUTO = 2] = "AUTO"; + i[i.FOCUS_CHANGE = 3] = "FOCUS_CHANGE"; + i[i.WINDOW_CHANGE = 4] = "WINDOW_CHANGE"; + })(ZLs ||= {}); + eRs = class { + constructor() { + this.a = new Map(); + } + registerSource(i, e) { + let t = this.a.get(i); + if (!t) { + t = { + source: i, + label: e + }; + this.a.set(i, t); + } + return t.source; + } + getSourceLabel(i) { + return this.a.get(i)?.label ?? i; + } + }; + Gy = new eRs(); + (function (i) { + i[i.None = 0] = "None"; + i[i.Readonly = 2] = "Readonly"; + i[i.Untitled = 4] = "Untitled"; + i[i.Singleton = 8] = "Singleton"; + i[i.RequiresTrust = 16] = "RequiresTrust"; + i[i.CanSplitInGroup = 32] = "CanSplitInGroup"; + i[i.ForceDescription = 64] = "ForceDescription"; + i[i.CanDropIntoEditor = 128] = "CanDropIntoEditor"; + i[i.MultipleEditors = 256] = "MultipleEditors"; + i[i.Scratchpad = 512] = "Scratchpad"; + })(tRs ||= {}); + WGt = class extends H {}; + (function (i) { + i[i.UNKNOWN = 0] = "UNKNOWN"; + i[i.REPLACE = 1] = "REPLACE"; + i[i.MOVE = 2] = "MOVE"; + i[i.UNPIN = 3] = "UNPIN"; + })(bE ||= {}); + (function (i) { + i[i.GROUP_ACTIVE = 0] = "GROUP_ACTIVE"; + i[i.GROUP_INDEX = 1] = "GROUP_INDEX"; + i[i.GROUP_LABEL = 2] = "GROUP_LABEL"; + i[i.GROUP_LOCKED = 3] = "GROUP_LOCKED"; + i[i.EDITORS_SELECTION = 4] = "EDITORS_SELECTION"; + i[i.EDITOR_OPEN = 5] = "EDITOR_OPEN"; + i[i.EDITOR_CLOSE = 6] = "EDITOR_CLOSE"; + i[i.EDITOR_MOVE = 7] = "EDITOR_MOVE"; + i[i.EDITOR_ACTIVE = 8] = "EDITOR_ACTIVE"; + i[i.EDITOR_LABEL = 9] = "EDITOR_LABEL"; + i[i.EDITOR_CAPABILITIES = 10] = "EDITOR_CAPABILITIES"; + i[i.EDITOR_PIN = 11] = "EDITOR_PIN"; + i[i.EDITOR_TRANSIENT = 12] = "EDITOR_TRANSIENT"; + i[i.EDITOR_STICKY = 13] = "EDITOR_STICKY"; + i[i.EDITOR_DIRTY = 14] = "EDITOR_DIRTY"; + i[i.EDITOR_WILL_DISPOSE = 15] = "EDITOR_WILL_DISPOSE"; + })(iRs ||= {}); + (function (i) { + i[i.PRIMARY = 1] = "PRIMARY"; + i[i.SECONDARY = 2] = "SECONDARY"; + i[i.BOTH = 3] = "BOTH"; + i[i.ANY = 4] = "ANY"; + })(fo ||= {}); + sRs = class { + getOriginalUri(i, e) { + if (!i) { + return; + } + if (yR(i)) { + return vo.getOriginalUri(i.result, e); + } + if (e?.supportSideBySide) { + const { + primary: s, + secondary: n + } = this.a(i); + if (s && n) { + if (e?.supportSideBySide === fo.BOTH) { + return { + primary: this.getOriginalUri(s, { + filterByScheme: e.filterByScheme + }), + secondary: this.getOriginalUri(n, { + filterByScheme: e.filterByScheme + }) + }; + } + if (e?.supportSideBySide === fo.ANY) { + return this.getOriginalUri(s, { + filterByScheme: e.filterByScheme + }) ?? this.getOriginalUri(n, { + filterByScheme: e.filterByScheme + }); + } + i = e.supportSideBySide === fo.PRIMARY ? s : n; + } + } + if (Hx(i) || Nse(i) || uA(i) || yR(i) || Mse(i)) { + return; + } + const t = Enr(i) ? i.preferredResource : i.resource; + if (!t || !e || !e.filterByScheme) { + return t; + } else { + return this.b(t, e.filterByScheme); + } + } + a(i) { + if (GLs(i) || uA(i)) { + return { + primary: i.primary, + secondary: i.secondary + }; + } else if (Wye(i) || Hx(i)) { + return { + primary: i.modified, + secondary: i.original + }; + } else { + return { + primary: undefined, + secondary: undefined + }; + } + } + getCanonicalUri(i, e) { + if (!i) { + return; + } + if (yR(i)) { + return vo.getCanonicalUri(i.result, e); + } + if (e?.supportSideBySide) { + const { + primary: s, + secondary: n + } = this.a(i); + if (s && n) { + if (e?.supportSideBySide === fo.BOTH) { + return { + primary: this.getCanonicalUri(s, { + filterByScheme: e.filterByScheme + }), + secondary: this.getCanonicalUri(n, { + filterByScheme: e.filterByScheme + }) + }; + } + if (e?.supportSideBySide === fo.ANY) { + return this.getCanonicalUri(s, { + filterByScheme: e.filterByScheme + }) ?? this.getCanonicalUri(n, { + filterByScheme: e.filterByScheme + }); + } + i = e.supportSideBySide === fo.PRIMARY ? s : n; + } + } + if (Hx(i) || Nse(i) || uA(i) || yR(i) || Mse(i)) { + return; + } + const t = i.resource; + if (!t || !e || !e.filterByScheme) { + return t; + } else { + return this.b(t, e.filterByScheme); + } + } + b(i, e) { + if (Array.isArray(e)) { + if (e.some(t => i.scheme === t)) { + return i; + } + } else if (e === i.scheme) { + return i; + } + } + }; + (function (i) { + i[i.UNKNOWN = 0] = "UNKNOWN"; + i[i.KEYBOARD = 1] = "KEYBOARD"; + i[i.MOUSE = 2] = "MOUSE"; + })(v5 ||= {}); + vo = new sRs(); + (function (i) { + i[i.LEFT = 0] = "LEFT"; + i[i.RIGHT = 1] = "RIGHT"; + })(nRs ||= {}); + rRs = class { + constructor() { + this.c = new Map(); + this.d = new Map(); + } + start(i) { + const e = this.a = i.get(re); + for (const [t, s] of this.c) { + this.e(t, s, e); + } + this.c.clear(); + } + e(i, e, t) { + const s = t.createInstance(e); + this.d.set(i, s); + } + registerFileEditorFactory(i) { + if (this.b) { + throw new Error("Can only register one file editor factory."); + } + this.b = i; + } + getFileEditorFactory() { + return Tn(this.b); + } + registerEditorSerializer(i, e) { + if (this.c.has(i) || this.d.has(i)) { + throw new Error(`A editor serializer with type ID '${i}' was already registered.`); + } + if (this.a) { + this.e(i, e, this.a); + } else { + this.c.set(i, e); + } + return Ue(() => { + this.c.delete(i); + this.d.delete(i); + }); + } + getEditorSerializer(i) { + return this.d.get(typeof i == "string" ? i : i.typeId); + } + }; + Pe.add(_o.EditorFactory, new rRs()); + (function (i) { + i[i.MOST_RECENTLY_ACTIVE = 0] = "MOST_RECENTLY_ACTIVE"; + i[i.SEQUENTIAL = 1] = "SEQUENTIAL"; + })(oRs ||= {}); + } +}); +function aRs(i) { + const e = i; + return Bc(e?.editor) && Bc(e?.replacement); +} +function VGt(i) { + const e = i; + return !!e && typeof e.id == "number" && Array.isArray(e.editors); +} +function eO(i) { + if (i.getValue("workbench.editor.openSideBySideDirection") === "down") { + return 1; + } else { + return 3; + } +} +var Hi; +var lRs; +var cRs; +var uRs; +var dRs; +var hRs; +var fRs; +var gRs; +var ar = ue({ + "out-build/vs/workbench/services/editor/common/editorGroupsService.js"() { + "use strict"; + + te(); + Nn(); + Hi = Ve("editorGroupsService"); + (function (i) { + i[i.UP = 0] = "UP"; + i[i.DOWN = 1] = "DOWN"; + i[i.LEFT = 2] = "LEFT"; + i[i.RIGHT = 3] = "RIGHT"; + })(lRs ||= {}); + (function (i) { + i[i.HORIZONTAL = 0] = "HORIZONTAL"; + i[i.VERTICAL = 1] = "VERTICAL"; + })(cRs ||= {}); + (function (i) { + i[i.FIRST = 0] = "FIRST"; + i[i.LAST = 1] = "LAST"; + i[i.NEXT = 2] = "NEXT"; + i[i.PREVIOUS = 3] = "PREVIOUS"; + })(uRs ||= {}); + (function (i) { + i[i.MAXIMIZE = 0] = "MAXIMIZE"; + i[i.EXPAND = 1] = "EXPAND"; + i[i.EVEN = 2] = "EVEN"; + })(dRs ||= {}); + (function (i) { + i[i.COPY_EDITORS = 0] = "COPY_EDITORS"; + i[i.MOVE_EDITORS = 1] = "MOVE_EDITORS"; + })(hRs ||= {}); + (function (i) { + i[i.CREATION_TIME = 0] = "CREATION_TIME"; + i[i.MOST_RECENTLY_ACTIVE = 1] = "MOST_RECENTLY_ACTIVE"; + i[i.GRID_APPEARANCE = 2] = "GRID_APPEARANCE"; + })(fRs ||= {}); + (function (i) { + i[i.NEW_EDITOR = 1] = "NEW_EDITOR"; + i[i.MOVE_EDITOR = 2] = "MOVE_EDITOR"; + i[i.COPY_EDITOR = 3] = "COPY_EDITOR"; + })(gRs ||= {}); + } +}); +function Inr(i) { + return typeof i == "number" || VGt(i); +} +var Te; +var ih; +var Uc; +var _se; +var vt = ue({ + "out-build/vs/workbench/services/editor/common/editorService.js"() { + "use strict"; + + te(); + ar(); + Te = Ve("editorService"); + ih = -1; + Uc = -2; + _se = -3; + } +}); +function dA(i) { + return JSON.parse(JSON.stringify(i)); +} +function MJ(i) { + return V.revive(i.uri).toString(); +} +function Dnr(i) { + const e = { + ...i, + mentions: { + ...i.mentions + } + }; + for (const t of Object.keys(i)) { + if (t !== "mentions") { + if (Gw(t)) { + e[t] = i[t].filter(s => "addedWithoutMention" in s && s.addedWithoutMention === true); + e.mentions[t] = {}; + } else if (i[t] !== undefined) { + e[t] = undefined; + e.mentions[t] = []; + } + } + } + return e; +} +function Tnr(i) { + for (const e of Object.keys(i)) { + if (e !== "mentions") { + if (Gw(e)) { + if (i[e].length > 0) { + return false; + } + } else if (i[e] !== undefined && i[e] !== false) { + return false; + } + } + } + return true; +} +function ng(i, e, t) { + switch (i) { + case "notepad": + return `Notepad: ${t || e}`; + case "quote": + return e?.markdown; + case "commit": + if (e?.sha) { + const s = e; + return `Commit: ${s.sha.slice(0, 7)} "${s.message}"`; + } + return; + case "pr": + if (e?.number) { + const s = e; + if (s.title) { + return `PR #${s.number}: ${s.title}`; + } else { + return `Pull Request #${s.number}`; + } + } + return; + case "diff": + return "Current changes in the repository"; + case "diffToMain": + return "Changes from current branch to main branch"; + case "image": + return "Image"; + case "codebase": + return "Enable codebase context"; + case "web": + return "Enable web search capability"; + case "folder": + return e?.relativePath || t; + case "terminalFile": + return e?.uri?.path || t; + case "terminal": + if (e?.range) { + const s = e; + return `Terminal selection from line ${s.range.selectionStartLineNumber} to ${s.range.positionLineNumber}`; + } + return t; + case "composer": + if (t) { + return `Composer: ${t}`; + } else { + return "Composer"; + } + case "cursorRules": + return `Cursor rule: ${e || t}`; + case "autocontext": + return t; + case "lint": + return t || "Use linter errors as context"; + case "recentChanges": + return t || "Recent changes in the repo"; + case "docs": + return `Documentation: ${t || e}`; + case "uiElementSelections": + return `Element: ${t || e}`; + default: + return t; + } +} +async function Pnr(i, e) { + const t = i.activeInstance; + if (t && (await t.focusWhenReady(true), e)) { + const s = t.xterm; + if (s) { + const n = Math.max(0, e.startLineNumber - 1); + const r = Math.max(0, e.startColumn - 1); + s.scrollToLine(n); + const o = s.raw.cols * (e.endLineNumber - e.startLineNumber) + (e.endColumn - e.startColumn) + 1; + s.raw.select(r, n, o); + } + } +} +function Vye(i) { + if (i === undefined) { + return; + } + const e = i.split(` +`); + const t = e.filter(r => r.trim().length > 0); + const s = Math.min(...t.map(r => r.search(/\S|$/))); + return e.map(r => r.trim().length === 0 ? r : r.slice(s)).join(` +`); +} +async function Cft(i, e, t, s) { + let n; + try { + n = await i.createModelReference(t); + const r = n.object.textEditorModel; + let o; + if (s === undefined) { + o = r.getFullModelRange(); + } else { + o = s; + } + const a = Math.max(o.startLineNumber, 1); + const l = Math.max(o.startColumn, 1); + const c = Math.min(o.endLineNumber, r.getLineCount()); + const u = Math.min(r.getLineMaxColumn(c), o.endColumn); + const d = new Z(a, l, c, u); + return await Sft({ + model: r, + dataScrubbingService: e, + inBoundsSelectionRange: d + }); + } finally { + n?.dispose(); + } +} +async function Sft({ + model: i, + dataScrubbingService: e, + inBoundsSelectionRange: t, + dontScrub: s +}) { + let n; + let r; + let o; + r = i?.getValueInRange(t); + n = Vye(r); + n = `\`\`\`${i?.getLanguageIdAtPosition(t.startLineNumber, t.startColumn) ?? ""} +${n ?? ""} +\`\`\``; + o = i?.uri; + if (s !== undefined && !s) { + n = await e.cleanText(n, o?.path); + } + return { + text: n, + rawText: r, + range: { + selectionStartLineNumber: t.startLineNumber, + selectionStartColumn: t.startColumn, + positionLineNumber: t.endLineNumber, + positionColumn: t.endColumn + }, + uri: o + }; +} +function pRs(i, e, t) { + t = t ?? true; + if (!i || i?.isEmpty()) { + return; + } + let s = i; + if (t) { + s = s.setStartPosition(i.startLineNumber, 1); + } + const n = e?.getLineMaxColumn(i.endLineNumber) ?? i.endColumn; + if (t) { + s = s.setEndPosition(i.endLineNumber, n); + } + return s; +} +async function Lnr(i, e, t, s) { + let n = s ?? i.getLastActiveFileEditor()?.getControl(); + let r; + let o; + let a; + let l; + if (n) { + let c; + if ("activeCodeEditor" in n) { + n = n.activeCodeEditor; + } + if (no(n)) { + c = n.getModel() ?? undefined; + if (t) { + r = t; + } else { + r = pRs(n.getSelection() ?? undefined, c); + } + } else if (_f(n)) { + const d = n.getModel(); + if (d) { + c = d.modified; + r = pRs(n.getSelection() ?? undefined, d.modified); + } + } + if (r === undefined) { + return; + } + a = c?.getValueInRange(r); + l = c?.uri; + const u = l?.path; + if (a !== undefined) { + a = await e.cleanText(a, u); + } + o = Vye(a); + if (o) { + let d = c?.getLanguageId(); + d ||= c?.getLanguageIdAtPosition(r.startLineNumber, r.startColumn) ?? ""; + o = `\`\`\`${d} +${o ?? ""} +\`\`\``; + } else { + return; + } + } else { + return; + } + if (o && r && l) { + return { + text: o, + rawText: a, + range: { + selectionStartLineNumber: r.startLineNumber, + selectionStartColumn: r.startColumn, + positionLineNumber: r.endLineNumber, + positionColumn: r.endColumn + }, + uri: l + }; + } +} +async function Rnr(i, e, t = false, s) { + const n = i.activeInstance; + if (!n || !n.xterm) { + return; + } + let o; + let a; + if (n.hasSelection()) { + o = n.selection; + a = n.selectionRange; + } else { + if (t) { + return; + } + const d = n.selectedCommand(); + if (!d) { + return; + } + let h = d.executedMarker?.line; + const g = d.endMarker?.line; + if (h === undefined || g === undefined || h > g) { + return; + } + if (s) { + h = Math.max(g - s, h); + } + const p = n.xterm?.getBufferLines(h - 1, g); + o = p.join(` +`); + a = new Vs(h, 1, g, p[p.length - 1].length); + } + if (!o || !a) { + return undefined; + } else { + o = await e.cleanText(o); + return { + text: `\`\`\`bash +${Vye(o) ?? ""} +\`\`\``, + rawText: o, + range: a, + uri: Eft + }; + } +} +async function Nnr(i, e) { + let t = i.text; + const s = i.range; + let n = i.languageId; + const r = i.uri; + const o = r?.path; + if (t !== undefined) { + t = await e.cleanText(t, o); + } + let a = Vye(t); + if (a) { + a = `\`\`\`${n} +${a ?? ""} +\`\`\``; + } else { + return; + } + if (a && s) { + return { + text: a, + rawText: t, + range: s, + uri: r ?? Eft + }; + } +} +async function HGt(i, e, t) { + const s = await Cft(i, e, V.revive(t.uri)); + if (s !== undefined) { + return { + ...s, + uuid: t.uuid, + summarizationStrategy: t.summarizationStrategy + }; + } +} +async function mRs(i, e, t) { + const s = V.parse(t.docId + "_pages"); + let n = await i.getPages({ + docIdentifier: t.docId + }); + const r = n.pages.reduce((a, l, c) => { + if (l !== "") { + a.push({ + page: l, + url: n.pageUrls[c] + }); + } + return a; + }, []); + let o = ""; + if (r.length > 0) { + const a = ` +- `; + o = r.map(l => `${a}[${l.page}](${l.url})`).join(""); + } + return { + name: t.name, + uuid: t.uuid, + text: o, + uri: s, + url: t.url, + doc: e.applicationUserPersistentStorage.personalDocs.find(a => a.identifier === t.docId) + }; +} +async function bRs(i, e) { + let t; + if (e == ZI.DIFF_FROM_BRANCH_TO_MAIN) { + t = await i.getDiffDetailsFromGitDiff({ + gitDiff: undefined, + gitDiffFromBranchToMain: true + }); + } else { + t = await i.getDiffDetailsFromGitDiff({ + gitDiff: true, + gitDiffFromBranchToMain: undefined + }); + } + let s = ""; + let n = []; + for (const r of t) { + if (r.diffType === ZI.DIFF_FROM_BRANCH_TO_MAIN) { + s = Bye; + } else if (r.diffType === ZI.DIFF_TO_HEAD) { + s = _ye; + } + for (const o of r.diffs) { + n.push(o); + } + } + return { + title: s, + diffs: n + }; +} +async function Mnr(i, e) { + const t = [e]; + const s = await i.getCommitDetailsFromPartialCommits(t); + let n = []; + if (s.length === 0) { + return { + title: "", + diffs: n + }; + } + const r = s[0]; + for (const o of r.diff) { + n.push(o); + } + return { + title: r.message, + diffs: n + }; +} +async function Anr(i, e) { + const t = [e]; + const s = await i.getPullRequestDetailsFromPartialPullRequests(t); + let n = []; + if (s.length === 0) { + return { + title: "", + diffs: n + }; + } + const r = s[0]; + for (const o of r.diff) { + n.push(o); + } + return { + title: r.title, + diffs: n + }; +} +async function vRs(i, e) { + const t = i.getInstanceFromResource(e); + if (!t || !t.xterm) { + return; + } + let s = ""; + let n = 0; + let r = 0; + for (const c of t.xterm.getBufferReverseIterator()) { + if (s.length + c.length > CRs) { + break; + } + s = c + (s ? ` +${s}` : ""); + n++; + if (n === 1) { + r = c.length; + } + } + const o = t.xterm.getBufferLength(); + const a = Math.max(1, o - n + 1); + const l = o; + return { + text: `\`\`\`bash +${s} +\`\`\``, + rawText: s, + range: { + selectionStartLineNumber: a, + selectionStartColumn: 1, + positionLineNumber: l, + positionColumn: r + }, + uri: Eft + }; +} +var tO; +var yRs; +var xft; +var qGt; +var wRs; +var kft; +var AJ; +var Eft; +var CRs; +var Bf = ue({ + "out-build/vs/workbench/services/selectedContext/browser/utils.js"() { + "use strict"; + + Wo(); + At(); + pn(); + Et(); + Le(); + wa(); + yt(); + ua(); + od(); + gs(); + Vx(); + vt(); + av(); + tO = (i, { + filePathOrUri: e, + selection: t, + openToSide: s, + fromGroup: n, + preserveFocus: r, + originalUri: o + }) => { + try { + let a = typeof e == "string" ? V.file(e) : e; + if (t) { + a = xg(a, t); + } + if (a.path === "/") { + return; + } + yRs({ + uri: a, + originalUri: o, + fileService: i.fileService, + editorService: i.editorService, + editorGroupsService: i.editorGroupService, + openToSide: s, + fromGroup: n, + preserveFocus: r + }); + } catch (a) { + console.error("Failed to open file:", e, a); + i.notificationService.error(`Failed to open file: ${e}`); + } + }; + yRs = async ({ + uri: i, + originalUri: e, + fileService: t, + editorService: s, + editorGroupsService: n, + openToSide: r, + fromGroup: o, + preserveFocus: a + }) => { + if (!(await t.exists(i))) { + return; + } + let c = ih; + if (r) { + const h = o ?? s.activeEditorPane?.group; + if (h) { + const g = n.findGroup({ + direction: 3 + }, h); + const p = n.findGroup({ + direction: 2 + }, h); + if (!g && p) { + c = p; + } else { + c = Uc; + } + } else { + c = Uc; + } + } + let { + selection: u, + uri: d + } = $ct(i); + if (d.scheme === me.file) { + d = Jnt(d); + } + s.openEditor({ + ...(e !== undefined ? { + original: { + resource: e + }, + modified: { + resource: d + } + } : { + resource: d + }), + options: { + selection: u, + revealIfVisible: true, + revealIfOpened: true, + source: Cd.USER, + preserveFocus: a ?? true + } + }, c); + }; + xft = (i, e) => { + if (e === "") { + return "Add all"; + } + const t = qGt(i, e); + if (t) { + return t; + } + const s = e.split(/[/\\]/); + return s[s.length - 1]; + }; + qGt = (i, e) => { + if (e === "/" || e === "\\") { + const t = i.workspaceContextService.getWorkspace().folders; + if (t.length === 1) { + return ir(t[0].uri.path); + } + } + return ""; + }; + wRs = i => { + i = i.trim(); + if (i.slice(0, 3) === "```") { + const t = i.split(` +`)[0].match(/```.*?:(.+)$/); + if (t && t[1]) { + return t[1].split("/").pop() || ""; + } + } + return i; + }; + kft = i => ({ + ...i, + fileSelections: i.fileSelections?.map(e => ({ + ...e, + uri: V.revive(e.uri) + })), + ...(i.autoContext?.files ? { + autoContext: { + ...i.autoContext, + files: i.autoContext.files.map(e => V.revive(e)) + } + } : {}) + }); + AJ = (i, e) => { + const t = new Map(); + i.forEach(s => { + const n = ov(e, s); + if (!t.has(n)) { + t.set(n, s); + } + }); + return Array.from(t.values()); + }; + Eft = { + authority: "", + fragment: "", + path: "", + query: "", + scheme: "terminal" + }; + CRs = 10000; + } +}); +function Hye(i) { + return async e => i ? await i.passForward(e, undefined) : [e.value]; +} +var vE; +var SRs; +var xRs; +var kRs; +var ERs; +var IRs; +var DRs; +var jGt; +var $nr; +var TRs; +var Fnr; +var PRs; +var Onr; +var LRs; +var wR = ue({ + "out-build/vs/workbench/services/ai/common/dataScrubbingService.js"() { + "use strict"; + + q(); + It(); + te(); + vE = Ve("dataScrubbingService"); + SRs = class { + constructor(i) { + this.c = i; + } + async passForward(i, e) { + const t = Hye(e); + let s = [""]; + const n = async o => { + const a = await t(o); + if (a.length > 0) { + s[s.length - 1] += a[0]; + s.push(...a.slice(1)); + } + }; + let r = 0; + while (r < i.value.length) { + const o = this.c.map(a => [i.value.indexOf(a, r), a]).filter(([a, l]) => a !== -1).sort((a, l) => a[0] - l[0])[0]; + if (o === undefined) { + await n({ + value: i.value.substring(r, i.value.length), + range: { + lo: i.range.lo + r, + hi: i.range.hi + } + }); + break; + } + await n({ + value: i.value.substring(r, o[0]), + range: { + lo: i.range.lo + r, + hi: i.range.lo + o[0] + } + }); + r = o[0] + o[1].length; + s[s.length - 1] += o[1]; + } + return s; + } + }; + xRs = class { + constructor(i) { + this.c = i; + } + async passForward(i, e) { + let t = ""; + let s = ""; + while (i.value.length >= 2) { + let r = false; + for (const o of this.c) { + if (i.value[0] === o[0] && i.value[i.value.length - 1] === o[1]) { + t += o[0]; + s = o[1] + s; + i.value = i.value.substring(1, i.value.length - 1); + i.range.lo++; + i.range.hi--; + r = true; + break; + } + } + if (!r) { + break; + } + } + let n = await Hye(e)(i); + n[0] = t + n[0]; + n[n.length - 1] = n[n.length - 1] + s; + return n; + } + }; + kRs = /[\x21-\x7E]+/g; + ERs = class { + constructor() {} + async passForward(i, e) { + const t = Hye(e); + let s; + let n = [""]; + let r = 0; + while ((s = kRs.exec(i.value)) !== null) { + const o = s.index; + const a = o + s[0].length; + if (o > r) { + n[n.length - 1] += i.value.substring(r, o); + } + const l = i.value.substring(o, a); + const c = await t({ + value: l, + range: { + lo: i.range.lo + o, + hi: i.range.lo + a + } + }); + if (c.length > 0) { + n[n.length - 1] += c[0]; + n.push(...c.slice(1)); + } + r = a; + } + if (r < i.value.length) { + n[n.length - 1] += i.value.substring(r, i.value.length); + } + return n; + } + }; + IRs = /(([a-z]{4,}:\/\/)?(([a-z0-9_]+)(:[a-z0-9_]+)?@)?(([a-z0-9\-\.]+\.[a-z]{2,4})|localhost|(((25[0-5]|(2[0-4]|1\d|[1-9]|)\d)\.?\b){4}))(\/[^\s]*)?)/gi; + DRs = class { + async passForward(i, e) { + let t; + let s = [""]; + let n = 0; + const r = Hye(e); + const o = async a => { + const l = await r(a); + if (l.length > 0) { + s[s.length - 1] += l[0]; + s.push(...l.slice(1)); + } + }; + while ((t = IRs.exec(i.value)) !== null) { + const a = t.index; + const l = a + t[0].length; + if (a > n) { + await o({ + value: i.value.substring(n, a), + range: { + lo: i.range.lo + n, + hi: i.range.lo + a + } + }); + } + if (t[5] !== undefined) { + const c = t.index + t[0].indexOf(t[5]); + const u = c + t[5].length; + s[s.length - 1] += i.value.substring(a, c); + s.push(i.value.substring(u, l)); + } else { + s[s.length - 1] += t[0]; + } + n = l; + } + if (n < i.value.length) { + await o({ + value: i.value.substring(n, i.value.length), + range: { + lo: i.range.lo + n, + hi: i.range.hi + } + }); + } + return s; + } + }; + jGt = class { + constructor(i) { + this.c = i; + } + async passForward(i, e) { + let t; + let s = [""]; + let n = 0; + const r = Hye(e); + while ((t = this.c.exec(i.value)) !== null) { + const o = t.index; + const a = o + t[0].length; + if (o > n) { + const l = await r({ + value: i.value.substring(n, o), + range: { + lo: i.range.lo + n, + hi: i.range.lo + o + } + }); + s[s.length - 1] += l[0]; + s.push(...l.slice(1)); + } + s[s.length - 1] += t[0]; + n = a; + } + if (n < i.value.length) { + const o = await r({ + value: i.value.substring(n, i.value.length), + range: { + lo: i.range.lo + n, + hi: i.range.hi + } + }); + s[s.length - 1] += o[0]; + s.push(...o.slice(1)); + } + return s; + } + }; + $nr = [new ERs(), new DRs(), new SRs([";", "=", "/"]), new xRs(["\"\"", "''", "``", "()", "[]", "{}", "<>"])]; + TRs = /^(#\s+)?[A-Z0-9\_]{2,}=/gm; + Fnr = new jGt(TRs); + PRs = /(^(\s+)?[a-zA-Z0-9\_]{2,}:)|(^(\s+)?-)/gm; + Onr = new jGt(PRs); + LRs = class extends H { + constructor() { + super(); + this.c = undefined; + } + async tokenizeTexts(i) { + if (this.c === undefined) { + return []; + } else { + return (await this.c.tokenizeBPE(i, "cl100k_base")) || []; + } + } + async cleanText(i, e) { + i.length > 100000; + return i; + } + registerBPETokenizerProvider(i) { + this.c = i; + } + }; + it(vE, LRs, 1); + } +}); +function _nr(i, e) { + return V.joinPath(i.userHome, e.dataFolderName, "shadow-workspaces"); +} +var ys; +var RRs; +var kn = ue({ + "out-build/vs/platform/product/common/productService.js"() { + "use strict"; + + Le(); + te(); + ys = Ve("productService"); + RRs = "vscode://schemas/vscode-product"; + } +}); +var NRs; +var Bse; +var MRs; +var zGt; +var ARs; +var $Rs; +var JGt; +var FRs; +var GGt; +var ORs; +var KGt; +var YGt; +var _Rs; +var BRs; +var URs; +var WRs; +var VRs; +var HRs; +var qRs; +var jRs; +var Ift = ue({ + "out-build/proto/aiserver/v1/review_pb.js"() { + "use strict"; + + Hr(); + Wo(); + jie(); + jm(); + NRs = class Xje extends N { + constructor(e) { + super(); + this.telemEnabled = false; + this.bugBotDismissedNotificationLast10TimesUnixMs = []; + this.bugBotViewedNotificationLast10TimesUnixMs = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.BugConfigRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "telem_enabled", + kind: "scalar", + T: 8 + }, { + no: 2, + name: "bug_bot_dismissed_notification_last_10_times_unix_ms", + kind: "scalar", + T: 1, + repeated: true + }, { + no: 3, + name: "bug_bot_viewed_notification_last_10_times_unix_ms", + kind: "scalar", + T: 1, + repeated: true + }]); + } + static fromBinary(e, t) { + return new Xje().fromBinary(e, t); + } + static fromJson(e, t) { + return new Xje().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Xje().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Xje, e, t); + } + }; + Bse = class Qje extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.BugConfigResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "linter_strategy_v1", + kind: "message", + T: MRs + }, { + no: 2, + name: "bug_bot_v1", + kind: "message", + T: ARs + }, { + no: 3, + name: "linter_strategy_v2", + kind: "message", + T: zGt + }]); + } + static fromBinary(e, t) { + return new Qje().fromBinary(e, t); + } + static fromJson(e, t) { + return new Qje().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Qje().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Qje, e, t); + } + }; + MRs = class Zje extends N { + constructor(e) { + super(); + this.enabled = false; + this.tryTriggerOnSave = false; + this.waitBetweenTriggersMs = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.BugConfigResponse.LinterStrategyV1"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "enabled", + kind: "scalar", + T: 8 + }, { + no: 2, + name: "try_trigger_on_save", + kind: "scalar", + T: 8 + }, { + no: 3, + name: "wait_between_triggers_ms", + kind: "scalar", + T: 1 + }]); + } + static fromBinary(e, t) { + return new Zje().fromBinary(e, t); + } + static fromJson(e, t) { + return new Zje().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Zje().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Zje, e, t); + } + }; + zGt = class eze extends N { + constructor(e) { + super(); + this.enabled = false; + this.waitBetweenTriggersMs = 0; + this.debounceTriggersMs = 0; + this.keepLinesAroundChunk = 0; + this.preventTriggeringForFilesWithThisManyLines = 0; + this.preventTriggeringWhenLints = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.BugConfigResponse.LinterStrategyV2"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "enabled", + kind: "scalar", + T: 8 + }, { + no: 2, + name: "wait_between_triggers_ms", + kind: "scalar", + T: 1 + }, { + no: 3, + name: "debounce_triggers_ms", + kind: "scalar", + T: 1 + }, { + no: 4, + name: "keep_lines_around_chunk", + kind: "scalar", + T: 5 + }, { + no: 5, + name: "prevent_triggering_for_files_with_this_many_lines", + kind: "scalar", + T: 5 + }, { + no: 6, + name: "prevent_triggering_when_lints", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new eze().fromBinary(e, t); + } + static fromJson(e, t) { + return new eze().fromJson(e, t); + } + static fromJsonString(e, t) { + return new eze().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(eze, e, t); + } + }; + ARs = class tze extends N { + constructor(e) { + super(); + this.enabled = false; + this.isSubsidized = false; + this.backgroundCallFrequencyMs = 0; + this.killSwitch = false; + this.showIntrusiveNotificationOnlyIfLastTimeWasMoreThanMsAgo = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.BugConfigResponse.BugBotV1"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "enabled", + kind: "scalar", + T: 8 + }, { + no: 2, + name: "is_subsidized", + kind: "scalar", + T: 8 + }, { + no: 3, + name: "background_call_frequency_ms", + kind: "scalar", + T: 5 + }, { + no: 4, + name: "kill_switch", + kind: "scalar", + T: 8 + }, { + no: 5, + name: "show_intrusive_notification_only_if_last_time_was_more_than_ms_ago", + kind: "scalar", + T: 1 + }, { + no: 6, + name: "background_diff_absolute_max_tokens", + kind: "scalar", + T: 5, + opt: true + }, { + no: 7, + name: "background_diff_min_min_token_threshold", + kind: "scalar", + T: 5, + opt: true + }, { + no: 8, + name: "background_diff_min_max_token_threshold", + kind: "scalar", + T: 5, + opt: true + }, { + no: 9, + name: "background_diff_last_commit_less_than_this_many_ms_ago", + kind: "scalar", + T: 1, + opt: true + }, { + no: 15, + name: "background_unified_context_lines", + kind: "scalar", + T: 5, + opt: true + }, { + no: 16, + name: "background_diff_include_uncommitted", + kind: "scalar", + T: 8, + opt: true + }, { + no: 10, + name: "default_diff_context_lines", + kind: "scalar", + T: 5, + opt: true + }, { + no: 11, + name: "diff_absolute_max_tokens", + kind: "scalar", + T: 5, + opt: true + }, { + no: 12, + name: "custom_instructions_max_char_length", + kind: "scalar", + T: 5, + opt: true + }, { + no: 13, + name: "default_fallback_iterations", + kind: "scalar", + T: 5, + opt: true + }, { + no: 14, + name: "threshold_for_expensive_run_modal_cents", + kind: "scalar", + T: 5, + opt: true + }, { + no: 17, + name: "cheap_model_name", + kind: "scalar", + T: 9, + opt: true + }, { + no: 18, + name: "cheap_absolute_max_tokens", + kind: "scalar", + T: 5, + opt: true + }, { + no: 19, + name: "expensive_absolute_max_tokens", + kind: "scalar", + T: 5, + opt: true + }]); + } + static fromBinary(e, t) { + return new tze().fromBinary(e, t); + } + static fromJson(e, t) { + return new tze().fromJson(e, t); + } + static fromJsonString(e, t) { + return new tze().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(tze, e, t); + } + }; + $Rs = class ize extends N { + constructor(e) { + super(); + this.activeFile = ""; + this.cursorLineNumberOneIndexed = 0; + this.telemEnabled = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamBugBotLinterRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "git_diff", + kind: "message", + T: Sb + }, { + no: 2, + name: "active_file", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "cursor_line_number_one_indexed", + kind: "scalar", + T: 5 + }, { + no: 4, + name: "session_id", + kind: "scalar", + T: 9, + opt: true + }, { + no: 5, + name: "telem_enabled", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new ize().fromBinary(e, t); + } + static fromJson(e, t) { + return new ize().fromJson(e, t); + } + static fromJsonString(e, t) { + return new ize().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(ize, e, t); + } + }; + JGt = class sze extends N { + constructor(e) { + super(); + this.bugs = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamBugBotLinterResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "bugs", + kind: "message", + T: qie, + repeated: true + }]); + } + static fromBinary(e, t) { + return new sze().fromBinary(e, t); + } + static fromJson(e, t) { + return new sze().fromJson(e, t); + } + static fromJsonString(e, t) { + return new sze().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(sze, e, t); + } + }; + FRs = class nze extends N { + constructor(e) { + super(); + this.diffString = ""; + this.oldStart = 0; + this.newStart = 0; + this.oldLines = 0; + this.newLines = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ChunkDiff"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "diff_string", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "old_start", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "new_start", + kind: "scalar", + T: 5 + }, { + no: 4, + name: "old_lines", + kind: "scalar", + T: 5 + }, { + no: 5, + name: "new_lines", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new nze().fromBinary(e, t); + } + static fromJson(e, t) { + return new nze().fromJson(e, t); + } + static fromJsonString(e, t) { + return new nze().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(nze, e, t); + } + }; + GGt = class rze extends N { + constructor(e) { + super(); + this.fileDiffs = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ReviewRequestV2"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "file_diffs", + kind: "message", + T: ORs, + repeated: true + }, { + no: 2, + name: "linter_rules", + kind: "scalar", + T: 9, + opt: true + }, { + no: 3, + name: "also_find_hard_bugs", + kind: "scalar", + T: 8, + opt: true + }, { + no: 4, + name: "save_request_as", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new rze().fromBinary(e, t); + } + static fromJson(e, t) { + return new rze().fromJson(e, t); + } + static fromJsonString(e, t) { + return new rze().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(rze, e, t); + } + }; + ORs = class oze extends N { + constructor(e) { + super(); + this.chunkDiffs = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ReviewRequestV2.FileDiff"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "file", + kind: "message", + T: $x + }, { + no: 2, + name: "chunk_diffs", + kind: "message", + T: FRs, + repeated: true + }]); + } + static fromBinary(e, t) { + return new oze().fromBinary(e, t); + } + static fromJson(e, t) { + return new oze().fromJson(e, t); + } + static fromJsonString(e, t) { + return new oze().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(oze, e, t); + } + }; + KGt = class aze extends N { + constructor(e) { + super(); + this.id = ""; + this.chunkId = ""; + this.relativeWorkspacePath = ""; + this.startLine = 0; + this.endLine = 0; + this.description = ""; + this.severity = 0; + this.tldr = ""; + this.diff = ""; + this.fullChunkStartLine = 0; + this.fullChunkEndLine = 0; + this.fullChunkTotalLines = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ReviewBugV2"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "chunk_id", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "start_line", + kind: "scalar", + T: 5 + }, { + no: 5, + name: "end_line", + kind: "scalar", + T: 5 + }, { + no: 6, + name: "description", + kind: "scalar", + T: 9 + }, { + no: 7, + name: "severity", + kind: "scalar", + T: 5 + }, { + no: 8, + name: "tldr", + kind: "scalar", + T: 9 + }, { + no: 9, + name: "diff", + kind: "scalar", + T: 9 + }, { + no: 10, + name: "full_chunk_start_line", + kind: "scalar", + T: 5 + }, { + no: 11, + name: "full_chunk_end_line", + kind: "scalar", + T: 5 + }, { + no: 12, + name: "full_chunk_total_lines", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new aze().fromBinary(e, t); + } + static fromJson(e, t) { + return new aze().fromJson(e, t); + } + static fromJsonString(e, t) { + return new aze().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(aze, e, t); + } + }; + YGt = class lze extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ReviewResponseV2"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "bug", + kind: "message", + T: KGt + }]); + } + static fromBinary(e, t) { + return new lze().fromBinary(e, t); + } + static fromJson(e, t) { + return new lze().fromJson(e, t); + } + static fromJsonString(e, t) { + return new lze().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(lze, e, t); + } + }; + _Rs = class cze extends N { + constructor(e) { + super(); + this.messages = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ReviewChatRequestV2"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "file", + kind: "message", + T: $x + }, { + no: 2, + name: "bug", + kind: "message", + T: KGt + }, { + no: 3, + name: "linter_rules", + kind: "scalar", + T: 9, + opt: true + }, { + no: 4, + name: "messages", + kind: "message", + T: azt, + repeated: true + }]); + } + static fromBinary(e, t) { + return new cze().fromBinary(e, t); + } + static fromJson(e, t) { + return new cze().fromJson(e, t); + } + static fromJsonString(e, t) { + return new cze().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(cze, e, t); + } + }; + BRs = class uze extends N { + constructor(e) { + super(); + this.text = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ReviewChatResponseV2"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "text", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new uze().fromBinary(e, t); + } + static fromJson(e, t) { + return new uze().fromJson(e, t); + } + static fromJsonString(e, t) { + return new uze().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(uze, e, t); + } + }; + URs = class dze extends N { + constructor(e) { + super(); + this.bugs = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamBugFindingResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "bugs", + kind: "message", + T: WRs, + repeated: true + }]); + } + static fromBinary(e, t) { + return new dze().fromBinary(e, t); + } + static fromJson(e, t) { + return new dze().fromJson(e, t); + } + static fromJsonString(e, t) { + return new dze().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(dze, e, t); + } + }; + WRs = class hze extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.startLine = 0; + this.endLineInclusive = 0; + this.codeLines = []; + this.severity = 0; + this.confidence = 0; + this.description = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamBugFindingResponse.Bug"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "start_line", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "end_line_inclusive", + kind: "scalar", + T: 5 + }, { + no: 4, + name: "code_lines", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 5, + name: "severity", + kind: "scalar", + T: 1 + }, { + no: 6, + name: "confidence", + kind: "scalar", + T: 1 + }, { + no: 7, + name: "description", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new hze().fromBinary(e, t); + } + static fromJson(e, t) { + return new hze().fromJson(e, t); + } + static fromJsonString(e, t) { + return new hze().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(hze, e, t); + } + }; + VRs = class fze extends N { + constructor(e) { + super(); + this.fileDiffs = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamBugFindingRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "file_diffs", + kind: "message", + T: HRs, + repeated: true + }]); + } + static fromBinary(e, t) { + return new fze().fromBinary(e, t); + } + static fromJson(e, t) { + return new fze().fromJson(e, t); + } + static fromJsonString(e, t) { + return new fze().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(fze, e, t); + } + }; + HRs = class gze extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.lines = []; + this.hunks = []; + this.notTruncated = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamBugFindingRequest.FileDiff"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "lines", + kind: "message", + T: jRs, + repeated: true + }, { + no: 3, + name: "hunks", + kind: "message", + T: qRs, + repeated: true + }, { + no: 4, + name: "old_relative_workspace_path", + kind: "scalar", + T: 9, + opt: true + }, { + no: 5, + name: "not_truncated", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new gze().fromBinary(e, t); + } + static fromJson(e, t) { + return new gze().fromJson(e, t); + } + static fromJsonString(e, t) { + return new gze().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(gze, e, t); + } + }; + qRs = class pze extends N { + constructor(e) { + super(); + this.oldStartOneIndexed = 0; + this.newStartOneIndexed = 0; + this.oldLines = []; + this.newLines = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamBugFindingRequest.FileDiff.Hunk"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "old_start_one_indexed", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "new_start_one_indexed", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "old_lines", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 4, + name: "new_lines", + kind: "scalar", + T: 9, + repeated: true + }]); + } + static fromBinary(e, t) { + return new pze().fromBinary(e, t); + } + static fromJson(e, t) { + return new pze().fromJson(e, t); + } + static fromJsonString(e, t) { + return new pze().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(pze, e, t); + } + }; + jRs = class mze extends N { + constructor(e) { + super(); + this.oneIndexedLineNumber = 0; + this.line = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamBugFindingRequest.FileDiff.Line"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "one_indexed_line_number", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "line", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new mze().fromBinary(e, t); + } + static fromJson(e, t) { + return new mze().fromJson(e, t); + } + static fromJsonString(e, t) { + return new mze().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(mze, e, t); + } + }; + } +}); +var zRs; +var JRs; +var GRs; +var KRs; +var YRs; +var XRs; +var Bnr = ue({ + "out-build/proto/aiserver/v1/profiling_config_pb.js"() { + "use strict"; + + Hr(); + zRs = class bze extends N { + constructor(e) { + super(); + this.samplingInterval = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.HeapProfileConfig"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "sampling_interval", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "include_objects_collected_by_major_gc", + kind: "scalar", + T: 8, + opt: true + }, { + no: 3, + name: "include_objects_collected_by_minor_gc", + kind: "scalar", + T: 8, + opt: true + }]); + } + static fromBinary(e, t) { + return new bze().fromBinary(e, t); + } + static fromJson(e, t) { + return new bze().fromJson(e, t); + } + static fromJsonString(e, t) { + return new bze().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(bze, e, t); + } + }; + JRs = class vze extends N { + constructor(e) { + super(); + this.interval = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CpuProfileConfig"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "interval", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new vze().fromBinary(e, t); + } + static fromJson(e, t) { + return new vze().fromJson(e, t); + } + static fromJsonString(e, t) { + return new vze().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(vze, e, t); + } + }; + GRs = class yze extends N { + constructor(e) { + super(); + this.id = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ProfileConfig"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "heap", + kind: "message", + T: zRs, + opt: true + }, { + no: 3, + name: "cpu", + kind: "message", + T: JRs, + opt: true + }]); + } + static fromBinary(e, t) { + return new yze().fromBinary(e, t); + } + static fromJson(e, t) { + return new yze().fromJson(e, t); + } + static fromJsonString(e, t) { + return new yze().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(yze, e, t); + } + }; + KRs = class wze extends N { + constructor(e) { + super(); + this.id = ""; + this.process = ""; + this.configId = ""; + this.activityTimeout = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ProfileScheduleConfig"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "process", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "config_id", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "schedule", + kind: "message", + T: YRs + }, { + no: 5, + name: "activity_timeout", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new wze().fromBinary(e, t); + } + static fromJson(e, t) { + return new wze().fromJson(e, t); + } + static fromJsonString(e, t) { + return new wze().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(wze, e, t); + } + }; + YRs = class Cze extends N { + constructor(e) { + super(); + this.interval = 0; + this.duration = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ProfileScheduleConfig.ScheduleConfig"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "interval", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "duration", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new Cze().fromBinary(e, t); + } + static fromJson(e, t) { + return new Cze().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Cze().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Cze, e, t); + } + }; + XRs = class Sze extends N { + constructor(e) { + super(); + this.enabled = false; + this.configs = []; + this.schedules = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ProfilingConfig"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "enabled", + kind: "scalar", + T: 8 + }, { + no: 2, + name: "configs", + kind: "message", + T: GRs, + repeated: true + }, { + no: 3, + name: "schedules", + kind: "message", + T: KRs, + repeated: true + }]); + } + static fromBinary(e, t) { + return new Sze().fromBinary(e, t); + } + static fromJson(e, t) { + return new Sze().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Sze().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Sze, e, t); + } + }; + } +}); +var Use; +var XGt; +var QRs; +var QGt; +var ZRs; +var eNs; +var tNs; +var iNs; +var sNs; +var nNs; +var ZGt; +var qye; +var eKt = ue({ + "out-build/proto/aiserver/v1/server_config_pb.js"() { + "use strict"; + + Hr(); + Ift(); + Bnr(); + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.FORCE_ALL_DISABLED = 1] = "FORCE_ALL_DISABLED"; + i[i.FORCE_ALL_ENABLED = 2] = "FORCE_ALL_ENABLED"; + i[i.FORCE_BIDI_DISABLED = 3] = "FORCE_BIDI_DISABLED"; + i[i.FORCE_BIDI_ENABLED = 4] = "FORCE_BIDI_ENABLED"; + })(Use ||= {}); + m.util.setEnumType(Use, "aiserver.v1.Http2Config", [{ + no: 0, + name: "HTTP2_CONFIG_UNSPECIFIED" + }, { + no: 1, + name: "HTTP2_CONFIG_FORCE_ALL_DISABLED" + }, { + no: 2, + name: "HTTP2_CONFIG_FORCE_ALL_ENABLED" + }, { + no: 3, + name: "HTTP2_CONFIG_FORCE_BIDI_DISABLED" + }, { + no: 4, + name: "HTTP2_CONFIG_FORCE_BIDI_ENABLED" + }]); + XGt = class xze extends N { + constructor(e) { + super(); + this.maxConcurrentUploads = 0; + this.absoluteMaxNumberFiles = 0; + this.maxFileRetries = 0; + this.syncConcurrency = 0; + this.autoIndexingMaxNumFiles = 0; + this.indexingPeriodSeconds = 0; + this.repo42AuthToken = ""; + this.copyStatusCheckPeriodSeconds = 0; + this.copyTimeoutSeconds = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.IndexingConfig"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "max_concurrent_uploads", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "absolute_max_number_files", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "max_file_retries", + kind: "scalar", + T: 5 + }, { + no: 4, + name: "sync_concurrency", + kind: "scalar", + T: 5 + }, { + no: 5, + name: "auto_indexing_max_num_files", + kind: "scalar", + T: 5 + }, { + no: 6, + name: "indexing_period_seconds", + kind: "scalar", + T: 5 + }, { + no: 7, + name: "repo42_auth_token", + kind: "scalar", + T: 9 + }, { + no: 8, + name: "incremental", + kind: "scalar", + T: 8, + opt: true + }, { + no: 9, + name: "default_user_path_encryption_key", + kind: "scalar", + T: 9, + opt: true + }, { + no: 10, + name: "default_team_path_encryption_key", + kind: "scalar", + T: 9, + opt: true + }, { + no: 11, + name: "multi_root_indexing_enabled", + kind: "scalar", + T: 8, + opt: true + }, { + no: 12, + name: "copy_status_check_period_seconds", + kind: "scalar", + T: 1 + }, { + no: 13, + name: "copy_timeout_seconds", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new xze().fromBinary(e, t); + } + static fromJson(e, t) { + return new xze().fromJson(e, t); + } + static fromJsonString(e, t) { + return new xze().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(xze, e, t); + } + }; + QRs = class kze extends N { + constructor(e) { + super(); + this.globalSampleRate = 0; + this.tracesSampleRate = 0; + this.loggerSampleRate = 0; + this.minidumpSampleRate = 0; + this.errorRateLimit = 0; + this.performanceUnitRateLimit = 0; + this.profilesSampleRate = 0; + this.jsonStringifySampleRate = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ClientTracingConfig"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "global_sample_rate", + kind: "scalar", + T: 1 + }, { + no: 2, + name: "traces_sample_rate", + kind: "scalar", + T: 1 + }, { + no: 3, + name: "logger_sample_rate", + kind: "scalar", + T: 1 + }, { + no: 4, + name: "minidump_sample_rate", + kind: "scalar", + T: 1 + }, { + no: 5, + name: "error_rate_limit", + kind: "scalar", + T: 1 + }, { + no: 6, + name: "performance_unit_rate_limit", + kind: "scalar", + T: 1 + }, { + no: 7, + name: "profiles_sample_rate", + kind: "scalar", + T: 1 + }, { + no: 8, + name: "json_stringify_sample_rate", + kind: "scalar", + T: 1 + }]); + } + static fromBinary(e, t) { + return new kze().fromBinary(e, t); + } + static fromJson(e, t) { + return new kze().fromJson(e, t); + } + static fromJsonString(e, t) { + return new kze().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(kze, e, t); + } + }; + QGt = class Eze extends N { + constructor(e) { + super(); + this.disableUnification = false; + this.fullContextTokenLimit = 0; + this.disableYoloMode = false; + this.maxRuleLength = 0; + this.maxMcpTools = 0; + this.warnMcpTools = 0; + this.summarizationMessage = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ChatConfig"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "disable_unification", + kind: "scalar", + T: 8 + }, { + no: 2, + name: "full_context_token_limit", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "disable_yolo_mode", + kind: "scalar", + T: 8 + }, { + no: 4, + name: "max_rule_length", + kind: "scalar", + T: 5 + }, { + no: 5, + name: "max_mcp_tools", + kind: "scalar", + T: 5 + }, { + no: 6, + name: "warn_mcp_tools", + kind: "scalar", + T: 5 + }, { + no: 7, + name: "summarization_message", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new Eze().fromBinary(e, t); + } + static fromJson(e, t) { + return new Eze().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Eze().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Eze, e, t); + } + }; + ZRs = class Ize extends N { + constructor(e) { + super(); + this.telemEnabled = false; + this.bugBotDismissedNotificationLast10TimesUnixMs = []; + this.bugBotViewedNotificationLast10TimesUnixMs = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetServerConfigRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "telem_enabled", + kind: "scalar", + T: 8 + }, { + no: 2, + name: "bug_bot_dismissed_notification_last_10_times_unix_ms", + kind: "scalar", + T: 1, + repeated: true + }, { + no: 3, + name: "bug_bot_viewed_notification_last_10_times_unix_ms", + kind: "scalar", + T: 1, + repeated: true + }]); + } + static fromBinary(e, t) { + return new Ize().fromBinary(e, t); + } + static fromJson(e, t) { + return new Ize().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Ize().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Ize, e, t); + } + }; + eNs = class Dze extends N { + constructor(e) { + super(); + this.enabledInPrivacyMode = false; + this.enabledInNonPrivacyMode = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.MetricsConfig"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 2, + name: "enabled_in_privacy_mode", + kind: "scalar", + T: 8 + }, { + no: 3, + name: "enabled_in_non_privacy_mode", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new Dze().fromBinary(e, t); + } + static fromJson(e, t) { + return new Dze().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Dze().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Dze, e, t); + } + }; + tNs = class Tze extends N { + constructor(e) { + super(); + this.enableBackgroundAgent = false; + this.showBackgroundAgentInBetaSettings = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.BackgroundComposerConfig"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "enable_background_agent", + kind: "scalar", + T: 8 + }, { + no: 2, + name: "show_background_agent_in_beta_settings", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new Tze().fromBinary(e, t); + } + static fromJson(e, t) { + return new Tze().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Tze().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Tze, e, t); + } + }; + iNs = class Pze extends N { + constructor(e) { + super(); + this.enabled = false; + this.enabledFallback = false; + this.enabledGitGraph = false; + this.enabledSemSearch = false; + this.enabledV2 = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.AutoContextConfig"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "enabled", + kind: "scalar", + T: 8 + }, { + no: 2, + name: "enabled_fallback", + kind: "scalar", + T: 8 + }, { + no: 3, + name: "enabled_git_graph", + kind: "scalar", + T: 8 + }, { + no: 4, + name: "enabled_sem_search", + kind: "scalar", + T: 8 + }, { + no: 5, + name: "enabled_v2", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new Pze().fromBinary(e, t); + } + static fromJson(e, t) { + return new Pze().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Pze().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Pze, e, t); + } + }; + sNs = class Lze extends N { + constructor(e) { + super(); + this.enabled = false; + this.showStatusEntry = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.MemoryMonitorConfig"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "enabled", + kind: "scalar", + T: 8 + }, { + no: 2, + name: "show_status_entry", + kind: "scalar", + T: 8 + }, { + no: 3, + name: "base_threshold_mb", + kind: "scalar", + T: 5, + opt: true + }, { + no: 4, + name: "critical_offset_mb", + kind: "scalar", + T: 5, + opt: true + }]); + } + static fromBinary(e, t) { + return new Lze().fromBinary(e, t); + } + static fromJson(e, t) { + return new Lze().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Lze().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Lze, e, t); + } + }; + nNs = class Rze extends N { + constructor(e) { + super(); + this.id = ""; + this.modelSetting = ""; + this.targetModel = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ModelMigration"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "model_setting", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "target_model", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "previous_model", + kind: "scalar", + T: 9, + opt: true + }, { + no: 5, + name: "migrate_mode_models", + kind: "scalar", + T: 8, + opt: true + }, { + no: 6, + name: "remove_previous_model", + kind: "scalar", + T: 8, + opt: true + }, { + no: 7, + name: "max_mode", + kind: "scalar", + T: 8, + opt: true + }]); + } + static fromBinary(e, t) { + return new Rze().fromBinary(e, t); + } + static fromJson(e, t) { + return new Rze().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Rze().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Rze, e, t); + } + }; + ZGt = class Nze extends N { + constructor(e) { + super(); + this.maxTotalBytes = 0; + this.maxNumFiles = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.FolderSizeLimit"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "max_total_bytes", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "max_num_files", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new Nze().fromBinary(e, t); + } + static fromJson(e, t) { + return new Nze().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Nze().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Nze, e, t); + } + }; + qye = class Mze extends N { + constructor(e) { + super(); + this.isDevDoNotUseForSecretThingsBecauseCanBeSpoofedByUsers = false; + this.configVersion = ""; + this.http2Config = Use.UNSPECIFIED; + this.modelMigrations = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetServerConfigResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "bug_config_response", + kind: "message", + T: Bse + }, { + no: 2, + name: "is_dev_do_not_use_for_secret_things_because_can_be_spoofed_by_users", + kind: "scalar", + T: 8 + }, { + no: 3, + name: "indexing_config", + kind: "message", + T: XGt + }, { + no: 4, + name: "client_tracing_config", + kind: "message", + T: QRs + }, { + no: 5, + name: "chat_config", + kind: "message", + T: QGt + }, { + no: 6, + name: "config_version", + kind: "scalar", + T: 9 + }, { + no: 7, + name: "http2_config", + kind: "enum", + T: m.getEnumType(Use) + }, { + no: 8, + name: "profiling_config", + kind: "message", + T: XRs + }, { + no: 9, + name: "metrics_config", + kind: "message", + T: eNs + }, { + no: 10, + name: "background_composer_config", + kind: "message", + T: tNs + }, { + no: 11, + name: "auto_context_config", + kind: "message", + T: iNs + }, { + no: 12, + name: "model_migrations", + kind: "message", + T: nNs, + repeated: true + }, { + no: 13, + name: "memory_monitor_config", + kind: "message", + T: sNs + }, { + no: 14, + name: "folder_size_limit", + kind: "message", + T: ZGt + }]); + } + static fromBinary(e, t) { + return new Mze().fromBinary(e, t); + } + static fromJson(e, t) { + return new Mze().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Mze().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Mze, e, t); + } + }; + } +}); +var Dft; +var rNs = ue({ + "out-build/proto/aiserver/v1/server_config_connectweb.js"() { + "use strict"; + + eKt(); + Hr(); + Dft = { + typeName: "aiserver.v1.ServerConfigService", + methods: { + getServerConfig: { + name: "GetServerConfig", + I: ZRs, + O: qye, + kind: Ge.Unary + } + } + }; + } +}); +var tKt; +var iKt; +var oNs; +var lv; +var jye; +var sKt; +var aNs; +var bU = ue({ + "out-build/vs/workbench/contrib/bugbot/browser/constants.js"() { + "use strict"; + + tKt = 1; + iKt = 100; + oNs = 10; + lv = { + enabled: false, + isSubsidized: false, + backgroundCallFrequencyMs: 10800000, + killSwitch: false, + showIntrusiveNotificationOnlyIfLastTimeWasMoreThanMsAgo: 10, + backgroundDiffAbsoluteMaxTokens: 128000, + backgroundDiffMinMinTokenThreshold: 2000, + backgroundDiffMinMaxTokenThreshold: 50000, + defaultDiffContextLines: 10, + defaultFallbackIterations: 12, + diffAbsoluteMaxTokens: 500000, + backgroundDiffLastCommitLessThanThisManyMsAgo: 900000, + customInstructionsMaxCharLength: 4000, + thresholdForExpensiveRunModalCents: 1000, + backgroundUnifiedContextLines: 10, + backgroundDiffIncludeUncommitted: false, + cheapModelName: "accounts/anysphere/models/bugbot-12-10", + cheapAbsoluteMaxTokens: 150000, + expensiveAbsoluteMaxTokens: 1500000 + }; + jye = 0; + sKt = [{ + type: "text", + content: "Bug Finder analyzes code changes between your current branch and the main branch in your Git remote repository." + }, { + type: "text", + content: "For the best results, run it on feature branches before merging into main to catch potential issues early in development. Cost increases with the number of lines changed." + }]; + aNs = [...sKt, { + type: "text", + content: "" + }, { + type: "highlight", + before: "AI-powered bug detection is still experimental and may not catch all issues in your code. ", + highlight: "You may lose your money and get zero valid bugs back.", + after: " Please use at your own risk." + }, { + type: "text", + content: "" + }, { + type: "text", + content: "We're hoping to make the bug finder both much more accurate and much cheaper in the coming months." + }]; + } +}); +var Kw; +var kg = ue({ + "out-build/external/bufbuild/connect/code.js"() { + "use strict"; + + (function (i) { + i[i.Canceled = 1] = "Canceled"; + i[i.Unknown = 2] = "Unknown"; + i[i.InvalidArgument = 3] = "InvalidArgument"; + i[i.DeadlineExceeded = 4] = "DeadlineExceeded"; + i[i.NotFound = 5] = "NotFound"; + i[i.AlreadyExists = 6] = "AlreadyExists"; + i[i.PermissionDenied = 7] = "PermissionDenied"; + i[i.ResourceExhausted = 8] = "ResourceExhausted"; + i[i.FailedPrecondition = 9] = "FailedPrecondition"; + i[i.Aborted = 10] = "Aborted"; + i[i.OutOfRange = 11] = "OutOfRange"; + i[i.Unimplemented = 12] = "Unimplemented"; + i[i.Internal = 13] = "Internal"; + i[i.Unavailable = 14] = "Unavailable"; + i[i.DataLoss = 15] = "DataLoss"; + i[i.Unauthenticated = 16] = "Unauthenticated"; + })(Kw ||= {}); + } +}); +function lNs(i) { + const e = Kw[i]; + if (typeof e != "string") { + return i.toString(); + } else { + return e[0].toLowerCase() + e.substring(1).replace(/[A-Z]/g, t => "_" + t.toLowerCase()); + } +} +var cNs = ue({ + "out-build/external/bufbuild/connect/protocol-connect/code-string.js"() { + "use strict"; + + kg(); + } +}); +function Unr(i, e) { + if (i.length) { + return `[${lNs(e)}] ${i}`; + } else { + return `[${lNs(e)}]`; + } +} +var Eg; +var Ep = ue({ + "out-build/external/bufbuild/connect/connect-error.js"() { + "use strict"; + + kg(); + cNs(); + Eg = class Kde extends Error { + constructor(e, t = Kw.Unknown, s, n, r) { + super(Unr(e, t)); + this.name = "ConnectError"; + Object.setPrototypeOf(this, new.target.prototype); + this.rawMessage = e; + this.code = t; + this.metadata = new Headers(s ?? {}); + this.details = n ?? []; + this.cause = r; + } + static from(e, t = Kw.Unknown) { + if (e instanceof Kde) { + return e; + } else if (e instanceof Error) { + if (e.name == "AbortError") { + return new Kde(e.message, Kw.Canceled); + } else { + return new Kde(e.message, t, undefined, undefined, e); + } + } else { + return new Kde(String(e), t, undefined, undefined, e); + } + } + static [Symbol.hasInstance](e) { + if (e instanceof Error) { + if (Object.getPrototypeOf(e) === Kde.prototype) { + return true; + } else { + return e.name === "ConnectError" && "code" in e && typeof e.code == "number" && "metadata" in e && "details" in e && Array.isArray(e.details) && "rawMessage" in e && typeof e.rawMessage == "string" && "cause" in e; + } + } else { + return false; + } + } + findDetails(e) { + const t = "typeName" in e ? { + findMessage: n => n === e.typeName ? e : undefined + } : e; + const s = []; + for (const n of this.details) { + if ("getType" in n) { + if (t.findMessage(n.getType().typeName)) { + s.push(n); + } + continue; + } + const r = t.findMessage(n.type); + if (r) { + try { + s.push(r.fromBinary(n.value)); + } catch {} + } + } + return s; + } + }; + } +}); +var Tft = ue({ + "out-build/external/bufbuild/connect/http-headers.js"() { + "use strict"; + + Hr(); + Ep(); + kg(); + } +}); +function Wnr(i, e) { + const t = {}; + for (const [s, n] of Object.entries(i.methods)) { + const r = e({ + ...n, + localName: s, + service: i + }); + if (r != null) { + t[s] = r; + } + } + return t; +} +var nKt = ue({ + "out-build/external/bufbuild/connect/any-client.js"() { + "use strict"; + } +}); +var Pft = ue({ + "out-build/external/bufbuild/connect/protocol/compression.js"() { + "use strict"; + + Ep(); + kg(); + } +}); +var Vnr = ue({ + "out-build/external/bufbuild/connect/protocol/envelope.js"() { + "use strict"; + + Ep(); + kg(); + Pft(); + } +}); +var rKt = ue({ + "out-build/external/bufbuild/connect/protocol/limit-io.js"() { + "use strict"; + + Ep(); + kg(); + } +}); +function vU(i = 0) { + return new Uint8Array(i); +} +function oKt(i = 0) { + return new Uint8Array(i); +} +var uNs = ue({ + "out-build/external/bufbuild/connect/uint8arrays/alloc.js"() { + "use strict"; + } +}); +function nia(i) { + return i; +} +var Hnr = ue({ + "out-build/external/bufbuild/connect/uint8arrays/util/as-uint8array.js"() { + "use strict"; + } +}); +function dNs(i, e) { + if (e == null) { + e = i.reduce((n, r) => n + r.length, 0); + } + const t = oKt(e); + let s = 0; + for (const n of i) { + t.set(n, s); + s += n.length; + } + return t; +} +var qnr = ue({ + "out-build/external/bufbuild/connect/uint8arrays/concat.js"() { + "use strict"; + + uNs(); + Hnr(); + } +}); +function jnr(i, e) { + if (i === e) { + return true; + } + if (i.byteLength !== e.byteLength) { + return false; + } + for (let t = 0; t < i.byteLength; t++) { + if (i[t] !== e[t]) { + return false; + } + } + return true; +} +var znr = ue({ + "out-build/external/bufbuild/connect/uint8arrays/equals.js"() { + "use strict"; + } +}); +function hNs(i, e) { + if (e == null || e < 0) { + throw new RangeError("index is out of bounds"); + } + let t = 0; + for (const s of i) { + const n = t + s.byteLength; + if (e < n) { + return { + buf: s, + index: e - t + }; + } + t = n; + } + throw new RangeError("index is out of bounds"); +} +function Lft(i) { + return !!i?.[aKt]; +} +var fNs; +var aKt; +var Jnr; +var Gnr = ue({ + "out-build/external/bufbuild/connect/uint8arraylist/index.js"() { + "use strict"; + + uNs(); + qnr(); + znr(); + aKt = Symbol.for("@achingbrain/uint8arraylist"); + Jnr = class xFt { + constructor(...e) { + this[fNs] = true; + this.bufs = []; + this.length = 0; + if (e.length > 0) { + this.appendAll(e); + } + } + *[(fNs = aKt, Symbol.iterator)]() { + yield* this.bufs; + } + get byteLength() { + return this.length; + } + append(...e) { + this.appendAll(e); + } + appendAll(e) { + let t = 0; + for (const s of e) { + if (s instanceof Uint8Array) { + t += s.byteLength; + this.bufs.push(s); + } else if (Lft(s)) { + t += s.byteLength; + this.bufs.push(...s.bufs); + } else { + throw new Error("Could not append value, must be an Uint8Array or a Uint8ArrayList"); + } + } + this.length += t; + } + prepend(...e) { + this.prependAll(e); + } + prependAll(e) { + let t = 0; + for (const s of e.reverse()) { + if (s instanceof Uint8Array) { + t += s.byteLength; + this.bufs.unshift(s); + } else if (Lft(s)) { + t += s.byteLength; + this.bufs.unshift(...s.bufs); + } else { + throw new Error("Could not prepend value, must be an Uint8Array or a Uint8ArrayList"); + } + } + this.length += t; + } + get(e) { + const t = hNs(this.bufs, e); + return t.buf[t.index]; + } + set(e, t) { + const s = hNs(this.bufs, e); + s.buf[s.index] = t; + } + write(e, t = 0) { + if (e instanceof Uint8Array) { + for (let s = 0; s < e.length; s++) { + this.set(t + s, e[s]); + } + } else if (Lft(e)) { + for (let s = 0; s < e.length; s++) { + this.set(t + s, e.get(s)); + } + } else { + throw new Error("Could not write value, must be an Uint8Array or a Uint8ArrayList"); + } + } + consume(e) { + e = Math.trunc(e); + if (!Number.isNaN(e) && !(e <= 0)) { + if (e === this.byteLength) { + this.bufs = []; + this.length = 0; + return; + } + while (this.bufs.length > 0) { + if (e >= this.bufs[0].byteLength) { + e -= this.bufs[0].byteLength; + this.length -= this.bufs[0].byteLength; + this.bufs.shift(); + } else { + this.bufs[0] = this.bufs[0].subarray(e); + this.length -= e; + break; + } + } + } + } + slice(e, t) { + const { + bufs: s, + length: n + } = this._subList(e, t); + return dNs(s, n); + } + subarray(e, t) { + const { + bufs: s, + length: n + } = this._subList(e, t); + if (s.length === 1) { + return s[0]; + } else { + return dNs(s, n); + } + } + sublist(e, t) { + const { + bufs: s, + length: n + } = this._subList(e, t); + const r = new xFt(); + r.length = n; + r.bufs = [...s]; + return r; + } + _subList(e, t) { + e = e ?? 0; + t = t ?? this.length; + if (e < 0) { + e = this.length + e; + } + if (t < 0) { + t = this.length + t; + } + if (e < 0 || t > this.length) { + throw new RangeError("index is out of bounds"); + } + if (e === t) { + return { + bufs: [], + length: 0 + }; + } + if (e === 0 && t === this.length) { + return { + bufs: this.bufs, + length: this.length + }; + } + const s = []; + let n = 0; + for (let r = 0; r < this.bufs.length; r++) { + const o = this.bufs[r]; + const a = n; + const l = a + o.byteLength; + n = l; + if (e >= l) { + continue; + } + const c = e >= a && e < l; + const u = t > a && t <= l; + if (c && u) { + if (e === a && t === l) { + s.push(o); + break; + } + const d = e - a; + s.push(o.subarray(d, d + (t - e))); + break; + } + if (c) { + if (e === 0) { + s.push(o); + continue; + } + s.push(o.subarray(e - a)); + continue; + } + if (u) { + if (t === l) { + s.push(o); + break; + } + s.push(o.subarray(0, t - a)); + break; + } + s.push(o); + } + return { + bufs: s, + length: t - e + }; + } + indexOf(e, t = 0) { + if (!Lft(e) && !(e instanceof Uint8Array)) { + throw new TypeError("The \"value\" argument must be a Uint8ArrayList or Uint8Array"); + } + const s = e instanceof Uint8Array ? e : e.subarray(); + t = Number(t ?? 0); + if (isNaN(t)) { + t = 0; + } + if (t < 0) { + t = this.length + t; + } + if (t < 0) { + t = 0; + } + if (e.length === 0) { + if (t > this.length) { + return this.length; + } else { + return t; + } + } + const n = s.byteLength; + if (n === 0) { + throw new TypeError("search must be at least 1 byte long"); + } + const r = 256; + const o = new Int32Array(r); + for (let d = 0; d < r; d++) { + o[d] = -1; + } + for (let d = 0; d < n; d++) { + o[s[d]] = d; + } + const a = o; + const l = this.byteLength - s.byteLength; + const c = s.byteLength - 1; + let u; + for (let d = t; d <= l; d += u) { + u = 0; + for (let h = c; h >= 0; h--) { + const g = this.get(d + h); + if (s[h] !== g) { + u = Math.max(1, h - a[g]); + break; + } + } + if (u === 0) { + return d; + } + } + return -1; + } + getInt8(e) { + const t = this.subarray(e, e + 1); + return new DataView(t.buffer, t.byteOffset, t.byteLength).getInt8(0); + } + setInt8(e, t) { + const s = oKt(1); + new DataView(s.buffer, s.byteOffset, s.byteLength).setInt8(0, t); + this.write(s, e); + } + getInt16(e, t) { + const s = this.subarray(e, e + 2); + return new DataView(s.buffer, s.byteOffset, s.byteLength).getInt16(0, t); + } + setInt16(e, t, s) { + const n = vU(2); + new DataView(n.buffer, n.byteOffset, n.byteLength).setInt16(0, t, s); + this.write(n, e); + } + getInt32(e, t) { + const s = this.subarray(e, e + 4); + return new DataView(s.buffer, s.byteOffset, s.byteLength).getInt32(0, t); + } + setInt32(e, t, s) { + const n = vU(4); + new DataView(n.buffer, n.byteOffset, n.byteLength).setInt32(0, t, s); + this.write(n, e); + } + getBigInt64(e, t) { + const s = this.subarray(e, e + 8); + return new DataView(s.buffer, s.byteOffset, s.byteLength).getBigInt64(0, t); + } + setBigInt64(e, t, s) { + const n = vU(8); + new DataView(n.buffer, n.byteOffset, n.byteLength).setBigInt64(0, t, s); + this.write(n, e); + } + getUint8(e) { + const t = this.subarray(e, e + 1); + return new DataView(t.buffer, t.byteOffset, t.byteLength).getUint8(0); + } + setUint8(e, t) { + const s = oKt(1); + new DataView(s.buffer, s.byteOffset, s.byteLength).setUint8(0, t); + this.write(s, e); + } + getUint16(e, t) { + const s = this.subarray(e, e + 2); + return new DataView(s.buffer, s.byteOffset, s.byteLength).getUint16(0, t); + } + setUint16(e, t, s) { + const n = vU(2); + new DataView(n.buffer, n.byteOffset, n.byteLength).setUint16(0, t, s); + this.write(n, e); + } + getUint32(e, t) { + const s = this.subarray(e, e + 4); + return new DataView(s.buffer, s.byteOffset, s.byteLength).getUint32(0, t); + } + setUint32(e, t, s) { + const n = vU(4); + new DataView(n.buffer, n.byteOffset, n.byteLength).setUint32(0, t, s); + this.write(n, e); + } + getBigUint64(e, t) { + const s = this.subarray(e, e + 8); + return new DataView(s.buffer, s.byteOffset, s.byteLength).getBigUint64(0, t); + } + setBigUint64(e, t, s) { + const n = vU(8); + new DataView(n.buffer, n.byteOffset, n.byteLength).setBigUint64(0, t, s); + this.write(n, e); + } + getFloat32(e, t) { + const s = this.subarray(e, e + 4); + return new DataView(s.buffer, s.byteOffset, s.byteLength).getFloat32(0, t); + } + setFloat32(e, t, s) { + const n = vU(4); + new DataView(n.buffer, n.byteOffset, n.byteLength).setFloat32(0, t, s); + this.write(n, e); + } + getFloat64(e, t) { + const s = this.subarray(e, e + 8); + return new DataView(s.buffer, s.byteOffset, s.byteLength).getFloat64(0, t); + } + setFloat64(e, t, s) { + const n = vU(8); + new DataView(n.buffer, n.byteOffset, n.byteLength).setFloat64(0, t, s); + this.write(n, e); + } + equals(e) { + if (e == null || !(e instanceof xFt) || e.bufs.length !== this.bufs.length) { + return false; + } + for (let t = 0; t < this.bufs.length; t++) { + if (!jnr(this.bufs[t], e.bufs[t])) { + return false; + } + } + return true; + } + static fromUint8Arrays(e, t) { + const s = new xFt(); + s.bufs = e; + if (t == null) { + t = e.reduce((n, r) => n + r.byteLength, 0); + } + s.length = t; + return s; + } + }; + } +}); +async function* Knr(i) { + yield* i; +} +var $J = ue({ + "out-build/external/bufbuild/connect/protocol/async-iterable.js"() { + "use strict"; + + kg(); + Ep(); + Vnr(); + rKt(); + Gnr(); + } +}); +var Ynr = ue({ + "out-build/external/bufbuild/connect/callback-client.js"() { + "use strict"; + + Hr(); + Ep(); + kg(); + nKt(); + $J(); + } +}); +function Xnr(i, e) { + return Wnr(i, t => { + switch (t.kind) { + case Ge.Unary: + return Znr(e, i, t); + case Ge.ServerStreaming: + return err(e, i, t); + case Ge.ClientStreaming: + return trr(e, i, t); + case Ge.BiDiStreaming: + return irr(e, i, t); + default: + return null; + } + }); +} +function Qnr(i, e) { + return Xnr(i, e); +} +function Znr(i, e, t) { + return async function (s, n) { + const r = await i.unary(e, t, n?.signal, n?.timeoutMs, n?.headers, s, n?.contextValues); + n?.onHeader?.(r.header); + n?.onTrailer?.(r.trailer); + return r.message; + }; +} +function err(i, e, t) { + return function (s, n) { + return gNs(i.stream(e, t, n?.signal, n?.timeoutMs, n?.headers, Knr([s]), n?.contextValues), n); + }; +} +function trr(i, e, t) { + return async function (s, n) { + const r = await i.stream(e, t, n?.signal, n?.timeoutMs, n?.headers, s, n?.contextValues); + n?.onHeader?.(r.header); + let o; + let a = 0; + for await (const l of r.message) { + o = l; + a++; + } + if (!o) { + throw new Eg("protocol error: missing response message", Kw.Unimplemented); + } + if (a > 1) { + throw new Eg("protocol error: received extra messages for client streaming method", Kw.Unimplemented); + } + n?.onTrailer?.(r.trailer); + return o; + }; +} +function irr(i, e, t) { + return function (s, n) { + return gNs(i.stream(e, t, n?.signal, n?.timeoutMs, n?.headers, s, n?.contextValues), n); + }; +} +function gNs(i, e) { + const t = async function* () { + const s = await i; + e?.onHeader?.(s.header); + yield* s.message; + e?.onTrailer?.(s.trailer); + }()[Symbol.asyncIterator](); + return { + [Symbol.asyncIterator]: () => ({ + next: () => t.next() + }) + }; +} +var srr = ue({ + "out-build/external/bufbuild/connect/promise-client.js"() { + "use strict"; + + Hr(); + nKt(); + Ep(); + kg(); + $J(); + } +}); +var lKt = ue({ + "out-build/external/bufbuild/connect/protocol/signals.js"() { + "use strict"; + + Ep(); + kg(); + } +}); +var cKt = ue({ + "out-build/external/bufbuild/connect/context-values.js"() { + "use strict"; + } +}); +var Wse = ue({ + "out-build/external/bufbuild/connect/implementation.js"() { + "use strict"; + + Ep(); + kg(); + lKt(); + cKt(); + } +}); +var nrr = ue({ + "out-build/external/bufbuild/connect/protocol-grpc-web/trailer.js"() { + "use strict"; + } +}); +var Rft = ue({ + "out-build/external/bufbuild/connect/protocol-grpc/headers.js"() { + "use strict"; + } +}); +var pNs = ue({ + "out-build/external/bufbuild/connect/protocol-grpc-web/headers.js"() { + "use strict"; + + Rft(); + } +}); +var rrr = ue({ + "out-build/external/bufbuild/connect/protocol-grpc-web/content-type.js"() { + "use strict"; + } +}); +var mNs = ue({ + "out-build/external/bufbuild/connect/protocol-grpc/parse-timeout.js"() { + "use strict"; + + kg(); + Ep(); + } +}); +var orr; +var arr = ue({ + "out-build/external/bufbuild/connect/protocol-grpc/gen/status_pb.js"() { + "use strict"; + + Hr(); + orr = class Aze extends N { + constructor(e) { + super(); + this.code = 0; + this.message = ""; + this.details = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "google.rpc.Status"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "code", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "message", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "details", + kind: "message", + T: nHt, + repeated: true + }]); + } + static fromBinary(e, t) { + return new Aze().fromBinary(e, t); + } + static fromJson(e, t) { + return new Aze().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Aze().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Aze, e, t); + } + }; + } +}); +var bNs = ue({ + "out-build/external/bufbuild/connect/protocol-grpc/trailer-status.js"() { + "use strict"; + + Hr(); + arr(); + Ep(); + Tft(); + kg(); + Rft(); + } +}); +var Nft = ue({ + "out-build/external/bufbuild/connect/protocol/content-type-matcher.js"() { + "use strict"; + } +}); +var Mft = ue({ + "out-build/external/bufbuild/connect/protocol/create-method-url.js"() { + "use strict"; + } +}); +var vNs = ue({ + "out-build/external/bufbuild/connect/protocol/normalize.js"() { + "use strict"; + } +}); +var yNs = ue({ + "out-build/external/bufbuild/connect/interceptor.js"() { + "use strict"; + } +}); +var uKt = ue({ + "out-build/external/bufbuild/connect/protocol/invoke-implementation.js"() { + "use strict"; + + Hr(); + Ep(); + kg(); + vNs(); + yNs(); + } +}); +var Aft = ue({ + "out-build/external/bufbuild/connect/protocol/serialization.js"() { + "use strict"; + + Ep(); + kg(); + rKt(); + } +}); +var $ft = ue({ + "out-build/external/bufbuild/connect/protocol/universal.js"() { + "use strict"; + } +}); +var Fft = ue({ + "out-build/external/bufbuild/connect/protocol/universal-handler.js"() { + "use strict"; + + Hr(); + $ft(); + Nft(); + rKt(); + Ep(); + kg(); + } +}); +var lrr = ue({ + "out-build/external/bufbuild/connect/protocol-grpc-web/handler-factory.js"() { + "use strict"; + + Ep(); + kg(); + Wse(); + nrr(); + pNs(); + rrr(); + mNs(); + bNs(); + $J(); + Pft(); + Nft(); + Mft(); + uKt(); + Aft(); + Fft(); + $ft(); + } +}); +var crr = ue({ + "out-build/external/bufbuild/connect/protocol-grpc/content-type.js"() { + "use strict"; + } +}); +var urr = ue({ + "out-build/external/bufbuild/connect/protocol-grpc/handler-factory.js"() { + "use strict"; + + Wse(); + Ep(); + kg(); + crr(); + Rft(); + bNs(); + mNs(); + $J(); + Pft(); + Nft(); + Mft(); + uKt(); + Aft(); + Fft(); + $ft(); + } +}); +var dKt = ue({ + "out-build/external/bufbuild/connect/protocol-connect/content-type.js"() { + "use strict"; + } +}); +var hKt = ue({ + "out-build/external/bufbuild/connect/protocol-connect/error-json.js"() { + "use strict"; + + Hr(); + kg(); + Ep(); + cNs(); + } +}); +var wNs = ue({ + "out-build/external/bufbuild/connect/protocol-connect/end-stream.js"() { + "use strict"; + + hKt(); + Tft(); + Ep(); + kg(); + } +}); +var FJ = ue({ + "out-build/external/bufbuild/connect/protocol-connect/headers.js"() { + "use strict"; + } +}); +var CNs = ue({ + "out-build/external/bufbuild/connect/protocol-connect/http-status.js"() { + "use strict"; + + kg(); + } +}); +var drr = ue({ + "out-build/external/bufbuild/connect/protocol-connect/parse-timeout.js"() { + "use strict"; + + kg(); + Ep(); + } +}); +var SNs = ue({ + "out-build/external/bufbuild/connect/protocol-connect/query-params.js"() { + "use strict"; + } +}); +var xNs = ue({ + "out-build/external/bufbuild/connect/protocol-connect/trailer-mux.js"() { + "use strict"; + } +}); +var fKt = ue({ + "out-build/external/bufbuild/connect/protocol-connect/version.js"() { + "use strict"; + + FJ(); + SNs(); + Ep(); + kg(); + } +}); +var hrr = ue({ + "out-build/external/bufbuild/connect/protocol-connect/handler-factory.js"() { + "use strict"; + + Hr(); + kg(); + Ep(); + Wse(); + dKt(); + wNs(); + hKt(); + FJ(); + CNs(); + drr(); + SNs(); + xNs(); + fKt(); + Pft(); + Aft(); + Fft(); + $ft(); + $J(); + Nft(); + Mft(); + uKt(); + } +}); +var kNs = ue({ + "out-build/external/bufbuild/connect/router.js"() { + "use strict"; + + Ep(); + kg(); + Wse(); + lrr(); + urr(); + hrr(); + Fft(); + } +}); +var frr = ue({ + "out-build/external/bufbuild/connect/cors.js"() { + "use strict"; + + FJ(); + Rft(); + pNs(); + } +}); +var grr = ue({ + "out-build/external/bufbuild/connect/protocol-connect/request-header.js"() { + "use strict"; + + Hr(); + FJ(); + fKt(); + dKt(); + } +}); +var prr = ue({ + "out-build/external/bufbuild/connect/protocol-connect/validate-response.js"() { + "use strict"; + + Hr(); + kg(); + CNs(); + Ep(); + dKt(); + FJ(); + } +}); +var mrr = ue({ + "out-build/external/bufbuild/connect/protocol-connect/get-request.js"() { + "use strict"; + + Hr(); + FJ(); + fKt(); + } +}); +var brr = ue({ + "out-build/external/bufbuild/connect/protocol/run-call.js"() { + "use strict"; + + yNs(); + Ep(); + lKt(); + vNs(); + } +}); +var vrr = ue({ + "out-build/external/bufbuild/connect/protocol-connect/transport.js"() { + "use strict"; + + Hr(); + grr(); + FJ(); + prr(); + xNs(); + hKt(); + wNs(); + mrr(); + kg(); + Ep(); + Tft(); + $J(); + Mft(); + brr(); + Aft(); + cKt(); + } +}); +var yrr = ue({ + "out-build/external/bufbuild/connect/protocol/universal-handler-client.js"() { + "use strict"; + + kg(); + Ep(); + $J(); + lKt(); + } +}); +var wrr = ue({ + "out-build/external/bufbuild/connect/router-transport.js"() { + "use strict"; + + vrr(); + yrr(); + kNs(); + } +}); +var Crr = ue({ + "out-build/external/bufbuild/connect/index.js"() { + "use strict"; + + Ep(); + kg(); + Tft(); + Ynr(); + srr(); + kNs(); + Wse(); + frr(); + cKt(); + nKt(); + Wse(); + wrr(); + } +}); +var yE = ue({ + "out-build/external/bufbuild/connect.js"() { + "use strict"; + + Crr(); + } +}); +var zye; +var ENs; +var gKt = ue({ + "out-build/vs/workbench/services/ai/browser/connectRequestService.js"() { + "use strict"; + + pe(); + q(); + It(); + te(); + zye = Ve("aiConnectRequestService"); + ENs = class extends H { + constructor() { + super(); + this.a = this.D(new B()); + this.onDidChangeTransport = this.a.event; + } + registerConnectTransportProvider(i) { + this.b = i; + this.a.fire(); + } + async transport() { + let i = 0; + let e = 480; + while (!this.b) { + if (i >= e) { + throw new Error("No Connect transport provider registered."); + } + await new Promise(t => setTimeout(t, 250)); + i++; + } + return this.b; + } + }; + it(zye, ENs, 1); + } +}); +var Uf; +var Yw = ue({ + "out-build/vs/workbench/services/ai/browser/backendClient.js"() { + "use strict"; + + yE(); + q(); + Cs(); + gKt(); + Uf = class extends H { + constructor(e, t, s) { + super(); + this.c = e; + this.f = t; + this.g = s; + this.b = false; + this.a = this.D(this.f.createScoped(this)); + this.D(this.g.onDidChangeTransport(() => { + this.createServer(); + })); + } + async get() { + const e = this.h; + if (!this.b || e === undefined) { + this.createServer(); + this.b = true; + } + const t = await this.h; + if (t === undefined) { + throw new Error("Invariant violated! server did not get created."); + } + return t; + } + createServer() { + this.h = this.createSingleServer(); + } + async createSingleServer() { + const e = await this.g.transport(); + let t = e; + if (this.c.headerInjector) { + const s = this.c.headerInjector; + t = { + unary: (n, r, o, a, l, c, u) => { + const d = new Headers(l); + for (const [h, g] of Object.entries(s())) { + d.set(h, g); + } + return e.unary(n, r, o, a, d, c, u); + }, + stream: (n, r, o, a, l, c, u) => { + const d = new Headers(l); + for (const [h, g] of Object.entries(s())) { + d.set(h, g); + } + return e.stream(n, r, o, a, Object.fromEntries(d), c, u); + } + }; + } + return Qnr(this.c.service, t); + } + }; + Uf = __decorate([__param(1, _i), __param(2, zye)], Uf); + } +}); +var CR; +var iO = ue({ + "out-build/vs/platform/url/common/url.js"() { + "use strict"; + + te(); + CR = Ve("urlService"); + } +}); +function Jye(i) { + const e = i; + return typeof e?.id == "string" && typeof e.alignment == "number"; +} +function Srr(i) { + const e = i; + return (typeof e?.primary == "number" || Jye(e?.primary)) && typeof e?.secondary == "number"; +} +var bu; +var INs; +var Gye; +var DNs; +var bh = ue({ + "out-build/vs/workbench/services/statusbar/browser/statusbar.js"() { + "use strict"; + + te(); + bu = Ve("statusbarService"); + (function (i) { + i[i.LEFT = 0] = "LEFT"; + i[i.RIGHT = 1] = "RIGHT"; + })(INs ||= {}); + Gye = { + id: "statusBar.entry.showTooltip", + title: "" + }; + DNs = ["standard", "warning", "error", "prominent", "remote", "offline"]; + } +}); +var SR; +var Xw; +var Oft; +var y5; +var yU; +var _ft; +var Ip; +var pKt; +var wU; +var Ky; +var Bft; +var hA; +var xrr; +var TNs; +var w5 = ue({ + "out-build/vs/workbench/services/ai/browser/cursorCredsService.js"() { + "use strict"; + + It(); + te(); + Je(); + Cs(); + pe(); + bh(); + q(); + mn(); + SR = Ve("cursorCredsService"); + Xw = "https://staging.cursor.sh"; + Oft = "https://repo42.cursor.sh"; + y5 = "https://dev-staging.cursor.sh"; + yU = "OzaBXLClY5CAGxNzUhQ2vlknpi07tGuE"; + _ft = "dev.authentication.cursor.sh"; + Ip = "https://localhost:"; + pKt = 8000; + wU = "http://localhost:4000"; + Ky = { + PROD: "Prod", + STAGING: "Staging", + DEV_STAGING: "DevStaging(w/local-website)`", + STAGING_LOCAL_WEBSITE: "Staging(w/local-website)", + LOCAL_EXCEPT_CPP_AND_EMBEDDINGS: "DefaultLocal(no cpp/embeddings)", + STAGING_LOCAL_EXCEPT_CPP_AND_EMBEDDINGS: "StagingLocal(cpp/embeddings on Staging)", + LOCAL_EXCEPT_CPP: "Local(except cpp)", + FULL_LOCAL: "FullLocal", + LOCAL_EXCEPT_EMBEDDINGS: "Local(except embeddings)" + }; + Bft = class extends H { + constructor(e, t) { + super(); + this.c = e; + this.f = t; + this.a = new B(); + this.onDidRequestRelogin = this.a.event; + this.b = Dht; + this.namingMap = { + [Ky.PROD]: () => this.switchToProdServer(), + [Ky.LOCAL_EXCEPT_CPP]: () => this.switchToLocalExceptCppServer(), + [Ky.FULL_LOCAL]: () => this.switchToFullLocalServer(), + [Ky.STAGING]: () => this.switchToStagingServer(), + [Ky.DEV_STAGING]: () => this.switchToDevStagingServer(), + [Ky.STAGING_LOCAL_WEBSITE]: () => this.switchToStagingServerLocalWebsite(), + [Ky.LOCAL_EXCEPT_CPP_AND_EMBEDDINGS]: () => this.switchToLocalExceptCppAndEmbeddingsServer(), + [Ky.STAGING_LOCAL_EXCEPT_CPP_AND_EMBEDDINGS]: () => this.switchToLocalExceptCppAndEmbeddingsServerStagingProd(), + [Ky.LOCAL_EXCEPT_EMBEDDINGS]: () => this.switchToLocalExceptEmbeddingsServer() + }; + this.switchToProdServer(); + this.j(); + } + g() {} + j() {} + getAuth0ClientId() { + return this.c.applicationUserPersistentStorage.cursorCreds.authClientId; + } + reloginIfNeeded(e) { + const t = this.getAuth0ClientId(); + if (e !== t) { + this.a.fire(); + } + } + localBackendPort() { + return this.c.applicationUserPersistentStorage.localBackendPort || pKt; + } + getBcProxyDevUrl() { + if ((this.c.applicationUserPersistentStorage.backgroundComposerEnv ?? "prod") === "prod") { + return SJ; + } else { + return Ip + this.localBackendPort(); + } + } + switchToProdServer() { + const e = this.getAuth0ClientId(); + this.c.setApplicationUserPersistentStorage("cursorCreds", { + websiteUrl: vye, + backendUrl: SJ, + authClientId: Pht, + authDomain: Lht, + repoBackendUrl: Tht, + contextBankUrl: Tht, + telemBackendUrl: xJ, + geoCppBackendUrl: this.b, + cppConfigBackendUrl: yye, + cmdkBackendUrl: KJt, + bcProxyUrl: SJ, + credentialsDisplayName: Ky.PROD + }); + this.reloginIfNeeded(e); + this.j(); + } + switchToLocalExceptCppServer() { + const e = this.localBackendPort(); + this.c.setApplicationUserPersistentStorage("cursorCreds", { + websiteUrl: wU, + backendUrl: Ip + e, + authClientId: yU, + authDomain: Ip + e, + repoBackendUrl: Ip + e, + contextBankUrl: Ip + e, + telemBackendUrl: xJ, + geoCppBackendUrl: this.b, + cppConfigBackendUrl: yye, + cmdkBackendUrl: Ip + e, + bcProxyUrl: this.getBcProxyDevUrl(), + credentialsDisplayName: Ky.LOCAL_EXCEPT_CPP + }); + this.j(); + } + switchToFullLocalServer() { + const e = this.localBackendPort(); + this.c.setApplicationUserPersistentStorage("cursorCreds", { + websiteUrl: wU, + backendUrl: Ip + e, + authClientId: yU, + authDomain: Ip + e, + repoBackendUrl: Ip + e, + contextBankUrl: Ip + e, + telemBackendUrl: Ip + e, + geoCppBackendUrl: Ip + e, + cppConfigBackendUrl: Ip + e, + cmdkBackendUrl: Ip + e, + bcProxyUrl: this.getBcProxyDevUrl(), + credentialsDisplayName: Ky.FULL_LOCAL + }); + this.j(); + } + switchToLocalExceptCppAndEmbeddingsServerStagingProd() { + const e = this.localBackendPort(); + this.c.setApplicationUserPersistentStorage("cursorCreds", { + websiteUrl: wU, + backendUrl: Ip + e, + authClientId: yU, + authDomain: Ip + e, + repoBackendUrl: Oft, + contextBankUrl: Ip + e, + telemBackendUrl: Xw, + geoCppBackendUrl: Xw, + cppConfigBackendUrl: Xw, + cmdkBackendUrl: Ip + e, + bcProxyUrl: this.getBcProxyDevUrl(), + credentialsDisplayName: Ky.STAGING_LOCAL_EXCEPT_CPP_AND_EMBEDDINGS + }); + this.j(); + } + switchToLocalExceptCppAndEmbeddingsServer() { + const e = this.localBackendPort(); + this.c.setApplicationUserPersistentStorage("cursorCreds", { + websiteUrl: wU, + backendUrl: Ip + e, + authClientId: yU, + authDomain: Ip + e, + repoBackendUrl: Oft, + contextBankUrl: Ip + e, + telemBackendUrl: xJ, + geoCppBackendUrl: this.b, + cppConfigBackendUrl: yye, + cmdkBackendUrl: Ip + e, + bcProxyUrl: this.getBcProxyDevUrl(), + credentialsDisplayName: Ky.LOCAL_EXCEPT_CPP_AND_EMBEDDINGS + }); + this.j(); + } + switchToStagingServer() { + this.c.setApplicationUserPersistentStorage("cursorCreds", { + websiteUrl: vye, + backendUrl: Xw, + authClientId: Pht, + authDomain: Lht, + repoBackendUrl: Xw, + contextBankUrl: Xw, + telemBackendUrl: Xw, + geoCppBackendUrl: Xw, + cppConfigBackendUrl: Xw, + cmdkBackendUrl: Xw, + bcProxyUrl: Xw, + credentialsDisplayName: Ky.STAGING + }); + this.j(); + } + switchToDevStagingServer() { + this.c.setApplicationUserPersistentStorage("cursorCreds", { + websiteUrl: wU, + backendUrl: y5, + authClientId: yU, + authDomain: _ft, + repoBackendUrl: y5, + contextBankUrl: y5, + telemBackendUrl: y5, + geoCppBackendUrl: y5, + cppConfigBackendUrl: y5, + cmdkBackendUrl: y5, + bcProxyUrl: y5, + credentialsDisplayName: Ky.DEV_STAGING + }); + } + switchToStagingServerLocalWebsite() { + this.c.setApplicationUserPersistentStorage("cursorCreds", { + websiteUrl: wU, + backendUrl: Xw, + authClientId: yU, + authDomain: _ft, + repoBackendUrl: Xw, + contextBankUrl: Xw, + telemBackendUrl: Xw, + geoCppBackendUrl: Xw, + cppConfigBackendUrl: Xw, + cmdkBackendUrl: Xw, + bcProxyUrl: Xw, + credentialsDisplayName: Ky.STAGING_LOCAL_WEBSITE + }); + this.j(); + } + switchToLocalExceptEmbeddingsServer() { + const e = this.c.applicationUserPersistentStorage.localBackendPort || pKt; + this.c.setApplicationUserPersistentStorage("cursorCreds", { + websiteUrl: wU, + backendUrl: Ip + e, + authClientId: yU, + authDomain: _ft, + repoBackendUrl: Oft, + contextBankUrl: Ip + e, + telemBackendUrl: xJ, + geoCppBackendUrl: Ip + e, + cppConfigBackendUrl: Ip + e, + cmdkBackendUrl: Ip + e, + bcProxyUrl: this.getBcProxyDevUrl(), + credentialsDisplayName: Ky.LOCAL_EXCEPT_EMBEDDINGS + }); + this.j(); + } + getCredentials() { + return this.c.applicationUserPersistentStorage.cursorCreds; + } + getLoginUrl() { + return `${this.c.applicationUserPersistentStorage.cursorCreds.websiteUrl}/loginDeepControl`; + } + getLogoutUrl() { + return `${this.c.applicationUserPersistentStorage.cursorCreds.websiteUrl}/api/auth/logout`; + } + getSettingsUrl() { + return `${this.c.applicationUserPersistentStorage.cursorCreds.websiteUrl}/settings`; + } + getCheckoutUrl() { + return `${this.c.applicationUserPersistentStorage.cursorCreds.websiteUrl}/pricing`; + } + getConnectGithubUrl({ + authId: e, + githubRepo: t, + useBackgroundComposerEnv: s + }) { + let n = this.c.applicationUserPersistentStorage.cursorCreds.websiteUrl; + if (s === true && (this.c.applicationUserPersistentStorage.backgroundComposerEnv ?? "prod") === "prod") { + n = vye; + } + return `${n}/api/auth/connect-github?auth_id=${encodeURIComponent(e)}&github_repo=${encodeURIComponent(t ?? "")}`; + } + getPollingEndpoint() { + return `${this.c.applicationUserPersistentStorage.cursorCreds.backendUrl}/auth/poll`; + } + getBackendUrl() { + return this.c.applicationUserPersistentStorage.cursorCreds.backendUrl; + } + getRepoBackendUrl() { + return this.c.applicationUserPersistentStorage.cursorCreds.repoBackendUrl; + } + getTelemBackendUrl() { + return this.c.applicationUserPersistentStorage.cursorCreds.telemBackendUrl; + } + getGeoCppBackendUrl() { + return this.c.applicationUserPersistentStorage.cursorCreds.geoCppBackendUrl; + } + getCppConfigBackendUrl() { + return this.c.applicationUserPersistentStorage.cursorCreds.cppConfigBackendUrl; + } + getUpgradeToProUrl() { + return `${this.c.applicationUserPersistentStorage.cursorCreds.websiteUrl}/api/auth/checkoutDeepControl`; + } + setGeoCppBackendUrl(e) { + if (e === "" || !e.includes("cursor.sh")) { + e = Dht; + } + this.b = e; + this.c.setApplicationUserPersistentStorage("cursorCreds", t => t.credentialsDisplayName !== Ky.LOCAL_EXCEPT_EMBEDDINGS && t.credentialsDisplayName !== Ky.FULL_LOCAL ? { + ...t, + geoCppBackendUrl: e + } : t); + } + }; + Bft = __decorate([__param(0, _i), __param(1, bu)], Bft); + it(SR, Bft, 1); + (function (i) { + i.Prod = "prod"; + i.Staging = "staging"; + i.DevStaging = "devStagingEverything"; + i.StagingLocalWebsite = "stagingLocalWebsite"; + i.LocalExceptCppAndEmbeddings = "local"; + i.LocalExceptCppAndEmbeddingsStaging = "localStaging"; + i.LocalExceptCPP = "fullLocal"; + i.LocalExceptEmbeddings = "localExceptEmbeddings"; + i.FullLocal = "fullLocalincludingcpp"; + })(hA ||= {}); + xrr = { + [hA.Prod]: 1814, + [hA.Staging]: 1815, + [hA.StagingLocalWebsite]: 1816, + [hA.LocalExceptCppAndEmbeddings]: 1817, + [hA.LocalExceptCPP]: 1818, + [hA.FullLocal]: 1819, + [hA.LocalExceptEmbeddings]: 1820, + [hA.DevStaging]: 1821, + [hA.LocalExceptCppAndEmbeddingsStaging]: 1822 + }; + TNs = class extends se { + constructor() { + super({ + id: "cursor.selectBackend", + title: { + value: "Select Backend Server", + original: "Select Backend Server" + }, + f1: true + }); + } + async run(i) { + const e = i.get(zi); + const t = i.get(SR); + const s = t.getCredentials().credentialsDisplayName; + const n = Object.entries(t.namingMap).filter(([, l]) => typeof l == "function").map(([l]) => ({ + label: l, + description: l === s ? "Current" : undefined + })); + const r = await e.pick(n, { + placeHolder: "Select backend server to use", + matchOnDescription: true + }); + if (!r) { + return; + } + const o = r.label; + const a = t.namingMap[o]; + if (typeof a == "function") { + const l = t.getAuth0ClientId(); + a(); + t.reloginIfNeeded(l); + } + } + }; + J(TNs); + } +}); +var aD; +var PNs; +var LNs; +var RNs; +var NNs; +var MNs; +var ANs; +var mKt; +var $Ns; +var bKt; +var FNs; +var ONs; +var _Ns; +var BNs; +var UNs; +var vKt; +var WNs; +var VNs; +var HNs; +var qNs; +var jNs; +var zNs; +var JNs; +var GNs; +var KNs; +var YNs; +var XNs; +var QNs; +var ZNs; +var eMs; +var tMs; +var iMs; +var sMs; +var nMs; +var rMs; +var oMs; +var aMs; +var lMs; +var cMs; +var uMs; +var yKt; +var dMs; +var hMs; +var fMs; +var gMs; +var pMs; +var mMs; +var bMs; +var vMs; +var yMs; +var wMs; +var CMs; +var SMs; +var xMs; +var kMs; +var EMs; +var IMs; +var DMs; +var TMs; +var PMs; +var LMs; +var RMs; +var NMs; +var MMs; +var AMs; +var $Ms; +var FMs; +var OMs; +var _Ms; +var BMs; +var UMs; +var Kye; +var WMs; +var VMs; +var HMs; +var qMs; +var jMs; +var zMs; +var Yye; +var JMs; +var GMs; +var KMs; +var YMs; +var XMs; +var QMs; +var ZMs; +var eAs; +var tAs; +var iAs; +var sAs; +var nAs; +var rAs; +var oAs; +var aAs; +var lAs; +var cAs; +var uAs; +var dAs; +var hAs; +var wKt; +var fAs; +var gAs; +var pAs; +var mAs; +var bAs; +var vAs; +var yAs; +var wAs; +var CAs; +var SAs; +var CKt; +var SKt; +var xAs; +var kAs; +var EAs; +var IAs; +var DAs; +var TAs; +var PAs; +var LAs; +var RAs; +var NAs; +var MAs; +var AAs; +var $As; +var Uft; +var xKt; +var Xye; +var FAs; +var OAs; +var _As; +var BAs; +var UAs; +var WAs; +var VAs; +var HAs; +var qAs; +var jAs; +var zAs; +var JAs; +var GAs; +var KAs; +var YAs; +var XAs; +var QAs; +var ZAs; +var e$s; +var t$s; +var i$s; +var s$s; +var n$s; +var r$s; +var o$s; +var a$s; +var l$s; +var c$s; +var u$s; +var d$s; +var h$s; +var f$s; +var Wft = ue({ + "out-build/proto/aiserver/v1/dashboard_pb.js"() { + "use strict"; + + Hr(); + uCs(); + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.OWNER = 1] = "OWNER"; + i[i.MEMBER = 2] = "MEMBER"; + i[i.FREE_OWNER = 3] = "FREE_OWNER"; + })(aD ||= {}); + m.util.setEnumType(aD, "aiserver.v1.TeamRole", [{ + no: 0, + name: "TEAM_ROLE_UNSPECIFIED" + }, { + no: 1, + name: "TEAM_ROLE_OWNER" + }, { + no: 2, + name: "TEAM_ROLE_MEMBER" + }, { + no: 3, + name: "TEAM_ROLE_FREE_OWNER" + }]); + PNs = class $ze extends N { + constructor(e) { + super(); + this.code = ""; + this.installationId = ""; + this.setupAction = ""; + this.cursorCode = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ConnectGithubCallbackRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "code", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "installation_id", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "setup_action", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "cursor_code", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new $ze().fromBinary(e, t); + } + static fromJson(e, t) { + return new $ze().fromJson(e, t); + } + static fromJsonString(e, t) { + return new $ze().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals($ze, e, t); + } + }; + LNs = class Fze extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ConnectGithubCallbackResponse"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new Fze().fromBinary(e, t); + } + static fromJson(e, t) { + return new Fze().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Fze().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Fze, e, t); + } + }; + RNs = class Oze extends N { + constructor(e) { + super(); + this.githubRepo = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RegisterGithubCursorCodeRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "github_repo", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new Oze().fromBinary(e, t); + } + static fromJson(e, t) { + return new Oze().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Oze().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Oze, e, t); + } + }; + NNs = class _ze extends N { + constructor(e) { + super(); + this.cursorCode = ""; + this.shouldInstall = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RegisterGithubCursorCodeResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "cursor_code", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "should_install", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new _ze().fromBinary(e, t); + } + static fromJson(e, t) { + return new _ze().fromJson(e, t); + } + static fromJsonString(e, t) { + return new _ze().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(_ze, e, t); + } + }; + MNs = class Bze extends N { + constructor(e) { + super(); + this.accessCode = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.AddUserToEarlyAccessListRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "access_code", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new Bze().fromBinary(e, t); + } + static fromJson(e, t) { + return new Bze().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Bze().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Bze, e, t); + } + }; + ANs = class Uze extends N { + constructor(e) { + super(); + this.success = false; + this.message = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.AddUserToEarlyAccessListResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "success", + kind: "scalar", + T: 8 + }, { + no: 2, + name: "message", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new Uze().fromBinary(e, t); + } + static fromJson(e, t) { + return new Uze().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Uze().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Uze, e, t); + } + }; + mKt = class Wze extends N { + constructor(e) { + super(); + this.requestQuota = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.UpdateFastRequestsRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "request_quota", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new Wze().fromBinary(e, t); + } + static fromJson(e, t) { + return new Wze().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Wze().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Wze, e, t); + } + }; + $Ns = class Vze extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.UpdateFastRequestsResponse"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new Vze().fromBinary(e, t); + } + static fromJson(e, t) { + return new Vze().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Vze().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Vze, e, t); + } + }; + bKt = class Hze extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetFastRequestsRequest"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new Hze().fromBinary(e, t); + } + static fromJson(e, t) { + return new Hze().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Hze().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Hze, e, t); + } + }; + FNs = class qze extends N { + constructor(e) { + super(); + this.requestQuota = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetFastRequestsResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "request_quota", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new qze().fromBinary(e, t); + } + static fromJson(e, t) { + return new qze().fromJson(e, t); + } + static fromJsonString(e, t) { + return new qze().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(qze, e, t); + } + }; + ONs = class jze extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.DeleteAccountRequest"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new jze().fromBinary(e, t); + } + static fromJson(e, t) { + return new jze().fromJson(e, t); + } + static fromJsonString(e, t) { + return new jze().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(jze, e, t); + } + }; + _Ns = class zze extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.DeleteAccountResponse"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new zze().fromBinary(e, t); + } + static fromJson(e, t) { + return new zze().fromJson(e, t); + } + static fromJsonString(e, t) { + return new zze().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(zze, e, t); + } + }; + BNs = class Jze extends N { + constructor(e) { + super(); + this.teamId = 0; + this.privacyModeForced = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SwitchTeamPrivacyModeRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "team_id", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "privacy_mode_forced", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new Jze().fromBinary(e, t); + } + static fromJson(e, t) { + return new Jze().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Jze().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Jze, e, t); + } + }; + UNs = class Gze extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SwitchTeamPrivacyModeResponse"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new Gze().fromBinary(e, t); + } + static fromJson(e, t) { + return new Gze().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Gze().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Gze, e, t); + } + }; + vKt = class Kze extends N { + constructor(e) { + super(); + this.teamId = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetTeamPrivacyModeForcedRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "team_id", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new Kze().fromBinary(e, t); + } + static fromJson(e, t) { + return new Kze().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Kze().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Kze, e, t); + } + }; + WNs = class Yze extends N { + constructor(e) { + super(); + this.privacyModeForced = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetTeamPrivacyModeForcedResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "privacy_mode_forced", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new Yze().fromBinary(e, t); + } + static fromJson(e, t) { + return new Yze().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Yze().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Yze, e, t); + } + }; + VNs = class Xze extends N { + constructor(e) { + super(); + this.teamScope = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ListBackgroundComposerSecretsRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "team_scope", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new Xze().fromBinary(e, t); + } + static fromJson(e, t) { + return new Xze().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Xze().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Xze, e, t); + } + }; + HNs = class Qze extends N { + constructor(e) { + super(); + this.secrets = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ListBackgroundComposerSecretsResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "secrets", + kind: "message", + T: qNs, + repeated: true + }]); + } + static fromBinary(e, t) { + return new Qze().fromBinary(e, t); + } + static fromJson(e, t) { + return new Qze().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Qze().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Qze, e, t); + } + }; + qNs = class Zze extends N { + constructor(e) { + super(); + this.name = ""; + this.createdAt = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ListBackgroundComposerSecretsResponse.Secret"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "name", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "created_at", + kind: "scalar", + T: 1 + }]); + } + static fromBinary(e, t) { + return new Zze().fromBinary(e, t); + } + static fromJson(e, t) { + return new Zze().fromJson(e, t); + } + static fromJsonString(e, t) { + return new Zze().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(Zze, e, t); + } + }; + jNs = class eJe extends N { + constructor(e) { + super(); + this.name = ""; + this.value = ""; + this.teamScope = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CreateBackgroundComposerSecretRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "name", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "value", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "team_scope", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new eJe().fromBinary(e, t); + } + static fromJson(e, t) { + return new eJe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new eJe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(eJe, e, t); + } + }; + zNs = class tJe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CreateBackgroundComposerSecretResponse"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new tJe().fromBinary(e, t); + } + static fromJson(e, t) { + return new tJe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new tJe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(tJe, e, t); + } + }; + JNs = class iJe extends N { + constructor(e) { + super(); + this.name = ""; + this.teamScope = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RevokeBackgroundComposerSecretRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "name", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "team_scope", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new iJe().fromBinary(e, t); + } + static fromJson(e, t) { + return new iJe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new iJe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(iJe, e, t); + } + }; + GNs = class sJe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RevokeBackgroundComposerSecretResponse"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new sJe().fromBinary(e, t); + } + static fromJson(e, t) { + return new sJe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new sJe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(sJe, e, t); + } + }; + KNs = class nJe extends N { + constructor(e) { + super(); + this.teamId = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetTeamHasValidPaymentMethodRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "team_id", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new nJe().fromBinary(e, t); + } + static fromJson(e, t) { + return new nJe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new nJe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(nJe, e, t); + } + }; + YNs = class rJe extends N { + constructor(e) { + super(); + this.hasValidPaymentMethod = false; + this.trialDaysRemaining = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetTeamHasValidPaymentMethodResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "has_valid_payment_method", + kind: "scalar", + T: 8 + }, { + no: 2, + name: "trial_days_remaining", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new rJe().fromBinary(e, t); + } + static fromJson(e, t) { + return new rJe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new rJe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(rJe, e, t); + } + }; + XNs = class oJe extends N { + constructor(e) { + super(); + this.name = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CreateTeamWithFreeTrialRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "name", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "privacy_mode_forced", + kind: "scalar", + T: 8, + opt: true + }, { + no: 3, + name: "free_trial_code", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new oJe().fromBinary(e, t); + } + static fromJson(e, t) { + return new oJe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new oJe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(oJe, e, t); + } + }; + QNs = class aJe extends N { + constructor(e) { + super(); + this.teamId = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CreateTeamWithFreeTrialResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "team_id", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new aJe().fromBinary(e, t); + } + static fromJson(e, t) { + return new aJe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new aJe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(aJe, e, t); + } + }; + ZNs = class lJe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetPricingHistoryRequest"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new lJe().fromBinary(e, t); + } + static fromJson(e, t) { + return new lJe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new lJe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(lJe, e, t); + } + }; + eMs = class cJe extends N { + constructor(e) { + super(); + this.pricingHistory = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetPricingHistoryResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "pricing_history", + kind: "message", + T: tMs, + repeated: true + }]); + } + static fromBinary(e, t) { + return new cJe().fromBinary(e, t); + } + static fromJson(e, t) { + return new cJe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new cJe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(cJe, e, t); + } + }; + tMs = class uJe extends N { + constructor(e) { + super(); + this.description = ""; + this.id = ""; + this.changelog = ""; + this.createdAt = wd.zero; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetPricingHistoryResponse.PricingDescription"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "description", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "id", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "changelog", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "created_at", + kind: "scalar", + T: 3 + }]); + } + static fromBinary(e, t) { + return new uJe().fromBinary(e, t); + } + static fromJson(e, t) { + return new uJe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new uJe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(uJe, e, t); + } + }; + iMs = class dJe extends N { + constructor(e) { + super(); + this.month = 0; + this.year = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetMonthlyInvoiceRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "team_id", + kind: "scalar", + T: 5, + opt: true + }, { + no: 2, + name: "month", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "year", + kind: "scalar", + T: 5 + }, { + no: 4, + name: "include_usage_events", + kind: "scalar", + T: 8, + opt: true + }]); + } + static fromBinary(e, t) { + return new dJe().fromBinary(e, t); + } + static fromJson(e, t) { + return new dJe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new dJe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(dJe, e, t); + } + }; + sMs = class hJe extends N { + constructor(e) { + super(); + this.items = []; + this.usageEvents = []; + this.isUsageEventsMaybeCutoff = false; + this.hasUnpaidMidMonthInvoice = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetMonthlyInvoiceResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "items", + kind: "message", + T: nMs, + repeated: true + }, { + no: 2, + name: "pricing_description", + kind: "message", + T: rMs + }, { + no: 3, + name: "usage_events", + kind: "message", + T: Ojt, + repeated: true + }, { + no: 4, + name: "is_usage_events_maybe_cutoff", + kind: "scalar", + T: 8 + }, { + no: 5, + name: "has_unpaid_mid_month_invoice", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new hJe().fromBinary(e, t); + } + static fromJson(e, t) { + return new hJe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new hJe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(hJe, e, t); + } + }; + nMs = class fJe extends N { + constructor(e) { + super(); + this.description = ""; + this.cents = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetMonthlyInvoiceResponse.InvoiceItem"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "description", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "cents", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new fJe().fromBinary(e, t); + } + static fromJson(e, t) { + return new fJe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new fJe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(fJe, e, t); + } + }; + rMs = class gJe extends N { + constructor(e) { + super(); + this.description = ""; + this.id = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetMonthlyInvoiceResponse.PricingDescription"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "description", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "id", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new gJe().fromBinary(e, t); + } + static fromJson(e, t) { + return new gJe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new gJe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(gJe, e, t); + } + }; + oMs = class pJe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetHardLimitRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "team_id", + kind: "scalar", + T: 5, + opt: true + }]); + } + static fromBinary(e, t) { + return new pJe().fromBinary(e, t); + } + static fromJson(e, t) { + return new pJe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new pJe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(pJe, e, t); + } + }; + aMs = class mJe extends N { + constructor(e) { + super(); + this.hardLimit = 0; + this.noUsageBasedAllowed = false; + this.hardLimitPerUser = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetHardLimitResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "hard_limit", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "no_usage_based_allowed", + kind: "scalar", + T: 8 + }, { + no: 3, + name: "hard_limit_per_user", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new mJe().fromBinary(e, t); + } + static fromJson(e, t) { + return new mJe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new mJe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(mJe, e, t); + } + }; + lMs = class bJe extends N { + constructor(e) { + super(); + this.hardLimit = 0; + this.noUsageBasedAllowed = false; + this.hardLimitPerUser = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SetHardLimitRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "team_id", + kind: "scalar", + T: 5, + opt: true + }, { + no: 2, + name: "hard_limit", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "no_usage_based_allowed", + kind: "scalar", + T: 8 + }, { + no: 4, + name: "hard_limit_per_user", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new bJe().fromBinary(e, t); + } + static fromJson(e, t) { + return new bJe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new bJe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(bJe, e, t); + } + }; + cMs = class vJe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SetHardLimitResponse"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new vJe().fromBinary(e, t); + } + static fromJson(e, t) { + return new vJe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new vJe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(vJe, e, t); + } + }; + uMs = class yJe extends N { + constructor(e) { + super(); + this.name = ""; + this.id = 0; + this.role = aD.UNSPECIFIED; + this.seats = 0; + this.hasBilling = false; + this.requestQuotaPerSeat = 0; + this.privacyModeForced = false; + this.allowSso = false; + this.adminOnlyUsagePricing = false; + this.subscriptionStatus = ""; + this.bedrockIamRole = ""; + this.verified = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.Team"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "name", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "id", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "role", + kind: "enum", + T: m.getEnumType(aD) + }, { + no: 4, + name: "seats", + kind: "scalar", + T: 5 + }, { + no: 5, + name: "has_billing", + kind: "scalar", + T: 8 + }, { + no: 6, + name: "request_quota_per_seat", + kind: "scalar", + T: 5 + }, { + no: 7, + name: "privacy_mode_forced", + kind: "scalar", + T: 8 + }, { + no: 8, + name: "allow_sso", + kind: "scalar", + T: 8 + }, { + no: 9, + name: "admin_only_usage_pricing", + kind: "scalar", + T: 8 + }, { + no: 10, + name: "subscription_status", + kind: "scalar", + T: 9 + }, { + no: 11, + name: "bedrock_iam_role", + kind: "scalar", + T: 9 + }, { + no: 12, + name: "verified", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new yJe().fromBinary(e, t); + } + static fromJson(e, t) { + return new yJe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new yJe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(yJe, e, t); + } + }; + yKt = class wJe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetTeamsRequest"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new wJe().fromBinary(e, t); + } + static fromJson(e, t) { + return new wJe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new wJe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(wJe, e, t); + } + }; + dMs = class CJe extends N { + constructor(e) { + super(); + this.teams = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetTeamsResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "teams", + kind: "message", + T: uMs, + repeated: true + }]); + } + static fromBinary(e, t) { + return new CJe().fromBinary(e, t); + } + static fromJson(e, t) { + return new CJe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new CJe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(CJe, e, t); + } + }; + hMs = class SJe extends N { + constructor(e) { + super(); + this.teamId = 0; + this.seats = 0; + this.yearly = false; + this.requestQuotaPerSeat = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetActivationCheckoutUrlRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "team_id", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "seats", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "yearly", + kind: "scalar", + T: 8 + }, { + no: 4, + name: "request_quota_per_seat", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new SJe().fromBinary(e, t); + } + static fromJson(e, t) { + return new SJe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new SJe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(SJe, e, t); + } + }; + fMs = class xJe extends N { + constructor(e) { + super(); + this.checkoutUrl = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetActivationCheckoutUrlResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "checkout_url", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new xJe().fromBinary(e, t); + } + static fromJson(e, t) { + return new xJe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new xJe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(xJe, e, t); + } + }; + gMs = class kJe extends N { + constructor(e) { + super(); + this.teamId = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetTeamCustomerPortalUrlRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "team_id", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new kJe().fromBinary(e, t); + } + static fromJson(e, t) { + return new kJe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new kJe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(kJe, e, t); + } + }; + pMs = class EJe extends N { + constructor(e) { + super(); + this.portalUrl = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetTeamCustomerPortalUrlResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "portal_url", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new EJe().fromBinary(e, t); + } + static fromJson(e, t) { + return new EJe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new EJe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(EJe, e, t); + } + }; + mMs = class IJe extends N { + constructor(e) { + super(); + this.teamId = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetTeamMembersRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "team_id", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new IJe().fromBinary(e, t); + } + static fromJson(e, t) { + return new IJe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new IJe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(IJe, e, t); + } + }; + bMs = class DJe extends N { + constructor(e) { + super(); + this.name = ""; + this.email = ""; + this.id = 0; + this.role = aD.UNSPECIFIED; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.TeamMember"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "name", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "email", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "id", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "role", + kind: "enum", + T: m.getEnumType(aD) + }]); + } + static fromBinary(e, t) { + return new DJe().fromBinary(e, t); + } + static fromJson(e, t) { + return new DJe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new DJe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(DJe, e, t); + } + }; + vMs = class TJe extends N { + constructor(e) { + super(); + this.teamMembers = []; + this.userId = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetTeamMembersResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "team_members", + kind: "message", + T: bMs, + repeated: true + }, { + no: 2, + name: "user_id", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new TJe().fromBinary(e, t); + } + static fromJson(e, t) { + return new TJe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new TJe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(TJe, e, t); + } + }; + yMs = class PJe extends N { + constructor(e) { + super(); + this.teamId = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetTeamInviteLinkRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "team_id", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "valid_for_seconds", + kind: "scalar", + T: 5, + opt: true + }]); + } + static fromBinary(e, t) { + return new PJe().fromBinary(e, t); + } + static fromJson(e, t) { + return new PJe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new PJe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(PJe, e, t); + } + }; + wMs = class LJe extends N { + constructor(e) { + super(); + this.inviteLink = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetTeamInviteLinkResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "invite_link", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new LJe().fromBinary(e, t); + } + static fromJson(e, t) { + return new LJe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new LJe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(LJe, e, t); + } + }; + CMs = class RJe extends N { + constructor(e) { + super(); + this.teamId = 0; + this.email = ""; + this.role = aD.UNSPECIFIED; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SendTeamInviteRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "team_id", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "email", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "role", + kind: "enum", + T: m.getEnumType(aD) + }]); + } + static fromBinary(e, t) { + return new RJe().fromBinary(e, t); + } + static fromJson(e, t) { + return new RJe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new RJe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(RJe, e, t); + } + }; + SMs = class NJe extends N { + constructor(e) { + super(); + this.validUntil = wd.zero; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SendTeamInviteResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "valid_until", + kind: "scalar", + T: 3 + }]); + } + static fromBinary(e, t) { + return new NJe().fromBinary(e, t); + } + static fromJson(e, t) { + return new NJe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new NJe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(NJe, e, t); + } + }; + xMs = class MJe extends N { + constructor(e) { + super(); + this.inviteCode = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.AcceptInviteRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "invite_code", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new MJe().fromBinary(e, t); + } + static fromJson(e, t) { + return new MJe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new MJe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(MJe, e, t); + } + }; + kMs = class AJe extends N { + constructor(e) { + super(); + this.teamId = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.AcceptInviteResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "team_id", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new AJe().fromBinary(e, t); + } + static fromJson(e, t) { + return new AJe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new AJe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(AJe, e, t); + } + }; + EMs = class $Je extends N { + constructor(e) { + super(); + this.name = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CreateTeamRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "name", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "privacy_mode_forced", + kind: "scalar", + T: 8, + opt: true + }]); + } + static fromBinary(e, t) { + return new $Je().fromBinary(e, t); + } + static fromJson(e, t) { + return new $Je().fromJson(e, t); + } + static fromJsonString(e, t) { + return new $Je().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals($Je, e, t); + } + }; + IMs = class FJe extends N { + constructor(e) { + super(); + this.teamId = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CreateTeamResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "team_id", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new FJe().fromBinary(e, t); + } + static fromJson(e, t) { + return new FJe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new FJe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(FJe, e, t); + } + }; + DMs = class OJe extends N { + constructor(e) { + super(); + this.teamId = 0; + this.userId = 0; + this.role = aD.UNSPECIFIED; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.UpdateRoleRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "team_id", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "user_id", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "role", + kind: "enum", + T: m.getEnumType(aD) + }]); + } + static fromBinary(e, t) { + return new OJe().fromBinary(e, t); + } + static fromJson(e, t) { + return new OJe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new OJe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(OJe, e, t); + } + }; + TMs = class _Je extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.UpdateRoleResponse"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new _Je().fromBinary(e, t); + } + static fromJson(e, t) { + return new _Je().fromJson(e, t); + } + static fromJsonString(e, t) { + return new _Je().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(_Je, e, t); + } + }; + PMs = class BJe extends N { + constructor(e) { + super(); + this.teamId = 0; + this.userId = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RemoveMemberRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "team_id", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "user_id", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new BJe().fromBinary(e, t); + } + static fromJson(e, t) { + return new BJe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new BJe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(BJe, e, t); + } + }; + LMs = class UJe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RemoveMemberResponse"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new UJe().fromBinary(e, t); + } + static fromJson(e, t) { + return new UJe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new UJe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(UJe, e, t); + } + }; + RMs = class WJe extends N { + constructor(e) { + super(); + this.teamId = 0; + this.newSeats = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ChangeSeatRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "team_id", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "new_seats", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new WJe().fromBinary(e, t); + } + static fromJson(e, t) { + return new WJe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new WJe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(WJe, e, t); + } + }; + NMs = class VJe extends N { + constructor(e) { + super(); + this.success = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ChangeSeatResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "success", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new VJe().fromBinary(e, t); + } + static fromJson(e, t) { + return new VJe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new VJe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(VJe, e, t); + } + }; + MMs = class HJe extends N { + constructor(e) { + super(); + this.teamId = 0; + this.newNumSeats = 0; + this.newRequestQuotaPerSeat = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ChangeTeamSubscriptionRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "team_id", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "new_num_seats", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "new_request_quota_per_seat", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new HJe().fromBinary(e, t); + } + static fromJson(e, t) { + return new HJe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new HJe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(HJe, e, t); + } + }; + AMs = class qJe extends N { + constructor(e) { + super(); + this.success = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ChangeTeamSubscriptionResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "success", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new qJe().fromBinary(e, t); + } + static fromJson(e, t) { + return new qJe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new qJe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(qJe, e, t); + } + }; + $Ms = class jJe extends N { + constructor(e) { + super(); + this.teamId = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetTeamUsageRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "team_id", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new jJe().fromBinary(e, t); + } + static fromJson(e, t) { + return new jJe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new jJe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(jJe, e, t); + } + }; + FMs = class zJe extends N { + constructor(e) { + super(); + this.teamMemberUsage = []; + this.analyticsDegradedWarning = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetTeamUsageResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "team_member_usage", + kind: "message", + T: OMs, + repeated: true + }, { + no: 2, + name: "analytics_degraded_warning", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new zJe().fromBinary(e, t); + } + static fromJson(e, t) { + return new zJe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new zJe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(zJe, e, t); + } + }; + OMs = class JJe extends N { + constructor(e) { + super(); + this.id = 0; + this.usageData = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.TeamMemberUsage"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "id", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "usage_data", + kind: "message", + T: _Ms, + repeated: true + }]); + } + static fromBinary(e, t) { + return new JJe().fromBinary(e, t); + } + static fromJson(e, t) { + return new JJe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new JJe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(JJe, e, t); + } + }; + _Ms = class GJe extends N { + constructor(e) { + super(); + this.modelType = ""; + this.numRequests = 0; + this.numTokens = 0; + this.maxTokenUsage = 0; + this.maxRequestUsage = 0; + this.lastUsage = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.TeamMemberUsageData"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "model_type", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "num_requests", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "num_tokens", + kind: "scalar", + T: 5 + }, { + no: 4, + name: "max_token_usage", + kind: "scalar", + T: 5 + }, { + no: 5, + name: "max_request_usage", + kind: "scalar", + T: 5 + }, { + no: 6, + name: "last_usage", + kind: "scalar", + T: 9 + }, { + no: 7, + name: "copilot_usage", + kind: "scalar", + T: 5, + opt: true + }, { + no: 8, + name: "docs_count", + kind: "scalar", + T: 5, + opt: true + }, { + no: 9, + name: "copilot_accepted_usage", + kind: "scalar", + T: 5, + opt: true + }]); + } + static fromBinary(e, t) { + return new GJe().fromBinary(e, t); + } + static fromJson(e, t) { + return new GJe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new GJe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(GJe, e, t); + } + }; + BMs = class KJe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetSignUpTypeRequest"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new KJe().fromBinary(e, t); + } + static fromJson(e, t) { + return new KJe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new KJe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(KJe, e, t); + } + }; + UMs = class YJe extends N { + constructor(e) { + super(); + this.signUpType = Kye.UNSPECIFIED; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetSignUpTypeResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "sign_up_type", + kind: "enum", + T: m.getEnumType(Kye) + }]); + } + static fromBinary(e, t) { + return new YJe().fromBinary(e, t); + } + static fromJson(e, t) { + return new YJe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new YJe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(YJe, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.AUTH_0 = 1] = "AUTH_0"; + i[i.GOOGLE = 2] = "GOOGLE"; + i[i.GITHUB = 3] = "GITHUB"; + i[i.WORKOS = 4] = "WORKOS"; + })(Kye ||= {}); + m.util.setEnumType(Kye, "aiserver.v1.GetSignUpTypeResponse.SignUpType", [{ + no: 0, + name: "SIGN_UP_TYPE_UNSPECIFIED" + }, { + no: 1, + name: "SIGN_UP_TYPE_AUTH_0" + }, { + no: 2, + name: "SIGN_UP_TYPE_GOOGLE" + }, { + no: 3, + name: "SIGN_UP_TYPE_GITHUB" + }, { + no: 4, + name: "SIGN_UP_TYPE_WORKOS" + }]); + WMs = class XJe extends N { + constructor(e) { + super(); + this.teamId = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetDailyTeamUsageRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "team_id", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new XJe().fromBinary(e, t); + } + static fromJson(e, t) { + return new XJe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new XJe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(XJe, e, t); + } + }; + VMs = class QJe extends N { + constructor(e) { + super(); + this.dailyTeamMemberUsage = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetDailyTeamUsageResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "daily_team_member_usage", + kind: "message", + T: HMs, + repeated: true + }]); + } + static fromBinary(e, t) { + return new QJe().fromBinary(e, t); + } + static fromJson(e, t) { + return new QJe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new QJe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(QJe, e, t); + } + }; + HMs = class ZJe extends N { + constructor(e) { + super(); + this.id = 0; + this.dailyUsageData = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.DailyTeamMemberUsage"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "id", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "daily_usage_data", + kind: "message", + T: qMs, + repeated: true + }, { + no: 3, + name: "last_usage", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new ZJe().fromBinary(e, t); + } + static fromJson(e, t) { + return new ZJe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new ZJe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(ZJe, e, t); + } + }; + qMs = class eGe extends N { + constructor(e) { + super(); + this.date = ""; + this.modelUsageData = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.DailyUsageData"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "date", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "copilot_usage", + kind: "scalar", + T: 5, + opt: true + }, { + no: 2, + name: "model_usage_data", + kind: "message", + T: jMs, + repeated: true + }]); + } + static fromBinary(e, t) { + return new eGe().fromBinary(e, t); + } + static fromJson(e, t) { + return new eGe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new eGe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(eGe, e, t); + } + }; + jMs = class tGe extends N { + constructor(e) { + super(); + this.modelType = ""; + this.numRequests = 0; + this.numTokens = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ModelUsageData"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "model_type", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "num_requests", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "num_tokens", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new tGe().fromBinary(e, t); + } + static fromJson(e, t) { + return new tGe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new tGe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(tGe, e, t); + } + }; + zMs = class iGe extends N { + constructor(e) { + super(); + this.platform = Yye.UNSPECIFIED; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetDownloadLinkRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "platform", + kind: "enum", + T: m.getEnumType(Yye) + }]); + } + static fromBinary(e, t) { + return new iGe().fromBinary(e, t); + } + static fromJson(e, t) { + return new iGe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new iGe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(iGe, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.MAC_APPLE_SILICON = 1] = "MAC_APPLE_SILICON"; + i[i.MAC_INTEL = 2] = "MAC_INTEL"; + i[i.MAC_UNIVERSAL = 3] = "MAC_UNIVERSAL"; + i[i.WINDOWS = 4] = "WINDOWS"; + i[i.LINUX = 5] = "LINUX"; + })(Yye ||= {}); + m.util.setEnumType(Yye, "aiserver.v1.GetDownloadLinkRequest.Platform", [{ + no: 0, + name: "PLATFORM_UNSPECIFIED" + }, { + no: 1, + name: "PLATFORM_MAC_APPLE_SILICON" + }, { + no: 2, + name: "PLATFORM_MAC_INTEL" + }, { + no: 3, + name: "PLATFORM_MAC_UNIVERSAL" + }, { + no: 4, + name: "PLATFORM_WINDOWS" + }, { + no: 5, + name: "PLATFORM_LINUX" + }]); + JMs = class sGe extends N { + constructor(e) { + super(); + this.cachedDownloadLink = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetDownloadLinkResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "cached_download_link", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new sGe().fromBinary(e, t); + } + static fromJson(e, t) { + return new sGe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new sGe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(sGe, e, t); + } + }; + GMs = class nGe extends N { + constructor(e) { + super(); + this.teamId = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetSsoConfigurationLinksRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "team_id", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new nGe().fromBinary(e, t); + } + static fromJson(e, t) { + return new nGe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new nGe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(nGe, e, t); + } + }; + KMs = class rGe extends N { + constructor(e) { + super(); + this.ssoUrl = ""; + this.domainVerificationUrl = ""; + this.ssoStatus = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetSsoConfigurationLinksResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "sso_url", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "domain_verification_url", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "sso_status", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new rGe().fromBinary(e, t); + } + static fromJson(e, t) { + return new rGe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new rGe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(rGe, e, t); + } + }; + YMs = class oGe extends N { + constructor(e) { + super(); + this.teamId = 0; + this.adminOnlyUsagePricing = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SetAdminOnlyUsagePricingRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "team_id", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "admin_only_usage_pricing", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new oGe().fromBinary(e, t); + } + static fromJson(e, t) { + return new oGe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new oGe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(oGe, e, t); + } + }; + XMs = class aGe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SetAdminOnlyUsagePricingResponse"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new aGe().fromBinary(e, t); + } + static fromJson(e, t) { + return new aGe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new aGe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(aGe, e, t); + } + }; + QMs = class lGe extends N { + constructor(e) { + super(); + this.teamId = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetYearlyUpgradeEligibilityRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "team_id", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new lGe().fromBinary(e, t); + } + static fromJson(e, t) { + return new lGe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new lGe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(lGe, e, t); + } + }; + ZMs = class cGe extends N { + constructor(e) { + super(); + this.eligible = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetYearlyUpgradeEligibilityResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "eligible", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new cGe().fromBinary(e, t); + } + static fromJson(e, t) { + return new cGe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new cGe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(cGe, e, t); + } + }; + eAs = class uGe extends N { + constructor(e) { + super(); + this.teamId = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.UpgradeToYearlyRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "team_id", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new uGe().fromBinary(e, t); + } + static fromJson(e, t) { + return new uGe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new uGe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(uGe, e, t); + } + }; + tAs = class dGe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.UpgradeToYearlyResponse"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new dGe().fromBinary(e, t); + } + static fromJson(e, t) { + return new dGe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new dGe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(dGe, e, t); + } + }; + iAs = class hGe extends N { + constructor(e) { + super(); + this.teamId = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetUsageBasedPremiumRequestsRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "team_id", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new hGe().fromBinary(e, t); + } + static fromJson(e, t) { + return new hGe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new hGe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(hGe, e, t); + } + }; + sAs = class fGe extends N { + constructor(e) { + super(); + this.usageBasedPremiumRequests = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetUsageBasedPremiumRequestsResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "usage_based_premium_requests", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new fGe().fromBinary(e, t); + } + static fromJson(e, t) { + return new fGe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new fGe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(fGe, e, t); + } + }; + nAs = class gGe extends N { + constructor(e) { + super(); + this.teamId = 0; + this.usageBasedPremiumRequests = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SetUsageBasedPremiumRequestsRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "team_id", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "usage_based_premium_requests", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new gGe().fromBinary(e, t); + } + static fromJson(e, t) { + return new gGe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new gGe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(gGe, e, t); + } + }; + rAs = class pGe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SetUsageBasedPremiumRequestsResponse"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new pGe().fromBinary(e, t); + } + static fromJson(e, t) { + return new pGe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new pGe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(pGe, e, t); + } + }; + oAs = class mGe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetReferralsRequest"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new mGe().fromBinary(e, t); + } + static fromJson(e, t) { + return new mGe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new mGe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(mGe, e, t); + } + }; + aAs = class bGe extends N { + constructor(e) { + super(); + this.numReferrals = 0; + this.referralCode = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetReferralsResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "num_referrals", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "referral_code", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new bGe().fromBinary(e, t); + } + static fromJson(e, t) { + return new bGe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new bGe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(bGe, e, t); + } + }; + lAs = class vGe extends N { + constructor(e) { + super(); + this.referralCode = ""; + this.authId = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CheckReferralCodeRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "referral_code", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "auth_id", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new vGe().fromBinary(e, t); + } + static fromJson(e, t) { + return new vGe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new vGe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(vGe, e, t); + } + }; + cAs = class yGe extends N { + constructor(e) { + super(); + this.isValid = false; + this.userIsEligible = false; + this.maxRedemptions = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CheckReferralCodeResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "is_valid", + kind: "scalar", + T: 8 + }, { + no: 2, + name: "user_is_eligible", + kind: "scalar", + T: 8 + }, { + no: 3, + name: "max_redemptions", + kind: "scalar", + T: 8 + }, { + no: 4, + name: "metadata", + kind: "message", + T: uAs, + opt: true + }]); + } + static fromBinary(e, t) { + return new yGe().fromBinary(e, t); + } + static fromJson(e, t) { + return new yGe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new yGe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(yGe, e, t); + } + }; + uAs = class wGe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.Metadata"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "title", + kind: "scalar", + T: 9, + opt: true + }, { + no: 2, + name: "description", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new wGe().fromBinary(e, t); + } + static fromJson(e, t) { + return new wGe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new wGe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(wGe, e, t); + } + }; + dAs = class CGe extends N { + constructor(e) { + super(); + this.teamId = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetTeamReposRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "team_id", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new CGe().fromBinary(e, t); + } + static fromJson(e, t) { + return new CGe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new CGe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(CGe, e, t); + } + }; + hAs = class SGe extends N { + constructor(e) { + super(); + this.repos = []; + this.teamRepoType = ""; + this.allowedRepos = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetTeamReposResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "repos", + kind: "message", + T: wKt, + repeated: true + }, { + no: 2, + name: "team_repo_type", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "allowed_repos", + kind: "message", + T: wKt, + repeated: true + }]); + } + static fromBinary(e, t) { + return new SGe().fromBinary(e, t); + } + static fromJson(e, t) { + return new SGe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new SGe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(SGe, e, t); + } + }; + wKt = class xGe extends N { + constructor(e) { + super(); + this.id = 0; + this.url = ""; + this.patterns = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetTeamReposResponse.Repo"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "id", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "url", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "patterns", + kind: "message", + T: fAs, + repeated: true + }]); + } + static fromBinary(e, t) { + return new xGe().fromBinary(e, t); + } + static fromJson(e, t) { + return new xGe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new xGe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(xGe, e, t); + } + }; + fAs = class kGe extends N { + constructor(e) { + super(); + this.id = 0; + this.pattern = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetTeamReposResponse.Pattern"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "id", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "pattern", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new kGe().fromBinary(e, t); + } + static fromJson(e, t) { + return new kGe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new kGe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(kGe, e, t); + } + }; + gAs = class EGe extends N { + constructor(e) { + super(); + this.teamId = 0; + this.repoUrl = ""; + this.repoType = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CreateTeamRepoRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "team_id", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "repo_url", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "repo_type", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new EGe().fromBinary(e, t); + } + static fromJson(e, t) { + return new EGe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new EGe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(EGe, e, t); + } + }; + pAs = class IGe extends N { + constructor(e) { + super(); + this.repoId = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CreateTeamRepoResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "repo_id", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new IGe().fromBinary(e, t); + } + static fromJson(e, t) { + return new IGe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new IGe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(IGe, e, t); + } + }; + mAs = class DGe extends N { + constructor(e) { + super(); + this.teamId = 0; + this.repoId = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.DeleteTeamRepoRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "team_id", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "repo_id", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new DGe().fromBinary(e, t); + } + static fromJson(e, t) { + return new DGe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new DGe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(DGe, e, t); + } + }; + bAs = class TGe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.DeleteTeamRepoResponse"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new TGe().fromBinary(e, t); + } + static fromJson(e, t) { + return new TGe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new TGe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(TGe, e, t); + } + }; + vAs = class PGe extends N { + constructor(e) { + super(); + this.teamId = 0; + this.repoId = 0; + this.pattern = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.AddRepoPatternRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "team_id", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "repo_id", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "pattern", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new PGe().fromBinary(e, t); + } + static fromJson(e, t) { + return new PGe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new PGe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(PGe, e, t); + } + }; + yAs = class LGe extends N { + constructor(e) { + super(); + this.patternId = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.AddRepoPatternResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "pattern_id", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new LGe().fromBinary(e, t); + } + static fromJson(e, t) { + return new LGe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new LGe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(LGe, e, t); + } + }; + wAs = class RGe extends N { + constructor(e) { + super(); + this.teamId = 0; + this.repoId = 0; + this.patternId = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RemoveRepoPatternRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "team_id", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "repo_id", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "pattern_id", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new RGe().fromBinary(e, t); + } + static fromJson(e, t) { + return new RGe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new RGe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(RGe, e, t); + } + }; + CAs = class NGe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RemoveRepoPatternResponse"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new NGe().fromBinary(e, t); + } + static fromJson(e, t) { + return new NGe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new NGe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(NGe, e, t); + } + }; + SAs = class MGe extends N { + constructor(e) { + super(); + this.teamId = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetTeamAdminSettingsRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "team_id", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new MGe().fromBinary(e, t); + } + static fromJson(e, t) { + return new MGe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new MGe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(MGe, e, t); + } + }; + CKt = class AGe extends N { + constructor(e) { + super(); + this.enabled = false; + this.allowed = []; + this.blocked = []; + this.disableMcpAutoRun = false; + this.deleteFileProtection = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.AutoRunControls"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "enabled", + kind: "scalar", + T: 8 + }, { + no: 2, + name: "allowed", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 3, + name: "blocked", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 4, + name: "disable_mcp_auto_run", + kind: "scalar", + T: 8 + }, { + no: 5, + name: "delete_file_protection", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new AGe().fromBinary(e, t); + } + static fromJson(e, t) { + return new AGe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new AGe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(AGe, e, t); + } + }; + SKt = class $Ge extends N { + constructor(e) { + super(); + this.hierarchicalEnabled = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CursorIgnoreControls"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "hierarchical_enabled", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new $Ge().fromBinary(e, t); + } + static fromJson(e, t) { + return new $Ge().fromJson(e, t); + } + static fromJsonString(e, t) { + return new $Ge().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals($Ge, e, t); + } + }; + xAs = class FGe extends N { + constructor(e) { + super(); + this.allowedModels = []; + this.blockedModels = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetTeamAdminSettingsResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "allowed_models", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 2, + name: "blocked_models", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 3, + name: "auto_run_controls", + kind: "message", + T: CKt + }, { + no: 4, + name: "cursor_ignore_controls", + kind: "message", + T: SKt + }]); + } + static fromBinary(e, t) { + return new FGe().fromBinary(e, t); + } + static fromJson(e, t) { + return new FGe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new FGe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(FGe, e, t); + } + }; + kAs = class OGe extends N { + constructor(e) { + super(); + this.teamId = 0; + this.allowedModels = []; + this.blockedModels = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.UpdateTeamAdminSettingsRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "team_id", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "allowed_models", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 3, + name: "blocked_models", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 4, + name: "auto_run_controls", + kind: "message", + T: CKt + }, { + no: 5, + name: "cursor_ignore_controls", + kind: "message", + T: SKt + }]); + } + static fromBinary(e, t) { + return new OGe().fromBinary(e, t); + } + static fromJson(e, t) { + return new OGe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new OGe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(OGe, e, t); + } + }; + EAs = class _Ge extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.UpdateTeamAdminSettingsResponse"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new _Ge().fromBinary(e, t); + } + static fromJson(e, t) { + return new _Ge().fromJson(e, t); + } + static fromJsonString(e, t) { + return new _Ge().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(_Ge, e, t); + } + }; + IAs = class BGe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CreateTeamFreeTrialCodeRequest"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new BGe().fromBinary(e, t); + } + static fromJson(e, t) { + return new BGe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new BGe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(BGe, e, t); + } + }; + DAs = class UGe extends N { + constructor(e) { + super(); + this.code = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CreateTeamFreeTrialCodeResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "code", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new UGe().fromBinary(e, t); + } + static fromJson(e, t) { + return new UGe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new UGe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(UGe, e, t); + } + }; + TAs = class WGe extends N { + constructor(e) { + super(); + this.teamId = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetTeamAnalyticsRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "team_id", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "start_date", + kind: "scalar", + T: 3, + opt: true + }, { + no: 3, + name: "end_date", + kind: "scalar", + T: 3, + opt: true + }]); + } + static fromBinary(e, t) { + return new WGe().fromBinary(e, t); + } + static fromJson(e, t) { + return new WGe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new WGe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(WGe, e, t); + } + }; + PAs = class VGe extends N { + constructor(e) { + super(); + this.dailyMetrics = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetTeamAnalyticsResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "daily_metrics", + kind: "message", + T: xKt, + repeated: true + }, { + no: 2, + name: "period", + kind: "message", + T: Uft + }, { + no: 3, + name: "active_users", + kind: "message", + T: $As + }]); + } + static fromBinary(e, t) { + return new VGe().fromBinary(e, t); + } + static fromJson(e, t) { + return new VGe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new VGe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(VGe, e, t); + } + }; + LAs = class HGe extends N { + constructor(e) { + super(); + this.teamId = 0; + this.userId = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetUserAnalyticsRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "team_id", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "user_id", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "start_date", + kind: "scalar", + T: 3, + opt: true + }, { + no: 4, + name: "end_date", + kind: "scalar", + T: 3, + opt: true + }]); + } + static fromBinary(e, t) { + return new HGe().fromBinary(e, t); + } + static fromJson(e, t) { + return new HGe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new HGe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(HGe, e, t); + } + }; + RAs = class qGe extends N { + constructor(e) { + super(); + this.dailyMetrics = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetUserAnalyticsResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "daily_metrics", + kind: "message", + T: xKt, + repeated: true + }, { + no: 2, + name: "period", + kind: "message", + T: Uft + }, { + no: 3, + name: "apply_lines_rank", + kind: "scalar", + T: 5, + opt: true + }, { + no: 4, + name: "tabs_accepted_rank", + kind: "scalar", + T: 5, + opt: true + }, { + no: 5, + name: "total_team_members", + kind: "scalar", + T: 5, + opt: true + }, { + no: 6, + name: "total_apply_lines", + kind: "scalar", + T: 5, + opt: true + }, { + no: 7, + name: "team_average_apply_lines", + kind: "scalar", + T: 5, + opt: true + }, { + no: 8, + name: "total_tabs_accepted", + kind: "scalar", + T: 5, + opt: true + }, { + no: 9, + name: "team_average_tabs_accepted", + kind: "scalar", + T: 5, + opt: true + }, { + no: 10, + name: "total_members_in_team", + kind: "scalar", + T: 5, + opt: true + }]); + } + static fromBinary(e, t) { + return new qGe().fromBinary(e, t); + } + static fromJson(e, t) { + return new qGe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new qGe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(qGe, e, t); + } + }; + NAs = class jGe extends N { + constructor(e) { + super(); + this.teamId = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetTeamRawDataRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "team_id", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "start_date", + kind: "scalar", + T: 3, + opt: true + }, { + no: 3, + name: "end_date", + kind: "scalar", + T: 3, + opt: true + }]); + } + static fromBinary(e, t) { + return new jGe().fromBinary(e, t); + } + static fromJson(e, t) { + return new jGe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new jGe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(jGe, e, t); + } + }; + MAs = class zGe extends N { + constructor(e) { + super(); + this.data = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetTeamRawDataResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "data", + kind: "message", + T: AAs, + repeated: true + }, { + no: 2, + name: "period", + kind: "message", + T: Uft + }]); + } + static fromBinary(e, t) { + return new zGe().fromBinary(e, t); + } + static fromJson(e, t) { + return new zGe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new zGe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(zGe, e, t); + } + }; + AAs = class JGe extends N { + constructor(e) { + super(); + this.date = wd.zero; + this.userId = 0; + this.isActive = false; + this.totalLinesAdded = 0; + this.totalLinesDeleted = 0; + this.acceptedLinesAdded = 0; + this.acceptedLinesDeleted = 0; + this.totalApplies = 0; + this.totalAccepts = 0; + this.totalRejects = 0; + this.totalTabsShown = 0; + this.totalTabsAccepted = 0; + this.composerRequests = 0; + this.chatRequests = 0; + this.agentRequests = 0; + this.cmdkUsages = 0; + this.subscriptionIncludedReqs = 0; + this.apiKeyReqs = 0; + this.usageBasedReqs = 0; + this.bugbotUsages = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RawUserData"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "date", + kind: "scalar", + T: 3 + }, { + no: 2, + name: "user_id", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "is_active", + kind: "scalar", + T: 8 + }, { + no: 4, + name: "total_lines_added", + kind: "scalar", + T: 5 + }, { + no: 5, + name: "total_lines_deleted", + kind: "scalar", + T: 5 + }, { + no: 6, + name: "accepted_lines_added", + kind: "scalar", + T: 5 + }, { + no: 7, + name: "accepted_lines_deleted", + kind: "scalar", + T: 5 + }, { + no: 8, + name: "total_applies", + kind: "scalar", + T: 5 + }, { + no: 9, + name: "total_accepts", + kind: "scalar", + T: 5 + }, { + no: 10, + name: "total_rejects", + kind: "scalar", + T: 5 + }, { + no: 11, + name: "total_tabs_shown", + kind: "scalar", + T: 5 + }, { + no: 12, + name: "total_tabs_accepted", + kind: "scalar", + T: 5 + }, { + no: 13, + name: "composer_requests", + kind: "scalar", + T: 5 + }, { + no: 14, + name: "chat_requests", + kind: "scalar", + T: 5 + }, { + no: 15, + name: "agent_requests", + kind: "scalar", + T: 5 + }, { + no: 16, + name: "cmdk_usages", + kind: "scalar", + T: 5 + }, { + no: 17, + name: "subscription_included_reqs", + kind: "scalar", + T: 5 + }, { + no: 18, + name: "api_key_reqs", + kind: "scalar", + T: 5 + }, { + no: 19, + name: "usage_based_reqs", + kind: "scalar", + T: 5 + }, { + no: 20, + name: "bugbot_usages", + kind: "scalar", + T: 5 + }, { + no: 21, + name: "most_used_model", + kind: "scalar", + T: 9, + opt: true + }, { + no: 22, + name: "apply_most_used_extension", + kind: "scalar", + T: 9, + opt: true + }, { + no: 23, + name: "tab_most_used_extension", + kind: "scalar", + T: 9, + opt: true + }, { + no: 24, + name: "client_version", + kind: "scalar", + T: 9, + opt: true + }, { + no: 25, + name: "email", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new JGe().fromBinary(e, t); + } + static fromJson(e, t) { + return new JGe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new JGe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(JGe, e, t); + } + }; + $As = class GGe extends N { + constructor(e) { + super(); + this.current = 0; + this.previous = 0; + this.percentChange = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ActiveUsers"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "current", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "previous", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "percent_change", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new GGe().fromBinary(e, t); + } + static fromJson(e, t) { + return new GGe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new GGe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(GGe, e, t); + } + }; + Uft = class KGe extends N { + constructor(e) { + super(); + this.startDate = wd.zero; + this.endDate = wd.zero; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.AnalyticsPeriod"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "start_date", + kind: "scalar", + T: 3 + }, { + no: 2, + name: "end_date", + kind: "scalar", + T: 3 + }]); + } + static fromBinary(e, t) { + return new KGe().fromBinary(e, t); + } + static fromJson(e, t) { + return new KGe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new KGe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(KGe, e, t); + } + }; + xKt = class YGe extends N { + constructor(e) { + super(); + this.date = wd.zero; + this.activeUsers = 0; + this.linesAdded = 0; + this.linesDeleted = 0; + this.acceptedLinesAdded = 0; + this.acceptedLinesDeleted = 0; + this.totalApplies = 0; + this.totalAccepts = 0; + this.totalRejects = 0; + this.totalTabsShown = 0; + this.totalTabsAccepted = 0; + this.composerRequests = 0; + this.chatRequests = 0; + this.agentRequests = 0; + this.cmdkUsages = 0; + this.subscriptionIncludedReqs = 0; + this.apiKeyReqs = 0; + this.usageBasedReqs = 0; + this.bugbotUsages = 0; + this.modelUsage = []; + this.extensionUsage = []; + this.tabExtensionUsage = []; + this.clientVersionUsage = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.DailyMetrics"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "date", + kind: "scalar", + T: 3 + }, { + no: 2, + name: "active_users", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "lines_added", + kind: "scalar", + T: 5 + }, { + no: 4, + name: "lines_deleted", + kind: "scalar", + T: 5 + }, { + no: 5, + name: "accepted_lines_added", + kind: "scalar", + T: 5 + }, { + no: 6, + name: "accepted_lines_deleted", + kind: "scalar", + T: 5 + }, { + no: 7, + name: "total_applies", + kind: "scalar", + T: 5 + }, { + no: 8, + name: "total_accepts", + kind: "scalar", + T: 5 + }, { + no: 9, + name: "total_rejects", + kind: "scalar", + T: 5 + }, { + no: 10, + name: "total_tabs_shown", + kind: "scalar", + T: 5 + }, { + no: 11, + name: "total_tabs_accepted", + kind: "scalar", + T: 5 + }, { + no: 12, + name: "composer_requests", + kind: "scalar", + T: 5 + }, { + no: 13, + name: "chat_requests", + kind: "scalar", + T: 5 + }, { + no: 14, + name: "agent_requests", + kind: "scalar", + T: 5 + }, { + no: 15, + name: "cmdk_usages", + kind: "scalar", + T: 5 + }, { + no: 16, + name: "subscription_included_reqs", + kind: "scalar", + T: 5 + }, { + no: 17, + name: "api_key_reqs", + kind: "scalar", + T: 5 + }, { + no: 18, + name: "usage_based_reqs", + kind: "scalar", + T: 5 + }, { + no: 19, + name: "bugbot_usages", + kind: "scalar", + T: 5 + }, { + no: 20, + name: "model_usage", + kind: "message", + T: Xye, + repeated: true + }, { + no: 21, + name: "extension_usage", + kind: "message", + T: Xye, + repeated: true + }, { + no: 22, + name: "tab_extension_usage", + kind: "message", + T: Xye, + repeated: true + }, { + no: 23, + name: "client_version_usage", + kind: "message", + T: Xye, + repeated: true + }]); + } + static fromBinary(e, t) { + return new YGe().fromBinary(e, t); + } + static fromJson(e, t) { + return new YGe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new YGe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(YGe, e, t); + } + }; + Xye = class XGe extends N { + constructor(e) { + super(); + this.name = ""; + this.count = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StringCount"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "name", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "count", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new XGe().fromBinary(e, t); + } + static fromJson(e, t) { + return new XGe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new XGe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(XGe, e, t); + } + }; + FAs = class QGe extends N { + constructor(e) { + super(); + this.teamId = 0; + this.teamRepoType = ""; + this.repoId = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SetTeamRepoTypeRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "team_id", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "team_repo_type", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "repo_id", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new QGe().fromBinary(e, t); + } + static fromJson(e, t) { + return new QGe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new QGe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(QGe, e, t); + } + }; + OAs = class ZGe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SetTeamRepoTypeResponse"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new ZGe().fromBinary(e, t); + } + static fromJson(e, t) { + return new ZGe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new ZGe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(ZGe, e, t); + } + }; + _As = class eKe extends N { + constructor(e) { + super(); + this.conversationId = ""; + this.timestampBeforeRequest = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetClientUsageDataRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "conversation_id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "timestamp_before_request", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new eKe().fromBinary(e, t); + } + static fromJson(e, t) { + return new eKe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new eKe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(eKe, e, t); + } + }; + BAs = class tKe extends N { + constructor(e) { + super(); + this.itemsWithCost = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetClientUsageDataResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "items_with_cost", + kind: "message", + T: UAs, + repeated: true + }]); + } + static fromBinary(e, t) { + return new tKe().fromBinary(e, t); + } + static fromJson(e, t) { + return new tKe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new tKe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(tKe, e, t); + } + }; + UAs = class iKe extends N { + constructor(e) { + super(); + this.name = ""; + this.costInCents = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetClientUsageDataResponse.NameToCost"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "name", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "cost_in_cents", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new iKe().fromBinary(e, t); + } + static fromJson(e, t) { + return new iKe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new iKe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(iKe, e, t); + } + }; + WAs = class sKe extends N { + constructor(e) { + super(); + this.teamId = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetAdvancedAnalyticsEnabledRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "team_id", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new sKe().fromBinary(e, t); + } + static fromJson(e, t) { + return new sKe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new sKe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(sKe, e, t); + } + }; + VAs = class nKe extends N { + constructor(e) { + super(); + this.enabled = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetAdvancedAnalyticsEnabledResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "enabled", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new nKe().fromBinary(e, t); + } + static fromJson(e, t) { + return new nKe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new nKe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(nKe, e, t); + } + }; + HAs = class rKe extends N { + constructor(e) { + super(); + this.usageUuid = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetTokenUsageRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "usage_uuid", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new rKe().fromBinary(e, t); + } + static fromJson(e, t) { + return new rKe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new rKe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(rKe, e, t); + } + }; + qAs = class oKe extends N { + constructor(e) { + super(); + this.inputTokens = 0; + this.outputTokens = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetTokenUsageResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "input_tokens", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "output_tokens", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new oKe().fromBinary(e, t); + } + static fromJson(e, t) { + return new oKe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new oKe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(oKe, e, t); + } + }; + jAs = class aKe extends N { + constructor(e) { + super(); + this.teamId = 0; + this.bedrockIamRole = ""; + this.region = ""; + this.modelId = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ValidateBedrockIamRoleRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "team_id", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "bedrock_iam_role", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "region", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "model_id", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new aKe().fromBinary(e, t); + } + static fromJson(e, t) { + return new aKe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new aKe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(aKe, e, t); + } + }; + zAs = class lKe extends N { + constructor(e) { + super(); + this.success = false; + this.errorMessage = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ValidateBedrockIamRoleResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "success", + kind: "scalar", + T: 8 + }, { + no: 2, + name: "error_message", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new lKe().fromBinary(e, t); + } + static fromJson(e, t) { + return new lKe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new lKe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(lKe, e, t); + } + }; + JAs = class cKe extends N { + constructor(e) { + super(); + this.teamId = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetTeamSpendRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "team_id", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "page", + kind: "scalar", + T: 5, + opt: true + }, { + no: 3, + name: "page_size", + kind: "scalar", + T: 5, + opt: true + }, { + no: 4, + name: "sort_by", + kind: "scalar", + T: 9, + opt: true + }, { + no: 5, + name: "sort_direction", + kind: "scalar", + T: 9, + opt: true + }, { + no: 6, + name: "search_term", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new cKe().fromBinary(e, t); + } + static fromJson(e, t) { + return new cKe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new cKe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(cKe, e, t); + } + }; + GAs = class uKe extends N { + constructor(e) { + super(); + this.teamMemberSpend = []; + this.subscriptionCycleStart = wd.zero; + this.totalMembers = 0; + this.totalPages = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetTeamSpendResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "team_member_spend", + kind: "message", + T: KAs, + repeated: true + }, { + no: 2, + name: "subscription_cycle_start", + kind: "scalar", + T: 3 + }, { + no: 3, + name: "total_members", + kind: "scalar", + T: 5 + }, { + no: 4, + name: "total_pages", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new uKe().fromBinary(e, t); + } + static fromJson(e, t) { + return new uKe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new uKe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(uKe, e, t); + } + }; + KAs = class dKe extends N { + constructor(e) { + super(); + this.userId = 0; + this.spendCents = 0; + this.fastPremiumRequests = 0; + this.name = ""; + this.email = ""; + this.role = aD.UNSPECIFIED; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetTeamSpendResponse.TeamMemberSpend"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "user_id", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "spend_cents", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "fast_premium_requests", + kind: "scalar", + T: 5 + }, { + no: 4, + name: "name", + kind: "scalar", + T: 9 + }, { + no: 5, + name: "email", + kind: "scalar", + T: 9 + }, { + no: 6, + name: "role", + kind: "enum", + T: m.getEnumType(aD) + }]); + } + static fromBinary(e, t) { + return new dKe().fromBinary(e, t); + } + static fromJson(e, t) { + return new dKe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new dKe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(dKe, e, t); + } + }; + YAs = class hKe extends N { + constructor(e) { + super(); + this.teamId = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetFilteredUsageEventsRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "team_id", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "start_date", + kind: "scalar", + T: 3, + opt: true + }, { + no: 3, + name: "end_date", + kind: "scalar", + T: 3, + opt: true + }, { + no: 4, + name: "user_id", + kind: "scalar", + T: 5, + opt: true + }, { + no: 5, + name: "model_id", + kind: "scalar", + T: 9, + opt: true + }, { + no: 6, + name: "page", + kind: "scalar", + T: 5, + opt: true + }, { + no: 7, + name: "page_size", + kind: "scalar", + T: 5, + opt: true + }]); + } + static fromBinary(e, t) { + return new hKe().fromBinary(e, t); + } + static fromJson(e, t) { + return new hKe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new hKe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(hKe, e, t); + } + }; + XAs = class fKe extends N { + constructor(e) { + super(); + this.usageEvents = []; + this.totalUsageEventsCount = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetFilteredUsageEventsResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "usage_events", + kind: "message", + T: Ojt, + repeated: true + }, { + no: 2, + name: "total_usage_events_count", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new fKe().fromBinary(e, t); + } + static fromJson(e, t) { + return new fKe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new fKe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(fKe, e, t); + } + }; + QAs = class gKe extends N { + constructor(e) { + super(); + this.inviteCode = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RevokeTeamInviteLinkRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "invite_code", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new gKe().fromBinary(e, t); + } + static fromJson(e, t) { + return new gKe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new gKe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(gKe, e, t); + } + }; + ZAs = class pKe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RevokeTeamInviteLinkResponse"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new pKe().fromBinary(e, t); + } + static fromJson(e, t) { + return new pKe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new pKe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(pKe, e, t); + } + }; + e$s = class mKe extends N { + constructor(e) { + super(); + this.teamId = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ListTeamInviteLinksRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "team_id", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new mKe().fromBinary(e, t); + } + static fromJson(e, t) { + return new mKe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new mKe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(mKe, e, t); + } + }; + t$s = class bKe extends N { + constructor(e) { + super(); + this.inviteLink = ""; + this.validUntil = wd.zero; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.InviteLinkInfo"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "invite_link", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "valid_until", + kind: "scalar", + T: 3 + }]); + } + static fromBinary(e, t) { + return new bKe().fromBinary(e, t); + } + static fromJson(e, t) { + return new bKe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new bKe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(bKe, e, t); + } + }; + i$s = class vKe extends N { + constructor(e) { + super(); + this.inviteLinks = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ListTeamInviteLinksResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "invite_links", + kind: "message", + T: t$s, + repeated: true + }]); + } + static fromBinary(e, t) { + return new vKe().fromBinary(e, t); + } + static fromJson(e, t) { + return new vKe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new vKe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(vKe, e, t); + } + }; + s$s = class yKe extends N { + constructor(e) { + super(); + this.firstName = ""; + this.lastName = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.UpdateUserNameRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "first_name", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "last_name", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new yKe().fromBinary(e, t); + } + static fromJson(e, t) { + return new yKe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new yKe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(yKe, e, t); + } + }; + n$s = class wKe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.UpdateUserNameResponse"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new wKe().fromBinary(e, t); + } + static fromJson(e, t) { + return new wKe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new wKe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(wKe, e, t); + } + }; + r$s = class CKe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ListInvoicesRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "team_id", + kind: "scalar", + T: 5, + opt: true + }, { + no: 2, + name: "page", + kind: "scalar", + T: 5, + opt: true + }, { + no: 3, + name: "page_size", + kind: "scalar", + T: 5, + opt: true + }]); + } + static fromBinary(e, t) { + return new CKe().fromBinary(e, t); + } + static fromJson(e, t) { + return new CKe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new CKe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(CKe, e, t); + } + }; + o$s = class SKe extends N { + constructor(e) { + super(); + this.invoiceId = ""; + this.date = wd.zero; + this.amountCents = 0; + this.currency = ""; + this.status = ""; + this.hostedInvoiceUrl = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.InvoiceInfo"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "invoice_id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "date", + kind: "scalar", + T: 3 + }, { + no: 3, + name: "amount_cents", + kind: "scalar", + T: 5 + }, { + no: 4, + name: "currency", + kind: "scalar", + T: 9 + }, { + no: 5, + name: "status", + kind: "scalar", + T: 9 + }, { + no: 6, + name: "hosted_invoice_url", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new SKe().fromBinary(e, t); + } + static fromJson(e, t) { + return new SKe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new SKe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(SKe, e, t); + } + }; + a$s = class xKe extends N { + constructor(e) { + super(); + this.invoices = []; + this.total = 0; + this.totalPages = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ListInvoicesResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "invoices", + kind: "message", + T: o$s, + repeated: true + }, { + no: 2, + name: "total", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "total_pages", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new xKe().fromBinary(e, t); + } + static fromJson(e, t) { + return new xKe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new xKe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(xKe, e, t); + } + }; + l$s = class kKe extends N { + constructor(e) { + super(); + this.requestId = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.IsEligibleForRefundRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "request_id", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new kKe().fromBinary(e, t); + } + static fromJson(e, t) { + return new kKe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new kKe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(kKe, e, t); + } + }; + c$s = class EKe extends N { + constructor(e) { + super(); + this.isEligible = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.IsEligibleForRefundResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "is_eligible", + kind: "scalar", + T: 8 + }, { + no: 2, + name: "reason", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new EKe().fromBinary(e, t); + } + static fromJson(e, t) { + return new EKe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new EKe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(EKe, e, t); + } + }; + u$s = class IKe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetRemainingRefundsRequest"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new IKe().fromBinary(e, t); + } + static fromJson(e, t) { + return new IKe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new IKe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(IKe, e, t); + } + }; + d$s = class DKe extends N { + constructor(e) { + super(); + this.remainingRefunds = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetRemainingRefundsResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "remaining_refunds", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new DKe().fromBinary(e, t); + } + static fromJson(e, t) { + return new DKe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new DKe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(DKe, e, t); + } + }; + h$s = class TKe extends N { + constructor(e) { + super(); + this.requestId = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.TriggerRefundRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "request_id", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new TKe().fromBinary(e, t); + } + static fromJson(e, t) { + return new TKe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new TKe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(TKe, e, t); + } + }; + f$s = class PKe extends N { + constructor(e) { + super(); + this.remainingRefunds = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.TriggerRefundResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "remaining_refunds", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new PKe().fromBinary(e, t); + } + static fromJson(e, t) { + return new PKe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new PKe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(PKe, e, t); + } + }; + } +}); +var Qye; +var kKt = ue({ + "out-build/proto/aiserver/v1/dashboard_connectweb.js"() { + "use strict"; + + Wft(); + Hr(); + Qye = { + typeName: "aiserver.v1.DashboardService", + methods: { + getTeams: { + name: "GetTeams", + I: yKt, + O: dMs, + kind: Ge.Unary + }, + getActivationCheckoutUrl: { + name: "GetActivationCheckoutUrl", + I: hMs, + O: fMs, + kind: Ge.Unary + }, + getTeamCustomerPortalUrl: { + name: "GetTeamCustomerPortalUrl", + I: gMs, + O: pMs, + kind: Ge.Unary + }, + getTeamMembers: { + name: "GetTeamMembers", + I: mMs, + O: vMs, + kind: Ge.Unary + }, + sendTeamInvite: { + name: "SendTeamInvite", + I: CMs, + O: SMs, + kind: Ge.Unary + }, + getTeamInviteLink: { + name: "GetTeamInviteLink", + I: yMs, + O: wMs, + kind: Ge.Unary + }, + acceptInvite: { + name: "AcceptInvite", + I: xMs, + O: kMs, + kind: Ge.Unary + }, + createTeam: { + name: "CreateTeam", + I: EMs, + O: IMs, + kind: Ge.Unary + }, + changeSeat: { + name: "ChangeSeat", + I: RMs, + O: NMs, + kind: Ge.Unary + }, + changeTeamSubscription: { + name: "ChangeTeamSubscription", + I: MMs, + O: AMs, + kind: Ge.Unary + }, + connectGithubCallback: { + name: "ConnectGithubCallback", + I: PNs, + O: LNs, + kind: Ge.Unary + }, + registerGithubCursorCode: { + name: "RegisterGithubCursorCode", + I: RNs, + O: NNs, + kind: Ge.Unary + }, + updateRole: { + name: "UpdateRole", + I: DMs, + O: TMs, + kind: Ge.Unary + }, + removeMember: { + name: "RemoveMember", + I: PMs, + O: LMs, + kind: Ge.Unary + }, + getTeamUsage: { + name: "GetTeamUsage", + I: $Ms, + O: FMs, + kind: Ge.Unary + }, + getDailyTeamUsage: { + name: "GetDailyTeamUsage", + I: WMs, + O: VMs, + kind: Ge.Unary + }, + getSignUpType: { + name: "GetSignUpType", + I: BMs, + O: UMs, + kind: Ge.Unary + }, + getHardLimit: { + name: "GetHardLimit", + I: oMs, + O: aMs, + kind: Ge.Unary + }, + setHardLimit: { + name: "SetHardLimit", + I: lMs, + O: cMs, + kind: Ge.Unary + }, + deleteAccount: { + name: "DeleteAccount", + I: ONs, + O: _Ns, + kind: Ge.Unary + }, + getMonthlyInvoice: { + name: "GetMonthlyInvoice", + I: iMs, + O: sMs, + kind: Ge.Unary + }, + getPricingHistory: { + name: "GetPricingHistory", + I: ZNs, + O: eMs, + kind: Ge.Unary + }, + listBackgroundComposerSecrets: { + name: "ListBackgroundComposerSecrets", + I: VNs, + O: HNs, + kind: Ge.Unary + }, + createBackgroundComposerSecret: { + name: "CreateBackgroundComposerSecret", + I: jNs, + O: zNs, + kind: Ge.Unary + }, + revokeBackgroundComposerSecret: { + name: "RevokeBackgroundComposerSecret", + I: JNs, + O: GNs, + kind: Ge.Unary + }, + createTeamWithFreeTrial: { + name: "CreateTeamWithFreeTrial", + I: XNs, + O: QNs, + kind: Ge.Unary + }, + getTeamHasValidPaymentMethod: { + name: "GetTeamHasValidPaymentMethod", + I: KNs, + O: YNs, + kind: Ge.Unary + }, + getTeamPrivacyModeForced: { + name: "GetTeamPrivacyModeForced", + I: vKt, + O: WNs, + kind: Ge.Unary + }, + switchTeamPrivacyMode: { + name: "SwitchTeamPrivacyMode", + I: BNs, + O: UNs, + kind: Ge.Unary + }, + updateFastRequests: { + name: "UpdateFastRequests", + I: mKt, + O: $Ns, + kind: Ge.Unary + }, + getFastRequests: { + name: "GetFastRequests", + I: bKt, + O: FNs, + kind: Ge.Unary + }, + getDownloadLink: { + name: "GetDownloadLink", + I: zMs, + O: JMs, + kind: Ge.Unary + }, + getSsoConfigurationLinks: { + name: "GetSsoConfigurationLinks", + I: GMs, + O: KMs, + kind: Ge.Unary + }, + setAdminOnlyUsagePricing: { + name: "SetAdminOnlyUsagePricing", + I: YMs, + O: XMs, + kind: Ge.Unary + }, + getYearlyUpgradeEligibility: { + name: "GetYearlyUpgradeEligibility", + I: QMs, + O: ZMs, + kind: Ge.Unary + }, + upgradeToYearly: { + name: "UpgradeToYearly", + I: eAs, + O: tAs, + kind: Ge.Unary + }, + getUsageBasedPremiumRequests: { + name: "GetUsageBasedPremiumRequests", + I: iAs, + O: sAs, + kind: Ge.Unary + }, + setUsageBasedPremiumRequests: { + name: "SetUsageBasedPremiumRequests", + I: nAs, + O: rAs, + kind: Ge.Unary + }, + getReferrals: { + name: "GetReferrals", + I: oAs, + O: aAs, + kind: Ge.Unary + }, + checkReferralCode: { + name: "CheckReferralCode", + I: lAs, + O: cAs, + kind: Ge.Unary + }, + getTeamRepos: { + name: "GetTeamRepos", + I: dAs, + O: hAs, + kind: Ge.Unary + }, + createTeamRepo: { + name: "CreateTeamRepo", + I: gAs, + O: pAs, + kind: Ge.Unary + }, + deleteTeamRepo: { + name: "DeleteTeamRepo", + I: mAs, + O: bAs, + kind: Ge.Unary + }, + addRepoPattern: { + name: "AddRepoPattern", + I: vAs, + O: yAs, + kind: Ge.Unary + }, + removeRepoPattern: { + name: "RemoveRepoPattern", + I: wAs, + O: CAs, + kind: Ge.Unary + }, + setTeamRepoType: { + name: "SetTeamRepoType", + I: FAs, + O: OAs, + kind: Ge.Unary + }, + getTeamAdminSettings: { + name: "GetTeamAdminSettings", + I: SAs, + O: xAs, + kind: Ge.Unary + }, + updateTeamAdminSettings: { + name: "UpdateTeamAdminSettings", + I: kAs, + O: EAs, + kind: Ge.Unary + }, + createTeamFreeTrialCode: { + name: "CreateTeamFreeTrialCode", + I: IAs, + O: DAs, + kind: Ge.Unary + }, + getTeamAnalytics: { + name: "GetTeamAnalytics", + I: TAs, + O: PAs, + kind: Ge.Unary + }, + getUserAnalytics: { + name: "GetUserAnalytics", + I: LAs, + O: RAs, + kind: Ge.Unary + }, + getTeamRawData: { + name: "GetTeamRawData", + I: NAs, + O: MAs, + kind: Ge.Unary + }, + getClientUsageData: { + name: "GetClientUsageData", + I: _As, + O: BAs, + kind: Ge.Unary + }, + getAdvancedAnalyticsEnabled: { + name: "GetAdvancedAnalyticsEnabled", + I: WAs, + O: VAs, + kind: Ge.Unary + }, + getTokenUsage: { + name: "GetTokenUsage", + I: HAs, + O: qAs, + kind: Ge.Unary + }, + validateBedrockIamRole: { + name: "ValidateBedrockIamRole", + I: jAs, + O: zAs, + kind: Ge.Unary + }, + addUserToEarlyAccessList: { + name: "AddUserToEarlyAccessList", + I: MNs, + O: ANs, + kind: Ge.Unary + }, + getTeamSpend: { + name: "GetTeamSpend", + I: JAs, + O: GAs, + kind: Ge.Unary + }, + getFilteredUsageEvents: { + name: "GetFilteredUsageEvents", + I: YAs, + O: XAs, + kind: Ge.Unary + }, + revokeTeamInviteLink: { + name: "RevokeTeamInviteLink", + I: QAs, + O: ZAs, + kind: Ge.Unary + }, + listTeamInviteLinks: { + name: "ListTeamInviteLinks", + I: e$s, + O: i$s, + kind: Ge.Unary + }, + updateUserName: { + name: "UpdateUserName", + I: s$s, + O: n$s, + kind: Ge.Unary + }, + listInvoices: { + name: "ListInvoices", + I: r$s, + O: a$s, + kind: Ge.Unary + }, + isEligibleForRefund: { + name: "IsEligibleForRefund", + I: l$s, + O: c$s, + kind: Ge.Unary + }, + getRemainingRefunds: { + name: "GetRemainingRefunds", + I: u$s, + O: d$s, + kind: Ge.Unary + }, + triggerRefund: { + name: "TriggerRefund", + I: h$s, + O: f$s, + kind: Ge.Unary + } + } + }; + } +}); +var EKt; +var g$s; +var OJ; +var p$s; +var m$s; +var b$s; +var v$s; +var y$s; +var Zye; +var w$s; +var C$s; +var S$s; +var x$s; +var k$s; +var E$s; +var I$s; +var D$s; +var T$s; +var CU; +var P$s; +var L$s; +var R$s; +var N$s; +var M$s; +var A$s; +var $$s; +var F$s; +var O$s; +var _$s; +var B$s; +var U$s = ue({ + "out-build/proto/aiserver/v1/auth_pb.js"() { + "use strict"; + + Hr(); + EKt = class LKe extends N { + constructor(e) { + super(); + this.id = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.User"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 2, + name: "id", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "email", + kind: "scalar", + T: 9, + opt: true + }, { + no: 4, + name: "email_verified", + kind: "scalar", + T: 8, + opt: true + }, { + no: 5, + name: "first_name", + kind: "scalar", + T: 9, + opt: true + }, { + no: 6, + name: "last_name", + kind: "scalar", + T: 9, + opt: true + }, { + no: 7, + name: "created_at", + kind: "scalar", + T: 9, + opt: true + }, { + no: 8, + name: "updated_at", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new LKe().fromBinary(e, t); + } + static fromJson(e, t) { + return new LKe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new LKe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(LKe, e, t); + } + }; + g$s = class RKe extends N { + constructor(e) { + super(); + this.sessionId = ""; + this.type = OJ.UNSPECIFIED; + this.createdAt = ""; + this.expiresAt = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.Session"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "session_id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "type", + kind: "enum", + T: m.getEnumType(OJ) + }, { + no: 3, + name: "created_at", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "expires_at", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new RKe().fromBinary(e, t); + } + static fromJson(e, t) { + return new RKe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new RKe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(RKe, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.WEB = 1] = "WEB"; + i[i.CLIENT = 2] = "CLIENT"; + })(OJ ||= {}); + m.util.setEnumType(OJ, "aiserver.v1.Session.SessionType", [{ + no: 0, + name: "SESSION_TYPE_UNSPECIFIED" + }, { + no: 1, + name: "SESSION_TYPE_WEB" + }, { + no: 2, + name: "SESSION_TYPE_CLIENT" + }]); + p$s = class NKe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ListActiveSessionsRequest"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new NKe().fromBinary(e, t); + } + static fromJson(e, t) { + return new NKe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new NKe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(NKe, e, t); + } + }; + m$s = class MKe extends N { + constructor(e) { + super(); + this.sessions = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ListActiveSessionsResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "sessions", + kind: "message", + T: g$s, + repeated: true + }]); + } + static fromBinary(e, t) { + return new MKe().fromBinary(e, t); + } + static fromJson(e, t) { + return new MKe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new MKe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(MKe, e, t); + } + }; + b$s = class AKe extends N { + constructor(e) { + super(); + this.sessionId = ""; + this.type = OJ.UNSPECIFIED; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RevokeSessionRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "session_id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "type", + kind: "enum", + T: m.getEnumType(OJ) + }]); + } + static fromBinary(e, t) { + return new AKe().fromBinary(e, t); + } + static fromJson(e, t) { + return new AKe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new AKe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(AKe, e, t); + } + }; + v$s = class $Ke extends N { + constructor(e) { + super(); + this.success = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RevokeSessionResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "success", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new $Ke().fromBinary(e, t); + } + static fromJson(e, t) { + return new $Ke().fromJson(e, t); + } + static fromJsonString(e, t) { + return new $Ke().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals($Ke, e, t); + } + }; + y$s = class FKe extends N { + constructor(e) { + super(); + this.destination = Zye.UNSPECIFIED; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetSessionTokenRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "user", + kind: "message", + T: EKt + }, { + no: 2, + name: "destination", + kind: "enum", + T: m.getEnumType(Zye) + }, { + no: 3, + name: "stub", + kind: "scalar", + T: 9, + opt: true + }, { + no: 4, + name: "code", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new FKe().fromBinary(e, t); + } + static fromJson(e, t) { + return new FKe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new FKe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(FKe, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.PORTAL = 1] = "PORTAL"; + i[i.AISERVER = 2] = "AISERVER"; + i[i.AUTH_PROXY = 3] = "AUTH_PROXY"; + })(Zye ||= {}); + m.util.setEnumType(Zye, "aiserver.v1.GetSessionTokenRequest.Destination", [{ + no: 0, + name: "DESTINATION_UNSPECIFIED" + }, { + no: 1, + name: "DESTINATION_PORTAL" + }, { + no: 2, + name: "DESTINATION_AISERVER" + }, { + no: 3, + name: "DESTINATION_AUTH_PROXY" + }]); + w$s = class OKe extends N { + constructor(e) { + super(); + this.sessionToken = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetSessionTokenResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "session_token", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "id", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new OKe().fromBinary(e, t); + } + static fromJson(e, t) { + return new OKe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new OKe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(OKe, e, t); + } + }; + C$s = class _Ke extends N { + constructor(e) { + super(); + this.sessionToken = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CheckSessionTokenRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "session_token", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "user", + kind: "message", + T: EKt + }]); + } + static fromBinary(e, t) { + return new _Ke().fromBinary(e, t); + } + static fromJson(e, t) { + return new _Ke().fromJson(e, t); + } + static fromJsonString(e, t) { + return new _Ke().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(_Ke, e, t); + } + }; + S$s = class BKe extends N { + constructor(e) { + super(); + this.valid = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CheckSessionTokenResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "valid", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new BKe().fromBinary(e, t); + } + static fromJson(e, t) { + return new BKe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new BKe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(BKe, e, t); + } + }; + x$s = class UKe extends N { + constructor(e) { + super(); + this.email = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CustomerIdRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "email", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new UKe().fromBinary(e, t); + } + static fromJson(e, t) { + return new UKe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new UKe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(UKe, e, t); + } + }; + k$s = class WKe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CustomerIdResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "customer_id", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new WKe().fromBinary(e, t); + } + static fromJson(e, t) { + return new WKe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new WKe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(WKe, e, t); + } + }; + E$s = class VKe extends N { + constructor(e) { + super(); + this.isUsingCurrentAndOnboardingFormat = false; + this.privacy = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.MarkPrivacyRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 2, + name: "current_privacy_mode", + kind: "scalar", + T: 8, + opt: true + }, { + no: 3, + name: "onboarding_privacy_mode", + kind: "scalar", + T: 8, + opt: true + }, { + no: 4, + name: "is_using_current_and_onboarding_format", + kind: "scalar", + T: 8 + }, { + no: 5, + name: "onboarding_data_privacy_version", + kind: "scalar", + T: 9, + opt: true + }, { + no: 6, + name: "time_elapsed_since_onboarding", + kind: "scalar", + T: 1, + opt: true + }, { + no: 7, + name: "first_after_waiting_period", + kind: "scalar", + T: 8, + opt: true + }, { + no: 8, + name: "configured_privacy_mode_for_settings", + kind: "scalar", + T: 8, + opt: true + }, { + no: 1, + name: "privacy", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new VKe().fromBinary(e, t); + } + static fromJson(e, t) { + return new VKe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new VKe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(VKe, e, t); + } + }; + I$s = class HKe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.MarkPrivacyResponse"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new HKe().fromBinary(e, t); + } + static fromJson(e, t) { + return new HKe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new HKe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(HKe, e, t); + } + }; + D$s = class qKe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetEmailRequest"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new qKe().fromBinary(e, t); + } + static fromJson(e, t) { + return new qKe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new qKe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(qKe, e, t); + } + }; + T$s = class jKe extends N { + constructor(e) { + super(); + this.email = ""; + this.signUpType = CU.UNSPECIFIED; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetEmailResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "email", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "sign_up_type", + kind: "enum", + T: m.getEnumType(CU) + }]); + } + static fromBinary(e, t) { + return new jKe().fromBinary(e, t); + } + static fromJson(e, t) { + return new jKe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new jKe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(jKe, e, t); + } + }; + (function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.AUTH_0 = 1] = "AUTH_0"; + i[i.GITHUB = 2] = "GITHUB"; + i[i.GOOGLE = 3] = "GOOGLE"; + i[i.WORKOS = 4] = "WORKOS"; + })(CU ||= {}); + m.util.setEnumType(CU, "aiserver.v1.GetEmailResponse.SignUpType", [{ + no: 0, + name: "SIGN_UP_TYPE_UNSPECIFIED" + }, { + no: 1, + name: "SIGN_UP_TYPE_AUTH_0" + }, { + no: 2, + name: "SIGN_UP_TYPE_GITHUB" + }, { + no: 3, + name: "SIGN_UP_TYPE_GOOGLE" + }, { + no: 4, + name: "SIGN_UP_TYPE_WORKOS" + }]); + P$s = class zKe extends N { + constructor(e) { + super(); + this.email = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.EmailValidRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "email", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new zKe().fromBinary(e, t); + } + static fromJson(e, t) { + return new zKe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new zKe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(zKe, e, t); + } + }; + L$s = class JKe extends N { + constructor(e) { + super(); + this.valid = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.EmailValidResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "valid", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new JKe().fromBinary(e, t); + } + static fromJson(e, t) { + return new JKe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new JKe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(JKe, e, t); + } + }; + R$s = class GKe extends N { + constructor(e) { + super(); + this.machineId = ""; + this.applicationName = ""; + this.version = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.DownloadUpdateRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "machine_id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "application_name", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "version", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "platform", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new GKe().fromBinary(e, t); + } + static fromJson(e, t) { + return new GKe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new GKe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(GKe, e, t); + } + }; + N$s = class KKe extends N { + constructor(e) { + super(); + this.canDownload = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.DownloadUpdateResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "can_download", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new KKe().fromBinary(e, t); + } + static fromJson(e, t) { + return new KKe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new KKe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(KKe, e, t); + } + }; + M$s = class YKe extends N { + constructor(e) { + super(); + this.useTurbo = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SwitchCmdKFractionRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "use_turbo", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new YKe().fromBinary(e, t); + } + static fromJson(e, t) { + return new YKe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new YKe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(YKe, e, t); + } + }; + A$s = class XKe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SwitchCmdKFractionResponse"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new XKe().fromBinary(e, t); + } + static fromJson(e, t) { + return new XKe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new XKe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(XKe, e, t); + } + }; + $$s = class QKe extends N { + constructor(e) { + super(); + this.privacyModeEnabled = false; + this.machineIdentifier = ""; + this.newOnboardingDone = false; + this.newChangeManagementDone = false; + this.eligibleForSnippetLearning = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SetPrivacyModeRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "privacy_mode_enabled", + kind: "scalar", + T: 8 + }, { + no: 2, + name: "machine_identifier", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "new_onboarding_done", + kind: "scalar", + T: 8 + }, { + no: 4, + name: "new_change_management_done", + kind: "scalar", + T: 8 + }, { + no: 5, + name: "eligible_for_snippet_learning", + kind: "scalar", + T: 8 + }, { + no: 6, + name: "timestamp_of_onboarding", + kind: "scalar", + T: 3, + opt: true + }, { + no: 7, + name: "timestamp_of_change_management", + kind: "scalar", + T: 3, + opt: true + }]); + } + static fromBinary(e, t) { + return new QKe().fromBinary(e, t); + } + static fromJson(e, t) { + return new QKe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new QKe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(QKe, e, t); + } + }; + F$s = class ZKe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SetPrivacyModeResponse"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new ZKe().fromBinary(e, t); + } + static fromJson(e, t) { + return new ZKe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new ZKe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(ZKe, e, t); + } + }; + O$s = class eYe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ListJwtPublicKeysRequest"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new eYe().fromBinary(e, t); + } + static fromJson(e, t) { + return new eYe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new eYe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(eYe, e, t); + } + }; + _$s = class tYe extends N { + constructor(e) { + super(); + this.kid = ""; + this.publicKey = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.JwtPublicKey"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "kid", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "public_key", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new tYe().fromBinary(e, t); + } + static fromJson(e, t) { + return new tYe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new tYe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(tYe, e, t); + } + }; + B$s = class iYe extends N { + constructor(e) { + super(); + this.keys = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ListJwtPublicKeysResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "keys", + kind: "message", + T: _$s, + repeated: true + }]); + } + static fromBinary(e, t) { + return new iYe().fromBinary(e, t); + } + static fromJson(e, t) { + return new iYe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new iYe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(iYe, e, t); + } + }; + } +}); +var Vft; +var W$s = ue({ + "out-build/proto/aiserver/v1/auth_connectweb.js"() { + "use strict"; + + U$s(); + Hr(); + Vft = { + typeName: "aiserver.v1.AuthService", + methods: { + getEmail: { + name: "GetEmail", + I: D$s, + O: T$s, + kind: Ge.Unary + }, + emailValid: { + name: "EmailValid", + I: P$s, + O: L$s, + kind: Ge.Unary + }, + downloadUpdate: { + name: "DownloadUpdate", + I: R$s, + O: N$s, + kind: Ge.Unary + }, + markPrivacy: { + name: "MarkPrivacy", + I: E$s, + O: I$s, + kind: Ge.Unary + }, + switchCmdKFraction: { + name: "SwitchCmdKFraction", + I: M$s, + O: A$s, + kind: Ge.Unary + }, + getCustomerId: { + name: "GetCustomerId", + I: x$s, + O: k$s, + kind: Ge.Unary + }, + setPrivacyMode: { + name: "SetPrivacyMode", + I: $$s, + O: F$s, + kind: Ge.Unary + }, + getSessionToken: { + name: "GetSessionToken", + I: y$s, + O: w$s, + kind: Ge.Unary + }, + checkSessionToken: { + name: "CheckSessionToken", + I: C$s, + O: S$s, + kind: Ge.Unary + }, + listActiveSessions: { + name: "ListActiveSessions", + I: p$s, + O: m$s, + kind: Ge.Unary + }, + revokeSession: { + name: "RevokeSession", + I: b$s, + O: v$s, + kind: Ge.Unary + }, + listJwtPublicKeys: { + name: "ListJwtPublicKeys", + I: O$s, + O: B$s, + kind: Ge.Unary + } + } + }; + } +}); +var Wn; +var Rr = ue({ + "out-build/vs/workbench/services/environment/common/environmentService.js"() { + "use strict"; + + te(); + Aa(); + Wn = pa; + } +}); +function Hft(i) { + switch (i) { + case "win32-x64": + return "Windows 64 bit"; + case "win32-arm64": + return "Windows ARM"; + case "linux-x64": + return "Linux 64 bit"; + case "linux-arm64": + return "Linux ARM 64"; + case "linux-armhf": + return "Linux ARM"; + case "alpine-x64": + return "Alpine Linux 64 bit"; + case "alpine-arm64": + return "Alpine ARM 64"; + case "darwin-x64": + return "Mac"; + case "darwin-arm64": + return "Mac Silicon"; + case "web": + return "Web"; + case "universal": + return "universal"; + case "unknown": + return "unknown"; + case "undefined": + return "undefined"; + } +} +function krr(i) { + switch (i) { + case "win32-x64": + return "win32-x64"; + case "win32-arm64": + return "win32-arm64"; + case "linux-x64": + return "linux-x64"; + case "linux-arm64": + return "linux-arm64"; + case "linux-armhf": + return "linux-armhf"; + case "alpine-x64": + return "alpine-x64"; + case "alpine-arm64": + return "alpine-arm64"; + case "darwin-x64": + return "darwin-x64"; + case "darwin-arm64": + return "darwin-arm64"; + case "web": + return "web"; + case "universal": + return "universal"; + default: + return "unknown"; + } +} +function V$s(i, e) { + switch (i) { + case 3: + if (e === "x64") { + return "win32-x64"; + } else if (e === "arm64") { + return "win32-arm64"; + } else { + return "unknown"; + } + case 2: + if (e === "x64") { + return "linux-x64"; + } else if (e === "arm64") { + return "linux-arm64"; + } else if (e === "arm") { + return "linux-armhf"; + } else { + return "unknown"; + } + case "alpine": + if (e === "x64") { + return "alpine-x64"; + } else if (e === "arm64") { + return "alpine-arm64"; + } else { + return "unknown"; + } + case 1: + if (e === "x64") { + return "darwin-x64"; + } else if (e === "arm64") { + return "darwin-arm64"; + } else { + return "unknown"; + } + case 0: + return "web"; + } +} +function ewe(i, e) { + return e === "web" && !i.includes("web"); +} +function qft(i, e, t) { + if (ewe(e, t)) { + return false; + } else if (i === "undefined" || i === "universal") { + return true; + } else if (i === "unknown") { + return false; + } else { + return i === t; + } +} +function Err(i) { + return i && typeof i == "object" && typeof i.id == "string" && (!i.uuid || typeof i.uuid == "string"); +} +async function H$s(i, e) { + const t = await e.resolve(i); + if (t.children) { + return (await Promise.all(t.children.map(n => H$s(n.resource, e)))).reduce((n, r) => n + r, 0); + } else { + return t.size ?? 0; + } +} +var SU; +var twe; +var IKt; +var _J; +var BJ; +var DKt; +var q$s; +var j$s; +var z$s; +var J$s; +var G$s; +var K$s; +var vh; +var Y$s; +var Vse; +var X$s; +var TKt; +var ey; +var Sd; +var C5; +var PKt; +var UJ; +var jft; +var gS; +var Zg; +var LKt; +var RKt; +var Hse; +var Cl = ue({ + "out-build/vs/platform/extensionManagement/common/extensionManagement.js"() { + "use strict"; + + X(); + te(); + SU = "^([a-z0-9A-Z][a-z0-9-A-Z]*)\\.([a-z0-9A-Z][a-z0-9-A-Z]*)$"; + twe = new RegExp(SU); + IKt = "__web_extension"; + _J = "skipWalkthrough"; + BJ = "extensionInstallSource"; + DKt = "dependecyOrPackExtensionInstall"; + q$s = "clientTargetPlatform"; + (function (i) { + i.COMMAND = "command"; + i.SETTINGS_SYNC = "settingsSync"; + })(j$s ||= {}); + (function (i) { + i[i.NoneOrRelevance = 0] = "NoneOrRelevance"; + i[i.LastUpdatedDate = 1] = "LastUpdatedDate"; + i[i.Title = 2] = "Title"; + i[i.PublisherName = 3] = "PublisherName"; + i[i.InstallCount = 4] = "InstallCount"; + i[i.PublishedDate = 10] = "PublishedDate"; + i[i.AverageRating = 6] = "AverageRating"; + i[i.WeightedRating = 12] = "WeightedRating"; + })(z$s ||= {}); + (function (i) { + i[i.Default = 0] = "Default"; + i[i.Ascending = 1] = "Ascending"; + i[i.Descending = 2] = "Descending"; + })(J$s ||= {}); + (function (i) { + i.Install = "install"; + i.Uninstall = "uninstall"; + })(G$s ||= {}); + (function (i) { + i[i.None = 1] = "None"; + i[i.Install = 2] = "Install"; + i[i.Update = 3] = "Update"; + i[i.Migrate = 4] = "Migrate"; + })(K$s ||= {}); + vh = Ve("extensionGalleryService"); + (function (i) { + i.Timeout = "Timeout"; + i.Cancelled = "Cancelled"; + i.Failed = "Failed"; + i.DownloadFailedWriting = "DownloadFailedWriting"; + i.Offline = "Offline"; + })(Y$s ||= {}); + Vse = class extends Error { + constructor(i, e) { + super(i); + this.code = e; + this.name = e; + } + }; + (function (i) { + i.Unsupported = "Unsupported"; + i.Deprecated = "Deprecated"; + i.Malicious = "Malicious"; + i.Incompatible = "Incompatible"; + i.IncompatibleApi = "IncompatibleApi"; + i.IncompatibleTargetPlatform = "IncompatibleTargetPlatform"; + i.ReleaseVersionNotFound = "ReleaseVersionNotFound"; + i.Invalid = "Invalid"; + i.Download = "Download"; + i.DownloadSignature = "DownloadSignature"; + i.DownloadFailedWriting = "DownloadFailedWriting"; + i.UpdateMetadata = "UpdateMetadata"; + i.Extract = "Extract"; + i.Scanning = "Scanning"; + i.ScanningExtension = "ScanningExtension"; + i.ReadUninstalled = "ReadUninstalled"; + i.UnsetUninstalled = "UnsetUninstalled"; + i.Delete = "Delete"; + i.Rename = "Rename"; + i.IntializeDefaultProfile = "IntializeDefaultProfile"; + i.AddToProfile = "AddToProfile"; + i.InstalledExtensionNotFound = "InstalledExtensionNotFound"; + i.PostInstall = "PostInstall"; + i.CorruptZip = "CorruptZip"; + i.IncompleteZip = "IncompleteZip"; + i.PackageNotSigned = "PackageNotSigned"; + i.SignatureVerificationInternal = "SignatureVerificationInternal"; + i.SignatureVerificationFailed = "SignatureVerificationFailed"; + i.NotAllowed = "NotAllowed"; + i.Gallery = "Gallery"; + i.Cancelled = "Cancelled"; + i.Unknown = "Unknown"; + i.Internal = "Internal"; + })(X$s ||= {}); + (function (i) { + i.NotSigned = "NotSigned"; + i.Success = "Success"; + i.RequiredArgumentMissing = "RequiredArgumentMissing"; + i.InvalidArgument = "InvalidArgument"; + i.PackageIsUnreadable = "PackageIsUnreadable"; + i.UnhandledException = "UnhandledException"; + i.SignatureManifestIsMissing = "SignatureManifestIsMissing"; + i.SignatureManifestIsUnreadable = "SignatureManifestIsUnreadable"; + i.SignatureIsMissing = "SignatureIsMissing"; + i.SignatureIsUnreadable = "SignatureIsUnreadable"; + i.CertificateIsUnreadable = "CertificateIsUnreadable"; + i.SignatureArchiveIsUnreadable = "SignatureArchiveIsUnreadable"; + i.FileAlreadyExists = "FileAlreadyExists"; + i.SignatureArchiveIsInvalidZip = "SignatureArchiveIsInvalidZip"; + i.SignatureArchiveHasSameSignatureFile = "SignatureArchiveHasSameSignatureFile"; + i.PackageIntegrityCheckFailed = "PackageIntegrityCheckFailed"; + i.SignatureIsInvalid = "SignatureIsInvalid"; + i.SignatureManifestIsInvalid = "SignatureManifestIsInvalid"; + i.SignatureIntegrityCheckFailed = "SignatureIntegrityCheckFailed"; + i.EntryIsMissing = "EntryIsMissing"; + i.EntryIsTampered = "EntryIsTampered"; + i.Untrusted = "Untrusted"; + i.CertificateRevoked = "CertificateRevoked"; + i.SignatureIsNotValid = "SignatureIsNotValid"; + i.UnknownError = "UnknownError"; + i.PackageIsInvalidZip = "PackageIsInvalidZip"; + i.SignatureArchiveHasTooManyEntries = "SignatureArchiveHasTooManyEntries"; + })(TKt ||= {}); + ey = class extends Error { + constructor(i, e) { + super(i); + this.code = e; + this.name = e; + } + }; + Sd = Ve("extensionManagementService"); + C5 = "extensionsIdentifiers/disabled"; + PKt = "extensionsIdentifiers/enabled"; + UJ = Ve("IGlobalExtensionEnablementService"); + jft = Ve("IExtensionTipsService"); + gS = Ve("IAllowedExtensionsService"); + Zg = W(1824, "Extensions"); + LKt = W(1825, "Preferences"); + RKt = "extensions.gallery.useUnpkgResourceApi"; + Hse = "extensions.allowed"; + } +}); +function Pa(i) { + return { + "X-Request-ID": i, + "X-Amzn-Trace-Id": `Root=${i}` + }; +} +function zft(i) { + return ![me.walkThrough, me.walkThroughSnippet, me.vscodeCustomEditor, me.vscodeNotebook, me.vscodeNotebookCell, me.vscodeNotebookCellMetadata, me.vscodeNotebookCellMetadataDiff, me.vscodeNotebookCellOutput, me.vscodeNotebookCellOutputDiff, me.vscodeNotebookMetadata, me.vscodeInteractiveInput, me.vscodeSettings, me.vscodeWorkspaceTrust, me.vscodeTerminal, me.vscodeChatCodeBlock, me.vscodeChatCodeCompareBlock, me.vscodeChatSesssion, me.webviewPanel, me.vscodeWebview, me.aiChat, me.notepad, me.contextObject, me.composer, me.aiSettings, me.tinderDiffEditor, me.bugbot, me.backgroundComposer, me.mailto, me.commentsInput, me.outputChannel].includes(i); +} +var Sm = ue({ + "out-build/vs/workbench/services/ai/browser/utils.js"() { + "use strict"; + + At(); + } +}); +function iwe(i, e) { + let t; + return (...n) => { + clearTimeout(t); + t = setTimeout(() => i(...n), e); + }; +} +function Q$s(i, e) { + let t; + let s = -(e + 1); + return (...r) => { + if (performance.now() - s > e) { + clearTimeout(t); + i(...r); + s = performance.now(); + } else { + clearTimeout(t); + const o = Math.max(e - (performance.now() - s), 0); + t = setTimeout(() => { + i(...r); + s = performance.now(); + }, o); + } + }; +} +function Irr(i, e, t) { + const s = {}; + return (...r) => { + const o = e(...r); + clearTimeout(s[o]); + s[o] = setTimeout(() => i(...r), t); + }; +} +async function Drr(i, e) { + let t = 0; + let s = e.initialRetryTimeMs; + while (t < e.maxNumberOfRetries) { + try { + return await i(); + } catch (n) { + t++; + if (t >= e.maxNumberOfRetries) { + throw n; + } + await new Promise(r => setTimeout(r, s)); + s *= 2; + } + } + throw new Error("Max retries reached"); +} +var Z$s; +var xU = ue({ + "out-build/vs/workbench/contrib/aiCpp/browser/cppDebouncingService.js"() { + "use strict"; + + Ps(); + Z$s = class { + constructor(i, e, t) { + this.b = i; + this.c = e; + this.d = t; + this.a = []; + } + setDebouncingDurations({ + clientDebounceDuration: i, + totalDebounceDuration: e + }) { + this.b = i; + this.c = e; + } + pruneOldRequests() { + const i = performance.now() + performance.timeOrigin; + const e = [...this.a.entries()].reverse(); + for (const [t, s] of e) { + if (i - s.startTime > this.d) { + this.a.splice(t, 1); + } + } + } + runRequest() { + this.pruneOldRequests(); + const i = performance.now() + performance.timeOrigin; + const e = Ft(); + const t = this.a.filter(n => n.startTime + this.c > i).map(n => n.requestId); + this.a.push({ + requestId: e, + startTime: i + }); + const s = new AbortController(); + return { + generationUUID: e, + startTime: i, + abortController: s, + requestIdsToCancel: t + }; + } + async shouldDebounce(i, e = false) { + const t = [...this.a]; + let s = -1; + for (const [l, c] of t.entries()) { + if (c.requestId === i) { + s = l; + } + } + if (s === -1) { + return false; + } + const n = performance.now() + performance.timeOrigin; + const r = t[s]; + const o = n - r.startTime; + if (o < this.b && !e) { + await new Promise(l => setTimeout(l, this.b - o)); + return await this.shouldDebounce(i, true); + } else if (s === t.length - 1) { + return false; + } else { + return t[s + 1].startTime - r.startTime < this.b; + } + } + }; + } +}); +var Jft; +var NKt = ue({ + "out-build/vs/platform/abuse/common/abuseService.js"() { + "use strict"; + + te(); + Jft = Ve("abuseService"); + } +}); +function swe(i) { + return i.scheme !== me.file && i.scheme !== me.vscodeRemote; +} +function kU(i) { + if (i.folders.length) { + if (i.folders.every(e => swe(e.uri))) { + return i.folders[0].uri; + } else { + return undefined; + } + } + if (i.configuration && swe(i.configuration)) { + return i.configuration; + } +} +function e2s(i) { + return kU(i)?.scheme; +} +function Trr(i) { + return kU(i)?.authority; +} +function qse(i) { + return kU(i) !== undefined; +} +var lD = ue({ + "out-build/vs/platform/workspace/common/virtualWorkspace.js"() { + "use strict"; + + At(); + } +}); +var al; +var sO; +var Wc = ue({ + "out-build/vs/workbench/services/remote/common/remoteAgentService.js"() { + "use strict"; + + te(); + nt(); + al = Ve("remoteAgentService"); + sO = new class { + constructor() { + this.maxSampleCount = 5; + this.sampleDelay = 2000; + this.initial = []; + this.maxInitialCount = 3; + this.average = []; + this.maxAverageCount = 100; + this.highLatencyMultiple = 2; + this.highLatencyMinThreshold = 500; + this.highLatencyMaxThreshold = 1500; + this.lastMeasurement = undefined; + } + get latency() { + return this.lastMeasurement; + } + async measure(i) { + let e = Infinity; + for (let s = 0; s < this.maxSampleCount; s++) { + const n = await i.getRoundTripTime(); + if (n === undefined) { + return; + } + e = Math.min(e, n / 2); + await Da(this.sampleDelay); + } + this.average.push(e); + if (this.average.length > this.maxAverageCount) { + this.average.shift(); + } + let t; + if (this.initial.length < this.maxInitialCount) { + this.initial.push(e); + } else { + t = this.initial.reduce((s, n) => s + n, 0) / this.initial.length; + } + this.lastMeasurement = { + initial: t, + current: e, + average: this.average.reduce((s, n) => s + n, 0) / this.average.length, + high: typeof t === "undefined" ? false : e > this.highLatencyMaxThreshold || e > this.highLatencyMinThreshold && e > t * this.highLatencyMultiple + }; + return this.lastMeasurement; + } + }(); + } +}); +var MKt; +var Au; +var Gft; +var ad = ue({ + "out-build/vs/workbench/services/path/common/pathService.js"() { + "use strict"; + + zb(); + At(); + pn(); + rt(); + Et(); + Le(); + te(); + lD(); + ii(); + Rr(); + Wc(); + Au = Ve("pathService"); + Gft = MKt = class { + constructor(e, t, s, n) { + this.d = e; + this.e = t; + this.f = s; + this.g = n; + this.a = (async () => (await this.e.getEnvironment())?.os || Ia)(); + this.b = (async () => { + const r = await this.e.getEnvironment(); + return this.c = r?.userHome ?? e; + })(); + } + hasValidBasename(e, t, s) { + if (typeof t == "string" || typeof t === "undefined") { + return this.a.then(n => this.h(e, n, t)); + } else { + return this.h(e, t, s); + } + } + h(e, t, s) { + if (e.scheme === me.file || e.scheme === me.vscodeRemote) { + return T4t(s ?? ji(e), t === 1); + } else { + return true; + } + } + get defaultUriScheme() { + return MKt.findDefaultUriScheme(this.f, this.g); + } + static findDefaultUriScheme(e, t) { + if (e.remoteAuthority) { + return me.vscodeRemote; + } + const s = e2s(t.getWorkspace()); + if (s) { + return s; + } + const n = t.getWorkspace().folders[0]; + if (n) { + return n.uri.scheme; + } + const r = t.getWorkspace().configuration; + if (r) { + return r.scheme; + } else { + return me.file; + } + } + userHome(e) { + if (e?.preferLocal) { + return this.d; + } else { + return this.b; + } + } + get resolvedUserHome() { + return this.c; + } + get path() { + return this.a.then(e => e === 1 ? Sh : ao); + } + async fileURI(e) { + let t = ""; + if ((await this.a) === 1) { + e = e.replace(/\\/g, "/"); + } + if (e[0] === "/" && e[1] === "/") { + const n = e.indexOf("/", 2); + if (n === -1) { + t = e.substring(2); + e = "/"; + } else { + t = e.substring(2, n); + e = e.substring(n) || "/"; + } + } + return V.from({ + scheme: me.file, + authority: t, + path: e, + query: "", + fragment: "" + }); + } + }; + Gft = MKt = __decorate([__param(1, al), __param(2, Wn), __param(3, kt)], Gft); + } +}); +var $u; +var AKt; +var WJ; +var Kft; +var Yft; +var $Kt; +var Xft; +var Qft; +var t2s; +var FKt; +var OKt; +var _Kt; +var cD; +var nwe; +var Zft; +var egt; +var i2s; +var sh = ue({ + "out-build/vs/workbench/services/cursorAuth/browser/authenticationService.js"() { + "use strict"; + + te(); + iO(); + It(); + gs(); + Ps(); + qt(); + nr(); + w5(); + Zt(); + ai(); + Cs(); + kKt(); + W$s(); + q(); + Wft(); + Rr(); + Cl(); + Sm(); + Je(); + pe(); + fr(); + U$s(); + kn(); + xc(); + Yw(); + xU(); + gKt(); + We(); + Pn(); + dc(); + NKt(); + Nt(); + Le(); + ad(); + ii(); + Wo(); + Wo(); + $l(); + $u = Ve("authenticationService"); + AKt = "cursorAuth/stripeCustomerId"; + WJ = "cursorAuth/stripeMembershipType"; + Kft = "cursorAuth/cachedEmail"; + Yft = "cursorAuth/cachedSignUpType"; + $Kt = "cursorai/donotchange/privacyMode"; + Xft = ["claude-3-opus-20240229", "claude-3-sonnet-20240229", "claude-3-haiku-20240307"]; + Qft = ["gemini-1.5-flash", "gemini-1.5-flash-8b"]; + t2s = ["gemini-1.5-preview"]; + FKt = ["us.anthropic.claude-3-5-sonnet-20241022-v2:0", "us.anthropic.claude-3-5-haiku-20241022-v1:0", "us.anthropic.claude-3-7-sonnet-20250219-v1:0"]; + OKt = i => Xft.includes(i) || i.startsWith("claude-"); + _Kt = i => Qft.includes(i) || i.startsWith("gemini-") && !t2s.includes(i); + (function (i) { + i.UNKNOWN = "unknown"; + i.AUTH_0 = "Auth_0"; + i.GOOGLE = "Google"; + i.GITHUB = "Github"; + })(cD ||= {}); + nwe = 4579200000; + Zft = class extends H { + constructor(e, t, s) { + super(); + this.a = e; + this.c = t; + this.f = s; + this.g = []; + this.h = []; + this.j = []; + this.m = []; + this.n = []; + this.q = new B(); + this.r = null; + this.onDidChangeSubscription = this.q.event; + this.s = undefined; + this.t = () => this.a.get("cursorAuth/refreshToken", -1); + this.u = () => this.s ? this.s : this.c.overrideCursorAuthToken ? this.c.overrideCursorAuthToken : this.a.get("cursorAuth/accessToken", -1); + this.w = () => this.a.get(WJ, -1); + this.membershipType = () => { + switch (this.w()) { + case zr.ENTERPRISE: + return zr.ENTERPRISE; + case zr.PRO: + return zr.PRO; + case zr.FREE_TRIAL: + return zr.FREE_TRIAL; + default: + return zr.FREE; + } + }; + this.openAIKey = () => this.a.get("cursorAuth/openAIKey", -1); + this.claudeKey = () => this.a.get("cursorAuth/claudeKey", -1); + this.googleKey = () => this.a.get("cursorAuth/googleKey", -1); + this.overrideAccessToken = n => { + this.s = n; + this.G(true); + }; + this.y = (n, r) => { + this.a.store("cursorAuth/refreshToken", r, -1, 1); + this.a.store("cursorAuth/accessToken", n, -1, 1); + const o = !!n && !!r; + for (const a of this.m) { + a(o); + } + if (o) { + const a = aee(n); + const l = new Date(a.exp * 1000); + const c = new Date(l.getTime() - nwe); + if (c.getTime() > Date.now()) { + setTimeout(() => { + this.refreshAccessToken(); + }, c.getTime() - Date.now()); + } + } + }; + this.z = (n, r) => { + this.a.store(Kft, n, -1, 1); + this.a.store(Yft, r, -1, 1); + }; + this.C = () => { + this.a.store(Kft, "", -1, 1); + this.a.store(Yft, cD.UNKNOWN, -1, 1); + }; + this.isTokenExpired = n => { + const r = aee(n); + return new Date(r.exp * 1000).getTime() < Date.now(); + }; + this.I = n => { + const r = this.membershipType(); + n = n ?? zr.FREE; + this.a.store(WJ, n, -1, 1); + if (r !== n) { + this.F(n, r); + this.q.fire(n); + } + }; + this.storeOpenAIKey = n => { + for (const r of this.g) { + r(n); + } + this.a.store("cursorAuth/openAIKey", n, -1, 1); + }; + this.storeClaudeKey = n => { + for (const r of this.h) { + r(n); + } + this.a.store("cursorAuth/claudeKey", n, -1, 1); + }; + this.storeGoogleKey = n => { + for (const r of this.j) { + r(n); + } + this.a.store("cursorAuth/googleKey", n, -1, 1); + }; + } + getApiKeyForModel(e) { + if (OKt(e) && this.f.applicationUserPersistentStorage.useClaudeKey) { + return this.claudeKey(); + } else if (_Kt(e) && this.f.applicationUserPersistentStorage.useGoogleKey) { + return this.googleKey(); + } else { + return this.openAIKey(); + } + } + getExpirationTime(e) { + return aee(e).exp * 1000; + } + isAlmostExpired(e) { + if (this.r === null || this.r.accessToken !== e || this.r.cacheExpiration < Date.now()) { + const s = this.getExpirationTime(e) - 300000; + if (Date.now() > s) { + this.r = null; + return true; + } else { + this.r = { + accessToken: e, + cacheExpiration: s + }; + return false; + } + } else { + return false; + } + } + addOpenAIKeyChangedListener(e) { + this.g.push(e); + } + addClaudeKeyChangedListener(e) { + this.h.push(e); + } + addGoogleKeyChangedListener(e) { + this.j.push(e); + } + addLoginChangedListener(e) { + this.m.push(e); + } + addSubscriptionChangedListener(e) { + this.n.push(e); + } + removeOpenAIKeyChangedListener(e) { + this.g = this.g.filter(t => t !== e); + } + removeClaudeKeyChangedListener(e) { + this.h = this.h.filter(t => t !== e); + } + removeGoogleKeyChangedListener(e) { + this.j = this.j.filter(t => t !== e); + } + removeLoginChangedListener(e) { + this.m = this.m.filter(t => t !== e); + } + removeSubscriptionChangedListener(e) { + this.n = this.n.filter(t => t !== e); + } + F(e, t) { + for (const s of this.n) { + s(e, t); + } + } + G(e) { + for (const t of this.m) { + t(e); + } + } + H(e) { + this.q.fire(e); + } + }; + Zft = __decorate([__param(0, ht), __param(1, Wn), __param(2, _i)], Zft); + egt = class extends Zft { + constructor(e, t, s, n, r, o, a, l, c, u, d, h, g, p, b, v) { + super(e, t, s); + this.fb = n; + this.gb = r; + this.hb = o; + this.ib = a; + this.jb = l; + this.kb = c; + this.lb = u; + this.mb = d; + this.nb = h; + this.ob = g; + this.pb = p; + this.qb = b; + this.rb = v; + this.N = () => {}; + this.O = () => {}; + this.P = () => {}; + this.U = () => true; + this.W = false; + this.X = () => {}; + this.Y = true; + this.Z = new B(); + this.onDidPotentiallyChangePrivacyMode = this.Z.event; + this.$ = new B(); + this.onDidChangeSnippetLearningEligibility = this.$.event; + this.db = 0; + this.eb = 15000; + this.getDaysRemainingOnTrial = async () => { + const C = await this.getAccessToken(); + if (C) { + return (await (await fetch(`${this.fb.getBackendUrl()}/auth/full_stripe_profile`, { + headers: { + Authorization: `Bearer ${C}`, + [nJ]: sJ(this.reactivePrivacyMode()), + [rJ]: (this.eligibleForSnippetLearning() && this.reactivePrivacyMode() === false).toString(), + [jq]: ZZ() + } + })).json()).daysRemainingOnTrial; + } else { + return undefined; + } + }; + this.logout = async () => { + try { + const C = await this.getAuthenticationHeader(); + if (C.Authorization) { + await fetch(`${this.fb.getBackendUrl()}/auth/logout`, { + method: "POST", + headers: { + ...C + } + }); + } + } catch (C) { + this.ib.error("Failed to call logout endpoint", C); + } + this.a.store("cursorAuth/refreshToken", null, -1, 1); + this.a.store("cursorAuth/accessToken", null, -1, 1); + this.a.store(AKt, null, -1, 1); + this.a.store(WJ, zr.FREE, -1, 1); + this.C(); + this.F(zr.FREE, zr.FREE); + this.H(zr.FREE); + this.G(false); + this.refreshMembershipType(); + await this.gb.open(`${this.fb.getLogoutUrl()}`, { + openExternal: true + }); + }; + this.debouncedRefetchIsTeamsPrivacyModeOn = Q$s(() => { + this.X(); + }, 30000); + this.writeOnboardingDate = C => { + this.a.store(cft, C.toISOString(), -1, 1); + }; + this.readOnboardingDate = () => { + const C = this.a.get(cft, -1); + if (C !== undefined) { + return new Date(C); + } + }; + this.sb = C => { + this.a.store(uft, C.toISOString(), -1, 1); + }; + this.tb = () => { + const C = this.a.get(uft, -1); + if (C !== undefined) { + return new Date(C); + } + }; + this.ub = () => { + const S = this.tb(); + if (S === undefined) { + return false; + } else { + return S.getTime() + 86400000 < Date.now(); + } + }; + this.vb = () => { + if (this.ub()) { + this.f.setApplicationUserPersistentStorage("eligibleForSnippetLearning", true); + } + }; + this.wb = () => { + const C = this.a.get(SGt, 1); + if (C === undefined) { + const k = new Date(); + this.a.store(SGt, k.toISOString(), 1, 1); + return; + } + const S = new Date(C); + const x = 7200000; + if (S.getTime() + x < Date.now()) { + this.f.setWorkspaceUserPersistentStorage("eligibleForSnippetLearning", true); + } + }; + this.submitNewChangeManagement = () => { + this.f.setApplicationUserPersistentStorage("goneThroughCodeSnippetChangeManagement", true); + this.sb(new Date()); + }; + this.submitNewOnboarding = () => { + this.f.setApplicationUserPersistentStorage("eligibleForSnippetLearning", true); + this.f.setApplicationUserPersistentStorage("goneThroughCodeSnippetOnboarding", true); + this.writeOnboardingDate(new Date()); + }; + this.xb = () => { + this.Ab(); + this.vb(); + this.wb(); + this.sendPrivacySettings(); + }; + this.yb = () => { + let C = this.readOnboardingDate(); + if (C === undefined) { + if (this.f.applicationUserPersistentStorage.eligibleForSnippetLearning) { + C = new Date(); + this.writeOnboardingDate(C); + } else { + return; + } + } + const S = new Date(C); + return Date.now() - S.getTime(); + }; + this.zb = () => { + const S = this.yb(); + if (S === undefined) { + return false; + } else { + return S > 86400000; + } + }; + this.Ab = () => { + if (this.zb()) { + if (this.f.applicationUserPersistentStorage.eligibleForSnippetLearning) { + this.f.setApplicationUserPersistentStorage("enoughTimeElapsedSinceOnboarding", true); + } + if (this.f.applicationUserPersistentStorage.noStorageMode === undefined) { + this.f.setApplicationUserPersistentStorage("noStorageMode", false); + } + } + }; + this.eligibleForSnippetLearning = () => this.f.applicationUserPersistentStorage.eligibleForSnippetLearning && this.f.workspaceUserPersistentStorage.eligibleForSnippetLearning && this.f.applicationUserPersistentStorage.enoughTimeElapsedSinceOnboarding === true; + this.noStorageModeEnabledOrTooCloseToOnboarding = () => { + this.Ab(); + const C = this.f.applicationUserPersistentStorage.noStorageMode; + if (this.f.applicationUserPersistentStorage.enoughTimeElapsedSinceOnboarding !== true && this.f.applicationUserPersistentStorage.eligibleForSnippetLearning) { + return true; + } else if (C !== undefined) { + return C; + } else { + return true; + } + }; + this.hasEnabledCodebaseLearning = () => this.reactivePrivacyMode() === false && this.eligibleForSnippetLearning(); + this.inPreDataCollectionPeriodForSettings = () => this.f.applicationUserPersistentStorage.enoughTimeElapsedSinceOnboarding !== true && this.f.applicationUserPersistentStorage.eligibleForSnippetLearning; + this.configuredPrivacyModeForSettings_DO_NOT_USE_UNLESS_YOU_KNOW_WHAT_YOU_ARE_DOING = () => { + const C = this.f.applicationUserPersistentStorage.noStorageMode ?? false; + if (this.reactiveMembershipType() === zr.ENTERPRISE) { + if (this.belongsToDevTeam()) { + return false; + } else if (this.shouldHaveGhostModeFromEnterprise()) { + return true; + } else if (this.W) { + return false; + } else { + return C; + } + } else { + return C; + } + }; + this.getTeamId = () => (this.f.applicationUserPersistentStorage.aiSettings.teamIds ?? [])[0]; + this.Bb = false; + this.Cb = iwe(async () => { + El(async () => { + if (!this.Bb) { + this.Bb = true; + try { + await Drr(async () => { + const C = await this.authClient(); + if (this.u() === undefined) { + throw new Error("No access token"); + } + { + let S = false; + if (this.f.applicationUserPersistentStorage.hasSentMarkPrivacyAfterWaitingPeriod !== true && this.f.applicationUserPersistentStorage.enoughTimeElapsedSinceOnboarding) { + S = true; + this.f.setApplicationUserPersistentStorage("hasSentMarkPrivacyAfterWaitingPeriod", true); + } + await C.markPrivacy({ + currentPrivacyMode: this.reactivePrivacyMode(), + onboardingPrivacyMode: this.f.applicationUserPersistentStorage.selectedPrivacyForOnboarding, + isUsingCurrentAndOnboardingFormat: true, + onboardingDataPrivacyVersion: this.f.applicationUserPersistentStorage.onboardingDataPrivacyVersion, + timeElapsedSinceOnboarding: this.yb(), + firstAfterWaitingPeriod: S, + configuredPrivacyModeForSettings: this.configuredPrivacyModeForSettings_DO_NOT_USE_UNLESS_YOU_KNOW_WHAT_YOU_ARE_DOING() + }); + } + }, { + initialRetryTimeMs: 3000, + maxNumberOfRetries: 5 + }); + } catch (C) { + console.error(C); + } finally { + this.Bb = false; + } + } + }); + }, 20000); + this.Ib = false; + this.refreshAccessToken = async (C = false) => { + if (this.Ib) { + return; + } + this.Ib = true; + let S; + try { + const x = this.u(); + if (x && !C && new Date(aee(x).exp * 1000).getTime() - Date.now() > nwe) { + return; + } + const k = this.t(); + if (k) { + const E = new AbortController(); + S = setTimeout(() => E.abort(), 20000); + const D = { + method: "POST", + headers: { + "content-type": "application/json" + }, + body: JSON.stringify({ + grant_type: "refresh_token", + client_id: this.fb.getCredentials().authClientId, + refresh_token: k + }), + signal: E.signal + }; + const P = `${this.fb.getCredentials().backendUrl}/oauth/token`; + const R = await fetch(P, D); + clearTimeout(S); + if (R instanceof Error) { + throw new Error("Failed to refresh access token"); + } + console.log("successfully refreshed access token!"); + const L = await R.json(); + if (L.shouldLogout === true) { + this.logout(); + } else { + this.y(L.access_token, L.access_token); + } + } + } catch (x) { + console.error(x); + } finally { + this.Ib = false; + if (S) { + clearTimeout(S); + } + } + }; + this.getDidUserLastPaymentFailed = async () => { + const C = await this.getAccessToken(); + return await (await fetch(`${this.fb.getBackendUrl()}/auth/last_payment_failed`, { + headers: { + Authorization: `Bearer ${C}`, + [nJ]: sJ(this.reactivePrivacyMode()), + [rJ]: (this.eligibleForSnippetLearning() && this.reactivePrivacyMode() === false).toString(), + [jq]: ZZ() + } + })).json(); + }; + this.refreshMembershipType = async () => { + const C = this.u(); + if (!C) { + this.I(zr.FREE); + if (this.f.applicationUserPersistentStorage.aiSettings.teamIds?.length !== 0) { + this.f.setApplicationUserPersistentStorage("aiSettings", "teamIds", []); + } + this.f.setApplicationUserPersistentStorage("hasBedrockIamRole", false); + return; + } + const S = await this.getTeams(); + if (S.some(k => k.hasBilling && k.seats > 0)) { + const k = this.f.applicationUserPersistentStorage.aiSettings.teamIds || []; + if (k.length !== S.length || k.some(D => !S.some(P => P.id === D))) { + this.f.setApplicationUserPersistentStorage("aiSettings", "teamIds", S.map(D => D.id)); + } + this.I(zr.ENTERPRISE); + if (S.some(D => D.bedrockIamRole !== null && D.bedrockIamRole !== "")) { + this.f.setApplicationUserPersistentStorage("hasBedrockIamRole", true); + this.f.setApplicationUserPersistentStorage("bedrockState", { + accessKey: "iam", + secretKey: "iam", + region: "us-east-2", + useBedrock: false, + ...this.f.applicationUserPersistentStorage.bedrockState + }); + } else { + this.f.setApplicationUserPersistentStorage("hasBedrockIamRole", false); + } + El(() => { + this.Z.fire(this.reactivePrivacyMode()); + }); + return; + } else if (this.f.applicationUserPersistentStorage.aiSettings.teamIds?.length !== 0) { + this.f.setApplicationUserPersistentStorage("aiSettings", "teamIds", []); + this.f.setApplicationUserPersistentStorage("hasBedrockIamRole", false); + } + let x; + try { + const k = await fetch(`${this.fb.getBackendUrl()}/auth/full_stripe_profile`, { + headers: { + Authorization: `Bearer ${C}`, + [nJ]: sJ(this.reactivePrivacyMode()), + [rJ]: (this.eligibleForSnippetLearning() && this.reactivePrivacyMode() === false).toString(), + [jq]: ZZ() + } + }); + if (k.status === 404) { + throw new Error("404 Not found"); + } + x = await k.json(); + } catch { + const E = await fetch(`${this.fb.getBackendUrl()}/auth/stripe_profile`, { + headers: { + Authorization: `Bearer ${C}`, + [nJ]: sJ(this.reactivePrivacyMode()), + [rJ]: (this.eligibleForSnippetLearning() && this.reactivePrivacyMode() === false).toString(), + [jq]: ZZ() + } + }).then(D => D.json()); + if (E && typeof E == "string") { + x = { + membershipType: zr.PRO, + paymentId: E + }; + } else { + x = undefined; + } + } + if (x !== undefined) { + this.I(x.membershipType); + } else { + this.I(zr.FREE); + } + }; + this.Kb = ae(0); + this.reactiveMembershipType = () => { + const C = this.Kb[0](); + return this.membershipType(); + }; + this.getHoursLeftInPreSnippetLearningPeriod = () => { + const S = this.readOnboardingDate(); + if (!S) { + return 24; + } + const x = S.getTime() + 86400000; + const k = Date.now(); + if (k >= x) { + return 0; + } + const E = x - k; + return Math.ceil(E / 3600000); + }; + this.S = this.D(this.f.createScoped(this)); + this.ob.getMachineId().then(C => this.ab = C).catch(() => {}); + this.ob.getMacMachineId().then(C => this.bb = C).catch(() => {}); + this.J = new Q(); + this.D(this.J); + this.f.setApplicationUserPersistentStorage("membershipType", this.membershipType()); + this.a.onDidChangeValue(-1, WJ, this.J)(() => { + this.f.setApplicationUserPersistentStorage("membershipType", this.a.get(WJ, -1)); + }); + this.S.onChangeEffect({ + deps: [() => this.reactivePrivacyMode()], + onChange: ({ + deps: C + }) => { + this.W = false; + this.Z.fire(C[0]); + }, + runNowToo: true + }); + this.S.onChangeEffect({ + deps: [() => this.eligibleForSnippetLearning()], + onChange: ({ + deps: [C] + }) => { + this.$.fire(C); + }, + runNowToo: true + }); + this.kb.registerBearerTokenProvider(() => this.getAccessToken()); + this.hb.registerHandler({ + handleURL: async (C, S) => { + if ((C.scheme === "control" || C.scheme === "cursor") && C.authority === "cursorAuth") { + const x = C.query; + const k = new URLSearchParams(x); + this.Eb(k); + return true; + } + return false; + } + }); + this.Q = this.lb.createInstance(Uf, { + service: Qye + }); + this.R = this.lb.createInstance(Uf, { + service: Vft + }); + this.addLoginChangedListener(C => { + this.Q.createServer(); + this.R.createServer(); + if (C) { + const S = this.u(); + if (S) { + const x = this.getAuthIdFromToken(S); + this.jb.registerAuthId(x); + return; + } + } + this.jb.registerAuthId(undefined); + }); + const y = this.u(); + if (y) { + const C = this.getAuthIdFromToken(y); + this.jb.registerAuthId(C); + } else { + this.jb.registerAuthId(undefined); + } + this.D(this.mb.onDidChangeTransport(() => { + this.sendPrivacySettings().catch(console.error); + })); + this.reconcilePrivacyMode(); + this.S.onChangeEffect({ + deps: [() => this.reactivePrivacyMode()], + onChange: ({ + deps: C + }) => { + this.sendPrivacySettings().catch(console.error); + try { + this.a.store($Kt, sJ(this.reactivePrivacyMode()), -1, 0); + } catch (S) { + console.error(S); + } + } + }); + this.xb(); + xt.setInterval(() => { + this.xb(); + }, 14400000); + const w = this.S.createImplicitResource({ + depFn: () => this.f.applicationUserPersistentStorage.aiSettings.teamIds, + produceFn: async C => { + let S; + try { + if (C === undefined || C.length === 0) { + this.Y = true; + return true; + } + const x = new AbortController(); + S = setTimeout(() => { + x.abort(); + }, 5000); + const k = await this.dashboardClient(); + return await Promise.allSettled(C.map(async D => await k.getTeamPrivacyModeForced(new vKt({ + teamId: D + }), { + headers: Pa(Ft()), + signal: x.signal + }).then(P => P.privacyModeForced))).then(D => { + if (D.filter(L => L.status === "fulfilled").length === 0) { + return this.Y; + } + const R = D.some(L => L.status === "fulfilled" && L.value); + this.Y = R; + return R; + }); + } finally { + if (S) { + clearTimeout(S); + } + El(() => { + this.Z.fire(this.reactivePrivacyMode()); + }); + this.W = true; + } + }, + initialValue: true + }); + this.U = w[0]; + this.X = w[1].refetch; + this.X(); + this.Lb(); + xt.setInterval(() => { + this.X(); + this.Lb(); + }, 300000); + this.L = new Promise((C, S) => { + this.N = C; + }); + this.refreshAuthentication(); + this.D(this.fb.onDidRequestRelogin(() => { + this.a.store("cursorAuth/refreshToken", null, -1, 1); + this.a.store("cursorAuth/accessToken", null, -1, 1); + this.a.store(AKt, null, -1, 1); + this.a.store(WJ, zr.FREE, -1, 1); + this.F(zr.FREE, zr.FREE); + this.H(zr.FREE); + this.G(false); + this.login(); + })); + this.D(this.onDidChangeSubscription(C => { + this.Kb[1](S => S + 1); + })); + this.D(this.rb.onDidChangeWorkspaceFolders(() => { + this.Ob().then(C => { + this.cb = C; + }); + })); + this.Ob().then(C => { + this.cb = C; + }); + setTimeout(() => { + this.getDidUserLastPaymentFailed().then(C => { + this.f.setNonPersistentStorage({ + ...this.f.nonPersistentStorage, + lastPaymentWasFailed: C + }); + }); + }, 1000); + } + reconcilePrivacyMode() { + try { + if (this.a.get($Kt, -1) === "true" && this.reactivePrivacyMode() !== true) { + this.f.setApplicationUserPersistentStorage("noStorageMode", true); + } + } catch (e) { + console.error(e); + } + } + shouldHaveGhostModeFromEnterprise() { + this.debouncedRefetchIsTeamsPrivacyModeOn(); + return this.U(); + } + async setServerRecordedPrivacyMode({ + privacyModeEnabled: e, + newOnboardingDone: t, + newChangeManagementDone: s, + eligibleForSnippetLearning: n, + timestampOfOnboarding: r, + timestampOfChangeManagement: o + }) { + await (await this.authClient()).setPrivacyMode({ + machineIdentifier: this.ab, + privacyModeEnabled: e, + newOnboardingDone: t, + newChangeManagementDone: s, + eligibleForSnippetLearning: n && e === false, + timestampOfOnboarding: r ? BigInt(r) : undefined, + timestampOfChangeManagement: o ? BigInt(o) : undefined + }); + } + belongsToDevTeam() { + const e = this.f.applicationUserPersistentStorage.aiSettings.teamIds; + if (e === undefined) { + return false; + } else { + return e.includes(1); + } + } + reactivePrivacyMode() { + const e = this.noStorageModeEnabledOrTooCloseToOnboarding(); + if (this.reactiveMembershipType() === zr.ENTERPRISE) { + if (this.belongsToDevTeam()) { + if (e !== false) { + this.f.setApplicationUserPersistentStorage("noStorageMode", false); + } + return false; + } else if (this.shouldHaveGhostModeFromEnterprise()) { + if (this.W) { + this.f.setApplicationUserPersistentStorage("noStorageMode", true); + } + return true; + } else if (this.W) { + return false; + } else { + return e; + } + } else if (e === undefined && this.a.get(Ffe, -1, "true") !== "true") { + this.f.setApplicationUserPersistentStorage("noStorageMode", true); + return true; + } else { + return e; + } + } + async refreshAuthService() { + this.R.createServer(); + this.Q.createServer(); + } + async dashboardClient() { + return await this.Q.get(); + } + async authClient() { + return await this.R.get(); + } + async getTeams() { + const e = await this.dashboardClient(); + try { + return (await e.getTeams(new yKt({}), { + headers: Pa(Ft()) + })).teams; + } catch (t) { + if ("rawMessage" in t && t.rawMessage.includes("404")) { + console.error("Using pre-teams backend"); + return []; + } + throw t; + } + } + async sendPrivacySettings() { + this.Cb(); + } + async getEmailAndSignUpType() { + const e = this.a.get(Kft, -1); + const t = this.a.get(Yft, -1); + if (e && e !== "" && t) { + const a = Object.values(cD).includes(t) ? t : cD.UNKNOWN; + return { + email: e, + signUpType: a + }; + } + const s = Ft(); + const r = await (await this.authClient()).getEmail({}, { + headers: Pa(s) + }); + let o = cD.UNKNOWN; + switch (r.signUpType) { + case CU.AUTH_0: + o = cD.AUTH_0; + break; + case CU.GOOGLE: + o = cD.GOOGLE; + break; + case CU.GITHUB: + o = cD.GITHUB; + break; + } + this.z(r.email, o); + return { + email: r.email, + signUpType: o + }; + } + Db() { + this.L = new Promise((e, t) => { + this.N = e; + }); + } + async Eb(e) { + switch (e.get("route")) { + case "login": + { + const s = e.get("refreshToken"); + const n = e.get("accessToken"); + if (s && n) { + this.y(n, s); + await this.refreshMembershipType(); + this.N(); + } + return; + } + case "pay": + await this.refreshAccessToken(); + this.N(); + return; + default: + return; + } + } + Fb(e) { + const t = Ii.wrap(e); + return ET(t, false, true); + } + async Gb(e) { + if (!crypto.subtle) { + throw new Error("'crypto.subtle' is not available so webviews will not work. This is likely because the editor is not running in a secure context (https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts)."); + } + const s = new TextEncoder().encode(e); + return await crypto.subtle.digest("sha-256", s); + } + Hb(e) { + this.jb.publicLogCapture("$identify_cursordelimiter_" + e); + } + async login(e = "login") { + this.Db(); + const t = new Uint8Array(32); + crypto.getRandomValues(t); + const s = this.Fb(t); + const n = this.Fb(new Uint8Array(await this.Gb(s))); + const r = Ft(); + if (e !== "dev" && e !== "dev-trial") { + await this.gb.open(`${this.fb.getLoginUrl()}?challenge=${n}&uuid=${r}&mode=${e}`, { + openExternal: true + }); + } + let o = 0; + this.O(); + this.ib.info("Starting polling for login"); + const a = xt.setInterval(async () => { + this.ib.info("Beginning of Login Poll"); + let l; + if (e === "dev") { + xt.clearInterval(a); + l = await fetch(`${this.f.applicationUserPersistentStorage.cursorCreds.backendUrl}/auth/cursor_dev_session_token`).catch(u => { + alert(`error: ${u}`); + throw u; + }); + } else if (e === "dev-trial") { + xt.clearInterval(a); + l = await fetch(`${this.f.applicationUserPersistentStorage.cursorCreds.backendUrl}/auth/cursor_dev_session_token?trial=true`).catch(u => { + alert(`error: ${u}`); + throw u; + }); + } else { + l = await fetch(`${this.fb.getPollingEndpoint()}?uuid=${r}&verifier=${s}`, { + headers: { + [nJ]: sJ(this.reactivePrivacyMode()), + [rJ]: (this.eligibleForSnippetLearning() && this.reactivePrivacyMode() === false).toString(), + [jq]: ZZ() + } + }); + } + this.ib.info("Got login result", l.status); + if (l.status == 404) { + return; + } + const c = await l.json(); + this.ib.info("Got login json", c); + if (c !== undefined) { + if (c.error !== undefined && (e === "dev" || e === "dev-trial")) { + alert(`error: ${JSON.stringify(c)}`); + } + if (c.authId) { + this.Hb(c.authId); + } + if (c.accessToken && c.refreshToken) { + this.y(c.accessToken, c.refreshToken); + await this.refreshMembershipType(); + this.N(); + xt.clearInterval(a); + } + } + o++; + if (o >= 30) { + xt.clearInterval(a); + } + }, 200); + this.O = () => { + xt.clearInterval(a); + }; + await Promise.race([new Promise(l => setTimeout(() => l(false), 180000))]); + xt.clearInterval(a); + this.Db(); + } + async pay() { + this.Db(); + await this.gb.open(this.fb.getCheckoutUrl(), { + openExternal: true + }); + this.P(); + const e = xt.setInterval(async () => { + await this.refreshAuthentication(); + if (this.membershipType() !== zr.FREE) { + xt.clearInterval(e); + } + }, 200); + this.P = () => { + xt.clearInterval(e); + }; + await Promise.race([new Promise(t => setTimeout(() => t(false), 180000))]); + xt.clearInterval(e); + this.Db(); + } + getAuthIdFromToken(e) { + try { + return aee(e).sub; + } catch { + return; + } + } + async signup() { + await this.login("signup"); + } + async settings() { + await this.gb.open(this.fb.getSettingsUrl(), { + openExternal: true + }); + } + async refreshAuthentication() { + if (!(await this.getAccessToken())) { + await this.refreshAccessToken(); + } + await this.refreshMembershipType(); + } + isAuthenticated() { + const e = this.u(); + const t = this.t(); + return !!this.Jb() && !!e && !!t; + } + Jb() { + const e = this.cb === undefined || this.cb !== undefined && !!this.f.applicationUserPersistentStorage.aiSettings.teamIds?.includes(this.cb); + if (e === false) { + const t = Date.now(); + if (t - this.db >= this.eb) { + this.db = t; + this.f.setNonPersistentStorage("showingErrorMetadata", { + case: "auth", + source: "other", + error: new QM({ + error: yo.NOT_LOGGED_IN, + isExpected: true, + details: { + title: "Not in Cursor Enterprise team", + detail: `This repository requires that you belong to the companies Cursor Enterprise account to use AI features. +Please ensure you are logged in to the correct account to continue`, + shouldShowImmediateError: true, + isRetryable: false, + showRequestId: false + } + }) + }); + } + } else if (this.f.nonPersistentStorage.showingErrorMetadata.case === "auth") { + this.f.setNonPersistentStorage("showingErrorMetadata", { + case: null, + error: undefined + }); + } + return e; + } + setCppSessionId(e) { + this.M = e; + } + async getAuthenticationHeader() { + const e = await this.getAccessToken(); + if (e) { + return { + Authorization: `Bearer ${e}` + }; + } else { + return {}; + } + } + async getAccessToken() { + const e = this.u(); + if (e === undefined) { + return; + } + const t = new Date(); + const s = aee(e); + const n = new Date(s.exp * 1000); + if (n.getTime() < t.getTime() + nwe) { + await this.refreshAccessToken(); + return this.u(); + } + { + const r = new Date(n.getTime() - nwe); + let o; + if (o) { + clearTimeout(o); + } + o = setTimeout(() => { + this.refreshAccessToken(); + }, Math.max(r.getTime() - t.getTime(), 0)); + } + return e; + } + setCommonHeaders(e) { + Wtr({ + req: e, + machineId: this.ab ?? this.jb.machineId, + macMachineId: this.bb ?? this.jb.macMachineId, + base64Fn: t => ET(Ii.wrap(t), false, true), + cursorVersion: this.nb.version, + privacyMode: this.reactivePrivacyMode(), + eligibleForSnippetLearning: this.eligibleForSnippetLearning(), + sessionId: this.M + }); + } + async adminBlocklistPath() { + const e = await this.qb.userHome(); + return V.joinPath(e, this.nb.dataFolderName, "blocklist"); + } + async adminUnifiedJsonBlocklistPath() { + const e = await this.qb.userHome(); + return V.joinPath(e, this.nb.dataFolderName, "unified_repo_list.json"); + } + async Lb() { + const e = this.f.applicationUserPersistentStorage.aiSettings.teamIds; + const t = await this.adminBlocklistPath(); + const s = await this.adminUnifiedJsonBlocklistPath(); + if (!e || e.length === 0) { + this.f.setApplicationUserPersistentStorage("teamBlockRepos", []); + this.f.setApplicationUserPersistentStorage("teamAllowRepos", []); + this.f.setApplicationUserPersistentStorage("teamBlocklist", []); + try { + await this.pb.del(t); + } catch {} + try { + await this.pb.del(s); + } catch {} + return; + } + try { + const n = await this.dashboardClient(); + const r = []; + const o = []; + for (const l of e) { + try { + const c = await n.getTeamRepos({ + teamId: l + }, { + headers: Pa(Ft()) + }); + o.push(...c.allowedRepos.map(u => ({ + ...u, + type: "ALLOW" + }))); + r.push(...c.repos.map(u => ({ + ...u, + type: "BLOCK" + }))); + } catch {} + } + const a = []; + if (r.length > 0) { + for (const l of r) { + for (const c of l.patterns) { + const u = this.Mb(this.Nb(l.url) ?? "", c.pattern); + a.push(u); + } + } + } + if (o.length > 0) { + a.push("**"); + } + await this.pb.writeFile(t, Ii.fromString(JSON.stringify(a))); + await this.pb.writeFile(s, Ii.fromString(JSON.stringify([...o, ...r]))); + this.f.setApplicationUserPersistentStorage("teamBlocklist", a); + this.f.setApplicationUserPersistentStorage("teamBlockRepos", r); + this.f.setApplicationUserPersistentStorage("teamAllowRepos", o); + } catch (n) { + this.ib.error("Failed to poll repo blocklist:", n); + } + } + Mb(e, t) { + t = t.trim(); + let s = ""; + if (t.startsWith("!")) { + t = t.slice(1); + s += "!"; + } + s += `**/${e}/${t}`; + return s; + } + Nb(e) { + try { + const t = e.match(/^git@[^:]+:([^/]+)\/([^/]+?)(\.git)?$/); + if (t) { + return t[2]; + } + const s = e.match(/^https?:\/\/[^/]+\/[^/]+\/([^/]+?)(\.git)?$/); + if (s) { + return s[1]; + } else { + return undefined; + } + } catch { + return; + } + } + async Ob() { + try { + const e = this.rb.getWorkspace().folders; + for (const t of e) { + const s = V.joinPath(t.uri, ".cursorteam"); + try { + const r = (await this.pb.readFile(s)).value.toString().trim(); + const o = parseInt(r, 10); + if (!isNaN(o)) { + return o; + } + } catch { + continue; + } + } + return; + } catch (e) { + this.ib.error("Error checking team file:", e); + return; + } + } + }; + egt = __decorate([__param(0, ht), __param(1, Wn), __param(2, _i), __param(3, SR), __param(4, os), __param(5, CR), __param(6, Bt), __param(7, Ot), __param(8, vh), __param(9, re), __param(10, zye), __param(11, ys), __param(12, Jft), __param(13, Ct), __param(14, Au), __param(15, kt)], egt); + it($u, egt, 1); + i2s = class extends se { + constructor() { + super({ + id: "cursorAuth.triggerTokenRefresh", + title: { + value: "Trigger Token Refresh", + original: "Trigger Token Refresh" + }, + f1: true + }); + } + run(i, e = true) { + i.get($u).refreshAccessToken(e); + } + }; + J(i2s); + } +}); +var Qw; +var BKt; +var s2s; +var UKt; +var WKt; +var n2s; +var VKt; +var tgt; +var qx = ue({ + "out-build/vs/workbench/contrib/aiServerConfigService/browser/aiServerConfigService.js"() { + "use strict"; + + Ift(); + rNs(); + eKt(); + pe(); + q(); + Je(); + It(); + te(); + Cs(); + xc(); + qt(); + bU(); + Yw(); + kh(); + sh(); + Sm(); + Ps(); + fn(); + Qw = Ve("aiServerConfigService"); + BKt = new XGt({ + maxConcurrentUploads: 50, + absoluteMaxNumberFiles: 100000, + maxFileRetries: 20, + syncConcurrency: 20, + autoIndexingMaxNumFiles: 10000, + indexingPeriodSeconds: 600, + defaultTeamPathEncryptionKey: Azt, + defaultUserPathEncryptionKey: Azt + }); + s2s = new zGt({ + enabled: false, + debounceTriggersMs: 1000, + waitBetweenTriggersMs: 10000, + preventTriggeringWhenLints: true + }); + UKt = "Chat context summarized. Start new chats for better results."; + WKt = new qye({ + indexingConfig: BKt, + bugConfigResponse: new Bse({ + bugBotV1: lv + }), + http2Config: Use.UNSPECIFIED + }); + n2s = 20000; + VKt = "cursorai/serverConfig"; + tgt = class extends H { + constructor(e, t, s, n) { + super(); + this.g = e; + this.h = t; + this.j = s; + this.m = n; + this.a = this.D(new B()); + this.onDidRefreshServerConfig = this.a.event; + this.lastRefreshedServerConfig = new Date(0); + [this.serverConfigStore, this.c] = yp(WKt); + this.b = this.h.createInstance(Uf, { + service: Dft + }); + this.s().catch(console.error); + this.n().catch(console.error); + this.D(this.onDidRefreshServerConfig(async () => { + this.j.store(VKt, this.cachedServerConfig.toJsonString(), -1, 1); + this.c(this.cachedServerConfig); + })); + this.f = async r => { + this.forceRefreshServerConfig().catch(console.error); + }; + this.m.addLoginChangedListener(this.f); + } + dispose() { + super.dispose(); + this.m.removeLoginChangedListener(this.f); + } + get cachedServerConfig() { + return this.serverConfigStore; + } + async n() { + this.lastRefreshedServerConfig = new Date(Date.now() - 300000 + 10000); + this.q(); + } + q() { + setTimeout(() => { + if (this.lastRefreshedServerConfig.getTime() + 300000 < Date.now()) { + this.lastRefreshedServerConfig = new Date(); + this.forceRefreshServerConfig().catch(console.error); + } + this.q(); + }, Math.min(30000, 300000 - (Date.now() - this.lastRefreshedServerConfig.getTime()))); + } + r(e) { + const t = e ?? WKt; + this.c(new qye({ + ...t, + indexingConfig: t.indexingConfig ?? BKt, + bugConfigResponse: new Bse({ + ...t.bugConfigResponse, + linterStrategyV2: t.bugConfigResponse?.linterStrategyV2 ?? s2s + }), + chatConfig: new QGt({ + ...t.chatConfig, + maxRuleLength: t.chatConfig?.maxRuleLength ? t.chatConfig?.maxRuleLength : n2s, + summarizationMessage: t.chatConfig?.summarizationMessage ?? UKt + }) + })); + this.a.fire(); + } + async s() { + try { + const e = this.j.get(VKt, -1); + if (e) { + this.r(qye.fromJsonString(e)); + } + } catch (e) { + console.error("Failed to refresh server config from disk:", e); + } + } + async forceRefreshServerConfig(e) { + this.lastRefreshedServerConfig = new Date(); + const t = await this.b.get(); + const s = new AbortController(); + const n = setTimeout(() => s.abort(), 30000); + const r = this.g.nonPersistentStorage.canWeTrackTelem ?? false; + try { + const o = await t.getServerConfig({ + telemEnabled: r, + bugBotDismissedNotificationLast10TimesUnixMs: this.g.applicationUserPersistentStorage.bugbotState.bugBotDismissedNotificationLast10Times, + bugBotViewedNotificationLast10TimesUnixMs: this.g.applicationUserPersistentStorage.bugbotState.bugBotViewedNotificationLast10Times + }, { + signal: s.signal, + headers: Pa(e?.requestId ?? Ft()) + }); + this.r(o); + } catch (o) { + console.error("Failed to refresh server config from server:", o); + if (e?.rethrow) { + throw o; + } + } finally { + clearTimeout(n); + } + } + }; + tgt = __decorate([__param(0, _i), __param(1, re), __param(2, ht), __param(3, $u)], tgt); + it(Qw, tgt, 1); + J(class extends se { + constructor() { + super({ + id: Tzt.GetCachedServerConfig, + title: { + original: "Get Cached Server Config", + value: "Get Cached Server Config" + }, + f1: false + }); + } + run(i) { + return i.get(Qw).cachedServerConfig; + } + }); + J(class extends se { + constructor() { + super({ + id: "aiServerConfigService.forceRefresh", + title: { + original: "Force Refresh Server Config", + value: "Force Refresh Server Config" + }, + f1: true, + category: "Developer" + }); + } + run(i, ...e) { + const t = i.get(Js); + const s = Ft(); + i.get(Qw).forceRefreshServerConfig({ + requestId: s, + rethrow: true + }).then(() => { + t.info("Server config refreshed", `Request ID: ${s}`); + }).catch(n => { + t.error("Failed to refresh server config", `Request ID: ${s} +Error: ${n.message}`); + }); + } + }); + } +}); +function rwe(i) { + if (i.scheme === me.vscodeRemote) { + return i.authority; + } else { + return undefined; + } +} +function uD(i) { + if (!i) { + return; + } + const e = i.indexOf("+"); + if (e < 0) { + return i; + } else { + return i.substr(0, e); + } +} +function Prr(i) { + const { + host: e, + port: t + } = Lrr(i); + if (typeof t === "undefined") { + throw new Error(`Invalid remote authority: ${i}. It must either be a remote of form + or a remote host of form :.`); + } + return { + host: e, + port: t + }; +} +function Lrr(i) { + const e = i.match(/^(\[[0-9a-z:]+\]):(\d+)$/); + if (e) { + return { + host: e[1], + port: parseInt(e[2], 10) + }; + } + const t = i.match(/^(\[[0-9a-z:]+\])$/); + if (t) { + return { + host: t[1], + port: undefined + }; + } + const s = i.match(/(.*):(\d+)$/); + if (s) { + return { + host: s[1], + port: parseInt(s[2], 10) + }; + } else { + return { + host: i, + port: undefined + }; + } +} +var fA = ue({ + "out-build/vs/platform/remote/common/remoteHosts.js"() { + "use strict"; + + At(); + } +}); +function owe(i) { + if (typeof i == "object" && i !== null && i.supported !== true) { + return i.description; + } +} +function awe(i) { + return nO(i); +} +function nO(i) { + if (i.contributes && i.contributes.localizations) { + return i.contributes.localizations.length > 0; + } else { + return false; + } +} +function r2s(i) { + if (i.contributes && i.contributes.authentication) { + return i.contributes.authentication.length > 0; + } else { + return false; + } +} +function HKt(i, e) { + if (e) { + const t = `onResolveRemoteAuthority:${uD(e)}`; + return !!i.activationEvents?.includes(t); + } + return false; +} +function Rrr(i) { + return i.map(e => { + const [t, s] = e.split("@"); + return { + proposalName: t, + version: s ? parseInt(s) : undefined + }; + }); +} +function Nrr(i) { + return i.map(e => e.split("@")[0]); +} +var o2s; +var a2s; +var qKt; +var l2s; +var jse; +var c2s; +var u2s; +var $r; +var xR; +var Gm; +var d2s; +var Sl = ue({ + "out-build/vs/platform/extensions/common/extensions.js"() { + "use strict"; + + $i(); + te(); + fA(); + o2s = "extensions.user.cache"; + a2s = "extensions.builtin.cache"; + qKt = "undefined_publisher"; + l2s = ["ui", "workspace", "web"]; + jse = ["AI", "Azure", "Chat", "Data Science", "Debuggers", "Extension Packs", "Education", "Formatters", "Keymaps", "Language Packs", "Linters", "Machine Learning", "Notebooks", "Programming Languages", "SCM Providers", "Snippets", "Testing", "Themes", "Visualization", "Other"]; + (function (i) { + i[i.System = 0] = "System"; + i[i.User = 1] = "User"; + })(c2s ||= {}); + (function (i) { + i.WIN32_X64 = "win32-x64"; + i.WIN32_ARM64 = "win32-arm64"; + i.LINUX_X64 = "linux-x64"; + i.LINUX_ARM64 = "linux-arm64"; + i.LINUX_ARMHF = "linux-armhf"; + i.ALPINE_X64 = "alpine-x64"; + i.ALPINE_ARM64 = "alpine-arm64"; + i.DARWIN_X64 = "darwin-x64"; + i.DARWIN_ARM64 = "darwin-arm64"; + i.WEB = "web"; + i.UNIVERSAL = "universal"; + i.UNKNOWN = "unknown"; + i.UNDEFINED = "undefined"; + })(u2s ||= {}); + $r = class { + constructor(i) { + this.value = i; + this._lower = i.toLowerCase(); + } + static equals(i, e) { + if (typeof i === "undefined" || i === null) { + return typeof e === "undefined" || e === null; + } + if (typeof e === "undefined" || e === null) { + return false; + } + if (typeof i == "string" || typeof e == "string") { + const t = typeof i == "string" ? i : i.value; + const s = typeof e == "string" ? e : e.value; + return $c(t, s); + } + return i._lower === e._lower; + } + static toKey(i) { + if (typeof i == "string") { + return i.toLowerCase(); + } else { + return i._lower; + } + } + }; + xR = class { + get size() { + return this.c.size; + } + constructor(i) { + this.c = new Set(); + if (i) { + for (const e of i) { + this.add(e); + } + } + } + add(i) { + this.c.add($r.toKey(i)); + } + delete(i) { + return this.c.delete($r.toKey(i)); + } + has(i) { + return this.c.has($r.toKey(i)); + } + }; + Gm = class { + constructor() { + this.c = new Map(); + } + clear() { + this.c.clear(); + } + delete(i) { + this.c.delete($r.toKey(i)); + } + get(i) { + return this.c.get($r.toKey(i)); + } + has(i) { + return this.c.has($r.toKey(i)); + } + set(i, e) { + this.c.set($r.toKey(i), e); + } + values() { + return this.c.values(); + } + forEach(i) { + this.c.forEach(i); + } + [Symbol.iterator]() { + return this.c[Symbol.iterator](); + } + }; + d2s = Ve("IBuiltinExtensionsScannerService"); + } +}); +var jKt; +var Yy; +var h2s; +var kR = ue({ + "out-build/vs/editor/contrib/contextmenu/browser/contextmenu.js"() { + "use strict"; + + xe(); + zh(); + Fs(); + q(); + rt(); + en(); + Sr(); + X(); + Je(); + Ee(); + ks(); + Fi(); + Me(); + ii(); + Yy = class { + static { + jKt = this; + } + static { + this.ID = "editor.contrib.contextmenu"; + } + static get(e) { + return e.getContribution(jKt.ID); + } + constructor(e, t, s, n, r, o, a, l) { + this.d = t; + this.f = s; + this.g = n; + this.h = r; + this.i = o; + this.j = a; + this.k = l; + this.a = new Q(); + this.b = 0; + this.c = e; + this.a.add(this.c.onContextMenu(c => this.l(c))); + this.a.add(this.c.onMouseWheel(c => { + if (this.b > 0) { + const u = this.f.getContextViewElement(); + const d = c.srcElement; + if (!d.shadowRoot || Zq(u) !== d.shadowRoot) { + this.f.hideContextView(); + } + } + })); + this.a.add(this.c.onKeyDown(c => { + if (this.c.getOption(24) && c.keyCode === 58) { + c.preventDefault(); + c.stopPropagation(); + this.showContextMenu(); + } + })); + } + l(e) { + if (!this.c.hasModel()) { + return; + } + if (!this.c.getOption(24)) { + this.c.focus(); + if (e.target.position && !this.c.getSelection().containsPosition(e.target.position)) { + this.c.setPosition(e.target.position); + } + return; + } + if (e.target.type === 12 || e.target.type === 6 && e.target.detail.injectedText) { + return; + } + e.event.preventDefault(); + e.event.stopPropagation(); + if (e.target.type === 11) { + return this.o(e.event); + } + if (e.target.type !== 6 && e.target.type !== 7 && e.target.type !== 1) { + return; + } + this.c.focus(); + if (e.target.position) { + let s = false; + for (const n of this.c.getSelections()) { + if (n.containsPosition(e.target.position)) { + s = true; + break; + } + } + if (!s) { + this.c.setPosition(e.target.position); + } + } + let t = null; + if (e.target.type !== 1) { + t = e.event; + } + this.showContextMenu(t); + } + showContextMenu(e) { + if (!this.c.getOption(24) || !this.c.hasModel()) { + return; + } + const t = this.m(this.c.getModel(), this.c.contextMenuId); + if (t.length > 0) { + this.n(t, e); + } + } + m(e, t) { + const s = []; + const n = this.i.getMenuActions(t, this.g, { + arg: e.uri + }); + for (const r of n) { + const [, o] = r; + let a = 0; + for (const l of o) { + if (l instanceof vm) { + const c = this.m(e, l.item.submenu); + if (c.length > 0) { + s.push(new mg(l.id, l.label, c)); + a++; + } + } else { + s.push(l); + a++; + } + } + if (a) { + s.push(new gr()); + } + } + if (s.length) { + s.pop(); + } + return s; + } + n(e, t = null) { + if (!this.c.hasModel()) { + return; + } + const s = this.c.getOption(62); + this.c.updateOptions({ + hover: { + enabled: false + } + }); + let n = t; + if (!n) { + this.c.revealPosition(this.c.getPosition(), 1); + this.c.render(); + const o = this.c.getScrolledVisiblePosition(this.c.getPosition()); + const a = sd(this.c.getDomNode()); + const l = a.left + o.left; + const c = a.top + o.top + o.height; + n = { + x: l, + y: c + }; + } + const r = this.c.getOption(132) && !fp; + this.b++; + this.d.showContextMenu({ + domForShadowRoot: r ? this.c.getOverflowWidgetsDomNode() ?? this.c.getDomNode() : undefined, + getAnchor: () => n, + getActions: () => e, + getActionViewItem: o => { + const a = this.p(o); + if (a) { + return new $f(o, o, { + label: true, + keybinding: a.getLabel(), + isMenu: true + }); + } + const l = o; + if (typeof l.getActionViewItem == "function") { + return l.getActionViewItem(); + } else { + return new $f(o, o, { + icon: true, + label: true, + isMenu: true + }); + } + }, + getKeyBinding: o => this.p(o), + onHide: o => { + this.b--; + this.c.updateOptions({ + hover: s + }); + } + }); + } + o(e) { + if (!this.c.hasModel() || ZYn(this.k.getWorkspace())) { + return; + } + const t = this.c.getOption(74); + let s = 0; + const n = c => ({ + id: `menu-action-${++s}`, + label: c.label, + tooltip: "", + class: undefined, + enabled: typeof c.enabled === "undefined" ? true : c.enabled, + checked: c.checked, + run: c.run + }); + const r = (c, u) => new mg(`menu-action-${++s}`, c, u, undefined); + const o = (c, u, d, h, g) => { + if (!u) { + return n({ + label: c, + enabled: u, + run: () => {} + }); + } + const p = v => () => { + this.j.updateValue(d, v); + }; + const b = []; + for (const v of g) { + b.push(n({ + label: v.label, + checked: h === v.value, + run: p(v.value) + })); + } + return r(c, b); + }; + const a = []; + a.push(n({ + label: f(978, null), + checked: t.enabled, + run: () => { + this.j.updateValue("editor.minimap.enabled", !t.enabled); + } + })); + a.push(new gr()); + a.push(n({ + label: f(979, null), + enabled: t.enabled, + checked: t.renderCharacters, + run: () => { + this.j.updateValue("editor.minimap.renderCharacters", !t.renderCharacters); + } + })); + a.push(o(f(980, null), t.enabled, "editor.minimap.size", t.size, [{ + label: f(981, null), + value: "proportional" + }, { + label: f(982, null), + value: "fill" + }, { + label: f(983, null), + value: "fit" + }])); + a.push(o(f(984, null), t.enabled, "editor.minimap.showSlider", t.showSlider, [{ + label: f(985, null), + value: "mouseover" + }, { + label: f(986, null), + value: "always" + }])); + const l = this.c.getOption(132) && !fp; + this.b++; + this.d.showContextMenu({ + domForShadowRoot: l ? this.c.getDomNode() : undefined, + getAnchor: () => e, + getActions: () => a, + onHide: c => { + this.b--; + this.c.focus(); + } + }); + } + p(e) { + return this.h.lookupKeybinding(e.id); + } + dispose() { + if (this.b > 0) { + this.f.hideContextView(); + } + this.a.dispose(); + } + }; + Yy = jKt = __decorate([__param(1, ts), __param(2, Sc), __param(3, Ne), __param(4, oi), __param(5, Hn), __param(6, ve), __param(7, kt)], Yy); + h2s = class extends Es { + constructor() { + super({ + id: "editor.action.showContextMenu", + label: W(987, "Show Editor Context Menu"), + precondition: undefined, + kbOpts: { + kbExpr: ke.textInputFocus, + primary: 1092, + weight: 100 + } + }); + } + run(i, e) { + Yy.get(e)?.showContextMenu(); + } + }; + bo(Yy.ID, Yy, 2); + Oi(h2s); + } +}); +var jx; +var gA = ue({ + "out-build/vs/workbench/contrib/codeEditor/browser/menuPreventer.js"() { + "use strict"; + + q(); + en(); + jx = class extends H { + static { + this.ID = "editor.contrib.menuPreventer"; + } + constructor(i) { + super(); + this.a = i; + this.b = false; + this.c = false; + this.D(this.a.onMouseDown(e => { + if (this.b) { + this.c = true; + } + })); + this.D(this.a.onKeyDown(e => { + if (e.equals(512)) { + if (!this.b) { + this.c = false; + } + this.b = true; + } + })); + this.D(this.a.onKeyUp(e => { + if (e.equals(512)) { + if (this.c) { + e.preventDefault(); + } + this.b = false; + this.c = false; + } + })); + } + }; + bo(jx.ID, jx, 2); + } +}); +function f2s(i) { + for (let e = 0, t = i.length; e < t; e += 4) { + const s = i[e + 0]; + const n = i[e + 1]; + const r = i[e + 2]; + const o = i[e + 3]; + i[e + 0] = o; + i[e + 1] = r; + i[e + 2] = n; + i[e + 3] = s; + } +} +function Mrr(i) { + const e = new Uint8Array(i.buffer, i.byteOffset, i.length * 4); + if (!i4t()) { + f2s(e); + } + return Ii.wrap(e); +} +function Arr(i) { + const e = i.buffer; + if (!i4t()) { + f2s(e); + } + if (e.byteOffset % 4 === 0) { + return new Uint32Array(e.buffer, e.byteOffset, e.length / 4); + } + { + const t = new Uint8Array(e.byteLength); + t.set(e); + return new Uint32Array(t.buffer, t.byteOffset, t.length / 4); + } +} +function g2s(i) { + const e = new Uint32Array($rr(i)); + let t = 0; + e[t++] = i.id; + if (i.type === "full") { + e[t++] = 1; + e[t++] = i.data.length; + e.set(i.data, t); + t += i.data.length; + } else { + e[t++] = 2; + e[t++] = i.deltas.length; + for (const s of i.deltas) { + e[t++] = s.start; + e[t++] = s.deleteCount; + if (s.data) { + e[t++] = s.data.length; + e.set(s.data, t); + t += s.data.length; + } else { + e[t++] = 0; + } + } + } + return Mrr(e); +} +function $rr(i) { + let e = 0; + e += 2; + if (i.type === "full") { + e += 1 + i.data.length; + } else { + e += 1; + e += i.deltas.length * 3; + for (const t of i.deltas) { + if (t.data) { + e += t.data.length; + } + } + } + return e; +} +function p2s(i) { + const e = Arr(i); + let t = 0; + const s = e[t++]; + if (e[t++] === 1) { + const a = e[t++]; + const l = e.subarray(t, t + a); + t += a; + return { + id: s, + type: "full", + data: l + }; + } + const r = e[t++]; + const o = []; + for (let a = 0; a < r; a++) { + const l = e[t++]; + const c = e[t++]; + const u = e[t++]; + let d; + if (u > 0) { + d = e.subarray(t, t + u); + t += u; + } + o[a] = { + start: l, + deleteCount: c, + data: d + }; + } + return { + id: s, + type: "delta", + deltas: o + }; +} +var m2s; +var b2s = ue({ + "out-build/vs/editor/common/services/semanticTokensDto.js"() { + "use strict"; + + nr(); + rt(); + (function (i) { + i[i.Full = 1] = "Full"; + i[i.Delta = 2] = "Delta"; + })(m2s ||= {}); + } +}); +function igt(i) { + return i && !!i.data; +} +function v2s(i) { + return i && Array.isArray(i.edits); +} +function y2s(i, e) { + return i.has(e); +} +function Frr(i, e) { + const t = i.orderedGroups(e); + if (t.length > 0) { + return t[0]; + } else { + return []; + } +} +async function w2s(i, e, t, s, n) { + const r = Frr(i, e); + const o = await Promise.all(r.map(async a => { + let l; + let c = null; + try { + l = await a.provideDocumentSemanticTokens(e, a === t ? s : null, n); + } catch (u) { + c = u; + l = null; + } + if (!l || !igt(l) && !v2s(l)) { + l = null; + } + return new S2s(a, l, c); + })); + for (const a of o) { + if (a.error) { + throw a.error; + } + if (a.tokens) { + return a; + } + } + if (o.length > 0) { + return o[0]; + } else { + return null; + } +} +function Orr(i, e) { + const t = i.orderedGroups(e); + if (t.length > 0) { + return t[0]; + } else { + return null; + } +} +function _rr(i, e) { + return i.has(e); +} +function C2s(i, e) { + const t = i.orderedGroups(e); + if (t.length > 0) { + return t[0]; + } else { + return []; + } +} +async function zKt(i, e, t, s) { + const n = C2s(i, e); + const r = await Promise.all(n.map(async o => { + let a; + try { + a = await o.provideDocumentRangeSemanticTokens(e, t, s); + } catch (l) { + uh(l); + a = null; + } + if (!a || !igt(a)) { + a = null; + } + return new x2s(o, a); + })); + for (const o of r) { + if (o.tokens) { + return o; + } + } + if (r.length > 0) { + return r[0]; + } else { + return null; + } +} +var S2s; +var x2s; +var k2s = ue({ + "out-build/vs/editor/contrib/semanticTokens/common/getSemanticTokens.js"() { + "use strict"; + + ri(); + Ut(); + Le(); + Rn(); + Wt(); + zt(); + b2s(); + yt(); + Tr(); + S2s = class { + constructor(i, e, t) { + this.provider = i; + this.tokens = e; + this.error = t; + } + }; + x2s = class { + constructor(i, e) { + this.provider = i; + this.tokens = e; + } + }; + ei.registerCommand("_provideDocumentSemanticTokensLegend", async (i, ...e) => { + const [t] = e; + yr(t instanceof V); + const s = i.get($s).getModel(t); + if (!s) { + return; + } + const { + documentSemanticTokensProvider: n + } = i.get(nn); + const r = Orr(n, s); + if (r) { + return r[0].getLegend(); + } else { + return i.get(gt).executeCommand("_provideDocumentRangeSemanticTokensLegend", t); + } + }); + ei.registerCommand("_provideDocumentSemanticTokens", async (i, ...e) => { + const [t] = e; + yr(t instanceof V); + const s = i.get($s).getModel(t); + if (!s) { + return; + } + const { + documentSemanticTokensProvider: n + } = i.get(nn); + if (!y2s(n, s)) { + return i.get(gt).executeCommand("_provideDocumentRangeSemanticTokens", t, s.getFullModelRange()); + } + const r = await w2s(n, s, null, null, mt.None); + if (!r) { + return; + } + const { + provider: o, + tokens: a + } = r; + if (!a || !igt(a)) { + return; + } + const l = g2s({ + id: 0, + type: "full", + data: a.data + }); + if (a.resultId) { + o.releaseDocumentSemanticTokens(a.resultId); + } + return l; + }); + ei.registerCommand("_provideDocumentRangeSemanticTokensLegend", async (i, ...e) => { + const [t, s] = e; + yr(t instanceof V); + const n = i.get($s).getModel(t); + if (!n) { + return; + } + const { + documentRangeSemanticTokensProvider: r + } = i.get(nn); + const o = C2s(r, n); + if (o.length === 0) { + return; + } + if (o.length === 1) { + return o[0].getLegend(); + } + if (!s || !Z.isIRange(s)) { + console.warn("provideDocumentRangeSemanticTokensLegend might be out-of-sync with provideDocumentRangeSemanticTokens unless a range argument is passed in"); + return o[0].getLegend(); + } + const a = await zKt(r, n, Z.lift(s), mt.None); + if (a) { + return a.provider.getLegend(); + } + }); + ei.registerCommand("_provideDocumentRangeSemanticTokens", async (i, ...e) => { + const [t, s] = e; + yr(t instanceof V); + yr(Z.isIRange(s)); + const n = i.get($s).getModel(t); + if (!n) { + return; + } + const { + documentRangeSemanticTokensProvider: r + } = i.get(nn); + const o = await zKt(r, n, Z.lift(s), mt.None); + if (!!o && !!o.tokens) { + return g2s({ + id: 0, + type: "full", + data: o.tokens.data + }); + } + }); + } +}); +function sgt(i, e, t) { + const s = t.getValue(lwe, { + overrideIdentifier: i.getLanguageId(), + resource: i.uri + })?.enabled; + if (typeof s == "boolean") { + return s; + } else { + return e.getColorTheme().semanticHighlighting; + } +} +var lwe; +var JKt = ue({ + "out-build/vs/editor/contrib/semanticTokens/common/semanticTokensConfig.js"() { + "use strict"; + + lwe = "editor.semanticHighlighting"; + } +}); +var E2s; +var I2s; +var GKt; +var Brr = ue({ + "out-build/vs/editor/common/tokens/sparseMultilineTokens.js"() { + "use strict"; + + Rs(); + yt(); + J9(); + E2s = class kFt { + static create(e, t) { + return new kFt(e, new I2s(t)); + } + get startLineNumber() { + return this.c; + } + get endLineNumber() { + return this.d; + } + constructor(e, t) { + this.c = e; + this.e = t; + this.d = this.c + this.e.getMaxDeltaLine(); + } + toString() { + return this.e.toString(this.c); + } + f() { + this.d = this.c + this.e.getMaxDeltaLine(); + } + isEmpty() { + return this.e.isEmpty(); + } + getLineTokens(e) { + if (this.c <= e && e <= this.d) { + return this.e.getLineTokens(e - this.c); + } else { + return null; + } + } + getRange() { + const e = this.e.getRange(); + return e && new Z(this.c + e.startLineNumber, e.startColumn, this.c + e.endLineNumber, e.endColumn); + } + removeTokens(e) { + const t = e.startLineNumber - this.c; + const s = e.endLineNumber - this.c; + this.c += this.e.removeTokens(t, e.startColumn - 1, s, e.endColumn - 1); + this.f(); + } + split(e) { + const t = e.startLineNumber - this.c; + const s = e.endLineNumber - this.c; + const [n, r, o] = this.e.split(t, e.startColumn - 1, s, e.endColumn - 1); + return [new kFt(this.c, n), new kFt(this.c + o, r)]; + } + applyEdit(e, t) { + const [s, n, r] = XL(t); + this.acceptEdit(e, s, n, r, t.length > 0 ? t.charCodeAt(0) : 0); + } + acceptEdit(e, t, s, n, r) { + this.g(e); + this.h(new je(e.startLineNumber, e.startColumn), t, s, n, r); + this.f(); + } + g(e) { + if (e.startLineNumber === e.endLineNumber && e.startColumn === e.endColumn) { + return; + } + const t = e.startLineNumber - this.c; + const s = e.endLineNumber - this.c; + if (s < 0) { + const r = s - t; + this.c -= r; + return; + } + const n = this.e.getMaxDeltaLine(); + if (!(t >= n + 1)) { + if (t < 0 && s >= n + 1) { + this.c = 0; + this.e.clear(); + return; + } + if (t < 0) { + const r = -t; + this.c -= r; + this.e.acceptDeleteRange(e.startColumn - 1, 0, 0, s, e.endColumn - 1); + } else { + this.e.acceptDeleteRange(0, t, e.startColumn - 1, s, e.endColumn - 1); + } + } + } + h(e, t, s, n, r) { + if (t === 0 && s === 0) { + return; + } + const o = e.lineNumber - this.c; + if (o < 0) { + this.c += t; + return; + } + const a = this.e.getMaxDeltaLine(); + if (!(o >= a + 1)) { + this.e.acceptInsertText(o, e.column - 1, t, s, n, r); + } + } + }; + I2s = class Z3i { + constructor(e) { + this.c = e; + this.d = e.length / 4; + } + toString(e) { + const t = []; + for (let s = 0; s < this.d; s++) { + t.push(`(${this.f(s) + e},${this.g(s)}-${this.h(s)})`); + } + return `[${t.join(",")}]`; + } + getMaxDeltaLine() { + const e = this.e(); + if (e === 0) { + return -1; + } else { + return this.f(e - 1); + } + } + getRange() { + const e = this.e(); + if (e === 0) { + return null; + } + const t = this.g(0); + const s = this.f(e - 1); + const n = this.h(e - 1); + return new Z(0, t + 1, s, n + 1); + } + e() { + return this.d; + } + f(e) { + return this.c[e * 4]; + } + g(e) { + return this.c[e * 4 + 1]; + } + h(e) { + return this.c[e * 4 + 2]; + } + isEmpty() { + return this.e() === 0; + } + getLineTokens(e) { + let t = 0; + let s = this.e() - 1; + while (t < s) { + const n = t + Math.floor((s - t) / 2); + const r = this.f(n); + if (r < e) { + t = n + 1; + } else if (r > e) { + s = n - 1; + } else { + let o = n; + while (o > t && this.f(o - 1) === e) { + o--; + } + let a = n; + while (a < s && this.f(a + 1) === e) { + a++; + } + return new GKt(this.c.subarray(o * 4, a * 4 + 4)); + } + } + if (this.f(t) === e) { + return new GKt(this.c.subarray(t * 4, t * 4 + 4)); + } else { + return null; + } + } + clear() { + this.d = 0; + } + removeTokens(e, t, s, n) { + const r = this.c; + const o = this.d; + let a = 0; + let l = false; + let c = 0; + for (let u = 0; u < o; u++) { + const d = u * 4; + const h = r[d]; + const g = r[d + 1]; + const p = r[d + 2]; + const b = r[d + 3]; + if ((h > e || h === e && p >= t) && (h < s || h === s && g <= n)) { + l = true; + } else { + if (a === 0) { + c = h; + } + if (l) { + const v = a * 4; + r[v] = h - c; + r[v + 1] = g; + r[v + 2] = p; + r[v + 3] = b; + } + a++; + } + } + this.d = a; + return c; + } + split(e, t, s, n) { + const r = this.c; + const o = this.d; + const a = []; + const l = []; + let c = a; + let u = 0; + let d = 0; + for (let h = 0; h < o; h++) { + const g = h * 4; + const p = r[g]; + const b = r[g + 1]; + const v = r[g + 2]; + const y = r[g + 3]; + if (p > e || p === e && v >= t) { + if (p < s || p === s && b <= n) { + continue; + } + if (c !== l) { + c = l; + u = 0; + d = p; + } + } + c[u++] = p - d; + c[u++] = b; + c[u++] = v; + c[u++] = y; + } + return [new Z3i(new Uint32Array(a)), new Z3i(new Uint32Array(l)), d]; + } + acceptDeleteRange(e, t, s, n, r) { + const o = this.c; + const a = this.d; + const l = n - t; + let c = 0; + let u = false; + for (let d = 0; d < a; d++) { + const h = d * 4; + let g = o[h]; + let p = o[h + 1]; + let b = o[h + 2]; + const v = o[h + 3]; + if (g < t || g === t && b <= s) { + c++; + continue; + } else if (g === t && p < s) { + if (g === n && b > r) { + b -= r - s; + } else { + b = s; + } + } else if (g === t && p === s) { + if (g === n && b > r) { + b -= r - s; + } else { + u = true; + continue; + } + } else if (g < n || g === n && p < r) { + if (g === n && b > r) { + g = t; + p = s; + b = p + (b - r); + } else { + u = true; + continue; + } + } else if (g > n) { + if (l === 0 && !u) { + c = a; + break; + } + g -= l; + } else if (g === n && p >= r) { + if (e && g === 0) { + p += e; + b += e; + } + g -= l; + p -= r - s; + b -= r - s; + } else { + throw new Error("Not possible!"); + } + const y = c * 4; + o[y] = g; + o[y + 1] = p; + o[y + 2] = b; + o[y + 3] = v; + c++; + } + this.d = c; + } + acceptInsertText(e, t, s, n, r, o) { + const a = s === 0 && n === 1 && (o >= 48 && o <= 57 || o >= 65 && o <= 90 || o >= 97 && o <= 122); + const l = this.c; + const c = this.d; + for (let u = 0; u < c; u++) { + const d = u * 4; + let h = l[d]; + let g = l[d + 1]; + let p = l[d + 2]; + if (!(h < e) && (h !== e || !(p < t))) { + if (h === e && p === t) { + if (a) { + p += 1; + } else { + continue; + } + } else if (h === e && g < t && t < p) { + if (s === 0) { + p += n; + } else { + p = t; + } + } else { + if (h === e && g === t && a) { + continue; + } + if (h === e) { + h += s; + if (s === 0) { + g += n; + p += n; + } else { + const b = p - g; + g = r + (g - t); + p = g + b; + } + } else { + h += s; + } + } + l[d] = h; + l[d + 1] = g; + l[d + 2] = p; + } + } + } + }; + GKt = class { + constructor(i) { + this.c = i; + } + getCount() { + return this.c.length / 4; + } + getStartCharacter(i) { + return this.c[i * 4 + 1]; + } + getEndCharacter(i) { + return this.c[i * 4 + 2]; + } + getMetadata(i) { + return this.c[i * 4 + 3]; + } + }; + } +}); +function D2s(i, e, t) { + const s = i.data; + const n = i.data.length / 5 | 0; + const r = Math.max(Math.ceil(n / 1024), 400); + const o = []; + let a = 0; + let l = 1; + let c = 0; + while (a < n) { + const u = a; + let d = Math.min(u + r, n); + if (d < n) { + let w = d; + while (w - 1 > u && s[w * 5] === 0) { + w--; + } + if (w - 1 === u) { + let C = d; + while (C + 1 < n && s[C * 5] === 0) { + C++; + } + d = C; + } else { + d = w; + } + } + let h = new Uint32Array((d - u) * 4); + let g = 0; + let p = 0; + let b = 0; + let v = 0; + while (a < d) { + const w = a * 5; + const C = s[w]; + const S = s[w + 1]; + const x = l + C | 0; + const k = C === 0 ? c + S | 0 : S; + const E = s[w + 2]; + const D = k + E | 0; + const P = s[w + 3]; + const R = s[w + 4]; + if (D <= k) { + e.warnInvalidLengthSemanticTokens(x, k + 1); + } else if (b === x && v > k) { + e.warnOverlappingSemanticTokens(x, k + 1); + } else { + const L = e.getMetadata(P, R, t); + if (L !== 2147483647) { + if (p === 0) { + p = x; + } + h[g] = x - p; + h[g + 1] = k; + h[g + 2] = D; + h[g + 3] = L; + g += 4; + b = x; + v = D; + } + } + l = x; + c = k; + a++; + } + if (g !== h.length) { + h = h.subarray(0, g); + } + const y = E2s.create(p, h); + o.push(y); + } + return o; +} +var T2s; +var cwe; +var ngt; +var P2s; +var L2s; +var R2s; +var KKt = ue({ + "out-build/vs/editor/common/services/semanticTokensProviderStyling.js"() { + "use strict"; + + C9(); + gi(); + Zt(); + Brr(); + wn(); + (function (i) { + i[i.NO_STYLING = 2147483647] = "NO_STYLING"; + })(T2s ||= {}); + cwe = false; + ngt = class { + constructor(e, t, s, n) { + this.e = e; + this.f = t; + this.g = s; + this.h = n; + this.b = false; + this.c = false; + this.d = false; + this.a = new R2s(); + } + getMetadata(e, t, s) { + const n = this.g.languageIdCodec.encodeLanguageId(s); + const r = this.a.get(e, t, n); + let o; + if (r) { + o = r.metadata; + if (cwe && this.h.getLevel() === pr.Trace) { + this.h.trace(`SemanticTokensProviderStyling [CACHED] ${e} / ${t}: foreground ${gb.getForeground(o)}, fontStyle ${gb.getFontStyle(o).toString(2)}`); + } + } else { + let a = this.e.tokenTypes[e]; + const l = []; + if (a) { + let c = t; + for (let d = 0; c > 0 && d < this.e.tokenModifiers.length; d++) { + if (c & 1) { + l.push(this.e.tokenModifiers[d]); + } + c = c >> 1; + } + if (cwe && c > 0 && this.h.getLevel() === pr.Trace) { + this.h.trace(`SemanticTokensProviderStyling: unknown token modifier index: ${t.toString(2)} for legend: ${JSON.stringify(this.e.tokenModifiers)}`); + l.push("not-in-legend"); + } + const u = this.f.getColorTheme().getTokenStyleMetadata(a, l, s); + if (typeof u === "undefined") { + o = 2147483647; + } else { + o = 0; + if (typeof u.italic !== "undefined") { + const d = (u.italic ? 1 : 0) << 11; + o |= d | 1; + } + if (typeof u.bold !== "undefined") { + const d = (u.bold ? 2 : 0) << 11; + o |= d | 2; + } + if (typeof u.underline !== "undefined") { + const d = (u.underline ? 4 : 0) << 11; + o |= d | 4; + } + if (typeof u.strikethrough !== "undefined") { + const d = (u.strikethrough ? 8 : 0) << 11; + o |= d | 8; + } + if (u.foreground) { + const d = u.foreground << 15; + o |= d | 16; + } + if (o === 0) { + o = 2147483647; + } + } + } else { + if (cwe && this.h.getLevel() === pr.Trace) { + this.h.trace(`SemanticTokensProviderStyling: unknown token type index: ${e} for legend: ${JSON.stringify(this.e.tokenTypes)}`); + } + o = 2147483647; + a = "not-in-legend"; + } + this.a.add(e, t, n, o); + if (cwe && this.h.getLevel() === pr.Trace) { + this.h.trace(`SemanticTokensProviderStyling ${e} (${a}) / ${t} (${l.join(" ")}): foreground ${gb.getForeground(o)}, fontStyle ${gb.getFontStyle(o).toString(2)}`); + } + } + return o; + } + warnOverlappingSemanticTokens(e, t) { + if (!this.b) { + this.b = true; + this.h.warn(`Overlapping semantic tokens detected at lineNumber ${e}, column ${t}`); + } + } + warnInvalidLengthSemanticTokens(e, t) { + if (!this.c) { + this.c = true; + this.h.warn(`Semantic token with invalid length detected at lineNumber ${e}, column ${t}`); + } + } + warnInvalidEditStart(e, t, s, n, r) { + if (!this.d) { + this.d = true; + this.h.warn(`Invalid semantic tokens edit detected (previousResultId: ${e}, resultId: ${t}) at edit #${s}: The provided start offset ${n} is outside the previous data (length ${r}).`); + } + } + }; + ngt = __decorate([__param(1, ti), __param(2, As), __param(3, Bt)], ngt); + (function (i) { + i[i.DesiredTokensPerArea = 400] = "DesiredTokensPerArea"; + i[i.DesiredMaxAreas = 1024] = "DesiredMaxAreas"; + })(P2s ||= {}); + L2s = class { + constructor(i, e, t, s) { + this.tokenTypeIndex = i; + this.tokenModifierSet = e; + this.languageId = t; + this.metadata = s; + this.next = null; + } + }; + R2s = class tZ { + static { + this.a = [3, 7, 13, 31, 61, 127, 251, 509, 1021, 2039, 4093, 8191, 16381, 32749, 65521, 131071, 262139, 524287, 1048573, 2097143]; + } + constructor() { + this.b = 0; + this.c = 0; + this.d = tZ.a[this.c]; + this.e = Math.round(this.c + 1 < tZ.a.length ? 2 / 3 * this.d : 0); + this.f = []; + tZ.g(this.f, this.d); + } + static g(e, t) { + for (let s = 0; s < t; s++) { + e[s] = null; + } + } + h(e, t) { + return (e << 5) - e + t | 0; + } + j(e, t, s) { + return this.h(this.h(e, t), s) % this.d; + } + get(e, t, s) { + const n = this.j(e, t, s); + let r = this.f[n]; + while (r) { + if (r.tokenTypeIndex === e && r.tokenModifierSet === t && r.languageId === s) { + return r; + } + r = r.next; + } + return null; + } + add(e, t, s, n) { + this.b++; + if (this.e !== 0 && this.b >= this.e) { + const r = this.f; + this.c++; + this.d = tZ.a[this.c]; + this.e = Math.round(this.c + 1 < tZ.a.length ? 2 / 3 * this.d : 0); + this.f = []; + tZ.g(this.f, this.d); + for (const o of r) { + let a = o; + while (a) { + const l = a.next; + a.next = null; + this.k(a); + a = l; + } + } + } + this.k(new L2s(e, t, s, n)); + } + k(e) { + const t = this.j(e.tokenTypeIndex, e.tokenModifierSet, e.languageId); + e.next = this.f[t]; + this.f[t] = e; + } + }; + } +}); +var uwe; +var YKt = ue({ + "out-build/vs/editor/common/services/semanticTokensStyling.js"() { + "use strict"; + + te(); + uwe = Ve("semanticTokensStylingService"); + } +}); +var XKt; +var S5; +var rgt = ue({ + "out-build/vs/editor/contrib/semanticTokens/browser/viewportSemanticTokens.js"() { + "use strict"; + + nt(); + q(); + en(); + k2s(); + JKt(); + KKt(); + Me(); + gi(); + mR(); + fd(); + Tr(); + YKt(); + S5 = class extends H { + static { + XKt = this; + } + static { + this.ID = "editor.contrib.viewportSemanticTokens"; + } + static get(e) { + return e.getContribution(XKt.ID); + } + constructor(e, t, s, n, r, o) { + super(); + this.h = t; + this.j = s; + this.m = n; + this.a = e; + this.b = o.documentRangeSemanticTokensProvider; + this.c = r.for(this.b, "DocumentRangeSemanticTokens", { + min: 100, + max: 500 + }); + this.f = this.D(new Vn(() => this.s(), 100)); + this.g = []; + const a = () => { + if (this.a.hasModel()) { + this.f.schedule(this.c.get(this.a.getModel())); + } + }; + this.D(this.a.onDidScrollChange(() => { + a(); + })); + this.D(this.a.onDidChangeModel(() => { + this.n(); + a(); + })); + this.D(this.a.onDidChangeModelContent(l => { + this.n(); + a(); + })); + this.D(this.b.onDidChange(() => { + this.n(); + a(); + })); + this.D(this.m.onDidChangeConfiguration(l => { + if (l.affectsConfiguration(lwe)) { + this.n(); + a(); + } + })); + this.D(this.j.onDidColorThemeChange(() => { + this.n(); + a(); + })); + a(); + } + n() { + for (const e of this.g) { + e.cancel(); + } + this.g = []; + } + q(e) { + for (let t = 0, s = this.g.length; t < s; t++) { + if (this.g[t] === e) { + this.g.splice(t, 1); + return; + } + } + } + s() { + if (!this.a.hasModel()) { + return; + } + const e = this.a.getModel(); + if (e.tokenization.hasCompleteSemanticTokens()) { + return; + } + if (!sgt(e, this.j, this.m)) { + if (e.tokenization.hasSomeSemanticTokens()) { + e.tokenization.setSemanticTokens(null, false); + } + return; + } + if (!_rr(this.b, e)) { + if (e.tokenization.hasSomeSemanticTokens()) { + e.tokenization.setSemanticTokens(null, false); + } + return; + } + const t = this.a.getVisibleRangesPlusViewportAboveBelow(); + this.g = this.g.concat(t.map(s => this.t(e, s))); + } + t(e, t) { + const s = e.getVersionId(); + const n = ql(o => Promise.resolve(zKt(this.b, e, t, o))); + const r = new ic(false); + n.then(o => { + this.c.update(e, r.elapsed()); + if (!o || !o.tokens || e.isDisposed() || e.getVersionId() !== s) { + return; + } + const { + provider: a, + tokens: l + } = o; + const c = this.h.getStyling(a); + e.tokenization.setPartialSemanticTokens(t, D2s(l, c, e.getLanguageId())); + }).then(() => this.q(n), () => this.q(n)); + return n; + } + }; + S5 = XKt = __decorate([__param(1, uwe), __param(2, ti), __param(3, ve), __param(4, gE), __param(5, nn)], S5); + bo(S5.ID, S5, 1); + } +}); +var Urr; +var zse; +var ep; +var dD = ue({ + "out-build/vs/workbench/contrib/ui/browser/widgets/codeBlock.js"() { + "use strict"; + + en(); + Xn(); + Ee(); + te(); + Wt(); + gA(); + kR(); + gi(); + Wi(); + Ho(); + Bd(); + Tr(); + Me(); + qT(); + JF(); + Yg(); + rgt(); + xe(); + Urr = new fe("commentEditorFocused", false); + zse = 10; + ep = class extends gh { + constructor(e, t, s, n, r, o, a, l, c, u, d, h, g, p) { + const b = { + isSimpleWidget: s.overwriteIsSimpleWidget ?? true, + isChatCodeblock: true, + cursorCodeBlockType: "chatCodeblock", + contributions: nd.getSomeEditorContributions([jx.ID, Yy.ID, rC.ID, ...(s.enableSemanticSyntaxHighlighting ? [S5.ID] : []), ...(s.customContributions ?? [])]) + }; + super(e, t, b, n, r, o, a, l, c, u, d, h, g); + this.qc = p; + this.kb = null; + this.oc = null; + this.pc = null; + if (s.placeholder) { + this.sc(s.placeholder); + this.D(this.onDidChangeModel(() => { + this.tc(); + })); + this.uc(); + } + } + rc() { + return nd.getEditorActions(); + } + sc(e) { + if (!e) { + return; + } + const t = G(".simple-editor-placeholder"); + t.textContent = e; + t.className = "simple-editor-placeholder"; + t.style.position = "absolute"; + t.style.pointerEvents = "none"; + t.style.overflow = "hidden"; + t.style.textOverflow = "ellipsis"; + t.style.whiteSpace = "nowrap"; + t.style.top = "0"; + t.style.left = "0"; + t.style.color = "var(--vscode-input-placeholderForeground)"; + t.style.fontFamily = this.qc.getValue("editor.fontFamily"); + t.style.fontSize = `${this.qc.getValue("editor.fontSize")}px`; + t.style.opacity = "0.5"; + this.kb = { + getId: () => "simple.editor.placeholder", + getDomNode: () => t, + getPosition: () => ({ + position: { + lineNumber: 1, + column: 1 + }, + preference: [0] + }) + }; + } + tc() { + if (this.pc) { + this.pc.dispose(); + this.pc = null; + } + this.oc = this.getModel(); + if (this.oc) { + this.pc = this.oc.onDidChangeContent(() => { + this.uc(); + }); + this.uc(); + } + } + uc() { + if (!this.kb) { + return; + } + const e = this.getModel(); + const t = this.kb.getDomNode().style; + if (e && e.getValueLength() === 0 && t.display !== "block") { + this.addContentWidget(this.kb); + this.kb.getDomNode().style.display = "block"; + } else if (e && e.getValueLength() > 0 && t.display === "block") { + this.removeContentWidget(this.kb); + this.kb.getDomNode().style.display = "none"; + } + } + dispose() { + if (this.kb) { + this.removeContentWidget(this.kb); + } + if (this.pc) { + this.pc.dispose(); + } + super.dispose(); + } + static getEditorOptions(e) { + return { + readOnly: true, + wordWrap: "off", + wordWrapOverride1: "off", + wordWrapOverride2: "off", + glyphMargin: false, + lineDecorationsWidth: 0, + lineNumbersMinChars: 0, + lineNumbers: "off", + folding: false, + fontFamily: e.getValue("editor.fontFamily"), + fontLigatures: e.getValue("editor.fontLigatures"), + fontSize: e.getValue("editor.fontSize"), + lineHeight: e.getValue("editor.lineHeight"), + scrollbar: { + vertical: "hidden", + horizontal: "auto", + verticalScrollbarSize: 0, + handleMouseWheel: true, + alwaysConsumeMouseWheel: false, + useShadows: true, + verticalHasArrows: false, + horizontalHasArrows: false, + horizontalScrollbarSize: zse + }, + scrollBeyondLastLine: false, + renderLineHighlight: "none", + renderWhitespace: "none", + minimap: { + enabled: false + }, + quickSuggestions: false, + automaticLayout: false, + automaticLayoutIgnoreHeight: true, + guides: { + indentation: false + } + }; + } + }; + ep = __decorate([__param(3, re), __param(4, ps), __param(5, gt), __param(6, Ne), __param(7, ti), __param(8, ni), __param(9, na), __param(10, Lu), __param(11, nn), __param(12, Rx), __param(13, ve)], ep); + } +}); +function VJ(i) { + return { + type: "head", + composerId: i.composerId, + name: i.name, + lastUpdatedAt: i.lastUpdatedAt, + createdAt: i.createdAt, + unifiedMode: i.unifiedMode, + forceMode: i.forceMode + }; +} +function wE(i, e = "agent") { + return { + _v: A2s, + composerId: i ?? Ft(), + richText: "", + hasLoaded: true, + text: "", + fullConversationHeadersOnly: [], + conversationMap: {}, + status: "none", + context: Jm(), + gitGraphFileSuggestions: [], + generatingBubbleIds: [], + chatGenerationUUID: undefined, + isReadingLongFile: false, + codeBlockData: {}, + originalModelLines: {}, + newlyCreatedFiles: [], + newlyCreatedFolders: [], + lastUpdatedAt: undefined, + createdAt: Date.now(), + hasChangedContext: false, + latestCheckpointId: undefined, + currentBubbleId: undefined, + editingBubbleId: undefined, + lastFocusedBubbleId: undefined, + capabilities: [], + name: undefined, + codebaseSearchSettings: { + filesToInclude: undefined, + filesToExclude: undefined + }, + isFileListExpanded: false, + unifiedMode: e, + forceMode: "edit", + usageData: {}, + allAttachedFileCodeChunksUris: new Set() + }; +} +function N2s(i) { + return i.fullConversationHeadersOnly.length === 0 && i.text.trim() === ""; +} +function Wrr(i) { + if (i.getWorkbenchState() === 1) { + return -1; + } else { + return 1; + } +} +var M2s; +var A2s; +var $2s; +var ogt; +var F2s; +var O2s; +var QKt; +var Jse; +var ZKt; +var _2s; +var Vrr; +var ty; +var B2s; +var Hrr; +var qrr; +var eYt; +var U2s; +var agt; +var tYt; +var W2s; +var V2s; +var iYt; +var EU; +var H2s; +var nf = ue({ + "out-build/vs/workbench/contrib/composer/browser/composerData.js"() { + "use strict"; + + $(); + $(); + We(); + Lc(); + iu(); + jl(); + He(); + Le(); + Ps(); + od(); + gs(); + av(); + dD(); + M2s = 2; + A2s = 3; + $2s = 2; + ogt = ["completed", "cancelled", "accepted", "rejected", "outdated"]; + F2s = [...ogt, "applying"]; + O2s = ["completed", "accepted", "rejected"]; + QKt = i => ({ + ...i, + files: i.files.map(e => ({ + ...e, + uri: V.revive(e.uri) + })), + nonExistentFiles: i.nonExistentFiles.map(e => ({ + ...e, + uri: V.revive(e.uri) + })), + newlyCreatedFolders: i.newlyCreatedFolders.map(e => ({ + ...e, + uri: V.revive(e.uri) + })), + activeInlineDiffs: i.activeInlineDiffs.map(e => ({ + ...e, + uri: V.revive(e.uri) + })), + inlineDiffNewlyCreatedResources: { + ...i.inlineDiffNewlyCreatedResources, + files: i.inlineDiffNewlyCreatedResources.files.map(e => ({ + ...e, + uri: V.revive(e.uri) + })), + folders: i.inlineDiffNewlyCreatedResources.folders.map(e => ({ + ...e, + uri: V.revive(e.uri) + })) + } + }); + Jse = () => ({ + files: [], + nonExistentFiles: [], + newlyCreatedFolders: [], + activeInlineDiffs: [], + inlineDiffNewlyCreatedResources: { + files: [], + folders: [] + } + }); + ZKt = () => ({ + "mutate-request": [], + "start-submit-chat": [], + "before-submit-chat": [], + "after-submit-chat": [], + "after-apply": [], + "composer-settled": [], + "composer-done": [], + "process-stream": [] + }); + _2s = () => ({ + "mutate-request": [], + "start-submit-chat": [], + "before-submit-chat": [], + "after-submit-chat": [], + "after-apply": [], + "composer-settled": [], + "composer-done": [], + "process-stream": [] + }); + Vrr = [eC.RUN_TERMINAL_COMMAND]; + ty = () => ({ + _v: M2s, + type: _n.HUMAN, + approximateLintErrors: [], + lints: [], + codebaseContextChunks: [], + commits: [], + pullRequests: [], + attachedCodeChunks: [], + assistantSuggestedDiffs: [], + gitDiffs: [], + interpreterResults: [], + images: [], + attachedFolders: [], + attachedFoldersNew: [], + bubbleId: Ft(), + userResponsesToSuggestedCodeBlocks: [], + suggestedCodeBlocks: [], + diffsForCompressingFiles: [], + relevantFiles: [], + toolResults: [], + notepads: [], + capabilities: [], + capabilitiesRan: _2s(), + capabilityStatuses: ZKt(), + multiFileLinterErrors: [], + diffHistories: [], + recentLocationsHistory: [], + recentlyViewedFiles: [], + isAgentic: false, + fileDiffTrajectories: [], + existedSubsequentTerminalCommand: false, + existedPreviousTerminalCommand: false, + docsReferences: [], + webReferences: [], + attachedFoldersListDirResults: [], + humanChanges: [], + attachedHumanChanges: false, + summarizedComposers: [], + cursorRules: [], + contextPieces: [], + editTrailContexts: [], + allThinkingBlocks: [], + diffsSinceLastApply: [], + deletedFiles: [], + supportedTools: [], + tokenCount: { + inputTokens: 0, + outputTokens: 0 + }, + attachedFileCodeChunksUris: [], + consoleLogs: [], + uiElementPicked: [], + isRefunded: false, + knowledgeItems: [], + documentationSelections: [], + externalLinks: [], + useWeb: false + }); + B2s = Uw(); + Hrr = { + [eC.ADD_FILE_TO_CONTEXT]: "Add file to context", + [eC.RUN_TERMINAL_COMMAND]: "Run terminal", + [eC.ITERATE]: "Iterate and improve", + [eC.UNSPECIFIED]: "Unspecified", + [eC.REMOVE_FILE_FROM_CONTEXT]: "Remove file from context", + [eC.SEMANTIC_SEARCH_CODEBASE]: "Semantic search codebase" + }; + qrr = { + [eC.ADD_FILE_TO_CONTEXT]: A.fileAdd, + [eC.RUN_TERMINAL_COMMAND]: A.terminal, + [eC.ITERATE]: A.sync, + [eC.UNSPECIFIED]: A.question, + [eC.REMOVE_FILE_FROM_CONTEXT]: A.trash, + [eC.SEMANTIC_SEARCH_CODEBASE]: A.search + }; + eYt = [as.DIFF_REVIEW, as.AUTO_CONTEXT, as.TOOL_FORMER, as.CURSOR_RULES, as.TOKEN_COUNTER, as.USES_CODEBASE, as.SUMMARIZATION, as.USAGE_DATA, as.CHIMES, as.QUEUING, as.RCP_LOGS, as.AI_CODE_TRACKING, as.BACKGROUND_COMPOSER]; + U2s = V.parse("multi-diff-editor:composer-all-active-changes"); + agt = { + [at.RUN_TERMINAL_COMMAND_V2]: { + accept: "Run", + reject: "Stop", + waitText: "Waiting for approval" + }, + [at.EDIT_FILE]: { + accept: "Accept", + reject: "Reject", + waitText: "" + }, + [at.PARALLEL_APPLY]: { + accept: "Accept All", + reject: "Reject All", + waitText: "" + }, + [at.BACKGROUND_COMPOSER_FOLLOWUP]: { + accept: "Send to background composer", + reject: "Skip", + waitText: "Waiting for approval" + } + }; + tYt = [at.EDIT_FILE, at.PARALLEL_APPLY, at.DELETE_FILE]; + W2s = [at.EDIT_FILE]; + V2s = [at.EDIT_FILE]; + iYt = [at.WEB_SEARCH, at.EDIT_FILE, at.BACKGROUND_COMPOSER_FOLLOWUP]; + EU = [{ + id: "search", + title: "Search", + description: "Codebase, web", + tools: [{ + tool: at.READ_SEMSEARCH_FILES, + label: "Codebase" + }, { + tool: at.WEB_SEARCH, + label: "Web" + }, { + tool: at.RIPGREP_SEARCH, + label: "Grep" + }, { + tool: at.LIST_DIR, + label: "List directory" + }, { + tool: at.FILE_SEARCH, + label: "Search files" + }, { + tool: at.READ_FILE, + label: "Read file" + }, { + tool: at.FETCH_RULES, + label: "Fetch rules" + }] + }, { + id: "edit", + title: "Edit", + description: "Files in workspace", + tools: [{ + tool: at.EDIT_FILE, + label: "Edit & Reapply" + }, { + tool: at.DELETE_FILE, + label: "Delete file" + }] + }, { + id: "run", + title: "Run", + description: "Commands", + tools: [{ + tool: at.RUN_TERMINAL_COMMAND_V2, + label: "Terminal" + }] + }]; + H2s = { + [at.EDIT_FILE]: [at.REAPPLY] + }; + } +}); +function pia(i) { + return i; +} +function q2s(i) { + const e = i.tool; + const { + params: t, + result: s + } = (() => { + switch (e) { + case at.RUN_TERMINAL_COMMAND_V2: + return { + params: i.params ? yqt.fromJsonString(i.params) : undefined, + result: i.result ? i5.fromJsonString(i.result) : undefined + }; + case at.READ_SEMSEARCH_FILES: + return { + params: i.params ? Fut.fromJsonString(i.params) : undefined, + result: i.result ? Hie.fromJsonString(i.result) : undefined + }; + case at.READ_FILE_FOR_IMPORTS: + return { + params: i.params ? _ut.fromJsonString(i.params) : undefined, + result: i.result ? fqt.fromJsonString(i.result) : undefined + }; + case at.FILE_SEARCH: + return { + params: i.params ? XHt.fromJsonString(i.params) : undefined, + result: i.result ? Rut.fromJsonString(i.result) : undefined + }; + case at.EDIT_FILE: + return { + params: i.params ? Lut.fromJsonString(i.params) : undefined, + result: i.result ? ZM.fromJsonString(i.result) : undefined + }; + case at.LIST_DIR: + return { + params: i.params ? QHt.fromJsonString(i.params) : undefined, + result: i.result ? qz.fromJsonString(i.result) : undefined + }; + case at.READ_FILE: + return { + params: i.params ? ZHt.fromJsonString(i.params) : undefined, + result: i.result ? Vie.fromJsonString(i.result) : undefined + }; + case at.RIPGREP_SEARCH: + return { + params: i.params ? eqt.fromJsonString(i.params) : undefined, + result: i.result ? Nut.fromJsonString(i.result) : undefined + }; + case at.SEMANTIC_SEARCH_FULL: + return { + params: i.params ? hqt.fromJsonString(i.params) : undefined, + result: i.result ? Out.fromJsonString(i.result) : undefined + }; + case at.CREATE_FILE: + return { + params: i.params ? But.fromJsonString(i.params) : undefined, + result: i.result ? Uut.fromJsonString(i.result) : undefined + }; + case at.DELETE_FILE: + return { + params: i.params ? Wut.fromJsonString(i.params) : undefined, + result: i.result ? W7.fromJsonString(i.result) : undefined + }; + case at.REAPPLY: + return { + params: i.params ? jHt.fromJsonString(i.params) : undefined, + result: i.result ? zbe.fromJsonString(i.result) : undefined + }; + case at.PARALLEL_APPLY: + return { + params: i.params ? vqt.fromJsonString(i.params) : undefined, + result: i.result ? Ybe.fromJsonString(i.result) : undefined + }; + case at.UNSPECIFIED: + return { + params: undefined, + result: undefined + }; + case at.GET_RELATED_FILES: + return { + params: i.params ? GHt.fromJsonString(i.params) : undefined, + result: i.result ? KHt.fromJsonString(i.result) : undefined + }; + case at.FETCH_RULES: + return { + params: i.params ? zHt.fromJsonString(i.params) : undefined, + result: i.result ? Put.fromJsonString(i.result) : undefined + }; + case at.PLANNER: + return { + params: i.params ? JHt.fromJsonString(i.params) : undefined, + result: i.result ? Jbe.fromJsonString(i.result) : undefined + }; + case at.RUN_TERMINAL_COMMAND: + return { + params: i.params ? gqt.fromJsonString(i.params) : undefined, + result: i.result ? Vut.fromJsonString(i.result) : undefined + }; + case at.WEB_SEARCH: + return { + params: i.params ? wqt.fromJsonString(i.params) : undefined, + result: i.result ? zz.fromJsonString(i.result) : undefined + }; + case at.WEB_VIEWER: + return { + params: i.params ? Cqt.fromJsonString(i.params) : undefined, + result: i.result ? Zbe.fromJsonString(i.result) : undefined + }; + case at.MCP: + return { + params: i.params ? xqt.fromJsonString(i.params) : undefined, + result: i.result ? jut.fromJsonString(i.result) : undefined + }; + case at.DIFF_HISTORY: + return { + params: i.params ? kqt.fromJsonString(i.params) : undefined, + result: i.result ? zut.fromJsonString(i.result) : undefined + }; + case at.IMPLEMENTER: + return { + params: i.params ? Jut.fromJsonString(i.params) : undefined, + result: i.result ? eve.fromJsonString(i.result) : undefined + }; + case at.SEARCH_SYMBOLS: + return { + params: i.params ? Iqt.fromJsonString(i.params) : undefined, + result: i.result ? Gut.fromJsonString(i.result) : undefined + }; + case at.BACKGROUND_COMPOSER_FOLLOWUP: + return { + params: i.params ? Tqt.fromJsonString(i.params) : undefined, + result: i.result ? Jz.fromJsonString(i.result) : undefined + }; + case at.KNOWLEDGE_BASE: + return { + params: i.params ? Pqt.fromJsonString(i.params) : undefined, + result: i.result ? ive.fromJsonString(i.result) : undefined + }; + default: + throw new Error(`Parsing unknown tool: ${e}`); + } + })(); + return { + ...i, + params: t, + result: s, + error: i.error ? Wie.fromJsonString(i.error) : undefined + }; +} +function j2s(i) { + if (i.status === "loading") { + i.status = "cancelled"; + } + const e = jrr(i); + i.params = e.params; + i.result = e.result; + i.additionalData = e.additionalData; + return i; +} +function jrr(i) { + const e = { + ...i + }; + const t = e.tool; + switch (t) { + case at.RUN_TERMINAL_COMMAND_V2: + if (e.additionalData !== undefined) { + const s = e.additionalData.status; + if (s === "pending" || s === "loading" || s === "running") { + e.additionalData = { + ...e.additionalData, + status: "cancelled" + }; + } + } + break; + case at.READ_SEMSEARCH_FILES: + e.result &&= new Hie({ + ...e.result, + allFiles: [] + }); + break; + case at.READ_FILE: + e.result &&= new Vie({ + ...e.result, + fullFileContents: undefined + }); + break; + case at.MCP: + case at.LIST_DIR: + case at.RIPGREP_SEARCH: + case at.EDIT_FILE: + case at.FILE_SEARCH: + case at.DELETE_FILE: + case at.REAPPLY: + case at.FETCH_RULES: + case at.WEB_SEARCH: + case at.DIFF_HISTORY: + case at.SEARCH_SYMBOLS: + case at.BACKGROUND_COMPOSER_FOLLOWUP: + case at.KNOWLEDGE_BASE: + case at.GET_RELATED_FILES: + case at.READ_FILE_FOR_IMPORTS: + case at.IMPLEMENTER: + case at.PLANNER: + case at.CREATE_FILE: + case at.PARALLEL_APPLY: + case at.WEB_VIEWER: + case at.SEMANTIC_SEARCH_FULL: + case at.RUN_TERMINAL_COMMAND: + case at.UNSPECIFIED: + break; + default: + throw new Error(`Parsing unknown tool: ${t}`); + } + return e; +} +var z2s = ue({ + "out-build/vs/workbench/contrib/composer/browser/capabilities/serializeToolformerBubbleData.js"() { + "use strict"; + + jl(); + } +}); +async function zrr(i, e) { + try { + let t = i; + if ("_v" in t && t._v >= 2) { + const o = await e.composerMessageStorageService.getInitialMessages(t.composerId, t.fullConversationHeadersOnly); + const a = {}; + for (const l of o) { + a[l.bubbleId] = l; + } + t.conversationMap = a; + } + const n = Y2s.sort((o, a) => o.version - a.version); + for (const o of n) { + if (o.check(t)) { + try { + t = await o.migrate(t, e); + } catch (a) { + const l = `error with migration ${o.version}: ${a}`; + console.error(l); + throw new Error(l); + } + t._v = o.version; + } + } + return t; + } catch (t) { + const s = `[composerMigrations] error migrating composer instance data: ${t}`; + console.error(s); + throw new Error(s); + } +} +function Jrr(i) { + const e = JSON.parse(i); + return Object.fromEntries(Object.entries(e).map(([t, s]) => [t, q2s(s)])); +} +function Grr(i) { + let e; + try { + e = Jrr(i); + if (typeof e != "object") { + throw new Error("[composer] unable to parse bubbleDataMap"); + } + for (const [t, s] of Object.entries(e)) { + j2s(s); + } + return e; + } catch (t) { + console.error("[composer] unable to parse bubbleDataMap", t); + return {}; + } +} +var J2s; +var G2s; +var K2s; +var Y2s; +var Krr = ue({ + "out-build/vs/workbench/contrib/composer/browser/composerMigrations.js"() { + "use strict"; + + iu(); + z2s(); + fwe(); + J2s = { + version: 1, + check: i => i._v === 0, + migrate: async (i, e) => { + let t = i; + let s; + if (t.latestCheckpoint) { + s = await e.composerCheckpointStorageService.storeCheckpoint(i.composerId, t.latestCheckpoint); + if (!s) { + console.error("Failed to store latest checkpoint in migration"); + } + } + const n = []; + for (const o of t.conversation) { + const a = o; + let l; + let c; + if (a.checkpoint) { + l = await e.composerCheckpointStorageService.storeCheckpoint(i.composerId, a.checkpoint); + if (!l) { + console.error("Failed to store checkpoint in migration"); + } + } + if (a.afterCheckpoint) { + c = await e.composerCheckpointStorageService.storeCheckpoint(i.composerId, a.afterCheckpoint); + if (!c) { + console.error("Failed to store afterCheckpoint in migration"); + } + } + const u = { + ...o, + checkpointId: l, + afterCheckpointId: c, + _v: 1 + }; + if ("checkpoint" in u) { + delete u.checkpoint; + } + if ("afterCheckpoint" in u) { + delete u.afterCheckpoint; + } + n.push(u); + } + const r = { + ...i, + latestCheckpointId: s, + conversation: n, + _v: 1 + }; + if ("latestCheckpoint" in r) { + delete r.latestCheckpoint; + } + return r; + } + }; + G2s = { + version: 2, + check: i => i._v === 1, + migrate: async (i, e) => { + let t = i; + t.conversation = t.conversation.map(h => tFs(h)); + const s = {}; + const r = t.capabilities.find(h => h.type === as.TOOL_FORMER)?.data; + const o = Grr(r?.bubbleDataMap || "{}"); + const a = {}; + const l = {}; + for (const h of t.conversation) { + const g = h.codeBlocks || []; + for (let p = 0; p < g.length; p++) { + const b = g[p]; + if (b.unregistered === true) { + continue; + } + const v = `${b.uri.toString()}!${b.version}`; + l[v] = { + bubbleId: h.bubbleId, + codeBlockIdx: p + }; + } + } + if (t.codeBlockData) { + for (const h in t.codeBlockData) { + const g = t.codeBlockData[h]; + for (const p of g) { + const b = `${p.uri.toString()}!${p.version}`; + const v = l[b]; + if (v !== undefined) { + const y = `${p.uri.toString()}!${p.version}!${v.codeBlockIdx}`; + a[y] = { + content: p.content, + languageId: p.languageId + }; + } + } + } + } + for (const h of t.conversation) { + const g = { + ...h, + _v: 2 + }; + if (h.bubbleId in o) { + g.toolFormerData = o[h.bubbleId]; + } + if (g.codeBlocks && g.codeBlocks.length > 0) { + for (let p = 0; p < g.codeBlocks.length; p++) { + const b = g.codeBlocks[p]; + if (!b.unregistered) { + const v = b; + const y = `${b.uri.toString()}!${b.version}!${b.codeBlockIdx}`; + const w = { + ...v, + _v: 1 + }; + if (y in a) { + w.content = a[y].content; + if (a[y].languageId !== undefined) { + w.languageId = a[y].languageId; + } + } else { + console.error("[composerMigrations] Code block not found in codeBlockContentMap", y); + w.content = ""; + } + g.codeBlocks[p] = w; + } + } + } + await e.composerMessageStorageService.storeMessage(t.composerId, g); + s[h.bubbleId] = g; + } + const c = {}; + if (t.codeBlockData) { + const h = {}; + for (const g in t.codeBlockData) { + const p = t.codeBlockData[g]; + h[g] = new Set(); + for (const b of p) { + const y = `${b.uri.toString()}!${b.version}`; + if (l[y] === undefined) { + h[g].add(b.version); + console.warn(`[composerMigrations] Code block not found in uriVersionToBlockInfo, removing: ${y}`); + } + } + } + for (const g in t.codeBlockData) { + const p = t.codeBlockData[g]; + const b = h[g]; + c[g] = []; + let v = 0; + const y = new Map(); + for (let w = 0; w < p.length; w++) { + if (b.has(w)) { + v++; + } else { + const C = w - v; + y.set(w, C); + } + } + for (const w of p) { + const C = w.version; + if (b.has(C)) { + continue; + } + const x = `${w.uri.toString()}!${C}`; + const k = l[x]; + const E = y.get(C); + let D; + if (w.originalModelDiffWrtV0 || w.newModelDiffWrtV0) { + D = await e.composerCodeBlockDiffStorageService.storeDiff(t.composerId, { + originalModelDiffWrtV0: w.originalModelDiffWrtV0 || [], + newModelDiffWrtV0: w.newModelDiffWrtV0 || [] + }); + } + delete w.originalModelDiffWrtV0; + delete w.newModelDiffWrtV0; + c[g].push({ + ...w, + _v: 1, + version: E, + bubbleId: k.bubbleId, + codeBlockIdx: k.codeBlockIdx, + diffId: D + }); + } + } + } + const u = t.conversation.map(h => ({ + bubbleId: h.bubbleId, + type: h.type, + serverBubbleId: h.serverBubbleId + })); + const d = { + ...t, + fullConversationHeadersOnly: u, + conversationMap: s, + codeBlockData: c, + _v: 2 + }; + delete d.conversation; + return d; + } + }; + K2s = { + version: 3, + check: i => i._v === 2, + migrate: async (i, e) => { + const t = i; + const s = {}; + for (const l in t.codeBlockData) { + const c = t.codeBlockData[l]; + s[l] = []; + for (const u of c) { + const { + isChained: d, + _v: h, + ...g + } = u; + const p = { + ...g, + _v: 2, + chainedInfo: undefined + }; + if (d) { + let b; + for (let v = u.version - 1; v >= 0; v--) { + const y = c[v]; + if (y?.diffId !== undefined) { + b = y.version; + break; + } + } + if (b !== undefined) { + p.chainedInfo = { + chainedFromVersion: b + }; + } + } + s[l].push(p); + } + } + const { + codeBlockData: n, + _v: r, + ...o + } = t; + return { + ...o, + codeBlockData: s, + _v: 3 + }; + } + }; + Y2s = [J2s, G2s, K2s]; + } +}); +function ma(i) { + if (i < sYt) { + return sYt; + } else if (i > nYt) { + return nYt; + } else { + return i; + } +} +var sYt; +var nYt; +var pA = ue({ + "out-build/vs/base/common/externalTypes.js"() { + "use strict"; + + Hr(); + sYt = -2147483648; + nYt = 2147483647; + } +}); +function lgt(i) { + return `bubble-${i.split("-").pop()}`; +} +function HJ(i) { + const e = js().document.getElementById(lgt(i)); + if (e) { + e.focus(); + } +} +function cgt() { + let i = "abcdefghijklmnopqrstuvwxyz"; + let e = ""; + for (let t = 0; t < 10; t++) { + e += i.charAt(Math.floor(Math.random() * i.length)); + } + return e; +} +function ugt(i) { + return [...i].sort((e, t) => { + const s = e.lastUpdatedAt ?? e.createdAt; + return (t.lastUpdatedAt ?? t.createdAt) - s; + }); +} +function Yrr(i) { + if (i.unifiedMode === undefined) { + i.unifiedMode = i.isAgentic ? "agent" : i.forceMode ?? "edit"; + } + if (i.forceMode === undefined) { + i.forceMode = i.unifiedMode === "chat" ? "chat" : "edit"; + } + return i; +} +function dgt(i) { + if (i) { + return i.lastUpdatedAt ?? i.createdAt; + } else { + return 0; + } +} +function X2s(i) { + const e = Date.now(); + const t = Math.floor((e - i) / 1000); + const s = new Date(i); + const n = new Date(); + s.setHours(0, 0, 0, 0); + n.setHours(0, 0, 0, 0); + const r = Math.floor((n.getTime() - s.getTime()) / 86400000); + if (r === 0) { + return "Today"; + } else if (r === 1) { + return "Yesterday"; + } else if (r < 7) { + return `${r}d ago`; + } else if (r < 30) { + return `${Math.floor(r / 7)}w ago`; + } else if (r < 365) { + return `${Math.floor(r / 30)}mo ago`; + } else { + return `${Math.floor(t / 31536000)}y ago`; + } +} +function IU(i) { + const e = Math.floor((Date.now() - i) / 1000); + if (e < 60) { + return "Just now"; + } else if (e < 3600) { + return `${Math.floor(e / 60)}m ago`; + } else if (e < 86400) { + return `${Math.floor(e / 3600)}h ago`; + } else if (e < 604800) { + return `${Math.floor(e / 86400)}d ago`; + } else if (e < 2592000) { + return `${Math.floor(e / 604800)}w ago`; + } else if (e < 31536000) { + return `${Math.floor(e / 2592000)}mo ago`; + } else { + return `${Math.floor(e / 31536000)}y ago`; + } +} +function dwe(i) { + if (i.length <= yGt) { + return i.length; + } + let e = 0; + let t = 0; + for (let s = i.length - 1; s >= 0; s--) { + const n = i[s][0].messages.length; + const r = i[s][1].messages.length; + const o = n + r; + e += o; + t++; + if (e >= eLs && t >= yGt) { + break; + } + } + return t; +} +function Q2s(i) { + const e = []; + let t = { + startIndex: 0, + kind: _n.HUMAN, + messages: [] + }; + let s; + for (let n = 0; n < i.length; n++) { + const r = i[n]; + if (s !== undefined && r.type === _n.HUMAN) { + e.push([t, s]); + t = { + startIndex: n, + kind: _n.HUMAN, + messages: [] + }; + s = undefined; + } + if (r.type === _n.HUMAN) { + t.messages.push(r); + } else if (r.type === _n.AI) { + if (s === undefined) { + s = { + startIndex: n, + kind: _n.AI, + messages: [] + }; + } + s.messages.push(r); + } + } + if (s === undefined) { + s = { + startIndex: i.length, + kind: _n.AI, + messages: [] + }; + } + e.push([t, s]); + return e; +} +function Xrr(i) { + switch (i) { + case at.READ_SEMSEARCH_FILES: + return "readSemsearchFilesParams"; + case at.READ_FILE_FOR_IMPORTS: + return "readFileForImportsParams"; + case at.RIPGREP_SEARCH: + return "ripgrepSearchParams"; + case at.FILE_SEARCH: + return "fileSearchParams"; + case at.RUN_TERMINAL_COMMAND_V2: + return "runTerminalCommandV2Params"; + case at.FETCH_RULES: + return "fetchRulesParams"; + case at.PLANNER: + return "plannerParams"; + case at.RUN_TERMINAL_COMMAND: + return "runTerminalCommandParams"; + case at.READ_FILE: + return "readFileParams"; + case at.LIST_DIR: + return "listDirParams"; + case at.EDIT_FILE: + return "editFileParams"; + case at.SEMANTIC_SEARCH_FULL: + return "semanticSearchFullParams"; + case at.CREATE_FILE: + return "createFileParams"; + case at.DELETE_FILE: + return "deleteFileParams"; + case at.REAPPLY: + return "reapplyParams"; + case at.PARALLEL_APPLY: + return "parallelApplyParams"; + case at.GET_RELATED_FILES: + return "getRelatedFilesParams"; + case at.WEB_SEARCH: + return "webSearchParams"; + case at.WEB_VIEWER: + return "webViewerParams"; + case at.MCP: + return "mcpParams"; + case at.DIFF_HISTORY: + return "diffHistoryParams"; + case at.IMPLEMENTER: + return "implementerParams"; + case at.SEARCH_SYMBOLS: + return "searchSymbolsParams"; + case at.KNOWLEDGE_BASE: + return "knowledgeBaseParams"; + case at.BACKGROUND_COMPOSER_FOLLOWUP: + return "backgroundComposerFollowupParams"; + case at.UNSPECIFIED: + return; + default: + { + const e = i; + return; + } + } +} +function Z2s(i) { + const { + added: e, + removed: t, + linterErrorCount: s, + version: n + } = i; + let r = ""; + if (n) { + r += `Version ${n.current}/${n.latest} +`; + } + r += `${e} lines added, ${t} lines removed`; + if (s !== undefined) { + r += ` +${s} linter error${s === 1 ? "" : "s"}`; + } + return r; +} +var x5; +var rYt; +var hgt; +var pS = ue({ + "out-build/vs/workbench/contrib/composer/browser/utils.js"() { + "use strict"; + + xe(); + rt(); + od(); + gs(); + jm(); + Lc(); + jl(); + Wo(); + pA(); + wl(); + $l(); + x5 = i => Gt ? `\u2318${i}` : `^${i}`; + rYt = async (i, e, t, s = false) => { + if (await e.exists(i)) { + t.open(i, { + openToSide: s, + editorOptions: { + revealIfVisible: true, + revealIfOpened: true, + source: Cd.USER, + preserveFocus: true + }, + fromUserGesture: true + }); + } + }; + hgt = (i, e, t, s) => { + const n = xg(e.resolveRelativePath(i.uri.path ?? ""), { + startLineNumber: i.range.selectionStartLineNumber, + startColumn: 1, + endLineNumber: i.range.positionLineNumber, + endColumn: 1 + }); + t.open(n, { + openToSide: false, + editorOptions: { + revealIfVisible: true, + revealIfOpened: true, + source: Cd.USER + }, + fromUserGesture: true, + ...s + }); + }; + } +}); +function eFs(i) { + return `composerData:${i}`; +} +function fgt(i, e) { + const t = iFs(i); + const s = [1000, 5000, 10000, 20000]; + let n = 0; + const r = async () => { + try { + await new Promise(o => setTimeout(o, Math.random() * 40 + 10)); + await e.cursorDiskKVSet(eFs(i.composerId), t); + } catch (o) { + if (n < s.length) { + console.warn(`[composer] Failed to migrate composer data (attempt ${n + 1}), retrying in ${s[n] / 1000}s`, o); + await new Promise(a => setTimeout(a, s[n])); + n++; + return r(); + } + console.error("[composer] Failed to migrate composer data after all retries", o); + } + }; + r().catch(o => { + console.error("[composer] Unexpected error during migration retry", o); + }); +} +function Qrr(i, e) { + let t = i.hasMigratedMultipleComposers ?? false; + let s; + if (!t && "selectedComposerId" in i) { + s = { + ...i, + selectedComposerIds: [i.selectedComposerId], + composerHandles: {} + }; + } else { + s = i; + if (s.selectedComposerIds.length === 0) { + const c = s.allComposers[0]; + if (c) { + s.selectedComposerIds = [c.composerId]; + } + } + } + let n = s.hasMigratedComposerData ?? false; + let r = false; + let o = s.allComposers; + if (!n) { + o = o.map(c => c.type === "head" ? c : (fgt(c, e.storageService), VJ(c))); + n = true; + r = true; + } + o = ugt(o).map(Yrr); + let l = (s.selectedComposerIds || []).filter(c => o.some(u => u.composerId === c)); + if (l.length === 0 || nFs) { + const c = Ft(); + const u = wE(c); + fgt(u, e.storageService); + l = [c]; + o = [VJ(u), ...o]; + r = true; + } + s = { + allComposers: o, + selectedComposerIds: l, + hasMigratedComposerData: n, + hasMigratedMultipleComposers: true, + composerHandles: {} + }; + return [s, { + didMigrateComposerOrChatData: r + }]; +} +function Zrr(i, e) { + if (i.length <= e) { + return i; + } + let s = i.length - e; + while (s < i.length && i[s].type !== _n.HUMAN) { + s++; + } + return i.slice(s); +} +async function eor(i, e) { + let t = tor(i); + t = await zrr(t, e); + return t; +} +function tFs(i) { + if (i.type === _n.AI) { + i.text = i.text.replace(/^[\r\n]+/, ""); + } + const e = i.codeBlocks?.map(r => r.unregistered ? r : { + ...r, + uri: V.revive(r.uri) + }); + const t = i.capabilityStatuses ? { + ...ZKt(), + ...Object.fromEntries(Object.entries(i.capabilityStatuses).map(([r, o]) => [r, o.map(a => ({ + ...a, + status: a.status === "generating" ? "aborted" : a.status + }))])) + } : undefined; + let s; + try { + s = "toolFormerData" in i && i.toolFormerData !== undefined && i.toolFormerData.tool !== undefined ? j2s(q2s(i.toolFormerData)) : undefined; + } catch (r) { + console.error("[composer] Error parsing toolFormerData", r); + } + const n = i.type === _n.HUMAN ? { + ...Jm(), + ...(i.context ? kft(i.context) : {}) + } : undefined; + return { + ...ty(), + ...i, + codeBlocks: e, + capabilityStatuses: t, + toolFormerData: s, + context: n + }; +} +function tor(i) { + const e = JSON.parse(i); + const t = { + ...wE(e.composerId), + ...e + }; + if (!("_v" in e)) { + t._v = 0; + } + if (t.unifiedMode === undefined) { + if (t.isAgentic) { + t.unifiedMode = "agent"; + } else { + t.unifiedMode = t.forceMode ?? "edit"; + } + } + t.forceMode = t.unifiedMode === "chat" ? "chat" : "edit"; + t.isAgentic = t.unifiedMode === "agent"; + t.context = { + ...Jm(), + ...kft(e.context) + }; + t.fullConversationHeadersOnly = Zrr(t.fullConversationHeadersOnly || [], 1000); + t.codeBlockData = Object.fromEntries(Object.entries(e.codeBlockData).map(([n, r]) => [n, r.map(o => { + if (o.version === 0 && o.originalModelLines !== undefined) { + t.originalModelLines[n] = o.originalModelLines; + } + let a = o.status; + if (a === "generating") { + a = "aborted"; + } else if (a === "applying") { + a = "cancelled"; + } + const l = V.revive(o.uri); + return { + ...o, + uri: l, + status: a + }; + })])); + t.newlyCreatedFiles = (t.newlyCreatedFiles || []).map(n => ({ + ...n, + uri: V.revive(n.uri) + })); + t.newlyCreatedFolders = (t.newlyCreatedFolders || []).map(n => ({ + ...n, + uri: V.revive(n.uri) + })); + let s = t.status; + if (s === "generating") { + s = "aborted"; + } + t.status = s; + t.hasLoaded = false; + if (t.allAttachedFileCodeChunksUris) { + t.allAttachedFileCodeChunksUris = new Set(Array.isArray(t.allAttachedFileCodeChunksUris) ? t.allAttachedFileCodeChunksUris : []); + } else { + t.allAttachedFileCodeChunksUris = new Set(); + } + return t; +} +function ior(i) { + for (const e of i.capabilities) { + e.dispose(); + } +} +function sor(i) { + const { + composerId: e, + name: t, + text: s, + richText: n, + fullConversationHeadersOnly: r, + status: o, + lastUpdatedAt: a, + createdAt: l, + codeBlockData: c, + hasChangedContext: u, + capabilities: d, + unifiedMode: h, + originalModelLines: g, + newlyCreatedFiles: p, + newlyCreatedFolders: b, + latestConversationSummary: v, + dontShowSummarizeForLongChats: y, + tokenCount: w, + latestChatGenerationUUID: C, + latestCheckpointId: S, + currentBubbleId: x, + editingBubbleId: k, + selectedBubbleId: E, + usageData: D, + allAttachedFileCodeChunksUris: P, + _v: R + } = i; + let L = i.context; + const F = Object.fromEntries(Object.entries(c).map(([U, j]) => [U, j.map(ie => { + let ee = ie.status; + if (ee === "generating") { + ee = "aborted"; + } else if (ee === "applying") { + ee = "cancelled"; + } + return { + ...ie, + status: ee + }; + })])); + const O = o === "generating" ? "aborted" : o; + L = { + ...L, + terminalFiles: undefined + }; + return { + ...wE(), + composerId: e, + name: t, + text: s, + richText: n, + fullConversationHeadersOnly: r, + status: O, + lastUpdatedAt: a, + createdAt: l, + context: L, + codeBlockData: F, + hasChangedContext: u, + capabilities: d, + unifiedMode: h, + originalModelLines: g, + newlyCreatedFiles: p, + newlyCreatedFolders: b, + latestConversationSummary: v, + dontShowSummarizeForLongChats: y, + tokenCount: w, + latestChatGenerationUUID: C, + latestCheckpointId: S, + currentBubbleId: x, + editingBubbleId: k, + selectedBubbleId: E, + forceMode: h === "agent" ? "edit" : h, + isAgentic: h === "agent", + usageData: D, + allAttachedFileCodeChunksUris: Array.from(P || new Set()), + _v: R + }; +} +function iFs(i) { + return JSON.stringify(sor(i)); +} +function sFs(i, e, t, s) { + const n = wE(i); + const r = wE(e, "chat"); + fgt(n, t); + fgt(r, t); + return { + allComposers: [VJ(n), VJ(r)], + selectedComposerIds: [i], + hasMigratedComposerData: s, + hasMigratedMultipleComposers: true, + composerHandles: {} + }; +} +function nor(i, e, t, s, n) { + const r = t.getWorkbenchState() === 1 ? -1 : 1; + let o; + o = i.get(n, r); + let a = false; + let l = true; + let c = false; + let u = { + allComposers: [], + selectedComposerIds: [], + hasMigratedComposerData: a, + hasMigratedMultipleComposers: l, + composerHandles: {} + }; + if (o) { + try { + let p = JSON.parse(o); + if (p) { + const [b, v] = Qrr(p, { + workspaceContextService: t, + storageService: i, + reactiveStorageService: e, + composerDataHandleManager: s + }); + u = b; + c = v.didMigrateComposerOrChatData; + } else { + throw new Error("[composer] No stored composers data found"); + } + } catch (p) { + console.error("[composer] Error parsing stored composers data:", p); + const b = Ft(); + u = sFs(b, Ft(), i, a); + } + } else { + const p = Ft(); + c = true; + u = sFs(p, Ft(), i, a); + } + const [d, h] = yp(u); + return [d, h, () => { + const p = Ft(); + const b = wE(p); + const v = Ft(); + const y = wE(v, "chat"); + s.pushComposer(b); + s.pushComposer(y); + h("allComposers", [VJ(b), VJ(y)]); + h("selectedComposerIds", [p]); + return b; + }, { + shouldWaitFor10SecondsWhileReadingFromDiskAtStartup: c, + fromDate: Date.now() + }]; +} +function ror(i) { + return yp(i); +} +function oYt(i) { + if (i instanceof N) { + return i.toJsonString(); + } + if (Array.isArray(i)) { + return i.map(e => oYt(e)); + } + if (i !== null && typeof i == "object") { + const e = {}; + for (const t in i) { + if (t in i) { + e[t] = oYt(i[t]); + } + } + return e; + } + return i; +} +var nFs; +var hwe; +var fwe = ue({ + "out-build/vs/workbench/contrib/composer/browser/composerDataCreation.js"() { + "use strict"; + + Hr(); + kh(); + Lc(); + Le(); + Ps(); + av(); + Bf(); + z2s(); + nf(); + Krr(); + pS(); + nFs = false; + hwe = i => JSON.stringify(oYt(i)); + } +}); +var rFs; +var Gse; +var rO; +var DU; +var TU; +var PU = ue({ + "out-build/vs/workbench/contrib/composer/browser/composerCheckpointStorageService.js"() { + "use strict"; + + te(); + q(); + It(); + nf(); + qt(); + Ps(); + dc(); + rFs = false; + Gse = rFs ? console.log : () => {}; + rO = Ve("composerCheckpointStorageService"); + DU = "checkpointId"; + TU = class extends H { + constructor(e) { + super(); + this._storageService = e; + } + async storeCheckpoint(e, t) { + if (!e) { + throw new Error("[composer] composerId is undefined"); + } + const s = Ft(); + Gse("[composer] storing checkpoint", `${DU}:${e.slice(0, 4)}:${s.slice(0, 4)}`); + this._storageService.cursorDiskKVSet(`${DU}:${e}:${s}`, JSON.stringify(t)); + return s; + } + async updateCheckpoint(e, t, s) { + if (!t || !e) { + throw new Error("[composer] checkpointId or composerId is undefined" + JSON.stringify({ + checkpointId: t, + composerId: e + })); + } + Gse("[composer] updating checkpoint", `${DU}:${e.slice(0, 4)}:${t.slice(0, 4)}`); + const n = await this.retrieveCheckpoint(e, t); + if (n) { + s(n); + this._storageService.cursorDiskKVSet(`${DU}:${e}:${t}`, JSON.stringify(n)); + } else { + console.error("[composer] No checkpoint found for id", t); + } + } + async retrieveCheckpoint(e, t) { + if (!t || !e) { + throw new Error("[composer] checkpointId or composerId is undefined" + JSON.stringify({ + checkpointId: t, + composerId: e + })); + } + Gse("[composer] retrieving checkpoint", `${DU}:${e.slice(0, 4)}:${t.slice(0, 4)}`); + const s = await this._storageService.cursorDiskKVGet(`${DU}:${e}:${t}`); + if (!s) { + return; + } + let n = QKt(JSON.parse(s)); + n &&= QKt(n); + Gse("[composer] retrieved checkpoint", { + checkpoint: n + }); + return n; + } + async clearComposerCheckpoints(e) { + if (!e) { + throw new Error("[composer] composerId is undefined"); + } + Gse("[composer] clearing all checkpoints for composer", e); + return this._storageService.cursorDiskKVClearPrefix(`${DU}:${e}:`).catch(t => { + console.error(`[composer] Error clearing checkpoints for composer ${e}:`, t); + }); + } + }; + __decorate([Xt("ComposerCheckpointStorageService.storeCheckpoint")], TU.prototype, "storeCheckpoint", null); + __decorate([Xt("ComposerCheckpointStorageService.updateCheckpoint")], TU.prototype, "updateCheckpoint", null); + __decorate([Xt("ComposerCheckpointStorageService.retrieveCheckpoint")], TU.prototype, "retrieveCheckpoint", null); + __decorate([Xt("ComposerCheckpointStorageService.clearComposerCheckpoints")], TU.prototype, "clearComposerCheckpoints", null); + TU = __decorate([__param(0, ht)], TU); + it(rO, TU, 1); + } +}); +var oFs; +var LU; +var Kse; +var k5; +var oO; +var gwe = ue({ + "out-build/vs/workbench/contrib/composer/browser/composerMessageStorageService.js"() { + "use strict"; + + te(); + q(); + It(); + qt(); + dc(); + pS(); + fwe(); + oFs = false; + LU = oFs ? console.log : () => {}; + Kse = Ve("composerMessageStorageService"); + k5 = "bubbleId"; + oO = class extends H { + constructor(e) { + super(); + this._storageService = e; + } + async storeMessage(e, t) { + if (!e) { + throw new Error("[composer] composerId is undefined"); + } + const s = t.bubbleId; + await this._storageService.cursorDiskKVSet(`${k5}:${e}:${s}`, hwe(t)); + return s; + } + async updateMessage(e, t, s) { + if (!t || !e) { + throw new Error("[composer] messageId or composerId is undefined" + JSON.stringify({ + messageId: t, + composerId: e + })); + } + LU("[composer] updating message", `${k5}:${e.slice(0, 4)}:${t.slice(0, 4)}`); + const n = await this.retrieveMessage(e, t); + if (n) { + s(n); + await this._storageService.cursorDiskKVSet(`${k5}:${e}:${t}`, hwe(n)); + } else { + console.error("[composer] No message found for id", t); + } + } + async retrieveMessage(e, t) { + if (!t || !e) { + throw new Error("[composer] messageId or composerId is undefined" + JSON.stringify({ + messageId: t, + composerId: e + })); + } + LU("[composer] retrieving message", `${k5}:${e.slice(0, 4)}:${t.slice(0, 4)}`); + const s = await this._storageService.cursorDiskKVGet(`${k5}:${e}:${t}`); + if (!s) { + return; + } + const n = tFs(JSON.parse(s)); + LU("[composer] retrieved message", { + message: n + }); + return n; + } + async deleteMessage(e, t) { + if (!t || !e) { + throw new Error("[composer] messageId or composerId is undefined" + JSON.stringify({ + messageId: t, + composerId: e + })); + } + LU("[composer] deleting message", `${k5}:${e.slice(0, 4)}:${t.slice(0, 4)}`); + await this._storageService.cursorDiskKVSet(`${k5}:${e}:${t}`, undefined); + } + async clearComposerMessages(e) { + if (!e) { + throw new Error("[composer] composerId is undefined"); + } + LU("[composer] clearing all messages for composer", e); + return this._storageService.cursorDiskKVClearPrefix(`${k5}:${e}:`).catch(t => { + console.error(`[composer] Error clearing messages for composer ${e}:`, t); + }); + } + async getInitialMessages(e, t) { + LU("[composer] calculating initial messages to load for composer", e); + const s = Q2s(t); + const n = dwe(s); + const r = s.length - n; + const o = s.slice(r).flatMap(l => l.flatMap(c => c.messages.map(u => u.bubbleId))); + LU("[composer] loading exactly", o.length, "messages"); + const a = []; + for (const l of o) { + const c = await this.retrieveMessage(e, l); + if (c) { + a.push(c); + } else { + console.warn(`[composer] message with ID ${l} not found for composer ${e}`); + } + } + return a; + } + }; + __decorate([Xt("ComposerMessageStorageService.storeMessage")], oO.prototype, "storeMessage", null); + __decorate([Xt("ComposerMessageStorageService.updateMessage")], oO.prototype, "updateMessage", null); + __decorate([Xt("ComposerMessageStorageService.retrieveMessage")], oO.prototype, "retrieveMessage", null); + __decorate([Xt("ComposerMessageStorageService.deleteMessage")], oO.prototype, "deleteMessage", null); + __decorate([Xt("ComposerMessageStorageService.clearComposerMessages")], oO.prototype, "clearComposerMessages", null); + __decorate([Xt("ComposerMessageStorageService.getInitialMessages")], oO.prototype, "getInitialMessages", null); + oO = __decorate([__param(0, ht)], oO); + it(Kse, oO, 1); + } +}); +var aFs; +var qJ; +var RU; +var aO; +var E5; +var jJ = ue({ + "out-build/vs/workbench/contrib/composer/browser/composerCodeBlockDiffStorageService.js"() { + "use strict"; + + te(); + q(); + It(); + qt(); + Ps(); + dc(); + aFs = false; + qJ = aFs ? console.log : () => {}; + RU = Ve("composerCodeBlockDiffStorageService"); + aO = "codeBlockDiff"; + E5 = class extends H { + constructor(e) { + super(); + this._storageService = e; + } + async storeDiff(e, t) { + if (!e) { + throw new Error("[composer] composerId is undefined"); + } + const s = Ft(); + qJ("[composer] storing diff", `${aO}:${e.slice(0, 4)}:${s.slice(0, 4)}`); + this._storageService.cursorDiskKVSet(`${aO}:${e}:${s}`, JSON.stringify(t)); + return s; + } + async updateDiff(e, t, s) { + if (!t || !e) { + throw new Error("[composer] diffId or composerId is undefined" + JSON.stringify({ + diffId: t, + composerId: e + })); + } + qJ("[composer] updating diff", `${aO}:${e.slice(0, 4)}:${t.slice(0, 4)}`); + const n = await this.retrieveDiff(e, t); + if (n) { + s(n); + this._storageService.cursorDiskKVSet(`${aO}:${e}:${t}`, JSON.stringify(n)); + } else { + console.error("[composer] No diff found for id", t); + } + } + async retrieveDiff(e, t) { + if (!t || !e) { + throw new Error("[composer] diffId or composerId is undefined" + JSON.stringify({ + diffId: t, + composerId: e + })); + } + qJ("[composer] retrieving diff", `${aO}:${e.slice(0, 4)}:${t.slice(0, 4)}`); + const s = await this._storageService.cursorDiskKVGet(`${aO}:${e}:${t}`); + if (!s) { + return; + } + const n = JSON.parse(s); + qJ("[composer] retrieved diff", { + diff: n + }); + return n; + } + async deleteDiff(e, t) { + if (!t || !e) { + throw new Error("[composer] diffId or composerId is undefined" + JSON.stringify({ + diffId: t, + composerId: e + })); + } + qJ("[composer] deleting diff", `${aO}:${e.slice(0, 4)}:${t.slice(0, 4)}`); + await this._storageService.cursorDiskKVSet(`${aO}:${e}:${t}`, undefined); + } + async clearComposerDiffs(e) { + if (!e) { + throw new Error("[composer] composerId is undefined"); + } + qJ("[composer] clearing all diffs for composer", e); + return this._storageService.cursorDiskKVClearPrefix(`${aO}:${e}:`).catch(t => { + console.error(`[composer] Error clearing diffs for composer ${e}:`, t); + }); + } + }; + __decorate([Xt("ComposerCodeBlockDiffStorageService.storeDiff")], E5.prototype, "storeDiff", null); + __decorate([Xt("ComposerCodeBlockDiffStorageService.updateDiff")], E5.prototype, "updateDiff", null); + __decorate([Xt("ComposerCodeBlockDiffStorageService.retrieveDiff")], E5.prototype, "retrieveDiff", null); + __decorate([Xt("ComposerCodeBlockDiffStorageService.deleteDiff")], E5.prototype, "deleteDiff", null); + __decorate([Xt("ComposerCodeBlockDiffStorageService.clearComposerDiffs")], E5.prototype, "clearComposerDiffs", null); + E5 = __decorate([__param(0, ht)], E5); + it(RU, E5, 1); + } +}); +function oor(i, e, t) { + return i.createInstance(ggt, e, t); +} +function Yse(i) { + return new lFs(new aYt(i)); +} +var ggt; +var Xse; +var aYt; +var lFs; +var zJ = ue({ + "out-build/vs/workbench/contrib/composer/browser/composerDataHandle.js"() { + "use strict"; + + q(); + qt(); + Cs(); + nf(); + fwe(); + Ps(); + kh(); + PU(); + gwe(); + jJ(); + dc(); + ggt = class extends H { + constructor(e, t, s, n, r, o, a) { + super(); + this.composerWasLoadedHook = e; + this.composerWasUnloadedHook = t; + this.storageService = s; + this.reactiveStorageService = n; + this.composerCheckpointStorageService = r; + this.composerMessageStorageService = o; + this.composerCodeBlockDiffStorageService = a; + this.loadedComposers = {}; + this.composerIdToHandles = {}; + this.D(this.storageService.cursorDiskKVOnShouldSave(async () => { + await Promise.allSettled([...Object.values(this.loadedComposers).map(l => this.persistLoadedComposer(l))]); + })); + } + async persistLoadedComposer(e) { + await Promise.all([this.storageService.cursorDiskKVSet(this.getComposerDataStorageKey(e.data.composerId), iFs(e.data)), ...Object.values(e.data.conversationMap).map(t => this.composerMessageStorageService.storeMessage(e.data.composerId, t))]); + } + getWeakHandleOptimistic(e) { + if (e in this.loadedComposers) { + return new Xse(e, this, this.reactiveStorageService, true); + } + } + async pushComposer(e) { + if (!(e.composerId in this.loadedComposers)) { + this.loadedComposers[e.composerId] = new aYt(e); + await this.composerWasLoadedHook(new Xse(e.composerId, this, this.reactiveStorageService, true)); + } + } + async deleteComposer(e) { + await this.unloadComposer(e, true); + } + async unloadComposer(e, t = false) { + const s = this.loadedComposers[e]; + if (this.composerIdToHandles[e]?.length && t === false) { + throw new Error("[composer] unloadComposer: composer is still in use with strong handle"); + } + if (!t && s !== undefined && !N2s(s.data)) { + await this.persistLoadedComposer(s); + } + if (s !== undefined) { + ior(s.data); + this.composerWasUnloadedHook(s.data.composerId); + delete this.loadedComposers[e]; + } + if (t) { + await this.storageService.cursorDiskKVSet(this.getComposerDataStorageKey(e), undefined); + } + } + async getHandle(e, t) { + const s = { + stack: [], + error: undefined, + hasError: false + }; + try { + const n = __addDisposableResource(s, Kc("getHandle"), false); + if (e in this.loadedComposers) { + return new Xse(e, this, this.reactiveStorageService, false); + } + let r = t ? Date.now() + t : Date.now() - 10; + do { + try { + const o = await this.storageService.cursorDiskKVGet(this.getComposerDataStorageKey(e)); + if (e in this.loadedComposers) { + return new Xse(e, this, this.reactiveStorageService, false); + } + if (o) { + const a = await eor(o, { + composerCheckpointStorageService: this.composerCheckpointStorageService, + composerMessageStorageService: this.composerMessageStorageService, + composerCodeBlockDiffStorageService: this.composerCodeBlockDiffStorageService + }); + await this.pushComposer(a); + return new Xse(e, this, this.reactiveStorageService, false); + } + } catch (o) { + console.error("[composer] Error loading composer data:", o); + n.setError(`[composer] Error loading composer data: ${o}`); + } + await new Promise(o => setTimeout(o, Math.min(100, (t ?? 400) / 4))); + } while (Date.now() < r); + return; + } catch (n) { + s.error = n; + s.hasError = true; + } finally { + __disposeResources(s); + } + } + getComposerDataStorageKey(e) { + return eFs(e); + } + addHandle(e) { + const t = e.composerId; + if (!(t in this.composerIdToHandles)) { + this.composerIdToHandles[t] = []; + } + this.composerIdToHandles[t].push(e); + } + removeHandle(e) { + const t = e.composerId; + if (!(t in this.composerIdToHandles)) { + throw new Error("[composer] removeHandle: composerId not found: " + t); + } + this.composerIdToHandles[t] = this.composerIdToHandles[t].filter(s => s !== e); + if (this.composerIdToHandles[t].length === 0) { + delete this.composerIdToHandles[t]; + this.unloadComposer(t); + } + } + getLoadedComposer(e) { + return this.loadedComposers[e]; + } + getLoadedComposers() { + return Object.keys(this.loadedComposers); + } + }; + ggt = __decorate([__param(2, ht), __param(3, _i), __param(4, rO), __param(5, Kse), __param(6, RU)], ggt); + Xse = class e9i extends H { + constructor(e, t, s, n = false) { + super(); + this.composerId = e; + this.composerDataHandleService = t; + this.reactiveStorageService = s; + this.isWeak = n; + this.handleId = Ft(); + this.setData = (...r) => { + if (this.isDisposed) { + throw new Error("[composer] Composer data handle is disposed"); + } + const o = this.composerDataHandleService.getLoadedComposer(this.composerId); + if (!o) { + throw new Error("[composer] No loaded composer found"); + } + return o.setData(...r); + }; + this.isDisposed = false; + if (!n) { + this.composerDataHandleService.addHandle(this); + } + } + clone() { + if (this.isDisposed) { + throw new Error("[composerDataHandle] cannot clone already-dispoed handle for composer id" + this.composerId); + } + return new e9i(this.composerId, this.composerDataHandleService, this.reactiveStorageService, this.isWeak); + } + cloneWeak() { + if (this.isDisposed) { + throw new Error("[composerDataHandle] cannot clone already-dispoed handle for composer id" + this.composerId); + } + return new e9i(this.composerId, this.composerDataHandleService, this.reactiveStorageService, true); + } + get data() { + if (this.isDisposed) { + throw new Error("[composer] Composer data handle is disposed"); + } + const e = this.composerDataHandleService.getLoadedComposer(this.composerId); + if (!e) { + throw new Error("[composer] No loaded composer found"); + } + return e.data; + } + dispose() { + if (this.isDisposed) { + console.error("[composerDataHandle] disposing already-disposed handle " + this.composerId); + return; + } + super.dispose(); + this.isDisposed = true; + if (!this.isWeak) { + this.composerDataHandleService.removeHandle(this); + } + } + get composerStateNonPersistentUnwrapped() { + return fh(this.reactiveStorageService.nonPersistentStorage.composerState); + } + get composerStatePersistentUnwrapped() { + return fh(this.reactiveStorageService.workspaceUserPersistentStorage.composerState); + } + }; + aYt = class { + constructor(i) { + [this.data, this.setData] = ror(i); + this.setData("unifiedMode", "agent"); + this.createdAt = Date.now(); + } + }; + lFs = class qOn { + constructor(e) { + this.isDisposed = false; + this.setData = (...t) => { + this.loadedComposerData.setData(...t); + }; + this.loadedComposerData = e; + } + clone() { + return new qOn(this.loadedComposerData); + } + dispose() { + this.isDisposed = true; + } + get data() { + return this.loadedComposerData.data; + } + }; + } +}); +var ec; +var I5; +var xd = ue({ + "out-build/vs/workbench/contrib/notebook/common/notebookService.js"() { + "use strict"; + + te(); + ec = Ve("notebookService"); + I5 = class { + constructor(i, e, t) { + this.viewType = i; + this.serializer = e; + this.extensionData = t; + } + }; + } +}); +var zx; +var mA = ue({ + "out-build/vs/workbench/contrib/notebook/common/notebookEditorModelResolverService.js"() { + "use strict"; + + te(); + zx = Ve("INotebookModelResolverService"); + } +}); +var rg; +var Zp = ue({ + "out-build/vs/workbench/common/editor/editorInput.js"() { + "use strict"; + + pe(); + Nn(); + Et(); + rg = class extends WGt { + constructor() { + super(...arguments); + this.f = this.D(new B()); + this.g = this.D(new B()); + this.j = this.D(new B()); + this.n = this.D(new B()); + this.onDidChangeDirty = this.f.event; + this.onDidChangeLabel = this.g.event; + this.onDidChangeCapabilities = this.j.event; + this.onWillDispose = this.n.event; + } + get editorId() {} + get capabilities() { + return 2; + } + hasCapability(i) { + if (i === 0) { + return this.capabilities === 0; + } else { + return (this.capabilities & i) !== 0; + } + } + isReadonly() { + return this.hasCapability(2); + } + getName() { + return `Editor ${this.typeId}`; + } + getDescription(i) {} + getTitle(i) { + return this.getName(); + } + getLabelExtraClasses() { + return []; + } + getAriaLabel() { + return this.getTitle(0); + } + getIcon() {} + getTelemetryDescriptor() { + return { + typeId: this.typeId + }; + } + isDirty() { + return false; + } + isModified() { + return this.isDirty(); + } + isSaving() { + return false; + } + async resolve() { + return null; + } + async save(i, e) { + return this; + } + async saveAs(i, e) { + return this; + } + async revert(i, e) {} + async rename(i, e) {} + copy() { + return this; + } + canMove(i, e) { + return true; + } + matches(i) { + if (Bc(i)) { + return this === i; + } + const e = i.options?.override; + if (this.editorId !== e && e !== undefined && this.editorId !== undefined) { + return false; + } else { + return Ls(this.resource, vo.getCanonicalUri(i)); + } + } + prefersEditorPane(i) { + return i.at(0); + } + toUntyped(i) {} + isDisposed() { + return this.B.isDisposed; + } + dispose() { + if (!this.isDisposed()) { + this.n.fire(); + } + super.dispose(); + } + }; + } +}); +var lO; +var JJ; +var pgt = ue({ + "out-build/vs/workbench/common/resources.js"() { + "use strict"; + + Le(); + Jr(); + pn(); + pe(); + Et(); + q(); + Qp(); + ii(); + Me(); + At(); + In(); + zb(); + JJ = class extends H { + static { + lO = this; + } + static { + this.a = null; + } + constructor(e, t, s, n) { + super(); + this.g = e; + this.h = t; + this.j = s; + this.m = n; + this.b = this.D(new B()); + this.onExpressionChange = this.b.event; + this.c = new Map(); + this.f = new Map(); + this.q(false); + this.n(); + } + n() { + this.D(this.m.onDidChangeConfiguration(e => { + if (this.h(e)) { + this.q(true); + } + })); + this.D(this.j.onDidChangeWorkspaceFolders(() => this.q(true))); + } + q(e) { + let t = false; + for (const o of this.j.getWorkspace().folders) { + const a = o.uri.toString(); + const l = this.r(o.uri); + const c = this.f.get(a); + if (l) { + if (!c || !Ul(c.expression, l.expression)) { + t = true; + this.c.set(a, nP(l.expression)); + this.f.set(a, l); + } + } else if (c) { + t = true; + this.c.delete(a); + this.f.delete(a); + } + } + const s = new Yf(this.j.getWorkspace().folders.map(o => o.uri)); + for (const [o] of this.f) { + if (o !== lO.a) { + if (!s.has(V.parse(o))) { + this.c.delete(o); + this.f.delete(o); + t = true; + } + } + } + const n = this.r(undefined); + const r = this.f.get(lO.a); + if (n) { + if (!r || !Ul(r.expression, n.expression)) { + t = true; + this.c.set(lO.a, nP(n.expression)); + this.f.set(lO.a, n); + } + } else if (r) { + t = true; + this.c.delete(lO.a); + this.f.delete(lO.a); + } + if (e && t) { + this.b.fire(); + } + } + r(e) { + const t = this.g(e); + if (!t) { + return; + } + const s = Object.keys(t); + if (s.length === 0) { + return; + } + let n = false; + const r = Object.create(null); + for (const o of s) { + n ||= HC(o); + let a = o; + const l = P4t(a, true); + if (l) { + const c = l.toLowerCase(); + if (l !== l.toLowerCase()) { + a = `${c}${a.substring(1)}`; + } + } + r[a] = t[o]; + } + return { + expression: r, + hasAbsolutePath: n + }; + } + matches(e, t) { + if (this.c.size === 0) { + return false; + } + const s = this.j.getWorkspaceFolder(e); + let n; + let r; + if (s && this.c.has(s.uri.toString())) { + n = this.c.get(s.uri.toString()); + r = this.f.get(s.uri.toString()); + } else { + n = this.c.get(lO.a); + r = this.f.get(lO.a); + } + if (!n) { + return false; + } + let o; + if (s) { + o = fb(s.uri, e); + } else { + o = this.s(e); + } + if (typeof o == "string" && n(o, undefined, t)) { + return true; + } else if (o !== this.s(e) && r?.hasAbsolutePath) { + return !!n(this.s(e), undefined, t); + } else { + return false; + } + } + s(e) { + if (e.scheme === me.file) { + return e.fsPath; + } else { + return e.path; + } + } + }; + JJ = lO = __decorate([__param(2, kt), __param(3, ve)], JJ); + } +}); +var Fl; +var NU; +var tc = ue({ + "out-build/vs/editor/common/services/textResourceConfiguration.js"() { + "use strict"; + + te(); + Fl = Ve("textResourceConfigurationService"); + NU = Ve("textResourcePropertiesService"); + } +}); +var bA; +var pwe; +var cFs; +var uFs; +var ld; +var mgt; +var Th = ue({ + "out-build/vs/workbench/services/filesConfiguration/common/filesConfigurationService.js"() { + "use strict"; + + X(); + te(); + It(); + pe(); + q(); + Ee(); + Me(); + Nt(); + Jr(); + rt(); + ii(); + pgt(); + nt(); + Un(); + Aa(); + In(); + Zp(); + Nn(); + wl(); + tc(); + pwe = new fe("autoSaveAfterShortDelayContext", false, true); + (function (i) { + i[i.OFF = 0] = "OFF"; + i[i.AFTER_SHORT_DELAY = 1] = "AFTER_SHORT_DELAY"; + i[i.AFTER_LONG_DELAY = 2] = "AFTER_LONG_DELAY"; + i[i.ON_FOCUS_CHANGE = 3] = "ON_FOCUS_CHANGE"; + i[i.ON_WINDOW_CHANGE = 4] = "ON_WINDOW_CHANGE"; + })(cFs ||= {}); + (function (i) { + i[i.SETTINGS = 1] = "SETTINGS"; + i[i.OUT_OF_WORKSPACE = 2] = "OUT_OF_WORKSPACE"; + i[i.ERRORS = 3] = "ERRORS"; + i[i.DISABLED = 4] = "DISABLED"; + })(uFs ||= {}); + ld = Ve("filesConfigurationService"); + mgt = class extends H { + static { + bA = this; + } + static { + this.a = tn ? Zb.AFTER_DELAY : Zb.OFF; + } + static { + this.b = 1000; + } + static { + this.f = { + providerReadonly: { + value: f(13022, null), + isTrusted: true + }, + sessionReadonly: { + value: f(13023, null, "workbench.action.files.setActiveEditorWriteableInSession"), + isTrusted: true + }, + configuredReadonly: { + value: f(13024, null, `workbench.action.openSettings?${encodeURIComponent("[\"files.readonly\"]")}`, "workbench.action.files.toggleActiveEditorReadonlyInSession"), + isTrusted: true + }, + fileLocked: { + value: f(13025, null, "workbench.action.files.setActiveEditorWriteableInSession"), + isTrusted: true + }, + fileReadonly: { + value: f(13026, null), + isTrusted: true + } + }; + } + constructor(e, t, s, n, r, o, a, l) { + super(); + this.F = e; + this.G = t; + this.H = s; + this.I = n; + this.J = r; + this.L = o; + this.M = a; + this.N = l; + this.g = this.D(new B()); + this.onDidChangeAutoSaveConfiguration = this.g.event; + this.h = this.D(new B()); + this.onDidChangeAutoSaveDisabled = this.h.event; + this.j = this.D(new B()); + this.onDidChangeFilesAssociation = this.j.event; + this.m = this.D(new B()); + this.onDidChangeReadonly = this.m.event; + this.s = new vc(1000); + this.t = new dn(); + this.u = pwe.bindTo(this.F); + this.w = this.D(new yfe(() => this.O(kUt))); + this.y = this.D(new yfe(() => this.O(EUt))); + this.C = new dn(u => this.J.extUri.getComparisonKey(u)); + const c = t.getValue(); + this.n = this.R(undefined, c.files); + this.q = c?.files?.associations; + this.r = c?.files?.hotExit || K0.ON_EXIT; + this.Q(c, false); + this.P(); + } + O(e) { + const t = this.D(new JJ(s => this.G.getValue(e, { + resource: s + }), s => s.affectsConfiguration(e), this.H, this.G)); + this.D(t.onExpressionChange(() => this.m.fire())); + return t; + } + isReadonly(e, t) { + const s = this.L.getProvider(e.scheme); + if (s && XYn(s)) { + return s.readOnlyMessage ?? bA.f.providerReadonly; + } + const n = this.C.get(e); + if (typeof n == "boolean") { + if (n === true) { + return bA.f.sessionReadonly; + } else { + return false; + } + } else if (this.J.extUri.isEqualOrParent(e, this.I.userRoamingDataHome) || this.J.extUri.isEqual(e, this.H.getWorkspace().configuration ?? undefined)) { + return false; + } else if (this.w.value.matches(e)) { + if (this.y.value.matches(e)) { + return false; + } else { + return bA.f.configuredReadonly; + } + } else if (this.z && t?.locked) { + return bA.f.fileLocked; + } else if (t?.readonly) { + return bA.f.fileReadonly; + } else { + return false; + } + } + async updateReadonly(e, t) { + if (t === "toggle") { + let s; + try { + s = await this.L.resolve(e, { + resolveMetadata: true + }); + } catch {} + t = !this.isReadonly(e, s); + } + if (t === "reset") { + this.C.delete(e); + } else { + this.C.set(e, t); + } + this.m.fire(); + } + P() { + this.D(this.G.onDidChangeConfiguration(e => { + if (e.affectsConfiguration("files")) { + this.Q(this.G.getValue(), true); + } + })); + } + Q(e, t) { + this.n = this.R(undefined, e.files); + this.s.clear(); + this.u.set(this.getAutoSaveMode(undefined).mode === 1); + if (t) { + this.g.fire(); + } + const s = e?.files?.associations; + if (!Ul(this.q, s)) { + this.q = s; + if (t) { + this.j.fire(); + } + } + const n = e?.files?.hotExit; + if (n === K0.OFF || n === K0.ON_EXIT_AND_WINDOW_CLOSE) { + this.r = n; + } else { + this.r = K0.ON_EXIT; + } + const r = !!e?.files?.readonlyFromPermissions; + if (r !== !!this.z) { + this.z = r; + if (t) { + this.m.fire(); + } + } + } + getAutoSaveConfiguration(e) { + const t = this.S(e); + if (t) { + let s = this.s.get(t); + if (!s) { + s = this.R(t, this.N.getValue(t, "files")); + this.s.set(t, s); + } + return s; + } + return this.n; + } + R(e, t) { + let s; + let n; + let r; + let o; + let a; + let l; + switch (t?.autoSave ?? bA.a) { + case Zb.AFTER_DELAY: + { + s = "afterDelay"; + n = typeof t?.autoSaveDelay == "number" && t.autoSaveDelay >= 0 ? t.autoSaveDelay : bA.b; + l = n <= bA.b; + break; + } + case Zb.ON_FOCUS_CHANGE: + s = "onFocusChange"; + break; + case Zb.ON_WINDOW_CHANGE: + s = "onWindowChange"; + break; + } + if (t?.autoSaveWorkspaceFilesOnly === true) { + r = true; + if (e && !this.H.isInsideWorkspace(e)) { + a = true; + l = undefined; + } + } + if (t?.autoSaveWhenNoErrors === true) { + o = true; + l = undefined; + } + return { + autoSave: s, + autoSaveDelay: n, + autoSaveWorkspaceFilesOnly: r, + autoSaveWhenNoErrors: o, + isOutOfWorkspace: a, + isShortAutoSaveDelay: l + }; + } + S(e) { + if (e instanceof rg) { + return vo.getOriginalUri(e, { + supportSideBySide: fo.PRIMARY + }); + } else { + return e; + } + } + hasShortAutoSaveDelay(e) { + const t = this.S(e); + if (this.getAutoSaveConfiguration(t).isShortAutoSaveDelay) { + return !t || !this.t.has(t); + } else { + return false; + } + } + getAutoSaveMode(e, t) { + const s = this.S(e); + if (s && this.t.has(s)) { + return { + mode: 0, + reason: 4 + }; + } + const n = this.getAutoSaveConfiguration(s); + if (typeof n.autoSave === "undefined") { + return { + mode: 0, + reason: 1 + }; + } + if (typeof t == "number" && (n.autoSave === "afterDelay" && t !== 2 || n.autoSave === "onFocusChange" && t !== 3 && t !== 4 || n.autoSave === "onWindowChange" && t !== 4)) { + return { + mode: 0, + reason: 1 + }; + } + if (s) { + if (n.autoSaveWorkspaceFilesOnly && n.isOutOfWorkspace) { + return { + mode: 0, + reason: 2 + }; + } + if (n.autoSaveWhenNoErrors && this.M.read({ + resource: s, + take: 1, + severities: sn.Error + }).length > 0) { + return { + mode: 0, + reason: 3 + }; + } + } + switch (n.autoSave) { + case "afterDelay": + if (typeof n.autoSaveDelay == "number" && n.autoSaveDelay <= bA.b) { + return { + mode: n.autoSaveWhenNoErrors ? 2 : 1 + }; + } else { + return { + mode: 2 + }; + } + case "onFocusChange": + return { + mode: 3 + }; + case "onWindowChange": + return { + mode: 4 + }; + } + } + async toggleAutoSave() { + const e = this.G.getValue("files.autoSave"); + let t; + if ([Zb.AFTER_DELAY, Zb.ON_FOCUS_CHANGE, Zb.ON_WINDOW_CHANGE].some(s => s === e)) { + t = Zb.OFF; + } else { + t = Zb.AFTER_DELAY; + } + return this.G.updateValue("files.autoSave", t); + } + disableAutoSave(e) { + const t = this.S(e); + if (!t) { + return H.None; + } + const s = this.t.get(t) ?? 0; + this.t.set(t, s + 1); + if (s === 0) { + this.h.fire(t); + } + return Ue(() => { + const n = this.t.get(t) ?? 0; + if (n <= 1) { + this.t.delete(t); + this.h.fire(t); + } else { + this.t.set(t, n - 1); + } + }); + } + get isHotExitEnabled() { + if (this.H.getWorkspace().transient) { + return false; + } else { + return this.r !== K0.OFF; + } + } + get hotExitConfiguration() { + return this.r; + } + preventSaveConflicts(e, t) { + return this.G.getValue("files.saveConflictResolution", { + resource: e, + overrideIdentifier: t + }) !== "overwriteFileOnDisk"; + } + }; + mgt = bA = __decorate([__param(0, Ne), __param(1, ve), __param(2, kt), __param(3, pa), __param(4, _s), __param(5, Ct), __param(6, Nu), __param(7, Fl)], mgt); + it(ld, mgt, 0); + } +}); +var Qse; +var Zse; +var hD; +var rP = ue({ + "out-build/vs/workbench/services/editor/common/customEditorLabelService.js"() { + "use strict"; + + pe(); + Qp(); + q(); + pn(); + Et(); + Me(); + It(); + te(); + ii(); + In(); + Zse = class extends H { + static { + Qse = this; + } + static { + this.SETTING_ID_PATTERNS = "workbench.editor.customLabels.patterns"; + } + static { + this.SETTING_ID_ENABLED = "workbench.editor.customLabels.enabled"; + } + constructor(e, t) { + super(); + this.j = e; + this.m = t; + this.c = this.D(new B()); + this.onDidChange = this.c.event; + this.f = []; + this.g = true; + this.h = new gqi(1000); + this.s = /[a-zA-Z0-9]/; + this.y = /\$\{(dirname|filename|extname|extname\((?[-+]?\d+)\)|dirname\((?[-+]?\d+)\))\}/g; + this.z = /(?^\.*[^.]*)/; + this.r(); + this.t(); + this.q(); + } + q() { + this.D(this.j.onDidChangeConfiguration(e => { + if (e.affectsConfiguration(Qse.SETTING_ID_ENABLED)) { + const t = this.g; + this.r(); + if (t !== this.g && this.f.length > 0) { + this.c.fire(); + } + } else if (e.affectsConfiguration(Qse.SETTING_ID_PATTERNS)) { + this.h.clear(); + this.t(); + this.c.fire(); + } + })); + } + r() { + this.g = this.j.getValue(Qse.SETTING_ID_ENABLED); + } + t() { + this.f = []; + const e = this.j.getValue(Qse.SETTING_ID_PATTERNS); + for (const t in e) { + const s = e[t]; + if (!this.s.test(s)) { + continue; + } + const n = HC(t); + const r = nP(t); + this.f.push({ + pattern: t, + template: s, + isAbsolutePath: n, + parsedPattern: r + }); + } + this.f.sort((t, s) => this.u(s.pattern) - this.u(t.pattern)); + } + u(e) { + let t = 0; + for (const s of e.split("/")) { + if (s === "**") { + t += 1; + } else if (s === "*") { + t += 10; + } else if (s.includes("*") || s.includes("?")) { + t += 50; + } else if (s !== "") { + t += 100; + } + } + return t; + } + getName(e) { + if (!this.g || this.f.length === 0) { + return; + } + const t = e.toString(); + const s = this.h.get(t); + if (s !== undefined) { + return s ?? undefined; + } + const n = this.w(e); + this.h.set(t, n ?? null); + return n; + } + w(e) { + const t = this.m.getWorkspaceFolder(e); + let s; + for (const n of this.f) { + let r; + if (t && !n.isAbsolutePath) { + s ||= fb(Ir(t.uri), e) ?? e.path; + r = s; + } else { + r = e.path; + } + if (n.parsedPattern(r)) { + return this.C(n.template, e, r); + } + } + } + C(e, t, s) { + let n; + return e.replace(this.y, (r, o, ...a) => { + n = n ?? Fq(t.path); + const { + dirnameN: l = "0", + extnameN: c = "0" + } = a.pop(); + if (o === "filename") { + const { + filename: u + } = this.z.exec(n.base)?.groups ?? {}; + if (u) { + return u; + } + } else if (o === "extname") { + const u = this.H(n.base); + if (u) { + return u; + } + } else if (o.startsWith("extname")) { + const u = parseInt(c); + const d = this.I(n.base, u); + if (d) { + return d; + } + } else if (o.startsWith("dirname")) { + const u = parseInt(l); + const d = this.G(pm(s), u); + if (d) { + return d; + } + } + return r; + }); + } + F(e) { + let t = e; + while (t.startsWith(".")) { + t = t.slice(1); + } + return t; + } + G(e, t) { + e = e.startsWith("/") ? e.slice(1) : e; + const s = e.split("/"); + return this.J(s, t); + } + H(e) { + return this.F(e).split(".").slice(1).join("."); + } + I(e, t) { + const s = this.F(e).split("."); + s.shift(); + return this.J(s, t); + } + J(e, t) { + const s = e.length; + let n; + if (t < 0) { + n = Math.abs(t) - 1; + } else { + n = s - t - 1; + } + const r = e[n]; + if (r !== undefined && r !== "") { + return r; + } + } + }; + Zse = Qse = __decorate([__param(0, ve), __param(1, kt)], Zse); + hD = Ve("ICustomEditorLabelService"); + it(hD, Zse, 1); + } +}); +var ene; +var lYt = ue({ + "out-build/vs/workbench/common/editor/resourceEditorInput.js"() { + "use strict"; + + Zp(); + Nt(); + jn(); + Et(); + Th(); + Me(); + tc(); + rP(); + ene = class extends rg { + get capabilities() { + let e = 32; + if (this.h.hasProvider(this.resource)) { + if (this.m.isReadonly(this.resource)) { + e |= 2; + } + } else { + e |= 4; + } + if (!(e & 2)) { + e |= 128; + } + return e; + } + get preferredResource() { + return this.a; + } + constructor(e, t, s, n, r, o, a) { + super(); + this.resource = e; + this.b = s; + this.h = n; + this.m = r; + this.q = o; + this.r = a; + this.w = undefined; + this.y = undefined; + this.C = undefined; + this.G = undefined; + this.I = undefined; + this.L = undefined; + this.N = undefined; + this.a = t || e; + this.s(); + } + s() { + this.D(this.b.onDidChangeFormatters(e => this.t(e.scheme))); + this.D(this.h.onDidChangeFileSystemProviderRegistrations(e => this.t(e.scheme))); + this.D(this.h.onDidChangeFileSystemProviderCapabilities(e => this.t(e.scheme))); + this.D(this.r.onDidChange(() => this.u())); + } + t(e) { + if (e === this.a.scheme) { + this.u(); + } + } + u() { + this.w = undefined; + this.y = undefined; + this.C = undefined; + this.G = undefined; + this.I = undefined; + this.L = undefined; + this.N = undefined; + this.g.fire(); + } + setPreferredResource(e) { + if (!Ls(e, this.a)) { + this.a = e; + this.u(); + } + } + getName() { + if (typeof this.w != "string") { + this.w = this.r.getName(this.a) ?? this.b.getUriBasenameLabel(this.a); + } + return this.w; + } + getDescription(e = 1) { + switch (e) { + case 0: + return this.z; + case 2: + return this.H; + case 1: + default: + return this.F; + } + } + get z() { + if (typeof this.y != "string") { + this.y = this.b.getUriBasenameLabel(Ir(this.a)); + } + return this.y; + } + get F() { + if (typeof this.C != "string") { + this.C = this.b.getUriLabel(Ir(this.a), { + relative: true + }); + } + return this.C; + } + get H() { + if (typeof this.G != "string") { + this.G = this.b.getUriLabel(Ir(this.a)); + } + return this.G; + } + get J() { + if (typeof this.I != "string") { + this.I = this.getName(); + } + return this.I; + } + get M() { + if (typeof this.L != "string") { + this.L = this.b.getUriLabel(this.a, { + relative: true + }); + } + return this.L; + } + get O() { + if (typeof this.N != "string") { + this.N = this.b.getUriLabel(this.a); + } + return this.N; + } + getTitle(e) { + switch (e) { + case 0: + return this.J; + case 2: + return this.O; + default: + case 1: + return this.M; + } + } + isReadonly() { + return this.m.isReadonly(this.resource); + } + P(e) { + if (e?.limits) { + return e.limits; + } + const t = los(this.resource); + let s; + const n = this.q.inspect(this.resource, null, "workbench.editorLargeFileConfirmation"); + if (tjn(n)) { + s = n.value * Af.MB; + } + return { + size: s ?? t + }; + } + }; + ene = __decorate([__param(2, Zs), __param(3, Ct), __param(4, ld), __param(5, Fl), __param(6, hD)], ene); + } +}); +function aor(i) { + if (dx === 2 && /^penguin(\.|$)/i.test(i)) { + return "chromebook"; + } +} +function lor(i, e, t, s, n, r, o, a, l, c, u) { + const d = Object.create(null); + d["common.machineId"] = r; + d["common.macMachineId"] = o; + d["common.sqmId"] = a; + d["common.devDeviceId"] = l; + d.sessionID = Ft() + Date.now(); + d.commitHash = s; + d.version = n; + d["common.platformVersion"] = (i || "").replace(/^(\d+)(\.\d+)?(\.\d+)?(.*)/, "$1$2$3"); + d["common.platform"] = Nq(dx); + d["common.nodePlatform"] = Q3; + d["common.nodeArch"] = t; + d["common.product"] = u || "desktop"; + if (c) { + d["common.msftInternal"] = c; + } + let h = 0; + const g = Date.now(); + Object.defineProperties(d, { + timestamp: { + get: () => new Date(), + enumerable: true + }, + "common.timesincesessionstart": { + get: () => Date.now() - g, + enumerable: true + }, + "common.sequence": { + get: () => h++, + enumerable: true + } + }); + if (rfe) { + d["common.snap"] = "true"; + } + const p = aor(e); + if (p) { + d["common.platformDetail"] = p; + } + return d; +} +function cor(i) { + const e = Ny.USERDNSDOMAIN; + if (!e) { + return false; + } + const t = e.toLowerCase(); + return i.some(s => t === s); +} +var dFs = ue({ + "out-build/vs/platform/telemetry/common/commonProperties.js"() { + "use strict"; + + rt(); + hx(); + Ps(); + } +}); +function GJ(i, e) { + if (!e.isBuilt && !e.disableTelemetry) { + return true; + } else { + return !e.disableTelemetry && !!i.enableTelemetry; + } +} +function cYt(i, e) { + if (e.extensionTestsLocationURI) { + return true; + } else { + return !e.isBuilt && !e.disableTelemetry && (!i.enableTelemetry || !i.aiConfig?.ariaKey); + } +} +function tne(i) { + const e = i.getValue(aj); + const t = i.getValue(J6t); + if (i.getValue(tot) === false || t === false) { + return 0; + } + switch (e ?? "all") { + case "all": + return 3; + case "off": + return 0; + } +} +function hFs(i) { + if (!i) { + return "none"; + } + const e = uD(i); + if (vFs.has(e)) { + return e; + } else { + return "other"; + } +} +function uor(i, e) { + const t = i.msftInternalDomains || []; + const s = e.getValue("telemetry.internalTesting"); + return cor(t) || s; +} +function dor(i) { + return [i.appRoot, i.extensionsPath, i.userHome.fsPath, i.tmpDir.fsPath, i.userDataPath]; +} +function hor(i, e) { + if (!i || !i.includes("/") && !i.includes("\\")) { + return i; + } + let t = i; + const s = []; + for (const a of e) { + while (true) { + const l = a.exec(i); + if (!l) { + break; + } + s.push([l.index, a.lastIndex]); + } + } + const n = /^[\\\/]?(node_modules|node_modules\.asar)[\\\/]/; + const r = /(file:\/\/)?([a-zA-Z]:(\\\\|\\|\/)|(\\\\|\\|\/))?([\w-\._]+(\\\\|\\|\/))+[\w-\._]*/g; + let o = 0; + for (t = "";;) { + const a = r.exec(i); + if (!a) { + break; + } + const l = s.some(([c, u]) => a.index < u && c < r.lastIndex); + if (!n.test(a[0]) && !l) { + t += i.substring(o, a.index) + ""; + o = r.lastIndex; + } + } + if (o < i.length) { + t += i.substr(o); + } + return t; +} +function gor(i) { + if (!i) { + return i; + } + const e = [{ + label: "Google API Key", + regex: /AIza[A-Za-z0-9_\\\-]{35}/ + }, { + label: "Slack Token", + regex: /xox[pbar]\-[A-Za-z0-9]/ + }, { + label: "GitHub Token", + regex: /(gh[psuro]_[a-zA-Z0-9]{36}|github_pat_[a-zA-Z0-9]{22}_[a-zA-Z0-9]{59})/ + }, { + label: "Generic Secret", + regex: /(key|token|sig|secret|signature|password|passwd|pwd|android:value)[^a-zA-Z0-9]/i + }, { + label: "CLI Credentials", + regex: /((login|psexec|(certutil|psexec)\.exe).{1,50}(\s-u(ser(name)?)?\s+.{3,100})?\s-(admin|user|vm|root)?p(ass(word)?)?\s+["']?[^$\-\/\s]|(^|[\s\r\n\\])net(\.exe)?.{1,5}(user\s+|share\s+\/user:| user -? secrets ? set) \s + [^ $\s \/])/ + }, { + label: "Microsoft Entra ID", + regex: /eyJ(?:0eXAiOiJKV1Qi|hbGci|[a-zA-Z0-9\-_]+\.[a-zA-Z0-9\-_]+\.)/ + }, { + label: "Email", + regex: /@[a-zA-Z0-9-]+\.[a-zA-Z0-9-]+/ + }]; + for (const t of e) { + if (t.regex.test(i)) { + return ``; + } + } + return i; +} +function fFs(i, e) { + return Uee(i, t => { + if (t instanceof D5 || Object.hasOwnProperty.call(t, "isTrustedTelemetryValue")) { + return t.value; + } + if (typeof t == "string") { + let s = t.replaceAll("%20", " "); + s = hor(s, e); + for (const n of e) { + s = s.replace(n, ""); + } + s = gor(s); + return s; + } + }); +} +var D5; +var gFs; +var pFs; +var mFs; +var bFs; +var vFs; +var Zw = ue({ + "out-build/vs/platform/telemetry/common/telemetryUtils.js"() { + "use strict"; + + Jr(); + zt(); + fA(); + dFs(); + ai(); + D5 = class { + constructor(i) { + this.value = i; + this.isTrustedTelemetryValue = true; + } + }; + gFs = class { + constructor() { + this.telemetryLevel = 0; + this.sessionId = "someValue.sessionId"; + this.machineId = "someValue.machineId"; + this.macMachineId = "someValue.macMachineId"; + this.sqmId = "someValue.sqmId"; + this.devDeviceId = "someValue.devDeviceId"; + this.firstSessionDate = "someValue.firstSessionDate"; + this.sendErrorTelemetry = false; + } + registerAuthId() {} + publicLog() {} + publicLog2() {} + publicLogError() {} + publicLogError2() {} + publicLogCapture() {} + setExperimentProperty() {} + }; + pFs = new gFs(); + mFs = "telemetry"; + bFs = "extensionTelemetryLog"; + vFs = new Set(["ssh-remote", "dev-container", "attached-container", "wsl", "tunnel", "codespaces", "amlext"]); + } +}); +function Ki(i, e) { + if (i.uuid && e.uuid) { + return i.uuid === e.uuid; + } else if (i.id === e.id) { + return true; + } else { + return cM(i.id, e.id) === 0; + } +} +function uYt(i) { + const e = xFs.exec(i); + if (e && e[1]) { + return [mwe(e[1]), e[2]]; + } else { + return [mwe(i), undefined]; + } +} +function fD(i, e) { + return `${i}.${e}`; +} +function mwe(i) { + return i.toLowerCase(); +} +function cv(i, e) { + return mwe(fD(i ?? qKt, e)); +} +function yFs(i, e) { + const t = []; + const s = n => { + for (const r of t) { + if (r.some(o => Ki(e(o), e(n)))) { + return r; + } + } + return null; + }; + for (const n of i) { + const r = s(n); + if (r) { + r.push(n); + } else { + t.push([n]); + } + } + return t; +} +function wFs(i) { + return { + id: i.identifier.id, + name: i.manifest.name, + galleryId: null, + publisherId: i.publisherId, + publisherName: i.manifest.publisher, + publisherDisplayName: i.publisherDisplayName, + dependencies: i.manifest.extensionDependencies && i.manifest.extensionDependencies.length > 0 + }; +} +function bgt(i) { + return { + id: new D5(i.identifier.id), + name: new D5(i.name), + extensionVersion: i.version, + galleryId: i.identifier.uuid, + publisherId: i.publisherId, + publisherName: i.publisher, + publisherDisplayName: i.publisherDisplayName, + isPreReleaseVersion: i.properties.isPreReleaseVersion, + dependencies: !!i.properties.dependencies && !!(i.properties.dependencies.length > 0), + isSigned: i.isSigned, + ...i.telemetryData + }; +} +function vgt(i, e) { + const t = []; + const s = e.manifest.extensionDependencies?.slice(0) ?? []; + while (s.length) { + const n = s.shift(); + if (n && t.every(r => !Ki(r.identifier, { + id: n + }))) { + const r = i.filter(o => Ki(o.identifier, { + id: n + })); + if (r.length === 1) { + t.push(r[0]); + s.push(...(r[0].manifest.extensionDependencies?.slice(0) ?? [])); + } + } + } + return t; +} +async function por(i, e) { + if (!yl) { + return false; + } + let t; + try { + t = (await i.readFile(V.file("/etc/os-release"))).value.toString(); + } catch { + try { + t = (await i.readFile(V.file("/usr/lib/os-release"))).value.toString(); + } catch (n) { + e.debug("Error while getting the os-release file.", cc(n)); + } + } + return !!t && (t.match(/^ID=([^\u001b\r\n]*)/m) || [])[1] === "alpine"; +} +async function CFs(i, e) { + const t = await por(i, e); + const s = V$s(t ? "alpine" : dx, Ant); + e.debug("ComputeTargetPlatform:", s); + return s; +} +var SFs; +var dYt; +var xFs; +var kFs; +var kd = ue({ + "out-build/vs/platform/extensionManagement/common/extensionManagementUtil.js"() { + "use strict"; + + $i(); + Cl(); + Sl(); + rt(); + Le(); + Ut(); + hx(); + Zw(); + SFs = /^([^.]+\..+)-(\d+\.\d+\.\d+)(-(.+))?$/; + dYt = class EFt { + static create(e) { + const t = e.manifest ? e.manifest.version : e.version; + const s = e.manifest ? e.targetPlatform : e.properties.targetPlatform; + return new EFt(e.identifier, t, s); + } + static parse(e) { + const t = SFs.exec(e); + if (t && t[1] && t[2]) { + return new EFt({ + id: t[1] + }, t[2], t[4] || undefined); + } else { + return null; + } + } + constructor(e, t, s = "undefined") { + this.identifier = e; + this.version = t; + this.targetPlatform = s; + this.id = e.id; + } + toString() { + return `${this.id}-${this.version}${this.targetPlatform !== "undefined" ? `-${this.targetPlatform}` : ""}`; + } + equals(e) { + if (e instanceof EFt) { + return Ki(this, e) && this.version === e.version && this.targetPlatform === e.targetPlatform; + } else { + return false; + } + } + }; + xFs = /^([^.]+\..+)@((prerelease)|(\d+\.\d+\.\d+(-.*)?))$/; + kFs = new $r("pprice.better-merge"); + } +}); +var EFs; +var KJ; +var hYt = ue({ + "out-build/vs/platform/extensionManagement/common/implicitActivationEvents.js"() { + "use strict"; + + Ut(); + Sl(); + EFs = class { + constructor() { + this.a = new Map(); + this.b = new WeakMap(); + } + register(i, e) { + this.a.set(i, e); + } + readActivationEvents(i) { + if (!this.b.has(i)) { + this.b.set(i, this.c(i)); + } + return this.b.get(i); + } + createActivationEventsMap(i) { + const e = Object.create(null); + for (const t of i) { + const s = this.readActivationEvents(t); + if (s.length > 0) { + e[$r.toKey(t.identifier)] = s; + } + } + return e; + } + c(i) { + if (typeof i.main === "undefined" && typeof i.browser === "undefined") { + return []; + } + const e = Array.isArray(i.activationEvents) ? i.activationEvents.slice(0) : []; + for (let t = 0; t < e.length; t++) { + if (e[t] === "onUri") { + e[t] = `onUri:${$r.toKey(i.identifier)}`; + } + } + if (!i.contributes) { + return e; + } + for (const t in i.contributes) { + const s = this.a.get(t); + if (!s) { + continue; + } + const n = i.contributes[t]; + const r = Array.isArray(n) ? n : [n]; + try { + s(r, e); + } catch (o) { + xs(o); + } + } + return e; + } + }; + KJ = new EFs(); + } +}); +function IFs(i) { + const e = new Gm(); + for (const t of i) { + e.set(t.identifier, t); + } + return e; +} +function mS(i, e) { + if ((e === "control" || e === "cursor" || e === "cursorNoDeps") && !i.isBuiltin || !i.enabledApiProposals) { + return false; + } else { + return i.enabledApiProposals.includes(e); + } +} +function mor(i, e) { + if (!mS(i, e)) { + throw new Error(`Extension '${i.identifier.value}' CANNOT use API proposal: ${e}. +Its package.json#enabledApiProposals-property declares: ${i.enabledApiProposals?.join(", ") ?? "[]"} but NOT ${e}. + The missing proposal MUST be added and you must start in extension development mode or use the following command line switch: --enable-proposed-api ${i.identifier.value}. Note that the cursor and control proposals are only available for built-in extensions`); + } +} +function oC(i) { + return { + type: i.isBuiltin ? 0 : 1, + isBuiltin: i.isBuiltin || i.isUserBuiltin, + identifier: { + id: cv(i.publisher, i.name), + uuid: i.uuid + }, + manifest: i, + location: i.extensionLocation, + targetPlatform: i.targetPlatform, + validations: [], + isValid: true, + preRelease: i.preRelease + }; +} +function T5(i, e) { + const t = fD(i.manifest.publisher, i.manifest.name); + return { + id: t, + identifier: new $r(t), + isBuiltin: i.type === 0, + isUserBuiltin: i.type === 1 && i.isBuiltin, + isUnderDevelopment: !!e, + extensionLocation: i.location, + uuid: i.identifier.uuid, + targetPlatform: i.targetPlatform, + publisherDisplayName: i.publisherDisplayName, + preRelease: i.preRelease, + ...i.manifest + }; +} +var bor; +var fYt; +var Ks; +var DFs; +var ine; +var TFs; +var PFs; +var LFs; +var rn = ue({ + "out-build/vs/workbench/services/extensions/common/extensions.js"() { + "use strict"; + + pe(); + Le(); + kd(); + hYt(); + Sl(); + te(); + bor = Object.freeze({ + identifier: new $r("nullExtensionDescription"), + name: "Null Extension Description", + version: "0.0.0", + publisher: "vscode", + engines: { + vscode: "" + }, + extensionLocation: V.parse("void:location"), + isBuiltin: false, + targetPlatform: "undefined", + isUserBuiltin: false, + isUnderDevelopment: false, + preRelease: false + }); + fYt = "extensions.webWorker"; + Ks = Ve("extensionService"); + (function (i) { + i[i.EagerAutoStart = 1] = "EagerAutoStart"; + i[i.EagerManualStart = 2] = "EagerManualStart"; + i[i.Lazy = 3] = "Lazy"; + })(DFs ||= {}); + ine = class { + get versionId() { + return this.c; + } + get allExtensions() { + return this.d; + } + get myExtensions() { + return this.e; + } + constructor(i, e, t) { + this.c = i; + this.d = e.slice(0); + this.e = t.slice(0); + this.f = null; + } + toSnapshot() { + return { + versionId: this.c, + allExtensions: this.d, + myExtensions: this.e, + activationEvents: KJ.createActivationEventsMap(this.d) + }; + } + set(i, e, t) { + if (this.c > i) { + throw new Error(`ExtensionHostExtensions: invalid versionId ${i} (current: ${this.c})`); + } + const s = []; + const n = []; + const r = []; + const o = []; + const a = IFs(this.d); + const l = IFs(e); + const c = (p, b) => p.extensionLocation.toString() === b.extensionLocation.toString() || p.isBuiltin === b.isBuiltin || p.isUserBuiltin === b.isUserBuiltin || p.isUnderDevelopment === b.isUnderDevelopment; + for (const p of this.d) { + const b = l.get(p.identifier); + if (!b) { + s.push(p.identifier); + a.delete(p.identifier); + continue; + } + if (!c(p, b)) { + s.push(p.identifier); + a.delete(p.identifier); + continue; + } + } + for (const p of e) { + const b = a.get(p.identifier); + if (!b) { + n.push(p); + continue; + } + if (!c(b, p)) { + s.push(b.identifier); + a.delete(b.identifier); + continue; + } + } + const u = new xR(this.e); + const d = new xR(t); + for (const p of this.e) { + if (!d.has(p)) { + r.push(p); + } + } + for (const p of t) { + if (!u.has(p)) { + o.push(p); + } + } + const h = KJ.createActivationEventsMap(n); + const g = { + versionId: i, + toRemove: s, + toAdd: n, + addActivationEvents: h, + myToRemove: r, + myToAdd: o + }; + this.delta(g); + return g; + } + delta(i) { + if (this.c >= i.versionId) { + return null; + } + const { + toRemove: e, + toAdd: t, + myToRemove: s, + myToAdd: n + } = i; + const r = new xR(e); + const o = new xR(s); + for (let a = 0; a < this.d.length; a++) { + if (r.has(this.d[a].identifier)) { + this.d.splice(a, 1); + a--; + } + } + for (let a = 0; a < this.e.length; a++) { + if (o.has(this.e[a])) { + this.e.splice(a, 1); + a--; + } + } + for (const a of t) { + this.d.push(a); + } + for (const a of n) { + this.e.push(a); + } + this.f = null; + return i; + } + containsExtension(i) { + for (const e of this.e) { + if ($r.equals(e, i)) { + return true; + } + } + return false; + } + containsActivationEvent(i) { + this.f ||= this.g(); + return this.f.has(i); + } + g() { + const i = new Set(); + for (const e of this.d) { + if (!this.containsExtension(e.identifier)) { + continue; + } + const t = KJ.readActivationEvents(e); + for (const s of t) { + i.add(s); + } + } + return i; + } + }; + TFs = class { + constructor(i, e, t, s) { + this.codeLoadingTime = i; + this.activateCallTime = e; + this.activateResolvedTime = t; + this.activationReason = s; + } + }; + PFs = class { + constructor(i, e) { + this.description = i; + this.value = e; + } + }; + (function (i) { + i[i.Normal = 0] = "Normal"; + i[i.Immediate = 1] = "Immediate"; + })(LFs ||= {}); + } +}); +function sne(i) { + return !!i && typeof i == "object" && Array.isArray(i.editorInputs) && i.editorInputs.every(e => e instanceof yh); +} +function ygt(i) { + return !!i && typeof i == "object" && i.typeId === yh.ID; +} +var bwe; +var yh; +var bS = ue({ + "out-build/vs/workbench/contrib/notebook/common/notebookEditorInput.js"() { + "use strict"; + + Qp(); + xd(); + Et(); + fn(); + mA(); + jn(); + At(); + Nt(); + lYt(); + Ut(); + nr(); + Th(); + rn(); + X(); + vt(); + tc(); + rP(); + yh = class extends ene { + static { + bwe = this; + } + static getOrCreate(e, t, s, n, r = {}) { + const o = e.createInstance(bwe, t, s, n, r); + if (s) { + o.setPreferredResource(s); + } + return o; + } + static { + this.ID = "workbench.input.notebook"; + } + constructor(e, t, s, n, r, o, a, l, c, u, d, h, g, p) { + super(e, t, l, c, u, g, p); + this.viewType = s; + this.options = n; + this.S = r; + this.U = o; + this.W = a; + this.c = null; + this.R = false; + this.R = !!n.startDirty; + this.Q = r.onDidAddNotebookDocument(b => { + if (b.viewType === this.viewType && b.uri.toString() === this.resource.toString()) { + this.resolve().catch(xs); + } + }); + this.D(d.onWillStop(b => { + if (!b.auto && !this.isDirty()) { + return; + } + const v = b.auto ? f(8692, null) : f(8693, null, this.resource.path); + b.veto((async () => { + const y = h.findEditors(this); + if (b.auto) { + return true; + } else { + return !(y.length > 0) || !(await h.save(y[0])).success; + } + })(), v); + })); + } + dispose() { + this.Q.dispose(); + this.c?.dispose(); + this.c = null; + super.dispose(); + } + get typeId() { + return bwe.ID; + } + get editorId() { + return this.viewType; + } + get capabilities() { + let e = 0; + if (this.resource.scheme === me.untitled) { + e |= 4; + } + if (this.c) { + if (this.c.object.isReadonly()) { + e |= 2; + } + } else if (this.m.isReadonly(this.resource)) { + e |= 2; + } + if (!(e & 2)) { + e |= 128; + } + return e; + } + getDescription(e = 1) { + if (!this.hasCapability(4) || this.c?.object.hasAssociatedFilePath()) { + return super.getDescription(e); + } + } + isReadonly() { + if (this.c) { + return this.c.object.isReadonly(); + } else { + return this.m.isReadonly(this.resource); + } + } + isDirty() { + if (this.c) { + return this.c.object.isDirty(); + } else { + return this.R; + } + } + isSaving() { + const e = this.c?.object; + if (!e || !e.isDirty() || e.hasErrorState || this.hasCapability(4)) { + return false; + } else { + return this.m.hasShortAutoSaveDelay(this); + } + } + async save(e, t) { + if (this.c) { + if (this.hasCapability(4)) { + return this.saveAs(e, t); + } else { + await this.c.object.save(t); + return this; + } + } + } + async saveAs(e, t) { + if (!this.c) { + return; + } + const s = this.S.getContributedNotebookType(this.viewType); + if (!s) { + return; + } + const n = this.hasCapability(4) ? await this.X(s, this.b.getUriBasenameLabel(this.resource)) : this.c.object.resource; + let r; + if (this.c.object.hasAssociatedFilePath()) { + r = n; + } else { + r = await this.W.pickFileToSave(n, t?.availableFileSystems); + if (!r) { + return; + } + } + if (!s.matches(r)) { + const o = s.selectors.map(a => typeof a == "string" ? a : hU(a) ? `${a} (base ${a.base})` : a.exclude ? `${a.include} (exclude: ${a.exclude})` : `${a.include}`).join(", "); + throw new Error(`File name ${r} is not supported by ${s.providerDisplayName}. + +Please make sure the file name matches following patterns: +${o}`); + } + return await this.c.object.saveAs(r); + } + async X(e, t) { + const s = e.selectors[0]; + let n = s && typeof s == "string" ? s : undefined; + if (!n && s) { + const r = s.include; + if (typeof r == "string") { + n = r; + } + } + if (n) { + const r = /^\*\.([A-Za-z_-]*)$/.exec(n); + if (r && r.length > 1) { + const o = r[1]; + if (!t.endsWith(o)) { + return Li(await this.W.defaultFilePath(), t + "." + o); + } + } + } + return Li(await this.W.defaultFilePath(), t); + } + async rename(e, t) { + if (this.c) { + return { + editor: { + resource: t + }, + options: { + override: this.viewType + } + }; + } + } + async revert(e, t) { + if (this.c && this.c.object.isDirty()) { + await this.c.object.revert(t); + } + } + async resolve(e, t) { + if (!(await this.S.canResolve(this.viewType))) { + return null; + } + t?.mark("extensionActivated"); + this.Q.dispose(); + if (this.c) { + this.c.object.load({ + limits: this.P(e) + }); + } else { + const s = !!(this.capabilities & 512); + const n = await this.U.resolve(this.resource, this.viewType, { + limits: this.P(e), + scratchpad: s, + viewType: this.editorId + }); + if (this.c) { + n.dispose(); + return this.c.object; + } + this.c = n; + if (this.isDisposed()) { + this.c.dispose(); + this.c = null; + return null; + } + this.D(this.c.object.onDidChangeDirty(() => this.f.fire())); + this.D(this.c.object.onDidChangeReadonly(() => this.j.fire())); + this.D(this.c.object.onDidRevertUntitled(() => this.dispose())); + if (this.c.object.isDirty()) { + this.f.fire(); + } + } + if (this.options._backupId) { + const s = await this.S.withNotebookDataProvider(this.c.object.notebook.viewType); + if (!(s instanceof I5)) { + throw new Error("CANNOT open file notebook with this provider"); + } + const n = await s.serializer.dataToNotebook(Ii.fromString(JSON.stringify({ + __webview_backup: this.options._backupId + }))); + this.c.object.notebook.applyEdits([{ + editType: 1, + index: 0, + count: this.c.object.notebook.length, + cells: n.cells + }], true, undefined, () => {}, undefined, false); + if (this.options._workingCopy) { + this.options._backupId = undefined; + this.options._workingCopy = undefined; + this.options.startDirty = undefined; + } + } + return this.c.object; + } + toUntyped() { + return { + resource: this.resource, + options: { + override: this.viewType + } + }; + } + matches(e) { + if (super.matches(e)) { + return true; + } else if (e instanceof bwe) { + return this.viewType === e.viewType && Ls(this.resource, e.resource); + } else { + return false; + } + } + }; + yh = bwe = __decorate([__param(4, ec), __param(5, zx), __param(6, Xl), __param(7, Zs), __param(8, Ct), __param(9, ld), __param(10, Ks), __param(11, Te), __param(12, Fl), __param(13, hD)], yh); + } +}); +function bl(i) { + if (!i) { + return; + } + if (i.getId() === gU) { + return i.getControl(); + } + const e = i.input; + if (e && sne(e)) { + return i.getControl()?.notebookEditor; + } +} +function vwe(i, e) { + const t = pE(e); + const s = []; + t.forEach(n => { + if (!i.cellAt(n)) { + return; + } + const o = i.getViewIndexByModelIndex(n); + if (o < 0) { + return; + } + const a = o + 1; + const l = i.getCellRangeFromViewRange(o, a); + if (l) { + s.push(l); + } + }); + return m5(s); +} +function gYt(i, e) { + const t = []; + m5(e).forEach(s => { + t.push(...i.getCellsInRange(s)); + }); + return t; +} +var wgt; +var RFs; +var Cgt; +var pYt; +var mYt; +var bYt; +var Sgt; +var ywe; +var NFs; +var xgt; +var MFs; +var nne; +var uv; +var vYt; +var gD; +var AFs; +var vA; +var Dl; +var cd; +var ER; +var yA; +var $Fs; +var ja = ue({ + "out-build/vs/workbench/contrib/notebook/browser/notebookBrowser.js"() { + "use strict"; + + Mr(); + bS(); + cA(); + wgt = "notebook.cell.expandCellInput"; + RFs = "notebook.cell.execute"; + Cgt = "notebook.cell.detectLanguage"; + pYt = "notebook.cell.changeLanguage"; + mYt = "notebook.cell.quitEdit"; + bYt = "notebook.cell.expandCellOutput"; + Sgt = "jupyter-notebook"; + ywe = "ms-toolsai.jupyter"; + NFs = new Map([[Sgt, ywe]]); + xgt = new Map(); + xgt.set(Sgt, new Map()); + xgt.get(Sgt)?.set("python", { + extensionIds: ["ms-python.python", ywe], + displayName: "Python + Jupyter" + }); + (function (i) { + i[i.Html = 0] = "Html"; + i[i.Extension = 1] = "Extension"; + })(MFs ||= {}); + (function (i) { + i[i.fullCell = 0] = "fullCell"; + i[i.firstLine = 1] = "firstLine"; + })(nne ||= {}); + (function (i) { + i[i.Uninitialized = 0] = "Uninitialized"; + i[i.Estimated = 1] = "Estimated"; + i[i.FromCache = 2] = "FromCache"; + i[i.Measured = 3] = "Measured"; + })(uv ||= {}); + (function (i) { + i[i.Fold = 0] = "Fold"; + })(vYt ||= {}); + (function (i) { + i[i.Left = 1] = "Left"; + i[i.Center = 2] = "Center"; + i[i.Right = 4] = "Right"; + i[i.Full = 7] = "Full"; + })(gD ||= {}); + (function (i) { + i[i.Default = 1] = "Default"; + i[i.Top = 2] = "Top"; + i[i.Center = 3] = "Center"; + i[i.CenterIfOutsideViewport = 4] = "CenterIfOutsideViewport"; + i[i.NearTopIfOutsideViewport = 5] = "NearTopIfOutsideViewport"; + i[i.FirstLineIfOutsideViewport = 6] = "FirstLineIfOutsideViewport"; + })(AFs ||= {}); + (function (i) { + i[i.Default = 1] = "Default"; + i[i.Center = 2] = "Center"; + i[i.CenterIfOutsideViewport = 3] = "CenterIfOutsideViewport"; + })(vA ||= {}); + (function (i) { + i[i.Preview = 0] = "Preview"; + i[i.Editing = 1] = "Editing"; + })(Dl ||= {}); + (function (i) { + i[i.Container = 0] = "Container"; + i[i.Editor = 1] = "Editor"; + i[i.Output = 2] = "Output"; + i[i.ChatInput = 3] = "ChatInput"; + })(cd ||= {}); + (function (i) { + i[i.None = 0] = "None"; + i[i.Top = 1] = "Top"; + i[i.Bottom = 2] = "Bottom"; + i[i.Both = 3] = "Both"; + })(ER ||= {}); + (function (i) { + i[i.None = 0] = "None"; + i[i.Start = 1] = "Start"; + i[i.End = 2] = "End"; + i[i.Both = 3] = "Both"; + })(yA ||= {}); + (function (i) { + i[i.None = 0] = "None"; + i[i.Expanded = 1] = "Expanded"; + i[i.Collapsed = 2] = "Collapsed"; + })($Fs ||= {}); + } +}); +var wwe; +var iy; +var yYt; +var P5; +var Km; +var FFs; +var Cwe; +var OFs; +var Jx; +var dv = ue({ + "out-build/vs/workbench/contrib/scm/common/scm.js"() { + "use strict"; + + te(); + wwe = "workbench.view.scm"; + iy = "workbench.scm"; + yYt = "workbench.scm.repositories"; + P5 = "workbench.scm.history"; + Km = Ve("scm"); + (function (i) { + i[i.Error = 0] = "Error"; + i[i.Warning = 1] = "Warning"; + i[i.Information = 2] = "Information"; + })(FFs ||= {}); + (function (i) { + i[i.HistoryPrevious = 0] = "HistoryPrevious"; + i[i.HistoryNext = 1] = "HistoryNext"; + })(Cwe ||= {}); + (function (i) { + i.DiscoveryTime = "discoveryTime"; + i.Name = "name"; + i.Path = "path"; + })(OFs ||= {}); + Jx = Ve("scmView"); + } +}); +var kgt; +var _Fs = ue({ + "out-build/proto/aiserver/v1/repository_connectweb.js"() { + "use strict"; + + cS(); + Hr(); + kgt = { + typeName: "aiserver.v1.RepositoryService", + methods: { + fastRepoInitHandshake: { + name: "FastRepoInitHandshake", + I: Ofs, + O: _fs, + kind: Ge.Unary + }, + syncMerkleSubtree: { + name: "SyncMerkleSubtree", + I: Jfs, + O: Gfs, + kind: Ge.Unary + }, + fastUpdateFile: { + name: "FastUpdateFile", + I: Zfs, + O: tgs, + kind: Ge.Unary + }, + searchRepositoryV2: { + name: "SearchRepositoryV2", + I: BHt, + O: UHt, + kind: Ge.Unary + }, + removeRepositoryV2: { + name: "RemoveRepositoryV2", + I: _Ht, + O: ggs, + kind: Ge.Unary + }, + fastRepoInitHandshakeV2: { + name: "FastRepoInitHandshakeV2", + I: Ufs, + O: Hfs, + kind: Ge.Unary + }, + syncMerkleSubtreeV2: { + name: "SyncMerkleSubtreeV2", + I: Yfs, + O: Xfs, + kind: Ge.Unary + }, + fastUpdateFileV2: { + name: "FastUpdateFileV2", + I: igs, + O: ngs, + kind: Ge.Unary + }, + fastRepoSyncComplete: { + name: "FastRepoSyncComplete", + I: jfs, + O: zfs, + kind: Ge.Unary + }, + semSearchFast: { + name: "SemSearchFast", + I: WHt, + O: HHt, + kind: Ge.ServerStreaming + }, + semSearch: { + name: "SemSearch", + I: WHt, + O: HHt, + kind: Ge.ServerStreaming + }, + ensureIndexCreated: { + name: "EnsureIndexCreated", + I: $fs, + O: Ffs, + kind: Ge.Unary + }, + getHighLevelFolderDescription: { + name: "GetHighLevelFolderDescription", + I: Nfs, + O: Afs, + kind: Ge.Unary + }, + getEmbeddings: { + name: "GetEmbeddings", + I: dgs, + O: hgs, + kind: Ge.Unary + }, + getUploadLimits: { + name: "GetUploadLimits", + I: rgs, + O: ogs, + kind: Ge.Unary + }, + getNumFilesToSend: { + name: "GetNumFilesToSend", + I: ags, + O: lgs, + kind: Ge.Unary + }, + getAvailableChunkingStrategies: { + name: "GetAvailableChunkingStrategies", + I: cgs, + O: ugs, + kind: Ge.Unary + }, + getLineNumberClassifications: { + name: "GetLineNumberClassifications", + I: Lgs, + O: Rgs, + kind: Ge.ServerStreaming + }, + getCopyStatus: { + name: "GetCopyStatus", + I: Ngs, + O: Mgs, + kind: Ge.Unary + } + } + }; + } +}); +function vor(i) { + if ("codeBlock" in i) { + const e = i.codeBlock; + if (e === undefined) { + throw new Error("Code block is undefined"); + } + return `${e.relativeWorkspacePath}:${e.range?.startPosition?.line}:${e.range?.startPosition?.column}:${e.range?.endPosition?.line}:${e.range?.endPosition?.column}`; + } else if ("file" in i) { + const e = i.file; + if (e === undefined) { + throw new Error("Code block is undefined"); + } + return e.relativeWorkspacePath; + } else { + throw new Error("Unknown retrieval result type"); + } +} +async function yor(i, { + minK: e, + finalK: t +}) { + const s = await Promise.allSettled(i); + const n = []; + for (const c of s) { + if (c.status === "fulfilled") { + const u = c.value; + u.sort((d, h) => h.score - d.score); + n.push(u); + } + } + const r = []; + const o = []; + for (const c of n) { + const u = c.slice(0, e); + r.push(...u); + o.push(...c.slice(e)); + } + o.sort((c, u) => u.score - c.score); + r.push(...o.slice(0, Math.max(t - r.length, 0))); + const a = {}; + for (const [c, u] of r.entries()) { + let d; + try { + d = vor(u); + } catch { + continue; + } + if (a[d] === undefined || u.score > a[d].score) { + a[d] = { + score: u.score, + index: c + }; + } + } + const l = []; + for (const [c, u] of Object.entries(a)) { + const { + index: d + } = u; + l.push(r[d]); + } + l.sort((c, u) => u.score - c.score); + return l; +} +var wor = ue({ + "out-build/vs/workbench/services/ai/common/retrievalUtils.js"() { + "use strict"; + } +}); +var BFs; +var rne; +var UFs = ue({ + "out-build/vs/workbench/services/search/common/searchExtTypes.js"() { + "use strict"; + + (function (i) { + i[i.None = 1] = "None"; + i[i.FilesExclude = 2] = "FilesExclude"; + i[i.SearchAndFilesExclude = 3] = "SearchAndFilesExclude"; + })(BFs ||= {}); + (function (i) { + i[i.Information = 1] = "Information"; + i[i.Warning = 2] = "Warning"; + })(rne ||= {}); + } +}); +function one(i) { + return !!i.rangeLocations && !!i.previewText; +} +function WFs(i) { + return !!i.resource; +} +function VFs(i) { + return !!i.message; +} +function Cor(i) { + const e = i[0].startLineNumber; + for (const t of i) { + if (t.startLineNumber !== e || t.endLineNumber !== e) { + return false; + } + } + return true; +} +function wYt(i, e = true) { + const t = i && i.files && i.files.exclude; + const s = e && i && i.search && i.search.exclude; + if (!t && !s) { + return; + } + if (!t || !s) { + return t || s || undefined; + } + let n = Object.create(null); + n = Oy(n, Gn(t)); + n = Oy(n, Gn(s), true); + return n; +} +function Swe(i, e) { + if (i.excludePattern && Jw(i.excludePattern, e)) { + return false; + } else if (i.includePattern || i.usingSearchPaths) { + if (i.includePattern && Jw(i.includePattern, e)) { + return true; + } else if (i.usingSearchPaths) { + return !!i.folderQueries && i.folderQueries.some(t => { + const s = t.folder.fsPath; + if (Hnt(e, s)) { + const n = DL(s, e); + return !t.includePattern || !!Jw(t.includePattern, n); + } else { + return false; + } + }); + } else { + return false; + } + } else { + return true; + } +} +function Sor(i) { + const e = i.message; + if (ca(i)) { + return new Dgt(e, cO.canceled); + } + try { + const t = JSON.parse(e); + return new Dgt(t.message, t.code); + } catch { + return new Dgt(e, cO.other); + } +} +var Egt; +var Gx; +var MU; +var CYt; +var ane; +var SYt; +var xYt; +var HFs; +var aC; +var qFs; +var jFs; +var zFs; +var JFs; +var Igt; +var kYt; +var EYt; +var GFs; +var KFs; +var cO; +var Dgt; +var Ed = ue({ + "out-build/vs/workbench/services/search/common/search.js"() { + "use strict"; + + Jt(); + Qp(); + Jr(); + zb(); + $i(); + te(); + pn(); + Ut(); + UFs(); + nt(); + Egt = "workbench.view.search"; + Gx = "workbench.view.search"; + MU = "search-result"; + CYt = "search.exclude"; + ane = 20000; + SYt = "⟪ "; + xYt = " characters skipped ⟫"; + HFs = (SYt.length + xYt.length + 5) * 2; + aC = Ve("searchService"); + (function (i) { + i[i.file = 0] = "file"; + i[i.text = 1] = "text"; + i[i.aiText = 2] = "aiText"; + })(qFs ||= {}); + (function (i) { + i[i.File = 1] = "File"; + i[i.Text = 2] = "Text"; + i[i.aiText = 3] = "aiText"; + })(jFs ||= {}); + (function (i) { + i[i.Normal = 0] = "Normal"; + i[i.NewSearchStarted = 1] = "NewSearchStarted"; + })(zFs ||= {}); + JFs = class { + constructor(i) { + this.resource = i; + this.results = []; + } + }; + Igt = class { + constructor(i, e, t, s) { + this.rangeLocations = []; + this.webviewIndex = s; + const n = Array.isArray(e) ? e : [e]; + if (t && t.matchLines === 1 && Cor(n)) { + i = iHn(i, t.matchLines); + let r = ""; + let o = 0; + let a = 0; + const l = Math.floor(t.charsPerLine / 5); + for (const c of n) { + const u = Math.max(c.startColumn - l, 0); + const d = c.startColumn + t.charsPerLine; + if (u > a + l + HFs) { + const h = SYt + (u - a) + xYt; + r += h + i.slice(u, d); + o += u - (a + h.length); + } else { + r += i.slice(a, d); + } + a = d; + this.rangeLocations.push({ + source: c, + preview: new EYt(0, c.startColumn - o, c.endColumn - o) + }); + } + this.previewText = r; + } else { + const r = Array.isArray(e) ? e[0].startLineNumber : e.startLineNumber; + const o = MVn(e, a => ({ + preview: new kYt(a.startLineNumber - r, a.startColumn, a.endLineNumber - r, a.endColumn), + source: a + })); + this.rangeLocations = Array.isArray(o) ? o : [o]; + this.previewText = i; + } + } + }; + kYt = class { + constructor(i, e, t, s) { + this.startLineNumber = i; + this.startColumn = e; + this.endLineNumber = t; + this.endColumn = s; + } + }; + EYt = class extends kYt { + constructor(i, e, t) { + super(i, e, i, t); + } + }; + (function (i) { + i.List = "list"; + i.Tree = "tree"; + })(GFs ||= {}); + (function (i) { + i.Default = "default"; + i.FileNames = "fileNames"; + i.Type = "type"; + i.Modified = "modified"; + i.CountDescending = "countDescending"; + i.CountAscending = "countAscending"; + })(KFs ||= {}); + (function (i) { + i[i.unknownEncoding = 1] = "unknownEncoding"; + i[i.regexParseError = 2] = "regexParseError"; + i[i.globParseError = 3] = "globParseError"; + i[i.invalidLiteral = 4] = "invalidLiteral"; + i[i.rgProcessError = 5] = "rgProcessError"; + i[i.other = 6] = "other"; + i[i.canceled = 7] = "canceled"; + })(cO ||= {}); + Dgt = class extends Error { + constructor(i, e) { + super(i); + this.code = e; + } + }; + } +}); +function xor(i) { + return typeof i == "object" && "uri" in i && "pattern" in i; +} +function kor(i) { + const e = i.match(/[\*\{\}\(\)\[\]\?]/); + if (e) { + const t = e.index; + const s = i.substr(0, t).match(/[/|\\][^/\\]*$/); + if (s) { + let n = i.substr(0, s.index); + if (!n.match(/[/\\]/)) { + n += "/"; + } + return { + pathPortion: n, + globPortion: i.substr((s.index || 0) + 1) + }; + } + } + return { + pathPortion: i + }; +} +function IYt(...i) { + if (i.length) { + return i.reduce((e, t) => { + e[t] = true; + return e; + }, Object.create(null)); + } else { + return undefined; + } +} +function Eor(i) { + return Ise(i, ",").map(e => e.trim()).filter(e => !!e.length); +} +function Ior(i) { + return [`**/${i}/**`, `**/${i}`].map(t => t.replace(/\*\*\/\*\*/g, "**")); +} +function Tgt(i) { + return i.replace(/\\/g, "/"); +} +function DYt(i) { + return Tgt(i).replace(/^\.\//, "").replace(/\/+$/g, ""); +} +function Dor(i) { + return i.replace(/([?*[\]])/g, "[$1]"); +} +function Tor(i, e) { + i = Ea(i, n => n.toString()); + const t = []; + const s = e.getWorkspace(); + if (i) { + i.forEach(n => { + let r; + if (e.getWorkbenchState() === 2) { + r = fb(s.folders[0].uri, n); + if (r && r !== ".") { + r = "./" + r; + } + } else { + const o = e.getWorkspaceFolder(n); + if (o) { + const a = o.name; + if (s.folders.filter(c => c.name === a).length === 1) { + const c = fb(o.uri, n); + if (c === "") { + r = `./${o.name}`; + } else { + r = `./${o.name}/${c}`; + } + } else { + r = n.fsPath; + } + } + } + if (r) { + t.push(Dor(r)); + } + }); + } + return t; +} +var C1; +var CE = ue({ + "out-build/vs/workbench/services/search/common/queryBuilder.js"() { + "use strict"; + + Jt(); + mT(); + Qp(); + Yp(); + In(); + At(); + pn(); + Et(); + $i(); + zt(); + Le(); + Z9(); + X(); + Me(); + Zt(); + Un(); + ii(); + ar(); + ad(); + Ed(); + C1 = class { + constructor(e, t, s, n, r, o) { + this.a = e; + this.b = t; + this.c = s; + this.d = n; + this.f = r; + this.g = o; + } + aiText(e, t, s = {}) { + return { + ...this.j(t?.map(lme), s), + type: 3, + contentPattern: e + }; + } + text(e, t, s = {}) { + e = this.h(e, s); + const n = this.a.getValue(); + const r = t && t.some(a => !this.a.getValue({ + resource: a + }).search.useRipgrep); + return { + ...this.j(t?.map(lme), s), + type: 2, + contentPattern: e, + previewOptions: s.previewOptions, + maxFileSize: s.maxFileSize, + usePCRE2: n.search.usePCRE2 || r || false, + surroundingContext: s.surroundingContext, + userDisabledExcludesAndIgnoreFiles: s.disregardExcludeSettings && s.disregardIgnoreFiles + }; + } + h(e, t) { + const s = this.a.getValue(); + if (e.isRegExp) { + e.pattern = e.pattern.replace(/\r?\n/g, "\\n"); + } + const n = { + ...e, + wordSeparators: s.editor.wordSeparators + }; + if (this.l(e, t)) { + n.isCaseSensitive = true; + } + if (this.m(e)) { + n.isMultiline = true; + } + if (t.notebookSearchConfig?.includeMarkupInput) { + n.notebookInfo ||= {}; + n.notebookInfo.isInNotebookMarkdownInput = t.notebookSearchConfig.includeMarkupInput; + } + if (t.notebookSearchConfig?.includeMarkupPreview) { + n.notebookInfo ||= {}; + n.notebookInfo.isInNotebookMarkdownPreview = t.notebookSearchConfig.includeMarkupPreview; + } + if (t.notebookSearchConfig?.includeCodeInput) { + n.notebookInfo ||= {}; + n.notebookInfo.isInNotebookCellInput = t.notebookSearchConfig.includeCodeInput; + } + if (t.notebookSearchConfig?.includeOutput) { + n.notebookInfo ||= {}; + n.notebookInfo.isInNotebookCellOutput = t.notebookSearchConfig.includeOutput; + } + return n; + } + file(e, t = {}) { + return { + ...this.j(e, t), + type: 1, + filePattern: t.filePattern ? t.filePattern.trim() : t.filePattern, + exists: t.exists, + sortByScore: t.sortByScore, + cacheKey: t.cacheKey, + shouldGlobMatchFilePattern: t.shouldGlobSearch + }; + } + i(e, t) { + if (!e) { + return {}; + } + if (Array.isArray(e)) { + e = e.filter(s => s.length > 0).map(Tgt); + if (!e.length) { + return {}; + } + } else { + e = Tgt(e); + } + if (t) { + return this.parseSearchPaths(e); + } else { + return { + pattern: IYt(...(Array.isArray(e) ? e : [e])) + }; + } + } + j(e = [], t = {}) { + let s = Array.isArray(t.excludePattern) ? t.excludePattern.map(u => u.pattern).flat() : t.excludePattern; + s = s?.length === 1 ? s[0] : s; + const n = this.i(t.includePattern, t.expandPatterns); + const r = this.i(s, t.expandPatterns); + const o = e.length > 1; + const a = (n.searchPaths && n.searchPaths.length ? n.searchPaths.map(u => this.t(u, t, r)) : e.map(u => this.u(u, t, r, o))).filter(u => !!u); + const l = { + _reason: t._reason, + folderQueries: a, + usingSearchPaths: !!n.searchPaths && !!n.searchPaths.length, + extraFileResources: t.extraFileResources, + excludePattern: r.pattern, + includePattern: n.pattern, + onlyOpenEditors: t.onlyOpenEditors, + maxResults: t.maxResults, + onlyFileScheme: t.onlyFileScheme + }; + if (t.onlyOpenEditors) { + const u = dr(this.c.groups.flatMap(g => g.editors.map(p => p.resource))); + this.d.trace("QueryBuilder#commonQuery - openEditor URIs", JSON.stringify(u)); + const d = u.filter(g => Swe(l, g.fsPath)); + const h = this.k(d); + this.d.trace("QueryBuilder#commonQuery - openEditor Query", JSON.stringify(h)); + return { + ...l, + ...h + }; + } + const c = t.extraFileResources && t.extraFileResources.filter(u => Swe(l, u.fsPath)); + l.extraFileResources = c && c.length ? c : undefined; + return l; + } + k(e) { + const t = []; + const s = new dn(); + const n = {}; + let r = false; + e.forEach(o => { + if (o.scheme === me.walkThrough) { + return; + } + if (U4t(o)) { + const l = this.b.getWorkspaceFolder(o)?.uri ?? this.g.extUri.dirname(o); + let c = s.get(l); + if (!c) { + r = true; + c = { + folder: l, + includePattern: {} + }; + t.push(c); + s.set(l, c); + } + const u = DL(l.fsPath, o.fsPath); + Tn(c.includePattern)[u.replace(/\\/g, "/")] = true; + } else if (o.fsPath) { + r = true; + n[o.fsPath] = true; + } + }); + return { + folderQueries: t, + includePattern: n, + usingSearchPaths: true, + excludePattern: r ? undefined : { + "**/*": true + } + }; + } + l(e, t) { + if (t.isSmartCase) { + if (e.isRegExp) { + if (x4t(e.pattern, true)) { + return true; + } + } else if (x4t(e.pattern)) { + return true; + } + } + return !!e.isCaseSensitive; + } + m(e) { + if (e.isMultiline || e.isRegExp && srs(e.pattern) || e.pattern.indexOf(` +`) >= 0) { + return true; + } else { + return !!e.isMultiline; + } + } + parseSearchPaths(e) { + const t = d => HC(d) || /^\.\.?([\/\\]|$)/.test(d); + const n = (Array.isArray(e) ? e : Eor(e)).map(d => { + const h = this.f.resolvedUserHome; + if (h) { + return bus(d, h.scheme === me.file ? h.fsPath : h.path); + } else { + return d; + } + }); + const r = Tq(n, d => t(d) ? "searchPaths" : "exprSegments"); + const o = (r.exprSegments || []).map(d => _0(d, "/")).map(d => _0(d, "\\")).map(d => { + if (d[0] === ".") { + d = "*" + d; + } + return Ior(d); + }); + const a = {}; + const l = this.o(r.searchPaths || []); + if (l && l.length) { + a.searchPaths = l; + } + const c = o.flat(); + const u = IYt(...c); + if (u) { + a.pattern = u; + } + return a; + } + n(e, t) { + if (t.disregardExcludeSettings) { + return undefined; + } else { + return wYt(e, !t.disregardSearchExcludeSettings); + } + } + o(e) { + if (!e || !e.length) { + return []; + } + const t = e.flatMap(n => { + let { + pathPortion: r, + globPortion: o + } = kor(n); + o &&= DYt(o); + return this.q(r).flatMap(l => this.r(l, o)); + }); + const s = new Map(); + t.forEach(n => { + const r = n.searchPath.toString(); + const o = s.get(r); + if (o) { + if (n.pattern) { + o.pattern = o.pattern || {}; + o.pattern[n.pattern] = true; + } + } else { + s.set(r, { + searchPath: n.searchPath, + pattern: n.pattern ? IYt(n.pattern) : undefined + }); + } + }); + return Array.from(s.values()); + } + q(e) { + if (HC(e)) { + const t = this.b.getWorkspace().folders; + if (t[0] && t[0].uri.scheme !== me.file) { + return [{ + searchPath: t[0].uri.with({ + path: e + }) + }]; + } else { + return [{ + searchPath: V.file(My(e)) + }]; + } + } + if (this.b.getWorkbenchState() === 2) { + const t = this.b.getWorkspace().folders[0].uri; + e = Tgt(e); + if (e.startsWith("../") || e === "..") { + const n = ao.resolve(t.path, e); + return [{ + searchPath: t.with({ + path: n + }) + }]; + } + const s = DYt(e); + return [{ + searchPath: t, + pattern: s + }]; + } else { + if (e === "./" || e === ".\\") { + return []; + } + { + const t = e.replace(/^\.[\/\\]/, ""); + const n = this.b.getWorkspace().folders.map(r => { + const o = t.match(new RegExp(`^${zg(r.name)}(?:/(.*)|$)`)); + if (o) { + return { + match: o, + folder: r + }; + } else { + return null; + } + }).filter(to); + if (n.length) { + return n.map(r => { + const o = r.match[1]; + return { + searchPath: r.folder.uri, + pattern: o && DYt(o) + }; + }); + } + { + const r = e.match(/\.[\/\\](.+)[\/\\]?/); + const o = r ? r[1] : e; + const a = f(13204, null, o); + throw new Error(a); + } + } + } + } + r(e, t) { + const s = e.pattern && t ? `${e.pattern}/${t}` : e.pattern || t; + const n = [{ + searchPath: e.searchPath, + pattern: s + }]; + if (s && !s.endsWith("**")) { + n.push({ + searchPath: e.searchPath, + pattern: s + "/**" + }); + } + return n; + } + t(e, t, s) { + const n = this.u(lme(e.searchPath), t, s, false); + if (n) { + return { + ...n, + includePattern: e.pattern + }; + } else { + return null; + } + } + u(e, t, s, n) { + let r; + const o = V.isUri(e) ? e : e.uri; + let a = t.excludePattern?.map(g => { + const p = t.excludePattern && xor(g) ? g.uri : undefined; + if (!p || !V.isUri(e) || !this.g.extUri.isEqual(e, p)) { + return p; + } else { + return undefined; + } + }); + if (!a?.length) { + a = [undefined]; + } + if (s.searchPaths) { + const g = s.searchPaths.filter(p => Ls(p.searchPath, o))[0]; + if (g && !g.pattern) { + return null; + } + if (g) { + r = g.pattern; + } + } + const l = this.a.getValue({ + resource: o + }); + const u = { + ...(this.n(l, t) || {}), + ...(r || {}) + }; + const d = V.isUri(e) ? ji(e) : e.name; + const h = a.map(g => Object.keys(u).length > 0 ? { + folder: g, + pattern: u + } : undefined).filter(g => g); + return { + folder: o, + folderName: n ? d : undefined, + excludePattern: h, + fileEncoding: l.files && l.files.encoding, + disregardIgnoreFiles: typeof t.disregardIgnoreFiles == "boolean" ? t.disregardIgnoreFiles : !l.search.useIgnoreFiles, + disregardGlobalIgnoreFiles: typeof t.disregardGlobalIgnoreFiles == "boolean" ? t.disregardGlobalIgnoreFiles : !l.search.useGlobalIgnoreFiles, + disregardParentIgnoreFiles: typeof t.disregardParentIgnoreFiles == "boolean" ? t.disregardParentIgnoreFiles : !l.search.useParentIgnoreFiles, + ignoreSymlinks: typeof t.ignoreSymlinks == "boolean" ? t.ignoreSymlinks : !l.search.followSymlinks + }; + } + }; + C1 = __decorate([__param(0, ve), __param(1, kt), __param(2, Hi), __param(3, Bt), __param(4, Au), __param(5, _s)], C1); + } +}); +function Por(i) { + return i.provider.rootUri?.path; +} +function YFs(i, e) { + if (e === undefined) { + return; + } + const t = i.parseSearchPaths(e); + if (t.pattern !== undefined) { + return Lor(t.pattern); + } +} +function Lor(i) { + if (typeof i == "string") { + return i; + } else { + return `{${Object.keys(i).filter(t => i[t] === true).join(",")}}`; + } +} +function Ror(i, e, t) { + if (t?.includePattern) { + const s = e.parseSearchPaths(t.includePattern); + if (s.pattern && !Jw(s.pattern, i)) { + return false; + } + } + if (t?.excludePattern) { + const s = e.parseSearchPaths(t.excludePattern); + if (s.pattern && Jw(s.pattern, i)) { + return false; + } + } + return !t?.globFilter || !!Jw(t.globFilter, i); +} +var XFs; +var sy; +var Pgt; +var QFs; +var lC = ue({ + "out-build/vs/workbench/services/ai/browser/repositoryService.js"() { + "use strict"; + + _Fs(); + cS(); + pe(); + Qp(); + Le(); + It(); + te(); + gs(); + Cs(); + xc(); + w5(); + sh(); + yE(); + fr(); + q(); + Ps(); + Rn(); + Ms(); + Je(); + zy(); + ii(); + dv(); + Yw(); + Sm(); + wR(); + wor(); + CE(); + Ed(); + Pn(); + qx(); + (function (i) { + i[i.INDEX_MODIFIED = 0] = "INDEX_MODIFIED"; + i[i.INDEX_ADDED = 1] = "INDEX_ADDED"; + i[i.INDEX_DELETED = 2] = "INDEX_DELETED"; + i[i.INDEX_RENAMED = 3] = "INDEX_RENAMED"; + i[i.INDEX_COPIED = 4] = "INDEX_COPIED"; + i[i.MODIFIED = 5] = "MODIFIED"; + i[i.DELETED = 6] = "DELETED"; + i[i.UNTRACKED = 7] = "UNTRACKED"; + i[i.IGNORED = 8] = "IGNORED"; + i[i.INTENT_TO_ADD = 9] = "INTENT_TO_ADD"; + i[i.ADDED_BY_US = 10] = "ADDED_BY_US"; + i[i.ADDED_BY_THEM = 11] = "ADDED_BY_THEM"; + i[i.DELETED_BY_US = 12] = "DELETED_BY_US"; + i[i.DELETED_BY_THEM = 13] = "DELETED_BY_THEM"; + i[i.BOTH_ADDED = 14] = "BOTH_ADDED"; + i[i.BOTH_DELETED = 15] = "BOTH_DELETED"; + i[i.BOTH_MODIFIED = 16] = "BOTH_MODIFIED"; + })(XFs ||= {}); + sy = Ve("repositoryService"); + Pgt = class extends H { + get primaryQueryOnlyIndex() { + return this.C.nonPersistentStorage.primaryQueryOnlyIndex; + } + setQueryOnlyIndex(e) { + this.C.setNonPersistentStorage("primaryQueryOnlyIndex", e); + } + constructor(e, t, s, n, r, o, a, l, c, u, d) { + super(); + this.w = e; + this.y = t; + this.z = s; + this.C = n; + this.F = r; + this.G = o; + this.H = a; + this.I = l; + this.J = c; + this.L = u; + this.M = d; + this.f = () => {}; + this.clearRepositoryIntervalFunction = () => {}; + this.diffProvider = null; + this.g = new Map(); + this.indexingProvider = undefined; + this.h = new Map(); + this.m = this.D(new B()); + this.onDidRequestRepoIndex = this.m.event; + this.n = this.D(new B()); + this.onDidRequestRepoInterrupt = this.n.event; + this.q = this.D(new B()); + this.onDidChangeIndexingStatus = this.q.event; + this.u = () => false; + this.s = this.L.createInstance(C1); + this.c = this.L.createInstance(Uf, { + service: kgt + }); + this.D(this.C.createScoped(this)).onChangeEffect({ + deps: [() => this.C.workspaceUserPersistentStorage.indexingData.preferredEmbeddingModel], + onChange: () => { + this.indexMainLocalRepository(); + } + }); + this.onDidChangeIndexingStatus(async () => { + const g = await this.indexingProvider?.getGlobalStatus(); + if (g !== undefined) { + if (g.case === "synced") { + this.C.setNonPersistentStorage("repositoryLastSyncedTime", Date.now()); + } + this.C.setNonPersistentStorage("repositoryIndexingStatus", g); + switch (g.case) { + case "not-indexed": + break; + case "not-auto-indexing": + { + if (this.C.applicationUserPersistentStorage.bubbleTimesLeft > 0 && g.numFiles < 20000) { + this.indexMainRepository(); + } + break; + } + case "error": + { + this.C.setNonPersistentStorage("repositoryIndexingError", { + type: pse.EXTENSION_ERROR, + message: g.error + }); + break; + } + case "indexing-setup": + { + if ((await this.getNewRepoInfo()) === undefined) { + this.C.setNonPersistentStorage("repositoryIndexingError", { + type: pse.NO_REPO + }); + return; + } + break; + } + case "indexing-init-from-similar-codebase": + { + if ((await this.getNewRepoInfo()) === undefined) { + this.C.setNonPersistentStorage("repositoryIndexingError", { + type: pse.NO_REPO + }); + return; + } + break; + } + case "indexing": + { + const p = await this.getNewRepoInfo(); + if (p === undefined) { + this.C.setNonPersistentStorage("repositoryIndexingError", { + type: pse.NO_REPO + }); + return; + } + const b = p.repoName; + const v = await this.indexingProvider?.getCodebases(); + if (v === undefined) { + return; + } + const y = {}; + let w = 0; + for (const C of v) { + const S = await this.indexingProvider?.getIndexingProgress(C); + if (S === undefined) { + continue; + } + const x = await this.indexingProvider?.getCurrentJobs(C); + if (x !== undefined) { + if (S > w) { + w = S; + } + y[C] = x; + } + } + this.C.setNonPersistentStorage("mainLocalRepositoryProgress", { + repoId: b, + progress: w + }); + this.C.setNonPersistentStorage("repositoryIndexingJobs", y); + break; + } + case "synced": + break; + case "paused": + break; + case "loading": + break; + default: + return g; + } + } + }); + } + async getEmbeddableFilesPath() { + return await this.indexingProvider?.getEmbeddableFilesPath(); + } + setIsUriCursorIgnored(e) { + this.u = e; + } + registerIndexingProvider(e) { + this.indexingProvider = e; + } + unregisterIndexingProvider() { + this.indexingProvider = undefined; + } + fireOnDidChangeIndexingStatus() { + this.q.fire(); + } + unregisterOnDidChangeIndexingStatus() {} + async getNewRepoInfo() { + const e = Date.now(); + while (!this.indexingProvider && Date.now() - e < 500) { + await new Promise(t => setTimeout(t, 100)); + } + if (!this.O()) { + if (this.primaryQueryOnlyIndex) { + return this.primaryQueryOnlyIndex.repositoryInfo; + } + this.t = await this.indexingProvider?.getQueryOnlyRepoInfo(); + if (this.t) { + return this.t.repositoryInfo; + } + } + return await this.indexingProvider?.getRepoInfo(); + } + async getPathEncryptionKey_ONLY_FOR_VM_AGENT() { + const e = Date.now(); + while (!this.indexingProvider && Date.now() - e < 5000) { + await new Promise(t => setTimeout(t, 100)); + } + return await this.indexingProvider?.getPathEncryptionKey_ONLY_FOR_VM_AGENT(); + } + isIndexedRepository() { + return this.O() || this.primaryQueryOnlyIndex !== undefined || this.t !== undefined; + } + N() { + let e = this.primaryQueryOnlyIndex; + if (e === undefined) { + e = this.t; + } + return e; + } + getOverridePathEncryptionKey(e) { + const t = this.N(); + if (t !== undefined && e.repoName === t.repositoryInfo.repoName && e.repoOwner === t.repositoryInfo.repoOwner) { + return t.pathEncryptionKey; + } + } + maybeGetQueryOnlyRepoAccess(e) { + const t = this.N(); + if (t !== undefined && e !== undefined && e.repoName === t.repositoryInfo.repoName && e.repoOwner === t.repositoryInfo.repoOwner) { + return t.queryOnlyRepoAccess; + } + } + getIndexingProgress() { + if (this.C.nonPersistentStorage.repositoryIndexingStatus?.case === "synced") { + return 1; + } else { + return this.C.nonPersistentStorage.mainLocalRepositoryProgress?.progress ?? 0; + } + } + getIndexingPhase() { + return this.C.nonPersistentStorage.repositoryIndexingStatus?.case; + } + getNumFilesInUnindexedRepo() { + if (this.C.nonPersistentStorage.repositoryIndexingStatus?.case === "not-auto-indexing") { + return this.C.nonPersistentStorage.repositoryIndexingStatus?.numFiles; + } else { + return undefined; + } + } + O() { + if (this.getIndexingProgress() > 0.8) { + return true; + } + { + const e = this.C.nonPersistentStorage.repositoryIndexingStatus?.case; + if (["indexing-setup", "indexing", "indexing-init-from-similar-codebase", "loading", "out-of-sync", "creating-index", "error"].includes(e)) { + if (e === "indexing" && (this.C.nonPersistentStorage.mainLocalRepositoryProgress?.progress ?? 0) < 0.5) { + return false; + } + const s = this.C.nonPersistentStorage.repositoryLastSyncedTime; + if (s !== undefined && Date.now() - s < 3600000) { + return true; + } + } + return false; + } + } + async indexMainRepository(e = false) { + if (!this.w.isAuthenticated()) { + this.C.setNonPersistentStorage("repositoryIndexingStatus", { + case: "error", + error: "Not authenticated" + }); + return; + } + return this.indexMainLocalRepository(); + } + async deleteMainLocalRepository() { + const e = await this.getNewRepoInfo(); + if (e === undefined) { + return; + } + await (await this.c.get()).removeRepositoryV2(new _Ht({ + repository: e + }), { + headers: Pa(Ft()) + }); + this.n.fire(false); + this.C.setNonPersistentStorage("repositoryIndexingStatus", { + case: "not-indexed" + }); + if (this.C.nonPersistentStorage.mainLocalRepositoryProgress === undefined) { + this.C.setNonPersistentStorage("mainLocalRepositoryProgress", {}); + } + this.C.setNonPersistentStorage("mainLocalRepositoryProgress", "progress", 0); + this.C.setNonPersistentStorage("repositoryIndexingJobs", {}); + } + async pauseIndexingJob() { + this.n.fire(true); + } + registerDiffProvider(e) { + this.diffProvider = e; + } + dispose() { + super.dispose(); + this.f(); + this.clearRepositoryIntervalFunction(); + } + repositoryToInfo(e) { + const t = e.provider.remotes; + if (t === undefined) { + return null; + } + if (t.length === 0) { + throw new Error("No remotes found"); + } + const n = t[0].fetchUrl?.split(/\/|\:/); + if (n === undefined) { + throw new Error("Could not parse origin url"); + } + const r = n[n.length - 2]; + const o = n[n.length - 1].split(".")[0]; + if (r === undefined || o === undefined) { + throw new Error("Could not parse repo owner and name"); + } + return { + id: e.id, + repoName: o, + repoOwner: r, + relativeWorkspacePath: Por(e) + }; + } + async codeBlockFromRemote(e) { + const t = e.relativeWorkspacePath; + const s = this.H.resolveRelativePath(t); + let n; + let r = null; + try { + this.C.setNonPersistentStorage("suppressFileExtensionRecommendationsStart", Date.now()); + n = await this.G.createModelReference(s); + const o = e.range; + if (o === undefined || o.startPosition === undefined || o.endPosition === undefined) { + return null; + } + let a; + let l = []; + let c; + const u = []; + c = n.object.textEditorModel.getValueInRange({ + startLineNumber: o.startPosition.line, + startColumn: o.startPosition.column, + endLineNumber: o.endPosition.line, + endColumn: o.endPosition.column + }); + a = c; + for (const [h, g] of c.split(` +`).entries()) { + u.push({ + lineNumber: h + (o.startPosition?.line - 1) + 1, + text: g, + isSignature: false + }); + } + const d = e.signatures?.ranges; + if (d) { + for (const h of d) { + if (h !== undefined && h.startPosition !== undefined && h.endPosition !== undefined && !(h.endPosition.line >= o.startPosition.line)) { + l.push(n.object.textEditorModel.getValueInRange({ + startLineNumber: h.startPosition.line, + startColumn: h.startPosition.column, + endLineNumber: h.endPosition.line, + endColumn: n.object.textEditorModel.getLineLength(h.endPosition.line) + 1 + })); + } + } + if (l.length !== 0) { + let h = ""; + let g = 0; + for (const [p, b] of [...l, a].entries()) { + let v; + if (p < l.length) { + for (const [C, S] of b.split(` +`).entries()) { + u.push({ + lineNumber: C + (d[p]?.startPosition?.line ?? 1), + text: S, + isSignature: true + }); + } + v = d[p]?.startPosition?.line ?? 1; + } else { + v = o.startPosition?.line ?? 1; + } + if (p === 0) { + h += b; + continue; + } + const y = b.match(/^\s*/); + let w; + if (y) { + w = y[0]; + } else { + w = ""; + } + h += ` +${w}... +${b}`; + u.push({ + lineNumber: v - 0.5, + text: w + "...", + isSignature: true + }); + } + a = h; + } + } + u.sort((h, g) => h.lineNumber - g.lineNumber); + r = { + detailedLines: u, + contents: a, + originalContents: c, + relativeWorkspacePath: this.H.asRelativePath(s), + range: o + }; + } catch {} finally { + if (n) { + n.dispose(); + } + } + return r; + } + async semanticSearch(e, t, s) { + function n(c) { + return { + startLineNumber: (c.startPosition?.line || 1) - 1, + startColumn: (c.startPosition?.column || 1) - 1, + endLineNumber: (c.endPosition?.line || 1) - 1, + endColumn: (c.endPosition?.column || 1) - 1 + }; + } + const o = (await this.parallelSearch(e.contentPattern.pattern, 100)).flatMap((c, u) => { + if (c.codeBlock === undefined || c.codeBlock.range === undefined) { + return []; + } + const d = n(c.codeBlock.range); + return [{ + uri: this.H.resolveRelativePath(c.codeBlock.relativeWorkspacePath), + previewText: c.codeBlock.contents, + rangeLocations: [{ + source: d, + preview: { + startLineNumber: 0, + startColumn: 0, + endLineNumber: d.endLineNumber - d.startLineNumber, + endColumn: d.endColumn + } + }] + }]; + }); + const a = {}; + for (const c of o) { + if (c.uri) { + if (a[c.uri.toString()] === undefined) { + a[c.uri.toString()] = []; + } + a[c.uri.toString()].push(c); + } + } + const l = []; + for (const c in a) { + const u = V.parse(c); + if (Swe(e, u.fsPath) && Object.prototype.hasOwnProperty.call(a, c)) { + const d = a[c]; + l.push({ + resource: u, + results: d + }); + } + } + for (const c of l) { + s?.(c); + } + return { + results: l, + messages: [] + }; + } + async getRepoAuthId() { + const e = await (async () => { + if (this.y.getRepoBackendUrl().includes("cursor.sh") && !this.y.getBackendUrl().includes("cursor.sh")) { + const s = this.J.cachedServerConfig; + if (s.indexingConfig?.repo42AuthToken) { + return s.indexingConfig.repo42AuthToken; + } + } + return await this.w.getAccessToken(); + })(); + if (e) { + return this.w.getAuthIdFromToken(e); + } else { + return undefined; + } + } + async parallelSearchGetContents(e, t = 10, s, n) { + return (await this.parallelSearch(e, t, s, n)).map(o => { + const a = o.codeBlock; + if (a === undefined) { + return o; + } + const l = this.H.resolveRelativePath(a.relativeWorkspacePath); + const c = this.M.getModel(l); + if (!c || a.range === undefined) { + return o; + } else { + return new xb({ + ...o, + codeBlock: { + ...o.codeBlock, + contents: c.getValueInRange({ + startColumn: a.range.startPosition?.column ?? 1, + startLineNumber: a.range.startPosition?.line ?? 1, + endColumn: a.range.endPosition?.column ?? 1, + endLineNumber: a.range.endPosition?.line ?? 1 + }) + } + }); + } + }); + } + async searchMultipleQueries(e, { + topK: t, + minK: s, + finalK: n + }, r) { + const a = e.map(l => ({ + text: l.text, + newGlob: fLs({ + globsNewLineSeparated: l.globsNewLineSeparated, + properGlob: r?.newlineSepGlobFilter + }) + })).map(l => this.parallelSearch(l.text, t, t, { + includePattern: r?.includePattern, + excludePattern: r?.excludePattern, + globFilter: l.newGlob + })); + return await yor(a, { + minK: s, + finalK: n + }); + } + async parallelSearch(e, t = 10, s, n) { + try { + const r = await this.searchNewLocal(e, t, n); + return this.filterResults(r, t, s); + } catch { + return []; + } + } + filterResults(e, t = 10, s) { + return e.filter(n => n.codeBlock !== undefined && n.codeBlock.contents.length < 20000).sort((n, r) => r.score - n.score).slice(0, s ?? t); + } + async compileGlobFilterFromPattern(e) { + if (this.indexingProvider === undefined) { + throw new Error("Indexing provider not found"); + } + const t = { + globFilter: e?.globFilter ?? YFs(this.s, e?.includePattern), + notGlobFilter: YFs(this.s, e?.excludePattern), + overridePathEncryptionKey: e.overridePathEncryptionKey ?? this.getOverridePathEncryptionKey(e.repoInfo) + }; + return await this.indexingProvider.compileGlobFilter(t); + } + async searchNewLocal(e, t = 10, s) { + const n = await this.c.get(); + const r = await this.getNewRepoInfo(); + if (r === undefined) { + throw new Error("No repository info found"); + } + if (this.indexingProvider === undefined) { + throw new Error("Indexing provider not found"); + } + const o = { + ...r, + id: _F.id + }; + let a; + try { + const l = await this.compileGlobFilterFromPattern({ + includePattern: s?.includePattern, + excludePattern: s?.excludePattern, + globFilter: s?.globFilter, + repoInfo: r + }); + const c = { + query: e, + repository: r, + topK: t, + contextCacheRequest: s?.contextCacheRequest, + globFilter: l.globFilter, + notGlobFilter: l.notGlobFilter, + queryOnlyRepoAccess: this.maybeGetQueryOnlyRepoAccess(r) + }; + const u = Ft(); + const d = { + headers: Pa(u), + signal: s?.abortSignal + }; + if (s?.abortSignal?.aborted) { + throw new Error("Aborted"); + } + a = await n.searchRepositoryV2(c, d); + } catch (l) { + if (l instanceof Eg) { + if (!s?.silent) { + console.error("searchRepositoryV2 failed", l); + } + return []; + } + throw l; + } + return await this.getFinalCodeResults(o, a.codeResults, { + ...s, + topK: t + }); + } + syncIndexWithGivenRepositoryInfo(e) { + this.n.fire(true); + this.m.fire({ + forceOverrideRepoInfo: e + }); + } + indexMainLocalRepository() { + if (this.w.isAuthenticated()) { + this.n.fire(true); + this.m.fire(undefined); + } + } + interruptLocalRepository(e) { + if (e.id === _F.id) { + this.n.fire(false); + const t = xt.setInterval(() => { + this.C.setNonPersistentStorage("repoProgressBars", s => s.filter(n => n.repoId !== _F.id)); + }, 100); + setTimeout(() => { + xt.clearInterval(t); + }, 3000); + } + } + async getEmbeddings(...e) { + return (await (await this.c.get()).getEmbeddings({ + texts: e + }, { + headers: Pa(Ft()) + })).embeddings.map(n => n.embedding); + } + async *getLineNumberClassifications(e, t, s) { + const n = c => JSON.stringify({ + relativeWorkspacePath: c.codeBlock?.relativeWorkspacePath, + range: c.codeBlock?.range + }); + const r = new Map(e.map((c, u) => [n(c.ogCodeResult), { + ogCodeResult: c.ogCodeResult, + idx: u + }])); + const o = { + query: t, + codeResults: e.map(c => c.localCodeResult).filter(c => c !== null) + }; + const l = await (await this.c.get()).getLineNumberClassifications(o, { + signal: s + }); + for await (const c of l) { + const u = c.classifiedResult; + if (u?.codeResult !== undefined) { + const d = r.get(n(u.codeResult)); + if (d !== undefined) { + yield { + withClassificationInfo: u, + idx: d.idx + }; + } + } + } + } + async convertToLocalBlock(e) { + try { + const t = await this.codeBlockFromRemote(e); + if (!t || t.contents !== undefined && t.contents.length > 20000) { + return null; + } else { + if (t.contents !== undefined) { + t.contents = await this.I.cleanText(t.contents, t.relativeWorkspacePath); + } + return t; + } + } catch (t) { + console.error("Failed to convert code block to local block:", t); + return null; + } + } + async getFinalCodeResults(e, t, s) { + if (!this.indexingProvider) { + throw new Error("Indexing provider not found"); + } + const n = t.map(d => d.codeBlock?.relativeWorkspacePath).filter(d => d !== undefined); + const r = await this.indexingProvider.decryptPaths({ + paths: n, + overridePathEncryptionKey: this.getOverridePathEncryptionKey(e) + }); + const o = new Map(); + for (let d = 0; d < n.length; d++) { + o.set(n[d], r[d]); + } + const a = t.map(async d => { + if (d.codeBlock === undefined) { + throw new Error("Code block undefined"); + } + const h = o.get(d.codeBlock.relativeWorkspacePath); + if (h === undefined) { + throw new Error("Path not found"); + } + d.codeBlock.relativeWorkspacePath = h; + if (d.codeBlock.relativeWorkspacePath.startsWith("./") || d.codeBlock.relativeWorkspacePath.startsWith(".\\")) { + d.codeBlock.relativeWorkspacePath = d.codeBlock.relativeWorkspacePath.substring(2); + } + if (!Ror(d.codeBlock.relativeWorkspacePath, this.s, s)) { + return null; + } + const g = await this.convertToLocalBlock(d.codeBlock); + if (g === null) { + return null; + } else { + return new xb({ + score: d.score, + codeBlock: g + }); + } + }); + const u = (await Promise.allSettled(a)).map(d => { + if (d.status === "rejected") { + console.error(d.reason); + return null; + } + if (s?.excludeCursorIgnored && d.value?.codeBlock?.relativeWorkspacePath) { + const h = this.H.resolveRelativePath(d.value.codeBlock.relativeWorkspacePath); + if (this.u(h)) { + return null; + } + } + return d.value; + }).filter(d => d !== null).sort((d, h) => h.score - d.score); + if (s?.topK) { + return u.slice(0, s.topK); + } else { + return u; + } + } + }; + Pgt = __decorate([__param(0, $u), __param(1, SR), __param(2, os), __param(3, _i), __param(4, Km), __param(5, ns), __param(6, kt), __param(7, vE), __param(8, Qw), __param(9, re), __param(10, $s)], Pgt); + it(sy, Pgt, 1); + QFs = class extends se { + constructor() { + super({ + id: k5t, + title: { + value: "Set Query Only Index", + original: "Set Query Only Index" + }, + f1: false + }); + } + run(i, { + queryOnlyRepositoryInfo: e + }) { + i.get(sy).setQueryOnlyIndex(e); + } + }; + J(QFs); + } +}); +function ZFs(i) { + if (Array.isArray(i)) { + return i; + } else { + return [i]; + } +} +var Lgt; +var TYt; +var Rgt; +var eOs; +var tOs; +var iOs; +var sOs; +var nOs; +var rOs; +var Ngt; +var PYt; +var LYt; +var RYt; +var oOs; +var aOs; +var NYt; +var lOs; +var cOs; +var uOs; +var MYt; +var dOs; +var Mgt; +var hOs; +var fOs; +var gOs; +var pOs; +var mOs; +var uO; +var AYt; +var bOs; +var xwe; +var vOs; +var L5; +var $Yt = ue({ + "out-build/vs/workbench/services/utils/common/ignore.js"() { + "use strict"; + + In(); + rt(); + Lgt = ""; + TYt = " "; + Rgt = "\\"; + eOs = /^\s+$/; + tOs = /(?:[^\\]|^)\\$/; + iOs = /^\\!/; + sOs = /^\\#/; + nOs = /\r?\n/g; + rOs = /^\.*\/|^\.+$/; + Ngt = "/"; + PYt = 50000; + LYt = "node-ignore"; + if (typeof Symbol !== "undefined") { + LYt = Symbol.for("node-ignore"); + } + RYt = LYt; + oOs = (i, e, t) => Object.defineProperty(i, e, { + value: t + }); + aOs = /([0-z])-([0-z])/g; + NYt = () => false; + lOs = i => i.replace(aOs, (e, t, s) => t.charCodeAt(0) <= s.charCodeAt(0) ? e : Lgt); + cOs = i => { + const { + length: e + } = i; + return i.slice(0, e - e % 2); + }; + uOs = [[/^\uFEFF/, () => Lgt], [/\\?\s+$/, i => i.indexOf("\\") === 0 ? TYt : Lgt], [/\\\s/g, () => TYt], [/[\\$.|*+(){^]/g, i => `\\${i}`], [/(?!\\)\?/g, () => "[^/]"], [/^\//, () => "^"], [/\//g, () => "\\/"], [/^\^*\\\*\\\*\\\//, () => "^(?:.*\\/)?"], [/^(?=[^^])/, function () { + if (/\/(?!$)/.test(this)) { + return "^"; + } else { + return "(?:^|\\/)"; + } + }], [/\\\/\\\*\\\*(?=\\\/|$)/g, (i, e, t) => e + 6 < t.length ? "(?:\\/[^\\/]+)*" : "\\/.+"], [/(^|[^\\]+)(\\\*)+(?=.+)/g, (i, e, t) => { + const s = t.replace(/\\\*/g, "[^\\/]*"); + return e + s; + }], [/\\\\\\(?=[$.|*+(){^])/g, () => Rgt], [/\\\\/g, () => Rgt], [/(\\)?\[([^\]/]*?)(\\*)($|\])/g, (i, e, t, s, n) => e === Rgt ? `\\[${t}${cOs(s)}${n}` : n === "]" && s.length % 2 === 0 ? `[${lOs(t)}${s}]` : "[]"], [/(?:[^*])$/, i => /\/$/.test(i) ? `${i}$` : `${i}(?=$|\\/$)`], [/(\^|\\\/)?\\\*$/, (i, e) => `${e ? `${e}[^/]+` : "[^/]*"}(?=$|\\/$)`]]; + MYt = Object.create(null); + dOs = (i, e) => { + let t = MYt[i]; + if (!t) { + t = uOs.reduce((s, n) => s.replace(n[0], n[1].bind(i)), i); + MYt[i] = t; + } + if (e) { + return new RegExp(t, "i"); + } else { + return new RegExp(t); + } + }; + Mgt = i => typeof i == "string"; + hOs = i => i && Mgt(i) && !eOs.test(i) && !tOs.test(i) && i.indexOf("#") !== 0; + fOs = i => i.split(nOs); + gOs = class { + constructor(i, e, t, s) { + this.origin = i; + this.pattern = e; + this.negative = t; + this.regex = s; + } + }; + pOs = (i, e) => { + const t = i; + let s = false; + if (i.indexOf("!") === 0) { + s = true; + i = i.substr(1); + } + i = i.replace(iOs, "!").replace(sOs, "#"); + const n = dOs(i, e); + return new gOs(t, i, s, n); + }; + mOs = (i, e) => { + throw new e(i); + }; + uO = (i, e, t) => Mgt(i) ? i ? uO.isNotRelative(i) ? t(`path should be a \`path.relative()\`d string, but got "${e}"`, RangeError) : true : t("path must not be empty", TypeError) : t(`path must be a string, but got \`${e}\``, TypeError); + AYt = i => rOs.test(i); + uO.isNotRelative = AYt; + uO.convert = i => i; + bOs = class { + constructor({ + ignorecase: i = true, + ignoreCase: e = i, + allowRelativePaths: t = false + } = {}) { + oOs(this, RYt, true); + this._rules = []; + this._ignoreCase = e; + this._allowRelativePaths = t; + this._initCache(); + } + _initCache() { + this._ignoreCache = new vc(PYt); + this._testCache = new vc(PYt); + } + _addPattern(i) { + if (i && i[RYt]) { + this._rules = this._rules.concat(i._rules); + this._added = true; + return; + } + if (hOs(i)) { + const e = pOs(i, this._ignoreCase); + this._added = true; + this._rules.push(e); + } + } + add(i) { + this._added = false; + ZFs(Mgt(i) ? fOs(i) : i).forEach(this._addPattern, this); + if (this._added) { + this._initCache(); + } + return this; + } + addPattern(i) { + return this.add(i); + } + _testOne(i, e) { + let t = false; + let s = false; + this._rules.forEach(n => { + const { + negative: r + } = n; + if (s === r && t !== s || r && !t && !s && !e) { + return; + } + if (n.regex.test(i)) { + t = !r; + s = r; + } + }); + return { + ignored: t, + unignored: s + }; + } + _test(i, e, t, s) { + const n = i && uO.convert(i); + uO(n, i, this._allowRelativePaths ? NYt : mOs); + return this._t(n, e, t, s); + } + _t(i, e, t, s) { + const n = e.get(i); + if (n !== undefined) { + return n; + } + s ||= i.split(Ngt); + s.pop(); + if (!s.length) { + const o = this._testOne(i, t); + e.set(i, o); + return o; + } + const r = this._t(s.join(Ngt) + Ngt, e, t, s); + if (r.ignored) { + e.set(i, r); + return r; + } + { + const o = this._testOne(i, t); + e.set(i, o); + return o; + } + } + ignores(i) { + return this._test(i, this._ignoreCache, false).ignored; + } + createFilter() { + return i => !this.ignores(i); + } + filter(i) { + return ZFs(i).filter(this.createFilter()); + } + test(i) { + return this._test(i, this._testCache, true); + } + }; + xwe = i => new bOs(i); + vOs = i => uO(i && uO.convert(i), i, NYt); + xwe.isPathValid = vOs; + xwe.default = xwe; + L5 = xwe; + if (ln) { + const i = t => /^\\\\\?\\/.test(t) || /["<>|\u0000-\u001F]+/u.test(t) ? t : t.replace(/\\/g, "/"); + uO.convert = i; + const e = /^[a-z]:\//i; + uO.isNotRelative = t => e.test(t) || AYt(t); + } + } +}); +function yOs(i) { + switch (i) { + case 1: + return "NewWindow"; + case 3: + return "ReloadedWindow"; + case 4: + return "ReopenedWindow"; + } +} +function Nor(i) { + switch (i) { + case 1: + return "Starting"; + case 2: + return "Ready"; + case 3: + return "Restored"; + case 4: + return "Eventually"; + } +} +var Yo; +var Agt; +var wOs; +var COs; +var SOs; +var da = ue({ + "out-build/vs/workbench/services/lifecycle/common/lifecycle.js"() { + "use strict"; + + te(); + Yo = Ve("lifecycleService"); + (function (i) { + i[i.Default = 1] = "Default"; + i[i.Last = 2] = "Last"; + })(Agt ||= {}); + (function (i) { + i[i.CLOSE = 1] = "CLOSE"; + i[i.QUIT = 2] = "QUIT"; + i[i.RELOAD = 3] = "RELOAD"; + i[i.LOAD = 4] = "LOAD"; + })(wOs ||= {}); + (function (i) { + i[i.NewWindow = 1] = "NewWindow"; + i[i.ReloadedWindow = 3] = "ReloadedWindow"; + i[i.ReopenedWindow = 4] = "ReopenedWindow"; + })(COs ||= {}); + (function (i) { + i[i.Starting = 1] = "Starting"; + i[i.Ready = 2] = "Ready"; + i[i.Restored = 3] = "Restored"; + i[i.Eventually = 4] = "Eventually"; + })(SOs ||= {}); + } +}); +var ny; +var $gt; +var cC = ue({ + "out-build/vs/workbench/services/ai/browser/gitContextService.js"() { + "use strict"; + + te(); + q(); + It(); + ii(); + Le(); + Lc(); + pe(); + da(); + ny = Ve("gitContextService"); + $gt = class extends H { + constructor(e, t) { + super(); + this.b = e; + this.f = t; + this.a = undefined; + this._onDidRunGitStatus = this.D(new B()); + this.onDidRunGitStatus = this._onDidRunGitStatus.event; + } + async cleanupOldWorktrees() { + if (this.a) { + await this.a.cleanupOldWorktrees(); + } + } + async getSubmodules(e) { + if (!this.a) { + throw new Error("No git context provider registered"); + } + return await this.a.getSubmodules(e); + } + async waitForGitContextProvider() { + while (!this.a) { + await new Promise(e => setTimeout(e, 500)); + } + } + getGitFileBlameWithAbsolutePath(e, t) { + throw new Error("Method not implemented."); + } + hasGitContextProvider() { + return this.a !== undefined; + } + registerGitContextProvider(e) { + this.a = e; + } + unregisterGitContextProvider() { + this.a = undefined; + } + async searchAllCommits(e) { + if (!this.a) { + throw new Error("No commit search provider registered"); + } + return this.a.getCommits(e); + } + async getFullCommit(e) { + if (!this.a) { + throw new Error("No full commit provider registered"); + } + return this.a.getFullCommit(e); + } + async getFullCommitProto(e) { + const t = await this.getFullCommit(e); + if (t) { + return new iA({ + sha: t.sha, + message: t.message, + description: t.description, + diff: t.diff.map(s => ({ + from: s.from, + to: s.to, + chunks: s.chunks.map(n => ({ + content: n.content, + lines: n.changes.map(r => r.content) + })) + })), + author: t.author, + date: t.date + }); + } + } + async searchAllPrs(e) { + if (!this.a) { + throw new Error("No full commit provider registered"); + } + return await this.a.getPullRequests(e); + } + async getFullPr(e) { + if (!this.a) { + throw new Error("No full commit provider registered"); + } + return await this.a?.getFullPullRequest(e); + } + async getBranchDiff(e) { + if (!this.a) { + throw new Error("No full commit provider registered"); + } + return await this.a.getBranchDiff({ + ...e, + cwd: e?.cwd?.fsPath + }); + } + async getGitRoot(e) { + if (!this.a) { + throw new Error("No full commit provider registered"); + } + return await this.a.getGitRoot(e); + } + async checkoutAndPull(e) { + if (!this.a) { + throw new Error("No full commit provider registered"); + } + return await this.a.checkoutAndPull(e); + } + async getDiffRaw() { + if (!this.a) { + throw new Error("No full commit provider registered"); + } + return await this.a.getDiffRaw(); + } + async getLastCommit() { + if (!this.a) { + throw new Error("No full commit provider registered"); + } + return await this.a.getLastCommit(); + } + async getLastCommits(e, t = 0) { + if (!this.a) { + throw new Error("No full commit provider registered"); + } + return await this.a.getLastCommits(e, t); + } + async getDiff(e) { + if (!this.a) { + throw new Error("No full commit provider registered"); + } + return await this.a.getDiff(e); + } + async getGitDiff() { + if (!this.a) { + throw new Error("No full commit provider registered"); + } + return await this.a.getCurrentDiff(); + } + async getGitLineBlameWithRelativePath(e, t, s) { + if (!this.a) { + throw new Error("No full commit provider registered"); + } + return await this.a.getGitLineBlame(e, t, s); + } + async getGitLineBlameWithAbsolutePath(e, t, s) { + if (!this.a) { + throw new Error("No full commit provider registered"); + } + const n = this.b.asRelativePath(V.file(e)); + return this.getGitLineBlameWithRelativePath(n, t, s); + } + async getGitFileBlameWithRelativePath(e, t) { + if (!this.a) { + throw new Error("No full commit provider registered"); + } + return await this.a.getGitFileBlame(e, t); + } + async getGitUpstreamURL(e) { + if (!this.a) { + throw new Error("No full commit provider registered"); + } + return await this.a.getGitUpstreamURL(e); + } + async getFileContentAtRef(e, t, s) { + if (!this.a) { + throw new Error("No full commit provider registered"); + } + return await this.a.getFileContentAtRef(e, t, s); + } + async getCommitRawByCommitHash(e, t) { + if (!this.a) { + throw new Error("No full commit provider registered"); + } + return await this.a.getCommitRawByCommitHash(e, t); + } + async createWorktree(e) { + if (!this.a) { + throw new Error("No full commit provider registered"); + } + return await this.a.createWorktree(e); + } + async syncWorktreeToBranch(e, t) { + if (!this.a) { + throw new Error("No full commit provider registered"); + } + return await this.a.syncWorktreeToBranch(e, t); + } + async syncBranchToWorktree(e, t) { + if (!this.a) { + throw new Error("No full commit provider registered"); + } + return await this.a.syncBranchToWorktree(e, t); + } + async removeWorktree(e) { + if (!this.a) { + throw new Error("No full commit provider registered"); + } + return await this.a.removeWorktree(e); + } + async listAllWorktrees() { + if (!this.a) { + throw new Error("No full commit provider registered"); + } + return await this.a.listAllWorktrees(); + } + async getFilenamesInCommit(e) { + if (!this.a) { + throw new Error("No full commit provider registered"); + } + return await this.a.getFilenamesInCommit(e); + } + async getCurrentBranch(e) { + if (!this.a) { + throw new Error("No full commit provider registered"); + } + return await this.a.getCurrentBranch(e); + } + async getClosestRemoteRef(e) { + if (!this.a) { + throw new Error("No full commit provider registered"); + } + return await this.a.getClosestRemoteRef(e); + } + async getDefaultBranch(e) { + if (!this.a) { + throw new Error("No full commit provider registered"); + } + return await this.a.getDefaultBranch(e); + } + async getGitUser() { + if (!this.a) { + throw new Error("No full commit provider registered"); + } + return await this.a.getGitUser(); + } + async getAllBranchNames(e) { + if (!this.a) { + throw new Error("No full commit provider registered"); + } + return await this.a.getAllBranchNames(e); + } + async getUserCommits(e) { + if (!this.a) { + throw new Error("No full commit provider registered"); + } + return await this.a.getUserCommits(e); + } + async revertFile(e, t, s) { + if (!this.a) { + throw new Error("No full commit provider registered"); + } + return await this.a.revertFile(e, t, s); + } + async getUntrackedFiles() { + if (!this.a) { + throw new Error("No full commit provider registered"); + } + return await this.a.getUntrackedFiles(); + } + async areFilesCheckedInToRemote(e) { + if (!this.a) { + throw new Error("No git context provider registered"); + } + return await this.a.areFilesCheckedInToRemote(e); + } + async getBranchPullRequests(e) { + if (!this.a) { + throw new Error("No full commit provider registered"); + } + return await this.a.getBranchPullRequests(e); + } + }; + $gt = __decorate([__param(0, kt), __param(1, Yo)], $gt); + it(ny, $gt, 1); + } +}); +async function xOs(i, e, t, s, n, r) { + const { + depth: o = 0, + maxDepth: a, + dirsToSkip: l, + maxConcurrent: c + } = r; + if (t.length === 0 || o > a) { + return; + } + const u = t.filter(d => { + const h = ji(d); + return !l.has(h); + }); + for (let d = 0; d < u.length; d += c) { + const h = u.slice(d, d + c); + await Promise.all(h.map(async g => { + const p = g.fsPath; + if (s.has(p)) { + return; + } + s.add(p); + let b = false; + try { + b = (await i.stat(g)).isSymbolicLink; + if (b) { + return; + } + } catch {} + const v = V.joinPath(g, ".git"); + try { + if (await i.stat(v)) { + if (!n.includes(p)) { + n.push(p); + } + } + } catch {} + try { + const y = await i.resolve(g, { + resolveMetadata: false + }); + const w = []; + if (y && y.children) { + for (const C of y.children) { + if (C.isDirectory) { + if (C.name !== ".git" && !l.has(C.name)) { + w.push(C.resource); + } + } + } + } + if (w.length > 0) { + await xOs(i, e, w, s, n, { + ...r, + depth: o + 1 + }); + } + } catch (y) { + if (y?.code !== "EACCES") { + e.warn(`Error reading directory ${p}:`, y); + } + } + })); + } +} +var Mor = ue({ + "out-build/vs/workbench/services/cursorIgnore/common/searchGitRepos.js"() { + "use strict"; + + Le(); + Et(); + } +}); +var tp; +var Fgt; +var em = ue({ + "out-build/vs/workbench/services/cursorIgnore/browser/cursorIgnoreService.js"() { + "use strict"; + + It(); + te(); + Le(); + ii(); + Nt(); + q(); + pe(); + Et(); + Zt(); + $Yt(); + At(); + Qp(); + Ed(); + Cs(); + CE(); + lC(); + cC(); + Me(); + Pn(); + In(); + zb(); + rt(); + Mor(); + tp = Ve("cursorIgnoreService"); + Fgt = class extends H { + constructor(e, t, s, n, r, o, a, l, c) { + super(); + this.t = e; + this.u = t; + this.w = s; + this.y = n; + this.z = r; + this.C = o; + this.F = a; + this.G = l; + this.H = c; + this.a = {}; + this.f = []; + this.g = false; + this.h = []; + this.j = new Map(); + this.m = false; + this.n = false; + this.q = this.D(new B()); + this.onDidCursorIgnoreChange = this.q.event; + this.s = new vc(2000, 0.5); + this.D(this.q.event(() => { + this.s.clear(); + })); + this.D(this.u.onDidFilesChange(async d => { + if (d.gotAdded()) { + const g = d.rawAdded.filter(p => p.path.endsWith(".cursorignore")); + for (const p of g) { + const b = V.parse(p.path); + const v = b.toString().substring(0, b.toString().lastIndexOf(".cursorignore")); + try { + const w = (await this.u.readFile(V.parse(p.path))).value.toString().split(` +`).filter(C => C.trim() !== ""); + this.a[v] = L5().add(w); + this.q.fire({}); + } catch (y) { + console.error(`Error processing new .cursorignore file at ${p.toString()}:`, y); + } + } + } + if (d.gotDeleted()) { + const g = d.rawDeleted.filter(p => p.path.endsWith(".cursorignore")); + for (const p of g) { + const b = p.path.substring(0, p.path.lastIndexOf(".cursorignore")); + delete this.a[b]; + this.q.fire({}); + } + } + const h = Object.keys(this.a); + for (const g of h) { + const p = V.parse(g + ".cursorignore"); + if (d.contains(p)) { + const v = (await this.u.readFile(p)).value.toString().split(` +`).filter(y => y.trim() !== ""); + this.a[g] = L5().add(v); + this.q.fire({}); + } + } + })); + const u = this.z.onChangeEffectManuallyDisposed({ + onChange: ({ + deps: d + }) => { + const [h, g, p, b] = d; + if ((h !== undefined || g !== undefined || p !== undefined || b !== undefined) && this.t.getWorkspace().folders.length > 0) { + this.q.fire({}); + } + }, + deps: [() => this.z.applicationUserPersistentStorage.teamAllowlist, () => this.z.applicationUserPersistentStorage.teamBlocklist, () => this.z.applicationUserPersistentStorage.teamBlockRepos, () => this.z.applicationUserPersistentStorage.teamAllowRepos] + }); + this.D(u); + this.D(this.H.onDidChangeConfiguration(d => { + if (d.affectsConfiguration(Rrt)) { + this.I(); + this.q.fire({}); + } + })); + this.r = this.C.createInstance(C1); + this.I(); + this.J(); + this.R(); + this.F.setIsUriCursorIgnored(d => this.shouldBlockUriFromReading(d)); + } + I() { + const e = this.H.getValue(Rrt) || []; + if (e.length > 0) { + this.b = L5().add(e); + } else { + this.b = undefined; + } + } + addOnCursorIgnoreLoadedCallback(e) { + if (this.g) { + e(); + } else { + this.f.push(e); + } + } + async J() { + const e = this.t.getWorkspace().folders; + const t = this.r.file(e, { + _reason: "cursorIgnoreCheck", + includePattern: ["**/.cursorignore"], + maxResults: 0 + }); + const s = await this.y.fileSearch(t); + for (const n of s.results) { + try { + const o = (await this.u.readFile(n.resource)).value.toString().split(` +`).filter(l => l.trim() !== ""); + const a = n.resource.toString().substring(0, n.resource.toString().lastIndexOf(".cursorignore")); + this.a[a] = L5().add(o); + } catch (r) { + console.error(`Error processing .cursorignore file at ${n.resource.toString()}:`, r); + } + } + this.g = true; + this.f.forEach(n => n()); + this.f = []; + this.s.clear(); + } + L() { + return this.z.applicationUserPersistentStorage.teamBlocklist ?? []; + } + M() { + return this.z.applicationUserPersistentStorage.teamBlockRepos ?? []; + } + N() { + return this.z.applicationUserPersistentStorage.teamAllowRepos ?? []; + } + async O(e) { + const t = V.joinPath(e, ".cursorignore"); + if (await this.u.exists(t)) { + const n = (await this.u.readFile(t)).value.toString().split(` +`).filter(r => r.trim() !== ""); + this.a[e.toString()] = L5().add(n); + } else { + this.a[e.toString()] = {}; + } + } + P(e) { + const t = this.z.applicationUserPersistentStorage.cursorIgnore?.hierarchicalEnabled ?? false; + if (!this.z.applicationUserPersistentStorage.teamAdminSettings?.cursorIgnore?.hierarchicalEnabled && !t) { + return false; + } + let o = e; + let a = []; + let l = 0; + const c = 100; + while (Ir(o) !== o) { + if (l >= c) { + console.error(`Max depth of ${c} reached while populating hierarchy cursor ignore.`); + break; + } + o = Ir(o); + if (!o.toString().endsWith("/")) { + o = V.parse(o.toString() + "/"); + } + if (!this.t.isInsideWorkspace(o)) { + if (this.a[o.toString()] !== undefined) { + break; + } + a.push(o.toString()); + l++; + this.a[o.toString()] = L5().add([]); + } + } + if (a.length > 0) { + this.g = false; + new Promise(u => { + for (const d of a) { + this.O(V.parse(d)); + } + u(undefined); + }).then(() => { + this.g = true; + this.f.forEach(u => u()); + this.f = []; + this.q.fire({}); + }); + } + return a.length > 0; + } + shouldIgnoreUri(e) { + e = V.revive(e); + const t = e.toString(); + if (this.s.has(t)) { + const n = this.s.get(t); + if (n === null) { + return undefined; + } else { + return n; + } + } + const s = this.shouldIgnoreUriUncached(e); + if (s?.type !== "cursorIgnore" || s.source !== "hierarchy loading") { + this.s.set(t, s ?? null); + } + return s; + } + shouldIgnoreUriUncached(e) { + if (this.isAdminBlocked(e)) { + return { + type: "adminBlock" + }; + } + if (e.scheme !== me.file && e.scheme !== me.vscodeRemote) { + return; + } + const t = this.P(e); + let s = false; + for (const [c, u] of Object.entries(this.a)) { + if (!e.toString().startsWith(c)) { + continue; + } + const d = this.Q(e, c); + if (!this.W(u)) { + continue; + } + const h = u.test(d); + if (h.ignored && !h.unignored) { + return { + type: "cursorIgnore", + source: c + }; + } + if (h.unignored) { + s = true; + } + } + if (!s && this.b) { + let c; + const u = this.t.getWorkspace().folders; + if (u.length > 0 && u.some(d => e.toString().startsWith(d.uri.toString()))) { + c = this.t.asRelativePath(e); + if (c === "") { + return; + } + } else { + const d = e.path.split("/"); + c = d[d.length - 1]; + } + if (this.b.ignores(c)) { + return { + type: "cursorIgnore", + source: "globalIgnore" + }; + } + } + const n = this.t.getWorkspace().folders; + if (n.length === 0) { + return { + type: "outOfWorkspace" + }; + } + if (!n.some(c => e.toString().startsWith(c.uri.toString()))) { + return { + type: "outOfWorkspace" + }; + } + const r = this.t.asRelativePath(e); + if ((ln ? Cji(r) : r).split("/").some(c => c.startsWith(".") && c !== ".cursor" && c.length > 1) && !s) { + return { + type: "dotFile" + }; + } + if (t && !this.g) { + return { + type: "cursorIgnore", + source: "hierarchy loading" + }; + } + } + shouldBlockUriFromReading(e) { + const t = this.shouldIgnoreUri(e); + return t !== undefined && t.type !== "outOfWorkspace" && t.type !== "dotFile"; + } + Q(e, t) { + const s = e.toString(); + if (s.startsWith(t)) { + return s.slice(t.length); + } else { + return s; + } + } + isCursorIgnoreLoaded() { + return this.g; + } + async filterCursorIgnoredFiles(e, t) { + await new Promise(s => this.addOnCursorIgnoreLoadedCallback(() => s(undefined))); + return e.filter(s => !this.shouldBlockUriFromReading(t(s))); + } + async R() { + await this.G.waitForGitContextProvider(); + const e = this.t.getWorkspace().folders; + const t = new Set(); + const s = e.map(a => a.uri.fsPath); + const n = 100; + const r = new Set(["node_modules", ".turbo", ".next", ".cache", ".pnpm", ".yarn", "dist", "build", "out", "target", ".vscode", ".idea", "venv", "__pycache__", "logs", "tmp", "temp"]); + await xOs(this.u, this.w, e.map(a => a.uri), t, s, { + maxDepth: n, + dirsToSkip: r, + maxConcurrent: 20 + }); + this.h = s; + await this.S(); + return s; + } + async S() { + this.j.clear(); + this.n = false; + const e = 3; + const t = 5000; + try { + for (const s of this.h) { + try { + const n = await this.G.getGitUpstreamURL(s); + const r = await this.G.getGitRoot(s); + if (r) { + this.j.set(r, n); + } + } catch (n) { + console.warn(`Failed to get Git upstream URL for ${s}: ${n}`); + this.n = true; + } + } + } catch (s) { + console.error("Error fetching Git upstream URLs:", s); + this.n = true; + } finally { + this.m = true; + this.q.fire({}); + } + } + isAdminBlocked(e) { + const t = V.revive(e); + let s; + let n = 0; + for (const r of this.j.keys()) { + if (this.j.get(r) !== undefined && t.fsPath.startsWith(r) && r.length > n) { + s = r; + n = r.length; + } + } + if (this.m && s) { + const r = this.j.get(s); + if (r) { + const o = this.M(); + const a = this.N(); + const l = t.fsPath.substring(s.length + 1); + if (a.length > 0) { + if (!a.some(u => this.U(u.url, r))) { + return true; + } + for (const u of a) { + if (this.U(u.url, r) && u.patterns.some(h => Jw(h.pattern, l))) { + return false; + } + } + return true; + } + if (o.length > 0) { + for (const c of o) { + if (this.U(c.url, r) && c.patterns.some(d => Jw(d.pattern, l))) { + return true; + } + } + } + return false; + } + } else { + const r = this.L(); + if (r.length !== 0) { + const o = e.path; + if (o === undefined) { + return false; + } + for (const a of r) { + if (Jw(a, o)) { + return true; + } + } + } + } + return false; + } + U(e, t) { + const s = o => { + o = o.toLowerCase(); + o = o.replace(/^(https?:\/\/|git@)/, ""); + o = o.replace(/\.git$/, ""); + o = o.replace(":", "/"); + const a = o.split("/").filter(Boolean); + if (a.length >= 2) { + return `${a[a.length - 2]}/${a[a.length - 1]}`; + } else { + return o; + } + }; + const n = s(e); + const r = s(t); + return n === r; + } + W(e) { + return "ignores" in e; + } + isGitUrlResolutionFailed() { + return this.n; + } + }; + Fgt = __decorate([__param(0, kt), __param(1, Ct), __param(2, Bt), __param(3, aC), __param(4, _i), __param(5, re), __param(6, sy), __param(7, ny), __param(8, ve)], Fgt); + it(tp, Fgt, 1); + } +}); +function Ogt(i, e = false) { + kOs(i, false, e); +} +function Aor(i) { + kOs(i, true, false); +} +function kOs(i, e, t) { + const s = $or(i, e); + R5.push(s); + if (s.userConfigured) { + Ugt.push(s); + } else { + Bgt.push(s); + } + if (t && !s.userConfigured) { + R5.forEach(n => { + if (n.mime !== s.mime && !n.userConfigured) { + if (s.extension && n.extension === s.extension) { + console.warn(`Overwriting extension <<${s.extension}>> to now point to mime <<${s.mime}>>`); + } + if (s.filename && n.filename === s.filename) { + console.warn(`Overwriting filename <<${s.filename}>> to now point to mime <<${s.mime}>>`); + } + if (s.filepattern && n.filepattern === s.filepattern) { + console.warn(`Overwriting filepattern <<${s.filepattern}>> to now point to mime <<${s.mime}>>`); + } + if (s.firstline && n.firstline === s.firstline) { + console.warn(`Overwriting firstline <<${s.firstline}>> to now point to mime <<${s.mime}>>`); + } + } + }); + } +} +function $or(i, e) { + return { + id: i.id, + mime: i.mime, + filename: i.filename, + extension: i.extension, + filepattern: i.filepattern, + firstline: i.firstline, + userConfigured: e, + filenameLowercase: i.filename ? i.filename.toLowerCase() : undefined, + extensionLowercase: i.extension ? i.extension.toLowerCase() : undefined, + filepatternLowercase: i.filepattern ? nP(i.filepattern.toLowerCase()) : undefined, + filepatternOnPath: i.filepattern ? i.filepattern.indexOf(ao.sep) >= 0 : false + }; +} +function For() { + R5 = R5.filter(i => i.userConfigured); + Bgt = []; +} +function Oor() { + R5 = R5.filter(i => !i.userConfigured); + Ugt = []; +} +function _gt(i, e) { + return EOs(i, e).map(t => t.mime); +} +function _or(i, e) { + return EOs(i, e).map(t => t.id); +} +function EOs(i, e) { + let t; + if (i) { + switch (i.scheme) { + case me.file: + t = i.fsPath; + break; + case me.data: + { + t = a9.parseMetaData(i).get(a9.META_DATA_LABEL); + break; + } + case me.vscodeNotebookCell: + t = undefined; + break; + default: + t = i.path; + } + } + if (!t) { + return [{ + id: "unknown", + mime: pl.unknown + }]; + } + t = t.toLowerCase(); + const s = ir(t); + const n = IOs(t, s, Ugt); + if (n) { + return [n, { + id: Ju, + mime: pl.text + }]; + } + const r = IOs(t, s, Bgt); + if (r) { + return [r, { + id: Ju, + mime: pl.text + }]; + } + if (e) { + const o = Bor(e); + if (o) { + return [o, { + id: Ju, + mime: pl.text + }]; + } + } + return [{ + id: "unknown", + mime: pl.unknown + }]; +} +function IOs(i, e, t) { + let s; + let n; + let r; + for (let o = t.length - 1; o >= 0; o--) { + const a = t[o]; + if (e === a.filenameLowercase) { + s = a; + break; + } + if (a.filepattern && (!n || a.filepattern.length > n.filepattern.length)) { + const l = a.filepatternOnPath ? i : e; + if (a.filepatternLowercase?.(l)) { + n = a; + } + } + if (a.extension && (!r || a.extension.length > r.extension.length) && e.endsWith(a.extensionLowercase)) { + r = a; + } + } + if (s) { + return s; + } + if (n) { + return n; + } + if (r) { + return r; + } +} +function Bor(i) { + if (aji(i)) { + i = i.substr(1); + } + if (i.length > 0) { + for (let e = R5.length - 1; e >= 0; e--) { + const t = R5[e]; + if (!t.firstline) { + continue; + } + const s = i.match(t.firstline); + if (s && s.length > 0) { + return t; + } + } + } +} +var R5; +var Bgt; +var Ugt; +var lne = ue({ + "out-build/vs/editor/common/services/languagesAssociations.js"() { + "use strict"; + + Qp(); + Jb(); + At(); + pn(); + Et(); + $i(); + gf(); + R5 = []; + Bgt = []; + Ugt = []; + } +}); +async function Uor(i, e) { + return (await e.readFile(i)).value.toString().split(` +`); +} +var FYt; +var S1; +var OYt; +var DOs; +var TOs; +var Wgt; +var POs; +var _Yt; +var BYt; +var LOs; +var Vgt; +var N5 = ue({ + "out-build/vs/workbench/services/workspaces/browser/sourceFilesService.js"() { + "use strict"; + + Nt(); + It(); + ii(); + $Yt(); + em(); + te(); + lne(); + Ed(); + ri(); + cC(); + Cs(); + qt(); + FYt = Ve("sourceFilesService"); + S1 = i => i.startsWith("/") || i.startsWith("\\") ? S1(i.slice(1)) : i; + OYt = i => i.endsWith("/") || i.endsWith("\\") ? i.slice(0, -1) : i; + DOs = 18000000; + TOs = 600000; + Wgt = i => `\`\`\`${i.relativePath} + +\`\`\``.length + i.sizeBytes; + POs = class { + constructor(i) { + this.e = i; + this.d = []; + this.c = i; + } + async acquire() { + if (this.c > 0) { + this.c--; + return Promise.resolve(); + } else { + return new Promise(i => { + this.d.push(i); + }); + } + } + release() { + this.c++; + if (this.d.length > 0) { + this.c--; + const i = this.d.shift(); + if (i) { + i(); + } + } + } + }; + _Yt = (i, e) => { + const { + relativePath: t, + name: s, + sizeBytes: n, + children: r + } = i; + return { + path: e.asRelativePath(t), + name: s, + sizeBytes: n, + children: r?.map(a => _Yt(a, e)) + }; + }; + BYt = (i, e, t, s, n, r) => { + const { + path: o, + name: a, + sizeBytes: l, + children: c + } = i; + const u = r ? [] : [...n, a]; + const d = { + workspaceId: e, + relativePath: t.resolveRelativePath(o), + name: a, + sizeBytes: l, + children: c?.map(h => BYt(h, e, t, s, u, false)) + }; + s.set(u.join("/"), d); + return d; + }; + LOs = (i, e, t) => { + const s = new Map(); + return { + ...BYt(i, e, t, s, [], true), + index: s + }; + }; + Vgt = class { + constructor(e, t, s, n, r, o, a) { + this.e = e; + this.f = t; + this.g = s; + this.h = n; + this.i = r; + this.j = o; + this.k = a; + this.d = 0; + this.m = new Map(); + this.n = new Map(); + this.w = 0; + this.c = new POs(500); + } + l() { + if (!this.i.applicationUserPersistentStorage.longContextFlagEnabled2) { + throw new Error("Running SourceFilesService when long context flag is not enabled - this should never happen"); + } + } + o(e) { + const t = e.sourceTree.workspaceId; + this.m.set(t, e); + const s = JSON.stringify({ + sourceTree: _Yt(e.sourceTree, this.e), + lastComputed: e.lastComputed + }); + this.j.store("cachedSourceTree", s, 1, 0); + } + p() { + const e = this.e.getWorkspace().id; + const t = this.m.get(e); + if (t) { + return t; + } + const s = this.j.getObject("cachedSourceTree", 1); + if (s) { + const n = s.sourceTree; + const o = { + sourceTree: LOs(n, e, this.e), + lastComputed: s.lastComputed + }; + this.o(o); + return o; + } + } + async q(e) { + this.l(); + const t = this.e.getWorkspace(); + if (!t) { + throw new Error("Workspace not found"); + } + if (t.folders.length === 0) { + return; + } + const s = t.folders.at(0)?.uri; + if (!s) { + return; + } + const n = t.id; + const r = this.p(); + if (r && !(Date.now() - r.lastComputed > DOs)) { + return r.sourceTree; + } + if (this.n.has(n)) { + const u = this.n.get(n); + if (!(Date.now() - u.lastComputed > TOs)) { + return await u.sourceTreePromise; + } + } + const o = Date.now(); + const a = { + lastComputed: o, + sourceTreePromise: this.s(s, this.e, t, this.f, e) + }; + this.n.set(n, a); + const l = await a.sourceTreePromise; + if (this.n.get(n) === a) { + this.n.delete(n); + } + const c = { + sourceTree: l, + lastComputed: o + }; + this.o(c); + return l; + } + async s(e, t, s, n, r) { + if (this.d > 5) { + throw new Error("Too many failures in a row. Giving up for now."); + } + const o = performance.now(); + if (e === undefined) { + throw new Error("Folder not found: " + e); + } + let a = 0; + const l = 100000; + const c = () => a > l ? true : (a++, false); + try { + const u = new Map(); + const d = await this.t(e, [], [".git", "yarn.lock", "package-lock.json", "pnpm-lock.yaml", "node_modules", "__pycache__"], u, s, n, c, r); + this.d = 0; + return { + ...d, + index: u + }; + } catch (u) { + this.d++; + throw u; + } + } + async t(e, t, s, n, r, o, a, l) { + const c = w => { + n.set(t.join("/"), w); + return w; + }; + let u; + try { + if (l?.throttleFileStat) { + await this.c.acquire(); + } + this.l(); + u = await o.resolve(e, { + resolveTo: [e] + }); + } finally { + if (l?.throttleFileStat) { + await this.c.release(); + } + } + if (!u) { + throw new Error("File not found"); + } + if (u?.isFile && u.size) { + try { + return c({ + workspaceId: r.id, + relativePath: r.folders[0].toResource(t.join("/")), + name: u.name, + sizeBytes: u.size + }); + } catch { + throw new Error("File not found"); + } + } + const d = u.children ?? []; + const h = u.isDirectory ? d : []; + const g = h.find(w => w.name === ".gitignore"); + const p = g ? [...s, ...(await Uor(g.resource, o))] : s; + const b = L5().add(p); + const v = w => [...t, w.name]; + if (a()) { + throw new Error("Too many stats performed. Giving up for now."); + } + const y = await Promise.all(h.filter(w => { + const C = v(w).join("/"); + if (b.ignores(C)) { + return false; + } + const S = r.folders[0].toResource(C); + return !this.k.shouldBlockUriFromReading(S); + }).map(async w => await this.t(w.resource, v(w), p, n, r, o, a, l))); + return c({ + workspaceId: r.id, + relativePath: r.folders[0].toResource(t.join("/")), + name: u.name, + sizeBytes: y.reduce((w, C) => w + C.sizeBytes, 0), + children: y + }); + } + async getFolderSize(e, t) { + this.l(); + const s = await this.q(t); + if (s) { + return s.index.get(S1(e))?.sizeBytes; + } else { + return 0; + } + } + async isSourceFile(e, t) { + this.l(); + if (!e) { + return false; + } + const s = _gt(this.e.getWorkspace().folders[0].toResource(e)); + const n = 50000; + const r = 200000; + const o = !!s.find(l => l.startsWith("application/") && !l.includes("octet-stream")); + if (s.find(l => l.startsWith("text/"))) { + const l = await this.q(t); + if (!l) { + return false; + } + const c = l.index.get(S1(e)); + if (c) { + return c.sizeBytes < r; + } else { + return true; + } + } + if (o) { + const l = await this.q(t); + if (!l) { + return false; + } + const c = l.index.get(S1(e)); + if (!c) { + return false; + } + const u = c.sizeBytes < n; + if (!u) { + console.log("application file is too big", e, c.sizeBytes); + } + return u; + } + return false; + } + async getFilesOfFolder(e, t) { + this.l(); + if (!e) { + return []; + } + const { + recursive: s = true, + throttleFileStat: n + } = t ?? {}; + const r = await this.q({ + throttleFileStat: n ?? false + }); + if (!r) { + return []; + } + const o = r.index.get(S1(e)); + if (!o) { + throw new Error("Folder not found: " + e); + } + await this.x(); + const a = []; + await this.y(o, a, e, s); + return a; + } + async getFilesOfSearch(e) { + this.l(); + const t = await this.q(); + if (!t) { + return []; + } + const s = await this.g.textSearch({ + type: 2, + contentPattern: { + pattern: e, + isCaseSensitive: false, + isWordMatch: false + }, + folderQueries: [{ + folder: t.relativePath + }] + }, mt.None); + return await Promise.all(s.results.map(async n => ({ + relativePath: n.resource.path, + content: (await this.f.readFile(n.resource)).value.toString() + }))); + } + u(e, t, s) { + const n = e.map(c => ({ + ...c + })); + const r = [...n].sort((c, u) => u.score - c.score); + let o = 0; + let a = 0; + let l = 0; + r.forEach((c, u) => { + const d = Wgt(c); + if (o + d > t || s.has(c.relativePath)) { + c.truncated = true; + c.sizeBytes = 0; + a++; + } else { + o += d; + l++; + } + }); + return n; + } + async x() { + const t = h => 1 - Math.min(1000, h) / 999 * 0.75; + const r = (this.v?.size ?? 0) > 0 ? 300000 : 30000; + if (this.v && Date.now() - this.w < r) { + return this.v; + } + const o = new Map(); + const a = await Promise.all(Array.from({ + length: 1000 + }, async (h, g) => { + try { + return await this.h.getFilenamesInCommit(g); + } catch { + return []; + } + })); + try { + [(await this.h.getGitDiff())?.map(g => g.to).filter(g => g) ?? [], ...a].forEach((g, p) => { + g.forEach(b => { + o.set(b, (o.get(b) ?? 0) + t(p)); + }); + }); + } catch {} + const l = Math.min(...o.values()); + const c = Math.max(...o.values()); + const u = 0.000001; + const d = new Map(); + o.forEach((h, g) => { + d.set(g, (h - l) / (c - l + u)); + }); + this.v = d; + this.w = Date.now(); + return d; + } + async shrinkBagsOfFiles_MAY_RETURN_TRUNCATED_OR_EMPTY_FILES(e, t) { + this.l(); + if (e.map(g => g.reduce((p, b) => p + Wgt(b), 0)).reduce((g, p) => g + p, 0) <= t) { + return e; + } + const r = e.map(g => Math.sqrt(g.length)); + const o = r.reduce((g, p) => g + p, 0); + const a = t / o; + const c = e.map((g, p) => Math.round(r[p] * a)).reduce((g, p) => [...g, g[g.length - 1] + p], [0]).slice(1); + const u = new Set(); + let d = 0; + return e.map((g, p) => { + const v = c[p] - d; + const y = this.u(g, v, u); + y.forEach(C => { + if (!C.truncated) { + u.add(C.relativePath); + } + }); + const w = y.reduce((C, S) => C + Wgt(S), 0); + d += w; + return y; + }); + } + async folderFilesContentlessToFolderFiles(e) { + this.l(); + return (await Promise.allSettled(e.map(async s => { + const n = this.e.getWorkspace().folders[0].toResource(s.relativePath); + const r = s.truncated ? "" : (await this.f.readFile(n)).value.toString(); + return { + ...s, + content: r + }; + }))).flatMap(s => s.status === "fulfilled" ? s.value : []); + } + async y(e, t, s, n) { + if (e.children) { + for (const r of e.children) { + const o = s + "/" + r.name; + if (r.children && !n) { + t.push({ + relativePath: o, + sizeBytes: 0, + truncated: true, + score: 0 + }); + } else { + await this.y(r, t, o, n); + } + } + } else if (await this.isSourceFile(e.relativePath.path)) { + const r = await this.x(); + r.has(S1(s)); + t.push({ + relativePath: s, + sizeBytes: e.sizeBytes, + truncated: false, + score: r.get(S1(s)) ?? 0 + }); + } else { + t.push({ + relativePath: s, + sizeBytes: 0, + truncated: true, + score: 0 + }); + } + } + }; + Vgt = __decorate([__param(0, kt), __param(1, Ct), __param(2, aC), __param(3, ny), __param(4, _i), __param(5, ht), __param(6, tp)], Vgt); + it(FYt, Vgt, 0); + } +}); +var wA; +var cne = ue({ + "out-build/vs/editor/browser/services/genericUndoRedoElement.js"() { + "use strict"; + + wA = class { + get type() { + return 0; + } + constructor(i, e, t, s, n) { + this.label = i; + this.code = e; + this.resource = t; + this.a = []; + this.b = []; + this.confirmBeforeUndo = false; + this.a.push(s); + this.b.push(n); + } + async undo() { + for (let i = this.a.length - 1; i >= 0; i--) { + const e = this.a[i]; + const t = e(); + if (t instanceof Promise) { + await t; + } + } + } + async redo() { + for (let i = 0; i < this.b.length; i++) { + const e = this.b[i]; + const t = e(); + if (t instanceof Promise) { + await t; + } + } + } + rebase(i, e, t, s, n, r, o, a) {} + }; + } +}); +var rc; +var e0; +var CA; +var tm; +var x1; +var ROs; +var NOs; +var SA; +var Hgt; +var YJ; +var MOs; +var AOs; +var $Os; +var dl = ue({ + "out-build/vs/workbench/contrib/terminal/browser/terminal.js"() { + "use strict"; + + te(); + rc = Ve("terminalService"); + e0 = Ve("terminalConfigurationService"); + CA = Ve("terminalEditorService"); + tm = Ve("terminalGroupService"); + x1 = Ve("terminalInstanceService"); + (function (i) { + i[i.Left = 0] = "Left"; + i[i.Right = 1] = "Right"; + i[i.Up = 2] = "Up"; + i[i.Down = 3] = "Down"; + })(ROs ||= {}); + (function (i) { + i[i.Connecting = 0] = "Connecting"; + i[i.Connected = 1] = "Connected"; + })(NOs ||= {}); + SA = i => typeof i.instanceId != "number"; + Hgt = class extends MouseEvent {}; + YJ = "terminalEditor"; + (function (i) { + i[i.SearchHighlightLimit = 20000] = "SearchHighlightLimit"; + })(MOs ||= {}); + (function (i) { + i[i.Unknown = 1] = "Unknown"; + i[i.Fedora = 2] = "Fedora"; + i[i.Ubuntu = 3] = "Ubuntu"; + })(AOs ||= {}); + (function (i) { + i.Terminals = "Terminals"; + })($Os ||= {}); + } +}); +async function Wor(i, e, t, s = {}) { + const n = V.file(i.path); + const r = s.maxDimension ?? FOs; + let o; + try { + o = (await t.readFile(n)).value.buffer; + } catch (l) { + console.error(l); + e.forEach(c => c()); + throw new Error("Image selected in conversation was not found on disk"); + } + const a = document.createElement("canvas"); + try { + const l = new Image(); + const c = async (h, g = 1) => new Promise((p, b) => { + l.src = Na.uriToBrowserUri(n).toString(true); + l.onload = function () { + let v = Math.floor(l.width * g); + let y = Math.floor(l.height * g); + const w = Math.max(v / r, y / r); + if (w > 1) { + v = Math.floor(v / w); + y = Math.floor(y / w); + } + if (g === 1 && w <= 1 && h.length <= qgt) { + p({ + bytes: h, + width: l.width, + height: l.height + }); + return; + } + a.width = v; + a.height = y; + a.getContext("2d")?.drawImage(l, 0, 0, v, y); + const x = a.toDataURL("image/jpeg", 0.9).split(",")[1]; + const k = atob(x); + let E = new Uint8Array(k.length); + for (let D = 0; D < k.length; D++) { + E[D] = k.charCodeAt(D); + } + p({ + bytes: E, + width: v, + height: y + }); + }; + l.onerror = b; + }); + let u = await c(o); + if (u.bytes.length > qgt) { + let h = 0.9; + while (u.bytes.length > qgt && h > 0.1) { + u = await c(o, h); + h *= 0.8; + } + } + l.remove(); + return new tD({ + data: u.bytes, + dimension: { + width: u.width, + height: u.height + } + }); + } finally { + a.remove(); + } +} +async function une(i, e, t, s) { + const n = UYt.get(i); + if (n) { + const l = n.removeCallbacks; + l.add(e); + return async function () { + try { + return await n.data; + } finally { + l.delete(e); + } + }(); + } + const r = new Set([e]); + const o = { + data: Wor(i, r, t, { + maxDimension: s + }), + removeCallbacks: r + }; + UYt.set(i, o); + return async function () { + try { + return await o.data; + } finally { + o.removeCallbacks.delete(e); + } + }(); +} +var qgt; +var FOs; +var UYt; +var kwe = ue({ + "out-build/vs/workbench/services/utils/browser/generateImageProtos.js"() { + "use strict"; + + Wo(); + At(); + Le(); + qgt = 5242880; + FOs = 2048; + UYt = new WeakMap(); + } +}); +var M5; +var XJ; +var AU = ue({ + "out-build/vs/workbench/contrib/notepad/browser/notepad.js"() { + "use strict"; + + te(); + M5 = Ve("notepadDataService"); + XJ = Ve("notepadService"); + } +}); +var t0; +var OOs; +var vS = ue({ + "out-build/vs/platform/cursor/browser/aiEverythingProviderService.js"() { + "use strict"; + + q(); + It(); + te(); + t0 = Ve("everythingProviderService"); + OOs = class extends H { + constructor() { + super(); + } + registerEverythingProvider(i) { + this.provider = i; + } + unregisterEverythingProvider() { + this.provider = undefined; + } + registerEverythingProviderAllLocal(i) { + this.onlyLocalProvider = i; + } + unregisterEverythingProviderAllLocal() { + this.onlyLocalProvider = undefined; + } + async waitForEverythingProvider(i) { + if (this.provider) { + return this.provider; + } else { + return new Promise((e, t) => { + const s = Date.now(); + const n = () => { + if (this.provider) { + e(this.provider); + return; + } + if (Date.now() - s >= i) { + t(new Error("Timeout waiting for EverythingProvider")); + return; + } + setTimeout(n, 100); + }; + n(); + }); + } + } + async waitForOnlyLocalProvider(i) { + if (this.onlyLocalProvider) { + return this.onlyLocalProvider; + } else { + return new Promise((e, t) => { + const s = Date.now(); + const n = () => { + if (this.onlyLocalProvider) { + e(this.onlyLocalProvider); + return; + } + if (Date.now() - s >= i) { + t(new Error("Timeout waiting for OnlyLocalProvider")); + return; + } + setTimeout(n, 100); + }; + n(); + }); + } + } + }; + it(t0, OOs, 1); + } +}); +var Vor = ue({ + "out-build/vs/workbench/contrib/contextGraph/browser/contextGraph.css"() {} +}); +var WYt; +var Ewe; +var _Os = ue({ + "out-build/vs/workbench/contrib/contextGraph/browser/constants.js"() { + "use strict"; + + WYt = 5; + Ewe = 100; + } +}); +var jgt; +var zgt; +var BOs = ue({ + "out-build/vs/workbench/contrib/contextGraph/browser/gitGraphService.js"() { + "use strict"; + + xe(); + q(); + vS(); + It(); + te(); + Cs(); + xc(); + ii(); + Vor(); + Xn(); + Qv(); + cC(); + Ms(); + xe(); + ar(); + vt(); + gs(); + _Os(); + Nt(); + Le(); + ua(); + em(); + jgt = Ve("contextGraphService"); + zgt = class extends H { + constructor(e, t, s, n, r, o, a, l, c, u, d, h) { + super(); + this.f = e; + this.g = t; + this.h = s; + this.j = n; + this.m = r; + this.n = o; + this.q = a; + this.r = l; + this.s = c; + this.t = u; + this.u = d; + this.w = h; + this.a = []; + this.b = []; + this.c = []; + this.D(this.f.onChangeEffectManuallyDisposed({ + deps: [() => this.f.applicationUserPersistentStorage.shouldHotReloadContextGraphRelatedFiles], + onChange: () => { + if (this.f.applicationUserPersistentStorage.shouldHotReloadContextGraphRelatedFiles) { + this.C(); + this.z(); + } else { + this.C(); + this.y(); + } + } + })); + if (this.f.applicationUserPersistentStorage.shouldHotReloadContextGraphRelatedFiles) { + this.z(); + } + } + async updateCurrentEditorRelatedFiles() { + const t = (this.j.getActiveCodeEditor() || this.j.getFocusedCodeEditor())?.getModel(); + if (!t) { + return; + } + const s = await this.getRelatedFiles({ + uri: t.uri, + maxNumFiles: Ewe + }); + this.f.setNonPersistentStorage("contextGraphState", "relatedFiles", { + baseRelativePath: this.h.asRelativePath(t.uri), + nodes: s.map(n => ({ + relativePath: this.h.asRelativePath(n.uri), + weight: n.weight + })) + }); + } + y() { + this.f.setNonPersistentStorage("contextGraphState", "relatedFiles", null); + } + dispose() { + this.b.forEach(e => e.dispose()); + this.b = []; + super.dispose(); + } + async getRelatedFiles({ + uri: e, + maxNumFiles: t, + lineOrSelection: s, + useLocal: n + }) { + if (n && s !== undefined) { + if (s instanceof Vs) { + const r = await this.g.provider?.runCommand(ise.GetRelatedFilesForRange, { + absolutePath: e.fsPath, + range: { + startLineNumber: s.startLineNumber, + endLineNumberExclusive: s.endLineNumber + 1 + }, + maxNumFiles: t + }); + if (r) { + console.log("[local-git-graph] resultsFromRange", r); + return r.filter(o => { + const a = V.file(o.absolutePath); + return this.h.asRelativePath(a) !== a.fsPath; + }).map(o => ({ + uri: V.file(o.absolutePath), + weight: o.weight + })); + } else { + return []; + } + } else { + const r = await this.g.provider?.runCommand(ise.GetRelatedFilesForLine, { + absolutePath: e.fsPath, + line: s, + maxNumFiles: t + }); + if (r) { + console.log("[local-git-graph] resultsFromLine", r); + return r.filter(o => { + const a = V.file(o.absolutePath); + return this.h.asRelativePath(a) !== a.fsPath; + }).map(o => ({ + uri: V.file(o.absolutePath), + weight: o.weight + })); + } else { + return []; + } + } + } else { + const r = await this.g.provider?.runCommand(ise.GetRelatedFiles, { + absolutePath: e.fsPath, + maxNumFiles: t + }); + if (r) { + return r.filter(o => { + const a = V.file(o.absolutePath); + return this.h.asRelativePath(a) !== a.fsPath && !this.w.shouldBlockUriFromReading(a); + }).map(o => ({ + uri: V.file(o.absolutePath), + weight: o.weight + })); + } else { + return []; + } + } + } + async getWorkspaceContextSyncStatus() { + const e = this.g.provider; + if (e) { + return (await e.runCommand(ise.GetWorkspaceSyncStatus, {})) ?? null; + } else { + return null; + } + } + z() { + this.b.push(this.n.onDidActiveEditorChange(() => { + this.a.forEach(n => n.dispose()); + this.a.length = 0; + const s = this.j.getActiveCodeEditor() || this.j.getFocusedCodeEditor(); + if (s) { + this.a.push(s.onDidChangeModel(n => { + this.updateCurrentEditorRelatedFiles(); + })); + } + this.updateCurrentEditorRelatedFiles(); + })); + const e = s => { + if (!s.altKey) { + return; + } + const n = this.f.nonPersistentStorage.contextGraphState?.relatedFiles; + if (!n) { + return; + } + const r = parseInt(s.code.replace("Digit", ""), 10); + if (r <= 0 || r > WYt) { + return; + } + const o = n.nodes[r - 1]; + if (o) { + s.preventDefault(); + s.stopImmediatePropagation(); + this.t.open(this.h.resolveRelativePath(o.relativePath), { + editorOptions: { + pinned: false, + revealIfOpened: true + } + }); + } + }; + const t = Jk(); + for (const s of t) { + this.c.push(Ce(s.window.document, "keydown", e)); + } + } + C() { + this.a.forEach(e => e.dispose()); + this.a.length = 0; + this.b.forEach(e => e.dispose()); + this.b.length = 0; + this.c.forEach(e => e.dispose()); + this.c.length = 0; + } + }; + zgt = __decorate([__param(0, _i), __param(1, t0), __param(2, kt), __param(3, ps), __param(4, Hi), __param(5, Te), __param(6, fS), __param(7, ny), __param(8, ns), __param(9, os), __param(10, Ct), __param(11, tp)], zgt); + it(jgt, zgt, 1); + } +}); +var QJ; +var Jgt; +var dne = ue({ + "out-build/vs/workbench/contrib/recentFilesTrackerService/browser/recentFilesTrackerService.js"() { + "use strict"; + + Xn(); + q(); + te(); + It(); + ii(); + Cs(); + QJ = Ve("recentFilesTrackerService"); + Jgt = class extends H { + constructor(e, t, s) { + super(); + this.c = e; + this.f = t; + this.g = s; + this.a = new Map(); + this.b = new Map(); + for (let n of this.c.listCodeEditors()) { + this.registerEditorListenersToEditor(n); + } + this.D(this.c.onCodeEditorAdd(n => { + const r = n.getModel(); + if (r) { + this.a.set(r.uri.toString(), { + editor: n, + model: r + }); + } + const o = this.registerEditorListenersToEditor(n); + if (o) { + this.D(o); + } + })); + this.D(this.c.onCodeEditorRemove(n => { + const r = n.getModel(); + if (r) { + this.a.delete(r.uri.toString()); + } + })); + } + registerEditorListenersToEditor(e) { + const t = e.getId(); + const s = new Q(); + e.onDidChangeModel(n => { + const r = n.newModelUrl; + if (r && r.scheme === "file") { + this.registerFileView(r); + } + }); + s.add(e.onDidDispose(() => { + this.b.get(t)?.forEach(r => r.dispose()); + this.b.delete(t); + const n = e.getModel(); + if (n) { + this.a.delete(n.uri.toString()); + } + })); + this.b.set(t, [s]); + return s; + } + getOpenModels() { + return Array.from(this.a.values()); + } + h() { + console.log("[Context Graph]", "printRecentlyViewedFiles", this.getRecentlyViewedFiles()); + } + getRecentlyViewedFiles(e = 10, t = []) { + if (e > 100) { + throw new Error("topK must be less than 100"); + } + return this.g.nonPersistentStorage.chatState.recentlyViewedFiles.filter(s => !t.includes(s.relativePath)).slice(-e).reverse(); + } + registerFileView(e) { + const t = this.f.asRelativePath(e); + if (!t || t === "") { + return; + } + const s = 1; + this.g.setNonPersistentStorage("chatState", "recentlyViewedFiles", n => { + if (n.find(r => r.relativePath === t)) { + n = n.filter(r => r.relativePath !== t); + } + n.push({ + uri: e, + relativePath: t, + weight: s + }); + n = n.slice(0, 100); + return n; + }); + } + }; + Jgt = __decorate([__param(0, ps), __param(1, kt), __param(2, _i)], Jgt); + it(QJ, Jgt, 1); + } +}); +var ry; +var UOs; +var Xy = ue({ + "out-build/vs/workbench/contrib/composer/browser/composerEventService.js"() { + "use strict"; + + te(); + q(); + It(); + pe(); + ry = Ve("composerEventService"); + UOs = class extends H { + constructor() { + super(); + this._onContextRemovedEmitter = this.D(new B()); + this.onContextRemoved = this._onContextRemovedEmitter.event; + this._onShouldShowPreviewEmitter = this.D(new B()); + this.onShouldShowPreview = this._onShouldShowPreviewEmitter.event; + this._onShouldForceTextEmitter = this.D(new B()); + this.onShouldForceText = this._onShouldForceTextEmitter.event; + this._onDidAiEditFileEmitter = this.D(new B()); + this.onDidAiEditFile = this._onDidAiEditFileEmitter.event; + this._onDidFinishAiEditToolCallEmitter = this.D(new B()); + this.onDidFinishAiEditToolCall = this._onDidFinishAiEditToolCallEmitter.event; + this._onDidSendRequestEmitter = this.D(new B()); + this.onDidSendRequest = this._onDidSendRequestEmitter.event; + this._onMaybeRunOnComposerSettledEmitter = this.D(new B()); + this.onMaybeRunOnComposerSettled = this._onMaybeRunOnComposerSettledEmitter.event; + this._onDidContextChangeEmitter = this.D(new B()); + this.onDidContextChange = this._onDidContextChangeEmitter.event; + this._onShouldSwapComposersEmitter = this.D(new B()); + this.onShouldSwapComposers = this._onShouldSwapComposersEmitter.event; + this._onDidChangeUnifiedModeEmitter = this.D(new B()); + this.onDidChangeUnifiedMode = this._onDidChangeUnifiedModeEmitter.event; + this._onDidComposerViewsServiceFinishInitializingEmitter = this.D(new B()); + this.onDidComposerViewsServiceFinishInitializing = this._onDidComposerViewsServiceFinishInitializingEmitter.event; + this._onDidComposerServiceFinishInitializingEmitter = this.D(new B()); + this.onDidComposerServiceFinishInitializing = this._onDidComposerServiceFinishInitializingEmitter.event; + this._onComposerWasLoadedEmitter = this.D(new B()); + this.onComposerWasLoaded = this._onComposerWasLoadedEmitter.event; + this._onDidRegisterNewCodeBlockEmitter = this.D(new B()); + this.onDidRegisterNewCodeBlock = this._onDidRegisterNewCodeBlockEmitter.event; + this._onDidTriggerDryRunEmitter = this.D(new B()); + this.onDidTriggerDryRun = this._onDidTriggerDryRunEmitter.event; + this._isComposerViewsServiceInitialized = false; + this._isComposerServiceInitialized = false; + } + fireContextRemoved(i) { + this._onContextRemovedEmitter.fire(i); + } + fireShouldShowPreview(i) { + this._onShouldShowPreviewEmitter.fire(i); + } + fireShouldForceText(i) { + this._onShouldForceTextEmitter.fire(i); + } + fireDidAiEditFile(i) { + this._onDidAiEditFileEmitter.fire(i); + } + fireDidFinishAiEditToolCall() { + this._onDidFinishAiEditToolCallEmitter.fire(); + } + fireDidSendRequest() { + this._onDidSendRequestEmitter.fire(); + } + fireMaybeRunOnComposerSettled(i) { + this._onMaybeRunOnComposerSettledEmitter.fire(i); + } + fireDidContextChange(i) { + this._onDidContextChangeEmitter.fire(i); + } + fireShouldSwapComposers(i) { + this._onShouldSwapComposersEmitter.fire(i); + } + fireOnDidChangeUnifiedMode(i) { + this._onDidChangeUnifiedModeEmitter.fire(i); + } + fireDidComposerViewsServiceFinishInitializing() { + this._isComposerViewsServiceInitialized = true; + this._onDidComposerViewsServiceFinishInitializingEmitter.fire(); + } + fireDidComposerServiceFinishInitializing() { + this._isComposerServiceInitialized = true; + this._onDidComposerServiceFinishInitializingEmitter.fire(); + } + fireComposerWasLoaded(i) { + this._onComposerWasLoadedEmitter.fire(i); + } + fireDidRegisterNewCodeBlock(i) { + this._onDidRegisterNewCodeBlockEmitter.fire(i); + } + isComposerViewsServiceInitialized() { + return this._isComposerViewsServiceInitialized; + } + isComposerServiceInitialized() { + return this._isComposerServiceInitialized; + } + fireDryRunPrompt() { + this._onDidTriggerDryRunEmitter.fire(); + } + }; + it(ry, UOs, 0); + } +}); +var WOs; +var Hor; +var qor; +var jor; +var VOs; +var VYt; +var HOs; +var HYt = ue({ + "out-build/vs/workbench/contrib/composer/browser/composerContextKeys.js"() { + "use strict"; + + Ee(); + WOs = new fe("composerBarIsVisible", false); + Hor = new fe("isComposerProjectsEnabled", true); + qor = new fe("currentComposerIsEmpty", true); + jor = new fe("isComposerUnifying", false); + VOs = new fe("selectedComposerCount", 0); + VYt = new fe("composerFocused", false); + HOs = new fe("chatModeMenuFocused", false); + } +}); +var Id; +var Wf = ue({ + "out-build/vs/workbench/services/panecomposite/browser/panecomposite.js"() { + "use strict"; + + te(); + Id = Ve("paneCompositePartService"); + } +}); +function k1(i) { + switch (i) { + case 0: + return "sidebar"; + case 1: + return "panel"; + case 2: + return "auxiliarybar"; + } +} +function zor(i, e) { + const t = i.group ?? pD.More; + const s = e.group ?? pD.More; + if (t !== s) { + return t.localeCompare(s); + } else { + return (i.order ?? 5) - (e.order ?? 5); + } +} +var hne; +var Ggt; +var Kgt; +var ur; +var qOs; +var qYt; +var jOs; +var pD; +var zOs; +var Ur; +var $U; +var vu; +var fne; +var JOs; +var Qn = ue({ + "out-build/vs/workbench/common/views.js"() { + "use strict"; + + pe(); + X(); + te(); + q(); + In(); + Ht(); + Jr(); + He(); + Br(); + Pn(); + hne = "views"; + Ggt = f(4300, null); + Kgt = dt("default-view-icon", A.window, f(4301, null)); + (function (i) { + i.ViewContainersRegistry = "workbench.registry.view.containers"; + i.ViewsRegistry = "workbench.registry.view"; + })(ur ||= {}); + (function (i) { + i[i.Sidebar = 0] = "Sidebar"; + i[i.Panel = 1] = "Panel"; + i[i.AuxiliaryBar = 2] = "AuxiliaryBar"; + })(qOs ||= {}); + qYt = [0, 1, 2]; + jOs = class extends H { + constructor() { + super(...arguments); + this.c = new Map(); + this.f = new Map(); + this.g = this.D(new B()); + this.onDidChangeViewContainerStatus = this.g.event; + this.h = this.D(new B()); + this.onDidRegister = this.h.event; + this.j = this.D(new B()); + this.onDidDeregister = this.j.event; + this.m = new Map(); + this.n = []; + } + registerViewContainerDeletion(i, e) { + this.c.set(i, e); + } + hasViewContainerDeletion(i) { + return this.c.has(i); + } + getViewContainerDeletion(i) { + return this.c.get(i); + } + deregisterViewContainerDeletion(i) { + this.c.delete(i); + } + setViewContainerStatus(i, e) { + const t = this.f.get(i); + if (e === undefined) { + this.f.delete(i); + } else { + this.f.set(i, e); + } + this.g.fire({ + containerId: i, + status: e, + oldStatus: t + }); + } + getViewContainerStatus(i) { + return this.f.get(i); + } + get all() { + return [...this.m.values()].flat(); + } + registerViewContainer(i, e, t) { + const s = this.get(i.id); + if (s) { + return s; + } + const n = i; + n.openCommandActionDescriptor = t?.doNotRegisterOpenCommand ? undefined : n.openCommandActionDescriptor ?? { + id: n.id + }; + Lq(this.m, e, []).push(n); + if (t?.isDefault) { + this.n.push(n); + } + this.h.fire({ + viewContainer: n, + viewContainerLocation: e + }); + return n; + } + deregisterViewContainer(i) { + for (const e of this.m.keys()) { + const t = this.m.get(e); + const s = t?.indexOf(i); + if (s !== -1) { + t?.splice(s, 1); + if (t.length === 0) { + this.m.delete(e); + } + this.f.delete(i.id); + this.c.delete(i.id); + this.j.fire({ + viewContainer: i, + viewContainerLocation: e + }); + return; + } + } + } + get(i) { + return this.all.filter(e => e.id === i)[0]; + } + getViewContainers(i) { + return [...(this.m.get(i) || [])]; + } + getViewContainerLocation(i) { + return [...this.m.keys()].filter(e => this.getViewContainers(e).filter(t => t?.id === i.id).length > 0)[0]; + } + getDefaultViewContainer(i) { + if (grt.isBcIdWindow && i === 0) { + const e = this.get(z2); + if (e) { + return e; + } + } + return this.n.find(e => this.getViewContainerLocation(e) === i); + } + }; + Pe.add(ur.ViewContainersRegistry, new jOs()); + (function (i) { + i.Open = "2_open"; + i.Debug = "4_debug"; + i.SCM = "5_scm"; + i.More = "9_more"; + })(pD ||= {}); + zOs = class extends H { + constructor() { + super(...arguments); + this.c = this.D(new B()); + this.onViewsRegistered = this.c.event; + this.f = this.D(new B()); + this.onViewsDeregistered = this.f.event; + this.g = this.D(new B()); + this.onDidChangeContainer = this.g.event; + this.h = this.D(new B()); + this.onDidChangeViewWelcomeContent = this.h.event; + this.j = []; + this.m = new Map(); + this.n = new TZ(); + } + registerViews(i, e) { + this.registerViews2([{ + views: i, + viewContainer: e + }]); + } + registerViews2(i) { + i.forEach(({ + views: e, + viewContainer: t + }) => this.q(e, t)); + this.c.fire(i); + } + deregisterViews(i, e) { + const t = this.r(i, e); + if (t.length) { + this.f.fire({ + views: t, + viewContainer: e + }); + } + } + moveViews(i, e) { + for (const t of this.m.keys()) { + if (t !== e) { + const s = this.r(i, t); + if (s.length) { + this.q(s, e); + this.g.fire({ + views: s, + from: t, + to: e + }); + } + } + } + } + getViews(i) { + return this.m.get(i) || []; + } + getView(i) { + for (const e of this.j) { + const t = (this.m.get(e) || []).filter(s => s.id === i)[0]; + if (t) { + return t; + } + } + return null; + } + getViewContainer(i) { + for (const e of this.j) { + if ((this.m.get(e) || []).filter(s => s.id === i)[0]) { + return e; + } + } + return null; + } + registerViewWelcomeContent(i, e) { + this.n.add(i, e); + this.h.fire(i); + return Ue(() => { + this.n.delete(i, e); + this.h.fire(i); + }); + } + registerViewWelcomeContent2(i, e) { + const t = new Map(); + for (const [s, n] of e) { + this.n.add(i, n); + t.set(s, Ue(() => { + this.n.delete(i, n); + this.h.fire(i); + })); + } + this.h.fire(i); + return t; + } + getViewWelcomeContent(i) { + const e = []; + this.n.forEach(i, t => e.push(t)); + return e.sort(zor); + } + q(i, e) { + let t = this.m.get(e); + if (!t) { + t = []; + this.m.set(e, t); + this.j.push(e); + } + for (const s of i) { + if (this.getView(s.id) !== null) { + throw new Error(f(4302, null, s.id)); + } + t.push(s); + } + } + r(i, e) { + const t = this.m.get(e); + if (!t) { + return []; + } + const s = []; + const n = []; + for (const r of t) { + if (i.includes(r)) { + s.push(r); + } else { + n.push(r); + } + } + if (s.length) { + if (n.length) { + this.m.set(e, n); + } else { + this.m.delete(e); + this.j.splice(this.j.indexOf(e), 1); + } + } + return s; + } + }; + Pe.add(ur.ViewsRegistry, new zOs()); + Ur = Ve("viewDescriptorService"); + (function (i) { + i[i.Default = 0] = "Default"; + i[i.Expand = 1] = "Expand"; + })($U ||= {}); + (function (i) { + i[i.None = 0] = "None"; + i[i.Collapsed = 1] = "Collapsed"; + i[i.Expanded = 2] = "Expanded"; + })(vu ||= {}); + fne = class { + constructor(i, e) { + this.c = false; + this.d = false; + Oy(this, i); + this.d = !!e; + this.resolve = async t => { + if (e && !this.c) { + const s = await e(t); + if (s) { + this.tooltip = this.tooltip ?? s.tooltip; + this.command = this.command ?? s.command; + } + } + if (!t.isCancellationRequested) { + this.c = true; + } + }; + } + get hasResolve() { + return this.d; + } + resetResolve() { + this.c = false; + } + asTreeItem() { + return { + handle: this.handle, + parentHandle: this.parentHandle, + collapsibleState: this.collapsibleState, + label: this.label, + description: this.description, + icon: this.icon, + iconDark: this.iconDark, + themeIcon: this.themeIcon, + resourceUri: this.resourceUri, + tooltip: this.tooltip, + contextValue: this.contextValue, + command: this.command, + children: this.children, + accessibilityInformation: this.accessibilityInformation + }; + } + }; + JOs = class extends Error { + constructor(i) { + super(f(4303, null, i)); + this.name = "NoTreeViewError"; + } + static is(i) { + return !!i && i.name === "NoTreeViewError"; + } + }; + } +}); +var zs; +var lo = ue({ + "out-build/vs/workbench/services/views/common/viewsService.js"() { + "use strict"; + + te(); + zs = Ve("viewsService"); + } +}); +function Jor(i) { + return { + terminalFiles: i.terminalFiles?.map(e => hR.fromJsonString(e)) ?? [], + cursorRules: i.cursorRules?.map(e => XT.fromJsonString(e)), + attachedFoldersListDirResults: i.attachedFoldersListDirResults?.map(e => qz.fromJsonString(e)), + summarizedComposers: i.summarizedComposers?.map(e => ave.fromJsonString(e)) + }; +} +var GOs; +var gne; +var Iwe; +var A5; +var $5; +var Ygt = ue({ + "out-build/vs/workbench/contrib/composer/browser/composerMessageRequestContextStorageService.js"() { + "use strict"; + + te(); + q(); + It(); + qt(); + dc(); + Lc(); + Wo(); + jl(); + fwe(); + GOs = false; + gne = GOs ? console.log : () => {}; + Iwe = Ve("composerMessageRequestContextStorageService"); + A5 = "messageRequestContext"; + $5 = class extends H { + constructor(e) { + super(); + this._storageService = e; + } + async storeContext(e, t, s) { + if (!e || !t) { + throw new Error("[composer] composerId or messageId is undefined"); + } + await this._storageService.cursorDiskKVSet(`${A5}:${e}:${t}`, hwe(s)); + } + async updateContext(e, t, s) { + if (!t || !e) { + throw new Error("[composer] messageId or composerId is undefined" + JSON.stringify({ + messageId: t, + composerId: e + })); + } + gne("[composer] updating context", `${A5}:${e.slice(0, 4)}:${t.slice(0, 4)}`); + const n = await this.retrieveContext(e, t); + if (n) { + s(n); + await this._storageService.cursorDiskKVSet(`${A5}:${e}:${t}`, hwe(n)); + } else { + console.error("[composer] No context found for message id", t); + } + } + async retrieveContext(e, t) { + if (!t || !e) { + throw new Error("[composer] messageId or composerId is undefined" + JSON.stringify({ + messageId: t, + composerId: e + })); + } + gne("[composer] retrieving context", `${A5}:${e.slice(0, 4)}:${t.slice(0, 4)}`); + const s = await this._storageService.cursorDiskKVGet(`${A5}:${e}:${t}`); + if (!s) { + return; + } + const n = Jor(JSON.parse(s)); + gne("[composer] retrieved context", { + context: n + }); + return n; + } + async deleteContext(e, t) { + if (!t || !e) { + throw new Error("[composer] messageId or composerId is undefined" + JSON.stringify({ + messageId: t, + composerId: e + })); + } + gne("[composer] deleting context", `${A5}:${e.slice(0, 4)}:${t.slice(0, 4)}`); + await this._storageService.cursorDiskKVSet(`${A5}:${e}:${t}`, undefined); + } + async clearComposerContexts(e) { + if (!e) { + throw new Error("[composer] composerId is undefined"); + } + gne("[composer] clearing all contexts for composer", e); + return this._storageService.cursorDiskKVClearPrefix(`${A5}:${e}:`).catch(t => { + console.error(`[composer] Error clearing contexts for composer ${e}:`, t); + }); + } + }; + __decorate([Xt("ComposerMessageRequestContextStorageService.storeContext")], $5.prototype, "storeContext", null); + __decorate([Xt("ComposerMessageRequestContextStorageService.updateContext")], $5.prototype, "updateContext", null); + __decorate([Xt("ComposerMessageRequestContextStorageService.retrieveContext")], $5.prototype, "retrieveContext", null); + __decorate([Xt("ComposerMessageRequestContextStorageService.deleteContext")], $5.prototype, "deleteContext", null); + __decorate([Xt("ComposerMessageRequestContextStorageService.clearComposerContexts")], $5.prototype, "clearComposerContexts", null); + $5 = __decorate([__param(0, ht)], $5); + it(Iwe, $5, 1); + } +}); +var jYt; +var zYt; +var KOs; +var pne; +var ia; +var Lo; +var yu = ue({ + "out-build/vs/workbench/contrib/composer/browser/composerDataService.js"() { + "use strict"; + + q(); + Et(); + Le(); + pn(); + vS(); + It(); + te(); + Cs(); + qt(); + ii(); + nf(); + BOs(); + Bf(); + iu(); + fwe(); + Lc(); + Pn(); + dne(); + Ps(); + Nt(); + pS(); + rt(); + Ms(); + zJ(); + dc(); + Xy(); + $l(); + Ee(); + HYt(); + Wf(); + Qn(); + Ht(); + lo(); + Wt(); + $l(); + em(); + PU(); + We(); + zt(); + gwe(); + jJ(); + Ygt(); + zYt = 15; + KOs = 10; + pne = "New chat"; + ia = Ve("composerDataService"); + Lo = class extends H { + static { + jYt = this; + } + getComposerQueue(e) { + if (this.getComposerData(e)) { + return this.getComposerCapability(e, as.QUEUING)?.getQueueItemsReactive() ?? []; + } else { + return []; + } + } + getComposerIdFromViewId(e) { + const t = Lw + "."; + if (e.startsWith(t)) { + return e.slice(t.length); + } + } + getComposerIdFromViewContainer(e) { + const s = Pe.as(ur.ViewsRegistry).getViews(e)[0]; + if (s) { + return this.getComposerIdFromViewId(s.id); + } + } + getComposerTitle(e) { + try { + const t = this.getComposerId(e); + const s = this.getComposerData(e); + if (s) { + return s.name ?? pne; + } + { + const n = this.allComposersData.allComposers.find(r => r.composerId === t); + if (n) { + return n.name ?? pne; + } + } + return pne; + } catch (t) { + console.error("[composer] error getting composer title", t); + return pne; + } + } + setLastFocusedComposerId(e) { + const t = this.getComposerId(e); + this._lastFocusedComposerIds = this._lastFocusedComposerIds.filter(s => s !== t); + this._lastFocusedComposerIds.unshift(t); + } + get selectedComposerId() { + const e = this._lastFocusedComposerIds.find(n => this.selectedComposerIds.includes(n)); + if (e) { + return e; + } + this._lastFocusedComposerIds = this._lastFocusedComposerIds.filter(n => this.selectedComposerIds.includes(n)); + const t = this._paneCompositePartService.getLastActivePaneCompositeId(2); + if (t) { + const n = this._viewDescriptorService.getViewContainerById(t); + if (n) { + const r = this.getComposerIdFromViewContainer(n); + if (r && this.selectedComposerIds.includes(r)) { + this.setLastFocusedComposerId(r); + return r; + } + } + } + if (this.allComposersData.selectedComposerIds.length > 0) { + const n = this.allComposersData.selectedComposerIds[0]; + this.setLastFocusedComposerId(n); + return n; + } else if (this.allComposersData.allComposers.length > 0) { + console.log("[composer] no selected composer found, selecting first one"); + const n = this.allComposersData.allComposers[0]; + if (n) { + this.setAllComposersData("selectedComposerIds", [n.composerId]); + this.setLastFocusedComposerId(n.composerId); + return n.composerId; + } + } + console.log("[composer] no composers found, resetting"); + const s = this.resetComposers(); + this.setLastFocusedComposerId(s.composerId); + return s.composerId; + } + get selectedComposerIds() { + return this.allComposersData.selectedComposerIds; + } + get composerDataStorageID() { + return hJi; + } + constructor(e, t, s, n, r, o, a, l, c, u, d, h, g, p, b, v, y, w, C, S) { + super(); + this._storageService = e; + this._workspaceContextService = t; + this._reactiveStorageService = s; + this._instantiationService = n; + this._everythingProviderService = r; + this._gitGraphService = o; + this._recentFilesTrackerService = a; + this._fileService = l; + this._textModelService = c; + this._cursorIgnoreService = u; + this._composerEventService = d; + this._contextKeyService = h; + this._paneCompositePartService = g; + this._viewsService = p; + this._viewDescriptorService = b; + this._commandService = v; + this._composerCheckpointStorageService = y; + this._composerMessageStorageService = w; + this._composerCodeBlockDiffStorageService = C; + this._composerMessageRequestContextStorageService = S; + this._lastFocusedComposerIds = []; + this._onSelectedIdsChangeEffectPromise = null; + this._lastProcessedSelectedIds = []; + this._composerDisposableMap = new Bo(); + this.D(this._viewsService.onDidChangeFocusedView(x => { + const k = this._viewsService.getFocusedView(); + if (!k) { + return; + } + const E = this.getComposerIdFromViewId(k.id); + if (E) { + this.setLastFocusedComposerId(E); + } + })); + this.selectedComposerCountKey = VOs.bindTo(this._contextKeyService); + this.composerDataHandleManager = oor(this._instantiationService, this.composerWasLoadedHook.bind(this), this.composerWasUnloadedHook.bind(this)); + [this.allComposersData, this.setAllComposersData, this.resetComposers, this.getHandleOptions] = nor(this._storageService, this._reactiveStorageService, this._workspaceContextService, this.composerDataHandleManager, this.composerDataStorageID); + this.reactiveStorageRoot = this.D(this._reactiveStorageService.createScoped(this)); + this.reactiveStorageRoot.onChangeEffect({ + deps: [() => this.allComposersData.selectedComposerIds], + onChange: async ({ + deps: x, + prevDeps: k + }) => { + const E = [...x[0]]; + const D = this._lastProcessedSelectedIds.length > 0 ? this._lastProcessedSelectedIds : k?.[0] ?? []; + this.selectedComposerCountKey.set(E.length); + if (!this._onSelectedIdsChangeEffectPromise) { + try { + const P = (async () => { + try { + this._lastFocusedComposerIds = this._lastFocusedComposerIds.filter(F => E.includes(F)); + for (const F of E) { + if (!this.allComposersData.composerHandles[F]?.handle) { + let U = 5000; + if (this.getHandleOptions.shouldWaitFor10SecondsWhileReadingFromDiskAtStartup && Date.now() - this.getHandleOptions.fromDate <= 60000) { + U = 10000; + } + const j = this.composerDataHandleManager.getHandle(F, U); + this.setAllComposersData("composerHandles", F, { + handle: undefined, + handlePromise: j + }); + const ie = await j; + if (!ie || this._reactiveStorageService.nonPersistentStorage.composerState?.shouldSimulateHandleUnableToLoad) { + this._reactiveStorageService.setNonPersistentStorage("composerState", "shouldSimulateHandleUnableToLoad", false); + if (this.allComposersData.selectedComposerIds.length > 1) { + await this._commandService.executeCommand(Cse, F); + } else if (this.allComposersData.selectedComposerIds.length === 1) { + await this._commandService.executeCommand(J2); + } + this.setAllComposersData("composerHandles", F, undefined); + continue; + } + if (this.allComposersData.selectedComposerIds.includes(F)) { + this.setAllComposersData("composerHandles", F, "handle", ie); + } else { + ie.dispose(); + } + } + } + for (const F of D) { + if (!E.includes(F)) { + const O = this.allComposersData.composerHandles[F]; + if (O) { + O.handle?.dispose(); + O.handlePromise?.then(U => { + if (U && !U.isDisposed) { + U.dispose(); + } + }); + this.setAllComposersData("composerHandles", F, undefined); + } + } + } + this._lastProcessedSelectedIds = [...E]; + const R = this.allComposersData.selectedComposerIds; + let L = false; + if (E.length === R.length) { + const F = new Set(E); + const O = new Set(R); + L = E.every(U => O.has(U)) && R.every(U => F.has(U)); + } + if (!L) { + setTimeout(() => { + this.setAllComposersData("selectedComposerIds", [...R]); + }, 0); + } + } catch (R) { + console.error("[composer] Error in onChangeEffect:", R); + } + })(); + this._onSelectedIdsChangeEffectPromise = P; + await P; + } catch (P) { + console.error("[composer] Caught error in onChangeEffect outer block:", P); + } finally { + this._onSelectedIdsChangeEffectPromise = null; + } + } + }, + runNowToo: true + }); + for (const x of jYt.registeredActions) { + x(this._reactiveStorageService, this); + } + this.D(this._storageService.onWillSaveState(() => { + this.saveComposers(); + })); + } + async updateComposerDataAsync(e, t) { + let s; + try { + s = await this.composerDataHandleManager.getHandle(e); + if (!s) { + return; + } + t(s.setData); + } finally { + s?.dispose(); + } + } + dispose() { + super.dispose(); + } + getWeakHandleOptimistic(e) { + return this.composerDataHandleManager.getWeakHandleOptimistic(e); + } + getComposerIsAgentic(e) { + let t; + if (typeof e == "string") { + t = this.allComposersData.allComposers.find(s => s.composerId === e); + } else if ("unifiedMode" in e) { + t = e; + } else if ("data" in e) { + t = e.data; + } + return t?.unifiedMode === "agent"; + } + async composerWasLoadedHook(e) { + try { + const t = e.data; + if (t.text.length > iGt) { + e.setData("text", ""); + e.setData("richText", ""); + } + const s = this.allComposersData.allComposers.find(r => r.composerId === t.composerId); + if (t.unifiedMode !== s?.unifiedMode && t.unifiedMode !== undefined) { + this.setAllComposersData("allComposers", r => r.composerId === t.composerId, { + unifiedMode: t.unifiedMode + }); + } + if (!this._composerDisposableMap.has(e.data.composerId) || this._composerDisposableMap.get(e.data.composerId)?.isDisposed === true) { + this._composerDisposableMap.set(e.data.composerId, new Q()); + } + const n = this._composerDisposableMap.get(e.data.composerId); + if (!n) { + console.error("[composer] No store found for composer id: " + e.data.composerId); + return; + } + n.add(this._reactiveStorageService.onChangeEffectManuallyDisposed({ + deps: [() => e.data.composerId, () => e.data.name, () => e.data.lastUpdatedAt, () => e.data.createdAt, () => e.data.unifiedMode], + onChange: ({ + deps: r + }) => { + const o = r[0]; + const a = r[1]; + const l = r[2]; + const c = r[3]; + const u = r[4]; + this.setAllComposersData("allComposers", d => d.composerId === o, { + name: a, + lastUpdatedAt: l, + createdAt: c, + unifiedMode: u + }); + } + })); + n.add(this._reactiveStorageService.onChangeEffectManuallyDisposed({ + deps: [() => e.data.name], + onChange: ({ + deps: r + }) => { + const o = r[0]; + this._commandService.executeCommand(jht, e.data.composerId, o ?? pne); + } + })); + n.add(this._reactiveStorageService.onChangeEffectManuallyDisposed({ + deps: [() => e.data.status], + onChange: ({ + deps: r + }) => { + const o = r[0]; + this._commandService.executeCommand(zht, e.data.composerId, o); + } + })); + n.add(e); + } catch (t) { + console.error("[composer] Error loading composer data:", t); + } finally { + e.setData("hasLoaded", true); + this._composerEventService.fireComposerWasLoaded({ + weakHandle: e + }); + } + } + async composerWasUnloadedHook(e) { + this._composerDisposableMap.deleteAndDispose(e); + } + get applicationComposerSettings() { + return this._reactiveStorageService.applicationUserPersistentStorage.composerState; + } + static { + this.registeredActions = []; + } + static registerAction(e) { + this.registeredActions.push(e); + } + get selectedComposer() { + const e = this.allComposersData.composerHandles[this.selectedComposerId]?.handle; + if (e) { + return e.data; + } + } + get selectedComposerHandle() { + return this.allComposersData.composerHandles[this.selectedComposerId]?.handle; + } + async getComposerHandleById(e) { + return await this.composerDataHandleManager.getHandle(e); + } + updateSelectedComposer(e) { + const t = this.selectedComposerHandle; + if (t) { + t.setData(e); + } + } + updateComposerDataSetStore(e, t) { + if (typeof e == "string" || "composerId" in e) { + let s; + if (typeof e == "string") { + s = e; + } else { + s = e.composerId; + } + const n = this.composerDataHandleManager.getWeakHandleOptimistic(s); + if (!n) { + throw new Error("[composer] No composer data handle found"); + } + t(n.setData); + n.dispose(); + } else { + t(e.setData); + } + } + updateComposerData(e, t) { + if (typeof e == "string") { + const s = this.composerDataHandleManager.getWeakHandleOptimistic(e); + if (!s) { + throw new Error("[composer] No composer data handle found"); + } + s.setData(n => ({ + ...n, + ...t + })); + s.dispose(); + } else { + e.setData(t); + } + } + HACKY_PLEASE_DO_NOT_USE_getComposerHandleById_ONLY_IF_LOADED(e) { + return this.composerDataHandleManager.getWeakHandleOptimistic(e); + } + async saveComposers() { + const e = (await this._commandService.executeCommand(tft)) || []; + const t = { + allComposers: this.allComposersData.allComposers, + selectedComposerIds: e, + hasMigratedComposerData: this.allComposersData.hasMigratedComposerData, + hasMigratedMultipleComposers: this.allComposersData.hasMigratedMultipleComposers + }; + const s = JSON.stringify(t); + this._storageService.store(this.composerDataStorageID, s, 1, 1); + } + getComposerFromIdOrHandle(e) { + if (typeof e == "string") { + return this.getComposerData(e); + } else { + return e.data; + } + } + getComposerCodeBlock(e, t, s) { + const n = this.getComposerFromIdOrHandle(e); + if (n) { + return n.codeBlockData?.[t.toString()]?.[s]; + } + } + async appendComposer_DO_NOT_CALL_UNLESS_YOU_KNOW_WHAT_YOURE_DOING(e) { + const t = VJ(e); + this.setAllComposersData("allComposers", s => [t, ...s]); + if (this.allComposersData.selectedComposerIds.length === 0) { + this.setAllComposersData("selectedComposerIds", [e.composerId]); + } + this.composerDataHandleManager.pushComposer(e); + } + async deleteComposer_DO_NOT_CALL_UNLESS_YOU_KNOW_WHAT_YOURE_DOING(e) { + const t = this.getComposerId(e); + this.setAllComposersData("allComposers", s => s.filter(n => n.composerId !== t)); + if (this.allComposersData.selectedComposerIds.includes(t)) { + this.setAllComposersData("selectedComposerIds", s => s.filter(n => n !== t)); + } + await Promise.all([this._composerCheckpointStorageService.clearComposerCheckpoints(t), this._composerCodeBlockDiffStorageService.clearComposerDiffs(t), this._composerMessageStorageService.clearComposerMessages(t), this._composerMessageRequestContextStorageService.clearComposerContexts(t), this.composerDataHandleManager.deleteComposer(t)]); + } + updateComposerCodeBlock(e, t, s, n) { + const r = this.getComposerFromIdOrHandle(e); + if (!r) { + return; + } + if (!r.codeBlockData[t.toString()][s]) { + console.trace("[composer] updateReactiveCodeBlock called for uri that does not exist", t); + return; + } + try { + this.updateComposerDataSetStore(e, a => a("codeBlockData", t.toString(), l => l.version === s, l => ({ + ...l, + ...n + }))); + } catch {} + } + getCodeBlockStatus(e, t, s) { + const n = this.getComposerFromIdOrHandle(e); + if (!n) { + return "none"; + } + const r = n?.codeBlockData[t.toString()]; + if (r) { + return r.find(o => o.version === s)?.status ?? "none"; + } else { + return "none"; + } + } + setCodeBlockStatus(e, t, s, n) { + if (!!this.getComposerFromIdOrHandle(e) && !!e) { + this.updateComposerCodeBlock(e, t, s, { + status: n + }); + } + } + setCodeBlockStatusIncludingPreviouslyChained(e, t, s, n) { + const r = this.getComposerFromIdOrHandle(e); + if (!r || !e) { + return; + } + const o = r.codeBlockData[t.toString()]; + if (!o) { + return; + } + const a = o[s]; + if (a && (this.setCodeBlockStatus(e, t, s, n), a.chainedInfo)) { + let l = a.chainedInfo.chainedFromVersion; + while (l >= 0) { + const c = o[l]; + if (!c || !c.chainedInfo) { + if (c) { + this.setCodeBlockStatus(e, t, l, n); + } + break; + } + this.setCodeBlockStatus(e, t, l, n); + l = c.chainedInfo.chainedFromVersion; + } + } + } + getCodeBlocksOfStatuses(e, t) { + const s = this.getComposerFromIdOrHandle(e); + if (!s) { + return []; + } + const n = s.codeBlockData; + const r = Array.isArray(t) ? t : [t]; + const o = []; + for (const a of Object.keys(n)) { + const l = n[a]; + for (const c of l) { + if (r.includes(c.status)) { + o.push(c); + } + } + } + return o; + } + setGeneratingCodeBlocksToAborted(e) { + const t = this.getCodeBlocksOfStatuses(e, "generating"); + for (const n of t) { + this.setCodeBlockStatus(e, n.uri, n.version, "aborted"); + } + const s = this.getComposerData(e); + if (s) { + for (const n of Object.keys(s.conversationMap)) { + const r = s.conversationMap[n]; + if (r.type === _n.AI) { + for (const o of r.codeBlocks ?? []) { + if (o.isGenerating === true) { + this.updateComposerDataSetStore(e, a => a("conversationMap", n, "codeBlocks", l => l.codeBlockIdx === o.codeBlockIdx && l.unregistered === true, "isGenerating", false)); + } + } + } + } + } + } + getLatestCodeBlocks(e) { + const t = this.getComposerFromIdOrHandle(e); + if (!t) { + return []; + } + const s = []; + Object.values(t.codeBlockData ?? {}).forEach(n => { + if (n.length > 0) { + s.push(n[n.length - 1]); + } + }); + return s; + } + getLatestCodeBlockForUri(e, t) { + const s = this.getLatestCodeBlocks(e); + if (!!s && s.length !== 0) { + return s.find(n => n.uri.toString() === t.toString()); + } + } + getLatestCodeBlocksOfStatuses(e, t) { + if (!this.getComposerFromIdOrHandle(e)) { + return []; + } + const n = Array.isArray(t) ? t : [t]; + return this.getLatestCodeBlocks(e).filter(r => { + const o = r.status; + return n.includes(o); + }); + } + getLatestCodeBlockVersion(e, t, s) { + const n = this.getComposerFromIdOrHandle(e); + if (!n) { + return -1; + } + const r = n.codeBlockData[t.toString()]; + if (!r || r.length === 0) { + return -1; + } + const o = r[r.length - 1]?.version; + if (s?.excludeNonAppliedCodeBlocks) { + return r.filter(a => a.isNotApplied !== true).length - 1; + } else { + return o; + } + } + getVersionExcludingNonAppliedCodeBlocks(e, t, s) { + const n = this.getComposerFromIdOrHandle(e); + if (!n) { + return -1; + } + const r = n.codeBlockData[t.toString()]; + if (!r || r.length === 0 || s < 0 || r.length <= s || r[s].isNotApplied === true) { + return -1; + } else { + return r.filter(o => o.isNotApplied !== true).findIndex(o => o.version === s); + } + } + getLatestCodeBlockVersionForMessage(e, t, s, n) { + const r = this.getComposerData(e); + if (!r) { + return -1; + } + const o = t.toString(); + let a = -1; + const l = r.codeBlockData[o]; + if (!l) { + return -1; + } + const c = new Map(); + for (let d = 0; d < r.fullConversationHeadersOnly.length; d++) { + const h = r.fullConversationHeadersOnly[d]; + c.set(h.bubbleId, d); + } + const u = c.get(s); + if (u === undefined) { + console.error("[composer] could not find message idx for bubble id", s); + return -1; + } + for (const d of l) { + const h = c.get(d.bubbleId); + if (h !== undefined) { + if (h > u || h === u && d.codeBlockIdx > n) { + break; + } + a = d.version; + } + } + return a; + } + getInlineDiff(e, t, s) { + const n = this.getComposerId(e); + return this._reactiveStorageService.nonPersistentStorage.inlineDiffs.find(r => r.uri.toString() === t.toString() && r.composerMetadata?.composerId === n && (s ? r.composerMetadata?.version === s : true)); + } + getAllInlineDiffs(e) { + const t = this.getComposerId(e); + return this._reactiveStorageService.nonPersistentStorage.inlineDiffs.filter(s => s.composerMetadata?.composerId === t); + } + doesFileHaveInlineDiff(e, t) { + return !!this.getInlineDiff(e, t); + } + getComposerData(e) { + if (typeof e == "string") { + const t = this.composerDataHandleManager.getWeakHandleOptimistic(e); + if (!t) { + return; + } + try { + return t.data; + } finally { + t.dispose(); + } + } else { + return e.data; + } + } + getAllCachedCodeBlocks(e) { + const t = this.getComposerData(e); + if (!t) { + throw Error("[composer] composer doesn't exist"); + } + const { + codeBlockData: s + } = t; + return Object.values(s).flat().filter(({ + isCached: r + }) => r === true); + } + addTypesToCapabilityStatuses(e, t, s, n) { + this.updateComposerDataSetStore(e, r => r("conversationMap", t, "capabilityStatuses", s, o => [...o, ...n.map(a => ({ + type: a, + status: "none" + }))])); + } + removeTypesFromCapabilityStatuses(e, t, s, n) { + this.updateComposerDataSetStore(e, r => r("conversationMap", t, "capabilityStatuses", s, o => [...o.filter(a => !n.includes(a.type))])); + } + setCapabilityStatus(e, t, s, n, r) { + const o = this.getComposerBubble(e, t); + if (!!o && !!o.capabilityStatuses && (!o.capabilityStatuses[s] || !!o.capabilityStatuses[s].map(l => l.type).includes(n))) { + this.updateComposerDataSetStore(e, a => a("conversationMap", t, "capabilityStatuses", s, l => l.type === n, { + type: n, + status: r + })); + } + } + setGeneratingCapabilitiesToAborted(e) { + const t = this.getComposerData(e); + if (t) { + for (const s of Object.values(t.conversationMap)) { + if (s.capabilityStatuses) { + for (const n of Object.keys(s.capabilityStatuses)) { + for (const r of s.capabilityStatuses[n]) { + if (r.status === "generating") { + this.setCapabilityStatus(e, s.bubbleId, n, r.type, "aborted"); + } + } + } + } + } + } + } + isRunningCapabilities(e) { + const t = this.getComposerData(e); + if (!t) { + return false; + } + for (const s of t.capabilities) { + if (s.isRunning()) { + return true; + } + } + return false; + } + isComposerRunning(e) { + const t = this.getComposerData(e); + if (t) { + if (t.status === "generating") { + return true; + } else { + return Object.values(t.codeBlockData ?? {}).some(n => n.some(r => r.status === "applying" && !r.isNotApplied)); + } + } else { + return false; + } + } + getOldestNonRunningSelectedComposerId(e) { + const t = this.selectedComposerIds; + if (t.length === 0) { + return; + } + const s = e ? this.getComposerId(e) : undefined; + const n = t.filter(o => (!s || o !== s) && !this.isComposerRunning(o)); + if (n.length === 0) { + return; + } + const r = this._lastFocusedComposerIds.filter(o => n.includes(o)); + if (r.length > 0) { + return r[r.length - 1]; + } else { + return n[0]; + } + } + getToolFormer(e) { + const t = this.getComposerCapability(e, as.TOOL_FORMER); + if (t) { + return t; + } + } + getPendingUserDecisionGroup(e) { + const t = this.getToolFormer(e); + if (t) { + return t.getPendingUserDecisionGroup()(); + } else { + return []; + } + } + getIsBlockingUserDecision(e) { + const t = this.getToolFormer(e); + if (t) { + return t.getIsBlockingUserDecision()(); + } else { + return false; + } + } + getBlockingUserDecisionToolType(e) { + const t = this.getToolFormer(e); + if (!t) { + return; + } + const s = t.getPendingUserDecisionGroup()(); + if (s.length !== 0) { + return s[0].clientSideTool; + } + } + setLoadingToolFormerToolsToCancelled(e) { + const t = this.getToolFormer(e); + if (t) { + t.setLoadingToolsToCancelled(); + } + } + addCapabilityRan(e, t, s, n) { + this.updateComposerDataSetStore(e, r => r("conversationMap", t, "capabilitiesRan", s, o => [...o, n])); + } + getComposerCapability(e, t) { + const s = this.getComposerData(e); + if (s) { + return s.capabilities.find(n => n.type === t); + } + } + getLoadedConversation(e) { + const t = this.getComposerData(e); + if (!t) { + return []; + } + const s = t.conversationMap; + const n = t.fullConversationHeadersOnly; + const r = n.length; + return El(() => { + const o = []; + for (let a = n.length - 1; a >= 0; a--) { + const l = n[a]; + const c = s[l.bubbleId]; + if (c) { + o.push(c); + } else { + break; + } + } + return o.reverse(); + }); + } + async deleteComposerBubbles(e, t) { + this.updateComposerDataSetStore(e, n => n("fullConversationHeadersOnly", r => r.filter(o => !t.includes(o.bubbleId)))); + for (const n of t) { + this.updateComposerDataSetStore(e, r => r("conversationMap", n, undefined)); + } + const s = this.getComposerId(e); + await Promise.all(t.map(n => this._composerMessageStorageService.deleteMessage(s, n))); + } + async appendComposerBubbles(e, t) { + const s = this.getComposerData(e); + if (!s) { + return; + } + for (const r of t) { + this.updateComposerDataSetStore(e, o => o("conversationMap", r.bubbleId, r)); + this.updateComposerDataSetStore(e, o => { + o("fullConversationHeadersOnly", s.fullConversationHeadersOnly.length, { + bubbleId: r.bubbleId, + type: r.type, + serverBubbleId: r.serverBubbleId + }); + }); + } + const n = this.getComposerId(e); + await Promise.all(t.map(r => this._composerMessageStorageService.storeMessage(n, r))); + } + async insertComposerBubblesAtIndex(e, t, s) { + this.updateComposerDataSetStore(e, r => r("fullConversationHeadersOnly", o => { + const a = Math.max(0, Math.min(s, o.length)); + const l = o.slice(0, a); + const c = o.slice(a); + return [...l, ...t.map(u => ({ + bubbleId: u.bubbleId, + type: u.type, + serverBubbleId: u.serverBubbleId + })), ...c]; + })); + for (const r of t) { + this.updateComposerDataSetStore(e, o => o("conversationMap", r.bubbleId, r)); + } + const n = this.getComposerId(e); + await Promise.all(t.map(r => this._composerMessageStorageService.storeMessage(n, r))); + } + getComposerBubbleIndex(e, t) { + const s = this.getComposerFromIdOrHandle(e); + if (s) { + return El(() => s.fullConversationHeadersOnly.findIndex(n => n.bubbleId === t)); + } else { + return -1; + } + } + getComposerBubble(e, t) { + const s = this.getComposerFromIdOrHandle(e); + if (s) { + return s.conversationMap[t]; + } + } + getComposerBubbleAsync(e, t) { + const s = this.getComposerBubble(e, t); + if (s) { + return Promise.resolve(s); + } else { + return this._composerMessageStorageService.retrieveMessage(this.getComposerId(e), t); + } + } + updateComposerBubbleSetStore(e, t, s) { + this.updateComposerDataSetStore(e, n => { + s((...o) => n("conversationMap", t, ...o)); + }); + } + async updateComposerBubbleCheckpoint(e, t, s, n) { + if (!s) { + return; + } + const r = this.getComposerId(e); + const o = this.getComposerBubble(e, t)?.checkpointId; + const a = this.getComposerBubble(e, t)?.afterCheckpointId; + if (o && !n.isAfterCheckpoint) { + this._composerCheckpointStorageService.updateCheckpoint(r, o, l => { + Object.assign(l, s); + }); + } else if (a && n.isAfterCheckpoint) { + this._composerCheckpointStorageService.updateCheckpoint(r, a, l => { + Object.assign(l, s); + }); + } else { + const l = await this._composerCheckpointStorageService.storeCheckpoint(r, s); + this.updateComposerDataSetStore(e, c => c("conversationMap", t, u => n.isAfterCheckpoint ? { + ...u, + afterCheckpointId: l + } : { + ...u, + checkpointId: l + })); + } + } + updateComposerBubble(e, t, s) { + this.updateComposerDataSetStore(e, n => n("conversationMap", t, r => ({ + ...r, + ...s + }))); + } + getLastHumanBubble(e) { + const t = this.getComposerData(e); + if (!t) { + return; + } + const s = t.fullConversationHeadersOnly.length; + const n = El(() => { + for (let r = t.fullConversationHeadersOnly.length - 1; r >= 0; r--) { + if (t.fullConversationHeadersOnly[r].type === _n.HUMAN) { + return t.fullConversationHeadersOnly[r].bubbleId; + } + } + }); + if (n) { + return t.conversationMap[n]; + } + } + getLastAiBubble(e) { + const t = this.getComposerData(e); + if (!t) { + return; + } + const s = t.fullConversationHeadersOnly.length; + const n = El(() => { + for (let r = t.fullConversationHeadersOnly.length - 1; r >= 0; r--) { + if (t.fullConversationHeadersOnly[r].type === _n.AI) { + return t.fullConversationHeadersOnly[r].bubbleId; + } + } + }); + if (n) { + return t.conversationMap[n]; + } + } + getLastHumanBubbleId(e) { + if (this.getComposerData(e)) { + return this.getLastHumanBubble(e)?.bubbleId; + } + } + getLastAiBubbleId(e) { + if (this.getComposerData(e)) { + return this.getLastAiBubble(e)?.bubbleId; + } + } + getLastBubble(e) { + const t = this.getComposerData(e); + if (!t) { + return; + } + const s = this.getLastBubbleId(e); + if (s) { + return t.conversationMap[s]; + } + } + getLastBubbleId(e) { + const t = this.getComposerData(e); + if (t && t.fullConversationHeadersOnly.length !== 0) { + return t.fullConversationHeadersOnly[t.fullConversationHeadersOnly.length - 1].bubbleId; + } + } + getLastBubbleWhere(e, t) { + const s = this.getComposerData(e); + if (!s) { + return; + } + const n = s.fullConversationHeadersOnly.length; + const r = El(() => [...this.getLoadedConversation(s.composerId)].reverse().find(l => t(l))?.bubbleId); + if (r) { + return s.conversationMap[r]; + } + } + getLastAiBubbles(e, t) { + const s = this.getComposerData(e); + if (!s) { + return []; + } + if (t?.humanBubbleId) { + const n = this.getComposerBubbleIndex(e, t.humanBubbleId); + if (n === -1) { + return []; + } + let r = n; + while (r > 0 && s.fullConversationHeadersOnly[r - 1].type === _n.HUMAN) { + r--; + } + let o = r - 1; + while (o >= 0 && s.fullConversationHeadersOnly[o].type === _n.AI) { + o--; + } + const a = o < 0 ? 0 : o + 1; + return s.fullConversationHeadersOnly.slice(a, r).map(l => s.conversationMap[l.bubbleId]).filter(to); + } else { + const n = this.getLastHumanBubbleId(e); + if (!n) { + return []; + } + const r = s.fullConversationHeadersOnly.findIndex(o => o.bubbleId === n); + return s.fullConversationHeadersOnly.slice(r + 1).map(o => s.conversationMap[o.bubbleId]).filter(to); + } + } + getUrisOfCodeblocksWithDiffsInLastAiBubbles(e, t) { + const s = this.getLastAiBubbles(e, { + humanBubbleId: t + }); + if (!s.length) { + return []; + } + const n = new Set(); + for (const r of s) { + r.codeBlocks?.forEach(o => { + if (o.uri && this.getComposerCodeBlock(e, o.uri, o.version)?.diffId !== undefined) { + n.add(o.uri.toString()); + } + }); + } + return Array.from(n).map(r => V.parse(r)); + } + getComposerId(e) { + if (typeof e == "string") { + return e; + } else { + return e.data.composerId; + } + } + getActionButtons(e) { + const t = this.getComposerId(e); + return this._reactiveStorageService.nonPersistentStorage.composerState.actionButtons?.[t] ?? []; + } + addActionButton(e, t, s, n) { + const r = this.getComposerId(e); + if (!this._reactiveStorageService.nonPersistentStorage.composerState.actionButtons) { + this._reactiveStorageService.setNonPersistentStorage("composerState", "actionButtons", {}); + } else if (this._reactiveStorageService.nonPersistentStorage.composerState.actionButtons?.[r]?.find(u => u.id === n?.id)) { + console.error("[composer] trying to add an action button that already exists, skipping"); + return; + } + const o = this._reactiveStorageService.nonPersistentStorage.composerState.actionButtons?.[r] ?? []; + const a = o.length === 0; + const l = o.length === 1; + const c = n?.id ?? Ft(); + this._reactiveStorageService.setNonPersistentStorage("composerState", "actionButtons", r, [...(this._reactiveStorageService.nonPersistentStorage.composerState.actionButtons?.[r] ?? []), { + id: c, + label: t, + onClick: u => { + const d = s(u); + this.removeActionButton(r, c); + return d; + }, + onRemove: n?.onRemove, + buttonType: n?.buttonType ?? (a ? "primary" : "secondary"), + keybindingLabel: a ? "⏎" : l ? Gt ? " ⌥⏎" : " alt+⏎" : undefined, + icon: n?.icon, + hintText: n?.hintText + }]); + } + removeActionButton(e, t) { + const s = this.getComposerId(e); + if (this._reactiveStorageService.nonPersistentStorage.composerState.actionButtons?.[s]) { + this._reactiveStorageService.setNonPersistentStorage("composerState", "actionButtons", s, (this._reactiveStorageService.nonPersistentStorage.composerState.actionButtons?.[s] ?? []).filter(n => n.id === t ? (n.onRemove?.(), false) : true)); + } + } + clearActionButtons(e) { + const t = this.getComposerId(e); + if (!this._reactiveStorageService.nonPersistentStorage.composerState.actionButtons?.[t]) { + return; + } + (this._reactiveStorageService.nonPersistentStorage.composerState.actionButtons?.[t] ?? []).forEach(n => { + n.onRemove?.(); + }); + this._reactiveStorageService.setNonPersistentStorage("composerState", "actionButtons", t, []); + } + async getCurrentFilesContent(e) { + const t = new Map(); + for (const s of e) { + if (!(await this._fileService.exists(V.parse(s)))) { + continue; + } + const n = V.parse(s); + let r; + try { + r = await this._textModelService.createModelReference(n); + const a = r.object.textEditorModel.getLinesContent(); + t.set(s, a); + } finally { + r?.dispose(); + } + } + return t; + } + selectLastHumanBubbleAboveInput(e) { + const t = this.getComposerData(e); + if (!t) { + return false; + } + for (let s = t.fullConversationHeadersOnly.length - 1; s >= 0; s--) { + const n = t.fullConversationHeadersOnly[s]; + if (n.type === _n.HUMAN) { + this.updateComposerData(e, { + selectedBubbleId: n.bubbleId + }); + HJ(n.bubbleId); + return true; + } + } + return false; + } + async getRelevantFiles(e) { + const t = this.getComposerData(e); + if (!t) { + return []; + } + const s = t.gitGraphFileSuggestions ?? (await this.getContextGraphFilesFromFileSelections(e)); + const n = this.getRecentlyViewedFiles(); + const r = new Set(); + const o = []; + for (const a of [...s, ...n]) { + const l = MJ(a); + if (await this._fileService.exists(V.parse(l))) { + if (!this._cursorIgnoreService.shouldBlockUriFromReading(V.parse(l)) && !r.has(l)) { + r.add(l); + o.push(a); + } + } + } + await new Promise(a => this._cursorIgnoreService.addOnCursorIgnoreLoadedCallback(() => a(undefined))); + return await this._cursorIgnoreService.filterCursorIgnoredFiles(o, a => V.revive(a.uri)); + } + async getContextGraphFiles(e) { + let t = 0; + while (!this._everythingProviderService.provider && t < 20) { + await new Promise(c => setTimeout(c, 1000)); + t++; + } + if (!e.length) { + return []; + } + const s = e.map(async c => (await this._gitGraphService.getRelatedFiles({ + uri: V.revive(c.uri), + maxNumFiles: zYt + })).map(d => ({ + ...d + }))); + const n = (await Promise.all(s)).flat(); + const r = new Set(e.map(c => MJ(c))); + return n.reduce((c, u) => { + const d = u.uri; + if (r.has(d.toString())) { + return c; + } + const h = c.find(g => sr.isEqual(g.uri, u.uri)); + if (!h || u.weight > h.weight) { + if (h) { + c = c.filter(g => !sr.isEqual(g.uri, u.uri)); + } + c.push(u); + } + return c; + }, []).sort((c, u) => u.weight - c.weight).slice(0, zYt).map(c => ({ + uri: c.uri, + fileName: ir(c.uri.fsPath) + })); + } + getRecentlyViewedFiles() { + return this._recentFilesTrackerService.getRecentlyViewedFiles(KOs).map(t => ({ + uri: this._workspaceContextService.resolveRelativePath(t.relativePath) + })); + } + async getContextGraphFilesFromFileSelections(e) { + let t = 0; + while (!this._everythingProviderService.provider && t < 20) { + await new Promise(r => setTimeout(r, 1000)); + t++; + } + const s = this.getComposerData(e); + if (!s) { + return []; + } + if (!s.context.fileSelections.length) { + this.updateComposerData(e, { + gitGraphFileSuggestions: [] + }); + return []; + } + const n = await this.getContextGraphFiles(s.context.fileSelections); + this.updateComposerData(e, { + gitGraphFileSuggestions: n + }); + return n; + } + getDebugInfo() { + return { + allComposersData: this.allComposersData, + selectedComposerId: this.selectedComposerId, + selectedComposerIds: this.selectedComposerIds, + lastFocusedComposerIds: this.getLastFocusedComposerIds(), + onChangeEffectPromise: this._onSelectedIdsChangeEffectPromise + }; + } + getLoadedComposers() { + return this.composerDataHandleManager.getLoadedComposers(); + } + addDisposableToComposer(e, t) { + const s = this.getComposerId(e); + if (!this._composerDisposableMap.has(s)) { + this._composerDisposableMap.set(s, new Q()); + } + const n = this._composerDisposableMap.get(s); + if (!n) { + console.error("[composer] No store found for composer id: " + s); + return; + } + n.add(t); + } + getLastFocusedComposerIds() { + return [...this._lastFocusedComposerIds]; + } + async getConversationFromBubble(e, t) { + const s = this.getComposerFromIdOrHandle(e); + if (!s) { + return []; + } + const n = this.getComposerId(e); + const r = this.getComposerBubbleIndex(e, t); + if (r === -1) { + return []; + } + const o = s.fullConversationHeadersOnly.slice(r); + const a = new Map(); + for (const u of o) { + const d = s.conversationMap[u.bubbleId]; + if (d) { + a.set(u.bubbleId, d); + } + } + const l = o.filter(u => !a.has(u.bubbleId)).map(u => u.bubbleId); + if (l.length > 0) { + const u = l.map(h => this._composerMessageStorageService.retrieveMessage(n, h)); + const d = await Promise.all(u); + for (const h of d) { + if (h) { + a.set(h.bubbleId, h); + } + } + } + const c = []; + for (const u of o) { + const d = a.get(u.bubbleId); + if (d) { + c.push(d); + } + } + return c; + } + async loadConversationFromBubble(e, t) { + const s = await this.getConversationFromBubble(e, t); + if (s.length === 0) { + return []; + } + for (const n of s) { + if (!this.getComposerBubble(e, n.bubbleId)) { + this.updateComposerDataSetStore(e, o => o("conversationMap", n.bubbleId, n)); + } + } + return s; + } + getComposerBubbleIdFromPotentialServerBubbleId(e, t) { + const s = this.getComposerFromIdOrHandle(e); + if (s) { + return El(() => { + for (const n of s.fullConversationHeadersOnly) { + if (n.bubbleId === t || n.serverBubbleId === t) { + return n.bubbleId; + } + } + }); + } + } + }; + __decorate([Xt("ComposerDataService.getComposerTitle")], Lo.prototype, "getComposerTitle", null); + __decorate([Xt("ComposerDataService.setLastFocusedComposerId")], Lo.prototype, "setLastFocusedComposerId", null); + __decorate([Xt("ComposerDataService.updateComposerDataAsync")], Lo.prototype, "updateComposerDataAsync", null); + __decorate([Xt("ComposerDataService.getWeakHandleOptimistic")], Lo.prototype, "getWeakHandleOptimistic", null); + __decorate([Xt("ComposerDataService.composerWasLoadedHook")], Lo.prototype, "composerWasLoadedHook", null); + __decorate([Xt("ComposerDataService.composerWasUnloadedHook")], Lo.prototype, "composerWasUnloadedHook", null); + __decorate([Xt("ComposerDataService.getComposerHandleById")], Lo.prototype, "getComposerHandleById", null); + __decorate([Xt("ComposerDataService.updateSelectedComposer")], Lo.prototype, "updateSelectedComposer", null); + __decorate([Xt("ComposerDataService.updateComposerDataSetStore")], Lo.prototype, "updateComposerDataSetStore", null); + __decorate([Xt("ComposerDataService.updateComposerData")], Lo.prototype, "updateComposerData", null); + __decorate([Xt("ComposerDataService.HACKY_PLEASE_DO_NOT_USE_getComposerHandleById_ONLY_IF_LOADED")], Lo.prototype, "HACKY_PLEASE_DO_NOT_USE_getComposerHandleById_ONLY_IF_LOADED", null); + __decorate([Xt("ComposerDataService.saveComposers")], Lo.prototype, "saveComposers", null); + __decorate([Xt("ComposerDataService.getComposerFromIdOrHandle")], Lo.prototype, "getComposerFromIdOrHandle", null); + __decorate([Xt("ComposerDataService.getComposerCodeBlock")], Lo.prototype, "getComposerCodeBlock", null); + __decorate([Xt("ComposerDataService.appendComposer")], Lo.prototype, "appendComposer_DO_NOT_CALL_UNLESS_YOU_KNOW_WHAT_YOURE_DOING", null); + __decorate([Xt("ComposerDataService.deleteComposer")], Lo.prototype, "deleteComposer_DO_NOT_CALL_UNLESS_YOU_KNOW_WHAT_YOURE_DOING", null); + __decorate([Xt("ComposerDataService.updateComposerCodeBlock")], Lo.prototype, "updateComposerCodeBlock", null); + __decorate([Xt("ComposerDataService.getCodeBlockStatus")], Lo.prototype, "getCodeBlockStatus", null); + __decorate([Xt("ComposerDataService.setCodeBlockStatus")], Lo.prototype, "setCodeBlockStatus", null); + __decorate([Xt("ComposerDataService.setCodeBlockStatusIncludingPreviouslyChained")], Lo.prototype, "setCodeBlockStatusIncludingPreviouslyChained", null); + __decorate([Xt("ComposerDataService.getCodeBlocksOfStatuses")], Lo.prototype, "getCodeBlocksOfStatuses", null); + __decorate([Xt("ComposerDataService.setGeneratingCodeBlocksToAborted")], Lo.prototype, "setGeneratingCodeBlocksToAborted", null); + __decorate([Xt("ComposerDataService.getLatestCodeBlocks")], Lo.prototype, "getLatestCodeBlocks", null); + __decorate([Xt("ComposerDataService.getLatestCodeBlockForUri")], Lo.prototype, "getLatestCodeBlockForUri", null); + __decorate([Xt("ComposerDataService.getLatestCodeBlocksOfStatuses")], Lo.prototype, "getLatestCodeBlocksOfStatuses", null); + __decorate([Xt("ComposerDataService.getLatestCodeBlockVersion")], Lo.prototype, "getLatestCodeBlockVersion", null); + __decorate([Xt("ComposerDataService.getVersionExcludingNonAppliedCodeBlocks")], Lo.prototype, "getVersionExcludingNonAppliedCodeBlocks", null); + __decorate([Xt("ComposerDataService.getLatestCodeBlockVersionForMessage")], Lo.prototype, "getLatestCodeBlockVersionForMessage", null); + __decorate([Xt("ComposerDataService.getInlineDiff")], Lo.prototype, "getInlineDiff", null); + __decorate([Xt("ComposerDataService.getAllInlineDiffs")], Lo.prototype, "getAllInlineDiffs", null); + __decorate([Xt("ComposerDataService.doesFileHaveInlineDiff")], Lo.prototype, "doesFileHaveInlineDiff", null); + __decorate([Xt("ComposerDataService.getAllCachedCodeBlocks")], Lo.prototype, "getAllCachedCodeBlocks", null); + __decorate([Xt("ComposerDataService.addTypesToCapabilityStatuses")], Lo.prototype, "addTypesToCapabilityStatuses", null); + __decorate([Xt("ComposerDataService.removeTypesFromCapabilityStatuses")], Lo.prototype, "removeTypesFromCapabilityStatuses", null); + __decorate([Xt("ComposerDataService.setCapabilityStatus")], Lo.prototype, "setCapabilityStatus", null); + __decorate([Xt("ComposerDataService.setGeneratingCapabilitiesToAborted")], Lo.prototype, "setGeneratingCapabilitiesToAborted", null); + __decorate([Xt("ComposerDataService.isRunningCapabilities")], Lo.prototype, "isRunningCapabilities", null); + __decorate([Xt("ComposerDataService.isComposerRunning")], Lo.prototype, "isComposerRunning", null); + __decorate([Xt("ComposerDataService.getOldestSelectedComposerId")], Lo.prototype, "getOldestNonRunningSelectedComposerId", null); + __decorate([Xt("ComposerDataService.getToolFormer")], Lo.prototype, "getToolFormer", null); + __decorate([Xt("ComposerDataService.getPendingUserDecisionGroup")], Lo.prototype, "getPendingUserDecisionGroup", null); + __decorate([Xt("ComposerDataService.getIsBlockingUserDecision")], Lo.prototype, "getIsBlockingUserDecision", null); + __decorate([Xt("ComposerDataService.getBlockingUserDecisionToolType")], Lo.prototype, "getBlockingUserDecisionToolType", null); + __decorate([Xt("ComposerDataService.setGeneratingToolFormerToolsToCancelled")], Lo.prototype, "setLoadingToolFormerToolsToCancelled", null); + __decorate([Xt("ComposerDataService.addCapabilityRan")], Lo.prototype, "addCapabilityRan", null); + __decorate([Xt("ComposerDataService.getComposerCapability")], Lo.prototype, "getComposerCapability", null); + __decorate([Xt("ComposerDataService.getLoadedConversation")], Lo.prototype, "getLoadedConversation", null); + __decorate([Xt("ComposerDataService.deleteComposerBubbles")], Lo.prototype, "deleteComposerBubbles", null); + __decorate([Xt("ComposerDataService.appendComposerBubbles")], Lo.prototype, "appendComposerBubbles", null); + __decorate([Xt("ComposerDataService.insertComposerBubblesAtIndex")], Lo.prototype, "insertComposerBubblesAtIndex", null); + __decorate([Xt("ComposerDataService.getComposerBubbleIndex")], Lo.prototype, "getComposerBubbleIndex", null); + __decorate([Xt("ComposerDataService.getComposerBubble")], Lo.prototype, "getComposerBubble", null); + __decorate([Xt("ComposerDataService.getComposerBubbleAsync")], Lo.prototype, "getComposerBubbleAsync", null); + __decorate([Xt("ComposerDataService.updateComposerBubbleSetStore")], Lo.prototype, "updateComposerBubbleSetStore", null); + __decorate([Xt("ComposerDataService.updateComposerBubbleCheckpoint")], Lo.prototype, "updateComposerBubbleCheckpoint", null); + __decorate([Xt("ComposerDataService.updateComposerBubble")], Lo.prototype, "updateComposerBubble", null); + __decorate([Xt("ComposerDataService.getLastHumanBubble")], Lo.prototype, "getLastHumanBubble", null); + __decorate([Xt("ComposerDataService.getLastAiBubble")], Lo.prototype, "getLastAiBubble", null); + __decorate([Xt("ComposerDataService.getLastHumanBubbleId")], Lo.prototype, "getLastHumanBubbleId", null); + __decorate([Xt("ComposerDataService.getLastAiBubbleId")], Lo.prototype, "getLastAiBubbleId", null); + __decorate([Xt("ComposerDataService.getLastBubble")], Lo.prototype, "getLastBubble", null); + __decorate([Xt("ComposerDataService.getLastBubbleId")], Lo.prototype, "getLastBubbleId", null); + __decorate([Xt("ComposerDataService.getLastBubbleWhere")], Lo.prototype, "getLastBubbleWhere", null); + __decorate([Xt("ComposerDataService.getUrisOfCodeblocksWithDiffsInLastAiBubbles")], Lo.prototype, "getUrisOfCodeblocksWithDiffsInLastAiBubbles", null); + __decorate([Xt("ComposerDataService.getActionButtons")], Lo.prototype, "getActionButtons", null); + __decorate([Xt("ComposerDataService.addActionButton")], Lo.prototype, "addActionButton", null); + __decorate([Xt("ComposerDataService.removeActionButton")], Lo.prototype, "removeActionButton", null); + __decorate([Xt("ComposerDataService.clearActionButtons")], Lo.prototype, "clearActionButtons", null); + __decorate([Xt("ComposerDataService.getCurrentFilesContent")], Lo.prototype, "getCurrentFilesContent", null); + __decorate([Xt("ComposerDataService.selectLastHumanBubbleAboveInput")], Lo.prototype, "selectLastHumanBubbleAboveInput", null); + __decorate([Xt("ComposerDataService.getRelevantFiles")], Lo.prototype, "getRelevantFiles", null); + __decorate([Xt("ComposerDataService.getContextGraphFiles")], Lo.prototype, "getContextGraphFiles", null); + __decorate([Xt("ComposerDataService.getRecentlyViewedFiles")], Lo.prototype, "getRecentlyViewedFiles", null); + __decorate([Xt("ComposerDataService.getContextGraphFilesFromFileSelections")], Lo.prototype, "getContextGraphFilesFromFileSelections", null); + __decorate([Xt("ComposerDataService.getLoadedComposers")], Lo.prototype, "getLoadedComposers", null); + __decorate([Xt("ComposerDataService.getConversationFromBubble")], Lo.prototype, "getConversationFromBubble", null); + __decorate([Xt("ComposerDataService.loadConversationFromBubble")], Lo.prototype, "loadConversationFromBubble", null); + __decorate([Xt("ComposerDataService.getComposerBubbleIdFromPotentialServerBubbleId")], Lo.prototype, "getComposerBubbleIdFromPotentialServerBubbleId", null); + Lo = jYt = __decorate([__param(0, ht), __param(1, kt), __param(2, _i), __param(3, re), __param(4, t0), __param(5, jgt), __param(6, QJ), __param(7, Ct), __param(8, ns), __param(9, tp), __param(10, ry), __param(11, Ne), __param(12, Id), __param(13, zs), __param(14, Ur), __param(15, gt), __param(16, rO), __param(17, Kse), __param(18, RU), __param(19, Iwe)], Lo); + it(ia, Lo, 0); + } +}); +var FU; +var YOs; +var XOs; +var QOs; +var ZJ = ue({ + "out-build/vs/workbench/services/outline/browser/outline.js"() { + "use strict"; + + te(); + FU = Ve("IOutlineService"); + (function (i) { + i[i.OutlinePane = 1] = "OutlinePane"; + i[i.Breadcrumbs = 2] = "Breadcrumbs"; + i[i.QuickPick = 4] = "QuickPick"; + })(YOs ||= {}); + (function (i) { + i.icons = "outline.icons"; + i.collapseItems = "outline.collapseItems"; + i.problemsEnabled = "outline.problems.enabled"; + i.problemsColors = "outline.problems.colors"; + i.problemsBadges = "outline.problems.badges"; + })(XOs ||= {}); + (function (i) { + i.Collapsed = "alwaysCollapse"; + i.Expanded = "alwaysExpand"; + })(QOs ||= {}); + } +}); +var Xgt; +var Gor = ue({ + "out-build/vs/workbench/services/selectedContext/browser/selectedContextService.js"() { + "use strict"; + + q(); + av(); + qh(); + cne(); + Lc(); + Bf(); + Ms(); + wR(); + ii(); + Le(); + N5(); + Nt(); + zt(); + cC(); + dl(); + Wo(); + kwe(); + AU(); + $Yt(); + wl(); + jm(); + Ed(); + At(); + Cs(); + lC(); + te(); + pe(); + yu(); + $l(); + Wt(); + em(); + vt(); + ZJ(); + pA(); + Rn(); + qx(); + eKt(); + Xgt = class extends H { + async j() { + if (!this.h) { + const e = await Promise.resolve().then(() => { + JYt(); + return ZOs; + }); + this.h = this.L.invokeFunction(t => t.get(e.$7_b)); + } + return this.h; + } + getUndoRedoUri(e) { + return V.from({ + scheme: me.contextObject, + path: e + }); + } + constructor(e, t, s, n, r, o, a, l, c, u, d, h, g, p, b, v, y, w, C, S) { + super(); + this.r = e; + this.t = t; + this.u = s; + this.w = n; + this.y = r; + this.z = o; + this.C = a; + this.F = l; + this.G = c; + this.H = u; + this.I = d; + this.J = h; + this.L = g; + this.M = p; + this.N = b; + this.O = v; + this.P = y; + this.Q = w; + this.R = C; + this.S = S; + this.a = new Set(["package-lock.json", "yarn.lock", "pnpm-lock.yaml", ".git", "node_modules", "__pycache__"]); + this.b = this.D(new B()); + this.f = this.D(new B()); + this.g = this.D(new B()); + this.onDidAddContext = this.b.event; + this.onDidRemoveContext = this.f.event; + this.onDidTriggerContextChange = this.g.event; + this.q = new ZGt({ + maxTotalBytes: 5000000, + maxNumFiles: 250 + }); + this.R.onDidRefreshServerConfig(x => { + this.q = this.R.cachedServerConfig.folderSizeLimit ?? this.q; + }); + } + getMentions(e, t, s) { + if (Gw(t)) { + const n = ov(t, s); + return (e.mentions[t]?.[n] || []).map(r => r.uuid); + } else { + return (e.mentions[t] || []).map(n => n.uuid); + } + } + async getImagesFromImageSelection({ + setContext: e, + getContext: t, + disableImageRemoval: s + }) { + const n = t().selectedImages ?? []; + return (await Promise.all(n.map(async o => { + const a = () => { + if (s) { + return; + } + const l = t().selectedImages ?? []; + this.removeContext({ + contextType: "selectedImages", + setContext: e, + getContext: t, + index: l.findIndex(c => mE("selectedImages", c, o)) + }); + }; + return this.resizeImage(o, a, 2048); + }))).filter(to); + } + async getHumanChanges(e) { + return (await e).filter(n => !this.N.shouldBlockUriFromReading(n.uri)).map(n => ({ + relativeWorkspacePath: this.w.asRelativePath(V.revive(n.uri)), + renderedDiffs: n.diffs.map(r => ({ + startLineNumber: r.startLineNumber, + endLineNumberExclusive: r.endLineNumberExclusive, + beforeContextLines: r.beforeContextLines, + removedLines: r.removedLines, + addedLines: r.addedLines, + afterContextLines: r.afterContextLines + })) + })); + } + async getNotepadsContext(e) { + try { + const t = e.notepads?.map(n => n.notepadId) ?? []; + return (await Promise.all(t.map(async n => { + const r = this.F.getNotepadData(n); + if (!r) { + return null; + } + const o = Jm(); + for (const g of Object.keys(r.context)) { + if (Gw(g)) { + o[g] = this.U(r.context[g], e[g], g); + } else if (e[g] === undefined) { + o[g] = r.context[g]; + } + } + const [a, l, c, u] = await Promise.all([this.getCodeChunks(o), this.getCommitDetailsFromPartialCommits(o.selectedCommits ?? []), this.getPullRequestDetailsFromPartialPullRequests(o.selectedPullRequests ?? []), this.getDiffDetailsFromGitDiff({ + gitDiff: o.gitDiff, + gitDiffFromBranchToMain: o.gitDiffFromBranchToMain + })]); + const h = (o.folderSelections ?? []).map(g => g.relativePath); + return { + name: r.name, + text: r.text, + attachedCodeChunks: a, + attachedFolders: h, + commits: l, + pullRequests: c, + gitDiffs: u, + images: [] + }; + }))).filter(n => to(n)); + } catch (t) { + console.error("Error in getNotepadsContext:", t); + return []; + } + } + async getComposersContext(e) { + const t = e.composers?.map(n => n.composerId) ?? []; + return (await Promise.all(t.map(async n => { + const r = await this.db(n); + try { + if (r === undefined) { + return undefined; + } else if (this.shouldUpdateConversationSummary(r.data)) { + await this.cb(n); + return new ave({ + name: r.data.name, + conversationSummary: r.data.latestConversationSummary?.summary + }); + } else { + return new ave({ + name: r.data.name, + conversationSummary: r.data.latestConversationSummary.summary + }); + } + } finally { + r?.dispose(); + } + }))).filter(to); + } + shouldUpdateConversationSummary(e) { + return e.latestConversationSummary === undefined || e.latestConversationSummary.lastBubbleId !== e.fullConversationHeadersOnly.at(-1)?.bubbleId; + } + U(e, t, s) { + if (t) { + return e.filter(n => !t.some(r => mE(s, n, r))); + } else { + return e; + } + } + async resizeImage(e, t, s = 2048) { + return une(e, t, this.y, s); + } + async getCodeChunksFromTerminalSelections(e) { + try { + return (await Promise.all(e.map(async s => { + const n = await vRs(this.C, V.from(s.uri)); + if (n !== undefined) { + return await this.getCodeChunksFromCodeSelection(n); + } + }))).filter(s => s !== undefined); + } catch (t) { + console.error(t); + return []; + } + } + async getDiffDetailsFromGitDiff({ + gitDiff: e, + gitDiffFromBranchToMain: t, + baseRef: s, + unifiedContextLines: n, + ref: r + }) { + try { + let o = []; + if (e) { + o.push(Promise.all([this.z.getGitDiff(), this.z.getUntrackedFiles()]).then(async ([a, l]) => { + if (a === undefined && (!l || l.length === 0)) { + return; + } + const c = (a || []).map(d => this.fileDiffToProtoDiff(d)); + const u = await Promise.all((l || []).map(async d => { + try { + const h = this.w.resolveRelativePath(d); + if (!this.w.getWorkspaceFolder(h)) { + console.warn(`Security check: File ${d} is outside workspace boundaries`); + return this.W(d, "File outside workspace boundaries"); + } + try { + if ((await this.y.resolve(h, { + resolveMetadata: true + })).isSymbolicLink) { + console.warn(`Security check: File ${d} is a symbolic link`); + return this.W(d, "Symbolic link"); + } + } catch { + return this.W(d, "Unable to resolve file"); + } + const p = await this.y.stat(h); + const b = 1048576; + if (p.size > b) { + console.warn(`Performance check: File ${d} exceeds size limit (${p.size} bytes)`); + return this.W(d, `Large file (${Math.round(p.size / 1024)}KB, content not shown)`); + } + const v = { + position: 0, + length: 8192 + }; + const w = (await this.y.readFile(h, v)).value.buffer; + const C = new Uint8Array(w); + if (this.fb(C)) { + return this.W(d, "Binary file"); + } + const x = { + position: 0, + length: b + }; + const E = (await this.y.readFile(h, x)).value.toString().split(` +`); + return new X4({ + from: "/dev/null", + to: d, + chunks: [new fbe({ + content: `@@ -0,0 +1,${E.length} @@ +${E.map(D => "+" + D).join(` +`)}`, + oldStart: 0, + oldLines: 0, + newStart: 1, + newLines: E.length + })] + }); + } catch (h) { + console.error(`Error processing untracked file ${d}:`, h); + return this.W(d); + } + })); + return new Sb({ + diffs: [...c, ...u], + diffType: ZI.DIFF_TO_HEAD + }); + })); + } + if (t) { + o.push(this.z.getBranchDiff({ + baseRef: s, + unifiedContextLines: n, + ref: r + }).then(a => { + if (a !== undefined) { + return new Sb({ + diffs: a.map(l => this.fileDiffToProtoDiff(l)), + diffType: ZI.DIFF_FROM_BRANCH_TO_MAIN + }); + } + })); + } + return await Promise.all(o).then(a => a.filter(l => l !== undefined)); + } catch (o) { + console.error("Error in getDiffDetailsFromGitDiff:", o); + return []; + } + } + W(e, t = "New file") { + return new X4({ + from: "/dev/null", + to: e, + chunks: [new fbe({ + content: `@@ -0,0 +1,1 @@ ++${t}: ${e}`, + oldStart: 0, + oldLines: 0, + newStart: 1, + newLines: 1 + })] + }); + } + async getCurrentBranch() { + return await this.z.getCurrentBranch(); + } + async getDefaultBranch() { + return await this.z.getDefaultBranch(); + } + async getGitUser() { + return await this.z.getGitUser(); + } + async getLastCommit() { + const e = await this.z.getLastCommits(1); + if (e.length > 0) { + return e[0]; + } else { + return undefined; + } + } + async getPullRequestDetailsFromPartialPullRequests(e) { + try { + return (await Promise.all(e.map(async s => this.z.getFullPr(s.number)))).filter(s => s !== undefined).map(s => new ldt({ + title: s.title, + body: s.body, + diff: s?.diff?.map(n => this.fileDiffToProtoDiff(n)) ?? [] + })); + } catch (t) { + console.error("Error in getPullRequestDetailsFromPartialPullRequests:", t); + return []; + } + } + async getCommitDetailsFromPartialCommits(e) { + try { + return (await Promise.all(e.map(async n => this.z.getFullCommit(n.sha)))).filter(n => n !== undefined).map(n => new iA({ + sha: n.sha, + message: n.message, + description: n.description, + diff: n.diff.map(r => this.fileDiffToProtoDiff(r)) + })); + } catch (t) { + console.error("Error in getCommitDetailsFromPartialCommits:", t); + return []; + } + } + fileDiffToProtoDiff(e) { + return new X4({ + from: e.from, + to: e.to, + chunks: e.chunks.map(t => new fbe({ + content: t.content, + lines: t.changes.map(s => s.content), + oldStart: t.oldStart, + oldLines: t.oldLines, + newStart: t.newStart, + newLines: t.newLines + })) + }); + } + async getCodeChunks(e, t) { + const s = e.fileSelections; + const n = e.selections; + const r = e.folderSelections ?? []; + const o = e.terminalFiles ?? []; + const a = e.terminalSelections ?? []; + return (await Promise.all([(await Promise.all(n.map(u => this.getCodeChunksFromCodeSelection(u)))).filter(to), this.getCodeChunksFromFileSelections(s, { + ...t, + context: e + }), await this.getCodeChunksFromFolders(r, t), (await Promise.all(a.map(u => this.getCodeChunksFromCodeSelection(u)))).filter(to), this.getCodeChunksFromTerminalSelections(o)])).flat().filter(to); + } + async getCodeChunksFromFileSelections(e, t) { + try { + return (await Promise.allSettled(e.map(async n => { + const r = V.revive(n.uri); + const o = t?.worktreePath ? this.getWorktreeUri(r, t.worktreePath) : r; + if (this.Q.getModel(o)) { + const l = await HGt(this.t, this.u, { + ...n, + uri: o + }); + if (l === undefined) { + return; + } + const u = (t?.context ? this.getMentions(t.context, "fileSelections", n) : []).length > 0 ? Xp.MENTIONED_FILE : Xp.COMPOSER_FILE; + return await this.getCodeChunksFromCodeSelection({ + ...l, + uri: n.uri + }, { + intent: u + }); + } + let a = []; + try { + a = (await this.y.readFile(o)).value.toString().split(` +`); + } catch (l) { + console.error(l); + } + if (a.length !== 0) { + return await this.getCodeChunksFromFileContent(r, a, { + context: t?.context, + summarizationStrategy: n.summarizationStrategy, + isFromFolder: t?.isFromFolder + }); + } + }))).filter(n => n.status === "fulfilled").map(n => n.value).filter(to); + } catch (s) { + console.error(s); + return []; + } + } + getWorktreeUri(e, t) { + return V.joinPath(V.file(t), this.w.asRelativePath(e)); + } + async getCodeChunksFromCodeSelection(e, t) { + await new Promise(s => this.N.addOnCursorIgnoreLoadedCallback(() => s(undefined))); + if (!this.N.shouldBlockUriFromReading(V.revive(e.uri))) { + try { + const s = e?.rawText?.split(` +`) ?? [""]; + if (s.length === 0) { + return; + } + const n = Math.min(e.range.positionLineNumber, e.range.selectionStartLineNumber); + const r = this.w.asRelativePath(V.revive(e.uri)); + return new hR({ + relativeWorkspacePath: r, + startLineNumber: n, + lines: s, + summarizationStrategy: { + none: ZT.NONE_UNSPECIFIED, + embeddings: ZT.EMBEDDED, + summarized: ZT.SUMMARIZED + }[e.summarizationStrategy ?? "none"] ?? ZT.NONE_UNSPECIFIED, + intent: t?.intent ?? Xp.CODE_SELECTION + }); + } catch (s) { + console.error(s); + return; + } + } + } + async getCodeChunksFromFileContent(e, t, s) { + await new Promise(n => this.N.addOnCursorIgnoreLoadedCallback(() => n(undefined))); + if (!this.N.shouldBlockUriFromReading(e)) { + try { + const n = this.w.asRelativePath(e); + const r = { + uri: e + }; + const a = (s?.context ? this.getMentions(s.context, "fileSelections", r) : []).length > 0 ? Xp.MENTIONED_FILE : Xp.COMPOSER_FILE; + const l = s?.summarizationStrategy === "summarized" ? ZT.SUMMARIZED : s?.summarizationStrategy === "embeddings" ? ZT.EMBEDDED : ZT.NONE_UNSPECIFIED; + return new hR({ + relativeWorkspacePath: n, + startLineNumber: 1, + lines: t, + summarizationStrategy: l, + intent: a, + isOnlyIncludedFromFolder: s?.isFromFolder ?? false + }); + } catch (n) { + console.error(n); + return; + } + } + } + async getCodeChunksFromFolders(e, t) { + const s = []; + const n = await Promise.all(e.map(r => this.getCodeChunksFromFolder(r, { + ...t, + foldersTooLarge: s + }))); + if (t?.composerIdOrHandle && this.S) { + this.S.updateComposerDataSetStore(t.composerIdOrHandle, r => r("relativePathsTooLarge", s)); + } + return n.flat(); + } + async getCodeChunksFromFolder(e, t) { + const { + relativePath: s + } = e; + const n = this.w.resolveRelativePath(S1(s)); + const r = t?.worktreePath ? V.joinPath(V.file(t.worktreePath), s) : n; + const o = this.X(r); + const a = this.w.getWorkspaceFolder(n)?.uri; + const l = a === undefined ? [] : await this.X(a); + const c = L5().add(await o).add(await l); + const u = this.q.maxTotalBytes; + const d = this.q.maxNumFiles; + const h = []; + const { + totalBytes: g, + numFiles: p + } = await this.Y(r, c, h, u, d); + if (g >= u || p >= d) { + if (t?.foldersTooLarge) { + t.foldersTooLarge.push(s); + } + return []; + } else { + return await this.getCodeChunksFromFileSelections(h, { + worktreePath: t?.worktreePath, + isFromFolder: true + }); + } + } + async X(e) { + const t = V.joinPath(e, ".gitignore"); + try { + return (await this.y.readFile(t)).value.toString().split(` +`).filter(n => n.trim() !== "" && !n.startsWith("#")); + } catch { + return []; + } + } + async Y(e, t, s, n, r) { + const o = await this.y.resolve(e, { + resolveMetadata: true + }); + let a = 0; + if (o.isDirectory && o.children) { + for (const l of o.children) { + const c = V.joinPath(e, l.name); + const u = this.w.asRelativePath(c); + if (!t.ignores(u) && !this.a.has(l.name)) { + if (l.isDirectory) { + const d = await this.X(c); + t.add(d); + const { + totalBytes: h, + numFiles: g + } = await this.Y(c, t, s, n - a, r); + a += h; + } else if (await this.Z(u)) { + const d = l.size ?? 0; + a += d; + s.push({ + uri: c + }); + if (a >= n || s.length >= r) { + return { + totalBytes: a, + numFiles: s.length + }; + } + } + if (a >= n || s.length >= r) { + return { + totalBytes: a, + numFiles: s.length + }; + } + } + } + } + return { + totalBytes: a, + numFiles: s.length + }; + } + async Z(e) { + const t = this.w.resolveRelativePath(e); + const s = await this.y.resolve(t, { + resolveMetadata: true + }); + return !s.isDirectory && !s.isSymbolicLink; + } + addContext(e) { + const { + contextType: t, + value: s, + setContext: n, + mention: r, + id: o, + getContext: a, + shouldAddToUndoRedoStack: l + } = e; + if (t === "fileSelections") { + const c = s; + if (this.N.shouldBlockUriFromReading(V.revive(c.uri))) { + return; + } + } else if (t === "composers") { + const c = s.composerId; + this.cb(c); + } + if (Gw(t)) { + this.$({ + ...e, + value: { + ...s, + addedWithoutMention: r === undefined + } + }); + } else { + n(t, s); + if (r) { + n("mentions", t, c => [...(c?.filter(u => u.uuid !== r.uuid) || []), r]); + } + } + this.b.fire({ + contextType: t, + value: s, + mention: r, + index: Gw(t) ? a()[t].length - 1 : undefined, + id: o + }); + if (o && l) { + const c = this.getUndoRedoUri(o); + this.r.pushElement(new wA("Add Context", "add-context", c, () => { + const { + id: u, + shouldAddToUndoRedoStack: d, + ...h + } = e; + const g = a(); + let p; + if (Gw(t)) { + p = g[t].findIndex(b => mE(t, b, s)); + p = p === -1 ? undefined : p; + } + this.removeContext({ + ...h, + index: p + }); + }, () => { + const { + id: u, + shouldAddToUndoRedoStack: d, + ...h + } = e; + this.addContext({ + ...h + }); + })); + } + } + $(e) { + const { + contextType: t, + value: s, + setContext: n, + mention: r + } = e; + n(t, o => { + const a = o || []; + if (a.some(u => mE(t, u, s))) { + return o; + } else { + return [...a, s]; + } + }); + if (r) { + const o = ov(t, s); + n("mentions", t, o, a => [...(a?.filter(l => l.uuid !== r.uuid) || []), r]); + } + } + removeContext(e) { + const { + contextType: t, + setContext: s, + index: n, + id: r, + getContext: o, + shouldAddToUndoRedoStack: a + } = e; + const l = o(); + let c; + let u; + if (Gw(t)) { + u = l[t]?.[n]; + c = this.ab(e); + } else { + u = l[t]; + c = l.mentions[t] || []; + s(t, undefined); + s("mentions", t, []); + } + if (u !== undefined) { + this.f.fire({ + contextType: t, + value: u, + index: n, + mention: c[0], + id: r + }); + } + if (r && a) { + const d = this.getUndoRedoUri(r); + this.r.pushElement(new wA("Remove Context", "remove-context", d, () => { + const { + id: h, + shouldAddToUndoRedoStack: g, + ...p + } = e; + this.addContext({ + ...p, + value: u + }); + }, () => { + const { + id: h, + shouldAddToUndoRedoStack: g, + ...p + } = e; + const b = o(); + let v; + if (Gw(t)) { + v = b[t].findIndex(y => mE(t, y, u)); + v = v === -1 ? undefined : v; + } + this.removeContext({ + ...p, + index: v + }); + })); + } + return c; + } + ab(e) { + const { + contextType: t, + index: s, + setContext: n, + getContext: r + } = e; + let o = []; + n(t, a => { + if (!a) { + return a; + } + if (s === undefined) { + const u = a.slice(0, -1); + const d = a[a.length - 1]; + o = this.bb({ + ...e, + item: d + }); + return u; + } + const l = a.filter((u, d) => d !== s); + const c = a[s]; + o = this.bb({ + ...e, + item: c + }); + return l; + }); + return o; + } + bb(e) { + const { + contextType: t, + item: s, + setContext: n + } = e; + const r = ov(t, s); + let o = []; + n("mentions", t, r, a => a === undefined ? a : (o = a, [])); + return o; + } + removeMention(e) { + const { + setContext: t, + uuid: s, + getContext: n, + id: r + } = e; + const o = n(); + let a; + let l; + let c; + for (const [u, d] of Object.entries(o.mentions)) { + if (Gw(u)) { + for (const [h, g] of Object.entries(d)) { + if (g.findIndex(b => b.uuid === s) !== -1) { + const b = o[u]; + const v = b.findIndex(w => ov(u, w) === h); + const y = b[v]; + if (g.length === 1 && (!("addedWithoutMention" in y) || !y.addedWithoutMention)) { + a = u; + l = v; + c = y; + } else { + t("mentions", u, h, w => w?.filter(C => C.uuid !== s)); + } + break; + } + } + } else if (d.findIndex(g => g.uuid === s) !== -1) { + if (d.length === 1) { + a = u; + c = o[u]; + } else { + t("mentions", u, g => g?.filter(p => p.uuid !== s)); + } + break; + } + } + if (a) { + this.removeContext({ + contextType: a, + setContext: t, + index: l, + id: r, + getContext: n + }); + } + } + removeAllListContext(e) { + const { + contextType: t, + setContext: s, + getContext: n, + id: r, + shouldAddToUndoRedoStack: o + } = e; + const a = n(); + if (!Gw(t)) { + throw new Error(`${t} is not a list context type`); + } + const l = a[t] || []; + const c = a.mentions[t] || {}; + if (l.length === 0) { + return []; + } + const u = Object.values(c).flat(); + s(t, []); + s("mentions", t, {}); + if (r && o) { + const d = this.getUndoRedoUri(r); + this.r.pushElement(new wA("Remove All List Context", "remove-all-list-context", d, () => { + s(t, l); + s("mentions", t, c); + }, () => { + s(t, []); + s("mentions", t, {}); + })); + } + return u; + } + addAllListContext(e) { + const { + contextType: t, + values: s, + setContext: n, + getContext: r, + id: o, + shouldAddToUndoRedoStack: a + } = e; + if (!Gw(t)) { + throw new Error(`${t} is not a list context type`); + } + const l = s.filter(h => { + if (t === "fileSelections") { + const g = h; + return !this.N.shouldBlockUriFromReading(V.revive(g.uri)); + } + return true; + }); + const c = r(); + const u = c[t] ?? []; + const d = c.mentions[t] ?? {}; + n(t, l); + n("mentions", t, {}); + l.forEach((h, g) => { + this.b.fire({ + contextType: t, + value: h, + index: g + }); + }); + if (o && a) { + const h = this.getUndoRedoUri(o); + this.r.pushElement(new wA("Add All List Context", "add-all-list-context", h, () => { + n(t, u); + n("mentions", t, d); + }, () => { + n(t, l); + n("mentions", t, {}); + })); + } + } + triggerContextChange() { + this.g.fire(); + } + async getLinterErrorsForFiles(e) { + const t = []; + for (const s of e) { + const r = this.G.read({ + resource: s + }).filter(o => o.severity === sn.Error).map(o => new tzt({ + message: o.message, + source: o.source, + range: new eD({ + startPosition: { + line: ma(o.startLineNumber), + column: ma(o.startColumn) + }, + endPosition: { + line: ma(o.endLineNumber), + column: ma(o.endColumn) + } + }), + relativeWorkspacePath: this.w.asRelativePath(s) + })); + if (r.length > 0) { + const o = new xp({ + relativeWorkspacePath: this.w.asRelativePath(s), + errors: r, + fileContents: (await (await this.j()).getCurrentFileInfo(s, { + actuallyReadFromOverrideURI: true + }))?.contents + }); + t.push(o); + } + } + return t; + } + isCodeChunkEqualToSelection(e, t) { + if (e.intent !== Xp.CODE_SELECTION) { + return false; + } + const s = V.revive(t.uri); + const n = this.w.asRelativePath(s); + if (e.relativeWorkspacePath !== n) { + return false; + } + const r = e.startLineNumber; + const o = Math.min(t.range.positionLineNumber, t.range.selectionStartLineNumber); + if (r !== o) { + return false; + } + const a = e.lines.length; + const l = Math.abs(t.range.positionLineNumber - t.range.selectionStartLineNumber) + 1; + return a === l; + } + async cb(e) { + await this.M.executeCommand(Xht, e); + } + async db(e) { + return await this.M.executeCommand(Qht, e); + } + async getCurrentFileLocationData() { + try { + const e = this.P.activeTextEditorControl; + if (!e) { + return; + } + const t = await this.eb(e); + if (t) { + return { + ...t + }; + } else { + return undefined; + } + } catch { + return; + } + } + async eb(e) { + try { + if (!e) { + return; + } + const t = e.getPosition(); + if (!t) { + return; + } + const s = e.getModel(); + if (!s || !("uri" in s) || !("getLineContent" in s)) { + return; + } + const n = s.uri; + const r = this.w.asRelativePath(n); + const o = s.getLineContent(t.lineNumber); + return new tjt({ + relativeWorkspacePath: r, + lineNumber: t.lineNumber, + text: o + }); + } catch (t) { + console.error("Error in getFileLocationData:", t); + return; + } + } + fb(e) { + if (e.length === 0) { + return false; + } + for (let t = 0; t < e.length; t++) { + if (e[t] === 0) { + return true; + } + } + try { + new TextDecoder("utf-8", { + fatal: true + }).decode(e); + return false; + } catch { + return true; + } + } + async gb(e) { + try { + const t = { + position: 0, + length: 16384 + }; + const s = (await this.y.readFile(e, t)).value.buffer; + const n = new Uint8Array(s); + return this.fb(n); + } catch (t) { + console.error(`Error checking if file is binary: ${e.toString()}`, t); + return true; + } + } + getContextObjectFromPopulatedConversationMessage(e, t) { + const s = Jm(); + function n(r, o, a) { + if (!r.some(l => mE(a, l, o))) { + r.push(o); + } + } + (e.attachedCodeChunks ?? []).forEach(r => { + const o = this.w.resolveRelativePath(r.relativeWorkspacePath); + let a = "none"; + switch (r.summarizationStrategy) { + case ZT.SUMMARIZED: + a = "summarized"; + break; + case ZT.EMBEDDED: + a = "embeddings"; + break; + } + if (r.intent === Xp.CODE_SELECTION) { + const l = r.startLineNumber; + const c = r.startLineNumber + (r.lines?.length ?? 1) - 1; + const u = { + uri: o, + range: { + selectionStartLineNumber: l, + selectionStartColumn: 1, + positionLineNumber: c, + positionColumn: 1 + }, + text: (r.lines ?? []).join(` +`), + summarizationStrategy: a + }; + n(s.selections, u, "selections"); + } else if (r.intent === Xp.COMPOSER_FILE || r.intent === Xp.MENTIONED_FILE) { + const l = { + uri: o, + summarizationStrategy: a + }; + n(s.fileSelections, l, "fileSelections"); + } + }); + if (e.commits && e.commits.length > 0) { + s.selectedCommits = e.commits.map(r => ({ + sha: r.sha, + message: r.message ?? "" + })); + } + if (e.pullRequests && e.pullRequests.length > 0) { + s.selectedPullRequests = e.pullRequests.map((r, o) => ({ + id: o, + number: o, + title: r.title ?? "" + })); + } + if (e.gitDiffs && e.gitDiffs.length > 0) { + s.gitDiff = e.gitDiffs.some(r => r.diffType === ZI.DIFF_TO_HEAD); + s.gitDiffFromBranchToMain = e.gitDiffs.some(r => r.diffType === ZI.DIFF_FROM_BRANCH_TO_MAIN); + } + if (e.documentationSelections) { + s.selectedDocs = e.documentationSelections; + } + if (e.externalLinks) { + s.externalLinks = e.externalLinks; + } + if (e.useWeb !== undefined) { + s.useWeb = e.useWeb; + } + return s; + } + }; + Xgt = __decorate([__param(0, Hh), __param(1, ns), __param(2, vE), __param(3, kt), __param(4, Ct), __param(5, ny), __param(6, rc), __param(7, M5), __param(8, Nu), __param(9, aC), __param(10, _i), __param(11, sy), __param(12, re), __param(13, gt), __param(14, tp), __param(15, FU), __param(16, Te), __param(17, $s), __param(18, Qw), __param(19, ia)], Xgt); + } +}); +var uC; +var yS = ue({ + "out-build/vs/workbench/services/selectedContext/browser/selectedContext.js"() { + "use strict"; + + te(); + It(); + Gor(); + uC = Ve("selectedContextService"); + it(uC, Xgt, 1); + } +}); +var ZOs = {}; +MUi(ZOs, { + $7_b: () => Dwe, + $8_b: () => Twe +}); +var Dwe; +var Twe; +var JYt = ue({ + "out-build/vs/workbench/services/ai/browser/aiFileInfoService.js"() { + "use strict"; + + te(); + Le(); + ii(); + yt(); + Wo(); + wR(); + Ms(); + It(); + vt(); + q(); + Nn(); + At(); + ar(); + ja(); + Rs(); + wa(); + Sm(); + N5(); + te(); + yS(); + em(); + pA(); + Dwe = Ve("aiFileInfoService"); + Twe = class extends H { + constructor(e, t, s, n, r, o, a) { + super(); + this.b = e; + this.f = t; + this.h = s; + this.j = n; + this.m = r; + this.n = o; + this.q = a; + this.t = []; + this.u = false; + this._setupActiveGroupTracking(); + } + get r() { + this.a ||= this.n.invokeFunction(e => e.get(uC)); + return this.a; + } + get controlProvider() { + return this.s; + } + registerControlProvider(e, t) { + if (this.s) { + throw new Error("ControlProvider already registered"); + } + this.s = t; + return Ue(() => { + this.s = undefined; + }); + } + async getCurrentFileInfo(e, t) { + if (t?.actuallyReadFromOverrideURI === true && e !== undefined) { + if (this.q.shouldBlockUriFromReading(e)) { + return; + } + let a; + try { + a = await this.j.createModelReference(e); + const l = a.object.textEditorModel; + const c = l.getValue(); + const u = l.getLanguageIdAtPosition(1, 1) ?? ""; + return new tu({ + cursorPosition: undefined, + selection: undefined, + relativeWorkspacePath: this.f.asRelativePath(e), + contents: c, + contentsStartAtLine: 1, + languageId: u, + alternativeVersionId: l.getAlternativeVersionId(), + totalNumberOfLines: l.getLineCount(), + workspaceRootPath: this.f.getWorkspaceFolder(e)?.uri.fsPath ?? "" + }); + } finally { + a?.dispose(); + } + } + const s = this.getCurrentFileInfoSyncWithoutDataframes(e); + if (s === undefined) { + return s; + } + if (s.relativeWorkspacePath === "") { + return; + } + const n = s.relativeWorkspacePath; + const r = n.match(/^[a-zA-Z]:\\/) ? V.file(n) : this.f.resolveRelativePath(S1(n)); + if (this.q.shouldBlockUriFromReading(r)) { + return; + } + let o = await this.getDataframesFromNotebook(); + o ||= []; + s.dataframes = o; + s.contents = await this.h.cleanText(s.contents, s.relativeWorkspacePath); + return s; + } + async getDataframesFromNotebook() { + const e = this.m.activeEditorPane?.input?.resource; + if (!e || !e.path.endsWith(".ipynb")) { + return; + } + if (!e) { + return []; + } + const t = await this.controlProvider?.getDataframeSummary(e); + if (t) { + return t.map(s => new put({ + name: s.name, + shape: s.shape, + dataDimensionality: s.dataDimensionality, + columns: s.columns.map(n => new fHt({ + key: n.key, + type: n.type + })), + rowCount: s.rowCount, + indexColumn: s.indexColumn + })); + } else { + return []; + } + } + _setupActiveGroupTracking() { + const e = t => { + if (t !== undefined) { + this.t = this.t.filter(s => s !== t); + this.t.push(t); + } + }; + this.D(this.b.mainPart.onDidLayout(() => { + if (this.u) { + return; + } + this.u = true; + const t = this.b.groups.map(s => s.id); + this.t = t.filter(s => !this.t.includes(s)).concat(this.t); + e(this.b.activeGroup.id); + })); + this.D(this.b.onDidChangeActiveGroup(t => { + e(t.id); + })); + } + getLastActiveFileEditor() { + let e = this.m.activeEditorPane; + if (e?.input?.resource && zft(e.input.resource.scheme)) { + return e; + } + for (const t of this.t.slice().reverse()) { + e = this.b.getGroup(t)?.activeEditorPane; + if (!!e?.input?.resource && !!zft(e.input.resource.scheme)) { + break; + } + } + return e; + } + getCurrentFileInfoSyncWithoutDataframes(e) { + const t = this.getLastActiveFileEditor(); + const s = t?.getControl(); + let n = e ?? vo.getOriginalUri(t?.input); + if (n?.scheme === me.aiChat) { + return; + } + const r = bl(t); + let o = ""; + let a; + let l; + let c; + if (r) { + const v = r.getCellsInRange(); + let y = r.getActiveCell()?.id; + let w = v.findIndex(D => D.id === y); + const C = v.map(D => D.getText()); + const x = v.map(D => D.model.outputs).map(D => { + const P = D.map(R => R.outputs.map(F => { + if (F.mime === "text/plain") { + return F.data.toString(); + } + if (F.mime === "application/vnd.code.notebook.error") { + const O = F.data.toString(); + let U = JSON.parse(O); + const j = U.stack.replace(/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]/g, "").replace(/\u001b\[0/g, ""); + U = { + ...U, + stack: j + }; + return JSON.stringify(U, null, 2); + } else if (F.mime === "application/vnd.code.notebook.stderr") { + return F.data.toString(); + } + return ""; + }).join(` + +`)).join(` + +`); + if (P.length > 400) { + return `${P.slice(0, 200)} +...output cropped... +${P.slice(-200)}`; + } else { + return P; + } + }); + let k = 0; + o = C.map((D, P) => { + if (D === "" || D === undefined) { + return ""; + } + const R = `in[${P}]: ${D}`; + if (x[P] === "" || x[P] === undefined) { + return R; + } + const L = `out[${P}]: ${x[P]}`; + return `${R} + +${L}`; + }).map((D, P) => { + if (P < w) { + k = k + D.split(` +`).length + 2; + } + return D; + }).join(` + +`); + n = r.textModel?.uri ?? n; + a = new je(k + 1, 1); + l = new Z(a.lineNumber, 1, a.lineNumber, 1); + } else { + const v = t?.getControl(); + a = v?.getPosition() ?? new je(1, 1); + l = v?.getSelection() ?? new Z(a.lineNumber, a.column, a.lineNumber, a.column); + if (_f(v)) { + const w = v.getModel(); + const C = w?.original.getValue(); + const S = w?.modified.getValue(); + o = `Original File: +${C} +Modified File: +${S}`; + n = w?.modified.uri; + } else if (rnr(v)) { + o = ""; + } else { + const y = v?.getModel(); + o = y?.getValue() ?? ""; + c = y?.getAlternativeVersionId(); + } + } + let u = ""; + if (no(s)) { + u = s.getModel()?.getLanguageIdAtPosition(a.lineNumber, a.column) ?? ""; + } + const d = new sv({ + line: ma(a.lineNumber - 1), + column: ma(a.column - 1) + }); + const h = new eD({ + startPosition: new sv({ + line: ma(l.startLineNumber - 1), + column: ma(l.startColumn - 1) + }), + endPosition: new sv({ + line: ma(l.endLineNumber - 1), + column: ma(l.endColumn - 1) + }) + }); + const g = o.split(` +`).length; + let p = 1; + if (o.length > 2000000) { + const y = o.split(` +`); + const w = d.line; + let C = Math.max(0, w - Math.floor(1000)); + let S = Math.min(y.length, w + Math.ceil(1000)); + if (S - C < 2000) { + if (C === 0) { + S = Math.min(y.length, C + 2000); + } else if (S === y.length) { + C = Math.max(0, S - 2000); + } + } + p = C + 1; + o = y.slice(C, S).join(` +`); + d.line -= C; + h.startPosition.line -= C; + h.endPosition.line -= C; + } + return new tu({ + cursorPosition: d, + selection: h, + relativeWorkspacePath: n ? this.f.asRelativePath(n) : "", + contents: o, + contentsStartAtLine: p, + languageId: u, + alternativeVersionId: c, + totalNumberOfLines: g + }); + } + }; + Twe = __decorate([__param(0, Hi), __param(1, kt), __param(2, vE), __param(3, ns), __param(4, Te), __param(5, re), __param(6, tp)], Twe); + it(Dwe, Twe, 1); + } +}); +var e_s = {}; +MUi(e_s, { + BrowserClient: () => o_s, + SEMANTIC_ATTRIBUTE_SENTRY_OP: () => EB, + SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN: () => kw, + SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE: () => $he, + SEMANTIC_ATTRIBUTE_SENTRY_SOURCE: () => N2, + Scope: () => R2, + addBreadcrumb: () => PB, + addEventProcessor: () => UUn, + addIntegration: () => GUn, + addTracingExtensions: () => nUn, + breadcrumbsIntegration: () => D_s, + browserApiErrorsIntegration: () => T_s, + browserProfilingIntegration: () => oBs, + browserTracingIntegration: () => Hcr, + captureConsoleIntegration: () => vHi, + captureEvent: () => SZ, + captureException: () => yBt, + captureFeedback: () => gVn, + captureMessage: () => Qst, + captureSession: () => wBt, + chromeStackLineParser: () => fXt, + contextLinesIntegration: () => Lcr, + continueTrace: () => yVi, + createTransport: () => kBt, + createUserFeedbackEnvelope: () => r_s, + debugIntegration: () => CHi, + dedupeIntegration: () => nnt, + defaultRequestInstrumentationOptions: () => _we, + defaultStackParser: () => dBs, + endSession: () => qhe, + eventFromException: () => s_s, + eventFromMessage: () => n_s, + exceptionFromError: () => Qgt, + extraErrorDataIntegration: () => PHi, + forceLoad: () => acr, + functionToStringIntegration: () => ent, + getActiveSpan: () => WC, + getClient: () => ru, + getCurrentHub: () => GHi, + getCurrentScope: () => ju, + getDefaultIntegrations: () => hBs, + getGlobalScope: () => QWi, + getIsolationScope: () => gm, + getRootSpan: () => Ew, + getSpanDescendants: () => _he, + getSpanStatusFromHttpCode: () => tVi, + globalHandlersIntegration: () => L_s, + httpClientIntegration: () => mcr, + httpContextIntegration: () => M_s, + inboundFiltersIntegration: () => int, + init: () => fBs, + instrumentOutgoingRequests: () => V_s, + isInitialized: () => BUn, + lastEventId: () => $Vi, + linkedErrorsIntegration: () => gXt, + makeRendererTransport: () => uBs, + metrics: () => Eur, + moduleMetadataIntegration: () => fHi, + onLoad: () => lcr, + parameterize: () => aWn, + registerSpanErrorInstrumentation: () => Q_t, + reportingObserverIntegration: () => fcr, + rewriteFramesIntegration: () => RHi, + scopeToMainIntegration: () => cBs, + sessionTimingIntegration: () => AHi, + setContext: () => PVi, + setCurrentClient: () => JVi, + setExtra: () => RVi, + setExtras: () => LVi, + setHttpStatus: () => J_t, + setMeasurement: () => dVi, + setTag: () => MVi, + setTags: () => NVi, + setUser: () => AVi, + showReportDialog: () => ocr, + spanToBaggageHeader: () => aUn, + spanToJSON: () => ed, + spanToTraceHeader: () => K_t, + startBrowserTracingNavigationSpan: () => z_s, + startBrowserTracingPageLoadSpan: () => j_s, + startInactiveSpan: () => TB, + startNewTrace: () => yUn, + startSession: () => Zst, + startSpan: () => bUn, + startSpanManual: () => dBt, + suppressTracing: () => vUn, + thirdPartyErrorFilterIntegration: () => BHi, + withActiveSpan: () => Uhe, + withIsolationScope: () => X7n, + withScope: () => CL, + zodErrorsIntegration: () => _Hi +}); +zu(); +zu(); +zu(); +qr(); +var ll = Bu; +var GYt = 0; +function t_s() { + return GYt > 0; +} +function Kor() { + GYt++; + setTimeout(() => { + GYt--; + }); +} +function mne(i, e = {}, t) { + if (typeof i != "function") { + return i; + } + try { + const n = i.__sentry_wrapped__; + if (n) { + if (typeof n == "function") { + return n; + } else { + return i; + } + } + if (k_t(i)) { + return i; + } + } catch { + return i; + } + const s = function () { + const n = Array.prototype.slice.call(arguments); + try { + if (t && typeof t == "function") { + t.apply(this, arguments); + } + const r = n.map(o => mne(o, e)); + return i.apply(this, r); + } catch (r) { + Kor(); + CL(o => { + o.addEventProcessor(a => { + if (e.mechanism) { + F_t(a, undefined, undefined); + yq(a, e.mechanism); + } + a.extra = { + ...a.extra, + arguments: n + }; + return a; + }); + yBt(r); + }); + throw r; + } + }; + try { + for (const n in i) { + if (Object.prototype.hasOwnProperty.call(i, n)) { + s[n] = i[n]; + } + } + } catch {} + YUi(s, i); + pT(i, "__sentry_wrapped__", s); + try { + if (Object.getOwnPropertyDescriptor(s, "name").configurable) { + Object.defineProperty(s, "name", { + get() { + return i.name; + } + }); + } + } catch {} + return s; +} +zu(); +zu(); +qr(); +var Dd = false; +zu(); +qr(); +function Qgt(i, e) { + const t = YYt(i, e); + const s = { + type: ear(e), + value: tar(e) + }; + if (t.length) { + s.stacktrace = { + frames: t + }; + } + if (s.type === undefined && s.value === "") { + s.value = "Unrecoverable error caught"; + } + return s; +} +function Yor(i, e, t, s) { + const n = ru(); + const r = n && n.getOptions().normalizeDepth; + const o = nar(e); + const a = { + __serialized__: mWi(e, r) + }; + if (o) { + return { + exception: { + values: [Qgt(i, o)] + }, + extra: a + }; + } + const l = { + exception: { + values: [{ + type: Nst(e) ? e.constructor.name : s ? "UnhandledRejection" : "Error", + value: iar(e, { + isUnhandledRejection: s + }) + }] + }, + extra: a + }; + if (t) { + const c = YYt(i, t); + if (c.length) { + l.exception.values[0].stacktrace = { + frames: c + }; + } + } + return l; +} +function KYt(i, e) { + return { + exception: { + values: [Qgt(i, e)] + } + }; +} +function YYt(i, e) { + const t = e.stacktrace || e.stack || ""; + const s = Qor(e); + const n = Zor(e); + try { + return i(t, s, n); + } catch {} + return []; +} +var Xor = /Minified React error #\d+;/i; +function Qor(i) { + if (i && Xor.test(i.message)) { + return 1; + } else { + return 0; + } +} +function Zor(i) { + if (typeof i.framesToPop == "number") { + return i.framesToPop; + } else { + return 0; + } +} +function i_s(i) { + if (typeof WebAssembly !== "undefined" && typeof WebAssembly.Exception !== "undefined") { + return i instanceof WebAssembly.Exception; + } else { + return false; + } +} +function ear(i) { + const e = i && i.name; + if (!e && i_s(i)) { + if (i.message && Array.isArray(i.message) && i.message.length == 2) { + return i.message[0]; + } else { + return "WebAssembly.Exception"; + } + } else { + return e; + } +} +function tar(i) { + const e = i && i.message; + if (e) { + if (e.error && typeof e.error.message == "string") { + return e.error.message; + } else if (i_s(i) && Array.isArray(i.message) && i.message.length == 2) { + return i.message[1]; + } else { + return e; + } + } else { + return "No error message"; + } +} +function s_s(i, e, t, s) { + const n = t && t.syntheticException || undefined; + const r = XYt(i, e, n, s); + yq(r); + r.level = "error"; + if (t && t.event_id) { + r.event_id = t.event_id; + } + return wq(r); +} +function n_s(i, e, t = "info", s, n) { + const r = s && s.syntheticException || undefined; + const o = QYt(i, e, r, n); + o.level = t; + if (s && s.event_id) { + o.event_id = s.event_id; + } + return wq(o); +} +function XYt(i, e, t, s, n) { + let r; + if (AUi(e) && e.error) { + return KYt(i, e.error); + } + if ($Ui(e) || t9n(e)) { + const o = e; + if ("stack" in e) { + r = KYt(i, e); + } else { + const a = o.name || ($Ui(o) ? "DOMError" : "DOMException"); + const l = o.message ? `${a}: ${o.message}` : a; + r = QYt(i, l, t, s); + F_t(r, l); + } + if ("code" in o) { + r.tags = { + ...r.tags, + "DOMException.code": `${o.code}` + }; + } + return r; + } + if (B3(e)) { + return KYt(i, e); + } else if (U3(e) || Nst(e)) { + r = Yor(i, e, t, n); + yq(r, { + synthetic: true + }); + return r; + } else { + r = QYt(i, e, t, s); + F_t(r, `${e}`, undefined); + yq(r, { + synthetic: true + }); + return r; + } +} +function QYt(i, e, t, s) { + const n = {}; + if (s && t) { + const r = YYt(i, t); + if (r.length) { + n.exception = { + values: [{ + value: e, + stacktrace: { + frames: r + } + }] + }; + } + } + if (v_t(e)) { + const { + __sentry_template_string__: r, + __sentry_template_values__: o + } = e; + n.logentry = { + message: r, + params: o + }; + return n; + } + n.message = e; + return n; +} +function iar(i, { + isUnhandledRejection: e +}) { + const t = y9n(i); + const s = e ? "promise rejection" : "exception"; + if (AUi(i)) { + return `Event \`ErrorEvent\` captured as ${s} with message \`${i.message}\``; + } else if (Nst(i)) { + return `Event \`${sar(i)}\` (type=${i.type}) captured as ${s}`; + } else { + return `Object captured as ${s} with keys: ${t}`; + } +} +function sar(i) { + try { + const e = Object.getPrototypeOf(i); + if (e) { + return e.constructor.name; + } else { + return undefined; + } + } catch {} +} +function nar(i) { + for (const e in i) { + if (Object.prototype.hasOwnProperty.call(i, e)) { + const t = i[e]; + if (t instanceof Error) { + return t; + } + } + } +} +qr(); +function r_s(i, { + metadata: e, + tunnel: t, + dsn: s +}) { + const n = { + event_id: i.event_id, + sent_at: new Date().toISOString(), + ...(e && e.sdk && { + sdk: { + name: e.sdk.name, + version: e.sdk.version + } + }), + ...(!!t && !!s && { + dsn: hZ(s) + }) + }; + const r = rar(i); + return gZ(n, [r]); +} +function rar(i) { + return [{ + type: "user_report" + }, i]; +} +var o_s = class extends qVi { + constructor(i) { + const e = { + parentSpanIsAlwaysRootSpan: true, + ...i + }; + const t = ll.SENTRY_SDK_SOURCE || _9n(); + cWn(e, "browser", ["browser"], t); + super(e); + if (e.sendClientReports && ll.document) { + ll.document.addEventListener("visibilitychange", () => { + if (ll.document.visibilityState === "hidden") { + this._flushOutcomes(); + } + }); + } + } + eventFromException(i, e) { + return s_s(this._options.stackParser, i, e, this._options.attachStacktrace); + } + eventFromMessage(i, e = "info", t) { + return n_s(this._options.stackParser, i, e, t, this._options.attachStacktrace); + } + captureUserFeedback(i) { + if (!this._isEnabled()) { + if (Dd) { + tr.warn("SDK not enabled, will not capture user feedback."); + } + return; + } + const e = r_s(i, { + metadata: this.getSdkMetadata(), + dsn: this.getDsn(), + tunnel: this.getOptions().tunnel + }); + this.sendEnvelope(e); + } + _prepareEvent(i, e, t) { + i.platform = i.platform || "javascript"; + return super._prepareEvent(i, e, t); + } +}; +qr(); +var oP = false; +var oar = (i, e) => i > e[1] ? "poor" : i > e[0] ? "needs-improvement" : "good"; +var bne = (i, e, t, s) => { + let n; + let r; + return o => { + if (e.value >= 0 && (o || s)) { + r = e.value - (n || 0); + if (r || n === undefined) { + n = e.value; + e.delta = r; + e.rating = oar(e.value, t); + i(e); + } + } + }; +}; +qr(); +var cu = Bu; +var aar = () => `v3-${Date.now()}-${Math.floor(Math.random() * 8999999999999) + 1000000000000}`; +var Pwe = () => cu.performance && performance.getEntriesByType && performance.getEntriesByType("navigation")[0]; +var Lwe = () => { + const i = Pwe(); + return i && i.activationStart || 0; +}; +var vne = (i, e) => { + const t = Pwe(); + let s = "navigate"; + if (t) { + if (cu.document && cu.document.prerendering || Lwe() > 0) { + s = "prerender"; + } else if (cu.document && cu.document.wasDiscarded) { + s = "restore"; + } else if (t.type) { + s = t.type.replace(/_/g, "-"); + } + } + return { + name: i, + value: typeof e === "undefined" ? -1 : e, + rating: "good", + delta: 0, + entries: [], + id: aar(), + navigationType: s + }; +}; +var eG = (i, e, t) => { + try { + if (PerformanceObserver.supportedEntryTypes.includes(i)) { + const s = new PerformanceObserver(n => { + Promise.resolve().then(() => { + e(n.getEntries()); + }); + }); + s.observe(Object.assign({ + type: i, + buffered: true + }, t || {})); + return s; + } + } catch {} +}; +var Rwe = i => { + const e = t => { + if (t.type === "pagehide" || cu.document && cu.document.visibilityState === "hidden") { + i(t); + } + }; + if (cu.document) { + addEventListener("visibilitychange", e, true); + addEventListener("pagehide", e, true); + } +}; +var ZYt = i => { + let e = false; + return t => { + if (!e) { + i(t); + e = true; + } + }; +}; +var Nwe = -1; +var lar = () => { + Nwe = cu.document.visibilityState === "hidden" && !cu.document.prerendering ? 0 : Infinity; +}; +var Zgt = i => { + if (cu.document.visibilityState === "hidden" && Nwe > -1) { + Nwe = i.type === "visibilitychange" ? i.timeStamp : 0; + removeEventListener("visibilitychange", Zgt, true); + removeEventListener("prerenderingchange", Zgt, true); + } +}; +var car = () => { + addEventListener("visibilitychange", Zgt, true); + addEventListener("prerenderingchange", Zgt, true); +}; +var ept = () => { + if (cu.document && Nwe < 0) { + lar(); + car(); + } + return { + get firstHiddenTime() { + return Nwe; + } + }; +}; +var Mwe = i => { + if (cu.document && cu.document.prerendering) { + addEventListener("prerenderingchange", () => i(), true); + } else { + i(); + } +}; +var uar = [1800, 3000]; +var dar = (i, e = {}) => { + Mwe(() => { + const t = ept(); + const s = vne("FCP"); + let n; + const o = eG("paint", a => { + a.forEach(l => { + if (l.name === "first-contentful-paint") { + o.disconnect(); + if (l.startTime < t.firstHiddenTime) { + s.value = Math.max(l.startTime - Lwe(), 0); + s.entries.push(l); + n(true); + } + } + }); + }); + if (o) { + n = bne(i, s, uar, e.reportAllChanges); + } + }); +}; +var har = [0.1, 0.25]; +var far = (i, e = {}) => { + dar(ZYt(() => { + const t = vne("CLS", 0); + let s; + let n = 0; + let r = []; + const o = l => { + l.forEach(c => { + if (!c.hadRecentInput) { + const u = r[0]; + const d = r[r.length - 1]; + if (n && u && d && c.startTime - d.startTime < 1000 && c.startTime - u.startTime < 5000) { + n += c.value; + r.push(c); + } else { + n = c.value; + r = [c]; + } + } + }); + if (n > t.value) { + t.value = n; + t.entries = r; + s(); + } + }; + const a = eG("layout-shift", o); + if (a) { + s = bne(i, t, har, e.reportAllChanges); + Rwe(() => { + o(a.takeRecords()); + s(true); + }); + setTimeout(s, 0); + } + })); +}; +var gar = [100, 300]; +var par = (i, e = {}) => { + Mwe(() => { + const t = ept(); + const s = vne("FID"); + let n; + const r = l => { + if (l.startTime < t.firstHiddenTime) { + s.value = l.processingStart - l.startTime; + s.entries.push(l); + n(true); + } + }; + const o = l => { + l.forEach(r); + }; + const a = eG("first-input", o); + n = bne(i, s, gar, e.reportAllChanges); + if (a) { + Rwe(ZYt(() => { + o(a.takeRecords()); + a.disconnect(); + })); + } + }); +}; +var a_s = 0; +var eXt = Infinity; +var tpt = 0; +var mar = i => { + i.forEach(e => { + if (e.interactionId) { + eXt = Math.min(eXt, e.interactionId); + tpt = Math.max(tpt, e.interactionId); + a_s = tpt ? (tpt - eXt) / 7 + 1 : 0; + } + }); +}; +var tXt; +var bar = () => tXt ? a_s : performance.interactionCount || 0; +var yar = () => { + if (!("interactionCount" in performance) && !tXt) { + tXt = eG("event", mar, { + type: "event", + buffered: true, + durationThreshold: 0 + }); + } +}; +var war = [200, 500]; +var Car = 0; +var l_s = () => bar() - Car; +var c_s = 10; +var F5 = []; +var iXt = {}; +var u_s = i => { + const e = F5[F5.length - 1]; + const t = iXt[i.interactionId]; + if (t || F5.length < c_s || e && i.duration > e.latency) { + if (t) { + t.entries.push(i); + t.latency = Math.max(t.latency, i.duration); + } else { + const s = { + id: i.interactionId, + latency: i.duration, + entries: [i] + }; + iXt[s.id] = s; + F5.push(s); + } + F5.sort((s, n) => n.latency - s.latency); + F5.splice(c_s).forEach(s => { + delete iXt[s.id]; + }); + } +}; +var Sar = () => { + const i = Math.min(F5.length - 1, Math.floor(l_s() / 50)); + return F5[i]; +}; +var xar = (i, e = {}) => { + Mwe(() => { + yar(); + const t = vne("INP"); + let s; + const n = o => { + o.forEach(l => { + if (l.interactionId) { + u_s(l); + } + if (l.entryType === "first-input" && !F5.some(u => u.entries.some(d => l.duration === d.duration && l.startTime === d.startTime))) { + u_s(l); + } + }); + const a = Sar(); + if (a && a.latency !== t.value) { + t.value = a.latency; + t.entries = a.entries; + s(); + } + }; + const r = eG("event", n, { + durationThreshold: e.durationThreshold ?? 40 + }); + s = bne(i, t, war, e.reportAllChanges); + if (r) { + if ("PerformanceEventTiming" in cu && "interactionId" in PerformanceEventTiming.prototype) { + r.observe({ + type: "first-input", + buffered: true + }); + } + Rwe(() => { + n(r.takeRecords()); + if (t.value < 0 && l_s() > 0) { + t.value = 0; + t.entries = []; + } + s(true); + }); + } + }); +}; +var kar = [2500, 4000]; +var d_s = {}; +var Ear = (i, e = {}) => { + Mwe(() => { + const t = ept(); + const s = vne("LCP"); + let n; + const r = a => { + const l = a[a.length - 1]; + if (l && l.startTime < t.firstHiddenTime) { + s.value = Math.max(l.startTime - Lwe(), 0); + s.entries = [l]; + n(); + } + }; + const o = eG("largest-contentful-paint", r); + if (o) { + n = bne(i, s, kar, e.reportAllChanges); + const a = ZYt(() => { + if (!d_s[s.id]) { + r(o.takeRecords()); + o.disconnect(); + d_s[s.id] = true; + n(true); + } + }); + ["keydown", "click"].forEach(l => { + if (cu.document) { + addEventListener(l, () => setTimeout(a, 0), true); + } + }); + Rwe(a); + } + }); +}; +var Iar = [800, 1800]; +var sXt = i => { + if (cu.document && cu.document.prerendering) { + Mwe(() => sXt(i)); + } else if (cu.document && cu.document.readyState !== "complete") { + addEventListener("load", () => sXt(i), true); + } else { + setTimeout(i, 0); + } +}; +var Dar = (i, e = {}) => { + const t = vne("TTFB"); + const s = bne(i, t, Iar, e.reportAllChanges); + sXt(() => { + const n = Pwe(); + if (n) { + const r = n.responseStart; + if (r <= 0 || r > performance.now()) { + return; + } + t.value = Math.max(r - Lwe(), 0); + t.entries = [n]; + s(true); + } + }); +}; +var Awe = {}; +var ipt = {}; +var h_s; +var f_s; +var g_s; +var p_s; +var m_s; +function b_s(i, e = false) { + return Fwe("cls", i, Nar, h_s, e); +} +function Tar(i, e = false) { + return Fwe("lcp", i, Aar, g_s, e); +} +function Par(i) { + return Fwe("fid", i, Mar, f_s); +} +function Lar(i) { + return Fwe("ttfb", i, $ar, p_s); +} +function Rar(i) { + return Fwe("inp", i, Far, m_s); +} +function $we(i, e) { + v_s(i, e); + if (!ipt[i]) { + Oar(i); + ipt[i] = true; + } + return y_s(i, e); +} +function yne(i, e) { + const t = Awe[i]; + if (!!t && !!t.length) { + for (const s of t) { + try { + s(e); + } catch (n) { + if (oP) { + tr.error(`Error while triggering instrumentation handler. +Type: ${i} +Name: ${xB(s)} +Error:`, n); + } + } + } + } +} +function Nar() { + return far(i => { + yne("cls", { + metric: i + }); + h_s = i; + }, { + reportAllChanges: true + }); +} +function Mar() { + return par(i => { + yne("fid", { + metric: i + }); + f_s = i; + }); +} +function Aar() { + return Ear(i => { + yne("lcp", { + metric: i + }); + g_s = i; + }, { + reportAllChanges: true + }); +} +function $ar() { + return Dar(i => { + yne("ttfb", { + metric: i + }); + p_s = i; + }); +} +function Far() { + return xar(i => { + yne("inp", { + metric: i + }); + m_s = i; + }); +} +function Fwe(i, e, t, s, n = false) { + v_s(i, e); + let r; + if (!ipt[i]) { + r = t(); + ipt[i] = true; + } + if (s) { + e({ + metric: s + }); + } + return y_s(i, e, n ? r : undefined); +} +function Oar(i) { + const e = {}; + if (i === "event") { + e.durationThreshold = 0; + } + eG(i, t => { + yne(i, { + entries: t + }); + }, e); +} +function v_s(i, e) { + Awe[i] = Awe[i] || []; + Awe[i].push(e); +} +function y_s(i, e, t) { + return () => { + if (t) { + t(); + } + const s = Awe[i]; + if (!s) { + return; + } + const n = s.indexOf(e); + if (n !== -1) { + s.splice(n, 1); + } + }; +} +function _ar(i) { + return "duration" in i; +} +zu(); +zu(); +qr(); +zu(); +zu(); +qr(); +zu(); +function nXt(i) { + return typeof i == "number" && isFinite(i); +} +function wne(i, e, t, { + ...s +}) { + const n = ed(i).start_timestamp; + if (n && n > e && typeof i.updateStartTime == "function") { + i.updateStartTime(e); + } + return Uhe(i, () => { + const r = TB({ + startTime: e, + ...s + }); + if (r) { + r.end(t); + } + return r; + }); +} +function w_s(i) { + const e = ru(); + if (!e) { + return; + } + const { + name: t, + transaction: s, + attributes: n, + startTime: r + } = i; + const { + release: o, + environment: a + } = e.getOptions(); + const l = e.getIntegrationByName("Replay"); + const c = l && l.getReplayId(); + const u = ju(); + const d = u.getUser(); + const h = d !== undefined ? d.email || d.id || d.ip_address : undefined; + let g; + try { + g = u.getScopeData().contexts.profile.profile_id; + } catch {} + const p = { + release: o, + environment: a, + user: h || undefined, + profile_id: g || undefined, + replay_id: c || undefined, + transaction: s, + "user_agent.original": cu.navigator && cu.navigator.userAgent, + ...n + }; + return TB({ + name: t, + attributes: p, + startTime: r, + experimental: { + standalone: true + } + }); +} +function rXt() { + return cu && cu.addEventListener && cu.performance; +} +function Qy(i) { + return i / 1000; +} +function Bar() { + let i = 0; + let e; + let t; + if (!War()) { + return; + } + let s = false; + function n() { + if (!s) { + s = true; + if (t) { + Uar(i, e, t); + } + r(); + } + } + const r = b_s(({ + metric: o + }) => { + const a = o.entries[o.entries.length - 1]; + if (a) { + i = o.value; + e = a; + } + }, true); + Rwe(() => { + n(); + }); + setTimeout(() => { + const a = ru()?.on("startNavigationSpan", () => { + n(); + if (a) { + a(); + } + }); + const l = WC(); + const c = l && Ew(l); + const u = c && ed(c); + if (u && u.op === "pageload") { + t = c.spanContext().spanId; + } + }, 0); +} +function Uar(i, e, t) { + if (oP) { + tr.log(`Sending CLS span (${i})`); + } + const s = Qy((GS || 0) + (e?.startTime || 0)); + const n = ju().getScopeData().transactionName; + const r = e ? pq(e.sources[0]?.node) : "Layout shift"; + const o = N0({ + [kw]: "auto.http.browser.cls", + [EB]: "ui.webvital.cls", + [jst]: e?.duration || 0, + "sentry.pageload.span_id": t + }); + const a = w_s({ + name: r, + transaction: n, + attributes: o, + startTime: s + }); + a?.addEvent("cls", { + [Fhe]: "", + [Ohe]: i + }); + a?.end(s); +} +function War() { + try { + return PerformanceObserver.supportedEntryTypes?.includes("layout-shift"); + } catch { + return false; + } +} +zu(); +qr(); +var oXt = []; +var spt = new Map(); +function Var() { + if (rXt() && GS) { + const e = Har(); + return () => { + e(); + }; + } + return () => {}; +} +var C_s = { + click: "click", + pointerdown: "click", + pointerup: "click", + mousedown: "click", + mouseup: "click", + touchstart: "click", + touchend: "click", + mouseover: "hover", + mouseout: "hover", + mouseenter: "hover", + mouseleave: "hover", + pointerover: "hover", + pointerout: "hover", + pointerenter: "hover", + pointerleave: "hover", + dragstart: "drag", + dragend: "drag", + drag: "drag", + dragenter: "drag", + dragleave: "drag", + dragover: "drag", + drop: "drag", + keydown: "press", + keyup: "press", + keypress: "press", + input: "press" +}; +function Har() { + return Rar(({ + metric: i + }) => { + if (i.value == null) { + return; + } + const e = i.entries.find(p => p.duration === i.value && C_s[p.name]); + if (!e) { + return; + } + const { + interactionId: t + } = e; + const s = C_s[e.name]; + const n = Qy(GS + e.startTime); + const r = Qy(i.value); + const o = WC(); + const a = o ? Ew(o) : undefined; + const c = (t != null ? spt.get(t) : undefined) || a; + const u = c ? ed(c).description : ju().getScopeData().transactionName; + const d = pq(e.target); + const h = N0({ + [kw]: "auto.http.browser.inp", + [EB]: `ui.interaction.${s}`, + [jst]: e.duration + }); + const g = w_s({ + name: d, + transaction: u, + attributes: h, + startTime: n + }); + g?.addEvent("inp", { + [Fhe]: "millisecond", + [Ohe]: i.value + }); + g?.end(n + r); + }); +} +function qar(i) { + const e = ({ + entries: t + }) => { + const s = WC(); + const n = s && Ew(s); + t.forEach(r => { + if (!_ar(r) || !n) { + return; + } + const o = r.interactionId; + if (o != null && !spt.has(o)) { + if (oXt.length > 10) { + const a = oXt.shift(); + spt.delete(a); + } + oXt.push(o); + spt.set(o, n); + } + }); + }; + $we("event", e); + $we("first-input", e); +} +var jar = 2147483647; +var S_s = 0; +var E1 = {}; +var dO; +var Owe; +function zar({ + recordClsStandaloneSpans: i +}) { + const e = rXt(); + if (e && GS) { + if (e.mark) { + cu.performance.mark("sentry-tracing-init"); + } + const t = Qar(); + const s = Xar(); + const n = Zar(); + const r = i ? Bar() : Yar(); + return () => { + t(); + s(); + n(); + if (r) { + r(); + } + }; + } + return () => {}; +} +function Jar() { + $we("longtask", ({ + entries: i + }) => { + if (WC()) { + for (const e of i) { + const t = Qy(GS + e.startTime); + const s = Qy(e.duration); + const n = TB({ + name: "Main UI thread blocked", + op: "ui.long-task", + startTime: t, + attributes: { + [kw]: "auto.ui.browser.metrics" + } + }); + if (n) { + n.end(t + s); + } + } + } + }); +} +function Gar() { + new PerformanceObserver(e => { + if (WC()) { + for (const t of e.getEntries()) { + if (!t.scripts[0]) { + continue; + } + const s = Qy(GS + t.startTime); + const n = Qy(t.duration); + const r = { + [kw]: "auto.ui.browser.metrics" + }; + const o = t.scripts[0]; + const { + invoker: a, + invokerType: l, + sourceURL: c, + sourceFunctionName: u, + sourceCharPosition: d + } = o; + r["browser.script.invoker"] = a; + r["browser.script.invoker_type"] = l; + if (c) { + r["code.filepath"] = c; + } + if (u) { + r["code.function"] = u; + } + if (d !== -1) { + r["browser.script.source_char_position"] = d; + } + const h = TB({ + name: "Main UI thread blocked", + op: "ui.long-animation-frame", + startTime: s, + attributes: r + }); + if (h) { + h.end(s + n); + } + } + } + }).observe({ + type: "long-animation-frame", + buffered: true + }); +} +function Kar() { + $we("event", ({ + entries: i + }) => { + if (WC()) { + for (const e of i) { + if (e.name === "click") { + const t = Qy(GS + e.startTime); + const s = Qy(e.duration); + const n = { + name: pq(e.target), + op: `ui.interaction.${e.name}`, + startTime: t, + attributes: { + [kw]: "auto.ui.browser.metrics" + } + }; + const r = VUi(e.target); + if (r) { + n.attributes["ui.component_name"] = r; + } + const o = TB(n); + if (o) { + o.end(t + s); + } + } + } + } + }); +} +function Yar() { + return b_s(({ + metric: i + }) => { + const e = i.entries[i.entries.length - 1]; + if (e) { + if (oP) { + tr.log(`[Measurements] Adding CLS ${i.value}`); + } + E1.cls = { + value: i.value, + unit: "" + }; + Owe = e; + } + }, true); +} +function Xar() { + return Tar(({ + metric: i + }) => { + const e = i.entries[i.entries.length - 1]; + if (e) { + if (oP) { + tr.log("[Measurements] Adding LCP"); + } + E1.lcp = { + value: i.value, + unit: "millisecond" + }; + dO = e; + } + }, true); +} +function Qar() { + return Par(({ + metric: i + }) => { + const e = i.entries[i.entries.length - 1]; + if (!e) { + return; + } + const t = Qy(GS); + const s = Qy(e.startTime); + if (oP) { + tr.log("[Measurements] Adding FID"); + } + E1.fid = { + value: i.value, + unit: "millisecond" + }; + E1["mark.fid"] = { + value: t + s, + unit: "second" + }; + }); +} +function Zar() { + return Lar(({ + metric: i + }) => { + if (i.entries[i.entries.length - 1]) { + if (oP) { + tr.log("[Measurements] Adding TTFB"); + } + E1.ttfb = { + value: i.value, + unit: "millisecond" + }; + } + }); +} +function elr(i, e) { + const t = rXt(); + if (!t || !cu.performance.getEntries || !GS) { + return; + } + if (oP) { + tr.log("[Tracing] Adding & adjusting spans using Performance API"); + } + const s = Qy(GS); + const n = t.getEntries(); + const { + op: r, + start_timestamp: o + } = ed(i); + n.slice(S_s).forEach(a => { + const l = Qy(a.startTime); + const c = Qy(Math.max(0, a.duration)); + if (r !== "navigation" || !o || !(s + l < o)) { + switch (a.entryType) { + case "navigation": + { + ilr(i, a, s); + break; + } + case "mark": + case "paint": + case "measure": + { + tlr(i, a, l, c, s); + const u = ept(); + const d = a.startTime < u.firstHiddenTime; + if (a.name === "first-paint" && d) { + if (oP) { + tr.log("[Measurements] Adding FP"); + } + E1.fp = { + value: a.startTime, + unit: "millisecond" + }; + } + if (a.name === "first-contentful-paint" && d) { + if (oP) { + tr.log("[Measurements] Adding FCP"); + } + E1.fcp = { + value: a.startTime, + unit: "millisecond" + }; + } + break; + } + case "resource": + { + nlr(i, a, a.name, l, c, s); + break; + } + default: + } + } + }); + S_s = Math.max(n.length - 1, 0); + rlr(i); + if (r === "pageload") { + alr(E1); + const a = E1["mark.fid"]; + if (a && E1.fid) { + wne(i, a.value, a.value + Qy(E1.fid.value), { + name: "first input delay", + op: "ui.action", + attributes: { + [kw]: "auto.ui.browser.metrics" + } + }); + delete E1["mark.fid"]; + } + if (!("fcp" in E1) || !e.recordClsOnPageloadSpan) { + delete E1.cls; + } + Object.entries(E1).forEach(([l, c]) => { + dVi(l, c.value, c.unit); + }); + i.setAttribute("performance.timeOrigin", s); + i.setAttribute("performance.activationStart", Lwe()); + olr(i); + } + dO = undefined; + Owe = undefined; + E1 = {}; +} +function tlr(i, e, t, s, n) { + const r = Pwe(); + const o = Qy(r ? r.requestStart : 0); + const a = n + Math.max(t, o); + const l = n + t; + const c = l + s; + const u = { + [kw]: "auto.resource.browser.metrics" + }; + if (a !== l) { + u["sentry.browser.measure_happened_before_request"] = true; + u["sentry.browser.measure_start_time"] = a; + } + wne(i, a, c, { + name: e.name, + op: e.entryType, + attributes: u + }); + return a; +} +function ilr(i, e, t) { + ["unloadEvent", "redirect", "domContentLoadedEvent", "loadEvent", "connect"].forEach(s => { + npt(i, e, s, t); + }); + npt(i, e, "secureConnection", t, "TLS/SSL", "connectEnd"); + npt(i, e, "fetch", t, "cache", "domainLookupStart"); + npt(i, e, "domainLookup", t, "DNS"); + slr(i, e, t); +} +function npt(i, e, t, s, n, r) { + const o = r ? e[r] : e[`${t}End`]; + const a = e[`${t}Start`]; + if (!!a && !!o) { + wne(i, s + Qy(a), s + Qy(o), { + op: `browser.${n || t}`, + name: e.name, + attributes: { + [kw]: "auto.ui.browser.metrics" + } + }); + } +} +function slr(i, e, t) { + const s = t + Qy(e.requestStart); + const n = t + Qy(e.responseEnd); + const r = t + Qy(e.responseStart); + if (e.responseEnd) { + wne(i, s, n, { + op: "browser.request", + name: e.name, + attributes: { + [kw]: "auto.ui.browser.metrics" + } + }); + wne(i, r, n, { + op: "browser.response", + name: e.name, + attributes: { + [kw]: "auto.ui.browser.metrics" + } + }); + } +} +function nlr(i, e, t, s, n, r) { + if (e.initiatorType === "xmlhttprequest" || e.initiatorType === "fetch") { + return; + } + const o = Cq(t); + const a = { + [kw]: "auto.resource.browser.metrics" + }; + aXt(a, e, "transferSize", "http.response_transfer_size"); + aXt(a, e, "encodedBodySize", "http.response_content_length"); + aXt(a, e, "decodedBodySize", "http.decoded_response_content_length"); + if ("renderBlockingStatus" in e) { + a["resource.render_blocking_status"] = e.renderBlockingStatus; + } + if (o.protocol) { + a["url.scheme"] = o.protocol.split(":").pop(); + } + if (o.host) { + a["server.address"] = o.host; + } + a["url.same_origin"] = t.includes(cu.location.origin); + const l = r + s; + const c = l + n; + wne(i, l, c, { + name: t.replace(cu.location.origin, ""), + op: e.initiatorType ? `resource.${e.initiatorType}` : "resource.other", + attributes: a + }); +} +function rlr(i) { + const e = cu.navigator; + if (!e) { + return; + } + const t = e.connection; + if (t) { + if (t.effectiveType) { + i.setAttribute("effectiveConnectionType", t.effectiveType); + } + if (t.type) { + i.setAttribute("connectionType", t.type); + } + if (nXt(t.rtt)) { + E1["connection.rtt"] = { + value: t.rtt, + unit: "millisecond" + }; + } + } + if (nXt(e.deviceMemory)) { + i.setAttribute("deviceMemory", `${e.deviceMemory} GB`); + } + if (nXt(e.hardwareConcurrency)) { + i.setAttribute("hardwareConcurrency", String(e.hardwareConcurrency)); + } +} +function olr(i) { + if (dO) { + if (oP) { + tr.log("[Measurements] Adding LCP Data"); + } + if (dO.element) { + i.setAttribute("lcp.element", pq(dO.element)); + } + if (dO.id) { + i.setAttribute("lcp.id", dO.id); + } + if (dO.url) { + i.setAttribute("lcp.url", dO.url.trim().slice(0, 200)); + } + i.setAttribute("lcp.size", dO.size); + } + if (Owe && Owe.sources) { + if (oP) { + tr.log("[Measurements] Adding CLS Data"); + } + Owe.sources.forEach((e, t) => i.setAttribute(`cls.source.${t + 1}`, pq(e.node))); + } +} +function aXt(i, e, t, s) { + const n = e[t]; + if (n != null && n < jar) { + i[s] = n; + } +} +function alr(i) { + const e = Pwe(); + if (!e) { + return; + } + const { + responseStart: t, + requestStart: s + } = e; + if (s <= t) { + if (oP) { + tr.log("[Measurements] Adding TTFB Request Time"); + } + i["ttfb.requestTime"] = { + value: t - s, + unit: "millisecond" + }; + } +} +qr(); +var llr = 1000; +var x_s; +var lXt; +var cXt; +function clr(i) { + const e = "dom"; + j3(e, i); + z3(e, ulr); +} +function ulr() { + if (!cu.document) { + return; + } + const i = wL.bind(null, "dom"); + const e = k_s(i, true); + cu.document.addEventListener("click", e, false); + cu.document.addEventListener("keypress", e, false); + ["EventTarget", "Node"].forEach(t => { + const s = cu[t] && cu[t].prototype; + if (!!s && !!s.hasOwnProperty && !!s.hasOwnProperty("addEventListener")) { + gT(s, "addEventListener", function (n) { + return function (r, o, a) { + if (r === "click" || r == "keypress") { + try { + const l = this; + const c = l.__sentry_instrumentation_handlers__ = l.__sentry_instrumentation_handlers__ || {}; + const u = c[r] = c[r] || { + refCount: 0 + }; + if (!u.handler) { + const d = k_s(i); + u.handler = d; + n.call(this, r, d, a); + } + u.refCount++; + } catch {} + } + return n.call(this, r, o, a); + }; + }); + gT(s, "removeEventListener", function (n) { + return function (r, o, a) { + if (r === "click" || r == "keypress") { + try { + const l = this; + const c = l.__sentry_instrumentation_handlers__ || {}; + const u = c[r]; + if (u) { + u.refCount--; + if (u.refCount <= 0) { + n.call(this, r, u.handler, a); + u.handler = undefined; + delete c[r]; + } + if (Object.keys(c).length === 0) { + delete l.__sentry_instrumentation_handlers__; + } + } + } catch {} + } + return n.call(this, r, o, a); + }; + }); + } + }); +} +function dlr(i) { + if (i.type !== lXt) { + return false; + } + try { + if (!i.target || i.target._sentryId !== cXt) { + return false; + } + } catch {} + return true; +} +function hlr(i, e) { + if (i !== "keypress") { + return false; + } else if (!e || !e.tagName) { + return true; + } else { + return e.tagName !== "INPUT" && e.tagName !== "TEXTAREA" && !e.isContentEditable; + } +} +function k_s(i, e = false) { + return t => { + if (!t || t._sentryCaptured) { + return; + } + const s = flr(t); + if (hlr(t.type, s)) { + return; + } + pT(t, "_sentryCaptured", true); + if (s && !s._sentryId) { + pT(s, "_sentryId", Vp()); + } + const n = t.type === "keypress" ? "input" : t.type; + if (!dlr(t)) { + i({ + event: t, + name: n, + global: e + }); + lXt = t.type; + cXt = s ? s._sentryId : undefined; + } + clearTimeout(x_s); + x_s = cu.setTimeout(() => { + cXt = undefined; + lXt = undefined; + }, llr); + }; +} +function flr(i) { + try { + return i.target; + } catch { + return null; + } +} +qr(); +var rpt; +function uXt(i) { + const e = "history"; + j3(e, i); + z3(e, glr); +} +function glr() { + if (!k9n()) { + return; + } + const i = cu.onpopstate; + cu.onpopstate = function (...t) { + const s = cu.location.href; + const n = rpt; + rpt = s; + wL("history", { + from: n, + to: s + }); + if (i) { + try { + return i.apply(this, t); + } catch {} + } + }; + function e(t) { + return function (...s) { + const n = s.length > 2 ? s[2] : undefined; + if (n) { + const r = rpt; + const o = String(n); + rpt = o; + wL("history", { + from: r, + to: o + }); + } + return t.apply(this, s); + }; + } + gT(cu.history, "pushState", e); + gT(cu.history, "replaceState", e); +} +qr(); +var opt = {}; +function plr(i) { + const e = opt[i]; + if (e) { + return e; + } + let t = cu[i]; + if (R_t(t)) { + return opt[i] = t.bind(cu); + } + const s = cu.document; + if (s && typeof s.createElement == "function") { + try { + const n = s.createElement("iframe"); + n.hidden = true; + s.head.appendChild(n); + const r = n.contentWindow; + if (r && r[i]) { + t = r[i]; + } + s.head.removeChild(n); + } catch (n) { + if (oP) { + tr.warn(`Could not create sandbox iframe for ${i} check, bailing to window.${i}: `, n); + } + } + } + return t && (opt[i] = t.bind(cu)); +} +function E_s(i) { + opt[i] = undefined; +} +qr(); +var tG = "__sentry_xhr_v3__"; +function dXt(i) { + const e = "xhr"; + j3(e, i); + z3(e, mlr); +} +function mlr() { + if (!cu.XMLHttpRequest) { + return; + } + const i = XMLHttpRequest.prototype; + i.open = new Proxy(i.open, { + apply(e, t, s) { + const n = Hb() * 1000; + const r = L2(s[0]) ? s[0].toUpperCase() : undefined; + const o = blr(s[1]); + if (!r || !o) { + return e.apply(t, s); + } + t[tG] = { + method: r, + url: o, + request_headers: {} + }; + if (r === "POST" && o.match(/sentry_key/)) { + t.__sentry_own_request__ = true; + } + const a = () => { + const l = t[tG]; + if (l && t.readyState === 4) { + try { + l.status_code = t.status; + } catch {} + const c = { + endTimestamp: Hb() * 1000, + startTimestamp: n, + xhr: t + }; + wL("xhr", c); + } + }; + if ("onreadystatechange" in t && typeof t.onreadystatechange == "function") { + t.onreadystatechange = new Proxy(t.onreadystatechange, { + apply(l, c, u) { + a(); + return l.apply(c, u); + } + }); + } else { + t.addEventListener("readystatechange", a); + } + t.setRequestHeader = new Proxy(t.setRequestHeader, { + apply(l, c, u) { + const [d, h] = u; + const g = c[tG]; + if (g && L2(d) && L2(h)) { + g.request_headers[d.toLowerCase()] = h; + } + return l.apply(c, u); + } + }); + return e.apply(t, s); + } + }); + i.send = new Proxy(i.send, { + apply(e, t, s) { + const n = t[tG]; + if (!n) { + return e.apply(t, s); + } + if (s[0] !== undefined) { + n.body = s[0]; + } + const r = { + startTimestamp: Hb() * 1000, + xhr: t + }; + wL("xhr", r); + return e.apply(t, s); + } + }); +} +function blr(i) { + if (L2(i)) { + return i; + } + try { + return i.toString(); + } catch {} +} +zu(); +qr(); +function vlr(i, e = plr("fetch")) { + let t = 0; + let s = 0; + function n(r) { + const o = r.body.length; + t += o; + s++; + const a = { + body: r.body, + method: "POST", + referrerPolicy: "origin", + headers: i.headers, + keepalive: t <= 60000 && s < 15, + ...i.fetchOptions + }; + if (!e) { + E_s("fetch"); + return Bst("No fetch implementation available"); + } + try { + return e(i.url, a).then(l => { + t -= o; + s--; + return { + statusCode: l.status, + headers: { + "x-sentry-rate-limits": l.headers.get("X-Sentry-Rate-Limits"), + "retry-after": l.headers.get("Retry-After") + } + }; + }); + } catch (l) { + E_s("fetch"); + t -= o; + s--; + return Bst(l); + } + } + return kBt(i, n); +} +qr(); +var ylr = 30; +var wlr = 50; +function hXt(i, e, t, s) { + const n = { + filename: i, + function: e === "" ? kB : e, + in_app: true + }; + if (t !== undefined) { + n.lineno = t; + } + if (s !== undefined) { + n.colno = s; + } + return n; +} +var Clr = /^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i; +var Slr = /^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i; +var xlr = /\((\S*)(?::(\d+))(?::(\d+))\)/; +var klr = i => { + const e = Clr.exec(i); + if (e) { + const [, s, n, r] = e; + return hXt(s, kB, +n, +r); + } + const t = Slr.exec(i); + if (t) { + if (t[2] && t[2].indexOf("eval") === 0) { + const o = xlr.exec(t[2]); + if (o) { + t[2] = o[1]; + t[3] = o[2]; + t[4] = o[3]; + } + } + const [n, r] = I_s(t[1] || kB, t[2]); + return hXt(r, n, t[3] ? +t[3] : undefined, t[4] ? +t[4] : undefined); + } +}; +var fXt = [ylr, klr]; +var Elr = /^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i; +var Ilr = /(\S+) line (\d+)(?: > eval line \d+)* > eval/i; +var Dlr = i => { + const e = Elr.exec(i); + if (e) { + if (e[3] && e[3].indexOf(" > eval") > -1) { + const r = Ilr.exec(e[3]); + if (r) { + e[1] = e[1] || "eval"; + e[3] = r[1]; + e[4] = r[2]; + e[5] = ""; + } + } + let s = e[3]; + let n = e[1] || kB; + [n, s] = I_s(n, s); + return hXt(s, n, e[4] ? +e[4] : undefined, e[5] ? +e[5] : undefined); + } +}; +var Tlr = [wlr, Dlr]; +var Plr = [fXt, Tlr]; +var Llr = eWi(...Plr); +var I_s = (i, e) => { + const t = i.indexOf("safari-extension") !== -1; + const s = i.indexOf("safari-web-extension") !== -1; + if (t || s) { + return [i.indexOf("@") !== -1 ? i.split("@")[0] : kB, t ? `safari-extension:${e}` : `safari-web-extension:${e}`]; + } else { + return [i, e]; + } +}; +zu(); +zu(); +zu(); +qr(); +zu(); +zu(); +qr(); +var apt = 1024; +var Rlr = "Breadcrumbs"; +var Nlr = (i = {}) => { + const e = { + console: true, + dom: true, + fetch: true, + history: true, + sentry: true, + xhr: true, + ...i + }; + return { + name: Rlr, + setup(t) { + if (e.console) { + iWi($lr(t)); + } + if (e.dom) { + clr(Alr(t, e.dom)); + } + if (e.xhr) { + dXt(Flr(t)); + } + if (e.fetch) { + A_t(Olr(t)); + } + if (e.history) { + uXt(_lr(t)); + } + if (e.sentry) { + t.on("beforeSendEvent", Mlr(t)); + } + } + }; +}; +var D_s = Nlr; +function Mlr(i) { + return function (t) { + if (ru() === i) { + PB({ + category: `sentry.${t.type === "transaction" ? "transaction" : "event"}`, + event_id: t.event_id, + level: t.level, + message: J3(t) + }, { + event: t + }); + } + }; +} +function Alr(i, e) { + return function (s) { + if (ru() !== i) { + return; + } + let n; + let r; + let o = typeof e == "object" ? e.serializeAttribute : undefined; + let a = typeof e == "object" && typeof e.maxStringLength == "number" ? e.maxStringLength : undefined; + if (a && a > apt) { + if (Dd) { + tr.warn(`\`dom.maxStringLength\` cannot exceed ${apt}, but a value of ${a} was configured. Sentry will use ${apt} instead.`); + } + a = apt; + } + if (typeof o == "string") { + o = [o]; + } + try { + const c = s.event; + const u = Blr(c) ? c.target : c; + n = pq(u, { + keyAttrs: o, + maxStringLength: a + }); + r = VUi(u); + } catch { + n = ""; + } + if (n.length === 0) { + return; + } + const l = { + category: `ui.${s.name}`, + message: n + }; + if (r) { + l.data = { + "ui.component_name": r + }; + } + PB(l, { + event: s.event, + name: s.name, + global: s.global + }); + }; +} +function $lr(i) { + return function (t) { + if (ru() !== i) { + return; + } + const s = { + category: "console", + data: { + arguments: t.args, + logger: "console" + }, + level: PWi(t.level), + message: Mst(t.args, " ") + }; + if (t.level === "assert") { + if (t.args[0] === false) { + s.message = `Assertion failed: ${Mst(t.args.slice(1), " ") || "console.assert"}`; + s.data.arguments = t.args.slice(1); + } else { + return; + } + } + PB(s, { + input: t.args, + level: t.level + }); + }; +} +function Flr(i) { + return function (t) { + if (ru() !== i) { + return; + } + const { + startTimestamp: s, + endTimestamp: n + } = t; + const r = t.xhr[tG]; + if (!s || !n || !r) { + return; + } + const { + method: o, + url: a, + status_code: l, + body: c + } = r; + const u = { + method: o, + url: a, + status_code: l + }; + const d = { + xhr: t.xhr, + input: c, + startTimestamp: s, + endTimestamp: n + }; + const h = UUi(l); + PB({ + category: "xhr", + data: u, + type: "http", + level: h + }, d); + }; +} +function Olr(i) { + return function (t) { + if (ru() !== i) { + return; + } + const { + startTimestamp: s, + endTimestamp: n + } = t; + if (n && (!t.fetchData.url.match(/sentry_key/) || t.fetchData.method !== "POST")) { + if (t.error) { + const r = t.fetchData; + const o = { + data: t.error, + input: t.args, + startTimestamp: s, + endTimestamp: n + }; + PB({ + category: "fetch", + data: r, + level: "error", + type: "http" + }, o); + } else { + const r = t.response; + const o = { + ...t.fetchData, + status_code: r && r.status + }; + const a = { + input: t.args, + response: r, + startTimestamp: s, + endTimestamp: n + }; + const l = UUi(o.status_code); + PB({ + category: "fetch", + data: o, + type: "http", + level: l + }, a); + } + } + }; +} +function _lr(i) { + return function (t) { + if (ru() !== i) { + return; + } + let s = t.from; + let n = t.to; + const r = Cq(ll.location.href); + let o = s ? Cq(s) : undefined; + const a = Cq(n); + if (!o || !o.path) { + o = r; + } + if (r.protocol === a.protocol && r.host === a.host) { + n = a.relative; + } + if (r.protocol === o.protocol && r.host === o.host) { + s = o.relative; + } + PB({ + category: "navigation", + data: { + from: s, + to: n + } + }); + }; +} +function Blr(i) { + return !!i && !!i.target; +} +zu(); +qr(); +var Ulr = ["EventTarget", "Window", "Node", "ApplicationCache", "AudioTrackList", "BroadcastChannel", "ChannelMergerNode", "CryptoOperation", "EventSource", "FileReader", "HTMLUnknownElement", "IDBDatabase", "IDBRequest", "IDBTransaction", "KeyOperation", "MediaController", "MessagePort", "ModalWindow", "Notification", "SVGElementInstance", "Screen", "SharedWorker", "TextTrack", "TextTrackCue", "TextTrackList", "WebSocket", "WebSocketWorker", "Worker", "XMLHttpRequest", "XMLHttpRequestEventTarget", "XMLHttpRequestUpload"]; +var Wlr = "BrowserApiErrors"; +var Vlr = (i = {}) => { + const e = { + XMLHttpRequest: true, + eventTarget: true, + requestAnimationFrame: true, + setInterval: true, + setTimeout: true, + ...i + }; + return { + name: Wlr, + setupOnce() { + if (e.setTimeout) { + gT(ll, "setTimeout", P_s); + } + if (e.setInterval) { + gT(ll, "setInterval", P_s); + } + if (e.requestAnimationFrame) { + gT(ll, "requestAnimationFrame", Hlr); + } + if (e.XMLHttpRequest && "XMLHttpRequest" in ll) { + gT(XMLHttpRequest.prototype, "send", qlr); + } + const t = e.eventTarget; + if (t) { + (Array.isArray(t) ? t : Ulr).forEach(jlr); + } + } + }; +}; +var T_s = Vlr; +function P_s(i) { + return function (...e) { + const t = e[0]; + e[0] = mne(t, { + mechanism: { + data: { + function: xB(i) + }, + handled: false, + type: "instrument" + } + }); + return i.apply(this, e); + }; +} +function Hlr(i) { + return function (e) { + return i.apply(this, [mne(e, { + mechanism: { + data: { + function: "requestAnimationFrame", + handler: xB(i) + }, + handled: false, + type: "instrument" + } + })]); + }; +} +function qlr(i) { + return function (...e) { + const t = this; + ["onload", "onerror", "onprogress", "onreadystatechange"].forEach(n => { + if (n in t && typeof t[n] == "function") { + gT(t, n, function (r) { + const o = { + mechanism: { + data: { + function: n, + handler: xB(r) + }, + handled: false, + type: "instrument" + } + }; + const a = k_t(r); + if (a) { + o.mechanism.data.handler = xB(a); + } + return mne(r, o); + }); + } + }); + return i.apply(this, e); + }; +} +function jlr(i) { + const e = ll; + const t = e[i] && e[i].prototype; + if (!!t && !!t.hasOwnProperty && !!t.hasOwnProperty("addEventListener")) { + gT(t, "addEventListener", function (s) { + return function (n, r, o) { + try { + if (typeof r.handleEvent == "function") { + r.handleEvent = mne(r.handleEvent, { + mechanism: { + data: { + function: "handleEvent", + handler: xB(r), + target: i + }, + handled: false, + type: "instrument" + } + }); + } + } catch {} + return s.apply(this, [n, mne(r, { + mechanism: { + data: { + function: "addEventListener", + handler: xB(r), + target: i + }, + handled: false, + type: "instrument" + } + }), o]); + }; + }); + gT(t, "removeEventListener", function (s) { + return function (n, r, o) { + const a = r; + try { + const l = a && a.__sentry_wrapped__; + if (l) { + s.call(this, n, l, o); + } + } catch {} + return s.call(this, n, a, o); + }; + }); + } +} +zu(); +qr(); +var zlr = "GlobalHandlers"; +var Jlr = (i = {}) => { + const e = { + onerror: true, + onunhandledrejection: true, + ...i + }; + return { + name: zlr, + setupOnce() { + Error.stackTraceLimit = 50; + }, + setup(t) { + if (e.onerror) { + Glr(t); + R_s("onerror"); + } + if (e.onunhandledrejection) { + Klr(t); + R_s("onunhandledrejection"); + } + } + }; +}; +var L_s = Jlr; +function Glr(i) { + lWi(e => { + const { + stackParser: t, + attachStacktrace: s + } = N_s(); + if (ru() !== i || t_s()) { + return; + } + const { + msg: n, + url: r, + line: o, + column: a, + error: l + } = e; + const c = Qlr(XYt(t, l || n, undefined, s, false), r, o, a); + c.level = "error"; + SZ(c, { + originalException: l, + mechanism: { + handled: false, + type: "onerror" + } + }); + }); +} +function Klr(i) { + cWi(e => { + const { + stackParser: t, + attachStacktrace: s + } = N_s(); + if (ru() !== i || t_s()) { + return; + } + const n = Ylr(e); + const r = y_t(n) ? Xlr(n) : XYt(t, n, undefined, s, true); + r.level = "error"; + SZ(r, { + originalException: n, + mechanism: { + handled: false, + type: "onunhandledrejection" + } + }); + }); +} +function Ylr(i) { + if (y_t(i)) { + return i; + } + try { + if ("reason" in i) { + return i.reason; + } + if ("detail" in i && "reason" in i.detail) { + return i.detail.reason; + } + } catch {} + return i; +} +function Xlr(i) { + return { + exception: { + values: [{ + type: "UnhandledRejection", + value: `Non-Error promise rejection captured with value: ${String(i)}` + }] + } + }; +} +function Qlr(i, e, t, s) { + const n = i.exception = i.exception || {}; + const r = n.values = n.values || []; + const o = r[0] = r[0] || {}; + const a = o.stacktrace = o.stacktrace || {}; + const l = a.frames = a.frames || []; + const c = isNaN(parseInt(s, 10)) ? undefined : s; + const u = isNaN(parseInt(t, 10)) ? undefined : t; + const d = L2(e) && e.length > 0 ? e : h9n(); + if (l.length === 0) { + l.push({ + colno: c, + filename: d, + function: kB, + in_app: true, + lineno: u + }); + } + return i; +} +function R_s(i) { + if (Dd) { + tr.log(`Global Handler attached: ${i}`); + } +} +function N_s() { + const i = ru(); + return i && i.getOptions() || { + stackParser: () => [], + attachStacktrace: false + }; +} +zu(); +var M_s = () => ({ + name: "HttpContext", + preprocessEvent(i) { + if (!ll.navigator && !ll.location && !ll.document) { + return; + } + const e = i.request && i.request.url || ll.location && ll.location.href; + const { + referrer: t + } = ll.document || {}; + const { + userAgent: s + } = ll.navigator || {}; + const n = { + ...(i.request && i.request.headers), + ...(t && { + Referer: t + }), + ...(s && { + "User-Agent": s + }) + }; + const r = { + ...i.request, + ...(e && { + url: e + }), + headers: n + }; + i.request = r; + } +}); +zu(); +qr(); +var Zlr = "cause"; +var ecr = 5; +var tcr = "LinkedErrors"; +var icr = (i = {}) => { + const e = i.limit || ecr; + const t = i.key || Zlr; + return { + name: tcr, + preprocessEvent(s, n, r) { + const o = r.getOptions(); + OUi(Qgt, o.stackParser, o.maxValueLength, t, e, s, n); + } + }; +}; +var gXt = icr; +function A_s(i) { + return [int(), ent(), T_s(), D_s(), L_s(), gXt(), nnt(), M_s()]; +} +function scr(i = {}) { + const e = { + defaultIntegrations: A_s(i), + release: typeof __SENTRY_RELEASE__ == "string" ? __SENTRY_RELEASE__ : ll.SENTRY_RELEASE && ll.SENTRY_RELEASE.id ? ll.SENTRY_RELEASE.id : undefined, + autoSessionTracking: true, + sendClientReports: true + }; + if (i.defaultIntegrations == null) { + delete i.defaultIntegrations; + } + return { + ...e, + ...i + }; +} +function ncr() { + const i = typeof ll.window !== "undefined" && ll; + if (!i) { + return false; + } + const e = i.chrome ? "chrome" : "browser"; + const t = i[e]; + const s = t && t.runtime && t.runtime.id; + const n = ll.location && ll.location.href || ""; + const r = ["chrome-extension:", "moz-extension:", "ms-browser-extension:", "safari-web-extension:"]; + const o = !!s && ll === ll.top && r.some(l => n.startsWith(`${l}//`)); + const a = typeof i.nw !== "undefined"; + return !!s && !o && !a; +} +function rcr(i = {}) { + const e = scr(i); + if (ncr()) { + dZ(() => { + console.error("[Sentry] You cannot run Sentry this way in a browser extension, check: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/"); + }); + return; + } + if (Dd) { + if (!sWi()) { + tr.warn("No Fetch API detected. The Sentry SDK requires a Fetch API compatible environment to send events. Please add a Fetch API polyfill."); + } + } + const t = { + ...e, + stackParser: C9n(e.stackParser || Llr), + integrations: zUn(e), + transport: e.transport || vlr + }; + const s = QUn(o_s, t); + if (e.autoSessionTracking) { + ccr(); + } + return s; +} +function ocr(i = {}) { + if (!ll.document) { + if (Dd) { + tr.error("Global document not defined in showReportDialog call"); + } + return; + } + const e = ju(); + const t = e.getClient(); + const s = t && t.getDsn(); + if (!s) { + if (Dd) { + tr.error("DSN not configured for showReportDialog call"); + } + return; + } + if (e) { + i.user = { + ...e.getUser(), + ...i.user + }; + } + if (!i.eventId) { + const a = $Vi(); + if (a) { + i.eventId = a; + } + } + const n = ll.document.createElement("script"); + n.async = true; + n.crossOrigin = "anonymous"; + n.src = qUn(s, i); + if (i.onLoad) { + n.onload = i.onLoad; + } + const { + onClose: r + } = i; + if (r) { + const a = l => { + if (l.data === "__sentry_reportdialog_closed__") { + try { + r(); + } finally { + ll.removeEventListener("message", a); + } + } + }; + ll.addEventListener("message", a); + } + const o = ll.document.head || ll.document.body; + if (o) { + o.appendChild(n); + } else if (Dd) { + tr.error("Not injecting report dialog. No injection point found in HTML"); + } +} +function acr() {} +function lcr(i) { + i(); +} +function ccr() { + if (typeof ll.document === "undefined") { + if (Dd) { + tr.warn("Session tracking in non-browser environment with ../browser/index is not supported."); + } + return; + } + Zst({ + ignoreDuration: true + }); + wBt(); + uXt(({ + from: i, + to: e + }) => { + if (i !== undefined && i !== e) { + Zst({ + ignoreDuration: true + }); + wBt(); + } + }); +} +zu(); +zu(); +qr(); +var ucr = Bu; +var dcr = "ReportingObserver"; +var $_s = new WeakMap(); +var hcr = (i = {}) => { + const e = i.types || ["crash", "deprecation", "intervention"]; + function t(s) { + if ($_s.has(ru())) { + for (const n of s) { + CL(r => { + r.setExtra("url", n.url); + const o = `ReportingObserver [${n.type}]`; + let a = "No details available"; + if (n.body) { + const l = {}; + for (const c in n.body) { + l[c] = n.body[c]; + } + r.setExtra("body", l); + if (n.type === "crash") { + const c = n.body; + a = [c.crashId || "", c.reason || ""].join(" ").trim() || a; + } else { + a = n.body.message || a; + } + } + Qst(`${o}: ${a}`); + }); + } + } + } + return { + name: dcr, + setupOnce() { + if (!I9n()) { + return; + } + new ucr.ReportingObserver(t, { + buffered: true, + types: e + }).observe(); + }, + setup(s) { + $_s.set(s, true); + } + }; +}; +var fcr = hcr; +zu(); +qr(); +var gcr = "HttpClient"; +var pcr = (i = {}) => { + const e = { + failedRequestStatusCodes: [[500, 599]], + failedRequestTargets: [/.*/], + ...i + }; + return { + name: gcr, + setup(t) { + kcr(t, e); + Ecr(t, e); + } + }; +}; +var mcr = pcr; +function bcr(i, e, t, s) { + if (__s(i, t.status, t.url)) { + const n = Icr(e, s); + let r; + let o; + let a; + let l; + if (U_s()) { + [r, a] = F_s("Cookie", n); + [o, l] = F_s("Set-Cookie", t); + } + const c = B_s({ + url: n.url, + method: n.method, + status: t.status, + requestHeaders: r, + responseHeaders: o, + requestCookies: a, + responseCookies: l + }); + SZ(c); + } +} +function F_s(i, e) { + const t = wcr(e.headers); + let s; + try { + const n = t[i] || t[i.toLowerCase()] || undefined; + if (n) { + s = O_s(n); + } + } catch { + if (Dd) { + tr.log(`Could not extract cookies from header ${i}`); + } + } + return [t, s]; +} +function vcr(i, e, t, s) { + if (__s(i, e.status, e.responseURL)) { + let n; + let r; + let o; + if (U_s()) { + try { + const l = e.getResponseHeader("Set-Cookie") || e.getResponseHeader("set-cookie") || undefined; + if (l) { + r = O_s(l); + } + } catch { + if (Dd) { + tr.log("Could not extract cookies from response headers"); + } + } + try { + o = Ccr(e); + } catch { + if (Dd) { + tr.log("Could not extract headers from response"); + } + } + n = s; + } + const a = B_s({ + url: e.responseURL, + method: t, + status: e.status, + requestHeaders: n, + responseHeaders: o, + responseCookies: r + }); + SZ(a); + } +} +function ycr(i) { + if (i) { + const e = i["Content-Length"] || i["content-length"]; + if (e) { + return parseInt(e, 10); + } + } +} +function O_s(i) { + return i.split("; ").reduce((e, t) => { + const [s, n] = t.split("="); + if (s && n) { + e[s] = n; + } + return e; + }, {}); +} +function wcr(i) { + const e = {}; + i.forEach((t, s) => { + e[s] = t; + }); + return e; +} +function Ccr(i) { + const e = i.getAllResponseHeaders(); + if (e) { + return e.split(`\r +`).reduce((t, s) => { + const [n, r] = s.split(": "); + if (n && r) { + t[n] = r; + } + return t; + }, {}); + } else { + return {}; + } +} +function Scr(i, e) { + return i.some(t => typeof t == "string" ? e.includes(t) : t.test(e)); +} +function xcr(i, e) { + return i.some(t => typeof t == "number" ? t === e : e >= t[0] && e <= t[1]); +} +function kcr(i, e) { + if (nWi()) { + A_t(t => { + if (ru() !== i) { + return; + } + const { + response: s, + args: n + } = t; + const [r, o] = n; + if (s) { + bcr(e, r, s, o); + } + }); + } +} +function Ecr(i, e) { + if ("XMLHttpRequest" in Bu) { + dXt(t => { + if (ru() !== i) { + return; + } + const s = t.xhr; + const n = s[tG]; + if (!n) { + return; + } + const { + method: r, + request_headers: o + } = n; + try { + vcr(e, s, r, o); + } catch (a) { + if (Dd) { + tr.warn("Error while extracting response event form XHR response", a); + } + } + }); + } +} +function __s(i, e, t) { + return xcr(i.failedRequestStatusCodes, e) && Scr(i.failedRequestTargets, t) && !sWn(t, ru()); +} +function B_s(i) { + const e = `HTTP Client Error with status code: ${i.status}`; + const t = { + message: e, + exception: { + values: [{ + type: "Error", + value: e + }] + }, + request: { + url: i.url, + method: i.method, + headers: i.requestHeaders, + cookies: i.requestCookies + }, + contexts: { + response: { + status_code: i.status, + headers: i.responseHeaders, + cookies: i.responseCookies, + body_size: ycr(i.responseHeaders) + } + } + }; + yq(t, { + type: "http.client", + handled: false + }); + return t; +} +function Icr(i, e) { + if (!e && i instanceof Request || i instanceof Request && i.bodyUsed) { + return i; + } else { + return new Request(i, e); + } +} +function U_s() { + const i = ru(); + if (i) { + return !!i.getOptions().sendDefaultPii; + } else { + return false; + } +} +zu(); +qr(); +var pXt = Bu; +var Dcr = 7; +var Tcr = "ContextLines"; +var Pcr = (i = {}) => { + const e = i.frameContextLines ?? Dcr; + return { + name: Tcr, + processEvent(t) { + return Rcr(t, e); + } + }; +}; +var Lcr = Pcr; +function Rcr(i, e) { + const t = pXt.document; + const s = pXt.location && kWi(pXt.location.href); + if (!t || !s) { + return i; + } + const n = i.exception && i.exception.values; + if (!n || !n.length) { + return i; + } + const r = t.documentElement.innerHTML; + if (!r) { + return i; + } + const o = ["", "", ...r.split(` +`), ""]; + n.forEach(a => { + const l = a.stacktrace; + if (l && l.frames) { + l.frames = l.frames.map(c => Ncr(c, o, s, e)); + } + }); + return i; +} +function Ncr(i, e, t, s) { + if (i.filename === t && !!i.lineno && !!e.length) { + W9n(e, i, s); + } + return i; +} +zu(); +zu(); +zu(); +qr(); +var W_s = new WeakMap(); +var mXt = new Map(); +var _we = { + traceFetch: true, + traceXHR: true, + enableHTTPTimings: true, + trackFetchStreamPerformance: false +}; +function V_s(i, e) { + const { + traceFetch: t, + traceXHR: s, + trackFetchStreamPerformance: n, + shouldCreateSpanForRequest: r, + enableHTTPTimings: o, + tracePropagationTargets: a + } = { + traceFetch: _we.traceFetch, + traceXHR: _we.traceXHR, + trackFetchStreamPerformance: _we.trackFetchStreamPerformance, + ...e + }; + const l = typeof r == "function" ? r : d => true; + const c = d => Fcr(d, a); + const u = {}; + if (t) { + i.addEventProcessor(d => { + if (d.type === "transaction" && d.spans) { + d.spans.forEach(h => { + if (h.op === "http.client") { + const g = mXt.get(h.span_id); + if (g) { + h.timestamp = g / 1000; + mXt.delete(h.span_id); + } + } + }); + } + return d; + }); + if (n) { + T9n(d => { + if (d.response) { + const h = W_s.get(d.response); + if (h && d.endTimestamp) { + mXt.set(h, d.endTimestamp); + } + } + }); + } + A_t(d => { + const h = lVn(d, l, c, u); + if (d.response && d.fetchData.__span) { + W_s.set(d.response, d.fetchData.__span); + } + if (h) { + const g = q_s(d.fetchData.url); + const p = g ? Cq(g).host : undefined; + h.setAttributes({ + "http.url": g, + "server.address": p + }); + } + if (o && h) { + H_s(h); + } + }); + } + if (s) { + dXt(d => { + const h = Ocr(d, l, c, u); + if (o && h) { + H_s(h); + } + }); + } +} +function Mcr(i) { + return i.entryType === "resource" && "initiatorType" in i && typeof i.nextHopProtocol == "string" && (i.initiatorType === "fetch" || i.initiatorType === "xmlhttprequest"); +} +function H_s(i) { + const { + url: e + } = ed(i).data || {}; + if (!e || typeof e != "string") { + return; + } + const t = $we("resource", ({ + entries: s + }) => { + s.forEach(n => { + if (Mcr(n) && n.name.endsWith(e)) { + $cr(n).forEach(o => i.setAttribute(...o)); + setTimeout(t); + } + }); + }); +} +function Acr(i) { + let e = "unknown"; + let t = "unknown"; + let s = ""; + for (const n of i) { + if (n === "/") { + [e, t] = i.split("/"); + break; + } + if (!isNaN(Number(n))) { + e = s === "h" ? "http" : s; + t = i.split(s)[1]; + break; + } + s += n; + } + if (s === i) { + e = s; + } + return { + name: e, + version: t + }; +} +function hO(i = 0) { + return ((GS || performance.timeOrigin) + i) / 1000; +} +function $cr(i) { + const { + name: e, + version: t + } = Acr(i.nextHopProtocol); + const s = []; + s.push(["network.protocol.version", t], ["network.protocol.name", e]); + if (GS) { + return [...s, ["http.request.redirect_start", hO(i.redirectStart)], ["http.request.fetch_start", hO(i.fetchStart)], ["http.request.domain_lookup_start", hO(i.domainLookupStart)], ["http.request.domain_lookup_end", hO(i.domainLookupEnd)], ["http.request.connect_start", hO(i.connectStart)], ["http.request.secure_connection_start", hO(i.secureConnectionStart)], ["http.request.connection_end", hO(i.connectEnd)], ["http.request.request_start", hO(i.requestStart)], ["http.request.response_start", hO(i.responseStart)], ["http.request.response_end", hO(i.responseEnd)]]; + } else { + return s; + } +} +function Fcr(i, e) { + const t = ll.location && ll.location.href; + if (t) { + let s; + let n; + try { + s = new URL(i, t); + n = new URL(t).origin; + } catch { + return false; + } + const r = s.origin === n; + if (e) { + return gq(s.toString(), e) || r && gq(s.pathname, e); + } else { + return r; + } + } else { + const s = !!i.match(/^\/(?!\/)/); + if (e) { + return gq(i, e); + } else { + return s; + } + } +} +function Ocr(i, e, t, s) { + const n = i.xhr; + const r = n && n[tG]; + if (!n || n.__sentry_own_request__ || !r) { + return; + } + const o = IB() && e(r.url); + if (i.endTimestamp && o) { + const h = n.__sentry_xhr_span_id__; + if (!h) { + return; + } + const g = s[h]; + if (g && r.status_code !== undefined) { + J_t(g, r.status_code); + g.end(); + delete s[h]; + } + return; + } + const a = q_s(r.url); + const l = a ? Cq(a).host : undefined; + const c = !!WC(); + const u = o && c ? TB({ + name: `${r.method} ${r.url}`, + attributes: { + type: "xhr", + "http.method": r.method, + "http.url": a, + url: r.url, + "server.address": l, + [kw]: "auto.http.browser", + [EB]: "http.client" + } + }) : new DB(); + n.__sentry_xhr_span_id__ = u.spanContext().spanId; + s[n.__sentry_xhr_span_id__] = u; + const d = ru(); + if (n.setRequestHeader && t(r.url) && d) { + _cr(n, d, IB() && c ? u : undefined); + } + return u; +} +function _cr(i, e, t) { + const s = ju(); + const n = gm(); + const { + traceId: r, + spanId: o, + sampled: a, + dsc: l + } = { + ...n.getPropagationContext(), + ...s.getPropagationContext() + }; + const c = t && IB() ? K_t(t) : W_t(r, o, a); + const u = U_t(l || (t ? K3(t) : Kst(r, e))); + Bcr(i, c, u); +} +function Bcr(i, e, t) { + try { + i.setRequestHeader("sentry-trace", e); + if (t) { + i.setRequestHeader(Sq, t); + } + } catch {} +} +function q_s(i) { + try { + return new URL(i, ll.location.origin).href; + } catch { + return; + } +} +zu(); +qr(); +zu(); +zu(); +qr(); +function Ucr() { + if (ll && ll.document) { + ll.document.addEventListener("visibilitychange", () => { + const i = WC(); + if (!i) { + return; + } + const e = Ew(i); + if (ll.document.hidden && e) { + const t = "cancelled"; + const { + op: s, + status: n + } = ed(e); + if (Dd) { + tr.log(`[Tracing] Transaction: ${t} -> since tab moved to the background, op: ${s}`); + } + if (!n) { + e.setStatus({ + code: Ty, + message: t + }); + } + e.setAttribute("sentry.cancellation_reason", "document.hidden"); + e.end(); + } + }); + } else if (Dd) { + tr.warn("[Tracing] Could not set up background tab detection due to lack of global document"); + } +} +var Wcr = "BrowserTracing"; +var Vcr = { + ...Vhe, + instrumentNavigation: true, + instrumentPageLoad: true, + markBackgroundSpan: true, + enableLongTask: true, + enableLongAnimationFrame: true, + enableInp: true, + _experiments: {}, + ..._we +}; +var Hcr = (i = {}) => { + Q_t(); + const { + enableInp: e, + enableLongTask: t, + enableLongAnimationFrame: s, + _experiments: { + enableInteractions: n, + enableStandaloneClsSpans: r + }, + beforeStartSpan: o, + idleTimeout: a, + finalTimeout: l, + childSpanTimeout: c, + markBackgroundSpan: u, + traceFetch: d, + traceXHR: h, + trackFetchStreamPerformance: g, + shouldCreateSpanForRequest: p, + enableHTTPTimings: b, + instrumentPageLoad: v, + instrumentNavigation: y + } = { + ...Vcr, + ...i + }; + const w = zar({ + recordClsStandaloneSpans: r || false + }); + if (e) { + Var(); + } + if (s && Bu.PerformanceObserver && PerformanceObserver.supportedEntryTypes && PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")) { + Gar(); + } else if (t) { + Jar(); + } + if (n) { + Kar(); + } + const C = { + name: undefined, + source: undefined + }; + function S(x, k) { + const E = k.op === "pageload"; + const D = o ? o(k) : k; + const P = D.attributes || {}; + if (k.name !== D.name) { + P[N2] = "custom"; + D.attributes = P; + } + C.name = D.name; + C.source = P[N2]; + const R = CVi(D, { + idleTimeout: a, + finalTimeout: l, + childSpanTimeout: c, + disableAutoFinish: E, + beforeSpanEnd: F => { + w(); + elr(F, { + recordClsOnPageloadSpan: !r + }); + } + }); + function L() { + if (["interactive", "complete"].includes(ll.document.readyState)) { + x.emit("idleSpanEnableAutoFinish", R); + } + } + if (E && ll.document) { + ll.document.addEventListener("readystatechange", () => { + L(); + }); + L(); + } + return R; + } + return { + name: Wcr, + afterAllSetup(x) { + let k; + let E = ll.location && ll.location.href; + x.on("startNavigationSpan", D => { + if (ru() === x) { + if (k && !ed(k).timestamp) { + if (Dd) { + tr.log(`[Tracing] Finishing current root span with op: ${ed(k).op}`); + } + k.end(); + } + k = S(x, { + op: "navigation", + ...D + }); + } + }); + x.on("startPageLoadSpan", (D, P = {}) => { + if (ru() !== x) { + return; + } + if (k && !ed(k).timestamp) { + if (Dd) { + tr.log(`[Tracing] Finishing current root span with op: ${ed(k).op}`); + } + k.end(); + } + const R = P.sentryTrace || J_s("sentry-trace"); + const L = P.baggage || J_s("baggage"); + const F = _Wi(R, L); + ju().setPropagationContext(F); + k = S(x, { + op: "pageload", + ...D + }); + }); + x.on("spanEnd", D => { + const P = ed(D).op; + if (D !== Ew(D) || P !== "navigation" && P !== "pageload") { + return; + } + const R = ju(); + const L = R.getPropagationContext(); + R.setPropagationContext({ + ...L, + sampled: L.sampled !== undefined ? L.sampled : Dq(D), + dsc: L.dsc || K3(D) + }); + }); + if (ll.location) { + if (v) { + j_s(x, { + name: ll.location.pathname, + startTime: GS ? GS / 1000 : undefined, + attributes: { + [N2]: "url", + [kw]: "auto.pageload.browser" + } + }); + } + if (y) { + uXt(({ + to: D, + from: P + }) => { + if (P === undefined && E && E.indexOf(D) !== -1) { + E = undefined; + return; + } + if (P !== D) { + E = undefined; + z_s(x, { + name: ll.location.pathname, + attributes: { + [N2]: "url", + [kw]: "auto.navigation.browser" + } + }); + } + }); + } + } + if (u) { + Ucr(); + } + if (n) { + qcr(a, l, c, C); + } + if (e) { + qar(); + } + V_s(x, { + traceFetch: d, + traceXHR: h, + trackFetchStreamPerformance: g, + tracePropagationTargets: x.getOptions().tracePropagationTargets, + shouldCreateSpanForRequest: p, + enableHTTPTimings: b + }); + } + }; +}; +function j_s(i, e, t) { + i.emit("startPageLoadSpan", e, t); + ju().setTransactionName(e.name); + const s = WC(); + if ((s && ed(s).op) === "pageload") { + return s; + } else { + return undefined; + } +} +function z_s(i, e) { + gm().setPropagationContext(Rhe()); + ju().setPropagationContext(Rhe()); + i.emit("startNavigationSpan", e); + ju().setTransactionName(e.name); + const t = WC(); + if ((t && ed(t).op) === "navigation") { + return t; + } else { + return undefined; + } +} +function J_s(i) { + const e = f9n(`meta[name=${i}]`); + if (e) { + return e.getAttribute("content"); + } else { + return undefined; + } +} +function qcr(i, e, t, s) { + let n; + const r = () => { + const o = "ui.action.click"; + const a = WC(); + const l = a && Ew(a); + if (l) { + const c = ed(l).op; + if (["navigation", "pageload"].includes(c)) { + if (Dd) { + tr.warn(`[Tracing] Did not create ${o} span because a pageload or navigation span is in progress.`); + } + return; + } + } + if (n) { + n.setAttribute(qst, "interactionInterrupted"); + n.end(); + n = undefined; + } + if (!s.name) { + if (Dd) { + tr.warn(`[Tracing] Did not create ${o} transaction because _latestRouteName is missing.`); + } + return; + } + n = CVi({ + name: s.name, + op: o, + attributes: { + [N2]: s.source || "url" + } + }, { + idleTimeout: i, + finalTimeout: e, + childSpanTimeout: t + }); + }; + if (ll.document) { + addEventListener("click", r, { + once: false, + capture: true + }); + } +} +zu(); +zu(); +qr(); +zu(); +qr(); +zu(); +qr(); +zu(); +qr(); +var G_s = 1000000; +var lpt = String(0); +var jcr = "main"; +var K_s = ""; +var Y_s = ""; +var X_s = ""; +var bXt = ll.navigator && ll.navigator.userAgent || ""; +var Q_s = ""; +var zcr = ll.navigator && ll.navigator.language || ll.navigator && ll.navigator.languages && ll.navigator.languages[0] || ""; +function Jcr(i) { + return typeof i == "object" && i !== null && "getHighEntropyValues" in i; +} +var Z_s = ll.navigator && ll.navigator.userAgentData; +if (Jcr(Z_s)) { + Z_s.getHighEntropyValues(["architecture", "model", "platform", "platformVersion", "fullVersionList"]).then(i => { + K_s = i.platform || ""; + X_s = i.architecture || ""; + Q_s = i.model || ""; + Y_s = i.platformVersion || ""; + if (i.fullVersionList && i.fullVersionList.length > 0) { + const e = i.fullVersionList[i.fullVersionList.length - 1]; + bXt = `${e.brand} ${e.version}`; + } + }).catch(i => {}); +} +function Gcr(i) { + return !("thread_metadata" in i); +} +function Kcr(i) { + if (Gcr(i)) { + return Qcr(i); + } else { + return i; + } +} +function Ycr(i) { + const e = i && i.contexts && i.contexts.trace && i.contexts.trace.trace_id; + if (typeof e == "string" && e.length !== 32 && Dd) { + tr.log(`[Profiling] Invalid traceId: ${e} on profiled event`); + } + if (typeof e != "string") { + return ""; + } else { + return e; + } +} +function Xcr(i, e, t, s) { + if (s.type !== "transaction") { + throw new TypeError("Profiling events may only be attached to transactions, this should never occur."); + } + if (t == null) { + throw new TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${t} instead.`); + } + const n = Ycr(s); + const r = Kcr(t); + const o = e || (typeof s.start_timestamp == "number" ? s.start_timestamp * 1000 : Hb() * 1000); + const a = typeof s.timestamp == "number" ? s.timestamp * 1000 : Hb() * 1000; + return { + event_id: i, + timestamp: new Date(o).toISOString(), + platform: "javascript", + version: "1", + release: s.release || "", + environment: s.environment || Bhe, + runtime: { + name: "javascript", + version: ll.navigator.userAgent + }, + os: { + name: K_s, + version: Y_s, + build_number: bXt + }, + device: { + locale: zcr, + model: Q_s, + manufacturer: bXt, + architecture: X_s, + is_emulator: false + }, + debug_meta: { + images: tur(t.resources) + }, + profile: r, + transactions: [{ + name: s.transaction || "", + id: s.event_id || Vp(), + trace_id: n, + active_thread_id: lpt, + relative_start_ns: "0", + relative_end_ns: ((a - o) * 1000000).toFixed(0) + }] + }; +} +function eBs(i) { + return ed(i).op === "pageload"; +} +function Qcr(i) { + let e; + let t = 0; + const s = { + samples: [], + stacks: [], + frames: [], + thread_metadata: { + [lpt]: { + name: jcr + } + } + }; + const n = i.samples[0]; + if (!n) { + return s; + } + const r = n.timestamp; + const o = typeof performance.timeOrigin == "number" ? performance.timeOrigin : GS || 0; + const a = o - (GS || o); + i.samples.forEach((l, c) => { + if (l.stackId === undefined) { + if (e === undefined) { + e = t; + s.stacks[e] = []; + t++; + } + s.samples[c] = { + elapsed_since_start_ns: ((l.timestamp + a - r) * G_s).toFixed(0), + stack_id: e, + thread_id: lpt + }; + return; + } + let u = i.stacks[l.stackId]; + const d = []; + while (u) { + d.push(u.frameId); + const g = i.frames[u.frameId]; + if (g && s.frames[u.frameId] === undefined) { + s.frames[u.frameId] = { + function: g.name, + abs_path: typeof g.resourceId == "number" ? i.resources[g.resourceId] : undefined, + lineno: g.line, + colno: g.column + }; + } + u = u.parentId === undefined ? undefined : i.stacks[u.parentId]; + } + const h = { + elapsed_since_start_ns: ((l.timestamp + a - r) * G_s).toFixed(0), + stack_id: t, + thread_id: lpt + }; + s.stacks[t] = d; + s.samples[c] = h; + t++; + }); + return s; +} +function Zcr(i, e) { + if (!e.length) { + return i; + } + for (const t of e) { + i[1].push([{ + type: "profile" + }, t]); + } + return i; +} +function eur(i) { + const e = []; + Lhe(i, (t, s) => { + if (s === "transaction") { + for (let n = 1; n < t.length; n++) { + const r = t[n]; + if (r && r.contexts && r.contexts.profile && r.contexts.profile.profile_id) { + e.push(t[n]); + } + } + } + }); + return e; +} +var tBs = new WeakMap(); +function tur(i) { + const e = Bu._sentryDebugIds; + if (!e) { + return []; + } + const t = ru(); + const s = t && t.getOptions(); + const n = s && s.stackParser; + if (!n) { + return []; + } + let r; + const o = tBs.get(n); + if (o) { + r = o; + } else { + r = new Map(); + tBs.set(n, r); + } + const a = Object.keys(e).reduce((c, u) => { + let d; + const h = r.get(u); + if (h) { + d = h; + } else { + d = n(u); + r.set(u, d); + } + for (let g = d.length - 1; g >= 0; g--) { + const p = d[g]; + const b = p && p.filename; + if (p && b) { + c[b] = e[u]; + break; + } + } + return c; + }, {}); + const l = []; + for (const c of i) { + if (c && a[c]) { + l.push({ + type: "sourcemap", + code_file: c, + debug_id: a[c] + }); + } + } + return l; +} +function iur(i) { + if (typeof i != "number" && typeof i != "boolean" || typeof i == "number" && isNaN(i)) { + if (Dd) { + tr.warn(`[Profiling] Invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(i)} of type ${JSON.stringify(typeof i)}.`); + } + return false; + } else if (i === true || i === false) { + return true; + } else if (i < 0 || i > 1) { + if (Dd) { + tr.warn(`[Profiling] Invalid sample rate. Sample rate must be between 0 and 1. Got ${i}.`); + } + return false; + } else { + return true; + } +} +function sur(i) { + if (i.samples.length < 2) { + if (Dd) { + tr.log("[Profiling] Discarding profile because it contains less than 2 samples"); + } + return false; + } else if (i.frames.length) { + return true; + } else { + if (Dd) { + tr.log("[Profiling] Discarding profile because it contains no frames"); + } + return false; + } +} +var iBs = false; +var sBs = 30000; +function nur(i) { + return typeof i == "function"; +} +function rur() { + const i = ll.Profiler; + if (!nur(i)) { + if (Dd) { + tr.log("[Profiling] Profiling is not supported by this browser, Profiler interface missing on window object."); + } + return; + } + const e = 10; + const t = Math.floor(sBs / e); + try { + return new i({ + sampleInterval: e, + maxBufferSize: t + }); + } catch { + if (Dd) { + tr.log("[Profiling] Failed to initialize the Profiling constructor, this is likely due to a missing 'Document-Policy': 'js-profiling' header."); + tr.log("[Profiling] Disabling profiling for current user session."); + } + iBs = true; + } +} +function nBs(i) { + if (iBs) { + if (Dd) { + tr.log("[Profiling] Profiling has been disabled for the duration of the current user session."); + } + return false; + } + if (!i.isRecording()) { + if (Dd) { + tr.log("[Profiling] Discarding profile because transaction was not sampled."); + } + return false; + } + const e = ru(); + const t = e && e.getOptions(); + if (!t) { + if (Dd) { + tr.log("[Profiling] Profiling disabled, no options found."); + } + return false; + } + const s = t.profilesSampleRate; + if (iur(s)) { + if (s) { + if (s === true ? true : Math.random() < s) { + return true; + } else { + if (Dd) { + tr.log(`[Profiling] Discarding profile because it's not included in the random sample (sampling rate = ${Number(s)})`); + } + return false; + } + } else { + if (Dd) { + tr.log("[Profiling] Discarding profile because a negative sampling decision was inherited or profileSampleRate is set to 0"); + } + return false; + } + } else { + if (Dd) { + tr.warn("[Profiling] Discarding profile because of invalid sample rate."); + } + return false; + } +} +function our(i, e, t, s) { + if (sur(t)) { + return Xcr(i, e, t, s); + } else { + return null; + } +} +var iG = new Map(); +function aur() { + return iG.size; +} +function lur(i) { + const e = iG.get(i); + if (e) { + iG.delete(i); + } + return e; +} +function cur(i, e) { + iG.set(i, e); + if (iG.size > 30) { + const t = iG.keys().next().value; + iG.delete(t); + } +} +function rBs(i) { + let e; + if (eBs(i)) { + e = Hb() * 1000; + } + const t = rur(); + if (!t) { + return; + } + if (Dd) { + tr.log(`[Profiling] started profiling span: ${ed(i).description}`); + } + const s = Vp(); + const n = null; + ju().setContext("profile", { + profile_id: s, + start_timestamp: e + }); + async function r() { + if (i && t) { + if (n) { + if (Dd) { + tr.log("[Profiling] profile for:", ed(i).description, "already exists, returning early"); + } + return; + } + return t.stop().then(c => { + if (o) { + ll.clearTimeout(o); + o = undefined; + } + if (Dd) { + tr.log(`[Profiling] stopped profiling of span: ${ed(i).description}`); + } + if (!c) { + if (Dd) { + tr.log(`[Profiling] profiler returned null profile for: ${ed(i).description}`, "this may indicate an overlapping span or a call to stopProfiling with a profile title that was never started"); + } + return; + } + cur(s, c); + }).catch(c => { + if (Dd) { + tr.log("[Profiling] error while stopping profiler:", c); + } + }); + } + } + let o = ll.setTimeout(() => { + if (Dd) { + tr.log("[Profiling] max profile duration elapsed, stopping profiling for:", ed(i).description); + } + r(); + }, sBs); + const a = i.end.bind(i); + function l() { + if (i) { + r().then(() => { + a(); + }, () => { + a(); + }); + return i; + } else { + return a(); + } + } + i.end = l; +} +var uur = "BrowserProfiling"; +var dur = () => ({ + name: uur, + setup(i) { + const e = WC(); + const t = e && Ew(e); + if (t && eBs(t) && nBs(t)) { + rBs(t); + } + i.on("spanStart", s => { + if (s === Ew(s) && nBs(s)) { + rBs(s); + } + }); + i.on("beforeEnvelope", s => { + if (!aur()) { + return; + } + const n = eur(s); + if (!n.length) { + return; + } + const r = []; + for (const o of n) { + const a = o && o.contexts; + const l = a && a.profile && a.profile.profile_id; + const c = a && a.profile && a.profile.start_timestamp; + if (typeof l != "string") { + if (Dd) { + tr.log("[Profiling] cannot find profile for a span without a profile context"); + } + continue; + } + if (!l) { + if (Dd) { + tr.log("[Profiling] cannot find profile for a span without a profile context"); + } + continue; + } + if (a && a.profile) { + delete a.profile; + } + const u = lur(l); + if (!u) { + if (Dd) { + tr.log(`[Profiling] Could not retrieve profile for span: ${l}`); + } + continue; + } + const d = our(l, c, u, o); + if (d) { + r.push(d); + } + } + Zcr(s, r); + }); + } +}); +var oBs = dur; +zu(); +qr(); +zu(); +function aBs() { + const i = gm().getScopeData(); + mBt(i, ju().getScopeData()); + i.eventProcessors = []; + return i; +} +function hur(i) { + gm().addScopeListener(e => { + const t = aBs(); + i(t, e); + }); + ju().addScopeListener(e => { + const t = aBs(); + i(t, e); + }); +} +qr(); +var lBs; +(function (i) { + i[i.Classic = 1] = "Classic"; + i[i.Protocol = 2] = "Protocol"; + i[i.Both = 3] = "Both"; +})(lBs ||= {}); +var fur = "sentry-ipc"; +var OU; +(function (i) { + i.RENDERER_START = "sentry-electron.renderer-start"; + i.EVENT = "sentry-electron.event"; + i.SCOPE = "sentry-electron.scope"; + i.ENVELOPE = "sentry-electron.envelope"; + i.STATUS = "sentry-electron.status"; + i.ADD_METRIC = "sentry-electron.add-metric"; +})(OU ||= {}); +var gur = "sentry-electron-renderer-id"; +function Cne(i) { + return `${fur}://${i}/sentry_key`; +} +function pur() { + if (window.__SENTRY_IPC__) { + return window.__SENTRY_IPC__; + } + { + tr.log("IPC was not configured in preload script, falling back to custom protocol and fetch"); + const i = window.__SENTRY_RENDERER_ID__ = Vp(); + const e = { + [gur]: i + }; + return { + sendRendererStart: () => { + fetch(Cne(OU.RENDERER_START), { + method: "POST", + body: "", + headers: e + }).catch(() => { + console.error(`Sentry SDK failed to establish connection with the Electron main process. + - Ensure you have initialized the SDK in the main process + - If your renderers use custom sessions, be sure to set 'getSessions' in the main process options + - If you are bundling your main process code and using Electron < v5, you'll need to manually configure a preload script`); + }); + }, + sendScope: t => { + fetch(Cne(OU.SCOPE), { + method: "POST", + body: t, + headers: e + }).catch(() => {}); + }, + sendEvent: t => { + fetch(Cne(OU.EVENT), { + method: "POST", + body: t, + headers: e + }).catch(() => {}); + }, + sendEnvelope: t => { + fetch(Cne(OU.ENVELOPE), { + method: "POST", + body: t, + headers: e + }).catch(() => {}); + }, + sendStatus: t => { + fetch(Cne(OU.STATUS), { + method: "POST", + body: JSON.stringify({ + status: t + }), + headers: e + }).catch(() => {}); + }, + sendAddMetric: t => { + fetch(Cne(OU.ADD_METRIC), { + method: "POST", + body: JSON.stringify(t), + headers: e + }).catch(() => {}); + } + }; + } +} +var cpt; +function upt() { + if (!cpt) { + cpt = pur(); + cpt.sendRendererStart(); + } + return cpt; +} +var cBs = () => ({ + name: "ScopeToMain", + setup() { + const i = upt(); + hur((e, t) => { + i.sendScope(JSON.stringify(rM(e, 20, 2000))); + t.clearBreadcrumbs(); + t.clearAttachments(); + }); + } +}); +zu(); +function uBs(i) { + const e = upt(); + return kBt(i, async t => { + e.sendEnvelope(t.body); + return { + statusCode: 200 + }; + }); +} +qr(); +function mur(i) { + const e = { + pollInterval: 1000, + anrThreshold: 5000, + captureStackTrace: false, + ...i + }; + const t = upt(); + document.addEventListener("visibilitychange", () => { + t.sendStatus({ + status: document.visibilityState, + config: e + }); + }); + t.sendStatus({ + status: document.visibilityState, + config: e + }); + setInterval(() => { + t.sendStatus({ + status: "alive", + config: e + }); + }, e.pollInterval); +} +qr(); +var bur = 50; +var [, vur] = fXt; +var [, yur] = h7n(); +var dBs = (i, e = 0) => { + const t = []; + for (const s of i.split(` +`).slice(e)) { + const n = vur(s); + const r = yur(s); + if (n && r?.in_app !== false) { + t.push(n); + } else if (r) { + t.push(N0(r)); + } + if (t.length >= bur) { + break; + } + } + return tWi(t); +}; +function hBs(i) { + return [...A_s(i), cBs()]; +} +function fBs(i = {}, e = rcr) { + if (window?.__SENTRY__RENDERER_INIT__) { + tr.warn(`The browser SDK has already been initialized. +If init has been called in the preload and contextIsolation is disabled, is not required to call init in the renderer`); + return; + } + window.__SENTRY__RENDERER_INIT__ = true; + if (i.autoSessionTracking === undefined) { + i.autoSessionTracking = false; + } + i.sendClientReports = false; + if (i.defaultIntegrations === undefined) { + i.defaultIntegrations = hBs(i); + } + if (i.stackParser === undefined) { + i.stackParser = dBs; + } + if (i.dsn === undefined) { + i.dsn = "https://12345@dummy.dsn/12345"; + } + if (i.transport === undefined) { + i.transport = uBs; + } + if (i.anrDetection) { + mur(i.anrDetection === true ? {} : i.anrDetection); + } + delete i.initialScope; + e(i); +} +zu(); +var Bwe = class { + constructor() { + this._ipc = upt(); + } + add(i, e, t, s, n, r) { + this._ipc.sendAddMetric({ + metricType: i, + name: e, + value: t, + unit: s, + tags: n, + timestamp: r + }); + } + flush() {} + close() {} + toString() { + return ""; + } +}; +function wur(i, e = 1, t) { + xZ.increment(Bwe, i, e, t); +} +function Cur(i, e, t) { + xZ.distribution(Bwe, i, e, t); +} +function Sur(i, e, t) { + xZ.set(Bwe, i, e, t); +} +function xur(i, e, t) { + xZ.gauge(Bwe, i, e, t); +} +function kur(i, e, t = "second", s) { + xZ.timing(Bwe, i, e, t, s); +} +var Eur = { + increment: wur, + distribution: Cur, + set: Sur, + gauge: xur, + timing: kur +}; +var Sne = globalThis.vscode; +var Td = Sne.ipcRenderer; +var Iur = Sne.ipcMessagePort; +var Dur = Sne.webFrame; +var mD = Sne.process; +var Fia = Sne.context; +var Oia = Sne.webUtils; +cnt(); +dc(); +function Tur() { + try { + fBs({ + ...SVn(), + integrations: [int(), oBs(), ent(), gXt(), nnt()] + }); + M0().sentry = e_s; + kHn(mD.env.CURSOR_TRACE_ID); + Pur().catch(i => { + console.error("Error with running profiler until exit", i); + }); + } catch (i) { + console.error("Failed to initialize tracing in renderer process", i); + } +} +async function Pur() { + let i = true; + mD.on("beforeExit", () => { + i = false; + }); + const e = ru()?.getOptions(); + if (e !== undefined) { + while (i) { + const t = { + stack: [], + error: undefined, + hasError: false + }; + try { + const s = M0().profilesSampleRate; + if (s === undefined || s <= 0 || Math.random() >= s) { + await new Promise(r => { + setTimeout(r, 10000); + }); + continue; + } + e.profilesSampleRate = 1; + const n = __addDisposableResource(t, Kc("continuousBackgroundSpanForProfiling", 1), false); + e.profilesSampleRate = 0; + await new Promise(r => { + setTimeout(r, 10000); + }); + } catch (s) { + t.error = s; + t.hasError = true; + } finally { + __disposeResources(t); + } + } + } +} +Tur(); +var Lur = () => { + const i = JSON.stringify; + let e = false; + function t(s, n, r) { + if (e || Math.random() >= M0().jsonStringifySampleRate) { + return i(s, n, r); + } + e = true; + let o; + const a = {}; + try { + const l = { + stack: [], + error: undefined, + hasError: false + }; + try { + try { + try { + throw new Error("test"); + } catch (h) { + o = h.stack; + } + if (o !== undefined) { + a.sourceLocation = o; + } + const d = performance; + if (d?.memory !== undefined) { + const h = d?.memory?.totalJSHeapSize; + const g = d?.memory?.usedJSHeapSize; + const p = d?.memory?.jsHeapSizeLimit; + if (h !== undefined) { + a.totalJSHeapSize = h; + } + if (g !== undefined) { + a.usedJSHeapSize = g; + } + if (p !== undefined) { + a.jsHeapSizeLimit = p; + } + } + Knt({ + category: "jsonStringifyPre", + level: "info", + message: "starting json stringify", + data: a + }); + } catch (d) { + console.error("Failed to add breadcrumb pre json stringify", d); + } + const c = __addDisposableResource(l, Kc("jsonStringify", 1), false); + for (const [d, h] of Object.entries(a)) { + c.setAttribute(d, h); + } + const u = i(s, n, r); + try { + const d = { + ...a + }; + if (typeof u == "string") { + d.serializedLength = u.length; + c.setAttribute("serializedLength", u.length); + } + Knt({ + category: "jsonStringifyPost", + level: "info", + message: "finished json stringify", + data: d + }); + } catch (d) { + console.error("Failed to add breadcrumb post json stringify", d); + } + return u; + } catch (c) { + l.error = c; + l.hasError = true; + } finally { + __disposeResources(l); + } + } finally { + e = false; + } + } + JSON.stringify = t; +}; +Lur(); +S9(); +Yg(); +He(); +xe(); +He(); +en(); +Xn(); +xe(); +qg(); +Ut(); +pe(); +hx(); +function Rur() { + return true; +} +function sG() { + return !Rur() && Ny && !!Ny.VSCODE_DEV; +} +function gBs(i) { + if (sG()) { + const e = Nur(); + e.add(i); + return { + dispose() { + e.delete(i); + } + }; + } else { + return { + dispose() {} + }; + } +} +function Nur() { + dpt ||= new Set(); + const i = globalThis; + i.$hotReload_applyNewExports ||= e => { + const t = { + config: { + mode: undefined + }, + ...e + }; + const s = []; + for (const n of dpt) { + const r = n(t); + if (r) { + s.push(r); + } + } + if (s.length > 0) { + return n => { + let r = false; + for (const o of s) { + if (o(n)) { + r = true; + } + } + return r; + }; + } + }; + return dpt; +} +var dpt = undefined; +if (sG()) { + gBs(({ + oldExports: i, + newSrc: e, + config: t + }) => { + if (t.mode === "patch-prototype") { + return s => { + for (const n in s) { + const r = s[n]; + console.log(`[hot-reload] Patching prototype methods of '${n}'`, { + exportedItem: r + }); + if (typeof r == "function" && r.prototype) { + const o = i[n]; + if (o) { + for (const a of Object.getOwnPropertyNames(r.prototype)) { + const l = Object.getOwnPropertyDescriptor(r.prototype, a); + const c = Object.getOwnPropertyDescriptor(o.prototype, a); + if (l?.value?.toString() !== c?.value?.toString()) { + console.log(`[hot-reload] Patching prototype method '${n}.${a}'`); + } + Object.defineProperty(o.prototype, a, l); + } + s[n] = o; + } + } + } + return true; + }; + } + }); +} +An(); +function bD(i, e) { + Mur([i], e); + return i; +} +function Mur(i, e) { + if (sG()) { + Wy("reload", s => gBs(({ + oldExports: n + }) => { + if ([...Object.values(n)].some(r => i.includes(r))) { + return r => { + s(undefined); + return true; + }; + } + })).read(e); + } +} +var pBs = new Map(); +function vXt(i) { + if (!sG()) { + return vb(i); + } + const e = i.name; + let t = pBs.get(e); + if (t) { + setTimeout(() => { + t.set(i, undefined); + }, 0); + } else { + t = un(e, i); + pBs.set(e, t); + } + return t; +} +q(); +An(); +UZ(); +y4(); +q(); +At(); +An(); +X(); +Ho(); +Me(); +te(); +An(); +function wS(i, e, t) { + return K9t({ + debugName: () => `Configuration Key "${i}"` + }, s => t.onDidChangeConfiguration(n => { + if (n.affectsConfiguration(i)) { + s(n); + } + }), () => t.getValue(i) ?? e); +} +function xm(i, e, t) { + const s = i.bindTo(e); + return W9({ + debugName: () => `Set Context Key "${i.key}"` + }, n => { + s.set(t(n)); + }); +} +ai(); +var Pd = Ve("accessibilitySignalService"); +var mBs = Symbol("AcknowledgeDocCommentsToken"); +var yXt = class extends H { + constructor(e, t, s) { + super(); + this.f = e; + this.g = t; + this.h = s; + this.a = new Map(); + this.b = Ro(this, this.g.onDidChangeScreenReaderOptimized, () => this.g.isScreenReaderOptimized()); + this.c = new Set(); + this.n = new Set(); + this.q = new BZ(n => wS(n.settingsKey, { + sound: "off", + announcement: "off" + }, this.f)); + this.r = new BZ({ + getCacheKey: _Gn + }, n => Is(r => { + const o = this.q.get(n.signal).read(r); + return (n.modality === "sound" || n.modality === undefined) && !!bBs(o.sound, () => this.b.read(r), n.userGesture) || (n.modality === "announcement" || n.modality === undefined) && !!bBs(o.announcement, () => this.b.read(r), n.userGesture); + }).recomputeInitiallyAndOnChange(this.B)); + } + getEnabledState(e, t, s) { + return new Ote(this.r.get({ + signal: e, + userGesture: t, + modality: s + })); + } + async playSignal(e, t = {}) { + const s = t.modality === "announcement" || t.modality === undefined; + const n = e.announcementMessage; + if (s && this.isAnnouncementEnabled(e, t.userGesture) && n) { + this.g.status(n); + } + if ((t.modality === "sound" || t.modality === undefined) && this.isSoundEnabled(e, t.userGesture)) { + this.j(e, t.source); + await this.playSound(e.sound.getSound(), t.allowManyInParallel); + } + } + async playSignals(e) { + for (const r of e) { + this.j("signal" in r ? r.signal : r, "source" in r ? r.source : undefined); + } + const t = e.map(r => "signal" in r ? r.signal : r); + const s = t.filter(r => this.isAnnouncementEnabled(r)).map(r => r.announcementMessage); + if (s.length) { + this.g.status(s.join(", ")); + } + const n = new Set(t.filter(r => this.isSoundEnabled(r)).map(r => r.sound.getSound())); + await Promise.all(Array.from(n).map(r => this.playSound(r, true))); + } + j(e, t) { + const s = this.g.isScreenReaderOptimized(); + const n = e.name + (t ? `::${t}` : "") + (s ? "{screenReaderOptimized}" : ""); + if (!this.c.has(n) && this.m() !== 0) { + this.c.add(n); + this.h.publicLog2("signal.played", { + signal: e.name, + source: t ?? "", + isScreenReaderOptimized: s + }); + } + } + m() { + const e = this.f.getValue("accessibility.signalOptions.volume"); + if (typeof e != "number") { + return 50; + } else { + return Math.max(Math.min(e, 100), 0); + } + } + async playSound(e, t = false) { + if (!t && this.n.has(e)) { + return; + } + this.n.add(e); + const s = Na.asBrowserUri(`vs/platform/accessibilitySignal/browser/media/${e.fileName}`).toString(true); + try { + const n = this.a.get(s); + if (n) { + n.volume = this.m() / 100; + n.currentTime = 0; + await n.play(); + } else { + const r = await Aur(s, this.m() / 100); + this.a.set(s, r); + } + } catch (n) { + if (!n.message.includes("play() can only be initiated by a user gesture")) { + console.error("Error while playing sound", n); + } + } finally { + this.n.delete(e); + } + } + playSignalLoop(e, t) { + let s = true; + const n = () => { + if (s) { + this.playSignal(e, { + allowManyInParallel: true + }).finally(() => { + setTimeout(() => { + if (s) { + n(); + } + }, t); + }); + } + }; + n(); + return Ue(() => s = false); + } + isAnnouncementEnabled(e, t) { + if (e.announcementMessage) { + return this.r.get({ + signal: e, + userGesture: !!t, + modality: "announcement" + }).get(); + } else { + return false; + } + } + isSoundEnabled(e, t) { + return this.r.get({ + signal: e, + userGesture: !!t, + modality: "sound" + }).get(); + } + onSoundEnabledChanged(e) { + return this.getEnabledState(e, false).onDidChange; + } + getDelayMs(e, t, s) { + if (!this.f.getValue("accessibility.signalOptions.debouncePositionChanges")) { + return 0; + } + let n; + if (e.name === el.errorAtPosition.name && s === "positional") { + n = this.f.getValue("accessibility.signalOptions.experimental.delays.errorAtPosition"); + } else if (e.name === el.warningAtPosition.name && s === "positional") { + n = this.f.getValue("accessibility.signalOptions.experimental.delays.warningAtPosition"); + } else { + n = this.f.getValue("accessibility.signalOptions.experimental.delays.general"); + } + if (t === "sound") { + return n.sound; + } else { + return n.announcement; + } + } +}; +yXt = __decorate([__param(0, ve), __param(1, na), __param(2, Ot)], yXt); +function bBs(i, e, t) { + return i === "on" || i === "always" || i === "auto" && e() || i === "userGesture" && t; +} +function Aur(i, e) { + return new Promise((t, s) => { + const n = new Audio(i); + n.volume = e; + n.addEventListener("ended", () => { + t(n); + }); + n.addEventListener("error", r => { + s(r.error); + }); + n.play().catch(r => { + s(r); + }); + }); +} +var rf = class Om { + static a(e) { + return new Om(e.fileName); + } + static { + this.error = Om.a({ + fileName: "error.mp3" + }); + } + static { + this.warning = Om.a({ + fileName: "warning.mp3" + }); + } + static { + this.success = Om.a({ + fileName: "success.mp3" + }); + } + static { + this.foldedArea = Om.a({ + fileName: "foldedAreas.mp3" + }); + } + static { + this.break = Om.a({ + fileName: "break.mp3" + }); + } + static { + this.quickFixes = Om.a({ + fileName: "quickFixes.mp3" + }); + } + static { + this.taskCompleted = Om.a({ + fileName: "taskCompleted.mp3" + }); + } + static { + this.taskFailed = Om.a({ + fileName: "taskFailed.mp3" + }); + } + static { + this.terminalBell = Om.a({ + fileName: "terminalBell.mp3" + }); + } + static { + this.diffLineInserted = Om.a({ + fileName: "diffLineInserted.mp3" + }); + } + static { + this.diffLineDeleted = Om.a({ + fileName: "diffLineDeleted.mp3" + }); + } + static { + this.diffLineModified = Om.a({ + fileName: "diffLineModified.mp3" + }); + } + static { + this.requestSent = Om.a({ + fileName: "requestSent.mp3" + }); + } + static { + this.responseReceived1 = Om.a({ + fileName: "responseReceived1.mp3" + }); + } + static { + this.responseReceived2 = Om.a({ + fileName: "responseReceived2.mp3" + }); + } + static { + this.responseReceived3 = Om.a({ + fileName: "responseReceived3.mp3" + }); + } + static { + this.responseReceived4 = Om.a({ + fileName: "responseReceived4.mp3" + }); + } + static { + this.clear = Om.a({ + fileName: "clear.mp3" + }); + } + static { + this.save = Om.a({ + fileName: "save.mp3" + }); + } + static { + this.format = Om.a({ + fileName: "format.mp3" + }); + } + static { + this.voiceRecordingStarted = Om.a({ + fileName: "voiceRecordingStarted.mp3" + }); + } + static { + this.voiceRecordingStopped = Om.a({ + fileName: "voiceRecordingStopped.mp3" + }); + } + static { + this.progress = Om.a({ + fileName: "progress.mp3" + }); + } + static { + this.done1 = Om.a({ + fileName: "done1.mp3" + }); + } + constructor(e) { + this.fileName = e; + } +}; +var $ur = class { + constructor(i) { + this.randomOneOf = i; + } + getSound(i = false) { + if (i || this.randomOneOf.length === 1) { + return this.randomOneOf[0]; + } + { + const e = Math.floor(Math.random() * this.randomOneOf.length); + return this.randomOneOf[e]; + } + } +}; +var el = class Lf { + constructor(e, t, s, n, r, o) { + this.sound = e; + this.name = t; + this.legacySoundSettingsKey = s; + this.settingsKey = n; + this.legacyAnnouncementSettingsKey = r; + this.announcementMessage = o; + } + static { + this.a = new Set(); + } + static b(e) { + const t = new $ur("randomOneOf" in e.sound ? e.sound.randomOneOf : [e.sound]); + const s = new Lf(t, e.name, e.legacySoundSettingsKey, e.settingsKey, e.legacyAnnouncementSettingsKey, e.announcementMessage); + Lf.a.add(s); + return s; + } + static get allAccessibilitySignals() { + return [...this.a]; + } + static { + this.errorAtPosition = Lf.b({ + name: f(1614, null), + sound: rf.error, + announcementMessage: f(1615, null), + settingsKey: "accessibility.signals.positionHasError", + delaySettingsKey: "accessibility.signalOptions.delays.errorAtPosition" + }); + } + static { + this.warningAtPosition = Lf.b({ + name: f(1616, null), + sound: rf.warning, + announcementMessage: f(1617, null), + settingsKey: "accessibility.signals.positionHasWarning", + delaySettingsKey: "accessibility.signalOptions.delays.warningAtPosition" + }); + } + static { + this.errorOnLine = Lf.b({ + name: f(1618, null), + sound: rf.error, + legacySoundSettingsKey: "audioCues.lineHasError", + legacyAnnouncementSettingsKey: "accessibility.alert.error", + announcementMessage: f(1619, null), + settingsKey: "accessibility.signals.lineHasError" + }); + } + static { + this.warningOnLine = Lf.b({ + name: f(1620, null), + sound: rf.warning, + legacySoundSettingsKey: "audioCues.lineHasWarning", + legacyAnnouncementSettingsKey: "accessibility.alert.warning", + announcementMessage: f(1621, null), + settingsKey: "accessibility.signals.lineHasWarning" + }); + } + static { + this.foldedArea = Lf.b({ + name: f(1622, null), + sound: rf.foldedArea, + legacySoundSettingsKey: "audioCues.lineHasFoldedArea", + legacyAnnouncementSettingsKey: "accessibility.alert.foldedArea", + announcementMessage: f(1623, null), + settingsKey: "accessibility.signals.lineHasFoldedArea" + }); + } + static { + this.break = Lf.b({ + name: f(1624, null), + sound: rf.break, + legacySoundSettingsKey: "audioCues.lineHasBreakpoint", + legacyAnnouncementSettingsKey: "accessibility.alert.breakpoint", + announcementMessage: f(1625, null), + settingsKey: "accessibility.signals.lineHasBreakpoint" + }); + } + static { + this.inlineSuggestion = Lf.b({ + name: f(1626, null), + sound: rf.quickFixes, + legacySoundSettingsKey: "audioCues.lineHasInlineSuggestion", + settingsKey: "accessibility.signals.lineHasInlineSuggestion" + }); + } + static { + this.terminalQuickFix = Lf.b({ + name: f(1627, null), + sound: rf.quickFixes, + legacySoundSettingsKey: "audioCues.terminalQuickFix", + legacyAnnouncementSettingsKey: "accessibility.alert.terminalQuickFix", + announcementMessage: f(1628, null), + settingsKey: "accessibility.signals.terminalQuickFix" + }); + } + static { + this.onDebugBreak = Lf.b({ + name: f(1629, null), + sound: rf.break, + legacySoundSettingsKey: "audioCues.onDebugBreak", + legacyAnnouncementSettingsKey: "accessibility.alert.onDebugBreak", + announcementMessage: f(1630, null), + settingsKey: "accessibility.signals.onDebugBreak" + }); + } + static { + this.noInlayHints = Lf.b({ + name: f(1631, null), + sound: rf.error, + legacySoundSettingsKey: "audioCues.noInlayHints", + legacyAnnouncementSettingsKey: "accessibility.alert.noInlayHints", + announcementMessage: f(1632, null), + settingsKey: "accessibility.signals.noInlayHints" + }); + } + static { + this.taskCompleted = Lf.b({ + name: f(1633, null), + sound: rf.taskCompleted, + legacySoundSettingsKey: "audioCues.taskCompleted", + legacyAnnouncementSettingsKey: "accessibility.alert.taskCompleted", + announcementMessage: f(1634, null), + settingsKey: "accessibility.signals.taskCompleted" + }); + } + static { + this.taskFailed = Lf.b({ + name: f(1635, null), + sound: rf.taskFailed, + legacySoundSettingsKey: "audioCues.taskFailed", + legacyAnnouncementSettingsKey: "accessibility.alert.taskFailed", + announcementMessage: f(1636, null), + settingsKey: "accessibility.signals.taskFailed" + }); + } + static { + this.terminalCommandFailed = Lf.b({ + name: f(1637, null), + sound: rf.error, + legacySoundSettingsKey: "audioCues.terminalCommandFailed", + legacyAnnouncementSettingsKey: "accessibility.alert.terminalCommandFailed", + announcementMessage: f(1638, null), + settingsKey: "accessibility.signals.terminalCommandFailed" + }); + } + static { + this.terminalCommandSucceeded = Lf.b({ + name: f(1639, null), + sound: rf.success, + announcementMessage: f(1640, null), + settingsKey: "accessibility.signals.terminalCommandSucceeded" + }); + } + static { + this.terminalBell = Lf.b({ + name: f(1641, null), + sound: rf.terminalBell, + legacySoundSettingsKey: "audioCues.terminalBell", + legacyAnnouncementSettingsKey: "accessibility.alert.terminalBell", + announcementMessage: f(1642, null), + settingsKey: "accessibility.signals.terminalBell" + }); + } + static { + this.notebookCellCompleted = Lf.b({ + name: f(1643, null), + sound: rf.taskCompleted, + legacySoundSettingsKey: "audioCues.notebookCellCompleted", + legacyAnnouncementSettingsKey: "accessibility.alert.notebookCellCompleted", + announcementMessage: f(1644, null), + settingsKey: "accessibility.signals.notebookCellCompleted" + }); + } + static { + this.notebookCellFailed = Lf.b({ + name: f(1645, null), + sound: rf.taskFailed, + legacySoundSettingsKey: "audioCues.notebookCellFailed", + legacyAnnouncementSettingsKey: "accessibility.alert.notebookCellFailed", + announcementMessage: f(1646, null), + settingsKey: "accessibility.signals.notebookCellFailed" + }); + } + static { + this.diffLineInserted = Lf.b({ + name: f(1647, null), + sound: rf.diffLineInserted, + legacySoundSettingsKey: "audioCues.diffLineInserted", + settingsKey: "accessibility.signals.diffLineInserted" + }); + } + static { + this.diffLineDeleted = Lf.b({ + name: f(1648, null), + sound: rf.diffLineDeleted, + legacySoundSettingsKey: "audioCues.diffLineDeleted", + settingsKey: "accessibility.signals.diffLineDeleted" + }); + } + static { + this.diffLineModified = Lf.b({ + name: f(1649, null), + sound: rf.diffLineModified, + legacySoundSettingsKey: "audioCues.diffLineModified", + settingsKey: "accessibility.signals.diffLineModified" + }); + } + static { + this.chatRequestSent = Lf.b({ + name: f(1650, null), + sound: rf.requestSent, + legacySoundSettingsKey: "audioCues.chatRequestSent", + legacyAnnouncementSettingsKey: "accessibility.alert.chatRequestSent", + announcementMessage: f(1651, null), + settingsKey: "accessibility.signals.chatRequestSent" + }); + } + static { + this.chatResponseReceived = Lf.b({ + name: f(1652, null), + legacySoundSettingsKey: "audioCues.chatResponseReceived", + sound: { + randomOneOf: [rf.responseReceived1, rf.responseReceived2, rf.responseReceived3, rf.responseReceived4] + }, + settingsKey: "accessibility.signals.chatResponseReceived" + }); + } + static { + this.codeActionTriggered = Lf.b({ + name: f(1653, null), + sound: rf.voiceRecordingStarted, + legacySoundSettingsKey: "audioCues.codeActionRequestTriggered", + legacyAnnouncementSettingsKey: "accessibility.alert.codeActionRequestTriggered", + announcementMessage: f(1654, null), + settingsKey: "accessibility.signals.codeActionTriggered" + }); + } + static { + this.codeActionApplied = Lf.b({ + name: f(1655, null), + legacySoundSettingsKey: "audioCues.codeActionApplied", + sound: rf.voiceRecordingStopped, + settingsKey: "accessibility.signals.codeActionApplied" + }); + } + static { + this.progress = Lf.b({ + name: f(1656, null), + sound: rf.progress, + legacySoundSettingsKey: "audioCues.chatResponsePending", + legacyAnnouncementSettingsKey: "accessibility.alert.progress", + announcementMessage: f(1657, null), + settingsKey: "accessibility.signals.progress" + }); + } + static { + this.clear = Lf.b({ + name: f(1658, null), + sound: rf.clear, + legacySoundSettingsKey: "audioCues.clear", + legacyAnnouncementSettingsKey: "accessibility.alert.clear", + announcementMessage: f(1659, null), + settingsKey: "accessibility.signals.clear" + }); + } + static { + this.save = Lf.b({ + name: f(1660, null), + sound: rf.save, + legacySoundSettingsKey: "audioCues.save", + legacyAnnouncementSettingsKey: "accessibility.alert.save", + announcementMessage: f(1661, null), + settingsKey: "accessibility.signals.save" + }); + } + static { + this.format = Lf.b({ + name: f(1662, null), + sound: rf.format, + legacySoundSettingsKey: "audioCues.format", + legacyAnnouncementSettingsKey: "accessibility.alert.format", + announcementMessage: f(1663, null), + settingsKey: "accessibility.signals.format" + }); + } + static { + this.voiceRecordingStarted = Lf.b({ + name: f(1664, null), + sound: rf.voiceRecordingStarted, + legacySoundSettingsKey: "audioCues.voiceRecordingStarted", + settingsKey: "accessibility.signals.voiceRecordingStarted" + }); + } + static { + this.voiceRecordingStopped = Lf.b({ + name: f(1665, null), + sound: rf.voiceRecordingStopped, + legacySoundSettingsKey: "audioCues.voiceRecordingStopped", + settingsKey: "accessibility.signals.voiceRecordingStopped" + }); + } +}; +Ee(); +te(); +Tc(); +so(); +Rs(); +yt(); +E4(); +Sr(); +en(); +Xn(); +var fO = class t9i { + static capture(e) { + if (e.getScrollTop() === 0 || e.hasPendingScrollAnimation()) { + return new t9i(e.getScrollTop(), e.getContentHeight(), null, 0, null); + } + let t = null; + let s = 0; + const n = e.getVisibleRanges(); + if (n.length > 0) { + t = n[0].getStartPosition(); + const r = e.getTopForPosition(t.lineNumber, t.column); + s = e.getScrollTop() - r; + } + return new t9i(e.getScrollTop(), e.getContentHeight(), t, s, e.getPosition()); + } + constructor(e, t, s, n, r) { + this.a = e; + this.b = t; + this.c = s; + this.d = n; + this.e = r; + } + restore(e) { + if ((this.b !== e.getContentHeight() || this.a !== e.getScrollTop()) && this.c) { + const t = e.getTopForPosition(this.c.lineNumber, this.c.column); + e.setScrollTop(t + this.d); + } + } + restoreRelativeVerticalPositionOfCursor(e) { + if (this.b === e.getContentHeight() && this.a === e.getScrollTop()) { + return; + } + const t = e.getPosition(); + if (!this.e || !t) { + return; + } + const s = e.getTopForLineNumber(t.lineNumber) - e.getTopForLineNumber(this.e.lineNumber); + e.setScrollTop(e.getScrollTop() + s, 1); + } +}; +var vBs = class i9i { + static capture(e) { + if (e.hasPendingScrollAnimation()) { + return new i9i(e.getScrollTop(), e.getContentHeight(), null, 0); + } + let t = null; + let s = 0; + const n = e.getVisibleRanges(); + if (n.length > 0) { + t = n.at(-1).getEndPosition(); + s = e.getBottomForLineNumber(t.lineNumber) - e.getScrollTop(); + } + return new i9i(e.getScrollTop(), e.getContentHeight(), t, s); + } + constructor(e, t, s, n) { + this.a = e; + this.b = t; + this.c = s; + this.d = n; + } + restore(e) { + if ((this.b !== e.getContentHeight() || this.a !== e.getScrollTop()) && this.c) { + const t = e.getBottomForLineNumber(this.c.lineNumber); + e.setScrollTop(t - this.d, 1); + } + } +}; +Yg(); +xe(); +KL(); +sl(); +Kg(); +Fs(); +Jt(); +He(); +q(); +An(); +Rt(); +s1(); +qg(); +ri(); +q(); +An(); +kYi(); +Rs(); +yt(); +TM(); +function Fur(i, e, t, s) { + if (i.length === 0) { + return e; + } + if (e.length === 0) { + return i; + } + const n = []; + let r = 0; + let o = 0; + while (r < i.length && o < e.length) { + const a = i[r]; + const l = e[o]; + const c = t(a); + const u = t(l); + if (c < u) { + n.push(a); + r++; + } else if (c > u) { + n.push(l); + o++; + } else { + n.push(s(a, l)); + r++; + o++; + } + } + while (r < i.length) { + n.push(i[r]); + r++; + } + while (o < e.length) { + n.push(e[o]); + o++; + } + return n; +} +function hpt(i, e) { + const t = new Q(); + const s = i.createDecorationsCollection(); + t.add(W9({ + debugName: () => `Apply decorations from ${e.debugName}` + }, n => { + const r = e.read(n); + s.set(r); + })); + t.add({ + dispose: () => { + s.clear(); + } + }); + return t; +} +function xne(i, e) { + i.appendChild(e); + return Ue(() => { + e.remove(); + }); +} +function Our(i, e) { + i.prepend(e); + return Ue(() => { + e.remove(); + }); +} +var yBs = class extends H { + get width() { + return this.g; + } + get height() { + return this.h; + } + get automaticLayout() { + return this.n; + } + constructor(i, e) { + super(); + this.n = false; + this.f = this.D(new A8t(i, e)); + this.g = un(this, this.f.getWidth()); + this.h = un(this, this.f.getHeight()); + this.D(this.f.onDidChange(t => Io(s => { + this.g.set(this.f.getWidth(), s); + this.h.set(this.f.getHeight(), s); + }))); + } + observe(i) { + this.f.observe(i); + } + setAutomaticLayout(i) { + this.n = i; + if (i) { + this.f.startObserving(); + } else { + this.f.stopObserving(); + } + } +}; +function wBs(i, e, t) { + let s = e.get(); + let n = s; + let r = s; + const o = un("animatedValue", s); + let a = -1; + const l = 300; + let c; + t.add(Mte({ + createEmptyChangeSummary: () => ({ + animate: false + }), + handleChange: (d, h) => { + if (d.didChange(e)) { + h.animate = h.animate || d.change; + } + return true; + } + }, (d, h) => { + if (c !== undefined) { + i.cancelAnimationFrame(c); + c = undefined; + } + n = r; + s = e.read(d); + a = Date.now() - (h.animate ? 0 : l); + u(); + })); + function u() { + const d = Date.now() - a; + r = Math.floor(_ur(d, n, s - n, l)); + if (d < l) { + c = i.requestAnimationFrame(u); + } else { + r = s; + } + o.set(r, undefined); + } + return o; +} +function _ur(i, e, t, s) { + if (i === s) { + return e + t; + } else { + return t * (-Math.pow(2, i * -10 / s) + 1) + e; + } +} +var wXt = class extends H { + constructor(i, e, t) { + super(); + this.D(new Bur(i, t)); + this.D(_U(t, { + height: e.actualHeight, + top: e.actualTop + })); + } +}; +var kne = class { + get afterLineNumber() { + return this.h.get(); + } + constructor(i, e) { + this.h = i; + this.heightInPx = e; + this.domNode = document.createElement("div"); + this.f = un(this, undefined); + this.g = un(this, undefined); + this.actualTop = this.f; + this.actualHeight = this.g; + this.showInHiddenAreas = true; + this.onChange = this.h; + this.onDomNodeTop = t => { + this.f.set(t, undefined); + }; + this.onComputedHeight = t => { + this.g.set(t, undefined); + }; + } +}; +var Bur = class jOn { + static { + this.f = 0; + } + constructor(e, t) { + this.k = e; + this.n = t; + this.g = `managedOverlayWidget-${jOn.f++}`; + this.h = { + getId: () => this.g, + getDomNode: () => this.n, + getPosition: () => null + }; + this.k.addOverlayWidget(this.h); + } + dispose() { + this.k.removeOverlayWidget(this.h); + } +}; +function _U(i, e) { + return Dn(t => { + for (let [s, n] of Object.entries(e)) { + if (n && typeof n == "object" && "read" in n) { + n = n.read(t); + } + if (typeof n == "number") { + n = `${n}px`; + } + s = s.replace(/[A-Z]/g, r => "-" + r.toLowerCase()); + i.style[s] = n; + } + }); +} +function Uwe(i, e, t, s) { + const n = new Q(); + const r = []; + n.add(eh((o, a) => { + const l = e.read(o); + const c = new Map(); + const u = new Map(); + if (t) { + t(true); + } + i.changeViewZones(d => { + for (const h of r) { + d.removeZone(h); + s?.delete(h); + } + r.length = 0; + for (const h of l) { + const g = d.addZone(h); + if (h.setZoneId) { + h.setZoneId(g); + } + r.push(g); + s?.add(g); + c.set(h, g); + } + }); + if (t) { + t(false); + } + a.add(Mte({ + createEmptyChangeSummary() { + return { + zoneIds: [] + }; + }, + handleChange(d, h) { + const g = u.get(d.changedObservable); + if (g !== undefined) { + h.zoneIds.push(g); + } + return true; + } + }, (d, h) => { + for (const g of l) { + if (g.onChange) { + u.set(g.onChange, c.get(g)); + g.onChange.read(d); + } + } + if (t) { + t(true); + } + i.changeViewZones(g => { + for (const p of h.zoneIds) { + g.layoutZone(p); + } + }); + if (t) { + t(false); + } + })); + })); + n.add({ + dispose() { + if (t) { + t(true); + } + i.changeViewZones(o => { + for (const a of r) { + o.removeZone(a); + } + }); + s?.clear(); + if (t) { + t(false); + } + } + }); + return n; +} +var Uur = class extends Xi { + dispose() { + super.dispose(true); + } +}; +function CBs(i, e) { + const t = oM(e, n => n.original.startLineNumber <= i.lineNumber); + if (!t) { + return Z.fromPositions(i); + } + if (t.original.endLineNumberExclusive <= i.lineNumber) { + const n = i.lineNumber - t.original.endLineNumberExclusive + t.modified.endLineNumberExclusive; + return Z.fromPositions(new je(n, i.column)); + } + if (!t.innerChanges) { + return Z.fromPositions(new je(t.modified.startLineNumber, 1)); + } + const s = oM(t.innerChanges, n => n.originalRange.getStartPosition().isBeforeOrEqual(i)); + if (!s) { + const n = i.lineNumber - t.original.startLineNumber + t.modified.startLineNumber; + return Z.fromPositions(new je(n, i.column)); + } + if (s.originalRange.containsPosition(i)) { + return s.modifiedRange; + } + { + const n = Wur(s.originalRange.getEndPosition(), i); + return Z.fromPositions(n.addToPosition(s.modifiedRange.getEndPosition())); + } +} +function Wur(i, e) { + if (i.lineNumber === e.lineNumber) { + return new qv(0, e.column - i.column); + } else { + return new qv(e.lineNumber - i.lineNumber, e.column - 1); + } +} +function Vur(i, e) { + let t; + return i.filter(s => { + const n = e(s, t); + t = s; + return n; + }); +} +var Ene = class { + static create(i, e = undefined) { + return new CXt(i, i, e); + } + static createWithDisposable(i, e, t = undefined) { + const s = new Q(); + s.add(e); + s.add(i); + return new CXt(i, s, t); + } + static createOfNonDisposable(i, e, t = undefined) { + return new CXt(i, e, t); + } +}; +var CXt = class extends Ene { + constructor(i, e, t) { + super(); + this.object = i; + this.k = e; + this.n = t; + this.f = 1; + this.g = false; + this.h = []; + if (t) { + this.o(t); + } + } + o(i) { + if (i) { + this.h.push(i); + } + } + createNewRef(i) { + this.f++; + if (i) { + this.o(i); + } + return new Hur(this, i); + } + dispose() { + if (!this.g) { + this.g = true; + this._decreaseRefCount(this.n); + } + } + _decreaseRefCount(i) { + this.f--; + if (this.f === 0) { + this.k.dispose(); + } + if (i) { + const e = this.h.indexOf(i); + if (e !== -1) { + this.h.splice(e, 1); + } + } + } +}; +var Hur = class extends Ene { + constructor(i, e) { + super(); + this.g = i; + this.h = e; + this.f = false; + } + get object() { + return this.g.object; + } + createNewRef(i) { + return this.g.createNewRef(i); + } + dispose() { + if (!this.f) { + this.f = true; + this.g._decreaseRefCount(this.h); + } + } +}; +Qd(); +Nf(); +jp(); +Rs(); +yt(); +Jt(); +bm(); +Ut(); +Nf(); +Rs(); +yt(); +Jt(); +bm(); +Ut(); +$i(); +Jt(); +bm(); +$i(); +Nf(); +Ut(); +jp(); +var gO = class nq { + static { + this.empty = new nq([]); + } + static fromJson(e) { + return new nq(e.map(aP.fromJson)); + } + static replace(e, t) { + return new nq([new aP(e, t)]); + } + static insert(e, t) { + return nq.replace(uo.emptyAt(e), t); + } + constructor(e) { + this.edits = e; + let t = -1; + for (const s of e) { + if (!(s.replaceRange.start >= t)) { + throw new co(`Edits must be disjoint and sorted. Found ${s} after ${t}`); + } + t = s.replaceRange.endExclusive; + } + } + normalize() { + const e = []; + let t; + for (const s of this.edits) { + if (s.newText.length !== 0 || s.replaceRange.length !== 0) { + if (t && t.replaceRange.endExclusive === s.replaceRange.start) { + t = new aP(t.replaceRange.join(s.replaceRange), t.newText + s.newText); + } else { + if (t) { + e.push(t); + } + t = s; + } + } + } + if (t) { + e.push(t); + } + return new nq(e); + } + toString() { + return `[${this.edits.map(t => t.toString()).join(", ")}]`; + } + apply(e) { + const t = []; + let s = 0; + for (const n of this.edits) { + t.push(e.substring(s, n.replaceRange.start)); + t.push(n.newText); + s = n.replaceRange.endExclusive; + } + t.push(e.substring(s)); + return t.join(""); + } + compose(e) { + return qur(this, e); + } + inverse(e) { + const t = []; + let s = 0; + for (const n of this.edits) { + t.push(new aP(uo.ofStartAndLength(n.replaceRange.start + s, n.newText.length), e.substring(n.replaceRange.start, n.replaceRange.endExclusive))); + s += n.newText.length - n.replaceRange.length; + } + return new nq(t); + } + getNewTextRanges() { + const e = []; + let t = 0; + for (const s of this.edits) { + e.push(uo.ofStartAndLength(s.replaceRange.start + t, s.newText.length)); + t += s.newText.length - s.replaceRange.length; + } + return e; + } + get isEmpty() { + return this.edits.length === 0; + } + tryRebase(e, t) { + const s = []; + let n = 0; + let r = 0; + let o = 0; + while (r < this.edits.length || n < e.edits.length) { + const a = e.edits[n]; + const l = this.edits[r]; + if (l) { + if (!a) { + s.push(new aP(l.replaceRange.delta(o), l.newText)); + r++; + } else if (l.replaceRange.intersectsOrTouches(a.replaceRange)) { + r++; + if (t) { + return; + } + } else if (l.replaceRange.start < a.replaceRange.start) { + s.push(new aP(l.replaceRange.delta(o), l.newText)); + r++; + } else { + n++; + o += a.newText.length - a.replaceRange.length; + } + } else { + break; + } + } + return new nq(s); + } + applyToOffset(e) { + let t = 0; + for (const s of this.edits) { + if (s.replaceRange.start <= e) { + if (e < s.replaceRange.endExclusive) { + return s.replaceRange.start + t; + } + t += s.newText.length - s.replaceRange.length; + } else { + break; + } + } + return e + t; + } + applyToOffsetRange(e) { + return new uo(this.applyToOffset(e.start), this.applyToOffset(e.endExclusive)); + } + applyInverseToOffset(e) { + let t = 0; + for (const s of this.edits) { + const n = s.newText.length; + if (s.replaceRange.start <= e - t) { + if (e - t < s.replaceRange.start + n) { + return s.replaceRange.start; + } + t += n - s.replaceRange.length; + } else { + break; + } + } + return e - t; + } +}; +var aP = class s9i { + static fromJson(e) { + return new s9i(uo.ofStartAndLength(e.pos, e.len), e.txt); + } + static insert(e, t) { + return new s9i(uo.emptyAt(e), t); + } + constructor(e, t) { + this.replaceRange = e; + this.newText = t; + } + toString() { + return `${this.replaceRange} -> "${this.newText}"`; + } + get isEmpty() { + return this.newText.length === 0 && this.replaceRange.length === 0; + } +}; +function qur(i, e) { + i = i.normalize(); + e = e.normalize(); + if (i.isEmpty) { + return e; + } + if (e.isEmpty) { + return i; + } + const t = [...i.edits]; + const s = []; + let n = 0; + for (const r of e.edits) { + while (true) { + const c = t[0]; + if (!c || c.replaceRange.start + n + c.newText.length >= r.replaceRange.start) { + break; + } + t.shift(); + s.push(c); + n += c.newText.length - c.replaceRange.length; + } + const o = n; + let a; + let l; + while (true) { + const c = t[0]; + if (!c || c.replaceRange.start + n > r.replaceRange.endExclusive) { + break; + } + a ||= c; + l = c; + t.shift(); + n += c.newText.length - c.replaceRange.length; + } + if (!a) { + s.push(new aP(r.replaceRange.delta(-n), r.newText)); + } else { + let c = ""; + const u = r.replaceRange.start - (a.replaceRange.start + o); + if (u > 0) { + c = a.newText.slice(0, u); + } + const d = l.replaceRange.endExclusive + n - r.replaceRange.endExclusive; + if (d > 0) { + const p = new aP(uo.ofStartAndLength(l.replaceRange.endExclusive, 0), l.newText.slice(-d)); + t.unshift(p); + n -= p.newText.length - p.replaceRange.length; + } + const h = c + r.newText; + const g = new uo(Math.min(a.replaceRange.start, r.replaceRange.start - o), r.replaceRange.endExclusive - n); + s.push(new aP(g, h)); + } + } + while (true) { + const r = t.shift(); + if (!r) { + break; + } + s.push(r); + } + return new gO(s).normalize(); +} +Rs(); +yt(); +var jur = class iZ { + static { + this.empty = new iZ([]); + } + static deserialize(e) { + return new iZ(e.map(t => fpt.deserialize(t))); + } + static fromEdit(e, t) { + const s = pO.fromOffsetEdit(e, t); + return iZ.fromTextEdit(s, t); + } + static fromTextEdit(e, t) { + const s = e.edits; + const n = []; + const r = []; + for (let o = 0; o < s.length; o++) { + const a = s[o]; + const l = o + 1 < s.length ? s[o + 1] : undefined; + r.push(a); + if (l && l.range.startLineNumber === a.range.endLineNumber) { + continue; + } + const c = im.joinEdits(r, t); + r.length = 0; + const u = fpt.fromSingleTextEdit(c, t); + n.push(u); + } + return new iZ(n); + } + static createFromUnsorted(e) { + const t = e.slice(); + t.sort(jg(s => s.lineRange.startLineNumber, Ly)); + return new iZ(t); + } + constructor(e) { + this.edits = e; + Zrt(X2(e, (t, s) => t.lineRange.endLineNumberExclusive <= s.lineRange.startLineNumber)); + } + toEdit(e) { + const t = []; + for (const s of this.edits) { + const n = s.toSingleEdit(e); + t.push(n); + } + return new gO(t); + } + toString() { + return this.edits.map(e => e.toString()).join(","); + } + serialize() { + return this.edits.map(e => e.serialize()); + } + getNewLineRanges() { + const e = []; + let t = 0; + for (const s of this.edits) { + e.push(or.ofLength(s.lineRange.startLineNumber + t, s.newLines.length)); + t += s.newLines.length - s.lineRange.length; + } + return e; + } + mapLineNumber(e) { + let t = 0; + for (const s of this.edits) { + if (s.lineRange.endLineNumberExclusive > e) { + break; + } + t += s.newLines.length - s.lineRange.length; + } + return e + t; + } + mapLineRange(e) { + return new or(this.mapLineNumber(e.startLineNumber), this.mapLineNumber(e.endLineNumberExclusive)); + } + rebase(e) { + return new iZ(this.edits.map(t => new fpt(e.mapLineRange(t.lineRange), t.newLines))); + } + humanReadablePatch(e) { + const t = []; + function s(a, l, c, u) { + const d = c === "unmodified" ? " " : c === "deleted" ? "-" : "+"; + if (u === undefined) { + u = "[[[[[ WARNING: LINE DOES NOT EXIST ]]]]]"; + } + const h = a === -1 ? " " : a.toString().padStart(3, " "); + const g = l === -1 ? " " : l.toString().padStart(3, " "); + t.push(`${d} ${h} ${g} ${u}`); + } + function n() { + t.push("---"); + } + let r = 0; + let o = true; + for (const a of pnt(this.edits, (l, c) => l.lineRange.distanceToRange(c.lineRange) <= 5)) { + if (o) { + o = false; + } else { + n(); + } + let l = a[0].lineRange.startLineNumber - 2; + for (const c of a) { + for (let h = Math.max(1, l); h < c.lineRange.startLineNumber; h++) { + s(h, h + r, "unmodified", e[h - 1]); + } + const u = c.lineRange; + const d = c.newLines; + for (const h of u.mapToLineArray(g => g)) { + const g = e[h - 1]; + s(h, -1, "deleted", g); + } + for (let h = 0; h < d.length; h++) { + const g = d[h]; + s(-1, u.startLineNumber + r + h, "added", g); + } + l = u.endLineNumberExclusive; + r += c.newLines.length - c.lineRange.length; + } + for (let c = l; c <= Math.min(l + 2, e.length); c++) { + s(c, c + r, "unmodified", e[c - 1]); + } + } + return t.join(` +`); + } + apply(e) { + const t = []; + let s = 0; + for (const n of this.edits) { + while (s < n.lineRange.startLineNumber - 1) { + t.push(e[s]); + s++; + } + for (const r of n.newLines) { + t.push(r); + } + s = n.lineRange.endLineNumberExclusive - 1; + } + while (s < e.length) { + t.push(e[s]); + s++; + } + return t; + } + toSingleEdit() {} +}; +var fpt = class IFt { + static deserialize(e) { + return new IFt(or.ofLength(e[0], e[1] - e[0]), e[2]); + } + static fromSingleTextEdit(e, t) { + const s = Ov(e.text); + let n = e.range.startLineNumber; + const r = t.getValueOfRange(Z.fromPositions(new je(e.range.startLineNumber, 1), e.range.getStartPosition())); + s[0] = r + s[0]; + let o = e.range.endLineNumber + 1; + const a = t.getTransformer().getLineLength(e.range.endLineNumber) + 1; + const l = t.getValueOfRange(Z.fromPositions(e.range.getEndPosition(), new je(e.range.endLineNumber, a))); + s[s.length - 1] = s[s.length - 1] + l; + const c = e.range.startColumn === t.getTransformer().getLineLength(e.range.startLineNumber) + 1; + const u = e.range.endColumn === 1; + if (c && s[0].length === r.length) { + n++; + s.shift(); + } + if (s.length > 0 && n < o && u && s[s.length - 1].length === l.length) { + o--; + s.pop(); + } + return new IFt(new or(n, o), s); + } + constructor(e, t) { + this.lineRange = e; + this.newLines = t; + } + toSingleTextEdit(e) { + if (this.newLines.length === 0) { + const t = e.getTransformer().textLength; + if (this.lineRange.endLineNumberExclusive === t.lineCount + 2) { + let s; + if (this.lineRange.startLineNumber > 1) { + const r = this.lineRange.startLineNumber - 1; + const o = e.getTransformer().getLineLength(r) + 1; + s = new je(r, o); + } else { + s = new je(1, 1); + } + const n = t.addToPosition(new je(1, 1)); + return new im(Z.fromPositions(s, n), ""); + } else { + return new im(new Z(this.lineRange.startLineNumber, 1, this.lineRange.endLineNumberExclusive, 1), ""); + } + } else if (this.lineRange.isEmpty) { + let t; + let s; + let n; + const r = this.lineRange.startLineNumber; + if (r === e.getTransformer().textLength.lineCount + 2) { + t = r - 1; + s = e.getTransformer().getLineLength(t) + 1; + n = this.newLines.map(o => ` +${o}`).join(""); + } else { + t = r; + s = 1; + n = this.newLines.map(o => `${o} +`).join(""); + } + return new im(Z.fromPositions(new je(t, s)), n); + } else { + const t = this.lineRange.endLineNumberExclusive - 1; + const s = e.getTransformer().getLineLength(t) + 1; + const n = new Z(this.lineRange.startLineNumber, 1, t, s); + const r = this.newLines.join(` +`); + return new im(n, r); + } + } + toSingleEdit(e) { + const t = this.toSingleTextEdit(e); + const s = e.getTransformer().getOffsetRange(t.range); + return new aP(s, t.text); + } + toString() { + return `${this.lineRange}->${JSON.stringify(this.newLines)}`; + } + serialize() { + return [this.lineRange.startLineNumber, this.lineRange.endLineNumberExclusive, this.newLines]; + } + removeCommonSuffixPrefixLines(e) { + let t = this.lineRange.startLineNumber; + let s = this.lineRange.endLineNumberExclusive; + let n = 0; + while (t < s && n < this.newLines.length && this.newLines[n] === e.getLineAt(t)) { + t++; + n++; + } + let r = 0; + while (t < s && r + n < this.newLines.length && this.newLines[this.newLines.length - 1 - r] === e.getLineAt(s - 1)) { + s--; + r++; + } + if (n === 0 && r === 0) { + return this; + } else { + return new IFt(new or(t, s), this.newLines.slice(n, this.newLines.length - r)); + } + } + toLineEdit() { + return new jur([this]); + } +}; +Rs(); +_ss(); +yt(); +TM(); +var pO = class Yde { + static fromOffsetEdit(e, t) { + const s = e.edits.map(n => new im(t.getTransformer().getRange(n.replaceRange), n.newText)); + return new Yde(s); + } + static single(e, t) { + return new Yde([new im(e, t)]); + } + static insert(e, t) { + return new Yde([new im(Z.fromPositions(e, e), t)]); + } + constructor(e) { + this.edits = e; + Kk(() => X2(e, (t, s) => t.range.getEndPosition().isBeforeOrEqual(s.range.getStartPosition()))); + } + normalize() { + const e = []; + for (const t of this.edits) { + if (e.length > 0 && e[e.length - 1].range.getEndPosition().equals(t.range.getStartPosition())) { + const s = e[e.length - 1]; + e[e.length - 1] = new im(s.range.plusRange(t.range), s.text + t.text); + } else if (!t.isEmpty) { + e.push(t); + } + } + return new Yde(e); + } + mapPosition(e) { + let t = 0; + let s = 0; + let n = 0; + for (const r of this.edits) { + const o = r.range.getStartPosition(); + if (e.isBeforeOrEqual(o)) { + break; + } + const a = r.range.getEndPosition(); + const l = qv.ofText(r.text); + if (e.isBefore(a)) { + const c = new je(o.lineNumber + t, o.column + (o.lineNumber + t === s ? n : 0)); + const u = l.addToPosition(c); + return gpt(c, u); + } + if (o.lineNumber + t !== s) { + n = 0; + } + t += l.lineCount - (r.range.endLineNumber - r.range.startLineNumber); + if (l.lineCount === 0) { + if (a.lineNumber !== o.lineNumber) { + n += l.columnCount - (a.column - 1); + } else { + n += l.columnCount - (a.column - o.column); + } + } else { + n = l.columnCount; + } + s = a.lineNumber + t; + } + return new je(e.lineNumber + t, e.column + (e.lineNumber + t === s ? n : 0)); + } + mapRange(e) { + function t(o) { + if (o instanceof je) { + return o; + } else { + return o.getStartPosition(); + } + } + function s(o) { + if (o instanceof je) { + return o; + } else { + return o.getEndPosition(); + } + } + const n = t(this.mapPosition(e.getStartPosition())); + const r = s(this.mapPosition(e.getEndPosition())); + return gpt(n, r); + } + inverseMapPosition(e, t) { + return this.inverse(t).mapPosition(e); + } + inverseMapRange(e, t) { + return this.inverse(t).mapRange(e); + } + apply(e) { + let t = ""; + let s = new je(1, 1); + for (const r of this.edits) { + const o = r.range; + const a = o.getStartPosition(); + const l = o.getEndPosition(); + const c = gpt(s, a); + if (!c.isEmpty()) { + t += e.getValueOfRange(c); + } + t += r.text; + s = l; + } + const n = gpt(s, e.endPositionExclusive); + if (!n.isEmpty()) { + t += e.getValueOfRange(n); + } + return t; + } + applyToString(e) { + const t = new mpt(e); + return this.apply(t); + } + inverse(e) { + const t = this.getNewRanges(); + return new Yde(this.edits.map((s, n) => new im(t[n], e.getValueOfRange(s.range)))); + } + getNewRanges() { + const e = []; + let t = 0; + let s = 0; + let n = 0; + for (const r of this.edits) { + const o = qv.ofText(r.text); + const a = je.lift({ + lineNumber: r.range.startLineNumber + s, + column: r.range.startColumn + (r.range.startLineNumber === t ? n : 0) + }); + const l = o.createRange(a); + e.push(l); + s = l.endLineNumber - r.range.endLineNumber; + n = l.endColumn - r.range.endColumn; + t = r.range.endLineNumber; + } + return e; + } + toSingle(e) { + if (this.edits.length === 0) { + throw new co(); + } + if (this.edits.length === 1) { + return this.edits[0]; + } + const t = this.edits[0].range.getStartPosition(); + const s = this.edits[this.edits.length - 1].range.getEndPosition(); + let n = ""; + for (let r = 0; r < this.edits.length; r++) { + const o = this.edits[r]; + n += o.text; + if (r < this.edits.length - 1) { + const a = this.edits[r + 1]; + const l = Z.fromPositions(o.range.getEndPosition(), a.range.getStartPosition()); + const c = e.getValueOfRange(l); + n += c; + } + } + return new im(Z.fromPositions(t, s), n); + } + equals(e) { + return Go(this.edits, e.edits, (t, s) => t.equals(s)); + } +}; +var im = class sYe { + static joinEdits(e, t) { + if (e.length === 0) { + throw new co(); + } + if (e.length === 1) { + return e[0]; + } + const s = e[0].range.getStartPosition(); + const n = e[e.length - 1].range.getEndPosition(); + let r = ""; + for (let o = 0; o < e.length; o++) { + const a = e[o]; + r += a.text; + if (o < e.length - 1) { + const l = e[o + 1]; + const c = Z.fromPositions(a.range.getEndPosition(), l.range.getStartPosition()); + const u = t.getValueOfRange(c); + r += u; + } + } + return new sYe(Z.fromPositions(s, n), r); + } + constructor(e, t) { + this.range = e; + this.text = t; + } + get isEmpty() { + return this.range.isEmpty() && this.text.length === 0; + } + static equals(e, t) { + return e.range.equalsRange(t.range) && e.text === t.text; + } + toSingleEditOperation() { + return { + range: this.range, + text: this.text + }; + } + toEdit() { + return new pO([this]); + } + equals(e) { + return sYe.equals(this, e); + } + extendToCoverRange(e, t) { + if (this.range.containsRange(e)) { + return this; + } + const s = this.range.plusRange(e); + const n = t.getValueOfRange(Z.fromPositions(s.getStartPosition(), this.range.getStartPosition())); + const r = t.getValueOfRange(Z.fromPositions(this.range.getEndPosition(), s.getEndPosition())); + const o = n + this.text + r; + return new sYe(s, o); + } + extendToFullLine(e) { + const t = new Z(this.range.startLineNumber, 1, this.range.endLineNumber, e.getTransformer().getLineLength(this.range.endLineNumber) + 1); + return this.extendToCoverRange(t, e); + } + removeCommonPrefix(e) { + const t = e.getValueOfRange(this.range).replaceAll(`\r +`, ` +`); + const s = this.text.replaceAll(`\r +`, ` +`); + const n = LL(t, s); + const r = qv.ofText(t.substring(0, n)).addToPosition(this.range.getStartPosition()); + const o = s.substring(n); + const a = Z.fromPositions(r, this.range.getEndPosition()); + return new sYe(a, o); + } + isEffectiveDeletion(e) { + let t = this.text.replaceAll(`\r +`, ` +`); + let s = e.getValueOfRange(this.range).replaceAll(`\r +`, ` +`); + const n = LL(t, s); + t = t.substring(n); + s = s.substring(n); + const r = VZ(t, s); + t = t.substring(0, t.length - r); + s = s.substring(0, s.length - r); + return t === ""; + } +}; +function gpt(i, e) { + if (i.lineNumber === e.lineNumber && i.column === Number.MAX_SAFE_INTEGER) { + return Z.fromPositions(e, e); + } + if (!i.isBeforeOrEqual(e)) { + throw new co("start must be before end"); + } + return new Z(i.lineNumber, i.column, e.lineNumber, e.column); +} +var SXt = class { + constructor() { + this.c = undefined; + } + get endPositionExclusive() { + return this.length.addToPosition(new je(1, 1)); + } + get lineRange() { + return this.length.toLineRange(); + } + getValue() { + return this.getValueOfRange(this.length.toRange()); + } + getLineLength(i) { + return this.getValueOfRange(new Z(i, 1, i, Number.MAX_SAFE_INTEGER)).length; + } + getTransformer() { + this.c ||= new Rpe(this.getValue()); + return this.c; + } + getLineAt(i) { + return this.getValueOfRange(new Z(i, 1, i, Number.MAX_SAFE_INTEGER)); + } + getLines() { + const i = this.getValue(); + return Ov(i); + } +}; +var zur = class extends SXt { + constructor(i, e) { + Zrt(e >= 1); + super(); + this.d = i; + this.f = e; + } + getValueOfRange(i) { + if (i.startLineNumber === i.endLineNumber) { + return this.d(i.startLineNumber).substring(i.startColumn - 1, i.endColumn - 1); + } + let e = this.d(i.startLineNumber).substring(i.startColumn - 1); + for (let t = i.startLineNumber + 1; t < i.endLineNumber; t++) { + e += ` +${this.d(t)}`; + } + e += ` +${this.d(i.endLineNumber).substring(0, i.endColumn - 1)}`; + return e; + } + getLineLength(i) { + return this.d(i).length; + } + get length() { + const i = this.d(this.f); + return new qv(this.f - 1, i.length); + } +}; +var ppt = class extends zur { + constructor(i) { + super(e => i[e - 1], i.length); + } +}; +var mpt = class extends SXt { + constructor(i) { + super(); + this.value = i; + this.d = new Rpe(this.value); + } + getValueOfRange(i) { + return this.d.getOffsetRange(i).substring(this.value); + } + get length() { + return this.d.textLength; + } +}; +var lP = class Xde { + static inverse(e, t, s) { + const n = []; + let r = 1; + let o = 1; + for (const l of e) { + const c = new Xde(new or(r, l.original.startLineNumber), new or(o, l.modified.startLineNumber)); + if (!c.modified.isEmpty) { + n.push(c); + } + r = l.original.endLineNumberExclusive; + o = l.modified.endLineNumberExclusive; + } + const a = new Xde(new or(r, t + 1), new or(o, s + 1)); + if (!a.modified.isEmpty) { + n.push(a); + } + return n; + } + static clip(e, t, s) { + const n = []; + for (const r of e) { + const o = r.original.intersect(t); + const a = r.modified.intersect(s); + if (o && !o.isEmpty && a && !a.isEmpty) { + n.push(new Xde(o, a)); + } + } + return n; + } + constructor(e, t) { + this.original = e; + this.modified = t; + } + toString() { + return `{${this.original.toString()}->${this.modified.toString()}}`; + } + flip() { + return new Xde(this.modified, this.original); + } + join(e) { + return new Xde(this.original.join(e.original), this.modified.join(e.modified)); + } + get changedLineCount() { + return Math.max(this.original.length, this.modified.length); + } + toRangeMapping() { + const e = this.original.toInclusiveRange(); + const t = this.modified.toInclusiveRange(); + if (e && t) { + return new Kx(e, t); + } + if (this.original.startLineNumber === 1 || this.modified.startLineNumber === 1) { + if (this.modified.startLineNumber !== 1 || this.original.startLineNumber !== 1) { + throw new co("not a valid diff"); + } + return new Kx(new Z(this.original.startLineNumber, 1, this.original.endLineNumberExclusive, 1), new Z(this.modified.startLineNumber, 1, this.modified.endLineNumberExclusive, 1)); + } else { + return new Kx(new Z(this.original.startLineNumber - 1, Number.MAX_SAFE_INTEGER, this.original.endLineNumberExclusive - 1, Number.MAX_SAFE_INTEGER), new Z(this.modified.startLineNumber - 1, Number.MAX_SAFE_INTEGER, this.modified.endLineNumberExclusive - 1, Number.MAX_SAFE_INTEGER)); + } + } + toRangeMapping2(e, t) { + if (SBs(this.original.endLineNumberExclusive, e) && SBs(this.modified.endLineNumberExclusive, t)) { + return new Kx(new Z(this.original.startLineNumber, 1, this.original.endLineNumberExclusive, 1), new Z(this.modified.startLineNumber, 1, this.modified.endLineNumberExclusive, 1)); + } + if (!this.original.isEmpty && !this.modified.isEmpty) { + return new Kx(Z.fromPositions(new je(this.original.startLineNumber, 1), Ine(new je(this.original.endLineNumberExclusive - 1, Number.MAX_SAFE_INTEGER), e)), Z.fromPositions(new je(this.modified.startLineNumber, 1), Ine(new je(this.modified.endLineNumberExclusive - 1, Number.MAX_SAFE_INTEGER), t))); + } + if (this.original.startLineNumber > 1 && this.modified.startLineNumber > 1) { + return new Kx(Z.fromPositions(Ine(new je(this.original.startLineNumber - 1, Number.MAX_SAFE_INTEGER), e), Ine(new je(this.original.endLineNumberExclusive - 1, Number.MAX_SAFE_INTEGER), e)), Z.fromPositions(Ine(new je(this.modified.startLineNumber - 1, Number.MAX_SAFE_INTEGER), t), Ine(new je(this.modified.endLineNumberExclusive - 1, Number.MAX_SAFE_INTEGER), t))); + } + throw new co(); + } +}; +function Ine(i, e) { + if (i.lineNumber < 1) { + return new je(1, 1); + } + if (i.lineNumber > e.length) { + return new je(e.length, e[e.length - 1].length + 1); + } + const t = e[i.lineNumber - 1]; + if (i.column > t.length + 1) { + return new je(i.lineNumber, t.length + 1); + } else { + return i; + } +} +function SBs(i, e) { + return i >= 1 && i <= e.length; +} +var I1 = class DFt extends lP { + static fromRangeMappings(e) { + const t = or.join(e.map(n => or.fromRangeInclusive(n.originalRange))); + const s = or.join(e.map(n => or.fromRangeInclusive(n.modifiedRange))); + return new DFt(t, s, e); + } + constructor(e, t, s) { + super(e, t); + this.innerChanges = s; + } + flip() { + return new DFt(this.modified, this.original, this.innerChanges?.map(e => e.flip())); + } + withInnerChangesFromLineRanges() { + return new DFt(this.original, this.modified, [this.toRangeMapping()]); + } +}; +var Kx = class Qde { + static fromEdit(e) { + const t = e.getNewRanges(); + return e.edits.map((n, r) => new Qde(n.range, t[r])); + } + static fromEditJoin(e) { + const t = e.getNewRanges(); + const s = e.edits.map((n, r) => new Qde(n.range, t[r])); + return Qde.join(s); + } + static join(e) { + if (e.length === 0) { + throw new co("Cannot join an empty list of range mappings"); + } + let t = e[0]; + for (let s = 1; s < e.length; s++) { + t = t.join(e[s]); + } + return t; + } + static assertSorted(e) { + for (let t = 1; t < e.length; t++) { + const s = e[t - 1]; + const n = e[t]; + if (!s.originalRange.getEndPosition().isBeforeOrEqual(n.originalRange.getStartPosition()) || !s.modifiedRange.getEndPosition().isBeforeOrEqual(n.modifiedRange.getStartPosition())) { + throw new co("Range mappings must be sorted"); + } + } + } + constructor(e, t) { + this.originalRange = e; + this.modifiedRange = t; + } + toString() { + return `{${this.originalRange.toString()}->${this.modifiedRange.toString()}}`; + } + flip() { + return new Qde(this.modifiedRange, this.originalRange); + } + toTextEdit(e) { + const t = e.getValueOfRange(this.modifiedRange); + return new im(this.originalRange, t); + } + join(e) { + return new Qde(this.originalRange.plusRange(e.originalRange), this.modifiedRange.plusRange(e.modifiedRange)); + } +}; +function bpt(i, e, t, s = false) { + const n = []; + for (const r of pnt(i.map(o => Jur(o, e, t)), (o, a) => o.original.overlapOrTouch(a.original) || o.modified.overlapOrTouch(a.modified))) { + const o = r[0]; + const a = r[r.length - 1]; + n.push(new I1(o.original.join(a.original), o.modified.join(a.modified), r.map(l => l.innerChanges[0]))); + } + Kk(() => !s && n.length > 0 && (n[0].modified.startLineNumber !== n[0].original.startLineNumber || t.length.lineCount - n[n.length - 1].modified.endLineNumberExclusive !== e.length.lineCount - n[n.length - 1].original.endLineNumberExclusive) ? false : X2(n, (r, o) => o.original.startLineNumber - r.original.endLineNumberExclusive === o.modified.startLineNumber - r.modified.endLineNumberExclusive && r.original.endLineNumberExclusive < o.original.startLineNumber && r.modified.endLineNumberExclusive < o.modified.startLineNumber)); + return n; +} +function Jur(i, e, t) { + let s = 0; + let n = 0; + if (i.modifiedRange.endColumn === 1 && i.originalRange.endColumn === 1 && i.originalRange.startLineNumber + s <= i.originalRange.endLineNumber && i.modifiedRange.startLineNumber + s <= i.modifiedRange.endLineNumber) { + n = -1; + } + if (i.modifiedRange.startColumn - 1 >= t.getLineLength(i.modifiedRange.startLineNumber) && i.originalRange.startColumn - 1 >= e.getLineLength(i.originalRange.startLineNumber) && i.originalRange.startLineNumber <= i.originalRange.endLineNumber + n && i.modifiedRange.startLineNumber <= i.modifiedRange.endLineNumber + n) { + s = 1; + } + const r = new or(i.originalRange.startLineNumber + s, i.originalRange.endLineNumber + 1 + n); + const o = new or(i.modifiedRange.startLineNumber + s, i.modifiedRange.endLineNumber + 1 + n); + return new I1(r, o, [i]); +} +function Gur(i) { + const e = []; + for (const t of i) { + let s; + if (t.originalEndLineNumber === 0) { + s = new or(t.originalStartLineNumber + 1, t.originalStartLineNumber + 1); + } else { + s = new or(t.originalStartLineNumber, t.originalEndLineNumber + 1); + } + let n; + if (t.modifiedEndLineNumber === 0) { + n = new or(t.modifiedStartLineNumber + 1, t.modifiedStartLineNumber + 1); + } else { + n = new or(t.modifiedStartLineNumber, t.modifiedEndLineNumber + 1); + } + e.push(new lP(s, n)); + } + return e; +} +wn(); +RT(); +Fj(); +MI(); +X(); +te(); +Br(); +var Kur = dt("diff-review-insert", A.add, f(208, null)); +var Yur = dt("diff-review-remove", A.remove, f(209, null)); +var Xur = dt("diff-review-close", A.close, f(210, null)); +var BU = class extends H { + static { + this._ttPolicy = GL("diffReview", { + createHTML: e => e + }); + } + constructor(e, t, s, n, r, o, a, l, c) { + super(); + this.c = e; + this.f = t; + this.j = s; + this.m = n; + this.n = r; + this.q = o; + this.s = a; + this.t = l; + this.u = c; + this.w = w4(this, (u, d) => { + const h = this.f.read(u); + this.c.style.visibility = h ? "visible" : "hidden"; + if (!h) { + return null; + } + const g = d.add(this.u.createInstance(xXt, this.s, this.t, this.j, this.m)); + const p = d.add(this.u.createInstance(kXt, this.c, g, this.n, this.q, this.t)); + return { + model: g, + view: p + }; + }).recomputeInitiallyAndOnChange(this.B); + } + next() { + Io(e => { + const t = this.f.get(); + this.j(true, e); + if (t) { + this.w.get().model.nextGroup(e); + } + }); + } + prev() { + Io(e => { + this.j(true, e); + this.w.get().model.previousGroup(e); + }); + } + close() { + Io(e => { + this.j(false, e); + }); + } +}; +BU = __decorate([__param(8, re)], BU); +var xXt = class extends H { + constructor(e, t, s, n, r) { + super(); + this.j = e; + this.m = t; + this.n = s; + this.canClose = n; + this.q = r; + this.c = un(this, []); + this.f = un(this, 0); + this.h = un(this, 0); + this.groups = this.c; + this.currentGroup = this.f.map((o, a) => this.c.read(a)[o]); + this.currentGroupIndex = this.f; + this.currentElement = this.h.map((o, a) => this.currentGroup.read(a)?.lines[o]); + this.D(Dn(o => { + const a = this.j.read(o); + if (!a) { + this.c.set([], undefined); + return; + } + const l = Qur(a, this.m.getOriginalModel().getLineCount(), this.m.getModifiedModel().getLineCount()); + Io(c => { + const u = this.m.getModifiedPosition(); + if (u) { + const d = l.findIndex(h => u?.lineNumber < h.range.modified.endLineNumberExclusive); + if (d !== -1) { + this.f.set(d, c); + } + } + this.c.set(l, c); + }); + })); + this.D(Dn(o => { + const a = this.currentElement.read(o); + if (a?.type === D1.Deleted) { + this.q.playSignal(el.diffLineDeleted, { + source: "accessibleDiffViewer.currentElementChanged" + }); + } else if (a?.type === D1.Added) { + this.q.playSignal(el.diffLineInserted, { + source: "accessibleDiffViewer.currentElementChanged" + }); + } + })); + this.D(Dn(o => { + const a = this.currentElement.read(o); + if (a && a.type !== D1.Header) { + const l = a.modifiedLineNumber ?? a.diff.modified.startLineNumber; + this.m.modifiedSetSelection(Z.fromPositions(new je(l, 1))); + } + })); + } + s(e, t) { + const s = this.groups.get(); + if (!!s && !(s.length <= 1)) { + Lte(t, n => { + this.f.set(uo.ofLength(s.length).clipCyclic(this.f.get() + e), n); + this.h.set(0, n); + }); + } + } + nextGroup(e) { + this.s(1, e); + } + previousGroup(e) { + this.s(-1, e); + } + t(e) { + const t = this.currentGroup.get(); + if (!!t && !(t.lines.length <= 1)) { + Io(s => { + this.h.set(uo.ofLength(t.lines.length).clip(this.h.get() + e), s); + }); + } + } + goToNextLine() { + this.t(1); + } + goToPreviousLine() { + this.t(-1); + } + goToLine(e) { + const t = this.currentGroup.get(); + if (!t) { + return; + } + const s = t.lines.indexOf(e); + if (s !== -1) { + Io(n => { + this.h.set(s, n); + }); + } + } + revealCurrentElementInEditor() { + if (!this.canClose.get()) { + return; + } + this.n(false, undefined); + const e = this.currentElement.get(); + if (e) { + if (e.type === D1.Deleted) { + this.m.originalReveal(Z.fromPositions(new je(e.originalLineNumber, 1))); + } else { + this.m.modifiedReveal(e.type !== D1.Header ? Z.fromPositions(new je(e.modifiedLineNumber, 1)) : undefined); + } + } + } + close() { + if (this.canClose.get()) { + this.n(false, undefined); + this.m.modifiedFocus(); + } + } +}; +xXt = __decorate([__param(4, Pd)], xXt); +var Wwe = 3; +function Qur(i, e, t) { + const s = []; + for (const n of pnt(i, (r, o) => o.modified.startLineNumber - r.modified.endLineNumberExclusive < Wwe * 2)) { + const r = []; + r.push(new edr()); + const o = new or(Math.max(1, n[0].original.startLineNumber - Wwe), Math.min(n[n.length - 1].original.endLineNumberExclusive + Wwe, e + 1)); + const a = new or(Math.max(1, n[0].modified.startLineNumber - Wwe), Math.min(n[n.length - 1].modified.endLineNumberExclusive + Wwe, t + 1)); + eqi(n, (u, d) => { + const h = new or(u ? u.original.endLineNumberExclusive : o.startLineNumber, d ? d.original.startLineNumber : o.endLineNumberExclusive); + const g = new or(u ? u.modified.endLineNumberExclusive : a.startLineNumber, d ? d.modified.startLineNumber : a.endLineNumberExclusive); + h.forEach(p => { + r.push(new sdr(p, g.startLineNumber + (p - h.startLineNumber))); + }); + if (d) { + d.original.forEach(p => { + r.push(new tdr(d, p)); + }); + d.modified.forEach(p => { + r.push(new idr(d, p)); + }); + } + }); + const l = n[0].modified.join(n[n.length - 1].modified); + const c = n[0].original.join(n[n.length - 1].original); + s.push(new Zur(new lP(l, c), r)); + } + return s; +} +var D1; +(function (i) { + i[i.Header = 0] = "Header"; + i[i.Unchanged = 1] = "Unchanged"; + i[i.Deleted = 2] = "Deleted"; + i[i.Added = 3] = "Added"; +})(D1 ||= {}); +var Zur = class { + constructor(i, e) { + this.range = i; + this.lines = e; + } +}; +var edr = class { + constructor() { + this.type = D1.Header; + } +}; +var tdr = class { + constructor(i, e) { + this.diff = i; + this.originalLineNumber = e; + this.type = D1.Deleted; + this.modifiedLineNumber = undefined; + } +}; +var idr = class { + constructor(i, e) { + this.diff = i; + this.modifiedLineNumber = e; + this.type = D1.Added; + this.originalLineNumber = undefined; + } +}; +var sdr = class { + constructor(i, e) { + this.originalLineNumber = i; + this.modifiedLineNumber = e; + this.type = D1.Unchanged; + } +}; +var kXt = class extends H { + constructor(e, t, s, n, r, o) { + super(); + this.j = e; + this.m = t; + this.n = s; + this.q = n; + this.s = r; + this.t = o; + this.domNode = this.j; + this.domNode.className = "monaco-component diff-review monaco-editor-background"; + const a = document.createElement("div"); + a.className = "diff-review-actions"; + this.h = this.D(new ea(a)); + this.D(Dn(l => { + this.h.clear(); + if (this.m.canClose.read(l)) { + this.h.push(new Yt("diffreview.close", f(211, null), "close-diff-review " + le.asClassName(Xur), true, async () => t.close()), { + label: false, + icon: true + }); + } + })); + this.c = document.createElement("div"); + this.c.className = "diff-review-content"; + this.c.setAttribute("role", "code"); + this.f = this.D(new _w(this.c, {})); + mo(this.domNode, this.f.getDomNode(), a); + this.D(Dn(l => { + this.q.read(l); + this.n.read(l); + this.f.scanDomNode(); + })); + this.D(Ue(() => { + mo(this.domNode); + })); + this.D(_U(this.domNode, { + width: this.n, + height: this.q + })); + this.D(_U(this.c, { + width: this.n, + height: this.q + })); + this.D(eh((l, c) => { + this.m.currentGroup.read(l); + this.u(c); + })); + this.D(ko(this.domNode, "keydown", l => { + if (l.equals(18) || l.equals(2066) || l.equals(530)) { + l.preventDefault(); + this.m.goToNextLine(); + } + if (l.equals(16) || l.equals(2064) || l.equals(528)) { + l.preventDefault(); + this.m.goToPreviousLine(); + } + if (l.equals(9) || l.equals(2057) || l.equals(521) || l.equals(1033)) { + l.preventDefault(); + this.m.close(); + } + if (l.equals(10) || l.equals(3)) { + l.preventDefault(); + this.m.revealCurrentElementInEditor(); + } + })); + } + u(e) { + const t = this.s.getOriginalOptions(); + const s = this.s.getModifiedOptions(); + const n = document.createElement("div"); + n.className = "diff-review-table"; + n.setAttribute("role", "list"); + n.setAttribute("aria-label", f(212, null)); + Hm(n, s.get(52)); + mo(this.c, n); + const r = this.s.getOriginalModel(); + const o = this.s.getModifiedModel(); + if (!r || !o) { + return; + } + const a = r.getOptions(); + const l = o.getOptions(); + const c = s.get(68); + const u = this.m.currentGroup.get(); + for (const d of u?.lines || []) { + if (!u) { + break; + } + let h; + if (d.type === D1.Header) { + const p = document.createElement("div"); + p.className = "diff-review-row"; + p.setAttribute("role", "listitem"); + const b = u.range; + const v = this.m.currentGroupIndex.get(); + const y = this.m.groups.get().length; + const w = k => k === 0 ? f(213, null) : k === 1 ? f(214, null) : f(215, null, k); + const C = w(b.original.length); + const S = w(b.modified.length); + p.setAttribute("aria-label", f(216, null, v + 1, y, b.original.startLineNumber, C, b.modified.startLineNumber, S)); + const x = document.createElement("div"); + x.className = "diff-review-cell diff-review-summary"; + x.appendChild(document.createTextNode(`${v + 1}/${y}: @@ -${b.original.startLineNumber},${b.original.length} +${b.modified.startLineNumber},${b.modified.length} @@`)); + p.appendChild(x); + h = p; + } else { + h = this.w(d, c, this.n.get(), t, r, a, s, o, l); + } + n.appendChild(h); + const g = Is(p => this.m.currentElement.read(p) === d); + e.add(Dn(p => { + const b = g.read(p); + h.tabIndex = b ? 0 : -1; + if (b) { + h.focus(); + } + })); + e.add(Ce(h, "focus", () => { + this.m.goToLine(d); + })); + } + this.f.scanDomNode(); + } + w(e, t, s, n, r, o, a, l, c) { + const u = n.get(151); + const d = u.glyphMarginWidth + u.lineNumbersWidth; + const h = a.get(151); + const g = 10 + h.glyphMarginWidth + h.lineNumbersWidth; + let p = "diff-review-row"; + let b = ""; + const v = "diff-review-spacer"; + let y = null; + switch (e.type) { + case D1.Added: + p = "diff-review-row line-insert"; + b = " char-insert"; + y = Kur; + break; + case D1.Deleted: + p = "diff-review-row line-delete"; + b = " char-delete"; + y = Yur; + break; + } + const w = document.createElement("div"); + w.style.minWidth = s + "px"; + w.className = p; + w.setAttribute("role", "listitem"); + w.ariaLevel = ""; + const C = document.createElement("div"); + C.className = "diff-review-cell"; + C.style.height = `${t}px`; + w.appendChild(C); + const S = document.createElement("span"); + S.style.width = d + "px"; + S.style.minWidth = d + "px"; + S.className = "diff-review-line-number" + b; + if (e.originalLineNumber !== undefined) { + S.appendChild(document.createTextNode(String(e.originalLineNumber))); + } else { + S.innerText = "\xA0"; + } + C.appendChild(S); + const x = document.createElement("span"); + x.style.width = g + "px"; + x.style.minWidth = g + "px"; + x.style.paddingRight = "10px"; + x.className = "diff-review-line-number" + b; + if (e.modifiedLineNumber !== undefined) { + x.appendChild(document.createTextNode(String(e.modifiedLineNumber))); + } else { + x.innerText = "\xA0"; + } + C.appendChild(x); + const k = document.createElement("span"); + k.className = v; + if (y) { + const P = document.createElement("span"); + P.className = le.asClassName(y); + P.innerText = "\xA0\xA0"; + k.appendChild(P); + } else { + k.innerText = "\xA0\xA0"; + } + C.appendChild(k); + let E; + if (e.modifiedLineNumber !== undefined) { + let P = this.y(l, a, c.tabSize, e.modifiedLineNumber, this.t.languageIdCodec); + if (BU._ttPolicy) { + P = BU._ttPolicy.createHTML(P); + } + C.insertAdjacentHTML("beforeend", P); + E = l.getLineContent(e.modifiedLineNumber); + } else { + let P = this.y(r, n, o.tabSize, e.originalLineNumber, this.t.languageIdCodec); + if (BU._ttPolicy) { + P = BU._ttPolicy.createHTML(P); + } + C.insertAdjacentHTML("beforeend", P); + E = r.getLineContent(e.originalLineNumber); + } + if (E.length === 0) { + E = f(217, null); + } + let D = ""; + switch (e.type) { + case D1.Unchanged: + if (e.originalLineNumber === e.modifiedLineNumber) { + D = f(218, null, E, e.originalLineNumber); + } else { + D = f(219, null, E, e.originalLineNumber, e.modifiedLineNumber); + } + break; + case D1.Added: + D = f(220, null, E, e.modifiedLineNumber); + break; + case D1.Deleted: + D = f(221, null, E, e.originalLineNumber); + break; + } + w.setAttribute("aria-label", D); + return w; + } + y(e, t, s, n, r) { + const o = e.getLineContent(n); + const a = t.get(52); + const l = Kb.createEmpty(o, r); + const c = Ete.isBasicASCII(o, e.mightContainNonBasicASCII()); + const u = Ete.containsRTL(o, c, e.mightContainRTL()); + return Qzn(new $9(a.isMonospace && !t.get(33), a.canUseHalfwidthRightwardsArrow, o, false, c, u, 0, l, [], s, 0, a.spaceWidth, a.middotWidth, a.wsmiddotWidth, t.get(122), t.get(104), t.get(99), t.get(53) !== t4.OFF, null)).html; + } +}; +kXt = __decorate([__param(5, As)], kXt); +var ndr = class { + constructor(i) { + this.c = i; + } + getOriginalModel() { + return this.c.original.getModel(); + } + getOriginalOptions() { + return this.c.original.getOptions(); + } + originalReveal(i) { + this.c.original.revealRange(i); + this.c.original.setSelection(i); + this.c.original.focus(); + } + getModifiedModel() { + return this.c.modified.getModel(); + } + getModifiedOptions() { + return this.c.modified.getOptions(); + } + modifiedReveal(i) { + if (i) { + this.c.modified.revealRange(i); + this.c.modified.setSelection(i); + } + this.c.modified.focus(); + } + modifiedSetSelection(i) { + this.c.modified.setSelection(i); + } + modifiedFocus() { + this.c.modified.focus(); + } + getModifiedPosition() { + return this.c.modified.getPosition() ?? undefined; + } +}; +q(); +An(); +xe(); +Jt(); +nt(); +He(); +q(); +An(); +Rt(); +zt(); +s1(); +He(); +Rt(); +Ya(); +X(); +Qs(); +Br(); +var Via = he("diffEditor.move.border", "#8b8b8b9c", f(248, null)); +var Hia = he("diffEditor.moveActive.border", "#FFA500", f(249, null)); +var qia = he("diffEditor.unchangedRegionShadow", { + dark: "#000000", + light: "#737373BF", + hcDark: "#000000", + hcLight: "#737373BF" +}, f(250, null)); +var rdr = dt("diff-insert", A.add, f(251, null)); +var xBs = dt("diff-remove", A.remove, f(252, null)); +var kBs = Cr.register({ + className: "line-insert", + description: "line-insert", + isWholeLine: true, + linesDecorationsClassName: "insert-sign " + le.asClassName(rdr), + marginClassName: "gutter-insert" +}); +var EBs = Cr.register({ + className: "line-delete", + description: "line-delete", + isWholeLine: true, + linesDecorationsClassName: "delete-sign " + le.asClassName(xBs), + marginClassName: "gutter-delete" +}); +var IBs = Cr.register({ + className: "line-insert", + description: "line-insert", + isWholeLine: true, + marginClassName: "gutter-insert" +}); +var DBs = Cr.register({ + className: "line-delete", + description: "line-delete", + isWholeLine: true, + marginClassName: "gutter-delete" +}); +var Vwe = Cr.register({ + className: "char-insert", + description: "char-insert", + shouldFillLineOnLineBreak: true +}); +var EXt = Cr.register({ + className: "char-insert", + description: "char-insert", + isWholeLine: true +}); +var odr = Cr.register({ + className: "char-insert diff-range-empty", + description: "char-insert diff-range-empty" +}); +var Hwe = Cr.register({ + className: "char-delete", + description: "char-delete", + shouldFillLineOnLineBreak: true +}); +var adr = Cr.register({ + className: "char-delete", + description: "char-delete", + isWholeLine: true +}); +var ldr = Cr.register({ + className: "char-delete diff-range-empty", + description: "char-delete diff-range-empty" +}); +nt(); +ri(); +q(); +An(); +It(); +te(); +pe(); +fd(); +Nf(); +te(); +var Fu = Ve("editorWorkerService"); +ai(); +var nG; +var IXt = Ve("diffProviderFactoryService"); +var DXt = class { + constructor(e) { + this.a = e; + } + createDiffProvider(e) { + return this.a.createInstance(TXt, e); + } +}; +DXt = __decorate([__param(0, re)], DXt); +it(IXt, DXt, 1); +var TXt = class { + static { + nG = this; + } + static { + this.e = new Map(); + } + constructor(e, t, s) { + this.f = t; + this.g = s; + this.a = new B(); + this.onDidChange = this.a.event; + this.b = "advanced"; + this.d = undefined; + this.setOptions(e); + } + dispose() { + this.d?.dispose(); + } + async computeDiff(e, t, s, n) { + if (typeof this.b != "string") { + return this.b.computeDiff(e, t, s, n); + } + if (e.isDisposed() || t.isDisposed()) { + return { + changes: [], + identical: true, + quitEarly: false, + moves: [] + }; + } + if (e.getLineCount() === 1 && e.getLineMaxColumn(1) === 1) { + if (t.getLineCount() === 1 && t.getLineMaxColumn(1) === 1) { + return { + changes: [], + identical: true, + quitEarly: false, + moves: [] + }; + } else { + return { + changes: [new I1(new or(1, 2), new or(1, t.getLineCount() + 1), [new Kx(e.getFullModelRange(), t.getFullModelRange())])], + identical: false, + quitEarly: false, + moves: [] + }; + } + } + const r = JSON.stringify([e.uri.toString(), t.uri.toString()]); + const o = JSON.stringify([e.id, t.id, e.getAlternativeVersionId(), t.getAlternativeVersionId(), JSON.stringify(s)]); + const a = nG.e.get(r); + if (a && a.context === o) { + return a.result; + } + const l = ic.create(); + const c = await this.f.computeDiff(e.uri, t.uri, s, this.b); + const u = l.elapsed(); + this.g.publicLog2("diffEditor.computeDiff", { + timeMs: u, + timedOut: c?.quitEarly ?? true, + detectedMoves: s.computeMoves ? c?.moves.length ?? 0 : -1 + }); + if (n.isCancellationRequested) { + return { + changes: [], + identical: false, + quitEarly: true, + moves: [] + }; + } + if (!c) { + throw new Error("no diff result available"); + } + if (nG.e.size > 10) { + nG.e.delete(nG.e.keys().next().value); + } + nG.e.set(r, { + result: c, + context: o + }); + return c; + } + setOptions(e) { + let t = false; + if (e.diffAlgorithm && this.b !== e.diffAlgorithm) { + this.d?.dispose(); + this.d = undefined; + this.b = e.diffAlgorithm; + if (typeof e.diffAlgorithm != "string") { + this.d = e.diffAlgorithm.onDidChange(() => this.a.fire()); + } + t = true; + } + if (t) { + this.a.fire(); + } + } +}; +TXt = nG = __decorate([__param(1, Fu), __param(2, Ot)], TXt); +Nf(); +jp(); +Jt(); +Ut(); +jp(); +var mO = class n9i { + static trivial(e, t) { + return new n9i([new oy(uo.ofLength(e.length), uo.ofLength(t.length))], false); + } + static trivialTimedOut(e, t) { + return new n9i([new oy(uo.ofLength(e.length), uo.ofLength(t.length))], true); + } + constructor(e, t) { + this.diffs = e; + this.hitTimeout = t; + } +}; +var oy = class D3 { + static invert(e, t) { + const s = []; + eqi(e, (n, r) => { + s.push(D3.fromOffsetPairs(n ? n.getEndExclusives() : rG.zero, r ? r.getStarts() : new rG(t, (n ? n.seq2Range.endExclusive - n.seq1Range.endExclusive : 0) + t))); + }); + return s; + } + static fromOffsetPairs(e, t) { + return new D3(new uo(e.offset1, t.offset1), new uo(e.offset2, t.offset2)); + } + static assertSorted(e) { + let t; + for (const s of e) { + if (t && (!(t.seq1Range.endExclusive <= s.seq1Range.start) || !(t.seq2Range.endExclusive <= s.seq2Range.start))) { + throw new co("Sequence diffs must be sorted"); + } + t = s; + } + } + constructor(e, t) { + this.seq1Range = e; + this.seq2Range = t; + } + swap() { + return new D3(this.seq2Range, this.seq1Range); + } + toString() { + return `${this.seq1Range} <-> ${this.seq2Range}`; + } + join(e) { + return new D3(this.seq1Range.join(e.seq1Range), this.seq2Range.join(e.seq2Range)); + } + delta(e) { + if (e === 0) { + return this; + } else { + return new D3(this.seq1Range.delta(e), this.seq2Range.delta(e)); + } + } + deltaStart(e) { + if (e === 0) { + return this; + } else { + return new D3(this.seq1Range.deltaStart(e), this.seq2Range.deltaStart(e)); + } + } + deltaEnd(e) { + if (e === 0) { + return this; + } else { + return new D3(this.seq1Range.deltaEnd(e), this.seq2Range.deltaEnd(e)); + } + } + intersectsOrTouches(e) { + return this.seq1Range.intersectsOrTouches(e.seq1Range) || this.seq2Range.intersectsOrTouches(e.seq2Range); + } + intersect(e) { + const t = this.seq1Range.intersect(e.seq1Range); + const s = this.seq2Range.intersect(e.seq2Range); + if (!!t && !!s) { + return new D3(t, s); + } + } + getStarts() { + return new rG(this.seq1Range.start, this.seq2Range.start); + } + getEndExclusives() { + return new rG(this.seq1Range.endExclusive, this.seq2Range.endExclusive); + } +}; +var rG = class TFt { + static { + this.zero = new TFt(0, 0); + } + static { + this.max = new TFt(Number.MAX_SAFE_INTEGER, Number.MAX_SAFE_INTEGER); + } + constructor(e, t) { + this.offset1 = e; + this.offset2 = t; + } + toString() { + return `${this.offset1} <-> ${this.offset2}`; + } + delta(e) { + if (e === 0) { + return this; + } else { + return new TFt(this.offset1 + e, this.offset2 + e); + } + } + equals(e) { + return this.offset1 === e.offset1 && this.offset2 === e.offset2; + } +}; +var vpt = class zOn { + static { + this.instance = new zOn(); + } + isValid() { + return true; + } +}; +var cdr = class { + constructor(i, e) { + this.g = i; + this.h = e; + this.c = Date.now(); + this.e = 0; + this.f = true; + if (i <= 0) { + throw new co("timeout must be positive"); + } + this.d = this.c + i; + } + isValid() { + this.e++; + if (this.f === false || this.e % 25 != 0) { + return this.f; + } else { + if (!(Date.now() < this.d) && this.f) { + this.f = false; + } + return this.f; + } + } + disable() { + this.g = Number.MAX_SAFE_INTEGER; + this.isValid = () => true; + this.f = true; + } +}; +var qwe = class { + constructor(i, e) { + this.width = i; + this.height = e; + this.a = []; + this.a = new Array(i * e); + } + get(i, e) { + return this.a[i + e * this.width]; + } + set(i, e, t) { + this.a[i + e * this.width] = t; + } +}; +function PXt(i) { + return i === 32 || i === 9; +} +var TBs = class r9i { + static { + this.a = new Map(); + } + static b(e) { + let t = this.a.get(e); + if (t === undefined) { + t = this.a.size; + this.a.set(e, t); + } + return t; + } + constructor(e, t, s) { + this.range = e; + this.lines = t; + this.source = s; + this.d = []; + let n = 0; + for (let r = e.startLineNumber - 1; r < e.endLineNumberExclusive - 1; r++) { + const o = t[r]; + for (let l = 0; l < o.length; l++) { + n++; + const c = o[l]; + const u = r9i.b(c); + this.d[u] = (this.d[u] || 0) + 1; + } + n++; + const a = r9i.b(` +`); + this.d[a] = (this.d[a] || 0) + 1; + } + this.c = n; + } + computeSimilarity(e) { + let t = 0; + const s = Math.max(this.d.length, e.d.length); + for (let n = 0; n < s; n++) { + t += Math.abs((this.d[n] ?? 0) - (e.d[n] ?? 0)); + } + return 1 - t / (this.c + e.c); + } +}; +var udr = class { + compute(i, e, t = vpt.instance, s) { + if (i.length === 0 || e.length === 0) { + return mO.trivial(i, e); + } + const n = new qwe(i.length * 2 + 1, e.length + 1); + const r = new qwe(i.length * 2 + 1, e.length + 1); + for (let h = 0; h <= e.length; h++) { + n.set(0, h, h); + if (h > 0) { + r.set(0, h, true); + } else { + r.set(0, h, false); + } + } + for (let h = 0; h <= i.length * 2; h++) { + n.set(h, 0, Math.floor((h + 1) / 2)); + r.set(h, 0, false); + } + for (let h = 1; h <= e.length; h++) { + for (let g = 1; g <= i.length * 2; g++) { + if (!t.isValid()) { + return mO.trivialTimedOut(i, e); + } + if (g % 2 === 0) { + const p = n.get(g, h - 1) + 1; + const b = n.get(g - 1, h); + if (p < b) { + n.set(g, h, p); + r.set(g, h, true); + } else { + n.set(g, h, b); + r.set(g, h, false); + } + } else { + const p = n.get(g - 1, h) + 0.4; + const b = i.getElement(Math.floor(g / 2)) === e.getElement(h - 1) ? n.get(g - 1, h - 1) : Number.MAX_VALUE; + if (b < p) { + n.set(g, h, b); + r.set(g, h, true); + } else { + n.set(g, h, p); + r.set(g, h, false); + } + } + } + } + let o = Number.MAX_VALUE; + let a = -1; + for (let h = 0; h <= i.length * 2; h++) { + const g = n.get(h, e.length); + if (g < o) { + o = g; + a = h; + } + } + let l = []; + let c = a; + let u = e.length; + if (c <= i.length * 2 - 2) { + l.push(new oy(new uo(Math.floor((c + 1) / 2), i.length), new uo(u, u))); + } + let d; + while (c >= 0 && u >= 0) { + if (r.get(c, u)) { + if (c % 2 === 0) { + if (d === undefined) { + d = { + x: Math.floor(c / 2), + y: u + }; + } + u -= 1; + } else { + if (d !== undefined) { + if (d.x !== Math.floor(c / 2) + 1 || d.y !== u) { + l.push(new oy(new uo(Math.floor(c / 2) + 1, d.x), new uo(u, d.y))); + } + d = undefined; + } + c -= 1; + u -= 1; + } + } else { + c % 2; + if (d === undefined) { + d = { + x: Math.floor((c + 1) / 2), + y: u + }; + } + c -= 1; + } + } + if (d !== undefined) { + if (d.x !== Math.floor(c / 2) + 1 || d.y !== u) { + l.push(new oy(new uo(Math.floor(c / 2) + 1, d.x), new uo(u, d.y))); + } + d = undefined; + } + l.reverse(); + return new mO(l, false); + } +}; +Jt(); +bm(); +Nf(); +jp(); +yt(); +var oG = class { + constructor(i, e, t) { + this.changes = i; + this.moves = e; + this.hitTimeout = t; + } +}; +var PBs = class JOn { + constructor(e, t) { + this.lineRangeMapping = e; + this.changes = t; + } + flip() { + return new JOn(this.lineRangeMapping.flip(), this.changes.map(e => e.flip())); + } +}; +jp(); +var ddr = class { + compute(i, e, t = vpt.instance, s) { + if (i.length === 0 || e.length === 0) { + return mO.trivial(i, e); + } + const n = new qwe(i.length, e.length); + const r = new qwe(i.length, e.length); + const o = new qwe(i.length, e.length); + for (let g = 0; g < i.length; g++) { + for (let p = 0; p < e.length; p++) { + if (!t.isValid()) { + return mO.trivialTimedOut(i, e); + } + const b = g === 0 ? 0 : n.get(g - 1, p); + const v = p === 0 ? 0 : n.get(g, p - 1); + let y; + if (i.getElement(g) === e.getElement(p)) { + if (g === 0 || p === 0) { + y = 0; + } else { + y = n.get(g - 1, p - 1); + } + if (g > 0 && p > 0 && r.get(g - 1, p - 1) === 3) { + y += o.get(g - 1, p - 1); + } + y += s ? s(g, p) : 1; + } else { + y = -1; + } + const w = Math.max(b, v, y); + if (w === y) { + const C = g > 0 && p > 0 ? o.get(g - 1, p - 1) : 0; + o.set(g, p, C + 1); + r.set(g, p, 3); + } else if (w === b) { + o.set(g, p, 0); + r.set(g, p, 1); + } else if (w === v) { + o.set(g, p, 0); + r.set(g, p, 2); + } + n.set(g, p, w); + } + } + const a = []; + let l = i.length; + let c = e.length; + function u(g, p) { + if (g + 1 !== l || p + 1 !== c) { + a.push(new oy(new uo(g + 1, l), new uo(p + 1, c))); + } + l = g; + c = p; + } + let d = i.length - 1; + let h = e.length - 1; + while (d >= 0 && h >= 0) { + if (r.get(d, h) === 3) { + u(d, h); + d--; + h--; + } else if (r.get(d, h) === 1) { + d--; + } else { + h--; + } + } + u(-1, -1); + a.reverse(); + return new mO(a, false); + } +}; +jp(); +var LBs = class { + compute(i, e, t = vpt.instance) { + if (i.length === 0 || e.length === 0) { + return mO.trivial(i, e); + } + const s = i; + const n = e; + function r(p, b) { + while (p < s.length && b < n.length && s.getElement(p) === n.getElement(b)) { + p++; + b++; + } + return p; + } + let o = 0; + const a = new hdr(); + a.set(0, r(0, 0)); + const l = new fdr(); + l.set(0, a.get(0) === 0 ? null : new RBs(null, 0, 0, a.get(0))); + let c = 0; + e: while (true) { + o++; + if (!t.isValid()) { + return mO.trivialTimedOut(s, n); + } + const p = -Math.min(o, n.length + o % 2); + const b = Math.min(o, s.length + o % 2); + for (c = p; c <= b; c += 2) { + let v = 0; + const y = c === b ? -1 : a.get(c + 1); + const w = c === p ? -1 : a.get(c - 1) + 1; + v++; + const C = Math.min(Math.max(y, w), s.length); + const S = C - c; + v++; + if (C > s.length || S > n.length) { + continue; + } + const x = r(C, S); + a.set(c, x); + const k = C === y ? l.get(c + 1) : l.get(c - 1); + l.set(c, x !== C ? new RBs(k, C, S, x - C) : k); + if (a.get(c) === s.length && a.get(c) - c === n.length) { + break e; + } + } + } + let u = l.get(c); + const d = []; + let h = s.length; + let g = n.length; + while (true) { + const p = u ? u.x + u.length : 0; + const b = u ? u.y + u.length : 0; + if (p !== h || b !== g) { + d.push(new oy(new uo(p, h), new uo(b, g))); + } + if (!u) { + break; + } + h = u.x; + g = u.y; + u = u.prev; + } + d.reverse(); + return new mO(d, false); + } +}; +var RBs = class { + constructor(i, e, t, s) { + this.prev = i; + this.x = e; + this.y = t; + this.length = s; + } +}; +var hdr = class { + constructor() { + this.a = new Int32Array(10); + this.b = new Int32Array(10); + } + get(i) { + if (i < 0) { + i = -i - 1; + return this.b[i]; + } else { + return this.a[i]; + } + } + set(i, e) { + if (i < 0) { + i = -i - 1; + if (i >= this.b.length) { + const t = this.b; + this.b = new Int32Array(t.length * 2); + this.b.set(t); + } + this.b[i] = e; + } else { + if (i >= this.a.length) { + const t = this.a; + this.a = new Int32Array(t.length * 2); + this.a.set(t); + } + this.a[i] = e; + } + } +}; +var fdr = class { + constructor() { + this.a = []; + this.b = []; + } + get(i) { + if (i < 0) { + i = -i - 1; + return this.b[i]; + } else { + return this.a[i]; + } + } + set(i, e) { + if (i < 0) { + i = -i - 1; + this.b[i] = e; + } else { + this.a[i] = e; + } + } +}; +Jt(); +qg(); +In(); +Nf(); +qg(); +jp(); +Rs(); +yt(); +var ypt = class { + constructor(i, e, t) { + this.lines = i; + this.g = e; + this.considerWhitespaceChanges = t; + this.b = []; + this.c = []; + this.d = []; + this.f = []; + this.c.push(0); + for (let s = this.g.startLineNumber; s <= this.g.endLineNumber; s++) { + let n = i[s - 1]; + let r = 0; + if (s === this.g.startLineNumber && this.g.startColumn > 1) { + r = this.g.startColumn - 1; + n = n.substring(r); + } + this.d.push(r); + let o = 0; + if (!t) { + const l = n.trimStart(); + o = n.length - l.length; + n = l.trimEnd(); + } + this.f.push(o); + const a = s === this.g.endLineNumber ? Math.min(this.g.endColumn - 1 - r - o, n.length) : n.length; + for (let l = 0; l < a; l++) { + this.b.push(n.charCodeAt(l)); + } + if (s < this.g.endLineNumber) { + this.b.push(10); + this.c.push(this.b.length); + } + } + } + toString() { + return `Slice: "${this.text}"`; + } + get text() { + return this.getText(new uo(0, this.length)); + } + getText(i) { + return this.b.slice(i.start, i.endExclusive).map(e => String.fromCharCode(e)).join(""); + } + getElement(i) { + return this.b[i]; + } + get length() { + return this.b.length; + } + getBoundaryScore(i) { + const e = ABs(i > 0 ? this.b[i - 1] : -1); + const t = ABs(i < this.b.length ? this.b[i] : -1); + if (e === 7 && t === 8) { + return 0; + } + if (e === 8) { + return 150; + } + let s = 0; + if (e !== t) { + s += 10; + if (e === 0 && t === 1) { + s += 1; + } + } + s += MBs(e); + s += MBs(t); + return s; + } + translateOffset(i, e = "right") { + const t = EZ(this.c, n => n <= i); + const s = i - this.c[t]; + return new je(this.g.startLineNumber + t, 1 + this.d[t] + s + (s === 0 && e === "left" ? 0 : this.f[t])); + } + translateRange(i) { + const e = this.translateOffset(i.start, "right"); + const t = this.translateOffset(i.endExclusive, "left"); + if (t.isBefore(e)) { + return Z.fromPositions(t, t); + } else { + return Z.fromPositions(e, t); + } + } + findWordContaining(i) { + if (i < 0 || i >= this.b.length || !LXt(this.b[i])) { + return; + } + let e = i; + while (e > 0 && LXt(this.b[e - 1])) { + e--; + } + let t = i; + while (t < this.b.length && LXt(this.b[t])) { + t++; + } + return new uo(e, t); + } + countLinesIn(i) { + return this.translateOffset(i.endExclusive).lineNumber - this.translateOffset(i.start).lineNumber; + } + isStronglyEqual(i, e) { + return this.b[i] === this.b[e]; + } + extendToFullLines(i) { + const e = kZ(this.c, s => s <= i.start) ?? 0; + const t = EVn(this.c, s => i.endExclusive <= s) ?? this.b.length; + return new uo(e, t); + } +}; +function LXt(i) { + return i >= 97 && i <= 122 || i >= 65 && i <= 90 || i >= 48 && i <= 57; +} +var NBs; +(function (i) { + i[i.WordLower = 0] = "WordLower"; + i[i.WordUpper = 1] = "WordUpper"; + i[i.WordNumber = 2] = "WordNumber"; + i[i.End = 3] = "End"; + i[i.Other = 4] = "Other"; + i[i.Separator = 5] = "Separator"; + i[i.Space = 6] = "Space"; + i[i.LineBreakCR = 7] = "LineBreakCR"; + i[i.LineBreakLF = 8] = "LineBreakLF"; +})(NBs ||= {}); +var gdr = { + 0: 0, + 1: 0, + 2: 0, + 3: 10, + 4: 2, + 5: 30, + 6: 3, + 7: 10, + 8: 10 +}; +function MBs(i) { + return gdr[i]; +} +function ABs(i) { + if (i === 10) { + return 8; + } else if (i === 13) { + return 7; + } else if (PXt(i)) { + return 6; + } else if (i >= 97 && i <= 122) { + return 0; + } else if (i >= 65 && i <= 90) { + return 1; + } else if (i >= 48 && i <= 57) { + return 2; + } else if (i === -1) { + return 3; + } else if (i === 44 || i === 59) { + return 5; + } else { + return 4; + } +} +yt(); +function pdr(i, e, t, s, n, r) { + let { + moves: o, + excludedChanges: a + } = bdr(i, e, t, r); + if (!r.isValid()) { + return []; + } + const l = i.filter(u => !a.has(u)); + const c = vdr(l, s, n, e, t, r); + WBt(o, c); + o = ydr(o); + o = o.filter(u => { + const d = u.original.toOffsetRange().slice(e).map(g => g.trim()); + return d.join(` +`).length >= 15 && mdr(d, g => g.length >= 2) >= 2; + }); + o = wdr(i, o); + return o; +} +function mdr(i, e) { + let t = 0; + for (const s of i) { + if (e(s)) { + t++; + } + } + return t; +} +function bdr(i, e, t, s) { + const n = []; + const r = i.filter(l => l.modified.isEmpty && l.original.length >= 3).map(l => new TBs(l.original, e, l)); + const o = new Set(i.filter(l => l.original.isEmpty && l.modified.length >= 3).map(l => new TBs(l.modified, t, l))); + const a = new Set(); + for (const l of r) { + let c = -1; + let u; + for (const d of o) { + const h = l.computeSimilarity(d); + if (h > c) { + c = h; + u = d; + } + } + if (c > 0.9 && u) { + o.delete(u); + n.push(new lP(l.range, u.range)); + a.add(l.source); + a.add(u.source); + } + if (!s.isValid()) { + return { + moves: n, + excludedChanges: a + }; + } + } + return { + moves: n, + excludedChanges: a + }; +} +function vdr(i, e, t, s, n, r) { + const o = []; + const a = new TZ(); + for (const h of i) { + for (let g = h.original.startLineNumber; g < h.original.endLineNumberExclusive - 2; g++) { + const p = `${e[g - 1]}:${e[g + 1 - 1]}:${e[g + 2 - 1]}`; + a.add(p, { + range: new or(g, g + 3) + }); + } + } + const l = []; + i.sort(jg(h => h.modified.startLineNumber, Ly)); + for (const h of i) { + let g = []; + for (let p = h.modified.startLineNumber; p < h.modified.endLineNumberExclusive - 2; p++) { + const b = `${t[p - 1]}:${t[p + 1 - 1]}:${t[p + 2 - 1]}`; + const v = new or(p, p + 3); + const y = []; + a.forEach(b, ({ + range: w + }) => { + for (const S of g) { + if (S.originalLineRange.endLineNumberExclusive + 1 === w.endLineNumberExclusive && S.modifiedLineRange.endLineNumberExclusive + 1 === v.endLineNumberExclusive) { + S.originalLineRange = new or(S.originalLineRange.startLineNumber, w.endLineNumberExclusive); + S.modifiedLineRange = new or(S.modifiedLineRange.startLineNumber, v.endLineNumberExclusive); + y.push(S); + return; + } + } + const C = { + modifiedLineRange: v, + originalLineRange: w + }; + l.push(C); + y.push(C); + }); + g = y; + } + if (!r.isValid()) { + return []; + } + } + l.sort(oqi(jg(h => h.modifiedLineRange.length, Ly))); + const c = new j9(); + const u = new j9(); + for (const h of l) { + const g = h.modifiedLineRange.startLineNumber - h.originalLineRange.startLineNumber; + const p = c.subtractFrom(h.modifiedLineRange); + const b = u.subtractFrom(h.originalLineRange).getWithDelta(g); + const v = p.getIntersection(b); + for (const y of v.ranges) { + if (y.length < 3) { + continue; + } + const w = y; + const C = y.delta(-g); + o.push(new lP(C, w)); + c.addRange(w); + u.addRange(C); + } + } + o.sort(jg(h => h.original.startLineNumber, Ly)); + const d = new BBt(i); + for (let h = 0; h < o.length; h++) { + const g = o[h]; + const p = d.findLastMonotonous(k => k.original.startLineNumber <= g.original.startLineNumber); + const b = kZ(i, k => k.modified.startLineNumber <= g.modified.startLineNumber); + const v = Math.max(g.original.startLineNumber - p.original.startLineNumber, g.modified.startLineNumber - b.modified.startLineNumber); + const y = d.findLastMonotonous(k => k.original.startLineNumber < g.original.endLineNumberExclusive); + const w = kZ(i, k => k.modified.startLineNumber < g.modified.endLineNumberExclusive); + const C = Math.max(y.original.endLineNumberExclusive - g.original.endLineNumberExclusive, w.modified.endLineNumberExclusive - g.modified.endLineNumberExclusive); + let S; + for (S = 0; S < v; S++) { + const k = g.original.startLineNumber - S - 1; + const E = g.modified.startLineNumber - S - 1; + if (k > s.length || E > n.length || c.contains(E) || u.contains(k) || !$Bs(s[k - 1], n[E - 1], r)) { + break; + } + } + if (S > 0) { + u.addRange(new or(g.original.startLineNumber - S, g.original.startLineNumber)); + c.addRange(new or(g.modified.startLineNumber - S, g.modified.startLineNumber)); + } + let x; + for (x = 0; x < C; x++) { + const k = g.original.endLineNumberExclusive + x; + const E = g.modified.endLineNumberExclusive + x; + if (k > s.length || E > n.length || c.contains(E) || u.contains(k) || !$Bs(s[k - 1], n[E - 1], r)) { + break; + } + } + if (x > 0) { + u.addRange(new or(g.original.endLineNumberExclusive, g.original.endLineNumberExclusive + x)); + c.addRange(new or(g.modified.endLineNumberExclusive, g.modified.endLineNumberExclusive + x)); + } + if (S > 0 || x > 0) { + o[h] = new lP(new or(g.original.startLineNumber - S, g.original.endLineNumberExclusive + x), new or(g.modified.startLineNumber - S, g.modified.endLineNumberExclusive + x)); + } + } + return o; +} +function $Bs(i, e, t) { + if (i.trim() === e.trim()) { + return true; + } + if (i.length > 300 && e.length > 300) { + return false; + } + const n = new LBs().compute(new ypt([i], new Z(1, 1, 1, i.length), false), new ypt([e], new Z(1, 1, 1, e.length), false), t); + let r = 0; + const o = oy.invert(n.diffs, i.length); + for (const u of o) { + u.seq1Range.forEach(d => { + if (!PXt(i.charCodeAt(d))) { + r++; + } + }); + } + function a(u) { + let d = 0; + for (let h = 0; h < i.length; h++) { + if (!PXt(u.charCodeAt(h))) { + d++; + } + } + return d; + } + const l = a(i.length > e.length ? i : e); + return r / l > 0.6 && l > 10; +} +function ydr(i) { + if (i.length === 0) { + return i; + } + i.sort(jg(t => t.original.startLineNumber, Ly)); + const e = [i[0]]; + for (let t = 1; t < i.length; t++) { + const s = e[e.length - 1]; + const n = i[t]; + const r = n.original.startLineNumber - s.original.endLineNumberExclusive; + const o = n.modified.startLineNumber - s.modified.endLineNumberExclusive; + if (r >= 0 && o >= 0 && r + o <= 2) { + e[e.length - 1] = s.join(n); + continue; + } + e.push(n); + } + return e; +} +function wdr(i, e) { + const t = new BBt(i); + e = e.filter(s => { + const n = t.findLastMonotonous(a => a.original.startLineNumber < s.original.endLineNumberExclusive) || new lP(new or(1, 1), new or(1, 1)); + const r = kZ(i, a => a.modified.startLineNumber < s.modified.endLineNumberExclusive); + return n !== r; + }); + return e; +} +Jt(); +jp(); +function RXt(i, e, t) { + let s = t; + s = FBs(i, e, s); + s = FBs(i, e, s); + s = Cdr(i, e, s); + return s; +} +function FBs(i, e, t) { + if (t.length === 0) { + return t; + } + const s = []; + s.push(t[0]); + for (let r = 1; r < t.length; r++) { + const o = s[s.length - 1]; + let a = t[r]; + if (a.seq1Range.isEmpty || a.seq2Range.isEmpty) { + const l = a.seq1Range.start - o.seq1Range.endExclusive; + let c; + for (c = 1; c <= l && i.getElement(a.seq1Range.start - c) === i.getElement(a.seq1Range.endExclusive - c) && e.getElement(a.seq2Range.start - c) === e.getElement(a.seq2Range.endExclusive - c); c++); + c--; + if (c === l) { + s[s.length - 1] = new oy(new uo(o.seq1Range.start, a.seq1Range.endExclusive - l), new uo(o.seq2Range.start, a.seq2Range.endExclusive - l)); + continue; + } + a = a.delta(-c); + } + s.push(a); + } + const n = []; + for (let r = 0; r < s.length - 1; r++) { + const o = s[r + 1]; + let a = s[r]; + if (a.seq1Range.isEmpty || a.seq2Range.isEmpty) { + const l = o.seq1Range.start - a.seq1Range.endExclusive; + let c; + for (c = 0; c < l && !!i.isStronglyEqual(a.seq1Range.start + c, a.seq1Range.endExclusive + c) && !!e.isStronglyEqual(a.seq2Range.start + c, a.seq2Range.endExclusive + c); c++); + if (c === l) { + s[r + 1] = new oy(new uo(a.seq1Range.start + l, o.seq1Range.endExclusive), new uo(a.seq2Range.start + l, o.seq2Range.endExclusive)); + continue; + } + if (c > 0) { + a = a.delta(c); + } + } + n.push(a); + } + if (s.length > 0) { + n.push(s[s.length - 1]); + } + return n; +} +function Cdr(i, e, t) { + if (!i.getBoundaryScore || !e.getBoundaryScore) { + return t; + } + for (let s = 0; s < t.length; s++) { + const n = s > 0 ? t[s - 1] : undefined; + const r = t[s]; + const o = s + 1 < t.length ? t[s + 1] : undefined; + const a = new uo(n ? n.seq1Range.endExclusive + 1 : 0, o ? o.seq1Range.start - 1 : i.length); + const l = new uo(n ? n.seq2Range.endExclusive + 1 : 0, o ? o.seq2Range.start - 1 : e.length); + if (r.seq1Range.isEmpty) { + t[s] = OBs(r, i, e, a, l); + } else if (r.seq2Range.isEmpty) { + t[s] = OBs(r.swap(), e, i, l, a).swap(); + } + } + return t; +} +function OBs(i, e, t, s, n) { + let o = 1; + while (i.seq1Range.start - o >= s.start && i.seq2Range.start - o >= n.start && t.isStronglyEqual(i.seq2Range.start - o, i.seq2Range.endExclusive - o) && o < 100) { + o++; + } + o--; + let a = 0; + while (i.seq1Range.start + a < s.endExclusive && i.seq2Range.endExclusive + a < n.endExclusive && t.isStronglyEqual(i.seq2Range.start + a, i.seq2Range.endExclusive + a) && a < 100) { + a++; + } + if (o === 0 && a === 0) { + return i; + } + let l = 0; + let c = -1; + for (let u = -o; u <= a; u++) { + const d = i.seq2Range.start + u; + const h = i.seq2Range.endExclusive + u; + const g = i.seq1Range.start + u; + const p = e.getBoundaryScore(g) + t.getBoundaryScore(d) + t.getBoundaryScore(h); + if (p > c) { + c = p; + l = u; + } + } + return i.delta(l); +} +function Sdr(i, e, t) { + const s = []; + for (const n of t) { + const r = s[s.length - 1]; + if (!r) { + s.push(n); + continue; + } + if (n.seq1Range.start - r.seq1Range.endExclusive <= 2 || n.seq2Range.start - r.seq2Range.endExclusive <= 2) { + s[s.length - 1] = new oy(r.seq1Range.join(n.seq1Range), r.seq2Range.join(n.seq2Range)); + } else { + s.push(n); + } + } + return s; +} +function xdr(i, e, t) { + const s = oy.invert(t, i.length); + const n = []; + let r = new rG(0, 0); + function o(l, c) { + if (l.offset1 < r.offset1 || l.offset2 < r.offset2) { + return; + } + const u = i.findWordContaining(l.offset1); + const d = e.findWordContaining(l.offset2); + if (!u || !d) { + return; + } + let h = new oy(u, d); + const g = h.intersect(c); + let p = g.seq1Range.length; + let b = g.seq2Range.length; + while (s.length > 0) { + const v = s[0]; + if (!v.seq1Range.intersects(h.seq1Range) && !v.seq2Range.intersects(h.seq2Range)) { + break; + } + const w = i.findWordContaining(v.seq1Range.start); + const C = e.findWordContaining(v.seq2Range.start); + const S = new oy(w, C); + const x = S.intersect(v); + p += x.seq1Range.length; + b += x.seq2Range.length; + h = h.join(S); + if (h.seq1Range.endExclusive >= v.seq1Range.endExclusive) { + s.shift(); + } else { + break; + } + } + if (p + b < (h.seq1Range.length + h.seq2Range.length) * 2 / 3) { + n.push(h); + } + r = h.getEndExclusives(); + } + while (s.length > 0) { + const l = s.shift(); + if (!l.seq1Range.isEmpty) { + o(l.getStarts(), l); + o(l.getEndExclusives().delta(-1), l); + } + } + return kdr(t, n); +} +function kdr(i, e) { + const t = []; + while (i.length > 0 || e.length > 0) { + const s = i[0]; + const n = e[0]; + let r; + if (s && (!n || s.seq1Range.start < n.seq1Range.start)) { + r = i.shift(); + } else { + r = e.shift(); + } + if (t.length > 0 && t[t.length - 1].seq1Range.endExclusive >= r.seq1Range.start) { + t[t.length - 1] = t[t.length - 1].join(r); + } else { + t.push(r); + } + } + return t; +} +function Edr(i, e, t) { + let s = t; + if (s.length === 0) { + return s; + } + let n = 0; + let r; + do { + r = false; + const a = [s[0]]; + for (let l = 1; l < s.length; l++) { + let c = function (g, p) { + const b = new uo(d.seq1Range.endExclusive, u.seq1Range.start); + return i.getText(b).replace(/\s/g, "").length <= 4 && (g.seq1Range.length + g.seq2Range.length > 5 || p.seq1Range.length + p.seq2Range.length > 5); + }; + var o = c; + const u = s[l]; + const d = a[a.length - 1]; + if (c(d, u)) { + r = true; + a[a.length - 1] = a[a.length - 1].join(u); + } else { + a.push(u); + } + } + s = a; + } while (n++ < 10 && r); + return s; +} +function Idr(i, e, t) { + let s = t; + if (s.length === 0) { + return s; + } + let n = 0; + let r; + do { + r = false; + const l = [s[0]]; + for (let c = 1; c < s.length; c++) { + let u = function (p, b) { + const v = new uo(h.seq1Range.endExclusive, d.seq1Range.start); + if (i.countLinesIn(v) > 5 || v.length > 500) { + return false; + } + const w = i.getText(v).trim(); + if (w.length > 20 || w.split(/\r\n|\r|\n/).length > 1) { + return false; + } + const C = i.countLinesIn(p.seq1Range); + const S = p.seq1Range.length; + const x = e.countLinesIn(p.seq2Range); + const k = p.seq2Range.length; + const E = i.countLinesIn(b.seq1Range); + const D = b.seq1Range.length; + const P = e.countLinesIn(b.seq2Range); + const R = b.seq2Range.length; + const L = 130; + function F(O) { + return Math.min(O, L); + } + return Math.pow(Math.pow(F(C * 40 + S), 1.5) + Math.pow(F(x * 40 + k), 1.5), 1.5) + Math.pow(Math.pow(F(E * 40 + D), 1.5) + Math.pow(F(P * 40 + R), 1.5), 1.5) > (L ** 1.5) ** 1.5 * 1.3; + }; + var o = u; + const d = s[c]; + const h = l[l.length - 1]; + if (u(h, d)) { + r = true; + l[l.length - 1] = l[l.length - 1].join(d); + } else { + l.push(d); + } + } + s = l; + } while (n++ < 10 && r); + const a = []; + PVn(s, (l, c, u) => { + let d = c; + function h(w) { + return w.length > 0 && w.trim().length <= 3 && c.seq1Range.length + c.seq2Range.length > 100; + } + const g = i.extendToFullLines(c.seq1Range); + const p = i.getText(new uo(g.start, c.seq1Range.start)); + if (h(p)) { + d = d.deltaStart(-p.length); + } + const b = i.getText(new uo(c.seq1Range.endExclusive, g.endExclusive)); + if (h(b)) { + d = d.deltaEnd(b.length); + } + const v = oy.fromOffsetPairs(l ? l.getEndExclusives() : rG.zero, u ? u.getStarts() : rG.max); + const y = d.intersect(v); + if (a.length > 0 && y.getStarts().equals(a[a.length - 1].getEndExclusives())) { + a[a.length - 1] = a[a.length - 1].join(y); + } else { + a.push(y); + } + }); + return a; +} +var _Bs = class { + constructor(i, e) { + this.a = i; + this.b = e; + } + getElement(i) { + return this.a[i]; + } + get length() { + return this.a.length; + } + getBoundaryScore(i) { + const e = i === 0 ? 0 : BBs(this.b[i - 1]); + const t = i === this.b.length ? 0 : BBs(this.b[i]); + return 1000 - (e + t); + } + getText(i) { + return this.b.slice(i.start, i.endExclusive).join(` +`); + } + isStronglyEqual(i, e) { + return this.b[i] === this.b[e]; + } +}; +function BBs(i) { + let e = 0; + while (e < i.length && (i.charCodeAt(e) === 32 || i.charCodeAt(e) === 9)) { + e++; + } + return e; +} +var UBs = class { + constructor() { + this.e = new ddr(); + this.f = new LBs(); + this.g = new udr(); + } + computeDiff(i, e, t) { + if (i.length <= 1 && Go(i, e, (E, D) => E === D)) { + return new oG([], [], false); + } + if (i.length === 1 && i[0].length === 0 || e.length === 1 && e[0].length === 0) { + return new oG([new I1(new or(1, i.length + 1), new or(1, e.length + 1), [new Kx(new Z(1, 1, i.length, i[i.length - 1].length + 1), new Z(1, 1, e.length, e[e.length - 1].length + 1))])], [], false); + } + const s = t.maxComputationTimeMs === 0 ? vpt.instance : new cdr(t.maxComputationTimeMs, t.shouldGracefullyFallBackOnTimeout); + const n = !t.ignoreTrimWhitespace; + const r = new Map(); + function o(E) { + let D = r.get(E); + if (D === undefined) { + D = r.size; + r.set(E, D); + } + return D; + } + const a = i.length * e.length < 1000000 && t.onlyCareAboutPrefixOfOriginalLines === true; + const l = i.map(E => o(a ? E : E.trim())); + const c = e.map(E => o(a ? E : E.trim())); + const u = i.every(E => E.trim().length === 0); + const d = new _Bs(l, i); + const h = new _Bs(c, e); + const g = a ? u ? mO.trivial(d, h) : this.g.compute(d, h, s, (E, D) => i[E] === e[D] ? e[D].length === 0 ? 0.1 : 1 + Math.log(1 + e[D].length) : 0.99) : d.length + h.length < 1700 ? this.e.compute(d, h, s, (E, D) => i[E] === e[D] ? e[D].length === 0 ? 0.1 : 1 + Math.log(1 + e[D].length) : 0.99) : this.f.compute(d, h, s); + let p = g.diffs; + let b = g.hitTimeout; + if (a) { + const E = p.map(D => new I1(new or(D.seq1Range.start + 1, D.seq1Range.endExclusive + 1), new or(D.seq2Range.start + 1, D.seq2Range.endExclusive + 1), [])); + return new oG(E, [], b); + } + const v = b; + p = RXt(d, h, p); + p = Edr(d, h, p); + const y = []; + const w = E => { + if (n) { + for (let D = 0; D < E; D++) { + const P = C + D; + const R = S + D; + if (i[P] !== e[R]) { + const L = this.j(i, e, new oy(new uo(P, P + 1), new uo(R, R + 1)), s, n); + for (const F of L.mappings) { + y.push(F); + } + if (L.hitTimeout) { + b = true; + } + } + } + } + }; + let C = 0; + let S = 0; + for (const E of p) { + Kk(() => E.seq1Range.start - C === E.seq2Range.start - S); + const D = E.seq1Range.start - C; + w(D); + C = E.seq1Range.endExclusive; + S = E.seq2Range.endExclusive; + const P = this.j(i, e, E, s, n); + if (P.hitTimeout) { + b = true; + } + for (const R of P.mappings) { + y.push(R); + } + } + w(i.length - C); + const x = bpt(y, new ppt(i), new ppt(e)); + let k = []; + if (t.computeMoves) { + k = this.h(x, i, e, l, c, s, n); + } + Kk(() => { + function E(P, R) { + if (P.lineNumber < 1 || P.lineNumber > R.length) { + return false; + } + const L = R[P.lineNumber - 1]; + return !(P.column < 1) && !(P.column > L.length + 1); + } + function D(P, R) { + return !(P.startLineNumber < 1) && !(P.startLineNumber > R.length + 1) && !(P.endLineNumberExclusive < 1) && !(P.endLineNumberExclusive > R.length + 1); + } + for (const P of x) { + if (!P.innerChanges) { + return false; + } + for (const R of P.innerChanges) { + if (!E(R.modifiedRange.getStartPosition(), e) || !E(R.modifiedRange.getEndPosition(), e) || !E(R.originalRange.getStartPosition(), i) || !E(R.originalRange.getEndPosition(), i)) { + return false; + } + } + if (!D(P.modified, e) || !D(P.original, i)) { + return false; + } + } + return true; + }); + if (t.shouldGracefullyFallBackOnTimeout === true && b && !v) { + const E = p.map(D => new I1(new or(D.seq1Range.start + 1, D.seq1Range.endExclusive + 1), new or(D.seq2Range.start + 1, D.seq2Range.endExclusive + 1), [])); + return new oG(E, [], v); + } + return new oG(x, k, b); + } + h(i, e, t, s, n, r, o) { + return pdr(i, e, t, s, n, r).map(c => { + const u = this.j(e, t, new oy(c.original.toOffsetRange(), c.modified.toOffsetRange()), r, o); + const d = bpt(u.mappings, new ppt(e), new ppt(t), true); + return new PBs(c, d); + }); + } + j(i, e, t, s, n) { + const o = Ddr(t).toRangeMapping2(i, e); + const a = new ypt(i, o.originalRange, n); + const l = new ypt(e, o.modifiedRange, n); + const c = a.length + l.length < 500 ? this.e.compute(a, l, s) : this.f.compute(a, l, s); + const u = false; + let d = c.diffs; + if (u) { + oy.assertSorted(d); + } + d = RXt(a, l, d); + if (u) { + oy.assertSorted(d); + } + d = xdr(a, l, d); + if (u) { + oy.assertSorted(d); + } + d = Sdr(a, l, d); + if (u) { + oy.assertSorted(d); + } + d = Idr(a, l, d); + if (u) { + oy.assertSorted(d); + } + const h = d.map(g => new Kx(a.translateRange(g.seq1Range), l.translateRange(g.seq2Range))); + if (u) { + Kx.assertSorted(h); + } + return { + mappings: h, + hitTimeout: c.hitTimeout + }; + } +}; +function Ddr(i) { + return new lP(new or(i.seq1Range.start + 1, i.seq1Range.endExclusive + 1), new or(i.seq2Range.start + 1, i.seq2Range.endExclusive + 1)); +} +slt(); +Dns(); +zt(); +Jt(); +bm(); +var wpt = class extends H { + setActiveMovedText(e) { + this.q.set(e, undefined); + } + setHoveredMovedText(e) { + this.t.set(e, undefined); + } + constructor(e, t, s) { + super(); + this.model = e; + this.y = t; + this.z = s; + this.g = un(this, false); + this.isDiffUpToDate = this.g; + this.j = un(this, undefined); + this.diff = this.j; + this.n = un(this, undefined); + this.unchangedRegions = Is(this, a => this.y.hideUnchangedRegions.read(a) ? this.n.read(a)?.regions ?? [] : (Io(l => { + for (const c of this.n.get()?.regions || []) { + c.collapseAll(l); + } + }), [])); + this.movedTextToCompare = un(this, undefined); + this.q = un(this, undefined); + this.t = un(this, undefined); + this.activeMovedText = Is(this, a => this.movedTextToCompare.read(a) ?? this.t.read(a) ?? this.q.read(a)); + this.u = new Xi(); + this.w = Is(this, a => { + const l = this.z.createDiffProvider({ + diffAlgorithm: this.y.diffAlgorithm.read(a) + }); + const c = Wy("onDidChange", l.onDidChange); + return { + diffProvider: l, + onChangeSignal: c + }; + }); + this.D(Ue(() => this.u.cancel())); + const n = AI("contentChangedSignal"); + const r = this.D(new Vn(() => n.trigger(undefined), 200)); + this.D(Dn(a => { + const l = this.n.read(a); + if (!l || l.regions.some(p => p.isDragged.read(a))) { + return; + } + const c = l.originalDecorationIds.map(p => e.original.getDecorationRange(p)).map(p => p ? or.fromRangeInclusive(p) : undefined); + const u = l.modifiedDecorationIds.map(p => e.modified.getDecorationRange(p)).map(p => p ? or.fromRangeInclusive(p) : undefined); + const d = l.regions.map((p, b) => !c[b] || !u[b] ? undefined : new jwe(c[b].startLineNumber, u[b].startLineNumber, c[b].length, p.visibleLineCountTop.read(a), p.visibleLineCountBottom.read(a))).filter(to); + const h = []; + let g = false; + for (const p of pnt(d, (b, v) => b.getHiddenModifiedRange(a).endLineNumberExclusive === v.getHiddenModifiedRange(a).startLineNumber)) { + if (p.length > 1) { + g = true; + const b = p.reduce((y, w) => y + w.lineCount, 0); + const v = new jwe(p[0].originalLineNumber, p[0].modifiedLineNumber, b, p[0].visibleLineCountTop.get(), p[p.length - 1].visibleLineCountBottom.get()); + h.push(v); + } else { + h.push(p[0]); + } + } + if (g) { + const p = e.original.deltaDecorations(l.originalDecorationIds, h.map(v => ({ + range: v.originalUnchangedRange.toInclusiveRange(), + options: { + description: "unchanged" + } + }))); + const b = e.modified.deltaDecorations(l.modifiedDecorationIds, h.map(v => ({ + range: v.modifiedUnchangedRange.toInclusiveRange(), + options: { + description: "unchanged" + } + }))); + Io(v => { + this.n.set({ + regions: h, + originalDecorationIds: p, + modifiedDecorationIds: b + }, v); + }); + } + })); + const o = (a, l, c) => { + const u = jwe.fromDiffs(a.changes, e.original.getLineCount(), e.modified.getLineCount(), this.y.hideUnchangedRegionsMinimumLineCount.read(c), this.y.hideUnchangedRegionsContextLineCount.read(c)); + let d; + const h = this.n.get(); + if (h) { + const v = h.originalDecorationIds.map(S => e.original.getDecorationRange(S)).map(S => S ? or.fromRangeInclusive(S) : undefined); + const y = h.modifiedDecorationIds.map(S => e.modified.getDecorationRange(S)).map(S => S ? or.fromRangeInclusive(S) : undefined); + let C = Vur(h.regions.map((S, x) => { + if (!v[x] || !y[x]) { + return; + } + const k = v[x].length; + return new jwe(v[x].startLineNumber, y[x].startLineNumber, k, Math.min(S.visibleLineCountTop.get(), k), Math.min(S.visibleLineCountBottom.get(), k - S.visibleLineCountTop.get())); + }).filter(to), (S, x) => !x || S.modifiedLineNumber >= x.modifiedLineNumber + x.lineCount && S.originalLineNumber >= x.originalLineNumber + x.lineCount).map(S => new lP(S.getHiddenOriginalRange(c), S.getHiddenModifiedRange(c))); + C = lP.clip(C, or.ofLength(1, e.original.getLineCount()), or.ofLength(1, e.modified.getLineCount())); + d = lP.inverse(C, e.original.getLineCount(), e.modified.getLineCount()); + } + const g = []; + if (d) { + for (const v of u) { + const y = d.filter(w => w.original.intersectsStrict(v.originalUnchangedRange) && w.modified.intersectsStrict(v.modifiedUnchangedRange)); + g.push(...v.setVisibleRanges(y, l)); + } + } else { + g.push(...u); + } + const p = e.original.deltaDecorations(h?.originalDecorationIds || [], g.map(v => ({ + range: v.originalUnchangedRange.toInclusiveRange(), + options: { + description: "unchanged" + } + }))); + const b = e.modified.deltaDecorations(h?.modifiedDecorationIds || [], g.map(v => ({ + range: v.modifiedUnchangedRange.toInclusiveRange(), + options: { + description: "unchanged" + } + }))); + this.n.set({ + regions: g, + originalDecorationIds: p, + modifiedDecorationIds: b + }, l); + }; + this.D(e.modified.onDidChangeContent(a => { + if (this.j.get()) { + const c = G9.fromModelContentChanges(a.changes); + this.h; + e.original; + e.modified; + const u = undefined; + if (u) { + this.h = u; + Io(d => { + this.j.set(Cpt.fromDiffResult(this.h), d); + o(u, d); + const h = this.movedTextToCompare.get(); + this.movedTextToCompare.set(h ? this.h.moves.find(g => g.lineRangeMapping.modified.intersect(h.lineRangeMapping.modified)) : undefined, d); + }); + } + } + this.g.set(false, undefined); + r.schedule(); + })); + this.D(e.original.onDidChangeContent(a => { + if (this.j.get()) { + const c = G9.fromModelContentChanges(a.changes); + this.h; + e.original; + e.modified; + const u = undefined; + if (u) { + this.h = u; + Io(d => { + this.j.set(Cpt.fromDiffResult(this.h), d); + o(u, d); + const h = this.movedTextToCompare.get(); + this.movedTextToCompare.set(h ? this.h.moves.find(g => g.lineRangeMapping.modified.intersect(h.lineRangeMapping.modified)) : undefined, d); + }); + } + } + this.g.set(false, undefined); + r.schedule(); + })); + this.D(eh(async (a, l) => { + this.y.hideUnchangedRegionsMinimumLineCount.read(a); + this.y.hideUnchangedRegionsContextLineCount.read(a); + r.cancel(); + n.read(a); + const c = this.w.read(a); + c.onChangeSignal.read(a); + bD(UBs, a); + bD(RXt, a); + this.g.set(false, undefined); + let u = []; + l.add(e.original.onDidChangeContent(g => { + const p = G9.fromModelContentChanges(g.changes); + u = clt(u, p); + })); + let d = []; + l.add(e.modified.onDidChangeContent(g => { + const p = G9.fromModelContentChanges(g.changes); + d = clt(d, p); + })); + let h = await c.diffProvider.computeDiff(e.original, e.modified, { + ignoreTrimWhitespace: this.y.ignoreTrimWhitespace.read(a), + maxComputationTimeMs: this.y.maxComputationTimeMs.read(a), + computeMoves: this.y.showMoves.read(a) + }, this.u.token); + if (!this.u.token.isCancellationRequested && !e.original.isDisposed() && !e.modified.isDisposed()) { + h = Tdr(h, e.original, e.modified); + h = (e.original, e.modified, undefined) ?? h; + h = (e.original, e.modified, undefined) ?? h; + Io(g => { + o(h, g); + this.h = h; + const p = Cpt.fromDiffResult(h); + this.j.set(p, g); + this.g.set(true, g); + const b = this.movedTextToCompare.get(); + this.movedTextToCompare.set(b ? this.h.moves.find(v => v.lineRangeMapping.modified.intersect(b.lineRangeMapping.modified)) : undefined, g); + }); + } + })); + } + ensureModifiedLineIsVisible(e, t, s) { + if (this.diff.get()?.mappings.length === 0) { + return; + } + const n = this.n.get()?.regions || []; + for (const r of n) { + if (r.getHiddenModifiedRange(undefined).contains(e)) { + r.showModifiedLine(e, t, s); + return; + } + } + } + ensureOriginalLineIsVisible(e, t, s) { + if (this.diff.get()?.mappings.length === 0) { + return; + } + const n = this.n.get()?.regions || []; + for (const r of n) { + if (r.getHiddenOriginalRange(undefined).contains(e)) { + r.showOriginalLine(e, t, s); + return; + } + } + } + async waitForDiff() { + await C4(this.isDiffUpToDate, e => e); + } + serializeState() { + return { + collapsedRegions: this.n.get()?.regions.map(t => ({ + range: t.getHiddenModifiedRange(undefined).serialize() + })) + }; + } + restoreSerializedState(e) { + const t = e.collapsedRegions?.map(n => or.deserialize(n.range)); + const s = this.n.get(); + if (!!s && !!t) { + Io(n => { + for (const r of s.regions) { + for (const o of t) { + if (r.modifiedUnchangedRange.intersect(o)) { + r.setHiddenModifiedRange(o, n); + break; + } + } + } + }); + } + } +}; +wpt = __decorate([__param(2, IXt)], wpt); +function Tdr(i, e, t) { + return { + changes: i.changes.map(s => new I1(s.original, s.modified, s.innerChanges ? s.innerChanges.map(n => Pdr(n, e, t)) : undefined)), + moves: i.moves, + identical: i.identical, + quitEarly: i.quitEarly + }; +} +function Pdr(i, e, t) { + let s = i.originalRange; + let n = i.modifiedRange; + if (s.startColumn === 1 && n.startColumn === 1 && (s.endColumn !== 1 || n.endColumn !== 1) && s.endColumn === e.getLineMaxColumn(s.endLineNumber) && n.endColumn === t.getLineMaxColumn(n.endLineNumber) && s.endLineNumber < e.getLineCount() && n.endLineNumber < t.getLineCount()) { + s = s.setEndPosition(s.endLineNumber + 1, 1); + n = n.setEndPosition(n.endLineNumber + 1, 1); + } + return new Kx(s, n); +} +var Cpt = class GOn { + static fromDiffResult(e) { + return new GOn(e.changes.map(t => new WBs(t)), e.moves || [], e.identical, e.quitEarly); + } + constructor(e, t, s, n) { + this.mappings = e; + this.movedTexts = t; + this.identical = s; + this.quitEarly = n; + } +}; +var WBs = class { + constructor(i) { + this.lineRangeMapping = i; + } +}; +var jwe = class PFt { + static fromDiffs(e, t, s, n, r) { + const o = I1.inverse(e, t, s); + const a = []; + for (const l of o) { + let c = l.original.startLineNumber; + let u = l.modified.startLineNumber; + let d = l.original.length; + const h = c === 1 && u === 1; + const g = c + d === t + 1 && u + d === s + 1; + if ((h || g) && d >= r + n) { + if (h && !g) { + d -= r; + } + if (g && !h) { + c += r; + u += r; + d -= r; + } + a.push(new PFt(c, u, d, 0, 0)); + } else if (d >= r * 2 + n) { + c += r; + u += r; + d -= r * 2; + a.push(new PFt(c, u, d, 0, 0)); + } + } + return a; + } + get originalUnchangedRange() { + return or.ofLength(this.originalLineNumber, this.lineCount); + } + get modifiedUnchangedRange() { + return or.ofLength(this.modifiedLineNumber, this.lineCount); + } + constructor(e, t, s, n, r) { + this.originalLineNumber = e; + this.modifiedLineNumber = t; + this.lineCount = s; + this.d = un(this, 0); + this.visibleLineCountTop = this.d; + this.g = un(this, 0); + this.visibleLineCountBottom = this.g; + this.h = Is(this, l => this.visibleLineCountTop.read(l) + this.visibleLineCountBottom.read(l) === this.lineCount && !this.isDragged.read(l)); + this.isDragged = un(this, undefined); + const o = Math.max(Math.min(n, this.lineCount), 0); + const a = Math.max(Math.min(r, this.lineCount - n), 0); + aGi(n === o); + aGi(r === a); + this.d.set(o, undefined); + this.g.set(a, undefined); + } + setVisibleRanges(e, t) { + const s = []; + const n = new j9(e.map(l => l.modified)).subtractFrom(this.modifiedUnchangedRange); + let r = this.originalLineNumber; + let o = this.modifiedLineNumber; + const a = this.modifiedLineNumber + this.lineCount; + if (n.ranges.length === 0) { + this.showAll(t); + s.push(this); + } else { + let l = 0; + for (const c of n.ranges) { + const u = l === n.ranges.length - 1; + l++; + const d = (u ? a : c.endLineNumberExclusive) - o; + const h = new PFt(r, o, d, 0, 0); + h.setHiddenModifiedRange(c, t); + s.push(h); + r = h.originalUnchangedRange.endLineNumberExclusive; + o = h.modifiedUnchangedRange.endLineNumberExclusive; + } + } + return s; + } + shouldHideControls(e) { + return this.h.read(e); + } + getHiddenOriginalRange(e) { + return or.ofLength(this.originalLineNumber + this.d.read(e), this.lineCount - this.d.read(e) - this.g.read(e)); + } + getHiddenModifiedRange(e) { + return or.ofLength(this.modifiedLineNumber + this.d.read(e), this.lineCount - this.d.read(e) - this.g.read(e)); + } + setHiddenModifiedRange(e, t) { + const s = e.startLineNumber - this.modifiedLineNumber; + const n = this.modifiedLineNumber + this.lineCount - e.endLineNumberExclusive; + this.setState(s, n, t); + } + getMaxVisibleLineCountTop() { + return this.lineCount - this.g.get(); + } + getMaxVisibleLineCountBottom() { + return this.lineCount - this.d.get(); + } + showMoreAbove(e = 10, t) { + const s = this.getMaxVisibleLineCountTop(); + this.d.set(Math.min(this.d.get() + e, s), t); + } + showMoreBelow(e = 10, t) { + const s = this.lineCount - this.d.get(); + this.g.set(Math.min(this.g.get() + e, s), t); + } + showAll(e) { + this.g.set(this.lineCount - this.d.get(), e); + } + showModifiedLine(e, t, s) { + const n = e + 1 - (this.modifiedLineNumber + this.d.get()); + const r = this.modifiedLineNumber - this.g.get() + this.lineCount - e; + if (t === 0 && n < r || t === 1) { + this.d.set(this.d.get() + n, s); + } else { + this.g.set(this.g.get() + r, s); + } + } + showOriginalLine(e, t, s) { + const n = e - this.originalLineNumber; + const r = this.originalLineNumber + this.lineCount - e; + if (t === 0 && n < r || t === 1) { + this.d.set(Math.min(this.d.get() + r - n, this.getMaxVisibleLineCountTop()), s); + } else { + this.g.set(Math.min(this.g.get() + n - r, this.getMaxVisibleLineCountBottom()), s); + } + } + collapseAll(e) { + this.d.set(0, e); + this.g.set(0, e); + } + setState(e, t, s) { + e = Math.max(Math.min(e, this.lineCount), 0); + t = Math.max(Math.min(t, this.lineCount - e), 0); + this.d.set(e, s); + this.g.set(t, s); + } +}; +var VBs; +(function (i) { + i[i.FromCloserSide = 0] = "FromCloserSide"; + i[i.FromTop = 1] = "FromTop"; + i[i.FromBottom = 2] = "FromBottom"; +})(VBs ||= {}); +function Gia(i, e, t, s) {} +function Kia(i, e, t, s) {} +xe(); +Fs(); +He(); +q(); +rt(); +Rt(); +X(); +var Ldr = class extends H { + get visibility() { + return this.b; + } + set visibility(i) { + if (this.b !== i) { + this.b = i; + this.a.style.visibility = i ? "visible" : "hidden"; + } + } + constructor(i, e, t, s, n, r, o, a, l) { + super(); + this.c = i; + this.f = e; + this.g = t; + this.h = s; + this.j = n; + this.m = r; + this.n = o; + this.q = a; + this.r = l; + this.b = false; + this.f.style.zIndex = "10"; + this.a = document.createElement("div"); + this.a.className = le.asClassName(A.lightBulb) + " lightbulb-glyph"; + this.a.style.position = "absolute"; + const c = this.g.getOption(68); + this.a.style.right = "0px"; + this.a.style.visibility = "hidden"; + this.a.style.height = `${c}px`; + this.a.style.lineHeight = `${c}px`; + this.f.appendChild(this.a); + let u = 0; + const d = t.getOption(132) && !fp; + const h = (g, p) => { + this.q.showContextMenu({ + domForShadowRoot: d ? t.getDomNode() ?? undefined : undefined, + getAnchor: () => ({ + x: g, + y: p + }), + getActions: () => { + const b = []; + const v = s.modified.isEmpty; + b.push(new Yt("diff.clipboard.copyDeletedContent", v ? s.original.length > 1 ? f(223, null) : f(224, null) : s.original.length > 1 ? f(225, null) : f(226, null), undefined, true, async () => { + const w = this.n.getValueInRange(s.original.toExclusiveRange()); + await this.r.writeText(w); + })); + if (s.original.length > 1) { + b.push(new Yt("diff.clipboard.copyDeletedLineContent", f(v ? 227 : 228, null, s.original.startLineNumber + u), undefined, true, async () => { + let w = this.n.getLineContent(s.original.startLineNumber + u); + if (w === "") { + w = this.n.getEndOfLineSequence() === 0 ? ` +` : `\r +`; + } + await this.r.writeText(w); + })); + } + if (!t.getOption(96)) { + b.push(new Yt("diff.inline.revertChange", f(229, null), undefined, true, async () => { + this.j.revert(this.h); + })); + } + return b; + }, + autoSelectFirstItem: true + }); + }; + this.D(ko(this.a, "mousedown", g => { + if (!g.leftButton) { + return; + } + const { + top: p, + height: b + } = sd(this.a); + const v = Math.floor(c / 3); + g.preventDefault(); + h(g.posx, p + b + v); + })); + this.D(t.onMouseMove(g => { + if ((g.target.type === 8 || g.target.type === 5) && g.target.detail.viewZoneId === this.c()) { + u = this.s(this.f, g.event.browserEvent.y, c); + this.visibility = true; + } else { + this.visibility = false; + } + })); + this.D(t.onMouseDown(g => { + if (g.event.leftButton && (g.target.type === 8 || g.target.type === 5) && g.target.detail.viewZoneId === this.c()) { + g.event.preventDefault(); + u = this.s(this.f, g.event.browserEvent.y, c); + h(g.event.posx, g.event.posy + c); + } + })); + } + s(i, e, t) { + const { + top: s + } = sd(i); + const n = e - s; + const r = Math.floor(n / t); + const o = r * t; + this.a.style.top = `${o}px`; + if (this.m) { + let a = 0; + for (let l = 0; l < this.m.length; l++) { + a += this.m[l]; + if (r < a) { + return l; + } + } + } + return r; + } +}; +KL(); +s1(); +Qd(); +mM(); +Aj(); +Fj(); +MI(); +var HBs = GL("diffEditorWidget", { + createHTML: i => i +}); +function zwe(i, e, t, s) { + Hm(s, e.fontInfo); + const n = t.length > 0; + const r = new UL(10000); + let o = 0; + let a = 0; + const l = []; + for (let h = 0; h < i.lineTokens.length; h++) { + const g = h + 1; + const p = i.lineTokens[h]; + const b = i.lineBreakData[h]; + const v = eE.filter(t, g, 1, Number.MAX_SAFE_INTEGER); + if (b) { + let y = 0; + for (const w of b.breakOffsets) { + const C = p.sliceAndInflate(y, w, 0); + o = Math.max(o, qBs(a, C, eE.extractWrapped(v, y, w), n, i.mightContainNonBasicASCII, i.mightContainRTL, e, r)); + a++; + y = w; + } + l.push(b.breakOffsets.length); + } else { + l.push(1); + o = Math.max(o, qBs(a, p, v, n, i.mightContainNonBasicASCII, i.mightContainRTL, e, r)); + a++; + } + } + o += e.scrollBeyondLastColumn; + const c = r.build(); + const u = HBs ? HBs.createHTML(c) : c; + s.innerHTML = u; + const d = o * e.typicalHalfwidthCharacterWidth; + return { + heightInLines: a, + minWidthInPx: d, + viewLineCounts: l + }; +} +var Jwe = class { + constructor(i, e = i.map(n => null), t = true, s = true) { + this.lineTokens = i; + this.lineBreakData = e; + this.mightContainNonBasicASCII = t; + this.mightContainRTL = s; + } +}; +var Gwe = class KOn { + static fromEditor(e) { + const t = e.getOptions(); + const s = t.get(52); + const n = t.get(151); + return new KOn(e.getModel()?.getOptions().tabSize || 0, s, t.get(33), s.typicalHalfwidthCharacterWidth, t.get(109), t.get(68), n.decorationsWidth, t.get(122), t.get(104), t.get(99), t.get(53)); + } + constructor(e, t, s, n, r, o, a, l, c, u, d) { + this.tabSize = e; + this.fontInfo = t; + this.disableMonospaceOptimizations = s; + this.typicalHalfwidthCharacterWidth = n; + this.scrollBeyondLastColumn = r; + this.lineHeight = o; + this.lineDecorationsWidth = a; + this.stopRenderingLineAfter = l; + this.renderWhitespace = c; + this.renderControlCharacters = u; + this.fontLigatures = d; + } +}; +function qBs(i, e, t, s, n, r, o, a) { + a.appendString("
    "); + const l = e.getLineContent(); + const c = Ete.isBasicASCII(l, n); + const u = Ete.containsRTL(l, c, r); + const d = $j(new $9(o.fontInfo.isMonospace && !o.disableMonospaceOptimizations, o.fontInfo.canUseHalfwidthRightwardsArrow, l, false, c, u, 0, e, t, o.tabSize, 0, o.fontInfo.spaceWidth, o.fontInfo.middotWidth, o.fontInfo.wsmiddotWidth, o.stopRenderingLineAfter, o.renderWhitespace, o.renderControlCharacters, o.fontLigatures !== t4.OFF, null), a); + a.appendString("
    "); + return d.characterMapping.getHorizontalOffset(d.characterMapping.length); +} +Nf(); +Rs(); +MI(); +Xa(); +ks(); +yt(); +var NXt = class extends H { + constructor(e, t, s, n, r, o, a, l, c, u) { + super(); + this.t = e; + this.u = t; + this.y = s; + this.z = n; + this.C = r; + this.F = o; + this.G = a; + this.H = l; + this.I = c; + this.J = u; + this.b = un(this, 0); + this.g = un(this, 0); + this.h = wBs(this.t, this.g, this.B); + this.j = un(this, 0); + this.q = un(this, 0); + this.s = wBs(this.t, this.q, this.B); + const d = un("invalidateAlignmentsState", 0); + const h = this.D(new Vn(() => { + d.set(d.get() + 1, undefined); + }, 0)); + this.D(this.u.original.onDidChangeViewZones(C => { + if (!this.F()) { + h.schedule(); + } + })); + this.D(this.u.modified.onDidChangeViewZones(C => { + if (!this.F()) { + h.schedule(); + } + })); + this.D(this.u.original.onDidChangeConfiguration(C => { + if (C.hasChanged(152) || C.hasChanged(68)) { + h.schedule(); + } + })); + this.D(this.u.modified.onDidChangeConfiguration(C => { + if (C.hasChanged(152) || C.hasChanged(68)) { + h.schedule(); + } + })); + const g = this.y.map(C => C ? Ro(this, C.model.original.onDidChangeTokens, () => C.model.original.tokenization.backgroundTokenizationState === 2) : undefined).map((C, S) => C?.read(S)); + const p = Is(C => { + const S = this.y.read(C); + const x = S?.diff.read(C); + if (!S || !x) { + return null; + } + d.read(C); + const E = this.z.renderSideBySide.read(C); + return jBs(this.u.original, this.u.modified, x.mappings, this.G, this.H, E); + }); + const b = Is(C => { + const S = this.y.read(C)?.movedTextToCompare.read(C); + if (!S) { + return null; + } + d.read(C); + const x = S.changes.map(k => new WBs(k)); + return jBs(this.u.original, this.u.modified, x, this.G, this.H, true); + }); + function v() { + const C = document.createElement("div"); + C.className = "diagonal-fill"; + return C; + } + const y = this.D(new Q()); + this.viewZones = w4(this, (C, S) => { + y.clear(); + const x = p.read(C) || []; + const k = []; + const E = []; + const D = this.j.read(C); + if (D > 0) { + E.push({ + afterLineNumber: 0, + domNode: document.createElement("div"), + heightInPx: D, + showInHiddenAreas: true, + suppressMouseDown: true + }); + } + const P = this.b.read(C); + if (P > 0) { + k.push({ + afterLineNumber: 0, + domNode: document.createElement("div"), + heightInPx: P, + showInHiddenAreas: true, + suppressMouseDown: true + }); + } + const R = this.z.renderSideBySide.read(C); + const L = R ? undefined : this.u.modified._getViewModel()?.createLineBreaksComputer(); + if (L) { + const ge = this.u.original.getModel(); + for (const ce of x) { + if (ce.diff) { + for (let Se = ce.originalRange.startLineNumber; Se < ce.originalRange.endLineNumberExclusive; Se++) { + if (Se > ge.getLineCount()) { + return { + orig: k, + mod: E + }; + } + L?.addRequest(ge.getLineContent(Se), null, null); + } + } + } + } + const F = L?.finalize() ?? []; + let O = 0; + const U = this.u.modified.getOption(68); + const j = this.y.read(C)?.movedTextToCompare.read(C); + const ie = this.u.original.getModel()?.mightContainNonBasicASCII() ?? false; + const ee = this.u.original.getModel()?.mightContainRTL() ?? false; + const ne = Gwe.fromEditor(this.u.modified); + for (const ge of x) { + if (ge.diff && !R && (!this.z.useTrueInlineDiffRendering.read(C) || !MXt(ge.diff))) { + if (!ge.originalRange.isEmpty) { + g.read(C); + const Se = document.createElement("div"); + Se.classList.add("view-lines", "line-delete", "monaco-mouse-cursor-text"); + const $e = this.u.original.getModel(); + if (ge.originalRange.endLineNumberExclusive - 1 > $e.getLineCount()) { + return { + orig: k, + mod: E + }; + } + const qe = new Jwe(ge.originalRange.mapToLineArray(Vt => $e.tokenization.getLineTokens(Vt)), ge.originalRange.mapToLineArray(Vt => F[O++]), ie, ee); + const Ae = []; + for (const Vt of ge.diff.innerChanges || []) { + Ae.push(new cF(Vt.originalRange.delta(-(ge.diff.original.startLineNumber - 1)), Hwe.className, 0)); + } + const et = zwe(qe, ne, Ae, Se); + const _t = document.createElement("div"); + _t.className = "inline-deleted-margin-view-zone"; + Hm(_t, ne.fontInfo); + if (this.z.renderIndicators.read(C)) { + for (let Vt = 0; Vt < et.heightInLines; Vt++) { + const li = document.createElement("div"); + li.className = `delete-sign ${le.asClassName(xBs)}`; + li.setAttribute("style", `position:absolute;top:${Vt * U}px;width:${ne.lineDecorationsWidth}px;height:${U}px;right:0;`); + _t.appendChild(li); + } + } + let Mi; + y.add(new Ldr(() => Tn(Mi), _t, this.u.modified, ge.diff, this.C, et.viewLineCounts, this.u.original.getModel(), this.J, this.I)); + for (let Vt = 0; Vt < et.viewLineCounts.length; Vt++) { + const li = et.viewLineCounts[Vt]; + if (li > 1) { + k.push({ + afterLineNumber: ge.originalRange.startLineNumber + Vt, + domNode: v(), + heightInPx: (li - 1) * U, + showInHiddenAreas: true, + suppressMouseDown: true + }); + } + } + E.push({ + afterLineNumber: ge.modifiedRange.startLineNumber - 1, + domNode: Se, + heightInPx: et.heightInLines * U, + minWidthInPx: et.minWidthInPx, + marginDomNode: _t, + setZoneId(Vt) { + Mi = Vt; + }, + showInHiddenAreas: true, + suppressMouseDown: true + }); + } + const ce = document.createElement("div"); + ce.className = "gutter-delete"; + k.push({ + afterLineNumber: ge.originalRange.endLineNumberExclusive - 1, + domNode: v(), + heightInPx: ge.modifiedHeightInPx, + marginDomNode: ce, + showInHiddenAreas: true, + suppressMouseDown: true + }); + } else { + const ce = ge.modifiedHeightInPx - ge.originalHeightInPx; + if (ce > 0) { + if (j?.lineRangeMapping.original.delta(-1).deltaLength(2).contains(ge.originalRange.endLineNumberExclusive - 1)) { + continue; + } + k.push({ + afterLineNumber: ge.originalRange.endLineNumberExclusive - 1, + domNode: v(), + heightInPx: ce, + showInHiddenAreas: true, + suppressMouseDown: true + }); + } else { + let Se = function () { + const qe = document.createElement("div"); + qe.className = "arrow-revert-change " + le.asClassName(A.arrowRight); + S.add(Ce(qe, "mousedown", Ae => Ae.stopPropagation())); + S.add(Ce(qe, "click", Ae => { + Ae.stopPropagation(); + r.revert(ge.diff); + })); + return G("div", {}, qe); + }; + var be = Se; + if (j?.lineRangeMapping.modified.delta(-1).deltaLength(2).contains(ge.modifiedRange.endLineNumberExclusive - 1)) { + continue; + } + let $e; + if (ge.diff && ge.diff.modified.isEmpty && this.z.shouldRenderOldRevertArrows.read(C)) { + $e = Se(); + } + E.push({ + afterLineNumber: ge.modifiedRange.endLineNumberExclusive - 1, + domNode: v(), + heightInPx: -ce, + marginDomNode: $e, + showInHiddenAreas: true, + suppressMouseDown: true + }); + } + } + } + for (const ge of b.read(C) ?? []) { + if (!j?.lineRangeMapping.original.intersect(ge.originalRange) || !j?.lineRangeMapping.modified.intersect(ge.modifiedRange)) { + continue; + } + const ce = ge.modifiedHeightInPx - ge.originalHeightInPx; + if (ce > 0) { + k.push({ + afterLineNumber: ge.originalRange.endLineNumberExclusive - 1, + domNode: v(), + heightInPx: ce, + showInHiddenAreas: true, + suppressMouseDown: true + }); + } else { + E.push({ + afterLineNumber: ge.modifiedRange.endLineNumberExclusive - 1, + domNode: v(), + heightInPx: -ce, + showInHiddenAreas: true, + suppressMouseDown: true + }); + } + } + return { + orig: k, + mod: E + }; + }); + let w = false; + this.D(this.u.original.onDidScrollChange(C => { + if (C.scrollLeftChanged && !w) { + w = true; + this.u.modified.setScrollLeft(C.scrollLeft); + w = false; + } + })); + this.D(this.u.modified.onDidScrollChange(C => { + if (C.scrollLeftChanged && !w) { + w = true; + this.u.original.setScrollLeft(C.scrollLeft); + w = false; + } + })); + this.f = Ro(this.u.original.onDidScrollChange, () => this.u.original.getScrollTop()); + this.n = Ro(this.u.modified.onDidScrollChange, () => this.u.modified.getScrollTop()); + this.D(Dn(C => { + const S = this.f.read(C) - (this.h.get() - this.s.read(C)) - (this.b.get() - this.j.read(C)); + if (S !== this.u.modified.getScrollTop()) { + this.u.modified.setScrollTop(S, 1); + } + })); + this.D(Dn(C => { + const S = this.n.read(C) - (this.s.get() - this.h.read(C)) - (this.j.get() - this.b.read(C)); + if (S !== this.u.original.getScrollTop()) { + this.u.original.setScrollTop(S, 1); + } + })); + this.D(Dn(C => { + const S = this.y.read(C)?.movedTextToCompare.read(C); + let x = 0; + if (S) { + const k = this.u.original.getTopForLineNumber(S.lineRangeMapping.original.startLineNumber, true) - this.b.get(); + x = this.u.modified.getTopForLineNumber(S.lineRangeMapping.modified.startLineNumber, true) - this.j.get() - k; + } + if (x > 0) { + this.j.set(0, undefined); + this.b.set(x, undefined); + } else if (x < 0) { + this.j.set(-x, undefined); + this.b.set(0, undefined); + } else { + setTimeout(() => { + this.j.set(0, undefined); + this.b.set(0, undefined); + }, 400); + } + if (this.u.modified.hasTextFocus()) { + this.g.set(this.q.get() - x, undefined, true); + } else { + this.q.set(this.g.get() + x, undefined, true); + } + })); + } +}; +NXt = __decorate([__param(8, Zr), __param(9, ts)], NXt); +function jBs(i, e, t, s, n, r) { + const o = new EL(zBs(i, s)); + const a = new EL(zBs(e, n)); + const l = i.getOption(68); + const c = e.getOption(68); + const u = []; + let d = 0; + let h = 0; + function g(b, v) { + while (true) { + let y = o.peek(); + let w = a.peek(); + if (y && y.lineNumber >= b) { + y = undefined; + } + if (w && w.lineNumber >= v) { + w = undefined; + } + if (!y && !w) { + break; + } + const C = y ? y.lineNumber - d : Number.MAX_VALUE; + const S = w ? w.lineNumber - h : Number.MAX_VALUE; + if (C < S) { + o.dequeue(); + w = { + lineNumber: y.lineNumber - d + h, + heightInPx: 0 + }; + } else if (C > S) { + a.dequeue(); + y = { + lineNumber: w.lineNumber - h + d, + heightInPx: 0 + }; + } else { + o.dequeue(); + a.dequeue(); + } + u.push({ + originalRange: or.ofLength(y.lineNumber, 1), + modifiedRange: or.ofLength(w.lineNumber, 1), + originalHeightInPx: l + y.heightInPx, + modifiedHeightInPx: c + w.heightInPx, + diff: undefined + }); + } + } + for (const b of t) { + let v = function (x, k, E = false) { + if (x < S || k < C) { + return; + } + if (w) { + w = false; + } else if (!E && (x === S || k === C)) { + return; + } + const D = new or(S, x); + const P = new or(C, k); + if (D.isEmpty && P.isEmpty) { + return; + } + const R = o.takeWhile(F => F.lineNumber < x)?.reduce((F, O) => F + O.heightInPx, 0) ?? 0; + const L = a.takeWhile(F => F.lineNumber < k)?.reduce((F, O) => F + O.heightInPx, 0) ?? 0; + u.push({ + originalRange: D, + modifiedRange: P, + originalHeightInPx: D.length * l + R, + modifiedHeightInPx: P.length * c + L, + diff: b.lineRangeMapping + }); + S = x; + C = k; + }; + var p = v; + const y = b.lineRangeMapping; + g(y.original.startLineNumber, y.modified.startLineNumber); + let w = true; + let C = y.modified.startLineNumber; + let S = y.original.startLineNumber; + if (r) { + for (const x of y.innerChanges || []) { + if (x.originalRange.startColumn > 1 && x.modifiedRange.startColumn > 1) { + v(x.originalRange.startLineNumber, x.modifiedRange.startLineNumber); + } + const k = i.getModel(); + const E = x.originalRange.endLineNumber <= k.getLineCount() ? k.getLineMaxColumn(x.originalRange.endLineNumber) : Number.MAX_SAFE_INTEGER; + if (x.originalRange.endColumn < E) { + v(x.originalRange.endLineNumber, x.modifiedRange.endLineNumber); + } + } + } + v(y.original.endLineNumberExclusive, y.modified.endLineNumberExclusive, true); + d = y.original.endLineNumberExclusive; + h = y.modified.endLineNumberExclusive; + } + g(Number.MAX_VALUE, Number.MAX_VALUE); + return u; +} +function zBs(i, e) { + const t = []; + const s = []; + const n = i.getOption(152).wrappingColumn !== -1; + const r = i._getViewModel().coordinatesConverter; + const o = i.getOption(68); + if (n) { + for (let l = 1; l <= i.getModel().getLineCount(); l++) { + const c = r.getModelLineViewLineCount(l); + if (c > 1) { + s.push({ + lineNumber: l, + heightInPx: o * (c - 1) + }); + } + } + } + for (const l of i.getWhitespaces()) { + if (e.has(l.id)) { + continue; + } + const c = l.afterLineNumber === 0 ? 0 : r.convertViewPositionToModelPosition(new je(l.afterLineNumber, 1)).lineNumber; + t.push({ + lineNumber: c, + heightInPx: l.height + }); + } + return Fur(t, s, l => l.lineNumber, (l, c) => ({ + lineNumber: l.lineNumber, + heightInPx: l.heightInPx + c.heightInPx + })); +} +function MXt(i) { + if (i.innerChanges) { + return i.innerChanges.every(e => Spt(e.modifiedRange) && Spt(e.originalRange) || e.originalRange.equalsRange(new Z(1, 1, 1, 1))); + } else { + return false; + } +} +function Spt(i) { + return i.startLineNumber === i.endLineNumber; +} +xe(); +sl(); +Fs(); +Jt(); +qg(); +He(); +q(); +An(); +Rt(); +jp(); +X(); +var xpt = class o9i extends H { + static { + this.movedCodeBlockPadding = 4; + } + constructor(e, t, s, n, r) { + super(); + this.n = e; + this.q = t; + this.r = s; + this.s = n; + this.t = r; + this.c = Ro(this, this.t.original.onDidScrollChange, () => this.t.original.getScrollTop()); + this.f = Ro(this, this.t.modified.onDidScrollChange, () => this.t.modified.getScrollTop()); + this.j = Wy("onDidChangeViewZones", this.t.modified.onDidChangeViewZones); + this.width = un(this, 0); + this.u = Wy("modified.onDidChangeViewZones", this.t.modified.onDidChangeViewZones); + this.w = Wy("original.onDidChangeViewZones", this.t.original.onDidChangeViewZones); + this.y = w4(this, (u, d) => { + this.a.replaceChildren(); + const h = this.q.read(u); + const g = h?.diff.read(u)?.movedTexts; + if (!g || g.length === 0) { + this.width.set(0, undefined); + return; + } + this.j.read(u); + const p = this.r.read(u); + const b = this.s.read(u); + if (!p || !b) { + this.width.set(0, undefined); + return; + } + this.u.read(u); + this.w.read(u); + const v = g.map(E => { + function D(ee, ne) { + const be = ne.getTopForLineNumber(ee.startLineNumber, true); + const ge = ne.getTopForLineNumber(ee.endLineNumberExclusive, true); + return (be + ge) / 2; + } + const P = D(E.lineRangeMapping.original, this.t.original); + const R = this.c.read(u); + const L = D(E.lineRangeMapping.modified, this.t.modified); + const F = this.f.read(u); + const O = P - R; + const U = L - F; + const j = Math.min(P, L); + const ie = Math.max(P, L); + return { + range: new uo(j, ie), + from: O, + to: U, + fromWithoutScroll: P, + toWithoutScroll: L, + move: E + }; + }); + v.sort(rqi(jg(E => E.fromWithoutScroll > E.toWithoutScroll, aqi), jg(E => E.fromWithoutScroll > E.toWithoutScroll ? E.fromWithoutScroll : -E.toWithoutScroll, Ly))); + const y = Rdr.compute(v.map(E => E.range)); + const w = 10; + const C = p.verticalScrollbarWidth; + const S = (y.getTrackCount() - 1) * 10 + w * 2; + const x = C + S + (b.contentLeft - o9i.movedCodeBlockPadding); + let k = 0; + for (const E of v) { + const D = y.getTrack(k); + const P = C + w + D * 10; + const R = 15; + const L = 15; + const F = x; + const O = b.glyphMarginWidth + b.lineNumbersWidth; + const U = 18; + const j = document.createElementNS("http://www.w3.org/2000/svg", "rect"); + j.classList.add("arrow-rectangle"); + j.setAttribute("x", `${F - O}`); + j.setAttribute("y", `${E.to - U / 2}`); + j.setAttribute("width", `${O}`); + j.setAttribute("height", `${U}`); + this.a.appendChild(j); + const ie = document.createElementNS("http://www.w3.org/2000/svg", "g"); + const ee = document.createElementNS("http://www.w3.org/2000/svg", "path"); + ee.setAttribute("d", `M 0 ${E.from} L ${P} ${E.from} L ${P} ${E.to} L ${F - L} ${E.to}`); + ee.setAttribute("fill", "none"); + ie.appendChild(ee); + const ne = document.createElementNS("http://www.w3.org/2000/svg", "polygon"); + ne.classList.add("arrow"); + d.add(Dn(be => { + ee.classList.toggle("currentMove", E.move === h.activeMovedText.read(be)); + ne.classList.toggle("currentMove", E.move === h.activeMovedText.read(be)); + })); + ne.setAttribute("points", `${F - L},${E.to - R / 2} ${F},${E.to} ${F - L},${E.to + R / 2}`); + ie.appendChild(ne); + this.a.appendChild(ie); + k++; + } + this.width.set(S, undefined); + }); + this.a = document.createElementNS("http://www.w3.org/2000/svg", "svg"); + this.a.setAttribute("class", "moved-blocks-lines"); + this.n.appendChild(this.a); + this.D(Ue(() => this.a.remove())); + this.D(Dn(u => { + const d = this.r.read(u); + const h = this.s.read(u); + if (!!d && !!h) { + this.a.style.left = `${d.width - d.verticalScrollbarWidth}px`; + this.a.style.height = `${d.height}px`; + this.a.style.width = `${d.verticalScrollbarWidth + d.contentLeft - o9i.movedCodeBlockPadding + this.width.read(u)}px`; + } + })); + this.D($te(this.y)); + const o = Is(u => { + const h = this.q.read(u)?.diff.read(u); + if (h) { + return h.movedTexts.map(g => ({ + move: g, + original: new kne(vb(g.lineRangeMapping.original.startLineNumber - 1), 18), + modified: new kne(vb(g.lineRangeMapping.modified.startLineNumber - 1), 18) + })); + } else { + return []; + } + }); + this.D(Uwe(this.t.original, o.map(u => u.map(d => d.original)))); + this.D(Uwe(this.t.modified, o.map(u => u.map(d => d.modified)))); + this.D(eh((u, d) => { + const h = o.read(u); + for (const g of h) { + d.add(new JBs(this.t.original, g.original, g.move, "original", this.q.get())); + d.add(new JBs(this.t.modified, g.modified, g.move, "modified", this.q.get())); + } + })); + const a = Wy("original.onDidFocusEditorWidget", u => this.t.original.onDidFocusEditorWidget(() => setTimeout(() => u(undefined), 0))); + const l = Wy("modified.onDidFocusEditorWidget", u => this.t.modified.onDidFocusEditorWidget(() => setTimeout(() => u(undefined), 0))); + let c = "modified"; + this.D(Mte({ + createEmptyChangeSummary: () => {}, + handleChange: (u, d) => { + if (u.didChange(a)) { + c = "original"; + } + if (u.didChange(l)) { + c = "modified"; + } + return true; + } + }, u => { + a.read(u); + l.read(u); + const d = this.q.read(u); + if (!d) { + return; + } + const h = d.diff.read(u); + let g; + if (h && c === "original") { + const p = this.t.originalCursor.read(u); + if (p) { + g = h.movedTexts.find(b => b.lineRangeMapping.original.contains(p.lineNumber)); + } + } + if (h && c === "modified") { + const p = this.t.modifiedCursor.read(u); + if (p) { + g = h.movedTexts.find(b => b.lineRangeMapping.modified.contains(p.lineNumber)); + } + } + if (g !== d.movedTextToCompare.get()) { + d.movedTextToCompare.set(undefined, undefined); + } + d.setActiveMovedText(g); + })); + } +}; +var Rdr = class YOn { + static compute(e) { + const t = []; + const s = []; + for (const n of e) { + let r = t.findIndex(o => !o.intersectsStrict(n)); + if (r === -1) { + if (t.length >= 6) { + r = DVn(t, jg(a => a.intersectWithRangeLength(n), Ly)); + } else { + r = t.length; + t.push(new GKi()); + } + } + t[r].addRange(n); + s.push(r); + } + return new YOn(t.length, s); + } + constructor(e, t) { + this.a = e; + this.c = t; + } + getTrack(e) { + return this.c[e]; + } + getTrackCount() { + return this.a; + } +}; +var JBs = class extends wXt { + constructor(i, e, t, s, n) { + const r = Ts("div.diff-hidden-lines-widget"); + super(i, e, r.root); + this.n = i; + this.q = t; + this.r = s; + this.u = n; + this.f = Ts("div.diff-moved-code-block", { + style: { + marginRight: "4px" + } + }, [Ts("div.text-content@textContent"), Ts("div.action-bar@actionBar")]); + r.root.appendChild(this.f.root); + const o = Ro(this.n.onDidLayoutChange, () => this.n.getLayoutInfo()); + this.D(_U(this.f.root, { + paddingRight: o.map(d => d.verticalScrollbarWidth) + })); + let a; + if (t.changes.length > 0) { + a = this.r === "original" ? f(242, null, this.q.lineRangeMapping.modified.startLineNumber, this.q.lineRangeMapping.modified.endLineNumberExclusive - 1) : f(243, null, this.q.lineRangeMapping.original.startLineNumber, this.q.lineRangeMapping.original.endLineNumberExclusive - 1); + } else { + a = this.r === "original" ? f(244, null, this.q.lineRangeMapping.modified.startLineNumber, this.q.lineRangeMapping.modified.endLineNumberExclusive - 1) : f(245, null, this.q.lineRangeMapping.original.startLineNumber, this.q.lineRangeMapping.original.endLineNumberExclusive - 1); + } + const l = this.D(new ea(this.f.actionBar, { + highlightToggledItems: true + })); + const c = new Yt("", a, "", false); + l.push(c, { + icon: false, + label: true + }); + const u = new Yt("", "Compare", le.asClassName(A.compareChanges), true, () => { + this.n.focus(); + this.u.movedTextToCompare.set(this.u.movedTextToCompare.get() === t ? undefined : this.q, undefined); + }); + this.D(Dn(d => { + const h = this.u.movedTextToCompare.read(d) === t; + u.checked = h; + })); + l.push(u, { + icon: false, + label: true + }); + } +}; +var Ndr = class extends H { + constructor(i, e, t, s) { + super(); + this.a = i; + this.b = e; + this.c = t; + this.f = Is(this, n => { + const r = this.b.read(n); + const o = r?.diff.read(n); + if (!o) { + return null; + } + const a = this.b.read(n).movedTextToCompare.read(n); + const l = this.c.renderIndicators.read(n); + const c = this.c.showEmptyDecorations.read(n); + const u = []; + const d = []; + if (!a) { + for (const g of o.mappings) { + if (!g.lineRangeMapping.original.isEmpty) { + u.push({ + range: g.lineRangeMapping.original.toInclusiveRange(), + options: l ? EBs : DBs + }); + } + if (!g.lineRangeMapping.modified.isEmpty) { + d.push({ + range: g.lineRangeMapping.modified.toInclusiveRange(), + options: l ? kBs : IBs + }); + } + if (g.lineRangeMapping.modified.isEmpty || g.lineRangeMapping.original.isEmpty) { + if (!g.lineRangeMapping.original.isEmpty) { + u.push({ + range: g.lineRangeMapping.original.toInclusiveRange(), + options: adr + }); + } + if (!g.lineRangeMapping.modified.isEmpty) { + d.push({ + range: g.lineRangeMapping.modified.toInclusiveRange(), + options: EXt + }); + } + } else { + const p = this.c.useTrueInlineDiffRendering.read(n) && MXt(g.lineRangeMapping); + for (const b of g.lineRangeMapping.innerChanges || []) { + if (g.lineRangeMapping.original.contains(b.originalRange.startLineNumber)) { + u.push({ + range: b.originalRange, + options: b.originalRange.isEmpty() && c ? ldr : Hwe + }); + } + if (g.lineRangeMapping.modified.contains(b.modifiedRange.startLineNumber)) { + d.push({ + range: b.modifiedRange, + options: b.modifiedRange.isEmpty() && c && !p ? odr : Vwe + }); + } + if (p) { + const v = r.model.original.getValueInRange(b.originalRange); + d.push({ + range: b.modifiedRange, + options: { + description: "deleted-text", + before: { + content: v, + inlineClassName: "inline-deleted-text" + }, + zIndex: 100000, + showIfCollapsed: true + } + }); + } + } + } + } + } + if (a) { + for (const g of a.changes) { + const p = g.original.toInclusiveRange(); + if (p) { + u.push({ + range: p, + options: l ? EBs : DBs + }); + } + const b = g.modified.toInclusiveRange(); + if (b) { + d.push({ + range: b, + options: l ? kBs : IBs + }); + } + for (const v of g.innerChanges || []) { + u.push({ + range: v.originalRange, + options: Hwe + }); + d.push({ + range: v.modifiedRange, + options: Vwe + }); + } + } + } + const h = this.b.read(n).activeMovedText.read(n); + for (const g of o.movedTexts) { + u.push({ + range: g.lineRangeMapping.original.toInclusiveRange(), + options: { + description: "moved", + blockClassName: "movedOriginal" + (g === h ? " currentMove" : ""), + blockPadding: [xpt.movedCodeBlockPadding, 0, xpt.movedCodeBlockPadding, xpt.movedCodeBlockPadding] + } + }); + d.push({ + range: g.lineRangeMapping.modified.toInclusiveRange(), + options: { + description: "moved", + blockClassName: "movedModified" + (g === h ? " currentMove" : ""), + blockPadding: [4, 0, 4, 4] + } + }); + } + return { + originalDecorations: u, + modifiedDecorations: d + }; + }); + this.D(hpt(this.a.original, this.f.map(n => n?.originalDecorations || []))); + this.D(hpt(this.a.modified, this.f.map(n => n?.modifiedDecorations || []))); + } +}; +pe(); +q(); +An(); +y4(); +q(); +An(); +Rs(); +ua(); +function ay(i) { + return Mdr.get(i); +} +var Mdr = class Zde extends H { + static { + this.a = new Map(); + } + static get(e) { + let t = Zde.a.get(e); + if (!t) { + t = new Zde(e); + Zde.a.set(e, t); + const s = e.onDidDispose(() => { + const n = Zde.a.get(e); + if (n) { + Zde.a.delete(e); + n.dispose(); + s.dispose(); + } + }); + } + return t; + } + f() { + this.b++; + if (this.b === 1) { + this.c = new Jj(() => {}); + } + } + g() { + this.b--; + if (this.b === 0) { + const e = this.c; + this.c = undefined; + e.finish(); + } + } + constructor(e) { + super(); + this.editor = e; + this.b = 0; + this.c = undefined; + this.j = un(this, this.editor.getModel()); + this.model = this.j; + this.isReadonly = Ro(this, this.editor.onDidChangeConfiguration, () => this.editor.getOption(96)); + this.m = Nte({ + owner: this, + lazy: true + }, this.editor.getModel()?.getVersionId() ?? null); + this.versionId = this.m; + this.n = Nte({ + owner: this, + equalsFn: wpe(Wat(Vs.selectionsEqual)), + lazy: true + }, this.editor.getSelections() ?? null); + this.selections = this.n; + this.positions = Uy({ + owner: this, + equalsFn: wpe(Wat(je.equals)) + }, t => this.selections.read(t)?.map(s => s.getStartPosition()) ?? null); + this.isFocused = Ro(this, t => { + const s = this.editor.onDidFocusEditorWidget(t); + const n = this.editor.onDidBlurEditorWidget(t); + return { + dispose() { + s.dispose(); + n.dispose(); + } + }; + }, () => this.editor.hasWidgetFocus()); + this.isTextFocused = Ro(this, t => { + const s = this.editor.onDidFocusEditorText(t); + const n = this.editor.onDidBlurEditorText(t); + return { + dispose() { + s.dispose(); + n.dispose(); + } + }; + }, () => this.editor.hasTextFocus()); + this.inComposition = Ro(this, t => { + const s = this.editor.onDidCompositionStart(() => { + t(undefined); + }); + const n = this.editor.onDidCompositionEnd(() => { + t(undefined); + }); + return { + dispose() { + s.dispose(); + n.dispose(); + } + }; + }, () => this.editor.inComposition); + this.value = J9t(this, t => { + this.versionId.read(t); + return this.model.read(t)?.getValue() ?? ""; + }, (t, s) => { + const n = this.model.get(); + if (n !== null && t !== n.getValue()) { + n.setValue(t); + } + }); + this.valueIsEmpty = Is(this, t => { + this.versionId.read(t); + return this.editor.getModel()?.getValueLength() === 0; + }); + this.cursorSelection = Uy({ + owner: this, + equalsFn: wpe(Vs.selectionsEqual) + }, t => this.selections.read(t)?.[0] ?? null); + this.cursorPosition = Uy({ + owner: this, + equalsFn: je.equals + }, t => this.selections.read(t)?.[0]?.getPosition() ?? null); + this.cursorLineNumber = Is(this, t => this.cursorPosition.read(t)?.lineNumber ?? null); + this.onDidType = AI(this); + this.scrollTop = Ro(this.editor.onDidScrollChange, () => this.editor.getScrollTop()); + this.scrollLeft = Ro(this.editor.onDidScrollChange, () => this.editor.getScrollLeft()); + this.layoutInfo = Ro(this.editor.onDidLayoutChange, () => this.editor.getLayoutInfo()); + this.layoutInfoContentLeft = this.layoutInfo.map(t => t.contentLeft); + this.layoutInfoDecorationsLeft = this.layoutInfo.map(t => t.decorationsLeft); + this.contentWidth = Ro(this.editor.onDidContentSizeChange, () => this.editor.getContentWidth()); + this.q = 0; + this.D(this.editor.onBeginUpdate(() => this.f())); + this.D(this.editor.onEndUpdate(() => this.g())); + this.D(this.editor.onDidChangeModel(() => { + this.f(); + try { + this.j.set(this.editor.getModel(), this.c); + this.h(); + } finally { + this.g(); + } + })); + this.D(this.editor.onDidType(t => { + this.f(); + try { + this.h(); + this.onDidType.trigger(this.c, t); + } finally { + this.g(); + } + })); + this.D(this.editor.onDidChangeModelContent(t => { + this.f(); + try { + this.m.set(this.editor.getModel()?.getVersionId() ?? null, this.c, t); + this.h(); + } finally { + this.g(); + } + })); + this.D(this.editor.onDidChangeCursorSelection(t => { + this.f(); + try { + this.n.set(this.editor.getSelections(), this.c, t); + this.h(); + } finally { + this.g(); + } + })); + } + forceUpdate(e) { + this.f(); + try { + this.h(); + if (e) { + return e(this.c); + } else { + return undefined; + } + } finally { + this.g(); + } + } + h() { + this.f(); + try { + this.j.set(this.editor.getModel(), this.c); + this.m.set(this.editor.getModel()?.getVersionId() ?? null, this.c, undefined); + this.n.set(this.editor.getSelections(), this.c, undefined); + } finally { + this.g(); + } + } + getOption(e) { + return Ro(this, t => this.editor.onDidChangeConfiguration(s => { + if (s.hasChanged(e)) { + t(undefined); + } + }), () => this.editor.getOption(e)); + } + setDecorations(e) { + const t = new Q(); + const s = this.editor.createDecorationsCollection(); + t.add(W9({ + owner: this, + debugName: () => `Apply decorations from ${e.debugName}` + }, n => { + const r = e.read(n); + s.set(r); + })); + t.add({ + dispose: () => { + s.clear(); + } + }); + return t; + } + createOverlayWidget(e) { + const t = "observableOverlayWidget" + this.q++; + const s = { + getDomNode: () => e.domNode, + getPosition: () => e.position.get(), + getId: () => t, + allowEditorOverflow: e.allowEditorOverflow, + getMinContentWidthInPx: () => e.minContentWidthInPx.get() + }; + this.editor.addOverlayWidget(s); + const n = Dn(r => { + e.position.read(r); + e.minContentWidthInPx.read(r); + this.editor.layoutOverlayWidget(s); + }); + return Ue(() => { + n.dispose(); + this.editor.removeOverlayWidget(s); + }); + } +}; +xe(); +pf(); +$3t(); +q(); +An(); +Rs(); +Ris(); +Qs(); +gi(); +var xA; +var Dne = class extends H { + static { + xA = this; + } + static { + this.a = 15; + } + static { + this.ENTIRE_DIFF_OVERVIEW_WIDTH = this.a * 2; + } + constructor(e, t, s, n, r, o, a) { + super(); + this.b = e; + this.c = t; + this.f = s; + this.g = n; + this.j = r; + this.n = o; + this.q = a; + this.width = xA.ENTIRE_DIFF_OVERVIEW_WIDTH; + const l = Ro(this.q.onDidColorThemeChange, () => this.q.getColorTheme()); + const c = Is(h => { + const g = l.read(h); + const p = g.getColor(G8t) || (g.getColor(KC) || Jge).transparent(2); + const b = g.getColor(K8t) || (g.getColor(Ex) || Gge).transparent(2); + return { + insertColor: p, + removeColor: b + }; + }); + const u = nc(document.createElement("div")); + u.setClassName("diffViewport"); + u.setPosition("absolute"); + const d = Ts("div.diffOverview", { + style: { + position: "absolute", + top: "0px", + width: xA.ENTIRE_DIFF_OVERVIEW_WIDTH + "px" + } + }).root; + this.D(xne(d, u.domNode)); + this.D(ko(d, Oe.POINTER_DOWN, h => { + this.b.modified.delegateVerticalScrollbarPointerDown(h); + })); + this.D(Ce(d, Oe.MOUSE_WHEEL, h => { + this.b.modified.delegateScrollFromMouseWheelEvent(h); + }, { + passive: false + })); + this.D(xne(this.c, d)); + this.D(eh((h, g) => { + const p = this.f.read(h); + const b = this.b.original.createOverviewRuler("original diffOverviewRuler"); + if (b) { + g.add(b); + g.add(xne(d, b.getDomNode())); + } + const v = this.b.modified.createOverviewRuler("modified diffOverviewRuler"); + if (v) { + g.add(v); + g.add(xne(d, v.getDomNode())); + } + if (!b || !v) { + return; + } + const y = Wy("viewZoneChanged", this.b.original.onDidChangeViewZones); + const w = Wy("viewZoneChanged", this.b.modified.onDidChangeViewZones); + const C = Wy("hiddenRangesChanged", this.b.original.onDidChangeHiddenAreas); + const S = Wy("hiddenRangesChanged", this.b.modified.onDidChangeHiddenAreas); + g.add(Dn(x => { + y.read(x); + w.read(x); + C.read(x); + S.read(x); + const k = c.read(x); + const E = p?.diff.read(x)?.mappings; + function D(L, F, O) { + const U = O._getViewModel(); + if (U) { + return L.filter(j => j.length > 0).map(j => { + const ie = U.coordinatesConverter.convertModelPositionToViewPosition(new je(j.startLineNumber, 1)); + const ee = U.coordinatesConverter.convertModelPositionToViewPosition(new je(j.endLineNumberExclusive, 1)); + const ne = ee.lineNumber - ie.lineNumber; + return new $9t(ie.lineNumber, ee.lineNumber, ne, F.toString()); + }); + } else { + return []; + } + } + const P = D((E || []).map(L => L.lineRangeMapping.original), k.removeColor, this.b.original); + const R = D((E || []).map(L => L.lineRangeMapping.modified), k.insertColor, this.b.modified); + b?.setZones(P); + v?.setZones(R); + })); + g.add(Dn(x => { + const k = this.j.read(x); + const E = this.g.read(x); + const D = this.n.read(x); + if (D) { + const P = xA.ENTIRE_DIFF_OVERVIEW_WIDTH - xA.a * 2; + b.setLayout({ + top: 0, + height: k, + right: P + xA.a, + width: xA.a + }); + v.setLayout({ + top: 0, + height: k, + right: 0, + width: xA.a + }); + const R = this.b.modifiedScrollTop.read(x); + const L = this.b.modifiedScrollHeight.read(x); + const F = this.b.modified.getOption(108); + const O = new mat(F.verticalHasArrows ? F.arrowSize : 0, F.verticalScrollbarSize, 0, D.height, L, R); + u.setTop(O.getSliderPosition()); + u.setHeight(O.getSliderSize()); + } else { + u.setTop(0); + u.setHeight(0); + } + d.style.height = k + "px"; + d.style.left = E - xA.ENTIRE_DIFF_OVERVIEW_WIDTH + "px"; + u.setWidth(xA.ENTIRE_DIFF_OVERVIEW_WIDTH); + })); + })); + } +}; +Dne = xA = __decorate([__param(6, ti)], Dne); +Qd(); +Rs(); +X(); +te(); +Fi(); +var AXt = class extends H { + get onDidContentSizeChange() { + return this.a.event; + } + constructor(e, t, s, n, r, o, a) { + super(); + this.b = e; + this.c = t; + this.f = s; + this.g = n; + this.h = r; + this.j = o; + this.m = a; + this.original = this.D(this.n(this.f.editorOptions.get(), this.g.originalEditor || {})); + this.modified = this.D(this.q(this.f.editorOptions.get(), this.g.modifiedEditor || {})); + this.a = this.D(new B()); + this.modifiedScrollTop = Ro(this, this.modified.onDidScrollChange, () => this.modified.getScrollTop()); + this.modifiedScrollHeight = Ro(this, this.modified.onDidScrollChange, () => this.modified.getScrollHeight()); + this.modifiedObs = ay(this.modified); + this.originalObs = ay(this.original); + this.modifiedModel = this.modifiedObs.model; + this.modifiedSelections = Ro(this, this.modified.onDidChangeCursorSelection, () => this.modified.getSelections() ?? []); + this.modifiedCursor = Uy({ + owner: this, + equalsFn: je.equals + }, l => this.modifiedSelections.read(l)[0]?.getPosition() ?? new je(1, 1)); + this.originalCursor = Ro(this, this.original.onDidChangeCursorPosition, () => this.original.getPosition() ?? new je(1, 1)); + this.isOriginalFocused = ay(this.original).isFocused; + this.isModifiedFocused = ay(this.modified).isFocused; + this.isFocused = Is(this, l => this.isOriginalFocused.read(l) || this.isModifiedFocused.read(l)); + this.g = null; + this.D(Mte({ + createEmptyChangeSummary: () => ({}), + handleChange: (l, c) => { + if (l.didChange(s.editorOptions)) { + Object.assign(c, l.change.changedOptions); + } + return true; + } + }, (l, c) => { + s.editorOptions.read(l); + this.f.renderSideBySide.read(l); + this.modified.updateOptions(this.t(l, c)); + this.original.updateOptions(this.s(l, c)); + })); + } + n(e, t) { + const s = this.s(undefined, e); + const n = this.r(this.j, this.b, s, t); + n.setContextValue("isInDiffLeftEditor", true); + return n; + } + q(e, t) { + const s = this.t(undefined, e); + const n = this.r(this.j, this.c, s, t); + n.setContextValue("isInDiffRightEditor", true); + return n; + } + r(e, t, s, n) { + const r = this.h(e, t, s, n); + this.D(r.onDidContentSizeChange(o => { + const a = this.original.getContentWidth() + this.modified.getContentWidth() + Dne.ENTIRE_DIFF_OVERVIEW_WIDTH; + const l = Math.max(this.modified.getContentHeight(), this.original.getContentHeight()); + this.a.fire({ + contentHeight: l, + contentWidth: a, + contentHeightChanged: o.contentHeightChanged, + contentWidthChanged: o.contentWidthChanged + }); + })); + return r; + } + s(e, t) { + const s = this.u(t); + if (this.f.renderSideBySide.get()) { + s.unicodeHighlight = this.f.editorOptions.get().unicodeHighlight || {}; + s.wordWrapOverride1 = this.f.diffWordWrap.get(); + } else { + s.wordWrapOverride1 = "off"; + s.wordWrapOverride2 = "off"; + s.stickyScroll = { + enabled: false + }; + s.unicodeHighlight = { + nonBasicASCII: false, + ambiguousCharacters: false, + invisibleCharacters: false + }; + } + s.glyphMargin = this.f.renderSideBySide.get(); + if (t.originalAriaLabel) { + s.ariaLabel = t.originalAriaLabel; + } + s.ariaLabel = this.w(s.ariaLabel); + s.readOnly = !this.f.originalEditable.get(); + s.dropIntoEditor = { + enabled: !s.readOnly + }; + s.extraEditorClassName = "original-in-monaco-diff-editor"; + return s; + } + t(e, t) { + const s = this.u(t); + if (t.modifiedAriaLabel) { + s.ariaLabel = t.modifiedAriaLabel; + } + s.ariaLabel = this.w(s.ariaLabel); + s.wordWrapOverride1 = this.f.diffWordWrap.get(); + s.revealHorizontalRightPadding = r1.revealHorizontalRightPadding.defaultValue + Dne.ENTIRE_DIFF_OVERVIEW_WIDTH; + s.scrollbar.verticalHasArrows = false; + s.extraEditorClassName = "modified-in-monaco-diff-editor"; + return s; + } + u(e) { + const t = { + ...e, + dimension: { + height: 0, + width: 0 + } + }; + t.inDiffEditor = true; + t.automaticLayout = false; + t.scrollbar = { + ...(t.scrollbar || {}) + }; + t.folding = false; + t.codeLens = this.f.diffCodeLens.get(); + t.fixedOverflowWidgets = true; + t.minimap = { + ...(t.minimap || {}) + }; + t.minimap.enabled = false; + if (this.f.hideUnchangedRegions.get()) { + t.stickyScroll = { + enabled: false + }; + } else { + t.stickyScroll = this.f.editorOptions.get().stickyScroll; + } + return t; + } + w(e) { + e ||= ""; + const t = f(222, null, this.m.lookupKeybinding("editor.action.accessibilityHelp")?.getAriaLabel()); + if (this.f.accessibilityVerbose.get()) { + return e + t; + } else if (e) { + return e.replaceAll(t, ""); + } else { + return ""; + } + } +}; +AXt = __decorate([__param(5, re), __param(6, oi)], AXt); +xe(); +md(); +q0(); +hh(); +nt(); +au(); +pe(); +q(); +rt(); +var Adr = false; +var kpt; +(function (i) { + i.North = "north"; + i.South = "south"; + i.East = "east"; + i.West = "west"; +})(kpt ||= {}); +var GBs; +(function (i) { + i[i.VERTICAL = 0] = "VERTICAL"; + i[i.HORIZONTAL = 1] = "HORIZONTAL"; +})(GBs ||= {}); +var KBs; +(function (i) { + i[i.Disabled = 0] = "Disabled"; + i[i.AtMinimum = 1] = "AtMinimum"; + i[i.AtMaximum = 2] = "AtMaximum"; + i[i.Enabled = 3] = "Enabled"; +})(KBs ||= {}); +var YBs = 4; +var XBs = new B(); +function $dr(i) { + YBs = i; + XBs.fire(i); +} +var QBs = 300; +var ZBs = new B(); +function Fdr(i) { + QBs = i; + ZBs.fire(i); +} +var $Xt = class { + constructor(i) { + this.b = i; + this.a = new Q(); + } + get onPointerMove() { + return this.a.add(new Co(Kt(this.b), "mousemove")).event; + } + get onPointerUp() { + return this.a.add(new Co(Kt(this.b), "mouseup")).event; + } + dispose() { + this.a.dispose(); + } +}; +__decorate([Hs], $Xt.prototype, "onPointerMove", null); +__decorate([Hs], $Xt.prototype, "onPointerUp", null); +var FXt = class { + get onPointerMove() { + return this.a.add(new Co(this.b, ul.Change)).event; + } + get onPointerUp() { + return this.a.add(new Co(this.b, ul.End)).event; + } + constructor(i) { + this.b = i; + this.a = new Q(); + } + dispose() { + this.a.dispose(); + } +}; +__decorate([Hs], FXt.prototype, "onPointerMove", null); +__decorate([Hs], FXt.prototype, "onPointerUp", null); +var Ept = class { + get onPointerMove() { + return this.a.onPointerMove; + } + get onPointerUp() { + return this.a.onPointerUp; + } + constructor(i) { + this.a = i; + } + dispose() {} +}; +__decorate([Hs], Ept.prototype, "onPointerMove", null); +__decorate([Hs], Ept.prototype, "onPointerUp", null); +var e4s = "pointer-events-disabled"; +var IR = class pB extends H { + get state() { + return this.j; + } + get orthogonalStartSash() { + return this.u; + } + get orthogonalEndSash() { + return this.C; + } + set state(e) { + if (this.j !== e) { + this.a.classList.toggle("disabled", e === 0); + this.a.classList.toggle("minimum", e === 1); + this.a.classList.toggle("maximum", e === 2); + this.j = e; + this.m.fire(e); + } + } + set orthogonalStartSash(e) { + if (this.u !== e) { + this.w.clear(); + this.t.clear(); + if (e) { + const t = s => { + this.w.clear(); + if (s !== 0) { + this.y = z(this.a, G(".orthogonal-drag-handle.start")); + this.w.add(Ue(() => this.y.remove())); + this.w.add(new Co(this.y, "mouseenter")).event(() => pB.J(e), undefined, this.w); + this.w.add(new Co(this.y, "mouseleave")).event(() => pB.L(e), undefined, this.w); + } + }; + this.t.add(e.m.event(t, this)); + t(e.state); + } + this.u = e; + } + } + set orthogonalEndSash(e) { + if (this.C !== e) { + this.F.clear(); + this.z.clear(); + if (e) { + const t = s => { + this.F.clear(); + if (s !== 0) { + this.G = z(this.a, G(".orthogonal-drag-handle.end")); + this.F.add(Ue(() => this.G.remove())); + this.F.add(new Co(this.G, "mouseenter")).event(() => pB.J(e), undefined, this.F); + this.F.add(new Co(this.G, "mouseleave")).event(() => pB.L(e), undefined, this.F); + } + }; + this.z.add(e.m.event(t, this)); + t(e.state); + } + this.C = e; + } + } + constructor(e, t, s) { + super(); + this.g = QBs; + this.h = this.D(new gl(this.g)); + this.j = 3; + this.m = this.D(new B()); + this.n = this.D(new B()); + this.q = this.D(new B()); + this.r = this.D(new B()); + this.s = this.D(new B()); + this.t = this.D(new Q()); + this.w = this.D(new Q()); + this.z = this.D(new Q()); + this.F = this.D(new Q()); + this.onDidStart = this.n.event; + this.onDidChange = this.q.event; + this.onDidReset = this.r.event; + this.onDidEnd = this.s.event; + this.linkedSash = undefined; + this.a = z(e, G(".monaco-sash")); + if (s.orthogonalEdge) { + this.a.classList.add(`orthogonal-edge-${s.orthogonalEdge}`); + } + if (Gt) { + this.a.classList.add("mac"); + } + const n = this.D(new Co(this.a, "mousedown")).event; + this.D(n(d => this.H(d, new $Xt(e)), this)); + const r = this.D(new Co(this.a, "dblclick")).event; + this.D(r(this.I, this)); + const o = this.D(new Co(this.a, "mouseenter")).event; + this.D(o(() => pB.J(this))); + const a = this.D(new Co(this.a, "mouseleave")).event; + this.D(a(() => pB.L(this))); + this.D(bd.addTarget(this.a)); + const l = this.D(new Co(this.a, ul.Start)).event; + this.D(l(d => this.H(d, new FXt(this.a)), this)); + const c = this.D(new Co(this.a, ul.Tap)).event; + let u; + this.D(c(d => { + if (u) { + clearTimeout(u); + u = undefined; + this.I(d); + return; + } + clearTimeout(u); + u = setTimeout(() => u = undefined, 250); + }, this)); + if (typeof s.size == "number") { + this.f = s.size; + if (s.orientation === 0) { + this.a.style.width = `${this.f}px`; + } else { + this.a.style.height = `${this.f}px`; + } + } else { + this.f = YBs; + this.D(XBs.event(d => { + this.f = d; + this.layout(); + })); + } + this.D(ZBs.event(d => this.g = d)); + this.b = t; + this.orthogonalStartSash = s.orthogonalStartSash; + this.orthogonalEndSash = s.orthogonalEndSash; + this.c = s.orientation || 0; + if (this.c === 1) { + this.a.classList.add("horizontal"); + this.a.classList.remove("vertical"); + } else { + this.a.classList.remove("horizontal"); + this.a.classList.add("vertical"); + } + this.a.classList.toggle("debug", Adr); + this.layout(); + } + H(e, t) { + yn.stop(e); + let s = false; + if (!e.__orthogonalSashEvent) { + const p = this.M(e); + if (p) { + s = true; + e.__orthogonalSashEvent = true; + p.H(e, new Ept(t)); + } + } + if (this.linkedSash && !e.__linkedSashEvent) { + e.__linkedSashEvent = true; + this.linkedSash.H(e, new Ept(t)); + } + if (!this.state) { + return; + } + const n = this.a.ownerDocument.getElementsByTagName("iframe"); + for (const p of n) { + p.classList.add(e4s); + } + const r = e.pageX; + const o = e.pageY; + const a = e.altKey; + const l = { + startX: r, + currentX: r, + startY: o, + currentY: o, + altKey: a + }; + this.a.classList.add("active"); + this.n.fire(l); + const c = pd(this.a); + const u = () => { + let p = ""; + if (s) { + p = "all-scroll"; + } else if (this.c === 1) { + if (this.state === 1) { + p = "s-resize"; + } else if (this.state === 2) { + p = "n-resize"; + } else { + p = Gt ? "row-resize" : "ns-resize"; + } + } else if (this.state === 1) { + p = "e-resize"; + } else if (this.state === 2) { + p = "w-resize"; + } else { + p = Gt ? "col-resize" : "ew-resize"; + } + c.textContent = `* { cursor: ${p} !important; }`; + }; + const d = new Q(); + u(); + if (!s) { + this.m.event(u, null, d); + } + const h = p => { + yn.stop(p, false); + const b = { + startX: r, + currentX: p.pageX, + startY: o, + currentY: p.pageY, + altKey: a + }; + this.q.fire(b); + }; + const g = p => { + yn.stop(p, false); + c.remove(); + this.a.classList.remove("active"); + this.s.fire(); + d.dispose(); + for (const b of n) { + b.classList.remove(e4s); + } + }; + t.onPointerMove(h, null, d); + t.onPointerUp(g, null, d); + d.add(t); + } + I(e) { + const t = this.M(e); + if (t) { + t.r.fire(); + } + if (this.linkedSash) { + this.linkedSash.r.fire(); + } + this.r.fire(); + } + static J(e, t = false) { + if (e.a.classList.contains("active")) { + e.h.cancel(); + e.a.classList.add("hover"); + } else { + e.h.trigger(() => e.a.classList.add("hover"), e.g).then(undefined, () => {}); + } + if (!t && e.linkedSash) { + pB.J(e.linkedSash, true); + } + } + static L(e, t = false) { + e.h.cancel(); + e.a.classList.remove("hover"); + if (!t && e.linkedSash) { + pB.L(e.linkedSash, true); + } + } + clearSashHoverState() { + pB.L(this); + } + layout() { + if (this.c === 0) { + const e = this.b; + this.a.style.left = e.getVerticalSashLeft(this) - this.f / 2 + "px"; + if (e.getVerticalSashTop) { + this.a.style.top = e.getVerticalSashTop(this) + "px"; + } + if (e.getVerticalSashHeight) { + this.a.style.height = e.getVerticalSashHeight(this) + "px"; + } + } else { + const e = this.b; + this.a.style.top = e.getHorizontalSashTop(this) - this.f / 2 + "px"; + if (e.getHorizontalSashLeft) { + this.a.style.left = e.getHorizontalSashLeft(this) + "px"; + } + if (e.getHorizontalSashWidth) { + this.a.style.width = e.getHorizontalSashWidth(this) + "px"; + } + } + } + M(e) { + const t = e.initialTarget ?? e.target; + if (!!t && !!Bl(t) && t.classList.contains("orthogonal-drag-handle")) { + if (t.classList.contains("start")) { + return this.orthogonalStartSash; + } else { + return this.orthogonalEndSash; + } + } + } + dispose() { + super.dispose(); + this.a.remove(); + } +}; +q(); +An(); +var Odr = class { + resetSash() { + this.a.set(undefined, undefined); + } + constructor(i, e) { + this.b = i; + this.dimensions = e; + this.sashLeft = J9t(this, t => { + const s = this.a.read(t) ?? this.b.splitViewDefaultRatio.read(t); + return this.c(s, t); + }, (t, s) => { + const n = this.dimensions.width.get(); + this.a.set(t / n, s); + }); + this.a = un(this, undefined); + } + c(i, e) { + const t = this.dimensions.width.read(e); + const s = Math.floor(this.b.splitViewDefaultRatio.read(e) * t); + const n = this.b.enableSplitViewResizing.read(e) ? Math.floor(i * t) : s; + const r = 100; + if (t <= r * 2) { + return s; + } else if (n < r) { + return r; + } else if (n > t - r) { + return t - r; + } else { + return n; + } + } +}; +var t4s = class extends H { + constructor(i, e, t, s, n, r) { + super(); + this.c = i; + this.f = e; + this.g = t; + this.h = s; + this.sashLeft = n; + this.j = r; + this.a = this.D(new IR(this.c, { + getVerticalSashTop: o => 0, + getVerticalSashLeft: o => this.sashLeft.get(), + getVerticalSashHeight: o => this.f.height.get() + }, { + orientation: 0 + })); + this.b = undefined; + this.D(this.a.onDidStart(() => { + this.b = this.sashLeft.get(); + })); + this.D(this.a.onDidChange(o => { + this.sashLeft.set(this.b + (o.currentX - o.startX), undefined); + })); + this.D(this.a.onDidEnd(() => this.a.layout())); + this.D(this.a.onDidReset(() => this.j())); + this.D(Dn(o => { + const a = this.h.read(o); + if (a) { + this.a.orthogonalEndSash = a.bottom; + } + })); + this.D(Dn(o => { + const a = this.g.read(o); + this.a.state = a ? 3 : 0; + this.sashLeft.read(o); + this.f.height.read(o); + this.a.layout(); + })); + } +}; +pe(); +q(); +var _dr = class XOn extends H { + constructor() { + super(...arguments); + this.b = ++XOn.a; + this.f = this.D(new B()); + this.onDidDispose = this.f.event; + } + static { + this.a = 0; + } + getId() { + return this.getEditorType() + ":v2:" + this.b; + } + getVisibleColumnFromPosition(e) { + return this.g.getVisibleColumnFromPosition(e); + } + getStatusbarColumn(e) { + return this.g.getStatusbarColumn(e); + } + getPosition() { + return this.g.getPosition(); + } + setPosition(e, t = "api") { + this.g.setPosition(e, t); + } + revealLine(e, t = 0) { + this.g.revealLine(e, t); + } + revealLineInCenter(e, t = 0) { + this.g.revealLineInCenter(e, t); + } + revealLineInCenterIfOutsideViewport(e, t = 0) { + this.g.revealLineInCenterIfOutsideViewport(e, t); + } + revealLineNearTop(e, t = 0) { + this.g.revealLineNearTop(e, t); + } + revealPosition(e, t = 0) { + this.g.revealPosition(e, t); + } + revealPositionInCenter(e, t = 0) { + this.g.revealPositionInCenter(e, t); + } + revealPositionInCenterIfOutsideViewport(e, t = 0) { + this.g.revealPositionInCenterIfOutsideViewport(e, t); + } + revealPositionNearTop(e, t = 0) { + this.g.revealPositionNearTop(e, t); + } + getSelection() { + return this.g.getSelection(); + } + getSelections() { + return this.g.getSelections(); + } + setSelection(e, t = "api") { + this.g.setSelection(e, t); + } + setSelections(e, t = "api") { + this.g.setSelections(e, t); + } + revealLines(e, t, s = 0) { + this.g.revealLines(e, t, s); + } + revealLinesInCenter(e, t, s = 0) { + this.g.revealLinesInCenter(e, t, s); + } + revealLinesInCenterIfOutsideViewport(e, t, s = 0) { + this.g.revealLinesInCenterIfOutsideViewport(e, t, s); + } + revealLinesNearTop(e, t, s = 0) { + this.g.revealLinesNearTop(e, t, s); + } + revealRange(e, t = 0, s = false, n = true) { + this.g.revealRange(e, t, s, n); + } + revealRangeInCenter(e, t = 0) { + this.g.revealRangeInCenter(e, t); + } + revealRangeInCenterIfOutsideViewport(e, t = 0) { + this.g.revealRangeInCenterIfOutsideViewport(e, t); + } + revealRangeNearTop(e, t = 0) { + this.g.revealRangeNearTop(e, t); + } + revealRangeNearTopIfOutsideViewport(e, t = 0) { + this.g.revealRangeNearTopIfOutsideViewport(e, t); + } + revealRangeAtTop(e, t = 0) { + this.g.revealRangeAtTop(e, t); + } + getSupportedActions() { + return this.g.getSupportedActions(); + } + focus() { + this.g.focus(); + } + trigger(e, t, s) { + this.g.trigger(e, t, s); + } + createDecorationsCollection(e) { + return this.g.createDecorationsCollection(e); + } + changeDecorations(e) { + return this.g.changeDecorations(e); + } +}; +An(); +Ho(); +var i0 = { + enableSplitViewResizing: true, + splitViewDefaultRatio: 0.5, + renderSideBySide: true, + renderMarginRevertIcon: true, + renderGutterMenu: true, + maxComputationTime: 5000, + maxFileSize: 50, + ignoreTrimWhitespace: true, + renderIndicators: true, + originalEditable: false, + diffCodeLens: false, + renderOverviewRuler: true, + diffWordWrap: "inherit", + diffAlgorithm: "advanced", + accessibilityVerbose: false, + experimental: { + showMoves: false, + showEmptyDecorations: true, + useTrueInlineView: false + }, + hideUnchangedRegions: { + enabled: false, + contextLineCount: 3, + minimumLineCount: 3, + revealLineCount: 20 + }, + isInEmbeddedEditor: false, + onlyShowAccessibleDiffViewer: false, + renderSideBySideInlineBreakpoint: 900, + useInlineViewWhenSpaceIsLimited: true, + compactMode: false +}; +Qd(); +var Ipt = class { + get editorOptions() { + return this.a; + } + constructor(e, t) { + this.d = t; + this.b = un(this, 0); + this.c = Ro(this, this.d.onDidChangeScreenReaderOptimized, () => this.d.isScreenReaderOptimized()); + this.couldShowInlineViewBecauseOfSize = Is(this, n => this.a.read(n).renderSideBySide && this.b.read(n) <= this.a.read(n).renderSideBySideInlineBreakpoint); + this.renderOverviewRuler = Is(this, n => this.a.read(n).renderOverviewRuler); + this.renderSideBySide = Is(this, n => this.compactMode.read(n) && this.g.read(n) ? false : this.a.read(n).renderSideBySide && (!this.a.read(n).useInlineViewWhenSpaceIsLimited || !this.couldShowInlineViewBecauseOfSize.read(n) || !!this.c.read(n))); + this.readOnly = Is(this, n => this.a.read(n).readOnly); + this.shouldRenderOldRevertArrows = Is(this, n => !!this.a.read(n).renderMarginRevertIcon && !!this.renderSideBySide.read(n) && !this.readOnly.read(n) && !this.shouldRenderGutterMenu.read(n)); + this.shouldRenderGutterMenu = Is(this, n => this.a.read(n).renderGutterMenu); + this.renderIndicators = Is(this, n => this.a.read(n).renderIndicators); + this.enableSplitViewResizing = Is(this, n => this.a.read(n).enableSplitViewResizing); + this.splitViewDefaultRatio = Is(this, n => this.a.read(n).splitViewDefaultRatio); + this.ignoreTrimWhitespace = Is(this, n => this.a.read(n).ignoreTrimWhitespace); + this.maxComputationTimeMs = Is(this, n => this.a.read(n).maxComputationTime); + this.showMoves = Is(this, n => this.a.read(n).experimental.showMoves && this.renderSideBySide.read(n)); + this.isInEmbeddedEditor = Is(this, n => this.a.read(n).isInEmbeddedEditor); + this.diffWordWrap = Is(this, n => this.a.read(n).diffWordWrap); + this.originalEditable = Is(this, n => this.a.read(n).originalEditable); + this.diffCodeLens = Is(this, n => this.a.read(n).diffCodeLens); + this.accessibilityVerbose = Is(this, n => this.a.read(n).accessibilityVerbose); + this.diffAlgorithm = Is(this, n => this.a.read(n).diffAlgorithm); + this.showEmptyDecorations = Is(this, n => this.a.read(n).experimental.showEmptyDecorations); + this.onlyShowAccessibleDiffViewer = Is(this, n => this.a.read(n).onlyShowAccessibleDiffViewer); + this.compactMode = Is(this, n => this.a.read(n).compactMode); + this.e = Is(this, n => this.a.read(n).experimental.useTrueInlineView); + this.useTrueInlineDiffRendering = Is(this, n => !this.renderSideBySide.read(n) && this.e.read(n)); + this.hideUnchangedRegions = Is(this, n => this.a.read(n).hideUnchangedRegions.enabled); + this.hideUnchangedRegionsRevealLineCount = Is(this, n => this.a.read(n).hideUnchangedRegions.revealLineCount); + this.hideUnchangedRegionsContextLineCount = Is(this, n => this.a.read(n).hideUnchangedRegions.contextLineCount); + this.hideUnchangedRegionsMinimumLineCount = Is(this, n => this.a.read(n).hideUnchangedRegions.minimumLineCount); + this.f = un(this, undefined); + this.g = this.f.map(this, n => oKn(this, r => { + const o = n?.diff.read(r); + if (o) { + return Bdr(o, this.e.read(r)); + } else { + return undefined; + } + })).flatten().map(this, n => !!n); + this.inlineViewHideOriginalLineNumbers = this.compactMode; + const s = { + ...e, + ...i4s(e, i0) + }; + this.a = un(this, s); + } + updateOptions(e) { + const t = i4s(e, this.a.get()); + const s = { + ...this.a.get(), + ...e, + ...t + }; + this.a.set(s, undefined, { + changedOptions: e + }); + } + setWidth(e) { + this.b.set(e, undefined); + } + setModel(e) { + this.f.set(e, undefined); + } +}; +Ipt = __decorate([__param(1, na)], Ipt); +function Bdr(i, e) { + return i.mappings.every(t => Udr(t.lineRangeMapping) || Wdr(t.lineRangeMapping) || e && MXt(t.lineRangeMapping)); +} +function Udr(i) { + return i.original.length === 0; +} +function Wdr(i) { + return i.modified.length === 0; +} +function i4s(i, e) { + return { + enableSplitViewResizing: jr(i.enableSplitViewResizing, e.enableSplitViewResizing), + splitViewDefaultRatio: Tjn(i.splitViewDefaultRatio, 0.5, 0.1, 0.9), + renderSideBySide: jr(i.renderSideBySide, e.renderSideBySide), + renderMarginRevertIcon: jr(i.renderMarginRevertIcon, e.renderMarginRevertIcon), + maxComputationTime: vj(i.maxComputationTime, e.maxComputationTime, 0, 1073741824), + maxFileSize: vj(i.maxFileSize, e.maxFileSize, 0, 1073741824), + ignoreTrimWhitespace: jr(i.ignoreTrimWhitespace, e.ignoreTrimWhitespace), + renderIndicators: jr(i.renderIndicators, e.renderIndicators), + originalEditable: jr(i.originalEditable, e.originalEditable), + diffCodeLens: jr(i.diffCodeLens, e.diffCodeLens), + renderOverviewRuler: jr(i.renderOverviewRuler, e.renderOverviewRuler), + diffWordWrap: Rf(i.diffWordWrap, e.diffWordWrap, ["off", "on", "inherit"]), + diffAlgorithm: Rf(i.diffAlgorithm, e.diffAlgorithm, ["legacy", "advanced"], { + smart: "legacy", + experimental: "advanced" + }), + accessibilityVerbose: jr(i.accessibilityVerbose, e.accessibilityVerbose), + experimental: { + showMoves: jr(i.experimental?.showMoves, e.experimental.showMoves), + showEmptyDecorations: jr(i.experimental?.showEmptyDecorations, e.experimental.showEmptyDecorations), + useTrueInlineView: jr(i.experimental?.useTrueInlineView, e.experimental.useTrueInlineView) + }, + hideUnchangedRegions: { + enabled: jr(i.hideUnchangedRegions?.enabled ?? i.experimental?.collapseUnchangedRegions, e.hideUnchangedRegions.enabled), + contextLineCount: vj(i.hideUnchangedRegions?.contextLineCount, e.hideUnchangedRegions.contextLineCount, 0, 1073741824), + minimumLineCount: vj(i.hideUnchangedRegions?.minimumLineCount, e.hideUnchangedRegions.minimumLineCount, 0, 1073741824), + revealLineCount: vj(i.hideUnchangedRegions?.revealLineCount, e.hideUnchangedRegions.revealLineCount, 0, 1073741824) + }, + isInEmbeddedEditor: jr(i.isInEmbeddedEditor, e.isInEmbeddedEditor), + onlyShowAccessibleDiffViewer: jr(i.onlyShowAccessibleDiffViewer, e.onlyShowAccessibleDiffViewer), + renderSideBySideInlineBreakpoint: vj(i.renderSideBySideInlineBreakpoint, e.renderSideBySideInlineBreakpoint, 0, 1073741824), + useInlineViewWhenSpaceIsLimited: jr(i.useInlineViewWhenSpaceIsLimited, e.useInlineViewWhenSpaceIsLimited), + renderGutterMenu: jr(i.renderGutterMenu, e.renderGutterMenu), + compactMode: jr(i.compactMode, e.compactMode) + }; +} +xe(); +q(); +An(); +xe(); +gd(); +sl(); +X(); +xe(); +_a(); +zh(); +xe(); +_a(); +hh(); +aS(); +oa(); +Fs(); +pe(); +var Vdr = class extends ff { + constructor(i, e) { + super(); + this.j = this.D(new B()); + this.onDidChangeVisibility = this.j.event; + this.a = z(i, G(".monaco-dropdown")); + this.c = z(this.a, G(".dropdown-label")); + let t = e.labelRenderer; + t ||= n => { + n.textContent = e.label || ""; + return null; + }; + for (const n of [Oe.CLICK, Oe.MOUSE_DOWN, ul.Tap]) { + this.D(Ce(this.element, n, r => yn.stop(r, true))); + } + for (const n of [Oe.MOUSE_DOWN, ul.Tap]) { + this.D(Ce(this.c, n, r => { + if (!W0(r) || !(r.detail > 1) && r.button === 0) { + if (this.h) { + this.hide(); + } else { + this.show(); + } + } + })); + } + this.D(Ce(this.c, Oe.KEY_UP, n => { + const r = new wr(n); + if (r.equals(3) || r.equals(10)) { + yn.stop(n, true); + if (this.h) { + this.hide(); + } else { + this.show(); + } + } + })); + const s = t(this.c); + if (s) { + this.D(s); + } + this.D(bd.addTarget(this.c)); + } + get element() { + return this.a; + } + get label() { + return this.c; + } + set tooltip(i) { + if (this.c) { + if (!this.n && i !== "") { + this.n = this.D(d1().setupManagedHover(cr("mouse"), this.c, i)); + } else if (this.n) { + this.n.update(i); + } + } + } + show() { + if (!this.h) { + this.h = true; + this.j.fire(true); + } + } + hide() { + if (this.h) { + this.h = false; + this.j.fire(false); + } + } + isVisible() { + return !!this.h; + } + r(i, e) { + this.hide(); + } + dispose() { + super.dispose(); + this.hide(); + if (this.b) { + this.b.remove(); + this.b = undefined; + } + if (this.g) { + this.g.remove(); + this.g = undefined; + } + if (this.c) { + this.c.remove(); + this.c = undefined; + } + } +}; +var Hdr = class extends Vdr { + constructor(i, e) { + super(i, e); + this.u = e; + this.t = []; + this.w = e.actions || []; + } + set menuOptions(i) { + this.s = i; + } + get menuOptions() { + return this.s; + } + get w() { + if (this.u.actionProvider) { + return this.u.actionProvider.getActions(); + } else { + return this.t; + } + } + set w(i) { + this.t = i; + } + show() { + super.show(); + this.element.classList.add("active"); + this.u.contextMenuProvider.showContextMenu({ + getAnchor: () => this.element, + getActions: () => this.w, + getActionsContext: () => this.menuOptions ? this.menuOptions.context : null, + getActionViewItem: (i, e) => this.menuOptions && this.menuOptions.actionViewItemProvider ? this.menuOptions.actionViewItemProvider(i, e) : undefined, + getKeyBinding: i => this.menuOptions && this.menuOptions.getKeyBinding ? this.menuOptions.getKeyBinding(i) : undefined, + getMenuClassName: () => this.u.menuClassName || "", + onHide: () => this.y(), + actionRunner: this.menuOptions ? this.menuOptions.actionRunner : undefined, + anchorAlignment: this.menuOptions ? this.menuOptions.anchorAlignment : 0, + domForShadowRoot: this.u.menuAsChild ? this.element : undefined, + skipTelemetry: this.u.skipTelemetry + }); + } + hide() { + super.hide(); + } + y() { + this.hide(); + this.element.classList.remove("active"); + } +}; +Fs(); +He(); +Rt(); +pe(); +oa(); +aS(); +var T1 = class extends jv { + constructor(i, e, t, s = Object.create(null)) { + super(null, i, s); + this.t = null; + this.y = this.D(new B()); + this.onDidChangeVisibility = this.y.event; + this.b = e; + this.n = t; + this.q = s; + if (this.q.actionRunner) { + this.actionRunner = this.q.actionRunner; + } + } + render(i) { + this.t = i; + const e = n => { + this.element = z(n, G("a.action-label")); + let r = []; + if (typeof this.q.classNames == "string") { + r = this.q.classNames.split(/\s+/g).filter(o => !!o); + } else if (this.q.classNames) { + r = this.q.classNames; + } + if (!r.find(o => o === "icon")) { + r.push("codicon"); + } + this.element.classList.add(...r); + this.element.setAttribute("role", "button"); + this.element.setAttribute("aria-haspopup", "true"); + this.element.setAttribute("aria-expanded", "false"); + if (this._action.label) { + this.D(d1().setupManagedHover(this.q.hoverDelegate ?? cr("mouse"), this.element, this._action.label)); + } + this.element.ariaLabel = this._action.label || ""; + return null; + }; + const t = Array.isArray(this.b); + const s = { + contextMenuProvider: this.n, + labelRenderer: e, + menuAsChild: this.q.menuAsChild, + actions: t ? this.b : undefined, + actionProvider: t ? undefined : this.b, + skipTelemetry: this.q.skipTelemetry + }; + this.m = this.D(new Hdr(i, s)); + this.D(this.m.onDidChangeVisibility(n => { + this.element?.setAttribute("aria-expanded", `${n}`); + this.y.fire(n); + })); + this.m.menuOptions = { + actionViewItemProvider: this.q.actionViewItemProvider, + actionRunner: this.actionRunner, + getKeyBinding: this.q.keybindingProvider, + context: this._context + }; + if (this.q.anchorAlignmentProvider) { + const n = this; + this.m.menuOptions = { + ...this.m.menuOptions, + get anchorAlignment() { + return n.q.anchorAlignmentProvider(); + } + }; + } + this.G(); + this.w(); + } + F() { + let i = null; + if (this.action.tooltip) { + i = this.action.tooltip; + } else if (this.action.label) { + i = this.action.label; + } + return i ?? undefined; + } + setActionContext(i) { + super.setActionContext(i); + if (this.m) { + if (this.m.menuOptions) { + this.m.menuOptions.context = i; + } else { + this.m.menuOptions = { + context: i + }; + } + } + } + show() { + this.m?.show(); + } + w() { + const i = !this.action.enabled; + this.t?.classList.toggle("disabled", i); + this.element?.classList.toggle("disabled", i); + } +}; +var qdr = class extends $f { + constructor(i, e, t, s) { + super(i, e, t); + this.m = s; + } + render(i) { + super.render(i); + if (this.element) { + this.element.classList.add("action-dropdown-item"); + const e = { + getActions: () => { + const n = this.q.menuActionsOrProvider; + if (Array.isArray(n)) { + return n; + } else { + return n.getActions(); + } + } + }; + const t = this.q.menuActionClassNames || []; + const s = Ts("div.action-dropdown-item-separator", [Ts("div", {})]).root; + s.classList.toggle("prominent", t.includes("prominent")); + z(this.element, s); + this.g = this.D(new T1(this.D(new Yt("dropdownAction", f(8, null))), e, this.m, { + classNames: ["dropdown", ...le.asClassNameArray(A.dropDownButton), ...t], + hoverDelegate: this.q.hoverDelegate + })); + this.g.render(this.element); + this.D(Ce(this.element, Oe.KEY_DOWN, n => { + if (e.getActions().length === 0) { + return; + } + const r = new wr(n); + let o = false; + if (this.g?.isFocused() && r.equals(15)) { + o = true; + this.g?.blur(); + this.focus(); + } else if (this.isFocused() && r.equals(17)) { + o = true; + this.blur(); + this.g?.focus(); + } + if (o) { + r.preventDefault(); + r.stopPropagation(); + } + })); + } + } + blur() { + super.blur(); + this.g?.blur(); + } + setFocusable(i) { + super.setFocusable(i); + this.g?.setFocusable(i); + } +}; +Fs(); +He(); +Rt(); +pe(); +q(); +X(); +oa(); +var kA = class extends H { + constructor(i, e, t = { + orientation: 0 + }) { + super(); + this.t = []; + this.u = false; + this.y = this.D(new mI()); + this.onDidChangeDropdownVisibility = this.y.event; + this.z = this.D(new Q()); + t.hoverDelegate = t.hoverDelegate ?? this.D(Hy()); + this.f = t; + this.n = this.D(new OXt(() => this.q?.show(), t.toggleMenuTitle)); + this.w = document.createElement("div"); + this.w.className = "monaco-toolbar"; + i.appendChild(this.w); + this.m = this.D(new ea(this.w, { + orientation: t.orientation, + ariaLabel: t.ariaLabel, + actionRunner: t.actionRunner, + allowContextMenu: t.allowContextMenu, + highlightToggledItems: t.highlightToggledItems, + hoverDelegate: t.hoverDelegate, + actionViewItemProvider: (s, n) => { + if (s.id === OXt.ID) { + this.q = new T1(s, s.menuActions, e, { + actionViewItemProvider: this.f.actionViewItemProvider, + actionRunner: this.actionRunner, + keybindingProvider: this.f.getKeyBinding, + classNames: le.asClassNameArray(t.moreIcon ?? A.ellipsisTwo), + anchorAlignmentProvider: this.f.anchorAlignmentProvider, + menuAsChild: !!this.f.renderDropdownAsChildElement, + skipTelemetry: this.f.skipTelemetry, + isMenu: true, + hoverDelegate: this.f.hoverDelegate + }); + this.q.setActionContext(this.m.context); + this.z.add(this.y.add(this.q.onDidChangeVisibility)); + return this.q; + } + if (t.actionViewItemProvider) { + const r = t.actionViewItemProvider(s, n); + if (r) { + return r; + } + } + if (s instanceof mg) { + const r = new T1(s, s.actions, e, { + actionViewItemProvider: this.f.actionViewItemProvider, + actionRunner: this.actionRunner, + keybindingProvider: this.f.getKeyBinding, + classNames: s.class, + anchorAlignmentProvider: this.f.anchorAlignmentProvider, + menuAsChild: !!this.f.renderDropdownAsChildElement, + skipTelemetry: this.f.skipTelemetry, + hoverDelegate: this.f.hoverDelegate + }); + r.setActionContext(this.m.context); + this.t.push(r); + this.z.add(this.y.add(r.onDidChangeVisibility)); + return r; + } + } + })); + } + set actionRunner(i) { + this.m.actionRunner = i; + } + get actionRunner() { + return this.m.actionRunner; + } + set context(i) { + this.m.context = i; + this.q?.setActionContext(i); + for (const e of this.t) { + e.setActionContext(i); + } + } + getElement() { + return this.w; + } + focus() { + this.m.focus(); + } + getItemsWidth() { + let i = 0; + for (let e = 0; e < this.m.length(); e++) { + i += this.m.getWidth(e); + } + return i; + } + getItemAction(i) { + return this.m.getAction(i); + } + getItemWidth(i) { + return this.m.getWidth(i); + } + getItemsLength() { + return this.m.length(); + } + setAriaLabel(i) { + this.m.setAriaLabel(i); + } + setActions(i, e) { + this.F(); + const t = i ? i.slice(0) : []; + this.u = !!e && !!(e.length > 0); + if (this.u && e) { + this.n.menuActions = e.slice(0); + t.push(this.n); + } + t.forEach(s => { + this.m.push(s, { + icon: this.f.icon ?? true, + label: this.f.label ?? false, + keybinding: this.C(s) + }); + }); + } + isEmpty() { + return this.m.isEmpty(); + } + C(i) { + return this.f.getKeyBinding?.(i)?.getLabel() ?? undefined; + } + F() { + this.t = []; + this.z.clear(); + this.m.clear(); + } + dispose() { + this.F(); + this.z.dispose(); + super.dispose(); + } +}; +var OXt = class QOn extends Yt { + static { + this.ID = "toolbar.toggle.more"; + } + constructor(e, t) { + t = t || f(30, null); + super(QOn.ID, t, undefined, true); + this.a = []; + this.b = e; + } + async run() { + this.b(); + } + get menuActions() { + return this.a; + } + set menuActions(e) { + this.a = e; + } +}; +Fs(); +Jt(); +mT(); +Ut(); +pe(); +sa(); +q(); +X(); +wb(); +xe(); +_a(); +zh(); +Fs(); +E7(); +q(); +rt(); +Rt(); +zt(); +X(); +Ho(); +pe(); +It(); +te(); +var EA = Ve("actionBadgeService"); +var jdr = class { + constructor() { + this.a = new B(); + this.onDidChangeBadge = this.a.event; + this.b = new Map(); + } + setBadge(i, e) { + if (e) { + this.b.set(i, e); + } else { + this.b.delete(i); + } + this.a.fire({ + actionId: i, + badge: e + }); + } + getBadge(i) { + return this.b.get(i); + } +}; +it(EA, jdr, 0); +function Kwe(i) { + return i && typeof i == "object" && typeof i.original == "string" && typeof i.value == "string"; +} +function _Xt(i) { + if (i) { + return i.condition !== undefined; + } else { + return false; + } +} +Ee(); +ks(); +te(); +Fi(); +Wi(); +qt(); +ya(); +Qs(); +vp(); +gi(); +Je(); +Pn(); +function SE(i, e) { + const t = { + primary: [], + secondary: [] + }; + s4s(i, t, e); + return t; +} +function CS(i, e) { + const t = []; + s4s(i, t, e); + return t; +} +function s4s(i, e, t) { + const s = Y2.getInstance(); + const n = s.keyStatus.altKey || (ln || yl) && s.keyStatus.shiftKey; + n4s(i, e, n, t ? r => r === t : r => r === "navigation"); +} +function km(i, e, t, s) { + const n = { + primary: [], + secondary: [] + }; + Tne(i, n, e, t, s); + return n; +} +function P1(i, e, t, s) { + const n = []; + Tne(i, n, e, t, s); + return n; +} +function Tne(i, e, t, s, n) { + n4s(i, e, false, typeof t == "string" ? o => o === t : t, s, n); +} +function n4s(i, e, t, s = o => o === "navigation", n = () => false, r = false) { + let o; + let a; + if (Array.isArray(e)) { + o = e; + a = e; + } else { + o = e.primary; + a = e.secondary; + } + const l = new Set(); + for (const [c, u] of i) { + let d; + if (s(c)) { + d = o; + if (d.length > 0 && r) { + d.push(new gr()); + } + } else { + d = a; + if (d.length > 0) { + d.push(new gr()); + } + } + for (let h of u) { + if (t) { + h = h instanceof Ma && h.alt ? h.alt : h; + } + const g = d.push(h); + if (h instanceof mg) { + l.add({ + group: c, + action: h, + index: g - 1 + }); + } + } + } + for (const { + group: c, + action: u, + index: d + } of l) { + const h = s(c) ? o : a; + const g = u.actions; + if (n(u, c, h.length)) { + h.splice(d, 1, ...g); + } + } +} +var Eb = class extends $f { + dispose() { + super.dispose(); + this.t?.dispose(); + } + constructor(e, t, s, n, r, o, a, l, c) { + super(undefined, e, { + icon: !!e.class || !!e.item.icon, + label: !e.class && !e.item.icon, + draggable: t?.draggable, + keybinding: t?.keybinding, + hoverDelegate: t?.hoverDelegate + }); + this.ab = t; + this.bb = s; + this.cb = n; + this.db = r; + this.eb = o; + this.fb = a; + this.gb = l; + this.hb = c; + this.n = false; + this.r = this.D(new ki()); + this.X = this.D(new ki()); + this.s = Y2.getInstance(); + this.D(this.hb.onDidChangeBadge(u => { + if (u.actionId === this.jb.id) { + this.sb(u.badge); + } + })); + } + get ib() { + return this._action; + } + get jb() { + return this.n && this.ib.alt || this.ib; + } + async onClick(e) { + e.preventDefault(); + e.stopPropagation(); + try { + await this.actionRunner.run(this.jb, this._context); + } catch (t) { + this.cb.error(t); + } + } + render(e) { + if (this._action.id === J2) { + if (this.t) { + this.t.dispose(); + } + const n = document.createElement("span"); + n.classList.add("keybinding"); + const r = this.bb.lookupKeybinding(this.jb.id, this.db); + const o = r && r.getLabel(); + n.textContent = o || ""; + n.style.fontSize = "10px"; + n.style.opacity = "0.5"; + n.style.display = "none"; + this.nb = n; + const a = this.db; + this.t = a.onDidChangeContext(l => { + if (l.affectsSome(new Set(["focusedView"]))) { + if (a.getContextKeyValue("focusedView") === Lw) { + if (this.lb) { + clearTimeout(this.lb); + } + if (Date.now() - P5t < 3000) { + this.lb = setTimeout(() => { + n.style.display = "inline"; + }, 3000 - (Date.now() - P5t)); + } else { + n.style.display = "inline"; + } + } else { + n.style.display = "none"; + } + } + }); + } + super.render(e); + e.classList.add("menu-entry"); + if (this.q.icon) { + this.rb(this.ib.item); + } + this.Y = z(e, G(".badge")); + this.Z = z(this.Y, G(".badge-content")); + Qo(this.Y); + const t = this.jb.item.badge; + const s = this.hb.getBadge(this.jb.id); + if (t || s) { + this.sb(s || t); + } + if (this.ib.alt) { + let n = false; + const r = () => { + const o = !!this.ib.alt?.enabled && (!this.gb.isMotionReduced() || n) && (this.s.keyStatus.altKey || this.s.keyStatus.shiftKey && n); + if (o !== this.n) { + this.n = o; + this.z(); + this.G(); + this.I(); + } + }; + this.D(this.s.event(r)); + this.D(Ce(e, "mouseleave", o => { + n = false; + r(); + })); + this.D(Ce(e, "mouseenter", o => { + n = true; + r(); + })); + r(); + } + } + z() { + if (this.q.label && this.L) { + this.L.textContent = this.jb.label; + } + } + F() { + const e = this.bb.lookupKeybinding(this.jb.id, this.db); + const t = e && e.getLabel(); + const s = this.jb.tooltip || this.jb.label; + let n = t ? f(1676, null, s, t) : s; + if (!this.n && this.ib.alt?.enabled) { + const r = this.ib.alt.tooltip || this.ib.alt.label; + const o = this.bb.lookupKeybinding(this.ib.alt.id, this.db); + const a = o && o.getLabel(); + const l = a ? f(1677, null, r, a) : r; + n = f(1678, null, n, k7.modifierLabels[Ia].altKey, l); + } + return n; + } + I() { + if (this.q.icon) { + if (this.jb !== this.ib) { + if (this.ib.alt) { + this.rb(this.ib.alt.item); + } + } else { + this.rb(this.ib.item); + } + } + } + rb(e) { + this.r.value = undefined; + const { + element: t, + L: s + } = this; + if (!t || !s) { + return; + } + const n = this.jb.checked && _Xt(e.toggled) && e.toggled.icon ? e.toggled.icon : e.icon; + if (n) { + if (le.isThemeIcon(n)) { + const r = le.asClassNameArray(n); + s.classList.add(...r); + this.r.value = Ue(() => { + s.classList.remove(...r); + }); + } else { + s.style.backgroundImage = I3t(this.eb.getColorTheme().type) ? Ih(n.dark) : Ih(n.light); + s.classList.add("icon"); + this.r.value = Gc(Ue(() => { + s.style.backgroundImage = ""; + s.classList.remove("icon"); + }), this.eb.onDidColorThemeChange(() => { + this.I(); + })); + } + } + } + sb(e) { + if (!this.Y || !this.Z) { + return; + } + const t = new Q(); + this.X.value?.dispose(); + this.X.value = t; + Lr(this.Z); + Qo(this.Y); + if (!e) { + return; + } + const s = ["badge-content"]; + if (typeof e.value == "number") { + let o = e.value.toString(); + if (e.value > 999) { + const a = e.value / 1000; + const l = Math.floor(a); + if (a > l) { + o = `${l}K+`; + } else { + o = `${a}K`; + } + } + this.Z.textContent = o; + Ka(this.Y); + } else if (typeof e.value == "string" && e.value.length > 0) { + this.Z.textContent = e.value; + Ka(this.Y); + } + if (s.length) { + this.Z.classList.add(...s); + t.add(Ue(() => this.Z?.classList.remove(...s))); + } + const n = e.foregroundColor || "var(--vscode-badge-foreground)"; + const r = e.backgroundColor || "var(--vscode-badge-background)"; + if (this.Z) { + this.Z.style.color = n ? n.toString() : ""; + this.Z.style.backgroundColor = r ? r.toString() : ""; + } + } +}; +Eb = __decorate([__param(2, oi), __param(3, ni), __param(4, Ne), __param(5, ti), __param(6, ts), __param(7, na), __param(8, EA)], Eb); +var zdr = class ZOn extends Eb { + render(e) { + this.q.label = true; + this.q.icon = false; + super.render(e); + e.classList.add("text-only"); + e.classList.toggle("use-comma", this.ab?.useComma ?? false); + } + z() { + const e = this.bb.lookupKeybinding(this._action.id, this.db); + if (!e) { + return super.z(); + } + if (this.L) { + const t = ZOn.c(e); + if (this.ab?.conversational) { + this.L.textContent = f(1679, null, this._action.label, t); + } else { + this.L.textContent = f(1680, null, this._action.label, t); + } + } + } + static c(e) { + return e.getLabel()?.replace(/\benter\b/gi, "⏎").replace(/\bEscape\b/gi, "Esc"); + } +}; +var O5 = class extends T1 { + constructor(e, t, s, n, r) { + const o = { + ...t, + menuAsChild: t?.menuAsChild ?? false, + classNames: t?.classNames ?? (le.isThemeIcon(e.item.icon) ? le.asClassName(e.item.icon) : undefined), + keybindingProvider: t?.keybindingProvider ?? (a => s.lookupKeybinding(a.id)) + }; + super(e, { + getActions: () => e.actions + }, n, o); + this.g = s; + this.r = n; + this.O = r; + } + render(e) { + super.render(e); + yr(this.element); + e.classList.add("menu-entry"); + const t = this._action; + const { + icon: s + } = t.item; + if (s && !le.isThemeIcon(s)) { + this.element.classList.add("icon"); + const n = () => { + if (this.element) { + this.element.style.backgroundImage = I3t(this.O.getColorTheme().type) ? Ih(s.dark) : Ih(s.light); + } + }; + n(); + this.D(this.O.onDidColorThemeChange(() => { + n(); + })); + } + } +}; +O5 = __decorate([__param(2, oi), __param(3, ts), __param(4, ti)], O5); +var BXt = class extends jv { + get onDidChangeDropdownVisibility() { + return this.g.onDidChangeVisibility; + } + constructor(e, t, s, n, r, o, a, l) { + super(null, e); + this.n = s; + this.r = n; + this.s = r; + this.t = o; + this.y = a; + this.L = l; + this.h = null; + this.b = t; + this.m = `${e.item.submenu.id}_lastActionId`; + let c; + const u = t?.persistLastActionId ? l.get(this.m, 1) : undefined; + if (u) { + c = e.actions.find(h => u === h.id); + } + c ||= e.actions[0]; + this.c = this.y.createInstance(Eb, c, { + keybinding: this.N(c) + }); + const d = { + keybindingProvider: h => this.n.lookupKeybinding(h.id), + ...t, + menuAsChild: t?.menuAsChild ?? true, + classNames: t?.classNames ?? ["codicon", "codicon-chevron-down"], + actionRunner: t?.actionRunner ?? this.D(new ff()) + }; + this.g = new T1(e, e.actions, this.s, d); + this.D(this.g.actionRunner.onDidRun(h => { + if (h.action instanceof Ma) { + this.M(h.action); + } + })); + } + M(e) { + if (this.b?.persistLastActionId) { + this.L.store(this.m, e.id, 1, 1); + } + this.c.dispose(); + this.c = this.y.createInstance(Eb, e, { + keybinding: this.N(e) + }); + this.c.actionRunner = new class extends ff { + async q(t, s) { + await t.run(undefined); + } + }(); + if (this.h) { + this.c.render(K2(this.h, G(".action-container"))); + } + } + N(e) { + let t; + if (this.b?.renderKeybindingWithDefaultActionLabel) { + const s = this.n.lookupKeybinding(e.id); + if (s) { + t = `(${s.getLabel()})`; + } + } + return t; + } + setActionContext(e) { + super.setActionContext(e); + this.c.setActionContext(e); + this.g.setActionContext(e); + } + render(e) { + this.h = e; + super.render(this.h); + this.h.classList.add("monaco-dropdown-with-default"); + const t = G(".action-container"); + this.c.render(z(this.h, t)); + this.D(Ce(t, Oe.KEY_DOWN, n => { + const r = new wr(n); + if (r.equals(17)) { + this.c.element.tabIndex = -1; + this.g.focus(); + r.stopPropagation(); + } + })); + const s = G(".dropdown-action-container"); + this.g.render(z(this.h, s)); + this.D(Ce(s, Oe.KEY_DOWN, n => { + const r = new wr(n); + if (r.equals(15)) { + this.c.element.tabIndex = 0; + this.g.setFocusable(false); + this.c.element?.focus(); + r.stopPropagation(); + } + })); + } + focus(e) { + if (e) { + this.g.focus(); + } else { + this.c.element.tabIndex = 0; + this.c.element.focus(); + } + } + blur() { + this.c.element.tabIndex = -1; + this.g.blur(); + this.h.blur(); + } + setFocusable(e) { + if (e) { + this.c.element.tabIndex = 0; + } else { + this.c.element.tabIndex = -1; + this.g.setFocusable(false); + } + } + dispose() { + this.c.dispose(); + this.g.dispose(); + super.dispose(); + } +}; +BXt = __decorate([__param(2, oi), __param(3, ni), __param(4, ts), __param(5, Hn), __param(6, re), __param(7, ht)], BXt); +var UXt = class extends Mme { + constructor(e, t) { + super(null, e, e.actions.map(s => ({ + text: s.id === gr.ID ? "─────────" : s.label, + isDisabled: !s.enabled + })), 0, t, qM, { + ariaLabel: e.tooltip, + optionsAsChildren: true + }); + this.select(Math.max(0, e.actions.findIndex(s => s.checked))); + } + render(e) { + super.render(e); + e.style.borderColor = Ui(N9); + } + m(e, t) { + const s = this.action.actions[t]; + if (s) { + this.actionRunner.run(s); + } + } +}; +UXt = __decorate([__param(1, Sc)], UXt); +function Ig(i, e, t) { + if (e instanceof Ma) { + return i.createInstance(Eb, e, t); + } else if (e instanceof vm) { + if (e.item.isSelection) { + return i.createInstance(UXt, e); + } else if (e.item.rememberDefaultAction) { + return i.createInstance(BXt, e, { + ...t, + persistLastActionId: true + }); + } else { + return i.createInstance(O5, e, t); + } + } else { + return undefined; + } +} +Je(); +nt(); +pe(); +q(); +Je(); +Wt(); +Ee(); +Fs(); +qt(); +Jt(); +X(); +Fi(); +var Pne; +var Ywe; +var WXt = class { + constructor(e, t, s) { + this.d = e; + this.f = t; + this.c = new VXt(s); + } + createMenu(e, t, s) { + return new Dpt(e, this.c, { + emitEventsForSubmenuChanges: false, + eventDebounceDelay: 50, + ...s + }, this.d, this.f, t); + } + getMenuActions(e, t, s) { + const n = new Dpt(e, this.c, { + emitEventsForSubmenuChanges: false, + eventDebounceDelay: 50, + ...s + }, this.d, this.f, t); + const r = n.getActions(s); + n.dispose(); + return r; + } + getMenuContexts(e) { + const t = new r4s(e, false); + return new Set([...t.structureContextKeys, ...t.preconditionContextKeys, ...t.toggledContextKeys]); + } + resetHiddenStates(e) { + this.c.reset(e); + } +}; +WXt = __decorate([__param(0, gt), __param(1, oi), __param(2, ht)], WXt); +var VXt = class { + static { + Pne = this; + } + static { + this.c = "menu.hiddenCommands"; + } + constructor(e) { + this.k = e; + this.d = new Q(); + this.f = new B(); + this.onDidChange = this.f.event; + this.h = false; + this.j = new Map(); + try { + const t = e.get(Pne.c, 0, "{}"); + this.i = JSON.parse(t); + } catch { + this.i = Object.create(null); + } + this.d.add(e.onDidChangeValue(0, Pne.c, this.d)(() => { + if (!this.h) { + try { + const t = e.get(Pne.c, 0, "{}"); + this.i = JSON.parse(t); + } catch (t) { + console.log("FAILED to read storage after UPDATE", t); + } + } + this.f.fire(); + })); + } + dispose() { + this.f.dispose(); + this.d.dispose(); + } + l(e, t) { + return this.j.get(`${e.id}/${t}`) ?? false; + } + setDefaultState(e, t, s) { + this.j.set(`${e.id}/${t}`, s); + } + isHidden(e, t) { + const s = this.l(e, t); + const n = this.i[e.id]?.includes(t) ?? false; + if (s) { + return !n; + } else { + return n; + } + } + updateHidden(e, t, s) { + if (this.l(e, t)) { + s = !s; + } + const r = this.i[e.id]; + if (s) { + if (r) { + if (r.indexOf(t) < 0) { + r.push(t); + } + } else { + this.i[e.id] = [t]; + } + } else if (r) { + const o = r.indexOf(t); + if (o >= 0) { + TVn(r, o); + } + if (r.length === 0) { + delete this.i[e.id]; + } + } + this.m(); + } + reset(e) { + if (e === undefined) { + this.i = Object.create(null); + this.m(); + } else { + for (const { + id: t + } of e) { + if (this.i[t]) { + delete this.i[t]; + } + } + this.m(); + } + } + m() { + try { + this.h = true; + const e = JSON.stringify(this.i); + this.k.store(Pne.c, e, 0, 0); + } finally { + this.h = false; + } + } +}; +VXt = Pne = __decorate([__param(0, ht)], VXt); +var r4s = class LFt { + constructor(e, t) { + this.j = e; + this.k = t; + this.c = []; + this.d = new Set(); + this.f = new Set(); + this.h = new Set(); + this.i = new Set(); + this.refresh(); + } + get allMenuIds() { + return this.d; + } + get structureContextKeys() { + return this.f; + } + get preconditionContextKeys() { + return this.h; + } + get toggledContextKeys() { + return this.i; + } + refresh() { + this.c.length = 0; + this.d.clear(); + this.f.clear(); + this.h.clear(); + this.i.clear(); + const e = this.l(Be.getMenuItems(this.j)); + let t; + for (const s of e) { + const n = s.group || ""; + if (!t || t[0] !== n) { + t = [n, []]; + this.c.push(t); + } + t[1].push(s); + this.m(s); + } + this.d.add(this.j); + } + l(e) { + return e; + } + m(e) { + LFt.n(e.when, this.f); + if (GB(e)) { + if (e.command.precondition) { + LFt.n(e.command.precondition, this.h); + } + if (e.command.toggled) { + const t = e.command.toggled.condition || e.command.toggled; + LFt.n(t, this.i); + } + } else if (this.k) { + Be.getMenuItems(e.submenu).forEach(this.m, this); + this.d.add(e.submenu); + } + } + static n(e, t) { + if (e) { + for (const s of e.keys()) { + t.add(s); + } + } + } +}; +var HXt = Ywe = class extends r4s { + constructor(e, t, s, n, r, o) { + super(e, s); + this.o = t; + this.p = n; + this.q = r; + this.r = o; + this.refresh(); + } + createActionGroups(e) { + const t = []; + for (const s of this.c) { + const [n, r] = s; + let o; + for (const a of r) { + if (this.r.contextMatchesRules(a.when)) { + const l = GB(a); + if (l) { + this.o.setDefaultState(this.j, a.command.id, !!a.isHiddenByDefault); + } + const c = Jdr(this.j, l ? a.command : a, this.o); + if (l) { + const u = qXt(this.p, this.q, a.command.id, a.when); + (o ??= []).push(new Ma(a.command, a.alt, e, c, u, this.r, this.p)); + } else { + const u = new Ywe(a.submenu, this.o, this.k, this.p, this.q, this.r).createActionGroups(e); + const d = gr.join(...u.map(h => h[1])); + if (d.length > 0) { + (o ??= []).push(new vm(a, c, d)); + } + } + } + } + if (o && o.length > 0) { + t.push([n, o]); + } + } + return t; + } + l(e) { + return e.sort(Ywe.t); + } + static t(e, t) { + const s = e.group; + const n = t.group; + if (s !== n) { + if (s) { + if (!n) { + return -1; + } + } else { + return 1; + } + if (s === "navigation") { + return -1; + } + if (n === "navigation") { + return 1; + } + const a = s.localeCompare(n); + if (a !== 0) { + return a; + } + } + const r = e.order || 0; + const o = t.order || 0; + if (r < o) { + return -1; + } else if (r > o) { + return 1; + } else { + return Ywe.u(GB(e) ? e.command.title : e.title, GB(t) ? t.command.title : t.title); + } + } + static u(e, t) { + const s = typeof e == "string" ? e : e.original; + const n = typeof t == "string" ? t : t.original; + return s.localeCompare(n); + } +}; +HXt = Ywe = __decorate([__param(3, gt), __param(4, oi), __param(5, Ne)], HXt); +var Dpt = class { + constructor(e, t, s, n, r, o) { + this.d = new Q(); + this.c = new HXt(e, t, s.emitEventsForSubmenuChanges, n, r, o); + const a = new Vn(() => { + this.c.refresh(); + this.f.fire({ + menu: this, + isStructuralChange: true, + isEnablementChange: true, + isToggleChange: true + }); + }, s.eventDebounceDelay); + this.d.add(a); + this.d.add(Be.onDidChangeMenu(d => { + for (const h of this.c.allMenuIds) { + if (d.has(h)) { + a.schedule(); + break; + } + } + })); + const l = this.d.add(new Q()); + const c = d => { + let h = false; + let g = false; + let p = false; + for (const b of d) { + h = h || b.isStructuralChange; + g = g || b.isEnablementChange; + p = p || b.isToggleChange; + if (h && g && p) { + break; + } + } + return { + menu: this, + isStructuralChange: h, + isEnablementChange: g, + isToggleChange: p + }; + }; + const u = () => { + l.add(o.onDidChangeContext(d => { + const h = d.affectsSome(this.c.structureContextKeys); + const g = d.affectsSome(this.c.preconditionContextKeys); + const p = d.affectsSome(this.c.toggledContextKeys); + if (h || g || p) { + this.f.fire({ + menu: this, + isStructuralChange: h, + isEnablementChange: g, + isToggleChange: p + }); + } + })); + l.add(t.onDidChange(d => { + this.f.fire({ + menu: this, + isStructuralChange: true, + isEnablementChange: false, + isToggleChange: false + }); + })); + }; + this.f = new xnt({ + onWillAddFirstListener: u, + onDidRemoveLastListener: l.clear.bind(l), + delay: s.eventDebounceDelay, + merge: c + }); + this.onDidChange = this.f.event; + } + getActions(e) { + return this.c.createActionGroups(e); + } + dispose() { + this.d.dispose(); + this.f.dispose(); + } +}; +Dpt = __decorate([__param(3, gt), __param(4, oi), __param(5, Ne)], Dpt); +function Jdr(i, e, t) { + const s = Nqn(e) ? e.submenu.id : e.id; + const n = typeof e.title == "string" ? e.title : e.title.value; + const r = Ba({ + id: `hide/${i.id}/${s}`, + label: f(1684, null, n), + run() { + t.updateHidden(i, s, true); + } + }); + const o = Ba({ + id: `toggle/${i.id}/${s}`, + label: n, + get checked() { + return !t.isHidden(i, s); + }, + run() { + t.updateHidden(i, s, !!this.checked); + } + }); + return { + hide: r, + toggle: o, + get isHidden() { + return !o.checked; + } + }; +} +function qXt(i, e, t, s = undefined, n = true) { + return Ba({ + id: `configureKeybinding/${t}`, + label: f(1685, null), + enabled: n, + run() { + const o = !e.lookupKeybinding(t) && s ? s.serialize() : undefined; + i.executeCommand("workbench.action.openGlobalKeybindings", `@command:${t}${o ? ` +when:${o}` : ""}`); + } + }); +} +Wt(); +Ee(); +ks(); +Fi(); +ai(); +pe(); +q(); +It(); +te(); +Je(); +var jXt = Ve("IActionViewItemService"); +var Gdr = class { + constructor() { + this.a = new Map(); + this.b = new B(); + this.onDidChange = this.b.event; + } + dispose() { + this.b.dispose(); + } + register(i, e, t, s) { + const n = this.c(i, e); + if (this.a.has(n)) { + throw new Error(`A provider for the command ${e} and menu ${i} is already registered.`); + } + this.a.set(n, t); + const r = s?.(() => { + this.b.fire(i); + }); + return Ue(() => { + r?.dispose(); + this.a.delete(n); + }); + } + lookUp(i, e) { + return this.a.get(this.c(i, e)); + } + c(i, e) { + return `${i.id}/${e instanceof _ ? e.id : e}`; + } +}; +it(jXt, Gdr, 1); +te(); +var o4s; +(function (i) { + i[i.NoHide = -1] = "NoHide"; + i[i.Ignore = 0] = "Ignore"; + i[i.RenderInSecondaryGroup = 1] = "RenderInSecondaryGroup"; +})(o4s ||= {}); +var Dp = class extends kA { + constructor(e, t, s, n, r, o, a, l) { + super(e, r, { + getKeyBinding: u => o.lookupKeybinding(u.id) ?? undefined, + ...t, + allowContextMenu: true, + skipTelemetry: typeof t?.telemetrySource == "string" + }); + this.H = t; + this.I = s; + this.J = n; + this.L = r; + this.M = o; + this.N = a; + this.G = this.B.add(new Q()); + const c = t?.telemetrySource; + if (c) { + this.B.add(this.m.onDidRun(u => l.publicLog2("workbenchActionExecuted", { + id: u.action.id, + from: c + }))); + } + } + setActions(e, t = [], s) { + this.G.clear(); + const n = e.slice(); + const r = t.slice(); + const o = []; + let a = 0; + const l = []; + let c = false; + if (this.H?.hiddenItemStrategy !== -1) { + for (let u = 0; u < n.length; u++) { + const d = n[u]; + if (!!(d instanceof Ma) || !!(d instanceof vm)) { + if (d.hideActions) { + o.push(d.hideActions.toggle); + if (d.hideActions.toggle.checked) { + a++; + } + if (d.hideActions.isHidden) { + c = true; + n[u] = undefined; + if (this.H?.hiddenItemStrategy !== 0) { + l[u] = d; + } + } + } + } + } + } + if (this.H?.overflowBehavior !== undefined) { + const u = xVn(new Set(this.H.overflowBehavior.exempted), Ws.map(n, g => g?.id)); + const d = this.H.overflowBehavior.maxItems - u.size; + let h = 0; + for (let g = 0; g < n.length; g++) { + const p = n[g]; + if (p) { + h++; + if (!u.has(p.id) && h >= d) { + n[g] = undefined; + l[g] = p; + } + } + } + } + Y3(n); + Y3(l); + super.setActions(n, gr.join(l, r)); + if (o.length > 0 || n.length > 0) { + this.G.add(Ce(this.getElement(), "contextmenu", u => { + const d = new Xc(Kt(this.getElement()), u); + const h = this.getItemAction(d.target); + if (!h) { + return; + } + d.preventDefault(); + d.stopPropagation(); + const g = []; + if (h instanceof Ma && h.menuKeybinding) { + g.push(h.menuKeybinding); + } else if (!(h instanceof vm) && !(h instanceof OXt)) { + const b = !!this.M.lookupKeybinding(h.id); + g.push(qXt(this.N, this.M, h.id, undefined, b)); + } + if (o.length > 0) { + let b = false; + if (a === 1 && this.H?.hiddenItemStrategy === 0) { + b = true; + for (let v = 0; v < o.length; v++) { + if (o[v].checked) { + o[v] = Ba({ + id: h.id, + label: h.label, + checked: true, + enabled: false, + run() {} + }); + break; + } + } + } + if (!b && (h instanceof Ma || h instanceof vm)) { + if (!h.hideActions) { + return; + } + g.push(h.hideActions.hide); + } else { + g.push(Ba({ + id: "label", + label: f(1681, null), + enabled: false, + run() {} + })); + } + } + const p = gr.join(g, o); + if (this.H?.resetMenu && !s) { + s = [this.H.resetMenu]; + } + if (c && s) { + p.push(new gr()); + p.push(Ba({ + id: "resetThisMenu", + label: f(1682, null), + run: () => this.I.resetHiddenStates(s) + })); + } + if (p.length !== 0) { + this.L.showContextMenu({ + getAnchor: () => d, + getActions: () => p, + menuId: this.H?.contextMenu, + menuActionOptions: { + renderShortTitle: true, + ...this.H?.menuOptions + }, + skipTelemetry: typeof this.H?.telemetrySource == "string", + contextKeyService: this.J + }); + } + })); + } + } +}; +Dp = __decorate([__param(2, Hn), __param(3, Ne), __param(4, ts), __param(5, oi), __param(6, gt), __param(7, Ot)], Dp); +var Em = class extends Dp { + constructor(e, t, s, n, r, o, a, l, c, u, d) { + super(e, { + resetMenu: t, + ...s, + actionViewItemProvider: (p, b) => { + let v = u.lookUp(t, p instanceof vm ? p.item.submenu.id : p.id); + v ||= s?.actionViewItemProvider; + const y = v?.(p, b); + return y || Ig(d, p, b); + } + }, n, r, o, a, l, c); + this.b = this.B.add(new B()); + this.onDidChangeMenuItems = this.b.event; + const h = this.B.add(n.createMenu(t, r, { + emitEventsForSubmenuChanges: true, + eventDebounceDelay: s?.eventDebounceDelay + })); + const g = () => { + const { + primary: p, + secondary: b + } = km(h.getActions(s?.menuOptions), s?.toolbarOptions?.primaryGroup, s?.toolbarOptions?.shouldInlineSubmenu, s?.toolbarOptions?.useSeparatorsInPrimaryActions); + e.classList.toggle("has-no-actions", p.length === 0 && b.length === 0); + super.setActions(p, b); + }; + this.B.add(h.onDidChange(() => { + g(); + this.b.fire(this); + })); + this.B.add(u.onDidChange(p => { + if (p === t) { + g(); + } + })); + g(); + } + setActions() { + throw new co("This toolbar is populated from a menu."); + } +}; +Em = __decorate([__param(3, Hn), __param(4, Ne), __param(5, ts), __param(6, oi), __param(7, gt), __param(8, Ot), __param(9, jXt), __param(10, re)], Em); +Je(); +Ee(); +te(); +q(); +Me(); +xe(); +var Ns = Ve("hoverService"); +var DR = class extends H { + get delay() { + if (this.t()) { + return 0; + } else { + return this.g; + } + } + constructor(e, t, s = {}, n, r) { + super(); + this.placement = e; + this.m = t; + this.n = s; + this.q = n; + this.s = r; + this.c = 0; + this.f = 200; + this.j = this.D(new Q()); + this.g = this.q.getValue("workbench.hover.delay"); + this.D(this.q.onDidChangeConfiguration(o => { + if (o.affectsConfiguration("workbench.hover.delay")) { + this.g = this.q.getValue("workbench.hover.delay"); + } + })); + } + showHover(e, t) { + const s = typeof this.n == "function" ? this.n(e, t) : this.n; + this.j.clear(); + const n = Bl(e.target) ? [e.target] : e.target.targetElements; + for (const o of n) { + this.j.add(ko(o, "keydown", a => { + if (a.equals(9)) { + this.s.hideHover(); + } + })); + } + const r = Bl(e.content) ? undefined : typeof e.content == "string" ? e.content.toString() : e.content.value; + return this.s.showHover({ + ...e, + ...s, + persistence: { + hideOnKeyDown: true, + ...s.persistence + }, + id: r, + appearance: { + ...e.appearance, + compact: true, + skipFadeInAnimation: this.t(), + ...s.appearance + } + }, t); + } + t() { + return this.m && Date.now() - this.c < this.f; + } + setInstantHoverTimeLimit(e) { + if (!this.m) { + throw new Error("Instant hover is not enabled"); + } + this.f = e; + } + onDidHideHover() { + this.j.clear(); + if (this.m) { + this.c = Date.now(); + } + } +}; +DR = __decorate([__param(3, ve), __param(4, Ns)], DR); +var Tpt = { + showHover: function () { + throw new Error("Native hover function not implemented."); + }, + delay: 0, + showNativeHover: true +}; +te(); +Nf(); +jp(); +yt(); +TM(); +var Xwe = class extends SXt { + constructor(i) { + super(); + this.d = i; + } + getValueOfRange(i) { + return this.d.getValueInRange(i); + } + getLineLength(i) { + return this.d.getLineLength(i); + } + get length() { + const i = this.d.getLineCount(); + const e = this.d.getLineLength(i); + return new qv(i - 1, e); + } +}; +Fs(); +var a4s = class extends ff { + constructor(i) { + super(); + this.a = i; + } + q(i, e) { + const t = this.a(); + return super.q(i, t); + } +}; +xe(); +q(); +An(); +Nf(); +jp(); +var Kdr = class extends H { + constructor(i, e, t) { + super(); + this.m = i; + this.n = e; + this.q = t; + this.a = Ro(this, this.m.onDidScrollChange, r => this.m.getScrollTop()); + this.b = this.a.map(r => r === 0); + this.c = Ro(this, this.m.onDidChangeModel, r => this.m.hasModel()); + this.f = Wy("onDidChangeViewZones", this.m.onDidChangeViewZones); + this.g = Wy("onDidContentSizeChange", this.m.onDidContentSizeChange); + this.j = AI("domNodeSizeChanged"); + this.r = new Map(); + this.n.className = "gutter monaco-editor"; + const s = this.n.appendChild(Ts("div.scroll-decoration", { + role: "presentation", + ariaHidden: "true", + style: { + width: "100%" + } + }).root); + const n = new ResizeObserver(() => { + Io(r => { + this.j.trigger(r); + }); + }); + n.observe(this.n); + this.D(Ue(() => n.disconnect())); + this.D(Dn(r => { + s.className = this.b.read(r) ? "" : "scroll-decoration"; + })); + this.D(Dn(r => this.s(r))); + } + dispose() { + super.dispose(); + mo(this.n); + } + s(i) { + if (!this.c.read(i)) { + return; + } + this.j.read(i); + this.f.read(i); + this.g.read(i); + const e = this.a.read(i); + const t = this.m.getVisibleRanges(); + const s = new Set(this.r.keys()); + const n = uo.ofStartAndLength(0, this.n.clientHeight); + if (!n.isEmpty) { + for (const r of t) { + const o = new or(r.startLineNumber, r.endLineNumber + 1); + const a = this.q.getIntersectingGutterItems(o, i); + Io(l => { + for (const c of a) { + if (!c.range.intersect(o)) { + continue; + } + s.delete(c.id); + let u = this.r.get(c.id); + if (u) { + u.item.set(c, l); + } else { + const p = document.createElement("div"); + this.n.appendChild(p); + const b = un("item", c); + const v = this.q.createView(b, p); + u = new Ydr(b, v, p); + this.r.set(c.id, u); + } + const d = c.range.startLineNumber <= this.m.getModel().getLineCount() ? this.m.getTopForLineNumber(c.range.startLineNumber, true) - e : this.m.getBottomForLineNumber(c.range.startLineNumber - 1, false) - e; + const g = (c.range.endLineNumberExclusive === 1 ? Math.max(d, this.m.getTopForLineNumber(c.range.startLineNumber, false) - e) : Math.max(d, this.m.getBottomForLineNumber(c.range.endLineNumberExclusive - 1, true) - e)) - d; + u.domNode.style.top = `${d}px`; + u.domNode.style.height = `${g}px`; + u.gutterItemView.layout(uo.ofStartAndLength(d, g), n); + } + }); + } + } + for (const r of s) { + const o = this.r.get(r); + o.gutterItemView.dispose(); + o.domNode.remove(); + this.r.delete(r); + } + } +}; +var Ydr = class { + constructor(i, e, t) { + this.item = i; + this.gutterItemView = e; + this.domNode = t; + } +}; +var zXt = []; +var Ppt = 35; +var JXt = class extends H { + constructor(e, t, s, n, r, o, a, l, c) { + super(); + this.t = t; + this.u = s; + this.w = n; + this.y = r; + this.z = o; + this.C = a; + this.F = l; + this.G = c; + this.b = this.D(this.G.createMenu(_.DiffEditorHunkToolbar, this.F)); + this.f = Ro(this, this.b.onDidChange, () => this.b.getActions()); + this.j = this.f.map(d => d.length > 0); + this.n = Is(this, d => this.w.renderSideBySide.read(d) && this.j.read(d)); + this.width = Is(this, d => this.j.read(d) ? Ppt : 0); + this.q = Ts("div.gutter@gutter", { + style: { + position: "absolute", + height: "100%", + width: Ppt + "px" + } + }, []); + this.H = Is(this, d => { + const h = this.t.read(d); + if (!h) { + return; + } + const g = h.diff.read(d)?.mappings; + const p = this.u.modifiedCursor.read(d); + if (p) { + return g?.find(b => b.lineRangeMapping.modified.contains(p.lineNumber)); + } + }); + this.I = Is(this, d => { + const g = this.t.read(d)?.diff.read(d); + if (!g) { + return zXt; + } + const p = this.u.modifiedSelections.read(d); + if (p.every(w => w.isEmpty())) { + return zXt; + } + const b = new j9(p.map(w => or.fromRangeInclusive(w))); + const y = g.mappings.filter(w => w.lineRangeMapping.innerChanges && b.intersects(w.lineRangeMapping.modified)).map(w => ({ + mapping: w, + rangeMappings: w.lineRangeMapping.innerChanges.filter(C => p.some(S => Z.areIntersecting(C.modifiedRange, S))) + })); + if (y.length === 0 || y.every(w => w.rangeMappings.length === 0)) { + return zXt; + } else { + return y; + } + }); + this.D(Our(e, this.q.root)); + this.D(Ce(this.q.root, "click", () => { + this.u.modified.focus(); + })); + this.D(_U(this.q.root, { + display: this.j.map(d => d ? "block" : "none") + })); + sE(this, d => this.n.read(d) ? new t4s(e, this.y.dimensions, this.w.enableSplitViewResizing, this.z, J9t(this, g => this.y.sashLeft.read(g) - Ppt, (g, p) => this.y.sashLeft.set(g + Ppt, p)), () => this.y.resetSash()) : undefined).recomputeInitiallyAndOnChange(this.B); + const u = Is(this, d => { + const h = this.t.read(d); + if (!h) { + return []; + } + const g = h.diff.read(d); + if (!g) { + return []; + } + const p = this.I.read(d); + if (p.length > 0) { + const v = I1.fromRangeMappings(p.flatMap(y => y.rangeMappings)); + return [new l4s(v, true, _.DiffEditorSelectionToolbar, undefined, h.model.original.uri, h.model.modified.uri)]; + } + const b = this.H.read(d); + return g.mappings.map(v => new l4s(v.lineRangeMapping.withInnerChangesFromLineRanges(), v.lineRangeMapping === b?.lineRangeMapping, _.DiffEditorHunkToolbar, undefined, h.model.original.uri, h.model.modified.uri)); + }); + this.D(new Kdr(this.u.modified, this.q.root, { + getIntersectingGutterItems: (d, h) => u.read(h), + createView: (d, h) => this.C.createInstance(GXt, d, h, this) + })); + this.D(Ce(this.q.gutter, Oe.MOUSE_WHEEL, d => { + if (this.u.modified.getOption(108).handleMouseWheel) { + this.u.modified.delegateScrollFromMouseWheelEvent(d); + } + }, { + passive: false + })); + } + computeStagedValue(e) { + const t = e.innerChanges ?? []; + const s = new Xwe(this.u.modifiedModel.get()); + const n = new Xwe(this.u.original.getModel()); + return new pO(t.map(a => a.toTextEdit(s))).apply(n); + } + layout(e) { + this.q.gutter.style.left = e + "px"; + } +}; +JXt = __decorate([__param(6, re), __param(7, Ne), __param(8, Hn)], JXt); +var l4s = class { + constructor(i, e, t, s, n, r) { + this.mapping = i; + this.showAlways = e; + this.menuId = t; + this.rangeOverride = s; + this.originalUri = n; + this.modifiedUri = r; + } + get id() { + return this.mapping.modified.toString(); + } + get range() { + return this.rangeOverride ?? this.mapping.modified; + } +}; +var GXt = class extends H { + constructor(e, t, s, n) { + super(); + this.q = e; + this.b = Ts("div.gutterItem", { + style: { + height: "20px", + width: "34px" + } + }, [Ts("div.background@background", {}, []), Ts("div.buttons@buttons", {}, [])]); + this.f = this.q.map(this, o => o.showAlways); + this.j = this.q.map(this, o => o.menuId); + this.n = un(this, false); + this.t = undefined; + this.u = undefined; + const r = this.D(n.createInstance(DR, "element", true, { + position: { + hoverPosition: 1 + } + })); + this.D(xne(t, this.b.root)); + this.D(Dn(o => { + const a = this.f.read(o); + this.b.root.classList.toggle("noTransition", true); + this.b.root.classList.toggle("showAlways", a); + setTimeout(() => { + this.b.root.classList.toggle("noTransition", false); + }, 0); + })); + this.D(eh((o, a) => { + this.b.buttons.replaceChildren(); + const l = a.add(n.createInstance(Em, this.b.buttons, this.j.read(o), { + orientation: 1, + hoverDelegate: r, + toolbarOptions: { + primaryGroup: c => c.startsWith("primary") + }, + overflowBehavior: { + maxItems: this.n.read(o) ? 1 : 3 + }, + hiddenItemStrategy: 0, + actionRunner: a.add(new a4s(() => { + const c = this.q.get(); + const u = c.mapping; + return { + mapping: u, + originalWithModifiedChanges: s.computeStagedValue(u), + originalUri: c.originalUri, + modifiedUri: c.modifiedUri + }; + })), + menuOptions: { + shouldForwardArgs: true + } + })); + a.add(l.onDidChangeMenuItems(() => { + if (this.t) { + this.layout(this.t, this.u); + } + })); + })); + } + layout(e, t) { + this.t = e; + this.u = t; + let s = this.b.buttons.clientHeight; + this.n.set(this.q.get().mapping.original.startLineNumber === 1 && e.length < 30, undefined); + s = this.b.buttons.clientHeight; + const n = e.length / 2 - s / 2; + const r = s; + let o = e.start + n; + const a = uo.tryCreate(r, t.endExclusive - r - s); + const l = uo.tryCreate(e.start + r, e.endExclusive - s - r); + if (l && a && l.start < l.endExclusive) { + o = a.clip(o); + o = l.clip(o); + } + this.b.buttons.style.top = `${o - e.start}px`; + } +}; +GXt = __decorate([__param(3, re)], GXt); +xe(); +vd(); +He(); +No(); +q(); +An(); +Rt(); +zt(); +X(); +te(); +Nf(); +Rs(); +yt(); +Eo(); +var Lpt; +var Rpt = class extends H { + static { + Lpt = this; + } + static { + this.a = un(Lpt, () => ({ + dispose() {}, + getBreadcrumbItems(e, t) { + return []; + } + })); + } + static setBreadcrumbsSourceFactory(e) { + this.a.set(e, undefined); + } + get isUpdatingHiddenAreas() { + return this.c; + } + constructor(e, t, s, n) { + super(); + this.f = e; + this.g = t; + this.j = s; + this.n = n; + this.b = sE(this, l => { + const c = this.f.modifiedModel.read(l); + const u = Lpt.a.read(l); + if (!c || !u) { + return undefined; + } else { + return u(c, this.n); + } + }); + this.c = false; + this.D(this.f.original.onDidChangeCursorPosition(l => { + if (l.reason === 1) { + return; + } + const c = this.g.get(); + Io(u => { + for (const d of this.f.original.getSelections() || []) { + c?.ensureOriginalLineIsVisible(d.getStartPosition().lineNumber, 0, u); + c?.ensureOriginalLineIsVisible(d.getEndPosition().lineNumber, 0, u); + } + }); + })); + this.D(this.f.modified.onDidChangeCursorPosition(l => { + if (l.reason === 1) { + return; + } + const c = this.g.get(); + Io(u => { + for (const d of this.f.modified.getSelections() || []) { + c?.ensureModifiedLineIsVisible(d.getStartPosition().lineNumber, 0, u); + c?.ensureModifiedLineIsVisible(d.getEndPosition().lineNumber, 0, u); + } + }); + })); + const r = this.g.map((l, c) => { + const u = l?.unchangedRegions.read(c) ?? []; + if (u.length === 1 && u[0].modifiedLineNumber === 1 && u[0].lineCount === this.f.modifiedModel.read(c)?.getLineCount()) { + return []; + } else { + return u; + } + }); + this.viewZones = w4(this, (l, c) => { + const u = this.b.read(l); + if (!u) { + return { + origViewZones: [], + modViewZones: [] + }; + } + const d = []; + const h = []; + const g = this.j.renderSideBySide.read(l); + const p = this.j.compactMode.read(l); + const b = r.read(l); + for (let v = 0; v < b.length; v++) { + const y = b[v]; + if (!y.shouldHideControls(l) && (!p || v !== 0 && v !== b.length - 1)) { + if (p) { + { + const w = Is(this, S => y.getHiddenOriginalRange(S).startLineNumber - 1); + const C = new kne(w, 12); + d.push(C); + c.add(new c4s(this.f.original, C, y, !g)); + } + { + const w = Is(this, S => y.getHiddenModifiedRange(S).startLineNumber - 1); + const C = new kne(w, 12); + h.push(C); + c.add(new c4s(this.f.modified, C, y)); + } + } else { + { + const w = Is(this, S => y.getHiddenOriginalRange(S).startLineNumber - 1); + const C = new kne(w, 24); + d.push(C); + c.add(new u4s(this.f.original, C, y, y.originalUnchangedRange, !g, u, S => this.g.get().ensureModifiedLineIsVisible(S, 2, undefined), this.j)); + } + { + const w = Is(this, S => y.getHiddenModifiedRange(S).startLineNumber - 1); + const C = new kne(w, 24); + h.push(C); + c.add(new u4s(this.f.modified, C, y, y.modifiedUnchangedRange, false, u, S => this.g.get().ensureModifiedLineIsVisible(S, 2, undefined), this.j)); + } + } + } + } + return { + origViewZones: d, + modViewZones: h + }; + }); + const o = { + description: "unchanged lines", + className: "diff-unchanged-lines", + isWholeLine: true + }; + const a = { + description: "Fold Unchanged", + glyphMarginHoverMessage: new hs(undefined, { + isTrusted: true, + supportThemeIcons: true + }).appendMarkdown(f(235, null)), + glyphMarginClassName: "fold-unchanged " + le.asClassName(A.fold), + zIndex: 10001 + }; + this.D(hpt(this.f.original, Is(this, l => { + const c = r.read(l); + const u = c.map(d => ({ + range: d.originalUnchangedRange.toInclusiveRange(), + options: o + })); + for (const d of c) { + if (d.shouldHideControls(l)) { + u.push({ + range: Z.fromPositions(new je(d.originalLineNumber, 1)), + options: a + }); + } + } + return u; + }))); + this.D(hpt(this.f.modified, Is(this, l => { + const c = r.read(l); + const u = c.map(d => ({ + range: d.modifiedUnchangedRange.toInclusiveRange(), + options: o + })); + for (const d of c) { + if (d.shouldHideControls(l)) { + u.push({ + range: or.ofLength(d.modifiedLineNumber, 1).toInclusiveRange(), + options: a + }); + } + } + return u; + }))); + this.D(Dn(l => { + const c = r.read(l); + this.c = true; + try { + this.f.original.setHiddenAreas(c.map(u => u.getHiddenOriginalRange(l).toInclusiveRange()).filter(to)); + this.f.modified.setHiddenAreas(c.map(u => u.getHiddenModifiedRange(l).toInclusiveRange()).filter(to)); + } finally { + this.c = false; + } + })); + this.D(this.f.modified.onMouseUp(l => { + if (!l.event.rightButton && l.target.position && l.target.element?.className.includes("fold-unchanged")) { + const c = l.target.position.lineNumber; + const u = this.g.get(); + if (!u) { + return; + } + const d = u.unchangedRegions.get().find(h => h.modifiedUnchangedRange.includes(c)); + if (!d) { + return; + } + d.collapseAll(undefined); + l.event.stopPropagation(); + l.event.preventDefault(); + } + })); + this.D(this.f.original.onMouseUp(l => { + if (!l.event.rightButton && l.target.position && l.target.element?.className.includes("fold-unchanged")) { + const c = l.target.position.lineNumber; + const u = this.g.get(); + if (!u) { + return; + } + const d = u.unchangedRegions.get().find(h => h.originalUnchangedRange.includes(c)); + if (!d) { + return; + } + d.collapseAll(undefined); + l.event.stopPropagation(); + l.event.preventDefault(); + } + })); + } +}; +Rpt = Lpt = __decorate([__param(3, re)], Rpt); +var c4s = class extends wXt { + constructor(i, e, t, s = false) { + const n = Ts("div.diff-hidden-lines-widget"); + super(i, e, n.root); + this.g = t; + this.n = s; + this.f = Ts("div.diff-hidden-lines-compact", [Ts("div.line-left", []), Ts("div.text@text", []), Ts("div.line-right", [])]); + n.root.appendChild(this.f.root); + if (this.n) { + this.f.root.replaceChildren(); + } + this.D(Dn(r => { + if (!this.n) { + const o = this.g.getHiddenModifiedRange(r).length; + const a = f(236, null, o); + this.f.text.innerText = a; + } + })); + } +}; +var u4s = class extends wXt { + constructor(i, e, t, s, n, r, o, a) { + const l = Ts("div.diff-hidden-lines-widget"); + super(i, e, l.root); + this.g = i; + this.n = t; + this.q = s; + this.u = n; + this.w = r; + this.y = o; + this.C = a; + this.f = Ts("div.diff-hidden-lines", [Ts("div.top@top", { + title: f(237, null) + }), Ts("div.center@content", { + style: { + display: "flex" + } + }, [Ts("div@first", { + style: { + display: "flex", + justifyContent: "center", + alignItems: "center", + flexShrink: "0" + } + }, [G("a", { + title: f(238, null), + role: "button", + onclick: () => { + this.n.showAll(undefined); + } + }, ...Vu("$(unfold)"))]), Ts("div@others", { + style: { + display: "flex", + justifyContent: "center", + alignItems: "center" + } + })]), Ts("div.bottom@bottom", { + title: f(239, null), + role: "button" + })]); + l.root.appendChild(this.f.root); + if (this.u) { + mo(this.f.first); + } else { + this.D(_U(this.f.first, { + width: ay(this.g).layoutInfoContentLeft + })); + } + this.D(Dn(u => { + const d = this.n.visibleLineCountTop.read(u) + this.n.visibleLineCountBottom.read(u) === this.n.lineCount; + this.f.bottom.classList.toggle("canMoveTop", !d); + this.f.bottom.classList.toggle("canMoveBottom", this.n.visibleLineCountBottom.read(u) > 0); + this.f.top.classList.toggle("canMoveTop", this.n.visibleLineCountTop.read(u) > 0); + this.f.top.classList.toggle("canMoveBottom", !d); + const h = this.n.isDragged.read(u); + const g = this.g.getDomNode(); + if (g) { + g.classList.toggle("draggingUnchangedRegion", !!h); + if (h === "top") { + g.classList.toggle("canMoveTop", this.n.visibleLineCountTop.read(u) > 0); + g.classList.toggle("canMoveBottom", !d); + } else if (h === "bottom") { + g.classList.toggle("canMoveTop", !d); + g.classList.toggle("canMoveBottom", this.n.visibleLineCountBottom.read(u) > 0); + } else { + g.classList.toggle("canMoveTop", false); + g.classList.toggle("canMoveBottom", false); + } + } + })); + const c = this.g; + this.D(Ce(this.f.top, "mousedown", u => { + if (u.button !== 0) { + return; + } + this.f.top.classList.toggle("dragging", true); + this.f.root.classList.toggle("dragging", true); + u.preventDefault(); + const d = u.clientY; + let h = false; + const g = this.n.visibleLineCountTop.get(); + this.n.isDragged.set("top", undefined); + const p = Kt(this.f.top); + const b = Ce(p, "mousemove", y => { + const C = y.clientY - d; + h = h || Math.abs(C) > 2; + const S = Math.round(C / c.getOption(68)); + const x = Math.max(0, Math.min(g + S, this.n.getMaxVisibleLineCountTop())); + this.n.visibleLineCountTop.set(x, undefined); + }); + const v = Ce(p, "mouseup", y => { + if (!h) { + this.n.showMoreAbove(this.C.hideUnchangedRegionsRevealLineCount.get(), undefined); + } + this.f.top.classList.toggle("dragging", false); + this.f.root.classList.toggle("dragging", false); + this.n.isDragged.set(undefined, undefined); + b.dispose(); + v.dispose(); + }); + })); + this.D(Ce(this.f.bottom, "mousedown", u => { + if (u.button !== 0) { + return; + } + this.f.bottom.classList.toggle("dragging", true); + this.f.root.classList.toggle("dragging", true); + u.preventDefault(); + const d = u.clientY; + let h = false; + const g = this.n.visibleLineCountBottom.get(); + this.n.isDragged.set("bottom", undefined); + const p = Kt(this.f.bottom); + const b = Ce(p, "mousemove", y => { + const C = y.clientY - d; + h = h || Math.abs(C) > 2; + const S = Math.round(C / c.getOption(68)); + const x = Math.max(0, Math.min(g - S, this.n.getMaxVisibleLineCountBottom())); + const k = this.q.endLineNumberExclusive > c.getModel().getLineCount() ? c.getContentHeight() : c.getTopForLineNumber(this.q.endLineNumberExclusive); + this.n.visibleLineCountBottom.set(x, undefined); + const E = this.q.endLineNumberExclusive > c.getModel().getLineCount() ? c.getContentHeight() : c.getTopForLineNumber(this.q.endLineNumberExclusive); + c.setScrollTop(c.getScrollTop() + (E - k)); + }); + const v = Ce(p, "mouseup", y => { + this.n.isDragged.set(undefined, undefined); + if (!h) { + const w = c.getTopForLineNumber(this.q.endLineNumberExclusive); + this.n.showMoreBelow(this.C.hideUnchangedRegionsRevealLineCount.get(), undefined); + const C = c.getTopForLineNumber(this.q.endLineNumberExclusive); + c.setScrollTop(c.getScrollTop() + (C - w)); + } + this.f.bottom.classList.toggle("dragging", false); + this.f.root.classList.toggle("dragging", false); + b.dispose(); + v.dispose(); + }); + })); + this.D(Dn(u => { + const d = []; + if (!this.u) { + const h = t.getHiddenModifiedRange(u).length; + const g = f(240, null, h); + const p = G("span", { + title: f(241, null) + }, g); + p.classList.add("diff-hidden-lines-text"); + p.addEventListener("dblclick", y => { + if (y.button === 0) { + y.preventDefault(); + this.n.showAll(undefined); + } + }); + d.push(p); + const b = this.n.getHiddenModifiedRange(u); + const v = this.w.getBreadcrumbItems(b, u); + if (v.length > 0) { + d.push(G("span", undefined, "\xA0\xA0|\xA0\xA0")); + for (let y = 0; y < v.length; y++) { + const w = v[y]; + const C = tE.toIcon(w.kind); + const S = Ts("div.breadcrumb-item", { + style: { + display: "flex", + alignItems: "center" + } + }, [Gp(C), "\xA0", w.name, ...(y === v.length - 1 ? [] : [Gp(A.chevronRight)])]).root; + d.push(S); + S.onclick = () => { + this.y(w.startLineNumber); + }; + } + } + } + mo(this.f.others, ...d); + })); + } +}; +xe(); +vd(); +He(); +q(); +An(); +Nf(); +yt(); +gc(); +X(); +var KXt = []; +var Xdr = class extends H { + constructor(i, e, t, s) { + super(); + this.a = i; + this.b = e; + this.f = t; + this.g = s; + this.j = Is(this, n => { + const o = this.b.read(n)?.diff.read(n); + if (!o) { + return KXt; + } + const a = this.a.modifiedSelections.read(n); + if (a.every(d => d.isEmpty())) { + return KXt; + } + const l = new j9(a.map(d => or.fromRangeInclusive(d))); + const u = o.mappings.filter(d => d.lineRangeMapping.innerChanges && l.intersects(d.lineRangeMapping.modified)).map(d => ({ + mapping: d, + rangeMappings: d.lineRangeMapping.innerChanges.filter(h => a.some(g => Z.areIntersecting(h.modifiedRange, g))) + })); + if (u.length === 0 || u.every(d => d.rangeMappings.length === 0)) { + return KXt; + } else { + return u; + } + }); + this.D(eh((n, r) => { + if (!this.f.shouldRenderOldRevertArrows.read(n)) { + return; + } + const o = this.b.read(n); + const a = o?.diff.read(n); + if (!o || !a || o.movedTextToCompare.read(n)) { + return; + } + const l = []; + const c = this.j.read(n); + const u = new Set(c.map(d => d.mapping)); + if (c.length > 0) { + const d = this.a.modifiedSelections.read(n); + const h = r.add(new d4s(d[d.length - 1].positionLineNumber, this.g, c.flatMap(g => g.rangeMappings), true)); + this.a.modified.addGlyphMarginWidget(h); + l.push(h); + } + for (const d of a.mappings) { + if (!u.has(d) && !d.lineRangeMapping.modified.isEmpty && d.lineRangeMapping.innerChanges) { + const h = r.add(new d4s(d.lineRangeMapping.modified.startLineNumber, this.g, d.lineRangeMapping, false)); + this.a.modified.addGlyphMarginWidget(h); + l.push(h); + } + } + r.add(Ue(() => { + for (const d of l) { + this.a.modified.removeGlyphMarginWidget(d); + } + })); + })); + } +}; +var d4s = class e_n extends H { + static { + this.counter = 0; + } + getId() { + return this.a; + } + constructor(e, t, s, n) { + super(); + this.f = e; + this.g = t; + this.j = s; + this.n = n; + this.a = `revertButton${e_n.counter++}`; + this.b = Ts("div.revertButton", { + title: this.n ? f(246, null) : f(247, null) + }, [Gp(A.arrowRight)]).root; + this.D(Ce(this.b, Oe.MOUSE_DOWN, r => { + if (r.button !== 2) { + r.stopPropagation(); + r.preventDefault(); + } + })); + this.D(Ce(this.b, Oe.MOUSE_UP, r => { + r.stopPropagation(); + r.preventDefault(); + })); + this.D(Ce(this.b, Oe.CLICK, r => { + if (this.j instanceof lP) { + this.g.revert(this.j); + } else { + this.g.revertRangeMappings(this.j); + } + r.stopPropagation(); + r.preventDefault(); + })); + } + getDomNode() { + return this.b; + } + getPosition() { + return { + lane: Dx.Right, + range: { + startColumn: 1, + startLineNumber: this.f, + endColumn: 1, + endLineNumber: this.f + }, + zIndex: 10001 + }; + } +}; +var Dg = class extends _dr { + static { + this.ENTIRE_DIFF_OVERVIEW_WIDTH = Dne.ENTIRE_DIFF_OVERVIEW_WIDTH; + } + get onDidContentSizeChange() { + return this.L.onDidContentSizeChange; + } + get collapseUnchangedRegions() { + return this.J.hideUnchangedRegions.get(); + } + constructor(e, t, s, n, r, o, a, l) { + super(); + this.P = e; + this.Q = n; + this.R = r; + this.S = o; + this.U = a; + this.W = l; + this.j = Ts("div.monaco-diff-editor.side-by-side", { + style: { + position: "relative", + height: "100%" + } + }, [Ts("div.editor.original@original", { + style: { + position: "absolute", + height: "100%" + } + }), Ts("div.editor.modified@modified", { + style: { + position: "absolute", + height: "100%" + } + }), Ts("div.accessibleDiffViewer@accessibleDiffViewer", { + style: { + position: "absolute", + height: "100%" + } + })]); + this.n = this.D(Epe(this, undefined)); + this.q = Is(this, S => this.n.read(S)?.object); + this.onDidChangeModel = de.fromObservableLight(this.q); + this.t = this.D(this.Q.createScoped(this.P)); + this.u = this.D(this.R.createChild(new ml([Ne, this.t]))); + this.F = un(this, undefined); + this.custom = false; + this.G = un(this, false); + this.H = Is(this, S => this.J.onlyShowAccessibleDiffViewer.read(S) ? true : this.G.read(S)); + this.N = un(this, undefined); + this.Z = Is(this, S => { + const x = this.y.width.read(S); + const k = this.y.height.read(S); + if (this.y.automaticLayout) { + this.j.root.style.height = "100%"; + } else { + this.j.root.style.height = k + "px"; + } + const E = this.C.read(S); + const D = this.O.read(S); + const P = D?.width.read(S) ?? 0; + const R = this.M.read(S)?.width ?? 0; + let L; + let F; + let O; + let U; + let j; + if (E) { + const ee = E.sashLeft.read(S); + const ne = this.N.read(S)?.width.read(S) ?? 0; + L = 0; + F = ee - P - ne; + j = ee - P; + O = ee; + U = x - O - R; + } else { + j = 0; + const ee = this.J.inlineViewHideOriginalLineNumbers.read(S); + L = P; + if (ee) { + F = 0; + } else { + F = Math.max(5, this.L.originalObs.layoutInfoDecorationsLeft.read(S)); + } + O = P + F; + U = x - O - R; + } + this.j.original.style.left = L + "px"; + this.j.original.style.width = F + "px"; + this.L.original.layout({ + width: F, + height: k + }, true); + D?.layout(j); + this.j.modified.style.left = O + "px"; + this.j.modified.style.width = U + "px"; + this.Y(); + this.L.modified.layout({ + width: U, + height: k + }, true); + return { + modifiedEditor: this.L.modified.getLayoutInfo(), + originalEditor: this.L.original.getLayoutInfo() + }; + }); + this.bb = this.q.map((S, x) => S?.diff.read(x)); + this.onDidUpdateDiff = de.fromObservableLight(this.bb); + this.S.willCreateDiffEditor(); + this.t.createKey("isInDiffEditor", true); + this.P.appendChild(this.j.root); + this.D(Ue(() => this.j.root.remove())); + this.y = this.D(new yBs(this.j.root, t.dimension)); + this.y.setAutomaticLayout(t.automaticLayout ?? false); + this.J = this.u.createInstance(Ipt, t); + this.D(Dn(S => { + this.J.setWidth(this.y.width.read(S)); + })); + this.t.createKey(ke.isEmbeddedDiffEditor.key, false); + this.D(xm(ke.isEmbeddedDiffEditor, this.t, S => this.J.isInEmbeddedEditor.read(S))); + this.D(xm(ke.comparingMovedCode, this.t, S => !!this.q.read(S)?.movedTextToCompare.read(S))); + this.D(xm(ke.diffEditorRenderSideBySideInlineBreakpointReached, this.t, S => this.J.couldShowInlineViewBecauseOfSize.read(S))); + this.D(xm(ke.diffEditorInlineMode, this.t, S => !this.J.renderSideBySide.read(S))); + this.D(xm(ke.hasChanges, this.t, S => (this.q.read(S)?.diff.read(S)?.mappings.length ?? 0) > 0)); + this.L = this.D(this.u.createInstance(AXt, this.j.original, this.j.modified, this.J, s, (S, x, k, E) => this.X(S, x, k, E))); + this.D(xm(ke.diffEditorOriginalWritable, this.t, S => this.J.originalEditable.read(S))); + this.D(xm(ke.diffEditorModifiedWritable, this.t, S => !this.J.readOnly.read(S))); + this.D(xm(ke.diffEditorOriginalUri, this.t, S => this.q.read(S)?.model.original.uri.toString() ?? "")); + this.D(xm(ke.diffEditorModifiedUri, this.t, S => this.q.read(S)?.model.modified.uri.toString() ?? "")); + this.M = sE(this, S => this.J.renderOverviewRuler.read(S) ? this.u.createInstance(bD(Dne, S), this.L, this.j.root, this.q, this.y.width, this.y.height, this.Z.map(x => x.modifiedEditor)) : undefined).recomputeInitiallyAndOnChange(this.B); + const c = { + height: this.y.height, + width: this.y.width.map((S, x) => S - (this.M.read(x)?.width ?? 0)) + }; + this.z = new Odr(this.J, c); + this.C = sE(this, S => { + const x = this.J.renderSideBySide.read(S); + this.j.root.classList.toggle("side-by-side", x); + if (x) { + return new t4s(this.j.root, c, this.J.enableSplitViewResizing, this.F, this.z.sashLeft, () => this.z.resetSash()); + } else { + return undefined; + } + }).recomputeInitiallyAndOnChange(this.B); + const u = sE(this, S => this.u.createInstance(bD(Rpt, S), this.L, this.q, this.J)).recomputeInitiallyAndOnChange(this.B); + sE(this, S => this.u.createInstance(bD(Ndr, S), this.L, this.q, this.J, this)).recomputeInitiallyAndOnChange(this.B); + const d = new Set(); + const h = new Set(); + let g = false; + const p = sE(this, S => this.u.createInstance(bD(NXt, S), Kt(this.P), this.L, this.q, this.J, this, () => g || u.get().isUpdatingHiddenAreas, d, h)).recomputeInitiallyAndOnChange(this.B); + const b = Is(this, S => { + const x = p.read(S).viewZones.read(S).orig; + const k = u.read(S).viewZones.read(S).origViewZones; + return x.concat(k); + }); + const v = Is(this, S => { + const x = p.read(S).viewZones.read(S).mod; + const k = u.read(S).viewZones.read(S).modViewZones; + return x.concat(k); + }); + this.D(Uwe(this.L.original, b, S => { + g = S; + }, d)); + let y; + this.D(Uwe(this.L.modified, v, S => { + g = S; + if (g) { + y = fO.capture(this.L.modified); + } else { + y?.restore(this.L.modified); + y = undefined; + } + }, h)); + this.I = sE(this, S => this.u.createInstance(bD(BU, S), this.j.accessibleDiffViewer, this.H, (x, k) => this.G.set(x, k), this.J.onlyShowAccessibleDiffViewer.map(x => !x), this.y.width, this.y.height, this.q.map((x, k) => x?.diff.read(k)?.mappings.map(E => E.lineRangeMapping)), new ndr(this.L))).recomputeInitiallyAndOnChange(this.B); + const w = this.H.map(S => S ? "hidden" : "visible"); + this.D(_U(this.j.modified, { + visibility: w + })); + this.D(_U(this.j.original, { + visibility: w + })); + this.$(); + this.S.addDiffEditor(this); + this.O = sE(this, S => this.J.shouldRenderGutterMenu.read(S) ? this.u.createInstance(bD(JXt, S), this.j.root, this.q, this.L, this.J, this.z, this.F) : undefined); + this.D($te(this.Z)); + sE(this, S => new (bD(xpt, S))(this.j.root, this.q, this.Z.map(x => x.originalEditor), this.Z.map(x => x.modifiedEditor), this.L)).recomputeInitiallyAndOnChange(this.B, S => { + this.N.set(S, undefined); + }); + this.D(de.runAndSubscribe(this.L.modified.onDidChangeCursorPosition, S => this.db(S, true))); + this.D(de.runAndSubscribe(this.L.original.onDidChangeCursorPosition, S => this.db(S, false))); + const C = this.q.map(this, (S, x) => { + if (S) { + return S.diff.read(x) === undefined && !S.isDiffUpToDate.read(x); + } + }); + this.D(eh((S, x) => { + if (C.read(S) === true) { + const k = this.W.show(true, 1000); + x.add(Ue(() => k.done())); + } + })); + this.Y(); + this.D(eh((S, x) => { + x.add(new (bD(Xdr, S))(this.L, this.q, this.J, this)); + })); + this.D(eh((S, x) => { + const k = this.q.read(S); + if (k) { + for (const E of [k.model.original, k.model.modified]) { + x.add(E.onWillDispose(D => { + xs(new co("TextModel got disposed before DiffEditorWidget model got reset")); + this.setModel(null); + })); + } + } + })); + this.D(Dn(S => { + this.J.setModel(this.q.read(S)); + })); + } + getViewWidth() { + return this.y.width.get(); + } + getContentHeight() { + return this.L.modified.getContentHeight(); + } + X(e, t, s, n) { + return e.createInstance(gh, t, s, n); + } + Y() { + if (this.custom) { + this.j.modified.style.left = "0px"; + const e = this.P.querySelectorAll(".line-delete"); + for (const t of e) { + const s = t; + s.style.left = "-2.5px"; + s.style.lineHeight = "16px"; + } + this.getOriginalEditor().updateOptions({ + scrollbar: { + vertical: "hidden", + verticalScrollbarSize: 0, + horizontal: "hidden", + handleMouseWheel: false, + alwaysConsumeMouseWheel: false, + horizontalScrollbarSize: 0 + } + }); + } + } + $() { + const e = nd.getDiffEditorContributions(); + for (const t of e) { + try { + this.D(this.u.createInstance(t.ctor, this)); + } catch (s) { + xs(s); + } + } + } + get g() { + return this.L.modified; + } + getEditorType() { + return PM.IDiffEditor; + } + onVisible() { + this.L.original.onVisible(); + this.L.modified.onVisible(); + } + onHide() { + this.L.original.onHide(); + this.L.modified.onHide(); + } + layout(e) { + this.Y(); + this.y.observe(e); + } + hasTextFocus() { + return this.L.original.hasTextFocus() || this.L.modified.hasTextFocus(); + } + saveViewState() { + const e = this.L.original.saveViewState(); + const t = this.L.modified.saveViewState(); + return { + original: e, + modified: t, + modelState: this.q.get()?.serializeState() + }; + } + restoreViewState(e) { + if (e && e.original && e.modified) { + const t = e; + this.L.original.restoreViewState(t.original); + this.L.modified.restoreViewState(t.modified); + if (t.modelState) { + this.q.get()?.restoreSerializedState(t.modelState); + } + } + } + handleInitialized() { + this.L.original.handleInitialized(); + this.L.modified.handleInitialized(); + } + createViewModel(e) { + return this.u.createInstance(wpt, e, this.J); + } + getModel() { + return this.q.get()?.model ?? null; + } + setModel(e) { + const t = e ? "model" in e ? Ene.create(e).createNewRef(this) : Ene.create(this.createViewModel(e), this) : null; + this.setDiffModel(t); + } + setDiffModel(e, t) { + const s = this.q.get(); + if (!e && s) { + this.I.get().close(); + } + if (this.q.get() !== e?.object) { + Lte(t, n => { + const r = e?.object; + Ro.batchEventsGlobally(n, () => { + this.L.original.setModel(r ? r.model.original : null); + this.L.modified.setModel(r ? r.model.modified : null); + }); + const o = this.n.get()?.createNewRef(this); + this.n.set(e?.createNewRef(this), n); + setTimeout(() => { + o?.dispose(); + }, 0); + }); + } + } + updateOptions(e) { + this.J.updateOptions(e); + } + getDomNode() { + return this.j.root; + } + getContainerDomNode() { + return this.P; + } + getOriginalEditor() { + return this.L.original; + } + getModifiedEditor() { + return this.L.modified; + } + setBoundarySashes(e) { + this.F.set(e, undefined); + } + get ignoreTrimWhitespace() { + return this.J.ignoreTrimWhitespace.get(); + } + get maxComputationTime() { + return this.J.maxComputationTimeMs.get(); + } + get renderSideBySide() { + return this.J.renderSideBySide.get(); + } + getLineChanges() { + const e = this.q.get()?.diff.get(); + if (e) { + return h4s(e); + } else { + return null; + } + } + getDiffComputationResult() { + const e = this.q.get()?.diff.get(); + if (e) { + return { + changes: this.getLineChanges(), + changes2: e.mappings.map(t => t.lineRangeMapping), + identical: e.identical, + quitEarly: e.quitEarly + }; + } else { + return null; + } + } + revert(e) { + const t = this.q.get(); + if (!!t && !!t.isDiffUpToDate.get()) { + this.L.modified.executeEdits("diffEditor", [{ + range: e.modified.toExclusiveRange(), + text: t.model.original.getValueInRange(e.original.toExclusiveRange()) + }]); + } + } + revertRangeMappings(e) { + const t = this.q.get(); + if (!t || !t.isDiffUpToDate.get()) { + return; + } + const s = e.map(n => ({ + range: n.modifiedRange, + text: t.model.original.getValueInRange(n.originalRange) + })); + this.L.modified.executeEdits("diffEditor", s); + } + cb(e) { + this.L.modified.setPosition(new je(e.lineRangeMapping.modified.startLineNumber, 1)); + this.L.modified.revealRangeInCenter(e.lineRangeMapping.modified.toExclusiveRange()); + } + goToDiff(e) { + const t = this.q.get()?.diff.get()?.mappings; + if (!t || t.length === 0) { + return; + } + const s = this.L.modified.getPosition().lineNumber; + let n; + if (e === "next") { + n = t.find(r => r.lineRangeMapping.modified.startLineNumber > s) ?? t[0]; + } else { + n = oM(t, r => r.lineRangeMapping.modified.startLineNumber < s) ?? t[t.length - 1]; + } + this.cb(n); + if (n.lineRangeMapping.modified.isEmpty) { + this.U.playSignal(el.diffLineDeleted, { + source: "diffEditor.goToDiff" + }); + } else if (n.lineRangeMapping.original.isEmpty) { + this.U.playSignal(el.diffLineInserted, { + source: "diffEditor.goToDiff" + }); + } else if (n) { + this.U.playSignal(el.diffLineModified, { + source: "diffEditor.goToDiff" + }); + } + } + revealFirstDiff() { + const e = this.q.get(); + if (e) { + this.waitForDiff().then(() => { + const t = e.diff.get()?.mappings; + if (!!t && t.length !== 0) { + this.cb(t[0]); + } + }); + } + } + accessibleDiffViewerNext() { + this.I.get().next(); + } + accessibleDiffViewerPrev() { + this.I.get().prev(); + } + async waitForDiff() { + const e = this.q.get(); + if (e) { + await e.waitForDiff(); + } + } + mapToOtherSide() { + const e = this.L.modified.hasWidgetFocus(); + const t = e ? this.L.modified : this.L.original; + const s = e ? this.L.original : this.L.modified; + let n; + const r = t.getSelection(); + if (r) { + const o = this.q.get()?.diff.get()?.mappings.map(a => e ? a.lineRangeMapping.flip() : a.lineRangeMapping); + if (o) { + const a = CBs(r.getStartPosition(), o); + const l = CBs(r.getEndPosition(), o); + n = Z.plusRange(a, l); + } + } + return { + destination: s, + destinationSelection: n + }; + } + switchSide() { + const { + destination: e, + destinationSelection: t + } = this.mapToOtherSide(); + e.focus(); + if (t) { + e.setSelection(t); + } + } + exitCompareMove() { + const e = this.q.get(); + if (e) { + e.movedTextToCompare.set(undefined, undefined); + } + } + collapseAllUnchangedRegions() { + const e = this.q.get()?.unchangedRegions.get(); + if (e) { + Io(t => { + for (const s of e) { + s.collapseAll(t); + } + }); + } + } + showAllUnchangedRegions() { + const e = this.q.get()?.unchangedRegions.get(); + if (e) { + Io(t => { + for (const s of e) { + s.showAll(t); + } + }); + } + } + db(e, t) { + if (e?.reason === 3) { + const s = this.q.get()?.diff.get()?.mappings.find(n => t ? n.lineRangeMapping.modified.contains(e.position.lineNumber) : n.lineRangeMapping.original.contains(e.position.lineNumber)); + if (s?.lineRangeMapping.modified.isEmpty) { + this.U.playSignal(el.diffLineDeleted, { + source: "diffEditor.cursorPositionChanged" + }); + } else if (s?.lineRangeMapping.original.isEmpty) { + this.U.playSignal(el.diffLineInserted, { + source: "diffEditor.cursorPositionChanged" + }); + } else if (s) { + this.U.playSignal(el.diffLineModified, { + source: "diffEditor.cursorPositionChanged" + }); + } + } + } + dispose() { + super.dispose(); + this.S.removeDiffEditor(this); + } +}; +Dg = __decorate([__param(3, Ne), __param(4, re), __param(5, ps), __param(6, Pd), __param(7, Jp)], Dg); +function h4s(i) { + return i.mappings.map(e => { + const t = e.lineRangeMapping; + let s; + let n; + let r; + let o; + let a = t.innerChanges; + if (t.original.isEmpty) { + s = t.original.startLineNumber - 1; + n = 0; + a = undefined; + } else { + s = t.original.startLineNumber; + n = t.original.endLineNumberExclusive - 1; + } + if (t.modified.isEmpty) { + r = t.modified.startLineNumber - 1; + o = 0; + a = undefined; + } else { + r = t.modified.startLineNumber; + o = t.modified.endLineNumberExclusive - 1; + } + return { + originalStartLineNumber: s, + originalEndLineNumber: n, + modifiedStartLineNumber: r, + modifiedEndLineNumber: o, + charChanges: a?.map(l => ({ + originalStartLineNumber: l.originalRange.startLineNumber, + originalStartColumn: l.originalRange.startColumn, + originalEndLineNumber: l.originalRange.endLineNumber, + originalEndColumn: l.originalRange.endColumn, + modifiedStartLineNumber: l.modifiedRange.startLineNumber, + modifiedStartColumn: l.modifiedRange.startColumn, + modifiedEndLineNumber: l.modifiedRange.endLineNumber, + modifiedEndColumn: l.modifiedRange.endColumn + })) + }; + }); +} +Sr(); +X(); +Je(); +Me(); +Ee(); +var Qdr = class extends se { + constructor() { + super({ + id: "diffEditor.toggleCollapseUnchangedRegions", + title: W(196, "Toggle Collapse Unchanged Regions"), + icon: A.map, + toggled: T.has("config.diffEditor.hideUnchangedRegions.enabled"), + precondition: T.has("isInDiffEditor"), + menu: { + when: T.has("isInDiffEditor"), + id: _.EditorTitle, + order: 22, + group: "navigation" + } + }); + } + run(i, ...e) { + const t = i.get(ve); + const s = !t.getValue("diffEditor.hideUnchangedRegions.enabled"); + t.updateValue("diffEditor.hideUnchangedRegions.enabled", s); + } +}; +var f4s = class extends se { + constructor() { + super({ + id: "diffEditor.toggleShowMovedCodeBlocks", + title: W(197, "Toggle Show Moved Code Blocks"), + precondition: T.has("isInDiffEditor") + }); + } + run(i, ...e) { + const t = i.get(ve); + const s = !t.getValue("diffEditor.experimental.showMoves"); + t.updateValue("diffEditor.experimental.showMoves", s); + } +}; +var g4s = class extends se { + constructor() { + super({ + id: "diffEditor.toggleUseInlineViewWhenSpaceIsLimited", + title: W(198, "Toggle Use Inline View When Space Is Limited"), + precondition: T.has("isInDiffEditor") + }); + } + run(i, ...e) { + const t = i.get(ve); + const s = !t.getValue("diffEditor.useInlineViewWhenSpaceIsLimited"); + t.updateValue("diffEditor.useInlineViewWhenSpaceIsLimited", s); + } +}; +var Qwe = W(199, "Diff Editor"); +var Zdr = class extends Uh { + constructor() { + super({ + id: "diffEditor.switchSide", + title: W(200, "Switch Side"), + icon: A.arrowSwap, + precondition: T.has("isInDiffEditor"), + f1: true, + category: Qwe + }); + } + runEditorCommand(i, e, t) { + const s = Lne(i); + if (s instanceof Dg) { + if (t && t.dryRun) { + return { + destinationSelection: s.mapToOtherSide().destinationSelection + }; + } + s.switchSide(); + } + } +}; +var ehr = class extends Uh { + constructor() { + super({ + id: "diffEditor.exitCompareMove", + title: W(201, "Exit Compare Move"), + icon: A.close, + precondition: ke.comparingMovedCode, + f1: false, + category: Qwe, + keybinding: { + weight: 10000, + primary: 9 + } + }); + } + runEditorCommand(i, e, ...t) { + const s = Lne(i); + if (s instanceof Dg) { + s.exitCompareMove(); + } + } +}; +var thr = class extends Uh { + constructor() { + super({ + id: "diffEditor.collapseAllUnchangedRegions", + title: W(202, "Collapse All Unchanged Regions"), + icon: A.fold, + precondition: T.has("isInDiffEditor"), + f1: true, + category: Qwe + }); + } + runEditorCommand(i, e, ...t) { + const s = Lne(i); + if (s instanceof Dg) { + s.collapseAllUnchangedRegions(); + } + } +}; +var ihr = class extends Uh { + constructor() { + super({ + id: "diffEditor.showAllUnchangedRegions", + title: W(203, "Show All Unchanged Regions"), + icon: A.unfold, + precondition: T.has("isInDiffEditor"), + f1: true, + category: Qwe + }); + } + runEditorCommand(i, e, ...t) { + const s = Lne(i); + if (s instanceof Dg) { + s.showAllUnchangedRegions(); + } + } +}; +var YXt = class extends se { + constructor() { + super({ + id: "diffEditor.revert", + title: W(204, "Revert"), + f1: false, + category: Qwe + }); + } + run(i, e) { + const t = shr(i, e.originalUri, e.modifiedUri); + if (t instanceof Dg) { + t.revertRangeMappings(e.mapping.innerChanges ?? []); + } + } +}; +var p4s = W(205, "Accessible Diff Viewer"); +var Zwe = class t_n extends se { + static { + this.id = "editor.action.accessibleDiffViewer.next"; + } + constructor() { + super({ + id: t_n.id, + title: W(206, "Go to Next Difference"), + category: p4s, + precondition: T.has("isInDiffEditor"), + keybinding: { + primary: 65, + weight: 100 + }, + f1: true + }); + } + run(e) { + Lne(e)?.accessibleDiffViewerNext(); + } +}; +var XXt = class i_n extends se { + static { + this.id = "editor.action.accessibleDiffViewer.prev"; + } + constructor() { + super({ + id: i_n.id, + title: W(207, "Go to Previous Difference"), + category: p4s, + precondition: T.has("isInDiffEditor"), + keybinding: { + primary: 1089, + weight: 100 + }, + f1: true + }); + } + run(e) { + Lne(e)?.accessibleDiffViewerPrev(); + } +}; +function shr(i, e, t) { + return i.get(ps).listDiffEditors().find(r => { + const o = r.getModifiedEditor(); + const a = r.getOriginalEditor(); + return o && o.getModel()?.uri.toString() === t.toString() && a && a.getModel()?.uri.toString() === e.toString(); + }) || null; +} +function Lne(i) { + const t = i.get(ps).listDiffEditors(); + const s = Tu(); + if (s) { + for (const n of t) { + const r = n.getContainerDomNode(); + if (nhr(r, s)) { + return n; + } + } + } + return null; +} +function nhr(i, e) { + let t = e; + while (t) { + if (t === i) { + return true; + } + t = t.parentElement; + } + return false; +} +Sr(); +X(); +Je(); +Wt(); +Ee(); +J(Qdr); +J(f4s); +J(g4s); +Be.appendMenuItem(_.EditorTitle, { + command: { + id: new g4s().desc.id, + title: f(230, null), + toggled: T.has("config.diffEditor.useInlineViewWhenSpaceIsLimited"), + precondition: T.has("isInDiffEditor") + }, + order: 11, + group: "1_diff", + when: T.and(ke.diffEditorRenderSideBySideInlineBreakpointReached, T.has("isInDiffEditor")) +}); +Be.appendMenuItem(_.EditorTitle, { + command: { + id: new f4s().desc.id, + title: f(231, null), + icon: A.move, + toggled: oj.create("config.diffEditor.experimental.showMoves", true), + precondition: T.has("isInDiffEditor") + }, + order: 10, + group: "1_diff", + when: T.has("isInDiffEditor") +}); +J(YXt); +for (const i of [{ + icon: A.arrowRight, + key: ke.diffEditorInlineMode.toNegated() +}, { + icon: A.discard, + key: ke.diffEditorInlineMode +}]) { + Be.appendMenuItem(_.DiffEditorHunkToolbar, { + command: { + id: new YXt().desc.id, + title: f(232, null), + icon: i.icon + }, + when: T.and(ke.diffEditorModifiedWritable, i.key), + order: 5, + group: "primary" + }); + Be.appendMenuItem(_.DiffEditorSelectionToolbar, { + command: { + id: new YXt().desc.id, + title: f(233, null), + icon: i.icon + }, + when: T.and(ke.diffEditorModifiedWritable, i.key), + order: 5, + group: "primary" + }); +} +J(Zdr); +J(ehr); +J(thr); +J(ihr); +Be.appendMenuItem(_.EditorTitle, { + command: { + id: Zwe.id, + title: f(234, null), + precondition: T.has("isInDiffEditor") + }, + order: 10, + group: "2_diff", + when: T.and(ke.accessibleDiffViewerVisible.negate(), T.has("isInDiffEditor")) +}); +ei.registerCommandAlias("editor.action.diffReview.next", Zwe.id); +J(Zwe); +ei.registerCommandAlias("editor.action.diffReview.prev", XXt.id); +J(XXt); +wc(); +No(); +Yc(); +en(); +ua(); +Sr(); +X(); +Ee(); +var QXt; +var Npt = new fe("selectionAnchorSet", false); +var UU = class { + static { + QXt = this; + } + static { + this.ID = "editor.contrib.selectionAnchorController"; + } + static get(e) { + return e.getContribution(QXt.ID); + } + constructor(e, t) { + this.d = e; + this.b = Npt.bindTo(t); + this.c = e.onDidChangeModel(() => this.b.reset()); + } + setSelectionAnchor() { + if (this.d.hasModel()) { + const e = this.d.getPosition(); + this.d.changeDecorations(t => { + if (this.a) { + t.removeDecoration(this.a); + } + this.a = t.addDecoration(Vs.fromPositions(e, e), { + description: "selection-anchor", + stickiness: 1, + hoverMessage: new hs().appendText(f(875, null)), + className: "selection-anchor" + }); + }); + this.b.set(!!this.a); + Fc(f(876, null, e.lineNumber, e.column)); + } + } + goToSelectionAnchor() { + if (this.d.hasModel() && this.a) { + const e = this.d.getModel().getDecorationRange(this.a); + if (e) { + this.d.setPosition(e.getStartPosition()); + } + } + } + selectFromAnchorToCursor() { + if (this.d.hasModel() && this.a) { + const e = this.d.getModel().getDecorationRange(this.a); + if (e) { + const t = this.d.getPosition(); + this.d.setSelection(Vs.fromPositions(e.getStartPosition(), t)); + this.cancelSelectionAnchor(); + } + } + } + cancelSelectionAnchor() { + if (this.a) { + const e = this.a; + this.d.changeDecorations(t => { + t.removeDecoration(e); + this.a = undefined; + }); + this.b.set(false); + } + } + dispose() { + this.cancelSelectionAnchor(); + this.c.dispose(); + } +}; +UU = QXt = __decorate([__param(1, Ne)], UU); +var rhr = class extends Es { + constructor() { + super({ + id: "editor.action.setSelectionAnchor", + label: W(877, "Set Selection Anchor"), + precondition: undefined, + kbOpts: { + kbExpr: ke.editorTextFocus, + primary: Ai(_r, 2080), + mac: { + primary: Ai(Xr, 2080) + }, + weight: 100 + } + }); + } + async run(i, e) { + UU.get(e)?.setSelectionAnchor(); + } +}; +var ohr = class extends Es { + constructor() { + super({ + id: "editor.action.goToSelectionAnchor", + label: W(878, "Go to Selection Anchor"), + precondition: Npt + }); + } + async run(i, e) { + UU.get(e)?.goToSelectionAnchor(); + } +}; +var ahr = class extends Es { + constructor() { + super({ + id: "editor.action.selectFromAnchorToCursor", + label: W(879, "Select from Anchor to Cursor"), + precondition: Npt, + kbOpts: { + kbExpr: ke.editorTextFocus, + primary: Ai(_r, 2089), + mac: { + primary: Ai(Xr, 2089) + }, + weight: 100 + } + }); + } + async run(i, e) { + UU.get(e)?.selectFromAnchorToCursor(); + } +}; +var lhr = class extends Es { + constructor() { + super({ + id: "editor.action.cancelSelectionAnchor", + label: W(880, "Cancel Selection Anchor"), + precondition: Npt, + kbOpts: { + kbExpr: ke.editorTextFocus, + primary: 9, + weight: 100 + } + }); + } + async run(i, e) { + UU.get(e)?.cancelSelectionAnchor(); + } +}; +bo(UU.ID, UU, 4); +Oi(rhr); +Oi(ohr); +Oi(ahr); +Oi(lhr); +nt(); +q(); +en(); +Rs(); +yt(); +ua(); +Sr(); +gc(); +Ya(); +X(); +Je(); +Qs(); +gi(); +var chr = he("editorOverviewRuler.bracketMatchForeground", "#A0A0A0", f(881, null)); +var uhr = class extends Es { + constructor() { + super({ + id: "editor.action.jumpToBracket", + label: W(883, "Go to Bracket"), + precondition: undefined, + kbOpts: { + kbExpr: ke.editorTextFocus, + primary: 3165, + weight: 100 + } + }); + } + run(i, e) { + aG.get(e)?.jumpToBracket(); + } +}; +var dhr = class extends Es { + constructor() { + super({ + id: "editor.action.selectToBracket", + label: W(884, "Select to Bracket"), + precondition: undefined, + metadata: { + description: W(885, "Select the text inside and including the brackets or curly braces"), + args: [{ + name: "args", + schema: { + type: "object", + properties: { + selectBrackets: { + type: "boolean", + default: true + } + } + } + }] + } + }); + } + run(i, e, t) { + let s = true; + if (t && t.selectBrackets === false) { + s = false; + } + aG.get(e)?.selectToBracket(s); + } +}; +var hhr = class extends Es { + constructor() { + super({ + id: "editor.action.removeBrackets", + label: W(886, "Remove Brackets"), + precondition: undefined, + kbOpts: { + kbExpr: ke.editorTextFocus, + primary: 2561, + weight: 100 + } + }); + } + run(i, e) { + aG.get(e)?.removeBrackets(this.id); + } +}; +var fhr = class { + constructor(i, e, t) { + this.position = i; + this.brackets = e; + this.options = t; + } +}; +var aG = class RFt extends H { + static { + this.ID = "editor.contrib.bracketMatchingController"; + } + static get(e) { + return e.getContribution(RFt.ID); + } + constructor(e) { + super(); + this.a = e; + this.b = []; + this.c = 0; + this.f = this.a.createDecorationsCollection(); + this.g = this.D(new Vn(() => this.n(), 50)); + this.h = this.a.getOption(73); + this.g.schedule(); + this.D(e.onDidChangeCursorPosition(t => { + if (this.h !== "never") { + this.g.schedule(); + } + })); + this.D(e.onDidChangeModelContent(t => { + this.g.schedule(); + })); + this.D(e.onDidChangeModel(t => { + this.b = []; + this.g.schedule(); + })); + this.D(e.onDidChangeModelLanguageConfiguration(t => { + this.b = []; + this.g.schedule(); + })); + this.D(e.onDidChangeConfiguration(t => { + if (t.hasChanged(73)) { + this.h = this.a.getOption(73); + this.f.clear(); + this.b = []; + this.c = 0; + this.g.schedule(); + } + })); + this.D(e.onDidBlurEditorWidget(() => { + this.g.schedule(); + })); + this.D(e.onDidFocusEditorWidget(() => { + this.g.schedule(); + })); + } + jumpToBracket() { + if (!this.a.hasModel()) { + return; + } + const e = this.a.getModel(); + const t = this.a.getSelections().map(s => { + const n = s.getStartPosition(); + const r = e.bracketPairs.matchBracket(n); + let o = null; + if (r) { + if (r[0].containsPosition(n) && !r[1].containsPosition(n)) { + o = r[1].getStartPosition(); + } else if (r[1].containsPosition(n)) { + o = r[0].getStartPosition(); + } + } else { + const a = e.bracketPairs.findEnclosingBrackets(n); + if (a) { + o = a[1].getStartPosition(); + } else { + const l = e.bracketPairs.findNextBracket(n); + if (l && l.range) { + o = l.range.getStartPosition(); + } + } + } + if (o) { + return new Vs(o.lineNumber, o.column, o.lineNumber, o.column); + } else { + return new Vs(n.lineNumber, n.column, n.lineNumber, n.column); + } + }); + this.a.setSelections(t); + this.a.revealRange(t[0]); + } + selectToBracket(e) { + if (!this.a.hasModel()) { + return; + } + const t = this.a.getModel(); + const s = []; + this.a.getSelections().forEach(n => { + const r = n.getStartPosition(); + let o = t.bracketPairs.matchBracket(r); + if (!o && (o = t.bracketPairs.findEnclosingBrackets(r), !o)) { + const c = t.bracketPairs.findNextBracket(r); + if (c && c.range) { + o = t.bracketPairs.matchBracket(c.range.getStartPosition()); + } + } + let a = null; + let l = null; + if (o) { + o.sort(Z.compareRangesUsingStarts); + const [c, u] = o; + a = e ? c.getStartPosition() : c.getEndPosition(); + l = e ? u.getEndPosition() : u.getStartPosition(); + if (u.containsPosition(r)) { + const d = a; + a = l; + l = d; + } + } + if (a && l) { + s.push(new Vs(a.lineNumber, a.column, l.lineNumber, l.column)); + } + }); + if (s.length > 0) { + this.a.setSelections(s); + this.a.revealRange(s[0]); + } + } + removeBrackets(e) { + if (!this.a.hasModel()) { + return; + } + const t = this.a.getModel(); + this.a.getSelections().forEach(s => { + const n = s.getPosition(); + let r = t.bracketPairs.matchBracket(n); + r ||= t.bracketPairs.findEnclosingBrackets(n); + if (r) { + this.a.pushUndoStop(); + this.a.executeEdits(e, [{ + range: r[0], + text: "" + }, { + range: r[1], + text: "" + }]); + this.a.pushUndoStop(); + } + }); + } + static { + this.j = Cr.register({ + description: "bracket-match-overview", + stickiness: 1, + className: "bracket-match", + overviewRuler: { + color: lu(chr), + position: Zd.Center + } + }); + } + static { + this.m = Cr.register({ + description: "bracket-match-no-overview", + stickiness: 1, + className: "bracket-match" + }); + } + n() { + if (this.h === "never") { + return; + } + this.q(); + const e = []; + let t = 0; + for (const s of this.b) { + const n = s.brackets; + if (n) { + e[t++] = { + range: n[0], + options: s.options + }; + e[t++] = { + range: n[1], + options: s.options + }; + } + } + this.f.set(e); + } + q() { + if (!this.a.hasModel() || !this.a.hasWidgetFocus()) { + this.b = []; + this.c = 0; + return; + } + const e = this.a.getSelections(); + if (e.length > 100) { + this.b = []; + this.c = 0; + return; + } + const t = this.a.getModel(); + const s = t.getVersionId(); + let n = []; + if (this.c === s) { + n = this.b; + } + const r = []; + let o = 0; + for (let d = 0, h = e.length; d < h; d++) { + const g = e[d]; + if (g.isEmpty()) { + r[o++] = g.getStartPosition(); + } + } + if (r.length > 1) { + r.sort(je.compare); + } + const a = []; + let l = 0; + let c = 0; + const u = n.length; + for (let d = 0, h = r.length; d < h; d++) { + const g = r[d]; + while (c < u && n[c].position.isBefore(g)) { + c++; + } + if (c < u && n[c].position.equals(g)) { + a[l++] = n[c]; + } else { + let p = t.bracketPairs.matchBracket(g, 20); + let b = RFt.j; + if (!p && this.h === "always") { + p = t.bracketPairs.findEnclosingBrackets(g, 20); + b = RFt.m; + } + a[l++] = new fhr(g, p, b); + } + } + this.b = a; + this.c = s; + } +}; +bo(aG.ID, aG, 1); +Oi(dhr); +Oi(uhr); +Oi(hhr); +Be.appendMenuItem(_.MenubarGoMenu, { + group: "5_infile_nav", + command: { + id: "editor.action.jumpToBracket", + title: f(882, null) + }, + order: 2 +}); +en(); +Sr(); +yt(); +ua(); +var ghr = class { + constructor(i, e) { + this.a = i; + this.b = e; + } + getEditOperations(i, e) { + if (this.a.startLineNumber !== this.a.endLineNumber || this.a.isEmpty()) { + return; + } + const t = this.a.startLineNumber; + const s = this.a.startColumn; + const n = this.a.endColumn; + if ((!this.b || s !== 1) && (!!this.b || n !== i.getLineMaxColumn(t))) { + if (this.b) { + const r = new Z(t, s - 1, t, s); + const o = i.getValueInRange(r); + e.addEditOperation(r, null); + e.addEditOperation(new Z(t, n, t, n), o); + } else { + const r = new Z(t, n, t, n + 1); + const o = i.getValueInRange(r); + e.addEditOperation(r, null); + e.addEditOperation(new Z(t, s, t, s), o); + } + } + } + computeCursorState(i, e) { + if (this.b) { + return new Vs(this.a.startLineNumber, this.a.startColumn - 1, this.a.endLineNumber, this.a.endColumn - 1); + } else { + return new Vs(this.a.startLineNumber, this.a.startColumn + 1, this.a.endLineNumber, this.a.endColumn + 1); + } + } +}; +X(); +var m4s = class extends Es { + constructor(i, e) { + super(e); + this.d = i; + } + run(i, e) { + if (!e.hasModel()) { + return; + } + const t = []; + const s = e.getSelections(); + for (const n of s) { + t.push(new ghr(n, this.d)); + } + e.pushUndoStop(); + e.executeCommands(this.id, t); + e.pushUndoStop(); + } +}; +var phr = class extends m4s { + constructor() { + super(true, { + id: "editor.action.moveCarretLeftAction", + label: W(887, "Move Selected Text Left"), + precondition: ke.writable + }); + } +}; +var mhr = class extends m4s { + constructor() { + super(false, { + id: "editor.action.moveCarretRightAction", + label: W(888, "Move Selected Text Right"), + precondition: ke.writable + }); + } +}; +Oi(phr); +Oi(mhr); +en(); +Tee(); +t8t(); +yt(); +Sr(); +X(); +var bhr = class extends Es { + constructor() { + super({ + id: "editor.action.transposeLetters", + label: W(889, "Transpose Letters"), + precondition: ke.writable, + kbOpts: { + kbExpr: ke.textInputFocus, + primary: 0, + mac: { + primary: 306 + }, + weight: 100 + } + }); + } + run(i, e) { + if (!e.hasModel()) { + return; + } + const t = e.getModel(); + const s = []; + const n = e.getSelections(); + for (const r of n) { + if (!r.isEmpty()) { + continue; + } + const o = r.startLineNumber; + const a = r.startColumn; + const l = t.getLineMaxColumn(o); + if (o === 1 && (a === 1 || a === 2 && l === 2)) { + continue; + } + const c = a === l ? r.getPosition() : mp.rightPosition(t, r.getPosition().lineNumber, r.getPosition().column); + const u = mp.leftPosition(t, c); + const d = mp.leftPosition(t, u); + const h = t.getValueInRange(Z.fromPositions(d, u)); + const g = t.getValueInRange(Z.fromPositions(u, c)); + const p = Z.fromPositions(d, c); + s.push(new $y(p, g + h)); + } + if (s.length > 0) { + e.pushUndoStop(); + e.executeCommands(this.id, s); + e.pushUndoStop(); + } + } +}; +Oi(bhr); +hc(); +xe(); +rt(); +X(); +Je(); +Xa(); +Ee(); +dpe(); +Wss(); +en(); +Xn(); +Sr(); +JF(); +var lG = "9_cutcopypaste"; +var vhr = sc || document.queryCommandSupported("cut"); +var b4s = sc || document.queryCommandSupported("copy"); +var yhr = typeof navigator.clipboard === "undefined" || Bv ? document.queryCommandSupported("paste") : true; +function ZXt(i) { + i.register(); + return i; +} +var WU = vhr ? ZXt(new KB({ + id: "editor.action.clipboardCutAction", + precondition: undefined, + kbOpts: sc ? { + primary: 2102, + win: { + primary: 2102, + secondary: [1044] + }, + weight: 100 + } : undefined, + menuOpts: [{ + menuId: _.MenubarEditMenu, + group: "2_ccp", + title: f(890, null), + order: 1 + }, { + menuId: _.EditorContext, + group: lG, + title: f(891, null), + when: ke.writable, + order: 1 + }, { + menuId: _.CommandPalette, + group: "", + title: f(892, null), + order: 1 + }, { + menuId: _.SimpleEditorContext, + group: lG, + title: f(893, null), + when: ke.writable, + order: 1 + }] +})) : undefined; +var _5 = b4s ? ZXt(new KB({ + id: "editor.action.clipboardCopyAction", + precondition: undefined, + kbOpts: sc ? { + primary: 2081, + win: { + primary: 2081, + secondary: [2067] + }, + weight: 100 + } : undefined, + menuOpts: [{ + menuId: _.MenubarEditMenu, + group: "2_ccp", + title: f(894, null), + order: 2 + }, { + menuId: _.EditorContext, + group: lG, + title: f(895, null), + order: 2 + }, { + menuId: _.CommandPalette, + group: "", + title: f(896, null), + order: 1 + }, { + menuId: _.SimpleEditorContext, + group: lG, + title: f(897, null), + order: 2 + }] +})) : undefined; +Be.appendMenuItem(_.MenubarEditMenu, { + submenu: _.MenubarCopy, + title: W(902, "Copy As"), + group: "2_ccp", + order: 3 +}); +Be.appendMenuItem(_.EditorContext, { + submenu: _.EditorContextCopy, + title: W(903, "Copy As"), + group: lG, + order: 3 +}); +Be.appendMenuItem(_.EditorContext, { + submenu: _.EditorContextShare, + title: W(904, "Share"), + group: "11_share", + order: -1, + when: T.and(T.notEquals("resourceScheme", "output"), ke.editorTextFocus) +}); +Be.appendMenuItem(_.ExplorerContext, { + submenu: _.ExplorerContextShare, + title: W(905, "Share"), + group: "11_share", + order: -1 +}); +var bO = yhr ? ZXt(new KB({ + id: "editor.action.clipboardPasteAction", + precondition: undefined, + kbOpts: sc ? { + primary: 2100, + win: { + primary: 2100, + secondary: [1043] + }, + linux: { + primary: 2100, + secondary: [1043] + }, + weight: 100 + } : undefined, + menuOpts: [{ + menuId: _.MenubarEditMenu, + group: "2_ccp", + title: f(898, null), + order: 4 + }, { + menuId: _.EditorContext, + group: lG, + title: f(899, null), + when: ke.writable, + order: 4 + }, { + menuId: _.CommandPalette, + group: "", + title: f(900, null), + order: 1 + }, { + menuId: _.SimpleEditorContext, + group: lG, + title: f(901, null), + when: ke.writable, + order: 4 + }] +})) : undefined; +var whr = class extends Es { + constructor() { + super({ + id: "editor.action.clipboardCopyWithSyntaxHighlightingAction", + label: W(906, "Copy With Syntax Highlighting"), + precondition: undefined, + kbOpts: { + kbExpr: ke.textInputFocus, + primary: 0, + weight: 100 + } + }); + } + run(i, e) { + if (!!e.hasModel() && (!!e.getOption(38) || !e.getSelection().isEmpty())) { + yat.forceCopyWithSyntaxHighlighting = true; + e.focus(); + e.getContainerDomNode().ownerDocument.execCommand("copy"); + yat.forceCopyWithSyntaxHighlighting = false; + } + } +}; +function v4s(i, e) { + if (i) { + i.addImplementation(10000, "code-editor", (t, s) => { + const n = t.get(ps).getFocusedCodeEditor(); + if (n && n.hasTextFocus()) { + const r = n.getOption(38); + const o = n.getSelection(); + if (!o || !o.isEmpty() || !!r) { + if (n.getOption(37) && e === "cut") { + n.getContainerDomNode().ownerDocument.execCommand("copy"); + n.trigger(undefined, "cut", undefined); + } else { + n.getContainerDomNode().ownerDocument.execCommand(e); + } + } + return true; + } + return false; + }); + i.addImplementation(0, "generic-dom", (t, s) => { + hf().execCommand(e); + return true; + }); + } +} +v4s(WU, "cut"); +v4s(_5, "copy"); +if (bO) { + bO.addImplementation(10000, "code-editor", (i, e) => { + const t = i.get(ps); + const s = i.get(Zr); + const n = t.getFocusedCodeEditor(); + if (n && n.hasModel() && n.hasTextFocus()) { + let r; + if (n.getOption(37)) { + const a = u7t.get(n.getId()); + if (a) { + const l = a.textArea; + a.onWillPaste(); + l.focus(); + r = n.getContainerDomNode().ownerDocument.execCommand("paste"); + l.domNode.textContent = ""; + a.domNode.focus(); + } else { + r = false; + } + } else { + r = n.getContainerDomNode().ownerDocument.execCommand("paste"); + } + if (r) { + return rC.get(n)?.finishedPaste() ?? Promise.resolve(); + } else if (tn) { + return (async () => { + const a = await s.readText(); + if (a !== "") { + const l = ute.INSTANCE.get(a); + let c = false; + let u = null; + let d = null; + if (l) { + c = n.getOption(38) && !!l.isFromEmptySelection; + u = typeof l.multicursorText !== "undefined" ? l.multicursorText : null; + d = l.mode; + } + n.trigger("keyboard", "paste", { + text: a, + pasteOnNewLine: c, + multicursorText: u, + mode: d + }); + } + })(); + } else { + return true; + } + } + return false; + }); + bO.addImplementation(0, "generic-dom", (i, e) => { + hf().execCommand("paste"); + return true; + }); +} +if (b4s) { + Oi(whr); +} +en(); +Qd(); +_ot(); +X(); +Qr(); +Ht(); +var IA = Object.freeze({ + id: "editor", + order: 5, + type: "object", + title: f(258, null), + scope: 5 +}); +var eQt = { + ...IA, + properties: { + "editor.tabSize": { + type: "number", + default: Aw.tabSize, + minimum: 1, + markdownDescription: f(259, null, "`#editor.detectIndentation#`") + }, + "editor.indentSize": { + anyOf: [{ + type: "string", + enum: ["tabSize"] + }, { + type: "number", + minimum: 1 + }], + default: "tabSize", + markdownDescription: f(260, null) + }, + "editor.insertSpaces": { + type: "boolean", + default: Aw.insertSpaces, + markdownDescription: f(261, null, "`#editor.detectIndentation#`") + }, + "editor.detectIndentation": { + type: "boolean", + default: Aw.detectIndentation, + markdownDescription: f(262, null, "`#editor.tabSize#`", "`#editor.insertSpaces#`") + }, + "editor.trimAutoWhitespace": { + type: "boolean", + default: Aw.trimAutoWhitespace, + description: f(263, null) + }, + "editor.largeFileOptimizations": { + type: "boolean", + default: Aw.largeFileOptimizations, + description: f(264, null) + }, + "editor.wordBasedSuggestions": { + enum: ["off", "currentDocument", "matchingDocuments", "allDocuments"], + default: "matchingDocuments", + enumDescriptions: [f(265, null), f(266, null), f(267, null), f(268, null)], + description: f(269, null) + }, + "editor.semanticHighlighting.enabled": { + enum: [true, false, "configuredByTheme"], + enumDescriptions: [f(270, null), f(271, null), f(272, null)], + default: "configuredByTheme", + description: f(273, null) + }, + "editor.stablePeek": { + type: "boolean", + default: false, + markdownDescription: f(274, null) + }, + "editor.maxTokenizationLineLength": { + type: "integer", + default: 20000, + description: f(275, null) + }, + "editor.experimental.asyncTokenization": { + type: "boolean", + default: true, + description: f(276, null), + tags: ["experimental"] + }, + "editor.experimental.asyncTokenizationLogging": { + type: "boolean", + default: false, + description: f(277, null) + }, + "editor.experimental.asyncTokenizationVerification": { + type: "boolean", + default: false, + description: f(278, null), + tags: ["experimental"] + }, + "editor.experimental.treeSitterTelemetry": { + type: "boolean", + default: false, + markdownDescription: f(279, null), + tags: ["experimental", "onExP"] + }, + "editor.experimental.preferTreeSitter": { + type: "array", + items: { + type: "string", + enum: ["typescript"] + }, + default: [], + markdownDescription: f(280, null), + tags: ["experimental"] + }, + "editor.language.brackets": { + type: ["array", "null"], + default: null, + description: f(281, null), + items: { + type: "array", + items: [{ + type: "string", + description: f(282, null) + }, { + type: "string", + description: f(283, null) + }] + } + }, + "editor.language.colorizedBracketPairs": { + type: ["array", "null"], + default: null, + description: f(284, null), + items: { + type: "array", + items: [{ + type: "string", + description: f(285, null) + }, { + type: "string", + description: f(286, null) + }] + } + }, + "diffEditor.maxComputationTime": { + type: "number", + default: i0.maxComputationTime, + description: f(287, null) + }, + "diffEditor.maxFileSize": { + type: "number", + default: i0.maxFileSize, + description: f(288, null) + }, + "diffEditor.renderSideBySide": { + type: "boolean", + default: i0.renderSideBySide, + description: f(289, null) + }, + "diffEditor.renderSideBySideInlineBreakpoint": { + type: "number", + default: i0.renderSideBySideInlineBreakpoint, + description: f(290, null) + }, + "diffEditor.useInlineViewWhenSpaceIsLimited": { + type: "boolean", + default: i0.useInlineViewWhenSpaceIsLimited, + description: f(291, null) + }, + "diffEditor.renderMarginRevertIcon": { + type: "boolean", + default: i0.renderMarginRevertIcon, + description: f(292, null) + }, + "diffEditor.renderGutterMenu": { + type: "boolean", + default: i0.renderGutterMenu, + description: f(293, null) + }, + "diffEditor.ignoreTrimWhitespace": { + type: "boolean", + default: i0.ignoreTrimWhitespace, + description: f(294, null) + }, + "diffEditor.renderIndicators": { + type: "boolean", + default: i0.renderIndicators, + description: f(295, null) + }, + "diffEditor.codeLens": { + type: "boolean", + default: i0.diffCodeLens, + description: f(296, null) + }, + "diffEditor.wordWrap": { + type: "string", + enum: ["off", "on", "inherit"], + default: i0.diffWordWrap, + markdownEnumDescriptions: [f(297, null), f(298, null), f(299, null, "`#editor.wordWrap#`")] + }, + "diffEditor.diffAlgorithm": { + type: "string", + enum: ["legacy", "advanced"], + default: i0.diffAlgorithm, + markdownEnumDescriptions: [f(300, null), f(301, null)] + }, + "diffEditor.hideUnchangedRegions.enabled": { + type: "boolean", + default: i0.hideUnchangedRegions.enabled, + markdownDescription: f(302, null) + }, + "diffEditor.hideUnchangedRegions.revealLineCount": { + type: "integer", + default: i0.hideUnchangedRegions.revealLineCount, + markdownDescription: f(303, null), + minimum: 1 + }, + "diffEditor.hideUnchangedRegions.minimumLineCount": { + type: "integer", + default: i0.hideUnchangedRegions.minimumLineCount, + markdownDescription: f(304, null), + minimum: 1 + }, + "diffEditor.hideUnchangedRegions.contextLineCount": { + type: "integer", + default: i0.hideUnchangedRegions.contextLineCount, + markdownDescription: f(305, null), + minimum: 1 + }, + "diffEditor.experimental.showMoves": { + type: "boolean", + default: i0.experimental.showMoves, + markdownDescription: f(306, null) + }, + "diffEditor.experimental.showEmptyDecorations": { + type: "boolean", + default: i0.experimental.showEmptyDecorations, + description: f(307, null) + }, + "diffEditor.experimental.useTrueInlineView": { + type: "boolean", + default: i0.experimental.useTrueInlineView, + description: f(308, null) + } + } +}; +function Chr(i) { + return typeof i.type !== "undefined" || typeof i.anyOf !== "undefined"; +} +for (const i of k9) { + const e = i.schema; + if (typeof e !== "undefined") { + if (Chr(e)) { + eQt.properties[`editor.${i.name}`] = e; + } else { + for (const t in e) { + if (Object.hasOwnProperty.call(e, t)) { + eQt.properties[t] = e[t]; + } + } + } + } +} +var Shr = Pe.as(rr.Configuration); +Shr.registerConfiguration(eQt); +Mx(); +$i(); +en(); +Sr(); +Jt(); +ri(); +Ut(); +q(); +Le(); +yf(); +yt(); +ua(); +Tr(); +Rn(); +GM(); +X(); +Wt(); +Wi(); +so(); +ai(); +Ut(); +Mx(); +var Tl = new class { + constructor() { + this.QuickFix = new _c("quickfix"); + this.Refactor = new _c("refactor"); + this.RefactorExtract = this.Refactor.append("extract"); + this.RefactorInline = this.Refactor.append("inline"); + this.RefactorMove = this.Refactor.append("move"); + this.RefactorRewrite = this.Refactor.append("rewrite"); + this.Notebook = new _c("notebook"); + this.Source = new _c("source"); + this.SourceOrganizeImports = this.Source.append("organizeImports"); + this.SourceFixAll = this.Source.append("fixAll"); + this.SurroundWith = this.Refactor.append("surround"); + } +}(); +var y4s; +(function (i) { + i.IfSingle = "ifSingle"; + i.First = "first"; + i.Never = "never"; +})(y4s ||= {}); +var ly; +(function (i) { + i.Refactor = "refactor"; + i.RefactorPreview = "refactor preview"; + i.Lightbulb = "lightbulb"; + i.Default = "other (default)"; + i.SourceAction = "source action"; + i.QuickFix = "quick fix action"; + i.FixAll = "fix all"; + i.OrganizeImports = "organize imports"; + i.AutoFix = "auto fix"; + i.QuickFixHover = "quick fix hover window"; + i.OnSave = "save participants"; + i.ProblemsView = "problems view"; +})(ly ||= {}); +function xhr(i, e) { + return (!i.include || !!i.include.intersects(e)) && (!i.excludes || !i.excludes.some(t => w4s(e, t, i.include))) && (!!i.includeSourceActions || !Tl.Source.contains(e)); +} +function khr(i, e) { + const t = e.kind ? new _c(e.kind) : undefined; + return (!i.include || !!t && !!i.include.contains(t)) && (!i.excludes || !t || !i.excludes.some(s => w4s(t, s, i.include))) && (!!i.includeSourceActions || !t || !Tl.Source.contains(t)) && (!i.onlyIncludePreferredActions || !!e.isPreferred); +} +function w4s(i, e, t) { + return !!e.contains(i) && (!t || !e.contains(t)); +} +var Mpt = class ehe { + static fromUser(e, t) { + if (!e || typeof e != "object") { + return new ehe(t.kind, t.apply, false); + } else { + return new ehe(ehe.b(e, t.kind), ehe.a(e, t.apply), ehe.c(e)); + } + } + static a(e, t) { + switch (typeof e.apply == "string" ? e.apply.toLowerCase() : "") { + case "first": + return "first"; + case "never": + return "never"; + case "ifsingle": + return "ifSingle"; + default: + return t; + } + } + static b(e, t) { + if (typeof e.kind == "string") { + return new _c(e.kind); + } else { + return t; + } + } + static c(e) { + if (typeof e.preferred == "boolean") { + return e.preferred; + } else { + return false; + } + } + constructor(e, t, s) { + this.kind = e; + this.apply = t; + this.preferred = s; + } +}; +var Ehr = class { + constructor(i, e, t) { + this.action = i; + this.provider = e; + this.highlightRange = t; + } + async resolve(i) { + if (this.provider?.resolveCodeAction && !this.action.edit) { + let e; + try { + e = await this.provider.resolveCodeAction(this.action, i); + } catch (t) { + uh(t); + } + if (e) { + this.action.edit = e.edit; + } + } + return this; + } +}; +Mx(); +var tQt = "editor.action.codeAction"; +var iQt = "editor.action.quickFix"; +var C4s = "editor.action.autoFix"; +var sQt = "editor.action.refactor"; +var nQt = "editor.action.sourceAction"; +var rQt = "editor.action.organizeImports"; +var oQt = "editor.action.fixAll"; +var Ihr = class NFt extends H { + static c(e, t) { + if (e.isPreferred && !t.isPreferred) { + return -1; + } else if (!e.isPreferred && t.isPreferred) { + return 1; + } else { + return 0; + } + } + static f({ + action: e + }, { + action: t + }) { + if (e.isAI && !t.isAI) { + return 1; + } else if (!e.isAI && t.isAI) { + return -1; + } else if (Ac(e.diagnostics)) { + if (Ac(t.diagnostics)) { + return NFt.c(e, t); + } else { + return -1; + } + } else if (Ac(t.diagnostics)) { + return 1; + } else { + return NFt.c(e, t); + } + } + constructor(e, t, s) { + super(); + this.documentation = t; + this.D(s); + this.allActions = [...e].sort(NFt.f); + this.validActions = this.allActions.filter(({ + action: n + }) => !n.disabled); + } + get hasAutoFix() { + return this.validActions.some(({ + action: e + }) => !!e.kind && Tl.QuickFix.contains(new _c(e.kind)) && !!e.isPreferred); + } + get hasAIFix() { + return this.validActions.some(({ + action: e + }) => !!e.isAI); + } + get allAIFixes() { + return this.validActions.every(({ + action: e + }) => !!e.isAI); + } +}; +var S4s = { + actions: [], + documentation: undefined +}; +async function TR(i, e, t, s, n, r, o, a) { + const l = s.filter || {}; + const c = { + ...l, + excludes: [...(l.excludes || []), Tl.Notebook] + }; + const u = { + only: l.include?.value, + trigger: s.type + }; + const d = new Vme(e, r); + const h = s.type === 2; + const g = Dhr(i, e, h ? c : l); + const p = new Q(); + const b = g.map(async y => { + const w = setTimeout(() => n.report(y), 1250); + try { + const C = await y.provideCodeActions(e, t, u, d.token); + if (C) { + p.add(C); + } + if (d.token.isCancellationRequested) { + return S4s; + } + const S = (C?.actions || []).filter(k => k && khr(l, k)); + const x = Phr(y, S, l.include); + return { + actions: S.map(k => new Ehr(k, y)), + documentation: x + }; + } catch (C) { + if (ca(C)) { + throw C; + } + uh(C); + return S4s; + } finally { + clearTimeout(w); + } + }); + const v = i.onDidChange(() => { + const y = i.all(e); + if (!Go(y, g)) { + d.cancel(); + } + }); + try { + const y = await Promise.all(b); + const w = y.map(S => S.actions).flat(); + const C = [...dr(y.map(S => S.documentation).filter(S => !!S)), ...Thr(i, e, s, w)]; + return new Ihr(w, C, p); + } finally { + v.dispose(); + d.dispose(); + } +} +function Dhr(i, e, t) { + return i.all(e).filter(s => s.providedCodeActionKinds ? s.providedCodeActionKinds.some(n => xhr(t, new _c(n))) : true); +} +function* Thr(i, e, t, s) { + if (e && s.length) { + for (const n of i.all(e)) { + if (n._getAdditionalMenuItems) { + yield* n._getAdditionalMenuItems?.({ + trigger: t.type, + only: t.filter?.include?.value + }, s.map(r => r.action)); + } + } + } +} +function Phr(i, e, t) { + if (!i.documentation) { + return; + } + const s = i.documentation.map(n => ({ + kind: new _c(n.kind), + command: n.command + })); + if (t) { + let n; + for (const r of s) { + if (r.kind.contains(t)) { + if (n) { + if (n.kind.contains(r.kind)) { + n = r; + } + } else { + n = r; + } + } + } + if (n) { + return n?.command; + } + } + for (const n of e) { + if (n.kind) { + for (const r of s) { + if (r.kind.contains(new _c(n.kind))) { + return r.command; + } + } + } + } +} +var vD; +(function (i) { + i.OnSave = "onSave"; + i.FromProblemsView = "fromProblemsView"; + i.FromCodeActions = "fromCodeActions"; + i.FromAILightbulb = "fromAILightbulb"; + i.FromProblemsHover = "fromProblemsHover"; +})(vD ||= {}); +async function cG(i, e, t, s, n = mt.None) { + const r = i.get(eg); + const o = i.get(gt); + const a = i.get(Ot); + const l = i.get(ni); + const c = i.get(Pd); + a.publicLog2("codeAction.applyCodeAction", { + codeActionTitle: e.action.title, + codeActionKind: e.action.kind, + codeActionIsPreferred: !!e.action.isPreferred, + reason: t + }); + c.playSignal(el.codeActionTriggered); + await e.resolve(n); + if (!n.isCancellationRequested && (!e.action.edit?.edits.length || !!(await r.apply(e.action.edit, { + editor: s?.editor, + label: e.action.title, + quotableLabel: e.action.title, + code: "undoredo.codeAction", + respectAutoSaveConfig: t !== vD.OnSave, + showPreview: s?.preview + })).isApplied)) { + if (e.action.command) { + try { + await o.executeCommand(e.action.command.id, ...(e.action.command.arguments || [])); + } catch (u) { + const d = Lhr(u); + l.error(typeof d == "string" ? d : f(907, null)); + } + } + setTimeout(() => c.playSignal(el.codeActionApplied), 100); + } +} +function Lhr(i) { + if (typeof i == "string") { + return i; + } else if (i instanceof Error && typeof i.message == "string") { + return i.message; + } else { + return undefined; + } +} +ei.registerCommand("_executeCodeActionProvider", async function (i, e, t, s, n) { + if (!(e instanceof V)) { + throw Hl(); + } + const { + codeActionProvider: r + } = i.get(nn); + const o = i.get($s).getModel(e); + if (!o) { + throw Hl(); + } + const a = Vs.isISelection(t) ? Vs.liftSelection(t) : Z.isIRange(t) ? o.validateRange(t) : undefined; + if (!a) { + throw Hl(); + } + const l = typeof s == "string" ? new _c(s) : undefined; + const c = await TR(r, o, a, { + type: 1, + triggerAction: ly.Default, + filter: { + includeSourceActions: true, + include: l + } + }, ev.None, mt.None); + const u = []; + const d = Math.min(c.validActions.length, typeof n == "number" ? n : 0); + for (let h = 0; h < d; h++) { + u.push(c.validActions[h].resolve(mt.None)); + } + try { + await Promise.all(u); + return c.validActions.map(h => h.action); + } finally { + setTimeout(() => c.dispose(), 100); + } +}); +X(); +Ee(); +xe(); +wc(); +Ut(); +pu(); +q(); +Rs(); +Ya(); +Tr(); +Mx(); +pu(); +Fi(); +var aQt; +var lQt = class { + static { + aQt = this; + } + static { + this.a = [sQt, tQt, nQt, rQt, oQt]; + } + constructor(e) { + this.b = e; + } + getResolver() { + const e = new ol(() => this.b.getKeybindings().filter(t => aQt.a.indexOf(t.command) >= 0).filter(t => t.resolvedKeybinding).map(t => { + let s = t.commandArgs; + if (t.command === rQt) { + s = { + kind: Tl.SourceOrganizeImports.value + }; + } else if (t.command === oQt) { + s = { + kind: Tl.SourceFixAll.value + }; + } + return { + resolvedKeybinding: t.resolvedKeybinding, + ...Mpt.fromUser(s, { + kind: _c.None, + apply: "never" + }) + }; + })); + return t => { + if (t.kind) { + return this.c(t, e.value)?.resolvedKeybinding; + } + }; + } + c(e, t) { + if (!e.kind) { + return; + } + const s = new _c(e.kind); + return t.filter(n => n.kind.contains(s)).filter(n => n.preferred ? e.isPreferred : true).reduceRight((n, r) => n ? n.kind.contains(r.kind) ? r : n : r, undefined); + } +}; +lQt = aQt = __decorate([__param(0, oi)], lQt); +He(); +X(); +Qs(); +var bsa = he("symbolIcon.arrayForeground", Nr, f(1534, null)); +var vsa = he("symbolIcon.booleanForeground", Nr, f(1535, null)); +var ysa = he("symbolIcon.classForeground", { + dark: "#EE9D28", + light: "#D67E00", + hcDark: "#EE9D28", + hcLight: "#D67E00" +}, f(1536, null)); +var wsa = he("symbolIcon.colorForeground", Nr, f(1537, null)); +var Csa = he("symbolIcon.constantForeground", Nr, f(1538, null)); +var Ssa = he("symbolIcon.constructorForeground", { + dark: "#B180D7", + light: "#652D90", + hcDark: "#B180D7", + hcLight: "#652D90" +}, f(1539, null)); +var xsa = he("symbolIcon.enumeratorForeground", { + dark: "#EE9D28", + light: "#D67E00", + hcDark: "#EE9D28", + hcLight: "#D67E00" +}, f(1540, null)); +var ksa = he("symbolIcon.enumeratorMemberForeground", { + dark: "#75BEFF", + light: "#007ACC", + hcDark: "#75BEFF", + hcLight: "#007ACC" +}, f(1541, null)); +var Esa = he("symbolIcon.eventForeground", { + dark: "#EE9D28", + light: "#D67E00", + hcDark: "#EE9D28", + hcLight: "#D67E00" +}, f(1542, null)); +var Isa = he("symbolIcon.fieldForeground", { + dark: "#75BEFF", + light: "#007ACC", + hcDark: "#75BEFF", + hcLight: "#007ACC" +}, f(1543, null)); +var Dsa = he("symbolIcon.fileForeground", Nr, f(1544, null)); +var Tsa = he("symbolIcon.folderForeground", Nr, f(1545, null)); +var Psa = he("symbolIcon.functionForeground", { + dark: "#B180D7", + light: "#652D90", + hcDark: "#B180D7", + hcLight: "#652D90" +}, f(1546, null)); +var Lsa = he("symbolIcon.interfaceForeground", { + dark: "#75BEFF", + light: "#007ACC", + hcDark: "#75BEFF", + hcLight: "#007ACC" +}, f(1547, null)); +var Rsa = he("symbolIcon.keyForeground", Nr, f(1548, null)); +var Nsa = he("symbolIcon.keywordForeground", Nr, f(1549, null)); +var Msa = he("symbolIcon.methodForeground", { + dark: "#B180D7", + light: "#652D90", + hcDark: "#B180D7", + hcLight: "#652D90" +}, f(1550, null)); +var Asa = he("symbolIcon.moduleForeground", Nr, f(1551, null)); +var $sa = he("symbolIcon.namespaceForeground", Nr, f(1552, null)); +var Fsa = he("symbolIcon.nullForeground", Nr, f(1553, null)); +var Osa = he("symbolIcon.numberForeground", Nr, f(1554, null)); +var _sa = he("symbolIcon.objectForeground", Nr, f(1555, null)); +var Bsa = he("symbolIcon.operatorForeground", Nr, f(1556, null)); +var Usa = he("symbolIcon.packageForeground", Nr, f(1557, null)); +var Wsa = he("symbolIcon.propertyForeground", Nr, f(1558, null)); +var Vsa = he("symbolIcon.referenceForeground", Nr, f(1559, null)); +var Hsa = he("symbolIcon.snippetForeground", Nr, f(1560, null)); +var qsa = he("symbolIcon.stringForeground", Nr, f(1561, null)); +var jsa = he("symbolIcon.structForeground", Nr, f(1562, null)); +var zsa = he("symbolIcon.textForeground", Nr, f(1563, null)); +var Jsa = he("symbolIcon.typeParameterForeground", Nr, f(1564, null)); +var Gsa = he("symbolIcon.unitForeground", Nr, f(1565, null)); +var Ksa = he("symbolIcon.variableForeground", { + dark: "#75BEFF", + light: "#007ACC", + hcDark: "#75BEFF", + hcLight: "#007ACC" +}, f(1566, null)); +X(); +Mx(); +var Apt = "Fix with AI"; +var x4s = Object.freeze({ + kind: _c.Empty, + title: f(943, null) +}); +var Rhr = Object.freeze([{ + kind: Tl.QuickFix, + title: f(944, null) +}, { + kind: Tl.RefactorExtract, + title: f(945, null), + icon: A.wrench +}, { + kind: Tl.RefactorInline, + title: f(946, null), + icon: A.wrench +}, { + kind: Tl.RefactorRewrite, + title: f(947, null), + icon: A.wrench +}, { + kind: Tl.RefactorMove, + title: f(948, null), + icon: A.wrench +}, { + kind: Tl.SurroundWith, + title: f(949, null), + icon: A.surroundWith +}, { + kind: Tl.Source, + title: f(950, null), + icon: A.symbolFile +}, x4s]); +function Nhr(i, e, t) { + if (!e) { + return i.map(o => ({ + kind: "action", + item: o, + group: x4s, + disabled: !!o.action.disabled, + label: o.action.disabled || o.action.title, + canPreview: !!o.action.edit?.edits.length + })); + } + const s = Rhr.map(o => ({ + group: o, + actions: [] + })); + for (const o of i) { + const a = o.action.kind ? new _c(o.action.kind) : _c.None; + for (const l of s) { + if (l.group.kind.contains(a)) { + l.actions.push(o); + break; + } + } + } + const n = s.find(o => o.group.kind === Tl.QuickFix); + if (n !== undefined) { + n.actions.sort((a, l) => { + const c = [Apt]; + const u = c.findIndex(h => a.action.title.includes(h)); + const d = c.findIndex(h => l.action.title.includes(h)); + if (u === -1 && d === -1) { + return 0; + } else if (u !== -1 && d === -1) { + return 1; + } else if (u === -1 && d !== -1) { + return -1; + } else { + return u - d; + } + }); + const o = n.actions.findIndex(a => a.action.title.trim() === Apt); + n.actions = n.actions.filter((a, l, c) => a.action.title.trim() !== Apt || l === o).filter(a => !a.action.title.includes("using Copilot")); + } + const r = []; + for (const o of s) { + if (o.actions.length) { + r.push({ + kind: "header", + group: o.group + }); + for (const a of o.actions) { + const l = o.group; + r.push({ + kind: "action", + item: a, + group: a.action.title.trim() === Apt ? { + ...o.group, + icon: A.sparkle + } : o.group, + label: a.action.title, + disabled: !!a.action.disabled, + keybinding: t(a.action) + }); + } + } + } + return r; +} +xe(); +hh(); +He(); +pe(); +q(); +Rt(); +gc(); +Ya(); +h9t(); +X(); +Fi(); +Br(); +yt(); +var Rne; +var k4s = dt("gutter-lightbulb", A.lightBulb, f(951, null)); +var E4s = dt("gutter-lightbulb-auto-fix", A.lightbulbAutofix, f(952, null)); +var I4s = dt("gutter-lightbulb-sparkle", A.lightbulbSparkle, f(953, null)); +var D4s = dt("gutter-lightbulb-aifix-auto-fix", A.lightbulbSparkleAutofix, f(954, null)); +var T4s = dt("gutter-lightbulb-sparkle-filled", A.sparkleFilled, f(955, null)); +var DA; +(function (i) { + let e; + (function (s) { + s[s.Hidden = 0] = "Hidden"; + s[s.Showing = 1] = "Showing"; + })(e = i.Type ||= {}); + i.Hidden = { + type: 0 + }; + class t { + constructor(n, r, o, a) { + this.actions = n; + this.trigger = r; + this.editorPosition = o; + this.widgetPosition = a; + this.type = 1; + } + } + i.Showing = t; +})(DA ||= {}); +var e0e = class extends H { + static { + Rne = this; + } + static { + this.b = Cr.register({ + description: "codicon-gutter-lightbulb-decoration", + glyphMarginClassName: le.asClassName(A.lightBulb), + glyphMargin: { + position: Dx.Left + }, + stickiness: 1 + }); + } + static { + this.ID = "editor.contrib.lightbulbWidget"; + } + static { + this.c = [0]; + } + constructor(e, t) { + super(); + this.t = e; + this.u = t; + this.g = this.D(new B()); + this.onClick = this.g.event; + this.h = DA.Hidden; + this.j = DA.Hidden; + this.m = []; + this.n = ["codicon-" + k4s.id, "codicon-" + D4s.id, "codicon-" + E4s.id, "codicon-" + I4s.id, "codicon-" + T4s.id]; + this.s = Rne.b; + this.f = G("div.lightBulbWidget"); + this.f.role = "listbox"; + this.D(bd.ignoreTarget(this.f)); + this.t.addContentWidget(this); + this.D(this.t.onDidChangeModelContent(s => { + const n = this.t.getModel(); + if (this.w.type !== 1 || !n || this.w.editorPosition.lineNumber >= n.getLineCount()) { + this.hide(); + } + if (this.z.type !== 1 || !n || this.z.editorPosition.lineNumber >= n.getLineCount()) { + this.gutterHide(); + } + })); + this.D(jB(this.f, s => { + if (this.w.type !== 1) { + return; + } + this.t.focus(); + s.preventDefault(); + const { + top: n, + height: r + } = sd(this.f); + const o = this.t.getOption(68); + let a = Math.floor(o / 3); + if (this.w.widgetPosition.position !== null && this.w.widgetPosition.position.lineNumber < this.w.editorPosition.lineNumber) { + a += o; + } + this.g.fire({ + x: s.posx, + y: n + r + a, + actions: this.w.actions, + trigger: this.w.trigger + }); + })); + this.D(Ce(this.f, "mouseenter", s => { + if ((s.buttons & 1) === 1) { + this.hide(); + } + })); + this.D(de.runAndSubscribe(this.u.onDidUpdateKeybindings, () => { + this.q = this.u.lookupKeybinding(C4s)?.getLabel() ?? undefined; + this.r = this.u.lookupKeybinding(iQt)?.getLabel() ?? undefined; + this.C(); + })); + this.D(this.t.onMouseDown(async s => { + if (!s.target.element || !this.n.some(l => s.target.element && s.target.element.classList.contains(l)) || this.z.type !== 1) { + return; + } + this.t.focus(); + const { + top: n, + height: r + } = sd(s.target.element); + const o = this.t.getOption(68); + let a = Math.floor(o / 3); + if (this.z.widgetPosition.position !== null && this.z.widgetPosition.position.lineNumber < this.z.editorPosition.lineNumber) { + a += o; + } + this.g.fire({ + x: s.event.posx, + y: n + r + a, + actions: this.z.actions, + trigger: this.z.trigger + }); + })); + } + dispose() { + super.dispose(); + this.t.removeContentWidget(this); + if (this.a) { + this.I(this.a); + } + } + getId() { + return "LightBulbWidget"; + } + getDomNode() { + return this.f; + } + getPosition() { + if (this.h.type === 1) { + return this.h.widgetPosition; + } else { + return null; + } + } + update(e, t, s) { + if (e.validActions.length <= 0) { + this.gutterHide(); + return this.hide(); + } + if (!this.t.hasTextFocus()) { + this.gutterHide(); + return this.hide(); + } + if (!this.t.getOptions().get(66).enabled) { + this.gutterHide(); + return this.hide(); + } + const o = this.t.getModel(); + if (!o) { + this.gutterHide(); + return this.hide(); + } + const { + lineNumber: a, + column: l + } = o.validatePosition(s); + const c = o.getOptions().tabSize; + const u = this.t.getOptions().get(52); + const d = o.getLineContent(a); + const h = Lat(d, c); + const g = u.spaceWidth * h > 22; + const p = x => x > 2 && this.t.getTopForLineNumber(x) === this.t.getTopForLineNumber(x - 1); + const b = this.t.getLineDecorations(a); + let v = false; + if (b) { + for (const x of b) { + const k = x.options.glyphMarginClassName; + if (k && !this.n.some(E => k.includes(E))) { + v = true; + break; + } + } + } + let y = a; + let w = 1; + if (!g) { + const x = k => { + const E = o.getLineContent(k); + return /^\s*$|^\s+/.test(E) || E.length <= w; + }; + if (a > 1 && !p(a - 1)) { + const k = o.getLineCount(); + const E = a === k; + const D = a > 1 && x(a - 1); + const P = !E && x(a + 1); + const R = x(a); + const L = !P && !D; + if (!P && !D && !v) { + this.z = new DA.Showing(e, t, s, { + position: { + lineNumber: y, + column: w + }, + preference: Rne.c + }); + this.G(); + return this.hide(); + } + if (D || E || D && !R) { + y -= 1; + } else if (P || L && R) { + y += 1; + } + } else if (a === 1 && (a === o.getLineCount() || !x(a + 1) && !x(a))) { + this.z = new DA.Showing(e, t, s, { + position: { + lineNumber: y, + column: w + }, + preference: Rne.c + }); + if (v) { + this.gutterHide(); + } else { + this.G(); + return this.hide(); + } + } else if (a < o.getLineCount() && !p(a + 1)) { + y += 1; + } else if (l * u.spaceWidth < 22) { + return this.hide(); + } + w = /^\S\s*$/.test(o.getLineContent(y)) ? 2 : 1; + } + this.w = new DA.Showing(e, t, s, { + position: { + lineNumber: y, + column: w + }, + preference: Rne.c + }); + if (this.a) { + this.I(this.a); + this.gutterHide(); + } + const C = e.validActions; + const S = e.validActions[0].action.kind; + if (C.length !== 1 || !S) { + this.t.layoutContentWidget(this); + return; + } + this.t.layoutContentWidget(this); + } + hide() { + if (this.w !== DA.Hidden) { + this.w = DA.Hidden; + this.t.layoutContentWidget(this); + } + } + gutterHide() { + if (this.z !== DA.Hidden) { + if (this.a) { + this.I(this.a); + } + this.z = DA.Hidden; + } + } + get w() { + return this.h; + } + set w(e) { + this.h = e; + this.C(); + } + get z() { + return this.j; + } + set z(e) { + this.j = e; + this.F(); + } + C() { + this.f.classList.remove(...this.m); + this.m = []; + if (this.w.type !== 1) { + return; + } + let e; + let t = false; + if (this.w.actions.allAIFixes) { + e = A.sparkleFilled; + if (this.w.actions.validActions.length === 1) { + t = true; + } + } else if (this.w.actions.hasAutoFix) { + if (this.w.actions.hasAIFix) { + e = A.lightbulbSparkleAutofix; + } else { + e = A.lightbulbAutofix; + } + } else if (this.w.actions.hasAIFix) { + e = A.lightbulbSparkle; + } else { + e = A.lightBulb; + } + this.L(this.w.actions.hasAutoFix, t); + this.m = le.asClassNameArray(e); + this.f.classList.add(...this.m); + } + F() { + if (this.z.type !== 1) { + return; + } + let e; + let t = false; + if (this.z.actions.allAIFixes) { + e = T4s; + if (this.z.actions.validActions.length === 1) { + t = true; + } + } else if (this.z.actions.hasAutoFix) { + if (this.z.actions.hasAIFix) { + e = D4s; + } else { + e = E4s; + } + } else if (this.z.actions.hasAIFix) { + e = I4s; + } else { + e = k4s; + } + this.L(this.z.actions.hasAutoFix, t); + const s = Cr.register({ + description: "codicon-gutter-lightbulb-decoration", + glyphMarginClassName: le.asClassName(e), + glyphMargin: { + position: Dx.Left + }, + stickiness: 1 + }); + this.s = s; + } + G() { + const e = this.t.getSelection(); + if (e) { + if (this.a === undefined) { + this.H(e.startLineNumber); + } else { + this.J(this.a, e.startLineNumber); + } + } + } + H(e) { + this.t.changeDecorations(t => { + this.a = t.addDecoration(new Z(e, 0, e, 0), this.s); + }); + } + I(e) { + this.t.changeDecorations(t => { + t.removeDecoration(e); + this.a = undefined; + }); + } + J(e, t) { + this.t.changeDecorations(s => { + s.changeDecoration(e, new Z(t, 0, t, 0)); + s.changeDecorationOptions(e, this.s); + }); + } + L(e, t) { + if (this.w.type === 1) { + if (t) { + this.M = f(956, null, this.w.actions.validActions[0].action.title); + } else if (e && this.q) { + this.M = f(957, null, this.q); + } else if (!e && this.r) { + this.M = f(958, null, this.r); + } else if (!e) { + this.M = f(959, null); + } + } + } + set M(e) { + this.f.title = e; + } +}; +e0e = Rne = __decorate([__param(1, oi)], e0e); +PF(); +X(); +IVt(); +Wt(); +Me(); +Ee(); +te(); +wl(); +so(); +Qs(); +vp(); +gi(); +Fi(); +Cs(); +pe(); +nt(); +Ut(); +pe(); +q(); +Et(); +Qd(); +Rs(); +ua(); +Ee(); +so(); +Mx(); +fd(); +var P4s = new fe("supportedCodeAction", ""); +var L4s = "_typescript.applyFixAllCodeAction"; +var Mhr = class extends H { + constructor(i, e, t, s = 250) { + super(); + this.f = i; + this.g = e; + this.h = t; + this.j = s; + this.c = this.D(new qC()); + this.D(this.g.onMarkerChanged(n => this.m(n))); + this.D(this.f.onDidChangeCursorPosition(() => this.n())); + } + trigger(i) { + const e = this.q(i); + this.h(e ? { + trigger: i, + selection: e + } : undefined); + } + m(i) { + const e = this.f.getModel(); + if (e && i.some(t => Ls(t, e.uri))) { + this.n(); + } + } + n() { + this.c.cancelAndSet(() => { + this.trigger({ + type: 2, + triggerAction: ly.Default + }); + }, this.j); + } + q(i) { + if (!this.f.hasModel()) { + return; + } + const e = this.f.getSelection(); + if (i.type === 1) { + return e; + } + const t = this.f.getOption(66).enabled; + if (t !== MT.Off) { + { + if (t === MT.On) { + return e; + } + if (t === MT.OnCode) { + if (!e.isEmpty()) { + return e; + } + const n = this.f.getModel(); + const { + lineNumber: r, + column: o + } = e.getPosition(); + const a = n.getLineContent(r); + if (a.length === 0) { + return; + } + if (o === 1) { + if (/\s/.test(a[0])) { + return; + } + } else if (o === n.getLineMaxColumn(r)) { + if (/\s/.test(a[a.length - 1])) { + return; + } + } else if (/\s/.test(a[o - 2]) && /\s/.test(a[o - 1])) { + return; + } + } + } + return e; + } + } +}; +var uG; +(function (i) { + let e; + (function (s) { + s[s.Empty = 0] = "Empty"; + s[s.Triggered = 1] = "Triggered"; + })(e = i.Type ||= {}); + i.Empty = { + type: 0 + }; + class t { + constructor(n, r, o) { + this.trigger = n; + this.position = r; + this.c = o; + this.type = 1; + this.actions = o.catch(a => { + if (ca(a)) { + return R4s; + } + throw a; + }); + } + cancel() { + this.c.cancel(); + } + } + i.Triggered = t; +})(uG ||= {}); +var R4s = Object.freeze({ + allActions: [], + validActions: [], + dispose: () => {}, + documentation: [], + hasAutoFix: false, + hasAIFix: false, + allAIFixes: false +}); +var Ahr = class extends H { + constructor(i, e, t, s, n, r, o, a, l) { + super(); + this.m = i; + this.n = e; + this.q = t; + this.r = n; + this.s = r; + this.t = o; + this.u = a; + this.w = l; + this.c = this.D(new ki()); + this.f = uG.Empty; + this.h = this.D(new B()); + this.onDidChangeState = this.h.event; + this.j = false; + this.g = P4s.bindTo(s); + this.D(this.m.onDidChangeModel(() => this.z())); + this.D(this.m.onDidChangeModelLanguage(() => this.z())); + this.D(this.n.onDidChange(() => this.z())); + this.D(this.m.onDidChangeConfiguration(c => { + if (c.hasChanged(66)) { + this.z(); + } + })); + this.z(); + } + dispose() { + if (!this.j) { + this.j = true; + super.dispose(); + this.C(uG.Empty, true); + } + } + y() { + const i = this.m?.getModel(); + if (this.t) { + return this.t.getValue("editor.codeActionWidget.includeNearbyQuickFixes", { + resource: i?.uri + }); + } else { + return false; + } + } + z() { + if (this.j) { + return; + } + this.c.value = undefined; + this.C(uG.Empty); + const i = this.m.getModel(); + if (i && this.n.has(i) && !this.m.getOption(96)) { + const e = this.n.all(i).flatMap(t => t.providedCodeActionKinds ?? []); + this.g.set(e.join(" ")); + this.c.value = new Mhr(this.m, this.q, t => { + if (!t) { + this.C(uG.Empty); + return; + } + const s = t.selection.getStartPosition(); + const n = ql(async a => { + if (this.y() && t.trigger.type === 1 && (t.trigger.triggerAction === ly.QuickFix || t.trigger.filter?.include?.contains(Tl.QuickFix))) { + const l = await TR(this.n, i, t.selection, t.trigger, ev.None, a, this.s); + const c = [...l.allActions]; + if (a.isCancellationRequested) { + l.dispose(); + return R4s; + } + const u = l.validActions?.some(h => h.action.kind ? Tl.QuickFix.contains(new _c(h.action.kind)) : false); + const d = this.q.read({ + resource: i.uri + }); + if (u) { + for (const h of l.validActions) { + if (h.action.command?.arguments?.some(g => typeof g == "string" && g.includes(L4s))) { + h.action.diagnostics = [...d.filter(g => g.relatedInformation)]; + } + } + return { + validActions: l.validActions, + allActions: c, + documentation: l.documentation, + hasAutoFix: l.hasAutoFix, + hasAIFix: l.hasAIFix, + allAIFixes: l.allAIFixes, + dispose: () => { + l.dispose(); + } + }; + } else if (!u && d.length > 0) { + const h = t.selection.getPosition(); + let g = h; + let p = Number.MAX_VALUE; + const b = [...l.validActions]; + for (const y of d) { + const w = y.endColumn; + const C = y.endLineNumber; + const S = y.startLineNumber; + if (C === h.lineNumber || S === h.lineNumber) { + g = new je(C, w); + const x = { + type: t.trigger.type, + triggerAction: t.trigger.triggerAction, + filter: { + include: t.trigger.filter?.include ? t.trigger.filter?.include : Tl.QuickFix + }, + autoApply: t.trigger.autoApply, + context: { + notAvailableMessage: t.trigger.context?.notAvailableMessage || "", + position: g + } + }; + const k = new Vs(g.lineNumber, g.column, g.lineNumber, g.column); + const E = await TR(this.n, i, k, x, ev.None, a); + if (E.validActions.length !== 0) { + for (const D of E.validActions) { + if (D.action.command?.arguments?.some(P => typeof P == "string" && P.includes(L4s))) { + D.action.diagnostics = [...d.filter(P => P.relatedInformation)]; + } + } + if (l.allActions.length === 0) { + c.push(...E.allActions); + } + if (Math.abs(h.column - w) < p) { + b.unshift(...E.validActions); + } else { + b.push(...E.validActions); + } + } + p = Math.abs(h.column - w); + } + } + const v = b.filter((y, w, C) => C.findIndex(S => S.action.title === y.action.title) === w); + v.sort((y, w) => y.action.isPreferred && !w.action.isPreferred ? -1 : !y.action.isPreferred && w.action.isPreferred || y.action.isAI && !w.action.isAI ? 1 : !y.action.isAI && w.action.isAI ? -1 : 0); + return { + validActions: v, + allActions: c, + documentation: l.documentation, + hasAutoFix: l.hasAutoFix, + hasAIFix: l.hasAIFix, + allAIFixes: l.allAIFixes, + dispose: () => { + l.dispose(); + } + }; + } + } + if (t.trigger.type === 1) { + const l = new ic(); + const c = await TR(this.n, i, t.selection, t.trigger, ev.None, a, undefined, this.u?.applicationUserPersistentStorage.turnOnCopilotChat !== true); + if (this.w) { + this.w.publicLog2("codeAction.invokedDurations", { + codeActions: c.validActions.length, + duration: l.elapsed() + }); + } + return c; + } + return TR(this.n, i, t.selection, t.trigger, ev.None, a, undefined, this.u?.applicationUserPersistentStorage.turnOnCopilotChat !== true); + }); + if (t.trigger.type === 1) { + this.r?.showWhile(n, 250); + } + const r = new uG.Triggered(t.trigger, s, n); + let o = false; + if (this.f.type === 1) { + o = this.f.trigger.type === 1 && r.type === 1 && r.trigger.type === 2 && this.f.position !== r.position; + } + if (o) { + setTimeout(() => { + this.C(r); + }, 500); + } else { + this.C(r); + } + }, undefined); + this.c.value.trigger({ + type: 2, + triggerAction: ly.Default + }); + } else { + this.g.reset(); + } + } + trigger(i) { + this.c.value?.trigger(i); + } + C(i, e) { + if (i !== this.f) { + if (this.f.type === 1) { + this.f.cancel(); + } + this.f = i; + if (!e && !this.j) { + this.h.fire(i); + } + } + } +}; +Mx(); +ai(); +Qd(); +var Nne; +var $hr = "quickfix-edit-highlight"; +var yD = class extends H { + static { + Nne = this; + } + static { + this.ID = "editor.contrib.codeActionController"; + } + static get(e) { + return e.getContribution(Nne.ID); + } + constructor(e, t, s, n, r, o, a, l, c, u, d, h, g, p) { + super(); + this.q = a; + this.r = l; + this.s = c; + this.t = u; + this.u = d; + this.w = h; + this.z = g; + this.C = p; + this.f = this.D(new ki()); + this.g = false; + this.h = this.D(new B()); + this.onDidChangeCodeActions = this.h.event; + this.j = this.D(new B()); + this.onDidApplyCodeAction = this.j.event; + this.n = false; + this.a = e; + this.b = this.D(new Ahr(this.a, r.codeActionProvider, t, s, o, d, l, h, this.z)); + this.D(this.b.onDidChangeState(b => this.H(b))); + this.c = new ol(() => { + const b = this.a.getContribution(e0e.ID); + if (b) { + this.D(b.onClick(v => this.F(v.actions, v))); + } + return b; + }); + this.m = n.createInstance(lQt); + this.D(this.a.onDidLayoutChange(() => this.s.hide())); + } + dispose() { + this.n = true; + super.dispose(); + } + async F(e, t) { + if (e.allAIFixes && e.validActions.length === 1) { + const s = e.validActions[0]; + const n = s.action.command; + if (n && n.id === "inlineChat.start" && n.arguments && n.arguments.length >= 1) { + n.arguments[0] = { + ...n.arguments[0], + autoSend: false + }; + } + await this.applyCodeAction(s, false, false, vD.FromAILightbulb); + return; + } + await this.showCodeActionList(e, t, { + includeDisabledActions: false, + fromLightbulb: true + }); + } + showCodeActions(e, t, s) { + return this.showCodeActionList(t, s, { + includeDisabledActions: false, + fromLightbulb: false + }); + } + hideCodeActions() { + this.s.hide(); + } + manualTriggerAtCurrentPosition(e, t, s, n) { + if (!this.a.hasModel()) { + return; + } + iv.get(this.a)?.closeMessage(); + const r = this.a.getPosition(); + this.G({ + type: 1, + triggerAction: t, + filter: s, + autoApply: n, + context: { + notAvailableMessage: e, + position: r + } + }); + } + G(e) { + return this.b.trigger(e); + } + async applyCodeAction(e, t, s, n) { + const r = this.C.show(true, 500); + try { + await this.t.invokeFunction(cG, e, n, { + preview: s, + editor: this.a + }); + } finally { + if (t) { + this.G({ + type: 2, + triggerAction: ly.QuickFix, + filter: {} + }); + } + r.done(); + } + } + hideLightBulbWidget() { + this.c.rawValue?.hide(); + this.c.rawValue?.gutterHide(); + } + async H(e) { + if (e.type !== 1) { + this.hideLightBulbWidget(); + return; + } + let t; + try { + t = await e.actions; + } catch (n) { + xs(n); + return; + } + if (!this.n && this.a.getSelection()?.startLineNumber === e.position.lineNumber) { + if (this.a.getOption(66).enabled !== MT.Off) { + this.c.value?.update(t, e.trigger, e.position); + } + if (e.trigger.type === 1) { + if (e.trigger.filter?.include) { + const r = this.J(e.trigger, t); + if (r) { + try { + this.hideLightBulbWidget(); + await this.applyCodeAction(r, false, false, vD.FromCodeActions); + } finally { + t.dispose(); + } + return; + } + if (e.trigger.context) { + const o = this.I(e.trigger, t); + if (o && o.action.disabled) { + iv.get(this.a)?.showMessage(o.action.disabled, e.trigger.context.position); + t.dispose(); + return; + } + } + } + const n = !!e.trigger.filter?.include; + if (e.trigger.context && (!t.allActions.length || !n && !t.validActions.length)) { + iv.get(this.a)?.showMessage(e.trigger.context.notAvailableMessage, e.trigger.context.position); + this.f.value = t; + this.h.fire(t); + t.dispose(); + return; + } + this.f.value = t; + this.h.fire(t); + this.showCodeActionList(t, this.M(e.position), { + includeDisabledActions: n, + fromLightbulb: false + }); + } else if (this.s.isVisible) { + t.dispose(); + } else { + this.f.value = t; + this.h.fire(t); + } + } + } + I(e, t) { + if (t.allActions.length && (e.autoApply === "first" && t.validActions.length === 0 || e.autoApply === "ifSingle" && t.allActions.length === 1)) { + return t.allActions.find(({ + action: s + }) => s.disabled); + } + } + J(e, t) { + if (t.validActions.length && (e.autoApply === "first" && t.validActions.length > 0 || e.autoApply === "ifSingle" && t.validActions.length === 1)) { + return t.validActions[0]; + } + } + static { + this.L = Cr.register({ + description: "quickfix-highlight", + className: $hr + }); + } + async showCodeActionList(e, t, s) { + const n = this.a.createDecorationsCollection(); + const r = this.a.getDomNode(); + if (!r) { + return; + } + const o = s.includeDisabledActions && (this.g || e.validActions.length === 0) ? e.allActions : e.validActions; + if (!o.length) { + return; + } + const a = je.isIPosition(t) ? this.M(t) : t; + const l = { + onSelect: async (c, u) => { + this.applyCodeAction(c, true, !!u, s.fromLightbulb ? vD.FromAILightbulb : vD.FromCodeActions); + this.s.hide(false); + n.clear(); + }, + onHide: c => { + this.a?.focus(); + n.clear(); + }, + onHover: async (c, u) => { + if (u.isCancellationRequested) { + return; + } + let d = false; + const h = c.action.kind; + if (h) { + const g = new _c(h); + d = [Tl.RefactorExtract, Tl.RefactorInline, Tl.RefactorRewrite, Tl.RefactorMove, Tl.Source].some(b => b.contains(g)); + } + return { + canPreview: d || !!c.action.edit?.edits.length + }; + }, + onFocus: c => { + if (c && c.action) { + const u = c.action.ranges; + const d = c.action.diagnostics; + n.clear(); + if (u && u.length > 0) { + const h = d && d?.length > 1 ? d.map(g => ({ + range: g, + options: Nne.L + })) : u.map(g => ({ + range: g, + options: Nne.L + })); + n.set(h); + } else if (d && d.length > 0) { + const h = d.map(p => ({ + range: p, + options: Nne.L + })); + n.set(h); + const g = d[0]; + if (g.startLineNumber && g.startColumn) { + const p = this.a.getModel()?.getWordAtPosition({ + lineNumber: g.startLineNumber, + column: g.startColumn + })?.word; + Bh(f(940, null, p, g.startLineNumber, g.startColumn)); + } + } + } else { + n.clear(); + } + } + }; + this.s.show("codeActionWidget", true, Nhr(o, this.N(), this.m.getResolver()), l, a, r, this.O(e, t, s)); + } + M(e) { + if (!this.a.hasModel()) { + return { + x: 0, + y: 0 + }; + } + this.a.revealPosition(e, 1); + this.a.render(); + const t = this.a.getScrolledVisiblePosition(e); + const s = sd(this.a.getDomNode()); + const n = s.left + t.left; + const r = s.top + t.top + t.height; + return { + x: n, + y: r + }; + } + N() { + const e = this.a?.getModel(); + return this.r.getValue("editor.codeActionWidget.showHeaders", { + resource: e?.uri + }); + } + O(e, t, s) { + if (s.fromLightbulb) { + return []; + } + const n = e.documentation.map(r => ({ + id: r.id, + label: r.title, + tooltip: r.tooltip ?? "", + class: undefined, + enabled: true, + run: () => this.q.executeCommand(r.id, ...(r.arguments ?? [])) + })); + if (s.includeDisabledActions && e.validActions.length > 0 && e.allActions.length !== e.validActions.length) { + n.push(this.g ? { + id: "hideMoreActions", + label: f(941, null), + enabled: true, + tooltip: "", + class: undefined, + run: () => { + this.g = false; + return this.showCodeActionList(e, t, s); + } + } : { + id: "showMoreActions", + label: f(942, null), + enabled: true, + tooltip: "", + class: undefined, + run: () => { + this.g = true; + return this.showCodeActionList(e, t, s); + } + }); + } + return n; + } +}; +yD = Nne = __decorate([__param(1, Nu), __param(2, Ne), __param(3, re), __param(4, nn), __param(5, Jp), __param(6, gt), __param(7, ve), __param(8, RF), __param(9, re), __param(10, oi), __param(11, _i), __param(12, Ot), __param(13, Jp)], yD); +bf((i, e) => { + ((n, r) => { + if (r) { + e.addRule(`.monaco-editor ${n} { background-color: ${r}; }`); + } + })(".quickfix-edit-highlight", i.getColor(TI)); + const s = i.getColor(o4); + if (s) { + e.addRule(`.monaco-editor .quickfix-edit-highlight { border: 1px ${LI(i.type) ? "dotted" : "solid"} ${s}; box-sizing: border-box; }`); + } +}); +function t0e(i) { + return T.regex(P4s.keys()[0], new RegExp("(\\s|^)" + zg(i.value) + "\\b")); +} +var cQt = { + type: "object", + defaultSnippets: [{ + body: { + kind: "" + } + }], + properties: { + kind: { + type: "string", + description: f(908, null) + }, + apply: { + type: "string", + description: f(909, null), + default: "ifSingle", + enum: ["first", "ifSingle", "never"], + enumDescriptions: [f(910, null), f(911, null), f(912, null)] + }, + preferred: { + type: "boolean", + default: false, + description: f(913, null) + } + } +}; +function dG(i, e, t, s, n = ly.Default) { + if (i.hasModel()) { + yD.get(i)?.manualTriggerAtCurrentPosition(e, n, t, s); + } +} +var Fhr = class extends Es { + constructor() { + super({ + id: iQt, + label: W(930, "Quick Fix..."), + precondition: T.and(ke.writable, ke.hasCodeActionsProvider), + kbOpts: { + kbExpr: ke.textInputFocus, + primary: 2137, + weight: 100 + } + }); + } + run(i, e) { + return dG(e, f(914, null), undefined, undefined, ly.QuickFix); + } +}; +var Ohr = class extends Wm { + constructor() { + super({ + id: tQt, + precondition: T.and(ke.writable, ke.hasCodeActionsProvider), + metadata: { + description: "Trigger a code action", + args: [{ + name: "args", + schema: cQt + }] + } + }); + } + runEditorCommand(i, e, t) { + const s = Mpt.fromUser(t, { + kind: _c.Empty, + apply: "ifSingle" + }); + return dG(e, typeof t?.kind == "string" ? s.preferred ? f(915, null, t.kind) : f(916, null, t.kind) : s.preferred ? f(917, null) : f(918, null), { + include: s.kind, + includeSourceActions: true, + onlyIncludePreferredActions: s.preferred + }, s.apply); + } +}; +var _hr = class extends Es { + constructor() { + super({ + id: sQt, + label: W(931, "Refactor..."), + precondition: T.and(ke.writable, ke.hasCodeActionsProvider), + kbOpts: { + kbExpr: ke.textInputFocus, + primary: 3120, + mac: { + primary: 1328 + }, + weight: 100 + }, + contextMenuOpts: { + group: "1_modification", + order: 2, + when: T.and(ke.writable, t0e(Tl.Refactor)) + }, + metadata: { + description: "Refactor...", + args: [{ + name: "args", + schema: cQt + }] + } + }); + } + run(i, e, t) { + const s = Mpt.fromUser(t, { + kind: Tl.Refactor, + apply: "never" + }); + return dG(e, typeof t?.kind == "string" ? s.preferred ? f(919, null, t.kind) : f(920, null, t.kind) : s.preferred ? f(921, null) : f(922, null), { + include: Tl.Refactor.contains(s.kind) ? s.kind : _c.None, + onlyIncludePreferredActions: s.preferred + }, s.apply, ly.Refactor); + } +}; +var Bhr = class extends Es { + constructor() { + super({ + id: nQt, + label: W(932, "Source Action..."), + precondition: T.and(ke.writable, ke.hasCodeActionsProvider), + contextMenuOpts: { + group: "1_modification", + order: 2.1, + when: T.and(ke.writable, t0e(Tl.Source)) + }, + metadata: { + description: "Source Action...", + args: [{ + name: "args", + schema: cQt + }] + } + }); + } + run(i, e, t) { + const s = Mpt.fromUser(t, { + kind: Tl.Source, + apply: "never" + }); + return dG(e, typeof t?.kind == "string" ? s.preferred ? f(923, null, t.kind) : f(924, null, t.kind) : s.preferred ? f(925, null) : f(926, null), { + include: Tl.Source.contains(s.kind) ? s.kind : _c.None, + includeSourceActions: true, + onlyIncludePreferredActions: s.preferred + }, s.apply, ly.SourceAction); + } +}; +var Uhr = class extends Es { + constructor() { + super({ + id: rQt, + label: W(933, "Organize Imports"), + precondition: T.and(ke.writable, t0e(Tl.SourceOrganizeImports)), + kbOpts: { + kbExpr: ke.textInputFocus, + primary: 1581, + weight: 100 + }, + metadata: { + description: W(934, "Organize imports in the current file. Also called 'Optimize Imports' by some tools") + } + }); + } + run(i, e) { + return dG(e, f(927, null), { + include: Tl.SourceOrganizeImports, + includeSourceActions: true + }, "ifSingle", ly.OrganizeImports); + } +}; +var Whr = class extends Es { + constructor() { + super({ + id: oQt, + label: W(935, "Fix All"), + precondition: T.and(ke.writable, t0e(Tl.SourceFixAll)) + }); + } + run(i, e) { + return dG(e, f(928, null), { + include: Tl.SourceFixAll, + includeSourceActions: true + }, "ifSingle", ly.FixAll); + } +}; +var Vhr = class extends Es { + constructor() { + super({ + id: C4s, + label: W(936, "Auto Fix..."), + precondition: T.and(ke.writable, t0e(Tl.QuickFix)), + kbOpts: { + kbExpr: ke.textInputFocus, + primary: 1625, + mac: { + primary: 2649 + }, + weight: 100 + } + }); + } + run(i, e) { + return dG(e, f(929, null), { + include: Tl.QuickFix, + onlyIncludePreferredActions: true + }, "ifSingle", ly.AutoFix); + } +}; +X(); +Qr(); +Ht(); +bo(yD.ID, yD, 3); +bo(e0e.ID, e0e, 4); +Oi(Fhr); +Oi(_hr); +Oi(Bhr); +Oi(Uhr); +Oi(Vhr); +Oi(Whr); +Sn(new Ohr()); +Pe.as(rr.Configuration).registerConfiguration({ + ...IA, + properties: { + "editor.codeActionWidget.showHeaders": { + type: "boolean", + scope: 5, + description: f(937, null), + default: true + } + } +}); +Pe.as(rr.Configuration).registerConfiguration({ + ...IA, + properties: { + "editor.codeActionWidget.includeNearbyQuickFixes": { + type: "boolean", + scope: 5, + description: f(938, null), + default: true + } + } +}); +Pe.as(rr.Configuration).registerConfiguration({ + ...IA, + properties: { + "editor.codeActions.triggerOnFocusChange": { + type: "boolean", + scope: 5, + markdownDescription: f(939, null, "`#editor.codeActionsOnSave#`", "`#files.autoSave#`", "`afterDelay`", "`always`"), + default: false + } + } +}); +nt(); +Ut(); +q(); +en(); +Qd(); +Sr(); +ri(); +Ut(); +q(); +zt(); +Le(); +Rn(); +Wt(); +Tr(); +var uQt = class { + constructor() { + this.lenses = []; + } + dispose() { + this.c?.dispose(); + } + get isDisposed() { + return this.c?.isDisposed ?? false; + } + add(i, e) { + if (bT(i)) { + this.c ??= new Q(); + this.c.add(i); + } + for (const t of i.lenses) { + this.lenses.push({ + symbol: t, + provider: e + }); + } + } +}; +async function N4s(i, e, t) { + const s = i.ordered(e); + const n = new Map(); + const r = new uQt(); + const o = s.map(async (a, l) => { + n.set(a, l); + try { + const c = await Promise.resolve(a.provideCodeLenses(e, t)); + if (c) { + r.add(c, a); + } + } catch (c) { + uh(c); + } + }); + await Promise.all(o); + r.lenses = r.lenses.sort((a, l) => a.symbol.range.startLineNumber < l.symbol.range.startLineNumber ? -1 : a.symbol.range.startLineNumber > l.symbol.range.startLineNumber ? 1 : n.get(a.provider) < n.get(l.provider) ? -1 : n.get(a.provider) > n.get(l.provider) ? 1 : a.symbol.range.startColumn < l.symbol.range.startColumn ? -1 : a.symbol.range.startColumn > l.symbol.range.startColumn ? 1 : 0); + return r; +} +ei.registerCommand("_executeCodeLensProvider", function (i, ...e) { + let [t, s] = e; + yr(V.isUri(t)); + yr(typeof s == "number" || !s); + const { + codeLensProvider: n + } = i.get(nn); + const r = i.get($s).getModel(t); + if (!r) { + throw Hl(); + } + const o = []; + const a = new Q(); + return N4s(n, r, mt.None).then(l => { + a.add(l); + const c = []; + for (const u of l.lenses) { + if (s == null || u.symbol.command) { + o.push(u.symbol); + } else if (s-- > 0 && u.provider.resolveCodeLens) { + c.push(Promise.resolve(u.provider.resolveCodeLens(r, u.symbol, mt.None)).then(d => o.push(d || u.symbol))); + } + } + return Promise.all(c); + }).then(() => o).finally(() => { + setTimeout(() => a.dispose(), 100); + }); +}); +pe(); +In(); +yt(); +It(); +te(); +qt(); +fr(); +xe(); +var M4s = Ve("ICodeLensCache"); +var A4s = class { + constructor(i, e) { + this.lineCount = i; + this.data = e; + } +}; +var dQt = class { + constructor(e) { + this.a = new class { + provideCodeLenses() { + throw new Error("not supported"); + } + }(); + this.b = new vc(20, 0.75); + const t = "codelens/cache"; + jk(xt, () => e.remove(t, 1)); + const s = "codelens/cache2"; + const n = e.get(s, 1, "{}"); + this.f(n); + const r = de.filter(e.onWillSaveState, o => o.reason === HT.SHUTDOWN); + de.once(r)(o => { + e.store(s, this.c(), 1, 1); + }); + } + put(e, t) { + const s = t.lenses.map(o => ({ + range: o.symbol.range, + command: o.symbol.command && { + id: "", + title: o.symbol.command?.title + } + })); + const n = new uQt(); + n.add({ + lenses: s + }, this.a); + const r = new A4s(e.getLineCount(), n); + this.b.set(e.uri.toString(), r); + } + get(e) { + const t = this.b.get(e.uri.toString()); + if (t && t.lineCount === e.getLineCount()) { + return t.data; + } else { + return undefined; + } + } + delete(e) { + this.b.delete(e.uri.toString()); + } + c() { + const e = Object.create(null); + for (const [t, s] of this.b) { + const n = new Set(); + for (const r of s.data.lenses) { + n.add(r.symbol.range.startLineNumber); + } + e[t] = { + lineCount: s.lineCount, + lines: [...n.values()] + }; + } + return JSON.stringify(e); + } + f(e) { + try { + const t = JSON.parse(e); + for (const s in t) { + const n = t[s]; + const r = []; + for (const a of n.lines) { + r.push({ + range: new Z(a, 1, a, 11) + }); + } + const o = new uQt(); + o.add({ + lenses: r + }, this.a); + this.b.set(s, new A4s(n.lineCount, o)); + } + } catch {} + } +}; +dQt = __decorate([__param(0, ht)], dQt); +it(M4s, dQt, 1); +xe(); +vd(); +yt(); +Ya(); +var Hhr = class { + constructor(i, e, t) { + this.afterColumn = 1073741824; + this.afterLineNumber = i; + this.heightInPx = e; + this.b = t; + this.suppressMouseDown = true; + this.domNode = document.createElement("div"); + } + onComputedHeight(i) { + if (this.a === undefined) { + this.a = i; + } else if (this.a !== i) { + this.a = i; + this.b(); + } + } + isVisible() { + return this.a !== 0 && this.domNode.hasAttribute("monaco-visible-view-zone"); + } +}; +var qhr = class a9i { + static { + this.a = 0; + } + constructor(e, t) { + this.allowEditorOverflow = false; + this.suppressMouseDown = true; + this.e = new Map(); + this.g = true; + this.d = e; + this.b = `codelens.widget-${a9i.a++}`; + this.updatePosition(t); + this.c = document.createElement("span"); + this.c.className = "codelens-decoration"; + } + withCommands(e, t) { + this.e.clear(); + const s = []; + let n = false; + for (let r = 0; r < e.length; r++) { + const o = e[r]; + if (o && (n = true, o.command)) { + const a = Vu(o.command.title.trim()); + if (o.command.id) { + const l = `c${a9i.a++}`; + s.push(G("a", { + id: l, + title: o.command.tooltip, + role: "button" + }, ...a)); + this.e.set(l, o.command); + } else { + s.push(G("span", { + title: o.command.tooltip + }, ...a)); + } + if (r + 1 < e.length) { + s.push(G("span", undefined, "\xA0|\xA0")); + } + } + } + if (n) { + mo(this.c, ...s); + if (this.g && t) { + this.c.classList.add("fadein"); + } + this.g = false; + } else { + mo(this.c, G("span", undefined, "no commands")); + } + } + getCommand(e) { + if (e.parentElement === this.c) { + return this.e.get(e.id); + } else { + return undefined; + } + } + getId() { + return this.b; + } + getDomNode() { + return this.c; + } + updatePosition(e) { + const t = this.d.getModel().getLineFirstNonWhitespaceColumn(e); + this.f = { + position: { + lineNumber: e, + column: t + }, + preference: [1] + }; + } + getPosition() { + return this.f || null; + } +}; +var hQt = class { + constructor() { + this.a = []; + this.b = []; + this.c = []; + } + addDecoration(i, e) { + this.b.push(i); + this.c.push(e); + } + removeDecoration(i) { + this.a.push(i); + } + commit(i) { + const e = i.deltaDecorations(this.a, this.b); + for (let t = 0, s = e.length; t < s; t++) { + this.c[t](e[t]); + } + } +}; +var $4s = Cr.register({ + collapseOnReplaceEdit: true, + description: "codelens" +}); +var F4s = class { + constructor(i, e, t, s, n, r) { + this.g = false; + this.a = e; + this.f = i; + this.e = []; + let o; + const a = []; + this.f.forEach((l, c) => { + if (l.symbol.command) { + a.push(l.symbol); + } + t.addDecoration({ + range: l.symbol.range, + options: $4s + }, u => this.e[c] = u); + if (o) { + o = Z.plusRange(o, l.symbol.range); + } else { + o = Z.lift(l.symbol.range); + } + }); + this.b = new Hhr(o.startLineNumber - 1, n, r); + this.c = s.addZone(this.b); + if (a.length > 0) { + this.h(); + this.d.withCommands(a, false); + } + } + h() { + if (this.d) { + this.a.layoutContentWidget(this.d); + } else { + this.d = new qhr(this.a, this.b.afterLineNumber + 1); + this.a.addContentWidget(this.d); + } + } + dispose(i, e) { + this.e.forEach(i.removeDecoration, i); + this.e = []; + e?.removeZone(this.c); + if (this.d) { + this.a.removeContentWidget(this.d); + this.d = undefined; + } + this.g = true; + } + isDisposed() { + return this.g; + } + isValid() { + return this.e.some((i, e) => { + const t = this.a.getModel().getDecorationRange(i); + const s = this.f[e].symbol; + return !!t && Z.isEmpty(s.range) === t.isEmpty(); + }); + } + updateCodeLensSymbols(i, e) { + this.e.forEach(e.removeDecoration, e); + this.e = []; + this.f = i; + this.f.forEach((t, s) => { + e.addDecoration({ + range: t.symbol.range, + options: $4s + }, n => this.e[s] = n); + }); + } + updateHeight(i, e) { + this.b.heightInPx = i; + e.layoutZone(this.c); + if (this.d) { + this.a.layoutContentWidget(this.d); + } + } + computeIfNecessary(i) { + if (!this.b.isVisible()) { + return null; + } + for (let e = 0; e < this.e.length; e++) { + const t = i.getDecorationRange(this.e[e]); + if (t) { + this.f[e].symbol.range = t; + } + } + return this.f; + } + updateCommands(i) { + this.h(); + this.d.withCommands(i, true); + for (let e = 0; e < this.f.length; e++) { + const t = i[e]; + if (t) { + const { + symbol: s + } = this.f[e]; + s.command = t.command || s.command; + } + } + } + getCommand(i) { + return this.d?.getCommand(i); + } + getLineNumber() { + const i = this.a.getModel().getDecorationRange(this.e[0]); + if (i) { + return i.startLineNumber; + } else { + return -1; + } + } + update(i) { + if (this.isValid()) { + const e = this.a.getModel().getDecorationRange(this.e[0]); + if (e) { + this.b.afterLineNumber = e.startLineNumber - 1; + i.layoutZone(this.c); + if (this.d) { + this.d.updatePosition(e.startLineNumber); + this.a.layoutContentWidget(this.d); + } + } + } + } + getItems() { + return this.f; + } +}; +X(); +Wt(); +Wi(); +mn(); +mR(); +Tr(); +var Mne = class { + static { + this.ID = "css.editor.codeLens"; + } + constructor(e, t, s, n, r, o) { + this.n = e; + this.o = t; + this.p = n; + this.q = r; + this.r = o; + this.a = new Q(); + this.b = new Q(); + this.c = []; + this.j = new Q(); + this.d = s.for(t.codeLensProvider, "CodeLensProvide", { + min: 250 + }); + this.f = s.for(t.codeLensProvider, "CodeLensResolve", { + min: 250, + salt: "resolve" + }); + this.g = new Vn(() => this.z(), this.f.default()); + this.a.add(this.n.onDidChangeModel(() => this.v())); + this.a.add(this.n.onDidChangeModelLanguage(() => this.v())); + this.a.add(this.n.onDidChangeConfiguration(a => { + if (a.hasChanged(52) || a.hasChanged(19) || a.hasChanged(18)) { + this.t(); + } + if (a.hasChanged(17)) { + this.v(); + } + })); + this.a.add(t.codeLensProvider.onDidChange(this.v, this)); + this.v(); + this.t(); + } + dispose() { + this.u(); + this.b.dispose(); + this.a.dispose(); + this.j.dispose(); + this.k?.dispose(); + } + s() { + const e = Math.max(1.3, this.n.getOption(68) / this.n.getOption(54)); + let t = this.n.getOption(19); + if (!t || t < 5) { + t = this.n.getOption(54) * 0.9 | 0; + } + return { + fontSize: t, + codeLensHeight: t * e | 0 + }; + } + t() { + const { + codeLensHeight: e, + fontSize: t + } = this.s(); + const s = this.n.getOption(18); + const n = this.n.getOption(52); + const { + style: r + } = this.n.getContainerDomNode(); + r.setProperty("--vscode-editorCodeLens-lineHeight", `${e}px`); + r.setProperty("--vscode-editorCodeLens-fontSize", `${t}px`); + r.setProperty("--vscode-editorCodeLens-fontFeatureSettings", n.fontFeatureSettings); + if (s) { + r.setProperty("--vscode-editorCodeLens-fontFamily", s); + r.setProperty("--vscode-editorCodeLens-fontFamilyDefault", Qf.fontFamily); + } + this.n.changeViewZones(o => { + for (const a of this.c) { + a.updateHeight(e, o); + } + }); + } + u() { + this.h?.cancel(); + this.h = undefined; + this.m?.cancel(); + this.m = undefined; + this.b.clear(); + this.j.clear(); + this.k?.dispose(); + } + v() { + this.u(); + const e = this.n.getModel(); + if (!e || !this.n.getOption(17) || e.isTooLargeForTokenization()) { + return; + } + const t = this.r.get(e); + if (t) { + this.x(t); + } + if (!this.o.codeLensProvider.has(e)) { + if (t) { + Gd(() => { + const n = this.r.get(e); + if (t === n) { + this.r.delete(e); + this.v(); + } + }, 30000, this.b); + } + return; + } + for (const n of this.o.codeLensProvider.all(e)) { + if (typeof n.onDidChange == "function") { + const r = n.onDidChange(() => s.schedule()); + this.b.add(r); + } + } + const s = new Vn(() => { + const n = Date.now(); + this.h?.cancel(); + this.h = ql(r => N4s(this.o.codeLensProvider, e, r)); + this.h.then(r => { + if (this.k) { + this.j.add(this.k); + } + this.k = r; + this.r.put(e, r); + const o = this.d.update(e, Date.now() - n); + s.delay = o; + this.x(r); + this.y(); + }, xs); + }, this.d.get(e)); + this.b.add(s); + this.b.add(Ue(() => this.g.cancel())); + this.b.add(this.n.onDidChangeModelContent(() => { + this.n.changeDecorations(n => { + this.n.changeViewZones(r => { + const o = []; + let a = -1; + this.c.forEach(c => { + if (!c.isValid() || a === c.getLineNumber()) { + o.push(c); + } else { + c.update(r); + a = c.getLineNumber(); + } + }); + const l = new hQt(); + o.forEach(c => { + c.dispose(l, r); + this.c.splice(this.c.indexOf(c), 1); + }); + l.commit(n); + }); + }); + s.schedule(); + this.g.cancel(); + this.m?.cancel(); + this.m = undefined; + })); + this.b.add(this.n.onDidFocusEditorText(() => { + s.schedule(); + })); + this.b.add(this.n.onDidBlurEditorText(() => { + s.cancel(); + })); + this.b.add(this.n.onDidScrollChange(n => { + if (n.scrollTopChanged && this.c.length > 0) { + this.y(); + } + })); + this.b.add(this.n.onDidLayoutChange(() => { + this.y(); + })); + this.b.add(Ue(() => { + if (this.n.getModel()) { + const n = fO.capture(this.n); + this.n.changeDecorations(r => { + this.n.changeViewZones(o => { + this.w(r, o); + }); + }); + n.restore(this.n); + } else { + this.w(undefined, undefined); + } + })); + this.b.add(this.n.onMouseDown(n => { + if (n.target.type !== 9) { + return; + } + let r = n.target.element; + if (r?.tagName === "SPAN") { + r = r.parentElement; + } + if (r?.tagName === "A") { + for (const o of this.c) { + const a = o.getCommand(r); + if (a) { + this.p.executeCommand(a.id, ...(a.arguments || [])).catch(l => this.q.error(l)); + break; + } + } + } + })); + s.schedule(); + } + w(e, t) { + const s = new hQt(); + for (const n of this.c) { + n.dispose(s, t); + } + if (e) { + s.commit(e); + } + this.c.length = 0; + } + x(e) { + if (!this.n.hasModel()) { + return; + } + const t = this.n.getModel().getLineCount(); + const s = []; + let n; + for (const a of e.lenses) { + const l = a.symbol.range.startLineNumber; + if (!(l < 1) && !(l > t)) { + if (n && n[n.length - 1].symbol.range.startLineNumber === l) { + n.push(a); + } else { + n = [a]; + s.push(n); + } + } + } + if (!s.length && !this.c.length) { + return; + } + const r = fO.capture(this.n); + const o = this.s(); + this.n.changeDecorations(a => { + this.n.changeViewZones(l => { + const c = new hQt(); + let u = 0; + let d = 0; + while (d < s.length && u < this.c.length) { + const h = s[d][0].symbol.range.startLineNumber; + const g = this.c[u].getLineNumber(); + if (g < h) { + this.c[u].dispose(c, l); + this.c.splice(u, 1); + } else if (g === h) { + this.c[u].updateCodeLensSymbols(s[d], c); + d++; + u++; + } else { + this.c.splice(u, 0, new F4s(s[d], this.n, c, l, o.codeLensHeight, () => this.y())); + u++; + d++; + } + } + while (u < this.c.length) { + this.c[u].dispose(c, l); + this.c.splice(u, 1); + } + while (d < s.length) { + this.c.push(new F4s(s[d], this.n, c, l, o.codeLensHeight, () => this.y())); + d++; + } + c.commit(a); + }); + }); + r.restore(this.n); + } + y() { + if (this.n.getModel()) { + this.g.schedule(); + } + } + z() { + this.m?.cancel(); + this.m = undefined; + const e = this.n.getModel(); + if (!e) { + return; + } + const t = []; + const s = []; + this.c.forEach(o => { + const a = o.computeIfNecessary(e); + if (a) { + t.push(a); + s.push(o); + } + }); + if (t.length === 0) { + return; + } + const n = Date.now(); + const r = ql(o => { + const a = t.map((l, c) => { + const u = new Array(l.length); + const d = l.map((h, g) => !h.symbol.command && typeof h.provider.resolveCodeLens == "function" ? Promise.resolve(h.provider.resolveCodeLens(e, h.symbol, o)).then(p => { + u[g] = p; + }, uh) : (u[g] = h.symbol, Promise.resolve(undefined))); + return Promise.all(d).then(() => { + if (!o.isCancellationRequested && !s[c].isDisposed()) { + s[c].updateCommands(u); + } + }); + }); + return Promise.all(a); + }); + this.m = r; + this.m.then(() => { + const o = this.f.update(e, Date.now() - n); + this.g.delay = o; + if (this.k) { + this.r.put(e, this.k); + } + this.j.clear(); + if (r === this.m) { + this.m = undefined; + } + }, o => { + xs(o); + if (r === this.m) { + this.m = undefined; + } + }); + } + async getModel() { + await this.h; + await this.m; + if (this.k?.isDisposed) { + return undefined; + } else { + return this.k; + } + } +}; +Mne = __decorate([__param(1, nn), __param(2, gE), __param(3, gt), __param(4, ni), __param(5, M4s)], Mne); +bo(Mne.ID, Mne, 1); +Oi(class extends Es { + constructor() { + super({ + id: "codelens.showLensesInCurrentLine", + precondition: ke.hasCodeLensProvider, + label: W(961, "Show CodeLens Commands For Current Line") + }); + } + async run(e, t) { + if (!t.hasModel()) { + return; + } + const s = e.get(zi); + const n = e.get(gt); + const r = e.get(ni); + const o = t.getSelection().positionLineNumber; + const a = t.getContribution(Mne.ID); + if (!a) { + return; + } + const l = await a.getModel(); + if (!l) { + return; + } + const c = []; + for (const h of l.lenses) { + if (h.symbol.command && h.symbol.range.startLineNumber === o) { + c.push({ + label: h.symbol.command.title, + command: h.symbol.command + }); + } + } + if (c.length === 0) { + return; + } + const u = await s.pick(c, { + canPickMany: false, + placeHolder: f(960, null) + }); + if (!u) { + return; + } + let d = u.command; + if (l.isDisposed) { + const g = (await a.getModel())?.lenses.find(p => p.symbol.range.startLineNumber === o && p.symbol.command?.title === d.title); + if (!g || !g.symbol.command) { + return; + } + d = g.symbol.command; + } + try { + await n.executeCommand(d.id, ...(d.arguments || [])); + } catch (h) { + r.error(h); + } + } +}); +ri(); +Ut(); +Le(); +Je(); +Wt(); +en(); +var O4s = []; +function hG(i) { + O4s.push(i); +} +function jhr() { + return O4s.slice(0); +} +var _4s; +(function (i) { + i[i.Range = 1] = "Range"; + i[i.ForeignElement = 2] = "ForeignElement"; +})(_4s ||= {}); +var fQt = class { + constructor(i, e, t, s) { + this.priority = i; + this.range = e; + this.initialMousePosX = t; + this.initialMousePosY = s; + this.type = 1; + } + equals(i) { + return i.type === 1 && this.range.equalsRange(i.range); + } + canAdoptVisibleHover(i, e) { + return i.type === 1 && e.lineNumber === this.range.startLineNumber; + } +}; +var $pt = class { + constructor(i, e, t, s, n, r) { + this.priority = i; + this.owner = e; + this.range = t; + this.initialMousePosX = s; + this.initialMousePosY = n; + this.supportsMarkerHover = r; + this.type = 2; + } + equals(i) { + return i.type === 2 && this.owner === i.owner; + } + canAdoptVisibleHover(i, e) { + return i.type === 2 && this.owner === i.owner; + } +}; +var B5 = class { + constructor(i) { + this.renderedHoverParts = i; + } + dispose() { + for (const i of this.renderedHoverParts) { + i.dispose(); + } + } +}; +var VU = new class { + constructor() { + this._participants = []; + } + register(e) { + this._participants.push(e); + } + getAll() { + return this._participants; + } +}(); +ri(); +Ut(); +Rn(); +Tr(); +Zo(); +q(); +Tr(); +var i0e = class { + constructor(e) { + this.a = e; + } + async provideDocumentColors(e, t) { + return this.a.computeDefaultDocumentColors(e.uri); + } + provideColorPresentations(e, t, s) { + const n = t.range; + const r = t.color; + const o = r.alpha; + const a = new ut(new Ti(Math.round(r.red * 255), Math.round(r.green * 255), Math.round(r.blue * 255), o)); + const l = o ? ut.Format.CSS.formatRGB(a) : ut.Format.CSS.formatRGBA(a); + const c = o ? ut.Format.CSS.formatHSL(a) : ut.Format.CSS.formatHSLA(a); + const u = o ? ut.Format.CSS.formatHex(a) : ut.Format.CSS.formatHexA(a); + const d = []; + d.push({ + label: l, + textEdit: { + range: n, + text: l + } + }); + d.push({ + label: c, + textEdit: { + range: n, + text: c + } + }); + d.push({ + label: u, + textEdit: { + range: n, + text: u + } + }); + return d; + } +}; +i0e = __decorate([__param(0, Fu)], i0e); +var gQt = class extends H { + constructor(e, t) { + super(); + this.D(e.colorProvider.register("*", new i0e(t))); + } +}; +gQt = __decorate([__param(0, nn), __param(1, Fu)], gQt); +Me(); +async function B4s(i, e, t, s = "auto") { + return pQt(new zhr(), i, e, t, s); +} +function U4s(i, e, t, s) { + return Promise.resolve(t.provideColorPresentations(i, e, s)); +} +var zhr = class { + constructor() {} + async compute(i, e, t, s) { + const n = await i.provideDocumentColors(e, t); + if (Array.isArray(n)) { + for (const r of n) { + s.push({ + colorInfo: r, + provider: i + }); + } + } + return Array.isArray(n); + } +}; +var Jhr = class { + constructor() {} + async compute(i, e, t, s) { + const n = await i.provideDocumentColors(e, t); + if (Array.isArray(n)) { + for (const r of n) { + s.push({ + range: r.range, + color: [r.color.red, r.color.green, r.color.blue, r.color.alpha] + }); + } + } + return Array.isArray(n); + } +}; +var Ghr = class { + constructor(i) { + this.a = i; + } + async compute(i, e, t, s) { + const n = await i.provideColorPresentations(e, this.a, mt.None); + if (Array.isArray(n)) { + s.push(...n); + } + return Array.isArray(n); + } +}; +async function pQt(i, e, t, s, n) { + let r = false; + let o; + const a = []; + const l = e.ordered(t); + for (let c = l.length - 1; c >= 0; c--) { + const u = l[c]; + if (n !== "always" && u instanceof i0e) { + o = u; + } else { + try { + if (await i.compute(u, t, s, a)) { + r = true; + } + } catch (d) { + uh(d); + } + } + } + if (r) { + return a; + } else if (o && n !== "never") { + await i.compute(o, t, s, a); + return a; + } else { + return []; + } +} +function W4s(i, e) { + const { + colorProvider: t + } = i.get(nn); + const s = i.get($s).getModel(e); + if (!s) { + throw Hl(); + } + const n = i.get(ve).getValue("editor.defaultColorDecorators", { + resource: e + }); + return { + model: s, + colorProviderRegistry: t, + defaultColorDecoratorsEnablement: n + }; +} +nt(); +Zo(); +Ut(); +pe(); +q(); +fd(); +$i(); +ope(); +yt(); +Ya(); +mR(); +Tr(); +Me(); +var mQt; +var V4s = Object.create({}); +var U5 = class extends H { + static { + mQt = this; + } + static { + this.ID = "editor.contrib.colorDetector"; + } + static { + this.RECOMPUTE_TIME = 1000; + } + constructor(e, t, s, n) { + super(); + this.z = e; + this.C = t; + this.F = s; + this.f = this.D(new Q()); + this.n = []; + this.q = new Map(); + this.s = this.z.createDecorationsCollection(); + this.w = new w3t(this.z); + this.y = new Khr(); + this.L = this.D(new Q()); + this.m = n.for(s.colorProvider, "Document Colors", { + min: mQt.RECOMPUTE_TIME + }); + this.D(e.onDidChangeModel(() => { + this.t = this.isEnabled(); + this.G(); + })); + this.D(e.onDidChangeModelLanguage(() => this.G())); + this.D(s.colorProvider.onDidChange(() => this.G())); + this.D(e.onDidChangeConfiguration(r => { + const o = this.t; + this.t = this.isEnabled(); + this.u = this.z.getOption(153); + const a = o !== this.t || r.hasChanged(21); + const l = r.hasChanged(153); + if (a || l) { + if (this.t) { + this.G(); + } else { + this.N(); + } + } + })); + this.j = null; + this.h = null; + this.t = this.isEnabled(); + this.u = this.z.getOption(153); + this.G(); + } + isEnabled() { + const e = this.z.getModel(); + if (!e) { + return false; + } + const t = e.getLanguageId(); + const s = this.C.getValue(t); + if (s && typeof s == "object") { + const n = s.colorDecorators; + if (n && n.enable !== undefined && !n.enable) { + return n.enable; + } + } + return this.z.getOption(20); + } + get limitReporter() { + return this.y; + } + static get(e) { + return e.getContribution(this.ID); + } + dispose() { + this.I(); + this.N(); + super.dispose(); + } + G() { + this.I(); + if (!this.t) { + return; + } + const e = this.z.getModel(); + if (!!e && !!this.F.colorProvider.has(e)) { + this.f.add(this.z.onDidChangeModelContent(() => { + if (!this.j) { + this.j = new qC(); + this.j.cancelAndSet(() => { + this.j = null; + this.H(); + }, this.m.get(e)); + } + })); + this.H(); + } + } + async H() { + this.h = ql(async e => { + const t = this.z.getModel(); + if (!t) { + return []; + } + const s = new ic(false); + const n = await B4s(this.F.colorProvider, t, e, this.u); + this.m.update(t, s.elapsed()); + return n; + }); + try { + const e = await this.h; + this.J(e); + this.M(e); + this.h = null; + } catch (e) { + xs(e); + } + } + I() { + if (this.j) { + this.j.cancel(); + this.j = null; + } + if (this.h) { + this.h.cancel(); + this.h = null; + } + this.f.clear(); + } + J(e) { + const t = e.map(s => ({ + range: { + startLineNumber: s.colorInfo.range.startLineNumber, + startColumn: s.colorInfo.range.startColumn, + endLineNumber: s.colorInfo.range.endLineNumber, + endColumn: s.colorInfo.range.endColumn + }, + options: Cr.EMPTY + })); + this.z.changeDecorations(s => { + this.n = s.deltaDecorations(this.n, t); + this.q = new Map(); + this.n.forEach((n, r) => this.q.set(n, e[r])); + }); + } + M(e) { + this.L.clear(); + const t = []; + const s = this.z.getOption(21); + for (let r = 0; r < e.length && t.length < s; r++) { + const { + red: o, + green: a, + blue: l, + alpha: c + } = e[r].colorInfo.color; + const u = new Ti(Math.round(o * 255), Math.round(a * 255), Math.round(l * 255), c); + const d = `rgba(${u.r}, ${u.g}, ${u.b}, ${u.a})`; + const h = this.L.add(this.w.createClassNameRef({ + backgroundColor: d + })); + t.push({ + range: { + startLineNumber: e[r].colorInfo.range.startLineNumber, + startColumn: e[r].colorInfo.range.startColumn, + endLineNumber: e[r].colorInfo.range.endLineNumber, + endColumn: e[r].colorInfo.range.endColumn + }, + options: { + description: "colorDetector", + before: { + content: s9, + inlineClassName: `${h.className} colorpicker-color-decoration`, + inlineClassNameAffectsLetterSpacing: true, + attachedData: V4s + } + } + }); + } + const n = s < e.length ? s : false; + this.y.update(e.length, n); + this.s.set(t); + } + N() { + this.z.removeDecorations(this.n); + this.n = []; + this.s.clear(); + this.L.clear(); + } + getColorData(e) { + const t = this.z.getModel(); + if (!t) { + return null; + } + const s = t.getDecorationsInRange(Z.fromPositions(e, e)).filter(n => this.q.has(n.id)); + if (s.length === 0) { + return null; + } else { + return this.q.get(s[0].id); + } + } + isColorDecoration(e) { + return this.s.has(e); + } +}; +U5 = mQt = __decorate([__param(1, ve), __param(2, nn), __param(3, gE)], U5); +var Khr = class { + constructor() { + this.f = new B(); + this.onDidChange = this.f.event; + this.h = 0; + this.j = false; + } + get computed() { + return this.h; + } + get limited() { + return this.j; + } + update(i, e) { + if (i !== this.h || e !== this.j) { + this.h = i; + this.j = e; + this.f.fire(); + } + } +}; +q(); +yt(); +X(); +var H4s = "editor.action.showHover"; +var Yhr = "editor.action.showDefinitionPreviewHover"; +var Xhr = "editor.action.scrollUpHover"; +var Qhr = "editor.action.scrollDownHover"; +var Zhr = "editor.action.scrollLeftHover"; +var efr = "editor.action.scrollRightHover"; +var tfr = "editor.action.pageUpHover"; +var ifr = "editor.action.pageDownHover"; +var sfr = "editor.action.goToTopHover"; +var nfr = "editor.action.goToBottomHover"; +var Ane = "editor.action.increaseHoverVerbosityLevel"; +var rfr = "editor.action.increaseHoverVerbosityLevelFromAccessibleView"; +var ofr = f(1188, null); +var $ne = "editor.action.decreaseHoverVerbosityLevel"; +var afr = "editor.action.decreaseHoverVerbosityLevelFromAccessibleView"; +var lfr = f(1189, null); +q(); +te(); +xe(); +zh(); +LF(); +Fs(); +Jt(); +nt(); +He(); +q(); +An(); +rt(); +Rt(); +X(); +Je(); +Wt(); +Ee(); +ks(); +te(); +Fi(); +ai(); +Br(); +Rs(); +Eo(); +var q4s = "editor.action.inlineSuggest.commit"; +var j4s = "editor.action.inlineSuggest.showPrevious"; +var z4s = "editor.action.inlineSuggest.showNext"; +var Fpt; +var bQt = class extends H { + constructor(e, t, s) { + super(); + this.n = e; + this.q = t; + this.r = s; + this.f = Ro(this, this.n.onDidChangeConfiguration, () => this.n.getOption(64).showToolbar === "always"); + this.j = undefined; + this.m = Is(this, n => { + const r = this.q.read(n)?.primaryGhostText.read(n); + if (!this.f.read(n) || !r || r.parts.length === 0) { + this.j = undefined; + return null; + } + const o = r.parts[0].column; + if (this.j && this.j.lineNumber !== r.lineNumber) { + this.j = undefined; + } + const a = new je(r.lineNumber, Math.min(o, this.j?.column ?? Number.MAX_SAFE_INTEGER)); + this.j = a; + return a; + }); + this.D(eh((n, r) => { + const o = this.q.read(n); + if (!o || !this.f.read(n)) { + return; + } + const a = w4((c, u) => { + const d = u.add(this.r.createInstance(Fne, this.n, true, this.m, o.selectedInlineCompletionIndex, o.inlineCompletionsCount, o.activeCommands)); + e.addContentWidget(d); + u.add(Ue(() => e.removeContentWidget(d))); + u.add(Dn(h => { + if (this.m.read(h) && o.lastTriggerKind.read(h) !== kM.Explicit) { + o.triggerExplicitly(); + } + })); + return d; + }); + const l = Fte(this, (c, u) => !!this.m.read(c) || !!u); + r.add(Dn(c => { + if (l.read(c)) { + a.read(c); + } + })); + })); + } +}; +bQt = __decorate([__param(2, re)], bQt); +var cfr = dt("inline-suggestion-hints-next", A.chevronRight, f(1286, null)); +var ufr = dt("inline-suggestion-hints-previous", A.chevronLeft, f(1287, null)); +var Fne = class extends H { + static { + Fpt = this; + } + static { + this.f = false; + } + static get dropDownVisible() { + return this.f; + } + static { + this.id = 0; + } + n(e, t, s) { + const n = new Yt(e, t, s, true, () => this.J.executeCommand(e)); + const r = this.L.lookupKeybinding(e, this.M); + let o = t; + if (r) { + o = f(1288, null, t, r.getLabel()); + } + n.tooltip = o; + return n; + } + constructor(e, t, s, n, r, o, a, l, c, u, d) { + super(); + this.z = e; + this.C = t; + this.F = s; + this.G = n; + this.H = r; + this.I = o; + this.J = a; + this.L = c; + this.M = u; + this.N = d; + this.j = `InlineSuggestionHintsContentWidget${Fpt.id++}`; + this.allowEditorOverflow = true; + this.suppressMouseDown = false; + this.m = Ts("div.inlineSuggestionsHints", { + className: this.C ? ".withBorder" : "" + }, [Ts("div@toolBar")]); + this.q = this.D(this.n(j4s, f(1289, null), le.asClassName(ufr))); + this.r = this.D(new Yt("inlineSuggestionHints.availableSuggestionCount", "", undefined, false)); + this.s = this.D(this.n(z4s, f(1290, null), le.asClassName(cfr))); + this.u = this.D(this.N.createMenu(_.InlineCompletionsActions, this.M)); + this.w = this.D(new Vn(() => { + this.r.label = ""; + }, 100)); + this.y = this.D(new Vn(() => { + this.q.enabled = this.s.enabled = false; + }, 100)); + this.t = this.D(l.createInstance(Opt, this.m.toolBar, _.InlineSuggestionToolbar, { + menuOptions: { + renderShortTitle: true + }, + toolbarOptions: { + primaryGroup: h => h.startsWith("primary") + }, + actionViewItemProvider: (h, g) => { + if (h instanceof Ma) { + return l.createInstance(hfr, h, undefined); + } + if (h === this.r) { + const p = new dfr(undefined, h, { + label: true, + icon: false + }); + p.setClass("availableSuggestionCount"); + return p; + } + }, + telemetrySource: "InlineSuggestionToolbar" + })); + this.t.setPrependedPrimaryActions([this.q, this.r, this.s]); + this.D(this.t.onDidChangeDropdownVisibility(h => { + Fpt.f = h; + })); + this.D(Dn(h => { + this.F.read(h); + this.z.layoutContentWidget(this); + })); + this.D(Dn(h => { + const g = this.H.read(h); + const p = this.G.read(h); + if (g !== undefined) { + this.w.cancel(); + this.r.label = `${p + 1}/${g}`; + } else { + this.w.schedule(); + } + if (g !== undefined && g > 1) { + this.y.cancel(); + this.q.enabled = this.s.enabled = true; + } else { + this.y.schedule(); + } + })); + this.D(Dn(h => { + const p = this.I.read(h).map(b => ({ + class: undefined, + id: b.id, + enabled: true, + tooltip: b.tooltip || "", + label: b.title, + run: v => this.J.executeCommand(b.id) + })); + for (const [b, v] of this.u.getActions()) { + for (const y of v) { + if (y instanceof Ma) { + p.push(y); + } + } + } + if (p.length > 0) { + p.unshift(new gr()); + } + this.t.setAdditionalSecondaryActions(p); + })); + } + getId() { + return this.j; + } + getDomNode() { + return this.m.root; + } + getPosition() { + return { + position: this.F.get(), + preference: [1, 2], + positionAffinity: 3 + }; + } +}; +Fne = Fpt = __decorate([__param(6, gt), __param(7, re), __param(8, oi), __param(9, Ne), __param(10, Hn)], Fne); +var dfr = class extends $f { + constructor() { + super(...arguments); + this.m = undefined; + } + setClass(i) { + this.m = i; + } + render(i) { + super.render(i); + if (this.m) { + i.classList.add(this.m); + } + } + G() {} +}; +var hfr = class extends Eb { + z() { + const i = this.bb.lookupKeybinding(this._action.id, this.db, true); + if (!i) { + return super.z(); + } + if (this.L) { + const e = Ts("div.keybinding").root; + this.D(new oR(e, Ia, { + disableTitle: true, + ...SVt + })).set(i); + this.L.textContent = this._action.label; + this.L.appendChild(e); + this.L.classList.add("inlineSuggestionStatusBarItemLabel"); + } + } + G() {} +}; +var Opt = class extends Dp { + constructor(e, t, s, n, r, o, a, l, c) { + super(e, { + resetMenu: t, + ...s + }, n, r, o, a, l, c); + this.P = t; + this.Q = s; + this.R = n; + this.S = r; + this.j = this.B.add(this.R.createMenu(this.P, this.S, { + emitEventsForSubmenuChanges: true + })); + this.r = []; + this.s = []; + this.O = []; + this.B.add(this.j.onDidChange(() => this.U())); + this.U(); + } + U() { + const { + primary: e, + secondary: t + } = km(this.j.getActions(this.Q?.menuOptions), this.Q?.toolbarOptions?.primaryGroup, this.Q?.toolbarOptions?.shouldInlineSubmenu, this.Q?.toolbarOptions?.useSeparatorsInPrimaryActions); + t.push(...this.r); + e.unshift(...this.s); + e.push(...this.O); + this.setActions(e, t); + } + setPrependedPrimaryActions(e) { + if (!Go(this.s, e, (t, s) => t === s)) { + this.s = e; + this.U(); + } + } + setAdditionalPrimaryActions(e) { + if (!Go(this.O, e, (t, s) => t === s)) { + this.O = e; + this.U(); + } + } + setAdditionalSecondaryActions(e) { + if (!Go(this.r, e, (t, s) => t === s)) { + this.r = e; + this.U(); + } + } +}; +Opt = __decorate([__param(3, Hn), __param(4, Ne), __param(5, ts), __param(6, oi), __param(7, gt), __param(8, Ot)], Opt); +Fi(); +nt(); +xe(); +function _pt(i, e, t) { + const s = sd(i); + return !(e < s.left) && !(e > s.left + s.width) && !(t < s.top) && !(t > s.top + s.height); +} +xe(); +q(); +Eo(); +nt(); +Ut(); +pe(); +q(); +var J4s; +(function (i) { + i[i.Idle = 0] = "Idle"; + i[i.FirstWait = 1] = "FirstWait"; + i[i.SecondWait = 2] = "SecondWait"; + i[i.WaitingForAsync = 3] = "WaitingForAsync"; + i[i.WaitingForAsyncShowingLoading = 4] = "WaitingForAsyncShowingLoading"; +})(J4s ||= {}); +var G4s; +(function (i) { + i[i.Delayed = 0] = "Delayed"; + i[i.Immediate = 1] = "Immediate"; +})(G4s ||= {}); +var K4s; +(function (i) { + i[i.Mouse = 0] = "Mouse"; + i[i.Click = 1] = "Click"; + i[i.Keyboard = 2] = "Keyboard"; +})(K4s ||= {}); +var ffr = class { + constructor(i, e, t, s) { + this.value = i; + this.isComplete = e; + this.hasLoadingMessage = t; + this.options = s; + } +}; +var Y4s = class extends H { + constructor(i, e) { + super(); + this.q = i; + this.r = e; + this.a = this.D(new B()); + this.onResult = this.a.event; + this.b = this.D(new vQt(t => this.z(t), 0)); + this.c = this.D(new vQt(t => this.C(t), 0)); + this.f = this.D(new vQt(t => this.F(t), 0)); + this.g = 0; + this.h = null; + this.j = false; + this.m = []; + } + dispose() { + if (this.h) { + this.h.cancel(); + this.h = null; + } + this.n = undefined; + super.dispose(); + } + get s() { + return this.q.getOption(62).delay; + } + get t() { + return this.s / 2; + } + get u() { + return this.s - this.t; + } + get w() { + return this.s * 3; + } + y(i, e) { + this.g = i; + this.G(e); + } + z(i) { + this.y(2, i); + this.c.schedule(i, this.u); + if (this.r.computeAsync) { + this.j = false; + this.h = SHn(e => this.r.computeAsync(i, e)); + (async () => { + try { + for await (const e of this.h) { + if (e) { + this.m.push(e); + this.G(i); + } + } + this.j = true; + if (this.g === 3 || this.g === 4) { + this.y(0, i); + } + } catch (e) { + xs(e); + } + })(); + } else { + this.j = true; + } + } + C(i) { + if (this.r.computeSync) { + this.m = this.m.concat(this.r.computeSync(i)); + } + this.y(this.j ? 0 : 3, i); + } + F(i) { + if (this.g === 3) { + this.y(4, i); + } + } + G(i) { + if (this.g === 1 || this.g === 2) { + return; + } + const e = this.g === 0; + const t = this.g === 4; + this.a.fire(new ffr(this.m.slice(0), e, t, i)); + } + start(i, e) { + if (i === 0) { + if (this.g === 0) { + this.y(1, e); + this.b.schedule(e, this.t); + this.f.schedule(e, this.w); + } + } else { + switch (this.g) { + case 0: + this.z(e); + this.c.cancel(); + this.C(e); + break; + case 2: + this.c.cancel(); + this.C(e); + break; + } + } + } + cancel() { + this.b.cancel(); + this.c.cancel(); + this.f.cancel(); + if (this.h) { + this.h.cancel(); + this.h = null; + } + this.m = []; + this.n = undefined; + this.g = 0; + } + get options() { + return this.n; + } +}; +var vQt = class extends H { + constructor(i, e) { + super(); + this.a = this.D(new Vn(() => i(this.b), e)); + } + schedule(i, e) { + this.b = i; + this.a.schedule(e); + } + cancel() { + this.a.cancel(); + } +}; +te(); +Fi(); +xe(); +Fi(); +xe(); +pe(); +q(); +var Bpt = class { + constructor() { + this.a = new B(); + this.onDidWillResize = this.a.event; + this.b = new B(); + this.onDidResize = this.b.event; + this.h = new Q(); + this.i = new Ln(0, 0); + this.j = new Ln(0, 0); + this.k = new Ln(Number.MAX_SAFE_INTEGER, Number.MAX_SAFE_INTEGER); + this.domNode = document.createElement("div"); + this.d = new IR(this.domNode, { + getVerticalSashLeft: () => this.i.width + }, { + orientation: 0 + }); + this.g = new IR(this.domNode, { + getVerticalSashLeft: () => 0 + }, { + orientation: 0 + }); + this.c = new IR(this.domNode, { + getHorizontalSashTop: () => 0 + }, { + orientation: 1, + orthogonalEdge: kpt.North + }); + this.f = new IR(this.domNode, { + getHorizontalSashTop: () => this.i.height + }, { + orientation: 1, + orthogonalEdge: kpt.South + }); + this.c.orthogonalStartSash = this.g; + this.c.orthogonalEndSash = this.d; + this.f.orthogonalStartSash = this.g; + this.f.orthogonalEndSash = this.d; + let i; + let e = 0; + let t = 0; + this.h.add(de.any(this.c.onDidStart, this.d.onDidStart, this.f.onDidStart, this.g.onDidStart)(() => { + if (i === undefined) { + this.a.fire(); + i = this.i; + e = 0; + t = 0; + } + })); + this.h.add(de.any(this.c.onDidEnd, this.d.onDidEnd, this.f.onDidEnd, this.g.onDidEnd)(() => { + if (i !== undefined) { + i = undefined; + e = 0; + t = 0; + this.b.fire({ + dimension: this.i, + done: true + }); + } + })); + this.h.add(this.d.onDidChange(s => { + if (i) { + t = s.currentX - s.startX; + this.layout(i.height + e, i.width + t); + this.b.fire({ + dimension: this.i, + done: false, + east: true + }); + } + })); + this.h.add(this.g.onDidChange(s => { + if (i) { + t = -(s.currentX - s.startX); + this.layout(i.height + e, i.width + t); + this.b.fire({ + dimension: this.i, + done: false, + west: true + }); + } + })); + this.h.add(this.c.onDidChange(s => { + if (i) { + e = -(s.currentY - s.startY); + this.layout(i.height + e, i.width + t); + this.b.fire({ + dimension: this.i, + done: false, + north: true + }); + } + })); + this.h.add(this.f.onDidChange(s => { + if (i) { + e = s.currentY - s.startY; + this.layout(i.height + e, i.width + t); + this.b.fire({ + dimension: this.i, + done: false, + south: true + }); + } + })); + this.h.add(de.any(this.d.onDidReset, this.g.onDidReset)(s => { + if (this.l) { + this.layout(this.i.height, this.l.width); + this.b.fire({ + dimension: this.i, + done: true + }); + } + })); + this.h.add(de.any(this.c.onDidReset, this.f.onDidReset)(s => { + if (this.l) { + this.layout(this.l.height, this.i.width); + this.b.fire({ + dimension: this.i, + done: true + }); + } + })); + } + dispose() { + this.c.dispose(); + this.f.dispose(); + this.d.dispose(); + this.g.dispose(); + this.h.dispose(); + this.b.dispose(); + this.a.dispose(); + this.domNode.remove(); + } + enableSashes(i, e, t, s) { + this.c.state = i ? 3 : 0; + this.d.state = e ? 3 : 0; + this.f.state = t ? 3 : 0; + this.g.state = s ? 3 : 0; + } + layout(i = this.size.height, e = this.size.width) { + const { + height: t, + width: s + } = this.j; + const { + height: n, + width: r + } = this.k; + i = Math.max(t, Math.min(n, i)); + e = Math.max(s, Math.min(r, e)); + const o = new Ln(e, i); + if (!Ln.equals(o, this.i)) { + this.domNode.style.height = i + "px"; + this.domNode.style.width = e + "px"; + this.i = o; + this.c.layout(); + this.d.layout(); + this.f.layout(); + this.g.layout(); + } + } + clearSashHoverState() { + this.d.clearSashHoverState(); + this.g.clearSashHoverState(); + this.c.clearSashHoverState(); + this.f.clearSashHoverState(); + } + get size() { + return this.i; + } + set maxSize(i) { + this.k = i; + } + get maxSize() { + return this.k; + } + set minSize(i) { + this.j = i; + } + get minSize() { + return this.j; + } + set preferredSize(i) { + this.l = i; + } + get preferredSize() { + return this.l; + } +}; +q(); +Rs(); +xe(); +var gfr = 30; +var pfr = 24; +var mfr = class extends H { + constructor(i, e = new Ln(10, 10)) { + super(); + this.f = i; + this.allowEditorOverflow = true; + this.suppressMouseDown = false; + this.a = this.D(new Bpt()); + this.b = null; + this.c = false; + this.a.domNode.style.position = "absolute"; + this.a.minSize = Ln.lift(e); + this.a.layout(e.height, e.width); + this.a.enableSashes(true, true, true, true); + this.D(this.a.onDidResize(t => { + this.m(new Ln(t.dimension.width, t.dimension.height)); + if (t.done) { + this.c = false; + } + })); + this.D(this.a.onDidWillResize(() => { + this.c = true; + })); + } + get isResizing() { + return this.c; + } + getDomNode() { + return this.a.domNode; + } + getPosition() { + return this.b; + } + get position() { + if (this.b?.position) { + return je.lift(this.b.position); + } else { + return undefined; + } + } + g(i) { + const e = this.f.getDomNode(); + const t = this.f.getScrolledVisiblePosition(i); + if (!e || !t) { + return undefined; + } else { + return sd(e).top + t.top - gfr; + } + } + h(i) { + const e = this.f.getDomNode(); + const t = this.f.getScrolledVisiblePosition(i); + if (!e || !t) { + return; + } + const s = sd(e); + const n = zk(e.ownerDocument.body); + const r = s.top + t.top + t.height; + return n.height - r - pfr; + } + j(i, e) { + const t = Math.min(this.h(e) ?? Infinity, i); + const s = Math.min(this.g(e) ?? Infinity, i); + const n = Math.min(Math.max(s, t), i); + const r = Math.min(i, n); + let o; + if (this.f.getOption(62).above) { + o = r <= s ? 1 : 2; + } else { + o = r <= t ? 2 : 1; + } + if (o === 1) { + this.a.enableSashes(true, true, false, false); + } else { + this.a.enableSashes(false, true, true, false); + } + return o; + } + m(i) { + this.a.layout(i.height, i.width); + } +}; +Ee(); +Me(); +Ho(); +Sr(); +xe(); +_a(); +Kg(); +q(); +X(); +var Upt = G; +var X4s; +(function (i) { + i[i.LEFT = 0] = "LEFT"; + i[i.RIGHT = 1] = "RIGHT"; + i[i.BELOW = 2] = "BELOW"; + i[i.ABOVE = 3] = "ABOVE"; +})(X4s ||= {}); +var yQt = class extends H { + constructor(i) { + super(); + this.containerDomNode = document.createElement("div"); + this.containerDomNode.className = "monaco-hover"; + this.containerDomNode.classList.toggle("fade-in", !!i); + this.containerDomNode.tabIndex = 0; + this.containerDomNode.setAttribute("role", "tooltip"); + this.contentsDomNode = document.createElement("div"); + this.contentsDomNode.className = "monaco-hover-content"; + this.scrollbar = this.D(new _w(this.contentsDomNode, { + consumeMouseWheelIfScrollbarIsNeeded: true + })); + this.containerDomNode.appendChild(this.scrollbar.getDomNode()); + } + onContentsChanged() { + this.scrollbar.scanDomNode(); + } +}; +var wQt = class s_n extends H { + static render(e, t, s) { + return new s_n(e, t, s); + } + constructor(e, t, s) { + super(); + this.actionLabel = t.label; + this.actionKeybindingLabel = s; + this.actionContainer = z(e, Upt("div.action-container")); + this.actionContainer.setAttribute("tabindex", "0"); + this.a = z(this.actionContainer, Upt("a.action")); + this.a.setAttribute("role", "button"); + if (t.iconClass) { + z(this.a, Upt(`span.icon.${t.iconClass}`)); + } + this.actionRenderedLabel = s ? `${t.label} (${s})` : t.label; + const n = z(this.a, Upt("span")); + n.textContent = this.actionRenderedLabel; + this.B.add(new Z4s(this.actionContainer, t.run)); + this.B.add(new e5s(this.actionContainer, t.run, [3, 10])); + this.setEnabled(true); + } + setEnabled(e) { + if (e) { + this.actionContainer.classList.remove("disabled"); + this.actionContainer.removeAttribute("aria-disabled"); + } else { + this.actionContainer.classList.add("disabled"); + this.actionContainer.setAttribute("aria-disabled", "true"); + } + } +}; +function Q4s(i, e) { + if (i && e) { + return f(15, null, e); + } else if (i) { + return f(16, null); + } else { + return ""; + } +} +var Z4s = class extends H { + constructor(i, e) { + super(); + this.D(Ce(i, Oe.CLICK, t => { + t.stopPropagation(); + t.preventDefault(); + e(i); + })); + } +}; +var e5s = class extends H { + constructor(i, e, t) { + super(); + this.D(Ce(i, Oe.KEY_DOWN, s => { + const n = new wr(s); + if (t.some(r => n.equals(r))) { + s.stopPropagation(); + s.preventDefault(); + e(i); + } + })); + } +}; +pe(); +var vO; +var t5s = 30; +var bfr = 6; +var CQt = class extends mfr { + static { + vO = this; + } + static { + this.ID = "editor.contrib.resizableContentHoverWidget"; + } + static { + this.n = new Ln(0, 0); + } + get isVisibleFromKeyboard() { + return this.q?.source === 2; + } + get isVisible() { + return this.w.get() ?? false; + } + get isFocused() { + return this.z.get() ?? false; + } + constructor(e, t, s, n, r) { + const o = e.getOption(68) + 8; + const a = 150; + const l = new Ln(a, o); + super(e, l); + this.F = s; + this.G = n; + this.H = r; + this.u = this.D(new yQt(true)); + this.C = this.D(new B()); + this.onDidResize = this.C.event; + this.s = l; + this.w = ke.hoverVisible.bindTo(t); + this.z = ke.hoverFocused.bindTo(t); + z(this.a.domNode, this.u.containerDomNode); + this.a.domNode.style.zIndex = "50"; + this.D(this.f.onDidLayoutChange(() => { + if (this.isVisible) { + this.bb(); + } + })); + this.D(this.f.onDidChangeConfiguration(u => { + if (u.hasChanged(52)) { + this.Z(); + } + })); + const c = this.D(Pu(this.a.domNode)); + this.D(c.onDidFocus(() => { + this.z.set(true); + })); + this.D(c.onDidBlur(() => { + this.z.set(false); + })); + this.Y(undefined); + this.f.addContentWidget(this); + } + dispose() { + super.dispose(); + this.q?.dispose(); + this.f.removeContentWidget(this); + } + getId() { + return vO.ID; + } + static I(e, t, s) { + const n = typeof t == "number" ? `${t}px` : t; + const r = typeof s == "number" ? `${s}px` : s; + e.style.width = n; + e.style.height = r; + } + J(e, t) { + const s = this.u.contentsDomNode; + return vO.I(s, e, t); + } + L(e, t) { + const s = this.u.containerDomNode; + return vO.I(s, e, t); + } + M(e, t) { + this.J(e, t); + this.L(e, t); + this.ab(); + } + static N(e, t, s) { + const n = typeof t == "number" ? `${t}px` : t; + const r = typeof s == "number" ? `${s}px` : s; + e.style.maxWidth = n; + e.style.maxHeight = r; + } + O(e, t) { + vO.N(this.u.contentsDomNode, e, t); + vO.N(this.u.containerDomNode, e, t); + this.u.containerDomNode.style.setProperty("--vscode-hover-maxWidth", typeof e == "number" ? `${e}px` : e); + this.ab(); + } + P(e) { + this.O("none", "none"); + const t = e.width; + const s = e.height; + this.M(t, s); + } + Q() { + const e = this.X() ?? Infinity; + const t = this.U() ?? Infinity; + this.a.maxSize = new Ln(e, t); + this.O(e, t); + } + m(e) { + vO.n = new Ln(e.width, e.height); + this.P(e); + this.a.layout(e.height, e.width); + this.Q(); + this.u.scrollbar.scanDomNode(); + this.f.layoutContentWidget(this); + this.C.fire(); + } + S() { + const e = this.q?.showAtPosition; + if (e) { + if (this.r === 1) { + return this.g(e); + } else { + return this.h(e); + } + } + } + U() { + const e = this.S(); + if (!e) { + return; + } + let t = bfr; + Array.from(this.u.contentsDomNode.children).forEach(s => { + t += s.clientHeight; + }); + return Math.min(e, t); + } + W() { + this.u.containerDomNode.style.setProperty("--vscode-hover-whiteSpace", "nowrap"); + this.u.containerDomNode.style.setProperty("--vscode-hover-sourceWhiteSpace", "nowrap"); + const e = Array.from(this.u.contentsDomNode.children).some(t => t.scrollWidth > t.clientWidth); + this.u.containerDomNode.style.removeProperty("--vscode-hover-whiteSpace"); + this.u.containerDomNode.style.removeProperty("--vscode-hover-sourceWhiteSpace"); + return e; + } + X() { + if (!this.f || !this.f.hasModel()) { + return; + } + const e = this.W(); + const t = typeof this.t === "undefined" ? 0 : this.t - 2; + if (e || this.u.containerDomNode.clientWidth < t) { + return zk(this.u.containerDomNode.ownerDocument.body).width - 14; + } else { + return this.u.containerDomNode.clientWidth + 2; + } + } + isMouseGettingCloser(e, t) { + if (!this.q) { + return false; + } + if (this.q.initialMousePosX === undefined || this.q.initialMousePosY === undefined) { + this.q.initialMousePosX = e; + this.q.initialMousePosY = t; + return false; + } + const s = sd(this.getDomNode()); + if (this.q.closestMouseDistance === undefined) { + this.q.closestMouseDistance = i5s(this.q.initialMousePosX, this.q.initialMousePosY, s.left, s.top, s.width, s.height); + } + const n = i5s(e, t, s.left, s.top, s.width, s.height); + if (n > this.q.closestMouseDistance + 4) { + return false; + } else { + this.q.closestMouseDistance = Math.min(this.q.closestMouseDistance, n); + return true; + } + } + Y(e) { + this.q?.dispose(); + this.q = e; + this.w.set(!!e); + this.u.containerDomNode.classList.toggle("hidden", !e); + } + Z() { + const { + fontSize: e, + lineHeight: t + } = this.f.getOption(52); + const s = this.u.contentsDomNode; + s.style.fontSize = `${e}px`; + s.style.lineHeight = `${t / e}`; + Array.prototype.slice.call(this.u.contentsDomNode.getElementsByClassName("code")).forEach(r => this.f.applyFontInfo(r)); + } + $(e) { + const t = this.u.contentsDomNode; + t.style.paddingBottom = ""; + t.textContent = ""; + t.appendChild(e); + } + ab() { + this.f.layoutContentWidget(this); + this.u.onContentsChanged(); + } + bb() { + const e = Math.max(this.f.getLayoutInfo().height / 4, 250, vO.n.height); + const t = Math.max(this.f.getLayoutInfo().width * 0.66, 750, vO.n.width); + this.O(t, e); + } + cb(e) { + this.Y(e); + this.Z(); + this.$(e.domNode); + this.bb(); + this.onContentsChanged(); + this.f.render(); + } + getPosition() { + if (this.q) { + return { + position: this.q.showAtPosition, + secondaryPosition: this.q.showAtSecondaryPosition, + positionAffinity: this.q.shouldAppearBeforeContent ? 3 : undefined, + preference: [this.r ?? 1] + }; + } else { + return null; + } + } + show(e) { + if (!this.f || !this.f.hasModel()) { + return; + } + this.cb(e); + const t = U0(this.u.containerDomNode); + const s = e.showAtPosition; + this.r = this.j(t, s) ?? 1; + this.onContentsChanged(); + if (e.shouldFocus) { + this.u.containerDomNode.focus(); + } + this.C.fire(); + const r = this.u.containerDomNode.ownerDocument.activeElement === this.u.containerDomNode && Q4s(this.F.getValue("accessibility.verbosity.hover") === true && this.G.isScreenReaderOptimized(), this.H.lookupKeybinding("editor.action.accessibleView")?.getAriaLabel() ?? ""); + if (r) { + this.u.contentsDomNode.ariaLabel = this.u.contentsDomNode.textContent + ", " + r; + } + } + hide() { + if (!this.q) { + return; + } + const e = this.q.shouldFocus || this.z.get(); + this.Y(undefined); + this.a.maxSize = new Ln(Infinity, Infinity); + this.a.clearSashHoverState(); + this.z.set(false); + this.f.layoutContentWidget(this); + if (e) { + this.f.focus(); + } + } + db() { + const e = this.f.getLayoutInfo(); + this.a.layout(e.height, e.width); + this.M("auto", "auto"); + } + setMinimumDimensions(e) { + this.s = new Ln(Math.max(this.s.width, e.width), Math.max(this.s.height, e.height)); + this.eb(); + } + eb() { + const e = typeof this.t === "undefined" ? this.s.width : Math.min(this.t, this.s.width); + this.a.minSize = new Ln(e, this.s.height); + } + onContentsChanged() { + this.db(); + const e = this.u.containerDomNode; + let t = U0(e); + let s = qp(e); + this.a.layout(t, s); + this.M(s, t); + t = U0(e); + s = qp(e); + this.t = s; + this.eb(); + this.a.layout(t, s); + if (this.q?.showAtPosition) { + const n = U0(this.u.containerDomNode); + this.r = this.j(n, this.q.showAtPosition); + } + this.ab(); + } + focus() { + this.u.containerDomNode.focus(); + } + scrollUp() { + const e = this.u.scrollbar.getScrollPosition().scrollTop; + const t = this.f.getOption(52); + this.u.scrollbar.setScrollPosition({ + scrollTop: e - t.lineHeight + }); + } + scrollDown() { + const e = this.u.scrollbar.getScrollPosition().scrollTop; + const t = this.f.getOption(52); + this.u.scrollbar.setScrollPosition({ + scrollTop: e + t.lineHeight + }); + } + scrollLeft() { + const e = this.u.scrollbar.getScrollPosition().scrollLeft; + this.u.scrollbar.setScrollPosition({ + scrollLeft: e - t5s + }); + } + scrollRight() { + const e = this.u.scrollbar.getScrollPosition().scrollLeft; + this.u.scrollbar.setScrollPosition({ + scrollLeft: e + t5s + }); + } + pageUp() { + const e = this.u.scrollbar.getScrollPosition().scrollTop; + const t = this.u.scrollbar.getScrollDimensions().height; + this.u.scrollbar.setScrollPosition({ + scrollTop: e - t + }); + } + pageDown() { + const e = this.u.scrollbar.getScrollPosition().scrollTop; + const t = this.u.scrollbar.getScrollDimensions().height; + this.u.scrollbar.setScrollPosition({ + scrollTop: e + t + }); + } + goToTop() { + this.u.scrollbar.setScrollPosition({ + scrollTop: 0 + }); + } + goToBottom() { + this.u.scrollbar.setScrollPosition({ + scrollTop: this.u.scrollbar.getScrollDimensions().scrollHeight + }); + } +}; +CQt = vO = __decorate([__param(1, Ne), __param(2, ve), __param(3, na), __param(4, oi)], CQt); +function i5s(i, e, t, s, n, r) { + const o = t + n / 2; + const a = s + r / 2; + const l = Math.max(Math.abs(i - o) - n / 2, 0); + const c = Math.max(Math.abs(e - a) - r / 2, 0); + return Math.sqrt(l * l + c * c); +} +Jt(); +nt(); +var vfr = class l9i { + constructor(e, t) { + this.a = e; + this.b = t; + } + static c(e, t) { + if (t.type !== 1 && !t.supportsMarkerHover) { + return []; + } + const s = e.getModel(); + const n = t.range.startLineNumber; + if (n > s.getLineCount()) { + return []; + } + const r = s.getLineMaxColumn(n); + return e.getLineDecorations(n).filter(o => { + if (o.options.isWholeLine) { + return true; + } + const a = o.range.startLineNumber === n ? o.range.startColumn : 1; + const l = o.range.endLineNumber === n ? o.range.endColumn : r; + if (o.options.showIfCollapsed) { + if (a > t.range.startColumn + 1 || t.range.endColumn - 1 > l) { + return false; + } + } else if (a > t.range.startColumn || t.range.endColumn > l) { + return false; + } + return true; + }); + } + computeAsync(e, t) { + const s = e.anchor; + if (!this.a.hasModel() || !s) { + return Tw.EMPTY; + } + const n = l9i.c(this.a, s); + return Tw.merge(this.b.map(r => r.computeAsync ? r.computeAsync(s, n, e.source, t) : Tw.EMPTY)); + } + computeSync(e) { + if (!this.a.hasModel()) { + return []; + } + const t = e.anchor; + const s = l9i.c(this.a, t); + let n = []; + for (const r of this.b) { + n = n.concat(r.computeSync(t, s, e.source)); + } + return dr(n); + } +}; +var s5s = class { + constructor(i, e, t) { + this.hoverParts = i; + this.isComplete = e; + this.options = t; + } + filter(i) { + const e = this.hoverParts.filter(t => t.isValidForHoverAnchor(i)); + if (e.length === this.hoverParts.length) { + return this; + } else { + return new yfr(this, e, this.isComplete, this.options); + } + } +}; +var yfr = class extends s5s { + constructor(i, e, t, s) { + super(e, t, s); + this.a = i; + } + filter(i) { + return this.a.filter(i); + } +}; +pe(); +q(); +xe(); +q(); +Fi(); +oa(); +var n5s = G; +var Wpt = class extends H { + get hasContent() { + return this.b; + } + constructor(e, t) { + super(); + this.c = e; + this.f = t; + this.actions = []; + this.b = false; + this.hoverElement = n5s("div.hover-row.status-bar"); + this.hoverElement.tabIndex = 0; + this.a = z(this.hoverElement, n5s("div.actions")); + } + addAction(e) { + const t = this.c.lookupKeybinding(e.commandId); + const s = t ? t.getLabel() : null; + this.b = true; + const n = this.D(wQt.render(this.a, e, s)); + this.D(this.f.setupManagedHover(cr("element"), n.actionContainer, n.actionRenderedLabel)); + this.actions.push(n); + return n; + } + append(e) { + const t = z(this.a, e); + this.b = true; + return t; + } +}; +Wpt = __decorate([__param(0, oi), __param(1, Ns)], Wpt); +Fi(); +Ya(); +Rs(); +yt(); +xe(); +xe(); +Jt(); +ri(); +No(); +q(); +tv(); +yt(); +wn(); +X(); +Me(); +gs(); +Tr(); +Eo(); +Br(); +He(); +Rt(); +Ut(); +Fi(); +nt(); +nt(); +ri(); +Ut(); +en(); +Tr(); +var wfr = class { + constructor(i, e, t) { + this.provider = i; + this.hover = e; + this.ordinal = t; + } +}; +async function Cfr(i, e, t, s, n) { + const r = await Promise.resolve(i.provideHover(t, s, n)).catch(uh); + if (!!r && !!Sfr(r)) { + return new wfr(i, r, e); + } +} +function SQt(i, e, t, s, n = false) { + const o = i.ordered(e, n).map((a, l) => Cfr(a, l, e, t, s)); + return Tw.fromPromisesResolveOrder(o).coalesce(); +} +function r5s(i, e, t, s, n = false) { + return SQt(i, e, t, s, n).map(r => r.hover).toPromise(); +} +Cx("_executeHoverProvider", (i, e, t) => { + const s = i.get(nn); + return r5s(s.hoverProvider, e, t, mt.None); +}); +Cx("_executeHoverProvider_recursive", (i, e, t) => { + const s = i.get(nn); + return r5s(s.hoverProvider, e, t, mt.None, true); +}); +function Sfr(i) { + const e = typeof i.range !== "undefined"; + const t = typeof i.contents !== "undefined" && i.contents && i.contents.length > 0; + return e && t; +} +Wt(); +xe(); +rt(); +function xQt(i, e, t, s, n, r, o, a, l) { + const c = G("button.fix-in-composer"); + const u = z(c, G("span.text")); + u.innerText = i; + c.style.border = "none"; + c.style.borderRadius = "2px"; + c.style.cursor = "pointer"; + c.style.padding = "4px 8px"; + c.style.fontSize = "11px"; + c.style.display = "inline-flex"; + c.style.alignItems = "center"; + c.style.justifyContent = "center"; + c.style.userSelect = "none"; + c.style.width = "150px"; + if (e) { + c.style.backgroundColor = "var(--vscode-button-background)"; + c.style.color = "var(--vscode-button-foreground)"; + } else { + c.style.backgroundColor = "var(--vscode-button-secondaryBackground)"; + c.style.color = "var(--vscode-button-secondaryForeground)"; + } + c.style.marginRight = "8px"; + c.classList.add("fix-in-composer-button-hover"); + if (l) { + const d = Gt ? "Cmd" : "Ctrl"; + c.title = `${d}+click to fix in new chat`; + } + c.onclick = d => { + const h = !d.ctrlKey && !d.metaKey; + n.publicLogCapture("Submitted Fix In Chat"); + s.trackEvent("hover_bar.submit_fix", { + useCurrent: h, + mode: "edit" + }); + t.fixLinterErrorWithAI({ + errorMessage: r, + editorUri: o, + range: a, + addToCurrent: h + }); + }; + return c; +} +$l(); +te(); +var uu = Ve("composerService"); +te(); +var o5s = Ve("backgroundEditService"); +var fG; +(function (i) { + i.GhostText = "ghostText"; + i.PreviewBox = "previewBox"; +})(fG ||= {}); +var xfr = Ve("watcherService"); +var TA = Ve("telemService"); +var s0 = Ve("analyticsService"); +var wD = Ve("cppService"); +var One = Ve("cursorPredictionService"); +var s0e = Ve("importPredictionService"); +var kQt = Ve("reactiveContextKeyService"); +var una = Ve("aiPreviewService"); +var dna = Ve("aiInstantSearchService"); +var EQt = Ve("quickInputService2"); +var hna = Ve("cppSuggestionService"); +var gG; +(function (i) { + i.TAB = "tab"; + i.COMPOSER = "composer"; +})(gG ||= {}); +var IQt = Ve("aiCodeTrackingService"); +ai(); +rt(); +Jt(); +ri(); +Ut(); +At(); +en(); +Tr(); +Ut(); +pe(); +Cz(); +q(); +In(); +Et(); +$i(); +yt(); +X(); +var HU = class { + constructor(i, e, t, s) { + this.isProviderFirst = i; + this.parent = e; + this.link = t; + this.d = s; + this.id = wz.nextId(); + } + get uri() { + return this.link.uri; + } + get range() { + return this.c ?? this.link.targetSelectionRange ?? this.link.range; + } + set range(i) { + this.c = i; + this.d(this); + } + get ariaMessage() { + const i = this.parent.getPreview(this)?.preview(this.range); + if (i) { + return f(1169, null, i.value, ji(this.uri), this.range.startLineNumber, this.range.startColumn); + } else { + return f(1168, null, ji(this.uri), this.range.startLineNumber, this.range.startColumn); + } + } +}; +var kfr = class { + constructor(i) { + this.c = i; + } + dispose() { + this.c.dispose(); + } + preview(i, e = 8) { + const t = this.c.object.textEditorModel; + if (!t) { + return; + } + const { + startLineNumber: s, + startColumn: n, + endLineNumber: r, + endColumn: o + } = i; + const a = t.getWordUntilPosition({ + lineNumber: s, + column: n - e + }); + const l = new Z(s, a.startColumn, s, n); + const c = new Z(r, o, r, 1073741824); + const u = t.getValueInRange(l).replace(/^\s+/, ""); + const d = t.getValueInRange(i); + const h = t.getValueInRange(c).replace(/\s+$/, ""); + return { + value: u + d + h, + highlight: { + start: u.length, + end: u.length + d.length + } + }; + } +}; +var n0e = class { + constructor(i, e) { + this.parent = i; + this.uri = e; + this.children = []; + this.c = new dn(); + } + dispose() { + si(this.c.values()); + this.c.clear(); + } + getPreview(i) { + return this.c.get(i.uri); + } + get ariaMessage() { + const i = this.children.length; + if (i === 1) { + return f(1170, null, ji(this.uri), this.uri.fsPath); + } else { + return f(1171, null, i, ji(this.uri), this.uri.fsPath); + } + } + async resolve(i) { + if (this.c.size !== 0) { + return this; + } + for (const e of this.children) { + if (!this.c.has(e.uri)) { + try { + const t = await i.createModelReference(e.uri); + this.c.set(e.uri, new kfr(t)); + } catch (t) { + xs(t); + } + } + } + return this; + } +}; +var xE = class MFt { + constructor(e, t) { + this.groups = []; + this.references = []; + this._onDidChangeReferenceRange = new B(); + this.onDidChangeReferenceRange = this._onDidChangeReferenceRange.event; + this.c = e; + this.d = t; + const [s] = e; + e.sort(MFt.e); + let n; + for (const r of e) { + if (!n || !sr.isEqual(n.uri, r.uri, true)) { + n = new n0e(this, r.uri); + this.groups.push(n); + } + if (n.children.length === 0 || MFt.e(r, n.children[n.children.length - 1]) !== 0) { + const o = new HU(s === r, n, r, a => this._onDidChangeReferenceRange.fire(a)); + this.references.push(o); + n.children.push(o); + } + } + } + dispose() { + si(this.groups); + this._onDidChangeReferenceRange.dispose(); + this.groups.length = 0; + } + clone() { + return new MFt(this.c, this.d); + } + get title() { + return this.d; + } + get isEmpty() { + return this.groups.length === 0; + } + get ariaMessage() { + if (this.isEmpty) { + return f(1172, null); + } else if (this.references.length === 1) { + return f(1173, null, this.references[0].uri.fsPath); + } else if (this.groups.length === 1) { + return f(1174, null, this.references.length, this.groups[0].uri.fsPath); + } else { + return f(1175, null, this.references.length, this.groups.length); + } + } + nextOrPreviousReference(e, t) { + const { + parent: s + } = e; + let n = s.children.indexOf(e); + const r = s.children.length; + const o = s.parent.groups.length; + if (o === 1 || t && n + 1 < r || !t && n > 0) { + if (t) { + n = (n + 1) % r; + } else { + n = (n + r - 1) % r; + } + return s.children[n]; + } else { + n = s.parent.groups.indexOf(s); + if (t) { + n = (n + 1) % o; + return s.parent.groups[n].children[0]; + } else { + n = (n + o - 1) % o; + return s.parent.groups[n].children[s.parent.groups[n].children.length - 1]; + } + } + } + nearestReference(e, t) { + const s = this.references.map((n, r) => ({ + idx: r, + prefixLen: LL(n.uri.toString(), e.toString()), + offsetDist: Math.abs(n.range.startLineNumber - t.lineNumber) * 100 + Math.abs(n.range.startColumn - t.column) + })).sort((n, r) => n.prefixLen > r.prefixLen ? -1 : n.prefixLen < r.prefixLen ? 1 : n.offsetDist < r.offsetDist ? -1 : n.offsetDist > r.offsetDist ? 1 : 0)[0]; + if (s) { + return this.references[s.idx]; + } + } + referenceAt(e, t) { + for (const s of this.references) { + if (s.uri.toString() === e.toString() && Z.containsPosition(s.range, t)) { + return s; + } + } + } + firstReference() { + for (const e of this.references) { + if (e.isProviderFirst) { + return e; + } + } + return this.references[0]; + } + static e(e, t) { + return sr.compare(e.uri, t.uri) || Z.compareRangesUsingStarts(e.range, t.range); + } +}; +dc(); +function DQt(i, e) { + if (e.uri.scheme === i.uri.scheme) { + return true; + } else { + return !zZ(e.uri, me.walkThroughSnippet, me.vscodeChatCodeBlock, me.vscodeChatCodeCompareBlock); + } +} +async function r0e(i, e, t, s, n) { + const o = t.ordered(i, s).map(l => Promise.resolve(n(l, i, e)).then(undefined, c => { + uh(c); + })); + const a = await Promise.all(o); + return dr(a.flat()).filter(l => DQt(i, l)); +} +function cP(i, e, t, s, n) { + return $L("gotoSymbol.getDefinitionsAtPosition", () => r0e(e, t, i, s, (r, o, a) => r.provideDefinition(o, a, n))); +} +function TQt(i, e, t, s, n) { + return $L("gotoSymbol.getDeclarationsAtPosition", () => r0e(e, t, i, s, (r, o, a) => r.provideDeclaration(o, a, n))); +} +function _ne(i, e, t, s, n) { + return $L("gotoSymbol.getImplementationsAtPosition", () => r0e(e, t, i, s, (r, o, a) => r.provideImplementation(o, a, n))); +} +function Vpt(i, e, t, s, n) { + return $L("gotoSymbol.getTypeDefinitionsAtPosition", () => r0e(e, t, i, s, (r, o, a) => r.provideTypeDefinition(o, a, n))); +} +function pG(i, e, t, s, n, r) { + return $L("gotoSymbol.getReferencesAtPosition", () => r0e(e, t, i, n, async (o, a, l) => { + const c = (await o.provideReferences(a, l, { + includeDeclaration: true + }, r))?.filter(d => DQt(a, d)); + if (!s || !c || c.length !== 2) { + return c; + } + const u = (await o.provideReferences(a, l, { + includeDeclaration: false + }, r))?.filter(d => DQt(a, d)); + if (u && u.length === 1) { + return u; + } else { + return c; + } + })); +} +async function PR(i) { + const e = await i(); + const t = new xE(e, ""); + const s = t.references.map(n => n.link); + t.dispose(); + return s; +} +Cx("_executeDefinitionProvider", (i, e, t) => { + const s = i.get(nn); + const n = cP(s.definitionProvider, e, t, false, mt.None); + return PR(() => n); +}); +Cx("_executeDefinitionProvider_recursive", (i, e, t) => { + const s = i.get(nn); + const n = cP(s.definitionProvider, e, t, true, mt.None); + return PR(() => n); +}); +Cx("_executeTypeDefinitionProvider", (i, e, t) => { + const s = i.get(nn); + const n = Vpt(s.typeDefinitionProvider, e, t, false, mt.None); + return PR(() => n); +}); +Cx("_executeTypeDefinitionProvider_recursive", (i, e, t) => { + const s = i.get(nn); + const n = Vpt(s.typeDefinitionProvider, e, t, true, mt.None); + return PR(() => n); +}); +Cx("_executeDeclarationProvider", (i, e, t) => { + const s = i.get(nn); + const n = TQt(s.declarationProvider, e, t, false, mt.None); + return PR(() => n); +}); +Cx("_executeDeclarationProvider_recursive", (i, e, t) => { + const s = i.get(nn); + const n = TQt(s.declarationProvider, e, t, true, mt.None); + return PR(() => n); +}); +Cx("_executeReferenceProvider", (i, e, t) => { + const s = i.get(nn); + const n = pG(s.referenceProvider, e, t, false, false, mt.None); + return PR(() => n); +}); +Cx("_executeReferenceProvider_recursive", (i, e, t) => { + const s = i.get(nn); + const n = pG(s.referenceProvider, e, t, false, true, mt.None); + return PR(() => n); +}); +Cx("_executeImplementationProvider", (i, e, t) => { + const s = i.get(nn); + const n = _ne(s.implementationProvider, e, t, false, mt.None); + return PR(() => n); +}); +Cx("_executeImplementationProvider_recursive", (i, e, t) => { + const s = i.get(nn); + const n = _ne(s.implementationProvider, e, t, true, mt.None); + return PR(() => n); +}); +Cs(); +nt(); +Pn(); +var yO = G; +var Efr = dt("hover-increase-verbosity", A.add, f(1213, null)); +var Ifr = dt("hover-decrease-verbosity", A.remove, f(1214, null)); +var LR = class { + constructor(i, e, t, s, n, r = undefined) { + this.owner = i; + this.range = e; + this.contents = t; + this.isBeforeContent = s; + this.ordinal = n; + this.source = r; + } + isValidForHoverAnchor(i) { + return i.type === 1 && this.range.startColumn <= i.range.startColumn && this.range.endColumn >= i.range.endColumn; + } +}; +var a5s = class { + constructor(i, e, t) { + this.hover = i; + this.hoverProvider = e; + this.hoverPosition = t; + } + supportsVerbosityAction(i) { + switch (i) { + case Xb.Increase: + return this.hover.canIncreaseVerbosity ?? false; + case Xb.Decrease: + return this.hover.canDecreaseVerbosity ?? false; + } + } +}; +var o0e = class { + constructor(e, t, s, n, r, o, a, l, c, u, d, h) { + this.b = e; + this.c = t; + this.f = s; + this.g = n; + this.h = r; + this.i = o; + this.j = a; + this.k = l; + this.l = c; + this.m = u; + this.o = d; + this.p = h; + this.hoverOrdinal = 3; + } + createLoadingMessage(e) { + return new LR(this, e.range, [new hs().appendText(f(1215, null))], false, 2000); + } + computeSync(e, t) { + if (!this.b.hasModel() || e.type !== 1) { + return []; + } + if (this.b.isChatCodeblock === true) { + return []; + } + const s = this.b.getModel(); + const n = e.range.startLineNumber; + const r = s.getLineMaxColumn(n); + const o = []; + let a = 1000; + const l = s.getLineLength(n); + const c = s.getLanguageIdAtPosition(e.range.startLineNumber, e.range.startColumn); + const u = this.b.getOption(122); + const d = this.g.getValue("editor.maxTokenizationLineLength", { + overrideIdentifier: c + }); + let h = false; + if (u >= 0 && l > u && e.range.startColumn >= u) { + h = true; + o.push(new LR(this, e.range, [{ + value: f(1216, null) + }], false, a++)); + } + if (!h && typeof d == "number" && l >= d) { + o.push(new LR(this, e.range, [{ + value: f(1217, null) + }], false, a++)); + } + let g = false; + for (const p of t) { + const b = p.range.startLineNumber === n ? p.range.startColumn : 1; + const v = p.range.endLineNumber === n ? p.range.endColumn : r; + const y = p.options.hoverMessage; + if (!y || yie(y)) { + continue; + } + if (p.options.beforeContentClassName) { + g = true; + } + const w = new Z(e.range.startLineNumber, b, e.range.startLineNumber, v); + o.push(new LR(this, w, VC(y), g, a++)); + } + return o; + } + computeAsync(e, t, s, n) { + if (!this.b.hasModel() || e.type !== 1 || this.b.isChatCodeblock === true) { + return Tw.EMPTY; + } + const r = this.b.getModel(); + const o = this.h.hoverProvider; + if (o.has(r)) { + return this.q(o, r, e, n); + } else { + return Tw.EMPTY; + } + } + q(e, t, s, n) { + if (this.b.isChatCodeblock === true) { + return Tw.EMPTY; + } + const r = s.range.getStartPosition(); + return SQt(e, t, r, n).filter(l => !yie(l.hover.contents)).map(l => { + const c = l.hover.range ? Z.lift(l.hover.range) : s.range; + const u = new a5s(l.hover, l.provider, r); + return new LR(this, c, l.hover.contents, false, l.ordinal, u); + }); + } + renderHoverParts(e, t) { + this.a = new Dfr(t, e.fragment, this, this.b, this.c, this.f, this.k, this.i, this.j, this.g, this.l, this.m, this.o, this.h, this.p, e.onContentsChanged); + return this.a; + } + getAccessibleContent(e) { + return this.a?.getAccessibleContent(e) ?? ""; + } + doesMarkdownHoverAtIndexSupportVerbosityAction(e, t) { + return this.a?.doesMarkdownHoverAtIndexSupportVerbosityAction(e, t) ?? false; + } + updateMarkdownHoverVerbosityLevel(e, t, s) { + return Promise.resolve(this.a?.updateMarkdownHoverPartVerbosityLevel(e, t, s)); + } +}; +o0e = __decorate([__param(1, As), __param(2, os), __param(3, ve), __param(4, nn), __param(5, oi), __param(6, Ns), __param(7, gt), __param(8, uu), __param(9, s0), __param(10, Ot), __param(11, _i)], o0e); +var Hpt = class { + constructor(i, e, t) { + this.hoverPart = i; + this.hoverElement = e; + this.disposables = t; + } + get hoverAccessibleContent() { + return this.hoverElement.innerText.trim(); + } + dispose() { + this.disposables.dispose(); + } +}; +var Dfr = class { + constructor(i, e, t, s, n, r, o, a, l, c, u, d, h, g, p, b) { + this.c = t; + this.f = s; + this.g = n; + this.h = r; + this.i = o; + this.j = a; + this.k = l; + this.l = c; + this.m = u; + this.o = d; + this.p = h; + this.q = g; + this.r = p; + this.s = b; + this.a = new Map(); + this.b = new Q(); + this.renderedHoverParts = this.t(i, e, this.s); + this.b.add(Ue(() => { + this.renderedHoverParts.forEach(v => { + v.dispose(); + }); + this.a.forEach(v => { + v.tokenSource.dispose(true); + }); + })); + } + t(i, e, t) { + i.sort(jg(s => s.ordinal, Ly)); + return i.map(s => { + const n = this.u(s, t); + e.appendChild(n.hoverElement); + return n; + }); + } + u(i, e) { + const t = this.v(i, e); + const s = t.hoverElement; + const n = i.source; + const r = new Q(); + r.add(t); + if (!n) { + return new Hpt(i, s, r); + } + const o = n.supportsVerbosityAction(Xb.Increase); + const a = n.supportsVerbosityAction(Xb.Decrease); + if (!o && !a) { + return new Hpt(i, s, r); + } + const l = yO("div.verbosity-actions"); + s.prepend(l); + r.add(this.y(l, Xb.Increase, o)); + r.add(this.y(l, Xb.Decrease, a)); + return new Hpt(i, s, r); + } + v(i, e) { + const t = document.createElement("div"); + const s = yO("div.hover-row"); + t.appendChild(s); + s.tabIndex = 0; + const n = l5s(this.f, i, this.g, this.h, e); + s.appendChild(n.hoverElement); + if (this.l.getValue(_5t) && false) { + this.w(t, i, e); + } + return { + hoverPart: i, + hoverElement: t, + dispose: () => { + n.dispose(); + } + }; + } + async w(i, e, t) { + const s = this.f.getModel(); + if (!s) { + return; + } + const n = await this.x(this.f, 3, e.range.getStartPosition(), this.q); + if (n.length > 0) { + const r = yO("div.fix-buttons-container"); + i.appendChild(r); + const o = yO("div.fix-buttons-row"); + r.appendChild(o); + const a = xQt("Add to Composer", true, this.m, this.o, this.p, "", s.uri.toString(), e.range, true); + o.appendChild(a); + const l = "Chat"; + const c = (h, g, p, b, v, y) => { + const w = new Vn(() => { + h.textContent = b; + h.style.opacity = "0.5"; + h.style.pointerEvents = "none"; + }, 500); + return async C => { + C.preventDefault(); + C.stopPropagation(); + const x = C.ctrlKey || C.metaKey ? p : g; + w.schedule(); + try { + await this.i.executeCommand(x, { + locationLinks: n, + positionOverride: e.range.getStartPosition(), + uri: s.uri + }, y ? "chat" : undefined); + } finally { + w.cancel(); + h.textContent = v; + h.style.opacity = "1"; + h.style.pointerEvents = "auto"; + } + }; + }; + a.onclick = c(a, wse, xye, `Adding to ${l}...`, `Add to ${l}`, false); + const u = yO("div.fix-buttons-hint"); + const d = Gt ? "⌘" : "Ctrl"; + u.textContent = `${d}+click to add to new tab`; + r.appendChild(u); + t(); + } + } + async x(i, e, t, s) { + const n = i.getModel(); + if (n === null || t === null) { + return []; + } else { + return (await PR(() => cP(s.definitionProvider, n, t, false, mt.None))).slice(0, e); + } + } + y(i, e, t) { + const s = new Q(); + const n = e === Xb.Increase; + const r = z(i, yO(le.asCSSSelector(n ? Efr : Ifr))); + r.tabIndex = 0; + const o = new DR("mouse", false, { + target: i, + position: { + hoverPosition: 0 + } + }, this.l, this.k); + s.add(this.k.setupManagedHover(o, r, c5s(this.j, e))); + if (!t) { + r.classList.add("disabled"); + return s; + } + r.classList.add("enabled"); + const a = () => this.i.executeCommand(e === Xb.Increase ? Ane : $ne); + s.add(new Z4s(r, a)); + s.add(new e5s(r, a, [3, 10])); + return s; + } + async updateMarkdownHoverPartVerbosityLevel(i, e, t = true) { + const s = this.f.getModel(); + if (!s) { + return; + } + const n = this.C(e); + const r = n?.hoverPart.source; + if (!n || !r?.supportsVerbosityAction(i)) { + return; + } + const o = await this.z(r, s, i); + if (!o) { + return; + } + const a = new a5s(o, r.hoverProvider, r.hoverPosition); + const l = n.hoverPart; + const c = new LR(this.c, l.range, o.contents, l.isBeforeContent, l.ordinal, a); + const u = this.u(c, this.s); + this.A(e, u, c); + if (t) { + this.B(e); + } + return { + hoverPart: c, + hoverElement: u.hoverElement + }; + } + getAccessibleContent(i) { + const e = this.renderedHoverParts.findIndex(r => r.hoverPart === i); + if (e === -1) { + return; + } + const t = this.C(e); + if (t) { + return t.hoverElement.innerText.replace(/[^\S\n\r]+/gu, " "); + } else { + return undefined; + } + } + doesMarkdownHoverAtIndexSupportVerbosityAction(i, e) { + const t = this.C(i); + const s = t?.hoverPart.source; + return !!t && !!s?.supportsVerbosityAction(e); + } + async z(i, e, t) { + let s = t === Xb.Increase ? 1 : -1; + const n = i.hoverProvider; + const r = this.a.get(n); + if (r) { + r.tokenSource.cancel(); + s += r.verbosityDelta; + } + const o = new Xi(); + this.a.set(n, { + verbosityDelta: s, + tokenSource: o + }); + const a = { + verbosityRequest: { + verbosityDelta: s, + previousHover: i.hover + } + }; + let l; + try { + l = await Promise.resolve(n.provideHover(e, i.hoverPosition, o.token, a)); + } catch (c) { + uh(c); + } + o.dispose(); + this.a.delete(n); + return l; + } + A(i, e, t) { + if (i >= this.renderedHoverParts.length || i < 0) { + return; + } + const s = this.renderedHoverParts[i]; + const n = s.hoverElement; + const r = e.hoverElement; + const o = Array.from(r.children); + n.replaceChildren(...o); + const a = new Hpt(t, n, e.disposables); + n.focus(); + s.dispose(); + this.renderedHoverParts[i] = a; + } + B(i) { + this.renderedHoverParts[i].hoverElement.focus(); + } + C(i) { + return this.renderedHoverParts[i]; + } + dispose() { + this.b.dispose(); + } +}; +function Tfr(i, e, t, s, n) { + e.sort(jg(o => o.ordinal, Ly)); + const r = []; + for (const o of e) { + r.push(l5s(t, o, s, n, i.onContentsChanged)); + } + return new B5(r); +} +function l5s(i, e, t, s, n) { + const r = new Q(); + const o = yO("div.hover-row"); + const a = yO("div.hover-row-contents"); + o.appendChild(a); + const l = e.contents; + for (const u of l) { + if (yie(u)) { + continue; + } + const d = yO("div.markdown-hover"); + const h = z(d, yO("div.hover-contents")); + const g = r.add(new Cb({ + editor: i + }, t, s)); + r.add(g.onDidRenderAsync(() => { + h.className = "hover-contents code-hover-contents"; + n(); + })); + const p = r.add(g.render(u)); + h.appendChild(p.element); + a.appendChild(d); + } + return { + hoverPart: e, + hoverElement: o, + dispose() { + r.dispose(); + } + }; +} +function c5s(i, e) { + switch (e) { + case Xb.Increase: + { + const t = i.lookupKeybinding(Ane); + if (t) { + return f(1218, null, t.getLabel()); + } else { + return f(1219, null); + } + } + case Xb.Decrease: + { + const t = i.lookupKeybinding($ne); + if (t) { + return f(1220, null, t.getLabel()); + } else { + return f(1221, null); + } + } + } +} +nt(); +yt(); +Yk(); +xe(); +bb(); +xe(); +Zo(); +q(); +xe(); +jee(); +Zo(); +pe(); +q(); +var u5s = G; +var Pfr = class extends H { + constructor(i, e, t) { + super(); + this.q = e; + this.r = t; + this.m = new B(); + this.onDidChange = this.m.event; + this.n = new B(); + this.onColorFlushed = this.n.event; + this.a = u5s(".saturation-wrap"); + z(i, this.a); + this.c = document.createElement("canvas"); + this.c.className = "saturation-box"; + z(this.a, this.c); + this.b = u5s(".saturation-selection"); + z(this.a, this.b); + this.layout(); + this.D(Ce(this.a, Oe.POINTER_DOWN, s => this.t(s))); + this.D(this.q.onDidChangeColor(this.z, this)); + this.j = null; + } + get domNode() { + return this.a; + } + get canvas() { + return this.c; + } + t(i) { + if (!i.target || !(i.target instanceof Element)) { + return; + } + this.j = this.D(new Sj()); + const e = sd(this.a); + if (i.target !== this.b) { + this.u(i.offsetX, i.offsetY); + } + this.j.startMonitoring(i.target, i.pointerId, i.buttons, s => this.u(s.pageX - e.left, s.pageY - e.top), () => null); + const t = Ce(i.target.ownerDocument, Oe.POINTER_UP, () => { + this.n.fire(); + t.dispose(); + if (this.j) { + this.j.stopMonitoring(true); + this.j = null; + } + }, true); + } + u(i, e) { + const t = Math.max(0, Math.min(1, i / this.f)); + const s = Math.max(0, Math.min(1, 1 - e / this.g)); + this.y(t, s); + this.m.fire({ + s: t, + v: s + }); + } + layout() { + this.f = this.a.offsetWidth; + this.g = this.a.offsetHeight; + this.c.width = this.f * this.r; + this.c.height = this.g * this.r; + this.w(); + const i = this.q.color.hsva; + this.y(i.s, i.v); + } + w() { + const i = this.q.color.hsva; + const e = new ut(new n4(i.h, 1, 1, 1)); + const t = this.c.getContext("2d"); + const s = t.createLinearGradient(0, 0, this.c.width, 0); + s.addColorStop(0, "rgba(255, 255, 255, 1)"); + s.addColorStop(0.5, "rgba(255, 255, 255, 0.5)"); + s.addColorStop(1, "rgba(255, 255, 255, 0)"); + const n = t.createLinearGradient(0, 0, 0, this.c.height); + n.addColorStop(0, "rgba(0, 0, 0, 0)"); + n.addColorStop(1, "rgba(0, 0, 0, 1)"); + t.rect(0, 0, this.c.width, this.c.height); + t.fillStyle = ut.Format.CSS.format(e); + t.fill(); + t.fillStyle = s; + t.fill(); + t.fillStyle = n; + t.fill(); + } + y(i, e) { + this.b.style.left = `${i * this.f}px`; + this.b.style.top = `${this.g - e * this.g}px`; + } + z(i) { + if (this.j && this.j.isMonitoring()) { + return; + } + this.w(); + const e = i.hsva; + this.y(e.s, e.v); + } +}; +xe(); +pe(); +q(); +var Lfr = class extends H { + constructor(i) { + super(); + this.b = this.D(new B()); + this.onClicked = this.b.event; + this.a = z(i, document.createElement("button")); + this.a.classList.add("insert-button"); + this.a.textContent = "Insert"; + this.D(Ce(this.a, Oe.CLICK, () => { + this.b.fire(); + })); + } + get button() { + return this.a; + } +}; +xe(); +jee(); +Zo(); +pe(); +q(); +var a0e = G; +var d5s = class extends H { + constructor(i, e, t) { + super(); + this.s = e; + this.n = new B(); + this.onDidChange = this.n.event; + this.q = new B(); + this.onColorFlushed = this.q.event; + if (t === "standalone") { + this.c = z(i, a0e(".standalone-strip")); + this.f = z(this.c, a0e(".standalone-overlay")); + } else { + this.c = z(i, a0e(".strip")); + this.f = z(this.c, a0e(".overlay")); + } + this.j = z(this.c, a0e(".slider")); + this.j.style.top = "0px"; + this.D(Ce(this.c, Oe.POINTER_DOWN, s => this.u(s))); + this.D(e.onDidChangeColor(this.t, this)); + this.layout(); + } + layout() { + this.m = this.c.offsetHeight - this.j.offsetHeight; + const i = this.z(this.s.color); + this.y(i); + } + t(i) { + const e = this.z(i); + this.y(e); + } + u(i) { + if (!i.target || !(i.target instanceof Element)) { + return; + } + const e = this.D(new Sj()); + const t = sd(this.c); + this.c.classList.add("grabbing"); + if (i.target !== this.j) { + this.w(i.offsetY); + } + e.startMonitoring(i.target, i.pointerId, i.buttons, n => this.w(n.pageY - t.top), () => null); + const s = Ce(i.target.ownerDocument, Oe.POINTER_UP, () => { + this.q.fire(); + s.dispose(); + e.stopMonitoring(true); + this.c.classList.remove("grabbing"); + }, true); + } + w(i) { + const e = Math.max(0, Math.min(1, 1 - i / this.m)); + this.y(e); + this.n.fire(e); + } + y(i) { + this.j.style.top = `${(1 - i) * this.m}px`; + } +}; +var Rfr = class extends d5s { + constructor(i, e, t) { + super(i, e, t); + this.c.classList.add("opacity-strip"); + this.t(this.s.color); + } + t(i) { + super.t(i); + const { + r: e, + g: t, + b: s + } = i.rgba; + const n = new ut(new Ti(e, t, s, 1)); + const r = new ut(new Ti(e, t, s, 0)); + this.f.style.background = `linear-gradient(to bottom, ${n} 0%, ${r} 100%)`; + } + z(i) { + return i.hsva.a; + } +}; +var Nfr = class extends d5s { + constructor(i, e, t) { + super(i, e, t); + this.c.classList.add("hue-strip"); + } + z(i) { + return 1 - i.hsva.h / 360; + } +}; +var Mfr = G; +var Afr = class extends H { + constructor(i, e, t, s) { + super(); + this.m = e; + this.n = t; + this.j = null; + this.b = Mfr(".colorpicker-body"); + z(i, this.b); + this.c = new Pfr(this.b, this.m, this.n); + this.D(this.c); + this.D(this.c.onDidChange(this.r, this)); + this.D(this.c.onColorFlushed(this.q, this)); + this.g = new Rfr(this.b, this.m, s); + this.D(this.g); + this.D(this.g.onDidChange(this.t, this)); + this.D(this.g.onColorFlushed(this.q, this)); + this.f = new Nfr(this.b, this.m, s); + this.D(this.f); + this.D(this.f.onDidChange(this.u, this)); + this.D(this.f.onColorFlushed(this.q, this)); + if (s === "standalone") { + this.j = this.D(new Lfr(this.b)); + this.b.classList.add("standalone-colorpicker"); + } + } + q() { + this.m.flushColor(); + } + r({ + s: i, + v: e + }) { + const t = this.m.color.hsva; + this.m.color = new ut(new n4(t.h, i, e, t.a)); + } + t(i) { + const e = this.m.color.hsva; + this.m.color = new ut(new n4(e.h, e.s, e.v, i)); + } + u(i) { + const e = this.m.color.hsva; + const t = (1 - i) * 360; + this.m.color = new ut(new n4(t === 360 ? 0 : t, e.s, e.v, e.a)); + } + get domNode() { + return this.b; + } + get saturationBox() { + return this.c; + } + get opacityStrip() { + return this.g; + } + get hueStrip() { + return this.f; + } + get enterButton() { + return this.j; + } + layout() { + this.c.layout(); + this.g.layout(); + this.f.layout(); + } +}; +xe(); +Zo(); +q(); +X(); +Qs(); +xe(); +q(); +X(); +pe(); +Br(); +Rt(); +He(); +var $fr = G; +var Ffr = class extends H { + constructor(i) { + super(); + this.b = this.D(new B()); + this.onClicked = this.b.event; + this.a = document.createElement("div"); + this.a.classList.add("close-button"); + z(i, this.a); + const e = document.createElement("div"); + e.classList.add("close-button-inner-div"); + z(this.a, e); + z(e, $fr(".button" + le.asCSSSelector(dt("color-picker-close", A.close, f(962, null))))).classList.add("close-icon"); + this.D(Ce(this.a, Oe.CLICK, () => { + this.b.fire(); + })); + } +}; +var qpt = G; +var Ofr = class extends H { + constructor(i, e, t, s) { + super(); + this.m = e; + this.n = s; + this.h = null; + this.b = qpt(".colorpicker-header"); + z(i, this.b); + this.c = z(this.b, qpt(".picked-color")); + z(this.c, qpt("span.codicon.codicon-color-mode")); + this.f = z(this.c, document.createElement("span")); + this.f.classList.add("picked-color-presentation"); + const n = f(963, null); + this.c.setAttribute("title", n); + this.g = z(this.b, qpt(".original-color")); + this.g.style.backgroundColor = ut.Format.CSS.format(this.m.originalColor) || ""; + this.j = t.getColorTheme().getColor(P9) || ut.white; + this.D(t.onDidColorThemeChange(r => { + this.j = r.getColor(P9) || ut.white; + })); + this.D(Ce(this.c, Oe.CLICK, () => this.m.selectNextColorPresentation())); + this.D(Ce(this.g, Oe.CLICK, () => { + this.m.color = this.m.originalColor; + this.m.flushColor(); + })); + this.D(e.onDidChangeColor(this.q, this)); + this.D(e.onDidChangePresentation(this.r, this)); + this.c.style.backgroundColor = ut.Format.CSS.format(e.color) || ""; + this.c.classList.toggle("light", e.color.rgba.a < 0.5 ? this.j.isLighter() : e.color.isLighter()); + this.q(this.m.color); + if (this.n === "standalone") { + this.b.classList.add("standalone-colorpicker"); + this.h = this.D(new Ffr(this.b)); + } + } + get domNode() { + return this.b; + } + get closeButton() { + return this.h; + } + get pickedColorNode() { + return this.c; + } + get originalColorNode() { + return this.g; + } + q(i) { + this.c.style.backgroundColor = ut.Format.CSS.format(i) || ""; + this.c.classList.toggle("light", i.rgba.a < 0.5 ? this.j.isLighter() : i.isLighter()); + this.r(); + } + r() { + this.f.textContent = this.m.presentation ? this.m.presentation.label : ""; + } +}; +var _fr = G; +var h5s = class n_n extends Gg { + static { + this.a = "editor.contrib.colorPickerWidget"; + } + constructor(e, t, s, n, r) { + super(); + this.model = t; + this.g = s; + this.D(_y.getInstance(Kt(e)).onDidChange(() => this.layout())); + this.c = _fr(".colorpicker-widget"); + e.appendChild(this.c); + this.header = this.D(new Ofr(this.c, this.model, n, r)); + this.body = this.D(new Afr(this.c, this.model, this.g, r)); + } + getId() { + return n_n.a; + } + layout() { + this.body.layout(); + } + get domNode() { + return this.c; + } +}; +gi(); +X(); +ri(); +Zo(); +pe(); +var Bfr = class { + get color() { + return this.a; + } + set color(i) { + if (!this.a.equals(i)) { + this.a = i; + this.d.fire(i); + } + } + get presentation() { + return this.colorPresentations[this.f]; + } + get colorPresentations() { + return this.b; + } + set colorPresentations(i) { + this.b = i; + if (this.f > i.length - 1) { + this.f = 0; + } + this.e.fire(this.presentation); + } + constructor(i, e, t) { + this.f = t; + this.c = new B(); + this.onColorFlushed = this.c.event; + this.d = new B(); + this.onDidChangeColor = this.d.event; + this.e = new B(); + this.onDidChangePresentation = this.e.event; + this.originalColor = i; + this.a = i; + this.b = e; + } + selectNextColorPresentation() { + this.f = (this.f + 1) % this.colorPresentations.length; + this.flushColor(); + this.e.fire(this.presentation); + } + guessColorPresentation(i, e) { + let t = -1; + for (let s = 0; s < this.colorPresentations.length; s++) { + if (e.toLowerCase() === this.colorPresentations[s].label) { + t = s; + break; + } + } + if (t === -1) { + const s = e.split("(")[0].toLowerCase(); + for (let n = 0; n < this.colorPresentations.length; n++) { + if (this.colorPresentations[n].label.toLowerCase().startsWith(s)) { + t = n; + break; + } + } + } + if (t !== -1 && t !== this.f) { + this.f = t; + this.e.fire(this.presentation); + } + } + flushColor() { + this.c.fire(this.a); + } +}; +yt(); +var f5s; +(function (i) { + i.Hover = "hover"; + i.Standalone = "standalone"; +})(f5s ||= {}); +async function g5s(i, e, t) { + const s = i.getValueInRange(e.range); + const { + red: n, + green: r, + blue: o, + alpha: a + } = e.color; + const l = new Ti(Math.round(n * 255), Math.round(r * 255), Math.round(o * 255), a); + const c = new ut(l); + const u = await U4s(i, e, t, mt.None); + const d = new Bfr(c, [], 0); + d.colorPresentations = u || []; + d.guessColorPresentation(c, s); + return { + range: Z.lift(e.range), + model: d, + provider: t + }; +} +function p5s(i, e, t) { + const s = []; + const n = t.presentation.textEdit ?? { + range: e, + text: t.presentation.label, + forceMoveMarkers: false + }; + s.push(n); + if (t.presentation.additionalTextEdits) { + s.push(...t.presentation.additionalTextEdits); + } + const r = Z.lift(n.range); + const o = i.getModel()._setTrackedRange(null, r, 3); + i.executeEdits("colorpicker", s); + i.pushUndoStop(); + return i.getModel()._getTrackedRange(o) ?? r; +} +async function l0e(i, e, t, s, n) { + const r = await U4s(i, { + range: s, + color: { + red: t.rgba.r / 255, + green: t.rgba.g / 255, + blue: t.rgba.b / 255, + alpha: t.rgba.a + } + }, n.provider, mt.None); + e.colorPresentations = r || []; +} +xe(); +q(); +var m5s = class r_n { + constructor(e, t, s, n) { + this.owner = e; + this.range = t; + this.model = s; + this.provider = n; + this.forceShowAtRange = true; + } + isValidForHoverAnchor(e) { + return e.type === 1 && this.range.startColumn <= e.range.startColumn && this.range.endColumn >= e.range.endColumn; + } + static fromBaseColor(e, t) { + return new r_n(e, t.range, t.model, t.provider); + } +}; +var jpt = class { + constructor(e, t) { + this.b = e; + this.c = t; + this.hoverOrdinal = 2; + } + computeSync(e, t, s) { + return []; + } + computeAsync(e, t, s, n) { + return Tw.fromPromise(this.f(e, t, s)); + } + async f(e, t, s) { + if (!this.b.hasModel()) { + return []; + } + if (!this.g(s)) { + return []; + } + const n = U5.get(this.b); + if (!n) { + return []; + } + for (const r of t) { + if (!n.isColorDecoration(r)) { + continue; + } + const o = n.getColorData(r.range.getStartPosition()); + if (o) { + return [m5s.fromBaseColor(this, await g5s(this.b.getModel(), o.colorInfo, o.provider))]; + } + } + return []; + } + g(e) { + const t = this.b.getOption(154); + switch (e) { + case 0: + return t === "hover" || t === "clickAndHover"; + case 1: + return t === "click" || t === "clickAndHover"; + case 2: + return true; + } + } + renderHoverParts(e, t) { + const s = this.b; + if (t.length === 0 || !s.hasModel()) { + return new B5([]); + } + if (e.setMinimumDimensions) { + const d = s.getOption(68) + 8; + e.setMinimumDimensions(new Ln(302, d)); + } + const n = new Q(); + const r = t[0]; + const o = s.getModel(); + const a = r.model; + this.a = n.add(new h5s(e.fragment, a, s.getOption(149), this.c, "hover")); + let l = false; + let c = new Z(r.range.startLineNumber, r.range.startColumn, r.range.endLineNumber, r.range.endColumn); + n.add(a.onColorFlushed(async d => { + await l0e(o, a, d, c, r); + l = true; + c = p5s(s, c, a); + })); + n.add(a.onDidChangeColor(d => { + l0e(o, a, d, c, r); + })); + n.add(s.onDidChangeModelContent(d => { + if (l) { + l = false; + } else { + e.hide(); + s.focus(); + } + })); + const u = { + hoverPart: m5s.fromBaseColor(this, r), + hoverElement: this.a.domNode, + dispose() { + n.dispose(); + } + }; + return new B5([u]); + } + getAccessibleContent(e) { + return f(964, null); + } + handleResize() { + this.a?.layout(); + } + handleHide() { + this.a?.dispose(); + this.a = undefined; + } + isColorPickerVisible() { + return !!this.a; + } +}; +jpt = __decorate([__param(1, ti)], jpt); +X(); +nt(); +No(); +Rs(); +Ya(); +wn(); +Ms(); +xe(); +Jt(); +nt(); +ri(); +Ut(); +q(); +In(); +zt(); +Le(); +ope(); +Qd(); +ef(); +yt(); +Eo(); +gc(); +Ya(); +mR(); +Tr(); +Ms(); +pe(); +q(); +rt(); +function PQt(i, e) { + return !!i[e]; +} +var LQt = class { + constructor(i, e) { + this.target = i.target; + this.isLeftClick = i.event.leftButton; + this.isMiddleClick = i.event.middleButton; + this.isRightClick = i.event.rightButton; + this.hasTriggerModifier = PQt(i.event, e.triggerModifier); + this.hasSideBySideModifier = PQt(i.event, e.triggerSideBySideModifier); + this.isNoneOrSingleMouseDown = i.event.detail <= 1; + } +}; +var b5s = class { + constructor(i, e) { + this.keyCodeIsTriggerKey = i.keyCode === e.triggerKey; + this.keyCodeIsSideBySideKey = i.keyCode === e.triggerSideBySideKey; + this.hasTriggerModifier = PQt(i, e.triggerModifier); + } +}; +var zpt = class { + constructor(i, e, t, s) { + this.triggerKey = i; + this.triggerModifier = e; + this.triggerSideBySideKey = t; + this.triggerSideBySideModifier = s; + } + equals(i) { + return this.triggerKey === i.triggerKey && this.triggerModifier === i.triggerModifier && this.triggerSideBySideKey === i.triggerSideBySideKey && this.triggerSideBySideModifier === i.triggerSideBySideModifier; + } +}; +function v5s(i) { + if (i === "altKey") { + if (Gt) { + return new zpt(57, "metaKey", 6, "altKey"); + } else { + return new zpt(5, "ctrlKey", 6, "altKey"); + } + } else if (Gt) { + return new zpt(6, "altKey", 57, "metaKey"); + } else { + return new zpt(6, "altKey", 5, "ctrlKey"); + } +} +var c0e = class extends H { + constructor(i, e) { + super(); + this.a = this.D(new B()); + this.onMouseMoveOrRelevantKeyDown = this.a.event; + this.b = this.D(new B()); + this.onExecute = this.b.event; + this.c = this.D(new B()); + this.onCancel = this.c.event; + this.f = i; + this.g = e?.extractLineNumberFromMouseEvent ?? (t => t.target.position ? t.target.position.lineNumber : 0); + this.h = v5s(this.f.getOption(79)); + this.j = null; + this.m = false; + this.n = 0; + this.D(this.f.onDidChangeConfiguration(t => { + if (t.hasChanged(79)) { + const s = v5s(this.f.getOption(79)); + if (this.h.equals(s)) { + return; + } + this.h = s; + this.j = null; + this.m = false; + this.n = 0; + this.c.fire(); + } + })); + this.D(this.f.onMouseMove(t => this.r(new LQt(t, this.h)))); + this.D(this.f.onMouseDown(t => this.s(new LQt(t, this.h)))); + this.D(this.f.onMouseUp(t => this.t(new LQt(t, this.h)))); + this.D(this.f.onKeyDown(t => this.u(new b5s(t, this.h)))); + this.D(this.f.onKeyUp(t => this.w(new b5s(t, this.h)))); + this.D(this.f.onMouseDrag(() => this.y())); + this.D(this.f.onDidChangeCursorSelection(t => this.q(t))); + this.D(this.f.onDidChangeModel(t => this.y())); + this.D(this.f.onDidChangeModelContent(() => this.y())); + this.D(this.f.onDidScrollChange(t => { + if (t.scrollTopChanged || t.scrollLeftChanged) { + this.y(); + } + })); + } + q(i) { + if (i.selection && i.selection.startColumn !== i.selection.endColumn) { + this.y(); + } + } + r(i) { + this.j = i; + this.a.fire([i, null]); + } + s(i) { + this.m = i.hasTriggerModifier; + this.n = this.g(i); + } + t(i) { + const e = this.g(i); + if (this.m && this.n && this.n === e) { + this.b.fire(i); + } + } + u(i) { + if (this.j && (i.keyCodeIsTriggerKey || i.keyCodeIsSideBySideKey && i.hasTriggerModifier)) { + this.a.fire([this.j, i]); + } else if (i.hasTriggerModifier) { + this.c.fire(); + } + } + w(i) { + if (i.keyCodeIsTriggerKey) { + this.c.fire(); + } + } + y() { + this.j = null; + this.m = false; + this.c.fire(); + } +}; +Ut(); +q(); +Rs(); +yt(); +At(); +Le(); +var y5s = class { + constructor(i, e) { + this.range = i; + this.direction = e; + } +}; +var Ufr = class o_n { + constructor(e, t, s) { + this.hint = e; + this.anchor = t; + this.provider = s; + this.c = false; + } + with(e) { + const t = new o_n(this.hint, e.anchor, this.provider); + t.c = this.c; + t.d = this.d; + return t; + } + async resolve(e) { + if (typeof this.provider.resolveInlayHint == "function") { + if (this.d) { + await this.d; + if (e.isCancellationRequested) { + return undefined; + } else { + return this.resolve(e); + } + } + if (!this.c) { + this.d = this.e(e).finally(() => this.d = undefined); + } + await this.d; + } + } + async e(e) { + try { + const t = await Promise.resolve(this.provider.resolveInlayHint(this.hint, e)); + this.hint.tooltip = t?.tooltip ?? this.hint.tooltip; + this.hint.label = t?.label ?? this.hint.label; + this.hint.textEdits = t?.textEdits ?? this.hint.textEdits; + this.c = true; + } catch (t) { + uh(t); + this.c = false; + } + } +}; +var w5s = class AFt { + static { + this.c = Object.freeze({ + dispose() {}, + hints: [] + }); + } + static async create(e, t, s, n) { + const r = []; + const o = e.ordered(t).reverse().map(a => s.map(async l => { + try { + const c = await a.provideInlayHints(t, l, n); + if (c?.hints.length || a.onDidChangeInlayHints) { + r.push([c ?? AFt.c, a]); + } + } catch (c) { + uh(c); + } + })); + await Promise.all(o.flat()); + if (n.isCancellationRequested || t.isDisposed()) { + throw new fl(); + } + return new AFt(s, r, t); + } + constructor(e, t, s) { + this.d = new Q(); + this.ranges = e; + this.provider = new Set(); + const n = []; + for (const [r, o] of t) { + this.d.add(r); + this.provider.add(o); + for (const a of r.hints) { + const l = s.validatePosition(a.position); + let c = "before"; + const u = AFt.e(s, l); + let d; + if (u.getStartPosition().isBefore(l)) { + d = Z.fromPositions(u.getStartPosition(), l); + c = "after"; + } else { + d = Z.fromPositions(l, u.getEndPosition()); + c = "before"; + } + n.push(new Ufr(a, new y5s(d, c), o)); + } + } + this.items = n.sort((r, o) => je.compare(r.hint.position, o.hint.position)); + } + dispose() { + this.d.dispose(); + } + static e(e, t) { + const s = t.lineNumber; + const n = e.getWordAtPosition(t); + if (n) { + return new Z(s, n.startColumn, s, n.endColumn); + } + e.tokenization.tokenizeIfCheap(s); + const r = e.tokenization.getLineTokens(s); + const o = t.column - 1; + const a = r.findTokenIndexAtOffset(o); + let l = r.getStartOffset(a); + let c = r.getEndOffset(a); + if (c - l === 1) { + if (l === o && a > 1) { + l = r.getStartOffset(a - 1); + c = r.getEndOffset(a - 1); + } else if (c === o && a < r.getCount() - 1) { + l = r.getStartOffset(a + 1); + c = r.getEndOffset(a + 1); + } + } + return new Z(s, l + 1, s, c + 1); + } +}; +function C5s(i) { + return V.from({ + scheme: me.command, + path: i.id, + query: i.arguments && encodeURIComponent(JSON.stringify(i.arguments)) + }).toString(); +} +xe(); +Fs(); +ri(); +Ps(); +yt(); +Ms(); +wc(); +nt(); +Yc(); +zt(); +Le(); +GM(); +wa(); +en(); +Xn(); +Jr(); +Xn(); +Yg(); +Bd(); +Tr(); +Ho(); +Wt(); +Ee(); +te(); +Wi(); +gi(); +qT(); +var Zy = class extends gh { + constructor(e, t, s, n, r, o, a, l, c, u, d, h, g, p) { + super(e, { + ...n.getRawOptions(), + overflowWidgetsDomNode: n.getOverflowWidgetsDomNode() + }, s, r, o, a, l, c, u, d, h, g, p); + this.$ = n; + this.kb = t; + super.updateOptions(this.kb); + this.D(n.onDidChangeConfiguration(b => this.oc(b))); + } + getParentEditor() { + return this.$; + } + oc(e) { + super.updateOptions(this.$.getRawOptions()); + super.updateOptions(this.kb); + } + updateOptions(e) { + Oy(this.kb, e, true); + super.updateOptions(this.kb); + } +}; +Zy = __decorate([__param(4, re), __param(5, ps), __param(6, gt), __param(7, Ne), __param(8, ti), __param(9, ni), __param(10, na), __param(11, Lu), __param(12, nn), __param(13, Rx)], Zy); +Rs(); +yt(); +Sr(); +Eo(); +nt(); +Ut(); +Yc(); +q(); +Xn(); +Rs(); +yt(); +xe(); +sl(); +Fs(); +He(); +Rt(); +Zo(); +pe(); +Jr(); +en(); +Xn(); +xe(); +md(); +Zo(); +Cz(); +q(); +Jr(); +yt(); +Ya(); +var S5s = new ut(new Ti(0, 122, 204)); +var Wfr = { + showArrow: true, + showFrame: true, + className: "", + frameColor: S5s, + arrowColor: S5s, + keepEditorSelection: false, + moveToLineWhenShown: true +}; +var Vfr = "vs.editor.contrib.zoneWidget"; +var Hfr = class { + constructor(i, e, t, s, n, r, o, a) { + this.id = ""; + this.domNode = i; + this.afterLineNumber = e; + this.afterColumn = t; + this.heightInLines = s; + this.showInHiddenAreas = o; + this.ordinal = a; + this.a = n; + this.b = r; + } + onDomNodeTop(i) { + this.a(i); + } + onComputedHeight(i) { + this.b(i); + } +}; +var qfr = class { + constructor(i, e) { + this.a = i; + this.b = e; + } + getId() { + return this.a; + } + getDomNode() { + return this.b; + } + getPosition() { + return null; + } +}; +var jfr = class a_n { + static { + this.a = new vct(".arrow-decoration-"); + } + constructor(e) { + this.g = e; + this.b = a_n.a.nextId(); + this.c = this.g.createDecorationsCollection(); + this.d = null; + this.f = -1; + } + dispose() { + this.hide(); + s4(this.b); + } + set color(e) { + if (this.d !== e) { + this.d = e; + this.h(); + } + } + set height(e) { + if (this.f !== e) { + this.f = e; + this.h(); + } + } + h() { + s4(this.b); + o1(`.monaco-editor ${this.b}`, `border-style: solid; border-color: transparent; border-bottom-color: ${this.d}; border-width: ${this.f}px; bottom: -${this.f}px !important; margin-left: -${this.f}px; `); + } + show(e) { + if (e.column === 1) { + e = { + lineNumber: e.lineNumber, + column: 2 + }; + } + this.c.set([{ + range: Z.fromPositions(e), + options: { + description: "zone-widget-arrow", + className: this.b, + stickiness: 1 + } + }]); + } + hide() { + this.c.clear(); + } +}; +var Bne = class { + constructor(i, e = {}) { + this.f = null; + this.g = null; + this.h = null; + this.l = false; + this.o = null; + this.q = new Q(); + this.container = null; + this.y = false; + this.editor = i; + this.n = this.editor.createDecorationsCollection(); + this.options = Gn(e); + Oy(this.options, Wfr, false); + this.domNode = document.createElement("div"); + if (!this.options.isAccessible) { + this.domNode.setAttribute("aria-hidden", "true"); + this.domNode.setAttribute("role", "presentation"); + } + this.q.add(this.editor.onDidLayoutChange(t => { + const s = this.u(t); + this.domNode.style.width = s + "px"; + this.domNode.style.left = this.v(t) + "px"; + this.E(s); + })); + } + dispose() { + if (this.g) { + this.editor.removeOverlayWidget(this.g); + this.g = null; + } + if (this.o) { + this.editor.changeViewZones(i => { + if (this.o) { + i.removeZone(this.o.id); + } + this.o = null; + }); + } + this.n.clear(); + this.q.dispose(); + } + create() { + this.domNode.classList.add("zone-widget"); + if (this.options.className) { + this.domNode.classList.add(this.options.className); + } + this.container = document.createElement("div"); + this.container.classList.add("zone-widget-container"); + this.domNode.appendChild(this.container); + if (this.options.showArrow) { + this.f = new jfr(this.editor); + this.q.add(this.f); + } + this.D(this.container); + this.H(); + this.t(); + } + style(i) { + if (i.frameColor) { + this.options.frameColor = i.frameColor; + } + if (i.arrowColor) { + this.options.arrowColor = i.arrowColor; + } + this.t(); + } + t() { + if (this.container && this.options.frameColor) { + const i = this.options.frameColor.toString(); + this.container.style.borderTopColor = i; + this.container.style.borderBottomColor = i; + } + if (this.f && this.options.arrowColor) { + const i = this.options.arrowColor.toString(); + this.f.color = i; + } + } + u(i) { + return i.width - i.minimap.minimapWidth - i.verticalScrollbarWidth; + } + v(i) { + if (i.minimap.minimapWidth > 0 && i.minimap.minimapLeft === 0) { + return i.minimap.minimapWidth; + } else { + return 0; + } + } + w(i) { + this.domNode.style.top = i + "px"; + } + x(i) { + this.domNode.style.height = `${i}px`; + if (this.container) { + const e = i - this.z(); + this.container.style.height = `${e}px`; + const t = this.editor.getLayoutInfo(); + this.F(e, this.u(t)); + } + this.h?.layout(); + } + get position() { + const i = this.n.getRange(0); + if (i) { + return i.getStartPosition(); + } + } + hasFocus() { + return this.domNode.contains(Tu()); + } + show(i, e) { + const t = Z.isIRange(i) ? Z.lift(i) : Z.fromPositions(i); + this.y = true; + this.A(t, e); + this.y = false; + this.n.set([{ + range: t, + options: Cr.EMPTY + }]); + } + updatePositionAndHeight(i, e) { + if (this.o) { + i = Z.isIRange(i) ? Z.getStartPosition(i) : i; + this.o.afterLineNumber = i.lineNumber; + this.o.afterColumn = i.column; + this.o.heightInLines = e ?? this.o.heightInLines; + this.editor.changeViewZones(t => { + t.layoutZone(this.o.id); + }); + this.n.set([{ + range: Z.isIRange(i) ? i : Z.fromPositions(i), + options: Cr.EMPTY + }]); + this.I(); + } + } + hide() { + if (this.o) { + this.editor.changeViewZones(i => { + if (this.o) { + i.removeZone(this.o.id); + } + }); + this.o = null; + } + if (this.g) { + this.editor.removeOverlayWidget(this.g); + this.g = null; + } + this.f?.hide(); + this.n.clear(); + this.l = false; + } + z() { + const i = this.editor.getOption(68); + let e = 0; + if (this.options.showArrow) { + const t = Math.round(i / 3); + e += t * 2; + } + if (this.options.showFrame) { + const t = Math.round(i / 9); + e += t * 2; + } + return e; + } + A(i, e) { + const t = i.getStartPosition(); + const s = this.editor.getLayoutInfo(); + const n = this.u(s); + this.domNode.style.width = `${n}px`; + this.domNode.style.left = this.v(s) + "px"; + const r = document.createElement("div"); + r.style.overflow = "hidden"; + const o = this.editor.getOption(68); + if (!this.options.allowUnlimitedHeight) { + const d = Math.max(12, this.editor.getLayoutInfo().height / o * 0.8); + e = Math.min(e, d); + } + let a = 0; + let l = 0; + if (this.f && this.options.showArrow) { + a = Math.round(o / 3); + this.f.height = a; + this.f.show(t); + } + if (this.options.showFrame) { + l = Math.round(o / 9); + } + this.editor.changeViewZones(d => { + if (this.o) { + d.removeZone(this.o.id); + } + if (this.g) { + this.editor.removeOverlayWidget(this.g); + this.g = null; + } + this.domNode.style.top = "-1000px"; + this.o = new Hfr(r, t.lineNumber, t.column, e, h => this.w(h), h => this.x(h), this.options.showInHiddenAreas, this.options.ordinal); + this.o.id = d.addZone(this.o); + this.g = new qfr(Vfr + this.o.id, this.domNode); + this.editor.addOverlayWidget(this.g); + }); + this.I(); + if (this.container && this.options.showFrame) { + const d = this.options.frameWidth ? this.options.frameWidth : l; + this.container.style.borderTopWidth = d + "px"; + this.container.style.borderBottomWidth = d + "px"; + } + const c = e * o - this.z(); + if (this.container) { + this.container.style.top = a + "px"; + this.container.style.height = c + "px"; + this.container.style.overflow = "hidden"; + } + this.F(c, n); + if (!this.options.keepEditorSelection) { + this.editor.setSelection(i); + } + const u = this.editor.getModel(); + if (u && this.options.moveToLineWhenShown) { + const d = u.validateRange(new Z(i.startLineNumber, 1, i.endLineNumber + 1, 1)); + this.B(d, d.startLineNumber === u.getLineCount()); + } + } + B(i, e) { + if (e) { + this.editor.revealLineNearTop(i.endLineNumber, 0); + } else { + this.editor.revealRange(i, 0); + } + } + C(i, e) { + if (this.container) { + if (e) { + this.container.classList.remove(e); + } + this.container.classList.add(i); + } + } + E(i) {} + F(i, e) {} + G(i) { + if (this.o && this.o.heightInLines !== i) { + this.editor.changeViewZones(e => { + if (this.o) { + this.o.heightInLines = i; + e.layoutZone(this.o.id); + } + }); + this.I(); + } + } + H() { + if (this.h) { + return; + } + this.h = this.q.add(new IR(this.domNode, this, { + orientation: 1 + })); + if (!this.options.isResizeable) { + this.h.state = 0; + } + let i; + this.q.add(this.h.onDidStart(e => { + if (this.o) { + i = { + startY: e.startY, + heightInLines: this.o.heightInLines, + ...this.K() + }; + } + })); + this.q.add(this.h.onDidEnd(() => { + i = undefined; + })); + this.q.add(this.h.onDidChange(e => { + if (i) { + const t = (e.currentY - i.startY) / this.editor.getOption(68); + const s = t < 0 ? Math.ceil(t) : Math.floor(t); + const n = i.heightInLines + s; + if (n > i.minLines && n < i.maxLines) { + this.l = true; + this.G(n); + } + } + })); + } + I() { + if (this.h) { + const { + minLines: i, + maxLines: e + } = this.K(); + this.h.state = i === e ? 0 : 3; + } + } + get J() { + return this.l; + } + K() { + return { + minLines: 5, + maxLines: 35 + }; + } + getHorizontalSashLeft() { + return 0; + } + getHorizontalSashTop() { + return (this.domNode.style.height === null ? 0 : parseInt(this.domNode.style.height)) - this.z() / 2; + } + getHorizontalSashWidth() { + const i = this.editor.getLayoutInfo(); + return i.width - i.minimap.minimapWidth; + } +}; +X(); +Ee(); +It(); +te(); +Qs(); +var u0e = Ve("IPeekViewService"); +it(u0e, class { + constructor() { + this.a = new Map(); + } + addExclusiveWidget(i, e) { + const t = this.a.get(i); + if (t) { + t.listener.dispose(); + t.widget.dispose(); + } + const s = () => { + const n = this.a.get(i); + if (n && n.widget === e) { + n.listener.dispose(); + this.a.delete(i); + } + }; + this.a.set(i, { + widget: e, + listener: e.onDidClose(s) + }); + } +}, 1); +var Ib; +(function (i) { + i.inPeekEditor = new fe("inReferenceSearchEditor", true, f(1365, null)); + i.notInPeekEditor = i.inPeekEditor.toNegated(); +})(Ib ||= {}); +var Jpt = class { + static { + this.ID = "editor.contrib.referenceController"; + } + constructor(e, t) { + if (e instanceof Zy) { + Ib.inPeekEditor.bindTo(t); + } + } + dispose() {} +}; +Jpt = __decorate([__param(1, Ne)], Jpt); +bo(Jpt.ID, Jpt, 0); +function x5s(i) { + const e = i.get(ps).getFocusedCodeEditor(); + if (e instanceof Zy) { + return e.getParentEditor(); + } else { + return e; + } +} +var zfr = { + headerBackgroundColor: ut.white, + primaryHeadingColor: ut.fromHex("#333333"), + secondaryHeadingColor: ut.fromHex("#6c6c6cb3") +}; +var W5 = class extends Bne { + constructor(e, t, s) { + super(e, t); + this.Q = s; + this.j = new B(); + this.onDidClose = this.j.event; + Oy(this.options, zfr, false); + } + dispose() { + if (!this.k) { + this.k = true; + super.dispose(); + this.j.fire(this); + } + } + style(e) { + const t = this.options; + if (e.headerBackgroundColor) { + t.headerBackgroundColor = e.headerBackgroundColor; + } + if (e.primaryHeadingColor) { + t.primaryHeadingColor = e.primaryHeadingColor; + } + if (e.secondaryHeadingColor) { + t.secondaryHeadingColor = e.secondaryHeadingColor; + } + super.style(e); + } + t() { + super.t(); + const e = this.options; + if (this.p && e.headerBackgroundColor) { + this.p.style.backgroundColor = e.headerBackgroundColor.toString(); + } + if (this.L && e.primaryHeadingColor) { + this.L.style.color = e.primaryHeadingColor.toString(); + } + if (this.M && e.secondaryHeadingColor) { + this.M.style.color = e.secondaryHeadingColor.toString(); + } + if (this.P && e.frameColor) { + this.P.style.borderColor = e.frameColor.toString(); + } + } + D(e) { + this.C("peekview-widget"); + this.p = G(".head"); + this.P = G(".body"); + this.T(this.p); + this.X(this.P); + e.appendChild(this.p); + e.appendChild(this.P); + } + T(e, t) { + this.s = G(".peekview-title"); + if (this.options.supportOnTitleClick) { + this.s.classList.add("clickable"); + ko(this.s, "click", r => this.W(r)); + } + z(this.p, this.s); + this.U(this.s); + this.L = G("span.filename"); + this.M = G("span.dirname"); + this.N = G("span.meta"); + z(this.s, this.L, this.M, this.N); + const s = G(".peekview-actions"); + z(this.p, s); + const n = this.V(); + this.O = new ea(s, n); + this.q.add(this.O); + if (!t) { + this.O.push(new Yt("peekview.close", f(1366, null), le.asClassName(A.close), true, () => { + this.dispose(); + return Promise.resolve(); + }), { + label: false, + icon: true + }); + } + } + U(e) {} + V() { + return { + actionViewItemProvider: Ig.bind(undefined, this.Q), + orientation: 0 + }; + } + W(e) {} + setTitle(e, t) { + if (this.L && this.M) { + this.L.innerText = e; + this.L.setAttribute("title", e); + if (t) { + this.M.innerText = t; + } else { + Lr(this.M); + } + } + } + setMetaTitle(e) { + if (this.N) { + if (e) { + this.N.innerText = e; + Ka(this.N); + } else { + Qo(this.N); + } + } + } + F(e, t) { + if (!this.y && e < 0) { + this.dispose(); + return; + } + const s = Math.ceil(this.editor.getOption(68) * 1.2); + const n = Math.round(e - (s + 2)); + this.Z(s, t); + this.ab(n, t); + } + Z(e, t) { + if (this.p) { + this.p.style.height = `${e}px`; + this.p.style.lineHeight = this.p.style.height; + } + } + ab(e, t) { + if (this.P) { + this.P.style.height = `${e}px`; + } + } +}; +W5 = __decorate([__param(2, re)], W5); +var mG = he("peekViewTitle.background", { + dark: "#252526", + light: "#F3F3F3", + hcDark: ut.black, + hcLight: ut.white +}, f(1367, null)); +var bG = he("peekViewTitleLabel.foreground", { + dark: ut.white, + light: ut.black, + hcDark: ut.white, + hcLight: wm +}, f(1368, null)); +var vG = he("peekViewTitleDescription.foreground", { + dark: "#ccccccb3", + light: "#616161", + hcDark: "#FFFFFF99", + hcLight: "#292929" +}, f(1369, null)); +var wO = he("peekView.border", { + dark: Fw, + light: Fw, + hcDark: cn, + hcLight: cn +}, f(1370, null)); +var Gpt = he("peekViewResult.background", { + dark: "#252526", + light: "#F3F3F3", + hcDark: ut.black, + hcLight: ut.white +}, f(1371, null)); +var vna = he("peekViewResult.lineForeground", { + dark: "#bbbbbb", + light: "#646465", + hcDark: ut.white, + hcLight: wm +}, f(1372, null)); +var yna = he("peekViewResult.fileForeground", { + dark: ut.white, + light: "#1E1E1E", + hcDark: ut.white, + hcLight: wm +}, f(1373, null)); +var wna = he("peekViewResult.selectionBackground", { + dark: "#3399ff33", + light: "#3399ff33", + hcDark: null, + hcLight: null +}, f(1374, null)); +var Cna = he("peekViewResult.selectionForeground", { + dark: ut.white, + light: "#6C6C6C", + hcDark: ut.white, + hcLight: wm +}, f(1375, null)); +var k5s = he("peekViewEditor.background", { + dark: "#001F33", + light: "#F2F8FC", + hcDark: ut.black, + hcLight: ut.white +}, f(1376, null)); +var Sna = he("peekViewEditorGutter.background", k5s, f(1377, null)); +var xna = he("peekViewEditorStickyScroll.background", k5s, f(1378, null)); +var kna = he("peekViewResult.matchHighlightBackground", { + dark: "#ea5c004d", + light: "#ea5c004d", + hcDark: null, + hcLight: null +}, f(1379, null)); +var E5s = he("peekViewEditor.matchHighlightBackground", { + dark: "#ff8f0099", + light: "#f5d802de", + hcDark: null, + hcLight: null +}, f(1380, null)); +var Ena = he("peekViewEditor.matchHighlightBorder", { + dark: null, + light: null, + hcDark: Oc, + hcLight: Oc +}, f(1381, null)); +X(); +Wt(); +Me(); +Ee(); +te(); +Wu(); +xe(); +Jt(); +ri(); +pe(); +q(); +Mls(); +oS(); +xe(); +var Jfr = class { + get templateId() { + return this.a.templateId; + } + constructor(i, e) { + this.a = i; + this.b = e; + } + renderTemplate(i) { + return { + data: this.a.renderTemplate(i), + disposable: H.None + }; + } + renderElement(i, e, t, s) { + t.disposable?.dispose(); + if (!t.data) { + return; + } + const n = this.b(); + if (n.isResolved(i)) { + return this.a.renderElement(n.get(i), i, t.data, s); + } + const r = new Xi(); + const o = n.resolve(i, r.token); + t.disposable = { + dispose: () => r.cancel() + }; + this.a.renderPlaceholder(i, t.data); + o.then(a => this.a.renderElement(a, i, t.data, s)); + } + disposeTemplate(i) { + if (i.disposable) { + i.disposable.dispose(); + i.disposable = undefined; + } + if (i.data) { + this.a.disposeTemplate(i.data); + i.data = undefined; + } + } +}; +var Gfr = class { + constructor(i, e) { + this.a = i; + this.b = e; + } + getWidgetAriaLabel() { + return this.b.getWidgetAriaLabel(); + } + getAriaLabel(i) { + const e = this.a(); + if (e.isResolved(i)) { + return this.b.getAriaLabel(e.get(i)); + } else { + return null; + } + } +}; +function Kfr(i, e) { + return { + ...e, + accessibilityProvider: e.accessibilityProvider && new Gfr(i, e.accessibilityProvider) + }; +} +var Une = class { + constructor(i, e, t, s, n = {}) { + const r = () => this.model; + const o = s.map(a => new Jfr(a, r)); + this.a = new Cg(i, e, t, o, Kfr(r, n)); + } + updateOptions(i) { + this.a.updateOptions(i); + } + getHTMLElement() { + return this.a.getHTMLElement(); + } + isDOMFocused() { + return Jg(this.getHTMLElement()); + } + domFocus() { + this.a.domFocus(); + } + get onDidFocus() { + return this.a.onDidFocus; + } + get onDidBlur() { + return this.a.onDidBlur; + } + get widget() { + return this.a; + } + get onDidDispose() { + return this.a.onDidDispose; + } + get onMouseClick() { + return de.map(this.a.onMouseClick, ({ + element: i, + index: e, + browserEvent: t + }) => ({ + element: i === undefined ? undefined : this.b.get(i), + index: e, + browserEvent: t + })); + } + get onMouseDblClick() { + return de.map(this.a.onMouseDblClick, ({ + element: i, + index: e, + browserEvent: t + }) => ({ + element: i === undefined ? undefined : this.b.get(i), + index: e, + browserEvent: t + })); + } + get onTap() { + return de.map(this.a.onTap, ({ + element: i, + index: e, + browserEvent: t + }) => ({ + element: i === undefined ? undefined : this.b.get(i), + index: e, + browserEvent: t + })); + } + get onPointer() { + return de.map(this.a.onPointer, ({ + element: i, + index: e, + browserEvent: t + }) => ({ + element: i === undefined ? undefined : this.b.get(i), + index: e, + browserEvent: t + })); + } + get onDidChangeFocus() { + return de.map(this.a.onDidChangeFocus, ({ + elements: i, + indexes: e, + browserEvent: t + }) => ({ + elements: i.map(s => this.b.get(s)), + indexes: e, + browserEvent: t + })); + } + get onDidChangeSelection() { + return de.map(this.a.onDidChangeSelection, ({ + elements: i, + indexes: e, + browserEvent: t + }) => ({ + elements: i.map(s => this.b.get(s)), + indexes: e, + browserEvent: t + })); + } + get onContextMenu() { + return de.map(this.a.onContextMenu, ({ + element: i, + index: e, + anchor: t, + browserEvent: s + }) => typeof i === "undefined" ? { + element: i, + index: e, + anchor: t, + browserEvent: s + } : { + element: this.b.get(i), + index: e, + anchor: t, + browserEvent: s + }); + } + get model() { + return this.b; + } + set model(i) { + this.b = i; + this.a.splice(0, this.a.length, $0(i.length)); + } + get length() { + return this.a.length; + } + get scrollTop() { + return this.a.scrollTop; + } + set scrollTop(i) { + this.a.scrollTop = i; + } + get scrollLeft() { + return this.a.scrollLeft; + } + set scrollLeft(i) { + this.a.scrollLeft = i; + } + setAnchor(i) { + this.a.setAnchor(i); + } + getAnchor() { + return this.a.getAnchor(); + } + setFocus(i) { + this.a.setFocus(i); + } + focusNext(i, e) { + this.a.focusNext(i, e); + } + focusPrevious(i, e) { + this.a.focusPrevious(i, e); + } + focusNextPage() { + return this.a.focusNextPage(); + } + focusPreviousPage() { + return this.a.focusPreviousPage(); + } + focusLast() { + this.a.focusLast(); + } + focusFirst() { + this.a.focusFirst(); + } + getFocus() { + return this.a.getFocus(); + } + setSelection(i, e) { + this.a.setSelection(i, e); + } + getSelection() { + return this.a.getSelection(); + } + getSelectedElements() { + return this.getSelection().map(i => this.model.get(i)); + } + layout(i, e) { + this.a.layout(i, e); + } + triggerTypeNavigation() { + this.a.triggerTypeNavigation(); + } + reveal(i, e) { + this.a.reveal(i, e); + } + style(i) { + this.a.style(i); + } + dispose() { + this.a.dispose(); + } +}; +oS(); +xe(); +md(); +aS(); +oa(); +oS(); +xe(); +q0(); +Kg(); +Jt(); +Zo(); +pe(); +q(); +Xf(); +O9(); +zt(); +var Yfr = { + separatorBorder: ut.transparent +}; +var I5s; +(function (i) { + i[i.Normal = 0] = "Normal"; + i[i.Low = 1] = "Low"; + i[i.High = 2] = "High"; +})(I5s ||= {}); +var D5s = class { + set size(i) { + this.a = i; + } + get size() { + return this.a; + } + get cachedVisibleSize() { + return this.b; + } + get visible() { + return typeof this.b === "undefined"; + } + setVisible(i, e) { + if (i !== this.visible) { + if (i) { + this.size = yc(this.b, this.viewMinimumSize, this.viewMaximumSize); + this.b = undefined; + } else { + this.b = typeof e == "number" ? e : this.size; + this.size = 0; + } + this.c.classList.toggle("visible", i); + try { + this.view.setVisible?.(i); + } catch (t) { + console.error("Splitview: Failed to set visible view"); + console.error(t); + } + } + } + get minimumSize() { + if (this.visible) { + return this.view.minimumSize; + } else { + return 0; + } + } + get viewMinimumSize() { + return this.view.minimumSize; + } + get maximumSize() { + if (this.visible) { + return this.view.maximumSize; + } else { + return 0; + } + } + get viewMaximumSize() { + return this.view.maximumSize; + } + get priority() { + return this.view.priority; + } + get proportionalLayout() { + return this.view.proportionalLayout ?? true; + } + get snap() { + return !!this.view.snap; + } + set enabled(i) { + this.c.style.pointerEvents = i ? "" : "none"; + } + constructor(i, e, t, s) { + this.c = i; + this.view = e; + this.d = s; + this.b = undefined; + if (typeof t == "number") { + this.a = t; + this.b = undefined; + i.classList.add("visible"); + } else { + this.a = 0; + this.b = t.cachedVisibleSize; + } + } + layout(i, e) { + this.layoutContainer(i); + try { + this.view.layout(this.size, i, e); + } catch (t) { + console.error("Splitview: Failed to layout view"); + console.error(t); + } + } + dispose() { + this.d.dispose(); + } +}; +var Xfr = class extends D5s { + layoutContainer(i) { + this.c.style.top = `${i}px`; + this.c.style.height = `${this.size}px`; + } +}; +var Qfr = class extends D5s { + layoutContainer(i) { + this.c.style.left = `${i}px`; + this.c.style.width = `${this.size}px`; + } +}; +var L1; +(function (i) { + i[i.Idle = 0] = "Idle"; + i[i.Busy = 1] = "Busy"; +})(L1 ||= {}); +var Tg; +(function (i) { + i.Distribute = { + type: "distribute" + }; + function e(n) { + return { + type: "split", + index: n + }; + } + i.Split = e; + function t(n) { + return { + type: "auto", + index: n + }; + } + i.Auto = t; + function s(n) { + return { + type: "invisible", + cachedVisibleSize: n + }; + } + i.Invisible = s; +})(Tg ||= {}); +var Yx = class extends H { + get contentSize() { + return this.j; + } + get length() { + return this.n.length; + } + get minimumSize() { + return this.n.reduce((i, e) => i + e.minimumSize, 0); + } + get maximumSize() { + if (this.length === 0) { + return Number.POSITIVE_INFINITY; + } else { + return this.n.reduce((i, e) => i + e.maximumSize, 0); + } + } + get orthogonalStartSash() { + return this.F; + } + get orthogonalEndSash() { + return this.G; + } + get startSnappingEnabled() { + return this.H; + } + get endSnappingEnabled() { + return this.I; + } + set orthogonalStartSash(i) { + for (const e of this.sashItems) { + e.sash.orthogonalStartSash = i; + } + this.F = i; + } + set orthogonalEndSash(i) { + for (const e of this.sashItems) { + e.sash.orthogonalEndSash = i; + } + this.G = i; + } + get sashes() { + return this.sashItems.map(i => i.sash); + } + set startSnappingEnabled(i) { + if (this.H !== i) { + this.H = i; + this.X(); + } + } + set endSnappingEnabled(i) { + if (this.I !== i) { + this.I = i; + this.X(); + } + } + constructor(i, e = {}) { + super(); + this.g = 0; + this.j = 0; + this.m = undefined; + this.n = []; + this.sashItems = []; + this.t = L1.Idle; + this.z = this.D(new B()); + this.C = this.D(new B()); + this.H = true; + this.I = true; + this.onDidSashChange = this.z.event; + this.onDidSashReset = this.C.event; + this.orientation = e.orientation ?? 0; + this.u = e.inverseAltBehavior ?? false; + this.w = e.proportionalLayout ?? true; + this.y = e.getSashOrthogonalSize; + this.el = document.createElement("div"); + this.el.classList.add("monaco-split-view2"); + this.el.classList.add(this.orientation === 0 ? "vertical" : "horizontal"); + i.appendChild(this.el); + this.a = z(this.el, G(".sash-container")); + this.b = G(".split-view-container"); + this.c = this.D(new p4({ + forceIntegerValues: true, + smoothScrollDuration: 125, + scheduleAtNextAnimationFrame: s => Zc(Kt(this.el), s) + })); + this.f = this.D(new cte(this.b, { + vertical: this.orientation === 0 ? e.scrollbarVisibility ?? 1 : 2, + horizontal: this.orientation === 1 ? e.scrollbarVisibility ?? 1 : 2 + }, this.c)); + const t = this.D(new Co(this.b, "scroll")).event; + this.D(t(s => { + const n = this.f.getScrollPosition(); + const r = Math.abs(this.b.scrollLeft - n.scrollLeft) <= 1 ? undefined : this.b.scrollLeft; + const o = Math.abs(this.b.scrollTop - n.scrollTop) <= 1 ? undefined : this.b.scrollTop; + if (r !== undefined || o !== undefined) { + this.f.setScrollPosition({ + scrollLeft: r, + scrollTop: o + }); + } + })); + this.onDidScroll = this.f.onScroll; + this.D(this.onDidScroll(s => { + if (s.scrollTopChanged) { + this.b.scrollTop = s.scrollTop; + } + if (s.scrollLeftChanged) { + this.b.scrollLeft = s.scrollLeft; + } + })); + z(this.el, this.f.getDomNode()); + this.style(e.styles || Yfr); + if (e.descriptor) { + this.g = e.descriptor.size; + e.descriptor.views.forEach((s, n) => { + const r = qo(s.visible) || s.visible ? s.size : { + type: "invisible", + cachedVisibleSize: s.size + }; + const o = s.view; + this.P(o, r, n, true); + }); + this.j = this.n.reduce((s, n) => s + n.size, 0); + this.J(); + } + } + style(i) { + if (i.separatorBorder.isTransparent()) { + this.el.classList.remove("separator-border"); + this.el.style.removeProperty("--separator-border"); + } else { + this.el.classList.add("separator-border"); + this.el.style.setProperty("--separator-border", i.separatorBorder.toString()); + } + } + addView(i, e, t = this.n.length, s) { + this.P(i, e, t, s); + } + removeView(i, e) { + if (i < 0 || i >= this.n.length) { + throw new Error("Index out of bounds"); + } + if (this.t !== L1.Idle) { + throw new Error("Cant modify splitview"); + } + this.t = L1.Busy; + try { + if (e?.type === "auto") { + if (this.ab()) { + e = { + type: "distribute" + }; + } else { + e = { + type: "split", + index: e.index + }; + } + } + const t = e?.type === "split" ? this.n[e.index] : undefined; + const s = this.n.splice(i, 1)[0]; + if (t) { + t.size += s.size; + } + if (this.n.length >= 1) { + const r = Math.max(i - 1, 0); + this.sashItems.splice(r, 1)[0].disposable.dispose(); + } + this.Q(); + if (e?.type === "distribute") { + this.distributeViewSizes(); + } + const n = s.view; + s.dispose(); + return n; + } finally { + this.t = L1.Idle; + } + } + removeAllViews() { + if (this.t !== L1.Idle) { + throw new Error("Cant modify splitview"); + } + this.t = L1.Busy; + try { + const i = this.n.splice(0, this.n.length); + for (const t of i) { + t.dispose(); + } + const e = this.sashItems.splice(0, this.sashItems.length); + for (const t of e) { + t.disposable.dispose(); + } + this.Q(); + return i.map(t => t.view); + } finally { + this.t = L1.Idle; + } + } + moveView(i, e) { + if (this.t !== L1.Idle) { + throw new Error("Cant modify splitview"); + } + const t = this.getViewCachedVisibleSize(i); + const s = typeof t === "undefined" ? this.getViewSize(i) : Tg.Invisible(t); + const n = this.removeView(i); + this.addView(n, s, e); + } + swapViews(i, e) { + if (this.t !== L1.Idle) { + throw new Error("Cant modify splitview"); + } + if (i > e) { + return this.swapViews(e, i); + } + const t = this.getViewSize(i); + const s = this.getViewSize(e); + const n = this.removeView(e); + const r = this.removeView(i); + this.addView(n, t, i); + this.addView(r, s, e); + } + isViewVisible(i) { + if (i < 0 || i >= this.n.length) { + throw new Error("Index out of bounds"); + } + return this.n[i].visible; + } + setViewVisible(i, e) { + if (i < 0 || i >= this.n.length) { + throw new Error("Index out of bounds"); + } + this.n[i].setVisible(e); + this.S(i); + this.U(); + this.J(); + } + getViewCachedVisibleSize(i) { + if (i < 0 || i >= this.n.length) { + throw new Error("Index out of bounds"); + } + return this.n[i].cachedVisibleSize; + } + layout(i, e) { + const t = Math.max(this.g, this.j); + this.g = i; + this.h = e; + if (this.m) { + let s = 0; + for (let n = 0; n < this.n.length; n++) { + const r = this.n[n]; + const o = this.m[n]; + if (typeof o == "number") { + s += o; + } else { + i -= r.size; + } + } + for (let n = 0; n < this.n.length; n++) { + const r = this.n[n]; + const o = this.m[n]; + if (typeof o == "number" && s > 0) { + r.size = yc(Math.round(o * i / s), r.minimumSize, r.maximumSize); + } + } + } else { + const s = $0(this.n.length); + const n = s.filter(o => this.n[o].priority === 1); + const r = s.filter(o => this.n[o].priority === 2); + this.R(this.n.length - 1, i - t, undefined, n, r); + } + this.S(); + this.U(); + } + J() { + if (this.w && this.j > 0) { + this.m = this.n.map(i => i.proportionalLayout && i.visible ? i.size / this.j : undefined); + } + } + L({ + sash: i, + start: e, + alt: t + }) { + for (const o of this.n) { + o.enabled = false; + } + const s = this.sashItems.findIndex(o => o.sash === i); + const n = Gc(Ce(this.el.ownerDocument.body, "keydown", o => r(this.q.current, o.altKey)), Ce(this.el.ownerDocument.body, "keyup", () => r(this.q.current, false))); + const r = (o, a) => { + const l = this.n.map(g => g.size); + let c = Number.NEGATIVE_INFINITY; + let u = Number.POSITIVE_INFINITY; + if (this.u) { + a = !a; + } + if (a) { + if (s === this.sashItems.length - 1) { + const p = this.n[s]; + c = (p.minimumSize - p.size) / 2; + u = (p.maximumSize - p.size) / 2; + } else { + const p = this.n[s + 1]; + c = (p.size - p.maximumSize) / 2; + u = (p.size - p.minimumSize) / 2; + } + } + let d; + let h; + if (!a) { + const g = $0(s, -1); + const p = $0(s + 1, this.n.length); + const b = g.reduce((E, D) => E + (this.n[D].minimumSize - l[D]), 0); + const v = g.reduce((E, D) => E + (this.n[D].viewMaximumSize - l[D]), 0); + const y = p.length === 0 ? Number.POSITIVE_INFINITY : p.reduce((E, D) => E + (l[D] - this.n[D].minimumSize), 0); + const w = p.length === 0 ? Number.NEGATIVE_INFINITY : p.reduce((E, D) => E + (l[D] - this.n[D].viewMaximumSize), 0); + const C = Math.max(b, w); + const S = Math.min(y, v); + const x = this.Z(g); + const k = this.Z(p); + if (typeof x == "number") { + const E = this.n[x]; + const D = Math.floor(E.viewMinimumSize / 2); + d = { + index: x, + limitDelta: E.visible ? C - D : C + D, + size: E.size + }; + } + if (typeof k == "number") { + const E = this.n[k]; + const D = Math.floor(E.viewMinimumSize / 2); + h = { + index: k, + limitDelta: E.visible ? S + D : S - D, + size: E.size + }; + } + } + this.q = { + start: o, + current: o, + index: s, + sizes: l, + minDelta: c, + maxDelta: u, + alt: a, + snapBefore: d, + snapAfter: h, + disposable: n + }; + }; + r(e, t); + } + M({ + current: i + }) { + const { + index: e, + start: t, + sizes: s, + alt: n, + minDelta: r, + maxDelta: o, + snapBefore: a, + snapAfter: l + } = this.q; + this.q.current = i; + const c = i - t; + const u = this.R(e, c, s, undefined, undefined, r, o, a, l); + if (n) { + const d = e === this.sashItems.length - 1; + const h = this.n.map(w => w.size); + const g = d ? e : e + 1; + const p = this.n[g]; + const b = p.size - p.maximumSize; + const v = p.size - p.minimumSize; + const y = d ? e - 1 : e + 1; + this.R(y, -u, h, undefined, undefined, b, v); + } + this.S(); + this.U(); + } + N(i) { + this.z.fire(i); + this.q.disposable.dispose(); + this.J(); + for (const e of this.n) { + e.enabled = true; + } + } + O(i, e) { + const t = this.n.indexOf(i); + if (!(t < 0) && !(t >= this.n.length)) { + e = typeof e == "number" ? e : i.size; + e = yc(e, i.minimumSize, i.maximumSize); + if (this.u && t > 0) { + this.R(t - 1, Math.floor((i.size - e) / 2)); + this.S(); + this.U(); + } else { + i.size = e; + this.Q([t], undefined); + } + } + } + resizeView(i, e) { + if (!(i < 0) && !(i >= this.n.length)) { + if (this.t !== L1.Idle) { + throw new Error("Cant modify splitview"); + } + this.t = L1.Busy; + try { + const t = $0(this.n.length).filter(o => o !== i); + const s = [...t.filter(o => this.n[o].priority === 1), i]; + const n = t.filter(o => this.n[o].priority === 2); + const r = this.n[i]; + e = Math.round(e); + e = yc(e, r.minimumSize, Math.min(r.maximumSize, this.g)); + r.size = e; + this.Q(s, n); + } finally { + this.t = L1.Idle; + } + } + } + isViewExpanded(i) { + if (i < 0 || i >= this.n.length) { + return false; + } + for (const e of this.n) { + if (e !== this.n[i] && e.size > e.minimumSize) { + return false; + } + } + return true; + } + distributeViewSizes() { + const i = []; + let e = 0; + for (const o of this.n) { + if (o.maximumSize - o.minimumSize > 0) { + i.push(o); + e += o.size; + } + } + const t = Math.floor(e / i.length); + for (const o of i) { + o.size = yc(t, o.minimumSize, o.maximumSize); + } + const s = $0(this.n.length); + const n = s.filter(o => this.n[o].priority === 1); + const r = s.filter(o => this.n[o].priority === 2); + this.Q(n, r); + } + getViewSize(i) { + if (i < 0 || i >= this.n.length) { + return -1; + } else { + return this.n[i].size; + } + } + P(i, e, t = this.n.length, s) { + if (this.t !== L1.Idle) { + throw new Error("Cant modify splitview"); + } + this.t = L1.Busy; + try { + const n = G(".split-view-view"); + if (t === this.n.length) { + this.b.appendChild(n); + } else { + this.b.insertBefore(n, this.b.children.item(t)); + } + const r = i.onDidChange(d => this.O(c, d)); + const o = Ue(() => n.remove()); + const a = Gc(r, o); + let l; + if (typeof e == "number") { + l = e; + } else { + if (e.type === "auto") { + if (this.ab()) { + e = { + type: "distribute" + }; + } else { + e = { + type: "split", + index: e.index + }; + } + } + if (e.type === "split") { + l = this.getViewSize(e.index) / 2; + } else if (e.type === "invisible") { + l = { + cachedVisibleSize: e.cachedVisibleSize + }; + } else { + l = i.minimumSize; + } + } + const c = this.orientation === 0 ? new Xfr(n, i, l, a) : new Qfr(n, i, l, a); + this.n.splice(t, 0, c); + if (this.n.length > 1) { + const d = { + orthogonalStartSash: this.orthogonalStartSash, + orthogonalEndSash: this.orthogonalEndSash + }; + const h = this.orientation === 0 ? new IR(this.a, { + getHorizontalSashTop: E => this.Y(E), + getHorizontalSashWidth: this.y + }, { + ...d, + orientation: 1 + }) : new IR(this.a, { + getVerticalSashLeft: E => this.Y(E), + getVerticalSashHeight: this.y + }, { + ...d, + orientation: 0 + }); + const g = this.orientation === 0 ? E => ({ + sash: h, + start: E.startY, + current: E.currentY, + alt: E.altKey + }) : E => ({ + sash: h, + start: E.startX, + current: E.currentX, + alt: E.altKey + }); + const b = de.map(h.onDidStart, g)(this.L, this); + const y = de.map(h.onDidChange, g)(this.M, this); + const C = de.map(h.onDidEnd, () => this.sashItems.findIndex(E => E.sash === h))(this.N, this); + const S = h.onDidReset(() => { + const E = this.sashItems.findIndex(F => F.sash === h); + const D = $0(E, -1); + const P = $0(E + 1, this.n.length); + const R = this.Z(D); + const L = this.Z(P); + if ((typeof R != "number" || !!this.n[R].visible) && (typeof L != "number" || !!this.n[L].visible)) { + this.C.fire(E); + } + }); + const x = Gc(b, y, C, S, h); + const k = { + sash: h, + disposable: x + }; + this.sashItems.splice(t - 1, 0, k); + } + n.appendChild(i.element); + let u; + if (typeof e != "number" && e.type === "split") { + u = [e.index]; + } + if (!s) { + this.Q([t], u); + } + if (!s && typeof e != "number" && e.type === "distribute") { + this.distributeViewSizes(); + } + } finally { + this.t = L1.Idle; + } + } + Q(i, e) { + const t = this.n.reduce((s, n) => s + n.size, 0); + this.R(this.n.length - 1, this.g - t, undefined, i, e); + this.S(); + this.U(); + this.J(); + } + R(i, e, t = this.n.map(c => c.size), s, n, r = Number.NEGATIVE_INFINITY, o = Number.POSITIVE_INFINITY, a, l) { + if (i < 0 || i >= this.n.length) { + return 0; + } + const c = $0(i, -1); + const u = $0(i + 1, this.n.length); + if (n) { + for (const k of n) { + UBt(c, k); + UBt(u, k); + } + } + if (s) { + for (const k of s) { + vnt(c, k); + vnt(u, k); + } + } + const d = c.map(k => this.n[k]); + const h = c.map(k => t[k]); + const g = u.map(k => this.n[k]); + const p = u.map(k => t[k]); + const b = c.reduce((k, E) => k + (this.n[E].minimumSize - t[E]), 0); + const v = c.reduce((k, E) => k + (this.n[E].maximumSize - t[E]), 0); + const y = u.length === 0 ? Number.POSITIVE_INFINITY : u.reduce((k, E) => k + (t[E] - this.n[E].minimumSize), 0); + const w = u.length === 0 ? Number.NEGATIVE_INFINITY : u.reduce((k, E) => k + (t[E] - this.n[E].maximumSize), 0); + const C = Math.max(b, w, r); + const S = Math.min(y, v, o); + let x = false; + if (a) { + const k = this.n[a.index]; + const E = e >= a.limitDelta; + x = E !== k.visible; + k.setVisible(E, a.size); + } + if (!x && l) { + const k = this.n[l.index]; + const E = e < l.limitDelta; + x = E !== k.visible; + k.setVisible(E, l.size); + } + if (x) { + return this.R(i, e, t, s, n, r, o); + } + e = yc(e, C, S); + for (let k = 0, E = e; k < d.length; k++) { + const D = d[k]; + const P = yc(h[k] + E, D.minimumSize, D.maximumSize); + const R = P - h[k]; + E -= R; + D.size = P; + } + for (let k = 0, E = e; k < g.length; k++) { + const D = g[k]; + const P = yc(p[k] - E, D.minimumSize, D.maximumSize); + const R = P - p[k]; + E += R; + D.size = P; + } + return e; + } + S(i) { + const e = this.n.reduce((o, a) => o + a.size, 0); + let t = this.g - e; + const s = $0(this.n.length - 1, -1); + const n = s.filter(o => this.n[o].priority === 1); + const r = s.filter(o => this.n[o].priority === 2); + for (const o of r) { + UBt(s, o); + } + for (const o of n) { + vnt(s, o); + } + if (typeof i == "number") { + vnt(s, i); + } + for (let o = 0; t !== 0 && o < s.length; o++) { + const a = this.n[s[o]]; + const l = yc(a.size + t, a.minimumSize, a.maximumSize); + const c = l - a.size; + t -= c; + a.size = l; + } + } + U() { + this.j = this.n.reduce((e, t) => e + t.size, 0); + let i = 0; + for (const e of this.n) { + e.layout(i, this.h); + i += e.size; + } + this.sashItems.forEach(e => e.sash.layout()); + this.X(); + this.W(); + } + W() { + if (this.orientation === 0) { + this.f.setScrollDimensions({ + height: this.g, + scrollHeight: this.j + }); + } else { + this.f.setScrollDimensions({ + width: this.g, + scrollWidth: this.j + }); + } + } + X() { + let i = false; + const e = this.n.map(a => i = a.size - a.minimumSize > 0 || i); + i = false; + const t = this.n.map(a => i = a.maximumSize - a.size > 0 || i); + const s = [...this.n].reverse(); + i = false; + const n = s.map(a => i = a.size - a.minimumSize > 0 || i).reverse(); + i = false; + const r = s.map(a => i = a.maximumSize - a.size > 0 || i).reverse(); + let o = 0; + for (let a = 0; a < this.sashItems.length; a++) { + const { + sash: l + } = this.sashItems[a]; + const c = this.n[a]; + o += c.size; + const u = !e[a] || !r[a + 1]; + const d = !t[a] || !n[a + 1]; + if (u && d) { + const h = $0(a, -1); + const g = $0(a + 1, this.n.length); + const p = this.Z(h); + const b = this.Z(g); + const v = typeof p == "number" && !this.n[p].visible; + const y = typeof b == "number" && !this.n[b].visible; + if (v && n[a] && (o > 0 || this.startSnappingEnabled)) { + l.state = 1; + } else if (y && e[a] && (o < this.j || this.endSnappingEnabled)) { + l.state = 2; + } else { + l.state = 0; + } + } else if (u && !d) { + l.state = 1; + } else if (!u && d) { + l.state = 2; + } else { + l.state = 3; + } + } + } + Y(i) { + let e = 0; + for (let t = 0; t < this.sashItems.length; t++) { + e += this.n[t].size; + if (this.sashItems[t].sash === i) { + return e; + } + } + return 0; + } + Z(i) { + for (const e of i) { + const t = this.n[e]; + if (t.visible && t.snap) { + return e; + } + } + for (const e of i) { + const t = this.n[e]; + if (t.visible && t.maximumSize - t.minimumSize > 0) { + return; + } + if (!t.visible && t.snap) { + return e; + } + } + } + ab() { + let i; + let e; + for (const t of this.n) { + i = i === undefined ? t.size : Math.min(i, t.size); + e = e === undefined ? t.size : Math.max(e, t.size); + if (e - i > 2) { + return false; + } + } + return true; + } + dispose() { + this.q?.disposable.dispose(); + si(this.n); + this.n = []; + this.sashItems.forEach(i => i.disposable.dispose()); + this.sashItems = []; + super.dispose(); + } +}; +pe(); +q(); +var T5s = class l_n { + static { + this.TemplateId = "row"; + } + constructor(e, t, s) { + this.f = e; + this.g = s; + this.templateId = l_n.TemplateId; + this.e = new Set(); + const n = new Map(t.map(r => [r.templateId, r])); + this.d = []; + for (const r of e) { + const o = n.get(r.templateId); + if (!o) { + throw new Error(`Table cell renderer for template id ${r.templateId} not found.`); + } + this.d.push(o); + } + } + renderTemplate(e) { + const t = z(e, G(".monaco-table-tr")); + const s = []; + const n = []; + for (let o = 0; o < this.f.length; o++) { + const a = this.d[o]; + const l = z(t, G(".monaco-table-td", { + "data-col-index": o + })); + l.style.width = `${this.g(o)}px`; + s.push(l); + n.push(a.renderTemplate(l)); + } + const r = { + container: e, + cellContainers: s, + cellTemplateData: n + }; + this.e.add(r); + return r; + } + renderElement(e, t, s, n) { + for (let r = 0; r < this.f.length; r++) { + const a = this.f[r].project(e); + this.d[r].renderElement(a, t, s.cellTemplateData[r], n); + } + } + disposeElement(e, t, s, n) { + for (let r = 0; r < this.f.length; r++) { + const o = this.d[r]; + if (o.disposeElement) { + const l = this.f[r].project(e); + o.disposeElement(l, t, s.cellTemplateData[r], n); + } + } + } + disposeTemplate(e) { + for (let t = 0; t < this.f.length; t++) { + this.d[t].disposeTemplate(e.cellTemplateData[t]); + } + Lr(e.container); + this.e.delete(e); + } + layoutColumn(e, t) { + for (const { + cellContainers: s + } of this.e) { + s[e].style.width = `${t}px`; + } + } +}; +function Zfr(i) { + return { + getHeight(e) { + return i.getHeight(e); + }, + getTemplateId() { + return T5s.TemplateId; + } + }; +} +var egr = class extends H { + get minimumSize() { + return this.column.minimumWidth ?? 120; + } + get maximumSize() { + return this.column.maximumWidth ?? Number.POSITIVE_INFINITY; + } + get onDidChange() { + return this.column.onDidChangeWidthConstraints ?? de.None; + } + constructor(i, e) { + super(); + this.column = i; + this.g = e; + this.f = new B(); + this.onDidLayout = this.f.event; + this.element = G(".monaco-table-th", { + "data-col-index": e + }, i.label); + if (i.tooltip) { + this.D(d1().setupManagedHover(cr("mouse"), this.element, i.tooltip)); + } + } + layout(i) { + this.f.fire([this.g, i]); + } +}; +var yG = class c_n { + static { + this.d = 0; + } + get onDidChangeFocus() { + return this.g.onDidChangeFocus; + } + get onDidChangeSelection() { + return this.g.onDidChangeSelection; + } + get onDidScroll() { + return this.g.onDidScroll; + } + get onMouseClick() { + return this.g.onMouseClick; + } + get onMouseDblClick() { + return this.g.onMouseDblClick; + } + get onMouseMiddleClick() { + return this.g.onMouseMiddleClick; + } + get onPointer() { + return this.g.onPointer; + } + get onMouseUp() { + return this.g.onMouseUp; + } + get onMouseDown() { + return this.g.onMouseDown; + } + get onMouseOver() { + return this.g.onMouseOver; + } + get onMouseMove() { + return this.g.onMouseMove; + } + get onMouseOut() { + return this.g.onMouseOut; + } + get onTouchStart() { + return this.g.onTouchStart; + } + get onTap() { + return this.g.onTap; + } + get onContextMenu() { + return this.g.onContextMenu; + } + get onDidFocus() { + return this.g.onDidFocus; + } + get onDidBlur() { + return this.g.onDidBlur; + } + get scrollTop() { + return this.g.scrollTop; + } + set scrollTop(e) { + this.g.scrollTop = e; + } + get scrollLeft() { + return this.g.scrollLeft; + } + set scrollLeft(e) { + this.g.scrollLeft = e; + } + get scrollHeight() { + return this.g.scrollHeight; + } + get renderHeight() { + return this.g.renderHeight; + } + get onDidDispose() { + return this.g.onDidDispose; + } + constructor(e, t, s, n, r, o) { + this.p = s; + this.q = n; + this.domId = `table_id_${++c_n.d}`; + this.k = new Q(); + this.m = 0; + this.o = 0; + this.domNode = z(t, G(`.monaco-table.${this.domId}`)); + const a = n.map((u, d) => this.k.add(new egr(u, d))); + const l = { + size: a.reduce((u, d) => u + d.column.weight, 0), + views: a.map(u => ({ + size: u.column.weight, + view: u + })) + }; + this.f = this.k.add(new Yx(this.domNode, { + orientation: 1, + scrollbarVisibility: 2, + getSashOrthogonalSize: () => this.o, + descriptor: l + })); + this.f.el.style.height = `${s.headerRowHeight}px`; + this.f.el.style.lineHeight = `${s.headerRowHeight}px`; + const c = new T5s(n, r, u => this.f.getViewSize(u)); + this.g = this.k.add(new Cg(e, this.domNode, Zfr(s), [c], o)); + de.any(...a.map(u => u.onDidLayout))(([u, d]) => c.layoutColumn(u, d), null, this.k); + this.f.onDidSashReset(u => { + const d = n.reduce((g, p) => g + p.weight, 0); + const h = n[u].weight / d * this.m; + this.f.resizeView(u, h); + }, null, this.k); + this.j = pd(this.domNode); + this.style(IWt); + } + getColumnLabels() { + return this.q.map(e => e.label); + } + resizeColumn(e, t) { + const s = Math.round(t / 100 * this.m); + this.f.resizeView(e, s); + } + updateOptions(e) { + this.g.updateOptions(e); + } + splice(e, t, s = []) { + this.g.splice(e, t, s); + } + rerender() { + this.g.rerender(); + } + row(e) { + return this.g.element(e); + } + indexOf(e) { + return this.g.indexOf(e); + } + get length() { + return this.g.length; + } + getHTMLElement() { + return this.domNode; + } + layout(e, t) { + e = e ?? b6t(this.domNode); + t = t ?? rge(this.domNode); + this.m = t; + this.o = e; + this.f.layout(t); + const s = e - this.p.headerRowHeight; + this.g.getHTMLElement().style.height = `${s}px`; + this.g.layout(s, t); + } + triggerTypeNavigation() { + this.g.triggerTypeNavigation(); + } + style(e) { + const t = []; + t.push(`.monaco-table.${this.domId} > .monaco-split-view2 .monaco-sash.vertical::before { + top: ${this.p.headerRowHeight + 1}px; + height: calc(100% - ${this.p.headerRowHeight}px); + }`); + this.j.textContent = t.join(` +`); + this.g.style(e); + } + domFocus() { + this.g.domFocus(); + } + setAnchor(e) { + this.g.setAnchor(e); + } + getAnchor() { + return this.g.getAnchor(); + } + getSelectedElements() { + return this.g.getSelectedElements(); + } + setSelection(e, t) { + this.g.setSelection(e, t); + } + getSelection() { + return this.g.getSelection(); + } + setFocus(e, t) { + this.g.setFocus(e, t); + } + focusNext(e = 1, t = false, s) { + this.g.focusNext(e, t, s); + } + focusPrevious(e = 1, t = false, s) { + this.g.focusPrevious(e, t, s); + } + focusNextPage(e) { + return this.g.focusNextPage(e); + } + focusPreviousPage(e) { + return this.g.focusPreviousPage(e); + } + focusFirst(e) { + this.g.focusFirst(e); + } + focusLast(e) { + this.g.focusLast(e); + } + getFocus() { + return this.g.getFocus(); + } + getFocusedElements() { + return this.g.getFocusedElements(); + } + getRelativeTop(e) { + return this.g.getRelativeTop(e); + } + reveal(e, t) { + this.g.reveal(e, t); + } + dispose() { + this.k.dispose(); + } +}; +xe(); +md(); +wb(); +q0(); +_a(); +sl(); +xe(); +oa(); +zh(); +bb(); +He(); +Rt(); +pe(); +xe(); +oa(); +aS(); +var d0e = { + inputActiveOptionBorder: "#007ACC00", + inputActiveOptionForeground: "#FFFFFF", + inputActiveOptionBackground: "#0E639C50" +}; +var tgr = class extends jv { + constructor(i, e, t) { + super(i, e, t); + this.a = this.D(new ew({ + actionClassName: this._action.class, + isChecked: !!this._action.checked, + title: this.q.keybinding ? `${this._action.label} (${this.q.keybinding})` : this._action.label, + notFocusable: true, + inputActiveOptionBackground: t.toggleStyles?.inputActiveOptionBackground, + inputActiveOptionBorder: t.toggleStyles?.inputActiveOptionBorder, + inputActiveOptionForeground: t.toggleStyles?.inputActiveOptionForeground, + hoverDelegate: t.hoverDelegate + })); + this.D(this.a.onChange(() => this._action.checked = !!this.a && this.a.checked)); + } + render(i) { + this.element = i; + this.element.appendChild(this.a.domNode); + } + w() { + if (this.a) { + if (this.isEnabled()) { + this.a.enable(); + } else { + this.a.disable(); + } + } + } + J() { + this.a.checked = !!this._action.checked; + } + focus() { + this.a.domNode.tabIndex = 0; + this.a.focus(); + } + blur() { + this.a.domNode.tabIndex = -1; + this.a.domNode.blur(); + } + setFocusable(i) { + this.a.domNode.tabIndex = i ? 0 : -1; + } +}; +var ew = class extends Gg { + constructor(i) { + super(); + this.a = this.D(new B()); + this.onChange = this.a.event; + this.c = this.D(new B()); + this.onKeyDown = this.c.event; + this.g = i; + this.w = this.g.isChecked; + const e = ["monaco-custom-toggle"]; + if (this.g.icon) { + this.t = this.g.icon; + e.push(...le.asClassNameArray(this.t)); + } + if (this.g.actionClassName) { + e.push(...this.g.actionClassName.split(" ")); + } + if (this.w) { + e.push("checked"); + } + this.domNode = document.createElement("div"); + this.y = this.D(d1().setupManagedHover(i.hoverDelegate ?? cr("mouse"), this.domNode, this.g.title)); + this.domNode.classList.add(...e); + if (!this.g.notFocusable) { + this.domNode.tabIndex = 0; + } + this.domNode.setAttribute("role", "checkbox"); + this.domNode.setAttribute("aria-checked", String(this.w)); + this.domNode.setAttribute("aria-label", this.g.title); + this.H(); + this.b(this.domNode, t => { + if (this.enabled) { + this.checked = !this.w; + this.a.fire(false); + t.preventDefault(); + } + }); + this.D(this.G(this.domNode)); + this.q(this.domNode, t => { + if (t.keyCode === 10 || t.keyCode === 3) { + this.checked = !this.w; + this.a.fire(true); + t.preventDefault(); + t.stopPropagation(); + return; + } + this.c.fire(t); + }); + } + get enabled() { + return this.domNode.getAttribute("aria-disabled") !== "true"; + } + focus() { + this.domNode.focus(); + } + get checked() { + return this.w; + } + set checked(i) { + this.w = i; + this.domNode.setAttribute("aria-checked", String(this.w)); + this.domNode.classList.toggle("checked", this.w); + this.H(); + } + setIcon(i) { + if (this.t) { + this.domNode.classList.remove(...le.asClassNameArray(this.t)); + } + this.t = i; + if (this.t) { + this.domNode.classList.add(...le.asClassNameArray(this.t)); + } + } + width() { + return 22; + } + H() { + if (this.domNode) { + this.domNode.style.borderColor = this.w && this.g.inputActiveOptionBorder || ""; + this.domNode.style.color = this.w && this.g.inputActiveOptionForeground || "inherit"; + this.domNode.style.backgroundColor = this.w && this.g.inputActiveOptionBackground || ""; + } + } + enable() { + this.domNode.setAttribute("aria-disabled", String(false)); + } + disable() { + this.domNode.setAttribute("aria-disabled", String(true)); + } + setTitle(i) { + this.y.update(i); + this.domNode.setAttribute("aria-label", i); + } + set visible(i) { + this.domNode.style.display = i ? "" : "none"; + } + get visible() { + return this.domNode.style.display !== "none"; + } +}; +var h0e = class u_n extends Gg { + static { + this.CLASS_NAME = "monaco-checkbox"; + } + constructor(e, t, s) { + super(); + this.h = e; + this.n = t; + this.a = this.D(new B()); + this.onChange = this.a.event; + this.c = this.D(new ew({ + title: this.h, + isChecked: this.n, + icon: A.check, + actionClassName: u_n.CLASS_NAME, + ...d0e + })); + this.domNode = this.c.domNode; + this.g = s; + this.r(); + this.D(this.c.onChange(n => { + this.r(); + this.a.fire(n); + })); + } + get checked() { + return this.c.checked; + } + get enabled() { + return this.c.enabled; + } + set checked(e) { + this.c.checked = e; + this.r(); + } + focus() { + this.domNode.focus(); + } + hasFocus() { + return Jg(this.domNode); + } + enable() { + this.c.enable(); + } + disable() { + this.c.disable(); + } + r() { + this.domNode.style.color = this.g.checkboxForeground || ""; + this.domNode.style.backgroundColor = this.g.checkboxBackground || ""; + this.domNode.style.borderColor = this.g.checkboxBorder || ""; + } +}; +var igr = class extends jv { + constructor(i, e, t) { + super(i, e, t); + this.a = this.D(new h0e(this._action.label, !!this._action.checked, t.checkboxStyles)); + this.D(this.a.onChange(() => this.c())); + } + render(i) { + this.element = i; + this.element.classList.add("checkbox-action-item"); + this.element.appendChild(this.a.domNode); + if (this.q.label && this._action.label) { + const e = this.element.appendChild(G("span.checkbox-label", undefined, this._action.label)); + this.D(Ce(e, Oe.CLICK, t => { + this.a.checked = !this.a.checked; + t.stopPropagation(); + t.preventDefault(); + this.c(); + })); + } + this.w(); + this.I(); + this.J(); + } + c() { + this._action.checked = !!this.a && this.a.checked; + this.actionRunner.run(this._action, this._context); + } + w() { + if (this.isEnabled()) { + this.a.enable(); + } else { + this.a.disable(); + } + if (this.action.enabled) { + this.element?.classList.remove("disabled"); + } else { + this.element?.classList.add("disabled"); + } + } + J() { + this.a.checked = !!this._action.checked; + } + I() { + if (this.b) { + this.a.domNode.classList.remove(...this.b.split(" ")); + } + this.b = this.C(); + if (this.b) { + this.a.domNode.classList.add(...this.b.split(" ")); + } + } + focus() { + this.a.domNode.tabIndex = 0; + this.a.focus(); + } + blur() { + this.a.domNode.tabIndex = -1; + this.a.domNode.blur(); + } + setFocusable(i) { + this.a.domNode.tabIndex = i ? 0 : -1; + } +}; +He(); +X(); +var sgr = f(10, null); +var ngr = f(11, null); +var rgr = f(12, null); +var P5s = class extends ew { + constructor(i) { + super({ + icon: A.caseSensitive, + title: sgr + i.appendTitle, + isChecked: i.isChecked, + hoverDelegate: i.hoverDelegate ?? cr("element"), + inputActiveOptionBorder: i.inputActiveOptionBorder, + inputActiveOptionForeground: i.inputActiveOptionForeground, + inputActiveOptionBackground: i.inputActiveOptionBackground + }); + } +}; +var L5s = class extends ew { + constructor(i) { + super({ + icon: A.wholeWord, + title: ngr + i.appendTitle, + isChecked: i.isChecked, + hoverDelegate: i.hoverDelegate ?? cr("element"), + inputActiveOptionBorder: i.inputActiveOptionBorder, + inputActiveOptionForeground: i.inputActiveOptionForeground, + inputActiveOptionBackground: i.inputActiveOptionBackground + }); + } +}; +var R5s = class extends ew { + constructor(i) { + super({ + icon: A.regex, + title: rgr + i.appendTitle, + isChecked: i.isChecked, + hoverDelegate: i.hoverDelegate ?? cr("element"), + inputActiveOptionBorder: i.inputActiveOptionBorder, + inputActiveOptionForeground: i.inputActiveOptionForeground, + inputActiveOptionBackground: i.inputActiveOptionBackground + }); + } +}; +xe(); +wb(); +q0(); +kz(); +sl(); +wc(); +aS(); +Kg(); +bb(); +pe(); +mT(); +var ogr = class { + constructor(i, e = 0, t = i.length, s = e - 1) { + this.a = i; + this.b = e; + this.c = t; + this.d = s; + } + current() { + if (this.d === this.b - 1 || this.d === this.c) { + return null; + } else { + return this.a[this.d]; + } + } + next() { + this.d = Math.min(this.d + 1, this.c); + return this.current(); + } + previous() { + this.d = Math.max(this.d - 1, this.b - 1); + return this.current(); + } + first() { + this.d = this.b; + return this.current(); + } + last() { + this.d = this.c - 1; + return this.current(); + } +}; +var RQt = class { + constructor(i = new Set(), e = 10) { + this.d = i; + this.a = e; + this.f(); + if (this.d.onDidChange) { + this.c = this.d.onDidChange(() => this.f()); + } + } + getHistory() { + return this.j; + } + add(i) { + this.d.delete(i); + this.d.add(i); + this.f(); + } + next() { + return this.b.next(); + } + previous() { + if (this.h() !== 0) { + return this.b.previous(); + } else { + return null; + } + } + current() { + return this.b.current(); + } + first() { + return this.b.first(); + } + last() { + return this.b.last(); + } + isFirst() { + return this.h() === 0; + } + isLast() { + return this.h() >= this.j.length - 1; + } + isNowhere() { + return this.b.current() === null; + } + has(i) { + return this.d.has(i); + } + clear() { + this.d.clear(); + this.f(); + } + f() { + this.g(); + const i = this.j; + this.b = new ogr(i, 0, i.length, i.length); + } + g() { + const i = this.j; + if (i.length > this.a) { + const e = i.slice(i.length - this.a); + if (this.d.replace) { + this.d.replace(e); + } else { + this.d = new Set(e); + } + } + } + h() { + const i = this.b.current(); + if (i) { + return this.j.indexOf(i); + } else { + return -1; + } + } + get j() { + const i = []; + this.d.forEach(e => i.push(e)); + return i; + } + dispose() { + if (this.c) { + this.c.dispose(); + this.c = undefined; + } + } +}; +var wG = class { + get size() { + return this.f; + } + constructor(i, e = 10, t = s => s) { + this.g = e; + this.h = t; + if (i.length < 1) { + throw new Error("not supported"); + } + this.f = 1; + this.b = this.c = this.d = { + value: i[0], + previous: undefined, + next: undefined + }; + this.a = new XHi([i[0]], t); + for (let s = 1; s < i.length; s++) { + this.add(i[s]); + } + } + add(i) { + const e = { + value: i, + previous: this.c, + next: undefined + }; + this.c.next = e; + this.c = e; + this.d = this.c; + this.f++; + if (this.a.has(i)) { + this.j(i); + } else { + this.a.add(i); + } + while (this.f > this.g) { + this.a.delete(this.b.value); + this.b = this.b.next; + this.b.previous = undefined; + this.f--; + } + } + replaceLast(i) { + if (this.h(this.c.value) === this.h(i)) { + return i; + } + const e = this.c.value; + this.a.delete(e); + this.c.value = i; + if (this.a.has(i)) { + this.j(i); + } else { + this.a.add(i); + } + return e; + } + prepend(i) { + if (this.f === this.g || this.a.has(i)) { + return; + } + const e = { + value: i, + previous: undefined, + next: this.b + }; + this.b.previous = e; + this.b = e; + this.f++; + this.a.add(i); + } + isAtEnd() { + return this.d === this.c; + } + current() { + return this.d.value; + } + previous() { + if (this.d.previous) { + this.d = this.d.previous; + } + return this.d.value; + } + next() { + if (this.d.next) { + this.d = this.d.next; + } + return this.d.value; + } + has(i) { + return this.a.has(i); + } + resetCursor() { + this.d = this.c; + return this.d.value; + } + *[Symbol.iterator]() { + let i = this.b; + while (i) { + yield i.value; + i = i.next; + } + } + j(i) { + let e = this.b; + const t = this.h(i); + while (e !== this.c) { + if (this.h(e.value) === t) { + if (e === this.b) { + this.b = this.b.next; + this.b.previous = undefined; + } else { + e.previous.next = e.next; + e.next.previous = e.previous; + } + this.f--; + } + e = e.next; + } + } +}; +Jr(); +X(); +q(); +var f0e = G; +var N5s; +(function (i) { + i[i.INFO = 1] = "INFO"; + i[i.WARNING = 2] = "WARNING"; + i[i.ERROR = 3] = "ERROR"; +})(N5s ||= {}); +var agr = { + inputBackground: "#3C3C3C", + inputForeground: "#CCCCCC", + inputValidationInfoBorder: "#55AAFF", + inputValidationInfoBackground: "#063B49", + inputValidationWarningBorder: "#B89500", + inputValidationWarningBackground: "#352A05", + inputValidationErrorBorder: "#BE1100", + inputValidationErrorBackground: "#5A1D1D", + inputBorder: undefined, + inputValidationErrorForeground: undefined, + inputValidationInfoForeground: undefined, + inputValidationWarningForeground: undefined +}; +var tw = class extends Gg { + constructor(i, e, t) { + super(); + this.H = "idle"; + this.M = Number.POSITIVE_INFINITY; + this.O = this.D(new ki()); + this.P = this.D(new B()); + this.onDidChange = this.P.event; + this.Q = this.D(new B()); + this.onDidHeightChange = this.Q.event; + this.a = e; + this.h = t; + this.n = null; + this.r = this.h.placeholder || ""; + this.t = this.h.tooltip ?? (this.r || ""); + this.w = this.h.ariaLabel || ""; + if (this.h.validationOptions) { + this.y = this.h.validationOptions.validation; + } + this.element = z(i, f0e(".monaco-inputbox.idle")); + const s = this.h.flexibleHeight ? "textarea" : "input"; + const n = z(this.element, f0e(".ibwrapper")); + this.c = z(n, f0e(s + ".input.empty")); + this.c.setAttribute("autocorrect", "off"); + this.c.setAttribute("autocapitalize", "off"); + this.c.setAttribute("spellcheck", "false"); + this.C(this.c, () => this.element.classList.add("synthetic-focus")); + this.z(this.c, () => this.element.classList.remove("synthetic-focus")); + if (this.h.flexibleHeight) { + this.M = typeof this.h.flexibleMaxHeight == "number" ? this.h.flexibleMaxHeight : Number.POSITIVE_INFINITY; + this.I = z(n, f0e("div.mirror")); + this.I.innerText = "\xA0"; + this.N = new bat(this.element, { + vertical: 1 + }); + if (this.h.flexibleWidth) { + this.c.setAttribute("wrap", "off"); + this.I.style.whiteSpace = "pre"; + this.I.style.wordWrap = "initial"; + } + z(i, this.N.getDomNode()); + this.D(this.N); + this.D(this.N.onScroll(a => this.c.scrollTop = a.scrollTop)); + const r = this.D(new Co(i.ownerDocument, "selectionchange")); + const o = de.filter(r.event, () => i.ownerDocument.getSelection()?.anchorNode === n); + this.D(o(this.U, this)); + this.D(this.onDidHeightChange(this.U, this)); + } else { + this.c.type = this.h.type || "text"; + this.c.setAttribute("wrap", "off"); + } + if (this.w) { + this.c.setAttribute("aria-label", this.w); + } + if (this.r && !this.h.showPlaceholderOnFocus) { + this.setPlaceHolder(this.r); + } + if (this.t) { + this.setTooltip(this.t); + } + this.u(this.c, () => this.Z()); + this.z(this.c, () => this.R()); + this.C(this.c, () => this.S()); + this.D(this.G(this.c)); + setTimeout(() => this.ab(), 0); + if (this.h.actions) { + this.g = this.D(new ea(this.element)); + this.g.push(this.h.actions, { + icon: true, + label: false + }); + } + this.bb(); + } + R() { + this.Y(); + if (this.h.showPlaceholderOnFocus) { + this.c.setAttribute("placeholder", ""); + } + } + S() { + this.X(); + if (this.h.showPlaceholderOnFocus) { + this.c.setAttribute("placeholder", this.r || ""); + } + } + setPlaceHolder(i) { + this.r = i; + this.c.setAttribute("placeholder", i); + } + setTooltip(i) { + this.t = i; + if (!this.O.value && i) { + this.O.value = this.D(d1().setupDelayedHoverAtMouse(this.c, () => ({ + content: i, + appearance: { + compact: true + } + }))); + } + } + setAriaLabel(i) { + this.w = i; + if (i) { + this.c.setAttribute("aria-label", this.w); + } else { + this.c.removeAttribute("aria-label"); + } + } + getAriaLabel() { + return this.w; + } + get mirrorElement() { + return this.I; + } + get inputElement() { + return this.c; + } + get value() { + return this.c.value; + } + set value(i) { + if (this.c.value !== i) { + this.c.value = i; + this.Z(); + } + } + get step() { + return this.c.step; + } + set step(i) { + this.c.step = i; + } + get height() { + if (typeof this.J == "number") { + return this.J; + } else { + return U0(this.element); + } + } + focus() { + this.c.focus(); + } + blur() { + this.c.blur(); + } + hasFocus() { + return Jg(this.c); + } + select(i = null) { + this.c.select(); + if (i) { + this.c.setSelectionRange(i.start, i.end); + if (i.end === this.c.value.length) { + this.c.scrollLeft = this.c.scrollWidth; + } + } + } + isSelectionAtEnd() { + return this.c.selectionEnd === this.c.value.length && this.c.selectionStart === this.c.selectionEnd; + } + getSelection() { + const i = this.c.selectionStart; + if (i === null) { + return null; + } + const e = this.c.selectionEnd ?? i; + return { + start: i, + end: e + }; + } + enable() { + this.c.removeAttribute("disabled"); + } + disable() { + this.blur(); + this.c.disabled = true; + this.Y(); + } + setEnabled(i) { + if (i) { + this.enable(); + } else { + this.disable(); + } + } + get width() { + return qp(this.c); + } + set width(i) { + if (this.h.flexibleHeight && this.h.flexibleWidth) { + let e = 0; + if (this.I) { + const t = parseFloat(this.I.style.paddingLeft || "") || 0; + const s = parseFloat(this.I.style.paddingRight || "") || 0; + e = t + s; + } + this.c.style.width = i - e + "px"; + } else { + this.c.style.width = i + "px"; + } + if (this.I) { + this.I.style.width = i + "px"; + } + } + set paddingRight(i) { + this.c.style.width = `calc(100% - ${i}px)`; + if (this.I) { + this.I.style.paddingRight = i + "px"; + } + } + U() { + if (typeof this.L != "number" || typeof this.J != "number" || !this.N) { + return; + } + const i = this.L; + const e = this.J; + const t = this.c.scrollTop; + this.N.setScrollDimensions({ + scrollHeight: i, + height: e + }); + this.N.setScrollPosition({ + scrollTop: t + }); + } + showMessage(i, e) { + if (this.H === "open" && Ul(this.n, i)) { + return; + } + this.n = i; + this.element.classList.remove("idle"); + this.element.classList.remove("info"); + this.element.classList.remove("warning"); + this.element.classList.remove("error"); + this.element.classList.add(this.W(i.type)); + const t = this.stylesForType(this.n.type); + this.element.style.border = `1px solid ${CF(t.border, "transparent")}`; + if (this.n.content && (this.hasFocus() || e)) { + this.X(); + } + } + hideMessage() { + this.n = null; + this.element.classList.remove("info"); + this.element.classList.remove("warning"); + this.element.classList.remove("error"); + this.element.classList.add("idle"); + this.Y(); + this.bb(); + } + isInputValid() { + return !!this.y && !this.y(this.value); + } + validate() { + let i = null; + if (this.y) { + i = this.y(this.value); + if (i) { + this.inputElement.setAttribute("aria-invalid", "true"); + this.showMessage(i); + } else if (this.inputElement.hasAttribute("aria-invalid")) { + this.inputElement.removeAttribute("aria-invalid"); + this.hideMessage(); + } + } + return i?.type; + } + stylesForType(i) { + const e = this.h.inputBoxStyles; + switch (i) { + case 1: + return { + border: e.inputValidationInfoBorder, + background: e.inputValidationInfoBackground, + foreground: e.inputValidationInfoForeground + }; + case 2: + return { + border: e.inputValidationWarningBorder, + background: e.inputValidationWarningBackground, + foreground: e.inputValidationWarningForeground + }; + default: + return { + border: e.inputValidationErrorBorder, + background: e.inputValidationErrorBackground, + foreground: e.inputValidationErrorForeground + }; + } + } + W(i) { + switch (i) { + case 1: + return "info"; + case 2: + return "warning"; + default: + return "error"; + } + } + X() { + if (!this.a || !this.n) { + return; + } + let i; + const e = () => i.style.width = qp(this.element) + "px"; + this.a.showContextView({ + getAnchor: () => this.element, + anchorAlignment: 1, + render: s => { + if (!this.n) { + return null; + } + i = z(s, f0e(".monaco-inputbox-container")); + e(); + const n = { + inline: true, + className: "monaco-inputbox-message" + }; + const r = this.n.formatContent ? xz(this.n.content, n) : sQn(this.n.content, n); + r.classList.add(this.W(this.n.type)); + const o = this.stylesForType(this.n.type); + r.style.backgroundColor = o.background ?? ""; + r.style.color = o.foreground ?? ""; + r.style.border = o.border ? `1px solid ${o.border}` : ""; + z(i, r); + return null; + }, + onHide: () => { + this.H = "closed"; + }, + layout: e + }); + let t; + if (this.n.type === 3) { + t = f(19, null, this.n.content); + } else if (this.n.type === 2) { + t = f(20, null, this.n.content); + } else { + t = f(21, null, this.n.content); + } + Fc(t); + this.H = "open"; + } + Y() { + if (this.a) { + if (this.H === "open") { + this.a.hideContextView(); + } + this.H = "idle"; + } + } + Z() { + this.P.fire(this.value); + this.validate(); + this.ab(); + this.c.classList.toggle("empty", !this.value); + if (this.H === "open" && this.a) { + this.a.layout(); + } + } + ab() { + if (!this.I) { + return; + } + const i = this.value; + const t = i.charCodeAt(i.length - 1) === 10 ? " " : ""; + if ((i + t).replace(/\u000c/g, "")) { + this.I.textContent = i + t; + } else { + this.I.innerText = "\xA0"; + } + this.layout(); + } + bb() { + const i = this.h.inputBoxStyles; + const e = i.inputBackground ?? ""; + const t = i.inputForeground ?? ""; + const s = i.inputBorder ?? ""; + this.element.style.backgroundColor = e; + this.element.style.color = t; + this.c.style.backgroundColor = "inherit"; + this.c.style.color = t; + this.element.style.border = `1px solid ${CF(s, "transparent")}`; + } + layout() { + if (!this.I) { + return; + } + const i = this.L; + this.L = U0(this.I); + if (i !== this.L) { + this.J = Math.min(this.L, this.M); + this.c.style.height = this.J + "px"; + this.Q.fire(this.L); + } + } + insertAtCursor(i) { + const e = this.inputElement; + const t = e.selectionStart; + const s = e.selectionEnd; + const n = e.value; + if (t !== null && s !== null) { + this.value = n.substr(0, t) + i + n.substr(s); + e.setSelectionRange(t + 1, t + 1); + this.layout(); + } + } + dispose() { + this.Y(); + this.n = null; + this.g?.dispose(); + super.dispose(); + } +}; +var NQt = class extends tw { + constructor(i, e, t) { + const s = f(22, null, "⇅"); + const n = f(23, null, "⇅"); + super(i, e, t); + this.eb = this.D(new B()); + this.onDidFocus = this.eb.event; + this.fb = this.D(new B()); + this.onDidBlur = this.fb.event; + this.cb = this.D(new RQt(t.history, 100)); + const r = () => { + if (t.showHistoryHint && t.showHistoryHint() && !this.r.endsWith(s) && !this.r.endsWith(n) && this.cb.getHistory().length) { + const o = this.r.endsWith(")") ? s : n; + const a = this.r + o; + if (t.showPlaceholderOnFocus && !Jg(this.c)) { + this.r = a; + } else { + this.setPlaceHolder(a); + } + } + }; + this.db = new MutationObserver((o, a) => { + o.forEach(l => { + if (!l.target.textContent) { + r(); + } + }); + }); + this.db.observe(this.c, { + attributeFilter: ["class"] + }); + this.C(this.c, () => r()); + this.z(this.c, () => { + const o = a => { + if (this.r.endsWith(a)) { + const l = this.r.slice(0, this.r.length - a.length); + if (t.showPlaceholderOnFocus) { + this.r = l; + } else { + this.setPlaceHolder(l); + } + return true; + } else { + return false; + } + }; + if (!o(n)) { + o(s); + } + }); + } + dispose() { + super.dispose(); + if (this.db) { + this.db.disconnect(); + this.db = undefined; + } + } + addToHistory(i) { + if (this.value && (i || this.value !== this.ib())) { + this.cb.add(this.value); + } + } + prependHistory(i) { + const e = this.getHistory(); + this.clearHistory(); + i.forEach(t => { + this.cb.add(t); + }); + e.forEach(t => { + this.cb.add(t); + }); + } + getHistory() { + return this.cb.getHistory(); + } + isAtFirstInHistory() { + return this.cb.isFirst(); + } + isAtLastInHistory() { + return this.cb.isLast(); + } + isNowhereInHistory() { + return this.cb.isNowhere(); + } + showNextValue() { + if (!this.cb.has(this.value)) { + this.addToHistory(); + } + let i = this.kb(); + i &&= i === this.value ? this.kb() : i; + this.value = i ?? ""; + Bh(this.value ? this.value : f(24, null)); + } + showPreviousValue() { + if (!this.cb.has(this.value)) { + this.addToHistory(); + } + let i = this.jb(); + i &&= i === this.value ? this.jb() : i; + if (i) { + this.value = i; + Bh(this.value); + } + } + clearHistory() { + this.cb.clear(); + } + setPlaceHolder(i) { + super.setPlaceHolder(i); + this.setTooltip(i); + } + R() { + super.R(); + this.fb.fire(); + } + S() { + super.S(); + this.eb.fire(); + } + ib() { + let i = this.cb.current(); + if (!i) { + i = this.cb.last(); + this.cb.next(); + } + return i; + } + jb() { + return this.cb.previous() || this.cb.first(); + } + kb() { + return this.cb.next(); + } +}; +bb(); +pe(); +X(); +q(); +oa(); +var lgr = f(9, null); +var Kpt = class extends Gg { + static { + this.OPTION_CHANGE = "optionChange"; + } + constructor(i, e, t) { + super(); + this.w = true; + this.y = false; + this.H = this.D(new ki()); + this.N = []; + this.O = this.D(new B()); + this.onDidOptionChange = this.O.event; + this.P = this.D(new B()); + this.onKeyDown = this.P.event; + this.Q = this.D(new B()); + this.onMouseDown = this.Q.event; + this.R = this.D(new B()); + this.onInput = this.R.event; + this.S = this.D(new B()); + this.onKeyUp = this.S.event; + this.U = this.D(new B()); + this.onCaseSensitiveKeyDown = this.U.event; + this.W = this.D(new B()); + this.onRegexKeyDown = this.W.event; + this.Y = 0; + this.a = t.placeholder || ""; + this.c = t.validation; + this.h = t.label || lgr; + this.n = !!t.showCommonFindToggles; + const s = t.appendCaseSensitiveLabel || ""; + const n = t.appendWholeWordsLabel || ""; + const r = t.appendRegexLabel || ""; + const o = !!t.flexibleHeight; + const a = !!t.flexibleWidth; + const l = t.flexibleMaxHeight; + this.domNode = document.createElement("div"); + this.domNode.classList.add("monaco-findInput"); + this.inputBox = this.D(new NQt(this.domNode, e, { + placeholder: this.a || "", + ariaLabel: this.h || "", + validationOptions: { + validation: this.c + }, + showHistoryHint: t.showHistoryHint, + flexibleHeight: o, + flexibleWidth: a, + flexibleMaxHeight: l, + inputBoxStyles: t.inputBoxStyles, + history: t.history + })); + const c = this.D(Hy()); + if (this.n) { + this.J = this.D(new R5s({ + appendTitle: r, + isChecked: false, + hoverDelegate: c, + ...t.toggleStyles + })); + this.D(this.J.onChange(d => { + this.O.fire(d); + if (!d && this.w) { + this.inputBox.focus(); + } + this.validate(); + })); + this.D(this.J.onKeyDown(d => { + this.W.fire(d); + })); + this.L = this.D(new L5s({ + appendTitle: n, + isChecked: false, + hoverDelegate: c, + ...t.toggleStyles + })); + this.D(this.L.onChange(d => { + this.O.fire(d); + if (!d && this.w) { + this.inputBox.focus(); + } + this.validate(); + })); + this.M = this.D(new P5s({ + appendTitle: s, + isChecked: false, + hoverDelegate: c, + ...t.toggleStyles + })); + this.D(this.M.onChange(d => { + this.O.fire(d); + if (!d && this.w) { + this.inputBox.focus(); + } + this.validate(); + })); + this.D(this.M.onKeyDown(d => { + this.U.fire(d); + })); + const u = [this.M.domNode, this.L.domNode, this.J.domNode]; + this.q(this.domNode, d => { + if (d.equals(15) || d.equals(17) || d.equals(9)) { + const h = u.indexOf(this.domNode.ownerDocument.activeElement); + if (h >= 0) { + let g = -1; + if (d.equals(17)) { + g = (h + 1) % u.length; + } else if (d.equals(15)) { + if (h === 0) { + g = u.length - 1; + } else { + g = h - 1; + } + } + if (d.equals(9)) { + u[h].blur(); + this.inputBox.focus(); + } else if (g >= 0) { + u[g].focus(); + } + yn.stop(d, true); + } + } + }); + } + this.I = document.createElement("div"); + this.I.className = "controls"; + this.I.style.display = this.n ? "" : "none"; + if (this.M) { + this.I.append(this.M.domNode); + } + if (this.L) { + this.I.appendChild(this.L.domNode); + } + if (this.J) { + this.I.appendChild(this.J.domNode); + } + this.setAdditionalToggles(t?.additionalToggles); + if (this.I) { + this.domNode.appendChild(this.I); + } + i?.appendChild(this.domNode); + this.D(Ce(this.inputBox.inputElement, "compositionstart", u => { + this.y = true; + })); + this.D(Ce(this.inputBox.inputElement, "compositionend", u => { + this.y = false; + this.R.fire(); + })); + this.q(this.inputBox.inputElement, u => this.P.fire(u)); + this.s(this.inputBox.inputElement, u => this.S.fire(u)); + this.u(this.inputBox.inputElement, u => this.R.fire()); + this.f(this.inputBox.inputElement, u => this.Q.fire(u)); + } + get isImeSessionInProgress() { + return this.y; + } + get onDidChange() { + return this.inputBox.onDidChange; + } + layout(i) { + this.inputBox.layout(); + this.X(i.collapsedFindWidget); + } + enable() { + this.domNode.classList.remove("disabled"); + this.inputBox.enable(); + this.J?.enable(); + this.L?.enable(); + this.M?.enable(); + for (const i of this.N) { + i.enable(); + } + } + disable() { + this.domNode.classList.add("disabled"); + this.inputBox.disable(); + this.J?.disable(); + this.L?.disable(); + this.M?.disable(); + for (const i of this.N) { + i.disable(); + } + } + setFocusInputOnOptionClick(i) { + this.w = i; + } + setEnabled(i) { + if (i) { + this.enable(); + } else { + this.disable(); + } + } + setAdditionalToggles(i) { + for (const e of this.N) { + e.domNode.remove(); + } + this.N = []; + this.H.value = new Q(); + for (const e of i ?? []) { + this.H.value.add(e); + this.I.appendChild(e.domNode); + this.H.value.add(e.onChange(t => { + this.O.fire(t); + if (!t && this.w) { + this.inputBox.focus(); + } + })); + this.N.push(e); + } + if (this.N.length > 0) { + this.I.style.display = ""; + } + this.X(); + } + X(i = false) { + if (i) { + this.inputBox.paddingRight = 0; + } else { + this.inputBox.paddingRight = (this.M?.width() ?? 0) + (this.L?.width() ?? 0) + (this.J?.width() ?? 0) + this.N.reduce((e, t) => e + t.width(), 0); + } + } + clear() { + this.Z(); + this.setValue(""); + this.focus(); + } + getValue() { + return this.inputBox.value; + } + setValue(i) { + if (this.inputBox.value !== i) { + this.inputBox.value = i; + } + } + onSearchSubmit() { + this.inputBox.addToHistory(); + } + select() { + this.inputBox.select(); + } + focus() { + this.inputBox.focus(); + } + getCaseSensitive() { + return this.M?.checked ?? false; + } + setCaseSensitive(i) { + if (this.M) { + this.M.checked = i; + } + } + getWholeWords() { + return this.L?.checked ?? false; + } + setWholeWords(i) { + if (this.L) { + this.L.checked = i; + } + } + getRegex() { + return this.J?.checked ?? false; + } + setRegex(i) { + if (this.J) { + this.J.checked = i; + this.validate(); + } + } + focusOnCaseSensitive() { + this.M?.focus(); + } + focusOnRegex() { + this.J?.focus(); + } + highlightFindOptions() { + this.domNode.classList.remove("highlight-" + this.Y); + this.Y = 1 - this.Y; + this.domNode.classList.add("highlight-" + this.Y); + } + validate() { + this.inputBox.validate(); + } + showMessage(i) { + this.inputBox.showMessage(i); + } + clearMessage() { + this.inputBox.hideMessage(); + } + Z() { + this.inputBox.hideMessage(); + } +}; +m7(); +oS(); +var M5s; +(function (i) { + i[i.Hidden = 0] = "Hidden"; + i[i.Visible = 1] = "Visible"; + i[i.Recurse = 2] = "Recurse"; +})(M5s ||= {}); +var n0; +(function (i) { + i[i.Expanded = 0] = "Expanded"; + i[i.Collapsed = 1] = "Collapsed"; + i[i.PreserveOrExpanded = 2] = "PreserveOrExpanded"; + i[i.PreserveOrCollapsed = 3] = "PreserveOrCollapsed"; +})(n0 ||= {}); +var V5; +(function (i) { + i[i.Unknown = 0] = "Unknown"; + i[i.Twistie = 1] = "Twistie"; + i[i.Element = 2] = "Element"; + i[i.Filter = 3] = "Filter"; +})(V5 ||= {}); +var A5s; +(function (i) { + i[i.Down = 0] = "Down"; + i[i.Up = 1] = "Up"; +})(A5s ||= {}); +var dC = class extends Error { + constructor(i, e) { + super(`TreeError [${i}] ${e}`); + } +}; +var MQt = class { + constructor(i) { + this.a = i; + this.b = new WeakMap(); + } + map(i) { + let e = this.b.get(i); + if (!e) { + e = this.a(i); + this.b.set(i, e); + } + return e; + } +}; +Jt(); +nt(); +KZ(); +var qU = class { + constructor(i, e, t, s) { + this.originalStart = i; + this.originalLength = e; + this.modifiedStart = t; + this.modifiedLength = s; + } + getOriginalEnd() { + return this.originalStart + this.originalLength; + } + getModifiedEnd() { + return this.modifiedStart + this.modifiedLength; + } +}; +Gl(); +var $5s = class { + constructor(i) { + this.a = i; + } + getElements() { + const i = this.a; + const e = new Int32Array(i.length); + for (let t = 0, s = i.length; t < s; t++) { + e[t] = i.charCodeAt(t); + } + return e; + } +}; +function cgr(i, e, t) { + return new g0e(new $5s(i), new $5s(e)).ComputeDiff(t).changes; +} +var Wne = class { + static Assert(i, e) { + if (!i) { + throw new Error(e); + } + } +}; +var Vne = class { + static Copy(i, e, t, s, n) { + for (let r = 0; r < n; r++) { + t[s + r] = i[e + r]; + } + } + static Copy2(i, e, t, s, n) { + for (let r = 0; r < n; r++) { + t[s + r] = i[e + r]; + } + } +}; +var F5s; +(function (i) { + i[i.MaxDifferencesHistory = 1447] = "MaxDifferencesHistory"; +})(F5s ||= {}); +var O5s = class { + constructor() { + this.a = []; + this.b = 1073741824; + this.c = 1073741824; + this.d = 0; + this.e = 0; + } + MarkNextChange() { + if (this.d > 0 || this.e > 0) { + this.a.push(new qU(this.b, this.d, this.c, this.e)); + } + this.d = 0; + this.e = 0; + this.b = 1073741824; + this.c = 1073741824; + } + AddOriginalElement(i, e) { + this.b = Math.min(this.b, i); + this.c = Math.min(this.c, e); + this.d++; + } + AddModifiedElement(i, e) { + this.b = Math.min(this.b, i); + this.c = Math.min(this.c, e); + this.e++; + } + getChanges() { + if (this.d > 0 || this.e > 0) { + this.MarkNextChange(); + } + return this.a; + } + getReverseChanges() { + if (this.d > 0 || this.e > 0) { + this.MarkNextChange(); + } + this.a.reverse(); + return this.a; + } +}; +var g0e = class the { + constructor(e, t, s = null) { + this.a = s; + this.b = e; + this.c = t; + const [n, r, o] = the.o(e); + const [a, l, c] = the.o(t); + this.d = o && c; + this.e = n; + this.f = r; + this.g = a; + this.h = l; + this.k = []; + this.m = []; + } + static n(e) { + return e.length > 0 && typeof e[0] == "string"; + } + static o(e) { + const t = e.getElements(); + if (the.n(t)) { + const s = new Int32Array(t.length); + for (let n = 0, r = t.length; n < r; n++) { + s[n] = drt(t[n], 0); + } + return [t, s, true]; + } + if (t instanceof Int32Array) { + return [[], t, false]; + } else { + return [[], new Int32Array(t), false]; + } + } + p(e, t) { + if (this.f[e] !== this.h[t]) { + return false; + } else if (this.d) { + return this.e[e] === this.g[t]; + } else { + return true; + } + } + q(e, t) { + if (!this.p(e, t)) { + return false; + } + const s = the.r(this.b, e); + const n = the.r(this.c, t); + return s === n; + } + static r(e, t) { + if (typeof e.getStrictElement == "function") { + return e.getStrictElement(t); + } else { + return null; + } + } + s(e, t) { + if (this.f[e] !== this.f[t]) { + return false; + } else if (this.d) { + return this.e[e] === this.e[t]; + } else { + return true; + } + } + u(e, t) { + if (this.h[e] !== this.h[t]) { + return false; + } else if (this.d) { + return this.g[e] === this.g[t]; + } else { + return true; + } + } + ComputeDiff(e) { + return this.v(0, this.f.length - 1, 0, this.h.length - 1, e); + } + v(e, t, s, n, r) { + const o = [false]; + let a = this.w(e, t, s, n, o); + if (r) { + a = this.z(a); + } + return { + quitEarly: o[0], + changes: a + }; + } + w(e, t, s, n, r) { + for (r[0] = false; e <= t && s <= n && this.p(e, s);) { + e++; + s++; + } + while (t >= e && n >= s && this.p(t, n)) { + t--; + n--; + } + if (e > t || s > n) { + let d; + if (s <= n) { + Wne.Assert(e === t + 1, "originalStart should only be one more than originalEnd"); + d = [new qU(e, 0, s, n - s + 1)]; + } else if (e <= t) { + Wne.Assert(s === n + 1, "modifiedStart should only be one more than modifiedEnd"); + d = [new qU(e, t - e + 1, s, 0)]; + } else { + Wne.Assert(e === t + 1, "originalStart should only be one more than originalEnd"); + Wne.Assert(s === n + 1, "modifiedStart should only be one more than modifiedEnd"); + d = []; + } + return d; + } + const o = [0]; + const a = [0]; + const l = this.y(e, t, s, n, o, a, r); + const c = o[0]; + const u = a[0]; + if (l !== null) { + return l; + } + if (!r[0]) { + const d = this.w(e, c, s, u, r); + let h = []; + if (r[0]) { + h = [new qU(c + 1, t - (c + 1) + 1, u + 1, n - (u + 1) + 1)]; + } else { + h = this.w(c + 1, t, u + 1, n, r); + } + return this.H(d, h); + } + return [new qU(e, t - e + 1, s, n - s + 1)]; + } + x(e, t, s, n, r, o, a, l, c, u, d, h, g, p, b, v, y, w) { + let C = null; + let S = null; + let x = new O5s(); + let k = t; + let E = s; + let D = g[0] - v[0] - n; + let P = -1073741824; + let R = this.k.length - 1; + do { + const L = D + e; + if (L === k || L < E && c[L - 1] < c[L + 1]) { + d = c[L + 1]; + p = d - D - n; + if (d < P) { + x.MarkNextChange(); + } + P = d; + x.AddModifiedElement(d + 1, p); + D = L + 1 - e; + } else { + d = c[L - 1] + 1; + p = d - D - n; + if (d < P) { + x.MarkNextChange(); + } + P = d - 1; + x.AddOriginalElement(d, p + 1); + D = L - 1 - e; + } + if (R >= 0) { + c = this.k[R]; + e = c[0]; + k = 1; + E = c.length - 1; + } + } while (--R >= -1); + C = x.getReverseChanges(); + if (w[0]) { + let L = g[0] + 1; + let F = v[0] + 1; + if (C !== null && C.length > 0) { + const O = C[C.length - 1]; + L = Math.max(L, O.getOriginalEnd()); + F = Math.max(F, O.getModifiedEnd()); + } + S = [new qU(L, h - L + 1, F, b - F + 1)]; + } else { + x = new O5s(); + k = o; + E = a; + D = g[0] - v[0] - l; + P = 1073741824; + R = y ? this.m.length - 1 : this.m.length - 2; + do { + const L = D + r; + if (L === k || L < E && u[L - 1] >= u[L + 1]) { + d = u[L + 1] - 1; + p = d - D - l; + if (d > P) { + x.MarkNextChange(); + } + P = d + 1; + x.AddOriginalElement(d + 1, p + 1); + D = L + 1 - r; + } else { + d = u[L - 1]; + p = d - D - l; + if (d > P) { + x.MarkNextChange(); + } + P = d; + x.AddModifiedElement(d + 1, p + 1); + D = L - 1 - r; + } + if (R >= 0) { + u = this.m[R]; + r = u[0]; + k = 1; + E = u.length - 1; + } + } while (--R >= -1); + S = x.getChanges(); + } + return this.H(C, S); + } + y(e, t, s, n, r, o, a) { + let l = 0; + let c = 0; + let u = 0; + let d = 0; + let h = 0; + let g = 0; + e--; + s--; + r[0] = 0; + o[0] = 0; + this.k = []; + this.m = []; + const p = t - e + (n - s); + const b = p + 1; + const v = new Int32Array(b); + const y = new Int32Array(b); + const w = n - s; + const C = t - e; + const S = e - s; + const x = t - n; + const E = (C - w) % 2 === 0; + v[w] = e; + y[C] = t; + a[0] = false; + for (let D = 1; D <= p / 2 + 1; D++) { + let P = 0; + let R = 0; + u = this.J(w - D, D, w, b); + d = this.J(w + D, D, w, b); + for (let F = u; F <= d; F += 2) { + if (F === u || F < d && v[F - 1] < v[F + 1]) { + l = v[F + 1]; + } else { + l = v[F - 1] + 1; + } + c = l - (F - w) - S; + const O = l; + while (l < t && c < n && this.p(l + 1, c + 1)) { + l++; + c++; + } + v[F] = l; + if (l + c > P + R) { + P = l; + R = c; + } + if (!E && Math.abs(F - C) <= D - 1 && l >= y[F]) { + r[0] = l; + o[0] = c; + if (O <= y[F] && D <= 1448) { + return this.x(w, u, d, S, C, h, g, x, v, y, l, t, r, c, n, o, E, a); + } else { + return null; + } + } + } + const L = (P - e + (R - s) - D) / 2; + if (this.a !== null && !this.a(P, L)) { + a[0] = true; + r[0] = P; + o[0] = R; + if (L > 0 && D <= 1448) { + return this.x(w, u, d, S, C, h, g, x, v, y, l, t, r, c, n, o, E, a); + } else { + e++; + s++; + return [new qU(e, t - e + 1, s, n - s + 1)]; + } + } + h = this.J(C - D, D, C, b); + g = this.J(C + D, D, C, b); + for (let F = h; F <= g; F += 2) { + if (F === h || F < g && y[F - 1] >= y[F + 1]) { + l = y[F + 1] - 1; + } else { + l = y[F - 1]; + } + c = l - (F - C) - x; + const O = l; + while (l > e && c > s && this.p(l, c)) { + l--; + c--; + } + y[F] = l; + if (E && Math.abs(F - w) <= D && l <= v[F]) { + r[0] = l; + o[0] = c; + if (O >= v[F] && D <= 1448) { + return this.x(w, u, d, S, C, h, g, x, v, y, l, t, r, c, n, o, E, a); + } else { + return null; + } + } + } + if (D <= 1447) { + let F = new Int32Array(d - u + 2); + F[0] = w - u + 1; + Vne.Copy2(v, u, F, 1, d - u + 1); + this.k.push(F); + F = new Int32Array(g - h + 2); + F[0] = C - h + 1; + Vne.Copy2(y, h, F, 1, g - h + 1); + this.m.push(F); + } + } + return this.x(w, u, d, S, C, h, g, x, v, y, l, t, r, c, n, o, E, a); + } + z(e) { + for (let t = 0; t < e.length; t++) { + const s = e[t]; + const n = t < e.length - 1 ? e[t + 1].originalStart : this.f.length; + const r = t < e.length - 1 ? e[t + 1].modifiedStart : this.h.length; + const o = s.originalLength > 0; + const a = s.modifiedLength > 0; + while (s.originalStart + s.originalLength < n && s.modifiedStart + s.modifiedLength < r && (!o || this.s(s.originalStart, s.originalStart + s.originalLength)) && (!a || this.u(s.modifiedStart, s.modifiedStart + s.modifiedLength))) { + const c = this.q(s.originalStart, s.modifiedStart); + if (this.q(s.originalStart + s.originalLength, s.modifiedStart + s.modifiedLength) && !c) { + break; + } + s.originalStart++; + s.modifiedStart++; + } + const l = [null]; + if (t < e.length - 1 && this.I(e[t], e[t + 1], l)) { + e[t] = l[0]; + e.splice(t + 1, 1); + t--; + continue; + } + } + for (let t = e.length - 1; t >= 0; t--) { + const s = e[t]; + let n = 0; + let r = 0; + if (t > 0) { + const d = e[t - 1]; + n = d.originalStart + d.originalLength; + r = d.modifiedStart + d.modifiedLength; + } + const o = s.originalLength > 0; + const a = s.modifiedLength > 0; + let l = 0; + let c = this.G(s.originalStart, s.originalLength, s.modifiedStart, s.modifiedLength); + for (let d = 1;; d++) { + const h = s.originalStart - d; + const g = s.modifiedStart - d; + if (h < n || g < r || o && !this.s(h, h + s.originalLength) || a && !this.u(g, g + s.modifiedLength)) { + break; + } + const b = (h === n && g === r ? 5 : 0) + this.G(h, s.originalLength, g, s.modifiedLength); + if (b > c) { + c = b; + l = d; + } + } + s.originalStart -= l; + s.modifiedStart -= l; + const u = [null]; + if (t > 0 && this.I(e[t - 1], e[t], u)) { + e[t - 1] = u[0]; + e.splice(t, 1); + t++; + continue; + } + } + if (this.d) { + for (let t = 1, s = e.length; t < s; t++) { + const n = e[t - 1]; + const r = e[t]; + const o = r.originalStart - n.originalStart - n.originalLength; + const a = n.originalStart; + const l = r.originalStart + r.originalLength; + const c = l - a; + const u = n.modifiedStart; + const d = r.modifiedStart + r.modifiedLength; + const h = d - u; + if (o < 5 && c < 20 && h < 20) { + const g = this.A(a, c, u, h, o); + if (g) { + const [p, b] = g; + if (p !== n.originalStart + n.originalLength || b !== n.modifiedStart + n.modifiedLength) { + n.originalLength = p - n.originalStart; + n.modifiedLength = b - n.modifiedStart; + r.originalStart = p + o; + r.modifiedStart = b + o; + r.originalLength = l - r.originalStart; + r.modifiedLength = d - r.modifiedStart; + } + } + } + } + } + return e; + } + A(e, t, s, n, r) { + if (t < r || n < r) { + return null; + } + const o = e + t - r + 1; + const a = s + n - r + 1; + let l = 0; + let c = 0; + let u = 0; + for (let d = e; d < o; d++) { + for (let h = s; h < a; h++) { + const g = this.B(d, h, r); + if (g > 0 && g > l) { + l = g; + c = d; + u = h; + } + } + } + if (l > 0) { + return [c, u]; + } else { + return null; + } + } + B(e, t, s) { + let n = 0; + for (let r = 0; r < s; r++) { + if (!this.p(e + r, t + r)) { + return 0; + } + n += this.e[e + r].length; + } + return n; + } + C(e) { + if (e <= 0 || e >= this.f.length - 1) { + return true; + } else { + return this.d && /^\s*$/.test(this.e[e]); + } + } + D(e, t) { + if (this.C(e) || this.C(e - 1)) { + return true; + } + if (t > 0) { + const s = e + t; + if (this.C(s - 1) || this.C(s)) { + return true; + } + } + return false; + } + E(e) { + if (e <= 0 || e >= this.h.length - 1) { + return true; + } else { + return this.d && /^\s*$/.test(this.g[e]); + } + } + F(e, t) { + if (this.E(e) || this.E(e - 1)) { + return true; + } + if (t > 0) { + const s = e + t; + if (this.E(s - 1) || this.E(s)) { + return true; + } + } + return false; + } + G(e, t, s, n) { + const r = this.D(e, t) ? 1 : 0; + const o = this.F(s, n) ? 1 : 0; + return r + o; + } + H(e, t) { + const s = []; + if (e.length === 0 || t.length === 0) { + if (t.length > 0) { + return t; + } else { + return e; + } + } + if (this.I(e[e.length - 1], t[0], s)) { + const n = new Array(e.length + t.length - 1); + Vne.Copy(e, 0, n, 0, e.length - 1); + n[e.length - 1] = s[0]; + Vne.Copy(t, 1, n, e.length, t.length - 1); + return n; + } else { + const n = new Array(e.length + t.length); + Vne.Copy(e, 0, n, 0, e.length); + Vne.Copy(t, 0, n, e.length, t.length); + return n; + } + } + I(e, t, s) { + Wne.Assert(e.originalStart <= t.originalStart, "Left change is not less than or equal to right change"); + Wne.Assert(e.modifiedStart <= t.modifiedStart, "Left change is not less than or equal to right change"); + if (e.originalStart + e.originalLength >= t.originalStart || e.modifiedStart + e.modifiedLength >= t.modifiedStart) { + const n = e.originalStart; + let r = e.originalLength; + const o = e.modifiedStart; + let a = e.modifiedLength; + if (e.originalStart + e.originalLength >= t.originalStart) { + r = t.originalStart + t.originalLength - e.originalStart; + } + if (e.modifiedStart + e.modifiedLength >= t.modifiedStart) { + a = t.modifiedStart + t.modifiedLength - e.modifiedStart; + } + s[0] = new qU(n, r, o, a); + return true; + } else { + s[0] = null; + return false; + } + } + J(e, t, s, n) { + if (e >= 0 && e < n) { + return e; + } + const r = s; + const o = n - s - 1; + const a = t % 2 === 0; + if (e < 0) { + const l = r % 2 === 0; + if (a === l) { + return 0; + } else { + return 1; + } + } else { + const l = o % 2 === 0; + if (a === l) { + return n - 1; + } else { + return n - 2; + } + } + } +}; +pe(); +sa(); +function p0e(i) { + return typeof i == "object" && "visibility" in i && "data" in i; +} +function CG(i) { + switch (i) { + case true: + return 1; + case false: + return 0; + default: + return i; + } +} +function AQt(i) { + return typeof i.collapsible == "boolean"; +} +var ugr = class { + constructor(i, e, t = {}) { + this.q = i; + this.rootRef = []; + this.d = new NZ(); + this.f = new B(); + this.onDidSpliceModel = this.f.event; + this.g = new B(); + this.onDidSpliceRenderedNodes = this.g.event; + this.h = new B(); + this.onDidChangeCollapseState = this.d.wrapEvent(this.h.event); + this.j = new B(); + this.onDidChangeRenderNodeCount = this.d.wrapEvent(this.j.event); + this.p = new gl(Hq); + this.k = typeof t.collapseByDefault === "undefined" ? false : t.collapseByDefault; + this.l = t.allowNonCollapsibleParents ?? false; + this.m = t.filter; + this.o = typeof t.autoExpandSingleChildren === "undefined" ? false : t.autoExpandSingleChildren; + this.c = { + parent: undefined, + element: e, + children: [], + depth: 0, + visibleChildrenCount: 0, + visibleChildIndex: -1, + collapsible: false, + collapsed: false, + renderNodeCount: 0, + visibility: 1, + visible: true, + filterData: undefined + }; + } + splice(i, e, t = Ws.empty(), s = {}) { + if (i.length === 0) { + throw new dC(this.q, "Invalid tree location"); + } + if (s.diffIdentityProvider) { + this.s(s.diffIdentityProvider, i, e, t, s); + } else { + this.t(i, e, t, s); + } + } + s(i, e, t, s = Ws.empty(), n, r = n.diffDepth ?? 0) { + const { + parentNode: o + } = this.H(e); + if (!o.lastDiffIds) { + return this.t(e, t, s, n); + } + const a = [...s]; + const l = e[e.length - 1]; + const c = new g0e({ + getElements: () => o.lastDiffIds + }, { + getElements: () => [...o.children.slice(0, l), ...a, ...o.children.slice(l + t)].map(p => i.getId(p.element).toString()) + }).ComputeDiff(false); + if (c.quitEarly) { + o.lastDiffIds = undefined; + return this.t(e, t, a, n); + } + const u = e.slice(0, -1); + const d = (p, b, v) => { + if (r > 0) { + for (let y = 0; y < v; y++) { + p--; + b--; + this.s(i, [...u, p, 0], Number.MAX_SAFE_INTEGER, a[b].children, n, r - 1); + } + } + }; + let h = Math.min(o.children.length, l + t); + let g = a.length; + for (const p of c.changes.sort((b, v) => v.originalStart - b.originalStart)) { + d(h, g, h - (p.originalStart + p.originalLength)); + h = p.originalStart; + g = p.modifiedStart - l; + this.t([...u, h], p.originalLength, Ws.slice(a, g, g + p.modifiedLength), n); + } + d(h, g, h); + } + t(i, e, t = Ws.empty(), { + onDidCreateNode: s, + onDidDeleteNode: n, + diffIdentityProvider: r + }) { + const { + parentNode: o, + listIndex: a, + revealed: l, + visible: c + } = this.H(i); + const u = []; + const d = Ws.map(t, S => this.x(S, o, o.visible ? 1 : 0, l, u, s)); + const h = i[i.length - 1]; + let g = 0; + for (let S = h; S >= 0 && S < o.children.length; S--) { + const x = o.children[S]; + if (x.visible) { + g = x.visibleChildIndex; + break; + } + } + const p = []; + let b = 0; + let v = 0; + for (const S of d) { + p.push(S); + v += S.renderNodeCount; + if (S.visible) { + S.visibleChildIndex = g + b++; + } + } + const y = VBt(o.children, h, e, p); + if (r) { + if (o.lastDiffIds) { + VBt(o.lastDiffIds, h, e, p.map(S => r.getId(S.element).toString())); + } else { + o.lastDiffIds = o.children.map(S => r.getId(S.element).toString()); + } + } else { + o.lastDiffIds = undefined; + } + let w = 0; + for (const S of y) { + if (S.visible) { + w++; + } + } + if (w !== 0) { + for (let S = h + p.length; S < o.children.length; S++) { + const x = o.children[S]; + if (x.visible) { + x.visibleChildIndex -= w; + } + } + } + o.visibleChildrenCount += b - w; + if (y.length > 0 && n) { + const S = x => { + n(x); + x.children.forEach(S); + }; + y.forEach(S); + } + if (l && c) { + const S = y.reduce((x, k) => x + (k.visible ? k.renderNodeCount : 0), 0); + this.C(o, v - S); + this.g.fire({ + start: a, + deleteCount: S, + elements: u + }); + } + this.f.fire({ + insertedNodes: p, + deletedNodes: y + }); + let C = o; + while (C) { + if (C.visibility === 2) { + this.p.trigger(() => this.refilter()); + break; + } + C = C.parent; + } + } + rerender(i) { + if (i.length === 0) { + throw new dC(this.q, "Invalid tree location"); + } + const { + node: e, + listIndex: t, + revealed: s + } = this.G(i); + if (e.visible && s) { + this.g.fire({ + start: t, + deleteCount: 1, + elements: [e] + }); + } + } + has(i) { + return this.E(i); + } + getListIndex(i) { + const { + listIndex: e, + visible: t, + revealed: s + } = this.G(i); + if (t && s) { + return e; + } else { + return -1; + } + } + getListRenderCount(i) { + return this.F(i).renderNodeCount; + } + isCollapsible(i) { + return this.F(i).collapsible; + } + setCollapsible(i, e) { + const t = this.F(i); + if (typeof e === "undefined") { + e = !t.collapsible; + } + const s = { + collapsible: e + }; + return this.d.bufferEvents(() => this.u(i, s)); + } + isCollapsed(i) { + return this.F(i).collapsed; + } + setCollapsed(i, e, t) { + const s = this.F(i); + if (typeof e === "undefined") { + e = !s.collapsed; + } + const n = { + collapsed: e, + recursive: t || false + }; + return this.d.bufferEvents(() => this.u(i, n)); + } + u(i, e) { + const { + node: t, + listIndex: s, + revealed: n + } = this.G(i); + const r = this.v(t, s, n, e); + if (t !== this.c && this.o && r && !AQt(e) && t.collapsible && !t.collapsed && !e.recursive) { + let o = -1; + for (let a = 0; a < t.children.length; a++) { + if (t.children[a].visible) { + if (o > -1) { + o = -1; + break; + } else { + o = a; + } + } + } + if (o > -1) { + this.u([...i, o], e); + } + } + return r; + } + v(i, e, t, s) { + const n = this.w(i, s, false); + if (!t || !i.visible || !n) { + return n; + } + const r = i.renderNodeCount; + const o = this.y(i); + const a = r - (e === -1 ? 0 : 1); + this.g.fire({ + start: e + 1, + deleteCount: a, + elements: o.slice(1) + }); + return n; + } + w(i, e, t) { + let s; + if (i === this.c) { + s = false; + } else { + if (AQt(e)) { + s = i.collapsible !== e.collapsible; + i.collapsible = e.collapsible; + } else if (i.collapsible) { + s = i.collapsed !== e.collapsed; + i.collapsed = e.collapsed; + } else { + s = false; + } + if (s) { + this.h.fire({ + node: i, + deep: t + }); + } + } + if (!AQt(e) && e.recursive) { + for (const n of i.children) { + s = this.w(n, e, true) || s; + } + } + return s; + } + expandTo(i) { + this.d.bufferEvents(() => { + let e = this.F(i); + while (e.parent) { + e = e.parent; + i = i.slice(0, i.length - 1); + if (e.collapsed) { + this.u(i, { + collapsed: false, + recursive: false + }); + } + } + }); + } + refilter() { + const i = this.c.renderNodeCount; + const e = this.A(this.c); + this.g.fire({ + start: 0, + deleteCount: i, + elements: e + }); + this.p.cancel(); + } + x(i, e, t, s, n, r) { + const o = { + parent: e, + element: i.element, + children: [], + depth: e.depth + 1, + visibleChildrenCount: 0, + visibleChildIndex: -1, + collapsible: typeof i.collapsible == "boolean" ? i.collapsible : typeof i.collapsed !== "undefined", + collapsed: typeof i.collapsed === "undefined" ? this.k : i.collapsed, + renderNodeCount: 1, + visibility: 1, + visible: true, + filterData: undefined + }; + const a = this.D(o, t); + o.visibility = a; + if (s) { + n.push(o); + } + const l = i.children || Ws.empty(); + const c = s && a !== 0 && !o.collapsed; + let u = 0; + let d = 1; + for (const h of l) { + const g = this.x(h, o, a, c, n, r); + o.children.push(g); + d += g.renderNodeCount; + if (g.visible) { + g.visibleChildIndex = u++; + } + } + if (!this.l) { + o.collapsible = o.collapsible || o.children.length > 0; + } + o.visibleChildrenCount = u; + o.visible = a === 2 ? u > 0 : a === 1; + if (o.visible) { + if (!o.collapsed) { + o.renderNodeCount = d; + } + } else { + o.renderNodeCount = 0; + if (s) { + n.pop(); + } + } + r?.(o); + return o; + } + y(i) { + const e = i.renderNodeCount; + const t = []; + this.z(i, t); + this.C(i.parent, t.length - e); + return t; + } + z(i, e) { + if (i.visible === false) { + return 0; + } + e.push(i); + i.renderNodeCount = 1; + if (!i.collapsed) { + for (const t of i.children) { + i.renderNodeCount += this.z(t, e); + } + } + this.j.fire(i); + return i.renderNodeCount; + } + A(i) { + const e = i.renderNodeCount; + const t = []; + this.B(i, i.visible ? 1 : 0, t); + this.C(i.parent, t.length - e); + return t; + } + B(i, e, t, s = true) { + let n; + if (i !== this.c) { + n = this.D(i, e); + if (n === 0) { + i.visible = false; + i.renderNodeCount = 0; + return false; + } + if (s) { + t.push(i); + } + } + const r = t.length; + i.renderNodeCount = i === this.c ? 0 : 1; + let o = false; + if (!i.collapsed || n !== 0) { + let a = 0; + for (const l of i.children) { + o = this.B(l, n, t, s && !i.collapsed) || o; + if (l.visible) { + l.visibleChildIndex = a++; + } + } + i.visibleChildrenCount = a; + } else { + i.visibleChildrenCount = 0; + } + if (i !== this.c) { + i.visible = n === 2 ? o : n === 1; + i.visibility = n; + } + if (i.visible) { + if (!i.collapsed) { + i.renderNodeCount += t.length - r; + } + } else { + i.renderNodeCount = 0; + if (s) { + t.pop(); + } + } + this.j.fire(i); + return i.visible; + } + C(i, e) { + if (e !== 0) { + while (i) { + i.renderNodeCount += e; + this.j.fire(i); + i = i.parent; + } + } + } + D(i, e) { + const t = this.m ? this.m.filter(i.element, e) : 1; + if (typeof t == "boolean") { + i.filterData = undefined; + if (t) { + return 1; + } else { + return 0; + } + } else if (p0e(t)) { + i.filterData = t.data; + return CG(t.visibility); + } else { + i.filterData = undefined; + return CG(t); + } + } + E(i, e = this.c) { + if (!i || i.length === 0) { + return true; + } + const [t, ...s] = i; + if (t < 0 || t > e.children.length) { + return false; + } else { + return this.E(s, e.children[t]); + } + } + F(i, e = this.c) { + if (!i || i.length === 0) { + return e; + } + const [t, ...s] = i; + if (t < 0 || t > e.children.length) { + throw new dC(this.q, "Invalid tree location"); + } + return this.F(s, e.children[t]); + } + G(i) { + if (i.length === 0) { + return { + node: this.c, + listIndex: -1, + revealed: true, + visible: false + }; + } + const { + parentNode: e, + listIndex: t, + revealed: s, + visible: n + } = this.H(i); + const r = i[i.length - 1]; + if (r < 0 || r > e.children.length) { + throw new dC(this.q, "Invalid tree location"); + } + const o = e.children[r]; + return { + node: o, + listIndex: t, + revealed: s, + visible: n && o.visible + }; + } + H(i, e = this.c, t = 0, s = true, n = true) { + const [r, ...o] = i; + if (r < 0 || r > e.children.length) { + throw new dC(this.q, "Invalid tree location"); + } + for (let a = 0; a < r; a++) { + t += e.children[a].renderNodeCount; + } + s = s && !e.collapsed; + n = n && e.visible; + if (o.length === 0) { + return { + parentNode: e, + listIndex: t, + revealed: s, + visible: n + }; + } else { + return this.H(o, e.children[r], t + 1, s, n); + } + } + getNode(i = []) { + return this.F(i); + } + getNodeLocation(i) { + const e = []; + let t = i; + while (t.parent) { + e.push(t.parent.children.indexOf(t)); + t = t.parent; + } + return e.reverse(); + } + getParentNodeLocation(i) { + if (i.length !== 0) { + if (i.length === 1) { + return []; + } else { + return qb(i)[0]; + } + } + } + getFirstElementChild(i) { + const e = this.F(i); + if (e.children.length !== 0) { + return e.children[0].element; + } + } + getLastElementAncestor(i = []) { + const e = this.F(i); + if (e.children.length !== 0) { + return this.I(e); + } + } + I(i) { + if (i.children.length === 0) { + return i.element; + } else { + return this.I(i.children[i.children.length - 1]); + } + } +}; +Fs(); +Jt(); +nt(); +He(); +Rt(); +In(); +pe(); +Pc(); +q(); +Xf(); +X(); +oa(); +An(); +wc(); +var dgr = class extends iR { + set context(i) { + this.c.context = i; + } + get context() { + return this.c.context; + } + constructor(i) { + super(i.elements.map(e => e.element)); + this.c = i; + } +}; +function $Qt(i) { + if (i instanceof iR) { + return new dgr(i); + } else { + return i; + } +} +var hgr = class { + constructor(i, e) { + this.d = i; + this.f = e; + this.b = H.None; + this.c = new Q(); + } + getDragURI(i) { + return this.f.getDragURI(i.element); + } + getDragLabel(i, e) { + if (this.f.getDragLabel) { + return this.f.getDragLabel(i.map(t => t.element), e); + } + } + onDragStart(i, e) { + this.f.onDragStart?.($Qt(i), e); + } + onDragOver(i, e, t, s, n, r = true) { + const o = this.f.onDragOver($Qt(i), e && e.element, t, s, n); + const a = this.a !== e; + if (a) { + this.b.dispose(); + this.a = e; + } + if (typeof e === "undefined") { + return o; + } + if (a && typeof o != "boolean" && o.autoExpand) { + this.b = Gd(() => { + const h = this.d(); + const g = h.getNodeLocation(e); + if (h.isCollapsed(g)) { + h.setCollapsed(g, false); + } + this.a = undefined; + }, 500, this.c); + } + if (typeof o == "boolean" || !o.accept || typeof o.bubble === "undefined" || o.feedback) { + if (!r) { + const h = typeof o == "boolean" ? o : o.accept; + const g = typeof o == "boolean" ? undefined : o.effect; + return { + accept: h, + effect: g, + feedback: [t] + }; + } + return o; + } + if (o.bubble === 1) { + const h = this.d(); + const g = h.getNodeLocation(e); + const p = h.getParentNodeLocation(g); + const b = h.getNode(p); + const v = p && h.getListIndex(p); + return this.onDragOver(i, b, v, s, n, false); + } + const l = this.d(); + const c = l.getNodeLocation(e); + const u = l.getListIndex(c); + const d = l.getListRenderCount(c); + return { + ...o, + feedback: $0(u, u + d) + }; + } + drop(i, e, t, s, n) { + this.b.dispose(); + this.a = undefined; + this.f.drop($Qt(i), e && e.element, t, s, n); + } + onDragEnd(i) { + this.f.onDragEnd?.(i); + } + dispose() { + this.c.dispose(); + this.f.dispose(); + } +}; +function fgr(i, e, t) { + return t && { + ...t, + identityProvider: t.identityProvider && { + getId(s) { + return t.identityProvider.getId(s.element); + } + }, + dnd: t.dnd && e.add(new hgr(i, t.dnd)), + multipleSelectionController: t.multipleSelectionController && { + isSelectionSingleChangeEvent(s) { + return t.multipleSelectionController.isSelectionSingleChangeEvent({ + ...s, + element: s.element + }); + }, + isSelectionRangeChangeEvent(s) { + return t.multipleSelectionController.isSelectionRangeChangeEvent({ + ...s, + element: s.element + }); + } + }, + accessibilityProvider: t.accessibilityProvider && { + ...t.accessibilityProvider, + getSetSize(s) { + const n = i(); + const r = n.getNodeLocation(s); + const o = n.getParentNodeLocation(r); + return n.getNode(o).visibleChildrenCount; + }, + getPosInSet(s) { + return s.visibleChildIndex + 1; + }, + isChecked: t.accessibilityProvider && t.accessibilityProvider.isChecked ? s => t.accessibilityProvider.isChecked(s.element) : undefined, + getRole: t.accessibilityProvider && t.accessibilityProvider.getRole ? s => t.accessibilityProvider.getRole(s.element) : () => "treeitem", + getAriaLabel(s) { + return t.accessibilityProvider.getAriaLabel(s.element); + }, + getWidgetAriaLabel() { + return t.accessibilityProvider.getWidgetAriaLabel(); + }, + getWidgetRole: t.accessibilityProvider && t.accessibilityProvider.getWidgetRole ? () => t.accessibilityProvider.getWidgetRole() : () => "tree", + getAriaLevel: t.accessibilityProvider && t.accessibilityProvider.getAriaLevel ? s => t.accessibilityProvider.getAriaLevel(s.element) : s => s.depth, + getActiveDescendantId: t.accessibilityProvider.getActiveDescendantId && (s => t.accessibilityProvider.getActiveDescendantId(s.element)) + }, + keyboardNavigationLabelProvider: t.keyboardNavigationLabelProvider && { + ...t.keyboardNavigationLabelProvider, + getKeyboardNavigationLabel(s) { + return t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(s.element); + } + } + }; +} +var FQt = class { + constructor(i) { + this.a = i; + } + getHeight(i) { + return this.a.getHeight(i.element); + } + getTemplateId(i) { + return this.a.getTemplateId(i.element); + } + hasDynamicHeight(i) { + return !!this.a.hasDynamicHeight && this.a.hasDynamicHeight(i.element); + } + setDynamicHeight(i, e) { + this.a.setDynamicHeight?.(i.element, e); + } +}; +var _5s = class $Ft { + static lift(e) { + if (e instanceof $Ft) { + return e; + } else { + return new $Ft(e); + } + } + static empty(e = 0) { + return new $Ft({ + focus: [], + selection: [], + expanded: Object.create(null), + scrollTop: e + }); + } + constructor(e) { + this.focus = new Set(e.focus); + this.selection = new Set(e.selection); + if (e.expanded instanceof Array) { + this.expanded = Object.create(null); + for (const t of e.expanded) { + this.expanded[t] = 1; + } + } else { + this.expanded = e.expanded; + } + this.expanded = e.expanded; + this.scrollTop = e.scrollTop; + } + toJSON() { + return { + focus: Array.from(this.focus), + selection: Array.from(this.selection), + expanded: this.expanded, + scrollTop: this.scrollTop + }; + } +}; +var PA; +(function (i) { + i.None = "none"; + i.OnHover = "onHover"; + i.Always = "always"; +})(PA ||= {}); +var ggr = class { + get elements() { + return this.b; + } + constructor(i, e = []) { + this.b = e; + this.a = new Q(); + this.onDidChange = de.forEach(i, t => this.b = t, this.a); + } + dispose() { + this.a.dispose(); + } +}; +var pgr = class c9i { + static { + this.a = 8; + } + constructor(e, t, s, n, r, o = {}) { + this.o = e; + this.p = t; + this.q = n; + this.s = r; + this.b = new Map(); + this.c = new Map(); + this.d = c9i.a; + this.f = false; + this.g = false; + this.j = new Set(); + this.k = H.None; + this.m = new Q(); + this.templateId = e.templateId; + this.updateOptions(o); + de.map(s, a => a.node)(this.u, this, this.m); + e.onDidChangeTwistieState?.(this.t, this, this.m); + } + updateOptions(e = {}) { + if (typeof e.indent !== "undefined") { + const t = yc(e.indent, 0, 40); + if (t !== this.d) { + this.d = t; + for (const [s, n] of this.c) { + this.v(s, n); + } + } + } + if (typeof e.renderIndentGuides !== "undefined") { + const t = e.renderIndentGuides !== PA.None; + if (t !== this.g) { + this.g = t; + for (const [s, n] of this.c) { + this.w(s, n); + } + this.k.dispose(); + if (t) { + const s = new Q(); + this.q.onDidChange(this.x, this, s); + this.k = s; + this.x(this.q.elements); + } + } + } + if (typeof e.hideTwistiesOfChildlessElements !== "undefined") { + this.f = e.hideTwistiesOfChildlessElements; + } + } + renderTemplate(e) { + const t = z(e, G(".monaco-tl-row")); + const s = z(t, G(".monaco-tl-indent")); + const n = z(t, G(".monaco-tl-twistie")); + const r = z(t, G(".monaco-tl-contents")); + const o = this.o.renderTemplate(r); + return { + container: e, + indent: s, + twistie: n, + indentGuidesDisposable: H.None, + templateData: o + }; + } + renderElement(e, t, s, n) { + this.c.set(e, s); + this.b.set(e.element, e); + this.v(e, s); + this.o.renderElement(e, t, s.templateData, n); + } + disposeElement(e, t, s, n) { + s.indentGuidesDisposable.dispose(); + this.o.disposeElement?.(e, t, s.templateData, n); + if (typeof n == "number") { + this.c.delete(e); + this.b.delete(e.element); + } + } + disposeTemplate(e) { + this.o.disposeTemplate(e.templateData); + } + t(e) { + const t = this.b.get(e); + if (t) { + this.u(t); + } + } + u(e) { + const t = this.c.get(e); + if (t) { + this.x(this.q.elements); + this.v(e, t); + } + } + v(e, t) { + const s = c9i.a + (e.depth - 1) * this.d; + t.twistie.style.paddingLeft = `${s}px`; + t.indent.style.width = `${s + this.d - 16}px`; + if (e.collapsible) { + t.container.setAttribute("aria-expanded", String(!e.collapsed)); + } else { + t.container.removeAttribute("aria-expanded"); + } + t.twistie.classList.remove(...le.asClassNameArray(A.treeItemExpanded)); + let n = false; + if (this.o.renderTwistie) { + n = this.o.renderTwistie(e.element, t.twistie); + } + if (e.collapsible && (!this.f || e.visibleChildrenCount > 0)) { + if (!n) { + t.twistie.classList.add(...le.asClassNameArray(A.treeItemExpanded)); + } + t.twistie.classList.add("collapsible"); + t.twistie.classList.toggle("collapsed", e.collapsed); + } else { + t.twistie.classList.remove("collapsible", "collapsed"); + } + this.w(e, t); + } + w(e, t) { + Lr(t.indent); + t.indentGuidesDisposable.dispose(); + if (!this.g) { + return; + } + const s = new Q(); + while (true) { + const n = this.p.getNodeLocation(e); + const r = this.p.getParentNodeLocation(n); + if (!r) { + break; + } + const o = this.p.getNode(r); + const a = G(".indent-guide", { + style: `width: ${this.d}px` + }); + if (this.j.has(o)) { + a.classList.add("active"); + } + if (t.indent.childElementCount === 0) { + t.indent.appendChild(a); + } else { + t.indent.insertBefore(a, t.indent.firstElementChild); + } + this.s.add(o, a); + s.add(Ue(() => this.s.delete(o, a))); + e = o; + } + t.indentGuidesDisposable = s; + } + x(e) { + if (!this.g) { + return; + } + const t = new Set(); + e.forEach(s => { + const n = this.p.getNodeLocation(s); + try { + const r = this.p.getParentNodeLocation(n); + if (s.collapsible && s.children.length > 0 && !s.collapsed) { + t.add(s); + } else if (r) { + t.add(this.p.getNode(r)); + } + } catch {} + }); + this.j.forEach(s => { + if (!t.has(s)) { + this.s.forEach(s, n => n.classList.remove("active")); + } + }); + t.forEach(s => { + if (!this.j.has(s)) { + this.s.forEach(s, n => n.classList.add("active")); + } + }); + this.j = t; + } + dispose() { + this.c.clear(); + this.b.clear(); + this.k.dispose(); + si(this.m); + } +}; +function mgr(i, e) { + const t = e.toLowerCase().indexOf(i); + let s; + if (t > -1) { + s = [Number.MAX_SAFE_INTEGER, 0]; + for (let n = i.length; n > 0; n--) { + s.push(t + n - 1); + } + } + return s; +} +var B5s = class { + get totalCount() { + return this.a; + } + get matchCount() { + return this.b; + } + set findMatchType(i) { + this.d = i; + } + get findMatchType() { + return this.d; + } + set findMode(i) { + this.f = i; + } + get findMode() { + return this.f; + } + set pattern(i) { + this.g = i; + this.j = i.toLowerCase(); + } + constructor(i, e, t) { + this.m = i; + this.o = e; + this.p = t; + this.a = 0; + this.b = 0; + this.d = SS.Fuzzy; + this.f = og.Highlight; + this.g = ""; + this.j = ""; + this.k = new Q(); + } + filter(i, e) { + let t = 1; + if (this.o) { + const r = this.o.filter(i, e); + if (typeof r == "boolean") { + t = r ? 1 : 0; + } else if (p0e(r)) { + t = CG(r.visibility); + } else { + t = r; + } + if (t === 0) { + return false; + } + } + this.a++; + if (!this.g) { + this.b++; + return { + data: Nx.Default, + visibility: t + }; + } + const s = this.m.getKeyboardNavigationLabel(i); + const n = Array.isArray(s) ? s : [s]; + for (const r of n) { + const o = r && r.toString(); + if (typeof o === "undefined") { + return { + data: Nx.Default, + visibility: t + }; + } + let a; + if (this.d === SS.Contiguous) { + a = mgr(this.j, o.toLowerCase()); + } else { + a = U4(this.g, this.j, 0, o, o.toLowerCase(), 0, { + firstMatchCanBeWeak: true, + boostFullMatch: true + }); + } + if (a) { + this.b++; + if (n.length === 1) { + return { + data: a, + visibility: t + }; + } else { + return { + data: { + label: o, + score: a + }, + visibility: t + }; + } + } + } + if (this.f === og.Filter) { + if (typeof this.p == "number") { + return this.p; + } else if (this.p) { + return this.p(i); + } else { + return 2; + } + } else { + return { + data: Nx.Default, + visibility: t + }; + } + } + reset() { + this.a = 0; + this.b = 0; + } + dispose() { + si(this.k); + } +}; +var bgr = class extends ew { + constructor(i, e, t) { + super({ + icon: i.icon, + title: i.title, + isChecked: i.isChecked, + inputActiveOptionBorder: e.inputActiveOptionBorder, + inputActiveOptionForeground: e.inputActiveOptionForeground, + inputActiveOptionBackground: e.inputActiveOptionBackground, + hoverDelegate: t + }); + this.id = i.id; + } +}; +var vgr = class { + constructor(i) { + this.a = new Map(i.map(e => [e.id, { + ...e + }])); + } + states() { + return Array.from(this.a.values()); + } + get(i) { + const e = this.a.get(i); + if (e === undefined) { + throw new Error(`No state found for toggle id ${i}`); + } + return e.isChecked; + } + set(i, e) { + const t = this.a.get(i); + if (t === undefined) { + throw new Error(`No state found for toggle id ${i}`); + } + if (t.isChecked === e) { + return false; + } else { + t.isChecked = e; + return true; + } + } +}; +var ygr = { + inputBoxStyles: agr, + toggleStyles: d0e, + listFilterWidgetBackground: undefined, + listFilterWidgetNoMatchesOutline: undefined, + listFilterWidgetOutline: undefined, + listFilterWidgetShadow: undefined +}; +var og; +(function (i) { + i[i.Highlight = 0] = "Highlight"; + i[i.Filter = 1] = "Filter"; +})(og ||= {}); +var SS; +(function (i) { + i[i.Fuzzy = 0] = "Fuzzy"; + i[i.Contiguous = 1] = "Contiguous"; +})(SS ||= {}); +var wgr = class extends H { + get value() { + return this.b.inputBox.value; + } + set value(i) { + this.b.inputBox.value = i; + } + constructor(i, e, t, s, n = [], r) { + super(); + this.g = e; + this.a = Ts(".monaco-tree-type-filter", [Ts(".monaco-tree-type-filter-input@findInput"), Ts(".monaco-tree-type-filter-actionbar@actionbar")]); + this.f = []; + this._onDidDisable = new B(); + this.onDidDisable = this._onDidDisable.event; + i.appendChild(this.a.root); + this.D(Ue(() => this.a.root.remove())); + const o = r?.styles ?? ygr; + if (o.listFilterWidgetBackground) { + this.a.root.style.backgroundColor = o.listFilterWidgetBackground; + } + if (o.listFilterWidgetShadow) { + this.a.root.style.boxShadow = `0 0 8px 2px ${o.listFilterWidgetShadow}`; + } + const a = this.D(Hy()); + this.f = n.map(h => this.D(new bgr(h, o.toggleStyles, a))); + this.onDidToggleChange = de.any(...this.f.map(h => de.map(h.onChange, () => ({ + id: h.id, + isChecked: h.checked + })))); + const l = r?.history || []; + this.b = this.D(new Kpt(this.a.findInput, t, { + label: f(31, null), + placeholder: s, + additionalToggles: this.f, + showCommonFindToggles: false, + inputBoxStyles: o.inputBoxStyles, + toggleStyles: o.toggleStyles, + history: new Set(l) + })); + this.c = this.D(new ea(this.a.actionbar)); + const c = this.D(new Co(this.b.inputBox.inputElement, "keydown")); + const u = de.chain(c.event, h => h.map(g => new wr(g))); + this.D(u(h => { + if (h.equals(3)) { + h.preventDefault(); + h.stopPropagation(); + this.b.inputBox.addToHistory(); + this.g.domFocus(); + return; + } + if (h.equals(18)) { + h.preventDefault(); + h.stopPropagation(); + if (this.b.inputBox.isAtLastInHistory() || this.b.inputBox.isNowhereInHistory()) { + this.b.inputBox.addToHistory(); + this.g.domFocus(); + } else { + this.b.inputBox.showNextValue(); + } + return; + } + if (h.equals(16)) { + h.preventDefault(); + h.stopPropagation(); + this.b.inputBox.showPreviousValue(); + return; + } + })); + const d = this.D(new Yt("close", f(32, null), "codicon codicon-close", true, () => this.dispose())); + this.c.push(d, { + icon: true, + label: false + }); + this.onDidChangeValue = this.b.onDidChange; + } + setToggleState(i, e) { + const t = this.f.find(s => s.id === i); + if (t) { + t.checked = e; + } + } + setPlaceHolder(i) { + this.b.inputBox.setPlaceHolder(i); + } + getHistory() { + return this.b.inputBox.getHistory(); + } + focus() { + this.b.focus(); + } + select() { + this.b.select(); + this.b.inputBox.addToHistory(true); + } + showMessage(i) { + this.b.showMessage(i); + } + clearMessage() { + this.b.clearMessage(); + } + async dispose() { + this._onDidDisable.fire(); + this.a.root.classList.add("disabled"); + await Da(300); + super.dispose(); + } +}; +var CO; +(function (i) { + i.Mode = "mode"; + i.MatchType = "matchType"; +})(CO ||= {}); +var Cgr = class { + get pattern() { + return this.b; + } + get j() { + return this.g; + } + set j(i) { + this.g = i; + this.k?.setPlaceHolder(i); + } + constructor(i, e, t, s = {}) { + this.s = i; + this.t = e; + this.u = t; + this.v = s; + this.b = ""; + this.d = ""; + this.m = new B(); + this.onDidChangePattern = this.m.event; + this.o = new B(); + this.onDidChangeOpenState = this.o.event; + this.p = new Q(); + this.q = new Q(); + this.f = new vgr(s.toggles ?? []); + this.g = s.placeholder ?? f(33, null); + } + isOpened() { + return !!this.k; + } + open() { + if (this.k) { + this.k.focus(); + this.k.select(); + return; + } + this.s.updateOptions({ + paddingTop: 30 + }); + this.k = new wgr(this.s.getHTMLElement(), this.s, this.u, this.j, this.f.states(), { + ...this.v, + history: this.a + }); + this.p.add(this.k); + this.k.onDidChangeValue(this.w, this, this.p); + this.k.onDidDisable(this.close, this, this.p); + this.k.onDidToggleChange(this.y, this, this.p); + this.k.focus(); + this.k.value = this.d; + this.k.select(); + this.o.fire(true); + } + close() { + if (this.k) { + this.s.updateOptions({ + paddingTop: 0 + }); + this.a = this.k.getHistory(); + this.k = undefined; + this.p.clear(); + this.d = this.pattern; + this.w(""); + this.s.domFocus(); + this.o.fire(false); + } + } + w(i) { + this.b = i; + this.m.fire(i); + this.t.pattern = i; + this.x(i); + } + y(i) { + this.f.set(i.id, i.isChecked); + } + z(i, e) { + this.f.set(i, e); + this.k?.setToggleState(i, e); + } + A(i, e) { + if (i) { + if (this.s.options.showNotFoundMessage ?? true) { + this.k?.showMessage({ + type: 2, + content: e ?? f(34, null) + }); + } else { + this.k?.showMessage({ + type: 2 + }); + } + } else { + this.k?.clearMessage(); + } + } + B(i) { + Fc(i ? f(36, null, i) : f(35, null)); + } + dispose() { + this.a = undefined; + this.m.dispose(); + this.p.dispose(); + this.q.dispose(); + } +}; +var U5s = class extends Cgr { + get mode() { + if (this.f.get(CO.Mode)) { + return og.Filter; + } else { + return og.Highlight; + } + } + set mode(i) { + if (i === this.mode) { + return; + } + const e = i === og.Filter; + this.z(CO.Mode, e); + this.j = f(e ? 37 : 38, null); + this.t.findMode = i; + this.s.refilter(); + this.H(); + this.C.fire(i); + } + get matchType() { + if (this.f.get(CO.MatchType)) { + return SS.Fuzzy; + } else { + return SS.Contiguous; + } + } + set matchType(i) { + if (i !== this.matchType) { + this.z(CO.MatchType, i === SS.Fuzzy); + this.t.findMatchType = i; + this.s.refilter(); + this.H(); + this.D.fire(i); + } + } + constructor(i, e, t, s = {}) { + const n = s.defaultFindMode ?? og.Highlight; + const r = s.defaultFindMatchType ?? SS.Fuzzy; + const o = [{ + id: CO.Mode, + icon: A.listFilter, + title: f(39, null), + isChecked: n === og.Filter + }, { + id: CO.MatchType, + icon: A.searchFuzzy, + title: f(40, null), + isChecked: r === SS.Fuzzy + }]; + e.findMatchType = r; + e.findMode = n; + super(i, e, t, { + ...s, + toggles: o + }); + this.t = e; + this.C = new B(); + this.onDidChangeMode = this.C.event; + this.D = new B(); + this.onDidChangeMatchType = this.D.event; + this.q.add(this.s.onDidChangeModel(() => { + if (this.isOpened()) { + if (this.pattern.length !== 0) { + this.s.refilter(); + } + this.H(); + } + })); + this.q.add(this.s.onWillRefilter(() => this.t.reset())); + } + updateOptions(i = {}) { + if (i.defaultFindMode !== undefined) { + this.mode = i.defaultFindMode; + } + if (i.defaultFindMatchType !== undefined) { + this.matchType = i.defaultFindMatchType; + } + } + x(i) { + this.s.refilter(); + if (i) { + this.s.focusNext(0, true, undefined, t => this.shouldAllowFocus(t)); + } + const e = this.s.getFocus(); + if (e.length > 0) { + const t = e[0]; + if (this.s.getRelativeTop(t) === null) { + this.s.reveal(t, 0.5); + } + } + this.H(); + } + shouldAllowFocus(i) { + if (!this.isOpened() || !this.pattern || this.t.totalCount > 0 && this.t.matchCount <= 1) { + return true; + } else { + return !Nx.isDefault(i.filterData); + } + } + y(i) { + if (i.id === CO.Mode) { + this.mode = i.isChecked ? og.Filter : og.Highlight; + } else if (i.id === CO.MatchType) { + this.matchType = i.isChecked ? SS.Fuzzy : SS.Contiguous; + } + } + H() { + const e = this.t.matchCount === 0 && this.t.totalCount > 0 && this.pattern.length > 0; + this.A(e); + if (this.pattern.length) { + this.B(this.t.matchCount); + } + } +}; +function Sgr(i, e) { + return i.position === e.position && W5s(i, e); +} +function W5s(i, e) { + return i.node.element === e.node.element && i.startIndex === e.startIndex && i.height === e.height && i.endIndex === e.endIndex; +} +var xgr = class { + constructor(i = []) { + this.stickyNodes = i; + } + get count() { + return this.stickyNodes.length; + } + equal(i) { + return Go(this.stickyNodes, i.stickyNodes, Sgr); + } + contains(i) { + return this.stickyNodes.some(e => e.node.element === i.element); + } + lastNodePartiallyVisible() { + if (this.count === 0) { + return false; + } + const i = this.stickyNodes[this.count - 1]; + if (this.count === 1) { + return i.position !== 0; + } + const e = this.stickyNodes[this.count - 2]; + return e.position + e.height !== i.position; + } + animationStateChanged(i) { + if (!Go(this.stickyNodes, i.stickyNodes, W5s) || this.count === 0) { + return false; + } + const e = this.stickyNodes[this.count - 1]; + const t = i.stickyNodes[i.count - 1]; + return e.position !== t.position; + } +}; +var kgr = class { + constrainStickyScrollNodes(i, e, t) { + for (let s = 0; s < i.length; s++) { + const n = i[s]; + if (n.position + n.height > t || s >= e) { + return i.slice(0, s); + } + } + return i; + } +}; +var V5s = class extends H { + constructor(i, e, t, s, n, r = {}) { + super(); + this.j = i; + this.m = e; + this.q = t; + this.s = n; + this.c = 0.4; + const o = this.validateStickySettings(r); + this.b = o.stickyScrollMaxItemCount; + this.a = r.stickyScrollDelegate ?? new kgr(); + this.g = r.paddingTop ?? 0; + this.f = this.D(new Egr(t.getScrollableElement(), t, i, s, n, r.accessibilityProvider)); + this.onDidChangeHasFocus = this.f.onDidChangeHasFocus; + this.onContextMenu = this.f.onContextMenu; + this.D(t.onDidScroll(() => this.u())); + this.D(t.onDidChangeContentHeight(() => this.u())); + this.D(i.onDidChangeCollapseState(() => this.u())); + this.D(e.onDidSpliceRenderedNodes(a => { + const l = this.f.state; + if (!l) { + return; + } + if (a.deleteCount > 0 && l.stickyNodes.some(d => !this.m.has(this.m.getNodeLocation(d.node)))) { + this.u(); + return; + } + if (l.stickyNodes.some(d => { + const h = this.m.getListIndex(this.m.getNodeLocation(d.node)); + return h >= a.start && h < a.start + a.deleteCount && l.contains(d.node); + })) { + this.f.rerender(); + } + })); + this.u(); + } + get height() { + return this.f.height; + } + get count() { + return this.f.count; + } + getNode(i) { + return this.f.getNode(i); + } + t(i) { + let e; + if (i === 0) { + e = this.q.firstVisibleIndex; + } else { + e = this.q.indexAt(i + this.q.scrollTop); + } + if (!(e < 0) && !(e >= this.q.length)) { + return this.q.element(e); + } + } + u() { + const i = this.t(this.g); + if (!i || this.j.scrollTop <= this.g) { + this.f.setState(undefined); + return; + } + const e = this.w(i); + this.f.setState(e); + } + w(i) { + const e = []; + let t = i; + let s = 0; + let n = this.z(t, undefined, s); + while (n && (e.push(n), s += n.height, !(e.length <= this.b) || !(t = this.y(n), !t))) { + n = this.z(t, n.node, s); + } + const r = this.I(e); + if (r.length) { + return new xgr(r); + } else { + return undefined; + } + } + y(i) { + return this.t(i.position + i.height); + } + z(i, e, t) { + const s = this.G(i, e); + if (s && (s !== i || !!this.L(i) && !this.C(i, t))) { + return this.F(s, t); + } + } + C(i, e) { + const t = this.M(i); + const s = this.q.getElementTop(t); + const n = e; + return this.q.scrollTop === s - n; + } + F(i, e) { + const t = this.s.getHeight(i); + const { + startIndex: s, + endIndex: n + } = this.O(i); + const r = this.H(n, e, t); + return { + node: i, + position: r, + height: t, + startIndex: s, + endIndex: n + }; + } + G(i, e = undefined) { + let t = i; + let s = this.J(t); + while (s) { + if (s === e) { + return t; + } + t = s; + s = this.J(t); + } + if (e === undefined) { + return t; + } + } + H(i, e, t) { + let s = this.q.getRelativeTop(i); + if (s === null && this.q.firstVisibleIndex === i && i + 1 < this.q.length) { + const l = this.s.getHeight(this.q.element(i)); + const c = this.q.getRelativeTop(i + 1); + s = c ? c - l / this.q.renderHeight : null; + } + if (s === null) { + return e; + } + const n = this.q.element(i); + const r = this.s.getHeight(n); + const a = s * this.q.renderHeight + r; + if (e + t > a && e <= a) { + return a - t; + } else { + return e; + } + } + I(i) { + if (i.length === 0) { + return []; + } + const e = this.q.renderHeight * this.c; + const t = i[i.length - 1]; + if (i.length <= this.b && t.position + t.height <= e) { + return i; + } + const s = this.a.constrainStickyScrollNodes(i, this.b, e); + if (!s.length) { + return []; + } + const n = s[s.length - 1]; + if (s.length > this.b || n.position + n.height > e) { + throw new Error("stickyScrollDelegate violates constraints"); + } + return s; + } + J(i) { + const e = this.m.getNodeLocation(i); + const t = this.m.getParentNodeLocation(e); + if (t) { + return this.m.getNode(t); + } else { + return undefined; + } + } + L(i) { + const e = this.m.getNodeLocation(i); + return this.m.getListRenderCount(e) > 1; + } + M(i) { + const e = this.m.getNodeLocation(i); + return this.m.getListIndex(e); + } + O(i) { + const e = this.m.getNodeLocation(i); + const t = this.m.getListIndex(e); + if (t < 0) { + throw new Error("Node not found in tree"); + } + const s = this.m.getListRenderCount(e); + const n = t + s - 1; + return { + startIndex: t, + endIndex: n + }; + } + nodePositionTopBelowWidget(i) { + const e = []; + let t = this.J(i); + while (t) { + e.push(t); + t = this.J(t); + } + let s = 0; + for (let n = 0; n < e.length && n < this.b; n++) { + s += this.s.getHeight(e[n]); + } + return s; + } + getFocus() { + return this.f.getFocus(); + } + domFocus() { + this.f.domFocus(); + } + focusedLast() { + return this.f.focusedLast(); + } + updateOptions(i = {}) { + if (i.paddingTop !== undefined) { + this.g = i.paddingTop; + } + if (i.stickyScrollMaxItemCount !== undefined) { + const e = this.validateStickySettings(i); + if (this.b !== e.stickyScrollMaxItemCount) { + this.b = e.stickyScrollMaxItemCount; + this.u(); + } + } + } + validateStickySettings(i) { + let e = 7; + if (typeof i.stickyScrollMaxItemCount == "number") { + e = Math.max(i.stickyScrollMaxItemCount, 1); + } + return { + stickyScrollMaxItemCount: e + }; + } + setModel(i) { + this.m = i; + } +}; +var Egr = class { + get state() { + return this.b; + } + constructor(i, e, t, s, n, r) { + this.g = e; + this.j = t; + this.k = s; + this.m = n; + this.o = r; + this.c = []; + this.d = new Q(); + this.a = G(".monaco-tree-sticky-container.empty"); + i.appendChild(this.a); + const o = G(".monaco-tree-sticky-container-shadow"); + this.a.appendChild(o); + this.f = new Igr(this.a, e); + this.onDidChangeHasFocus = this.f.onDidChangeHasFocus; + this.onContextMenu = this.f.onContextMenu; + } + get height() { + if (!this.b) { + return 0; + } + const i = this.b.stickyNodes[this.b.count - 1]; + return i.position + i.height; + } + get count() { + return this.b?.count ?? 0; + } + getNode(i) { + return this.b?.stickyNodes.find(e => e.node === i); + } + setState(i) { + const e = !!this.b && this.b.count > 0; + const t = !!i && i.count > 0; + if (!e && !t || e && t && this.b.equal(i)) { + return; + } + if (e !== t) { + this.t(t); + } + if (!t) { + this.b = undefined; + this.c = []; + this.d.clear(); + return; + } + const s = i.stickyNodes[i.count - 1]; + if (this.b && i.animationStateChanged(this.b)) { + this.c[this.b.count - 1].style.top = `${s.position}px`; + } else { + this.p(i); + } + this.b = i; + this.a.style.height = `${s.position + s.height}px`; + } + p(i) { + this.d.clear(); + const e = Array(i.count); + for (let t = i.count - 1; t >= 0; t--) { + const s = i.stickyNodes[t]; + const { + element: n, + disposable: r + } = this.q(s, t, i.count); + e[t] = n; + this.a.appendChild(n); + this.d.add(r); + } + this.f.updateElements(e, i); + this.c = e; + } + rerender() { + if (this.b) { + this.p(this.b); + } + } + q(i, e, t) { + const s = i.startIndex; + const n = document.createElement("div"); + n.style.top = `${i.position}px`; + if (this.j.options.setRowHeight !== false) { + n.style.height = `${i.height}px`; + } + if (this.j.options.setRowLineHeight !== false) { + n.style.lineHeight = `${i.height}px`; + } + n.classList.add("monaco-tree-sticky-row"); + n.classList.add("monaco-list-row"); + n.setAttribute("data-index", `${s}`); + n.setAttribute("data-parity", s % 2 === 0 ? "even" : "odd"); + n.setAttribute("id", this.g.getElementID(s)); + const r = this.s(n, i.node.element, e, t); + const o = this.m.getTemplateId(i.node); + const a = this.k.find(d => d.templateId === o); + if (!a) { + throw new Error(`No renderer found for template id ${o}`); + } + let l = i.node; + if (l === this.j.getNode(this.j.getNodeLocation(i.node))) { + l = new Proxy(i.node, {}); + } + const c = a.renderTemplate(n); + a.renderElement(l, i.startIndex, c, i.height); + const u = Ue(() => { + r.dispose(); + a.disposeElement(l, i.startIndex, c, i.height); + a.disposeTemplate(c); + n.remove(); + }); + return { + element: n, + disposable: u + }; + } + s(i, e, t, s) { + if (!this.o) { + return H.None; + } + if (this.o.getSetSize) { + i.setAttribute("aria-setsize", String(this.o.getSetSize(e, t, s))); + } + if (this.o.getPosInSet) { + i.setAttribute("aria-posinset", String(this.o.getPosInSet(e, t))); + } + if (this.o.getRole) { + i.setAttribute("role", this.o.getRole(e) ?? "treeitem"); + } + const n = this.o.getAriaLabel(e); + const r = n && typeof n != "string" ? n : vb(n); + const o = Dn(l => { + const c = l.readObservable(r); + if (c) { + i.setAttribute("aria-label", c); + } else { + i.removeAttribute("aria-label"); + } + }); + if (typeof n != "string") { + if (n) { + i.setAttribute("aria-label", n.get()); + } + } + const a = this.o.getAriaLevel && this.o.getAriaLevel(e); + if (typeof a == "number") { + i.setAttribute("aria-level", `${a}`); + } + i.setAttribute("aria-selected", String(false)); + return o; + } + t(i) { + this.a.classList.toggle("empty", !i); + if (!i) { + this.f.updateElements([], undefined); + } + } + getFocus() { + return this.f.getFocus(); + } + domFocus() { + this.f.domFocus(); + } + focusedLast() { + return this.f.focusedLast(); + } + dispose() { + this.f.dispose(); + this.d.dispose(); + this.a.remove(); + } +}; +var Igr = class extends H { + get m() { + return this.j; + } + set m(i) { + if (i !== this.j) { + this.f.fire(i); + this.j = i; + } + } + constructor(i, e) { + super(); + this.q = i; + this.s = e; + this.a = -1; + this.b = []; + this.f = new B(); + this.onDidChangeHasFocus = this.f.event; + this.g = new B(); + this.onContextMenu = this.g.event; + this.j = false; + this.D(Ce(this.q, "focus", () => this.M())); + this.D(Ce(this.q, "blur", () => this.O())); + this.D(this.s.onDidFocus(() => this.L(false))); + this.D(this.s.onKeyDown(t => this.u(t))); + this.D(this.s.onMouseDown(t => this.w(t))); + this.D(this.s.onContextMenu(t => this.t(t))); + } + t(i) { + const e = i.browserEvent.target; + if (!Eme(e) && !kme(e)) { + if (this.focusedLast()) { + this.s.domFocus(); + } + return; + } + if (!QS(i.browserEvent)) { + if (!this.c) { + throw new Error("Context menu should not be triggered when state is undefined"); + } + const r = this.c.stickyNodes.findIndex(o => o.node.element === i.element?.element); + if (r === -1) { + throw new Error("Context menu should not be triggered when element is not in sticky scroll widget"); + } + this.q.focus(); + this.F(r); + return; + } + if (!this.c || this.a < 0) { + throw new Error("Context menu key should not be triggered when focus is not in sticky scroll widget"); + } + const s = this.c.stickyNodes[this.a].node.element; + const n = this.b[this.a]; + this.g.fire({ + element: s, + anchor: n, + browserEvent: i.browserEvent, + isStickyScroll: true + }); + } + u(i) { + if (this.m && this.c) { + if (i.key === "ArrowUp") { + this.y(Math.max(0, this.a - 1)); + i.preventDefault(); + i.stopPropagation(); + } else if (i.key === "ArrowDown" || i.key === "ArrowRight") { + if (this.a >= this.c.count - 1) { + const e = this.c.stickyNodes[this.c.count - 1].startIndex + 1; + this.s.domFocus(); + this.s.setFocus([e]); + this.z(e, this.c); + } else { + this.y(this.a + 1); + } + i.preventDefault(); + i.stopPropagation(); + } + } + } + w(i) { + const e = i.browserEvent.target; + if (!!Eme(e) || !!kme(e)) { + i.browserEvent.preventDefault(); + i.browserEvent.stopPropagation(); + } + } + updateElements(i, e) { + if (e && e.count === 0) { + throw new Error("Sticky scroll state must be undefined when there are no sticky nodes"); + } + if (e && e.count !== i.length) { + throw new Error("Sticky scroll focus received illigel state"); + } + const t = this.a; + this.C(); + this.b = i; + this.c = e; + if (e) { + const s = yc(t, 0, e.count - 1); + this.F(s); + } else if (this.m) { + this.s.domFocus(); + } + this.q.tabIndex = e ? 0 : -1; + } + y(i) { + const e = this.c; + if (!e) { + throw new Error("Cannot set focus when state is undefined"); + } + this.F(i); + if (!(i < e.count - 1) && e.lastNodePartiallyVisible()) { + const t = e.stickyNodes[i]; + this.z(t.endIndex + 1, e); + } + } + z(i, e) { + const t = e.stickyNodes[e.count - 1]; + const s = e.count > 1 ? e.stickyNodes[e.count - 2] : undefined; + const n = this.s.getElementTop(i); + const r = s ? s.position + s.height + t.height : t.height; + this.s.scrollTop = n - r; + } + getFocus() { + if (!!this.c && this.a !== -1) { + return this.c.stickyNodes[this.a].node.element; + } + } + domFocus() { + if (!this.c) { + throw new Error("Cannot focus when state is undefined"); + } + this.q.focus(); + } + focusedLast() { + if (this.c) { + return this.s.getHTMLElement().classList.contains("sticky-scroll-focused"); + } else { + return false; + } + } + C() { + if (this.a !== -1) { + this.G(this.b[this.a], false); + this.a = -1; + } + } + F(i) { + if (i < 0) { + throw new Error("addFocus() can not remove focus"); + } + if (!this.c && i >= 0) { + throw new Error("Cannot set focus index when state is undefined"); + } + if (this.c && i >= this.c.count) { + throw new Error("Cannot set focus index to an index that does not exist"); + } + const e = this.a; + if (e >= 0) { + this.G(this.b[e], false); + } + if (i >= 0) { + this.G(this.b[i], true); + } + this.a = i; + } + G(i, e) { + this.I(i, e && this.m); + this.J(i, e); + } + H(i) { + if (this.a !== -1) { + this.I(this.b[this.a], i); + } + } + I(i, e) { + i.classList.toggle("focused", e); + } + J(i, e) { + i.classList.toggle("passive-focused", e); + } + L(i) { + this.s.getHTMLElement().classList.toggle("sticky-scroll-focused", i); + } + M() { + if (!this.c || this.b.length === 0) { + throw new Error("Cannot focus when state is undefined or elements are empty"); + } + this.m = true; + this.L(true); + this.H(true); + if (this.a === -1) { + this.F(0); + } + } + O() { + this.m = false; + this.H(false); + } + dispose() { + this.L(false); + this.f.fire(false); + super.dispose(); + } +}; +function Hne(i) { + let e = V5.Unknown; + if ($rt(i.browserEvent.target, "monaco-tl-twistie", "monaco-tl-row")) { + e = V5.Twistie; + } else if ($rt(i.browserEvent.target, "monaco-tl-contents", "monaco-tl-row")) { + e = V5.Element; + } else if ($rt(i.browserEvent.target, "monaco-tree-type-filter", "monaco-list")) { + e = V5.Filter; + } + return { + browserEvent: i.browserEvent, + element: i.element ? i.element.element : null, + target: e + }; +} +function Dgr(i) { + const e = Eme(i.browserEvent.target); + return { + element: i.element ? i.element.element : null, + browserEvent: i.browserEvent, + anchor: i.anchor, + isStickyScroll: e + }; +} +function Ypt(i, e) { + e(i); + i.children.forEach(t => Ypt(t, e)); +} +var OQt = class { + get f() { + this.d ||= this.m(); + return this.d; + } + constructor(i, e) { + this.g = i; + this.j = e; + this.a = []; + this.c = new B(); + this.onDidChange = this.c.event; + } + set(i, e) { + if (!!e?.__forceEvent || !Go(this.a, i)) { + this.k(i, false, e); + } + } + k(i, e, t) { + this.a = [...i]; + this.b = undefined; + this.d = undefined; + if (!e) { + const s = this; + this.c.fire({ + get elements() { + return s.get(); + }, + browserEvent: t + }); + } + } + get() { + this.b ||= this.a.map(i => i.element); + return [...this.b]; + } + getNodes() { + return this.a; + } + has(i) { + return this.f.has(i); + } + onDidModelSplice({ + insertedNodes: i, + deletedNodes: e + }) { + if (!this.j) { + const a = this.m(); + const l = c => a.delete(c); + e.forEach(c => Ypt(c, l)); + this.set([...a.values()]); + return; + } + const t = new Set(); + const s = a => t.add(this.j.getId(a.element).toString()); + e.forEach(a => Ypt(a, s)); + const n = new Map(); + const r = a => n.set(this.j.getId(a.element).toString(), a); + i.forEach(a => Ypt(a, r)); + const o = []; + for (const a of this.a) { + const l = this.j.getId(a.element).toString(); + if (!t.has(l)) { + o.push(a); + } else { + const u = n.get(l); + if (u && u.visible) { + o.push(u); + } + } + } + if (this.a.length > 0 && o.length === 0) { + const a = this.g(); + if (a) { + o.push(a); + } + } + this.k(o, true); + } + m() { + const i = new Set(); + for (const e of this.a) { + i.add(e); + } + return i; + } +}; +var Tgr = class extends fct { + constructor(i, e, t) { + super(i); + this.c = e; + this.y = t; + } + v(i) { + if (Wls(i.browserEvent.target) || ZS(i.browserEvent.target) || mie(i.browserEvent.target) || i.browserEvent.isHandledByList) { + return; + } + const e = i.element; + if (!e) { + return super.v(i); + } + if (this.q(i) || this.p(i)) { + return super.v(i); + } + const t = i.browserEvent.target; + const s = t.classList.contains("monaco-tl-twistie") || t.classList.contains("monaco-icon-label") && t.classList.contains("folder-icon") && i.browserEvent.offsetX < 16; + const n = kme(i.browserEvent.target); + let r = false; + if (n) { + r = true; + } else if (typeof this.c.expandOnlyOnTwistieClick == "function") { + r = this.c.expandOnlyOnTwistieClick(e.element); + } else { + r = !!this.c.expandOnlyOnTwistieClick; + } + if (n) { + this.A(i, e); + } else { + if (r && !s && i.browserEvent.detail !== 2) { + return super.v(i); + } + if (!this.c.expandOnDoubleClick && i.browserEvent.detail === 2) { + return super.v(i); + } + } + if (e.collapsible && (!n || s)) { + const o = this.c.getNodeLocation(e); + const a = i.browserEvent.altKey; + this.c.setFocus([o]); + this.c.toggleCollapsed(o, a); + if (s) { + i.browserEvent.isHandledByList = true; + return; + } + } + if (!n) { + super.v(i); + } + } + A(i, e) { + if (HXn(i.browserEvent.target) || qXn(i.browserEvent.target)) { + return; + } + const t = this.y(); + if (!t) { + throw new Error("Sticky scroll controller not found"); + } + const s = this.o.indexOf(e); + const n = this.o.getElementTop(s); + const r = t.nodePositionTopBelowWidget(e); + this.c.scrollTop = n - r; + this.o.domFocus(); + this.o.setFocus([s]); + this.o.setSelection([s]); + } + w(i) { + if (!i.browserEvent.target.classList.contains("monaco-tl-twistie") && !!this.c.expandOnDoubleClick && !i.browserEvent.isHandledByList) { + super.w(i); + } + } + t(i) { + const e = i.browserEvent.target; + if (!Eme(e) && !kme(e)) { + super.t(i); + return; + } + } + u(i) { + const e = i.browserEvent.target; + if (!Eme(e) && !kme(e)) { + super.u(i); + return; + } + } +}; +var Pgr = class extends Cg { + constructor(i, e, t, s, n, r, o, a) { + super(i, e, t, s, a); + this.c = n; + this.p = r; + this.s = o; + } + E(i) { + return new Tgr(this, i.tree, i.stickyScrollProvider); + } + splice(i, e, t = []) { + super.splice(i, e, t); + if (t.length === 0) { + return; + } + const s = []; + const n = []; + let r; + t.forEach((o, a) => { + if (this.c.has(o)) { + s.push(i + a); + } + if (this.p.has(o)) { + n.push(i + a); + } + if (this.s.has(o)) { + r = i + a; + } + }); + if (s.length > 0) { + super.setFocus(Ea([...super.getFocus(), ...s])); + } + if (n.length > 0) { + super.setSelection(Ea([...super.getSelection(), ...n])); + } + if (typeof r == "number") { + super.setAnchor(r); + } + } + setFocus(i, e, t = false) { + super.setFocus(i, e); + if (!t) { + this.c.set(i.map(s => this.element(s)), e); + } + } + setSelection(i, e, t = false) { + super.setSelection(i, e); + if (!t) { + this.p.set(i.map(s => this.element(s)), e); + } + } + setAnchor(i, e = false) { + super.setAnchor(i); + if (!e) { + if (typeof i === "undefined") { + this.s.set([]); + } else { + this.s.set([this.element(i)]); + } + } + } +}; +var H5s; +(function (i) { + i[i.Tree = 0] = "Tree"; + i[i.StickyScroll = 1] = "StickyScroll"; +})(H5s ||= {}); +var qne = class { + get onDidScroll() { + return this.j.onDidScroll; + } + get onDidChangeFocus() { + return this.y.wrapEvent(this.q.onDidChange); + } + get onDidChangeSelection() { + return this.y.wrapEvent(this.w.onDidChange); + } + get onMouseClick() { + return de.map(this.j.onMouseClick, Hne); + } + get onMouseDblClick() { + return de.filter(de.map(this.j.onMouseDblClick, Hne), i => i.target !== V5.Filter); + } + get onMouseOver() { + return de.map(this.j.onMouseOver, Hne); + } + get onMouseOut() { + return de.map(this.j.onMouseOut, Hne); + } + get onContextMenu() { + return de.any(de.filter(de.map(this.j.onContextMenu, Dgr), i => !i.isStickyScroll), this.C?.onContextMenu ?? de.None); + } + get onTap() { + return de.map(this.j.onTap, Hne); + } + get onPointer() { + return de.map(this.j.onPointer, Hne); + } + get onKeyDown() { + return this.j.onKeyDown; + } + get onKeyUp() { + return this.j.onKeyUp; + } + get onKeyPress() { + return this.j.onKeyPress; + } + get onDidFocus() { + return this.j.onDidFocus; + } + get onDidBlur() { + return this.j.onDidBlur; + } + get onDidChangeModel() { + return de.any(this.G.event, this.F.event); + } + get onDidChangeCollapseState() { + return this.I.event; + } + get onDidChangeRenderNodeCount() { + return this.J.event; + } + get findMode() { + return this.z?.mode ?? og.Highlight; + } + set findMode(i) { + if (this.z) { + this.z.mode = i; + } + } + get findMatchType() { + return this.z?.matchType ?? SS.Fuzzy; + } + set findMatchType(i) { + if (this.z) { + this.z.matchType = i; + } + } + get onDidChangeFindPattern() { + if (this.z) { + return this.z.onDidChangePattern; + } else { + return de.None; + } + } + get expandOnDoubleClick() { + if (typeof this.P.expandOnDoubleClick === "undefined") { + return true; + } else { + return this.P.expandOnDoubleClick; + } + } + get expandOnlyOnTwistieClick() { + if (typeof this.P.expandOnlyOnTwistieClick === "undefined") { + return true; + } else { + return this.P.expandOnlyOnTwistieClick; + } + } + get onDidDispose() { + return this.j.onDidDispose; + } + constructor(i, e, t, s, n = {}) { + this.O = i; + this.P = n; + this.y = new NZ(); + this.onDidChangeFindOpenState = de.None; + this.onDidChangeStickyScrollFocused = de.None; + this.E = new Q(); + this.F = this.E.add(new B()); + this.G = this.E.add(new F0()); + this.H = this.E.add(new F0()); + this.I = this.E.add(new F0()); + this.J = this.E.add(new F0()); + this.K = this.E.add(new F0()); + this.L = new B(); + this.onWillRefilter = this.L.event; + this.M = new B(); + this.onDidUpdateOptions = this.M.event; + this.W = new Q(); + if (n.keyboardNavigationLabelProvider && (n.findWidgetEnabled ?? true)) { + this.A = new B5s(n.keyboardNavigationLabelProvider, n.filter, n.defaultFindVisibility); + n = { + ...n, + filter: this.A + }; + this.E.add(this.A); + } + this.o = this.V(i, n); + this.p = new FQt(t); + const r = this.E.add(new ggr(this.K.event)); + const o = new TZ(); + this.k = s.map(a => new pgr(a, this.o, this.I.event, r, o, n)); + for (const a of this.k) { + this.E.add(a); + } + this.q = new OQt(() => this.j.getFocusedElements()[0], n.identityProvider); + this.w = new OQt(() => this.j.getSelectedElements()[0], n.identityProvider); + this.x = new OQt(() => this.j.getAnchorElement(), n.identityProvider); + this.j = new Pgr(i, e, this.p, this.k, this.q, this.w, this.x, { + ...fgr(() => this.o, this.E, n), + tree: this, + stickyScrollProvider: () => this.C + }); + this.X(this.o); + if (n.keyboardSupport !== false) { + const a = de.chain(this.j.onKeyDown, l => l.filter(c => !ZS(c.target)).map(c => new wr(c))); + de.chain(a, l => l.filter(c => c.keyCode === 15))(this.R, this, this.E); + de.chain(a, l => l.filter(c => c.keyCode === 17))(this.S, this, this.E); + de.chain(a, l => l.filter(c => c.keyCode === 10))(this.U, this, this.E); + } + if ((n.findWidgetEnabled ?? true) && n.keyboardNavigationLabelProvider && n.contextViewProvider) { + const a = { + styles: n.findWidgetStyles, + defaultFindMode: n.defaultFindMode, + defaultFindMatchType: n.defaultFindMatchType, + showNotFoundMessage: n.showNotFoundMessage + }; + this.z = this.E.add(new U5s(this, this.A, n.contextViewProvider, a)); + this.B = l => this.z.shouldAllowFocus(l); + this.onDidChangeFindOpenState = this.z.onDidChangeOpenState; + this.onDidChangeFindMode = this.z.onDidChangeMode; + this.onDidChangeFindMatchType = this.z.onDidChangeMatchType; + } else { + this.onDidChangeFindMode = de.None; + this.onDidChangeFindMatchType = de.None; + } + if (n.enableStickyScroll) { + this.C = new V5s(this, this.o, this.j, this.k, this.p, n); + this.onDidChangeStickyScrollFocused = this.C.onDidChangeHasFocus; + } + this.D = pd(this.j.getHTMLElement()); + this.getHTMLElement().classList.toggle("always", this.P.renderIndentGuides === PA.Always); + } + updateOptions(i = {}) { + this.P = { + ...this.P, + ...i + }; + for (const e of this.k) { + e.updateOptions(i); + } + this.j.updateOptions(this.P); + this.z?.updateOptions(i); + this.Q(i); + this.M.fire(this.P); + this.getHTMLElement().classList.toggle("always", this.P.renderIndentGuides === PA.Always); + } + get options() { + return this.P; + } + Q(i) { + if (!this.C && this.P.enableStickyScroll) { + this.C = new V5s(this, this.o, this.j, this.k, this.p, this.P); + this.onDidChangeStickyScrollFocused = this.C.onDidChangeHasFocus; + } else if (this.C && !this.P.enableStickyScroll) { + this.onDidChangeStickyScrollFocused = de.None; + this.C.dispose(); + this.C = undefined; + } + this.C?.updateOptions(i); + } + updateWidth(i) { + const e = this.o.getListIndex(i); + if (e !== -1) { + this.j.updateWidth(e); + } + } + getHTMLElement() { + return this.j.getHTMLElement(); + } + get contentHeight() { + return this.j.contentHeight; + } + get contentWidth() { + return this.j.contentWidth; + } + get onDidChangeContentHeight() { + return this.j.onDidChangeContentHeight; + } + get onDidChangeContentWidth() { + return this.j.onDidChangeContentWidth; + } + get scrollTop() { + return this.j.scrollTop; + } + set scrollTop(i) { + this.j.scrollTop = i; + } + get scrollLeft() { + return this.j.scrollLeft; + } + set scrollLeft(i) { + this.j.scrollLeft = i; + } + get scrollHeight() { + return this.j.scrollHeight; + } + get renderHeight() { + return this.j.renderHeight; + } + get firstVisibleElement() { + let i = this.j.firstVisibleIndex; + if (this.C) { + i += this.C.count; + } + if (i < 0 || i >= this.j.length) { + return undefined; + } else { + return this.j.element(i).element; + } + } + get lastVisibleElement() { + const i = this.j.lastVisibleIndex; + return this.j.element(i).element; + } + get ariaLabel() { + return this.j.ariaLabel; + } + set ariaLabel(i) { + this.j.ariaLabel = i; + } + get selectionSize() { + return this.w.getNodes().length; + } + domFocus() { + if (this.C?.focusedLast()) { + this.C.domFocus(); + } else { + this.j.domFocus(); + } + } + isDOMFocused() { + return Jg(this.getHTMLElement()); + } + layout(i, e) { + this.j.layout(i, e); + } + style(i) { + const e = `.${this.j.domId}`; + const t = []; + if (i.treeIndentGuidesStroke) { + t.push(`.monaco-list${e}:hover .monaco-tl-indent > .indent-guide, .monaco-list${e}.always .monaco-tl-indent > .indent-guide { border-color: ${i.treeInactiveIndentGuidesStroke}; }`); + t.push(`.monaco-list${e} .monaco-tl-indent > .indent-guide.active { border-color: ${i.treeIndentGuidesStroke}; }`); + } + const s = i.treeStickyScrollBackground ?? i.listBackground; + if (s) { + t.push(`.monaco-list${e} .monaco-scrollable-element .monaco-tree-sticky-container { background-color: ${s}; }`); + t.push(`.monaco-list${e} .monaco-scrollable-element .monaco-tree-sticky-container .monaco-tree-sticky-row { background-color: ${s}; }`); + } + if (i.treeStickyScrollBorder) { + t.push(`.monaco-list${e} .monaco-scrollable-element .monaco-tree-sticky-container { border-bottom: 1px solid ${i.treeStickyScrollBorder}; }`); + } + if (i.treeStickyScrollShadow) { + t.push(`.monaco-list${e} .monaco-scrollable-element .monaco-tree-sticky-container .monaco-tree-sticky-container-shadow { box-shadow: ${i.treeStickyScrollShadow} 0 6px 6px -6px inset; height: 3px; }`); + } + if (i.listFocusForeground) { + t.push(`.monaco-list${e}.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container:focus .monaco-list-row.focused { color: ${i.listFocusForeground}; }`); + t.push(`.monaco-list${e}:not(.sticky-scroll-focused) .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.focused { color: inherit; }`); + } + const n = CF(i.listFocusAndSelectionOutline, CF(i.listSelectionOutline, i.listFocusOutline ?? "")); + if (n) { + t.push(`.monaco-list${e}.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container:focus .monaco-list-row.focused.selected { outline: 1px solid ${n}; outline-offset: -1px;}`); + t.push(`.monaco-list${e}:not(.sticky-scroll-focused) .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.focused.selected { outline: inherit;}`); + } + if (i.listFocusOutline) { + t.push(`.monaco-list${e}.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container:focus .monaco-list-row.focused { outline: 1px solid ${i.listFocusOutline}; outline-offset: -1px; }`); + t.push(`.monaco-list${e}:not(.sticky-scroll-focused) .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.focused { outline: inherit; }`); + t.push(`.monaco-workbench.context-menu-visible .monaco-list${e}.last-focused.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.passive-focused { outline: 1px solid ${i.listFocusOutline}; outline-offset: -1px; }`); + t.push(`.monaco-workbench.context-menu-visible .monaco-list${e}.last-focused.sticky-scroll-focused .monaco-list-rows .monaco-list-row.focused { outline: inherit; }`); + t.push(`.monaco-workbench.context-menu-visible .monaco-list${e}.last-focused:not(.sticky-scroll-focused) .monaco-tree-sticky-container .monaco-list-rows .monaco-list-row.focused { outline: inherit; }`); + } + this.D.textContent = t.join(` +`); + this.j.style(i); + } + getParentElement(i) { + const e = this.o.getParentNodeLocation(i); + return this.o.getNode(e).element; + } + getFirstElementChild(i) { + return this.o.getFirstElementChild(i); + } + getNode(i) { + return this.o.getNode(i); + } + getNodeLocation(i) { + return this.o.getNodeLocation(i); + } + collapse(i, e = false) { + return this.o.setCollapsed(i, true, e); + } + expand(i, e = false) { + return this.o.setCollapsed(i, false, e); + } + toggleCollapsed(i, e = false) { + return this.o.setCollapsed(i, undefined, e); + } + expandAll() { + this.o.setCollapsed(this.o.rootRef, false, true); + } + collapseAll() { + this.o.setCollapsed(this.o.rootRef, true, true); + } + isCollapsible(i) { + return this.o.isCollapsible(i); + } + setCollapsible(i, e) { + return this.o.setCollapsible(i, e); + } + isCollapsed(i) { + return this.o.isCollapsed(i); + } + expandTo(i) { + this.o.expandTo(i); + } + triggerTypeNavigation() { + this.j.triggerTypeNavigation(); + } + openFind() { + this.z?.open(); + } + closeFind() { + this.z?.close(); + } + refilter() { + this.L.fire(undefined); + this.o.refilter(); + } + setAnchor(i) { + if (typeof i === "undefined") { + return this.j.setAnchor(undefined); + } + this.y.bufferEvents(() => { + const e = this.o.getNode(i); + this.x.set([e]); + const t = this.o.getListIndex(i); + if (t > -1) { + this.j.setAnchor(t, true); + } + }); + } + getAnchor() { + return this.x.get().at(0); + } + setSelection(i, e) { + this.y.bufferEvents(() => { + const t = i.map(n => this.o.getNode(n)); + this.w.set(t, e); + const s = i.map(n => this.o.getListIndex(n)).filter(n => n > -1); + this.j.setSelection(s, e, true); + }); + } + getSelection() { + return this.w.get(); + } + setFocus(i, e) { + this.y.bufferEvents(() => { + const t = i.map(n => this.o.getNode(n)); + this.q.set(t, e); + const s = i.map(n => this.o.getListIndex(n)).filter(n => n > -1); + this.j.setFocus(s, e, true); + }); + } + focusNext(i = 1, e = false, t, s = QS(t) && t.altKey ? undefined : this.B) { + this.j.focusNext(i, e, t, s); + } + focusPrevious(i = 1, e = false, t, s = QS(t) && t.altKey ? undefined : this.B) { + this.j.focusPrevious(i, e, t, s); + } + focusNextPage(i, e = QS(i) && i.altKey ? undefined : this.B) { + return this.j.focusNextPage(i, e); + } + focusPreviousPage(i, e = QS(i) && i.altKey ? undefined : this.B) { + return this.j.focusPreviousPage(i, e, () => this.C?.height ?? 0); + } + focusLast(i, e = QS(i) && i.altKey ? undefined : this.B) { + this.j.focusLast(i, e); + } + focusFirst(i, e = QS(i) && i.altKey ? undefined : this.B) { + this.j.focusFirst(i, e); + } + getFocus() { + return this.q.get(); + } + getStickyScrollFocus() { + const i = this.C?.getFocus(); + if (i !== undefined) { + return [i]; + } else { + return []; + } + } + getFocusedPart() { + if (this.C?.focusedLast()) { + return 1; + } else { + return 0; + } + } + reveal(i, e) { + this.o.expandTo(i); + const t = this.o.getListIndex(i); + if (t !== -1) { + if (!this.C) { + this.j.reveal(t, e); + } else { + const s = this.C.nodePositionTopBelowWidget(this.getNode(i)); + this.j.reveal(t, e, s); + } + } + } + getRelativeTop(i) { + const e = this.o.getListIndex(i); + if (e === -1) { + return null; + } + const t = this.C?.getNode(this.getNode(i)); + return this.j.getRelativeTop(e, t?.position ?? this.C?.height); + } + getViewState(i = this.options.identityProvider) { + if (!i) { + throw new dC(this.O, "Can't get tree view state without an identity provider"); + } + const e = r => i.getId(r).toString(); + const t = _5s.empty(this.scrollTop); + for (const r of this.getFocus()) { + t.focus.add(e(r)); + } + for (const r of this.getSelection()) { + t.selection.add(e(r)); + } + const s = this.o.getNode(); + const n = [s]; + while (n.length > 0) { + const r = n.shift(); + if (r !== s && r.collapsible) { + t.expanded[e(r.element)] = r.collapsed ? 0 : 1; + } + n.push(...r.children); + } + return t; + } + R(i) { + i.preventDefault(); + i.stopPropagation(); + const e = this.j.getFocusedElements(); + if (e.length === 0) { + return; + } + const t = e[0]; + const s = this.o.getNodeLocation(t); + if (!this.o.setCollapsed(s, true)) { + const r = this.o.getParentNodeLocation(s); + if (!r) { + return; + } + const o = this.o.getListIndex(r); + this.j.reveal(o); + this.j.setFocus([o]); + } + } + S(i) { + i.preventDefault(); + i.stopPropagation(); + const e = this.j.getFocusedElements(); + if (e.length === 0) { + return; + } + const t = e[0]; + const s = this.o.getNodeLocation(t); + if (!this.o.setCollapsed(s, false)) { + if (!t.children.some(a => a.visible)) { + return; + } + const [r] = this.j.getFocus(); + const o = r + 1; + this.j.reveal(o); + this.j.setFocus([o]); + } + } + U(i) { + i.preventDefault(); + i.stopPropagation(); + const e = this.j.getFocusedElements(); + if (e.length === 0) { + return; + } + const t = e[0]; + const s = this.o.getNodeLocation(t); + const n = i.browserEvent.altKey; + this.o.setCollapsed(s, undefined, n); + } + X(i) { + this.W.clear(); + this.W.add(i.onDidSpliceRenderedNodes(({ + start: n, + deleteCount: r, + elements: o + }) => this.j.splice(n, r, o))); + const e = de.forEach(i.onDidSpliceModel, n => { + this.y.bufferEvents(() => { + this.q.onDidModelSplice(n); + this.w.onDidModelSplice(n); + }); + }, this.W); + e(() => null, null, this.W); + const t = this.W.add(new B()); + const s = this.W.add(new gl(0)); + this.W.add(de.any(e, this.q.onDidChange, this.w.onDidChange)(() => { + s.trigger(() => { + const n = new Set(); + for (const r of this.q.getNodes()) { + n.add(r); + } + for (const r of this.w.getNodes()) { + n.add(r); + } + t.fire([...n.values()]); + }); + })); + this.K.input = t.event; + this.G.input = de.signal(i.onDidSpliceModel); + this.I.input = i.onDidChangeCollapseState; + this.J.input = i.onDidChangeRenderNodeCount; + this.H.input = i.onDidSpliceModel; + } + navigate(i) { + return new Lgr(this.j, this.o, i); + } + dispose() { + si(this.E); + this.C?.dispose(); + this.j.dispose(); + this.W.dispose(); + } +}; +var Lgr = class { + constructor(i, e, t) { + this.b = i; + this.c = e; + if (t) { + this.a = this.c.getListIndex(t); + } else { + this.a = -1; + } + } + current() { + if (this.a < 0 || this.a >= this.b.length) { + return null; + } else { + return this.b.element(this.a).element; + } + } + previous() { + this.a--; + return this.current(); + } + next() { + this.a++; + return this.current(); + } + first() { + this.a = 0; + return this.current(); + } + last() { + this.a = this.b.length - 1; + return this.current(); + } +}; +m7(); +sa(); +var Xpt = class { + get size() { + return this.d.size; + } + constructor(i, e = {}) { + this.k = i; + this.rootRef = null; + this.d = new Map(); + this.f = new Map(); + this.c = new ugr(i, null, e); + this.onDidSpliceModel = this.c.onDidSpliceModel; + this.onDidSpliceRenderedNodes = this.c.onDidSpliceRenderedNodes; + this.onDidChangeCollapseState = this.c.onDidChangeCollapseState; + this.onDidChangeRenderNodeCount = this.c.onDidChangeRenderNodeCount; + if (e.sorter) { + this.j = { + compare(t, s) { + return e.sorter.compare(t.element, s.element); + } + }; + } + this.h = e.identityProvider; + } + setChildren(i, e = Ws.empty(), t = {}) { + const s = this.o(i); + this.l(s, this.m(e), t); + } + l(i, e = Ws.empty(), t) { + const s = new Set(); + const n = new Set(); + const r = a => { + if (a.element === null) { + return; + } + const l = a; + s.add(l.element); + this.d.set(l.element, l); + if (this.h) { + const c = this.h.getId(l.element).toString(); + n.add(c); + this.f.set(c, l); + } + t.onDidCreateNode?.(l); + }; + const o = a => { + if (a.element === null) { + return; + } + const l = a; + if (!s.has(l.element)) { + this.d.delete(l.element); + } + if (this.h) { + const c = this.h.getId(l.element).toString(); + if (!n.has(c)) { + this.f.delete(c); + } + } + t.onDidDeleteNode?.(l); + }; + this.c.splice([...i, 0], Number.MAX_VALUE, e, { + ...t, + onDidCreateNode: r, + onDidDeleteNode: o + }); + } + m(i = Ws.empty()) { + if (this.j) { + i = [...i].sort(this.j.compare.bind(this.j)); + } + return Ws.map(i, e => { + let t = this.d.get(e.element); + if (!t && this.h) { + const r = this.h.getId(e.element).toString(); + t = this.f.get(r); + } + if (!t) { + let r; + if (typeof e.collapsed === "undefined") { + r = undefined; + } else if (e.collapsed === n0.Collapsed || e.collapsed === n0.PreserveOrCollapsed) { + r = true; + } else if (e.collapsed === n0.Expanded || e.collapsed === n0.PreserveOrExpanded) { + r = false; + } else { + r = !!e.collapsed; + } + return { + ...e, + children: this.m(e.children), + collapsed: r + }; + } + const s = typeof e.collapsible == "boolean" ? e.collapsible : t.collapsible; + let n; + if (typeof e.collapsed === "undefined" || e.collapsed === n0.PreserveOrCollapsed || e.collapsed === n0.PreserveOrExpanded) { + n = t.collapsed; + } else if (e.collapsed === n0.Collapsed) { + n = true; + } else if (e.collapsed === n0.Expanded) { + n = false; + } else { + n = !!e.collapsed; + } + return { + ...e, + collapsible: s, + collapsed: n, + children: this.m(e.children) + }; + }); + } + rerender(i) { + const e = this.o(i); + this.c.rerender(e); + } + resort(i = null, e = true) { + if (!this.j) { + return; + } + const t = this.o(i); + const s = this.c.getNode(t); + this.l(t, this.n(s, e), {}); + } + n(i, e, t = true) { + let s = [...i.children]; + if (e || t) { + s = s.sort(this.j.compare.bind(this.j)); + } + return Ws.map(s, n => ({ + element: n.element, + collapsible: n.collapsible, + collapsed: n.collapsed, + children: this.n(n, e, false) + })); + } + getFirstElementChild(i = null) { + const e = this.o(i); + return this.c.getFirstElementChild(e); + } + getLastElementAncestor(i = null) { + const e = this.o(i); + return this.c.getLastElementAncestor(e); + } + has(i) { + return this.d.has(i); + } + getListIndex(i) { + const e = this.o(i); + return this.c.getListIndex(e); + } + getListRenderCount(i) { + const e = this.o(i); + return this.c.getListRenderCount(e); + } + isCollapsible(i) { + const e = this.o(i); + return this.c.isCollapsible(e); + } + setCollapsible(i, e) { + const t = this.o(i); + return this.c.setCollapsible(t, e); + } + isCollapsed(i) { + const e = this.o(i); + return this.c.isCollapsed(e); + } + setCollapsed(i, e, t) { + const s = this.o(i); + return this.c.setCollapsed(s, e, t); + } + expandTo(i) { + const e = this.o(i); + this.c.expandTo(e); + } + refilter() { + this.c.refilter(); + } + getNode(i = null) { + if (i === null) { + return this.c.getNode(this.c.rootRef); + } + const e = this.d.get(i); + if (!e) { + throw new dC(this.k, `Tree element not found: ${i}`); + } + return e; + } + getNodeLocation(i) { + return i.element; + } + getParentNodeLocation(i) { + if (i === null) { + throw new dC(this.k, "Invalid getParentNodeLocation call"); + } + const e = this.d.get(i); + if (!e) { + throw new dC(this.k, `Tree element not found: ${i}`); + } + const t = this.c.getNodeLocation(e); + const s = this.c.getParentNodeLocation(t); + return this.c.getNode(s).element; + } + o(i) { + if (i === null) { + return []; + } + const e = this.d.get(i); + if (!e) { + throw new dC(this.k, `Tree element not found: ${i}`); + } + return this.c.getNodeLocation(e); + } +}; +Jt(); +pe(); +sa(); +function Qpt(i) { + const e = [i.element]; + const t = i.incompressible || false; + return { + element: { + elements: e, + incompressible: t + }, + children: Ws.map(Ws.from(i.children), Qpt), + collapsible: i.collapsible, + collapsed: i.collapsed + }; +} +function Zpt(i) { + const e = [i.element]; + const t = i.incompressible || false; + let s; + let n; + while ([n, s] = Ws.consume(Ws.from(i.children), 2), n.length === 1 && !n[0].incompressible) { + i = n[0]; + e.push(i.element); + } + return { + element: { + elements: e, + incompressible: t + }, + children: Ws.map(Ws.concat(n, s), Zpt), + collapsible: i.collapsible, + collapsed: i.collapsed + }; +} +function _Qt(i, e = 0) { + let t; + if (e < i.element.elements.length - 1) { + t = [_Qt(i, e + 1)]; + } else { + t = Ws.map(Ws.from(i.children), s => _Qt(s, 0)); + } + if (e === 0 && i.element.incompressible) { + return { + element: i.element.elements[e], + children: t, + incompressible: true, + collapsible: i.collapsible, + collapsed: i.collapsed + }; + } else { + return { + element: i.element.elements[e], + children: t, + collapsible: i.collapsible, + collapsed: i.collapsed + }; + } +} +function q5s(i) { + return _Qt(i, 0); +} +function j5s(i, e, t) { + if (i.element === e) { + return { + ...i, + children: t + }; + } else { + return { + ...i, + children: Ws.map(Ws.from(i.children), s => j5s(s, e, t)) + }; + } +} +var Rgr = i => ({ + getId(e) { + return e.elements.map(t => i.getId(t).toString()).join("\0"); + } +}); +var Ngr = class { + get onDidSpliceRenderedNodes() { + return this.c.onDidSpliceRenderedNodes; + } + get onDidSpliceModel() { + return this.c.onDidSpliceModel; + } + get onDidChangeCollapseState() { + return this.c.onDidChangeCollapseState; + } + get onDidChangeRenderNodeCount() { + return this.c.onDidChangeRenderNodeCount; + } + get size() { + return this.d.size; + } + constructor(i, e = {}) { + this.h = i; + this.rootRef = null; + this.d = new Map(); + this.c = new Xpt(i, e); + this.f = typeof e.compressionEnabled === "undefined" ? true : e.compressionEnabled; + this.g = e.identityProvider; + } + setChildren(i, e = Ws.empty(), t) { + const s = t.diffIdentityProvider && Rgr(t.diffIdentityProvider); + if (i === null) { + const g = Ws.map(e, this.f ? Zpt : Qpt); + this.j(null, g, { + diffIdentityProvider: s, + diffDepth: Infinity + }); + return; + } + const n = this.d.get(i); + if (!n) { + throw new dC(this.h, "Unknown compressed tree node"); + } + const r = this.c.getNode(n); + const o = this.c.getParentNodeLocation(n); + const a = this.c.getNode(o); + const l = q5s(r); + const c = j5s(l, i, e); + const u = (this.f ? Zpt : Qpt)(c); + const d = t.diffIdentityProvider ? (g, p) => t.diffIdentityProvider.getId(g) === t.diffIdentityProvider.getId(p) : undefined; + if (Go(u.element.elements, r.element.elements, d)) { + this.j(n, u.children || Ws.empty(), { + diffIdentityProvider: s, + diffDepth: 1 + }); + return; + } + const h = a.children.map(g => g === r ? u : g); + this.j(a.element, h, { + diffIdentityProvider: s, + diffDepth: r.depth - a.depth + }); + } + isCompressionEnabled() { + return this.f; + } + setCompressionEnabled(i) { + if (i === this.f) { + return; + } + this.f = i; + const t = this.c.getNode().children; + const s = Ws.map(t, q5s); + const n = Ws.map(s, i ? Zpt : Qpt); + this.j(null, n, { + diffIdentityProvider: this.g, + diffDepth: Infinity + }); + } + j(i, e, t) { + const s = new Set(); + const n = o => { + for (const a of o.element.elements) { + s.add(a); + this.d.set(a, o.element); + } + }; + const r = o => { + for (const a of o.element.elements) { + if (!s.has(a)) { + this.d.delete(a); + } + } + }; + this.c.setChildren(i, e, { + ...t, + onDidCreateNode: n, + onDidDeleteNode: r + }); + } + has(i) { + return this.d.has(i); + } + getListIndex(i) { + const e = this.getCompressedNode(i); + return this.c.getListIndex(e); + } + getListRenderCount(i) { + const e = this.getCompressedNode(i); + return this.c.getListRenderCount(e); + } + getNode(i) { + if (typeof i === "undefined") { + return this.c.getNode(); + } + const e = this.getCompressedNode(i); + return this.c.getNode(e); + } + getNodeLocation(i) { + const e = this.c.getNodeLocation(i); + if (e === null) { + return null; + } else { + return e.elements[e.elements.length - 1]; + } + } + getParentNodeLocation(i) { + const e = this.getCompressedNode(i); + const t = this.c.getParentNodeLocation(e); + if (t === null) { + return null; + } else { + return t.elements[t.elements.length - 1]; + } + } + getFirstElementChild(i) { + const e = this.getCompressedNode(i); + return this.c.getFirstElementChild(e); + } + getLastElementAncestor(i) { + const e = typeof i === "undefined" ? undefined : this.getCompressedNode(i); + return this.c.getLastElementAncestor(e); + } + isCollapsible(i) { + const e = this.getCompressedNode(i); + return this.c.isCollapsible(e); + } + setCollapsible(i, e) { + const t = this.getCompressedNode(i); + return this.c.setCollapsible(t, e); + } + isCollapsed(i) { + const e = this.getCompressedNode(i); + return this.c.isCollapsed(e); + } + setCollapsed(i, e, t) { + const s = this.getCompressedNode(i); + return this.c.setCollapsed(s, e, t); + } + expandTo(i) { + const e = this.getCompressedNode(i); + this.c.expandTo(e); + } + rerender(i) { + const e = this.getCompressedNode(i); + this.c.rerender(e); + } + refilter() { + this.c.refilter(); + } + resort(i = null, e = true) { + const t = this.getCompressedNode(i); + this.c.resort(t, e); + } + getCompressedNode(i) { + if (i === null) { + return null; + } + const e = this.d.get(i); + if (!e) { + throw new dC(this.h, `Tree element not found: ${i}`); + } + return e; + } +}; +var Mgr = i => i[i.length - 1]; +var Agr = class d_n { + get element() { + if (this.d.element === null) { + return null; + } else { + return this.c(this.d.element); + } + } + get children() { + return this.d.children.map(e => new d_n(this.c, e)); + } + get depth() { + return this.d.depth; + } + get visibleChildrenCount() { + return this.d.visibleChildrenCount; + } + get visibleChildIndex() { + return this.d.visibleChildIndex; + } + get collapsible() { + return this.d.collapsible; + } + get collapsed() { + return this.d.collapsed; + } + get visible() { + return this.d.visible; + } + get filterData() { + return this.d.filterData; + } + constructor(e, t) { + this.c = e; + this.d = t; + } +}; +function $gr(i, e) { + return { + ...e, + identityProvider: e.identityProvider && { + getId(t) { + return e.identityProvider.getId(i(t)); + } + }, + sorter: e.sorter && { + compare(t, s) { + return e.sorter.compare(t.elements[0], s.elements[0]); + } + }, + filter: e.filter && { + filter(t, s) { + const n = t.elements; + for (let r = 0; r < n.length - 1; r++) { + const o = e.filter.filter(n[r], s); + s = CG(p0e(o) ? o.visibility : o); + } + return e.filter.filter(n[n.length - 1], s); + } + } + }; +} +var Fgr = class { + get onDidSpliceModel() { + return de.map(this.f.onDidSpliceModel, ({ + insertedNodes: i, + deletedNodes: e + }) => ({ + insertedNodes: i.map(t => this.d.map(t)), + deletedNodes: e.map(t => this.d.map(t)) + })); + } + get onDidSpliceRenderedNodes() { + return de.map(this.f.onDidSpliceRenderedNodes, ({ + start: i, + deleteCount: e, + elements: t + }) => ({ + start: i, + deleteCount: e, + elements: t.map(s => this.d.map(s)) + })); + } + get onDidChangeCollapseState() { + return de.map(this.f.onDidChangeCollapseState, ({ + node: i, + deep: e + }) => ({ + node: this.d.map(i), + deep: e + })); + } + get onDidChangeRenderNodeCount() { + return de.map(this.f.onDidChangeRenderNodeCount, i => this.d.map(i)); + } + constructor(i, e = {}) { + this.rootRef = null; + this.c = e.elementMapper || Mgr; + const t = s => this.c(s.elements); + this.d = new MQt(s => new Agr(t, s)); + this.f = new Ngr(i, $gr(t, e)); + } + setChildren(i, e = Ws.empty(), t = {}) { + this.f.setChildren(i, e, t); + } + isCompressionEnabled() { + return this.f.isCompressionEnabled(); + } + setCompressionEnabled(i) { + this.f.setCompressionEnabled(i); + } + has(i) { + return this.f.has(i); + } + getListIndex(i) { + return this.f.getListIndex(i); + } + getListRenderCount(i) { + return this.f.getListRenderCount(i); + } + getNode(i) { + return this.d.map(this.f.getNode(i)); + } + getNodeLocation(i) { + return i.element; + } + getParentNodeLocation(i) { + return this.f.getParentNodeLocation(i); + } + getFirstElementChild(i) { + const e = this.f.getFirstElementChild(i); + if (e === null || typeof e === "undefined") { + return e; + } else { + return this.c(e.elements); + } + } + getLastElementAncestor(i) { + const e = this.f.getLastElementAncestor(i); + if (e === null || typeof e === "undefined") { + return e; + } else { + return this.c(e.elements); + } + } + isCollapsible(i) { + return this.f.isCollapsible(i); + } + setCollapsible(i, e) { + return this.f.setCollapsible(i, e); + } + isCollapsed(i) { + return this.f.isCollapsed(i); + } + setCollapsed(i, e, t) { + return this.f.setCollapsed(i, e, t); + } + expandTo(i) { + return this.f.expandTo(i); + } + rerender(i) { + return this.f.rerender(i); + } + refilter() { + return this.f.refilter(); + } + resort(i = null, e = true) { + return this.f.resort(i, e); + } + getCompressedTreeNode(i = null) { + return this.f.getNode(i); + } +}; +au(); +sa(); +var CD = class extends qne { + get onDidChangeCollapseState() { + return this.o.onDidChangeCollapseState; + } + constructor(i, e, t, s, n = {}) { + super(i, e, t, s, n); + this.Z = i; + } + setChildren(i, e = Ws.empty(), t) { + this.o.setChildren(i, e, t); + } + rerender(i) { + if (i === undefined) { + this.j.rerender(); + return; + } + this.o.rerender(i); + } + updateElementHeight(i, e) { + const t = this.o.getListIndex(i); + if (t !== -1) { + this.j.updateElementHeight(t, e); + } + } + resort(i, e = true) { + this.o.resort(i, e); + } + hasElement(i) { + return this.o.has(i); + } + V(i, e) { + return new Xpt(i, e); + } +}; +var z5s = class { + get a() { + return this.b(); + } + constructor(i, e, t) { + this.b = i; + this.c = e; + this.d = t; + this.templateId = t.templateId; + if (t.onDidChangeTwistieState) { + this.onDidChangeTwistieState = t.onDidChangeTwistieState; + } + } + renderTemplate(i) { + return { + compressedTreeNode: undefined, + data: this.d.renderTemplate(i) + }; + } + renderElement(i, e, t, s) { + let n = this.c.getCompressedNode(i); + n ||= this.a.getCompressedTreeNode(i.element); + if (n.element.elements.length === 1) { + t.compressedTreeNode = undefined; + this.d.renderElement(i, e, t.data, s); + } else { + t.compressedTreeNode = n; + this.d.renderCompressedElements(n, e, t.data, s); + } + } + disposeElement(i, e, t, s) { + if (t.compressedTreeNode) { + this.d.disposeCompressedElements?.(t.compressedTreeNode, e, t.data, s); + } else { + this.d.disposeElement?.(i, e, t.data, s); + } + } + disposeTemplate(i) { + this.d.disposeTemplate(i.data); + } + renderTwistie(i, e) { + if (this.d.renderTwistie) { + return this.d.renderTwistie(i, e); + } else { + return false; + } + } +}; +__decorate([Hs], z5s.prototype, "a", null); +var Ogr = class { + constructor(i) { + this.b = i; + this.a = new Map(); + } + getCompressedNode(i) { + return this.a.get(i); + } + constrainStickyScrollNodes(i, e, t) { + this.a.clear(); + if (i.length === 0) { + return []; + } + for (let s = 0; s < i.length; s++) { + const n = i[s]; + const r = n.position + n.height; + if (s + 1 < i.length && r + i[s + 1].height > t || s >= e - 1 && e < i.length) { + const a = i.slice(0, s); + const l = i.slice(s); + const c = this.c(l); + return [...a, c]; + } + } + return i; + } + c(i) { + if (i.length === 0) { + throw new Error("Can't compress empty sticky nodes"); + } + const e = this.b(); + if (!e.isCompressionEnabled()) { + return i[0]; + } + const t = []; + for (let l = 0; l < i.length; l++) { + const c = i[l]; + const u = e.getCompressedTreeNode(c.node.element); + if (u.element) { + if (l !== 0 && u.element.incompressible) { + break; + } + t.push(...u.element.elements); + } + } + if (t.length < 2) { + return i[0]; + } + const s = i[i.length - 1]; + const n = { + elements: t, + incompressible: false + }; + const r = { + ...s.node, + children: [], + element: n + }; + const o = new Proxy(i[0].node, {}); + const a = { + node: o, + startIndex: i[0].startIndex, + endIndex: s.endIndex, + position: i[0].position, + height: i[0].height + }; + this.a.set(o, r); + return a; + } +}; +function _gr(i, e) { + return e && { + ...e, + keyboardNavigationLabelProvider: e.keyboardNavigationLabelProvider && { + getKeyboardNavigationLabel(t) { + let s; + try { + s = i().getCompressedTreeNode(t); + } catch { + return e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(t); + } + if (s.element.elements.length === 1) { + return e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(t); + } else { + return e.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(s.element.elements); + } + } + } + }; +} +var J5s = class extends CD { + constructor(i, e, t, s, n = {}) { + const r = () => this; + const o = new Ogr(() => this.o); + const a = s.map(l => new z5s(r, o, l)); + super(i, e, t, a, { + ..._gr(r, n), + stickyScrollDelegate: o + }); + } + setChildren(i, e = Ws.empty(), t) { + this.o.setChildren(i, e, t); + } + V(i, e) { + return new Fgr(i, e); + } + updateOptions(i = {}) { + super.updateOptions(i); + if (typeof i.compressionEnabled !== "undefined") { + this.o.setCompressionEnabled(i.compressionEnabled); + } + } + getCompressedTreeNode(i = null) { + return this.o.getCompressedTreeNode(i); + } +}; +nt(); +He(); +Rt(); +Ut(); +pe(); +sa(); +q(); +zt(); +ri(); +Pc(); +Jt(); +X(); +function BQt(i) { + return { + ...i, + children: [], + refreshPromise: undefined, + stale: true, + slow: false, + forceExpanded: false + }; +} +function UQt(i, e) { + if (e.parent) { + if (e.parent === i) { + return true; + } else { + return UQt(i, e.parent); + } + } else { + return false; + } +} +function Bgr(i, e) { + return i === e || UQt(i, e) || UQt(e, i); +} +var Ugr = class h_n { + get element() { + return this.a.element.element; + } + get children() { + return this.a.children.map(e => new h_n(e)); + } + get depth() { + return this.a.depth; + } + get visibleChildrenCount() { + return this.a.visibleChildrenCount; + } + get visibleChildIndex() { + return this.a.visibleChildIndex; + } + get collapsible() { + return this.a.collapsible; + } + get collapsed() { + return this.a.collapsed; + } + get visible() { + return this.a.visible; + } + get filterData() { + return this.a.filterData; + } + constructor(e) { + this.a = e; + } +}; +var Wgr = class { + constructor(i, e, t) { + this.b = i; + this.d = e; + this.onDidChangeTwistieState = t; + this.a = new Map(); + this.templateId = i.templateId; + } + renderTemplate(i) { + return { + templateData: this.b.renderTemplate(i) + }; + } + renderElement(i, e, t, s) { + this.b.renderElement(this.d.map(i), e, t.templateData, s); + } + renderTwistie(i, e) { + if (i.slow) { + e.classList.add(...le.asClassNameArray(A.treeItemLoading)); + return true; + } else { + e.classList.remove(...le.asClassNameArray(A.treeItemLoading)); + return false; + } + } + disposeElement(i, e, t, s) { + this.b.disposeElement?.(this.d.map(i), e, t.templateData, s); + } + disposeTemplate(i) { + this.b.disposeTemplate(i.templateData); + } + dispose() { + this.a.clear(); + } +}; +function G5s(i) { + return { + browserEvent: i.browserEvent, + elements: i.elements.map(e => e.element) + }; +} +function emt(i) { + return { + browserEvent: i.browserEvent, + element: i.element && i.element.element, + target: i.target + }; +} +function Vgr(i) { + return { + browserEvent: i.browserEvent, + element: i.element && i.element.element, + anchor: i.anchor, + isStickyScroll: i.isStickyScroll + }; +} +var Hgr = class extends iR { + set context(i) { + this.f.context = i; + } + get context() { + return this.f.context; + } + constructor(i) { + super(i.elements.map(e => e.element)); + this.f = i; + } +}; +function WQt(i) { + if (i instanceof iR) { + return new Hgr(i); + } else { + return i; + } +} +var qgr = class { + constructor(i) { + this.a = i; + } + getDragURI(i) { + return this.a.getDragURI(i.element); + } + getDragLabel(i, e) { + if (this.a.getDragLabel) { + return this.a.getDragLabel(i.map(t => t.element), e); + } + } + onDragStart(i, e) { + this.a.onDragStart?.(WQt(i), e); + } + onDragOver(i, e, t, s, n, r = true) { + return this.a.onDragOver(WQt(i), e && e.element, t, s, n); + } + drop(i, e, t, s, n) { + this.a.drop(WQt(i), e && e.element, t, s, n); + } + onDragEnd(i) { + this.a.onDragEnd?.(i); + } + dispose() { + this.a.dispose(); + } +}; +var jgr = class extends B5s { + constructor(i, e, t) { + super(e, t); + this.findProvider = i; + this.isFindSessionActive = false; + } + filter(i, e) { + const t = super.filter(i, e); + if (!this.isFindSessionActive || this.findMode === og.Highlight || !this.findProvider.isVisible) { + return t; + } + const s = p0e(t) ? t.visibility : t; + if (CG(s) === 0) { + return 0; + } else if (this.findProvider.isVisible(i)) { + return t; + } else { + return 0; + } + } +}; +var zgr = class extends U5s { + constructor(i, e, t, s, n) { + super(i, t, s, n); + this.O = e; + this.t = t; + this.K = false; + this.L = false; + this.M = new Bm(250); + this.q.add(Ue(async () => { + if (this.K) { + await this.O.endSession?.(); + } + })); + } + x(i) { + this.A(false); + this.I?.cancel(); + this.I = new Xi(); + this.M.trigger(() => this.R()); + } + async R() { + const i = this.I?.token; + if (!i || i.isCancellationRequested) { + return; + } + const e = this.pattern; + if (e === "") { + if (this.K) { + this.L = true; + await this.U(); + this.L = false; + if (!i.isCancellationRequested) { + this.t.reset(); + super.x(""); + } + } + return; + } + if (!this.K) { + this.S(); + } + this.L = true; + this.J = undefined; + const t = await this.O.find(e, { + matchType: this.matchType, + findMode: this.mode + }, i); + if (!i.isCancellationRequested && t !== undefined) { + this.L = false; + this.J = t; + this.t.reset(); + super.x(e); + if (t.warningMessage) { + this.A(true, t.warningMessage); + } + } + } + S() { + this.K = true; + this.t.isFindSessionActive = true; + this.O.startSession?.(); + } + async U() { + this.K = false; + this.t.isFindSessionActive = false; + await this.O.endSession?.(); + } + H() { + if (this.L || !this.J) { + return; + } + const i = this.J.matchCount === 0 && this.pattern.length > 0; + this.A(i); + if (this.pattern.length) { + this.B(this.J.matchCount); + } + } + y(i) { + this.f.set(i.id, i.isChecked); + this.t.findMode = this.mode; + this.t.findMatchType = this.matchType; + this.j = this.mode === og.Filter ? f(41, null) : f(42, null); + this.x(this.pattern); + } + shouldAllowFocus(i) { + return this.shouldFocusWhenNavigating(i); + } + shouldFocusWhenNavigating(i) { + if (!this.K || !this.J) { + return true; + } + const e = i.element?.element; + if (e && this.J.isMatch(e)) { + return true; + } else { + return !Nx.isDefault(i.filterData); + } + } +}; +function K5s(i) { + return i && { + ...i, + collapseByDefault: true, + identityProvider: i.identityProvider && { + getId(e) { + return i.identityProvider.getId(e.element); + } + }, + dnd: i.dnd && new qgr(i.dnd), + multipleSelectionController: i.multipleSelectionController && { + isSelectionSingleChangeEvent(e) { + return i.multipleSelectionController.isSelectionSingleChangeEvent({ + ...e, + element: e.element + }); + }, + isSelectionRangeChangeEvent(e) { + return i.multipleSelectionController.isSelectionRangeChangeEvent({ + ...e, + element: e.element + }); + } + }, + accessibilityProvider: i.accessibilityProvider && { + ...i.accessibilityProvider, + getPosInSet: undefined, + getSetSize: undefined, + getRole: i.accessibilityProvider.getRole ? e => i.accessibilityProvider.getRole(e.element) : () => "treeitem", + isChecked: i.accessibilityProvider.isChecked ? e => !!i.accessibilityProvider?.isChecked(e.element) : undefined, + getAriaLabel(e) { + return i.accessibilityProvider.getAriaLabel(e.element); + }, + getWidgetAriaLabel() { + return i.accessibilityProvider.getWidgetAriaLabel(); + }, + getWidgetRole: i.accessibilityProvider.getWidgetRole ? () => i.accessibilityProvider.getWidgetRole() : () => "tree", + getAriaLevel: i.accessibilityProvider.getAriaLevel && (e => i.accessibilityProvider.getAriaLevel(e.element)), + getActiveDescendantId: i.accessibilityProvider.getActiveDescendantId && (e => i.accessibilityProvider.getActiveDescendantId(e.element)) + }, + filter: i.filter && { + filter(e, t) { + return i.filter.filter(e.element, t); + } + }, + keyboardNavigationLabelProvider: i.keyboardNavigationLabelProvider && { + ...i.keyboardNavigationLabelProvider, + getKeyboardNavigationLabel(e) { + return i.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e.element); + } + }, + sorter: undefined, + expandOnlyOnTwistieClick: typeof i.expandOnlyOnTwistieClick === "undefined" ? undefined : typeof i.expandOnlyOnTwistieClick != "function" ? i.expandOnlyOnTwistieClick : e => i.expandOnlyOnTwistieClick(e.element), + defaultFindVisibility: e => e.hasChildren && e.stale ? 1 : typeof i.defaultFindVisibility == "number" ? i.defaultFindVisibility : typeof i.defaultFindVisibility === "undefined" ? 2 : i.defaultFindVisibility(e.element) + }; +} +function VQt(i, e) { + e(i); + i.children.forEach(t => VQt(t, e)); +} +var hC = class { + get onDidScroll() { + return this.b.onDidScroll; + } + get onDidChangeFocus() { + return de.map(this.b.onDidChangeFocus, G5s); + } + get onDidChangeSelection() { + return de.map(this.b.onDidChangeSelection, G5s); + } + get onKeyDown() { + return this.b.onKeyDown; + } + get onMouseClick() { + return de.map(this.b.onMouseClick, emt); + } + get onMouseDblClick() { + return de.map(this.b.onMouseDblClick, emt); + } + get onContextMenu() { + return de.map(this.b.onContextMenu, Vgr); + } + get onTap() { + return de.map(this.b.onTap, emt); + } + get onPointer() { + return de.map(this.b.onPointer, emt); + } + get onDidFocus() { + return this.b.onDidFocus; + } + get onDidBlur() { + return this.b.onDidBlur; + } + get onDidChangeModel() { + return this.b.onDidChangeModel; + } + get onDidChangeCollapseState() { + return this.b.onDidChangeCollapseState; + } + get onDidUpdateOptions() { + return this.b.onDidUpdateOptions; + } + get onDidChangeStickyScrollFocused() { + return this.b.onDidChangeStickyScrollFocused; + } + get findMode() { + if (this.h) { + return this.h.mode; + } else { + return this.b.findMode; + } + } + set findMode(i) { + if (this.h) { + this.h.mode = i; + } else { + this.b.findMode = i; + } + } + get findMatchType() { + if (this.h) { + return this.h.matchType; + } else { + return this.b.findMatchType; + } + } + set findMatchType(i) { + if (this.h) { + this.h.matchType = i; + } else { + this.b.findMatchType = i; + } + } + get expandOnlyOnTwistieClick() { + if (typeof this.b.expandOnlyOnTwistieClick == "boolean") { + return this.b.expandOnlyOnTwistieClick; + } + const i = this.b.expandOnlyOnTwistieClick; + return e => i(this.f.get(e === this.d.element ? null : e) || null); + } + get onDidDispose() { + return this.b.onDidDispose; + } + constructor(i, e, t, s, n, r = {}) { + this.z = i; + this.A = n; + this.f = new Map(); + this.k = new Map(); + this.m = new Map(); + this.q = new B(); + this.t = new B(); + this.u = new MQt(l => new Ugr(l)); + this.w = new Q(); + this.o = r.identityProvider; + this.p = typeof r.autoExpandSingleChildren === "undefined" ? false : r.autoExpandSingleChildren; + this.g = r.sorter; + this.j = l => r.collapseByDefault ? r.collapseByDefault(l) ? n0.PreserveOrCollapsed : n0.PreserveOrExpanded : undefined; + let o = false; + let a; + if (r.findProvider && (r.findWidgetEnabled ?? true) && r.keyboardNavigationLabelProvider && r.contextViewProvider) { + o = true; + a = new jgr(r.findProvider, r.keyboardNavigationLabelProvider, r.filter); + } + this.b = this.B(i, e, t, s, { + ...r, + findWidgetEnabled: !o, + filter: a ?? r.filter + }); + this.d = BQt({ + element: undefined, + parent: null, + hasChildren: true, + defaultCollapseState: undefined + }); + if (this.o) { + this.d = { + ...this.d, + id: null + }; + } + this.f.set(null, this.d); + this.b.onDidChangeCollapseState(this.J, this, this.w); + if (o) { + const l = { + styles: r.findWidgetStyles, + showNotFoundMessage: r.showNotFoundMessage + }; + this.h = this.w.add(new zgr(this.b, r.findProvider, a, this.b.options.contextViewProvider, l)); + this.y = c => this.h.shouldFocusWhenNavigating(c); + this.onDidChangeFindOpenState = this.h.onDidChangeOpenState; + this.onDidChangeFindMode = this.h.onDidChangeMode; + this.onDidChangeFindMatchType = this.h.onDidChangeMatchType; + } else { + this.onDidChangeFindOpenState = this.b.onDidChangeFindOpenState; + this.onDidChangeFindMode = this.b.onDidChangeFindMode; + this.onDidChangeFindMatchType = this.b.onDidChangeFindMatchType; + } + } + B(i, e, t, s, n) { + const r = new FQt(t); + const o = s.map(l => new Wgr(l, this.u, this.t.event)); + const a = K5s(n) || {}; + return new CD(i, e, r, o, a); + } + updateOptions(i = {}) { + this.b.updateOptions(i); + } + get options() { + return this.b.options; + } + getHTMLElement() { + return this.b.getHTMLElement(); + } + get contentHeight() { + return this.b.contentHeight; + } + get contentWidth() { + return this.b.contentWidth; + } + get onDidChangeContentHeight() { + return this.b.onDidChangeContentHeight; + } + get onDidChangeContentWidth() { + return this.b.onDidChangeContentWidth; + } + get scrollTop() { + return this.b.scrollTop; + } + set scrollTop(i) { + this.b.scrollTop = i; + } + get scrollLeft() { + return this.b.scrollLeft; + } + set scrollLeft(i) { + this.b.scrollLeft = i; + } + get scrollHeight() { + return this.b.scrollHeight; + } + get renderHeight() { + return this.b.renderHeight; + } + get lastVisibleElement() { + return this.b.lastVisibleElement.element; + } + get ariaLabel() { + return this.b.ariaLabel; + } + set ariaLabel(i) { + this.b.ariaLabel = i; + } + domFocus() { + this.b.domFocus(); + } + isDOMFocused() { + return this.b.isDOMFocused(); + } + navigate(i) { + let e; + if (i) { + e = this.D(i); + } + return new Qgr(this.b.navigate(e)); + } + layout(i, e) { + this.b.layout(i, e); + } + style(i) { + this.b.style(i); + } + getInput() { + return this.d.element; + } + async setInput(i, e) { + this.m.forEach(s => s.cancel()); + this.m.clear(); + this.d.element = i; + const t = e && { + viewState: e, + focus: [], + selection: [] + }; + await this.C(i, true, false, t); + if (t) { + this.b.setFocus(t.focus); + this.b.setSelection(t.selection); + } + if (e && typeof e.scrollTop == "number") { + this.scrollTop = e.scrollTop; + } + } + async updateChildren(i = this.d.element, e = true, t = false, s) { + await this.C(i, e, t, undefined, s); + } + async C(i = this.d.element, e = true, t = false, s, n) { + if (typeof this.d.element === "undefined") { + throw new dC(this.z, "Tree input not set"); + } + if (this.d.refreshPromise) { + await this.d.refreshPromise; + await de.toPromise(this.q.event); + } + const r = this.D(i); + await this.E(r, e, s, n); + if (t) { + try { + this.b.rerender(r); + } catch {} + } + } + resort(i = this.d.element, e = true) { + this.b.resort(this.D(i), e); + } + hasNode(i) { + return i === this.d.element || this.f.has(i); + } + rerender(i) { + if (i === undefined || i === this.d.element) { + this.b.rerender(); + return; + } + const e = this.D(i); + this.b.rerender(e); + } + updateElementHeight(i, e) { + const t = this.D(i); + this.b.updateElementHeight(t, e); + } + updateWidth(i) { + const e = this.D(i); + this.b.updateWidth(e); + } + getNode(i = this.d.element) { + const e = this.D(i); + const t = this.b.getNode(e === this.d ? null : e); + return this.u.map(t); + } + collapse(i, e = false) { + const t = this.D(i); + return this.b.collapse(t === this.d ? null : t, e); + } + async expand(i, e = false) { + if (typeof this.d.element === "undefined") { + throw new dC(this.z, "Tree input not set"); + } + if (this.d.refreshPromise) { + await this.d.refreshPromise; + await de.toPromise(this.q.event); + } + const t = this.D(i); + if (this.b.hasElement(t) && !this.b.isCollapsible(t) || (t.refreshPromise && (await this.d.refreshPromise, await de.toPromise(this.q.event)), t !== this.d && !t.refreshPromise && !this.b.isCollapsed(t))) { + return false; + } + const s = this.b.expand(t === this.d ? null : t, e); + if (t.refreshPromise) { + await this.d.refreshPromise; + await de.toPromise(this.q.event); + } + return s; + } + toggleCollapsed(i, e = false) { + return this.b.toggleCollapsed(this.D(i), e); + } + expandAll() { + this.b.expandAll(); + } + async expandTo(i) { + if (!this.A.getParent) { + throw new Error("Can't expand to element without getParent method"); + } + const e = []; + while (!this.hasNode(i)) { + i = this.A.getParent(i); + if (i !== this.d.element) { + e.push(i); + } + } + for (const t of Ws.reverse(e)) { + await this.expand(t); + } + this.b.expandTo(this.D(i)); + } + collapseAll() { + this.b.collapseAll(); + } + isCollapsible(i) { + return this.b.isCollapsible(this.D(i)); + } + isCollapsed(i) { + return this.b.isCollapsed(this.D(i)); + } + triggerTypeNavigation() { + this.b.triggerTypeNavigation(); + } + openFind() { + if (this.h) { + this.h.open(); + } else { + this.b.openFind(); + } + } + closeFind() { + if (this.h) { + this.h.close(); + } else { + this.b.closeFind(); + } + } + refilter() { + this.b.refilter(); + } + setAnchor(i) { + this.b.setAnchor(typeof i === "undefined" ? undefined : this.D(i)); + } + getAnchor() { + return this.b.getAnchor()?.element; + } + setSelection(i, e) { + const t = i.map(s => this.D(s)); + this.b.setSelection(t, e); + } + getSelection() { + return this.b.getSelection().map(e => e.element); + } + setFocus(i, e) { + const t = i.map(s => this.D(s)); + this.b.setFocus(t, e); + } + focusNext(i = 1, e = false, t) { + this.b.focusNext(i, e, t, this.y); + } + focusPrevious(i = 1, e = false, t) { + this.b.focusPrevious(i, e, t, this.y); + } + focusNextPage(i) { + return this.b.focusNextPage(i, this.y); + } + focusPreviousPage(i) { + return this.b.focusPreviousPage(i, this.y); + } + focusLast(i) { + this.b.focusLast(i, this.y); + } + focusFirst(i) { + this.b.focusFirst(i, this.y); + } + getFocus() { + return this.b.getFocus().map(e => e.element); + } + getStickyScrollFocus() { + return this.b.getStickyScrollFocus().map(e => e.element); + } + getFocusedPart() { + return this.b.getFocusedPart(); + } + reveal(i, e) { + this.b.reveal(this.D(i), e); + } + getRelativeTop(i) { + return this.b.getRelativeTop(this.D(i)); + } + getParentElement(i) { + const e = this.b.getParentElement(this.D(i)); + return e && e.element; + } + getFirstElementChild(i = this.d.element) { + const e = this.D(i); + const t = this.b.getFirstElementChild(e === this.d ? null : e); + return t && t.element; + } + D(i) { + const e = this.f.get(i === this.d.element ? null : i); + if (!e) { + const t = this.o?.getId(i).toString(); + throw new dC(this.z, `Data tree node not found${t ? `: ${t}` : ""}`); + } + return e; + } + async E(i, e, t, s) { + if (!this.w.isDisposed) { + await this.F(i, e, t); + if (!this.w.isDisposed) { + this.L(i, t, s); + } + } + } + async F(i, e, t) { + let s; + this.k.forEach((n, r) => { + if (!s && Bgr(r, i)) { + s = n.then(() => this.F(i, e, t)); + } + }); + if (s) { + return s; + } + if (i !== this.d && this.b.getNode(i).collapsed) { + i.hasChildren = !!this.A.hasChildren(i.element); + i.stale = true; + this.K(i, [], e, t); + return; + } + return this.G(i, e, t); + } + async G(i, e, t) { + let s; + i.refreshPromise = new Promise(n => s = n); + this.k.set(i, i.refreshPromise); + i.refreshPromise.finally(() => { + i.refreshPromise = undefined; + this.k.delete(i); + }); + try { + const n = await this.H(i, e, t); + i.stale = false; + await Ko.settled(n.map(r => this.G(r, e, t))); + } finally { + s(); + } + } + async H(i, e, t) { + i.hasChildren = !!this.A.hasChildren(i.element); + let s; + if (!i.hasChildren) { + s = Promise.resolve(Ws.empty()); + } else { + const n = this.I(i); + if (vji(n)) { + s = Promise.resolve(n); + } else { + const r = Da(800); + r.then(() => { + i.slow = true; + this.t.fire(i); + }, o => null); + s = n.finally(() => r.cancel()); + } + } + try { + const n = await s; + return this.K(i, n, e, t); + } catch (n) { + if (i !== this.d && this.b.hasElement(i)) { + this.b.collapse(i); + } + if (ca(n)) { + return []; + } + throw n; + } finally { + if (i.slow) { + i.slow = false; + this.t.fire(i); + } + } + } + I(i) { + let e = this.m.get(i); + if (e) { + return e; + } + const t = this.A.getChildren(i.element); + if (vji(t)) { + return this.N(t); + } else { + e = ql(async () => this.N(await t)); + this.m.set(i, e); + return e.finally(() => { + this.m.delete(i); + }); + } + } + J({ + node: i, + deep: e + }) { + if (i.element !== null && !i.collapsed && i.element.stale) { + if (e) { + this.collapse(i.element.element); + } else { + this.E(i.element, false).catch(xs); + } + } + } + K(i, e, t, s) { + const n = [...e]; + if (i.children.length === 0 && n.length === 0) { + return []; + } + const r = new Map(); + const o = new Map(); + for (const c of i.children) { + r.set(c.element, c); + if (this.o) { + o.set(c.id, { + node: c, + collapsed: this.b.hasElement(c) && this.b.isCollapsed(c) + }); + } + } + const a = []; + const l = n.map(c => { + const u = !!this.A.hasChildren(c); + if (!this.o) { + const p = BQt({ + element: c, + parent: i, + hasChildren: u, + defaultCollapseState: this.j(c) + }); + if (u && p.defaultCollapseState === n0.PreserveOrExpanded) { + a.push(p); + } + return p; + } + const d = this.o.getId(c).toString(); + const h = o.get(d); + if (h) { + const p = h.node; + r.delete(p.element); + this.f.delete(p.element); + this.f.set(c, p); + p.element = c; + p.hasChildren = u; + if (t) { + if (h.collapsed) { + p.children.forEach(b => VQt(b, v => this.f.delete(v.element))); + p.children.splice(0, p.children.length); + p.stale = true; + } else { + a.push(p); + } + } else if (u && !h.collapsed) { + a.push(p); + } + return p; + } + const g = BQt({ + element: c, + parent: i, + id: d, + hasChildren: u, + defaultCollapseState: this.j(c) + }); + if (s && s.viewState.focus && s.viewState.focus.indexOf(d) > -1) { + s.focus.push(g); + } + if (s && s.viewState.selection && s.viewState.selection.indexOf(d) > -1) { + s.selection.push(g); + } + if (s && s.viewState.expanded && s.viewState.expanded.indexOf(d) > -1 || u && g.defaultCollapseState === n0.PreserveOrExpanded) { + a.push(g); + } + return g; + }); + for (const c of r.values()) { + VQt(c, u => this.f.delete(u.element)); + } + for (const c of l) { + this.f.set(c.element, c); + } + VBt(i.children, 0, i.children.length, l); + if (i !== this.d && this.p && l.length === 1 && a.length === 0) { + l[0].forceExpanded = true; + a.push(l[0]); + } + return a; + } + L(i, e, t) { + const s = i.children.map(r => this.M(r, e)); + const n = t && { + ...t, + diffIdentityProvider: t.diffIdentityProvider && { + getId(r) { + return t.diffIdentityProvider.getId(r.element); + } + } + }; + this.b.setChildren(i === this.d ? null : i, s, n); + if (i !== this.d) { + this.b.setCollapsible(i, i.hasChildren); + } + this.q.fire(); + } + M(i, e) { + if (i.stale) { + return { + element: i, + collapsible: i.hasChildren, + collapsed: true + }; + } + let t; + if (e && e.viewState.expanded && i.id && e.viewState.expanded.indexOf(i.id) > -1) { + t = false; + } else if (i.forceExpanded) { + t = false; + i.forceExpanded = false; + } else { + t = i.defaultCollapseState; + } + return { + element: i, + children: i.hasChildren ? Ws.map(i.children, s => this.M(s, e)) : [], + collapsible: i.hasChildren, + collapsed: t + }; + } + N(i) { + if (this.g) { + i = [...i].sort(this.g.compare.bind(this.g)); + } + return i; + } + getViewState() { + if (!this.o) { + throw new dC(this.z, "Can't get tree view state without an identity provider"); + } + const i = o => this.o.getId(o).toString(); + const e = this.getFocus().map(i); + const t = this.getSelection().map(i); + const s = []; + const n = this.b.getNode(); + const r = [n]; + while (r.length > 0) { + const o = r.pop(); + if (o !== n && o.collapsible && !o.collapsed) { + s.push(i(o.element.element)); + } + r.push(...o.children); + } + return { + focus: e, + selection: t, + expanded: s, + scrollTop: this.scrollTop + }; + } + dispose() { + this.w.dispose(); + this.b.dispose(); + } +}; +var Jgr = class f_n { + get element() { + return { + elements: this.a.element.elements.map(e => e.element), + incompressible: this.a.element.incompressible + }; + } + get children() { + return this.a.children.map(e => new f_n(e)); + } + get depth() { + return this.a.depth; + } + get visibleChildrenCount() { + return this.a.visibleChildrenCount; + } + get visibleChildIndex() { + return this.a.visibleChildIndex; + } + get collapsible() { + return this.a.collapsible; + } + get collapsed() { + return this.a.collapsed; + } + get visible() { + return this.a.visible; + } + get filterData() { + return this.a.filterData; + } + constructor(e) { + this.a = e; + } +}; +var Ggr = class { + constructor(i, e, t, s) { + this.d = i; + this.f = e; + this.g = t; + this.onDidChangeTwistieState = s; + this.a = new Map(); + this.b = []; + this.templateId = i.templateId; + } + renderTemplate(i) { + return { + templateData: this.d.renderTemplate(i) + }; + } + renderElement(i, e, t, s) { + this.d.renderElement(this.f.map(i), e, t.templateData, s); + } + renderCompressedElements(i, e, t, s) { + this.d.renderCompressedElements(this.g().map(i), e, t.templateData, s); + } + renderTwistie(i, e) { + if (i.slow) { + e.classList.add(...le.asClassNameArray(A.treeItemLoading)); + return true; + } else { + e.classList.remove(...le.asClassNameArray(A.treeItemLoading)); + return false; + } + } + disposeElement(i, e, t, s) { + this.d.disposeElement?.(this.f.map(i), e, t.templateData, s); + } + disposeCompressedElements(i, e, t, s) { + this.d.disposeCompressedElements?.(this.g().map(i), e, t.templateData, s); + } + disposeTemplate(i) { + this.d.disposeTemplate(i.templateData); + } + dispose() { + this.a.clear(); + this.b = si(this.b); + } +}; +function Kgr(i) { + const e = i && K5s(i); + return e && { + ...e, + keyboardNavigationLabelProvider: e.keyboardNavigationLabelProvider && { + ...e.keyboardNavigationLabelProvider, + getCompressedNodeKeyboardNavigationLabel(t) { + return i.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(t.map(s => s.element)); + } + } + }; +} +var Ygr = class extends hC { + constructor(i, e, t, s, n, r, o = {}) { + super(i, e, t, n, r, o); + this.x = s; + this.s = new MQt(a => new Jgr(a)); + this.v = o.filter; + } + getCompressedTreeNode(i) { + const e = this.D(i); + return this.b.getCompressedTreeNode(e).element; + } + B(i, e, t, s, n) { + const r = new FQt(t); + const o = s.map(l => new Ggr(l, this.u, () => this.s, this.t.event)); + const a = Kgr(n) || {}; + return new J5s(i, e, r, o, a); + } + M(i, e) { + return { + incompressible: this.x.isIncompressible(i.element), + ...super.M(i, e) + }; + } + updateOptions(i = {}) { + this.b.updateOptions(i); + } + getViewState() { + if (!this.o) { + throw new dC(this.z, "Can't get tree view state without an identity provider"); + } + const i = o => this.o.getId(o).toString(); + const e = this.getFocus().map(i); + const t = this.getSelection().map(i); + const s = []; + const n = this.b.getCompressedTreeNode(); + const r = [n]; + while (r.length > 0) { + const o = r.pop(); + if (o !== n && o.collapsible && !o.collapsed) { + for (const a of o.element.elements) { + s.push(i(a.element)); + } + } + r.push(...o.children); + } + return { + focus: e, + selection: t, + expanded: s, + scrollTop: this.scrollTop + }; + } + L(i, e, t) { + if (!this.o) { + return super.L(i, e); + } + const s = h => this.o.getId(h).toString(); + const n = h => { + const g = new Set(); + for (const p of h) { + const b = this.b.getCompressedTreeNode(p === this.d ? null : p); + if (b.element) { + for (const v of b.element.elements) { + g.add(s(v.element)); + } + } + } + return g; + }; + const r = n(this.b.getSelection()); + const o = n(this.b.getFocus()); + super.L(i, e, t); + const a = this.getSelection(); + let l = false; + const c = this.getFocus(); + let u = false; + const d = h => { + const g = h.element; + if (g) { + for (let p = 0; p < g.elements.length; p++) { + const b = s(g.elements[p].element); + const v = g.elements[g.elements.length - 1].element; + if (r.has(b) && a.indexOf(v) === -1) { + a.push(v); + l = true; + } + if (o.has(b) && c.indexOf(v) === -1) { + c.push(v); + u = true; + } + } + } + h.children.forEach(d); + }; + d(this.b.getCompressedTreeNode(i === this.d ? null : i)); + if (l) { + this.setSelection(a); + } + if (u) { + this.setFocus(c); + } + } + N(i) { + if (this.v) { + i = Ws.filter(i, e => { + const t = this.v.filter(e, 1); + const s = Xgr(t); + if (s === 2) { + throw new Error("Recursive tree visibility not supported in async data compressed trees"); + } + return s === 1; + }); + } + return super.N(i); + } + navigate(i) { + return super.navigate(i); + } +}; +function Xgr(i) { + if (typeof i == "boolean") { + if (i) { + return 1; + } else { + return 0; + } + } else if (p0e(i)) { + return CG(i.visibility); + } else { + return CG(i); + } +} +var Qgr = class { + constructor(i) { + this.a = i; + } + current() { + const i = this.a.current(); + if (i === null) { + return null; + } else { + return i.element; + } + } + previous() { + this.a.previous(); + return this.current(); + } + first() { + this.a.first(); + return this.current(); + } + last() { + this.a.last(); + return this.current(); + } + next() { + this.a.next(); + return this.current(); + } +}; +sa(); +var RR = class extends qne { + constructor(i, e, t, s, n, r = {}) { + super(i, e, t, s, r); + this.f = i; + this.g = n; + this.d = new Map(); + this.c = r.identityProvider; + } + getInput() { + return this.b; + } + setInput(i, e) { + if (e && !this.c) { + throw new dC(this.f, "Can't restore tree view state without an identity provider"); + } + this.b = i; + if (!i) { + this.d.clear(); + this.o.setChildren(null, Ws.empty()); + return; + } + if (!e) { + this.m(i); + return; + } + const t = []; + const s = []; + const n = o => { + const a = this.c.getId(o).toString(); + return !e.expanded[a]; + }; + const r = o => { + const a = this.c.getId(o.element).toString(); + if (e.focus.has(a)) { + t.push(o.element); + } + if (e.selection.has(a)) { + s.push(o.element); + } + }; + this.m(i, n, r); + this.setFocus(t); + this.setSelection(s); + if (e && typeof e.scrollTop == "number") { + this.scrollTop = e.scrollTop; + } + } + updateChildren(i = this.b) { + if (typeof this.b === "undefined") { + throw new dC(this.f, "Tree input not set"); + } + let e; + if (this.c) { + e = t => { + const s = this.c.getId(t).toString(); + const n = this.d.get(s); + if (n) { + return n.collapsed; + } + }; + } + this.m(i, e); + } + resort(i = this.b, e = true) { + this.o.resort(i === this.b ? null : i, e); + } + refresh(i) { + if (i === undefined) { + this.j.rerender(); + return; + } + this.o.rerender(i); + } + m(i, e, t) { + let s; + if (this.c) { + const n = new Set(); + const r = t; + t = o => { + const a = this.c.getId(o.element).toString(); + n.add(a); + this.d.set(a, o); + r?.(o); + }; + s = o => { + const a = this.c.getId(o.element).toString(); + if (!n.has(a)) { + this.d.delete(a); + } + }; + } + this.o.setChildren(i === this.b ? null : i, this.s(i, e).elements, { + onDidCreateNode: t, + onDidDeleteNode: s + }); + } + s(i, e) { + const t = [...this.g.getChildren(i)]; + return { + elements: Ws.map(t, n => { + const { + elements: r, + size: o + } = this.s(n, e); + const a = this.g.hasChildren ? this.g.hasChildren(n) : undefined; + const l = o === 0 ? undefined : e && e(n); + return { + element: n, + children: r, + collapsible: a, + collapsed: l + }; + }), + size: t.length + }; + } + V(i, e) { + return new Xpt(i, e); + } +}; +pe(); +q(); +X(); +Me(); +Qr(); +Ee(); +rt(); +X(); +Ee(); +var tmt = new fe("isMac", Gt, f(1719, null)); +var HQt = new fe("isLinux", yl, f(1720, null)); +var NR = new fe("isWindows", ln, f(1721, null)); +var r0 = new fe("isWeb", tn, f(1722, null)); +var LA = new fe("isMacNative", Gt && !tn, f(1723, null)); +var Y5s = new fe("isIOS", fp, f(1724, null)); +var Zgr = new fe("isMobile", u4t, f(1725, null)); +var jU = new fe("isDevelopment", false, true); +var epr = new fe("productQualityType", "", f(1726, null)); +var Vf = "inputFocus"; +var R1 = new fe(Vf, false, f(1727, null)); +ks(); +te(); +Fi(); +Ht(); +ya(); +var br = Ve("listService"); +var tpr = class { + get lastFocusedList() { + return this.c; + } + constructor() { + this.a = new Q(); + this.b = []; + this.c = undefined; + } + d(i) { + if (i !== this.c) { + this.c?.getHTMLElement().classList.remove("last-focused"); + this.c = i; + this.c?.getHTMLElement().classList.add("last-focused"); + } + } + register(i, e) { + if (this.b.some(s => s.widget === i)) { + throw new Error("Cannot register the same widget multiple times"); + } + const t = { + widget: i, + extraContextKeys: e + }; + this.b.push(t); + if (Jg(i.getHTMLElement())) { + this.d(i); + } + return Gc(i.onDidFocus(() => this.d(i)), Ue(() => this.b.splice(this.b.indexOf(t), 1)), i.onDidDispose(() => { + this.b = this.b.filter(s => s !== t); + if (this.c === i) { + this.d(undefined); + } + })); + } + dispose() { + this.a.dispose(); + } +}; +var m0e = new fe("listScrollAtBoundary", "none"); +var X5s = T.or(m0e.isEqualTo("top"), m0e.isEqualTo("both")); +var Q5s = T.or(m0e.isEqualTo("bottom"), m0e.isEqualTo("both")); +var imt = new fe("listFocus", true); +var b0e = new fe("treestickyScrollFocused", false); +var SG = new fe("listSupportsMultiselect", true); +var nh = T.and(imt, T.not(Vf), b0e.negate()); +var smt = new fe("listHasSelectionOrFocus", false); +var SO = new fe("listDoubleSelection", false); +var qQt = new fe("listMultiSelection", false); +var jne = new fe("listSelectionNavigation", false); +var Z5s = new fe("listSupportsFind", true); +var nmt = new fe("treeElementCanCollapse", false); +var e6s = new fe("treeElementHasParent", false); +var rmt = new fe("treeElementCanExpand", false); +var t6s = new fe("treeElementHasChild", false); +var xO = new fe("treeFindOpen", false); +var i6s = "listTypeNavigationMode"; +var s6s = "listAutomaticKeyboardNavigation"; +function omt(i, e) { + const t = i.createScoped(e.getHTMLElement()); + imt.bindTo(t); + return t; +} +function amt(i, e) { + const t = m0e.bindTo(i); + const s = () => { + const n = e.scrollTop === 0; + const r = e.scrollHeight - e.renderHeight - e.scrollTop < 1; + if (n && r) { + t.set("both"); + } else if (n) { + t.set("top"); + } else if (r) { + t.set("bottom"); + } else { + t.set("none"); + } + }; + s(); + return e.onDidScroll(s); +} +var xG = "workbench.list.multiSelectModifier"; +var lmt = "workbench.list.openMode"; +var uP = "workbench.list.horizontalScrolling"; +var jQt = "workbench.list.defaultFindMode"; +var zQt = "workbench.list.typeNavigationMode"; +var cmt = "workbench.list.keyboardNavigation"; +var RA = "workbench.list.scrollByPage"; +var JQt = "workbench.list.defaultFindMatchType"; +var v0e = "workbench.tree.indent"; +var umt = "workbench.tree.renderIndentGuides"; +var NA = "workbench.list.smoothScrolling"; +var kO = "workbench.list.mouseWheelScrollSensitivity"; +var EO = "workbench.list.fastScrollSensitivity"; +var dmt = "workbench.tree.expandMode"; +var hmt = "workbench.tree.enableStickyScroll"; +var fmt = "workbench.tree.stickyScrollMaxItemCount"; +function IO(i) { + return i.getValue(xG) === "alt"; +} +var ipr = class extends H { + constructor(i) { + super(); + this.b = i; + this.a = IO(i); + this.c(); + } + c() { + this.D(this.b.onDidChangeConfiguration(i => { + if (i.affectsConfiguration(xG)) { + this.a = IO(this.b); + } + })); + } + isSelectionSingleChangeEvent(i) { + if (this.a) { + return i.browserEvent.altKey; + } else { + return Vls(i); + } + } + isSelectionRangeChangeEvent(i) { + return Hls(i); + } +}; +function gmt(i, e) { + const t = i.get(ve); + const s = i.get(oi); + const n = new Q(); + return [{ + ...e, + keyboardNavigationDelegate: { + mightProducePrintableCharacter(o) { + return s.mightProducePrintableCharacter(o); + } + }, + smoothScrolling: !!t.getValue(NA), + mouseWheelScrollSensitivity: t.getValue(kO), + fastScrollSensitivity: t.getValue(EO), + multipleSelectionController: e.multipleSelectionController ?? n.add(new ipr(t)), + keyboardNavigationEventFilter: rpr(s), + scrollByPage: !!t.getValue(RA) + }, n]; +} +var N1 = class extends Cg { + get onDidOpen() { + return this.Q.onDidOpen; + } + constructor(e, t, s, n, r, o, a, l, c) { + const u = typeof r.horizontalScrolling !== "undefined" ? r.horizontalScrolling : !!l.getValue(uP); + const [d, h] = c.invokeFunction(gmt, r); + super(e, t, s, n, { + keyboardSupport: false, + ...d, + horizontalScrolling: u + }); + this.z.add(h); + this.contextKeyService = omt(o, this); + this.z.add(amt(this.contextKeyService, this)); + this.h = SG.bindTo(this.contextKeyService); + this.h.set(r.multipleSelectionSupport !== false); + jne.bindTo(this.contextKeyService).set(!!r.selectionNavigation); + this.L = smt.bindTo(this.contextKeyService); + this.M = SO.bindTo(this.contextKeyService); + this.N = qQt.bindTo(this.contextKeyService); + this.O = r.horizontalScrolling; + this.P = IO(l); + this.z.add(this.contextKeyService); + this.z.add(a.register(this)); + this.R(r.overrideStyles); + this.z.add(this.onDidChangeSelection(() => { + const p = this.getSelection(); + const b = this.getFocus(); + this.contextKeyService.bufferChangeEvents(() => { + this.L.set(p.length > 0 || b.length > 0); + this.N.set(p.length > 1); + this.M.set(p.length === 2); + }); + })); + this.z.add(this.onDidChangeFocus(() => { + const p = this.getSelection(); + const b = this.getFocus(); + this.L.set(p.length > 0 || b.length > 0); + })); + this.z.add(l.onDidChangeConfiguration(p => { + if (p.affectsConfiguration(xG)) { + this.P = IO(l); + } + let b = {}; + if (p.affectsConfiguration(uP) && this.O === undefined) { + const v = !!l.getValue(uP); + b = { + ...b, + horizontalScrolling: v + }; + } + if (p.affectsConfiguration(RA)) { + const v = !!l.getValue(RA); + b = { + ...b, + scrollByPage: v + }; + } + if (p.affectsConfiguration(NA)) { + const v = !!l.getValue(NA); + b = { + ...b, + smoothScrolling: v + }; + } + if (p.affectsConfiguration(kO)) { + const v = l.getValue(kO); + b = { + ...b, + mouseWheelScrollSensitivity: v + }; + } + if (p.affectsConfiguration(EO)) { + const v = l.getValue(EO); + b = { + ...b, + fastScrollSensitivity: v + }; + } + if (Object.keys(b).length > 0) { + this.updateOptions(b); + } + })); + this.Q = new n6s(this, { + configurationService: l, + ...r + }); + this.z.add(this.Q); + } + updateOptions(e) { + super.updateOptions(e); + if (e.overrideStyles !== undefined) { + this.R(e.overrideStyles); + } + if (e.multipleSelectionSupport !== undefined) { + this.h.set(!!e.multipleSelectionSupport); + } + } + R(e) { + this.style(e ? VM(e) : Lz); + } + get useAltAsMultipleSelectionModifier() { + return this.P; + } +}; +N1 = __decorate([__param(5, Ne), __param(6, br), __param(7, ve), __param(8, re)], N1); +var GQt = class extends Une { + get onDidOpen() { + return this.h.onDidOpen; + } + constructor(e, t, s, n, r, o, a, l, c) { + const u = typeof r.horizontalScrolling !== "undefined" ? r.horizontalScrolling : !!l.getValue(uP); + const [d, h] = c.invokeFunction(gmt, r); + super(e, t, s, n, { + keyboardSupport: false, + ...d, + horizontalScrolling: u + }); + this.c = new Q(); + this.c.add(h); + this.contextKeyService = omt(o, this); + this.c.add(amt(this.contextKeyService, this.widget)); + this.g = r.horizontalScrolling; + this.d = SG.bindTo(this.contextKeyService); + this.d.set(r.multipleSelectionSupport !== false); + jne.bindTo(this.contextKeyService).set(!!r.selectionNavigation); + this.f = IO(l); + this.c.add(this.contextKeyService); + this.c.add(a.register(this)); + this.j(r.overrideStyles); + this.c.add(l.onDidChangeConfiguration(p => { + if (p.affectsConfiguration(xG)) { + this.f = IO(l); + } + let b = {}; + if (p.affectsConfiguration(uP) && this.g === undefined) { + const v = !!l.getValue(uP); + b = { + ...b, + horizontalScrolling: v + }; + } + if (p.affectsConfiguration(RA)) { + const v = !!l.getValue(RA); + b = { + ...b, + scrollByPage: v + }; + } + if (p.affectsConfiguration(NA)) { + const v = !!l.getValue(NA); + b = { + ...b, + smoothScrolling: v + }; + } + if (p.affectsConfiguration(kO)) { + const v = l.getValue(kO); + b = { + ...b, + mouseWheelScrollSensitivity: v + }; + } + if (p.affectsConfiguration(EO)) { + const v = l.getValue(EO); + b = { + ...b, + fastScrollSensitivity: v + }; + } + if (Object.keys(b).length > 0) { + this.updateOptions(b); + } + })); + this.h = new n6s(this, { + configurationService: l, + ...r + }); + this.c.add(this.h); + } + updateOptions(e) { + super.updateOptions(e); + if (e.overrideStyles !== undefined) { + this.j(e.overrideStyles); + } + if (e.multipleSelectionSupport !== undefined) { + this.d.set(!!e.multipleSelectionSupport); + } + } + j(e) { + this.style(e ? VM(e) : Lz); + } + get useAltAsMultipleSelectionModifier() { + return this.f; + } + dispose() { + this.c.dispose(); + super.dispose(); + } +}; +GQt = __decorate([__param(5, Ne), __param(6, br), __param(7, ve), __param(8, re)], GQt); +var zU = class extends yG { + get onDidOpen() { + return this.y.onDidOpen; + } + constructor(e, t, s, n, r, o, a, l, c, u) { + const d = typeof o.horizontalScrolling !== "undefined" ? o.horizontalScrolling : !!c.getValue(uP); + const [h, g] = u.invokeFunction(gmt, o); + super(e, t, s, n, r, { + keyboardSupport: false, + ...h, + horizontalScrolling: d + }); + this.k.add(g); + this.contextKeyService = omt(a, this); + this.k.add(amt(this.contextKeyService, this)); + this.s = SG.bindTo(this.contextKeyService); + this.s.set(o.multipleSelectionSupport !== false); + jne.bindTo(this.contextKeyService).set(!!o.selectionNavigation); + this.t = smt.bindTo(this.contextKeyService); + this.u = SO.bindTo(this.contextKeyService); + this.v = qQt.bindTo(this.contextKeyService); + this.w = o.horizontalScrolling; + this.x = IO(c); + this.k.add(this.contextKeyService); + this.k.add(l.register(this)); + this.z(o.overrideStyles); + this.k.add(this.onDidChangeSelection(() => { + const b = this.getSelection(); + const v = this.getFocus(); + this.contextKeyService.bufferChangeEvents(() => { + this.t.set(b.length > 0 || v.length > 0); + this.v.set(b.length > 1); + this.u.set(b.length === 2); + }); + })); + this.k.add(this.onDidChangeFocus(() => { + const b = this.getSelection(); + const v = this.getFocus(); + this.t.set(b.length > 0 || v.length > 0); + })); + this.k.add(c.onDidChangeConfiguration(b => { + if (b.affectsConfiguration(xG)) { + this.x = IO(c); + } + let v = {}; + if (b.affectsConfiguration(uP) && this.w === undefined) { + const y = !!c.getValue(uP); + v = { + ...v, + horizontalScrolling: y + }; + } + if (b.affectsConfiguration(RA)) { + const y = !!c.getValue(RA); + v = { + ...v, + scrollByPage: y + }; + } + if (b.affectsConfiguration(NA)) { + const y = !!c.getValue(NA); + v = { + ...v, + smoothScrolling: y + }; + } + if (b.affectsConfiguration(kO)) { + const y = c.getValue(kO); + v = { + ...v, + mouseWheelScrollSensitivity: y + }; + } + if (b.affectsConfiguration(EO)) { + const y = c.getValue(EO); + v = { + ...v, + fastScrollSensitivity: y + }; + } + if (Object.keys(v).length > 0) { + this.updateOptions(v); + } + })); + this.y = new spr(this, { + configurationService: c, + ...o + }); + this.k.add(this.y); + } + updateOptions(e) { + super.updateOptions(e); + if (e.overrideStyles !== undefined) { + this.z(e.overrideStyles); + } + if (e.multipleSelectionSupport !== undefined) { + this.s.set(!!e.multipleSelectionSupport); + } + } + z(e) { + this.style(e ? VM(e) : Lz); + } + get useAltAsMultipleSelectionModifier() { + return this.x; + } + dispose() { + this.k.dispose(); + super.dispose(); + } +}; +zU = __decorate([__param(6, Ne), __param(7, br), __param(8, ve), __param(9, re)], zU); +function MR(i = "keydown", e, t) { + const s = new KeyboardEvent(i); + s.preserveFocus = e; + s.pinned = t; + s.__forceEvent = true; + return s; +} +var KQt = class extends H { + constructor(i, e) { + super(); + this.c = i; + this.b = this.D(new B()); + this.onDidOpen = this.b.event; + this.D(de.filter(this.c.onDidChangeSelection, t => QS(t.browserEvent))(t => this.f(t))); + this.D(this.c.onPointer(t => this.g(t.element, t.browserEvent))); + this.D(this.c.onMouseDblClick(t => this.h(t.element, t.browserEvent))); + if (typeof e?.openOnSingleClick != "boolean" && e?.configurationService) { + this.a = e?.configurationService.getValue(lmt) !== "doubleClick"; + this.D(e?.configurationService.onDidChangeConfiguration(t => { + if (t.affectsConfiguration(lmt)) { + this.a = e?.configurationService.getValue(lmt) !== "doubleClick"; + } + })); + } else { + this.a = e?.openOnSingleClick ?? true; + } + } + f(i) { + if (i.elements.length !== 1) { + return; + } + const e = i.browserEvent; + const t = typeof e.preserveFocus == "boolean" ? e.preserveFocus : true; + const s = typeof e.pinned == "boolean" ? e.pinned : !t; + this.j(this.getSelectedElement(), t, s, false, i.browserEvent); + } + g(i, e) { + if (!this.a || e.detail === 2) { + return; + } + const s = e.button === 1; + const n = true; + const r = s; + const o = e.ctrlKey || e.metaKey || e.altKey; + this.j(i, n, r, o, e); + } + h(i, e) { + if (!e) { + return; + } + const t = e.target; + if (t.classList.contains("monaco-tl-twistie") || t.classList.contains("monaco-icon-label") && t.classList.contains("folder-icon") && e.offsetX < 16) { + return; + } + const n = false; + const r = true; + const o = e.ctrlKey || e.metaKey || e.altKey; + this.j(i, n, r, o, e); + } + j(i, e, t, s, n) { + if (i) { + this.b.fire({ + editorOptions: { + preserveFocus: e, + pinned: t, + revealIfVisible: true + }, + sideBySide: s, + element: i, + browserEvent: n + }); + } + } +}; +var n6s = class extends KQt { + constructor(i, e) { + super(i, e); + this.c = i; + } + getSelectedElement() { + return this.c.getSelectedElements()[0]; + } +}; +var spr = class extends KQt { + constructor(i, e) { + super(i, e); + } + getSelectedElement() { + return this.c.getSelectedElements()[0]; + } +}; +var npr = class extends KQt { + constructor(i, e) { + super(i, e); + } + getSelectedElement() { + return this.c.getSelection()[0] ?? undefined; + } +}; +function rpr(i) { + let e = false; + return t => { + if (t.toKeyCodeChord().isModifierKey()) { + return false; + } + if (e) { + e = false; + return false; + } + const s = i.softDispatch(t, t.target); + if (s.kind === 1) { + e = true; + return false; + } else { + e = false; + return s.kind === 0; + } + }; +} +var DO = class extends CD { + get contextKeyService() { + return this.d.contextKeyService; + } + get useAltAsMultipleSelectionModifier() { + return this.d.useAltAsMultipleSelectionModifier; + } + get onDidOpen() { + return this.d.onDidOpen; + } + constructor(e, t, s, n, r, o, a, l, c) { + const { + options: u, + getTypeNavigationMode: d, + disposable: h + } = o.invokeFunction(C0e, r); + super(e, t, s, n, u); + this.E.add(h); + this.d = new EG(this, r, d, r.overrideStyles, a, l, c); + this.E.add(this.d); + } + updateOptions(e) { + super.updateOptions(e); + this.d.updateOptions(e); + } +}; +DO = __decorate([__param(5, re), __param(6, Ne), __param(7, br), __param(8, ve)], DO); +var y0e = class extends J5s { + get contextKeyService() { + return this.c.contextKeyService; + } + get useAltAsMultipleSelectionModifier() { + return this.c.useAltAsMultipleSelectionModifier; + } + get onDidOpen() { + return this.c.onDidOpen; + } + constructor(e, t, s, n, r, o, a, l, c) { + const { + options: u, + getTypeNavigationMode: d, + disposable: h + } = o.invokeFunction(C0e, r); + super(e, t, s, n, u); + this.E.add(h); + this.c = new EG(this, r, d, r.overrideStyles, a, l, c); + this.E.add(this.c); + } + updateOptions(e = {}) { + super.updateOptions(e); + if (e.overrideStyles) { + this.c.updateStyleOverrides(e.overrideStyles); + } + this.c.updateOptions(e); + } +}; +y0e = __decorate([__param(5, re), __param(6, Ne), __param(7, br), __param(8, ve)], y0e); +var w0e = class extends RR { + get contextKeyService() { + return this.u.contextKeyService; + } + get useAltAsMultipleSelectionModifier() { + return this.u.useAltAsMultipleSelectionModifier; + } + get onDidOpen() { + return this.u.onDidOpen; + } + constructor(e, t, s, n, r, o, a, l, c, u) { + const { + options: d, + getTypeNavigationMode: h, + disposable: g + } = a.invokeFunction(C0e, o); + super(e, t, s, n, r, d); + this.E.add(g); + this.u = new EG(this, o, h, o.overrideStyles, l, c, u); + this.E.add(this.u); + } + updateOptions(e = {}) { + super.updateOptions(e); + if (e.overrideStyles !== undefined) { + this.u.updateStyleOverrides(e.overrideStyles); + } + this.u.updateOptions(e); + } +}; +w0e = __decorate([__param(6, re), __param(7, Ne), __param(8, br), __param(9, ve)], w0e); +var fC = class extends hC { + get contextKeyService() { + return this.O.contextKeyService; + } + get useAltAsMultipleSelectionModifier() { + return this.O.useAltAsMultipleSelectionModifier; + } + get onDidOpen() { + return this.O.onDidOpen; + } + constructor(e, t, s, n, r, o, a, l, c, u) { + const { + options: d, + getTypeNavigationMode: h, + disposable: g + } = a.invokeFunction(C0e, o); + super(e, t, s, n, r, d); + this.w.add(g); + this.O = new EG(this, o, h, o.overrideStyles, l, c, u); + this.w.add(this.O); + } + updateOptions(e = {}) { + super.updateOptions(e); + if (e.overrideStyles) { + this.O.updateStyleOverrides(e.overrideStyles); + } + this.O.updateOptions(e); + } +}; +fC = __decorate([__param(6, re), __param(7, Ne), __param(8, br), __param(9, ve)], fC); +var kG = class extends Ygr { + get contextKeyService() { + return this.S.contextKeyService; + } + get useAltAsMultipleSelectionModifier() { + return this.S.useAltAsMultipleSelectionModifier; + } + get onDidOpen() { + return this.S.onDidOpen; + } + constructor(e, t, s, n, r, o, a, l, c, u, d) { + const { + options: h, + getTypeNavigationMode: g, + disposable: p + } = l.invokeFunction(C0e, a); + super(e, t, s, n, r, o, h); + this.w.add(p); + this.S = new EG(this, a, g, a.overrideStyles, c, u, d); + this.w.add(this.S); + } + updateOptions(e) { + super.updateOptions(e); + this.S.updateOptions(e); + } +}; +kG = __decorate([__param(7, re), __param(8, Ne), __param(9, br), __param(10, ve)], kG); +function r6s(i) { + const e = i.getValue(jQt); + if (e === "highlight") { + return og.Highlight; + } + if (e === "filter") { + return og.Filter; + } + const t = i.getValue(cmt); + if (t === "simple" || t === "highlight") { + return og.Highlight; + } + if (t === "filter") { + return og.Filter; + } +} +function o6s(i) { + const e = i.getValue(JQt); + if (e === "fuzzy") { + return SS.Fuzzy; + } + if (e === "contiguous") { + return SS.Contiguous; + } +} +function C0e(i, e) { + const t = i.get(ve); + const s = i.get(Sc); + const n = i.get(Ne); + const r = i.get(re); + const o = () => { + const h = n.getContextKeyValue(i6s); + if (h === "automatic") { + return xF.Automatic; + } + if (h === "trigger" || n.getContextKeyValue(s6s) === false) { + return xF.Trigger; + } + const p = t.getValue(zQt); + if (p === "automatic") { + return xF.Automatic; + } + if (p === "trigger") { + return xF.Trigger; + } + }; + const a = e.horizontalScrolling !== undefined ? e.horizontalScrolling : !!t.getValue(uP); + const [l, c] = r.invokeFunction(gmt, e); + const u = e.paddingBottom; + const d = e.renderIndentGuides !== undefined ? e.renderIndentGuides : t.getValue(umt); + return { + getTypeNavigationMode: o, + disposable: c, + options: { + keyboardSupport: false, + ...l, + indent: typeof t.getValue(v0e) == "number" ? t.getValue(v0e) : undefined, + renderIndentGuides: d, + smoothScrolling: !!t.getValue(NA), + defaultFindMode: r6s(t), + defaultFindMatchType: o6s(t), + horizontalScrolling: a, + scrollByPage: !!t.getValue(RA), + paddingBottom: u, + hideTwistiesOfChildlessElements: e.hideTwistiesOfChildlessElements, + expandOnlyOnTwistieClick: e.expandOnlyOnTwistieClick ?? t.getValue(dmt) === "doubleClick", + contextViewProvider: s, + findWidgetStyles: fus, + enableStickyScroll: !!t.getValue(hmt), + stickyScrollMaxItemCount: Number(t.getValue(fmt)) + } + }; +} +var EG = class { + get onDidOpen() { + return this.p.onDidOpen; + } + constructor(e, t, s, n, r, o, a) { + this.q = e; + this.o = []; + this.contextKeyService = omt(r, e); + this.o.push(amt(this.contextKeyService, e)); + this.a = SG.bindTo(this.contextKeyService); + this.a.set(t.multipleSelectionSupport !== false); + jne.bindTo(this.contextKeyService).set(!!t.selectionNavigation); + this.b = Z5s.bindTo(this.contextKeyService); + this.b.set(t.findWidgetEnabled ?? true); + this.c = smt.bindTo(this.contextKeyService); + this.d = SO.bindTo(this.contextKeyService); + this.f = qQt.bindTo(this.contextKeyService); + this.g = nmt.bindTo(this.contextKeyService); + this.h = e6s.bindTo(this.contextKeyService); + this.i = rmt.bindTo(this.contextKeyService); + this.j = t6s.bindTo(this.contextKeyService); + this.k = xO.bindTo(this.contextKeyService); + this.m = b0e.bindTo(this.contextKeyService); + this.n = IO(a); + this.updateStyleOverrides(n); + const c = () => { + const d = e.getFocus()[0]; + if (!d) { + return; + } + const h = e.getNode(d); + this.g.set(h.collapsible && !h.collapsed); + this.h.set(!!e.getParentElement(d)); + this.i.set(h.collapsible && h.collapsed); + this.j.set(!!e.getFirstElementChild(d)); + }; + const u = new Set(); + u.add(i6s); + u.add(s6s); + this.o.push(this.contextKeyService, o.register(e), e.onDidChangeSelection(() => { + const d = e.getSelection(); + const h = e.getFocus(); + this.contextKeyService.bufferChangeEvents(() => { + this.c.set(d.length > 0 || h.length > 0); + this.f.set(d.length > 1); + this.d.set(d.length === 2); + }); + }), e.onDidChangeFocus(() => { + const d = e.getSelection(); + const h = e.getFocus(); + this.c.set(d.length > 0 || h.length > 0); + c(); + }), e.onDidChangeCollapseState(c), e.onDidChangeModel(c), e.onDidChangeFindOpenState(d => this.k.set(d)), e.onDidChangeStickyScrollFocused(d => this.m.set(d)), a.onDidChangeConfiguration(d => { + let h = {}; + if (d.affectsConfiguration(xG)) { + this.n = IO(a); + } + if (d.affectsConfiguration(v0e)) { + const g = a.getValue(v0e); + h = { + ...h, + indent: g + }; + } + if (d.affectsConfiguration(umt) && t.renderIndentGuides === undefined) { + const g = a.getValue(umt); + h = { + ...h, + renderIndentGuides: g + }; + } + if (d.affectsConfiguration(NA)) { + const g = !!a.getValue(NA); + h = { + ...h, + smoothScrolling: g + }; + } + if (d.affectsConfiguration(jQt) || d.affectsConfiguration(cmt)) { + const g = r6s(a); + h = { + ...h, + defaultFindMode: g + }; + } + if (d.affectsConfiguration(zQt) || d.affectsConfiguration(cmt)) { + const g = s(); + h = { + ...h, + typeNavigationMode: g + }; + } + if (d.affectsConfiguration(JQt)) { + const g = o6s(a); + h = { + ...h, + defaultFindMatchType: g + }; + } + if (d.affectsConfiguration(uP) && t.horizontalScrolling === undefined) { + const g = !!a.getValue(uP); + h = { + ...h, + horizontalScrolling: g + }; + } + if (d.affectsConfiguration(RA)) { + const g = !!a.getValue(RA); + h = { + ...h, + scrollByPage: g + }; + } + if (d.affectsConfiguration(dmt) && t.expandOnlyOnTwistieClick === undefined) { + h = { + ...h, + expandOnlyOnTwistieClick: a.getValue(dmt) === "doubleClick" + }; + } + if (d.affectsConfiguration(hmt)) { + const g = a.getValue(hmt); + h = { + ...h, + enableStickyScroll: g + }; + } + if (d.affectsConfiguration(fmt)) { + const g = Math.max(1, a.getValue(fmt)); + h = { + ...h, + stickyScrollMaxItemCount: g + }; + } + if (d.affectsConfiguration(kO)) { + const g = a.getValue(kO); + h = { + ...h, + mouseWheelScrollSensitivity: g + }; + } + if (d.affectsConfiguration(EO)) { + const g = a.getValue(EO); + h = { + ...h, + fastScrollSensitivity: g + }; + } + if (Object.keys(h).length > 0) { + e.updateOptions(h); + } + }), this.contextKeyService.onDidChangeContext(d => { + if (d.affectsSome(u)) { + e.updateOptions({ + typeNavigationMode: s() + }); + } + })); + this.p = new npr(e, { + configurationService: a, + ...t + }); + this.o.push(this.p); + } + get useAltAsMultipleSelectionModifier() { + return this.n; + } + updateOptions(e) { + if (e.multipleSelectionSupport !== undefined) { + this.a.set(!!e.multipleSelectionSupport); + } + } + updateStyleOverrides(e) { + this.q.style(e ? VM(e) : Lz); + } + dispose() { + this.o = si(this.o); + } +}; +EG = __decorate([__param(4, Ne), __param(5, br), __param(6, ve)], EG); +var opr = Pe.as(rr.Configuration); +opr.registerConfiguration({ + id: "workbench", + order: 7, + title: f(1969, null), + type: "object", + properties: { + [xG]: { + type: "string", + enum: ["ctrlCmd", "alt"], + markdownEnumDescriptions: [f(1970, null), f(1971, null)], + default: "ctrlCmd", + description: f(1972, null) + }, + [lmt]: { + type: "string", + enum: ["singleClick", "doubleClick"], + default: "singleClick", + description: f(1973, null) + }, + [uP]: { + type: "boolean", + default: false, + description: f(1974, null) + }, + [RA]: { + type: "boolean", + default: false, + description: f(1975, null) + }, + [v0e]: { + type: "number", + default: 8, + minimum: 4, + maximum: 40, + description: f(1976, null) + }, + [umt]: { + type: "string", + enum: ["none", "onHover", "always"], + default: "onHover", + description: f(1977, null) + }, + [NA]: { + type: "boolean", + default: false, + description: f(1978, null) + }, + [kO]: { + type: "number", + default: 1, + markdownDescription: f(1979, null) + }, + [EO]: { + type: "number", + default: 5, + markdownDescription: f(1980, null) + }, + [jQt]: { + type: "string", + enum: ["highlight", "filter"], + enumDescriptions: [f(1981, null), f(1982, null)], + default: "highlight", + description: f(1983, null) + }, + [cmt]: { + type: "string", + enum: ["simple", "highlight", "filter"], + enumDescriptions: [f(1984, null), f(1985, null), f(1986, null)], + default: "highlight", + description: f(1987, null), + deprecated: true, + deprecationMessage: f(1988, null) + }, + [JQt]: { + type: "string", + enum: ["fuzzy", "contiguous"], + enumDescriptions: [f(1989, null), f(1990, null)], + default: "fuzzy", + description: f(1991, null) + }, + [dmt]: { + type: "string", + enum: ["singleClick", "doubleClick"], + default: "singleClick", + description: f(1992, null) + }, + [hmt]: { + type: "boolean", + default: true, + description: f(1993, null) + }, + [fmt]: { + type: "number", + minimum: 1, + default: 7, + markdownDescription: f(1994, null, "`#workbench.tree.enableStickyScroll#`") + }, + [zQt]: { + type: "string", + enum: ["automatic", "trigger"], + default: "automatic", + markdownDescription: f(1995, null) + } + } +}); +Wi(); +qt(); +xe(); +Zo(); +pe(); +q(); +At(); +Et(); +yt(); +Ya(); +gf(); +Ms(); +xe(); +xe(); +$i(); +q(); +aS(); +var AR = class extends H { + constructor(i, e, t) { + super(); + this.h = e; + this.j = t; + this.b = 0; + this.g = this.D(new ki()); + this.a = z(i, G(".monaco-count-badge")); + this.D(Ue(() => i.removeChild(this.a))); + this.c = this.h.countFormat || "{0}"; + this.f = this.h.titleFormat || ""; + this.setCount(this.h.count || 0); + this.m(); + } + setCount(i) { + this.b = i; + this.n(); + } + setCountFormat(i) { + this.c = i; + this.n(); + } + setTitleFormat(i) { + this.f = i; + this.m(); + this.n(); + } + m() { + if (this.f !== "" && !this.g.value) { + this.g.value = d1().setupDelayedHoverAtMouse(this.a, () => ({ + content: Fv(this.f, this.b), + appearance: { + compact: true + } + })); + } else if (this.f === "" && this.g.value) { + this.g.value = undefined; + } + } + n() { + this.a.textContent = Fv(this.c, this.b); + this.a.style.backgroundColor = this.j.badgeBackground ?? ""; + this.a.style.color = this.j.badgeForeground ?? ""; + if (this.j.badgeBorder) { + this.a.style.border = `1px solid ${this.j.badgeBorder}`; + } + } +}; +xe(); +aS(); +oa(); +vd(); +q(); +Jr(); +var Jh = class g_n extends H { + constructor(e, t) { + super(); + this.m = t; + this.b = ""; + this.c = ""; + this.f = []; + this.h = false; + this.g = t?.supportIcons ?? false; + this.a = z(e, G("span.monaco-highlighted-label")); + } + get element() { + return this.a; + } + set(e, t = [], s = "", n) { + e ||= ""; + if (n) { + e = g_n.escapeNewLines(e, t); + } + if (!this.h || this.b !== e || this.c !== s || !Ul(this.f, t)) { + this.b = e; + this.c = s; + this.f = t; + this.n(); + } + } + n() { + const e = []; + let t = 0; + for (const s of this.f) { + if (s.end === s.start) { + continue; + } + if (t < s.start) { + const o = this.b.substring(t, s.start); + if (this.g) { + e.push(...Vu(o)); + } else { + e.push(o); + } + t = s.start; + } + const n = this.b.substring(t, s.end); + const r = G("span.highlight", undefined, ...(this.g ? Vu(n) : [n])); + if (s.extraClasses) { + r.classList.add(...s.extraClasses); + } + e.push(r); + t = s.end; + } + if (t < this.b.length) { + const s = this.b.substring(t); + if (this.g) { + e.push(...Vu(s)); + } else { + e.push(s); + } + } + mo(this.a, ...e); + if (this.m?.hoverDelegate?.showNativeHover) { + this.a.title = this.c; + } else if (!this.j && this.c !== "") { + const s = this.m?.hoverDelegate ?? cr("mouse"); + this.j = this.D(d1().setupManagedHover(s, this.a, this.c)); + } else if (this.j) { + this.j.update(this.c); + } + this.h = true; + } + static escapeNewLines(e, t) { + let s = 0; + let n = 0; + return e.replace(/\r\n|\r|\n/g, (r, o) => { + n = r === `\r +` ? -1 : 0; + o += s; + for (const a of t) { + if (!(a.end <= o)) { + if (a.start >= o) { + a.start += n; + } + if (a.end >= o) { + a.end += n; + } + } + } + s += n; + return "⏎"; + }); + } +}; +xe(); +wb(); +q(); +Jr(); +dct(); +oa(); +aS(); +zt(); +Q0(); +var S0e = class { + constructor(i) { + this.e = i; + } + get element() { + return this.e; + } + set textContent(i) { + if (!this.a && i !== this.b) { + this.b = i; + this.e.textContent = i; + } + } + set classNames(i) { + if (!this.a && !Ul(i, this.c)) { + this.c = i; + this.e.classList.value = ""; + this.e.classList.add(...i); + } + } + set empty(i) { + if (!this.a && i !== this.d) { + this.d = i; + this.e.style.marginLeft = i ? "0" : ""; + } + } + dispose() { + this.a = true; + } +}; +var xS = class extends H { + constructor(i, e) { + super(); + this.q = new Map(); + this.a = e; + this.b = this.D(new S0e(z(i, G(".monaco-icon-label")))); + this.j = z(this.b.element, G(".monaco-icon-label-container")); + this.c = z(this.j, G("span.monaco-icon-name-container")); + if (e?.supportHighlights || e?.supportIcons) { + this.f = this.D(new cpr(this.c, !!e.supportIcons)); + } else { + this.f = new apr(this.c); + } + this.n = e?.hoverDelegate ?? cr("mouse"); + } + get element() { + return this.b.element; + } + setLabel(i, e, t) { + const s = ["monaco-icon-label"]; + const n = ["monaco-icon-label-container"]; + let r = ""; + if (t) { + if (t.extraClasses) { + s.push(...t.extraClasses); + } + if (t.italic) { + s.push("italic"); + } + if (t.strikethrough) { + s.push("strikethrough"); + } + if (t.disabledCommand) { + n.push("disabled"); + } + if (t.title) { + if (typeof t.title == "string") { + r += t.title; + } else { + r += i; + } + } + } + const o = this.b.element.querySelector(".monaco-icon-label-iconpath"); + if (t?.iconPath) { + let a; + if (!o || !Bl(o)) { + a = G(".monaco-icon-label-iconpath"); + this.b.element.prepend(a); + } else { + a = o; + } + a.style.backgroundImage = Ih(t?.iconPath); + } else if (o) { + o.remove(); + } + this.b.classNames = s; + this.b.element.setAttribute("aria-label", r); + this.j.classList.value = ""; + this.j.classList.add(...n); + this.r(t?.descriptionTitle ? this.j : this.element, t?.title); + this.f.setLabel(i, t); + if (e || this.g) { + const a = this.t(); + if (a instanceof Jh) { + a.set(e || "", t ? t.descriptionMatches : undefined, undefined, t?.labelEscapeNewLines); + this.r(a.element, t?.descriptionTitle); + } else { + a.textContent = e && t?.labelEscapeNewLines ? Jh.escapeNewLines(e, []) : e || ""; + this.r(a.element, t?.descriptionTitle || ""); + a.empty = !e; + } + } + if (t?.suffix || this.h) { + const a = this.s(); + a.textContent = t?.suffix ?? ""; + } + } + r(i, e) { + const t = this.q.get(i); + if (t) { + t.dispose(); + this.q.delete(i); + } + if (!e) { + i.removeAttribute("title"); + return; + } + let s = i; + if (this.a?.hoverTargetOverride) { + if (!Kd(i, this.a.hoverTargetOverride)) { + throw new Error("hoverTargetOverrride must be an ancestor of the htmlElement"); + } + s = this.a.hoverTargetOverride; + } + if (this.n.showNativeHover) { + let r = function (o, a) { + if (yi(a)) { + o.title = KI(a); + } else if (a?.markdownNotSupportedFallback) { + o.title = a.markdownNotSupportedFallback; + } else { + o.removeAttribute("title"); + } + }; + var n = r; + r(s, e); + } else { + const r = d1().setupManagedHover(this.n, s, e); + if (r) { + this.q.set(i, r); + } + } + } + dispose() { + super.dispose(); + for (const i of this.q.values()) { + i.dispose(); + } + this.q.clear(); + } + s() { + if (!this.h) { + const i = this.D(new S0e(EJi(this.c, G("span.monaco-icon-suffix-container")))); + this.h = this.D(new S0e(z(i.element, G("span.label-suffix")))); + } + return this.h; + } + t() { + if (!this.g) { + const i = this.D(new S0e(z(this.j, G("span.monaco-icon-description-container")))); + if (this.a?.supportDescriptionHighlights) { + this.g = this.D(new Jh(z(i.element, G("span.label-description")), { + supportIcons: !!this.a.supportIcons + })); + } else { + this.g = this.D(new S0e(z(i.element, G("span.label-description")))); + } + } + return this.g; + } +}; +var apr = class { + constructor(i) { + this.d = i; + this.a = undefined; + this.b = undefined; + } + setLabel(i, e) { + if (this.a !== i || !Ul(this.c, e)) { + this.a = i; + this.c = e; + if (typeof i == "string") { + if (!this.b) { + this.d.innerText = ""; + this.d.classList.remove("multiple"); + this.b = z(this.d, G("a.label-name", { + id: e?.domId + })); + } + this.b.textContent = i; + } else { + this.d.innerText = ""; + this.d.classList.add("multiple"); + this.b = undefined; + for (let t = 0; t < i.length; t++) { + const s = i[t]; + const n = e?.domId && `${e?.domId}_${t}`; + z(this.d, G("a.label-name", { + id: n, + "data-icon-label-count": i.length, + "data-icon-label-index": t, + role: "treeitem" + }, s)); + if (t < i.length - 1) { + z(this.d, G("span.label-separator", undefined, e?.separator || "/")); + } + } + } + } + } +}; +function lpr(i, e, t) { + if (!t) { + return; + } + let s = 0; + return i.map(n => { + const r = { + start: s, + end: s + n.length + }; + const o = t.map(a => X0.intersect(r, a)).filter(a => !X0.isEmpty(a)).map(({ + start: a, + end: l + }) => ({ + start: a - s, + end: l - s + })); + s = r.end + e.length; + return o; + }); +} +var cpr = class extends H { + constructor(i, e) { + super(); + this.f = i; + this.g = e; + this.a = undefined; + this.b = undefined; + } + setLabel(i, e) { + if (this.a !== i || !Ul(this.c, e)) { + this.a = i; + this.c = e; + if (typeof i == "string") { + if (!this.b) { + this.f.innerText = ""; + this.f.classList.remove("multiple"); + this.b = this.D(new Jh(z(this.f, G("a.label-name", { + id: e?.domId + })), { + supportIcons: this.g + })); + } + this.b.set(i, e?.matches, undefined, e?.labelEscapeNewLines); + } else { + this.f.innerText = ""; + this.f.classList.add("multiple"); + this.b = undefined; + const t = e?.separator || "/"; + const s = lpr(i, t, e?.matches); + for (let n = 0; n < i.length; n++) { + const r = i[n]; + const o = s ? s[n] : undefined; + const a = e?.domId && `${e?.domId}_${n}`; + const l = G("a.label-name", { + id: a, + "data-icon-label-count": i.length, + "data-icon-label-index": n, + role: "treeitem" + }); + this.D(new Jh(z(this.f, l), { + supportIcons: this.g + })).set(r, o, undefined, e?.labelEscapeNewLines); + if (n < i.length - 1) { + z(l, G("span.label-separator", undefined, t)); + } + } + } + } + } +}; +Pc(); +q(); +Et(); +Ms(); +X(); +te(); +Fi(); +jn(); +ya(); +var YQt; +var XQt = class { + constructor(e) { + this.a = e; + } + hasChildren(e) { + return e instanceof xE || e instanceof n0e; + } + getChildren(e) { + if (e instanceof xE) { + return e.groups; + } + if (e instanceof n0e) { + return e.resolve(this.a).then(t => t.children); + } + throw new Error("bad tree"); + } +}; +XQt = __decorate([__param(0, ns)], XQt); +var upr = class { + getHeight() { + return 23; + } + getTemplateId(i) { + if (i instanceof n0e) { + return pmt.id; + } else { + return a6s.id; + } + } +}; +var QQt = class { + constructor(e) { + this.a = e; + } + getKeyboardNavigationLabel(e) { + if (e instanceof HU) { + const t = e.parent.getPreview(e)?.preview(e.range); + if (t) { + return t.value; + } + } + return ji(e.uri); + } + mightProducePrintableCharacter(e) { + return this.a.mightProducePrintableCharacter(e); + } +}; +QQt = __decorate([__param(0, oi)], QQt); +var dpr = class { + getId(i) { + if (i instanceof HU) { + return i.id; + } else { + return i.uri; + } + } +}; +var ZQt = class extends H { + constructor(e, t) { + super(); + this.a = t; + const s = document.createElement("div"); + s.classList.add("reference-file"); + this.file = this.D(new xS(s, { + supportHighlights: true + })); + this.badge = this.D(new AR(z(s, G(".count")), {}, sR)); + e.appendChild(s); + } + set(e, t) { + const s = Ir(e.uri); + this.file.setLabel(this.a.getUriBasenameLabel(e.uri), this.a.getUriLabel(s, { + relative: true + }), { + title: this.a.getUriLabel(e.uri), + matches: t + }); + const n = e.children.length; + this.badge.setCount(n); + if (n > 1) { + this.badge.setTitleFormat(f(1160, null, n)); + } else { + this.badge.setTitleFormat(f(1161, null, n)); + } + } +}; +ZQt = __decorate([__param(1, Zs)], ZQt); +var pmt = class { + static { + YQt = this; + } + static { + this.id = "FileReferencesRenderer"; + } + constructor(e) { + this.a = e; + this.templateId = YQt.id; + } + renderTemplate(e) { + return this.a.createInstance(ZQt, e); + } + renderElement(e, t, s) { + s.set(e.element, sf(e.filterData)); + } + disposeTemplate(e) { + e.dispose(); + } +}; +pmt = YQt = __decorate([__param(0, re)], pmt); +var hpr = class extends H { + constructor(i) { + super(); + this.label = this.D(new Jh(i)); + } + set(i, e) { + const t = i.parent.getPreview(i)?.preview(i.range); + if (!t || !t.value) { + this.label.set(`${ji(i.uri)}:${i.range.startLineNumber + 1}:${i.range.startColumn + 1}`); + } else { + const { + value: s, + highlight: n + } = t; + if (e && !Nx.isDefault(e)) { + this.label.element.classList.toggle("referenceMatch", false); + this.label.set(s, sf(e)); + } else { + this.label.element.classList.toggle("referenceMatch", true); + this.label.set(s, [n]); + } + } + } +}; +var a6s = class p_n { + constructor() { + this.templateId = p_n.id; + } + static { + this.id = "OneReferenceRenderer"; + } + renderTemplate(e) { + return new hpr(e); + } + renderElement(e, t, s) { + s.set(e.element, e.filterData); + } + disposeTemplate(e) { + e.dispose(); + } +}; +var fpr = class { + getWidgetAriaLabel() { + return f(1162, null); + } + getAriaLabel(i) { + return i.ariaMessage; + } +}; +X(); +te(); +Fi(); +jn(); +gi(); +Qv(); +ri(); +qy(); +Qv(); +X(); +qy(); +pe(); +q(); +kF(); +var l6s; +(function (i) { + i[i.provider = 0] = "provider"; + i[i.userDefined = 1] = "userDefined"; + i[i.recovered = 2] = "recovered"; +})(l6s ||= {}); +var gpr = { + 0: " ", + 1: "u", + 2: "r" +}; +var c6s = 65535; +var MA = 16777215; +var u6s = 4278190080; +var eZt = class { + constructor(i) { + const e = Math.ceil(i / 32); + this.a = new Uint32Array(e); + } + get(i) { + const e = i / 32 | 0; + const t = i % 32; + return (this.a[e] & 1 << t) !== 0; + } + set(i, e) { + const t = i / 32 | 0; + const s = i % 32; + const n = this.a[t]; + if (e) { + this.a[t] = n | 1 << s; + } else { + this.a[t] = n & ~(1 << s); + } + } +}; +var dP = class m_n { + constructor(e, t, s) { + if (e.length !== t.length || e.length > c6s) { + throw new Error("invalid startIndexes or endIndexes size"); + } + this.a = e; + this.b = t; + this.c = new eZt(e.length); + this.d = new eZt(e.length); + this.e = new eZt(e.length); + this.g = s; + this.f = false; + } + h() { + if (!this.f) { + this.f = true; + const e = []; + const t = (s, n) => { + const r = e[e.length - 1]; + return this.getStartLineNumber(r) <= s && this.getEndLineNumber(r) >= n; + }; + for (let s = 0, n = this.a.length; s < n; s++) { + const r = this.a[s]; + const o = this.b[s]; + if (r > MA || o > MA) { + throw new Error("startLineNumber or endLineNumber must not exceed " + MA); + } + while (e.length > 0 && !t(r, o)) { + e.pop(); + } + const a = e.length > 0 ? e[e.length - 1] : -1; + e.push(s); + this.a[s] = r + ((a & 255) << 24); + this.b[s] = o + ((a & 65280) << 16); + } + } + } + get length() { + return this.a.length; + } + getStartLineNumber(e) { + return this.a[e] & MA; + } + getEndLineNumber(e) { + return this.b[e] & MA; + } + getType(e) { + if (this.g) { + return this.g[e]; + } else { + return undefined; + } + } + hasTypes() { + return !!this.g; + } + isCollapsed(e) { + return this.c.get(e); + } + setCollapsed(e, t) { + this.c.set(e, t); + } + j(e) { + return this.d.get(e); + } + k(e, t) { + return this.d.set(e, t); + } + l(e) { + return this.e.get(e); + } + m(e, t) { + return this.e.set(e, t); + } + getSource(e) { + if (this.j(e)) { + return 1; + } else if (this.l(e)) { + return 2; + } else { + return 0; + } + } + setSource(e, t) { + if (t === 1) { + this.k(e, true); + this.m(e, false); + } else if (t === 2) { + this.k(e, false); + this.m(e, true); + } else { + this.k(e, false); + this.m(e, false); + } + } + setCollapsedAllOfType(e, t) { + let s = false; + if (this.g) { + for (let n = 0; n < this.g.length; n++) { + if (this.g[n] === e) { + this.setCollapsed(n, t); + s = true; + } + } + } + return s; + } + toRegion(e) { + return new ppr(this, e); + } + getParentIndex(e) { + this.h(); + const t = ((this.a[e] & u6s) >>> 24) + ((this.b[e] & u6s) >>> 16); + if (t === c6s) { + return -1; + } else { + return t; + } + } + contains(e, t) { + return this.getStartLineNumber(e) <= t && this.getEndLineNumber(e) >= t; + } + n(e) { + let t = 0; + let s = this.a.length; + if (s === 0) { + return -1; + } + while (t < s) { + const n = Math.floor((t + s) / 2); + if (e < this.getStartLineNumber(n)) { + s = n; + } else { + t = n + 1; + } + } + return t - 1; + } + findRange(e) { + let t = this.n(e); + if (t >= 0) { + if (this.getEndLineNumber(t) >= e) { + return t; + } + for (t = this.getParentIndex(t); t !== -1;) { + if (this.contains(t, e)) { + return t; + } + t = this.getParentIndex(t); + } + } + return -1; + } + toString() { + const e = []; + for (let t = 0; t < this.length; t++) { + e[t] = `[${gpr[this.getSource(t)]}${this.isCollapsed(t) ? "+" : "-"}] ${this.getStartLineNumber(t)}/${this.getEndLineNumber(t)}`; + } + return e.join(", "); + } + toFoldRange(e) { + return { + startLineNumber: this.a[e] & MA, + endLineNumber: this.b[e] & MA, + type: this.g ? this.g[e] : undefined, + isCollapsed: this.isCollapsed(e), + source: this.getSource(e) + }; + } + static fromFoldRanges(e) { + const t = e.length; + const s = new Uint32Array(t); + const n = new Uint32Array(t); + let r = []; + let o = false; + for (let l = 0; l < t; l++) { + const c = e[l]; + s[l] = c.startLineNumber; + n[l] = c.endLineNumber; + r.push(c.type); + if (c.type) { + o = true; + } + } + if (!o) { + r = undefined; + } + const a = new m_n(s, n, r); + for (let l = 0; l < t; l++) { + if (e[l].isCollapsed) { + a.setCollapsed(l, true); + } + a.setSource(l, e[l].source); + } + return a; + } + static sanitizeAndMerge(e, t, s, n) { + s = s ?? Number.MAX_VALUE; + const r = (v, y) => Array.isArray(v) ? w => w < y ? v[w] : undefined : w => w < y ? v.toFoldRange(w) : undefined; + const o = r(e, e.length); + const a = r(t, t.length); + let l = 0; + let c = 0; + let u = o(0); + let d = a(0); + const h = []; + let g; + let p = 0; + const b = []; + while (u || d) { + let v; + if (d && (!u || u.startLineNumber >= d.startLineNumber)) { + if (u && u.startLineNumber === d.startLineNumber) { + if (d.source === 1) { + v = d; + } else { + v = u; + v.isCollapsed = d.isCollapsed && (u.endLineNumber === d.endLineNumber || !n?.startsInside(u.startLineNumber + 1, u.endLineNumber + 1)); + v.source = 0; + } + u = o(++l); + } else { + v = d; + if (d.isCollapsed && d.source === 0) { + v.source = 2; + } + } + d = a(++c); + } else { + let y = c; + let w = d; + while (true) { + if (!w || w.startLineNumber > u.endLineNumber) { + v = u; + break; + } + if (w.source === 1 && w.endLineNumber > u.endLineNumber) { + break; + } + w = a(++y); + } + u = o(++l); + } + if (v) { + while (g && g.endLineNumber < v.startLineNumber) { + g = h.pop(); + } + if (v.endLineNumber > v.startLineNumber && v.startLineNumber > p && v.endLineNumber <= s && (!g || g.endLineNumber >= v.endLineNumber)) { + b.push(v); + p = v.startLineNumber; + if (g) { + h.push(g); + } + g = v; + } + } + } + return b; + } +}; +var ppr = class { + constructor(i, e) { + this.a = i; + this.b = e; + } + get startLineNumber() { + return this.a.getStartLineNumber(this.b); + } + get endLineNumber() { + return this.a.getEndLineNumber(this.b); + } + get regionIndex() { + return this.b; + } + get parentIndex() { + return this.a.getParentIndex(this.b); + } + get isCollapsed() { + return this.a.isCollapsed(this.b); + } + containedBy(i) { + return i.startLineNumber <= this.startLineNumber && i.endLineNumber >= this.endLineNumber; + } + containsLine(i) { + return this.startLineNumber <= i && i <= this.endLineNumber; + } + hidesLine(i) { + return this.startLineNumber < i && i <= this.endLineNumber; + } +}; +Ut(); +q(); +var mpr = {}; +var bpr = "syntax"; +var zne = class { + constructor(i, e, t, s, n) { + this.a = i; + this.b = e; + this.handleFoldingRangesChange = t; + this.c = s; + this.d = n; + this.id = bpr; + this.disposables = new Q(); + if (n) { + this.disposables.add(n); + } + for (const r of e) { + if (typeof r.onDidChange == "function") { + this.disposables.add(r.onDidChange(t)); + } + } + } + compute(i) { + return vpr(this.b, this.a, i).then(e => e ? d6s(e, this.c) : this.d?.compute(i) ?? null); + } + dispose() { + this.disposables.dispose(); + } +}; +function vpr(i, e, t) { + let s = null; + const n = i.map((r, o) => Promise.resolve(r.provideFoldingRanges(e, mpr, t)).then(a => { + if (!t.isCancellationRequested && Array.isArray(a)) { + if (!Array.isArray(s)) { + s = []; + } + const l = e.getLineCount(); + for (const c of a) { + if (c.start > 0 && c.end > c.start && c.end <= l) { + s.push({ + start: c.start, + end: c.end, + rank: o, + kind: c.kind + }); + } + } + } + }, uh)); + return Promise.all(n).then(r => s); +} +var ypr = class { + constructor(i) { + this.a = []; + this.b = []; + this.c = []; + this.d = []; + this.e = []; + this.f = 0; + this.g = i; + } + add(i, e, t, s) { + if (i > MA || e > MA) { + return; + } + const n = this.f; + this.a[n] = i; + this.b[n] = e; + this.c[n] = s; + this.e[n] = t; + this.f++; + if (s < 30) { + this.d[s] = (this.d[s] || 0) + 1; + } + } + toIndentRanges() { + const i = this.g.limit; + if (this.f <= i) { + this.g.update(this.f, false); + const e = new Uint32Array(this.f); + const t = new Uint32Array(this.f); + for (let s = 0; s < this.f; s++) { + e[s] = this.a[s]; + t[s] = this.b[s]; + } + return new dP(e, t, this.e); + } else { + this.g.update(this.f, i); + let e = 0; + let t = this.d.length; + for (let o = 0; o < this.d.length; o++) { + const a = this.d[o]; + if (a) { + if (a + e > i) { + t = o; + break; + } + e += a; + } + } + const s = new Uint32Array(i); + const n = new Uint32Array(i); + const r = []; + for (let o = 0, a = 0; o < this.f; o++) { + const l = this.c[o]; + if (l < t || l === t && e++ < i) { + s[a] = this.a[o]; + n[a] = this.b[o]; + r[a] = this.e[o]; + a++; + } + } + return new dP(s, n, r); + } + } +}; +function d6s(i, e) { + const t = i.sort((o, a) => { + let l = o.start - a.start; + if (l === 0) { + l = o.rank - a.rank; + } + return l; + }); + const s = new ypr(e); + let n; + const r = []; + for (const o of t) { + if (!n) { + n = o; + s.add(o.start, o.end, o.kind && o.kind.value, r.length); + } else if (o.start > n.start) { + if (o.end <= n.end) { + r.push(n); + n = o; + s.add(o.start, o.end, o.kind && o.kind.value, r.length); + } else { + if (o.start > n.end) { + do { + n = r.pop(); + } while (n && o.start > n.end); + if (n) { + r.push(n); + } + n = o; + } + s.add(o.start, o.end, o.kind && o.kind.value, r.length); + } + } + } + return s.toIndentRanges(); +} +Mr(); +cA(); +var wpr = { + limit: 5000, + update: () => {} +}; +var Cpr = class { + get regions() { + return this.c; + } + constructor() { + this.a = null; + this.b = new Q(); + this.d = new B(); + this.onDidFoldingRegionChanged = this.d.event; + this.e = []; + this.c = new dP(new Uint32Array(0), new Uint32Array(0)); + } + dispose() { + this.d.dispose(); + this.b.dispose(); + } + detachViewModel() { + this.b.clear(); + this.a = null; + } + attachViewModel(i) { + this.a = i; + this.b.add(this.a.onDidChangeViewCells(() => { + this.recompute(); + })); + this.b.add(this.a.onDidChangeSelection(() => { + if (!this.a) { + return; + } + const e = pE(this.a.getSelections()); + let t = false; + e.forEach(s => { + let n = this.regions.findRange(s + 1); + while (n !== -1) { + if (this.c.isCollapsed(n) && s > this.c.getStartLineNumber(n) - 1) { + this.c.setCollapsed(n, false); + t = true; + } + n = this.c.getParentIndex(n); + } + }); + if (t) { + this.d.fire(); + } + })); + this.recompute(); + } + getRegionAtLine(i) { + if (this.c) { + const e = this.c.findRange(i); + if (e >= 0) { + return this.c.toRegion(e); + } + } + return null; + } + getRegionsInside(i, e) { + const t = []; + const s = i ? i.regionIndex + 1 : 0; + const n = i ? i.endLineNumber : Number.MAX_VALUE; + if (e && e.length === 2) { + const r = []; + for (let o = s, a = this.c.length; o < a; o++) { + const l = this.c.toRegion(o); + if (this.c.getStartLineNumber(o) < n) { + while (r.length > 0 && !l.containedBy(r[r.length - 1])) { + r.pop(); + } + r.push(l); + if (e(l, r.length)) { + t.push(l); + } + } else { + break; + } + } + } else { + for (let r = s, o = this.c.length; r < o; r++) { + const a = this.c.toRegion(r); + if (this.c.getStartLineNumber(r) < n) { + if (!e || e(a)) { + t.push(a); + } + } else { + break; + } + } + } + return t; + } + getAllRegionsAtLine(i, e) { + const t = []; + if (this.c) { + let s = this.c.findRange(i); + let n = 1; + while (s >= 0) { + const r = this.c.toRegion(s); + if (!e || e(r, n)) { + t.push(r); + } + n++; + s = r.parentIndex; + } + } + return t; + } + setCollapsed(i, e) { + this.c.setCollapsed(i, e); + } + recompute() { + if (!this.a) { + return; + } + const i = this.a; + const e = i.viewCells; + const t = []; + for (let u = 0; u < e.length; u++) { + const d = e[u]; + if (d.cellKind !== qn.Markup || d.language !== "markdown") { + continue; + } + const h = Math.min(7, ...Array.from(h6s(d.getText()), g => g.depth)); + if (h < 7) { + t.push({ + index: u, + level: h, + endIndex: 0 + }); + } + } + const s = t.map((u, d) => { + let h; + for (let p = d + 1; p < t.length; ++p) { + if (t[p].level <= u.level) { + h = t[p].index - 1; + break; + } + } + const g = h !== undefined ? h : e.length - 1; + return { + start: u.index + 1, + end: g + 1, + rank: 1 + }; + }).filter(u => u.start !== u.end); + const n = d6s(s, wpr); + let r = 0; + const o = () => { + while (r < this.c.length) { + const u = this.c.isCollapsed(r); + r++; + if (u) { + return r - 1; + } + } + return -1; + }; + let a = 0; + let l = o(); + while (l !== -1 && a < n.length) { + const u = i.getTrackedRange(this.e[l]); + if (u) { + const d = u.start; + while (a < n.length) { + const h = n.getStartLineNumber(a) - 1; + if (d >= h) { + n.setCollapsed(a, d === h); + a++; + } else { + break; + } + } + } + l = o(); + } + while (a < n.length) { + n.setCollapsed(a, false); + a++; + } + const c = []; + for (let u = 0; u < n.length; u++) { + const d = n.toRegion(u); + c.push({ + start: d.startLineNumber - 1, + end: d.endLineNumber - 1 + }); + } + this.e.forEach(u => i.setTrackedRange(u, null, 3)); + this.e = c.map(u => i.setTrackedRange(null, u, 3)).filter(u => u !== null); + this.c = n; + this.d.fire(); + } + getMemento() { + const i = []; + let e = 0; + while (e < this.c.length) { + if (this.c.isCollapsed(e)) { + const s = this.c.toRegion(e); + i.push({ + start: s.startLineNumber - 1, + end: s.endLineNumber - 1 + }); + } + e++; + } + return i; + } + applyMemento(i) { + if (!this.a) { + return false; + } + let e = 0; + let t = 0; + while (t < i.length && e < this.c.length) { + if (this.a.getTrackedRange(this.e[e])) { + const n = i[t].start; + while (e < this.c.length) { + const r = this.c.getStartLineNumber(e) - 1; + if (n >= r) { + this.c.setCollapsed(e, n === r); + e++; + } else { + break; + } + } + } + t++; + } + while (e < this.c.length) { + this.c.setCollapsed(e, false); + e++; + } + return true; + } +}; +function* h6s(i) { + for (const e of th.lexer(i, { + gfm: true + })) { + if (e.type === "heading") { + yield { + depth: e.depth, + text: Iz({ + value: e.raw + }).trim() + }; + } + } +} +He(); +Rt(); +wl(); +He(); +X(); +Br(); +var x0e = dt("notebook-kernel-select", A.serverEnvironment, f(8607, null)); +var Jne = dt("notebook-execute", A.play, f(8608, null)); +var Spr = dt("notebook-execute-above", A.runAbove, f(8609, null)); +var xpr = dt("notebook-execute-below", A.runBelow, f(8610, null)); +var tZt = dt("notebook-stop", A.primitiveSquare, f(8611, null)); +var kpr = dt("notebook-delete-cell", A.trash, f(8612, null)); +var Epr = dt("notebook-execute-all", A.runAll, f(8613, null)); +var Ipr = dt("notebook-edit", A.pencil, f(8614, null)); +var Dpr = dt("notebook-stop-edit", A.check, f(8615, null)); +var Tpr = dt("notebook-move-up", A.arrowUp, f(8616, null)); +var Ppr = dt("notebook-move-down", A.arrowDown, f(8617, null)); +var f6s = dt("notebook-clear", A.clearAll, f(8618, null)); +var Lpr = dt("notebook-split-cell", A.splitVertical, f(8619, null)); +var g6s = dt("notebook-state-success", A.check, f(8620, null)); +var iZt = dt("notebook-state-error", A.error, f(8621, null)); +var p6s = dt("notebook-state-pending", A.clock, f(8622, null)); +var AA = dt("notebook-state-executing", A.sync, f(8623, null)); +var m6s = dt("notebook-collapsed", A.chevronRight, f(8624, null)); +var b6s = dt("notebook-expanded", A.chevronDown, f(8625, null)); +var Rpr = dt("notebook-open-as-text", A.fileCode, f(8626, null)); +var IG = dt("notebook-revert", A.discard, f(8627, null)); +var Npr = dt("notebook-diff-cell-toggle-whitespace", A.whitespace, f(8628, null)); +var Mpr = dt("notebook-render-output", A.preview, f(8629, null)); +var v6s = dt("notebook-mimetype", A.code, f(8630, null)); +var y6s = dt("notebook-copy", A.copy, f(8631, null)); +var Apr = dt("notebook-diff-editor-previous-change", A.arrowUp, f(8632, null)); +var $pr = dt("notebook-diff-editor-next-change", A.arrowDown, f(8633, null)); +var w6s = dt("variables-view-icon", A.variableGroup, f(8634, null)); +Mr(); +Eo(); +var mmt = class { + get icon() { + if (this.symbolKind) { + return tE.toIcon(this.symbolKind); + } else if (this.isExecuting && this.isPaused) { + return AA; + } else if (this.isExecuting) { + return le.modify(AA, "spin"); + } else if (this.cell.cellKind === qn.Markup) { + return A.markdown; + } else { + return A.code; + } + } + constructor(i, e, t, s, n, r, o, a) { + this.index = i; + this.level = e; + this.cell = t; + this.label = s; + this.isExecuting = n; + this.isPaused = r; + this.range = o; + this.symbolKind = a; + this.b = []; + } + addChild(i) { + this.b.push(i); + i.c = this; + } + get parent() { + return this.c; + } + get children() { + return this.b; + } + get markerInfo() { + return this.d; + } + get position() { + if (this.range) { + return { + startLineNumber: this.range.startLineNumber, + startColumn: this.range.startColumn + }; + } + } + updateMarkers(i) { + if (this.cell.cellKind === qn.Code) { + const e = i.read({ + resource: this.cell.uri, + severities: sn.Error | sn.Warning + }); + if (e.length === 0) { + this.d = undefined; + } else { + const t = e.find(s => s.severity === sn.Error)?.severity ?? sn.Warning; + this.d = { + topSev: t, + count: e.length + }; + } + } else { + let e; + for (const t of this.children) { + t.updateMarkers(i); + if (t.markerInfo) { + e = e ? Math.max(t.markerInfo.topSev, e) : t.markerInfo.topSev; + } + } + this.d = e && { + topSev: e, + count: 0 + }; + } + } + clearMarkers() { + this.d = undefined; + for (const i of this.children) { + i.clearMarkers(); + } + } + find(i, e) { + if (i.id === this.cell.id) { + return this; + } + e.push(this); + for (const t of this.children) { + const s = t.find(i, e); + if (s) { + return s; + } + } + e.pop(); + } + asFlatList(i) { + i.push(this); + for (const e of this.children) { + e.asFlatList(i); + } + } +}; +Mr(); +te(); +var kS; +(function (i) { + i[i.cell = 0] = "cell"; + i[i.notebook = 1] = "notebook"; +})(kS ||= {}); +var Ph = Ve("INotebookExecutionStateService"); +te(); +Ms(); +var C6s; +(function (i) { + i[i.NonHeaderOutlineLevel = 7] = "NonHeaderOutlineLevel"; +})(C6s ||= {}); +function Fpr(i) { + const e = Array.from(h6s(i)); + if (e.length) { + return e; + } + const t = i.match(/(.*)<\/h\1>/i); + if (t) { + const s = parseInt(t[1]); + const n = t[2].trim(); + e.push({ + depth: s, + text: n + }); + } + return e; +} +var S6s = Ve("INotebookOutlineEntryFactory"); +var sZt = class { + constructor(e, t, s) { + this.c = e; + this.d = t; + this.e = s; + this.a = {}; + this.b = new WeakMap(); + } + getOutlineEntries(e, t) { + const s = []; + const n = e.cellKind === qn.Markup; + let r = Opr(e); + let o = false; + if (n) { + const a = e.getText().substring(0, 10000); + const l = this.b.get(e); + const c = l?.alternativeId === e.getAlternativeId() ? l.headers : Array.from(Fpr(a)); + this.b.set(e, { + alternativeId: e.getAlternativeId(), + headers: c + }); + for (const { + depth: u, + text: d + } of c) { + o = true; + s.push(new mmt(t++, u, e, d, false, false)); + } + if (!o) { + r = Iz({ + value: r + }); + } + } + if (!o) { + const a = !n && this.c.getCellExecution(e.uri); + let l = r.trim(); + if (!n) { + const c = this.a[e.id]; + if (c) { + s.push(new mmt(t++, 7, e, l, !!a, a ? a.isPaused : false)); + c.forEach(u => { + s.push(new mmt(t++, u.level, e, u.name, false, false, u.range, u.kind)); + }); + } + } + if (s.length === 0) { + if (l.length === 0) { + l = f(8673, null); + } + s.push(new mmt(t++, 7, e, l, !!a, a ? a.isPaused : false)); + } + } + return s; + } + async cacheSymbols(e, t) { + if (e.cellKind === qn.Markup) { + return; + } + const s = await this.e.createModelReference(e.uri); + try { + const n = s.object.textEditorModel; + const r = await this.d.getOrCreate(n, t); + const o = nZt(r.getTopLevelSymbols(), 8); + this.a[e.id] = o; + } finally { + s.dispose(); + } + } +}; +sZt = __decorate([__param(0, Ph), __param(1, fS), __param(2, ns)], sZt); +function nZt(i, e) { + const t = []; + i.forEach(s => { + t.push({ + name: s.name, + range: s.range, + level: e, + kind: s.kind + }); + if (s.children) { + t.push(...nZt(s.children, e + 1)); + } + }); + return t; +} +function Opr(i) { + const e = i.textBuffer; + for (let t = 0; t < e.getLineCount(); t++) { + const s = e.getLineFirstNonWhitespaceColumn(t + 1); + const n = e.getLineLength(t + 1); + if (s < n) { + return e.getLineContent(t + 1); + } + } + return i.getText().substring(0, 100); +} +sl(); +Fs(); +Rt(); +He(); +av(); +Bf(); +wR(); +$l(); +var _pr = class b_n { + static { + this.a = Cr.register({ + description: "reference-decoration", + stickiness: 1, + className: "reference-decoration" + }); + } + constructor(e, t) { + this.g = e; + this.h = t; + this.b = new Map(); + this.c = new Set(); + this.d = new Q(); + this.f = new Q(); + this.d.add(this.g.onDidChangeModel(() => this.j())); + this.j(); + } + dispose() { + this.f.dispose(); + this.d.dispose(); + this.removeDecorations(); + } + j() { + this.f.clear(); + const e = this.g.getModel(); + if (e) { + for (const t of this.h.references) { + if (t.uri.toString() === e.uri.toString()) { + this.k(t.parent); + return; + } + } + } + } + k(e) { + if (!this.g.hasModel()) { + return; + } + this.f.add(this.g.getModel().onDidChangeDecorations(() => this.l())); + const t = []; + const s = []; + for (let n = 0, r = e.children.length; n < r; n++) { + const o = e.children[n]; + if (!this.c.has(o.id)) { + if (o.uri.toString() === this.g.getModel().uri.toString()) { + t.push({ + range: o.range, + options: b_n.a + }); + s.push(n); + } + } + } + this.g.changeDecorations(n => { + const r = n.deltaDecorations([], t); + for (let o = 0; o < r.length; o++) { + this.b.set(r[o], e.children[s[o]]); + } + }); + } + l() { + const e = []; + const t = this.g.getModel(); + if (t) { + for (const [s, n] of this.b) { + const r = t.getDecorationRange(s); + if (!r) { + continue; + } + let o = false; + if (!Z.equalsRange(r, n.range)) { + if (Z.spansMultipleLines(r)) { + o = true; + } else { + const a = n.range.endColumn - n.range.startColumn; + const l = r.endColumn - r.startColumn; + if (a !== l) { + o = true; + } + } + if (o) { + this.c.add(n.id); + e.push(s); + } else { + n.range = r; + } + } + } + for (let s = 0, n = e.length; s < n; s++) { + this.b.delete(e[s]); + } + this.g.removeDecorations(e); + } + } + removeDecorations() { + this.g.removeDecorations([...this.b.keys()]); + this.b.clear(); + } +}; +var Bpr = class { + constructor() { + this.ratio = 0.7; + this.heightInLines = 18; + } + static fromJSON(i) { + let e; + let t; + try { + const s = JSON.parse(i); + e = s.ratio; + t = s.heightInLines; + } catch {} + return { + ratio: e || 0.7, + heightInLines: t || 18 + }; + } +}; +var Upr = class extends fC {}; +var rZt = class extends W5 { + constructor(e, t, s, n, r, o, a, l, c, u, d, h, g) { + super(e, { + showFrame: false, + showArrow: true, + isResizeable: true, + isAccessible: true, + supportOnTitleClick: true + }, o); + this.kb = t; + this.layoutData = s; + this.lb = r; + this.mb = o; + this.nb = a; + this.ob = l; + this.pb = c; + this.qb = u; + this.rb = d; + this.sb = h; + this.tb = g; + this.c = new Q(); + this.d = new Q(); + this.m = new B(); + this.onDidSelectReference = this.m.event; + this.ib = new Ln(0, 0); + this.jb = false; + this.ub(n.getColorTheme()); + this.d.add(n.onDidColorThemeChange(this.ub.bind(this))); + this.nb.addExclusiveWidget(e, this); + this.create(); + } + get isClosing() { + return this.jb; + } + dispose() { + this.jb = true; + this.setModel(undefined); + this.d.dispose(); + this.c.dispose(); + si(this.db); + si(this.fb); + si(this.r); + si(this.eb); + this.cb.dispose(); + super.dispose(); + } + ub(e) { + const t = e.getColor(wO) || ut.transparent; + this.style({ + arrowColor: t, + frameColor: t, + headerBackgroundColor: e.getColor(mG) || ut.transparent, + primaryHeadingColor: e.getColor(bG), + secondaryHeadingColor: e.getColor(vG) + }); + } + show(e) { + super.show(e, this.layoutData.heightInLines || 18); + } + focusOnReferenceTree() { + this.r.domFocus(); + } + focusOnPreviewEditor() { + this.db.focus(); + } + isPreviewEditorFocused() { + return this.db.hasTextFocus(); + } + getPreviewEditor() { + return this.db; + } + W(e) { + if (this.db && this.db.getModel()) { + this.m.fire({ + element: this.Cb(), + kind: e.ctrlKey || e.metaKey || e.altKey ? "side" : "open", + source: "title" + }); + } + } + T(e, t) { + this.s = G(".peekview-title"); + if (this.options.supportOnTitleClick) { + this.s.classList.add("clickable"); + ko(this.s, "click", o => this.W(o)); + } + z(this.p, this.s); + this.U(this.s); + this.L = G("span.filename"); + this.M = G("span.dirname"); + this.N = G("span.meta"); + z(this.s, this.L, this.M, this.N); + const s = G(".peekview-actions"); + z(this.p, s); + const n = this.V(); + this.O = new ea(s, n); + this.q.add(this.O); + const r = new Yt("peekview.composer", f(1163, null), `peekview-composer-button ${le.asClassName(A.symbolMethod)}`, true, () => { + this.xb(); + }); + if (this.O) { + this.O.push(r, { + label: false, + icon: true, + index: 0 + }); + if (!t) { + this.O.push(new Yt("peekview.close", f(1164, null), le.asClassName(A.close), true, () => { + this.dispose(); + return Promise.resolve(); + }), { + label: false, + icon: true + }); + } + } + } + async xb() { + if (!this.a) { + return; + } + const e = Jm(); + for (const t of this.a.groups) { + const s = t.uri; + for (const n of t.children) { + let r; + r = await Cft(this.tb, this.sb, s, new Z({ + startLineNumber: n.range.startLineNumber - vse, + startColumn: 1, + endLineNumber: n.range.endLineNumber + vse + 1, + endColumn: 1 + })); + if (r) { + e.selections.push(r); + } + } + } + this.rb.createComposer({ + partialState: { + context: e, + hasChangedContext: true + }, + dontRefreshReactiveContext: true + }); + this.dispose(); + } + X(e) { + this.C("reference-zone-widget"); + this.hb = z(e, G("div.messages")); + Qo(this.hb); + this.cb = new Yx(e, { + orientation: 1 + }); + this.gb = z(e, G("div.preview.inline")); + const t = { + scrollBeyondLastLine: false, + scrollbar: { + verticalScrollbarSize: 14, + horizontal: "auto", + useShadows: true, + verticalHasArrows: false, + horizontalHasArrows: false, + alwaysConsumeMouseWheel: true + }, + overviewRulerLanes: 2, + fixedOverflowWidgets: true, + minimap: { + enabled: false + } + }; + this.db = this.mb.createInstance(Zy, this.gb, t, {}, this.editor); + Qo(this.gb); + this.fb = this.mb.createInstance(JI, f(1165, null), Ju, JI.DEFAULT_CREATION_OPTIONS, null); + this.bb = z(e, G("div.ref-tree.inline")); + const s = { + keyboardSupport: this.kb, + accessibilityProvider: new fpr(), + keyboardNavigationLabelProvider: this.mb.createInstance(QQt), + identityProvider: new dpr(), + openOnSingleClick: true, + selectionNavigation: true, + overrideStyles: { + listBackground: Gpt + } + }; + if (this.kb) { + this.d.add(ko(this.bb, "keydown", r => { + if (r.equals(9)) { + this.pb.dispatchEvent(r, r.target); + r.stopPropagation(); + } + }, true)); + } + this.r = this.mb.createInstance(Upr, "ReferencesWidget", this.bb, new upr(), [this.mb.createInstance(pmt), this.mb.createInstance(a6s)], this.mb.createInstance(XQt), s); + this.cb.addView({ + onDidChange: de.None, + element: this.gb, + minimumSize: 200, + maximumSize: Number.MAX_VALUE, + layout: r => { + this.db.layout({ + height: this.ib.height, + width: r + }); + } + }, Tg.Distribute); + this.cb.addView({ + onDidChange: de.None, + element: this.bb, + minimumSize: 100, + maximumSize: Number.MAX_VALUE, + layout: r => { + this.bb.style.height = `${this.ib.height}px`; + this.bb.style.width = `${r}px`; + this.r.layout(this.ib.height, r); + } + }, Tg.Distribute); + this.q.add(this.cb.onDidSashChange(() => { + if (this.ib.width) { + this.layoutData.ratio = this.cb.getViewSize(0) / this.ib.width; + } + }, undefined)); + const n = (r, o) => { + if (r instanceof HU) { + if (o === "show") { + this.Eb(r, false); + } + this.m.fire({ + element: r, + kind: o, + source: "tree" + }); + } + }; + this.q.add(this.r.onDidOpen(r => { + if (r.sideBySide) { + n(r.element, "side"); + } else if (r.editorOptions.pinned) { + n(r.element, "goto"); + } else { + n(r.element, "show"); + } + })); + Qo(this.bb); + } + E(e) { + if (this.ib) { + this.ab(this.ib.height, e); + } + } + ab(e, t) { + super.ab(e, t); + this.ib = new Ln(t, e); + this.layoutData.heightInLines = this.o ? this.o.heightInLines : this.layoutData.heightInLines; + this.cb.layout(t); + this.cb.resizeView(0, t * this.layoutData.ratio); + } + setSelection(e) { + return this.Eb(e, true).then(() => { + if (this.a) { + this.r.setSelection([e]); + this.r.setFocus([e]); + } + }); + } + setModel(e) { + this.c.clear(); + this.a = e; + if (this.a) { + return this.Bb(); + } else { + return Promise.resolve(); + } + } + Bb() { + if (this.a) { + if (this.a.isEmpty) { + this.setTitle(""); + this.hb.innerText = f(1166, null); + Ka(this.hb); + return Promise.resolve(undefined); + } else { + Qo(this.hb); + this.b = new _pr(this.db, this.a); + this.c.add(this.b); + this.c.add(this.a.onDidChangeReferenceRange(e => this.r.rerender(e))); + this.c.add(this.db.onMouseDown(e => { + const { + event: t, + target: s + } = e; + if (t.detail !== 2) { + return; + } + const n = this.Cb(); + if (n) { + this.m.fire({ + element: { + uri: n.uri, + range: s.range + }, + kind: t.ctrlKey || t.metaKey || t.altKey ? "side" : "open", + source: "editor" + }); + } + })); + this.container.classList.add("results-loaded"); + Ka(this.bb); + Ka(this.gb); + this.cb.layout(this.ib.width); + this.focusOnReferenceTree(); + return this.r.setInput(this.a.groups.length === 1 ? this.a.groups[0] : this.a); + } + } else { + return Promise.resolve(undefined); + } + } + Cb() { + const [e] = this.r.getFocus(); + if (e instanceof HU) { + return e; + } + if (e instanceof n0e && e.children.length > 0) { + return e.children[0]; + } + } + async revealReference(e) { + await this.Eb(e, false); + this.m.fire({ + element: e, + kind: "goto", + source: "tree" + }); + } + async Eb(e, t) { + if (this.Db === e) { + return; + } + this.Db = e; + if (e.uri.scheme !== me.inMemory) { + const o = await this.lb.createModelReference(e.uri); + try { + const a = o.object.textEditorModel; + const l = await this.qb.getOrCreate(a, mt.None); + const u = nZt(l.getTopLevelSymbols(), 7).reduce((d, h) => (h.kind === 11 || h.kind === 5 || h.kind === 4) && (d === null || h.level > d.level) && Z.lift(h.range).containsRange(Z.lift(e.range)) ? h : d, null); + this.setTitle(gg(e.uri), this.ob.getUriLabel(Ir(e.uri)) + (u !== null ? " > " + u.name : "")); + } finally { + o.dispose(); + } + } else { + this.setTitle(f(1167, null)); + } + const s = this.lb.createModelReference(e.uri); + if (this.r.getInput() === e.parent) { + this.r.reveal(e); + } else { + if (t) { + this.r.reveal(e.parent); + } + await this.r.expand(e.parent); + this.r.reveal(e); + } + const n = await s; + if (!this.a) { + n.dispose(); + return; + } + si(this.eb); + const r = n.object; + if (r) { + const o = this.db.getModel() === r.textEditorModel ? 0 : 1; + const a = Z.lift(e.range).collapseToStart(); + this.eb = n; + this.db.setModel(r.textEditorModel); + this.db.setSelection(a); + this.db.revealRangeInCenter(a, o); + } else { + this.db.setModel(this.fb); + n.dispose(); + } + } +}; +rZt = __decorate([__param(3, ti), __param(4, ns), __param(5, re), __param(6, u0e), __param(7, Zs), __param(8, oi), __param(9, fS), __param(10, uu), __param(11, vE), __param(12, ns)], rZt); +Sr(); +var bmt; +var DG = new fe("referenceSearchVisible", false, f(1157, null)); +var TO = class { + static { + bmt = this; + } + static { + this.ID = "editor.contrib.referencesController"; + } + static get(e) { + return e.getContribution(bmt.ID); + } + constructor(e, t, s, n, r, o, a, l) { + this.h = e; + this.i = t; + this.j = n; + this.k = r; + this.l = o; + this.m = a; + this.n = l; + this.a = new Q(); + this.e = 0; + this.f = false; + this.g = DG.bindTo(s); + } + dispose() { + this.g.reset(); + this.a.dispose(); + this.b?.dispose(); + this.c?.dispose(); + this.b = undefined; + this.c = undefined; + } + getWidget() { + return this.b; + } + toggleWidget(e, t, s) { + let n; + if (this.b) { + n = this.b.position; + } + this.closeWidget(); + if (n && e.containsPosition(n)) { + return; + } + this.d = s; + this.g.set(true); + this.a.add(this.i.onDidChangeModelLanguage(() => { + this.closeWidget(); + })); + this.a.add(this.i.onDidChangeModel(() => { + if (!this.f) { + this.closeWidget(); + } + })); + const r = "peekViewLayout"; + const o = Bpr.fromJSON(this.m.get(r, 0, "{}")); + this.b = this.l.createInstance(rZt, this.i, this.h, o); + this.b.setTitle(f(1158, null)); + this.b.show(e); + this.a.add(this.b.onDidClose(() => { + t.cancel(); + if (this.b) { + this.m.store(r, JSON.stringify(this.b.layoutData), 0, 1); + if (!this.b.isClosing) { + this.closeWidget(); + } + this.b = undefined; + } else { + this.closeWidget(); + } + })); + this.a.add(this.b.onDidSelectReference(l => { + const { + element: c, + kind: u + } = l; + if (c) { + switch (u) { + case "open": + if (l.source !== "editor" || !this.n.getValue("editor.stablePeek")) { + this.openReference(c, false, false); + } + break; + case "side": + this.openReference(c, true, false); + break; + case "goto": + if (s) { + this.o(c, true); + } else { + this.openReference(c, false, true); + } + break; + } + } + })); + const a = ++this.e; + t.then(l => { + if (a !== this.e || !this.b) { + l.dispose(); + return; + } + this.c?.dispose(); + this.c = l; + return this.b.setModel(this.c).then(() => { + if (this.b && this.c && this.i.hasModel()) { + if (this.c.isEmpty) { + this.b.setMetaTitle(""); + } else { + this.b.setMetaTitle(f(1159, null, this.c.title, this.c.references.length)); + } + const c = this.i.getModel().uri; + const u = new je(e.startLineNumber, e.startColumn); + const d = this.c.nearestReference(c, u); + if (d) { + return this.b.setSelection(d).then(() => { + if (this.b && this.i.getOption(91) === "editor") { + this.b.focusOnPreviewEditor(); + } + }); + } + } + }); + }, l => { + this.k.error(l); + }); + } + changeFocusBetweenPreviewAndReferences() { + if (this.b) { + if (this.b.isPreviewEditorFocused()) { + this.b.focusOnReferenceTree(); + } else { + this.b.focusOnPreviewEditor(); + } + } + } + async goToNextOrPreviousReference(e) { + if (!this.i.hasModel() || !this.c || !this.b) { + return; + } + const t = this.b.position; + if (!t) { + return; + } + const s = this.c.nearestReference(this.i.getModel().uri, t); + if (!s) { + return; + } + const n = this.c.nextOrPreviousReference(s, e); + const r = this.i.hasTextFocus(); + const o = this.b.isPreviewEditorFocused(); + await this.b.setSelection(n); + await this.o(n, false); + if (r) { + this.i.focus(); + } else if (this.b && o) { + this.b.focusOnPreviewEditor(); + } + } + async revealReference(e) { + if (!!this.i.hasModel() && !!this.c && !!this.b) { + await this.b.revealReference(e); + } + } + closeWidget(e = true) { + this.b?.dispose(); + this.c?.dispose(); + this.g.reset(); + this.a.clear(); + this.b = undefined; + this.c = undefined; + if (e) { + this.i.focus(); + } + this.e += 1; + } + o(e, t) { + this.b?.hide(); + this.f = true; + const s = Z.lift(e.range).collapseToStart(); + return this.j.openCodeEditor({ + resource: e.uri, + options: { + selection: s, + selectionSource: "code.jump", + pinned: t + } + }, this.i).then(n => { + this.f = false; + if (!n || !this.b) { + this.closeWidget(); + return; + } + if (this.i === n) { + this.b.show(s); + this.b.focusOnReferenceTree(); + } else { + const r = bmt.get(n); + const o = this.c.clone(); + this.closeWidget(); + n.focus(); + r?.toggleWidget(s, ql(a => Promise.resolve(o)), this.d ?? false); + } + }, n => { + this.f = false; + xs(n); + }); + } + openReference(e, t, s) { + if (!t) { + this.closeWidget(); + } + const { + uri: n, + range: r + } = e; + this.j.openCodeEditor({ + resource: n, + options: { + selection: r, + selectionSource: "code.jump", + pinned: s + } + }, this.i, t); + } +}; +TO = bmt = __decorate([__param(2, Ne), __param(3, ps), __param(4, ni), __param(5, re), __param(6, ht), __param(7, ve)], TO); +function TG(i, e) { + const t = x5s(i); + if (!t) { + return; + } + const s = TO.get(t); + if (s) { + e(s); + } +} +Ci.registerCommandAndKeybindingRule({ + id: "togglePeekWidgetFocus", + weight: 100, + primary: Ai(_r, 60), + mac: { + primary: Ai(Xr, 60) + }, + when: T.or(DG, Ib.inPeekEditor), + handler(i) { + TG(i, e => { + e.changeFocusBetweenPreviewAndReferences(); + }); + } +}); +Ci.registerCommandAndKeybindingRule({ + id: "goToNextReference", + weight: 90, + primary: 62, + secondary: [70], + when: T.or(DG, Ib.inPeekEditor), + handler(i) { + TG(i, e => { + e.goToNextOrPreviousReference(true); + }); + } +}); +Ci.registerCommandAndKeybindingRule({ + id: "goToPreviousReference", + weight: 90, + primary: 1086, + secondary: [1094], + when: T.or(DG, Ib.inPeekEditor), + handler(i) { + TG(i, e => { + e.goToNextOrPreviousReference(false); + }); + } +}); +ei.registerCommandAlias("goToNextReferenceFromEmbeddedEditor", "goToNextReference"); +ei.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor", "goToPreviousReference"); +ei.registerCommandAlias("closeReferenceSearchEditor", "closeReferenceSearch"); +ei.registerCommand("closeReferenceSearch", i => TG(i, e => e.closeWidget())); +Ci.registerKeybindingRule({ + id: "closeReferenceSearch", + weight: -1, + primary: 9, + secondary: [1033], + when: T.and(Ib.inPeekEditor, T.not("config.editor.stablePeek")) +}); +Ci.registerKeybindingRule({ + id: "closeReferenceSearch", + weight: 250, + primary: 9, + secondary: [1033], + when: T.and(DG, T.not("config.editor.stablePeek"), T.or(ke.editorTextFocus, R1.negate())) +}); +Ci.registerCommandAndKeybindingRule({ + id: "revealReference", + weight: 200, + primary: 3, + mac: { + primary: 3, + secondary: [2066] + }, + when: T.and(DG, nh, nmt.negate(), rmt.negate()), + handler(i) { + const t = i.get(br).lastFocusedList?.getFocus(); + if (Array.isArray(t) && t[0] instanceof HU) { + TG(i, s => s.revealReference(t[0])); + } + } +}); +Ci.registerCommandAndKeybindingRule({ + id: "openReferenceToSide", + weight: 100, + primary: 2051, + mac: { + primary: 259 + }, + when: T.and(DG, nh, nmt.negate(), rmt.negate()), + handler(i) { + const t = i.get(br).lastFocusedList?.getFocus(); + if (Array.isArray(t) && t[0] instanceof HU) { + TG(i, s => s.openReference(t[0], true, true)); + } + } +}); +ei.registerCommand("openReference", i => { + const t = i.get(br).lastFocusedList?.getFocus(); + if (Array.isArray(t) && t[0] instanceof HU) { + TG(i, s => s.openReference(t[0], false, true)); + } +}); +pe(); +q(); +Et(); +en(); +Xn(); +yt(); +X(); +Ee(); +It(); +te(); +Fi(); +Wu(); +Wi(); +var oZt = new fe("hasSymbols", false, f(1176, null)); +var vmt = Ve("ISymbolNavigationService"); +var aZt = class { + constructor(e, t, s, n) { + this.g = t; + this.h = s; + this.i = n; + this.b = undefined; + this.c = -1; + this.f = false; + this.a = oZt.bindTo(e); + } + reset() { + this.a.reset(); + this.d?.dispose(); + this.e?.dispose(); + this.b = undefined; + this.c = -1; + } + put(e) { + const t = e.parent.parent; + if (t.references.length <= 1) { + this.reset(); + return; + } + this.b = t; + this.c = t.references.indexOf(e); + this.a.set(true); + this.j(); + const s = new lZt(this.g); + const n = s.onDidChange(r => { + if (this.f) { + return; + } + const o = this.g.getActiveCodeEditor(); + if (!o) { + return; + } + const a = o.getModel(); + const l = o.getPosition(); + if (!a || !l) { + return; + } + let c = false; + let u = false; + for (const d of t.references) { + if (Ls(d.uri, a.uri)) { + c = true; + u = u || Z.containsPosition(d.range, l); + } else if (c) { + break; + } + } + if (!c || !u) { + this.reset(); + } + }); + this.d = Gc(s, n); + } + revealNext(e) { + if (!this.b) { + return Promise.resolve(); + } + this.c += 1; + this.c %= this.b.references.length; + const t = this.b.references[this.c]; + this.j(); + this.f = true; + return this.g.openCodeEditor({ + resource: t.uri, + options: { + selection: Z.collapseToStart(t.range), + selectionRevealType: 3 + } + }, e).finally(() => { + this.f = false; + }); + } + j() { + this.e?.dispose(); + const e = this.i.lookupKeybinding("editor.gotoNextSymbolFromResult"); + const t = e ? f(1177, null, this.c + 1, this.b.references.length, e.getLabel()) : f(1178, null, this.c + 1, this.b.references.length); + this.e = this.h.status(t); + } +}; +aZt = __decorate([__param(0, Ne), __param(1, ps), __param(2, ni), __param(3, oi)], aZt); +it(vmt, aZt, 1); +Sn(new class extends Wm { + constructor() { + super({ + id: "editor.gotoNextSymbolFromResult", + precondition: oZt, + kbOpts: { + weight: 100, + primary: 70 + } + }); + } + runEditorCommand(i, e) { + return i.get(vmt).revealNext(e); + } +}()); +Ci.registerCommandAndKeybindingRule({ + id: "editor.gotoNextSymbolFromResult.cancel", + weight: 100, + when: oZt, + primary: 9, + handler(i) { + i.get(vmt).reset(); + } +}); +var lZt = class { + constructor(e) { + this.a = new Map(); + this.b = new Q(); + this.c = new B(); + this.onDidChange = this.c.event; + this.b.add(e.onCodeEditorRemove(this.e, this)); + this.b.add(e.onCodeEditorAdd(this.d, this)); + e.listCodeEditors().forEach(this.d, this); + } + dispose() { + this.b.dispose(); + this.c.dispose(); + si(this.a.values()); + } + d(e) { + this.a.set(e, Gc(e.onDidChangeCursorPosition(t => this.c.fire({ + editor: e + })), e.onDidChangeModelContent(t => this.c.fire({ + editor: e + })))); + } + e(e) { + this.a.get(e)?.dispose(); + this.a.delete(e); + } +}; +lZt = __decorate([__param(0, ps)], lZt); +PF(); +X(); +Je(); +Wt(); +Ee(); +te(); +Wi(); +so(); +Tr(); +sa(); +fr(); +q(); +rt(); +It(); +te(); +kn(); +qx(); +sh(); +Wc(); +nt(); +Sl(); +var x6s; +(function (i) { + i[i.LocalProcess = 1] = "LocalProcess"; + i[i.LocalWebWorker = 2] = "LocalWebWorker"; + i[i.Remote = 3] = "Remote"; +})(x6s ||= {}); +function $A(i) { + if (i === null) { + return "None"; + } + switch (i) { + case 1: + return "LocalProcess"; + case 2: + return "LocalWebWorker"; + case 3: + return "Remote"; + } +} +var k6s; +(function (i) { + i[i.None = 0] = "None"; + i[i.Local = 1] = "Local"; + i[i.Remote = 2] = "Remote"; +})(k6s ||= {}); +function Wpr(i) { + switch (i) { + case 0: + return "None"; + case 1: + return "Local"; + case 2: + return "Remote"; + } +} +function Vpr(i, e, t, s) { + const n = E6s(i, t); + const r = E6s(e, t); + const o = new Map(); + const a = c => { + if (o.has(c.key)) { + return; + } + const u = n.get(c.key) || null; + const d = r.get(c.key) || null; + const h = new qpr(u, d); + o.set(h.key, h); + }; + n.forEach(c => a(c)); + r.forEach(c => a(c)); + const l = new Map(); + o.forEach(c => { + const u = !!c.local; + const d = !!c.remote; + const h = !!c.local && !!c.local.isUnderDevelopment; + const g = !!c.remote && !!c.remote.isUnderDevelopment; + let p = 0; + if (h && !g) { + p = 1; + } else if (g && !h) { + p = 2; + } + l.set(c.key, s(c.identifier, c.kind, u, d, p)); + }); + return l; +} +function E6s(i, e) { + const t = new Map(); + i.forEach(s => { + const n = new Hpr(s, e(s)); + t.set(n.key, n); + }); + return t; +} +var Hpr = class { + constructor(i, e) { + this.desc = i; + this.kind = e; + } + get key() { + return $r.toKey(this.desc.identifier); + } + get isUnderDevelopment() { + return this.desc.isUnderDevelopment; + } +}; +var qpr = class { + constructor(i, e) { + this.local = i; + this.remote = e; + } + get key() { + if (this.local) { + return this.local.key; + } else { + return this.remote.key; + } + } + get identifier() { + if (this.local) { + return this.local.desc.identifier; + } else { + return this.remote.desc.identifier; + } + } + get kind() { + if (this.local) { + return this.local.kind; + } else { + return this.remote.kind; + } + } +}; +nt(); +nr(); +Ut(); +pe(); +q(); +fd(); +X(); +X(); +var pt = Object.freeze({ + View: W(1666, "View"), + Help: W(1667, "Help"), + Test: W(1668, "Test"), + File: W(1669, "File"), + Preferences: W(1670, "Preferences"), + Developer: W(1671, "Developer"), + Cursor: W(1672, "Cursor") +}); +Je(); +te(); +Zt(); +Ut(); +te(); +var hv = Ve("remoteAuthorityResolverService"); +var I6s; +(function (i) { + i[i.WebSocket = 0] = "WebSocket"; + i[i.Managed = 1] = "Managed"; +})(I6s ||= {}); +var jpr = class { + constructor(i) { + this.id = i; + this.type = 1; + } + toString() { + return `Managed(${this.id})`; + } +}; +var zpr = class { + constructor(i, e) { + this.host = i; + this.port = e; + this.type = 0; + } + toString() { + return `WebSocket(${this.host}:${this.port})`; + } +}; +var kE; +(function (i) { + i.Unknown = "Unknown"; + i.NotAvailable = "NotAvailable"; + i.TemporarilyNotAvailable = "TemporarilyNotAvailable"; + i.NoResolverFound = "NoResolverFound"; + i.InvalidAuthority = "InvalidAuthority"; +})(kE ||= {}); +var $R = class sZ extends uf { + static isNotAvailable(e) { + return e instanceof sZ && e._code === kE.NotAvailable; + } + static isTemporarilyNotAvailable(e) { + return e instanceof sZ && e._code === kE.TemporarilyNotAvailable; + } + static isNoResolverFound(e) { + return e instanceof sZ && e._code === kE.NoResolverFound; + } + static isInvalidAuthority(e) { + return e instanceof sZ && e._code === kE.InvalidAuthority; + } + static isHandled(e) { + return e instanceof sZ && e.isHandled; + } + constructor(e, t = kE.Unknown, s) { + super(e); + this._message = e; + this._code = t; + this._detail = s; + this.isHandled = t === kE.NotAvailable && s === true; + Object.setPrototypeOf(this, sZ.prototype); + } +}; +function PG(i) { + const e = i.indexOf("+"); + if (e === -1) { + return i; + } else { + return i.substring(0, e); + } +} +ai(); +vt(); +Rr(); +function tl(i) { + return function (e) { + wmt.INSTANCE.registerNamedCustomer(i, e); + }; +} +function LG(i) { + wmt.INSTANCE.registerCustomer(i); +} +var ymt; +(function (i) { + function e() { + return wmt.INSTANCE.getNamedCustomers(); + } + i.getNamedCustomers = e; + function t() { + return wmt.INSTANCE.getCustomers(); + } + i.getCustomers = t; +})(ymt ||= {}); +var wmt = class v_n { + static { + this.INSTANCE = new v_n(); + } + constructor() { + this.a = []; + this.b = []; + } + registerNamedCustomer(e, t) { + const s = [e, t]; + this.a.push(s); + } + getNamedCustomers() { + return this.a; + } + registerCustomer(e) { + this.b.push(e); + } + getCustomers() { + return this.b; + } +}; +nt(); +nr(); +ri(); +Ut(); +pe(); +q(); +nr(); +Le(); +var Jpr = new class { + transformIncoming(i) { + return i; + } + transformOutgoing(i) { + return i; + } + transformOutgoingURI(i) { + return i; + } + transformOutgoingScheme(i) { + return i; + } +}(); +function cZt(i, e, t, s) { + if (!i || s > 200) { + return null; + } + if (typeof i == "object") { + if (i.$mid === 1) { + if (t) { + return V.revive(e.transformIncoming(i)); + } else { + return e.transformIncoming(i); + } + } + if (i instanceof Ii) { + return null; + } + for (const n in i) { + if (Object.hasOwnProperty.call(i, n)) { + const r = cZt(i[n], e, t, s + 1); + if (r !== null) { + i[n] = r; + } + } + } + } + return null; +} +function k0e(i, e) { + const t = cZt(i, e, false, 0); + if (t === null) { + return i; + } else { + return t; + } +} +function Gpr(i, e) { + const t = cZt(i, e, true, 0); + if (t === null) { + return i; + } else { + return t; + } +} +Ut(); +var D6s = class { + constructor() { + this.a = null; + this.b = null; + this.d = null; + this.f = false; + this.g = null; + this.h = false; + this.i = null; + } + get [Symbol.toStringTag]() { + return this.toString(); + } + j() { + this.a ||= new Promise((i, e) => { + this.b = i; + this.d = e; + if (this.f) { + this.b(this.g); + } + if (this.h) { + this.d(this.i); + } + }); + return this.a; + } + resolveOk(i) { + if (!this.f && !this.h) { + this.f = true; + this.g = i; + if (this.a) { + this.b(i); + } + } + } + resolveErr(i) { + if (!this.f && !this.h) { + this.h = true; + this.i = i; + if (this.a) { + this.d(i); + } else { + xs(i); + } + } + } + then(i, e) { + return this.j().then(i, e); + } + catch(i) { + return this.j().then(undefined, i); + } + finally(i) { + return this.j().finally(i); + } +}; +var Kpr = class extends D6s { + constructor() { + super(); + this.h = true; + this.i = new fl(); + } +}; +var T6s = class y_n { + static { + this.count = 0; + } + constructor(e) { + this._proxyIdentifierBrand = undefined; + this.sid = e; + this.nid = ++y_n.count; + } +}; +var P6s = []; +function En(i) { + const e = new T6s(i); + P6s[e.nid] = e; + return e; +} +function Cmt(i) { + return P6s[i].sid; +} +var FA = class { + constructor(i) { + this.value = i; + } +}; +var L6s; +function uZt(i, e) { + try { + return JSON.stringify(i, e); + } catch { + return "null"; + } +} +var dZt = "$$ref$$"; +var Ypr = { + [dZt]: -1 +}; +function R6s(i, e = null, t = false) { + const s = []; + return { + jsonString: (t ? uZt : JSON.stringify)(i, (r, o) => { + if (typeof o === "undefined") { + return Ypr; + } + if (typeof o == "object") { + if (o instanceof Ii) { + const a = s.push(o) - 1; + return { + [dZt]: a + }; + } + if (e) { + return e(r, o); + } + } + return o; + }), + referencedBuffers: s + }; +} +function N6s(i, e, t) { + return JSON.parse(i, (s, n) => { + if (n) { + const r = n[dZt]; + if (typeof r == "number") { + return e[r]; + } + if (t && n.$mid === 1) { + return t.transformIncoming(n); + } + } + return n; + }); +} +function M6s(i, e) { + return JSON.stringify(i, e); +} +function Xpr(i) { + if (i) { + return (e, t) => t && t.$mid === 1 ? i.transformOutgoing(t) : t; + } else { + return null; + } +} +var A6s; +(function (i) { + i[i.LocalSide = 0] = "LocalSide"; + i[i.OtherSide = 1] = "OtherSide"; +})(A6s ||= {}); +var $6s; +(function (i) { + i[i.Responsive = 0] = "Responsive"; + i[i.Unresponsive = 1] = "Unresponsive"; +})($6s ||= {}); +var Qpr = () => {}; +var Zpr = Symbol.for("rpcProtocol"); +var emr = Symbol.for("rpcProxy"); +var tmr = class u9i extends H { + static { + L6s = Zpr; + } + static { + this.a = 3000; + } + constructor(e, t = null, s = null) { + super(); + this[L6s] = true; + this.b = this.D(new B()); + this.onDidChangeResponsiveState = this.b.event; + this.c = e; + this.f = t; + this.g = s; + this.h = Xpr(this.g); + this.j = false; + this.m = []; + this.q = []; + for (let n = 0, r = T6s.count; n < r; n++) { + this.m[n] = null; + this.q[n] = null; + } + this.s = 0; + this.t = Object.create(null); + this.u = {}; + this.w = 0; + this.y = 0; + this.z = 0; + this.C = this.D(new Vn(() => this.H(), 1000)); + this.D(this.c.onMessage(n => this.L(n))); + } + dispose() { + this.j = true; + Object.keys(this.u).forEach(e => { + const t = this.u[e]; + delete this.u[e]; + t.resolveErr(SL()); + }); + super.dispose(); + } + drain() { + if (typeof this.c.drain == "function") { + return this.c.drain(); + } else { + return Promise.resolve(); + } + } + F(e) { + if (this.y === 0) { + this.z = Date.now() + u9i.a; + } + this.y++; + if (!this.C.isScheduled()) { + this.C.schedule(); + } + } + G(e) { + this.z = Date.now() + u9i.a; + this.y--; + if (this.y === 0) { + this.C.cancel(); + } + this.I(0); + } + H() { + if (this.y !== 0) { + if (Date.now() > this.z) { + this.I(1); + } else { + this.C.schedule(); + } + } + } + I(e) { + if (this.w !== e) { + this.w = e; + this.b.fire(this.w); + } + } + get responsiveState() { + return this.w; + } + transformIncomingURIs(e) { + if (this.g) { + return k0e(e, this.g); + } else { + return e; + } + } + getProxy(e) { + const { + nid: t, + sid: s + } = e; + this.q[t] ||= this.J(t, s); + return this.q[t]; + } + J(e, t) { + const s = { + get: (n, r) => { + if (typeof r == "string" && !n[r] && r.charCodeAt(0) === 36) { + n[r] = (...o) => this.U(e, r, o); + } + if (r === emr) { + return t; + } else { + return n[r]; + } + } + }; + return new Proxy(Object.create(null), s); + } + set(e, t) { + this.m[e.nid] = t; + return t; + } + assertRegistered(e) { + for (let t = 0, s = e.length; t < s; t++) { + const n = e[t]; + if (!this.m[n.nid]) { + throw new Error(`Missing proxy instance ${n.sid}`); + } + } + } + L(e) { + if (this.j) { + return; + } + const t = e.byteLength; + const s = fv.read(e, 0); + const n = s.readUInt8(); + const r = s.readUInt32(); + switch (n) { + case 1: + case 2: + { + let { + rpcId: o, + method: a, + args: l + } = FR.deserializeRequestJSONArgs(s); + if (this.g) { + l = k0e(l, this.g); + } + this.M(t, r, o, a, l, n === 2); + break; + } + case 3: + case 4: + { + let { + rpcId: o, + method: a, + args: l + } = FR.deserializeRequestMixedArgs(s); + if (this.g) { + l = k0e(l, this.g); + } + this.M(t, r, o, a, l, n === 4); + break; + } + case 5: + { + this.f?.logIncoming(t, r, 0, "ack"); + this.G(r); + break; + } + case 6: + { + this.N(t, r); + break; + } + case 7: + { + this.O(t, r, undefined); + break; + } + case 9: + { + let o = FR.deserializeReplyOKJSON(s); + if (this.g) { + o = k0e(o, this.g); + } + this.O(t, r, o); + break; + } + case 10: + { + const o = FR.deserializeReplyOKJSONWithBuffers(s, this.g); + this.O(t, r, o); + break; + } + case 8: + { + const o = FR.deserializeReplyOKVSBuffer(s); + this.O(t, r, o); + break; + } + case 11: + { + let o = FR.deserializeReplyErrError(s); + if (this.g) { + o = k0e(o, this.g); + } + this.P(t, r, o); + break; + } + case 12: + { + this.P(t, r, undefined); + break; + } + default: + console.error("received unexpected message"); + console.error(e); + } + } + M(e, t, s, n, r, o) { + this.f?.logIncoming(e, t, 1, `receiveRequest ${Cmt(s)}.${n}(`, r); + const a = String(t); + let l; + let c; + if (o) { + const d = new Xi(); + r.push(d.token); + l = this.Q(s, n, r); + c = () => d.cancel(); + } else { + l = this.Q(s, n, r); + c = Qpr; + } + this.t[a] = c; + const u = FR.serializeAcknowledged(t); + this.f?.logOutgoing(u.byteLength, t, 1, "ack"); + this.c.send(u); + l.then(d => { + delete this.t[a]; + const h = FR.serializeReplyOK(t, d, this.h); + this.f?.logOutgoing(h.byteLength, t, 1, "reply:", d); + this.c.send(h); + }, d => { + delete this.t[a]; + const h = FR.serializeReplyErr(t, d); + this.f?.logOutgoing(h.byteLength, t, 1, "replyErr:", d); + this.c.send(h); + }); + } + N(e, t) { + this.f?.logIncoming(e, t, 1, "receiveCancel"); + const s = String(t); + this.t[s]?.(); + } + O(e, t, s) { + this.f?.logIncoming(e, t, 0, "receiveReply:", s); + const n = String(t); + if (!this.u.hasOwnProperty(n)) { + return; + } + const r = this.u[n]; + delete this.u[n]; + r.resolveOk(s); + } + P(e, t, s) { + this.f?.logIncoming(e, t, 0, "receiveReplyErr:", s); + const n = String(t); + if (!this.u.hasOwnProperty(n)) { + return; + } + const r = this.u[n]; + delete this.u[n]; + let o; + if (s) { + if (s.$isError) { + o = new Error(); + o.name = s.name; + o.message = s.message; + o.stack = s.stack; + } else { + o = s; + } + } + r.resolveErr(o); + } + Q(e, t, s) { + try { + return Promise.resolve(this.S(e, t, s)); + } catch (n) { + return Promise.reject(n); + } + } + S(e, t, s) { + const n = this.m[e]; + if (!n) { + throw new Error("Unknown actor " + Cmt(e)); + } + const r = n[t]; + if (typeof r != "function") { + throw new Error("Unknown method " + t + " on actor " + Cmt(e)); + } + return r.apply(n, s); + } + U(e, t, s) { + if (this.j) { + return new Kpr(); + } + let n = null; + if (s.length > 0 && mt.isCancellationToken(s[s.length - 1])) { + n = s.pop(); + } + if (n && n.isCancellationRequested) { + return Promise.reject(SL()); + } + const r = FR.serializeRequestArguments(s, this.h); + const o = ++this.s; + const a = String(o); + const l = new D6s(); + const c = new Q(); + if (n) { + c.add(n.onCancellationRequested(() => { + const d = FR.serializeCancel(o); + this.f?.logOutgoing(d.byteLength, o, 0, "cancel"); + this.c.send(d); + })); + } + this.u[a] = new imr(l, c); + this.F(o); + const u = FR.serializeRequest(o, e, t, r, !!n); + this.f?.logOutgoing(u.byteLength, o, 0, `request: ${Cmt(e)}.${t}(`, s); + this.c.send(u); + return l; + } +}; +var imr = class { + constructor(i, e) { + this.a = i; + this.b = e; + } + resolveOk(i) { + this.a.resolveOk(i); + this.b.dispose(); + } + resolveErr(i) { + this.a.resolveErr(i); + this.b.dispose(); + } +}; +var fv = class d9i { + static alloc(e, t, s) { + const n = new d9i(Ii.alloc(s + 1 + 4), 0); + n.writeUInt8(e); + n.writeUInt32(t); + return n; + } + static read(e, t) { + return new d9i(e, t); + } + get buffer() { + return this.a; + } + constructor(e, t) { + this.a = e; + this.b = t; + } + static sizeUInt8() { + return 1; + } + static { + this.sizeUInt32 = 4; + } + writeUInt8(e) { + this.a.writeUInt8(e, this.b); + this.b += 1; + } + readUInt8() { + const e = this.a.readUInt8(this.b); + this.b += 1; + return e; + } + writeUInt32(e) { + this.a.writeUInt32BE(e, this.b); + this.b += 4; + } + readUInt32() { + const e = this.a.readUInt32BE(this.b); + this.b += 4; + return e; + } + static sizeShortString(e) { + return 1 + e.byteLength; + } + writeShortString(e) { + this.a.writeUInt8(e.byteLength, this.b); + this.b += 1; + this.a.set(e, this.b); + this.b += e.byteLength; + } + readShortString() { + const e = this.a.readUInt8(this.b); + this.b += 1; + const s = this.a.slice(this.b, this.b + e).toString(); + this.b += e; + return s; + } + static sizeLongString(e) { + return 4 + e.byteLength; + } + writeLongString(e) { + this.a.writeUInt32BE(e.byteLength, this.b); + this.b += 4; + this.a.set(e, this.b); + this.b += e.byteLength; + } + readLongString() { + const e = this.a.readUInt32BE(this.b); + this.b += 4; + const s = this.a.slice(this.b, this.b + e).toString(); + this.b += e; + return s; + } + writeBuffer(e) { + this.a.writeUInt32BE(e.byteLength, this.b); + this.b += 4; + this.a.set(e, this.b); + this.b += e.byteLength; + } + static sizeVSBuffer(e) { + return 4 + e.byteLength; + } + writeVSBuffer(e) { + this.a.writeUInt32BE(e.byteLength, this.b); + this.b += 4; + this.a.set(e, this.b); + this.b += e.byteLength; + } + readVSBuffer() { + const e = this.a.readUInt32BE(this.b); + this.b += 4; + const t = this.a.slice(this.b, this.b + e); + this.b += e; + return t; + } + static sizeMixedArray(e) { + let t = 0; + t += 1; + for (let s = 0, n = e.length; s < n; s++) { + const r = e[s]; + t += 1; + switch (r.type) { + case 1: + t += this.sizeLongString(r.value); + break; + case 2: + t += this.sizeVSBuffer(r.value); + break; + case 3: + t += this.sizeUInt32; + t += this.sizeLongString(r.value); + for (let o = 0; o < r.buffers.length; ++o) { + t += this.sizeVSBuffer(r.buffers[o]); + } + break; + case 4: + break; + } + } + return t; + } + writeMixedArray(e) { + this.a.writeUInt8(e.length, this.b); + this.b += 1; + for (let t = 0, s = e.length; t < s; t++) { + const n = e[t]; + switch (n.type) { + case 1: + this.writeUInt8(1); + this.writeLongString(n.value); + break; + case 2: + this.writeUInt8(2); + this.writeVSBuffer(n.value); + break; + case 3: + this.writeUInt8(3); + this.writeUInt32(n.buffers.length); + this.writeLongString(n.value); + for (let r = 0; r < n.buffers.length; ++r) { + this.writeBuffer(n.buffers[r]); + } + break; + case 4: + this.writeUInt8(4); + break; + } + } + } + readMixedArray() { + const e = this.a.readUInt8(this.b); + this.b += 1; + const t = new Array(e); + for (let s = 0; s < e; s++) { + switch (this.readUInt8()) { + case 1: + t[s] = this.readLongString(); + break; + case 2: + t[s] = this.readVSBuffer(); + break; + case 3: + { + const r = this.readUInt32(); + const o = this.readLongString(); + const a = []; + for (let l = 0; l < r; ++l) { + a.push(this.readVSBuffer()); + } + t[s] = new FA(N6s(o, a, null)); + break; + } + case 4: + t[s] = undefined; + break; + } + } + return t; + } +}; +var F6s; +(function (i) { + i[i.Simple = 0] = "Simple"; + i[i.Mixed = 1] = "Mixed"; +})(F6s ||= {}); +var FR = class { + static a(i) { + for (let e = 0, t = i.length; e < t; e++) { + if (i[e] instanceof Ii || i[e] instanceof FA || typeof i[e] === "undefined") { + return true; + } + } + return false; + } + static serializeRequestArguments(i, e) { + if (this.a(i)) { + const t = []; + for (let s = 0, n = i.length; s < n; s++) { + const r = i[s]; + if (r instanceof Ii) { + t[s] = { + type: 2, + value: r + }; + } else if (typeof r === "undefined") { + t[s] = { + type: 4 + }; + } else if (r instanceof FA) { + const { + jsonString: o, + referencedBuffers: a + } = R6s(r.value, e); + t[s] = { + type: 3, + value: Ii.fromString(o), + buffers: a + }; + } else { + t[s] = { + type: 1, + value: Ii.fromString(M6s(r, e)) + }; + } + } + return { + type: 1, + args: t + }; + } + return { + type: 0, + args: M6s(i, e) + }; + } + static serializeRequest(i, e, t, s, n) { + switch (s.type) { + case 0: + return this.b(i, e, t, s.args, n); + case 1: + return this.c(i, e, t, s.args, n); + } + } + static b(i, e, t, s, n) { + const r = Ii.fromString(t); + const o = Ii.fromString(s); + let a = 0; + a += fv.sizeUInt8(); + a += fv.sizeShortString(r); + a += fv.sizeLongString(o); + const l = fv.alloc(n ? 2 : 1, i, a); + l.writeUInt8(e); + l.writeShortString(r); + l.writeLongString(o); + return l.buffer; + } + static deserializeRequestJSONArgs(i) { + const e = i.readUInt8(); + const t = i.readShortString(); + const s = i.readLongString(); + return { + rpcId: e, + method: t, + args: JSON.parse(s) + }; + } + static c(i, e, t, s, n) { + const r = Ii.fromString(t); + let o = 0; + o += fv.sizeUInt8(); + o += fv.sizeShortString(r); + o += fv.sizeMixedArray(s); + const a = fv.alloc(n ? 4 : 3, i, o); + a.writeUInt8(e); + a.writeShortString(r); + a.writeMixedArray(s); + return a.buffer; + } + static deserializeRequestMixedArgs(i) { + const e = i.readUInt8(); + const t = i.readShortString(); + const s = i.readMixedArray(); + const n = new Array(s.length); + for (let r = 0, o = s.length; r < o; r++) { + const a = s[r]; + if (typeof a == "string") { + n[r] = JSON.parse(a); + } else { + n[r] = a; + } + } + return { + rpcId: e, + method: t, + args: n + }; + } + static serializeAcknowledged(i) { + return fv.alloc(5, i, 0).buffer; + } + static serializeCancel(i) { + return fv.alloc(6, i, 0).buffer; + } + static serializeReplyOK(i, e, t) { + if (typeof e === "undefined") { + return this.d(i); + } + if (e instanceof Ii) { + return this.e(i, e); + } + if (e instanceof FA) { + const { + jsonString: s, + referencedBuffers: n + } = R6s(e.value, t, true); + return this.g(i, s, n); + } else { + return this.f(i, uZt(e, t)); + } + } + static d(i) { + return fv.alloc(7, i, 0).buffer; + } + static e(i, e) { + let t = 0; + t += fv.sizeVSBuffer(e); + const s = fv.alloc(8, i, t); + s.writeVSBuffer(e); + return s.buffer; + } + static deserializeReplyOKVSBuffer(i) { + return i.readVSBuffer(); + } + static f(i, e) { + const t = Ii.fromString(e); + let s = 0; + s += fv.sizeLongString(t); + const n = fv.alloc(9, i, s); + n.writeLongString(t); + return n.buffer; + } + static g(i, e, t) { + const s = Ii.fromString(e); + let n = 0; + n += fv.sizeUInt32; + n += fv.sizeLongString(s); + for (const o of t) { + n += fv.sizeVSBuffer(o); + } + const r = fv.alloc(10, i, n); + r.writeUInt32(t.length); + r.writeLongString(s); + for (const o of t) { + r.writeBuffer(o); + } + return r.buffer; + } + static deserializeReplyOKJSON(i) { + const e = i.readLongString(); + return JSON.parse(e); + } + static deserializeReplyOKJSONWithBuffers(i, e) { + const t = i.readUInt32(); + const s = i.readLongString(); + const n = []; + for (let r = 0; r < t; ++r) { + n.push(i.readVSBuffer()); + } + return new FA(N6s(s, n, e)); + } + static serializeReplyErr(i, e) { + const t = e ? uZt(Jhe(e), null) : undefined; + if (typeof t != "string") { + return this.h(i); + } + const s = Ii.fromString(t); + let n = 0; + n += fv.sizeLongString(s); + const r = fv.alloc(11, i, n); + r.writeLongString(s); + return r.buffer; + } + static deserializeReplyErrError(i) { + const e = i.readLongString(); + return JSON.parse(e); + } + static h(i) { + return fv.alloc(12, i, 0).buffer; + } +}; +var O6s; +(function (i) { + i[i.RequestJSONArgs = 1] = "RequestJSONArgs"; + i[i.RequestJSONArgsWithCancellation = 2] = "RequestJSONArgsWithCancellation"; + i[i.RequestMixedArgs = 3] = "RequestMixedArgs"; + i[i.RequestMixedArgsWithCancellation = 4] = "RequestMixedArgsWithCancellation"; + i[i.Acknowledged = 5] = "Acknowledged"; + i[i.Cancel = 6] = "Cancel"; + i[i.ReplyOKEmpty = 7] = "ReplyOKEmpty"; + i[i.ReplyOKVSBuffer = 8] = "ReplyOKVSBuffer"; + i[i.ReplyOKJSON = 9] = "ReplyOKJSON"; + i[i.ReplyOKJSONWithBuffers = 10] = "ReplyOKJSONWithBuffers"; + i[i.ReplyErrError = 11] = "ReplyErrError"; + i[i.ReplyErrEmpty = 12] = "ReplyErrEmpty"; +})(O6s ||= {}); +var _6s; +(function (i) { + i[i.String = 1] = "String"; + i[i.VSBuffer = 2] = "VSBuffer"; + i[i.SerializedObjectWithBuffers = 3] = "SerializedObjectWithBuffers"; + i[i.Undefined = 4] = "Undefined"; +})(_6s ||= {}); +Wt(); +Wi(); +var Smt; +var smr = false; +var nmr = true; +var xmt = Smt = class extends H { + get pid() { + return this.q.pid; + } + get kind() { + return this.q.runningLocation.kind; + } + get startup() { + return this.q.startup; + } + get friendyName() { + return B6s(this.kind, this.pid); + } + constructor(e, t, s, n, r, o, a) { + super(); + this.t = s; + this.u = n; + this.w = r; + this.y = o; + this.z = a; + this.c = this.D(new B()); + this.onDidChangeResponsiveState = this.c.event; + this.s = false; + this.f = new Map(); + this.g = new Set(); + this.h = null; + this.j = []; + this.q = e; + this.onDidExit = this.q.onExit; + const l = { + time: Date.now(), + action: "starting", + kind: $A(this.kind) + }; + this.y.publicLog2("extensionHostStartup", l); + this.r = this.q.start().then(c => { + this.s = true; + const u = { + time: Date.now(), + action: "success", + kind: $A(this.kind) + }; + this.y.publicLog2("extensionHostStartup", u); + return this.J(this.kind, c); + }, c => { + this.z.error(`Error received from starting extension host (kind: ${$A(this.kind)})`); + this.z.error(c); + const u = { + time: Date.now(), + action: "error", + kind: $A(this.kind) + }; + if (c && c.name) { + u.errorName = c.name; + } + if (c && c.message) { + u.errorMessage = c.message; + } + if (c && c.stack) { + u.errorStack = c.stack; + } + this.y.publicLog2("extensionHostStartup", u); + return null; + }); + this.r.then(() => { + t.forEach(c => this.activateByEvent(c, 0)); + this.D(cmr({ + measure: () => this.C() + })); + }); + } + async disconnect() { + await this.q?.disconnect?.(); + } + dispose() { + this.q?.dispose(); + this.h?.dispose(); + for (let e = 0, t = this.j.length; e < t; e++) { + const s = this.j[e]; + try { + s.dispose(); + } catch (n) { + xs(n); + } + } + this.r = null; + super.dispose(); + } + async C() { + const e = await this.r; + if (!e) { + return null; + } + const t = await this.F(e); + const s = await this.I(e); + const n = await this.H(e); + return { + remoteAuthority: this.q.remoteAuthority, + latency: t, + down: s, + up: n + }; + } + async ready() { + await this.r; + } + async F(e) { + let s = 0; + for (let n = 0; n < 10; n++) { + const r = ic.create(); + await e.test_latency(n); + r.stop(); + s += r.elapsed(); + } + return s / 10; + } + static G(e, t) { + return e * 1000 * 8 / t; + } + async H(e) { + const s = Ii.alloc(10485760); + const n = Math.ceil(Math.random() * 256); + for (let o = 0; o < s.byteLength; o++) { + s.writeUInt8(o, n); + } + const r = ic.create(); + await e.test_up(s); + r.stop(); + return Smt.G(10485760, r.elapsed()); + } + async I(e) { + const s = ic.create(); + await e.test_down(10485760); + s.stop(); + return Smt.G(10485760, s.elapsed()); + } + J(e, t) { + let s = null; + if (smr || this.w.logExtensionHostCommunication) { + s = new lmr(e); + } else if (kmt.isEnabled()) { + s = new kmt(this.y); + } else { + s = new amr(e); + } + this.h = new tmr(t, s); + this.D(this.h.onDidChangeResponsiveState(c => this.c.fire(c))); + let n = null; + let r = []; + const o = { + remoteAuthority: this.q.remoteAuthority, + extensionHostKind: this.kind, + getProxy: c => this.h.getProxy(c), + set: (c, u) => this.h.set(c, u), + dispose: () => this.h.dispose(), + assertRegistered: c => this.h.assertRegistered(c), + drain: () => this.h.drain(), + internalExtensionService: this.t, + _setExtensionHostProxy: c => { + n = c; + }, + _setAllMainProxyIdentifiers: c => { + r = c; + } + }; + const a = ymt.getNamedCustomers(); + for (let c = 0, u = a.length; c < u; c++) { + const [d, h] = a[c]; + try { + const g = this.u.createInstance(h, o); + this.j.push(g); + this.h.set(d, g); + } catch (g) { + this.z.error(`Cannot instantiate named customer: '${d.sid}'`); + this.z.error(g); + xs(g); + } + } + const l = ymt.getCustomers(); + for (const c of l) { + try { + const u = this.u.createInstance(c, o); + this.j.push(u); + } catch (u) { + this.z.error(u); + xs(u); + } + } + if (!n) { + throw new Error("Missing IExtensionHostProxy!"); + } + this.h.assertRegistered(r); + return n; + } + async activate(e, t) { + const s = await this.r; + if (s) { + return s.activate(e, t); + } else { + return false; + } + } + activateByEvent(e, t) { + if (t === 1 && !this.s) { + return Promise.resolve(); + } else { + if (!this.f.has(e)) { + this.f.set(e, this.L(e, t)); + } + return this.f.get(e); + } + } + activationEventIsDone(e) { + return this.g.has(e); + } + async L(e, t) { + if (!this.r) { + return; + } + const s = await this.r; + if (s) { + if (!this.q.extensions.containsActivationEvent(e)) { + this.g.add(e); + return; + } + await s.activateByEvent(e, t); + this.g.add(e); + } + } + async getInspectPort(e) { + if (this.q) { + if (e) { + await this.q.enableInspectPort(); + } + const t = this.q.getInspectPort(); + if (t) { + return t; + } + } + } + async resolveAuthority(e, t) { + const s = ic.create(false); + const n = () => `[${$A(this.q.runningLocation.kind)}${this.q.runningLocation.affinity}][resolveAuthority(${PG(e)},${t})][${s.elapsed()}ms] `; + const r = c => this.z.info(`${n()}${c}`); + const o = (c, u = undefined) => this.z.error(`${n()}${c}`, u); + r("obtaining proxy..."); + const a = await this.r; + if (!a) { + o("no proxy"); + return { + type: "error", + error: { + message: "Cannot resolve authority", + code: kE.Unknown, + detail: undefined + } + }; + } + r("invoking..."); + const l = new XZ(); + try { + l.cancelAndSet(() => r("waiting..."), 1000); + const c = await a.resolveAuthority(e, t); + l.dispose(); + if (c.type === "ok") { + r(`returned ${c.value.authority.connectTo}`); + } else { + o("returned an error", c.error); + } + return c; + } catch (c) { + l.dispose(); + o("returned an error", c); + return { + type: "error", + error: { + message: c.message, + code: kE.Unknown, + detail: c + } + }; + } + } + async getCanonicalURI(e, t) { + const s = await this.r; + if (!s) { + throw new Error("Cannot resolve canonical URI"); + } + return s.getCanonicalURI(e, t); + } + async start(e, t, s) { + const n = await this.r; + if (!n) { + return; + } + const r = this.q.extensions.set(e, t, s); + return n.startExtensionHost(r); + } + async extensionTestsExecute() { + const e = await this.r; + if (!e) { + throw new Error("Could not obtain Extension Host Proxy"); + } + return e.extensionTestsExecute(); + } + representsRunningLocation(e) { + return this.q.runningLocation.equals(e); + } + async deltaExtensions(e) { + const t = await this.r; + if (!t) { + return; + } + const s = this.q.extensions.delta(e); + if (s) { + return t.deltaExtensions(s); + } + } + containsExtension(e) { + return this.q.extensions?.containsExtension(e) ?? false; + } + async setRemoteEnvironment(e) { + const t = await this.r; + if (t) { + return t.setRemoteEnvironment(e); + } + } +}; +xmt = Smt = __decorate([__param(3, re), __param(4, Wn), __param(5, Ot), __param(6, Bt)], xmt); +function B6s(i, e) { + if (e) { + return `${$A(i)} pid: ${e}`; + } else { + return `${$A(i)}`; + } +} +var rmr = [["#2977B1", "#FC802D", "#34A13A", "#D3282F", "#9366BA"], ["#8B564C", "#E177C0", "#7F7F7F", "#BBBE3D", "#2EBECD"]]; +function U6s(i) { + if (Array.isArray(i)) { + return i; + } + if (i && typeof i == "object" && typeof i.toString == "function") { + const e = i.toString(); + if (e !== "[object Object]") { + return e; + } + } + return i; +} +function omr(i) { + if (Array.isArray(i)) { + return i.map(U6s); + } else { + return U6s(i); + } +} +var amr = class { + constructor(i) { + this.c = i; + } + logIncoming(i, e, t, s, n) { + JU.instance.recordIncoming(this.c, i, e, t, s, n); + } + logOutgoing(i, e, t, s, n) { + JU.instance.recordOutgoing(this.c, i, e, t, s, n); + } +}; +var E0e = class { + constructor() { + this.c = 0; + this.d = 0; + this.e = Number.MAX_VALUE; + this.f = 0; + } + record(i) { + this.c++; + this.d += i; + this.e = Math.min(this.e, i); + this.f = Math.max(this.f, i); + } + get count() { + return this.c; + } + get min() { + if (this.c > 0) { + return this.e; + } else { + return 0; + } + } + get max() { + return this.f; + } + get avg() { + if (this.c > 0) { + return this.d / this.c; + } else { + return 0; + } + } +}; +var JU = class w_n { + constructor() { + this.d = false; + this.e = Date.now(); + this.f = new Map(); + } + static get instance() { + this.c ||= new w_n(); + return this.c; + } + g(e) { + if (!this.f.has(e)) { + this.f.set(e, { + incoming: { + total: 0, + count: 0, + byCommand: new Map(), + pendingRequests: new Map(), + latencies: new E0e(), + oldestRequest: undefined + }, + outgoing: { + total: 0, + count: 0, + byCommand: new Map(), + pendingRequests: new Map(), + latencies: new E0e(), + oldestRequest: undefined + } + }); + } + return this.f.get(e); + } + isProfiling() { + return this.d; + } + reset() { + this.d = false; + this.f.clear(); + } + toggle() { + this.d = !this.d; + if (this.d) { + this.e = Date.now(); + } + } + recordIncoming(e, t, s, n, r, o) { + const a = this.g(e); + if (n === 0) { + const l = a.outgoing.pendingRequests.get(s); + if (l) { + a.outgoing.pendingRequests.delete(s); + if (a.outgoing.oldestRequest?.req === s) { + a.outgoing.oldestRequest = this.h(a.outgoing.pendingRequests); + } + if (!this.isProfiling()) { + return; + } + const c = Date.now() - l.time; + a.outgoing.latencies.record(c); + if (l.command) { + const u = a.outgoing.byCommand.get(l.command); + if (u) { + u.latencies.record(c); + } + } + } + } else { + const l = this.j(r); + const c = Date.now(); + a.incoming.pendingRequests.set(s, { + time: c, + command: l || r + }); + a.incoming.oldestRequest ||= { + time: c, + command: l || r, + req: s + }; + if (!this.isProfiling()) { + return; + } + a.incoming.total += t; + a.incoming.count++; + if (l) { + const u = a.incoming.byCommand.get(l) || { + count: 0, + bytes: 0, + latencies: new E0e() + }; + u.count++; + u.bytes += t; + a.incoming.byCommand.set(l, u); + } + } + } + recordOutgoing(e, t, s, n, r, o) { + const a = this.g(e); + if (n === 0) { + const l = this.j(r); + const c = Date.now(); + a.outgoing.pendingRequests.set(s, { + time: c, + command: l || r + }); + a.outgoing.oldestRequest ||= { + time: c, + command: l || r, + req: s + }; + if (!this.isProfiling()) { + return; + } + a.outgoing.total += t; + a.outgoing.count++; + if (l) { + const u = a.outgoing.byCommand.get(l) || { + count: 0, + bytes: 0, + latencies: new E0e() + }; + u.count++; + u.bytes += t; + a.outgoing.byCommand.set(l, u); + } + } else { + const l = a.incoming.pendingRequests.get(s); + if (l) { + a.incoming.pendingRequests.delete(s); + if (a.incoming.oldestRequest?.req === s) { + a.incoming.oldestRequest = this.h(a.incoming.pendingRequests); + } + if (!this.isProfiling()) { + return; + } + const c = Date.now() - l.time; + a.incoming.latencies.record(c); + if (l.command) { + const u = a.incoming.byCommand.get(l.command); + if (u) { + u.latencies.record(c); + } + } + } + } + } + h(e) { + if (e.size === 0) { + return; + } + let t = Number.MAX_VALUE; + let s; + let n; + for (const [r, { + time: o, + command: a + }] of e) { + if (o < t) { + t = o; + s = r; + n = a; + } + } + if (s !== undefined) { + return { + time: t, + command: n, + req: s + }; + } else { + return undefined; + } + } + j(e) { + const t = e.match(/^(?:request|receiveRequest): ([^(]+)/); + if (t) { + return t[1].trim(); + } else { + return null; + } + } + k(e) { + const t = e.split(".", 2); + if (t.length > 1) { + return t[0]; + } else { + return "Other"; + } + } + getPendingRequestsSnapshot() { + const e = new Map(); + const t = Date.now(); + for (const [s, n] of this.f) { + const r = n.incoming.pendingRequests.size + n.outgoing.pendingRequests.size; + const o = n.incoming.oldestRequest ? { + command: n.incoming.oldestRequest.command, + age: t - n.incoming.oldestRequest.time, + direction: "incoming" + } : undefined; + const a = n.outgoing.oldestRequest ? { + command: n.outgoing.oldestRequest.command, + age: t - n.outgoing.oldestRequest.time, + direction: "outgoing" + } : undefined; + let l; + if (o && a) { + l = o.age > a.age ? o : a; + } else { + l = o || a; + } + e.set(s, { + total: r, + oldestRequest: l + }); + } + return e; + } + generateReport() { + let e = `# Extension Host RPC Statistics + +`; + e += `*Duration: ${((Date.now() - this.e) / 1000).toFixed(1)}s* + +`; + const t = this.l; + const s = this.o; + const n = r => { + if (r < 1000) { + return `${r.toFixed(0)}ms`; + } + if (r < 60000) { + return `${(r / 1000).toFixed(1)}s`; + } + const o = Math.floor(r / 60000); + const a = Math.floor(r % 60000 / 1000); + return `${o}m ${a}s`; + }; + for (const [r, o] of this.f) { + e += `## ${$A(r)} + +`; + e += `### Traffic Summary +`; + e += `- **Incoming:** ${s(o.incoming.total)} (${t(o.incoming.count)} messages) +`; + e += `- **Outgoing:** ${s(o.outgoing.total)} (${t(o.outgoing.count)} messages) +`; + e += `- **Messages/sec:** ${((o.incoming.count + o.outgoing.count) * 1000 / (Date.now() - this.e)).toFixed(1)} + +`; + const a = Date.now(); + let l; + let c; + for (const [, g] of o.incoming.pendingRequests) { + const p = a - g.time; + if (!l || p > l.age) { + l = { + command: g.command, + age: p + }; + } + } + for (const [, g] of o.outgoing.pendingRequests) { + const p = a - g.time; + if (!c || p > c.age) { + c = { + command: g.command, + age: p + }; + } + } + e += `### Pending Requests +`; + e += `- **Incoming:** ${t(o.incoming.pendingRequests.size)} +`; + e += `- **Outgoing:** ${t(o.outgoing.pendingRequests.size)} +`; + if (l) { + e += `- **Oldest Incoming:** \`${l.command}\` (${n(l.age)}) +`; + } + if (c) { + e += `- **Oldest Outgoing:** \`${c.command}\` (${n(c.age)}) +`; + } + e += ` +`; + e += `### Overall Latency (ms) +`; + e += `|Direction|Min|Avg|Max| +|-|-|-|-| +`; + e += `|**Incoming**|${o.incoming.latencies.min.toFixed(1)}ms|${o.incoming.latencies.avg.toFixed(1)}ms|${o.incoming.latencies.max.toFixed(1)}ms| +`; + e += `|**Outgoing**|${o.outgoing.latencies.min.toFixed(1)}ms|${o.outgoing.latencies.avg.toFixed(1)}ms|${o.outgoing.latencies.max.toFixed(1)}ms| + +`; + const u = new Map([...o.incoming.byCommand, ...o.outgoing.byCommand]); + const d = new Map(); + for (const [g, p] of u) { + const b = this.k(g); + if (!d.has(b)) { + d.set(b, { + count: 0, + bytes: 0, + latencies: new E0e(), + commands: [] + }); + } + const v = d.get(b); + v.count += p.count; + v.bytes += p.bytes; + v.latencies.record(p.latencies.avg); + v.commands.push([g, p]); + } + const h = [...d.entries()].sort((g, p) => p[1].latencies.avg - g[1].latencies.avg); + e += `### Command Groups +`; + e += `|Namespace|Avg Latency|Count|Total Size| +`; + e += `|-|-:|-:|-:| +`; + for (const [g, p] of h) { + e += `|**\`${g}\`**|${p.latencies.avg.toFixed(1)}ms|${t(p.count)}|${s(p.bytes)}| +`; + } + e += ` + +`; + e += `### Top Commands By Latency +`; + e += ` + +`; + e += `|Command|Count|Avg|Max|Min|Traffic| +`; + e += `|-|-:|-:|-:|-:|-:| +`; + for (const [g, p] of h) { + e += `|| +`; + e += `|**\`${g}\`**| +`; + e += `|| +`; + const b = p.commands.sort((v, y) => y[1].latencies.avg - v[1].latencies.avg).slice(0, 10); + for (const [v, y] of b) { + const w = v.split(".").slice(1).join("."); + e += `|        \`${w}\`|${t(y.count)}|${y.latencies.avg.toFixed(1)}ms|${y.latencies.max.toFixed(1)}ms|${y.latencies.min.toFixed(1)}ms|${s(y.bytes)}| +`; + } + } + e += ` + +`; + } + return e; + } + l(e) { + return e.toLocaleString(); + } + o(e) { + const t = ["B", "KB", "MB", "GB"]; + let s = e; + let n = 0; + while (s >= 1024 && n < t.length - 1) { + s /= 1024; + n++; + } + return `${s.toFixed(1)} ${t[n]}`; + } +}; +var lmr = class { + constructor(i) { + this.e = i; + this.c = 0; + this.d = 0; + } + f(i, e, t, s, n, r, o) { + o = omr(o); + const a = rmr[n]; + const l = nmr ? a[s % a.length] : "#000000"; + let c = [`%c[${$A(this.e)}][${i}]%c[${String(e).padStart(7)}]%c[len: ${String(t).padStart(5)}]%c${String(s).padStart(5)} - ${r}`, "color: darkgreen", "color: grey", "color: grey", `color: ${l}`]; + if (/\($/.test(r)) { + c = c.concat(o); + c.push(")"); + } else { + c.push(o); + } + ("stdlog" in console ? console.stdlog : console.log).apply(console, c); + } + logIncoming(i, e, t, s, n) { + this.c += i; + this.f("Ext → Win", this.c, i, e, t, s, n); + } + logOutgoing(i, e, t, s, n) { + this.d += i; + this.f("Win → Ext", this.d, i, e, t, s, n); + } +}; +var kmt = class { + static isEnabled() { + return Math.trunc(Math.random() * 1000) < 0.5; + } + constructor(e) { + this.d = e; + this.c = new Map(); + } + logIncoming(e, t, s, n) { + if (s === 0 && /^receiveReply(Err)?:/.test(n)) { + const r = this.c.get(t) ?? "unknown_reply"; + this.c.delete(t); + this.d.publicLog2("extensionhost.incoming", { + type: `${n} ${r}`, + length: e + }); + } + if (s === 1 && /^receiveRequest /.test(n)) { + this.d.publicLog2("extensionhost.incoming", { + type: `${n}`, + length: e + }); + } + } + logOutgoing(e, t, s, n) { + if (s === 0 && n.startsWith("request: ")) { + this.c.set(t, n); + this.d.publicLog2("extensionhost.outgoing", { + type: n, + length: e + }); + } + } +}; +kmt = __decorate([__param(0, Ot)], kmt); +var I0e = []; +function cmr(i) { + I0e.push(i); + return { + dispose: () => { + for (let e = 0; e < I0e.length; e++) { + if (I0e[e] === i) { + I0e.splice(e, 1); + return; + } + } + } + }; +} +function umr() { + return I0e.slice(0); +} +J(class FFt extends se { + constructor() { + super({ + id: "editor.action.measureExtHostLatency", + title: W(12905, "Measure Extension Host Latency"), + category: pt.Developer, + f1: true + }); + } + async run(e) { + const t = e.get(Te); + const s = await Promise.all(umr().map(n => n.measure())); + t.openEditor({ + resource: undefined, + contents: s.map(FFt.c).join(` + +`), + options: { + pinned: true + } + }); + } + static c(e) { + if (e) { + return `${e.remoteAuthority ? `Authority: ${e.remoteAuthority} +` : ""}Roundtrip latency: ${e.latency.toFixed(3)}ms +Up: ${FFt.d(e.up)} +Down: ${FFt.d(e.down)} +`; + } else { + return ""; + } + } + static d(e) { + if (e <= 1024) { + return `${e} bps`; + } else if (e < 1048576) { + return `${(e / 1024).toFixed(1)} kbps`; + } else { + return `${(e / 1024 / 1024).toFixed(1)} Mbps`; + } + } +}); +J(class extends se { + constructor() { + super({ + id: "exthost.action.toggleExtHostProfiler", + title: W(12906, "Start Extension Host Profiler"), + category: pt.Developer, + f1: true + }); + } + async run(e) { + const t = e.get(Te); + const s = e.get(gt); + const n = e.get(ni); + const r = async () => { + const l = JU.instance.generateReport(); + JU.instance.reset(); + const c = await t.openEditor({ + resource: undefined, + contents: l + }); + if (c?.input?.resource) { + await s.executeCommand("markdown.showPreview", c.input.resource); + } + }; + if (JU.instance.isProfiling()) { + await r(); + return; + } + JU.instance.toggle(); + const o = { + id: "stopExtHostStats", + label: "Stop", + tooltip: "Stop profiler and show results", + enabled: true, + class: "codicon codicon-graph-line", + run: async () => { + o.enabled = false; + if (JU.instance.isProfiling()) { + await r(); + a.close(); + } + } + }; + const a = await n.notify({ + severity: es.Info, + message: "Extension Host Profiler is running", + progress: { + infinite: true + }, + actions: { + primary: [o] + } + }); + } +}); +var EE = Ve("metricsService"); +var hZt = class extends H { + constructor(e, t, s, n) { + super(); + this.h = e; + this.j = t; + this.m = s; + this.n = n; + this.a = undefined; + this.t = Array(1000).fill(null); + this.u = 0; + const r = this.h.version; + this.c = zqi; + this.b = jqi; + if (r.includes("debug")) { + this.f = "debug"; + } else if (r.includes("nightly")) { + this.f = "nightly"; + } else { + this.f = "stable"; + } + xt.setInterval(() => { + if (!this.w()) { + return; + } + let o = false; + this.t.forEach(a => { + if (a != null && this.a) { + const l = a; + o = true; + switch (l.method) { + case "increment": + this.a.increment(l.stat); + break; + case "decrement": + this.a.decrement(l.stat); + break; + case "distribution": + this.a.distribution(l.stat); + break; + case "gauge": + this.a.gauge(l.stat); + break; + } + } + }); + if (o) { + this.t = Array(1000).fill(null); + this.u = 0; + } + }, 30000); + this.g = new XZ(); + this.g.cancelAndSet(() => this.q(), 5000); + this.D(this.g); + } + q() { + const e = JU.instance.getPendingRequestsSnapshot(); + for (const [t, s] of e) { + const n = $A(t); + this.gauge({ + stat: "renderer.exthost.rpc.pending_requests", + value: s.total, + tags: { + kind: n + } + }); + if (s.oldestRequest) { + this.gauge({ + stat: "renderer.exthost.rpc.oldest_pending_request_age", + value: s.oldestRequest.age, + tags: { + kind: n, + command: s.oldestRequest.command, + direction: s.oldestRequest.direction + } + }); + } + } + } + r(e) { + const t = e.tags; + const n = this.n.getConnection() ? "remote" : "local"; + const r = this.j.reactivePrivacyMode(); + if (Array.isArray(t)) { + const a = [...t]; + if (this.c) { + a.push(`platform:${this.c}`); + } + if (this.b) { + a.push(`arch:${this.b}`); + } + a.push(`channel:${this.f}`); + a.push(`connection_type:${n}`); + if (r !== undefined) { + a.push(`privacy_mode:${r}`); + } + return { + ...e, + tags: a + }; + } + const o = { + ...(t || {}), + channel: this.f, + connection_type: n + }; + if (this.c) { + o.platform = this.c; + } + if (this.b) { + o.arch = this.b; + } + if (r !== undefined) { + o.privacy_mode = String(r); + } + return { + ...e, + tags: o + }; + } + w() { + const e = this.j.reactivePrivacyMode(); + const t = this.m.cachedServerConfig.metricsConfig; + if (t) { + if (e) { + return t.enabledInPrivacyMode === true; + } else { + return t.enabledInNonPrivacyMode === true; + } + } else { + return true; + } + } + increment(e, t = false) { + if (!this.w()) { + return; + } + const s = this.r(e); + if (this.a && !t) { + this.a.increment(s); + } else { + this.t[this.u % 1000] = { + stat: s, + method: "increment" + }; + this.u++; + } + } + decrement(e, t = false) { + if (!this.w()) { + return; + } + const s = this.r(e); + if (this.a && !t) { + this.a.decrement(s); + } else { + this.t[this.u % 1000] = { + stat: s, + method: "decrement" + }; + this.u++; + } + } + distribution(e, t = false) { + if (!this.w()) { + return; + } + const s = this.r(e); + if (this.a && !t) { + this.a.distribution(s); + } else { + this.t[this.u % 1000] = { + stat: s, + method: "distribution" + }; + this.u++; + } + } + gauge(e, t = false) { + if (!this.w()) { + return; + } + const s = this.r(e); + if (this.a && !t) { + this.a.gauge(s); + } else { + this.t[this.u % 1000] = { + stat: s, + method: "gauge" + }; + this.u++; + } + } + registerMetricsProvider(e) { + this.a = e; + } + unregisterMetricsProvider() { + this.a = undefined; + } +}; +hZt = __decorate([__param(0, ys), __param(1, $u), __param(2, Qw), __param(3, al)], hZt); +it(EE, hZt, 1); +Be.appendMenuItem(_.EditorContext, { + submenu: _.EditorContextPeek, + title: f(1117, null), + group: "navigation", + order: 100 +}); +var Emt = class C_n { + static is(e) { + if (!e || typeof e != "object") { + return false; + } else { + return !!(e instanceof C_n) || !!je.isIPosition(e.position) && !!e.model; + } + } + constructor(e, t) { + this.model = e; + this.position = t; + } +}; +var GU = class T3 extends Uh { + static { + this.d = new Map(); + } + static { + this.f = new Set(); + } + static all() { + return T3.d.values(); + } + static g(e) { + const t = { + ...e, + f1: true + }; + if (t.menu) { + for (const s of Ws.wrap(t.menu)) { + if (s.id === _.EditorContext || s.id === _.EditorContextPeek) { + s.when = T.and(e.precondition, s.when); + } + } + } + return t; + } + constructor(e, t) { + super(T3.g(t)); + this.configuration = e; + T3.d.set(t.id, this); + } + runEditorCommand(e, t, s, n) { + if (!t.hasModel()) { + return Promise.resolve(undefined); + } + const r = e.get(ni); + const o = e.get(ps); + const a = e.get(Jp); + const l = e.get(vmt); + const c = e.get(nn); + const u = e.get(re); + const d = e.get(EE); + const h = t.getModel(); + const g = t.getPosition(); + const p = Emt.is(s) ? s : new Emt(h, g); + const b = new J4(t, 5); + const v = performance.now(); + const y = mm(this.h(c, p.model, p.position, b.token), b.token).then(async w => { + if (!w || b.token.isCancellationRequested) { + return; + } + Fc(w.ariaMessage); + let C; + if (w.referenceAt(h.uri, g)) { + const x = this.k(t); + if (!T3.f.has(x) && T3.d.has(x)) { + C = T3.d.get(x); + } + } + if (this.configuration.onlyGoToDefIfDefAndSingleResult) { + C = null; + } + const S = w.references.length; + if (S === 0) { + if (!this.configuration.muteMessage) { + const x = h.getWordAtPosition(g); + iv.get(t)?.showMessage(this.j(x), g); + } + } else if (S === 1 && C) { + T3.f.add(this.desc.id); + u.invokeFunction(x => C.runEditorCommand(x, t, s, n).finally(() => { + T3.f.delete(this.desc.id); + })); + } else { + return this.m(o, l, d, t, w, v, n); + } + }, w => { + r.error(w); + }).finally(() => { + b.dispose(); + }); + a.showWhile(y, 250); + return y; + } + async m(e, t, s, n, r, o, a) { + const l = this.l(n); + if (!(n instanceof Zy) && (this.configuration.openInPeek || l === "peek" && r.references.length > 1)) { + const c = performance.now() - o; + s.distribution({ + stat: "editor.goToSymbol.duration", + value: c, + tags: { + type: this.desc.id, + outcome: "peek" + } + }); + this.o(n, r, a); + } else { + const c = r.firstReference(); + const u = r.references.length > 1 && l === "gotoAndPeek"; + const d = performance.now() - o; + s.distribution({ + stat: "editor.goToSymbol.duration", + value: d, + tags: { + type: this.desc.id, + outcome: u ? "gotoAndPeek" : "goto" + } + }); + const h = await this.n(n, e, c, this.configuration.openToSide, !u); + if (u && h) { + this.o(h, r, a); + } else { + r.dispose(); + } + if (l === "goto") { + t.put(c); + } + } + } + async n(e, t, s, n, r) { + let o; + if (aGn(s)) { + o = s.targetSelectionRange; + } + o ||= s.range; + if (!o) { + return; + } + const a = await t.openCodeEditor({ + resource: s.uri, + options: { + selection: Z.collapseToStart(o), + selectionRevealType: 3, + selectionSource: "code.jump" + } + }, e, n); + if (a) { + if (r) { + const l = a.getModel(); + const c = a.createDecorationsCollection([{ + range: o, + options: { + description: "symbol-navigate-action-highlight", + className: "symbolHighlight" + } + }]); + setTimeout(() => { + if (a.getModel() === l) { + c.clear(); + } + }, 350); + } + return a; + } + } + o(e, t, s) { + const n = TO.get(e); + if (n && e.hasModel()) { + n.toggleWidget(s ?? e.getSelection(), ql(r => Promise.resolve(t)), this.configuration.openInPeek); + } else { + t.dispose(); + } + } +}; +var Gne = class extends GU { + async h(i, e, t, s) { + return new xE(await cP(i.definitionProvider, e, t, false, s), f(1118, null)); + } + j(i) { + if (i && i.word) { + return f(1119, null, i.word); + } else { + return f(1120, null); + } + } + k(i) { + return i.getOption(60).alternativeDefinitionCommand; + } + l(i) { + return i.getOption(60).multipleDefinitions; + } +}; +J(class h9i extends Gne { + static { + this.id = "editor.action.revealDefinition"; + } + constructor() { + super({ + openToSide: false, + openInPeek: false, + muteMessage: false + }, { + id: h9i.id, + title: { + ...W(1144, "Go to Definition"), + mnemonicTitle: f(1121, null) + }, + precondition: ke.hasDefinitionProvider, + keybinding: [{ + when: ke.editorTextFocus, + primary: 70, + weight: 100 + }, { + when: T.and(ke.editorTextFocus, r0), + primary: 2118, + weight: 100 + }], + menu: [{ + id: _.EditorContext, + group: "navigation", + order: 1.1 + }, { + id: _.MenubarGoMenu, + precondition: null, + group: "4_symbol_nav", + order: 2 + }] + }); + ei.registerCommandAlias("editor.action.goToDeclaration", h9i.id); + } +}); +J(class f9i extends Gne { + static { + this.id = "editor.action.revealDefinitionAside"; + } + constructor() { + super({ + openToSide: true, + openInPeek: false, + muteMessage: false + }, { + id: f9i.id, + title: W(1145, "Open Definition to the Side"), + precondition: T.and(ke.hasDefinitionProvider, ke.isInEmbeddedEditor.toNegated()), + keybinding: [{ + when: ke.editorTextFocus, + primary: Ai(_r, 70), + mac: { + primary: Ai(Xr, 70) + }, + weight: 100 + }, { + when: T.and(ke.editorTextFocus, r0), + primary: Ai(_r, 2118), + mac: { + primary: Ai(Xr, 2118) + }, + weight: 100 + }] + }); + ei.registerCommandAlias("editor.action.openDeclarationToTheSide", f9i.id); + } +}); +J(class g9i extends Gne { + static { + this.id = "editor.action.peekDefinition"; + } + constructor() { + super({ + openToSide: false, + openInPeek: true, + muteMessage: false + }, { + id: g9i.id, + title: W(1146, "Peek Definition"), + precondition: T.and(ke.hasDefinitionProvider, Ib.notInPeekEditor, ke.isInEmbeddedEditor.toNegated()), + keybinding: { + when: ke.editorTextFocus, + primary: 582, + linux: { + primary: 3140 + }, + weight: 100 + }, + menu: { + id: _.EditorContextPeek, + group: "peek", + order: 2 + } + }); + ei.registerCommandAlias("editor.action.previewDeclaration", g9i.id); + } +}); +var W6s = class extends GU { + async h(i, e, t, s) { + return new xE(await TQt(i.declarationProvider, e, t, false, s), f(1122, null)); + } + j(i) { + if (i && i.word) { + return f(1123, null, i.word); + } else { + return f(1124, null); + } + } + k(i) { + return i.getOption(60).alternativeDeclarationCommand; + } + l(i) { + return i.getOption(60).multipleDeclarations; + } +}; +J(class S_n extends W6s { + static { + this.id = "editor.action.revealDeclaration"; + } + constructor() { + super({ + openToSide: false, + openInPeek: false, + muteMessage: false + }, { + id: S_n.id, + title: { + ...W(1147, "Go to Declaration"), + mnemonicTitle: f(1125, null) + }, + precondition: T.and(ke.hasDeclarationProvider, ke.isInEmbeddedEditor.toNegated()), + menu: [{ + id: _.EditorContext, + group: "navigation", + order: 1.3 + }, { + id: _.MenubarGoMenu, + precondition: null, + group: "4_symbol_nav", + order: 3 + }] + }); + } + j(e) { + if (e && e.word) { + return f(1126, null, e.word); + } else { + return f(1127, null); + } + } +}); +J(class extends W6s { + constructor() { + super({ + openToSide: false, + openInPeek: true, + muteMessage: false + }, { + id: "editor.action.peekDeclaration", + title: W(1148, "Peek Declaration"), + precondition: T.and(ke.hasDeclarationProvider, Ib.notInPeekEditor, ke.isInEmbeddedEditor.toNegated()), + menu: { + id: _.EditorContextPeek, + group: "peek", + order: 3 + } + }); + } +}); +var V6s = class extends GU { + async h(i, e, t, s) { + return new xE(await Vpt(i.typeDefinitionProvider, e, t, false, s), f(1128, null)); + } + j(i) { + if (i && i.word) { + return f(1129, null, i.word); + } else { + return f(1130, null); + } + } + k(i) { + return i.getOption(60).alternativeTypeDefinitionCommand; + } + l(i) { + return i.getOption(60).multipleTypeDefinitions; + } +}; +J(class x_n extends V6s { + static { + this.ID = "editor.action.goToTypeDefinition"; + } + constructor() { + super({ + openToSide: false, + openInPeek: false, + muteMessage: false + }, { + id: x_n.ID, + title: { + ...W(1149, "Go to Type Definition"), + mnemonicTitle: f(1131, null) + }, + precondition: ke.hasTypeDefinitionProvider, + keybinding: { + when: ke.editorTextFocus, + primary: 0, + weight: 100 + }, + menu: [{ + id: _.EditorContext, + group: "navigation", + order: 1.4 + }, { + id: _.MenubarGoMenu, + precondition: null, + group: "4_symbol_nav", + order: 3 + }] + }); + } +}); +J(class k_n extends V6s { + static { + this.ID = "editor.action.peekTypeDefinition"; + } + constructor() { + super({ + openToSide: false, + openInPeek: true, + muteMessage: false + }, { + id: k_n.ID, + title: W(1150, "Peek Type Definition"), + precondition: T.and(ke.hasTypeDefinitionProvider, Ib.notInPeekEditor, ke.isInEmbeddedEditor.toNegated()), + menu: { + id: _.EditorContextPeek, + group: "peek", + order: 4 + } + }); + } +}); +var H6s = class extends GU { + async h(i, e, t, s) { + return new xE(await _ne(i.implementationProvider, e, t, false, s), f(1132, null)); + } + j(i) { + if (i && i.word) { + return f(1133, null, i.word); + } else { + return f(1134, null); + } + } + k(i) { + return i.getOption(60).alternativeImplementationCommand; + } + l(i) { + return i.getOption(60).multipleImplementations; + } +}; +J(class E_n extends H6s { + static { + this.ID = "editor.action.goToImplementation"; + } + constructor() { + super({ + openToSide: false, + openInPeek: false, + muteMessage: false + }, { + id: E_n.ID, + title: { + ...W(1151, "Go to Implementations"), + mnemonicTitle: f(1135, null) + }, + precondition: ke.hasImplementationProvider, + keybinding: { + when: ke.editorTextFocus, + primary: 2118, + weight: 100 + }, + menu: [{ + id: _.EditorContext, + group: "navigation", + order: 1.45 + }, { + id: _.MenubarGoMenu, + precondition: null, + group: "4_symbol_nav", + order: 4 + }] + }); + } +}); +J(class I_n extends H6s { + static { + this.ID = "editor.action.peekImplementation"; + } + constructor() { + super({ + openToSide: false, + openInPeek: true, + muteMessage: false + }, { + id: I_n.ID, + title: W(1152, "Peek Implementations"), + precondition: T.and(ke.hasImplementationProvider, Ib.notInPeekEditor, ke.isInEmbeddedEditor.toNegated()), + keybinding: { + when: ke.editorTextFocus, + primary: 3142, + weight: 100 + }, + menu: { + id: _.EditorContextPeek, + group: "peek", + order: 5 + } + }); + } +}); +var q6s = class extends GU { + j(i) { + if (i) { + return f(1136, null, i.word); + } else { + return f(1137, null); + } + } + k(i) { + return i.getOption(60).alternativeReferenceCommand; + } + l(i) { + return i.getOption(60).multipleReferences; + } +}; +J(class extends q6s { + constructor() { + super({ + openToSide: false, + openInPeek: false, + muteMessage: false + }, { + id: "editor.action.goToReferences", + title: { + ...W(1153, "Go to References"), + mnemonicTitle: f(1138, null) + }, + precondition: T.and(ke.hasReferenceProvider, Ib.notInPeekEditor, ke.isInEmbeddedEditor.toNegated()), + keybinding: { + when: ke.editorTextFocus, + primary: 1094, + weight: 100 + }, + menu: [{ + id: _.EditorContext, + group: "navigation", + order: 1.45 + }, { + id: _.MenubarGoMenu, + precondition: null, + group: "4_symbol_nav", + order: 5 + }] + }); + } + async h(e, t, s, n) { + return new xE(await pG(e.referenceProvider, t, s, true, false, n), f(1139, null)); + } +}); +J(class extends q6s { + constructor() { + super({ + openToSide: false, + openInPeek: true, + muteMessage: false + }, { + id: "editor.action.referenceSearch.trigger", + title: W(1154, "Peek References"), + precondition: T.and(ke.hasReferenceProvider, Ib.notInPeekEditor, ke.isInEmbeddedEditor.toNegated()), + menu: { + id: _.EditorContextPeek, + group: "peek", + order: 6 + } + }); + } + async h(e, t, s, n) { + return new xE(await pG(e.referenceProvider, t, s, false, false, n), f(1140, null)); + } +}); +var dmr = class extends GU { + constructor(i, e, t) { + super(i, { + id: "editor.action.goToLocation", + title: W(1155, "Go to Any Symbol"), + precondition: T.and(Ib.notInPeekEditor, ke.isInEmbeddedEditor.toNegated()) + }); + this.e = e; + this.p = t; + } + async h(i, e, t, s) { + return new xE(this.e, f(1141, null)); + } + j(i) { + return i && f(1142, null, i.word) || ""; + } + l(i) { + return this.p ?? i.getOption(60).multipleReferences; + } + k() { + return ""; + } +}; +ei.registerCommand({ + id: "editor.action.goToLocations", + metadata: { + description: "Go to locations from a position in a file", + args: [{ + name: "uri", + description: "The text document in which to start", + constraint: V + }, { + name: "position", + description: "The position at which to start", + constraint: je.isIPosition + }, { + name: "locations", + description: "An array of locations.", + constraint: Array + }, { + name: "multiple", + description: "Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto`" + }, { + name: "noResultsMessage", + description: "Human readable message that shows when locations is empty." + }] + }, + handler: async (i, e, t, s, n, r, o) => { + yr(V.isUri(e)); + yr(je.isIPosition(t)); + yr(Array.isArray(s)); + yr(typeof n === "undefined" || typeof n == "string"); + yr(typeof o === "undefined" || typeof o == "boolean"); + const a = i.get(ps); + const l = await a.openCodeEditor({ + resource: e + }, a.getFocusedCodeEditor()); + if (no(l)) { + l.setPosition(t); + l.revealPositionInCenterIfOutsideViewport(t, 0); + return l.invokeWithinContext(c => { + const u = new class extends dmr { + j(d) { + return r || super.j(d); + } + }({ + muteMessage: !r, + openInPeek: !!o, + openToSide: false + }, s, n); + c.get(re).invokeFunction(u.run.bind(u), l); + }); + } + } +}); +ei.registerCommand({ + id: "editor.action.peekLocations", + metadata: { + description: "Peek locations from a position in a file", + args: [{ + name: "uri", + description: "The text document in which to start", + constraint: V + }, { + name: "position", + description: "The position at which to start", + constraint: je.isIPosition + }, { + name: "locations", + description: "An array of locations.", + constraint: Array + }, { + name: "multiple", + description: "Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto`" + }] + }, + handler: async (i, e, t, s, n) => { + i.get(gt).executeCommand("editor.action.goToLocations", e, t, s, n, undefined, true); + } +}); +ei.registerCommand({ + id: "editor.action.findReferences", + handler: (i, e, t) => { + yr(V.isUri(e)); + yr(je.isIPosition(t)); + const s = i.get(nn); + const n = i.get(ps); + return n.openCodeEditor({ + resource: e + }, n.getFocusedCodeEditor()).then(r => { + if (!no(r) || !r.hasModel()) { + return; + } + const o = TO.get(r); + if (!o) { + return; + } + const a = ql(c => pG(s.referenceProvider, r.getModel(), je.lift(t), false, false, c).then(u => new xE(u, f(1143, null)))); + const l = new Z(t.lineNumber, t.column, t.lineNumber, t.column); + return Promise.resolve(o.toggleWidget(l, a, false)); + }); + } +}); +ei.registerCommandAlias("editor.action.showReferences", "editor.action.peekLocations"); +Je(); +Wt(); +Ee(); +ks(); +te(); +Wi(); +async function hmr(i, e, t, s) { + const n = i.get(ns); + const r = i.get(ts); + const o = i.get(gt); + const a = i.get(re); + const l = i.get(ni); + await s.item.resolve(mt.None); + if (!s.part.location) { + return; + } + const c = s.part.location; + const u = []; + const d = new Set(Be.getMenuItems(_.EditorContext).map(g => GB(g) ? g.command.id : Ft())); + for (const g of GU.all()) { + if (d.has(g.desc.id)) { + u.push(new Yt(g.desc.id, Ma.label(g.desc, { + renderShortTitle: true + }), undefined, true, async () => { + const p = await n.createModelReference(c.uri); + try { + const b = new Emt(p.object.textEditorModel, Z.getStartPosition(c.range)); + const v = s.item.anchor.range; + await a.invokeFunction(g.runEditorCommand.bind(g), e, b, v); + } finally { + p.dispose(); + } + })); + } + } + if (s.part.command) { + const { + command: g + } = s.part; + u.push(new gr()); + u.push(new Yt(g.id, g.title, undefined, true, async () => { + try { + await o.executeCommand(g.id, ...(g.arguments ?? [])); + } catch (p) { + l.notify({ + severity: es.Error, + source: s.item.provider.displayName, + message: p + }); + } + })); + } + const h = e.getOption(132); + r.showContextMenu({ + domForShadowRoot: h ? e.getDomNode() ?? undefined : undefined, + getAnchor: () => { + const g = sd(t); + return { + x: g.left, + y: g.top + g.height + 8 + }; + }, + getActions: () => u, + onHide: () => { + e.focus(); + }, + autoSelectFirstItem: true + }); +} +async function j6s(i, e, t, s) { + const r = await i.get(ns).createModelReference(s.uri); + await t.invokeWithinContext(async o => { + const a = e.hasSideBySideModifier; + const l = o.get(Ne); + const c = Ib.inPeekEditor.getValue(l); + const u = !a && t.getOption(93) && !c; + return new Gne({ + openToSide: a, + openInPeek: u, + muteMessage: true + }, { + title: { + value: "", + original: "" + }, + id: "", + precondition: undefined + }).run(o, new Emt(r.object.textEditorModel, Z.getStartPosition(s.range)), Z.lift(s.range)); + }); + r.dispose(); +} +Wt(); +It(); +te(); +Wi(); +Qs(); +gi(); +var Kne; +var fmr = class p9i { + constructor() { + this.a = new vc(50); + } + get(e) { + const t = p9i.b(e); + return this.a.get(t); + } + set(e, t) { + const s = p9i.b(e); + this.a.set(s, t); + } + static b(e) { + return `${e.uri.toString()}/${e.getVersionId()}`; + } +}; +var z6s = Ve("IInlayHintsCache"); +it(z6s, fmr, 1); +var fZt = class { + constructor(i, e) { + this.item = i; + this.index = e; + } + get part() { + const i = this.item.hint.label; + if (typeof i == "string") { + return { + label: i + }; + } else { + return i[this.index]; + } + } +}; +var gmr = class { + constructor(i, e) { + this.part = i; + this.hasTriggerModifier = e; + } +}; +var J6s; +(function (i) { + i[i.Normal = 0] = "Normal"; + i[i.Invisible = 1] = "Invisible"; +})(J6s ||= {}); +var Yne = class { + static { + Kne = this; + } + static { + this.ID = "editor.contrib.InlayHints"; + } + static { + this.a = 1500; + } + static { + this.b = {}; + } + static get(e) { + return e.getContribution(Kne.ID) ?? undefined; + } + constructor(e, t, s, n, r, o, a) { + this.o = e; + this.q = t; + this.s = n; + this.t = r; + this.u = o; + this.v = a; + this.f = new Q(); + this.g = new Q(); + this.j = new Map(); + this.k = new w3t(this.o); + this.m = 0; + this.h = s.for(t.inlayHintsProvider, "InlayHint", { + min: 25 + }); + this.f.add(t.inlayHintsProvider.onDidChange(() => this.w())); + this.f.add(e.onDidChangeModel(() => this.w())); + this.f.add(e.onDidChangeModelLanguage(() => this.w())); + this.f.add(e.onDidChangeConfiguration(l => { + if (l.hasChanged(146)) { + this.w(); + } + })); + this.w(); + } + dispose() { + this.g.dispose(); + this.J(); + this.f.dispose(); + } + w() { + this.g.clear(); + this.J(); + const e = this.o.getOption(146); + if (e.enabled === "off") { + return; + } + const t = this.o.getModel(); + if (!t || !this.q.inlayHintsProvider.has(t)) { + return; + } + if (e.enabled === "on") { + this.m = 0; + } else { + let l; + let c; + if (e.enabled === "onUnlessPressed") { + l = 0; + c = 1; + } else { + l = 1; + c = 0; + } + this.m = l; + this.g.add(Y2.getInstance().event(u => { + if (!this.o.hasModel()) { + return; + } + const d = u.altKey && u.ctrlKey && !u.shiftKey && !u.metaKey ? c : l; + if (d !== this.m) { + this.m = d; + const h = this.o.getModel(); + const g = this.E(h); + this.G([h.getFullModelRange()], g); + o.schedule(0); + } + })); + } + const s = this.s.get(t); + if (s) { + this.G([t.getFullModelRange()], s); + } + this.g.add(Ue(() => { + if (!t.isDisposed()) { + this.D(t); + } + })); + let n; + const r = new Set(); + const o = new Vn(async () => { + const l = Date.now(); + n?.dispose(true); + n = new Xi(); + const c = t.onWillDispose(() => n?.cancel()); + try { + const u = n.token; + const d = await w5s.create(this.q.inlayHintsProvider, t, this.F(), u); + o.delay = this.h.update(t, Date.now() - l); + if (u.isCancellationRequested) { + d.dispose(); + return; + } + for (const h of d.provider) { + if (typeof h.onDidChangeInlayHints == "function" && !r.has(h)) { + r.add(h); + this.g.add(h.onDidChangeInlayHints(() => { + if (!o.isScheduled()) { + o.schedule(); + } + })); + } + } + this.g.add(d); + this.G(d.ranges, d.items); + this.D(t); + } catch (u) { + xs(u); + } finally { + n.dispose(); + c.dispose(); + } + }, this.h.get(t)); + this.g.add(o); + this.g.add(Ue(() => n?.dispose(true))); + o.schedule(0); + this.g.add(this.o.onDidScrollChange(l => { + if (l.scrollTopChanged || !o.isScheduled()) { + o.schedule(); + } + })); + const a = this.g.add(new ki()); + this.g.add(this.o.onDidChangeModelContent(l => { + n?.cancel(); + const c = Math.max(o.delay, 800); + this.l = { + position: this.o.getPosition(), + notEarlierThan: Date.now() + c + }; + a.value = Gd(() => o.schedule(0), c); + o.schedule(); + })); + this.g.add(this.o.onDidChangeConfiguration(l => { + if (l.hasChanged(146)) { + o.schedule(); + } + })); + this.g.add(this.z(() => o.schedule(0))); + this.g.add(this.x()); + this.g.add(this.A()); + } + x() { + const e = new Q(); + const t = e.add(new c0e(this.o)); + const s = new Q(); + e.add(s); + e.add(t.onMouseMoveOrRelevantKeyDown(n => { + const [r] = n; + const o = this.B(r); + const a = this.o.getModel(); + if (!o || !a) { + s.clear(); + return; + } + const l = new Xi(); + s.add(Ue(() => l.dispose(true))); + o.item.resolve(l.token); + this.n = o.part.command || o.part.location ? new gmr(o, r.hasTriggerModifier) : undefined; + const c = a.validatePosition(o.item.hint.position).lineNumber; + const u = new Z(c, 1, c, a.getLineMaxColumn(c)); + const d = this.y(u); + this.G([u], d); + s.add(Ue(() => { + this.n = undefined; + this.G([u], d); + })); + })); + e.add(t.onCancel(() => s.clear())); + e.add(t.onExecute(async n => { + const r = this.B(n); + if (r) { + const o = r.part; + if (o.location) { + this.v.invokeFunction(j6s, n, this.o, o.location); + } else if (Aat.is(o.command)) { + await this.C(o.command, r.item); + } + } + })); + return e; + } + y(e) { + const t = new Set(); + for (const s of this.j.values()) { + if (e.containsRange(s.item.anchor.range)) { + t.add(s.item); + } + } + return Array.from(t); + } + z(e) { + return this.o.onMouseUp(async t => { + if (t.event.detail !== 2) { + return; + } + const s = this.B(t); + if (s && (t.event.preventDefault(), await s.item.resolve(mt.None), Ac(s.item.hint.textEdits))) { + const n = s.item.hint.textEdits.map(r => Ua.replace(Z.lift(r.range), r.text)); + this.o.executeEdits("inlayHint.default", n); + e(); + } + }); + } + A() { + return this.o.onContextMenu(async e => { + if (!Bl(e.event.target)) { + return; + } + const t = this.B(e); + if (t) { + await this.v.invokeFunction(hmr, this.o, e.event.target, t); + } + }); + } + B(e) { + if (e.target.type !== 6) { + return; + } + const t = e.target.detail.injectedText?.options; + if (t instanceof cie && t?.attachedData instanceof fZt) { + return t.attachedData; + } + } + async C(e, t) { + try { + await this.t.executeCommand(e.id, ...(e.arguments ?? [])); + } catch (s) { + this.u.notify({ + severity: es.Error, + source: t.provider.displayName, + message: s + }); + } + } + D(e) { + const t = this.E(e); + this.s.set(e, t); + } + E(e) { + const t = new Map(); + for (const [s, n] of this.j) { + if (t.has(n.item)) { + continue; + } + const r = e.getDecorationRange(s); + if (r) { + const o = new y5s(r, n.item.anchor.direction); + const a = n.item.with({ + anchor: o + }); + t.set(n.item, a); + } + } + return Array.from(t.values()); + } + F() { + const t = this.o.getModel(); + const s = this.o.getVisibleRangesPlusViewportAboveBelow(); + const n = []; + for (const r of s.sort(Z.compareRangesUsingStarts)) { + const o = t.validateRange(new Z(r.startLineNumber - 30, r.startColumn, r.endLineNumber + 30, r.endColumn)); + if (n.length === 0 || !Z.areIntersectingOrTouching(n[n.length - 1], o)) { + n.push(o); + } else { + n[n.length - 1] = Z.plusRange(n[n.length - 1], o); + } + } + return n; + } + G(e, t) { + const s = new Map(); + if (this.l && this.l.notEarlierThan > Date.now() && e.some(v => v.containsPosition(this.l.position))) { + const { + position: v + } = this.l; + this.l = undefined; + const y = new Map(); + for (const x of this.o.getLineDecorations(v.lineNumber) ?? []) { + const k = this.j.get(x.id); + if (x.range.startColumn > v.column) { + continue; + } + const E = k?.decoration.options[k.item.anchor.direction]; + if (E && E.attachedData !== Kne.b) { + const D = y.get(k.item) ?? 0; + y.set(k.item, D + E.content.length); + } + } + const w = t.filter(x => x.anchor.range.startLineNumber === v.lineNumber && x.anchor.range.endColumn <= v.column); + const C = Array.from(y.values()); + let S; + while (true) { + const x = w.shift(); + const k = C.shift(); + if (!k && !x) { + break; + } + if (x) { + s.set(x, k ?? 0); + S = x; + } else if (S && k) { + let E = s.get(S); + E += k; + E += C.reduce((D, P) => D + P, 0); + C.length = 0; + break; + } + } + } + const n = []; + const r = (v, y, w, C, S) => { + const x = { + content: w, + inlineClassNameAffectsLetterSpacing: true, + inlineClassName: y.className, + cursorStops: C, + attachedData: S + }; + n.push({ + item: v, + classNameRef: y, + decoration: { + range: v.anchor.range, + options: { + description: "InlayHint", + showIfCollapsed: v.anchor.range.isEmpty(), + collapseOnReplaceEdit: !v.anchor.range.isEmpty(), + stickiness: 0, + [v.anchor.direction]: this.m === 0 ? x : undefined + } + } + }); + }; + const o = (v, y) => { + const w = this.k.createClassNameRef({ + width: `${a / 3 | 0}px`, + display: "inline-block" + }); + r(v, w, "\u200A", y ? l1.Right : l1.None, Kne.b); + }; + const { + fontSize: a, + fontFamily: l, + padding: c, + isUniform: u + } = this.I(); + const d = this.o.getOption(146).maximumLength; + const h = "--code-editorInlayHintsFontFamily"; + this.o.getContainerDomNode().style.setProperty(h, l); + let g = { + line: 0, + totalLen: 0 + }; + for (let v = 0; v < t.length; v++) { + const y = t[v]; + if (g.line !== y.anchor.range.startLineNumber) { + g = { + line: y.anchor.range.startLineNumber, + totalLen: 0 + }; + } + if (d && g.totalLen > d) { + continue; + } + if (y.hint.paddingLeft) { + o(y, false); + } + const w = typeof y.hint.label == "string" ? [{ + label: y.hint.label + }] : y.hint.label; + const C = s.get(y); + let S = 0; + for (let x = 0; x < w.length; x++) { + const k = w[x]; + const E = x === 0; + const D = x === w.length - 1; + const P = { + fontSize: `${a}px`, + fontFamily: `var(${h}), ${Qf.fontFamily}`, + verticalAlign: u ? "baseline" : "middle", + unicodeBidi: "isolate" + }; + if (Ac(y.hint.textEdits)) { + P.cursor = "default"; + } + this.H(P, y.hint); + if ((k.command || k.location) && this.n?.part.item === y && this.n.part.index === x) { + P.textDecoration = "underline"; + if (this.n.hasTriggerModifier) { + P.color = lu(sQi); + P.cursor = "pointer"; + } + } + let R = k.label; + g.totalLen += R.length; + let L = false; + const F = d !== 0 ? g.totalLen - d : 0; + if (F > 0) { + R = R.slice(0, -F) + "…"; + L = true; + } + S += R.length; + if (C !== undefined) { + const O = S - C; + if (O >= 0) { + S -= O; + R = R.slice(0, -(1 + O)) + "…"; + L = true; + } + } + if (c) { + if (E && (D || L)) { + P.padding = `1px ${Math.max(1, a / 4) | 0}px`; + P.borderRadius = `${a / 4 | 0}px`; + } else if (E) { + P.padding = `1px 0 1px ${Math.max(1, a / 4) | 0}px`; + P.borderRadius = `${a / 4 | 0}px 0 0 ${a / 4 | 0}px`; + } else if (D || L) { + P.padding = `1px ${Math.max(1, a / 4) | 0}px 1px 0`; + P.borderRadius = `0 ${a / 4 | 0}px ${a / 4 | 0}px 0`; + } else { + P.padding = "1px 0 1px 0"; + } + } + r(y, this.k.createClassNameRef(P), pmr(R), D && !y.hint.paddingRight ? l1.Right : l1.None, new fZt(y, x)); + if (L) { + break; + } + } + if (C !== undefined && S < C) { + const x = C - S; + r(y, this.k.createClassNameRef({}), "\u200A".repeat(x), l1.None); + } + if (y.hint.paddingRight) { + o(y, true); + } + if (n.length > Kne.a) { + break; + } + } + const p = []; + for (const [v, y] of this.j) { + const w = this.o.getModel()?.getDecorationRange(v); + if (w && e.some(C => C.containsRange(w))) { + p.push(v); + y.classNameRef.dispose(); + this.j.delete(v); + } + } + const b = fO.capture(this.o); + this.o.changeDecorations(v => { + const y = v.deltaDecorations(p, n.map(w => w.decoration)); + for (let w = 0; w < y.length; w++) { + const C = n[w]; + this.j.set(y[w], C); + } + }); + b.restore(this.o); + } + H(e, t) { + if (t.kind === $at.Parameter) { + e.backgroundColor = lu(gQi); + e.color = lu(fQi); + } else if (t.kind === $at.Type) { + e.backgroundColor = lu(hQi); + e.color = lu(dQi); + } else { + e.backgroundColor = lu(Zot); + e.color = lu(Qot); + } + } + I() { + const e = this.o.getOption(146); + const t = e.padding; + const s = this.o.getOption(54); + const n = this.o.getOption(51); + let r = e.fontSize; + if (!r || r < 5 || r > s) { + r = s; + } + const o = e.fontFamily || n; + return { + fontSize: r, + fontFamily: o, + padding: t, + isUniform: !t && o === n && r === s + }; + } + J() { + this.o.removeDecorations(Array.from(this.j.keys())); + for (const e of this.j.values()) { + e.classNameRef.dispose(); + } + this.j.clear(); + } + getInlayHintsForLine(e) { + if (!this.o.hasModel()) { + return []; + } + const t = new Set(); + const s = []; + for (const n of this.o.getLineDecorations(e)) { + const r = this.j.get(n.id); + if (r && !t.has(r.item.hint)) { + t.add(r.item.hint); + s.push(r.item); + } + } + return s; + } +}; +Yne = Kne = __decorate([__param(1, nn), __param(2, gE), __param(3, z6s), __param(4, gt), __param(5, ni), __param(6, re)], Yne); +function pmr(i) { + return i.replace(/[ \t]/g, "\xA0"); +} +ei.registerCommand("_executeInlayHintProvider", async (i, ...e) => { + const [t, s] = e; + yr(V.isUri(t)); + yr(Z.isIRange(s)); + const { + inlayHintsProvider: n + } = i.get(nn); + const r = await i.get(ns).createModelReference(t); + try { + const o = await w5s.create(n, r.object.textEditorModel, [Z.lift(s)], mt.None); + const a = o.items.map(l => l.hint); + setTimeout(() => o.dispose(), 0); + return a; + } finally { + r.dispose(); + } +}); +Me(); +gs(); +Tr(); +X(); +rt(); +Jt(); +Fi(); +Wt(); +ai(); +Cs(); +var G6s = class extends $pt { + constructor(i, e, t, s) { + super(10, e, i.item.anchor.range, t, s, true); + this.part = i; + } +}; +var Imt = class extends o0e { + constructor(e, t, s, n, r, o, a, l, c, u, d, h, g) { + super(e, t, s, o, l, n, r, c, u, d, h, g); + this.r = a; + this.hoverOrdinal = 6; + } + suggestHoverAnchor(e) { + if (!Yne.get(this.b) || e.target.type !== 6) { + return null; + } + const s = e.target.detail.injectedText?.options; + if (s instanceof cie && s.attachedData instanceof fZt) { + return new G6s(s.attachedData, this, e.event.posx, e.event.posy); + } else { + return null; + } + } + computeSync() { + return []; + } + computeAsync(e, t, s, n) { + if (e instanceof G6s) { + return new Tw(async r => { + const { + part: o + } = e; + await o.item.resolve(n); + if (n.isCancellationRequested) { + return; + } + let a; + if (typeof o.item.hint.tooltip == "string") { + a = new hs().appendText(o.item.hint.tooltip); + } else if (o.item.hint.tooltip) { + a = o.item.hint.tooltip; + } + if (a) { + r.emitOne(new LR(this, e.range, [a], false, 0)); + } + if (Ac(o.item.hint.textEdits)) { + r.emitOne(new LR(this, e.range, [new hs().appendText(f(1247, null))], false, 10001)); + } + let l; + if (typeof o.part.tooltip == "string") { + l = new hs().appendText(o.part.tooltip); + } else if (o.part.tooltip) { + l = o.part.tooltip; + } + if (l) { + r.emitOne(new LR(this, e.range, [l], false, 1)); + } + if (o.part.location || o.part.command) { + let u; + const d = this.b.getOption(79) === "altKey"; + const h = f(d ? Gt ? 1248 : 1249 : Gt ? 1250 : 1251, null); + if (o.part.location && o.part.command) { + u = new hs().appendText(f(1252, null, h)); + } else if (o.part.location) { + u = new hs().appendText(f(1253, null, h)); + } else if (o.part.command) { + u = new hs(`[${f(1254, null)}](${C5s(o.part.command)} "${o.part.command.title}") (${h})`, { + isTrusted: true + }); + } + if (u) { + r.emitOne(new LR(this, e.range, [u], false, 10000)); + } + } + const c = await this.s(o, n); + for await (const u of c) { + r.emitOne(u); + } + }); + } else { + return Tw.EMPTY; + } + } + async s(e, t) { + if (!e.part.location) { + return Tw.EMPTY; + } + const { + uri: s, + range: n + } = e.part.location; + const r = await this.r.createModelReference(s); + try { + const o = r.object.textEditorModel; + if (this.h.hoverProvider.has(o)) { + return SQt(this.h.hoverProvider, o, new je(n.startLineNumber, n.startColumn), t).filter(a => !yie(a.hover.contents)).map(a => new LR(this, e.item.anchor.range, a.hover.contents, false, 2 + a.ordinal)); + } else { + return Tw.EMPTY; + } + } finally { + r.dispose(); + } + } +}; +Imt = __decorate([__param(1, As), __param(2, os), __param(3, oi), __param(4, Ns), __param(5, ve), __param(6, ns), __param(7, nn), __param(8, gt), __param(9, uu), __param(10, s0), __param(11, Ot), __param(12, _i)], Imt); +Ut(); +var gZt; +var pZt; +var mZt = gZt = class extends H { + constructor(e, t, s, n, r, o) { + super(); + const a = t.hoverParts; + this.a = this.D(new bZt(e, s, a, n, r, o)); + const l = t.options; + const c = l.anchor; + const { + showAtPosition: u, + showAtSecondaryPosition: d + } = gZt.computeHoverPositions(e, c.range, a); + this.shouldAppearBeforeContent = a.some(h => h.isBeforeContent); + this.showAtPosition = u; + this.showAtSecondaryPosition = d; + this.initialMousePosX = c.initialMousePosX; + this.initialMousePosY = c.initialMousePosY; + this.shouldFocus = l.shouldFocus; + this.source = l.source; + } + get domNode() { + return this.a.domNode; + } + get domNodeHasChildren() { + return this.a.domNodeHasChildren; + } + get focusedHoverPartIndex() { + return this.a.focusedHoverPartIndex; + } + focusHoverPartWithIndex(e) { + this.a.focusHoverPartWithIndex(e); + } + getAccessibleWidgetContent() { + return this.a.getAccessibleContent(); + } + getAccessibleWidgetContentAtIndex(e) { + return this.a.getAccessibleHoverContentAtIndex(e); + } + async updateHoverVerbosityLevel(e, t, s) { + this.a.updateHoverVerbosityLevel(e, t, s); + } + doesHoverAtIndexSupportVerbosityAction(e, t) { + return this.a.doesHoverAtIndexSupportVerbosityAction(e, t); + } + isColorPickerVisible() { + return this.a.isColorPickerVisible(); + } + static computeHoverPositions(e, t, s) { + let n = 1; + if (e.hasModel()) { + const u = e._getViewModel(); + const d = u.coordinatesConverter; + const h = d.convertModelRangeToViewRange(t); + const g = u.getLineMinColumn(h.startLineNumber); + const p = new je(h.startLineNumber, g); + n = d.convertViewPositionToModelPosition(p).column; + } + const r = t.startLineNumber; + let o = t.startColumn; + let a; + for (const u of s) { + const d = u.range; + const h = d.startLineNumber === r; + const g = d.endLineNumber === r; + if (h && g) { + const b = d.startColumn; + const v = Math.min(o, b); + o = Math.max(v, n); + } + if (u.forceShowAtRange) { + a = d; + } + } + let l; + let c; + if (a) { + const u = a.getStartPosition(); + l = u; + c = u; + } else { + l = t.getStartPosition(); + c = new je(r, o); + } + return { + showAtPosition: l, + showAtSecondaryPosition: c + }; + } +}; +mZt = gZt = __decorate([__param(4, oi), __param(5, Ns)], mZt); +var mmr = class { + constructor(i, e) { + this.a = e; + i.appendChild(this.a.hoverElement); + } + get hoverElement() { + return this.a.hoverElement; + } + get actions() { + return this.a.actions; + } + dispose() { + this.a.dispose(); + } +}; +var bZt = class extends H { + static { + pZt = this; + } + static { + this.a = Cr.register({ + description: "content-hover-highlight", + className: "hoverHighlight" + }); + } + constructor(e, t, s, n, r, o) { + super(); + this.b = []; + this.j = -1; + this.f = n; + this.c = document.createDocumentFragment(); + this.D(this.q(t, s, n, r, o)); + this.D(this.t()); + this.D(this.n(e, s)); + this.u(t); + } + n(e, t) { + if (t.length === 0) { + return H.None; + } + let s = t[0].range; + for (const r of t) { + const o = r.range; + s = Z.plusRange(s, o); + } + const n = e.createDecorationsCollection(); + n.set([{ + range: s, + options: pZt.a + }]); + return Ue(() => { + n.clear(); + }); + } + q(e, t, s, n, r) { + const o = new Wpt(n, r); + const a = { + fragment: this.c, + statusBar: o, + ...s + }; + const l = new Q(); + l.add(o); + for (const u of e) { + const d = this.r(t, u, a); + l.add(d); + for (const h of d.renderedHoverParts) { + this.b.push({ + type: "hoverPart", + participant: u, + hoverPart: h.hoverPart, + hoverElement: h.hoverElement + }); + } + } + const c = this.s(this.c, o); + if (c) { + l.add(c); + this.b.push({ + type: "statusBar", + hoverElement: c.hoverElement, + actions: c.actions + }); + } + return l; + } + r(e, t, s) { + const n = e.filter(o => o.owner === t); + if (n.length > 0) { + return t.renderHoverParts(s, n); + } else { + return new B5([]); + } + } + s(e, t) { + if (t.hasContent) { + return new mmr(e, t); + } + } + t() { + const e = new Q(); + this.b.forEach((t, s) => { + const n = t.hoverElement; + n.tabIndex = 0; + e.add(Ce(n, Oe.FOCUS_IN, r => { + r.stopPropagation(); + this.j = s; + })); + e.add(Ce(n, Oe.FOCUS_OUT, r => { + r.stopPropagation(); + this.j = -1; + })); + }); + return e; + } + u(e) { + const t = e.find(s => s instanceof o0e && !(s instanceof Imt)); + if (t) { + this.g = t; + } + this.h = e.find(s => s instanceof jpt); + } + focusHoverPartWithIndex(e) { + if (!(e < 0) && !(e >= this.b.length)) { + this.b[e].hoverElement.focus(); + } + } + getAccessibleContent() { + const e = []; + for (let t = 0; t < this.b.length; t++) { + e.push(this.getAccessibleHoverContentAtIndex(t)); + } + return e.join(` + +`); + } + getAccessibleHoverContentAtIndex(e) { + const t = this.b[e]; + if (!t) { + return ""; + } + if (t.type === "statusBar") { + const s = [f(1183, null)]; + for (const n of t.actions) { + const r = n.actionKeybindingLabel; + if (r) { + s.push(f(1184, null, n.actionLabel, r)); + } else { + s.push(f(1185, null, n.actionLabel)); + } + } + return s.join(` +`); + } + return t.participant.getAccessibleContent(t.hoverPart); + } + async updateHoverVerbosityLevel(e, t, s) { + if (!this.g) { + return; + } + const n = this.w(this.g, t); + if (n === undefined) { + return; + } + const r = await this.g.updateMarkdownHoverVerbosityLevel(e, n, s); + if (r) { + this.b[t] = { + type: "hoverPart", + participant: this.g, + hoverPart: r.hoverPart, + hoverElement: r.hoverElement + }; + this.f.onContentsChanged(); + } + } + doesHoverAtIndexSupportVerbosityAction(e, t) { + if (!this.g) { + return false; + } + const s = this.w(this.g, e); + if (s === undefined) { + return false; + } else { + return this.g.doesMarkdownHoverAtIndexSupportVerbosityAction(s, t); + } + } + isColorPickerVisible() { + return this.h?.isColorPickerVisible() ?? false; + } + w(e, t) { + const s = this.b[t]; + if (!s || s.type !== "hoverPart" || s.participant !== e) { + return; + } + const r = this.b.findIndex(o => o.type === "hoverPart" && o.participant === e); + if (r === -1) { + throw new co(); + } + return t - r; + } + get domNode() { + return this.c; + } + get domNodeHasChildren() { + return this.c.hasChildNodes(); + } + get focusedHoverPartIndex() { + return this.j; + } +}; +bZt = pZt = __decorate([__param(4, oi), __param(5, Ns)], bZt); +var vZt = class extends H { + constructor(e, t, s, n) { + super(); + this.n = e; + this.q = t; + this.r = s; + this.s = n; + this.c = null; + this.m = this.D(new B()); + this.onContentsChanged = this.m.event; + this.g = this.D(this.q.createInstance(CQt, this.n)); + this.h = this.t(); + this.j = this.D(new Y4s(this.n, new vfr(this.n, this.h))); + this.u(); + } + t() { + const e = []; + for (const t of VU.getAll()) { + const s = this.q.createInstance(t, this.n); + e.push(s); + } + e.sort((t, s) => t.hoverOrdinal - s.hoverOrdinal); + this.D(this.g.onDidResize(() => { + this.h.forEach(t => t.handleResize?.()); + })); + return e; + } + u() { + this.D(this.j.onResult(t => { + const s = t.hasLoadingMessage ? this.F(t) : t.value; + this.G(new s5s(s, t.isComplete, t.options)); + })); + const e = this.g.getDomNode(); + this.D(ko(e, "keydown", t => { + if (t.equals(9)) { + this.hide(); + } + })); + this.D(ko(e, "mouseleave", t => { + this.M(t); + })); + this.D(qm.onDidChange(() => { + if (this.g.position && this.c) { + this.C(this.c); + } + })); + } + w(e, t, s, n, r) { + if (!this.g.position || !this.c) { + if (e) { + this.z(e, t, s, n, false); + return true; + } else { + return false; + } + } + const a = this.n.getOption(62).sticky; + const l = r && this.g.isMouseGettingCloser(r.event.posx, r.event.posy); + if (a && l) { + if (e) { + this.z(e, t, s, n, true); + } + return true; + } else if (e) { + if (this.c && this.c.options.anchor.equals(e)) { + return true; + } else if (this.c && e.canAdoptVisibleHover(this.c.options.anchor, this.g.position)) { + if (this.c) { + this.C(this.c.filter(e)); + } + this.z(e, t, s, n, false); + return true; + } else { + this.C(null); + this.z(e, t, s, n, false); + return true; + } + } else { + this.C(null); + return false; + } + } + z(e, t, s, n, r) { + if (this.j.options && this.j.options.anchor.equals(e)) { + return; + } + this.j.cancel(); + const a = { + anchor: e, + source: s, + shouldFocus: n, + insistOnKeepingHoverVisible: r + }; + this.j.start(t, a); + } + C(e) { + let t = e; + if (this.c === t) { + return; + } + if (t && t.hoverParts.length === 0) { + t = null; + } + this.c = t; + if (this.c) { + this.H(this.c); + } else { + this.I(); + } + } + F(e) { + for (const t of this.h) { + if (!t.createLoadingMessage) { + continue; + } + const s = t.createLoadingMessage(e.options.anchor); + if (s) { + return e.value.slice(0).concat([s]); + } + } + return e.value; + } + G(e) { + if (!this.g.position || !this.c || !this.c.isComplete) { + this.C(e); + } + if (!e.isComplete) { + return; + } + const n = e.hoverParts.length === 0; + const r = e.options.insistOnKeepingHoverVisible; + if (!n || !r) { + this.C(e); + } + } + H(e) { + const t = this.J(); + this.f = new mZt(this.n, e, this.h, t, this.r, this.s); + if (this.f.domNodeHasChildren) { + this.g.show(this.f); + } else { + this.f.dispose(); + } + } + I() { + this.g.hide(); + this.h.forEach(e => e.handleHide?.()); + } + J() { + return { + hide: () => { + this.hide(); + }, + onContentsChanged: () => { + this.m.fire(); + this.g.onContentsChanged(); + }, + setMinimumDimensions: n => { + this.g.setMinimumDimensions(n); + } + }; + } + showsOrWillShow(e) { + if (this.g.isResizing) { + return true; + } + const s = this.L(e); + if (!(s.length > 0)) { + return this.w(null, 0, 0, false, e); + } + const r = s[0]; + return this.w(r, 0, 0, false, e); + } + L(e) { + const t = []; + for (const n of this.h) { + if (!n.suggestHoverAnchor) { + continue; + } + const r = n.suggestHoverAnchor(e); + if (r) { + t.push(r); + } + } + const s = e.target; + switch (s.type) { + case 6: + { + t.push(new fQt(0, s.range, e.event.posx, e.event.posy)); + break; + } + case 7: + { + const n = this.n.getOption(52).typicalHalfwidthCharacterWidth / 2; + if (!!s.detail.isAfterLines || typeof s.detail.horizontalDistanceToText != "number" || !(s.detail.horizontalDistanceToText < n)) { + break; + } + t.push(new fQt(0, s.range, e.event.posx, e.event.posy)); + break; + } + } + t.sort((n, r) => r.priority - n.priority); + return t; + } + M(e) { + const t = this.n.getDomNode(); + if (!t || !_pt(t, e.x, e.y)) { + this.hide(); + } + } + startShowingAtRange(e, t, s, n) { + this.w(new fQt(0, e, undefined, undefined), t, s, n, null); + } + getWidgetContent() { + const e = this.g.getDomNode(); + if (e.textContent) { + return e.textContent; + } + } + async updateHoverVerbosityLevel(e, t, s) { + this.f?.updateHoverVerbosityLevel(e, t, s); + } + doesHoverAtIndexSupportVerbosityAction(e, t) { + return this.f?.doesHoverAtIndexSupportVerbosityAction(e, t) ?? false; + } + getAccessibleWidgetContent() { + return this.f?.getAccessibleWidgetContent(); + } + getAccessibleWidgetContentAtIndex(e) { + return this.f?.getAccessibleWidgetContentAtIndex(e); + } + focusedHoverPartIndex() { + return this.f?.focusedHoverPartIndex ?? -1; + } + containsNode(e) { + if (e) { + return this.g.getDomNode().contains(e); + } else { + return false; + } + } + focus() { + this.g.focus(); + } + focusHoverPartWithIndex(e) { + this.f?.focusHoverPartWithIndex(e); + } + scrollUp() { + this.g.scrollUp(); + } + scrollDown() { + this.g.scrollDown(); + } + scrollLeft() { + this.g.scrollLeft(); + } + scrollRight() { + this.g.scrollRight(); + } + pageUp() { + this.g.pageUp(); + } + pageDown() { + this.g.pageDown(); + } + goToTop() { + this.g.goToTop(); + } + goToBottom() { + this.g.goToBottom(); + } + hide() { + this.j.cancel(); + this.C(null); + } + getDomNode() { + return this.g.getDomNode(); + } + get isColorPickerVisible() { + return this.f?.isColorPickerVisible() ?? false; + } + get isVisibleFromKeyboard() { + return this.g.isVisibleFromKeyboard; + } + get isVisible() { + return this.g.isVisible; + } + get isFocused() { + return this.g.isFocused; + } + get isResizing() { + return this.g.isResizing; + } + get widget() { + return this.g; + } +}; +vZt = __decorate([__param(1, re), __param(2, oi), __param(3, Ns)], vZt); +pe(); +var yZt; +var wZt = false; +var xf = class extends H { + static { + yZt = this; + } + static { + this.ID = "editor.contrib.contentHover"; + } + constructor(e, t, s) { + super(); + this.m = e; + this.n = t; + this.q = s; + this.a = this.D(new B()); + this.onHoverContentsChanged = this.a.event; + this.shouldKeepOpenOnEditorMouseMoveOrLeave = false; + this.b = new Q(); + this.j = false; + this.g = this.D(new Vn(() => this.M(this.f), 0)); + this.r(); + this.D(this.m.onDidChangeConfiguration(n => { + if (n.hasChanged(62)) { + this.s(); + this.r(); + } + })); + } + static get(e) { + return e.getContribution(yZt.ID); + } + r() { + const e = this.m.getOption(62); + this.h = { + enabled: e.enabled, + sticky: e.sticky, + hidingDelay: e.hidingDelay + }; + if (e.enabled) { + this.b.add(this.m.onMouseDown(t => this.y(t))); + this.b.add(this.m.onMouseUp(() => this.F())); + this.b.add(this.m.onMouseMove(t => this.I(t))); + this.b.add(this.m.onKeyDown(t => this.N(t))); + this.b.add(this.m.onMouseLeave(t => this.G(t))); + this.b.add(this.m.onDidChangeModel(() => this.t())); + this.b.add(this.m.onDidChangeModelContent(() => this.u())); + this.b.add(this.m.onDidScrollChange(t => this.w(t))); + } else { + this.t(); + } + } + s() { + this.b.clear(); + } + t() { + this.u(); + this.hideContentHover(); + } + u() { + this.f = undefined; + this.g.cancel(); + } + w(e) { + if (e.scrollTopChanged || e.scrollLeftChanged) { + this.hideContentHover(); + } + } + y(e) { + this.j = true; + if (!this.z(e)) { + this.hideContentHover(); + } + } + z(e) { + return this.C(e) || this.R() || Y6s(e); + } + C(e) { + if (this.c) { + return _pt(this.c.getDomNode(), e.event.posx, e.event.posy); + } else { + return false; + } + } + F() { + this.j = false; + } + G(e) { + if (!this.shouldKeepOpenOnEditorMouseMoveOrLeave && !(this.u(), this.z(e)) && !wZt) { + this.hideContentHover(); + } + } + H(e) { + const t = this.h.sticky; + const s = (o, a) => { + const l = this.C(o); + return a && l; + }; + const n = o => { + const a = this.C(o); + const l = this.c?.isColorPickerVisible ?? false; + return a && l; + }; + const r = (o, a) => (a && this.c?.containsNode(o.event.browserEvent.view?.document.activeElement) && !o.event.browserEvent.view?.getSelection()?.isCollapsed) ?? false; + return s(e, t) || n(e) || r(e, t); + } + I(e) { + if (!this.J(e)) { + return; + } + if (this.L()) { + if (!this.g.isScheduled()) { + this.g.schedule(this.h.hidingDelay); + } + return; + } + this.M(e); + } + J(e) { + if (this.shouldKeepOpenOnEditorMouseMoveOrLeave || (this.f = e, this.c && (this.c.isFocused || this.c.isResizing || this.j && this.c.isColorPickerVisible)) || this.h.sticky && this.c?.isVisibleFromKeyboard) { + return false; + } else if (this.H(e)) { + this.g.cancel(); + return false; + } else { + return true; + } + } + L() { + const e = this.h.hidingDelay; + return (this.c?.isVisible ?? false) && this.h.sticky && e > 0; + } + M(e) { + if (!!e && !this.Q().showsOrWillShow(e) && !wZt) { + this.hideContentHover(); + } + } + N(e) { + if (!this.m.hasModel()) { + return; + } + const t = this.O(e); + const s = this.P(e); + if (!t && !s) { + this.hideContentHover(); + } + } + O(e) { + if (!this.m.hasModel() || !this.c) { + return false; + } + const t = this.q.softDispatch(e, this.m.getDomNode()); + const s = t.kind === 1; + const n = t.kind === 2 && (t.commandId === H4s || t.commandId === Ane || t.commandId === $ne) && this.c.isVisible; + return s || n; + } + P(e) { + return e.keyCode === 5 || e.keyCode === 6 || e.keyCode === 57 || e.keyCode === 4; + } + hideContentHover() { + if (!wZt && !Fne.dropDownVisible) { + this.c?.hide(); + } + } + Q() { + if (!this.c) { + this.c = this.n.createInstance(vZt, this.m); + this.b.add(this.c.onContentsChanged(() => this.a.fire())); + } + return this.c; + } + showContentHover(e, t, s, n) { + this.Q().startShowingAtRange(e, t, s, n); + } + R() { + return this.c?.widget.isResizing || false; + } + focusedHoverPartIndex() { + return this.Q().focusedHoverPartIndex(); + } + doesHoverAtIndexSupportVerbosityAction(e, t) { + return this.Q().doesHoverAtIndexSupportVerbosityAction(e, t); + } + updateHoverVerbosityLevel(e, t, s) { + this.Q().updateHoverVerbosityLevel(e, t, s); + } + focus() { + this.c?.focus(); + } + focusHoverPartWithIndex(e) { + this.c?.focusHoverPartWithIndex(e); + } + scrollUp() { + this.c?.scrollUp(); + } + scrollDown() { + this.c?.scrollDown(); + } + scrollLeft() { + this.c?.scrollLeft(); + } + scrollRight() { + this.c?.scrollRight(); + } + pageUp() { + this.c?.pageUp(); + } + pageDown() { + this.c?.pageDown(); + } + goToTop() { + this.c?.goToTop(); + } + goToBottom() { + this.c?.goToBottom(); + } + getWidgetContent() { + return this.c?.getWidgetContent(); + } + getAccessibleWidgetContent() { + return this.c?.getAccessibleWidgetContent(); + } + getAccessibleWidgetContentAtIndex(e) { + return this.c?.getAccessibleWidgetContentAtIndex(e); + } + get isColorPickerVisible() { + return this.c?.isColorPickerVisible; + } + get isHoverVisible() { + return this.c?.isVisible; + } + dispose() { + super.dispose(); + this.s(); + this.b.dispose(); + this.c?.dispose(); + } +}; +xf = yZt = __decorate([__param(1, re), __param(2, oi)], xf); +var K6s = class extends H { + static { + this.ID = "editor.contrib.colorContribution"; + } + static { + this.RECOMPUTE_TIME = 1000; + } + constructor(i) { + super(); + this.a = i; + this.D(i.onMouseDown(e => this.b(e))); + } + dispose() { + super.dispose(); + } + b(i) { + const e = this.a.getOption(154); + if (e !== "click" && e !== "clickAndHover" || !Y6s(i)) { + return; + } + const t = this.a.getContribution(xf.ID); + if (!t || t.isColorPickerVisible) { + return; + } + const s = i.target.range; + if (!s) { + return; + } + const n = new Z(s.startLineNumber, s.startColumn + 1, s.endLineNumber, s.endColumn + 1); + t.showContentHover(n, 1, 1, false); + } +}; +function Y6s(i) { + const e = i.target; + return !!e && e.type === 6 && e.detail.injectedText?.options.attachedData === V4s; +} +en(); +X(); +Sr(); +Je(); +Ee(); +te(); +Sr(); +q(); +te(); +Fi(); +pe(); +Tr(); +ri(); +q(); +gi(); +yt(); +xe(); +var bmr = class D_n { + constructor(e, t, s, n) { + this.owner = e; + this.range = t; + this.model = s; + this.provider = n; + } + static fromBaseColor(e, t) { + return new D_n(e, t.range, t.model, t.provider); + } +}; +var CZt = class { + constructor(e, t) { + this.b = e; + this.c = t; + this.hoverOrdinal = 2; + this.a = null; + } + async createColorHover(e, t, s) { + if (!this.b.hasModel() || !U5.get(this.b)) { + return null; + } + const r = await B4s(s, this.b.getModel(), mt.None); + let o = null; + let a = null; + for (const h of r) { + const g = h.colorInfo; + if (Z.containsRange(g.range, e.range)) { + o = g; + a = h.provider; + } + } + const l = o ?? e; + const c = a ?? t; + const u = !!o; + return { + colorHover: bmr.fromBaseColor(this, await g5s(this.b.getModel(), l, c)), + foundInEditor: u + }; + } + async updateEditorModel(e) { + if (!this.b.hasModel()) { + return; + } + const t = e.model; + let s = new Z(e.range.startLineNumber, e.range.startColumn, e.range.endLineNumber, e.range.endColumn); + if (this.a) { + await l0e(this.b.getModel(), t, this.a, s, e); + s = p5s(this.b, s, t); + } + } + renderHoverParts(e, t) { + if (t.length === 0 || !this.b.hasModel()) { + return; + } + if (e.setMinimumDimensions) { + const d = this.b.getOption(68) + 8; + e.setMinimumDimensions(new Ln(302, d)); + } + const s = new Q(); + const n = t[0]; + const r = this.b.getModel(); + const o = n.model; + const a = s.add(new h5s(e.fragment, o, this.b.getOption(149), this.c, "hover")); + let l = false; + const c = new Z(n.range.startLineNumber, n.range.startColumn, n.range.endLineNumber, n.range.endColumn); + const u = n.model.color; + this.a = u; + l0e(r, o, u, c, n); + s.add(o.onColorFlushed(d => { + this.a = d; + })); + s.add(o.onDidChangeColor(d => { + l0e(r, o, d, c, n); + })); + s.add(this.b.onDidChangeModelContent(d => { + if (l) { + l = false; + } else { + e.hide(); + this.b.focus(); + } + })); + return { + hoverPart: n, + colorPicker: a, + disposables: s + }; + } +}; +CZt = __decorate([__param(1, ti)], CZt); +xe(); +var SZt; +var vmr = class { + constructor(i, e) { + this.value = i; + this.foundInEditor = e; + } +}; +var X6s = 8; +var ymr = 22; +var xZt = class extends H { + static { + SZt = this; + } + static { + this.ID = "editor.contrib.standaloneColorPickerWidget"; + } + constructor(e, t, s, n, r, o, a, l) { + super(); + this.j = e; + this.m = t; + this.n = s; + this.q = r; + this.r = o; + this.s = a; + this.t = l; + this.allowEditorOverflow = true; + this.a = undefined; + this.c = document.createElement("div"); + this.f = null; + this.g = false; + this.h = this.D(new B()); + this.onResult = this.h.event; + this.m.set(true); + this.b = n.createInstance(CZt, this.j); + this.a = this.j._getViewModel()?.getPrimaryCursorState().modelState.position; + const c = this.j.getSelection(); + const u = c ? { + startLineNumber: c.startLineNumber, + startColumn: c.startColumn, + endLineNumber: c.endLineNumber, + endColumn: c.endColumn + } : { + startLineNumber: 0, + endLineNumber: 0, + endColumn: 0, + startColumn: 0 + }; + const d = this.D(Pu(this.c)); + this.D(d.onDidBlur(h => { + this.hide(); + })); + this.D(d.onDidFocus(h => { + this.focus(); + })); + this.D(this.j.onDidChangeCursorPosition(() => { + if (this.g) { + this.g = false; + } else { + this.hide(); + } + })); + this.D(this.j.onMouseMove(h => { + const g = h.target.element?.classList; + if (g && g.contains("colorpicker-color-decoration")) { + this.hide(); + } + })); + this.D(this.onResult(h => { + this.y(h.value, h.foundInEditor); + })); + this.u(u); + this.c.style.zIndex = "50"; + this.j.addContentWidget(this); + } + updateEditor() { + if (this.f) { + this.b.updateEditorModel(this.f); + } + } + getId() { + return SZt.ID; + } + getDomNode() { + return this.c; + } + getPosition() { + if (!this.a) { + return null; + } + const e = this.j.getOption(62).above; + return { + position: this.a, + secondaryPosition: this.a, + preference: e ? [1, 2] : [2, 1], + positionAffinity: 2 + }; + } + hide() { + this.dispose(); + this.m.set(false); + this.n.set(false); + this.j.removeContentWidget(this); + this.j.focus(); + } + focus() { + this.n.set(true); + this.c.focus(); + } + async u(e) { + const t = await this.w(e); + if (t) { + this.h.fire(new vmr(t.result, t.foundInEditor)); + } + } + async w(e) { + if (!this.j.hasModel()) { + return null; + } + const t = { + range: e, + color: { + red: 0, + green: 0, + blue: 0, + alpha: 1 + } + }; + const s = await this.b.createColorHover(t, new i0e(this.s), this.r.colorProvider); + if (s) { + return { + result: s.colorHover, + foundInEditor: s.foundInEditor + }; + } else { + return null; + } + } + y(e, t) { + const s = document.createDocumentFragment(); + const n = this.D(new Wpt(this.q, this.t)); + const r = { + fragment: s, + statusBar: n, + onContentsChanged: () => {}, + hide: () => this.hide() + }; + this.f = e; + const o = this.b.renderHoverParts(r, [e]); + if (!o) { + return; + } + this.D(o.disposables); + const a = o.colorPicker; + this.c.classList.add("standalone-colorpicker-body"); + this.c.style.maxHeight = Math.max(this.j.getLayoutInfo().height / 4, 250) + "px"; + this.c.style.maxWidth = Math.max(this.j.getLayoutInfo().width * 0.66, 500) + "px"; + this.c.tabIndex = 0; + this.c.appendChild(s); + a.layout(); + const l = a.body; + const c = l.saturationBox.domNode.clientWidth; + const u = l.domNode.clientWidth - c - ymr - X6s; + const d = a.body.enterButton; + d?.onClicked(() => { + this.updateEditor(); + this.hide(); + }); + const h = a.header; + const g = h.pickedColorNode; + g.style.width = c + X6s + "px"; + const p = h.originalColorNode; + p.style.width = u + "px"; + a.header.closeButton?.onClicked(() => { + this.hide(); + }); + if (t) { + if (d) { + d.button.textContent = "Replace"; + } + this.g = true; + this.j.setSelection(e.range); + } + this.j.layoutContentWidget(this); + } +}; +xZt = SZt = __decorate([__param(3, re), __param(4, oi), __param(5, nn), __param(6, Fu), __param(7, Ns)], xZt); +q(); +var kZt; +var RG = class extends H { + static { + kZt = this; + } + static { + this.ID = "editor.contrib.standaloneColorPickerController"; + } + constructor(e, t, s) { + super(); + this.f = e; + this.g = s; + this.a = null; + this.b = ke.standaloneColorPickerVisible.bindTo(t); + this.c = ke.standaloneColorPickerFocused.bindTo(t); + } + showOrFocus() { + if (this.f.hasModel()) { + if (this.b.get()) { + if (!this.c.get()) { + this.a?.focus(); + } + } else { + this.a = this.g.createInstance(xZt, this.f, this.b, this.c); + } + } + } + hide() { + this.c.set(false); + this.b.set(false); + this.a?.hide(); + this.f.focus(); + } + insertColor() { + this.a?.updateEditor(); + this.hide(); + } + static get(e) { + return e.getContribution(kZt.ID); + } +}; +RG = kZt = __decorate([__param(1, Ne), __param(2, re)], RG); +var wmr = class extends Uh { + constructor() { + super({ + id: "editor.action.showOrFocusStandaloneColorPicker", + title: { + ...W(966, "Show or Focus Standalone Color Picker"), + mnemonicTitle: f(965, null) + }, + precondition: undefined, + menu: [{ + id: _.CommandPalette + }], + metadata: { + description: W(967, "Show or focus a standalone color picker which uses the default color provider. It displays hex/rgb/hsl colors.") + } + }); + } + runEditorCommand(i, e) { + RG.get(e)?.showOrFocus(); + } +}; +var Cmr = class extends Es { + constructor() { + super({ + id: "editor.action.hideColorPicker", + label: W(968, "Hide the Color Picker"), + precondition: ke.standaloneColorPickerVisible.isEqualTo(true), + kbOpts: { + primary: 9, + weight: 100 + }, + metadata: { + description: W(969, "Hide the standalone color picker.") + } + }); + } + run(i, e) { + RG.get(e)?.hide(); + } +}; +var Smr = class extends Es { + constructor() { + super({ + id: "editor.action.insertColorWithStandaloneColorPicker", + label: W(970, "Insert Color with Standalone Color Picker"), + precondition: ke.standaloneColorPickerFocused.isEqualTo(true), + kbOpts: { + primary: 3, + weight: 100 + }, + metadata: { + description: W(971, "Insert hex/rgb/hsl colors with the focused standalone color picker.") + } + }); + } + run(i, e) { + RG.get(e)?.insertColor(); + } +}; +yt(); +Oi(Cmr); +Oi(Smr); +J(wmr); +bo(K6s.ID, K6s, 2); +bo(RG.ID, RG, 1); +bo(U5.ID, U5, 1); +hG(gQt); +VU.register(jpt); +ei.registerCommand("_executeDocumentColorProvider", function (i, ...e) { + const [t] = e; + if (!(t instanceof V)) { + throw Hl(); + } + const { + model: s, + colorProviderRegistry: n, + defaultColorDecoratorsEnablement: r + } = W4s(i, t); + return pQt(new Jhr(), n, s, mt.None, r); +}); +ei.registerCommand("_executeColorPresentationProvider", function (i, ...e) { + const [t, s] = e; + const { + uri: n, + range: r + } = s; + if (!(n instanceof V) || !Array.isArray(t) || t.length !== 4 || !Z.isIRange(r)) { + throw Hl(); + } + const { + model: o, + colorProviderRegistry: a, + defaultColorDecoratorsEnablement: l + } = W4s(i, n); + const [c, u, d, h] = t; + return pQt(new Ghr({ + range: r, + color: { + red: c, + green: u, + blue: d, + alpha: h + } + }), a, o, mt.None, l); +}); +Yc(); +en(); +yt(); +Sr(); +Bd(); +ef(); +Rs(); +yt(); +ua(); +var D0e = class m9i { + constructor(e, t, s) { + this.d = s; + this.a = e; + this.b = t; + this.c = null; + } + static _haystackHasNeedleAtOffset(e, t, s) { + if (s < 0) { + return false; + } + const n = t.length; + const r = e.length; + if (s + n > r) { + return false; + } + for (let o = 0; o < n; o++) { + const a = e.charCodeAt(s + o); + const l = t.charCodeAt(o); + if (a !== l && (!(a >= 65) || !(a <= 90) || a + 32 !== l) && (!(l >= 65) || !(l <= 90) || l + 32 !== a)) { + return false; + } + } + return true; + } + e(e, t, s, n, r, o) { + const a = e.startLineNumber; + const l = e.startColumn; + const c = e.endLineNumber; + const u = e.endColumn; + const d = r.getLineContent(a); + const h = r.getLineContent(c); + let g = d.lastIndexOf(t, l - 1 + t.length); + let p = h.indexOf(s, u - 1 - s.length); + if (g !== -1 && p !== -1) { + if (a === c) { + if (d.substring(g + t.length, p).indexOf(s) >= 0) { + g = -1; + p = -1; + } + } else { + const v = d.substring(g + t.length); + const y = h.substring(0, p); + if (v.indexOf(s) >= 0 || y.indexOf(s) >= 0) { + g = -1; + p = -1; + } + } + } + let b; + if (g !== -1 && p !== -1) { + if (n && g + t.length < d.length && d.charCodeAt(g + t.length) === 32) { + t = t + " "; + } + if (n && p > 0 && h.charCodeAt(p - 1) === 32) { + s = " " + s; + p -= 1; + } + b = m9i._createRemoveBlockCommentOperations(new Z(a, g + t.length + 1, c, p + 1), t, s); + } else { + b = m9i._createAddBlockCommentOperations(e, t, s, this.b); + this.c = b.length === 1 ? s : null; + } + for (const v of b) { + o.addTrackedEditOperation(v.range, v.text); + } + } + static _createRemoveBlockCommentOperations(e, t, s) { + const n = []; + if (Z.isEmpty(e)) { + n.push(Ua.delete(new Z(e.startLineNumber, e.startColumn - t.length, e.endLineNumber, e.endColumn + s.length))); + } else { + n.push(Ua.delete(new Z(e.startLineNumber, e.startColumn - t.length, e.startLineNumber, e.startColumn))); + n.push(Ua.delete(new Z(e.endLineNumber, e.endColumn, e.endLineNumber, e.endColumn + s.length))); + } + return n; + } + static _createAddBlockCommentOperations(e, t, s, n) { + const r = []; + if (Z.isEmpty(e)) { + r.push(Ua.replace(new Z(e.startLineNumber, e.startColumn, e.endLineNumber, e.endColumn), t + " " + s)); + } else { + r.push(Ua.insert(new je(e.startLineNumber, e.startColumn), t + (n ? " " : ""))); + r.push(Ua.insert(new je(e.endLineNumber, e.endColumn), (n ? " " : "") + s)); + } + return r; + } + getEditOperations(e, t) { + const s = this.a.startLineNumber; + const n = this.a.startColumn; + e.tokenization.tokenizeIfCheap(s); + const r = e.getLanguageIdAtPosition(s, n); + const o = this.d.getLanguageConfiguration(r).comments; + if (!!o && !!o.blockCommentStartToken && !!o.blockCommentEndToken) { + this.e(this.a, o.blockCommentStartToken, o.blockCommentEndToken, this.b, e, t); + } + } + computeCursorState(e, t) { + const s = t.getInverseEditOperations(); + if (s.length === 2) { + const n = s[0]; + const r = s[1]; + return new Vs(n.range.endLineNumber, n.range.endColumn, r.range.startLineNumber, r.range.startColumn); + } else { + const n = s[0].range; + const r = this.c ? -this.c.length - 1 : 0; + return new Vs(n.endLineNumber, n.endColumn + r, n.endLineNumber, n.endColumn + r); + } + } +}; +$i(); +ef(); +Rs(); +yt(); +ua(); +var Q6s; +(function (i) { + i[i.Toggle = 0] = "Toggle"; + i[i.ForceAdd = 1] = "ForceAdd"; + i[i.ForceRemove = 2] = "ForceRemove"; +})(Q6s ||= {}); +var Z6s = class rq { + constructor(e, t, s, n, r, o, a) { + this.l = e; + this.a = t; + this.b = s; + this.c = n; + this.d = r; + this.f = null; + this.g = 0; + this.h = false; + this.e = o; + this.k = a || false; + } + static m(e, t, s, n) { + e.tokenization.tokenizeIfCheap(t); + const r = e.getLanguageIdAtPosition(t, 1); + const o = n.getLanguageConfiguration(r).comments; + const a = o ? o.lineCommentToken : null; + if (!a) { + return null; + } + const l = []; + for (let c = 0, u = s - t + 1; c < u; c++) { + l[c] = { + ignore: false, + commentStr: a, + commentStrOffset: 0, + commentStrLength: a.length + }; + } + return l; + } + static _analyzeLines(e, t, s, n, r, o, a, l) { + let c = true; + let u; + if (e === 0) { + u = true; + } else if (e === 1) { + u = false; + } else { + u = true; + } + for (let d = 0, h = n.length; d < h; d++) { + const g = n[d]; + const p = r + d; + if (p === r && a) { + g.ignore = true; + continue; + } + const b = s.getLineContent(p); + const v = B0(b); + if (v === -1) { + g.ignore = o; + g.commentStrOffset = b.length; + continue; + } + c = false; + g.ignore = false; + g.commentStrOffset = v; + if (u && !D0e._haystackHasNeedleAtOffset(b, g.commentStr, v)) { + if (e === 0) { + u = false; + } else if (e !== 1) { + g.ignore = true; + } + } + if (u && t) { + const y = v + g.commentStrLength; + if (y < b.length && b.charCodeAt(y) === 32) { + g.commentStrLength += 1; + } + } + } + if (e === 0 && c) { + u = false; + for (let d = 0, h = n.length; d < h; d++) { + n[d].ignore = false; + } + } + return { + supported: true, + shouldRemoveComments: u, + lines: n + }; + } + static _gatherPreflightData(e, t, s, n, r, o, a, l) { + const c = rq.m(s, n, r, l); + if (c === null) { + return { + supported: false + }; + } else { + return rq._analyzeLines(e, t, s, c, n, o, a, l); + } + } + n(e, t, s, n) { + let r; + if (s.shouldRemoveComments) { + r = rq._createRemoveLineCommentsOperations(s.lines, n.startLineNumber); + } else { + rq._normalizeInsertionPoint(e, s.lines, n.startLineNumber, this.b); + r = this.q(s.lines, n.startLineNumber); + } + const o = new je(n.positionLineNumber, n.positionColumn); + for (let a = 0, l = r.length; a < l; a++) { + t.addEditOperation(r[a].range, r[a].text); + if (Z.isEmpty(r[a].range) && Z.getStartPosition(r[a].range).equals(o) && e.getLineContent(o.lineNumber).length + 1 === o.column) { + this.g = (r[a].text || "").length; + } + } + this.f = t.trackSelection(n); + } + o(e, t, s, n) { + let r = t.startLineNumber; + let o = t.endLineNumber; + const a = n.length + Math.max(e.getLineFirstNonWhitespaceColumn(t.startLineNumber), t.startColumn); + let l = e.getLineContent(r).lastIndexOf(s, a - 1); + let c = e.getLineContent(o).indexOf(n, t.endColumn - 1 - s.length); + if (l !== -1 && c === -1) { + c = e.getLineContent(r).indexOf(n, l + s.length); + o = r; + } + if (l === -1 && c !== -1) { + l = e.getLineContent(o).lastIndexOf(s, c); + r = o; + } + if (t.isEmpty() && (l === -1 || c === -1)) { + l = e.getLineContent(r).indexOf(s); + if (l !== -1) { + c = e.getLineContent(r).indexOf(n, l + s.length); + } + } + if (l !== -1 && e.getLineContent(r).charCodeAt(l + s.length) === 32) { + s += " "; + } + if (c !== -1 && e.getLineContent(o).charCodeAt(c - 1) === 32) { + n = " " + n; + c -= 1; + } + if (l !== -1 && c !== -1) { + return D0e._createRemoveBlockCommentOperations(new Z(r, l + s.length + 1, o, c + 1), s, n); + } else { + return null; + } + } + p(e, t, s) { + e.tokenization.tokenizeIfCheap(s.startLineNumber); + const n = e.getLanguageIdAtPosition(s.startLineNumber, 1); + const r = this.l.getLanguageConfiguration(n).comments; + if (!r || !r.blockCommentStartToken || !r.blockCommentEndToken) { + return; + } + const o = r.blockCommentStartToken; + const a = r.blockCommentEndToken; + let l = this.o(e, s, o, a); + if (!l) { + if (s.isEmpty()) { + const c = e.getLineContent(s.startLineNumber); + let u = B0(c); + if (u === -1) { + u = c.length; + } + l = D0e._createAddBlockCommentOperations(new Z(s.startLineNumber, u + 1, s.startLineNumber, c.length + 1), o, a, this.d); + } else { + l = D0e._createAddBlockCommentOperations(new Z(s.startLineNumber, e.getLineFirstNonWhitespaceColumn(s.startLineNumber), s.endLineNumber, e.getLineMaxColumn(s.endLineNumber)), o, a, this.d); + } + if (l.length === 1) { + this.g = o.length + 1; + } + } + this.f = t.trackSelection(s); + for (const c of l) { + t.addEditOperation(c.range, c.text); + } + } + getEditOperations(e, t) { + let s = this.a; + this.h = false; + if (s.startLineNumber === s.endLineNumber && this.k) { + t.addEditOperation(new Z(s.startLineNumber, e.getLineMaxColumn(s.startLineNumber), s.startLineNumber + 1, 1), s.startLineNumber === e.getLineCount() ? "" : ` +`); + this.f = t.trackSelection(s); + return; + } + if (s.startLineNumber < s.endLineNumber && s.endColumn === 1) { + this.h = true; + s = s.setEndPosition(s.endLineNumber - 1, e.getLineMaxColumn(s.endLineNumber - 1)); + } + const n = rq._gatherPreflightData(this.c, this.d, e, s.startLineNumber, s.endLineNumber, this.e, this.k, this.l); + if (n.supported) { + return this.n(e, t, n, s); + } else { + return this.p(e, t, s); + } + } + computeCursorState(e, t) { + let s = t.getTrackedSelection(this.f); + if (this.h) { + s = s.setEndPosition(s.endLineNumber + 1, 1); + } + return new Vs(s.selectionStartLineNumber, s.selectionStartColumn + this.g, s.positionLineNumber, s.positionColumn + this.g); + } + static _createRemoveLineCommentsOperations(e, t) { + const s = []; + for (let n = 0, r = e.length; n < r; n++) { + const o = e[n]; + if (!o.ignore) { + s.push(Ua.delete(new Z(t + n, o.commentStrOffset + 1, t + n, o.commentStrOffset + o.commentStrLength + 1))); + } + } + return s; + } + q(e, t) { + const s = []; + const n = this.d ? " " : ""; + for (let r = 0, o = e.length; r < o; r++) { + const a = e[r]; + if (!a.ignore) { + s.push(Ua.insert(new je(t + r, a.commentStrOffset + 1), a.commentStr + n)); + } + } + return s; + } + static r(e, t, s, n) { + if (s) { + return e + (t - e % t); + } else { + return e + n; + } + } + static _normalizeInsertionPoint(e, t, s, n) { + let r = 1073741824; + let o; + let a; + for (let l = 0, c = t.length; l < c; l++) { + if (t[l].ignore) { + continue; + } + const u = e.getLineContent(s + l); + let d = 0; + for (let h = 0, g = t[l].commentStrOffset; d < r && h < g; h++) { + d = rq.r(d, n, u.charCodeAt(h) === 9, 1); + } + if (d < r) { + r = d; + } + } + r = Math.floor(r / n) * n; + for (let l = 0, c = t.length; l < c; l++) { + if (t[l].ignore) { + continue; + } + const u = e.getLineContent(s + l); + let d = 0; + o = 0; + a = t[l].commentStrOffset; + for (; d < r && o < a; o++) { + d = rq.r(d, n, u.charCodeAt(o) === 9, 1); + } + if (d > r) { + t[l].commentStrOffset = o - 1; + } else { + t[l].commentStrOffset = o; + } + } + } +}; +X(); +Je(); +var EZt = class extends Es { + constructor(i, e) { + super(e); + this.d = i; + } + run(i, e) { + const t = i.get(Lu); + if (!e.hasModel()) { + return; + } + const s = e.getModel(); + const n = []; + const r = s.getOptions(); + const o = e.getOption(23); + const a = e.getSelections().map((c, u) => ({ + selection: c, + index: u, + ignoreFirstLine: false + })); + a.sort((c, u) => Z.compareRangesUsingStarts(c.selection, u.selection)); + let l = a[0]; + for (let c = 1; c < a.length; c++) { + const u = a[c]; + if (l.selection.endLineNumber === u.selection.startLineNumber) { + if (l.index < u.index) { + u.ignoreFirstLine = true; + } else { + l.ignoreFirstLine = true; + l = u; + } + } + } + for (const c of a) { + n.push(new Z6s(t, c.selection, r.indentSize, this.d, o.insertSpace, o.ignoreEmptyLines, c.ignoreFirstLine)); + } + e.pushUndoStop(); + e.executeCommands(this.id, n); + e.pushUndoStop(); + } +}; +var xmr = class extends EZt { + constructor() { + super(0, { + id: "editor.action.commentLine", + label: W(974, "Toggle Line Comment"), + precondition: ke.writable, + kbOpts: { + kbExpr: ke.editorTextFocus, + primary: 2138, + weight: 100 + }, + menuOpts: { + menuId: _.MenubarEditMenu, + group: "5_insert", + title: f(972, null), + order: 1 + } + }); + } +}; +var kmr = class extends EZt { + constructor() { + super(1, { + id: "editor.action.addCommentLine", + label: W(975, "Add Line Comment"), + precondition: ke.writable, + kbOpts: { + kbExpr: ke.editorTextFocus, + primary: Ai(_r, 2081), + mac: { + primary: Ai(Xr, 2081) + }, + weight: 100 + } + }); + } +}; +var Emr = class extends EZt { + constructor() { + super(2, { + id: "editor.action.removeCommentLine", + label: W(976, "Remove Line Comment"), + precondition: ke.writable, + kbOpts: { + kbExpr: ke.editorTextFocus, + primary: Ai(_r, 2099), + mac: { + primary: Ai(Xr, 2099) + }, + weight: 100 + } + }); + } +}; +var Imr = class extends Es { + constructor() { + super({ + id: "editor.action.blockComment", + label: W(977, "Toggle Block Comment"), + precondition: ke.writable, + kbOpts: { + kbExpr: ke.editorTextFocus, + primary: 1567, + linux: { + primary: 3103 + }, + weight: 100 + }, + menuOpts: { + menuId: _.MenubarEditMenu, + group: "5_insert", + title: f(973, null), + order: 2 + } + }); + } + run(i, e) { + const t = i.get(Lu); + if (!e.hasModel()) { + return; + } + const s = e.getOption(23); + const n = []; + const r = e.getSelections(); + for (const o of r) { + n.push(new D0e(o, s.insertSpace, t)); + } + e.pushUndoStop(); + e.executeCommands(this.id, n); + e.pushUndoStop(); + } +}; +Oi(xmr); +Oi(kmr); +Oi(Emr); +Oi(Imr); +kR(); +q(); +en(); +Sr(); +X(); +var IZt = class { + constructor(i) { + this.selections = i; + } + equals(i) { + const e = this.selections.length; + const t = i.selections.length; + if (e !== t) { + return false; + } + for (let s = 0; s < e; s++) { + if (!this.selections[s].equalsSelection(i.selections[s])) { + return false; + } + } + return true; + } +}; +var DZt = class { + constructor(i, e, t) { + this.cursorState = i; + this.scrollTop = e; + this.scrollLeft = t; + } +}; +var Dmt = class T_n extends H { + static { + this.ID = "editor.contrib.cursorUndoRedoController"; + } + static get(e) { + return e.getContribution(T_n.ID); + } + constructor(e) { + super(); + this.a = e; + this.b = false; + this.c = []; + this.f = []; + this.D(e.onDidChangeModel(t => { + this.c = []; + this.f = []; + })); + this.D(e.onDidChangeModelContent(t => { + this.c = []; + this.f = []; + })); + this.D(e.onDidChangeCursorSelection(t => { + if (this.b || !t.oldSelections || t.oldModelVersionId !== t.modelVersionId) { + return; + } + const s = new IZt(t.oldSelections); + if (!(this.c.length > 0) || !this.c[this.c.length - 1].cursorState.equals(s)) { + this.c.push(new DZt(s, e.getScrollTop(), e.getScrollLeft())); + this.f = []; + if (this.c.length > 50) { + this.c.shift(); + } + } + })); + } + cursorUndo() { + if (!!this.a.hasModel() && this.c.length !== 0) { + this.f.push(new DZt(new IZt(this.a.getSelections()), this.a.getScrollTop(), this.a.getScrollLeft())); + this.g(this.c.pop()); + } + } + cursorRedo() { + if (!!this.a.hasModel() && this.f.length !== 0) { + this.c.push(new DZt(new IZt(this.a.getSelections()), this.a.getScrollTop(), this.a.getScrollLeft())); + this.g(this.f.pop()); + } + } + g(e) { + this.b = true; + this.a.setSelections(e.cursorState.selections); + this.a.setScrollPosition({ + scrollTop: e.scrollTop, + scrollLeft: e.scrollLeft + }); + this.b = false; + } +}; +var Dmr = class extends Es { + constructor() { + super({ + id: "cursorUndo", + label: W(988, "Cursor Undo"), + precondition: undefined, + kbOpts: { + kbExpr: ke.textInputFocus, + primary: 2099, + weight: 100 + } + }); + } + run(i, e, t) { + Dmt.get(e)?.cursorUndo(); + } +}; +var Tmr = class extends Es { + constructor() { + super({ + id: "cursorRedo", + label: W(989, "Cursor Redo"), + precondition: undefined + }); + } + run(i, e, t) { + Dmt.get(e)?.cursorRedo(); + } +}; +bo(Dmt.ID, Dmt, 0); +Oi(Dmr); +Oi(Tmr); +q(); +rt(); +en(); +Rs(); +yt(); +ua(); +Ya(); +yt(); +ua(); +var Pmr = class { + constructor(i, e, t) { + this.a = i; + this.b = e; + this.d = t; + this.c = null; + } + getEditOperations(i, e) { + const t = i.getValueInRange(this.a); + if (!this.d) { + e.addEditOperation(this.a, null); + } + e.addEditOperation(new Z(this.b.lineNumber, this.b.column, this.b.lineNumber, this.b.column), t); + if (this.a.containsPosition(this.b) && (!this.d || !this.a.getEndPosition().equals(this.b) && !this.a.getStartPosition().equals(this.b))) { + this.c = this.a; + return; + } + if (this.d) { + this.c = new Vs(this.b.lineNumber, this.b.column, this.a.endLineNumber - this.a.startLineNumber + this.b.lineNumber, this.a.startLineNumber === this.a.endLineNumber ? this.b.column + this.a.endColumn - this.a.startColumn : this.a.endColumn); + return; + } + if (this.b.lineNumber > this.a.endLineNumber) { + this.c = new Vs(this.b.lineNumber - this.a.endLineNumber + this.a.startLineNumber, this.b.column, this.b.lineNumber, this.a.startLineNumber === this.a.endLineNumber ? this.b.column + this.a.endColumn - this.a.startColumn : this.a.endColumn); + return; + } + if (this.b.lineNumber < this.a.endLineNumber) { + this.c = new Vs(this.b.lineNumber, this.b.column, this.b.lineNumber + this.a.endLineNumber - this.a.startLineNumber, this.a.startLineNumber === this.a.endLineNumber ? this.b.column + this.a.endColumn - this.a.startColumn : this.a.endColumn); + return; + } + if (this.a.endColumn <= this.b.column) { + this.c = new Vs(this.b.lineNumber - this.a.endLineNumber + this.a.startLineNumber, this.a.startLineNumber === this.a.endLineNumber ? this.b.column - this.a.endColumn + this.a.startColumn : this.b.column - this.a.endColumn + this.a.startColumn, this.b.lineNumber, this.a.startLineNumber === this.a.endLineNumber ? this.b.column : this.a.endColumn); + } else { + this.c = new Vs(this.b.lineNumber - this.a.endLineNumber + this.a.startLineNumber, this.b.column, this.b.lineNumber, this.b.column + this.a.endColumn - this.a.startColumn); + } + } + computeCursorState(i, e) { + return this.c; + } +}; +function Xne(i) { + if (Gt) { + return i.altKey; + } else { + return i.ctrlKey; + } +} +var TZt = class nYe extends H { + static { + this.ID = "editor.contrib.dragAndDrop"; + } + static { + this.TRIGGER_KEY_VALUE = Gt ? 6 : 5; + } + static get(e) { + return e.getContribution(nYe.ID); + } + constructor(e) { + super(); + this.a = e; + this.c = this.a.createDecorationsCollection(); + this.D(this.a.onMouseDown(t => this.n(t))); + this.D(this.a.onMouseUp(t => this.q(t))); + this.D(this.a.onMouseDrag(t => this.r(t))); + this.D(this.a.onMouseDrop(t => this.t(t))); + this.D(this.a.onMouseDropCanceled(() => this.s())); + this.D(this.a.onKeyDown(t => this.j(t))); + this.D(this.a.onKeyUp(t => this.m(t))); + this.D(this.a.onDidBlurEditorWidget(() => this.h())); + this.D(this.a.onDidBlurEditorText(() => this.h())); + this.f = false; + this.g = false; + this.b = null; + } + h() { + this.w(); + this.b = null; + this.f = false; + this.g = false; + } + j(e) { + if (!!this.a.getOption(35) && !this.a.getOption(22)) { + if (Xne(e)) { + this.g = true; + } + if (this.f && Xne(e)) { + this.a.updateOptions({ + mouseStyle: "copy" + }); + } + } + } + m(e) { + if (!!this.a.getOption(35) && !this.a.getOption(22)) { + if (Xne(e)) { + this.g = false; + } + if (this.f && e.keyCode === nYe.TRIGGER_KEY_VALUE) { + this.a.updateOptions({ + mouseStyle: "default" + }); + } + } + } + n(e) { + this.f = true; + } + q(e) { + this.f = false; + this.a.updateOptions({ + mouseStyle: "text" + }); + } + r(e) { + const t = e.target; + if (this.b === null) { + const n = (this.a.getSelections() || []).filter(r => t.position && r.containsPosition(t.position)); + if (n.length === 1) { + this.b = n[0]; + } else { + return; + } + } + if (Xne(e.event)) { + this.a.updateOptions({ + mouseStyle: "copy" + }); + } else { + this.a.updateOptions({ + mouseStyle: "default" + }); + } + if (t.position) { + if (this.b.containsPosition(t.position)) { + this.w(); + } else { + this.showAt(t.position); + } + } + } + s() { + this.a.updateOptions({ + mouseStyle: "text" + }); + this.w(); + this.b = null; + this.f = false; + } + t(e) { + if (e.target && (this.y(e.target) || this.z(e.target)) && e.target.position) { + const t = new je(e.target.position.lineNumber, e.target.position.column); + if (this.b === null) { + let s = null; + if (e.event.shiftKey) { + const n = this.a.getSelection(); + if (n) { + const { + selectionStartLineNumber: r, + selectionStartColumn: o + } = n; + s = [new Vs(r, o, t.lineNumber, t.column)]; + } + } else { + s = (this.a.getSelections() || []).map(n => n.containsPosition(t) ? new Vs(t.lineNumber, t.column, t.lineNumber, t.column) : n); + } + this.a.setSelections(s || [], "mouse", 3); + } else if (!this.b.containsPosition(t) || (Xne(e.event) || this.g) && (this.b.getEndPosition().equals(t) || this.b.getStartPosition().equals(t))) { + this.a.pushUndoStop(); + this.a.executeCommand(nYe.ID, new Pmr(this.b, t, Xne(e.event) || this.g)); + this.a.pushUndoStop(); + } + } + this.a.updateOptions({ + mouseStyle: "text" + }); + this.w(); + this.b = null; + this.f = false; + } + static { + this.u = Cr.register({ + description: "dnd-target", + className: "dnd-target" + }); + } + showAt(e) { + this.c.set([{ + range: new Z(e.lineNumber, e.column, e.lineNumber, e.column), + options: nYe.u + }]); + this.a.revealPosition(e, 1); + } + w() { + this.c.clear(); + } + y(e) { + return e.type === 6 || e.type === 7; + } + z(e) { + return e.type === 2 || e.type === 3 || e.type === 4; + } + dispose() { + this.w(); + this.b = null; + this.f = false; + this.g = false; + super.dispose(); + } +}; +bo(TZt.ID, TZt, 2); +Mx(); +X(); +en(); +Sr(); +JF(); +gVt(); +var e8s = "editor.action.pasteAs"; +bo(rC.ID, rC, 0); +Sn(new class extends Wm { + constructor() { + super({ + id: eGt, + precondition: Mht, + kbOpts: { + weight: 100, + primary: 2137 + } + }); + } + runEditorCommand(i, e) { + return rC.get(e)?.changePasteType(); + } +}()); +Sn(new class extends Wm { + constructor() { + super({ + id: "editor.hidePasteWidget", + precondition: Mht, + kbOpts: { + weight: 100, + primary: 9 + } + }); + } + runEditorCommand(i, e) { + rC.get(e)?.clearWidgets(); + } +}()); +Oi(class P_n extends Es { + static { + this.d = { + oneOf: [{ + type: "object", + required: ["kind"], + properties: { + kind: { + type: "string", + description: f(990, null) + } + } + }, { + type: "object", + required: ["preferences"], + properties: { + preferences: { + type: "array", + description: f(991, null), + items: { + type: "string" + } + } + } + }] + }; + } + constructor() { + super({ + id: e8s, + label: W(992, "Paste As..."), + precondition: ke.writable, + metadata: { + description: "Paste as", + args: [{ + name: "args", + schema: P_n.d + }] + } + }); + } + run(e, t, s) { + let n; + if (s) { + if ("kind" in s) { + n = { + only: new _c(s.kind) + }; + } else if ("preferences" in s) { + n = { + preferences: s.preferences.map(r => new _c(r)) + }; + } + } + return rC.get(t)?.pasteAs(n); + } +}); +Oi(class extends Es { + constructor() { + super({ + id: "editor.action.pasteAsText", + label: W(993, "Paste as Text"), + precondition: ke.writable + }); + } + run(i, e) { + return rC.get(e)?.pasteAs({ + providerId: Lie.id + }); + } +}); +en(); +gVt(); +Jt(); +nt(); +zM(); +Mx(); +q(); +Ut(); +X(); +Me(); +Ee(); +Hw(); +te(); +dVt(); +yt(); +Tr(); +var Lmr = class { + constructor() { + this.a = new Map(); + } + removeDragOperationTransfer(i) { + if (i && this.a.has(i)) { + const e = this.a.get(i); + this.a.delete(i); + return e; + } + } + addDragOperationTransfer(i, e) { + this.a.set(i, e); + } +}; +var OR = class { + constructor(i) { + this.identifier = i; + } +}; +It(); +te(); +var T0e = Ve("treeViewsDndService"); +it(T0e, Lmr, 1); +GM(); +vVt(); +mVt(); +Gus(); +var H5; +var PZt = "editor.dropIntoEditor.preferences"; +var t8s = "editor.changeDropType"; +var LZt = new fe("dropWidgetVisible", false, f(1011, null)); +var _R = class extends H { + static { + H5 = this; + } + static { + this.ID = "editor.contrib.dropIntoEditorController"; + } + static get(e) { + return e.getContribution(H5.ID); + } + static setConfigureDefaultAction(e) { + this.a = e; + } + constructor(e, t, s, n, r) { + super(); + this.h = s; + this.j = n; + this.m = r; + this.g = rR.getInstance(); + this.c = this.D(t.createInstance(Hme, "dropIntoEditor", e)); + this.f = this.D(t.createInstance(zme, "dropIntoEditor", e, LZt, { + id: t8s, + label: f(1012, null) + }, () => H5.a ? [H5.a] : [])); + this.D(e.onDropIntoEditor(o => this.n(e, o.position, o.event))); + } + clearWidgets() { + this.f.clear(); + } + changeDropType() { + this.f.tryShowSelector(); + } + async n(e, t, s) { + if (!s.dataTransfer || !e.hasModel()) { + return; + } + H5.b?.cancel(); + e.focus(); + e.setPosition(t); + const n = ql(async r => { + const o = new Q(); + const a = o.add(new J4(e, 1, undefined, r)); + try { + const l = await this.s(s); + if (l.size === 0 || a.token.isCancellationRequested) { + return; + } + const c = e.getModel(); + if (!c) { + return; + } + const u = this.j.documentDropEditProvider.ordered(c).filter(h => h.dropMimeTypes ? h.dropMimeTypes.some(g => l.matches(g)) : true); + const d = o.add(await this.q(u, c, t, l, a.token)); + if (a.token.isCancellationRequested) { + return; + } + if (d.edits.length) { + const h = this.r(c, d.edits); + const g = e.getOption(36).showDropSelector === "afterDrop"; + await this.f.applyEditAndShowIfNeeded([Z.fromPositions(t)], { + activeEditIndex: h, + allEdits: d.edits + }, g, async p => p, r); + } + } finally { + o.dispose(); + if (H5.b === n) { + H5.b = undefined; + } + } + }); + this.c.showWhile(t, f(1013, null), n, { + cancel: () => n.cancel() + }); + H5.b = n; + } + async q(e, t, s, n, r) { + const o = new Q(); + const a = await mm(Promise.all(e.map(async c => { + try { + const u = await c.provideDocumentDropEdits(t, s, n, r); + if (u) { + o.add(u); + } + return u?.edits.map(d => ({ + ...d, + providerId: c.id + })); + } catch (u) { + if (!ca(u)) { + console.error(u); + } + console.error(u); + } + })), r); + const l = dr(a ?? []).flat(); + return { + edits: Fus(l), + dispose: () => o.dispose() + }; + } + r(e, t) { + const s = this.h.getValue(PZt, { + resource: e.uri + }); + for (const n of Array.isArray(s) ? s : []) { + const r = new _c(n); + const o = t.findIndex(a => a.kind && r.contains(a.kind)); + if (o >= 0) { + return o; + } + } + return 0; + } + async s(e) { + if (!e.dataTransfer) { + return new D7(); + } + const t = Oct(e.dataTransfer); + if (this.g.hasData(OR.prototype)) { + const s = this.g.getData(OR.prototype); + if (Array.isArray(s)) { + for (const n of s) { + const r = await this.m.removeDragOperationTransfer(n.identifier); + if (r) { + for (const [o, a] of r) { + t.replace(o, a); + } + } + } + } + } + return t; + } +}; +_R = H5 = __decorate([__param(1, re), __param(2, ve), __param(3, nn), __param(4, T0e)], _R); +bo(_R.ID, _R, 2); +hG(Bct); +Sn(new class extends Wm { + constructor() { + super({ + id: t8s, + precondition: LZt, + kbOpts: { + weight: 100, + primary: 2137 + } + }); + } + runEditorCommand(i, e, t) { + _R.get(e)?.changeDropType(); + } +}()); +Sn(new class extends Wm { + constructor() { + super({ + id: "editor.hideDropWidget", + precondition: LZt, + kbOpts: { + weight: 100, + primary: 9 + } + }); + } + runEditorCommand(i, e, t) { + _R.get(e)?.clearWidgets(); + } +}()); +nt(); +q(); +$i(); +en(); +z0(); +Sr(); +gc(); +qg(); +nt(); +q(); +Tee(); +Rs(); +yt(); +ua(); +Z9(); +yt(); +gc(); +Ya(); +Qs(); +gi(); +var RZt = class I2 { + constructor(e) { + this.a = e; + this.b = []; + this.c = []; + this.d = []; + this.e = null; + this.f = null; + this.g = this.a.getPosition(); + } + dispose() { + this.a.removeDecorations(this.j()); + this.b = []; + this.c = []; + this.d = []; + this.e = null; + this.f = null; + } + reset() { + this.b = []; + this.c = []; + this.d = []; + this.e = null; + this.f = null; + } + getCount() { + return this.b.length; + } + getFindScope() { + if (this.d[0]) { + return this.a.getModel().getDecorationRange(this.d[0]); + } else { + return null; + } + } + getFindScopes() { + if (this.d.length) { + const e = this.d.map(t => this.a.getModel().getDecorationRange(t)).filter(t => !!t); + if (e.length) { + return e; + } + } + return null; + } + getStartPosition() { + return this.g; + } + setStartPosition(e) { + this.g = e; + this.setCurrentFindMatch(null); + } + h(e) { + const t = this.b.indexOf(e); + if (t >= 0) { + return t + 1; + } else { + return 1; + } + } + getDecorationRangeAt(e) { + const t = e < this.b.length ? this.b[e] : null; + if (t) { + return this.a.getModel().getDecorationRange(t); + } else { + return null; + } + } + getCurrentMatchesPosition(e) { + const t = this.a.getModel().getDecorationsInRange(e); + for (const s of t) { + const n = s.options; + if (n === I2._FIND_MATCH_DECORATION || n === I2._CURRENT_FIND_MATCH_DECORATION) { + return this.h(s.id); + } + } + return 0; + } + setCurrentFindMatch(e) { + let t = null; + let s = 0; + if (e) { + for (let n = 0, r = this.b.length; n < r; n++) { + const o = this.a.getModel().getDecorationRange(this.b[n]); + if (e.equalsRange(o)) { + t = this.b[n]; + s = n + 1; + break; + } + } + } + if (this.f !== null || t !== null) { + this.a.changeDecorations(n => { + if (this.f !== null) { + n.changeDecorationOptions(this.f, I2._FIND_MATCH_DECORATION); + this.f = null; + } + if (t !== null) { + this.f = t; + n.changeDecorationOptions(this.f, I2._CURRENT_FIND_MATCH_DECORATION); + } + if (this.e !== null) { + n.removeDecoration(this.e); + this.e = null; + } + if (t !== null) { + let r = this.a.getModel().getDecorationRange(t); + if (r.startLineNumber !== r.endLineNumber && r.endColumn === 1) { + const o = r.endLineNumber - 1; + const a = this.a.getModel().getLineMaxColumn(o); + r = new Z(r.startLineNumber, r.startColumn, o, a); + } + this.e = n.addDecoration(r, I2.l); + } + }); + } + return s; + } + set(e, t) { + this.a.changeDecorations(s => { + let n = I2._FIND_MATCH_DECORATION; + const r = []; + if (e.length > 1000) { + n = I2._FIND_MATCH_NO_OVERVIEW_DECORATION; + const a = this.a.getModel().getLineCount(); + const c = this.a.getLayoutInfo().height / a; + const u = Math.max(2, Math.ceil(3 / c)); + let d = e[0].range.startLineNumber; + let h = e[0].range.endLineNumber; + for (let g = 1, p = e.length; g < p; g++) { + const b = e[g].range; + if (h + u >= b.startLineNumber) { + if (b.endLineNumber > h) { + h = b.endLineNumber; + } + } else { + r.push({ + range: new Z(d, 1, h, 1), + options: I2.k + }); + d = b.startLineNumber; + h = b.endLineNumber; + } + } + r.push({ + range: new Z(d, 1, h, 1), + options: I2.k + }); + } + const o = new Array(e.length); + for (let a = 0, l = e.length; a < l; a++) { + o[a] = { + range: e[a].range, + options: n + }; + } + this.b = s.deltaDecorations(this.b, o); + this.c = s.deltaDecorations(this.c, r); + if (this.e) { + s.removeDecoration(this.e); + this.e = null; + } + if (this.d.length) { + this.d.forEach(a => s.removeDecoration(a)); + this.d = []; + } + if (t?.length) { + this.d = t.map(a => s.addDecoration(a, I2.m)); + } + }); + } + matchBeforePosition(e) { + if (this.b.length === 0) { + return null; + } + for (let t = this.b.length - 1; t >= 0; t--) { + const s = this.b[t]; + const n = this.a.getModel().getDecorationRange(s); + if (!!n && !(n.endLineNumber > e.lineNumber)) { + if (n.endLineNumber < e.lineNumber) { + return n; + } + if (!(n.endColumn > e.column)) { + return n; + } + } + } + return this.a.getModel().getDecorationRange(this.b[this.b.length - 1]); + } + matchAfterPosition(e) { + if (this.b.length === 0) { + return null; + } + for (let t = 0, s = this.b.length; t < s; t++) { + const n = this.b[t]; + const r = this.a.getModel().getDecorationRange(n); + if (!!r && !(r.startLineNumber < e.lineNumber)) { + if (r.startLineNumber > e.lineNumber) { + return r; + } + if (!(r.startColumn < e.column)) { + return r; + } + } + } + return this.a.getModel().getDecorationRange(this.b[0]); + } + j() { + let e = []; + e = e.concat(this.b); + e = e.concat(this.c); + if (this.d.length) { + e.push(...this.d); + } + if (this.e) { + e.push(this.e); + } + return e; + } + static { + this._CURRENT_FIND_MATCH_DECORATION = Cr.register({ + description: "current-find-match", + stickiness: 1, + zIndex: 13, + className: "currentFindMatch", + inlineClassName: "currentFindMatchInline", + showIfCollapsed: true, + overviewRuler: { + color: lu(l4), + position: Zd.Center + }, + minimap: { + color: lu(ete), + position: 1 + } + }); + } + static { + this._FIND_MATCH_DECORATION = Cr.register({ + description: "find-match", + stickiness: 1, + zIndex: 10, + className: "findMatch", + inlineClassName: "findMatchInline", + showIfCollapsed: true, + overviewRuler: { + color: lu(l4), + position: Zd.Center + }, + minimap: { + color: lu(ete), + position: 1 + } + }); + } + static { + this._FIND_MATCH_NO_OVERVIEW_DECORATION = Cr.register({ + description: "find-match-no-overview", + stickiness: 1, + className: "findMatch", + showIfCollapsed: true + }); + } + static { + this.k = Cr.register({ + description: "find-match-only-overview", + stickiness: 1, + overviewRuler: { + color: lu(l4), + position: Zd.Center + } + }); + } + static { + this.l = Cr.register({ + description: "find-range-highlight", + stickiness: 1, + className: "rangeHighlight", + isWholeLine: true + }); + } + static { + this.m = Cr.register({ + description: "find-scope", + className: "findScope", + isWholeLine: true + }); + } +}; +yt(); +var Rmr = class { + constructor(i, e, t) { + this.a = i; + this.c = e; + this.d = t; + this.b = null; + } + getEditOperations(i, e) { + if (this.c.length > 0) { + const t = []; + for (let r = 0; r < this.c.length; r++) { + t.push({ + range: this.c[r], + text: this.d[r] + }); + } + t.sort((r, o) => Z.compareRangesUsingStarts(r.range, o.range)); + const s = []; + let n = t[0]; + for (let r = 1; r < t.length; r++) { + if (n.range.endLineNumber === t[r].range.startLineNumber && n.range.endColumn === t[r].range.startColumn) { + n.range = n.range.plusRange(t[r].range); + n.text = n.text + t[r].text; + } else { + s.push(n); + n = t[r]; + } + } + s.push(n); + for (const r of s) { + e.addEditOperation(r.range, r.text); + } + } + this.b = e.trackSelection(this.a); + } + computeCursorState(i, e) { + return e.getTrackedSelection(this.b); + } +}; +$i(); +function NZt(i, e) { + if (i && i[0] !== "") { + const t = i8s(i, e, "-"); + const s = i8s(i, e, "_"); + if (t && !s) { + return s8s(i, e, "-"); + } else if (!t && s) { + return s8s(i, e, "_"); + } else if (i[0].toUpperCase() === i[0]) { + return e.toUpperCase(); + } else if (i[0].toLowerCase() === i[0]) { + return e.toLowerCase(); + } else if (x4t(i[0][0]) && e.length > 0) { + return e[0].toUpperCase() + e.substr(1); + } else if (i[0][0].toUpperCase() !== i[0][0] && e.length > 0) { + return e[0].toLowerCase() + e.substr(1); + } else { + return e; + } + } else { + return e; + } +} +function i8s(i, e, t) { + return i[0].indexOf(t) !== -1 && e.indexOf(t) !== -1 && i[0].split(t).length === e.split(t).length; +} +function s8s(i, e, t) { + const s = e.split(t); + const n = i[0].split(t); + let r = ""; + s.forEach((o, a) => { + r += NZt([n[a]], o) + t; + }); + return r.slice(0, -1); +} +var n8s; +(function (i) { + i[i.StaticValue = 0] = "StaticValue"; + i[i.DynamicPieces = 1] = "DynamicPieces"; +})(n8s ||= {}); +var r8s = class { + constructor(i) { + this.staticValue = i; + this.kind = 0; + } +}; +var Nmr = class { + constructor(i) { + this.pieces = i; + this.kind = 1; + } +}; +var Tmt = class b9i { + static fromStaticValue(e) { + return new b9i([Pmt.staticValue(e)]); + } + get hasReplacementPatterns() { + return this.a.kind === 1; + } + constructor(e) { + if (!e || e.length === 0) { + this.a = new r8s(""); + } else if (e.length === 1 && e[0].staticValue !== null) { + this.a = new r8s(e[0].staticValue); + } else { + this.a = new Nmr(e); + } + } + buildReplaceString(e, t) { + if (this.a.kind === 0) { + if (t) { + return NZt(e, this.a.staticValue); + } else { + return this.a.staticValue; + } + } + let s = ""; + for (let n = 0, r = this.a.pieces.length; n < r; n++) { + const o = this.a.pieces[n]; + if (o.staticValue !== null) { + s += o.staticValue; + continue; + } + let a = b9i.b(o.matchIndex, e); + if (o.caseOps !== null && o.caseOps.length > 0) { + const l = []; + const c = o.caseOps.length; + let u = 0; + for (let d = 0, h = a.length; d < h; d++) { + if (u >= c) { + l.push(a.slice(d)); + break; + } + switch (o.caseOps[u]) { + case "U": + l.push(a[d].toUpperCase()); + break; + case "u": + l.push(a[d].toUpperCase()); + u++; + break; + case "L": + l.push(a[d].toLowerCase()); + break; + case "l": + l.push(a[d].toLowerCase()); + u++; + break; + default: + l.push(a[d]); + } + } + a = l.join(""); + } + s += a; + } + return s; + } + static b(e, t) { + if (t === null) { + return ""; + } + if (e === 0) { + return t[0]; + } + let s = ""; + while (e > 0) { + if (e < t.length) { + return (t[e] || "") + s; + } + s = String(e % 10) + s; + e = Math.floor(e / 10); + } + return "$" + s; + } +}; +var Pmt = class OFt { + static staticValue(e) { + return new OFt(e, -1, null); + } + static matchIndex(e) { + return new OFt(null, e, null); + } + static caseOps(e, t) { + return new OFt(null, e, t); + } + constructor(e, t, s) { + this.staticValue = e; + this.matchIndex = t; + if (!s || s.length === 0) { + this.caseOps = null; + } else { + this.caseOps = s.slice(0); + } + } +}; +var Mmr = class { + constructor(i) { + this.a = i; + this.b = 0; + this.c = []; + this.d = 0; + this.e = ""; + } + emitUnchanged(i) { + this.f(this.a.substring(this.b, i)); + this.b = i; + } + emitStatic(i, e) { + this.f(i); + this.b = e; + } + f(i) { + if (i.length !== 0) { + this.e += i; + } + } + emitMatchIndex(i, e, t) { + if (this.e.length !== 0) { + this.c[this.d++] = Pmt.staticValue(this.e); + this.e = ""; + } + this.c[this.d++] = Pmt.caseOps(i, t); + this.b = e; + } + finalize() { + this.emitUnchanged(this.a.length); + if (this.e.length !== 0) { + this.c[this.d++] = Pmt.staticValue(this.e); + this.e = ""; + } + return new Tmt(this.c); + } +}; +function o8s(i) { + if (!i || i.length === 0) { + return new Tmt(null); + } + const e = []; + const t = new Mmr(i); + for (let s = 0, n = i.length; s < n; s++) { + const r = i.charCodeAt(s); + if (r === 92) { + s++; + if (s >= n) { + break; + } + const o = i.charCodeAt(s); + switch (o) { + case 92: + t.emitUnchanged(s - 1); + t.emitStatic("\\", s + 1); + break; + case 110: + t.emitUnchanged(s - 1); + t.emitStatic(` +`, s + 1); + break; + case 116: + t.emitUnchanged(s - 1); + t.emitStatic("\t", s + 1); + break; + case 117: + case 85: + case 108: + case 76: + t.emitUnchanged(s - 1); + t.emitStatic("", s + 1); + e.push(String.fromCharCode(o)); + break; + } + continue; + } + if (r === 36) { + s++; + if (s >= n) { + break; + } + const o = i.charCodeAt(s); + if (o === 36) { + t.emitUnchanged(s - 1); + t.emitStatic("$", s + 1); + continue; + } + if (o === 48 || o === 38) { + t.emitUnchanged(s - 1); + t.emitMatchIndex(0, s + 1, e); + e.length = 0; + continue; + } + if (o >= 49 && o <= 57) { + let a = o - 48; + if (s + 1 < n) { + const l = i.charCodeAt(s + 1); + if (l >= 48 && l <= 57) { + s++; + a = a * 10 + (l - 48); + t.emitUnchanged(s - 2); + t.emitMatchIndex(a, s + 1, e); + e.length = 0; + continue; + } + } + t.emitUnchanged(s - 1); + t.emitMatchIndex(a, s + 1, e); + e.length = 0; + continue; + } + } + } + return t.finalize(); +} +Ee(); +var q5 = new fe("findWidgetVisible", false); +var Amr = q5.toNegated(); +var Lmt = new fe("findInputFocussed", false); +var MZt = new fe("replaceInputFocussed", false); +var Qne = { + primary: 545, + mac: { + primary: 2593 + } +}; +var Zne = { + primary: 565, + mac: { + primary: 2613 + } +}; +var ere = { + primary: 560, + mac: { + primary: 2608 + } +}; +var Rmt = { + primary: 554, + mac: { + primary: 2602 + } +}; +var P0e = { + primary: 558, + mac: { + primary: 2606 + } +}; +var Gh = { + StartFindAction: "actions.find", + StartFindWithSelection: "actions.findWithSelection", + StartFindWithArgs: "editor.actions.findWithArgs", + NextMatchFindAction: "editor.action.nextMatchFindAction", + PreviousMatchFindAction: "editor.action.previousMatchFindAction", + GoToMatchFindAction: "editor.action.goToMatchFindAction", + NextSelectionMatchFindAction: "editor.action.nextSelectionMatchFindAction", + PreviousSelectionMatchFindAction: "editor.action.previousSelectionMatchFindAction", + StartFindReplaceAction: "editor.action.startFindReplaceAction", + CloseFindWidgetCommand: "closeFindWidget", + ToggleCaseSensitiveCommand: "toggleFindCaseSensitive", + ToggleWholeWordCommand: "toggleFindWholeWord", + ToggleRegexCommand: "toggleFindRegex", + ToggleSearchScopeCommand: "toggleFindInSelection", + TogglePreserveCaseCommand: "togglePreserveCase", + ReplaceOneAction: "editor.action.replaceOne", + ReplaceAllAction: "editor.action.replaceAll", + SelectAllMatchesAction: "editor.action.selectAllMatches", + StartAiInstantSearchAction: "editor.action.startAiInstantSearch" +}; +var j5 = 19999; +var $mr = 240; +var Fmr = class _Ft { + constructor(e, t) { + this.c = new Q(); + this.a = e; + this.b = t; + this.j = false; + this.g = new qC(); + this.d = new RZt(e); + this.c.add(this.d); + this.h = new Vn(() => { + if (this.a.hasModel()) { + return this.n(false); + } + }, 100); + this.c.add(this.h); + this.c.add(this.a.onDidChangeCursorPosition(s => { + if (s.reason === 3 || s.reason === 5 || s.reason === 6) { + this.d.setStartPosition(this.a.getPosition()); + } + })); + this.f = false; + this.c.add(this.a.onDidChangeModelContent(s => { + if (!this.f) { + if (s.isFlush) { + this.d.reset(); + } + this.d.setStartPosition(this.a.getPosition()); + this.h.schedule(); + } + })); + this.c.add(this.b.onFindReplaceStateChange(s => this.k(s))); + this.n(false, this.b.searchScope); + } + dispose() { + this.j = true; + si(this.g); + this.c.dispose(); + } + k(e) { + if (!this.j) { + if (this.a.hasModel() && (e.searchString || e.isReplaceRevealed || e.isRegex || e.wholeWord || e.matchCase || e.searchScope)) { + if (this.a.getModel().isTooLargeForSyncing()) { + this.g.cancel(); + this.g.setIfNotSet(() => { + if (e.searchScope) { + this.n(e.moveCursor, this.b.searchScope); + } else { + this.n(e.moveCursor); + } + }, $mr); + } else if (e.searchScope) { + this.n(e.moveCursor, this.b.searchScope); + } else { + this.n(e.moveCursor); + } + } + } + } + static l(e, t) { + return t || e.getFullModelRange(); + } + n(e, t) { + let s = null; + if (typeof t !== "undefined") { + if (t !== null) { + if (Array.isArray(t)) { + s = t; + } else { + s = [t]; + } + } + } else { + s = this.d.getFindScopes(); + } + if (s !== null) { + s = s.map(a => { + if (a.startLineNumber !== a.endLineNumber) { + let l = a.endLineNumber; + if (a.endColumn === 1) { + l = l - 1; + } + return new Z(a.startLineNumber, 1, l, this.a.getModel().getLineMaxColumn(l)); + } + return a; + }); + } + const n = this.y(s, false, j5); + this.d.set(n, s); + const r = this.a.getSelection(); + let o = this.d.getCurrentMatchesPosition(r); + if (o === 0 && n.length > 0) { + const a = aM(n.map(l => l.range), l => Z.compareRangesUsingStarts(l, r) >= 0); + o = a > 0 ? a - 1 + 1 : o; + } + this.b.changeMatchInfo(o, this.d.getCount(), undefined); + if (e && this.a.getOption(43).cursorMoveOnType) { + this.u(this.d.getStartPosition()); + } + } + o() { + return this.b.matchesCount > 0; + } + p() { + if (!this.o()) { + const e = this.d.getFindScope(); + if (e) { + this.a.revealRangeInCenterIfOutsideViewport(e, 0); + } + return true; + } + return false; + } + q(e) { + const t = this.d.setCurrentFindMatch(e); + this.b.changeMatchInfo(t, this.d.getCount(), e); + this.a.setSelection(e); + this.a.revealRangeInCenterIfOutsideViewport(e, 0); + } + r(e) { + const t = this.b.isRegex && (this.b.searchString.indexOf("^") >= 0 || this.b.searchString.indexOf("$") >= 0); + let { + lineNumber: s, + column: n + } = e; + const r = this.a.getModel(); + if (t || n === 1) { + if (s === 1) { + s = r.getLineCount(); + } else { + s--; + } + n = r.getLineMaxColumn(s); + } else { + n--; + } + return new je(s, n); + } + s(e, t = false) { + if (!this.b.canNavigateBack()) { + const u = this.d.matchAfterPosition(e); + if (u) { + this.q(u); + } + return; + } + if (this.d.getCount() < j5) { + let u = this.d.matchBeforePosition(e); + if (u && u.isEmpty() && u.getStartPosition().equals(e)) { + e = this.r(e); + u = this.d.matchBeforePosition(e); + } + if (u) { + this.q(u); + } + return; + } + if (this.p()) { + return; + } + const s = this.d.getFindScope(); + const n = _Ft.l(this.a.getModel(), s); + if (n.getEndPosition().isBefore(e)) { + e = n.getEndPosition(); + } + if (e.isBefore(n.getStartPosition())) { + e = n.getEndPosition(); + } + const { + lineNumber: r, + column: o + } = e; + const a = this.a.getModel(); + let l = new je(r, o); + let c = a.findPreviousMatch(this.b.searchString, l, this.b.isRegex, this.b.matchCase, this.b.wholeWord ? this.a.getOption(136) : null, false); + if (c && c.range.isEmpty() && c.range.getStartPosition().equals(l)) { + l = this.r(l); + c = a.findPreviousMatch(this.b.searchString, l, this.b.isRegex, this.b.matchCase, this.b.wholeWord ? this.a.getOption(136) : null, false); + } + if (c) { + if (!t && !n.containsRange(c.range)) { + return this.s(c.range.getStartPosition(), true); + } + this.q(c.range); + } + } + moveToPrevMatch() { + this.s(this.a.getSelection().getStartPosition()); + } + t(e) { + const t = this.b.isRegex && (this.b.searchString.indexOf("^") >= 0 || this.b.searchString.indexOf("$") >= 0); + let { + lineNumber: s, + column: n + } = e; + const r = this.a.getModel(); + if (t || n === r.getLineMaxColumn(s)) { + if (s === r.getLineCount()) { + s = 1; + } else { + s++; + } + n = 1; + } else { + n++; + } + return new je(s, n); + } + u(e) { + if (!this.b.canNavigateForward()) { + const s = this.d.matchBeforePosition(e); + if (s) { + this.q(s); + } + return; + } + if (this.d.getCount() < j5) { + let s = this.d.matchAfterPosition(e); + if (s && s.isEmpty() && s.getStartPosition().equals(e)) { + e = this.t(e); + s = this.d.matchAfterPosition(e); + } + if (s) { + this.q(s); + } + return; + } + const t = this.v(e, false, true); + if (t) { + this.q(t.range); + } + } + v(e, t, s, n = false) { + if (this.p()) { + return null; + } + const r = this.d.getFindScope(); + const o = _Ft.l(this.a.getModel(), r); + if (o.getEndPosition().isBefore(e)) { + e = o.getStartPosition(); + } + if (e.isBefore(o.getStartPosition())) { + e = o.getStartPosition(); + } + const { + lineNumber: a, + column: l + } = e; + const c = this.a.getModel(); + let u = new je(a, l); + let d = c.findNextMatch(this.b.searchString, u, this.b.isRegex, this.b.matchCase, this.b.wholeWord ? this.a.getOption(136) : null, t); + if (s && d && d.range.isEmpty() && d.range.getStartPosition().equals(u)) { + u = this.t(u); + d = c.findNextMatch(this.b.searchString, u, this.b.isRegex, this.b.matchCase, this.b.wholeWord ? this.a.getOption(136) : null, t); + } + if (d) { + if (!n && !o.containsRange(d.range)) { + return this.v(d.range.getEndPosition(), t, s, true); + } else { + return d; + } + } else { + return null; + } + } + moveToNextMatch() { + this.u(this.a.getSelection().getEndPosition()); + } + w(e) { + const t = this.d.getDecorationRangeAt(e); + if (t) { + this.q(t); + } + } + moveToMatch(e) { + this.w(e); + } + x() { + if (this.b.isRegex) { + return o8s(this.b.replaceString); + } else { + return Tmt.fromStaticValue(this.b.replaceString); + } + } + replace() { + if (!this.o()) { + return; + } + const e = this.x(); + const t = this.a.getSelection(); + const s = this.v(t.getStartPosition(), true, false); + if (s) { + if (t.equalsRange(s.range)) { + const n = e.buildReplaceString(s.matches, this.b.preserveCase); + const r = new $y(t, n); + this.B("replace", r); + this.d.setStartPosition(new je(t.startLineNumber, t.startColumn + n.length)); + this.n(true); + } else { + this.d.setStartPosition(this.a.getPosition()); + this.q(s.range); + } + } + } + y(e, t, s) { + const n = (e || [null]).map(r => _Ft.l(this.a.getModel(), r)); + return this.a.getModel().findMatches(this.b.searchString, n, this.b.isRegex, this.b.matchCase, this.b.wholeWord ? this.a.getOption(136) : null, t, s); + } + replaceAll() { + if (!this.o()) { + return; + } + const e = this.d.getFindScopes(); + if (e === null && this.b.matchesCount >= j5) { + this.z(); + } else { + this.A(e); + } + this.n(false); + } + z() { + const t = new UT(this.b.searchString, this.b.isRegex, this.b.matchCase, this.b.wholeWord ? this.a.getOption(136) : null).parseSearchRequest(); + if (!t) { + return; + } + let s = t.regex; + if (!s.multiline) { + let d = "mu"; + if (s.ignoreCase) { + d += "i"; + } + if (s.global) { + d += "g"; + } + s = new RegExp(s.source, d); + } + const n = this.a.getModel(); + const r = n.getValue(1); + const o = n.getFullModelRange(); + const a = this.x(); + let l; + const c = this.b.preserveCase; + if (a.hasReplacementPatterns || c) { + l = r.replace(s, function () { + return a.buildReplaceString(arguments, c); + }); + } else { + l = r.replace(s, a.buildReplaceString(null, c)); + } + const u = new oot(o, l, this.a.getSelection()); + this.B("replaceAll", u); + } + A(e) { + const t = this.x(); + const s = this.y(e, t.hasReplacementPatterns || this.b.preserveCase, 1073741824); + const n = []; + for (let o = 0, a = s.length; o < a; o++) { + n[o] = t.buildReplaceString(s[o].matches, this.b.preserveCase); + } + const r = new Rmr(this.a.getSelection(), s.map(o => o.range), n); + this.B("replaceAll", r); + } + selectAllMatches() { + if (!this.o()) { + return; + } + const e = this.d.getFindScopes(); + let s = this.y(e, false, 1073741824).map(r => new Vs(r.range.startLineNumber, r.range.startColumn, r.range.endLineNumber, r.range.endColumn)); + const n = this.a.getSelection(); + for (let r = 0, o = s.length; r < o; r++) { + if (s[r].equalsRange(n)) { + s = [n].concat(s.slice(0, r)).concat(s.slice(r + 1)); + break; + } + } + this.a.setSelections(s); + } + B(e, t) { + try { + this.f = true; + this.a.pushUndoStop(); + this.a.executeCommand(e, t); + this.a.pushUndoStop(); + } finally { + this.f = false; + } + } +}; +xe(); +bb(); +nt(); +Qs(); +oa(); +var Omr = class L_n extends Gg { + static { + this.a = "editor.contrib.findOptionsWidget"; + } + constructor(e, t, s) { + super(); + this.H = this.D(new Vn(() => this.O(), 2000)); + this.M = false; + this.c = e; + this.g = t; + this.h = s; + this.n = document.createElement("div"); + this.n.className = "findOptionsWidget"; + this.n.style.display = "none"; + this.n.style.top = "10px"; + this.n.style.zIndex = "12"; + this.n.setAttribute("role", "presentation"); + this.n.setAttribute("aria-hidden", "true"); + const n = { + inputActiveOptionBorder: Ui(L9), + inputActiveOptionForeground: Ui(Lj), + inputActiveOptionBackground: Ui(R9) + }; + const r = this.D(Hy()); + this.w = this.D(new P5s({ + appendTitle: this.y(Gh.ToggleCaseSensitiveCommand), + isChecked: this.g.matchCase, + hoverDelegate: r, + ...n + })); + this.n.appendChild(this.w.domNode); + this.D(this.w.onChange(() => { + this.g.change({ + matchCase: this.w.checked + }, false); + })); + this.t = this.D(new L5s({ + appendTitle: this.y(Gh.ToggleWholeWordCommand), + isChecked: this.g.wholeWord, + hoverDelegate: r, + ...n + })); + this.n.appendChild(this.t.domNode); + this.D(this.t.onChange(() => { + this.g.change({ + wholeWord: this.t.checked + }, false); + })); + this.r = this.D(new R5s({ + appendTitle: this.y(Gh.ToggleRegexCommand), + isChecked: this.g.isRegex, + hoverDelegate: r, + ...n + })); + this.n.appendChild(this.r.domNode); + this.D(this.r.onChange(() => { + this.g.change({ + isRegex: this.r.checked + }, false); + })); + this.c.addOverlayWidget(this); + this.D(this.g.onFindReplaceStateChange(o => { + let a = false; + if (o.isRegex) { + this.r.checked = this.g.isRegex; + a = true; + } + if (o.wholeWord) { + this.t.checked = this.g.wholeWord; + a = true; + } + if (o.matchCase) { + this.w.checked = this.g.matchCase; + a = true; + } + if (!this.g.isRevealed && a) { + this.I(); + } + })); + this.D(Ce(this.n, Oe.MOUSE_LEAVE, o => this.J())); + this.D(Ce(this.n, "mouseover", o => this.L())); + } + y(e) { + const t = this.h.lookupKeybinding(e); + if (t) { + return ` (${t.getLabel()})`; + } else { + return ""; + } + } + dispose() { + this.c.removeOverlayWidget(this); + super.dispose(); + } + getId() { + return L_n.a; + } + getDomNode() { + return this.n; + } + getPosition() { + return { + preference: 0 + }; + } + highlightFindOptions() { + this.I(); + } + I() { + this.N(); + this.H.schedule(); + } + J() { + this.H.schedule(); + } + L() { + this.H.cancel(); + } + N() { + if (!this.M) { + this.M = true; + this.n.style.display = "block"; + } + } + O() { + if (this.M) { + this.M = false; + this.n.style.display = "none"; + } + } +}; +pe(); +q(); +yt(); +var a8s; +(function (i) { + i[i.NotSet = 0] = "NotSet"; + i[i.True = 1] = "True"; + i[i.False = 2] = "False"; +})(a8s ||= {}); +function Nmt(i, e) { + if (i === 1) { + return true; + } else if (i === 2) { + return false; + } else { + return e; + } +} +var Mmt = class extends H { + get searchString() { + return this.a; + } + get replaceString() { + return this.b; + } + get isRevealed() { + return this.c; + } + get isReplaceRevealed() { + return this.f; + } + get isRegex() { + return Nmt(this.h, this.g); + } + get wholeWord() { + return Nmt(this.m, this.j); + } + get matchCase() { + return Nmt(this.q, this.n); + } + get preserveCase() { + return Nmt(this.s, this.r); + } + get actualIsRegex() { + return this.g; + } + get actualWholeWord() { + return this.j; + } + get actualMatchCase() { + return this.n; + } + get actualPreserveCase() { + return this.r; + } + get searchScope() { + return this.t; + } + get matchesPosition() { + return this.u; + } + get matchesCount() { + return this.w; + } + get currentMatch() { + return this.y; + } + get isSearching() { + return this.C; + } + get filters() { + return this.F; + } + constructor() { + super(); + this.G = this.D(new B()); + this.onFindReplaceStateChange = this.G.event; + this.a = ""; + this.b = ""; + this.c = false; + this.f = false; + this.g = false; + this.h = 0; + this.j = false; + this.m = 0; + this.n = false; + this.q = 0; + this.r = false; + this.s = 0; + this.t = null; + this.u = 0; + this.w = 0; + this.y = null; + this.z = true; + this.C = false; + this.F = null; + } + changeMatchInfo(i, e, t) { + const s = { + moveCursor: false, + updateHistory: false, + searchString: false, + replaceString: false, + isRevealed: false, + isReplaceRevealed: false, + isRegex: false, + wholeWord: false, + matchCase: false, + preserveCase: false, + searchScope: false, + matchesPosition: false, + matchesCount: false, + currentMatch: false, + loop: false, + isSearching: false, + filters: false + }; + let n = false; + if (e === 0) { + i = 0; + } + if (i > e) { + i = e; + } + if (this.u !== i) { + this.u = i; + s.matchesPosition = true; + n = true; + } + if (this.w !== e) { + this.w = e; + s.matchesCount = true; + n = true; + } + if (typeof t !== "undefined") { + if (!Z.equalsRange(this.y, t)) { + this.y = t; + s.currentMatch = true; + n = true; + } + } + if (n) { + this.G.fire(s); + } + } + change(i, e, t = true) { + const s = { + moveCursor: e, + updateHistory: t, + searchString: false, + replaceString: false, + isRevealed: false, + isReplaceRevealed: false, + isRegex: false, + wholeWord: false, + matchCase: false, + preserveCase: false, + searchScope: false, + matchesPosition: false, + matchesCount: false, + currentMatch: false, + loop: false, + isSearching: false, + filters: false + }; + let n = false; + const r = this.isRegex; + const o = this.wholeWord; + const a = this.matchCase; + const l = this.preserveCase; + if (typeof i.searchString !== "undefined" && this.a !== i.searchString) { + this.a = i.searchString; + s.searchString = true; + n = true; + } + if (typeof i.replaceString !== "undefined" && this.b !== i.replaceString) { + this.b = i.replaceString; + s.replaceString = true; + n = true; + } + if (typeof i.isRevealed !== "undefined" && this.c !== i.isRevealed) { + this.c = i.isRevealed; + s.isRevealed = true; + n = true; + } + if (typeof i.isReplaceRevealed !== "undefined" && this.f !== i.isReplaceRevealed) { + this.f = i.isReplaceRevealed; + s.isReplaceRevealed = true; + n = true; + } + if (typeof i.isRegex !== "undefined") { + this.g = i.isRegex; + } + if (typeof i.wholeWord !== "undefined") { + this.j = i.wholeWord; + } + if (typeof i.matchCase !== "undefined") { + this.n = i.matchCase; + } + if (typeof i.preserveCase !== "undefined") { + this.r = i.preserveCase; + } + if (typeof i.searchScope !== "undefined") { + if (!i.searchScope?.every(c => this.t?.some(u => !Z.equalsRange(u, c)))) { + this.t = i.searchScope; + s.searchScope = true; + n = true; + } + } + if (typeof i.loop !== "undefined" && this.z !== i.loop) { + this.z = i.loop; + s.loop = true; + n = true; + } + if (typeof i.isSearching !== "undefined" && this.C !== i.isSearching) { + this.C = i.isSearching; + s.isSearching = true; + n = true; + } + if (typeof i.filters !== "undefined") { + if (this.F) { + this.F.update(i.filters); + } else { + this.F = i.filters; + } + s.filters = true; + n = true; + } + this.h = typeof i.isRegexOverride !== "undefined" ? i.isRegexOverride : 0; + this.m = typeof i.wholeWordOverride !== "undefined" ? i.wholeWordOverride : 0; + this.q = typeof i.matchCaseOverride !== "undefined" ? i.matchCaseOverride : 0; + this.s = typeof i.preserveCaseOverride !== "undefined" ? i.preserveCaseOverride : 0; + if (r !== this.isRegex) { + n = true; + s.isRegex = true; + } + if (o !== this.wholeWord) { + n = true; + s.wholeWord = true; + } + if (a !== this.matchCase) { + n = true; + s.matchCase = true; + } + if (l !== this.preserveCase) { + n = true; + s.preserveCase = true; + } + if (n) { + this.G.fire(s); + } + } + canNavigateBack() { + return this.H() || this.matchesPosition !== 1; + } + canNavigateForward() { + return this.H() || this.matchesPosition < this.matchesCount; + } + H() { + return this.z || this.matchesCount >= j5; + } +}; +xe(); +wc(); +bb(); +nt(); +He(); +Ut(); +q(); +rt(); +$i(); +yt(); +X(); +xe(); +bb(); +He(); +pe(); +X(); +oa(); +var _mr = f(13, null); +var Bmr = f(14, null); +var Umr = class extends ew { + constructor(i) { + super({ + icon: A.preserveCase, + title: Bmr + i.appendTitle, + isChecked: i.isChecked, + hoverDelegate: i.hoverDelegate ?? cr("element"), + inputActiveOptionBorder: i.inputActiveOptionBorder, + inputActiveOptionForeground: i.inputActiveOptionForeground, + inputActiveOptionBackground: i.inputActiveOptionBackground + }); + } +}; +var Wmr = class extends Gg { + static { + this.OPTION_CHANGE = "optionChange"; + } + constructor(i, e, t, s) { + super(); + this.M = t; + this.n = true; + this.t = 0; + this.w = this.D(new B()); + this.onDidOptionChange = this.w.event; + this.y = this.D(new B()); + this.onKeyDown = this.y.event; + this.H = this.D(new B()); + this.onMouseDown = this.H.event; + this.I = this.D(new B()); + this.onInput = this.I.event; + this.J = this.D(new B()); + this.onKeyUp = this.J.event; + this.L = this.D(new B()); + this.onPreserveCaseKeyDown = this.L.event; + this.O = 0; + this.a = e; + this.c = s.placeholder || ""; + this.g = s.validation; + this.h = s.label || _mr; + const n = s.appendPreserveCaseLabel || ""; + const r = s.history || []; + const o = !!s.flexibleHeight; + const a = !!s.flexibleWidth; + const l = s.flexibleMaxHeight; + this.domNode = document.createElement("div"); + this.domNode.classList.add("monaco-findInput"); + this.inputBox = this.D(new NQt(this.domNode, this.a, { + ariaLabel: this.h || "", + placeholder: this.c || "", + validationOptions: { + validation: this.g + }, + history: new Set(r), + showHistoryHint: s.showHistoryHint, + flexibleHeight: o, + flexibleWidth: a, + flexibleMaxHeight: l, + inputBoxStyles: s.inputBoxStyles + })); + this.r = this.D(new Umr({ + appendTitle: n, + isChecked: false, + ...s.toggleStyles + })); + this.D(this.r.onChange(d => { + this.w.fire(d); + if (!d && this.n) { + this.inputBox.focus(); + } + this.validate(); + })); + this.D(this.r.onKeyDown(d => { + this.L.fire(d); + })); + if (this.M) { + this.t = this.r.width(); + } else { + this.t = 0; + } + const c = [this.r.domNode]; + this.q(this.domNode, d => { + if (d.equals(15) || d.equals(17) || d.equals(9)) { + const h = c.indexOf(this.domNode.ownerDocument.activeElement); + if (h >= 0) { + let g = -1; + if (d.equals(17)) { + g = (h + 1) % c.length; + } else if (d.equals(15)) { + if (h === 0) { + g = c.length - 1; + } else { + g = h - 1; + } + } + if (d.equals(9)) { + c[h].blur(); + this.inputBox.focus(); + } else if (g >= 0) { + c[g].focus(); + } + yn.stop(d, true); + } + } + }); + const u = document.createElement("div"); + u.className = "controls"; + u.style.display = this.M ? "block" : "none"; + u.appendChild(this.r.domNode); + this.domNode.appendChild(u); + i?.appendChild(this.domNode); + this.q(this.inputBox.inputElement, d => this.y.fire(d)); + this.s(this.inputBox.inputElement, d => this.J.fire(d)); + this.u(this.inputBox.inputElement, d => this.I.fire()); + this.f(this.inputBox.inputElement, d => this.H.fire(d)); + } + enable() { + this.domNode.classList.remove("disabled"); + this.inputBox.enable(); + this.r.enable(); + } + disable() { + this.domNode.classList.add("disabled"); + this.inputBox.disable(); + this.r.disable(); + } + setFocusInputOnOptionClick(i) { + this.n = i; + } + setEnabled(i) { + if (i) { + this.enable(); + } else { + this.disable(); + } + } + clear() { + this.P(); + this.setValue(""); + this.focus(); + } + getValue() { + return this.inputBox.value; + } + setValue(i) { + if (this.inputBox.value !== i) { + this.inputBox.value = i; + } + } + onSearchSubmit() { + this.inputBox.addToHistory(); + } + N() {} + select() { + this.inputBox.select(); + } + focus() { + this.inputBox.focus(); + } + getPreserveCase() { + return this.r.checked; + } + setPreserveCase(i) { + this.r.checked = i; + } + focusOnPreserve() { + this.r.focus(); + } + highlightFindOptions() { + this.domNode.classList.remove("highlight-" + this.O); + this.O = 1 - this.O; + this.domNode.classList.add("highlight-" + this.O); + } + validate() { + this.inputBox?.validate(); + } + showMessage(i) { + this.inputBox?.showMessage(i); + } + clearMessage() { + this.inputBox?.hideMessage(); + } + P() { + this.inputBox?.hideMessage(); + } + set width(i) { + this.inputBox.paddingRight = this.t; + this.domNode.style.width = i + "px"; + } + dispose() { + super.dispose(); + } +}; +Ee(); +Wu(); +X(); +q(); +xe(); +var AZt = new fe("suggestWidgetVisible", false, f(1957, null)); +var $Zt = "historyNavigationWidgetFocus"; +var l8s = "historyNavigationForwardsEnabled"; +var c8s = "historyNavigationBackwardsEnabled"; +var L0e = undefined; +var Amt = []; +function NG(i, e) { + if (Amt.includes(e)) { + throw new Error("Cannot register the same widget multiple times"); + } + Amt.push(e); + const t = new Q(); + const s = new fe($Zt, false).bindTo(i); + const n = new fe(l8s, true).bindTo(i); + const r = new fe(c8s, true).bindTo(i); + const o = () => { + s.set(true); + L0e = e; + }; + const a = () => { + s.set(false); + if (L0e === e) { + L0e = undefined; + } + }; + if (Jg(e.element)) { + o(); + } + t.add(e.onDidFocus(() => o())); + t.add(e.onDidBlur(() => a())); + t.add(Ue(() => { + Amt.splice(Amt.indexOf(e), 1); + a(); + })); + return { + historyNavigationForwardsEnablement: n, + historyNavigationBackwardsEnablement: r, + dispose() { + t.dispose(); + } + }; +} +var R0e = class extends NQt { + constructor(e, t, s, n) { + super(e, t, s); + const r = this.D(n.createScoped(this.element)); + this.D(NG(r, this)); + } +}; +R0e = __decorate([__param(3, Ne)], R0e); +var N0e = class extends Kpt { + constructor(e, t, s, n) { + super(e, t, s); + const r = this.D(n.createScoped(this.inputBox.element)); + this.D(NG(r, this.inputBox)); + } +}; +N0e = __decorate([__param(3, Ne)], N0e); +var M0e = class extends Wmr { + constructor(e, t, s, n, r = false) { + super(e, t, r, s); + const o = this.D(n.createScoped(this.inputBox.element)); + this.D(NG(o, this.inputBox)); + } +}; +M0e = __decorate([__param(3, Ne)], M0e); +Ci.registerCommandAndKeybindingRule({ + id: "history.showPrevious", + weight: 200, + when: T.and(T.has($Zt), T.equals(c8s, true), T.not("isComposing"), AZt.isEqualTo(false)), + primary: 16, + secondary: [528], + handler: i => { + L0e?.showPreviousValue(); + } +}); +Ci.registerCommandAndKeybindingRule({ + id: "history.showNext", + weight: 200, + when: T.and(T.has($Zt), T.equals(l8s, true), T.not("isComposing"), AZt.isEqualTo(false)), + primary: 18, + secondary: [530], + handler: i => { + L0e?.showNextValue(); + } +}); +function KU(i) { + return i.lookupKeybinding("history.showPrevious")?.getElectronAccelerator() === "Up" && i.lookupKeybinding("history.showNext")?.getElectronAccelerator() === "Down"; +} +Qs(); +Br(); +gi(); +Rt(); +vp(); +zt(); +ya(); +oa(); +var u8s = dt("find-collapsed", A.chevronRight, f(1033, null)); +var d8s = dt("find-expanded", A.chevronDown, f(1034, null)); +var h8s = dt("find-selection", A.selection, f(1035, null)); +var f8s = dt("find-replace", A.replace, f(1036, null)); +var g8s = dt("find-replace-all", A.replaceAll, f(1037, null)); +var FZt = dt("find-previous-match", A.arrowUp, f(1038, null)); +var OZt = dt("find-next-match", A.arrowDown, f(1039, null)); +var Vmr = f(1040, null); +var Hmr = f(1041, null); +var qmr = f(1042, null); +var jmr = f(1043, null); +var zmr = f(1044, null); +var Jmr = f(1045, null); +var Gmr = f(1046, null); +var Kmr = f(1047, null); +var Ymr = f(1048, null); +var Xmr = f(1049, null); +var Qmr = f(1050, null); +var Zmr = f(1051, null); +var ebr = f(1052, null, j5); +var _Zt = f(1053, null); +var tre = f(1054, null); +var PO = 419; +var tbr = 275; +var ibr = tbr - 54; +var A0e = 69; +var sbr = 33; +var p8s = "ctrlEnterReplaceAll.windows.donotask"; +var m8s = Gt ? 256 : 2048; +var BZt = class { + constructor(i) { + this.afterLineNumber = i; + this.heightInPx = sbr; + this.suppressMouseDown = false; + this.domNode = document.createElement("div"); + this.domNode.className = "dock-find-viewzone"; + } +}; +function b8s(i, e, t) { + const s = !!e.match(/\n/); + if (t && s && t.selectionStart > 0) { + i.stopPropagation(); + return; + } +} +function v8s(i, e, t) { + const s = !!e.match(/\n/); + if (t && s && t.selectionEnd < t.value.length) { + i.stopPropagation(); + return; + } +} +var nbr = class R_n extends Gg { + static { + this.a = "editor.contrib.findWidget"; + } + constructor(e, t, s, n, r, o, a, l, c, u, d, h) { + super(); + this.ib = u; + this.jb = d; + this.lb = h; + this.I = null; + this.tb = []; + this.c = e; + this.h = t; + this.g = s; + this.n = n; + this.r = r; + this.t = o; + this.w = l; + this.y = c; + this.Z = !!l.getBoolean(p8s, 0); + this.W = false; + this.X = false; + this.Y = false; + this.hb = new gl(500); + this.D(Ue(() => this.hb.cancel())); + this.D(this.g.onFindReplaceStateChange(g => this.mb(g))); + this.Gb(); + this.sb(); + this.zb(); + this.J.inputBox.layout(); + this.D(this.c.onDidChangeConfiguration(g => { + if (g.hasChanged(96)) { + if (this.c.getOption(96)) { + this.g.change({ + isReplaceRevealed: false + }, false); + } + this.sb(); + } + if (g.hasChanged(151)) { + this.zb(); + } + if (g.hasChanged(2)) { + this.Hb(); + } + if (g.hasChanged(43)) { + const p = this.c.getOption(43).loop; + this.g.change({ + loop: p + }, false); + const b = this.c.getOption(43).addExtraSpaceOnTop; + if (b && !this.db) { + this.db = new BZt(0); + this.xb(); + } + if (!b && this.db) { + this.yb(); + } + } + })); + this.Hb(); + this.D(this.c.onDidChangeCursorSelection(() => { + if (this.W) { + this.rb(); + } + })); + this.D(this.c.onDidFocusEditorWidget(async () => { + if (this.W) { + const g = await this.h.getGlobalBufferTerm(); + if (g && g !== this.g.searchString) { + this.g.change({ + searchString: g + }, false); + this.J.select(); + } + } + })); + this.ab = Lmt.bindTo(o); + this.$ = this.D(Pu(this.J.inputBox.inputElement)); + this.D(this.$.onDidFocus(() => { + this.ab.set(true); + this.Bb(); + })); + this.D(this.$.onDidBlur(() => { + this.ab.set(false); + })); + this.cb = MZt.bindTo(o); + this.bb = this.D(Pu(this.L.inputBox.inputElement)); + this.D(this.bb.onDidFocus(() => { + this.cb.set(true); + this.Bb(); + })); + this.D(this.bb.onDidBlur(() => { + this.cb.set(false); + })); + this.c.addOverlayWidget(this); + if (this.c.getOption(43).addExtraSpaceOnTop) { + this.db = new BZt(0); + } + this.D(this.c.onDidChangeModel(() => { + if (this.W) { + this.eb = undefined; + } + })); + this.D(this.c.onDidScrollChange(g => { + if (g.scrollTopChanged) { + this.wb(); + return; + } + setTimeout(() => { + this.wb(); + }, 0); + })); + } + getId() { + return R_n.a; + } + getDomNode() { + return this.H; + } + getPosition() { + if (this.W) { + return { + preference: 0 + }; + } else { + return null; + } + } + mb(e) { + if (e.searchString) { + try { + this.Y = true; + this.J.setValue(this.g.searchString); + } finally { + this.Y = false; + } + this.sb(); + } + if (e.replaceString) { + this.L.inputBox.value = this.g.replaceString; + } + if (e.isRevealed) { + if (this.g.isRevealed) { + this.ub(); + } else { + this.vb(true); + } + } + if (e.isReplaceRevealed) { + if (this.g.isReplaceRevealed) { + if (!this.c.getOption(96) && !this.X) { + this.X = true; + this.L.width = qp(this.J.domNode); + this.sb(); + this.L.inputBox.layout(); + } + } else if (this.X) { + this.X = false; + this.sb(); + } + } + if ((e.isRevealed || e.isReplaceRevealed) && (this.g.isRevealed || this.g.isReplaceRevealed) && this.Ab()) { + this.xb(); + } + if (e.isRegex) { + this.J.setRegex(this.g.isRegex); + } + if (e.wholeWord) { + this.J.setWholeWords(this.g.wholeWord); + } + if (e.matchCase) { + this.J.setCaseSensitive(this.g.matchCase); + } + if (e.preserveCase) { + this.L.setPreserveCase(this.g.preserveCase); + } + if (e.searchScope) { + if (this.g.searchScope) { + this.Q.checked = true; + } else { + this.Q.checked = false; + } + this.rb(); + } + if (e.searchString || e.matchesCount || e.matchesPosition) { + const t = this.g.searchString.length > 0 && this.g.matchesCount === 0; + this.H.classList.toggle("no-results", t); + this.pb(); + this.sb(); + } + if (e.searchString || e.currentMatch) { + this.wb(); + } + if (e.updateHistory) { + this.nb(); + } + if (e.loop) { + this.sb(); + } + } + nb() { + this.hb.trigger(this.ob.bind(this)).then(undefined, xs); + } + ob() { + if (this.g.searchString) { + this.J.inputBox.addToHistory(); + } + if (this.g.replaceString) { + this.L.inputBox.addToHistory(); + } + } + pb() { + this.N.style.minWidth = A0e + "px"; + if (this.g.matchesCount >= j5) { + this.N.title = ebr; + } else { + this.N.title = ""; + } + this.N.firstChild?.remove(); + let e; + if (this.g.matchesCount > 0) { + let t = String(this.g.matchesCount); + if (this.g.matchesCount >= j5) { + t += "+"; + } + let s = String(this.g.matchesPosition); + if (s === "0") { + s = "?"; + } + e = Fv(_Zt, s, t); + } else { + e = tre; + } + this.N.appendChild(document.createTextNode(e)); + Fc(this.qb(e, this.g.currentMatch, this.g.searchString)); + A0e = Math.max(A0e, this.N.clientWidth); + } + qb(e, t, s) { + if (e === tre) { + if (s === "") { + return f(1055, null, e); + } else { + return f(1056, null, e, s); + } + } + if (t) { + const n = f(1057, null, e, s, t.startLineNumber + ":" + t.startColumn); + const r = this.c.getModel(); + if (r && t.startLineNumber <= r.getLineCount() && t.startLineNumber >= 1) { + return `${r.getLineContent(t.startLineNumber)}, ${n}`; + } else { + return n; + } + } + return f(1058, null, e, s); + } + rb() { + const e = this.c.getSelection(); + const t = e ? e.startLineNumber !== e.endLineNumber || e.startColumn !== e.endColumn : false; + const s = this.Q.checked; + if (this.W && (s || t)) { + this.Q.enable(); + } else { + this.Q.disable(); + } + } + sb() { + this.J.setEnabled(this.W); + this.L.setEnabled(this.W && this.X); + this.rb(); + this.R.setEnabled(this.W); + const e = this.g.searchString.length > 0; + const t = !!this.g.matchesCount; + this.O.setEnabled(this.W && e && t && this.g.canNavigateBack()); + this.P.setEnabled(this.W && e && t && this.g.canNavigateForward()); + this.S.setEnabled(this.W && this.X && e); + this.U.setEnabled(this.W && this.X && e); + this.H.classList.toggle("replaceToggled", this.X); + this.M.setExpanded(this.X); + const s = !this.c.getOption(96); + this.M.setEnabled(this.W && s); + } + ub() { + this.tb.forEach(e => { + clearTimeout(e); + }); + this.tb = []; + if (!this.W) { + this.W = true; + const e = this.c.getSelection(); + switch (this.c.getOption(43).autoFindInSelection) { + case "always": + this.Q.checked = true; + break; + case "never": + this.Q.checked = false; + break; + case "multiline": + { + const s = !!e && e.startLineNumber !== e.endLineNumber; + this.Q.checked = s; + break; + } + default: + break; + } + this.zb(); + this.sb(); + this.tb.push(setTimeout(() => { + this.H.classList.add("visible"); + this.H.setAttribute("aria-hidden", "false"); + }, 0)); + this.tb.push(setTimeout(() => { + this.J.validate(); + }, 200)); + this.c.layoutOverlayWidget(this); + let t = true; + if (this.c.getOption(43).seedSearchStringFromSelection && e) { + const s = this.c.getDomNode(); + if (s) { + const n = sd(s); + const r = this.c.getScrolledVisiblePosition(e.getStartPosition()); + const o = n.left + (r ? r.left : 0); + const a = r ? r.top : 0; + if (this.db && a < this.db.heightInPx) { + if (e.endLineNumber > e.startLineNumber) { + t = false; + } + const l = h9(this.H).left; + if (o > l) { + t = false; + } + const c = this.c.getScrolledVisiblePosition(e.getEndPosition()); + if (n.left + (c ? c.left : 0) > l) { + t = false; + } + } + } + } + this.xb(t); + } + } + vb(e) { + this.tb.forEach(t => { + clearTimeout(t); + }); + this.tb = []; + if (this.W) { + this.W = false; + this.sb(); + this.H.classList.remove("visible"); + this.H.setAttribute("aria-hidden", "true"); + this.J.clearMessage(); + if (e) { + this.c.focus(); + } + this.c.layoutOverlayWidget(this); + this.yb(); + } + } + wb(e) { + if (!this.c.getOption(43).addExtraSpaceOnTop) { + this.yb(); + return; + } + if (!this.W) { + return; + } + const s = this.db; + if (this.eb === undefined && !!s) { + this.c.changeViewZones(n => { + s.heightInPx = this.getHeight(); + this.eb = n.addZone(s); + this.c.setScrollTop(e || this.c.getScrollTop() + s.heightInPx); + }); + } + } + xb(e = true) { + if (!this.W || !this.c.getOption(43).addExtraSpaceOnTop) { + return; + } + if (this.db === undefined) { + this.db = new BZt(0); + } + const s = this.db; + this.c.changeViewZones(n => { + if (this.eb !== undefined) { + const r = this.getHeight(); + if (r === s.heightInPx) { + return; + } + const o = r - s.heightInPx; + s.heightInPx = r; + n.layoutZone(this.eb); + if (e) { + this.c.setScrollTop(this.c.getScrollTop() + o); + } + return; + } else { + let r = this.getHeight(); + r -= this.c.getOption(88).top; + if (r <= 0) { + return; + } + s.heightInPx = r; + this.eb = n.addZone(s); + if (e) { + this.c.setScrollTop(this.c.getScrollTop() + r); + } + } + }); + } + yb() { + this.c.changeViewZones(e => { + if (this.eb !== undefined) { + e.removeZone(this.eb); + this.eb = undefined; + if (this.db) { + this.c.setScrollTop(this.c.getScrollTop() - this.db.heightInPx); + this.db = undefined; + } + } + }); + } + zb() { + if (!this.W || !this.H.isConnected) { + return; + } + const e = this.c.getLayoutInfo(); + if (e.contentWidth <= 0) { + this.H.classList.add("hiddenEditor"); + return; + } else if (this.H.classList.contains("hiddenEditor")) { + this.H.classList.remove("hiddenEditor"); + } + const s = e.width; + const n = e.minimap.minimapWidth; + let r = false; + let o = false; + let a = false; + if (this.gb && qp(this.H) > PO) { + this.H.style.maxWidth = `${s - 28 - n - 15}px`; + this.L.width = qp(this.J.domNode); + return; + } + if (PO + 28 + n >= s) { + o = true; + } + if (PO + 28 + n - A0e >= s) { + a = true; + } + if (PO + 28 + n - A0e >= s + 50) { + r = true; + } + this.H.classList.toggle("collapsed-find-widget", r); + this.H.classList.toggle("narrow-find-widget", a); + this.H.classList.toggle("reduced-find-widget", o); + if (!a && !r) { + this.H.style.maxWidth = `${s - 28 - n - 15}px`; + } + this.J.layout({ + collapsedFindWidget: r, + narrowFindWidget: a, + reducedFindWidget: o + }); + if (this.gb) { + const l = this.J.inputBox.element.clientWidth; + if (l > 0) { + this.L.width = l; + } + } else if (this.X) { + this.L.width = qp(this.J.domNode); + } + } + getHeight() { + let e = 0; + e += 4; + e += this.J.inputBox.height + 2; + if (this.X) { + e += 4; + e += this.L.inputBox.height + 2; + } + e += 4; + return e; + } + Ab() { + const e = this.getHeight(); + if (this.I !== null && this.I === e) { + return false; + } else { + this.I = e; + this.H.style.height = `${e}px`; + this.lb(e); + return true; + } + } + focusFindInput() { + this.J.select(); + this.J.focus(); + } + focusFindInputWithoutSelecting() { + this.J.focus(); + } + isActive() { + return this.H.contains(Kt(this.H).document.activeElement); + } + focusReplaceInput() { + this.L.select(); + this.L.focus(); + } + highlightFindOptions() { + this.J.highlightFindOptions(); + } + Bb() { + if (this.c.hasModel() && this.Q.checked) { + const e = this.c.getSelections(); + e.map(t => { + if (t.endColumn === 1 && t.endLineNumber > t.startLineNumber) { + t = t.setEndPosition(t.endLineNumber - 1, this.c.getModel().getLineMaxColumn(t.endLineNumber - 1)); + } + const s = this.g.currentMatch; + if (t.startLineNumber !== t.endLineNumber && !Z.equalsRange(t, s)) { + return t; + } else { + return null; + } + }).filter(t => !!t); + if (e.length) { + this.g.change({ + searchScope: e + }, true); + } + } + } + Cb(e) { + if (e.middleButton) { + e.stopPropagation(); + } + } + Db(e) { + if (e.equals(m8s | 3)) { + if (this.r.dispatchEvent(e, e.target)) { + e.preventDefault(); + return; + } else { + this.J.inputBox.insertAtCursor(` +`); + e.preventDefault(); + return; + } + } + if (e.equals(2)) { + if (this.X) { + this.L.focus(); + } else { + this.J.focusOnCaseSensitive(); + } + e.preventDefault(); + return; + } + if (e.equals(2066)) { + this.c.focus(); + e.preventDefault(); + return; + } + if (e.equals(16)) { + return b8s(e, this.J.getValue(), this.J.domNode.querySelector("textarea")); + } + if (e.equals(18)) { + return v8s(e, this.J.getValue(), this.J.domNode.querySelector("textarea")); + } + } + Eb(e) { + if (e.equals(m8s | 3)) { + if (this.r.dispatchEvent(e, e.target)) { + e.preventDefault(); + return; + } else { + if (ln && sc && !this.Z) { + this.y.info(f(1059, null)); + this.Z = true; + this.w.store(p8s, true, 0, 0); + } + this.L.inputBox.insertAtCursor(` +`); + e.preventDefault(); + return; + } + } + if (e.equals(2)) { + this.J.focusOnCaseSensitive(); + e.preventDefault(); + return; + } + if (e.equals(1026)) { + this.J.focus(); + e.preventDefault(); + return; + } + if (e.equals(2066)) { + this.c.focus(); + e.preventDefault(); + return; + } + if (e.equals(16)) { + return b8s(e, this.L.inputBox.value, this.L.inputBox.element.querySelector("textarea")); + } + if (e.equals(18)) { + return v8s(e, this.L.inputBox.value, this.L.inputBox.element.querySelector("textarea")); + } + } + getVerticalSashLeft(e) { + return 0; + } + Fb(e) { + const t = this.r.lookupKeybinding(e); + if (t) { + return ` (${t.getLabel()})`; + } else { + return ""; + } + } + Gb() { + const s = this.c.getOption(43).history; + this.J = this.D(new N0e(null, this.n, { + width: ibr, + label: Hmr, + placeholder: qmr, + appendCaseSensitiveLabel: this.Fb(Gh.ToggleCaseSensitiveCommand), + appendWholeWordsLabel: this.Fb(Gh.ToggleWholeWordCommand), + appendRegexLabel: this.Fb(Gh.ToggleRegexCommand), + validation: d => { + if (d.length === 0 || !this.J.getRegex()) { + return null; + } + try { + new RegExp(d, "gu"); + return null; + } catch (h) { + return { + content: h.message + }; + } + }, + flexibleHeight: true, + flexibleWidth: true, + flexibleMaxHeight: 118, + showCommonFindToggles: true, + showHistoryHint: () => KU(this.r), + inputBoxStyles: Kp, + toggleStyles: lS, + history: s === "workspace" ? this.jb : new Set([]) + }, this.t)); + this.J.setRegex(!!this.g.isRegex); + this.J.setCaseSensitive(!!this.g.matchCase); + this.J.setWholeWords(!!this.g.wholeWord); + this.D(this.J.onKeyDown(d => this.Db(d))); + this.D(this.J.inputBox.onDidChange(() => { + if (!this.Y) { + this.g.change({ + searchString: this.J.getValue() + }, true); + } + })); + this.D(this.J.onDidOptionChange(() => { + this.g.change({ + isRegex: this.J.getRegex(), + wholeWord: this.J.getWholeWords(), + matchCase: this.J.getCaseSensitive() + }, true); + })); + this.D(this.J.onCaseSensitiveKeyDown(d => { + if (d.equals(1026) && this.X) { + this.L.focus(); + d.preventDefault(); + } + })); + this.D(this.J.onRegexKeyDown(d => { + if (d.equals(2) && this.X) { + this.L.focusOnPreserve(); + d.preventDefault(); + } + })); + this.D(this.J.inputBox.onDidHeightChange(d => { + if (this.Ab()) { + this.xb(); + } + })); + if (yl) { + this.D(this.J.onMouseDown(d => this.Cb(d))); + } + this.N = document.createElement("div"); + this.N.className = "matchesCount"; + this.pb(); + const n = this.D(Hy()); + this.O = this.D(new IE({ + label: jmr + this.Fb(Gh.PreviousMatchFindAction), + icon: FZt, + hoverDelegate: n, + onTrigger: () => { + Tn(this.c.getAction(Gh.PreviousMatchFindAction)).run().then(undefined, xs); + } + }, this.ib)); + this.P = this.D(new IE({ + label: zmr + this.Fb(Gh.NextMatchFindAction), + icon: OZt, + hoverDelegate: n, + onTrigger: () => { + Tn(this.c.getAction(Gh.NextMatchFindAction)).run().then(undefined, xs); + } + }, this.ib)); + const r = document.createElement("div"); + r.className = "find-part"; + r.appendChild(this.J.domNode); + const o = document.createElement("div"); + o.className = "find-actions"; + r.appendChild(o); + o.appendChild(this.N); + o.appendChild(this.O.domNode); + o.appendChild(this.P.domNode); + this.Q = this.D(new ew({ + icon: h8s, + title: Jmr + this.Fb(Gh.ToggleSearchScopeCommand), + isChecked: false, + hoverDelegate: n, + inputActiveOptionBackground: Ui(R9), + inputActiveOptionBorder: Ui(L9), + inputActiveOptionForeground: Ui(Lj) + })); + this.D(this.Q.onChange(() => { + if (this.Q.checked) { + if (this.c.hasModel()) { + let d = this.c.getSelections(); + d = d.map(h => { + if (h.endColumn === 1 && h.endLineNumber > h.startLineNumber) { + h = h.setEndPosition(h.endLineNumber - 1, this.c.getModel().getLineMaxColumn(h.endLineNumber - 1)); + } + if (h.isEmpty()) { + return null; + } else { + return h; + } + }).filter(h => !!h); + if (d.length) { + this.g.change({ + searchScope: d + }, true); + } + } + } else { + this.g.change({ + searchScope: null + }, true); + } + })); + o.appendChild(this.Q.domNode); + this.R = this.D(new IE({ + label: Gmr + this.Fb(Gh.CloseFindWidgetCommand), + icon: j4, + hoverDelegate: n, + onTrigger: () => { + this.g.change({ + isRevealed: false, + searchScope: null + }, false); + }, + onKeyDown: d => { + if (d.equals(2) && this.X) { + if (this.S.isEnabled()) { + this.S.focus(); + } else { + this.c.focus(); + } + d.preventDefault(); + } + } + }, this.ib)); + this.L = this.D(new M0e(null, undefined, { + label: Kmr, + placeholder: Ymr, + appendPreserveCaseLabel: this.Fb(Gh.TogglePreserveCaseCommand), + history: [], + flexibleHeight: true, + flexibleWidth: true, + flexibleMaxHeight: 118, + showHistoryHint: () => KU(this.r), + inputBoxStyles: Kp, + toggleStyles: lS + }, this.t, true)); + this.L.setPreserveCase(!!this.g.preserveCase); + this.D(this.L.onKeyDown(d => this.Eb(d))); + this.D(this.L.inputBox.onDidChange(() => { + this.g.change({ + replaceString: this.L.inputBox.value + }, false); + })); + this.D(this.L.inputBox.onDidHeightChange(d => { + if (this.X && this.Ab()) { + this.xb(); + } + })); + this.D(this.L.onDidOptionChange(() => { + this.g.change({ + preserveCase: this.L.getPreserveCase() + }, true); + })); + this.D(this.L.onPreserveCaseKeyDown(d => { + if (d.equals(2)) { + if (this.O.isEnabled()) { + this.O.focus(); + } else if (this.P.isEnabled()) { + this.P.focus(); + } else if (this.Q.enabled) { + this.Q.focus(); + } else if (this.R.isEnabled()) { + this.R.focus(); + } + d.preventDefault(); + } + })); + const a = this.D(Hy()); + this.S = this.D(new IE({ + label: Xmr + this.Fb(Gh.ReplaceOneAction), + icon: f8s, + hoverDelegate: a, + onTrigger: () => { + this.h.replace(); + }, + onKeyDown: d => { + if (d.equals(1026)) { + this.R.focus(); + d.preventDefault(); + } + } + }, this.ib)); + this.U = this.D(new IE({ + label: Qmr + this.Fb(Gh.ReplaceAllAction), + icon: g8s, + hoverDelegate: a, + onTrigger: () => { + this.h.replaceAll(); + } + }, this.ib)); + const l = document.createElement("div"); + l.className = "replace-part"; + l.appendChild(this.L.domNode); + const c = document.createElement("div"); + c.className = "replace-actions"; + l.appendChild(c); + c.appendChild(this.S.domNode); + c.appendChild(this.U.domNode); + this.M = this.D(new IE({ + label: Zmr, + className: "codicon toggle left", + onTrigger: () => { + this.g.change({ + isReplaceRevealed: !this.X + }, false); + if (this.X) { + this.L.width = qp(this.J.domNode); + this.L.inputBox.layout(); + } + this.xb(); + } + }, this.ib)); + this.M.setExpanded(this.X); + this.H = document.createElement("div"); + this.H.className = "editor-widget find-widget"; + this.H.setAttribute("aria-hidden", "true"); + this.H.ariaLabel = Vmr; + this.H.role = "dialog"; + this.H.style.width = `${PO}px`; + this.H.appendChild(this.M.domNode); + this.H.appendChild(r); + this.H.appendChild(this.R.domNode); + this.H.appendChild(l); + this.fb = this.D(new IR(this.H, this, { + orientation: 0, + size: 2 + })); + this.gb = false; + let u = PO; + this.D(this.fb.onDidStart(() => { + u = qp(this.H); + })); + this.D(this.fb.onDidChange(d => { + this.gb = true; + const h = u + d.startX - d.currentX; + if (h < PO) { + return; + } + const g = parseFloat(yee(this.H).maxWidth) || 0; + if (!(h > g)) { + this.H.style.width = `${h}px`; + if (this.X) { + this.L.width = qp(this.J.domNode); + } + this.J.inputBox.layout(); + this.Ab(); + } + })); + this.D(this.fb.onDidReset(() => { + const d = qp(this.H); + if (d < PO) { + return; + } + let h = PO; + if (!this.gb || d === PO) { + const g = this.c.getLayoutInfo(); + h = g.width - 28 - g.minimap.minimapWidth - 15; + this.gb = true; + } + this.H.style.width = `${h}px`; + if (this.X) { + this.L.width = qp(this.J.domNode); + } + this.J.inputBox.layout(); + })); + } + Hb() { + const e = this.c.getOption(2); + this.J.setFocusInputOnOptionClick(e !== 2); + } + getViewState() { + let e = false; + if (this.db && this.eb) { + e = this.db.heightInPx > this.c.getScrollTop(); + } + return { + widgetViewZoneVisible: e, + scrollTop: this.c.getScrollTop() + }; + } + setViewState(e) { + if (e && e.widgetViewZoneVisible) { + this.wb(e.scrollTop); + } + } +}; +var IE = class extends Gg { + constructor(i, e) { + super(); + this.a = i; + let t = "button"; + if (this.a.className) { + t = t + " " + this.a.className; + } + if (this.a.icon) { + t = t + " " + le.asClassName(this.a.icon); + } + this.c = document.createElement("div"); + this.c.tabIndex = 0; + this.c.className = t; + this.c.setAttribute("role", "button"); + this.c.setAttribute("aria-label", this.a.label); + this.D(e.setupManagedHover(i.hoverDelegate ?? cr("element"), this.c, this.a.label)); + this.b(this.c, s => { + this.a.onTrigger(); + s.preventDefault(); + }); + this.q(this.c, s => { + if (s.equals(10) || s.equals(3)) { + this.a.onTrigger(); + s.preventDefault(); + return; + } + this.a.onKeyDown?.(s); + }); + } + get domNode() { + return this.c; + } + isEnabled() { + return this.c.tabIndex >= 0; + } + focus() { + this.c.focus(); + } + setEnabled(i) { + this.c.classList.toggle("disabled", !i); + this.c.setAttribute("aria-disabled", String(!i)); + this.c.tabIndex = i ? 0 : -1; + } + setExpanded(i) { + this.c.setAttribute("aria-expanded", String(!!i)); + if (i) { + this.c.classList.remove(...le.asClassNameArray(u8s)); + this.c.classList.add(...le.asClassNameArray(d8s)); + } else { + this.c.classList.remove(...le.asClassNameArray(d8s)); + this.c.classList.add(...le.asClassNameArray(u8s)); + } + } +}; +bf((i, e) => { + const t = i.getColor(o4); + if (t) { + e.addRule(`.monaco-editor .findMatch { border: 1px ${LI(i.type) ? "dotted" : "solid"} ${t}; box-sizing: border-box; }`); + } + const s = i.getColor(cQi); + if (s) { + e.addRule(`.monaco-editor .findScope { border: 1px ${LI(i.type) ? "dashed" : "solid"} ${s}; }`); + } + const n = i.getColor(cn); + if (n) { + e.addRule(`.monaco-editor .find-widget { border: 1px solid ${n}; }`); + } + const r = i.getColor(oQi); + if (r) { + e.addRule(`.monaco-editor .findMatchInline { color: ${r}; }`); + } + const o = i.getColor(aQi); + if (o) { + e.addRule(`.monaco-editor .currentFindMatchInline { color: ${o}; }`); + } +}); +X(); +Je(); +Xa(); +Ee(); +ks(); +Fi(); +Wi(); +mn(); +qt(); +gi(); +pe(); +pe(); +qt(); +var YU; +var UZt = class { + static { + YU = this; + } + static { + this.FIND_HISTORY_KEY = "workbench.find.history"; + } + static { + this.c = null; + } + static getOrCreate(e) { + YU.c ||= new YU(e); + return YU.c; + } + constructor(e) { + this.d = e; + this.a = new Set(); + this.b = new B(); + this.onDidChange = this.b.event; + this.load(); + } + delete(e) { + const t = this.a.delete(e); + this.save(); + return t; + } + add(e) { + this.a.add(e); + this.save(); + return this; + } + has(e) { + return this.a.has(e); + } + clear() { + this.a.clear(); + this.save(); + } + forEach(e, t) { + this.load(); + return this.a.forEach(e); + } + replace(e) { + this.a = new Set(e); + this.save(); + } + load() { + let e; + const t = this.d.get(YU.FIND_HISTORY_KEY, 1); + if (t) { + try { + e = JSON.parse(t); + } catch {} + } + this.a = new Set(e || []); + } + save() { + const e = []; + this.a.forEach(t => e.push(t)); + return new Promise(t => { + this.d.store(YU.FIND_HISTORY_KEY, JSON.stringify(e), 1, 0); + this.b.fire(e); + t(); + }); + } +}; +UZt = YU = __decorate([__param(0, ht)], UZt); +var WZt; +var rbr = 524288; +function ire(i, e = "single", t = false) { + if (!i.hasModel()) { + return null; + } + const s = i.getSelection(); + if (e === "single" && s.startLineNumber === s.endLineNumber || e === "multiple") { + if (s.isEmpty()) { + const n = i.getConfiguredWordAtPosition(s.getStartPosition()); + if (n && t === false) { + return n.word; + } + } else if (i.getModel().getValueLengthInRange(s) < rbr) { + return i.getModel().getValueInRange(s); + } + } + return null; +} +var y8s; +(function (i) { + i[i.NoFocusChange = 0] = "NoFocusChange"; + i[i.FocusFindInput = 1] = "FocusFindInput"; + i[i.FocusReplaceInput = 2] = "FocusReplaceInput"; +})(y8s ||= {}); +var iw = class extends H { + static { + WZt = this; + } + static { + this.ID = "editor.contrib.findController"; + } + get editor() { + return this.a; + } + static get(e) { + return e.getContribution(WZt.ID); + } + constructor(e, t, s, n, r, o) { + super(); + this.r = new B(); + this.onDidChangeState = this.r.event; + this.a = e; + this.b = q5.bindTo(t); + this.m = t; + this.h = s; + this.j = n; + this.n = r; + this.q = o; + this.f = new gl(500); + this.c = this.D(new Mmt()); + this.w(); + this.D(this.c.onFindReplaceStateChange(a => this.t(a))); + this.g = null; + this.D(this.a.onDidChangeModel(() => { + const a = this.a.getModel() && this.c.isRevealed; + this.s(); + this.c.change({ + searchScope: null, + matchCase: this.h.getBoolean("editor.matchCase", 1, false), + wholeWord: this.h.getBoolean("editor.wholeWord", 1, false), + isRegex: this.h.getBoolean("editor.isRegex", 1, false), + preserveCase: this.h.getBoolean("editor.preserveCase", 1, false) + }, false); + if (a) { + this.y({ + forceRevealReplace: false, + seedSearchStringFromSelection: "none", + seedSearchStringFromNonEmptySelection: false, + seedSearchStringFromGlobalClipboard: false, + shouldFocus: 0, + shouldAnimate: false, + updateSearchScope: false, + loop: this.a.getOption(43).loop + }); + } + })); + this.D(this.c.onFindReplaceStateChange(a => this.r.fire(a))); + } + dispose() { + this.s(); + super.dispose(); + } + s() { + if (this.g) { + this.g.dispose(); + this.g = null; + } + } + t(e) { + this.u(e); + if (e.isRevealed) { + if (this.c.isRevealed) { + this.b.set(true); + } else { + this.b.reset(); + this.s(); + } + } + if (e.searchString) { + this.setGlobalBufferTerm(this.c.searchString); + } + } + u(e) { + if (e.isRegex) { + this.h.store("editor.isRegex", this.c.actualIsRegex, 1, 1); + } + if (e.wholeWord) { + this.h.store("editor.wholeWord", this.c.actualWholeWord, 1, 1); + } + if (e.matchCase) { + this.h.store("editor.matchCase", this.c.actualMatchCase, 1, 1); + } + if (e.preserveCase) { + this.h.store("editor.preserveCase", this.c.actualPreserveCase, 1, 1); + } + } + w() { + this.c.change({ + matchCase: this.h.getBoolean("editor.matchCase", 1, this.c.matchCase), + wholeWord: this.h.getBoolean("editor.wholeWord", 1, this.c.wholeWord), + isRegex: this.h.getBoolean("editor.isRegex", 1, this.c.isRegex), + preserveCase: this.h.getBoolean("editor.preserveCase", 1, this.c.preserveCase) + }, false); + } + isFindInputFocused() { + return !!Lmt.getValue(this.m); + } + getState() { + return this.c; + } + closeFindWidget() { + this.c.change({ + isRevealed: false, + searchScope: null + }, false); + this.a.focus(); + } + toggleCaseSensitive() { + this.c.change({ + matchCase: !this.c.matchCase + }, false); + if (!this.c.isRevealed) { + this.highlightFindOptions(); + } + } + toggleWholeWords() { + this.c.change({ + wholeWord: !this.c.wholeWord + }, false); + if (!this.c.isRevealed) { + this.highlightFindOptions(); + } + } + toggleRegex() { + this.c.change({ + isRegex: !this.c.isRegex + }, false); + if (!this.c.isRevealed) { + this.highlightFindOptions(); + } + } + togglePreserveCase() { + this.c.change({ + preserveCase: !this.c.preserveCase + }, false); + if (!this.c.isRevealed) { + this.highlightFindOptions(); + } + } + toggleSearchScope() { + if (this.c.searchScope) { + this.c.change({ + searchScope: null + }, true); + } else if (this.a.hasModel()) { + let e = this.a.getSelections(); + e = e.map(t => { + if (t.endColumn === 1 && t.endLineNumber > t.startLineNumber) { + t = t.setEndPosition(t.endLineNumber - 1, this.a.getModel().getLineMaxColumn(t.endLineNumber - 1)); + } + if (t.isEmpty()) { + return null; + } else { + return t; + } + }).filter(t => !!t); + if (e.length) { + this.c.change({ + searchScope: e + }, true); + } + } + } + setSearchString(e) { + if (this.c.isRegex) { + e = zg(e); + } + this.c.change({ + searchString: e + }, false); + } + highlightFindOptions(e = false) {} + async y(e, t) { + this.s(); + if (!this.a.hasModel()) { + return; + } + const s = { + ...t, + isRevealed: true + }; + if (e.seedSearchStringFromSelection === "single") { + const n = ire(this.a, e.seedSearchStringFromSelection, e.seedSearchStringFromNonEmptySelection); + if (n) { + if (this.c.isRegex) { + s.searchString = zg(n); + } else { + s.searchString = n; + } + } + } else if (e.seedSearchStringFromSelection === "multiple" && !e.updateSearchScope) { + const n = ire(this.a, e.seedSearchStringFromSelection); + if (n) { + s.searchString = n; + } + } + if (!s.searchString && e.seedSearchStringFromGlobalClipboard) { + const n = await this.getGlobalBufferTerm(); + if (!this.a.hasModel()) { + return; + } + if (n) { + s.searchString = n; + } + } + if (e.forceRevealReplace || s.isReplaceRevealed) { + s.isReplaceRevealed = true; + } else if (!this.b.get()) { + s.isReplaceRevealed = false; + } + if (e.updateSearchScope) { + const n = this.a.getSelections(); + if (n.some(r => !r.isEmpty())) { + s.searchScope = n; + } + } + s.loop = e.loop; + this.c.change(s, false); + this.g ||= new Fmr(this.a, this.c); + } + start(e, t) { + return this.y(e, t); + } + moveToNextMatch() { + if (this.g) { + this.g.moveToNextMatch(); + return true; + } else { + return false; + } + } + moveToPrevMatch() { + if (this.g) { + this.g.moveToPrevMatch(); + return true; + } else { + return false; + } + } + goToMatch(e) { + if (this.g) { + this.g.moveToMatch(e); + return true; + } else { + return false; + } + } + replace() { + if (this.g) { + this.g.replace(); + return true; + } else { + return false; + } + } + replaceAll() { + if (this.g) { + if (this.a.getModel()?.isTooLargeForHeapOperation()) { + this.n.warn(f(1017, null)); + return false; + } else { + this.g.replaceAll(); + return true; + } + } else { + return false; + } + } + selectAllMatches() { + if (this.g) { + this.g.selectAllMatches(); + this.a.focus(); + return true; + } else { + return false; + } + } + async getGlobalBufferTerm() { + if (this.a.getOption(43).globalFindClipboard && this.a.hasModel() && !this.a.getModel().isTooLargeForSyncing()) { + return this.j.readFindText(); + } else { + return ""; + } + } + setGlobalBufferTerm(e) { + if (this.a.getOption(43).globalFindClipboard && this.a.hasModel() && !this.a.getModel().isTooLargeForSyncing()) { + this.j.writeFindText(e); + } + } +}; +iw = WZt = __decorate([__param(1, Ne), __param(2, ht), __param(3, Zr), __param(4, ni), __param(5, Ns)], iw); +var $0e = class extends iw { + constructor(e, t, s, n, r, o, a, l, c) { + super(e, s, a, l, o, c); + this.H = t; + this.I = n; + this.J = r; + this.F = new B(); + this.onWidgetHeightChanged = this.F.event; + this.z = null; + this.C = null; + this.G = UZt.getOrCreate(a); + } + async y(e, t) { + if (!this.z) { + this.M(); + } + const s = this.a.getSelection(); + let n = false; + switch (this.a.getOption(43).autoFindInSelection) { + case "always": + n = true; + break; + case "never": + n = false; + break; + case "multiline": + { + n = !!s && s.startLineNumber !== s.endLineNumber; + break; + } + default: + break; + } + e.updateSearchScope = e.updateSearchScope || n; + await super.y(e, t); + if (this.z) { + if (e.shouldFocus === 2) { + this.z.focusReplaceInput(); + } else if (e.shouldFocus === 1) { + this.z.focusFindInput(); + } + } + } + focusFindInputWithoutSelecting() { + if (this.z) { + this.z.focusFindInputWithoutSelecting(); + } + } + isActive() { + return this.z?.isActive() ?? false; + } + getWidgetHeight() { + if (this.c.isRevealed) { + return this.z?.getHeight(); + } + } + highlightFindOptions(e = false) { + if (!this.z) { + this.M(); + } + if (this.c.isRevealed && !e) { + this.z.highlightFindOptions(); + } else { + this.C.highlightFindOptions(); + } + } + M() { + this.z = this.D(new nbr(this.a, this, this.c, this.H, this.I, this.m, this.J, this.h, this.n, this.q, this.G, this.F.fire.bind(this.F))); + this.C = this.D(new Omr(this.a, this.c, this.I)); + } + saveViewState() { + return this.z?.getViewState(); + } + restoreViewState(e) { + this.z?.setViewState(e); + } +}; +$0e = __decorate([__param(1, Sc), __param(2, Ne), __param(3, oi), __param(4, ti), __param(5, ni), __param(6, ht), __param(7, Zr), __param(8, Ns)], $0e); +var w8s = LGi(new X6t({ + id: Gh.StartFindAction, + label: W(1024, "Find"), + precondition: T.or(ke.focus, T.has("editorIsOpen")), + kbOpts: { + kbExpr: null, + primary: 2084, + weight: 100 + }, + menuOpts: { + menuId: _.MenubarEditMenu, + group: "3_find", + title: f(1018, null), + order: 1 + } +})); +w8s.addImplementation(0, (i, e, t) => { + const s = iw.get(e); + if (s) { + return s.start({ + forceRevealReplace: false, + seedSearchStringFromSelection: e.getOption(43).seedSearchStringFromSelection !== "never" ? "single" : "none", + seedSearchStringFromNonEmptySelection: e.getOption(43).seedSearchStringFromSelection === "selection", + seedSearchStringFromGlobalClipboard: e.getOption(43).globalFindClipboard, + shouldFocus: 1, + shouldAnimate: true, + updateSearchScope: false, + loop: e.getOption(43).loop + }); + } else { + return false; + } +}); +var obr = { + description: "Open a new In-Editor Find Widget.", + args: [{ + name: "Open a new In-Editor Find Widget args", + schema: { + properties: { + searchString: { + type: "string" + }, + replaceString: { + type: "string" + }, + isRegex: { + type: "boolean" + }, + matchWholeWord: { + type: "boolean" + }, + isCaseSensitive: { + type: "boolean" + }, + preserveCase: { + type: "boolean" + }, + findInSelection: { + type: "boolean" + } + } + } + }] +}; +var abr = class extends Es { + constructor() { + super({ + id: Gh.StartFindWithArgs, + label: W(1025, "Find With Arguments"), + precondition: undefined, + kbOpts: { + kbExpr: null, + primary: 0, + weight: 100 + }, + metadata: obr + }); + } + async run(i, e, t) { + const s = iw.get(e); + if (s) { + const n = t ? { + searchString: t.searchString, + replaceString: t.replaceString, + isReplaceRevealed: t.replaceString !== undefined, + isRegex: t.isRegex, + wholeWord: t.matchWholeWord, + matchCase: t.isCaseSensitive, + preserveCase: t.preserveCase + } : {}; + await s.start({ + forceRevealReplace: false, + seedSearchStringFromSelection: s.getState().searchString.length === 0 && e.getOption(43).seedSearchStringFromSelection !== "never" ? "single" : "none", + seedSearchStringFromNonEmptySelection: e.getOption(43).seedSearchStringFromSelection === "selection", + seedSearchStringFromGlobalClipboard: true, + shouldFocus: 1, + shouldAnimate: true, + updateSearchScope: t?.findInSelection || false, + loop: e.getOption(43).loop + }, n); + s.setGlobalBufferTerm(s.getState().searchString); + } + } +}; +var lbr = class extends Es { + constructor() { + super({ + id: Gh.StartFindWithSelection, + label: W(1026, "Find With Selection"), + precondition: undefined, + kbOpts: { + kbExpr: null, + primary: 0, + mac: { + primary: 2083 + }, + weight: 100 + } + }); + } + async run(i, e) { + const t = iw.get(e); + if (t) { + await t.start({ + forceRevealReplace: false, + seedSearchStringFromSelection: "multiple", + seedSearchStringFromNonEmptySelection: false, + seedSearchStringFromGlobalClipboard: false, + shouldFocus: 0, + shouldAnimate: true, + updateSearchScope: false, + loop: e.getOption(43).loop + }); + t.setGlobalBufferTerm(t.getState().searchString); + } + } +}; +var C8s = class extends Es { + async run(i, e) { + const t = iw.get(e); + if (t && !this.d(t)) { + await t.start({ + forceRevealReplace: false, + seedSearchStringFromSelection: t.getState().searchString.length === 0 && e.getOption(43).seedSearchStringFromSelection !== "never" ? "single" : "none", + seedSearchStringFromNonEmptySelection: e.getOption(43).seedSearchStringFromSelection === "selection", + seedSearchStringFromGlobalClipboard: true, + shouldFocus: 0, + shouldAnimate: true, + updateSearchScope: false, + loop: e.getOption(43).loop + }); + this.d(t); + } + } +}; +var cbr = class extends C8s { + constructor() { + super({ + id: Gh.NextMatchFindAction, + label: W(1027, "Find Next"), + precondition: undefined, + kbOpts: [{ + kbExpr: ke.focus, + primary: 61, + mac: { + primary: 2085, + secondary: [61] + }, + weight: 100 + }, { + kbExpr: T.and(ke.focus, Lmt), + primary: 3, + weight: 100 + }] + }); + } + d(i) { + if (i.moveToNextMatch()) { + i.editor.pushUndoStop(); + return true; + } else { + return false; + } + } +}; +var ubr = class extends C8s { + constructor() { + super({ + id: Gh.PreviousMatchFindAction, + label: W(1028, "Find Previous"), + precondition: undefined, + kbOpts: [{ + kbExpr: ke.focus, + primary: 1085, + mac: { + primary: 3109, + secondary: [1085] + }, + weight: 100 + }, { + kbExpr: T.and(ke.focus, Lmt), + primary: 1027, + weight: 100 + }] + }); + } + d(i) { + return i.moveToPrevMatch(); + } +}; +var dbr = class extends Es { + constructor() { + super({ + id: Gh.GoToMatchFindAction, + label: W(1029, "Go to Match..."), + precondition: q5 + }); + this.d = []; + } + run(i, e, t) { + const s = iw.get(e); + if (!s) { + return; + } + const n = s.getState().matchesCount; + if (n < 1) { + i.get(ni).notify({ + severity: es.Warning, + message: f(1019, null) + }); + return; + } + const r = i.get(zi); + const o = new Q(); + const a = o.add(r.createInputBox()); + a.placeholder = f(1020, null, n); + const l = u => { + const d = parseInt(u); + if (isNaN(d)) { + return; + } + const h = s.getState().matchesCount; + if (d > 0 && d <= h) { + return d - 1; + } + if (d < 0 && d >= -h) { + return h + d; + } + }; + const c = u => { + const d = l(u); + if (typeof d == "number") { + a.validationMessage = undefined; + s.goToMatch(d); + const h = s.getState().currentMatch; + if (h) { + this.h(e, h); + } + } else { + a.validationMessage = f(1021, null, s.getState().matchesCount); + this.f(e); + } + }; + o.add(a.onDidChangeValue(u => { + c(u); + })); + o.add(a.onDidAccept(() => { + const u = l(a.value); + if (typeof u == "number") { + s.goToMatch(u); + a.hide(); + } else { + a.validationMessage = f(1022, null, s.getState().matchesCount); + } + })); + o.add(a.onDidHide(() => { + this.f(e); + o.dispose(); + })); + a.show(); + } + f(i) { + i.changeDecorations(e => { + this.d = e.deltaDecorations(this.d, []); + }); + } + h(i, e) { + i.changeDecorations(t => { + this.d = t.deltaDecorations(this.d, [{ + range: e, + options: { + description: "find-match-quick-access-range-highlight", + className: "rangeHighlight", + isWholeLine: true + } + }, { + range: e, + options: { + description: "find-match-quick-access-range-highlight-overview", + overviewRuler: { + color: lu(Eat), + position: Zd.Full + } + } + }]); + }); + } +}; +var S8s = class extends Es { + async run(i, e) { + const t = iw.get(e); + if (!t) { + return; + } + const s = ire(e, "single", false); + if (s) { + t.setSearchString(s); + } + if (!this.d(t)) { + await t.start({ + forceRevealReplace: false, + seedSearchStringFromSelection: "none", + seedSearchStringFromNonEmptySelection: false, + seedSearchStringFromGlobalClipboard: false, + shouldFocus: 0, + shouldAnimate: true, + updateSearchScope: false, + loop: e.getOption(43).loop + }); + this.d(t); + } + } +}; +var hbr = class extends S8s { + constructor() { + super({ + id: Gh.NextSelectionMatchFindAction, + label: W(1030, "Find Next Selection"), + precondition: undefined, + kbOpts: { + kbExpr: ke.focus, + primary: 2109, + weight: 100 + } + }); + } + d(i) { + return i.moveToNextMatch(); + } +}; +var fbr = class extends S8s { + constructor() { + super({ + id: Gh.PreviousSelectionMatchFindAction, + label: W(1031, "Find Previous Selection"), + precondition: undefined, + kbOpts: { + kbExpr: ke.focus, + primary: 3133, + weight: 100 + } + }); + } + d(i) { + return i.moveToPrevMatch(); + } +}; +var x8s = LGi(new X6t({ + id: Gh.StartFindReplaceAction, + label: W(1032, "Replace"), + precondition: T.or(ke.focus, T.has("editorIsOpen")), + kbOpts: { + kbExpr: null, + primary: 2086, + mac: { + primary: 2596 + }, + weight: 100 + }, + menuOpts: { + menuId: _.MenubarEditMenu, + group: "3_find", + title: f(1023, null), + order: 2 + } +})); +x8s.addImplementation(0, (i, e, t) => { + if (!e.hasModel() || e.getOption(96)) { + return false; + } + const s = iw.get(e); + if (!s) { + return false; + } + const n = e.getSelection(); + const r = s.isFindInputFocused(); + const o = !n.isEmpty() && n.startLineNumber === n.endLineNumber && e.getOption(43).seedSearchStringFromSelection !== "never" && !r; + const a = r || o ? 2 : 1; + return s.start({ + forceRevealReplace: true, + seedSearchStringFromSelection: o ? "single" : "none", + seedSearchStringFromNonEmptySelection: e.getOption(43).seedSearchStringFromSelection === "selection", + seedSearchStringFromGlobalClipboard: e.getOption(43).seedSearchStringFromSelection !== "never", + shouldFocus: a, + shouldAnimate: true, + updateSearchScope: false, + loop: e.getOption(43).loop + }); +}); +bo(iw.ID, $0e, 0); +Oi(abr); +Oi(lbr); +Oi(cbr); +Oi(ubr); +Oi(dbr); +Oi(hbr); +Oi(fbr); +var OA = Wm.bindToContribution(iw.get); +Sn(new OA({ + id: Gh.CloseFindWidgetCommand, + precondition: q5, + handler: i => i.closeFindWidget(), + kbOpts: { + weight: 105, + kbExpr: T.and(ke.focus, T.not("isComposing")), + primary: 9, + secondary: [1033] + } +})); +Sn(new OA({ + id: Gh.ToggleCaseSensitiveCommand, + precondition: undefined, + handler: i => i.toggleCaseSensitive(), + kbOpts: { + weight: 105, + kbExpr: ke.focus, + primary: Qne.primary, + mac: Qne.mac, + win: Qne.win, + linux: Qne.linux + } +})); +Sn(new OA({ + id: Gh.ToggleWholeWordCommand, + precondition: undefined, + handler: i => i.toggleWholeWords(), + kbOpts: { + weight: 105, + kbExpr: ke.focus, + primary: Zne.primary, + mac: Zne.mac, + win: Zne.win, + linux: Zne.linux + } +})); +Sn(new OA({ + id: Gh.ToggleRegexCommand, + precondition: undefined, + handler: i => i.toggleRegex(), + kbOpts: { + weight: 105, + kbExpr: ke.focus, + primary: ere.primary, + mac: ere.mac, + win: ere.win, + linux: ere.linux + } +})); +Sn(new OA({ + id: Gh.ToggleSearchScopeCommand, + precondition: undefined, + handler: i => i.toggleSearchScope(), + kbOpts: { + weight: 105, + kbExpr: ke.focus, + primary: Rmt.primary, + mac: Rmt.mac, + win: Rmt.win, + linux: Rmt.linux + } +})); +Sn(new OA({ + id: Gh.TogglePreserveCaseCommand, + precondition: undefined, + handler: i => i.togglePreserveCase(), + kbOpts: { + weight: 105, + kbExpr: ke.focus, + primary: P0e.primary, + mac: P0e.mac, + win: P0e.win, + linux: P0e.linux + } +})); +Sn(new OA({ + id: Gh.ReplaceOneAction, + precondition: q5, + handler: i => i.replace(), + kbOpts: { + weight: 105, + kbExpr: ke.focus, + primary: 3094 + } +})); +Sn(new OA({ + id: Gh.ReplaceOneAction, + precondition: q5, + handler: i => i.replace(), + kbOpts: { + weight: 105, + kbExpr: T.and(ke.focus, MZt), + primary: 3 + } +})); +Sn(new OA({ + id: Gh.ReplaceAllAction, + precondition: q5, + handler: i => i.replaceAll(), + kbOpts: { + weight: 105, + kbExpr: ke.focus, + primary: 2563 + } +})); +Sn(new OA({ + id: Gh.ReplaceAllAction, + precondition: q5, + handler: i => i.replaceAll(), + kbOpts: { + weight: 105, + kbExpr: T.and(ke.focus, MZt), + primary: undefined, + mac: { + primary: 2051 + } + } +})); +Sn(new OA({ + id: Gh.SelectAllMatchesAction, + precondition: q5, + handler: i => i.selectAllMatches(), + kbOpts: { + weight: 105, + kbExpr: ke.focus, + primary: 515 + } +})); +nt(); +ri(); +Ut(); +Yc(); +q(); +$i(); +zt(); +en(); +Sr(); +Eo(); +Bd(); +pe(); +Gl(); +var gbr = class { + get regions() { + return this.c; + } + get textModel() { + return this.a; + } + get decorationProvider() { + return this.b; + } + constructor(i, e) { + this.e = new B(); + this.onDidChange = this.e.event; + this.a = i; + this.b = e; + this.c = new dP(new Uint32Array(0), new Uint32Array(0)); + this.d = []; + } + toggleCollapseState(i) { + if (!i.length) { + return; + } + i = i.sort((t, s) => t.regionIndex - s.regionIndex); + const e = {}; + this.b.changeDecorations(t => { + let s = 0; + let n = -1; + let r = -1; + const o = a => { + while (s < a) { + const l = this.c.getEndLineNumber(s); + const c = this.c.isCollapsed(s); + if (l <= n) { + const u = this.regions.getSource(s) !== 0; + t.changeDecorationOptions(this.d[s], this.b.getDecorationOption(c, l <= r, u)); + } + if (c && l > r) { + r = l; + } + s++; + } + }; + for (const a of i) { + const l = a.regionIndex; + const c = this.d[l]; + if (c && !e[c]) { + e[c] = true; + o(l); + const u = !this.c.isCollapsed(l); + this.c.setCollapsed(l, u); + n = Math.max(n, this.c.getEndLineNumber(l)); + } + } + o(this.c.length); + }); + this.e.fire({ + model: this, + collapseStateChanged: i + }); + } + removeManualRanges(i) { + const e = new Array(); + const t = s => { + for (const n of i) { + if (!(n.startLineNumber > s.endLineNumber) && !(s.startLineNumber > n.endLineNumber)) { + return true; + } + } + return false; + }; + for (let s = 0; s < this.c.length; s++) { + const n = this.c.toFoldRange(s); + if (n.source === 0 || !t(n)) { + e.push(n); + } + } + this.updatePost(dP.fromFoldRanges(e)); + } + update(i, e) { + const t = this.f(e); + const s = dP.sanitizeAndMerge(i, t, this.a.getLineCount(), e); + this.updatePost(dP.fromFoldRanges(s)); + } + updatePost(i) { + const e = []; + let t = -1; + for (let s = 0, n = i.length; s < n; s++) { + const r = i.getStartLineNumber(s); + const o = i.getEndLineNumber(s); + const a = i.isCollapsed(s); + const l = i.getSource(s) !== 0; + const c = { + startLineNumber: r, + startColumn: this.a.getLineMaxColumn(r), + endLineNumber: o, + endColumn: this.a.getLineMaxColumn(o) + 1 + }; + e.push({ + range: c, + options: this.b.getDecorationOption(a, o <= t, l) + }); + if (a && o > t) { + t = o; + } + } + this.b.changeDecorations(s => this.d = s.deltaDecorations(this.d, e)); + this.c = i; + this.e.fire({ + model: this + }); + } + f(i) { + const e = []; + for (let t = 0, s = this.c.length; t < s; t++) { + let n = this.regions.isCollapsed(t); + const r = this.regions.getSource(t); + if (n || r !== 0) { + const o = this.c.toFoldRange(t); + const a = this.a.getDecorationRange(this.d[t]); + if (a) { + if (n && i?.startsInside(a.startLineNumber + 1, a.endLineNumber)) { + n = false; + } + e.push({ + startLineNumber: a.startLineNumber, + endLineNumber: a.endLineNumber, + type: o.type, + isCollapsed: n, + source: r + }); + } + } + } + return e; + } + getMemento() { + const i = this.f(); + const e = []; + const t = this.a.getLineCount(); + for (let s = 0, n = i.length; s < n; s++) { + const r = i[s]; + if (r.startLineNumber >= r.endLineNumber || r.startLineNumber < 1 || r.endLineNumber > t) { + continue; + } + const o = this.g(r.startLineNumber + 1, r.endLineNumber); + e.push({ + startLineNumber: r.startLineNumber, + endLineNumber: r.endLineNumber, + isCollapsed: r.isCollapsed, + source: r.source, + checksum: o + }); + } + if (e.length > 0) { + return e; + } else { + return undefined; + } + } + applyMemento(i) { + if (!Array.isArray(i)) { + return; + } + const e = []; + const t = this.a.getLineCount(); + for (const n of i) { + if (n.startLineNumber >= n.endLineNumber || n.startLineNumber < 1 || n.endLineNumber > t) { + continue; + } + const r = this.g(n.startLineNumber + 1, n.endLineNumber); + if (!n.checksum || r === n.checksum) { + e.push({ + startLineNumber: n.startLineNumber, + endLineNumber: n.endLineNumber, + type: undefined, + isCollapsed: n.isCollapsed ?? true, + source: n.source ?? 0 + }); + } + } + const s = dP.sanitizeAndMerge(this.c, e, t); + this.updatePost(dP.fromFoldRanges(s)); + } + g(i, e) { + return Qc(this.a.getLineContent(i) + this.a.getLineContent(e)) % 1000000; + } + dispose() { + this.b.removeDecorations(this.d); + } + getAllRegionsAtLine(i, e) { + const t = []; + if (this.c) { + let s = this.c.findRange(i); + let n = 1; + while (s >= 0) { + const r = this.c.toRegion(s); + if (!e || e(r, n)) { + t.push(r); + } + n++; + s = r.parentIndex; + } + } + return t; + } + getRegionAtLine(i) { + if (this.c) { + const e = this.c.findRange(i); + if (e >= 0) { + return this.c.toRegion(e); + } + } + return null; + } + getRegionsInside(i, e) { + const t = []; + const s = i ? i.regionIndex + 1 : 0; + const n = i ? i.endLineNumber : Number.MAX_VALUE; + if (e && e.length === 2) { + const r = []; + for (let o = s, a = this.c.length; o < a; o++) { + const l = this.c.toRegion(o); + if (this.c.getStartLineNumber(o) < n) { + while (r.length > 0 && !l.containedBy(r[r.length - 1])) { + r.pop(); + } + r.push(l); + if (e(l, r.length)) { + t.push(l); + } + } else { + break; + } + } + } else { + for (let r = s, o = this.c.length; r < o; r++) { + const a = this.c.toRegion(r); + if (this.c.getStartLineNumber(r) < n) { + if (!e || e(a)) { + t.push(a); + } + } else { + break; + } + } + } + return t; + } +}; +function VZt(i, e, t) { + const s = []; + for (const n of t) { + const r = i.getRegionAtLine(n); + if (r) { + const o = !r.isCollapsed; + s.push(r); + if (e > 1) { + const a = i.getRegionsInside(r, (l, c) => l.isCollapsed !== o && c < e); + s.push(...a); + } + } + } + i.toggleCollapseState(s); +} +function sre(i, e, t = Number.MAX_VALUE, s) { + const n = []; + if (s && s.length > 0) { + for (const r of s) { + const o = i.getRegionAtLine(r); + if (o && (o.isCollapsed !== e && n.push(o), t > 1)) { + const a = i.getRegionsInside(o, (l, c) => l.isCollapsed !== e && c < t); + n.push(...a); + } + } + } else { + const r = i.getRegionsInside(null, (o, a) => o.isCollapsed !== e && a < t); + n.push(...r); + } + i.toggleCollapseState(n); +} +function k8s(i, e, t, s) { + const n = []; + for (const r of s) { + const o = i.getAllRegionsAtLine(r, (a, l) => a.isCollapsed !== e && l <= t); + n.push(...o); + } + i.toggleCollapseState(n); +} +function pbr(i, e, t) { + const s = []; + for (const n of t) { + const r = i.getAllRegionsAtLine(n, o => o.isCollapsed !== e); + if (r.length > 0) { + s.push(r[0]); + } + } + i.toggleCollapseState(s); +} +function mbr(i, e, t, s) { + const n = (o, a) => a === e && o.isCollapsed !== t && !s.some(l => o.containsLine(l)); + const r = i.getRegionsInside(null, n); + i.toggleCollapseState(r); +} +function E8s(i, e, t) { + const s = []; + for (const o of t) { + const a = i.getAllRegionsAtLine(o, undefined); + if (a.length > 0) { + s.push(a[0]); + } + } + const n = o => s.every(a => !a.containedBy(o) && !o.containedBy(a)) && o.isCollapsed !== e; + const r = i.getRegionsInside(null, n); + i.toggleCollapseState(r); +} +function HZt(i, e, t) { + const s = i.textModel; + const n = i.regions; + const r = []; + for (let o = n.length - 1; o >= 0; o--) { + if (t !== n.isCollapsed(o)) { + const a = n.getStartLineNumber(o); + if (e.test(s.getLineContent(a))) { + r.push(n.toRegion(o)); + } + } + } + i.toggleCollapseState(r); +} +function qZt(i, e, t) { + const s = i.regions; + const n = []; + for (let r = s.length - 1; r >= 0; r--) { + if (t !== s.isCollapsed(r) && e === s.getType(r)) { + n.push(s.toRegion(r)); + } + } + i.toggleCollapseState(n); +} +function bbr(i, e) { + let t = null; + const s = e.getRegionAtLine(i); + if (s !== null && (t = s.startLineNumber, i === t)) { + const n = s.parentIndex; + if (n !== -1) { + t = e.regions.getStartLineNumber(n); + } else { + t = null; + } + } + return t; +} +function vbr(i, e) { + let t = e.getRegionAtLine(i); + if (t !== null && t.startLineNumber === i) { + if (i !== t.startLineNumber) { + return t.startLineNumber; + } + { + const s = t.parentIndex; + let n = 0; + for (s !== -1 && (n = e.regions.getStartLineNumber(t.parentIndex)); t !== null;) { + if (t.regionIndex > 0) { + t = e.regions.toRegion(t.regionIndex - 1); + if (t.startLineNumber <= n) { + return null; + } + if (t.parentIndex === s) { + return t.startLineNumber; + } + } else { + return null; + } + } + } + } else if (e.regions.length > 0) { + for (t = e.regions.toRegion(e.regions.length - 1); t !== null;) { + if (t.startLineNumber < i) { + return t.startLineNumber; + } + if (t.regionIndex > 0) { + t = e.regions.toRegion(t.regionIndex - 1); + } else { + t = null; + } + } + } + return null; +} +function ybr(i, e) { + let t = e.getRegionAtLine(i); + if (t !== null && t.startLineNumber === i) { + const s = t.parentIndex; + let n = 0; + if (s !== -1) { + n = e.regions.getEndLineNumber(t.parentIndex); + } else { + if (e.regions.length === 0) { + return null; + } + n = e.regions.getEndLineNumber(e.regions.length - 1); + } + while (t !== null) { + if (t.regionIndex < e.regions.length) { + t = e.regions.toRegion(t.regionIndex + 1); + if (t.startLineNumber >= n) { + return null; + } + if (t.parentIndex === s) { + return t.startLineNumber; + } + } else { + return null; + } + } + } else if (e.regions.length > 0) { + for (t = e.regions.toRegion(0); t !== null;) { + if (t.startLineNumber > i) { + return t.startLineNumber; + } + if (t.regionIndex < e.regions.length) { + t = e.regions.toRegion(t.regionIndex + 1); + } else { + t = null; + } + } + } + return null; +} +qg(); +pe(); +yt(); +J9(); +var wbr = class { + get onDidChange() { + return this.d.event; + } + get hiddenRanges() { + return this.b; + } + constructor(i) { + this.d = new B(); + this.f = false; + this.a = i; + this.c = i.onDidChange(e => this.g()); + this.b = []; + if (i.regions.length) { + this.g(); + } + } + notifyChangeModelContent(i) { + if (this.b.length && !this.f) { + this.f = i.changes.some(e => e.range.endLineNumber !== e.range.startLineNumber || XL(e.text)[0] !== 0); + } + } + g() { + let i = false; + const e = []; + let t = 0; + let s = 0; + let n = Number.MAX_VALUE; + let r = -1; + const o = this.a.regions; + for (; t < o.length; t++) { + if (!o.isCollapsed(t)) { + continue; + } + const a = o.getStartLineNumber(t) + 1; + const l = o.getEndLineNumber(t); + if (!(n <= a) || !(l <= r)) { + if (!i && s < this.b.length && this.b[s].startLineNumber === a && this.b[s].endLineNumber === l) { + e.push(this.b[s]); + s++; + } else { + i = true; + e.push(new Z(a, 1, l, 1)); + } + n = a; + r = l; + } + } + if (this.f || i || s < this.b.length) { + this.h(e); + } + } + h(i) { + this.b = i; + this.f = false; + this.d.fire(i); + } + hasRanges() { + return this.b.length > 0; + } + isHidden(i) { + return I8s(this.b, i) !== null; + } + adjustSelections(i) { + let e = false; + const t = this.a.textModel; + let s = null; + const n = r => { + if (!s || !Cbr(r, s)) { + s = I8s(this.b, r); + } + if (s) { + return s.startLineNumber - 1; + } else { + return null; + } + }; + for (let r = 0, o = i.length; r < o; r++) { + let a = i[r]; + const l = n(a.startLineNumber); + if (l) { + a = a.setStartPosition(l, t.getLineMaxColumn(l)); + e = true; + } + const c = n(a.endLineNumber); + if (c) { + a = a.setEndPosition(c, t.getLineMaxColumn(c)); + e = true; + } + i[r] = a; + } + return e; + } + dispose() { + if (this.hiddenRanges.length > 0) { + this.b = []; + this.d.fire(this.b); + } + if (this.c) { + this.c.dispose(); + this.c = null; + } + } +}; +function Cbr(i, e) { + return i >= e.startLineNumber && i <= e.endLineNumber; +} +function I8s(i, e) { + const t = aM(i, s => e < s.startLineNumber) - 1; + if (t >= 0 && i[t].endLineNumber >= e) { + return i[t]; + } else { + return null; + } +} +h9t(); +var Sbr = 5000; +var xbr = "indent"; +var nre = class { + constructor(i, e, t) { + this.a = i; + this.b = e; + this.c = t; + this.id = xbr; + } + dispose() {} + compute(i) { + const e = this.b.getLanguageConfiguration(this.a.getLanguageId()).foldingRules; + const t = e && !!e.offSide; + const s = e && e.markers; + return Promise.resolve(Ibr(this.a, t, s, this.c)); + } +}; +var kbr = class { + constructor(i) { + this.a = []; + this.b = []; + this.c = []; + this.d = 0; + this.e = i; + } + insertFirst(i, e, t) { + if (i > MA || e > MA) { + return; + } + const s = this.d; + this.a[s] = i; + this.b[s] = e; + this.d++; + if (t < 1000) { + this.c[t] = (this.c[t] || 0) + 1; + } + } + toIndentRanges(i) { + const e = this.e.limit; + if (this.d <= e) { + this.e.update(this.d, false); + const t = new Uint32Array(this.d); + const s = new Uint32Array(this.d); + for (let n = this.d - 1, r = 0; n >= 0; n--, r++) { + t[r] = this.a[n]; + s[r] = this.b[n]; + } + return new dP(t, s); + } else { + this.e.update(this.d, e); + let t = 0; + let s = this.c.length; + for (let a = 0; a < this.c.length; a++) { + const l = this.c[a]; + if (l) { + if (l + t > e) { + s = a; + break; + } + t += l; + } + } + const n = i.getOptions().tabSize; + const r = new Uint32Array(e); + const o = new Uint32Array(e); + for (let a = this.d - 1, l = 0; a >= 0; a--) { + const c = this.a[a]; + const u = i.getLineContent(c); + const d = Lat(u, n); + if (d < s || d === s && t++ < e) { + r[l] = c; + o[l] = this.b[a]; + l++; + } + } + return new dP(r, o); + } + } +}; +var Ebr = { + limit: Sbr, + update: () => {} +}; +function Ibr(i, e, t, s = Ebr) { + const n = i.getOptions().tabSize; + const r = new kbr(s); + let o; + if (t) { + o = new RegExp(`(${t.start.source})|(?:${t.end.source})`); + } + const a = []; + const l = i.getLineCount() + 1; + a.push({ + indent: -1, + endAbove: l, + line: l + }); + for (let c = i.getLineCount(); c > 0; c--) { + const u = i.getLineContent(c); + const d = Lat(u, n); + let h = a[a.length - 1]; + if (d === -1) { + if (e) { + h.endAbove = c; + } + continue; + } + let g; + if (o && (g = u.match(o))) { + if (g[1]) { + let p = a.length - 1; + while (p > 0 && a[p].indent !== -2) { + p--; + } + if (p > 0) { + a.length = p + 1; + h = a[p]; + r.insertFirst(c, h.line, d); + h.line = c; + h.indent = d; + h.endAbove = c; + continue; + } + } else { + a.push({ + indent: -2, + endAbove: c, + line: c + }); + continue; + } + } + if (h.indent > d) { + do { + a.pop(); + h = a[a.length - 1]; + } while (h.indent > d); + const p = h.endAbove - 1; + if (p - c >= 1) { + r.insertFirst(c, p, d); + } + } + if (h.indent === d) { + h.endAbove = c; + } else { + a.push({ + indent: d, + endAbove: c, + line: c + }); + } + } + return r.toIndentRanges(i); +} +X(); +Ee(); +He(); +Ya(); +X(); +Qs(); +Br(); +gi(); +Rt(); +var Dbr = he("editor.foldBackground", { + light: Bs(FT, 0.3), + dark: Bs(FT, 0.3), + hcDark: null, + hcLight: null +}, f(1080, null), true); +he("editor.foldPlaceholderForeground", { + light: "#808080", + dark: "#808080", + hcDark: null, + hcLight: null +}, f(1081, null)); +he("editorGutter.foldingControlForeground", Kee, f(1082, null)); +var F0e = dt("folding-expanded", A.chevronDown, f(1083, null)); +var O0e = dt("folding-collapsed", A.chevronRight, f(1084, null)); +var D8s = dt("folding-manual-collapsed", O0e, f(1085, null)); +var T8s = dt("folding-manual-expanded", F0e, f(1086, null)); +var jZt = { + color: lu(Dbr), + position: 1 +}; +var rre = f(1087, null); +var $mt = f(1088, null); +var Tbr = class bL { + static { + this.a = Cr.register({ + description: "folding-collapsed-visual-decoration", + stickiness: 0, + afterContentClassName: "inline-folded", + isWholeLine: true, + linesDecorationsTooltip: rre, + firstLineDecorationClassName: le.asClassName(O0e) + }); + } + static { + this.b = Cr.register({ + description: "folding-collapsed-highlighted-visual-decoration", + stickiness: 0, + afterContentClassName: "inline-folded", + className: "folded-background", + minimap: jZt, + isWholeLine: true, + linesDecorationsTooltip: rre, + firstLineDecorationClassName: le.asClassName(O0e) + }); + } + static { + this.c = Cr.register({ + description: "folding-manually-collapsed-visual-decoration", + stickiness: 0, + afterContentClassName: "inline-folded", + isWholeLine: true, + linesDecorationsTooltip: rre, + firstLineDecorationClassName: le.asClassName(D8s) + }); + } + static { + this.d = Cr.register({ + description: "folding-manually-collapsed-highlighted-visual-decoration", + stickiness: 0, + afterContentClassName: "inline-folded", + className: "folded-background", + minimap: jZt, + isWholeLine: true, + linesDecorationsTooltip: rre, + firstLineDecorationClassName: le.asClassName(D8s) + }); + } + static { + this.e = Cr.register({ + description: "folding-no-controls-range-decoration", + stickiness: 0, + afterContentClassName: "inline-folded", + isWholeLine: true, + linesDecorationsTooltip: rre + }); + } + static { + this.f = Cr.register({ + description: "folding-no-controls-range-decoration", + stickiness: 0, + afterContentClassName: "inline-folded", + className: "folded-background", + minimap: jZt, + isWholeLine: true, + linesDecorationsTooltip: rre + }); + } + static { + this.g = Cr.register({ + description: "folding-expanded-visual-decoration", + stickiness: 1, + isWholeLine: true, + firstLineDecorationClassName: "alwaysShowFoldIcons " + le.asClassName(F0e), + linesDecorationsTooltip: $mt + }); + } + static { + this.h = Cr.register({ + description: "folding-expanded-auto-hide-visual-decoration", + stickiness: 1, + isWholeLine: true, + firstLineDecorationClassName: le.asClassName(F0e), + linesDecorationsTooltip: $mt + }); + } + static { + this.i = Cr.register({ + description: "folding-manually-expanded-visual-decoration", + stickiness: 0, + isWholeLine: true, + firstLineDecorationClassName: "alwaysShowFoldIcons " + le.asClassName(T8s), + linesDecorationsTooltip: $mt + }); + } + static { + this.j = Cr.register({ + description: "folding-manually-expanded-auto-hide-visual-decoration", + stickiness: 0, + isWholeLine: true, + firstLineDecorationClassName: le.asClassName(T8s), + linesDecorationsTooltip: $mt + }); + } + static { + this.k = Cr.register({ + description: "folding-no-controls-range-decoration", + stickiness: 0, + isWholeLine: true + }); + } + static { + this.l = Cr.register({ + description: "folding-hidden-range-decoration", + stickiness: 1 + }); + } + constructor(e, t) { + this.m = e; + this.n = t; + this.showFoldingControls = "mouseover"; + this.showFoldingHighlights = true; + } + getDecorationOption(e, t, s) { + if (t) { + return bL.l; + } else if (this.showFoldingControls === "never") { + if (e) { + if (this.showFoldingHighlights) { + return bL.f; + } else { + return bL.e; + } + } else { + return bL.k; + } + } else if (e) { + if (s) { + if (this.showFoldingHighlights) { + return bL.d; + } else { + return bL.c; + } + } else if (this.showFoldingHighlights) { + return bL.b; + } else { + return bL.a; + } + } else if (this.showFoldingControls === "mouseover") { + if (s) { + return bL.j; + } else { + return bL.h; + } + } else if (s) { + return bL.i; + } else { + return bL.g; + } + } + changeDecorations(e) { + return this.m.changeDecorations(e); + } + removeDecorations(e) { + this.m.removeDecorations(e); + } +}; +Wi(); +mR(); +fd(); +Tr(); +pe(); +Wt(); +Le(); +Rn(); +Me(); +Cs(); +var MG; +var sw = new fe("foldingEnabled", false); +var o0 = class extends H { + static { + MG = this; + } + static { + this.ID = "editor.contrib.folding"; + } + static get(e) { + return e.getContribution(MG.ID); + } + static getFoldingRangeProviders(e, t) { + const s = e.foldingRangeProvider.ordered(t); + return MG.c?.(s, t) ?? s; + } + static setFoldingRangeProviderSelector(e) { + MG.c = e; + return { + dispose: () => { + MG.c = undefined; + } + }; + } + constructor(e, t, s, n, r, o, a) { + super(); + this.M = t; + this.N = s; + this.O = o; + this.P = a; + this.J = this.D(new Q()); + this.f = e; + this._foldingLimitReporter = new P8s(e); + const l = this.f.getOptions(); + this.g = l.get(45); + this.h = l.get(46) !== "indentation"; + this.j = l.get(50); + this.m = false; + this.q = false; + this.n = l.get(48); + this.G = r.for(a.foldingRangeProvider, "Folding", { + min: 200 + }); + this.u = null; + this.w = null; + this.y = null; + this.z = null; + this.C = null; + this.F = null; + this.I = null; + this.L = null; + this.t = new Tbr(e, o); + this.t.showFoldingControls = l.get(115); + this.t.showFoldingHighlights = l.get(47); + this.H = sw.bindTo(this.M); + this.H.set(this.g); + this.D(this.f.onDidChangeModel(() => this.Q())); + this.D(this.f.onDidChangeConfiguration(c => { + if (c.hasChanged(45)) { + this.g = this.f.getOptions().get(45); + this.H.set(this.g); + this.Q(); + } + if (c.hasChanged(49)) { + this.Q(); + } + if (c.hasChanged(115) || c.hasChanged(47)) { + const u = this.f.getOptions(); + this.t.showFoldingControls = u.get(115); + this.t.showFoldingHighlights = u.get(47); + this.triggerFoldingModelChanged(); + } + if (c.hasChanged(46)) { + this.h = this.f.getOptions().get(46) !== "indentation"; + this.R(); + } + if (c.hasChanged(50)) { + this.j = this.f.getOptions().get(50); + } + if (c.hasChanged(48)) { + this.n = this.f.getOptions().get(48); + } + })); + this.Q(); + } + get limitReporter() { + return this._foldingLimitReporter; + } + saveViewState() { + const e = this.f.getModel(); + if (!e || !this.g || e.isTooLargeForTokenization()) { + return {}; + } + if (this.u) { + const t = this.u.getMemento(); + const s = this.y ? this.y.id : undefined; + return { + collapsedRegions: t, + lineCount: e.getLineCount(), + provider: s, + foldedImports: this.q + }; + } + } + restoreViewState(e) { + const t = this.f.getModel(); + if (!!t && !!this.g && !t.isTooLargeForTokenization() && !!this.w && e && (this.q = !!e.foldedImports, e.collapsedRegions && e.collapsedRegions.length > 0 && this.u)) { + this.m = true; + try { + this.u.applyMemento(e.collapsedRegions); + } finally { + this.m = false; + } + } + } + Q() { + this.J.clear(); + const e = this.f.getModel(); + if (!!this.g && !!e && !e.isTooLargeForTokenization()) { + this.q = false; + this.u = new gbr(e, this.t); + this.J.add(this.u); + this.w = new wbr(this.u); + this.J.add(this.w); + this.J.add(this.w.onDidChange(t => this.W(t))); + this.F = new gl(this.G.get(e)); + this.I = new Vn(() => this.Y(), 200); + this.J.add(this.I); + this.J.add(this.P.foldingRangeProvider.onDidChange(() => this.R())); + this.J.add(this.f.onDidChangeModelLanguageConfiguration(() => this.R())); + this.J.add(this.f.onDidChangeModelContent(t => this.U(t))); + this.J.add(this.f.onDidChangeCursorPosition(() => this.X())); + this.J.add(this.f.onMouseDown(t => this.Z(t))); + this.J.add(this.f.onMouseUp(t => this.$(t))); + this.J.add({ + dispose: () => { + if (this.z) { + this.z.cancel(); + this.z = null; + } + this.F?.cancel(); + this.F = null; + this.u = null; + this.C = null; + this.w = null; + this.I = null; + this.y?.dispose(); + this.y = null; + } + }); + this.triggerFoldingModelChanged(); + } + } + R() { + this.y?.dispose(); + this.y = null; + this.triggerFoldingModelChanged(); + } + S(e) { + if (this.y) { + return this.y; + } + const t = new nre(e, this.N, this._foldingLimitReporter); + this.y = t; + if (this.h && this.u) { + const s = MG.getFoldingRangeProviders(this.P, e); + if (s.length > 0) { + this.y = new zne(e, s, () => this.triggerFoldingModelChanged(), this._foldingLimitReporter, t); + } + } + return this.y; + } + getFoldingModel() { + return this.C; + } + U(e) { + this.w?.notifyChangeModelContent(e); + this.triggerFoldingModelChanged(); + } + triggerFoldingModelChanged() { + if (this.F) { + if (this.z) { + this.z.cancel(); + this.z = null; + } + this.C = this.F.trigger(() => { + const e = this.u; + if (!e) { + return null; + } + const t = new ic(); + const s = this.S(e.textModel); + const n = this.z = ql(r => s.compute(r)); + return n.then(r => { + if (r && n === this.z) { + let o; + if (this.n && !this.q) { + const c = r.setCollapsedAllOfType(NI.Imports.value, true); + if (c) { + o = fO.capture(this.f); + this.q = c; + } + } + const a = this.f.getSelections(); + e.update(r, Pbr(a)); + o?.restore(this.f); + const l = this.G.update(e.textModel, t.elapsed()); + if (this.F) { + this.F.defaultDelay = l; + } + } + return e; + }); + }).then(undefined, e => { + xs(e); + return null; + }); + } + } + W(e) { + if (this.w && e.length && !this.m) { + const t = this.f.getSelections(); + if (t && this.w.adjustSelections(t)) { + this.f.setSelections(t); + } + } + this.f.setHiddenAreas(e, this); + } + X() { + if (this.w && this.w.hasRanges()) { + this.I.schedule(); + } + } + Y() { + const e = this.getFoldingModel(); + if (e) { + e.then(t => { + if (t) { + const s = this.f.getSelections(); + if (s && s.length > 0) { + const n = []; + for (const r of s) { + const o = r.selectionStartLineNumber; + if (this.w && this.w.isHidden(o)) { + n.push(...t.getAllRegionsAtLine(o, a => a.isCollapsed && o > a.startLineNumber)); + } + } + if (n.length) { + t.toggleCollapseState(n); + this.reveal(s[0].getPosition()); + } + } + } + }).then(undefined, xs); + } + } + Z(e) { + this.L = null; + if (!this.w || !e.target || !e.target.range || !e.event.leftButton && !e.event.middleButton) { + return; + } + const t = e.target.range; + let s = false; + switch (e.target.type) { + case 4: + { + const n = e.target.detail; + const r = e.target.element.offsetLeft; + if (n.offsetX - r < 4) { + return; + } + s = true; + break; + } + case 7: + { + if (this.j && this.w.hasRanges() && !e.target.detail.isAfterLines) { + break; + } + return; + } + case 6: + { + if (this.w.hasRanges()) { + const n = this.f.getModel(); + if (n && t.startColumn === n.getLineMaxColumn(t.startLineNumber)) { + break; + } + } + return; + } + default: + return; + } + this.L = { + lineNumber: t.startLineNumber, + iconClicked: s + }; + } + $(e) { + const t = this.u; + if (!t || !this.L || !e.target) { + return; + } + const s = this.L.lineNumber; + const n = this.L.iconClicked; + const r = e.target.range; + if (!r || r.startLineNumber !== s) { + return; + } + if (n) { + if (e.target.type !== 4) { + return; + } + } else { + const a = this.f.getModel(); + if (!a || r.startColumn !== a.getLineMaxColumn(s)) { + return; + } + } + const o = t.getRegionAtLine(s); + if (o && o.startLineNumber === s) { + const a = o.isCollapsed; + if (n || a) { + const l = e.event.altKey; + let c = []; + if (l) { + const u = h => !h.containedBy(o) && !o.containedBy(h); + const d = t.getRegionsInside(null, u); + for (const h of d) { + if (h.isCollapsed) { + c.push(h); + } + } + if (c.length === 0) { + c = d; + } + } else { + const u = e.event.middleButton || e.event.shiftKey; + if (u) { + for (const d of t.getRegionsInside(o)) { + if (d.isCollapsed === a) { + c.push(d); + } + } + } + if (a || !u || c.length === 0) { + c.push(o); + } + } + t.toggleCollapseState(c); + this.reveal({ + lineNumber: s, + column: 1 + }); + } + } + } + reveal(e) { + this.f.revealPositionInCenterIfOutsideViewport(e, 0); + } +}; +o0 = MG = __decorate([__param(1, Ne), __param(2, Lu), __param(3, ni), __param(4, gE), __param(5, _i), __param(6, nn)], o0); +var P8s = class { + constructor(i) { + this.c = i; + this.d = new B(); + this.onDidChange = this.d.event; + this.f = 0; + this.g = false; + } + get limit() { + return this.c.getOptions().get(49); + } + get computed() { + return this.f; + } + get limited() { + return this.g; + } + update(i, e) { + if (i !== this.f || e !== this.g) { + this.f = i; + this.g = e; + this.d.fire(); + } + } +}; +var a0 = class extends Es { + runEditorCommand(i, e, t) { + const s = i.get(Lu); + const n = o0.get(e); + if (!n) { + return; + } + const r = n.getFoldingModel(); + if (r) { + this.A(i, e); + return r.then(o => { + if (o) { + this.invoke(n, o, e, t, s); + const a = e.getSelection(); + if (a) { + n.reveal(a.getStartPosition()); + } + } + }); + } + } + d(i) { + const e = i.getSelections(); + if (e) { + return e.map(t => t.startLineNumber); + } else { + return []; + } + } + f(i, e) { + if (i && i.selectionLines) { + return i.selectionLines.map(t => t + 1); + } else { + return this.d(e); + } + } + run(i, e) {} +}; +function Pbr(i) { + if (!i || i.length === 0) { + return { + startsInside: () => false + }; + } else { + return { + startsInside(e, t) { + for (const s of i) { + const n = s.startLineNumber; + if (n >= e && n <= t) { + return true; + } + } + return false; + } + }; + } +} +function L8s(i) { + if (!qo(i)) { + if (!xo(i)) { + return false; + } + const e = i; + if (!qo(e.levels) && !Od(e.levels) || !qo(e.direction) && !yi(e.direction) || !qo(e.selectionLines) && (!Array.isArray(e.selectionLines) || !e.selectionLines.every(Od))) { + return false; + } + } + return true; +} +var Lbr = class extends a0 { + constructor() { + super({ + id: "editor.unfold", + label: W(1060, "Unfold"), + precondition: sw, + kbOpts: { + kbExpr: ke.editorTextFocus, + primary: 3166, + mac: { + primary: 2654 + }, + weight: 100 + }, + metadata: { + description: "Unfold the content in the editor", + args: [{ + name: "Unfold editor argument", + description: `Property-value pairs that can be passed through this argument: + * 'levels': Number of levels to unfold. If not set, defaults to 1. + * 'direction': If 'up', unfold given number of levels up otherwise unfolds down. + * 'selectionLines': Array of the start lines (0-based) of the editor selections to apply the unfold action to. If not set, the active selection(s) will be used. + `, + constraint: L8s, + schema: { + type: "object", + properties: { + levels: { + type: "number", + default: 1 + }, + direction: { + type: "string", + enum: ["up", "down"], + default: "down" + }, + selectionLines: { + type: "array", + items: { + type: "number" + } + } + } + } + }] + } + }); + } + invoke(i, e, t, s) { + const n = s && s.levels || 1; + const r = this.f(s, t); + if (s && s.direction === "up") { + k8s(e, false, n, r); + } else { + sre(e, false, n, r); + } + } +}; +var Rbr = class extends a0 { + constructor() { + super({ + id: "editor.unfoldRecursively", + label: W(1061, "Unfold Recursively"), + precondition: sw, + kbOpts: { + kbExpr: ke.editorTextFocus, + primary: Ai(_r, 2142), + mac: { + primary: Ai(Xr, 2142) + }, + weight: 100 + } + }); + } + invoke(i, e, t, s) { + sre(e, false, Number.MAX_VALUE, this.d(t)); + } +}; +var Nbr = class extends a0 { + constructor() { + super({ + id: "editor.fold", + label: W(1062, "Fold"), + precondition: sw, + kbOpts: { + kbExpr: ke.editorTextFocus, + primary: 3164, + mac: { + primary: 2652 + }, + weight: 100 + }, + metadata: { + description: "Fold the content in the editor", + args: [{ + name: "Fold editor argument", + description: `Property-value pairs that can be passed through this argument: + * 'levels': Number of levels to fold. + * 'direction': If 'up', folds given number of levels up otherwise folds down. + * 'selectionLines': Array of the start lines (0-based) of the editor selections to apply the fold action to. If not set, the active selection(s) will be used. + If no levels or direction is set, folds the region at the locations or if already collapsed, the first uncollapsed parent instead. + `, + constraint: L8s, + schema: { + type: "object", + properties: { + levels: { + type: "number" + }, + direction: { + type: "string", + enum: ["up", "down"] + }, + selectionLines: { + type: "array", + items: { + type: "number" + } + } + } + } + }] + } + }); + } + invoke(i, e, t, s) { + const n = this.f(s, t); + const r = s && s.levels; + const o = s && s.direction; + if (typeof r != "number" && typeof o != "string") { + pbr(e, true, n); + } else if (o === "up") { + k8s(e, true, r || 1, n); + } else { + sre(e, true, r || 1, n); + } + } +}; +var Mbr = class extends a0 { + constructor() { + super({ + id: "editor.toggleFold", + label: W(1063, "Toggle Fold"), + precondition: sw, + kbOpts: { + kbExpr: ke.editorTextFocus, + primary: Ai(_r, 2090), + mac: { + primary: Ai(Xr, 2090) + }, + weight: 100 + } + }); + } + invoke(i, e, t) { + const s = this.d(t); + VZt(e, 1, s); + } +}; +var Abr = class extends a0 { + constructor() { + super({ + id: "editor.foldRecursively", + label: W(1064, "Fold Recursively"), + precondition: sw, + kbOpts: { + kbExpr: ke.editorTextFocus, + primary: Ai(_r, 2140), + mac: { + primary: Ai(Xr, 2140) + }, + weight: 100 + } + }); + } + invoke(i, e, t) { + const s = this.d(t); + sre(e, true, Number.MAX_VALUE, s); + } +}; +var $br = class extends a0 { + constructor() { + super({ + id: "editor.toggleFoldRecursively", + label: W(1065, "Toggle Fold Recursively"), + precondition: sw, + kbOpts: { + kbExpr: ke.editorTextFocus, + primary: Ai(_r, 3114), + mac: { + primary: Ai(Xr, 3114) + }, + weight: 100 + } + }); + } + invoke(i, e, t) { + const s = this.d(t); + VZt(e, Number.MAX_VALUE, s); + } +}; +var Fbr = class extends a0 { + constructor() { + super({ + id: "editor.foldAllBlockComments", + label: W(1066, "Fold All Block Comments"), + precondition: sw, + kbOpts: { + kbExpr: ke.editorTextFocus, + primary: Ai(_r, 2138), + mac: { + primary: Ai(Xr, 2138) + }, + weight: 100 + } + }); + } + invoke(i, e, t, s, n) { + if (e.regions.hasTypes()) { + qZt(e, NI.Comment.value, true); + } else { + const r = t.getModel(); + if (!r) { + return; + } + const o = n.getLanguageConfiguration(r.getLanguageId()).comments; + if (o && o.blockCommentStartToken) { + const a = new RegExp("^\\s*" + zg(o.blockCommentStartToken)); + HZt(e, a, true); + } + } + } +}; +var Obr = class extends a0 { + constructor() { + super({ + id: "editor.foldAllMarkerRegions", + label: W(1067, "Fold All Regions"), + precondition: sw, + kbOpts: { + kbExpr: ke.editorTextFocus, + primary: Ai(_r, 2077), + mac: { + primary: Ai(Xr, 2077) + }, + weight: 100 + } + }); + } + invoke(i, e, t, s, n) { + if (e.regions.hasTypes()) { + qZt(e, NI.Region.value, true); + } else { + const r = t.getModel(); + if (!r) { + return; + } + const o = n.getLanguageConfiguration(r.getLanguageId()).foldingRules; + if (o && o.markers && o.markers.start) { + const a = new RegExp(o.markers.start); + HZt(e, a, true); + } + } + } +}; +var _br = class extends a0 { + constructor() { + super({ + id: "editor.unfoldAllMarkerRegions", + label: W(1068, "Unfold All Regions"), + precondition: sw, + kbOpts: { + kbExpr: ke.editorTextFocus, + primary: Ai(_r, 2078), + mac: { + primary: Ai(Xr, 2078) + }, + weight: 100 + } + }); + } + invoke(i, e, t, s, n) { + if (e.regions.hasTypes()) { + qZt(e, NI.Region.value, false); + } else { + const r = t.getModel(); + if (!r) { + return; + } + const o = n.getLanguageConfiguration(r.getLanguageId()).foldingRules; + if (o && o.markers && o.markers.start) { + const a = new RegExp(o.markers.start); + HZt(e, a, false); + } + } + } +}; +var Bbr = class extends a0 { + constructor() { + super({ + id: "editor.foldAllExcept", + label: W(1069, "Fold All Except Selected"), + precondition: sw, + kbOpts: { + kbExpr: ke.editorTextFocus, + primary: Ai(_r, 2136), + mac: { + primary: Ai(Xr, 2136) + }, + weight: 100 + } + }); + } + invoke(i, e, t) { + const s = this.d(t); + E8s(e, true, s); + } +}; +var Ubr = class extends a0 { + constructor() { + super({ + id: "editor.unfoldAllExcept", + label: W(1070, "Unfold All Except Selected"), + precondition: sw, + kbOpts: { + kbExpr: ke.editorTextFocus, + primary: Ai(_r, 2134), + mac: { + primary: Ai(Xr, 2134) + }, + weight: 100 + } + }); + } + invoke(i, e, t) { + const s = this.d(t); + E8s(e, false, s); + } +}; +var Wbr = class extends a0 { + constructor() { + super({ + id: "editor.foldAll", + label: W(1071, "Fold All"), + precondition: sw, + kbOpts: { + kbExpr: ke.editorTextFocus, + primary: Ai(_r, 2069), + mac: { + primary: Ai(Xr, 2069) + }, + weight: 100 + } + }); + } + invoke(i, e, t) { + sre(e, true); + } +}; +var Vbr = class extends a0 { + constructor() { + super({ + id: "editor.unfoldAll", + label: W(1072, "Unfold All"), + precondition: sw, + kbOpts: { + kbExpr: ke.editorTextFocus, + primary: Ai(_r, 2088), + mac: { + primary: Ai(Xr, 2088) + }, + weight: 100 + } + }); + } + invoke(i, e, t) { + sre(e, false); + } +}; +var R8s = class v9i extends a0 { + static { + this.h = "editor.foldLevel"; + } + static { + this.ID = e => v9i.h + e; + } + j() { + return parseInt(this.id.substr(v9i.h.length)); + } + invoke(e, t, s) { + mbr(t, this.j(), true, this.d(s)); + } +}; +var Hbr = class extends a0 { + constructor() { + super({ + id: "editor.gotoParentFold", + label: W(1073, "Go to Parent Fold"), + precondition: sw, + kbOpts: { + kbExpr: ke.editorTextFocus, + weight: 100 + } + }); + } + invoke(i, e, t) { + const s = this.d(t); + if (s.length > 0) { + const n = bbr(s[0], e); + if (n !== null) { + t.setSelection({ + startLineNumber: n, + startColumn: 1, + endLineNumber: n, + endColumn: 1 + }); + } + } + } +}; +var qbr = class extends a0 { + constructor() { + super({ + id: "editor.gotoPreviousFold", + label: W(1074, "Go to Previous Folding Range"), + precondition: sw, + kbOpts: { + kbExpr: ke.editorTextFocus, + weight: 100 + } + }); + } + invoke(i, e, t) { + const s = this.d(t); + if (s.length > 0) { + const n = vbr(s[0], e); + if (n !== null) { + t.setSelection({ + startLineNumber: n, + startColumn: 1, + endLineNumber: n, + endColumn: 1 + }); + } + } + } +}; +var jbr = class extends a0 { + constructor() { + super({ + id: "editor.gotoNextFold", + label: W(1075, "Go to Next Folding Range"), + precondition: sw, + kbOpts: { + kbExpr: ke.editorTextFocus, + weight: 100 + } + }); + } + invoke(i, e, t) { + const s = this.d(t); + if (s.length > 0) { + const n = ybr(s[0], e); + if (n !== null) { + t.setSelection({ + startLineNumber: n, + startColumn: 1, + endLineNumber: n, + endColumn: 1 + }); + } + } + } +}; +var zbr = class extends a0 { + constructor() { + super({ + id: "editor.createFoldingRangeFromSelection", + label: W(1076, "Create Folding Range from Selection"), + precondition: sw, + kbOpts: { + kbExpr: ke.editorTextFocus, + primary: Ai(_r, 2135), + mac: { + primary: Ai(Xr, 2135) + }, + weight: 100 + } + }); + } + invoke(i, e, t) { + const s = []; + const n = t.getSelections(); + if (n) { + for (const r of n) { + let o = r.endLineNumber; + if (r.endColumn === 1) { + --o; + } + if (o > r.startLineNumber) { + s.push({ + startLineNumber: r.startLineNumber, + endLineNumber: o, + type: undefined, + isCollapsed: true, + source: 1 + }); + t.setSelection({ + startLineNumber: r.startLineNumber, + startColumn: 1, + endLineNumber: r.startLineNumber, + endColumn: 1 + }); + } + } + if (s.length > 0) { + s.sort((o, a) => o.startLineNumber - a.startLineNumber); + const r = dP.sanitizeAndMerge(e.regions, s, t.getModel()?.getLineCount()); + e.updatePost(dP.fromFoldRanges(r)); + } + } + } +}; +var Jbr = class extends a0 { + constructor() { + super({ + id: "editor.removeManualFoldingRanges", + label: W(1077, "Remove Manual Folding Ranges"), + precondition: sw, + kbOpts: { + kbExpr: ke.editorTextFocus, + primary: Ai(_r, 2137), + mac: { + primary: Ai(Xr, 2137) + }, + weight: 100 + } + }); + } + invoke(i, e, t) { + const s = t.getSelections(); + if (s) { + const n = []; + for (const r of s) { + const { + startLineNumber: o, + endLineNumber: a + } = r; + n.push(a >= o ? { + startLineNumber: o, + endLineNumber: a + } : { + endLineNumber: a, + startLineNumber: o + }); + } + e.removeManualRanges(n); + i.triggerFoldingModelChanged(); + } + } +}; +var Gbr = class extends a0 { + constructor() { + super({ + id: "editor.toggleImportFold", + label: W(1078, "Toggle Import Fold"), + alias: "Toggle Import Fold", + precondition: sw, + kbOpts: { + kbExpr: ke.editorTextFocus, + weight: 100 + } + }); + } + async invoke(i, e) { + const t = []; + const s = e.regions; + for (let n = s.length - 1; n >= 0; n--) { + if (s.getType(n) === NI.Imports.value) { + t.push(s.toRegion(n)); + } + } + e.toggleCollapseState(t); + i.triggerFoldingModelChanged(); + } +}; +bo(o0.ID, o0, 0); +Oi(Lbr); +Oi(Rbr); +Oi(Nbr); +Oi(Abr); +Oi($br); +Oi(Wbr); +Oi(Vbr); +Oi(Fbr); +Oi(Obr); +Oi(_br); +Oi(Bbr); +Oi(Ubr); +Oi(Mbr); +Oi(Hbr); +Oi(qbr); +Oi(jbr); +Oi(zbr); +Oi(Jbr); +Oi(Gbr); +for (let i = 1; i <= 7; i++) { + Aqn(new R8s({ + id: R8s.ID(i), + label: W(1079, "Fold Level {0}", i), + precondition: sw, + kbOpts: { + kbExpr: ke.editorTextFocus, + primary: Ai(_r, 21 + i | 2048), + mac: { + primary: Ai(Xr, 21 + i | 2048) + }, + weight: 100 + } + })); +} +ei.registerCommand("_executeFoldingRangeProvider", async function (i, ...e) { + const [t] = e; + if (!(t instanceof V)) { + throw Hl(); + } + const s = i.get(nn); + const n = i.get($s).getModel(t); + if (!n) { + throw Hl(); + } + const r = i.get(ve); + if (!r.getValue("editor.folding", { + resource: t + })) { + return []; + } + const o = i.get(Lu); + const a = r.getValue("editor.foldingStrategy", { + resource: t + }); + const l = { + get limit() { + return r.getValue("editor.foldingMaximumRegions", { + resource: t + }); + }, + update: (g, p) => {} + }; + const c = new nre(n, o, l); + let u = c; + if (a !== "indentation") { + const g = o0.getFoldingRangeProviders(s, n); + if (g.length) { + u = new zne(n, g, () => {}, l, c); + } + } + const d = await u.compute(mt.None); + const h = []; + try { + if (d) { + for (let g = 0; g < d.length; g++) { + const p = d.getType(g); + h.push({ + start: d.getStartLineNumber(g), + end: d.getEndLineNumber(g), + kind: p ? NI.fromValue(p) : undefined + }); + } + } + return h; + } finally { + u.dispose(); + } +}); +en(); +Vot(); +X(); +var Kbr = class extends Es { + constructor() { + super({ + id: "editor.action.fontZoomIn", + label: W(1089, "Increase Editor Font Size"), + precondition: undefined + }); + } + run(i, e) { + AT.setZoomLevel(AT.getZoomLevel() + 1); + } +}; +var Ybr = class extends Es { + constructor() { + super({ + id: "editor.action.fontZoomOut", + label: W(1090, "Decrease Editor Font Size"), + precondition: undefined + }); + } + run(i, e) { + AT.setZoomLevel(AT.getZoomLevel() - 1); + } +}; +var Xbr = class extends Es { + constructor() { + super({ + id: "editor.action.fontZoomReset", + label: W(1091, "Reset Editor Font Size"), + precondition: undefined + }); + } + run(i, e) { + AT.setZoomLevel(0); + } +}; +Oi(Kbr); +Oi(Ybr); +Oi(Xbr); +Jt(); +ri(); +Ut(); +Yc(); +q(); +en(); +Xn(); +Ree(); +yt(); +Sr(); +Tr(); +Jt(); +ri(); +Ut(); +sa(); +Av(); +zt(); +Le(); +GM(); +wa(); +Rs(); +yt(); +ua(); +Ms(); +ef(); +yt(); +var zZt = class y9i { + static a(e, t) { + let s; + const n = []; + for (const r of t) { + if (typeof r.eol == "number") { + s = r.eol; + } + if (r.range && typeof r.text == "string") { + n.push(r); + } + } + if (typeof s == "number" && e.hasModel()) { + e.getModel().pushEOL(s); + } + return n; + } + static b(e, t) { + if (!e.hasModel()) { + return false; + } + const s = e.getModel(); + const n = s.validateRange(t.range); + return s.getFullModelRange().equalsRange(n); + } + static execute(e, t, s) { + if (s) { + e.pushUndoStop(); + } + const n = fO.capture(e); + const r = y9i.a(e, t); + if (r.length === 1 && y9i.b(e, r[0])) { + e.executeEdits("formatEditsCommand", r.map(o => Ua.replace(Z.lift(o.range), o.text))); + } else { + e.executeEdits("formatEditsCommand", r.map(o => Ua.replaceMove(Z.lift(o.range), o.text))); + } + if (s) { + e.pushUndoStop(); + } + n.restoreRelativeVerticalPositionOfCursor(e); + } +}; +Wt(); +Sl(); +te(); +Tr(); +Zt(); +function _0e(i, e, t) { + const s = []; + const n = new xR(); + const r = i.ordered(t); + for (const a of r) { + s.push(a); + if (a.extensionId) { + n.add(a.extensionId); + } + } + const o = e.ordered(t); + for (const a of o) { + if (a.extensionId) { + if (n.has(a.extensionId)) { + continue; + } + n.add(a.extensionId); + } + s.push({ + displayName: a.displayName, + extensionId: a.extensionId, + provideDocumentFormattingEdits(l, c, u) { + return a.provideDocumentRangeFormattingEdits(l, l.getFullModelRange(), c, u); + } + }); + } + return s; +} +var N8s; +(function (i) { + i[i.File = 1] = "File"; + i[i.Selection = 2] = "Selection"; +})(N8s ||= {}); +var M8s; +(function (i) { + i[i.Explicit = 1] = "Explicit"; + i[i.Silent = 2] = "Silent"; +})(M8s ||= {}); +var Fmt = class w9i { + static { + this.c = new hp(); + } + static setFormatterSelector(e) { + return { + dispose: w9i.c.unshift(e) + }; + } + static async select(e, t, s, n) { + if (e.length === 0) { + return; + } + const r = Ws.first(w9i.c); + if (r) { + return await r(e, t, s, n); + } + } +}; +async function Omt(i, e, t, s, n, r, o) { + const a = i.get(re); + const { + documentRangeFormattingEditProvider: l + } = i.get(nn); + const c = no(e) ? e.getModel() : e; + const u = l.ordered(c); + const d = await Fmt.select(u, c, s, 2); + if (d) { + n.report(d); + await a.invokeFunction(A8s, d, e, t, r, o); + } +} +async function A8s(i, e, t, s, n, r) { + const o = i.get(Fu); + const a = i.get(Bt); + const l = i.get(Pd); + let c; + let u; + if (no(t)) { + c = t.getModel(); + u = new J4(t, 5, undefined, n); + } else { + c = t; + u = new Vme(t, n); + } + const d = []; + let h = 0; + for (const y of VC(s).sort(Z.compareRangesUsingStarts)) { + if (h > 0 && Z.areIntersectingOrTouching(d[h - 1], y)) { + d[h - 1] = Z.fromPositions(d[h - 1].getStartPosition(), y.getEndPosition()); + } else { + h = d.push(y); + } + } + const g = async y => { + a.trace("[format][provideDocumentRangeFormattingEdits] (request)", e.extensionId?.value, y); + const w = (await e.provideDocumentRangeFormattingEdits(c, y, c.getFormattingOptions(), u.token)) || []; + a.trace("[format][provideDocumentRangeFormattingEdits] (response)", e.extensionId?.value, w); + return w; + }; + const p = (y, w) => { + if (!y.length || !w.length) { + return false; + } + const C = y.reduce((S, x) => Z.plusRange(S, x.range), y[0].range); + if (!w.some(S => Z.intersectRanges(C, S.range))) { + return false; + } + for (const S of y) { + for (const x of w) { + if (Z.intersectRanges(S.range, x.range)) { + return true; + } + } + } + return false; + }; + const b = []; + const v = []; + try { + if (typeof e.provideDocumentRangesFormattingEdits == "function") { + a.trace("[format][provideDocumentRangeFormattingEdits] (request)", e.extensionId?.value, d); + const y = (await e.provideDocumentRangesFormattingEdits(c, d, c.getFormattingOptions(), u.token)) || []; + a.trace("[format][provideDocumentRangeFormattingEdits] (response)", e.extensionId?.value, y); + v.push(y); + } else { + for (const y of d) { + if (u.token.isCancellationRequested) { + return true; + } + v.push(await g(y)); + } + for (let y = 0; y < d.length; ++y) { + for (let w = y + 1; w < d.length; ++w) { + if (u.token.isCancellationRequested) { + return true; + } + if (p(v[y], v[w])) { + const C = Z.plusRange(d[y], d[w]); + const S = await g(C); + d.splice(w, 1); + d.splice(y, 1); + d.push(C); + v.splice(w, 1); + v.splice(y, 1); + v.push(S); + y = 0; + w = 0; + } + } + } + } + for (const y of v) { + if (u.token.isCancellationRequested) { + return true; + } + const w = await o.computeMoreMinimalEdits(c.uri, y); + if (w) { + b.push(...w); + } + } + } finally { + u.dispose(); + } + if (b.length === 0) { + return false; + } + if (no(t)) { + zZt.execute(t, b, true); + t.revealPositionInCenterIfOutsideViewport(t.getPosition(), 1); + } else { + const [{ + range: y + }] = b; + const w = new Vs(y.startLineNumber, y.startColumn, y.endLineNumber, y.endColumn); + c.pushEditOperations([w], b.map(C => ({ + text: C.text, + range: Z.lift(C.range), + forceMoveMarkers: true + })), C => { + for (const { + range: S + } of C) { + if (Z.areIntersectingOrTouching(S, w)) { + return [new Vs(S.startLineNumber, S.startColumn, S.endLineNumber, S.endColumn)]; + } + } + return null; + }); + } + l.playSignal(el.format, { + userGesture: r + }); + return true; +} +async function _mt(i, e, t, s, n, r) { + const o = i.get(re); + const a = i.get(nn); + const l = no(e) ? e.getModel() : e; + const c = _0e(a.documentFormattingEditProvider, a.documentRangeFormattingEditProvider, l); + const u = await Fmt.select(c, l, t, 1); + if (u) { + s.report(u); + await o.invokeFunction($8s, u, e, t, n, r); + } +} +async function $8s(i, e, t, s, n, r) { + const o = i.get(Fu); + const a = i.get(Pd); + let l; + let c; + if (no(t)) { + l = t.getModel(); + c = new J4(t, 5, undefined, n); + } else { + l = t; + c = new Vme(t, n); + } + let u; + try { + const d = await e.provideDocumentFormattingEdits(l, l.getFormattingOptions(), c.token); + u = await o.computeMoreMinimalEdits(l.uri, d); + if (c.token.isCancellationRequested) { + return true; + } + } finally { + c.dispose(); + } + if (!u || u.length === 0) { + return false; + } + if (no(t)) { + zZt.execute(t, u, s !== 2); + if (s !== 2) { + t.revealPositionInCenterIfOutsideViewport(t.getPosition(), 1); + } + } else { + const [{ + range: d + }] = u; + const h = new Vs(d.startLineNumber, d.startColumn, d.endLineNumber, d.endColumn); + l.pushEditOperations([h], u.map(g => ({ + text: g.text, + range: Z.lift(g.range), + forceMoveMarkers: true + })), g => { + for (const { + range: p + } of g) { + if (Z.areIntersectingOrTouching(p, h)) { + return [new Vs(p.startLineNumber, p.startColumn, p.endLineNumber, p.endColumn)]; + } + } + return null; + }); + } + a.playSignal(el.format, { + userGesture: r + }); + return true; +} +async function Qbr(i, e, t, s, n, r) { + const o = e.documentRangeFormattingEditProvider.ordered(t); + for (const a of o) { + const l = await Promise.resolve(a.provideDocumentRangeFormattingEdits(t, s, n, r)).catch(uh); + if (Ac(l)) { + return await i.computeMoreMinimalEdits(t.uri, l); + } + } +} +async function Zbr(i, e, t, s, n) { + const r = _0e(e.documentFormattingEditProvider, e.documentRangeFormattingEditProvider, t); + for (const o of r) { + const a = await Promise.resolve(o.provideDocumentFormattingEdits(t, s, n)).catch(uh); + if (Ac(a)) { + return await i.computeMoreMinimalEdits(t.uri, a); + } + } +} +async function JZt(i, e, t, s, n) { + const r = no(t) ? t.getModel() : t; + const o = _0e(e.documentFormattingEditProvider, e.documentRangeFormattingEditProvider, r); + const a = await Fmt.select(o, r, s, 1); + if (a) { + const l = await Promise.resolve(a.provideDocumentFormattingEdits(r, r.getOptions(), n)).catch(uh); + return await i.computeMoreMinimalEdits(r.uri, l); + } +} +function F8s(i, e, t, s, n, r, o) { + const a = e.onTypeFormattingEditProvider.ordered(t); + if (a.length === 0 || a[0].autoFormatTriggerCharacters.indexOf(n) < 0) { + return Promise.resolve(undefined); + } else { + return Promise.resolve(a[0].provideOnTypeFormattingEdits(t, s, n, r, o)).catch(uh).then(l => i.computeMoreMinimalEdits(t.uri, l)); + } +} +ei.registerCommand("_executeFormatRangeProvider", async function (i, ...e) { + const [t, s, n] = e; + yr(V.isUri(t)); + yr(Z.isIRange(s)); + const r = i.get(ns); + const o = i.get(Fu); + const a = i.get(nn); + const l = await r.createModelReference(t); + try { + return Qbr(o, a, l.object.textEditorModel, Z.lift(s), n, mt.None); + } finally { + l.dispose(); + } +}); +ei.registerCommand("_executeFormatDocumentProvider", async function (i, ...e) { + const [t, s] = e; + yr(V.isUri(t)); + const n = i.get(ns); + const r = i.get(Fu); + const o = i.get(nn); + const a = await n.createModelReference(t); + try { + return Zbr(r, o, a.object.textEditorModel, s, mt.None); + } finally { + a.dispose(); + } +}); +ei.registerCommand("_executeFormatOnTypeProvider", async function (i, ...e) { + const [t, s, n, r] = e; + yr(V.isUri(t)); + yr(je.isIPosition(s)); + yr(typeof n == "string"); + const o = i.get(ns); + const a = i.get(Fu); + const l = i.get(nn); + const c = await o.createModelReference(t); + try { + return F8s(a, l, c.object.textEditorModel, je.lift(s), n, r, mt.None); + } finally { + c.dispose(); + } +}); +X(); +Wt(); +Ee(); +te(); +so(); +var B0e = class { + static { + this.ID = "editor.contrib.autoFormat"; + } + constructor(e, t, s, n) { + this.c = e; + this.d = t; + this.f = s; + this.g = n; + this.a = new Q(); + this.b = new Q(); + this.a.add(t.onTypeFormattingEditProvider.onDidChange(this.h, this)); + this.a.add(e.onDidChangeModel(() => this.h())); + this.a.add(e.onDidChangeModelLanguage(() => this.h())); + this.a.add(e.onDidChangeConfiguration(r => { + if (r.hasChanged(58)) { + this.h(); + } + })); + this.h(); + } + dispose() { + this.a.dispose(); + this.b.dispose(); + } + h() { + this.b.clear(); + if (!this.c.getOption(58) || !this.c.hasModel()) { + return; + } + const e = this.c.getModel(); + const [t] = this.d.onTypeFormattingEditProvider.ordered(e); + if (!t || !t.autoFormatTriggerCharacters) { + return; + } + const s = new Sge(); + for (const n of t.autoFormatTriggerCharacters) { + s.add(n.charCodeAt(0)); + } + this.b.add(this.c.onDidType(n => { + const r = n.charCodeAt(n.length - 1); + if (s.has(r)) { + this.j(String.fromCharCode(r)); + } + })); + } + j(e) { + if (!this.c.hasModel() || this.c.getSelections().length > 1 || !this.c.getSelection().isEmpty()) { + return; + } + const t = this.c.getModel(); + const s = this.c.getPosition(); + const n = new Xi(); + const r = this.c.onDidChangeModelContent(o => { + if (o.isFlush) { + n.cancel(); + r.dispose(); + return; + } + for (let a = 0, l = o.changes.length; a < l; a++) { + if (o.changes[a].range.endLineNumber <= s.lineNumber) { + n.cancel(); + r.dispose(); + return; + } + } + }); + F8s(this.f, this.d, t, s, e, t.getFormattingOptions(), n.token).then(o => { + if (!n.token.isCancellationRequested) { + if (Ac(o)) { + this.g.playSignal(el.format, { + userGesture: false + }); + zZt.execute(this.c, o, true); + } + } + }).finally(() => { + r.dispose(); + }); + } +}; +B0e = __decorate([__param(1, nn), __param(2, Fu), __param(3, Pd)], B0e); +var Bmt = class { + static { + this.ID = "editor.contrib.formatOnPaste"; + } + constructor(e, t, s) { + this.c = e; + this.d = t; + this.f = s; + this.a = new Q(); + this.b = new Q(); + this.a.add(e.onDidChangeConfiguration(() => this.g())); + this.a.add(e.onDidChangeModel(() => this.g())); + this.a.add(e.onDidChangeModelLanguage(() => this.g())); + this.a.add(t.documentRangeFormattingEditProvider.onDidChange(this.g, this)); + } + dispose() { + this.a.dispose(); + this.b.dispose(); + } + g() { + this.b.clear(); + if (this.c.getOption(57) && this.c.hasModel() && this.d.documentRangeFormattingEditProvider.has(this.c.getModel())) { + this.b.add(this.c.onDidPaste(({ + range: e + }) => this.h(e))); + } + } + h(e) { + if (this.c.hasModel()) { + if (!(this.c.getSelections().length > 1)) { + this.f.invokeFunction(Omt, this.c, e, 2, ev.None, mt.None, false).catch(xs); + } + } + } +}; +Bmt = __decorate([__param(1, nn), __param(2, re)], Bmt); +var evr = class extends Es { + constructor() { + super({ + id: "editor.action.formatDocument", + label: W(1092, "Format Document"), + precondition: T.and(ke.notInCompositeEditor, ke.writable, ke.hasDocumentFormattingProvider), + kbOpts: { + kbExpr: ke.editorTextFocus, + primary: 1572, + linux: { + primary: 3111 + }, + weight: 100 + }, + contextMenuOpts: { + group: "1_modification", + order: 1.3 + } + }); + } + async run(i, e) { + if (e.hasModel()) { + const t = i.get(re); + await i.get(Jp).showWhile(t.invokeFunction(_mt, e, 1, ev.None, mt.None, true), 250); + } + } +}; +var tvr = class extends Es { + constructor() { + super({ + id: "editor.action.formatSelection", + label: W(1093, "Format Selection"), + precondition: T.and(ke.writable, ke.hasDocumentSelectionFormattingProvider), + kbOpts: { + kbExpr: ke.editorTextFocus, + primary: Ai(_r, 2084), + mac: { + primary: Ai(Xr, 2084) + }, + weight: 100 + }, + contextMenuOpts: { + when: ke.hasNonEmptySelection, + group: "1_modification", + order: 1.31 + } + }); + } + async run(i, e) { + if (!e.hasModel()) { + return; + } + const t = i.get(re); + const s = e.getModel(); + const n = e.getSelections().map(o => o.isEmpty() ? new Z(o.startLineNumber, 1, o.startLineNumber, s.getLineMaxColumn(o.startLineNumber)) : o); + await i.get(Jp).showWhile(t.invokeFunction(Omt, e, n, 1, ev.None, mt.None, true), 250); + } +}; +bo(B0e.ID, B0e, 2); +bo(Bmt.ID, Bmt, 2); +Oi(evr); +Oi(tvr); +ei.registerCommand("editor.action.format", async i => { + const e = i.get(ps).getFocusedCodeEditor(); + if (!e || !e.hasModel()) { + return; + } + const t = i.get(gt); + if (e.getSelection().isEmpty()) { + await t.executeCommand("editor.action.formatDocument"); + } else { + await t.executeCommand("editor.action.formatSelection"); + } +}); +ri(); +zt(); +Le(); +Ms(); +Qv(); +Wt(); +ei.registerCommand("_executeDocumentSymbolProvider", async function (i, ...e) { + const [t] = e; + yr(V.isUri(t)); + const s = i.get(fS); + const r = await i.get(ns).createModelReference(t); + try { + return (await s.getOrCreate(r.object.textEditorModel, mt.None)).getTopLevelSymbols(); + } finally { + r.dispose(); + } +}); +var Db = new class { + constructor() { + this._implementations = []; + } + register(e) { + this._implementations.push(e); + return { + dispose: () => { + const t = this._implementations.indexOf(e); + if (t !== -1) { + this._implementations.splice(t, 1); + } + } + }; + } + getImplementations() { + return this._implementations; + } +}(); +Je(); +An(); +te(); +function ivr(i) { + if (i instanceof GZt) { + return i._instance; + } else { + return i; + } +} +var GZt = class { + constructor(i) { + this.instantiationService = i; + } + init(...i) {} +}; +function svr(i, e) { + return class extends e { + constructor() { + super(...arguments); + this.a = undefined; + } + init(...s) { + this.a = eh((n, r) => { + const o = i.read(n); + this._instance = r.add(this.instantiationService.createInstance(o, ...s)); + }); + } + dispose() { + this.a?.dispose(); + } + }; +} +var O8s = class extends GZt { + constructor(e) { + super(e); + this.init(); + } +}; +O8s = __decorate([__param(0, re)], O8s); +function _8s(i) { + if (sG()) { + return svr(i, KZt); + } else { + return i.get(); + } +} +var KZt = class extends GZt { + constructor(e, t) { + super(t); + this.init(e); + } +}; +KZt = __decorate([__param(1, re)], KZt); +en(); +An(); +$i(); +X(); +Je(); +Xa(); +Me(); +Ee(); +en(); +Sr(); +ri(); +Ut(); +Pc(); +q(); +fd(); +zt(); +Le(); +Rs(); +yt(); +Ms(); +JT(); +X(); +Je(); +Wt(); +Ee(); +Tr(); +var zo = { + Visible: AZt, + HasFocusedSuggestion: new fe("suggestWidgetHasFocusedSuggestion", false, f(1496, null)), + DetailsVisible: new fe("suggestWidgetDetailsVisible", false, f(1497, null)), + MultipleSuggestions: new fe("suggestWidgetMultipleSuggestions", false, f(1498, null)), + MakesTextEdit: new fe("suggestionMakesTextEdit", true, f(1499, null)), + AcceptSuggestionsOnEnter: new fe("acceptSuggestionOnEnter", true, f(1500, null)), + HasInsertAndReplaceRange: new fe("suggestionHasInsertAndReplaceRange", false, f(1501, null)), + InsertMode: new fe("suggestionInsertMode", undefined, { + type: "string", + description: f(1502, null) + }), + CanResolve: new fe("suggestionCanResolve", false, f(1503, null)) +}; +var XU = new _("suggestWidgetStatusBar"); +var nvr = class { + constructor(i, e, t, s) { + this.position = i; + this.completion = e; + this.container = t; + this.provider = s; + this.isInvalid = false; + this.score = Nx.Default; + this.distance = 0; + this.textLabel = typeof e.label == "string" ? e.label : e.label?.label; + this.labelLow = this.textLabel.toLowerCase(); + this.isInvalid = !this.textLabel; + this.sortTextLow = e.sortText && e.sortText.toLowerCase(); + this.filterTextLow = e.filterText && e.filterText.toLowerCase(); + this.extensionId = e.extensionId; + if (Z.isIRange(e.range)) { + this.editStart = new je(e.range.startLineNumber, e.range.startColumn); + this.editInsertEnd = new je(e.range.endLineNumber, e.range.endColumn); + this.editReplaceEnd = new je(e.range.endLineNumber, e.range.endColumn); + this.isInvalid = this.isInvalid || Z.spansMultipleLines(e.range) || e.range.startLineNumber !== i.lineNumber; + } else { + this.editStart = new je(e.range.insert.startLineNumber, e.range.insert.startColumn); + this.editInsertEnd = new je(e.range.insert.endLineNumber, e.range.insert.endColumn); + this.editReplaceEnd = new je(e.range.replace.endLineNumber, e.range.replace.endColumn); + this.isInvalid = this.isInvalid || Z.spansMultipleLines(e.range.insert) || Z.spansMultipleLines(e.range.replace) || e.range.insert.startLineNumber !== i.lineNumber || e.range.replace.startLineNumber !== i.lineNumber || e.range.insert.startColumn !== e.range.replace.startColumn; + } + if (typeof s.resolveCompletionItem != "function") { + this.d = Promise.resolve(); + this.c = 0; + } + } + get isResolved() { + return this.c !== undefined; + } + get resolveDuration() { + if (this.c !== undefined) { + return this.c; + } else { + return -1; + } + } + async resolve(i) { + if (!this.d) { + const e = i.onCancellationRequested(() => { + this.d = undefined; + this.c = undefined; + }); + const t = new ic(true); + this.d = Promise.resolve(this.provider.resolveCompletionItem(this.completion, i)).then(s => { + Object.assign(this.completion, s); + this.c = t.elapsed(); + }, s => { + if (ca(s)) { + this.d = undefined; + this.c = undefined; + } + }).finally(() => { + e.dispose(); + }); + } + return this.d; + } +}; +var B8s; +(function (i) { + i[i.Top = 0] = "Top"; + i[i.Inline = 1] = "Inline"; + i[i.Bottom = 2] = "Bottom"; +})(B8s ||= {}); +var Umt = class N_n { + static { + this.default = new N_n(); + } + constructor(e = 2, t = new Set(), s = new Set(), n = new Map(), r = true) { + this.snippetSortOrder = e; + this.kindFilter = t; + this.providerFilter = s; + this.providerItemsToReuse = n; + this.showDeprecated = r; + } +}; +var QU; +function rvr() { + return QU; +} +function ovr(i) { + const e = QU; + QU = i; + return e; +} +var avr = class { + constructor(i, e, t, s) { + this.items = i; + this.needsClipboard = e; + this.durations = t; + this.disposable = s; + } +}; +async function Wmt(i, e, t, s = Umt.default, n = { + triggerKind: 0 +}, r = mt.None) { + const o = new ic(); + t = t.clone(); + const a = e.getWordAtPosition(t); + const l = a ? new Z(t.lineNumber, a.startColumn, t.lineNumber, a.endColumn) : Z.fromPositions(t); + const c = { + replace: l, + insert: l.setEndPosition(t.lineNumber, t.column) + }; + const u = []; + const d = new Q(); + const h = []; + let g = false; + const p = (v, y, w) => { + let C = false; + if (!y) { + return C; + } + for (const S of y.suggestions) { + if (!s.kindFilter.has(S.kind)) { + if (!s.showDeprecated && S?.tags?.includes(1)) { + continue; + } + S.range ||= c; + S.sortText ||= typeof S.label == "string" ? S.label : S.label.label; + if (!g && S.insertTextRules && S.insertTextRules & 4) { + g = oE.guessNeedsClipboard(S.insertText); + } + u.push(new nvr(t, S, y, v)); + C = true; + } + } + if (bT(y)) { + d.add(y); + } + h.push({ + providerName: v._debugDisplayName ?? "unknown_provider", + elapsedProvider: y.duration ?? -1, + elapsedOverall: w.elapsed() + }); + return C; + }; + const b = (async () => { + if (!QU || s.kindFilter.has(27)) { + return; + } + const v = s.providerItemsToReuse.get(QU); + if (v) { + v.forEach(C => u.push(C)); + return; + } + if (s.providerFilter.size > 0 && !s.providerFilter.has(QU)) { + return; + } + const y = new ic(); + const w = await QU.provideCompletionItems(e, t, n, r); + p(QU, w, y); + })(); + for (const v of i.orderedGroups(e)) { + let y = false; + await Promise.all(v.map(async w => { + if (s.providerItemsToReuse.has(w)) { + const C = s.providerItemsToReuse.get(w); + C.forEach(S => u.push(S)); + y = y || C.length > 0; + return; + } + if (!(s.providerFilter.size > 0) || !!s.providerFilter.has(w)) { + try { + const C = new ic(); + const S = await w.provideCompletionItems(e, t, n, r); + y = p(w, S, C) || y; + } catch (C) { + uh(C); + } + } + })); + if (y || r.isCancellationRequested) { + break; + } + } + await b; + if (r.isCancellationRequested) { + d.dispose(); + return Promise.reject(new fl()); + } else { + return new avr(u.sort(uvr(s.snippetSortOrder)), g, { + entries: h, + elapsed: o.elapsed() + }, d); + } +} +function YZt(i, e) { + if (i.sortTextLow && e.sortTextLow) { + if (i.sortTextLow < e.sortTextLow) { + return -1; + } + if (i.sortTextLow > e.sortTextLow) { + return 1; + } + } + if (i.textLabel < e.textLabel) { + return -1; + } else if (i.textLabel > e.textLabel) { + return 1; + } else { + return i.completion.kind - e.completion.kind; + } +} +function lvr(i, e) { + if (i.completion.kind !== e.completion.kind) { + if (i.completion.kind === 27) { + return -1; + } + if (e.completion.kind === 27) { + return 1; + } + } + return YZt(i, e); +} +function cvr(i, e) { + if (i.completion.kind !== e.completion.kind) { + if (i.completion.kind === 27) { + return 1; + } + if (e.completion.kind === 27) { + return -1; + } + } + return YZt(i, e); +} +var Vmt = new Map(); +Vmt.set(0, lvr); +Vmt.set(2, cvr); +Vmt.set(1, YZt); +function uvr(i) { + return Vmt.get(i); +} +ei.registerCommand("_executeCompletionItemProvider", async (i, ...e) => { + const [t, s, n, r] = e; + yr(V.isUri(t)); + yr(je.isIPosition(s)); + yr(typeof n == "string" || !n); + yr(typeof r == "number" || !r); + const { + completionProvider: o + } = i.get(nn); + const a = await i.get(ns).createModelReference(t); + try { + const l = { + incomplete: false, + suggestions: [] + }; + const c = []; + const u = a.object.textEditorModel.validatePosition(s); + const d = await Wmt(o, a.object.textEditorModel, u, undefined, { + triggerCharacter: n ?? undefined, + triggerKind: n ? 1 : 0 + }); + for (const h of d.items) { + if (c.length < (r ?? 0)) { + c.push(h.resolve(mt.None)); + } + l.incomplete = l.incomplete || h.container.incomplete; + l.suggestions.push(h.completion); + } + try { + await Promise.all(c); + return l; + } finally { + setTimeout(() => d.disposable.dispose(), 100); + } + } finally { + a.dispose(); + } +}); +function U8s(i, e) { + i.getContribution("editor.contrib.suggestController")?.triggerSuggest(new Set().add(e), undefined, true); +} +var ore = class { + static isAllOff(i) { + return i.other === "off" && i.comments === "off" && i.strings === "off"; + } + static isAllOn(i) { + return i.other === "on" && i.comments === "on" && i.strings === "on"; + } + static valueFor(i, e) { + switch (e) { + case 1: + return i.comments; + case 2: + return i.strings; + default: + return i.other; + } + } +}; +Ee(); +X(); +var Kh = class { + static { + this.inlineSuggestionVisible = new fe("inlineSuggestionVisible", false, f(1273, null)); + } + static { + this.inlineSuggestionHasIndentation = new fe("inlineSuggestionHasIndentation", false, f(1274, null)); + } + static { + this.inlineSuggestionHasIndentationLessThanTabSize = new fe("inlineSuggestionHasIndentationLessThanTabSize", true, f(1275, null)); + } + static { + this.suppressSuggestions = new fe("inlineSuggestionSuppressSuggestions", undefined, f(1276, null)); + } + static { + this.cursorInIndentation = new fe("cursorInIndentation", false, f(1277, null)); + } + static { + this.hasSelection = new fe("editor.hasSelection", false, f(1278, null)); + } + static { + this.cursorAtInlineEdit = new fe("cursorAtInlineEdit", false, f(1279, null)); + } + static { + this.inlineEditVisible = new fe("inlineEditIsVisible", false, f(1280, null)); + } + static { + this.tabShouldJumpToInlineEdit = new fe("tabShouldJumpToInlineEdit", false, f(1281, null)); + } + static { + this.tabShouldAcceptInlineEdit = new fe("tabShouldAcceptInlineEdit", false, f(1282, null)); + } +}; +wc(); +nt(); +ri(); +q(); +An(); +zt(); +X(); +Ho(); +Wt(); +Me(); +Ee(); +te(); +Fi(); +S9(); +Rs(); +mR(); +Tr(); +q(); +An(); +te(); +Yg(); +ri(); +y4(); +Pc(); +q(); +An(); +Me(); +An(); +Wt(); +Ee(); +te(); +Zt(); +yt(); +TM(); +Eo(); +Bd(); +Tr(); +bm(); +nt(); +ri(); +In(); +Ut(); +Rs(); +yt(); +wns(); +I4(); +Ens(); +qte(); +x7t(); +function dvr(i, e) { + const t = new v7t(); + const s = new k7t(t, c => e.getLanguageConfiguration(c)); + const n = new S7t(new hvr([i]), s); + const r = D7t(n, [], undefined, true); + let o = ""; + const a = i.getLineContent(); + function l(c, u) { + if (c.kind === 2) { + l(c.openingBracket, u); + u = Zf(u, c.openingBracket.length); + if (c.child) { + l(c.child, u); + u = Zf(u, c.child.length); + } + if (c.closingBracket) { + l(c.closingBracket, u); + u = Zf(u, c.closingBracket.length); + } else { + const h = s.getSingleLanguageBracketTokens(c.openingBracket.languageId).findClosingTokenText(c.openingBracket.bracketIds); + o += h; + } + } else if (c.kind !== 3) { + if (c.kind === 0 || c.kind === 1) { + o += a.substring(u, Zf(u, c.length)); + } else if (c.kind === 4) { + for (const d of c.children) { + l(d, u); + u = Zf(u, d.length); + } + } + } + } + l(r, tS); + return o; +} +var hvr = class { + constructor(i) { + this.a = i; + this.tokenization = { + getLineTokens: e => this.a[e - 1] + }; + } + getValue() { + return this.a.map(i => i.getLineContent()).join(` +`); + } + getLineCount() { + return this.a.length; + } + getLineLength(i) { + return this.a[i - 1].getLineContent().length; + } +}; +Jt(); +Ut(); +An(); +$i(); +Rs(); +yt(); +var fvr = []; +function gvr() { + return fvr; +} +var Hmt = class { + constructor(i, e) { + this.startColumn = i; + this.endColumnExclusive = e; + if (i > e) { + throw new co(`startColumn ${i} cannot be after endColumnExclusive ${e}`); + } + } + toRange(i) { + return new Z(i, this.startColumn, i, this.endColumnExclusive); + } + equals(i) { + return this.startColumn === i.startColumn && this.endColumnExclusive === i.endColumnExclusive; + } +}; +function pvr(i, e) { + return new je(i.lineNumber + e.lineNumber - 1, e.lineNumber === 1 ? i.column + e.column - 1 : e.column); +} +function W8s(i, e) { + return new je(i.lineNumber - e.lineNumber + 1, i.lineNumber - e.lineNumber === 0 ? i.column - e.column + 1 : i.column); +} +function mvr(i, e) { + let t = ""; + const s = sji(i); + for (let n = e.lineNumber - 1; n < s.length; n++) { + t += s[n].substring(n === e.lineNumber - 1 ? e.column - 1 : 0); + } + return t; +} +function V8s(i) { + const e = lqi.createSortPermutation(i, jg(r => r.range, Z.compareRangesUsingStarts)); + const s = new pO(e.apply(i)).getNewRanges(); + return e.inverse().apply(s).map(r => r.getEndPosition()); +} +function bvr(i, e) { + const t = un("result", []); + const s = []; + e.add(Dn(n => { + const r = i.read(n); + Io(o => { + if (r.length !== s.length) { + s.length = r.length; + for (let a = 0; a < s.length; a++) { + s[a] ||= un("item", r[a]); + } + t.set([...s], o); + } + s.forEach((a, l) => a.set(r[l], o)); + }); + })); + return t; +} +var vvr = class { + constructor(i) { + this.a = i; + } + bind(i, e) { + return xm(i, this.a, e instanceof Function ? e : t => e.read(t)); + } +}; +JT(); +var XZt = class M_n { + static replace(e, t) { + return new M_n(gO.replace(e, t), null); + } + constructor(e, t) { + this.lineEdit = e; + this.additionalLines = t; + } +}; +var H8s; +(function (i) { + i[i.InProgress = 1] = "InProgress"; + i[i.Completed = 2] = "Completed"; +})(H8s ||= {}); +jp(); +nt(); +ri(); +q(); +Eo(); +async function yvr(i, e, t, s, n = mt.None, r) { + const o = new Xi(n); + const a = o.token; + const l = e instanceof je ? kvr(e, t) : e; + const c = i.all(t); + const u = new TZ(); + for (const C of c) { + if (C.groupId) { + u.add(C.groupId, C); + } + } + function d(C) { + if (!C.yieldsToGroupIds) { + return []; + } + const S = []; + for (const x of C.yieldsToGroupIds || []) { + const k = u.get(x); + for (const E of k) { + S.push(E); + } + } + return S; + } + const h = new Map(); + const g = new Set(); + function p(C, S) { + S = [...S, C]; + if (g.has(C)) { + return S; + } + g.add(C); + try { + const x = d(C); + for (const k of x) { + const E = p(k, S); + if (E) { + return E; + } + } + } finally { + g.delete(C); + } + } + function b(C) { + const S = h.get(C); + if (S) { + return S; + } + const x = p(C, []); + if (x) { + uh(new Error(`Inline completions: cyclic yield-to dependency detected. Path: ${x.map(E => E.toString ? E.toString() : "" + E).join(" -> ")}`)); + } + const k = new uc(); + h.set(C, k.p); + (async () => { + if (!x) { + const E = d(C); + for (const D of E) { + const P = await b(D); + if (P && P.inlineCompletions.items.length > 0) { + return; + } + } + } + return v(C); + })().then(E => k.complete(E), E => k.error(E)); + return k.p; + } + async function v(C) { + let S; + try { + if (e instanceof je) { + S = await C.provideInlineCompletions(t, e, s, a); + } else { + S = await C.provideInlineEditsForRange?.(t, e, s, a); + } + } catch (k) { + uh(k); + return; + } + if (!S) { + return; + } + const x = new Svr(S, C); + wvr(a, () => x.removeRef()); + return x; + } + const y = Tw.fromPromisesResolveOrder(c.map(b)); + if (a.isCancellationRequested) { + o.dispose(true); + return new q8s([], new Set(), []); + } + const w = await Cvr(s, y, l, t, r); + o.dispose(true); + return w; +} +function wvr(i, e) { + if (i.isCancellationRequested) { + e(); + return H.None; + } + { + const t = i.onCancellationRequested(() => { + t.dispose(); + e(); + }); + return { + dispose: () => t.dispose() + }; + } +} +async function Cvr(i, e, t, s, n) { + const r = new Map(); + let o = false; + const a = []; + for await (const l of e) { + if (l) { + l.addRef(); + a.push(l); + for (const c of l.inlineCompletions.items) { + if (!i.includeInlineEdits && c.isInlineEdit || !i.includeInlineCompletions && !c.isInlineEdit) { + continue; + } + const u = xvr.from(c, l, t, s, n); + r.set(u.hash(), u); + if (!c.isInlineEdit && i.triggerKind === kM.Automatic) { + if (!u.toSingleTextEdit().removeCommonPrefix(new Xwe(s)).isEmpty) { + o = true; + } + } + } + if (o) { + break; + } + } + } + return new q8s(Array.from(r.values()), new Set(r.keys()), a); +} +var q8s = class { + constructor(i, e, t) { + this.completions = i; + this.a = e; + this.b = t; + } + has(i) { + return this.a.has(i.hash()); + } + dispose() { + for (const i of this.b) { + i.removeRef(); + } + } +}; +var Svr = class { + constructor(i, e) { + this.inlineCompletions = i; + this.provider = e; + this.a = 1; + } + addRef() { + this.a++; + } + removeRef() { + this.a--; + if (this.a === 0) { + this.provider.freeInlineCompletions(this.inlineCompletions); + } + } +}; +var xvr = class C9i { + static from(e, t, s, n, r) { + let o; + let a; + let l = e.range ? Z.lift(e.range) : s; + if (typeof e.insertText == "string") { + o = e.insertText; + if (r && e.completeBracketPairs) { + o = j8s(o, l.getStartPosition(), n, r); + const c = o.length - e.insertText.length; + if (c !== 0) { + l = new Z(l.startLineNumber, l.startColumn, l.endLineNumber, l.endColumn + c); + } + } + a = undefined; + } else if ("snippet" in e.insertText) { + const c = e.insertText.snippet.length; + if (r && e.completeBracketPairs) { + e.insertText.snippet = j8s(e.insertText.snippet, l.getStartPosition(), n, r); + const d = e.insertText.snippet.length - c; + if (d !== 0) { + l = new Z(l.startLineNumber, l.startColumn, l.endLineNumber, l.endColumn + d); + } + } + const u = new oE().parse(e.insertText.snippet); + if (u.children.length === 1 && u.children[0] instanceof g1) { + o = u.children[0].value; + a = undefined; + } else { + o = u.toString(); + a = { + snippet: e.insertText.snippet, + range: l + }; + } + } else { + _L(e.insertText); + } + return new C9i(o, e.command, e.shownCommand, l, o, a, e.additionalTextEdits || gvr(), e, t); + } + constructor(e, t, s, n, r, o, a, l, c) { + this.filterText = e; + this.command = t; + this.shownCommand = s; + this.range = n; + this.insertText = r; + this.snippetInfo = o; + this.additionalTextEdits = a; + this.sourceInlineCompletion = l; + this.source = c; + this.a = false; + e = e.replace(/\r\n|\r/g, ` +`); + r = e.replace(/\r\n|\r/g, ` +`); + } + get didShow() { + return this.a; + } + markAsShown() { + this.a = true; + } + withRange(e) { + return new C9i(this.filterText, this.command, this.shownCommand, e, this.insertText, this.snippetInfo, this.additionalTextEdits, this.sourceInlineCompletion, this.source); + } + hash() { + return JSON.stringify({ + insertText: this.insertText, + range: this.range.toString() + }); + } + toSingleTextEdit() { + return new im(this.range, this.insertText); + } +}; +function kvr(i, e) { + const t = e.getWordAtPosition(i); + const s = e.getLineMaxColumn(i.lineNumber); + if (t) { + return new Z(i.lineNumber, t.startColumn, i.lineNumber, s); + } else { + return Z.fromPositions(i, i.with(undefined, s)); + } +} +function j8s(i, e, t, s) { + const r = t.getLineContent(e.lineNumber).substring(0, e.column - 1) + i; + const o = XZt.replace(uo.ofStartAndLength(e.column - 1, r.length - (e.column - 1)), i); + const l = t.tokenization.tokenizeLineWithEdit(e.lineNumber, o)?.mainLineTokens?.sliceAndInflate(e.column - 1, r.length, 0); + if (l) { + return dvr(l, s); + } else { + return i; + } +} +$i(); +yt(); +TM(); +function ZU(i, e, t) { + const s = t ? i.range.intersectRanges(t) : i.range; + if (!s) { + return i; + } + const n = i.text.replaceAll(`\r +`, ` +`); + const r = e.getValueInRange(s, 1); + const o = LL(r, n); + const a = qv.ofText(r.substring(0, o)).addToPosition(i.range.getStartPosition()); + const l = n.substring(o); + const c = Z.fromPositions(a, i.range.getEndPosition()); + return new im(c, l); +} +function z8s(i, e) { + return i.text.startsWith(e.text) && Evr(i.range, e.range); +} +function Evr(i, e) { + return e.getStartPosition().equals(i.getStartPosition()) && e.getEndPosition().isBeforeOrEqual(i.getEndPosition()); +} +var QZt; +var J8s; +var ZZt = class extends H { + static { + QZt = this; + } + static { + this.a = 0; + } + constructor(e, t, s, n, r, o, a, l) { + super(); + this.h = e; + this.j = t; + this.m = s; + this.n = n; + this.q = r; + this.r = o; + this.s = a; + this.t = l; + this.b = this.D(new ki()); + this.inlineCompletions = Epe("inlineCompletions", undefined); + this.suggestWidgetInlineCompletions = Epe("suggestWidgetInlineCompletions", undefined); + this.f = wS("editor.inlineSuggest.logFetch", false, this.s).recomputeInitiallyAndOnChange(this.B); + this.g = this.D(this.t.createInstance(qmt.cast(), "editor.inlineSuggest.logFetch.commandId")); + this.loading = un(this, false); + this.D(this.h.onDidChangeContent(() => { + this.b.clear(); + })); + } + u(e) { + if (this.f.get()) { + this.r.info(Lvr(e)); + } + this.g.log(e); + } + fetch(e, t, s) { + const n = new Dvr(e, t, this.h.getVersionId()); + const r = t.selectedSuggestionInfo ? this.suggestWidgetInlineCompletions : this.inlineCompletions; + if (this.b.value?.request.satisfies(n)) { + return this.b.value.promise; + } + if (r.get()?.request.satisfies(n)) { + return Promise.resolve(true); + } + this.loading.set(true, undefined); + const o = !!this.b.value; + this.b.clear(); + const a = new Xi(); + const l = (async () => { + if (o || t.triggerKind === kM.Automatic) { + await Ivr(this.m.get(this.h), a.token); + } + if (a.token.isCancellationRequested || this.B.isDisposed || this.h.getVersionId() !== n.versionId) { + return false; + } + const d = QZt.a++; + if (this.f.get() || this.g.isEnabled.get()) { + this.u({ + sourceId: "InlineCompletions.fetch", + kind: "start", + requestId: d, + modelUri: this.h.uri.toString(), + modelVersion: this.h.getVersionId(), + context: { + triggerKind: t.triggerKind + }, + time: Date.now() + }); + } + const h = new Date(); + let g; + let p; + try { + g = await yvr(this.n.inlineCompletionsProvider, e, this.h, t, a.token, this.q); + } catch (y) { + p = y; + throw y; + } finally { + if (this.f.get() || this.g.isEnabled.get()) { + if (a.token.isCancellationRequested || this.B.isDisposed || this.h.getVersionId() !== n.versionId) { + p = "canceled"; + } + const y = g?.completions.map(w => ({ + range: w.range.toString(), + text: w.insertText, + isInlineEdit: !!w.sourceInlineCompletion.isInlineEdit, + source: w.source.provider.groupId + })); + this.u({ + sourceId: "InlineCompletions.fetch", + kind: "end", + requestId: d, + durationMs: Date.now() - h.getTime(), + error: p, + result: y, + time: Date.now() + }); + } + } + if (a.token.isCancellationRequested || this.B.isDisposed || this.h.getVersionId() !== n.versionId) { + g.dispose(); + return false; + } + const b = new Date(); + this.m.update(this.h, b.getTime() - h.getTime()); + const v = new Pvr(g, n, this.h, this.j); + if (s) { + const y = s.toInlineCompletion(undefined); + if (s.canBeReused(this.h, e) && !g.has(y)) { + v.prepend(s.inlineCompletion, y.range, true); + } + } + this.b.clear(); + Io(y => { + r.set(v, y); + this.loading.set(false, y); + }); + return true; + })(); + const c = new Tvr(n, a, l); + this.b.value = c; + return l; + } + clear(e) { + this.b.clear(); + this.inlineCompletions.set(undefined, e); + this.suggestWidgetInlineCompletions.set(undefined, e); + } + clearSuggestWidgetInlineCompletions(e) { + if (this.b.value?.request.context.selectedSuggestionInfo) { + this.b.clear(); + } + this.suggestWidgetInlineCompletions.set(undefined, e); + } + cancelUpdate() { + this.b.clear(); + } +}; +ZZt = QZt = __decorate([__param(3, nn), __param(4, Lu), __param(5, Bt), __param(6, ve), __param(7, re)], ZZt); +function Ivr(i, e) { + return new Promise(t => { + let s; + const n = setTimeout(() => { + if (s) { + s.dispose(); + } + t(); + }, i); + if (e) { + s = e.onCancellationRequested(() => { + clearTimeout(n); + if (s) { + s.dispose(); + } + t(); + }); + } + }); +} +var Dvr = class { + constructor(i, e, t) { + this.position = i; + this.context = e; + this.versionId = t; + } + satisfies(i) { + return this.position.equals(i.position) && wpe(this.context.selectedSuggestionInfo, i.context.selectedSuggestionInfo, zis()) && (i.context.triggerKind === kM.Automatic || this.context.triggerKind === kM.Explicit) && this.versionId === i.versionId; + } + get isExplicitRequest() { + return this.context.triggerKind === kM.Explicit; + } +}; +var Tvr = class { + constructor(i, e, t) { + this.request = i; + this.cancellationTokenSource = e; + this.promise = t; + } + dispose() { + this.cancellationTokenSource.cancel(); + } +}; +var Pvr = class { + get inlineCompletions() { + return this.a; + } + constructor(i, e, t, s) { + this.g = i; + this.request = e; + this.h = t; + this.j = s; + this.b = 1; + this.f = []; + const n = t.deltaDecorations([], i.completions.map(r => ({ + range: r.range, + options: { + description: "inline-completion-tracking-range" + } + }))); + this.a = i.completions.map((r, o) => new G8s(r, n[o], this.h, this.j, this.request)); + } + clone() { + this.b++; + return this; + } + dispose() { + this.b--; + if (this.b === 0) { + setTimeout(() => { + if (!this.h.isDisposed()) { + this.h.deltaDecorations(this.a.map(i => i.decorationId), []); + } + }, 0); + this.g.dispose(); + for (const i of this.f) { + i.source.removeRef(); + } + } + } + prepend(i, e, t) { + if (t) { + i.source.addRef(); + } + const s = this.h.deltaDecorations([], [{ + range: e, + options: { + description: "inline-completion-tracking-range" + } + }])[0]; + this.a.unshift(new G8s(i, s, this.h, this.j, this.request)); + this.f.push(i); + } +}; +var G8s = class { + get forwardStable() { + return this.inlineCompletion.source.inlineCompletions.enableForwardStability ?? false; + } + constructor(i, e, t, s, n) { + this.inlineCompletion = i; + this.decorationId = e; + this.b = t; + this.f = s; + this.request = n; + this.semanticId = JSON.stringify([this.inlineCompletion.filterText, this.inlineCompletion.insertText, this.inlineCompletion.range.getStartPosition().toString()]); + this.a = Uy({ + owner: this, + equalsFn: Z.equalsRange + }, r => { + this.f.read(r); + return this.b.getDecorationRange(this.decorationId); + }); + } + toInlineCompletion(i) { + return this.inlineCompletion.withRange(this.a.read(i) ?? eei); + } + toSingleTextEdit(i) { + return new im(this.a.read(i) ?? eei, this.inlineCompletion.insertText); + } + isVisible(i, e, t) { + const s = ZU(this.g(t), i); + const n = this.a.read(t); + if (!n || !this.inlineCompletion.range.getStartPosition().equals(n.getStartPosition()) || e.lineNumber !== s.range.startLineNumber || s.isEmpty) { + return false; + } + const r = i.getValueInRange(s.range, 1); + const o = s.text; + const a = Math.max(0, e.column - s.range.startColumn); + let l = o.substring(0, a); + let c = o.substring(a); + let u = r.substring(0, a); + let d = r.substring(a); + const h = i.getLineIndentColumn(s.range.startLineNumber); + if (s.range.startColumn <= h) { + u = u.trimStart(); + if (u.length === 0) { + d = d.trimStart(); + } + l = l.trimStart(); + if (l.length === 0) { + c = c.trimStart(); + } + } + return l.startsWith(u) && !!yls(d, c); + } + canBeReused(i, e) { + const t = this.a.read(undefined); + return !!t && t.containsPosition(e) && this.isVisible(i, e, undefined) && qv.ofRange(t).isGreaterThanOrEqualTo(qv.ofRange(this.inlineCompletion.range)); + } + g(i) { + return new im(this.a.read(i) ?? eei, this.inlineCompletion.filterText); + } +}; +var eei = new Z(1, 1, 1, 1); +function Lvr(i) { + return i.sourceId + " @@ " + JSON.stringify({ + ...i, + sourceId: undefined + }); +} +var qmt = J8s = class extends H { + static cast() { + return this; + } + constructor(e, t, s) { + super(); + this.b = e; + this.f = t; + this.g = s; + this.a = Rvr(this.b, this.f).recomputeInitiallyAndOnChange(this.B); + this.isEnabled = this.a.map(n => n !== undefined); + } + log(e) { + const t = this.a.get(); + if (t) { + this.g.executeCommand(t, e); + return true; + } else { + return false; + } + } +}; +qmt = J8s = __decorate([__param(1, Ne), __param(2, gt)], qmt); +function Rvr(i, e) { + return Ro(e.onDidChangeContext, () => e.getContextKeyValue(i)); +} +var tei = class extends H { + constructor(e, t) { + super(); + this.b = e; + this.c = t; + this.a = this.D(this.c.createInstance(qmt.cast(), "editor.inlineSuggest.logChangeReason.commandId")); + this.D(eh((s, n) => { + if (!(this.b instanceof gh) || !this.a.isEnabled.read(s)) { + return; + } + const r = []; + n.add(this.b.onBeforeExecuteEdit(({ + source: o + }) => { + if (o) { + r.push(o); + } + })); + n.add(this.b.onDidChangeModelContent(o => { + const a = this.b.getModel(); + if (a) { + for (const l of r) { + const c = { + sourceId: "TextModel.setChangeReason", + source: l, + time: Date.now(), + modelUri: a.uri.toString(), + modelVersion: a.getVersionId() + }; + this.a.log(c); + } + r.length = 0; + } + })); + })); + } +}; +tei = __decorate([__param(1, re)], tei); +qg(); +y4(); +Ut(); +q(); +An(); +$i(); +$i(); +zt(); +Wt(); +te(); +ef(); +TT(); +Nf(); +Rs(); +yt(); +ua(); +TM(); +Eo(); +Bd(); +q(); +zt(); +en(); +Rs(); +Sr(); +Bd(); +Tr(); +X(); +Ee(); +Zt(); +Jt(); +q(); +$i(); +ef(); +yt(); +ua(); +Bd(); +Ya(); +jn(); +ii(); +JT(); +Yp(); +pn(); +Et(); +$i(); +Ps(); +Bd(); +JT(); +X(); +ii(); +var Nvr = Object.freeze({ + CURRENT_YEAR: true, + CURRENT_YEAR_SHORT: true, + CURRENT_MONTH: true, + CURRENT_DATE: true, + CURRENT_HOUR: true, + CURRENT_MINUTE: true, + CURRENT_SECOND: true, + CURRENT_DAY_NAME: true, + CURRENT_DAY_NAME_SHORT: true, + CURRENT_MONTH_NAME: true, + CURRENT_MONTH_NAME_SHORT: true, + CURRENT_SECONDS_UNIX: true, + CURRENT_TIMEZONE_OFFSET: true, + SELECTION: true, + CLIPBOARD: true, + TM_SELECTED_TEXT: true, + TM_CURRENT_LINE: true, + TM_CURRENT_WORD: true, + TM_LINE_INDEX: true, + TM_LINE_NUMBER: true, + TM_FILENAME: true, + TM_FILENAME_BASE: true, + TM_DIRECTORY: true, + TM_FILEPATH: true, + CURSOR_INDEX: true, + CURSOR_NUMBER: true, + RELATIVE_FILEPATH: true, + BLOCK_COMMENT_START: true, + BLOCK_COMMENT_END: true, + LINE_COMMENT: true, + WORKSPACE_NAME: true, + WORKSPACE_FOLDER: true, + RANDOM: true, + RANDOM_HEX: true, + UUID: true +}); +var K8s = class { + constructor(i) { + this.a = i; + } + resolve(i) { + for (const e of this.a) { + const t = e.resolve(i); + if (t !== undefined) { + return t; + } + } + } +}; +var Y8s = class { + constructor(i, e, t, s) { + this.a = i; + this.b = e; + this.c = t; + this.d = s; + } + resolve(i) { + const { + name: e + } = i; + if (e === "SELECTION" || e === "TM_SELECTED_TEXT") { + let t = this.a.getValueInRange(this.b) || undefined; + let s = this.b.startLineNumber !== this.b.endLineNumber; + if (!t && this.d) { + const n = this.d.getLastOvertypedInfo(this.c); + if (n) { + t = n.value; + s = n.multiline; + } + } + if (t && s && i.snippet) { + const n = this.a.getLineContent(this.b.startLineNumber); + const r = Jd(n, 0, this.b.startColumn - 1); + let o = r; + i.snippet.walk(l => l === i ? false : (l instanceof g1 && (o = Jd(Ov(l.value).pop())), true)); + const a = LL(o, r); + t = t.replace(/(\r\n|\r|\n)(.*)/g, (l, c, u) => `${c}${o.substr(a)}${u}`); + } + return t; + } else { + if (e === "TM_CURRENT_LINE") { + return this.a.getLineContent(this.b.positionLineNumber); + } + if (e === "TM_CURRENT_WORD") { + const t = this.a.getWordAtPosition({ + lineNumber: this.b.positionLineNumber, + column: this.b.positionColumn + }); + return t && t.word || undefined; + } else { + if (e === "TM_LINE_INDEX") { + return String(this.b.positionLineNumber - 1); + } + if (e === "TM_LINE_NUMBER") { + return String(this.b.positionLineNumber); + } + if (e === "CURSOR_INDEX") { + return String(this.c); + } + if (e === "CURSOR_NUMBER") { + return String(this.c + 1); + } + } + } + } +}; +var X8s = class { + constructor(i, e) { + this.a = i; + this.b = e; + } + resolve(i) { + const { + name: e + } = i; + if (e === "TM_FILENAME") { + return ir(this.b.uri.fsPath); + } + if (e === "TM_FILENAME_BASE") { + const t = ir(this.b.uri.fsPath); + const s = t.lastIndexOf("."); + if (s <= 0) { + return t; + } else { + return t.slice(0, s); + } + } else { + if (e === "TM_DIRECTORY") { + if (pm(this.b.uri.fsPath) === ".") { + return ""; + } else { + return this.a.getUriLabel(Ir(this.b.uri)); + } + } + if (e === "TM_FILEPATH") { + return this.a.getUriLabel(this.b.uri); + } + if (e === "RELATIVE_FILEPATH") { + return this.a.getUriLabel(this.b.uri, { + relative: true, + noPrefix: true + }); + } + } + } +}; +var Q8s = class { + constructor(i, e, t, s) { + this.a = i; + this.b = e; + this.c = t; + this.d = s; + } + resolve(i) { + if (i.name !== "CLIPBOARD") { + return; + } + const e = this.a(); + if (e) { + if (this.d) { + const t = e.split(/\r\n|\n|\r/).filter(s => !Ay(s)); + if (t.length === this.c) { + return t[this.b]; + } + } + return e; + } + } +}; +var jmt = class { + constructor(e, t, s) { + this.a = e; + this.b = t; + this.c = s; + } + resolve(e) { + const { + name: t + } = e; + const s = this.a.getLanguageIdAtPosition(this.b.selectionStartLineNumber, this.b.selectionStartColumn); + const n = this.c.getLanguageConfiguration(s).comments; + if (n) { + if (t === "LINE_COMMENT") { + return n.lineCommentToken || undefined; + } + if (t === "BLOCK_COMMENT_START") { + return n.blockCommentStartToken || undefined; + } + if (t === "BLOCK_COMMENT_END") { + return n.blockCommentEndToken || undefined; + } + } + } +}; +jmt = __decorate([__param(2, Lu)], jmt); +var Z8s = class rYe { + constructor() { + this.e = new Date(); + } + static { + this.a = [f(1447, null), f(1448, null), f(1449, null), f(1450, null), f(1451, null), f(1452, null), f(1453, null)]; + } + static { + this.b = [f(1454, null), f(1455, null), f(1456, null), f(1457, null), f(1458, null), f(1459, null), f(1460, null)]; + } + static { + this.c = [f(1461, null), f(1462, null), f(1463, null), f(1464, null), f(1465, null), f(1466, null), f(1467, null), f(1468, null), f(1469, null), f(1470, null), f(1471, null), f(1472, null)]; + } + static { + this.d = [f(1473, null), f(1474, null), f(1475, null), f(1476, null), f(1477, null), f(1478, null), f(1479, null), f(1480, null), f(1481, null), f(1482, null), f(1483, null), f(1484, null)]; + } + resolve(e) { + const { + name: t + } = e; + if (t === "CURRENT_YEAR") { + return String(this.e.getFullYear()); + } + if (t === "CURRENT_YEAR_SHORT") { + return String(this.e.getFullYear()).slice(-2); + } + if (t === "CURRENT_MONTH") { + return String(this.e.getMonth().valueOf() + 1).padStart(2, "0"); + } + if (t === "CURRENT_DATE") { + return String(this.e.getDate().valueOf()).padStart(2, "0"); + } + if (t === "CURRENT_HOUR") { + return String(this.e.getHours().valueOf()).padStart(2, "0"); + } + if (t === "CURRENT_MINUTE") { + return String(this.e.getMinutes().valueOf()).padStart(2, "0"); + } + if (t === "CURRENT_SECOND") { + return String(this.e.getSeconds().valueOf()).padStart(2, "0"); + } + if (t === "CURRENT_DAY_NAME") { + return rYe.a[this.e.getDay()]; + } + if (t === "CURRENT_DAY_NAME_SHORT") { + return rYe.b[this.e.getDay()]; + } + if (t === "CURRENT_MONTH_NAME") { + return rYe.c[this.e.getMonth()]; + } + if (t === "CURRENT_MONTH_NAME_SHORT") { + return rYe.d[this.e.getMonth()]; + } + if (t === "CURRENT_SECONDS_UNIX") { + return String(Math.floor(this.e.getTime() / 1000)); + } + if (t === "CURRENT_TIMEZONE_OFFSET") { + const s = this.e.getTimezoneOffset(); + const n = s > 0 ? "-" : "+"; + const r = Math.trunc(Math.abs(s / 60)); + const o = r < 10 ? "0" + r : r; + const a = Math.abs(s) - r * 60; + const l = a < 10 ? "0" + a : a; + return n + o + ":" + l; + } + } +}; +var e3s = class { + constructor(i) { + this.a = i; + } + resolve(i) { + if (!this.a) { + return; + } + const e = Lx(this.a.getWorkspace()); + if (!IUt(e)) { + if (i.name === "WORKSPACE_NAME") { + return this.b(e); + } + if (i.name === "WORKSPACE_FOLDER") { + return this.c(e); + } + } + } + b(i) { + if (u1(i)) { + return ir(i.uri.path); + } + let e = ir(i.configPath.path); + if (e.endsWith(qI)) { + e = e.substr(0, e.length - qI.length - 1); + } + return e; + } + c(i) { + if (u1(i)) { + return f1(i.uri.fsPath); + } + const e = ir(i.configPath.path); + let t = i.configPath.fsPath; + if (t.endsWith(e)) { + t = t.substr(0, t.length - e.length - 1); + } + if (t) { + return f1(t); + } else { + return "/"; + } + } +}; +var t3s = class { + resolve(i) { + const { + name: e + } = i; + if (e === "RANDOM") { + return Math.random().toString().slice(-6); + } + if (e === "RANDOM_HEX") { + return Math.random().toString(16).slice(-6); + } + if (e === "UUID") { + return Ft(); + } + } +}; +var _A; +var i3s = class mB { + static { + this.f = { + active: Cr.register({ + description: "snippet-placeholder-1", + stickiness: 0, + className: "snippet-placeholder" + }), + inactive: Cr.register({ + description: "snippet-placeholder-2", + stickiness: 1, + className: "snippet-placeholder" + }), + activeFinal: Cr.register({ + description: "snippet-placeholder-3", + stickiness: 1, + className: "finish-snippet-placeholder" + }), + inactiveFinal: Cr.register({ + description: "snippet-placeholder-4", + stickiness: 1, + className: "finish-snippet-placeholder" + }) + }; + } + constructor(e, t, s) { + this.g = e; + this.h = t; + this.j = s; + this.e = -1; + this._nestingLevel = 1; + this.d = pI(t.placeholders, XI.compareByIndex); + this._placeholderGroupsIdx = -1; + } + initialize(e) { + this.e = e.newPosition; + } + dispose() { + if (this.c) { + this.g.removeDecorations([...this.c.values()]); + } + this.d.length = 0; + } + k() { + if (this.e === -1) { + throw new Error("Snippet not initialized!"); + } + if (this.c) { + return; + } + this.c = new Map(); + const e = this.g.getModel(); + this.g.changeDecorations(t => { + for (const s of this.h.placeholders) { + const n = this.h.offset(s); + const r = this.h.fullLen(s); + const o = Z.fromPositions(e.getPositionAt(this.e + n), e.getPositionAt(this.e + n + r)); + const a = s.isFinalTabstop ? mB.f.inactiveFinal : mB.f.inactive; + const l = t.addDecoration(o, a); + this.c.set(s, l); + } + }); + } + move(e) { + if (!this.g.hasModel()) { + return []; + } + this.k(); + if (this._placeholderGroupsIdx >= 0) { + const n = []; + for (const r of this.d[this._placeholderGroupsIdx]) { + if (r.transform) { + const o = this.c.get(r); + const a = this.g.getModel().getDecorationRange(o); + const l = this.g.getModel().getValueInRange(a); + const c = r.transform.resolve(l).split(/\r\n|\r|\n/); + for (let u = 1; u < c.length; u++) { + c[u] = this.g.getModel().normalizeIndentation(this.j + c[u]); + } + n.push(Ua.replace(a, c.join(this.g.getModel().getEOL()))); + } + } + if (n.length > 0) { + this.g.executeEdits("snippet.placeholderTransform", n); + } + } + let t = false; + if (e === true && this._placeholderGroupsIdx < this.d.length - 1) { + this._placeholderGroupsIdx += 1; + t = true; + } else if (e === false && this._placeholderGroupsIdx > 0) { + this._placeholderGroupsIdx -= 1; + t = true; + } + const s = this.g.getModel().changeDecorations(n => { + const r = new Set(); + const o = []; + for (const a of this.d[this._placeholderGroupsIdx]) { + const l = this.c.get(a); + const c = this.g.getModel().getDecorationRange(l); + o.push(new Vs(c.startLineNumber, c.startColumn, c.endLineNumber, c.endColumn)); + t = t && this.l(a); + n.changeDecorationOptions(l, a.isFinalTabstop ? mB.f.activeFinal : mB.f.active); + r.add(a); + for (const u of this.h.enclosingPlaceholders(a)) { + const d = this.c.get(u); + n.changeDecorationOptions(d, u.isFinalTabstop ? mB.f.activeFinal : mB.f.active); + r.add(u); + } + } + for (const [a, l] of this.c) { + if (!r.has(a)) { + n.changeDecorationOptions(l, a.isFinalTabstop ? mB.f.inactiveFinal : mB.f.inactive); + } + } + return o; + }); + if (t) { + return this.move(e); + } else { + return s ?? []; + } + } + l(e) { + let t = e; + while (t) { + if (t instanceof XI) { + const s = this.c.get(t); + if (this.g.getModel().getDecorationRange(s).isEmpty() && t.toString().length > 0) { + return true; + } + } + t = t.parent; + } + return false; + } + get isAtFirstPlaceholder() { + return this._placeholderGroupsIdx <= 0 || this.d.length === 0; + } + get isAtLastPlaceholder() { + return this._placeholderGroupsIdx === this.d.length - 1; + } + get hasPlaceholder() { + return this.h.placeholders.length > 0; + } + get isTrivialSnippet() { + if (this.h.placeholders.length === 0) { + return true; + } + if (this.h.placeholders.length === 1) { + const [e] = this.h.placeholders; + if (e.isFinalTabstop && this.h.rightMostDescendant === e) { + return true; + } + } + return false; + } + computePossibleSelections() { + const e = new Map(); + for (const t of this.d) { + let s; + for (const n of t) { + if (n.isFinalTabstop) { + break; + } + if (!s) { + s = []; + e.set(n.index, s); + } + const r = this.c.get(n); + const o = this.g.getModel().getDecorationRange(r); + if (!o) { + e.delete(n.index); + break; + } + s.push(o); + } + } + return e; + } + get activeChoice() { + if (!this.c) { + return; + } + const e = this.d[this._placeholderGroupsIdx][0]; + if (!e?.choice) { + return; + } + const t = this.c.get(e); + if (!t) { + return; + } + const s = this.g.getModel().getDecorationRange(t); + if (s) { + return { + range: s, + choice: e.choice + }; + } + } + get hasChoice() { + let e = false; + this.h.walk(t => { + e = t instanceof Bme; + return !e; + }); + return e; + } + merge(e) { + const t = this.g.getModel(); + this._nestingLevel *= 10; + this.g.changeDecorations(s => { + for (const n of this.d[this._placeholderGroupsIdx]) { + const r = e.shift(); + console.assert(r.e !== -1); + console.assert(!r.c); + const o = r.h.placeholderInfo.last.index; + for (const l of r.h.placeholderInfo.all) { + if (l.isFinalTabstop) { + l.index = n.index + (o + 1) / this._nestingLevel; + } else { + l.index = n.index + l.index / this._nestingLevel; + } + } + this.h.replace(n, r.h.children); + const a = this.c.get(n); + s.removeDecoration(a); + this.c.delete(n); + for (const l of r.h.placeholders) { + const c = r.h.offset(l); + const u = r.h.fullLen(l); + const d = Z.fromPositions(t.getPositionAt(r.e + c), t.getPositionAt(r.e + c + u)); + const h = s.addDecoration(d, mB.f.inactive); + this.c.set(l, h); + } + } + this.d = pI(this.h.placeholders, XI.compareByIndex); + }); + } + getEnclosingRange() { + let e; + const t = this.g.getModel(); + for (const s of this.c.values()) { + const n = t.getDecorationRange(s) ?? undefined; + if (e) { + e = e.plusRange(n); + } else { + e = n; + } + } + return e; + } +}; +var s3s = { + overwriteBefore: 0, + overwriteAfter: 0, + adjustWhitespace: true, + clipboardText: undefined, + overtypingCapturer: undefined +}; +var zmt = _A = class { + static adjustWhitespace(e, t, s, n, r) { + const o = e.getLineContent(t.lineNumber); + const a = Jd(o, 0, t.column - 1); + let l; + n.walk(c => { + if (!(c instanceof g1) || c.parent instanceof Bme || r && !r.has(c)) { + return true; + } + const u = c.value.split(/\r\n|\r|\n/); + if (s) { + const h = n.offset(c); + if (h === 0) { + u[0] = e.normalizeIndentation(u[0]); + } else { + l = l ?? n.toString(); + const g = l.charCodeAt(h - 1); + if (g === 10 || g === 13) { + u[0] = e.normalizeIndentation(a + u[0]); + } + } + for (let g = 1; g < u.length; g++) { + u[g] = e.normalizeIndentation(a + u[g]); + } + } + const d = u.join(e.getEOL()); + if (d !== c.value) { + c.parent.replace(c, [new g1(d)]); + l = undefined; + } + return true; + }); + return a; + } + static adjustSelection(e, t, s, n) { + if (s !== 0 || n !== 0) { + const { + positionLineNumber: r, + positionColumn: o + } = t; + const a = o - s; + const l = o + n; + const c = e.validateRange({ + startLineNumber: r, + startColumn: a, + endLineNumber: r, + endColumn: l + }); + t = Vs.createWithDirection(c.startLineNumber, c.startColumn, c.endLineNumber, c.endColumn, t.getDirection()); + } + return t; + } + static createEditsAndSnippetsFromSelections(e, t, s, n, r, o, a, l, c) { + const u = []; + const d = []; + if (!e.hasModel()) { + return { + edits: u, + snippets: d + }; + } + const h = e.getModel(); + const g = e.invokeWithinContext(S => S.get(kt)); + const p = e.invokeWithinContext(S => new X8s(S.get(Zs), h)); + const b = () => a; + const v = h.getValueInRange(_A.adjustSelection(h, e.getSelection(), s, 0)); + const y = h.getValueInRange(_A.adjustSelection(h, e.getSelection(), 0, n)); + const w = h.getLineFirstNonWhitespaceColumn(e.getSelection().positionLineNumber); + const C = e.getSelections().map((S, x) => ({ + selection: S, + idx: x + })).sort((S, x) => Z.compareRangesUsingStarts(S.selection, x.selection)); + for (const { + selection: S, + idx: x + } of C) { + let k = _A.adjustSelection(h, S, s, 0); + let E = _A.adjustSelection(h, S, 0, n); + if (v !== h.getValueInRange(k)) { + k = S; + } + if (y !== h.getValueInRange(E)) { + E = S; + } + const D = S.setStartPosition(k.startLineNumber, k.startColumn).setEndPosition(E.endLineNumber, E.endColumn); + const P = new oE().parse(t, true, r); + const R = D.getStartPosition(); + const L = _A.adjustWhitespace(h, R, o || x > 0 && w !== h.getLineFirstNonWhitespaceColumn(S.positionLineNumber), P); + P.resolveVariables(new K8s([p, new Q8s(b, x, C.length, e.getOption(80) === "spread"), new Y8s(h, S, x, l), new jmt(h, S, c), new Z8s(), new e3s(g), new t3s()])); + u[x] = Ua.replace(D, P.toString()); + u[x].identifier = { + major: x, + minor: 0 + }; + u[x]._isTracked = true; + d[x] = new i3s(e, P, L); + } + return { + edits: u, + snippets: d + }; + } + static createEditsAndSnippetsFromEdits(e, t, s, n, r, o, a) { + if (!e.hasModel() || t.length === 0) { + return { + edits: [], + snippets: [] + }; + } + const l = []; + const c = e.getModel(); + const u = new oE(); + const d = new Uct(); + const h = new K8s([e.invokeWithinContext(p => new X8s(p.get(Zs), c)), new Q8s(() => r, 0, e.getSelections().length, e.getOption(80) === "spread"), new Y8s(c, e.getSelection(), 0, o), new jmt(c, e.getSelection(), a), new Z8s(), new e3s(e.invokeWithinContext(p => p.get(kt))), new t3s()]); + t = t.sort((p, b) => Z.compareRangesUsingStarts(p.range, b.range)); + let g = 0; + for (let p = 0; p < t.length; p++) { + const { + range: b, + template: v + } = t[p]; + if (p > 0) { + const x = t[p - 1].range; + const k = Z.fromPositions(x.getEndPosition(), b.getStartPosition()); + const E = new g1(c.getValueInRange(k)); + d.appendChild(E); + g += E.value.length; + } + const y = u.parseFragment(v, d); + _A.adjustWhitespace(c, b.getStartPosition(), true, d, new Set(y)); + d.resolveVariables(h); + const w = d.toString(); + const C = w.slice(g); + g = w.length; + const S = Ua.replace(b, C); + S.identifier = { + major: p, + minor: 0 + }; + S._isTracked = true; + l.push(S); + } + u.ensureFinalTabstop(d, s, true); + return { + edits: l, + snippets: [new i3s(e, d, "")] + }; + } + constructor(e, t, s = s3s, n) { + this.e = e; + this.f = t; + this.g = s; + this.h = n; + this.c = []; + this.d = []; + } + dispose() { + si(this.d); + } + _logInfo() { + return `template="${this.f}", merged_templates="${this.c.join(" -> ")}"`; + } + insert() { + if (!this.e.hasModel()) { + return; + } + const { + edits: e, + snippets: t + } = typeof this.f == "string" ? _A.createEditsAndSnippetsFromSelections(this.e, this.f, this.g.overwriteBefore, this.g.overwriteAfter, false, this.g.adjustWhitespace, this.g.clipboardText, this.g.overtypingCapturer, this.h) : _A.createEditsAndSnippetsFromEdits(this.e, this.f, false, this.g.adjustWhitespace, this.g.clipboardText, this.g.overtypingCapturer, this.h); + this.d = t; + this.e.executeEdits("snippet", e, s => { + const n = s.filter(r => !!r.identifier); + for (let r = 0; r < t.length; r++) { + t[r].initialize(n[r].textChange); + } + if (this.d[0].hasPlaceholder) { + return this.j(true); + } else { + return n.map(r => Vs.fromPositions(r.range.getEndPosition())); + } + }); + this.e.revealRange(this.e.getSelections()[0]); + } + merge(e, t = s3s) { + if (!this.e.hasModel()) { + return; + } + this.c.push([this.d[0]._nestingLevel, this.d[0]._placeholderGroupsIdx, e]); + const { + edits: s, + snippets: n + } = _A.createEditsAndSnippetsFromSelections(this.e, e, t.overwriteBefore, t.overwriteAfter, true, t.adjustWhitespace, t.clipboardText, t.overtypingCapturer, this.h); + this.e.executeEdits("snippet", s, r => { + const o = r.filter(l => !!l.identifier); + for (let l = 0; l < n.length; l++) { + n[l].initialize(o[l].textChange); + } + const a = n[0].isTrivialSnippet; + if (!a) { + for (const l of this.d) { + l.merge(n); + } + console.assert(n.length === 0); + } + if (this.d[0].hasPlaceholder && !a) { + return this.j(undefined); + } else { + return o.map(l => Vs.fromPositions(l.range.getEndPosition())); + } + }); + } + next() { + const e = this.j(true); + this.e.setSelections(e); + this.e.revealPositionInCenterIfOutsideViewport(e[0].getPosition()); + } + prev() { + const e = this.j(false); + this.e.setSelections(e); + this.e.revealPositionInCenterIfOutsideViewport(e[0].getPosition()); + } + j(e) { + const t = []; + for (const s of this.d) { + const n = s.move(e); + t.push(...n); + } + return t; + } + get isAtFirstPlaceholder() { + return this.d[0].isAtFirstPlaceholder; + } + get isAtLastPlaceholder() { + return this.d[0].isAtLastPlaceholder; + } + get hasPlaceholder() { + return this.d[0].hasPlaceholder; + } + get hasChoice() { + return this.d[0].hasChoice; + } + get activeChoice() { + return this.d[0].activeChoice; + } + isSelectionWithinPlaceholders() { + if (!this.hasPlaceholder) { + return false; + } + const e = this.e.getSelections(); + if (e.length < this.d.length) { + return false; + } + const t = new Map(); + for (const s of this.d) { + const n = s.computePossibleSelections(); + if (t.size === 0) { + for (const [r, o] of n) { + o.sort(Z.compareRangesUsingStarts); + for (const a of e) { + if (o[0].containsRange(a)) { + t.set(r, []); + break; + } + } + } + } + if (t.size === 0) { + return false; + } + t.forEach((r, o) => { + r.push(...n.get(o)); + }); + } + e.sort(Z.compareRangesUsingStarts); + for (const [s, n] of t) { + if (n.length !== e.length) { + t.delete(s); + continue; + } + n.sort(Z.compareRangesUsingStarts); + for (let r = 0; r < n.length; r++) { + if (!n[r].containsRange(e[r])) { + t.delete(s); + continue; + } + } + } + return t.size > 0; + } + getEnclosingRange() { + let e; + for (const t of this.d) { + const s = t.getEnclosingRange(); + if (e) { + e = e.plusRange(s); + } else { + e = s; + } + } + return e; + } +}; +zmt = _A = __decorate([__param(3, Lu)], zmt); +var are; +var Jmt = { + overwriteBefore: 0, + overwriteAfter: 0, + undoStopBefore: true, + undoStopAfter: true, + adjustWhitespace: true, + clipboardText: undefined, + overtypingCapturer: undefined +}; +var Yh = class { + static { + are = this; + } + static { + this.ID = "snippetController2"; + } + static get(e) { + return e.getContribution(are.ID); + } + static { + this.InSnippetMode = new fe("inSnippetMode", false, f(1443, null)); + } + static { + this.HasNextTabstop = new fe("hasNextTabstop", false, f(1444, null)); + } + static { + this.HasPrevTabstop = new fe("hasPrevTabstop", false, f(1445, null)); + } + constructor(e, t, s, n, r) { + this.k = e; + this.l = t; + this.m = s; + this.n = r; + this.f = new Q(); + this.g = -1; + this.a = are.InSnippetMode.bindTo(n); + this.b = are.HasNextTabstop.bindTo(n); + this.c = are.HasPrevTabstop.bindTo(n); + } + dispose() { + this.a.reset(); + this.c.reset(); + this.b.reset(); + this.d?.dispose(); + this.f.dispose(); + } + apply(e, t) { + try { + this.p(e, typeof t === "undefined" ? Jmt : { + ...Jmt, + ...t + }); + } catch (s) { + this.cancel(); + this.l.error(s); + this.l.error("snippet_error"); + this.l.error("insert_edits=", e); + this.l.error("existing_template=", this.d ? this.d._logInfo() : ""); + } + } + insert(e, t) { + try { + this.p(e, typeof t === "undefined" ? Jmt : { + ...Jmt, + ...t + }); + } catch (s) { + this.cancel(); + this.l.error(s); + this.l.error("snippet_error"); + this.l.error("insert_template=", e); + this.l.error("existing_template=", this.d ? this.d._logInfo() : ""); + } + } + p(e, t) { + if (this.k.hasModel()) { + this.f.clear(); + if (t.undoStopBefore) { + this.k.getModel().pushStackElement(); + } + if (this.d && typeof e != "string") { + this.cancel(); + } + if (this.d) { + yr(typeof e == "string"); + this.d.merge(e, t); + } else { + this.g = this.k.getModel().getAlternativeVersionId(); + this.d = new zmt(this.k, e, t, this.n); + this.d.insert(); + } + if (t.undoStopAfter) { + this.k.getModel().pushStackElement(); + } + if (this.d?.hasChoice) { + const s = { + _debugDisplayName: "snippetChoiceCompletions", + provideCompletionItems: (c, u) => { + if (!this.d || c !== this.k.getModel() || !je.equals(this.k.getPosition(), u)) { + return; + } + const { + activeChoice: d + } = this.d; + if (!d || d.choice.options.length === 0) { + return; + } + const h = c.getValueInRange(d.range); + const g = !!d.choice.options.find(b => b.value === h); + const p = []; + for (let b = 0; b < d.choice.options.length; b++) { + const v = d.choice.options[b]; + p.push({ + kind: 13, + label: v.value, + insertText: v.value, + sortText: "a".repeat(b + 1), + range: d.range, + filterText: g ? `${h}_${v.value}` : undefined, + command: { + id: "jumpToNextSnippetPlaceholder", + title: f(1446, null) + } + }); + } + return { + suggestions: p + }; + } + }; + const n = this.k.getModel(); + let r; + let o = false; + const a = () => { + r?.dispose(); + o = false; + }; + const l = () => { + if (!o) { + r = this.m.completionProvider.register({ + language: n.getLanguageId(), + pattern: n.uri.fsPath, + scheme: n.uri.scheme, + exclusive: true + }, s); + this.f.add(r); + o = true; + } + }; + this.j = { + provider: s, + enable: l, + disable: a + }; + } + this.q(); + this.f.add(this.k.onDidChangeModelContent(s => s.isFlush && this.cancel())); + this.f.add(this.k.onDidChangeModel(() => this.cancel())); + this.f.add(this.k.onDidChangeCursorSelection(() => this.q())); + } + } + q() { + if (!!this.d && !!this.k.hasModel()) { + if (this.g === this.k.getModel().getAlternativeVersionId()) { + return this.cancel(); + } + if (!this.d.hasPlaceholder) { + return this.cancel(); + } + if (this.d.isAtLastPlaceholder || !this.d.isSelectionWithinPlaceholders()) { + this.k.getModel().pushStackElement(); + return this.cancel(); + } + this.a.set(true); + this.c.set(!this.d.isAtFirstPlaceholder); + this.b.set(!this.d.isAtLastPlaceholder); + this.r(); + } + } + r() { + if (!this.d || !this.k.hasModel()) { + this.h = undefined; + return; + } + const { + activeChoice: e + } = this.d; + if (!e || !this.j) { + this.j?.disable(); + this.h = undefined; + return; + } + if (this.h !== e.choice) { + this.h = e.choice; + this.j.enable(); + queueMicrotask(() => { + U8s(this.k, this.j.provider); + }); + } + } + finish() { + while (this.a.get()) { + this.next(); + } + } + cancel(e = false) { + this.a.reset(); + this.c.reset(); + this.b.reset(); + this.f.clear(); + this.h = undefined; + this.d?.dispose(); + this.d = undefined; + this.g = -1; + if (e) { + this.k.setSelections([this.k.getSelection()]); + } + } + prev() { + this.d?.prev(); + this.q(); + } + next() { + this.d?.next(); + this.q(); + } + isInSnippet() { + return !!this.a.get(); + } + getSessionEnclosingRange() { + if (this.d) { + return this.d.getEnclosingRange(); + } + } +}; +Yh = are = __decorate([__param(1, Bt), __param(2, nn), __param(3, Ne), __param(4, Lu)], Yh); +bo(Yh.ID, Yh, 4); +var Gmt = Wm.bindToContribution(Yh.get); +Sn(new Gmt({ + id: "jumpToNextSnippetPlaceholder", + precondition: T.and(Yh.InSnippetMode, Yh.HasNextTabstop), + handler: i => i.next(), + kbOpts: { + weight: 130, + kbExpr: ke.textInputFocus, + primary: 2 + } +})); +Sn(new Gmt({ + id: "jumpToPrevSnippetPlaceholder", + precondition: T.and(Yh.InSnippetMode, Yh.HasPrevTabstop), + handler: i => i.prev(), + kbOpts: { + weight: 130, + kbExpr: ke.textInputFocus, + primary: 1026 + } +})); +Sn(new Gmt({ + id: "leaveSnippet", + precondition: Yh.InSnippetMode, + handler: i => i.cancel(true), + kbOpts: { + weight: 130, + kbExpr: ke.textInputFocus, + primary: 9, + secondary: [1033] + } +})); +Sn(new Gmt({ + id: "acceptSnippet", + precondition: Yh.InSnippetMode, + handler: i => i.finish() +})); +$i(); +yt(); +Jt(); +$i(); +Rs(); +yt(); +var Kmt = class { + constructor(i, e) { + this.lineNumber = i; + this.parts = e; + } + equals(i) { + return this.lineNumber === i.lineNumber && this.parts.length === i.parts.length && this.parts.every((e, t) => e.equals(i.parts[t])); + } + render(i, e = false) { + return new pO([...this.parts.map(t => new im(Z.fromPositions(new je(this.lineNumber, t.column)), e ? `[${t.lines.join(` +`)}]` : t.lines.join(` +`)))]).applyToString(i); + } + renderForScreenReader(i) { + if (this.parts.length === 0) { + return ""; + } + const e = this.parts[this.parts.length - 1]; + const t = i.substr(0, e.column - 1); + return new pO([...this.parts.map(n => new im(Z.fromPositions(new je(1, n.column)), n.lines.join(` +`)))]).applyToString(t).substring(this.parts[0].column - 1); + } + isEmpty() { + return this.parts.every(i => i.lines.length === 0); + } + get lineCount() { + return 1 + this.parts.reduce((i, e) => i + e.lines.length - 1, 0); + } +}; +var iei = class { + constructor(i, e, t) { + this.column = i; + this.text = e; + this.preview = t; + this.lines = Ov(this.text); + } + equals(i) { + return this.column === i.column && this.lines.length === i.lines.length && this.lines.every((e, t) => e === i.lines[t]); + } +}; +var sei = class { + constructor(i, e, t, s = 0) { + this.lineNumber = i; + this.columnRange = e; + this.text = t; + this.additionalReservedLineCount = s; + this.parts = [new iei(this.columnRange.endColumnExclusive, this.text, false)]; + this.newLines = Ov(this.text); + } + renderForScreenReader(i) { + return this.newLines.join(` +`); + } + render(i, e = false) { + const t = this.columnRange.toRange(this.lineNumber); + if (e) { + return new pO([new im(Z.fromPositions(t.getStartPosition()), "("), new im(Z.fromPositions(t.getEndPosition()), `)[${this.newLines.join(` +`)}]`)]).applyToString(i); + } else { + return new pO([new im(t, this.newLines.join(` +`))]).applyToString(i); + } + } + get lineCount() { + return this.newLines.length; + } + isEmpty() { + return this.parts.every(i => i.lines.length === 0); + } + equals(i) { + return this.lineNumber === i.lineNumber && this.columnRange.equals(i.columnRange) && this.newLines.length === i.newLines.length && this.newLines.every((e, t) => e === i.newLines[t]) && this.additionalReservedLineCount === i.additionalReservedLineCount; + } +}; +function n3s(i, e) { + return Go(i, e, r3s); +} +function r3s(i, e) { + if (i === e) { + return true; + } else if (!i || !e) { + return false; + } else if (i instanceof Kmt && e instanceof Kmt || i instanceof sei && e instanceof sei) { + return i.equals(e); + } else { + return false; + } +} +function o3s(i, e, t, s, n = 0) { + let r = ZU(i, e); + if (r.range.endLineNumber !== r.range.startLineNumber) { + return; + } + const o = e.getLineContent(r.range.startLineNumber); + const a = Jd(o).length; + if (r.range.startColumn - 1 <= a) { + const p = Jd(r.text).length; + const b = o.substring(r.range.startColumn - 1, a); + const [v, y] = [r.range.getStartPosition(), r.range.getEndPosition()]; + const w = v.column + b.length <= y.column ? v.delta(0, b.length) : y; + const C = Z.fromPositions(w, y); + const S = r.text.startsWith(b) ? r.text.substring(b.length) : r.text.substring(p); + r = new im(C, S); + } + const c = e.getValueInRange(r.range); + const u = Mvr(c, r.text); + if (!u) { + return; + } + const d = r.range.startLineNumber; + const h = new Array(); + if (t === "prefix") { + const p = u.filter(b => b.originalLength === 0); + if (p.length > 1 || p.length === 1 && p[0].originalStart !== c.length) { + return; + } + } + const g = r.text.length - n; + for (const p of u) { + const b = r.range.startColumn + p.originalStart + p.originalLength; + if (t === "subwordSmart" && s && s.lineNumber === r.range.startLineNumber && b < s.column || p.originalLength > 0) { + return; + } + if (p.modifiedLength === 0) { + continue; + } + const v = p.modifiedStart + p.modifiedLength; + const y = Math.max(p.modifiedStart, Math.min(v, g)); + const w = r.text.substring(p.modifiedStart, y); + const C = r.text.substring(y, Math.max(p.modifiedStart, v)); + if (w.length > 0) { + h.push(new iei(b, w, false)); + } + if (C.length > 0) { + h.push(new iei(b, C, true)); + } + } + return new Kmt(d, h); +} +var Ymt = undefined; +function Mvr(i, e) { + if (Ymt?.originalValue === i && Ymt?.newValue === e) { + return Ymt?.changes; + } + { + const t = performance.now(); + let s = l3s(i, e, true); + if (s) { + const n = a3s(s); + if (n > 0) { + const r = l3s(i, e, false); + if (r && a3s(r) < n) { + s = r; + } + } + } + Ymt = { + originalValue: i, + newValue: e, + changes: s + }; + return s; + } +} +function a3s(i) { + let e = 0; + for (const t of i) { + e += t.originalLength; + } + return e; +} +function l3s(i, e, t) { + if (i.length > 5000 || e.length > 5000) { + return; + } + function s(c) { + let u = 0; + for (let d = 0, h = c.length; d < h; d++) { + const g = c.charCodeAt(d); + if (g > u) { + u = g; + } + } + return u; + } + const n = Math.max(s(i), s(e)); + function r(c) { + if (c < 0) { + throw new Error("unexpected"); + } + return n + c + 1; + } + function o(c) { + let u = 0; + let d = 0; + const h = new Int32Array(c.length); + for (let g = 0, p = c.length; g < p; g++) { + if (t && c[g] === "(") { + const b = d * 100 + u; + h[g] = r(b * 2); + u++; + } else if (t && c[g] === ")") { + u = Math.max(u - 1, 0); + const b = d * 100 + u; + h[g] = r(b * 2 + 1); + if (u === 0) { + d++; + } + } else { + h[g] = c.charCodeAt(g); + } + } + return h; + } + const a = o(i); + const l = o(e); + return new g0e({ + getElements: () => a + }, { + getElements: () => l + }).ComputeDiff(false).changes; +} +var Avr = class { + constructor(i, e, t, s, n) { + this.edit = i; + this.isCollapsed = e; + this.renderExplicitly = t; + this.commands = s; + this.inlineCompletion = n; + } + get range() { + return this.edit.range; + } + get text() { + return this.edit.text; + } + equals(i) { + return this.edit.equals(i.edit) && this.isCollapsed === i.isCollapsed && this.renderExplicitly === i.renderExplicitly && this.inlineCompletion === i.inlineCompletion; + } +}; +var nei = class extends H { + get isAcceptingPartially() { + return this.t; + } + constructor(e, t, s, n, r, o, a, l, c, u) { + super(); + this.textModel = e; + this.G = t; + this._textModelVersionId = s; + this.H = n; + this.I = r; + this.J = o; + this.L = a; + this.M = l; + this.N = c; + this.O = u; + this.f = this.D(this.M.createInstance(ZZt, this.textModel, this._textModelVersionId, this.I)); + this.g = un(this, false); + this.h = AI(this); + this.j = AI(this); + this.isHidden = un(this, false); + this.n = un(this, undefined); + this.q = Is(this, h => this.H.read(h)[0] ?? new je(1, 1)); + this.t = false; + this.u = ay(this.L); + this.w = this.u.getOption(64).map(h => !!h.edits.experimental.onlyShowWhenCloseToCursor); + this.y = this.u.getOption(123).map(h => h.preview); + this.z = this.u.getOption(123).map(h => h.previewMode); + this.C = this.u.getOption(64).map(h => h.mode); + this.F = this.u.getOption(64).map(h => !!h.edits.experimental?.enabled); + this.P = new Set([z5.Redo, z5.Undo, z5.AcceptWord]); + this.dontRefetchSignal = AI(this); + this.R = ZGn({ + owner: this, + createEmptyChangeSummary: () => ({ + dontRefetch: false, + preserveCurrentCompletion: false, + inlineCompletionTriggerKind: kM.Automatic, + onlyRequestInlineEdits: false + }), + handleChange: (h, g) => { + if (h.didChange(this._textModelVersionId) && this.P.has(this.Q(h.change))) { + g.preserveCurrentCompletion = true; + } else if (h.didChange(this.j)) { + g.inlineCompletionTriggerKind = kM.Explicit; + } else if (h.didChange(this.dontRefetchSignal)) { + g.dontRefetch = true; + } else if (h.didChange(this.h)) { + g.onlyRequestInlineEdits = true; + } + return true; + } + }, (h, g) => { + this.dontRefetchSignal.read(h); + this.h.read(h); + this.j.read(h); + if ((!this.J.read(h) || !this.G.read(h)) && !this.g.read(h)) { + this.f.cancelUpdate(); + return; + } + this._textModelVersionId.read(h); + const b = this.f.suggestWidgetInlineCompletions.get(); + const v = this.G.read(h); + if (b && !v) { + const x = this.f.inlineCompletions.get(); + Io(k => { + if (!x || b.request.versionId > x.request.versionId) { + this.f.inlineCompletions.set(b.clone(), k); + } + this.f.clearSuggestWidgetInlineCompletions(k); + }); + } + const y = this.q.get(); + if (g.dontRefetch) { + return Promise.resolve(true); + } + const w = { + triggerKind: g.inlineCompletionTriggerKind, + selectedSuggestionInfo: v?.toSelectedSuggestionInfo(), + includeInlineCompletions: !g.onlyRequestInlineEdits, + includeInlineEdits: this.F.read(h) + }; + const C = this.selectedInlineCompletion.get(); + const S = g.preserveCurrentCompletion || C?.forwardStable ? C : undefined; + return this.f.fetch(y, w, S); + }); + this.S = un(this, undefined); + this.U = Uy({ + owner: this + }, h => { + const g = this.f.inlineCompletions.read(h); + if (!g) { + return; + } + const p = this.q.read(h); + let b; + const v = []; + for (const y of g.inlineCompletions) { + if (y.inlineCompletion.sourceInlineCompletion.isInlineEdit) { + b = y; + } else if (y.isVisible(this.textModel, p, h)) { + v.push(y); + } + } + if (v.length !== 0) { + b = undefined; + } + return { + inlineCompletions: v, + inlineEdit: b + }; + }); + this.W = Uy({ + owner: this, + equalsFn: Wat() + }, h => this.isHidden.get() ? [] : this.U.read(h)?.inlineCompletions ?? []); + this.selectedInlineCompletionIndex = Is(this, h => { + const g = this.n.read(h); + const p = this.W.read(h); + const b = this.n === undefined ? -1 : p.findIndex(v => v.semanticId === g); + if (b === -1) { + this.n.set(undefined, undefined); + return 0; + } else { + return b; + } + }); + this.selectedInlineCompletion = Is(this, h => { + const g = this.W.read(h); + const p = this.selectedInlineCompletionIndex.read(h); + return g[p]; + }); + this.activeCommands = Uy({ + owner: this, + equalsFn: Wat() + }, h => this.selectedInlineCompletion.read(h)?.inlineCompletion.source.inlineCompletions.commands ?? []); + this.lastTriggerKind = this.f.inlineCompletions.map(this, h => h?.request.context.triggerKind); + this.inlineCompletionsCount = Is(this, h => { + if (this.lastTriggerKind.read(h) === kM.Explicit) { + return this.W.read(h).length; + } + }); + this.state = Uy({ + owner: this, + equalsFn: (h, g) => !h || !g ? h === g : h.kind === "ghostText" && g.kind === "ghostText" ? n3s(h.ghostTexts, g.ghostTexts) && h.inlineCompletion === g.inlineCompletion && h.suggestItem === g.suggestItem : h.kind === "inlineEdit" && g.kind === "inlineEdit" ? h.inlineEdit.equals(g.inlineEdit) && h.cursorAtInlineEdit === g.cursorAtInlineEdit : false + }, h => { + const g = this.textModel; + const p = this.U.read(h); + if (p?.inlineEdit) { + let v = p.inlineEdit.toSingleTextEdit(h); + v = ZU(v, g); + const y = this.q.read(h); + const w = or.fromRangeInclusive(v.range).addMargin(1, 1).contains(y.lineNumber); + const C = or.fromRange(v.range).distanceToLine(this.q.read(h).lineNumber); + if (this.w.read(h) && C > 3 && !p.inlineEdit.request.isExplicitRequest && !this.bb.read(h)) { + return; + } + const x = !true && C > 1 && this.S.read(h) === p.inlineEdit.semanticId; + const k = p.inlineEdit.inlineCompletion.source.inlineCompletions.commands; + const E = this.ab.read(h); + return { + kind: "inlineEdit", + inlineEdit: new Avr(v, x, E, k ?? [], p.inlineEdit.inlineCompletion), + inlineCompletion: p.inlineEdit, + edits: [v], + cursorAtInlineEdit: w + }; + } + this.ab.set(false, undefined); + const b = this.G.read(h); + if (b) { + const v = ZU(b.toSingleTextEdit(), g); + const y = this.X(v, h); + if (!this.y.read(h) && !y) { + return; + } + const C = y?.edit ?? v; + const S = y ? y.edit.text.length - v.text.length : 0; + const x = this.z.read(h); + const k = this.H.read(h); + const E = [C, ...rei(this.textModel, k, C)]; + const D = E.map((R, L) => o3s(R, g, x, k[L], S)).filter(to); + const P = D[0] ?? new Kmt(C.range.endLineNumber, []); + return { + kind: "ghostText", + edits: E, + primaryGhostText: P, + ghostTexts: D, + inlineCompletion: y?.completion, + suggestItem: b + }; + } else { + if (!this.g.read(h)) { + return; + } + const v = this.selectedInlineCompletion.read(h); + if (!v) { + return; + } + const y = v.toSingleTextEdit(h); + const w = this.C.read(h); + const C = this.H.read(h); + const S = [y, ...rei(this.textModel, C, y)]; + const x = S.map((k, E) => o3s(k, g, w, C[E], 0)).filter(to); + if (x[0]) { + return { + kind: "ghostText", + edits: S, + primaryGhostText: x[0], + ghostTexts: x, + inlineCompletion: v, + suggestItem: undefined + }; + } else { + return undefined; + } + } + }); + this.status = Is(this, h => { + if (this.f.loading.read(h)) { + return "loading"; + } + const g = this.state.read(h); + if (g?.kind === "ghostText") { + return "ghostText"; + } else if (g?.kind === "inlineEdit") { + return "inlineEdit"; + } else { + return "noSuggestion"; + } + }); + this.inlineCompletionState = Is(h => { + const g = this.state.read(h); + if (!!g && g.kind === "ghostText" && !this.u.inComposition.read(h)) { + return g; + } + }); + this.inlineEditState = Is(h => { + const g = this.state.read(h); + if (!!g && g.kind === "inlineEdit") { + return g; + } + }); + this.inlineEditAvailable = Is(h => !!this.inlineEditState.read(h)); + this.ghostTexts = Uy({ + owner: this, + equalsFn: n3s + }, h => { + const g = this.inlineCompletionState.read(h); + if (g) { + return g.ghostTexts; + } + }); + this.primaryGhostText = Uy({ + owner: this, + equalsFn: r3s + }, h => { + const g = this.inlineCompletionState.read(h); + if (g) { + return g?.primaryGhostText; + } + }); + this.Y = Is(this, h => { + function g(v) { + return v.startLineNumber !== v.endLineNumber; + } + function p(v, y) { + const w = v.getLineIndentColumn(y); + const C = v.getLineLastNonWhitespaceColumn(y); + const S = Math.max(C, w); + return new Z(y, w, y, S); + } + return this.u.selections.read(h)?.some(v => v.isEmpty() ? this.textModel.getLineLength(v.startLineNumber) === 0 : g(v) || v.containsRange(p(this.textModel, v.startLineNumber))); + }); + this.tabShouldJumpToInlineEdit = Is(this, h => { + if (this.Y.read(h)) { + return false; + } + const g = this.inlineEditState.read(h); + if (g) { + return !g.cursorAtInlineEdit; + } else { + return false; + } + }); + this.tabShouldAcceptInlineEdit = Is(this, h => { + if (this.ab.read(h)) { + return true; + } + if (this.Y.read(h)) { + return false; + } + const g = this.inlineEditState.read(h); + if (g) { + return g.cursorAtInlineEdit; + } else { + return false; + } + }); + this.ab = un(this, false); + this.bb = un(this, false); + this.D($te(this.R)); + let d; + this.D(Dn(h => { + const p = this.inlineCompletionState.read(h)?.inlineCompletion; + if (p?.semanticId !== d?.semanticId && (d = p, p)) { + const b = p.inlineCompletion; + const v = b.source; + v.provider.handleItemDidShow?.(v.inlineCompletions, b.sourceInlineCompletion, b.insertText); + } + })); + this.D(Dn(h => { + this.u.versionId.read(h); + this.bb.set(false, undefined); + })); + } + debugGetSelectedSuggestItem() { + return this.G; + } + getIndentationInfo(e) { + let t = false; + let s = true; + const n = this?.primaryGhostText.read(e); + if (this?.G && n && n.parts.length > 0) { + const { + column: r, + lines: o + } = n.parts[0]; + const a = o[0]; + const l = this.textModel.getLineIndentColumn(n.lineNumber); + if (r <= l) { + let u = B0(a); + if (u === -1) { + u = a.length - 1; + } + t = u > 0; + const d = this.textModel.getOptions().tabSize; + s = pp.visibleColumnFromColumn(a, u + 1, d) < d; + } + } + return { + startsWithIndentation: t, + startsWithIndentationLessThanTabSize: s + }; + } + Q(e) { + if (e?.isUndoing) { + return z5.Undo; + } else if (e?.isRedoing) { + return z5.Redo; + } else if (this.isAcceptingPartially) { + return z5.AcceptWord; + } else { + return z5.Other; + } + } + async trigger(e, t = false) { + Lte(e, s => { + if (t) { + this.h.trigger(s); + } + this.g.set(true, s); + }); + await this.R.get(); + } + async triggerExplicitly(e, t = false) { + Lte(e, s => { + if (t) { + this.h.trigger(s); + } + this.g.set(true, s); + this.j.trigger(s); + }); + await this.R.get(); + } + stop(e = "automatic", t) { + Lte(t, s => { + if (e === "explicitCancel") { + const n = this.state.get()?.inlineCompletion?.inlineCompletion; + if (n && n.source.provider.handleRejection) { + n.source.provider.handleRejection(n.source.inlineCompletions, n.sourceInlineCompletion); + } + } + this.g.set(false, s); + this.f.clear(s); + }); + } + collapseInlineEdit() { + const e = this.inlineEditState.get()?.inlineCompletion; + if (e) { + this.S.set(e.semanticId, undefined); + } + } + X(e, t) { + const s = this.textModel; + const n = this.f.suggestWidgetInlineCompletions.read(t); + const r = n ? n.inlineCompletions : [this.selectedInlineCompletion.read(t)].filter(to); + return hnt(r, a => { + let l = a.toSingleTextEdit(t); + l = ZU(l, s, Z.fromPositions(l.range.getStartPosition(), e.range.getEndPosition())); + if (z8s(l, e)) { + return { + completion: a, + edit: l + }; + } else { + return undefined; + } + }); + } + async Z(e) { + await this.triggerExplicitly(); + const t = this.W.get() || []; + if (t.length > 0) { + const s = (this.selectedInlineCompletionIndex.get() + e + t.length) % t.length; + this.n.set(t[s].semanticId, undefined); + } else { + this.n.set(undefined, undefined); + } + } + async next() { + await this.Z(1); + } + async previous() { + await this.Z(-1); + } + async accept(e) { + if (e.getModel() !== this.textModel) { + throw new co(); + } + let t; + const s = this.state.get(); + if (s?.kind === "ghostText") { + if (!s || s.primaryGhostText.isEmpty() || !s.inlineCompletion) { + return; + } + t = s.inlineCompletion.toInlineCompletion(undefined); + } else if (s?.kind === "inlineEdit") { + t = s.inlineCompletion.toInlineCompletion(undefined); + } else { + return; + } + if (t.command) { + t.source.addRef(); + } + e.pushUndoStop(); + if (t.snippetInfo) { + e.executeEdits("inlineSuggestion.accept", [Ua.replace(t.range, ""), ...t.additionalTextEdits]); + e.setPosition(t.snippetInfo.range.getStartPosition(), "inlineCompletionAccept"); + Yh.get(e)?.insert(t.snippetInfo.snippet, { + undoStopBefore: false + }); + } else { + const n = s.edits; + const r = V8s(n).map(o => Vs.fromPositions(o)); + e.executeEdits("inlineSuggestion.accept", [...n.map(o => Ua.replace(o.range, o.text)), ...t.additionalTextEdits]); + e.setSelections(r, "inlineCompletionAccept"); + } + this.stop(); + if (t.command) { + await this.N.executeCommand(t.command.id, ...(t.command.arguments || [])).then(undefined, uh); + t.source.removeRef(); + } + this.bb.set(true, undefined); + } + async acceptNextWord(e) { + await this.$(e, (t, s) => { + const n = this.textModel.getLanguageIdAtPosition(t.lineNumber, t.column); + const r = this.O.getLanguageConfiguration(n); + const o = new RegExp(r.wordDefinition.source, r.wordDefinition.flags.replace("g", "")); + const a = s.match(o); + let l = 0; + if (a && a.index !== undefined) { + if (a.index === 0) { + l = a[0].length; + } else { + l = a.index; + } + } else { + l = s.length; + } + const u = /\s+/g.exec(s); + if (u && u.index !== undefined && u.index + u[0].length < l) { + l = u.index + u[0].length; + } + return l; + }, 0); + } + async acceptNextLine(e) { + await this.$(e, (t, s) => { + const n = s.match(/\n/); + if (n && n.index !== undefined) { + return n.index + 1; + } else { + return s.length; + } + }, 1); + } + async clearCopilotSuggestions() { + Io(e => { + this.f.clear(e); + }); + } + async $(e, t, s) { + if (e.getModel() !== this.textModel) { + throw new co(); + } + const n = this.inlineCompletionState.get(); + if (!n || n.primaryGhostText.isEmpty() || !n.inlineCompletion) { + return; + } + const r = n.primaryGhostText; + const o = n.inlineCompletion.toInlineCompletion(undefined); + if (o.snippetInfo || o.filterText !== o.insertText) { + await this.accept(e); + return; + } + const a = r.parts[0]; + const l = new je(r.lineNumber, a.column); + const c = a.text; + const u = t(l, c); + if (u === c.length && r.parts.length === 1) { + this.accept(e); + return; + } + const d = c.substring(0, u); + const h = this.H.get(); + const g = h[0]; + o.source.addRef(); + try { + this.t = true; + try { + e.pushUndoStop(); + const p = Z.fromPositions(g, l); + const b = e.getModel().getValueInRange(p) + d; + const v = new im(p, b); + const y = [v, ...rei(this.textModel, h, v)]; + const w = V8s(y).map(C => Vs.fromPositions(C)); + e.executeEdits("inlineSuggestion.accept", y.map(C => Ua.replace(C.range, C.text))); + e.setSelections(w, "inlineCompletionPartialAccept"); + e.revealPositionInCenterIfOutsideViewport(e.getPosition(), 1); + } finally { + this.t = false; + } + if (o.source.provider.handlePartialAccept) { + const p = Z.fromPositions(o.range.getStartPosition(), qv.ofText(d).addToPosition(l)); + const b = e.getModel().getValueInRange(p, 1); + o.source.provider.handlePartialAccept(o.source.inlineCompletions, o.sourceInlineCompletion, b.length, { + kind: s + }); + } + } finally { + o.source.removeRef(); + } + } + handleSuggestAccepted(e) { + const t = ZU(e.toSingleTextEdit(), this.textModel); + const s = this.X(t, undefined); + if (!s) { + return; + } + const n = s.completion.inlineCompletion; + n.source.provider.handlePartialAccept?.(n.source.inlineCompletions, n.sourceInlineCompletion, t.text.length, { + kind: 2 + }); + } + extractReproSample() { + const e = this.textModel.getValue(); + const t = this.state.get()?.inlineCompletion?.toInlineCompletion(undefined); + return { + documentValue: e, + inlineCompletion: t?.sourceInlineCompletion + }; + } + jump() { + const e = this.inlineEditState.get(); + if (e) { + Io(t => { + this.ab.set(true, t); + this.dontRefetchSignal.trigger(t); + this.L.setPosition(e.inlineEdit.range.getStartPosition(), "inlineCompletions.jump"); + this.L.revealLine(e.inlineEdit.range.startLineNumber); + this.L.focus(); + }); + } + } + async handleInlineCompletionShown(e) { + if (e.shownCommand) { + if (!e.didShow) { + e.markAsShown(); + await this.N.executeCommand(e.shownCommand.id, ...(e.shownCommand.arguments || [])); + } + } + } +}; +nei = __decorate([__param(7, re), __param(8, gt), __param(9, Lu)], nei); +var z5; +(function (i) { + i[i.Undo = 0] = "Undo"; + i[i.Redo = 1] = "Redo"; + i[i.AcceptWord = 2] = "AcceptWord"; + i[i.Other = 3] = "Other"; +})(z5 ||= {}); +function rei(i, e, t) { + if (e.length === 1) { + return []; + } + const s = e[0]; + const n = e.slice(1); + const r = t.range.getStartPosition(); + const o = t.range.getEndPosition(); + const a = i.getValueInRange(Z.fromPositions(s, o)); + const l = W8s(s, r); + if (l.lineNumber < 1) { + xs(new co(`positionWithinTextEdit line number should be bigger than 0. + Invalid subtraction between ${s.toString()} and ${r.toString()}`)); + return []; + } + const c = mvr(t.text, l); + return n.map(u => { + const d = pvr(W8s(u, r), o); + const h = i.getValueInRange(Z.fromPositions(u, d)); + const g = LL(a, h); + const p = Z.fromPositions(u, u.delta(0, g)); + return new im(p, c); + }); +} +Jt(); +qg(); +pe(); +q(); +Rs(); +yt(); +Eo(); +JT(); +wc(); +Jt(); +ri(); +Ut(); +pe(); +wI(); +q(); +rt(); +fd(); +zt(); +en(); +ef(); +Rs(); +yt(); +Sr(); +JT(); +nt(); +q(); +In(); +HI(); +Eo(); +Me(); +It(); +te(); +qt(); +var U0e; +var oei = class { + constructor(i) { + this.name = i; + } + select(i, e, t) { + if (t.length === 0) { + return 0; + } + const s = t[0].score[0]; + for (let n = 0; n < t.length; n++) { + const { + score: r, + completion: o + } = t[n]; + if (r[0] !== s) { + break; + } + if (o.preselect) { + return n; + } + } + return 0; + } +}; +var c3s = class extends oei { + constructor() { + super("first"); + } + memorize(i, e, t) {} + toJSON() {} + fromJSON() {} +}; +var $vr = class extends oei { + constructor() { + super("recentlyUsed"); + this.c = new vc(300, 0.66); + this.d = 0; + } + memorize(i, e, t) { + const s = `${i.getLanguageId()}/${t.textLabel}`; + this.c.set(s, { + touch: this.d++, + type: t.completion.kind, + insertText: t.completion.insertText + }); + } + select(i, e, t) { + if (t.length === 0) { + return 0; + } + const s = i.getLineContent(e.lineNumber).substr(e.column - 10, e.column - 1); + if (/\s$/.test(s)) { + return super.select(i, e, t); + } + const n = t[0].score[0]; + let r = -1; + let o = -1; + let a = -1; + for (let l = 0; l < t.length && t[l].score[0] === n; l++) { + const c = `${i.getLanguageId()}/${t[l].textLabel}`; + const u = this.c.peek(c); + if (u && u.touch > a && u.type === t[l].completion.kind && u.insertText === t[l].completion.insertText) { + a = u.touch; + o = l; + } + if (t[l].completion.preselect && r === -1) { + return r = l; + } + } + if (o !== -1) { + return o; + } else if (r !== -1) { + return r; + } else { + return 0; + } + } + toJSON() { + return this.c.toJSON(); + } + fromJSON(i) { + this.c.clear(); + const e = 0; + for (const [t, s] of i) { + s.touch = e; + s.type = typeof s.type == "number" ? s.type : Cte.fromString(s.type); + this.c.set(t, s); + } + this.d = this.c.size; + } +}; +var Fvr = class extends oei { + constructor() { + super("recentlyUsedByPrefix"); + this.c = Ww.forStrings(); + this.d = 0; + } + memorize(i, e, t) { + const { + word: s + } = i.getWordUntilPosition(e); + const n = `${i.getLanguageId()}/${s}`; + this.c.set(n, { + type: t.completion.kind, + insertText: t.completion.insertText, + touch: this.d++ + }); + } + select(i, e, t) { + const { + word: s + } = i.getWordUntilPosition(e); + if (!s) { + return super.select(i, e, t); + } + const n = `${i.getLanguageId()}/${s}`; + let r = this.c.get(n); + r ||= this.c.findSubstr(n); + if (r) { + for (let o = 0; o < t.length; o++) { + const { + kind: a, + insertText: l + } = t[o].completion; + if (a === r.type && l === r.insertText) { + return o; + } + } + } + return super.select(i, e, t); + } + toJSON() { + const i = []; + this.c.forEach((e, t) => i.push([t, e])); + i.sort((e, t) => -(e[1].touch - t[1].touch)).forEach((e, t) => e[1].touch = t); + return i.slice(0, 200); + } + fromJSON(i) { + this.c.clear(); + if (i.length > 0) { + this.d = i[0][1].touch + 1; + for (const [e, t] of i) { + t.type = typeof t.type == "number" ? t.type : Cte.fromString(t.type); + this.c.set(e, t); + } + } + } +}; +var aei = class { + static { + U0e = this; + } + static { + this.c = new Map([["recentlyUsedByPrefix", Fvr], ["recentlyUsed", $vr], ["first", c3s]]); + } + static { + this.d = "suggest/memories"; + } + constructor(e, t) { + this.j = e; + this.k = t; + this.g = new Q(); + this.f = new Vn(() => this.m(), 500); + this.g.add(e.onWillSaveState(s => { + if (s.reason === HT.SHUTDOWN) { + this.m(); + } + })); + } + dispose() { + this.g.dispose(); + this.f.dispose(); + } + memorize(e, t, s) { + this.l(e, t).memorize(e, t, s); + this.f.schedule(); + } + select(e, t, s) { + return this.l(e, t).select(e, t, s); + } + l(e, t) { + const s = this.k.getValue("editor.suggestSelection", { + overrideIdentifier: e.getLanguageIdAtPosition(t.lineNumber, t.column), + resource: e.uri + }); + if (this.h?.name !== s) { + this.m(); + const n = U0e.c.get(s) || c3s; + this.h = new n(); + try { + const o = this.k.getValue("editor.suggest.shareSuggestSelections") ? 0 : 1; + const a = this.j.get(`${U0e.d}/${s}`, o); + if (a) { + this.h.fromJSON(JSON.parse(a)); + } + } catch {} + } + return this.h; + } + m() { + if (this.h) { + const t = this.k.getValue("editor.suggest.shareSuggestSelections") ? 0 : 1; + const s = JSON.stringify(this.h); + this.j.store(`${U0e.d}/${this.h.name}`, s, t, 1); + } + } +}; +aei = U0e = __decorate([__param(0, ht), __param(1, ve)], aei); +var Xmt = Ve("ISuggestMemories"); +it(Xmt, aei, 1); +Ee(); +var lei; +var Qmt = class { + static { + lei = this; + } + static { + this.AtEnd = new fe("atEndOfWord", false); + } + constructor(e, t) { + this.f = e; + this.c = false; + this.a = lei.AtEnd.bindTo(t); + this.b = this.f.onDidChangeConfiguration(s => s.hasChanged(128) && this.g()); + this.g(); + } + dispose() { + this.b.dispose(); + this.d?.dispose(); + this.a.reset(); + } + g() { + const e = this.f.getOption(128) === "on"; + if (this.c !== e) { + this.c = e; + if (this.c) { + const t = () => { + if (!this.f.hasModel()) { + this.a.set(false); + return; + } + const s = this.f.getModel(); + const n = this.f.getSelection(); + const r = s.getWordAtPosition(n.getStartPosition()); + if (!r) { + this.a.set(false); + return; + } + this.a.set(r.endColumn === n.getStartPosition().column); + }; + this.d = this.f.onDidChangeCursorSelection(t); + t(); + } else if (this.d) { + this.a.reset(); + this.d.dispose(); + this.d = undefined; + } + } + } +}; +Qmt = lei = __decorate([__param(1, Ne)], Qmt); +X(); +Wt(); +Ee(); +te(); +Zt(); +Ee(); +var W0e; +var lre = class { + static { + W0e = this; + } + static { + this.OtherSuggestions = new fe("hasOtherSuggestions", false); + } + constructor(e, t) { + this.g = e; + this.b = 0; + this.a = W0e.OtherSuggestions.bindTo(t); + } + dispose() { + this.reset(); + } + reset() { + this.a.reset(); + this.e?.dispose(); + this.c = undefined; + this.d = undefined; + this.f = false; + } + set({ + model: e, + index: t + }, s) { + if (e.items.length === 0) { + this.reset(); + return; + } + if (W0e.h(true, e, t) === t) { + this.reset(); + return; + } + this.d = s; + this.c = e; + this.b = t; + this.e = this.g.onDidChangeCursorPosition(() => { + if (!this.f) { + this.reset(); + } + }); + this.a.set(true); + } + static h(e, t, s) { + let n = s; + for (let r = t.items.length; r > 0 && (n = (n + t.items.length + (e ? 1 : -1)) % t.items.length, n !== s && !!t.items[n].completion.additionalTextEdits); r--); + return n; + } + next() { + this.i(true); + } + prev() { + this.i(false); + } + i(e) { + if (this.c) { + try { + this.f = true; + this.b = W0e.h(e, this.c, this.b); + this.d({ + index: this.b, + item: this.c.items[this.b], + model: this.c + }); + } finally { + this.f = false; + } + } + } +}; +lre = W0e = __decorate([__param(1, Ne)], lre); +Jt(); +q(); +Ree(); +var Ovr = class { + constructor(i, e, t, s, n) { + this.a = new Q(); + this.a.add(s.onDidSuggest(r => { + if (r.completionModel.items.length === 0) { + this.reset(); + } + })); + this.a.add(s.onDidCancel(r => { + this.reset(); + })); + this.a.add(t.onDidShow(() => this.c(t.getFocusedItem()))); + this.a.add(t.onDidFocus(this.c, this)); + this.a.add(t.onDidHide(this.reset, this)); + this.a.add(i.onWillType(r => { + if (this.b && !t.isFrozen() && s.state !== 0) { + const o = r.charCodeAt(r.length - 1); + if (this.b.acceptCharacters.has(o) && i.getOption(0)) { + n(this.b.item); + } + } + })); + } + c(i) { + if (!i || !Ac(i.item.completion.commitCharacters)) { + this.reset(); + return; + } + if (this.b && this.b.item.item === i.item) { + return; + } + const e = new Sge(); + for (const t of i.item.completion.commitCharacters) { + if (t.length > 0) { + e.add(t.charCodeAt(0)); + } + } + this.b = { + acceptCharacters: e, + item: i + }; + } + reset() { + this.b = undefined; + } + dispose() { + this.a.dispose(); + } +}; +nt(); +ri(); +Ut(); +pe(); +q(); +$i(); +ua(); +Jt(); +yt(); +Av(); +Rs(); +yt(); +var u3s = class bB { + async provideSelectionRanges(e, t) { + const s = []; + for (const n of t) { + const r = []; + s.push(r); + const o = new Map(); + await new Promise(a => bB.b(a, 0, e, n, o)); + await new Promise(a => bB.c(a, 0, e, n, o, r)); + } + return s; + } + static { + this._maxDuration = 30; + } + static { + this.a = 2; + } + static b(e, t, s, n, r) { + const o = new Map(); + const a = Date.now(); + while (true) { + if (t >= bB.a) { + e(); + break; + } + if (!n) { + e(); + break; + } + const l = s.bracketPairs.findNextBracket(n); + if (!l) { + e(); + break; + } + if (Date.now() - a > bB._maxDuration) { + setTimeout(() => bB.b(e, t + 1, s, n, r)); + break; + } + if (l.bracketInfo.isOpeningBracket) { + const u = l.bracketInfo.bracketText; + const d = o.has(u) ? o.get(u) : 0; + o.set(u, d + 1); + } else { + const u = l.bracketInfo.getOpeningBrackets()[0].bracketText; + let d = o.has(u) ? o.get(u) : 0; + d -= 1; + o.set(u, Math.max(0, d)); + if (d < 0) { + let h = r.get(u); + if (!h) { + h = new hp(); + r.set(u, h); + } + h.push(l.range); + } + } + n = l.range.getEndPosition(); + } + } + static c(e, t, s, n, r, o) { + const a = new Map(); + const l = Date.now(); + while (true) { + if (t >= bB.a && r.size === 0) { + e(); + break; + } + if (!n) { + e(); + break; + } + const c = s.bracketPairs.findPrevBracket(n); + if (!c) { + e(); + break; + } + if (Date.now() - l > bB._maxDuration) { + setTimeout(() => bB.c(e, t + 1, s, n, r, o)); + break; + } + if (c.bracketInfo.isOpeningBracket) { + const d = c.bracketInfo.bracketText; + let h = a.has(d) ? a.get(d) : 0; + h -= 1; + a.set(d, Math.max(0, h)); + if (h < 0) { + const g = r.get(d); + if (g) { + const p = g.shift(); + if (g.size === 0) { + r.delete(d); + } + const b = Z.fromPositions(c.range.getEndPosition(), p.getStartPosition()); + const v = Z.fromPositions(c.range.getStartPosition(), p.getEndPosition()); + o.push({ + range: b + }); + o.push({ + range: v + }); + bB.e(s, v, o); + } + } + } else { + const d = c.bracketInfo.getOpeningBrackets()[0].bracketText; + const h = a.has(d) ? a.get(d) : 0; + a.set(d, h + 1); + } + n = c.range.getStartPosition(); + } + } + static e(e, t, s) { + if (t.startLineNumber === t.endLineNumber) { + return; + } + const n = t.startLineNumber; + const r = e.getLineFirstNonWhitespaceColumn(n); + if (r !== 0 && r !== t.startColumn) { + s.push({ + range: Z.fromPositions(new je(n, r), t.getEndPosition()) + }); + s.push({ + range: Z.fromPositions(new je(n, 1), t.getEndPosition()) + }); + } + const o = n - 1; + if (o > 0) { + const a = e.getLineFirstNonWhitespaceColumn(o); + if (a === t.startColumn && a !== e.getLineLastNonWhitespaceColumn(o)) { + s.push({ + range: Z.fromPositions(new je(o, a), t.getEndPosition()) + }); + s.push({ + range: Z.fromPositions(new je(o, 1), t.getEndPosition()) + }); + } + } + } +}; +var d3s = class oq { + static { + this.None = new class extends oq { + distance() { + return 0; + } + }(); + } + static async create(e, t) { + if (!t.getOption(123).localityBonus || !t.hasModel()) { + return oq.None; + } + const s = t.getModel(); + const n = t.getPosition(); + if (!e.canComputeWordRanges(s.uri)) { + return oq.None; + } + const [r] = await new u3s().provideSelectionRanges(s, [n]); + if (r.length === 0) { + return oq.None; + } + const o = await e.computeWordRanges(s.uri, r[0].range); + if (!o) { + return oq.None; + } + const a = s.getWordUntilPosition(n); + delete o[a.word]; + return new class extends oq { + distance(l, c) { + if (!n.equals(t.getPosition())) { + return 0; + } + if (c.kind === 17) { + return 2097152; + } + const u = typeof c.label == "string" ? c.label : c.label.label; + const d = o[u]; + if (mnt(d)) { + return 2097152; + } + const h = LB(d, Z.fromPositions(l), Z.compareRangesUsingStarts); + const g = h >= 0 ? d[h] : d[Math.max(0, ~h - 1)]; + let p = r.length; + for (const b of r) { + if (!Z.containsRange(b.range, g)) { + break; + } + p -= 1; + } + return p; + } + }(); + } +}; +Xa(); +Me(); +Ee(); +Zt(); +ai(); +Jt(); +Pc(); +$i(); +var h3s = class { + constructor(i, e) { + this.leadingLineContent = i; + this.characterCountDelta = e; + } +}; +var f3s; +(function (i) { + i[i.Nothing = 0] = "Nothing"; + i[i.All = 1] = "All"; + i[i.Incr = 2] = "Incr"; +})(f3s ||= {}); +var g3s = class ihe { + constructor(e, t, s, n, r, o, a = Cme.default, l = undefined) { + this.clipboardText = l; + this.g = ihe.q; + this.c = e; + this.d = t; + this.e = n; + this.f = r; + this.k = 1; + this.j = s; + this.h = a; + if (o === "top") { + this.g = ihe.s; + } else if (o === "bottom") { + this.g = ihe.r; + } + } + get lineContext() { + return this.j; + } + set lineContext(e) { + if (this.j.leadingLineContent !== e.leadingLineContent || this.j.characterCountDelta !== e.characterCountDelta) { + this.k = this.j.characterCountDelta < e.characterCountDelta && this.l ? 2 : 1; + this.j = e; + } + } + get items() { + this.o(); + return this.l; + } + getItemsByProvider() { + this.o(); + return this.m; + } + getIncompleteProvider() { + this.o(); + const e = new Set(); + for (const [t, s] of this.getItemsByProvider()) { + if (s.length > 0 && s[0].container.incomplete) { + e.add(t); + } + } + return e; + } + get stats() { + this.o(); + return this.n; + } + o() { + if (this.k !== 0) { + this.p(); + } + } + p() { + this.m = new Map(); + const e = []; + const { + leadingLineContent: t, + characterCountDelta: s + } = this.j; + let n = ""; + let r = ""; + const o = this.k === 1 ? this.c : this.l; + const a = []; + const l = !this.f.filterGraceful || o.length > 2000 ? U4 : Tls; + for (let c = 0; c < o.length; c++) { + const u = o[c]; + if (u.isInvalid) { + continue; + } + const d = this.m.get(u.provider); + if (d) { + d.push(u); + } else { + this.m.set(u.provider, [u]); + } + const h = u.position.column - u.editStart.column; + const g = h + s - (u.position.column - this.d); + if (n.length !== g) { + n = g === 0 ? "" : t.slice(-g); + r = n.toLowerCase(); + } + u.word = n; + if (g === 0) { + u.score = Nx.Default; + } else { + let p = 0; + while (p < h) { + const b = n.charCodeAt(p); + if (b === 32 || b === 9) { + p += 1; + } else { + break; + } + } + if (p >= g) { + u.score = Nx.Default; + } else if (typeof u.completion.filterText == "string") { + const b = l(n, r, p, u.completion.filterText, u.filterTextLow, 0, this.h); + if (!b) { + continue; + } + if (cM(u.completion.filterText, u.textLabel) === 0) { + u.score = b; + } else { + u.score = RXn(n, r, p, u.textLabel, u.labelLow, 0); + u.score[0] = b[0]; + } + } else { + const b = l(n, r, p, u.textLabel, u.labelLow, 0, this.h); + if (!b) { + continue; + } + u.score = b; + } + } + u.idx = c; + u.distance = this.e.distance(u.position, u.completion); + a.push(u); + e.push(u.textLabel.length); + } + this.l = a.sort(this.g); + this.k = 0; + this.n = { + pLabelLen: e.length ? gnt(e.length - 0.85, e, (c, u) => c - u) : 0 + }; + } + static q(e, t) { + if (e.score[0] > t.score[0]) { + return -1; + } else if (e.score[0] < t.score[0]) { + return 1; + } else if (e.distance < t.distance) { + return -1; + } else if (e.distance > t.distance) { + return 1; + } else if (e.idx < t.idx) { + return -1; + } else if (e.idx > t.idx) { + return 1; + } else { + return 0; + } + } + static r(e, t) { + if (e.completion.kind !== t.completion.kind) { + if (e.completion.kind === 27) { + return 1; + } + if (t.completion.kind === 27) { + return -1; + } + } + return ihe.q(e, t); + } + static s(e, t) { + if (e.completion.kind !== t.completion.kind) { + if (e.completion.kind === 27) { + return -1; + } + if (t.completion.kind === 27) { + return 1; + } + } + return ihe.q(e, t); + } +}; +Tr(); +Pc(); +zt(); +Aa(); +var cei; +var AG = class { + static shouldAutoTrigger(i) { + if (!i.hasModel()) { + return false; + } + const e = i.getModel(); + const t = i.getPosition(); + e.tokenization.tokenizeIfCheap(t.lineNumber); + const s = e.getWordAtPosition(t); + return !!s && (s.endColumn === t.column || s.startColumn + 1 === t.column) && !!isNaN(Number(s.word)); + } + constructor(i, e, t) { + this.leadingLineContent = i.getLineContent(e.lineNumber).substr(0, e.column - 1); + this.leadingWord = i.getWordUntilPosition(e); + this.lineNumber = e.lineNumber; + this.column = e.column; + this.triggerOptions = t; + } +}; +var p3s; +(function (i) { + i[i.Idle = 0] = "Idle"; + i[i.Manual = 1] = "Manual"; + i[i.Auto = 2] = "Auto"; +})(p3s ||= {}); +function _vr(i, e, t) { + if (!e.getContextKeyValue(Kh.inlineSuggestionVisible.key)) { + return true; + } + const s = e.getContextKeyValue(Kh.suppressSuggestions.key); + if (s !== undefined) { + return !s; + } else { + return !i.getOption(64).suppressSuggestions; + } +} +function Bvr(i, e, t) { + if (!e.getContextKeyValue("inlineSuggestionVisible")) { + return true; + } + const s = e.getContextKeyValue(Kh.suppressSuggestions.key); + if (s !== undefined) { + return !s; + } else { + return !i.getOption(64).suppressSuggestions; + } +} +var Zmt = cei = class { + constructor(e, t, s, n, r, o, a, l, c) { + this.n = e; + this.o = t; + this.p = s; + this.q = n; + this.r = r; + this.s = o; + this.t = a; + this.u = l; + this.v = c; + this.a = new Q(); + this.b = new Q(); + this.c = new qC(); + this.d = undefined; + this.j = new Q(); + this.k = new B(); + this.l = new B(); + this.m = new B(); + this.onDidCancel = this.k.event; + this.onDidTrigger = this.l.event; + this.onDidSuggest = this.m.event; + this.C = 0; + this.h = this.n.getSelection() || new Vs(1, 1, 1, 1); + this.a.add(this.n.onDidChangeModel(() => { + this.w(); + this.cancel(); + })); + this.a.add(this.n.onDidChangeModelLanguage(() => { + this.w(); + this.cancel(); + })); + this.a.add(this.n.onDidChangeConfiguration(() => { + this.w(); + })); + this.a.add(this.u.completionProvider.onDidChange(() => { + this.w(); + this.x(); + })); + let u = false; + this.a.add(this.n.onDidCompositionStart(() => { + u = true; + })); + this.a.add(this.n.onDidCompositionEnd(() => { + u = false; + this.z(); + })); + this.a.add(this.n.onDidChangeCursorSelection(d => { + if (!u) { + this.y(d); + } + })); + this.a.add(this.n.onDidChangeModelContent(() => { + if (!u && this.d !== undefined) { + this.B(); + } + })); + this.w(); + } + dispose() { + si(this.b); + si([this.k, this.m, this.l, this.c]); + this.a.dispose(); + this.j.dispose(); + this.cancel(); + } + w() { + this.b.clear(); + if (this.n.getOption(96) || !this.n.hasModel() || !this.n.getOption(126)) { + return; + } + const e = new Map(); + for (const s of this.u.completionProvider.all(this.n.getModel())) { + for (const n of s.triggerCharacters || []) { + let r = e.get(n); + if (!r) { + r = new Set(); + const o = rvr(); + if (o) { + r.add(o); + } + e.set(n, r); + } + r.add(s); + } + } + const t = s => { + if (!Bvr(this.n, this.s, this.t) || AG.shouldAutoTrigger(this.n)) { + return; + } + if (!s) { + const o = this.n.getPosition(); + s = this.n.getModel().getLineContent(o.lineNumber).substr(0, o.column - 1); + } + let n = ""; + if (_q(s.charCodeAt(s.length - 1))) { + if (jb(s.charCodeAt(s.length - 2))) { + n = s.substr(s.length - 2); + } + } else { + n = s.charAt(s.length - 1); + } + const r = e.get(n); + if (r) { + const o = new Map(); + if (this.i) { + for (const [a, l] of this.i.getItemsByProvider()) { + if (!r.has(a)) { + o.set(a, l); + } + } + } + this.trigger({ + auto: true, + triggerKind: 1, + triggerCharacter: n, + retrigger: !!this.i, + clipboardText: this.i?.clipboardText, + completionOptions: { + providerFilter: r, + providerItemsToReuse: o + } + }); + } + }; + this.b.add(this.n.onDidType(t)); + this.b.add(this.n.onDidCompositionEnd(() => t())); + } + get state() { + if (this.d) { + if (this.d.auto) { + return 2; + } else { + return 1; + } + } else { + return 0; + } + } + cancel(e = false) { + if (this.d !== undefined) { + this.c.cancel(); + this.f?.cancel(); + this.f = undefined; + this.d = undefined; + this.i = undefined; + this.g = undefined; + this.k.fire({ + retrigger: e + }); + } + } + clear() { + this.j.clear(); + } + x() { + if (this.d !== undefined) { + if (!this.n.hasModel() || !this.u.completionProvider.has(this.n.getModel())) { + this.cancel(); + } else { + this.trigger({ + auto: this.d.auto, + retrigger: true + }); + } + } + } + y(e) { + if (!this.n.hasModel()) { + return; + } + const t = this.h; + this.h = this.n.getSelection(); + if (!e.selection.isEmpty() || e.reason !== 0 && e.reason !== 3 || e.source !== "keyboard" && e.source !== "deleteLeft") { + this.cancel(); + return; + } + if (this.d === undefined && e.reason === 0) { + if (t.containsRange(this.h) || t.getEndPosition().isBeforeOrEqual(this.h.getPosition())) { + this.A(); + } + } else if (this.d !== undefined && e.reason === 3) { + this.B(); + } + } + z() { + if (this.d === undefined) { + this.A(); + } else { + this.B(); + } + } + A() { + if (!ore.isAllOff(this.n.getOption(94)) && (!this.n.getOption(123).snippetsPreventQuickSuggestions || !Yh.get(this.n)?.isInSnippet())) { + this.cancel(); + this.c.cancelAndSet(() => { + if (this.d !== undefined || !AG.shouldAutoTrigger(this.n) || !this.n.hasModel() || !this.n.hasWidgetFocus()) { + return; + } + const e = this.n.getModel(); + const t = this.n.getPosition(); + const s = this.n.getOption(94); + if (!ore.isAllOff(s)) { + if (!ore.isAllOn(s)) { + e.tokenization.tokenizeIfCheap(t.lineNumber); + const n = e.tokenization.getLineTokens(t.lineNumber); + const r = n.getStandardTokenType(n.findTokenIndexAtOffset(Math.max(t.column - 1 - 1, 0))); + if (ore.valueFor(s, r) !== "on") { + return; + } + } + if (_vr(this.n, this.s, this.t) && this.u.completionProvider.has(e)) { + this.trigger({ + auto: true + }); + } + } + }, this.n.getOption(95)); + } + } + B() { + yr(this.n.hasModel()); + yr(this.d !== undefined); + const e = this.n.getModel(); + const t = this.n.getPosition(); + const s = new AG(e, t, { + ...this.d, + refilter: true + }); + this.E(s); + } + trigger(e) { + if (!this.n.hasModel()) { + return; + } + const t = this.n.getModel(); + const s = new AG(t, this.n.getPosition(), e); + this.cancel(e.retrigger); + this.d = e; + this.l.fire({ + auto: e.auto, + shy: e.shy ?? false, + position: this.n.getPosition() + }); + this.g = s; + let n = { + triggerKind: e.triggerKind ?? 0 + }; + if (e.triggerCharacter) { + n = { + triggerKind: 1, + triggerCharacter: e.triggerCharacter + }; + } + this.f = new Xi(); + const r = this.n.getOption(117); + let o = 1; + switch (r) { + case "top": + o = 0; + break; + case "bottom": + o = 2; + break; + } + const { + itemKind: a, + showDeprecated: l + } = cei.createSuggestFilter(this.n); + const c = new Umt(o, e.completionOptions?.kindFilter ?? a, e.completionOptions?.providerFilter, e.completionOptions?.providerItemsToReuse, l); + const u = d3s.create(this.o, this.n); + const d = Wmt(this.u.completionProvider, t, this.n.getPosition(), c, n, this.f.token); + Promise.all([d, u]).then(async ([h, g]) => { + this.f?.dispose(); + if (!this.n.hasModel()) { + return; + } + let p = e?.clipboardText; + if (!p && h.needsClipboard) { + p = await this.p.readText(); + } + if (this.d === undefined) { + return; + } + const b = this.n.getModel(); + const v = new AG(b, this.n.getPosition(), e); + const y = { + ...Cme.default, + firstMatchCanBeWeak: !this.n.getOption(123).matchOnWordStartOnly + }; + this.i = new g3s(h.items, this.g.column, { + leadingLineContent: v.leadingLineContent, + characterCountDelta: v.column - this.g.column + }, g, this.n.getOption(123), this.n.getOption(117), y, p); + this.j.add(h.disposable); + this.E(v); + this.D(h.durations); + if (!this.v.isBuilt || this.v.isExtensionDevelopment) { + for (const w of h.items) { + if (w.isInvalid) { + this.r.warn(`[suggest] did IGNORE invalid completion item from ${w.provider._debugDisplayName}`, w.completion); + } + } + } + }).catch(xs); + } + D(e) { + if (this.C++ % 230 === 0) { + setTimeout(() => { + this.q.publicLog2("suggest.durations.json", { + data: JSON.stringify(e) + }); + this.r.debug("suggest.durations.json", e); + }); + } + } + static createSuggestFilter(e) { + const t = new Set(); + if (e.getOption(117) === "none") { + t.add(27); + } + const n = e.getOption(123); + if (!n.showMethods) { + t.add(0); + } + if (!n.showFunctions) { + t.add(1); + } + if (!n.showConstructors) { + t.add(2); + } + if (!n.showFields) { + t.add(3); + } + if (!n.showVariables) { + t.add(4); + } + if (!n.showClasses) { + t.add(5); + } + if (!n.showStructs) { + t.add(6); + } + if (!n.showInterfaces) { + t.add(7); + } + if (!n.showModules) { + t.add(8); + } + if (!n.showProperties) { + t.add(9); + } + if (!n.showEvents) { + t.add(10); + } + if (!n.showOperators) { + t.add(11); + } + if (!n.showUnits) { + t.add(12); + } + if (!n.showValues) { + t.add(13); + } + if (!n.showConstants) { + t.add(14); + } + if (!n.showEnums) { + t.add(15); + } + if (!n.showEnumMembers) { + t.add(16); + } + if (!n.showKeywords) { + t.add(17); + } + if (!n.showWords) { + t.add(18); + } + if (!n.showColors) { + t.add(19); + } + if (!n.showFiles) { + t.add(20); + } + if (!n.showReferences) { + t.add(21); + } + if (!n.showColors) { + t.add(22); + } + if (!n.showFolders) { + t.add(23); + } + if (!n.showTypeParameters) { + t.add(24); + } + if (!n.showSnippets) { + t.add(27); + } + if (!n.showUsers) { + t.add(25); + } + if (!n.showIssues) { + t.add(26); + } + return { + itemKind: t, + showDeprecated: n.showDeprecated + }; + } + E(e) { + if (this.g) { + if (e.lineNumber !== this.g.lineNumber) { + this.cancel(); + return; + } + if (Jd(e.leadingLineContent) !== Jd(this.g.leadingLineContent)) { + this.cancel(); + return; + } + if (e.column < this.g.column) { + if (e.leadingWord.word) { + this.trigger({ + auto: this.g.triggerOptions.auto, + retrigger: true + }); + } else { + this.cancel(); + } + return; + } + if (this.i) { + if (e.leadingWord.word.length !== 0 && e.leadingWord.startColumn > this.g.leadingWord.startColumn) { + if (AG.shouldAutoTrigger(this.n) && this.g) { + const s = this.i.getItemsByProvider(); + this.trigger({ + auto: this.g.triggerOptions.auto, + retrigger: true, + clipboardText: this.i.clipboardText, + completionOptions: { + providerItemsToReuse: s + } + }); + } + return; + } + if (e.column > this.g.column && this.i.getIncompleteProvider().size > 0 && e.leadingWord.word.length !== 0) { + const t = new Map(); + const s = new Set(); + for (const [n, r] of this.i.getItemsByProvider()) { + if (r.length > 0 && r[0].container.incomplete) { + s.add(n); + } else { + t.set(n, r); + } + } + this.trigger({ + auto: this.g.triggerOptions.auto, + triggerKind: 2, + retrigger: true, + clipboardText: this.i.clipboardText, + completionOptions: { + providerFilter: s, + providerItemsToReuse: t + } + }); + } else { + const t = this.i.lineContext; + let s = false; + this.i.lineContext = { + leadingLineContent: e.leadingLineContent, + characterCountDelta: e.column - this.g.column + }; + if (this.i.items.length === 0) { + const n = AG.shouldAutoTrigger(this.n); + if (!this.g) { + this.cancel(); + return; + } + if (n && this.g.leadingWord.endColumn < e.leadingWord.startColumn) { + this.trigger({ + auto: this.g.triggerOptions.auto, + retrigger: true + }); + return; + } + if (this.g.triggerOptions.auto) { + this.cancel(); + return; + } else { + this.i.lineContext = t; + s = this.i.items.length > 0; + if (s && e.leadingWord.word.length === 0) { + this.cancel(); + return; + } + } + } + this.m.fire({ + completionModel: this.i, + triggerOptions: e.triggerOptions, + isFrozen: s + }); + } + } + } + } +}; +Zmt = cei = __decorate([__param(1, Fu), __param(2, Zr), __param(3, Ot), __param(4, Bt), __param(5, Ne), __param(6, ve), __param(7, nn), __param(8, pa)], Zmt); +q(); +var Uvr = class A_n { + static { + this.a = 51200; + } + constructor(e, t) { + this.b = new Q(); + this.c = []; + this.d = false; + this.b.add(e.onWillType(() => { + if (this.d || !e.hasModel()) { + return; + } + const s = e.getSelections(); + const n = s.length; + let r = false; + for (let a = 0; a < n; a++) { + if (!s[a].isEmpty()) { + r = true; + break; + } + } + if (!r) { + if (this.c.length !== 0) { + this.c.length = 0; + } + return; + } + this.c = []; + const o = e.getModel(); + for (let a = 0; a < n; a++) { + const l = s[a]; + if (o.getValueLengthInRange(l) > A_n.a) { + return; + } + this.c[a] = { + value: o.getValueInRange(l), + multiline: l.startLineNumber !== l.endLineNumber + }; + } + })); + this.b.add(t.onDidTrigger(s => { + this.d = true; + })); + this.b.add(t.onDidCancel(s => { + this.d = false; + })); + } + getLastOvertypedInfo(e) { + if (e >= 0 && e < this.c.length) { + return this.c[e]; + } + } + dispose() { + this.b.dispose(); + } +}; +xe(); +oS(); +nt(); +Ut(); +pe(); +q(); +Xf(); +$i(); +xe(); +sl(); +q(); +Je(); +Ee(); +te(); +var ebt = class { + constructor(e, t, s, n, r) { + this.d = t; + this.e = n; + this.f = r; + this.c = new Q(); + this.element = z(e, G(".suggest-status-bar")); + const o = a => a instanceof Ma ? s.createInstance(zdr, a, { + useComma: true + }) : undefined; + this.a = new ea(this.element, { + actionViewItemProvider: o + }); + this.b = new ea(this.element, { + actionViewItemProvider: o + }); + this.a.domNode.classList.add("left"); + this.b.domNode.classList.add("right"); + } + dispose() { + this.c.dispose(); + this.a.dispose(); + this.b.dispose(); + this.element.remove(); + } + show() { + const e = this.e.createMenu(this.d, this.f); + const t = () => { + const s = []; + const n = []; + for (const [r, o] of e.getActions()) { + if (r === "left") { + s.push(...o); + } else { + n.push(...o); + } + } + this.a.clear(); + this.a.push(s); + this.b.clear(); + this.b.push(n); + }; + this.c.add(e.onDidChange(() => t())); + this.c.add(e); + } + hide() { + this.c.clear(); + } +}; +ebt = __decorate([__param(2, re), __param(3, Hn), __param(4, Ne)], ebt); +X(); +Ee(); +te(); +qt(); +Qs(); +vp(); +gi(); +xe(); +Kg(); +He(); +Rt(); +pe(); +No(); +q(); +tv(); +X(); +te(); +function uei(i) { + return !!i && (!!i.completion.documentation || !!i.completion.detail && i.completion.detail !== i.completion.label); +} +var dei = class { + constructor(e, t) { + this.r = e; + this.c = new B(); + this.onDidClose = this.c.event; + this.d = new B(); + this.onDidChangeContents = this.d.event; + this.l = new Q(); + this.n = new Q(); + this.o = 1; + this.q = new Ln(330, 0); + this.domNode = G(".suggest-details"); + this.domNode.classList.add("no-docs"); + this.m = t.createInstance(Cb, { + editor: e + }); + this.h = G(".body"); + this.g = new _w(this.h, { + alwaysConsumeMouseWheel: true + }); + z(this.domNode, this.g.getDomNode()); + this.l.add(this.g); + this.i = z(this.h, G(".header")); + this.f = z(this.i, G("span" + le.asCSSSelector(A.close))); + this.f.title = f(1530, null); + this.f.role = "button"; + this.f.tabIndex = -1; + this.j = z(this.i, G("p.type")); + this.k = z(this.h, G("p.docs")); + this.s(); + this.l.add(this.r.onDidChangeConfiguration(s => { + if (s.hasChanged(52)) { + this.s(); + } + })); + } + dispose() { + this.l.dispose(); + this.n.dispose(); + } + s() { + const e = this.r.getOptions(); + const t = e.get(52); + const s = t.getMassagedFontFamily(); + const n = e.get(124) || t.fontSize; + const r = e.get(125) || t.lineHeight; + const o = t.fontWeight; + const a = `${n}px`; + const l = `${r}px`; + this.domNode.style.fontSize = a; + this.domNode.style.lineHeight = `${r / n}`; + this.domNode.style.fontWeight = o; + this.domNode.style.fontFeatureSettings = t.fontFeatureSettings; + this.j.style.fontFamily = s; + this.f.style.height = l; + this.f.style.width = l; + } + getLayoutInfo() { + const e = this.r.getOption(125) || this.r.getOption(52).lineHeight; + const t = this.o; + const s = t * 2; + return { + lineHeight: e, + borderWidth: t, + borderHeight: s, + verticalPadding: 22, + horizontalPadding: 14 + }; + } + renderLoading() { + this.j.textContent = f(1531, null); + this.k.textContent = ""; + this.domNode.classList.remove("no-docs", "no-type"); + this.layout(this.size.width, this.getLayoutInfo().lineHeight * 2); + this.d.fire(this); + } + renderItem(e, t) { + this.n.clear(); + let { + detail: s, + documentation: n + } = e.completion; + if (t) { + let r = ""; + r += `score: ${e.score[0]} +`; + r += `prefix: ${e.word ?? "(no prefix)"} +`; + r += `word: ${e.completion.filterText ? e.completion.filterText + " (filterText)" : e.textLabel} +`; + r += `distance: ${e.distance} (localityBonus-setting) +`; + r += `index: ${e.idx}, based on ${e.completion.sortText && `sortText: "${e.completion.sortText}"` || "label"} +`; + r += `commit_chars: ${e.completion.commitCharacters?.join("")} +`; + n = new hs().appendCodeblock("empty", r); + s = `Provider: ${e.provider._debugDisplayName}`; + } + if (!t && !uei(e)) { + this.clearContents(); + return; + } + this.domNode.classList.remove("no-docs", "no-type"); + if (s) { + const r = s.length > 100000 ? `${s.substr(0, 100000)}\u2026` : s; + this.j.textContent = r; + this.j.title = r; + Ka(this.j); + this.j.classList.toggle("auto-wrap", !/\r?\n^\s+/gmi.test(r)); + } else { + Lr(this.j); + this.j.title = ""; + Qo(this.j); + this.domNode.classList.add("no-type"); + } + Lr(this.k); + if (typeof n == "string") { + this.k.classList.remove("markdown-docs"); + this.k.textContent = n; + } else if (n) { + this.k.classList.add("markdown-docs"); + Lr(this.k); + const r = this.m.render(n); + this.k.appendChild(r.element); + this.n.add(r); + this.n.add(this.m.onDidRenderAsync(() => { + this.layout(this.q.width, this.j.clientHeight + this.k.clientHeight); + this.d.fire(this); + })); + } + this.domNode.style.userSelect = "text"; + this.domNode.tabIndex = -1; + this.f.onmousedown = r => { + r.preventDefault(); + r.stopPropagation(); + }; + this.f.onclick = r => { + r.preventDefault(); + r.stopPropagation(); + this.c.fire(); + }; + this.h.scrollTop = 0; + this.layout(this.q.width, this.j.clientHeight + this.k.clientHeight); + this.d.fire(this); + } + clearContents() { + this.domNode.classList.add("no-docs"); + this.j.textContent = ""; + this.k.textContent = ""; + } + get isEmpty() { + return this.domNode.classList.contains("no-docs"); + } + get size() { + return this.q; + } + layout(e, t) { + const s = new Ln(e, t); + if (!Ln.equals(s, this.q)) { + this.q = s; + wee(this.domNode, e, t); + } + this.g.scanDomNode(); + } + scrollDown(e = 8) { + this.h.scrollTop += e; + } + scrollUp(e = 8) { + this.h.scrollTop -= e; + } + scrollTop() { + this.h.scrollTop = 0; + } + scrollBottom() { + this.h.scrollTop = this.h.scrollHeight; + } + pageDown() { + this.scrollDown(80); + } + pageUp() { + this.scrollUp(80); + } + set borderWidth(e) { + this.o = e; + } + get borderWidth() { + return this.o; + } + focus() { + this.domNode.focus(); + } +}; +dei = __decorate([__param(1, re)], dei); +var Wvr = class { + constructor(i, e) { + this.widget = i; + this.k = e; + this.allowEditorOverflow = true; + this.c = new Q(); + this.f = false; + this.h = true; + this.d = new Bpt(); + this.d.domNode.classList.add("suggest-details-container"); + this.d.domNode.appendChild(i.domNode); + this.d.enableSashes(false, true, true, false); + let t; + let s; + let n = 0; + let r = 0; + this.c.add(this.d.onDidWillResize(() => { + t = this.j; + s = this.d.size; + })); + this.c.add(this.d.onDidResize(o => { + if (t && s) { + this.widget.layout(o.dimension.width, o.dimension.height); + let a = false; + if (o.west) { + r = s.width - o.dimension.width; + a = true; + } + if (o.north) { + n = s.height - o.dimension.height; + a = true; + } + if (a) { + this.l({ + top: t.top + n, + left: t.left + r + }); + } + } + if (o.done) { + t = undefined; + s = undefined; + n = 0; + r = 0; + this.i = o.dimension; + } + })); + this.c.add(this.widget.onDidChangeContents(() => { + if (this.g) { + this._placeAtAnchor(this.g, this.i ?? this.widget.size, this.h); + } + })); + } + dispose() { + this.d.dispose(); + this.c.dispose(); + this.hide(); + } + getId() { + return "suggest.details"; + } + getDomNode() { + return this.d.domNode; + } + getPosition() { + if (this.j) { + return { + preference: this.j + }; + } else { + return null; + } + } + show() { + if (!this.f) { + this.k.addOverlayWidget(this); + this.f = true; + } + } + hide(i = false) { + this.d.clearSashHoverState(); + if (this.f) { + this.k.removeOverlayWidget(this); + this.f = false; + this.g = undefined; + this.j = undefined; + } + if (i) { + this.i = undefined; + this.widget.clearContents(); + } + } + placeAtAnchor(i, e) { + const t = i.getBoundingClientRect(); + this.g = t; + this.h = e; + this._placeAtAnchor(this.g, this.i ?? this.widget.size, e); + } + _placeAtAnchor(i, e, t) { + const s = zk(this.getDomNode().ownerDocument.body); + const n = this.widget.getLayoutInfo(); + const r = new Ln(220, n.lineHeight * 2); + const o = i.top; + const a = function () { + const S = s.width - (i.left + i.width + n.borderWidth + n.horizontalPadding); + const x = -n.borderWidth + i.left + i.width; + const k = new Ln(S, s.height - i.top - n.borderHeight - n.verticalPadding); + const E = k.with(undefined, i.top + i.height - n.borderHeight - n.verticalPadding); + return { + top: o, + left: x, + fit: S - e.width, + maxSizeTop: k, + maxSizeBottom: E, + minSize: r.with(Math.min(S, r.width)) + }; + }(); + const l = function () { + const S = i.left - n.borderWidth - n.horizontalPadding; + const x = Math.max(n.horizontalPadding, i.left - e.width - n.borderWidth); + const k = new Ln(S, s.height - i.top - n.borderHeight - n.verticalPadding); + const E = k.with(undefined, i.top + i.height - n.borderHeight - n.verticalPadding); + return { + top: o, + left: x, + fit: S - e.width, + maxSizeTop: k, + maxSizeBottom: E, + minSize: r.with(Math.min(S, r.width)) + }; + }(); + const c = function () { + const S = i.left; + const x = -n.borderWidth + i.top + i.height; + const k = new Ln(i.width - n.borderHeight, s.height - i.top - i.height - n.verticalPadding); + return { + top: x, + left: S, + fit: k.height - e.height, + maxSizeBottom: k, + maxSizeTop: k, + minSize: r.with(k.width) + }; + }(); + const u = [a, l, c]; + const d = u.find(S => S.fit >= 0) ?? u.sort((S, x) => x.fit - S.fit)[0]; + const h = i.top + i.height - n.borderHeight; + let g; + let p = e.height; + const b = Math.max(d.maxSizeTop.height, d.maxSizeBottom.height); + if (p > b) { + p = b; + } + let v; + if (t) { + if (p <= d.maxSizeTop.height) { + g = true; + v = d.maxSizeTop; + } else { + g = false; + v = d.maxSizeBottom; + } + } else if (p <= d.maxSizeBottom.height) { + g = false; + v = d.maxSizeBottom; + } else { + g = true; + v = d.maxSizeTop; + } + let { + top: y, + left: w + } = d; + if (!g && p > i.height) { + y = h - p; + } + const C = this.k.getDomNode(); + if (C) { + const S = C.getBoundingClientRect(); + y -= S.top; + w -= S.left; + } + this.l({ + left: w, + top: y + }); + this.d.enableSashes(!g, d === a, g, d !== a); + this.d.minSize = d.minSize; + this.d.maxSize = v; + this.d.layout(p, Math.min(v.width, e.width)); + this.widget.layout(this.d.size.width, this.d.size.height); + } + l(i) { + this.j = i; + this.k.layoutOverlayWidget(this); + } +}; +xe(); +He(); +Rt(); +pe(); +Pc(); +q(); +Le(); +Eo(); +At(); +Et(); +Le(); +gf(); +Nt(); +Rt(); +var Vvr = /(?:\/|^)(?:([^\/]+)\/)?([^\/]+)$/; +function ip(i, e, t, s, n) { + if (le.isThemeIcon(n)) { + return [`codicon-${n.id}`, "predefined-file-icon"]; + } + if (V.isUri(n)) { + return []; + } + const r = s === Fo.ROOT_FOLDER ? ["rootfolder-icon"] : s === Fo.FOLDER ? ["folder-icon"] : ["file-icon"]; + if (t) { + let o; + if (t.scheme === me.data) { + o = a9.parseMetaData(t).get(a9.META_DATA_LABEL); + } else { + const a = t.path.match(Vvr); + if (a) { + o = ure(a[2].toLowerCase()); + if (a[1]) { + r.push(`${ure(a[1].toLowerCase())}-name-dir-icon`); + } + } else { + o = ure(t.authority.toLowerCase()); + } + } + if (s === Fo.ROOT_FOLDER) { + r.push(`${o}-root-name-folder-icon`); + } else if (s === Fo.FOLDER) { + r.push(`${o}-name-folder-icon`); + } else { + if (o) { + r.push(`${o}-name-file-icon`); + r.push("name-file-icon"); + if (o.length <= 255) { + const l = o.split("."); + for (let c = 1; c < l.length; c++) { + r.push(`${l.slice(c).join(".")}-ext-file-icon`); + } + } + r.push("ext-file-icon"); + } + const a = Hvr(i, e, t); + if (a) { + r.push(`${ure(a)}-lang-file-icon`); + } + } + } + return r; +} +function cre(i) { + return ["file-icon", `${ure(i)}-lang-file-icon`]; +} +function Hvr(i, e, t) { + if (!t) { + return null; + } + let s = null; + if (t.scheme === me.data) { + const r = a9.parseMetaData(t).get(a9.META_DATA_MIME); + if (r) { + s = e.getLanguageIdByMimeType(r); + } + } else { + if (t.scheme === me.aiChat) { + return "cursor-ai"; + } + { + const n = i.getModel(t); + if (n) { + s = n.getLanguageId(); + } + } + } + if (s && s !== Ju) { + return s; + } else { + return e.guessLanguageIdByFilepathOrFirstLine(t); + } +} +function ure(i) { + return i.replace(/[\s]/g, "/"); +} +Rn(); +wn(); +X(); +Nt(); +Br(); +gi(); +function m3s(i) { + return `suggest-aria-id:${i}`; +} +var qvr = dt("suggest-more-info", A.chevronRight, f(1532, null)); +var jvr = new class oYe { + static { + this.a = /(#([\da-fA-F]{3}){1,2}|(rgb|hsl)a\(\s*(\d{1,3}%?\s*,\s*){3}(1|0?\.\d+)\)|(rgb|hsl)\(\s*\d{1,3}%?(\s*,\s*\d{1,3}%?){2}\s*\))/; + } + static { + this.b = new RegExp(`^${oYe.a.source}$`, "i"); + } + extract(e, t) { + if (e.textLabel.match(oYe.b)) { + t[0] = e.textLabel; + return true; + } + if (e.completion.detail && e.completion.detail.match(oYe.b)) { + t[0] = e.completion.detail; + return true; + } + if (e.completion.documentation) { + const s = typeof e.completion.documentation == "string" ? e.completion.documentation : e.completion.documentation.value; + const n = oYe.a.exec(s); + if (n && (n.index === 0 || n.index + n[0].length === s.length)) { + t[0] = n[0]; + return true; + } + } + return false; + } +}(); +var hei = class { + constructor(e, t, s, n) { + this.b = e; + this.c = t; + this.d = s; + this.f = n; + this.a = new B(); + this.onDidToggleDetails = this.a.event; + this.templateId = "suggestion"; + } + dispose() { + this.a.dispose(); + } + renderTemplate(e) { + const t = new Q(); + const s = e; + s.classList.add("show-file-icons"); + const n = z(e, G(".icon")); + const r = z(n, G("span.colorspan")); + const o = z(e, G(".contents")); + const a = z(o, G(".main")); + const l = z(a, G(".icon-label.codicon")); + const c = z(a, G("span.left")); + const u = z(a, G("span.right")); + const d = new xS(c, { + supportHighlights: true, + supportIcons: true + }); + t.add(d); + const h = z(c, G("span.signature-label")); + const g = z(c, G("span.qualifier-label")); + const p = z(u, G("span.details-label")); + const b = z(u, G("span.readMore" + le.asCSSSelector(qvr))); + b.title = f(1533, null); + return { + root: s, + left: c, + right: u, + icon: n, + colorspan: r, + iconLabel: d, + iconContainer: l, + parametersLabel: h, + qualifierLabel: g, + detailsLabel: p, + readMore: b, + disposables: t, + configureFont: () => { + const y = this.b.getOptions(); + const w = y.get(52); + const C = w.getMassagedFontFamily(); + const S = w.fontFeatureSettings; + const x = y.get(124) || w.fontSize; + const k = y.get(125) || w.lineHeight; + const E = w.fontWeight; + const D = w.letterSpacing; + const P = `${x}px`; + const R = `${k}px`; + const L = `${D}px`; + s.style.fontSize = P; + s.style.fontWeight = E; + s.style.letterSpacing = L; + a.style.fontFamily = C; + a.style.fontFeatureSettings = S; + a.style.lineHeight = R; + n.style.height = R; + n.style.width = R; + b.style.height = R; + b.style.width = R; + } + }; + } + renderElement(e, t, s) { + s.configureFont(); + const { + completion: n + } = e; + s.root.id = m3s(t); + s.colorspan.style.backgroundColor = ""; + const r = { + labelEscapeNewLines: true, + matches: sf(e.score) + }; + const o = []; + if (n.kind === 19 && jvr.extract(e, o)) { + s.icon.className = "icon customcolor"; + s.iconContainer.className = "icon hide"; + s.colorspan.style.backgroundColor = o[0]; + } else if (n.kind === 20 && this.f.getFileIconTheme().hasFileIcons) { + s.icon.className = "icon hide"; + s.iconContainer.className = "icon hide"; + const a = ip(this.c, this.d, V.from({ + scheme: "fake", + path: e.textLabel + }), Fo.FILE); + const l = ip(this.c, this.d, V.from({ + scheme: "fake", + path: n.detail + }), Fo.FILE); + r.extraClasses = a.length > l.length ? a : l; + } else if (n.kind === 23 && this.f.getFileIconTheme().hasFolderIcons) { + s.icon.className = "icon hide"; + s.iconContainer.className = "icon hide"; + r.extraClasses = [ip(this.c, this.d, V.from({ + scheme: "fake", + path: e.textLabel + }), Fo.FOLDER), ip(this.c, this.d, V.from({ + scheme: "fake", + path: n.detail + }), Fo.FOLDER)].flat(); + } else { + s.icon.className = "icon hide"; + s.iconContainer.className = ""; + s.iconContainer.classList.add("suggest-icon", ...le.asClassNameArray(Cte.toIcon(n.kind))); + } + if (n.tags && n.tags.indexOf(1) >= 0) { + r.extraClasses = (r.extraClasses || []).concat(["deprecated"]); + r.matches = []; + } + s.iconLabel.setLabel(e.textLabel, undefined, r); + if (typeof n.label == "string") { + s.parametersLabel.textContent = ""; + s.detailsLabel.textContent = fei(n.detail || ""); + s.root.classList.add("string-label"); + } else { + s.parametersLabel.textContent = fei(n.label.detail || ""); + s.detailsLabel.textContent = fei(n.label.description || ""); + s.root.classList.remove("string-label"); + } + if (this.b.getOption(123).showInlineDetails) { + Ka(s.detailsLabel); + } else { + Qo(s.detailsLabel); + } + if (uei(e)) { + s.right.classList.add("can-expand-details"); + Ka(s.readMore); + s.readMore.onmousedown = a => { + a.stopPropagation(); + a.preventDefault(); + }; + s.readMore.onclick = a => { + a.stopPropagation(); + a.preventDefault(); + this.a.fire(); + }; + } else { + s.right.classList.remove("can-expand-details"); + Qo(s.readMore); + s.readMore.onmousedown = null; + s.readMore.onclick = null; + } + } + disposeTemplate(e) { + e.disposables.dispose(); + } +}; +hei = __decorate([__param(1, $s), __param(2, As), __param(3, ti)], hei); +function fei(i) { + return i.replace(/\r\n|\r|\n/g, ""); +} +ya(); +wc(); +var dre; +he("editorSuggestWidget.background", $w, f(1514, null)); +he("editorSuggestWidget.border", Ij, f(1515, null)); +var zvr = he("editorSuggestWidget.foreground", wm, f(1516, null)); +he("editorSuggestWidget.selectedForeground", rte, f(1517, null)); +he("editorSuggestWidget.selectedIconForeground", cat, f(1518, null)); +var b3s = he("editorSuggestWidget.selectedBackground", ote, f(1519, null)); +he("editorSuggestWidget.highlightForeground", Nj, f(1520, null)); +he("editorSuggestWidget.focusHighlightForeground", iZi, f(1521, null)); +he("editorSuggestWidgetStatus.foreground", Bs(zvr, 0.5), f(1522, null)); +var v3s; +(function (i) { + i[i.Hidden = 0] = "Hidden"; + i[i.Loading = 1] = "Loading"; + i[i.Empty = 2] = "Empty"; + i[i.Open = 3] = "Open"; + i[i.Frozen = 4] = "Frozen"; + i[i.Details = 5] = "Details"; + i[i.onDetailsKeyDown = 6] = "onDetailsKeyDown"; +})(v3s ||= {}); +var Jvr = class { + constructor(i, e) { + this.b = i; + this.a = `suggestWidget.size/${e.getEditorType()}/${e instanceof Zy}`; + } + restore() { + const i = this.b.get(this.a, 0) ?? ""; + try { + const e = JSON.parse(i); + if (Ln.is(e)) { + return Ln.lift(e); + } + } catch {} + } + store(i) { + this.b.store(this.a, JSON.stringify(i), 0, 1); + } + reset() { + this.b.remove(this.a, 0); + } +}; +var gei = class { + static { + dre = this; + } + static { + this.a = f(1523, null); + } + static { + this.b = f(1524, null); + } + get isShown() { + return this.x.get(); + } + constructor(e, t, s, n, r) { + this.I = e; + this.J = t; + this.c = 0; + this.d = false; + this.g = new ki(); + this.h = new ki(); + this.k = false; + this.n = false; + this.o = false; + this.B = new qC(); + this.C = new Q(); + this.D = new cx(); + this.E = new cx(); + this.F = new B(); + this.G = new B(); + this.onDidSelect = this.D.event; + this.onDidFocus = this.E.event; + this.onDidHide = this.F.event; + this.onDidShow = this.G.event; + this.H = new B(); + this.onDetailsKeyDown = this.H.event; + this.element = new Bpt(); + this.element.domNode.classList.add("editor-widget", "suggest-widget"); + this.v = new Gvr(this, e); + this.w = new Jvr(t, e); + class o { + constructor(g, p, b = false, v = false) { + this.persistedSize = g; + this.currentSize = p; + this.persistHeight = b; + this.persistWidth = v; + } + } + let a; + this.C.add(this.element.onDidWillResize(() => { + this.v.lockPreference(); + a = new o(this.w.restore(), this.element.size); + })); + this.C.add(this.element.onDidResize(h => { + this.V(h.dimension.width, h.dimension.height); + if (a) { + a.persistHeight = a.persistHeight || !!h.north || !!h.south; + a.persistWidth = a.persistWidth || !!h.east || !!h.west; + } + if (h.done) { + if (a) { + const { + itemHeight: g, + defaultSize: p + } = this.getLayoutInfo(); + const b = Math.round(g / 2); + let { + width: v, + height: y + } = this.element.size; + if (!a.persistHeight || Math.abs(a.currentSize.height - y) <= b) { + y = a.persistedSize?.height ?? p.height; + } + if (!a.persistWidth || Math.abs(a.currentSize.width - v) <= b) { + v = a.persistedSize?.width ?? p.width; + } + this.w.store(new Ln(v, y)); + } + this.v.unlockPreference(); + a = undefined; + } + })); + this.p = z(this.element.domNode, G(".message")); + this.q = z(this.element.domNode, G(".tree")); + const l = this.C.add(r.createInstance(dei, this.I)); + l.onDidClose(() => this.toggleDetails(), this, this.C); + this.u = new Wvr(l, this.I); + const c = () => this.element.domNode.classList.toggle("no-icons", !this.I.getOption(123).showIcons); + c(); + const u = r.createInstance(hei, this.I); + this.C.add(u); + this.C.add(u.onDidToggleDetails(() => this.toggleDetails())); + this.r = new Cg("SuggestWidget", this.q, { + getHeight: h => this.getLayoutInfo().itemHeight, + getTemplateId: h => "suggestion" + }, [u], { + alwaysConsumeMouseWheel: true, + useShadows: false, + mouseSupport: false, + multipleSelectionSupport: false, + accessibilityProvider: { + getRole: () => "option", + getWidgetAriaLabel: () => f(1525, null), + getWidgetRole: () => "listbox", + getAriaLabel: h => { + let g = h.textLabel; + if (typeof h.completion.label != "string") { + const { + detail: y, + description: w + } = h.completion.label; + if (y && w) { + g = f(1526, null, g, y, w); + } else if (y) { + g = f(1527, null, g, y); + } else if (w) { + g = f(1528, null, g, w); + } + } + if (!h.isResolved || !this.X()) { + return g; + } + const { + documentation: p, + detail: b + } = h.completion; + const v = Fv("{0}{1}", b || "", p ? typeof p == "string" ? p : p.value : ""); + return f(1529, null, g, v); + } + } + }); + this.r.style(VM({ + listInactiveFocusBackground: b3s, + listInactiveFocusOutline: Oc + })); + this.s = r.createInstance(ebt, this.element.domNode, XU); + const d = () => this.element.domNode.classList.toggle("with-status-bar", this.I.getOption(123).showStatusBar); + d(); + this.C.add(n.onDidColorThemeChange(h => this.P(h))); + this.P(n.getColorTheme()); + this.C.add(this.r.onMouseDown(h => this.M(h))); + this.C.add(this.r.onTap(h => this.M(h))); + this.C.add(this.r.onDidChangeSelection(h => this.N(h))); + this.C.add(this.r.onDidChangeFocus(h => this.Q(h))); + this.C.add(this.I.onDidChangeCursorSelection(() => this.L())); + this.C.add(this.I.onDidChangeConfiguration(h => { + if (h.hasChanged(123)) { + d(); + c(); + } + if (this.l && (h.hasChanged(52) || h.hasChanged(124) || h.hasChanged(125))) { + this.r.splice(0, this.r.length, this.l.items); + } + })); + this.x = zo.Visible.bindTo(s); + this.y = zo.DetailsVisible.bindTo(s); + this.z = zo.MultipleSuggestions.bindTo(s); + this.A = zo.HasFocusedSuggestion.bindTo(s); + this.C.add(ko(this.u.widget.domNode, "keydown", h => { + this.H.fire(h); + })); + this.C.add(this.I.onMouseDown(h => this.K(h))); + } + dispose() { + this.u.widget.dispose(); + this.u.dispose(); + this.r.dispose(); + this.s.dispose(); + this.C.dispose(); + this.f?.dispose(); + this.g.dispose(); + this.h.dispose(); + this.B.dispose(); + this.v.dispose(); + this.element.dispose(); + } + K(e) { + if (this.u.widget.domNode.contains(e.target.element)) { + this.u.widget.domNode.focus(); + } else if (this.element.domNode.contains(e.target.element)) { + this.I.focus(); + } + } + L() { + if (this.c !== 0) { + this.v.layout(); + } + } + M(e) { + if (typeof e.element !== "undefined" && typeof e.index !== "undefined") { + e.browserEvent.preventDefault(); + e.browserEvent.stopPropagation(); + this.O(e.element, e.index); + } + } + N(e) { + if (e.elements.length) { + this.O(e.elements[0], e.indexes[0]); + } + } + O(e, t) { + const s = this.l; + if (s) { + this.D.fire({ + item: e, + index: t, + model: s + }); + this.I.focus(); + } + } + P(e) { + this.u.widget.borderWidth = LI(e.type) ? 2 : 1; + } + Q(e) { + if (this.k) { + return; + } + if (this.c === 5) { + this.R(3); + } + if (!e.elements.length) { + if (this.i) { + this.i.cancel(); + this.i = undefined; + this.j = undefined; + } + this.I.setAriaOptions({ + activeDescendant: undefined + }); + this.A.set(false); + return; + } + if (!this.l) { + return; + } + this.A.set(true); + const t = e.elements[0]; + const s = e.indexes[0]; + if (t !== this.j) { + this.i?.cancel(); + this.i = undefined; + this.j = t; + this.r.reveal(s); + this.i = ql(async n => { + const r = Gd(() => { + if (this.X()) { + this.T(true, false); + } + }, 250); + const o = n.onCancellationRequested(() => r.dispose()); + try { + return await t.resolve(n); + } finally { + r.dispose(); + o.dispose(); + } + }); + this.i.then(() => { + if (!(s >= this.r.length) && t === this.r.element(s)) { + this.k = true; + this.r.splice(s, 1, [t]); + this.r.setFocus([s]); + this.k = false; + if (this.X()) { + this.T(false, false); + } else { + this.element.domNode.classList.remove("docs-side"); + } + this.I.setAriaOptions({ + activeDescendant: m3s(s) + }); + } + }).catch(xs); + } + this.E.fire({ + item: t, + index: s, + model: this.l + }); + } + R(e) { + if (this.c !== e) { + this.c = e; + this.element.domNode.classList.toggle("frozen", e === 4); + this.element.domNode.classList.remove("message"); + switch (e) { + case 0: + Qo(this.p, this.q, this.s.element); + this.u.hide(true); + this.s.hide(); + this.v.hide(); + this.x.reset(); + this.z.reset(); + this.A.reset(); + this.B.cancel(); + this.element.domNode.classList.remove("visible"); + this.r.splice(0, this.r.length); + this.j = undefined; + this.m = undefined; + this.o = false; + break; + case 1: + this.element.domNode.classList.add("message"); + this.p.textContent = dre.a; + Qo(this.q, this.s.element); + Ka(this.p); + this.u.hide(); + this.S(); + this.j = undefined; + Bh(dre.a); + break; + case 2: + this.element.domNode.classList.add("message"); + this.p.textContent = dre.b; + Qo(this.q, this.s.element); + Ka(this.p); + this.u.hide(); + this.S(); + this.j = undefined; + Bh(dre.b); + break; + case 3: + Qo(this.p); + Ka(this.q, this.s.element); + this.S(); + break; + case 4: + Qo(this.p); + Ka(this.q, this.s.element); + this.S(); + break; + case 5: + Qo(this.p); + Ka(this.q, this.s.element); + this.u.show(); + this.S(); + this.u.widget.focus(); + break; + } + } + } + S() { + this.s.show(); + this.v.show(); + this.U(this.w.restore()); + this.x.set(true); + this.B.cancelAndSet(() => { + this.element.domNode.classList.add("visible"); + this.G.fire(this); + }, 100); + } + showTriggered(e, t) { + if (this.c === 0) { + this.v.setPosition(this.I.getPosition()); + this.d = !!e; + if (!this.d) { + this.f = Gd(() => this.R(1), t); + } + } + } + showSuggestions(e, t, s, n, r) { + this.v.setPosition(this.I.getPosition()); + this.f?.dispose(); + this.i?.cancel(); + this.i = undefined; + if (this.l !== e) { + this.l = e; + } + if (s && this.c !== 2 && this.c !== 0) { + this.R(4); + return; + } + const o = this.l.items.length; + const a = o === 0; + this.z.set(o > 1); + if (a) { + this.R(n ? 0 : 2); + this.l = undefined; + return; + } + this.j = undefined; + this.E.pause(); + this.D.pause(); + try { + this.r.splice(0, this.r.length, this.l.items); + this.R(s ? 4 : 3); + this.r.reveal(t, 0); + this.r.setFocus(r ? [] : [t]); + } finally { + this.E.resume(); + this.D.resume(); + } + this.g.value = f9(Kt(this.element.domNode), () => { + this.g.clear(); + this.U(this.element.size); + this.u.widget.domNode.classList.remove("focused"); + }); + } + focusSelected() { + if (this.r.length > 0) { + this.r.setFocus([0]); + } + } + selectNextPage() { + switch (this.c) { + case 0: + return false; + case 5: + this.u.widget.pageDown(); + return true; + case 1: + return !this.d; + default: + this.r.focusNextPage(); + return true; + } + } + selectNext() { + switch (this.c) { + case 0: + return false; + case 1: + return !this.d; + default: + this.r.focusNext(1, true); + return true; + } + } + selectLast() { + switch (this.c) { + case 0: + return false; + case 5: + this.u.widget.scrollBottom(); + return true; + case 1: + return !this.d; + default: + this.r.focusLast(); + return true; + } + } + selectPreviousPage() { + switch (this.c) { + case 0: + return false; + case 5: + this.u.widget.pageUp(); + return true; + case 1: + return !this.d; + default: + this.r.focusPreviousPage(); + return true; + } + } + selectPrevious() { + switch (this.c) { + case 0: + return false; + case 1: + return !this.d; + default: + this.r.focusPrevious(1, true); + return false; + } + } + selectFirst() { + switch (this.c) { + case 0: + return false; + case 5: + this.u.widget.scrollTop(); + return true; + case 1: + return !this.d; + default: + this.r.focusFirst(); + return true; + } + } + getFocusedItem() { + if (this.c !== 0 && this.c !== 2 && this.c !== 1 && this.l && this.r.getFocus().length > 0) { + return { + item: this.r.getFocusedElements()[0], + index: this.r.getFocus()[0], + model: this.l + }; + } + } + getAllSuggestions() { + if (this.c !== 0 && this.c !== 2 && this.c !== 1 && this.l) { + return this.l.items; + } + } + toggleDetailsFocus() { + if (this.c === 5) { + this.r.setFocus(this.r.getFocus()); + this.R(3); + } else if (this.c === 3) { + this.R(5); + if (this.X()) { + this.u.widget.focus(); + } else { + this.toggleDetails(true); + } + } + } + toggleDetails(e = false) { + if (this.X()) { + this.h.clear(); + this.y.set(false); + this.Y(false); + this.u.hide(); + this.element.domNode.classList.remove("shows-details"); + } else if ((uei(this.r.getFocusedElements()[0]) || this.o) && (this.c === 3 || this.c === 5 || this.c === 4)) { + this.y.set(true); + this.Y(true); + this.T(false, e); + } + } + T(e, t) { + this.h.value = f9(Kt(this.element.domNode), () => { + this.h.clear(); + this.u.show(); + let s = false; + if (e) { + this.u.widget.renderLoading(); + } else { + this.u.widget.renderItem(this.r.getFocusedElements()[0], this.o); + } + if (this.u.widget.isEmpty) { + this.u.hide(); + } else { + this.W(); + this.element.domNode.classList.add("shows-details"); + if (t) { + this.u.widget.focus(); + s = true; + } + } + if (!s) { + this.I.focus(); + } + }); + } + toggleExplainMode() { + if (this.r.getFocusedElements()[0]) { + this.o = !this.o; + if (this.X()) { + this.T(false, false); + } else { + this.toggleDetails(); + } + } + } + resetPersistedSize() { + this.w.reset(); + } + hideWidget() { + this.g.clear(); + this.h.clear(); + this.f?.dispose(); + this.R(0); + this.F.fire(this); + this.element.clearSashHoverState(); + const e = this.w.restore(); + const t = Math.ceil(this.getLayoutInfo().itemHeight * 4.3); + if (e && e.height < t) { + this.w.store(e.with(undefined, t)); + } + } + isFrozen() { + return this.c === 4; + } + _afterRender(e) { + if (e === null) { + if (this.X()) { + this.u.hide(); + } + return; + } + if (this.c !== 2 && this.c !== 1) { + if (this.X() && !this.u.widget.isEmpty) { + this.u.show(); + } + this.W(); + } + } + U(e) { + if (!this.I.hasModel() || !this.I.getDomNode()) { + return; + } + const t = zk(this.element.domNode.ownerDocument.body); + const s = this.getLayoutInfo(); + e ||= s.defaultSize; + let n = e.height; + let r = e.width; + this.s.element.style.height = `${s.itemHeight}px`; + if (this.c === 2 || this.c === 1) { + n = s.itemHeight + s.borderHeight; + r = s.defaultSize.width / 2; + this.element.enableSashes(false, false, false, false); + this.element.minSize = this.element.maxSize = new Ln(r, n); + this.v.setPreference(2); + } else { + const o = t.width - s.borderHeight - s.horizontalPadding * 2; + if (r > o) { + r = o; + } + const a = this.l ? this.l.stats.pLabelLen * s.typicalHalfwidthCharacterWidth : r; + const l = s.statusBarHeight + this.r.contentHeight + s.borderHeight; + const c = s.itemHeight + s.statusBarHeight; + const u = sd(this.I.getDomNode()); + const d = this.I.getScrolledVisiblePosition(this.I.getPosition()); + const h = u.top + d.top + d.height; + const g = Math.min(t.height - h - s.verticalPadding, l); + const p = u.top + d.top - s.verticalPadding; + const b = Math.min(p, l); + let v = Math.min(Math.max(b, g) + s.borderHeight, l); + if (n === this.m?.capped) { + n = this.m.wanted; + } + if (n < c) { + n = c; + } + if (n > v) { + n = v; + } + if (n > g || this.n && p > 150) { + this.v.setPreference(1); + this.element.enableSashes(true, true, false, false); + v = b; + } else { + this.v.setPreference(2); + this.element.enableSashes(false, true, true, false); + v = g; + } + this.element.preferredSize = new Ln(a, s.defaultSize.height); + this.element.maxSize = new Ln(o, v); + this.element.minSize = new Ln(220, c); + this.m = n === l ? { + wanted: this.m?.wanted ?? e.height, + capped: n + } : undefined; + } + this.V(r, n); + } + V(e, t) { + const { + width: s, + height: n + } = this.element.maxSize; + e = Math.min(s, e); + t = Math.min(n, t); + const { + statusBarHeight: r + } = this.getLayoutInfo(); + this.r.layout(t - r, e); + this.q.style.height = `${t - r}px`; + this.element.layout(t, e); + this.v.layout(); + this.W(); + } + W() { + if (this.X()) { + this.u.placeAtAnchor(this.element.domNode, this.v.getPosition()?.preference[0] === 2); + } + } + getLayoutInfo() { + const e = this.I.getOption(52); + const t = yc(this.I.getOption(125) || e.lineHeight, 8, 1000); + const s = !this.I.getOption(123).showStatusBar || this.c === 2 || this.c === 1 ? 0 : t; + const n = this.u.widget.borderWidth; + const r = n * 2; + return { + itemHeight: t, + statusBarHeight: s, + borderWidth: n, + borderHeight: r, + typicalHalfwidthCharacterWidth: e.typicalHalfwidthCharacterWidth, + verticalPadding: 22, + horizontalPadding: 14, + defaultSize: new Ln(430, s + t * 12 + r) + }; + } + X() { + return this.J.getBoolean("expandSuggestionDocs", 0, false); + } + Y(e) { + this.J.store("expandSuggestionDocs", e, 0, 0); + } + forceRenderingAbove() { + if (!this.n) { + this.n = true; + this.U(this.w.restore()); + } + } + stopForceRenderingAbove() { + this.n = false; + } +}; +gei = dre = __decorate([__param(1, ht), __param(2, Ne), __param(3, ti), __param(4, re)], gei); +var Gvr = class { + constructor(i, e) { + this.g = i; + this.h = e; + this.allowEditorOverflow = true; + this.suppressMouseDown = false; + this.c = false; + this.d = false; + this.f = false; + } + dispose() { + if (this.d) { + this.d = false; + this.h.removeContentWidget(this); + } + } + getId() { + return "editor.widget.suggestWidget"; + } + getDomNode() { + return this.g.element.domNode; + } + show() { + this.f = false; + if (!this.d) { + this.d = true; + this.h.addContentWidget(this); + } + } + hide() { + if (!this.f) { + this.f = true; + this.layout(); + } + } + layout() { + this.h.layoutContentWidget(this); + } + getPosition() { + if (this.f || !this.a || !this.b) { + return null; + } else { + return { + position: this.a, + preference: [this.b] + }; + } + } + beforeRender() { + const { + height: i, + width: e + } = this.g.element.size; + const { + borderWidth: t, + horizontalPadding: s + } = this.g.getLayoutInfo(); + return new Ln(e + t * 2 + s, i + t * 2); + } + afterRender(i) { + this.g._afterRender(i); + } + setPreference(i) { + if (!this.c) { + this.b = i; + } + } + lockPreference() { + this.c = true; + } + unlockPreference() { + this.c = false; + } + setPosition(i) { + this.a = i; + } +}; +ai(); +Et(); +Gl(); +xe(); +Ya(); +Cs(); +var pei; +var Kvr = false; +var Yvr = class { + constructor(i, e) { + this.d = i; + this.f = e; + this.a = Cr.register({ + description: "suggest-line-suffix", + stickiness: 1 + }); + if (i.getLineMaxColumn(e.lineNumber) !== e.column) { + const s = i.getOffsetAt(e); + const n = i.getPositionAt(s + 1); + i.changeDecorations(r => { + if (this.b) { + r.removeDecoration(this.b); + } + this.b = r.addDecoration(Z.fromPositions(e, n), this.a); + }); + } + } + dispose() { + if (this.b && !this.d.isDisposed()) { + this.d.changeDecorations(i => { + i.removeDecoration(this.b); + this.b = undefined; + }); + } + } + delta(i) { + if (this.d.isDisposed() || this.f.lineNumber !== i.lineNumber) { + return 0; + } + if (this.b) { + const e = this.d.getDecorationRange(this.b); + return this.d.getOffsetAt(e.getStartPosition()) - this.d.getOffsetAt(i); + } else { + return this.d.getLineMaxColumn(i.lineNumber) - i.column; + } + } +}; +var y3s; +(function (i) { + i[i.None = 0] = "None"; + i[i.NoBeforeUndoStop = 1] = "NoBeforeUndoStop"; + i[i.NoAfterUndoStop = 2] = "NoAfterUndoStop"; + i[i.KeepAlternativeSuggestions = 4] = "KeepAlternativeSuggestions"; + i[i.AlternativeOverwriteConfig = 8] = "AlternativeOverwriteConfig"; +})(y3s ||= {}); +var Pg = class { + static { + pei = this; + } + static { + this.ID = "editor.contrib.suggestController"; + } + static get(e) { + return e.getContribution(pei.ID); + } + constructor(e, t, s, n, r, o, a, l) { + this.k = t; + this.l = s; + this.m = n; + this.n = r; + this.o = o; + this.p = a; + this.q = l; + this.b = new ki(); + this.d = new Q(); + this.g = new Xvr(h => h.priority); + this.h = new B(); + this.onWillInsertSuggestItem = this.h.event; + this.j = new B(); + this.onFireCommand = this.j.event; + this.editor = e; + this.model = r.createInstance(Zmt, this.editor); + this.g.register({ + priority: 0, + select: (h, g, p) => this.k.select(h, g, p) + }); + const c = zo.InsertMode.bindTo(n); + c.set(e.getOption(123).insertMode); + this.d.add(this.model.onDidTrigger(() => c.set(e.getOption(123).insertMode))); + this.widget = this.d.add(new zB(Kt(e.getDomNode()), () => { + const h = this.n.createInstance(gei, this.editor); + this.d.add(h); + this.d.add(h.onDidSelect(y => this.r(y, 0), this)); + const g = new Ovr(this.editor, this.p, h, this.model, y => this.r(y, 2)); + this.d.add(g); + const p = zo.MakesTextEdit.bindTo(this.m); + const b = zo.HasInsertAndReplaceRange.bindTo(this.m); + const v = zo.CanResolve.bindTo(this.m); + this.d.add(Ue(() => { + p.reset(); + b.reset(); + v.reset(); + })); + this.d.add(h.onDidFocus(({ + item: y + }) => { + const w = this.editor.getPosition(); + const C = y.editStart.column; + const S = w.column; + let x = true; + if (this.editor.getOption(1) === "smart" && this.model.state === 2 && !y.completion.additionalTextEdits && !(y.completion.insertTextRules & 4) && S - C === y.completion.insertText.length) { + x = this.editor.getModel().getValueInRange({ + startLineNumber: w.lineNumber, + startColumn: C, + endLineNumber: w.lineNumber, + endColumn: S + }) !== y.completion.insertText; + } + p.set(x); + b.set(!je.equals(y.editInsertEnd, y.editReplaceEnd)); + v.set(!!y.provider.resolveCompletionItem || !!y.completion.documentation || y.completion.detail !== y.completion.label); + })); + this.d.add(h.onDetailsKeyDown(y => { + if (y.toKeyCodeChord().equals(new gx(true, false, false, false, 33)) || Gt && y.toKeyCodeChord().equals(new gx(false, false, false, true, 33))) { + y.stopPropagation(); + return; + } + if (!y.toKeyCodeChord().isModifierKey()) { + this.editor.focus(); + } + })); + return h; + })); + this.f = this.d.add(new zB(Kt(e.getDomNode()), () => this.d.add(new Uvr(this.editor, this.model)))); + this.a = this.d.add(new zB(Kt(e.getDomNode()), () => this.d.add(new lre(this.editor, this.m)))); + this.d.add(r.createInstance(Qmt, e)); + this.d.add(this.model.onDidTrigger(h => { + this.widget.value.showTriggered(h.auto, h.shy ? 250 : 50); + this.b.value = new Yvr(this.editor.getModel(), h.position); + })); + this.d.add(this.model.onDidSuggest(h => { + if (h.triggerOptions.shy) { + return; + } + let g = -1; + for (const b of this.g.itemsOrderedByPriorityDesc) { + g = b.select(this.editor.getModel(), this.editor.getPosition(), h.completionModel.items); + if (g !== -1) { + break; + } + } + if (g === -1) { + g = 0; + } + if (this.model.state === 0) { + return; + } + let p = false; + if (h.triggerOptions.auto) { + const b = this.editor.getOption(123); + if (b.selectionMode === "never" || b.selectionMode === "always") { + p = b.selectionMode === "never"; + } else if (b.selectionMode === "whenTriggerCharacter") { + p = h.triggerOptions.triggerKind !== 1; + } else if (b.selectionMode === "whenQuickSuggestion") { + p = h.triggerOptions.triggerKind === 1 && !h.triggerOptions.refilter; + } + } + this.widget.value.showSuggestions(h.completionModel, g, h.isFrozen, h.triggerOptions.auto, p); + })); + this.d.add(this.model.onDidCancel(h => { + if (!h.retrigger) { + this.widget.value.hideWidget(); + } + })); + this.d.add(this.editor.onDidBlurEditorWidget(() => { + if (!Kvr) { + this.model.cancel(); + this.model.clear(); + } + })); + const u = zo.AcceptSuggestionsOnEnter.bindTo(n); + const d = () => { + const h = this.editor.getOption(1); + u.set(h === "on" || h === "smart"); + }; + this.d.add(this.editor.onDidChangeConfiguration(() => d())); + d(); + } + dispose() { + this.a.dispose(); + this.d.dispose(); + this.widget.dispose(); + this.model.dispose(); + this.b.dispose(); + this.h.dispose(); + } + r(e, t) { + if (!e || !e.item) { + this.a.value.reset(); + this.model.cancel(); + this.model.clear(); + return; + } + if (!this.editor.hasModel()) { + return; + } + const s = Yh.get(this.editor); + if (!s) { + return; + } + this.h.fire({ + item: e.item + }); + const n = this.editor.getModel(); + const r = n.getAlternativeVersionId(); + const { + item: o + } = e; + const a = []; + const l = new Xi(); + if (!(t & 1)) { + this.editor.pushUndoStop(); + } + const c = this.getOverwriteInfo(o, !!(t & 8)); + this.k.memorize(n, this.editor.getPosition(), o); + const u = o.isResolved; + let d = -1; + let h = -1; + if (Array.isArray(o.completion.additionalTextEdits)) { + this.model.cancel(); + const p = fO.capture(this.editor); + this.editor.executeEdits("suggestController.additionalTextEdits.sync", o.completion.additionalTextEdits.map(b => { + let v = Z.lift(b.range); + if (v.startLineNumber === o.position.lineNumber && v.startColumn > o.position.column) { + const y = this.editor.getPosition().column - o.position.column; + const w = y; + const C = Z.spansMultipleLines(v) ? 0 : y; + v = new Z(v.startLineNumber, v.startColumn + w, v.endLineNumber, v.endColumn + C); + } + return Ua.replaceMove(v, b.text); + })); + p.restoreRelativeVerticalPositionOfCursor(this.editor); + } else if (!u) { + const p = new ic(); + let b; + const v = n.onDidChangeContent(S => { + if (S.isFlush) { + l.cancel(); + v.dispose(); + return; + } + for (const x of S.changes) { + const k = Z.getEndPosition(x.range); + if (!b || je.isBefore(k, b)) { + b = k; + } + } + }); + const y = t; + t |= 2; + let w = false; + const C = this.editor.onWillType(() => { + C.dispose(); + w = true; + if (!(y & 2)) { + this.editor.pushUndoStop(); + } + }); + a.push(o.resolve(l.token).then(() => { + if (!o.completion.additionalTextEdits || l.token.isCancellationRequested) { + return; + } + if (b && o.completion.additionalTextEdits.some(x => je.isBefore(b, Z.getStartPosition(x.range)))) { + return false; + } + if (w) { + this.editor.pushUndoStop(); + } + const S = fO.capture(this.editor); + this.editor.executeEdits("suggestController.additionalTextEdits.async", o.completion.additionalTextEdits.map(x => Ua.replaceMove(Z.lift(x.range), x.text))); + S.restoreRelativeVerticalPositionOfCursor(this.editor); + if (w || !(y & 2)) { + this.editor.pushUndoStop(); + } + return true; + }).then(S => { + this.o.trace("[suggest] async resolving of edits DONE (ms, applied?)", p.elapsed(), S); + h = S === true ? 1 : S === false ? 0 : -2; + }).finally(() => { + v.dispose(); + C.dispose(); + })); + } + let { + insertText: g + } = o.completion; + if (!(o.completion.insertTextRules & 4)) { + g = oE.escape(g); + } + this.model.cancel(); + s.insert(g, { + overwriteBefore: c.overwriteBefore, + overwriteAfter: c.overwriteAfter, + undoStopBefore: false, + undoStopAfter: false, + adjustWhitespace: !(o.completion.insertTextRules & 1), + clipboardText: e.model.clipboardText, + overtypingCapturer: this.f.value + }); + if (!(t & 2)) { + this.editor.pushUndoStop(); + } + if (o.completion.command) { + if (o.completion.command.id === mei.id) { + this.model.trigger({ + auto: true, + retrigger: true + }); + } else { + this.j.fire(o.completion.command); + const p = new ic(); + a.push(this.l.executeCommand(o.completion.command.id, ...(o.completion.command.arguments ? [...o.completion.command.arguments] : [])).catch(b => { + if (o.completion.extensionId) { + uh(b); + } else { + xs(b); + } + }).finally(() => { + d = p.elapsed(); + })); + } + } + if (t & 4) { + this.a.value.set(e, p => { + for (l.cancel(); n.canUndo();) { + if (r !== n.getAlternativeVersionId()) { + n.undo(); + } + this.r(p, (t & 8 ? 8 : 0) | 3); + break; + } + }); + } + this.u(o); + Promise.all(a).finally(() => { + this.t(o, n, u, d, h, e.index, e.model.items); + this.model.clear(); + l.dispose(); + }); + } + t(e, t, s, n, r, o, a) { + if (Math.floor(Math.random() * 100) === 0) { + return; + } + const l = new Map(); + for (let h = 0; h < Math.min(30, a.length); h++) { + const g = a[h].textLabel; + if (l.has(g)) { + l.get(g).push(h); + } else { + l.set(g, [h]); + } + } + const c = l.get(e.textLabel); + const d = c && c.length > 1 ? c[0] : -1; + this.q.publicLog2("suggest.acceptedSuggestion", { + extensionId: e.extensionId?.value ?? "unknown", + providerId: e.provider._debugDisplayName ?? "unknown", + kind: e.completion.kind, + basenameHash: Qc(ji(t.uri)).toString(16), + languageId: t.getLanguageId(), + fileExtension: _d(t.uri), + resolveInfo: e.provider.resolveCompletionItem ? s ? 1 : 0 : -1, + resolveDuration: e.resolveDuration, + commandDuration: n, + additionalEditsAsync: r, + index: o, + firstIndex: d + }); + } + getOverwriteInfo(e, t) { + yr(this.editor.hasModel()); + let s = this.editor.getOption(123).insertMode === "replace"; + if (t) { + s = !s; + } + const n = e.position.column - e.editStart.column; + const r = (s ? e.editReplaceEnd.column : e.editInsertEnd.column) - e.position.column; + const o = this.editor.getPosition().column - e.position.column; + const a = this.b.value ? this.b.value.delta(this.editor.getPosition()) : 0; + return { + overwriteBefore: n + o, + overwriteAfter: r + a + }; + } + u(e) { + if (Ac(e.completion.additionalTextEdits)) { + const t = f(1504, null, e.textLabel, e.completion.additionalTextEdits.length); + Fc(t); + } + } + triggerSuggest(e, t, s) { + if (this.editor.hasModel()) { + this.model.trigger({ + auto: t ?? false, + completionOptions: { + providerFilter: e, + kindFilter: s ? new Set() : undefined + } + }); + this.editor.revealPosition(this.editor.getPosition(), 0); + this.editor.focus(); + } + } + triggerSuggestAndAcceptBest(e) { + if (!this.editor.hasModel()) { + return; + } + const t = this.editor.getPosition(); + const s = () => { + if (t.equals(this.editor.getPosition())) { + this.l.executeCommand(e.fallback); + } + }; + const n = r => { + if (r.completion.insertTextRules & 4 || r.completion.additionalTextEdits) { + return true; + } + const o = this.editor.getPosition(); + const a = r.editStart.column; + const l = o.column; + if (l - a !== r.completion.insertText.length) { + return true; + } else { + return this.editor.getModel().getValueInRange({ + startLineNumber: o.lineNumber, + startColumn: a, + endLineNumber: o.lineNumber, + endColumn: l + }) !== r.completion.insertText; + } + }; + de.once(this.model.onDidTrigger)(r => { + const o = []; + de.any(this.model.onDidTrigger, this.model.onDidCancel)(() => { + si(o); + s(); + }, undefined, o); + this.model.onDidSuggest(({ + completionModel: a + }) => { + si(o); + if (a.items.length === 0) { + s(); + return; + } + const l = this.k.select(this.editor.getModel(), this.editor.getPosition(), a.items); + const c = a.items[l]; + if (!n(c)) { + s(); + return; + } + this.editor.pushUndoStop(); + this.r({ + index: l, + item: c, + model: a + }, 7); + }, undefined, o); + }); + this.model.trigger({ + auto: false, + shy: true + }); + this.editor.revealPosition(t, 0); + this.editor.focus(); + } + acceptSelectedSuggestion(e, t) { + const s = this.widget.value.getFocusedItem(); + let n = 0; + if (e) { + n |= 4; + } + if (t) { + n |= 8; + } + this.r(s, n); + } + acceptNextSuggestion() { + this.a.value.next(); + } + acceptPrevSuggestion() { + this.a.value.prev(); + } + cancelSuggestWidget() { + this.model.cancel(); + this.model.clear(); + this.widget.value.hideWidget(); + } + focusSuggestion() { + this.widget.value.focusSelected(); + } + selectNextSuggestion() { + this.widget.value.selectNext(); + } + selectNextPageSuggestion() { + this.widget.value.selectNextPage(); + } + selectLastSuggestion() { + this.widget.value.selectLast(); + } + selectPrevSuggestion() { + this.widget.value.selectPrevious(); + } + selectPrevPageSuggestion() { + this.widget.value.selectPreviousPage(); + } + selectFirstSuggestion() { + this.widget.value.selectFirst(); + } + toggleSuggestionDetails() { + this.widget.value.toggleDetails(); + } + toggleExplainMode() { + this.widget.value.toggleExplainMode(); + } + toggleSuggestionFocus() { + this.widget.value.toggleDetailsFocus(); + } + resetWidgetSize() { + this.widget.value.resetPersistedSize(); + } + forceRenderingAbove() { + this.widget.value.forceRenderingAbove(); + } + stopForceRenderingAbove() { + if (this.widget.isInitialized) { + this.widget.value.stopForceRenderingAbove(); + } + } + registerSelector(e) { + return this.g.register(e); + } +}; +Pg = pei = __decorate([__param(1, Xmt), __param(2, gt), __param(3, Ne), __param(4, re), __param(5, Bt), __param(6, _i), __param(7, Ot)], Pg); +var Xvr = class { + constructor(i) { + this.b = i; + this.a = new Array(); + } + register(i) { + if (this.a.indexOf(i) !== -1) { + throw new Error("Value is already registered"); + } + this.a.push(i); + this.a.sort((e, t) => this.b(t) - this.b(e)); + return { + dispose: () => { + const e = this.a.indexOf(i); + if (e >= 0) { + this.a.splice(e, 1); + } + } + }; + } + get itemsOrderedByPriorityDesc() { + return this.a; + } +}; +var mei = class $_n extends Es { + static { + this.id = "editor.action.triggerSuggest"; + } + constructor() { + super({ + id: $_n.id, + label: W(1512, "Trigger Suggest"), + precondition: T.and(ke.writable, ke.hasCompletionItemProvider, zo.Visible.toNegated()), + kbOpts: { + kbExpr: ke.textInputFocus, + primary: 2058, + secondary: [2087], + mac: { + primary: 266, + secondary: [521, 2087] + }, + weight: 100 + } + }); + } + run(e, t, s) { + const n = Pg.get(t); + if (!n) { + return; + } + let r; + if (s && typeof s == "object" && s.auto === true) { + r = true; + } + n.triggerSuggest(undefined, r, undefined); + } +}; +bo(Pg.ID, Pg, 2); +Oi(mei); +var SD = 190; +var M1 = Wm.bindToContribution(Pg.get); +Sn(new M1({ + id: "acceptSelectedSuggestion", + precondition: T.and(zo.Visible, zo.HasFocusedSuggestion), + handler(i) { + i.acceptSelectedSuggestion(true, false); + }, + kbOpts: [{ + primary: 2, + kbExpr: T.and(zo.Visible, ke.textInputFocus), + weight: SD + }, { + primary: 3, + kbExpr: T.and(zo.Visible, ke.textInputFocus, zo.AcceptSuggestionsOnEnter, zo.MakesTextEdit), + weight: SD + }], + menuOpts: [{ + menuId: XU, + title: f(1505, null), + group: "left", + order: 1, + when: zo.HasInsertAndReplaceRange.toNegated() + }, { + menuId: XU, + title: f(1506, null), + group: "left", + order: 1, + when: T.and(zo.HasInsertAndReplaceRange, zo.InsertMode.isEqualTo("insert")) + }, { + menuId: XU, + title: f(1507, null), + group: "left", + order: 1, + when: T.and(zo.HasInsertAndReplaceRange, zo.InsertMode.isEqualTo("replace")) + }] +})); +Sn(new M1({ + id: "acceptAlternativeSelectedSuggestion", + precondition: T.and(zo.Visible, ke.textInputFocus, zo.HasFocusedSuggestion), + kbOpts: { + weight: SD, + kbExpr: ke.textInputFocus, + primary: 1027, + secondary: [1026] + }, + handler(i) { + i.acceptSelectedSuggestion(false, true); + }, + menuOpts: [{ + menuId: XU, + group: "left", + order: 2, + when: T.and(zo.HasInsertAndReplaceRange, zo.InsertMode.isEqualTo("insert")), + title: f(1508, null) + }, { + menuId: XU, + group: "left", + order: 2, + when: T.and(zo.HasInsertAndReplaceRange, zo.InsertMode.isEqualTo("replace")), + title: f(1509, null) + }] +})); +ei.registerCommandAlias("acceptSelectedSuggestionOnEnter", "acceptSelectedSuggestion"); +Sn(new M1({ + id: "hideSuggestWidget", + precondition: zo.Visible, + handler: i => i.cancelSuggestWidget(), + kbOpts: { + weight: SD, + kbExpr: ke.textInputFocus, + primary: 9, + secondary: [1033] + } +})); +Sn(new M1({ + id: "selectNextSuggestion", + precondition: T.and(zo.Visible, T.or(zo.MultipleSuggestions, zo.HasFocusedSuggestion.negate())), + handler: i => i.selectNextSuggestion(), + kbOpts: { + weight: SD, + kbExpr: ke.textInputFocus, + primary: 18, + secondary: [2066], + mac: { + primary: 18, + secondary: [2066, 300] + } + } +})); +Sn(new M1({ + id: "selectNextPageSuggestion", + precondition: T.and(zo.Visible, T.or(zo.MultipleSuggestions, zo.HasFocusedSuggestion.negate())), + handler: i => i.selectNextPageSuggestion(), + kbOpts: { + weight: SD, + kbExpr: ke.textInputFocus, + primary: 12, + secondary: [2060] + } +})); +Sn(new M1({ + id: "selectLastSuggestion", + precondition: T.and(zo.Visible, T.or(zo.MultipleSuggestions, zo.HasFocusedSuggestion.negate())), + handler: i => i.selectLastSuggestion() +})); +Sn(new M1({ + id: "selectPrevSuggestion", + precondition: T.and(zo.Visible, T.or(zo.MultipleSuggestions, zo.HasFocusedSuggestion.negate())), + handler: i => i.selectPrevSuggestion(), + kbOpts: { + weight: SD, + kbExpr: ke.textInputFocus, + primary: 16, + secondary: [2064], + mac: { + primary: 16, + secondary: [2064, 302] + } + } +})); +Sn(new M1({ + id: "selectPrevPageSuggestion", + precondition: T.and(zo.Visible, T.or(zo.MultipleSuggestions, zo.HasFocusedSuggestion.negate())), + handler: i => i.selectPrevPageSuggestion(), + kbOpts: { + weight: SD, + kbExpr: ke.textInputFocus, + primary: 11, + secondary: [2059] + } +})); +Sn(new M1({ + id: "selectFirstSuggestion", + precondition: T.and(zo.Visible, T.or(zo.MultipleSuggestions, zo.HasFocusedSuggestion.negate())), + handler: i => i.selectFirstSuggestion() +})); +Sn(new M1({ + id: "focusSuggestion", + precondition: T.and(zo.Visible, zo.HasFocusedSuggestion.negate()), + handler: i => i.focusSuggestion(), + kbOpts: { + weight: SD, + kbExpr: ke.textInputFocus, + primary: 2058, + secondary: [2087], + mac: { + primary: 266, + secondary: [2087] + } + } +})); +Sn(new M1({ + id: "focusAndAcceptSuggestion", + precondition: T.and(zo.Visible, zo.HasFocusedSuggestion.negate()), + handler: i => { + i.focusSuggestion(); + i.acceptSelectedSuggestion(true, false); + } +})); +Sn(new M1({ + id: "toggleSuggestionDetails", + precondition: T.and(zo.Visible, zo.HasFocusedSuggestion), + handler: i => i.toggleSuggestionDetails(), + kbOpts: { + weight: SD, + kbExpr: ke.textInputFocus, + primary: 2058, + secondary: [2087], + mac: { + primary: 266, + secondary: [2087] + } + }, + menuOpts: [{ + menuId: XU, + group: "right", + order: 1, + when: T.and(zo.DetailsVisible, zo.CanResolve), + title: f(1510, null) + }, { + menuId: XU, + group: "right", + order: 1, + when: T.and(zo.DetailsVisible.toNegated(), zo.CanResolve), + title: f(1511, null) + }] +})); +Sn(new M1({ + id: "toggleExplainMode", + precondition: zo.Visible, + handler: i => i.toggleExplainMode(), + kbOpts: { + weight: 100, + primary: 2138 + } +})); +Sn(new M1({ + id: "toggleSuggestionFocus", + precondition: zo.Visible, + handler: i => i.toggleSuggestionFocus(), + kbOpts: { + weight: SD, + kbExpr: ke.textInputFocus, + primary: 2570, + mac: { + primary: 778 + } + } +})); +Sn(new M1({ + id: "insertBestCompletion", + precondition: T.and(ke.textInputFocus, T.equals("config.editor.tabCompletion", "on"), Qmt.AtEnd, zo.Visible.toNegated(), lre.OtherSuggestions.toNegated(), Yh.InSnippetMode.toNegated()), + handler: (i, e) => { + i.triggerSuggestAndAcceptBest(xo(e) ? { + fallback: "tab", + ...e + } : { + fallback: "tab" + }); + }, + kbOpts: { + weight: SD, + primary: 2 + } +})); +Sn(new M1({ + id: "insertNextSuggestion", + precondition: T.and(ke.textInputFocus, T.equals("config.editor.tabCompletion", "on"), lre.OtherSuggestions, zo.Visible.toNegated(), Yh.InSnippetMode.toNegated()), + handler: i => i.acceptNextSuggestion(), + kbOpts: { + weight: SD, + kbExpr: ke.textInputFocus, + primary: 2 + } +})); +Sn(new M1({ + id: "insertPrevSuggestion", + precondition: T.and(ke.textInputFocus, T.equals("config.editor.tabCompletion", "on"), lre.OtherSuggestions, zo.Visible.toNegated(), Yh.InSnippetMode.toNegated()), + handler: i => i.acceptPrevSuggestion(), + kbOpts: { + weight: SD, + kbExpr: ke.textInputFocus, + primary: 1026 + } +})); +Oi(class extends Es { + constructor() { + super({ + id: "editor.action.resetSuggestSize", + label: W(1513, "Reset Suggest Widget Size"), + precondition: undefined + }); + } + run(i, e) { + Pg.get(e)?.resetWidgetSize(); + } +}); +An(); +var Qvr = class extends H { + get selectedItem() { + return this.h; + } + constructor(i, e, t) { + super(); + this.m = i; + this.n = e; + this.q = t; + this.c = false; + this.f = false; + this.g = false; + this.h = undefined; + this.j = this.D(new B()); + this.onDidSelectedItemChange = this.j.event; + this.D(i.onKeyDown(n => { + if (n.shiftKey && !this.f) { + this.f = true; + this.r(this.g); + } + })); + this.D(i.onKeyUp(n => { + if (n.shiftKey && this.f) { + this.f = false; + this.r(this.g); + } + })); + const s = Pg.get(this.m); + if (s) { + this.D(s.registerSelector({ + priority: 100, + select: (o, a, l) => { + const c = this.m.getModel(); + if (!c) { + return -1; + } + const u = this.n(); + const d = u ? ZU(u, c) : undefined; + if (!d) { + return -1; + } + const h = je.lift(a); + const g = l.map((b, v) => { + const y = bei.fromSuggestion(s, c, h, b, this.f); + const w = ZU(y.toSingleTextEdit(), c); + const C = z8s(d, w); + return { + index: v, + valid: C, + prefixLength: w.text.length, + suggestItem: b + }; + }).filter(b => b && b.valid && b.prefixLength > 0); + const p = _Bt(g, jg(b => b.prefixLength, Ly)); + if (p) { + return p.index; + } else { + return -1; + } + } + })); + let n = false; + const r = () => { + if (!n) { + n = true; + this.D(s.widget.value.onDidShow(() => { + this.c = true; + this.r(true); + })); + this.D(s.widget.value.onDidHide(() => { + this.c = false; + this.r(false); + })); + this.D(s.widget.value.onDidFocus(() => { + this.c = true; + this.r(true); + })); + } + }; + this.D(de.once(s.model.onDidTrigger)(o => { + r(); + })); + this.D(s.onWillInsertSuggestItem(o => { + const a = this.m.getPosition(); + const l = this.m.getModel(); + if (!a || !l) { + return; + } + const c = bei.fromSuggestion(s, l, a, o.item, this.f); + this.q(c); + })); + } + this.r(this.g); + } + r(i) { + const e = this.t(); + if (this.g !== i || !Zvr(this.h, e)) { + this.g = i; + this.h = e; + this.j.fire(); + } + } + t() { + const i = Pg.get(this.m); + if (!i || !this.c) { + return; + } + const e = i.widget.value.getFocusedItem(); + const t = this.m.getPosition(); + const s = this.m.getModel(); + if (!!e && !!t && !!s) { + return bei.fromSuggestion(i, s, t, e.item, this.f); + } + } + stopForceRenderingAbove() { + Pg.get(this.m)?.stopForceRenderingAbove(); + } + forceRenderingAbove() { + Pg.get(this.m)?.forceRenderingAbove(); + } +}; +var bei = class F_n { + static fromSuggestion(e, t, s, n, r) { + let { + insertText: o + } = n.completion; + let a = false; + if (n.completion.insertTextRules & 4) { + const c = new oE().parse(o); + if (c.children.length < 100) { + zmt.adjustWhitespace(t, s, true, c); + } + o = c.toString(); + a = true; + } + const l = e.getOverwriteInfo(n, r); + return new F_n(Z.fromPositions(s.delta(0, -l.overwriteBefore), s.delta(0, Math.max(l.overwriteAfter, 0))), o, n.completion.kind, a); + } + constructor(e, t, s, n) { + this.range = e; + this.insertText = t; + this.completionItemKind = s; + this.isSnippetText = n; + } + equals(e) { + return this.range.equalsRange(e.range) && this.insertText === e.insertText && this.completionItemKind === e.completionItemKind && this.isSnippetText === e.isSnippetText; + } + toSelectedSuggestionInfo() { + return new sis(this.range, this.insertText, this.completionItemKind, this.isSnippetText); + } + toSingleTextEdit() { + return new im(this.range, this.insertText); + } +}; +function Zvr(i, e) { + if (i === e) { + return true; + } else if (!i || !e) { + return false; + } else { + return i.equals(e); + } +} +var eyr = class extends H { + constructor(i, e, t) { + super(); + this.f = i; + this.g = e; + this.h = t; + this.c = this.D(new Qvr(this.f.editor, () => { + this.f.forceUpdate(); + return this.h(); + }, s => this.f.forceUpdate(n => { + this.g(s); + }))); + this.selectedItem = Ro(this, s => this.c.onDidSelectedItemChange(() => { + this.f.forceUpdate(n => s(undefined)); + }), () => this.c.selectedItem); + } + stopForceRenderingAbove() { + this.c.stopForceRenderingAbove(); + } + forceRenderingAbove() { + this.c.forceRenderingAbove(); + } +}; +md(); +q(); +An(); +function tyr(i) { + const e = new Q(); + const t = e.add(Ojn()); + e.add(Dn(s => { + t.setStyle(i.read(s)); + })); + return e; +} +q(); +An(); +te(); +KL(); +pe(); +q(); +An(); +$i(); +s1(); +Qd(); +Rs(); +yt(); +mM(); +wn(); +gc(); +RT(); +Aj(); +Fj(); +var vei = class extends H { + constructor(e, t, s) { + super(); + this.c = e; + this.f = t; + this.g = s; + this.a = un(this, false); + this.b = ay(this.c); + this.h = this.b.getOption(64).map(n => n.syntaxHighlightingEnabled); + this.j = Is(this, n => { + if (this.a.read(n)) { + return; + } + const r = this.b.model.read(n); + if (r !== this.f.targetTextModel.read(n)) { + return; + } + const o = this.f.ghostText.read(n); + if (!o) { + return; + } + const a = o instanceof sei ? o.columnRange : undefined; + const l = this.h.read(n); + const c = l ? " syntax-highlighted" : ""; + const { + inlineTexts: u, + additionalLines: d, + hiddenRange: h + } = iyr(o, r, "ghost-text" + c); + const g = new gO(u.map(w => aP.insert(w.column - 1, w.text))); + const p = l ? r.tokenization.tokenizeLineWithEdit(o.lineNumber, new XZt(g, d.map(w => w.content))) : undefined; + const b = g.getNewTextRanges(); + const v = u.map((w, C) => ({ + ...w, + tokens: p?.mainLineTokens?.getTokensInRange(b[C]) + })); + const y = d.map((w, C) => ({ + content: p?.additionalLines?.[C] ?? Kb.createEmpty(w.content, this.g.languageIdCodec), + decorations: w.decorations + })); + return { + replacedRange: a, + inlineTexts: v, + additionalLines: y, + hiddenRange: h, + lineNumber: o.lineNumber, + additionalReservedLineCount: this.f.minReservedLineCount.read(n), + targetTextModel: r, + syntaxHighlightingEnabled: l + }; + }); + this.m = Is(this, n => { + const r = this.j.read(n); + if (!r) { + return []; + } + const o = []; + const a = r.syntaxHighlightingEnabled ? " syntax-highlighted" : ""; + if (r.replacedRange) { + o.push({ + range: r.replacedRange.toRange(r.lineNumber), + options: { + inlineClassName: "inline-completion-text-to-replace" + a, + description: "GhostTextReplacement" + } + }); + } + if (r.hiddenRange) { + o.push({ + range: r.hiddenRange.toRange(r.lineNumber), + options: { + inlineClassName: "ghost-text-hidden", + description: "ghost-text-hidden" + } + }); + } + for (const l of r.inlineTexts) { + o.push({ + range: Z.fromPositions(new je(r.lineNumber, l.column)), + options: { + description: "ghost-text-decoration", + after: { + content: l.text, + tokens: l.tokens, + inlineClassName: l.preview ? "ghost-text-decoration-preview" : "ghost-text-decoration" + a, + cursorStops: l1.Left + }, + showIfCollapsed: true + } + }); + } + return o; + }); + this.n = this.D(new syr(this.c, Is(n => { + const r = this.j.read(n); + if (r) { + return { + lineNumber: r.lineNumber, + additionalLines: r.additionalLines, + minReservedLineCount: r.additionalReservedLineCount, + targetTextModel: r.targetTextModel + }; + } else { + return undefined; + } + }))); + this.D(Ue(() => { + this.a.set(true, undefined); + })); + this.D(this.b.setDecorations(this.m)); + } + ownsViewZone(e) { + return this.n.viewZoneId === e; + } +}; +vei = __decorate([__param(2, As)], vei); +function iyr(i, e, t) { + const s = []; + const n = []; + function r(u, d) { + if (n.length > 0) { + const h = n[n.length - 1]; + if (d) { + h.decorations.push(new eE(h.content.length + 1, h.content.length + 1 + u[0].length, d, 0)); + } + h.content += u[0]; + u = u.slice(1); + } + for (const h of u) { + n.push({ + content: h, + decorations: d ? [new eE(1, h.length + 1, d, 0)] : [] + }); + } + } + const o = e.getLineContent(i.lineNumber); + let a; + let l = 0; + for (const u of i.parts) { + let d = u.lines; + if (a === undefined) { + s.push({ + column: u.column, + text: d[0], + preview: u.preview + }); + d = d.slice(1); + } else { + r([o.substring(l, u.column - 1)], undefined); + } + if (d.length > 0) { + r(d, t); + if (a === undefined && u.column <= o.length) { + a = u.column; + } + } + l = u.column - 1; + } + if (a !== undefined) { + r([o.substring(l)], undefined); + } + const c = a !== undefined ? new Hmt(a, o.length + 1) : undefined; + return { + inlineTexts: s, + additionalLines: n, + hiddenRange: c + }; +} +var syr = class extends H { + get viewZoneId() { + return this.a; + } + constructor(i, e) { + super(); + this.c = i; + this.f = e; + this.a = undefined; + this.b = Wy("editorOptionChanged", de.filter(this.c.onDidChangeConfiguration, t => t.hasChanged(33) || t.hasChanged(122) || t.hasChanged(104) || t.hasChanged(99) || t.hasChanged(53) || t.hasChanged(52) || t.hasChanged(68))); + this.D(Dn(t => { + const s = this.f.read(t); + this.b.read(t); + if (s) { + this.h(s.lineNumber, s.additionalLines, s.minReservedLineCount); + } else { + this.g(); + } + })); + } + dispose() { + super.dispose(); + this.g(); + } + g() { + this.c.changeViewZones(i => { + if (this.a) { + i.removeZone(this.a); + this.a = undefined; + } + }); + } + h(i, e, t) { + const s = this.c.getModel(); + if (!s) { + return; + } + const { + tabSize: n + } = s.getOptions(); + this.c.changeViewZones(r => { + if (this.a) { + r.removeZone(this.a); + this.a = undefined; + } + const o = Math.max(e.length, t); + if (o > 0) { + const a = document.createElement("div"); + nyr(a, n, e, this.c.getOptions()); + this.a = r.addZone({ + afterLineNumber: i, + heightInLines: o, + domNode: a, + afterColumnAffinity: 1 + }); + } + }); + } +}; +function nyr(i, e, t, s) { + const n = s.get(33); + const r = s.get(122); + const o = "none"; + const a = s.get(99); + const l = s.get(53); + const c = s.get(52); + const u = s.get(68); + const d = new UL(10000); + d.appendString("
    "); + for (let p = 0, b = t.length; p < b; p++) { + const v = t[p]; + const y = v.content; + d.appendString("
    "); + const w = y.getLineContent(); + const C = Bq(w); + const S = t9(w); + $j(new $9(c.isMonospace && !n, c.canUseHalfwidthRightwardsArrow, w, false, C, S, 0, y, v.decorations, e, 0, c.spaceWidth, c.middotWidth, c.wsmiddotWidth, r, o, a, l !== t4.OFF, null), d); + d.appendString("
    "); + } + d.appendString("
    "); + Hm(i, c); + const h = d.build(); + const g = tbt ? tbt.createHTML(h) : h; + i.innerHTML = g; +} +function ryr(i, e, t, s, n = false, r = "view-line") { + const o = s.get(33); + const a = s.get(122); + const l = "none"; + const c = s.get(99); + const u = s.get(53); + const d = s.get(52); + const h = s.get(68); + const g = new UL(10000); + g.appendString("
    "); + for (let v = 0, y = t.length; v < y; v++) { + const w = t[v]; + const C = w.content; + if (n && C === "") { + g.appendString("
    "); + continue; + } + g.appendString("
    "); + } else { + g.appendString("px;width:1000000px;\">"); + } + const S = Bq(C); + const x = t9(C); + $j(new $9(d.isMonospace && !o, d.canUseHalfwidthRightwardsArrow, C, false, S, x, 0, w.lineTokens, w.decorations, e, 0, d.spaceWidth, d.middotWidth, d.wsmiddotWidth, a, l, c, u !== t4.OFF, null), g); + g.appendString("
    "); + } + g.appendString("
    "); + Hm(i, d); + const p = g.build(); + const b = tbt ? tbt.createHTML(p) : p; + i.innerHTML = b; +} +var tbt = GL("editorGhostText", { + createHTML: i => i +}); +UZ(); +ri(); +y4(); +q(); +An(); +te(); +TM(); +Rn(); +xe(); +q(); +An(); +Je(); +te(); +Nf(); +yt(); +Ya(); +q(); +An(); +yt(); +Ya(); +MI(); +xe(); +LF(); +Jt(); +qg(); +rt(); +$i(); +Le(); +jp(); +yt(); +Rs(); +function w3s(i, e, t) { + i.layoutInfo.read(t); + i.value.read(t); + const s = i.model.read(t); + if (!s) { + return 0; + } + let n = 0; + i.scrollTop.read(t); + for (let o = e.startLineNumber; o < e.endLineNumberExclusive; o++) { + const a = s.getLineMaxColumn(o); + const l = i.editor.getOffsetForColumn(o, a); + n = Math.max(n, l); + } + const r = e.mapToLineArray(o => s.getLineContent(o)); + if (n < 5 && r.some(o => o.length > 0) && s.uri.scheme !== "file") { + console.error("unexpected width"); + } + return n; +} +function oyr(i, e, t) { + i.layoutInfo.read(t); + i.value.read(t); + if (i.model.read(t)) { + i.scrollTop.read(t); + return i.editor.getOffsetForColumn(e.lineNumber, e.column); + } else { + return 0; + } +} +var ayr = class extends Eb { + constructor() { + super(...arguments); + this.b = this.D(this.db.onDidChangeContext(() => { + this.z(); + })); + } + z() { + const i = this.bb.lookupKeybinding(this._action.id, this.db, true); + if (!i) { + return super.z(); + } + if (this.L) { + const e = Ts("div.keybinding").root; + this.D(new oR(e, Ia, { + disableTitle: true, + ...SVt + })).set(i); + this.L.textContent = this._action.label; + this.L.appendChild(e); + this.L.classList.add("inlineSuggestionStatusBarItemLabel"); + } + } + G() {} +}; +var hre = class BFt { + constructor(e, t) { + this.x = e; + this.y = t; + } + add(e) { + return new BFt(this.x + e.x, this.y + e.y); + } + deltaX(e) { + return new BFt(this.x + e, this.y); + } + deltaY(e) { + return new BFt(this.x, this.y + e); + } +}; +var lyr = class O_n { + static { + this.a = 0; + } + constructor(e) { + this.scheme = e; + } + getUniqueUri() { + return V.from({ + scheme: this.scheme, + path: new Date().toString() + String(O_n.a++) + }); + } +}; +function cyr(i, e) { + const t = []; + for (const s of i) { + const n = e.mapRange(s.modifiedRange); + t.push(new Kx(s.originalRange, n)); + } + return t; +} +function uyr(...i) { + return i.filter(e => typeof e == "string").join(" "); +} +function dyr(i, e) { + return new Z(e.lineNumber, e.column + i.start, e.lineNumber, e.column + i.endExclusive); +} +function hyr(i, e) { + const t = Ov(i); + const s = []; + const n = ZHi(e.mapToLineArray(r => KVn(t[r - 1])), Ly); + e.forEach(r => { + s.push(new im(dyr(new uo(0, n), new je(r, 1)), "")); + }); + return new pO(s); +} +var ibt = class { + constructor() { + this.a = ""; + } + moveTo(i) { + this.a += `M ${i.x} ${i.y} `; + return this; + } + lineTo(i) { + this.a += `L ${i.x} ${i.y} `; + return this; + } + curveTo(i, e) { + this.a += `Q ${i.x} ${i.y} ${e.x} ${e.y} `; + return this; + } + curveTo2(i, e, t) { + this.a += `C ${i.x} ${i.y} ${e.x} ${e.y} ${t.x} ${t.y} `; + return this; + } + build() { + return this.a; + } +}; +var C3s = class extends H { + static supportsInlineDiffRendering(i) { + return S3s(i); + } + constructor(i, e, t) { + super(); + this.a = i; + this.b = e; + this.f = t; + this.g = Is(this, a => { + const l = this.b.read(a); + if (!l) { + return; + } + const c = l.modifiedText; + const u = l.mode === "mixedLines"; + const d = true; + const h = []; + const g = []; + const p = Cr.register({ + className: "inlineCompletions-line-insert", + description: "line-insert", + isWholeLine: true, + marginClassName: "gutter-insert" + }); + const b = Cr.register({ + className: "inlineCompletions-line-delete", + description: "line-delete", + isWholeLine: true, + marginClassName: "gutter-delete" + }); + const v = Cr.register({ + className: "inlineCompletions-char-delete", + description: "char-delete", + isWholeLine: false + }); + const y = Cr.register({ + className: "inlineCompletions-char-insert", + description: "char-insert", + isWholeLine: true + }); + const w = Cr.register({ + className: "inlineCompletions-char-insert", + description: "char-insert", + shouldFillLineOnLineBreak: true + }); + const C = Cr.register({ + className: "inlineCompletions-char-insert diff-range-empty", + description: "char-insert diff-range-empty" + }); + for (const S of l.diff) { + if (!S.original.isEmpty) { + h.push({ + range: S.original.toInclusiveRange(), + options: b + }); + } + if (!S.modified.isEmpty) { + g.push({ + range: S.modified.toInclusiveRange(), + options: p + }); + } + if (S.modified.isEmpty || S.original.isEmpty) { + if (!S.original.isEmpty) { + h.push({ + range: S.original.toInclusiveRange(), + options: v + }); + } + if (!S.modified.isEmpty) { + g.push({ + range: S.modified.toInclusiveRange(), + options: y + }); + } + } else { + const k = u && S3s(S); + for (const E of S.innerChanges || []) { + if (S.original.contains(E.originalRange.startLineNumber)) { + h.push({ + range: E.originalRange, + options: { + description: "char-delete", + shouldFillLineOnLineBreak: false, + className: uyr("inlineCompletions-char-delete", E.originalRange.isEmpty() && d && !k && "diff-range-empty"), + inlineClassName: k ? "strike-through" : null, + zIndex: 1 + } + }); + } + if (S.modified.contains(E.modifiedRange.startLineNumber)) { + g.push({ + range: E.modifiedRange, + options: E.modifiedRange.isEmpty() && d && !k ? C : w + }); + } + if (k) { + const D = c.getValueOfRange(E.modifiedRange); + h.push({ + range: Z.fromPositions(E.originalRange.getEndPosition()), + options: { + description: "inserted-text", + before: { + content: D, + inlineClassName: "inlineCompletions-char-insert" + }, + zIndex: 2, + showIfCollapsed: true + } + }); + } + } + } + } + return { + originalDecorations: h, + modifiedDecorations: g + }; + }); + this.D(ay(this.a).setDecorations(this.g.map(a => a?.originalDecorations ?? []))); + const s = this.b.map(a => a?.modifiedCodeEditor); + this.D(eh((a, l) => { + const c = s.read(a); + if (c) { + l.add(ay(c).setDecorations(this.g.map(u => u?.modifiedDecorations ?? []))); + } + })); + const n = ay(this.a); + const r = gyr(t); + const o = Is(this, a => { + if (!n.model.read(a)) { + return []; + } + const c = []; + const u = Gwe.fromEditor(this.a); + const d = n.getOption(68).read(a); + const h = this.b.read(a); + if (!h) { + return c; + } + for (const g of h.diff) { + if (h.mode !== "interleavedLines") { + continue; + } + r.read(a); + const p = new Jwe(g.modified.mapToLineArray(w => this.f.tokenization.getLineTokens(w))); + const b = []; + for (const w of g.innerChanges || []) { + b.push(new cF(w.modifiedRange.delta(-(g.original.startLineNumber - 1)), Vwe.className, 0)); + } + const v = document.createElement("div"); + v.classList.add("view-lines", "line-insert", "monaco-mouse-cursor-text"); + const y = zwe(p, u, b, v); + c.push({ + afterLineNumber: g.original.endLineNumberExclusive - 1, + domNode: v, + heightInPx: y.heightInLines * d, + minWidthInPx: y.minWidthInPx, + showInHiddenAreas: true, + suppressMouseDown: true + }); + } + return c; + }); + this.D(Uwe(this.a, o)); + } +}; +function S3s(i) { + if (i.innerChanges) { + return i.innerChanges.every(e => Spt(e.modifiedRange) && Spt(e.originalRange)); + } else { + return false; + } +} +var fyr = 0; +function gyr(i) { + return Ro(i.onDidChangeTokens, () => fyr++); +} +xe(); +vd(); +He(); +q(); +An(); +Qs(); +Hv(); +jp(); +var Ora = he("inlineEdit.indicator.foreground", zL, ""); +var _ra = he("inlineEdit.indicator.background", PI, ""); +var Bra = he("inlineEdit.indicator.border", oat, ""); +var pyr = class extends H { + constructor(i, e, t) { + super(); + this.b = i; + this.c = e; + this.f = t; + this.a = Ts("div.inline-edits-view-indicator", { + style: { + position: "absolute", + overflow: "visible", + cursor: "pointer" + } + }, [Ts("div.icon", {}, [Gp(A.arrowLeft)]), Ts("div.label", {}, [" inline edit"])]); + this.D(Ce(this.a.root, "click", () => { + this.f.get()?.jump(); + })); + this.D(this.b.createOverlayWidget({ + domNode: this.a.root, + position: vb(null), + allowEditorOverflow: false, + minContentWidthInPx: vb(0) + })); + this.D(Dn(s => { + const n = this.c.read(s); + if (!n) { + this.a.root.style.visibility = "hidden"; + return; + } + this.a.root.style.visibility = ""; + const r = this.b.layoutInfo.read(s); + const o = new uo(0, r.height - 30); + const a = n.editTopLeft; + this.a.root.classList.toggle("top", a.y < o.start); + this.a.root.classList.toggle("bottom", a.y > o.endExclusive); + const l = n.showAlways; + this.a.root.classList.toggle("visible", l); + this.a.root.classList.toggle("contained", o.contains(a.y)); + this.a.root.style.top = `${o.clip(a.y)}px`; + this.a.root.style.right = `${r.minimap.minimapWidth + r.verticalScrollbarWidth}px`; + })); + } +}; +Hv(); +Qs(); +Wt(); +y4(); +z0(); +zh(); +jp(); +Zo(); +var Ura = he("inlineEdit.originalBackground", Bs(Ex, 0.4), "", true); +var Wra = he("inlineEdit.modifiedBackground", Bs(KC, 0.4), "", true); +var Vra = he("inlineEdit.originalChangedLineBackground", ut.transparent, "", true); +var Hra = he("inlineEdit.originalChangedTextBackground", Ex, "", true); +var qra = he("inlineEdit.modifiedChangedLineBackground", ut.transparent, "", true); +var jra = he("inlineEdit.modifiedChangedTextBackground", KC, "", true); +var zra = he("inlineEdit.border", { + light: Qk(Vj, 0.15), + dark: $T(Vj, 0.5), + hcDark: Vj, + hcLight: Vj +}, ""); +var yei = class extends H { + constructor(e, t, s, n, r) { + super(); + this.n = e; + this.q = t; + this.r = s; + this.t = n; + this.u = r; + this.a = ay(this.n); + this.b = Ts("div.inline-edits-view", { + style: { + position: "absolute", + overflow: "visible", + top: "0px", + left: "0px" + } + }, [k6t("svg@svg", { + transform: "translate(-0.5 -0.5)", + style: { + overflow: "visible", + pointerEvents: "none", + position: "absolute" + } + }, []), Ts("div.editorContainer@editorContainer", { + style: { + position: "absolute" + } + }, [Ts("div.preview@editor", { + style: {} + }), Ts("div.toolbar@toolbar", { + style: {} + })]), k6t("svg@svg2", { + transform: "translate(-0.5 -0.5)", + style: { + overflow: "visible", + pointerEvents: "none", + position: "absolute" + } + }, [])]); + this.f = ay(this.n).getOption(64).map(a => a.edits.experimental.useMixedLinesDiff); + this.j = ay(this.n).getOption(64).map(a => a.edits.experimental.useInterleavedLinesDiff); + this.w = Is(this, a => { + const l = this.q.read(a); + if (!l) { + return; + } + this.r.get()?.handleInlineCompletionShown(l.inlineCompletion); + let c = Kx.fromEdit(l.edit); + let u = l.edit.apply(l.originalText); + let d = bpt(c, l.originalText, new mpt(u)); + let h; + if (l.isCollapsed) { + h = "collapsed"; + } else if (d.every(p => C3s.supportsInlineDiffRendering(p)) && (this.f.read(a) === "whenPossible" || l.userJumpedToIt && this.f.read(a) === "afterJumpWhenPossible")) { + h = "mixedLines"; + } else if (this.j.read(a) === "always" || l.userJumpedToIt && this.j.read(a) === "afterJump") { + h = "interleavedLines"; + } else { + h = "sideBySide"; + } + if (h === "sideBySide") { + const p = hyr(u, l.modifiedLineRange); + u = p.applyToString(u); + c = cyr(c, p); + d = bpt(c, l.originalText, new mpt(u)); + } + const g = l.originalText.lineRange.intersect(l.originalLineRange.join(or.ofLength(l.originalLineRange.startLineNumber, l.lineEdit.newLines.length))); + return { + state: h, + diff: d, + edit: l, + newText: u, + newTextLineCount: l.modifiedLineRange.length, + originalDisplayRange: g + }; + }); + this.z = this.D(this.t.createInstance(Opt, this.b.toolbar, _.InlineEditsActions, { + menuOptions: { + renderShortTitle: true + }, + toolbarOptions: { + primaryGroup: a => a.startsWith("primary") + }, + actionViewItemProvider: (a, l) => { + if (a instanceof Ma) { + return this.t.createInstance(ayr, a, undefined); + } + if (a.class === undefined) { + return this.t.createInstance($f, {}, a, { + icon: false + }); + } + }, + telemetrySource: "inlineEditsToolbar" + })); + this.C = Uy({ + owner: this, + equalsFn: jj + }, a => this.w.read(a)?.edit.commands ?? []); + this.F = this.D(Dn(a => { + const l = this.C.read(a); + const c = []; + const u = []; + for (const d of l) { + const h = { + class: undefined, + id: d.id, + enabled: true, + tooltip: d.tooltip || "", + label: d.title, + run: g => this.u.executeCommand(d.id, ...(d.arguments ?? [])) + }; + if (d.title.toLowerCase().indexOf("feedback") !== -1) { + c.push(h); + } else { + u.push(h); + } + } + this.z.setAdditionalPrimaryActions(c); + this.z.setAdditionalSecondaryActions(u); + })); + this.G = this.D(this.t.createInstance(JI, "", this.n.getModel().getLanguageId(), { + ...JI.DEFAULT_CREATION_OPTIONS, + bracketPairColorizationOptions: { + enabled: true, + independentColorPoolPerBracketType: false + } + }, null)); + this.H = this.D(this.t.createInstance(Zy, this.b.editor, { + glyphMargin: false, + lineNumbers: "off", + minimap: { + enabled: false + }, + guides: { + indentation: false, + bracketPairs: false, + bracketPairsHorizontal: false, + highlightActiveIndentation: false + }, + folding: false, + selectOnLineNumbers: false, + selectionHighlight: false, + columnSelection: false, + overviewRulerBorder: false, + overviewRulerLanes: 0, + lineDecorationsWidth: 0, + lineNumbersMinChars: 0, + bracketPairColorization: { + enabled: true, + independentColorPoolPerBracketType: false + }, + scrollBeyondLastLine: false, + scrollbar: { + vertical: "hidden", + horizontal: "hidden", + handleMouseWheel: false + }, + readOnly: true, + wordWrap: "off" + }, { + contributions: [] + }, this.n)); + this.I = ay(this.H); + this.J = Is(this, a => this.w.read(a)?.state === "sideBySide" ? "block" : "none"); + this.L = Is(a => { + this.b.root.style.display = this.J.read(a); + }); + this.M = Is(a => { + this.L.read(a); + const l = this.w.read(a); + if (!l) { + return; + } + this.G.setLanguage(this.n.getModel().getLanguageId()); + this.G.setValue(l.newText); + const c = l.edit.originalLineRange; + const u = []; + if (c.startLineNumber > 1) { + u.push(new Z(1, 1, c.startLineNumber - 1, 1)); + } + if (c.startLineNumber + l.newTextLineCount < this.G.getLineCount() + 1) { + u.push(new Z(c.startLineNumber + l.newTextLineCount, 1, this.G.getLineCount() + 1, 1)); + } + this.H.setHiddenAreas(u, undefined, true); + }).recomputeInitiallyAndOnChange(this.B); + this.N = Is(this, a => { + const l = this.q.read(a); + if (l) { + this.M.read(a); + return w3s(this.I, l.modifiedLineRange, a) + 10; + } else { + return 0; + } + }); + this.O = Is(this, a => { + const l = this.a.cursorPosition.read(a); + const c = this.q.read(a); + if (!!c && !!l) { + if (c.modifiedLineRange.contains(l.lineNumber)) { + return l; + } else { + return undefined; + } + } + }); + this.P = Is(this, a => { + const l = this.q.read(a); + if (!l) { + return null; + } + const c = this.w.read(a); + if (!c) { + return null; + } + const u = l.originalLineRange; + const d = this.a.scrollLeft.read(a); + const h = w3s(this.a, c.originalDisplayRange, a); + const g = this.a.layoutInfo.read(a); + const p = this.N.read(a); + const b = g.width - g.contentLeft - g.minimap.minimapWidth - g.verticalScrollbarWidth; + const v = this.O.read(a); + const y = Math.max(b * 0.65 + d - 10, b - p - 70 + d - 10, v ? oyr(this.a, v, a) + 50 : 0); + const w = Math.min(h + 20, y); + const C = g.contentLeft + w; + const S = h + 20 + p + 70; + const x = y - w; + const k = Math.max(g.contentLeft, C - d); + const E = this.n.getTopForLineNumber(u.startLineNumber) - this.a.scrollTop.read(a); + const D = this.n.getTopForLineNumber(u.endLineNumberExclusive) - this.a.scrollTop.read(a); + const P = g.contentLeft; + const R = new hre(k, E); + const L = new hre(P, E); + const F = new hre(k, D); + const O = new hre(P, D); + const U = D - E; + const j = l.modifiedLineRange.length === l.originalLineRange.length ? new uo(4, 61) : new uo(60, 61); + const ie = x === 0; + const ee = j.clip(x); + const ne = this.n.getOption(68) * l.modifiedLineRange.length; + const be = new hre(k + ee, E); + const ge = new hre(k + ee, E + ne); + return { + code1: R, + codeStart1: L, + code2: F, + codeStart2: O, + codeHeight: U, + edit1: be, + edit2: ge, + editHeight: ne, + previewEditorLeft: C, + maxContentWidth: S, + shouldShowShadow: ie + }; + }); + this.Q = Is(this, a => { + const l = this.w.read(a); + if (l) { + return { + modifiedText: new mpt(l.newText), + diff: l.diff, + mode: l.state === "collapsed" ? "sideBySide" : l.state, + modifiedCodeEditor: this.H + }; + } + }); + this.R = this.D(new C3s(this.n, this.Q, this.G)); + this.S = this.D(new pyr(this.a, Is(a => { + const l = this.w.read(a); + const c = this.P.read(a)?.edit1; + if (!!c && !!l) { + return { + editTopLeft: c, + showAlways: l.state !== "sideBySide" + }; + } + }), this.r)); + this.D(xne(this.n.getDomNode(), this.b.root)); + this.D(this.a.createOverlayWidget({ + domNode: this.b.root, + position: vb(null), + allowEditorOverflow: false, + minContentWidthInPx: Is(a => { + const l = this.P.read(a)?.maxContentWidth; + if (l === undefined) { + return 0; + } else { + return l; + } + }) + })); + this.H.setModel(this.G); + this.D(Dn(a => { + const l = this.P.read(a); + if (!l) { + this.b.svg.replaceChildren(); + return; + } + const c = l.edit1; + const u = l.editHeight; + const d = this.N.read(a); + const h = new ibt(); + h.moveTo(l.code2); + h.lineTo(l.codeStart2); + h.lineTo(l.codeStart1); + h.lineTo(l.code1); + const g = new ibt(); + g.moveTo(l.code1); + g.lineTo(l.edit1); + g.lineTo(l.edit1.deltaX(d)); + g.lineTo(l.edit2.deltaX(d)); + g.lineTo(l.edit2); + if (l.edit2.y !== l.code2.y) { + g.curveTo2(l.edit2.deltaX(-20), l.code2.deltaX(20), l.code2.deltaX(0)); + } + g.lineTo(l.code2); + const p = new ibt(); + p.moveTo(l.code1); + p.lineTo(l.code1.deltaX(1000)); + p.lineTo(l.code2.deltaX(1000)); + p.lineTo(l.code2); + const b = document.createElementNS("http://www.w3.org/2000/svg", "path"); + b.setAttribute("d", h.build()); + b.style.fill = "var(--vscode-inlineEdit-originalBackground, transparent)"; + b.style.stroke = "var(--vscode-inlineEdit-border)"; + b.style.strokeWidth = "1px"; + const v = document.createElementNS("http://www.w3.org/2000/svg", "path"); + v.setAttribute("d", g.build()); + v.style.fill = "var(--vscode-inlineEdit-modifiedBackground, transparent)"; + v.style.stroke = "var(--vscode-inlineEdit-border)"; + v.style.strokeWidth = "1px"; + const y = document.createElementNS("http://www.w3.org/2000/svg", "path"); + y.setAttribute("d", g.build()); + y.style.fill = "var(--vscode-editor-background, transparent)"; + y.style.strokeWidth = "1px"; + const w = []; + if (l.shouldShowShadow) { + const S = document.createElementNS("http://www.w3.org/2000/svg", "defs"); + const x = document.createElementNS("http://www.w3.org/2000/svg", "linearGradient"); + x.setAttribute("id", "gradient"); + x.setAttribute("x1", "0%"); + x.setAttribute("x2", "100%"); + const k = document.createElementNS("http://www.w3.org/2000/svg", "stop"); + k.setAttribute("offset", "0%"); + k.setAttribute("style", "stop-color:var(--vscode-inlineEdit-border);stop-opacity:0"); + const E = document.createElementNS("http://www.w3.org/2000/svg", "stop"); + E.setAttribute("offset", "100%"); + E.setAttribute("style", "stop-color:var(--vscode-inlineEdit-border);stop-opacity:1"); + x.appendChild(k); + x.appendChild(E); + S.appendChild(x); + const D = 6; + const P = document.createElementNS("http://www.w3.org/2000/svg", "rect"); + P.setAttribute("x", `${l.code1.x - D}`); + P.setAttribute("y", `${l.code1.y}`); + P.setAttribute("width", `${D}`); + P.setAttribute("height", `${l.code2.y - l.code1.y}`); + P.setAttribute("fill", "url(#gradient)"); + P.style.strokeWidth = "0"; + P.style.stroke = "transparent"; + w.push(S); + w.push(P); + } else { + const S = new ibt(); + S.moveTo(l.code1); + S.lineTo(l.code2); + const x = document.createElementNS("http://www.w3.org/2000/svg", "path"); + x.setAttribute("d", S.build()); + x.style.stroke = "var(--vscode-inlineEdit-border)"; + x.style.strokeWidth = "1px"; + w.push(x); + } + const C = document.createElementNS("http://www.w3.org/2000/svg", "path"); + C.setAttribute("d", p.build()); + C.style.fill = "var(--vscode-editor-background, transparent)"; + this.b.svg.replaceChildren(C, y); + this.b.svg2.replaceChildren(b, v, ...w); + this.b.editorContainer.style.top = `${c.y}px`; + this.b.editorContainer.style.left = `${c.x}px`; + this.H.layout({ + height: u, + width: d + }); + })); + const o = Ro(this, this.z.onDidChangeDropdownVisibility, a => a ?? false); + this.D(Dn(a => { + this.b.root.classList.toggle("toolbarDropdownVisible", o.read(a)); + })); + } +}; +yei = __decorate([__param(3, re), __param(4, gt)], yei); +var wei; +var Cei = class extends H { + static { + wei = this; + } + static { + this.hot = vXt(wei); + } + constructor(e, t, s, n, r, o) { + super(); + this.m = e; + this.n = t; + this.q = s; + this.r = n; + this.s = r; + this.t = o; + this.a = new lyr("inline-edits"); + this.b = sE(() => this.t.createModel("", null, this.a.getUniqueUri())).keepObserved(this.B); + this.f = sE(() => this.t.createModel("", null, this.a.getUniqueUri())).keepObserved(this.B); + this.g = new Ont({ + getCacheKey: JSON.stringify + }, a => { + this.b.get().setValue(a.original); + this.f.get().setValue(a.modified); + const l = this.s.createDiffProvider({ + diffAlgorithm: "advanced" + }); + return G9t.fromFn(async () => await l.computeDiff(this.b.get(), this.f.get(), { + computeMoves: false, + ignoreTrimWhitespace: false, + maxComputationTimeMs: 1000 + }, mt.None)); + }); + this.h = Is(this, a => { + const l = this.n.read(a); + if (!l) { + return; + } + const c = new Xwe(this.m.getModel()); + const u = l.edit.extendToFullLine(c); + return this.g.get({ + original: this.m.getModel().getValueInRange(u.range), + modified: u.text + }).promiseResult.map(h => { + if (!h || !h.data) { + return; + } + const g = h.data; + const p = u.range.getStartPosition(); + const b = g.changes.flatMap(C => C.innerChanges); + function v(C, S) { + const x = qv.fromPosition(S.getStartPosition()); + return qv.ofRange(S).createRange(x.addToPosition(C)); + } + const y = b.map(C => new im(v(p, C.originalRange), this.f.get().getValueInRange(C.modifiedRange))); + const w = new pO(y); + return new myr(c, w, l.isCollapsed, l.renderExplicitly, l.commands, l.inlineCompletion); + }); + }); + this.j = Uy({ + owner: this, + equalsFn: wpe(zis()) + }, a => this.h.read(a)?.read(a)); + this.D(this.r.createInstance(yei, this.m, this.j, this.q)); + } +}; +Cei = wei = __decorate([__param(3, re), __param(4, IXt), __param(5, $s)], Cei); +var myr = class { + constructor(i, e, t, s, n, r) { + this.originalText = i; + this.edit = e; + this.isCollapsed = t; + this.userJumpedToIt = s; + this.commands = n; + this.inlineCompletion = r; + this.lineEdit = fpt.fromSingleTextEdit(this.edit.toSingle(this.originalText), this.originalText); + this.originalLineRange = this.lineEdit.lineRange; + this.modifiedLineRange = this.lineEdit.toLineEdit().getNewLineRanges()[0]; + } + equals(i) { + return this.originalText.getValue() === i.originalText.getValue() && this.edit.equals(i.edit) && this.isCollapsed === i.isCollapsed && this.userJumpedToIt === i.userJumpedToIt && this.commands === i.commands && this.inlineCompletion === i.inlineCompletion; + } +}; +var Sei = class extends H { + constructor(e, t, s) { + super(); + this.n = e; + this.q = t; + this.r = s; + this.a = Is(this, n => this.q.read(n)?.ghostTexts.read(n) ?? []); + this.b = bvr(this.a, this.B); + this.c = jat(this, this.b, (n, r) => sE(o => this.r.createInstance(bD(vei, o), this.n, { + ghostText: n, + minReservedLineCount: vb(0), + targetTextModel: this.q.map(a => a?.textModel) + })).recomputeInitiallyAndOnChange(r)).recomputeInitiallyAndOnChange(this.B); + this.f = Is(this, n => this.q.read(n)?.inlineEditState.read(n)?.inlineEdit); + this.g = Fte(this, (n, r) => r || !!this.f.read(n)); + this.h = sE(n => { + if (this.g.read(n)) { + return this.r.createInstance(Cei.hot.read(n), this.n, this.f, this.q); + } + }).recomputeInitiallyAndOnChange(this.B); + this.j = ay(this.n); + this.m = this.j.getOption(64).map(n => n.fontFamily); + this.D(tyr(Is(n => { + const r = this.m.read(n); + if (r === "" || r === "default") { + return ""; + } else { + return ` +.monaco-editor .ghost-text-decoration, +.monaco-editor .ghost-text-decoration-preview, +.monaco-editor .ghost-text { + font-family: ${r}; +}`; + } + }))); + this.D(new bQt(this.n, this.q, this.r)); + } + shouldShowHoverAtViewZone(e) { + return this.c.get()[0]?.get().ownsViewZone(e) ?? false; + } +}; +Sei = __decorate([__param(2, re)], Sei); +var sbt; +var sm = class extends H { + static { + sbt = this; + } + static { + this.hot = vXt(sbt); + } + static { + this.ID = "editor.contrib.inlineCompletionsController"; + } + static get(e) { + return ivr(e.getContribution(sbt.ID)); + } + constructor(e, t, s, n, r, o, a, l, c, u) { + super(); + this.editor = e; + this.y = t; + this.z = s; + this.C = n; + this.F = r; + this.G = o; + this.H = a; + this.I = l; + this.J = c; + this.L = u; + this.a = ay(this.editor); + this.b = Is(this, g => this.a.selections.read(g)?.map(p => p.getEndPosition()) ?? [new je(1, 1)]); + this.c = this.D(new eyr(this.a, g => this.model.get()?.handleSuggestAccepted(g), () => this.model.get()?.selectedInlineCompletion.get()?.toSingleTextEdit(undefined))); + this.f = Ro(this, this.editor.onDidChangeConfiguration, () => this.editor.getOption(64).enabled); + this.g = Ro(this, this.L.onDidChangeScreenReaderOptimized, () => this.L.isScreenReaderOptimized()); + this.h = Ro(this, this.z.onDidChangeContext, () => this.z.getContext(this.editor.getDomNode()).getValue("editorDictation.inProgress") === true); + this.j = Is(this, g => this.f.read(g) && (!this.g.read(g) || !this.h.read(g))); + this.n = this.G.for(this.H.inlineCompletionsProvider, "InlineCompletionsDebounce", { + min: 50, + max: 50 + }); + this.q = Is(this, g => { + const p = this.a.cursorPosition.read(g); + if (p === null) { + return false; + } + const b = this.a.model.read(g); + if (!b) { + return false; + } + this.a.versionId.read(g); + const v = b.getLineIndentColumn(p.lineNumber); + return p.column <= v; + }); + this.model = sE(this, g => { + if (this.a.isReadonly.read(g)) { + return; + } + const p = this.a.model.read(g); + if (p) { + return this.y.createInstance(nei, p, this.c.selectedItem, this.a.versionId, this.b, this.n, this.j, this.editor); + } else { + return undefined; + } + }).recomputeInitiallyAndOnChange(this.B); + this.t = AI(this); + this.u = this.a.getOption(64).map(g => true); + this.w = this.D(new Sei(this.editor, this.model, this.y)); + this.D(dF(this.a.onDidType, (g, p) => { + if (this.j.get()) { + this.model.get()?.trigger(); + } + })); + this.D(this.F.onDidExecuteCommand(g => { + if (new Set([nF.Tab.id, nF.DeleteLeft.id, nF.DeleteRight.id, q4s, "acceptSelectedSuggestion"]).has(g.commandId) && e.hasTextFocus() && this.j.get()) { + this.a.forceUpdate(b => { + this.model.get()?.trigger(b); + }); + } + })); + this.D(dF(this.a.selections, (g, p, b) => { + if (b.some(v => v.reason === 3 || v.source === "api")) { + if (!this.u.get() && this.model.get()?.state.get()?.kind === "inlineEdit") { + return; + } + const v = this.model.get(); + if (!v) { + return; + } + if (v.state.get()?.kind === "ghostText") { + this.model.get()?.stop(); + } else if (v.state.get()?.inlineCompletion) { + this.model.get()?.collapseInlineEdit(); + } + } + })); + this.D(this.editor.onDidBlurEditorWidget(() => { + if (!this.z.getContextKeyValue("accessibleViewIsShown") && !this.C.getValue("editor.inlineSuggest.keepOnBlur") && !e.getOption(64).keepOnBlur && !Fne.dropDownVisible && !this.model.get()?.inlineEditAvailable.get()) { + Io(g => { + this.model.get()?.stop("automatic", g); + }); + } + })); + this.D(Dn(g => { + const p = this.model.read(g)?.inlineCompletionState.read(g); + if (p?.suggestItem) { + if (p.primaryGhostText.lineCount >= 2) { + this.c.forceRenderingAbove(); + } + } else { + this.c.stopForceRenderingAbove(); + } + })); + this.D(Ue(() => { + this.c.stopForceRenderingAbove(); + })); + const d = Fte(this, (g, p) => { + const v = this.model.read(g)?.inlineCompletionState.read(g); + if (this.c.selectedItem.get()) { + return p; + } else { + return v?.inlineCompletion?.semanticId; + } + }); + this.D(aKn(Is(g => { + this.t.read(g); + d.read(g); + return {}; + }), async (g, p, b, v) => { + const y = this.model.get(); + const w = y?.inlineCompletionState.get(); + if (!w || !y) { + return; + } + const C = y.textModel.getLineContent(w.primaryGhostText.lineNumber); + await Da(50, ZBt(v)); + await C4(this.c.selectedItem, qo, () => false, ZBt(v)); + await this.I.playSignal(el.inlineSuggestion); + if (this.editor.getOption(8)) { + this.M(w.primaryGhostText.renderForScreenReader(C)); + } + })); + this.D(this.C.onDidChangeConfiguration(g => { + if (g.affectsConfiguration("accessibility.verbosity.inlineCompletions")) { + this.editor.updateOptions({ + inlineCompletionsAccessibilityVerbose: this.C.getValue("accessibility.verbosity.inlineCompletions") + }); + } + })); + this.editor.updateOptions({ + inlineCompletionsAccessibilityVerbose: this.C.getValue("accessibility.verbosity.inlineCompletions") + }); + const h = new vvr(this.z); + this.D(h.bind(Kh.cursorInIndentation, this.q)); + this.D(h.bind(Kh.hasSelection, g => !this.a.cursorSelection.read(g)?.isEmpty())); + this.D(h.bind(Kh.cursorAtInlineEdit, this.model.map((g, p) => g?.inlineEditState?.read(p)?.cursorAtInlineEdit))); + this.D(h.bind(Kh.tabShouldAcceptInlineEdit, this.model.map((g, p) => !!g?.tabShouldAcceptInlineEdit.read(p)))); + this.D(h.bind(Kh.tabShouldJumpToInlineEdit, this.model.map((g, p) => !!g?.tabShouldJumpToInlineEdit.read(p)))); + this.D(h.bind(Kh.inlineEditVisible, g => this.model.read(g)?.inlineEditState.read(g) !== undefined)); + this.D(h.bind(Kh.inlineSuggestionHasIndentation, g => this.model.read(g)?.getIndentationInfo(g)?.startsWithIndentation)); + this.D(h.bind(Kh.inlineSuggestionHasIndentationLessThanTabSize, g => this.model.read(g)?.getIndentationInfo(g)?.startsWithIndentationLessThanTabSize)); + this.D(h.bind(Kh.suppressSuggestions, g => { + const b = this.model.read(g)?.inlineCompletionState.read(g); + if (b?.primaryGhostText && b?.inlineCompletion) { + return b.inlineCompletion.inlineCompletion.source.inlineCompletions.suppressSuggestions; + } else { + return undefined; + } + })); + this.D(h.bind(Kh.inlineSuggestionVisible, g => { + const b = this.model.read(g)?.inlineCompletionState.read(g); + return !!b?.inlineCompletion && b?.primaryGhostText !== undefined && !b?.primaryGhostText.isEmpty(); + })); + this.D(this.y.createInstance(tei, this.editor)); + } + playAccessibilitySignal(e) { + this.t.trigger(e); + } + M(e) { + const t = this.z.getContextKeyValue("accessibleViewIsShown"); + const s = this.J.lookupKeybinding("editor.action.accessibleView"); + let n; + if (!t && s && this.editor.getOption(155)) { + n = f(1283, null, s.getAriaLabel()); + } + Fc(n ? e + ", " + n : e); + } + shouldShowHoverAt(e) { + const t = this.model.get()?.primaryGhostText.get(); + if (t) { + return t.parts.some(s => e.containsPosition(new je(t.lineNumber, s.column))); + } else { + return false; + } + } + shouldShowHoverAtViewZone(e) { + return this.w.shouldShowHoverAtViewZone(e); + } + reject() { + Io(e => { + const t = this.model.get(); + if (t) { + t.stop("explicitCancel", e); + } + }); + } + jump() { + const e = this.model.get(); + if (e) { + e.jump(); + } + } +}; +sm = sbt = __decorate([__param(1, re), __param(2, Ne), __param(3, ve), __param(4, gt), __param(5, gE), __param(6, nn), __param(7, Pd), __param(8, oi), __param(9, na)], sm); +Wi(); +Cs(); +q(); +Ee(); +It(); +Pn(); +Me(); +te(); +q(); +It(); +qt(); +ii(); +kh(); +Ps(); +zy(); +nf(); +var byr = 1; +function x3s() { + return { + selectedBcId: undefined, + showControlPanel: false, + dataVersion: byr, + lastOpenedBcIds: {} + }; +} +function k3s() { + return { + setupPath2: "default", + terminals: [], + ranTerminalCommands: [], + installScript: "", + startScript: "", + currentSetupStep: "connect-to-github", + furthestSetupStep: "connect-to-github", + customDockerfileContents: "" + }; +} +function E3s(i) { + return -1; +} +function I3s(i, e, t) { + const s = E3s(e); + let n = i.get(t, s); + let r = x3s(); + if (n) { + try { + const o = JSON.parse(n); + if (o) { + r = { + ...x3s(), + ...o + }; + } + } catch (o) { + console.error("[backgroundComposer] Error parsing stored data:", o); + } + } + return r; +} +function D3s(i, e, t) { + let n = i.get(t, 1); + let r = k3s(); + if (n) { + try { + const o = JSON.parse(n); + if (o) { + r = { + ...k3s(), + ...o + }; + } + } catch (o) { + console.error("[backgroundComposer] Error parsing stored data:", o); + } + } + return r; +} +function vyr() { + const [i, e] = yp({ + backgroundComposers: [], + backgroundComposerModalInputData: wE(Ft()), + backgroundComposerModalInputBoxDelegate: new v1(), + backgroundComposerFollowUpInputBoxDelegate: new v1(), + setupModalIsOpen: false, + defaultVmPodStatus: "creating", + defaultVmPodDisplayMode: "building", + testingVmPodStatus: "creating", + testingVmPodDisplayMode: "building" + }); + return [i, e]; +} +Pn(); +hz(); +nf(); +zJ(); +Ps(); +Cs(); +function A1(i) { + if (!i) { + return; + } + const e = i.split("+"); + if (e.length < 2) { + return; + } + const t = e[0]; + if (!t || t !== "background-composer") { + return; + } + const s = e[1]; + if (s && (!!s.startsWith("bc-") || !!s.startsWith("pod-"))) { + return s; + } +} +function T3s(i) { + const e = A1(i); + if (e && e.startsWith("bc-")) { + return e; + } +} +Rr(); +var V0e = "workbench.view.extension.backgroundAgent"; +var H0e = "workbench.view.backgroundAgent.content"; +var nbt = "workbench.panel.backgroundComposer"; +var eW = "workbench.panel.backgroundComposer.view"; +var rbt = 0; +var obt = "workbench.action.backgroundComposer.openFileInBackgroundComposer"; +var xei = "workbench.action.backgroundComposer.openDiffInBackgroundComposer"; +var kei = "workbench.action.backgroundComposer.openEnvironmentJsonEditor"; +var Eei = "background-composer-setup-start-default-vm-step"; +var P3s = "background-composer-setup-start-testing-vm-step"; +var cy = Ve("backgroundComposerDataService"); +var Iei = class extends H { + bcIdForThisWindow() { + const e = this.f.remoteAuthority; + if (e) { + return T3s(e); + } + } + getBcIdFromViewId(e) { + const t = eW + "."; + if (e.startsWith(t)) { + return e.slice(t.length); + } + } + constructor(e, t, s, n) { + super(); + this.a = e; + this.b = t; + this.c = s; + this.f = n; + [this.data, this.setData] = vyr(); + const r = I3s(e, t, Yfe); + const [o, a] = yp(r); + this.persistentData = o; + this.setPersistentData = a; + const l = D3s(e, t, Xfe); + const [c, u] = yp(l); + this.workspacePersistentData = c; + this.setWorkspacePersistentData = u; + this.D(this.a.onDidChangeValue(-1, Yfe, this.D(new Q()))(d => { + const h = I3s(e, t, Yfe); + this.setPersistentData(h); + })); + this.D(this.a.onDidChangeValue(1, Xfe, this.D(new Q()))(d => { + const h = D3s(e, t, Xfe); + this.setWorkspacePersistentData(h); + })); + } + getBackgroundComposerEnv() { + return this.c.applicationUserPersistentStorage.backgroundComposerEnv ?? "prod"; + } + saveWorkspacePersistentData() { + this.a.store(Xfe, JSON.stringify(this.workspacePersistentData), 1, 1); + } + savePersistentData() { + try { + const e = E3s(this.b); + this.a.store(Yfe, JSON.stringify(this.persistentData), e, 1); + } catch (e) { + console.warn(`Error saving background composer data: ${e}`); + } + } + getBackgroundComposerModalInputDataHandle() { + if (!this.data.backgroundComposerModalInputData) { + throw new Error("No background composer modal input data"); + } + return Yse(this.data.backgroundComposerModalInputData); + } + resetBackgroundComposerModalInputData() { + this.setData("backgroundComposerModalInputData", wE(Ft())); + } + focusBackgroundComposerFollowUp() { + this.data.backgroundComposerFollowUpInputBoxDelegate.focus(); + } + doesInWindowBCHaveDiffsReactive() { + const e = this.data.inWindowBackgroundComposer?.detailedDiff; + return (e && (e.diff && e.diff.diffs && e.diff.diffs.length > 0 || e.submoduleDiffs && e.submoduleDiffs.some(s => s.diff && s.diff.diffs && s.diff.diffs.length > 0))) ?? false; + } + getInWindowBcData() { + if (this.bcIdForThisWindow()) { + return this.data.inWindowBackgroundComposer; + } + } + getBcDataInMainWindow(e) { + if (this.bcIdForThisWindow()) { + console.error("getBcDataInMainWindow called in bc window. use getInWindowBcData instead"); + return; + } + return this.data.backgroundComposers.find(s => s.bcId === e); + } + getHasBcVmStarted(e) { + if (this.bcIdForThisWindow()) { + return this.data.inWindowBackgroundComposer?.bc?.composer?.hasStartedVm ?? false; + } else { + return this.data.backgroundComposers.find(s => s.bcId === e)?.hasStartedVm ?? false; + } + } +}; +Iei = __decorate([__param(0, ht), __param(1, kt), __param(2, _i), __param(3, Wn)], Iei); +it(cy, Iei, 1); +var L3s = new fe("editcontextbarcursor", false); +var Qra = new fe("bigCommandKEnabled", false); +var Dei = new fe("cppSuggestion", false); +var sp = new fe("backgroundComposerEnabled", false); +var Tei = class extends H { + constructor(e, t, s, n) { + super(); + this.c = e; + this.f = t; + this.g = s; + this.h = n; + this.b = new Map(); + this.a = this.D(this.c.createScoped(this)); + } + bindInitialKeys() { + this._bindKey(L3s, "promptBars"); + this._bindCppSuggestionKey(); + this._bindBackgroundComposerEnabledKey(); + } + _bindKeyPersistent(e, t) { + const s = e.bindTo(this.f); + s.set(this.c.applicationUserPersistentStorage[t]); + this.a.onChangeEffect({ + deps: [() => this.c.applicationUserPersistentStorage[t]], + onChange: () => { + s.set(this.c.applicationUserPersistentStorage[t]); + } + }); + } + _bindKey(e, t) { + const s = e.bindTo(this.f); + this.a.onChangeEffect({ + deps: [() => this.c.nonPersistentStorage[t]], + onChange: () => { + s.set(this.c.nonPersistentStorage[t]); + } + }); + } + _bindCppSuggestionKey() { + const e = Dei.bindTo(this.f); + this.a.onChangeEffect({ + deps: [() => this.c.nonPersistentStorage.cppState?.suggestion], + onChange: () => { + const t = this.g.getValue(qfe) === true; + e.set(this.c.nonPersistentStorage.cppState?.suggestion !== undefined && t); + } + }); + } + _bindBackgroundComposerEnabledKey() { + const e = sp.bindTo(this.f); + this.a.onChangeEffect({ + deps: [() => this.h.persistentData.isBackgroundComposerEnabled], + onChange: () => { + e.set(this.h.persistentData.isBackgroundComposerEnabled ?? false); + }, + runNowToo: true + }); + } + getKey(e) { + if (this.b.has(e)) { + return this.b.get(e); + } + const t = new fe(e, this.c.nonPersistentStorage[e]); + const s = t.bindTo(this.f); + this.a.onChangeEffect({ + deps: [() => this.c.nonPersistentStorage[e]], + onChange: () => { + s.set(this.c.nonPersistentStorage[e]); + } + }); + this.b.set(e, t); + return t; + } +}; +Tei = __decorate([__param(0, _i), __param(1, Ne), __param(2, ve), __param(3, cy)], Tei); +it(kQt, Tei, 1); +q(); +Sr(); +te(); +Cs(); +q(); +It(); +jm(); +Lc(); +pA(); +yf(); +Rs(); +yt(); +gf(); +Jt(); +$i(); +zt(); +Le(); +yf(); +ja(); +Mr(); +mA(); +vt(); +var xD = class UFt extends Ome { + static is(e) { + if (e instanceof UFt) { + return true; + } else { + return V.isUri(e.resource) && xo(e.cellEdit); + } + } + static lift(e) { + if (e instanceof UFt) { + return e; + } else { + return new UFt(e.resource, e.cellEdit, e.notebookVersionId, e.metadata); + } + } + constructor(e, t, s = undefined, n) { + super(n); + this.resource = e; + this.cellEdit = t; + this.notebookVersionId = s; + } +}; +var Pei = class { + constructor(e, t, s, n, r, o, a) { + this.c = e; + this.d = s; + this.f = n; + this.g = r; + this.h = o; + this.i = a; + this.g = this.g.map(l => { + if (l.resource.scheme === Ha.scheme) { + const c = Ha.parse(l.resource)?.notebook; + if (!c) { + throw new Error(`Invalid notebook URI: ${l.resource}`); + } + return new xD(c, l.cellEdit, l.notebookVersionId, l.metadata); + } else { + return l; + } + }); + } + async apply() { + const e = []; + const t = pI(this.g, (s, n) => _m(s.resource.toString(), n.resource.toString())); + for (const s of t) { + if (this.f.isCancellationRequested) { + break; + } + const [n] = s; + const r = await this.i.resolve(n.resource); + if (typeof n.notebookVersionId == "number" && r.object.notebook.versionId !== n.notebookVersionId) { + r.dispose(); + throw new Error(`Notebook '${n.resource}' has changed in the meantime`); + } + const o = s.map(u => u.cellEdit); + const a = !r.object.isReadonly(); + const l = bl(this.h.activeEditorPane); + const c = l?.textModel?.uri.toString() === r.object.notebook.uri.toString() ? { + kind: _l.Index, + focus: l.getFocus(), + selections: l.getSelections() + } : undefined; + r.object.notebook.applyEdits(o, true, c, () => {}, this.c, a); + r.dispose(); + this.d.report(undefined); + e.push(n.resource); + } + return e; + } +}; +Pei = __decorate([__param(5, Te), __param(6, zx)], Pei); +ja(); +pe(); +Gl(); +q(); +Ps(); +yt(); +U7t(); +Ya(); +gf(); +pe(); +q(); +Mr(); +var abt = class extends H { + get outputs() { + return this.f.outputs || []; + } + get metadata() { + return this.f.metadata; + } + get outputId() { + return this.f.outputId; + } + get alternativeOutputId() { + return this.b; + } + get versionId() { + return this.c; + } + constructor(i) { + super(); + this.f = i; + this.a = this.D(new B()); + this.onDidChangeData = this.a.event; + this.c = 0; + this.h = {}; + this.b = this.f.outputId; + } + replaceData(i) { + this.h = {}; + this.f = i; + this.j(); + this.c = this.c + 1; + this.a.fire(); + } + appendData(i) { + this.g(); + this.f.outputs.push(...i); + this.j(); + this.c = this.c + 1; + this.a.fire(); + } + g() { + this.outputs.forEach(i => { + if (fU(i.mime)) { + this.h[i.mime] ||= {}; + this.h[i.mime][this.versionId] = i.data.byteLength; + } + }); + } + appendedSinceVersion(i, e) { + const t = this.h[e]?.[i]; + const s = this.outputs.find(n => n.mime === e); + if (t && s) { + return s.data.slice(t); + } + } + j() { + if (this.outputs.length > 1 && this.outputs.every(i => fU(i.mime))) { + const i = new Map(); + const e = []; + this.outputs.forEach(t => { + let s; + if (i.has(t.mime)) { + s = i.get(t.mime); + } else { + s = []; + i.set(t.mime, s); + e.push(t.mime); + } + s.push(t.data.buffer); + }); + this.outputs.length = 0; + e.forEach(t => { + const s = vnr(i.get(t)); + this.outputs.push({ + mime: t, + data: s.data + }); + if (s.didCompression) { + this.h = {}; + } + }); + } + } + asDto() { + return { + metadata: this.f.metadata, + outputs: this.f.outputs, + outputId: this.f.outputId + }; + } + bumpVersion() { + this.c = this.c + 1; + } +}; +nt(); +var R3s; +(function (i) { + i[i.None = 0] = "None"; + i[i.UnexpectedEndOfComment = 1] = "UnexpectedEndOfComment"; + i[i.UnexpectedEndOfString = 2] = "UnexpectedEndOfString"; + i[i.UnexpectedEndOfNumber = 3] = "UnexpectedEndOfNumber"; + i[i.InvalidUnicode = 4] = "InvalidUnicode"; + i[i.InvalidEscapeCharacter = 5] = "InvalidEscapeCharacter"; + i[i.InvalidCharacter = 6] = "InvalidCharacter"; +})(R3s ||= {}); +var N3s; +(function (i) { + i[i.OpenBraceToken = 1] = "OpenBraceToken"; + i[i.CloseBraceToken = 2] = "CloseBraceToken"; + i[i.OpenBracketToken = 3] = "OpenBracketToken"; + i[i.CloseBracketToken = 4] = "CloseBracketToken"; + i[i.CommaToken = 5] = "CommaToken"; + i[i.ColonToken = 6] = "ColonToken"; + i[i.NullKeyword = 7] = "NullKeyword"; + i[i.TrueKeyword = 8] = "TrueKeyword"; + i[i.FalseKeyword = 9] = "FalseKeyword"; + i[i.StringLiteral = 10] = "StringLiteral"; + i[i.NumericLiteral = 11] = "NumericLiteral"; + i[i.LineCommentTrivia = 12] = "LineCommentTrivia"; + i[i.BlockCommentTrivia = 13] = "BlockCommentTrivia"; + i[i.LineBreakTrivia = 14] = "LineBreakTrivia"; + i[i.Trivia = 15] = "Trivia"; + i[i.Unknown = 16] = "Unknown"; + i[i.EOF = 17] = "EOF"; +})(N3s ||= {}); +var M3s; +(function (i) { + i[i.InvalidSymbol = 1] = "InvalidSymbol"; + i[i.InvalidNumberFormat = 2] = "InvalidNumberFormat"; + i[i.PropertyNameExpected = 3] = "PropertyNameExpected"; + i[i.ValueExpected = 4] = "ValueExpected"; + i[i.ColonExpected = 5] = "ColonExpected"; + i[i.CommaExpected = 6] = "CommaExpected"; + i[i.CloseBraceExpected = 7] = "CloseBraceExpected"; + i[i.CloseBracketExpected = 8] = "CloseBracketExpected"; + i[i.EndOfFileExpected = 9] = "EndOfFileExpected"; + i[i.InvalidCommentToken = 10] = "InvalidCommentToken"; + i[i.UnexpectedEndOfComment = 11] = "UnexpectedEndOfComment"; + i[i.UnexpectedEndOfString = 12] = "UnexpectedEndOfString"; + i[i.UnexpectedEndOfNumber = 13] = "UnexpectedEndOfNumber"; + i[i.InvalidUnicode = 14] = "InvalidUnicode"; + i[i.InvalidEscapeCharacter = 15] = "InvalidEscapeCharacter"; + i[i.InvalidCharacter = 16] = "InvalidCharacter"; +})(M3s ||= {}); +var q0e; +(function (i) { + i.DEFAULT = { + allowTrailingComma: true + }; +})(q0e ||= {}); +function Lei(i, e = false) { + let t = 0; + const s = i.length; + let n = ""; + let r = 0; + let o = 16; + let a = 0; + function l(b) { + let v = 0; + let y = 0; + while (v < b) { + const w = i.charCodeAt(t); + if (w >= 48 && w <= 57) { + y = y * 16 + w - 48; + } else if (w >= 65 && w <= 70) { + y = y * 16 + w - 65 + 10; + } else if (w >= 97 && w <= 102) { + y = y * 16 + w - 97 + 10; + } else { + break; + } + t++; + v++; + } + if (v < b) { + y = -1; + } + return y; + } + function c(b) { + t = b; + n = ""; + r = 0; + o = 16; + a = 0; + } + function u() { + const b = t; + if (i.charCodeAt(t) === 48) { + t++; + } else { + for (t++; t < i.length && fre(i.charCodeAt(t));) { + t++; + } + } + if (t < i.length && i.charCodeAt(t) === 46) { + t++; + if (t < i.length && fre(i.charCodeAt(t))) { + for (t++; t < i.length && fre(i.charCodeAt(t));) { + t++; + } + } else { + a = 3; + return i.substring(b, t); + } + } + let v = t; + if (t < i.length && (i.charCodeAt(t) === 69 || i.charCodeAt(t) === 101)) { + t++; + if (t < i.length && i.charCodeAt(t) === 43 || i.charCodeAt(t) === 45) { + t++; + } + if (t < i.length && fre(i.charCodeAt(t))) { + for (t++; t < i.length && fre(i.charCodeAt(t));) { + t++; + } + v = t; + } else { + a = 3; + } + } + return i.substring(b, v); + } + function d() { + let b = ""; + let v = t; + while (true) { + if (t >= s) { + b += i.substring(v, t); + a = 2; + break; + } + const y = i.charCodeAt(t); + if (y === 34) { + b += i.substring(v, t); + t++; + break; + } + if (y === 92) { + b += i.substring(v, t); + t++; + if (t >= s) { + a = 2; + break; + } + switch (i.charCodeAt(t++)) { + case 34: + b += "\""; + break; + case 92: + b += "\\"; + break; + case 47: + b += "/"; + break; + case 98: + b += "\b"; + break; + case 102: + b += "\f"; + break; + case 110: + b += ` +`; + break; + case 114: + b += "\r"; + break; + case 116: + b += "\t"; + break; + case 117: + { + const C = l(4); + if (C >= 0) { + b += String.fromCharCode(C); + } else { + a = 4; + } + break; + } + default: + a = 5; + } + v = t; + continue; + } + if (y >= 0 && y <= 31) { + if (lbt(y)) { + b += i.substring(v, t); + a = 2; + break; + } else { + a = 6; + } + } + t++; + } + return b; + } + function h() { + n = ""; + a = 0; + r = t; + if (t >= s) { + r = s; + return o = 17; + } + let b = i.charCodeAt(t); + if (Rei(b)) { + do { + t++; + n += String.fromCharCode(b); + b = i.charCodeAt(t); + } while (Rei(b)); + return o = 15; + } + if (lbt(b)) { + t++; + n += String.fromCharCode(b); + if (b === 13 && i.charCodeAt(t) === 10) { + t++; + n += ` +`; + } + return o = 14; + } + switch (b) { + case 123: + t++; + return o = 1; + case 125: + t++; + return o = 2; + case 91: + t++; + return o = 3; + case 93: + t++; + return o = 4; + case 58: + t++; + return o = 6; + case 44: + t++; + return o = 5; + case 34: + t++; + n = d(); + return o = 10; + case 47: + { + const v = t - 1; + if (i.charCodeAt(t + 1) === 47) { + for (t += 2; t < s && !lbt(i.charCodeAt(t));) { + t++; + } + n = i.substring(v, t); + return o = 12; + } + if (i.charCodeAt(t + 1) === 42) { + t += 2; + const y = s - 1; + let w = false; + while (t < y) { + if (i.charCodeAt(t) === 42 && i.charCodeAt(t + 1) === 47) { + t += 2; + w = true; + break; + } + t++; + } + if (!w) { + t++; + a = 1; + } + n = i.substring(v, t); + return o = 13; + } + n += String.fromCharCode(b); + t++; + return o = 16; + } + case 45: + n += String.fromCharCode(b); + t++; + if (t === s || !fre(i.charCodeAt(t))) { + return o = 16; + } + case 48: + case 49: + case 50: + case 51: + case 52: + case 53: + case 54: + case 55: + case 56: + case 57: + n += u(); + return o = 11; + default: + while (t < s && g(b)) { + t++; + b = i.charCodeAt(t); + } + if (r !== t) { + n = i.substring(r, t); + switch (n) { + case "true": + return o = 8; + case "false": + return o = 9; + case "null": + return o = 7; + } + return o = 16; + } + n += String.fromCharCode(b); + t++; + return o = 16; + } + } + function g(b) { + if (Rei(b) || lbt(b)) { + return false; + } + switch (b) { + case 125: + case 93: + case 123: + case 91: + case 34: + case 58: + case 44: + case 47: + return false; + } + return true; + } + function p() { + let b; + do { + b = h(); + } while (b >= 12 && b <= 15); + return b; + } + return { + setPosition: c, + getPosition: () => t, + scan: e ? p : h, + getToken: () => o, + getTokenValue: () => n, + getTokenOffset: () => r, + getTokenLength: () => t - r, + getTokenError: () => a + }; +} +function Rei(i) { + return i === 32 || i === 9 || i === 11 || i === 12 || i === 160 || i === 5760 || i >= 8192 && i <= 8203 || i === 8239 || i === 8287 || i === 12288 || i === 65279; +} +function lbt(i) { + return i === 10 || i === 13 || i === 8232 || i === 8233; +} +function fre(i) { + return i >= 48 && i <= 57; +} +var A3s; +(function (i) { + i[i.nullCharacter = 0] = "nullCharacter"; + i[i.maxAsciiCharacter = 127] = "maxAsciiCharacter"; + i[i.lineFeed = 10] = "lineFeed"; + i[i.carriageReturn = 13] = "carriageReturn"; + i[i.lineSeparator = 8232] = "lineSeparator"; + i[i.paragraphSeparator = 8233] = "paragraphSeparator"; + i[i.nextLine = 133] = "nextLine"; + i[i.space = 32] = "space"; + i[i.nonBreakingSpace = 160] = "nonBreakingSpace"; + i[i.enQuad = 8192] = "enQuad"; + i[i.emQuad = 8193] = "emQuad"; + i[i.enSpace = 8194] = "enSpace"; + i[i.emSpace = 8195] = "emSpace"; + i[i.threePerEmSpace = 8196] = "threePerEmSpace"; + i[i.fourPerEmSpace = 8197] = "fourPerEmSpace"; + i[i.sixPerEmSpace = 8198] = "sixPerEmSpace"; + i[i.figureSpace = 8199] = "figureSpace"; + i[i.punctuationSpace = 8200] = "punctuationSpace"; + i[i.thinSpace = 8201] = "thinSpace"; + i[i.hairSpace = 8202] = "hairSpace"; + i[i.zeroWidthSpace = 8203] = "zeroWidthSpace"; + i[i.narrowNoBreakSpace = 8239] = "narrowNoBreakSpace"; + i[i.ideographicSpace = 12288] = "ideographicSpace"; + i[i.mathematicalSpace = 8287] = "mathematicalSpace"; + i[i.ogham = 5760] = "ogham"; + i[i._ = 95] = "_"; + i[i.$ = 36] = "$"; + i[i._0 = 48] = "_0"; + i[i._1 = 49] = "_1"; + i[i._2 = 50] = "_2"; + i[i._3 = 51] = "_3"; + i[i._4 = 52] = "_4"; + i[i._5 = 53] = "_5"; + i[i._6 = 54] = "_6"; + i[i._7 = 55] = "_7"; + i[i._8 = 56] = "_8"; + i[i._9 = 57] = "_9"; + i[i.a = 97] = "a"; + i[i.b = 98] = "b"; + i[i.c = 99] = "c"; + i[i.d = 100] = "d"; + i[i.e = 101] = "e"; + i[i.f = 102] = "f"; + i[i.g = 103] = "g"; + i[i.h = 104] = "h"; + i[i.i = 105] = "i"; + i[i.j = 106] = "j"; + i[i.k = 107] = "k"; + i[i.l = 108] = "l"; + i[i.m = 109] = "m"; + i[i.n = 110] = "n"; + i[i.o = 111] = "o"; + i[i.p = 112] = "p"; + i[i.q = 113] = "q"; + i[i.r = 114] = "r"; + i[i.s = 115] = "s"; + i[i.t = 116] = "t"; + i[i.u = 117] = "u"; + i[i.v = 118] = "v"; + i[i.w = 119] = "w"; + i[i.x = 120] = "x"; + i[i.y = 121] = "y"; + i[i.z = 122] = "z"; + i[i.A = 65] = "A"; + i[i.B = 66] = "B"; + i[i.C = 67] = "C"; + i[i.D = 68] = "D"; + i[i.E = 69] = "E"; + i[i.F = 70] = "F"; + i[i.G = 71] = "G"; + i[i.H = 72] = "H"; + i[i.I = 73] = "I"; + i[i.J = 74] = "J"; + i[i.K = 75] = "K"; + i[i.L = 76] = "L"; + i[i.M = 77] = "M"; + i[i.N = 78] = "N"; + i[i.O = 79] = "O"; + i[i.P = 80] = "P"; + i[i.Q = 81] = "Q"; + i[i.R = 82] = "R"; + i[i.S = 83] = "S"; + i[i.T = 84] = "T"; + i[i.U = 85] = "U"; + i[i.V = 86] = "V"; + i[i.W = 87] = "W"; + i[i.X = 88] = "X"; + i[i.Y = 89] = "Y"; + i[i.Z = 90] = "Z"; + i[i.ampersand = 38] = "ampersand"; + i[i.asterisk = 42] = "asterisk"; + i[i.at = 64] = "at"; + i[i.backslash = 92] = "backslash"; + i[i.bar = 124] = "bar"; + i[i.caret = 94] = "caret"; + i[i.closeBrace = 125] = "closeBrace"; + i[i.closeBracket = 93] = "closeBracket"; + i[i.closeParen = 41] = "closeParen"; + i[i.colon = 58] = "colon"; + i[i.comma = 44] = "comma"; + i[i.dot = 46] = "dot"; + i[i.doubleQuote = 34] = "doubleQuote"; + i[i.equals = 61] = "equals"; + i[i.exclamation = 33] = "exclamation"; + i[i.greaterThan = 62] = "greaterThan"; + i[i.lessThan = 60] = "lessThan"; + i[i.minus = 45] = "minus"; + i[i.openBrace = 123] = "openBrace"; + i[i.openBracket = 91] = "openBracket"; + i[i.openParen = 40] = "openParen"; + i[i.percent = 37] = "percent"; + i[i.plus = 43] = "plus"; + i[i.question = 63] = "question"; + i[i.semicolon = 59] = "semicolon"; + i[i.singleQuote = 39] = "singleQuote"; + i[i.slash = 47] = "slash"; + i[i.tilde = 126] = "tilde"; + i[i.backspace = 8] = "backspace"; + i[i.formFeed = 12] = "formFeed"; + i[i.byteOrderMark = 65279] = "byteOrderMark"; + i[i.tab = 9] = "tab"; + i[i.verticalTab = 11] = "verticalTab"; +})(A3s ||= {}); +function yyr(i, e) { + const t = []; + const s = new Object(); + let n; + const r = { + value: {}, + offset: 0, + length: 0, + type: "object", + parent: undefined + }; + let o = false; + function a(l, c, u, d) { + r.value = l; + r.offset = c; + r.length = u; + r.type = d; + r.colonOffset = undefined; + n = r; + } + try { + tW(i, { + onObjectBegin: (l, c) => { + if (e <= l) { + throw s; + } + n = undefined; + o = e > l; + t.push(""); + }, + onObjectProperty: (l, c, u) => { + if (e < c || (a(l, c, u, "property"), t[t.length - 1] = l, e <= c + u)) { + throw s; + } + }, + onObjectEnd: (l, c) => { + if (e <= l) { + throw s; + } + n = undefined; + t.pop(); + }, + onArrayBegin: (l, c) => { + if (e <= l) { + throw s; + } + n = undefined; + t.push(0); + }, + onArrayEnd: (l, c) => { + if (e <= l) { + throw s; + } + n = undefined; + t.pop(); + }, + onLiteralValue: (l, c, u) => { + if (e < c || (a(l, c, u, BA(l)), e <= c + u)) { + throw s; + } + }, + onSeparator: (l, c, u) => { + if (e <= c) { + throw s; + } + if (l === ":" && n && n.type === "property") { + n.colonOffset = c; + o = false; + n = undefined; + } else if (l === ",") { + const d = t[t.length - 1]; + if (typeof d == "number") { + t[t.length - 1] = d + 1; + } else { + o = true; + t[t.length - 1] = ""; + } + n = undefined; + } + } + }); + } catch (l) { + if (l !== s) { + throw l; + } + } + return { + path: t, + previousNode: n, + isAtPropertyKey: o, + matches: l => { + let c = 0; + for (let u = 0; c < l.length && u < t.length; u++) { + if (l[c] === t[u] || l[c] === "*") { + c++; + } else if (l[c] !== "**") { + return false; + } + } + return c === l.length; + } + }; +} +function Ld(i, e = [], t = q0e.DEFAULT) { + let s = null; + let n = []; + const r = []; + function o(l) { + if (Array.isArray(n)) { + n.push(l); + } else if (s !== null) { + n[s] = l; + } + } + tW(i, { + onObjectBegin: () => { + const l = {}; + o(l); + r.push(n); + n = l; + s = null; + }, + onObjectProperty: l => { + s = l; + }, + onObjectEnd: () => { + n = r.pop(); + }, + onArrayBegin: () => { + const l = []; + o(l); + r.push(n); + n = l; + s = null; + }, + onArrayEnd: () => { + n = r.pop(); + }, + onLiteralValue: o, + onError: (l, c, u) => { + e.push({ + error: l, + offset: c, + length: u + }); + } + }, t); + return n[0]; +} +function Nei(i, e = [], t = q0e.DEFAULT) { + let s = { + type: "array", + offset: -1, + length: -1, + children: [], + parent: undefined + }; + function n(l) { + if (s.type === "property") { + s.length = l - s.offset; + s = s.parent; + } + } + function r(l) { + s.children.push(l); + return l; + } + tW(i, { + onObjectBegin: l => { + s = r({ + type: "object", + offset: l, + length: -1, + parent: s, + children: [] + }); + }, + onObjectProperty: (l, c, u) => { + s = r({ + type: "property", + offset: c, + length: -1, + parent: s, + children: [] + }); + s.children.push({ + type: "string", + value: l, + offset: c, + length: u, + parent: s + }); + }, + onObjectEnd: (l, c) => { + s.length = l + c - s.offset; + s = s.parent; + n(l + c); + }, + onArrayBegin: (l, c) => { + s = r({ + type: "array", + offset: l, + length: -1, + parent: s, + children: [] + }); + }, + onArrayEnd: (l, c) => { + s.length = l + c - s.offset; + s = s.parent; + n(l + c); + }, + onLiteralValue: (l, c, u) => { + r({ + type: BA(l), + offset: c, + length: u, + parent: s, + value: l + }); + n(c + u); + }, + onSeparator: (l, c, u) => { + if (s.type === "property") { + if (l === ":") { + s.colonOffset = c; + } else if (l === ",") { + n(c); + } + } + }, + onError: (l, c, u) => { + e.push({ + error: l, + offset: c, + length: u + }); + } + }, t); + const a = s.children[0]; + if (a) { + delete a.parent; + } + return a; +} +function Mei(i, e) { + if (!i) { + return; + } + let t = i; + for (const s of e) { + if (typeof s == "string") { + if (t.type !== "object" || !Array.isArray(t.children)) { + return; + } + let n = false; + for (const r of t.children) { + if (Array.isArray(r.children) && r.children[0].value === s) { + t = r.children[1]; + n = true; + break; + } + } + if (!n) { + return; + } + } else { + const n = s; + if (t.type !== "array" || n < 0 || !Array.isArray(t.children) || n >= t.children.length) { + return; + } + t = t.children[n]; + } + } + return t; +} +function tW(i, e, t = q0e.DEFAULT) { + const s = Lei(i, false); + function n(P) { + if (P) { + return () => P(s.getTokenOffset(), s.getTokenLength()); + } else { + return () => true; + } + } + function r(P) { + if (P) { + return R => P(R, s.getTokenOffset(), s.getTokenLength()); + } else { + return () => true; + } + } + const o = n(e.onObjectBegin); + const a = r(e.onObjectProperty); + const l = n(e.onObjectEnd); + const c = n(e.onArrayBegin); + const u = n(e.onArrayEnd); + const d = r(e.onLiteralValue); + const h = r(e.onSeparator); + const g = n(e.onComment); + const p = r(e.onError); + const b = t && t.disallowComments; + const v = t && t.allowTrailingComma; + function y() { + while (true) { + const P = s.scan(); + switch (s.getTokenError()) { + case 4: + w(14); + break; + case 5: + w(15); + break; + case 3: + w(13); + break; + case 1: + if (!b) { + w(11); + } + break; + case 2: + w(12); + break; + case 6: + w(16); + break; + } + switch (P) { + case 12: + case 13: + if (b) { + w(10); + } else { + g(); + } + break; + case 16: + w(1); + break; + case 15: + case 14: + break; + default: + return P; + } + } + } + function w(P, R = [], L = []) { + p(P); + if (R.length + L.length > 0) { + let F = s.getToken(); + while (F !== 17) { + if (R.indexOf(F) !== -1) { + y(); + break; + } else if (L.indexOf(F) !== -1) { + break; + } + F = y(); + } + } + } + function C(P) { + const R = s.getTokenValue(); + if (P) { + d(R); + } else { + a(R); + } + y(); + return true; + } + function S() { + switch (s.getToken()) { + case 11: + { + let P = 0; + try { + P = JSON.parse(s.getTokenValue()); + if (typeof P != "number") { + w(2); + P = 0; + } + } catch { + w(2); + } + d(P); + break; + } + case 7: + d(null); + break; + case 8: + d(true); + break; + case 9: + d(false); + break; + default: + return false; + } + y(); + return true; + } + function x() { + if (s.getToken() !== 10) { + w(3, [], [2, 5]); + return false; + } else { + C(false); + if (s.getToken() === 6) { + h(":"); + y(); + if (!D()) { + w(4, [], [2, 5]); + } + } else { + w(5, [], [2, 5]); + } + return true; + } + } + function k() { + o(); + y(); + let P = false; + while (s.getToken() !== 2 && s.getToken() !== 17) { + if (s.getToken() === 5) { + if (!P) { + w(4, [], []); + } + h(","); + y(); + if (s.getToken() === 2 && v) { + break; + } + } else if (P) { + w(6, [], []); + } + if (!x()) { + w(4, [], [2, 5]); + } + P = true; + } + l(); + if (s.getToken() !== 2) { + w(7, [2], []); + } else { + y(); + } + return true; + } + function E() { + c(); + y(); + let P = false; + while (s.getToken() !== 4 && s.getToken() !== 17) { + if (s.getToken() === 5) { + if (!P) { + w(4, [], []); + } + h(","); + y(); + if (s.getToken() === 4 && v) { + break; + } + } else if (P) { + w(6, [], []); + } + if (!D()) { + w(4, [], [4, 5]); + } + P = true; + } + u(); + if (s.getToken() !== 4) { + w(8, [4], []); + } else { + y(); + } + return true; + } + function D() { + switch (s.getToken()) { + case 3: + return E(); + case 1: + return k(); + case 10: + return C(true); + default: + return S(); + } + } + y(); + if (s.getToken() === 17) { + if (t.allowEmptyContent) { + return true; + } else { + w(4, [], []); + return false; + } + } else if (D()) { + if (s.getToken() !== 17) { + w(9, [], []); + } + return true; + } else { + w(4, [], []); + return false; + } +} +function BA(i) { + switch (typeof i) { + case "boolean": + return "boolean"; + case "number": + return "number"; + case "string": + return "string"; + case "object": + { + if (i) { + if (Array.isArray(i)) { + return "array"; + } + } else { + return "null"; + } + return "object"; + } + default: + return "null"; + } +} +function wyr(i, e, t) { + let s; + let n; + let r; + let o; + let a; + if (e) { + o = e.offset; + a = o + e.length; + r = o; + while (r > 0 && !cbt(i, r - 1)) { + r--; + } + let C = a; + while (C < i.length && !cbt(i, C)) { + C++; + } + n = i.substring(r, C); + s = Cyr(n, t); + } else { + n = i; + s = 0; + r = 0; + o = 0; + a = i.length; + } + const l = $3s(t, i); + let c = false; + let u = 0; + let d; + if (t.insertSpaces) { + d = Aei(" ", t.tabSize || 4); + } else { + d = "\t"; + } + const h = Lei(n, false); + let g = false; + function p() { + return l + Aei(d, s + u); + } + function b() { + let C = h.scan(); + for (c = false; C === 15 || C === 14;) { + c = c || C === 14; + C = h.scan(); + } + g = C === 16 || h.getTokenError() !== 0; + return C; + } + const v = []; + function y(C, S, x) { + if (!g && S < a && x > o && i.substring(S, x) !== C) { + v.push({ + offset: S, + length: x - S, + content: C + }); + } + } + let w = b(); + if (w !== 17) { + const C = h.getTokenOffset() + r; + const S = Aei(d, s); + y(S, r, C); + } + while (w !== 17) { + let C = h.getTokenOffset() + h.getTokenLength() + r; + let S = b(); + let x = ""; + while (!c && (S === 12 || S === 13)) { + const E = h.getTokenOffset() + r; + y(" ", C, E); + C = h.getTokenOffset() + h.getTokenLength() + r; + x = S === 12 ? p() : ""; + S = b(); + } + if (S === 2) { + if (w !== 1) { + u--; + x = p(); + } + } else if (S === 4) { + if (w !== 3) { + u--; + x = p(); + } + } else { + switch (w) { + case 3: + case 1: + u++; + x = p(); + break; + case 5: + case 12: + x = p(); + break; + case 13: + if (c) { + x = p(); + } else { + x = " "; + } + break; + case 6: + x = " "; + break; + case 10: + if (S === 6) { + x = ""; + break; + } + case 7: + case 8: + case 9: + case 11: + case 2: + case 4: + if (S === 12 || S === 13) { + x = " "; + } else if (S !== 5 && S !== 17) { + g = true; + } + break; + case 16: + g = true; + break; + } + if (c && (S === 12 || S === 13)) { + x = p(); + } + } + const k = h.getTokenOffset() + r; + y(x, C, k); + w = S; + } + return v; +} +function gre(i, e) { + const t = JSON.stringify(i, undefined, e.insertSpaces ? e.tabSize || 4 : "\t"); + if (e.eol !== undefined) { + return t.replace(/\r\n|\r|\n/g, e.eol); + } else { + return t; + } +} +function Aei(i, e) { + let t = ""; + for (let s = 0; s < e; s++) { + t += i; + } + return t; +} +function Cyr(i, e) { + let t = 0; + let s = 0; + const n = e.tabSize || 4; + while (t < i.length) { + const r = i.charAt(t); + if (r === " ") { + s++; + } else if (r === "\t") { + s += n; + } else { + break; + } + t++; + } + return Math.floor(s / n); +} +function $3s(i, e) { + for (let t = 0; t < e.length; t++) { + const s = e.charAt(t); + if (s === "\r") { + if (t + 1 < e.length && e.charAt(t + 1) === ` +`) { + return `\r +`; + } else { + return "\r"; + } + } + if (s === ` +`) { + return ` +`; + } + } + return i && i.eol || ` +`; +} +function cbt(i, e) { + return `\r +`.indexOf(i.charAt(e)) !== -1; +} +$i(); +var $ei = class S9i extends H { + get outputs() { + return this.n; + } + get metadata() { + return this.q; + } + set metadata(e) { + this.q = e; + this.w = null; + this.g.fire(); + } + get internalMetadata() { + return this.s; + } + set internalMetadata(e) { + const t = this.s.lastRunSuccess !== e.lastRunSuccess; + e = { + ...e, + runStartTimeAdjustment: Syr(this.s, e) + }; + this.s = e; + this.w = null; + this.h.fire({ + lastRunSuccessChanged: t + }); + } + get language() { + return this.N; + } + set language(e) { + if (!this.F || this.F.getLanguageId() !== this.P.getLanguageIdByLanguageName(e) || this.F.getLanguageId() !== this.P.getLanguageIdByLanguageName(this.language)) { + this.L = true; + this.U(e); + } + } + get mime() { + return this.O; + } + set mime(e) { + if (this.O !== e) { + this.O = e; + this.w = null; + this.f.fire("mime"); + } + } + get textBuffer() { + if (this.t) { + return this.t; + } else { + this.t = this.D(hme(this.M, 1).textBuffer); + this.D(this.t.onDidChangeContent(() => { + this.w = null; + if (!this.F) { + this.f.fire("content"); + } + this.autoDetectLanguage(); + })); + return this.t; + } + } + get alternativeId() { + return this.z; + } + get textModel() { + return this.F; + } + set textModel(e) { + if (this.F !== e) { + this.C.clear(); + this.F = e; + if (this.F) { + this.G(this.P, this.F.getLanguageId(), this.language); + this.C.add(this.F.onDidChangeLanguage(t => this.G(this.P, t.newLanguage, this.language))); + this.C.add(this.F.onWillDispose(() => this.textModel = undefined)); + this.C.add(this.F.onDidChangeContent(t => { + if (this.F) { + this.y = this.F.getVersionId(); + this.z = this.F.getAlternativeVersionId(); + } + this.u = null; + this.f.fire("content"); + this.f.fire({ + type: "model", + event: t + }); + })); + this.F._overwriteVersionId(this.y); + this.F._overwriteAlternativeVersionId(this.y); + } + } + } + G(e, t, s) { + const n = t === Ju || t === "jupyter"; + if (!e.isRegisteredLanguageId(s) && n) { + this.j.fire(s); + } else { + this.language = t; + } + } + static { + this.H = 600; + } + get hasLanguageSetExplicitly() { + return this.L; + } + constructor(e, t, s, n, r, o, a, l, c, u, d, h, g = undefined) { + super(); + this.uri = e; + this.handle = t; + this.M = s; + this.N = n; + this.O = r; + this.cellKind = o; + this.collapseState = u; + this.transientOptions = d; + this.P = h; + this.Q = g; + this.a = this.D(new B()); + this.onDidChangeOutputs = this.a.event; + this.c = this.D(new B()); + this.onDidChangeOutputItems = this.c.event; + this.f = this.D(new B()); + this.onDidChangeContent = this.f.event; + this.g = this.D(new B()); + this.onDidChangeMetadata = this.g.event; + this.h = this.D(new B()); + this.onDidChangeInternalMetadata = this.h.event; + this.j = this.D(new B()); + this.onDidChangeLanguage = this.j.event; + this.u = null; + this.w = null; + this.y = 1; + this.z = 1; + this.C = this.D(new Q()); + this.F = undefined; + this.I = this.D(new Bm(S9i.H)); + this.J = false; + this.L = false; + this.n = a.map(p => new abt(p)); + this.q = l ?? {}; + this.s = c ?? {}; + } + enableAutoLanguageDetection() { + this.J = true; + this.autoDetectLanguage(); + } + async autoDetectLanguage() { + if (this.J) { + this.I.trigger(() => this.S()); + } + } + async S() { + if (this.hasLanguageSetExplicitly) { + return; + } + const e = await this.Q?.detectLanguage(this.uri); + if (e) { + if (!this.F || this.F.getLanguageId() !== this.P.getLanguageIdByLanguageName(e) || this.F.getLanguageId() !== this.P.getLanguageIdByLanguageName(this.language)) { + this.U(e); + } + } + } + U(e) { + const t = this.P.getLanguageIdByLanguageName(e); + if (t !== null) { + if (this.F) { + const s = this.P.createById(t); + this.F.setLanguage(s.languageId); + } + if (this.N !== e) { + this.N = e; + this.w = null; + this.j.fire(e); + this.f.fire("language"); + } + } + } + resetTextBuffer(e) { + this.t = e; + } + getValue() { + const e = this.getFullModelRange(); + if (this.textBuffer.getEOL() === ` +`) { + return this.textBuffer.getValueInRange(e, 1); + } else { + return this.textBuffer.getValueInRange(e, 2); + } + } + getTextBufferHash() { + if (this.u !== null) { + return this.u; + } + const e = new j2(); + const t = this.textBuffer.createSnapshot(false); + let s; + while (s = t.read()) { + e.update(s); + } + this.u = e.digest(); + return this.u; + } + getHashValue() { + if (this.w !== null) { + return this.w; + } else { + this.w = Qc([Qc(this.language), this.getTextBufferHash(), this.W(), this.transientOptions.transientOutputs ? [] : this.n.map(e => ({ + outputs: e.outputs.map(t => ({ + mime: t.mime, + data: Array.from(t.data.buffer) + })), + metadata: e.metadata + }))]); + return this.w; + } + } + W() { + return iW(this.transientOptions.transientCellMetadata, this.metadata, this.language); + } + getTextLength() { + return this.textBuffer.getLength(); + } + getFullModelRange() { + const e = this.textBuffer.getLineCount(); + return new Z(1, 1, e, this.textBuffer.getLineLength(e) + 1); + } + spliceNotebookCellOutputs(e) { + if (e.deleteCount > 0 && e.newOutputs.length > 0) { + const t = Math.min(e.deleteCount, e.newOutputs.length); + for (let n = 0; n < t; n++) { + const r = this.outputs[e.start + n]; + const o = e.newOutputs[n]; + this.replaceOutput(r.outputId, o); + } + this.outputs.splice(e.start + t, e.deleteCount - t, ...e.newOutputs.slice(t)).forEach(n => n.dispose()); + this.a.fire({ + start: e.start + t, + deleteCount: e.deleteCount - t, + newOutputs: e.newOutputs.slice(t) + }); + } else { + this.outputs.splice(e.start, e.deleteCount, ...e.newOutputs).forEach(s => s.dispose()); + this.a.fire(e); + } + } + replaceOutput(e, t) { + const s = this.outputs.findIndex(r => r.outputId === e); + if (s < 0) { + return false; + } else { + this.outputs[s].replaceData({ + outputs: t.outputs, + outputId: t.outputId, + metadata: t.metadata + }); + t.dispose(); + this.c.fire(); + return true; + } + } + changeOutputItems(e, t, s) { + const n = this.outputs.findIndex(o => o.outputId === e); + if (n < 0) { + return false; + } + const r = this.outputs[n]; + if (t) { + r.appendData(s); + } else { + r.replaceData({ + outputId: e, + outputs: s, + metadata: r.metadata + }); + } + this.c.fire(); + return true; + } + X(e, t) { + if (e.length !== t.length) { + return false; + } + for (let s = 0; s < this.outputs.length; s++) { + const n = e[s]; + const r = t[s]; + if (n.outputs.length !== r.outputs.length) { + return false; + } + for (let o = 0; o < n.outputs.length; o++) { + if (n.outputs[o].mime !== r.outputs[o].mime || n.outputs[o].data.byteLength !== r.outputs[o].data.byteLength) { + return false; + } + } + } + return true; + } + equal(e) { + if (this.language !== e.language || this.outputs.length !== e.outputs.length || this.getTextLength() !== e.getTextLength() || !this.transientOptions.transientOutputs && !this.X(this.outputs, e.outputs)) { + return false; + } else { + return this.getHashValue() === e.getHashValue(); + } + } + fastEqual(e, t) { + if (this.language !== e.language || this.mime !== e.mime || this.cellKind !== e.cellKind || !t && (this.internalMetadata?.executionOrder !== e.internalMetadata?.executionOrder || this.internalMetadata?.lastRunSuccess !== e.internalMetadata?.lastRunSuccess || this.internalMetadata?.runStartTime !== e.internalMetadata?.runStartTime || this.internalMetadata?.runStartTimeAdjustment !== e.internalMetadata?.runStartTimeAdjustment || this.internalMetadata?.runEndTime !== e.internalMetadata?.runEndTime)) { + return false; + } + if (this.t) { + if (!S9i.Y(this.textBuffer.getLinesContent(), e.source)) { + return false; + } + } else if (this.M !== e.source) { + return false; + } + return true; + } + static Y(e, t) { + const s = Ov(t); + if (e.length !== s.length) { + return false; + } + for (let n = 0; n < e.length; n++) { + if (e[n] !== s[n]) { + return false; + } + } + return true; + } + dispose() { + si(this.n); + const e = new mlt([], "", ` +`, false, false, true, true); + e.dispose(); + this.t = e; + super.dispose(); + } +}; +function $G(i) { + return { + source: i.getValue(), + language: i.language, + mime: i.mime, + cellKind: i.cellKind, + outputs: i.outputs.map(e => ({ + outputs: e.outputs, + outputId: Ft() + })), + metadata: {} + }; +} +function Syr(i, e) { + if (i.runStartTime !== e.runStartTime && typeof e.runStartTime == "number") { + const t = Date.now() - e.runStartTime; + if (t < 0) { + return Math.abs(t); + } else { + return 0; + } + } else { + return e.runStartTimeAdjustment; + } +} +function iW(i, e, t) { + let s = {}; + if (i) { + const o = new Set([...Object.keys(e)]); + for (const a of o) { + if (!i[a]) { + s[a] = e[a]; + } + } + } else { + s = e; + } + const n = { + language: t, + ...s + }; + if (t) { + n.language = t; + } + return gre(n, {}); +} +Mr(); +cA(); +X(); +async function ubt(i, e, t, s) { + const { + notebookEditor: n + } = e; + if (n.hasModel() && !n.isReadOnly) { + if (e.ui && e.cell) { + const { + cell: r + } = e; + if (r.cellKind === i) { + return; + } + const o = r.getText(); + const a = n.getCellIndex(r); + if (t === undefined) { + t = (n.activeKernel?.supportedLanguages ?? [])[0] ?? Ju; + } + n.textModel.applyEdits([{ + editType: 1, + index: a, + count: 1, + cells: [{ + cellKind: i, + source: o, + language: t, + mime: s ?? r.mime, + outputs: r.model.outputs, + metadata: r.metadata + }] + }], true, { + kind: _l.Index, + focus: n.getFocus(), + selections: n.getSelections() + }, () => ({ + kind: _l.Index, + focus: n.getFocus(), + selections: n.getSelections() + }), undefined, true); + const l = n.cellAt(a); + await n.focusNotebookCell(l, r.getEditState() === Dl.Editing ? "editor" : "container"); + } else if (e.selectedCells) { + const r = e.selectedCells; + const o = []; + r.forEach(a => { + if (a.cellKind === i) { + return; + } + const l = a.getText(); + const c = n.getCellIndex(a); + if (t === undefined) { + t = (n.activeKernel?.supportedLanguages ?? [])[0] ?? Ju; + } + o.push({ + editType: 1, + index: c, + count: 1, + cells: [{ + cellKind: i, + source: l, + language: t, + mime: s ?? a.mime, + outputs: a.model.outputs, + metadata: a.metadata + }] + }); + }); + n.textModel.applyEdits(o, true, { + kind: _l.Index, + focus: n.getFocus(), + selections: n.getSelections() + }, () => ({ + kind: _l.Index, + focus: n.getFocus(), + selections: n.getSelections() + }), undefined, true); + } + } +} +function F3s(i, e) { + const t = i.textModel; + const s = i.getSelections(); + const n = i.getCellIndex(e); + const r = s.find(a => a.start <= n && n < a.end); + const o = !i.isReadOnly || t.viewType === "interactive"; + if (r) { + const a = s.reverse().map(c => ({ + editType: 1, + index: c.start, + count: c.end - c.start, + cells: [] + })); + const l = r.end >= i.getLength() ? undefined : i.cellAt(r.end); + t.applyEdits(a, true, { + kind: _l.Index, + focus: i.getFocus(), + selections: i.getSelections() + }, () => { + if (l) { + const c = t.cells.findIndex(u => u.handle === l.handle); + return { + kind: _l.Index, + focus: { + start: c, + end: c + 1 + }, + selections: [{ + start: c, + end: c + 1 + }] + }; + } else if (t.length) { + const c = t.length - 1; + return { + kind: _l.Index, + focus: { + start: c, + end: c + 1 + }, + selections: [{ + start: c, + end: c + 1 + }] + }; + } else { + return { + kind: _l.Index, + focus: { + start: 0, + end: 0 + }, + selections: [{ + start: 0, + end: 0 + }] + }; + } + }, undefined, o); + } else { + const a = i.getFocus(); + const l = [{ + editType: 1, + index: n, + count: 1, + cells: [] + }]; + const c = []; + for (let u = 0; u < s.length; u++) { + const d = s[u]; + if (d.end <= n) { + c.push(d); + } else if (d.start > n) { + c.push({ + start: d.start - 1, + end: d.end - 1 + }); + } else { + c.push({ + start: n, + end: n + 1 + }); + } + } + if (i.cellAt(a.start) === e) { + const u = a.end === t.length ? { + start: a.start - 1, + end: a.end - 1 + } : a; + t.applyEdits(l, true, { + kind: _l.Index, + focus: i.getFocus(), + selections: i.getSelections() + }, () => ({ + kind: _l.Index, + focus: u, + selections: c + }), undefined, o); + } else { + const u = a.start > n ? { + start: a.start - 1, + end: a.end - 1 + } : a; + t.applyEdits(l, true, { + kind: _l.Index, + focus: i.getFocus(), + selections: i.getSelections() + }, () => ({ + kind: _l.Index, + focus: u, + selections: c + }), undefined, o); + } + } +} +async function O3s(i, e) { + if (!i.notebookEditor.hasModel()) { + return; + } + const t = i.notebookEditor; + const s = t.textModel; + if (t.isReadOnly) { + return; + } + let n; + if (i.cell) { + const r = t.getCellIndex(i.cell); + n = { + start: r, + end: r + 1 + }; + } else { + const r = t.getSelections(); + n = vwe(t, r)[0]; + } + if (!!n && n.start !== n.end) { + if (e === "up") { + if (n.start === 0) { + return; + } + const r = n.start - 1; + const o = { + start: n.start - 1, + end: n.end - 1 + }; + const a = i.notebookEditor.getFocus(); + const l = RGt(n, a) ? { + start: a.start - 1, + end: a.end - 1 + } : { + start: n.start - 1, + end: n.start + }; + s.applyEdits([{ + editType: 6, + index: r, + length: 1, + newIdx: n.end - 1 + }], true, { + kind: _l.Index, + focus: t.getFocus(), + selections: t.getSelections() + }, () => ({ + kind: _l.Index, + focus: l, + selections: [o] + }), undefined, true); + const c = t.getSelections()[0] ?? t.getFocus(); + t.revealCellRangeInView(c); + } else { + if (n.end >= s.length) { + return; + } + const r = n.end; + const o = { + start: n.start + 1, + end: n.end + 1 + }; + const a = t.getFocus(); + const l = RGt(n, a) ? { + start: a.start + 1, + end: a.end + 1 + } : { + start: n.start + 1, + end: n.start + 2 + }; + s.applyEdits([{ + editType: 6, + index: r, + length: 1, + newIdx: n.start + }], true, { + kind: _l.Index, + focus: t.getFocus(), + selections: t.getSelections() + }, () => ({ + kind: _l.Index, + focus: l, + selections: [o] + }), undefined, true); + const c = t.getSelections()[0] ?? t.getFocus(); + t.revealCellRangeInView(c); + } + } +} +async function _3s(i, e) { + const t = i.notebookEditor; + if (!t.hasModel()) { + return; + } + const s = t.textModel; + if (t.isReadOnly) { + return; + } + let n; + if (i.ui) { + const r = i.cell; + const o = t.getCellIndex(r); + n = { + start: o, + end: o + 1 + }; + } else { + const r = t.getSelections(); + n = vwe(t, r)[0]; + } + if (!!n && n.start !== n.end) { + if (e === "up") { + const r = t.getFocus(); + const o = t.getSelections(); + s.applyEdits([{ + editType: 1, + index: n.end, + count: 0, + cells: pE([n]).map(a => $G(t.cellAt(a).model)) + }], true, { + kind: _l.Index, + focus: r, + selections: o + }, () => ({ + kind: _l.Index, + focus: r, + selections: o + }), undefined, true); + } else { + const r = t.getFocus(); + const o = t.getSelections(); + const l = pE([n]).map(h => $G(t.cellAt(h).model)).length; + const c = i.ui ? r : { + start: r.start + l, + end: r.end + l + }; + const u = i.ui ? o : [{ + start: n.start + l, + end: n.end + l + }]; + s.applyEdits([{ + editType: 1, + index: n.end, + count: 0, + cells: pE([n]).map(h => $G(t.cellAt(h).model)) + }], true, { + kind: _l.Index, + focus: r, + selections: o + }, () => ({ + kind: _l.Index, + focus: c, + selections: u + }), undefined, true); + const d = t.getSelections()[0] ?? t.getFocus(); + t.revealCellRangeInView(d); + } + } +} +async function xyr(i, e, t) { + const s = t.notebookEditor; + if (s.isReadOnly) { + return; + } + const n = []; + const r = []; + for (const d of s.getSelections()) { + r.push(...s.getCellsInRange(d)); + } + if (r.length <= 1) { + return; + } + const o = r[0].cellKind; + if (!r.every(d => d.cellKind === o)) { + const d = f(8271, null); + return e.warn(d); + } + const l = r[0]; + const c = r.map(d => d.getText()).join(l.textBuffer.getEOL()); + const u = s.getSelections()[0]; + n.push(new xD(s.textModel.uri, { + editType: 1, + index: u.start, + count: u.end - u.start, + cells: [{ + cellKind: l.cellKind, + source: c, + language: l.language, + mime: l.mime, + outputs: l.model.outputs, + metadata: l.metadata + }] + })); + for (const d of s.getSelections().slice(1)) { + n.push(new xD(s.textModel.uri, { + editType: 1, + index: d.start, + count: d.end - d.start, + cells: [] + })); + } + if (n.length) { + await i.apply(n, { + quotableLabel: f(8272, null) + }); + } +} +async function B3s(i, e, t, s) { + if (i.isReadOnly) { + return null; + } + const n = i.textModel; + const r = i.getCellsInRange(e); + if (!r.length || e.start === 0 && t === "above" || e.end === n.length && t === "below") { + return null; + } + for (let o = 0; o < r.length; o++) { + const a = r[o]; + if (s && a.cellKind !== s) { + return null; + } + } + if (t === "above") { + const o = i.cellAt(e.start - 1); + if (s && o.cellKind !== s) { + return null; + } + const a = r.map(u => (u.textBuffer.getEOL() ?? "") + u.getText()).join(""); + const l = o.textBuffer.getLineCount(); + const c = o.textBuffer.getLineLength(l); + return { + edits: [new Ff(o.uri, { + range: new Z(l, c + 1, l, c + 1), + text: a + }), new xD(n.uri, { + editType: 1, + index: e.start, + count: e.end - e.start, + cells: [] + })], + cell: o, + endFocus: { + start: e.start - 1, + end: e.start + }, + endSelections: [{ + start: e.start - 1, + end: e.start + }] + }; + } else { + const o = i.cellAt(e.end); + if (s && o.cellKind !== s) { + return null; + } + const a = r[0]; + const c = [...r.slice(1), o].map(h => (h.textBuffer.getEOL() ?? "") + h.getText()).join(""); + const u = a.textBuffer.getLineCount(); + const d = a.textBuffer.getLineLength(u); + return { + edits: [new Ff(a.uri, { + range: new Z(u, d + 1, u, d + 1), + text: c + }), new xD(n.uri, { + editType: 1, + index: e.start + 1, + count: e.end - e.start, + cells: [] + })], + cell: a, + endFocus: { + start: e.start, + end: e.start + 1 + }, + endSelections: [{ + start: e.start, + end: e.start + 1 + }] + }; + } +} +async function U3s(i, e, t) { + const s = e.notebookEditor; + const n = s.textModel; + const r = s.getViewModel(); + let o = null; + if (e.ui) { + const a = e.cell.focusMode; + const l = s.getCellIndex(e.cell); + o = await B3s(s, { + start: l, + end: l + 1 + }, t); + if (!o) { + return; + } + await i.apply(o?.edits, { + quotableLabel: "Join Notebook Cells" + }); + r.updateSelectionsState({ + kind: _l.Index, + focus: o.endFocus, + selections: o.endSelections + }); + o.cell.updateEditState(Dl.Editing, "joinCellsWithSurrounds"); + s.revealCellRangeInView(s.getFocus()); + if (a === cd.Editor) { + o.cell.focusMode = cd.Editor; + } + } else { + const a = s.getSelections(); + if (!a.length) { + return; + } + const l = s.getFocus(); + const c = s.cellAt(l.start)?.focusMode; + const u = []; + let d = null; + const h = []; + for (let p = a.length - 1; p >= 0; p--) { + const b = a[p]; + const v = RGt(b, l); + if (b.end >= n.length && t === "below" || b.start === 0 && t === "above") { + if (v) { + d = s.cellAt(l.start); + } + h.push(...s.getCellsInRange(b)); + continue; + } + const y = await B3s(s, b, t); + if (!y) { + return; + } + u.push(...y.edits); + h.push(y.cell); + if (v) { + d = y.cell; + } + } + if (!u.length || !d || !h.length) { + return; + } + await i.apply(u, { + quotableLabel: "Join Notebook Cells" + }); + h.forEach(p => { + p.updateEditState(Dl.Editing, "joinCellsWithSurrounds"); + }); + r.updateSelectionsState({ + kind: _l.Handle, + primary: d.handle, + selections: h.map(p => p.handle) + }); + s.revealCellRangeInView(s.getFocus()); + const g = s.cellAt(s.getFocus().start); + if (c === cd.Editor && g) { + g.focusMode = cd.Editor; + } + } +} +function kyr(i, e) { + const t = []; + const s = e.getLineCount(); + const n = a => e.getLineLength(a); + i = i.sort((a, l) => { + const c = a.lineNumber - l.lineNumber; + const u = a.column - l.column; + if (c !== 0) { + return c; + } else { + return u; + } + }); + for (let a of i) { + if (n(a.lineNumber) + 1 === a.column && a.column !== 1 && a.lineNumber < s) { + a = new je(a.lineNumber + 1, 1); + } + Eyr(t, a); + } + if (t.length === 0) { + return null; + } + const r = new je(1, 1); + const o = new je(s, n(s) + 1); + return [r, ...t, o]; +} +function Eyr(i, e) { + const t = i.length > 0 ? i[i.length - 1] : undefined; + if (!t || t.lineNumber !== e.lineNumber || t.column !== e.column) { + i.push(e); + } +} +function Iyr(i, e) { + const t = kyr(e, i.textBuffer); + if (!t) { + return null; + } + const s = []; + for (let n = 1; n < t.length; n++) { + const r = t[n - 1]; + const o = t[n]; + s.push(i.textBuffer.getValueInRange(new Z(r.lineNumber, r.column, o.lineNumber, o.column), 0)); + } + return s; +} +function BR(i, e, t, s, n = "above", r = "", o = false) { + const a = e.getViewModel(); + const l = e.activeKernel; + if (a.options.isReadOnly) { + return null; + } + const c = e.cellAt(t); + const u = o ? a.getNextVisibleCellIndex(t) : t + 1; + let d; + if (s === qn.Code) { + const g = l?.supportedLanguages ?? i.getRegisteredLanguageIds(); + const p = g[0] || Ju; + if (c?.cellKind === qn.Code) { + d = c.language; + } else if (c?.cellKind === qn.Markup) { + const b = a.nearestCodeCellIndex(t); + if (b > -1) { + d = a.cellAt(b).language; + } else { + d = p; + } + } else if (c === undefined && n === "above") { + d = a.viewCells.find(b => b.cellKind === qn.Code)?.language || p; + } else { + d = p; + } + if (!g.includes(d)) { + d = p; + } + } else { + d = "markdown"; + } + return Dyr(a, c ? n === "above" ? t : u : t, r, d, s, undefined, [], true, true); +} +function Dyr(i, e, t, s, n, r, o, a, l) { + const c = { + kind: _l.Index, + focus: { + start: e, + end: e + 1 + }, + selections: [{ + start: e, + end: e + 1 + }] + }; + i.notebookDocument.applyEdits([{ + editType: 1, + index: e, + count: 0, + cells: [{ + cellKind: n, + language: s, + mime: undefined, + outputs: o, + metadata: r, + source: t + }] + }], a, { + kind: _l.Index, + focus: i.getFocus(), + selections: i.getSelections() + }, () => c, undefined, l && !i.options.isReadOnly); + return i.cellAt(e); +} +ja(); +Mr(); +dv(); +yE(); +Me(); +te(); +vt(); +jm(); +Hr(); +Lc(); +Hr(); +Wo(); +cS(); +var toa = class aYe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.InlineGPT4PromptProtoV1"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "current_file", + kind: "message", + T: tu + }]); + } + static fromBinary(e, t) { + return new aYe().fromBinary(e, t); + } + static fromJson(e, t) { + return new aYe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new aYe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(aYe, e, t); + } +}; +var W3s = class lYe extends N { + constructor(e) { + super(); + this.repositories = []; + this.contextBlocks = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamInlineLongCompletionRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "current_file", + kind: "message", + T: tu + }, { + no: 6, + name: "repositories", + kind: "message", + T: pc, + repeated: true + }, { + no: 7, + name: "context_blocks", + kind: "message", + T: Tyr, + repeated: true + }, { + no: 13, + name: "explicit_context", + kind: "message", + T: Qg + }, { + no: 14, + name: "model_details", + kind: "message", + T: Qa + }, { + no: 15, + name: "linter_errors", + kind: "message", + T: xp + }]); + } + static fromBinary(e, t) { + return new lYe().fromBinary(e, t); + } + static fromJson(e, t) { + return new lYe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new lYe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(lYe, e, t); + } +}; +var Tyr = class cYe extends N { + constructor(e) { + super(); + this.contextType = pre.UNSPECIFIED; + this.blocks = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamInlineLongCompletionRequest.ContextBlock"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "context_type", + kind: "enum", + T: m.getEnumType(pre) + }, { + no: 2, + name: "blocks", + kind: "message", + T: Xg, + repeated: true + }]); + } + static fromBinary(e, t) { + return new cYe().fromBinary(e, t); + } + static fromJson(e, t) { + return new cYe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new cYe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(cYe, e, t); + } +}; +var pre; +(function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.RECENT_LOCATIONS = 1] = "RECENT_LOCATIONS"; +})(pre ||= {}); +m.util.setEnumType(pre, "aiserver.v1.StreamInlineLongCompletionRequest.ContextBlock.ContextType", [{ + no: 0, + name: "CONTEXT_TYPE_UNSPECIFIED" +}, { + no: 1, + name: "CONTEXT_TYPE_RECENT_LOCATIONS" +}]); +Hr(); +Wo(); +var Pyr = class uYe extends N { + constructor(e) { + super(); + this.mainSymbolsToAnalyzeFromGoToDef = []; + this.relatedSymbols = []; + this.mainSymbolsToAnalyzeFromImplementations = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamAiPreviewsIntent"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "main_symbols_to_analyze_from_go_to_def", + kind: "message", + T: vbe, + repeated: true + }, { + no: 4, + name: "main_symbol_hover_details", + kind: "message", + T: vHt + }, { + no: 3, + name: "related_symbols", + kind: "message", + T: vbe, + repeated: true + }, { + no: 6, + name: "main_symbols_to_analyze_from_implementations", + kind: "message", + T: vbe, + repeated: true + }]); + } + static fromBinary(e, t) { + return new uYe().fromBinary(e, t); + } + static fromJson(e, t) { + return new uYe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new uYe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(uYe, e, t); + } +}; +var V3s = class dYe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamAiPreviewsRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "current_file", + kind: "message", + T: tu + }, { + no: 2, + name: "intent", + kind: "message", + T: Pyr + }, { + no: 14, + name: "model_details", + kind: "message", + T: Qa + }, { + no: 15, + name: "is_detailed", + kind: "scalar", + T: 8, + opt: true + }]); + } + static fromBinary(e, t) { + return new dYe().fromBinary(e, t); + } + static fromJson(e, t) { + return new dYe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new dYe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(dYe, e, t); + } +}; +var Lyr = class hYe extends N { + constructor(e) { + super(); + this.text = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamAiPreviewsResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "text", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new hYe().fromBinary(e, t); + } + static fromJson(e, t) { + return new hYe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new hYe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(hYe, e, t); + } +}; +uS(); +Bie(); +Xut(); +Hr(); +var UA; +(function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.WALL = 1] = "WALL"; + i[i.ALLOCATION = 2] = "ALLOCATION"; + i[i.CPU = 3] = "CPU"; +})(UA ||= {}); +m.util.setEnumType(UA, "aiserver.v1.ProfileKind", [{ + no: 0, + name: "PROFILE_KIND_UNSPECIFIED" +}, { + no: 1, + name: "PROFILE_KIND_WALL" +}, { + no: 2, + name: "PROFILE_KIND_ALLOCATION" +}, { + no: 3, + name: "PROFILE_KIND_CPU" +}]); +var Ryr = class fYe extends N { + constructor(e) { + super(); + this.action = ""; + this.generationUuid = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ReportInlineActionRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "action", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "generation_uuid", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new fYe().fromBinary(e, t); + } + static fromJson(e, t) { + return new fYe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new fYe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(fYe, e, t); + } +}; +var Nyr = class gYe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ReportInlineActionResponse"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new gYe().fromBinary(e, t); + } + static fromJson(e, t) { + return new gYe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new gYe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(gYe, e, t); + } +}; +var dbt = class pYe extends N { + constructor(e) { + super(); + this.metrics = {}; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ReportMetricsRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "metrics", + kind: "map", + K: 9, + V: { + kind: "message", + T: Myr + } + }]); + } + static fromBinary(e, t) { + return new pYe().fromBinary(e, t); + } + static fromJson(e, t) { + return new pYe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new pYe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(pYe, e, t); + } +}; +var Myr = class mYe extends N { + constructor(e) { + super(); + this.tags = {}; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ReportMetricsRequest.Metric"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "value", + kind: "scalar", + T: 1, + opt: true + }, { + no: 2, + name: "tags", + kind: "map", + K: 9, + V: { + kind: "scalar", + T: 9 + } + }]); + } + static fromBinary(e, t) { + return new mYe().fromBinary(e, t); + } + static fromJson(e, t) { + return new mYe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new mYe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(mYe, e, t); + } +}; +var hbt = class bYe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ReportMetricsResponse"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new bYe().fromBinary(e, t); + } + static fromJson(e, t) { + return new bYe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new bYe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(bYe, e, t); + } +}; +var H3s = class vYe extends N { + constructor(e) { + super(); + this.profileData = new Uint8Array(0); + this.profileConfigId = ""; + this.profileKind = UA.UNSPECIFIED; + this.tags = {}; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CapturedProfile"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "timestamp", + kind: "message", + T: $z + }, { + no: 2, + name: "duration", + kind: "message", + T: iHt + }, { + no: 3, + name: "profile_data", + kind: "scalar", + T: 12 + }, { + no: 4, + name: "profile_config_id", + kind: "scalar", + T: 9 + }, { + no: 5, + name: "profile_kind", + kind: "enum", + T: m.getEnumType(UA) + }, { + no: 6, + name: "tags", + kind: "map", + K: 9, + V: { + kind: "scalar", + T: 9 + } + }]); + } + static fromBinary(e, t) { + return new vYe().fromBinary(e, t); + } + static fromJson(e, t) { + return new vYe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new vYe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(vYe, e, t); + } +}; +var q3s = class yYe extends N { + constructor(e) { + super(); + this.profiles = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SubmitProfileRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "profiles", + kind: "message", + T: H3s, + repeated: true + }]); + } + static fromBinary(e, t) { + return new yYe().fromBinary(e, t); + } + static fromJson(e, t) { + return new yYe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new yYe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(yYe, e, t); + } +}; +var Ayr = class wYe extends N { + constructor(e) { + super(); + this.profileIds = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SubmitProfileResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "profile_ids", + kind: "scalar", + T: 9, + repeated: true + }]); + } + static fromBinary(e, t) { + return new wYe().fromBinary(e, t); + } + static fromJson(e, t) { + return new wYe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new wYe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(wYe, e, t); + } +}; +Hr(); +var $yr = class CYe extends N { + constructor(e) { + super(); + this.generateTheWholeThing = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.Specedits1Request"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "generate_the_whole_thing", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new CYe().fromBinary(e, t); + } + static fromJson(e, t) { + return new CYe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new CYe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(CYe, e, t); + } +}; +var Fyr = class SYe extends N { + constructor(e) { + super(); + this.fullFile = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.Specedits1Response"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "full_file", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new SYe().fromBinary(e, t); + } + static fromJson(e, t) { + return new SYe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new SYe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(SYe, e, t); + } +}; +var Oyr = class xYe extends N { + constructor(e) { + super(); + this.name = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SimpleRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "name", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new xYe().fromBinary(e, t); + } + static fromJson(e, t) { + return new xYe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new xYe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(xYe, e, t); + } +}; +var _yr = class kYe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SimpleResponse"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new kYe().fromBinary(e, t); + } + static fromJson(e, t) { + return new kYe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new kYe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(kYe, e, t); + } +}; +var ioa = class EYe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.EmptyRequest"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new EYe().fromBinary(e, t); + } + static fromJson(e, t) { + return new EYe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new EYe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(EYe, e, t); + } +}; +var Byr = class IYe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.EmptyResponse"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new IYe().fromBinary(e, t); + } + static fromJson(e, t) { + return new IYe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new IYe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(IYe, e, t); + } +}; +jie(); +var of = { + typeName: "aiserver.v1.AiService", + methods: { + serverTime: { + name: "ServerTime", + I: B1s, + O: U1s, + kind: Ge.Unary + }, + healthCheck: { + name: "HealthCheck", + I: ozt, + O: W1s, + kind: Ge.Unary + }, + privacyCheck: { + name: "PrivacyCheck", + I: V1s, + O: H1s, + kind: Ge.Unary + }, + timeLeftHealthCheck: { + name: "TimeLeftHealthCheck", + I: ozt, + O: q1s, + kind: Ge.Unary + }, + throwErrorCheck: { + name: "ThrowErrorCheck", + I: $1s, + O: F1s, + kind: Ge.Unary + }, + availableModels: { + name: "AvailableModels", + I: nzt, + O: O1s, + kind: Ge.Unary + }, + streamChatTryReallyHard: { + name: "StreamChatTryReallyHard", + I: l5, + O: sD, + kind: Ge.ServerStreaming + }, + rerankDocuments: { + name: "RerankDocuments", + I: Dbs, + O: Tbs, + kind: Ge.Unary + }, + streamComposer: { + name: "StreamComposer", + I: $ve, + O: sD, + kind: Ge.ServerStreaming + }, + streamComposerContext: { + name: "StreamComposerContext", + I: Edt, + O: szt, + kind: Ge.ServerStreaming + }, + warmComposerCache: { + name: "WarmComposerCache", + I: $ve, + O: oks, + kind: Ge.Unary + }, + keepComposerCacheWarm: { + name: "KeepComposerCacheWarm", + I: VEs, + O: HEs, + kind: Ge.Unary + }, + countTokens: { + name: "CountTokens", + I: GEs, + O: YEs, + kind: Ge.Unary + }, + streamPotentialLocs: { + name: "StreamPotentialLocs", + I: Nxs, + O: Mxs, + kind: Ge.ServerStreaming + }, + streamPotentialLocsUnderneath: { + name: "StreamPotentialLocsUnderneath", + I: Lxs, + O: Rxs, + kind: Ge.ServerStreaming + }, + streamPotentialLocsInitialQueries: { + name: "StreamPotentialLocsInitialQueries", + I: Txs, + O: Pxs, + kind: Ge.ServerStreaming + }, + streamNotepadChat: { + name: "StreamNotepadChat", + I: Dxs, + O: sD, + kind: Ge.ServerStreaming + }, + getChatTitle: { + name: "GetChatTitle", + I: tks, + O: iks, + kind: Ge.Unary + }, + getCompletion: { + name: "GetCompletion", + I: uks, + O: dks, + kind: Ge.Unary + }, + getSearch: { + name: "GetSearch", + I: hks, + O: gks, + kind: Ge.Unary + }, + streamInlineEdits: { + name: "StreamInlineEdits", + I: Qxs, + O: Zxs, + kind: Ge.ServerStreaming + }, + summarizeConversation: { + name: "SummarizeConversation", + I: l5, + O: eks, + kind: Ge.Unary + }, + isolatedTreesitter: { + name: "IsolatedTreesitter", + I: qxs, + O: jxs, + kind: Ge.Unary + }, + getSimplePrompt: { + name: "GetSimplePrompt", + I: vzt, + O: Jxs, + kind: Ge.Unary + }, + getPassthroughPrompt: { + name: "GetPassthroughPrompt", + I: yzt, + O: Gxs, + kind: Ge.Unary + }, + checkLongFilesFit: { + name: "CheckLongFilesFit", + I: l5, + O: Kxs, + kind: Ge.Unary + }, + getEvaluationPrompt: { + name: "GetEvaluationPrompt", + I: Yxs, + O: Xxs, + kind: Ge.Unary + }, + getUserInfo: { + name: "GetUserInfo", + I: mks, + O: vks, + kind: Ge.Unary + }, + clearAndRedoEntireBucket: { + name: "ClearAndRedoEntireBucket", + I: yks, + O: wks, + kind: Ge.Unary + }, + streamBranchGemini: { + name: "StreamBranchGemini", + I: ESs, + O: LSs, + kind: Ge.ServerStreaming + }, + streamBranchFileSelections: { + name: "StreamBranchFileSelections", + I: SSs, + O: xSs, + kind: Ge.ServerStreaming + }, + streamBackgroundEdit: { + name: "StreamBackgroundEdit", + I: pzt, + O: sD, + kind: Ge.ServerStreaming + }, + streamGPTFourEdit: { + name: "StreamGPTFourEdit", + I: fzt, + O: sD, + kind: Ge.ServerStreaming + }, + streamChat: { + name: "StreamChat", + I: l5, + O: sD, + kind: Ge.ServerStreaming + }, + streamChatWeb: { + name: "StreamChatWeb", + I: l5, + O: sD, + kind: Ge.ServerStreaming + }, + warmChatCache: { + name: "WarmChatCache", + I: aks, + O: lks, + kind: Ge.Unary + }, + streamEdit: { + name: "StreamEdit", + I: czt, + O: sD, + kind: Ge.ServerStreaming + }, + preloadEdit: { + name: "PreloadEdit", + I: rxs, + O: oxs, + kind: Ge.Unary + }, + streamFastEdit: { + name: "StreamFastEdit", + I: sxs, + O: nxs, + kind: Ge.ServerStreaming + }, + streamGenerate: { + name: "StreamGenerate", + I: j1s, + O: sD, + kind: Ge.ServerStreaming + }, + streamInlineLongCompletion: { + name: "StreamInlineLongCompletion", + I: W3s, + O: sD, + kind: Ge.ServerStreaming + }, + slashEdit: { + name: "SlashEdit", + I: X1s, + O: Q1s, + kind: Ge.ServerStreaming + }, + slashEditFollowUpWithPreviousEdits: { + name: "SlashEditFollowUpWithPreviousEdits", + I: Z1s, + O: exs, + kind: Ge.ServerStreaming + }, + streamAiPreviews: { + name: "StreamAiPreviews", + I: V3s, + O: Lyr, + kind: Ge.ServerStreaming + }, + shouldTurnOnCppOnboarding: { + name: "ShouldTurnOnCppOnboarding", + I: $vs, + O: Fvs, + kind: Ge.Unary + }, + streamReview: { + name: "StreamReview", + I: z1s, + O: Y1s, + kind: Ge.ServerStreaming + }, + streamReviewChat: { + name: "StreamReviewChat", + I: J1s, + O: G1s, + kind: Ge.ServerStreaming + }, + checkQueuePosition: { + name: "CheckQueuePosition", + I: mzt, + O: Wxs, + kind: Ge.Unary + }, + checkUsageBasedPrice: { + name: "CheckUsageBasedPrice", + I: Bxs, + O: Uxs, + kind: Ge.Unary + }, + doThisForMeCheck: { + name: "DoThisForMeCheck", + I: Cks, + O: wzt, + kind: Ge.Unary + }, + streamDoThisForMe: { + name: "StreamDoThisForMe", + I: Iks, + O: Pks, + kind: Ge.ServerStreaming + }, + streamChatToolformer: { + name: "StreamChatToolformer", + I: l5, + O: Czt, + kind: Ge.ServerStreaming + }, + streamChatToolformerContinue: { + name: "StreamChatToolformerContinue", + I: Lks, + O: Czt, + kind: Ge.ServerStreaming + }, + pushAiThought: { + name: "PushAiThought", + I: Fks, + O: Bks, + kind: Ge.Unary + }, + checkDoableAsTask: { + name: "CheckDoableAsTask", + I: Uks, + O: Wks, + kind: Ge.Unary + }, + reportGroundTruthCandidate: { + name: "ReportGroundTruthCandidate", + I: NEs, + O: MEs, + kind: Ge.Unary + }, + reportCmdKFate: { + name: "ReportCmdKFate", + I: AEs, + O: $Es, + kind: Ge.Unary + }, + showWelcomeScreen: { + name: "ShowWelcomeScreen", + I: WSs, + O: VSs, + kind: Ge.Unary + }, + interfaceAgentInit: { + name: "InterfaceAgentInit", + I: Vks, + O: Hks, + kind: Ge.Unary + }, + streamInterfaceAgentStatus: { + name: "StreamInterfaceAgentStatus", + I: qks, + O: jks, + kind: Ge.ServerStreaming + }, + taskGetInterfaceAgentStatus: { + name: "TaskGetInterfaceAgentStatus", + I: zks, + O: Gks, + kind: Ge.ServerStreaming + }, + taskInit: { + name: "TaskInit", + I: Kks, + O: Yks, + kind: Ge.Unary + }, + taskPause: { + name: "TaskPause", + I: nEs, + O: rEs, + kind: Ge.Unary + }, + taskInfo: { + name: "TaskInfo", + I: sEs, + O: kzt, + kind: Ge.Unary + }, + taskStreamLog: { + name: "TaskStreamLog", + I: Xks, + O: oEs, + kind: Ge.ServerStreaming + }, + taskSendMessage: { + name: "TaskSendMessage", + I: uEs, + O: dEs, + kind: Ge.Unary + }, + taskProvideResult: { + name: "TaskProvideResult", + I: lEs, + O: cEs, + kind: Ge.Unary + }, + createExperimentalIndex: { + name: "CreateExperimentalIndex", + I: kHt, + O: dfs, + kind: Ge.Unary + }, + listExperimentalIndexFiles: { + name: "ListExperimentalIndexFiles", + I: EHt, + O: hfs, + kind: Ge.Unary + }, + listenExperimentalIndex: { + name: "ListenExperimentalIndex", + I: Cut, + O: ffs, + kind: Ge.ServerStreaming + }, + registerFileToIndex: { + name: "RegisterFileToIndex", + I: wbe, + O: Sut, + kind: Ge.Unary + }, + setupIndexDependencies: { + name: "SetupIndexDependencies", + I: IHt, + O: wfs, + kind: Ge.Unary + }, + computeIndexTopoSort: { + name: "ComputeIndexTopoSort", + I: DHt, + O: Cfs, + kind: Ge.Unary + }, + streamChatDeepContext: { + name: "StreamChatDeepContext", + I: L1s, + O: R1s, + kind: Ge.ServerStreaming + }, + chooseCodeReferences: { + name: "ChooseCodeReferences", + I: Cbe, + O: Sut, + kind: Ge.Unary + }, + registerCodeReferences: { + name: "RegisterCodeReferences", + I: LHt, + O: Efs, + kind: Ge.Unary + }, + extractPaths: { + name: "ExtractPaths", + I: Lfs, + O: Rfs, + kind: Ge.Unary + }, + summarizeWithReferences: { + name: "SummarizeWithReferences", + I: Sbe, + O: Sut, + kind: Ge.Unary + }, + documentationQuery: { + name: "DocumentationQuery", + I: Kms, + O: Yms, + kind: Ge.Unary + }, + availableDocs: { + name: "AvailableDocs", + I: M1s, + O: A1s, + kind: Ge.Unary + }, + reportFeedback: { + name: "ReportFeedback", + I: hEs, + O: fEs, + kind: Ge.Unary + }, + reportBug: { + name: "ReportBug", + I: mEs, + O: bEs, + kind: Ge.Unary + }, + streamChatContext: { + name: "StreamChatContext", + I: Edt, + O: szt, + kind: Ge.ServerStreaming + }, + generateTldr: { + name: "GenerateTldr", + I: f1s, + O: g1s, + kind: Ge.Unary + }, + taskStreamChatContext: { + name: "TaskStreamChatContext", + I: p1s, + O: E1s, + kind: Ge.ServerStreaming + }, + rerankResults: { + name: "RerankResults", + I: d1s, + O: h1s, + kind: Ge.Unary + }, + modelQuery: { + name: "ModelQuery", + I: Lve, + O: o1s, + kind: Ge.Unary + }, + modelQueryV2: { + name: "ModelQueryV2", + I: Lve, + O: l1s, + kind: Ge.ServerStreaming + }, + intentPrediction: { + name: "IntentPrediction", + I: GSs, + O: KSs, + kind: Ge.Unary + }, + streamCursorTutor: { + name: "StreamCursorTutor", + I: izt, + O: r1s, + kind: Ge.ServerStreaming + }, + checkFeatureStatus: { + name: "CheckFeatureStatus", + I: Yjt, + O: Qjt, + kind: Ge.Unary + }, + checkFeatureStatusUnauthenticated: { + name: "CheckFeatureStatusUnauthenticated", + I: Yjt, + O: Qjt, + kind: Ge.Unary + }, + getEffectiveTokenLimit: { + name: "GetEffectiveTokenLimit", + I: Xjt, + O: JSs, + kind: Ge.Unary + }, + getContextScores: { + name: "GetContextScores", + I: OSs, + O: _Ss, + kind: Ge.Unary + }, + streamCpp: { + name: "StreamCpp", + I: ddt, + O: Ovs, + kind: Ge.ServerStreaming + }, + cppConfig: { + name: "CppConfig", + I: hdt, + O: Uvs, + kind: Ge.Unary + }, + cppEditHistoryStatus: { + name: "CppEditHistoryStatus", + I: vjt, + O: yjt, + kind: Ge.Unary + }, + cppAppend: { + name: "CppAppend", + I: gws, + O: pws, + kind: Ge.Unary + }, + checkNumberConfig: { + name: "CheckNumberConfig", + I: Zjt, + O: ezt, + kind: Ge.Unary + }, + checkNumberConfigUnauthenticated: { + name: "CheckNumberConfigUnauthenticated", + I: Zjt, + O: ezt, + kind: Ge.Unary + }, + streamTerminalAutocomplete: { + name: "StreamTerminalAutocomplete", + I: mxs, + O: Cxs, + kind: Ge.ServerStreaming + }, + streamPseudocodeGenerator: { + name: "StreamPseudocodeGenerator", + I: bxs, + O: vxs, + kind: Ge.ServerStreaming + }, + streamPseudocodeMapper: { + name: "StreamPseudocodeMapper", + I: yxs, + O: wxs, + kind: Ge.ServerStreaming + }, + streamAiLintBug: { + name: "StreamAiLintBug", + I: uzt, + O: lxs, + kind: Ge.ServerStreaming + }, + streamAiCursorHelp: { + name: "StreamAiCursorHelp", + I: gxs, + O: pxs, + kind: Ge.ServerStreaming + }, + logUserLintReply: { + name: "LogUserLintReply", + I: cxs, + O: uxs, + kind: Ge.Unary + }, + logLinterExplicitUserFeedback: { + name: "LogLinterExplicitUserFeedback", + I: dxs, + O: hxs, + kind: Ge.Unary + }, + streamFixMarkers: { + name: "StreamFixMarkers", + I: vEs, + O: LEs, + kind: Ge.ServerStreaming + }, + reportInlineAction: { + name: "ReportInlineAction", + I: Ryr, + O: Nyr, + kind: Ge.Unary + }, + streamPriomptPrompt: { + name: "StreamPriomptPrompt", + I: Kjt, + O: zSs, + kind: Ge.ServerStreaming + }, + streamLint: { + name: "StreamLint", + I: Ezt, + O: sD, + kind: Ge.ServerStreaming + }, + streamNewLintRule: { + name: "StreamNewLintRule", + I: hzt, + O: sD, + kind: Ge.ServerStreaming + }, + aiProject: { + name: "AiProject", + I: Gjt, + O: HSs, + kind: Ge.ServerStreaming + }, + toCamelCase: { + name: "ToCamelCase", + I: qSs, + O: jSs, + kind: Ge.Unary + }, + reportGenerationFeedback: { + name: "ReportGenerationFeedback", + I: BSs, + O: USs, + kind: Ge.Unary + }, + getThoughtAnnotation: { + name: "GetThoughtAnnotation", + I: hSs, + O: fSs, + kind: Ge.Unary + }, + streamWebCmdKV1: { + name: "StreamWebCmdKV1", + I: $Ss, + O: FSs, + kind: Ge.ServerStreaming + }, + streamNextCursorPrediction: { + name: "StreamNextCursorPrediction", + I: MSs, + O: ASs, + kind: Ge.ServerStreaming + }, + isCursorPredictionEnabled: { + name: "IsCursorPredictionEnabled", + I: RSs, + O: NSs, + kind: Ge.Unary + }, + getCppEditClassification: { + name: "GetCppEditClassification", + I: ujt, + O: jvs, + kind: Ge.Unary + }, + getTerminalCompletion: { + name: "GetTerminalCompletion", + I: qCs, + O: jCs, + kind: Ge.Unary + }, + takeNotesOnCommitDiff: { + name: "TakeNotesOnCommitDiff", + I: vSs, + O: ySs, + kind: Ge.Unary + }, + bulkEmbed: { + name: "BulkEmbed", + I: pSs, + O: mSs, + kind: Ge.Unary + }, + continueChatRequestWithCommits: { + name: "ContinueChatRequestWithCommits", + I: wSs, + O: Byr, + kind: Ge.Unary + }, + backgroundCmdKEval: { + name: "BackgroundCmdKEval", + I: oSs, + O: dSs, + kind: Ge.ServerStreaming + }, + backgroundCmdK: { + name: "BackgroundCmdK", + I: XCs, + O: rSs, + kind: Ge.ServerStreaming + }, + streamCursorMotion: { + name: "StreamCursorMotion", + I: KCs, + O: YCs, + kind: Ge.ServerStreaming + }, + calculateAutoSelection: { + name: "CalculateAutoSelection", + I: Hjt, + O: GCs, + kind: Ge.Unary + }, + getAtSymbolSuggestions: { + name: "GetAtSymbolSuggestions", + I: Wjt, + O: VCs, + kind: Ge.Unary + }, + getCodebaseQuestions: { + name: "GetCodebaseQuestions", + I: l5, + O: UCs, + kind: Ge.Unary + }, + getRankedContextFromContextBank: { + name: "GetRankedContextFromContextBank", + I: _Cs, + O: BCs, + kind: Ge.ServerStreaming + }, + cppEditHistoryAppend: { + name: "CppEditHistoryAppend", + I: bjt, + O: mws, + kind: Ge.Unary + }, + devOnlyGetPastRequestIds: { + name: "DevOnlyGetPastRequestIds", + I: $Cs, + O: OCs, + kind: Ge.Unary + }, + getFilesForComposer: { + name: "GetFilesForComposer", + I: FEs, + O: OEs, + kind: Ge.Unary + }, + tryParseTypeScriptTreeSitter: { + name: "TryParseTypeScriptTreeSitter", + I: MCs, + O: ACs, + kind: Ge.Unary + }, + nameTab: { + name: "NameTab", + I: PCs, + O: LCs, + kind: Ge.Unary + }, + isTerminalFinished: { + name: "IsTerminalFinished", + I: Ujt, + O: dCs, + kind: Ge.Unary + }, + isTerminalFinishedV2: { + name: "IsTerminalFinishedV2", + I: Ujt, + O: hCs, + kind: Ge.Unary + }, + testModelStatus: { + name: "TestModelStatus", + I: RCs, + O: NCs, + kind: Ge.Unary + }, + findBugs: { + name: "FindBugs", + I: Izt, + O: _Es, + kind: Ge.Unary + }, + contextReranking: { + name: "ContextReranking", + I: DCs, + O: TCs, + kind: Ge.Unary + }, + autoContext: { + name: "AutoContext", + I: mCs, + O: vCs, + kind: Ge.Unary + }, + writeGitCommitMessage: { + name: "WriteGitCommitMessage", + I: UEs, + O: WEs, + kind: Ge.Unary + }, + streamBugBot: { + name: "StreamBugBot", + I: Yut, + O: ICs, + kind: Ge.ServerStreaming + }, + checkBugBotPrice: { + name: "CheckBugBotPrice", + I: yCs, + O: wCs, + kind: Ge.Unary + }, + checkBugBotTelemetryHealthy: { + name: "CheckBugBotTelemetryHealthy", + I: CCs, + O: SCs, + kind: Ge.Unary + }, + getSuggestedBugBotIterations: { + name: "GetSuggestedBugBotIterations", + I: xCs, + O: kCs, + kind: Ge.Unary + }, + testBidi: { + name: "TestBidi", + I: fCs, + O: gCs, + kind: Ge.BiDiStreaming + }, + streamDiffReview: { + name: "StreamDiffReview", + I: qEs, + O: JEs, + kind: Ge.ServerStreaming + }, + getModelLabels: { + name: "GetModelLabels", + I: XEs, + O: QEs, + kind: Ge.Unary + }, + getLastDefaultModelNudge: { + name: "GetLastDefaultModelNudge", + I: eIs, + O: tIs, + kind: Ge.Unary + }, + getDefaultModelNudgeData: { + name: "GetDefaultModelNudgeData", + I: Dzt, + O: iIs, + kind: Ge.Unary + }, + reportCommitAiAnalytics: { + name: "ReportCommitAiAnalytics", + I: rIs, + O: oIs, + kind: Ge.Unary + }, + testBedrockCredentials: { + name: "TestBedrockCredentials", + I: sIs, + O: nIs, + kind: Ge.Unary + }, + knowledgeBaseAdd: { + name: "KnowledgeBaseAdd", + I: aIs, + O: lIs, + kind: Ge.Unary + }, + knowledgeBaseList: { + name: "KnowledgeBaseList", + I: gIs, + O: pIs, + kind: Ge.Unary + }, + knowledgeBaseSearch: { + name: "KnowledgeBaseSearch", + I: dIs, + O: hIs, + kind: Ge.Unary + }, + knowledgeBaseRemove: { + name: "KnowledgeBaseRemove", + I: cIs, + O: uIs, + kind: Ge.Unary + }, + speechToText: { + name: "SpeechToText", + I: vIs, + O: yIs, + kind: Ge.Unary + }, + inferBackgroundComposerScripts: { + name: "InferBackgroundComposerScripts", + I: wIs, + O: SIs, + kind: Ge.Unary + }, + getBackgroundComposerFeedbackLink: { + name: "GetBackgroundComposerFeedbackLink", + I: kIs, + O: EIs, + kind: Ge.Unary + } + } +}; +jm(); +Wo(); +cS(); +Hr(); +Xut(); +var fbt; +(function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.IN_PROGRESS = 1] = "IN_PROGRESS"; + i[i.SUCCEEDED = 2] = "SUCCEEDED"; + i[i.FAILED = 3] = "FAILED"; + i[i.NOT_FOUND = 4] = "NOT_FOUND"; +})(fbt ||= {}); +m.util.setEnumType(fbt, "aiserver.v1.UploadStatus", [{ + no: 0, + name: "UPLOAD_STATUS_UNSPECIFIED" +}, { + no: 1, + name: "UPLOAD_STATUS_IN_PROGRESS" +}, { + no: 2, + name: "UPLOAD_STATUS_SUCCEEDED" +}, { + no: 3, + name: "UPLOAD_STATUS_FAILED" +}, { + no: 4, + name: "UPLOAD_STATUS_NOT_FOUND" +}]); +var Uyr = class DYe extends N { + constructor(e) { + super(); + this.docIdentifier = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RescrapeDocsRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "doc_identifier", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "force_reupload", + kind: "scalar", + T: 8, + opt: true + }]); + } + static fromBinary(e, t) { + return new DYe().fromBinary(e, t); + } + static fromJson(e, t) { + return new DYe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new DYe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(DYe, e, t); + } +}; +var Wyr = class TYe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RescrapeDocsRequestV2"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "new_doc_req", + kind: "message", + T: Fei + }, { + no: 2, + name: "force_reupload", + kind: "scalar", + T: 8, + opt: true + }]); + } + static fromBinary(e, t) { + return new TYe().fromBinary(e, t); + } + static fromJson(e, t) { + return new TYe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new TYe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(TYe, e, t); + } +}; +var j3s = class PYe extends N { + constructor(e) { + super(); + this.success = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RescrapeDocsResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "success", + kind: "scalar", + T: 8 + }, { + no: 2, + name: "new_doc_identifier", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new PYe().fromBinary(e, t); + } + static fromJson(e, t) { + return new PYe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new PYe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(PYe, e, t); + } +}; +var Vyr = class LYe extends N { + constructor(e) { + super(); + this.docIdentifier = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.UploadedStatusRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "doc_identifier", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new LYe().fromBinary(e, t); + } + static fromJson(e, t) { + return new LYe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new LYe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(LYe, e, t); + } +}; +var Hyr = class RYe extends N { + constructor(e) { + super(); + this.docIdentifier = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.UploadDocumentationRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "doc_identifier", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new RYe().fromBinary(e, t); + } + static fromJson(e, t) { + return new RYe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new RYe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(RYe, e, t); + } +}; +var z3s = class NYe extends N { + constructor(e) { + super(); + this.docIdentifier = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetPagesRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "doc_identifier", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new NYe().fromBinary(e, t); + } + static fromJson(e, t) { + return new NYe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new NYe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(NYe, e, t); + } +}; +var qyr = class MYe extends N { + constructor(e) { + super(); + this.docIdentifier = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetDocRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "doc_identifier", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new MYe().fromBinary(e, t); + } + static fromJson(e, t) { + return new MYe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new MYe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(MYe, e, t); + } +}; +var jyr = class AYe extends N { + constructor(e) { + super(); + this.id = 0; + this.uuid = ""; + this.docIdentifier = ""; + this.docName = ""; + this.docUrlRoot = ""; + this.docUrlPrefix = ""; + this.isDifferentPrefix = false; + this.createdAt = ""; + this.updatedAt = ""; + this.lastUploadedAt = ""; + this.showToAllUsers = false; + this.teamId = 0; + this.customInstructions = ""; + this.pages = []; + this.publishToTeam = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ProtoDoc"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "id", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "uuid", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "doc_identifier", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "doc_name", + kind: "scalar", + T: 9 + }, { + no: 5, + name: "doc_url_root", + kind: "scalar", + T: 9 + }, { + no: 6, + name: "doc_url_prefix", + kind: "scalar", + T: 9 + }, { + no: 7, + name: "is_different_prefix", + kind: "scalar", + T: 8 + }, { + no: 8, + name: "created_at", + kind: "scalar", + T: 9 + }, { + no: 9, + name: "updated_at", + kind: "scalar", + T: 9 + }, { + no: 10, + name: "last_uploaded_at", + kind: "scalar", + T: 9 + }, { + no: 11, + name: "upload_status", + kind: "message", + T: gbt + }, { + no: 12, + name: "show_to_all_users", + kind: "scalar", + T: 8 + }, { + no: 13, + name: "team_id", + kind: "scalar", + T: 5 + }, { + no: 14, + name: "custom_instructions", + kind: "scalar", + T: 9 + }, { + no: 15, + name: "pages", + kind: "message", + T: zyr, + repeated: true + }, { + no: 16, + name: "publish_to_team", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new AYe().fromBinary(e, t); + } + static fromJson(e, t) { + return new AYe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new AYe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(AYe, e, t); + } +}; +var zyr = class $Ye extends N { + constructor(e) { + super(); + this.url = ""; + this.title = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ProtoDocPage"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "url", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "title", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new $Ye().fromBinary(e, t); + } + static fromJson(e, t) { + return new $Ye().fromJson(e, t); + } + static fromJsonString(e, t) { + return new $Ye().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals($Ye, e, t); + } +}; +var Jyr = class FYe extends N { + constructor(e) { + super(); + this.pages = []; + this.pageUrls = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.Pages"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "pages", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 2, + name: "page_urls", + kind: "scalar", + T: 9, + repeated: true + }]); + } + static fromBinary(e, t) { + return new FYe().fromBinary(e, t); + } + static fromJson(e, t) { + return new FYe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new FYe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(FYe, e, t); + } +}; +var Gyr = class OYe extends N { + constructor(e) { + super(); + this.docIdentifier = ""; + this.password = ""; + this.docName = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.MarkAsPublicRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "doc_identifier", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "password", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "doc_name", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new OYe().fromBinary(e, t); + } + static fromJson(e, t) { + return new OYe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new OYe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(OYe, e, t); + } +}; +var Fei = class _Ye extends N { + constructor(e) { + super(); + this.docIdentifier = ""; + this.ignorePrefixes = []; + this.ignoreUrls = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.NewDocumentationRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "doc_identifier", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "metadata", + kind: "message", + T: Rqt + }, { + no: 4, + name: "ignore_prefixes", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 5, + name: "ignore_urls", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 6, + name: "custom_instructions", + kind: "scalar", + T: 9, + opt: true + }, { + no: 7, + name: "publish_to_team", + kind: "scalar", + T: 8, + opt: true + }, { + no: 8, + name: "client_handles_uuid", + kind: "scalar", + T: 8, + opt: true + }]); + } + static fromBinary(e, t) { + return new _Ye().fromBinary(e, t); + } + static fromJson(e, t) { + return new _Ye().fromJson(e, t); + } + static fromJsonString(e, t) { + return new _Ye().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(_Ye, e, t); + } +}; +var J3s = class BYe extends N { + constructor(e) { + super(); + this.status = WA.UNSPECIFIED; + this.progress = 0; + this.similarDocIdentifier = ""; + this.uploadedPages = []; + this.docUuid = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.UploadResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "status", + kind: "enum", + T: m.getEnumType(WA) + }, { + no: 2, + name: "progress", + kind: "scalar", + T: 2 + }, { + no: 3, + name: "similar_doc_identifier", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "uploaded_pages", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 5, + name: "doc_uuid", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new BYe().fromBinary(e, t); + } + static fromJson(e, t) { + return new BYe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new BYe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(BYe, e, t); + } +}; +var WA; +(function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.SUCCESS = 1] = "SUCCESS"; + i[i.FAILURE = 2] = "FAILURE"; + i[i.ALREADY_EXISTS = 3] = "ALREADY_EXISTS"; + i[i.SIMILAR_ALREADY_EXISTS = 4] = "SIMILAR_ALREADY_EXISTS"; +})(WA ||= {}); +m.util.setEnumType(WA, "aiserver.v1.UploadResponse.Status", [{ + no: 0, + name: "STATUS_UNSPECIFIED" +}, { + no: 1, + name: "STATUS_SUCCESS" +}, { + no: 2, + name: "STATUS_FAILURE" +}, { + no: 3, + name: "STATUS_ALREADY_EXISTS" +}, { + no: 4, + name: "STATUS_SIMILAR_ALREADY_EXISTS" +}]); +var gbt = class UYe extends N { + constructor(e) { + super(); + this.status = DE.UNSPECIFIED; + this.uploadedPages = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.UploadedStatus"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "status", + kind: "enum", + T: m.getEnumType(DE) + }, { + no: 2, + name: "uploaded_pages", + kind: "scalar", + T: 9, + repeated: true + }]); + } + static fromBinary(e, t) { + return new UYe().fromBinary(e, t); + } + static fromJson(e, t) { + return new UYe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new UYe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(UYe, e, t); + } +}; +var DE; +(function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.IN_PROGRESS = 1] = "IN_PROGRESS"; + i[i.SUCCEEDED = 2] = "SUCCEEDED"; + i[i.FAILED = 3] = "FAILED"; + i[i.NOT_FOUND = 4] = "NOT_FOUND"; +})(DE ||= {}); +m.util.setEnumType(DE, "aiserver.v1.UploadedStatus.Status", [{ + no: 0, + name: "STATUS_UNSPECIFIED" +}, { + no: 1, + name: "STATUS_IN_PROGRESS" +}, { + no: 2, + name: "STATUS_SUCCEEDED" +}, { + no: 3, + name: "STATUS_FAILED" +}, { + no: 4, + name: "STATUS_NOT_FOUND" +}]); +var Kyr = class WYe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.UpsertDocsRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "upload_status", + kind: "enum", + T: m.getEnumType(fbt), + opt: true + }, { + no: 2, + name: "ignore_index_prefix", + kind: "scalar", + T: 9, + opt: true + }, { + no: 3, + name: "doc_id", + kind: "scalar", + T: 5, + opt: true + }]); + } + static fromBinary(e, t) { + return new WYe().fromBinary(e, t); + } + static fromJson(e, t) { + return new WYe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new WYe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(WYe, e, t); + } +}; +var Yyr = class VYe extends N { + constructor(e) { + super(); + this.responses = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.UpsertDocsResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "responses", + kind: "message", + T: J3s, + repeated: true + }]); + } + static fromBinary(e, t) { + return new VYe().fromBinary(e, t); + } + static fromJson(e, t) { + return new VYe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new VYe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(VYe, e, t); + } +}; +Hr(); +var j0e = { + typeName: "aiserver.v1.UploadService", + methods: { + uploadDocumentation: { + name: "UploadDocumentation", + I: Fei, + O: J3s, + kind: Ge.Unary + }, + uploadDocumentationStatus: { + name: "UploadDocumentationStatus", + I: Hyr, + O: gbt, + kind: Ge.Unary + }, + markAsPublic: { + name: "MarkAsPublic", + I: Gyr, + O: gbt, + kind: Ge.Unary + }, + uploadStatus: { + name: "UploadStatus", + I: Vyr, + O: gbt, + kind: Ge.Unary + }, + getPages: { + name: "GetPages", + I: z3s, + O: Jyr, + kind: Ge.Unary + }, + getDoc: { + name: "GetDoc", + I: qyr, + O: jyr, + kind: Ge.Unary + }, + rescrapeDocs: { + name: "RescrapeDocs", + I: Uyr, + O: j3s, + kind: Ge.Unary + }, + rescrapeDocsV2: { + name: "RescrapeDocsV2", + I: Wyr, + O: j3s, + kind: Ge.Unary + }, + upsertAllDocs: { + name: "UpsertAllDocs", + I: Kyr, + O: Yyr, + kind: Ge.Unary + } + } +}; +Dve(); +Hr(); +var FG = { + typeName: "aiserver.v1.CmdKService", + methods: { + streamCmdK: { + name: "StreamCmdK", + I: Djt, + O: Ljt, + kind: Ge.ServerStreaming + }, + streamHypermode: { + name: "StreamHypermode", + I: g0s, + O: Ljt, + kind: Ge.ServerStreaming + }, + rerankCmdKContext: { + name: "RerankCmdKContext", + I: Cdt, + O: d0s, + kind: Ge.Unary + }, + streamTerminalCmdK: { + name: "StreamTerminalCmdK", + I: Pjt, + O: b0s, + kind: Ge.ServerStreaming + }, + rerankTerminalCmdKContext: { + name: "RerankTerminalCmdKContext", + I: h0s, + O: f0s, + kind: Ge.Unary + }, + getRelevantChunks: { + name: "GetRelevantChunks", + I: D0s, + O: T0s, + kind: Ge.ServerStreaming + } + } +}; +Wo(); +Ps(); +yt(); +wn(); +kn(); +xc(); +Cs(); +qt(); +ai(); +ii(); +var J5; +(function (i) { + i[i.GENERATE = 0] = "GENERATE"; + i[i.EDIT = 1] = "EDIT"; + i[i.CHAT = 2] = "CHAT"; + i[i.GPT_FOUR_EDIT = 3] = "GPT_FOUR_EDIT"; + i[i.COMPOSER = 4] = "COMPOSER"; +})(J5 ||= {}); +lC(); +yE(); +Wo(); +Wt(); +fn(); +It(); +te(); +te(); +var wh = Ve("layoutService"); +Wi(); +Cs(); +yE(); +Wo(); +Pn(); +var pbt = class extends Eg { + constructor(i, e, t) { + super(`You have exceeded your usage limit for the ${i} model. Please upgrade your account.`); + this.model = i; + this.error = e; + this.rerun = t; + } + toMessage() { + switch (this.error) { + case yo.FREE_USER_RATE_LIMIT_EXCEEDED: + return `It seems like you're making an too many requests too quickly. Please try again in a minute. If you think this is a mistake, please contact ${IT}`; + case yo.PRO_USER_RATE_LIMIT_EXCEEDED: + return `It seems like you're making an unusual number of AI requests. Please try again later. If you think this is a mistake, please contact ${IT}`; + case yo.FREE_USER_USAGE_LIMIT: + return `Our servers are currently overloaded for non-pro users, and you've used your free quota. Please try again in a few minutes. If you think this is a mistake, please contact ${IT}`; + case yo.PRO_USER_USAGE_LIMIT: + return `We're currently recieving a large number of slow requests and could not queue yours. Please try again. If you see this message often, please contact ${IT}`; + case yo.BAD_API_KEY: + return "The provided API key is invalid. Please provide a valid API key."; + case yo.BAD_MODEL_NAME: + return `The model ${this.model} does not work with your current plan or api key`; + case yo.INVALID_AUTH_ID: + case yo.NOT_LOGGED_IN: + case yo.AGENT_REQUIRES_LOGIN: + case yo.USER_NOT_FOUND: + return "You are not logged in. Please log in to continue."; + case yo.NOT_HIGH_ENOUGH_PERMISSIONS: + return "Without the pro plan, you do not have access to this feature/model."; + case yo.UNSPECIFIED: + default: + return "An unspecified error occurred. Please try again"; + } + } +}; +Pn(); +q(); +Je(); +It(); +te(); +Cs(); +xc(); +qt(); +sh(); +pe(); +jm(); +var UR = [{ + name: "claude-3.5-sonnet", + defaultOn: true, + supportsAgent: true +}, { + name: "claude-3.7-sonnet", + defaultOn: true, + supportsAgent: true +}, { + name: "gemini-2.5-pro-exp-03-25", + defaultOn: true, + supportsAgent: true +}, { + name: "o3", + defaultOn: true, + supportsAgent: true +}, { + name: "o4-mini", + defaultOn: true, + supportsAgent: true +}, { + name: "gpt-4.1", + defaultOn: true, + supportsAgent: true +}]; +var Xyr = ["claude-3.5-sonnet", "claude-3.7-sonnet", "gemini-2.5-pro-exp-03-25", "gpt-4.1", "o3", "o4-mini"]; +var uy = Ve("AISettingsService"); +var z0e = { + "regular-chat": "regularChatModel", + "cmd-k": "cmdKModel", + "terminal-cmd-k": "terminalCmdKModel", + composer: "composerModel", + "background-composer": "backgroundComposerModel" +}; +var G3s = i => i === undefined ? "openAIModel" : z0e[i]; +var J0e = (i, e, t) => { + const s = G3s(t); + const n = i.applicationUserPersistentStorage.aiSettings.regularChatModel; + const r = i.applicationUserPersistentStorage.aiSettings.composerModel; + let o = i.applicationUserPersistentStorage.aiSettings[s]; + if (o === null) { + return "cursor-small"; + } + if (!e.includes(o)) { + if (e.length === 0 || t === "background-composer") { + return o; + } + o = e[0]; + i.setApplicationUserPersistentStorage("aiSettings", s, o); + } + return o; +}; +var Oei = class extends H { + constructor(e, t, s) { + super(); + this.c = e; + this.f = t; + this.g = s; + this.a = "aisettings.service"; + this.b = new B(); + this.saveData = () => {}; + this.loadData = () => { + if (this.f.applicationUserPersistentStorage.havePerformedSettingsServiceMigration !== true) { + this.f.setApplicationUserPersistentStorage("havePerformedSettingsServiceMigration", true); + const r = this.c.get(this.a, -1); + if (r) { + const o = JSON.parse(r); + if (o.useOpenAIKey !== undefined) { + this.f.setApplicationUserPersistentStorage("useOpenAIKey", o.useOpenAIKey); + } + if (o.availableModels !== undefined) { + this.f.setApplicationUserPersistentStorage("availableAPIKeyModels", o.availableModels); + } + if (o.noStorageMode !== undefined) { + this.f.setApplicationUserPersistentStorage("noStorageMode", o.noStorageMode || this.g.membershipType() === zr.ENTERPRISE && this.g.shouldHaveGhostModeFromEnterprise()); + } + if (o.watcherEnabled !== undefined) { + this.f.setApplicationUserPersistentStorage("watcherEnabled", o.watcherEnabled); + } + } + } + }; + this.getUseOpenAIKey = () => this.f.applicationUserPersistentStorage.useOpenAIKey ?? false; + this.getModel = () => this.f.applicationUserPersistentStorage.aiSettings.openAIModel ?? g5; + this.getLongContextModel = () => this.f.applicationUserPersistentStorage.aiSettings.longContextOpenAIModel ?? g5; + this.getRegularChatModel = () => this.f.applicationUserPersistentStorage.aiSettings.regularChatModel ?? g5; + this.getCmdKModel = () => this.f.applicationUserPersistentStorage.aiSettings.cmdKModel ?? g5; + this.getComposerModel = () => this.f.applicationUserPersistentStorage.aiSettings.composerModel ?? g5; + this.getTerminalCmdKModel = () => this.f.applicationUserPersistentStorage.aiSettings.terminalCmdKModel ?? g5; + this.getAvailableAPIKeyModels = () => this.f.applicationUserPersistentStorage.availableAPIKeyModels ?? []; + this.enableModel = r => { + if (this.f.applicationUserPersistentStorage.aiSettings.modelOverrideDisabled?.includes(r)) { + this.f.setApplicationUserPersistentStorage("aiSettings", "modelOverrideDisabled", this.f.applicationUserPersistentStorage.aiSettings.modelOverrideDisabled.filter(o => o !== r)); + } + if (!this.f.applicationUserPersistentStorage.aiSettings.modelOverrideEnabled?.includes(r)) { + this.f.setApplicationUserPersistentStorage("aiSettings", "modelOverrideEnabled", [...(this.f.applicationUserPersistentStorage.aiSettings.modelOverrideEnabled ?? []), r]); + } + this._didChangeAvailableModels(); + }; + this.isDefaultModel = r => { + let o = []; + if (this.getUseOpenAIKey()) { + o = this.getAvailableAPIKeyModels(); + } else { + o = this.getAvailableDefaultModels().filter(a => !a.isLongContextOnly).map(a => a.name); + } + return o.includes(r); + }; + this.removeModel = r => { + if (this.f.applicationUserPersistentStorage.aiSettings.modelOverrideEnabled?.includes(r)) { + this.f.setApplicationUserPersistentStorage("aiSettings", "modelOverrideEnabled", this.f.applicationUserPersistentStorage.aiSettings.modelOverrideEnabled.filter(o => o !== r)); + } + if (this.f.applicationUserPersistentStorage.aiSettings.modelOverrideDisabled?.includes(r)) { + this.f.setApplicationUserPersistentStorage("aiSettings", "modelOverrideDisabled", this.f.applicationUserPersistentStorage.aiSettings.modelOverrideDisabled.filter(o => o !== r)); + } + this._didChangeAvailableModels(); + }; + this.disableModel = r => { + if (this.f.applicationUserPersistentStorage.aiSettings.modelOverrideEnabled?.includes(r)) { + this.f.setApplicationUserPersistentStorage("aiSettings", "modelOverrideEnabled", this.f.applicationUserPersistentStorage.aiSettings.modelOverrideEnabled.filter(o => o !== r)); + } + if (!this.f.applicationUserPersistentStorage.aiSettings.modelOverrideDisabled?.includes(r)) { + this.f.setApplicationUserPersistentStorage("aiSettings", "modelOverrideDisabled", [...(this.f.applicationUserPersistentStorage.aiSettings.modelOverrideDisabled ?? []), r]); + } + this._didChangeAvailableModels(); + }; + this.getAllPotentialModelsReactive = () => { + let r = []; + if (this.getUseOpenAIKey()) { + r = [...Xyr]; + } else { + r = [...this.getAvailableDefaultModels().filter(l => !l.isLongContextOnly && !this.getHardcodedLongContextOnlyModelNames().includes(l.name)).map(l => l.name)]; + } + const o = this.f.applicationUserPersistentStorage.aiSettings.modelOverrideEnabled; + if (o !== undefined) { + for (const l of o) { + r.push(l); + } + } + const a = this.f.applicationUserPersistentStorage.aiSettings.modelOverrideDisabled; + if (a !== undefined) { + for (const l of a) { + r.push(l); + } + } + r = [...new Set(r)]; + r.sort(); + return r; + }; + this.setChatDesiredTokenLimit = r => {}; + this.getChatDesiredTokenLimit = () => {}; + this.setWatcherEnabled = r => { + this.f.setApplicationUserPersistentStorage("watcherEnabled", r); + for (let o of this.watcherEnabledListeners) { + o(r); + } + if (!this.f.applicationUserPersistentStorage.watcherEnabled) { + this.f.setApplicationUserPersistentStorage("hasSilencedLinter", true); + } + }; + this.watcherEnabledListeners = []; + this.onWatcherEnabledChanged = r => { + this.watcherEnabledListeners.push(r); + return { + dispose: () => { + this.watcherEnabledListeners = this.watcherEnabledListeners.filter(o => o !== r); + } + }; + }; + this.useOpenAIKeyListeners = []; + this.openAIModelListeners = []; + this.longContextOpenAIModelListeners = []; + this.availableModelsListeners = []; + this.popupListeners = []; + this.closePopupListeners = []; + this.addOpenAIKeyListener = r => { + this.useOpenAIKeyListeners.push(r); + }; + this.removeOpenAIKeyListener = r => { + this.useOpenAIKeyListeners = this.useOpenAIKeyListeners.filter(o => o !== r); + }; + this.addOpenAIModelListener = r => { + this.openAIModelListeners.push(r); + }; + this.removeOpenAIModelListener = r => { + this.openAIModelListeners = this.openAIModelListeners.filter(o => o !== r); + }; + this.addAvailableModelsListener = r => { + this.availableModelsListeners.push(r); + }; + this.removeAvailableModelsListener = r => { + this.availableModelsListeners = this.availableModelsListeners.filter(o => o !== r); + }; + this.addLongContextOpenAIModelListener = r => { + this.longContextOpenAIModelListeners.push(r); + }; + this.removeLongContextOpenAIModelListener = r => { + this.longContextOpenAIModelListeners = this.longContextOpenAIModelListeners.filter(o => o !== r); + }; + this.onDidChangeUseOpenAIKey = this.b.event; + this.addPopupListener = r => { + this.popupListeners.push(r); + }; + this.addClosePopupListener = r => { + this.closePopupListeners.push(r); + }; + this.getBackgroundComposerModel = () => this.f.applicationUserPersistentStorage.aiSettings.backgroundComposerModel ?? "claude-3.7-sonnet-thinking"; + this.loadData(); + this.c.onWillSaveState(() => this.saveData()); + this.D(this.f.createScoped(this)).onChangeEffect({ + deps: [() => { + const r = this.getAvailableModelsReactive({ + isChat: true + }); + const o = this.getAvailableModelsReactive({ + isChat: false + }); + return { + availableModelsChat: r, + availableModelsNonChat: o + }; + }], + onChange: ({ + deps: [{ + availableModelsChat: r, + availableModelsNonChat: o + }] + }) => { + J0e(this.f, r, "regular-chat"); + J0e(this.f, o, "cmd-k"); + J0e(this.f, o, "terminal-cmd-k"); + J0e(this.f, o); + }, + runNowToo: true + }); + } + getUseApiKeyForModel(e) { + if (OKt(e) && this.f.applicationUserPersistentStorage.useClaudeKey) { + return this.f.applicationUserPersistentStorage.useClaudeKey; + } else if (_Kt(e) && this.f.applicationUserPersistentStorage.useGoogleKey) { + return true; + } else { + return this.getUseOpenAIKey(); + } + } + getAvailableDefaultModels() { + const e = this.f.applicationUserPersistentStorage.availableDefaultModels2 ?? []; + if (e.length === 0) { + return [...UR]; + } else { + return e; + } + } + getHardcodedLongContextOnlyModelNames() { + return UR.filter(e => e.isLongContextOnly).map(e => e.name); + } + getAvailableModelsReactive(e) { + return [...this.getAvailableModelsReactiveWithStatus(e).map(t => t.name)]; + } + getAvailableModelsReactiveWithStatus(e) { + let t = []; + const s = this.f.applicationUserPersistentStorage.aiSettings.modelOverrideEnabled; + const n = []; + if (this.getUseOpenAIKey()) { + t = [...this.getAvailableAPIKeyModels().map(o => ({ + name: o, + status: fR.UNSPECIFIED + }))]; + } else { + t = [...this.getAvailableDefaultModels().filter(o => { + if (!o.defaultOn && !s?.includes(o.name)) { + return false; + } + const a = e?.isChat ?? false; + if (o.isChatOnly && !a) { + return false; + } else if ((e?.specificModelField === "cmd-k" || e?.specificModelField === "terminal-cmd-k") && o.supportsNonMaxMode === false) { + n.push(o.name); + return false; + } else { + return e?.specificModelField !== "background-composer" || o.name !== "default"; + } + }).map(o => ({ + name: o.name, + clientDisplayName: o.clientDisplayName ?? o.name, + serverModelName: o.serverModelName ?? o.name, + status: o.degradationStatus ?? fR.UNSPECIFIED, + price: o.price, + tooltipData: o.tooltipData, + supportsMaxMode: o.supportsMaxMode, + tooltipDataForMaxMode: o.tooltipDataForMaxMode + }))]; + } + if (s !== undefined) { + for (const o of s) { + if (!n.includes(o) && !t.some(a => a.name === o)) { + t.push({ + name: o, + status: fR.UNSPECIFIED + }); + } + } + } + const r = this.f.applicationUserPersistentStorage.aiSettings.modelOverrideDisabled; + if (r !== undefined) { + t = t.filter(o => !r.includes(o.name)); + } + t = t.filter(o => !this.getHardcodedLongContextOnlyModelNames().includes(o.name)); + return t; + } + _setUseOpenAIKey(e) { + this.f.setApplicationUserPersistentStorage("useOpenAIKey", e); + for (let t of this.useOpenAIKeyListeners) { + t(e); + } + this.b.fire(e); + } + _setOpenAIModel(e) { + for (let t of this.openAIModelListeners) { + t(e); + } + this.f.setApplicationUserPersistentStorage("aiSettings", "openAIModel", e); + } + _setAvailableModels(e) { + this.f.setApplicationUserPersistentStorage("availableAPIKeyModels", e); + this._didChangeAvailableModels(); + } + handleAvailableModelsChange() { + this._didChangeAvailableModels(); + } + _didChangeAvailableModels() { + const e = this.getAvailableModelsReactive(); + for (let t of this.availableModelsListeners) { + t(e); + } + if (e.includes(this.getModel()) === false) { + if (e.includes(g5)) { + this._setOpenAIModel(g5); + } else { + if (e.length === 0) { + return; + } + this._setOpenAIModel(e[e.length - 1]); + } + } + } +}; +Oei = __decorate([__param(0, ht), __param(1, _i), __param(2, $u)], Oei); +var _ei = class extends Oei { + constructor(e, t, s, n, r) { + super(n, r, s); + this.h = e; + this.j = t; + this.openPopup = (o, a) => { + for (let l of this.popupListeners) { + l(this.h, this.j, o, a); + } + }; + this.closePopup = () => { + for (let o of this.closePopupListeners) { + o(); + } + }; + this.g.addLoginChangedListener(o => { + if (this.g.membershipType() === zr.PRO) { + this.setUseOpenAIKey(false); + } + }); + this.g.addSubscriptionChangedListener(o => { + if (o !== zr.FREE) { + this.setUseOpenAIKey(false); + } + }); + this.D(this.f.onChangeEffectManuallyDisposed({ + deps: [() => this.f.applicationUserPersistentStorage.aiSettings.composerModel], + onChange: ({ + deps: o, + prevDeps: a + }) => { + const l = a?.[0] ?? undefined; + const c = o?.[0] ?? undefined; + if (l !== undefined && c === "default") { + this.f.setApplicationUserPersistentStorage("aiSettings", "composerPreviousNonDefaultModel", l); + } + }, + runNowToo: true + })); + } + setModel(e) { + this._setOpenAIModel(e); + this.setRegularChatModel(e); + this.setCmdKModel(e); + this.setTerminalCmdKModel(e); + this.setBackgroundComposerModel(e); + return true; + } + setRegularChatModel(e) { + this.f.setApplicationUserPersistentStorage("aiSettings", "regularChatModel", e); + if (!this.doesModelSupportMaxMode(e)) { + this.setMaxMode(false, "regular-chat"); + } + return true; + } + setCmdKModel(e) { + this.f.setApplicationUserPersistentStorage("aiSettings", "cmdKModel", e); + if (!this.doesModelSupportMaxMode(e)) { + this.setMaxMode(false, "cmd-k"); + } + return true; + } + setTerminalCmdKModel(e) { + this.f.setApplicationUserPersistentStorage("aiSettings", "terminalCmdKModel", e); + if (!this.doesModelSupportMaxMode(e)) { + this.setMaxMode(false, "terminal-cmd-k"); + } + return true; + } + setComposerModel(e) { + this.f.setApplicationUserPersistentStorage("aiSettings", "composerModel", e); + if (!this.doesModelSupportMaxMode(e)) { + this.setMaxMode(false, "composer"); + } + return true; + } + setBackgroundComposerModel(e) { + this.f.setApplicationUserPersistentStorage("aiSettings", "backgroundComposerModel", e); + if (!this.doesModelSupportMaxMode(e)) { + this.setMaxMode(false, "background-composer"); + } + return true; + } + setSpecificModel(e, t) { + const s = z0e[t]; + this.f.setApplicationUserPersistentStorage("aiSettings", s, e); + if (!this.doesModelSupportMaxMode(e)) { + this.setMaxMode(false, t); + } + return true; + } + setMaxMode(e, t) { + if (t === "background-composer" && this.getSpecificModel(t)?.includes(",")) { + return true; + } + const s = z0e[t]; + const n = { + ...(this.f.applicationUserPersistentStorage.aiSettings.modelSettingToMaxMode ?? {}), + [s]: e + }; + this.f.setApplicationUserPersistentStorage("aiSettings", "modelSettingToMaxMode", n); + return true; + } + getMaxMode(e) { + const t = z0e[e]; + return (this.f.applicationUserPersistentStorage.aiSettings.modelSettingToMaxMode ?? {})[t] ?? false; + } + getSpecificModel(e) { + const t = z0e[e]; + return this.f.applicationUserPersistentStorage.aiSettings[t] ?? undefined; + } + async getApiKey() { + return await this.g.openAIKey(); + } + async refreshAPIKeyModels() { + try { + if (!this.getUseOpenAIKey()) { + return; + } + const e = await this.g.openAIKey(); + if (!e) { + return; + } + const { + models: t + } = await this.n(e); + this._setAvailableModels(t); + } catch (e) { + console.error("Error refreshing API key models:", e); + } + } + async setUseOpenAIKey(e) { + if (e === false) { + this._setUseOpenAIKey(false); + this._didChangeAvailableModels(); + return false; + } + { + this._setUseOpenAIKey(true); + const t = await this.g.openAIKey(); + if (t) { + const { + models: s + } = await this.n(t); + this._setAvailableModels(s); + return true; + } else { + this._setUseOpenAIKey(false); + this._didChangeAvailableModels(); + return false; + } + } + } + async setOpenAIKey(e) { + const t = await this.q(e); + if (t !== true) { + return t; + } + const { + models: s + } = await this.n(e); + this._setAvailableModels(s); + this._setUseOpenAIKey(true); + if (s.length !== 0) { + this._setOpenAIModel(s[s.length - 1]); + } + this.g.storeOpenAIKey(e); + return true; + } + async n(e) { + const t = this.f.applicationUserPersistentStorage.openAIBaseUrl ?? "https://api.openai.com/v1"; + return await fetch(`${t}/models`, { + headers: { + Authorization: `Bearer ${e}` + } + }).then(async s => { + if (s.status === 401) { + return { + models: [] + }; + } + try { + return { + models: (await s.json()).data.filter(r => this.getAvailableDefaultModels().some(o => o.name === r.id)).map(r => r.id) + }; + } catch { + return { + models: [] + }; + } + }); + } + getModelForChallenge() { + const e = this.getAvailableModelsReactive().filter(s => s !== "default"); + const t = ["gpt-4o-mini", "4o", "gpt", "o1", "o3"]; + for (const s of t) { + const n = e.find(r => r.includes(s)); + if (n) { + return n; + } + } + return e.at(0) ?? "please-enable-some-models"; + } + async q(e) { + const t = this.f.applicationUserPersistentStorage.openAIBaseUrl ?? "https://api.openai.com/v1"; + try { + const s = await fetch(`${t}/chat/completions`, { + method: "POST", + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${e}` + }, + body: JSON.stringify({ + model: this.getModelForChallenge(), + messages: [{ + role: "system", + content: "You are a helpful assistant." + }, { + role: "user", + content: "Test prompt using gpt-3.5-turbo" + }], + temperature: 1, + max_tokens: 10, + stream: false + }) + }); + if (s.status === 200) { + return true; + } + { + const n = await Promise.race([s.text(), new Promise((r, o) => setTimeout(() => r("Request timed out after 10 seconds"), 10000))]); + return { + code: s.status, + error: n + }; + } + } catch (s) { + return { + code: 0, + error: s.toString() + }; + } + } + doesModelSupportAgent(e) { + if (e === "default") { + return true; + } + const t = e.toLowerCase().includes("claude-3"); + const s = e.toLowerCase().includes("gpt-4o") && !e.toLowerCase().includes("mini"); + const n = e.toLowerCase().includes("o3-mini"); + const r = e.toLowerCase().includes("grok-3"); + if (t || s || n || r) { + return true; + } + const o = this.getAvailableDefaultModels(); + const a = [...UR]; + const l = o.find(u => u.name === e); + const c = a.find(u => u.name === e); + return (l?.supportsAgent || c?.supportsAgent) ?? false; + } + doesModelSupportThinking(e) { + if (e === "default") { + return false; + } + const t = this.getAvailableDefaultModels(); + const s = [...UR]; + const n = t.find(o => o.name === e); + const r = s.find(o => o.name === e); + return (n?.supportsThinking || r?.supportsThinking) ?? false; + } + doesModelSupportImages(e) { + if (e === "default") { + return true; + } + const t = this.getAvailableDefaultModels(); + const s = [...UR]; + const n = t.find(o => o.name === e); + const r = s.find(o => o.name === e); + return (n?.supportsImages || r?.supportsImages) ?? false; + } + doesModelSupportAutoContext(e) { + if (e === "default") { + return false; + } + const t = this.getAvailableDefaultModels(); + const s = [...UR]; + const n = t.find(o => o.name === e); + const r = s.find(o => o.name === e); + return (n?.supportsAutoContext || r?.supportsAutoContext) ?? false; + } + doesModelSupportMaxMode(e) { + if (e === "default") { + return false; + } + const t = this.getAvailableDefaultModels(); + const s = [...UR]; + const n = t.find(o => o.name === e); + const r = s.find(o => o.name === e); + return (n?.supportsMaxMode || r?.supportsMaxMode) ?? false; + } + doesModelSupportNonMaxMode(e) { + if (e === "default") { + return true; + } + const t = this.getAvailableDefaultModels(); + const s = [...UR]; + const n = t.find(o => o.name === e); + const r = s.find(o => o.name === e); + return n?.supportsNonMaxMode !== false && r?.supportsNonMaxMode !== false; + } + getServerModelName(e) { + if (e === "default") { + return e; + } + const t = this.getAvailableDefaultModels(); + const s = [...UR]; + const n = t.find(o => o.name === e); + const r = s.find(o => o.name === e); + return (n?.serverModelName || r?.serverModelName) ?? e; + } + maxNumTokensForModelAutoContext(e) { + if (e === "default") { + return; + } + const t = this.getAvailableDefaultModels(); + const s = [...UR]; + const n = t.find(o => o.name === e); + const r = s.find(o => o.name === e); + return (n?.autoContextMaxTokens || r?.autoContextMaxTokens) ?? undefined; + } + maxNumTokensForModelAutoContextExtended(e) { + if (e === "default") { + return; + } + const t = this.getAvailableDefaultModels(); + const s = [...UR]; + const n = t.find(o => o.name === e); + const r = s.find(o => o.name === e); + return (n?.autoContextExtendedMaxTokens || r?.autoContextExtendedMaxTokens) ?? undefined; + } +}; +_ei = __decorate([__param(0, wh), __param(1, re), __param(2, $u), __param(3, ht), __param(4, _i)], _ei); +it(uy, _ei, 1); +J(class extends se { + constructor() { + super({ + id: Jzi, + title: { + value: "Toggle AI model", + original: "Toggle AI model" + } + }); + } + async run(i, { + specificModelField: e, + isChat: t, + direction: s, + skipNonAgentSupported: n + }) { + const r = i.get(uy); + const o = s ?? "forward"; + const a = e === "regular-chat" ? r.getRegularChatModel() : e === "cmd-k" ? r.getCmdKModel() : e === "terminal-cmd-k" ? r.getTerminalCmdKModel() : e === "composer" ? r.getComposerModel() : e === "background-composer" ? r.getBackgroundComposerModel() : r.getModel(); + let l = r.getAvailableModelsReactive({ + isChat: t + }); + if (n) { + l = l.filter(d => r.doesModelSupportAgent(d)); + if (l.length === 0) { + l = r.getAvailableModelsReactive({ + isChat: t + }); + } + } + const c = o === "forward" ? (l.indexOf(a) + 1) % l.length : (l.indexOf(a) - 1 + l.length) % l.length; + const u = l[c]; + if (e === "regular-chat") { + r.setRegularChatModel(u); + } else if (e === "cmd-k") { + r.setCmdKModel(u); + } else if (e === "terminal-cmd-k") { + r.setTerminalCmdKModel(u); + } else if (e === "composer") { + r.setComposerModel(u); + } else if (e === "background-composer") { + r.setBackgroundComposerModel(u); + } else { + r.setModel(u); + } + } +}); +J(class extends se { + constructor() { + super({ + id: prt, + title: { + value: "Switch to model", + original: "Switch to model" + }, + f1: false + }); + } + async run(i, e, t) { + const s = i.get(uy); + if (t === "regular-chat") { + s.setRegularChatModel(e); + } else if (t === "cmd-k") { + s.setCmdKModel(e); + } else if (t === "terminal-cmd-k") { + s.setTerminalCmdKModel(e); + } else if (t === "composer") { + s.setComposerModel(e); + } else if (t === "background-composer") { + s.setBackgroundComposerModel(e); + } else { + s.setModel(e); + } + } +}); +sh(); +Pn(); +jm(); +var sW = Ve("aiErrorService"); +function hP(i) { + (s => { + s.details = s.details.map(n => { + const r = "value" in n && n.value instanceof Uint8Array; + if ("value" in n && r === false) { + const o = Object.values(n.value); + n.value = Uint8Array.from(o); + } + return n; + }); + })(i); + const t = i.findDetails(QM); + if (t) { + return t.at(0); + } +} +var Bei = class { + constructor(e, t, s, n, r, o, a, l) { + this.c = e; + this.d = t; + this.f = s; + this.g = n; + this.i = r; + this.j = o; + this.k = a; + this.l = l; + this.a = []; + this.m = []; + } + addErrorPopupHandler(e) { + this.m.push(e); + } + removeErrorPopupHandler(e) { + this.m = this.m.filter(t => t !== e); + } + tryRerun(e) { + const t = this.okToRerun(); + this.a.push(Date.now()); + if ((e !== true || t) && this.b !== undefined) { + this.b(); + } + } + okToRerun() { + const s = Date.now(); + const n = this.a.slice(-2); + const r = n.length < 2 || !n.every(o => s - o < 5000); + this.a = this.a.slice(-2); + return r; + } + shouldShowImmediateErrorMessage(e) { + if (!(e instanceof Eg) || e.code === Kw.Canceled) { + return false; + } + const t = hP(e); + if (!t) { + return true; + } + const s = t.error; + return s !== yo.NOT_LOGGED_IN && s !== yo.AGENT_REQUIRES_LOGIN && s !== yo.PRO_USER_USAGE_LIMIT && s !== yo.FREE_USER_USAGE_LIMIT && s !== yo.FREE_USER_RATE_LIMIT_EXCEEDED && s !== yo.PRO_USER_RATE_LIMIT_EXCEEDED && s !== yo.BAD_API_KEY && s !== yo.BAD_MODEL_NAME && s !== yo.AUTH_TOKEN_EXPIRED && s !== yo.MAX_TOKENS && t.details?.shouldShowImmediateError !== false; + } + n(e, t, s, n, r, o, a) { + if (t?.details?.shouldShowImmediateError === false) { + return; + } + if (!t?.isExpected) { + const u = n.rawMessage ?? "unknown error"; + const d = { + bugId: r, + bug: `automatic-from-connection-error. + +request ID:${r} + +error:${JSON.stringify(t?.error)} + +error:${JSON.stringify(n)}`, + priority: tg.MEDIUM, + protoURL: s, + contactEmail: "automatic-from-connection-error", + connectionErrorRaw: u, + failingRequestID: r, + connectErrorCode: n.code, + errorDetailCode: e, + errorDetailTitle: t?.details?.title, + errorDetailDetail: t?.details?.detail + }; + this.l.executeCommand(Irt, d); + } + let l; + switch (e) { + case yo.OPENAI_RATE_LIMIT_EXCEEDED: + l = "openai_rate_limit"; + break; + case yo.OPENAI_ACCOUNT_LIMIT_EXCEEDED: + l = "cursor_rate_limit"; + break; + case yo.SLASH_EDIT_FILE_TOO_LONG: + l = "fast_apply_large_file"; + break; + case yo.FILE_UNSUPPORTED: + l = "fast_apply_file_unsupported"; + break; + case yo.CLAUDE_IMAGE_TOO_LARGE: + l = "claude_image_too_large"; + break; + case yo.API_KEY_RATE_LIMIT: + l = "api_key_rate_limit"; + break; + case yo.OPENAI: + l = "openai"; + break; + case yo.GPT_4_VISION_PREVIEW_RATE_LIMIT: + l = "gpt_4_vision_rate_limit"; + break; + default: + l = "internet"; + } + let c = l === "internet" ? { + case: l, + generationUUID: r, + errorCode: undefined, + source: o, + error: t + } : { + case: l, + source: o, + error: t + }; + this.j.setNonPersistentStorage("showingErrorMetadata", c); + } + handleError(e, t, s, n, r, o) { + const a = hP(e); + console.log("error", e); + console.log("errordetail", a); + const l = a?.error; + const c = a; + this.b = o; + this.j.setNonPersistentStorage("showingErrorHasRerun", o !== undefined); + if (this.shouldShowImmediateErrorMessage(e)) { + this.n(l, c, n, e, s, r, o); + return; + } + if (l === yo.NOT_LOGGED_IN || l === yo.AGENT_REQUIRES_LOGIN || l === yo.PRO_USER_USAGE_LIMIT || l === yo.FREE_USER_USAGE_LIMIT || l === yo.FREE_USER_RATE_LIMIT_EXCEEDED || l === yo.PRO_USER_RATE_LIMIT_EXCEEDED || l === yo.BAD_API_KEY || l === yo.BAD_MODEL_NAME) { + const u = t?.modelName ?? "cursor-small"; + this.m.forEach(d => d(new pbt(u, l, () => { + if (o) { + const h = this.okToRerun(); + this.a.push(Date.now()); + if (h) { + o(); + } + } + }), this.c, this.d)); + } else if (l === yo.AUTH_TOKEN_EXPIRED) { + this.k.refreshAuthentication().then(async () => { + const u = await this.k.getAccessToken(); + if (o && u && !this.k.isTokenExpired(u)) { + const d = this.okToRerun(); + this.a.push(Date.now()); + if (d) { + o(); + } + } else { + this.j.setNonPersistentStorage("showingErrorMetadata", { + case: "internet", + generationUUID: s, + source: r, + error: a + }); + } + }); + } else if (l === yo.MAX_TOKENS) { + this.j.setNonPersistentStorage("maxTokensHit", true); + } else { + this.n(l, c, n, e, s, "other", o); + } + } +}; +Bei = __decorate([__param(0, wh), __param(1, re), __param(2, ni), __param(3, uy), __param(4, Js), __param(5, _i), __param(6, $u), __param(7, gt)], Bei); +it(sW, Bei, 1); +sh(); +wR(); +At(); +te(); +It(); +q(); +te(); +var Vd = Ve("historyService"); +var K3s; +(function (i) { + i[i.NONE = 0] = "NONE"; + i[i.EDITS = 1] = "EDITS"; + i[i.NAVIGATION = 2] = "NAVIGATION"; +})(K3s ||= {}); +var Y3s; +(function (i) { + i[i.DEFAULT = 0] = "DEFAULT"; + i[i.EDITOR_GROUP = 1] = "EDITOR_GROUP"; + i[i.EDITOR = 2] = "EDITOR"; +})(Y3s ||= {}); +zb(); +function Qyr(i, e, t) { + return TE(i, e, undefined, t); +} +function TE(i, e, t, s, n) { + const r = e.slice(); + const a = Nei(i, []); + let l; + let c; + while (r.length > 0 && (c = r.pop(), l = Mei(a, r), l === undefined && t !== undefined)) { + if (typeof c == "string") { + t = { + [c]: t + }; + } else { + t = [t]; + } + } + if (l) { + if (l.type === "object" && typeof c == "string" && Array.isArray(l.children)) { + const u = Mei(l, [c]); + if (u !== undefined) { + if (t === undefined) { + if (!u.parent) { + throw new Error("Malformed AST"); + } + const d = l.children.indexOf(u.parent); + let h; + let g = u.parent.offset + u.parent.length; + if (d > 0) { + const p = l.children[d - 1]; + h = p.offset + p.length; + } else { + h = l.offset + 1; + if (l.children.length > 1) { + g = l.children[1].offset; + } + } + return OG(i, { + offset: h, + length: g - h, + content: "" + }, s); + } else { + return OG(i, { + offset: u.offset, + length: u.length, + content: JSON.stringify(t) + }, s); + } + } else { + if (t === undefined) { + return []; + } + const d = `${JSON.stringify(c)}: ${JSON.stringify(t)}`; + const h = n ? n(l.children.map(p => p.children[0].value)) : l.children.length; + let g; + if (h > 0) { + const p = l.children[h - 1]; + g = { + offset: p.offset + p.length, + length: 0, + content: "," + d + }; + } else if (l.children.length === 0) { + g = { + offset: l.offset + 1, + length: 0, + content: d + }; + } else { + g = { + offset: l.offset + 1, + length: 0, + content: d + "," + }; + } + return OG(i, g, s); + } + } else if (l.type === "array" && typeof c == "number" && Array.isArray(l.children)) { + if (t !== undefined) { + const u = `${JSON.stringify(t)}`; + let d; + if (l.children.length === 0 || c === 0) { + d = { + offset: l.offset + 1, + length: 0, + content: l.children.length === 0 ? u : u + "," + }; + } else { + const h = c === -1 || c > l.children.length ? l.children.length : c; + const g = l.children[h - 1]; + d = { + offset: g.offset + g.length, + length: 0, + content: "," + u + }; + } + return OG(i, d, s); + } else { + const u = c; + const d = l.children[u]; + let h; + if (l.children.length === 1) { + h = { + offset: l.offset + 1, + length: l.length - 2, + content: "" + }; + } else if (l.children.length - 1 === u) { + const g = l.children[u - 1]; + const p = g.offset + g.length; + const b = l.offset + l.length; + h = { + offset: p, + length: b - 2 - p, + content: "" + }; + } else { + h = { + offset: d.offset, + length: l.children[u + 1].offset - d.offset, + content: "" + }; + } + return OG(i, h, s); + } + } else { + throw new Error(`Can not add ${typeof c != "number" ? "index" : "property"} to parent of type ${l.type}`); + } + } else if (t === undefined) { + return []; + } else { + return OG(i, { + offset: a ? a.offset : 0, + length: a ? a.length : 0, + content: JSON.stringify(t) + }, s); + } +} +function OG(i, e, t) { + let s = Uei(i, e); + let n = e.offset; + let r = e.offset + e.content.length; + if (e.length === 0 || e.content.length === 0) { + while (n > 0 && !cbt(s, n - 1)) { + n--; + } + while (r < s.length && !cbt(s, r)) { + r++; + } + } + const o = wyr(s, { + offset: n, + length: r - n + }, t); + for (let l = o.length - 1; l >= 0; l--) { + const c = o[l]; + s = Uei(s, c); + n = Math.min(n, c.offset); + r = Math.max(r, c.offset + c.length); + r += c.content.length - c.length; + } + const a = i.length - (s.length - r) - n; + return [{ + offset: n, + length: a, + content: s.substring(n, r) + }]; +} +function Uei(i, e) { + return i.substring(0, e.offset) + e.content + i.substring(e.offset + e.length); +} +function Wei(i, e) { + const t = e.slice(0).sort((n, r) => { + const o = n.offset - r.offset; + if (o === 0) { + return n.length - r.length; + } else { + return o; + } + }); + let s = i.length; + for (let n = t.length - 1; n >= 0; n--) { + const r = t[n]; + if (r.offset + r.length <= s) { + i = Uei(i, r); + } else { + throw new Error("Overlapping edit"); + } + s = r.offset; + } + return i; +} +Yp(); +At(); +pn(); +rt(); +Et(); +Le(); +te(); +fA(); +ii(); +var gC = Ve("workspacesService"); +function Vei(i) { + return i.hasOwnProperty("workspace"); +} +function G0e(i) { + return i.hasOwnProperty("folderUri"); +} +function X3s(i) { + return mbt(i) || Q3s(i); +} +function mbt(i) { + const e = i; + return typeof e?.path == "string" && (!e.name || typeof e.name == "string"); +} +function Q3s(i) { + const e = i; + return typeof e?.uri == "string" && (!e.name || typeof e.name == "string"); +} +function Hei(i, e, t, s, n) { + if (i.scheme !== s.scheme) { + return { + name: t, + uri: i.toString(true) + }; + } + let r = e ? undefined : n.relativePath(s, i); + if (r !== undefined) { + if (r.length === 0) { + r = "."; + } else if (ln) { + r = Z3s(r); + } + } else if (i.scheme === me.file) { + r = i.fsPath; + if (ln) { + r = Z3s(r); + } + } else if (n.isEqualAuthority(i.authority, s.authority)) { + r = i.path; + } else { + return { + name: t, + uri: i.toString(true) + }; + } + return { + name: t, + path: r + }; +} +function Z3s(i) { + i = f1(i); + if (!jZ(i)) { + i = qZ(i); + } + return i; +} +function qei(i, e, t) { + const s = []; + const n = new Set(); + const r = t.dirname(e); + for (const o of i) { + let a; + if (mbt(o)) { + if (o.path) { + a = t.resolvePath(r, o.path); + } + } else if (Q3s(o)) { + try { + a = V.parse(o.uri); + if (a.path[0] !== ao.sep) { + a = a.with({ + path: ao.sep + a.path + }); + } + } catch (l) { + console.warn(l); + } + } + if (a) { + const l = t.getComparisonKey(a); + if (!n.has(l)) { + n.add(l); + const c = o.name || t.basenameOrAuthority(a); + s.push(new $lt({ + uri: a, + name: c, + index: s.length + }, o)); + } + } + } + return s; +} +function e9s(i, e, t, s, n) { + const r = Zyr(e, i); + const o = n.dirname(e); + const a = n.dirname(s); + const l = []; + for (const h of r.folders) { + const g = mbt(h) ? n.resolvePath(o, h.path) : V.parse(h.uri); + let p; + if (t) { + p = false; + } else { + p = !mbt(h) || HC(h.path); + } + l.push(Hei(g, p, h.name, a, n)); + } + const c = { + insertSpaces: false, + tabSize: 4, + eol: yl || Gt ? ` +` : `\r +` + }; + const u = TE(i, ["folders"], l, c); + let d = Wei(i, u); + if (o9(r.remoteAuthority, rwe(s))) { + d = Wei(d, Qyr(d, ["remoteAuthority"], c)); + } + return d; +} +function Zyr(i, e) { + const t = Ld(e); + if (t && Array.isArray(t.folders)) { + t.folders = t.folders.filter(s => X3s(s)); + } else { + throw new Error(`${i} looks like an invalid workspace file.`); + } + return t; +} +function ewr(i) { + return i.workspace && typeof i.workspace == "object" && typeof i.workspace.id == "string" && typeof i.workspace.configPath == "string"; +} +function twr(i) { + return typeof i.folderUri == "string"; +} +function iwr(i) { + return typeof i.fileUri == "string"; +} +function swr(i, e) { + const t = { + workspaces: [], + files: [] + }; + if (i) { + const s = function (r, o) { + for (let a = 0; a < r.length; a++) { + try { + o(r[a], a); + } catch (l) { + e.warn(`Error restoring recent entry ${JSON.stringify(r[a])}: ${l.toString()}. Skip entry.`); + } + } + }; + const n = i; + if (Array.isArray(n.entries)) { + s(n.entries, r => { + const o = r.label; + const a = r.remoteAuthority; + if (ewr(r)) { + t.workspaces.push({ + label: o, + remoteAuthority: a, + workspace: { + id: r.workspace.id, + configPath: V.parse(r.workspace.configPath) + } + }); + } else if (twr(r)) { + t.workspaces.push({ + label: o, + remoteAuthority: a, + folderUri: V.parse(r.folderUri) + }); + } else if (iwr(r)) { + t.files.push({ + label: o, + remoteAuthority: a, + fileUri: V.parse(r.fileUri) + }); + } + }); + } + } + return t; +} +vt(); +yt(); +Qv(); +ri(); +lC(); +Rn(); +Ms(); +ii(); +wa(); +var VA = Ve("fastContextService"); +var nwr = 10000; +var jei = class extends H { + constructor(e, t, s, n, r, o, a, l) { + super(); + this.c = e; + this.f = t; + this.g = s; + this.h = n; + this.j = r; + this.m = o; + this.q = a; + this.r = l; + this.embeddingsCache = {}; + this.embeddingsTimer = {}; + this.lastLookedUpEmbeddings = []; + this.lastSeenCmdKQueryHistoryInAllContextSessions = []; + this.timeOfLastTerminalCommand = 0; + this.timeOfLastUserChatMessage = 0; + } + async computeEmbeddingsChunks(e, t, s) {} + clearEmbeddingsCache() { + this.lastLookedUpEmbeddings = this.lastLookedUpEmbeddings.slice(-20); + const e = new Set(this.lastLookedUpEmbeddings); + for (const t in this.embeddingsCache) { + if (!e.has(t)) { + delete this.embeddingsCache[t]; + } + } + } + async getEmbeddingsFromCache(e) { + return []; + } + async getEmbeddingChunks(e, t, s) { + return (await this.m.parallelSearch(e, 5, undefined, { + globFilter: s + })).map(r => ({ + relativeWorkspacePath: r.codeBlock?.relativeWorkspacePath ?? "", + contents: r.codeBlock?.contents ?? "" + })); + } + s() { + const e = this.h.activeEditorPane?.getControl(); + if (!no(e)) { + return; + } + const t = e.getModel(); + if (t === null) { + return; + } + const s = e.getPosition(); + const n = e.getSelection(); + return { + model: t, + position: s, + selection: n + }; + } + async getAllOpenTabs({ + fileSizeLimit: e + }) { + const t = []; + for (const s of this.h.editors) { + try { + const n = s.resource; + if (n) { + let r; + try { + r = await this.q.createModelReference(n); + const o = r.object.textEditorModel.getValue(); + if (o.length <= e) { + t.push({ + uri: n, + contents: o + }); + } + } finally { + r?.dispose(); + } + } + } catch (n) { + console.error(n); + } + } + return t; + } + async getVisibleTabs() { + const e = []; + for (const t of this.h.visibleEditorPanes) { + const r = t.getControl().getVisibleRanges().map(c => ({ + startLineNumber: c.startLineNumber, + endLineNumber: c.endLineNumber + })); + const a = t.input.resource; + let l; + try { + l = await this.q.createModelReference(a); + const c = l.object.textEditorModel.getValue(); + let u = []; + let d = 1; + for (const { + startLineNumber: h, + endLineNumber: g + } of r) { + if (d < h) { + d = h; + } + const p = c.split(` +`).slice(h - 1, g); + u = u.concat(p.map(b => ({ + line: b, + lineNumber: d++ + }))); + } + if (u.join(` +`).trim().length > 0) { + e.push({ + relativeWorkspacePath: this.g.asRelativePath(a), + totalNumberOfLinesInFile: c.split(` +`).length, + lines: u + }); + } + } finally { + l?.dispose(); + } + } + return e; + } + async getRecentChunks(e = 50) { + const t = this.c.getRecentLocations(e); + const s = this.t(t, 50); + const n = this.g.getWorkspace(); + let r; + if (n.folders.length > 0) { + r = n.folders[0].uri; + } + const o = this.u(s); + const a = await this.w(o, r); + a.sort((l, c) => c.score - l.score); + return a.map(({ + score: l, + ...c + }) => c); + } + t(e, t = 7) { + return e.map(s => s.location.startLineNumber === s.location.endLineNumber ? { + ...s, + location: new Z(Math.max(s.location.startLineNumber - t, 1), 1, s.location.endLineNumber + t, 1) + } : s); + } + u(e) { + const t = new Map(); + for (const [s, n] of e.entries()) { + const r = n.uri; + if (!t.has(r)) { + t.set(r, []); + } + t.get(r)?.push({ + ...n, + score: e.length - s, + numMerges: 1 + }); + } + return t; + } + async w(e, t) { + const s = []; + for (const [n, r] of e.entries()) { + const o = this.y(r); + let a; + try { + a = await this.q.createModelReference(n); + await Promise.race([a.object.resolve(), new Promise(l => setTimeout(l, 3000))]); + for (const l of o) { + if (a.object.textEditorModel.getValueLengthInRange(l.location) > nwr) { + continue; + } + const u = a.object.textEditorModel.getValueInRange(l.location); + let d = n.fsPath; + if (t) { + d = this.g.asRelativePath(n); + } + s.push({ + relativeWorkspacePath: d, + contents: u, + score: l.score, + range: l.location + }); + } + } finally { + a?.dispose(); + } + } + return s; + } + y(e) { + const t = []; + let [s, ...n] = e; + for (const r of n) { + if (Z.areIntersecting(s.location, r.location)) { + s.location = Z.plusRange(s.location, r.location); + s.score = (s.score * s.numMerges + r.score) / (s.numMerges + 1); + s.numMerges += 1; + } else { + t.push(s); + s = r; + } + } + t.push(s); + return t; + } + async getImports() { + const e = this.s(); + if (e === undefined) { + return []; + } + const { + model: t + } = e; + const s = new Xi(); + const o = (await this.j.getOrCreate(t, s.token)).getTopLevelSymbols(); + return []; + } + async getApproximateRangeOfImports(e, t) { + let s; + try { + s = await this.q.createModelReference(e); + const n = s.object.textEditorModel; + const a = (await this.j.getOrCreate(n, t)).getTopLevelSymbols().reduce((l, c) => Math.min(l, c.range.startLineNumber), Number.MAX_VALUE); + return new Z(1, 1, a, 1000); + } finally { + s?.dispose(); + } + } + async getTypes() { + return []; + } + async getNonEmbeddingChunks(e, t) { + try { + const s = await this.getRecentChunks(); + if (t !== undefined) { + return s.slice(0, t); + } else { + return s.slice(0, 5); + } + } catch (s) { + console.error(s); + return []; + } + } + async getFilteredRecentChunks(e) { + const t = this.c.getRecentLocations(50); + const s = this.t(t); + const n = this.z(); + const r = s.filter(h => h.uri.toString() !== n?.toString()); + const o = this.g.getWorkspace(); + let a; + if (o.folders.length > 0) { + a = o.folders[0].uri; + } + const l = this.u(r); + const c = await this.w(l, a); + c.sort((h, g) => g.score - h.score); + return c.map(({ + score: h, + ...g + }) => g).slice(0, e); + } + z() { + return this.h.activeEditor?.resource; + } + addCmdKToQueryHistory(e, t) { + this.lastSeenCmdKQueryHistoryInAllContextSessions.push({ + query: { + query: e + }, + relativeWorkspacePath: t, + timestampDouble: Date.now(), + cmdkWasAccepted: undefined + }); + } + getCmdKQueryHistoryInAllContextSessions() { + return this.lastSeenCmdKQueryHistoryInAllContextSessions; + } + markNowAsLastChatMessage() { + this.timeOfLastUserChatMessage = Date.now(); + } + markNowAsLastTerminalCommand() { + this.timeOfLastTerminalCommand = Date.now(); + } + getTimeOfLastChatMessage() { + return this.timeOfLastUserChatMessage; + } + getTimeOfLastTerminalCommand() { + return this.timeOfLastTerminalCommand; + } +}; +jei = __decorate([__param(0, Vd), __param(1, gC), __param(2, kt), __param(3, Te), __param(4, fS), __param(5, sy), __param(6, ns), __param(7, $s)], jei); +it(VA, jei, 1); +q(); +It(); +te(); +ii(); +var bbt = Ve("aiUtilsService"); +var zei = class extends H { + constructor(e) { + super(); + this.a = e; + } + getWorkspaceRootPath() { + const e = this.a.getWorkspace().folders; + if (e.length > 0) { + return e[0].uri.path; + } else { + return undefined; + } + } +}; +zei = __decorate([__param(0, kt)], zei); +it(bbt, zei, 1); +Rn(); +Sm(); +Yw(); +Dve(); +Hr(); +Lc(); +Wo(); +cS(); +var Jei; +(function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.PYTHON = 1] = "PYTHON"; + i[i.SHELL = 2] = "SHELL"; +})(Jei ||= {}); +m.util.setEnumType(Jei, "aiserver.v1.InterpreterTool", [{ + no: 0, + name: "INTERPRETER_TOOL_UNSPECIFIED" +}, { + no: 1, + name: "INTERPRETER_TOOL_PYTHON" +}, { + no: 2, + name: "INTERPRETER_TOOL_SHELL" +}]); +var rwr = class HYe extends N { + constructor(e) { + super(); + this.conversationUuid = ""; + this.userFeedback = K0e.UNSPECIFIED; + this.userFeedbackDetails = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.LogInterpreterExplicitUserFeedbackRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "conversation_uuid", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "user_feedback", + kind: "enum", + T: m.getEnumType(K0e) + }, { + no: 4, + name: "user_feedback_details", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new HYe().fromBinary(e, t); + } + static fromJson(e, t) { + return new HYe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new HYe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(HYe, e, t); + } +}; +var K0e; +(function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.GOOD = 1] = "GOOD"; + i[i.OKAY = 2] = "OKAY"; + i[i.BAD = 3] = "BAD"; +})(K0e ||= {}); +m.util.setEnumType(K0e, "aiserver.v1.LogInterpreterExplicitUserFeedbackRequest.Feedback", [{ + no: 0, + name: "FEEDBACK_UNSPECIFIED" +}, { + no: 1, + name: "FEEDBACK_GOOD" +}, { + no: 2, + name: "FEEDBACK_OKAY" +}, { + no: 3, + name: "FEEDBACK_BAD" +}]); +var owr = class qYe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.LogInterpreterExplicitUserFeedbackResponse"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new qYe().fromBinary(e, t); + } + static fromJson(e, t) { + return new qYe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new qYe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(qYe, e, t); + } +}; +var awr = class jYe extends N { + constructor(e) { + super(); + this.openFiles = []; + this.conversation = []; + this.documentationIdentifiers = []; + this.scoredCodebaseContext = []; + this.conversationUuid = ""; + this.quotes = []; + this.supportsShellTool = false; + this.globalDescription = ""; + this.terminalCwd = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamInterpreterRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "open_files", + kind: "message", + T: lwr, + repeated: true + }, { + no: 2, + name: "conversation", + kind: "message", + T: Al, + repeated: true + }, { + no: 4, + name: "explicit_context", + kind: "message", + T: Qg + }, { + no: 7, + name: "model_details", + kind: "message", + T: Qa + }, { + no: 8, + name: "documentation_identifiers", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 11, + name: "summary", + kind: "scalar", + T: 9, + opt: true + }, { + no: 12, + name: "summary_up_until_index", + kind: "scalar", + T: 5, + opt: true + }, { + no: 13, + name: "retry_instructions", + kind: "scalar", + T: 9, + opt: true + }, { + no: 14, + name: "retry_previous_attempt", + kind: "scalar", + T: 9, + opt: true + }, { + no: 15, + name: "scored_codebase_context", + kind: "message", + T: xb, + repeated: true + }, { + no: 16, + name: "high_level_folder_description", + kind: "scalar", + T: 9, + opt: true + }, { + no: 17, + name: "conversation_uuid", + kind: "scalar", + T: 9 + }, { + no: 18, + name: "cmd_k_debug_info", + kind: "message", + T: KT + }, { + no: 19, + name: "quotes", + kind: "message", + T: ybe, + repeated: true + }, { + no: 20, + name: "supports_shell_tool", + kind: "scalar", + T: 8 + }, { + no: 21, + name: "global_description", + kind: "scalar", + T: 9 + }, { + no: 22, + name: "terminal_cwd", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new jYe().fromBinary(e, t); + } + static fromJson(e, t) { + return new jYe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new jYe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(jYe, e, t); + } +}; +var lwr = class zYe extends N { + constructor(e) { + super(); + this.scrollTopLineNumber = 0; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamInterpreterRequest.FileInfo"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "file", + kind: "message", + T: tu + }, { + no: 2, + name: "scroll_top_line_number", + kind: "scalar", + T: 5 + }]); + } + static fromBinary(e, t) { + return new zYe().fromBinary(e, t); + } + static fromJson(e, t) { + return new zYe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new zYe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(zYe, e, t); + } +}; +var cwr = class JYe extends N { + constructor(e) { + super(); + this.text = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StreamInterpreterResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "text", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new JYe().fromBinary(e, t); + } + static fromJson(e, t) { + return new JYe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new JYe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(JYe, e, t); + } +}; +Hr(); +var Gei = { + typeName: "aiserver.v1.InterpreterService", + methods: { + streamInterpreter: { + name: "StreamInterpreter", + I: awr, + O: cwr, + kind: Ge.ServerStreaming + }, + logInterpreterExplicitUserFeedback: { + name: "LogInterpreterExplicitUserFeedback", + I: rwr, + O: owr, + kind: Ge.Unary + } + } +}; +Hr(); +Wo(); +V7(); +cS(); +var uwr = class GYe extends N { + constructor(e) { + super(); + this.mode = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ReportModeSelectionRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "mode", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "debug_info", + kind: "message", + T: KT + }]); + } + static fromBinary(e, t) { + return new GYe().fromBinary(e, t); + } + static fromJson(e, t) { + return new GYe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new GYe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(GYe, e, t); + } +}; +var dwr = class KYe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ReportModeSelectionResponse"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new KYe().fromBinary(e, t); + } + static fromJson(e, t) { + return new KYe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new KYe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(KYe, e, t); + } +}; +var hwr = class YYe extends N { + constructor(e) { + super(); + this.patchUuid = ""; + this.patchString = ""; + this.source = ""; + this.reflection = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RecordAcceptedPatchRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "patch_uuid", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "patch_string", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "source", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "reflection", + kind: "scalar", + T: 9 + }, { + no: 5, + name: "debug_info", + kind: "message", + T: KT + }]); + } + static fromBinary(e, t) { + return new YYe().fromBinary(e, t); + } + static fromJson(e, t) { + return new YYe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new YYe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(YYe, e, t); + } +}; +var fwr = class XYe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RecordAcceptedPatchResponse"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new XYe().fromBinary(e, t); + } + static fromJson(e, t) { + return new XYe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new XYe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(XYe, e, t); + } +}; +var gwr = class QYe extends N { + constructor(e) { + super(); + this.ans = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.OpusChainGetFilePathsRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "ans", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new QYe().fromBinary(e, t); + } + static fromJson(e, t) { + return new QYe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new QYe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(QYe, e, t); + } +}; +var pwr = class ZYe extends N { + constructor(e) { + super(); + this.paths = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.OpusChainGetFilePathsResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "paths", + kind: "message", + T: mwr, + repeated: true + }]); + } + static fromBinary(e, t) { + return new ZYe().fromBinary(e, t); + } + static fromJson(e, t) { + return new ZYe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new ZYe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(ZYe, e, t); + } +}; +var mwr = class eXe extends N { + constructor(e) { + super(); + this.rawPath = ""; + this.interestingLines = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.OpusChainGetFilePathsResponse.Path"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "raw_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "interesting_lines", + kind: "scalar", + T: 5, + repeated: true + }]); + } + static fromBinary(e, t) { + return new eXe().fromBinary(e, t); + } + static fromJson(e, t) { + return new eXe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new eXe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(eXe, e, t); + } +}; +var bwr = class tXe extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.oldFileContents = ""; + this.newFileContents = ""; + this.patchString = ""; + this.branchNotes = ""; + this.branchName = ""; + this.highLevelAiAnswer = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.OpusChainReflectRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "old_file_contents", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "new_file_contents", + kind: "scalar", + T: 9 + }, { + no: 9, + name: "patch_string", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "branch_notes", + kind: "scalar", + T: 9 + }, { + no: 5, + name: "branch_name", + kind: "scalar", + T: 9 + }, { + no: 6, + name: "high_level_ai_answer", + kind: "scalar", + T: 9 + }, { + no: 7, + name: "override_model", + kind: "scalar", + T: 9, + opt: true + }, { + no: 8, + name: "override_token_limit", + kind: "scalar", + T: 5, + opt: true + }, { + no: 10, + name: "lints", + kind: "message", + T: Gz + }]); + } + static fromBinary(e, t) { + return new tXe().fromBinary(e, t); + } + static fromJson(e, t) { + return new tXe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new tXe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(tXe, e, t); + } +}; +var vwr = class iXe extends N { + constructor(e) { + super(); + this.text = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.OpusChainReflectResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "text", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "decision", + kind: "message", + T: Swr + }]); + } + static fromBinary(e, t) { + return new iXe().fromBinary(e, t); + } + static fromJson(e, t) { + return new iXe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new iXe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(iXe, e, t); + } +}; +var ywr = class sXe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.OpusChainReflectResponse.AcceptDecision"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new sXe().fromBinary(e, t); + } + static fromJson(e, t) { + return new sXe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new sXe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(sXe, e, t); + } +}; +var wwr = class nXe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.OpusChainReflectResponse.RetryWithoutMoreInformationDecision"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new nXe().fromBinary(e, t); + } + static fromJson(e, t) { + return new nXe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new nXe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(nXe, e, t); + } +}; +var Cwr = class rXe extends N { + constructor(e) { + super(); + this.codebaseQuestions = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.OpusChainReflectResponse.RetryWithCodebaseQuestionDecision"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "codebase_questions", + kind: "scalar", + T: 9, + repeated: true + }]); + } + static fromBinary(e, t) { + return new rXe().fromBinary(e, t); + } + static fromJson(e, t) { + return new rXe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new rXe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(rXe, e, t); + } +}; +var Swr = class oXe extends N { + constructor(e) { + super(); + this.decision = { + case: undefined + }; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.OpusChainReflectResponse.Decision"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "accept", + kind: "message", + T: ywr, + oneof: "decision" + }, { + no: 2, + name: "retry_without_more_information", + kind: "message", + T: wwr, + oneof: "decision" + }, { + no: 3, + name: "retry_with_codebase_question", + kind: "message", + T: Cwr, + oneof: "decision" + }]); + } + static fromBinary(e, t) { + return new oXe().fromBinary(e, t); + } + static fromJson(e, t) { + return new oXe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new oXe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(oXe, e, t); + } +}; +var xwr = class aXe extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.highLevelAiAnswer = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.OpusChainGetFileInstructionRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "high_level_ai_answer", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new aXe().fromBinary(e, t); + } + static fromJson(e, t) { + return new aXe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new aXe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(aXe, e, t); + } +}; +var kwr = class lXe extends N { + constructor(e) { + super(); + this.fileInstruction = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.OpusChainGetFileInstructionResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "file_instruction", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new lXe().fromBinary(e, t); + } + static fromJson(e, t) { + return new lXe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new lXe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(lXe, e, t); + } +}; +var Ewr = class cXe extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.fileContents = ""; + this.branchNotes = ""; + this.branchName = ""; + this.highLevelAiAnswer = ""; + this.originatingReflection = ""; + this.scoredCodebaseContext = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.OpusChainGetPlanRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "file_contents", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "branch_notes", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "branch_name", + kind: "scalar", + T: 9 + }, { + no: 5, + name: "high_level_ai_answer", + kind: "scalar", + T: 9 + }, { + no: 9, + name: "originating_reflection", + kind: "scalar", + T: 9 + }, { + no: 6, + name: "override_model", + kind: "scalar", + T: 9, + opt: true + }, { + no: 7, + name: "override_token_limit", + kind: "scalar", + T: 5, + opt: true + }, { + no: 15, + name: "scored_codebase_context", + kind: "message", + T: xb, + repeated: true + }, { + no: 8, + name: "codebase_information", + kind: "message", + T: Iwr, + opt: true + }]); + } + static fromBinary(e, t) { + return new cXe().fromBinary(e, t); + } + static fromJson(e, t) { + return new cXe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new cXe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(cXe, e, t); + } +}; +var Iwr = class uXe extends N { + constructor(e) { + super(); + this.files = []; + this.qa = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.OpusChainGetPlanRequest.CodebaseInformation"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "files", + kind: "message", + T: Dwr, + repeated: true + }, { + no: 2, + name: "qa", + kind: "message", + T: Twr, + repeated: true + }]); + } + static fromBinary(e, t) { + return new uXe().fromBinary(e, t); + } + static fromJson(e, t) { + return new uXe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new uXe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(uXe, e, t); + } +}; +var Dwr = class dXe extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.contents = ""; + this.interestingLines = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.OpusChainGetPlanRequest.CodebaseInformation.File"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "contents", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "interesting_lines", + kind: "scalar", + T: 5, + repeated: true + }]); + } + static fromBinary(e, t) { + return new dXe().fromBinary(e, t); + } + static fromJson(e, t) { + return new dXe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new dXe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(dXe, e, t); + } +}; +var Twr = class hXe extends N { + constructor(e) { + super(); + this.question = ""; + this.answer = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.OpusChainGetPlanRequest.CodebaseInformation.QA"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "question", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "answer", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new hXe().fromBinary(e, t); + } + static fromJson(e, t) { + return new hXe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new hXe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(hXe, e, t); + } +}; +var Pwr = class fXe extends N { + constructor(e) { + super(); + this.text = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.OpusChainGetPlanResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "text", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new fXe().fromBinary(e, t); + } + static fromJson(e, t) { + return new fXe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new fXe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(fXe, e, t); + } +}; +Hr(); +var Kei = { + typeName: "aiserver.v1.AiBranchService", + methods: { + opusChainGetPlan: { + name: "OpusChainGetPlan", + I: Ewr, + O: Pwr, + kind: Ge.ServerStreaming + }, + opusChainGetFileInstruction: { + name: "OpusChainGetFileInstruction", + I: xwr, + O: kwr, + kind: Ge.Unary + }, + opusChainReflect: { + name: "OpusChainReflect", + I: bwr, + O: vwr, + kind: Ge.ServerStreaming + }, + opusChainGetFilePaths: { + name: "OpusChainGetFilePaths", + I: gwr, + O: pwr, + kind: Ge.Unary + }, + recordAcceptedPatch: { + name: "RecordAcceptedPatch", + I: hwr, + O: fwr, + kind: Ge.Unary + }, + reportModeSelection: { + name: "ReportModeSelection", + I: uwr, + O: dwr, + kind: Ge.Unary + } + } +}; +Lc(); +Ms(); +In(); +pn(); +Nt(); +JYt(); +te(); +var G5 = Ve("cursorRulesService"); +It(); +Nt(); +Le(); +q(); +ii(); +function t9s(i) { + const e = /^---\r?\n/m; + const t = i.split(e); + if (t.length < 3 || t[0] !== "") { + console.error("Invalid MDC file format. Ensure the file begins with frontmatter separated by '---'", i); + return { + content: i, + metadata: { + description: "", + globs: "", + alwaysApply: false + } + }; + } + const s = t[1]; + const n = s9s(s); + return { + content: t.slice(2).join(`--- +`), + metadata: { + description: n.description ?? "", + globs: n.globs ?? "", + alwaysApply: !!n.alwaysApply + } + }; +} +function i9s(i) { + return `--- +description: ${i.metadata.description} +globs: ${i.metadata.globs} +alwaysApply: ${i.metadata.alwaysApply} +--- +${i.content}`; +} +function s9s(i) { + const e = { + description: "", + globs: "", + alwaysApply: false + }; + const t = i.split(` +`); + for (const s of t) { + const n = s.trim(); + if (!n || n.startsWith("#")) { + continue; + } + const r = n.indexOf(":"); + if (r === -1) { + continue; + } + const o = n.slice(0, r).trim(); + const a = n.slice(r + 1).trim(); + if (o && a) { + if (o === "alwaysApply") { + e[o] = a === "true"; + } else if (o === "description" || o === "globs") { + e[o] = a; + } + } + } + return e; +} +Qp(); +vt(); +pe(); +Ed(); +CE(); +te(); +var nW = ".mdc"; +var Yei = class extends H { + constructor(e, t, s, n, r) { + super(); + this.q = e; + this.s = t; + this.t = s; + this.u = n; + this.w = r; + this.a = this.D(new B()); + this.onDidChangeRules = this.a.event; + this.b = new Map(); + this.c = false; + this.h = []; + this.j = []; + this.m = new Map(); + this.n = this.w.createInstance(C1); + this.D(this.s.onDidChangeWorkspaceFolders(() => { + this.z(); + })); + this.D(this.q.onDidFilesChange(o => this.y(o))); + this.C(); + } + async y(e) { + if (this.j.some(t => e.affects(t))) { + await this.refresh(); + } + } + async z() { + const e = this.b.size > 0; + this.b.clear(); + this.c = false; + this.j = []; + this.m.clear(); + this.h.forEach(t => t.dispose()); + this.h = []; + if (e) { + this.a.fire(); + } + await this.C(); + } + async C() { + if (!this.c) { + if (this.f) { + await this.f; + return; + } + this.f = (async () => { + this.j = await this.I(); + this.h = this.j.map(e => this.D(this.q.watch(e))); + await this.refresh(); + this.c = true; + })().finally(() => { + this.f = undefined; + }); + await this.f; + } + } + async refresh() { + const e = new Map(this.b); + this.b.clear(); + this.m.clear(); + const t = this.s.getWorkspace().folders; + if (t.length === 0) { + return; + } + const s = this.j.filter(r => t.some(o => r.path.startsWith(o.uri.path))); + try { + for (const r of s) { + if (await this.q.exists(r)) { + await this.G(r); + } + } + } catch { + return; + } + let n = e.size !== this.b.size; + if (!n) { + for (const [r, o] of this.b) { + const a = e.get(r); + if (!a || o.description !== a.description || o.body !== a.body || o.alwaysApply !== a.alwaysApply || !this.H(o.globs, a.globs)) { + n = true; + break; + } + } + } + if (n) { + this.a.fire(); + } + } + F(e) { + const t = this.s.getWorkspaceFolder(e.resource); + if (!t) { + return e.resource.path; + } + let s; + for (const c of this.j) { + if (e.resource.path.startsWith(c.path) && (!s || c.path.length > s.path.length)) { + s = c; + } + } + s ||= V.joinPath(t.uri, ".cursor", "rules"); + let n = e.resource.path.substring(s.path.length); + if (n.startsWith("/")) { + n = n.substring(1); + } + let r = s.path.substring(t.uri.path.length); + if (r.startsWith("/")) { + r = r.substring(1); + } + let o = ""; + const a = "/.cursor/rules"; + if (r.endsWith(a)) { + o = r.slice(0, -a.length); + } else if (r === ".cursor/rules") { + o = ""; + } + if (o.endsWith("/")) { + o = o.slice(0, -1); + } + let l = o ? `${o}/${n}` : n; + if (this.s.getWorkspace().folders.length > 1) { + l = `${t.name}/${l}`; + } + return l; + } + async G(e) { + const t = await this.q.resolve(e, { + resolveMetadata: true + }); + if (t.children) { + for (const s of t.children) { + if (s.isDirectory) { + await this.G(s.resource); + continue; + } + if (!s.name || !s.name.endsWith(nW)) { + continue; + } + const o = (await this.q.readFile(s.resource)).value.toString().split("---").filter(Boolean); + if (!(o.length < 2)) { + try { + const a = s9s(o[0].trim()); + const l = o.slice(1).join("---").trim(); + const c = this.F(s); + const u = a.alwaysApply ?? false; + let d; + if (u) { + d = undefined; + } else { + if (a.globs) { + const g = a.globs.split(",").map(p => p.trim()).filter(Boolean); + if (g.length > 0) { + const p = this.s.getWorkspaceFolder(s.resource); + if (p) { + let b; + for (const w of this.j) { + if (s.resource.path.startsWith(w.path) && (!b || w.path.length > b.path.length)) { + b = w; + } + } + b ||= V.joinPath(p.uri, ".cursor", "rules"); + let v = b.path.substring(p.uri.path.length); + if (v.startsWith("/")) { + v = v.slice(1); + } + const y = ".cursor/rules"; + if (v === y) { + v = ""; + } else if (v.endsWith(`/${y}`)) { + v = v.slice(0, -(y.length + 1)); + } + if (v) { + d = g.map(w => { + if (w.startsWith("/")) { + return w.substring(1); + } + if (w.startsWith("../")) { + const C = v.split("/"); + let S = 0; + while (w.startsWith("../")) { + S++; + w = w.substring(3); + } + const x = C.slice(0, Math.max(0, C.length - S)); + if (x.length === 0) { + return w; + } else { + return `${x.join("/")}/${w}`; + } + } + if (w.startsWith("./")) { + w = w.substring(2); + } + return `${v}/${w}`; + }); + } else { + d = g; + } + } else { + d = g; + } + } + } + if (!d) { + const g = this.s.getWorkspaceFolder(s.resource); + if (g) { + let p; + for (const y of this.j) { + if (s.resource.path.startsWith(y.path) && (!p || y.path.length > p.path.length)) { + p = y; + } + } + p ||= V.joinPath(g.uri, ".cursor", "rules"); + let b = p.path.substring(g.uri.path.length); + if (b.startsWith("/")) { + b = b.slice(1); + } + const v = ".cursor/rules"; + if (b === v) { + b = ""; + } else if (b.endsWith(`/${v}`)) { + b = b.slice(0, -(v.length + 1)); + } + if (b) { + d = [`${b}/**`]; + } + } + } + } + const h = { + description: a.description, + globs: d, + alwaysApply: u, + filename: c, + body: l + }; + this.b.set(c, h); + this.m.set(c, s.resource); + } catch { + continue; + } + } + } + } + } + H(e, t) { + if (!e && !t) { + return true; + } else if (!e || !t || e.length !== t.length) { + return false; + } else { + return e.every((s, n) => s === t[n]); + } + } + async getRules(e) { + await this.C(); + return Array.from(this.b.values()).filter(t => (!e.requireDescription || !!t.description) && (!e.requireGlobs || !!t.globs && t.globs.length !== 0)); + } + async getGlobalRules() { + return (await this.getRules({ + requireDescription: false, + requireGlobs: false + })).filter(t => !!t.alwaysApply); + } + async getExplicitRules() { + const e = await this.getRules({ + requireDescription: true + }); + const t = await this.getGlobalRules(); + return this.dedupeRules(e, t); + } + async getRulesForFiles(e) { + const t = await this.getRules({ + requireGlobs: true + }); + const s = this.s.getWorkspace().folders; + if (s.length === 0) { + return []; + } + const n = []; + for (const a of e) { + const l = V.parse(a); + const c = this.s.getWorkspaceFolder(l); + if (!c) { + continue; + } + let u = l.path.substring(c.uri.path.length); + if (u.startsWith("/")) { + u = u.substring(1); + } + n.push({ + relativePath: u, + workspaceFolder: c.name + }); + } + if (n.length === 0) { + return []; + } + const r = s.length > 1; + return t.filter(a => { + let l; + if (r && a.filename.includes("/")) { + l = a.filename.substring(0, a.filename.indexOf("/")); + } + return a.globs?.some(c => { + const u = !c.includes("/") || c.lastIndexOf("/") === c.length - 1 ? `**/${c}` : c; + return n.some(h => r && l && l !== h.workspaceFolder ? false : Jw(u, h.relativePath)); + }); + }); + } + async openRule(e) { + const t = this.m.get(e); + if (t) { + await this.t.openEditor({ + resource: t, + options: { + pinned: true + } + }); + } + } + getRule(e) { + return this.b.get(e); + } + dedupeRules(e, t) { + const s = new Set(e.map(r => r.filename)); + const n = t.filter(r => !s.has(r.filename)); + return [...e, ...n]; + } + async doesGlobMatchAnyFiles(e) { + const t = this.s.getWorkspace().folders; + if (t.length === 0) { + return false; + } + const s = !e.includes("/") || e.lastIndexOf("/") === e.length - 1 ? `**/${e}` : e; + const n = this.n.file(t, { + _reason: "cursorRulesGlobMatch", + includePattern: [s], + maxResults: 1 + }); + return (await this.u.fileSearch(n)).results.length > 0; + } + async I() { + const e = this.s.getWorkspace().folders; + const t = new Map(); + for (const s of e) { + const n = V.joinPath(s.uri, ".cursor", "rules"); + t.set(n.toString(), n); + } + try { + if (e.length > 0) { + const s = this.n.file(e, { + _reason: "cursorRulesDiscover", + includePattern: ["**/.cursor/rules/**/*.mdc"], + maxResults: 1000 + }); + const n = await this.u.fileSearch(s); + for (const r of n.results) { + const o = r.resource.path; + const a = "/.cursor/rules"; + const l = o.lastIndexOf(a); + if (l !== -1) { + const c = o.substring(0, l + a.length); + const u = r.resource.with({ + path: c + }); + t.set(u.toString(), u); + } + } + } + } catch (s) { + console.error("[discoverRulesDirs] Error searching for cursor rules:", s); + } + return Array.from(t.values()); + } +}; +Yei = __decorate([__param(0, Ct), __param(1, kt), __param(2, Te), __param(3, aC), __param(4, re)], Yei); +it(G5, Yei, 1); +Hr(); +var Xei = { + typeName: "aiserver.v1.ExperimentService", + methods: { + specedits1: { + name: "Specedits1", + I: $yr, + O: Fyr, + kind: Ge.Unary + }, + simple: { + name: "Simple", + I: Oyr, + O: _yr, + kind: Ge.Unary + } + } +}; +Hr(); +Hr(); +Hr(); +var n9s = class gXe extends N { + constructor(e) { + super(); + this.name = ""; + this.port = 0; + this.visibility = { + case: undefined + }; + this.authentication = { + case: undefined + }; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "anyrun.v1.PortDefinition"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "name", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "port", + kind: "scalar", + T: 13 + }, { + no: 3, + name: "public", + kind: "message", + T: p1, + oneof: "visibility" + }, { + no: 4, + name: "private", + kind: "message", + T: p1, + oneof: "visibility" + }, { + no: 5, + name: "open", + kind: "message", + T: p1, + oneof: "authentication" + }, { + no: 6, + name: "token", + kind: "message", + T: p1, + oneof: "authentication" + }]); + } + static fromBinary(e, t) { + return new gXe().fromBinary(e, t); + } + static fromJson(e, t) { + return new gXe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new gXe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(gXe, e, t); + } +}; +var Qei = class pXe extends N { + constructor(e) { + super(); + this.name = ""; + this.command = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "anyrun.v1.DevContainerExecCommand"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "name", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "user", + kind: "scalar", + T: 9, + opt: true + }, { + no: 3, + name: "command", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new pXe().fromBinary(e, t); + } + static fromJson(e, t) { + return new pXe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new pXe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(pXe, e, t); + } +}; +var r9s = class mXe extends N { + constructor(e) { + super(); + this.cpuMcores = wd.zero; + this.memoryMb = wd.zero; + this.diskMb = wd.zero; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "anyrun.v1.ResourceRequests"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "cpu_mcores", + kind: "scalar", + T: 4 + }, { + no: 2, + name: "memory_mb", + kind: "scalar", + T: 4 + }, { + no: 3, + name: "disk_mb", + kind: "scalar", + T: 4 + }]); + } + static fromBinary(e, t) { + return new mXe().fromBinary(e, t); + } + static fromJson(e, t) { + return new mXe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new mXe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(mXe, e, t); + } +}; +var Lwr = class bXe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "anyrun.v1.ResourceLimits"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "cpu_mcores", + kind: "scalar", + T: 4, + opt: true + }, { + no: 2, + name: "memory_mb", + kind: "scalar", + T: 4, + opt: true + }]); + } + static fromBinary(e, t) { + return new bXe().fromBinary(e, t); + } + static fromJson(e, t) { + return new bXe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new bXe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(bXe, e, t); + } +}; +var Rwr = class vXe extends N { + constructor(e) { + super(); + this.cacheUri = ""; + this.checkoutUri = ""; + this.commitHash = new Uint8Array(0); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "anyrun.v1.GitRepoSourceReference"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "cache_uri", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "checkout_uri", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "commit_hash", + kind: "scalar", + T: 12 + }, { + no: 4, + name: "apply_patch", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new vXe().fromBinary(e, t); + } + static fromJson(e, t) { + return new vXe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new vXe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(vXe, e, t); + } +}; +var Nwr = class yXe extends N { + constructor(e) { + super(); + this.name = ""; + this.tarArchive = new Uint8Array(0); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "anyrun.v1.TarRepoSourceReference"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "name", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "tar_archive", + kind: "scalar", + T: 12 + }]); + } + static fromBinary(e, t) { + return new yXe().fromBinary(e, t); + } + static fromJson(e, t) { + return new yXe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new yXe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(yXe, e, t); + } +}; +var Mwr = class wXe extends N { + constructor(e) { + super(); + this.path = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "anyrun.v1.LocalDirectoryReference"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "path", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new wXe().fromBinary(e, t); + } + static fromJson(e, t) { + return new wXe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new wXe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(wXe, e, t); + } +}; +var Awr = class CXe extends N { + constructor(e) { + super(); + this.name = ""; + this.url = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "anyrun.v1.TarGzipUrlSourceReference"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "name", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "url", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new CXe().fromBinary(e, t); + } + static fromJson(e, t) { + return new CXe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new CXe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(CXe, e, t); + } +}; +var coa = class SXe extends N { + constructor(e) { + super(); + this.name = ""; + this.podLabels = {}; + this.nodeLabels = {}; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "anyrun.v1.DevContainerSpec"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 5, + name: "name", + kind: "scalar", + T: 9 + }, { + no: 6, + name: "deletion_timestamp", + kind: "scalar", + T: 4, + opt: true + }, { + no: 7, + name: "pod_labels", + kind: "map", + K: 9, + V: { + kind: "scalar", + T: 9 + } + }, { + no: 8, + name: "node_labels", + kind: "map", + K: 9, + V: { + kind: "scalar", + T: 9 + } + }, { + no: 9, + name: "requests", + kind: "message", + T: r9s + }, { + no: 10, + name: "limits", + kind: "message", + T: Lwr + }, { + no: 13, + name: "cache", + kind: "scalar", + T: 8, + opt: true + }, { + no: 12, + name: "config", + kind: "message", + T: Fwr + }]); + } + static fromBinary(e, t) { + return new SXe().fromBinary(e, t); + } + static fromJson(e, t) { + return new SXe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new SXe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(SXe, e, t); + } +}; +var $wr = class xXe extends N { + constructor(e) { + super(); + this.name = ""; + this.value = { + case: undefined + }; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "anyrun.v1.DevContainerEnv"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "name", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "inline", + kind: "scalar", + T: 9, + oneof: "value" + }, { + no: 3, + name: "encrypted", + kind: "scalar", + T: 9, + oneof: "value" + }]); + } + static fromBinary(e, t) { + return new xXe().fromBinary(e, t); + } + static fromJson(e, t) { + return new xXe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new xXe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(xXe, e, t); + } +}; +var Fwr = class kXe extends N { + constructor(e) { + super(); + this.source = { + case: undefined + }; + this.image = { + case: undefined + }; + this.workspacePath = ""; + this.prepareCommands = []; + this.installCommands = []; + this.startCommands = []; + this.ports = []; + this.env = []; + this.shell = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "anyrun.v1.DevContainerConfig"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "git", + kind: "message", + T: Rwr, + oneof: "source" + }, { + no: 2, + name: "tar", + kind: "message", + T: Nwr, + oneof: "source" + }, { + no: 15, + name: "local", + kind: "message", + T: Mwr, + oneof: "source" + }, { + no: 16, + name: "tar_gzip_url", + kind: "message", + T: Awr, + oneof: "source" + }, { + no: 3, + name: "cache_tag", + kind: "scalar", + T: 9, + opt: true + }, { + no: 4, + name: "registry_reference", + kind: "scalar", + T: 9, + oneof: "image" + }, { + no: 5, + name: "snapshot_id", + kind: "scalar", + T: 9, + oneof: "image" + }, { + no: 6, + name: "build", + kind: "message", + T: Owr, + oneof: "image" + }, { + no: 7, + name: "workspace_path", + kind: "scalar", + T: 9 + }, { + no: 8, + name: "prepare_commands", + kind: "message", + T: Qei, + repeated: true + }, { + no: 9, + name: "install_commands", + kind: "message", + T: Qei, + repeated: true + }, { + no: 10, + name: "start_commands", + kind: "message", + T: Qei, + repeated: true + }, { + no: 11, + name: "ports", + kind: "message", + T: n9s, + repeated: true + }, { + no: 12, + name: "user", + kind: "scalar", + T: 9, + opt: true + }, { + no: 13, + name: "env", + kind: "message", + T: $wr, + repeated: true + }, { + no: 14, + name: "shell", + kind: "scalar", + T: 9 + }, { + no: 17, + name: "privileged", + kind: "scalar", + T: 8, + opt: true + }]); + } + static fromBinary(e, t) { + return new kXe().fromBinary(e, t); + } + static fromJson(e, t) { + return new kXe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new kXe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(kXe, e, t); + } +}; +var Owr = class EXe extends N { + constructor(e) { + super(); + this.dockerfile = ""; + this.context = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "anyrun.v1.Build"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "dockerfile", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "context", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new EXe().fromBinary(e, t); + } + static fromJson(e, t) { + return new EXe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new EXe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(EXe, e, t); + } +}; +var Y0e; +(function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.CLONE = 1] = "CLONE"; + i[i.BUILD = 2] = "BUILD"; + i[i.POST_CREATE = 3] = "POST_CREATE"; + i[i.UPDATE_CONTENT = 4] = "UPDATE_CONTENT"; + i[i.POST_START = 5] = "POST_START"; +})(Y0e ||= {}); +m.util.setEnumType(Y0e, "anyrun.v1.PodCreatingPhase", [{ + no: 0, + name: "POD_CREATING_PHASE_UNSPECIFIED" +}, { + no: 1, + name: "POD_CREATING_PHASE_CLONE" +}, { + no: 2, + name: "POD_CREATING_PHASE_BUILD" +}, { + no: 3, + name: "POD_CREATING_PHASE_POST_CREATE" +}, { + no: 4, + name: "POD_CREATING_PHASE_UPDATE_CONTENT" +}, { + no: 5, + name: "POD_CREATING_PHASE_POST_START" +}]); +var _wr = class IXe extends N { + constructor(e) { + super(); + this.ports = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "anyrun.v1.PodPorts"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "ports", + kind: "message", + T: n9s, + repeated: true + }]); + } + static fromBinary(e, t) { + return new IXe().fromBinary(e, t); + } + static fromJson(e, t) { + return new IXe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new IXe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(IXe, e, t); + } +}; +var Bwr = class DXe extends N { + constructor(e) { + super(); + this.portName = ""; + this.containerPort = 0; + this.hostPort = 0; + this.visibility = { + case: undefined + }; + this.authentication = { + case: undefined + }; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "anyrun.v1.PortState"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "port_name", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "container_port", + kind: "scalar", + T: 13 + }, { + no: 3, + name: "host_port", + kind: "scalar", + T: 13 + }, { + no: 4, + name: "public", + kind: "message", + T: p1, + oneof: "visibility" + }, { + no: 5, + name: "private", + kind: "message", + T: p1, + oneof: "visibility" + }, { + no: 6, + name: "open", + kind: "message", + T: p1, + oneof: "authentication" + }, { + no: 7, + name: "token", + kind: "message", + T: p1, + oneof: "authentication" + }]); + } + static fromBinary(e, t) { + return new DXe().fromBinary(e, t); + } + static fromJson(e, t) { + return new DXe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new DXe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(DXe, e, t); + } +}; +var uoa = class TXe extends N { + constructor(e) { + super(); + this.ports = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "anyrun.v1.PodPortState"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "ports", + kind: "message", + T: Bwr, + repeated: true + }]); + } + static fromBinary(e, t) { + return new TXe().fromBinary(e, t); + } + static fromJson(e, t) { + return new TXe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new TXe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(TXe, e, t); + } +}; +var Zei = class PXe extends N { + constructor(e) { + super(); + this.status = { + case: undefined + }; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "anyrun.v1.PodStatus"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "creating", + kind: "message", + T: Wwr, + oneof: "status" + }, { + no: 2, + name: "running", + kind: "message", + T: Vwr, + oneof: "status" + }, { + no: 3, + name: "failed", + kind: "message", + T: Hwr, + oneof: "status" + }, { + no: 4, + name: "terminated", + kind: "message", + T: qwr, + oneof: "status" + }]); + } + static fromBinary(e, t) { + return new PXe().fromBinary(e, t); + } + static fromJson(e, t) { + return new PXe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new PXe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(PXe, e, t); + } +}; +var vbt = class LXe extends N { + constructor(e) { + super(); + this.tenantId = ""; + this.podId = ""; + this.resourceVersion = 0; + this.name = ""; + this.labels = {}; + this.creationTimestamp = wd.zero; + this.nodeId = ""; + this.networkToken = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "anyrun.v1.Pod"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "tenant_id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "pod_id", + kind: "scalar", + T: 9 + }, { + no: 9, + name: "resource_version", + kind: "scalar", + T: 13 + }, { + no: 10, + name: "name", + kind: "scalar", + T: 9 + }, { + no: 11, + name: "labels", + kind: "map", + K: 9, + V: { + kind: "scalar", + T: 9 + } + }, { + no: 12, + name: "creation_timestamp", + kind: "scalar", + T: 4 + }, { + no: 13, + name: "deletion_timestamp", + kind: "scalar", + T: 4, + opt: true + }, { + no: 4, + name: "resource_requests", + kind: "message", + T: r9s + }, { + no: 5, + name: "node_id", + kind: "scalar", + T: 9 + }, { + no: 7, + name: "network_token", + kind: "scalar", + T: 9 + }, { + no: 8, + name: "status", + kind: "message", + T: Zei + }, { + no: 6, + name: "ports", + kind: "message", + T: _wr + }]); + } + static fromBinary(e, t) { + return new LXe().fromBinary(e, t); + } + static fromJson(e, t) { + return new LXe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new LXe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(LXe, e, t); + } +}; +var Uwr = class RXe extends N { + constructor(e) { + super(); + this.items = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "anyrun.v1.PodCollection"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "items", + kind: "message", + T: vbt, + repeated: true + }]); + } + static fromBinary(e, t) { + return new RXe().fromBinary(e, t); + } + static fromJson(e, t) { + return new RXe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new RXe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(RXe, e, t); + } +}; +var doa = class NXe extends N { + constructor(e) { + super(); + this.update = { + case: undefined + }; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "anyrun.v1.PodUpdate"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "event_id", + kind: "scalar", + T: 9, + opt: true + }, { + no: 2, + name: "initial", + kind: "message", + T: Uwr, + oneof: "update" + }, { + no: 3, + name: "added", + kind: "message", + T: vbt, + oneof: "update" + }, { + no: 4, + name: "updated", + kind: "message", + T: vbt, + oneof: "update" + }, { + no: 5, + name: "removed", + kind: "message", + T: vbt, + oneof: "update" + }]); + } + static fromBinary(e, t) { + return new NXe().fromBinary(e, t); + } + static fromJson(e, t) { + return new NXe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new NXe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(NXe, e, t); + } +}; +var hoa = class MXe extends N { + constructor(e) { + super(); + this.podId = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "anyrun.v1.PodFilter"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "pod_id", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new MXe().fromBinary(e, t); + } + static fromJson(e, t) { + return new MXe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new MXe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(MXe, e, t); + } +}; +var Wwr = class AXe extends N { + constructor(e) { + super(); + this.phase = Y0e.UNSPECIFIED; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "anyrun.v1.PodCreatingStatus"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "phase", + kind: "enum", + T: m.getEnumType(Y0e) + }]); + } + static fromBinary(e, t) { + return new AXe().fromBinary(e, t); + } + static fromJson(e, t) { + return new AXe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new AXe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(AXe, e, t); + } +}; +var Vwr = class $Xe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "anyrun.v1.PodRunningStatus"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new $Xe().fromBinary(e, t); + } + static fromJson(e, t) { + return new $Xe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new $Xe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals($Xe, e, t); + } +}; +var Hwr = class FXe extends N { + constructor(e) { + super(); + this.reason = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "anyrun.v1.PodFailedStatus"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "reason", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new FXe().fromBinary(e, t); + } + static fromJson(e, t) { + return new FXe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new FXe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(FXe, e, t); + } +}; +var qwr = class OXe extends N { + constructor(e) { + super(); + this.reason = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "anyrun.v1.PodTerminatedStatus"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "reason", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "exit_code", + kind: "scalar", + T: 13, + opt: true + }]); + } + static fromBinary(e, t) { + return new OXe().fromBinary(e, t); + } + static fromJson(e, t) { + return new OXe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new OXe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(OXe, e, t); + } +}; +Hr(); +var o9s = class _Xe extends N { + constructor(e) { + super(); + this.payload = { + case: undefined + }; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "anyrun.v1.PodEvent"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 26, + name: "error", + kind: "message", + T: jwr, + oneof: "payload" + }, { + no: 1, + name: "debug_event", + kind: "scalar", + T: 9, + oneof: "payload" + }, { + no: 31, + name: "clone_started", + kind: "message", + T: p1, + oneof: "payload" + }, { + no: 32, + name: "clone_completed", + kind: "message", + T: p1, + oneof: "payload" + }, { + no: 33, + name: "checkout_started", + kind: "message", + T: p1, + oneof: "payload" + }, { + no: 34, + name: "checkout_completed", + kind: "message", + T: p1, + oneof: "payload" + }, { + no: 2, + name: "build_started", + kind: "scalar", + T: 9, + oneof: "payload" + }, { + no: 3, + name: "build_status_message", + kind: "scalar", + T: 9, + oneof: "payload" + }, { + no: 27, + name: "build_step_started", + kind: "message", + T: zwr, + oneof: "payload" + }, { + no: 28, + name: "build_status_line", + kind: "message", + T: Jwr, + oneof: "payload" + }, { + no: 29, + name: "internal_build_message", + kind: "message", + T: Gwr, + oneof: "payload" + }, { + no: 30, + name: "build_exit_code", + kind: "scalar", + T: 5, + oneof: "payload" + }, { + no: 14, + name: "prepare_stdout", + kind: "scalar", + T: 9, + oneof: "payload" + }, { + no: 15, + name: "prepare_stderr", + kind: "scalar", + T: 9, + oneof: "payload" + }, { + no: 16, + name: "prepare_exit_code", + kind: "scalar", + T: 3, + oneof: "payload" + }, { + no: 17, + name: "install_stdout", + kind: "scalar", + T: 9, + oneof: "payload" + }, { + no: 18, + name: "install_stderr", + kind: "scalar", + T: 9, + oneof: "payload" + }, { + no: 19, + name: "install_exit_code", + kind: "scalar", + T: 3, + oneof: "payload" + }, { + no: 6, + name: "start_stdout", + kind: "scalar", + T: 9, + oneof: "payload" + }, { + no: 7, + name: "start_stderr", + kind: "scalar", + T: 9, + oneof: "payload" + }, { + no: 8, + name: "start_exit_code", + kind: "scalar", + T: 3, + oneof: "payload" + }, { + no: 20, + name: "extension_install_stdout", + kind: "message", + T: ybt, + oneof: "payload" + }, { + no: 21, + name: "extension_install_stderr", + kind: "message", + T: ybt, + oneof: "payload" + }, { + no: 22, + name: "extension_install_exit_code", + kind: "message", + T: a9s, + oneof: "payload" + }, { + no: 35, + name: "snapshot_started", + kind: "message", + T: p1, + oneof: "payload" + }, { + no: 36, + name: "snapshot_completed", + kind: "message", + T: p1, + oneof: "payload" + }, { + no: 9, + name: "creation_completed", + kind: "message", + T: p1, + oneof: "payload" + }, { + no: 10, + name: "post_start_stdout", + kind: "scalar", + T: 9, + oneof: "payload" + }, { + no: 11, + name: "post_start_stderr", + kind: "scalar", + T: 9, + oneof: "payload" + }, { + no: 12, + name: "post_start_exit_code", + kind: "scalar", + T: 3, + oneof: "payload" + }, { + no: 23, + name: "extension_start_stdout", + kind: "message", + T: ybt, + oneof: "payload" + }, { + no: 24, + name: "extension_start_stderr", + kind: "message", + T: ybt, + oneof: "payload" + }, { + no: 25, + name: "extension_start_exit_code", + kind: "message", + T: a9s, + oneof: "payload" + }, { + no: 13, + name: "startup_completed", + kind: "message", + T: p1, + oneof: "payload" + }, { + no: 37, + name: "image_pull_started", + kind: "message", + T: Kwr, + oneof: "payload" + }, { + no: 38, + name: "image_pull_layer_update", + kind: "message", + T: Ywr, + oneof: "payload" + }, { + no: 39, + name: "image_pull_status_update", + kind: "message", + T: Xwr, + oneof: "payload" + }, { + no: 40, + name: "image_pull_completed", + kind: "message", + T: Qwr, + oneof: "payload" + }]); + } + static fromBinary(e, t) { + return new _Xe().fromBinary(e, t); + } + static fromJson(e, t) { + return new _Xe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new _Xe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(_Xe, e, t); + } +}; +var jwr = class BXe extends N { + constructor(e) { + super(); + this.errorMessage = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "anyrun.v1.PodErrorEvent"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "error_message", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new BXe().fromBinary(e, t); + } + static fromJson(e, t) { + return new BXe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new BXe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(BXe, e, t); + } +}; +var ybt = class UXe extends N { + constructor(e) { + super(); + this.featureId = ""; + this.output = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "anyrun.v1.FeatureOutput"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "feature_id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "output", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new UXe().fromBinary(e, t); + } + static fromJson(e, t) { + return new UXe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new UXe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(UXe, e, t); + } +}; +var a9s = class WXe extends N { + constructor(e) { + super(); + this.featureId = ""; + this.exitCode = wd.zero; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "anyrun.v1.FeatureExitCode"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "feature_id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "exit_code", + kind: "scalar", + T: 3 + }]); + } + static fromBinary(e, t) { + return new WXe().fromBinary(e, t); + } + static fromJson(e, t) { + return new WXe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new WXe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(WXe, e, t); + } +}; +var zwr = class VXe extends N { + constructor(e) { + super(); + this.streamId = 0; + this.step = 0; + this.totalSteps = 0; + this.command = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "anyrun.v1.BuildStepStarted"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "stream_id", + kind: "scalar", + T: 13 + }, { + no: 2, + name: "step", + kind: "scalar", + T: 13 + }, { + no: 3, + name: "total_steps", + kind: "scalar", + T: 13 + }, { + no: 4, + name: "command", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new VXe().fromBinary(e, t); + } + static fromJson(e, t) { + return new VXe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new VXe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(VXe, e, t); + } +}; +var Jwr = class HXe extends N { + constructor(e) { + super(); + this.streamId = 0; + this.timestamp = ""; + this.content = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "anyrun.v1.BuildStatusLine"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "stream_id", + kind: "scalar", + T: 13 + }, { + no: 2, + name: "timestamp", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "content", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new HXe().fromBinary(e, t); + } + static fromJson(e, t) { + return new HXe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new HXe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(HXe, e, t); + } +}; +var Gwr = class qXe extends N { + constructor(e) { + super(); + this.streamId = 0; + this.content = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "anyrun.v1.InternalBuildMessage"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "stream_id", + kind: "scalar", + T: 13 + }, { + no: 2, + name: "content", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new qXe().fromBinary(e, t); + } + static fromJson(e, t) { + return new qXe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new qXe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(qXe, e, t); + } +}; +var Kwr = class jXe extends N { + constructor(e) { + super(); + this.imageName = ""; + this.pullId = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "anyrun.v1.ImagePullStarted"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "image_name", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "pull_id", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new jXe().fromBinary(e, t); + } + static fromJson(e, t) { + return new jXe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new jXe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(jXe, e, t); + } +}; +var Ywr = class zXe extends N { + constructor(e) { + super(); + this.imageName = ""; + this.pullId = ""; + this.layerId = ""; + this.status = { + case: undefined + }; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "anyrun.v1.ImagePullLayerUpdate"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "image_name", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "pull_id", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "layer_id", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "pulling_fs_layer", + kind: "scalar", + T: 8, + oneof: "status" + }, { + no: 5, + name: "waiting", + kind: "scalar", + T: 8, + oneof: "status" + }, { + no: 6, + name: "verifying_checksum", + kind: "scalar", + T: 8, + oneof: "status" + }, { + no: 7, + name: "download_complete", + kind: "scalar", + T: 8, + oneof: "status" + }, { + no: 8, + name: "pull_complete", + kind: "scalar", + T: 8, + oneof: "status" + }, { + no: 9, + name: "downloading", + kind: "message", + T: l9s, + oneof: "status" + }, { + no: 10, + name: "extracting", + kind: "message", + T: l9s, + oneof: "status" + }, { + no: 11, + name: "other", + kind: "scalar", + T: 9, + oneof: "status" + }]); + } + static fromBinary(e, t) { + return new zXe().fromBinary(e, t); + } + static fromJson(e, t) { + return new zXe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new zXe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(zXe, e, t); + } +}; +var l9s = class JXe extends N { + constructor(e) { + super(); + this.current = wd.zero; + this.total = wd.zero; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "anyrun.v1.ProgressDetail"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "current", + kind: "scalar", + T: 4 + }, { + no: 2, + name: "total", + kind: "scalar", + T: 4 + }]); + } + static fromBinary(e, t) { + return new JXe().fromBinary(e, t); + } + static fromJson(e, t) { + return new JXe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new JXe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(JXe, e, t); + } +}; +var Xwr = class GXe extends N { + constructor(e) { + super(); + this.imageName = ""; + this.pullId = ""; + this.status = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "anyrun.v1.ImagePullStatusUpdate"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "image_name", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "pull_id", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "status", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new GXe().fromBinary(e, t); + } + static fromJson(e, t) { + return new GXe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new GXe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(GXe, e, t); + } +}; +var Qwr = class KXe extends N { + constructor(e) { + super(); + this.imageName = ""; + this.pullId = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "anyrun.v1.ImagePullCompleted"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "image_name", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "pull_id", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new KXe().fromBinary(e, t); + } + static fromJson(e, t) { + return new KXe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new KXe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(KXe, e, t); + } +}; +Wo(); +Lc(); +jl(); +cS(); +var Mo; +(function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.RUNNING = 1] = "RUNNING"; + i[i.FINISHED = 2] = "FINISHED"; + i[i.ERROR = 3] = "ERROR"; + i[i.CREATING = 4] = "CREATING"; +})(Mo ||= {}); +m.util.setEnumType(Mo, "aiserver.v1.BackgroundComposerStatus", [{ + no: 0, + name: "BACKGROUND_COMPOSER_STATUS_UNSPECIFIED" +}, { + no: 1, + name: "BACKGROUND_COMPOSER_STATUS_RUNNING" +}, { + no: 2, + name: "BACKGROUND_COMPOSER_STATUS_FINISHED" +}, { + no: 3, + name: "BACKGROUND_COMPOSER_STATUS_ERROR" +}, { + no: 4, + name: "BACKGROUND_COMPOSER_STATUS_CREATING" +}]); +var Zwr = class YXe extends N { + constructor(e) { + super(); + this.bcId = ""; + this.newName = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RenameBackgroundComposerRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "bc_id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "new_name", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new YXe().fromBinary(e, t); + } + static fromJson(e, t) { + return new YXe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new YXe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(YXe, e, t); + } +}; +var e0r = class XXe extends N { + constructor(e) { + super(); + this.name = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RenameBackgroundComposerResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "name", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new XXe().fromBinary(e, t); + } + static fromJson(e, t) { + return new XXe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new XXe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(XXe, e, t); + } +}; +var t0r = class QXe extends N { + constructor(e) { + super(); + this.bcId = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RefreshGithubAccessTokenInBackgroundComposerRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "bc_id", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new QXe().fromBinary(e, t); + } + static fromJson(e, t) { + return new QXe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new QXe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(QXe, e, t); + } +}; +var i0r = class ZXe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.RefreshGithubAccessTokenInBackgroundComposerResponse"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new ZXe().fromBinary(e, t); + } + static fromJson(e, t) { + return new ZXe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new ZXe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(ZXe, e, t); + } +}; +var s0r = class eQe extends N { + constructor(e) { + super(); + this.text = ""; + this.richText = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.BackgroundComposerFollowupContent"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "text", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "rich_text", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new eQe().fromBinary(e, t); + } + static fromJson(e, t) { + return new eQe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new eQe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(eQe, e, t); + } +}; +var n0r = class tQe extends N { + constructor(e) { + super(); + this.includeSecrets = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CreateBackgroundComposerPodRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "devcontainer_starting_point", + kind: "message", + T: iti + }, { + no: 2, + name: "include_secrets", + kind: "scalar", + T: 8 + }, { + no: 3, + name: "force_cluster", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new tQe().fromBinary(e, t); + } + static fromJson(e, t) { + return new tQe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new tQe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(tQe, e, t); + } +}; +var r0r = class iQe extends N { + constructor(e) { + super(); + this.podId = ""; + this.workspaceRootPath = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CreateBackgroundComposerPodResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "pod_id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "workspace_root_path", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new iQe().fromBinary(e, t); + } + static fromJson(e, t) { + return new iQe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new iQe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(iQe, e, t); + } +}; +var o0r = class sQe extends N { + constructor(e) { + super(); + this.podId = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.AttachBackgroundComposerPodRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "pod_id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "last_event_id", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new sQe().fromBinary(e, t); + } + static fromJson(e, t) { + return new sQe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new sQe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(sQe, e, t); + } +}; +var a0r = class nQe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.AttachBackgroundComposerPodResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "event", + kind: "message", + T: l0r + }, { + no: 2, + name: "updated_status", + kind: "message", + T: Zei + }]); + } + static fromBinary(e, t) { + return new nQe().fromBinary(e, t); + } + static fromJson(e, t) { + return new nQe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new nQe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(nQe, e, t); + } +}; +var l0r = class rQe extends N { + constructor(e) { + super(); + this.eventId = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.AttachBackgroundComposerPodResponse.Event"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "event_id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "event", + kind: "message", + T: o9s + }]); + } + static fromBinary(e, t) { + return new rQe().fromBinary(e, t); + } + static fromJson(e, t) { + return new rQe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new rQe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(rQe, e, t); + } +}; +var c0r = class oQe extends N { + constructor(e) { + super(); + this.podId = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CreateBackgroundComposerPodSnapshotRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "pod_id", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new oQe().fromBinary(e, t); + } + static fromJson(e, t) { + return new oQe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new oQe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(oQe, e, t); + } +}; +var u0r = class aQe extends N { + constructor(e) { + super(); + this.snapshotId = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CreateBackgroundComposerPodSnapshotResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "snapshot_id", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new aQe().fromBinary(e, t); + } + static fromJson(e, t) { + return new aQe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new aQe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(aQe, e, t); + } +}; +var d0r = class lQe extends N { + constructor(e) { + super(); + this.snapshotId = ""; + this.visibility = X0e.UNSPECIFIED; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ChangeBackgroundComposerSnapshotVisibilityRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "snapshot_id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "visibility", + kind: "enum", + T: m.getEnumType(X0e) + }]); + } + static fromBinary(e, t) { + return new lQe().fromBinary(e, t); + } + static fromJson(e, t) { + return new lQe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new lQe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(lQe, e, t); + } +}; +var X0e; +(function (i) { + i[i.UNSPECIFIED = 0] = "UNSPECIFIED"; + i[i.USER = 1] = "USER"; + i[i.REPO_READ_WRITE = 2] = "REPO_READ_WRITE"; + i[i.PUBLIC = 4] = "PUBLIC"; +})(X0e ||= {}); +m.util.setEnumType(X0e, "aiserver.v1.ChangeBackgroundComposerSnapshotVisibilityRequest.Visibility", [{ + no: 0, + name: "VISIBILITY_UNSPECIFIED" +}, { + no: 1, + name: "VISIBILITY_USER" +}, { + no: 2, + name: "VISIBILITY_REPO_READ_WRITE" +}, { + no: 4, + name: "VISIBILITY_PUBLIC" +}]); +var h0r = class cQe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ChangeBackgroundComposerSnapshotVisibilityResponse"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new cQe().fromBinary(e, t); + } + static fromJson(e, t) { + return new cQe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new cQe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(cQe, e, t); + } +}; +var f0r = class uQe extends N { + constructor(e) { + super(); + this.bcId = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetBackgroundComposerChangesHashRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "bc_id", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new uQe().fromBinary(e, t); + } + static fromJson(e, t) { + return new uQe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new uQe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(uQe, e, t); + } +}; +var g0r = class dQe extends N { + constructor(e) { + super(); + this.hash = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetBackgroundComposerChangesHashResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "hash", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new dQe().fromBinary(e, t); + } + static fromJson(e, t) { + return new dQe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new dQe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(dQe, e, t); + } +}; +var c9s = class hQe extends N { + constructor(e) { + super(); + this.bcId = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetBackgroundComposerDiffDetailsRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "bc_id", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new hQe().fromBinary(e, t); + } + static fromJson(e, t) { + return new hQe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new hQe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(hQe, e, t); + } +}; +var p0r = class fQe extends N { + constructor(e) { + super(); + this.path = ""; + this.originalContent = ""; + this.modifiedContent = ""; + this.fullPath = ""; + this.baseRef = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.BackgroundComposerFullDiff"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "original_content", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "modified_content", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "submodule_path", + kind: "scalar", + T: 9, + opt: true + }, { + no: 5, + name: "git_diff", + kind: "message", + T: Sb + }, { + no: 6, + name: "full_path", + kind: "scalar", + T: 9 + }, { + no: 7, + name: "base_ref", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new fQe().fromBinary(e, t); + } + static fromJson(e, t) { + return new fQe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new fQe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(fQe, e, t); + } +}; +var m0r = class gQe extends N { + constructor(e) { + super(); + this.branchName = ""; + this.baseBranch = ""; + this.diffs = []; + this.gitDiffs = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetBackgroundComposerDiffDetailsResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "branch_name", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "base_branch", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "diffs", + kind: "message", + T: p0r, + repeated: true + }, { + no: 4, + name: "git_diffs", + kind: "message", + T: Sb, + repeated: true + }]); + } + static fromBinary(e, t) { + return new gQe().fromBinary(e, t); + } + static fromJson(e, t) { + return new gQe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new gQe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(gQe, e, t); + } +}; +var u9s = class pQe extends N { + constructor(e) { + super(); + this.includeTeamWide = false; + this.includeDiff = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ListDetailedBackgroundComposersRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "include_team_wide", + kind: "scalar", + T: 8 + }, { + no: 2, + name: "bc_id", + kind: "scalar", + T: 9, + opt: true + }, { + no: 3, + name: "n", + kind: "scalar", + T: 5, + opt: true + }, { + no: 4, + name: "include_diff", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new pQe().fromBinary(e, t); + } + static fromJson(e, t) { + return new pQe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new pQe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(pQe, e, t); + } +}; +var b0r = class mQe extends N { + constructor(e) { + super(); + this.composers = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ListDetailedBackgroundComposersResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "composers", + kind: "message", + T: g9s, + repeated: true + }]); + } + static fromBinary(e, t) { + return new mQe().fromBinary(e, t); + } + static fromJson(e, t) { + return new mQe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new mQe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(mQe, e, t); + } +}; +var v0r = class bQe extends N { + constructor(e) { + super(); + this.bcId = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.PauseBackgroundComposerRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "bc_id", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new bQe().fromBinary(e, t); + } + static fromJson(e, t) { + return new bQe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new bQe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(bQe, e, t); + } +}; +var y0r = class vQe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.PauseBackgroundComposerResponse"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new vQe().fromBinary(e, t); + } + static fromJson(e, t) { + return new vQe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new vQe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(vQe, e, t); + } +}; +var w0r = class yQe extends N { + constructor(e) { + super(); + this.bcId = ""; + this.unarchive = false; + this.onlyNotifyRunner = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ArchiveBackgroundComposerRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "bc_id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "unarchive", + kind: "scalar", + T: 8 + }, { + no: 3, + name: "only_notify_runner", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new yQe().fromBinary(e, t); + } + static fromJson(e, t) { + return new yQe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new yQe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(yQe, e, t); + } +}; +var C0r = class wQe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ArchiveBackgroundComposerResponse"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new wQe().fromBinary(e, t); + } + static fromJson(e, t) { + return new wQe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new wQe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(wQe, e, t); + } +}; +var S0r = class CQe extends N { + constructor(e) { + super(); + this.bcId = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ResumeBackgroundComposerRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "bc_id", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new CQe().fromBinary(e, t); + } + static fromJson(e, t) { + return new CQe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new CQe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(CQe, e, t); + } +}; +var x0r = class SQe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ResumeBackgroundComposerResponse"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new SQe().fromBinary(e, t); + } + static fromJson(e, t) { + return new SQe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new SQe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(SQe, e, t); + } +}; +var d9s = class xQe extends N { + constructor(e) { + super(); + this.bcId = ""; + this.commit = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetCursorServerUrlRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "bc_id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "commit", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new xQe().fromBinary(e, t); + } + static fromJson(e, t) { + return new xQe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new xQe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(xQe, e, t); + } +}; +var k0r = class kQe extends N { + constructor(e) { + super(); + this.host = ""; + this.port = 0; + this.connectionToken = ""; + this.headers = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetCursorServerUrlResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "host", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "port", + kind: "scalar", + T: 5 + }, { + no: 3, + name: "connection_token", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "headers", + kind: "message", + T: E0r, + repeated: true + }]); + } + static fromBinary(e, t) { + return new kQe().fromBinary(e, t); + } + static fromJson(e, t) { + return new kQe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new kQe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(kQe, e, t); + } +}; +var E0r = class EQe extends N { + constructor(e) { + super(); + this.key = ""; + this.value = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetCursorServerUrlResponse.Header"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "key", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "value", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new EQe().fromBinary(e, t); + } + static fromJson(e, t) { + return new EQe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new EQe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(EQe, e, t); + } +}; +var I0r = class IQe extends N { + constructor(e) { + super(); + this.request = { + case: undefined + }; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ProxyCursorServerSocketRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "control", + kind: "message", + T: D0r, + oneof: "request" + }, { + no: 2, + name: "data", + kind: "message", + T: T0r, + oneof: "request" + }]); + } + static fromBinary(e, t) { + return new IQe().fromBinary(e, t); + } + static fromJson(e, t) { + return new IQe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new IQe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(IQe, e, t); + } +}; +var D0r = class DQe extends N { + constructor(e) { + super(); + this.bcId = ""; + this.commit = ""; + this.clientConnectionToken = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ProxyCursorServerSocketRequest.Control"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "bc_id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "commit", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "client_connection_token", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new DQe().fromBinary(e, t); + } + static fromJson(e, t) { + return new DQe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new DQe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(DQe, e, t); + } +}; +var T0r = class TQe extends N { + constructor(e) { + super(); + this.data = new Uint8Array(0); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ProxyCursorServerSocketRequest.Data"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "data", + kind: "scalar", + T: 12 + }]); + } + static fromBinary(e, t) { + return new TQe().fromBinary(e, t); + } + static fromJson(e, t) { + return new TQe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new TQe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(TQe, e, t); + } +}; +var P0r = class PQe extends N { + constructor(e) { + super(); + this.response = { + case: undefined + }; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ProxyCursorServerSocketResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "control", + kind: "message", + T: L0r, + oneof: "response" + }, { + no: 2, + name: "data", + kind: "message", + T: R0r, + oneof: "response" + }]); + } + static fromBinary(e, t) { + return new PQe().fromBinary(e, t); + } + static fromJson(e, t) { + return new PQe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new PQe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(PQe, e, t); + } +}; +var L0r = class LQe extends N { + constructor(e) { + super(); + this.setupDone = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ProxyCursorServerSocketResponse.Control"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "setup_done", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new LQe().fromBinary(e, t); + } + static fromJson(e, t) { + return new LQe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new LQe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(LQe, e, t); + } +}; +var R0r = class RQe extends N { + constructor(e) { + super(); + this.data = new Uint8Array(0); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ProxyCursorServerSocketResponse.Data"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "data", + kind: "scalar", + T: 12 + }]); + } + static fromBinary(e, t) { + return new RQe().fromBinary(e, t); + } + static fromJson(e, t) { + return new RQe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new RQe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(RQe, e, t); + } +}; +var N0r = class NQe extends N { + constructor(e) { + super(); + this.bcId = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.MakePRBackgroundComposerRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "bc_id", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new NQe().fromBinary(e, t); + } + static fromJson(e, t) { + return new NQe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new NQe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(NQe, e, t); + } +}; +var M0r = class MQe extends N { + constructor(e) { + super(); + this.prUrl = ""; + this.branchName = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.MakePRBackgroundComposerResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "pr_url", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "branch_name", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new MQe().fromBinary(e, t); + } + static fromJson(e, t) { + return new MQe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new MQe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(MQe, e, t); + } +}; +var eti = class AQe extends N { + constructor(e) { + super(); + this.n = 0; + this.includeTeamWide = false; + this.additionalRepoUrls = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ListBackgroundComposersRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "n", + kind: "scalar", + T: 5 + }, { + no: 2, + name: "include_team_wide", + kind: "scalar", + T: 8 + }, { + no: 3, + name: "bc_id", + kind: "scalar", + T: 9, + opt: true + }, { + no: 4, + name: "preferred_repo_url", + kind: "scalar", + T: 9, + opt: true + }, { + no: 5, + name: "additional_repo_urls", + kind: "scalar", + T: 9, + repeated: true + }]); + } + static fromBinary(e, t) { + return new AQe().fromBinary(e, t); + } + static fromJson(e, t) { + return new AQe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new AQe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(AQe, e, t); + } +}; +var tti = class $Qe extends N { + constructor(e) { + super(); + this.bcId = ""; + this.createdAtMs = 0; + this.workspaceRootPath = ""; + this.isOwnedByDifferentTeamMember = false; + this.name = ""; + this.branchName = ""; + this.hasStartedVm = false; + this.repoUrl = ""; + this.isArchived = false; + this.nId = ""; + this.isKilled = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.BackgroundComposer"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "bc_id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "created_at_ms", + kind: "scalar", + T: 1 + }, { + no: 3, + name: "workspace_root_path", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "is_owned_by_different_team_member", + kind: "scalar", + T: 8 + }, { + no: 5, + name: "name", + kind: "scalar", + T: 9 + }, { + no: 6, + name: "branch_name", + kind: "scalar", + T: 9 + }, { + no: 7, + name: "has_started_vm", + kind: "scalar", + T: 8 + }, { + no: 8, + name: "repo_url", + kind: "scalar", + T: 9 + }, { + no: 9, + name: "is_archived", + kind: "scalar", + T: 8 + }, { + no: 10, + name: "n_id", + kind: "scalar", + T: 9 + }, { + no: 11, + name: "is_killed", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new $Qe().fromBinary(e, t); + } + static fromJson(e, t) { + return new $Qe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new $Qe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals($Qe, e, t); + } +}; +var A0r = class FQe extends N { + constructor(e) { + super(); + this.composers = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.ListBackgroundComposersResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "composers", + kind: "message", + T: tti, + repeated: true + }]); + } + static fromBinary(e, t) { + return new FQe().fromBinary(e, t); + } + static fromJson(e, t) { + return new FQe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new FQe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(FQe, e, t); + } +}; +var iti = class OQe extends N { + constructor(e) { + super(); + this.url = ""; + this.ref = ""; + this.userExtensions = []; + this.cursorServerCommit = ""; + this.environmentJsonOverride = ""; + this.dontAllowReadingEnvironmentJsonFromDatabase = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.DevcontainerStartingPoint"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "url", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "ref", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "user_extensions", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 5, + name: "cursor_server_commit", + kind: "scalar", + T: 9 + }, { + no: 6, + name: "environment_json_override", + kind: "scalar", + T: 9 + }, { + no: 8, + name: "git_diff_to_apply", + kind: "message", + T: Sb + }, { + no: 9, + name: "dont_allow_reading_environment_json_from_database", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new OQe().fromBinary(e, t); + } + static fromJson(e, t) { + return new OQe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new OQe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(OQe, e, t); + } +}; +var $0r = class _Qe extends N { + constructor(e) { + super(); + this.snapshotNameOrId = ""; + this.prompt = ""; + this.richPrompt = ""; + this.files = []; + this.additionalModelDetails = []; + this.snapshotWorkspaceRootPath = ""; + this.startForAuthIdOnTeam = ""; + this.autoBranch = false; + this.returnImmediately = false; + this.images = []; + this.conversationHistory = []; + this.documentationIdentifiers = []; + this.externalLinks = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StartBackgroundComposerFromSnapshotRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "snapshot_name_or_id", + kind: "scalar", + T: 9 + }, { + no: 11, + name: "devcontainer_starting_point", + kind: "message", + T: iti + }, { + no: 2, + name: "prompt", + kind: "scalar", + T: 9 + }, { + no: 17, + name: "rich_prompt", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "files", + kind: "message", + T: F0r, + repeated: true + }, { + no: 4, + name: "model_details", + kind: "message", + T: Qa + }, { + no: 16, + name: "additional_model_details", + kind: "message", + T: Qa, + repeated: true + }, { + no: 5, + name: "repository_info", + kind: "message", + T: J0r + }, { + no: 6, + name: "snapshot_workspace_root_path", + kind: "scalar", + T: 9 + }, { + no: 7, + name: "config", + kind: "message", + T: h9s + }, { + no: 8, + name: "start_for_auth_id_on_team", + kind: "scalar", + T: 9 + }, { + no: 9, + name: "auto_branch", + kind: "scalar", + T: 8 + }, { + no: 10, + name: "return_immediately", + kind: "scalar", + T: 8 + }, { + no: 12, + name: "force_vm_backend", + kind: "scalar", + T: 9, + opt: true + }, { + no: 15, + name: "force_cluster", + kind: "scalar", + T: 9, + opt: true + }, { + no: 13, + name: "images", + kind: "message", + T: tD, + repeated: true + }, { + no: 14, + name: "repo_url", + kind: "scalar", + T: 9, + opt: true + }, { + no: 18, + name: "conversation_history", + kind: "message", + T: Al, + repeated: true + }, { + no: 19, + name: "documentation_identifiers", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 20, + name: "use_web", + kind: "scalar", + T: 8, + opt: true + }, { + no: 21, + name: "external_links", + kind: "message", + T: Oz, + repeated: true + }]); + } + static fromBinary(e, t) { + return new _Qe().fromBinary(e, t); + } + static fromJson(e, t) { + return new _Qe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new _Qe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(_Qe, e, t); + } +}; +var F0r = class BQe extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + this.contents = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StartBackgroundComposerFromSnapshotRequest.File"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "contents", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new BQe().fromBinary(e, t); + } + static fromJson(e, t) { + return new BQe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new BQe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(BQe, e, t); + } +}; +var O0r = class UQe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.StartBackgroundComposerFromSnapshotResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "composer", + kind: "message", + T: tti + }]); + } + static fromBinary(e, t) { + return new UQe().fromBinary(e, t); + } + static fromJson(e, t) { + return new UQe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new UQe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(UQe, e, t); + } +}; +var _0r = class WQe extends N { + constructor(e) { + super(); + this.bcId = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.AttachBackgroundComposerLogsRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "bc_id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "last_event_id", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new WQe().fromBinary(e, t); + } + static fromJson(e, t) { + return new WQe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new WQe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(WQe, e, t); + } +}; +var B0r = class VQe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.AttachBackgroundComposerLogsResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "event", + kind: "message", + T: U0r + }, { + no: 2, + name: "updated_status", + kind: "message", + T: Zei + }, { + no: 3, + name: "start_error", + kind: "message", + T: QM + }]); + } + static fromBinary(e, t) { + return new VQe().fromBinary(e, t); + } + static fromJson(e, t) { + return new VQe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new VQe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(VQe, e, t); + } +}; +var U0r = class HQe extends N { + constructor(e) { + super(); + this.eventId = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.AttachBackgroundComposerLogsResponse.Event"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "event_id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "event", + kind: "message", + T: o9s + }]); + } + static fromBinary(e, t) { + return new HQe().fromBinary(e, t); + } + static fromJson(e, t) { + return new HQe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new HQe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(HQe, e, t); + } +}; +var W0r = class qQe extends N { + constructor(e) { + super(); + this.bcId = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.AttachBackgroundComposerRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "bc_id", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new qQe().fromBinary(e, t); + } + static fromJson(e, t) { + return new qQe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new qQe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(qQe, e, t); + } +}; +var V0r = class jQe extends N { + constructor(e) { + super(); + this.startingCommit = ""; + this.baseBranch = ""; + this.statusUpdate = Mo.UNSPECIFIED; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.AttachBackgroundComposerResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "headless_agentic_composer_response", + kind: "message", + T: H0r + }, { + no: 2, + name: "prompt", + kind: "message", + T: wbt + }, { + no: 3, + name: "diff_since_start", + kind: "message", + T: Sb + }, { + no: 4, + name: "starting_commit", + kind: "scalar", + T: 9 + }, { + no: 5, + name: "base_branch", + kind: "scalar", + T: 9 + }, { + no: 6, + name: "status_update", + kind: "enum", + T: m.getEnumType(Mo) + }]); + } + static fromBinary(e, t) { + return new jQe().fromBinary(e, t); + } + static fromJson(e, t) { + return new jQe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new jQe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(jQe, e, t); + } +}; +var H0r = class zQe extends N { + constructor(e) { + super(); + this.text = ""; + this.isMessageDone = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.HeadlessAgenticComposerResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "text", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "tool_call", + kind: "message", + T: Hz, + opt: true + }, { + no: 3, + name: "final_tool_result", + kind: "message", + T: j0r, + opt: true + }, { + no: 6, + name: "streamed_back_tool_call", + kind: "message", + T: YHt, + opt: true + }, { + no: 4, + name: "user_message", + kind: "message", + T: q0r + }, { + no: 5, + name: "is_message_done", + kind: "scalar", + T: 8 + }, { + no: 7, + name: "error", + kind: "message", + T: z0r, + opt: true + }, { + no: 8, + name: "human_message", + kind: "message", + T: Al + }]); + } + static fromBinary(e, t) { + return new zQe().fromBinary(e, t); + } + static fromJson(e, t) { + return new zQe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new zQe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(zQe, e, t); + } +}; +var q0r = class JQe extends N { + constructor(e) { + super(); + this.text = ""; + this.richText = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.HeadlessAgenticComposerResponse.UserMessage"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "text", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "rich_text", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new JQe().fromBinary(e, t); + } + static fromJson(e, t) { + return new JQe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new JQe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(JQe, e, t); + } +}; +var j0r = class GQe extends N { + constructor(e) { + super(); + this.toolCallId = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.HeadlessAgenticComposerResponse.FinalToolResult"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "tool_call_id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "result", + kind: "message", + T: Zl + }]); + } + static fromBinary(e, t) { + return new GQe().fromBinary(e, t); + } + static fromJson(e, t) { + return new GQe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new GQe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(GQe, e, t); + } +}; +var z0r = class KQe extends N { + constructor(e) { + super(); + this.message = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.HeadlessAgenticComposerResponse.Error"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "message", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "error_details", + kind: "message", + T: QM + }]); + } + static fromBinary(e, t) { + return new KQe().fromBinary(e, t); + } + static fromJson(e, t) { + return new KQe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new KQe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(KQe, e, t); + } +}; +var J0r = class YQe extends N { + constructor(e) { + super(); + this.pathEncryptionKey = ""; + this.repositoryInfoShouldQueryStaging = false; + this.repositoryInfoShouldQueryProd = false; + this.repoQueryAuthToken = ""; + this.shouldSyncIndex = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.HeadlessAgenticComposerRepositoryInfo"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "repository_info", + kind: "message", + T: pc + }, { + no: 2, + name: "path_encryption_key", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "repository_info_should_query_staging", + kind: "scalar", + T: 8 + }, { + no: 4, + name: "repository_info_should_query_prod", + kind: "scalar", + T: 8 + }, { + no: 5, + name: "repo_query_auth_token", + kind: "scalar", + T: 9 + }, { + no: 6, + name: "should_sync_index", + kind: "scalar", + T: 8 + }, { + no: 7, + name: "query_only_repo_access", + kind: "message", + T: Uz + }]); + } + static fromBinary(e, t) { + return new YQe().fromBinary(e, t); + } + static fromJson(e, t) { + return new YQe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new YQe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(YQe, e, t); + } +}; +var wbt = class XQe extends N { + constructor(e) { + super(); + this.text = ""; + this.richText = ""; + this.fileSelections = []; + this.fileAttachments = []; + this.images = []; + this.conversationHistory = []; + this.documentationIdentifiers = []; + this.externalLinks = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.HeadlessAgenticComposerPrompt"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 5, + name: "base_conversation_message", + kind: "message", + T: Al + }, { + no: 1, + name: "text", + kind: "scalar", + T: 9 + }, { + no: 6, + name: "rich_text", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "file_selections", + kind: "message", + T: G0r, + repeated: true + }, { + no: 3, + name: "file_attachments", + kind: "message", + T: K0r, + repeated: true + }, { + no: 4, + name: "images", + kind: "message", + T: tD, + repeated: true + }, { + no: 7, + name: "conversation_history", + kind: "message", + T: Al, + repeated: true + }, { + no: 8, + name: "documentation_identifiers", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 9, + name: "use_web", + kind: "scalar", + T: 8, + opt: true + }, { + no: 10, + name: "external_links", + kind: "message", + T: Oz, + repeated: true + }]); + } + static fromBinary(e, t) { + return new XQe().fromBinary(e, t); + } + static fromJson(e, t) { + return new XQe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new XQe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(XQe, e, t); + } +}; +var G0r = class QQe extends N { + constructor(e) { + super(); + this.relativeWorkspacePath = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.HeadlessAgenticComposerPrompt.FileSelection"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "relative_workspace_path", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new QQe().fromBinary(e, t); + } + static fromJson(e, t) { + return new QQe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new QQe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(QQe, e, t); + } +}; +var K0r = class ZQe extends N { + constructor(e) { + super(); + this.name = ""; + this.contents = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.HeadlessAgenticComposerPrompt.FileAttachment"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "name", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "contents", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new ZQe().fromBinary(e, t); + } + static fromJson(e, t) { + return new ZQe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new ZQe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(ZQe, e, t); + } +}; +var h9s = class eZe extends N { + constructor(e) { + super(); + this.chatModelName = ""; + this.simpleLooping = false; + this.autoCommit = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.HeadlessAgenticComposerConfig"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 2, + name: "chat_model_name", + kind: "scalar", + T: 9 + }, { + no: 5, + name: "chat_model_details", + kind: "message", + T: Qa + }, { + no: 3, + name: "simple_looping", + kind: "scalar", + T: 8 + }, { + no: 4, + name: "auto_commit", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new eZe().fromBinary(e, t); + } + static fromJson(e, t) { + return new eZe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new eZe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(eZe, e, t); + } +}; +var foa = class tZe extends N { + constructor(e) { + super(); + this.conversation = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.HeadlessAgenticContinuePromptProps"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "conversation", + kind: "message", + T: Al, + repeated: true + }, { + no: 4, + name: "conversation_summary", + kind: "message", + T: eA + }, { + no: 2, + name: "task", + kind: "message", + T: wbt + }, { + no: 3, + name: "diff", + kind: "message", + T: Sb + }]); + } + static fromBinary(e, t) { + return new tZe().fromBinary(e, t); + } + static fromJson(e, t) { + return new tZe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new tZe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(tZe, e, t); + } +}; +var Y0r = class iZe extends N { + constructor(e) { + super(); + this.bcId = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetBackgroundComposerStatusRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "bc_id", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new iZe().fromBinary(e, t); + } + static fromJson(e, t) { + return new iZe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new iZe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(iZe, e, t); + } +}; +var X0r = class sZe extends N { + constructor(e) { + super(); + this.status = Mo.UNSPECIFIED; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetBackgroundComposerStatusResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "status", + kind: "enum", + T: m.getEnumType(Mo) + }]); + } + static fromBinary(e, t) { + return new sZe().fromBinary(e, t); + } + static fromJson(e, t) { + return new sZe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new sZe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(sZe, e, t); + } +}; +var sti = class nZe extends N { + constructor(e) { + super(); + this.bcId = ""; + this.followup = ""; + this.richFollowup = ""; + this.synchronous = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.AddAsyncFollowupBackgroundComposerRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "bc_id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "followup", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "rich_followup", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "synchronous", + kind: "scalar", + T: 8 + }, { + no: 5, + name: "followup_message", + kind: "message", + T: Al + }]); + } + static fromBinary(e, t) { + return new nZe().fromBinary(e, t); + } + static fromJson(e, t) { + return new nZe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new nZe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(nZe, e, t); + } +}; +var Q0r = class rZe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.AddAsyncFollowupBackgroundComposerResponse"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new rZe().fromBinary(e, t); + } + static fromJson(e, t) { + return new rZe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new rZe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(rZe, e, t); + } +}; +var f9s = class oZe extends N { + constructor(e) { + super(); + this.bcId = ""; + this.includeDiff = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetBackgroundComposerInfoRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "bc_id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "include_diff", + kind: "scalar", + T: 8 + }]); + } + static fromBinary(e, t) { + return new oZe().fromBinary(e, t); + } + static fromJson(e, t) { + return new oZe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new oZe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(oZe, e, t); + } +}; +var g9s = class aZe extends N { + constructor(e) { + super(); + this.startingCommit = ""; + this.baseBranch = ""; + this.status = Mo.UNSPECIFIED; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.DetailedBackgroundComposer"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "composer", + kind: "message", + T: tti + }, { + no: 2, + name: "starting_commit", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "base_branch", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "prompt", + kind: "message", + T: wbt + }, { + no: 5, + name: "status", + kind: "enum", + T: m.getEnumType(Mo) + }, { + no: 6, + name: "diff_since_start", + kind: "message", + T: Sb + }, { + no: 7, + name: "start_error", + kind: "message", + T: QM + }, { + no: 8, + name: "model_details", + kind: "message", + T: Qa + }]); + } + static fromBinary(e, t) { + return new aZe().fromBinary(e, t); + } + static fromJson(e, t) { + return new aZe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new aZe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(aZe, e, t); + } +}; +var Z0r = class lZe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetBackgroundComposerInfoResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "composer", + kind: "message", + T: g9s + }]); + } + static fromBinary(e, t) { + return new lZe().fromBinary(e, t); + } + static fromJson(e, t) { + return new lZe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new lZe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(lZe, e, t); + } +}; +var eCr = class cZe extends N { + constructor(e) { + super(); + this.bcId = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetBackgroundComposerRepositoryInfoRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "bc_id", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new cZe().fromBinary(e, t); + } + static fromJson(e, t) { + return new cZe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new cZe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(cZe, e, t); + } +}; +var tCr = class uZe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetBackgroundComposerRepositoryInfoResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "repository_info", + kind: "message", + T: pc + }, { + no: 2, + name: "path_encryption_key", + kind: "scalar", + T: 9, + opt: true + }, { + no: 3, + name: "query_only_repo_access", + kind: "message", + T: Uz + }]); + } + static fromBinary(e, t) { + return new uZe().fromBinary(e, t); + } + static fromJson(e, t) { + return new uZe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new uZe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(uZe, e, t); + } +}; +var iCr = class dZe extends N { + constructor(e) { + super(); + this.name = ""; + this.branchName = ""; + this.summary = ""; + this.followups = []; + this.baseBranch = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.BackgroundComposerInformationContext"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "name", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "branch_name", + kind: "scalar", + T: 9 + }, { + no: 3, + name: "summary", + kind: "scalar", + T: 9 + }, { + no: 4, + name: "original_prompt", + kind: "message", + T: wbt + }, { + no: 5, + name: "followups", + kind: "message", + T: s0r, + repeated: true + }, { + no: 6, + name: "diff_since_start", + kind: "message", + T: Sb + }, { + no: 7, + name: "base_branch", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new dZe().fromBinary(e, t); + } + static fromJson(e, t) { + return new dZe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new dZe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(dZe, e, t); + } +}; +var sCr = class hZe extends N { + constructor(e) { + super(); + this.bcId = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetBackgroundComposerInformationContextRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "bc_id", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new hZe().fromBinary(e, t); + } + static fromJson(e, t) { + return new hZe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new hZe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(hZe, e, t); + } +}; +var nCr = class fZe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetBackgroundComposerInformationContextResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "context", + kind: "message", + T: iCr + }]); + } + static fromBinary(e, t) { + return new fZe().fromBinary(e, t); + } + static fromJson(e, t) { + return new fZe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new fZe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(fZe, e, t); + } +}; +var rCr = class gZe extends N { + constructor(e) { + super(); + this.mandatoryRepoUrls = []; + this.optionalRepoUrls = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetGithubAccessTokenForReposRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "mandatory_repo_urls", + kind: "scalar", + T: 9, + repeated: true + }, { + no: 2, + name: "optional_repo_urls", + kind: "scalar", + T: 9, + repeated: true + }]); + } + static fromBinary(e, t) { + return new gZe().fromBinary(e, t); + } + static fromJson(e, t) { + return new gZe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new gZe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(gZe, e, t); + } +}; +var oCr = class pZe extends N { + constructor(e) { + super(); + this.repoUrlStatuses = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetGithubAccessTokenForReposResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "has_access", + kind: "scalar", + T: 8, + opt: true + }, { + no: 2, + name: "error", + kind: "scalar", + T: 9, + opt: true + }, { + no: 3, + name: "repo_url_statuses", + kind: "message", + T: aCr, + repeated: true + }]); + } + static fromBinary(e, t) { + return new pZe().fromBinary(e, t); + } + static fromJson(e, t) { + return new pZe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new pZe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(pZe, e, t); + } +}; +var aCr = class mZe extends N { + constructor(e) { + super(); + this.repoUrl = ""; + this.hasAccess = false; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetGithubAccessTokenForReposResponse.Status"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "repo_url", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "has_access", + kind: "scalar", + T: 8 + }, { + no: 3, + name: "error", + kind: "scalar", + T: 9, + opt: true + }]); + } + static fromBinary(e, t) { + return new mZe().fromBinary(e, t); + } + static fromJson(e, t) { + return new mZe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new mZe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(mZe, e, t); + } +}; +var p9s = class bZe extends N { + constructor(e) { + super(); + this.bcId = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetBackgroundComposerConversationRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "bc_id", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new bZe().fromBinary(e, t); + } + static fromJson(e, t) { + return new bZe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new bZe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(bZe, e, t); + } +}; +var lCr = class vZe extends N { + constructor(e) { + super(); + this.conversation = []; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetBackgroundComposerConversationResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "conversation", + kind: "message", + T: Al, + repeated: true + }]); + } + static fromBinary(e, t) { + return new vZe().fromBinary(e, t); + } + static fromJson(e, t) { + return new vZe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new vZe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(vZe, e, t); + } +}; +var cCr = class yZe extends N { + constructor(e) { + super(); + this.bcId = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetBackgroundComposerPullRequestRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "bc_id", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new yZe().fromBinary(e, t); + } + static fromJson(e, t) { + return new yZe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new yZe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(yZe, e, t); + } +}; +var uCr = class wZe extends N { + constructor(e) { + super(); + this.prUrl = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetBackgroundComposerPullRequestResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "pr_url", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new wZe().fromBinary(e, t); + } + static fromJson(e, t) { + return new wZe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new wZe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(wZe, e, t); + } +}; +var dCr = class CZe extends N { + constructor(e) { + super(); + this.bcId = ""; + this.commitMessage = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CommitBackgroundComposerRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "bc_id", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "commit_message", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new CZe().fromBinary(e, t); + } + static fromJson(e, t) { + return new CZe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new CZe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(CZe, e, t); + } +}; +var hCr = class SZe extends N { + constructor(e) { + super(); + this.commitHash = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.CommitBackgroundComposerResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "commit_hash", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new SZe().fromBinary(e, t); + } + static fromJson(e, t) { + return new SZe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new SZe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(SZe, e, t); + } +}; +var fCr = class xZe extends N { + constructor(e) { + super(); + this.environmentJson = ""; + this.repoUrl = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SetPersonalEnvironmentJsonRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "environment_json", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "repo_url", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new xZe().fromBinary(e, t); + } + static fromJson(e, t) { + return new xZe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new xZe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(xZe, e, t); + } +}; +var gCr = class kZe extends N { + constructor(e) { + super(); + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.SetPersonalEnvironmentJsonResponse"; + } + static { + this.fields = m.util.newFieldList(() => []); + } + static fromBinary(e, t) { + return new kZe().fromBinary(e, t); + } + static fromJson(e, t) { + return new kZe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new kZe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(kZe, e, t); + } +}; +var pCr = class EZe extends N { + constructor(e) { + super(); + this.repoUrl = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetPersonalEnvironmentJsonRequest"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "repo_url", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new EZe().fromBinary(e, t); + } + static fromJson(e, t) { + return new EZe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new EZe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(EZe, e, t); + } +}; +var mCr = class IZe extends N { + constructor(e) { + super(); + this.environmentJson = ""; + this.repoUrl = ""; + m.util.initPartial(e, this); + } + static { + this.runtime = m; + } + static { + this.typeName = "aiserver.v1.GetPersonalEnvironmentJsonResponse"; + } + static { + this.fields = m.util.newFieldList(() => [{ + no: 1, + name: "environment_json", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "repo_url", + kind: "scalar", + T: 9 + }]); + } + static fromBinary(e, t) { + return new IZe().fromBinary(e, t); + } + static fromJson(e, t) { + return new IZe().fromJson(e, t); + } + static fromJsonString(e, t) { + return new IZe().fromJsonString(e, t); + } + static equals(e, t) { + return m.util.equals(IZe, e, t); + } +}; +Hr(); +var Q0e = { + typeName: "aiserver.v1.BackgroundComposerService", + methods: { + listBackgroundComposers: { + name: "ListBackgroundComposers", + I: eti, + O: A0r, + kind: Ge.Unary + }, + attachBackgroundComposer: { + name: "AttachBackgroundComposer", + I: W0r, + O: V0r, + kind: Ge.ServerStreaming + }, + attachBackgroundComposerLogs: { + name: "AttachBackgroundComposerLogs", + I: _0r, + O: B0r, + kind: Ge.ServerStreaming + }, + startBackgroundComposerFromSnapshot: { + name: "StartBackgroundComposerFromSnapshot", + I: $0r, + O: O0r, + kind: Ge.Unary + }, + makePRBackgroundComposer: { + name: "MakePRBackgroundComposer", + I: N0r, + O: M0r, + kind: Ge.Unary + }, + getBackgroundComposerStatus: { + name: "GetBackgroundComposerStatus", + I: Y0r, + O: X0r, + kind: Ge.Unary + }, + addAsyncFollowupBackgroundComposer: { + name: "AddAsyncFollowupBackgroundComposer", + I: sti, + O: Q0r, + kind: Ge.Unary + }, + proxyCursorServerSocket: { + name: "ProxyCursorServerSocket", + I: I0r, + O: P0r, + kind: Ge.BiDiStreaming + }, + getCursorServerUrl: { + name: "GetCursorServerUrl", + I: d9s, + O: k0r, + kind: Ge.Unary + }, + pauseBackgroundComposer: { + name: "PauseBackgroundComposer", + I: v0r, + O: y0r, + kind: Ge.Unary + }, + resumeBackgroundComposer: { + name: "ResumeBackgroundComposer", + I: S0r, + O: x0r, + kind: Ge.Unary + }, + archiveBackgroundComposer: { + name: "ArchiveBackgroundComposer", + I: w0r, + O: C0r, + kind: Ge.Unary + }, + getBackgroundComposerInfo: { + name: "GetBackgroundComposerInfo", + I: f9s, + O: Z0r, + kind: Ge.Unary + }, + getBackgroundComposerInformationContext: { + name: "GetBackgroundComposerInformationContext", + I: sCr, + O: nCr, + kind: Ge.Unary + }, + getBackgroundComposerRepositoryInfo: { + name: "GetBackgroundComposerRepositoryInfo", + I: eCr, + O: tCr, + kind: Ge.Unary + }, + listDetailedBackgroundComposers: { + name: "ListDetailedBackgroundComposers", + I: u9s, + O: b0r, + kind: Ge.Unary + }, + getGithubAccessTokenForRepos: { + name: "GetGithubAccessTokenForRepos", + I: rCr, + O: oCr, + kind: Ge.Unary + }, + getBackgroundComposerDiffDetails: { + name: "GetBackgroundComposerDiffDetails", + I: c9s, + O: m0r, + kind: Ge.Unary + }, + getBackgroundComposerChangesHash: { + name: "GetBackgroundComposerChangesHash", + I: f0r, + O: g0r, + kind: Ge.Unary + }, + getBackgroundComposerPullRequest: { + name: "GetBackgroundComposerPullRequest", + I: cCr, + O: uCr, + kind: Ge.Unary + }, + refreshGithubAccessTokenInBackgroundComposer: { + name: "RefreshGithubAccessTokenInBackgroundComposer", + I: t0r, + O: i0r, + kind: Ge.Unary + }, + createBackgroundComposerPod: { + name: "CreateBackgroundComposerPod", + I: n0r, + O: r0r, + kind: Ge.Unary + }, + attachBackgroundComposerPod: { + name: "AttachBackgroundComposerPod", + I: o0r, + O: a0r, + kind: Ge.ServerStreaming + }, + createBackgroundComposerPodSnapshot: { + name: "CreateBackgroundComposerPodSnapshot", + I: c0r, + O: u0r, + kind: Ge.Unary + }, + changeBackgroundComposerSnapshotVisibility: { + name: "ChangeBackgroundComposerSnapshotVisibility", + I: d0r, + O: h0r, + kind: Ge.Unary + }, + getBackgroundComposerConversation: { + name: "GetBackgroundComposerConversation", + I: p9s, + O: lCr, + kind: Ge.Unary + }, + renameBackgroundComposer: { + name: "RenameBackgroundComposer", + I: Zwr, + O: e0r, + kind: Ge.Unary + }, + commitBackgroundComposer: { + name: "CommitBackgroundComposer", + I: dCr, + O: hCr, + kind: Ge.Unary + }, + setPersonalEnvironmentJson: { + name: "SetPersonalEnvironmentJson", + I: fCr, + O: gCr, + kind: Ge.Unary + }, + getPersonalEnvironmentJson: { + name: "GetPersonalEnvironmentJson", + I: pCr, + O: mCr, + kind: Ge.Unary + } + } +}; +q(); +te(); +It(); +Cs(); +yu(); +Ps(); +jl(); +pe(); +X(); +nt(); +Jr(); +q(); +ef(); +yt(); +ua(); +Ms(); +Ee(); +Nt(); +te(); +Nt(); +te(); +nr(); +zt(); +var So = Ve("textFileService"); +var m9s; +(function (i) { + i[i.FILE_IS_BINARY = 0] = "FILE_IS_BINARY"; +})(m9s ||= {}); +var bCr = class extends vf { + static isTextFileOperationError(i) { + return i instanceof Error && !Ga(i.textFileOperationResult); + } + constructor(i, e, t) { + super(i, 10); + this.textFileOperationResult = e; + this.options = t; + } +}; +var b9s; +(function (i) { + i[i.SAVED = 0] = "SAVED"; + i[i.DIRTY = 1] = "DIRTY"; + i[i.PENDING_SAVE = 2] = "PENDING_SAVE"; + i[i.CONFLICT = 3] = "CONFLICT"; + i[i.ORPHAN = 4] = "ORPHAN"; + i[i.ERROR = 5] = "ERROR"; +})(b9s ||= {}); +var v9s; +(function (i) { + i[i.EDITOR = 1] = "EDITOR"; + i[i.REFERENCE = 2] = "REFERENCE"; + i[i.OTHER = 3] = "OTHER"; +})(v9s ||= {}); +var y9s; +(function (i) { + i[i.Encode = 0] = "Encode"; + i[i.Decode = 1] = "Decode"; +})(y9s ||= {}); +function vCr(i) { + const e = i; + return yji(e.setEncoding, e.getEncoding, e.save, e.revert, e.isDirty, e.getLanguageId); +} +function w9s(i) { + let e = false; + return { + read() { + if (e) { + return null; + } else { + e = true; + return i; + } + } + }; +} +function yCr(i) { + if (typeof i !== "undefined") { + if (typeof i == "string") { + return Ii.fromString(i); + } else { + return { + read: () => { + const e = i.read(); + if (typeof e == "string") { + return Ii.fromString(e); + } else { + return null; + } + } + }; + } + } +} +It(); +zt(); +X(); +te(); +Ee(); +Le(); +Br(); +He(); +var Rc = Ve("IUserDataProfileService"); +var HA = Ve("IUserDataProfileManagementService"); +var Cbt = "profile"; +function wCr(i, e) { + return V.from({ + scheme: e.urlProtocol, + authority: Cbt, + path: i.startsWith("/") ? i : `/${i}` + }); +} +var C9s = "profile-"; +function nti(i) { + return i.authority === Cbt || new RegExp(`^${C9s}`).test(i.authority); +} +var Z0e = Ve("IUserDataProfileImportExportService"); +var CCr = dt("defaultProfile-icon", A.settings, f(13521, null)); +var S9s = W(13523, "Profiles"); +var K5 = { + ...S9s +}; +var x9s = "code-profile"; +var rti = [{ + name: f(13522, null), + extensions: [x9s] +}]; +var oti = new fe("currentProfile", ""); +var SCr = new fe("isCurrentProfileTransient", false); +var Y5 = new fe("hasProfiles", false); +var eCe = Ve("keybindingEditingService"); +var ati = class extends H { + constructor(e, t, s, n) { + super(); + this.f = e; + this.g = t; + this.h = s; + this.j = n; + this.c = new wT(); + } + addKeybinding(e, t, s) { + return this.c.queue(() => this.m(e, t, s, true)); + } + addKeybindingRule(e, t, s) { + return this.c.queue(async () => { + const n = await this.I(); + const r = n.object.textEditorModel; + const o = this.C(t, e, s, false); + const { + tabSize: a, + insertSpaces: l + } = r.getOptions(); + const c = r.getEOL(); + this.G(TE(r.getValue(), [-1], o, { + tabSize: a, + insertSpaces: l, + eol: c + })[0], r); + try { + return await this.r(); + } finally { + n.dispose(); + } + }); + } + editKeybinding(e, t, s) { + return this.c.queue(() => this.m(e, t, s, false)); + } + resetKeybinding(e) { + return this.c.queue(() => this.q(e)); + } + removeKeybinding(e) { + return this.c.queue(() => this.n(e)); + } + async m(e, t, s, n) { + const r = await this.I(); + const o = r.object.textEditorModel; + if (n) { + this.s(e, t, s, o, -1); + } else { + const a = Ld(o.getValue()); + const l = this.y(e, a); + this.s(e, t, s, o, l); + if (e.isDefault && e.resolvedKeybinding) { + this.u(e, o); + } + } + try { + await this.r(); + } finally { + r.dispose(); + } + } + async n(e) { + const t = await this.I(); + const s = t.object.textEditorModel; + if (e.isDefault) { + this.u(e, s); + } else { + this.t(e, s); + } + try { + return await this.r(); + } finally { + t.dispose(); + } + } + async q(e) { + const t = await this.I(); + const s = t.object.textEditorModel; + if (!e.isDefault) { + this.t(e, s); + this.w(e, s); + } + try { + return await this.r(); + } finally { + t.dispose(); + } + } + r() { + return this.g.save(this.j.currentProfile.keybindingsResource); + } + s(e, t, s, n, r) { + const { + tabSize: o, + insertSpaces: a + } = n.getOptions(); + const l = n.getEOL(); + if (r !== -1) { + this.G(TE(n.getValue(), [r, "key"], t, { + tabSize: o, + insertSpaces: a, + eol: l + })[0], n); + const c = TE(n.getValue(), [r, "when"], s, { + tabSize: o, + insertSpaces: a, + eol: l + }); + if (c.length > 0) { + this.G(c[0], n); + } + } else { + this.G(TE(n.getValue(), [-1], this.C(t, e.command, s, false), { + tabSize: o, + insertSpaces: a, + eol: l + })[0], n); + } + } + t(e, t) { + const { + tabSize: s, + insertSpaces: n + } = t.getOptions(); + const r = t.getEOL(); + const o = Ld(t.getValue()); + const a = this.y(e, o); + if (a !== -1) { + this.G(TE(t.getValue(), [a], undefined, { + tabSize: s, + insertSpaces: n, + eol: r + })[0], t); + } + } + u(e, t) { + const { + tabSize: s, + insertSpaces: n + } = t.getOptions(); + const r = t.getEOL(); + const o = e.resolvedKeybinding ? e.resolvedKeybinding.getUserSettingsLabel() : null; + if (o) { + const a = this.C(o, e.command, e.when ? e.when.serialize() : undefined, true); + if (Ld(t.getValue()).every(c => !this.F(c, a))) { + this.G(TE(t.getValue(), [-1], a, { + tabSize: s, + insertSpaces: n, + eol: r + })[0], t); + } + } + } + w(e, t) { + const { + tabSize: s, + insertSpaces: n + } = t.getOptions(); + const r = t.getEOL(); + const o = Ld(t.getValue()); + const a = this.z(e, o).reverse(); + for (const l of a) { + this.G(TE(t.getValue(), [l], undefined, { + tabSize: s, + insertSpaces: n, + eol: r + })[0], t); + } + } + y(e, t) { + for (let s = 0; s < t.length; s++) { + const n = t[s]; + if (n.command === e.command) { + if (!n.when && !e.when) { + return s; + } + if (n.when && e.when) { + const r = T.deserialize(n.when); + if (r && r.serialize() === e.when.serialize()) { + return s; + } + } + } + } + return -1; + } + z(e, t) { + const s = []; + for (let n = 0; n < t.length; n++) { + if (t[n].command === `-${e.command}`) { + s.push(n); + } + } + return s; + } + C(e, t, s, n) { + const r = { + key: e + }; + if (t) { + r.command = n ? `-${t}` : t; + } + if (s) { + r.when = s; + } + return r; + } + F(e, t) { + if (e.command !== t.command || e.key !== t.key) { + return false; + } + const s = T.deserialize(e.when); + const n = T.deserialize(t.when); + return (!s || !!n) && (!!s || !n) && (!s || !n || !!s.equals(n)) && !!Ul(e.args, t.args); + } + G(e, t) { + const s = t.getPositionAt(e.offset); + const n = t.getPositionAt(e.offset + e.length); + const r = new Z(s.lineNumber, s.column, n.lineNumber, n.column); + const a = t.getValueInRange(r) ? Ua.replace(r, e.content) : Ua.insert(s, e.content); + t.pushEditOperations([new Vs(s.lineNumber, s.column, s.lineNumber, s.column)], [a], () => []); + } + async H() { + if (!(await this.h.exists(this.j.currentProfile.keybindingsResource))) { + await this.g.write(this.j.currentProfile.keybindingsResource, this.L(), { + encoding: "utf8" + }); + } + return this.f.createModelReference(this.j.currentProfile.keybindingsResource); + } + async I() { + if (this.g.isDirty(this.j.currentProfile.keybindingsResource)) { + throw new Error(f(13067, null)); + } + const e = await this.H(); + const t = e.object.textEditorModel; + const s = t.getEOL(); + if (t.getValue()) { + const n = this.J(t); + if (n.parseErrors.length) { + e.dispose(); + throw new Error(f(13068, null)); + } + if (n.result) { + if (!Array.isArray(n.result)) { + e.dispose(); + throw new Error(f(13069, null)); + } + } else { + const r = s + "[]"; + this.G({ + content: r, + length: r.length, + offset: t.getValue().length + }, t); + } + } else { + const n = this.L(); + this.G({ + content: n, + length: n.length, + offset: 0 + }, t); + } + return e; + } + J(e) { + const t = []; + return { + result: Ld(e.getValue(), t, { + allowTrailingComma: true, + allowEmptyContent: true + }), + parseErrors: t + }; + } + L() { + return `${"// " + f(13070, null)} +[ +]`; + } +}; +ati = __decorate([__param(0, ns), __param(1, So), __param(2, Ct), __param(3, Rc)], ati); +it(eCe, ati, 1); +Je(); +Wt(); +Fi(); +Me(); +$l(); +rt(); +var rW; +var xCr = "cursor.composer.agentLoopOnLints"; +var pC = Ve("composerModesService"); +var lti = class extends H { + static { + rW = this; + } + static { + this.ACTION_ID_PREFIX = "composerMode."; + } + static { + this.PROTECTED_MODE_IDS = ["agent", "chat", "edit", "background"]; + } + getActionIdPrefix() { + return rW.ACTION_ID_PREFIX; + } + doesModeSupportCodebase(e) { + if (!this.isProtectedMode(e)) { + return true; + } + const t = this.getModeModel(e) ?? this._aiSettingsService.getComposerModel(); + return !this._aiSettingsService.doesModelSupportAgent(t); + } + doesModeSupportAutoContext(e) { + const t = this.getModeModel(e) ?? this._aiSettingsService.getComposerModel(); + return this._aiSettingsService.doesModelSupportAutoContext(t); + } + getMaxNumTokensForModelAutoContext(e, t) { + const s = this.getModeModel(e) ?? this._aiSettingsService.getComposerModel(); + if (t) { + return this._aiSettingsService.maxNumTokensForModelAutoContextExtended(s); + } else { + return this._aiSettingsService.maxNumTokensForModelAutoContext(s); + } + } + constructor(e, t, s, n, r, o, a) { + super(); + this._reactiveStorageService = e; + this._composerDataService = t; + this._aiSettingsService = s; + this._keybindingEditingService = n; + this._keybindingService = r; + this._configurationService = o; + this._backgroundComposerDataService = a; + this._onDidModeModelChange = this.D(new B()); + this.onDidModeModelChange = this._onDidModeModelChange.event; + this._onDidModeUseMaxChange = this.D(new B()); + this.onDidModeUseMaxChange = this._onDidModeUseMaxChange.event; + this.modeActionDisposables = new Map(); + const l = this._reactiveStorageService.applicationUserPersistentStorage.composerState; + if (l && l.hasMigratedComposerGlobalConfigsToModeSpecificConfigs === false) { + let c = l.useYoloMode ?? false; + if (l.yoloPrompt) { + c = false; + } + const u = this._configurationService.getValue(xCr) ?? true; + const d = this.getAllModes(); + d.forEach(h => { + this.setModeAutoRun(h.id, c); + }); + d.forEach(h => { + this.setModeAutoFix(h.id, u); + }); + this._reactiveStorageService.setApplicationUserPersistentStorage("composerState", "hasMigratedComposerGlobalConfigsToModeSpecificConfigs", true); + } + if (l && !l.hasMigratedToAgentIsCmdI) { + const c = `${this.getPlatformModifier()}+i`; + this.saveModeKeybinding("agent", c).catch(u => console.error("[ChangeManagement] Failed to set agent keybinding:", u)); + this._reactiveStorageService.setApplicationUserPersistentStorage("composerState", "hasMigratedToAgentIsCmdI", true); + } + this.registerExistingModeActions(); + } + registerExistingModeActions() { + const e = this.getAllModes(); + for (const t of e) { + if (t.actionId) { + this.registerModeAction(t, t.actionId); + } + } + } + getComposerUnifiedMode(e) { + let t; + if (typeof e == "string") { + t = this._composerDataService.allComposersData.allComposers.find(n => n.composerId === e); + } else if ("unifiedMode" in e) { + t = e; + } else if ("data" in e) { + t = e.data; + } + const s = t?.unifiedMode ?? "agent"; + if (this.checkIfModeExists(s)) { + return s; + } else { + this.setComposerUnifiedMode(e, "agent"); + return "agent"; + } + } + checkIfModeExists(e) { + return this.getAllModes().some(t => t.id === e); + } + setComposerUnifiedMode(e, t) { + this._composerDataService.updateComposerDataSetStore(e, s => { + s("unifiedMode", t); + }); + } + createMode(e) { + const s = { + id: Ft(), + ...e + }; + this._reactiveStorageService.setApplicationUserPersistentStorage("composerState", "modes4", n => n ? [...n, s] : [s]); + return s; + } + deleteMode(e) { + if (rW.PROTECTED_MODE_IDS.includes(e)) { + console.error(`[composerModesService] Cannot delete protected mode: ${e}`); + return; + } + const t = this.getMode(e); + if (t && t.actionId) { + this.removeModeKeybinding(e).catch(s => console.error(`[composerModesService] Error removing keybinding for deleted mode ${e}:`, s)); + } + this.deregisterModeAction(e); + this._reactiveStorageService.setApplicationUserPersistentStorage("composerState", "modes4", s => { + if (!s) { + return []; + } + const n = s.findIndex(o => o.id === e); + if (n === -1) { + return s; + } + const r = [...s]; + r.splice(n, 1); + return r; + }); + } + isProtectedMode(e) { + return rW.PROTECTED_MODE_IDS.includes(e); + } + isModeChatLike(e) { + const t = this.getMode(e); + if (t) { + return !t.enabledTools.includes(at.EDIT_FILE) && !t.shouldAutoApplyIfNoEditTool; + } else { + return false; + } + } + getAllModes() { + const e = this._backgroundComposerDataService.persistentData.isBackgroundComposerEnabled; + const t = this._reactiveStorageService.applicationUserPersistentStorage.composerState.modes4 ?? []; + if (e) { + return t; + } else { + return t.filter(s => s.id !== "background"); + } + } + getMode(e) { + const s = this.getAllModes().find(n => n.id === e); + if (!s) { + console.error(`[composerModesService] Mode not found: ${e}`); + } + return s; + } + updateMode(e, t) { + this._reactiveStorageService.setApplicationUserPersistentStorage("composerState", "modes4", s => s.id === e, s => ({ + ...s, + ...t + })); + } + updateModeSetStore(e, t) { + t((...s) => { + this._reactiveStorageService.setApplicationUserPersistentStorage("composerState", "modes4", n => n.id === e, ...s); + }); + } + getModeModel(e) { + return this.getAllModes().find(n => n.id === e)?.model; + } + setModeUseMax(e, t) { + this.updateModeSetStore(e, s => { + s("useMax", t); + }); + this._onDidModeUseMaxChange.fire({ + modeId: e, + newUseMax: t + }); + } + getModeUseMax(e) { + return this.getAllModes().find(n => n.id === e)?.useMax; + } + setModeModel(e, t) { + if (t !== this.getModeModel(e)) { + this.updateModeSetStore(e, s => { + s("model", t); + if (t === undefined) { + this.setModeUseMax(e, undefined); + } else if (!this._aiSettingsService.doesModelSupportMaxMode(t)) { + this.setModeUseMax(e, false); + } + }); + this._onDidModeModelChange.fire({ + modeId: e, + newModel: t + }); + } + } + getModeThinkingLevel(e) { + return this.getAllModes().find(n => n.id === e)?.thinkingLevel ?? "none"; + } + setModeThinkingLevel(e, t) { + this.updateModeSetStore(e, s => { + s("thinkingLevel", t); + }); + } + getModeAutoRun(e) { + return this.getAllModes().find(n => n.id === e)?.autoRun ?? false; + } + setModeAutoRun(e, t) { + this.updateModeSetStore(e, s => { + s("autoRun", t); + }); + } + getComposerAutoRun(e) { + const t = this.getComposerUnifiedMode(e); + return this.getModeAutoRun(t) ?? false; + } + setComposerAutoRun(e, t) { + const s = this.getComposerUnifiedMode(e); + this.setModeAutoRun(s, t); + } + getModeAutoFix(e) { + return this.getAllModes().find(n => n.id === e)?.autoFix ?? false; + } + setModeAutoFix(e, t) { + this.updateModeSetStore(e, s => { + s("autoFix", t); + }); + } + getComposerAutoFix(e) { + const t = this.getComposerUnifiedMode(e); + return this.getModeAutoFix(t) ?? false; + } + setComposerAutoFix(e, t) { + const s = this.getComposerUnifiedMode(e); + this.setModeAutoFix(s, t); + } + getModeShouldAutoApplyIfNoEditTool(e) { + return this.getAllModes().find(n => n.id === e)?.shouldAutoApplyIfNoEditTool ?? false; + } + setModeShouldAutoApplyIfNoEditTool(e, t) { + this.updateModeSetStore(e, s => { + s("shouldAutoApplyIfNoEditTool", t); + }); + } + async saveModeKeybinding(e, t) { + const s = this.getMode(e); + if (!s) { + console.error(`[composerModesService] Cannot save keybinding for non-existent mode: ${e}`); + return; + } + const r = this.getAllModes().find(o => { + if (o.id === e) { + return false; + } + if (o.actionId) { + const a = this._keybindingService.lookupKeybinding(o.actionId); + if (a) { + return a.getUserSettingsLabel() === t; + } + } + return false; + }); + if (r) { + throw new Error(`[composerModesService] Keybinding "${t}" already used by mode "${r.name}" (${r.id})`); + } + try { + let o = s.actionId; + if (!o) { + o = this.generateActionIdForMode(s); + this.updateModeSetStore(e, l => { + l("actionId", o); + }); + } + if (this._keybindingService.lookupKeybinding(o)) { + const l = this._keybindingService.getKeybindings().find(c => c.command === o); + if (l) { + await this._keybindingEditingService.editKeybinding(l, t, undefined); + } else { + await this._keybindingEditingService.addKeybindingRule(o, t); + } + } else { + await this._keybindingEditingService.addKeybindingRule(o, t); + } + this.deregisterModeAction(e); + this.registerModeAction(s, o); + } catch (o) { + throw new Error(`[composerModesService] Failed to save keybinding for mode ${e}:`, o); + } + } + deregisterModeAction(e) { + const t = this.modeActionDisposables.get(e); + if (t) { + t.dispose(); + this.modeActionDisposables.delete(e); + } + } + registerModeAction(e, t) { + try { + this.deregisterModeAction(e.id); + const s = J(class extends se { + constructor() { + super({ + id: t, + title: { + value: `Open Chat in ${e.name} Mode`, + original: `Open Chat in ${e.name} Mode` + }, + f1: true + }); + } + run(r) { + return r.get(gt).executeCommand(KF, e.id); + } + }); + this.modeActionDisposables.set(e.id, s); + } catch (s) { + throw new Error(`[composerModesService] Failed to register action for mode ${e.id}:`, s); + } + } + generateActionIdForMode(e) { + if (!e.name) { + return `${rW.ACTION_ID_PREFIX}${e.id}`; + } + let t = e.name.toLowerCase().replace(/\s+/g, "_"); + let s = `${rW.ACTION_ID_PREFIX}${t}`; + const r = this.getAllModes().filter(a => a.id !== e.id && a.actionId).map(a => a.actionId); + if (!r.includes(s)) { + return s; + } + let o = 2; + while (r.includes(`${s}_${o}`)) { + o++; + } + return `${s}_${o}`; + } + async removeModeKeybinding(e) { + const t = this.getMode(e); + if (!t || !t.actionId) { + console.error(`[composerModesService] Cannot remove keybinding for non-existent mode or mode without actionId: ${e}`); + return Promise.resolve(); + } + await new Promise(r => setTimeout(r, 500)); + if (!this._keybindingService.lookupKeybinding(t.actionId)) { + return Promise.resolve(); + } + const n = this._keybindingService.getKeybindings().find(r => r.command === t.actionId); + if (n) { + if (rW.PROTECTED_MODE_IDS.includes(e)) { + return this._keybindingEditingService.resetKeybinding(n); + } else { + return (async () => { + try { + await this._keybindingEditingService.removeKeybinding(n); + this.deregisterModeAction(e); + this.updateModeSetStore(e, r => { + r("actionId", undefined); + }); + } catch (r) { + console.error(`[composerModesService] Error removing keybinding for mode ${e}:`, r); + } + })(); + } + } else { + console.error(`[composerModesService] Cannot find resolved keybinding item for mode: ${e}`); + return Promise.resolve(); + } + } + isKeybindingUserDefined(e) { + const t = this.getMode(e); + if (!t || !t.actionId || !this._keybindingService.lookupKeybinding(t.actionId)) { + return false; + } + const n = this._keybindingService.getKeybindings().find(r => r.command === t.actionId); + if (n) { + return !n.isDefault; + } else { + return false; + } + } + getModeActionId(e) { + return this.getMode(e)?.actionId; + } + dispose() { + for (const e of this.modeActionDisposables.values()) { + e.dispose(); + } + this.modeActionDisposables.clear(); + super.dispose(); + } + getPlatformModifier() { + if (Gt) { + return "cmd"; + } else { + return "ctrl"; + } + } + getModeDescription(e) { + switch (e) { + case "agent": + return "Plan, search, build anything"; + case "chat": + return "Ask Cursor questions about your codebase"; + case "edit": + return "Manually decide what gets added to the context (no tools)"; + default: + return this.getMode(e)?.description; + } + } +}; +lti = rW = __decorate([__param(0, _i), __param(1, ia), __param(2, uy), __param(3, eCe), __param(4, oi), __param(5, ve), __param(6, cy)], lti); +it(pC, lti, 1); +qx(); +te(); +var tCe = Ve("projectLayoutService"); +var k9s; +(function (i) { + i.personalContext = "aicontext.personalContext"; + i.additionalFiles = "aicontext.additionalFiles"; +})(k9s ||= {}); +function kCr(i) { + const e = {}; + for (const s of i) { + const n = s.codeBlock?.relativeWorkspacePath ?? ""; + e[n] ||= 0; + e[n] = Math.max(e[n], s.score); + } + return Object.entries(e).map(([s, n]) => new Dut({ + file: { + relativeWorkspacePath: s + }, + score: n + })).sort((s, n) => n.score - s.score); +} +async function* fP(i) { + for await (const e of i) { + yield e; + } +} +var Wl = Ve("aiService"); +async function ECr(i, e = "") { + let t = []; + for await (const s of i) { + t.push(s); + } + return t.join(e); +} +var cti = class extends H { + F() { + const e = this.Z.get(this.C, 1, "[]"); + JSON.parse(e).forEach(s => this.z.set(s.generationUUID, s)); + } + G() { + const e = Array.from(this.z.values()); + this.Z.store(this.C, JSON.stringify(e), 1, 1); + } + constructor(e, t, s, n, r, o, a, l, c, u, d, h, g, p, b, v, y, w, C, S, x, k, E, D, P, R) { + super(); + this.H = e; + this.I = t; + this.J = s; + this.L = n; + this.M = r; + this.N = o; + this.O = a; + this.Q = l; + this.R = c; + this.S = u; + this.U = d; + this.W = h; + this.X = g; + this.Y = p; + this.Z = b; + this.$ = v; + this.ab = y; + this.bb = w; + this.cb = C; + this.db = S; + this.eb = x; + this.fb = k; + this.gb = E; + this.hb = D; + this.ib = P; + this.jb = R; + this.f = "aiService.prompts"; + this.streamingAbortControllers = new Map(); + this.repositories = []; + this.z = new vc(100); + this.C = "aiService.generations"; + this.backgroundComposerInterceptor = () => ({}); + this.mb = new Map(); + this.w = this.D(this.$.createScoped(this)); + this.F(); + this.h = this.fb.createInstance(Uf, { + service: of + }); + this.j = this.fb.createInstance(Uf, { + service: j0e + }); + this.m = this.fb.createInstance(Uf, { + service: FG + }); + this.q = this.fb.createInstance(Uf, { + service: Gei + }); + this.t = this.fb.createInstance(Uf, { + service: Xei + }); + this.u = this.fb.createInstance(Uf, { + service: Q0e, + headerInjector: () => this.backgroundComposerInterceptor() + }); + this.n = this.fb.createInstance(Uf, { + service: Kei + }); + this.w.createImplicitEffect(() => { + if (this.$.workspaceUserPersistentStorage.exampleCodebaseQuestions === undefined && this.$.applicationUserPersistentStorage.bubbleTimesLeft > 0 && this.$.nonPersistentStorage.repositoryIndexingStatus?.case === "synced") { + this.$.setWorkspaceUserPersistentStorage("exampleCodebaseQuestions", []); + this.computeExampleCodebaseQuestions().then(L => this.$.setWorkspaceUserPersistentStorage("exampleCodebaseQuestions", L)).catch(L => console.error(L)); + } + }); + this.w.createImplicitEffect(() => { + const F = this.$.nonPersistentStorage.inprogressAIGenerations.map(U => U.generationUUID); + const O = []; + for (const [U, j] of this.streamingAbortControllers) { + if (!F.includes(U)) { + j.abort(); + O.push(U); + } + } + for (const U of O) { + this.streamingAbortControllers.get(U)?.abort(); + this.streamingAbortControllers.delete(U); + } + }); + this.repositories = []; + for (const L of this.N.repositories) { + this.addRepository(L); + } + this.D(this.N.onDidAddRepository(L => { + this.addRepository(L); + })); + this.D(this.N.onDidRemoveRepository(L => { + for (const F of this.repositories) { + if (F.vscodeId === L.id) { + F.disposables.forEach(O => O.dispose()); + } + } + this.repositories = this.repositories.filter(F => F.vscodeId !== L.id); + })); + this.c = this.lb(); + this.D(this.Z.onWillSaveState(() => { + this.G(); + this.kb(); + })); + } + async getHighLevelFolderDescription() { + return this.ab.indexingProvider?.getHighLevelFolderDescription(); + } + getPastGenerations() { + return Array.from(this.z.values()).sort((e, t) => t.unixMs - e.unixMs); + } + registerNewGeneration(e) { + if (this.streamingAbortControllers.size > 100) { + console.warn("There are more than 100 streaming abort controllers. This should not happen unless the user is starting a massive amount of generations in parallel. Clearing all of them."); + this.streamingAbortControllers.clear(); + } + const t = e.generationUUID ?? Ft(); + const s = new AbortController(); + this.streamingAbortControllers.set(t, s); + this.$.setNonPersistentStorage("inprogressAIGenerations", n => [...n, { + generationUUID: t, + metadata: e.metadata ?? { + type: undefined + }, + queuePositionResponse: undefined, + rerunQuery: e.rerunQuery + }]); + this.z.set(t, { + unixMs: Date.now(), + generationUUID: t, + type: e.metadata?.type, + textDescription: e.metadata !== undefined && "textDescription" in e.metadata ? e.metadata.textDescription : undefined + }); + this.G(); + return [t, s]; + } + async availableDocs(e) { + return (await (await this.aiClient()).availableDocs(e, { + headers: Pa(Ft()) + })).docs; + } + async refreshDefaultModels() { + try { + const s = (await (await this.aiClient()).availableModels(new nzt({ + isNightly: this.M.version.includes("nightly"), + excludeMaxNamedModels: true + }), { + headers: Pa(Ft()) + })).models; + this.$.setApplicationUserPersistentStorage("availableDefaultModels2", s); + if (this.$.applicationUserPersistentStorage.oneTimeSettings.shouldMigrateFromGpt4ToGpt4o === true) { + this.migrateFromGpt4ToGpt4o(); + } + if (this.$.applicationUserPersistentStorage.oneTimeSettings.shouldMigrateFromGpt4oToClaudeSonnet === true) { + this.migrateFromGpt4oToClaudeSonnet(); + } + this.maybeMigrateBackToGpt4oIfUsingOpenAIApiKey(); + } catch (e) { + console.error("Error refreshing default models:", e); + } + this.W.handleAvailableModelsChange(); + } + async performDefaultModelRequest() { + const t = await (await this.aiClient()).getDefaultModelNudgeData(new Dzt(), { + headers: Pa(Ft()) + }); + const s = t.modelsWithNoDefaultSwitch; + this.$.setApplicationUserPersistentStorage("aiSettings", "modelsWithNoDefaultSwitch", s); + this.$.setApplicationUserPersistentStorage("aiSettings", "modelDefaultSwitchOnNewChat", t.shouldDefaultSwitchOnNewChat); + this.checkLastDefaultModelNudge(t.nudgeDate, s); + } + checkLastDefaultModelNudge(e, t) { + const s = this.W.getMaxMode("composer"); + const n = this.hb.getModeUseMax("agent") ?? false; + if (s || n) { + if (e !== "0") { + this.$.setApplicationUserPersistentStorage("aiSettings", "lastDefaultModelNudge", e); + } + return; + } + const r = this.$.applicationUserPersistentStorage.aiSettings.lastDefaultModelNudge; + if (e === "0") { + return; + } + if (r !== undefined) { + const a = parseInt(r, 10); + const l = parseInt(e, 10); + if (!isNaN(a) && !isNaN(l)) { + if (a >= l) { + return; + } + } else { + return; + } + } + const o = this.hb.getModeModel("agent"); + if (o !== "default" && o !== undefined && !t.includes(o)) { + this.hb.setModeModel("agent", "default"); + } + if (!t.includes(this.W.getComposerModel())) { + this.W.setComposerModel("default"); + } + this.$.setApplicationUserPersistentStorage("aiSettings", "lastDefaultModelNudge", e); + } + migrateFromGpt4ToGpt4o() { + if (this.$.applicationUserPersistentStorage.oneTimeSettings.shouldMigrateFromGpt4ToGpt4o === false) { + return; + } + this.$.setApplicationUserPersistentStorage("oneTimeSettings", "shouldMigrateFromGpt4ToGpt4o", false); + this.W.enableModel("gpt-4o"); + const e = this.$.applicationUserPersistentStorage.aiSettings.openAIModel; + const t = this.$.applicationUserPersistentStorage.aiSettings.regularChatModel; + const s = this.$.applicationUserPersistentStorage.aiSettings.cmdKModel; + const n = this.$.applicationUserPersistentStorage.aiSettings.terminalCmdKModel; + this.W.disableModel("gpt-4"); + if (e === "gpt-4") { + this.$.setApplicationUserPersistentStorage("aiSettings", "openAIModel", "gpt-4o"); + } + if (t === "gpt-4") { + this.$.setApplicationUserPersistentStorage("aiSettings", "regularChatModel", "gpt-4o"); + } + if (s === "gpt-4") { + this.$.setApplicationUserPersistentStorage("aiSettings", "cmdKModel", "gpt-4o"); + } + if (n === "gpt-4") { + this.$.setApplicationUserPersistentStorage("aiSettings", "terminalCmdKModel", "gpt-4o"); + } + } + migrateFromGpt4oToClaudeSonnet() { + if (this.$.applicationUserPersistentStorage.oneTimeSettings.shouldMigrateFromGpt4oToClaudeSonnet === false || this.W.getUseOpenAIKey() === true) { + return; + } + this.$.setApplicationUserPersistentStorage("oneTimeSettings", "shouldMigrateFromGpt4oToClaudeSonnet", false); + this.W.enableModel("claude-3.5-sonnet"); + const e = this.$.applicationUserPersistentStorage.aiSettings.openAIModel; + const t = this.$.applicationUserPersistentStorage.aiSettings.regularChatModel; + const s = this.$.applicationUserPersistentStorage.aiSettings.cmdKModel; + const n = this.$.applicationUserPersistentStorage.aiSettings.terminalCmdKModel; + if (e === "gpt-4o" || e === "gpt-4") { + this.$.setApplicationUserPersistentStorage("aiSettings", "openAIModel", "claude-3.5-sonnet"); + } + if (t === "gpt-4o" || t === "gpt-4") { + this.$.setApplicationUserPersistentStorage("oneTimeSettings", "didMigrateFromGpt4oToClaudeSonnet", true); + this.$.setApplicationUserPersistentStorage("aiSettings", "regularChatModel", "claude-3.5-sonnet"); + } + if (s === "gpt-4o" || s === "gpt-4") { + this.$.setApplicationUserPersistentStorage("aiSettings", "cmdKModel", "claude-3.5-sonnet"); + } + if (n === "gpt-4o" || n === "gpt-4") { + this.$.setApplicationUserPersistentStorage("aiSettings", "terminalCmdKModel", "claude-3.5-sonnet"); + } + } + maybeMigrateBackToGpt4oIfUsingOpenAIApiKey() { + if (this.W.getUseOpenAIKey() === true) { + this.maybeMigrateBackFromClaudeSonnetToGpt4o(); + } + } + maybeMigrateBackFromClaudeSonnetToGpt4o() { + if (this.$.applicationUserPersistentStorage.oneTimeSettings.didMigrateBackFromClaudeSonnetToGpt4o || !this.$.applicationUserPersistentStorage.oneTimeSettings.didMigrateFromGpt4oToClaudeSonnet) { + return; + } + this.$.setApplicationUserPersistentStorage("oneTimeSettings", "didMigrateBackFromClaudeSonnetToGpt4o", true); + const e = this.$.applicationUserPersistentStorage.aiSettings.openAIModel; + const t = this.$.applicationUserPersistentStorage.aiSettings.regularChatModel; + const s = this.$.applicationUserPersistentStorage.aiSettings.cmdKModel; + const n = this.$.applicationUserPersistentStorage.aiSettings.terminalCmdKModel; + this.W.enableModel("gpt-4o"); + if (e === "claude-3.5-sonnet") { + this.$.setApplicationUserPersistentStorage("aiSettings", "openAIModel", "gpt-4o"); + } + if (t === "claude-3.5-sonnet") { + this.$.setApplicationUserPersistentStorage("aiSettings", "regularChatModel", "gpt-4o"); + } + if (s === "claude-3.5-sonnet") { + this.$.setApplicationUserPersistentStorage("aiSettings", "cmdKModel", "gpt-4o"); + } + if (n === "claude-3.5-sonnet") { + this.$.setApplicationUserPersistentStorage("aiSettings", "terminalCmdKModel", "gpt-4o"); + } + } + setLastDraftMessage(e) { + this.y = e; + } + getLastDraftMessage() { + return this.y; + } + getPreviousPrompts(e) { + return [...this.c.filter(t => e === undefined || t.commandType === e).map(t => t.text)].concat(this.y != null ? [this.y] : []); + } + addToPromptHistory({ + prompt: e, + commandType: t + }) { + if (this.c.length > 300) { + this.c.splice(0, 50); + } + if (this.c.length === 0 || this.c[this.c.length - 1].text !== e) { + this.c.push({ + text: e, + commandType: t + }); + } + } + kb() { + const e = this.c.map(t => ({ + text: t.text, + commandType: t.commandType + })); + this.Z.store(this.f, JSON.stringify(e), 1, 1); + } + lb() { + return JSON.parse(this.Z.get(this.f, 1, "[]")); + } + getMultipleModelDetails(e) { + const t = this.getModelDetails(e); + let s = false; + if (e?.specificModelField) { + s = this.W.getMaxMode(e?.specificModelField); + } + return (o => o ? o.split(",") : [])(t.modelName).map(o => this.getModelDetailsFromName(o, s)); + } + getModelDetailsFromName(e, t) { + let s = this.U.getApiKeyForModel(e); + const n = this.W.getUseApiKeyForModel(e); + const r = this.$.applicationUserPersistentStorage.azureState; + const o = this.$.applicationUserPersistentStorage.bedrockState; + if (!n || !s) { + s = undefined; + } + const a = this.W.getServerModelName(e); + return new Qa({ + apiKey: s, + modelName: a, + azureState: r, + openaiApiBaseUrl: this.$.applicationUserPersistentStorage.openAIBaseUrl, + bedrockState: o, + maxMode: t + }); + } + getModelDetails({ + specificModelField: e, + composerModeId: t + } = {}) { + let s; + let n; + if (t) { + s = this.hb.getModeModel(t) ?? this.W.getComposerModel(); + n = this.hb.getModeUseMax(t) ?? this.W.getMaxMode("composer"); + } else if (e) { + switch (e) { + case "regular-chat": + s = this.W.getRegularChatModel(); + break; + case "cmd-k": + s = this.W.getCmdKModel(); + break; + case "terminal-cmd-k": + s = this.W.getTerminalCmdKModel(); + break; + case "composer": + s = this.W.getComposerModel(); + break; + case "background-composer": + s = this.W.getBackgroundComposerModel(); + break; + } + n = this.W.getMaxMode(e); + } else { + s = this.W.getModel(); + } + return this.getModelDetailsFromName(s, n); + } + async *streamResponse({ + modelDetails: e, + streamer: t, + streamerURL: s, + generationUUID: n, + rethrowCancellation: r, + rerun: o, + failSilently: a = false, + source: l = "other", + startTime: c + }) { + const u = await this.aiClient(); + let d = true; + let h; + const g = () => { + if (!d || e === undefined) { + this.$.setNonPersistentStorage("inprogressAIGenerations", p => p.generationUUID === n, p => ({ + ...p, + queuePositionResponse: undefined + })); + return; + } + u.checkQueuePosition(new mzt({ + origRequestId: n, + modelDetails: e + })).then(p => { + this.$.setNonPersistentStorage("inprogressAIGenerations", b => b.generationUUID === n, b => ({ + ...b, + queuePositionResponse: p + })); + h = setTimeout(g, 1000); + }).catch(p => {}); + }; + h = setTimeout(g, 1000); + try { + try { + let p = 0; + for await (const b of t) { + p++; + yield b; + if (d) { + if (b instanceof Ive) { + if (b.response.case === "editStream") { + d = false; + } + } else if (typeof b != "object" || b === null) { + d = false; + } else if ("text" in b) { + if (b.text !== "") { + d = false; + } + } else { + d = false; + } + } + } + this.streamingAbortControllers.delete(n); + } catch (p) { + d = false; + if (p.code !== Kw.Canceled) { + console.error(p); + } + if (!(p instanceof Eg) || (p.code === Kw.Canceled || a || this.X.handleError(p, e, n, s, l, o), r)) { + throw p; + } + } + } finally { + d = false; + this.$.setNonPersistentStorage("inprogressAIGenerations", p => p.filter(b => b.generationUUID !== n)); + } + } + async *streamResponseText(e) { + const t = this.streamResponse(e); + for await (const { + text: s + } of t) { + yield s; + } + } + decrementBubbleTimesLeft() { + if (this.$.applicationUserPersistentStorage.bubbleTimesLeft > 0) { + this.$.setApplicationUserPersistentStorage("bubbleTimesLeft", this.$.applicationUserPersistentStorage.bubbleTimesLeft - 1); + } + } + updatePersonalContext(e) { + this.Z.store("aicontext.personalContext", e, -1, 1); + } + updateAdditionalFiles(e) { + this.R.updateValue("aicontext.additionalFiles", e, 2); + } + getPersonalContext() { + const e = this.Z.get("aicontext.personalContext", -1, ""); + if (e.trim() === "Always respond in") { + return ""; + } else { + return e; + } + } + getAdditionalFiles() { + return this.R.getValue("aicontext.additionalFiles"); + } + addRepository(e) { + const t = []; + const s = []; + const n = []; + if (e.provider.remotes) { + e.provider.remotes.forEach(o => { + const a = o.fetchUrl ?? o.pushUrl; + if (a) { + t.push(a); + s.push(o.name); + } + }); + } + if (e.provider.onDidChangeRemotes) { + n.push(e.provider.onDidChangeRemotes(() => { + t.length = 0; + s.length = 0; + if (e.provider.remotes) { + e.provider.remotes.forEach(o => { + const a = o.fetchUrl ?? o.pushUrl; + if (a) { + t.push(a); + s.push(o.name); + } + }); + } + })); + } + const r = e.provider.rootUri ? this.Q.asRelativePath(e.provider.rootUri) : ""; + this.repositories.push({ + repoInfo: new pc({ + relativeWorkspacePath: r, + remoteUrls: t, + remoteNames: s + }), + vscodeId: e.provider.id, + disposables: n + }); + } + aiClient() { + return this.h.get(); + } + forceRefreshAiClient() { + this.h.createServer(); + } + uploadClient() { + return this.j.get(); + } + cmdKClient() { + return this.m.get(); + } + interpreterClient() { + return this.q.get(); + } + experimentClient() { + return this.t.get(); + } + backgroundComposerClient() { + return this.u.get(); + } + aiBranchClient() { + return this.n.get(); + } + getLastActiveFileEditor() { + return this.Y.getLastActiveFileEditor(); + } + async getCurrentFileInfoFromRawWithScrubbingAndNotebookHandling(e, t, s, n, r) { + let o = s; + if (e.scheme === me.aiChat) { + return; + } + let a = await this.cb.cleanText(t, e.path); + if (n) { + const c = a.split(` +`); + const u = o.startLineNumber - 1; + const d = o.endLineNumber - 1; + c.splice(u, d - u + 1, n); + a = c.join(` +`); + o = new Z(o.startLineNumber, o.startColumn, o.startLineNumber + n.split(` +`).length - 1, o.startColumn); + } + const l = bl(this.I.activeEditorPane); + if (l && r !== undefined) { + const c = l.getCellsInRange(); + let u = c.findIndex(w => w.id === r); + const d = c.map(w => w.getText()); + const g = c.map(w => w.model.outputs).map(w => { + const C = w.map(S => S.outputs.map(k => { + if (k.mime === "text/plain") { + return k.data.toString(); + } + if (k.mime === "application/vnd.code.notebook.error") { + const E = k.data.toString(); + let D = JSON.parse(E); + const P = D.stack.replace(/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]/g, "").replace(/\u001b\[0/g, ""); + D = { + ...D, + stack: P + }; + return JSON.stringify(D, null, 2); + } else if (k.mime === "application/vnd.code.notebook.stderr") { + return k.data.toString(); + } + return ""; + }).join(` + +`)).join(` + +`); + if (C.length > 400) { + return `${C.slice(0, 200)} +...output cropped... +${C.slice(-200)}`; + } else { + return C; + } + }); + const p = d.map((w, C) => { + if (w === "" || w === undefined) { + return ""; + } + const S = `in[${C}]: ${w}`; + if (g[C] === "" || g[C] === undefined) { + return S; + } + const x = `out[${C}]: ${g[C]}`; + return `${S} + +${x}`; + }); + const b = `${p.slice(0, u).join(` + +`)} + +`; + const v = ` + +${p.slice(u + 1).join(` + +`)}`; + a = b + a + v; + const y = b.split(` +`).length - 1; + o = new Z(y + o.startLineNumber, o.startColumn, y + o.endLineNumber, o.endColumn); + e = l.textModel?.uri ?? e; + } + return new tu({ + relativeWorkspacePath: this.Q.asRelativePath(e), + contents: a, + cursorPosition: new sv({ + line: o.startLineNumber - 1, + column: o.startColumn - 1 + }), + selection: new eD({ + startPosition: new sv({ + line: ma(o.startLineNumber - 1), + column: ma(o.startColumn - 1) + }), + endPosition: new sv({ + line: ma(o.endLineNumber - 1), + column: ma(o.endColumn - 1) + }) + }), + languageId: "" + }); + } + async getCurrentFileInfo(e, t) { + return await this.Y.getCurrentFileInfo(e, t); + } + async getCursorRulesFile() { + if (this.$.workspaceUserPersistentStorage.ignoreCursorRules === true) { + return; + } + const e = performance.now(); + let t; + try { + const s = await this.Q.resolveRelativePath(".cursorrules"); + t = await this.bb.createModelReference(s); + return t.object.textEditorModel.getValue(); + } catch { + return; + } finally { + const s = performance.now(); + console.debug(`[Explicit context] took ${s - e}ms`); + t?.dispose(); + } + } + async getExplicitContext(e) { + let t; + if (e) { + const n = this.hb.getMode(e); + if (n && n.customRulesForAI !== undefined) { + t = n.customRulesForAI; + } + } + const s = await this.gb.getExplicitRules(); + return new Qg({ + context: this.getPersonalContext(), + repoContext: await this.getCursorRulesFile(), + rules: s.map(n => new XT({ + name: n.filename.replace(nW, ""), + description: n.description, + body: n.alwaysApply ? n.body : undefined, + alwaysApply: n.alwaysApply + })), + modeSpecificContext: t + }); + } + docsCitationsMiddleware(e, t, s) { + this.$.setWorkspaceUserPersistentStorage("persistentChatMetadata", o => o.bubbleId === t && o.tabId === s, "docsCitations", []); + const n = o => { + this.$.setWorkspaceUserPersistentStorage("persistentChatMetadata", a => a.bubbleId === t && a.tabId === s, "docsCitations", a => [...(a ?? []), o]); + }; + return async function* () { + for await (const o of e) { + if (o !== null && typeof o == "object" && "docsReference" in o && o.docsReference !== undefined) { + n(o.docsReference); + } + yield o; + } + }(); + } + webCitationsAndStatusMiddleware(e, t, s) { + this.$.setWorkspaceUserPersistentStorage("persistentChatMetadata", a => a.bubbleId === t && a.tabId === s, "webCitations", []); + const n = a => { + console.log("[Adding Web Citations]", a); + this.$.setWorkspaceUserPersistentStorage("persistentChatMetadata", l => l.bubbleId === t && l.tabId === s, "webCitations", l => [...(l ?? []), ...a.references]); + }; + const r = a => { + this.$.setWorkspaceUserPersistentStorage("persistentChatMetadata", l => l.bubbleId === t && l.tabId === s, "statusUpdates", a); + }; + return async function* () { + for await (const a of e) { + if (a !== null && typeof a == "object" && "webCitation" in a && a.webCitation !== undefined && a.webCitation !== null) { + n(a.webCitation); + } + if (a !== null && typeof a == "object" && "statusUpdates" in a && a.statusUpdates !== undefined && a.statusUpdates !== null) { + r(a.statusUpdates); + } + yield a; + } + }(); + } + intermediateChunkMiddleware(e, t, s) { + const n = () => { + this.$.setWorkspaceUserPersistentStorage("persistentChatMetadata", l => l.bubbleId === t && l.tabId === s, "intermediateChunks", []); + }; + n(); + const r = l => { + this.$.setWorkspaceUserPersistentStorage("persistentChatMetadata", c => c.bubbleId === t && c.tabId === s, "intermediateSectionType", l); + }; + r(); + const o = (l, c) => { + const u = this.$.workspaceUserPersistentStorage.persistentChatMetadata.find(w => w.bubbleId === t && w.tabId === s)?.intermediateSectionType; + const d = c.chunkType === QT.CODEBASE ? "codebase" : c.chunkType === QT.LONG_FILE ? "long-file" : "docs"; + if (u !== d) { + n(); + } + r(d); + const h = this.$.workspaceUserPersistentStorage.persistentChatMetadata.find(w => w.bubbleId === t && w.tabId === s); + if (h === undefined) { + return; + } + let g = h.intermediateChunks ?? []; + const p = (w, C) => w.startLine === C.startLine && w.fileName === C.fileName; + let b = g.findIndex(w => p(w.chunkIdentity, c)); + if (b === -1) { + b = g.length; + } + const v = g.find(w => p(w.chunkIdentity, c)); + g = [...g.filter(w => !p(w.chunkIdentity, c))]; + const y = { + chunkIdentity: v?.chunkIdentity ?? c, + completeText: (v?.completeText ?? "") + l + }; + g.splice(b, 0, y); + this.$.setWorkspaceUserPersistentStorage("persistentChatMetadata", w => w.bubbleId === t && w.tabId === s, "intermediateChunks", g); + }; + return async function* () { + for await (const l of e) { + if (l !== null && typeof l == "object" && "isBigFile" in l && l.isBigFile) { + r("long-file"); + } + if (l !== null && typeof l == "object" && "chunkIdentity" in l && l.chunkIdentity !== undefined) { + o(l.intermediateText ?? "", l.chunkIdentity); + } + yield l; + } + }(); + } + getLongContextTokenLimit(e, t) { + return e ?? (t === "cursor-long-context" ? 140000 : undefined); + } + async reportGenerationFeedback(e, t, s) { + await (await this.aiClient()).reportGenerationFeedback({ + requestId: e, + feedbackType: t, + comment: s + }); + } + async getLongContextFileSearchResults(e, t) { + const s = {}; + for (const o of e) { + const a = o.codeBlock?.relativeWorkspacePath ?? ""; + s[a] ||= 0; + s[a] = Math.max(s[a], o.score); + } + const n = async o => { + try { + return (await this.S.readFile(this.Q.resolveRelativePath(o))).value.toString(); + } catch { + return ""; + } + }; + return (await Promise.all(Object.entries(s).map(async ([o, a]) => new Dut({ + file: { + relativeWorkspacePath: o, + contents: await n(o) + }, + score: a + })))).sort((o, a) => a.score - o.score); + } + async *streamContextResponse({ + modelDetails: e, + streamer: t, + generationUUID: s, + rethrowCancellation: n, + rerun: r, + streamerURL: o, + failSilently: a = false + }) { + let l = []; + try { + const c = await t.next().then(h => h.value); + const u = "usedCode" in c ? c.usedCode : undefined; + if (u !== undefined) { + l = u.codeResults; + } + yield* this.streamResponseText({ + streamer: t, + streamerURL: o, + generationUUID: s, + modelDetails: e, + rethrowCancellation: n, + rerun: r, + failSilently: a, + source: "chat" + }); + } catch (c) { + this.$.setNonPersistentStorage("inprogressAIGenerations", u => u.filter(d => d.generationUUID !== s)); + if (c.code !== Kw.Canceled) { + console.error(c); + } + if (!(c instanceof Eg) || (c.code === Kw.Canceled || a || this.X.handleError(c, e, s, o, "chat", r), n)) { + throw c; + } + } + } + async streamCursorTutor(e, t, s) { + let n; + for (const [h, g] of [...e.entries()].reverse()) { + if (g.type === _n.HUMAN && g.text !== "") { + n = e[h].text; + break; + } + } + if (n === undefined) { + return async function* () { + yield "You don't seem to have provided any request in your last message. Please type something and try again."; + }(); + } + this.decrementBubbleTimesLeft(); + this.L.publicLogCapture("Submitted cursor tutor freeform"); + this.L.publicLogCapture("Submitted Prompt"); + const r = s?.overrideModelDetails || this.getModelDetails({ + specificModelField: "regular-chat" + }); + this.L.publicLogCapture("submitted.freeform", { + model: r.modelName + }); + const [o, a] = this.registerNewGeneration({ + metadata: t + }); + const l = new izt({ + conversation: e, + modelDetails: r + }); + this.addToPromptHistory({ + prompt: n, + commandType: J5.CHAT + }); + const u = (await this.aiClient()).streamCursorTutor(l, { + signal: a.signal, + headers: Pa(o) + }); + const d = of.typeName + "/" + of.methods.streamCursorTutor.name; + return this.streamResponseText({ + modelDetails: r, + generationUUID: o, + streamer: fP(u), + streamerURL: d, + rethrowCancellation: true, + rerun: s?.rerun, + source: "chat" + }); + } + async streamPriomptPrompt(e, t, s, n) { + const r = JSON.stringify(t); + const o = await this.aiClient(); + const a = new Kjt({ + promptProps: r, + promptPropsTypeName: s.typeName + }); + const [l, c] = this.registerNewGeneration({ + metadata: n + }); + const u = o.streamPriomptPrompt(a, { + signal: c.signal, + headers: Pa(l) + }); + const d = of.typeName + "/" + of.methods.streamPriomptPrompt.name; + return this.streamResponseText({ + streamer: fP(u), + streamerURL: d, + generationUUID: l, + source: "other", + modelDetails: this.getModelDetails({ + specificModelField: "regular-chat" + }), + rethrowCancellation: true + }); + } + async getEffectiveTokenLimit(e) { + const n = e.modelName; + if (!n) { + return 200000; + } + const r = this.mb.get(n); + if (r) { + const [a, l] = r; + if (l > new Date()) { + return a; + } + } + const o = await this.aiClient(); + try { + const l = (await o.getEffectiveTokenLimit(new Xjt({ + modelDetails: e + }))).tokenLimit; + this.mb.set(n, [l, new Date(Date.now() + 86400000)]); + return l; + } catch (a) { + console.error(a); + return 200000; + } + } + getFilteredOutline(e, t, s) { + const n = [4, 5, 7, 8, 9, 10, 11, 13, 21]; + return e.map(r => { + if ((r.kind !== 11 || !r.name.includes("callback")) && n.includes(r.kind) && !s.has(r)) { + s.add(r); + let o = t.getLineContent(r.range.startLineNumber); + if (!o.endsWith("{") && (r.kind === 5 || r.kind === 8 || r.kind === 11 || r.kind === 4)) { + let c = r.range.startLineNumber; + while (c <= r.range.endLineNumber && !t.getLineContent(c).endsWith("{")) { + c++; + } + if (c <= r.range.endLineNumber) { + const u = { + startLineNumber: r.range.startLineNumber, + startColumn: 1, + endLineNumber: c, + endColumn: t.getLineMaxColumn(c) + }; + o = t.getValueInRange(u); + } + } + const a = o.match(/^\s*/)?.[0] ?? ""; + const l = o.endsWith("{") ? `${a}}` : undefined; + return { + ...r, + children: this.getFilteredOutline(r.children ?? [], t, s), + text: o, + endingBrace: l + }; + } + }).filter(r => r !== undefined); + } + async streamInlineLongCompletion(e, t, s, n, r) { + this.L.publicLogCapture("Submitted Long Completion"); + this.L.publicLogCapture("Submitted Prompt"); + const o = r ?? this.Y.getCurrentFileInfoSyncWithoutDataframes(); + const a = n?.overrideModelDetails || this.getModelDetails({ + specificModelField: "cmd-k" + }); + const [l, c] = this.registerNewGeneration({ + metadata: { + type: undefined + }, + generationUUID: s + }); + let u = await this.db.getFilteredRecentChunks(10); + const d = new W3s({ + currentFile: n?.removeAllContext !== true ? o : undefined, + contextBlocks: u.length === 0 ? [] : [{ + contextType: pre.RECENT_LOCATIONS, + blocks: u.map(v => uti(v)) + }], + modelDetails: a + }); + this.decrementBubbleTimesLeft(); + const g = (await this.aiClient()).streamInlineLongCompletion(d, { + signal: c.signal, + headers: Pa(s) + }); + const p = of.typeName + "/" + of.methods.streamInlineLongCompletion.name; + const b = this.streamResponseText({ + streamer: fP(g), + streamerURL: p, + generationUUID: s, + source: "other", + modelDetails: a, + rethrowCancellation: true + }); + return this.splitStreamSeparateNewLineChars(b); + } + async streamBackgroundEdit(e, t, s, n, r, o) { + this.L.publicLogCapture("Submitted background edit"); + const a = o?.overrideModelDetails || this.getModelDetails({ + specificModelField: "cmd-k" + }); + this.L.publicLogCapture("submitted.backgroundedit", { + model: a.modelName + }); + const [l, c] = this.registerNewGeneration({ + metadata: { + type: undefined + }, + generationUUID: r + }); + const u = new pzt({ + currentFile: e, + workspaceRootPath: this.H.getWorkspaceRootPath(), + explicitContext: await this.getExplicitContext(), + gitDiff: t, + modelDetails: a, + stop: s, + importLineInDiff: n + }); + const h = (await this.aiClient()).streamBackgroundEdit(u, { + signal: c.signal, + headers: Pa(r) + }); + const g = of.typeName + "/" + of.methods.streamBackgroundEdit.name; + const p = this.streamResponseText({ + streamer: fP(h), + streamerURL: g, + generationUUID: r, + modelDetails: a, + source: "other", + rethrowCancellation: true, + failSilently: true + }); + return this.streamLines(p); + } + async streamNewLintRule(e) { + const t = this.$.applicationUserPersistentStorage.lintRules; + const s = new hzt({ + dismissedBug: e, + currentRules: t + }); + const n = await this.aiClient(); + const r = Ft(); + const [o, a] = this.registerNewGeneration({ + metadata: undefined, + generationUUID: r + }); + const l = n.streamNewLintRule(s, { + signal: a.signal, + headers: Pa(r) + }); + const c = "/aiserver.v1.AiService/" + n.streamNewLintRule.name; + return this.streamResponseText({ + streamer: fP(l), + streamerURL: c, + generationUUID: r, + rethrowCancellation: true, + source: "other", + failSilently: true + }); + } + async streamLint(e, t, s, n, r) { + const o = r?.overrideModelDetails || this.getModelDetails({ + specificModelField: "cmd-k" + }); + this.L.publicLogCapture("submitted.lint", { + model: o.modelName + }); + const [a, l] = this.registerNewGeneration({ + metadata: undefined, + generationUUID: n + }); + const c = new Ezt({ + currentFile: e, + workspaceRootPath: this.H.getWorkspaceRootPath(), + explicitContext: await this.getExplicitContext(), + modelDetails: o, + badNotifications: t, + lintRules: s + }); + const d = (await this.aiClient()).streamLint(c, { + signal: l.signal, + headers: Pa(n) + }); + const h = of.typeName + "/" + of.methods.streamLint.name; + return this.streamResponseText({ + streamer: fP(d), + streamerURL: h, + generationUUID: n, + modelDetails: o, + rethrowCancellation: true, + source: "other", + failSilently: true + }); + } + async streamAiPreviewSummary({ + realContext: e, + isDetailed: t + }) { + const s = this.getModelDetails({ + specificModelField: "regular-chat" + }); + const n = await this.getCurrentFileInfo(); + const r = Ft(); + const o = new V3s({ + currentFile: n, + modelDetails: s, + intent: { + mainSymbolsToAnalyzeFromGoToDef: e?.definitions, + mainSymbolHoverDetails: e?.hoverDetails, + mainSymbolsToAnalyzeFromImplementations: e?.implementations + }, + isDetailed: t + }); + const [a, l] = this.registerNewGeneration({ + metadata: undefined, + generationUUID: r + }); + const u = (await this.aiClient()).streamAiPreviews(o, { + signal: l.signal, + headers: Pa(r) + }); + const d = of.typeName + "/" + of.methods.streamAiPreviews.name; + return this.streamResponseText({ + streamer: fP(u), + streamerURL: d, + generationUUID: r, + modelDetails: s, + source: "other", + rethrowCancellation: true + }); + } + async *streamLines(e) { + let t = ""; + for await (const s of e) { + for (t += s; t.includes(` +`) || t.includes(`\r +`);) { + let n = t.search(/\r?\n/); + yield t.slice(0, n); + t = t.slice(n + (t[n] === "\r" ? 2 : 1)); + } + } + while (t.includes(` +`) || t.includes(`\r +`)) { + let s = t.search(/\r?\n/); + yield t.slice(0, s); + t = t.slice(s + (t[s] === "\r" ? 2 : 1)); + } + yield t.replace("\r", ""); + } + async *splitStreamSeparateNewLineChars(e) { + for await (let t of e) { + if (t !== "") { + while (t.includes(` +`) || t.includes(`\r +`)) { + let s = t.search(/\r?\n/); + yield t.slice(0, s); + yield t[s] === "\r" ? `\r +` : ` +`; + t = t.slice(s + (t[s] === "\r" ? 2 : 1)); + } + yield t; + } + } + } + async streamGPTFourEdit(e, t, s, n, r, o, a) { + const l = n ?? this.Y.getCurrentFileInfoSyncWithoutDataframes(); + const c = s?.overrideModelDetails || this.getModelDetails({ + specificModelField: "cmd-k" + }); + this.L.publicLogCapture("submitted.gpt4edit", { + model: c.modelName + }); + const [u, d] = this.registerNewGeneration({ + metadata: undefined, + generationUUID: t + }); + e = (r ?? []).map(y => `\`\`\`${y.uri.path} +${y.rawText} +\`\`\` +`) + e; + const h = new fzt({ + query: e, + currentFile: l, + workspaceRootPath: this.H.getWorkspaceRootPath(), + modelDetails: c, + explicitContext: await this.getExplicitContext(), + linterErrors: a, + codeBlocks: [] + }); + this.addToPromptHistory({ + prompt: e, + commandType: J5.GPT_FOUR_EDIT + }); + const p = (await this.aiClient()).streamGPTFourEdit(h, { + signal: d.signal, + headers: Pa(t) + }); + const b = of.typeName + "/" + of.methods.streamGPTFourEdit.name; + const v = this.streamResponseText({ + streamer: fP(p), + streamerURL: b, + generationUUID: t, + modelDetails: c, + source: "other", + rethrowCancellation: true + }); + return this.streamLines(v); + } + async fakeInlineStreamEdits() { + return { + [Symbol.asyncIterator]() { + let t = 0; + return { + next() { + if (t < 3) { + return Promise.resolve({ + value: { + newLine: "hi" + t + }, + done: false + }); + } else { + return Promise.resolve({ + value: { + newLine: "hi done" + }, + done: true + }); + } + } + }; + } + }; + } + async getSearch(e) { + return (await (await this.aiClient()).getSearch({ + repositories: this.repositories.map(n => n.repoInfo), + query: e, + topK: 15 + })).results; + } + async insertCodeCellAndRun(e) { + const t = bl(this.I.activeEditorPane); + if (!t || !t.hasModel()) { + return; + } + let s = null; + t.focus(); + const n = t.getActiveCell(); + if (n) { + const r = t.getCellIndex(n); + s = BR(this.J, t, r, qn.Code, "below", e, true); + } else { + const r = t.getFocus(); + const o = Math.max(r.end - 1, 0); + s = BR(this.J, t, o, qn.Code, "below", e, true); + } + if (s) { + await t.focusNotebookCell(s, "container"); + await t.executeNotebookCells([s]); + } + } + get controlProvider() { + return this.Y.controlProvider; + } + registerControlProvider(e, t) { + return this.Y.registerControlProvider(e, t); + } + nb(e) { + return e.flatMap(s => s.attachedFolders).map(s => `${s.startsWith("/") ? s.substring(1) : s}/**`); + } + async getSimplePrompt(e, t) { + const s = await this.aiClient(); + const n = new vzt({ + query: e, + answerPlaceholder: t + }); + return (await s.getSimplePrompt(n, { + headers: Pa(Ft()) + })).result; + } + async getPassthroughPrompt(e, t) { + const s = await this.aiClient(); + const n = new yzt({ + query: e, + modelName: t + }); + return (await s.getPassthroughPrompt(n, { + headers: Pa(Ft()) + })).result; + } + async getUsageData() { + return (await (await this.aiClient()).getUserInfo({}, { + headers: Pa(Ft()) + })).usage; + } + async uploadDocumentation(e) { + return await (await this.uploadClient()).uploadDocumentation(e, { + headers: Pa(Ft()) + }); + } + async uploadDocumentationStatus(e) { + return await (await this.uploadClient()).uploadDocumentationStatus(e, { + headers: Pa(Ft()) + }); + } + async getPages(e) { + const t = await this.uploadClient(); + const s = new z3s(e); + return await t.getPages(s, { + headers: Pa(Ft()) + }); + } + async computeExampleCodebaseQuestions() { + if (this.$.nonPersistentStorage.repositoryIndexingStatus?.case !== "synced") { + return []; + } + try { + const e = `what's a good and concise question to ask about this codebase? it should be something specific, like "where is X defined and how is it being used". do not use the actual name of X but rewrite it in your own, simple words, concisely. include three completely different questions, about different parts of the codebase, in a markdown numbered list, and say nothing else`; + const t = this.eb.getModels().map(g => Iw(g.uri.path)); + const n = [...new Set(t)].slice(0, 10); + n.push("ts"); + n.push("py"); + n.push("go"); + const r = `{${n.map(g => `*.${g}`).join(",")}}`; + const o = await this.ab.parallelSearch(`what's a good question to ask about this codebase? it should be something specific, like "where is X defined and how is it being used"`, 100, 100, { + globFilter: r + }); + if (o.length < 3) { + return []; + } + const a = new Edt({ + canHandleFilenamesAfterLanguageIds: true, + workspaceRootPath: this.H.getWorkspaceRootPath(), + conversation: [new Al({ + text: e, + type: _n.HUMAN + })], + modelDetails: this.getModelDetails({ + specificModelField: "regular-chat" + }), + explicitContext: await this.getExplicitContext(), + rerankResults: false, + rerankResultsV2: false, + contextResults: { + case: "codeSearchResults", + value: { + results: o + } + } + }); + const c = (await this.aiClient()).streamChatContext(a, { + headers: Pa(Ft()) + }); + let u = ""; + for await (const g of c) { + u += g.text; + } + return (g => { + const p = /^\d+\.\s+(.*)$/gm; + let b; + const v = []; + while ((b = p.exec(g)) !== null) { + if (b.index === p.lastIndex) { + p.lastIndex++; + } + const y = b[1] || b[0]; + v.push(y.trim()); + } + return v; + })(u); + } catch { + return []; + } + } + async *aiQueryV2(e, t, s, n) { + const r = await this.aiClient(); + const o = this.getModelDetails({ + specificModelField: "regular-chat" + }); + const a = Ft(); + const l = await this.getCurrentFileInfo(); + const c = await this.ab.getNewRepoInfo(); + const u = new Lve({ + currentFile: l, + repositoryInfo: c, + conversation: e, + workspaceRootPath: this.H.getWorkspaceRootPath(), + modelDetails: o, + fasterAndStupider: false, + useGlobs: s, + queryType: t === OF.keyword ? a5.KEYWORDS : a5.EMBEDDINGS + }); + const [d, h] = this.registerNewGeneration({ + metadata: n, + generationUUID: a + }); + const g = of.typeName + "/" + of.methods.modelQueryV2.name; + yield* this.streamResponse({ + streamer: fP(r.modelQueryV2(u, { + signal: h.signal, + headers: Pa(a) + })), + modelDetails: o, + streamerURL: g, + generationUUID: a, + rethrowCancellation: true, + source: "chat" + }); + } + async generateCommitMessage(e) { + return (await (await this.aiClient()).writeGitCommitMessage(e, { + headers: Pa(Ft()) + })).commitMessage; + } + async aiQuery(e, t) { + const s = await this.aiClient(); + const n = this.getModelDetails({ + specificModelField: "regular-chat" + }); + const r = Ft(); + const o = await this.getCurrentFileInfo(); + const a = new Lve({ + currentFile: o, + repositories: this.repositories.map(d => d.repoInfo), + conversation: e, + workspaceRootPath: this.H.getWorkspaceRootPath(), + modelDetails: n, + queryType: t === OF.keyword ? a5.KEYWORDS : a5.EMBEDDINGS + }); + const [l, c] = this.registerNewGeneration({ + metadata: undefined, + generationUUID: r + }); + return (await s.modelQuery(a, { + signal: c.signal, + headers: Pa(r) + })).queries; + } + async countTokens(e, t) { + return (await this.aiClient()).countTokens(e, t); + } + async testBedrockCredentials(e, t, s, n) { + const o = await (await this.aiClient()).testBedrockCredentials({ + accessKey: e, + secretKey: t, + region: s, + modelName: n + }); + return { + valid: o.success, + error: o.error + }; + } + isMaxModel(e) { + const t = this.hb.getComposerUnifiedMode(e); + const n = this.getModelDetails({ + composerModeId: t + })?.modelName; + return typeof n == "string" && n.toLowerCase().endsWith("-max"); + } +}; +cti = __decorate([__param(0, bbt), __param(1, Te), __param(2, As), __param(3, Ot), __param(4, ys), __param(5, Km), __param(6, Qw), __param(7, kt), __param(8, ve), __param(9, Ct), __param(10, $u), __param(11, uy), __param(12, sW), __param(13, Dwe), __param(14, ht), __param(15, _i), __param(16, sy), __param(17, ns), __param(18, vE), __param(19, VA), __param(20, $s), __param(21, re), __param(22, G5), __param(23, pC), __param(24, tCe), __param(25, cy)], cti); +it(Wl, cti, 1); +var uti = i => i.range ? new Xg({ + relativeWorkspacePath: i.relativeWorkspacePath, + contents: i.contents, + range: { + startPosition: { + line: ma(i.range.startLineNumber), + column: ma(i.range.startColumn) + }, + endPosition: { + line: ma(i.range.endLineNumber), + column: ma(i.range.endColumn) + } + } +}) : new Xg({ + relativeWorkspacePath: i.relativeWorkspacePath, + contents: i.contents +}); +te(); +yt(); +q(); +It(); +Ms(); +Cs(); +qh(); +Rs(); +Ee(); +cne(); +var E9s = Ve("inlineGPT4Service"); +var dti = class extends H { + constructor(e, t, s, n, r) { + super(); + this.c = e; + this.f = t; + this.g = s; + this.h = n; + this.j = r; + this.a = new Map(); + } + isEndOfScopeToken(e) { + let t = e.trim(); + return t === "}" || t === "]" || t === ")"; + } + async streamCompletion({ + uri: e, + triggerPosition: t, + currentLine: s, + generationUUID: n, + streamingLines: r, + undoRedo: o, + editor: a, + cancellationToken: l, + onFirstTokenListener: c, + onDoneListener: u, + shouldSwitchToNewLine: d + }) { + const h = await this.addCompletion({ + uri: e, + triggerPosition: t, + generationUUID: n, + currentRange: { + startLineNumber: t.lineNumber, + endLineNumberExclusive: t.lineNumber + 1 + }, + _isPostCopilot: d ?? false + }, a, o); + const g = s.search(/\S|$/); + let p = g; + let b = false; + let v = true; + let y = false; + let w = 0; + let C = ""; + try { + for await (let S of r) { + if (l.isCancellationRequested) { + break; + } + w++; + if (v) { + c(); + } + if (S === ` +` || S === `\r +`) { + if (y) { + C += S; + continue; + } + h.addToken(S); + p = 0; + continue; + } + const x = S.search(/\S|$/); + if (x === -1) { + C += S; + const E = S.replace(/\n/g, "").replace(/\r\n/g, "").length; + p += E; + continue; + } else { + S = C + S; + p += x; + C = ""; + } + let k = S.trimStart(); + if (k !== "") { + if (y && this.isEndOfScopeToken(k)) { + h.addToken(S); + } else if (p < g) { + if (this.isEndOfScopeToken(k)) { + h.addToken(S); + y = true; + } else { + break; + } + } else { + h.addToken(S); + } + } else { + h.addToken(S); + } + v = false; + } + } catch (S) { + console.error("error while streaming lines:", S); + b = true; + } + if (b) { + console.error("failed to complete streaming"); + h.finishFailure(); + } + u(); + h.dispose(); + } + async addCompletion(e, t, s) { + const n = new tz(); + const r = new ICr(e, n, this.h, this.f, t); + this.a.set(r.id, r); + if (s) { + const o = new wA("InlineGPT4", "InlineGPT4", e.uri, s.undo, s.redo); + this.h.pushElement(o, n); + } + return r; + } + pushUndoRedoElement(e) { + this.h.pushElement(e); + } + findHandlerGivenPosition(e) { + const t = e.getPosition(); + if (t) { + for (const [s, n] of this.a) { + const r = n.completion.triggerPosition.lineNumber; + const o = n.completion.livePositionOfCursor.lineNumber; + const a = t.lineNumber; + const l = n.completion.uri.toString() === e.getModel()?.uri.toString(); + if (r <= a && a < o && l) { + return { + handler: n, + id: s + }; + } + } + } + } + findHandlersGivenEditor(e) { + const t = e.getPosition(); + const s = e.getModel(); + if (!t || !s) { + return []; + } + let n = []; + for (const [r, o] of this.a) { + if (o.completion.uri.toString() === s.uri.toString()) { + n.push({ + handler: o, + id: r + }); + } + } + return n; + } + acceptCompletion(e) { + const { + handler: t, + id: s + } = this.findHandlerGivenPosition(e) ?? { + handler: undefined, + id: undefined + }; + if (!!t && !!s) { + t.accept(); + this.a.delete(s); + } + } + acceptImplicitly(e) { + const t = this.findHandlersGivenEditor(e); + for (const s of t) { + s.handler.acceptImplicitly(); + this.a.delete(s.id); + } + } + rejectCompletion(e) { + const { + handler: t, + id: s + } = this.findHandlerGivenPosition(e) ?? { + handler: undefined, + id: undefined + }; + if (!!t && !!s) { + t.reject(); + this.a.delete(s); + } + } + cancelCompletion(e) { + this.removeHandler(e); + } + removeHandler(e) { + const t = this.a.get(e); + if (t) { + this.a.delete(e); + t.dispose(); + } + } +}; +dti = __decorate([__param(0, re), __param(1, ns), __param(2, _i), __param(3, Hh), __param(4, Ne)], dti); +it(E9s, dti, 1); +var ICr = class extends H { + get id() { + return this.completion.id; + } + constructor(i, e, t, s, n) { + super(); + this.h = e; + this.j = t; + this.m = s; + this.q = n; + this.c = []; + this.f = []; + this.g = false; + this.u = true; + this.a = {}; + this.m.createModelReference(i.uri).then(r => { + this.a = r; + }).catch(r => { + console.error("InlineLongCompletionHandler#constructor: error while creating model reference:", r); + this.g = true; + }); + this.completion = { + id: i.generationUUID, + livePositionOfCursor: i.triggerPosition, + onAccept: () => {}, + onReject: () => {}, + newTextLines: [], + ...i + }; + } + dispose() { + if (this._checkInvariants()) { + this.a.dispose(); + super.dispose(); + } + } + r() { + const i = this.a.object.textEditorModel; + const e = this.c; + i.deltaDecorations(e, []); + this.c = []; + } + acceptImplicitly() { + this.r(); + } + accept() { + this.r(); + const i = this.completion.livePositionOfCursor.lineNumber; + this.q.setPosition(new je(i, this.a.object.textEditorModel.getLineMaxColumn(i))); + } + reject() { + this.j.undo(this.a.object.textEditorModel.uri); + this.r(); + } + addToken(i) { + if (!this._checkInvariants()) { + return; + } + const e = this.a.object.textEditorModel.getEOL(); + if (i === ` +` || i === `\r +`) { + this.completion.newTextLines.push(""); + this._updatePositionAndDecorationsWithNewLine(); + } else { + this.completion.newTextLines[this.completion.newTextLines.length - 1] += i; + this._updatePositionAndDecorationsWithNewToken(i); + } + this.u &&= false; + } + finishFailure() { + this.g; + } + _checkInvariants() { + return !this.g; + } + _updatePositionAndDecorationsWithNewLine() { + const i = this.a.object.textEditorModel; + const e = i.getEOL(); + const t = this.completion.livePositionOfCursor; + const s = this.completion.triggerPosition; + const n = [{ + range: new Z(t.lineNumber, t.column, t.lineNumber, t.column), + text: e, + forceMoveMarkers: true + }]; + i.pushEditOperations([], n, () => null, this.h); + const r = this.completion.livePositionOfCursor.lineNumber; + this.completion.livePositionOfCursor = { + lineNumber: r + 1, + column: 1 + }; + } + _updatePositionAndDecorationsWithNewToken(i) { + const e = this.a.object.textEditorModel; + const t = e.getEOL(); + const s = this.completion.livePositionOfCursor; + const n = this.completion.triggerPosition; + if (this.u && !this.completion._isPostCopilot) { + const c = i.trimStart(); + const u = [{ + range: new Z(s.lineNumber, s.column, s.lineNumber, s.column), + text: c, + forceMoveMarkers: true + }]; + e.pushEditOperations([], u, () => null, this.h); + } else { + const c = [{ + range: new Z(s.lineNumber, s.column, s.lineNumber, s.column), + text: i, + forceMoveMarkers: true + }]; + e.pushEditOperations([], c, () => null, this.h); + } + this.q.setPosition(n); + const r = { + range: new Z(s.lineNumber, 1, s.lineNumber, 1), + options: { + isWholeLine: true, + description: "inline-long-completion", + className: "inline-long-completion" + } + }; + const o = { + range: new Z(s.lineNumber, 1, s.lineNumber, 1), + options: { + isWholeLine: true, + description: "inline-long-completion-opacitycover", + inlineClassName: "inline-long-completion-opacitycover", + zIndex: 10 + } + }; + this.f.push(o); + this.c = this.a.object.textEditorModel.deltaDecorations(this.c, this.f); + const a = this.completion.livePositionOfCursor.lineNumber; + const l = this.completion.livePositionOfCursor.column; + this.completion.livePositionOfCursor = { + lineNumber: s.lineNumber, + column: l + i.length + }; + } +}; +pe(); +Rs(); +xe(); +q(); +Fi(); +Cs(); +$(); +$(); +We(); +xe(); +var DCr = Y("
    "); +function TCr(i, e) { + const [t, s] = ae(1); + const n = Kt(i); + Fe(() => { + s(1); + const r = n.setInterval(() => { + s(o => o === 3 ? 1 : o + 1); + }, 175); + Qt(() => { + n.clearInterval(r); + }); + }); + return e.reactiveStorageRoot.render(() => (() => { + var r = DCr(); + r.style.setProperty("display", "flex"); + r.style.setProperty("position", "absolute"); + r.style.setProperty("align-items", "center"); + r.style.setProperty("height", "12px"); + r.style.setProperty("overflow", "hidden"); + r.style.setProperty("z-index", "100"); + r.style.setProperty("font-size", "8px"); + r.style.setProperty("left", "40px"); + M(r, () => ".".repeat(t())); + return r; + })(), i); +} +var hti; +var fti = class extends H { + static { + hti = this; + } + static { + this.a = 0; + } + constructor(e, t, s) { + super(); + this.c = e; + this.keybindingService = t; + this.f = s; + this.id = `InlineGPT4LoadingZone${hti.a++}`; + this.reactiveStorageRoot = this.D(this.f.createScoped(this)); + this.b = G("div.inlineGPT4LoadingViewZone"); + this.D(TCr(this.b, this)); + } + dispose() { + super.dispose(); + } + getDomNode() { + return this.b; + } +}; +fti = hti = __decorate([__param(1, oi), __param(2, _i)], fti); +xe(); +q(); +Fi(); +$(); +$(); +wI(); +rt(); +var PCr = Y("
    for GPT-4"); +var LCr = 2051; +var I9s = tee(LCr, Ia); +function RCr(i, e) { + const t = I9s ? ` ${e.keybindingService.resolveKeybinding(I9s)[0].getLabel()}` : ""; + return e.reactiveStorageRoot.render(() => (() => { + var s = PCr(); + var n = s.firstChild; + s.style.setProperty("visibility", "hidden"); + s.style.setProperty("display", "none"); + s.style.setProperty("position", "absolute"); + s.style.setProperty("align-items", "center"); + s.style.setProperty("height", "12px"); + s.style.setProperty("overflow", "hidden"); + s.style.setProperty("z-index", "100"); + s.style.setProperty("font-size", "8px"); + s.style.setProperty("left", "400px"); + M(s, t, n); + return s; + })(), i); +} +te(); +Cs(); +var gti; +var pti = class extends H { + static { + gti = this; + } + static { + this.a = 0; + } + constructor(e, t, s, n) { + super(); + this.c = e; + this.keybindingService = t; + this.f = s; + this.g = n; + this.id = `InlineGPT4HintViewZone${gti.a++}`; + this.reactiveStorageRoot = this.D(this.g.createScoped(this)); + this.b = G("div.inlineGPT4HintViewZone"); + this.D(RCr(this.b, this)); + } + dispose() { + super.dispose(); + } + getDomNode() { + return this.b; + } +}; +pti = gti = __decorate([__param(1, oi), __param(2, re), __param(3, _i)], pti); +xe(); +q(); +Fi(); +te(); +Cs(); +$(); +$(); +$(); +We(); +wI(); +rt(); +var D9s; +(function (i) { + i[i.Unknown = 0] = "Unknown"; + i[i.Disabled = 1] = "Disabled"; + i[i.Enabled = 2] = "Enabled"; +})(D9s ||= {}); +var T9s; +(function (i) { + i[i.Invoke = 1] = "Invoke"; + i[i.Auto = 2] = "Auto"; +})(T9s ||= {}); +var P9s; +(function (i) { + i[i.None = 0] = "None"; + i[i.KeepWhitespace = 1] = "KeepWhitespace"; + i[i.InsertAsSnippet = 4] = "InsertAsSnippet"; +})(P9s ||= {}); +var L9s; +(function (i) { + i[i.Method = 0] = "Method"; + i[i.Function = 1] = "Function"; + i[i.Constructor = 2] = "Constructor"; + i[i.Field = 3] = "Field"; + i[i.Variable = 4] = "Variable"; + i[i.Class = 5] = "Class"; + i[i.Struct = 6] = "Struct"; + i[i.Interface = 7] = "Interface"; + i[i.Module = 8] = "Module"; + i[i.Property = 9] = "Property"; + i[i.Event = 10] = "Event"; + i[i.Operator = 11] = "Operator"; + i[i.Unit = 12] = "Unit"; + i[i.Value = 13] = "Value"; + i[i.Constant = 14] = "Constant"; + i[i.Enum = 15] = "Enum"; + i[i.EnumMember = 16] = "EnumMember"; + i[i.Keyword = 17] = "Keyword"; + i[i.Text = 18] = "Text"; + i[i.Color = 19] = "Color"; + i[i.File = 20] = "File"; + i[i.Reference = 21] = "Reference"; + i[i.Customcolor = 22] = "Customcolor"; + i[i.Folder = 23] = "Folder"; + i[i.TypeParameter = 24] = "TypeParameter"; + i[i.User = 25] = "User"; + i[i.Issue = 26] = "Issue"; + i[i.Snippet = 27] = "Snippet"; +})(L9s ||= {}); +var R9s; +(function (i) { + i[i.Deprecated = 1] = "Deprecated"; +})(R9s ||= {}); +var N9s; +(function (i) { + i[i.Invoke = 0] = "Invoke"; + i[i.TriggerCharacter = 1] = "TriggerCharacter"; + i[i.TriggerForIncompleteCompletions = 2] = "TriggerForIncompleteCompletions"; +})(N9s ||= {}); +var M9s; +(function (i) { + i[i.EXACT = 0] = "EXACT"; + i[i.ABOVE = 1] = "ABOVE"; + i[i.BELOW = 2] = "BELOW"; +})(M9s ||= {}); +var A9s; +(function (i) { + i[i.NotSet = 0] = "NotSet"; + i[i.ContentFlush = 1] = "ContentFlush"; + i[i.RecoverFromMarkers = 2] = "RecoverFromMarkers"; + i[i.Explicit = 3] = "Explicit"; + i[i.Paste = 4] = "Paste"; + i[i.Undo = 5] = "Undo"; + i[i.Redo = 6] = "Redo"; +})(A9s ||= {}); +var $9s; +(function (i) { + i[i.LF = 1] = "LF"; + i[i.CRLF = 2] = "CRLF"; +})($9s ||= {}); +var F9s; +(function (i) { + i[i.Text = 0] = "Text"; + i[i.Read = 1] = "Read"; + i[i.Write = 2] = "Write"; +})(F9s ||= {}); +var O9s; +(function (i) { + i[i.None = 0] = "None"; + i[i.Keep = 1] = "Keep"; + i[i.Brackets = 2] = "Brackets"; + i[i.Advanced = 3] = "Advanced"; + i[i.Full = 4] = "Full"; +})(O9s ||= {}); +var _9s; +(function (i) { + i[i.acceptSuggestionOnCommitCharacter = 0] = "acceptSuggestionOnCommitCharacter"; + i[i.acceptSuggestionOnEnter = 1] = "acceptSuggestionOnEnter"; + i[i.accessibilitySupport = 2] = "accessibilitySupport"; + i[i.accessibilityPageSize = 3] = "accessibilityPageSize"; + i[i.ariaLabel = 4] = "ariaLabel"; + i[i.ariaRequired = 5] = "ariaRequired"; + i[i.autoClosingBrackets = 6] = "autoClosingBrackets"; + i[i.autoClosingComments = 7] = "autoClosingComments"; + i[i.screenReaderAnnounceInlineSuggestion = 8] = "screenReaderAnnounceInlineSuggestion"; + i[i.autoClosingDelete = 9] = "autoClosingDelete"; + i[i.autoClosingOvertype = 10] = "autoClosingOvertype"; + i[i.autoClosingQuotes = 11] = "autoClosingQuotes"; + i[i.autoIndent = 12] = "autoIndent"; + i[i.automaticLayout = 13] = "automaticLayout"; + i[i.autoSurround = 14] = "autoSurround"; + i[i.bracketPairColorization = 15] = "bracketPairColorization"; + i[i.guides = 16] = "guides"; + i[i.codeLens = 17] = "codeLens"; + i[i.codeLensFontFamily = 18] = "codeLensFontFamily"; + i[i.codeLensFontSize = 19] = "codeLensFontSize"; + i[i.colorDecorators = 20] = "colorDecorators"; + i[i.colorDecoratorsLimit = 21] = "colorDecoratorsLimit"; + i[i.columnSelection = 22] = "columnSelection"; + i[i.comments = 23] = "comments"; + i[i.contextmenu = 24] = "contextmenu"; + i[i.copyWithSyntaxHighlighting = 25] = "copyWithSyntaxHighlighting"; + i[i.cursorBlinking = 26] = "cursorBlinking"; + i[i.cursorSmoothCaretAnimation = 27] = "cursorSmoothCaretAnimation"; + i[i.cursorStyle = 28] = "cursorStyle"; + i[i.cursorSurroundingLines = 29] = "cursorSurroundingLines"; + i[i.cursorSurroundingLinesStyle = 30] = "cursorSurroundingLinesStyle"; + i[i.cursorWidth = 31] = "cursorWidth"; + i[i.disableLayerHinting = 32] = "disableLayerHinting"; + i[i.disableMonospaceOptimizations = 33] = "disableMonospaceOptimizations"; + i[i.domReadOnly = 34] = "domReadOnly"; + i[i.dragAndDrop = 35] = "dragAndDrop"; + i[i.dropIntoEditor = 36] = "dropIntoEditor"; + i[i.experimentalEditContextEnabled = 37] = "experimentalEditContextEnabled"; + i[i.emptySelectionClipboard = 38] = "emptySelectionClipboard"; + i[i.experimentalGpuAcceleration = 39] = "experimentalGpuAcceleration"; + i[i.experimentalWhitespaceRendering = 40] = "experimentalWhitespaceRendering"; + i[i.extraEditorClassName = 41] = "extraEditorClassName"; + i[i.fastScrollSensitivity = 42] = "fastScrollSensitivity"; + i[i.find = 43] = "find"; + i[i.fixedOverflowWidgets = 44] = "fixedOverflowWidgets"; + i[i.folding = 45] = "folding"; + i[i.foldingStrategy = 46] = "foldingStrategy"; + i[i.foldingHighlight = 47] = "foldingHighlight"; + i[i.foldingImportsByDefault = 48] = "foldingImportsByDefault"; + i[i.foldingMaximumRegions = 49] = "foldingMaximumRegions"; + i[i.unfoldOnClickAfterEndOfLine = 50] = "unfoldOnClickAfterEndOfLine"; + i[i.fontFamily = 51] = "fontFamily"; + i[i.fontInfo = 52] = "fontInfo"; + i[i.fontLigatures = 53] = "fontLigatures"; + i[i.fontSize = 54] = "fontSize"; + i[i.fontWeight = 55] = "fontWeight"; + i[i.fontVariations = 56] = "fontVariations"; + i[i.formatOnPaste = 57] = "formatOnPaste"; + i[i.formatOnType = 58] = "formatOnType"; + i[i.glyphMargin = 59] = "glyphMargin"; + i[i.gotoLocation = 60] = "gotoLocation"; + i[i.hideCursorInOverviewRuler = 61] = "hideCursorInOverviewRuler"; + i[i.hover = 62] = "hover"; + i[i.inDiffEditor = 63] = "inDiffEditor"; + i[i.inlineSuggest = 64] = "inlineSuggest"; + i[i.letterSpacing = 65] = "letterSpacing"; + i[i.lightbulb = 66] = "lightbulb"; + i[i.lineDecorationsWidth = 67] = "lineDecorationsWidth"; + i[i.lineHeight = 68] = "lineHeight"; + i[i.lineNumbers = 69] = "lineNumbers"; + i[i.lineNumbersMinChars = 70] = "lineNumbersMinChars"; + i[i.linkedEditing = 71] = "linkedEditing"; + i[i.links = 72] = "links"; + i[i.matchBrackets = 73] = "matchBrackets"; + i[i.minimap = 74] = "minimap"; + i[i.mouseStyle = 75] = "mouseStyle"; + i[i.mouseWheelScrollSensitivity = 76] = "mouseWheelScrollSensitivity"; + i[i.mouseWheelZoom = 77] = "mouseWheelZoom"; + i[i.multiCursorMergeOverlapping = 78] = "multiCursorMergeOverlapping"; + i[i.multiCursorModifier = 79] = "multiCursorModifier"; + i[i.multiCursorPaste = 80] = "multiCursorPaste"; + i[i.multiCursorLimit = 81] = "multiCursorLimit"; + i[i.occurrencesHighlight = 82] = "occurrencesHighlight"; + i[i.occurrencesHighlightDelay = 83] = "occurrencesHighlightDelay"; + i[i.overtypeCursorStyle = 84] = "overtypeCursorStyle"; + i[i.overtypeOnPaste = 85] = "overtypeOnPaste"; + i[i.overviewRulerBorder = 86] = "overviewRulerBorder"; + i[i.overviewRulerLanes = 87] = "overviewRulerLanes"; + i[i.padding = 88] = "padding"; + i[i.pasteAs = 89] = "pasteAs"; + i[i.parameterHints = 90] = "parameterHints"; + i[i.peekWidgetDefaultFocus = 91] = "peekWidgetDefaultFocus"; + i[i.placeholder = 92] = "placeholder"; + i[i.definitionLinkOpensInPeek = 93] = "definitionLinkOpensInPeek"; + i[i.quickSuggestions = 94] = "quickSuggestions"; + i[i.quickSuggestionsDelay = 95] = "quickSuggestionsDelay"; + i[i.readOnly = 96] = "readOnly"; + i[i.readOnlyMessage = 97] = "readOnlyMessage"; + i[i.renameOnType = 98] = "renameOnType"; + i[i.renderControlCharacters = 99] = "renderControlCharacters"; + i[i.renderFinalNewline = 100] = "renderFinalNewline"; + i[i.renderLineHighlight = 101] = "renderLineHighlight"; + i[i.renderLineHighlightOnlyWhenFocus = 102] = "renderLineHighlightOnlyWhenFocus"; + i[i.renderValidationDecorations = 103] = "renderValidationDecorations"; + i[i.renderWhitespace = 104] = "renderWhitespace"; + i[i.revealHorizontalRightPadding = 105] = "revealHorizontalRightPadding"; + i[i.roundedSelection = 106] = "roundedSelection"; + i[i.rulers = 107] = "rulers"; + i[i.scrollbar = 108] = "scrollbar"; + i[i.scrollBeyondLastColumn = 109] = "scrollBeyondLastColumn"; + i[i.scrollBeyondLastLine = 110] = "scrollBeyondLastLine"; + i[i.scrollPredominantAxis = 111] = "scrollPredominantAxis"; + i[i.selectionClipboard = 112] = "selectionClipboard"; + i[i.selectionHighlight = 113] = "selectionHighlight"; + i[i.selectOnLineNumbers = 114] = "selectOnLineNumbers"; + i[i.showFoldingControls = 115] = "showFoldingControls"; + i[i.showUnused = 116] = "showUnused"; + i[i.snippetSuggestions = 117] = "snippetSuggestions"; + i[i.smartSelect = 118] = "smartSelect"; + i[i.smoothScrolling = 119] = "smoothScrolling"; + i[i.stickyScroll = 120] = "stickyScroll"; + i[i.stickyTabStops = 121] = "stickyTabStops"; + i[i.stopRenderingLineAfter = 122] = "stopRenderingLineAfter"; + i[i.suggest = 123] = "suggest"; + i[i.suggestFontSize = 124] = "suggestFontSize"; + i[i.suggestLineHeight = 125] = "suggestLineHeight"; + i[i.suggestOnTriggerCharacters = 126] = "suggestOnTriggerCharacters"; + i[i.suggestSelection = 127] = "suggestSelection"; + i[i.tabCompletion = 128] = "tabCompletion"; + i[i.tabIndex = 129] = "tabIndex"; + i[i.unicodeHighlighting = 130] = "unicodeHighlighting"; + i[i.unusualLineTerminators = 131] = "unusualLineTerminators"; + i[i.useShadowDOM = 132] = "useShadowDOM"; + i[i.useTabStops = 133] = "useTabStops"; + i[i.wordBreak = 134] = "wordBreak"; + i[i.wordSegmenterLocales = 135] = "wordSegmenterLocales"; + i[i.wordSeparators = 136] = "wordSeparators"; + i[i.wordWrap = 137] = "wordWrap"; + i[i.wordWrapBreakAfterCharacters = 138] = "wordWrapBreakAfterCharacters"; + i[i.wordWrapBreakBeforeCharacters = 139] = "wordWrapBreakBeforeCharacters"; + i[i.wordWrapColumn = 140] = "wordWrapColumn"; + i[i.wordWrapOverride1 = 141] = "wordWrapOverride1"; + i[i.wordWrapOverride2 = 142] = "wordWrapOverride2"; + i[i.wrappingIndent = 143] = "wrappingIndent"; + i[i.wrappingStrategy = 144] = "wrappingStrategy"; + i[i.showDeprecated = 145] = "showDeprecated"; + i[i.inlayHints = 146] = "inlayHints"; + i[i.effectiveCursorStyle = 147] = "effectiveCursorStyle"; + i[i.editorClassName = 148] = "editorClassName"; + i[i.pixelRatio = 149] = "pixelRatio"; + i[i.tabFocusMode = 150] = "tabFocusMode"; + i[i.layoutInfo = 151] = "layoutInfo"; + i[i.wrappingInfo = 152] = "wrappingInfo"; + i[i.defaultColorDecorators = 153] = "defaultColorDecorators"; + i[i.colorDecoratorsActivatedOn = 154] = "colorDecoratorsActivatedOn"; + i[i.inlineCompletionsAccessibilityVerbose = 155] = "inlineCompletionsAccessibilityVerbose"; +})(_9s ||= {}); +var B9s; +(function (i) { + i[i.TextDefined = 0] = "TextDefined"; + i[i.LF = 1] = "LF"; + i[i.CRLF = 2] = "CRLF"; +})(B9s ||= {}); +var U9s; +(function (i) { + i[i.LF = 0] = "LF"; + i[i.CRLF = 1] = "CRLF"; +})(U9s ||= {}); +var W9s; +(function (i) { + i[i.Left = 1] = "Left"; + i[i.Center = 2] = "Center"; + i[i.Right = 3] = "Right"; +})(W9s ||= {}); +var V9s; +(function (i) { + i[i.Increase = 0] = "Increase"; + i[i.Decrease = 1] = "Decrease"; +})(V9s ||= {}); +var H9s; +(function (i) { + i[i.None = 0] = "None"; + i[i.Indent = 1] = "Indent"; + i[i.IndentOutdent = 2] = "IndentOutdent"; + i[i.Outdent = 3] = "Outdent"; +})(H9s ||= {}); +var q9s; +(function (i) { + i[i.Both = 0] = "Both"; + i[i.Right = 1] = "Right"; + i[i.Left = 2] = "Left"; + i[i.None = 3] = "None"; +})(q9s ||= {}); +var j9s; +(function (i) { + i[i.Type = 1] = "Type"; + i[i.Parameter = 2] = "Parameter"; +})(j9s ||= {}); +var z9s; +(function (i) { + i[i.Automatic = 0] = "Automatic"; + i[i.Explicit = 1] = "Explicit"; +})(z9s ||= {}); +var J9s; +(function (i) { + i[i.Invoke = 0] = "Invoke"; + i[i.Automatic = 1] = "Automatic"; +})(J9s ||= {}); +var Sbt; +(function (i) { + i[i.DependsOnKbLayout = -1] = "DependsOnKbLayout"; + i[i.Unknown = 0] = "Unknown"; + i[i.Backspace = 1] = "Backspace"; + i[i.Tab = 2] = "Tab"; + i[i.Enter = 3] = "Enter"; + i[i.Shift = 4] = "Shift"; + i[i.Ctrl = 5] = "Ctrl"; + i[i.Alt = 6] = "Alt"; + i[i.PauseBreak = 7] = "PauseBreak"; + i[i.CapsLock = 8] = "CapsLock"; + i[i.Escape = 9] = "Escape"; + i[i.Space = 10] = "Space"; + i[i.PageUp = 11] = "PageUp"; + i[i.PageDown = 12] = "PageDown"; + i[i.End = 13] = "End"; + i[i.Home = 14] = "Home"; + i[i.LeftArrow = 15] = "LeftArrow"; + i[i.UpArrow = 16] = "UpArrow"; + i[i.RightArrow = 17] = "RightArrow"; + i[i.DownArrow = 18] = "DownArrow"; + i[i.Insert = 19] = "Insert"; + i[i.Delete = 20] = "Delete"; + i[i.Digit0 = 21] = "Digit0"; + i[i.Digit1 = 22] = "Digit1"; + i[i.Digit2 = 23] = "Digit2"; + i[i.Digit3 = 24] = "Digit3"; + i[i.Digit4 = 25] = "Digit4"; + i[i.Digit5 = 26] = "Digit5"; + i[i.Digit6 = 27] = "Digit6"; + i[i.Digit7 = 28] = "Digit7"; + i[i.Digit8 = 29] = "Digit8"; + i[i.Digit9 = 30] = "Digit9"; + i[i.KeyA = 31] = "KeyA"; + i[i.KeyB = 32] = "KeyB"; + i[i.KeyC = 33] = "KeyC"; + i[i.KeyD = 34] = "KeyD"; + i[i.KeyE = 35] = "KeyE"; + i[i.KeyF = 36] = "KeyF"; + i[i.KeyG = 37] = "KeyG"; + i[i.KeyH = 38] = "KeyH"; + i[i.KeyI = 39] = "KeyI"; + i[i.KeyJ = 40] = "KeyJ"; + i[i.KeyK = 41] = "KeyK"; + i[i.KeyL = 42] = "KeyL"; + i[i.KeyM = 43] = "KeyM"; + i[i.KeyN = 44] = "KeyN"; + i[i.KeyO = 45] = "KeyO"; + i[i.KeyP = 46] = "KeyP"; + i[i.KeyQ = 47] = "KeyQ"; + i[i.KeyR = 48] = "KeyR"; + i[i.KeyS = 49] = "KeyS"; + i[i.KeyT = 50] = "KeyT"; + i[i.KeyU = 51] = "KeyU"; + i[i.KeyV = 52] = "KeyV"; + i[i.KeyW = 53] = "KeyW"; + i[i.KeyX = 54] = "KeyX"; + i[i.KeyY = 55] = "KeyY"; + i[i.KeyZ = 56] = "KeyZ"; + i[i.Meta = 57] = "Meta"; + i[i.ContextMenu = 58] = "ContextMenu"; + i[i.F1 = 59] = "F1"; + i[i.F2 = 60] = "F2"; + i[i.F3 = 61] = "F3"; + i[i.F4 = 62] = "F4"; + i[i.F5 = 63] = "F5"; + i[i.F6 = 64] = "F6"; + i[i.F7 = 65] = "F7"; + i[i.F8 = 66] = "F8"; + i[i.F9 = 67] = "F9"; + i[i.F10 = 68] = "F10"; + i[i.F11 = 69] = "F11"; + i[i.F12 = 70] = "F12"; + i[i.F13 = 71] = "F13"; + i[i.F14 = 72] = "F14"; + i[i.F15 = 73] = "F15"; + i[i.F16 = 74] = "F16"; + i[i.F17 = 75] = "F17"; + i[i.F18 = 76] = "F18"; + i[i.F19 = 77] = "F19"; + i[i.F20 = 78] = "F20"; + i[i.F21 = 79] = "F21"; + i[i.F22 = 80] = "F22"; + i[i.F23 = 81] = "F23"; + i[i.F24 = 82] = "F24"; + i[i.NumLock = 83] = "NumLock"; + i[i.ScrollLock = 84] = "ScrollLock"; + i[i.Semicolon = 85] = "Semicolon"; + i[i.Equal = 86] = "Equal"; + i[i.Comma = 87] = "Comma"; + i[i.Minus = 88] = "Minus"; + i[i.Period = 89] = "Period"; + i[i.Slash = 90] = "Slash"; + i[i.Backquote = 91] = "Backquote"; + i[i.BracketLeft = 92] = "BracketLeft"; + i[i.Backslash = 93] = "Backslash"; + i[i.BracketRight = 94] = "BracketRight"; + i[i.Quote = 95] = "Quote"; + i[i.OEM_8 = 96] = "OEM_8"; + i[i.IntlBackslash = 97] = "IntlBackslash"; + i[i.Numpad0 = 98] = "Numpad0"; + i[i.Numpad1 = 99] = "Numpad1"; + i[i.Numpad2 = 100] = "Numpad2"; + i[i.Numpad3 = 101] = "Numpad3"; + i[i.Numpad4 = 102] = "Numpad4"; + i[i.Numpad5 = 103] = "Numpad5"; + i[i.Numpad6 = 104] = "Numpad6"; + i[i.Numpad7 = 105] = "Numpad7"; + i[i.Numpad8 = 106] = "Numpad8"; + i[i.Numpad9 = 107] = "Numpad9"; + i[i.NumpadMultiply = 108] = "NumpadMultiply"; + i[i.NumpadAdd = 109] = "NumpadAdd"; + i[i.NUMPAD_SEPARATOR = 110] = "NUMPAD_SEPARATOR"; + i[i.NumpadSubtract = 111] = "NumpadSubtract"; + i[i.NumpadDecimal = 112] = "NumpadDecimal"; + i[i.NumpadDivide = 113] = "NumpadDivide"; + i[i.KEY_IN_COMPOSITION = 114] = "KEY_IN_COMPOSITION"; + i[i.ABNT_C1 = 115] = "ABNT_C1"; + i[i.ABNT_C2 = 116] = "ABNT_C2"; + i[i.AudioVolumeMute = 117] = "AudioVolumeMute"; + i[i.AudioVolumeUp = 118] = "AudioVolumeUp"; + i[i.AudioVolumeDown = 119] = "AudioVolumeDown"; + i[i.BrowserSearch = 120] = "BrowserSearch"; + i[i.BrowserHome = 121] = "BrowserHome"; + i[i.BrowserBack = 122] = "BrowserBack"; + i[i.BrowserForward = 123] = "BrowserForward"; + i[i.MediaTrackNext = 124] = "MediaTrackNext"; + i[i.MediaTrackPrevious = 125] = "MediaTrackPrevious"; + i[i.MediaStop = 126] = "MediaStop"; + i[i.MediaPlayPause = 127] = "MediaPlayPause"; + i[i.LaunchMediaPlayer = 128] = "LaunchMediaPlayer"; + i[i.LaunchMail = 129] = "LaunchMail"; + i[i.LaunchApp2 = 130] = "LaunchApp2"; + i[i.Clear = 131] = "Clear"; + i[i.MAX_VALUE = 132] = "MAX_VALUE"; +})(Sbt ||= {}); +var mti; +(function (i) { + i[i.Hint = 1] = "Hint"; + i[i.Info = 2] = "Info"; + i[i.Warning = 4] = "Warning"; + i[i.Error = 8] = "Error"; +})(mti ||= {}); +var bti; +(function (i) { + i[i.Unnecessary = 1] = "Unnecessary"; + i[i.Deprecated = 2] = "Deprecated"; +})(bti ||= {}); +var G9s; +(function (i) { + i[i.Inline = 1] = "Inline"; + i[i.Gutter = 2] = "Gutter"; +})(G9s ||= {}); +var K9s; +(function (i) { + i[i.Normal = 1] = "Normal"; + i[i.Underlined = 2] = "Underlined"; +})(K9s ||= {}); +var Y9s; +(function (i) { + i[i.UNKNOWN = 0] = "UNKNOWN"; + i[i.TEXTAREA = 1] = "TEXTAREA"; + i[i.GUTTER_GLYPH_MARGIN = 2] = "GUTTER_GLYPH_MARGIN"; + i[i.GUTTER_LINE_NUMBERS = 3] = "GUTTER_LINE_NUMBERS"; + i[i.GUTTER_LINE_DECORATIONS = 4] = "GUTTER_LINE_DECORATIONS"; + i[i.GUTTER_VIEW_ZONE = 5] = "GUTTER_VIEW_ZONE"; + i[i.CONTENT_TEXT = 6] = "CONTENT_TEXT"; + i[i.CONTENT_EMPTY = 7] = "CONTENT_EMPTY"; + i[i.CONTENT_VIEW_ZONE = 8] = "CONTENT_VIEW_ZONE"; + i[i.CONTENT_WIDGET = 9] = "CONTENT_WIDGET"; + i[i.OVERVIEW_RULER = 10] = "OVERVIEW_RULER"; + i[i.SCROLLBAR = 11] = "SCROLLBAR"; + i[i.OVERLAY_WIDGET = 12] = "OVERLAY_WIDGET"; + i[i.OUTSIDE_EDITOR = 13] = "OUTSIDE_EDITOR"; +})(Y9s ||= {}); +var X9s; +(function (i) { + i[i.AIGenerated = 1] = "AIGenerated"; +})(X9s ||= {}); +var Q9s; +(function (i) { + i[i.Invoke = 0] = "Invoke"; + i[i.Automatic = 1] = "Automatic"; +})(Q9s ||= {}); +var Z9s; +(function (i) { + i[i.TOP_RIGHT_CORNER = 0] = "TOP_RIGHT_CORNER"; + i[i.BOTTOM_RIGHT_CORNER = 1] = "BOTTOM_RIGHT_CORNER"; + i[i.TOP_CENTER = 2] = "TOP_CENTER"; +})(Z9s ||= {}); +var xbt; +(function (i) { + i[i.Left = 1] = "Left"; + i[i.Center = 2] = "Center"; + i[i.Right = 4] = "Right"; + i[i.Full = 7] = "Full"; +})(xbt ||= {}); +var e7s; +(function (i) { + i[i.Word = 0] = "Word"; + i[i.Line = 1] = "Line"; + i[i.Suggest = 2] = "Suggest"; +})(e7s ||= {}); +var t7s; +(function (i) { + i[i.Left = 0] = "Left"; + i[i.Right = 1] = "Right"; + i[i.None = 2] = "None"; + i[i.LeftOfInjectedText = 3] = "LeftOfInjectedText"; + i[i.RightOfInjectedText = 4] = "RightOfInjectedText"; +})(t7s ||= {}); +var i7s; +(function (i) { + i[i.Off = 0] = "Off"; + i[i.On = 1] = "On"; + i[i.Relative = 2] = "Relative"; + i[i.Interval = 3] = "Interval"; + i[i.Custom = 4] = "Custom"; +})(i7s ||= {}); +var s7s; +(function (i) { + i[i.None = 0] = "None"; + i[i.Text = 1] = "Text"; + i[i.Blocks = 2] = "Blocks"; +})(s7s ||= {}); +var n7s; +(function (i) { + i[i.Smooth = 0] = "Smooth"; + i[i.Immediate = 1] = "Immediate"; +})(n7s ||= {}); +var r7s; +(function (i) { + i[i.Auto = 1] = "Auto"; + i[i.Hidden = 2] = "Hidden"; + i[i.Visible = 3] = "Visible"; +})(r7s ||= {}); +var vti; +(function (i) { + i[i.LTR = 0] = "LTR"; + i[i.RTL = 1] = "RTL"; +})(vti ||= {}); +var o7s; +(function (i) { + i.Off = "off"; + i.OnCode = "onCode"; + i.On = "on"; +})(o7s ||= {}); +var a7s; +(function (i) { + i[i.Invoke = 1] = "Invoke"; + i[i.TriggerCharacter = 2] = "TriggerCharacter"; + i[i.ContentChange = 3] = "ContentChange"; +})(a7s ||= {}); +var l7s; +(function (i) { + i[i.File = 0] = "File"; + i[i.Module = 1] = "Module"; + i[i.Namespace = 2] = "Namespace"; + i[i.Package = 3] = "Package"; + i[i.Class = 4] = "Class"; + i[i.Method = 5] = "Method"; + i[i.Property = 6] = "Property"; + i[i.Field = 7] = "Field"; + i[i.Constructor = 8] = "Constructor"; + i[i.Enum = 9] = "Enum"; + i[i.Interface = 10] = "Interface"; + i[i.Function = 11] = "Function"; + i[i.Variable = 12] = "Variable"; + i[i.Constant = 13] = "Constant"; + i[i.String = 14] = "String"; + i[i.Number = 15] = "Number"; + i[i.Boolean = 16] = "Boolean"; + i[i.Array = 17] = "Array"; + i[i.Object = 18] = "Object"; + i[i.Key = 19] = "Key"; + i[i.Null = 20] = "Null"; + i[i.EnumMember = 21] = "EnumMember"; + i[i.Struct = 22] = "Struct"; + i[i.Event = 23] = "Event"; + i[i.Operator = 24] = "Operator"; + i[i.TypeParameter = 25] = "TypeParameter"; +})(l7s ||= {}); +var c7s; +(function (i) { + i[i.Deprecated = 1] = "Deprecated"; +})(c7s ||= {}); +var u7s; +(function (i) { + i[i.Hidden = 0] = "Hidden"; + i[i.Blink = 1] = "Blink"; + i[i.Smooth = 2] = "Smooth"; + i[i.Phase = 3] = "Phase"; + i[i.Expand = 4] = "Expand"; + i[i.Solid = 5] = "Solid"; +})(u7s ||= {}); +var d7s; +(function (i) { + i[i.Line = 1] = "Line"; + i[i.Block = 2] = "Block"; + i[i.Underline = 3] = "Underline"; + i[i.LineThin = 4] = "LineThin"; + i[i.BlockOutline = 5] = "BlockOutline"; + i[i.UnderlineThin = 6] = "UnderlineThin"; +})(d7s ||= {}); +var h7s; +(function (i) { + i[i.AlwaysGrowsWhenTypingAtEdges = 0] = "AlwaysGrowsWhenTypingAtEdges"; + i[i.NeverGrowsWhenTypingAtEdges = 1] = "NeverGrowsWhenTypingAtEdges"; + i[i.GrowsOnlyWhenTypingBefore = 2] = "GrowsOnlyWhenTypingBefore"; + i[i.GrowsOnlyWhenTypingAfter = 3] = "GrowsOnlyWhenTypingAfter"; +})(h7s ||= {}); +var f7s; +(function (i) { + i[i.None = 0] = "None"; + i[i.Same = 1] = "Same"; + i[i.Indent = 2] = "Indent"; + i[i.DeepIndent = 3] = "DeepIndent"; +})(f7s ||= {}); +var NCr = Y("
    "); +var r7o = Y("
    Invalid API Key. Please try again."); +var o7o = Y("Using key"); +var a7o = Y("
    "); +var l7o = Y(`
    Bring-your-own-key
    If you'd like, you can put in your OpenAI api key to use Cursor at-cost.
    You can always upgrade later in settings.
    What's the difference between gpt-4 and cursor-small? Gpt-4 is smarter than cursor-small, but slower. The devs are almost always on gpt-4, but occasionally switch to cursor-small for faster results.

    "); +var d7o = dt("tabbar-remove-chat", A.x, "Icon for removing a tab in the tab list for chats."); +function h7o(i) { + return I(f7o, { + get closePopup() { + return i.closePopup; + }, + get style() { + return i.style; + }, + get children() { + return [(() => { + var e = e7o(); + M(e, I(oe, { + get when() { + return i.error instanceof pbt; + }, + get fallback() { + return "Error"; + }, + get children() { + return I(g7o, { + get error() { + return i.error; + } + }); + } + })); + return e; + })(), (() => { + var e = SNn(); + M(e, I(Cc, { + get children() { + return I(ds, { + get when() { + return i.error instanceof pbt; + }, + get children() { + return I(p7o, { + get error() { + return i.error; + }, + get closePopup() { + return i.closePopup; + } + }); + } + }); + } + })); + return e; + })()]; + } + }); +} +function f7o(i) { + const e = wt(); + Fe(() => { + const t = s => { + if (s.key === "Escape") { + i.closePopup(); + } + }; + e.window.addEventListener("keydown", t); + Qt(() => { + e.window.removeEventListener("keydown", t); + }); + }); + return (() => { + var t = t7o(); + var s = t.firstChild; + var n = s.firstChild; + var r = n.firstChild; + t.addEventListener("click", o => { + i.closePopup(); + o.stopPropagation(); + }); + s.addEventListener("click", o => { + o.stopPropagation(); + }); + r.addEventListener("click", () => { + i.closePopup(); + }); + M(n, () => i.children, null); + Ie(o => { + var a = i.style; + var l = ["error__dismiss", le.asClassName(d7o)].join(" "); + o.e = is(t, a, o.e); + if (l !== o.t) { + Xe(r, o.t = l); + } + return o; + }, { + e: undefined, + t: undefined + }); + return t; + })(); +} +function g7o(i) { + return I(Cc, { + fallback: "Error", + get children() { + return [I(ds, { + get when() { + return i.error.error === yo.PRO_USER_USAGE_LIMIT; + }, + children: "Many Slow Requests" + }), I(ds, { + get when() { + return K(() => i.error.error === yo.FREE_USER_USAGE_LIMIT)() && i.error.model.startsWith("gpt-4"); + }, + children: "Limit Reached" + }), I(ds, { + get when() { + return K(() => i.error.error === yo.FREE_USER_USAGE_LIMIT)() && i.error.model.startsWith("gpt-3"); + }, + children: "Limit Reached" + }), I(ds, { + get when() { + return i.error.error === yo.FREE_USER_RATE_LIMIT_EXCEEDED || i.error.error === yo.PRO_USER_RATE_LIMIT_EXCEEDED; + }, + children: "Limit Reached" + }), I(ds, { + get when() { + return i.error.error === yo.NOT_LOGGED_IN; + }, + children: "Login" + }), I(ds, { + get when() { + return i.error.error === yo.BAD_API_KEY; + }, + children: "Invalid API Key" + }), I(ds, { + get when() { + return i.error.error === yo.BAD_MODEL_NAME; + }, + children: "Invalid Model" + })]; + } + }); +} +function p7o(i) { + return I(Cc, { + get fallback() { + return (() => { + var e = i7o(); + var t = e.firstChild; + t.style.setProperty("font-size", "16px"); + t.style.setProperty("margin-bottom", "10px"); + t.style.setProperty("display", "flex"); + t.style.setProperty("justify-content", "center"); + t.style.setProperty("align-items", "center"); + t.style.setProperty("padding", "0px 20px"); + t.style.setProperty("color", "var(--vscode-foreground)"); + M(t, () => i.error.toMessage()); + return e; + })(); + }, + get children() { + return [I(ds, { + get when() { + return K(() => i.error.error === yo.FREE_USER_USAGE_LIMIT)() && (i.error.model.startsWith("gpt-4") || i.error.model.startsWith("claude-3.5-sonnet")); + }, + get children() { + return I(b7o, { + get closePopup() { + return i.closePopup; + }, + get model() { + return i.error.model; + }, + get error() { + return i.error; + } + }); + } + }), I(ds, { + get when() { + return K(() => i.error.error === yo.FREE_USER_USAGE_LIMIT)() && i.error.model.startsWith("gpt-3"); + }, + get children() { + return I(y7o, { + get closePopup() { + return i.closePopup; + }, + get model() { + return i.error.model; + }, + get error() { + return i.error; + } + }); + } + }), I(ds, { + get when() { + return i.error.error === yo.FREE_USER_RATE_LIMIT_EXCEEDED || i.error.error === yo.PRO_USER_RATE_LIMIT_EXCEEDED; + }, + get children() { + return I(m7o, { + get model() { + return i.error.model; + }, + get error() { + return i.error.error; + } + }); + } + }), I(ds, { + get when() { + return i.error.error === yo.NOT_LOGGED_IN || i.error.error === yo.AGENT_REQUIRES_LOGIN; + }, + get children() { + return I(w7o, { + get closePopup() { + return i.closePopup; + }, + get error() { + return i.error; + } + }); + } + })]; + } + }); +} +function m7o(i) { + const { + openerService: e + } = wt(); + return (() => { + var t = s7o(); + var s = t.firstChild; + var n = s.nextSibling; + var r = n.nextSibling; + var o = r.firstChild; + var a = o.nextSibling; + var l = a.nextSibling; + M(r, IT, a); + return t; + })(); +} +function b7o(i) { + const e = wt(); + Fe(() => { + const t = s => { + if (s !== zr.FREE) { + i.closePopup(); + i.error.rerun(); + } + }; + e.cursorAuthenticationService.addSubscriptionChangedListener(t); + Qt(() => { + e.cursorAuthenticationService.removeSubscriptionChangedListener(t); + }); + }); + return (() => { + var t = n7o(); + var s = t.firstChild; + var n = s.firstChild; + var r = n.nextSibling; + var o = r.nextSibling; + var a = s.nextSibling; + var l = a.firstChild; + var c = l.nextSibling; + var u = c.nextSibling; + var d = a.nextSibling; + var h = d.firstChild; + var g = h.nextSibling; + var p = d.nextSibling; + var b = p.firstChild; + var v = b.nextSibling; + var y = v.firstChild; + var w = y.nextSibling; + var C = w.nextSibling; + var S = C.nextSibling; + var x = p.nextSibling; + s.style.setProperty("font-size", "16px"); + s.style.setProperty("margin-bottom", "10px"); + s.style.setProperty("color", "var(--vscode-foreground)"); + M(s, () => i.model, r); + M(a, () => i.model, c); + g.style.setProperty("color", "var(--vscode-textLink-foreground)"); + p.style.setProperty("display", "grid"); + p.style.setProperty("grid-template-columns", "1fr 1fr"); + p.style.setProperty("justify-items", "center"); + p.style.setProperty("margin-top", "30px"); + p.style.setProperty("margin-bottom", "20px"); + b.addEventListener("click", () => { + e.aiSettingsService.setModel("cursor-small"); + i.closePopup(); + i.error.rerun(); + }); + b.style.setProperty("background-color", "transparent"); + b.style.setProperty("border", "none"); + b.style.setProperty("cursor", "pointer"); + b.style.setProperty("color", "var(--vscode-foreground)"); + wf(v, "click", e.cursorAuthenticationService.pay); + v.style.setProperty("background-color", "var(--vscode-button-background)"); + v.style.setProperty("border", "none"); + v.style.setProperty("border-radius", "5px"); + v.style.setProperty("color", "var(--vscode-button-foreground)"); + v.style.setProperty("cursor", "pointer"); + v.style.setProperty("padding", "10px 20px"); + v.style.setProperty("gap", "7px"); + v.style.setProperty("display", "flex"); + v.style.setProperty("align-items", "center"); + y.style.setProperty("color", "var(--vscode-button-foreground)"); + M(v, () => i.model, C); + x.style.setProperty("font-size", "12px"); + x.style.setProperty("opacity", "0.5"); + Ie(() => Xe(y, le.asClassName(A.rocket))); + return t; + })(); +} +function v7o(i) { + const e = wt(); + const t = e.aiSettingsService; + const s = e.cursorAuthenticationService; + const [n, r] = ae(t.getUseOpenAIKey()); + const [o, a] = ae(t.getModel()); + const [l, c] = ae(t.getLongContextModel()); + const [u, d] = ae(null); + const [h, g] = ae(""); + const [p, b] = ae(""); + Fe(() => { + t.addOpenAIKeyListener(r); + t.addOpenAIModelListener(a); + t.addLongContextOpenAIModelListener(c); + s.addOpenAIKeyChangedListener(g); + Qt(() => { + t.removeOpenAIKeyListener(r); + t.removeOpenAIModelListener(a); + t.removeLongContextOpenAIModelListener(c); + s.removeOpenAIKeyChangedListener(g); + }); + }); + Fe(() => { + t.getApiKey().then(v => { + if (v) { + g(v); + } + }); + }); + Fe(() => { + b(h()); + }); + Fe(() => { + if (p() !== null) { + d(null); + } + }); + return (() => { + var v = l7o(); + var y = v.firstChild; + var w = y.nextSibling; + var C = w.nextSibling; + var S = C.firstChild; + var x = S.firstChild; + var k = x.nextSibling; + x.addEventListener("input", E => { + b(E.currentTarget.value); + }); + Gr(x, "spellcheck", false); + k.addEventListener("click", () => { + t.setOpenAIKey(p()).then(E => { + if (E !== true) { + d(false); + } else { + d(true); + i.onClose(); + i.error.rerun(); + } + }); + }); + M(C, I(oe, { + get when() { + return u() === false; + }, + get children() { + return r7o(); + } + }), null); + M(C, I(oe, { + get when() { + return h(); + }, + get children() { + var E = a7o(); + M(E, I(YP, { + get value() { + return n(); + }, + onToggle: () => t.setUseOpenAIKey(!n()) + }), null); + M(E, I(oe, { + get when() { + return n(); + }, + get fallback() { + return c7o(); + }, + get children() { + return o7o(); + } + }), null); + return E; + } + }), null); + Ie(() => Xe(x, `settings__item_textarea + ${u() === false ? "input-error" : u() === true ? "input-success" : ""}`)); + Ie(() => x.value = p() || ""); + return v; + })(); +} +function y7o(i) { + const e = wt(); + Fe(() => { + const t = s => { + if (s === zr.PRO) { + i.closePopup(); + i.error.rerun(); + } + }; + e.cursorAuthenticationService.addSubscriptionChangedListener(t); + Qt(() => { + e.cursorAuthenticationService.removeSubscriptionChangedListener(t); + }); + }); + return (() => { + var t = u7o(); + var s = t.firstChild; + var n = s.nextSibling; + var r = n.nextSibling; + var o = r.nextSibling; + var a = o.nextSibling; + var l = a.firstChild; + var c = l.firstChild; + var u = c.firstChild; + var d = l.nextSibling; + var h = d.firstChild; + var g = a.nextSibling; + var p = g.nextSibling; + var b = p.nextSibling; + a.style.setProperty("display", "grid"); + a.style.setProperty("grid-template-columns", "1fr 1fr"); + a.style.setProperty("justify-items", "center"); + a.style.setProperty("margin-top", "30px"); + a.style.setProperty("margin-bottom", "20px"); + l.style.setProperty("display", "flex"); + l.style.setProperty("justify-content", "center"); + wf(c, "click", e.cursorAuthenticationService.pay); + c.style.setProperty("background-color", "var(--vscode-button-background)"); + c.style.setProperty("border", "solid"); + c.style.setProperty("border-width", "1px"); + c.style.setProperty("border-radius", "10px"); + c.style.setProperty("color", "var(--vscode-button-foreground)"); + c.style.setProperty("cursor", "pointer"); + c.style.setProperty("padding", "10px 20px"); + c.style.setProperty("gap", "7px"); + c.style.setProperty("display", "flex"); + c.style.setProperty("align-items", "center"); + u.style.setProperty("color", "var(--vscode-button-foreground)"); + d.style.setProperty("display", "flex"); + d.style.setProperty("justify-content", "center"); + h.addEventListener("click", () => { + i.closePopup(); + }); + h.style.setProperty("text-decoration", "underline"); + h.style.setProperty("text-underline-offset", "2px"); + h.style.setProperty("background-color", "transparent"); + h.style.setProperty("border", "none"); + h.style.setProperty("cursor", "pointer"); + h.style.setProperty("color", "var(--vscode-foreground)"); + g.style.setProperty("text-align", "center"); + g.style.setProperty("font-size", "12px"); + g.style.setProperty("opacity", "0.5"); + g.style.setProperty("margin-bottom", "20px"); + p.style.setProperty("font-size", "12px"); + p.style.setProperty("opacity", "0.5"); + b.style.setProperty("margin-top", "20px"); + b.style.setProperty("margin-bottom", "20px"); + M(t, I(v7o, { + onClose: () => i.closePopup(), + get error() { + return i.error; + } + }), null); + Ie(v => { + var y = e.themeService.getColorTheme().getColor("button.background")?.lighten(0.3).toString(); + var w = le.asClassName(A.rocket); + if (y !== v.e) { + if ((v.e = y) != null) { + c.style.setProperty("border-color", y); + } else { + c.style.removeProperty("border-color"); + } + } + if (w !== v.t) { + Xe(u, v.t = w); + } + return v; + }, { + e: undefined, + t: undefined + }); + return t; + })(); +} +function w7o(i) { + const e = wt(); + Fe(() => { + const s = n => { + if (n) { + i.closePopup(); + i.error.rerun(); + } + }; + e.cursorAuthenticationService.addLoginChangedListener(s); + Qt(() => { + e.cursorAuthenticationService.removeLoginChangedListener(s); + }); + }); + const t = K(() => { + switch (i.error.error) { + case yo.NOT_LOGGED_IN: + return "To avoid abuse on our backend, we ask that you login to use the AI features"; + case yo.AGENT_REQUIRES_LOGIN: + return "As a safety measure for our users, please login to use AI agents."; + default: + return; + } + }); + return (() => { + var s = SNn(); + M(s, I(Z9o, { + get message() { + return t(); + } + })); + return s; + })(); +} +function C7o(i, e, t, s) { + return Ll(() => I(h7o, { + error: i, + closePopup: () => { + s?.(); + } + }), e, t); +} +var vOi = class extends H { + constructor(e) { + super(); + this.b = e; + this.a = null; + this.b.addErrorPopupHandler(this.renderPopup.bind(this)); + } + renderPopup(e, t, s) { + if (e instanceof pbt) { + const n = C7o(e, t.activeContainer, s, () => n.dispose()); + this.a = n; + } + } + dispose() { + this.b.removeErrorPopupHandler(this.renderPopup.bind(this)); + super.dispose(); + if (this.a) { + this.a.dispose(); + this.a = null; + } + } +}; +vOi = __decorate([__param(0, sW)], vOi); +Pe.as(Er.Workbench).registerWorkbenchContribution(vOi, 3); +Ht(); +Nn(); +jo(); +tc(); +te(); +qt(); +ai(); +gi(); +Nn(); +Zp(); +ar(); +vt(); +Le(); +Ms(); +Rn(); +$(); +$(); +$(); +$(); +$(); +$(); +We(); +He(); +q(); +Et(); +Rt(); +Le(); +gs(); +dD(); +E4(); +var S7o = Y("
    No changes found"); +var xNn = Y("
    "); +var x7o = Y("
    - "); +var k7o = Y("
    "); +var E7o = Y("
    "); +var I7o = class extends H { + constructor(i, e) { + super(); + this.f = i; + this.instantiationService = e; + this.c = []; + this.D(P7o(this.f, this, this.instantiationService)); + } + layout(i) {} + getURIs() { + return this.c; + } + setURIs(i) { + this.c = i; + } + getActiveControl() {} + getEditorType() { + return PM.InlineMultiDiffEditor; + } + getPosition() { + return null; + } + getSelection() { + return null; + } +}; +function D7o() { + const i = wt(); + let e; + const [t, s] = ae(0); + xr(() => { + const h = new ResizeObserver(g => { + for (const p of g) { + const { + width: b, + height: v + } = p.contentRect; + s(b); + } + }); + if (e) { + h.observe(e); + } + Qt(() => { + h.disconnect(); + }); + }); + const n = K(() => i.reactiveStorageService.nonPersistentStorage.inlineDiffs.filter(h => h.source === VR).sort((h, g) => (h.createdAt ?? 0) - (g.createdAt ?? 0))); + const [r, o] = ae([]); + const [a, l] = ae(new Map()); + const [c, u] = ae([]); + const d = h => `${h.uri.toString()}-${h.changes[0].addedRange.startLineNumber}`; + Fe(() => { + const h = new Map(); + for (const g of n()) { + const p = i.inlineDiffService.getGroupedChanges({ + diffId: g.id + }); + for (const b of p) { + const v = { + inlineDiffId: g.id, + uri: g.uri, + changes: b, + startLineNumber: (b.at(0)?.addedRange.startLineNumber ?? 1) + g.currentRange.startLineNumber, + endLineNumberExclusive: (b.at(-1)?.addedRange.endLineNumberExclusive ?? 1) + g.currentRange.startLineNumber + }; + h.set(d(v), v); + } + } + l(h); + u(Array.from(h.keys())); + }); + return I(Ou, { + scrollingDirection: "vertical", + style: { + width: "100%", + height: "100%" + }, + ref(h) { + var g = e; + if (typeof g == "function") { + g(h); + } else { + e = h; + } + }, + get children() { + return I(Zn, { + get each() { + return c(); + }, + get fallback() { + return S7o(); + }, + children: h => I(oe, { + get when() { + return a().has(h); + }, + get children() { + var g = k7o(); + var p = g.firstChild; + var b = p.firstChild; + var v = b.firstChild; + var y = v.nextSibling; + var w = y.nextSibling; + p.addEventListener("click", () => { + o(C => C.includes(h) ? C.filter(S => S !== h) : [...C, h]); + }); + p.style.setProperty("display", "flex"); + p.style.setProperty("margin-bottom", "4px"); + p.style.setProperty("cursor", "pointer"); + p.style.setProperty("flex-direction", "row"); + p.style.setProperty("align-items", "center"); + p.style.setProperty("justify-content", "space-between"); + p.style.setProperty("background-color", "var(--vscode-peekViewTitle-background)"); + p.style.setProperty("height", "40px"); + p.style.setProperty("font-size", "1.2em"); + p.style.setProperty("border", "1px solid var(--border-color)"); + b.style.setProperty("color", "var(--vscode-input-placeholderForeground)"); + b.style.setProperty("display", "flex"); + v.style.setProperty("margin-left", "10px"); + y.style.setProperty("cursor", "pointer"); + y.style.setProperty("margin-left", "5px"); + M(y, () => ji(a().get(h)?.uri ?? V.file(""))); + w.style.setProperty("opacity", "0.5"); + w.style.setProperty("margin-left", "5px"); + w.style.setProperty("flex-shrink", "1"); + w.style.setProperty("min-width", "0"); + w.style.setProperty("font-size", "0.8em"); + w.style.setProperty("display", "flex"); + M(w, I(Ou, { + scrollingDirection: "horizontal", + style: { + width: "100%", + "white-space": "nowrap" + }, + get children() { + return i.workspaceContextService.asRelativePath(a().get(h)?.uri ?? V.file("")); + } + })); + M(p, I(oe, { + get when() { + return r().includes(h); + }, + get children() { + return [(() => { + var C = xNn(); + C.style.setProperty("flex-grow", "1"); + return C; + })(), (() => { + var C = x7o(); + var S = C.firstChild; + C.style.setProperty("color", "var(--vscode-input-placeholderForeground)"); + C.style.setProperty("display", "flex"); + C.style.setProperty("font-size", "0.8em"); + C.style.setProperty("margin-right", "5px"); + M(C, () => a().get(h)?.startLineNumber ?? 1, S); + M(C, () => (a().get(h)?.endLineNumberExclusive ?? 1) - 1, null); + return C; + })()]; + } + }), null); + M(g, I(oe, { + get when() { + return K(() => !r().includes(h))() && a().has(h); + }, + get children() { + return I(T7o, { + get changes() { + return a().get(h); + } + }); + } + }), null); + Ie(() => Xe(v, r().includes(h) ? le.asClassName(A.chevronRight) : le.asClassName(A.chevronDown))); + return g; + } + }) + }); + } + }); +} +var T7o = i => { + const e = wt(); + const t = Gu(() => (() => { + var y = xNn(); + y.style.setProperty("width", "100%"); + y.style.setProperty("height", "100%"); + y.style.setProperty("box-sizing", "border-box"); + return y; + })())(); + const s = ep.getEditorOptions(e.configurationService); + s.lineNumbers = "on"; + s.lineDecorationsWidth = 10; + s.glyphMargin = true; + if (s.scrollbar) { + s.scrollbar.vertical = "hidden"; + s.scrollbar.horizontal = "auto"; + s.scrollbar.handleMouseWheel = true; + s.scrollbar.alwaysConsumeMouseWheel = false; + s.scrollbar.horizontalScrollbarSize = 10; + s.scrollbar.ignoreVerticalScrolling = true; + } + const n = e.instantiationService.createInstance(ep, t, s, {}); + const r = e.instantiationService.createInstance(Mb, n); + r.setShowPartialAcceptRejectWidgets(false); + const [o, a] = ae(1); + const [l, c] = ae(1); + const [u, d] = ae(1); + let h = n.getLayoutInfo().width; + const g = n.onDidLayoutChange(y => { + if (y.width !== h) { + d(p(o(), l())); + h = y.width; + } + }); + Fe(() => { + d(p(o(), l())); + }); + const p = (y, w) => i.changes === undefined ? 0 : w - y + r.getRemovedNumLinesInRange(i.changes.inlineDiffId, { + startLineNumber: y, + startColumn: 1, + endLineNumber: w, + endColumn: 1 + }); + let b; + xr(async () => { + if (b) { + b.dispose(); + } + b = await e.textModelService.createModelReference(i.changes.uri); + if (i.changes !== undefined && i.changes.uri !== undefined) { + try { + n.setModel(b.object.textEditorModel); + const y = Math.max((i.changes.startLineNumber ?? 1) - 5, 1); + const w = Math.min((i.changes.endLineNumberExclusive ?? 1) + 5, n.getModel()?.getLineCount() ?? 1); + a(y); + c(w); + n.revealLine(y, 1); + n.revealLine(w, 1); + n.revealLine(y, 1); + for (let C = 0; C < 10; C++) { + setTimeout(() => { + d(p(o(), l())); + }, C * 100); + } + } catch (y) { + console.error(y); + } finally {} + } + }); + Fe(() => { + const y = Math.max((i.changes.startLineNumber ?? 1) - 5, 1); + const w = Math.min((i.changes.endLineNumberExclusive ?? 1) + 5, n.getModel()?.getLineCount() ?? 1); + a(y); + c(w); + n.revealLine(y, 1); + n.revealLine(w, 1); + n.revealLine(y, 1); + for (let C = 0; C < 10; C++) { + setTimeout(() => { + d(p(o(), l())); + }, C * 100); + } + }); + const v = async (y, w) => { + if (e.openerService) { + e.openerService.open(xg(V.from(y), { + startLineNumber: w, + startColumn: 1, + endLineNumber: w, + endColumn: 1 + })); + } + }; + n.onMouseDown(y => { + y.event.preventDefault(); + y.event.stopPropagation(); + v(i.changes.uri, o()); + }); + n.onMouseWheel(y => {}); + Qt(() => { + t.remove(); + n?.dispose(); + b?.dispose(); + r.dispose(); + g.dispose(); + }); + return (() => { + var y = E7o(); + M(y, t); + Ie(w => (w = `${(u() + 2) * 18}px`) != null ? y.style.setProperty("height", w) : y.style.removeProperty("height")); + return y; + })(); +}; +function P7o(i, e, t) { + return Ll(() => I(D7o, {}), i, t); +} +var yOi; +var wOi; +var LAt = class extends hoe { + static { + yOi = this; + } + static { + this.ID = "inlineMultiDiffEditor"; + } + constructor(e, t, s, n, r, o, a, l) { + super(yOi.ID, e, "inlineMultiDiffEditor", s, t, r, l, n, o, a); + this.a = undefined; + } + Y(e) { + this.a = this.D(new I7o(e, this.m)); + } + async setInput(e, t, s, n) { + await super.setInput(e, t, s, n); + const r = [...e.uris]; + this.a?.setURIs(r); + } + async clearInput() { + await super.clearInput(); + this.a?.setURIs([]); + } + layout(e) { + this.a?.layout(e); + } + getControl() { + return this.a?.getActiveControl(); + } + mb(e) { + return { + scrollState: { + top: 0, + left: 0 + } + }; + } + nb(e) { + return e instanceof Que; + } + pb(e) { + return e.resource; + } +}; +LAt = yOi = __decorate([__param(1, re), __param(2, Ot), __param(3, ti), __param(4, ht), __param(5, Te), __param(6, Hi), __param(7, Fl)], LAt); +var kNn = class { + constructor(e) { + this.a = e; + } + createResourceLabel(e) { + const t = this.a.createInstance(a6, e, {}); + return { + setUri(s) { + if (s !== undefined) { + t.element.setFile(s, {}); + } + }, + dispose() { + t.dispose(); + } + }; + } +}; +kNn = __decorate([__param(0, re)], kNn); +var Que = class extends rg { + static { + wOi = this; + } + static { + this.ID = "workbench.input.inlineMultiDiffEditor"; + } + get resource() { + return V.parse(`inline-multi-diff-editor:${this.id}`); + } + get capabilities() { + return 2; + } + get typeId() { + return wOi.ID; + } + getName() { + return this.label ?? "Multi File Edits"; + } + get editorId() { + return Hu.id; + } + constructor(e, t, s, n, r, o, a) { + super(); + this.label = e; + this.uris = t; + this.a = n; + this.b = r; + this.c = o; + this.h = a; + this.id = s || new Date().getMilliseconds().toString() + Math.random().toString(); + } + setLanguageId(e, t) {} +}; +Que = wOi = __decorate([__param(3, ns), __param(4, Fl), __param(5, re), __param(6, $s)], Que); +te(); +q(); +Pe.as(_o.EditorPane).registerEditorPane(qd.create(LAt, LAt.ID, "Multi File Edits"), [new Os(Que)]); +var COi = class extends H { + constructor(e, t) { + super(); + this.D(e.registerEditor("*", { + id: Hu.id, + label: Hu.displayName, + detail: Hu.providerDisplayName, + priority: kc.builtin + }, {}, { + createInlineMultiDiffEditorInput: s => ({ + editor: t.createInstance(Que, s.label, s.resources, undefined) + }) + })); + } +}; +COi = __decorate([__param(0, Lb), __param(1, re)], COi); +var L7o = class { + canSerialize(i) { + return false; + } + serialize(i) {} + deserialize(i, e) {} +}; +Pe.as(Er.Workbench).registerWorkbenchContribution(COi, 3); +Pe.as(_o.EditorFactory).registerEditorSerializer(Que.ID, L7o); +q(); +wa(); +X(); +Ht(); +vt(); +bh(); +nt(); +wn(); +Fi(); +Je(); +Wi(); +Ee(); +Sr(); +At(); +Me(); +var SOi; +var xOi = "editor.detectLanguage"; +var kOi = class { + static { + SOi = this; + } + static { + this.a = "status.languageDetectionStatus"; + } + constructor(e, t, s, n, r, o) { + this.f = e; + this.g = t; + this.h = s; + this.i = n; + this.j = r; + this.k = o; + this.b = new Q(); + this.d = new Bm(1000); + this.e = new Q(); + n.onDidActiveEditorChange(() => this.l(true), this, this.b); + this.l(false); + } + dispose() { + this.b.dispose(); + this.d.dispose(); + this.c?.dispose(); + this.e.dispose(); + } + l(e) { + if (e) { + this.c?.dispose(); + this.c = undefined; + } + this.d.trigger(() => this.m()); + } + async m() { + const e = kb(this.i.activeTextEditorControl); + this.e.clear(); + e?.onDidChangeModelLanguage(() => this.l(true), this, this.e); + e?.onDidChangeModelContent(() => this.l(false), this, this.e); + const t = e?.getModel(); + const s = t?.uri; + const n = t?.getLanguageId(); + const r = this.h.getValue("workbench.editor.languageDetectionHints"); + if (typeof r != "object" || !r?.untitledEditors || s?.scheme !== me.untitled || !n || !s) { + this.c?.dispose(); + this.c = undefined; + } else { + const l = await this.f.detectLanguage(s); + const c = { + jsonc: "json" + }; + const u = t.getLanguageId(); + if (l && l !== u && c[u] !== l) { + const d = this.j.getLanguageName(l) || l; + let h = f(7746, null, d); + const p = this.k.lookupKeybinding(xOi)?.getLabel(); + if (p) { + h += ` (${p})`; + } + const b = { + name: f(7747, null), + ariaLabel: f(7748, null, l), + tooltip: h, + command: xOi, + text: "$(lightbulb-autofix)" + }; + if (this.c) { + this.c.update(b); + } else { + this.c = this.g.addEntry(b, SOi.a, 1, { + id: "status.editor.mode", + alignment: 1, + compact: true + }); + } + } else { + this.c?.dispose(); + this.c = undefined; + } + } + } +}; +kOi = SOi = __decorate([__param(0, YR), __param(1, bu), __param(2, ve), __param(3, Te), __param(4, As), __param(5, oi)], kOi); +Pe.as(Er.Workbench).registerWorkbenchContribution(kOi, 3); +J(class extends se { + constructor() { + super({ + id: xOi, + title: W(7750, "Detect Language from Content"), + f1: true, + precondition: T.and(lh.toNegated(), ke.editorTextFocus), + keybinding: { + primary: 1570, + weight: 200 + } + }); + } + async run(i) { + const e = i.get(Te); + const t = i.get(YR); + const s = kb(e.activeTextEditorControl); + const n = i.get(ni); + const r = s?.getModel()?.uri; + if (r) { + const o = await t.detectLanguage(r); + if (o) { + s.getModel()?.setLanguage(o, rsi); + } else { + n.warn(f(7749, null)); + } + } + } +}); +Je(); +xe(); +vd(); +q(); +Wa(); +wa(); +X(); +Rt(); +vt(); +bh(); +gs(); +No(); +sl(); +Fs(); +He(); +qt(); +Jt(); +Le(); +Je(); +ar(); +pe(); +$i(); +var KN; +var ENn = class { + constructor(i, e) { + this.combined = i; + this.dedicated = e; + } + isEqual(i) { + return Go(this.combined, i.combined) && Go(this.dedicated, i.dedicated); + } +}; +var EOi = class { + constructor(e, t) { + this.a = e; + this.b = t; + } + get value() { + return this.a.getNumber(this.b, 0, 0); + } + increment() { + const e = this.value + 1; + this.a.store(this.b, e, 0, 1); + return e; + } +}; +EOi = __decorate([__param(0, ht)], EOi); +var RAt = class extends H { + static { + this.Id = "status.languageStatus"; + } + constructor(e) { + super(); + this.a = e; + for (const t of e.parts) { + this.b(t); + } + this.D(e.onDidCreateAuxiliaryEditorPart(t => this.b(t))); + } + b(e) { + const t = new Q(); + de.once(e.onWillDispose)(() => t.dispose()); + const s = this.a.getScopedInstantiationService(e); + t.add(s.createInstance(IOi)); + } +}; +RAt = __decorate([__param(0, Hi)], RAt); +var IOi = class { + static { + KN = this; + } + static { + this.a = "status.languageStatus"; + } + static { + this.b = "languageStatus.dedicated"; + } + constructor(e, t, s, n, r, o) { + this.k = e; + this.l = t; + this.m = s; + this.o = n; + this.p = r; + this.q = o; + this.c = new Q(); + this.f = new Set(); + this.i = new Map(); + this.j = new Q(); + o.onDidChangeValue(0, KN.b, this.c)(this.r, this, this.c); + this.s(); + this.d = new EOi(o, "languageStatus.interactCount"); + e.onDidChange(this.v, this, this.c); + s.onDidActiveEditorChange(this.v, this, this.c); + this.v(); + t.onDidChangeEntryVisibility(a => { + if (!a.visible && this.f.has(a.id)) { + this.f.delete(a.id); + this.v(); + this.t(); + } + }, undefined, this.c); + } + dispose() { + this.c.dispose(); + this.h?.dispose(); + si(this.i.values()); + this.j.dispose(); + } + r() { + this.s(); + this.v(); + } + s() { + const e = this.q.get(KN.b, 0, "[]"); + try { + const t = JSON.parse(e); + this.f = new Set(t); + } catch { + this.f.clear(); + } + } + t() { + if (this.f.size === 0) { + this.q.remove(KN.b, 0); + } else { + const e = JSON.stringify(Array.from(this.f.keys())); + this.q.store(KN.b, e, 0, 0); + } + } + u(e) { + if (!e?.hasModel()) { + return new ENn([], []); + } + const t = this.k.getLanguageStatus(e.getModel()); + const s = []; + const n = []; + for (const r of t) { + if (this.f.has(r.id)) { + n.push(r); + } + s.push(r); + } + return new ENn(s, n); + } + v() { + const e = kb(this.m.activeTextEditorControl); + const t = this.u(e); + if (this.g?.isEqual(t)) { + return; + } + this.j.clear(); + this.g = t; + e?.onDidChangeModelLanguage(this.v, this, this.j); + if (t.combined.length === 0) { + this.h?.dispose(); + this.h = undefined; + } else { + const [n] = t.combined; + const r = n.severity >= cs.Warning; + const o = KN.x(n.severity); + let a = false; + const l = []; + const c = document.createElement("div"); + for (const b of t.combined) { + const v = t.dedicated.includes(b); + c.appendChild(this.w(b, r, v, this.j)); + l.push(KN.A(b).label); + a = a || !v && b.busy; + } + const u = { + name: f(7751, null), + ariaLabel: f(7752, null, l.join(", next: ")), + tooltip: c, + command: Gye, + text: a ? "$(loading~spin)" : o + }; + if (this.h) { + this.h.update(u); + } else { + this.h = this.l.addEntry(u, KN.a, 1, { + id: "status.editor.mode", + alignment: 0, + compact: true + }); + } + const d = this.d.value >= 3; + const h = Kt(e?.getContainerDomNode()); + const g = h.document.querySelector(".monaco-workbench .statusbar DIV#status\\.languageStatus A>SPAN.codicon"); + const p = h.document.querySelector(".monaco-workbench .statusbar DIV#status\\.languageStatus"); + if (Bl(g) && p) { + const b = "wiggle"; + const v = "flash"; + if (a) { + g.classList.remove(b); + p.classList.remove(v); + } else { + g.classList.toggle(b, r || !d); + this.j.add(Ce(g, "animationend", y => g.classList.remove(b))); + p.classList.toggle(v, r); + this.j.add(Ce(p, "animationend", y => p.classList.remove(v))); + } + } + if (!d) { + const b = h.document.querySelector(".monaco-workbench .context-view"); + if (Bl(b)) { + const v = new MutationObserver(() => { + if (h.document.contains(c)) { + this.d.increment(); + v.disconnect(); + } + }); + v.observe(b, { + childList: true, + subtree: true + }); + this.j.add(Ue(() => v.disconnect())); + } + } + } + const s = new Map(); + for (const n of t.dedicated) { + const r = KN.B(n); + let o = this.i.get(n.id); + if (o) { + o.update(r); + this.i.delete(n.id); + } else { + o = this.l.addEntry(r, n.id, 1, { + id: "status.editor.mode", + alignment: 1 + }); + } + s.set(n.id, o); + } + si(this.i.values()); + this.i = s; + } + w(e, t, s, n) { + const r = document.createElement("div"); + r.classList.add("hover-language-status"); + const o = document.createElement("div"); + o.classList.add("severity", `sev${e.severity}`); + o.classList.toggle("show", t); + const a = KN.y(e.severity); + z(o, ...Vu(a)); + r.appendChild(o); + const l = document.createElement("div"); + l.classList.add("element"); + r.appendChild(l); + const c = document.createElement("div"); + c.classList.add("left"); + l.appendChild(c); + const u = document.createElement("span"); + u.classList.add("label"); + const d = typeof e.label == "string" ? e.label : e.label.value; + z(u, ...Vu(INn(d, e.busy))); + c.appendChild(u); + const h = document.createElement("span"); + h.classList.add("detail"); + this.z(h, e.detail, n); + c.appendChild(h); + const g = document.createElement("div"); + g.classList.add("right"); + l.appendChild(g); + const { + command: p + } = e; + if (p) { + n.add(new LP(g, { + label: p.title, + title: p.tooltip, + href: V.from({ + scheme: "command", + path: p.id, + query: p.arguments && JSON.stringify(p.arguments) + }).toString() + }, { + hoverDelegate: Tpt + }, this.o, this.p)); + } + const b = new ea(g, { + hoverDelegate: Tpt + }); + const v = f(s ? 7753 : 7754, null); + b.setAriaLabel(v); + n.add(b); + let y; + if (s) { + y = new Yt("unpin", v, le.asClassName(A.pinned), true, () => { + this.f.delete(e.id); + this.l.updateEntryVisibility(e.id, false); + this.v(); + this.t(); + }); + } else { + y = new Yt("pin", v, le.asClassName(A.pin), true, () => { + this.f.add(e.id); + this.l.updateEntryVisibility(e.id, true); + this.v(); + this.t(); + }); + } + b.push(y, { + icon: true, + label: false + }); + n.add(y); + return r; + } + static x(e) { + switch (e) { + case cs.Error: + return "$(bracket-error)"; + case cs.Warning: + return "$(bracket-dot)"; + default: + return "$(bracket)"; + } + } + static y(e) { + switch (e) { + case cs.Error: + return "$(error)"; + case cs.Warning: + return "$(info)"; + default: + return "$(check)"; + } + } + z(e, t, s) { + for (const n of c$(t).nodes) { + if (typeof n == "string") { + const r = Vu(n); + z(e, ...r); + } else { + s.add(new LP(e, n, undefined, this.o, this.p)); + } + } + } + static A(e) { + if (e.accessibilityInfo) { + return e.accessibilityInfo; + } + const t = typeof e.label == "string" ? e.label : e.label.value; + if (e.detail) { + return { + label: f(7755, null, t, e.detail) + }; + } else { + return { + label: f(7756, null, t) + }; + } + } + static B(e) { + let t; + if (e.severity === cs.Warning) { + t = "warning"; + } else if (e.severity === cs.Error) { + t = "error"; + } + const s = typeof e.label == "string" ? e.label : e.label.shortValue; + return { + name: f(7757, null, e.name), + text: INn(s, e.busy), + ariaLabel: KN.A(e).label, + role: e.accessibilityInfo?.role, + tooltip: e.command?.tooltip || new hs(e.detail, { + isTrusted: true, + supportThemeIcons: true + }), + kind: t, + command: e.command + }; + } +}; +IOi = KN = __decorate([__param(0, nle), __param(1, bu), __param(2, Te), __param(3, Ns), __param(4, os), __param(5, ht)], IOi); +var R7o = class extends se { + constructor() { + super({ + id: "editor.inlayHints.Reset", + title: W(7758, "Reset Language Status Interaction Counter"), + category: pt.View, + f1: true + }); + } + run(i) { + i.get(ht).remove("languageStatus.interactCount", 0); + } +}; +function INn(i, e) { + return GVn([i !== "" && i, e && "$(loading~spin)"], "\xA0\xA0"); +} +Yn(RAt.Id, RAt, 3); +J(R7o); +q(); +X(); +Je(); +Wt(); +Ee(); +jo(); +Ht(); +Wa(); +X(); +Je(); +fn(); +var N7o = class extends se { + constructor() { + super({ + id: "_signOutOfAccount", + title: f(4524, null), + f1: false + }); + } + async run(i, { + providerId: e, + accountLabel: t + }) { + const s = i.get(dw); + const n = i.get(AW); + const r = i.get(NY); + const o = i.get(Js); + if (!e || !t) { + throw new Error("Invalid arguments. Expected: { providerId: string; accountLabel: string }"); + } + const l = (await s.getSessions(e)).filter(d => d.account.label === t); + const c = n.readAccountUsages(e, t); + const { + confirmed: u + } = await o.confirm({ + type: cs.Info, + message: c.length ? f(4525, null, t, c.map(d => d.extensionName).join(` +`)) : f(4526, null, t), + primaryButton: f(4527, null) + }); + if (u) { + const d = l.map(h => s.removeSession(e, h.id)); + await Promise.all(d); + n.removeAccountUsage(e, t); + r.removeAllowedExtensions(e, t); + } + } +}; +He(); +Wv(); +q(); +Rt(); +X(); +Je(); +Wt(); +fn(); +te(); +kn(); +mn(); +rn(); +var M7o = class extends se { + constructor() { + super({ + id: "_manageTrustedExtensionsForAccount", + title: W(4522, "Manage Trusted Extensions For Account"), + category: W(4523, "Accounts"), + f1: true + }); + } + run(i, e) { + return i.get(re).createInstance(DOi).run(e); + } +}; +var DOi = class { + constructor(e, t, s, n, r, o, a, l) { + this.c = e; + this.d = t; + this.f = s; + this.g = n; + this.h = r; + this.j = o; + this.k = a; + this.l = l; + } + async run(e) { + const { + providerId: t, + accountLabel: s + } = await this.m(e?.providerId, e?.accountLabel); + if (!t || !s) { + return; + } + const n = await this.n(t, s); + if (!n.length) { + return; + } + const r = new Q(); + const o = this.p(r, t, s); + o.items = n; + o.selectedItems = n.filter(a => a.type !== "separator" && !!a.picked); + o.show(); + } + async m(e, t) { + if (!e || !t) { + const s = new Array(); + for (const r of this.h.getProviderIds()) { + const o = this.h.getProvider(r).label; + const a = await this.h.getSessions(r); + const l = new Set(); + for (const c of a) { + if (!l.has(c.account.label)) { + l.add(c.account.label); + s.push({ + providerId: r, + providerLabel: o, + accountLabel: c.account.label + }); + } + } + } + const n = await this.g.pick(s.map(r => ({ + providerId: r.providerId, + label: r.accountLabel, + description: r.providerLabel + })), { + placeHolder: f(4512, null), + matchOnDescription: true + }); + if (n) { + e = n.providerId; + t = n.label; + } else { + return { + providerId: undefined, + accountLabel: undefined + }; + } + } + return { + providerId: e, + accountLabel: t + }; + } + async n(e, t) { + let s = this.k.readAllowedExtensions(e, t); + s = (await Promise.all(s.map(h => this.d.getExtension(h.id)))).map((h, g) => h ? s[g] : undefined).filter(h => !!h); + const r = this.c.trustedExtensionAuthAccess; + const o = Array.isArray(r) ? r : typeof r == "object" ? r[e] ?? [] : []; + for (const h of o) { + const g = s.find(p => p.id === h); + if (g) { + g.allowed = true; + g.trusted = true; + } else { + const p = await this.d.getExtension(h); + if (p) { + s.push({ + id: h, + name: p.displayName || p.name, + allowed: true, + trusted: true + }); + } + } + } + if (!s.length) { + this.f.info(f(4513, null)); + return []; + } + const a = this.j.readAccountUsages(e, t); + const l = []; + const c = []; + for (const h of s) { + const g = a.find(p => h.id === p.extensionId); + h.lastUsed = g?.lastUsed; + if (h.trusted) { + l.push(h); + } else { + c.push(h); + } + } + const u = (h, g) => (g.lastUsed || 0) - (h.lastUsed || 0); + return [...c.sort(u).map(this.o), { + type: "separator", + label: f(4514, null) + }, ...l.sort(u).map(this.o)]; + } + o(e) { + const t = e.lastUsed; + const s = t ? f(4515, null, ym(t, true)) : f(4516, null); + let n; + let r; + if (e.trusted) { + n = f(4517, null); + r = true; + } + return { + label: e.name, + extension: e, + description: s, + tooltip: n, + disabled: r, + buttons: [{ + tooltip: f(4518, null), + iconClass: le.asClassName(A.settingsGear) + }], + picked: e.allowed === undefined || e.allowed + }; + } + p(e, t, s) { + const n = e.add(this.g.createQuickPick({ + useSeparators: true + })); + n.canSelectMany = true; + n.customButton = true; + n.customLabel = f(4519, null); + n.title = f(4520, null); + n.placeholder = f(4521, null); + e.add(n.onDidAccept(() => { + const r = n.items.filter(a => a.type !== "separator").map(a => a.extension); + const o = new Set(n.selectedItems.map(a => a.extension)); + r.forEach(a => { + a.allowed = o.has(a); + }); + this.k.updateAllowedExtensions(t, s, r); + n.hide(); + })); + e.add(n.onDidHide(() => { + e.dispose(); + })); + e.add(n.onDidCustom(() => { + n.hide(); + })); + e.add(n.onDidTriggerItemButton(r => this.l.executeCommand("_manageAccountPreferencesForExtension", r.item.extension.id, t))); + return n; + } +}; +DOi = __decorate([__param(0, ys), __param(1, Ks), __param(2, Js), __param(3, zi), __param(4, dw), __param(5, AW), __param(6, NY), __param(7, gt)], DOi); +pe(); +q(); +X(); +Je(); +fn(); +Sl(); +te(); +Zt(); +mn(); +rn(); +var A7o = class extends se { + constructor() { + super({ + id: "_manageAccountPreferencesForExtension", + title: W(4510, "Manage Extension Account Preferences"), + category: W(4511, "Accounts"), + f1: false + }); + } + run(i, e, t) { + return i.get(re).createInstance(TOi).run(e, t); + } +}; +var TOi = class { + constructor(e, t, s, n, r, o, a) { + this.c = e; + this.d = t; + this.f = s; + this.g = n; + this.h = r; + this.i = o; + this.j = a; + } + async run(e, t) { + if (!e) { + return; + } + const s = await this.i.getExtension(e); + if (!s) { + throw new Error(`No extension with id ${e}`); + } + const n = new Array(); + const r = new Map(); + if (t) { + n.push(t); + r.set(t, await this.c.getAccounts(t)); + } else { + for (const g of this.c.getProviderIds()) { + if (g.startsWith(zni)) { + continue; + } + const p = await this.c.getAccounts(g); + for (const b of p) { + if (this.g.readAccountUsages(g, b.label).find(y => $r.equals(y.extensionId, e))) { + n.push(g); + r.set(g, p); + break; + } + } + } + } + let o = n[0]; + if (n.length > 1) { + o = (await this.d.pick(n.map(p => ({ + label: this.c.getProvider(p).label, + id: p + })), { + placeHolder: f(4502, null), + title: f(4503, null) + }))?.id; + } + if (!o) { + await this.f.info(f(4504, null)); + return; + } + const a = this.h.getAccountPreference(e, o); + const l = r.get(o); + const c = this.l(l, o, a); + const u = this.c.getProvider(o); + if (u.supportsMultipleAccounts) { + const g = l.flatMap(p => this.g.readAccountUsages(o, p.label).find(b => $r.equals(b.extensionId, e))).filter(p => !!p).sort((p, b) => b.lastUsed - p.lastUsed)?.[0]?.scopes; + if (g) { + c.push({ + type: "separator" + }); + c.push({ + providerId: o, + scopes: g, + label: f(4505, null) + }); + } + } + const d = new Q(); + const h = this.k(d, e, s.displayName ?? s.name, u.label); + if (c.length === 0) { + d.add(this.m(h)); + return; + } + h.items = c; + h.show(); + } + k(e, t, s, n) { + const r = e.add(this.d.createQuickPick({ + useSeparators: true + })); + e.add(r.onDidHide(() => { + e.dispose(); + })); + r.placeholder = f(4506, null, s, n); + r.title = f(4507, null, s); + r.sortByLabel = false; + e.add(r.onDidAccept(async () => { + r.hide(); + await this.n(t, r.selectedItems); + })); + return r; + } + l(e, t, s) { + return e.map(n => s === n.label ? { + label: n.label, + account: n, + providerId: t, + description: f(4508, null), + picked: true + } : { + label: n.label, + account: n, + providerId: t + }); + } + m(e) { + e.validationMessage = f(4509, null); + e.buttons = [this.d.backButton]; + e.show(); + return de.filter(e.onDidTriggerButton, t => t === this.d.backButton)(() => this.run()); + } + async n(e, t) { + for (const s of t) { + let n; + if (s.account) { + n = s.account; + } else { + try { + n = (await this.c.createSession(s.providerId, s.scopes)).account; + } catch (a) { + this.j.error(a); + continue; + } + } + const r = s.providerId; + if (this.h.getAccountPreference(e, r) !== n.label) { + this.h.updateAccountPreference(e, r, n); + } + } + } +}; +TOi = __decorate([__param(0, dw), __param(1, zi), __param(2, Js), __param(3, AW), __param(4, Jni), __param(5, Ks), __param(6, Bt)], TOi); +var $7o = ei.registerCommand("workbench.getCodeExchangeProxyEndpoints", function (i, e) { + return i.get(hy).options?.codeExchangeProxyEndpoints; +}); +var F7o = class extends H { + constructor() { + super(...arguments); + this.type = "table"; + } + shouldRender(i) { + return !!i.contributes?.authentication; + } + render(i) { + const e = i.contributes?.authentication || []; + if (!e.length) { + return { + data: { + headers: [], + rows: [] + }, + dispose: () => {} + }; + } + const t = [f(4528, null), f(4529, null)]; + const s = e.sort((n, r) => n.label.localeCompare(r.label)).map(n => [n.label, n.id]); + return { + data: { + headers: t, + rows: s + }, + dispose: () => {} + }; + } +}; +var O7o = Pe.as(Np.ExtensionFeaturesRegistry).registerExtensionFeature({ + id: "authentication", + label: f(4530, null), + access: { + canToggle: false + }, + renderer: new Os(F7o) +}); +var NAt = class extends H { + static { + this.ID = "workbench.contrib.authentication"; + } + constructor(e) { + super(); + this.f = e; + this.c = Be.appendMenuItem(_.AccountsContext, { + command: { + id: "noAuthenticationProviders", + title: f(4531, null), + precondition: T.false() + } + }); + this.D($7o); + this.D(O7o); + if (e.getProviderIds().length) { + this.j(); + } + this.g(); + this.h(); + } + g() { + this.D(this.f.onDidRegisterAuthenticationProvider(e => { + this.j(); + })); + this.D(this.f.onDidUnregisterAuthenticationProvider(e => { + if (!this.f.getProviderIds().length) { + this.c = Be.appendMenuItem(_.AccountsContext, { + command: { + id: "noAuthenticationProviders", + title: f(4532, null), + precondition: T.false() + } + }); + } + })); + } + h() { + this.D(J(N7o)); + this.D(J(M7o)); + this.D(J(A7o)); + } + j() { + this.c?.dispose(); + this.c = undefined; + } +}; +NAt = __decorate([__param(0, dw)], NAt); +var MAt = class { + static { + this.ID = "workbench.contrib.authenticationUsage"; + } + constructor(e) { + this.c = e; + this.d(); + } + async d() { + await this.c.initializeExtensionUsageCache(); + } +}; +MAt = __decorate([__param(0, AW)], MAt); +Yn(NAt.ID, NAt, 3); +Yn(MAt.ID, MAt, 4); +Ht(); +Fs(); +Ut(); +pe(); +q(); +Et(); +Le(); +Rn(); +wn(); +Ms(); +X(); +Je(); +Wt(); +Ee(); +fn(); +te(); +Wi(); +mn(); +ai(); +Nn(); +vt(); +Wv(); +kn(); +gs(); +Ht(); +jo(); +Qn(); +Ht(); +Qn(); +X(); +jo(); +te(); +Je(); +Ee(); +Le(); +vt(); +gi(); +Wv(); +fn(); +pe(); +q(); +He(); +Fs(); +mn(); +Wi(); +Et(); +Nt(); +Aa(); +Un(); +Wt(); +mu(); +Qn(); +X(); +te(); +Je(); +Ee(); +Le(); +vt(); +Et(); +xe(); +Fi(); +ks(); +Me(); +gs(); +gi(); +ai(); +Wi(); +He(); +mu(); +Nn(); +var POi = class extends n8 { + constructor(e, t, s, n, r, o, a, l, c, u, d, h, g, p, b, v, y, w) { + super(e, s, n, r, o, a, l, c, u, d, h, g, w); + this.ab = t; + this.sb = p; + this.bc = b; + this.ec = v; + this.fc = y; + this.D(this.sb.onDidChangeConflicts(() => this.f.refresh())); + this.jc(); + } + n(e) { + super.n(z(e, G(""))); + const t = this; + this.f.message = f(11841, null); + this.f.dataProvider = { + getChildren() { + return t.hc(); + } + }; + } + async hc() { + const e = []; + const t = this.sb.conflicts.map(n => n.conflicts.map(r => ({ + ...r, + syncResource: n.syncResource, + profile: n.profile + }))).flat().sort((n, r) => n.profile.id === r.profile.id ? 0 : n.profile.isDefault ? -1 : r.profile.isDefault ? 1 : n.profile.name.localeCompare(r.profile.name)); + const s = []; + for (const n of t) { + let r = s[s.length - 1]?.[0].id === n.profile.id ? s[s.length - 1][1] : undefined; + if (!r) { + s.push([n.profile, r = []]); + } + r.push(n); + } + for (const [n, r] of s) { + const o = []; + for (const a of r) { + const l = JSON.stringify(a); + const c = { + handle: l, + resourceUri: a.remoteResource, + label: { + label: ji(a.remoteResource), + strikethrough: a.mergeState === "accepted" && (a.localChange === 3 || a.remoteChange === 3) + }, + description: kk(a.syncResource), + collapsibleState: vu.None, + command: { + id: "workbench.actions.sync.openConflicts", + title: "", + arguments: [{ + $treeViewId: "", + $treeItemHandle: l + }] + }, + contextValue: "sync-conflict-resource" + }; + o.push(c); + } + e.push({ + handle: n.id, + label: { + label: n.name + }, + collapsibleState: vu.Expanded, + children: o + }); + } + if (s.length === 1 && s[0][0].isDefault) { + return e[0].children ?? []; + } else { + return e; + } + } + ic(e) { + const t = JSON.parse(e); + return { + syncResource: t.syncResource, + profile: jI(t.profile, this.fc.profilesHome.scheme), + localResource: V.revive(t.localResource), + remoteResource: V.revive(t.remoteResource), + baseResource: V.revive(t.baseResource), + previewResource: V.revive(t.previewResource), + acceptedResource: V.revive(t.acceptedResource), + localChange: t.localChange, + remoteChange: t.remoteChange, + mergeState: t.mergeState + }; + } + jc() { + const e = this; + this.D(J(class extends se { + constructor() { + super({ + id: "workbench.actions.sync.openConflicts", + title: f(11842, null) + }); + } + async run(s, n) { + const r = e.ic(n.$treeItemHandle); + return e.open(r); + } + })); + this.D(J(class extends se { + constructor() { + super({ + id: "workbench.actions.sync.acceptRemote", + title: f(11843, null), + icon: A.cloudDownload, + menu: { + id: _.ViewItemContext, + when: T.and(T.equals("view", TEe), T.equals("viewItem", "sync-conflict-resource")), + group: "inline", + order: 1 + } + }); + } + async run(s, n) { + const r = e.ic(n.$treeItemHandle); + await e.bc.accept({ + syncResource: r.syncResource, + profile: r.profile + }, r.remoteResource, undefined, e.ec.isEnabled()); + } + })); + this.D(J(class extends se { + constructor() { + super({ + id: "workbench.actions.sync.acceptLocal", + title: f(11844, null), + icon: A.cloudUpload, + menu: { + id: _.ViewItemContext, + when: T.and(T.equals("view", TEe), T.equals("viewItem", "sync-conflict-resource")), + group: "inline", + order: 2 + } + }); + } + async run(s, n) { + const r = e.ic(n.$treeItemHandle); + await e.bc.accept({ + syncResource: r.syncResource, + profile: r.profile + }, r.localResource, undefined, e.ec.isEnabled()); + } + })); + } + async open(e) { + if (!this.sb.conflicts.some(({ + conflicts: n + }) => n.some(({ + localResource: r + }) => Ls(r, e.localResource)))) { + return; + } + const t = f(11845, null, ji(e.remoteResource)); + const s = f(11846, null, ji(e.remoteResource)); + await this.ab.openEditor({ + input1: { + resource: e.remoteResource, + label: f(11847, null), + description: t + }, + input2: { + resource: e.localResource, + label: f(11848, null), + description: s + }, + base: { + resource: e.baseResource + }, + result: { + resource: e.previewResource + }, + options: { + preserveFocus: true, + revealIfVisible: true, + pinned: true, + override: Hu.id + } + }); + } +}; +POi = __decorate([__param(1, Te), __param(2, oi), __param(3, ts), __param(4, ve), __param(5, Ne), __param(6, Ur), __param(7, re), __param(8, os), __param(9, ti), __param(10, Ot), __param(11, ni), __param(12, Ns), __param(13, SP), __param(14, JP), __param(15, Qm), __param(16, Ml), __param(17, Phi)], POi); +var LOi = class extends H { + constructor(e, t, s, n, r) { + super(); + this.f = t; + this.g = s; + this.h = n; + this.j = r; + this.n(e); + } + n(e) { + this.q(e); + this.s(e, true); + this.r(e); + this.s(e, false); + this.w(e); + this.t(e); + } + q(e) { + const t = Pe.as(ur.ViewsRegistry); + const s = W(11876, "Conflicts"); + const n = { + id: TEe, + name: s, + ctorDescriptor: new Os(POi), + when: T.and(Omn, DEe), + canToggleVisibility: false, + canMoveView: false, + treeView: this.f.createInstance(cV, TEe, s.value), + collapsed: false, + order: 100 + }; + t.registerViews([n], e); + } + r(e) { + const t = "workbench.views.sync.machines"; + const s = W(11877, "Synced Machines"); + const n = this.f.createInstance(cV, t, s.value); + const r = this.f.createInstance(MOi, n); + n.showRefreshAction = true; + n.canSelectMany = true; + n.dataProvider = r; + this.D(de.any(this.h.onDidChange, this.j.onDidResetRemote)(() => n.refresh())); + const o = Pe.as(ur.ViewsRegistry); + const a = { + id: t, + name: s, + ctorDescriptor: new Os(n8), + when: T.and(Ek.notEqualsTo("uninitialized"), aH.isEqualTo("available"), IEe), + canToggleVisibility: true, + canMoveView: false, + treeView: n, + collapsed: false, + order: 300 + }; + o.registerViews([a], e); + this.D(J(class extends se { + constructor() { + super({ + id: "workbench.actions.sync.editMachineName", + title: f(11849, null), + icon: A.edit, + menu: { + id: _.ViewItemContext, + when: T.and(T.equals("view", t)), + group: "inline" + } + }); + } + async run(l, c) { + if (await r.rename(c.$treeItemHandle)) { + await n.refresh(); + } + } + })); + this.D(J(class extends se { + constructor() { + super({ + id: "workbench.actions.sync.turnOffSyncOnMachine", + title: f(11850, null), + menu: { + id: _.ViewItemContext, + when: T.and(T.equals("view", t), T.equals("viewItem", "sync-machine")) + } + }); + } + async run(l, c, u) { + if (await r.disable((u || [c]).map(d => d.$treeItemHandle))) { + await n.refresh(); + } + } + })); + } + s(e, t) { + const s = `workbench.views.sync.${t ? "remote" : "local"}Activity`; + const n = t ? W(11878, "Sync Activity (Remote)") : W(11879, "Sync Activity (Local)"); + const r = this.f.createInstance(cV, s, n.value); + r.showCollapseAllAction = true; + r.showRefreshAction = true; + r.dataProvider = t ? this.f.createInstance(ROi) : this.f.createInstance(_7o); + this.D(de.any(this.g.onDidChangeResourceEnablement, this.g.onDidChangeEnablement, this.j.onDidResetLocal, this.j.onDidResetRemote)(() => r.refresh())); + const o = Pe.as(ur.ViewsRegistry); + const a = { + id: s, + name: n, + ctorDescriptor: new Os(n8), + when: T.and(Ek.notEqualsTo("uninitialized"), aH.isEqualTo("available"), IEe), + canToggleVisibility: true, + canMoveView: false, + treeView: r, + collapsed: false, + order: t ? 200 : 400, + hideByDefault: !t + }; + o.registerViews([a], e); + this.u(s); + } + t(e) { + const t = "workbench.views.sync.externalActivity"; + const s = W(11880, "Sync Activity (Developer)"); + const n = this.f.createInstance(NOi, undefined); + const r = this.f.createInstance(cV, t, s.value); + r.showCollapseAllAction = false; + r.showRefreshAction = false; + r.dataProvider = n; + const o = Pe.as(ur.ViewsRegistry); + const a = { + id: t, + name: s, + ctorDescriptor: new Os(n8), + when: IEe, + canToggleVisibility: true, + canMoveView: false, + treeView: r, + collapsed: false, + hideByDefault: false + }; + o.registerViews([a], e); + this.D(J(class extends se { + constructor() { + super({ + id: "workbench.actions.sync.loadActivity", + title: f(11851, null), + icon: A.cloudUpload, + menu: { + id: _.ViewTitle, + when: T.equals("view", t), + group: "navigation" + } + }); + } + async run(l) { + const u = await l.get(Xl).showOpenDialog({ + title: f(11852, null), + canSelectFiles: true, + canSelectFolders: true, + canSelectMany: false + }); + if (u?.[0]) { + n.activityDataResource = u[0]; + await r.refresh(); + } + } + })); + } + u(e) { + this.D(J(class extends se { + constructor() { + super({ + id: `workbench.actions.sync.${e}.resolveResource`, + title: f(11853, null), + menu: { + id: _.ViewItemContext, + when: T.and(T.equals("view", e), T.regex("viewItem", /sync-resource-.*/i)) + } + }); + } + async run(t, s) { + const { + resource: n + } = JSON.parse(s.$treeItemHandle); + await t.get(Te).openEditor({ + resource: V.parse(n), + options: { + pinned: true + } + }); + } + })); + this.D(J(class extends se { + constructor() { + super({ + id: `workbench.actions.sync.${e}.compareWithLocal`, + title: f(11854, null), + menu: { + id: _.ViewItemContext, + when: T.and(T.equals("view", e), T.regex("viewItem", /sync-associatedResource-.*/i)) + } + }); + } + async run(t, s) { + const n = t.get(gt); + const { + resource: r, + comparableResource: o + } = JSON.parse(s.$treeItemHandle); + const a = V.parse(r); + const l = V.parse(o); + return n.executeCommand(sN, a, l, f(11855, null, f(11856, null, ji(a)), f(11857, null, ji(l))), undefined); + } + })); + this.D(J(class extends se { + constructor() { + super({ + id: `workbench.actions.sync.${e}.replaceCurrent`, + title: f(11858, null), + icon: A.discard, + menu: { + id: _.ViewItemContext, + when: T.and(T.equals("view", e), T.regex("viewItem", /sync-resource-.*/i), T.notEquals("viewItem", "sync-resource-profiles")), + group: "inline" + } + }); + } + async run(t, s) { + const n = t.get(Js); + const r = t.get(SP); + const { + syncResourceHandle: o, + syncResource: a + } = JSON.parse(s.$treeItemHandle); + if ((await n.confirm({ + message: f(11859, null, kk(a)), + type: "info", + title: ob.value + })).confirmed) { + return r.replace({ + created: o.created, + uri: V.revive(o.uri) + }); + } + } + })); + } + w(e) { + const t = "workbench.views.sync.troubleshoot"; + const s = W(11881, "Troubleshoot"); + const n = this.f.createInstance(cV, t, s.value); + const r = this.f.createInstance(AOi); + n.showRefreshAction = true; + n.dataProvider = r; + const o = Pe.as(ur.ViewsRegistry); + const a = { + id: t, + name: s, + ctorDescriptor: new Os(n8), + when: IEe, + canToggleVisibility: true, + canMoveView: false, + treeView: n, + collapsed: false, + order: 500, + hideByDefault: true + }; + o.registerViews([a], e); + } +}; +LOi = __decorate([__param(1, re), __param(2, Qm), __param(3, LEe), __param(4, SP)], LOi); +var ATe = class { + constructor(e, t, s, n, r, o) { + this.f = e; + this.g = t; + this.h = s; + this.i = n; + this.j = r; + this.k = o; + this.d = new Map(); + } + async getChildren(e) { + try { + if (!e) { + return await this.l(); + } + if (e.profile || e.handle === this.k.defaultProfile.id) { + let t = this.d.get(e.handle); + if (!t) { + this.d.set(e.handle, t = this.o(e.profile)); + } + return await t; + } + if (e.syncResourceHandle) { + return await this.n(e); + } else { + return []; + } + } catch (t) { + if (!(t instanceof kC)) { + t = kC.toUserDataSyncError(t); + } + if (t instanceof kC && t.code === "IncompatibleRemoteContent") { + this.j.notify({ + severity: es.Error, + message: t.message, + actions: { + primary: [new Yt("reset", f(11860, null), undefined, true, () => this.i.resetSyncedData())] + } + }); + } else { + this.j.error(t); + } + throw t; + } + } + async l() { + this.d.clear(); + const e = []; + const t = await this.q(); + if (t.length) { + const s = { + handle: this.k.defaultProfile.id, + label: { + label: this.k.defaultProfile.name + }, + collapsibleState: vu.Expanded + }; + e.push(s); + } else { + const s = await this.o(); + e.push(...s); + } + for (const s of t) { + const n = { + handle: s.id, + label: { + label: s.name + }, + collapsibleState: vu.Collapsed, + profile: s + }; + e.push(n); + } + return e; + } + async n(e) { + const t = e.syncResourceHandle; + const s = await this.g.getAssociatedResources(t); + const n = t.previous ? await this.g.getAssociatedResources(t.previous) : []; + return s.map(({ + resource: r, + comparableResource: o + }) => { + const a = JSON.stringify({ + resource: r.toString(), + comparableResource: o.toString() + }); + const l = n.find(c => ji(c.resource) === ji(r))?.resource; + return { + handle: a, + collapsibleState: vu.None, + resourceUri: r, + command: l ? { + id: sN, + title: "", + arguments: [l, r, f(11861, null, `${ji(r)} (${ym(t.previous.created, true)})`, `${ji(r)} (${ym(t.created, true)})`), undefined] + } : { + id: OE, + title: "", + arguments: [r, undefined, undefined] + }, + contextValue: `sync-associatedResource-${t.syncResource}` + }; + }); + } + async o(e) { + const t = []; + const n = (await Promise.all(fyt.map(async r => { + const o = await this.r(r, e); + return o.map((a, l) => ({ + ...a, + syncResource: r, + previous: o[l + 1] + })); + }))).flat().sort((r, o) => o.created - r.created); + for (const r of n) { + const o = JSON.stringify({ + syncResourceHandle: r, + syncResource: r.syncResource + }); + t.push({ + handle: o, + collapsibleState: vu.Collapsed, + label: { + label: kk(r.syncResource) + }, + description: ym(r.created, true), + tooltip: new Date(r.created).toLocaleString(), + themeIcon: Wj, + syncResourceHandle: r, + contextValue: `sync-resource-${r.syncResource}` + }); + } + return t; + } +}; +ATe = __decorate([__param(0, SP), __param(1, pyt), __param(2, I6), __param(3, JP), __param(4, ni), __param(5, Ml)], ATe); +var _7o = class extends ATe { + r(i, e) { + return this.g.getLocalSyncResourceHandles(i, e); + } + async q() { + return this.k.profiles.filter(i => !i.isDefault).map(i => ({ + id: i.id, + collection: i.id, + name: i.name + })); + } +}; +var ROi = class extends ATe { + constructor(e, t, s, n, r, o, a) { + super(e, t, s, r, o, a); + this.t = n; + } + async getChildren(e) { + if (!e) { + this.s = undefined; + } + return super.getChildren(e); + } + u() { + if (this.s === undefined) { + this.s = this.t.getMachines(); + } + return this.s; + } + r(e, t) { + return this.g.getRemoteSyncResourceHandles(e, t); + } + q() { + return this.g.getRemoteSyncedProfiles(); + } + async n(e) { + const t = await super.n(e); + if (t.length) { + const s = await this.g.getMachineId(e.syncResourceHandle); + if (s) { + const r = (await this.u()).find(({ + id: o + }) => o === s); + t[0].description = r?.isCurrent ? f(11862, null) : r?.name; + } + } + return t; + } +}; +ROi = __decorate([__param(0, SP), __param(1, pyt), __param(2, I6), __param(3, LEe), __param(4, JP), __param(5, ni), __param(6, Ml)], ROi); +var NOi = class extends ATe { + constructor(e, t, s, n, r, o, a, l, c) { + super(t, s, n, r, o, a); + this.activityDataResource = e; + this.u = l; + this.v = c; + } + async getChildren(e) { + if (!e) { + this.s = undefined; + if (!this.activityDataResource) { + return []; + } + if ((await this.u.resolve(this.activityDataResource)).isDirectory) { + this.t = this.activityDataResource; + } else { + this.t = this.v.extUri.joinPath(this.v.extUri.dirname(this.activityDataResource), "remoteActivity"); + try { + await this.u.del(this.t, { + recursive: true + }); + } catch {} + await this.f.extractActivityData(this.activityDataResource, this.t); + } + } + return super.getChildren(e); + } + r(e, t) { + return this.g.getLocalSyncResourceHandles(e, t, this.t); + } + async q() { + return this.g.getLocalSyncedProfiles(this.t); + } + async n(e) { + const t = await super.n(e); + if (t.length) { + const s = await this.g.getMachineId(e.syncResourceHandle); + if (s) { + const r = (await this.z()).find(({ + id: o + }) => o === s); + t[0].description = r?.isCurrent ? f(11863, null) : r?.name; + } + } + return t; + } + z() { + if (this.s === undefined) { + this.s = this.g.getLocalSyncedMachines(this.t); + } + return this.s; + } +}; +NOi = __decorate([__param(1, SP), __param(2, pyt), __param(3, I6), __param(4, JP), __param(5, ni), __param(6, Ml), __param(7, Ct), __param(8, _s)], NOi); +var MOi = class { + constructor(e, t, s, n, r, o) { + this.f = e; + this.g = t; + this.h = s; + this.i = n; + this.j = r; + this.k = o; + } + async getChildren(e) { + if (!e) { + this.d = undefined; + } + try { + let t = await this.l(); + t = t.filter(s => !s.disabled).sort((s, n) => s.isCurrent ? -1 : 1); + this.f.message = t.length ? undefined : f(11864, null); + return t.map(({ + id: s, + name: n, + isCurrent: r, + platform: o + }) => ({ + handle: s, + collapsibleState: vu.None, + label: { + label: n + }, + description: r ? f(11865, null) : undefined, + themeIcon: o && Jco(o) ? A.globe : A.vm, + contextValue: "sync-machine" + })); + } catch (t) { + this.i.error(t); + return []; + } + } + l() { + if (this.d === undefined) { + this.d = this.g.getMachines(); + } + return this.d; + } + async disable(e) { + const s = (await this.l()).filter(({ + id: o + }) => e.includes(o)); + if (!s.length) { + throw new Error(f(11866, null, e.join(","))); + } + if (!(await this.j.confirm({ + type: "info", + message: s.length > 1 ? f(11867, null) : f(11868, null, s[0].name), + primaryButton: f(11869, null) + })).confirmed) { + return false; + } + if (s.some(o => o.isCurrent)) { + await this.k.turnoff(false); + } + const r = s.filter(o => !o.isCurrent).map(o => [o.id, false]); + if (r.length) { + await this.g.setEnablements(r); + } + return true; + } + async rename(e) { + const t = new Q(); + const s = t.add(this.h.createInputBox()); + s.placeholder = f(11870, null); + s.busy = true; + s.show(); + const n = await this.l(); + const r = n.find(({ + id: a + }) => a === e); + if (!r) { + s.hide(); + t.dispose(); + throw new Error(f(11871, null, e)); + } + s.busy = false; + s.value = r.name; + const o = a => { + a = a.trim(); + if (a && !n.some(l => l.id !== e && l.name === a)) { + return a; + } else { + return null; + } + }; + t.add(s.onDidChangeValue(() => s.validationMessage = o(s.value) ? "" : f(11872, null))); + return new Promise((a, l) => { + t.add(s.onDidAccept(async () => { + const c = o(s.value); + t.dispose(); + if (c && c !== r.name) { + try { + await this.g.renameMachine(e, c); + a(true); + } catch (u) { + l(u); + } + } else { + a(false); + } + })); + }); + } +}; +MOi = __decorate([__param(1, LEe), __param(2, zi), __param(3, ni), __param(4, Js), __param(5, JP)], MOi); +var AOi = class { + constructor(e, t, s, n) { + this.d = e; + this.f = t; + this.g = s; + this.h = n; + } + async getChildren(e) { + if (e) { + if (e.handle === "LAST_SYNC_STATES") { + return this.i(); + } else if (e.handle === "SYNC_LOGS") { + return this.j(); + } else { + return []; + } + } else { + return [{ + handle: "SYNC_LOGS", + collapsibleState: vu.Collapsed, + label: { + label: f(11873, null) + }, + themeIcon: A.folder + }, { + handle: "LAST_SYNC_STATES", + collapsibleState: vu.Collapsed, + label: { + label: f(11874, null) + }, + themeIcon: A.folder + }]; + } + } + async i() { + const e = []; + for (const t of fyt) { + const s = bni(undefined, t, this.g, this.h.extUri); + if (await this.d.exists(s)) { + e.push({ + handle: s.toString(), + label: { + label: kk(t) + }, + collapsibleState: vu.None, + resourceUri: s, + command: { + id: OE, + title: "", + arguments: [s, undefined, undefined] + } + }); + } + } + return e; + } + async j() { + const e = await this.f.getAllLogResources(); + const t = []; + for (const s of e) { + const n = this.h.extUri.dirname(s); + t.push({ + handle: s.toString(), + collapsibleState: vu.None, + resourceUri: s, + label: { + label: this.h.extUri.basename(n) + }, + description: this.h.extUri.isEqual(n, this.g.logsHome) ? f(11875, null) : undefined, + command: { + id: OE, + title: "", + arguments: [s, undefined, undefined] + } + }); + } + return t; + } +}; +AOi = __decorate([__param(0, Ct), __param(1, JP), __param(2, pa), __param(3, _s)], AOi); +He(); +rt(); +var AAt = { + id: "workbench.userDataSync.actions.turnOff", + title: W(11834, "Turn Off") +}; +var $At = { + id: Wco, + title: W(11835, "Configure...") +}; +var DNn = "workbench.userDataSync.actions.showConflicts"; +var $Te = { + id: "workbench.userDataSync.actions.syncNow", + title: W(11836, "Sync Now"), + description(i) { + if (i.status === "syncing") { + return f(11764, null); + } + if (i.lastSyncTime) { + return f(11765, null, ym(i.lastSyncTime, true)); + } + } +}; +var FAt = { + id: "workbench.userDataSync.actions.settings", + title: W(11837, "Show Settings") +}; +var OAt = { + id: "workbench.userDataSync.actions.showSyncedData", + title: W(11838, "Show Synced Data") +}; +var _At = new fe("userDataSyncTurningOn", false); +var $Oi = class extends H { + constructor(e, t, s, n, r, o, a, l, c, u, d, h, g, p, b, v, y, w, C, S, x, k, E) { + super(); + this.g = e; + this.h = t; + this.j = s; + this.m = r; + this.n = o; + this.q = a; + this.r = l; + this.s = c; + this.t = u; + this.u = d; + this.w = h; + this.y = b; + this.z = v; + this.C = y; + this.F = w; + this.G = C; + this.H = S; + this.I = x; + this.J = k; + this.L = E; + this.b = this.D(new ki()); + this.f = this.D(new ki()); + this.O = new Map(); + this.W = new Map(); + this.qb = this.D(new ki()); + this.a = _At.bindTo(n); + if (s.enabled) { + KIr(); + this.ab(); + this.$(); + this.P(this.h.conflicts); + this.D(de.any(de.debounce(t.onDidChangeStatus, () => {}, 500), this.g.onDidChangeEnablement, this.j.onDidChangeAccountStatus)(() => { + this.ab(); + this.$(); + })); + this.D(t.onDidChangeConflicts(() => this.P(this.h.conflicts))); + this.D(e.onDidChangeEnablement(() => this.P(this.h.conflicts))); + this.D(t.onSyncErrors(D => this.X(D))); + this.D(g.onError(D => this.S(D))); + this.kb(); + this.Cb(); + p.registerTextModelContentProvider(kP, d.createInstance(FOi)); + this.D(de.any(t.onDidChangeStatus, e.onDidChangeEnablement)(() => this.M = !e.isEnabled() && t.status !== "idle")); + } + } + get M() { + return !!this.a.get(); + } + set M(e) { + this.a.set(e); + this.$(); + } + N({ + syncResource: e, + profile: t + }) { + return `${t.id}:${e}`; + } + P(e) { + this.$(); + this.rb(); + if (this.g.isEnabled()) { + if (e.length) { + for (const [t, s] of this.O.entries()) { + if (!e.some(n => this.N(n) === t)) { + s.dispose(); + this.O.delete(t); + } + } + for (const t of this.h.conflicts) { + const s = this.N(t); + if (!this.O.has(s)) { + const n = kk(t.syncResource); + const r = this.n.prompt(es.Warning, f(11766, null, n.toLowerCase()), [{ + label: f(11767, null), + run: () => { + this.z.publicLog2("sync/handleConflicts", { + source: t.syncResource, + action: "acceptLocal" + }); + this.R(t, t.conflicts[0]); + } + }, { + label: f(11768, null), + run: () => { + this.z.publicLog2("sync/handleConflicts", { + source: t.syncResource, + action: "acceptRemote" + }); + this.Q(t, t.conflicts[0]); + } + }, { + label: f(11769, null), + run: () => { + this.z.publicLog2("sync/showConflicts", { + source: t.syncResource + }); + this.j.showConflicts(t.conflicts[0]); + } + }], { + sticky: true + }); + this.O.set(s, Ue(() => { + r.close(); + this.O.delete(s); + })); + } + } + } else { + this.O.forEach(t => t.dispose()); + this.O.clear(); + } + } + } + async Q(e, t) { + try { + await this.h.accept(e, t.remoteResource, undefined, this.g.isEnabled()); + } catch { + this.n.error(f(11770, null, `command:${M8}`)); + } + } + async R(e, t) { + try { + await this.h.accept(e, t.localResource, undefined, this.g.isEnabled()); + } catch { + this.n.error(f(11771, null, `command:${M8}`)); + } + } + S(e) { + switch (e.code) { + case "SessionExpired": + this.n.notify({ + severity: es.Info, + message: f(11772, null), + actions: { + primary: [new Yt("turn on sync", f(11773, null), undefined, true, () => this.bb())] + } + }); + break; + case "TurnedOff": + this.n.notify({ + severity: es.Info, + message: f(11774, null), + actions: { + primary: [new Yt("turn on sync", f(11775, null), undefined, true, () => this.bb())] + } + }); + break; + case "TooLarge": + if (e.resource === "keybindings" || e.resource === "settings" || e.resource === "tasks") { + this.hb(e.resource); + const t = kk(e.resource); + this.U(e.resource, f(11776, null, t.toLowerCase(), t.toLowerCase(), "100kb"), e); + } + break; + case "LocalTooManyProfiles": + this.hb("profiles"); + this.n.error(f(11777, null)); + break; + case "IncompatibleLocalContent": + case "Gone": + case "UpgradeRequired": + { + const t = f(11778, null, this.C.version, this.C.commit); + const s = e.operationId ? f(11779, null, e.operationId) : undefined; + this.n.notify({ + severity: es.Error, + message: s ? `${t} ${s}` : t + }); + break; + } + case "MethodNotFound": + { + const t = f(11780, null); + const s = e.operationId ? f(11781, null, e.operationId) : undefined; + this.n.notify({ + severity: es.Error, + message: s ? `${t} ${s}` : t, + actions: { + primary: [new Yt("Show Sync Logs", f(11782, null), undefined, true, () => this.J.executeCommand(M8)), new Yt("Report Issue", f(11783, null), undefined, true, () => this.L.openReporter())] + } + }); + break; + } + case "IncompatibleRemoteContent": + this.n.notify({ + severity: es.Error, + message: f(11784, null), + actions: { + primary: [new Yt("reset", f(11785, null), undefined, true, () => this.j.resetSyncedData()), new Yt("show synced data", f(11786, null), undefined, true, () => this.j.showSyncActivity())] + } + }); + return; + case "ServiceChanged": + this.n.notify({ + severity: es.Info, + message: this.H.userDataSyncStore?.type === "insiders" ? f(11787, null) : f(11788, null) + }); + return; + case "DefaultServiceChanged": + if (this.g.isEnabled()) { + this.n.notify({ + severity: es.Info, + message: f(11789, null) + }); + } else { + this.n.notify({ + severity: es.Info, + message: f(11790, null, this.C.nameLong), + actions: { + primary: [new Yt("turn on sync", f(11791, null), undefined, true, () => this.bb())] + } + }); + } + return; + } + } + U(e, t, s) { + const n = s.operationId ? f(11792, null, s.operationId) : undefined; + this.n.notify({ + severity: es.Error, + message: n ? `${t} ${n}` : t, + actions: { + primary: [new Yt("open sync file", f(11793, null, kk(e)), undefined, true, () => e === "settings" ? this.y.openUserSettings({ + jsonEditor: true + }) : this.y.openGlobalKeybindingSettings(true))] + } + }); + } + X(e) { + if (e.length) { + for (const { + profile: t, + syncResource: s, + error: n + } of e) { + switch (n.code) { + case "LocalInvalidContent": + this.Y({ + profile: t, + syncResource: s + }); + break; + default: + { + const r = `${t.id}:${s}`; + const o = this.W.get(r); + if (o) { + o.dispose(); + this.W.delete(r); + } + } + } + } + } else { + this.W.forEach(t => t.dispose()); + this.W.clear(); + } + } + Y({ + profile: e, + syncResource: t + }) { + if (this.r.currentProfile.id !== e.id) { + return; + } + const s = `${e.id}:${t}`; + if (this.W.has(s) || t !== "settings" && t !== "keybindings" && t !== "tasks" || !this.I.hasFocus) { + return; + } + const n = t === "settings" ? this.r.currentProfile.settingsResource : t === "keybindings" ? this.r.currentProfile.keybindingsResource : this.r.currentProfile.tasksResource; + const r = vo.getCanonicalUri(this.q.activeEditor, { + supportSideBySide: fo.PRIMARY + }); + if (Ls(n, r)) { + return; + } + const o = kk(t); + const a = this.n.notify({ + severity: es.Error, + message: f(11794, null, o.toLowerCase()), + actions: { + primary: [new Yt("open sync file", f(11795, null, o), undefined, true, () => t === "settings" ? this.y.openUserSettings({ + jsonEditor: true + }) : this.y.openGlobalKeybindingSettings(true))] + } + }); + this.W.set(s, Ue(() => { + a.close(); + this.W.delete(s); + })); + } + Z() { + return this.h.conflicts.reduce((e, { + conflicts: t + }) => e + t.length, 0); + } + async $() { + this.b.clear(); + let e; + let t; + if (this.h.conflicts.length && this.g.isEnabled()) { + e = new py(this.Z(), () => f(11796, null, ob.value)); + } else if (this.M) { + e = new lV(() => f(11797, null)); + t = 1; + } + if (e) { + this.b.value = this.m.showGlobalActivity({ + badge: e, + priority: t + }); + } + } + async ab() { + this.f.clear(); + let e; + if (this.h.status !== "uninitialized" && this.g.isEnabled() && this.j.accountStatus === "unavailable") { + e = new py(1, () => f(11798, null)); + } + if (e) { + this.f.value = this.m.showAccountsActivity({ + badge: e, + priority: undefined + }); + } + } + async bb() { + try { + if (!this.j.authenticationProviders.length) { + throw new Error(f(11799, null)); + } + if (!(await this.cb())) { + return; + } + if (this.H.userDataSyncStore?.canSwitch) { + await this.jb(this.H.userDataSyncStore); + } + await this.j.turnOn(); + } catch (e) { + if (ca(e)) { + return; + } + if (e instanceof kC) { + switch (e.code) { + case "TooLarge": + if (e.resource === "keybindings" || e.resource === "settings" || e.resource === "tasks") { + this.U(e.resource, f(11800, null, kk(e.resource).toLowerCase(), "100kb"), e); + return; + } + break; + case "IncompatibleLocalContent": + case "Gone": + case "UpgradeRequired": + { + const t = f(11801, null, this.C.version, this.C.commit); + const s = e.operationId ? f(11802, null, e.operationId) : undefined; + this.n.notify({ + severity: es.Error, + message: s ? `${t} ${s}` : t + }); + return; + } + case "IncompatibleRemoteContent": + this.n.notify({ + severity: es.Error, + message: f(11803, null), + actions: { + primary: [new Yt("reset", f(11804, null), undefined, true, () => this.j.resetSyncedData()), new Yt("show synced data", f(11805, null), undefined, true, () => this.j.showSyncActivity())] + } + }); + return; + case "Unauthorized": + case "Forbidden": + this.n.error(f(11806, null)); + return; + } + this.n.error(f(11807, null, `command:${M8}`)); + } else { + this.n.error(f(11808, null, cc(e))); + } + } + } + async cb() { + return new Promise((e, t) => { + const s = new Q(); + const n = this.t.createQuickPick(); + s.add(n); + n.title = ob.value; + n.ok = false; + n.customButton = true; + n.customLabel = f(11809, null); + n.description = f(11810, null); + n.canSelectMany = true; + n.ignoreFocusOut = true; + n.hideInput = true; + n.hideCheckAll = true; + const r = this.db(); + n.items = r; + n.selectedItems = r.filter(a => this.g.isResourceEnabled(a.id)); + let o = false; + s.add(de.any(n.onDidAccept, n.onDidCustom)(() => { + o = true; + n.hide(); + })); + s.add(n.onDidHide(() => { + try { + if (o) { + this.eb(r, n.selectedItems); + } + e(o); + } catch (a) { + t(a); + } finally { + s.dispose(); + } + })); + n.show(); + }); + } + db() { + return [{ + id: "settings", + label: kk("settings") + }, { + id: "keybindings", + label: kk("keybindings") + }, { + id: "snippets", + label: kk("snippets") + }, { + id: "tasks", + label: kk("tasks") + }, { + id: "globalState", + label: kk("globalState") + }, { + id: "extensions", + label: kk("extensions") + }, { + id: "profiles", + label: kk("profiles") + }]; + } + eb(e, t) { + for (const s of e) { + const n = this.g.isResourceEnabled(s.id); + const r = !!t.filter(o => o.id === s.id)[0]; + if (n !== r) { + this.g.setResourceEnablement(s.id, r); + } + } + } + async fb() { + return new Promise((e, t) => { + const s = new Q(); + const n = this.t.createQuickPick(); + s.add(n); + n.title = f(11811, null, ob.value); + n.placeholder = f(11812, null); + n.canSelectMany = true; + n.ignoreFocusOut = true; + n.ok = true; + const r = this.db(); + n.items = r; + n.selectedItems = r.filter(o => this.g.isResourceEnabled(o.id)); + s.add(n.onDidAccept(async () => { + if (n.selectedItems.length) { + this.eb(r, n.selectedItems); + n.hide(); + } + })); + s.add(n.onDidHide(() => { + s.dispose(); + e(); + })); + n.show(); + }); + } + async gb() { + const e = await this.s.confirm({ + message: f(11813, null), + detail: f(11814, null), + primaryButton: f(11815, null), + checkbox: this.j.accountStatus === "available" ? { + label: f(11816, null) + } : undefined + }); + if (e.confirmed) { + return this.j.turnoff(!!e.checkboxChecked); + } + } + hb(e) { + switch (e) { + case "settings": + return this.g.setResourceEnablement("settings", false); + case "keybindings": + return this.g.setResourceEnablement("keybindings", false); + case "snippets": + return this.g.setResourceEnablement("snippets", false); + case "tasks": + return this.g.setResourceEnablement("tasks", false); + case "extensions": + return this.g.setResourceEnablement("extensions", false); + case "globalState": + return this.g.setResourceEnablement("globalState", false); + case "profiles": + return this.g.setResourceEnablement("profiles", false); + } + } + ib() { + return this.w.showChannel(byt); + } + async jb(e) { + return new Promise((t, s) => { + const n = new Q(); + const r = n.add(this.t.createQuickPick()); + r.title = f(11817, null, ob.value); + r.description = f(11818, null); + r.hideInput = true; + r.ignoreFocusOut = true; + const o = a => { + if (Ls(a, e.defaultUrl)) { + return f(11819, null); + } + }; + r.items = [{ + id: "insiders", + label: f(11820, null), + description: o(e.insidersUrl) + }, { + id: "stable", + label: f(11821, null), + description: o(e.stableUrl) + }]; + n.add(r.onDidAccept(async () => { + try { + await this.H.switch(r.selectedItems[0].id); + t(); + } catch (a) { + s(a); + } finally { + r.hide(); + } + })); + n.add(r.onDidHide(() => n.dispose())); + r.show(); + }); + } + kb() { + if (this.g.canToggleEnablement()) { + this.lb(); + this.vb(); + } + this.mb(); + this.nb(); + this.ob(); + this.rb(); + this.tb(); + this.sb(); + this.ub(); + this.wb(); + this.yb(); + this.zb(); + this.xb(); + this.Eb(); + this.Ab(); + if (tn) { + this.Bb(); + } + } + lb() { + const e = this; + const t = T.and(Ek.notEqualsTo("uninitialized"), ON.toNegated(), _At.negate()); + this.D(J(class extends se { + constructor() { + super({ + id: "workbench.userDataSync.actions.turnOn", + title: W(11839, "Backup and Sync Settings..."), + category: ob, + f1: true, + precondition: t, + menu: [{ + group: "3_configuration", + id: _.GlobalActivity, + when: t, + order: 2 + }, { + group: "3_configuration", + id: _.MenubarPreferencesMenu, + when: t, + order: 2 + }, { + group: "1_settings", + id: _.AccountsContext, + when: t, + order: 2 + }] + }); + } + async run() { + return e.bb(); + } + })); + } + mb() { + const e = T.and(Ek.notEqualsTo("uninitialized"), ON.toNegated(), _At); + this.D(J(class extends se { + constructor() { + super({ + id: "workbench.userData.actions.turningOn", + title: f(11822, null), + precondition: T.false(), + menu: [{ + group: "3_configuration", + id: _.GlobalActivity, + when: e, + order: 2 + }, { + group: "1_settings", + id: _.AccountsContext, + when: e + }] + }); + } + async run() {} + })); + } + nb() { + const e = this; + this.D(J(class extends se { + constructor() { + super({ + id: "workbench.userData.actions.cancelTurnOn", + title: f(11823, null), + icon: A.stopCircle, + menu: { + id: _.ViewContainerTitle, + when: T.and(_At, T.equals("viewContainer", A8)), + group: "navigation", + order: 1 + } + }); + } + async run() { + return e.j.turnoff(false); + } + })); + } + ob() { + const e = this; + const t = "workbench.userData.actions.signin"; + const s = T.and(Ek.notEqualsTo("uninitialized"), ON, aH.isEqualTo("unavailable")); + this.D(J(class extends se { + constructor() { + super({ + id: "workbench.userData.actions.signin", + title: f(11824, null), + menu: { + group: "3_configuration", + id: _.GlobalActivity, + when: s, + order: 2 + } + }); + } + async run() { + try { + await e.j.signIn(); + } catch (r) { + e.n.error(r); + } + } + })); + this.D(Be.appendMenuItem(_.AccountsContext, { + group: "1_settings", + command: { + id: t, + title: f(11825, null) + }, + when: s + })); + } + pb() { + return W(11840, "Show Conflicts ({0})", this.Z()); + } + rb() { + this.qb.value = undefined; + const e = this; + this.qb.value = J(class extends se { + constructor() { + super({ + id: DNn, + get title() { + return e.pb(); + }, + category: ob, + f1: true, + precondition: DEe, + menu: [{ + group: "3_configuration", + id: _.GlobalActivity, + when: DEe, + order: 2 + }, { + group: "3_configuration", + id: _.MenubarPreferencesMenu, + when: DEe, + order: 2 + }] + }); + } + async run() { + return e.j.showConflicts(); + } + }); + } + sb() { + const e = this; + const t = T.and(ON, aH.notEqualsTo("unavailable"), Ek.notEqualsTo("uninitialized")); + this.D(J(class extends se { + constructor() { + super({ + id: "workbench.userDataSync.actions.manage", + title: f(11826, null), + toggled: t1.INSTANCE, + menu: [{ + id: _.GlobalActivity, + group: "3_configuration", + when: t, + order: 2 + }, { + id: _.MenubarPreferencesMenu, + group: "3_configuration", + when: t, + order: 2 + }, { + id: _.AccountsContext, + group: "1_settings", + when: t + }] + }); + } + run(n) { + return new Promise((r, o) => { + const a = n.get(zi); + const l = n.get(gt); + const c = new Q(); + const u = a.createQuickPick({ + useSeparators: true + }); + c.add(u); + const d = []; + if (e.h.conflicts.length) { + d.push({ + id: DNn, + label: `${ob.value}: ${e.pb().original}` + }); + d.push({ + type: "separator" + }); + } + d.push({ + id: $At.id, + label: `${ob.value}: ${$At.title.original}` + }); + d.push({ + id: FAt.id, + label: `${ob.value}: ${FAt.title.original}` + }); + d.push({ + id: OAt.id, + label: `${ob.value}: ${OAt.title.original}` + }); + d.push({ + type: "separator" + }); + d.push({ + id: $Te.id, + label: `${ob.value}: ${$Te.title.original}`, + description: $Te.description(e.h) + }); + if (e.g.canToggleEnablement()) { + const h = e.j.current; + d.push({ + id: AAt.id, + label: `${ob.value}: ${AAt.title.original}`, + description: h ? `${h.accountName} (${e.G.getProvider(h.authenticationProviderId).label})` : undefined + }); + } + u.items = d; + c.add(u.onDidAccept(() => { + if (u.selectedItems[0] && u.selectedItems[0].id) { + l.executeCommand(u.selectedItems[0].id); + } + u.hide(); + })); + c.add(u.onDidHide(() => { + c.dispose(); + r(); + })); + u.show(); + }); + } + })); + } + tb() { + const e = this; + const t = T.and(aH.isEqualTo("available"), Ek.notEqualsTo("uninitialized")); + this.D(J(class extends se { + constructor() { + super({ + id: OAt.id, + title: OAt.title, + category: ob, + precondition: t, + menu: { + id: _.CommandPalette, + when: t + } + }); + } + run(n) { + return e.j.showSyncActivity(); + } + })); + } + ub() { + const e = this; + this.D(J(class extends se { + constructor() { + super({ + id: $Te.id, + title: $Te.title, + category: ob, + menu: { + id: _.CommandPalette, + when: T.and(ON, aH.isEqualTo("available"), Ek.notEqualsTo("uninitialized")) + } + }); + } + run(s) { + return e.j.syncNow(); + } + })); + } + vb() { + const e = this; + this.D(J(class extends se { + constructor() { + super({ + id: AAt.id, + title: AAt.title, + category: ob, + menu: { + id: _.CommandPalette, + when: T.and(Ek.notEqualsTo("uninitialized"), ON) + } + }); + } + async run() { + try { + await e.gb(); + } catch (s) { + if (!ca(s)) { + e.n.error(f(11827, null, `command:${M8}`)); + } + } + } + })); + } + wb() { + const e = this; + const t = T.and(Ek.notEqualsTo("uninitialized"), ON); + this.D(J(class extends se { + constructor() { + super({ + id: $At.id, + title: $At.title, + category: ob, + icon: A.settingsGear, + tooltip: f(11828, null), + menu: [{ + id: _.CommandPalette, + when: t + }, { + id: _.ViewContainerTitle, + when: T.and(ON, T.equals("viewContainer", A8)), + group: "navigation", + order: 2 + }] + }); + } + run() { + return e.fb(); + } + })); + } + xb() { + const e = this; + this.D(J(class extends se { + constructor() { + super({ + id: M8, + title: f(11829, null, ob.value), + tooltip: f(11830, null), + icon: A.output, + menu: [{ + id: _.CommandPalette, + when: T.and(Ek.notEqualsTo("uninitialized")) + }, { + id: _.ViewContainerTitle, + when: T.equals("viewContainer", A8), + group: "navigation", + order: 1 + }] + }); + } + run() { + return e.ib(); + } + })); + } + yb() { + this.D(J(class extends se { + constructor() { + super({ + id: FAt.id, + title: FAt.title, + category: ob, + menu: { + id: _.CommandPalette, + when: T.and(Ek.notEqualsTo("uninitialized")) + } + }); + } + run(t) { + t.get(fa).openUserSettings({ + jsonEditor: false, + query: "@tag:sync" + }); + } + })); + } + zb() { + const e = this; + this.D(J(class extends se { + constructor() { + super({ + id: "workbench.userDataSync.actions.help", + title: ob, + category: pt.Help, + menu: [{ + id: _.CommandPalette, + when: T.and(Ek.notEqualsTo("uninitialized")) + }] + }); + } + run() { + return e.F.open(V.parse("https://aka.ms/vscode-settings-sync-help")); + } + })); + Be.appendMenuItem(_.ViewContainerTitle, { + command: { + id: "workbench.userDataSync.actions.help", + title: pt.Help.value + }, + when: T.equals("viewContainer", A8), + group: "1_help" + }); + } + Ab() { + const e = this; + this.D(J(class extends se { + constructor() { + super({ + id: "workbench.userDataSync.actions.acceptMerges", + title: f(11831, null), + menu: [{ + id: _.EditorContent, + when: T.and(Tan, T.regex(Lan.key, new RegExp(`^${kP}:`))) + }] + }); + } + async run(s, n) { + const r = s.get(So); + await r.save(n); + const o = await r.read(n); + await e.h.accept(this.a(n), n, o.value, true); + } + a(s) { + const n = e.h.conflicts.find(({ + conflicts: r + }) => r.some(o => Ls(o.previewResource, s))); + if (n) { + return n; + } + throw new Error(`Unknown resource: ${s.toString()}`); + } + })); + } + Bb() { + this.D(J(class extends se { + constructor() { + super(_mn); + } + async run(t) { + const s = t.get(JP); + const n = t.get(ni); + if (await s.downloadSyncActivity()) { + n.info(f(11832, null)); + } + } + })); + } + Cb() { + const e = this.Db(); + this.Fb(e); + } + Db() { + return Pe.as(ur.ViewContainersRegistry).registerViewContainer({ + id: A8, + title: ob, + ctorDescriptor: new Os(rp, [A8, { + mergeViewWithContainerWhenSingleView: true + }]), + icon: Uco, + hideIfEmpty: true + }, 0); + } + Eb() { + const e = this; + this.D(J(class extends se { + constructor() { + super({ + id: "workbench.actions.syncData.reset", + title: f(11833, null), + menu: [{ + id: _.ViewContainerTitle, + when: T.equals("viewContainer", A8), + group: "0_configure" + }] + }); + } + run() { + return e.j.resetSyncedData(); + } + })); + } + Fb(e) { + this.D(this.u.createInstance(LOi, e)); + } +}; +$Oi = __decorate([__param(0, Qm), __param(1, SP), __param(2, JP), __param(3, Ne), __param(4, cm), __param(5, ni), __param(6, Te), __param(7, Rc), __param(8, Js), __param(9, zi), __param(10, re), __param(11, MC), __param(12, I6), __param(13, ns), __param(14, fa), __param(15, Ot), __param(16, ys), __param(17, os), __param(18, dw), __param(19, uK), __param(20, kr), __param(21, gt), __param(22, x6)], $Oi); +var FOi = class { + constructor(e, t, s) { + this.a = e; + this.b = t; + this.d = s; + } + provideTextContent(e) { + if (e.scheme === kP) { + return this.a.resolveContent(e).then(t => this.b.createModel(t || "", this.d.createById("jsonc"), e)); + } else { + return null; + } + } +}; +FOi = __decorate([__param(0, SP), __param(1, $s), __param(2, As)], FOi); +Wi(); +q(); +X(); +rt(); +pe(); +q(); +rt(); +Et(); +mu(); +lo(); +vt(); +var OOi = class extends H { + constructor(e, t, s, n, r) { + super(); + this.a = t; + const o = de.filter(de.any(de.map(e.onDidActiveEditorChange, () => this.b(e.activeEditor)), de.map(de.filter(s.onDidChangeViewContainerVisibility, a => a.id === Tb && a.visible), a => a.id)), a => a !== undefined); + if (tn) { + this.D(de.debounce(de.any(de.map(r.onDidChangeFocus, () => "windowFocus"), de.map(o, a => a)), (a, l) => a ? [...a, l] : [l], 1000)(a => n.triggerSync(a, true, false))); + } else { + this.D(o(a => n.triggerSync([a], true, false))); + } + } + b(e) { + if (!e) { + return; + } + if (e instanceof bX) { + return "settingsEditor"; + } + if (e instanceof mX) { + return "keybindingsEditor"; + } + const t = e.resource; + if (Ls(t, this.a.defaultProfile.settingsResource)) { + return "settingsEditor"; + } + if (Ls(t, this.a.defaultProfile.keybindingsResource)) { + return "keybindingsEditor"; + } + } +}; +OOi = __decorate([__param(0, Te), __param(1, Ml), __param(2, zs), __param(3, I6), __param(4, kr)], OOi); +Fs(); +kn(); +Wt(); +var _Oi = class extends H { + constructor(e, t, s, n, r) { + super(); + this.a = t; + this.b = s; + this.c = n; + this.f = r; + this.D(e.onError(o => this.g(o))); + } + g(e) { + switch (e.code) { + case "LocalTooManyRequests": + { + const t = tn ? f(11755, null, this.b.nameLong) : f(11756, null, this.b.nameLong); + this.a.notify({ + severity: es.Error, + message: t, + actions: { + primary: [new Yt("Show Sync Logs", f(11757, null), undefined, true, () => this.c.executeCommand(M8)), new Yt("Restart", f(tn ? 11758 : 11759, null), undefined, true, () => this.f.restart())] + } + }); + return; + } + case "RemoteTooManyRequests": + { + const t = e.operationId ? f(11760, null, e.operationId) : undefined; + const s = f(11761, null); + this.a.notify({ + severity: es.Error, + message: t ? `${s} ${t}` : s, + source: e.operationId ? f(11762, null, e.operationId) : undefined, + actions: { + primary: [new Yt("Show Sync Logs", f(11763, null), undefined, true, () => this.c.executeCommand(M8))] + } + }); + return; + } + } + } +}; +_Oi = __decorate([__param(0, I6), __param(1, ni), __param(2, ys), __param(3, gt), __param(4, kr)], _Oi); +var BOi = Pe.as(Er.Workbench); +BOi.registerWorkbenchContribution($Oi, 3); +BOi.registerWorkbenchContribution(OOi, 4); +BOi.registerWorkbenchContribution(_Oi, 4); +q(); +rt(); +X(); +Je(); +Ee(); +mu(); +da(); +mn(); +Wi(); +Le(); +ai(); +ii(); +te(); +Le(); +var B7o = /^([^@:]+@)?([^:]+):/; +var U7o = /^([^@:]+@)?([^:]+):(.+)$/; +var W7o = /^([^@]+@)?([^:]+)(:\d+)?$/; +var V7o = /([^@:.]+\.[^@:.]+)(:\d+)?$/; +var TNn = /^\s*url\s*=\s*(.+\S)\s*$/mg; +var H7o = /[^.]/g; +var q7o = ["github.com", "bitbucket.org", "visualstudio.com", "gitlab.com", "heroku.com", "azurewebsites.net", "ibm.com", "amazon.com", "amazonaws.com", "cloudapp.net", "rhcloud.com", "google.com", "azure.com"]; +function PNn(i) { + const e = i.match(V7o); + if (e) { + return e[1]; + } else { + return null; + } +} +function j7o(i) { + if (i.indexOf("://") === -1) { + const e = i.match(B7o); + if (e) { + return PNn(e[2]); + } else { + return null; + } + } + try { + const e = V.parse(i); + if (e.authority) { + return PNn(e.authority); + } + } catch {} + return null; +} +function z7o(i, e) { + const t = new Set(); + let s; + while (s = TNn.exec(i)) { + const r = j7o(s[1]); + if (r) { + t.add(r); + } + } + const n = new Set(e); + return Array.from(t).map(r => n.has(r) ? r : r.replace(H7o, "a")); +} +function J7o(i) { + const e = i.match(W7o); + if (e) { + return e[2]; + } else { + return null; + } +} +function LNn(i, e, t) { + if (i && e) { + if (t && e.endsWith(".git")) { + e = e.substr(0, e.length - 4); + } + if (e.indexOf("/") === 0) { + return `${i}${e}`; + } else { + return `${i}/${e}`; + } + } else { + return null; + } +} +function G7o(i, e) { + if (i.indexOf("://") === -1) { + const t = i.match(U7o); + if (t) { + return LNn(t[2], t[3], e); + } + } + try { + const t = V.parse(i); + if (t.authority) { + return LNn(J7o(t.authority), t.path, e); + } + } catch {} + return null; +} +function K7o(i, e = false) { + const t = []; + let s; + while (s = TNn.exec(i)) { + const n = G7o(s[1], e); + if (n) { + t.push(n); + } + } + return t; +} +var UOi = Ve("workspaceTagsService"); +async function Y7o(i, e = false, t) { + return Promise.all(K7o(i, e).map(s => t(s))); +} +gs(); +Ht(); +Nn(); +xe(); +Fs(); +pe(); +Rt(); +X(); +ks(); +te(); +qt(); +ai(); +gi(); +mu(); +Zp(); +Wd(); +ya(); +Qs(); +Sme(); +q(); +_a(); +Dz(); +Le(); +so(); +zt(); +Et(); +fn(); +mn(); +Fs(); +pe(); +Rt(); +X(); +te(); +ai(); +mu(); +q(); +Le(); +Jt(); +Jr(); +He(); +fn(); +Nt(); +Ps(); +nt(); +ri(); +vt(); +Wt(); +Me(); +In(); +Ut(); +rt(); +kn(); +gs(); +ii(); +Un(); +zt(); +kd(); +var Zue; +function RNn(i) { + return i.resourceType !== undefined; +} +function X7o(i) { + return i.label !== undefined; +} +var nB = class extends H { + constructor(e, t, s, n, r, o, a, l, c, u, d, h, g, p) { + super(); + this.g = o; + this.h = a; + this.j = l; + this.m = c; + this.n = u; + this.q = d; + this.s = h; + this.t = g; + this.u = p; + this.c = this.D(new B()); + this.onDidChange = this.c.event; + this.f = this.D(new Vn(() => this.O(), 500)); + this.w = ""; + this.F = false; + this.H = false; + this.w = e; + this.y = t; + this.C = s; + this.z = n; + this.F = r; + this.D(this.onDidChange(b => { + if (!b.message) { + this.validate(); + } + this.save(); + })); + this.D(this.t.onProfileAwareDidInstallExtensions(b => { + const v = this.P(); + if (v && b.some(y => !y.error && (y.applicationScoped || this.q.extUri.isEqual(y.profileLocation, v.extensionsResource)))) { + this.c.fire({ + extensions: true + }); + } + })); + this.D(this.t.onProfileAwareDidUninstallExtension(b => { + const v = this.P(); + if (v && !b.error && (b.applicationScoped || this.q.extUri.isEqual(b.profileLocation, v.extensionsResource))) { + this.c.fire({ + extensions: true + }); + } + })); + this.D(this.t.onProfileAwareDidUpdateExtensionMetadata(b => { + const v = this.P(); + if (v && b.local.isApplicationScoped || this.q.extUri.isEqual(b.profileLocation, v?.extensionsResource)) { + this.c.fire({ + extensions: true + }); + } + })); + } + get name() { + return this.w; + } + set name(e) { + e = e.trim(); + if (this.w !== e) { + this.w = e; + this.c.fire({ + name: true + }); + } + } + get icon() { + return this.y; + } + set icon(e) { + if (this.y !== e) { + this.y = e; + this.c.fire({ + icon: true + }); + } + } + get workspaces() { + return this.z; + } + set workspaces(e) { + if (!Go(this.z, e, (t, s) => t.toString() === s.toString())) { + this.z = e; + this.c.fire({ + workspaces: true + }); + } + } + get flags() { + return this.C; + } + set flags(e) { + if (!Ul(this.C, e)) { + this.C = e; + this.c.fire({ + flags: true + }); + } + } + get active() { + return this.F; + } + set active(e) { + if (this.F !== e) { + this.F = e; + this.c.fire({ + active: true + }); + } + } + get message() { + return this.G; + } + set message(e) { + if (this.G !== e) { + this.G = e; + this.c.fire({ + message: true + }); + } + } + get disabled() { + return this.H; + } + set disabled(e) { + if (this.H !== e) { + this.H = e; + this.c.fire({ + disabled: true + }); + } + } + getFlag(e) { + return this.flags?.[e] ?? false; + } + setFlag(e, t) { + const s = this.flags ? { + ...this.flags + } : {}; + if (t) { + s[e] = true; + } else { + delete s[e]; + } + this.flags = s; + } + validate() { + if (!this.name) { + this.message = f(11728, null); + return; + } + if (this.shouldValidateName() && this.name !== this.getInitialName() && this.h.profiles.some(e => e.name === this.name)) { + this.message = f(11729, null, this.name); + return; + } + if (this.flags && this.flags.settings && this.flags.keybindings && this.flags.tasks && this.flags.snippets && this.flags.extensions) { + this.message = f(11730, null); + return; + } + this.message = undefined; + } + async getChildren(e) { + if (e === undefined) { + const t = ["settings", "keybindings", "tasks", "snippets", "extensions"]; + return Promise.all(t.map(async s => { + const n = s === "settings" || s === "keybindings" || s === "tasks" ? await this.I(s) : []; + return { + handle: s, + checkbox: undefined, + resourceType: s, + openAction: n.length ? new Yt("_open", f(11731, null), le.asClassName(A.goToFile), true, () => n[0]?.openAction?.run()) : undefined + }; + })); + } + return this.I(e); + } + async I(e) { + return []; + } + async J(e, t) { + e = this.getFlag(t) ? this.h.defaultProfile : e; + let s = []; + switch (t) { + case "settings": + s = await this.u.createInstance(vEe, e).getChildren(); + break; + case "keybindings": + s = await this.u.createInstance(yEe, e).getChildren(); + break; + case "snippets": + s = (await this.u.createInstance(wEe, e).getChildren()) ?? []; + break; + case "tasks": + s = await this.u.createInstance(CEe, e).getChildren(); + break; + case "extensions": + s = await this.u.createInstance(SEe, e).getChildren(); + break; + } + return s.map(n => this.L(n)); + } + L(e, t, s) { + return { + handle: e.handle, + checkbox: e.checkbox, + label: e.label?.label ?? "", + description: yi(e.description) ? e.description : undefined, + resource: V.revive(e.resourceUri), + icon: e.themeIcon, + openAction: new Yt("_openChild", f(11732, null), le.asClassName(A.goToFile), true, async () => { + if (e.parent.type === "extensions") { + await this.j.executeCommand("extension.open", e.handle, undefined, true, undefined, true); + } else if (e.resourceUri) { + await this.j.executeCommand(OE, e.resourceUri, [Uc], undefined); + } + }), + actions: { + primary: t, + contextMenu: s + } + }; + } + getInitialName() { + return ""; + } + shouldValidateName() { + return true; + } + getCurrentWorkspace() { + const e = this.m.getWorkspace(); + return e.configuration ?? e.folders[0]?.uri; + } + openWorkspace(e) { + if (this.q.extUri.extname(e) === Flt) { + this.n.openWindow([{ + workspaceUri: e + }], { + forceNewWindow: true + }); + } else { + this.n.openWindow([{ + folderUri: e + }], { + forceNewWindow: true + }); + } + } + save() { + this.f.schedule(); + } + M(e) { + return this.name !== e.name || this.icon !== e.icon || !Ul(this.flags ?? {}, e.useDefaultFlags ?? {}) || !Go(this.workspaces ?? [], e.workspaces ?? [], (t, s) => t.toString() === s.toString()); + } + async N(e) { + if (!this.M(e) || (this.validate(), this.message)) { + return; + } + const t = this.flags ? this.flags.settings && this.flags.keybindings && this.flags.tasks && this.flags.globalState && this.flags.extensions ? undefined : this.flags : undefined; + return await this.g.updateProfile(e, { + name: this.name, + icon: this.icon, + useDefaultFlags: e.useDefaultFlags && !t ? {} : t, + workspaces: this.workspaces + }); + } +}; +nB = __decorate([__param(5, HA), __param(6, Ml), __param(7, gt), __param(8, kt), __param(9, kr), __param(10, _s), __param(11, Ct), __param(12, DS), __param(13, re)], nB); +var Wp = class extends nB { + get profile() { + return this.Q; + } + constructor(e, t, s, n, r, o, a, l, c, u, d, h, g, p) { + super(e.name, e.icon, e.useDefaultFlags, e.workspaces, n.currentProfile.id === e.id, o, a, l, c, u, d, h, g, p); + this.Q = e; + this.titleButtons = t; + this.actions = s; + this.R = n; + this.S = r; + this.W = false; + this.W = this.S.getValue(JA) === this.profile.name; + this.D(r.onDidChangeConfiguration(b => { + if (b.affectsConfiguration(JA)) { + this.isNewWindowProfile = this.S.getValue(JA) === this.profile.name; + } + })); + this.D(this.R.onDidChangeCurrentProfile(() => this.active = this.R.currentProfile.id === this.profile.id)); + this.D(this.h.onDidChangeProfiles(({ + updated: b + }) => { + const v = b.find(y => y.id === this.profile.id); + if (v) { + this.Q = v; + this.reset(); + this.c.fire({ + profile: true + }); + } + })); + this.D(h.watch(this.profile.snippetsHome)); + this.D(h.onDidFilesChange(b => { + if (b.affects(this.profile.snippetsHome)) { + this.c.fire({ + snippets: true + }); + } + })); + } + P() { + return this.profile; + } + reset() { + this.name = this.Q.name; + this.icon = this.Q.icon; + this.flags = this.Q.useDefaultFlags; + this.workspaces = this.Q.workspaces; + } + updateWorkspaces(e, t) { + const s = new Yf(this.workspaces ?? []); + for (const n of e) { + s.add(n); + } + for (const n of t) { + s.delete(n); + } + this.workspaces = [...s.values()]; + } + async toggleNewWindowProfile() { + if (this.W) { + await this.S.updateValue(JA, null); + } else { + await this.S.updateValue(JA, this.profile.name); + } + } + get isNewWindowProfile() { + return this.W; + } + set isNewWindowProfile(e) { + if (this.W !== e) { + this.W = e; + this.c.fire({ + newWindowProfile: true + }); + } + } + async toggleCurrentWindowProfile() { + if (this.R.currentProfile.id === this.profile.id) { + await this.g.switchProfile(this.h.defaultProfile); + } else { + await this.g.switchProfile(this.profile); + } + } + async O() { + await this.N(this.profile); + } + async I(e) { + if (e === "extensions") { + return (await this.u.createInstance(SEe, this.profile).getChildren()).map(s => this.L(s, undefined, [{ + id: "applyToAllProfiles", + label: f(11733, null), + checked: s.applicationScoped, + enabled: true, + class: "", + tooltip: "", + run: async () => { + const r = (await this.t.getInstalled(undefined, this.profile.extensionsResource)).find(o => Ki(o.identifier, s.identifier)); + if (r) { + await this.t.toggleAppliationScope(r, this.profile.extensionsResource); + } + } + }])); + } else { + return this.J(this.profile, e); + } + } + getInitialName() { + return this.profile.name; + } +}; +Wp = __decorate([__param(3, Rc), __param(4, ve), __param(5, HA), __param(6, Ml), __param(7, gt), __param(8, kt), __param(9, kr), __param(10, _s), __param(11, Ct), __param(12, DS), __param(13, re)], Wp); +var WOi = "userdataprofiletemplatepreview"; +var nx = class extends nB { + get copyFromTemplates() { + return this.Q; + } + constructor(e, t, s, n, r, o, a, l, c, u, d, h, g, p) { + super(e, undefined, undefined, undefined, false, o, a, l, c, u, d, h, g, p); + this.titleButtons = s; + this.actions = n; + this.X = r; + this.Q = new dn(); + this.S = null; + this.$ = this.D(new Q()); + this.U = e; + this.Y = t; + this.Z = this.cb(t); + this.db(); + this.D(this.s.registerProvider(WOi, this.D(new M0i()))); + this.D(Ue(() => { + if (this.previewProfile) { + this.h.removeProfile(this.previewProfile); + } + })); + } + get copyFrom() { + return this.Y; + } + set copyFrom(e) { + if (this.Y !== e) { + this.Y = e; + this.c.fire({ + copyFrom: true + }); + this.flags = undefined; + this.copyFlags = this.cb(e); + if (e instanceof V) { + this.R?.cancel(); + this.R = undefined; + } + this.db(); + } + } + get copyFlags() { + return this.Z; + } + set copyFlags(e) { + if (!Ul(this.Z, e)) { + this.Z = e; + this.c.fire({ + copyFlags: true + }); + } + } + get previewProfile() { + return this.ab; + } + set previewProfile(e) { + if (this.ab !== e) { + this.ab = e; + this.c.fire({ + preview: true + }); + this.$.clear(); + if (this.ab) { + this.$.add(this.s.watch(this.ab.snippetsHome)); + this.$.add(this.s.onDidFilesChange(t => { + if (this.ab && t.affects(this.ab.snippetsHome)) { + this.c.fire({ + snippets: true + }); + } + })); + } + } + } + P() { + return this.previewProfile; + } + cb(e) { + if (e) { + return { + settings: true, + keybindings: true, + snippets: true, + tasks: true, + extensions: true + }; + } else { + return undefined; + } + } + async db() { + this.disabled = true; + try { + if (this.copyFrom instanceof V) { + await this.resolveTemplate(this.copyFrom); + if (this.S) { + this.copyFromTemplates.set(this.copyFrom, this.S.name); + if (this.U === this.name) { + this.name = this.U = this.S.name ?? ""; + } + if (this.W === this.icon) { + this.icon = this.W = this.S.icon; + } + this.setCopyFlag("settings", !!this.S.settings); + this.setCopyFlag("keybindings", !!this.S.keybindings); + this.setCopyFlag("tasks", !!this.S.tasks); + this.setCopyFlag("snippets", !!this.S.snippets); + this.setCopyFlag("extensions", !!this.S.extensions); + this.c.fire({ + copyFromInfo: true + }); + } + return; + } + if (O4(this.copyFrom)) { + if (this.U === this.name) { + this.name = this.U = f(11734, null, this.copyFrom.name); + } + if (this.W === this.icon) { + this.icon = this.W = this.copyFrom.icon; + } + this.setCopyFlag("settings", true); + this.setCopyFlag("keybindings", true); + this.setCopyFlag("tasks", true); + this.setCopyFlag("snippets", true); + this.setCopyFlag("extensions", true); + this.c.fire({ + copyFromInfo: true + }); + return; + } + if (this.U === this.name) { + this.name = this.U = f(11735, null); + } + if (this.W === this.icon) { + this.icon = this.W = undefined; + } + this.setCopyFlag("settings", false); + this.setCopyFlag("keybindings", false); + this.setCopyFlag("tasks", false); + this.setCopyFlag("snippets", false); + this.setCopyFlag("extensions", false); + this.c.fire({ + copyFromInfo: true + }); + } finally { + this.disabled = false; + } + } + async resolveTemplate(e) { + this.R ||= ql(async t => { + const s = await this.X.resolveProfileTemplate(e); + if (!t.isCancellationRequested) { + this.S = s; + } + }); + await this.R; + return this.S; + } + hasResource(e) { + if (this.S) { + switch (e) { + case "settings": + return !!this.S.settings; + case "keybindings": + return !!this.S.keybindings; + case "snippets": + return !!this.S.snippets; + case "tasks": + return !!this.S.tasks; + case "extensions": + return !!this.S.extensions; + } + } + return true; + } + getCopyFlag(e) { + return this.copyFlags?.[e] ?? false; + } + setCopyFlag(e, t) { + const s = this.copyFlags ? { + ...this.copyFlags + } : {}; + s[e] = t; + this.copyFlags = s; + } + getCopyFromName() { + if (O4(this.copyFrom)) { + return this.copyFrom.name; + } + if (this.copyFrom instanceof V) { + return this.copyFromTemplates.get(this.copyFrom); + } + } + async I(e) { + if (this.getFlag(e)) { + return this.J(this.h.defaultProfile, e); + } else if (this.getCopyFlag(e)) { + if (this.previewProfile) { + return this.J(this.previewProfile, e); + } else if (this.copyFrom instanceof V) { + await this.resolveTemplate(this.copyFrom); + if (this.S) { + return this.fb(this.S, e); + } else { + return []; + } + } else if (this.copyFrom) { + return this.J(this.copyFrom, e); + } else { + return []; + } + } else { + return []; + } + } + async fb(e, t) { + const s = V.from({ + scheme: WOi, + path: `/root/profiles/${e.name}` + }); + const n = V.from({ + scheme: WOi, + path: `/root/cache/${e.name}` + }); + const r = oie(Ft(), this.name, s, n); + switch (t) { + case "settings": + if (e.settings) { + await this.u.createInstance(sH).apply(e.settings, r); + return this.J(r, t); + } else { + return []; + } + case "keybindings": + if (e.keybindings) { + await this.u.createInstance(nH).apply(e.keybindings, r); + return this.J(r, t); + } else { + return []; + } + case "snippets": + if (e.snippets) { + await this.u.createInstance(N8).apply(e.snippets, r); + return this.J(r, t); + } else { + return []; + } + case "tasks": + if (e.tasks) { + await this.u.createInstance(rH).apply(e.tasks, r); + return this.J(r, t); + } else { + return []; + } + case "extensions": + if (e.extensions) { + return (await this.u.createInstance(L0i, e.extensions).getChildren()).map(a => this.L(a)); + } else { + return []; + } + } + return []; + } + shouldValidateName() { + return !this.copyFrom; + } + getInitialName() { + return this.previewProfile?.name ?? ""; + } + async O() { + if (this.previewProfile) { + const e = await this.N(this.previewProfile); + if (e) { + this.previewProfile = e; + } + } + } +}; +nx = __decorate([__param(4, Z0e), __param(5, HA), __param(6, Ml), __param(7, gt), __param(8, kt), __param(9, kr), __param(10, _s), __param(11, Ct), __param(12, DS), __param(13, re)], nx); +var VOi = class extends vP { + static { + Zue = this; + } + static getInstance(e) { + Zue.c ||= e.createInstance(Zue); + return Zue.c; + } + get profiles() { + return this.g.map(([e]) => e).sort((e, t) => e instanceof nx ? 1 : t instanceof nx || e instanceof Wp && e.profile.isDefault ? -1 : t instanceof Wp && t.profile.isDefault ? 1 : e.name.localeCompare(t.name)); + } + constructor(e, t, s, n, r, o, a, l, c, u) { + super(); + this.q = e; + this.s = t; + this.t = s; + this.u = n; + this.w = r; + this.y = o; + this.z = a; + this.C = l; + this.F = c; + this.G = u; + this.g = []; + this.m = this.D(new B()); + this.onDidChange = this.m.event; + for (const d of t.profiles) { + if (!d.isTransient) { + this.g.push(this.I(d)); + } + } + this.D(Ue(() => this.g.splice(0, this.g.length).map(([, d]) => d.dispose()))); + this.D(t.onDidChangeProfiles(d => this.H(d))); + } + H(e) { + let t = false; + for (const s of e.added) { + if (!s.isTransient && s.name !== this.j?.name) { + t = true; + this.g.push(this.I(s)); + } + } + for (const s of e.removed) { + if (s.id === this.j?.previewProfile?.id) { + this.j.previewProfile = undefined; + } + const n = this.g.findIndex(([r]) => r instanceof Wp && r.profile.id === s.id); + if (n !== -1) { + t = true; + this.g.splice(n, 1).map(([, r]) => r.dispose()); + } + } + if (t) { + this.m.fire(undefined); + } + } + getTemplates() { + this.n ||= this.t.getBuiltinProfileTemplates(); + return this.n; + } + I(e) { + const t = new Q(); + const s = t.add(new Yt("userDataProfile.activate", f(11736, null), le.asClassName(A.check), true, () => this.t.switchProfile(u.profile))); + const n = t.add(new Yt("userDataProfile.copyFromProfile", f(11737, null), le.asClassName(A.copy), true, () => this.createNewProfile(u.profile))); + const r = t.add(new Yt("userDataProfile.export", f(11738, null), le.asClassName(A.export), true, () => this.u.exportProfile(e))); + const o = t.add(new Yt("userDataProfile.delete", f(11739, null), le.asClassName(A.trash), true, () => this.O(u.profile))); + const a = t.add(new Yt("userDataProfile.newWindow", f(11740, null), le.asClassName(A.emptyWindow), true, () => this.P(u.profile))); + const l = []; + l.push(s); + l.push(a); + const c = []; + c.push(n); + c.push(r); + if (!e.isDefault) { + c.push(new gr()); + c.push(o); + } + const u = t.add(this.G.createInstance(Wp, e, [[], []], [l, c])); + s.enabled = this.q.currentProfile.id !== u.profile.id; + t.add(this.q.onDidChangeCurrentProfile(() => s.enabled = this.q.currentProfile.id !== u.profile.id)); + return [u, t]; + } + async createNewProfile(e) { + if (this.j) { + if (!(await this.w.confirm({ + type: "info", + message: f(11741, null), + primaryButton: f(11742, null), + cancelButton: f(11743, null) + })).confirmed) { + return; + } + this.revert(); + } + if (e instanceof V) { + try { + await this.u.resolveProfileTemplate(e); + } catch (t) { + this.w.error(cc(t)); + return; + } + } + if (!this.j) { + const t = new Q(); + const s = new Xi(); + t.add(Ue(() => s.dispose(true))); + const n = []; + const r = []; + const o = t.add(new Yt("userDataProfile.create", f(11744, null), undefined, true, () => this.saveNewProfile(false, s.token))); + n.push(o); + if (tn && e instanceof V && nti(e)) { + n.push(new Yt("userDataProfile.createInDesktop", f(11745, null, this.C.nameLong), undefined, true, () => this.F.open(e, { + openExternal: true + }))); + } + const a = t.add(new Yt("userDataProfile.cancel", f(11746, null), le.asClassName(A.trash), true, () => this.N())); + r.push(a); + const l = t.add(new Yt("userDataProfile.preview", f(11747, null), le.asClassName(A.openPreview), true, () => this.L(s.token))); + r.push(l); + const c = t.add(new Yt("userDataProfile.export", f(11748, null), le.asClassName(A.export), O4(e), () => this.M(s.token))); + this.j = t.add(this.G.createInstance(nx, e ? "" : f(11749, null), e, [n, r], [[a], [c]])); + const u = () => { + if (o.enabled) { + if (this.j?.copyFrom && this.s.profiles.some(d => !d.isTransient && d.name === this.j?.name)) { + o.label = f(11750, null); + } else { + o.label = f(11751, null); + } + } + }; + u(); + t.add(this.j.onDidChange(d => { + if (d.preview || d.disabled || d.message) { + o.enabled = !this.j?.disabled && !this.j?.message; + l.enabled = !this.j?.previewProfile && !this.j?.disabled && !this.j?.message; + } + if (d.name || d.copyFrom) { + u(); + c.enabled = O4(this.j?.copyFrom); + } + })); + t.add(this.s.onDidChangeProfiles(d => { + u(); + this.j?.validate(); + })); + this.g.push([this.j, t]); + this.m.fire(this.j); + } + return this.j; + } + revert() { + this.J(); + this.m.fire(undefined); + } + J() { + if (this.j) { + const e = this.g.findIndex(([t]) => t === this.j); + if (e !== -1) { + this.g.splice(e, 1).map(([, t]) => t.dispose()); + } + this.j = undefined; + } + } + async L(e) { + if (!this.j || this.j.previewProfile) { + return; + } + const t = await this.saveNewProfile(true, e); + if (t) { + this.j.previewProfile = t; + if (tn) { + await this.t.switchProfile(t); + } else { + await this.P(t); + } + } + } + async M(e) { + if (!this.j || !O4(this.j.copyFrom)) { + return; + } + const t = oie(Ft(), this.j.name, this.j.copyFrom.location, this.j.copyFrom.cacheHome, { + icon: this.j.icon, + useDefaultFlags: this.j.flags + }, this.s.defaultProfile); + await this.u.exportProfile(t, this.j.copyFlags); + } + async saveNewProfile(e, t) { + if (!this.j || (this.j.validate(), this.j.message)) { + return; + } + this.j.disabled = true; + let s; + try { + if (this.j.previewProfile) { + if (!e) { + s = await this.t.updateProfile(this.j.previewProfile, { + transient: false + }); + } + } else { + const { + flags: n, + icon: r, + name: o, + copyFrom: a + } = this.j; + const l = n ? n.settings && n.keybindings && n.tasks && n.globalState && n.extensions ? undefined : n : undefined; + const c = { + source: a instanceof V ? "template" : O4(a) ? "profile" : a ? "external" : undefined + }; + if (a instanceof V) { + const u = await this.j.resolveTemplate(a); + if (u) { + this.y.publicLog2("userDataProfile.createFromTemplate", c); + s = await this.u.createProfileFromTemplate(u, { + name: o, + useDefaultFlags: l, + icon: r, + resourceTypeFlags: this.j.copyFlags, + transient: e + }, t ?? mt.None); + } + } else if (O4(a)) { + this.y.publicLog2("userDataProfile.createFromProfile", c); + s = await this.u.createFromProfile(a, { + name: o, + useDefaultFlags: l, + icon: r, + resourceTypeFlags: this.j.copyFlags, + transient: e + }, t ?? mt.None); + } else { + this.y.publicLog2("userDataProfile.createEmptyProfile", c); + s = await this.t.createProfile(o, { + useDefaultFlags: l, + icon: r, + transient: e + }); + } + } + } finally { + if (this.j) { + this.j.disabled = false; + } + } + if (t?.isCancellationRequested) { + if (s) { + try { + await this.t.removeProfile(s); + } catch {} + } + return; + } + if (s && !s.isTransient && this.j) { + this.J(); + const n = this.g.find(([r]) => r.name === s.name); + if (n) { + this.m.fire(n[0]); + } else { + this.H({ + added: [s], + removed: [], + updated: [], + all: this.s.profiles + }); + } + } + return s; + } + async N() { + if (this.j) { + if (this.j.previewProfile) { + await this.t.removeProfile(this.j.previewProfile); + return; + } + this.J(); + this.m.fire(undefined); + } + } + async O(e) { + if ((await this.w.confirm({ + type: "info", + message: f(11752, null, e.name), + primaryButton: f(11753, null), + cancelButton: f(11754, null) + })).confirmed) { + await this.t.removeProfile(e); + } + } + async P(e) { + await this.z.openWindow({ + forceProfile: e.name + }); + } +}; +VOi = Zue = __decorate([__param(0, Rc), __param(1, Ml), __param(2, HA), __param(3, Z0e), __param(4, Js), __param(5, Ot), __param(6, kr), __param(7, ys), __param(8, os), __param(9, re)], VOi); +oa(); +He(); +bb(); +pe(); +xe(); +Wd(); +q(); +oa(); +var NNn = class extends Gg { + constructor(i) { + super(); + this.a = this.D(new B()); + this.onDidSelect = this.a.event; + this.g = []; + this.n = this.D(new Bo()); + this.c = i.hoverDelegate ?? this.D(Hy()); + this.domNode = G(".monaco-custom-radio"); + this.domNode.setAttribute("role", "radio"); + this.setItems(i.items); + } + setItems(i) { + this.n.clearAndDisposeAll(); + this.g = i; + this.h = this.g.find(e => e.isActive) ?? this.g[0]; + for (let e = 0; e < this.g.length; e++) { + const t = this.g[e]; + const s = new Q(); + const n = s.add(new Ql(this.domNode, { + hoverDelegate: this.c, + title: t.tooltip, + supportIcons: true + })); + n.enabled = !t.disabled; + s.add(n.onDidClick(() => { + if (this.h !== t) { + this.h = t; + this.r(); + this.a.fire(e); + } + })); + this.n.set(n, { + item: t, + dispose: () => s.dispose() + }); + } + this.r(); + } + setActiveItem(i) { + if (i < 0 || i >= this.g.length) { + throw new Error("Invalid Index"); + } + this.h = this.g[i]; + this.r(); + } + setEnabled(i) { + for (const [e] of this.n) { + e.enabled = i; + } + } + r() { + let i = false; + for (const [e, { + item: t + }] of this.n) { + const s = i; + i = t === this.h; + e.element.classList.toggle("active", i); + e.element.classList.toggle("previous-active", s); + e.label = t.text; + } + } +}; +No(); +qy(); +Un(); +jn(); +At(); +pn(); +zb(); +Yp(); +sl(); +Br(); +var HOi; +var qOi; +var jOi; +var zOi; +var JOi; +var GOi; +var KOi; +var BAt; +var Q7o = dt("profiles-editor-edit-folder", A.edit, f(11649, null)); +var Z7o = dt("profiles-editor-remove-folder", A.close, f(11650, null)); +var eUo = he("profiles.sashBorder", ik, f(11651, null)); +var YOi = VM({ + listActiveSelectionBackground: wo, + listActiveSelectionForeground: Nr, + listFocusAndSelectionBackground: wo, + listFocusAndSelectionForeground: Nr, + listFocusBackground: wo, + listFocusForeground: Nr, + listHoverForeground: Nr, + listHoverBackground: wo, + listHoverOutline: wo, + listFocusOutline: wo, + listInactiveSelectionBackground: wo, + listInactiveSelectionForeground: Nr, + listInactiveFocusBackground: wo, + listInactiveFocusOutline: wo, + treeIndentGuidesStroke: undefined, + treeInactiveIndentGuidesStroke: undefined, + tableOddRowsBackgroundColor: wo +}); +var UAt = class extends $p { + static { + HOi = this; + } + static { + this.ID = "workbench.editor.userDataProfiles"; + } + constructor(e, t, s, n, r, o, a, l) { + super(HOi.ID, e, t, s, n); + this.s = r; + this.u = o; + this.cb = a; + this.db = l; + this.r = []; + } + layout(e, t) { + if (this.c && this.f) { + const s = e.height - 20; + this.f.layout(this.c?.clientWidth, s); + this.f.el.style.height = `${s}px`; + } + } + Y(e) { + this.c = z(e, G(".profiles-editor")); + const t = z(this.c, G(".sidebar-view")); + const s = z(t, G(".sidebar-container")); + const n = z(this.c, G(".contents-view")); + const r = z(n, G(".contents-container")); + this.j = this.D(this.db.createInstance(QOi, r)); + this.f = new Yx(this.c, { + orientation: 1, + proportionalLayout: true + }); + this.fb(s); + this.f.addView({ + onDidChange: de.None, + element: t, + minimumSize: 200, + maximumSize: 350, + layout: (o, a, l) => { + t.style.width = `${o}px`; + if (l && this.g) { + const c = l - 40 - 15; + this.g.getHTMLElement().style.height = `${c}px`; + this.g.layout(c, o); + } + } + }, 300, undefined, true); + this.f.addView({ + onDidChange: de.None, + element: n, + minimumSize: 550, + maximumSize: Number.POSITIVE_INFINITY, + layout: (o, a, l) => { + n.style.width = `${o}px`; + if (l) { + this.j?.layout(new Ln(o, l)); + } + } + }, Tg.Distribute, undefined, true); + this.ib(); + this.updateStyles(); + } + updateStyles() { + const e = this.h.getColor(eUo); + this.f?.style({ + separatorBorder: e + }); + } + fb(e) { + this.gb(z(e, G(".new-profile-button"))); + const t = this.db.createInstance(XOi); + const s = new tUo(); + this.g = this.D(this.db.createInstance(N1, "ProfilesList", z(e, G(".profiles-list")), s, [t], { + multipleSelectionSupport: false, + setRowLineHeight: false, + horizontalScrolling: false, + accessibilityProvider: { + getAriaLabel(n) { + return n?.name ?? ""; + }, + getWidgetAriaLabel() { + return f(11652, null); + } + }, + openOnSingleClick: true, + identityProvider: { + getId(n) { + if (n instanceof Wp) { + return n.profile.id; + } else { + return n.name; + } + } + }, + alwaysConsumeMouseWheel: false + })); + } + gb(e) { + const t = this.D(new Rie(e, { + actions: { + getActions: () => { + const s = []; + if (this.r.length) { + s.push(new mg("from.template", f(11653, null), this.hb())); + s.push(new gr()); + } + s.push(new Yt("importProfile", f(11654, null), undefined, true, () => this.kb())); + return s; + } + }, + addPrimaryActionToDropdown: false, + contextMenuProvider: this.cb, + supportIcons: true, + ...yd + })); + t.label = f(11655, null); + this.D(t.onDidClick(s => this.createNewProfile())); + } + hb() { + return this.r.map(e => new Yt(`template:${e.url}`, e.name, undefined, true, () => this.createNewProfile(V.parse(e.url)))); + } + ib() { + if (this.g) { + this.D(this.g.onDidChangeSelection(e => { + const [t] = e.elements; + if (t instanceof nB) { + this.j?.render(t); + } + })); + this.D(this.g.onContextMenu(e => { + const t = []; + if (!e.element) { + t.push(...this.jb()); + } + if (e.element instanceof nB) { + t.push(...e.element.actions[1]); + } + if (t.length) { + this.cb.showContextMenu({ + getAnchor: () => e.anchor, + getActions: () => t, + getActionsContext: () => e.element + }); + } + })); + this.D(this.g.onMouseDblClick(e => { + if (!e.element) { + this.createNewProfile(); + } + })); + } + } + jb() { + const e = []; + e.push(new Yt("newProfile", f(11656, null), undefined, true, () => this.createNewProfile())); + const t = this.hb(); + if (t.length) { + e.push(new mg("from.template", f(11657, null), t)); + } + e.push(new gr()); + e.push(new Yt("importProfile", f(11658, null), undefined, true, () => this.kb())); + return e; + } + async kb() { + const e = new Q(); + const t = e.add(this.s.createQuickPick()); + const s = n => { + const r = []; + if (n) { + r.push({ + label: t.value, + description: f(11659, null) + }); + } + r.push({ + label: f(11660, null) + }); + t.items = r; + }; + t.title = f(11661, null); + t.placeholder = f(11662, null); + t.ignoreFocusOut = true; + e.add(t.onDidChangeValue(s)); + s(); + t.matchOnLabel = false; + t.matchOnDescription = false; + e.add(t.onDidAccept(async () => { + t.hide(); + const n = t.selectedItems[0]; + if (!n) { + return; + } + const r = n.label === t.value ? V.parse(t.value) : await this.lb(); + if (r) { + this.createNewProfile(r); + } + })); + e.add(t.onDidHide(() => e.dispose())); + t.show(); + } + async createNewProfile(e) { + await this.m?.createNewProfile(e); + } + selectProfile(e) { + const t = this.m?.profiles.findIndex(s => s instanceof Wp && s.profile.id === e.id); + if (t !== undefined && t >= 0) { + this.g?.setSelection([t]); + } + } + async lb() { + const e = await this.u.showOpenDialog({ + canSelectFolders: false, + canSelectFiles: true, + canSelectMany: false, + filters: rti, + title: f(11663, null) + }); + if (e) { + return e[0]; + } else { + return null; + } + } + async setInput(e, t, s, n) { + await super.setInput(e, t, s, n); + this.m = await e.resolve(); + this.m.getTemplates().then(r => { + this.r = r; + if (this.j) { + this.j.templates = r; + } + }); + this.mb(); + this.D(this.m.onDidChange(r => this.mb(r))); + } + focus() { + super.focus(); + this.g?.domFocus(); + } + mb(e) { + if (!this.m) { + return; + } + const t = this.g?.getSelection()?.[0]; + const s = t !== undefined ? this.g?.element(t) : undefined; + this.g?.splice(0, this.g.length, this.m.profiles); + if (e) { + this.g?.setSelection([this.m.profiles.indexOf(e)]); + } else if (s) { + if (!this.m.profiles.includes(s)) { + const n = this.m.profiles.find(r => r.name === s.name) ?? this.m.profiles[0]; + if (n) { + this.g?.setSelection([this.m.profiles.indexOf(n)]); + } + } + } else { + const n = this.m.profiles.find(r => r.active) ?? this.m.profiles[0]; + if (n) { + this.g?.setSelection([this.m.profiles.indexOf(n)]); + } + } + } +}; +UAt = HOi = __decorate([__param(1, Ot), __param(2, ti), __param(3, ht), __param(4, zi), __param(5, Xl), __param(6, ts), __param(7, re)], UAt); +var tUo = class { + getHeight(i) { + return 22; + } + getTemplateId() { + return "profileListElement"; + } +}; +var XOi = class { + constructor(e) { + this.c = e; + this.templateId = "profileListElement"; + } + renderTemplate(e) { + const t = new Q(); + const s = new Q(); + e.classList.add("profile-list-item"); + const n = z(e, G(".profile-list-item-icon")); + const r = z(e, G(".profile-list-item-label")); + const o = z(e, G(`span${le.asCSSSelector(A.circleFilled)}`)); + const a = z(e, G(".profile-list-item-description")); + z(a, G(`span${le.asCSSSelector(A.check)}`), G("span", undefined, f(11664, null))); + const l = z(e, G(".profile-tree-item-actions-container")); + const c = t.add(this.c.createInstance(Dp, l, { + hoverDelegate: t.add(Hy()), + highlightToggledItems: true + })); + return { + label: r, + icon: n, + dirty: o, + description: a, + actionBar: c, + disposables: t, + elementDisposables: s + }; + } + renderElement(e, t, s, n) { + s.elementDisposables.clear(); + s.label.textContent = e.name; + s.label.classList.toggle("new-profile", e instanceof nx); + s.icon.className = le.asClassName(e.icon ? le.fromId(e.icon) : fX); + s.dirty.classList.toggle("hide", !(e instanceof nx)); + s.description.classList.toggle("hide", !e.active); + s.elementDisposables.add(e.onDidChange(a => { + if (a.name) { + s.label.textContent = e.name; + } + if (a.icon) { + if (e.icon) { + s.icon.className = le.asClassName(le.fromId(e.icon)); + } else { + s.icon.className = "hide"; + } + } + if (a.active) { + s.description.classList.toggle("hide", !e.active); + } + })); + const r = () => s.actionBar.setActions(e.actions[0].filter(a => a.enabled), e.actions[1].filter(a => a.enabled)); + r(); + const o = []; + for (const a of e.actions.flat()) { + if (a instanceof Yt) { + o.push(a.onDidChange); + } + } + s.elementDisposables.add(de.any(...o)(a => { + if (a.enabled !== undefined) { + r(); + } + })); + } + disposeElement(e, t, s, n) { + s.elementDisposables.clear(); + } + disposeTemplate(e) { + e.disposables.dispose(); + e.elementDisposables.dispose(); + } +}; +XOi = __decorate([__param(0, re)], XOi); +var QOi = class extends H { + set templates(e) { + this.j.setTemplates(e); + this.h.rerender(); + } + constructor(e, t, s) { + super(); + this.q = t; + this.r = s; + this.m = this.D(new ki()); + this.n = []; + const n = z(e, G(".profile-header")); + const r = z(n, G(".profile-title-container")); + this.c = z(r, G("")); + const o = z(e, G(".profile-body")); + const a = new iUo(); + const l = this.D(this.r.createInstance(n_i)); + const c = this.D(this.r.createInstance(r_i)); + this.n.push(c); + this.j = this.D(this.r.createInstance(s_i)); + this.f = z(o, G(".profile-tree")); + this.h = this.D(this.r.createInstance(fC, "ProfileEditor-Tree", this.f, a, [this.D(this.r.createInstance(e_i)), this.D(this.r.createInstance(t_i)), this.D(this.r.createInstance(i_i)), this.D(this.r.createInstance(rUo)), this.j, l, c], this.r.createInstance(sUo), { + multipleSelectionSupport: false, + horizontalScrolling: false, + accessibilityProvider: { + getAriaLabel(u) { + return u?.element ?? ""; + }, + getWidgetAriaLabel() { + return ""; + } + }, + identityProvider: { + getId(u) { + return u.element; + } + }, + expandOnlyOnTwistieClick: true, + renderIndentGuides: PA.None, + enableStickyScroll: false, + openOnSingleClick: false, + setRowLineHeight: false, + supportDynamicHeights: true, + alwaysConsumeMouseWheel: false + })); + this.h.style(YOi); + this.D(l.onDidChangeContentHeight(u => this.h.updateElementHeight(u, undefined))); + this.D(c.onDidChangeContentHeight(u => this.h.updateElementHeight(u, undefined))); + this.D(l.onDidChangeSelection(u => { + if (u.selected) { + this.h.setFocus([]); + this.h.setSelection([]); + } + })); + this.D(this.h.onDidChangeContentHeight(u => { + if (this.s) { + this.layout(this.s); + } + })); + this.D(this.h.onDidChangeSelection(u => { + if (u.elements.length) { + l.clearSelection(); + } + })); + this.g = z(o, G(".profile-row-container.profile-button-container")); + } + layout(e) { + this.s = e; + const t = this.h.contentHeight; + const s = Math.min(t, e.height - (this.m.value?.element instanceof nx ? 116 : 54)); + this.f.style.height = `${s}px`; + this.h.layout(s, e.width); + for (const n of this.n) { + n.layout(); + } + } + render(e) { + if (this.m.value?.element === e) { + return; + } + if (this.m.value?.element instanceof Wp) { + this.m.value.element.reset(); + } + this.h.setInput(e); + const t = new Q(); + this.m.value = { + element: e, + dispose: () => t.dispose() + }; + this.c.textContent = e.name; + t.add(e.onDidChange(r => { + if (r.name) { + this.c.textContent = e.name; + } + })); + const [s, n] = e.titleButtons; + if (s?.length || n?.length) { + this.g.classList.remove("hide"); + if (n?.length) { + for (const r of n) { + const o = t.add(new Ql(this.g, { + ...yd, + secondary: true + })); + o.label = r.label; + o.enabled = r.enabled; + t.add(o.onDidClick(() => this.q.showWhile(r.run()))); + t.add(r.onDidChange(a => { + if (!qo(a.enabled)) { + o.enabled = r.enabled; + } + if (!qo(a.label)) { + o.label = r.label; + } + })); + } + } + if (s?.length) { + for (const r of s) { + const o = t.add(new Ql(this.g, { + ...yd + })); + o.label = r.label; + o.enabled = r.enabled; + t.add(o.onDidClick(() => this.q.showWhile(r.run()))); + t.add(r.onDidChange(a => { + if (!qo(a.enabled)) { + o.enabled = r.enabled; + } + if (!qo(a.label)) { + o.label = r.label; + } + })); + t.add(e.onDidChange(a => { + if (a.message) { + o.setTitle(e.message ?? r.label); + o.element.classList.toggle("error", !!e.message); + } + })); + } + } + } else { + this.g.classList.add("hide"); + } + if (e instanceof nx) { + this.h.focusFirst(); + } + if (this.s) { + this.layout(this.s); + } + } +}; +QOi = __decorate([__param(1, Jp), __param(2, re)], QOi); +var iUo = class extends uct { + getTemplateId({ + element: i + }) { + return i; + } + hasDynamicHeight({ + element: i + }) { + return i === "contents" || i === "workspaces"; + } + d({ + element: i, + root: e + }) { + switch (i) { + case "name": + return 72; + case "icon": + return 68; + case "copyFrom": + return 90; + case "useForCurrent": + case "useAsDefault": + return 68; + case "contents": + return 258; + case "workspaces": + return (e.workspaces ? e.workspaces.length * 24 + 30 : 0) + 112; + } + } +}; +var sUo = class { + hasChildren(i) { + return i instanceof nB; + } + async getChildren(i) { + if (i instanceof nB) { + const e = []; + if (i instanceof nx) { + e.push({ + element: "name", + root: i + }); + e.push({ + element: "icon", + root: i + }); + e.push({ + element: "copyFrom", + root: i + }); + e.push({ + element: "contents", + root: i + }); + } else if (i instanceof Wp) { + e.push({ + element: "name", + root: i + }); + e.push({ + element: "icon", + root: i + }); + e.push({ + element: "useAsDefault", + root: i + }); + e.push({ + element: "contents", + root: i + }); + e.push({ + element: "workspaces", + root: i + }); + } + return e; + } + return []; + } +}; +var nUo = class { + getTemplateId(i) { + if (i.element.resourceType) { + if (i.root instanceof nx) { + return HAt.TEMPLATE_ID; + } else { + return VAt.TEMPLATE_ID; + } + } else { + return qAt.TEMPLATE_ID; + } + } + getHeight(i) { + return 24; + } +}; +var ZOi = class { + constructor(e) { + this.c = e; + } + hasChildren(e) { + if (e instanceof nB) { + return true; + } + if (e.element.resourceType) { + if (e.element.resourceType !== "extensions" && e.element.resourceType !== "snippets") { + return false; + } + if (e.root instanceof nx) { + const t = e.element.resourceType; + if (e.root.getFlag(t)) { + return true; + } + if (!e.root.hasResource(t) || e.root.copyFrom === undefined || !e.root.getCopyFlag(t)) { + return false; + } + } + return true; + } + return false; + } + async getChildren(e) { + if (e instanceof nB) { + return (await e.getChildren()).map(s => ({ + element: s, + root: e + })); + } + if (e.element.resourceType) { + const t = this.c.show(true, 500); + try { + return (await e.root.getChildren(e.element.resourceType)).map(n => ({ + element: n, + root: e.root + })); + } finally { + t.done(); + } + } + return []; + } +}; +ZOi = __decorate([__param(0, Jp)], ZOi); +var WAt = class extends H { + c(i) { + switch (i) { + case "settings": + return f(11665, null); + case "keybindings": + return f(11666, null); + case "snippets": + return f(11667, null); + case "tasks": + return f(11668, null); + case "extensions": + return f(11669, null); + } + return ""; + } + disposeElement(i, e, t, s) { + t.elementDisposables.clear(); + } + disposeTemplate(i) { + i.disposables.dispose(); + } +}; +var $Q = class extends WAt { + renderElement({ + element: i + }, e, t, s) { + t.elementDisposables.clear(); + t.element = i; + } +}; +var e_i = class extends $Q { + constructor(e, t) { + super(); + this.f = e; + this.g = t; + this.templateId = "name"; + } + renderTemplate(e) { + const t = new Q(); + const s = t.add(new Q()); + let n; + const r = z(e, G(".profile-row-container")); + z(r, G(".profile-label-element", undefined, f(11670, null))); + const o = t.add(new tw(r, this.g, { + inputBoxStyles: I7({ + inputBorder: BX + }), + ariaLabel: f(11671, null), + placeholder: f(11672, null), + validationOptions: { + validation: c => { + if (!c) { + return { + content: f(11673, null), + type: 2 + }; + } + if (n?.root.disabled || !n?.root.shouldValidateName()) { + return null; + } + const u = n?.root.getInitialName(); + c = c.trim(); + if (u !== c && this.f.profiles.some(d => !d.isTransient && d.name === c)) { + return { + content: f(11674, null, c), + type: 2 + }; + } else { + return null; + } + } + } + })); + o.onDidChange(c => { + if (n && c) { + n.root.name = c; + } + }); + const a = t.add(Pu(o.inputElement)); + t.add(a.onDidBlur(() => { + if (n && !o.value) { + o.value = n.root.name; + } + })); + const l = c => { + o.value = c.root.name; + o.validate(); + const u = c.root instanceof Wp && c.root.profile.isDefault; + if (c.root.disabled || u) { + o.disable(); + } else { + o.enable(); + } + if (u) { + o.setTooltip(f(11675, null)); + } else { + o.setTooltip(f(11676, null)); + } + }; + return { + set element(c) { + n = c; + l(n); + s.add(n.root.onDidChange(u => { + if (u.name || u.disabled) { + l(c); + } + if (u.profile) { + o.validate(); + } + })); + }, + disposables: t, + elementDisposables: s + }; + } +}; +e_i = __decorate([__param(0, Ml), __param(1, Sc)], e_i); +var t_i = class extends $Q { + constructor(e, t) { + super(); + this.g = e; + this.h = t; + this.templateId = "icon"; + this.f = cr("element"); + } + renderTemplate(e) { + const t = new Q(); + const s = t.add(new Q()); + let n; + const r = z(e, G(".profile-row-container")); + z(r, G(".profile-label-element", undefined, f(11677, null))); + const o = z(r, G(".profile-icon-container")); + const a = z(o, G(`${le.asCSSSelector(fX)}`, { + tabindex: "0", + role: "button", + "aria-label": f(11678, null) + })); + const l = t.add(this.h.setupManagedHover(this.f, a, "")); + const c = t.add(this.g.createInstance(i8, { + icons: Roo, + inputBoxStyles: Kp + })); + let u; + const d = () => { + if ((!(n?.root instanceof Wp) || !n.root.profile.isDefault) && !n?.root.disabled && (!(n?.root instanceof Wp) || !n.root.profile.isDefault)) { + c.clearInput(); + u = this.h.showHover({ + content: c.domNode, + target: a, + position: { + hoverPosition: 2 + }, + persistence: { + sticky: true + }, + appearance: { + showPointer: true + } + }, true); + if (u) { + c.layout(new Ln(486, 292)); + c.focus(); + } + } + }; + t.add(Ce(a, Oe.CLICK, g => { + yn.stop(g, true); + d(); + })); + t.add(Ce(a, Oe.KEY_DOWN, g => { + const p = new wr(g); + if (p.equals(3) || p.equals(10)) { + yn.stop(p, true); + d(); + } + })); + t.add(Ce(c.domNode, Oe.KEY_DOWN, g => { + const p = new wr(g); + if (p.equals(9)) { + yn.stop(p, true); + u?.dispose(); + a.focus(); + } + })); + t.add(c.onDidSelect(g => { + u?.dispose(); + a.focus(); + if (n) { + n.root.icon = g.id; + } + })); + z(o, G(".profile-description-element", undefined, f(11679, null))); + const h = g => { + if (g?.root instanceof Wp && g.root.profile.isDefault) { + o.classList.add("disabled"); + l.update(f(11680, null)); + } else { + l.update(f(11681, null)); + o.classList.remove("disabled"); + } + if (g.root.icon) { + a.className = le.asClassName(le.fromId(g.root.icon)); + } else { + a.className = le.asClassName(le.fromId(fX.id)); + } + }; + return { + set element(g) { + n = g; + h(n); + s.add(n.root.onDidChange(p => { + if (p.icon) { + h(g); + } + })); + }, + disposables: t, + elementDisposables: s + }; + } +}; +t_i = __decorate([__param(0, re), __param(1, Ns)], t_i); +var i_i = class extends $Q { + constructor(e) { + super(); + this.f = e; + this.templateId = "useForCurrent"; + } + renderTemplate(e) { + const t = new Q(); + const s = t.add(new Q()); + let n; + const r = z(e, G(".profile-row-container")); + z(r, G(".profile-label-element", undefined, f(11682, null))); + const o = z(r, G(".profile-use-for-current-container")); + const a = f(11683, null); + const l = t.add(new h0e(a, false, Pz)); + z(o, l.domNode); + const c = z(o, G(".profile-description-element", undefined, a)); + t.add(l.onChange(() => { + if (n?.root instanceof Wp) { + n.root.toggleCurrentWindowProfile(); + } + })); + t.add(Ce(c, Oe.CLICK, () => { + if (n?.root instanceof Wp) { + n.root.toggleCurrentWindowProfile(); + } + })); + const u = h => { + l.checked = h.root instanceof Wp && this.f.currentProfile.id === h.root.profile.id; + if (l.checked && this.f.currentProfile.isDefault) { + l.disable(); + } else { + l.enable(); + } + }; + const d = this; + return { + set element(h) { + n = h; + u(n); + s.add(d.f.onDidChangeCurrentProfile(g => { + u(h); + })); + }, + disposables: t, + elementDisposables: s + }; + } +}; +i_i = __decorate([__param(0, Rc)], i_i); +var rUo = class extends $Q { + constructor() { + super(...arguments); + this.templateId = "useAsDefault"; + } + renderTemplate(i) { + const e = new Q(); + const t = e.add(new Q()); + let s; + const n = z(i, G(".profile-row-container")); + z(n, G(".profile-label-element", undefined, f(11684, null))); + const r = z(n, G(".profile-use-as-default-container")); + const o = f(11685, null); + const a = e.add(new h0e(o, false, Pz)); + z(r, a.domNode); + const l = z(r, G(".profile-description-element", undefined, o)); + e.add(a.onChange(() => { + if (s?.root instanceof Wp) { + s.root.toggleNewWindowProfile(); + } + })); + e.add(Ce(l, Oe.CLICK, () => { + if (s?.root instanceof Wp) { + s.root.toggleNewWindowProfile(); + } + })); + const c = u => { + a.checked = u.root instanceof Wp && u.root.isNewWindowProfile; + }; + return { + set element(u) { + s = u; + c(s); + t.add(s.root.onDidChange(d => { + if (d.newWindowProfile) { + c(u); + } + })); + }, + disposables: e, + elementDisposables: t + }; + } +}; +var s_i = class extends $Q { + constructor(e, t, s, n) { + super(); + this.g = e; + this.h = t; + this.j = s; + this.m = n; + this.templateId = "copyFrom"; + this.f = []; + } + renderTemplate(e) { + const t = new Q(); + const s = t.add(new Q()); + let n; + const r = z(e, G(".profile-row-container.profile-copy-from-container")); + z(r, G(".profile-label-element", undefined, f(11686, null))); + z(r, G(".profile-description-element", undefined, f(11687, null))); + const o = t.add(this.h.createInstance(q4, [], 0, this.m, qM, { + useCustomDrawn: true, + ariaLabel: f(11688, null) + })); + o.render(z(r, G(".profile-select-container"))); + const a = (c, u) => { + o.setOptions(u); + const d = c.copyFrom instanceof V ? c.copyFrom.toString() : c.copyFrom?.id; + const h = d ? u.findIndex(g => g.id === d) : 0; + o.select(h); + }; + const l = this; + return { + set element(c) { + n = c; + if (n.root instanceof nx) { + const u = n.root; + let d = l.n(u); + a(u, d); + o.setEnabled(!u.previewProfile && !u.disabled); + s.add(n.root.onDidChange(h => { + if (h.copyFrom || h.copyFromInfo) { + d = l.n(u); + a(u, d); + } + if (h.preview || h.disabled) { + o.setEnabled(!u.previewProfile && !u.disabled); + } + })); + s.add(o.onDidSelect(h => { + u.copyFrom = d[h.index].source; + })); + } + }, + disposables: t, + elementDisposables: s + }; + } + setTemplates(e) { + this.f = e; + } + n(e) { + const t = { + text: "──────", + isDisabled: true + }; + const s = []; + s.push({ + text: f(11689, null) + }); + for (const [n, r] of e.copyFromTemplates) { + if (!this.f.some(o => this.j.extUri.isEqual(V.parse(o.url), n))) { + s.push({ + text: `${r} (${ji(n)})`, + id: n.toString(), + source: n + }); + } + } + if (this.f.length) { + s.push({ + ...t, + decoratorRight: f(11690, null) + }); + for (const n of this.f) { + s.push({ + text: n.name, + id: n.url, + source: V.parse(n.url) + }); + } + } + s.push({ + ...t, + decoratorRight: f(11691, null) + }); + for (const n of this.g.profiles) { + if (!n.isTransient) { + s.push({ + text: n.name, + id: n.id, + source: n + }); + } + } + return s; + } +}; +s_i = __decorate([__param(0, Ml), __param(1, re), __param(2, _s), __param(3, Sc)], s_i); +var n_i = class extends $Q { + constructor(e, t, s) { + super(); + this.j = e; + this.m = t; + this.n = s; + this.templateId = "contents"; + this.f = this.D(new B()); + this.onDidChangeContentHeight = this.f.event; + this.g = this.D(new B()); + this.onDidChangeSelection = this.g.event; + } + renderTemplate(e) { + const t = new Q(); + const s = t.add(new Q()); + let n; + const r = z(e, G(".profile-row-container")); + z(r, G(".profile-label-element", undefined, f(11692, null))); + const o = z(r, G(".profile-description-element")); + const a = z(r, G(".profile-content-tree-header")); + const l = G(".options-header", undefined, G("span", undefined, f(11693, null))); + z(a, G(""), G("", undefined, f(11694, null)), l, G("")); + const c = new nUo(); + const u = this.h = t.add(this.n.createInstance(fC, "ProfileEditor-ContentsTree", z(r, G(".profile-content-tree.file-icon-themable-tree.show-file-icons")), c, [this.n.createInstance(VAt), this.n.createInstance(HAt), this.n.createInstance(qAt)], this.n.createInstance(ZOi), { + multipleSelectionSupport: false, + horizontalScrolling: false, + accessibilityProvider: { + getAriaLabel(g) { + if ((g?.element).resourceType) { + return (g?.element).resourceType; + } else if ((g?.element).label) { + return (g?.element).label; + } else { + return ""; + } + }, + getWidgetAriaLabel() { + return ""; + } + }, + identityProvider: { + getId(g) { + if (g?.element.handle) { + return g.element.handle; + } else { + return ""; + } + } + }, + expandOnlyOnTwistieClick: true, + renderIndentGuides: PA.None, + enableStickyScroll: false, + openOnSingleClick: false, + alwaysConsumeMouseWheel: false + })); + this.h.style(YOi); + t.add(Ue(() => this.h = undefined)); + t.add(this.h.onDidChangeContentHeight(g => { + this.h?.layout(g); + if (n) { + this.f.fire(n); + } + })); + t.add(this.h.onDidChangeSelection(g => { + if (n) { + this.g.fire({ + element: n, + selected: !!g.elements.length + }); + } + })); + t.add(this.h.onDidOpen(async g => { + if (g.browserEvent && g.element?.element.openAction) { + await g.element.element.openAction.run(); + } + })); + t.add(this.h.onContextMenu(async g => { + if (g.element?.element.actions?.contextMenu?.length) { + this.m.showContextMenu({ + getAnchor: () => g.anchor, + getActions: () => g.element?.element?.actions?.contextMenu ?? [], + getActionsContext: () => g.element + }); + } + })); + const d = g => { + Lr(o); + const p = new hs(); + if (g.root instanceof Wp && g.root.profile.isDefault) { + p.appendMarkdown(f(11695, null)); + } else { + p.appendMarkdown(f(11696, null)); + if (g.root instanceof nx) { + const b = g.root.getCopyFromName(); + const v = b === this.j.defaultProfile.name ? f(11697, null, b) : b; + if (v) { + p.appendMarkdown(f(11698, null, v, b)); + } + p.appendMarkdown(f(11699, null)).appendMarkdown(f(11700, null)); + } + } + z(o, s.add(EF(p)).element); + }; + const h = this; + return { + set element(g) { + n = g; + d(g); + if (g.root instanceof nx) { + a.classList.remove("default-profile"); + } else if (g.root instanceof Wp) { + a.classList.toggle("default-profile", g.root.profile.isDefault); + } + u.setInput(n.root); + s.add(n.root.onDidChange(p => { + if (p.copyFrom || p.copyFlags || p.flags || p.extensions || p.snippets || p.preview) { + u.updateChildren(g.root); + } + if (p.copyFromInfo) { + d(g); + h.f.fire(g); + } + })); + }, + disposables: t, + elementDisposables: new Q() + }; + } + clearSelection() { + if (this.h) { + this.h.setSelection([]); + this.h.setFocus([]); + } + } +}; +n_i = __decorate([__param(0, Ml), __param(1, ts), __param(2, re)], n_i); +var r_i = class extends $Q { + constructor(e, t, s, n) { + super(); + this.j = e; + this.m = t; + this.n = s; + this.q = n; + this.templateId = "workspaces"; + this.f = this.D(new B()); + this.onDidChangeContentHeight = this.f.event; + this.g = this.D(new B()); + this.onDidChangeSelection = this.g.event; + } + renderTemplate(e) { + const t = new Q(); + const s = t.add(new Q()); + let n; + const r = z(e, G(".profile-row-container")); + z(r, G(".profile-label-element", undefined, f(11701, null))); + const o = z(r, G(".profile-description-element")); + const a = z(r, G(".profile-associations-table")); + const l = this.h = t.add(this.q.createInstance(zU, "ProfileEditor-AssociationsTable", a, new class { + constructor() { + this.headerRowHeight = 30; + } + getHeight() { + return 24; + } + }(), [{ + label: "", + tooltip: "", + weight: 1, + minimumWidth: 30, + maximumWidth: 30, + templateId: MNn.TEMPLATE_ID, + project(p) { + return p; + } + }, { + label: f(11702, null), + tooltip: "", + weight: 2, + templateId: jAt.TEMPLATE_ID, + project(p) { + return p; + } + }, { + label: f(11703, null), + tooltip: "", + weight: 7, + templateId: zAt.TEMPLATE_ID, + project(p) { + return p; + } + }, { + label: "", + tooltip: "", + weight: 1, + minimumWidth: 84, + maximumWidth: 84, + templateId: GAt.TEMPLATE_ID, + project(p) { + return p; + } + }], [new MNn(), this.q.createInstance(jAt), this.q.createInstance(zAt), this.q.createInstance(GAt)], { + horizontalScrolling: false, + alwaysConsumeMouseWheel: false, + openOnSingleClick: false, + multipleSelectionSupport: false, + accessibilityProvider: { + getAriaLabel: p => { + const b = ANn(this.j, p.workspace); + if (b === undefined || b.length === 0) { + return f(11704, null, this.j.getUriLabel(p.workspace)); + } else { + return f(11705, null, this.j.getUriLabel(p.workspace), b); + } + }, + getWidgetAriaLabel: () => f(11706, null) + }, + identityProvider: { + getId(p) { + return p.workspace.toString(); + } + } + })); + this.h.style(YOi); + t.add(Ue(() => this.h = undefined)); + t.add(this.h.onDidChangeSelection(p => { + if (n) { + this.g.fire({ + element: n, + selected: !!p.elements.length + }); + } + })); + const c = z(r, G(".profile-workspaces-button-container")); + const u = t.add(new G4(c)); + const d = this.D(u.addButton({ + title: f(11707, null), + ...yd + })); + d.label = f(11708, null); + t.add(d.onDidClick(async () => { + const p = await this.n.showOpenDialog({ + canSelectFiles: false, + canSelectFolders: true, + canSelectMany: true, + openLabel: f(11709, null), + title: f(11710, null) + }); + if (p && n?.root instanceof Wp) { + n.root.updateWorkspaces(p, []); + } + })); + t.add(l.onDidOpen(p => { + if (p?.element) { + p.element.profileElement.openWorkspace(p.element.workspace); + } + })); + const h = () => { + if (n?.root instanceof Wp && n.root.workspaces?.length) { + o.textContent = f(11711, null); + a.classList.remove("hide"); + l.splice(0, l.length, n.root.workspaces.map(p => ({ + workspace: p, + profileElement: n.root + })).sort((p, b) => this.m.extUri.compare(p.workspace, b.workspace))); + this.layout(); + } else { + o.textContent = f(11712, null); + a.classList.add("hide"); + } + }; + const g = this; + return { + set element(p) { + n = p; + if (p.root instanceof Wp) { + h(); + } + s.add(n.root.onDidChange(b => { + if (n && b.workspaces) { + h(); + g.f.fire(n); + } + })); + }, + disposables: t, + elementDisposables: new Q() + }; + } + layout() { + if (this.h) { + this.h.layout(this.h.length * 24 + 30, undefined); + } + } + clearSelection() { + if (this.h) { + this.h.setSelection([]); + this.h.setFocus([]); + } + } +}; +r_i = __decorate([__param(0, Zs), __param(1, _s), __param(2, Xl), __param(3, re)], r_i); +var VAt = class extends WAt { + static { + qOi = this; + } + static { + this.TEMPLATE_ID = "ExistingProfileResourceTemplate"; + } + constructor(e) { + super(); + this.f = e; + this.templateId = qOi.TEMPLATE_ID; + } + renderTemplate(e) { + const t = new Q(); + const s = z(e, G(".profile-tree-item-container.existing-profile-resource-type-container")); + const n = z(s, G(".profile-resource-type-label")); + const r = t.add(new NNn({ + items: [] + })); + z(z(s, G(".profile-resource-options-container")), r.domNode); + const o = z(s, G(".profile-resource-actions-container")); + const a = t.add(this.f.createInstance(Dp, o, { + hoverDelegate: t.add(Hy()), + highlightToggledItems: true + })); + return { + label: n, + radio: r, + actionBar: a, + disposables: t, + elementDisposables: t.add(new Q()) + }; + } + renderElement({ + element: e + }, t, s, n) { + s.elementDisposables.clear(); + const { + element: r, + root: o + } = e; + if (!(o instanceof Wp)) { + throw new Error("ExistingProfileResourceTreeRenderer can only render existing profile element"); + } + if (yi(r) || !RNn(r)) { + throw new Error("Invalid profile resource element"); + } + const a = () => { + s.radio.setItems([{ + text: f(11713, null), + tooltip: f(11714, null, l), + isActive: o.getFlag(r.resourceType) + }, { + text: o.name, + tooltip: f(11715, null, l, o.name), + isActive: !o.getFlag(r.resourceType) + }]); + }; + const l = this.c(r.resourceType); + s.label.textContent = l; + if (o instanceof Wp && o.profile.isDefault) { + s.radio.domNode.classList.add("hide"); + } else { + s.radio.domNode.classList.remove("hide"); + a(); + s.elementDisposables.add(o.onDidChange(u => { + if (u.name) { + a(); + } + })); + s.elementDisposables.add(s.radio.onDidSelect(u => o.setFlag(r.resourceType, u === 0))); + } + const c = []; + if (r.openAction) { + c.push(r.openAction); + } + if (r.actions?.primary) { + c.push(...r.actions.primary); + } + s.actionBar.setActions(c); + } +}; +VAt = qOi = __decorate([__param(0, re)], VAt); +var HAt = class extends WAt { + static { + jOi = this; + } + static { + this.TEMPLATE_ID = "NewProfileResourceTemplate"; + } + constructor(e, t) { + super(); + this.f = e; + this.g = t; + this.templateId = jOi.TEMPLATE_ID; + } + renderTemplate(e) { + const t = new Q(); + const s = z(e, G(".profile-tree-item-container.new-profile-resource-type-container")); + const n = z(s, G(".profile-resource-type-label-container")); + const r = z(n, G("span.profile-resource-type-label")); + const o = t.add(new NNn({ + items: [] + })); + z(z(s, G(".profile-resource-options-container")), o.domNode); + const a = z(s, G(".profile-resource-actions-container")); + const l = t.add(this.g.createInstance(Dp, a, { + hoverDelegate: t.add(Hy()), + highlightToggledItems: true + })); + return { + label: r, + radio: o, + actionBar: l, + disposables: t, + elementDisposables: t.add(new Q()) + }; + } + renderElement({ + element: e + }, t, s, n) { + s.elementDisposables.clear(); + const { + element: r, + root: o + } = e; + if (!(o instanceof nx)) { + throw new Error("NewProfileResourceTreeRenderer can only render new profile element"); + } + if (yi(r) || !RNn(r)) { + throw new Error("Invalid profile resource element"); + } + const a = this.c(r.resourceType); + s.label.textContent = a; + const l = () => { + const u = [{ + text: f(11716, null), + tooltip: f(11717, null, a) + }, { + text: f(11718, null), + tooltip: f(11719, null, a) + }]; + const d = o.getCopyFromName(); + const h = d === this.f.defaultProfile.name ? f(11720, null, d) : d; + if (o.copyFrom && h) { + s.radio.setItems([{ + text: h, + tooltip: h ? f(11721, null, a, h) : f(11722, null) + }, ...u]); + s.radio.setActiveItem(o.getCopyFlag(r.resourceType) ? 0 : o.getFlag(r.resourceType) ? 1 : 2); + } else { + s.radio.setItems(u); + s.radio.setActiveItem(o.getFlag(r.resourceType) ? 0 : 1); + } + }; + if (o.copyFrom) { + s.elementDisposables.add(s.radio.onDidSelect(u => { + o.setFlag(r.resourceType, u === 1); + o.setCopyFlag(r.resourceType, u === 0); + })); + } else { + s.elementDisposables.add(s.radio.onDidSelect(u => { + o.setFlag(r.resourceType, u === 0); + })); + } + l(); + s.radio.setEnabled(!o.disabled && !o.previewProfile); + s.elementDisposables.add(o.onDidChange(u => { + if (u.disabled || u.preview) { + s.radio.setEnabled(!o.disabled && !o.previewProfile); + } + if (u.copyFrom || u.copyFromInfo) { + l(); + } + })); + const c = []; + if (r.openAction) { + c.push(r.openAction); + } + if (r.actions?.primary) { + c.push(...r.actions.primary); + } + s.actionBar.setActions(c); + } +}; +HAt = jOi = __decorate([__param(0, Ml), __param(1, re)], HAt); +var qAt = class extends WAt { + static { + zOi = this; + } + static { + this.TEMPLATE_ID = "ProfileResourceChildTreeItemTemplate"; + } + constructor(e) { + super(); + this.h = e; + this.templateId = zOi.TEMPLATE_ID; + this.f = e.createInstance(fy, Are); + this.g = this.D(e.createInstance(DR, "mouse", false, {})); + } + renderTemplate(e) { + const t = new Q(); + const s = z(e, G(".profile-tree-item-container.profile-resource-child-container")); + const n = t.add(new h0e("", false, Pz)); + z(s, n.domNode); + const r = t.add(this.f.create(s, { + hoverDelegate: this.g + })); + const o = z(s, G(".profile-resource-actions-container")); + const a = t.add(this.h.createInstance(Dp, o, { + hoverDelegate: t.add(Hy()), + highlightToggledItems: true + })); + return { + checkbox: n, + resourceLabel: r, + actionBar: a, + disposables: t, + elementDisposables: t.add(new Q()) + }; + } + renderElement({ + element: e + }, t, s, n) { + s.elementDisposables.clear(); + const { + element: r + } = e; + if (yi(r) || !X7o(r)) { + throw new Error("Invalid profile resource element"); + } + if (r.checkbox) { + s.checkbox.domNode.setAttribute("tabindex", "0"); + s.checkbox.domNode.classList.remove("hide"); + s.checkbox.checked = r.checkbox.isChecked; + s.checkbox.domNode.ariaLabel = r.checkbox.accessibilityInformation?.label ?? ""; + if (r.checkbox.accessibilityInformation?.role) { + s.checkbox.domNode.role = r.checkbox.accessibilityInformation.role; + } + } else { + s.checkbox.domNode.removeAttribute("tabindex"); + s.checkbox.domNode.classList.add("hide"); + } + s.resourceLabel.setResource({ + name: r.resource ? ji(r.resource) : r.label, + description: r.description, + resource: r.resource + }, { + forceLabel: true, + icon: r.icon, + hideIcon: !r.resource && !r.icon + }); + const o = []; + if (r.openAction) { + o.push(r.openAction); + } + if (r.actions?.primary) { + o.push(...r.actions.primary); + } + s.actionBar.setActions(o); + } +}; +qAt = zOi = __decorate([__param(0, re)], qAt); +var MNn = class Q8n { + constructor() { + this.templateId = Q8n.TEMPLATE_ID; + } + static { + this.TEMPLATE_ID = "empty"; + } + renderTemplate(e) { + return {}; + } + renderElement(e, t, s, n) {} + disposeTemplate() {} +}; +var jAt = class { + static { + JOi = this; + } + static { + this.TEMPLATE_ID = "host"; + } + constructor(e, t) { + this.c = e; + this.d = t; + this.templateId = JOi.TEMPLATE_ID; + } + renderTemplate(e) { + const t = new Q(); + const s = t.add(new Q()); + const n = e.appendChild(G(".host")); + const r = n.appendChild(G("div.host-label")); + const o = n.appendChild(G("div.button-bar")); + return { + element: n, + hostContainer: r, + buttonBarContainer: o, + disposables: t, + renderDisposables: s + }; + } + renderElement(e, t, s, n) { + s.renderDisposables.clear(); + s.renderDisposables.add({ + dispose: () => { + Lr(s.buttonBarContainer); + } + }); + s.hostContainer.innerText = ANn(this.d, e.workspace); + s.element.classList.toggle("current-workspace", this.c.extUri.isEqual(e.workspace, e.profileElement.getCurrentWorkspace())); + s.hostContainer.style.display = ""; + s.buttonBarContainer.style.display = "none"; + } + disposeTemplate(e) { + e.disposables.dispose(); + } +}; +jAt = JOi = __decorate([__param(0, _s), __param(1, Zs)], jAt); +var zAt = class { + static { + GOi = this; + } + static { + this.TEMPLATE_ID = "path"; + } + constructor(e, t) { + this.d = e; + this.f = t; + this.templateId = GOi.TEMPLATE_ID; + this.c = cr("mouse"); + } + renderTemplate(e) { + const t = new Q(); + const s = e.appendChild(G(".path")); + const n = s.appendChild(G("div.path-label")); + const r = t.add(this.f.setupManagedHover(this.c, n, "")); + const o = t.add(new Q()); + return { + element: s, + pathLabel: n, + pathHover: r, + disposables: t, + renderDisposables: o + }; + } + renderElement(e, t, s, n) { + s.renderDisposables.clear(); + const r = this.g(e.workspace); + s.pathLabel.innerText = r; + s.element.classList.toggle("current-workspace", this.d.extUri.isEqual(e.workspace, e.profileElement.getCurrentWorkspace())); + s.pathHover.update(r); + } + disposeTemplate(e) { + e.disposables.dispose(); + e.renderDisposables.dispose(); + } + g(e) { + if (e.scheme === me.file) { + return f1(e.fsPath); + } + if (e.path.startsWith(ao.sep)) { + const t = e.path.substring(1); + if (ufe(t, true)) { + return f1(Sh.normalize(t), true); + } + } + return e.path; + } +}; +zAt = GOi = __decorate([__param(0, _s), __param(1, Ns)], zAt); +var JAt = class extends Yt { + constructor(e, t) { + super("changeProfile", "", le.asClassName(Q7o)); + this.c = e; + this.f = t; + this.tooltip = f(11723, null); + } + getSwitchProfileActions() { + return this.f.profiles.filter(e => !e.isTransient).sort((e, t) => e.isDefault ? -1 : t.isDefault ? 1 : e.name.localeCompare(t.name)).map(e => ({ + id: `switchProfileTo${e.id}`, + label: e.name, + class: undefined, + enabled: true, + checked: e.id === this.c.profileElement.profile.id, + tooltip: "", + run: () => { + if (e.id !== this.c.profileElement.profile.id) { + this.f.updateProfile(e, { + workspaces: [...(e.workspaces ?? []), this.c.workspace] + }); + } + } + })); + } +}; +JAt = __decorate([__param(1, Ml)], JAt); +var GAt = class { + static { + KOi = this; + } + static { + this.TEMPLATE_ID = "actions"; + } + constructor(e, t, s, n) { + this.c = e; + this.d = t; + this.f = s; + this.g = n; + this.templateId = KOi.TEMPLATE_ID; + } + renderTemplate(e) { + const t = new Q(); + const s = e.appendChild(G(".profile-workspaces-actions-container")); + const n = t.add(Hy()); + return { + actionBar: t.add(new ea(s, { + hoverDelegate: n, + actionViewItemProvider: o => { + if (o instanceof JAt) { + return new T1(o, { + getActions: () => o.getSwitchProfileActions() + }, this.f, { + classNames: o.class, + hoverDelegate: n + }); + } + } + })), + disposables: t + }; + } + renderElement(e, t, s, n) { + s.actionBar.clear(); + const r = []; + r.push(this.h(e)); + r.push(new JAt(e, this.c)); + r.push(this.i(e)); + s.actionBar.push(r, { + icon: true + }); + } + h(e) { + return { + label: "", + class: le.asClassName(A.window), + enabled: !this.g.extUri.isEqual(e.workspace, e.profileElement.getCurrentWorkspace()), + id: "openWorkspace", + tooltip: f(11724, null), + run: () => e.profileElement.openWorkspace(e.workspace) + }; + } + i(e) { + return { + label: "", + class: le.asClassName(Z7o), + enabled: this.d.getDefaultProfileToUse().id !== e.profileElement.profile.id, + id: "deleteTrustedUri", + tooltip: f(11725, null), + run: () => e.profileElement.updateWorkspaces([], [e.workspace]) + }; + } + disposeTemplate(e) { + e.disposables.dispose(); + } +}; +GAt = KOi = __decorate([__param(0, Ml), __param(1, HA), __param(2, ts), __param(3, _s)], GAt); +function ANn(i, e) { + if (e.authority) { + return i.getHostLabel(e.scheme, e.authority); + } else { + return f(11726, null); + } +} +var FQ = class extends rg { + static { + BAt = this; + } + static { + this.ID = "workbench.input.userDataProfiles"; + } + get dirty() { + return this.h; + } + set dirty(e) { + if (this.h !== e) { + this.h = e; + this.f.fire(); + } + } + constructor(e) { + super(); + this.m = e; + this.resource = undefined; + this.h = false; + this.c = VOi.getInstance(this.m); + this.D(this.c.onDidChange(t => this.dirty = this.c.profiles.some(s => s instanceof nx))); + } + get typeId() { + return BAt.ID; + } + getName() { + return f(11727, null); + } + getIcon() { + return CCr; + } + async resolve() { + await this.c.resolve(); + return this.c; + } + isDirty() { + return this.dirty; + } + async save() { + await this.c.saveNewProfile(); + return this; + } + async revert() { + this.c.revert(); + } + matches(e) { + return e instanceof BAt; + } + dispose() { + for (const e of this.c.profiles) { + if (e instanceof Wp) { + e.reset(); + } + } + super.dispose(); + } +}; +FQ = BAt = __decorate([__param(0, re)], FQ); +var oUo = class { + canSerialize(i) { + return true; + } + serialize(i) { + return ""; + } + deserialize(i) { + return i.createInstance(FQ); + } +}; +jo(); +ar(); +te(); +iO(); +var o_i = new _("OpenProfile"); +var KAt = new _("Profiles"); +var YAt = class extends H { + static { + this.ID = "workbench.contrib.userDataProfiles"; + } + constructor(e, t, s, n, r, o, a, l, c, u, d, h) { + super(); + this.h = e; + this.j = t; + this.m = s; + this.n = n; + this.q = r; + this.r = o; + this.s = l; + this.t = c; + this.u = u; + this.w = d; + this.H = this.D(new ki()); + this.c = oti.bindTo(a); + this.f = SCr.bindTo(a); + this.c.set(this.h.currentProfile.id); + this.f.set(!!this.h.currentProfile.isTransient); + this.D(this.h.onDidChangeCurrentProfile(g => { + this.c.set(this.h.currentProfile.id); + this.f.set(!!this.h.currentProfile.isTransient); + })); + this.g = Y5.bindTo(a); + this.g.set(this.j.profiles.length > 1); + this.D(this.j.onDidChangeProfiles(g => this.g.set(this.j.profiles.length > 1))); + this.z(); + this.C(); + this.D(this.w.registerHandler(this)); + if (tn) { + u.when(4).then(() => t.cleanUp()); + } + this.W(); + if (h.options?.profileToPreview) { + u.when(3).then(() => this.handleURL(V.revive(h.options.profileToPreview))); + } + } + async handleURL(e) { + if (nti(e)) { + const t = await this.y(); + if (t) { + t.createNewProfile(e); + return true; + } + } + return false; + } + async y() { + return await this.s.activeGroup.openEditor(new FQ(this.t)); + } + z() { + Pe.as(_o.EditorPane).registerEditorPane(qd.create(UAt, UAt.ID, f(11623, null)), [new Os(FQ)]); + Pe.as(_o.EditorFactory).registerEditorSerializer(FQ.ID, oUo); + } + C() { + this.F(); + this.D(this.O()); + this.D(this.N()); + this.G(); + this.L(); + this.I(); + this.D(this.j.onDidChangeProfiles(() => this.I())); + this.D(this.P()); + this.Q(); + this.R(); + this.S(); + this.U(); + } + F() { + const e = () => f(11624, null, this.h.currentProfile.name); + Be.appendMenuItem(_.GlobalActivity, { + get title() { + return e(); + }, + submenu: KAt, + group: "2_configuration", + order: 1, + when: Y5 + }); + Be.appendMenuItem(_.MenubarPreferencesMenu, { + get title() { + return e(); + }, + submenu: KAt, + group: "2_configuration", + order: 1, + when: Y5 + }); + } + G() { + Be.appendMenuItem(_.MenubarFileMenu, { + title: f(11625, null), + submenu: o_i, + group: "1_new", + order: 4 + }); + } + I() { + this.H.value = new Q(); + for (const e of this.j.profiles) { + if (!e.isTransient) { + this.H.value.add(this.J(e)); + this.H.value.add(this.M(e)); + } + } + } + J(e) { + const t = this; + return J(class extends se { + constructor() { + super({ + id: `workbench.profiles.actions.profileEntry.${e.id}`, + title: e.name, + metadata: { + description: W(11633, "Switch to {0} profile", e.name) + }, + toggled: T.equals(oti.key, e.id), + menu: [{ + id: KAt, + group: "0_profiles" + }] + }); + } + async run(n) { + if (t.h.currentProfile.id !== e.id) { + return t.m.switchProfile(e); + } + } + }); + } + L() { + return J(class extends se { + constructor() { + super({ + id: "workbench.profiles.actions.newWindowWithProfile", + title: W(11634, "New Window with Profile..."), + category: K5, + precondition: Y5, + f1: true + }); + } + async run(t) { + const s = t.get(zi); + const n = t.get(Ml); + const r = t.get(kr); + const o = await s.pick(n.profiles.map(a => ({ + label: a.name, + profile: a + })), { + title: f(11626, null), + placeHolder: f(11627, null), + canPickMany: false + }); + if (o) { + return r.openWindow({ + remoteAuthority: null, + forceProfile: o.profile.name + }); + } + } + }); + } + M(e) { + const t = new Q(); + const s = `workbench.action.openProfile.${e.name.replace("/s+/", "_")}`; + t.add(J(class extends se { + constructor() { + super({ + id: s, + title: W(11635, "{0}", e.name), + metadata: { + description: W(11636, "Open New Window with {0} Profile", e.name) + }, + menu: { + id: o_i, + group: "0_profiles", + when: Y5 + } + }); + } + run(r) { + return r.get(kr).openWindow({ + remoteAuthority: null, + forceProfile: e.name + }); + } + })); + t.add(Be.appendMenuItem(_.CommandPalette, { + command: { + id: s, + category: K5, + title: W(11637, "Open {0} Profile", e.name), + precondition: Y5 + } + })); + return t; + } + N() { + const e = this; + return J(class extends se { + constructor() { + super({ + id: "workbench.profiles.actions.switchProfile", + title: W(11638, "Switch Profile..."), + category: K5, + f1: true + }); + } + async run(s) { + const n = s.get(zi); + const r = []; + for (const a of e.j.profiles) { + r.push({ + id: a.id, + label: a.id === e.h.currentProfile.id ? `$(check) ${a.name}` : a.name, + profile: a + }); + } + const o = await n.pick(r.sort((a, l) => a.profile.name.localeCompare(l.profile.name)), { + placeHolder: f(11628, null) + }); + if (o) { + await e.m.switchProfile(o.profile); + } + } + }); + } + O() { + const e = new Q(); + e.add(J(class extends se { + constructor() { + super({ + id: "workbench.profiles.actions.manageProfiles", + title: { + ...W(11639, "Profiles"), + mnemonicTitle: f(11629, null) + }, + menu: [{ + id: _.GlobalActivity, + group: "2_configuration", + order: 1, + when: Y5.negate() + }, { + id: _.MenubarPreferencesMenu, + group: "2_configuration", + order: 1, + when: Y5.negate() + }, { + id: KAt, + group: "1_manage", + order: 1 + }] + }); + } + run(s) { + const n = s.get(Hi); + const r = s.get(re); + return n.activeGroup.openEditor(new FQ(r)); + } + })); + e.add(Be.appendMenuItem(_.CommandPalette, { + command: { + id: "workbench.profiles.actions.manageProfiles", + category: pt.Preferences, + title: W(11640, "Open Profiles (UI)") + } + })); + return e; + } + P() { + const e = this; + const t = new Q(); + const s = "workbench.profiles.actions.exportProfile"; + t.add(J(class extends se { + constructor() { + super({ + id: s, + title: W(11641, "Export Profile..."), + category: K5, + f1: true + }); + } + async run() { + (await e.y())?.selectProfile(e.h.currentProfile); + } + })); + t.add(Be.appendMenuItem(_.MenubarShare, { + command: { + id: s, + title: W(11642, "Export Profile ({0})...", e.h.currentProfile.name) + } + })); + return t; + } + Q() { + const e = this; + this.D(J(class extends se { + constructor() { + super({ + id: "workbench.profiles.actions.createFromCurrentProfile", + title: W(11643, "Save Current Profile As..."), + category: K5, + f1: true + }); + } + async run() { + (await e.y())?.createNewProfile(e.h.currentProfile); + } + })); + } + R() { + const e = this; + this.D(J(class extends se { + constructor() { + super({ + id: "workbench.profiles.actions.createProfile", + title: W(11644, "New Profile..."), + category: K5, + f1: true, + menu: [{ + id: o_i, + group: "1_manage_profiles", + order: 1 + }] + }); + } + async run(s) { + return (await e.y())?.createNewProfile(); + } + })); + } + S() { + this.D(J(class extends se { + constructor() { + super({ + id: "workbench.profiles.actions.deleteProfile", + title: W(11645, "Delete Profile..."), + category: K5, + f1: true, + precondition: Y5 + }); + } + async run(t) { + const s = t.get(zi); + const n = t.get(Rc); + const r = t.get(Ml); + const o = t.get(HA); + const a = t.get(ni); + const l = r.profiles.filter(c => !c.isDefault && !c.isTransient); + if (l.length) { + const c = await s.pick(l.map(u => ({ + label: u.name, + description: u.id === n.currentProfile.id ? f(11630, null) : undefined, + profile: u + })), { + title: f(11631, null), + placeHolder: f(11632, null), + canPickMany: true + }); + if (c) { + try { + await Promise.all(c.map(u => o.removeProfile(u.profile))); + } catch (u) { + a.error(u); + } + } + } + } + })); + } + U() { + this.D(J(class extends se { + constructor() { + super({ + id: "workbench.profiles.actions.help", + title: S9s, + category: pt.Help, + menu: [{ + id: _.CommandPalette + }] + }); + } + run(t) { + return t.get(os).open(V.parse("https://aka.ms/vscode-profiles-help")); + } + })); + } + async W() { + await this.u.when(4); + if (this.j.profiles.length > 1) { + this.n.publicLog2("profiles:count", { + count: this.j.profiles.length - 1 + }); + } + const e = await this.r.getTelemetryWorkspaceId(this.q.getWorkspace(), this.q.getWorkbenchState()); + this.n.publicLog2("workspaceProfileInfo", { + workspaceId: e, + defaultProfile: this.h.currentProfile.isDefault + }); + } +}; +YAt = __decorate([__param(0, Rc), __param(1, Ml), __param(2, HA), __param(3, Ot), __param(4, kt), __param(5, UOi), __param(6, Ne), __param(7, Hi), __param(8, re), __param(9, Yo), __param(10, CR), __param(11, hy)], YAt); +X(); +Je(); +mu(); +var aUo = class Q7i extends se { + static { + this.ID = "workbench.profiles.actions.createTemporaryProfile"; + } + static { + this.TITLE = W(11646, "Create a Temporary Profile"); + } + constructor() { + super({ + id: Q7i.ID, + title: Q7i.TITLE, + category: K5, + f1: true + }); + } + async run(e) { + return e.get(HA).createAndEnterTransientProfile(); + } +}; +J(aUo); +J(class extends se { + constructor() { + super({ + id: "workbench.profiles.actions.cleanupProfiles", + title: W(11647, "Cleanup Profiles"), + category: pt.Developer, + f1: true + }); + } + async run(e) { + return e.get(Ml).cleanUp(); + } +}); +J(class extends se { + constructor() { + super({ + id: "workbench.profiles.actions.resetWorkspaces", + title: W(11648, "Reset Workspace Profiles Associations"), + category: pt.Developer, + f1: true + }); + } + async run(e) { + return e.get(Ml).resetWorkspaces(); + } +}); +Yn(YAt.ID, YAt, 2); +q(); +Ht(); +da(); +Je(); +X(); +nr(); +He(); +X(); +Ee(); +te(); +Br(); +Gl(); +var OQ = W(6370, "Cloud Changes"); +var _Q = Ve("IEditSessionsStorageService"); +var a_i = Ve("IEditSessionsLogService"); +var rB; +(function (i) { + i[i.Addition = 1] = "Addition"; + i[i.Deletion = 2] = "Deletion"; +})(rB ||= {}); +var XAt; +(function (i) { + i[i.File = 1] = "File"; +})(XAt ||= {}); +var lUo = 3; +var FTe = "editSessionsSignedIn"; +var cUo = new fe(FTe, false); +var l_i = "editSessionsPending"; +var uUo = new fe(l_i, false); +var $Nn = "workbench.view.editSessions"; +var FNn = "workbench.views.editSessions.data"; +var OTe = W(6371, "Cloud Changes"); +var dUo = dt("edit-sessions-view-icon", A.cloudDownload, f(6369, null)); +var ONn = new fe("editSessionsShowView", false); +var QAt = "vscode-edit-sessions"; +function _Nn(i, e) { + switch (i) { + case 1: + return Ii.fromString(e); + case 2: + return Xq(e); + default: + throw new Error("Upgrade to a newer version to decode this content."); + } +} +function c_i(i) { + const e = new j2(); + e.update(i); + return e.digest(); +} +var u_i = "editSessions"; +dv(); +Nt(); +ii(); +Le(); +Et(); +nr(); +Me(); +so(); +q(); +X(); +Je(); +Ee(); +Aa(); +Nt(); +kn(); +mn(); +qt(); +rn(); +fn(); +Ps(); +rt(); +pe(); +Ut(); +var ede; +var d_i = class extends H { + static { + ede = this; + } + static { + this.h = "editSessionAccountPreference"; + } + get isSignedIn() { + return this.X !== undefined; + } + get onDidSignIn() { + return this.q.event; + } + get onDidSignOut() { + return this.r.event; + } + get lastWrittenResources() { + return this.s; + } + get lastReadResources() { + return this.t; + } + constructor(e, t, s, n, r, o, a, l, c, u, d) { + super(); + this.u = e; + this.w = t; + this.y = s; + this.z = n; + this.C = r; + this.F = o; + this.G = a; + this.H = l; + this.I = c; + this.J = u; + this.L = d; + this.SIZE_LIMIT = Math.floor(1992294.4); + this.c = this.H["editSessions.store"]; + this.j = false; + this.q = new B(); + this.r = new B(); + this.s = new Map(); + this.t = new Map(); + this.D(this.z.onDidChangeSessions(h => this.ab(h.event))); + this.D(this.w.onDidChangeValue(-1, ede.h, this.B)(() => this.Z())); + this.bb(); + this.cb(); + this.n = cUo.bindTo(this.I); + this.n.set(this.X !== undefined); + } + async write(e, t) { + await this.initialize("write", false); + if (!this.j) { + throw new Error("Please sign in to store your edit session."); + } + if (typeof t != "string" && t.machine === undefined) { + t.machine = await this.O(); + } + t = typeof t == "string" ? t : JSON.stringify(t); + const s = await this.storeClient.writeResource(e, t, null, undefined, vni(Ft())); + this.s.set(e, { + ref: s, + content: t + }); + return s; + } + async read(e, t) { + await this.initialize("read", false); + if (!this.j) { + throw new Error("Please sign in to apply your latest edit session."); + } + let s; + const n = vni(Ft()); + try { + if (t !== undefined) { + s = await this.storeClient?.resolveResourceContent(e, t, undefined, n); + } else { + const r = await this.storeClient?.readResource(e, null, undefined, n); + s = r?.content; + t = r?.ref; + } + } catch (r) { + this.G.error(r); + } + if (s != null && t !== undefined) { + this.t.set(e, { + ref: t, + content: s + }); + return { + ref: t, + content: s + }; + } + } + async delete(e, t) { + await this.initialize("write", false); + if (!this.j) { + throw new Error(`Unable to delete edit session with ref ${t}.`); + } + try { + await this.storeClient?.deleteResource(e, t); + } catch (s) { + this.G.error(s); + } + } + async list(e) { + await this.initialize("read", false); + if (!this.j) { + throw new Error("Unable to list edit sessions."); + } + try { + return this.storeClient?.getAllResourceRefs(e) ?? []; + } catch (t) { + this.G.error(t); + } + return []; + } + async initialize(e, t = false) { + if (this.j) { + return true; + } else { + this.j = await this.M(e, t); + this.n.set(this.j); + if (this.j) { + this.q.fire(); + } + return this.j; + } + } + async M(e, t) { + await this.C.whenInstalledExtensionsRegistered(); + if (!this.c?.url) { + throw new Error("Unable to initialize sessions sync as session sync preference is not configured in product.json."); + } + if (this.storeClient === undefined) { + return false; + } + this.D(this.storeClient.onTokenFailed(() => { + this.G.info("Clearing edit sessions authentication preference because of successive token failures."); + this.$(); + })); + if (this.f === undefined) { + this.f = new rCi(this.F, this.u, this.w, this.storeClient, this.G, this.H); + } + if (this.g !== undefined) { + return true; + } + const s = await this.P(e, t); + if (s !== undefined) { + this.g = s; + this.storeClient.setAuthToken(s.token, s.providerId); + } + return s !== undefined; + } + async getMachineById(e) { + await this.initialize("read", false); + if (!this.N) { + const t = await this.f.getMachines(); + this.N = t.reduce((s, n) => s.set(n.id, n.name), new Map()); + } + return this.N.get(e); + } + async O() { + const e = await this.f.getMachines().then(t => t.find(s => s.isCurrent)?.id); + if (e === undefined) { + await this.f.addCurrentMachine(); + return await this.f.getMachines().then(t => t.find(s => s.isCurrent).id); + } else { + return e; + } + } + async P(e, t) { + if (this.X) { + this.G.info(`Searching for existing authentication session with ID ${this.X}`); + const n = await this.Y(); + if (n) { + this.G.info(`Found existing authentication session with ID ${n.session.id}`); + return { + sessionId: n.session.id, + token: n.session.idToken ?? n.session.accessToken, + providerId: n.session.providerId + }; + } + this.r.fire(); + } + if (this.Q()) { + this.G.info("Reusing user data sync enablement"); + const n = await Tvi(this.L, this.H); + if (n !== undefined) { + this.G.info(`Using current authentication session with ID ${n.id}`); + this.X = n.id; + return { + sessionId: n.id, + token: n.accessToken, + providerId: n.providerId + }; + } + } + if (t) { + return; + } + const s = await this.R(e); + if (s !== undefined) { + this.X = s.id; + return { + sessionId: s.id, + token: s.idToken ?? s.accessToken, + providerId: s.providerId + }; + } + } + Q() { + return tn && this.w.isNew(-1) && this.w.isNew(1); + } + async R(e) { + const t = new Q(); + const s = t.add(this.y.createQuickPick({ + useSeparators: true + })); + s.ok = false; + s.placeholder = f(e === "read" ? 6345 : 6346, null); + s.ignoreFocusOut = true; + s.items = await this.S(); + return new Promise((n, r) => { + t.add(s.onDidHide(o => { + r(new fl()); + t.dispose(); + })); + t.add(s.onDidAccept(async o => { + const a = s.selectedItems[0]; + const l = "provider" in a ? { + ...(await this.z.createSession(a.provider.id, a.provider.scopes)), + providerId: a.provider.id + } : "session" in a ? a.session : undefined; + n(l); + s.hide(); + })); + s.show(); + }); + } + async S() { + const e = []; + e.push({ + type: "separator", + label: f(6347, null) + }); + const t = await this.U(); + e.push(...t); + e.push({ + type: "separator", + label: f(6348, null) + }); + for (const s of await this.W()) { + if (!t.some(r => r.session.providerId === s.id) || this.z.getProvider(s.id).supportsMultipleAccounts) { + const r = this.z.getProvider(s.id).label; + e.push({ + label: f(6349, null, r), + provider: s + }); + } + } + return e; + } + async U() { + const e = await this.W(); + const t = new Map(); + let s; + for (const n of e) { + const r = await this.z.getSessions(n.id, n.scopes); + for (const o of r) { + const a = { + label: o.account.label, + description: this.z.getProvider(n.id).label, + session: { + ...o, + providerId: n.id + } + }; + t.set(a.session.account.id, a); + if (this.X === o.id) { + s = a; + } + } + } + if (s !== undefined) { + t.set(s.session.account.id, s); + } + return [...t.values()].sort((n, r) => n.label.localeCompare(r.label)); + } + async W() { + if (!this.c) { + throw new Error("Unable to get configured authentication providers as session sync preference is not configured in product.json."); + } + const e = this.c.authenticationProviders; + const t = Object.keys(e).reduce((n, r) => { + n.push({ + id: r, + scopes: e[r].scopes + }); + return n; + }, []); + const s = this.z.declaredProviders; + return t.filter(({ + id: n + }) => s.some(r => r.id === n)); + } + get X() { + return this.w.get(ede.h, -1); + } + set X(e) { + this.G.trace(`Saving authentication session preference for ID ${e}.`); + if (e === undefined) { + this.w.remove(ede.h, -1); + } else { + this.w.store(ede.h, e, -1, 1); + } + } + async Y() { + return (await this.U()).find(t => t.session.id === this.X); + } + async Z() { + const e = this.X; + const t = this.g?.sessionId; + if (t !== e) { + this.G.trace(`Resetting authentication state because authentication session ID preference changed from ${t} to ${e}.`); + this.g = undefined; + this.j = false; + } + } + $() { + this.g = undefined; + this.j = false; + this.X = undefined; + this.n.set(false); + } + ab(e) { + if (this.g?.sessionId && e.removed?.find(t => t.id === this.g?.sessionId)) { + this.$(); + } + } + bb() { + const e = this; + const t = "workbench.editSessions.actions.signIn"; + const s = T.and(T.equals(l_i, false), T.equals(FTe, false)); + this.D(J(class extends se { + constructor() { + super({ + id: t, + title: f(6350, null), + category: OQ, + precondition: s, + menu: [{ + id: _.CommandPalette + }, { + id: _.AccountsContext, + group: "2_editSessions", + when: s + }] + }); + } + async run() { + return await e.initialize("write", false); + } + })); + this.D(Be.appendMenuItem(_.AccountsContext, { + group: "2_editSessions", + command: { + id: t, + title: f(6351, null) + }, + when: T.and(T.equals(l_i, true), T.equals(FTe, false)) + })); + } + cb() { + const e = this; + this.D(J(class extends se { + constructor() { + super({ + id: "workbench.editSessions.actions.resetAuth", + title: f(6352, null), + category: OQ, + precondition: T.equals(FTe, true), + menu: [{ + id: _.CommandPalette + }, { + id: _.AccountsContext, + group: "2_editSessions", + when: T.equals(FTe, true) + }] + }); + } + async run() { + const s = await e.J.confirm({ + message: f(6353, null), + checkbox: { + label: f(6354, null) + } + }); + if (s.confirmed) { + if (s.checkboxChecked) { + e.storeClient?.deleteResource("editSessions", null); + } + e.$(); + } + } + })); + } +}; +d_i = ede = __decorate([__param(0, Ct), __param(1, ht), __param(2, zi), __param(3, dw), __param(4, Ks), __param(5, pa), __param(6, a_i), __param(7, ys), __param(8, Ne), __param(9, Js), __param(10, wle)], d_i); +It(); +ai(); +Wi(); +fn(); +kn(); +gs(); +Aa(); +Qr(); +mn(); +Ee(); +Wt(); +lD(); +At(); +rn(); +Et(); +X(); +Aa(); +Zt(); +var h_i = class extends lj { + constructor(e, t) { + super(); + this.h = this.D(e.createLogger(Li(t.logsHome, `${u_i}.log`), { + id: u_i, + name: f(6372, null) + })); + } + trace(e, ...t) { + this.h.trace(e, ...t); + } + debug(e, ...t) { + this.h.debug(e, ...t); + } + info(e, ...t) { + this.h.info(e, ...t); + } + warn(e, ...t) { + this.h.warn(e, ...t); + } + error(e, ...t) { + this.h.error(e, ...t); + } + flush() { + this.h.flush(); + } +}; +h_i = __decorate([__param(0, Um), __param(1, pa)], h_i); +Qn(); +lo(); +jo(); +te(); +q(); +X(); +jo(); +te(); +Ht(); +Qn(); +Le(); +Wv(); +He(); +Je(); +Ee(); +Wt(); +fn(); +ii(); +Et(); +Nt(); +pn(); +var f_i = "editSessionsCount"; +var hUo = new fe(f_i, 0); +var g_i = class extends H { + constructor(e, t) { + super(); + this.a = t; + this.b(e); + } + b(e) { + const t = FNn; + const s = this.a.createInstance(cV, t, OTe.value); + s.showCollapseAllAction = true; + s.showRefreshAction = true; + s.dataProvider = this.a.createInstance(p_i); + const n = Pe.as(ur.ViewsRegistry); + n.registerViews([{ + id: t, + name: OTe, + ctorDescriptor: new Os(n8), + canToggleVisibility: true, + canMoveView: false, + treeView: s, + collapsed: false, + when: T.and(ONn), + order: 100, + hideByDefault: true + }], e); + n.registerViewWelcomeContent(t, { + content: f(6355, null, `[${f(6356, null)}](command:workbench.editSessions.actions.store)`), + when: T.equals(f_i, 0), + order: 1 + }); + this.D(J(class extends se { + constructor() { + super({ + id: "workbench.editSessions.actions.resume", + title: f(6357, null), + icon: A.desktopDownload, + menu: { + id: _.ViewItemContext, + when: T.and(T.equals("view", t), T.regex("viewItem", /edit-session/i)), + group: "inline" + } + }); + } + async run(r, o) { + const a = V.parse(o.$treeItemHandle).path.substring(1); + await r.get(gt).executeCommand("workbench.editSessions.actions.resumeLatest", a, true); + await s.refresh(); + } + })); + this.D(J(class extends se { + constructor() { + super({ + id: "workbench.editSessions.actions.store", + title: f(6358, null), + icon: A.cloudUpload + }); + } + async run(r, o) { + await r.get(gt).executeCommand("workbench.editSessions.actions.storeCurrent"); + await s.refresh(); + } + })); + this.D(J(class extends se { + constructor() { + super({ + id: "workbench.editSessions.actions.delete", + title: f(6359, null), + icon: A.trash, + menu: { + id: _.ViewItemContext, + when: T.and(T.equals("view", t), T.regex("viewItem", /edit-session/i)), + group: "inline" + } + }); + } + async run(r, o) { + const a = V.parse(o.$treeItemHandle).path.substring(1); + const l = r.get(Js); + const c = r.get(_Q); + if ((await l.confirm({ + message: f(6360, null, a), + detail: f(6361, null), + type: "warning", + title: OTe.value + })).confirmed) { + await c.delete("editSessions", a); + await s.refresh(); + } + } + })); + this.D(J(class extends se { + constructor() { + super({ + id: "workbench.editSessions.actions.deleteAll", + title: f(6362, null), + icon: A.trash, + menu: { + id: _.ViewTitle, + when: T.and(T.equals("view", t), T.greater(f_i, 0)) + } + }); + } + async run(r) { + const o = r.get(Js); + const a = r.get(_Q); + if ((await o.confirm({ + message: f(6363, null), + detail: f(6364, null), + type: "warning", + title: OTe.value + })).confirmed) { + await a.delete("editSessions", null); + await s.refresh(); + } + } + })); + } +}; +g_i = __decorate([__param(1, re)], g_i); +var p_i = class { + constructor(e, t, s, n) { + this.b = e; + this.c = t; + this.d = s; + this.e = n; + this.a = hUo.bindTo(this.c); + } + async getChildren(e) { + if (!e) { + return this.f(); + } + const [t, s, n] = V.parse(e.handle).path.substring(1).split("/"); + if (t && !s) { + return this.g(t); + } else if (t && s && !n) { + return this.h(t, s); + } else { + return []; + } + } + async f() { + const e = await this.b.list("editSessions"); + this.a.set(e.length); + const t = []; + for (const s of e) { + const n = V.from({ + scheme: QAt, + authority: "remote-session-content", + path: `/${s.ref}` + }); + const r = await this.b.read("editSessions", s.ref); + if (!r) { + continue; + } + const o = JSON.parse(r.content); + const a = o.folders.map(d => d.name).join(", ") ?? s.ref; + const l = o.machine; + const c = l ? await this.b.getMachineById(l) : undefined; + const u = c === undefined ? ym(s.created, true) : `${ym(s.created, true)}\xA0\xA0\u2022\xA0\xA0${c}`; + t.push({ + handle: n.toString(), + collapsibleState: vu.Collapsed, + label: { + label: a + }, + description: u, + themeIcon: A.repo, + contextValue: "edit-session" + }); + } + return t; + } + async g(e) { + const t = await this.b.read("editSessions", e); + if (!t) { + return []; + } + const s = JSON.parse(t.content); + if (s.folders.length === 1) { + const n = s.folders[0]; + return this.h(e, n.name); + } + return s.folders.map(n => ({ + handle: V.from({ + scheme: QAt, + authority: "remote-session-content", + path: `/${t.ref}/${n.name}` + }).toString(), + collapsibleState: vu.Collapsed, + label: { + label: n.name + }, + themeIcon: A.folder + })); + } + async h(e, t) { + const s = await this.b.read("editSessions", e); + if (!s) { + return []; + } + const n = JSON.parse(s.content); + const r = this.d.getWorkspace().folders.find(a => a.name === t); + const o = n.folders.find(a => a.name === t); + if (o) { + return Promise.all(o.workingChanges.map(async a => { + const l = V.from({ + scheme: QAt, + authority: "remote-session-content", + path: `/${s.ref}/${t}/${a.relativeFilePath}` + }); + if (r?.uri) { + const c = Li(r.uri, a.relativeFilePath); + if (a.type === rB.Addition && (await this.e.exists(c))) { + return { + handle: l.toString(), + resourceUri: l, + collapsibleState: vu.None, + label: { + label: a.relativeFilePath + }, + themeIcon: A.file, + command: { + id: "vscode.diff", + title: f(6365, null), + arguments: [c, l, `${ir(a.relativeFilePath)} (${f(6366, null)} \u2194 ${f(6367, null)})`, undefined] + } + }; + } + } + return { + handle: l.toString(), + resourceUri: l, + collapsibleState: vu.None, + label: { + label: a.relativeFilePath + }, + themeIcon: A.file, + command: { + id: OE, + title: f(6368, null), + arguments: [l, undefined, undefined] + } + }; + })); + } else { + return []; + } + } +}; +p_i = __decorate([__param(0, _Q), __param(1, Ne), __param(2, kt), __param(3, Ct)], p_i); +q(); +pe(); +Nt(); +Ut(); +var ZAt = class { + static { + this.SCHEMA = QAt; + } + constructor(e) { + this.a = e; + this.capabilities = 2050; + this.onDidChangeCapabilities = de.None; + this.onDidChangeFile = de.None; + } + async readFile(e) { + const t = /(?[^/]+)\/(?[^/]+)\/(?.*)/.exec(e.path.substring(1)); + if (!t?.groups) { + throw io.FileNotFound; + } + const { + ref: s, + folderName: n, + filePath: r + } = t.groups; + const o = await this.a.read("editSessions", s); + if (!o) { + throw io.FileNotFound; + } + const a = JSON.parse(o.content); + const l = a.folders.find(c => c.name === n)?.workingChanges.find(c => c.relativeFilePath === r); + if (!l || l.type === rB.Deletion) { + throw io.FileNotFound; + } + return _Nn(a.version, l.contents).buffer; + } + async stat(e) { + const t = await this.readFile(e); + const s = Date.now(); + return { + type: wg.File, + permissions: $4.Readonly, + mtime: s, + ctime: s, + size: t.byteLength + }; + } + watch(e, t) { + return H.None; + } + async mkdir(e) {} + async readdir(e) { + return []; + } + async rename(e, t, s) {} + async delete(e, t) {} + async writeFile() { + throw new Khe(); + } +}; +ZAt = __decorate([__param(0, _Q)], ZAt); +rt(); +ri(); +Jr(); +Rt(); +qt(); +vt(); +He(); +Ut(); +Wc(); +ri(); +pe(); +yg(); +Me(); +Aa(); +Nt(); +qt(); +ai(); +Un(); +nr(); +Et(); +Le(); +It(); +te(); +ii(); +var m_i = Ve("IWorkspaceIdentityService"); +var b_i = class { + constructor(e, t) { + this.a = e; + this.b = t; + } + async getWorkspaceStateFolders(e) { + const t = []; + for (const s of this.a.getWorkspace().folders) { + const n = await this.b.getEditSessionIdentifier(s, e); + if (n) { + t.push({ + resourceUri: s.uri.toString(), + workspaceFolderIdentity: n + }); + } + } + return t; + } + async matches(e, t) { + const s = {}; + const n = {}; + for (const l of e) { + n[l.workspaceFolderIdentity] = l.resourceUri; + } + const r = new Map(); + for (const l of this.a.getWorkspace().folders) { + const c = await this.b.getEditSessionIdentifier(l, t); + if (c) { + r.set(l, c); + } + } + for (const [l, c] of r.entries()) { + const u = n[c]; + if (u) { + s[u] = l.uri.toString(); + continue; + } + let d = false; + for (const [h, g] of Object.entries(n)) { + if ((await this.b.provideEditSessionIdentityMatch(l, c, h, t)) === rke.Complete) { + s[g] = l.uri.toString(); + d = true; + break; + } + } + if (!d) { + return false; + } + } + const o = l => { + for (const c of Object.keys(s)) { + const u = V.parse(c); + if (Dw(u, l)) { + const d = s[c]; + const h = fb(u, l); + if (h) { + return Li(V.parse(d), h); + } + } + } + return l; + }; + const a = (l, c = 0) => { + if (!l || c > 200 || l instanceof Ii || l instanceof Uint8Array) { + return l; + } + if (V.isUri(l)) { + return o(l); + } + if (Array.isArray(l)) { + for (let u = 0; u < l.length; ++u) { + l[u] = a(l[u], c + 1); + } + } else { + for (const u in l) { + if (Object.hasOwnProperty.call(l, u)) { + l[u] = a(l[u], c + 1); + } + } + } + return l; + }; + return a; + } +}; +b_i = __decorate([__param(0, kt), __param(1, nke)], b_i); +it(m_i, b_i, 1); +var fUo = class { + async writeResource() {} + async getAllResourceRefs() { + return []; + } + async resolveResourceContent() { + return null; + } +}; +var gUo = class { + constructor() { + this.a = new B(); + this.onDidChangeEnablement = this.a.event; + this.b = new B(); + this.onDidChangeResourceEnablement = this.b.event; + } + isEnabled() { + return true; + } + canToggleEnablement() { + return true; + } + setEnablement(i) {} + isResourceEnabled(i) { + return true; + } + setResourceEnablement(i, e) {} + getResourceSyncStateVersion(i) {} +}; +var v_i = class extends sce { + constructor(e, t, s, n, r, o, a, l, c, u, d, h) { + const g = new fUo(); + const p = new gUo(); + super({ + syncResource: "workspaceState", + profile: e + }, t, r, o, c, s, g, p, a, n, l, u); + this.vb = d; + this.wb = h; + this.pb = 1; + } + async sync() { + const e = new Xi(); + const t = await this.vb.getWorkspaceStateFolders(e.token); + if (!t.length) { + return; + } + await this.I.flush(); + const s = this.I.keys(1, 0); + if (!s.length) { + return; + } + const n = {}; + s.forEach(o => { + const a = this.I.get(o, 1); + if (a) { + n[o] = a; + } + }); + const r = { + folders: t, + storage: n, + version: this.pb + }; + await this.wb.write("workspaceState", bUt(r)); + } + async apply() { + const e = this.wb.lastReadResources.get("editSessions")?.content; + const t = e ? JSON.parse(e).workspaceStateId : undefined; + const s = await this.wb.read("workspaceState", t); + if (!s) { + return null; + } + const n = VI(s.content); + if (!n) { + this.O.info("Skipping initializing workspace state because remote workspace state does not exist."); + return null; + } + const r = new Xi(); + const o = await this.vb.matches(n.folders, r.token); + if (!o) { + this.O.info("Skipping initializing workspace state because remote workspace state does not match current workspace."); + return null; + } + const a = {}; + for (const l of Object.keys(n.storage)) { + a[l] = n.storage[l]; + } + if (Object.keys(a).length) { + const l = []; + for (const c of Object.keys(a)) { + try { + const u = VI(a[c]); + o(u); + l.push({ + key: c, + value: u, + scope: 1, + target: 0 + }); + } catch { + l.push({ + key: c, + value: a[c], + scope: 1, + target: 0 + }); + } + } + this.I.storeAll(l, true); + } + this.wb.delete("workspaceState", s.ref); + return null; + } + tb(e, t, s, n) { + throw new Error("Method not implemented."); + } + async qb(e, t, s, n, r) { + return []; + } + rb(e, t) { + throw new Error("Method not implemented."); + } + sb(e, t, s, n) { + throw new Error("Method not implemented."); + } + async ub(e) { + return true; + } + async hasLocalData() { + return false; + } + async resolveContent(e) { + return null; + } +}; +v_i = __decorate([__param(4, Ct), __param(5, pa), __param(6, Ot), __param(7, ve), __param(8, ht), __param(9, _s), __param(10, m_i), __param(11, _Q)], v_i); +mu(); +var pUo = class extends ice {}; +Un(); +Gl(); +var _Te; +it(a_i, h_i, 1); +it(_Q, d_i, 1); +var e$t = { + id: "_workbench.editSessions.actions.continueEditSession", + title: W(6338, "Continue Working On..."), + precondition: GG.notEqualsTo("0"), + f1: true +}; +var t$t = { + id: "_workbench.editSessions.actions.continueEditSession.openLocalFolder", + title: W(6339, "Open In Local Folder"), + category: OQ, + precondition: T.and(r0.toNegated(), xW) +}; +var BNn = { + id: "workbench.editSessions.actions.showOutputChannel", + title: W(6340, "Show Log"), + category: OQ +}; +var BTe = { + id: "workbench.action.continueOn.extensions", + title: f(6292, null) +}; +J(class extends se { + constructor() { + super({ + ...BTe, + f1: false + }); + } + async run(i) { + return i.get(Vr).openSearch("@tag:continueOn"); + } +}); +var y_i = `[${f(6293, null)}](command:${BNn.id})`; +var tde = { + location: 10, + type: "syncing" +}; +var UNn = "editSessionId"; +var mUo = "workbench.editSessions.continueOn"; +var w_i = class extends H { + static { + _Te = this; + } + static { + this.h = "applicationLaunchedViaContinueOn"; + } + constructor(e, t, s, n, r, o, a, l, c, u, d, h, g, p, b, v, y, w, C, S, x, k, E, D, P, R, L, F, O) { + super(); + this.r = e; + this.s = t; + this.t = s; + this.u = n; + this.w = r; + this.y = o; + this.z = a; + this.C = l; + this.F = c; + this.G = u; + this.H = d; + this.I = h; + this.J = g; + this.L = p; + this.M = b; + this.N = v; + this.O = y; + this.P = w; + this.Q = C; + this.R = S; + this.S = x; + this.U = k; + this.W = E; + this.X = D; + this.Y = P; + this.Z = R; + this.$ = L; + this.ab = F; + this.bb = O; + this.a = []; + this.j = this.D(new ki()); + this.m = new Set(); + this.b = ONn.bindTo(this.P); + this.g = uUo.bindTo(this.P); + this.g.set(false); + if (this.I["editSessions.store"]?.url) { + this.q = new pUo(V.parse(this.I["editSessions.store"].url), this.I, this.Z, this.F, this.G, this.s, this.S); + this.r.storeClient = this.q; + this.n = new v_i(this.$.defaultProfile, undefined, this.q, this.F, this.s, this.G, this.w, this.J, this.S, this.ab, this.bb, this.r); + this.cb(); + this.gb(); + this.fb(); + this.rb(); + this.D(this.s.registerProvider(ZAt.SCHEMA, new ZAt(this.r))); + this.R.onWillShutdown(U => { + if (U.reason !== 3 && this.r.isSignedIn && this.J.getValue("workbench.experimental.cloudChanges.autoStore") === "onShutdown" && !tn) { + U.join(this.eb(), { + id: "autoStoreWorkingChanges", + label: f(6294, null) + }); + } + }); + this.D(this.r.onDidSignIn(() => this.db())); + this.D(this.r.onDidSignOut(() => this.db())); + } + } + async cb() { + const e = this.J.getValue("workbench.cloudChanges.autoResume") === "onReload"; + if (this.G.editSessionId !== undefined) { + this.F.info(`Resuming cloud changes, reason: found editSessionId ${this.G.editSessionId} in environment service...`); + await this.t.withProgress(tde, async t => await this.resumeEditSession(this.G.editSessionId, undefined, undefined, undefined, t).finally(() => this.G.editSessionId = undefined)); + } else if (e && this.r.isSignedIn) { + this.F.info("Resuming cloud changes, reason: cloud changes enabled..."); + await this.t.withProgress(tde, async t => await this.resumeEditSession(undefined, true, undefined, undefined, t)); + } else if (e) { + const t = this.S.getBoolean(_Te.h, -1, false); + this.F.info(`Prompting to enable cloud changes, has application previously launched from Continue On flow: ${t}`); + const s = () => { + this.F.info("Showing badge to enable cloud changes in accounts menu..."); + this.db(); + this.g.set(true); + const n = this.r.onDidSignIn(async () => { + n.dispose(); + this.F.info("Showing badge to enable cloud changes in accounts menu succeeded, resuming cloud changes..."); + await this.t.withProgress(tde, async r => await this.resumeEditSession(undefined, true, undefined, undefined, r)); + this.S.remove(_Te.h, -1); + this.G.continueOn = undefined; + }); + }; + if (this.G.continueOn !== undefined && !this.r.isSignedIn && t === false) { + this.S.store(_Te.h, true, -1, 1); + this.F.info("Prompting to enable cloud changes..."); + await this.r.initialize("read"); + if (this.r.isSignedIn) { + this.F.info("Prompting to enable cloud changes succeeded, resuming cloud changes..."); + await this.t.withProgress(tde, async n => await this.resumeEditSession(undefined, true, undefined, undefined, n)); + } else { + s(); + } + } else if (!this.r.isSignedIn && t === true) { + s(); + } + } else { + this.F.debug("Auto resuming cloud changes disabled."); + } + } + db() { + if (this.r.isSignedIn) { + return this.j.clear(); + } + const e = new py(1, () => f(6295, null)); + this.j.value = this.U.showAccountsActivity({ + badge: e + }); + } + async eb() { + const e = new Xi(); + await this.t.withProgress({ + location: 10, + type: "syncing", + title: f(6296, null) + }, async () => this.storeEditSession(false, e.token), () => { + e.cancel(); + e.dispose(); + }); + } + fb() { + const e = Pe.as(ur.ViewContainersRegistry).registerViewContainer({ + id: $Nn, + title: OTe, + ctorDescriptor: new Os(rp, [$Nn, { + mergeViewWithContainerWhenSingleView: true + }]), + icon: dUo, + hideIfEmpty: true + }, 0, { + doNotRegisterOpenCommand: true + }); + this.D(this.H.createInstance(g_i, e)); + } + gb() { + this.jb(); + this.kb(); + this.lb(); + this.tb(); + this.ib(); + this.hb(); + } + hb() { + this.D(J(class extends se { + constructor() { + super(BNn); + } + run(t, ...s) { + t.get(MC).showChannel(u_i); + } + })); + } + ib() { + const e = this; + this.D(J(class extends se { + constructor() { + super({ + id: "workbench.editSessions.actions.showEditSessions", + title: W(6341, "Show Cloud Changes"), + category: OQ, + f1: true + }); + } + async run(s) { + e.b.set(true); + await s.get(zs).openView(FNn); + } + })); + } + jb() { + const e = this; + this.D(J(class extends se { + constructor() { + super(e$t); + } + async run(s, n, r) { + let o = n; + if (!r && !o && (r = await e.ub(), !r)) { + e.w.publicLog2("continueOn.editSessions.pick.outcome", { + outcome: "noSelection" + }); + return; + } + const a = await e.qb(); + let l; + if (a) { + e.w.publicLog2("continueOn.editSessions.store"); + const c = new Xi(); + try { + l = await e.t.withProgress({ + location: 15, + cancellable: true, + type: "syncing", + title: f(6297, null) + }, async () => { + const u = await e.storeEditSession(false, c.token); + if (u !== undefined) { + e.w.publicLog2("continueOn.editSessions.store.outcome", { + outcome: "storeSucceeded", + hashedId: c_i(u) + }); + } else { + e.w.publicLog2("continueOn.editSessions.store.outcome", { + outcome: "storeSkipped" + }); + } + return u; + }, () => { + c.cancel(); + c.dispose(); + e.w.publicLog2("continueOn.editSessions.store.outcome", { + outcome: "storeCancelledByUser" + }); + }); + } catch (u) { + e.w.publicLog2("continueOn.editSessions.store.outcome", { + outcome: "storeFailed" + }); + throw u; + } + } + o = r ? await e.vb(r) : o; + if (o !== undefined) { + if (l !== undefined && o !== "noDestinationUri") { + const c = encodeURIComponent(l); + o = o.with({ + query: o.query.length > 0 ? `${o.query}&${UNn}=${c}&continueOn=1` : `${UNn}=${c}&continueOn=1` + }); + e.F.info(`Opening ${o.toString()}`); + await e.u.open(o, { + openExternal: true + }); + } else if (!a && o !== "noDestinationUri") { + e.F.info(`Opening ${o.toString()}`); + await e.u.open(o, { + openExternal: true + }); + } else if (l === undefined && a) { + e.F.warn(`Failed to store working changes when invoking ${e$t.id}.`); + } + } + } + })); + } + kb() { + const e = this; + this.D(J(class extends se { + constructor() { + super({ + id: "workbench.editSessions.actions.resumeLatest", + title: W(6342, "Resume Latest Changes from Cloud"), + category: OQ, + f1: true + }); + } + async run(s, n, r) { + await e.t.withProgress({ + ...tde, + title: y_i + }, async () => await e.resumeEditSession(n, undefined, r)); + } + })); + this.D(J(class extends se { + constructor() { + super({ + id: "workbench.editSessions.actions.resumeFromSerializedPayload", + title: W(6343, "Resume Changes from Serialized Data"), + category: "Developer", + f1: true + }); + } + async run(s, n) { + const r = await e.N.input({ + prompt: "Enter serialized data" + }); + if (r) { + e.r.lastReadResources.set("editSessions", { + content: r, + ref: "" + }); + } + await e.t.withProgress({ + ...tde, + title: y_i + }, async () => await e.resumeEditSession(n, undefined, undefined, undefined, undefined, r)); + } + })); + } + lb() { + const e = this; + this.D(J(class extends se { + constructor() { + super({ + id: "workbench.editSessions.actions.storeCurrent", + title: W(6344, "Store Working Changes in Cloud"), + category: OQ, + f1: true + }); + } + async run(s) { + const n = new Xi(); + await e.t.withProgress({ + location: 15, + title: f(6298, null) + }, async () => { + e.w.publicLog2("editSessions.store"); + await e.storeEditSession(true, n.token); + }, () => { + n.cancel(); + n.dispose(); + }); + } + })); + } + async resumeEditSession(e, t, s, n, r, o) { + await this.X.getEnvironment(); + if (this.L.getWorkbenchState() === 1 || (this.F.info(e !== undefined ? `Resuming changes from cloud with ref ${e}...` : "Checking for pending cloud changes..."), t && !(await this.r.initialize("read", true)))) { + return; + } + this.w.publicLog2("editSessions.resume"); + performance.mark("code/willResumeEditSessionFromIdentifier"); + r?.report({ + message: f(6299, null) + }); + const a = o ? { + content: o, + ref: "" + } : await this.r.read("editSessions", e); + if (!a) { + if (e === undefined && !t) { + this.z.info(f(6300, null)); + } else if (e !== undefined) { + this.z.warn(f(6301, null, e)); + } + this.F.info(e !== undefined ? `Aborting resuming changes from cloud as no edit session content is available to be applied from ref ${e}.` : "Aborting resuming edit session as no edit session content is available to be applied"); + return; + } + r?.report({ + message: y_i + }); + const l = JSON.parse(a.content); + e = a.ref; + if (l.version > lUo) { + this.z.error(f(6302, null, this.I.nameLong)); + this.w.publicLog2("editSessions.resume.outcome", { + hashedId: c_i(e), + outcome: "clientUpdateNeeded" + }); + return; + } + try { + const { + changes: c, + conflictingChanges: u + } = await this.mb(l, e, s, n); + if (c.length === 0) { + return; + } + if (u.length > 0) { + const { + confirmed: d + } = await this.C.confirm({ + type: es.Warning, + message: u.length > 1 ? f(6303, null, u.length) : f(6304, null, ji(u[0].uri)), + detail: u.length > 1 ? nR(u.map(h => h.uri)) : undefined + }); + if (!d) { + return; + } + } + for (const { + uri: d, + type: h, + contents: g + } of c) { + if (h === rB.Addition) { + await this.s.writeFile(d, _Nn(l.version, g)); + } else if (h === rB.Deletion && (await this.s.exists(d))) { + await this.s.del(d); + } + } + await this.n?.apply(false, {}); + this.F.info(`Deleting edit session with ref ${e} after successfully applying it to current workspace...`); + await this.r.delete("editSessions", e); + this.F.info(`Deleted edit session with ref ${e}.`); + this.w.publicLog2("editSessions.resume.outcome", { + hashedId: c_i(e), + outcome: "resumeSucceeded" + }); + } catch (c) { + this.F.error("Failed to resume edit session, reason: ", c.toString()); + this.z.error(f(6305, null)); + } + performance.mark("code/didResumeEditSessionFromIdentifier"); + } + async mb(e, t, s = false, n = false) { + const r = []; + const o = []; + const a = this.L.getWorkspace().folders; + const l = new Xi(); + for (const c of e.folders) { + let u; + if (c.canonicalIdentity) { + for (const h of a) { + const g = await this.M.getEditSessionIdentifier(h, l.token); + this.F.info(`Matching identity ${g} against edit session folder identity ${c.canonicalIdentity}...`); + if (Ul(g, c.canonicalIdentity) || s) { + u = h; + break; + } + if (g !== undefined) { + const p = await this.M.provideEditSessionIdentityMatch(h, g, c.canonicalIdentity, l.token); + if (p === rke.Complete) { + u = h; + break; + } else if (p === rke.Partial && this.J.getValue("workbench.experimental.cloudChanges.partialMatches.enabled") === true) { + if (!n) { + this.z.prompt(es.Info, f(6306, null), [{ + label: f(6307, null), + run: () => this.resumeEditSession(t, false, undefined, true) + }]); + } else { + u = h; + break; + } + } + } + } + } else { + u = a.find(h => h.name === c.name); + } + if (!u) { + this.F.info(`Skipping applying ${c.workingChanges.length} changes from edit session with ref ${t} as no matching workspace folder was found.`); + return { + changes: [], + conflictingChanges: [], + contributedStateHandlers: [] + }; + } + const d = new Set(); + for (const h of this.y.repositories) { + if (h.provider.rootUri !== undefined && this.L.getWorkspaceFolder(h.provider.rootUri)?.name === c.name) { + this.ob(h).forEach(p => d.add(p.toString())); + } + } + for (const h of c.workingChanges) { + const g = Li(u.uri, h.relativeFilePath); + r.push({ + uri: g, + type: h.type, + contents: h.contents + }); + if (await this.nb(d, g, h)) { + o.push({ + uri: g, + type: h.type, + contents: h.contents + }); + } + } + } + return { + changes: r, + conflictingChanges: o + }; + } + async nb(e, t, s) { + if (!e.has(t.toString())) { + return false; + } + const { + contents: n, + type: r + } = s; + switch (r) { + case rB.Addition: + { + const [o, a] = await Promise.all([Mfe(n), Mfe(ET((await this.s.readFile(t)).value))]); + return o !== a; + } + case rB.Deletion: + return await this.s.exists(t); + default: + throw new Error("Unhandled change type."); + } + } + async storeEditSession(e, t) { + const s = []; + let n = 0; + let r = false; + await this.W.saveAll(); + for (const a of this.y.repositories) { + const l = this.ob(a); + const c = []; + const { + rootUri: u + } = a.provider; + const d = u ? this.L.getWorkspaceFolder(u) : undefined; + let h = d?.name; + for (const p of l) { + const b = this.L.getWorkspaceFolder(p); + if (!b) { + this.F.info(`Skipping working change ${p.toString()} as no associated workspace folder was found.`); + continue; + } + await this.M.onWillCreateEditSessionIdentity(b, t); + h = h ?? b.name; + const v = fb(b.uri, p) ?? p.path; + try { + if (!(await this.s.stat(p)).isFile) { + continue; + } + } catch {} + r = true; + if (await this.s.exists(p)) { + const y = ET((await this.s.readFile(p)).value); + n += y.length; + if (n > this.r.SIZE_LIMIT) { + this.z.error(f(6308, null)); + return; + } + c.push({ + type: rB.Addition, + fileType: XAt.File, + contents: y, + relativeFilePath: v + }); + } else { + c.push({ + type: rB.Deletion, + fileType: XAt.File, + contents: undefined, + relativeFilePath: v + }); + } + } + let g; + if (d != null) { + g = await this.M.getEditSessionIdentifier(d, t); + } + s.push({ + workingChanges: c, + name: h ?? "", + canonicalIdentity: g ?? undefined, + absoluteUri: d?.uri.toString() + }); + } + await this.n?.sync(null, {}); + if (!r) { + this.F.info("Skipped storing working changes in the cloud as there are no edits to store."); + if (e) { + this.z.info(f(6309, null)); + } + return; + } + const o = { + folders: s, + version: 2, + workspaceStateId: this.r.lastWrittenResources.get("workspaceState")?.ref + }; + try { + this.F.info("Storing edit session..."); + const a = await this.r.write("editSessions", o); + this.F.info(`Stored edit session with ref ${a}.`); + return a; + } catch (a) { + this.F.error("Failed to store edit session, reason: ", a.toString()); + if (a instanceof Pm) { + switch (a.code) { + case "TooLarge": + this.w.publicLog2("editSessions.upload.failed", { + reason: "TooLarge" + }); + this.z.error(f(6310, null)); + break; + default: + this.w.publicLog2("editSessions.upload.failed", { + reason: "unknown" + }); + this.z.error(f(6311, null)); + break; + } + } + } + } + ob(e) { + return e.provider.groups.reduce((t, s) => { + s.resources.forEach(n => t.add(n.sourceUri)); + return t; + }, new Set()); + } + pb() { + for (const e of this.y.repositories) { + if (this.ob(e).size > 0) { + return true; + } + } + return false; + } + async qb() { + if (this.r.isSignedIn) { + return this.pb(); + } + if (this.J.getValue(mUo) === "off") { + this.w.publicLog2("continueOn.editSessions.canStore.outcome", { + outcome: "disabledEditSessionsViaSetting" + }); + return false; + } + if (this.pb()) { + const e = new Q(); + const t = e.add(this.N.createQuickPick()); + t.placeholder = f(6312, null); + t.ok = false; + t.ignoreFocusOut = true; + const s = { + label: f(6313, null) + }; + const n = { + label: f(6314, null) + }; + t.items = [s, n]; + const r = await new Promise((a, l) => { + e.add(t.onDidAccept(() => { + a(t.selectedItems[0] === s); + e.dispose(); + })); + e.add(t.onDidHide(() => { + l(new fl()); + e.dispose(); + })); + t.show(); + }); + if (!r) { + this.w.publicLog2("continueOn.editSessions.canStore.outcome", { + outcome: "didNotEnableEditSessionsWhenPrompted" + }); + return r; + } + const o = await this.r.initialize("write"); + if (!o) { + this.w.publicLog2("continueOn.editSessions.canStore.outcome", { + outcome: "didNotEnableEditSessionsWhenPrompted" + }); + } + return o; + } + return false; + } + rb() { + vUo.setHandler(e => { + const t = []; + for (const s of e) { + if (mS(s.description, "contribEditSessions") && Array.isArray(s.value)) { + for (const n of s.value) { + const r = Be.getCommand(n.command); + if (!r) { + return; + } + const o = r.icon; + const a = typeof r.title == "string" ? r.title : r.title.value; + const l = T.deserialize(n.when); + t.push(new C_i(le.isThemeIcon(o) ? `$(${o.id}) ${a}` : a, r.id, r.source?.title, l, n.documentation)); + if (n.qualifiedName) { + this.sb(r.id, n.qualifiedName, n.category ?? r.category, l, n.remoteGroup); + } + } + } + } + this.a = t; + }); + } + sb(e, t, s, n, r) { + const o = { + id: `${e$t.id}.${e}`, + title: { + original: t, + value: t + }, + category: typeof s == "string" ? { + original: s, + value: s + } : s, + precondition: n, + f1: true + }; + if (!this.m.has(o.id)) { + this.m.add(o.id); + this.D(J(class extends se { + constructor() { + super(o); + } + async run(l) { + return l.get(gt).executeCommand(e$t.id, undefined, e); + } + })); + if (r !== undefined) { + Be.appendMenuItem(_.StatusBarRemoteIndicatorMenu, { + group: r, + command: o, + when: o.precondition + }); + } + } + } + tb() { + const e = this; + this.D(J(class extends se { + constructor() { + super(t$t); + } + async run(s) { + const n = await e.Q.showOpenDialog({ + title: f(6315, null), + canSelectFolders: true, + canSelectMany: false, + canSelectFiles: false, + availableFileSystems: [me.file] + }); + if (n?.length !== 1) { + return undefined; + } else { + return V.from({ + scheme: e.I.urlProtocol, + authority: me.file, + path: n[0].path + }); + } + } + })); + if (kU(this.L.getWorkspace()) !== undefined && sc) { + this.sb(t$t.id, f(6316, null), undefined, t$t.precondition, undefined); + } + } + async ub() { + const e = new Q(); + const t = e.add(this.N.createQuickPick({ + useSeparators: true + })); + const s = this.L.getWorkbenchState() === 2 ? this.L.getWorkspace().folders[0].name : this.L.getWorkspace().folders.map(r => r.name).join(", "); + t.placeholder = f(6317, null, `'${s}'`); + t.items = this.wb(); + this.Y.onDidChangeExtensions(() => { + t.items = this.wb(); + }); + const n = await new Promise((r, o) => { + e.add(t.onDidHide(() => { + e.dispose(); + r(undefined); + })); + e.add(t.onDidAccept(a => { + const l = t.activeItems[0].command; + if (l === BTe.id) { + this.O.executeCommand(BTe.id); + } else { + r(l); + t.hide(); + } + })); + t.show(); + e.add(t.onDidTriggerItemButton(async a => { + if (a.item.documentation !== undefined) { + const l = V.isUri(a.item.documentation) ? V.parse(a.item.documentation) : await this.O.executeCommand(a.item.documentation); + this.u.open(l, { + openExternal: true + }); + } + })); + }); + t.dispose(); + return n; + } + async vb(e) { + try { + const t = await this.O.executeCommand(e); + if (t === undefined) { + this.w.publicLog2("continueOn.openDestination.outcome", { + selection: e, + outcome: "noDestinationUri" + }); + return "noDestinationUri"; + } + if (V.isUri(t)) { + this.w.publicLog2("continueOn.openDestination.outcome", { + selection: e, + outcome: "resolvedUri" + }); + return t; + } + this.w.publicLog2("continueOn.openDestination.outcome", { + selection: e, + outcome: "invalidDestination" + }); + return; + } catch (t) { + if (t instanceof fl) { + this.w.publicLog2("continueOn.openDestination.outcome", { + selection: e, + outcome: "cancelled" + }); + } else { + this.w.publicLog2("continueOn.openDestination.outcome", { + selection: e, + outcome: "unknownError" + }); + } + return; + } + } + wb() { + const e = [...this.a].filter(s => s.when === undefined || this.P.contextMatchesRules(s.when)); + if (kU(this.L.getWorkspace()) !== undefined && sc) { + e.push(new C_i("$(folder) " + f(6318, null), t$t.id, f(6319, null))); + } + return e.sort((s, n) => s.label.localeCompare(n.label)).concat({ + type: "separator" + }, new C_i(BTe.title, BTe.id)); + } +}; +w_i = _Te = __decorate([__param(0, _Q), __param(1, Ct), __param(2, ra), __param(3, os), __param(4, Ot), __param(5, Km), __param(6, ni), __param(7, Js), __param(8, a_i), __param(9, pa), __param(10, re), __param(11, ys), __param(12, ve), __param(13, kt), __param(14, nke), __param(15, zi), __param(16, gt), __param(17, Ne), __param(18, Xl), __param(19, Yo), __param(20, ht), __param(21, cm), __param(22, Te), __param(23, al), __param(24, Ks), __param(25, IS), __param(26, Ml), __param(27, _s), __param(28, m_i)], w_i); +var bUo = le.asClassName(A.info); +var C_i = class { + constructor(i, e, t, s, n) { + this.label = i; + this.command = e; + this.description = t; + this.when = s; + this.documentation = n; + if (n !== undefined) { + this.buttons = [{ + iconClass: bUo, + tooltip: f(6320, null) + }]; + } + } +}; +var vUo = su.registerExtensionPoint({ + extensionPoint: "continueEditSession", + jsonSchema: { + description: f(6321, null), + type: "array", + items: { + type: "object", + properties: { + command: { + description: f(6322, null), + type: "string" + }, + group: { + description: f(6323, null), + type: "string" + }, + qualifiedName: { + description: f(6324, null), + type: "string" + }, + description: { + description: f(6325, null), + type: "string" + }, + remoteGroup: { + description: f(6326, null), + type: "string" + }, + when: { + description: f(6327, null), + type: "string" + } + }, + required: ["command"] + } + } +}); +var yUo = Pe.as(Er.Workbench); +yUo.registerWorkbenchContribution(w_i, 3); +Pe.as(rr.Configuration).registerConfiguration({ + ...Qx, + properties: { + "workbench.experimental.cloudChanges.autoStore": { + enum: ["onShutdown", "off"], + enumDescriptions: [f(6328, null), f(6329, null)], + type: "string", + tags: ["experimental", "usesOnlineServices"], + default: "off", + markdownDescription: f(6330, null) + }, + "workbench.cloudChanges.autoResume": { + enum: ["onReload", "off"], + enumDescriptions: [f(6331, null), f(6332, null)], + type: "string", + tags: ["usesOnlineServices"], + default: "onReload", + markdownDescription: f(6333, null) + }, + "workbench.cloudChanges.continueOn": { + enum: ["prompt", "off"], + enumDescriptions: [f(6334, null), f(6335, null)], + type: "string", + tags: ["usesOnlineServices"], + default: "prompt", + markdownDescription: f(6336, null) + }, + "workbench.experimental.cloudChanges.partialMatches.enabled": { + type: "boolean", + tags: ["experimental", "usesOnlineServices"], + default: false, + markdownDescription: f(6337, null) + } + } +}); +Qr(); +Ht(); +pe(); +Mx(); +q(); +Tr(); +X(); +Qr(); +Fi(); +Ht(); +var wUo = i => ({ + type: "string", + enum: ["always", "explicit", "never", true, false], + enumDescriptions: [f(5169, null), f(5170, null), f(5171, null), f(5172, null), f(5173, null)], + default: "explicit", + description: i +}); +var CUo = i => ({ + type: ["string", "boolean"], + enum: ["explicit", "never", true, false], + enumDescriptions: [f(5174, null), f(5175, null), f(5176, null), f(5177, null)], + default: "explicit", + description: i +}); +var S_i = { + oneOf: [{ + type: "object", + additionalProperties: { + type: "string" + } + }, { + type: "array", + items: { + type: "string" + } + }], + markdownDescription: f(5178, null, "`#files.autoSave#`"), + type: ["object", "array"], + additionalProperties: { + type: "string", + enum: ["always", "explicit", "never", true, false] + }, + default: {}, + scope: 5 +}; +var WNn = Object.freeze({ + ...IA, + properties: { + "editor.codeActionsOnSave": S_i + } +}); +var x_i = { + oneOf: [{ + type: "object", + additionalProperties: { + type: "string" + } + }, { + type: "array", + items: { + type: "string" + } + }], + markdownDescription: f(5179, null, "`#files.autoSave#`"), + type: "object", + additionalProperties: { + type: ["string", "boolean"], + enum: ["explicit", "never", true, false] + }, + default: {} +}; +var SUo = Object.freeze({ + ...IA, + properties: { + "notebook.codeActionsOnSave": x_i + } +}); +var k_i = class extends H { + constructor(e, t) { + super(); + this.c = t; + this.a = this.D(new B()); + this.b = []; + this.D(de.runAndSubscribe(de.debounce(t.codeActionProvider.onDidChange, () => {}, 1000), () => { + this.b = this.f(); + this.g(this.b); + this.a.fire(); + })); + e.registerSchemaContribution({ + getSchemaAdditions: () => this.h(), + onDidChange: this.a.event + }); + } + f() { + const e = new Map(); + for (const t of this.c.codeActionProvider.allNoModel()) { + for (const s of t.providedCodeActionKinds ?? []) { + e.set(s, new _c(s)); + } + } + return Array.from(e.values()); + } + g(e) { + const t = { + ...S_i.properties + }; + const s = { + ...x_i.properties + }; + for (const n of e) { + if (Tl.Source.contains(n) && !t[n.value]) { + t[n.value] = wUo(f(5180, null, n.value)); + s[n.value] = CUo(f(5181, null, n.value)); + } + } + S_i.properties = t; + x_i.properties = s; + Pe.as(rr.Configuration).notifyConfigurationSchemaUpdated(WNn); + } + h() { + const e = (s, n) => ({ + if: { + required: ["command"], + properties: { + command: { + const: s + } + } + }, + then: { + properties: { + args: { + required: ["kind"], + properties: { + kind: { + anyOf: [{ + enum: Array.from(n) + }, { + type: "string" + }] + } + } + } + } + } + }); + const t = s => { + const n = new Set(); + for (const r of this.b) { + if (s.contains(r)) { + n.add(r.value); + } + } + return Array.from(n); + }; + return [e(tQt, t(_c.Empty)), e(sQt, t(Tl.Refactor)), e(nQt, t(Tl.Source))]; + } +}; +k_i = __decorate([__param(0, oi), __param(1, nn)], k_i); +Pe.as(rr.Configuration).registerConfiguration(WNn); +Pe.as(rr.Configuration).registerConfiguration(SUo); +Pe.as(Er.Workbench).registerWorkbenchContribution(k_i, 4); +X(); +jo(); +It(); +Ht(); +Qn(); +pe(); +q(); +Zt(); +lo(); +Me(); +Ee(); +var E_i = new fe("timelineHasProvider", false); +var I_i = class extends H { + constructor(e, t, s, n) { + super(); + this.n = e; + this.q = t; + this.r = s; + this.s = n; + this.c = this.D(new B()); + this.onDidChangeProviders = this.c.event; + this.f = this.D(new B()); + this.onDidChangeTimeline = this.f.event; + this.g = this.D(new B()); + this.onDidChangeUri = this.g.event; + this.j = new Map(); + this.m = this.D(new Bo()); + this.h = E_i.bindTo(this.s); + this.t(); + } + getSources() { + return [...this.j.values()].map(e => ({ + id: e.id, + label: e.label + })); + } + getTimeline(e, t, s, n) { + this.n.trace(`TimelineService#getTimeline(${e}): uri=${t.toString()}`); + const r = this.j.get(e); + if (r !== undefined) { + if (typeof r.scheme == "string") { + if (r.scheme !== "*" && r.scheme !== t.scheme) { + return; + } + } else if (!r.scheme.includes(t.scheme)) { + return; + } + return { + result: r.provideTimeline(t, s, n.token).then(o => { + if (o !== undefined) { + o.items = o.items.map(a => ({ + ...a, + source: r.id + })); + o.items.sort((a, l) => l.timestamp - a.timestamp || l.source.localeCompare(a.source, undefined, { + numeric: true, + sensitivity: "base" + })); + return o; + } + }), + options: s, + source: r.id, + tokenSource: n, + uri: t + }; + } + } + registerTimelineProvider(e) { + this.n.trace(`TimelineService#registerTimelineProvider: id=${e.id}`); + const t = e.id; + const s = this.j.get(t); + if (s) { + try { + s?.dispose(); + } catch {} + } + this.j.set(t, e); + this.t(); + if (e.onDidChange) { + this.m.set(t, e.onDidChange(n => this.f.fire(n))); + } + this.c.fire({ + added: [t] + }); + return { + dispose: () => { + this.j.delete(t); + this.c.fire({ + removed: [t] + }); + } + }; + } + unregisterTimelineProvider(e) { + this.n.trace(`TimelineService#unregisterTimelineProvider: id=${e}`); + if (this.j.has(e)) { + this.j.delete(e); + this.m.deleteAndDispose(e); + this.t(); + this.c.fire({ + removed: [e] + }); + } + } + setUri(e) { + this.q.openView(ghn, true); + this.g.fire(e); + } + t() { + this.h.set(this.j.size !== 0); + } +}; +I_i = __decorate([__param(0, Bt), __param(1, zs), __param(2, ve), __param(3, Ne)], I_i); +X(); +xe(); +wb(); +Fs(); +ri(); +Wv(); +au(); +pe(); +Pc(); +sa(); +q(); +At(); +jn(); +$i(); +Le(); +Fi(); +ks(); +Ee(); +Me(); +te(); +vt(); +Nn(); +Wt(); +gi(); +Rt(); +Qn(); +so(); +gs(); +sl(); +Je(); +ai(); +zh(); +vp(); +He(); +Br(); +zt(); +qy(); +Un(); +rn(); +qt(); +var VNn = 22; +function i$t(i) { + return i instanceof D_i; +} +function UTe(i) { + return !!i && !i.handle.startsWith("vscode-command:"); +} +function HNn(i, e) { + i.relativeTime = UTe(i) ? ym(i.timestamp) : undefined; + i.relativeTimeFullWord = UTe(i) ? ym(i.timestamp, false, true) : undefined; + if (e === undefined || i.relativeTime !== e) { + e = i.relativeTime; + i.hideRelativeTime = false; + } else { + i.hideRelativeTime = true; + } + return e; +} +var xUo = class { + constructor(i) { + this.d = false; + this.f = false; + this.source = i.source; + this.items = i.items; + this.c = i.paging?.cursor; + this.lastRenderedIndex = -1; + } + get cursor() { + return this.c; + } + get more() { + return this.c !== undefined; + } + get newest() { + return this.items[0]; + } + get oldest() { + return this.items[this.items.length - 1]; + } + add(i, e) { + let t = false; + if (i.items.length !== 0 && this.items.length !== 0) { + t = true; + const s = new Set(); + const n = new Set(); + for (const a of i.items) { + if (a.id === undefined) { + n.add(a.timestamp); + } else { + s.add(a.id); + } + } + let r = this.items.length; + let o; + while (r--) { + o = this.items[r]; + if (o.id !== undefined && s.has(o.id) || n.has(o.timestamp)) { + this.items.splice(r, 1); + } + } + if ((i.items[i.items.length - 1]?.timestamp ?? 0) >= (this.newest?.timestamp ?? 0)) { + this.items.splice(0, 0, ...i.items); + } else { + this.items.push(...i.items); + } + } else if (i.items.length !== 0) { + t = true; + this.items.push(...i.items); + } + if (e.cursor !== undefined || typeof e.limit != "object") { + this.c = i.paging?.cursor; + } + if (t) { + this.items.sort((s, n) => n.timestamp - s.timestamp || (s.source === undefined ? n.source === undefined ? 0 : 1 : n.source === undefined ? -1 : n.source.localeCompare(s.source, undefined, { + numeric: true, + sensitivity: "base" + }))); + } + return t; + } + get stale() { + return this.d; + } + get requiresReset() { + return this.f; + } + invalidate(i) { + this.d = true; + this.f = i; + } +}; +var D_i = class { + constructor(i) { + this.handle = "vscode-command:loadMore"; + this.timestamp = 0; + this.description = undefined; + this.tooltip = undefined; + this.contextValue = undefined; + this.id = undefined; + this.icon = undefined; + this.iconDark = undefined; + this.source = undefined; + this.relativeTime = undefined; + this.relativeTimeFullWord = undefined; + this.hideRelativeTime = undefined; + this.c = false; + this.c = i; + } + get loading() { + return this.c; + } + set loading(i) { + this.c = i; + } + get ariaLabel() { + return this.label; + } + get label() { + if (this.loading) { + return f(11501, null); + } else { + return f(11502, null); + } + } + get themeIcon() {} +}; +var T_i = new fe("timelineFollowActiveEditor", true, true); +var kUo = new fe("timelineExcludeSources", "[]", true); +var EUo = new fe("timelineFocused", true); +var WTe = class extends Md { + static { + this.TITLE = W(11516, "Timeline"); + } + constructor(e, t, s, n, r, o, a, l, c, u, d, h, g, p, b, v, y, w, C) { + super({ + ...e, + titleMenuId: _.TimelineTitle + }, t, s, r, n, a, l, g, p, b, v); + this.ec = o; + this.fc = c; + this.gc = u; + this.hc = d; + this.ic = h; + this.jc = y; + this.kc = w; + this.lc = C; + this.ab = new Map(); + this.sb = new Map(); + this.mc = true; + this.Ac = true; + this.Bc = 0; + this.Cc = 0; + this.Ic = false; + this.m = this.D(this.Eb.createInstance(R_i, this)); + this.r = T_i.bindTo(this.Cb); + this.t = kUo.bindTo(this.Cb); + const S = o.get("timeline.excludeSources", 0, "[]"); + this.t.set(S); + this.L = new Set(JSON.parse(S)); + this.D(o.onDidChangeValue(0, "timeline.excludeSources", this.B)(this.pc, this)); + this.D(r.onDidChangeConfiguration(this.qc, this)); + this.D(h.onDidChangeProviders(this.sc, this)); + this.D(h.onDidChangeTimeline(this.tc, this)); + this.D(h.onDidChangeUri(x => this.setUri(x), this)); + } + get followActiveEditor() { + return this.mc; + } + set followActiveEditor(e) { + if (this.mc !== e) { + this.mc = e; + this.r.set(e); + this.updateFilename(this.uc); + if (e) { + this.rc(); + } + } + } + get pageOnScroll() { + if (this.nc === undefined) { + this.nc = this.Bb.getValue("timeline.pageOnScroll") ?? false; + } + return this.nc; + } + get pageSize() { + let e = this.Bb.getValue("timeline.pageSize"); + if (e == null) { + e = Math.max(20, Math.floor((this.h?.renderHeight ?? 0 / VNn) + (this.pageOnScroll ? 1 : -1))); + } + return e; + } + reset() { + this.Fc(true); + } + setUri(e) { + this.oc(e, true); + } + oc(e, t) { + if (t) { + this.followActiveEditor = false; + } + this.bc = e; + this.updateFilename(e ? this.jc.getUriBasenameLabel(e) : undefined); + this.j?.setUri(e); + this.Fc(true); + } + pc() { + const e = this.ec.get("timeline.excludeSources", 0, "[]"); + this.t.set(e); + this.L = new Set(JSON.parse(e)); + const t = this.ic.getSources().filter(({ + id: s + }) => !this.L.has(s) && !this.sb.has(s)); + if (t.length !== 0) { + this.Fc(true, t.map(({ + id: s + }) => s)); + } else { + this.Lc(); + } + } + qc(e) { + if (e.affectsConfiguration("timeline.pageOnScroll")) { + this.nc = undefined; + } + } + rc() { + if (!this.followActiveEditor || !this.isExpanded()) { + return; + } + const e = vo.getOriginalUri(this.fc.activeEditor, { + supportSideBySide: fo.PRIMARY + }); + if (this.kc.extUri.isEqual(e, this.bc) && e !== undefined || e?.fsPath === this.bc?.fsPath && (e?.scheme === me.file || e?.scheme === "git") && (this.bc?.scheme === me.file || this.bc?.scheme === "git")) { + for (const t of this.ic.getSources()) { + if (this.L.has(t.id)) { + continue; + } + const s = this.sb.get(t.id); + if (s === undefined || !!s.stale) { + if (s !== undefined) { + this.Hc(s, s.requiresReset); + } else { + this.Gc(t.id, e, true); + } + } + } + return; + } + this.oc(e, false); + } + sc(e) { + if (e.removed) { + for (const t of e.removed) { + this.sb.delete(t); + } + this.Lc(); + } + if (e.added) { + this.Fc(true, e.added); + } + } + tc(e) { + if (e?.uri === undefined || this.kc.extUri.isEqual(V.revive(e.uri), this.bc)) { + const t = this.sb.get(e.id); + if (t === undefined) { + return; + } + if (this.isBodyVisible()) { + this.Hc(t, e.reset); + } else { + t.invalidate(e.reset); + } + } + } + updateFilename(e) { + this.uc = e; + if (this.followActiveEditor || !e) { + this.Vb(e); + } else { + this.Vb(`${e} (pinned)`); + } + } + get message() { + return this.vc; + } + set message(e) { + this.vc = e; + this.wc(); + } + wc() { + if (this.vc !== undefined) { + this.xc(this.vc); + } else { + this.yc(); + } + } + xc(e) { + if (this.f) { + this.f.classList.remove("hide"); + this.zc(); + this.f.textContent = e; + } + } + yc() { + this.zc(); + this.f.classList.add("hide"); + } + zc() { + Lr(this.f); + } + get Dc() { + return this.Cc > 0; + } + Ec(e) { + this.Cc = 0; + this.Bc = this.pageSize; + this.sb.clear(); + if (e) { + for (const t of this.ab.values()) { + t.request.tokenSource.cancel(); + t.dispose(); + } + this.ab.clear(); + if (!this.isBodyVisible() && this.h) { + this.h.setChildren(null, undefined); + this.Ac = true; + } + } + } + async Fc(e, t) { + if (t === undefined) { + if (e) { + this.Ec(true); + } + if (this.bc?.scheme === me.vscodeSettings || this.bc?.scheme === me.webviewPanel || this.bc?.scheme === me.walkThrough || this.bc?.scheme === me.aiSettings) { + this.bc = undefined; + this.Ec(false); + this.Lc(); + return; + } + if (this.Ac && this.bc !== undefined) { + this.setLoadingUriMessage(); + } + } + if (this.bc === undefined) { + this.Ec(false); + this.Lc(); + return; + } + if (!this.isBodyVisible()) { + return; + } + let s = false; + for (const n of t ?? this.ic.getSources().map(r => r.id)) { + if (this.Gc(n, this.bc, e)) { + s = true; + } + } + if (s) { + if (this.Ac) { + this.setLoadingUriMessage(); + } + } else { + this.Lc(); + } + } + Gc(e, t, s, n) { + if (this.L.has(e)) { + return false; + } + const r = this.sb.get(e); + if (!s && n?.cursor !== undefined && r !== undefined && (!r?.more || r.items.length > r.lastRenderedIndex + this.pageSize)) { + return false; + } + if (n === undefined) { + if (!s && r !== undefined && r.items.length > 0 && !r.more) { + return false; + } + n = { + cursor: s ? undefined : r?.cursor, + limit: this.pageSize + }; + } + const o = this.ab.get(e); + if (o !== undefined) { + n.cursor = o.request.options.cursor; + if (typeof n.limit == "number") { + if (typeof o.request.options.limit == "number") { + n.limit += o.request.options.limit; + } else { + n.limit = o.request.options.limit; + } + } + } + o?.request?.tokenSource.cancel(); + o?.dispose(); + n.cacheResults = true; + n.resetCache = s; + const a = new Xi(); + const l = this.ic.getTimeline(e, t, n, a); + if (l === undefined) { + a.dispose(); + return false; + } + const c = new Q(); + this.ab.set(e, { + request: l, + dispose: () => c.dispose() + }); + c.add(a); + c.add(a.token.onCancellationRequested(() => this.ab.delete(e))); + this.Jc(l); + return true; + } + Hc(e, t) { + if (t) { + this.sb.delete(e.source); + const { + oldest: s + } = e; + this.Gc(e.source, this.bc, true, s !== undefined ? { + limit: { + timestamp: s.timestamp, + id: s.id + } + } : undefined); + } else { + const { + newest: s + } = e; + this.Gc(e.source, this.bc, false, s !== undefined ? { + limit: { + timestamp: s.timestamp, + id: s.id + } + } : { + limit: this.pageSize + }); + } + } + async Jc(e) { + let t; + try { + t = await this.hc.withProgress({ + location: this.id + }, () => e.result); + } finally { + this.ab.get(e.source)?.dispose(); + this.ab.delete(e.source); + } + if (t === undefined || e.tokenSource.token.isCancellationRequested || e.uri !== this.bc) { + if (this.ab.size === 0 && this.Ic) { + this.Lc(); + } + return; + } + const s = e.source; + let n = false; + const r = this.sb.get(s); + if (r === undefined) { + this.sb.set(s, new xUo(t)); + n = true; + } else { + n = r.add(t, e.options); + } + if (n) { + this.Ic = true; + if (this.Dc && this.ab.size !== 0) { + this.Mc(); + } else { + this.Lc(); + } + } else if (this.ab.size === 0) { + if (this.Ic) { + this.Lc(); + } else { + this.h.rerender(); + } + } + } + *Kc() { + let e = false; + if (this.bc === undefined || this.sb.size === 0) { + this.Cc = 0; + return; + } + const t = this.Bc; + let s = 0; + if (this.sb.size === 1) { + const [r, o] = Ws.first(this.sb); + o.lastRenderedIndex = -1; + if (this.L.has(r)) { + this.Cc = 0; + return; + } + if (o.items.length !== 0) { + this.Cc = 1; + } + e = o.more; + let a; + for (const l of o.items) { + l.relativeTime = undefined; + l.hideRelativeTime = undefined; + s++; + if (s > t) { + e = true; + break; + } + a = HNn(l, a); + yield { + element: l + }; + } + o.lastRenderedIndex = s - 1; + } else { + let r = function () { + return o.filter(d => !d.nextItem.done).reduce((d, h) => d === undefined || h.nextItem.value.timestamp >= d.nextItem.value.timestamp ? h : d, undefined); + }; + var n = r; + const o = []; + let a = false; + let l = 0; + for (const [d, h] of this.sb) { + h.lastRenderedIndex = -1; + if (this.L.has(d) || h.stale) { + continue; + } + if (h.items.length !== 0) { + a = true; + } + if (h.more) { + e = true; + const p = h.items[Math.min(t, h.items.length - 1)]; + if (p.timestamp > l) { + l = p.timestamp; + } + } + const g = h.items[Symbol.iterator](); + o.push({ + timeline: h, + iterator: g, + nextItem: g.next() + }); + } + this.Cc = a ? 1 : 0; + let c; + let u; + while (u = r()) { + u.timeline.lastRenderedIndex++; + const d = u.nextItem.value; + d.relativeTime = undefined; + d.hideRelativeTime = undefined; + if (d.timestamp >= l) { + s++; + if (s > t) { + e = true; + break; + } + c = HNn(d, c); + yield { + element: d + }; + } + u.nextItem = u.iterator.next(); + } + } + this.Cc = s; + if (s > 0) { + if (e) { + yield { + element: new D_i(this.ab.size !== 0) + }; + } else if (this.ab.size !== 0) { + yield { + element: new D_i(true) + }; + } + } + } + Lc() { + if (this.isBodyVisible()) { + this.h.setChildren(null, this.Kc()); + this.Ac = !this.Dc; + if (this.bc === undefined) { + this.updateFilename(undefined); + this.message = f(11503, null); + } else if (this.Ac) { + if (this.ab.size !== 0) { + this.setLoadingUriMessage(); + } else { + this.updateFilename(this.jc.getUriBasenameLabel(this.bc)); + const e = this.Cb.getContextKeyValue("scm.providerCount"); + if (this.ic.getSources().filter(({ + id: t + }) => !this.L.has(t)).length === 0) { + this.message = f(11504, null); + } else if (this.Bb.getValue("workbench.localHistory.enabled") && !this.L.has("timeline.localHistory")) { + this.message = f(11505, null); + } else if (this.L.size > 0) { + this.message = f(11506, null); + } else { + this.message = f(11507, null); + } + if (!e || e === 0) { + this.message += " " + f(11508, null); + } + } + } else { + this.updateFilename(this.jc.getUriBasenameLabel(this.bc)); + this.message = undefined; + } + this.Ic = false; + } + } + Mc() { + this.Lc(); + } + focus() { + super.focus(); + this.h.domFocus(); + } + setExpanded(e) { + const t = super.setExpanded(e); + if (t && this.isBodyVisible()) { + if (this.followActiveEditor) { + this.rc(); + } else { + this.oc(this.bc, true); + } + } + return t; + } + setVisible(e) { + if (e) { + this.lc.activateByEvent("onView:timeline"); + this.n = new Q(); + this.fc.onDidActiveEditorChange(this.rc, this, this.n); + this.onDidFocus(() => this.Mc(), this, this.n); + super.setVisible(e); + this.rc(); + } else { + this.n?.dispose(); + super.setVisible(e); + } + } + X(e, t) { + super.X(e, t); + this.h.layout(e, t); + } + Rb(e) { + super.Rb(e, this.title); + e.classList.add("timeline-view"); + } + W(e) { + super.W(e); + this.c = e; + e.classList.add("tree-explorer-viewlet-tree-view", "timeline-tree-view"); + this.f = z(this.c, G(".message")); + this.f.classList.add("timeline-subtle"); + this.message = f(11509, null); + this.g = document.createElement("div"); + this.g.classList.add("customview-tree", "file-icon-themable-tree", "hide-arrows"); + e.appendChild(this.g); + this.j = this.Eb.createInstance(L_i, this.m); + this.D(this.j.onDidScrollToEnd(t => { + if (this.pageOnScroll) { + this.Qc(t); + } + })); + this.h = this.Eb.createInstance(DO, "TimelinePane", this.g, new TUo(), [this.j], { + identityProvider: new IUo(), + accessibilityProvider: { + getAriaLabel(t) { + if (i$t(t)) { + return t.ariaLabel; + } else if (t.accessibilityInformation) { + return t.accessibilityInformation.label; + } else { + return f(11510, null, t.relativeTimeFullWord ?? "", t.label); + } + }, + getRole(t) { + if (i$t(t)) { + return "treeitem"; + } else if (t.accessibilityInformation && t.accessibilityInformation.role) { + return t.accessibilityInformation.role; + } else { + return "treeitem"; + } + }, + getWidgetAriaLabel() { + return f(11511, null); + } + }, + keyboardNavigationLabelProvider: new DUo(), + multipleSelectionSupport: false, + overrideStyles: this.$b().listOverrideStyles + }); + EUo.bindTo(this.h.contextKeyService); + this.D(this.h.onContextMenu(t => this.Rc(this.m, t))); + this.D(this.h.onDidChangeSelection(t => this.ensureValidItems())); + this.D(this.h.onDidOpen(t => { + if (!t.browserEvent || !this.ensureValidItems()) { + return; + } + const s = this.h.getSelection(); + let n; + if (s.length === 1) { + n = s[0]; + } + if (n !== null) { + if (UTe(n)) { + if (n.command) { + let r = n.command.arguments ?? []; + if (n.command.id === OE || n.command.id === sN) { + r = [...r, t]; + } + this.gc.executeCommand(n.command.id, ...r); + } + } else if (i$t(n)) { + this.Qc(n); + } + } + })); + } + Qc(e) { + if (!e.loading) { + e.loading = true; + this.h.rerender(e); + if (this.ab.size === 0) { + this.Bc = this.Cc + this.pageSize; + this.Fc(false); + } + } + } + ensureValidItems() { + if (!this.Dc || !this.ic.getSources().some(({ + id: e + }) => !this.L.has(e) && this.sb.has(e))) { + this.h.setChildren(null, undefined); + this.Ac = true; + this.setLoadingUriMessage(); + return false; + } else { + return true; + } + } + setLoadingUriMessage() { + const e = this.bc && this.jc.getUriBasenameLabel(this.bc); + this.updateFilename(e); + this.message = e ? f(11512, null, e) : ""; + } + Rc(e, t) { + const s = t.element; + if (s === null) { + return; + } + const n = t.browserEvent; + n.preventDefault(); + n.stopPropagation(); + if (!this.ensureValidItems()) { + return; + } + this.h.setFocus([s]); + const r = e.getItemContextActions(s); + if (r.length) { + this.Ab.showContextMenu({ + getAnchor: () => t.anchor, + getActions: () => r, + getActionViewItem: o => { + const a = this.zb.lookupKeybinding(o.id); + if (a) { + return new $f(o, o, { + label: true, + keybinding: a.getLabel() + }); + } + }, + onHide: o => { + if (o) { + this.h.domFocus(); + } + }, + getActionsContext: () => ({ + uri: this.bc, + item: s + }), + actionRunner: new qNn() + }); + } + } +}; +__decorate([mb(500)], WTe.prototype, "Mc", null); +WTe = __decorate([__param(1, oi), __param(2, ts), __param(3, Ne), __param(4, ve), __param(5, ht), __param(6, Ur), __param(7, re), __param(8, Te), __param(9, gt), __param(10, ra), __param(11, vle), __param(12, os), __param(13, ti), __param(14, Ot), __param(15, Ns), __param(16, Zs), __param(17, _s), __param(18, Ks)], WTe); +var P_i = class { + static { + this.id = "TimelineElementTemplate"; + } + constructor(i, e, t) { + i.classList.add("custom-view-tree-node-item"); + this.icon = z(i, G(".custom-view-tree-node-item-icon")); + this.iconLabel = new xS(i, { + supportHighlights: true, + supportIcons: true, + hoverDelegate: t + }); + const s = z(this.iconLabel.element, G(".timeline-timestamp-container")); + this.timestamp = z(s, G("span.timeline-timestamp")); + const n = z(this.iconLabel.element, G(".actions")); + this.actionBar = new ea(n, { + actionViewItemProvider: e + }); + } + dispose() { + this.iconLabel.dispose(); + this.actionBar.dispose(); + } + reset() { + this.icon.className = ""; + this.icon.style.backgroundImage = ""; + this.actionBar.clear(); + } +}; +var IUo = class { + getId(i) { + return i.handle; + } +}; +var qNn = class extends ff { + async q(i, { + uri: e, + item: t + }) { + if (!UTe(t)) { + await i.run(); + return; + } + await i.run({ + $mid: 12, + handle: t.handle, + source: t.source, + uri: e + }, e, t.source); + } +}; +var DUo = class { + getKeyboardNavigationLabel(i) { + return i.label; + } +}; +var TUo = class { + getHeight(i) { + return VNn; + } + getTemplateId(i) { + return P_i.id; + } +}; +var L_i = class { + constructor(e, t, s) { + this.g = e; + this.h = t; + this.j = s; + this.c = new B(); + this.onDidScrollToEnd = this.c.event; + this.templateId = P_i.id; + this.f = Ig.bind(undefined, this.h); + this.d = this.h.createInstance(DR, "element", false, { + position: { + hoverPosition: 1 + } + }); + } + setUri(e) { + this.k = e; + } + renderTemplate(e) { + return new P_i(e, this.f, this.d); + } + renderElement(e, t, s, n) { + s.reset(); + const { + element: r + } = e; + const o = this.j.getColorTheme(); + const a = o.type === il.LIGHT ? r.icon : r.iconDark; + const l = a ? V.revive(a) : null; + if (l) { + s.icon.className = "custom-view-tree-node-item-icon"; + s.icon.style.backgroundImage = Ih(l); + s.icon.style.color = ""; + } else if (r.themeIcon) { + s.icon.className = `custom-view-tree-node-item-icon ${le.asClassName(r.themeIcon)}`; + if (r.themeIcon.color) { + s.icon.style.color = o.getColor(r.themeIcon.color.id)?.toString() ?? ""; + } else { + s.icon.style.color = ""; + } + s.icon.style.backgroundImage = ""; + } else { + s.icon.className = "custom-view-tree-node-item-icon"; + s.icon.style.backgroundImage = ""; + s.icon.style.color = ""; + } + const c = r.tooltip ? yi(r.tooltip) ? r.tooltip : { + markdown: r.tooltip, + markdownNotSupportedFallback: Iz(r.tooltip) + } : undefined; + s.iconLabel.setLabel(r.label, r.description, { + title: c, + matches: sf(e.filterData) + }); + s.timestamp.textContent = r.relativeTime ?? ""; + s.timestamp.ariaLabel = r.relativeTimeFullWord ?? ""; + s.timestamp.parentElement.classList.toggle("timeline-timestamp--duplicate", UTe(r) && r.hideRelativeTime); + s.actionBar.context = { + uri: this.k, + item: r + }; + s.actionBar.actionRunner = new qNn(); + s.actionBar.push(this.g.getItemActions(r), { + icon: true, + label: false + }); + if (i$t(r)) { + setTimeout(() => this.c.fire(r), 0); + } + } + disposeElement(e, t, s, n) { + s.actionBar.actionRunner.dispose(); + } + disposeTemplate(e) { + e.dispose(); + } +}; +L_i = __decorate([__param(1, re), __param(2, ti)], L_i); +var PUo = dt("timeline-refresh", A.refresh, f(11513, null)); +var LUo = dt("timeline-pin", A.pin, f(11514, null)); +var RUo = dt("timeline-unpin", A.pinned, f(11515, null)); +var R_i = class extends H { + constructor(e, t, s, n, r) { + super(); + this.f = e; + this.g = t; + this.h = s; + this.j = n; + this.m = r; + this.D(this.c = new Q()); + this.D(J(class extends se { + constructor() { + super({ + id: "timeline.refresh", + title: W(11517, "Refresh"), + icon: PUo, + category: W(11518, "Timeline"), + menu: { + id: _.TimelineTitle, + group: "navigation", + order: 99 + } + }); + } + run(o, ...a) { + e.reset(); + } + })); + this.D(ei.registerCommand("timeline.toggleFollowActiveEditor", (o, ...a) => e.followActiveEditor = !e.followActiveEditor)); + this.D(Be.appendMenuItem(_.TimelineTitle, { + command: { + id: "timeline.toggleFollowActiveEditor", + title: W(11519, "Pin the Current Timeline"), + icon: LUo, + category: W(11520, "Timeline") + }, + group: "navigation", + order: 98, + when: T_i + })); + this.D(Be.appendMenuItem(_.TimelineTitle, { + command: { + id: "timeline.toggleFollowActiveEditor", + title: W(11521, "Unpin the Current Timeline"), + icon: RUo, + category: W(11522, "Timeline") + }, + group: "navigation", + order: 98, + when: T_i.toNegated() + })); + this.D(t.onDidChangeProviders(() => this.q())); + this.q(); + } + getItemActions(e) { + return this.n(_.TimelineItemContext, { + key: "timelineItem", + value: e.contextValue + }).primary; + } + getItemContextActions(e) { + return this.n(_.TimelineItemContext, { + key: "timelineItem", + value: e.contextValue + }).secondary; + } + n(e, t) { + const s = this.j.createOverlay([["view", this.f.id], [t.key, t.value]]); + const n = this.m.getMenuActions(e, s, { + shouldForwardArgs: true + }); + return SE(n, "inline"); + } + q() { + this.c.clear(); + const e = new Set(JSON.parse(this.h.get("timeline.excludeSources", 0, "[]"))); + for (const t of this.g.getSources()) { + this.c.add(J(class extends se { + constructor() { + super({ + id: `timeline.toggleExcludeSource:${t.id}`, + title: t.label, + menu: { + id: _.TimelineFilterSubMenu, + group: "navigation" + }, + toggled: T.regex("timelineExcludeSources", new RegExp(`\\b${zg(t.id)}\\b`)).negate() + }); + } + run(s, ...n) { + if (e.has(t.id)) { + e.delete(t.id); + } else { + e.add(t.id); + } + s.get(ht).store("timeline.excludeSources", JSON.stringify([...e.keys()]), 0, 0); + } + })); + } + } +}; +R_i = __decorate([__param(1, vle), __param(2, ht), __param(3, Ne), __param(4, Hn)], R_i); +Qr(); +Ee(); +Je(); +Wt(); +He(); +Br(); +var NUo = dt("timeline-view-icon", A.history, f(11493, null)); +var MUo = dt("timeline-open", A.history, f(11494, null)); +var AUo = class { + constructor() { + this.id = ghn; + this.name = WTe.TITLE; + this.containerIcon = NUo; + this.ctorDescriptor = new Os(WTe); + this.order = 2; + this.weight = 30; + this.collapsed = true; + this.canToggleVisibility = true; + this.hideByDefault = false; + this.canMoveView = true; + this.when = E_i; + this.focusCommand = { + id: "timeline.focus" + }; + } +}; +var $Uo = Pe.as(rr.Configuration); +$Uo.registerConfiguration({ + id: "timeline", + order: 1001, + title: f(11495, null), + type: "object", + properties: { + "timeline.pageSize": { + type: ["number", "null"], + default: null, + markdownDescription: f(11496, null) + }, + "timeline.pageOnScroll": { + type: "boolean", + default: false, + description: f(11497, null) + } + } +}); +Pe.as(ur.ViewsRegistry).registerViews([new AUo()], yce); +var ide; +(function (i) { + i.ID = "files.openTimeline"; + i.LABEL = f(11498, null); + function e() { + return (t, s) => t.get(vle).setUri(s); + } + i.handler = e; +})(ide ||= {}); +ei.registerCommand(ide.ID, ide.handler()); +Be.appendMenuItem(_.ExplorerContext, { + group: "4_timeline", + order: 1, + command: { + id: ide.ID, + title: ide.LABEL, + icon: MUo + }, + when: T.and(Ap.toNegated(), La.HasResource, E_i) +}); +var FUo = dt("timeline-filter", A.filter, f(11499, null)); +Be.appendMenuItem(_.TimelineTitle, { + submenu: _.TimelineFilterSubMenu, + title: f(11500, null), + group: "navigation", + order: 100, + icon: FUo +}); +it(vle, I_i, 1); +X(); +Le(); +pe(); +At(); +Yd(); +ri(); +te(); +var cI = Ve("workingCopyHistoryService"); +var s$t = 20; +pe(); +q(); +Le(); +Nt(); +Et(); +nr(); +var oB = class A3 { + static { + this.SCHEMA = "vscode-local-history"; + } + static toLocalHistoryFileSystem(e) { + const t = { + location: e.location.toString(true), + associatedResource: e.associatedResource.toString(true) + }; + return e.associatedResource.with({ + scheme: A3.SCHEMA, + query: JSON.stringify(t) + }); + } + static fromLocalHistoryFileSystem(e) { + const t = JSON.parse(e.query); + return { + location: V.parse(t.location), + associatedResource: V.parse(t.associatedResource) + }; + } + static { + this.a = V.from({ + scheme: A3.SCHEMA, + path: "/empty" + }); + } + static { + this.EMPTY = { + location: A3.a, + associatedResource: A3.a + }; + } + get capabilities() { + return 2050; + } + constructor(e) { + this.b = e; + this.c = new Map(); + this.onDidChangeCapabilities = de.None; + this.onDidChangeFile = de.None; + } + async d(e) { + const t = e.scheme; + let s = this.c.get(t); + if (!s) { + const n = this.b.getProvider(t); + if (n) { + s = Promise.resolve(n); + } else { + s = new Promise(r => { + const o = this.b.onDidChangeFileSystemProviderRegistrations(a => { + if (a.added && a.provider && a.scheme === t) { + o.dispose(); + r(a.provider); + } + }); + }); + } + this.c.set(t, s); + } + return s; + } + async stat(e) { + const t = A3.fromLocalHistoryFileSystem(e).location; + if (Ls(A3.a, t)) { + return { + type: wg.File, + ctime: 0, + mtime: 0, + size: 0 + }; + } else { + return (await this.d(t)).stat(t); + } + } + async readFile(e) { + const t = A3.fromLocalHistoryFileSystem(e).location; + if (Ls(A3.a, t)) { + return Ii.fromString("").buffer; + } + const s = await this.d(t); + if (VT(s)) { + return s.readFile(t); + } + throw new Error("Unsupported"); + } + async writeFile(e, t, s) {} + async mkdir(e) {} + async readdir(e) { + return []; + } + async rename(e, t, s) {} + async delete(e, t) {} + watch(e, t) { + return H.None; + } +}; +Ee(); +Je(); +Et(); +Wt(); +Nn(); +Nt(); +fn(); +vt(); +mn(); +Rn(); +wn(); +jn(); +Jt(); +X(); +He(); +rt(); +Ee(); +Br(); +Wv(); +var N_i = undefined; +function jNn() { + if (!N_i) { + const i = { + year: "numeric", + month: "long", + day: "numeric", + hour: "numeric", + minute: "numeric" + }; + const e = Pee.DateTimeFormat(Uu, i); + N_i = { + format: t => e.format(t) + }; + } + return N_i; +} +var zNn = "localHistory:item"; +var m3 = T.equals("timelineItem", zNn); +var OUo = dt("localHistory-icon", A.circleOutline, f(7774, null)); +var _Uo = dt("localHistory-restore", A.check, f(7775, null)); +ad(); +In(); +q(); +var M_i = W(7796, "Local History"); +var n$t = T.has("config.workbench.localHistory.enabled"); +var JNn = W(7797, "Compare with File"); +J(class extends se { + constructor() { + super({ + id: "workbench.action.localHistory.compareWithFile", + title: JNn, + menu: { + id: _.TimelineItemContext, + group: "1_compare", + order: 1, + when: m3 + } + }); + } + async run(i, e) { + const t = i.get(gt); + const s = i.get(cI); + const { + entry: n + } = await aB(s, e); + if (n) { + return t.executeCommand(sN, ...VTe(n, n.workingCopy.resource)); + } + } +}); +J(class extends se { + constructor() { + super({ + id: "workbench.action.localHistory.compareWithPrevious", + title: W(7798, "Compare with Previous"), + menu: { + id: _.TimelineItemContext, + group: "1_compare", + order: 2, + when: m3 + } + }); + } + async run(i, e) { + const t = i.get(gt); + const s = i.get(cI); + const n = i.get(Te); + const { + entry: r, + previous: o + } = await aB(s, e); + if (r) { + if (o) { + return t.executeCommand(sN, ...VTe(o, r)); + } else { + return $_i(r, n); + } + } + } +}); +var A_i = undefined; +var GNn = new fe("localHistoryItemSelectedForCompare", false, true); +J(class extends se { + constructor() { + super({ + id: "workbench.action.localHistory.selectForCompare", + title: W(7799, "Select for Compare"), + menu: { + id: _.TimelineItemContext, + group: "2_compare_with", + order: 2, + when: m3 + } + }); + } + async run(i, e) { + const t = i.get(cI); + const s = i.get(Ne); + const { + entry: n + } = await aB(t, e); + if (n) { + A_i = e; + GNn.bindTo(s).set(true); + } + } +}); +J(class extends se { + constructor() { + super({ + id: "workbench.action.localHistory.compareWithSelected", + title: W(7800, "Compare with Selected"), + menu: { + id: _.TimelineItemContext, + group: "2_compare_with", + order: 1, + when: T.and(m3, GNn) + } + }); + } + async run(i, e) { + const t = i.get(cI); + const s = i.get(gt); + if (!A_i) { + return; + } + const n = (await aB(t, A_i)).entry; + if (!n) { + return; + } + const { + entry: r + } = await aB(t, e); + if (r) { + return s.executeCommand(sN, ...VTe(n, r)); + } + } +}); +J(class extends se { + constructor() { + super({ + id: "workbench.action.localHistory.open", + title: W(7801, "Show Contents"), + menu: { + id: _.TimelineItemContext, + group: "3_contents", + order: 1, + when: m3 + } + }); + } + async run(i, e) { + const t = i.get(cI); + const s = i.get(Te); + const { + entry: n + } = await aB(t, e); + if (n) { + return $_i(n, s); + } + } +}); +var KNn = W(7802, "Restore Contents"); +J(class extends se { + constructor() { + super({ + id: "workbench.action.localHistory.restoreViaEditor", + title: KNn, + menu: { + id: _.EditorTitle, + group: "navigation", + order: -10, + when: La.Scheme.isEqualTo(oB.SCHEMA) + }, + icon: _Uo + }); + } + async run(i, e) { + const { + associatedResource: t, + location: s + } = oB.fromLocalHistoryFileSystem(e); + return YNn(i, { + uri: t, + handle: gg(s) + }); + } +}); +J(class extends se { + constructor() { + super({ + id: "workbench.action.localHistory.restore", + title: KNn, + menu: { + id: _.TimelineItemContext, + group: "3_contents", + order: 2, + when: m3 + } + }); + } + async run(i, e) { + return YNn(i, e); + } +}); +var BUo = Gy.registerSource("localHistoryRestore.source", f(7776, null)); +async function YNn(i, e) { + const t = i.get(Ct); + const s = i.get(Js); + const n = i.get(Tp); + const r = i.get(cI); + const o = i.get(Te); + const { + entry: a + } = await aB(r, e); + if (a) { + const { + confirmed: l + } = await s.confirm({ + type: "warning", + message: f(7777, null, ji(a.workingCopy.resource)), + detail: f(7778, null), + primaryButton: f(7779, null) + }); + if (!l) { + return; + } + const c = n.getAll(a.workingCopy.resource); + if (c) { + for (const u of c) { + if (u.isDirty()) { + await u.revert({ + soft: true + }); + } + } + } + try { + await t.cloneFile(a.location, a.workingCopy.resource); + } catch (u) { + await s.error(f(7780, null, ji(a.workingCopy.resource)), ou(u)); + return; + } + if (c) { + for (const u of c) { + await u.revert({ + force: true + }); + } + } + await o.openEditor({ + resource: a.workingCopy.resource + }); + await r.addEntry({ + resource: a.workingCopy.resource, + source: BUo + }, mt.None); + await XNn(a, o); + } +} +J(class extends se { + constructor() { + super({ + id: "workbench.action.localHistory.restoreViaPicker", + title: W(7803, "Find Entry to Restore"), + f1: true, + category: M_i, + precondition: n$t + }); + } + async run(i) { + const e = i.get(cI); + const t = i.get(zi); + const s = i.get($s); + const n = i.get(As); + const r = i.get(Zs); + const o = i.get(Te); + const a = i.get(Ct); + const l = i.get(gt); + const c = i.get(Vd); + const u = new Q(); + const d = u.add(t.createQuickPick()); + let h = new Xi(); + u.add(d.onDidHide(() => h.dispose(true))); + d.busy = true; + d.show(); + const g = new Yf(await e.getAll(h.token)); + const p = new Yf(dr(c.getHistory().map(({ + resource: S + }) => S))); + const b = []; + for (const S of p) { + if (g.has(S)) { + b.push(S); + g.delete(S); + } + } + b.push(...[...g].sort((S, x) => S.fsPath < x.fsPath ? -1 : 1)); + d.busy = false; + d.placeholder = f(7781, null); + d.matchOnLabel = true; + d.matchOnDescription = true; + d.items = [...b].map(S => ({ + resource: S, + label: gg(S), + description: r.getUriLabel(Ir(S), { + relative: true + }), + iconClasses: ip(s, n, S) + })); + await de.toPromise(d.onDidAccept); + u.dispose(); + const v = d.selectedItems.at(0)?.resource; + if (!v) { + return; + } + const y = new Q(); + const w = y.add(t.createQuickPick()); + h = new Xi(); + y.add(w.onDidHide(() => h.dispose(true))); + w.busy = true; + w.show(); + const C = await e.getEntries(v, h.token); + w.busy = false; + w.canAcceptInBackground = true; + w.placeholder = f(7782, null); + w.matchOnLabel = true; + w.matchOnDescription = true; + w.items = Array.from(C).reverse().map(S => ({ + entry: S, + label: `$(circle-outline) ${Gy.getSourceLabel(S.source)}`, + description: sde(S.timestamp) + })); + y.add(w.onDidAccept(async S => { + if (!S.inBackground) { + y.dispose(); + } + const x = w.selectedItems.at(0); + if (x) { + if (await a.exists(x.entry.workingCopy.resource)) { + return l.executeCommand(sN, ...VTe(x.entry, x.entry.workingCopy.resource, { + preserveFocus: S.inBackground + })); + } else { + return $_i(x.entry, o, { + preserveFocus: S.inBackground + }); + } + } else { + return undefined; + } + })); + } +}); +Be.appendMenuItem(_.TimelineTitle, { + command: { + id: "workbench.action.localHistory.restoreViaPicker", + title: W(7804, "Local History: Find Entry to Restore...") + }, + group: "submenu", + order: 1, + when: n$t +}); +J(class extends se { + constructor() { + super({ + id: "workbench.action.localHistory.rename", + title: W(7805, "Rename"), + menu: { + id: _.TimelineItemContext, + group: "5_edit", + order: 1, + when: m3 + } + }); + } + async run(i, e) { + const t = i.get(cI); + const s = i.get(zi); + const { + entry: n + } = await aB(t, e); + if (n) { + const r = new Q(); + const o = r.add(s.createInputBox()); + o.title = f(7783, null); + o.ignoreFocusOut = true; + o.placeholder = f(7784, null); + o.value = Gy.getSourceLabel(n.source); + o.show(); + r.add(o.onDidAccept(() => { + if (o.value) { + t.updateEntry(n, { + source: o.value + }, mt.None); + } + r.dispose(); + })); + } + } +}); +J(class extends se { + constructor() { + super({ + id: "workbench.action.localHistory.delete", + title: W(7806, "Delete"), + menu: { + id: _.TimelineItemContext, + group: "5_edit", + order: 2, + when: m3 + } + }); + } + async run(i, e) { + const t = i.get(cI); + const s = i.get(Te); + const n = i.get(Js); + const { + entry: r + } = await aB(t, e); + if (r) { + const { + confirmed: o + } = await n.confirm({ + type: "warning", + message: f(7785, null, r.workingCopy.name, sde(r.timestamp)), + detail: f(7786, null), + primaryButton: f(7787, null) + }); + if (!o) { + return; + } + await t.removeEntry(r, mt.None); + await XNn(r, s); + } + } +}); +J(class extends se { + constructor() { + super({ + id: "workbench.action.localHistory.deleteAll", + title: W(7807, "Delete All"), + f1: true, + category: M_i, + precondition: n$t + }); + } + async run(i) { + const e = i.get(Js); + const t = i.get(cI); + const { + confirmed: s + } = await e.confirm({ + type: "warning", + message: f(7788, null), + detail: f(7789, null), + primaryButton: f(7790, null) + }); + if (s) { + await t.removeAll(mt.None); + } + } +}); +J(class extends se { + constructor() { + super({ + id: "workbench.action.localHistory.create", + title: W(7808, "Create Entry"), + f1: true, + category: M_i, + precondition: T.and(n$t, oc) + }); + } + async run(i) { + const e = i.get(cI); + const t = i.get(zi); + const s = i.get(Te); + const n = i.get(Zs); + const r = i.get(Au); + const o = vo.getOriginalUri(s.activeEditor, { + supportSideBySide: fo.PRIMARY + }); + if (o?.scheme !== r.defaultUriScheme && o?.scheme !== me.vscodeUserData) { + return; + } + const a = new Q(); + const l = a.add(t.createInputBox()); + l.title = f(7791, null); + l.ignoreFocusOut = true; + l.placeholder = f(7792, null, n.getUriBasenameLabel(o)); + l.show(); + a.add(l.onDidAccept(async () => { + const c = l.value; + a.dispose(); + if (c) { + await e.addEntry({ + resource: o, + source: l.value + }, mt.None); + } + })); + } +}); +async function $_i(i, e, t) { + const s = oB.toLocalHistoryFileSystem({ + location: i.location, + associatedResource: i.workingCopy.resource + }); + await e.openEditor({ + resource: s, + label: f(7793, null, i.workingCopy.name, Gy.getSourceLabel(i.source), sde(i.timestamp)), + options: t + }); +} +async function XNn(i, e) { + const t = oB.toLocalHistoryFileSystem({ + location: i.location, + associatedResource: i.workingCopy.resource + }); + const s = e.findEditors(t, { + supportSideBySide: fo.ANY + }); + await e.closeEditors(s, { + preserveFocus: true + }); +} +function VTe(i, e, t) { + const s = oB.toLocalHistoryFileSystem({ + location: i.location, + associatedResource: i.workingCopy.resource + }); + let n; + let r; + if (V.isUri(e)) { + r = e; + n = f(7794, null, i.workingCopy.name, Gy.getSourceLabel(i.source), sde(i.timestamp), i.workingCopy.name); + } else { + const o = e; + r = oB.toLocalHistoryFileSystem({ + location: o.location, + associatedResource: o.workingCopy.resource + }); + n = f(7795, null, i.workingCopy.name, Gy.getSourceLabel(i.source), sde(i.timestamp), o.workingCopy.name, Gy.getSourceLabel(o.source), sde(o.timestamp)); + } + return [s, r, n, t ? [undefined, t] : undefined]; +} +async function aB(i, e) { + const t = await i.getEntries(e.uri, mt.None); + let s; + let n; + for (let r = 0; r < t.length; r++) { + const o = t[r]; + if (o.id === e.handle) { + s = o; + n = t[r - 1]; + break; + } + } + return { + entry: s, + previous: n + }; +} +var UUo = /\//g; +function sde(i) { + return `${jNn().format(i).replace(UUo, "-")}`; +} +X(); +pe(); +q(); +Le(); +ad(); +Nt(); +Rr(); +Nn(); +Me(); +No(); +At(); +ii(); +lD(); +var r$t; +var o$t = class extends H { + static { + r$t = this; + } + static { + this.ID = "workbench.contrib.localHistoryTimeline"; + } + static { + this.a = "workbench.localHistory.enabled"; + } + constructor(e, t, s, n, r, o, a) { + super(); + this.f = e; + this.g = t; + this.h = s; + this.j = n; + this.m = r; + this.n = o; + this.q = a; + this.id = "timeline.localHistory"; + this.label = f(7809, null); + this.scheme = "*"; + this.b = this.D(new B()); + this.onDidChange = this.b.event; + this.c = this.D(new ki()); + this.r(); + this.t(); + } + r() { + this.s(); + this.D(this.j.registerProvider(oB.SCHEMA, new oB(this.j))); + } + s() { + if (this.n.getValue(r$t.a)) { + this.c.value = this.f.registerTimelineProvider(this); + } else { + this.c.clear(); + } + } + t() { + this.D(this.g.onDidAddEntry(e => this.u(e.entry))); + this.D(this.g.onDidChangeEntry(e => this.u(e.entry))); + this.D(this.g.onDidReplaceEntry(e => this.u(e.entry))); + this.D(this.g.onDidRemoveEntry(e => this.u(e.entry))); + this.D(this.g.onDidRemoveEntries(() => this.u(undefined))); + this.D(this.g.onDidMoveEntries(() => this.u(undefined))); + this.D(this.n.onDidChangeConfiguration(e => { + if (e.affectsConfiguration(r$t.a)) { + this.s(); + } + })); + } + u(e) { + this.b.fire({ + id: this.id, + uri: e?.workingCopy.resource, + reset: true + }); + } + async provideTimeline(e, t, s) { + const n = []; + let r; + if (e.scheme === oB.SCHEMA) { + r = oB.fromLocalHistoryFileSystem(e).associatedResource; + } else if (e.scheme === this.h.defaultUriScheme || e.scheme === me.vscodeUserData) { + r = e; + } else if (this.j.hasProvider(e)) { + r = V.from({ + scheme: this.h.defaultUriScheme, + authority: this.m.remoteAuthority ?? Trr(this.q.getWorkspace()), + path: e.path + }); + } + if (r) { + const o = await this.g.getEntries(r, s); + for (const a of o) { + n.push(this.w(a)); + } + } + return { + source: this.id, + items: n + }; + } + w(e) { + return { + handle: e.id, + label: Gy.getSourceLabel(e.source), + tooltip: new hs(`$(history) ${jNn().format(e.timestamp)} + +${Gy.getSourceLabel(e.source)}${e.sourceDescription ? ` (${e.sourceDescription})` : ""}`, { + supportThemeIcons: true + }), + source: this.id, + timestamp: e.timestamp, + themeIcon: OUo, + contextValue: zNn, + command: { + id: sN, + title: JNn.value, + arguments: VTe(e, e.workingCopy.resource) + } + }; + } +}; +o$t = r$t = __decorate([__param(0, vle), __param(1, cI), __param(2, Au), __param(3, Ct), __param(4, Wn), __param(5, ve), __param(6, kt)], o$t); +Yn(o$t.ID, o$t, 2); +jo(); +q(); +X(); +Je(); +Qr(); +fn(); +te(); +Wi(); +Ht(); +He(); +vt(); +Ee(); +Wt(); +bh(); +xe(); +sl(); +Wd(); +Kg(); +Fs(); +He(); +au(); +pe(); +Yp(); +q(); +At(); +Le(); +X(); +Qr(); +ks(); +fn(); +te(); +jn(); +Ht(); +lD(); +qt(); +ai(); +Qs(); +ii(); +gi(); +Rt(); +Un(); +kd(); +pn(); +zb(); +_a(); +kn(); +Br(); +ya(); +rt(); +Fi(); +Et(); +var F_i; +var O_i; +var __i; +var B_i; +var QNn = dt("workspace-trust-banner", A.shield, f(12282, null)); +var WUo = dt("workspace-trust-editor-check", A.check, f(12283, null)); +var VUo = dt("workspace-trust-editor-cross", A.x, f(12284, null)); +var HUo = dt("workspace-trust-editor-folder-picker", A.folder, f(12285, null)); +var qUo = dt("workspace-trust-editor-edit-folder", A.edit, f(12286, null)); +var jUo = dt("workspace-trust-editor-remove-folder", A.close, f(12287, null)); +var U_i = class extends H { + constructor(e, t, s, n, r, o, a) { + super(); + this.n = e; + this.q = t; + this.r = s; + this.t = n; + this.w = r; + this.y = o; + this.z = a; + this.c = this.D(new B()); + this.onDidAcceptEdit = this.c.event; + this.f = this.D(new B()); + this.onDidRejectEdit = this.f.event; + this.g = this.D(new B()); + this.onEdit = this.g.event; + this.h = this.D(new B()); + this.onDelete = this.h.event; + this.m = e.appendChild(G(".workspace-trusted-folders-description")); + const l = e.appendChild(G(".trusted-uris-table")); + const c = e.appendChild(G(".trusted-uris-button-bar")); + this.j = this.q.createInstance(zU, "WorkspaceTrust", l, new W_i(), [{ + label: f(12288, null), + tooltip: "", + weight: 1, + templateId: u$t.TEMPLATE_ID, + project(h) { + return h; + } + }, { + label: f(12289, null), + tooltip: "", + weight: 8, + templateId: l$t.TEMPLATE_ID, + project(h) { + return h; + } + }, { + label: "", + tooltip: "", + weight: 1, + minimumWidth: 75, + maximumWidth: 75, + templateId: a$t.TEMPLATE_ID, + project(h) { + return h; + } + }], [this.q.createInstance(u$t), this.q.createInstance(l$t, this), this.q.createInstance(a$t, this, this.G)], { + horizontalScrolling: false, + alwaysConsumeMouseWheel: false, + openOnSingleClick: false, + multipleSelectionSupport: false, + accessibilityProvider: { + getAriaLabel: h => { + const g = c$t(this.y, h); + if (g === undefined || g.length === 0) { + return f(12290, null, this.y.getUriLabel(h.uri)); + } else { + return f(12291, null, this.y.getUriLabel(h.uri), g); + } + }, + getWidgetAriaLabel: () => f(12292, null) + }, + identityProvider: { + getId(h) { + return h.uri.toString(); + } + } + }); + this.D(this.j.onDidOpen(h => { + if (h && h.element && !h.browserEvent?.defaultPrevented) { + this.edit(h.element, true); + } + })); + const u = this.D(new G4(c)); + const d = this.D(u.addButton({ + title: f(12293, null), + ...yd + })); + d.label = f(12294, null); + this.D(d.onDidClick(async () => { + const h = await this.z.showOpenDialog({ + canSelectFiles: false, + canSelectFolders: true, + canSelectMany: false, + defaultUri: this.G, + openLabel: f(12295, null), + title: f(12296, null) + }); + if (h) { + this.t.setUrisTrust(h, true); + } + })); + this.D(this.t.onDidChangeTrustedFolders(() => { + this.updateTable(); + })); + } + C(e) { + const t = this.H.indexOf(e); + if (t === -1) { + for (let s = 0; s < this.H.length; s++) { + if (this.H[s].uri === e.uri) { + return s; + } + } + } + return t; + } + F(e, t = true) { + const s = this.C(e); + if (s !== -1) { + if (t) { + this.j.domFocus(); + this.j.setFocus([s]); + } + this.j.setSelection([s]); + } + } + get G() { + return this.r.getWorkspace().folders[0]?.uri || V.file("/"); + } + get H() { + const e = this.r.getWorkspace(); + const t = e.folders.map(r => r.uri); + if (e.configuration) { + t.push(e.configuration); + } + return this.t.getTrustedUris().map(r => { + let o = false; + for (const a of t) { + o = o || this.w.extUri.isEqualOrParent(a, r); + } + return { + uri: r, + parentOfWorkspaceItem: o + }; + }).sort((r, o) => { + if (r.uri.scheme !== o.uri.scheme) { + if (r.uri.scheme === me.file) { + return -1; + } + if (o.uri.scheme === me.file) { + return 1; + } + } + const a = r.uri.path.endsWith(".code-workspace"); + const l = o.uri.path.endsWith(".code-workspace"); + if (a !== l) { + if (a) { + return 1; + } + if (l) { + return -1; + } + } + return r.uri.fsPath.localeCompare(o.uri.fsPath); + }); + } + layout() { + this.j.layout(this.H.length * W_i.ROW_HEIGHT + W_i.HEADER_ROW_HEIGHT, undefined); + } + updateTable() { + const e = this.H; + this.n.classList.toggle("empty", e.length === 0); + this.m.innerText = e.length ? f(12297, null) : f(12298, null); + this.j.splice(0, Number.POSITIVE_INFINITY, this.H); + this.layout(); + } + validateUri(e, t) { + if (!t) { + return null; + } + if (t.uri.scheme === "vscode-vfs") { + const s = e.split(ao.sep).filter(n => n.length); + if (s.length === 0 && e.startsWith(ao.sep)) { + return { + type: 2, + content: f(12299, null, c$t(this.y, t)) + }; + } + if (s.length === 1) { + return { + type: 2, + content: f(12300, null, s[0], c$t(this.y, t)) + }; + } + if (s.length > 2) { + return { + type: 3, + content: f(12301, null, e) + }; + } + } + return null; + } + acceptEdit(e, t) { + const s = this.t.getTrustedUris(); + const n = s.findIndex(r => this.w.extUri.isEqual(r, e.uri)); + if (n >= s.length || n === -1) { + s.push(t); + } else { + s[n] = t; + } + this.t.setTrustedUris(s); + this.c.fire(e); + } + rejectEdit(e) { + this.f.fire(e); + } + async delete(e) { + this.j.focusNext(); + await this.t.setUrisTrust([e.uri], false); + if (this.j.getFocus().length === 0) { + this.j.focusLast(); + } + this.h.fire(e); + this.j.domFocus(); + } + async edit(e, t) { + if ((e.uri.scheme === me.file || e.uri.scheme === this.G.scheme && this.w.extUri.isEqualAuthority(this.G.authority, e.uri.authority) && !swe(e.uri)) && t) { + const n = await this.z.showOpenDialog({ + canSelectFiles: false, + canSelectFolders: true, + canSelectMany: false, + defaultUri: e.uri, + openLabel: f(12302, null), + title: f(12303, null) + }); + if (n) { + this.acceptEdit(e, n[0]); + } else { + this.rejectEdit(e); + } + } else { + this.F(e); + this.g.fire(e); + } + } +}; +U_i = __decorate([__param(1, re), __param(2, kt), __param(3, qf), __param(4, _s), __param(5, Zs), __param(6, Xl)], U_i); +var W_i = class Z7i { + constructor() { + this.headerRowHeight = Z7i.HEADER_ROW_HEIGHT; + } + static { + this.HEADER_ROW_HEIGHT = 30; + } + static { + this.ROW_HEIGHT = 24; + } + getHeight(e) { + return Z7i.ROW_HEIGHT; + } +}; +var a$t = class { + static { + F_i = this; + } + static { + this.TEMPLATE_ID = "actions"; + } + constructor(e, t, s) { + this.c = e; + this.d = t; + this.f = s; + this.templateId = F_i.TEMPLATE_ID; + } + renderTemplate(e) { + const t = e.appendChild(G(".actions")); + return { + actionBar: new ea(t) + }; + } + renderElement(e, t, s, n) { + s.actionBar.clear(); + const r = e.uri.scheme === me.file || e.uri.scheme === this.d.scheme && this.f.extUri.isEqualAuthority(this.d.authority, e.uri.authority) && !swe(e.uri); + const o = []; + if (r) { + o.push(this.h(e)); + } + o.push(this.g(e)); + o.push(this.j(e)); + s.actionBar.push(o, { + icon: true + }); + } + g(e) { + return { + label: "", + class: le.asClassName(qUo), + enabled: true, + id: "editTrustedUri", + tooltip: f(12304, null), + run: () => { + this.c.edit(e, false); + } + }; + } + h(e) { + return { + label: "", + class: le.asClassName(HUo), + enabled: true, + id: "pickerTrustedUri", + tooltip: f(12305, null), + run: () => { + this.c.edit(e, true); + } + }; + } + j(e) { + return { + label: "", + class: le.asClassName(jUo), + enabled: true, + id: "deleteTrustedUri", + tooltip: f(12306, null), + run: async () => { + await this.c.delete(e); + } + }; + } + disposeTemplate(e) { + e.actionBar.dispose(); + } +}; +a$t = F_i = __decorate([__param(2, _s)], a$t); +var l$t = class { + static { + O_i = this; + } + static { + this.TEMPLATE_ID = "path"; + } + constructor(e, t) { + this.d = e; + this.f = t; + this.templateId = O_i.TEMPLATE_ID; + } + renderTemplate(e) { + const t = e.appendChild(G(".path")); + const s = t.appendChild(G("div.path-label")); + const n = new tw(t, this.f, { + validationOptions: { + validation: a => this.d.validateUri(a, this.c) + }, + inputBoxStyles: Kp + }); + const r = new Q(); + const o = r.add(new Q()); + return { + element: t, + pathLabel: s, + pathInput: n, + disposables: r, + renderDisposables: o + }; + } + renderElement(e, t, s, n) { + s.renderDisposables.clear(); + this.c = e; + s.renderDisposables.add(this.d.onEdit(async c => { + if (e === c) { + s.element.classList.add("input-mode"); + s.pathInput.focus(); + s.pathInput.select(); + s.element.parentElement.style.paddingLeft = "0px"; + } + })); + s.renderDisposables.add(Ce(s.pathInput.element, Oe.DBLCLICK, c => { + yn.stop(c); + })); + const r = () => { + s.element.classList.remove("input-mode"); + s.element.parentElement.style.paddingLeft = "5px"; + }; + const o = () => { + r(); + const c = s.pathInput.value; + const u = ufe(c) ? e.uri.with({ + path: ao.sep + qZ(c) + }) : e.uri.with({ + path: c + }); + s.pathLabel.innerText = this.g(u); + if (u) { + this.d.acceptEdit(e, u); + } + }; + const a = () => { + r(); + s.pathInput.value = l; + this.d.rejectEdit(e); + }; + s.renderDisposables.add(ko(s.pathInput.inputElement, Oe.KEY_DOWN, c => { + let u = false; + if (c.equals(3)) { + o(); + u = true; + } else if (c.equals(9)) { + a(); + u = true; + } + if (u) { + c.preventDefault(); + c.stopPropagation(); + } + })); + s.renderDisposables.add(Ce(s.pathInput.inputElement, Oe.BLUR, () => { + a(); + })); + const l = this.g(e.uri); + s.pathInput.value = l; + s.pathLabel.innerText = l; + s.element.classList.toggle("current-workspace-parent", e.parentOfWorkspaceItem); + } + disposeTemplate(e) { + e.disposables.dispose(); + e.renderDisposables.dispose(); + } + g(e) { + if (e.scheme === me.file) { + return f1(e.fsPath); + } + if (e.path.startsWith(ao.sep)) { + const t = e.path.substring(1); + if (ufe(t, true)) { + return f1(Sh.normalize(t), true); + } + } + return e.path; + } +}; +l$t = O_i = __decorate([__param(1, Sc)], l$t); +function c$t(i, e) { + if (e.uri.authority) { + return i.getHostLabel(e.uri.scheme, e.uri.authority); + } else { + return f(12307, null); + } +} +var u$t = class { + static { + __i = this; + } + static { + this.TEMPLATE_ID = "host"; + } + constructor(e) { + this.c = e; + this.templateId = __i.TEMPLATE_ID; + } + renderTemplate(e) { + const t = new Q(); + const s = t.add(new Q()); + const n = e.appendChild(G(".host")); + const r = n.appendChild(G("div.host-label")); + const o = n.appendChild(G("div.button-bar")); + return { + element: n, + hostContainer: r, + buttonBarContainer: o, + disposables: t, + renderDisposables: s + }; + } + renderElement(e, t, s, n) { + s.renderDisposables.clear(); + s.renderDisposables.add({ + dispose: () => { + Lr(s.buttonBarContainer); + } + }); + s.hostContainer.innerText = c$t(this.c, e); + s.element.classList.toggle("current-workspace-parent", e.parentOfWorkspaceItem); + s.hostContainer.style.display = ""; + s.buttonBarContainer.style.display = "none"; + } + disposeTemplate(e) { + e.disposables.dispose(); + } +}; +u$t = __i = __decorate([__param(0, Zs)], u$t); +var HTe = class extends $p { + static { + B_i = this; + } + static { + this.ID = "workbench.editor.workspaceTrust"; + } + constructor(e, t, s, n, r, o, a, l, c, u, d, h, g) { + super(B_i.ID, e, t, s, n); + this.ib = r; + this.jb = o; + this.kb = a; + this.lb = l; + this.mb = c; + this.nb = u; + this.ob = d; + this.pb = h; + this.qb = g; + this.xb = false; + this.yb = this.D(new Q()); + this.Lb = []; + } + Y(e) { + this.c = z(e, G(".workspace-trust-editor", { + tabindex: "0" + })); + this.Bb(this.c); + const t = G(".workspace-trust-editor-body"); + this.cb = this.D(new _w(t, { + horizontal: 2, + vertical: 1 + })); + z(this.c, this.cb.getDomNode()); + this.Db(t); + this.Cb(t); + this.c.style.setProperty("--workspace-trust-selected-color", Ui(PI)); + this.c.style.setProperty("--workspace-trust-unselected-color", Ui(ite)); + this.c.style.setProperty("--workspace-trust-check-color", Ui(ETt)); + this.c.style.setProperty("--workspace-trust-x-color", Ui(DI)); + this.D(Ce(this.c, Oe.KEY_DOWN, s => { + const n = new wr(s); + if (n.equals(16) || n.equals(18)) { + const r = [this.f, this.eb, this.fb, this.gb]; + let a = r.findIndex(l => pg(l)); + if (n.equals(18)) { + a++; + } else if (n.equals(16)) { + a = Math.max(0, a); + a--; + } + a += r.length; + a %= r.length; + r[a].focus(); + } else if (n.equals(9)) { + this.c.focus(); + } else if (n.equals(2051)) { + if (this.mb.canSetWorkspaceTrust()) { + this.mb.setWorkspaceTrust(!this.mb.isWorkspaceTrusted()); + } + } else if (n.equals(3075) && this.mb.canSetParentFolderTrust()) { + this.mb.setParentFolderTrust(true); + } + })); + } + focus() { + super.focus(); + this.c.focus(); + } + async setInput(e, t, s, n) { + await super.setInput(e, t, s, n); + if (!n.isCancellationRequested) { + await this.mb.workspaceTrustInitialized; + this.sb(); + await this.zb(); + } + } + sb() { + this.D(this.jb.onChange(() => this.zb())); + this.D(this.nb.onDidChangeRestrictedSettings(() => this.zb())); + this.D(this.mb.onDidChangeTrust(() => this.zb())); + this.D(this.mb.onDidChangeTrustedFolders(() => this.zb())); + } + tb(e) { + if (e) { + return "workspace-trust-header workspace-trust-trusted"; + } else { + return "workspace-trust-header workspace-trust-untrusted"; + } + } + ub(e) { + if (e) { + if (this.mb.isWorkspaceTrustForced()) { + return f(12308, null); + } + switch (this.ib.getWorkbenchState()) { + case 1: + return f(12309, null); + case 2: + return f(12310, null); + case 3: + return f(12311, null); + } + } + return f(12312, null); + } + vb(e) { + return le.asClassNameArray(QNn); + } + wb(e) { + let t = ""; + let s = ""; + switch (this.ib.getWorkbenchState()) { + case 1: + { + t = f(e ? 12313 : 12314, null); + s = f(e ? 12315 : 12316, null); + break; + } + case 2: + { + t = f(e ? 12317 : 12318, null); + s = f(e ? 12319 : 12320, null); + break; + } + case 3: + { + t = f(e ? 12321 : 12322, null); + s = f(e ? 12323 : 12324, null); + break; + } + } + return [t, s]; + } + async zb() { + if (this.xb) { + return; + } + this.xb = true; + this.yb.clear(); + const e = this.mb.isWorkspaceTrusted(); + this.c.classList.toggle("trusted", e); + this.c.classList.toggle("untrusted", !e); + this.m.innerText = this.ub(e); + this.j.className = "workspace-trust-title-icon"; + this.j.classList.add(...this.vb(e)); + this.r.innerText = ""; + const t = z(this.r, G("div")); + t.innerText = e ? f(12325, null) : f(12326, null, this.pb.nameShort); + const s = z(this.r, G("div")); + const n = f(12327, null, "command:workbench.trust.configure"); + for (const l of c$(n).nodes) { + if (typeof l == "string") { + z(s, document.createTextNode(l)); + } else { + this.yb.add(this.lb.createInstance(LP, s, { + ...l, + tabIndex: -1 + }, {})); + } + } + this.f.className = this.tb(e); + this.c.setAttribute("aria-label", `${f(12328, null)}: ${this.f.innerText}`); + const r = this.nb.restrictedSettings; + const o = Pe.as(rr.Configuration); + const a = r.default.filter(l => { + const c = o.getConfigurationProperties()[l]; + if (c.scope === 1 || c.scope === 2) { + return false; + } + if (c.deprecationMessage || c.markdownDeprecationMessage) { + if (r.workspace?.includes(l)) { + return true; + } + if (r.workspaceFolder) { + for (const u of r.workspaceFolder.values()) { + if (u.includes(l)) { + return true; + } + } + } + return false; + } + return true; + }).length; + this.Eb(a, this.Ab()); + this.hb.updateTable(); + this.cb.getDomNode().style.height = `calc(100% - ${this.f.clientHeight}px)`; + this.cb.scanDomNode(); + this.xb = false; + } + Ab() { + const e = new Set(); + const t = qse(this.ib.getWorkspace()); + const s = this.jb.local.filter(n => n.local).map(n => n.local); + for (const n of s) { + const r = this.ob.getEnablementState(n); + if (r !== 10 && r !== 11 && r !== 0 && r !== 7 || t && this.kb.getExtensionVirtualWorkspaceSupportType(n.manifest) === false) { + continue; + } + if (this.kb.getExtensionUntrustedWorkspaceSupportType(n.manifest) !== true) { + e.add(n.identifier.id); + continue; + } + if (vgt(s, n).some(a => this.kb.getExtensionUntrustedWorkspaceSupportType(a.manifest) === false)) { + e.add(n.identifier.id); + } + } + return e.size; + } + Bb(e) { + this.f = z(e, G(".workspace-trust-header", { + tabIndex: "0" + })); + this.g = z(this.f, G(".workspace-trust-title")); + this.j = z(this.g, G(".workspace-trust-title-icon")); + this.m = z(this.g, G(".workspace-trust-title-text")); + this.r = z(this.f, G(".workspace-trust-description")); + } + Cb(e) { + this.gb = z(e, G(".workspace-trust-settings", { + tabIndex: "0" + })); + const t = z(this.gb, G(".workspace-trusted-folders-title")); + t.innerText = f(12329, null); + this.hb = this.D(this.lb.createInstance(U_i, this.gb)); + } + Db(e) { + this.db = z(e, G(".workspace-trust-features")); + this.eb = z(this.db, G(".workspace-trust-limitations.trusted", { + tabIndex: "0" + })); + this.fb = z(this.db, G(".workspace-trust-limitations.untrusted", { + tabIndex: "0" + })); + } + async Eb(e, t) { + Lr(this.eb); + Lr(this.fb); + const [s, n] = this.wb(true); + this.Jb(this.eb, s, n); + const r = this.ib.getWorkbenchState() === 1 ? [f(12330, null), f(12331, null), f(12332, null)] : [f(12333, null), f(12334, null), f(12335, null), f(12336, null)]; + this.Kb(this.eb, r, le.asClassNameArray(WUo)); + const [o, a] = this.wb(false); + this.Jb(this.fb, o, a); + const l = this.ib.getWorkbenchState() === 1 ? [f(12337, null), f(12338, null), V_i(f(12339, null, t, `command:${UG}`))] : [f(12340, null), f(12341, null), V_i(e ? f(12342, null, e, "command:settings.filterUntrusted") : f(12343, null)), V_i(f(12344, null, t, `command:${UG}`))]; + this.Kb(this.fb, l, le.asClassNameArray(VUo)); + if (this.mb.isWorkspaceTrusted()) { + if (this.mb.canSetWorkspaceTrust()) { + this.Hb(this.fb); + } else { + this.Ib(this.fb); + } + } else if (this.mb.canSetWorkspaceTrust()) { + this.Gb(this.eb); + } + } + Fb(e, t, s) { + const n = z(e, G(".workspace-trust-buttons-row")); + const r = z(n, G(".workspace-trust-buttons")); + const o = this.yb.add(new G4(r)); + for (const { + action: a, + keybinding: l + } of t) { + const c = o.addButtonWithDescription(yd); + c.label = a.label; + c.enabled = s !== undefined ? s : a.enabled; + c.description = l.getLabel(); + c.element.ariaLabel = a.label + ", " + f(12345, null, l.getAriaLabel()); + this.yb.add(c.onDidClick(u => { + if (u) { + yn.stop(u, true); + } + a.run(); + })); + } + } + Gb(e) { + const s = [{ + action: new Yt("workspace.trust.button.action.grant", f(12346, null), undefined, true, async () => { + await this.mb.setWorkspaceTrust(true); + }), + keybinding: this.qb.resolveUserBinding(Gt ? "Cmd+Enter" : "Ctrl+Enter")[0] + }]; + if (this.mb.canSetParentFolderTrust()) { + const n = Lx(this.ib.getWorkspace()); + const r = ji(Ir(n.uri)); + const o = z(e, G(".trust-message-box")); + o.innerText = f(12347, null, r); + const a = new Yt("workspace.trust.button.action.grantParent", f(12348, null), undefined, true, async () => { + await this.mb.setParentFolderTrust(true); + }); + s.push({ + action: a, + keybinding: this.qb.resolveUserBinding(Gt ? "Cmd+Shift+Enter" : "Ctrl+Shift+Enter")[0] + }); + } + this.Fb(e, s); + } + Hb(e) { + this.Fb(e, [{ + action: new Yt("workspace.trust.button.action.deny", f(12349, null), undefined, true, async () => { + await this.mb.setWorkspaceTrust(false); + }), + keybinding: this.qb.resolveUserBinding(Gt ? "Cmd+Enter" : "Ctrl+Enter")[0] + }]); + } + Ib(e) { + if (this.ib.getWorkbenchState() === 1) { + return; + } + const t = z(e, G(".workspace-trust-untrusted-description")); + if (this.mb.isWorkspaceTrustForced()) { + t.innerText = f(12352, null); + } else { + t.innerText = this.ib.getWorkbenchState() === 3 ? f(12350, null) : f(12351, null); + } + } + Jb(e, t, s) { + const n = z(e, G(".workspace-trust-limitations-header")); + const r = z(n, G(".workspace-trust-limitations-title")); + const o = z(r, G(".workspace-trust-limitations-title-text")); + const a = z(n, G(".workspace-trust-limitations-subtitle")); + o.innerText = t; + a.innerText = s; + } + Kb(e, t, s) { + const n = z(e, G(".workspace-trust-limitations-list-container")); + const r = z(n, G("ul")); + for (const o of t) { + const a = z(r, G("li")); + const l = z(a, G(".list-item-icon")); + const c = z(a, G(".list-item-text")); + l.classList.add(...s); + const u = c$(o); + for (const d of u.nodes) { + if (typeof d == "string") { + z(c, document.createTextNode(d)); + } else { + this.yb.add(this.lb.createInstance(LP, c, { + ...d, + tabIndex: -1 + }, {})); + } + } + } + } + layout(e) { + if (this.isVisible()) { + this.hb.layout(); + this.Lb.forEach(t => { + t.layout(); + }); + this.cb.scanDomNode(); + } + } +}; +__decorate([mb(100)], HTe.prototype, "zb", null); +HTe = B_i = __decorate([__param(1, Ot), __param(2, ti), __param(3, ht), __param(4, kt), __param(5, Vr), __param(6, f0), __param(7, re), __param(8, qf), __param(9, eT), __param(10, Rd), __param(11, ys), __param(12, oi)], HTe); +function V_i(i) { + const e = /(.*)\[(.+)\]\s*\((.+)\)(.*)/; + return i.replace(e, "$1[$2]($3)$4"); +} +He(); +At(); +Le(); +X(); +Br(); +Zp(); +var zUo = dt("workspace-trust-editor-label-icon", A.shield, f(13737, null)); +var d$t = class eUi extends rg { + constructor() { + super(...arguments); + this.resource = V.from({ + scheme: me.vscodeWorkspaceTrust, + path: "workspaceTrustEditor" + }); + } + static { + this.ID = "workbench.input.workspaceTrust"; + } + get capabilities() { + return 10; + } + get typeId() { + return eUi.ID; + } + matches(e) { + return super.matches(e) || e instanceof eUi; + } + getName() { + return f(13738, null); + } + getIcon() { + return zUo; + } +}; +Nn(); +ai(); +ii(); +pn(); +Me(); +No(); +qt(); +lD(); +Rr(); +jn(); +kn(); +rt(); +Wc(); +Et(); +Le(); +Aa(); +Nt(); +var ZNn = "workbench.banner.restrictedMode"; +var eMn = "workspace.trust.startupPrompt.shown"; +var tMn = "workbench.banner.restrictedMode.dismissed"; +var H_i = class extends H { + constructor(e, t, s) { + super(); + this.a = MH.IsEnabled.bindTo(e); + this.a.set(t.isWorkspaceTrustEnabled()); + this.c = MH.IsTrusted.bindTo(e); + this.c.set(s.isWorkspaceTrusted()); + this.D(s.onDidChangeTrust(n => this.c.set(n))); + } +}; +H_i = __decorate([__param(0, Ne), __param(1, NW), __param(2, qf)], H_i); +Pe.as(Er.Workbench).registerWorkbenchContribution(H_i, 3); +var h$t = class extends H { + static { + this.ID = "workbench.contrib.workspaceTrustRequestHandler"; + } + constructor(e, t, s, n, r) { + super(); + this.a = e; + this.c = t; + this.f = s; + this.g = n; + this.h = r; + this.m(); + } + get j() { + return !u1(Lx(this.f.getWorkspace())); + } + m() { + this.D(this.h.onDidInitiateOpenFilesTrustRequest(async () => { + await this.g.workspaceResolved; + const e = [this.f.getWorkbenchState() !== 1 ? f(12217, null) : f(12218, null), f(12219, null)]; + await this.a.prompt({ + type: es.Info, + message: this.f.getWorkbenchState() !== 1 ? f(12220, null) : f(12221, null), + buttons: [{ + label: f(12222, null), + run: ({ + checkboxChecked: t + }) => this.h.completeOpenFilesTrustRequest(1, !!t) + }, { + label: f(12223, null), + run: ({ + checkboxChecked: t + }) => this.h.completeOpenFilesTrustRequest(2, !!t) + }], + cancelButton: { + run: () => this.h.completeOpenFilesTrustRequest(3) + }, + checkbox: { + label: f(12224, null), + checked: false + }, + custom: { + icon: A.shield, + markdownDetails: e.map(t => ({ + markdown: new hs(t) + })) + } + }); + })); + this.D(this.h.onDidInitiateWorkspaceTrustRequest(async e => { + await this.g.workspaceResolved; + const t = this.j ? f(12225, null) : f(12226, null); + const s = f(12227, null); + const n = e?.message ?? s; + const r = e?.buttons ?? [{ + label: this.j ? f(12228, null) : f(12229, null), + type: "ContinueWithTrust" + }, { + label: f(12230, null), + type: "Manage" + }]; + if (!r.some(a => a.type === "Cancel")) { + r.push({ + label: f(12231, null), + type: "Cancel" + }); + } + const { + result: o + } = await this.a.prompt({ + type: es.Info, + message: t, + custom: { + icon: A.shield, + markdownDetails: [{ + markdown: new hs(n) + }, { + markdown: new hs(f(12232, null)) + }] + }, + buttons: r.filter(a => a.type !== "Cancel").map(a => ({ + label: a.label, + run: () => a.type + })), + cancelButton: (() => { + const a = r.find(l => l.type === "Cancel"); + if (a) { + return { + label: a.label, + run: () => a.type + }; + } + })() + }); + switch (o) { + case "ContinueWithTrust": + await this.h.completeWorkspaceTrustRequest(true); + break; + case "ContinueWithoutTrust": + await this.h.completeWorkspaceTrustRequest(undefined); + break; + case "Manage": + this.h.cancelWorkspaceTrustRequest(); + await this.c.executeCommand(AH); + break; + case "Cancel": + this.h.cancelWorkspaceTrustRequest(); + break; + } + })); + } +}; +h$t = __decorate([__param(0, Js), __param(1, gt), __param(2, kt), __param(3, qf), __param(4, AE)], h$t); +var q_i = class extends H { + constructor(e, t, s, n, r, o, a, l, c, u, d, h, g, p, b) { + super(); + this.f = e; + this.g = t; + this.h = s; + this.j = n; + this.m = r; + this.n = o; + this.q = a; + this.r = l; + this.s = c; + this.t = u; + this.u = d; + this.w = h; + this.y = g; + this.z = p; + this.C = b; + this.a = "status.workspaceTrust"; + this.c = this.D(new ki()); + (async () => { + await this.j.workspaceTrustInitialized; + if (this.h.isWorkspaceTrustEnabled()) { + this.F(); + this.S(this.j.isWorkspaceTrusted()); + if (this.u.hasFocus) { + this.I(); + } else { + const v = this.u.onDidChangeFocus(y => { + if (y) { + v.dispose(); + this.I(); + } + }); + } + } + })(); + } + F() { + this.D(this.g.onWillChangeWorkspaceFolders(e => { + if (e.fromCache || !this.h.isWorkspaceTrustEnabled()) { + return; + } + const t = async s => { + if (this.j.isWorkspaceTrusted() && (s.changes.added.length || s.changes.changed.length)) { + const r = await Promise.all(s.changes.added.map(o => this.j.getUriTrustInfo(o.uri))); + if (!r.map(o => o.trusted).every(o => o)) { + const { + confirmed: o + } = await this.f.confirm({ + type: es.Info, + message: f(12233, null), + detail: f(12234, null), + cancelButton: f(12235, null), + custom: { + icon: A.shield + } + }); + await this.j.setUrisTrust(r.map(a => a.uri), o); + } + } + }; + return e.join(t(e)); + })); + this.D(this.j.onDidChangeTrust(e => { + this.G(e); + })); + this.D(this.r.onDidInitiateWorkspaceTrustRequestOnStartup(async () => { + let e; + let t; + let s; + let n; + const r = await this.M(); + if (r && this.w.aiGeneratedWorkspaceTrust) { + e = this.w.aiGeneratedWorkspaceTrust.title; + t = this.w.aiGeneratedWorkspaceTrust.startupTrustRequestLearnMore; + s = this.w.aiGeneratedWorkspaceTrust.trustOption; + n = this.w.aiGeneratedWorkspaceTrust.dontTrustOption; + } else { + console.warn("AI generated workspace trust dialog contents not available."); + } + const o = e ?? (this.L ? f(12236, null) : f(12237, null)); + let a; + const l = Lx(this.g.getWorkspace()); + const c = u1(l); + const u = IUt(l); + if (!r && this.j.canSetParentFolderTrust()) { + const d = ji(Ir(l.uri)); + a = f(12238, null, d); + } + this.H(o, { + label: s ?? f(12239, null), + sublabel: f(c ? 12240 : 12241, null) + }, { + label: n ?? f(12242, null), + sublabel: f(c ? 12243 : 12244, null) + }, [c ? f(12246, null, this.w.nameShort) : f(12245, null, this.w.nameShort), t ?? f(12247, null), u ? "" : `\`${this.t.getWorkspaceLabel(l, { + verbose: 2 + })}\``], a); + })); + } + G(e) { + const t = this.N(!e); + this.S(e); + if (t) { + if (e) { + this.s.hide(ZNn); + } else { + this.s.show(t); + } + } + } + async H(e, t, s, n, r) { + await this.f.prompt({ + type: es.Info, + message: e, + checkbox: r ? { + label: r + } : undefined, + buttons: [{ + label: t.label, + run: async ({ + checkboxChecked: o + }) => { + if (o) { + await this.j.setParentFolderTrust(true); + } else { + await this.r.completeWorkspaceTrustRequest(true); + } + } + }, { + label: s.label, + run: () => { + this.G(false); + this.r.cancelWorkspaceTrustRequest(); + } + }], + custom: { + buttonDetails: [t.sublabel, s.sublabel], + disableCloseAction: true, + icon: A.shield, + markdownDetails: n.map(o => ({ + markdown: new hs(o) + })) + } + }); + this.q.store(eMn, true, 1, 1); + } + async I() { + if (this.j.isWorkspaceTrusted()) { + this.G(true); + return; + } + if (this.j.canSetWorkspaceTrust()) { + if (qse(this.g.getWorkspace())) { + this.G(false); + return; + } + if (this.g.getWorkbenchState() === 1) { + this.G(false); + return; + } + if (this.J === "never") { + this.G(false); + return; + } + if (this.J === "once" && this.q.getBoolean(eMn, 1, false)) { + this.G(false); + return; + } + this.r.requestWorkspaceTrustOnStartup(); + } + } + get J() { + return this.m.getValue(BHs); + } + get L() { + return !u1(Lx(this.g.getWorkspace())); + } + async M() { + const e = V.joinPath(this.z.workspaceStorageHome, "aiGeneratedWorkspaces.json"); + return await this.C.exists(e).then(async t => { + if (t) { + try { + const s = await this.C.readFile(e); + if (JSON.parse(s.value.toString()).indexOf(this.g.getWorkspace().folders[0].uri.toString()) > -1) { + return true; + } + } catch {} + } + return false; + }); + } + N(e) { + const t = this.q.getBoolean(tMn, 1, false); + if (this.Q === "never" || this.Q === "untilDismissed" && t) { + return; + } + const s = [{ + label: f(12248, null), + href: "command:" + AH + }, { + label: f(12249, null), + href: "https://aka.ms/vscode-workspace-trust" + }]; + return { + id: ZNn, + icon: QNn, + ariaLabel: this.O(), + message: this.P(), + actions: s, + onClose: () => { + if (e) { + this.q.store(tMn, true, 1, 1); + } + } + }; + } + O() { + switch (this.g.getWorkbenchState()) { + case 1: + return f(12250, null); + case 2: + return f(12251, null); + case 3: + return f(12252, null); + } + } + P() { + switch (this.g.getWorkbenchState()) { + case 1: + return f(12253, null); + case 2: + return f(12254, null); + case 3: + return f(12255, null); + } + } + get Q() { + const e = this.m.getValue(UHs); + if (e !== "always" && tn && !this.y.getConnection()?.remoteAuthority) { + return "never"; + } else { + return e; + } + } + R() { + let e = ""; + let t; + switch (this.g.getWorkbenchState()) { + case 1: + { + e = f(12256, null); + t = { + value: f(12257, null, `command:${UG}`, `command:${AH}`), + isTrusted: true, + supportThemeIcons: true + }; + break; + } + case 2: + { + e = f(12258, null); + t = { + value: f(12259, null, `command:${UG}`, `command:${AH}`), + isTrusted: true, + supportThemeIcons: true + }; + break; + } + case 3: + { + e = f(12260, null); + t = { + value: f(12261, null, `command:${UG}`, `command:${AH}`), + isTrusted: true, + supportThemeIcons: true + }; + break; + } + } + return { + name: f(12262, null), + text: `$(shield) ${f(12263, null)}`, + ariaLabel: e, + tooltip: t, + command: AH, + kind: "prominent" + }; + } + S(e) { + if (e && this.c.value) { + this.c.clear(); + return; + } + if (!e && !this.c.value) { + const t = this.R(); + this.c.value = this.n.addEntry(t, this.a, 0, Number.MAX_VALUE * 0.99); + } + } +}; +q_i = __decorate([__param(0, Js), __param(1, kt), __param(2, NW), __param(3, qf), __param(4, ve), __param(5, bu), __param(6, ht), __param(7, AE), __param(8, L8), __param(9, Zs), __param(10, kr), __param(11, ys), __param(12, al), __param(13, pa), __param(14, Ct)], q_i); +Yn(h$t.ID, h$t, 2); +Pe.as(Er.Workbench).registerWorkbenchContribution(q_i, 3); +var JUo = class { + canSerialize(i) { + return true; + } + serialize(i) { + return ""; + } + deserialize(i) { + return i.createInstance(d$t); + } +}; +Pe.as(_o.EditorFactory).registerEditorSerializer(d$t.ID, JUo); +Pe.as(_o.EditorPane).registerEditorPane(qd.create(HTe, HTe.ID, f(12264, null)), [new Os(d$t)]); +var GUo = "workbench.trust.configure"; +var iMn = W(12279, "Workspaces"); +J(class extends se { + constructor() { + super({ + id: GUo, + title: W(12280, "Configure Workspace Trust Settings"), + precondition: T.and(MH.IsEnabled, T.equals(`config.${wyt}`, true)), + category: iMn, + f1: true + }); + } + run(i) { + i.get(fa).openUserSettings({ + jsonEditor: false, + query: `@tag:${_X}` + }); + } +}); +J(class extends se { + constructor() { + super({ + id: AH, + title: W(12281, "Manage Workspace Trust"), + precondition: T.and(MH.IsEnabled, T.equals(`config.${wyt}`, true)), + category: iMn, + f1: true + }); + } + run(i) { + const e = i.get(Te); + const s = i.get(re).createInstance(d$t); + e.openEditor(s, { + pinned: true + }); + } +}); +Pe.as(rr.Configuration).registerConfiguration({ + ...wii, + properties: { + [wyt]: { + type: "boolean", + default: false, + description: f(12265, null), + tags: [_X], + scope: 1 + }, + [BHs]: { + type: "string", + default: "once", + description: f(12266, null), + tags: [_X], + scope: 1, + enum: ["always", "once", "never"], + enumDescriptions: [f(12267, null), f(12268, null), f(12269, null)] + }, + [UHs]: { + type: "string", + default: "untilDismissed", + description: f(12270, null), + tags: [_X], + scope: 1, + enum: ["always", "untilDismissed", "never"], + enumDescriptions: [f(12271, null), f(12272, null), f(12273, null)] + }, + [Cyt]: { + type: "string", + default: "prompt", + markdownDescription: f(12274, null, Cni), + tags: [_X], + scope: 1, + enum: ["prompt", "open", "newWindow"], + enumDescriptions: [f(12275, null), f(12276, null), f(12277, null)] + }, + [Cni]: { + type: "boolean", + default: true, + markdownDescription: f(12278, null, Cyt), + tags: [_X], + scope: 1 + } + } +}); +var j_i = class extends H { + constructor(e, t, s, n, r) { + super(); + this.a = e; + this.c = t; + this.f = s; + this.g = n; + this.h = r; + this.h.workspaceTrustInitialized.then(() => { + this.j(); + this.m(this.h.isWorkspaceTrusted()); + this.D(this.h.onDidChangeTrust(o => this.m(o))); + }); + } + j() { + if (!this.g.isWorkspaceTrustEnabled()) { + const e = this.a.disableWorkspaceTrust; + this.c.publicLog2("workspaceTrustDisabled", { + reason: e ? "cli" : "setting" + }); + return; + } + this.c.publicLog2("workspaceTrustFolderCounts", { + trustedFoldersCount: this.h.getTrustedUris().length + }); + } + async m(e) { + if (this.g.isWorkspaceTrustEnabled() && (this.c.publicLog2("workspaceTrustStateChanged", { + workspaceId: this.f.getWorkspace().id, + isTrusted: e + }), e)) { + const t = s => { + let n = $q(s); + let r = 0; + while (pm(n) !== n && r < 100) { + n = pm(n); + r++; + } + return r; + }; + for (const s of this.f.getWorkspace().folders) { + const { + trusted: n, + uri: r + } = await this.h.getUriTrustInfo(s.uri); + if (!n) { + continue; + } + const o = t(s.uri.fsPath); + const a = t(r.fsPath); + const l = o - a; + this.c.publicLog2("workspaceFolderDepthBelowTrustedFolder", { + workspaceFolderDepth: o, + trustedFolderDepth: a, + delta: l + }); + } + } + } +}; +j_i = __decorate([__param(0, Wn), __param(1, Ot), __param(2, kt), __param(3, NW), __param(4, qf)], j_i); +Pe.as(Er.Workbench).registerWorkbenchContribution(j_i, 3); +X(); +Ht(); +ii(); +q(); +Nt(); +Wi(); +Et(); +mn(); +qt(); +lD(); +Je(); +Ee(); +var z_i = class extends H { + constructor(e, t, s, n, r, o) { + super(); + this.a = e; + this.b = t; + this.c = s; + this.f = n; + this.g = r; + this.h = o; + this.j(); + } + async j() { + const e = this.a.getWorkspace().folders[0]; + if (!e || this.a.getWorkbenchState() !== 2 || qse(this.a.getWorkspace())) { + return; + } + const t = (await this.c.resolve(e.uri)).children?.map(s => s.name); + if (Array.isArray(t)) { + const s = t.filter(rie); + if (s.length > 0) { + this.m(e.uri, s); + } + } + } + m(e, t) { + const s = { + id: "workspaces.dontPromptToOpen", + scope: hF.WORKSPACE, + isSecondary: true + }; + if (t.length === 1) { + const n = t[0]; + this.b.prompt(es.Info, f(12355, null, n, "https://go.microsoft.com/fwlink/?linkid=2025315"), [{ + label: f(12356, null), + run: () => this.g.openWindow([{ + workspaceUri: Li(e, n) + }]) + }], { + neverShowAgain: s, + priority: this.h.isNew(1) ? undefined : Ru.SILENT + }); + } else if (t.length > 1) { + this.b.prompt(es.Info, f(12357, null, "https://go.microsoft.com/fwlink/?linkid=2025315"), [{ + label: f(12358, null), + run: () => { + this.f.pick(t.map(n => ({ + label: n + })), { + placeHolder: f(12359, null) + }).then(n => { + if (n) { + this.g.openWindow([{ + workspaceUri: Li(e, n.label) + }]); + } + }); + } + }], { + neverShowAgain: s, + priority: this.h.isNew(1) ? undefined : Ru.SILENT + }); + } + } +}; +z_i = __decorate([__param(0, kt), __param(1, ni), __param(2, Ct), __param(3, zi), __param(4, kr), __param(5, ht)], z_i); +Pe.as(Er.Workbench).registerWorkbenchContribution(z_i, 4); +J(class extends se { + constructor() { + super({ + id: "workbench.action.openWorkspaceFromEditor", + title: W(12361, "Open Workspace"), + f1: false, + menu: { + id: _.EditorContent, + when: T.and(La.Extension.isEqualTo(Flt), oc.isEqualTo(nwt), jWs.toNegated()) + } + }); + } + async run(i, e) { + const t = i.get(kr); + const s = i.get(kt); + const n = i.get(ni); + if (s.getWorkbenchState() === 3) { + const r = s.getWorkspace().configuration; + if (r && Ls(r, e)) { + n.info(f(12360, null)); + return; + } + } + return t.openWindow([{ + workspaceUri: e + }]); + } +}); +Ee(); +Je(); +q(); +X(); +mn(); +var J_i = class extends H { + constructor(e, t) { + super(); + this.a = e; + this.b = t; + } + async show() { + const e = []; + this.a.getColumnLabels().forEach((r, o) => { + if (r) { + e.push({ + label: r, + index: o + }); + } + }); + const t = await this.b.pick(e, { + placeHolder: f(7769, null) + }); + if (!t) { + return; + } + const s = await this.b.input({ + placeHolder: f(7770, null), + prompt: f(7771, null, t.label), + validateInput: r => this.c(r) + }); + const n = s ? Number.parseInt(s) : undefined; + if (n) { + this.a.resizeColumn(t.index, n); + } + } + async c(e) { + const t = Number.parseInt(e); + if (e && !Number.isInteger(t)) { + return f(7772, null); + } else if (t < 0 || t > 100) { + return f(7773, null); + } else { + return null; + } + } +}; +J_i = __decorate([__param(1, zi)], J_i); +te(); +Je(); +X(); +var KUo = class extends se { + constructor() { + super({ + id: "list.resizeColumn", + title: { + value: f(7767, null), + original: "Resize Column" + }, + category: { + value: f(7768, null), + original: "List" + }, + precondition: nh, + f1: true + }); + } + async run(i) { + const e = i.get(br); + const t = i.get(re); + const s = e.lastFocusedList; + if (s instanceof yG) { + await t.createInstance(J_i, s).show(); + } + } +}; +var f$t = class { + static { + this.ID = "workbench.contrib.listContext"; + } + constructor(e) { + e.createKey("listSupportsTypeNavigation", true); + e.createKey("listSupportsKeyboardNavigation", true); + } +}; +f$t = __decorate([__param(0, Ne)], f$t); +Yn(f$t.ID, f$t, 1); +J(KUo); +Je(); +It(); +q(); +An(); +var G_i = class extends H { + constructor(e, t) { + super(); + this.a = t; + const s = Ro(this, t.onSoundEnabledChanged(el.onDebugBreak), () => t.isSoundEnabled(el.onDebugBreak)); + this.D(eh((n, r) => { + if (!s.read(n)) { + return; + } + const o = new Map(); + r.add(Ue(() => { + o.forEach(a => a.dispose()); + o.clear(); + })); + r.add(e.onDidNewSession(a => o.set(a, this.b(a)))); + r.add(e.onDidEndSession(({ + session: a + }) => { + o.get(a)?.dispose(); + o.delete(a); + })); + e.getModel().getSessions().forEach(a => o.set(a, this.b(a))); + })); + } + b(e) { + return e.onDidChangeState(t => { + const s = e.getStoppedDetails(); + if (s && s.reason === "breakpoint") { + this.a.playSignal(el.onDebugBreak); + } + }); + } +}; +G_i = __decorate([__param(0, er), __param(1, Pd)], G_i); +He(); +Rt(); +X(); +Ho(); +Je(); +Me(); +mn(); +q(); +var YUo = class Z8n extends se { + static { + this.ID = "signals.sounds.help"; + } + constructor() { + super({ + id: Z8n.ID, + title: W(4494, "Help: List Signal Sounds"), + f1: true, + metadata: { + description: f(4487, null) + } + }); + } + async run(e) { + const t = e.get(Pd); + const s = e.get(zi); + const n = e.get(ve); + const r = e.get(na); + const o = e.get(fa); + const a = [el.save, el.format]; + const l = el.allAccessibilitySignals.map((d, h) => ({ + label: a.includes(d) ? `${d.name} (${n.getValue(d.settingsKey + ".sound")})` : d.name, + signal: d, + buttons: a.includes(d) ? [{ + iconClass: le.asClassName(A.settingsGear), + tooltip: f(4488, null), + alwaysVisible: true + }] : [] + })).sort((d, h) => d.label.localeCompare(h.label)); + const c = new Q(); + const u = c.add(s.createQuickPick()); + u.items = l; + u.selectedItems = l.filter(d => t.isSoundEnabled(d.signal) || a.includes(d.signal) && n.getValue(d.signal.settingsKey + ".sound") !== "never"); + c.add(u.onDidAccept(() => { + const d = u.selectedItems.map(g => g.signal); + const h = u.items.map(g => g.signal).filter(g => !d.includes(g)); + for (const g of d) { + let { + sound: p, + announcement: b + } = n.getValue(g.settingsKey); + p = a.includes(g) ? "userGesture" : r.isScreenReaderOptimized() ? "auto" : "on"; + if (b) { + n.updateValue(g.settingsKey, { + sound: p, + announcement: b + }); + } else { + n.updateValue(g.settingsKey, { + sound: p + }); + } + } + for (const g of h) { + const p = n.getValue(g.settingsKey + ".announcement"); + const b = sMn(a.includes(g), r.isScreenReaderOptimized()); + const v = p ? { + sound: b, + announcement: p + } : { + sound: b + }; + n.updateValue(g.settingsKey, v); + } + u.hide(); + })); + c.add(u.onDidTriggerItemButton(d => { + o.openUserSettings({ + jsonEditor: true, + revealSetting: { + key: d.item.signal.settingsKey, + edit: true + } + }); + })); + c.add(u.onDidChangeActive(() => { + t.playSound(u.activeItems[0].signal.sound.getSound(true), true, mBs); + })); + c.add(u.onDidHide(() => c.dispose())); + u.placeholder = f(4489, null); + u.canSelectMany = true; + await u.show(); + } +}; +function sMn(i, e) { + if (e) { + if (i) { + return "never"; + } else { + return "off"; + } + } else if (i) { + return "never"; + } else { + return "auto"; + } +} +var XUo = class e3n extends se { + static { + this.ID = "accessibility.announcement.help"; + } + constructor() { + super({ + id: e3n.ID, + title: W(4495, "Help: List Signal Announcements"), + f1: true, + metadata: { + description: f(4490, null) + } + }); + } + async run(e) { + const t = e.get(Pd); + const s = e.get(zi); + const n = e.get(ve); + const r = e.get(na); + const o = e.get(fa); + const a = [el.save, el.format]; + const l = el.allAccessibilitySignals.filter(h => !!h.legacyAnnouncementSettingsKey).map((h, g) => ({ + label: a.includes(h) ? `${h.name} (${n.getValue(h.settingsKey + ".announcement")})` : h.name, + signal: h, + buttons: a.includes(h) ? [{ + iconClass: le.asClassName(A.settingsGear), + tooltip: f(4491, null), + alwaysVisible: true + }] : [] + })).sort((h, g) => h.label.localeCompare(g.label)); + const c = new Q(); + const u = c.add(s.createQuickPick()); + u.items = l; + u.selectedItems = l.filter(h => t.isAnnouncementEnabled(h.signal) || a.includes(h.signal) && n.getValue(h.signal.settingsKey + ".announcement") !== "never"); + const d = r.isScreenReaderOptimized(); + c.add(u.onDidAccept(() => { + if (!d) { + u.hide(); + return; + } + const h = u.selectedItems.map(p => p.signal); + const g = el.allAccessibilitySignals.filter(p => !!p.legacyAnnouncementSettingsKey && !h.includes(p)); + for (const p of h) { + let { + sound: b, + announcement: v + } = n.getValue(p.settingsKey); + v = a.includes(p) ? "userGesture" : p.announcementMessage && r.isScreenReaderOptimized() ? "auto" : undefined; + n.updateValue(p.settingsKey, { + sound: b, + announcement: v + }); + } + for (const p of g) { + const b = sMn(a.includes(p), true); + const v = n.getValue(p.settingsKey + ".sound"); + const y = b ? { + sound: v, + announcement: b + } : { + sound: v + }; + n.updateValue(p.settingsKey, y); + } + u.hide(); + })); + c.add(u.onDidTriggerItemButton(h => { + o.openUserSettings({ + jsonEditor: true, + revealSetting: { + key: h.item.signal.settingsKey, + edit: true + } + }); + })); + c.add(u.onDidHide(() => c.dispose())); + u.placeholder = f(d ? 4492 : 4493, null); + u.canSelectMany = true; + await u.show(); + } +}; +nt(); +q(); +An(); +zt(); +wa(); +te(); +wl(); +vt(); +var K_i = class extends H { + constructor(e, t, s) { + super(); + this.f = e; + this.g = t; + this.h = s; + this.a = [this.g.createInstance(p$t, el.errorAtPosition, el.errorOnLine, sn.Error), this.g.createInstance(p$t, el.warningAtPosition, el.warningOnLine, sn.Warning), this.g.createInstance(QUo), this.g.createInstance(Y_i)]; + this.b = Is(this, n => this.a.flatMap(r => [r.lineSignal, r.positionSignal]).filter(to).some(r => Y9t(this, this.h.getEnabledState(r, false)).read(n))); + this.c = Ro(this, this.f.onDidActiveEditorChange, n => { + const r = this.f.activeTextEditorControl; + const o = _f(r) ? r.getOriginalEditor() : no(r) ? r : undefined; + if (o && o.hasModel()) { + return { + editor: o, + model: o.getModel() + }; + } else { + return undefined; + } + }); + this.D(eh((n, r) => { + if (!this.b.read(n)) { + return; + } + const o = this.c.read(n); + if (o) { + this.j(o.editor, o.model, r); + } + })); + } + j(e, t, s) { + let n = -1; + const r = new Set(); + const o = s.add(new Q()); + const a = this.a.map(c => ({ + source: c.createSource(e, t), + property: c + })); + const l = rKn(e.onDidChangeModelContent, 100, s); + s.add(e.onDidChangeCursorPosition(c => { + o.clear(); + if (c && c.reason !== 3 && c.reason !== 0) { + r.clear(); + return; + } + const u = (g, p, b) => { + const v = b === "line" ? g.lineSignal : g.positionSignal; + if (!!v && !!this.h.getEnabledState(v, false).value && !!p.isPresent(d, b, undefined)) { + for (const y of ["sound", "announcement"]) { + if (this.h.getEnabledState(v, false, y).value) { + const w = this.h.getDelayMs(v, y, b) + (l.get() ? 1000 : 0); + o.add(Gd(() => { + if (p.isPresent(d, b, undefined)) { + if (b !== "line" || !r.has(g)) { + this.h.playSignal(v, { + modality: y + }); + } + r.add(g); + } + }, w)); + } + } + } + }; + const d = c.position; + const h = d.lineNumber; + if (h !== n) { + r.clear(); + n = h; + for (const g of a) { + u(g.property, g.source, "line"); + } + } + for (const g of a) { + u(g.property, g.source, "positional"); + } + for (const g of a) { + if (![g.property.lineSignal, g.property.positionSignal].some(v => v && this.h.getEnabledState(v, false).value)) { + return; + } + let p; + let b; + o.add(Dn(v => { + const y = g.source.isPresentAtPosition(c.position, v); + const w = g.source.isPresentOnLine(c.position.lineNumber, v); + if (p !== undefined && p !== undefined) { + if (!p && y) { + u(g.property, g.source, "positional"); + } + if (!b && w) { + u(g.property, g.source, "line"); + } + } + p = y; + b = w; + })); + } + })); + } +}; +K_i = __decorate([__param(0, Te), __param(1, re), __param(2, Pd)], K_i); +var g$t = class t3n { + static { + this.notPresent = new t3n({ + isPresentAtPosition: () => false, + isPresentOnLine: () => false + }); + } + constructor(e) { + this.isPresentOnLine = e.isPresentOnLine; + this.isPresentAtPosition = e.isPresentAtPosition ?? (() => false); + } + isPresent(e, t, s) { + if (t === "line") { + return this.isPresentOnLine(e.lineNumber, s); + } else { + return this.isPresentAtPosition(e, s); + } + } +}; +var p$t = class { + constructor(e, t, s, n) { + this.positionSignal = e; + this.lineSignal = t; + this.a = s; + this.b = n; + this.debounceWhileTyping = true; + } + createSource(e, t) { + const s = Wy("onMarkerChanged", this.b.onMarkerChanged); + return new g$t({ + isPresentAtPosition: (n, r) => { + s.read(r); + return this.b.read({ + resource: t.uri + }).some(a => a.severity === this.a && a.startLineNumber <= n.lineNumber && n.lineNumber <= a.endLineNumber && a.startColumn <= n.column && n.column <= a.endColumn); + }, + isPresentOnLine: (n, r) => { + s.read(r); + return this.b.read({ + resource: t.uri + }).some(a => a.severity === this.a && a.startLineNumber <= n && n <= a.endLineNumber); + } + }); + } +}; +p$t = __decorate([__param(3, Nu)], p$t); +var QUo = class { + constructor() { + this.lineSignal = el.foldedArea; + } + createSource(i, e) { + const t = o0.get(i); + if (!t) { + return g$t.notPresent; + } + const s = sKn(t.getFoldingModel() ?? Promise.resolve(undefined)); + return new g$t({ + isPresentOnLine(n, r) { + const a = s.read(r).value?.getRegionAtLine(n); + if (a) { + return a.isCollapsed && a.startLineNumber === n; + } else { + return false; + } + } + }); + } +}; +var Y_i = class { + constructor(e) { + this.a = e; + this.lineSignal = el.break; + } + createSource(e, t) { + const s = Wy("onDidChangeBreakpoints", this.a.getModel().onDidChangeBreakpoints); + const n = this.a; + return new g$t({ + isPresentOnLine(r, o) { + s.read(o); + return n.getModel().getBreakpoints({ + uri: t.uri, + lineNumber: r + }).length > 0; + } + }); + } +}; +Y_i = __decorate([__param(0, er)], Y_i); +it(Pd, yXt, 1); +Yn("EditorTextPropertySignalsContribution", jjr(() => K_i), 3); +Yn("AccessibilitySignalLineDebuggerContribution", G_i, 3); +J(YUo); +J(XUo); +Fs(); +Ut(); +zt(); +X(); +Me(); +Wi(); +gs(); +Ht(); +qt(); +var X_i = class { + constructor(e, t, s, n, r) { + this.a = e; + this.b = t; + this.c = s; + this.f = n; + this.g = r; + this.i = "deprecatedExtensionMigrator.state"; + this.h().catch(xs); + } + async h() { + const e = "coenraads.bracket-pair-colorizer"; + await this.b.queryLocal(); + const t = this.b.installed.find(a => a.identifier.id === e); + if (!t || t.enablementState !== 10 && t.enablementState !== 11) { + return; + } + const s = await this.j(); + if (s.disablementLog.some(a => a.extensionId === e)) { + return; + } + s.disablementLog.push({ + extensionId: e, + disablementDateTime: new Date().getTime() + }); + await this.k(s); + await this.b.setEnablement(t, 8); + const r = "editor.bracketPairColorization.enabled"; + const o = !!this.a.inspect(r).user; + this.f.notify({ + message: f(6282, null), + severity: es.Info, + actions: { + primary: [new Yt("", f(6283, null), undefined, undefined, () => { + this.b.uninstall(t); + })], + secondary: [o ? undefined : new Yt("", f(6284, null), undefined, undefined, () => { + this.a.updateValue(r, true, 2); + }), new Yt("", f(6285, null), undefined, undefined, () => { + this.g.open("https://github.com/microsoft/vscode/issues/155179"); + })].filter(to) + } + }); + } + async j() { + const e = await this.c.get(this.i, -1, ""); + if (e === "") { + return { + disablementLog: [] + }; + } else { + return JSON.parse(e); + } + } + async k(e) { + const t = JSON.stringify(e); + await this.c.store(this.i, t, -1, 0); + } +}; +X_i = __decorate([__param(0, ve), __param(1, Vr), __param(2, ht), __param(3, ni), __param(4, os)], X_i); +Pe.as(Er.Workbench).registerWorkbenchContribution(X_i, 3); +Ut(); +Me(); +Ht(); +ai(); +var Q_i = class { + constructor(e, t, s) { + this.a = e; + this.b = t; + this.c = s; + this.d().catch(xs); + } + async d() { + const e = "coenraads.bracket-pair-colorizer-2"; + await this.b.queryLocal(); + const t = this.b.installed.find(r => r.identifier.id === e); + if (!t || t.enablementState !== 10 && t.enablementState !== 11) { + return; + } + const n = !!this.a.getValue("editor.bracketPairColorization.enabled"); + this.c.publicLog2("bracketPairColorizerTwoUsage", { + nativeColorizationEnabled: n + }); + } +}; +Q_i = __decorate([__param(0, ve), __param(1, Vr), __param(2, Ot)], Q_i); +Pe.as(Er.Workbench).registerWorkbenchContribution(Q_i, 3); +It(); +Ht(); +md(); +pe(); +q(); +Xf(); +Me(); +var Z_i = class extends H { + constructor(e) { + super(); + this.b = undefined; + this.D(Ue(() => this.f())); + this.D(de.runAndSubscribe(e.onDidChangeConfiguration, t => { + if (t && !t.affectsConfiguration("accessibility.dimUnfocused.enabled") && !t.affectsConfiguration("accessibility.dimUnfocused.opacity")) { + return; + } + let s = ""; + if (ZUo(e.getValue("accessibility.dimUnfocused.enabled"), false)) { + const r = yc(eWo(e.getValue("accessibility.dimUnfocused.opacity"), 0.75), 0.2, 1); + if (r !== 1) { + const o = new Set(); + const a = `filter: opacity(${r});`; + o.add(`.monaco-workbench .pane-body.integrated-terminal:not(:focus-within) .tabs-container { ${a} }`); + o.add(`.monaco-workbench .pane-body.integrated-terminal .terminal-wrapper:not(:focus-within) { ${a} }`); + o.add(`.monaco-workbench .editor-instance:not(:focus-within) .monaco-editor { ${a} }`); + o.add(`.monaco-workbench .editor-instance:not(:focus-within) .breadcrumbs-below-tabs { ${a} }`); + o.add(`.monaco-workbench .editor-instance:not(:focus-within) .terminal-wrapper { ${a} }`); + o.add(`.monaco-workbench .editor-instance:not(:focus-within) .settings-editor { ${a} }`); + o.add(`.monaco-workbench .editor-instance:not(:focus-within) .keybindings-editor { ${a} }`); + o.add(`.monaco-workbench .editor-instance:not(:focus-within) .monaco-editor-pane-placeholder { ${a} }`); + o.add(`.monaco-workbench .editor-instance:not(:focus-within) .gettingStartedContainer { ${a} }`); + s = [...o].join(` +`); + } + } + if (s.length === 0) { + this.f(); + } else { + this.c().textContent = s; + } + })); + } + c() { + if (!this.a) { + this.b = new Q(); + this.a = pd(undefined, undefined, this.b); + this.a.className = "accessibilityUnfocusedViewOpacity"; + } + return this.a; + } + f() { + this.b?.dispose(); + this.b = undefined; + this.a = undefined; + } +}; +Z_i = __decorate([__param(0, ve)], Z_i); +function ZUo(i, e) { + if (typeof i == "boolean") { + return i; + } else { + return e; + } +} +function eWo(i, e) { + if (typeof i == "number") { + return i; + } else { + return e; + } +} +q(); +pe(); +Wa(); +X(); +Ho(); +Wt(); +Me(); +Wi(); +bh(); +var m$t = class extends H { + static { + this.ID = "workbench.contrib.accessibilityStatus"; + } + constructor(e, t, s, n) { + super(); + this.g = e; + this.h = t; + this.j = s; + this.m = n; + this.a = null; + this.b = false; + this.f = this.D(new ki()); + this.D(ei.registerCommand({ + id: "showEditorScreenReaderNotification", + handler: () => this.q() + })); + this.r(this.j.isScreenReaderOptimized()); + this.n(); + } + n() { + this.D(this.j.onDidChangeScreenReaderOptimized(() => this.s())); + this.D(this.g.onDidChangeConfiguration(e => { + if (e.affectsConfiguration("editor.accessibilitySupport")) { + this.s(); + } + })); + } + q() { + this.a = this.h.prompt(cs.Info, f(4441, null), [{ + label: f(4442, null), + run: () => { + this.g.updateValue("editor.accessibilitySupport", "on", 2); + } + }, { + label: f(4443, null), + run: () => { + this.g.updateValue("editor.accessibilitySupport", "off", 2); + } + }], { + sticky: true, + priority: Ru.URGENT + }); + de.once(this.a.onDidClose)(() => this.a = null); + } + r(e) { + if (e) { + if (!this.f.value) { + const t = f(4444, null); + this.f.value = this.m.addEntry({ + name: f(4445, null), + text: t, + ariaLabel: t, + command: "showEditorScreenReaderNotification", + kind: "prominent", + showInAllWindows: true + }, "status.editor.screenReaderMode", 1, 100.6); + } + } else { + this.f.clear(); + } + } + s() { + if (this.j.isScreenReaderOptimized() && this.g.getValue("editor.accessibilitySupport") === "auto") { + if (!this.b) { + this.b = true; + setTimeout(() => this.q(), 100); + } + } + if (this.a) { + this.a.close(); + } + this.r(this.j.isScreenReaderOptimized()); + } +}; +m$t = __decorate([__param(0, ve), __param(1, ni), __param(2, na), __param(3, bu)], m$t); +q(); +var b$t = class extends H { + static { + this.ID = "workbench.contrib.saveAccessibilitySignal"; + } + constructor(e, t) { + super(); + this.a = e; + this.b = t; + this.D(this.b.onDidSave(s => this.a.playSignal(el.save, { + userGesture: s.reason === 1 + }))); + } +}; +b$t = __decorate([__param(0, Pd), __param(1, Tp)], b$t); +q(); +wa(); +X(); +Ho(); +Me(); +vt(); +pe(); +var v$t = class extends H { + static { + this.ID = "workbench.contrib.diffEditorActiveAnnouncement"; + } + constructor(e, t, s) { + super(); + this.b = e; + this.c = t; + this.f = s; + this.D(de.runAndSubscribe(t.onDidChangeScreenReaderOptimized, () => this.g())); + this.D(s.onDidChangeConfiguration(n => { + if (n.affectsConfiguration("accessibility.verbosity.diffEditorActive")) { + this.g(); + } + })); + } + g() { + const e = this.f.getValue("accessibility.verbosity.diffEditorActive"); + const t = this.c.isScreenReaderOptimized(); + if (!e || !t) { + this.a?.dispose(); + this.a = undefined; + return; + } + this.a ||= this.D(this.b.onDidActiveEditorChange(() => { + if (_f(this.b.activeTextEditorControl)) { + this.c.alert(f(4496, null)); + } + })); + } +}; +v$t = __decorate([__param(0, Te), __param(1, na), __param(2, ve)], v$t); +q(); +var y$t = class extends H { + static { + this.ID = "workbench.contrib.speechAccessibilitySignal"; + } + constructor(e, t) { + super(); + this.a = e; + this.b = t; + this.D(this.b.onDidStartSpeechToTextSession(() => this.a.playSignal(el.voiceRecordingStarted))); + this.D(this.b.onDidEndSpeechToTextSession(() => this.a.playSignal(el.voiceRecordingStopped))); + } +}; +y$t = __decorate([__param(0, Pd), __param(1, t6)], y$t); +xe(); +_a(); +wc(); +He(); +q(); +kF(); +rt(); +Rt(); +Le(); +en(); +Yg(); +Rs(); +Rn(); +X(); +Ho(); +Je(); +Wt(); +Me(); +Ee(); +ks(); +te(); +Fi(); +gs(); +mn(); +qt(); +No(); +function tWo(i, e) { + if (!e) { + return; + } + const t = []; + const s = []; + const n = e.matchAll(/(\[^\<]*)\>)/gm); + for (const o of [...n]) { + const a = o?.groups?.commandId; + let l; + if (o?.length && a) { + const c = i.lookupKeybinding(a)?.getAriaLabel(); + if (c) { + l = " (" + c + ")"; + s.push({ + label: a, + id: a + }); + } else { + l = " (unassigned keybinding)"; + t.push({ + label: a, + id: a + }); + } + e = e.replace(o[0], l); + } + } + const r = new hs(e); + r.isTrusted = true; + return { + content: r, + configureKeybindingItems: t.length ? t : undefined, + configuredKeybindingItems: s.length ? s : undefined + }; +} +At(); +Ms(); +var nMn; +(function (i) { + i[i.MAX_WIDTH = 600] = "MAX_WIDTH"; +})(nMn ||= {}); +var eBi = class extends H { + get editorWidget() { + return this.a; + } + constructor(e, t, s, n, r, o, a, l, c, u, d, h, g, p, b) { + super(); + this.L = e; + this.M = t; + this.N = s; + this.O = n; + this.P = r; + this.Q = o; + this.R = a; + this.S = l; + this.U = c; + this.W = u; + this.X = d; + this.Y = h; + this.Z = g; + this.$ = p; + this.ab = b; + this.w = false; + this.b = pP.bindTo(this.Q); + this.g = Pp.bindTo(this.Q); + this.h = mCe.bindTo(this.Q); + this.j = xii.bindTo(this.Q); + this.m = kii.bindTo(this.Q); + this.n = nm.bindTo(this.Q); + this.q = avt.bindTo(this.Q); + this.r = bCe.bindTo(this.Q); + this.f = $Us.bindTo(this.Q); + this.s = Eii.bindTo(this.Q); + this.t = Iii.bindTo(this.Q); + this.z = document.createElement("div"); + this.z.classList.add("accessible-view"); + if (this.N.getValue("accessibility.hideAccessibleView")) { + this.z.classList.add("hide"); + } + const v = { + contributions: nd.getEditorContributions().filter(x => x.id !== yD.ID) + }; + const y = document.createElement("div"); + y.classList.add("accessible-view-title-bar"); + this.C = document.createElement("div"); + this.C.classList.add("accessible-view-title"); + y.appendChild(this.C); + const w = document.createElement("div"); + w.classList.add("accessible-view-action-bar"); + y.appendChild(w); + this.z.appendChild(y); + this.F = this.D(t.createInstance(Dp, w, { + orientation: 0 + })); + this.F.context = { + viewId: "accessibleView" + }; + const C = this.F.getElement(); + C.tabIndex = 0; + const S = { + ...OO(this.N), + lineDecorationsWidth: 6, + dragAndDrop: false, + cursorWidth: 1, + wordWrap: "off", + wrappingStrategy: "advanced", + wrappingIndent: "none", + padding: { + top: 2, + bottom: 2 + }, + quickSuggestions: false, + renderWhitespace: "none", + dropIntoEditor: { + enabled: false + }, + readOnly: true, + fontFamily: "var(--monaco-monospace-font)" + }; + this.$.registerTextModelContentProvider(me.accessibleView, this); + this.a = this.D(this.M.createInstance(gh, this.z, S, v)); + this.D(this.R.onDidChangeScreenReaderOptimized(() => { + if (this.G && this.b.get()) { + this.show(this.G); + } + })); + this.D(this.N.onDidChangeConfiguration(x => { + if (this.G instanceof uw && x.affectsConfiguration(this.G.verbositySettingKey)) { + if (this.b.get()) { + this.show(this.G); + } + this.j.set(this.N.getValue(this.G.verbositySettingKey)); + this.hb(this.G.actions, this.G.options.type); + } + if (x.affectsConfiguration("accessibility.hideAccessibleView")) { + this.z.classList.toggle("hide", this.N.getValue("accessibility.hideAccessibleView")); + } + })); + this.D(this.a.onDidDispose(() => this.bb())); + this.D(this.a.onDidChangeCursorPosition(() => { + this.f.set(this.a.getPosition()?.lineNumber === this.a.getModel()?.getLineCount()); + })); + this.D(this.a.onDidChangeCursorPosition(() => { + const x = this.a.getPosition()?.lineNumber; + if (this.u && x !== undefined) { + const k = this.u.find(E => E.startLine <= x && E.endLine >= x) !== undefined; + this.q.set(k); + } + })); + } + provideTextContent(e) { + return this.jb(e); + } + bb() { + this.b.reset(); + this.g.reset(); + this.h.reset(); + this.j.reset(); + this.m.reset(); + this.n.reset(); + this.t.reset(); + this.s.reset(); + } + getPosition(e) { + if (!!e && !!this.I && this.I.id === e) { + return this.a.getPosition() || undefined; + } + } + setPosition(e, t, s) { + this.a.setPosition(e); + if (t) { + this.a.revealPosition(e); + } + if (s) { + const n = this.a.getModel()?.getLineLength(e.lineNumber) ?? 0; + if (n) { + this.a.setSelection({ + startLineNumber: e.lineNumber, + startColumn: 1, + endLineNumber: e.lineNumber, + endColumn: n + 1 + }); + } + } + } + getCodeBlockContext() { + const e = this.a.getPosition(); + if (!this.u?.length || !e) { + return; + } + const t = this.u?.findIndex(n => n.startLine <= e?.lineNumber && n.endLine >= e?.lineNumber); + const s = t !== undefined && t > -1 ? this.u[t] : undefined; + if (!!s && t !== undefined) { + return { + code: s.code, + languageId: s.languageId, + codeBlockIndex: t, + element: undefined + }; + } + } + navigateToCodeBlock(e) { + const t = this.a.getPosition(); + if (!this.u?.length || !t) { + return; + } + let s; + const n = this.u.slice(); + if (e === "previous") { + s = n.reverse().find(r => r.endLine < t.lineNumber); + } else { + s = n.find(r => r.startLine > t.lineNumber); + } + if (s) { + this.setPosition(new je(s.startLine, 1), true); + } + } + showLastProvider(e) { + if (!!this.I && this.I.options.id === e) { + this.show(this.I); + } + } + show(e, t, s, n) { + e = e ?? this.G; + if (!e) { + return; + } + e.onOpen?.(); + const r = { + getAnchor: () => ({ + x: js().innerWidth / 2 - Math.min(this.U.activeContainerDimension.width * 0.62, 600) / 2, + y: this.U.activeContainerOffset.quickPickTop + }), + render: o => { + this.J = o; + this.J.classList.add("accessible-view-container"); + return this.gb(e, o, s); + }, + onHide: () => { + if (!s) { + this.lb(); + this.G?.dispose(); + this.G = undefined; + this.bb(); + } + } + }; + this.P.showContextView(r); + if (n) { + queueMicrotask(() => { + this.a.revealLine(n.lineNumber); + this.a.setSelection({ + startLineNumber: n.lineNumber, + startColumn: n.column, + endLineNumber: n.lineNumber, + endColumn: n.column + }); + }); + } + if (t && this.G) { + this.showSymbol(this.G, t); + } + if (e instanceof uw && e.onDidRequestClearLastProvider) { + this.D(e.onDidRequestClearLastProvider(o => { + if (this.I?.options.id === o) { + this.I = undefined; + } + })); + } + if (e.options.id) { + this.I = e; + } + if (e.id === "panelChat" || e.id === "quickChat") { + this.D(this.Y.registerProvider({ + getCodeBlockContext: () => this.getCodeBlockContext() + }, "accessibleView")); + } + if (e instanceof Zvt) { + this.Z.store(`${jot}${e.id}`, true, -1, 0); + } + if (e.onDidChangeContent) { + this.D(e.onDidChangeContent(() => { + if (this.J) { + this.gb(e, this.J, s); + } + })); + } + } + previous() { + const e = this.G?.providePreviousContent?.(); + if (!!this.G && !!this.J && !!e) { + this.gb(this.G, this.J, undefined, e); + } + } + next() { + const e = this.G?.provideNextContent?.(); + if (!!this.G && !!this.J && !!e) { + this.gb(this.G, this.J, undefined, e); + } + } + cb() { + if (this.G) { + if (this.G instanceof uw) { + return this.N.getValue(this.G.verbositySettingKey) === true; + } else { + return this.Z.getBoolean(`${jot}${this.G.id}`, -1, false); + } + } else { + return false; + } + } + goToSymbol() { + if (this.G) { + this.M.createInstance(iBi, this).show(this.G); + } + } + calculateCodeBlocks(e) { + if (!e || this.G?.id !== "panelChat" && this.G?.id !== "quickChat" || this.G.options.language && this.G.options.language !== "markdown") { + return; + } + const t = e.split(` +`); + this.u = []; + let s = false; + let n = 0; + let r; + t.forEach((o, a) => { + if (!s && o.startsWith("```")) { + s = true; + n = a + 1; + r = o.substring(3).trim(); + } else if (s && o.endsWith("```")) { + s = false; + const l = a; + const c = t.slice(n, l).join(` +`); + this.u?.push({ + startLine: n, + endLine: l, + code: c, + languageId: r + }); + } + }); + this.r.set(this.u.length > 0); + } + getSymbols() { + const e = this.G instanceof uw ? this.G : undefined; + if (!this.H || !e) { + return; + } + const t = e.getSymbols?.() || []; + if (t?.length) { + return t; + } + if (e.options.language && e.options.language !== "markdown") { + return; + } + const s = th.lexer(this.H); + if (s) { + this.db(s, t); + if (t.length) { + return t; + } else { + return undefined; + } + } + } + openHelpLink() { + if (this.G?.options.readMoreUrl) { + this.L.open(V.parse(this.G.options.readMoreUrl)); + } + } + configureKeybindings(e) { + this.w = true; + const t = this.lb(); + const s = e ? t?.options?.configureKeybindingItems : t?.options?.configuredKeybindingItems; + if (!s) { + return; + } + const n = this.D(new Q()); + const r = n.add(this.ab.createQuickPick()); + r.items = s; + r.title = f(4446, null); + r.placeholder = f(4447, null); + r.show(); + n.add(r.onDidAccept(async () => { + const o = r.selectedItems[0]; + if (o) { + await this.X.executeCommand("workbench.action.openGlobalKeybindings", o.id); + } + r.dispose(); + })); + n.add(r.onDidHide(() => { + if (!r.selectedItems.length && t) { + this.show(t); + } + n.dispose(); + this.w = false; + })); + } + db(e, t) { + let s; + for (const n of e) { + let r; + if ("type" in n) { + switch (n.type) { + case "heading": + case "paragraph": + case "code": + r = n.text; + break; + case "list": + { + const o = n.items[0]; + if (!o) { + break; + } + s = `- ${o.text}`; + r = n.items.map(a => a.text).join(", "); + break; + } + } + } + if (r) { + t.push({ + markdownToParse: r, + label: f(4448, null, n.type, r), + ariaLabel: f(4449, null, n.type, r), + firstListItem: s + }); + s = undefined; + } + } + } + showSymbol(e, t) { + if (!this.H) { + return; + } + let s = t.lineNumber; + const n = t.markdownToParse; + if (s !== undefined || n !== undefined) { + if (s === undefined && n) { + const r = this.H.split(` +`).findIndex(o => o.includes(n.split(` +`)[0]) || t.firstListItem && o.includes(t.firstListItem)) ?? -1; + if (r >= 0) { + s = r + 1; + } + } + if (s !== undefined) { + this.show(e, undefined, undefined, { + lineNumber: s, + column: 1 + }); + this.eb(e, true); + } + } + } + disableHint() { + if (this.G instanceof uw) { + this.N.updateValue(this.G?.verbositySettingKey, false); + Fc(f(4450, null, this.G.verbositySettingKey)); + } + } + eb(e, t) { + if (e.options.type === "help") { + this.b.set(t); + this.g.reset(); + } else { + this.g.set(t); + this.b.reset(); + } + this.h.set(e.provideNextContent !== undefined || e.providePreviousContent !== undefined); + this.j.set(this.cb()); + this.m.set(this.kb() ? this.getSymbols()?.length > 0 : false); + } + fb(e, t) { + let s = t ?? e.provideContent(); + if (e.options.type === "view") { + this.H = s; + this.s.reset(); + this.t.reset(); + return; + } + const n = this.vb(e); + const r = this.pb(e); + const o = this.tb(e); + const a = this.ub(e); + let l = ""; + let c = ""; + const u = tWo(this.S, o + s + n + r + a); + if (u) { + s = u.content.value; + if (u.configureKeybindingItems) { + e.options.configureKeybindingItems = u.configureKeybindingItems; + this.s.set(true); + l = this.rb(); + } else { + this.t.reset(); + } + if (u.configuredKeybindingItems) { + e.options.configuredKeybindingItems = u.configuredKeybindingItems; + this.t.set(true); + c = this.sb(); + } else { + this.t.reset(); + } + } + this.H = s + l + c; + } + gb(e, t, s, n) { + this.G = e; + this.n.set(e.id); + const r = this.cb(); + this.fb(e, n); + this.calculateCodeBlocks(this.H); + this.eb(e, true); + const o = this.a.hasTextFocus() || this.a.hasWidgetFocus(); + this.jb(V.from({ + path: `accessible-view-${e.id}`, + scheme: me.accessibleView, + fragment: this.H + })).then(c => { + if (!c || (this.a.setModel(c), !this.a.getDomNode())) { + return; + } + c.setLanguage(e.options.language ?? "markdown"); + t.appendChild(this.z); + let d = ""; + const h = this.h.get() || this.j.get() || this.m.get() || e.actions?.length; + if (r && !s && h) { + d = e.options.position ? f(4451, null) : f(4452, null); + } + let g = e.options.type === "help" ? f(4453, null) : f(4454, null); + this.C.textContent = g; + if (d && e.options.type === "view") { + g = f(4455, null, d); + } else if (d) { + g = f(4456, null, d); + } + if (ln && o) { + g = ""; + } + this.a.updateOptions({ + ariaLabel: g + }); + this.a.focus(); + if (this.G?.options.position) { + const p = this.a.getPosition(); + const b = p?.lineNumber === 1 && p.column === 1; + if (this.G.options.position === "bottom" || this.G.options.position === "initial-bottom" && b) { + const v = this.editorWidget.getModel()?.getLineCount(); + const y = v !== undefined && v > 0 ? new je(v, 1) : undefined; + if (y) { + this.a.setPosition(y); + this.a.revealLine(y.lineNumber); + } + } + } + }); + this.hb(this.G.actions, e.options.type); + const a = c => { + if (!this.w) { + e.onClose(); + } + c?.stopPropagation(); + this.P.hideContextView(); + this.eb(e, false); + this.I = undefined; + this.H = undefined; + this.G?.dispose(); + this.G = undefined; + }; + const l = new Q(); + l.add(this.a.onKeyDown(c => { + if (c.keyCode === 3) { + this.X.executeCommand("editor.action.openLink"); + } else if (c.keyCode === 9 || iWo(c.browserEvent, this.S, this.N)) { + a(c); + } else if (c.keyCode === 38 && e.options.readMoreUrl) { + const u = e.options.readMoreUrl; + Fc(Ag.openingDocs); + this.L.open(V.parse(u)); + c.preventDefault(); + c.stopPropagation(); + } + if (e instanceof uw) { + e.onKeyDown?.(c); + } + })); + l.add(Ce(this.F.getElement(), Oe.KEY_DOWN, c => { + if (new wr(c).equals(9)) { + a(c); + } + })); + l.add(this.a.onDidBlurEditorWidget(() => { + if (!Jg(this.F.getElement())) { + a(); + } + })); + l.add(this.a.onDidContentSizeChange(() => this.ib())); + l.add(this.U.onDidLayoutActiveContainer(() => this.ib())); + return l; + } + hb(e, t) { + this.F.setAriaLabel(f(t === "help" ? 4457 : 4458, null)); + const s = this.D(this.W.createMenu(_.AccessibleView, this.Q)); + const n = P1(s.getActions({})); + if (e) { + for (const r of e) { + r.class = r.class || le.asClassName(A.primitiveSquare); + r.checked = undefined; + } + this.F.setActions([...e, ...n]); + } else { + this.F.setActions(n); + } + } + ib() { + const e = this.U.activeContainerDimension; + const t = e.height && e.height * 0.4; + const s = Math.min(t, this.a.getContentHeight()); + const n = Math.min(e.width * 0.62, 600); + this.a.layout({ + width: n, + height: s + }); + } + async jb(e) { + const t = this.O.getModel(e); + if (t && !t.isDisposed()) { + return t; + } else { + return this.O.createModel(e.fragment, null, e, false); + } + } + kb() { + if (this.G) { + return this.G.options.type === "help" || this.G.options.language === "markdown" || this.G.options.language === undefined || this.G instanceof uw && !!this.G.getSymbols?.(); + } else { + return false; + } + } + lb() { + const e = this.G; + if (e) { + if (e instanceof uw) { + return new uw(e.id, e.options, e.provideContent.bind(e), e.onClose.bind(e), e.verbositySettingKey, e.onOpen?.bind(e), e.actions, e.provideNextContent?.bind(e), e.providePreviousContent?.bind(e), e.onDidChangeContent?.bind(e), e.onKeyDown?.bind(e), e.getSymbols?.bind(e)); + } else { + return new Zvt(e.id, e.options, e.provideContent.bind(e), e.onClose.bind(e), e.onOpen?.bind(e), e.provideNextContent?.bind(e), e.providePreviousContent?.bind(e), e.actions, e.onDidChangeContent?.bind(e)); + } + } else { + return undefined; + } + } + showAccessibleViewHelp() { + const e = this.lb(); + if (!e) { + return; + } + let t; + if (e instanceof uw) { + t = new uw(e.id, { + type: "help" + }, () => e.options.customHelp ? e?.options.customHelp() : this.mb(this.kb()), () => { + this.P.hideContextView(); + queueMicrotask(() => this.show(e)); + }, e.verbositySettingKey); + } else { + t = new Zvt(e.id, { + type: "help" + }, () => e.options.customHelp ? e?.options.customHelp() : this.mb(this.kb()), () => { + this.P.hideContextView(); + queueMicrotask(() => this.show(e)); + }); + } + this.P.hideContextView(); + if (t) { + queueMicrotask(() => this.show(t, undefined, true)); + } + } + mb(e) { + const t = this.ob(); + const s = this.qb(e); + const n = f(4459, null); + const r = this.nb(); + let o = f(4460, null); + if (t) { + o += `${" - " + t} +`; + } + if (s) { + o += `${" - " + s} +`; + } + if (n) { + o += `${" - " + n} +`; + } + if (r) { + o += r; + } + return o; + } + nb() { + if (this.G?.id === "panelChat" || this.G?.id === "quickChat") { + return [f(4461, null, ""), f(4462, null, ""), f(4463, null, "")].join(` +`); + } + } + ob() { + return f(4464, null, ""); + } + pb(e) { + if (e.options.type === "help" && this.cb()) { + return f(4465, null, ""); + } else { + return ""; + } + } + qb(e) { + if (e) { + return f(4466, null, ""); + } + } + rb() { + const e = this.S.lookupKeybinding("editor.action.accessibilityHelpConfigureKeybindings")?.getAriaLabel(); + const t = e ? "(" + e + ")" : "by assigning a keybinding to the command Accessibility Help Configure Unassigned Keybindings."; + return f(4467, null, t); + } + sb() { + const e = this.S.lookupKeybinding("editor.action.accessibilityHelpConfigureAssignedKeybindings")?.getAriaLabel(); + const t = e ? "(" + e + ")" : "by assigning a keybinding to the command Accessibility Help Configure Assigned Keybindings."; + return f(4468, null, t); + } + tb(e) { + const t = this.R.isScreenReaderOptimized(); + let s = ""; + const n = Gt ? Ag.changeConfigToOnMac : Ag.changeConfigToOnWinLinux; + if (t && e.id === "editor") { + s = Ag.auto_on; + s += ` +`; + } else if (!t) { + s = `${Ag.auto_off} +${n}`; + s += ` +`; + } + return s; + } + ub(e) { + if (this.cb() && !e.options.position) { + return f(4469, null); + } else { + return ""; + } + } + vb(e) { + if (e.options.readMoreUrl) { + return f(4470, null, ""); + } else { + return ""; + } + } +}; +eBi = __decorate([__param(0, os), __param(1, re), __param(2, ve), __param(3, $s), __param(4, Sc), __param(5, Ne), __param(6, na), __param(7, oi), __param(8, wh), __param(9, Hn), __param(10, gt), __param(11, yvt), __param(12, ht), __param(13, ns), __param(14, zi)], eBi); +var tBi = class extends H { + constructor(e, t, s) { + super(); + this.b = e; + this.f = t; + this.g = s; + } + show(e, t) { + this.a ||= this.D(this.b.createInstance(eBi)); + this.a.show(e, undefined, undefined, t); + } + configureKeybindings(e) { + this.a?.configureKeybindings(e); + } + openHelpLink() { + this.a?.openHelpLink(); + } + showLastProvider(e) { + this.a?.showLastProvider(e); + } + next() { + this.a?.next(); + } + previous() { + this.a?.previous(); + } + goToSymbol() { + this.a?.goToSymbol(); + } + getOpenAriaHint(e) { + if (!this.f.getValue(e)) { + return null; + } + const t = this.g.lookupKeybinding("editor.action.accessibleView")?.getAriaLabel(); + let s = null; + if (t) { + s = f(4471, null, t); + } else { + s = f(4472, null); + } + return s; + } + disableHint() { + this.a?.disableHint(); + } + showAccessibleViewHelp() { + this.a?.showAccessibleViewHelp(); + } + getPosition(e) { + return this.a?.getPosition(e) ?? undefined; + } + getLastPosition() { + const e = this.a?.editorWidget.getModel()?.getLineCount(); + if (e !== undefined && e > 0) { + return new je(e, 1); + } else { + return undefined; + } + } + setPosition(e, t, s) { + this.a?.setPosition(e, t, s); + } + getCodeBlockContext() { + return this.a?.getCodeBlockContext(); + } + navigateToCodeBlock(e) { + this.a?.navigateToCodeBlock(e); + } +}; +tBi = __decorate([__param(0, re), __param(1, ve), __param(2, oi)], tBi); +var iBi = class { + constructor(e, t) { + this.a = e; + this.b = t; + } + show(e) { + const t = new Q(); + const s = t.add(this.b.createQuickPick()); + s.placeholder = f(4473, null); + s.title = f(4474, null); + const n = []; + const r = this.a.getSymbols(); + if (r) { + for (const o of r) { + n.push({ + label: o.label, + ariaLabel: o.ariaLabel + }); + } + s.canSelectMany = false; + s.items = r; + s.show(); + t.add(s.onDidAccept(() => { + this.a.showSymbol(e, s.selectedItems[0]); + s.hide(); + })); + t.add(s.onDidHide(() => { + if (s.selectedItems.length === 0) { + this.a.show(e); + } + t.dispose(); + })); + } + } +}; +iBi = __decorate([__param(1, zi)], iBi); +function iWo(i, e, t) { + if (!t.getValue("accessibility.accessibleView.closeOnKeyPress")) { + return false; + } + const s = new wr(i); + const r = e.softDispatch(s, s.target).kind === 1; + if (e.inChordMode || r) { + return false; + } else { + return sWo(i) && !i.ctrlKey && !i.altKey && !i.metaKey && !i.shiftKey; + } +} +function sWo(i) { + return !!i.code.match(/^(Key[A-Z]|Digit[0-9]|Equal|Comma|Period|Slash|Quote|Backquote|Backslash|Minus|Semicolon|Space|Enter)$/); +} +q(); +var nWo = class extends H { + constructor() { + super(); + this.D(hkt.addImplementation(115, "accessible-view-help", i => { + i.get(Xm).showAccessibleViewHelp(); + return true; + }, Pp)); + } +}; +var rWo = class extends H { + constructor() { + super(); + Db.getImplementations().forEach(i => { + const e = t => { + const s = i.getProvider(t); + if (!s) { + return false; + } + try { + t.get(Xm).show(s); + return true; + } catch { + s.dispose(); + return false; + } + }; + if (i.type === "view") { + this.D(avi.addImplementation(i.priority, i.name, e, i.when)); + } else { + this.D(hkt.addImplementation(i.priority, i.name, e, i.when)); + } + }); + } +}; +q(); +Fi(); +Ht(); +Qn(); +lo(); +var w$t = class extends H { + static { + this.ID = "extensionAccessibilityHelpDialogContribution"; + } + constructor(e) { + super(); + this.a = this.D(new Bo()); + this.D(Pe.as(ur.ViewsRegistry).onViewsRegistered(t => { + for (const s of t) { + for (const n of s.views) { + if (n.accessibilityHelpContent) { + this.a.set(n.id, rMn(e, n)); + } + } + } + })); + this.D(Pe.as(ur.ViewsRegistry).onViewsDeregistered(t => { + for (const s of t.views) { + if (s.accessibilityHelpContent) { + this.a.get(s.id)?.dispose(); + } + } + })); + } +}; +w$t = __decorate([__param(0, oi)], w$t); +function rMn(i, e) { + const t = new Q(); + const s = e.accessibilityHelpContent?.value; + if (!s) { + throw new Error("No content provided for the accessibility help dialog"); + } + t.add(Db.register({ + priority: 95, + name: e.id, + type: "help", + when: Rg.isEqualTo(e.id), + getProvider: n => { + const r = n.get(zs); + return new Zvt(e.id, { + type: "help" + }, () => s, () => r.openView(e.id, true)); + } + })); + t.add(i.onDidUpdateKeybindings(() => { + t.clear(); + t.add(rMn(i, e)); + })); + return t; +} +Z1r(); +it(Xm, tBi, 1); +it(Phi, Lhi, 1); +var C$t = Pe.as(Er.Workbench); +C$t.registerWorkbenchContribution(D5o, 4); +C$t.registerWorkbenchContribution(Z_i, 3); +C$t.registerWorkbenchContribution(nWo, 4); +C$t.registerWorkbenchContribution(rWo, 4); +Yn(m$t.ID, m$t, 2); +Yn(w$t.ID, w$t, 2); +Yn(b$t.ID, b$t, 3); +Yn(y$t.ID, y$t, 3); +Yn(v$t.ID, v$t, 3); +Yn(lvt.ID, lvt, 3); +ri(); +He(); +No(); +X(); +Je(); +Xa(); +Me(); +Ee(); +Nn(); +fn(); +It(); +Wi(); +gs(); +Ht(); +ii(); +Xn(); +X(); +Ee(); +jn(); +mn(); +ai(); +var oMn = new fe("shareProviderCount", 0, f(9920, null)); +var sBi = class { + constructor(e, t, s, n, r) { + this.d = e; + this.e = t; + this.f = s; + this.g = n; + this.h = r; + this.c = new Set(); + this.providerCount = oMn.bindTo(this.d); + } + registerShareProvider(e) { + this.c.add(e); + this.providerCount.set(this.c.size); + return { + dispose: () => { + this.c.delete(e); + this.providerCount.set(this.c.size); + } + }; + } + getShareActions() { + return []; + } + async provideShare(e, t) { + const s = this.g.getActiveCodeEditor()?.getModel()?.getLanguageId() ?? ""; + const n = [...this.c.values()].filter(a => ICe(a.selector, e.resourceUri, s, true, undefined, undefined) > 0).sort((a, l) => a.priority - l.priority); + if (n.length === 0) { + return; + } + if (n.length === 1) { + this.h.publicLog2("shareService.share", { + providerId: n[0].id + }); + return n[0].provideShare(e, t); + } + const r = n.map(a => ({ + label: a.label, + provider: a + })); + const o = await this.f.pick(r, { + canPickMany: false, + placeHolder: f(9921, null, this.e.getUriLabel(e.resourceUri)) + }, t); + if (o !== undefined) { + this.h.publicLog2("shareService.share", { + providerId: o.provider.id + }); + return o.provider.provideShare(e, t); + } + } +}; +sBi = __decorate([__param(0, Ne), __param(1, Zs), __param(2, zi), __param(3, ps), __param(4, Ot)], sBi); +vt(); +so(); +Xn(); +Qr(); +q(); +var qTe; +var oWo = [_.EditorContextShare, _.SCMResourceContextShare, _.OpenEditorsContextShare, _.EditorTitleContextShare, _.MenubarShare, _.ExplorerContextShare]; +var nBi = class extends H { + static { + qTe = this; + } + static { + this.a = "workbench.experimental.share.enabled"; + } + constructor(e, t) { + super(); + this.c = e; + this.f = t; + if (this.f.getValue(qTe.a)) { + this.g(); + } + this.D(this.f.onDidChangeConfiguration(s => { + if (s.affectsConfiguration(qTe.a)) { + const n = this.f.getValue(qTe.a); + if (n === true && this.b === undefined) { + this.g(); + } else if (n === false && this.b !== undefined) { + this.b?.clear(); + this.b = undefined; + } + } + })); + } + dispose() { + super.dispose(); + this.b?.dispose(); + } + g() { + this.b ||= new Q(); + this.b.add(J(class tUi extends se { + static { + this.ID = "workbench.action.share"; + } + static { + this.LABEL = W(9919, "Share..."); + } + constructor() { + super({ + id: tUi.ID, + title: tUi.LABEL, + f1: true, + icon: A.linkExternal, + precondition: T.and(oMn.notEqualsTo(0), GG.notEqualsTo(0)), + keybinding: { + weight: 200, + primary: 2609 + }, + menu: [{ + id: _.CommandCenter, + order: 1000 + }] + }); + } + async run(s, ...n) { + const r = s.get(qkt); + const o = s.get(Te)?.activeEditor; + const a = (o && vo.getOriginalUri(o, { + supportSideBySide: fo.PRIMARY + })) ?? s.get(kt).getWorkspace().folders[0].uri; + const l = s.get(Zr); + const c = s.get(Js); + const u = s.get(os); + const d = s.get(ra); + const h = s.get(ps).getActiveCodeEditor()?.getSelection() ?? undefined; + const g = await d.withProgress({ + location: 10, + detail: f(9913, null) + }, async () => r.provideShare({ + resourceUri: a, + selection: h + }, mt.None)); + if (g) { + const p = g.toString(); + const b = typeof g == "string"; + await l.writeText(p); + c.prompt({ + type: es.Info, + message: f(b ? 9914 : 9915, null), + custom: { + icon: A.check, + markdownDetails: [{ + markdown: new hs(`
    ${p}
    `, { + supportHtml: true + }), + classes: [b ? "share-dialog-input-text" : "share-dialog-input-link"] + }] + }, + cancelButton: f(9916, null), + buttons: b ? [] : [{ + label: f(9917, null), + run: () => { + u.open(g, { + openExternal: true + }); + } + }] + }); + } + } + })); + const e = this.c.getShareActions(); + for (const t of oWo) { + for (const s of e) { + this.b.add(Be.appendMenuItem(t, s)); + } + } + } +}; +nBi = qTe = __decorate([__param(0, qkt), __param(1, ve)], nBi); +it(qkt, sBi, 1); +var aWo = Pe.as(Er.Workbench); +aWo.registerWorkbenchContribution(nBi, 4); +Pe.as(rr.Configuration).registerConfiguration({ + ...Qx, + properties: { + "workbench.experimental.share.enabled": { + type: "boolean", + default: false, + tags: ["experimental"], + markdownDescription: f(9918, null, "`#window.commandCenter#`", "`true`"), + restricted: false + } + } +}); +q(); +X(); +Je(); +Fi(); +Nn(); +vt(); +bh(); +var S$t = class extends H { + static { + this.ID = "workbench.contrib.syncScrolling"; + } + constructor(e, t) { + super(); + this.h = e; + this.j = t; + this.a = new Map(); + this.b = this.D(new Q()); + this.c = new Q(); + this.f = this.D(new ki()); + this.g = false; + this.q = new omi(); + this.y(); + } + m() { + this.b.add(this.h.onDidVisibleEditorsChange(() => this.r())); + } + n() { + this.m(); + this.r(); + } + toggle() { + if (this.g) { + this.u(); + } else { + this.n(); + } + this.g = !this.g; + this.w(this.g); + } + r() { + this.c.clear(); + this.a.clear(); + for (const e of this.t()) { + if ($Gt(e)) { + this.a.set(e, e.getScrollPosition()); + this.c.add(e.onDidChangeScroll(() => this.q.runExclusivelyOrSkip(() => { + this.s(e); + }))); + } + } + } + s(e) { + const t = this.a.get(e); + if (t === undefined) { + throw new Error("Scrolled pane not tracked"); + } + if (!$Gt(e)) { + throw new Error("Scrolled pane does not support scrolling"); + } + const s = e.getScrollPosition(); + const n = { + scrollTop: s.scrollTop - t.scrollTop, + scrollLeft: s.scrollLeft !== undefined && t.scrollLeft !== undefined ? s.scrollLeft - t.scrollLeft : undefined + }; + for (const r of this.t()) { + if (r === e || !$Gt(r)) { + continue; + } + const o = this.a.get(r); + if (o === undefined) { + throw new Error("Could not find initial offset for pane"); + } + const a = r.getScrollPosition(); + const l = { + scrollTop: o.scrollTop + n.scrollTop, + scrollLeft: o.scrollLeft !== undefined && n.scrollLeft !== undefined ? o.scrollLeft + n.scrollLeft : undefined + }; + if (a.scrollTop !== l.scrollTop || a.scrollLeft !== l.scrollLeft) { + r.setScrollPosition(l); + } + } + } + t() { + const e = []; + for (const t of this.h.visibleEditorPanes) { + if (t instanceof IP) { + const s = t.getPrimaryEditorPane(); + const n = t.getSecondaryEditorPane(); + if (s) { + e.push(s); + } + if (n) { + e.push(n); + } + continue; + } + e.push(t); + } + return e; + } + u() { + this.c.clear(); + this.b.clear(); + this.a.clear(); + } + w(e) { + if (e) { + if (!this.f.value) { + const t = f(9610, null); + const s = f(9611, null); + this.f.value = this.j.addEntry({ + name: t, + text: t, + tooltip: s, + ariaLabel: t, + command: { + id: "workbench.action.toggleLockedScrolling", + title: "" + }, + kind: "prominent", + showInAllWindows: true + }, "status.scrollLockingEnabled", 1, 102); + } + } else { + this.f.clear(); + } + } + y() { + const e = this; + this.D(J(class extends se { + constructor() { + super({ + id: "workbench.action.toggleLockedScrolling", + title: { + ...W(9615, "Toggle Locked Scrolling Across Editors"), + mnemonicTitle: f(9612, null) + }, + category: pt.View, + f1: true, + metadata: { + description: f(9613, null) + } + }); + } + run() { + e.toggle(); + } + })); + this.D(J(class extends se { + constructor() { + super({ + id: "workbench.action.holdLockedScrolling", + title: { + ...W(9616, "Hold Locked Scrolling Across Editors"), + mnemonicTitle: f(9614, null) + }, + category: pt.View + }); + } + run(t) { + const s = t.get(oi); + e.toggle(); + const n = s.enableKeybindingHoldMode("workbench.action.holdLockedScrolling"); + if (n) { + n.finally(() => { + e.toggle(); + }); + } + } + })); + } + dispose() { + this.u(); + super.dispose(); + } +}; +S$t = __decorate([__param(0, Te), __param(1, bu)], S$t); +Yn(S$t.ID, S$t, 4); +en(); +q(); +An(); +Wa(); +Me(); +var rBi; +var x$t = class extends H { + static { + rBi = this; + } + static { + this.hot = vXt(rBi); + } + static { + this.Id = "vs.editor.contrib.inlineCompletionLanguageStatusBarContribution"; + } + constructor(e, t, s) { + super(); + this.b = e; + this.f = t; + this.g = s; + this.a = wS("editor.inlineSuggest.experimentalInlineEditsEnabled", false, this.g); + const n = sm.get(this.b); + this.D(eh((r, o) => { + if (!this.a.read(r)) { + return; + } + const a = n?.model.read(r); + if (!a) { + return; + } + const l = a.status.read(r); + const c = { + loading: { + shortLabel: "", + label: "Loading", + loading: true + }, + ghostText: { + shortLabel: "$(lightbulb)", + label: "Inline Completion available", + loading: false + }, + inlineEdit: { + shortLabel: "$(lightbulb-sparkle)", + label: "Inline Edit available", + loading: false + }, + noSuggestion: { + shortLabel: "$(circle-slash)", + label: "No inline suggestion available", + loading: false + } + }; + o.add(this.f.addStatus({ + accessibilityInfo: undefined, + busy: c[l].loading, + command: undefined, + detail: "Inline Suggestions", + id: "inlineSuggestions", + label: { + value: c[l].label, + shortValue: c[l].shortLabel + }, + name: "Inline Suggestions", + selector: { + pattern: a.textModel.uri.fsPath + }, + severity: cs.Info, + source: "inlineSuggestions" + })); + })); + } +}; +x$t = rBi = __decorate([__param(1, nle), __param(2, ve)], x$t); +bo(x$t.Id, _8s(x$t.hot), 3); +Qr(); +Ht(); +Fs(); +JF(); +X(); +var k$t = class { + static { + this.ID = "workbench.contrib.dropOrPasteInto"; + } + constructor(e) { + this.a = e; + rC.setConfigureDefaultAction(Ba({ + id: "workbench.action.configurePreferredPasteAction", + label: f(6286, null), + run: () => this.b() + })); + _R.setConfigureDefaultAction(Ba({ + id: "workbench.action.configurePreferredDropAction", + label: f(6287, null), + run: () => this.c() + })); + } + b() { + return this.a.openUserSettings({ + jsonEditor: true, + revealSetting: { + key: Nht, + edit: true + } + }); + } + c() { + return this.a.openUserSettings({ + jsonEditor: true, + revealSetting: { + key: PZt, + edit: true + } + }); + } +}; +k$t = __decorate([__param(0, fa)], k$t); +pe(); +q(); +Tr(); +JF(); +X(); +Qr(); +Fi(); +Ht(); +var oBi = []; +var lWo = { + type: "array", + scope: 5, + description: f(6288, null), + default: [], + items: { + description: f(6289, null), + anyOf: [{ + type: "string" + }, { + enum: oBi + }] + } +}; +var aBi = []; +var cWo = { + type: "array", + scope: 5, + description: f(6290, null), + default: [], + items: { + description: f(6291, null), + anyOf: [{ + type: "string" + }, { + enum: aBi + }] + } +}; +var aMn = Object.freeze({ + ...IA, + properties: { + [Nht]: cWo, + [PZt]: lWo + } +}); +var E$t = class extends H { + static { + this.ID = "workbench.contrib.dropOrPasteIntoSchema"; + } + constructor(e, t) { + super(); + this.f = t; + this.a = this.D(new B()); + this.b = []; + this.c = []; + this.D(de.runAndSubscribe(de.debounce(de.any(t.documentPasteEditProvider.onDidChange, t.documentPasteEditProvider.onDidChange), () => {}, 1000), () => { + this.g(); + this.h(); + this.a.fire(); + })); + e.registerSchemaContribution({ + getSchemaAdditions: () => this.j(), + onDidChange: this.a.event + }); + } + g() { + const e = new Map(); + for (const s of this.f.documentDropEditProvider.allNoModel()) { + for (const n of s.providedDropEditKinds ?? []) { + e.set(n.value, n); + } + } + this.b = Array.from(e.values()); + const t = new Map(); + for (const s of this.f.documentPasteEditProvider.allNoModel()) { + for (const n of s.providedPasteEditKinds ?? []) { + t.set(n.value, n); + } + } + this.c = Array.from(t.values()); + } + h() { + aBi.length = 0; + for (const e of this.c) { + aBi.push(e.value); + } + oBi.length = 0; + for (const e of this.b) { + oBi.push(e.value); + } + Pe.as(rr.Configuration).notifyConfigurationSchemaUpdated(aMn); + } + j() { + return [{ + if: { + required: ["command"], + properties: { + command: { + const: e8s + } + } + }, + then: { + properties: { + args: { + oneOf: [{ + required: ["kind"], + properties: { + kind: { + anyOf: [{ + enum: Array.from(this.c.map(e => e.value)) + }, { + type: "string" + }] + } + } + }, { + required: ["preferences"], + properties: { + preferences: { + type: "array", + items: { + anyOf: [{ + enum: Array.from(this.c.map(e => e.value)) + }, { + type: "string" + }] + } + } + } + }] + } + } + } + }]; + } +}; +E$t = __decorate([__param(0, oi), __param(1, nn)], E$t); +Yn(k$t.ID, k$t, 4); +Yn(E$t.ID, E$t, 4); +Pe.as(rr.Configuration).registerConfiguration(aMn); +q(); +Le(); +X(); +Cl(); +kn(); +No(); +Me(); +zt(); +pe(); +function uWo(i) { + return i.type === "gallery"; +} +function dWo(i) { + return i.type === 1 || i.type === 0; +} +var hWo = /^(?\d+\.\d+\.\d+(-.*)?)(@(?.+))?$/; +var lBi = class extends H { + constructor(e, t) { + super(); + this.f = t; + this.c = this.D(new B()); + this.onDidChangeAllowedExtensions = this.c.event; + this.b = e.extensionPublisherOrgs?.map(s => s.toLowerCase()) ?? []; + this.a = this.g(); + this.D(this.f.onDidChangeConfiguration(s => { + if (s.affectsConfiguration(Hse)) { + this.a = this.g(); + this.c.fire(); + } + })); + } + g() { + const e = this.f.getValue(Hse); + if (!xo(e) || Array.isArray(e)) { + return; + } + const t = Object.entries(e).map(([s, n]) => [s.toLowerCase(), n]); + if (t.length !== 1 || t[0][0] !== "*" || t[0][1] !== true) { + return Object.fromEntries(t); + } + } + isAllowed(e) { + if (!this.a) { + return true; + } + let t; + let s; + let n; + let r; + let o; + let a; + if (uWo(e)) { + t = e.identifier.id.toLowerCase(); + s = e.version; + r = e.properties.isPreReleaseVersion; + o = e.publisher.toLowerCase(); + a = e.publisherDisplayName.toLowerCase(); + n = e.properties.targetPlatform; + } else if (dWo(e)) { + t = e.identifier.id.toLowerCase(); + s = e.manifest.version; + r = e.preRelease; + o = e.manifest.publisher.toLowerCase(); + a = e.publisherDisplayName?.toLowerCase(); + n = e.targetPlatform; + } else { + t = e.id.toLowerCase(); + s = e.version ?? "*"; + n = e.targetPlatform ?? "universal"; + r = e.prerelease ?? false; + o = e.id.substring(0, e.id.indexOf(".")).toLowerCase(); + a = e.publisherDisplayName?.toLowerCase(); + } + const l = V.parse(`command:workbench.action.openSettings?${encodeURIComponent(JSON.stringify({ + query: `@id:${Hse}` + }))}`).toString(); + const c = this.a[t]; + const u = new hs(f(1819, null, l)); + if (!qo(c)) { + if (df(c)) { + if (c) { + return true; + } else { + return u; + } + } else if (c === "stable" && r) { + return new hs(f(1820, null, l)); + } else if (s !== "*" && Array.isArray(c) && !c.some(g => { + const p = hWo.exec(g); + if (p && p.groups) { + const { + platform: b, + version: v + } = p.groups; + return v === s && (n === "universal" || !b || n === b); + } + return false; + })) { + return new hs(f(1821, null, s, l)); + } else { + return true; + } + } + const d = a && this.b.includes(a) ? a : o; + const h = this.a[d]; + if (qo(h)) { + if (this.a["*"] === true) { + return true; + } else { + return u; + } + } else if (df(h)) { + if (h) { + return true; + } else { + return new hs(f(1822, null, d, l)); + } + } else if (h === "stable" && r) { + return new hs(f(1823, null, d, l)); + } else { + return true; + } + } +}; +lBi = __decorate([__param(0, ys), __param(1, ve)], lBi); +Je(); +Je(); +Cs(); +var fWo = class i3n extends se { + static { + this.ID = "workbench.action.openMCPSettings"; + } + constructor() { + super({ + id: i3n.ID, + title: { + value: "Open MCP Settings", + original: "Open MCP Settings" + }, + category: pt.View, + f1: true + }); + } + run(e) { + const t = e.get(uy); + e.get(_i).setNonPersistentStorage("cachedSettingsOpenData", { + openTab: "mcp" + }); + t.openPopup(); + } +}; +console.log("REGISTERING ACTION"); +J(fWo); +q(); +ii(); +em(); +nt(); +dne(); +Cs(); +It(); +yu(); +ri(); +Xy(); +qx(); +vt(); +wa(); +Le(); +q(); +Nt(); +wn(); +ez(); +te(); +It(); +Et(); +var gWo = { + typescript: ["import_statement"], + javascript: ["import_statement"], + python: ["import_statement", "import_from_statement"], + java: ["import_declaration"], + c: ["import_directive"], + cpp: ["import_directive", "import_declaration"], + ruby: ["require_statement"], + go: ["import_spec"], + csharp: ["using_directive"], + rust: ["use_declaration"], + php: ["use_declaration"] +}; +var lMn = Ve("treeSitterImportService"); +var cBi = class extends H { + constructor(e, t, s) { + super(); + this.a = e; + this.b = t; + this.f = s; + } + async getImports(e) { + const t = performance.now(); + let s = 0; + let n = 0; + const r = this.b.guessLanguageIdByFilepathOrFirstLine(e) || ""; + const o = (await this.a.readFile(e)).value.toString(); + const a = performance.now(); + let l; + try { + l = await this.f.getTree(o, r); + } catch {} + s = performance.now() - a; + const c = []; + const u = async v => { + const y = await this.h(v, e, r); + if (y) { + c.push(y); + } + }; + const d = []; + if (l) { + const v = gWo[r] ?? ["import_statement"]; + const y = w => { + if (v.includes(w.type)) { + const C = this.g(w, o); + if (C) { + d.push(C); + } + } + for (const C of w.children) { + y(C); + } + }; + y(l.rootNode); + } else { + const v = /^\s*(?:import|from|require|using|use)\s+.*?['"]([^'\"]+)['"]/gm; + let y; + while ((y = v.exec(o)) !== null) { + if (y[1]) { + d.push(y[1]); + } + } + } + const h = performance.now(); + for (const v of d) { + await u(v); + } + n = performance.now() - h; + const g = new Set(); + const p = c.filter(v => { + const y = v.toString(); + if (g.has(y)) { + return false; + } else { + g.add(y); + return true; + } + }); + const b = performance.now() - t; + console.log(`TreeSitterImportService: Resolved ${d.length} imports for ${e.toString()} in ${b.toFixed(2)}ms (parse: ${s.toFixed(2)}ms, resolve: ${n.toFixed(2)}ms, unique: ${p.length})`); + return p; + } + g(e, t) { + let s = null; + if (typeof e.childForFieldName == "function") { + s = e.childForFieldName("source"); + } + s ||= e.children.find(r => r.type === "string" || r.type === "string_literal" || r.type === "raw_string") || null; + if (s) { + return t.slice(s.startIndex, s.endIndex).replace(/^['"]|['"]$/g, ""); + } else { + return undefined; + } + } + async h(e, t, s) { + if (/^[a-zA-Z][a-zA-Z0-9+.-]*:/.test(e)) { + try { + return V.parse(e, true); + } catch { + return; + } + } + if (e.startsWith(".") || e.startsWith("/")) { + const n = e.split(/[?#]/)[0]; + const r = Ir(t); + const o = Li(r, n); + if (await this.n(o)) { + return o; + } + const a = this.j(n); + if (a) { + const l = n.slice(0, -a.length); + const c = this.m(s); + for (const u of c) { + const d = Li(r, l + u); + if (await this.n(d)) { + return d; + } + } + } + if (!a) { + const l = this.b.getExtensions(s); + for (const c of l) { + const u = Li(r, n + c); + if (await this.n(u)) { + return u; + } + } + } + return o; + } + } + j(e) { + const t = e.lastIndexOf("."); + if (t !== -1 && t !== 0 && t !== e.length - 1 && !(Math.max(e.lastIndexOf("/"), e.lastIndexOf("\\")) > t)) { + return e.slice(t); + } + } + m(e) { + const t = new Set(); + const s = this.b.getExtensions(e); + for (const n of s) { + t.add(n); + } + return Array.from(t); + } + async n(e) { + try { + return await this.a.exists(e); + } catch { + return false; + } + } +}; +cBi = __decorate([__param(0, Ct), __param(1, As), __param(2, N4)], cBi); +it(lMn, cBi, 1); +pn(); +var pWo = 1500; +var mWo = 6; +var cMn = /\.(png|jpg|jpeg|gif|webp|svg|bmp|ico)$/i; +var uBi = /\.mdc$/i; +var dBi = class extends H { + constructor(e, t, s, n, r, o, a, l, c, u, d, h, g, p) { + super(); + this.r = e; + this.s = t; + this.t = s; + this.u = n; + this.w = r; + this.y = o; + this.z = a; + this.C = l; + this.F = c; + this.G = u; + this.H = d; + this.I = h; + this.J = g; + this.L = p; + this.c = this.D(new Q()); + this.g = []; + this.h = false; + this.j = this.D(new Q()); + this.m = false; + this.q = new Map(); + } + getNumMaxTokens() { + const e = !this.u.applicationUserPersistentStorage.fullContextOptions.compress; + return this.z.getMaxNumTokensForModelAutoContext(this.z.getComposerUnifiedMode(this.w.selectedComposerId), e) ?? 0; + } + modelSupportsAutoContext() { + return this.z.doesModeSupportAutoContext(this.z.getComposerUnifiedMode(this.w.selectedComposerId)); + } + shouldShowAutoContext() { + const e = this.modelSupportsAutoContext(); + const t = this.getNumMaxTokens(); + return e && t !== undefined && t !== 0; + } + M() { + const e = this.w.selectedComposerId; + let t = false; + if (e) { + const s = this.z.getComposerUnifiedMode(e); + t = this.z.doesModeSupportAutoContext(s); + } + if (t && !this.h) { + this.N(); + return true; + } else { + if (this.h && !t) { + this.O(); + } + return false; + } + } + N() { + if (!this.h) { + this.h = true; + this.f = new Vn(() => this.P(), pWo); + this.j.add(this.f); + } + } + O() { + if (this.h) { + this.h = false; + this.j.clear(); + this.f?.dispose(); + this.f = undefined; + this.c.clear(); + } + } + maxFeatureShouldHaveInitialized() { + return this.h; + } + async P() { + if (!this.isContextDataLoaded() || !this.n?.enabledSemSearch) { + return; + } + this.c.clear(); + const e = this.w.getComposerData(this.w.selectedComposerId)?.text?.trim(); + if (!e || e.length < mWo) { + return; + } + const t = performance.now(); + const s = new Xi(); + const n = new AbortController(); + const r = s.token.onCancellationRequested(() => { + n.abort(); + }); + this.c.add(r); + this.c.add(s); + this.c.add(Ue(() => { + if (!n.signal.aborted) { + n.abort(); + } + })); + try { + const o = await this.y.search({ + query: e, + token: s.token, + abortSignal: n.signal, + updateLineNumberClassification: () => {} + }); + if (s.token.isCancellationRequested || !this.h) { + return; + } + const a = new Set(); + const l = new Set(); + const c = []; + for (const d of o) { + if (d.resource) { + const h = d.resource.toString(); + a.add(h); + if (!l.has(h)) { + const g = this.getNodeFromTree(d.resource); + if (g) { + c.push(g); + l.add(h); + } + } + } + } + this.g = c; + const u = performance.now(); + this.H.distribution({ + stat: "auto_context.semantic_search.duration_ms", + value: u - t, + tags: { + result_count: this.Q(a.size) + } + }); + } catch (o) { + if (o.name !== "AbortError") { + console.error("[AutoContextService] Semantic search failed:", o); + this.H.increment({ + stat: "auto_context.semantic_search.error" + }); + } + } finally { + if (!s.token.isCancellationRequested) { + s.dispose(); + } + } + } + dispose() { + this.O(); + super.dispose(); + } + isContextDataLoaded() { + return this.getNumMaxTokens() !== 0; + } + Q(e) { + if (e === 0) { + return "0"; + } + const t = Math.log2(e); + if (t < 1) { + return "1"; + } else if (t < 2) { + return "2-3"; + } else if (t < 3) { + return "4-7"; + } else if (t < 4) { + return "8-15"; + } else if (t < 5) { + return "16-31"; + } else if (t < 6) { + return "32-63"; + } else if (t < 7) { + return "64-127"; + } else if (t < 8) { + return "128-255"; + } else if (t < 9) { + return "256-511"; + } else if (t < 10) { + return "512-1023"; + } else { + return "1024+"; + } + } + getTree() {} + getRecentFilesAsTreeNode(e = 5) { + const t = this.t.getRecentlyViewedFiles(e); + const s = []; + const n = new Set(); + for (const o of t) { + const a = o.uri; + const l = a.toString(); + if (cMn.test(a.fsPath) || this.s.shouldIgnoreUri(a) || uBi.test(a.fsPath)) { + continue; + } + n.add(l); + const c = this.getNodeFromTree(a); + if (c) { + s.push(c); + } + } + const r = this.J.editors; + for (const o of r) { + if (s.length >= e) { + break; + } + if (o.resource && o.resource.scheme === "file") { + const a = o.resource; + const l = a.toString(); + if (n.has(l) || cMn.test(a.fsPath) || this.s.shouldIgnoreUri(a) || uBi.test(a.fsPath)) { + continue; + } + n.add(l); + if (this.r.resolveRelativePath(a.fsPath)) { + const c = this.getNodeFromTree(a); + if (c) { + s.push(c); + } + } + } + } + return s; + } + getNodeFromTree(e) { + const t = this.getTree(); + if (t) { + const r = this.r.asRelativePath(e); + if (r) { + const o = r.split("/").filter(Boolean); + let a = t; + if (a && o.length > 0) { + for (let l = 0; l < o.length && a?.children; l++) { + const c = o[l]; + const u = l === o.length - 1; + const d = a.children.find(h => h.name === c); + if (!d) { + break; + } + if (u) { + return d; + } + a = d; + } + } + } + } + const s = ir(e.path); + const n = "file"; + if (!uBi.test(e.fsPath)) { + return { + name: s, + uri: e.toString(), + kind: n, + numTokens: 0 + }; + } + } + async refreshImportsForActiveEditor() { + if (!this.isContextDataLoaded()) { + return; + } + const e = this.J.activeTextEditorControl; + if (!e || !no(e) || !e.hasModel()) { + return; + } + const s = e.getModel().uri; + if (s) { + try { + const r = (await this.L.getImports(s)).map(o => this.getNodeFromTree(o)).filter(o => o !== undefined); + this.q.set(s.toString(), r); + } catch (n) { + console.error("[AutoContextService] Error computing imports:", n); + } + } + } + findImportsInActiveEditor() { + const e = this.J.activeTextEditorControl; + if (!e || !no(e) || !e.hasModel()) { + return []; + } + const s = e.getModel().uri; + return (this.q.get(s.toString()) || []).sort((r, o) => (o.numTokens || 0) - (r.numTokens || 0)); + } + getSemanticSearchResults() { + return this.g; + } + getSelectedFiles(e, t, s, n) { + const r = new Set(); + const o = this.getNumMaxTokens(); + let a = n; + const l = [...s, ...e, ...t]; + const c = new Set(); + for (const u of l) { + if (!c.has(u.uri.toString())) { + c.add(u.uri.toString()); + if (!(o > 0) || !(a + (u.numTokens || 0) > o)) { + r.add(u); + a += u.numTokens || 0; + } + } + } + return Array.from(r); + } +}; +dBi = __decorate([__param(0, kt), __param(1, tp), __param(2, QJ), __param(3, _i), __param(4, ia), __param(5, W0t), __param(6, pC), __param(7, uy), __param(8, ry), __param(9, Qw), __param(10, EE), __param(11, tCe), __param(12, Te), __param(13, lMn)], dBi); +it(TGs, dBi, 0); +Zp(); +jo(); +Nn(); +Ht(); +ai(); +gi(); +qt(); +te(); +$(); +$(); +$(); +$(); +$(); +$(); +We(); +kh(); +He(); +Rt(); +var jTe = Y(""); +var bWo = Y("
    "); +var vWo = Y("
    "); +var yWo = Y("
    "); +var wWo = Y("

    RCP Console

    "); +var CWo = Y("
    "); +var SWo = Y("
    "); +var xWo = Y("
    "); +function kWo() { + const i = wt(); + const e = i.rcpService; + const t = i.composerService; + const [s, n] = cCi("rcp-console-show-filters", true); + const [r, o] = ae(null); + const [a, l] = yp({ + searchQuery: "", + timeFilter: { + startTime: null, + endTime: null + }, + levels: { + log: true, + info: true, + warn: true, + error: true + }, + clientName: undefined + }); + const c = K(() => e.getFilteredLogs(a)); + const u = g => { + const p = uMn(g.timestamp); + const b = g.level.toUpperCase(); + const v = g.clientName ? `Client: ${g.clientName}` : ""; + const y = g.sessionId ? `Session: ${g.sessionId.substring(0, 8)}` : ""; + const w = g.objectDataJson ? ` +Object Data: ${g.objectDataJson}` : ""; + return `[${p}] [${b}] ${v} ${y} +${g.message}${w}`; + }; + const d = g => { + const p = i.composerDataService.selectedComposerId; + if (p) { + const b = u(g); + t.addPlainTextSelection(p, b, { + fakeFileName: "trace.txt" + }); + } + }; + const h = () => { + e.clearLogs(); + }; + return (() => { + var g = wWo(); + var p = g.firstChild; + var b = p.firstChild; + var v = b.firstChild; + var y = v.nextSibling; + var w = b.nextSibling; + var C = p.nextSibling; + g.style.setProperty("background-color", "var(--vscode-editor-background)"); + p.style.setProperty("background-color", "var(--vscode-editorWidget-background)"); + p.style.setProperty("border-color", "var(--vscode-panel-border)"); + v.style.setProperty("color", "var(--vscode-terminal-ansiBlue)"); + v.style.setProperty("font-size", "14px"); + y.style.setProperty("color", "var(--vscode-foreground)"); + M(w, I(Ar, { + variant: "secondary", + get codicon() { + return A.trash; + }, + onClick: () => h(), + children: "Clear logs" + }), null); + M(w, I(Ar, { + variant: "secondary", + get codicon() { + return A.filter; + }, + onClick: () => n(!s()), + children: "Toggle filters" + }), null); + M(g, I(oe, { + get when() { + return s(); + }, + get children() { + var S = bWo(); + var x = S.firstChild; + var k = x.firstChild; + var E = k.firstChild; + var D = E.nextSibling; + S.style.setProperty("background-color", "var(--vscode-editorWidget-background)"); + S.style.setProperty("border-color", "var(--vscode-panel-border)"); + E.style.setProperty("color", "var(--vscode-icon-foreground)"); + D.addEventListener("input", P => l("searchQuery", P.currentTarget.value)); + D.style.setProperty("background-color", "var(--vscode-input-background)"); + D.style.setProperty("color", "var(--vscode-input-foreground)"); + D.style.setProperty("border-color", "var(--vscode-input-border)"); + M(k, I(oe, { + get when() { + return a.searchQuery; + }, + get children() { + var P = jTe(); + P.addEventListener("click", () => l("searchQuery", "")); + P.style.setProperty("color", "var(--vscode-icon-foreground)"); + Ie(() => Xe(P, `absolute right-2 top-1/2 -translate-y-1/2 cursor-pointer ${le.asClassName(A.close)}`)); + return P; + } + }), null); + Ie(() => Xe(E, `absolute left-2 top-1/2 -translate-y-1/2 ${le.asClassName(A.search)}`)); + Ie(() => D.value = a.searchQuery); + return S; + } + }), C); + M(C, I(Ou, { + scrollingDirection: "vertical", + style: { + height: "100%" + }, + get children() { + var S = yWo(); + M(S, I(oe, { + get when() { + return c().length > 0; + }, + get fallback() { + return (() => { + var x = CWo(); + M(x, I(oe, { + get when() { + return e.data.logs.length > 0; + }, + fallback: "No logs available", + children: "No logs match the current filters" + })); + return x; + })(); + }, + get children() { + var x = vWo(); + x.style.setProperty("user-select", "text"); + M(x, I(Zn, { + get each() { + return c(); + }, + children: (k, E) => (() => { + var D = xWo(); + var P = D.firstChild; + var R = P.nextSibling; + var L = R.firstChild; + var F = L.firstChild; + var O = L.nextSibling; + D.addEventListener("mouseleave", () => o(null)); + D.addEventListener("mouseenter", () => o(E())); + D.style.setProperty("user-select", "text"); + M(P, () => EWo(k.level)); + M(F, () => uMn(k.timestamp)); + M(L, I(oe, { + get when() { + return k.clientName; + }, + get children() { + return I(RC, { + type: "primary", + size: "small", + get text() { + return k.clientName; + } + }); + } + }), null); + M(L, I(oe, { + get when() { + return k.sessionId; + }, + get children() { + return I(RC, { + type: "subtle", + size: "small", + get text() { + return k.sessionId.substring(0, 8); + }, + class: "font-mono" + }); + } + }), null); + M(O, I(oe, { + get when() { + return a.searchQuery; + }, + get fallback() { + return k.message; + }, + get children() { + return I(dk, { + get text() { + return k.message || ""; + }, + get highlights() { + return e.getTextHighlights(k.message || "", a.searchQuery); + }, + escapeNewLines: false, + supportIcons: false + }); + } + })); + M(D, I(oe, { + get when() { + return r() === E(); + }, + get children() { + var U = SWo(); + M(U, I(Ar, { + variant: "secondary", + onClick: () => d(k), + class: "text-xs py-1 px-2", + get codicon() { + return A.addTwo; + }, + children: "Add to chat" + })); + return U; + } + }), null); + return D; + })() + })); + return x; + } + })); + return S; + } + })); + Ie(() => Xe(v, le.asClassName(A.output))); + return g; + })(); +} +function EWo(i) { + switch (i) { + case "log": + return (() => { + var e = jTe(); + e.style.setProperty("color", "var(--vscode-editor-foreground)"); + e.style.setProperty("font-size", "14px"); + Ie(() => Xe(e, le.asClassName(A.debug))); + return e; + })(); + case "info": + return (() => { + var e = jTe(); + e.style.setProperty("color", "var(--vscode-charts-blue)"); + e.style.setProperty("font-size", "14px"); + Ie(() => Xe(e, le.asClassName(A.info))); + return e; + })(); + case "warn": + return (() => { + var e = jTe(); + e.style.setProperty("color", "var(--vscode-editorWarning-foreground)"); + e.style.setProperty("font-size", "14px"); + Ie(() => Xe(e, le.asClassName(A.warning))); + return e; + })(); + case "error": + return (() => { + var e = jTe(); + e.style.setProperty("color", "var(--vscode-editorError-foreground)"); + e.style.setProperty("font-size", "14px"); + Ie(() => Xe(e, le.asClassName(A.error))); + return e; + })(); + } +} +function uMn(i) { + try { + return new Date(i).toLocaleTimeString(undefined, { + hour12: false + }); + } catch { + return `${i}`; + } +} +function IWo(i, e) { + return Ll(() => I(kWo, {}), i, e); +} +Le(); +He(); +Je(); +ar(); +q(); +var hBi; +var nde = class jOt extends rg { + static { + this.TypeID = "workbench.input.rcpConsole"; + } + static { + this.EditorID = "workbench.editor.rcpConsole"; + } + get typeId() { + return jOt.TypeID; + } + get editorId() { + return jOt.EditorID; + } + get resource() { + return V.parse("rcpconsole://console"); + } + getName() { + return "RCP Console"; + } + getIcon() { + return A.output; + } + matches(e) { + if (super.matches(e)) { + return true; + } else { + return e instanceof jOt; + } + } + async resolve() { + return null; + } +}; +var fBi = class extends H { + constructor(e) { + super(); + this.a = e; + } + canSerialize() { + return true; + } + serialize() { + return "{}"; + } + deserialize() { + return this.a.createInstance(nde); + } +}; +fBi = __decorate([__param(0, re)], fBi); +var gBi = class extends $p { + static { + hBi = this; + } + static { + this.ID = nde.EditorID; + } + constructor(e, t, s, n, r) { + super(hBi.ID, e, t, s, n); + this.b = r; + } + Y(e) {} + async setInput(e, t, s, n) { + await super.setInput(e, t, s, n); + this.a?.dispose(); + const r = this.getContainer(); + if (r) { + this.a = IWo(r, this.b); + } + } + layout(e) {} + focus() { + this.a?.focus?.(); + } + dispose() { + this.a?.dispose(); + super.dispose(); + } +}; +gBi = hBi = __decorate([__param(1, Ot), __param(2, ti), __param(3, ht), __param(4, re)], gBi); +var DWo = class extends se { + constructor() { + super({ + id: "workbench.action.openRcpConsole", + title: { + value: "Open RCP Console", + original: "Open RCP Console" + }, + f1: true + }); + } + async run(i) { + const e = i.get(re); + const t = i.get(Hi); + const s = e.createInstance(nde); + await t.activeGroup.openEditor(s); + } +}; +J(DWo); +Pe.as(_o.EditorPane).registerEditorPane(qd.create(gBi, nde.EditorID, "RCP Console"), [new Os(nde)]); +Pe.as(_o.EditorFactory).registerEditorSerializer(nde.TypeID, fBi); +it(xP, i1i, 1); +it(gS, lBi, 1); +it(wce, t1i, 1); +it(UJ, mEe, 1); +it(cke, uke, 1); +it(vh, jni, 1); +it(Sc, guo, 1); +it(br, tpr, 1); +it(Fu, jSi, 0); +it(x9, zSi, 1); +it(Nu, Oqr, 1); +it(Ne, KSi, 1); +it(Fl, YSi, 1); +it(fle, XSi, 1); +it(os, e1i, 1); +it(_i, bce, 1); +X(); +gi(); +rt(); +xe(); +hc(); +Qs(); +fr(); +bf((i, e) => { + const t = qre(i); + e.addRule(`.monaco-workbench { background-color: ${t}; }`); + const s = i.getColor(q8t); + if (s) { + e.addRule(`.monaco-workbench ::selection { background-color: ${s}; }`); + } + if (tn) { + const n = i.getColor(UCe); + if (n) { + const r = "monaco-workbench-meta-theme-color"; + let o = xt.document.getElementById(r); + if (!o) { + o = CJi(); + o.name = "theme-color"; + o.id = r; + } + o.content = n.toString(); + } + } + if (yI) { + e.addRule(` + body.web { + touch-action: none; + } + .monaco-workbench .monaco-editor .view-lines { + user-select: text; + -webkit-user-select: text; + } + `); + } + if (fp && J4t()) { + e.addRule(`body { background-color: ${t}; }`); + } +}); +xe(); +pe(); +nt(); +hc(); +yb(); +Ut(); +Ht(); +rt(); +Nn(); +It(); +qt(); +Me(); +da(); +Wi(); +gi(); +pe(); +Ee(); +Wt(); +Ee(); +Wu(); +Yc(); +Je(); +X(); +ai(); +q(); +Wi(); +ai(); +Gl(); +function I$t(i, e, t) { + return { + id: Qc(i.toString()).toString(), + silent: t, + source: e || "core" + }; +} +var pBi = class extends H { + constructor(e, t) { + super(); + this.a = e; + this.b = t; + this.c(); + } + c() { + this.D(this.b.onDidAddNotification(e => { + const t = e.source && typeof e.source != "string" ? e.source.id : e.source; + this.a.publicLog2("notification:show", I$t(e.message, t, e.priority === Ru.SILENT)); + })); + this.D(this.b.onDidRemoveNotification(e => { + const t = e.source && typeof e.source != "string" ? e.source.id : e.source; + this.a.publicLog2("notification:close", I$t(e.message, t, e.priority === Ru.SILENT)); + })); + } +}; +pBi = __decorate([__param(0, Ot), __param(1, ni)], pBi); +Wi(); +te(); +Fs(); +Gl(); +mn(); +q(); +Pn(); +var mBi = "notifications.showList"; +var zTe = "notifications.hideList"; +var TWo = "notifications.toggleList"; +var bBi = "notifications.hideToasts"; +var dMn = "notifications.focusToasts"; +var PWo = "notifications.focusNextToast"; +var LWo = "notifications.focusPreviousToast"; +var RWo = "notifications.focusFirstToast"; +var NWo = "notifications.focusLastToast"; +var vBi = "notification.collapse"; +var yBi = "notification.expand"; +var hMn = "notification.acceptPrimaryAction"; +var MWo = "notification.toggle"; +var wBi = "notification.clear"; +var D$t = "notifications.clearAll"; +var T$t = "notifications.toggleDoNotDisturbMode"; +var P$t = "notifications.toggleDoNotDisturbModeBySource"; +function BQ(i, e) { + if (CIt(e)) { + return e; + } + const t = i.lastFocusedList; + if (t instanceof N1) { + let s = t.getFocusedElements()[0]; + if (!CIt(s)) { + if (t.isDOMFocused()) { + s = t.element(0); + } + } + if (CIt(s)) { + return s; + } + } +} +function AWo(i, e, t) { + Ci.registerCommandAndKeybindingRule({ + id: mBi, + weight: 200, + primary: Ai(_r, 3116), + mac: { + primary: Ai(Xr, 3116) + }, + handler: () => { + e.hide(); + i.show(); + } + }); + Ci.registerCommandAndKeybindingRule({ + id: zTe, + weight: 250, + when: Lvt, + primary: 9, + handler: n => { + const r = n.get(Ot); + for (const o of t.notifications) { + if (o.visible) { + r.publicLog2("notification:hide", I$t(o.message.original, o.sourceId, o.priority === Ru.SILENT)); + } + } + i.hide(); + } + }); + ei.registerCommand(TWo, () => { + if (i.isVisible) { + i.hide(); + } else { + e.hide(); + i.show(); + } + }); + ei.registerCommand(Qfe, (n, r) => { + e.hideForMs(r); + }); + Ci.registerCommandAndKeybindingRule({ + id: wBi, + weight: 200, + when: XR, + primary: 20, + mac: { + primary: 2049 + }, + handler: (n, r) => { + const o = n.get(Pd); + const a = BQ(n.get(br), r); + if (a && !a.hasProgress) { + a.close(); + o.playSignal(el.clear); + } + } + }); + Ci.registerCommandAndKeybindingRule({ + id: yBi, + weight: 200, + when: XR, + primary: 17, + handler: (n, r) => { + BQ(n.get(br), r)?.expand(); + } + }); + Ci.registerCommandAndKeybindingRule({ + id: hMn, + weight: 200, + when: T.or(XR, d6), + primary: 3103, + handler: n => { + const r = n.get(re).createInstance(JTe); + const o = BQ(n.get(br)) || t.notifications.at(0); + if (!o) { + return; + } + const a = o.actions?.primary ? o.actions.primary.at(0) : undefined; + if (a) { + r.run(a, o); + o.close(); + } + } + }); + Ci.registerCommandAndKeybindingRule({ + id: vBi, + weight: 200, + when: XR, + primary: 15, + handler: (n, r) => { + BQ(n.get(br), r)?.collapse(); + } + }); + Ci.registerCommandAndKeybindingRule({ + id: MWo, + weight: 200, + when: XR, + primary: 10, + secondary: [3], + handler: n => { + BQ(n.get(br))?.toggle(); + } + }); + ei.registerCommand(bBi, n => { + const r = n.get(Ot); + for (const o of t.notifications) { + if (o.visible) { + r.publicLog2("notification:hide", I$t(o.message.original, o.sourceId, o.priority === Ru.SILENT)); + } + } + e.hide(); + }); + Ci.registerKeybindingRule({ + id: bBi, + weight: 150, + when: d6, + primary: 9 + }); + Ci.registerKeybindingRule({ + id: bBi, + weight: 300, + when: T.and(d6, XR), + primary: 9 + }); + ei.registerCommand(dMn, () => e.focus()); + Ci.registerCommandAndKeybindingRule({ + id: PWo, + weight: 200, + when: T.and(XR, d6), + primary: 18, + handler: () => { + e.focusNext(); + } + }); + Ci.registerCommandAndKeybindingRule({ + id: LWo, + weight: 200, + when: T.and(XR, d6), + primary: 16, + handler: () => { + e.focusPrevious(); + } + }); + Ci.registerCommandAndKeybindingRule({ + id: RWo, + weight: 200, + when: T.and(XR, d6), + primary: 11, + secondary: [14], + handler: () => { + e.focusFirst(); + } + }); + Ci.registerCommandAndKeybindingRule({ + id: NWo, + weight: 200, + when: T.and(XR, d6), + primary: 12, + secondary: [13], + handler: () => { + e.focusLast(); + } + }); + ei.registerCommand(D$t, () => i.clearAll()); + ei.registerCommand(T$t, n => { + const r = n.get(ni); + r.setFilter(r.getFilter() === rd.ERROR ? rd.OFF : rd.ERROR); + }); + ei.registerCommand(P$t, n => { + const r = n.get(ni); + const o = n.get(zi); + const a = r.getFilters().sort((u, d) => u.label.localeCompare(d.label)); + const l = new Q(); + const c = l.add(o.createQuickPick()); + c.items = a.map(u => ({ + id: u.id, + label: u.label, + tooltip: `${u.label} (${u.id})`, + filter: u.filter + })); + c.canSelectMany = true; + c.placeholder = f(3648, null); + c.selectedItems = c.items.filter(u => u.filter === rd.OFF); + c.show(); + l.add(c.onDidAccept(async () => { + for (const u of c.items) { + r.setFilter({ + id: u.id, + label: u.label, + filter: c.selectedItems.includes(u) ? rd.OFF : rd.ERROR + }); + } + c.hide(); + })); + l.add(c.onDidHide(() => l.dispose())); + }); + const s = W(3649, "Notifications"); + Be.appendMenuItem(_.CommandPalette, { + command: { + id: mBi, + title: W(3650, "Show Notifications"), + category: s + } + }); + Be.appendMenuItem(_.CommandPalette, { + command: { + id: zTe, + title: W(3651, "Hide Notifications"), + category: s + }, + when: Lvt + }); + Be.appendMenuItem(_.CommandPalette, { + command: { + id: D$t, + title: W(3652, "Clear All Notifications"), + category: s + } + }); + Be.appendMenuItem(_.CommandPalette, { + command: { + id: hMn, + title: W(3653, "Accept Notification Primary Action"), + category: s + } + }); + Be.appendMenuItem(_.CommandPalette, { + command: { + id: T$t, + title: W(3654, "Toggle Do Not Disturb Mode"), + category: s + } + }); + Be.appendMenuItem(_.CommandPalette, { + command: { + id: P$t, + title: W(3655, "Toggle Do Not Disturb Mode By Source..."), + category: s + } + }); + Be.appendMenuItem(_.CommandPalette, { + command: { + id: dMn, + title: W(3656, "Focus Notification Toast"), + category: s + }, + when: d6 + }); +} +var JTe = class extends ff { + constructor(e, t) { + super(); + this.c = e; + this.g = t; + } + async q(e, t) { + this.c.publicLog2("workbenchActionExecuted", { + id: e.id, + from: "message" + }); + if (CIt(t)) { + this.c.publicLog2("notification:actionExecuted", { + id: Qc(t.message.original.toString()).toString(), + actionLabel: e.label, + source: t.sourceId || "core", + silent: t.priority === Ru.SILENT + }); + } + try { + await super.q(e, t); + } catch (s) { + this.g.error(s); + } + } +}; +JTe = __decorate([__param(0, Ot), __param(1, ni)], JTe); +X(); +xe(); +te(); +xe(); +gs(); +Le(); +X(); +Wd(); +sl(); +Fs(); +te(); +q(); +ks(); +X(); +Fs(); +Wt(); +Xa(); +He(); +Br(); +Rt(); +var $Wo = dt("notifications-clear", A.close, f(3621, null)); +var FWo = dt("notifications-clear-all", A.clearAll, f(3622, null)); +var OWo = dt("notifications-hide", A.chevronDown, f(3623, null)); +var _Wo = dt("notifications-expand", A.chevronUp, f(3624, null)); +var BWo = dt("notifications-collapse", A.chevronDown, f(3625, null)); +var UWo = dt("notifications-configure", A.gear, f(3626, null)); +var fMn = dt("notifications-do-not-disturb", A.bellSlash, f(3627, null)); +var GTe = class extends Yt { + static { + this.ID = wBi; + } + static { + this.LABEL = f(3628, null); + } + constructor(e, t, s) { + super(e, t, le.asClassName($Wo)); + this.a = s; + } + async run(e) { + this.a.executeCommand(wBi, e); + } +}; +GTe = __decorate([__param(2, gt)], GTe); +var KTe = class extends Yt { + static { + this.ID = D$t; + } + static { + this.LABEL = f(3629, null); + } + constructor(e, t, s) { + super(e, t, le.asClassName(FWo)); + this.a = s; + } + async run() { + this.a.executeCommand(D$t); + } +}; +KTe = __decorate([__param(2, gt)], KTe); +var L$t = class extends Yt { + static { + this.ID = T$t; + } + static { + this.LABEL = f(3630, null); + } + constructor(e, t, s) { + super(e, t, le.asClassName(fMn)); + this.a = s; + } + async run() { + this.a.executeCommand(T$t); + } +}; +L$t = __decorate([__param(2, gt)], L$t); +var R$t = class extends Yt { + static { + this.ID = P$t; + } + static { + this.LABEL = f(3631, null); + } + constructor(e, t, s) { + super(e, t); + this.a = s; + } + async run() { + this.a.executeCommand(P$t); + } +}; +R$t = __decorate([__param(2, gt)], R$t); +var N$t = class extends Yt { + static { + this.ID = "workbench.action.configureDoNotDisturbMode"; + } + static { + this.LABEL = f(3632, null); + } + constructor(i, e) { + super(i, e, le.asClassName(fMn)); + } +}; +var YTe = class extends Yt { + static { + this.ID = zTe; + } + static { + this.LABEL = f(3633, null); + } + constructor(e, t, s) { + super(e, t, le.asClassName(OWo)); + this.a = s; + } + async run() { + this.a.executeCommand(zTe); + } +}; +YTe = __decorate([__param(2, gt)], YTe); +var XTe = class extends Yt { + static { + this.ID = yBi; + } + static { + this.LABEL = f(3634, null); + } + constructor(e, t, s) { + super(e, t, le.asClassName(_Wo)); + this.a = s; + } + async run(e) { + this.a.executeCommand(yBi, e); + } +}; +XTe = __decorate([__param(2, gt)], XTe); +var QTe = class extends Yt { + static { + this.ID = vBi; + } + static { + this.LABEL = f(3635, null); + } + constructor(e, t, s) { + super(e, t, le.asClassName(BWo)); + this.a = s; + } + async run(e) { + this.a.executeCommand(vBi, e); + } +}; +QTe = __decorate([__param(2, gt)], QTe); +var M$t = class extends Yt { + static { + this.ID = "workbench.action.configureNotification"; + } + static { + this.LABEL = f(3636, null); + } + constructor(i, e, t) { + super(i, e, le.asClassName(UWo)); + this.notification = t; + } +}; +var ZTe = class extends Yt { + static { + this.ID = "workbench.action.copyNotificationMessage"; + } + static { + this.LABEL = f(3637, null); + } + constructor(e, t, s) { + super(e, t); + this.a = s; + } + run(e) { + return this.a.writeText(e.message.raw); + } +}; +ZTe = __decorate([__param(2, Zr)], ZTe); +Fi(); +Wi(); +Jt(); +He(); +Rt(); +q0(); +hh(); +pe(); +ya(); +_a(); +oa(); +var CBi; +var lB; +var WWo = class aZ { + static { + this.a = 28; + } + static { + this.b = 16; + } + static { + this.c = 36; + } + constructor(e) { + this.f = e; + this.d = this.g(e); + } + g(e) { + const t = document.createElement("div"); + t.classList.add("notification-offset-helper"); + e.appendChild(t); + return t; + } + getHeight(e) { + if (!e.expanded) { + return aZ.a; + } + let t = aZ.a; + const s = this.h(e); + if (aZ.b < s) { + const r = s - aZ.b; + t += r; + } + if (e.source || Ac(e.actions && e.actions.primary)) { + t += aZ.c; + } + if (t === aZ.a) { + e.collapse(true); + } + return t; + } + h(e) { + let t = 0; + if (!e.hasProgress) { + t++; + } + if (e.canCollapse) { + t++; + } + if (Ac(e.actions && e.actions.secondary)) { + t++; + } + const s = this.f.querySelector(".notification-list-item-message"); + const n = 18; + const r = 6; + const o = 16; + const a = 18; + const l = 4; + this.d.style.width = `${s?.clientWidth ?? 380 - (n + r * 2 + o + t * a + Math.max(t, 0) * l)}px`; + const c = gMn.render(e.message); + this.d.appendChild(c); + const u = Math.max(this.d.offsetHeight, this.d.scrollHeight); + Lr(this.d); + return u; + } + getTemplateId(e) { + if (e instanceof C0i) { + return A$t.TEMPLATE_ID; + } + throw new Error("unknown element type: " + e); + } +}; +var gMn = class { + static render(i, e) { + const t = document.createElement("span"); + for (const s of i.linkedText.nodes) { + if (typeof s == "string") { + t.appendChild(document.createTextNode(s)); + } else { + let n = s.title; + if (!n && s.href.startsWith("command:")) { + n = f(3679, null, s.href.substr(8)); + } else { + n ||= s.href; + } + const r = G("a", { + href: s.href, + title: n, + tabIndex: 0 + }, s.label); + if (e) { + const o = d => { + if (kJi(d)) { + yn.stop(d, true); + } + e.callback(s.href); + }; + const a = e.toDispose.add(new Co(r, Oe.CLICK)).event; + const l = e.toDispose.add(new Co(r, Oe.KEY_DOWN)).event; + const c = de.chain(l, d => d.filter(h => { + const g = new wr(h); + return g.equals(10) || g.equals(3); + })); + e.toDispose.add(bd.addTarget(r)); + const u = e.toDispose.add(new Co(r, ul.Tap)).event; + de.any(a, u, c)(o, null, e.toDispose); + } + t.appendChild(r); + } + } + return t; + } +}; +var A$t = class { + static { + CBi = this; + } + static { + this.TEMPLATE_ID = "notification"; + } + constructor(e, t, s, n) { + this.a = e; + this.b = t; + this.c = s; + this.d = n; + } + get templateId() { + return CBi.TEMPLATE_ID; + } + renderTemplate(e) { + const t = Object.create(null); + t.toDispose = new Q(); + t.container = document.createElement("div"); + t.container.classList.add("notification-list-item"); + t.mainRow = document.createElement("div"); + t.mainRow.classList.add("notification-list-item-main-row"); + t.icon = document.createElement("div"); + t.icon.classList.add("notification-list-item-icon", "codicon"); + t.message = document.createElement("div"); + t.message.classList.add("notification-list-item-message"); + const s = this; + const n = document.createElement("div"); + n.classList.add("notification-list-item-toolbar-container"); + t.toolbar = new ea(n, { + ariaLabel: f(3680, null), + actionViewItemProvider: (r, o) => { + if (r instanceof M$t) { + return t.toDispose.add(new T1(r, { + getActions() { + const a = []; + const l = { + id: r.notification.sourceId, + label: r.notification.source + }; + if (Jat(l)) { + const c = s.d.getFilter(l) === rd.ERROR; + a.push(Ba({ + id: l.id, + label: f(c ? 3681 : 3682, null, l.label), + run: () => s.d.setFilter({ + ...l, + filter: c ? rd.OFF : rd.ERROR + }) + })); + if (r.notification.actions?.secondary?.length) { + a.push(new gr()); + } + } + if (Array.isArray(r.notification.actions?.secondary)) { + a.push(...r.notification.actions.secondary); + } + return a; + } + }, this.b, { + ...o, + actionRunner: this.a, + classNames: r.class + })); + } + }, + actionRunner: this.a + }); + t.toDispose.add(t.toolbar); + t.detailsRow = document.createElement("div"); + t.detailsRow.classList.add("notification-list-item-details-row"); + t.source = document.createElement("div"); + t.source.classList.add("notification-list-item-source"); + t.buttonsContainer = document.createElement("div"); + t.buttonsContainer.classList.add("notification-list-item-buttons-container"); + e.appendChild(t.container); + t.container.appendChild(t.detailsRow); + t.detailsRow.appendChild(t.source); + t.detailsRow.appendChild(t.buttonsContainer); + t.container.appendChild(t.mainRow); + t.mainRow.appendChild(t.icon); + t.mainRow.appendChild(t.message); + t.mainRow.appendChild(n); + t.progress = new RP(e, HM); + t.toDispose.add(t.progress); + t.renderer = this.c.createInstance(SBi, t, this.a); + t.toDispose.add(t.renderer); + return t; + } + renderElement(e, t, s) { + s.renderer.setInput(e); + } + disposeTemplate(e) { + si(e.toDispose); + } +}; +A$t = CBi = __decorate([__param(1, ts), __param(2, re), __param(3, ni)], A$t); +var SBi = class extends H { + static { + lB = this; + } + static { + this.f = [es.Info, es.Warning, es.Error]; + } + constructor(e, t, s, n, r, o, a) { + super(); + this.h = e; + this.j = t; + this.m = s; + this.n = n; + this.q = r; + this.r = o; + this.s = a; + this.g = this.D(new Q()); + if (!lB.a) { + lB.a = n.createInstance(GTe, GTe.ID, GTe.LABEL); + lB.b = n.createInstance(XTe, XTe.ID, XTe.LABEL); + lB.c = n.createInstance(QTe, QTe.ID, QTe.LABEL); + } + } + setInput(e) { + this.g.clear(); + this.t(e); + } + t(e) { + this.h.container.classList.toggle("expanded", e.expanded); + this.g.add(Ce(this.h.container, Oe.MOUSE_UP, r => { + if (r.button === 1) { + yn.stop(r, true); + } + })); + this.g.add(Ce(this.h.container, Oe.AUXCLICK, r => { + if (!e.hasProgress && r.button === 1) { + yn.stop(r, true); + e.close(); + } + })); + this.u(e); + const t = this.g.add(this.s.setupManagedHover(cr("mouse"), this.h.message, "")); + const s = this.w(e, t); + this.y(e, s); + const n = this.g.add(this.s.setupManagedHover(cr("mouse"), this.h.source, "")); + this.z(e, n); + this.C(e); + this.F(e); + this.g.add(e.onDidChangeContent(r => { + switch (r.kind) { + case 0: + this.u(e); + break; + case 3: + this.F(e); + break; + case 1: + this.w(e, t); + break; + } + })); + } + u(e) { + lB.f.forEach(t => { + if (e.severity !== t) { + this.h.icon.classList.remove(...le.asClassNameArray(this.G(t))); + } + }); + this.h.icon.classList.add(...le.asClassNameArray(this.G(e.severity))); + } + w(e, t) { + Lr(this.h.message); + this.h.message.appendChild(gMn.render(e.message, { + callback: n => this.m.open(V.parse(n), { + allowCommands: true + }), + toDispose: this.g + })); + const s = e.canCollapse && !e.expanded && this.h.message.scrollWidth > this.h.message.clientWidth; + t.update(s ? this.h.message.textContent + "" : ""); + return s; + } + y(e, t) { + const s = []; + if (Ac(e.actions?.secondary)) { + const r = this.n.createInstance(M$t, M$t.ID, M$t.LABEL, e); + s.push(r); + this.g.add(r); + } + let n = false; + if (e.canCollapse && (e.expanded || e.source || t)) { + n = true; + } + if (n) { + s.push(e.expanded ? lB.c : lB.b); + } + if (!e.hasProgress) { + s.push(lB.a); + } + this.h.toolbar.clear(); + this.h.toolbar.context = e; + s.forEach(r => this.h.toolbar.push(r, { + icon: true, + label: false, + keybinding: this.H(r) + })); + } + z(e, t) { + if (e.expanded && e.source) { + this.h.source.textContent = f(3683, null, e.source); + t.update(e.source); + } else { + this.h.source.textContent = ""; + t.update(""); + } + } + C(e) { + Lr(this.h.buttonsContainer); + const t = e.actions ? e.actions.primary : undefined; + if (e.expanded && Ac(t)) { + const s = this; + const n = this.g.add(new class extends ff { + async q(o) { + s.j.run(o, e); + if (!(o instanceof S0i) || !o.keepOpen) { + e.close(); + } + } + }()); + const r = this.g.add(new G4(this.h.buttonsContainer)); + for (let o = t.length - 1; o >= 0; o--) { + const a = t[o]; + const c = { + title: true, + secondary: o !== 0, + ...yd + }; + const u = a instanceof S0i ? a.menu : undefined; + const d = this.g.add(u ? r.addButtonWithDropdown({ + ...c, + contextMenuProvider: this.r, + actions: u, + actionRunner: n + }) : r.addButton(c)); + d.label = a.label; + this.g.add(d.onDidClick(h => { + if (h) { + yn.stop(h, true); + } + n.run(a); + })); + } + } + } + F(e) { + if (!e.hasProgress) { + this.h.progress.stop().hide(); + return; + } + const t = e.progress.state; + if (t.infinite) { + this.h.progress.infinite().show(); + } else if (typeof t.total == "number" || typeof t.worked == "number") { + if (typeof t.total == "number" && !this.h.progress.hasTotal()) { + this.h.progress.total(t.total); + } + if (typeof t.worked == "number") { + this.h.progress.setWorked(t.worked).show(); + } + } else { + this.h.progress.done().hide(); + } + } + G(e) { + switch (e) { + case es.Warning: + return A.warningTwo; + case es.Error: + return A.error; + } + return A.infoTwo; + } + H(e) { + const t = this.q.lookupKeybinding(e.id); + if (t) { + return t.getLabel(); + } else { + return null; + } + } +}; +SBi = lB = __decorate([__param(2, os), __param(3, re), __param(4, oi), __param(5, ts), __param(6, Ns)], SBi); +ks(); +zt(); +q(); +Fi(); +Me(); +var $$t = class extends H { + constructor(e, t, s, n) { + super(); + this.h = e; + this.j = t; + this.m = s; + this.n = n; + this.f = []; + } + show() { + if (!this.g) { + if (!this.b) { + this.q(); + } + this.g = true; + } + } + q() { + this.a = document.createElement("div"); + this.a.classList.add("notifications-list-container"); + const e = this.D(this.m.createInstance(JTe)); + const t = this.m.createInstance(A$t, e); + const s = this.c = new WWo(this.a); + const n = this.j; + const r = this.b = this.D(this.m.createInstance(N1, "NotificationsList", this.a, s, [t], { + ...n, + setRowLineHeight: false, + horizontalScrolling: false, + overrideStyles: { + listBackground: zre + }, + accessibilityProvider: this.m.createInstance(xBi, n) + })); + const o = this.D(this.m.createInstance(ZTe, ZTe.ID, ZTe.LABEL)); + this.D(r.onContextMenu(l => { + if (l.element) { + this.n.showContextMenu({ + getAnchor: () => l.anchor, + getActions: () => [o], + getActionsContext: () => l.element, + actionRunner: e + }); + } + })); + this.D(r.onMouseDblClick(l => l.element.toggle())); + const a = this.D(Pu(r.getHTMLElement())); + this.D(a.onDidBlur(() => { + if (Kt(this.a).document.hasFocus()) { + r.setFocus([]); + } + })); + XR.bindTo(r.contextKeyService); + this.D(r.onDidChangeSelection(l => { + if (l.indexes.length > 0) { + r.setSelection([]); + } + })); + this.h.appendChild(this.a); + } + updateNotificationsList(e, t, s = []) { + const [n, r] = vT(this.b, this.a); + const o = pg(r); + const a = n.getFocus()[0]; + const l = this.f[a]; + let c = null; + if (typeof a == "number") { + c = n.getRelativeTop(a); + } + this.f.splice(e, t, ...s); + n.splice(e, t, s); + n.layout(); + if (this.f.length === 0) { + this.hide(); + } else if (typeof a == "number") { + let u = 0; + if (l) { + let d = this.f.indexOf(l); + if (d === -1) { + d = a - 1; + } + if (d < this.f.length && d >= 0) { + u = d; + } + } + if (typeof c == "number") { + n.reveal(u, c); + } + n.setFocus([u]); + } + if (this.g && o) { + n.domFocus(); + } + } + updateNotificationHeight(e) { + const t = this.f.indexOf(e); + if (t === -1) { + return; + } + const [s, n] = vT(this.b, this.c); + s.updateElementHeight(t, n.getHeight(e)); + s.layout(); + } + hide() { + if (!!this.g && !!this.b) { + this.g = false; + this.b.splice(0, this.f.length); + this.f = []; + } + } + focusFirst() { + if (this.b) { + this.b.focusFirst(); + this.b.domFocus(); + } + } + hasFocus() { + if (this.a) { + return pg(this.a); + } else { + return false; + } + } + layout(e, t) { + if (this.a && this.b) { + this.a.style.width = `${e}px`; + if (typeof t == "number") { + this.b.getHTMLElement().style.maxHeight = `${t}px`; + } + this.b.layout(); + } + } + dispose() { + this.hide(); + super.dispose(); + } +}; +$$t = __decorate([__param(2, re), __param(3, ts)], $$t); +var xBi = class { + constructor(e, t, s) { + this.a = e; + this.b = t; + this.c = s; + } + getAriaLabel(e) { + let t; + const s = this.b.lookupKeybinding("editor.action.accessibleView")?.getAriaLabel(); + if (this.c.getValue("accessibility.verbosity.notification")) { + t = s ? f(3657, null, s) : f(3658, null); + } + if (e.source) { + if (t) { + return f(3661, null, e.message.raw, e.source, t); + } else { + return f(3662, null, e.message.raw, e.source); + } + } else if (t) { + return f(3659, null, e.message.raw, t); + } else { + return f(3660, null, e.message.raw); + } + } + getWidgetAriaLabel() { + return this.a.widgetAriaLabel ?? f(3663, null); + } + getRole() { + return "dialog"; + } +}; +xBi = __decorate([__param(1, oi), __param(2, ve)], xBi); +te(); +xe(); +Qs(); +ar(); +X(); +sl(); +Fs(); +Fi(); +zt(); +Wi(); +fr(); +ks(); +var rde; +var kBi = class extends j0 { + static { + rde = this; + } + static { + this.c = new Ln(450, 400); + } + static { + this.f = 10; + } + constructor(e, t, s, n, r, o, a, l, c, u, d) { + super(s); + this.F = e; + this.G = t; + this.H = n; + this.I = r; + this.J = o; + this.L = a; + this.M = l; + this.N = c; + this.O = u; + this.P = d; + this.g = this.D(new B()); + this.onDidChangeVisibility = this.g.event; + this.y = Lvt.bindTo(this.J); + this.y = Lvt.bindTo(o); + this.Q(); + } + Q() { + this.D(this.G.onDidChangeNotification(e => this.X(e))); + this.D(this.I.onDidLayoutMainContainer(e => this.layout(Ln.lift(e)))); + this.D(this.N.onDidChangeFilter(() => this.R())); + } + R() { + if (this.N.getFilter() === rd.ERROR) { + this.hide(); + } + } + get isVisible() { + return !!this.t; + } + show() { + if (this.t) { + const s = Tn(this.s); + s.show(); + s.focusFirst(); + return; + } + if (!this.j) { + this.U(); + } + this.S(); + const [e, t] = vT(this.s, this.j); + this.t = true; + t.classList.add("visible"); + e.show(); + this.layout(this.u); + e.updateNotificationsList(0, 0, this.G.notifications); + e.focusFirst(); + this.updateStyles(); + this.G.notifications.forEach(s => s.updateVisibility(true)); + this.y.set(true); + this.g.fire(); + } + S() { + const [e, t] = vT(this.r, this.z); + if (this.G.notifications.length === 0) { + e.textContent = f(3641, null); + t.enabled = false; + } else { + e.textContent = f(3642, null); + t.enabled = this.G.notifications.some(s => !s.hasProgress); + } + } + U() { + this.j = document.createElement("div"); + this.j.classList.add("notifications-center"); + this.m = document.createElement("div"); + this.m.classList.add("notifications-center-header"); + this.j.appendChild(this.m); + this.r = document.createElement("span"); + this.r.classList.add("notifications-center-header-title"); + this.m.appendChild(this.r); + const e = document.createElement("div"); + e.classList.add("notifications-center-header-toolbar"); + this.m.appendChild(e); + const t = this.D(this.H.createInstance(JTe)); + const s = this; + const n = this.D(new ea(e, { + ariaLabel: f(3643, null), + actionRunner: t, + actionViewItemProvider: (o, a) => { + if (o.id === N$t.ID) { + return this.D(this.H.createInstance(T1, o, { + getActions() { + const l = [Ba({ + id: L$t.ID, + label: s.N.getFilter() === rd.OFF ? f(3644, null) : f(3645, null), + run: () => s.N.setFilter(s.N.getFilter() === rd.OFF ? rd.ERROR : rd.OFF) + })]; + const c = s.N.getFilters().sort((u, d) => u.label.localeCompare(d.label)); + for (const u of c.slice(0, rde.f)) { + if (l.length === 1) { + l.push(new gr()); + } + l.push(Ba({ + id: `${L$t.ID}.${u.id}`, + label: u.label, + checked: u.filter !== rd.ERROR, + run: () => s.N.setFilter({ + ...u, + filter: u.filter === rd.ERROR ? rd.OFF : rd.ERROR + }) + })); + } + if (c.length > rde.f) { + l.push(new gr()); + l.push(s.D(s.H.createInstance(R$t, R$t.ID, f(3646, null)))); + } + return l; + } + }, this.P, { + ...a, + actionRunner: t, + classNames: o.class, + keybindingProvider: l => this.M.lookupKeybinding(l.id) + })); + } + } + })); + this.z = this.D(this.H.createInstance(KTe, KTe.ID, KTe.LABEL)); + n.push(this.z, { + icon: true, + label: false, + keybinding: this.W(this.z) + }); + this.C = this.D(this.H.createInstance(N$t, N$t.ID, N$t.LABEL)); + n.push(this.C, { + icon: true, + label: false + }); + const r = this.D(this.H.createInstance(YTe, YTe.ID, YTe.LABEL)); + n.push(r, { + icon: true, + label: false, + keybinding: this.W(r) + }); + this.s = this.H.createInstance($$t, this.j, { + widgetAriaLabel: f(3647, null) + }); + this.F.appendChild(this.j); + } + W(e) { + const t = this.M.lookupKeybinding(e.id); + if (t) { + return t.getLabel(); + } else { + return null; + } + } + X(e) { + if (!this.t) { + return; + } + let t = false; + const [s, n] = vT(this.s, this.j); + switch (e.kind) { + case 0: + s.updateNotificationsList(e.index, 0, [e.item]); + e.item.updateVisibility(true); + break; + case 1: + switch (e.detail) { + case 2: + s.updateNotificationsList(e.index, 1, [e.item]); + break; + case 1: + if (e.item.expanded) { + s.updateNotificationHeight(e.item); + } + break; + } + break; + case 2: + s.updateNotificationsList(e.index, 1, [e.item]); + break; + case 3: + t = pg(n); + s.updateNotificationsList(e.index, 1); + e.item.updateVisibility(false); + break; + } + this.S(); + if (this.G.notifications.length === 0) { + this.hide(); + if (t) { + this.L.activeGroup.focus(); + } + } + } + hide() { + if (!this.t || !this.j || !this.s) { + return; + } + const e = pg(this.j); + this.t = false; + this.j.classList.remove("visible"); + this.s.hide(); + this.G.notifications.forEach(t => t.updateVisibility(false)); + this.y.set(false); + this.g.fire(); + if (e) { + this.L.activeGroup.focus(); + } + } + updateStyles() { + if (this.j && this.m) { + const e = this.w(OT); + this.j.style.boxShadow = e ? `0 0 8px 2px ${e}` : ""; + const t = this.w(LIr); + this.j.style.border = t ? `1px solid ${t}` : ""; + const s = this.w(NIr); + this.m.style.color = s ?? ""; + const n = this.w(YVs); + this.m.style.background = n ?? ""; + } + } + layout(e) { + this.u = e; + if (this.t && this.j) { + const t = rde.c.width; + const s = rde.c.height; + let n = t; + let r = s; + if (this.u) { + n = this.u.width; + n -= 16; + r = this.u.height - 35; + if (this.I.isVisible("workbench.parts.statusbar", xt)) { + r -= 22; + } + if (this.I.isVisible("workbench.parts.titlebar", xt)) { + r -= 22; + } + r -= 24; + } + Tn(this.s).layout(Math.min(t, n), Math.min(s, r)); + } + } + clearAll() { + this.hide(); + for (const e of [...this.G.notifications]) { + if (!e.hasProgress) { + e.close(); + } + this.O.playSignal(el.clear); + } + } +}; +kBi = rde = __decorate([__param(2, ti), __param(3, re), __param(4, lr), __param(5, Ne), __param(6, Hi), __param(7, oi), __param(8, ni), __param(9, Pd), __param(10, ts)], kBi); +wc(); +X(); +q(); +Yd(); +Wi(); +pe(); +var VWo = class extends H { + constructor(i) { + super(); + this.a = i; + for (const e of i.notifications) { + this.f(e); + } + this.b(); + } + b() { + this.D(this.a.onDidChangeNotification(i => this.c(i))); + } + c(i) { + if (i.kind === 0) { + this.f(i.item); + if (i.item.severity === es.Error) { + if (i.item.message.original instanceof Error) { + console.error(i.item.message.original); + } else { + console.error(ou(i.item.message.linkedText.toString(), true)); + } + } + } + } + f(i) { + if (i.priority === Ru.SILENT) { + return; + } + const e = i.onDidChangeContent(t => { + if (t.kind === 1) { + this.g(i); + } + }); + de.once(i.onDidClose)(() => e.dispose()); + this.g(i); + } + g(i) { + let e; + if (i.severity === es.Error) { + e = f(3638, null, i.message.linkedText.toString()); + } else if (i.severity === es.Warning) { + e = f(3639, null, i.message.linkedText.toString()); + } else { + e = f(3640, null, i.message.linkedText.toString()); + } + Fc(e); + } +}; +bh(); +q(); +X(); +Wi(); +var EBi = class extends H { + constructor(e, t, s) { + super(); + this.h = e; + this.j = t; + this.m = s; + this.b = 0; + this.f = false; + this.g = false; + this.r(); + if (e.statusMessage) { + this.u(e.statusMessage); + } + this.n(); + } + n() { + this.D(this.h.onDidChangeNotification(e => this.q(e))); + this.D(this.h.onDidChangeStatusMessage(e => this.t(e))); + this.D(this.m.onDidChangeFilter(() => this.r())); + } + q(e) { + if (!this.f) { + if (e.kind === 0) { + this.b++; + } else if (e.kind === 3 && this.b > 0) { + this.b--; + } + } + this.r(); + } + r() { + let e = 0; + if (!this.f && !this.g) { + for (const s of this.h.notifications) { + if (s.hasProgress) { + e++; + } + } + } + let t = { + name: f(3664, null), + text: `${e > 0 || this.b > 0 ? "$(bell-dot)" : "$(bell)"}`, + ariaLabel: f(3665, null), + command: this.f ? zTe : mBi, + tooltip: this.s(e), + showBeak: this.f + }; + if (this.m.getFilter() === rd.ERROR) { + t = { + ...t, + text: `${e > 0 || this.b > 0 ? "$(bell-slash-dot)" : "$(bell-slash)"}`, + ariaLabel: f(3666, null), + tooltip: f(3667, null) + }; + } + if (this.a) { + this.a.update(t); + } else { + this.a = this.j.addEntry(t, "status.notifications", 1, -Number.MAX_VALUE); + } + } + s(e) { + if (this.f) { + return f(3668, null); + } else if (this.h.notifications.length === 0) { + return f(3669, null); + } else if (e === 0) { + if (this.b === 0) { + return f(3670, null); + } else if (this.b === 1) { + return f(3671, null); + } else { + return f(3672, null, this.b); + } + } else if (this.b === 0) { + return f(3673, null, e); + } else if (this.b === 1) { + return f(3674, null, e); + } else { + return f(3675, null, this.b, e); + } + } + update(e, t) { + let s = false; + if (this.f !== e) { + this.f = e; + this.b = 0; + s = true; + } + if (this.g !== t) { + this.g = t; + s = true; + } + if (s) { + this.r(); + } + } + t(e) { + const t = e.item; + switch (e.kind) { + case 0: + this.u(t); + break; + case 1: + if (this.c && this.c[0] === t) { + si(this.c[1]); + this.c = undefined; + } + break; + } + } + u(e) { + const t = e.message; + const s = e.options && typeof e.options.showAfter == "number" ? e.options.showAfter : 0; + const n = e.options && typeof e.options.hideAfter == "number" ? e.options.hideAfter : -1; + if (this.c) { + si(this.c[1]); + } + let r; + let o = setTimeout(() => { + r = this.j.addEntry({ + name: f(3676, null), + text: t, + ariaLabel: t + }, "status.message", 0, -Number.MAX_VALUE); + o = null; + }, s); + let a; + const l = { + dispose: () => { + if (o) { + clearTimeout(o); + } + if (a) { + clearTimeout(a); + } + r?.dispose(); + } + }; + if (n > 0) { + a = setTimeout(() => l.dispose(), n); + } + this.c = [e, l]; + } +}; +EBi = __decorate([__param(1, bu), __param(2, ni)], EBi); +X(); +q(); +xe(); +te(); +pe(); +gi(); +Qs(); +ar(); +Ee(); +Wi(); +da(); +nt(); +zt(); +fr(); +Cs(); +Me(); +Pn(); +var UQ; +var m2; +(function (i) { + i[i.HIDDEN_OR_VISIBLE = 0] = "HIDDEN_OR_VISIBLE"; + i[i.HIDDEN = 1] = "HIDDEN"; + i[i.VISIBLE = 2] = "VISIBLE"; +})(m2 ||= {}); +var IBi = class extends j0 { + static { + UQ = this; + } + static { + this.a = 450; + } + static { + this.b = 3; + } + static { + this.c = { + [es.Info]: 15000, + [es.Warning]: 18000, + [es.Error]: 20000 + }; + } + static { + this.f = { + interval: 800, + limit: this.b + }; + } + get isVisible() { + return !!this.j; + } + constructor(e, t, s, n, r, o, a, l, c, u, d) { + super(r); + this.C = e; + this.F = t; + this.G = s; + this.H = n; + this.I = o; + this.J = a; + this.L = l; + this.M = c; + this.N = u; + this.O = d; + this.g = this.D(new B()); + this.onDidChangeVisibility = this.g.event; + this.j = false; + this.t = new Map(); + this.u = new Map(); + this.y = d6.bindTo(this.J); + this.z = new qji(UQ.f.interval); + this.P(); + } + P() { + this.D(this.H.onDidLayoutMainContainer(e => this.layout(Ln.lift(e)))); + this.L.when(3).then(() => { + this.F.notifications.forEach(e => this.R(e)); + this.D(this.F.onDidChangeNotification(e => this.Q(e))); + }); + this.D(this.F.onDidChangeFilter(({ + global: e, + sources: t + }) => { + if (e === rd.ERROR) { + this.hide(); + } else if (t) { + for (const [s] of this.t) { + if (typeof s.sourceId == "string" && t.get(s.sourceId) === rd.ERROR && s.severity !== es.Error && s.priority !== Ru.URGENT) { + this.W(s); + } + } + } + })); + this.D(this.N.onChangeEffectManuallyDisposed({ + deps: [() => this.N.nonPersistentStorage.reactivePrimaryBarLocation], + onChange: () => { + this.eb(); + } + })); + this.D(this.O.onDidChangeConfiguration(e => { + if (e.affectsConfiguration(frt)) { + this.eb(); + } + })); + this.eb(); + } + Q(e) { + switch (e.kind) { + case 0: + return this.R(e.item); + case 3: + return this.W(e.item); + } + } + R(e) { + if (this.s || e.priority === Ru.SILENT || this.z.increment() > UQ.f.limit) { + return; + } + const t = new Q(); + this.u.set(e, t); + t.add(Zc(Kt(this.C), () => this.S(e, t))); + } + S(e, t) { + if (this.shouldHideUntil && this.shouldHideUntil > Date.now()) { + return; + } + let s = this.m; + if (!s) { + s = this.m = document.createElement("div"); + s.classList.add("notifications-toasts"); + this.C.appendChild(s); + this.eb(); + } + s.classList.add("visible"); + const n = document.createElement("div"); + n.classList.add("notification-toast-container"); + const r = s.firstChild; + if (r) { + s.insertBefore(n, r); + } else { + s.appendChild(n); + } + const o = document.createElement("div"); + o.classList.add("notification-toast"); + n.appendChild(o); + const a = this.G.createInstance($$t, o, { + verticalScrollMode: 2, + widgetAriaLabel: e.source ? f(3678, null, e.message.raw, e.source) : f(3677, null, e.message.raw) + }); + t.add(a); + const l = { + item: e, + list: a, + container: n, + toast: o + }; + this.t.set(e, l); + t.add(Ue(() => this.cb(l, false))); + a.show(); + const c = this.$(); + this.ab(c.width); + a.updateNotificationsList(0, 0, [e]); + this.bb(c.height); + t.add(e.onDidChangeExpansion(() => { + a.updateNotificationsList(0, 1, [e]); + })); + t.add(e.onDidChangeContent(u => { + switch (u.kind) { + case 2: + a.updateNotificationsList(0, 1, [e]); + break; + case 1: + if (e.expanded) { + a.updateNotificationHeight(e); + } + break; + } + })); + de.once(e.onDidClose)(() => { + this.W(e); + }); + this.U(e, n, a, t); + this.updateStyles(); + this.y.set(true); + o.classList.add("notification-fade-in"); + t.add(Ce(o, "transitionend", () => { + o.classList.remove("notification-fade-in"); + o.classList.add("notification-fade-in-done"); + })); + e.updateVisibility(true); + if (!this.j) { + this.j = true; + this.g.fire(); + } + } + U(e, t, s, n) { + let r = false; + n.add(Ce(t, Oe.MOUSE_OVER, () => r = true)); + n.add(Ce(t, Oe.MOUSE_OUT, () => r = false)); + let o; + let a; + const l = () => { + o = setTimeout(() => { + if (this.M.hasFocus) { + if (e.sticky || s.hasFocus() || r) { + l(); + } else { + this.W(e); + } + } else if (!a) { + a = this.M.onDidChangeFocus(c => { + if (c) { + l(); + } + }); + n.add(a); + } + }, UQ.c[e.severity]); + }; + l(); + n.add(Ue(() => clearTimeout(o))); + } + W(e) { + let t = false; + const s = this.t.get(e); + if (s) { + if (pg(s.container)) { + t = !this.focusNext() && !this.focusPrevious(); + } + this.t.delete(e); + } + const n = this.u.get(e); + if (n) { + si(n); + this.u.delete(e); + } + if (this.t.size > 0) { + this.layout(this.r); + } else { + this.Y(); + if (t) { + this.I.activeGroup.focus(); + } + } + } + X() { + this.t.clear(); + this.u.forEach(e => si(e)); + this.u.clear(); + this.Y(); + } + Y() { + this.m?.classList.remove("visible"); + this.y.set(false); + if (this.j) { + this.j = false; + this.g.fire(); + } + } + hide() { + const e = this.m ? pg(this.m) : false; + this.X(); + if (e) { + this.I.activeGroup.focus(); + } + } + hideForMs(e) { + this.shouldHideUntil = Date.now() + e; + this.hide(); + } + focus() { + const e = this.Z(m2.VISIBLE); + if (e.length > 0) { + e[0].list.focusFirst(); + return true; + } else { + return false; + } + } + focusNext() { + const e = this.Z(m2.VISIBLE); + for (let t = 0; t < e.length; t++) { + if (e[t].list.hasFocus()) { + const n = e[t + 1]; + if (n) { + n.list.focusFirst(); + return true; + } + break; + } + } + return false; + } + focusPrevious() { + const e = this.Z(m2.VISIBLE); + for (let t = 0; t < e.length; t++) { + if (e[t].list.hasFocus()) { + const n = e[t - 1]; + if (n) { + n.list.focusFirst(); + return true; + } + break; + } + } + return false; + } + focusFirst() { + const e = this.Z(m2.VISIBLE)[0]; + if (e) { + e.list.focusFirst(); + return true; + } else { + return false; + } + } + focusLast() { + const e = this.Z(m2.VISIBLE); + if (e.length > 0) { + e[e.length - 1].list.focusFirst(); + return true; + } else { + return false; + } + } + update(e) { + if (this.s !== e) { + this.s = e; + if (this.s) { + this.X(); + } + } + } + updateStyles() { + this.t.forEach(({ + toast: e + }) => { + const t = this.w(zre); + e.style.background = t || ""; + const s = this.w(OT); + e.style.boxShadow = s ? `0 0 8px 2px ${s}` : ""; + const n = this.w(RIr); + e.style.border = n ? `1px solid ${n}` : ""; + }); + } + Z(e) { + const t = []; + this.t.forEach(s => { + switch (e) { + case m2.HIDDEN_OR_VISIBLE: + t.push(s); + break; + case m2.HIDDEN: + if (!this.db(s)) { + t.push(s); + } + break; + case m2.VISIBLE: + if (this.db(s)) { + t.push(s); + } + break; + } + }); + return t.reverse(); + } + layout(e) { + this.r = e; + const t = this.$(); + if (t.height) { + this.bb(t.height); + } + this.ab(t.width); + } + $() { + const e = UQ.a; + let t = e; + let s; + if (this.r) { + t = this.r.width; + t -= 16; + s = this.r.height; + if (this.H.isVisible("workbench.parts.statusbar", xt)) { + s -= 22; + } + if (this.H.isVisible("workbench.parts.titlebar", xt)) { + s -= 22; + } + s -= 24; + } + s = typeof s == "number" ? Math.round(s * 0.618) : 0; + return new Ln(Math.min(e, t), s); + } + ab(e) { + this.t.forEach(({ + list: t + }) => t.layout(e)); + } + bb(e) { + let t = 0; + for (const s of this.Z(m2.HIDDEN_OR_VISIBLE)) { + s.container.style.opacity = "0"; + this.cb(s, true); + e -= s.container.offsetHeight; + let n = false; + if (t === UQ.b) { + n = false; + } else if (e >= 0) { + n = true; + } + this.cb(s, n); + s.container.style.opacity = ""; + if (n) { + t++; + } + } + } + cb(e, t) { + if (this.db(e) === t) { + return; + } + const s = Tn(this.m); + if (t) { + s.appendChild(e.container); + } else { + e.container.remove(); + } + e.item.updateVisibility(t); + } + db(e) { + return !!e.container.parentElement; + } + eb() { + const e = this.m; + const t = this.O.getValue(frt); + if (!e) { + return; + } + if ((this.N.nonPersistentStorage.reactivePrimaryBarLocation === "left" ? "right" : "left") === "left") { + if (t) { + e.style.left = "3px"; + e.style.right = "unset"; + } else { + e.style.left = "unset"; + e.style.right = "3px"; + } + } else if (t) { + e.style.left = "unset"; + e.style.right = "3px"; + } else { + e.style.left = "3px"; + e.style.right = "unset"; + } + } +}; +IBi = UQ = __decorate([__param(2, re), __param(3, lr), __param(4, ti), __param(5, Hi), __param(6, Ne), __param(7, Yo), __param(8, kr), __param(9, _i), __param(10, ve)], IBi); +wc(); +Cj(); +rF(); +Yd(); +pe(); +q(); +Ee(); +xe(); +ar(); +Me(); +Rr(); +ii(); +fA(); +lD(); +rt(); +Wf(); +Fme(); +kn(); +fr(); +hc(); +vt(); +var DBi = class extends H { + constructor(e, t, s, n, r, o, a, l, c, u) { + super(); + this.S = e; + this.U = t; + this.W = s; + this.X = n; + this.Y = r; + this.Z = o; + this.$ = a; + this.ab = l; + this.bb = c; + this.cb = u; + tmt.bindTo(this.S); + HQt.bindTo(this.S); + NR.bindTo(this.S); + r0.bindTo(this.S); + LA.bindTo(this.S); + Y5s.bindTo(this.S); + Zgr.bindTo(this.S); + c6.bindTo(this.S).set(uD(this.X.remoteAuthority) || ""); + this.w = xW.bindTo(this.S); + this.y = jWs.bindTo(this.S); + this.pb(); + zWs.bindTo(this.S).set(zT.supported(xt)); + const d = !this.X.isBuilt || this.X.isExtensionDevelopment; + jU.bindTo(this.S).set(d); + Pqn(jU.key, d); + epr.bindTo(this.S).set(this.Y.quality || ""); + Pkr.bindTo(this.S).set(r.embedderIdentifier); + this.c = Tvt.bindTo(this.S); + this.f = Rkr.bindTo(this.S); + this.g = Nkr.bindTo(this.S); + this.h = ZA.bindTo(this.S); + this.j = B1.bindTo(this.S); + this.m = ZWs.bindTo(this.S); + this.b = vsi.bindTo(this.S); + this.b.set(this.cb.hasDirty); + this.a = R1.bindTo(this.S); + this.q = ud.bindTo(this.S); + this.jb(); + this.r = GG.bindTo(this.S); + this.kb(); + this.s = l6.bindTo(this.S); + this.s.set(sc || typeof this.X.remoteAuthority == "string"); + this.u = DCe.bindTo(this.S); + this.u.set(sc || typeof this.X.remoteAuthority == "string"); + this.t = wP.bindTo(this.S); + this.t.set(sc || typeof this.X.remoteAuthority == "string"); + this.n = Akr.bindTo(this.S); + this.lb(); + this.C = u6.bindTo(this.S); + this.F = CP.bindTo(this.S); + this.z = ME.bindTo(this.S); + this.G = Ssi.bindTo(this.S); + this.I = eVs.bindTo(this.S); + this.P = _re.bindTo(this.S); + this.H = $O.bindTo(this.S); + this.Q = PCe.bindTo(this.S); + this.R = XG.bindTo(this.S); + this.ob(); + this.J = QG.bindTo(this.S); + this.J.set(PP(this.ab.getPanelPosition())); + this.L = Wre.bindTo(this.S); + this.L.set(this.ab.isVisible("workbench.parts.panel")); + this.N = tVs.bindTo(this.S); + this.N.set(this.ab.isPanelMaximized()); + this.M = f6.bindTo(this.S); + this.M.set(this.ab.getPanelAlignment()); + this.O = h6.bindTo(this.S); + this.O.set(this.ab.isVisible("workbench.parts.auxiliarybar")); + this.db(); + } + db() { + this.Z.whenReady.then(() => { + this.hb(); + this.fb(); + this.eb(); + }); + this.D(this.$.onDidActiveEditorChange(() => this.fb())); + this.D(this.$.onDidVisibleEditorsChange(() => this.eb())); + this.D(this.Z.onDidAddGroup(() => this.gb())); + this.D(this.Z.onDidRemoveGroup(() => this.gb())); + this.D(this.Z.onDidChangeGroupIndex(() => this.fb())); + this.D(this.Z.onDidChangeGroupLocked(() => this.fb())); + this.D(this.Z.onDidChangeEditorPartOptions(() => this.hb())); + this.D(de.runAndSubscribe(xI, ({ + window: e, + disposables: t + }) => t.add(Ce(e, Oe.FOCUS_IN, () => this.ib(e.document), true)), { + window: xt, + disposables: this.B + })); + this.D(this.U.onDidChangeWorkbenchState(() => this.jb())); + this.D(this.U.onDidChangeWorkspaceFolders(() => { + this.kb(); + this.pb(); + })); + this.D(this.W.onDidChangeConfiguration(e => { + if (e.affectsConfiguration("workbench.editor.openSideBySideDirection")) { + this.lb(); + } + })); + this.D(this.ab.onDidChangeZenMode(e => this.z.set(e))); + this.D(this.ab.onDidChangeActiveContainer(() => this.F.set(this.ab.activeContainer !== this.ab.mainContainer))); + this.D(l9(e => { + if (e === xt.vscodeWindowId) { + this.C.set(CT(xt)); + } + })); + this.D(this.ab.onDidChangeMainEditorCenteredLayout(e => this.G.set(e))); + this.D(this.ab.onDidChangePanelPosition(e => this.J.set(e))); + this.D(this.ab.onDidChangePanelAlignment(e => this.M.set(e))); + this.D(this.bb.onDidPaneCompositeClose(() => this.nb())); + this.D(this.bb.onDidPaneCompositeOpen(() => this.nb())); + this.D(this.ab.onDidChangePartVisibility(() => { + this.I.set(this.ab.isVisible("workbench.parts.editor", xt)); + this.L.set(this.ab.isVisible("workbench.parts.panel")); + this.N.set(this.ab.isPanelMaximized()); + this.O.set(this.ab.isVisible("workbench.parts.auxiliarybar")); + this.ob(); + })); + this.D(this.cb.onDidChangeDirty(e => this.b.set(e.isDirty() || this.cb.hasDirty))); + } + eb() { + if (this.$.visibleEditorPanes.length > 0) { + this.m.set(true); + } else { + this.m.reset(); + } + } + fb() { + if (this.$.activeEditor) { + this.c.reset(); + } else { + this.c.set(true); + } + const e = this.Z.activeGroup; + this.f.set(e.index + 1); + this.h.set(e.isLocked); + this.gb(); + } + gb() { + const e = this.Z.count; + if (e > 1) { + this.j.set(true); + } else { + this.j.reset(); + } + const t = this.Z.activeGroup; + this.g.set(t.index === e - 1); + } + hb() { + this.P.set(this.Z.partOptions.showTabs === "multiple"); + } + ib(e) { + function t() { + return !!e.activeElement && ZS(e.activeElement); + } + const s = t(); + this.a.set(s); + if (s) { + const n = Pu(e.activeElement); + de.once(n.onDidBlur)(() => { + if (js().document === e) { + this.a.set(t()); + } + n.dispose(); + }); + } + } + jb() { + this.q.set(this.mb()); + } + kb() { + this.r.set(this.U.getWorkspace().folders.length); + } + lb() { + const e = eO(this.W); + this.n.set(e === 1); + } + mb() { + switch (this.U.getWorkbenchState()) { + case 1: + return "empty"; + case 2: + return "folder"; + case 3: + return "workspace"; + } + } + nb() { + this.H.set(this.ab.isVisible("workbench.parts.sidebar")); + } + ob() { + this.Q.set(this.ab.isVisible("workbench.parts.titlebar", xt)); + this.R.set(roi(this.W)); + } + pb() { + this.w.set(e2s(this.U.getWorkspace()) || ""); + this.y.set(vF(this.U.getWorkspace())); + } +}; +DBi = __decorate([__param(0, Ne), __param(1, kt), __param(2, ve), __param(3, Wn), __param(4, ys), __param(5, Hi), __param(6, Te), __param(7, lr), __param(8, Id), __param(9, Tp)], DBi); +Jt(); +q(); +pe(); +xe(); +hc(); +rt(); +Nn(); +ii(); +qt(); +Me(); +da(); +vt(); +ar(); +bh(); +Nt(); +wa(); +Jt(); +zt(); +Wi(); +gi(); +Le(); +Qn(); +yb(); +rn(); +Zt(); +nt(); +Wf(); +ai(); +Pn(); +fr(); +Xy(); +var Ey; +(function (i) { + i.SIDEBAR_HIDDEN = "nosidebar"; + i.MAIN_EDITOR_AREA_HIDDEN = "nomaineditorarea"; + i.PANEL_HIDDEN = "nopanel"; + i.AUXILIARYBAR_HIDDEN = "noauxiliarybar"; + i.STATUSBAR_HIDDEN = "nostatusbar"; + i.FULLSCREEN = "fullscreen"; + i.MAXIMIZED = "maximized"; + i.WINDOW_BORDER = "border"; +})(Ey ||= {}); +var HWo = ["workbench.activityBar.location", "window.commandCenter", "workbench.editor.editorActionsLocation", "workbench.layoutControl.enabled", "workbench.navigationControl.enabled", "window.menuBarVisibility", "window.titleBarStyle", "window.customTitleBarVisibility"]; +var qWo = class extends H { + get activityBarDirection() { + return this.S.getValue(HB); + } + get activeContainer() { + return this.t(hf()); + } + get containers() { + const i = []; + for (const { + window: e + } of Jk()) { + i.push(this.t(e.document)); + } + return i; + } + t(i) { + if (i === this.mainContainer.ownerDocument) { + return this.mainContainer; + } else { + return i.body.getElementsByClassName("monaco-workbench")[0]; + } + } + whenContainerStylesLoaded(i) { + return this.u.get(i.vscodeWindowId); + } + get mainContainerDimension() { + return this.w; + } + get activeContainerDimension() { + return this.y(this.activeContainer); + } + y(i) { + if (i === this.mainContainer) { + return this.mainContainerDimension; + } else { + return zk(i); + } + } + get mainContainerOffset() { + return this.z(xt); + } + get activeContainerOffset() { + return this.z(Kt(this.activeContainer)); + } + z(i) { + let e = 0; + let t = 0; + if (this.isVisible("workbench.parts.banner")) { + e = this.Mb("workbench.parts.banner").maximumHeight; + t = e; + } + const s = this.isVisible("workbench.parts.titlebar", i); + if (s) { + e += this.Mb("workbench.parts.titlebar").maximumHeight; + t = e; + } + if (s && this.S.getValue("window.commandCenter") !== false) { + t = 6; + } + if (false) { + t = B5t; + } + return { + top: e, + quickPickTop: t + }; + } + constructor(i) { + super(); + this.ob = i; + this.a = this.D(new B()); + this.onDidChangeZenMode = this.a.event; + this.b = this.D(new B()); + this.onDidChangeMainEditorCenteredLayout = this.b.event; + this.c = this.D(new B()); + this.onDidChangePanelAlignment = this.c.event; + this.f = this.D(new B()); + this.onDidChangeWindowMaximized = this.f.event; + this.g = this.D(new B()); + this.onDidChangePanelPosition = this.g.event; + this.h = this.D(new B()); + this.onDidChangePartVisibility = this.h.event; + this.j = this.D(new B()); + this.onDidChangeNotificationsVisibility = this.j.event; + this.m = this.D(new B()); + this.onDidLayoutMainContainer = this.m.event; + this.n = this.D(new B()); + this.onDidLayoutActiveContainer = this.n.event; + this.q = this.D(new B()); + this.onDidLayoutContainer = this.q.event; + this.r = this.D(new B()); + this.onDidAddContainer = this.r.event; + this.s = this.D(new B()); + this.onDidChangeActiveContainer = this.s.event; + this.mainContainer = document.createElement("div"); + this.u = new Map(); + this.C = new Map(); + this.F = false; + this.nb = false; + this.Fb = false; + this.Hb = new uc(); + this.Ib = this.Hb.p; + this.Jb = new uc(); + this.whenRestored = this.Jb.p; + this.Kb = false; + } + pb(i) { + this.Q = i.get(hy); + this.S = i.get(ve); + this.W = i.get(kr); + this.cb = i.get(kt); + this.U = i.get(ht); + this.db = i.get(LS); + this.fb = i.get(ti); + this.R = i.get(Ks); + this.hb = i.get(Bt); + this.ib = i.get(Ot); + this.jb = i.get(lX); + this.X = i.get(Te); + this.Y = this.X.createScoped("main", this.B); + this.Z = i.get(Hi); + this.$ = i.get(Id); + this.bb = i.get(Ur); + this.ab = i.get(Ale); + this.eb = i.get(ni); + this.gb = i.get(bu); + this.kb = i.get(ry); + i.get(L8); + this.qb(); + this.Ab(i.get(Yo), i.get(Ct)); + } + qb() { + const i = () => { + if (!this.isVisible("workbench.parts.editor", xt)) { + this.toggleMaximizedPanel(); + } + }; + this.Z.whenRestored.then(() => { + this.D(this.Y.onDidVisibleEditorsChange(i)); + this.D(this.Z.mainPart.onDidActivateGroup(i)); + this.D(this.Y.onDidActiveEditorChange(() => this.centerMainEditorLayout(this.mb.getRuntimeValue(Mn.MAIN_EDITOR_CENTERED)))); + }); + this.D(this.S.onDidChangeConfiguration(t => { + if ([...HWo, uT.SIDEBAR_POSITION, uT.STATUSBAR_VISIBLE].some(s => t.affectsConfiguration(s))) { + const s = t.affectsConfiguration("workbench.editor.editorActionsLocation") && this.S.getValue("workbench.editor.editorActionsLocation") === "titleBar"; + let n = false; + if (t.affectsConfiguration("workbench.activityBar.location")) { + const r = this.S.getValue("workbench.activityBar.location"); + n = r === "top" || r === "bottom"; + } + if ((n || s) && this.S.getValue("window.customTitleBarVisibility") === "never") { + this.S.updateValue("window.customTitleBarVisibility", "auto"); + } + this.xb(); + } + })); + this.D(l9(t => this.tb(t))); + this.D(this.Z.mainPart.onDidAddGroup(() => this.centerMainEditorLayout(this.mb.getRuntimeValue(Mn.MAIN_EDITOR_CENTERED)))); + this.D(this.Z.mainPart.onDidRemoveGroup(() => this.centerMainEditorLayout(this.mb.getRuntimeValue(Mn.MAIN_EDITOR_CENTERED)))); + this.D(this.Z.mainPart.onDidChangeGroupMaximized(() => this.centerMainEditorLayout(this.mb.getRuntimeValue(Mn.MAIN_EDITOR_CENTERED)))); + this.D(Ce(this.mainContainer, Oe.SCROLL, () => this.mainContainer.scrollTop = 0)); + if ((ln || yl || tn) && !IC(this.S)) { + this.D(this.ab.onMenubarVisibilityChange(t => this.rb(t))); + } + this.D(this.fb.onDidColorThemeChange(() => this.zb())); + this.D(this.W.onDidChangeFocus(t => this.vb(t))); + this.D(this.W.onDidChangeActiveWindow(() => this.ub())); + if (tn && typeof navigator.windowControlsOverlay == "object") { + this.D(Ce(navigator.windowControlsOverlay, "geometrychange", () => this.cc())); + } + this.D(this.jb.onDidOpenAuxiliaryWindow(({ + window: t, + disposables: s + }) => { + const n = t.window.vscodeWindowId; + this.u.set(n, t.whenStylesHaveLoaded); + t.whenStylesHaveLoaded.then(() => this.u.delete(n)); + s.add(Ue(() => this.u.delete(n))); + const r = s.add(new Q()); + this.r.fire({ + container: t.container, + disposables: r + }); + s.add(t.onDidLayout(o => this.sb(t.container, o))); + })); + } + rb(i) { + if (i !== this.lb.runtime.menuBar.toggled) { + this.lb.runtime.menuBar.toggled = i; + const e = B6(this.S); + if (tn && e === "toggle") { + this.G.setViewVisible(this.H, U6(this.S, xt, this.lb.runtime.menuBar.toggled)); + } else if (this.lb.runtime.mainWindowFullscreen && (e === "toggle" || e === "classic")) { + this.G.setViewVisible(this.H, U6(this.S, xt, this.lb.runtime.menuBar.toggled)); + } + this.sb(this.mainContainer, this.w); + } + } + sb(i, e) { + if (i === this.mainContainer) { + this.m.fire(e); + } + if (wJi(i)) { + this.n.fire(e); + } + this.q.fire({ + container: i, + dimension: e + }); + } + tb(i) { + if (i === xt.vscodeWindowId) { + this.lb.runtime.mainWindowFullscreen = CT(xt); + if (this.lb.runtime.mainWindowFullscreen) { + this.mainContainer.classList.add(Ey.FULLSCREEN); + } else { + this.mainContainer.classList.remove(Ey.FULLSCREEN); + if (this.mb.getRuntimeValue(Mn.ZEN_MODE_EXIT_INFO).transitionedToFullScreen && this.Pb()) { + this.toggleZenMode(); + } + } + this.G.edgeSnapping = this.lb.runtime.mainWindowFullscreen; + if (jK(this.S)) { + this.G.setViewVisible(this.H, U6(this.S, xt, this.lb.runtime.menuBar.toggled)); + this.zb(true); + } + } + } + ub() { + const i = this.wb(); + if (this.lb.runtime.activeContainerId !== i) { + this.lb.runtime.activeContainerId = i; + this.zb(); + this.s.fire(); + } + } + vb(i) { + if (this.lb.runtime.hasFocus !== i) { + this.lb.runtime.hasFocus = i; + this.zb(); + } + } + wb() { + const i = this.activeContainer; + return Kt(i).vscodeWindowId; + } + xb(i) { + this.updateCustomTitleBarVisibility(); + this.updateMenubarVisibility(!!i); + this.Z.whenRestored.then(() => { + this.centerMainEditorLayout(this.mb.getRuntimeValue(Mn.MAIN_EDITOR_CENTERED), i); + }); + } + yb(i) { + const e = this.activityBarDirection === "vertical" ? this.Mb("workbench.parts.activitybar") : undefined; + const t = this.Mb("workbench.parts.sidebar"); + const s = this.Mb("workbench.parts.auxiliarybar"); + const n = i === 0 ? "left" : "right"; + const r = i === 1 ? "left" : "right"; + const o = this.getPanelAlignment(); + const a = this.getPanelPosition(); + this.mb.setRuntimeValue(Mn.SIDEBAR_POSITON, i); + const l = e ? Tn(e.getContainer()) : undefined; + const c = Tn(t.getContainer()); + const u = Tn(s.getContainer()); + l?.classList.remove(r); + c.classList.remove(r); + l?.classList.add(n); + c.classList.add(n); + u.classList.remove(n); + u.classList.add(r); + e?.updateStyles(); + t.updateStyles(); + s.updateStyles(); + this.Zb(i, o, a); + } + zb(i = false) { + if (tn || ln || ooi(this.S) || IC(this.S)) { + return; + } + const e = this.fb.getColorTheme(); + const t = e.getColor(XVs); + const s = e.getColor(QVs); + const n = this.hasMainWindowBorder(); + for (const r of this.containers) { + const o = r === this.mainContainer; + const a = this.activeContainer === r; + const l = yx(Kt(r)); + let c = false; + if (!this.lb.runtime.mainWindowFullscreen && !this.lb.runtime.maximized.has(l) && (t || s)) { + c = true; + const u = a && this.lb.runtime.hasFocus ? t : s ?? t; + r.style.setProperty("--window-border-color", u?.toString() ?? "transparent"); + } + if (o) { + this.lb.runtime.mainWindowBorder = c; + } + r.classList.toggle(Ey.WINDOW_BORDER, c); + } + if (!i && n !== this.hasMainWindowBorder()) { + this.layout(); + } + } + Ab(i, e) { + this.mb = new jWo(this.U, this.S, this.cb, this.ob); + this.mb.load(); + if (this.mb.getRuntimeValue(Mn.PANEL_HIDDEN) && this.mb.getRuntimeValue(Mn.EDITOR_HIDDEN)) { + this.mb.setRuntimeValue(Mn.EDITOR_HIDDEN, false); + } + this.D(this.mb.onDidChangeState(a => { + if (a.key === Mn.ACTIVITYBAR_HIDDEN) { + this.Ub(a.value); + } + if (a.key === Mn.STATUSBAR_HIDDEN) { + this.Rb(a.value); + } + if (a.key === Mn.SIDEBAR_POSITON) { + this.yb(a.value); + } + if (a.key === Mn.PANEL_POSITION) { + this.setPanelPosition(a.value); + } + if (a.key === Mn.PANEL_ALIGNMENT) { + this.setPanelAlignment(a.value); + } + this.xb(); + })); + const t = this.Gb(); + if (t) { + this.hb.trace("Initial editor state", t); + } + const s = { + layout: { + editors: t?.layout + }, + editor: { + restoreEditors: this.Cb(this.cb, t), + editorsToOpen: this.Eb(e, t) + }, + views: { + defaults: this.Bb(this.Q, this.U), + containerToRestore: {} + } + }; + const n = { + activeContainerId: this.wb(), + mainWindowFullscreen: CT(xt), + hasFocus: this.W.hasFocus, + maximized: new Set(), + mainWindowBorder: false, + menuBar: { + toggled: false + }, + zenMode: { + transitionDisposables: new Bo() + } + }; + this.lb = { + initialization: s, + runtime: n + }; + const r = i.startupKind === 1; + const o = this.S.getValue("workbench.activityBar.location") !== "default"; + if (this.isVisible("workbench.parts.sidebar")) { + let a; + if (!this.Q.isBuilt || i.startupKind === 3 || this.Q.isExtensionDevelopment && !this.Q.extensionTestsLocationURI) { + a = this.U.get(nEe.activeViewletSettingsKey, 1, this.bb.getDefaultViewContainer(0)?.id); + } else { + a = this.bb.getDefaultViewContainer(0)?.id; + } + if (a) { + this.lb.initialization.views.containerToRestore.sideBar = a; + } else { + this.mb.setRuntimeValue(Mn.SIDEBAR_HIDDEN, true); + } + } else if (r && o) { + const a = this.U.get(nEe.activeViewletSettingsKey, 1, this.bb.getDefaultViewContainer(0)?.id); + if (a) { + this.lb.initialization.views.containerToRestore.sideBar = a; + this.mb.setRuntimeValue(Mn.SIDEBAR_HIDDEN, false); + } + } + if (this.isVisible("workbench.parts.panel")) { + const a = this.U.get($Et.activePanelSettingsKey, 1, this.bb.getDefaultViewContainer(1)?.id); + if (a) { + this.lb.initialization.views.containerToRestore.panel = a; + } else { + this.mb.setRuntimeValue(Mn.PANEL_HIDDEN, true); + } + } + if (this.isVisible("workbench.parts.auxiliarybar")) { + let a = this.U.get($le.activePanelSettingsKey, 1, this.bb.getDefaultViewContainer(2)?.id); + if (a) { + if (a === "workbench.panel.chatSidebar") { + a = "workbench.panel.chat"; + } + this.lb.initialization.views.containerToRestore.auxiliaryBar = a; + } else { + this.mb.setRuntimeValue(Mn.AUXILIARYBAR_HIDDEN, true); + } + } + this.zb(true); + } + Bb(i, e) { + const t = i.options?.defaultLayout; + if (!t || !t.force && !e.isNew(1)) { + return; + } + const { + views: s + } = t; + if (s?.length) { + return s.map(n => n.id); + } + } + Cb(i, e) { + if (vF(i.getWorkspace())) { + return false; + } else { + return this.S.getValue("window.restoreWindows") === "preserve" || e === undefined; + } + } + Db() { + return this.lb.initialization.editor.restoreEditors; + } + async Eb(i, e) { + if (e) { + const t = dr(await yft(e.filesToMerge, i, this.hb)); + if (t.length === 4 && w1(t[0]) && w1(t[1]) && w1(t[2]) && w1(t[3])) { + return [{ + editor: { + input1: { + resource: t[0].resource + }, + input2: { + resource: t[1].resource + }, + base: { + resource: t[2].resource + }, + result: { + resource: t[3].resource + }, + options: { + pinned: true + } + } + }]; + } + const s = dr(await yft(e.filesToDiff, i, this.hb)); + if (s.length === 2) { + return [{ + editor: { + original: { + resource: s[0].resource + }, + modified: { + resource: s[1].resource + }, + options: { + pinned: true + } + } + }]; + } + const n = []; + const r = await yft(e.filesToOpenOrCreate, i, this.hb); + for (let o = 0; o < r.length; o++) { + const a = r[o]; + if (a) { + n.push({ + editor: a, + viewColumn: e.filesToOpenOrCreate?.[o].viewColumn + }); + } + } + return n; + } else if (this.cb.getWorkbenchState() === 1 && this.S.getValue("workbench.startupEditor") === "newUntitledFile") { + if (this.Z.hasRestorableState) { + return []; + } else if (await this.db.hasBackups()) { + return []; + } else { + return [{ + editor: { + resource: undefined + } + }]; + } + } + return []; + } + get openedDefaultEditors() { + return this.Fb; + } + Gb() { + const i = this.Q.options?.defaultLayout; + if ((i?.editors?.length || i?.layout?.editors) && (i.force || this.U.isNew(1))) { + this.Fb = true; + return { + layout: i.layout?.editors, + filesToOpenOrCreate: i?.editors?.map(n => ({ + viewColumn: n.viewColumn, + fileUri: V.revive(n.uri), + openOnlyIfExists: n.openOnlyIfExists, + options: n.options + })) + }; + } + const { + filesToOpenOrCreate: e, + filesToDiff: t, + filesToMerge: s + } = this.Q; + if (e || t || s) { + return { + filesToOpenOrCreate: e, + filesToDiff: t, + filesToMerge: s + }; + } + } + isRestored() { + return this.Kb; + } + Lb() { + const i = []; + const e = []; + i.push((async () => { + Dr("code/willRestoreEditors"); + await this.Z.whenReady; + Dr("code/restoreEditors/editorGroupsReady"); + if (this.lb.initialization.layout?.editors) { + this.Z.mainPart.applyLayout(this.lb.initialization.layout.editors); + } + const r = await this.lb.initialization.editor.editorsToOpen; + Dr("code/restoreEditors/editorsToOpenResolved"); + let o; + if (r.length) { + const a = this.Z.mainPart.getGroups(2); + const l = new Map(); + for (const c of r) { + const u = a[(c.viewColumn ?? 1) - 1]; + let d = l.get(u.id); + if (!d) { + d = new Set(); + l.set(u.id, d); + } + d.add(c.editor); + } + o = Promise.all(Array.from(l).map(async ([c, u]) => { + try { + await this.X.openEditors(Array.from(u), c, { + validateTrust: true + }); + } catch (d) { + this.hb.error(d); + } + })); + } + e.push(Promise.all([o?.finally(() => Dr("code/restoreEditors/editorsOpened")), this.Z.whenRestored.finally(() => Dr("code/restoreEditors/editorGroupsRestored"))]).finally(() => { + Dr("code/didRestoreEditors"); + })); + })()); + const t = (async () => { + if (this.lb.initialization.views.defaults?.length) { + Dr("code/willOpenDefaultViews"); + const r = []; + const o = c => { + const u = this.bb.getViewLocationById(c.id); + if (u !== null) { + const d = this.bb.getViewContainerByViewId(c.id); + if (d) { + if (c.order >= (r?.[u]?.order ?? 0)) { + r[u] = { + id: d.id, + order: c.order + }; + } + const h = this.bb.getViewContainerModel(d); + h.setCollapsed(c.id, false); + h.setVisible(c.id, true); + return true; + } + } + return false; + }; + const a = [...this.lb.initialization.views.defaults].reverse().map((c, u) => ({ + id: c, + order: u + })); + let l = a.length; + while (l) { + l--; + if (o(a[l])) { + a.splice(l, 1); + } + } + if (a.length) { + await this.R.whenInstalledExtensionsRegistered(); + let c = a.length; + while (c) { + c--; + if (o(a[c])) { + a.splice(c, 1); + } + } + } + if (r[0]) { + this.lb.initialization.views.containerToRestore.sideBar = r[0].id; + } + if (r[1]) { + this.lb.initialization.views.containerToRestore.panel = r[1].id; + } + if (r[2]) { + this.lb.initialization.views.containerToRestore.auxiliaryBar = r[2].id; + } + Dr("code/didOpenDefaultViews"); + } + })(); + i.push(t); + i.push((async () => { + await t; + if (!this.lb.initialization.views.containerToRestore.sideBar) { + return; + } + Dr("code/willRestoreViewlet"); + if (!(await this.$.openPaneComposite(this.lb.initialization.views.containerToRestore.sideBar, 0))) { + await this.$.openPaneComposite(this.bb.getDefaultViewContainer(0)?.id, 0); + } + Dr("code/didRestoreViewlet"); + })()); + i.push((async () => { + await t; + if (!this.lb.initialization.views.containerToRestore.panel) { + return; + } + Dr("code/willRestorePanel"); + if (!(await this.$.openPaneComposite(this.lb.initialization.views.containerToRestore.panel, 1))) { + await this.$.openPaneComposite(this.bb.getDefaultViewContainer(1)?.id, 1); + } + Dr("code/didRestorePanel"); + })()); + i.push((async () => { + await new Promise(o => { + if (this.kb.isComposerViewsServiceInitialized()) { + o(undefined); + } else { + const a = this.kb.onDidComposerViewsServiceFinishInitializing(() => { + o(undefined); + a.dispose(); + }); + } + }); + await t; + if (!this.lb.initialization.views.containerToRestore.auxiliaryBar) { + return; + } + Dr("code/willRestoreAuxiliaryBar"); + if (!(await this.$.openPaneComposite(this.lb.initialization.views.containerToRestore.auxiliaryBar, 2))) { + await this.$.openPaneComposite(this.bb.getDefaultViewContainer(2)?.id, 2); + } + Dr("code/didRestoreAuxiliaryBar"); + })()); + const s = this.Pb(); + const n = pMn(this.S).restore; + if (s) { + this.Qb(!n); + this.toggleZenMode(false, true); + } + if (this.mb.getRuntimeValue(Mn.MAIN_EDITOR_CENTERED)) { + this.centerMainEditorLayout(true, true); + } + Ko.settled(i).finally(() => { + this.Hb.complete(); + Ko.settled(e).finally(() => { + this.Kb = true; + this.Jb.complete(); + }); + }); + } + registerPart(i) { + const e = i.getId(); + this.C.set(e, i); + return Ue(() => this.C.delete(e)); + } + Mb(i) { + const e = this.C.get(i); + if (!e) { + throw new Error(`Unknown part ${i}`); + } + return e; + } + registerNotifications(i) { + this.D(i.onDidChangeNotificationsVisibility(e => this.j.fire(e))); + } + hasFocus(i) { + const e = this.getContainer(js(), i); + if (!e) { + return false; + } + const t = Tu(); + if (t) { + return cqn(t, e); + } else { + return false; + } + } + focusPart(i, e = xt) { + const t = this.getContainer(e, i) ?? this.mainContainer; + switch (i) { + case "workbench.parts.editor": + this.Z.getPart(t).activeGroup.focus(); + break; + case "workbench.parts.panel": + { + this.$.getActivePaneComposite(1)?.focus(); + break; + } + case "workbench.parts.sidebar": + { + this.$.getActivePaneComposite(0)?.focus(); + break; + } + case "workbench.parts.auxiliarybar": + { + this.$.getActivePaneComposite(2)?.focus(); + break; + } + case "workbench.parts.activitybar": + if (this.activityBarDirection === "vertical") { + this.Mb("workbench.parts.sidebar").focusActivityBar(); + } + break; + case "workbench.parts.statusbar": + this.gb.getPart(t).focus(); + break; + default: + t?.focus(); + } + } + getContainer(i, e) { + if (typeof e === "undefined") { + return this.t(i.document); + } + if (i === xt) { + return this.Mb(e).getContainer(); + } + let t; + if (e === "workbench.parts.editor") { + t = this.Z.getPart(this.t(i.document)); + } else if (e === "workbench.parts.statusbar") { + t = this.gb.getPart(this.t(i.document)); + } else if (e === "workbench.parts.titlebar") { + t = this.ab.getPart(this.t(i.document)); + } + if (t instanceof rX) { + return t.getContainer(); + } + } + isVisible(i, e = xt) { + if (e !== xt && i === "workbench.parts.editor") { + return true; + } + if (this.F) { + switch (i) { + case "workbench.parts.titlebar": + return this.G.isViewVisible(this.H); + case "workbench.parts.sidebar": + return !this.mb.getRuntimeValue(Mn.SIDEBAR_HIDDEN); + case "workbench.parts.panel": + return !this.mb.getRuntimeValue(Mn.PANEL_HIDDEN); + case "workbench.parts.auxiliarybar": + return !this.mb.getRuntimeValue(Mn.AUXILIARYBAR_HIDDEN); + case "workbench.parts.statusbar": + return !this.mb.getRuntimeValue(Mn.STATUSBAR_HIDDEN); + case "workbench.parts.activitybar": + return !this.mb.getRuntimeValue(Mn.ACTIVITYBAR_HIDDEN); + case "workbench.parts.editor": + return !this.mb.getRuntimeValue(Mn.EDITOR_HIDDEN); + case "workbench.parts.banner": + return this.G.isViewVisible(this.I); + default: + return false; + } + } + switch (i) { + case "workbench.parts.titlebar": + return U6(this.S, xt, this.lb.runtime.menuBar.toggled); + case "workbench.parts.sidebar": + return !this.mb.getRuntimeValue(Mn.SIDEBAR_HIDDEN); + case "workbench.parts.panel": + return !this.mb.getRuntimeValue(Mn.PANEL_HIDDEN); + case "workbench.parts.auxiliarybar": + return !this.mb.getRuntimeValue(Mn.AUXILIARYBAR_HIDDEN); + case "workbench.parts.statusbar": + return !this.mb.getRuntimeValue(Mn.STATUSBAR_HIDDEN); + case "workbench.parts.activitybar": + return !this.mb.getRuntimeValue(Mn.ACTIVITYBAR_HIDDEN); + case "workbench.parts.editor": + return !this.mb.getRuntimeValue(Mn.EDITOR_HIDDEN); + default: + return false; + } + } + Nb() { + return tn && !xfe(); + } + focus() { + this.focusPart("workbench.parts.editor", Kt(this.activeContainer)); + } + Ob() { + const i = this.$.getActivePaneComposite(1); + if ((this.hasFocus("workbench.parts.panel") || !this.isVisible("workbench.parts.editor")) && i) { + i.focus(); + } else { + this.focus(); + } + } + getMaximumEditorDimensions(i) { + const e = Kt(i); + const t = this.y(i); + if (i === this.mainContainer) { + const s = Rb(this.getPanelPosition()); + const n = (this.isVisible("workbench.parts.activitybar") && this.P ? this.P.minimumWidth : 0) + (this.isVisible("workbench.parts.sidebar") ? this.J.minimumWidth : 0) + (this.isVisible("workbench.parts.panel") && !s ? this.L.minimumWidth : 0) + (this.isVisible("workbench.parts.auxiliarybar") ? this.M.minimumWidth : 0); + const r = (this.isVisible("workbench.parts.titlebar", e) ? this.H.minimumHeight : 0) + (this.isVisible("workbench.parts.statusbar", e) ? this.O.minimumHeight : 0) + (this.isVisible("workbench.parts.panel") && s ? this.L.minimumHeight : 0); + const o = t.width - n; + const a = t.height - r; + return { + width: o, + height: a + }; + } else { + const s = (this.isVisible("workbench.parts.titlebar", e) ? this.H.minimumHeight : 0) + (this.isVisible("workbench.parts.statusbar", e) ? this.O.minimumHeight : 0); + return { + width: t.width, + height: t.height - s + }; + } + } + Pb() { + return this.mb.getRuntimeValue(Mn.ZEN_MODE_ACTIVE); + } + Qb(i) { + this.mb.setRuntimeValue(Mn.ZEN_MODE_ACTIVE, i); + } + toggleZenMode(i, e = false) { + this.Qb(!this.Pb()); + this.lb.runtime.zenMode.transitionDisposables.clearAndDisposeAll(); + const t = o => { + for (const a of this.Y.visibleTextEditorControls) { + if (!o && no(a) && a.hasModel()) { + const l = a.getModel(); + o = this.S.getValue("editor.lineNumbers", { + resource: l.uri, + overrideIdentifier: l.getLanguageId() + }); + } + o ||= this.S.getValue("editor.lineNumbers"); + a.updateOptions({ + lineNumbers: o + }); + } + }; + let s = false; + const n = pMn(this.S); + const r = this.mb.getRuntimeValue(Mn.ZEN_MODE_EXIT_INFO); + if (this.Pb()) { + s = !this.lb.runtime.mainWindowFullscreen && n.fullScreen && !fp; + if (!e) { + r.transitionedToFullScreen = s; + r.transitionedToCenteredEditorLayout = !this.isMainEditorLayoutCentered() && n.centerLayout; + r.handleNotificationsDoNotDisturbMode = this.eb.getFilter() === rd.OFF; + r.wasVisible.sideBar = this.isVisible("workbench.parts.sidebar"); + r.wasVisible.panel = this.isVisible("workbench.parts.panel"); + r.wasVisible.auxiliaryBar = this.isVisible("workbench.parts.auxiliarybar"); + this.mb.setRuntimeValue(Mn.ZEN_MODE_EXIT_INFO, r); + } + this.$b(true, true); + this.bc(true, true); + this.Xb(true, true); + if (n.hideActivityBar) { + this.Ub(true, true); + } + if (n.hideStatusBar) { + this.Rb(true, true); + } + if (n.hideLineNumbers) { + t("off"); + this.lb.runtime.zenMode.transitionDisposables.set("zenMode.hideLineNumbers", this.Y.onDidVisibleEditorsChange(() => t("off"))); + } + if (n.showTabs !== this.Z.partOptions.showTabs) { + this.lb.runtime.zenMode.transitionDisposables.set("zenMode.showTabs", this.Z.mainPart.enforcePartOptions({ + showTabs: n.showTabs + })); + } + if (n.silentNotifications && r.handleNotificationsDoNotDisturbMode) { + this.eb.setFilter(rd.ERROR); + } + if (n.centerLayout) { + this.centerMainEditorLayout(true, true); + } + this.lb.runtime.zenMode.transitionDisposables.set("configurationChange", this.S.onDidChangeConfiguration(o => { + if (o.affectsConfiguration("zenMode.hideActivityBar")) { + const a = this.S.getValue("zenMode.hideActivityBar"); + this.Ub(a, true); + } + if (o.affectsConfiguration("zenMode.hideStatusBar")) { + const a = this.S.getValue("zenMode.hideStatusBar"); + this.Rb(a, true); + } + if (o.affectsConfiguration("zenMode.centerLayout")) { + const a = this.S.getValue("zenMode.centerLayout"); + this.centerMainEditorLayout(a, true); + } + if (o.affectsConfiguration("zenMode.showTabs")) { + const a = this.S.getValue("zenMode.showTabs") ?? "multiple"; + this.lb.runtime.zenMode.transitionDisposables.set("zenMode.showTabs", this.Z.mainPart.enforcePartOptions({ + showTabs: a + })); + } + if (o.affectsConfiguration("zenMode.silentNotifications")) { + const a = !!this.S.getValue("zenMode.silentNotifications"); + if (r.handleNotificationsDoNotDisturbMode) { + this.eb.setFilter(a ? rd.ERROR : rd.OFF); + } + } + if (o.affectsConfiguration("zenMode.hideLineNumbers")) { + const a = this.S.getValue("zenMode.hideLineNumbers") ? "off" : undefined; + t(a); + this.lb.runtime.zenMode.transitionDisposables.set("zenMode.hideLineNumbers", this.Y.onDidVisibleEditorsChange(() => t(a))); + } + })); + } else { + if (r.wasVisible.panel) { + this.$b(false, true); + } + if (r.wasVisible.auxiliaryBar) { + this.bc(false, true); + } + if (r.wasVisible.sideBar) { + this.Xb(false, true); + } + if (!this.mb.getRuntimeValue(Mn.ACTIVITYBAR_HIDDEN, true)) { + this.Ub(false, true); + } + if (!this.mb.getRuntimeValue(Mn.STATUSBAR_HIDDEN, true)) { + this.Rb(false, true); + } + if (r.transitionedToCenteredEditorLayout) { + this.centerMainEditorLayout(false, true); + } + if (r.handleNotificationsDoNotDisturbMode) { + this.eb.setFilter(rd.OFF); + } + t(); + this.focus(); + s = r.transitionedToFullScreen && this.lb.runtime.mainWindowFullscreen; + } + if (!i) { + this.layout(); + } + if (s) { + this.W.toggleFullScreen(xt); + } + this.a.fire(this.Pb()); + } + Rb(i, e) { + this.mb.setRuntimeValue(Mn.STATUSBAR_HIDDEN, i); + if (i) { + this.mainContainer.classList.add(Ey.STATUSBAR_HIDDEN); + } else { + this.mainContainer.classList.remove(Ey.STATUSBAR_HIDDEN); + } + this.G.setViewVisible(this.O, !i); + } + Sb() { + return { + element: document.createElement("div"), + maximumHeight: 0, + minimumHeight: 0, + maximumWidth: 0, + minimumWidth: 0, + toJSON: () => ({ + type: "workbench.parts.activitybar" + }), + onDidChange: de.None, + layout: () => {}, + onDidVisibilityChange: de.None + }; + } + Tb() { + const i = this.Mb("workbench.parts.titlebar"); + const e = this.Mb("workbench.parts.banner"); + const t = this.Mb("workbench.parts.editor"); + const s = this.activityBarDirection === "vertical" ? this.Mb("workbench.parts.activitybar") : this.Sb(); + const n = this.Mb("workbench.parts.panel"); + const r = this.Mb("workbench.parts.auxiliarybar"); + const o = this.Mb("workbench.parts.sidebar"); + const a = this.Mb("workbench.parts.statusbar"); + this.H = i; + this.I = e; + this.J = o; + this.P = s; + this.N = t; + this.L = n; + this.M = r; + this.O = a; + const l = { + "workbench.parts.activitybar": this.P, + "workbench.parts.banner": this.I, + "workbench.parts.titlebar": this.H, + "workbench.parts.editor": this.N, + "workbench.parts.panel": this.L, + "workbench.parts.sidebar": this.J, + "workbench.parts.statusbar": this.O, + "workbench.parts.auxiliarybar": this.M + }; + const c = ({ + type: d + }) => l[d]; + const u = TEt.deserialize(this.fc(), { + fromJSON: c + }, { + proportionalLayout: false + }); + this.mainContainer.prepend(u.element); + this.mainContainer.setAttribute("role", "application"); + this.G = u; + this.G.edgeSnapping = this.lb.runtime.mainWindowFullscreen; + for (const d of [i, t, s, n, o, a, r, e]) { + if (d) { + this.D(d.onDidVisibilityChange(h => { + if (d === o) { + this.Xb(!h, true); + } else if (d === n) { + this.$b(!h, true); + } else if (d === r) { + this.bc(!h, true); + } else if (d === t) { + this.Wb(!h, true); + } + this.h.fire(); + this.sb(this.mainContainer, this.w); + })); + } + } + this.D(this.U.onWillSaveState(d => { + const h = this.mb.getRuntimeValue(Mn.SIDEBAR_HIDDEN) ? this.G.getViewCachedVisibleSize(this.J) : this.G.getViewSize(this.J).width; + this.mb.setInitializationValue(Mn.SIDEBAR_SIZE, h); + const g = this.mb.getRuntimeValue(Mn.PANEL_HIDDEN) ? this.G.getViewCachedVisibleSize(this.L) : Rb(this.mb.getRuntimeValue(Mn.PANEL_POSITION)) ? this.G.getViewSize(this.L).height : this.G.getViewSize(this.L).width; + this.mb.setInitializationValue(Mn.PANEL_SIZE, g); + const p = this.mb.getRuntimeValue(Mn.AUXILIARYBAR_HIDDEN) ? this.G.getViewCachedVisibleSize(this.M) : this.G.getViewSize(this.M).width; + this.mb.setInitializationValue(Mn.AUXILIARYBAR_SIZE, p); + this.mb.save(true, true); + })); + } + layout() { + if (!this.nb) { + this.w = zk(this.lb.runtime.mainWindowFullscreen ? xt.document.body : this.ob); + this.hb.trace(`Layout#layout, height: ${this.w.height}, width: ${this.w.width}`); + vJi(this.mainContainer, 0, 0, 0, 0, "relative"); + wee(this.mainContainer, this.w.width, this.w.height); + this.G.layout(this.w.width, this.w.height); + this.F = true; + this.sb(this.mainContainer, this.w); + } + } + isMainEditorLayoutCentered() { + return this.mb.getRuntimeValue(Mn.MAIN_EDITOR_CENTERED); + } + centerMainEditorLayout(i, e) { + this.mb.setRuntimeValue(Mn.MAIN_EDITOR_CENTERED, i); + const t = this.Y.activeEditor; + let s = false; + if (t instanceof Nd) { + s = this.S.getValue("diffEditor.renderSideBySide"); + } else if (t?.hasCapability(256)) { + s = true; + } + if (this.S.getValue("workbench.editor.centeredLayoutAutoResize") && (this.Z.mainPart.groups.length > 1 && !this.Z.mainPart.hasMaximizedGroup() || s)) { + i = false; + } + if (this.Z.mainPart.isLayoutCentered() !== i) { + this.Z.mainPart.centerLayout(i); + if (!e) { + this.layout(); + } + } + this.b.fire(this.mb.getRuntimeValue(Mn.MAIN_EDITOR_CENTERED)); + } + getSize(i) { + return this.G.getViewSize(this.Mb(i)); + } + setSize(i, e) { + this.G.resizeView(this.Mb(i), e); + } + resizePart(i, e, t) { + const s = Math.sign(e) * Frt(js(), Math.abs(e)); + const n = Math.sign(t) * Frt(js(), Math.abs(t)); + let r; + switch (i) { + case "workbench.parts.sidebar": + r = this.G.getViewSize(this.J); + this.G.resizeView(this.J, { + width: r.width + s, + height: r.height + }); + break; + case "workbench.parts.panel": + r = this.G.getViewSize(this.L); + this.G.resizeView(this.L, { + width: r.width + (Rb(this.getPanelPosition()) ? 0 : s), + height: r.height + (Rb(this.getPanelPosition()) ? n : 0) + }); + break; + case "workbench.parts.auxiliarybar": + r = this.G.getViewSize(this.M); + this.G.resizeView(this.M, { + width: r.width + s, + height: r.height + }); + break; + case "workbench.parts.editor": + r = this.G.getViewSize(this.N); + if (this.Z.mainPart.count === 1) { + this.G.resizeView(this.N, { + width: r.width + s, + height: r.height + n + }); + } else { + const o = this.Z.mainPart.activeGroup; + const { + width: a, + height: l + } = this.Z.mainPart.getSize(o); + this.Z.mainPart.setSize(o, { + width: a + s, + height: l + n + }); + const { + width: c, + height: u + } = this.Z.mainPart.getSize(o); + if (n && l === u || s && a === c) { + this.G.resizeView(this.N, { + width: r.width + (s && a === c ? s : 0), + height: r.height + (n && l === u ? n : 0) + }); + } + } + break; + default: + return; + } + } + Ub(i, e) { + if (this.P) { + this.mb.setRuntimeValue(Mn.ACTIVITYBAR_HIDDEN, i); + this.G.setViewVisible(this.P, !i); + } + } + Vb(i) { + this.G.setViewVisible(this.I, !i); + } + Wb(i, e) { + this.mb.setRuntimeValue(Mn.EDITOR_HIDDEN, i); + if (i) { + this.mainContainer.classList.add(Ey.MAIN_EDITOR_AREA_HIDDEN); + } else { + this.mainContainer.classList.remove(Ey.MAIN_EDITOR_AREA_HIDDEN); + } + this.G.setViewVisible(this.N, !i); + if (i && !this.isVisible("workbench.parts.panel")) { + this.$b(false, true); + } + } + getLayoutClasses() { + return dr([this.isVisible("workbench.parts.sidebar") ? undefined : Ey.SIDEBAR_HIDDEN, this.isVisible("workbench.parts.editor", xt) ? undefined : Ey.MAIN_EDITOR_AREA_HIDDEN, this.isVisible("workbench.parts.panel") ? undefined : Ey.PANEL_HIDDEN, this.isVisible("workbench.parts.auxiliarybar") ? undefined : Ey.AUXILIARYBAR_HIDDEN, this.isVisible("workbench.parts.statusbar") ? undefined : Ey.STATUSBAR_HIDDEN, this.lb.runtime.mainWindowFullscreen ? Ey.FULLSCREEN : undefined]); + } + Xb(i, e) { + this.mb.setRuntimeValue(Mn.SIDEBAR_HIDDEN, i); + if (i) { + this.mainContainer.classList.add(Ey.SIDEBAR_HIDDEN); + } else { + this.mainContainer.classList.remove(Ey.SIDEBAR_HIDDEN); + } + if (i && this.$.getActivePaneComposite(0)) { + this.$.hideActivePaneComposite(0); + this.Ob(); + } else if (!i && !this.$.getActivePaneComposite(0)) { + const t = this.$.getLastActivePaneCompositeId(0); + if (t) { + if (!this.$.openPaneComposite(t, 0, true)) { + this.$.openPaneComposite(this.bb.getDefaultViewContainer(0)?.id, 0, true); + } + } + } + this.G.setViewVisible(this.J, !i); + } + Yb(i) { + const e = this.bb.getViewContainerById(i); + if (!e) { + return false; + } + const t = this.bb.getViewContainerModel(e); + if (t) { + return t.activeViewDescriptors.length >= 1; + } else { + return false; + } + } + Zb(i, e, t) { + const s = !Rb(t); + const n = s || e !== "center" && (i !== 0 || e !== "right") && (i !== 1 || e !== "left"); + const r = s || e !== "center" && (i !== 1 || e !== "right") && (i !== 0 || e !== "left"); + const o = this.isVisible("workbench.parts.panel") ? this.G.getViewSize(this.L).width : V$.Invisible(this.G.getViewCachedVisibleSize(this.L) ?? this.L.minimumWidth); + const a = this.isVisible("workbench.parts.panel") ? this.G.getViewSize(this.L).height : V$.Invisible(this.G.getViewCachedVisibleSize(this.L) ?? this.L.minimumHeight); + const l = this.isVisible("workbench.parts.sidebar") ? this.G.getViewSize(this.J).width : V$.Invisible(this.G.getViewCachedVisibleSize(this.J) ?? this.J.minimumWidth); + const c = this.isVisible("workbench.parts.auxiliarybar") ? this.G.getViewSize(this.M).width : V$.Invisible(this.G.getViewCachedVisibleSize(this.M) ?? this.M.minimumWidth); + if (i === 0) { + if (this.activityBarDirection === "vertical" && this.P) { + this.G.moveViewTo(this.P, [2, 0]); + this.G.moveView(this.J, l, n ? this.N : this.P, n ? 2 : 3); + } else if (n) { + this.G.moveView(this.J, l, this.N, 2); + } else { + this.G.moveViewTo(this.J, [2, 0]); + } + if (r) { + this.G.moveView(this.M, c, this.N, 3); + } else { + this.G.moveViewTo(this.M, [2, -1]); + } + } else { + if (this.activityBarDirection === "vertical" && this.P) { + this.G.moveViewTo(this.P, [2, -1]); + this.G.moveView(this.J, l, n ? this.N : this.P, n ? 3 : 2); + } else if (n) { + this.G.moveView(this.J, l, this.N, 3); + } else { + this.G.moveViewTo(this.J, [2, -1]); + } + if (r) { + this.G.moveView(this.M, c, this.N, 2); + } else { + this.G.moveViewTo(this.M, [2, 0]); + } + } + if (s) { + this.G.moveView(this.L, o, this.N, t === 0 ? 2 : 3); + this.G.resizeView(this.L, { + height: a, + width: o + }); + } + if (this.isVisible("workbench.parts.sidebar")) { + this.G.resizeView(this.J, { + height: this.G.getViewSize(this.J).height, + width: l + }); + } + if (this.isVisible("workbench.parts.auxiliarybar")) { + this.G.resizeView(this.M, { + height: this.G.getViewSize(this.M).height, + width: c + }); + } + } + setPanelAlignment(i, e) { + if (!Rb(this.getPanelPosition())) { + this.setPanelPosition(2); + } + if (i !== "center" && this.isPanelMaximized()) { + this.toggleMaximizedPanel(); + } + this.mb.setRuntimeValue(Mn.PANEL_ALIGNMENT, i); + this.Zb(this.getSideBarPosition(), i, this.getPanelPosition()); + this.c.fire(i); + } + $b(i, e) { + if (!this.G) { + return; + } + const t = !this.isVisible("workbench.parts.panel"); + this.mb.setRuntimeValue(Mn.PANEL_HIDDEN, i); + const s = this.isPanelMaximized(); + const n = this.ac(); + if (i) { + this.mainContainer.classList.add(Ey.PANEL_HIDDEN); + } else { + this.mainContainer.classList.remove(Ey.PANEL_HIDDEN); + } + let r = false; + if (i && this.$.getActivePaneComposite(1)) { + this.$.hideActivePaneComposite(1); + r = !fp; + } else if (!i && !this.$.getActivePaneComposite(1)) { + let o = this.$.getLastActivePaneCompositeId(1); + if (!o || !this.Yb(o)) { + o = this.bb.getViewContainersByLocation(1).find(a => this.Yb(a.id))?.id; + } + if (o) { + const a = !e; + this.$.openPaneComposite(o, 1, a); + } + } + if (i && s) { + this.toggleMaximizedPanel(); + } + if (t !== i) { + this.G.setViewVisible(this.L, !i); + if (i) { + this.mb.setRuntimeValue(Mn.PANEL_WAS_LAST_MAXIMIZED, s); + } else if (!e && s !== n) { + this.toggleMaximizedPanel(); + } + if (r) { + this.Z.mainPart.activeGroup.focus(); + } + } + } + toggleMaximizedPanel() { + const i = this.G.getViewSize(this.L); + const e = this.getPanelPosition(); + const t = this.isPanelMaximized(); + if (t) { + this.Wb(false); + this.G.resizeView(this.L, { + width: Rb(e) ? i.width : this.mb.getRuntimeValue(Mn.PANEL_LAST_NON_MAXIMIZED_WIDTH), + height: Rb(e) ? this.mb.getRuntimeValue(Mn.PANEL_LAST_NON_MAXIMIZED_HEIGHT) : i.height + }); + } else { + if (this.isVisible("workbench.parts.panel")) { + if (Rb(e)) { + this.mb.setRuntimeValue(Mn.PANEL_LAST_NON_MAXIMIZED_HEIGHT, i.height); + } else { + this.mb.setRuntimeValue(Mn.PANEL_LAST_NON_MAXIMIZED_WIDTH, i.width); + } + } + this.Wb(true); + } + this.mb.setRuntimeValue(Mn.PANEL_WAS_LAST_MAXIMIZED, !t); + } + ac() { + if (this.getPanelAlignment() !== "center" && Rb(this.getPanelPosition())) { + return false; + } + const i = rLr(this.S.getValue(ePe.PANEL_OPENS_MAXIMIZED)); + const e = this.mb.getRuntimeValue(Mn.PANEL_WAS_LAST_MAXIMIZED); + return i === 0 || i === 2 && e; + } + bc(i, e) { + this.mb.setRuntimeValue(Mn.AUXILIARYBAR_HIDDEN, i); + if (i) { + this.mainContainer.classList.add(Ey.AUXILIARYBAR_HIDDEN); + } else { + this.mainContainer.classList.remove(Ey.AUXILIARYBAR_HIDDEN); + } + if (i && this.$.getActivePaneComposite(2)) { + this.$.hideActivePaneComposite(2); + this.Ob(); + } else if (!i && !this.$.getActivePaneComposite(2)) { + let t = this.$.getLastActivePaneCompositeId(2); + if (!t || !this.Yb(t)) { + t = this.bb.getViewContainersByLocation(2).find(s => this.Yb(s.id))?.id; + } + if (t) { + const s = !e; + this.$.openPaneComposite(t, 2, s); + } + } + this.G.setViewVisible(this.M, !i); + } + setPartHidden(i, e, t = xt) { + switch (e) { + case "workbench.parts.activitybar": + return this.Ub(i); + case "workbench.parts.sidebar": + return this.Xb(i); + case "workbench.parts.editor": + return this.Wb(i); + case "workbench.parts.banner": + return this.Vb(i); + case "workbench.parts.auxiliarybar": + return this.bc(i); + case "workbench.parts.panel": + return this.$b(i); + } + } + hasMainWindowBorder() { + return this.lb.runtime.mainWindowBorder; + } + getMainWindowBorderRadius() { + if (this.lb.runtime.mainWindowBorder && Gt) { + return "5px"; + } else { + return undefined; + } + } + isPanelMaximized() { + return (this.getPanelAlignment() === "center" || !Rb(this.getPanelPosition())) && !this.isVisible("workbench.parts.editor", xt); + } + getSideBarPosition() { + return this.mb.getRuntimeValue(Mn.SIDEBAR_POSITON); + } + getPanelAlignment() { + return this.mb.getRuntimeValue(Mn.PANEL_ALIGNMENT); + } + updateMenubarVisibility(i) { + const e = U6(this.S, xt, this.lb.runtime.menuBar.toggled); + if (!i && this.G && e !== this.isVisible("workbench.parts.titlebar", xt)) { + this.G.setViewVisible(this.H, e); + } + } + updateCustomTitleBarVisibility() { + const i = U6(this.S, xt, this.lb.runtime.menuBar.toggled); + const e = this.isVisible("workbench.parts.titlebar"); + if (i !== e) { + this.G.setViewVisible(this.H, i); + } + } + toggleMenuBar() { + let i = B6(this.S); + if (typeof i != "string") { + i = "classic"; + } + let e; + if (i === "visible" || i === "classic") { + e = IC(this.S) ? "toggle" : "compact"; + } else { + e = "classic"; + } + this.S.updateValue("window.menuBarVisibility", e); + } + getPanelPosition() { + return this.mb.getRuntimeValue(Mn.PANEL_POSITION); + } + setPanelPosition(i) { + if (!this.isVisible("workbench.parts.panel")) { + this.$b(false); + } + const e = this.Mb("workbench.parts.panel"); + const t = PP(this.getPanelPosition()); + const s = PP(i); + const n = Tn(e.getContainer()); + n.classList.remove(t); + n.classList.add(s); + e.updateStyles(); + const r = this.G.getViewSize(this.L); + const o = this.G.getViewSize(this.J); + const a = this.G.getViewSize(this.M); + let l = !this.isVisible("workbench.parts.editor", xt); + if (s !== t && !l) { + if (Rb(i)) { + this.mb.setRuntimeValue(Mn.PANEL_LAST_NON_MAXIMIZED_WIDTH, r.width); + } else if (Rb(RSe(t))) { + this.mb.setRuntimeValue(Mn.PANEL_LAST_NON_MAXIMIZED_HEIGHT, r.height); + } + } + if (Rb(i) && this.getPanelAlignment() !== "center" && l) { + this.toggleMaximizedPanel(); + l = false; + } + this.mb.setRuntimeValue(Mn.PANEL_POSITION, i); + const c = this.isVisible("workbench.parts.sidebar"); + const u = this.isVisible("workbench.parts.auxiliarybar"); + if (i === 2) { + this.G.moveView(this.L, l ? r.height : this.mb.getRuntimeValue(Mn.PANEL_LAST_NON_MAXIMIZED_HEIGHT), this.N, 1); + } else if (i === 3) { + this.G.moveView(this.L, l ? r.height : this.mb.getRuntimeValue(Mn.PANEL_LAST_NON_MAXIMIZED_HEIGHT), this.N, 0); + } else if (i === 1) { + this.G.moveView(this.L, l ? r.width : this.mb.getRuntimeValue(Mn.PANEL_LAST_NON_MAXIMIZED_WIDTH), this.N, 3); + } else { + this.G.moveView(this.L, l ? r.width : this.mb.getRuntimeValue(Mn.PANEL_LAST_NON_MAXIMIZED_WIDTH), this.N, 2); + } + this.G.resizeView(this.J, o); + if (!c) { + this.Xb(true); + } + this.G.resizeView(this.M, a); + if (!u) { + this.bc(true); + } + if (Rb(i)) { + this.Zb(this.getSideBarPosition(), this.getPanelAlignment(), i); + } + this.g.fire(s); + } + isWindowMaximized(i) { + return this.lb.runtime.maximized.has(yx(i)); + } + updateWindowMaximizedState(i, e) { + this.mainContainer.classList.toggle(Ey.MAXIMIZED, e); + const t = yx(i); + if (e !== this.lb.runtime.maximized.has(t)) { + if (e) { + this.lb.runtime.maximized.add(t); + } else { + this.lb.runtime.maximized.delete(t); + } + this.zb(); + this.f.fire({ + windowId: t, + maximized: e + }); + } + } + getVisibleNeighborPart(i, e) { + if (!this.G || !this.isVisible(i, xt)) { + return; + } + const t = this.G.getNeighborViews(this.Mb(i), e, false); + if (t) { + for (const s of t) { + const n = ["workbench.parts.activitybar", "workbench.parts.editor", "workbench.parts.panel", "workbench.parts.auxiliarybar", "workbench.parts.sidebar", "workbench.parts.statusbar", "workbench.parts.titlebar"].find(r => (r !== "workbench.parts.activitybar" || this.P) && this.Mb(r) === s && this.isVisible(r, xt)); + if (n !== undefined) { + return n; + } + } + } + } + cc() { + const i = this.G.getNeighborViews(this.H, 0, false).length > 0; + const e = this.Nb(); + if (i !== e) { + this.G.moveView(this.I, V$.Distribute, this.H, e ? 0 : 1); + } + this.G.setViewVisible(this.H, U6(this.S, xt, this.lb.runtime.menuBar.toggled)); + } + dc(i, e, t) { + if (!i.sideBar && !i.auxiliaryBar) { + i.editor.size = e; + return i.editor; + } + const s = [i.editor]; + i.editor.size = t; + if (i.sideBar) { + if (this.mb.getRuntimeValue(Mn.SIDEBAR_POSITON) === 0) { + s.splice(0, 0, i.sideBar); + } else { + s.push(i.sideBar); + } + i.editor.size -= this.mb.getRuntimeValue(Mn.SIDEBAR_HIDDEN) ? 0 : i.sideBar.size; + } + if (i.auxiliaryBar) { + if (this.mb.getRuntimeValue(Mn.SIDEBAR_POSITON) === 1) { + s.splice(0, 0, i.auxiliaryBar); + } else { + s.push(i.auxiliaryBar); + } + i.editor.size -= this.mb.getRuntimeValue(Mn.AUXILIARYBAR_HIDDEN) ? 0 : i.auxiliaryBar.size; + } + return { + type: "branch", + data: s, + size: e + }; + } + ec(i, e, t) { + const s = !i.activityBar || this.mb.getRuntimeValue(Mn.ACTIVITYBAR_HIDDEN) ? 0 : i.activityBar.size; + const n = this.mb.getRuntimeValue(Mn.SIDEBAR_HIDDEN) ? 0 : i.sideBar.size; + const r = this.mb.getRuntimeValue(Mn.AUXILIARYBAR_HIDDEN) ? 0 : i.auxiliaryBar.size; + const o = this.mb.getInitializationValue(Mn.PANEL_SIZE) ? 0 : i.panel.size; + const a = this.mb.getRuntimeValue(Mn.PANEL_POSITION); + const l = this.mb.getRuntimeValue(Mn.SIDEBAR_POSITON); + const c = []; + if (!Rb(a)) { + c.push(i.editor); + i.editor.size = e - s - n - o - r; + if (a === 1) { + c.push(i.panel); + } else { + c.splice(0, 0, i.panel); + } + if (l === 0) { + c.push(i.auxiliaryBar); + c.splice(0, 0, i.sideBar); + if (i.activityBar) { + c.splice(0, 0, i.activityBar); + } + } else { + c.splice(0, 0, i.auxiliaryBar); + c.push(i.sideBar); + if (i.activityBar) { + c.push(i.activityBar); + } + } + } else { + const u = this.mb.getRuntimeValue(Mn.PANEL_ALIGNMENT); + const d = u !== "center" && (l !== 0 || u !== "right") && (l !== 1 || u !== "left"); + const h = u !== "center" && (l !== 1 || u !== "right") && (l !== 0 || u !== "left"); + const g = e - s - (d ? 0 : n) - (h ? 0 : r); + const p = this.dc({ + editor: i.editor, + sideBar: d ? i.sideBar : undefined, + auxiliaryBar: h ? i.auxiliaryBar : undefined + }, t - o, g); + c.push({ + type: "branch", + data: a === 2 ? [p, i.panel] : [i.panel, p], + size: g + }); + if (!d) { + if (l === 0) { + c.splice(0, 0, i.sideBar); + } else { + c.push(i.sideBar); + } + } + if (!h) { + if (l === 1) { + c.splice(0, 0, i.auxiliaryBar); + } else { + c.push(i.auxiliaryBar); + } + } + if (i.activityBar) { + if (l === 0) { + c.splice(0, 0, i.activityBar); + } else { + c.push(i.activityBar); + } + } + } + return c; + } + fc() { + const { + width: i, + height: e + } = this.mb.getInitializationValue(Mn.GRID_SIZE); + const t = this.mb.getInitializationValue(Mn.SIDEBAR_SIZE); + const s = this.mb.getInitializationValue(Mn.AUXILIARYBAR_SIZE); + const n = this.mb.getInitializationValue(Mn.PANEL_SIZE); + const r = this.H.minimumHeight; + const o = this.I.minimumHeight; + const a = this.O.minimumHeight; + const l = this.P?.minimumWidth ?? 0; + const c = e - r - a; + const u = [{ + type: "leaf", + data: { + type: "workbench.parts.titlebar" + }, + size: r, + visible: this.isVisible("workbench.parts.titlebar", xt) + }, { + type: "leaf", + data: { + type: "workbench.parts.banner" + }, + size: o, + visible: false + }]; + const d = this.P ? { + type: "leaf", + data: { + type: "workbench.parts.activitybar" + }, + size: l, + visible: !this.mb.getRuntimeValue(Mn.ACTIVITYBAR_HIDDEN) + } : undefined; + const h = { + type: "leaf", + data: { + type: "workbench.parts.sidebar" + }, + size: t, + visible: !this.mb.getRuntimeValue(Mn.SIDEBAR_HIDDEN) + }; + const g = { + type: "leaf", + data: { + type: "workbench.parts.auxiliarybar" + }, + size: s, + visible: this.isVisible("workbench.parts.auxiliarybar") + }; + const p = { + type: "leaf", + data: { + type: "workbench.parts.editor" + }, + size: 0, + visible: !this.mb.getRuntimeValue(Mn.EDITOR_HIDDEN) + }; + const b = { + type: "leaf", + data: { + type: "workbench.parts.panel" + }, + size: n, + visible: !this.mb.getRuntimeValue(Mn.PANEL_HIDDEN) + }; + const v = this.ec({ + activityBar: d, + auxiliaryBar: g, + editor: p, + panel: b, + sideBar: h + }, i, c); + const y = { + root: { + type: "branch", + size: i, + data: [...(this.Nb() ? u.reverse() : u), { + type: "branch", + data: v, + size: c + }, { + type: "leaf", + data: { + type: "workbench.parts.statusbar" + }, + size: a, + visible: !this.mb.getRuntimeValue(Mn.STATUSBAR_HIDDEN) + }] + }, + orientation: 0, + width: i, + height: e + }; + const w = { + activityBarVisible: !this.mb.getRuntimeValue(Mn.ACTIVITYBAR_HIDDEN), + sideBarVisible: !this.mb.getRuntimeValue(Mn.SIDEBAR_HIDDEN), + auxiliaryBarVisible: !this.mb.getRuntimeValue(Mn.AUXILIARYBAR_HIDDEN), + panelVisible: !this.mb.getRuntimeValue(Mn.PANEL_HIDDEN), + statusbarVisible: !this.mb.getRuntimeValue(Mn.STATUSBAR_HIDDEN), + sideBarPosition: PP(this.mb.getRuntimeValue(Mn.SIDEBAR_POSITON)), + panelPosition: PP(this.mb.getRuntimeValue(Mn.PANEL_POSITION)) + }; + this.ib.publicLog2("startupLayout", w); + return y; + } + dispose() { + super.dispose(); + this.nb = true; + } +}; +function pMn(i) { + return i.getValue(ePe.ZEN_MODE_CONFIG); +} +var mMn = class { + constructor(i, e, t, s) { + this.name = i; + this.scope = e; + this.target = t; + this.defaultValue = s; + } +}; +var rx = class extends mMn { + constructor(i, e, t, s, n) { + super(i, e, t, s); + this.zenModeIgnore = n; + this.runtime = true; + } +}; +var F$t = class extends mMn { + constructor() { + super(...arguments); + this.runtime = false; + } +}; +var Mn = { + MAIN_EDITOR_CENTERED: new rx("editor.centered", 1, 1, false), + ZEN_MODE_ACTIVE: new rx("zenMode.active", 1, 1, false), + ZEN_MODE_EXIT_INFO: new rx("zenMode.exitInfo", 1, 1, { + transitionedToCenteredEditorLayout: false, + transitionedToFullScreen: false, + handleNotificationsDoNotDisturbMode: false, + wasVisible: { + auxiliaryBar: false, + panel: false, + sideBar: false + } + }), + GRID_SIZE: new F$t("grid.size", 0, 1, { + width: 800, + height: 600 + }), + SIDEBAR_SIZE: new F$t("sideBar.size", 0, 1, 200), + AUXILIARYBAR_SIZE: new F$t("auxiliaryBar.size", 0, 1, 200), + PANEL_SIZE: new F$t("panel.size", 0, 1, 300), + PANEL_LAST_NON_MAXIMIZED_HEIGHT: new rx("panel.lastNonMaximizedHeight", 0, 1, 300), + PANEL_LAST_NON_MAXIMIZED_WIDTH: new rx("panel.lastNonMaximizedWidth", 0, 1, 300), + PANEL_WAS_LAST_MAXIMIZED: new rx("panel.wasLastMaximized", 1, 1, false), + SIDEBAR_POSITON: new rx("sideBar.position", 1, 1, 0), + PANEL_POSITION: new rx("panel.position", 1, 1, 2), + PANEL_ALIGNMENT: new rx("panel.alignment", 0, 0, "center"), + ACTIVITYBAR_HIDDEN: new rx("activityBar.hidden", 1, 1, false, true), + SIDEBAR_HIDDEN: new rx("sideBar.hidden", 1, 1, false), + EDITOR_HIDDEN: new rx("editor.hidden", 1, 1, false), + PANEL_HIDDEN: new rx("panel.hidden", 1, 1, true), + AUXILIARYBAR_HIDDEN: new rx("auxiliaryBar.hidden", 1, 1, false), + STATUSBAR_HIDDEN: new rx("statusBar.hidden", 1, 1, false, true) +}; +var ePe; +(function (i) { + i.PANEL_POSITION = "workbench.panel.defaultLocation"; + i.PANEL_OPENS_MAXIMIZED = "workbench.panel.opensMaximized"; + i.ZEN_MODE_CONFIG = "zenMode"; + i.EDITOR_CENTERED_LAYOUT_AUTO_RESIZE = "workbench.editor.centeredLayoutAutoResize"; +})(ePe ||= {}); +var uT; +(function (i) { + i.STATUSBAR_VISIBLE = "workbench.statusBar.visible"; + i.SIDEBAR_POSITION = "workbench.sideBar.location"; +})(uT ||= {}); +var jWo = class zOt extends H { + static { + this.STORAGE_PREFIX = "workbench."; + } + constructor(e, t, s, n) { + super(); + this.c = e; + this.f = t; + this.g = s; + this.h = n; + this.a = this.D(new B()); + this.onDidChangeState = this.a.event; + this.b = new Map(); + this.D(this.f.onDidChangeConfiguration(r => this.j(r))); + } + j(e) { + if (e.affectsConfiguration("workbench.activityBar.location")) { + this.q(Mn.ACTIVITYBAR_HIDDEN, this.n()); + } + if (e.affectsConfiguration(uT.STATUSBAR_VISIBLE)) { + this.q(Mn.STATUSBAR_HIDDEN, !this.f.getValue(uT.STATUSBAR_VISIBLE)); + } + if (e.affectsConfiguration(uT.SIDEBAR_POSITION)) { + this.q(Mn.SIDEBAR_POSITON, RSe(this.f.getValue(uT.SIDEBAR_POSITION) ?? "left")); + } + } + m(e, t) { + const s = this.getRuntimeValue(Mn.ZEN_MODE_ACTIVE); + if (!e.zenModeIgnore || !s) { + if (e === Mn.ACTIVITYBAR_HIDDEN) { + this.f.updateValue("workbench.activityBar.location", t ? "hidden" : undefined); + } else if (e === Mn.STATUSBAR_HIDDEN) { + this.f.updateValue(uT.STATUSBAR_VISIBLE, !t); + } else if (e === Mn.SIDEBAR_POSITON) { + this.f.updateValue(uT.SIDEBAR_POSITION, PP(t)); + } + } + } + load() { + let e; + for (e in Mn) { + const s = Mn[e]; + const n = this.s(s); + if (n !== undefined) { + this.b.set(s.name, n); + } + } + this.b.set(Mn.ACTIVITYBAR_HIDDEN.name, this.n()); + this.b.set(Mn.STATUSBAR_HIDDEN.name, !this.f.getValue(uT.STATUSBAR_VISIBLE)); + this.b.set(Mn.SIDEBAR_POSITON.name, RSe(this.f.getValue(uT.SIDEBAR_POSITION) ?? "left")); + const t = zk(this.h); + Mn.PANEL_POSITION.defaultValue = RSe(this.f.getValue(ePe.PANEL_POSITION) ?? "bottom"); + Mn.GRID_SIZE.defaultValue = { + height: t.height, + width: t.width + }; + Mn.SIDEBAR_SIZE.defaultValue = Math.min(300, t.width / 4); + Mn.AUXILIARYBAR_SIZE.defaultValue = Math.min(400, t.width / 2.5); + Mn.PANEL_SIZE.defaultValue = this.b.get(Mn.PANEL_POSITION.name) ?? Rb(Mn.PANEL_POSITION.defaultValue) ? t.height / 3 : t.width / 4; + Mn.SIDEBAR_HIDDEN.defaultValue = this.g.getWorkbenchState() === 1; + for (e in Mn) { + const s = Mn[e]; + if (this.b.get(s.name) === undefined) { + this.b.set(s.name, s.defaultValue); + } + } + this.D(this.c.onDidChangeValue(0, undefined, this.B)(s => { + let n; + for (n in Mn) { + const r = Mn[n]; + if (r instanceof rx && r.scope === 0 && r.target === 0 && `${zOt.STORAGE_PREFIX}${r.name}` === s.key) { + const o = this.s(r) ?? r.defaultValue; + if (this.b.get(r.name) !== o) { + this.b.set(r.name, o); + this.a.fire({ + key: r, + value: o + }); + } + } + } + })); + } + save(e, t) { + let s; + const n = this.getRuntimeValue(Mn.ZEN_MODE_ACTIVE); + for (s in Mn) { + const r = Mn[s]; + if (e && r.scope === 1 || t && r.scope === 0) { + if (n && r instanceof rx && r.zenModeIgnore) { + continue; + } + this.r(r); + } + } + } + getInitializationValue(e) { + return this.b.get(e.name); + } + setInitializationValue(e, t) { + this.b.set(e.name, t); + } + getRuntimeValue(e, t) { + if (t) { + switch (e) { + case Mn.ACTIVITYBAR_HIDDEN: + this.b.set(e.name, this.n()); + break; + case Mn.STATUSBAR_HIDDEN: + this.b.set(e.name, !this.f.getValue(uT.STATUSBAR_VISIBLE)); + break; + case Mn.SIDEBAR_POSITON: + this.b.set(e.name, this.f.getValue(uT.SIDEBAR_POSITION) ?? "left"); + break; + } + } + if (e === Mn.STATUSBAR_HIDDEN && hf().body.classList.contains("window-in-window")) { + return true; + } else { + return this.b.get(e.name); + } + } + setRuntimeValue(e, t) { + this.b.set(e.name, t); + const s = this.getRuntimeValue(Mn.ZEN_MODE_ACTIVE); + if (e.scope === 0 && (!s || !e.zenModeIgnore)) { + this.r(e); + this.m(e, t); + } + } + n() { + if (this.f.getValue(HB) === "horizontal") { + return true; + } + const t = this.f.getValue("workbench.activityBar.visible"); + if (t !== undefined) { + return !t; + } else { + return this.f.getValue("workbench.activityBar.location") !== "default"; + } + } + q(e, t) { + if (this.b.get(e.name) !== t) { + this.setRuntimeValue(e, t); + this.a.fire({ + key: e, + value: t + }); + } + } + r(e) { + const t = this.b.get(e.name); + this.c.store(`${zOt.STORAGE_PREFIX}${e.name}`, typeof t == "object" ? JSON.stringify(t) : t, e.scope, e.target); + } + s(e) { + let t = this.c.get(`${zOt.STORAGE_PREFIX}${e.name}`, e.scope); + if (t !== undefined) { + switch (typeof e.defaultValue) { + case "boolean": + t = t === "true"; + break; + case "number": + t = parseInt(t); + break; + case "object": + t = JSON.parse(t); + break; + } + } + return t; + } +}; +fn(); +Pn(); +fr(); +Yk(); +oa(); +aS(); +He(); +Rt(); +X(); +Wt(); +var zWo = class { + constructor() { + this.priority = 90; + this.name = "notifications"; + this.when = XR; + this.type = "view"; + } + getProvider(i) { + const e = i.get(Xm); + const t = i.get(br); + const s = i.get(gt); + const n = i.get(Pd); + function r() { + const o = BQ(t); + if (!o) { + return; + } + s.executeCommand("notifications.showList"); + let a; + const l = t.lastFocusedList; + if (l instanceof N1) { + a = l.indexOf(o); + } + if (a === undefined) { + return; + } + function c() { + s.executeCommand("notifications.showList"); + if (l && a !== undefined) { + l.domFocus(); + try { + l.setFocus([a]); + } catch {} + } + } + function u() { + const h = BQ(t); + const g = h?.message.original.toString(); + if (h) { + if (h.source) { + return f(3617, null, g, h.source); + } else { + return f(3618, null, g); + } + } + } + const d = u(); + if (d) { + o.onDidClose(() => e.next()); + return new uw("notification", { + type: "view" + }, () => d, () => c(), "accessibility.verbosity.notification", undefined, JWo(o, n), () => { + if (l) { + c(); + l.focusNext(); + return u(); + } + }, () => { + if (l) { + c(); + l.focusPrevious(); + return u(); + } + }); + } + } + return r(); + } +}; +function JWo(i, e) { + let t; + if (i.actions) { + t = []; + if (i.actions.primary) { + t.push(...i.actions.primary); + } + if (i.actions.secondary) { + t.push(...i.actions.secondary); + } + } + if (t) { + for (const n of t) { + n.class = le.asClassName(A.bell); + const r = n.run; + n.run = () => { + r(); + i.close(); + }; + } + } + const s = t?.find(n => n.label.includes("Manage Extension")); + if (s) { + s.class = le.asClassName(A.gear); + } + if (t) { + t.push({ + id: "clearNotification", + label: f(3619, null), + tooltip: f(3620, null), + run: () => { + i.close(); + e.playSignal(el.clear); + }, + enabled: true, + class: le.asClassName(A.clearAll) + }); + } + return t; +} +q(); +cnt(); +Yji(); +function GWo(i, e) { + return e.onProcessConfigUpdate(t => { + M0().enabled = t.enabled; + M0().loggerSampleRate = t.loggerSampleRate; + M0().tracesSampleRate = t.tracesSampleRate; + M0().profilesSampleRate = t.profilesSampleRate; + M0().jsonStringifySampleRate = t.jsonStringifySampleRate; + }); +} +function KWo(i, e, t = SWi(64)) { + const s = { + flush: r => t.drain(r), + send: r => t.add(() => e.sendEnvelope(i, r)).then(o => ({ + statusCode: 200 + }), o => { + if (o instanceof yL) { + return {}; + } + throw o; + }) + }; + const n = M0().buffer; + for (const r of n) { + s.send(r); + } + M0().buffer = []; + M0().transport = s; + return H.None; +} +function YWo(i, e) { + if (i === "main") { + return H.None; + } + const t = s => { + const n = {}; + if (s.breadcrumbs.length > 0) { + n.breadcrumbs = s.breadcrumbs; + } + if (Object.keys(n).length > 0) { + e.sendScopeUpdate(i, n); + } + }; + gm().addScopeListener(s => { + t(s.getScopeData()); + gm().clearBreadcrumbs(); + }); + t(gm().getScopeData()); + gm().clearBreadcrumbs(); + return H.None; +} +function XWo(i, e) { + const t = new Q(); + t.add(GWo(i, e)); + t.add(KWo(i, e)); + t.add(YWo(i, e)); + return t; +} +qx(); +sh(); +q(); +It(); +te(); +sh(); +Yw(); +var O$t = Ve("clientLoggerService"); +var TBi = class extends H { + constructor(e, t) { + super(); + this.b = e; + this.c = t; + this.a = this.b.createInstance(Uf, { + service: Avi + }); + } + async getDebuggingDataUploadUrl() { + if (this.c.reactivePrivacyMode()) { + return new Kdn(); + } else { + return (await this.a.get()).getDebuggingDataUploadUrl(new Gdn()); + } + } + async logWhenTabTurnsOff(e) { + if (this.c.reactivePrivacyMode()) { + return new Ydn(); + } else { + return (await this.a.get()).logWhenTabTurnsOff(e); + } + } +}; +TBi = __decorate([__param(0, re), __param(1, $u)], TBi); +it(O$t, TBi, 1); +q(); +var QWo = class extends qWo { + constructor(i, e, t, s) { + super(i); + this.ic = e; + this.jc = t; + this.gc = this.D(new B()); + this.onWillShutdown = this.gc.event; + this.hc = this.D(new B()); + this.onDidShutdown = this.hc.event; + this.lc = { + message: undefined, + time: 0 + }; + Dr("code/willStartWorkbench"); + this.kc(s); + } + kc(i) { + xt.addEventListener("unhandledrejection", e => { + xs(e.reason); + e.preventDefault(); + }); + kVn(e => this.mc(e, i)); + } + mc(i, e) { + const t = ou(i, true); + if (!t) { + return; + } + const s = Date.now(); + if (t !== this.lc.message || !(s - this.lc.time <= 1000)) { + this.lc.time = s; + this.lc.message = t; + e.error(t, i); + } + } + startup() { + try { + this.D(_Vn(175)); + const i = this.oc(this.jc); + i.invokeFunction(e => { + const t = e.get(Yo); + const s = e.get(ht); + const n = e.get(ve); + const r = e.get(kr); + const o = e.get(Ns); + const a = e.get(Js); + const l = e.get(ni); + wXn((c, u) => i.createInstance(DR, c, u, {})); + EQn(o); + this.pb(e); + Pe.as(Er.Workbench).start(e); + Pe.as(_o.EditorFactory).start(e); + this.D(i.createInstance(DBi)); + this.pc(t, s, n, r, a); + this.uc(i, l, s, n); + this.Tb(); + this.layout(); + this.xc(t); + }); + return i; + } catch (i) { + xs(i); + throw i; + } + } + nc() { + const i = localStorage.getItem(mJi) === "true"; + mqi(i); + } + oc(i) { + i.set(lr, this); + const e = sjn(); + for (const [s, n] of e) { + i.set(s, n); + } + const t = new y0n(i, true); + t.invokeFunction(s => { + const n = s.get(Yo); + const r = s.get(ve); + if (typeof r.acquireInstantiationService == "function") { + r.acquireInstantiationService(t); + } + this.yc(s); + n.phase = 2; + }); + return t; + } + pc(i, e, t, s, n) { + this.D(t.onDidChangeConfiguration(r => this.rc(r, t))); + if (sc) { + this.D(e.onWillSaveState(r => { + if (r.reason === HT.SHUTDOWN) { + this.tc(e); + } + })); + } else { + this.D(i.onWillShutdown(() => this.tc(e))); + } + this.D(i.onWillShutdown(r => this.gc.fire(r))); + this.D(i.onDidShutdown(() => { + this.hc.fire(); + this.dispose(); + })); + this.D(s.onDidChangeFocus(r => { + if (!r) { + e.flush(); + } + })); + this.D(n.onWillShowDialog(() => this.mainContainer.classList.add("modal-dialog-visible"))); + this.D(n.onDidShowDialog(() => this.mainContainer.classList.remove("modal-dialog-visible"))); + } + rc(i, e) { + if (!Gt || i && !i.affectsConfiguration("workbench.fontAliasing")) { + return; + } + const t = e.getValue("workbench.fontAliasing"); + if (this.qc === t) { + return; + } + this.qc = t; + const s = ["antialiased", "none", "auto"]; + this.mainContainer.classList.remove(...s.map(n => `monaco-font-aliasing-${n}`)); + if (s.some(n => n === t)) { + this.mainContainer.classList.add(`monaco-font-aliasing-${t}`); + } + } + sc(i, e) { + const t = i.get("editorFontInfo", -1); + if (t) { + try { + const s = JSON.parse(t); + if (Array.isArray(s)) { + vM.restoreFontInfo(xt, s); + } + } catch {} + } + vM.readFontInfo(xt, VL.createFromRawSettings(e.getValue("editor"), _y.getInstance(xt).value)); + } + tc(i) { + const e = vM.serializeFontInfo(xt); + if (e) { + i.store("editorFontInfo", JSON.stringify(e), -1, 1); + } + } + uc(i, e, t, s) { + kqn(this.mainContainer); + XRr((l, c) => i.createInstance(rLt, l, c)); + const n = ln ? "windows" : yl ? "linux" : "mac"; + const r = dr(["monaco-workbench", n, tn ? "web" : undefined, Jq ? "chromium" : Bv ? "firefox" : yI ? "safari" : undefined, ...this.getLayoutClasses(), ...(this.ic?.extraClasses ? this.ic.extraClasses : [])]); + this.mainContainer.classList.add(...r); + xt.document.body.classList.add(n); + if (tn) { + xt.document.body.classList.add("web"); + } + const o = Iti(); + X5.set(xt, o); + this.mainContainer.appendChild(o); + this.rc(undefined, s); + this.sc(t, s); + const a = s.getValue(HB); + for (const { + id: l, + role: c, + classes: u, + options: d + } of [{ + id: "workbench.parts.titlebar", + role: "none", + classes: ["titlebar"] + }, { + id: "workbench.parts.banner", + role: "banner", + classes: ["banner"] + }, ...(a === "vertical" ? [{ + id: "workbench.parts.activitybar", + role: "none", + classes: ["activitybar", this.getSideBarPosition() === 0 ? "left" : "right"] + }] : []), { + id: "workbench.parts.sidebar", + role: "none", + classes: ["sidebar", this.getSideBarPosition() === 0 ? "left" : "right"] + }, { + id: "workbench.parts.editor", + role: "main", + classes: ["editor"], + options: { + restorePreviousState: this.Db() + } + }, { + id: "workbench.parts.panel", + role: "none", + classes: ["panel", "basepanel", PP(this.getPanelPosition())] + }, { + id: "workbench.parts.auxiliarybar", + role: "none", + classes: ["auxiliarybar", "basepanel", this.getSideBarPosition() === 0 ? "right" : "left"] + }, { + id: "workbench.parts.statusbar", + role: "status", + classes: ["statusbar"] + }]) { + const h = this.vc(l, c, u); + Dr(`code/willCreatePart/${l}`); + this.Mb(l).create(h, d); + Dr(`code/didCreatePart/${l}`); + } + this.wc(i, e); + this.ob.appendChild(this.mainContainer); + } + vc(i, e, t) { + const s = document.createElement(e === "status" ? "footer" : "div"); + s.classList.add("part", ...t); + s.id = i; + s.setAttribute("role", e); + if (e === "status") { + s.setAttribute("aria-live", "off"); + } + return s; + } + wc(i, e) { + const t = this.D(i.createInstance(kBi, this.mainContainer, e.model)); + const s = this.D(i.createInstance(IBi, this.mainContainer, e.model)); + this.D(i.createInstance(VWo, e.model)); + const n = i.createInstance(EBi, e.model); + this.D(i.createInstance(pBi)); + this.D(t.onDidChangeVisibility(() => { + n.update(t.isVisible, s.isVisible); + s.update(t.isVisible); + })); + this.D(s.onDidChangeVisibility(() => { + n.update(t.isVisible, s.isVisible); + })); + AWo(t, s, e.model); + Db.register(new zWo()); + this.registerNotifications({ + onDidChangeNotificationsVisibility: de.map(de.any(s.onDidChangeVisibility, t.onDidChangeVisibility), () => s.isVisible || t.isVisible) + }); + } + xc(i) { + try { + this.Lb(); + } catch (e) { + xs(e); + } + this.Ib.finally(() => Promise.race([this.whenRestored, Da(2000)]).finally(() => { + function e() { + Dr("code/didStartWorkbench"); + performance.measure("perf: workbench create & restore", "code/didLoadWorkbenchMain", "code/didStartWorkbench"); + } + if (this.isRestored()) { + e(); + } else { + this.whenRestored.finally(() => e()); + } + i.phase = 3; + this.D(new Vn(() => { + this.D(jk(xt, () => i.phase = 4, 2500)); + }, 2500)).schedule(); + })); + } + yc(i) { + const e = i.get($u); + const t = i.get(O$t); + const s = i.get(Qw); + const n = i.get(Pke); + const r = () => { + const c = s.cachedServerConfig.clientTracingConfig; + if (c !== undefined) { + n.setClientTracingConfig(c); + } + }; + this.D(s.onDidRefreshServerConfig(r)); + const o = c => { + n.setIsPrivacyMode(c ?? true); + }; + this.D(e.onDidPotentiallyChangePrivacyMode(o)); + const a = c => { + if (c === false) { + n.setUser(null, null); + } else { + l(); + e.getEmailAndSignUpType().then(async ({ + email: u + }) => { + const d = await e.getAccessToken(); + const h = d ? e.getAuthIdFromToken(d) : undefined; + n.setUser(u ?? null, h ?? null); + }).catch(() => { + n.setUser(null, null); + }); + } + }; + e.addLoginChangedListener(a); + const l = () => { + t.getDebuggingDataUploadUrl().then(c => { + if (c.url !== "") { + n.setDebuggingDataUploadUrl(c.url); + } + }).catch(() => {}); + }; + xt.setInterval(() => { + l(); + }, 600000); + l(); + r(); + o(e.reactivePrivacyMode()); + a(); + this.D(XWo("renderer", n)); + } +}; +X(); +Le(); +Ut(); +Jr(); +xe(); +Fs(); +Nt(); +Nn(); +vt(); +ai(); +hc(); +xe(); +fr(); +var b2; +(function (i) { + i[i.ACTIVE_WINDOW = 1] = "ACTIVE_WINDOW"; + i[i.ALL_WINDOWS = 2] = "ALL_WINDOWS"; +})(b2 ||= {}); +var PBi = 8; +var LBi = -8; +function WQ(i, e) { + i = Math.min(Math.max(i, LBi), PBi); + const t = []; + if (e === b2.ACTIVE_WINDOW) { + t.push(js()); + } else if (e === b2.ALL_WINDOWS) { + t.push(...Array.from(Jk()).map(({ + window: s + }) => s)); + } else { + t.push(e); + } + for (const s of t) { + ZWo(s)?.webFrame?.setZoomLevel(i); + DHn(eLr(i), s); + IHn(i, s); + } +} +function ZWo(i) { + if (i === xt) { + return { + ipcRenderer: Td, + webFrame: Dur + }; + } + { + const e = i; + if (e?.vscode?.ipcRenderer && e?.vscode?.webFrame) { + return e.vscode; + } + } +} +hc(); +Wt(); +Je(); +nt(); +q(); +da(); +te(); +var RBi = Ve("integrityService"); +rt(); +kn(); +Wi(); +Fi(); +Aa(); +te(); +au(); +At(); +Et(); +var gu = pa; +var cp = class extends ag { + get mainPid() { + return this.d.mainPid; + } + get machineId() { + return this.d.machineId; + } + get macMachineId() { + return this.d.macMachineId; + } + get sqmId() { + return this.d.sqmId; + } + get devDeviceId() { + return this.d.devDeviceId; + } + get remoteAuthority() { + return this.d.remoteAuthority; + } + get expectsResolverExtension() { + return !!this.d.remoteAuthority?.includes("+"); + } + get execPath() { + return this.d.execPath; + } + get backupPath() { + return this.d.backupPath; + } + get window() { + return { + id: this.d.windowId, + handle: this.d.handle, + colorScheme: this.d.colorScheme, + maximized: this.d.maximized, + accessibilitySupport: this.d.accessibilitySupport, + perfMarks: this.d.perfMarks, + isInitialStartup: this.d.isInitialStartup, + isCodeCaching: typeof this.d.codeCachePath == "string" + }; + } + get shadowWindowForWorkspaceId() { + return this.d.shadowWindowForWorkspaceId; + } + get windowLogsPath() { + return Li(this.logsHome, `window${this.d.windowId}`); + } + get logFile() { + return Li(this.windowLogsPath, "renderer.log"); + } + get extHostLogsPath() { + return Li(this.windowLogsPath, "exthost"); + } + get extHostTelemetryLogFile() { + return Li(this.extHostLogsPath, "extensionTelemetry.log"); + } + get webviewExternalEndpoint() { + return `${me.vscodeWebview}://{{uuid}}`; + } + get skipReleaseNotes() { + return !!this.args["skip-release-notes"]; + } + get skipWelcome() { + return !!this.args["skip-welcome"]; + } + get skipOnboarding() { + return !!this.args["skip-onboarding"]; + } + get overrideCursorAuthToken() { + return this.args["override-cursor-auth-token"]; + } + get logExtensionHostCommunication() { + return !!this.args.logExtensionHostCommunication; + } + get enableSmokeTestDriver() { + return !!this.args["enable-smoke-test-driver"]; + } + get extensionEnabledProposedApi() { + if (Array.isArray(this.args["enable-proposed-api"])) { + return this.args["enable-proposed-api"]; + } + if ("enable-proposed-api" in this.args) { + return []; + } + } + get os() { + return this.d.os; + } + get filesToOpenOrCreate() { + return this.d.filesToOpenOrCreate; + } + get filesToDiff() { + return this.d.filesToDiff; + } + get filesToMerge() { + return this.d.filesToMerge; + } + get filesToWait() { + return this.d.filesToWait; + } + constructor(i, e) { + super(i, { + homeDir: i.homeDir, + tmpDir: i.tmpDir, + userDataDir: i.userDataDir + }, e); + this.d = i; + } +}; +__decorate([Hs], cp.prototype, "mainPid", null); +__decorate([Hs], cp.prototype, "machineId", null); +__decorate([Hs], cp.prototype, "macMachineId", null); +__decorate([Hs], cp.prototype, "sqmId", null); +__decorate([Hs], cp.prototype, "devDeviceId", null); +__decorate([Hs], cp.prototype, "remoteAuthority", null); +__decorate([Hs], cp.prototype, "expectsResolverExtension", null); +__decorate([Hs], cp.prototype, "execPath", null); +__decorate([Hs], cp.prototype, "backupPath", null); +__decorate([Hs], cp.prototype, "window", null); +__decorate([Hs], cp.prototype, "shadowWindowForWorkspaceId", null); +__decorate([Hs], cp.prototype, "windowLogsPath", null); +__decorate([Hs], cp.prototype, "logFile", null); +__decorate([Hs], cp.prototype, "extHostLogsPath", null); +__decorate([Hs], cp.prototype, "extHostTelemetryLogFile", null); +__decorate([Hs], cp.prototype, "webviewExternalEndpoint", null); +__decorate([Hs], cp.prototype, "skipReleaseNotes", null); +__decorate([Hs], cp.prototype, "skipWelcome", null); +__decorate([Hs], cp.prototype, "skipOnboarding", null); +__decorate([Hs], cp.prototype, "overrideCursorAuthToken", null); +__decorate([Hs], cp.prototype, "logExtensionHostCommunication", null); +__decorate([Hs], cp.prototype, "enableSmokeTestDriver", null); +__decorate([Hs], cp.prototype, "extensionEnabledProposedApi", null); +__decorate([Hs], cp.prototype, "os", null); +__decorate([Hs], cp.prototype, "filesToOpenOrCreate", null); +__decorate([Hs], cp.prototype, "filesToDiff", null); +__decorate([Hs], cp.prototype, "filesToMerge", null); +__decorate([Hs], cp.prototype, "filesToWait", null); +Ho(); +ii(); +Jt(); +Me(); +qt(); +zt(); +gs(); +At(); +te(); +var po = Ve("nativeHostService"); +pn(); +Th(); +pe(); +ar(); +fn(); +Zt(); +te(); +jo(); +It(); +te(); +te(); +var dT = Ve("mainProcessService"); +var bMn = class { + constructor(i, e, t, s) { + const n = t.getChannel(i); + if (eVo(e)) { + return s.createInstance(new Os(e.channelClientCtor, [n])); + } else { + return YE.toService(n, e?.proxyOptions); + } + } +}; +function eVo(i) { + return !!i?.channelClientCtor; +} +var NBi = class extends bMn { + constructor(e, t, s, n) { + super(e, t, s, n); + } +}; +NBi = __decorate([__param(2, dT), __param(3, re)], NBi); +function v2(i, e, t) { + it(i, new Os(NBi, [e, t], true)); +} +var b3 = Ve("sharedProcessService"); +var MBi = class extends bMn { + constructor(e, t, s, n) { + super(e, t, s, n); + } +}; +MBi = __decorate([__param(2, b3), __param(3, re)], MBi); +function YN(i, e, t) { + it(i, new Os(MBi, [e, t], true)); +} +so(); +Yd(); +jn(); +Et(); +He(); +Un(); +Zt(); +q(); +nr(); +pe(); +var tVo = class { + constructor(i) { + this.a = i; + this.onMessage = de.fromDOMEventEmitter(this.a, "message", e => e.data ? Ii.wrap(e.data) : Ii.alloc(0)); + i.start(); + } + send(i) { + this.a.postMessage(i.buffer); + } + disconnect() { + this.a.close(); + } +}; +var ABi = class extends rbi { + constructor(i, e) { + const t = new tVo(i); + super(t, e); + this.b = t; + } + dispose() { + this.b.disconnect(); + super.dispose(); + } +}; +te(); +Ps(); +fr(); +pe(); +Ps(); +async function tPe(i, e, t = Ft()) { + Iur.acquire(e, t); + if (typeof i == "string") { + Td.send(i, t); + } + const s = de.fromDOMEventEmitter(xt, "message", r => ({ + nonce: r.data, + port: r.ports[0], + source: r.source + })); + const { + port: n + } = await de.toPromise(de.once(de.filter(s, r => r.nonce === t && r.source === xt))); + return n; +} +var iVo = "utilityProcessWorker"; +nt(); +var vMn = Ve("utilityProcessWorkerWorkbenchService"); +var $Bi = class extends H { + get b() { + if (!this.a) { + const e = this.g.getChannel(iVo); + this.a = YE.toService(e); + } + return this.a; + } + constructor(e, t, s) { + super(); + this.windowId = e; + this.f = t; + this.g = s; + this.a = undefined; + this.c = new YS(); + } + async createWorker(e) { + this.f.trace("Renderer->UtilityProcess#createWorker"); + await Promise.race([this.c.wait(), Da(2000)]); + const t = Ft(); + const s = "vscode:createUtilityProcessWorkerMessageChannelResult"; + const n = tPe(undefined, s, t); + const r = this.b.createWorker({ + process: e, + reply: { + windowId: this.windowId, + channel: s, + nonce: t + } + }); + const o = new Q(); + o.add(Ue(() => { + this.f.trace("Renderer->UtilityProcess#disposeWorker", e); + this.b.disposeWorker({ + process: e, + reply: { + windowId: this.windowId + } + }); + })); + const a = await n; + const l = o.add(new ABi(a, `window:${this.windowId},module:${e.moduleId}`)); + this.f.trace("Renderer->UtilityProcess#createWorkerChannel: connection established"); + r.then(({ + reason: c + }) => { + if (c?.code === 0) { + this.f.trace(`[UtilityProcessWorker]: terminated normally with code ${c.code}, signal: ${c.signal}`); + } else { + this.f.error(`[UtilityProcessWorker]: terminated unexpectedly with code ${c?.code}, signal: ${c?.signal}`); + } + }); + return { + client: l, + onDidTerminate: r, + dispose: () => o.dispose() + }; + } + notifyRestored() { + if (!this.c.isOpen()) { + this.c.open(); + } + } +}; +$Bi = __decorate([__param(1, Bt), __param(2, dT)], $Bi); +It(); +te(); +Me(); +qt(); +rt(); +Fi(); +rn(); +Nt(); +nr(); +q(); +Le(); +It(); +te(); +ii(); +kn(); +Un(); +Nt(); +Gl(); +function sVo(i) { + return { + id: nVo(i), + configPath: i + }; +} +function nVo(i) { + return Qc(i.toString()).toString(16); +} +var yMn = Ve("INativeShadowWorkspaceManager"); +var FBi = class extends H { + constructor(e, t, s, n, r, o, a, l) { + super(); + this.b = e; + this.c = t; + this.f = s; + this.g = n; + this.h = r; + this.j = o; + this.m = a; + this.n = l; + this.a = _nr(this.c, this.g); + this.q = undefined; + this.s = undefined; + this.j.registerShadowWorkspaceManager(this); + } + dispose() { + this.closeShadowWorkspace(); + super.dispose(); + } + available() { + return !this.c.remoteAuthority; + } + async cleanUpOldFiles() { + const t = (await this.n.resolve(this.a)).children?.filter(s => s.name.endsWith(`.${qI}`)).map(s => s.name); + t?.sort(); + if (t?.length) { + t.slice(0, -5).forEach(s => this.n.del(V.joinPath(this.a, s))); + } + } + async createShadowWorkspace() { + if (this.s) { + await this.closeShadowWorkspace(); + } + const e = (Date.now() + Math.round(Math.random() * 1000)).toString(); + this.s = V.joinPath(this.a, `Untitled-${e}.${qI}`); + const t = this.b.getWorkspace().folders; + const s = []; + for (const r of t) { + s.push(Hei(r.uri, true, r.name, this.a, this.m.extUri)); + } + const n = { + folders: s, + remoteAuthority: this.c.remoteAuthority, + transient: true + }; + await this.n.writeFile(this.s, Ii.fromString(JSON.stringify(n, null, "\t"))); + this.cleanUpOldFiles().catch(r => console.error("failed to clean up old shadow workspaces", r)); + return sVo(this.s); + } + hasOpenShadowWorkspace() { + return this.q !== undefined; + } + async openShadowWorkspace() { + this.closeShadowWorkspace(); + const e = await this.createShadowWorkspace(); + await this.f.copyWorkspaceSettings(e, { + overrides: { + "files.autoSave": "off" + } + }); + const s = (await this.h.openWindow([{ + workspaceUri: e.configPath + }], { + forceNewWindow: true, + shadowWindowForWorkspaceId: this.b.getWorkspace().id + })).at(0)?.windowId; + if (s === undefined) { + console.error("failed to open window"); + } + this.q = s; + } + async closeShadowWorkspace() { + if (this.q) { + const e = this.h.closeWindowNoFallback({ + targetWindowId: this.q + }); + const t = new Promise(s => setTimeout(() => s("timedout"), 500)); + await Promise.race([e, t]); + await this.h.destroyWindowNoFallback({ + targetWindowId: this.q + }); + this.q = undefined; + } + if (this.s) { + try { + await this.n.del(this.s); + } catch (e) { + console.warn("failed to delete shadow workspace (this is probably fine)", e); + } + this.s = undefined; + } + } +}; +FBi = __decorate([__param(0, kt), __param(1, gu), __param(2, LD), __param(3, ys), __param(4, po), __param(5, K0t), __param(6, _s), __param(7, Ct)], FBi); +it(yMn, FBi, 1); +Wt(); +Wi(); +nr(); +Et(); +function rVo(i) { + let e = i; + e = e.replace("let u=`https://update.code.visualstudio.com/commit:${n}/server-${i?t.id.replace(\"linux-\",\"linux-legacy-\"):t.id}${o?\"-web\":\"\"}/${r}`", "let u=`https://cursor.blob.core.windows.net/remote-releases/${n}/vscode-reh-${t.id}.tar.gz`"); + e = e.replace(",!JZ()){", ",!JZ()&&false){"); + return e; +} +var oVo = { + extensionId: "ms-vscode-remote.remote-containers", + fixes: [{ + relativeFilePath: "dist/extension/extension.js", + replaceFn: rVo + }] +}; +function zS(i, e, t, s) { + const n = i; + const r = i.replace(e, t); + if (s.debugMode && n === r && !r.includes(t)) { + console.log(`EXTENSION REWRITING PROBLEM: No match for ${e} for ${t}`); + } + return r; +} +function aVo(i) { + return i.replace("\"default\": \"https://github.com/VSCodium/vscodium/releases/download/${version}.${release}/vscodium-reh-${os}-${arch}-${version}.${release}.tar.gz\"", "\"default\": \"https://cursor.blob.core.windows.net/remote-releases/${commit}/vscode-reh-${os}-${arch}.tar.gz\""); +} +function lVo(i, e) { + let t = i; + t = t.replace("promptOpenRemoteSSHWindow=async function(e){const t=await a.window.showInputBox({title:\"Enter [user@]hostname[:port]\"});t&&d(new f.default(t).toEncodedString(),e)}", "promptOpenRemoteSSHWindow=async function(e,t){const n=a.window.createQuickPick(),s={current:[]},o={current:void 0},i=[{label:\"$(add) Add New SSH Host...\",alwaysShow:!0},{label:\"Configure SSH Hosts...\",alwaysShow:!0}],u=()=>{n.items=[...s.current,...i,...o.current?[o.current]:[]]};l.default.loadFromFS().then((e=>{const t=e.getAllConfiguredHosts();s.current=t.map((e=>({label:e}))),u()})),n.placeholder=\"e.g. ubuntu@ec2-3-106-99.amazonaws.com, or named host below\",n.title=\"Select configured SSH host or enter user@host\",u(),t.subscriptions.push(n.onDidChangeValue((e=>{e.length>0?o.current={label:`➤ ${e}`,alwaysShow:!0}:o.current=void 0,u()}))),n.show(),n.onDidAccept((async()=>{const t=n.selectedItems[0];if(t){if(t.label===i[0].label)return await h(),void n.hide();if(t.label===i[1].label)return await g(),void n.hide();o.current?.label===t.label?d(new f.default(o.current.label.substr(2).trim()).toEncodedString(),e):d(new f.default(t.label).toEncodedString(),e),n.hide()}}))}"); + t = t.replace("l.promptOpenRemoteSSHWindow)(!0)", "l.promptOpenRemoteSSHWindow)(!0,e)"); + t = t.replace("l.promptOpenRemoteSSHWindow)(!1)", "l.promptOpenRemoteSSHWindow)(!1,e)"); + return t; +} +var cVo = { + extensionId: "jeanp413.open-remote-ssh", + fixes: [{ + relativeFilePath: "package.json", + replaceFn: aVo + }, { + relativeFilePath: "out/extension.js", + replaceFn: lVo + }] +}; +var wMn = "/*"; +var CMn = "*/"; +var uVo = { + extensionId: "ms-python.vscode-pylance", + extensionMinVersionToFixInclusive: "2024.4.1", + fixes: [{ + relativeFilePath: "dist/extension.bundle.js", + replaceFn: dVo + }] +}; +function dVo(i) { + const e = hVo(i); + if (!e) { + return i; + } + const [t, s] = e; + return i.slice(0, t) + wMn + i.slice(t, s) + CMn + i.slice(s); +} +function hVo(i) { + const e = fVo(i); + if (!e) { + throw new Error("Expected pattern not found in file"); + } + const [t, s] = e; + if (i.slice(0, t).endsWith(wMn) || i.slice(s).startsWith(CMn)) { + return null; + } else { + return [t, s]; + } +} +function fVo(i) { + const e = "disposables"; + const t = "return(0x0"; + const s = "};"; + let n = Infinity; + let r = null; + let o = i.indexOf(e); + while (o !== -1) { + const a = i.indexOf(s, o); + if (a !== -1) { + const l = i.lastIndexOf(t, o); + if (l !== -1) { + const c = a + s.length - l; + if (c < n) { + n = c; + r = [l, a + s.length]; + } + } + } + o = i.indexOf(e, o + 1); + } + return r; +} +function gVo(i) { + return i.replace("if(i&&i.client&&i.client.isEnabled())return this.pylanceApi=i,void await i.client.start();", ""); +} +var pVo = { + extensionId: "ms-python.python", + extensionMaxVersionToFixInclusive: "2023.22.1", + fixes: [{ + relativeFilePath: "out/client/extension.js", + replaceFn: gVo + }] +}; +function mVo(i, e) { + let t = i; + t = zS(t, "https://update.code.visualstudio.com/commit:$commitId/$an/$quality", "https://cursor.blob.core.windows.net/remote-releases/$commitId/$an.zip", e); + t = zS(t, "https://update.code.visualstudio.com/commit:$commitId/$serverName/$quality", "https://cursor.blob.core.windows.net/remote-releases/$commitId/$serverName.zip", e); + t = zS(t, "function GetArtifactName {\\n\\t$webPart = \"${v?\"-web\":\"\"}\"\\n\\t\"server-win32-x64\" + $webPart\\n}", "function GetArtifactName {\\n\\t$webPart = \"${v?\"-web\":\"\"}\"\\n\\t\"vscode-reh-win32-x64\" + $webPart\\n}", e); + t = zS(t, "$cliNameInArchiveWithoutExe = \"${\"stable\"===n?\"code\":\"code-insiders\"}\"", "$cliNameInArchiveWithoutExe = \"cursor\"", e); + return t; +} +function bVo(i, e) { + let t = i; + t = zS(t, "DOWNLOAD_URL=https://update.code.visualstudio.com/commit:$COMMIT_ID/$PLATFORM_DOWNLOAD_PATH/${t}", "DOWNLOAD_URL=https://cursor.blob.core.windows.net/remote-releases/$COMMIT_ID/$PLATFORM_DOWNLOAD_PATH.tar.gz", e); + return zS(t, "CLI_NAME_IN_ARCHIVE=${\"stable\"===t?\"code\":\"code-insiders\"}", "CLI_NAME_IN_ARCHIVE=cursor", e); +} +function vVo(i, e) { + let t = i; + t = zS(t, "DOWNLOAD_URL=https://update.code.visualstudio.com/commit:$COMMIT_ID/$PLATFORM_DOWNLOAD_PATH${S?\"-web\":\"\"}/${n}", "DOWNLOAD_URL=https://cursor.blob.core.windows.net/remote-releases/$COMMIT_ID/$PLATFORM_DOWNLOAD_PATH${S?\"-web\":\"\"}.tar.gz", e); + t = zS(t, "if [[ $PLATFORM == linux ]]; then\\n\\tPLATFORM_DOWNLOAD_PATH=server-linux-$VSCODE_ARCH\\nelif [[ $VSCODE_ARCH == \"arm64\" ]]; then\\n\\tPLATFORM_DOWNLOAD_PATH=server-darwin-arm64\\nelse\\n\\tPLATFORM_DOWNLOAD_PATH=server-darwin\\nfi", "if [[ $PLATFORM == linux ]]; then\\n\\tPLATFORM_DOWNLOAD_PATH=vscode-reh-linux-$VSCODE_ARCH\\nelif [[ $VSCODE_ARCH == \"arm64\" ]]; then\\n\\tPLATFORM_DOWNLOAD_PATH=vscode-reh-darwin-arm64\\nelse\\n\\tPLATFORM_DOWNLOAD_PATH=vscode-reh-darwin\\nfi", e); + t = zS(t, "if [[ $PLATFORM == linux ]]; then\\n\\t\\tPLATFORM_DOWNLOAD_PATH=server-linux-legacy-$VSCODE_ARCH\\n\\telif [[ $VSCODE_ARCH == \"arm64\" ]]; then\\n\\t\\tPLATFORM_DOWNLOAD_PATH=server-darwin-arm64\\n\\telse\\n\\t\\tPLATFORM_DOWNLOAD_PATH=server-darwin\\n\\tfi", "if [[ $PLATFORM == linux ]]; then\\n\\t\\tPLATFORM_DOWNLOAD_PATH=vscode-reh-linux-$VSCODE_ARCH\\n\\telif [[ $VSCODE_ARCH == \"arm64\" ]]; then\\n\\t\\tPLATFORM_DOWNLOAD_PATH=vscode-reh-darwin-arm64\\n\\telse\\n\\t\\tPLATFORM_DOWNLOAD_PATH=vscode-reh-darwin\\n\\tfi", e); + return zS(t, "mv vscode-server*/* .", "mv $PLATFORM_DOWNLOAD_PATH*/* .", e); +} +function yVo(i, e) { + let t = i; + t = zS(t, "return`https://update.code.visualstudio.com/commit:${t.commit}/${e.artifact}/${t.quality}`", "return`https://cursor.blob.core.windows.net/remote-releases/${t.commit}/${e.artifact}.${e.artifact.startsWith(\"cli-win32\")?\"zip\":\"tar.gz\"}`", e); + return t; +} +function wVo(i, e) { + let t = i; + t = vVo(t, e); + t = mVo(t, e); + t = bVo(t, e); + t = yVo(t, e); + return t; +} +var CVo = { + extensionId: "ms-vscode-remote.remote-ssh", + fixes: [{ + relativeFilePath: "out/extension.js", + replaceFn: wVo + }] +}; +function SVo(i, e) { + i = zS(i, "const t=o.readFileSync(s.join(e,\"product.json\")).toString();n=JSON.parse(t)", "const t=o.readFileSync(s.join(e,\"product.json\")).toString();n=JSON.parse(t);n.updateUrl=\"https://cursor.blob.core.windows.net/remote-releases\"", e); + i = zS(i, "wslServer-dev.sh", "wslServer.sh", e); + return i; +} +function xVo(i, e) { + let t = i; + t = zS(t, "return`${e}/commit:${t}/server-${n}/${r||\"insider\"}`", "return`${e}/${t}/vscode-reh-${n}.tar.gz`", e); + t = zS(t, "const t=r.readFileSync(i.join(e,\"product.json\")).toString();o=JSON.parse(t)", "const t=r.readFileSync(i.join(e,\"product.json\")).toString();o=JSON.parse(t);o.updateUrl=\"https://cursor.blob.core.windows.net/remote-releases\"", e); + return t; +} +function kVo(i, e) { + return zS(i, "serverApplicationName:t.env.appCommit?\"stable\"===t.env.appQuality?\"code-server\":\"insider\"===t.env.appQuality?\"code-server-insiders\":\"exploration\"===t.env.appQuality?\"code-server-exploration\":\"code-server-unknwown\":\"code-server-oss-dev\",serverDataFolderName:t.env.appCommit?\"stable\"===t.env.appQuality?\".vscode-server\":\"insider\"===t.env.appQuality?\".vscode-server-insiders\":\"exploration\"===t.env.appQuality?\".vscode-server-exploration\":void 0:\".vscode-server-oss-dev\",updateUrl:\"https://update.code.visualstudio.com\"", "serverApplicationName:\"cursor-server\",serverDataFolderName:\".cursor-server\",updateUrl:\"https://cursor.blob.core.windows.net/remote-releases\"", e); +} +function EVo(i, e) { + i = zS(i, "local_url=\"https://update.code.visualstudio.com/commit:$COMMIT/server-$INSTALL/$QUALITY\"", "local_url=\"https://cursor.blob.core.windows.net/remote-releases/$COMMIT/vscode-reh-$INSTALL.tar.gz\"", e); + i = zS(i, "local_url=\"https://update.code.visualstudio.com/commit:$COMMIT/server-linux-$PLATFORM/$QUALITY\"", "local_url=\"https://cursor.blob.core.windows.net/remote-releases/$COMMIT/vscode-reh-linux-$PLATFORM.tar.gz\"", e); + return i; +} +var IVo = { + extensionId: "ms-vscode-remote.remote-wsl", + fixes: [{ + relativeFilePath: "dist/browser/extension.js", + replaceFn: kVo + }, { + relativeFilePath: "dist/node/extension.js", + replaceFn: xVo + }, { + relativeFilePath: "dist/node/wslDaemon.js", + replaceFn: SVo + }, { + relativeFilePath: "scripts/wslDownload.sh", + replaceFn: EVo + }] +}; +function DVo(i) { + return i.replace(`"basedpyright.analysis.typeCheckingMode": { + "type": "string", + "default": "all",`, `"basedpyright.analysis.typeCheckingMode": { + "type": "string", + "default": "off",`); +} +var TVo = { + extensionId: "detachhead.basedpyright", + fixes: [{ + relativeFilePath: "package.json", + replaceFn: DVo + }] +}; +var PVo = [pVo, uVo, TVo, IVo, oVo, CVo, cVo]; +async function LVo(i, e, t, s, n) { + if (e !== i.extensionId) { + throw new Error(`Extension ${e} does not match hotfix ${i.extensionId}`); + } + if (i.extensionMaxVersionToFixInclusive && WO(t, i.extensionMaxVersionToFixInclusive)) { + return { + isChanged: false + }; + } + if (i.extensionMinVersionToFixInclusive && GHs(t, i.extensionMinVersionToFixInclusive)) { + return { + isChanged: false + }; + } + let r = false; + let o = false; + await Promise.allSettled(i.fixes.map(async a => { + try { + const l = Li(s, a.relativeFilePath); + const c = (await n.readFile(l)).value.toString(); + if (r) { + console.log("Rewriting extension file ", l.toString()); + } + const u = a.replaceFn(c, { + debugMode: r + }); + if (u !== c) { + console.info("Writing file", l.toString()); + await n.writeFile(l, Ii.fromString(u)); + o = true; + } + } catch (l) { + console.error(l); + throw l; + } + })); + return { + isChanged: o + }; +} +Aa(); +Cs(); +var SMn = Ve("onFirstStartupService"); +var OBi = class { + constructor(e, t, s, n, r, o, a, l, c, u, d, h, g) { + this.b = e; + this.c = t; + this.d = s; + this.f = n; + this.g = u; + this.h = d; + this.i = h; + this.j = g; + const p = async C => { + const S = C.map(x => ({ + extensionId: x, + hotfix: PVo.find(k => k.extensionId === x) + })).filter(x => x.hotfix !== undefined); + await Promise.all(S.map(async ({ + extensionId: x, + hotfix: k + }) => { + const E = await r.getExtension(x); + if (E) { + await LVo(k, x, E.version, E.extensionLocation, o); + } + })); + }; + const b = C => p(C.map(S => S.identifier.value)); + r.registerHotfixExtensionsProvider(b); + r.onDidChangeExtensionsStatus(C => p(C.map(S => S.value))); + const v = !this.h.isBuilt || this.h.isExtensionDevelopment; + this.g.createScoped(this).onChangeEffect({ + deps: [() => this.g.applicationUserPersistentStorage.cppEnabled], + onChange: ({ + deps: [C] + }) => { + if (!C) { + try { + const S = {}; + Error.captureStackTrace(S); + const x = this.g.applicationUserPersistentStorage.cppSnoozed; + if (v && !x) { + console.log("stackTrace", S.stack); + c.error("Cpp somehow disabled. Please ping Aman in slack and open console logs to see the stack trace"); + } + g.logWhenTabTurnsOff({ + stackTrace: S.stack?.toString() + }).catch(k => { + console.error(k); + }); + } catch {} + } + } + }); + let w = true; + this.d.onDidUpdateKeybindings(() => { + if (w) { + K8r(this.d, this.f, this.b); + w = false; + } + }); + this.a = this.d.lookupKeybinding(Owt.ID); + this.d.onDidUpdateKeybindings(() => { + const C = this.d.getKeybindings().filter(S => S.command === Owt.ID)[0]?.resolvedKeybinding; + try { + if (!this.a || !C || C.getUserSettingsLabel() === this.a.getUserSettingsLabel() || !C.getUserSettingsLabel() || !this.a.getUserSettingsLabel()) { + return; + } + const x = []; + for (const k of this.d.getKeybindings()) { + if (k.resolvedKeybinding && this.a.isProperPrefixOf(k.resolvedKeybinding) && k.command !== Owt.ID) { + const E = k.resolvedKeybinding.replacePrefixAndGetUserSettingsLabel(this.a, C); + if (E) { + x.push(this.f.editKeybinding(k, E, k.when?.serialize())); + } + } + } + Promise.all(x).then(() => { + console.log("updated keybindings"); + }).catch(k => { + console.error(k); + }); + } catch (S) { + console.error(S, "error updating keybindings"); + } finally { + this.a = C; + } + }); + } + activate() { + if (this.b.getBoolean("workbench.services.onFirstStartupService.hasNotResetJetBrainsMonoFont", -1, true) && ln) { + this.b.store("workbench.services.onFirstStartupService.hasNotResetJetBrainsMonoFont", false, -1, 1); + const s = this.c.getValue("editor.fontFamily"); + if (s && s.includes("JetBrains Mono")) { + this.c.updateValue("editor.fontFamily", undefined); + } + } + if (this.b.getBoolean("workbench.services.onFirstStartupService.isVeryFirstTime", -1, true)) { + this.b.store("workbench.services.onFirstStartupService.isVeryFirstTime", false, -1, 1); + } + } +}; +OBi = __decorate([__param(0, ht), __param(1, ve), __param(2, oi), __param(3, eCe), __param(4, Ks), __param(5, Ct), __param(6, gt), __param(7, yMn), __param(8, ni), __param(9, _i), __param(10, pa), __param(11, re), __param(12, O$t)], OBi); +it(SMn, OBi, 0); +fr(); +Aa(); +Nt(); +Zt(); +da(); +var _Bi = class extends LEt { + constructor(e, t, s, n, r) { + super(t, s, n, r); + this.h = e; + } + exitApplication() { + return this.h.exitApplication(); + } +}; +_Bi = __decorate([__param(1, Ct), __param(2, pa), __param(3, Yo), __param(4, Bt)], _Bi); +function RVo(i, e) { + Object.assign(xt, { + driver: i.createInstance(_Bi, e) + }); +} +fr(); +bh(); +sl(); +Rt(); +var BBi; +var _$t = BBi = class extends Xke { + constructor(e, t, s, n, r, o, a, l, c, u, d, h, g, p, b, v, y, w, C, S, x, k, E, D, P, R, L, F, O, U, j, ie, ee, ne, be, ge, ce, Se) { + super(xt, undefined, Se, b); + this.t = e; + this.u = t; + this.w = s; + this.y = n; + this.z = r; + this.C = o; + this.F = a; + this.G = l; + this.H = c; + this.I = u; + this.J = d; + this.L = h; + this.M = g; + this.N = p; + this.O = b; + this.P = v; + this.Q = y; + this.R = w; + this.S = C; + this.U = S; + this.W = x; + this.X = k; + this.Y = E; + this.Z = D; + this.$ = P; + this.ab = R; + this.bb = L; + this.cb = F; + this.db = O; + this.eb = U; + this.fb = j; + this.gb = ie; + this.hb = ee; + this.ib = ne; + this.jb = be; + this.kb = ge; + this.lb = ce; + this.n = this.D(new Q()); + this.q = this.D(new Vn(() => this.Lb(), 100)); + this.r = []; + this.s = false; + this.Gb = this.D(new Q()); + this.Pb = new Map(); + this.Qb = this.Rb(); + this.lb.activate(); + this.mb(); + this.Ab(); + } + mb() { + this.D(Ce(xt, Oe.RESIZE, () => this.W.layout())); + this.D(this.t.onDidActiveEditorChange(() => this.Ib())); + for (const t of [Oe.DRAG_OVER, Oe.DROP]) { + this.D(Ce(xt.document.body, t, s => { + yn.stop(s); + })); + } + Td.on("vscode:runAction", async (t, s) => { + const n = s.args || []; + if (s.from === "touchbar") { + const r = this.t.activeEditor; + if (r) { + const o = vo.getOriginalUri(r, { + supportSideBySide: fo.PRIMARY + }); + if (o) { + n.push(o); + } + } + } else { + n.push({ + from: s.from + }); + } + try { + await this.F.executeCommand(s.id, ...n); + this.H.publicLog2("workbenchActionExecuted", { + id: s.id, + from: s.from + }); + } catch (r) { + this.C.error(r); + } + }); + Td.on("vscode:runKeybinding", (t, s) => { + const n = Tu(); + if (n) { + this.G.dispatchByUserSettingsLabel(s.userSettingsLabel, n); + } + }); + Td.on("vscode:reportError", (t, s) => { + if (s) { + xs(JSON.parse(s)); + } + }); + Td.on("vscode:reportSharedProcessCrash", (t, s) => { + this.C.prompt(es.Error, f(12460, null), [{ + label: f(12461, null), + run: () => this.S.relaunch() + }], { + priority: Ru.URGENT + }); + }); + Td.on("vscode:openFiles", (t, s) => { + this.Mb(s); + }); + Td.on("vscode:addFolders", (t, s) => { + this.Kb(s); + }); + Td.on("vscode:showInfoMessage", (t, s) => { + this.C.info(s); + }); + Td.on("vscode:showResolveShellEnvError", (t, s) => { + this.C.prompt(es.Error, s, [{ + label: f(12462, null), + run: () => this.S.relaunch() + }, { + label: f(12463, null), + run: () => this.jb.openUserSettings({ + query: "application.shellEnvironmentResolutionTimeout" + }) + }, { + label: f(12464, null), + run: () => this.R.open("https://go.microsoft.com/fwlink/?linkid=2149667") + }]); + }); + Td.on("vscode:showCredentialsError", (t, s) => { + this.C.prompt(es.Error, f(12465, null, s), [{ + label: f(12466, null), + run: () => this.R.open("https://go.microsoft.com/fwlink/?linkid=2190713") + }]); + }); + Td.on("vscode:showTranslatedBuildWarning", () => { + this.C.prompt(es.Warning, f(12467, null, this.Z.nameLong), [{ + label: f(12468, null), + run: () => { + const t = this.Z.quality; + this.R.open(t === "stable" ? "https://code.visualstudio.com/docs/?dv=osx" : "https://code.visualstudio.com/docs/?dv=osx&build=insiders"); + } + }], { + priority: Ru.URGENT + }); + }); + Td.on("vscode:showArgvParseWarning", (t, s) => { + this.C.prompt(es.Warning, f(12469, null), [{ + label: f(12470, null), + run: () => this.t.openEditor({ + resource: this.O.argvResource + }) + }], { + priority: Ru.URGENT + }); + }); + Td.on("vscode:enterFullScreen", () => Sfe(true, xt)); + Td.on("vscode:leaveFullScreen", () => Sfe(false, xt)); + Td.on("vscode:openProxyAuthenticationDialog", async (t, s) => { + const n = "window.rememberProxyCredentials"; + const r = this.bb.getBoolean(n, -1); + const o = await this.ab.input({ + type: "warning", + message: f(12471, null), + primaryButton: f(12472, null), + inputs: [{ + placeholder: f(12473, null), + value: s.username + }, { + placeholder: f(12474, null), + type: "password", + value: s.password + }], + detail: f(12475, null, `${s.authInfo.host}:${s.authInfo.port}`), + checkbox: { + label: f(12476, null), + checked: r + } + }); + if (!o.confirmed || !o.values) { + Td.send(s.replyChannel); + } else { + if (o.checkboxChecked) { + this.bb.store(n, true, -1, 1); + } else { + this.bb.remove(n, -1); + } + const [a, l] = o.values; + Td.send(s.replyChannel, { + username: a, + password: l, + remember: !!o.checkboxChecked + }); + } + }); + Td.on("vscode:accessibilitySupportChanged", (t, s) => { + this.P.setAccessibilitySupport(s ? 2 : 1); + }); + Td.on("vscode:configureAllowedUNCHost", async (t, s) => { + if (!ln) { + return; + } + const n = new Set(); + const r = this.w.getValue("security.allowedUNCHosts") ?? []; + if (Array.isArray(r)) { + for (const o of r) { + if (typeof o == "string") { + n.add(o); + } + } + } + if (!n.has(s)) { + n.add(s); + await Usn(pCe.ID).ready; + this.w.updateValue("security.allowedUNCHosts", [...n.values()], 2); + } + }); + Td.on("vscode:disablePromptForProtocolHandling", (t, s) => { + const n = s === "local" ? "security.promptForLocalFileProtocolHandling" : "security.promptForRemoteFileProtocolHandling"; + this.w.updateValue(n, false); + }); + this.D(this.w.onDidChangeConfiguration(t => { + if (t.affectsConfiguration("window.zoomLevel") || t.affectsConfiguration("window.zoomPerWindow") && this.w.getValue("window.zoomPerWindow") === false) { + this.Vb(); + } else if (t.affectsConfiguration("keyboard.touchbar.enabled") || t.affectsConfiguration("keyboard.touchbar.ignored")) { + this.Ib(); + } + })); + this.D(kfe(t => this.Sb(t))); + for (const t of this.u.parts) { + this.Tb(t); + } + this.D(this.u.onDidCreateAuxiliaryEditorPart(t => this.Tb(t))); + this.D(de.debounce(this.t.onDidVisibleEditorsChange, () => {}, 0, undefined, undefined, undefined, this.B)(() => this.yb())); + const e = this.O.filesToWait; + if (e) { + this.Nb(e.waitMarkerFileUri, dr(e.paths.map(t => t.fileUri))); + } + if (Gt) { + for (const t of this.u.parts) { + this.nb(t); + } + this.D(this.u.onDidCreateAuxiliaryEditorPart(t => this.nb(t))); + } + if (Gt && !IC(this.w)) { + this.D(de.runAndSubscribe(this.W.onDidAddContainer, ({ + container: t, + disposables: s + }) => { + const n = Kt(t); + const r = n.vscodeWindowId; + const o = Tn(this.W.getContainer(n, "workbench.parts.titlebar")); + s.add(Ce(o, Oe.DBLCLICK, a => { + yn.stop(a); + this.S.handleTitleDoubleClick({ + targetWindowId: r + }); + })); + }, { + container: this.W.mainContainer, + disposables: this.B + })); + } + this.D(this.X.onDidChangeDirty(t => { + const s = t.isDirty(); + if (!s || !!(t.capabilities & 2) || !this.Y.hasShortAutoSaveDelay(t.resource)) { + this.vb(s ? true : undefined); + } + })); + this.vb(undefined); + this.D(de.any(de.map(de.filter(this.S.onDidMaximizeWindow, t => !!ij(t)), t => ({ + maximized: true, + windowId: t + })), de.map(de.filter(this.S.onDidUnmaximizeWindow, t => !!ij(t)), t => ({ + maximized: false, + windowId: t + })))(t => this.W.updateWindowMaximizedState(SI(t.windowId).window, t.maximized))); + this.W.updateWindowMaximizedState(xt, this.O.window.maximized ?? false); + this.D(this.W.onDidChangePanelPosition(t => this.xb(RSe(t)))); + this.xb(this.W.getPanelPosition()); + this.D(this.M.onBeforeShutdown(t => this.pb(t))); + this.D(this.M.onBeforeShutdownError(t => this.rb(t))); + this.D(this.M.onWillShutdown(t => this.sb(t))); + } + nb(e) { + const t = new Q(); + de.once(e.onWillDispose)(() => t.dispose()); + const s = this.u.getScopedInstantiationService(e).invokeFunction(n => n.get(Te)); + t.add(s.onDidActiveEditorChange(() => this.ob(s, e.windowId))); + } + ob(e, t) { + const s = vo.getOriginalUri(e.activeEditor, { + supportSideBySide: fo.PRIMARY, + filterByScheme: me.file + }); + this.S.setRepresentedFilename(s?.fsPath ?? "", { + targetWindowId: t + }); + if (t === xt.vscodeWindowId) { + this.zb(s?.fsPath); + } + } + pb({ + veto: e, + reason: t + }) { + if (t === 1) { + const s = this.w.getValue("window.confirmBeforeClose"); + const n = s === "always" || s === "keyboardOnly" && Y2.getInstance().isModifierPressed; + if (n) { + return e((async () => { + let r = t; + if (t === 1 && !Gt && (await this.S.getWindowCount()) === 1) { + r = 2; + } + let o = true; + if (n) { + o = await this.db.invokeFunction(a => BBi.confirmOnShutdown(a, r)); + } + if (o) { + this.qb(t); + } + return !o; + })(), "veto.confirmBeforeClose"); + } + } + this.qb(t); + } + qb(e) { + this.fb.withProgress({ + location: 10, + delay: 800, + title: this.tb(e, false) + }, () => de.toPromise(de.any(this.M.onWillShutdown, this.M.onShutdownVeto, this.ab.onWillShowDialog))); + } + rb({ + error: e, + reason: t + }) { + this.ab.error(this.tb(t, true), f(12477, null, ou(e))); + } + sb({ + reason: e, + force: t, + joiners: s + }) { + const n = new Vn(() => { + const r = s(); + this.fb.withProgress({ + location: 20, + buttons: [this.ub(e)], + cancellable: false, + sticky: true, + title: this.tb(e, false), + detail: r.length > 0 ? f(12478, null, r.map(o => `- ${o.label}`).join(` +`)) : undefined + }, () => de.toPromise(this.M.onDidShutdown), () => { + t(); + }); + }, 1200); + n.schedule(); + de.once(this.M.onDidShutdown)(() => n.dispose()); + } + tb(e, t) { + if (t) { + switch (e) { + case 1: + return f(12479, null); + case 2: + return f(12480, null); + case 3: + return f(12481, null); + case 4: + return f(12482, null); + } + } + switch (e) { + case 1: + return f(12483, null); + case 2: + return f(12484, null); + case 3: + return f(12485, null); + case 4: + return f(12486, null); + } + } + ub(e) { + switch (e) { + case 1: + return f(12487, null); + case 2: + return f(12488, null); + case 3: + return f(12489, null); + case 4: + return f(12490, null); + } + } + vb(e) { + let t; + if (typeof e == "boolean") { + t = e; + } else { + t = this.X.hasDirty; + } + if (!this.s && t || this.s && !t) { + this.s = t; + this.S.setDocumentEdited(t); + } + } + wb(e = this.W.getPanelPosition()) { + if (e === 0 || e === 1) { + return Iwt.WIDTH_WITH_VERTICAL_PANEL; + } else { + return Iwt.WIDTH; + } + } + xb(e) { + const t = this.wb(e); + this.S.setMinimumSize(t, undefined); + } + yb() { + if (this.w.getValue("window.closeWhenEmpty") || this.O.args.wait) { + for (const t of this.u.parts) { + if (!t.groups.some(s => !s.isEmpty) && (t !== this.u.mainPart || this.Q.getWorkbenchState() === 1 && !this.f.isExtensionDevelopment && !(this.t.visibleEditors.length > 0))) { + if (t === this.u.mainPart) { + this.S.closeWindow(); + } else { + t.removeGroup(t.activeGroup); + } + } + } + } + } + zb(e) { + this.n.clear(); + if (!e || IC(this.w)) { + return; + } + const t = e.split(ao.sep); + for (let s = t.length; s > 0; s--) { + const n = s === t.length; + let r = s; + if (!n) { + r++; + } + const o = V.file(t.slice(0, r).join(ao.sep)); + let a; + if (n) { + a = this.gb.getUriBasenameLabel(o); + } else { + a = this.gb.getUriBasenameLabel(Ir(o)); + } + const l = `workbench.action.revealPathInFinder${s}`; + this.n.add(ei.registerCommand(l, () => this.S.showItemInFolder(o.fsPath))); + this.n.add(Be.appendMenuItem(_.TitleBarTitleContext, { + command: { + id: l, + title: a || ao.sep + }, + order: -s, + group: "1_file" + })); + } + } + Ab() { + this.Eb(); + this.M.when(2).then(() => this.S.notifyReady()); + this.M.when(3).then(() => { + this.eb.notifyRestored(); + this.kb.notifyRestored(); + }); + this.Bb(); + this.Ib(); + if (this.f.enableSmokeTestDriver) { + this.Cb(); + } + this.S.onDidChangeCssModules(e => { + for (const [t, s] of Object.entries(e)) { + const n = xt.document.querySelector(`link[rel="stylesheet"][id="${t.replace(".css", "")}"]`); + if (n) { + const r = n; + const o = new URL(r.href); + o.searchParams.set("hash", s); + r.href = o.toString(); + } + } + }); + } + async Bb() { + await this.M.when(3); + (async () => { + const t = await this.S.isAdmin(); + const { + isPure: s + } = await this.N.isPure(); + this.y.updateProperties({ + isPure: s, + isAdmin: t + }); + if (t && !ln) { + this.C.warn(f(12491, null, this.Z.nameShort)); + } + })(); + if (this.f.isBuilt) { + let t; + if (Gt) { + t = Ir(Ir(Ir(V.file(this.O.appRoot)))); + } else { + t = Ir(Ir(V.file(this.O.appRoot))); + } + for (const s of this.Q.getWorkspace().folders) { + if (this.ib.extUri.isEqualOrParent(s.uri, t)) { + this.hb.show({ + id: "appRootWarning.banner", + message: f(12492, null, this.gb.getUriLabel(t)), + icon: A.warning + }); + break; + } + } + } + if (Gt) { + const t = this.O.os.release.split(".")[0]; + const s = new Map([["19", "macOS Catalina"]]); + if (s.has(t)) { + const n = f(12493, null, this.Z.nameLong, s.get(t)); + this.C.prompt(es.Warning, n, [{ + label: f(12494, null), + run: () => this.R.open(V.parse("https://aka.ms/vscode-faq-old-macOS")) + }], { + neverShowAgain: { + id: "macoseol", + isSecondary: true, + scope: hF.APPLICATION + }, + priority: Ru.URGENT, + sticky: true + }); + } + } + const e = mD.shellEnv(); + this.fb.withProgress({ + title: f(12495, null), + location: 10, + delay: 1600, + buttons: [f(12496, null)] + }, () => e, () => this.R.open("https://go.microsoft.com/fwlink/?linkid=2149667")); + } + Cb() { + const e = this; + let t = false; + RVo(this.db, { + async exitApplication() { + if (t) { + e.cb.info("[driver] not handling exitApplication() due to pending quit() call"); + return; + } + e.cb.info("[driver] handling exitApplication()"); + t = true; + return e.S.quit(); + } + }); + } + async Db(e, t) { + const s = this.f.remoteAuthority; + const n = s ? { + getAddress: async () => (await this.$.resolveAuthority(s)).authority + } : undefined; + const r = await this.U.getExistingTunnel(e, t); + if (!r || typeof r == "string") { + return this.U.openTunnel(n, e, t); + } else { + return r; + } + } + async resolveExternalUri(e, t) { + let s; + if (t?.allowTunneling) { + const n = Nkt(e); + const r = ieo(e); + if (r && (s = await this.Db(r.address, r.port), s && typeof s != "string")) { + if (s.tunnelRemotePort !== r.port) { + s.dispose(); + s = undefined; + } else if (!n) { + const o = s; + return { + resolved: e, + dispose: () => o.dispose() + }; + } + } + if (n) { + const o = await this.Db(n.address, n.port); + if (o && typeof o != "string") { + const a = V.parse(o.localAddress).with({ + path: e.path + }); + return { + resolved: a.scheme.startsWith(e.scheme) ? a : e.with({ + authority: o.localAddress + }), + dispose() { + o.dispose(); + if (s && typeof s != "string") { + s.dispose(); + } + } + }; + } + } + } + if (!t?.openExternal && (await this.J.canHandleResource(e))) { + return { + resolved: V.from({ + scheme: this.Z.urlProtocol, + path: "workspace", + query: e.toString() + }), + dispose() {} + }; + } + } + Eb() { + this.R.setDefaultExternalOpener({ + openExternal: async e => { + if (!(await this.S.openExternal(e, this.w.getValue("workbench.externalBrowser")))) { + const s = V.parse(e); + if (s.scheme === me.file) { + await this.S.showItemInFolder(s.fsPath); + } + } + return true; + } + }); + this.R.registerExternalUriResolver({ + resolveExternalUri: async (e, t) => this.resolveExternalUri(e, t) + }); + } + Ib() { + if (!Gt) { + return; + } + this.Gb.clear(); + this.Fb = undefined; + const e = this.Gb.add(new Vn(() => this.Jb(e), 300)); + e.schedule(); + } + Jb(e) { + if (!this.Fb) { + const l = this.t.activeEditorPane?.scopedContextKeyService || this.u.activeGroup.scopedContextKeyService; + this.Fb = this.L.createMenu(_.TouchBarContext, l); + this.Gb.add(this.Fb); + this.Gb.add(this.Fb.onDidChange(() => e.schedule())); + } + const t = this.w.getValue("keyboard.touchbar.enabled") === false; + const s = this.w.getValue("keyboard.touchbar.ignored"); + const n = Array.isArray(s) ? s : []; + const r = P1(this.Fb.getActions()); + const o = []; + let a = []; + if (!t) { + for (const l of r) { + if (l instanceof Ma) { + if (n.indexOf(l.item.id) >= 0) { + continue; + } + a.push(l.item); + } else if (l instanceof gr) { + if (a.length) { + o.push(a); + } + a = []; + } + } + if (a.length) { + o.push(a); + } + } + if (!Ul(this.Hb, o)) { + this.Hb = o; + this.S.updateTouchBar(o); + } + } + Kb(e) { + this.r.push(...e.foldersToAdd.map(t => V.revive(t))); + if (!this.q.isScheduled()) { + this.q.schedule(); + } + } + Lb() { + const e = []; + for (const t of this.r) { + e.push({ + uri: t + }); + } + this.r = []; + this.I.addFolders(e); + } + async Mb(e) { + const t = !!e.filesToDiff && e.filesToDiff.length === 2; + const s = !!e.filesToMerge && e.filesToMerge.length === 4; + const n = dr(await yft(s ? e.filesToMerge : t ? e.filesToDiff : e.filesToOpenOrCreate, this.J, this.cb)); + if (n.length) { + const r = await this.Ob(n, t, s); + if (e.filesToWait) { + if (r.length) { + return this.Nb(V.revive(e.filesToWait.waitMarkerFileUri), dr(e.filesToWait.paths.map(o => V.revive(o.fileUri)))); + } else { + return this.J.del(V.revive(e.filesToWait.waitMarkerFileUri)); + } + } + } + } + async Nb(e, t) { + await this.db.invokeFunction(s => cTr(s, t)); + await this.J.del(e); + } + async Ob(e, t, s) { + const n = []; + if (s && w1(e[0]) && w1(e[1]) && w1(e[2]) && w1(e[3])) { + const r = { + input1: { + resource: e[0].resource + }, + input2: { + resource: e[1].resource + }, + base: { + resource: e[2].resource + }, + result: { + resource: e[3].resource + }, + options: { + pinned: true + } + }; + n.push(r); + } else if (t && w1(e[0]) && w1(e[1])) { + const r = { + original: { + resource: e[0].resource + }, + modified: { + resource: e[1].resource + }, + options: { + pinned: true + } + }; + n.push(r); + } else { + n.push(...e); + } + return this.t.openEditors(n, undefined, { + validateTrust: true + }); + } + Rb() { + const e = this.w.getValue("window.zoomLevel"); + if (typeof e == "number") { + return e; + } else { + return 0; + } + } + Sb(e) { + this.Ub(e); + if (e === xt.vscodeWindowId) { + const t = qk(xt); + let s; + if (this.Qb !== t) { + s = t; + } + Td.invoke("vscode:notifyZoomLevel", s); + } + } + Tb(e) { + const t = new Q(); + de.once(e.onWillDispose)(() => t.dispose()); + const s = this.u.getScopedInstantiationService(e); + this.Pb.set(e.windowId, t.add(s.createInstance(UBi))); + t.add(Ue(() => this.Pb.delete(e.windowId))); + this.Ub(e.windowId); + } + Ub(e) { + const t = SI(e); + const s = this.Pb.get(e); + if (s && t) { + const n = qk(t.window); + let r; + if (n < this.Qb) { + r = "$(zoom-out)"; + } else if (n > this.Qb) { + r = "$(zoom-in)"; + } + s.updateZoomEntry(r ?? false, e); + } + } + Vb() { + this.Qb = this.Rb(); + let e = false; + for (const { + window: t + } of Jk()) { + if (qk(t) !== this.Qb) { + e = true; + break; + } + } + if (e) { + WQ(this.Qb, b2.ALL_WINDOWS); + } + for (const [t] of this.Pb) { + this.Ub(t); + } + } + dispose() { + super.dispose(); + for (const [, e] of this.Pb) { + e.dispose(); + } + } +}; +_$t = BBi = __decorate([__param(0, Te), __param(1, Hi), __param(2, ve), __param(3, Ale), __param(4, h0), __param(5, ni), __param(6, gt), __param(7, oi), __param(8, Ot), __param(9, LD), __param(10, Ct), __param(11, Hn), __param(12, Yo), __param(13, RBi), __param(14, gu), __param(15, na), __param(16, kt), __param(17, os), __param(18, po), __param(19, by), __param(20, lr), __param(21, Tp), __param(22, ld), __param(23, ys), __param(24, hv), __param(25, Js), __param(26, ht), __param(27, Bt), __param(28, re), __param(29, b3), __param(30, ra), __param(31, Zs), __param(32, L8), __param(33, _s), __param(34, fa), __param(35, vMn), __param(36, SMn), __param(37, kr)], _$t); +var UBi = class extends H { + constructor(e, t, s) { + super(); + this.c = e; + this.f = t; + this.g = s; + this.a = this.D(new ki()); + this.b = undefined; + } + updateZoomEntry(e, t) { + if (typeof e == "string") { + if (!this.a.value) { + this.h(e); + } + this.j(t); + } else { + this.a.clear(); + } + } + h(e) { + const t = new Q(); + this.a.value = t; + const s = document.createElement("div"); + s.classList.add("zoom-status"); + const n = document.createElement("div"); + n.classList.add("zoom-status-left"); + s.appendChild(n); + const r = t.add(new Yt("workbench.action.zoomOut", f(12497, null), le.asClassName(A.remove), true, () => this.f.executeCommand(r.id))); + const o = t.add(new Yt("workbench.action.zoomIn", f(12498, null), le.asClassName(A.plus), true, () => this.f.executeCommand(o.id))); + const a = t.add(new Yt("workbench.action.zoomReset", f(12499, null), undefined, true, () => this.f.executeCommand(a.id))); + a.tooltip = f(12500, null, a.label, this.g.lookupKeybinding(a.id)?.getLabel()); + const l = t.add(new Yt("workbench.action.openSettings", f(12501, null), le.asClassName(A.settingsGear), true, () => this.f.executeCommand(l.id, "window.zoom"))); + const c = t.add(new Yt("zoomLabel", undefined, undefined, false)); + this.b = c; + t.add(Ue(() => this.b = undefined)); + const u = t.add(new ea(n, { + hoverDelegate: Tpt + })); + u.push(r, { + icon: true, + label: false, + keybinding: this.g.lookupKeybinding(r.id)?.getLabel() + }); + u.push(this.b, { + icon: false, + label: true + }); + u.push(o, { + icon: true, + label: false, + keybinding: this.g.lookupKeybinding(o.id)?.getLabel() + }); + const d = document.createElement("div"); + d.classList.add("zoom-status-right"); + s.appendChild(d); + const h = t.add(new ea(d, { + hoverDelegate: Tpt + })); + h.push(a, { + icon: false, + label: true + }); + h.push(l, { + icon: true, + label: false, + keybinding: this.g.lookupKeybinding(l.id)?.getLabel() + }); + const g = f(12502, null); + t.add(this.c.addEntry({ + name: g, + text: e, + tooltip: s, + ariaLabel: g, + command: Gye, + kind: "prominent" + }, "status.windowZoom", 1, 102)); + } + j(e) { + if (this.b) { + const t = SI(e, true).window; + const s = Math.round(vI(t) * 100); + const n = qk(t); + this.b.label = `${n}`; + this.b.tooltip = f(12503, null, n, s); + } + } +}; +UBi = __decorate([__param(0, bu), __param(1, gt), __param(2, oi)], UBi); +hc(); +xe(); +Ut(); +Le(); +Le(); +pe(); +In(); +Jr(); +q(); +nt(); +Gb(); +ii(); +Jt(); +pe(); +q(); +In(); +Jr(); +zt(); +Le(); +Me(); +Qr(); +Ht(); +function iPe(i) { + if (Object.isFrozen(i)) { + return i; + } else { + return xjn(i); + } +} +var Pf = class lZ { + static createEmptyModel(e) { + return new lZ({}, [], [], undefined, e); + } + constructor(e, t, s, n, r) { + this.b = e; + this.c = t; + this.d = s; + this.raw = n; + this.f = r; + this.a = new Map(); + } + get rawConfiguration() { + if (!this.g) { + if (this.raw?.length) { + const e = this.raw.map(t => { + if (t instanceof lZ) { + return t; + } + const s = new v3("", this.f); + s.parseRaw(t); + return s.configurationModel; + }); + this.g = e.reduce((t, s) => s === t ? s : t.merge(s), e[0]); + } else { + this.g = this; + } + } + return this.g; + } + get contents() { + return this.b; + } + get overrides() { + return this.d; + } + get keys() { + return this.c; + } + isEmpty() { + return this.c.length === 0 && Object.keys(this.b).length === 0 && this.d.length === 0; + } + getValue(e) { + if (e) { + return wot(this.contents, e); + } else { + return this.contents; + } + } + inspect(e, t) { + const s = this; + return { + get value() { + return iPe(s.rawConfiguration.getValue(e)); + }, + get override() { + if (t) { + return iPe(s.rawConfiguration.getOverrideValue(e, t)); + } else { + return undefined; + } + }, + get merged() { + return iPe(t ? s.rawConfiguration.override(t).getValue(e) : s.rawConfiguration.getValue(e)); + }, + get overrides() { + const n = []; + for (const { + contents: r, + identifiers: o, + keys: a + } of s.rawConfiguration.overrides) { + const l = new lZ(r, a, [], undefined, s.f).getValue(e); + if (l !== undefined) { + n.push({ + identifiers: o, + value: l + }); + } + } + if (n.length) { + return iPe(n); + } else { + return undefined; + } + } + }; + } + getOverrideValue(e, t) { + const s = this.j(t); + if (s) { + if (e) { + return wot(s, e); + } else { + return s; + } + } else { + return undefined; + } + } + getKeysForOverrideIdentifier(e) { + const t = []; + for (const s of this.overrides) { + if (s.identifiers.includes(e)) { + t.push(...s.keys); + } + } + return Ea(t); + } + getAllOverrideIdentifiers() { + const e = []; + for (const t of this.overrides) { + e.push(...t.identifiers); + } + return Ea(e); + } + override(e) { + let t = this.a.get(e); + if (!t) { + t = this.h(e); + this.a.set(e, t); + } + return t; + } + merge(...e) { + const t = Gn(this.contents); + const s = Gn(this.overrides); + const n = [...this.keys]; + const r = this.raw?.length ? [...this.raw] : [this]; + for (const o of e) { + r.push(...(o.raw?.length ? o.raw : [o])); + if (!o.isEmpty()) { + this.i(t, o.contents); + for (const a of o.overrides) { + const [l] = s.filter(c => Go(c.identifiers, a.identifiers)); + if (l) { + this.i(l.contents, a.contents); + l.keys.push(...a.keys); + l.keys = Ea(l.keys); + } else { + s.push(Gn(a)); + } + } + for (const a of o.keys) { + if (n.indexOf(a) === -1) { + n.push(a); + } + } + } + } + return new lZ(t, n, s, r.every(o => o instanceof lZ) ? undefined : r, this.f); + } + h(e) { + const t = this.j(e); + if (!t || typeof t != "object" || !Object.keys(t).length) { + return this; + } + const s = {}; + for (const n of Ea([...Object.keys(this.contents), ...Object.keys(t)])) { + let r = this.contents[n]; + const o = t[n]; + if (o) { + if (typeof r == "object" && typeof o == "object") { + r = Gn(r); + this.i(r, o); + } else { + r = o; + } + } + s[n] = r; + } + return new lZ(s, this.keys, this.overrides, undefined, this.f); + } + i(e, t) { + for (const s of Object.keys(t)) { + if (s in e && xo(e[s]) && xo(t[s])) { + this.i(e[s], t[s]); + continue; + } + e[s] = Gn(t[s]); + } + } + j(e) { + let t = null; + let s = null; + const n = r => { + if (r) { + if (s) { + this.i(s, r); + } else { + s = Gn(r); + } + } + }; + for (const r of this.overrides) { + if (r.identifiers.length === 1 && r.identifiers[0] === e) { + t = r.contents; + } else if (r.identifiers.includes(e)) { + n(r.contents); + } + } + n(t); + return s; + } + toJSON() { + return { + contents: this.contents, + overrides: this.overrides, + keys: this.keys + }; + } + addValue(e, t) { + this.k(e, t, true); + } + setValue(e, t) { + this.k(e, t, false); + } + removeValue(e) { + const t = this.keys.indexOf(e); + if (t !== -1) { + this.keys.splice(t, 1); + ijn(this.contents, e); + if (Rw.test(e)) { + this.overrides.splice(this.overrides.findIndex(s => Go(s.identifiers, Aee(e))), 1); + } + } + } + k(e, t, s) { + pKi(this.contents, e, t, n => this.f.error(n)); + s = s || this.keys.indexOf(e) === -1; + if (s) { + this.keys.push(e); + } + if (Rw.test(e)) { + const n = Aee(e); + const r = { + identifiers: n, + keys: Object.keys(this.contents[e]), + contents: Tge(this.contents[e], a => this.f.error(a)) + }; + const o = this.overrides.findIndex(a => Go(a.identifiers, n)); + if (o !== -1) { + this.overrides[o] = r; + } else { + this.overrides.push(r); + } + } + } +}; +var v3 = class { + constructor(i, e) { + this.f = i; + this.g = e; + this.a = null; + this.b = null; + this.c = []; + this.d = []; + } + get configurationModel() { + return this.b || Pf.createEmptyModel(this.g); + } + get restrictedConfigurations() { + return this.c; + } + get errors() { + return this.d; + } + parse(i, e) { + if (!Ga(i)) { + const t = this.h(i); + this.parseRaw(t, e); + } + } + reparse(i) { + if (this.a) { + this.parseRaw(this.a, i); + } + } + parseRaw(i, e) { + this.a = i; + const { + contents: t, + keys: s, + overrides: n, + restricted: r, + hasExcludedProperties: o + } = this.i(i, e); + this.b = new Pf(t, s, n, o ? [i] : undefined, this.g); + this.c = r || []; + } + h(i) { + let e = {}; + let t = null; + let s = []; + const n = []; + const r = []; + function o(l) { + if (Array.isArray(s)) { + s.push(l); + } else if (t !== null) { + s[t] = l; + } + } + const a = { + onObjectBegin: () => { + const l = {}; + o(l); + n.push(s); + s = l; + t = null; + }, + onObjectProperty: l => { + t = l; + }, + onObjectEnd: () => { + s = n.pop(); + }, + onArrayBegin: () => { + const l = []; + o(l); + n.push(s); + s = l; + t = null; + }, + onArrayEnd: () => { + s = n.pop(); + }, + onLiteralValue: o, + onError: (l, c, u) => { + r.push({ + error: l, + offset: c, + length: u + }); + } + }; + if (i) { + try { + tW(i, a); + e = s[0] || {}; + } catch (l) { + this.g.error(`Error while parsing settings file ${this.f}: ${l}`); + this.d = [l]; + } + } + return e; + } + i(i, e) { + const t = Pe.as(rr.Configuration).getConfigurationProperties(); + const s = this.j(i, t, true, e); + i = s.raw; + const n = Tge(i, a => this.g.error(`Conflict in settings file ${this.f}: ${a}`)); + const r = Object.keys(i); + const o = this.m(i, a => this.g.error(`Conflict in settings file ${this.f}: ${a}`)); + return { + contents: n, + keys: r, + overrides: o, + restricted: s.restricted, + hasExcludedProperties: s.hasExcludedProperties + }; + } + j(i, e, t, s) { + let n = false; + if (!s?.scopes && !s?.skipRestricted && !s?.exclude?.length) { + return { + raw: i, + restricted: [], + hasExcludedProperties: n + }; + } + const r = {}; + const o = []; + for (const a in i) { + if (Rw.test(a) && t) { + const l = this.j(i[a], e, false, s); + r[a] = l.raw; + n = n || l.hasExcludedProperties; + o.push(...l.restricted); + } else { + const l = e[a]; + if (l?.restricted) { + o.push(a); + } + if (this.l(a, l, s)) { + r[a] = i[a]; + } else { + n = true; + } + } + } + return { + raw: r, + restricted: o, + hasExcludedProperties: n + }; + } + l(i, e, t) { + if (t.exclude?.includes(i)) { + return false; + } + if (t.include?.includes(i)) { + return true; + } + if (t.skipRestricted && e?.restricted || t.skipUnregistered && !e) { + return false; + } + const s = e ? typeof e.scope !== "undefined" ? e.scope : 3 : undefined; + if (s === undefined || t.scopes === undefined) { + return true; + } else { + return t.scopes.includes(s); + } + } + m(i, e) { + const t = []; + for (const s of Object.keys(i)) { + if (Rw.test(s)) { + const n = {}; + for (const r in i[s]) { + n[r] = i[s][r]; + } + t.push({ + identifiers: Aee(s), + keys: Object.keys(n), + contents: Tge(n, e) + }); + } + } + return t; + } +}; +var xMn = class extends H { + constructor(i, e, t, s, n) { + super(); + this.c = i; + this.f = e; + this.g = s; + this.h = n; + this.b = this.D(new B()); + this.onDidChange = this.b.event; + this.a = new v3(this.c.toString(), n); + this.D(this.g.watch(t.dirname(this.c))); + this.D(this.g.watch(this.c)); + this.D(de.any(de.filter(this.g.onDidFilesChange, r => r.contains(this.c)), de.filter(this.g.onDidRunOperation, r => (r.isOperation(0) || r.isOperation(3) || r.isOperation(1) || r.isOperation(4)) && t.isEqual(r.resource, i)))(() => this.b.fire())); + } + async loadConfiguration() { + try { + const i = await this.g.readFile(this.c); + this.a.parse(i.value.toString() || "{}", this.f); + return this.a.configurationModel; + } catch { + return Pf.createEmptyModel(this.h); + } + } + reparse(i) { + if (i) { + this.f = i; + } + this.a.reparse(this.f); + return this.a.configurationModel; + } + getRestrictedSettings() { + return this.a.restrictedConfigurations; + } +}; +var NVo = class { + constructor(i, e, t, s, n, r, o, a, l, c, u, d, h) { + this.a = i; + this.b = e; + this.c = t; + this.overrideIdentifiers = s; + this.d = n; + this.f = r; + this.g = o; + this.h = a; + this.i = l; + this.j = c; + this.k = u; + this.l = d; + this.m = h; + } + get value() { + return iPe(this.c); + } + n(i) { + if (i?.value !== undefined || i?.override !== undefined || i?.overrides !== undefined) { + return i; + } else { + return undefined; + } + } + get q() { + this.p ||= this.d.inspect(this.a, this.b.overrideIdentifier); + return this.p; + } + get defaultValue() { + return this.q.merged; + } + get default() { + return this.n(this.q); + } + get s() { + if (this.r === undefined) { + this.r = this.f ? this.f.inspect(this.a) : null; + } + return this.r; + } + get policyValue() { + return this.s?.merged; + } + get policy() { + if (this.s?.value !== undefined) { + return { + value: this.s.value + }; + } else { + return undefined; + } + } + get u() { + if (this.t === undefined) { + this.t = this.g ? this.g.inspect(this.a) : null; + } + return this.t; + } + get applicationValue() { + return this.u?.merged; + } + get application() { + return this.n(this.u); + } + get w() { + this.v ||= this.h.inspect(this.a, this.b.overrideIdentifier); + return this.v; + } + get userValue() { + return this.w.merged; + } + get user() { + return this.n(this.w); + } + get y() { + this.x ||= this.i.inspect(this.a, this.b.overrideIdentifier); + return this.x; + } + get userLocalValue() { + return this.y.merged; + } + get userLocal() { + return this.n(this.y); + } + get A() { + this.z ||= this.j.inspect(this.a, this.b.overrideIdentifier); + return this.z; + } + get userRemoteValue() { + return this.A.merged; + } + get userRemote() { + return this.n(this.A); + } + get D() { + if (this.B === undefined) { + this.B = this.k ? this.k.inspect(this.a, this.b.overrideIdentifier) : null; + } + return this.B; + } + get workspaceValue() { + return this.D?.merged; + } + get workspace() { + return this.n(this.D); + } + get F() { + if (this.E === undefined) { + this.E = this.l ? this.l.inspect(this.a, this.b.overrideIdentifier) : null; + } + return this.E; + } + get workspaceFolderValue() { + return this.F?.merged; + } + get workspaceFolder() { + return this.n(this.F); + } + get H() { + if (this.G === undefined) { + this.G = this.m.inspect(this.a, this.b.overrideIdentifier); + } + return this.G; + } + get memoryValue() { + return this.H.merged; + } + get memory() { + return this.n(this.H); + } +}; +var kMn = class s3n { + constructor(e, t, s, n, r, o, a, l, c, u) { + this.j = e; + this.l = t; + this.m = s; + this.n = n; + this.p = r; + this.q = o; + this.r = a; + this.s = l; + this.t = c; + this.u = u; + this.h = null; + this.i = new dn(); + this.v = null; + } + getValue(e, t, s) { + return this.w(e, t, s).getValue(e); + } + updateValue(e, t, s = {}) { + let n; + if (s.resource) { + n = this.t.get(s.resource); + if (!n) { + n = Pf.createEmptyModel(this.u); + this.t.set(s.resource, n); + } + } else { + n = this.s; + } + if (t === undefined) { + n.removeValue(e); + } else { + n.setValue(e, t); + } + if (!s.resource) { + this.h = null; + } + } + inspect(e, t, s) { + const n = this.w(e, t, s); + const r = this.A(t.resource, s); + const o = t.resource ? this.t.get(t.resource) || this.s : this.s; + const a = new Set(); + for (const l of n.overrides) { + for (const c of l.identifiers) { + if (n.getOverrideValue(e, c) !== undefined) { + a.add(c); + } + } + } + return new NVo(e, t, n.getValue(e), a.size ? [...a] : undefined, this.j, this.l.isEmpty() ? undefined : this.l, this.applicationConfiguration.isEmpty() ? undefined : this.applicationConfiguration, this.userConfiguration, this.localUserConfiguration, this.remoteUserConfiguration, s ? this.q : undefined, r || undefined, o); + } + keys(e) { + const t = this.A(undefined, e); + return { + default: this.j.keys.slice(0), + user: this.userConfiguration.keys.slice(0), + workspace: this.q.keys.slice(0), + workspaceFolder: t ? t.keys.slice(0) : [] + }; + } + updateDefaultConfiguration(e) { + this.j = e; + this.h = null; + this.i.clear(); + } + updatePolicyConfiguration(e) { + this.l = e; + } + updateApplicationConfiguration(e) { + this.m = e; + this.h = null; + this.i.clear(); + } + updateLocalUserConfiguration(e) { + this.n = e; + this.v = null; + this.h = null; + this.i.clear(); + } + updateRemoteUserConfiguration(e) { + this.p = e; + this.v = null; + this.h = null; + this.i.clear(); + } + updateWorkspaceConfiguration(e) { + this.q = e; + this.h = null; + this.i.clear(); + } + updateFolderConfiguration(e, t) { + this.r.set(e, t); + this.i.delete(e); + } + deleteFolderConfiguration(e) { + this.folderConfigurations.delete(e); + this.i.delete(e); + } + compareAndUpdateDefaultConfiguration(e, t) { + const s = []; + if (!t) { + const { + added: n, + updated: r, + removed: o + } = KH(this.j, e); + t = [...n, ...r, ...o]; + } + for (const n of t) { + for (const r of Aee(n)) { + const o = this.j.getKeysForOverrideIdentifier(r); + const a = e.getKeysForOverrideIdentifier(r); + const l = [...a.filter(c => o.indexOf(c) === -1), ...o.filter(c => a.indexOf(c) === -1), ...o.filter(c => !Ul(this.j.override(r).getValue(c), e.override(r).getValue(c)))]; + s.push([r, l]); + } + } + this.updateDefaultConfiguration(e); + return { + keys: t, + overrides: s + }; + } + compareAndUpdatePolicyConfiguration(e) { + const { + added: t, + updated: s, + removed: n + } = KH(this.l, e); + const r = [...t, ...s, ...n]; + if (r.length) { + this.updatePolicyConfiguration(e); + } + return { + keys: r, + overrides: [] + }; + } + compareAndUpdateApplicationConfiguration(e) { + const { + added: t, + updated: s, + removed: n, + overrides: r + } = KH(this.applicationConfiguration, e); + const o = [...t, ...s, ...n]; + if (o.length) { + this.updateApplicationConfiguration(e); + } + return { + keys: o, + overrides: r + }; + } + compareAndUpdateLocalUserConfiguration(e) { + const { + added: t, + updated: s, + removed: n, + overrides: r + } = KH(this.localUserConfiguration, e); + const o = [...t, ...s, ...n]; + if (o.length) { + this.updateLocalUserConfiguration(e); + } + return { + keys: o, + overrides: r + }; + } + compareAndUpdateRemoteUserConfiguration(e) { + const { + added: t, + updated: s, + removed: n, + overrides: r + } = KH(this.remoteUserConfiguration, e); + const o = [...t, ...s, ...n]; + if (o.length) { + this.updateRemoteUserConfiguration(e); + } + return { + keys: o, + overrides: r + }; + } + compareAndUpdateWorkspaceConfiguration(e) { + const { + added: t, + updated: s, + removed: n, + overrides: r + } = KH(this.workspaceConfiguration, e); + const o = [...t, ...s, ...n]; + if (o.length) { + this.updateWorkspaceConfiguration(e); + } + return { + keys: o, + overrides: r + }; + } + compareAndUpdateFolderConfiguration(e, t) { + const s = this.folderConfigurations.get(e); + const { + added: n, + updated: r, + removed: o, + overrides: a + } = KH(s, t); + const l = [...n, ...r, ...o]; + if (l.length || !s) { + this.updateFolderConfiguration(e, t); + } + return { + keys: l, + overrides: a + }; + } + compareAndDeleteFolderConfiguration(e) { + const t = this.folderConfigurations.get(e); + if (!t) { + throw new Error("Unknown folder"); + } + this.deleteFolderConfiguration(e); + const { + added: s, + updated: n, + removed: r, + overrides: o + } = KH(t, undefined); + return { + keys: [...s, ...n, ...r], + overrides: o + }; + } + get defaults() { + return this.j; + } + get applicationConfiguration() { + return this.m; + } + get userConfiguration() { + this.v ||= this.p.isEmpty() ? this.n : this.n.merge(this.p); + return this.v; + } + get localUserConfiguration() { + return this.n; + } + get remoteUserConfiguration() { + return this.p; + } + get workspaceConfiguration() { + return this.q; + } + get folderConfigurations() { + return this.r; + } + w(e, t, s) { + let n = this.x(t, s); + if (t.overrideIdentifier) { + n = n.override(t.overrideIdentifier); + } + if (!this.l.isEmpty() && this.l.getValue(e) !== undefined) { + n = n.merge(this.l); + } + return n; + } + x({ + resource: e + }, t) { + let s = this.y(); + if (t && e) { + const n = t.getFolder(e); + if (n) { + s = this.z(n.uri) || s; + } + const r = this.t.get(e); + if (r) { + s = s.merge(r); + } + } + return s; + } + y() { + this.h ||= this.j.merge(this.applicationConfiguration, this.userConfiguration, this.q, this.s); + return this.h; + } + z(e) { + let t = this.i.get(e); + if (!t) { + const s = this.y(); + const n = this.r.get(e); + if (n) { + t = s.merge(n); + this.i.set(e, t); + } else { + t = s; + } + } + return t; + } + A(e, t) { + if (t && e) { + const s = t.getFolder(e); + if (s) { + return this.r.get(s.uri); + } + } + } + toData() { + return { + defaults: { + contents: this.j.contents, + overrides: this.j.overrides, + keys: this.j.keys + }, + policy: { + contents: this.l.contents, + overrides: this.l.overrides, + keys: this.l.keys + }, + application: { + contents: this.applicationConfiguration.contents, + overrides: this.applicationConfiguration.overrides, + keys: this.applicationConfiguration.keys + }, + user: { + contents: this.userConfiguration.contents, + overrides: this.userConfiguration.overrides, + keys: this.userConfiguration.keys + }, + workspace: { + contents: this.q.contents, + overrides: this.q.overrides, + keys: this.q.keys + }, + folders: [...this.r.keys()].reduce((e, t) => { + const { + contents: s, + overrides: n, + keys: r + } = this.r.get(t); + e.push([t, { + contents: s, + overrides: n, + keys: r + }]); + return e; + }, []) + }; + } + allKeys() { + const e = new Set(); + this.j.keys.forEach(t => e.add(t)); + this.userConfiguration.keys.forEach(t => e.add(t)); + this.q.keys.forEach(t => e.add(t)); + this.r.forEach(t => t.keys.forEach(s => e.add(s))); + return [...e.values()]; + } + B() { + const e = new Set(); + this.j.getAllOverrideIdentifiers().forEach(t => e.add(t)); + this.userConfiguration.getAllOverrideIdentifiers().forEach(t => e.add(t)); + this.q.getAllOverrideIdentifiers().forEach(t => e.add(t)); + this.r.forEach(t => t.getAllOverrideIdentifiers().forEach(s => e.add(s))); + return [...e.values()]; + } + D(e) { + const t = new Set(); + this.j.getKeysForOverrideIdentifier(e).forEach(s => t.add(s)); + this.userConfiguration.getKeysForOverrideIdentifier(e).forEach(s => t.add(s)); + this.q.getKeysForOverrideIdentifier(e).forEach(s => t.add(s)); + this.r.forEach(s => s.getKeysForOverrideIdentifier(e).forEach(n => t.add(n))); + return [...t.values()]; + } + static parse(e, t) { + const s = this.E(e.defaults, t); + const n = this.E(e.policy, t); + const r = this.E(e.application, t); + const o = this.E(e.user, t); + const a = this.E(e.workspace, t); + const l = e.folders.reduce((c, u) => { + c.set(V.revive(u[0]), this.E(u[1], t)); + return c; + }, new dn()); + return new s3n(s, n, r, o, Pf.createEmptyModel(t), a, l, Pf.createEmptyModel(t), new dn(), t); + } + static E(e, t) { + return new Pf(e.contents, e.keys, e.overrides, undefined, t); + } +}; +function EMn(...i) { + if (i.length === 0) { + return { + keys: [], + overrides: [] + }; + } + if (i.length === 1) { + return i[0]; + } + const e = new Set(); + const t = new Map(); + for (const n of i) { + n.keys.forEach(r => e.add(r)); + n.overrides.forEach(([r, o]) => { + const a = Lq(t, r, new Set()); + o.forEach(l => a.add(l)); + }); + } + const s = []; + t.forEach((n, r) => s.push([r, [...n.values()]])); + return { + keys: [...e.values()], + overrides: s + }; +} +var MVo = class { + constructor(i, e, t, s, n) { + this.change = i; + this.f = e; + this.g = t; + this.h = s; + this.i = n; + this.a = ` +`; + this.b = this.a.charCodeAt(0); + this.c = 46; + this.affectedKeys = new Set(); + this.j = undefined; + for (const r of i.keys) { + this.affectedKeys.add(r); + } + for (const [, r] of i.overrides) { + for (const o of r) { + this.affectedKeys.add(o); + } + } + this.d = this.a; + for (const r of this.affectedKeys) { + this.d += r + this.a; + } + } + get previousConfiguration() { + if (!this.j && this.f) { + this.j = kMn.parse(this.f.data, this.i); + } + return this.j; + } + affectsConfiguration(i, e) { + const t = this.a + i; + const s = this.d.indexOf(t); + if (s < 0) { + return false; + } + const n = s + t.length; + if (n >= this.d.length) { + return false; + } + const r = this.d.charCodeAt(n); + if (r !== this.b && r !== this.c) { + return false; + } + if (e) { + const o = this.previousConfiguration ? this.previousConfiguration.getValue(i, e, this.f?.workspace) : undefined; + const a = this.g.getValue(i, e, this.h); + return !Ul(o, a); + } + return true; + } +}; +function KH(i, e) { + const { + added: t, + removed: s, + updated: n + } = IMn(e?.rawConfiguration, i?.rawConfiguration); + const r = []; + const o = i?.getAllOverrideIdentifiers() || []; + const a = e?.getAllOverrideIdentifiers() || []; + if (e) { + const l = a.filter(c => !o.includes(c)); + for (const c of l) { + r.push([c, e.getKeysForOverrideIdentifier(c)]); + } + } + if (i) { + const l = o.filter(c => !a.includes(c)); + for (const c of l) { + r.push([c, i.getKeysForOverrideIdentifier(c)]); + } + } + if (e && i) { + for (const l of o) { + if (a.includes(l)) { + const c = IMn({ + contents: i.getOverrideValue(undefined, l) || {}, + keys: i.getKeysForOverrideIdentifier(l) + }, { + contents: e.getOverrideValue(undefined, l) || {}, + keys: e.getKeysForOverrideIdentifier(l) + }); + r.push([l, [...c.added, ...c.removed, ...c.updated]]); + } + } + } + return { + added: t, + removed: s, + updated: n, + overrides: r + }; +} +function IMn(i, e) { + const t = i ? e ? i.keys.filter(r => e.keys.indexOf(r) === -1) : [...i.keys] : []; + const s = e ? i ? e.keys.filter(r => i.keys.indexOf(r) === -1) : [...e.keys] : []; + const n = []; + if (i && e) { + for (const r of e.keys) { + if (i.keys.indexOf(r) !== -1) { + const o = wot(e.contents, r); + const a = wot(i.contents, r); + if (!Ul(o, a)) { + n.push(r); + } + } + } + } + return { + added: t, + removed: s, + updated: n + }; +} +Me(); +Jt(); +pe(); +q(); +Jr(); +zt(); +Qr(); +Zt(); +pe(); +sa(); +q(); +te(); +var DMn = Ve("policy"); +var AVo = class extends H { + constructor() { + super(...arguments); + this.f = {}; + this.g = new Map(); + this.h = this.D(new B()); + this.onDidChange = this.h.event; + } + async updatePolicyDefinitions(i) { + const e = Object.keys(this.f).length; + this.f = { + ...i, + ...this.f + }; + if (e !== Object.keys(this.f).length) { + await this.j(i); + } + return Ws.reduce(this.g.entries(), (t, [s, n]) => ({ + ...t, + [s]: n + }), {}); + } + getPolicyValue(i) { + return this.g.get(i); + } + serialize() { + return Ws.reduce(Object.entries(this.f), (i, [e, t]) => ({ + ...i, + [e]: { + definition: t, + value: this.g.get(e) + } + }), {}); + } +}; +var TMn = class { + constructor() { + this.onDidChange = de.None; + } + async updatePolicyDefinitions() { + return {}; + } + getPolicyValue() {} + serialize() {} +}; +Ht(); +Ut(); +var $Vo = class extends H { + get configurationModel() { + return this.b; + } + constructor(i) { + super(); + this.c = i; + this.a = this.D(new B()); + this.onDidChangeConfiguration = this.a.event; + this.b = Pf.createEmptyModel(this.c); + } + async initialize() { + this.h(); + this.D(Pe.as(rr.Configuration).onDidUpdateConfiguration(({ + properties: i, + defaultsOverrides: e + }) => this.f(Array.from(i), e))); + return this.configurationModel; + } + reload() { + this.h(); + return this.configurationModel; + } + f(i, e) { + this.j(i, Pe.as(rr.Configuration).getConfigurationProperties()); + this.a.fire({ + defaults: this.configurationModel, + properties: i + }); + } + g() { + return {}; + } + h() { + this.b = Pf.createEmptyModel(this.c); + const i = Pe.as(rr.Configuration).getConfigurationProperties(); + this.j(Object.keys(i), i); + } + j(i, e) { + const t = this.g(); + for (const s of i) { + const n = t[s]; + const r = e[s]; + if (n !== undefined) { + this.b.setValue(s, n); + } else if (r) { + this.b.setValue(s, r.default); + } else { + this.b.removeValue(s); + } + } + } +}; +var FVo = class { + constructor() { + this.onDidChangeConfiguration = de.None; + this.configurationModel = Pf.createEmptyModel(new TGi()); + } + async initialize() { + return this.configurationModel; + } +}; +var WBi = class extends H { + get configurationModel() { + return this.b; + } + constructor(e, t, s) { + super(); + this.c = e; + this.f = t; + this.g = s; + this.a = this.D(new B()); + this.onDidChangeConfiguration = this.a.event; + this.b = Pf.createEmptyModel(this.g); + } + async initialize() { + this.g.trace("PolicyConfiguration#initialize"); + this.m(await this.h(this.c.configurationModel.keys), false); + this.D(this.f.onDidChange(e => this.j(e))); + this.D(this.c.onDidChangeConfiguration(async ({ + properties: e + }) => this.m(await this.h(e), true))); + return this.b; + } + async h(e) { + this.g.trace("PolicyConfiguration#updatePolicyDefinitions", e); + const t = {}; + const s = []; + const n = Pe.as(rr.Configuration).getConfigurationProperties(); + for (const r of e) { + const o = n[r]; + if (!o) { + s.push(r); + continue; + } + if (o.policy) { + if (o.type !== "string" && o.type !== "number" && o.type !== "array" && o.type !== "object") { + this.g.warn(`Policy ${o.policy.name} has unsupported type ${o.type}`); + continue; + } + s.push(r); + t[o.policy.name] = { + type: o.type === "number" ? "number" : "string" + }; + } + } + if (!RL(t)) { + await this.f.updatePolicyDefinitions(t); + } + return s; + } + j(e) { + this.g.trace("PolicyConfiguration#onDidChangePolicies", e); + const t = Pe.as(rr.Configuration).getPolicyConfigurations(); + const s = dr(e.map(n => t.get(n))); + this.m(s, true); + } + m(e, t) { + this.g.trace("PolicyConfiguration#update", e); + const s = Pe.as(rr.Configuration).getConfigurationProperties(); + const n = []; + const r = this.b.isEmpty(); + for (const o of e) { + const a = s[o]; + const l = a?.policy?.name; + if (l) { + let c = this.f.getPolicyValue(l); + if (yi(c) && a.type !== "string") { + try { + c = this.n(c); + } catch (u) { + this.g.error(`Error parsing policy value ${l}:`, cc(u)); + continue; + } + } + if (r ? c !== undefined : !Ul(this.b.getValue(o), c)) { + n.push([o, c]); + } + } else if (this.b.getValue(o) !== undefined) { + n.push([o, undefined]); + } + } + if (n.length) { + this.g.trace("PolicyConfiguration#changed", n); + const o = this.b; + this.b = Pf.createEmptyModel(this.g); + for (const a of o.keys) { + this.b.setValue(a, o.getValue(a)); + } + for (const [a, l] of n) { + if (l === undefined) { + this.b.removeValue(a); + } else { + this.b.setValue(a, l); + } + } + if (t) { + this.a.fire(this.b); + } + } + } + n(e) { + let t = {}; + let s = null; + let n = []; + const r = []; + const o = []; + function a(c) { + if (Array.isArray(n)) { + n.push(c); + } else if (s !== null) { + if (n[s] !== undefined) { + throw new Error(`Duplicate property found: ${s}`); + } + n[s] = c; + } + } + if (e) { + tW(e, { + onObjectBegin: () => { + const c = {}; + a(c); + r.push(n); + n = c; + s = null; + }, + onObjectProperty: c => { + s = c; + }, + onObjectEnd: () => { + n = r.pop(); + }, + onArrayBegin: () => { + const c = []; + a(c); + r.push(n); + n = c; + s = null; + }, + onArrayEnd: () => { + n = r.pop(); + }, + onLiteralValue: a, + onError: (c, u, d) => { + o.push({ + error: c, + offset: u, + length: d + }); + } + }); + t = n[0] || {}; + } + if (o.length > 0) { + throw new Error(o.map(c => cc(c.error)).join(` +`)); + } + return t; + } +}; +WBi = __decorate([__param(1, DMn), __param(2, Bt)], WBi); +Jr(); +Me(); +zt(); +Jt(); +var B$t = class extends v3 { + constructor(i, e) { + super(i, e); + this.n = []; + this.p = false; + this.q = new v3(i, e); + this.r = Pf.createEmptyModel(e); + this.s = Pf.createEmptyModel(e); + } + get folders() { + return this.n; + } + get transient() { + return this.p; + } + get settingsModel() { + return this.q.configurationModel; + } + get launchModel() { + return this.r; + } + get tasksModel() { + return this.s; + } + reparseWorkspaceSettings(i) { + this.q.reparse(i); + } + getRestrictedWorkspaceSettings() { + return this.q.restrictedConfigurations; + } + i(i, e) { + this.n = i.folders || []; + this.p = df(i.transient) && i.transient; + this.q.parseRaw(i.settings, e); + this.r = this.u(i, "launch"); + this.s = this.u(i, "tasks"); + return super.i(i, e); + } + u(i, e) { + const t = i[e]; + if (t) { + const s = Tge(t, o => console.error(`Conflict in settings file ${this.f}: ${o}`)); + const n = Object.create(null); + n[e] = s; + const r = Object.keys(t).map(o => `${e}.${o}`); + return new Pf(n, r, [], undefined, this.g); + } + return Pf.createEmptyModel(this.g); + } +}; +var PMn = class extends v3 { + constructor(i, e, t) { + super(i, t); + this.n = e; + } + i(i, e) { + const t = Tge(i, r => console.error(`Conflict in settings file ${this.f}: ${r}`)); + const s = Object.create(null); + s[this.n] = t; + const n = Object.keys(i).map(r => `${this.n}.${r}`); + return { + contents: s, + keys: n, + overrides: [] + }; + } +}; +var LMn = class extends kMn { + constructor(i, e, t, s, n, r, o, a, l, c, u) { + super(i, e, t, s, n, r, o, a, l, u); + this.a = c; + } + getValue(i, e = {}) { + return super.getValue(i, e, this.a); + } + inspect(i, e = {}) { + return super.inspect(i, e, this.a); + } + keys() { + return super.keys(this.a); + } + compareAndDeleteFolderConfiguration(i) { + if (this.a && this.a.folders.length > 0 && this.a.folders[0].uri.toString() === i.toString()) { + return { + keys: [], + overrides: [] + }; + } else { + return super.compareAndDeleteFolderConfiguration(i); + } + } + compare(i) { + const e = (r, o, a) => { + const l = []; + l.push(...o.filter(c => r.indexOf(c) === -1)); + l.push(...r.filter(c => o.indexOf(c) === -1)); + l.push(...r.filter(c => o.indexOf(c) === -1 ? false : Ul(this.getValue(c, { + overrideIdentifier: a + }), i.getValue(c, { + overrideIdentifier: a + })) ? this.a && this.a.folders.some(u => !Ul(this.getValue(c, { + resource: u.uri, + overrideIdentifier: a + }), i.getValue(c, { + resource: u.uri, + overrideIdentifier: a + }))) : true)); + return l; + }; + const t = e(this.allKeys(), i.allKeys()); + const s = []; + const n = Ea([...this.B(), ...i.B()]); + for (const r of n) { + const o = e(this.D(r), i.D(r), r); + if (o.length) { + s.push([r, o]); + } + } + return { + keys: t, + overrides: s + }; + } +}; +Ht(); +Qr(); +X(); +nt(); +Ht(); +ii(); +Nt(); +Ms(); +Qr(); +vt(); +Wi(); +Un(); +yt(); +ef(); +ua(); +mu(); +Ut(); +var RMn; +(function (i) { + i[i.ERROR_UNKNOWN_KEY = 0] = "ERROR_UNKNOWN_KEY"; + i[i.ERROR_INVALID_WORKSPACE_CONFIGURATION_APPLICATION = 1] = "ERROR_INVALID_WORKSPACE_CONFIGURATION_APPLICATION"; + i[i.ERROR_INVALID_WORKSPACE_CONFIGURATION_MACHINE = 2] = "ERROR_INVALID_WORKSPACE_CONFIGURATION_MACHINE"; + i[i.ERROR_INVALID_FOLDER_CONFIGURATION = 3] = "ERROR_INVALID_FOLDER_CONFIGURATION"; + i[i.ERROR_INVALID_USER_TARGET = 4] = "ERROR_INVALID_USER_TARGET"; + i[i.ERROR_INVALID_WORKSPACE_TARGET = 5] = "ERROR_INVALID_WORKSPACE_TARGET"; + i[i.ERROR_INVALID_FOLDER_TARGET = 6] = "ERROR_INVALID_FOLDER_TARGET"; + i[i.ERROR_INVALID_RESOURCE_LANGUAGE_CONFIGURATION = 7] = "ERROR_INVALID_RESOURCE_LANGUAGE_CONFIGURATION"; + i[i.ERROR_NO_WORKSPACE_OPENED = 8] = "ERROR_NO_WORKSPACE_OPENED"; + i[i.ERROR_CONFIGURATION_FILE_DIRTY = 9] = "ERROR_CONFIGURATION_FILE_DIRTY"; + i[i.ERROR_CONFIGURATION_FILE_MODIFIED_SINCE = 10] = "ERROR_CONFIGURATION_FILE_MODIFIED_SINCE"; + i[i.ERROR_INVALID_CONFIGURATION = 11] = "ERROR_INVALID_CONFIGURATION"; + i[i.ERROR_POLICY_CONFIGURATION = 12] = "ERROR_POLICY_CONFIGURATION"; + i[i.ERROR_INTERNAL = 13] = "ERROR_INTERNAL"; +})(RMn ||= {}); +var NMn = class extends uf { + constructor(i, e) { + super(i); + this.code = e; + } +}; +var MMn; +(function (i) { + i[i.USER_LOCAL = 1] = "USER_LOCAL"; + i[i.USER_REMOTE = 2] = "USER_REMOTE"; + i[i.WORKSPACE = 3] = "WORKSPACE"; + i[i.WORKSPACE_FOLDER = 4] = "WORKSPACE_FOLDER"; +})(MMn ||= {}); +var VBi = class { + constructor(e, t, s, n, r, o, a, l, c, u, d, h) { + this.b = e; + this.c = t; + this.d = s; + this.e = n; + this.f = r; + this.g = o; + this.h = a; + this.i = l; + this.j = c; + this.k = u; + this.l = d; + this.m = h; + this.a = new wT(); + } + async writeConfiguration(e, t, s = {}) { + const n = this.F(e, t, s.scopes || {}); + return this.a.queue(async () => { + try { + await this.n(n, s); + } catch (r) { + if (s.donotNotifyError) { + throw r; + } + await this.t(r, n, s.scopes); + } + }); + } + async n(e, t) { + await this.E(e.target, e, !t.handleDirtyFile, t.scopes || {}); + const s = e.resource; + const n = await this.C(s); + try { + const r = this.s(n.object.textEditorModel); + await this.o(e, n.object.textEditorModel, r, t); + } finally { + n.dispose(); + } + } + async o(e, t, s, n) { + if (this.D(t.getValue(), e)) { + throw this.y(11, e.target, e); + } + if (this.i.isDirty(t.uri) && n.handleDirtyFile) { + switch (n.handleDirtyFile) { + case "save": + await this.p(t, e); + break; + case "revert": + await this.i.revert(t.uri); + break; + } + } + const r = this.r(e, t.getValue(), s)[0]; + if (r && this.q(r, t)) { + await this.p(t, e); + } + } + async p(e, t) { + try { + await this.i.save(e.uri, { + ignoreErrorHandler: true + }); + } catch (s) { + throw s.fileOperationResult === 3 ? this.y(10, t.target, t) : new NMn(f(12667, null, this.A(t.target), s.message), 13); + } + } + q(e, t) { + const s = t.getPositionAt(e.offset); + const n = t.getPositionAt(e.offset + e.length); + const r = new Z(s.lineNumber, s.column, n.lineNumber, n.column); + const o = t.getValueInRange(r); + if (e.content !== o) { + const a = o ? Ua.replace(r, e.content) : Ua.insert(s, e.content); + t.pushEditOperations([new Vs(s.lineNumber, s.column, s.lineNumber, s.column)], [a], () => []); + return true; + } + return false; + } + r({ + value: e, + jsonPath: t + }, s, n) { + if (t.length) { + return TE(s, t, e, n); + } else { + return [{ + content: JSON.stringify(e, null, n.insertSpaces && n.tabSize ? " ".repeat(n.tabSize) : "\t"), + length: s.length, + offset: 0 + }]; + } + } + s(e) { + const { + insertSpaces: t, + tabSize: s + } = e.getOptions(); + const n = e.getEOL(); + return { + insertSpaces: t, + tabSize: s, + eol: n + }; + } + async t(e, t, s) { + switch (e.code) { + case 11: + this.u(e, t); + break; + case 9: + this.v(e, t, s); + break; + case 10: + return this.n(t, { + scopes: s, + handleDirtyFile: "revert" + }); + default: + this.j.error(e.message); + } + } + u(e, t) { + const s = t.workspaceStandAloneConfigurationKey === ZD ? f(12668, null) : t.workspaceStandAloneConfigurationKey === zV ? f(12669, null) : null; + if (s) { + this.j.prompt(es.Error, e.message, [{ + label: s, + run: () => this.x(t.resource) + }]); + } else { + this.j.prompt(es.Error, e.message, [{ + label: f(12670, null), + run: () => this.w(t) + }]); + } + } + v(e, t, s) { + const n = t.workspaceStandAloneConfigurationKey === ZD ? f(12671, null) : t.workspaceStandAloneConfigurationKey === zV ? f(12672, null) : null; + if (n) { + this.j.prompt(es.Error, e.message, [{ + label: f(12673, null), + run: () => { + const r = t.key ? `${t.workspaceStandAloneConfigurationKey}.${t.key}` : t.workspaceStandAloneConfigurationKey; + this.writeConfiguration(t.target, { + key: r, + value: t.value + }, { + handleDirtyFile: "save", + scopes: s + }); + } + }, { + label: n, + run: () => this.x(t.resource) + }]); + } else { + this.j.prompt(es.Error, e.message, [{ + label: f(12674, null), + run: () => this.writeConfiguration(t.target, { + key: t.key, + value: t.value + }, { + handleDirtyFile: "save", + scopes: s + }) + }, { + label: f(12675, null), + run: () => this.w(t) + }]); + } + } + w(e) { + const t = { + jsonEditor: true + }; + switch (e.target) { + case 1: + this.k.openUserSettings(t); + break; + case 2: + this.k.openRemoteSettings(t); + break; + case 3: + this.k.openWorkspaceSettings(t); + break; + case 4: + if (e.resource) { + const s = this.d.getWorkspaceFolder(e.resource); + if (s) { + this.k.openFolderSettings({ + folderUri: s.uri, + jsonEditor: true + }); + } + } + break; + } + } + x(e) { + this.l.openEditor({ + resource: e, + options: { + pinned: true + } + }); + } + y(e, t, s) { + const n = this.z(e, t, s); + return new NMn(n, e); + } + z(e, t, s) { + switch (e) { + case 12: + return f(12676, null, s.key); + case 0: + return f(12677, null, this.A(t), s.key); + case 1: + return f(12678, null, s.key); + case 2: + return f(12679, null, s.key); + case 3: + return f(12680, null, s.key); + case 4: + return f(12681, null, s.key); + case 5: + return f(12682, null, s.key); + case 6: + return f(12683, null); + case 7: + return f(12684, null, s.key); + case 8: + return f(12685, null, this.A(t)); + case 11: + { + if (s.workspaceStandAloneConfigurationKey === ZD) { + return f(12686, null); + } + if (s.workspaceStandAloneConfigurationKey === zV) { + return f(12687, null); + } + switch (t) { + case 1: + return f(12688, null); + case 2: + return f(12689, null); + case 3: + return f(12690, null); + case 4: + { + let n = "<>"; + if (s.resource) { + const r = this.d.getWorkspaceFolder(s.resource); + if (r) { + n = r.name; + } + } + return f(12691, null, n); + } + default: + return ""; + } + } + case 9: + { + if (s.workspaceStandAloneConfigurationKey === ZD) { + return f(12692, null); + } + if (s.workspaceStandAloneConfigurationKey === zV) { + return f(12693, null); + } + switch (t) { + case 1: + return f(12694, null); + case 2: + return f(12695, null); + case 3: + return f(12696, null); + case 4: + { + let n = "<>"; + if (s.resource) { + const r = this.d.getWorkspaceFolder(s.resource); + if (r) { + n = r.name; + } + } + return f(12697, null, n); + } + default: + return ""; + } + } + case 10: + if (s.workspaceStandAloneConfigurationKey === ZD) { + return f(12698, null); + } + if (s.workspaceStandAloneConfigurationKey === zV) { + return f(12699, null); + } + switch (t) { + case 1: + return f(12700, null); + case 2: + return f(12701, null); + case 3: + return f(12702, null); + case 4: + return f(12703, null); + } + case 13: + return f(12704, null, this.A(t)); + } + } + A(e) { + switch (e) { + case 1: + return f(12705, null); + case 2: + return f(12706, null); + case 3: + return f(12707, null); + case 4: + return f(12708, null); + default: + return ""; + } + } + B(e) { + const t = this.m.extUri.basename(e); + switch (t.substr(0, t.length - this.m.extUri.extname(e).length)) { + case ZD: + return sro; + default: + return "{}"; + } + } + async C(e) { + if (!(await this.g.exists(e))) { + await this.i.write(e, this.B(e), { + encoding: "utf8" + }); + } + return this.h.createModelReference(e); + } + D(e, t) { + if (t.workspaceStandAloneConfigurationKey && !t.key) { + return false; + } + const s = []; + Ld(e, s, { + allowTrailingComma: true, + allowEmptyContent: true + }); + return s.length > 0; + } + async E(e, t, s, n) { + if (this.c.inspect(t.key).policyValue !== undefined) { + throw this.y(12, e, t); + } + const o = Pe.as(rr.Configuration).getConfigurationProperties()[t.key]?.scope; + if (!t.workspaceStandAloneConfigurationKey && this.c.keys().default.indexOf(t.key) < 0 && !Rw.test(t.key) && t.value !== undefined) { + throw this.y(0, e, t); + } + if (t.workspaceStandAloneConfigurationKey && t.workspaceStandAloneConfigurationKey !== ZD && (e === 1 || e === 2)) { + throw this.y(4, e, t); + } + if ((e === 3 || e === 4) && this.d.getWorkbenchState() === 1) { + throw this.y(8, e, t); + } + if (e === 3 && !t.workspaceStandAloneConfigurationKey && !Rw.test(t.key)) { + if (o === 1) { + throw this.y(1, e, t); + } + if (o === 2) { + throw this.y(2, e, t); + } + } + if (e === 4) { + if (!t.resource) { + throw this.y(6, e, t); + } + if (!t.workspaceStandAloneConfigurationKey && !Rw.test(t.key) && o !== undefined && !dEt.includes(o)) { + throw this.y(3, e, t); + } + } + if (n.overrideIdentifiers?.length && o !== 5) { + throw this.y(7, e, t); + } + if (!t.resource) { + throw this.y(6, e, t); + } + if (s && this.i.isDirty(t.resource)) { + throw this.y(9, e, t); + } + } + F(e, t, s) { + if (t.key) { + const c = e === 1 ? Ofn : ayi; + const u = Object.keys(c); + for (const d of u) { + const h = this.H(e, d, c[d], s.resource, undefined); + if (t.key === d) { + const p = this.G(h) ? [d] : []; + return { + key: p[p.length - 1], + jsonPath: p, + value: t.value, + resource: h ?? undefined, + workspaceStandAloneConfigurationKey: d, + target: e + }; + } + const g = `${d}.`; + if (t.key.indexOf(g) === 0) { + const p = this.G(h) ? [d, t.key.substr(g.length)] : [t.key.substr(g.length)]; + return { + key: p[p.length - 1], + jsonPath: p, + value: t.value, + resource: h ?? undefined, + workspaceStandAloneConfigurationKey: d, + target: e + }; + } + } + } + const n = t.key; + const o = Pe.as(rr.Configuration).getConfigurationProperties()[n]?.scope; + let a = s.overrideIdentifiers?.length ? [IKi(s.overrideIdentifiers), n] : [n]; + if (e === 1 || e === 2) { + return { + key: n, + jsonPath: a, + value: t.value, + resource: this.H(e, n, "", null, o) ?? undefined, + target: e + }; + } + const l = this.H(e, n, Kno, s.resource, o); + if (this.G(l)) { + a = ["settings", ...a]; + } + return { + key: n, + jsonPath: a, + value: t.value, + resource: l ?? undefined, + target: e + }; + } + G(e) { + const t = this.d.getWorkspace(); + return !!t.configuration && !!e && t.configuration.fsPath === e.fsPath; + } + H(e, t, s, n, r) { + if (e === 1) { + if (t === ZD) { + return this.e.currentProfile.tasksResource; + } else if (!this.e.currentProfile.isDefault && this.c.isSettingAppliedForAllProfiles(t)) { + return this.f.defaultProfile.settingsResource; + } else { + return this.e.currentProfile.settingsResource; + } + } + if (e === 2) { + return this.b; + } + const o = this.d.getWorkbenchState(); + if (o !== 1) { + const a = this.d.getWorkspace(); + if (e === 3) { + if (o === 3) { + return a.configuration ?? null; + } + if (o === 2) { + return a.folders[0].toResource(s); + } + } + if (e === 4 && n) { + const l = this.d.getWorkspaceFolder(n); + if (l) { + return l.toResource(s); + } + } + } + return null; + } +}; +VBi = __decorate([__param(1, eT), __param(2, kt), __param(3, Rc), __param(4, Ml), __param(5, Ct), __param(6, ns), __param(7, So), __param(8, ni), __param(9, fa), __param(10, Te), __param(11, _s)], VBi); +pe(); +Ut(); +q(); +nt(); +Nt(); +Qr(); +Jr(); +Gl(); +Et(); +Ht(); +zt(); +var OVo = class JOt extends $Vo { + static { + this.DEFAULT_OVERRIDES_CACHE_EXISTS_KEY = "DefaultOverridesCacheExists"; + } + constructor(e, t, s) { + super(s); + this.s = e; + this.m = Pe.as(rr.Configuration); + this.n = {}; + this.q = { + type: "defaults", + key: "configurationDefaultsOverrides" + }; + this.r = false; + if (t.options?.configurationDefaults) { + this.m.registerDefaultConfigurations([{ + overrides: t.options.configurationDefaults + }]); + } + } + g() { + return this.n; + } + async initialize() { + await this.w(); + return super.initialize(); + } + reload() { + this.r = true; + this.n = {}; + this.z(); + return super.reload(); + } + hasCachedConfigurationDefaultsOverrides() { + return !RL(this.n); + } + w() { + this.u ||= (async () => { + try { + if (localStorage.getItem(JOt.DEFAULT_OVERRIDES_CACHE_EXISTS_KEY)) { + const e = await this.s.read(this.q); + if (e) { + this.n = JSON.parse(e); + } + } + } catch {} + this.n = xo(this.n) ? this.n : {}; + })(); + return this.u; + } + f(e, t) { + super.f(e, t); + if (t) { + this.z(); + } + } + async z() { + if (!this.r) { + return; + } + const e = {}; + const t = this.m.getConfigurationDefaultsOverrides(); + for (const [s, n] of t) { + if (!Rw.test(s) && n.value !== undefined) { + e[s] = n.value; + } + } + try { + if (Object.keys(e).length) { + localStorage.setItem(JOt.DEFAULT_OVERRIDES_CACHE_EXISTS_KEY, "yes"); + await this.s.write(this.q, JSON.stringify(e)); + } else { + localStorage.removeItem(JOt.DEFAULT_OVERRIDES_CACHE_EXISTS_KEY); + await this.s.remove(this.q); + } + } catch {} + } +}; +var _Vo = class extends xMn { + constructor(i, e, t, s) { + super(i.defaultProfile.settingsResource, { + scopes: [1], + skipUnregistered: true + }, t.extUri, e, s); + this.j = this.D(new B()); + this.onDidChangeConfiguration = this.j.event; + this.D(this.onDidChange(() => this.m.schedule())); + this.m = this.D(new Vn(() => this.loadConfiguration().then(n => this.j.fire(n)), 50)); + } + async initialize() { + return this.loadConfiguration(); + } + async loadConfiguration() { + const i = await super.loadConfiguration(); + const e = i.getValue(Sk); + const t = Array.isArray(e) ? e : []; + if (this.f.include || t.length) { + return this.reparse({ + ...this.f, + include: t + }); + } else { + return i; + } + } +}; +var BVo = class extends H { + get hasTasksLoaded() { + return this.b.value instanceof U$t; + } + constructor(i, e, t, s, n, r) { + super(); + this.g = i; + this.h = e; + this.j = t; + this.m = s; + this.n = n; + this.q = r; + this.a = this.D(new B()); + this.onDidChangeConfiguration = this.a.event; + this.b = this.D(new ki()); + this.c = this.D(new ki()); + this.b.value = new xMn(i, this.j, n.extUri, this.m, r); + this.c.value = this.b.value.onDidChange(() => this.f.schedule()); + this.f = this.D(new Vn(() => this.b.value.loadConfiguration().then(o => this.a.fire(o)), 50)); + } + async reset(i, e, t) { + this.g = i; + this.h = e; + this.j = t; + return this.r(); + } + async r(i) { + const e = this.n.extUri.dirname(this.g); + const t = this.h ? [[ZD, this.h]] : []; + const s = new U$t(e.toString(), this.g, t, this.j, this.m, this.n, this.q); + const n = await s.loadConfiguration(i); + this.b.value = s; + this.c.value &&= this.b.value.onDidChange(() => this.f.schedule()); + return n; + } + async initialize() { + return this.b.value.loadConfiguration(); + } + async reload(i) { + if (this.hasTasksLoaded) { + return this.b.value.loadConfiguration(); + } else { + return this.r(i); + } + } + reparse(i) { + this.j = { + ...this.j, + ...i + }; + return this.b.value.reparse(this.j); + } + getRestrictedSettings() { + return this.b.value.getRestrictedSettings(); + } +}; +var U$t = class extends H { + constructor(i, e, t, s, n, r, o) { + super(); + this.j = e; + this.m = t; + this.n = n; + this.q = r; + this.r = o; + this.h = this.D(new B()); + this.onDidChange = this.h.event; + this.a = [this.j, ...this.m.map(([, a]) => a)]; + this.D(Gc(...this.a.map(a => Gc(this.n.watch(r.extUri.dirname(a)), this.n.watch(a))))); + this.b = new v3(i, o); + this.c = s; + this.f = []; + this.g = Pf.createEmptyModel(this.r); + this.D(de.debounce(de.any(de.filter(this.n.onDidFilesChange, a => this.t(a)), de.filter(this.n.onDidRunOperation, a => this.u(a))), () => {}, 100)(() => this.h.fire())); + } + async resolveContents(i) { + const e = async n => Promise.all(n.map(async r => { + try { + return (await this.n.readFile(r, { + atomic: true + })).value.toString(); + } catch (o) { + this.r.trace(`Error while resolving configuration file '${r.toString()}': ${cc(o)}`); + if (o.fileOperationResult !== 1 && o.fileOperationResult !== 9) { + this.r.error(o); + } + } + return "{}"; + })); + const [[t], s] = await Promise.all([i ? Promise.resolve([undefined]) : e([this.j]), e(this.m.map(([, n]) => n))]); + return [t, s.map((n, r) => [this.m[r][0], n])]; + } + async loadConfiguration(i) { + const [e, t] = await this.resolveContents(!!i); + this.f = []; + this.b.parse("", this.c); + if (e !== undefined) { + this.b.parse(e, this.c); + } + for (let s = 0; s < t.length; s++) { + const n = t[s][1]; + if (n !== undefined) { + const r = new PMn(this.m[s][1].toString(), this.m[s][0], this.r); + r.parse(n); + this.f.push(r.configurationModel); + } + } + this.s(i); + return this.g; + } + getRestrictedSettings() { + return this.b.restrictedConfigurations; + } + reparse(i) { + const e = this.b.configurationModel.contents; + this.c = i; + this.b.reparse(this.c); + if (!Ul(e, this.b.configurationModel.contents)) { + this.s(); + } + return this.g; + } + s(i) { + this.g = (i ?? this.b.configurationModel).merge(...this.f); + } + t(i) { + return !!this.a.some(e => i.contains(e)) || !!this.a.some(e => i.contains(this.q.extUri.dirname(e), 2)); + } + u(i) { + return (!!i.isOperation(0) || !!i.isOperation(3) || !!i.isOperation(1) || !!i.isOperation(4)) && !!this.a.some(e => this.q.extUri.isEqual(i.resource, e)) || !!i.isOperation(1) && !!this.a.some(e => this.q.extUri.isEqual(i.resource, this.q.extUri.dirname(e))); + } +}; +var UVo = class extends H { + constructor(i, e, t, s, n, r) { + super(); + this.f = null; + this.g = this.D(new B()); + this.onDidChangeConfiguration = this.g.event; + this.h = this.D(new B()); + this.onDidInitialize = this.h.event; + this.b = t; + this.c = this.a = new WVo(i, e, { + scopes: uEt + }, r); + n.getEnvironment().then(async o => { + if (o) { + const a = this.D(new HBi(o.settingsPath, { + scopes: uEt + }, this.b, s, r)); + this.D(a.onDidChangeConfiguration(c => this.j(c))); + this.f = a.initialize(); + const l = await this.f; + this.c.dispose(); + this.c = a; + this.j(l); + this.h.fire(l); + } + }); + } + async initialize() { + if (this.c instanceof HBi) { + return this.c.initialize(); + } + let i = await this.c.initialize(); + if (this.f) { + i = await this.f; + this.f = null; + } + return i; + } + reload() { + return this.c.reload(); + } + reparse() { + return this.c.reparse({ + scopes: uEt + }); + } + getRestrictedSettings() { + return this.c.getRestrictedSettings(); + } + j(i) { + this.m(); + this.g.fire(i); + } + async m() { + if (this.c instanceof HBi) { + let i; + try { + i = await this.c.resolveContent(); + } catch (e) { + if (e.fileOperationResult !== 1) { + return; + } + } + await this.a.updateConfiguration(i); + } + } +}; +var HBi = class extends H { + constructor(i, e, t, s, n) { + super(); + this.j = i; + this.m = t; + this.n = s; + this.q = n; + this.f = this.D(new B()); + this.onDidChangeConfiguration = this.f.event; + this.g = this.D(new ki()); + this.h = this.D(new ki()); + this.a = new v3(this.j.toString(), n); + this.b = e; + this.D(t.onDidFilesChange(r => this.w(r))); + this.D(t.onDidRunOperation(r => this.y(r))); + this.c = this.D(new Vn(() => this.reload().then(r => this.f.fire(r)), 50)); + this.D(Ue(() => { + this.s(); + this.u(); + })); + } + r() { + this.g.value = this.m.watch(this.j); + } + s() { + this.g.value = undefined; + } + t() { + const i = this.n.extUri.dirname(this.j); + this.h.value = this.m.watch(i); + } + u() { + this.h.value = undefined; + } + async initialize() { + const i = await this.m.exists(this.j); + this.z(i); + return this.reload(); + } + async resolveContent() { + return (await this.m.readFile(this.j, { + atomic: true + })).value.toString(); + } + async reload() { + try { + const i = await this.resolveContent(); + this.a.parse(i, this.b); + return this.a.configurationModel; + } catch { + return Pf.createEmptyModel(this.q); + } + } + reparse(i) { + this.b = i; + this.a.reparse(this.b); + return this.a.configurationModel; + } + getRestrictedSettings() { + return this.a.restrictedConfigurations; + } + w(i) { + let e = false; + if (i.contains(this.j, 1)) { + e = true; + this.z(true); + } else if (i.contains(this.j, 2)) { + e = true; + this.z(false); + } else if (i.contains(this.j, 0)) { + e = true; + } + if (e) { + this.c.schedule(); + } + } + y(i) { + if ((i.isOperation(0) || i.isOperation(3) || i.isOperation(1) || i.isOperation(4)) && this.n.extUri.isEqual(i.resource, this.j)) { + this.c.schedule(); + } + } + z(i) { + if (i) { + this.u(); + this.r(); + } else { + this.s(); + this.t(); + } + } +}; +var WVo = class extends H { + constructor(i, e, t, s) { + super(); + this.h = e; + this.a = this.D(new B()); + this.onDidChange = this.a.event; + this.b = { + type: "user", + key: i + }; + this.c = new v3("CachedRemoteUserConfiguration", s); + this.f = t; + this.g = Pf.createEmptyModel(s); + } + getConfigurationModel() { + return this.g; + } + initialize() { + return this.reload(); + } + reparse(i) { + this.f = i; + this.c.reparse(this.f); + this.g = this.c.configurationModel; + return this.g; + } + getRestrictedSettings() { + return this.c.restrictedConfigurations; + } + async reload() { + try { + const i = await this.h.read(this.b); + const e = JSON.parse(i); + if (e.content) { + this.c.parse(e.content, this.f); + this.g = this.c.configurationModel; + } + } catch {} + return this.g; + } + async updateConfiguration(i) { + if (i) { + return this.h.write(this.b, JSON.stringify({ + content: i + })); + } else { + return this.h.remove(this.b); + } + } +}; +var VVo = class extends H { + get initialized() { + return this.j; + } + constructor(i, e, t, s) { + super(); + this.m = i; + this.n = e; + this.q = t; + this.r = s; + this.c = this.D(new Q()); + this.f = null; + this.g = false; + this.h = this.D(new B()); + this.onDidUpdateConfiguration = this.h.event; + this.j = false; + this.n = e; + this.b = this.a = new HVo(i, s); + } + async initialize(i, e) { + this.f = i; + this.g = e; + if (!this.j) { + if (this.m.needsCaching(this.f.configPath)) { + this.b = this.a; + this.s(this.f); + } else { + this.t(new W$t(this.n, this.q, this.r)); + } + } + await this.reload(); + } + async reload() { + if (this.f) { + await this.b.load(this.f, { + scopes: Dle, + skipRestricted: this.u() + }); + } + } + getFolders() { + return this.b.getFolders(); + } + setFolders(i, e) { + if (this.f) { + return e.write(this.f.configPath, [{ + path: ["folders"], + value: i + }], true).then(() => this.reload()); + } else { + return Promise.resolve(); + } + } + isTransient() { + return this.b.isTransient(); + } + getConfiguration() { + return this.b.getWorkspaceSettings(); + } + updateWorkspaceTrust(i) { + this.g = i; + return this.reparseWorkspaceSettings(); + } + reparseWorkspaceSettings() { + this.b.reparseWorkspaceSettings({ + scopes: Dle, + skipRestricted: this.u() + }); + return this.getConfiguration(); + } + getRestrictedSettings() { + return this.b.getRestrictedSettings(); + } + async s(i) { + await SUt(i.configPath, this.n); + if (!(this.b instanceof W$t)) { + const e = this.D(new W$t(this.n, this.q, this.r)); + await e.load(i, { + scopes: Dle, + skipRestricted: this.u() + }); + this.t(e); + this.w(false, true); + } + } + t(i) { + this.c.clear(); + this.b = this.c.add(i); + this.c.add(this.b.onDidChange(e => this.w(true, false))); + this.j = true; + } + u() { + return !this.g; + } + async w(i, e) { + if (i) { + await this.reload(); + } + this.y(); + this.h.fire(e); + } + async y() { + if (this.f && this.m.needsCaching(this.f.configPath) && this.b instanceof W$t) { + const i = await this.b.resolveContent(this.f); + await this.a.updateWorkspace(this.f, i); + } + } +}; +var W$t = class extends H { + constructor(i, e, t) { + super(); + this.g = i; + this.h = t; + this.a = null; + this.f = this.D(new B()); + this.onDidChange = this.f.event; + this.workspaceConfigurationModelParser = new B$t("", t); + this.workspaceSettings = Pf.createEmptyModel(t); + this.D(de.any(de.filter(this.g.onDidFilesChange, s => !!this.a && s.contains(this.a.configPath)), de.filter(this.g.onDidRunOperation, s => !!this.a && (s.isOperation(0) || s.isOperation(3) || s.isOperation(1) || s.isOperation(4)) && e.extUri.isEqual(s.resource, this.a.configPath)))(() => this.c.schedule())); + this.c = this.D(new Vn(() => this.f.fire(), 50)); + this.b = this.D(this.m()); + } + get workspaceIdentifier() { + return this.a; + } + async resolveContent(i) { + return (await this.g.readFile(i.configPath, { + atomic: true + })).value.toString(); + } + async load(i, e) { + if (!this.a || this.a.id !== i.id) { + this.a = i; + this.workspaceConfigurationModelParser = new B$t(this.a.id, this.h); + si(this.b); + this.b = this.D(this.m()); + } + let t = ""; + try { + t = await this.resolveContent(this.a); + } catch (s) { + if (await this.g.exists(this.a.configPath)) { + this.h.error(s); + } + } + this.workspaceConfigurationModelParser.parse(t, e); + this.j(); + } + getConfigurationModel() { + return this.workspaceConfigurationModelParser.configurationModel; + } + getFolders() { + return this.workspaceConfigurationModelParser.folders; + } + isTransient() { + return this.workspaceConfigurationModelParser.transient; + } + getWorkspaceSettings() { + return this.workspaceSettings; + } + reparseWorkspaceSettings(i) { + this.workspaceConfigurationModelParser.reparseWorkspaceSettings(i); + this.j(); + return this.getWorkspaceSettings(); + } + getRestrictedSettings() { + return this.workspaceConfigurationModelParser.getRestrictedWorkspaceSettings(); + } + j() { + this.workspaceSettings = this.workspaceConfigurationModelParser.settingsModel.merge(this.workspaceConfigurationModelParser.launchModel, this.workspaceConfigurationModelParser.tasksModel); + } + m() { + if (this.a) { + return this.g.watch(this.a.configPath); + } else { + return H.None; + } + } +}; +var HVo = class { + constructor(i, e) { + this.a = i; + this.b = e; + this.onDidChange = de.None; + this.workspaceConfigurationModelParser = new B$t("", e); + this.workspaceSettings = Pf.createEmptyModel(e); + } + async load(i, e) { + try { + const t = this.d(i); + const s = await this.a.read(t); + const n = JSON.parse(s); + if (n.content) { + this.workspaceConfigurationModelParser = new B$t(t.key, this.b); + this.workspaceConfigurationModelParser.parse(n.content, e); + this.c(); + } + } catch {} + } + get workspaceIdentifier() { + return null; + } + getConfigurationModel() { + return this.workspaceConfigurationModelParser.configurationModel; + } + getFolders() { + return this.workspaceConfigurationModelParser.folders; + } + isTransient() { + return this.workspaceConfigurationModelParser.transient; + } + getWorkspaceSettings() { + return this.workspaceSettings; + } + reparseWorkspaceSettings(i) { + this.workspaceConfigurationModelParser.reparseWorkspaceSettings(i); + this.c(); + return this.getWorkspaceSettings(); + } + getRestrictedSettings() { + return this.workspaceConfigurationModelParser.getRestrictedWorkspaceSettings(); + } + c() { + this.workspaceSettings = this.workspaceConfigurationModelParser.settingsModel.merge(this.workspaceConfigurationModelParser.launchModel, this.workspaceConfigurationModelParser.tasksModel); + } + async updateWorkspace(i, e) { + try { + const t = this.d(i); + if (e) { + await this.a.write(t, JSON.stringify({ + content: e + })); + } else { + await this.a.remove(t); + } + } catch {} + } + d(i) { + return { + type: "workspaces", + key: i.id + }; + } +}; +var qVo = class { + constructor(i, e, t, s, n) { + this.g = s; + this.h = n; + this.onDidChange = de.None; + this.f = { + type: "folder", + key: Qc(Li(i, e).toString()).toString(16) + }; + this.a = new v3("CachedFolderConfiguration", n); + this.b = t; + this.c = []; + this.d = Pf.createEmptyModel(n); + } + async loadConfiguration() { + try { + const i = await this.g.read(this.f); + const { + content: e + } = JSON.parse(i.toString()); + if (e) { + for (const t of Object.keys(e)) { + if (t === cEt) { + this.a.parse(e[t], this.b); + } else { + const s = new PMn(t, t, this.h); + s.parse(e[t]); + this.c.push(s.configurationModel); + } + } + } + this.i(); + } catch {} + return this.d; + } + async updateConfiguration(i, e) { + const t = {}; + if (i) { + t[cEt] = i; + } + e.forEach(([s, n]) => { + if (n) { + t[s] = n; + } + }); + if (Object.keys(t).length) { + await this.g.write(this.f, JSON.stringify({ + content: t + })); + } else { + await this.g.remove(this.f); + } + } + getRestrictedSettings() { + return this.a.restrictedConfigurations; + } + reparse(i) { + this.b = i; + this.a.reparse(this.b); + this.i(); + return this.d; + } + i() { + this.d = this.a.configurationModel.merge(...this.c); + } + getUnsupportedKeys() { + return []; + } +}; +var jVo = class extends H { + constructor(i, e, t, s, n, r, o, a, l) { + super(); + this.workspaceFolder = e; + this.h = s; + this.j = n; + this.m = l; + this.a = this.D(new B()); + this.onDidChange = this.a.event; + this.c = this.h === 3 ? dEt : Dle; + this.f = o.extUri.joinPath(e.uri, t); + this.g = new qVo(e.uri, t, { + scopes: this.c, + skipRestricted: this.n() + }, l, a); + if (i && this.m.needsCaching(e.uri)) { + this.b = this.g; + SUt(e.uri, r).then(() => { + this.b = this.D(this.r(r, o, a)); + this.D(this.b.onDidChange(c => this.q())); + this.q(); + }); + } else { + this.b = this.D(this.r(r, o, a)); + this.D(this.b.onDidChange(c => this.q())); + } + } + loadConfiguration() { + return this.b.loadConfiguration(); + } + updateWorkspaceTrust(i) { + this.j = i; + return this.reparse(); + } + reparse() { + const i = this.b.reparse({ + scopes: this.c, + skipRestricted: this.n() + }); + this.s(); + return i; + } + getRestrictedSettings() { + return this.b.getRestrictedSettings(); + } + n() { + return !this.j; + } + q() { + this.s(); + this.a.fire(); + } + r(i, e, t) { + const s = e.extUri.joinPath(this.f, `${cEt}.json`); + const n = [ZD, zV].map(r => [r, e.extUri.joinPath(this.f, `${r}.json`)]); + return new U$t(this.f.toString(), s, n, { + scopes: this.c, + skipRestricted: this.n() + }, i, e, t); + } + async s() { + if (this.m.needsCaching(this.f) && this.b instanceof U$t) { + const [i, e] = await this.b.resolveContents(); + this.g.updateConfiguration(i, e); + } + } +}; +yb(); +Rr(); +da(); +Yd(); +Jt(); +rn(); +zt(); +X(); +pn(); +Et(); +fr(); +xe(); +function AMn(i, e) { + if (i.isDefault || i.useDefaultFlags?.settings) { + if (e) { + return Ffn; + } else { + return undefined; + } + } else if (e) { + return $fn; + } else { + return iro; + } +} +var qBi = class extends vos { + constructor() { + super(...arguments); + this.initialized = false; + } +}; +var zVo = class extends H { + get restrictedSettings() { + return this.M; + } + constructor({ + remoteAuthority: i, + configurationCache: e + }, t, s, n, r, o, a, l, c) { + super(); + this.R = s; + this.S = n; + this.U = r; + this.W = o; + this.X = a; + this.Y = l; + this.n = false; + this.s = null; + this.w = null; + this.F = this.D(new B()); + this.onDidChangeConfiguration = this.F.event; + this.G = this.D(new B()); + this.onWillChangeWorkspaceFolders = this.G.event; + this.H = this.D(new B()); + this.onDidChangeWorkspaceFolders = this.H.event; + this.I = this.D(new B()); + this.onDidChangeWorkspaceName = this.I.event; + this.J = this.D(new B()); + this.onDidChangeWorkbenchState = this.J.event; + this.L = true; + this.M = { + default: [] + }; + this.N = this.D(new B()); + this.onDidChangeRestrictedSettings = this.N.event; + this.O = Pe.as(rr.Configuration); + this.g = new YS(); + this.h = new YS(); + this.q = this.D(new OVo(e, t, l)); + this.r = c instanceof TMn ? new FVo() : this.D(new WBi(this.q, c, l)); + this.j = e; + this.m = new LMn(this.q.configurationModel, this.r.configurationModel, Pf.createEmptyModel(l), Pf.createEmptyModel(l), Pf.createEmptyModel(l), Pf.createEmptyModel(l), new dn(), Pf.createEmptyModel(l), new dn(), this.c, l); + this.t = this.D(new Q()); + this.Z(); + this.u = this.D(new BVo(s.currentProfile.settingsResource, s.currentProfile.tasksResource, { + scopes: AMn(s.currentProfile, !!i) + }, r, a, l)); + this.z = new dn(); + this.D(this.u.onDidChangeConfiguration(u => this.wb(u))); + if (i) { + const u = this.w = this.D(new UVo(i, e, r, a, o, l)); + this.D(u.onDidInitialize(d => { + this.D(u.onDidChangeConfiguration(h => this.xb(h))); + this.xb(d); + this.g.open(); + })); + } else { + this.g.open(); + } + this.y = this.D(new VVo(e, r, a, l)); + this.D(this.y.onDidUpdateConfiguration(u => { + this.yb(u).then(() => { + this.c.initialized = this.y.initialized; + this.gb(u); + }); + })); + this.D(this.q.onDidChangeConfiguration(({ + properties: u, + defaults: d + }) => this.tb(d, u))); + this.D(this.r.onDidChangeConfiguration(u => this.ub(u))); + this.D(s.onDidChangeCurrentProfile(u => this.sb(u))); + this.C = new wT(); + } + Z() { + this.t.clear(); + if (this.R.currentProfile.isDefault || this.R.currentProfile.useDefaultFlags?.settings) { + this.s = null; + } else { + this.s = this.t.add(this.D(new _Vo(this.S, this.U, this.X, this.Y))); + this.t.add(this.s.onDidChangeConfiguration(i => this.vb(i))); + } + } + async getCompleteWorkspace() { + await this.h.wait(); + return this.getWorkspace(); + } + getWorkspace() { + return this.c; + } + asRelativePath(i, e) { + let t = this.getWorkspaceFolder(i); + if (!t) { + const r = this.getWorkspace().folders.at(0); + if (r && i.scheme !== r.uri.scheme && i.path.startsWith(ao.sep)) { + t = this.getWorkspaceFolder(r.uri.with({ + path: i.path + })); + } + } + if (!t) { + return i.fsPath; + } + if (e === undefined) { + e = this.getWorkspace().folders.length > 1; + } + let s = fb(t.uri, i); + if (e && t.name && s) { + s = ao.join(t.name, s); + } + return s ?? i.fsPath; + } + resolveRelativePath(i, e) { + if (i[0] === ao.sep) { + if (this.w) { + const n = this.c.folders[0]; + if (n) { + return n.uri.with({ + path: i + }); + } + } + return V.file(i); + } + const t = this.getWorkspace().folders; + e = e ?? t.length > 1; + if (t.length === 0) { + return V.file(i); + } + if (e) { + const n = i.split(ao.sep)[0]; + const r = t.find(o => o.name === n); + if (r) { + i = i.substring(n.length + 1); + return r.uri.with({ + path: ao.join(r.uri.path, i) + }); + } + } + const s = t[0]; + return s.uri.with({ + path: ao.join(s.uri.path, i) + }); + } + getWorkbenchState() { + if (this.c.configuration) { + return 3; + } else if (this.c.folders.length === 1) { + return 2; + } else { + return 1; + } + } + getWorkspaceFolder(i) { + return this.c.getFolder(i); + } + addFolders(i, e) { + return this.updateFolders(i, [], e); + } + removeFolders(i) { + return this.updateFolders([], i); + } + async updateFolders(i, e, t) { + return this.C.queue(() => this.$(i, e, t)); + } + isInsideWorkspace(i) { + return !!this.getWorkspaceFolder(i); + } + isCurrentWorkspace(i) { + switch (this.getWorkbenchState()) { + case 2: + { + let e; + if (V.isUri(i)) { + e = i; + } else if (u1(i)) { + e = i.uri; + } + return V.isUri(e) && this.X.extUri.isEqual(e, this.c.folders[0].uri); + } + case 3: + return $M(i) && this.c.id === i.id; + } + return false; + } + async $(i, e, t) { + if (this.getWorkbenchState() !== 3 || i.length + e.length === 0) { + return Promise.resolve(undefined); + } + let s = false; + let n = this.getWorkspace().folders; + let r = n.map(o => o.raw).filter((o, a) => X3s(o) ? !this.bb(e, n[a].uri) : true); + s = n.length !== r.length; + if (i.length) { + const o = this.getWorkspace().configuration; + const a = this.X.extUri.dirname(o); + n = qei(r, o, this.X.extUri); + const l = n.map(u => u.uri); + const c = []; + for (const u of i) { + const d = u.uri; + if (!this.bb(l, d)) { + try { + if (!(await this.U.stat(d)).isDirectory) { + continue; + } + } catch {} + c.push(Hei(d, false, u.name, a, this.X.extUri)); + } + } + if (c.length > 0) { + s = true; + if (typeof t == "number" && t >= 0 && t < r.length) { + r = r.slice(0); + r.splice(t, 0, ...c); + } else { + r = [...r, ...c]; + } + } + } + if (s) { + return this.ab(r); + } else { + return Promise.resolve(undefined); + } + } + async ab(i) { + if (!this.P) { + throw new Error("Cannot update workspace folders because workspace service is not yet ready to accept writes."); + } + await this.P.invokeFunction(e => this.y.setFolders(i, e.get(PD))); + return this.yb(false); + } + bb(i, e) { + return i.some(t => this.X.extUri.isEqual(t, e)); + } + getConfigurationData() { + return this.m.toData(); + } + getValue(i, e) { + const t = typeof i == "string" ? i : undefined; + const s = d8t(i) ? i : d8t(e) ? e : undefined; + return this.m.getValue(t, s); + } + async updateValue(i, e, t, s, n) { + const r = ejn(t) ? t : d8t(t) ? { + resource: t.resource, + overrideIdentifiers: t.overrideIdentifier ? [t.overrideIdentifier] : undefined + } : undefined; + const o = r ? s : t; + const a = o ? [o] : []; + if (r?.overrideIdentifiers) { + r.overrideIdentifiers = Ea(r.overrideIdentifiers); + r.overrideIdentifiers = r.overrideIdentifiers.length ? r.overrideIdentifiers : undefined; + } + if (!a.length) { + if (r?.overrideIdentifiers && r.overrideIdentifiers.length > 1) { + throw new Error("Configuration Target is required while updating the value for multiple override identifiers"); + } + const l = this.inspect(i, { + resource: r?.resource, + overrideIdentifier: r?.overrideIdentifiers ? r.overrideIdentifiers[0] : undefined + }); + a.push(...this.Kb(i, e, l)); + if (Ul(e, l.defaultValue) && a.length === 1 && (a[0] === 2 || a[0] === 3)) { + e = undefined; + } + } + await Ko.settled(a.map(l => this.Hb(i, e, l, r, n))); + } + async reloadConfiguration(i) { + if (i === undefined) { + this.kb(); + const e = await this.lb(true); + const { + local: t, + remote: s + } = await this.mb(); + await this.ob(); + await this.qb(e, t, s, true); + return; + } + if (FM(i)) { + await this.pb(i); + return; + } + switch (i) { + case 7: + this.kb(); + return; + case 2: + { + const { + local: e, + remote: t + } = await this.mb(); + await this.qb(this.m.applicationConfiguration, e, t, true); + return; + } + case 3: + await this.reloadLocalUserConfiguration(); + return; + case 4: + await this.nb(); + return; + case 5: + case 6: + await this.ob(); + return; + } + } + hasCachedConfigurationDefaultsOverrides() { + return this.q.hasCachedConfigurationDefaultsOverrides(); + } + inspect(i, e) { + return this.m.inspect(i, e); + } + keys() { + return this.m.keys(); + } + async whenRemoteConfigurationLoaded() { + await this.g.wait(); + } + async initialize(i) { + Dr("code/willInitWorkspaceService"); + const e = this.n; + this.n = false; + const t = await this.cb(i); + await this.hb(t, e); + this.gb(false); + Dr("code/didInitWorkspaceService"); + } + updateWorkspaceTrust(i) { + if (this.L !== i) { + this.L = i; + const e = this.m.toData(); + const t = []; + for (const n of this.c.folders) { + const r = this.z.get(n.uri); + let o; + if (r) { + o = r.updateWorkspaceTrust(this.L); + this.m.updateFolderConfiguration(n.uri, o); + } + t.push(o); + } + if (this.getWorkbenchState() === 2) { + if (t[0]) { + this.m.updateWorkspaceConfiguration(t[0]); + } + } else { + this.m.updateWorkspaceConfiguration(this.y.updateWorkspaceTrust(this.L)); + } + this.zb(); + let s = []; + if (this.restrictedSettings.userLocal) { + s.push(...this.restrictedSettings.userLocal); + } + if (this.restrictedSettings.userRemote) { + s.push(...this.restrictedSettings.userRemote); + } + if (this.restrictedSettings.workspace) { + s.push(...this.restrictedSettings.workspace); + } + this.restrictedSettings.workspaceFolder?.forEach(n => s.push(...n)); + s = Ea(s); + if (s.length) { + this.Lb({ + keys: s, + overrides: [] + }, { + data: e, + workspace: this.c + }, 5); + } + } + } + acquireInstantiationService(i) { + this.P = i; + } + isSettingAppliedForAllProfiles(i) { + if (this.O.getConfigurationProperties()[i]?.scope === 1) { + return true; + } + const e = this.getValue(Sk) ?? []; + return Array.isArray(e) && e.includes(i); + } + async cb(i) { + if ($M(i)) { + return this.db(i); + } else if (u1(i)) { + return this.eb(i); + } else { + return this.fb(i); + } + } + async db(i) { + await this.y.initialize({ + id: i.id, + configPath: i.configPath + }, this.L); + const e = i.configPath; + const t = qei(this.y.getFolders(), e, this.X.extUri); + const s = i.id; + const n = new qBi(s, t, this.y.isTransient(), e, r => this.X.extUri.ignorePathCasing(r)); + n.initialized = this.y.initialized; + return n; + } + eb(i) { + const e = new qBi(i.id, [lme(i.uri)], false, null, t => this.X.extUri.ignorePathCasing(t)); + e.initialized = true; + return e; + } + fb(i) { + const e = new qBi(i.id, [], false, null, t => this.X.extUri.ignorePathCasing(t)); + e.initialized = true; + return Promise.resolve(e); + } + gb(i) { + if (!this.h.isOpen() && this.c.initialized) { + this.h.open(); + this.Fb(i); + } + } + async hb(i, e) { + const t = !!this.c; + let s; + let n; + let r = []; + if (t) { + s = this.getWorkbenchState(); + n = this.c.configuration ? this.c.configuration.fsPath : undefined; + r = this.c.folders; + this.c.update(i); + } else { + this.c = i; + } + await this.jb(e); + if (t) { + const o = this.getWorkbenchState(); + if (s && o !== s) { + this.J.fire(o); + } + const a = this.c.configuration ? this.c.configuration.fsPath : undefined; + if (n && a !== n || o !== s) { + this.I.fire(); + } + const l = this.ib(r, this.c.folders); + if (l && (l.added.length || l.removed.length || l.changed.length)) { + await this.Bb(l, false); + this.H.fire(l); + } + } + if (!this.u.hasTasksLoaded) { + this.D(jk(xt, () => this.reloadLocalUserConfiguration(false, this.m.localUserConfiguration))); + } + } + ib(i, e) { + const t = { + added: [], + removed: [], + changed: [] + }; + t.added = e.filter(s => !i.some(n => s.uri.toString() === n.uri.toString())); + for (let s = 0; s < i.length; s++) { + const n = i[s]; + let r = 0; + for (r = 0; r < e.length && n.uri.toString() !== e[r].uri.toString(); r++); + if (r < e.length) { + if (s !== r || n.name !== e[r].name) { + t.changed.push(n); + } + } else { + t.removed.push(n); + } + } + return t; + } + async jb(i) { + await this.q.initialize(); + const e = this.r.initialize(); + const t = this.s ? this.s.initialize() : Promise.resolve(Pf.createEmptyModel(this.Y)); + const s = async () => { + Dr("code/willInitUserConfiguration"); + const a = await Promise.all([this.u.initialize(), this.w ? this.w.initialize() : Promise.resolve(Pf.createEmptyModel(this.Y))]); + if (this.s) { + const l = await t; + a[0] = this.u.reparse({ + exclude: l.getValue(Sk) + }); + } + Dr("code/didInitUserConfiguration"); + return a; + }; + const [, n, [r, o]] = await Promise.all([e, t, s()]); + Dr("code/willInitWorkspaceConfiguration"); + await this.qb(n, r, o, i); + Dr("code/didInitWorkspaceConfiguration"); + } + kb() { + this.tb(this.q.reload()); + } + async lb(i) { + if (!this.s) { + return Pf.createEmptyModel(this.Y); + } + const e = await this.s.loadConfiguration(); + if (!i) { + this.vb(e); + } + return e; + } + async mb() { + const [i, e] = await Promise.all([this.reloadLocalUserConfiguration(true), this.nb(true)]); + return { + local: i, + remote: e + }; + } + async reloadLocalUserConfiguration(i, e) { + const t = await this.u.reload(e); + if (!i) { + this.wb(t); + } + return t; + } + async nb(i) { + if (this.w) { + const e = await this.w.reload(); + if (!i) { + this.xb(e); + } + return e; + } + return Pf.createEmptyModel(this.Y); + } + async ob() { + const i = this.getWorkbenchState(); + if (i === 2) { + return this.Cb(this.c.folders[0]); + } + if (i === 3) { + return this.y.reload().then(() => this.yb(false)); + } + } + pb(i) { + return this.Cb(i); + } + async qb(i, e, t, s) { + this.z = new dn(); + const n = this.c.folders; + const r = await this.Eb(n); + const o = this.rb(r); + const a = new dn(); + r.forEach((c, u) => a.set(n[u].uri, c)); + const l = this.m; + this.m = new LMn(this.q.configurationModel, this.r.configurationModel, i, e, t, o, a, Pf.createEmptyModel(this.Y), new dn(), this.c, this.Y); + this.n = true; + if (s) { + const c = this.m.compare(l); + this.Lb(c, { + data: l.toData(), + workspace: this.c + }, 5); + } + this.zb(); + } + rb(i) { + switch (this.getWorkbenchState()) { + case 2: + return i[0]; + case 3: + return this.y.getConfiguration(); + default: + return Pf.createEmptyModel(this.Y); + } + } + sb(i) { + i.join((async () => { + const e = []; + e.push(this.u.reset(i.profile.settingsResource, i.profile.tasksResource, { + scopes: AMn(i.profile, !!this.w) + })); + if (i.previous.isDefault !== i.profile.isDefault || !!i.previous.useDefaultFlags?.settings != !!i.profile.useDefaultFlags?.settings) { + this.Z(); + if (this.s) { + e.push(this.lb(true)); + } + } + let [t, s] = await Promise.all(e); + s = s ?? this.m.applicationConfiguration; + if (this.s) { + t = this.u.reparse({ + exclude: s.getValue(Sk) + }); + } + await this.qb(s, t, this.m.remoteUserConfiguration, true); + })()); + } + tb(i, e) { + if (this.c) { + const t = this.m.toData(); + const s = this.m.compareAndUpdateDefaultConfiguration(i, e); + if (this.s) { + this.m.updateApplicationConfiguration(this.s.reparse()); + } + if (this.w) { + this.m.updateLocalUserConfiguration(this.u.reparse()); + this.m.updateRemoteUserConfiguration(this.w.reparse()); + } + if (this.getWorkbenchState() === 2) { + const n = this.z.get(this.c.folders[0].uri); + if (n) { + this.m.updateWorkspaceConfiguration(n.reparse()); + this.m.updateFolderConfiguration(this.c.folders[0].uri, n.reparse()); + } + } else { + this.m.updateWorkspaceConfiguration(this.y.reparseWorkspaceSettings()); + for (const n of this.c.folders) { + const r = this.z.get(n.uri); + if (r) { + this.m.updateFolderConfiguration(n.uri, r.reparse()); + } + } + } + this.Lb(s, { + data: t, + workspace: this.c + }, 7); + this.zb(); + } + } + ub(i) { + const e = { + data: this.m.toData(), + workspace: this.c + }; + const t = this.m.compareAndUpdatePolicyConfiguration(i); + this.Lb(t, e, 7); + } + vb(i) { + const e = { + data: this.m.toData(), + workspace: this.c + }; + const t = this.m.applicationConfiguration.getValue(Sk) ?? []; + const s = this.m.compareAndUpdateApplicationConfiguration(i); + const n = this.getValue(Sk) ?? []; + const r = this.O.getConfigurationProperties(); + const o = []; + for (const a of s.keys) { + if (r[a]?.scope === 1) { + o.push(a); + if (a === Sk) { + for (const l of t) { + if (!n.includes(l)) { + o.push(l); + } + } + for (const l of n) { + if (!t.includes(l)) { + o.push(l); + } + } + } + } else if (n.includes(a)) { + o.push(a); + } + } + s.keys = o; + if (s.keys.includes(Sk)) { + this.m.updateLocalUserConfiguration(this.u.reparse({ + exclude: n + })); + } + this.Lb(s, e, 2); + } + wb(i) { + const e = { + data: this.m.toData(), + workspace: this.c + }; + const t = this.m.compareAndUpdateLocalUserConfiguration(i); + this.Lb(t, e, 2); + } + xb(i) { + const e = { + data: this.m.toData(), + workspace: this.c + }; + const t = this.m.compareAndUpdateRemoteUserConfiguration(i); + this.Lb(t, e, 2); + } + async yb(i) { + if (this.c && this.c.configuration) { + let e = qei(this.y.getFolders(), this.c.configuration, this.X.extUri); + if (this.c.initialized) { + const { + added: t, + removed: s, + changed: n + } = this.ib(this.c.folders, e); + if (t.length || s.length || n.length) { + e = await this.Gb(e); + } else { + e = this.c.folders; + } + } + await this.Ab(e, this.y.getConfiguration(), i); + } + } + zb() { + const i = []; + const e = this.O.getConfigurationProperties(); + const t = Object.keys(e).filter(g => e[g].restricted).sort((g, p) => g.localeCompare(p)); + const s = RB(t, this.M.default, (g, p) => g.localeCompare(p)); + i.push(...s.added, ...s.removed); + const n = (this.s?.getRestrictedSettings() || []).sort((g, p) => g.localeCompare(p)); + const r = RB(n, this.M.application || [], (g, p) => g.localeCompare(p)); + i.push(...r.added, ...r.removed); + const o = this.u.getRestrictedSettings().sort((g, p) => g.localeCompare(p)); + const a = RB(o, this.M.userLocal || [], (g, p) => g.localeCompare(p)); + i.push(...a.added, ...a.removed); + const l = (this.w?.getRestrictedSettings() || []).sort((g, p) => g.localeCompare(p)); + const c = RB(l, this.M.userRemote || [], (g, p) => g.localeCompare(p)); + i.push(...c.added, ...c.removed); + const u = new dn(); + for (const g of this.c.folders) { + const b = (this.z.get(g.uri)?.getRestrictedSettings() || []).sort((w, C) => w.localeCompare(C)); + if (b.length) { + u.set(g.uri, b); + } + const v = this.M.workspaceFolder?.get(g.uri) || []; + const y = RB(b, v, (w, C) => w.localeCompare(C)); + i.push(...y.added, ...y.removed); + } + const d = this.getWorkbenchState() === 3 ? this.y.getRestrictedSettings().sort((g, p) => g.localeCompare(p)) : this.c.folders[0] ? u.get(this.c.folders[0].uri) || [] : []; + const h = RB(d, this.M.workspace || [], (g, p) => g.localeCompare(p)); + i.push(...h.added, ...h.removed); + if (i.length) { + this.M = { + default: t, + application: n.length ? n : undefined, + userLocal: o.length ? o : undefined, + userRemote: l.length ? l : undefined, + workspace: d.length ? d : undefined, + workspaceFolder: u.size ? u : undefined + }; + this.N.fire(this.restrictedSettings); + } + } + async Ab(i, e, t) { + const s = { + data: this.m.toData(), + workspace: this.c + }; + const n = this.m.compareAndUpdateWorkspaceConfiguration(e); + const r = this.ib(this.c.folders, i); + if (r.added.length || r.removed.length || r.changed.length) { + this.c.folders = i; + const o = await this.Db(); + await this.Bb(r, t); + this.Lb(o, s, 6); + this.H.fire(r); + } else { + this.Lb(n, s, 5); + } + this.zb(); + } + async Bb(i, e) { + const t = []; + this.G.fire({ + join(s) { + t.push(s); + }, + changes: i, + fromCache: e + }); + try { + await Ko.settled(t); + } catch {} + } + async Cb(i) { + const [e] = await this.Eb([i]); + const t = { + data: this.m.toData(), + workspace: this.c + }; + const s = this.m.compareAndUpdateFolderConfiguration(i.uri, e); + if (this.getWorkbenchState() === 2) { + const n = this.m.compareAndUpdateWorkspaceConfiguration(e); + this.Lb(EMn(s, n), t, 5); + } else { + this.Lb(s, t, 6); + } + this.zb(); + } + async Db() { + const i = []; + for (const t of this.z.keys()) { + if (!this.c.folders.filter(s => s.uri.toString() === t.toString())[0]) { + this.z.get(t).dispose(); + this.z.delete(t); + i.push(this.m.compareAndDeleteFolderConfiguration(t)); + } + } + const e = this.c.folders.filter(t => !this.z.has(t.uri)); + if (e.length) { + (await this.Eb(e)).forEach((s, n) => { + i.push(this.m.compareAndUpdateFolderConfiguration(e[n].uri, s)); + }); + } + return EMn(...i); + } + Eb(i) { + return Promise.all([...i.map(e => { + let t = this.z.get(e.uri); + if (!t) { + t = new jVo(!this.n, e, lEt, this.getWorkbenchState(), this.L, this.U, this.X, this.Y, this.j); + this.D(t.onDidChange(() => this.Cb(e))); + this.z.set(e.uri, this.D(t)); + } + return t.loadConfiguration(); + })]); + } + async Fb(i) { + const e = await this.Gb(this.c.folders); + const { + removed: t + } = this.ib(this.c.folders, e); + if (t.length) { + await this.Ab(e, this.y.getConfiguration(), i); + } + } + async Gb(i) { + const e = []; + for (const t of i) { + try { + if (!(await this.U.stat(t.uri)).isDirectory) { + continue; + } + } catch (s) { + this.Y.warn(`Ignoring the error while validating workspace folder ${t.uri.toString()} - ${ou(s)}`); + } + e.push(t); + } + return e; + } + async Hb(i, e, t, s, n) { + if (!this.P) { + throw new Error("Cannot write configuration because the configuration service is not yet ready to accept writes."); + } + if (t === 7) { + throw new Error("Invalid configuration target"); + } + if (t === 8) { + const o = { + data: this.m.toData(), + workspace: this.c + }; + this.m.updateValue(i, e, s); + this.Lb({ + keys: s?.overrideIdentifiers?.length ? [IKi(s.overrideIdentifiers), i] : [i], + overrides: s?.overrideIdentifiers?.length ? s.overrideIdentifiers.map(a => [a, [i]]) : [] + }, o, t); + return; + } + const r = this.Mb(t, i); + if (!r) { + throw new Error("Invalid configuration target"); + } + if (r === 2 && !this.w) { + throw new Error("Invalid configuration target"); + } + if (s?.overrideIdentifiers?.length && s.overrideIdentifiers.length > 1) { + const o = this.Jb(r, s.resource); + if (o) { + const a = s.overrideIdentifiers.sort(); + const l = o.overrides.find(c => Go([...c.identifiers].sort(), a)); + if (l) { + s.overrideIdentifiers = l.identifiers; + } + } + } + this.Q = this.Q ?? this.Ib(this.P); + await (await this.Q).writeConfiguration(r, { + key: i, + value: e + }, { + scopes: s, + ...n + }); + switch (r) { + case 1: + if (this.s && this.isSettingAppliedForAllProfiles(i)) { + await this.lb(); + } else { + await this.reloadLocalUserConfiguration(); + } + return; + case 2: + return this.nb().then(() => {}); + case 3: + return this.ob(); + case 4: + { + const o = s && s.resource ? this.c.getFolder(s.resource) : null; + if (o) { + return this.pb(o); + } + } + } + } + async Ib(i) { + const e = (await this.W.getEnvironment())?.settingsPath ?? null; + return i.createInstance(VBi, e); + } + Jb(i, e) { + switch (i) { + case 1: + return this.m.localUserConfiguration; + case 2: + return this.m.remoteUserConfiguration; + case 3: + return this.m.workspaceConfiguration; + case 4: + if (e) { + return this.m.folderConfigurations.get(e); + } else { + return undefined; + } + } + } + getConfigurationModel(i, e) { + switch (i) { + case 3: + return this.m.localUserConfiguration; + case 4: + return this.m.remoteUserConfiguration; + case 5: + return this.m.workspaceConfiguration; + case 6: + if (e) { + return this.m.folderConfigurations.get(e); + } else { + return undefined; + } + default: + return; + } + } + Kb(i, e, t) { + if (Ul(e, t.value)) { + return []; + } + const s = []; + if (t.workspaceFolderValue !== undefined) { + s.push(6); + } + if (t.workspaceValue !== undefined) { + s.push(5); + } + if (t.userRemoteValue !== undefined) { + s.push(4); + } + if (t.userLocalValue !== undefined) { + s.push(3); + } + if (t.applicationValue !== undefined) { + s.push(1); + } + if (e === undefined) { + return s; + } else { + return [s[0] || 2]; + } + } + Lb(i, e, t) { + if (i.keys.length) { + if (t !== 7) { + this.Y.debug(`Configuration keys changed in ${h8t(t)} target`, ...i.keys); + } + const s = new MVo(i, e, this.m, this.c, this.Y); + s.source = t; + this.F.fire(s); + } + } + Mb(i, e) { + if (i === 1) { + return 1; + } + if (i === 2) { + if (this.w) { + const t = this.O.getConfigurationProperties()[e]?.scope; + if (t === 2 || t === 6 || this.inspect(e).userRemoteValue !== undefined) { + return 2; + } + } + return 1; + } + if (i === 3) { + return 1; + } else if (i === 4) { + return 2; + } else if (i === 5) { + return 3; + } else if (i === 6) { + return 4; + } else { + return null; + } + } +}; +var jBi = class extends H { + constructor(e, t, s, n, r) { + super(); + this.c = e; + this.g = t; + this.h = s; + n.whenInstalledExtensionsRegistered().then(() => { + this.j(); + const o = Pe.as(rr.Configuration); + const a = this.D(new gl(50)); + this.D(de.any(o.onDidUpdateConfiguration, o.onDidSchemaChange, s.onDidChangeTrust)(() => a.trigger(() => this.j(), r.phase === 4 ? undefined : 2500))); + }); + } + j() { + const e = { + properties: i1.properties, + patternProperties: i1.patternProperties, + additionalProperties: true, + allowTrailingCommas: true, + allowComments: true + }; + const t = this.g.remoteAuthority ? { + properties: Object.assign({}, $ee.properties, tF.properties, WL.properties), + patternProperties: i1.patternProperties, + additionalProperties: true, + allowTrailingCommas: true, + allowComments: true + } : e; + const s = { + properties: Object.assign({}, fj.properties, eF.properties, tF.properties, WL.properties), + patternProperties: i1.patternProperties, + additionalProperties: true, + allowTrailingCommas: true, + allowComments: true + }; + const n = { + properties: Object.assign({}, fj.properties, eF.properties, tF.properties, WL.properties), + patternProperties: i1.patternProperties, + additionalProperties: true, + allowTrailingCommas: true, + allowComments: true + }; + const r = { + properties: Object.assign({}, this.n(eF.properties), this.n(tF.properties), this.n(WL.properties)), + patternProperties: i1.patternProperties, + additionalProperties: true, + allowTrailingCommas: true, + allowComments: true + }; + const o = { + properties: Object.keys(i1.properties).reduce((c, u) => { + c[u] = Object.assign({ + deprecationMessage: undefined + }, i1.properties[u]); + return c; + }, {}), + patternProperties: Object.keys(i1.patternProperties).reduce((c, u) => { + c[u] = Object.assign({ + deprecationMessage: undefined + }, i1.patternProperties[u]); + return c; + }, {}), + additionalProperties: true, + allowTrailingCommas: true, + allowComments: true + }; + const a = this.c.getWorkbenchState() === 3 ? { + properties: Object.assign({}, this.n(eF.properties), this.n(WL.properties)), + patternProperties: i1.patternProperties, + additionalProperties: true, + allowTrailingCommas: true, + allowComments: true + } : r; + const l = { + type: "object", + description: f(12665, null), + properties: Object.assign({}, this.q(eF.properties), this.q(tF.properties), this.q(WL.properties)), + patternProperties: { + [e4]: { + type: "object", + default: {}, + $ref: ZB + } + }, + additionalProperties: false + }; + this.m({ + defaultSettingsSchema: o, + userSettingsSchema: t, + profileSettingsSchema: s, + machineSettingsSchema: n, + workspaceSettingsSchema: r, + folderSettingsSchema: a, + configDefaultsSchema: l + }); + } + m(e) { + const t = Pe.as(Vm.JSONContribution); + t.registerSchema(Yno, e.defaultSettingsSchema); + t.registerSchema(Xno, e.userSettingsSchema); + t.registerSchema(Qno, e.profileSettingsSchema); + t.registerSchema(Zno, e.machineSettingsSchema); + t.registerSchema(Afn, e.workspaceSettingsSchema); + t.registerSchema(ero, e.folderSettingsSchema); + t.registerSchema(m8t, e.configDefaultsSchema); + } + n(e) { + if (this.h.isWorkspaceTrusted()) { + return e; + } + const t = {}; + Object.entries(e).forEach(([s, n]) => { + if (!n.restricted) { + t[s] = n; + } + }); + return t; + } + q(e) { + const t = {}; + Object.entries(e).forEach(([s, n]) => { + if (!n.disallowConfigurationDefault) { + t[s] = n; + } + }); + return t; + } +}; +jBi = __decorate([__param(0, kt), __param(1, Wn), __param(2, qf), __param(3, Ks), __param(4, Yo)], jBi); +var zBi = class extends H { + constructor(e, t) { + super(); + if (e.hasCachedConfigurationDefaultsOverrides()) { + t.whenInstalledExtensionsRegistered().then(() => e.reloadConfiguration(7)); + } + } +}; +zBi = __decorate([__param(0, ve), __param(1, Ks)], zBi); +var V$t = class extends H { + static { + this.ID = "workbench.contrib.updateExperimentalSettingsDefaults"; + } + constructor(e) { + super(); + this.h = e; + this.c = new Set(); + this.g = Pe.as(rr.Configuration); + this.j(Object.keys(this.g.getConfigurationProperties())); + this.D(this.g.onDidUpdateConfiguration(({ + properties: t + }) => this.j(t))); + } + async j(e) { + const t = {}; + const s = this.g.getConfigurationProperties(); + for (const n of e) { + const r = s[n]; + const o = r?.tags; + if (!!o && !!o.some(a => a.toLowerCase() === "onexp") && !this.c.has(n)) { + this.c.add(n); + try { + const a = await this.h.getTreatment(`config.${n}`); + if (!qo(a) && !Ul(a, r.default)) { + t[n] = a; + } + } catch {} + } + } + if (Object.keys(t).length) { + this.g.registerDefaultConfigurations([{ + overrides: t + }]); + } + } +}; +V$t = __decorate([__param(0, rce)], V$t); +var $Mn = Pe.as(Er.Workbench); +$Mn.registerWorkbenchContribution(jBi, 3); +$Mn.registerWorkbenchContribution(zBi, 4); +Yn(V$t.ID, V$t, 2); +var JVo = Pe.as(rr.Configuration); +JVo.registerConfiguration({ + ...Qx, + properties: { + [Sk]: { + type: "array", + description: f(12666, null), + default: [], + scope: 1, + additionalProperties: true, + uniqueItems: true + } + } +}); +Tc(); +Zt(); +nt(); +q(); +At(); +Et(); +vUt(); +qt(); +mu(); +var GVo = class extends _lt { + constructor(i, e, t, s) { + super(); + this.db = i; + this.eb = e; + this.fb = t; + this.gb = s; + this.s = this.eb.defaultProfile; + this.X = this.hb(); + this.Y = this.eb.currentProfile; + this.Z = this.D(new Q()); + this.$ = this.ib(this.Y); + this.ab = this.db?.id; + this.bb = this.D(new Q()); + this.cb = this.jb(this.db); + } + hb() { + const i = this.D(new vmn(this.fb.getChannel("storage"))); + const e = this.D(new i7(i)); + this.D(e.onDidChangeStorage(t => this.u(-1, t))); + return e; + } + ib(i) { + this.Z.clear(); + this.Y = i; + let e; + if (Olt(i)) { + e = this.X; + } else { + const t = this.Z.add(new ymn(this.fb.getChannel("storage"), i)); + e = this.Z.add(new i7(t)); + } + this.Z.add(e.onDidChangeStorage(t => this.u(0, t))); + return e; + } + jb(i) { + this.bb.clear(); + this.ab = i?.id; + let e; + if (i) { + const t = this.bb.add(new kco(this.fb.getChannel("storage"), i)); + e = this.bb.add(new i7(t)); + this.bb.add(e.onDidChangeStorage(s => this.u(1, s))); + } + return e; + } + async Q() { + await Ko.settled([this.X.init(), this.$.init(), this.cb?.init() ?? Promise.resolve()]); + } + R(i) { + switch (i) { + case -1: + return this.X; + case 0: + return this.$; + default: + return this.cb; + } + } + S(i) { + switch (i) { + case -1: + return this.s.globalStorageHome.with({ + scheme: me.file + }).fsPath; + case 0: + return this.Y?.globalStorageHome.with({ + scheme: me.file + }).fsPath; + default: + if (this.ab) { + return `${Li(this.gb.workspaceStorageHome, this.ab, "state.vscdb").with({ + scheme: me.file + }).fsPath}`; + } else { + return undefined; + } + } + } + async close() { + this.t(); + this.w(HT.SHUTDOWN); + for (const i of this.N) { + try { + await i(); + } catch (e) { + console.error(e); + } + } + await Ko.settled([this.X.close(), this.$.close(), this.cb?.close() ?? Promise.resolve()]); + } + async U(i) { + if (!this.O(this.Y, i)) { + return; + } + const e = this.$; + const t = e.items; + if (e !== this.X) { + await e.close(); + } + this.$ = this.ib(i); + await this.$.init(); + this.P(t, this.$, 0); + } + async W(i, e) { + const t = this.cb; + const s = t?.items ?? new Map(); + await t?.close(); + this.cb = this.jb(i); + await this.cb.init(); + this.P(s, this.cb, 1); + } + hasScope(i) { + if (O4(i)) { + return this.Y.id === i.id; + } else { + return this.ab === i.id; + } + } +}; +var KVo = class extends GVo { + constructor(i, e, t, s, n) { + super(i, { + currentProfile: e.currentProfile, + defaultProfile: t.defaultProfile + }, s, n); + this.pb = e; + this.qb(); + } + qb() { + this.D(this.pb.onDidChangeCurrentProfile(i => i.join(this.U(i.profile)))); + } +}; +ii(); +qt(); +q(); +Zt(); +q(); +var FMn = { + request: "vscode:createSharedProcessChannelConnection", + response: "vscode:createSharedProcessChannelConnectionResult" +}; +var OMn = { + request: "vscode:createSharedProcessRawConnection", + response: "vscode:createSharedProcessRawConnectionResult" +}; +yb(); +nt(); +var JBi = class extends H { + constructor(e, t) { + super(); + this.windowId = e; + this.c = t; + this.b = new YS(); + this.a = this.f(); + } + async f() { + this.c.trace("Renderer->SharedProcess#connect"); + await Promise.race([this.b.wait(), Da(2000)]); + Dr("code/willConnectSharedProcess"); + this.c.trace("Renderer->SharedProcess#connect: before acquirePort"); + const e = await tPe(FMn.request, FMn.response); + Dr("code/didConnectSharedProcess"); + this.c.trace("Renderer->SharedProcess#connect: connection established"); + return this.D(new ABi(e, `window:${this.windowId}`)); + } + notifyRestored() { + if (!this.b.isOpen()) { + this.b.open(); + } + } + getChannel(e) { + return Jxt(this.a.then(t => t.getChannel(e))); + } + registerChannel(e, t) { + this.a.then(s => s.registerChannel(e, t)); + } + async createRawConnection() { + await this.a; + this.c.trace("Renderer->SharedProcess#createRawConnection: before acquirePort"); + const e = await tPe(OMn.request, OMn.response); + this.c.trace("Renderer->SharedProcess#createRawConnection: connection established"); + return e; + } +}; +JBi = __decorate([__param(1, Bt)], JBi); +nt(); +Ut(); +pe(); +q(); +At(); +kn(); +var GBi = class extends H { + constructor(e, t) { + super(); + this.h = t; + this.a = this.D(new B()); + this.onDidChangeConnectionData = this.a.event; + this.b = new Map(); + this.c = new Map(); + this.f = new Map(); + this.g = null; + uM.setServerRootPath(e, undefined); + } + resolveAuthority(e) { + if (!this.b.has(e)) { + this.b.set(e, new uc()); + } + return this.b.get(e).p; + } + async getCanonicalURI(e) { + const t = e.toString(); + const s = this.f.get(t); + if (s) { + return s.result.p; + } + const n = new uc(); + this.g?.(e).then(r => n.complete(r), r => n.error(r)); + this.f.set(t, { + input: e, + result: n + }); + return n.p; + } + getConnectionData(e) { + if (!this.b.has(e)) { + return null; + } + const t = this.b.get(e); + if (!t.isResolved) { + return null; + } + const s = this.c.get(e); + return { + connectTo: t.value.authority.connectTo, + connectionToken: s + }; + } + _clearResolvedAuthority(e) { + if (this.b.has(e)) { + this.b.get(e).cancel(); + this.b.delete(e); + } + } + _setResolvedAuthority(e, t) { + if (this.b.has(e.authority)) { + const s = this.b.get(e.authority); + if (e.connectTo.type === 0) { + uM.set(e.authority, e.connectTo.host, e.connectTo.port); + } else { + uM.setDelegate(this.h.getResourceUriProvider()); + } + if (e.connectionToken) { + uM.setConnectionToken(e.authority, e.connectionToken); + } + s.complete({ + authority: e, + options: t + }); + this.a.fire(); + } + } + _setResolvedAuthorityError(e, t) { + if (this.b.has(e)) { + this.b.get(e).error(uf.fromError(t)); + } + } + _setAuthorityConnectionToken(e, t) { + this.c.set(e, t); + uM.setConnectionToken(e, t); + this.a.fire(); + } + _setCanonicalURIProvider(e) { + this.g = e; + this.f.forEach(({ + result: t, + input: s + }) => { + this.g(s).then(n => t.complete(n), n => t.error(n)); + }); + } +}; +GBi = __decorate([__param(0, ys)], GBi); +X(); +Wc(); +kn(); +q(); +Rr(); +Le(); +yg(); +var YH = class { + static async getEnvironmentData(i, e, t) { + const s = { + remoteAuthority: e, + profile: t + }; + const n = await i.call("getEnvironmentData", s); + return { + pid: n.pid, + connectionToken: n.connectionToken, + appRoot: V.revive(n.appRoot), + settingsPath: V.revive(n.settingsPath), + logsPath: V.revive(n.logsPath), + extensionHostLogsPath: V.revive(n.extensionHostLogsPath), + globalStorageHome: V.revive(n.globalStorageHome), + workspaceStorageHome: V.revive(n.workspaceStorageHome), + localHistoryHome: V.revive(n.localHistoryHome), + userHome: V.revive(n.userHome), + os: n.os, + arch: n.arch, + marks: n.marks, + useHostProxy: n.useHostProxy, + profiles: Eh(n.profiles), + isUnsupportedGlibc: n.isUnsupportedGlibc + }; + } + static async getExtensionHostExitInfo(i, e, t) { + const s = { + remoteAuthority: e, + reconnectionToken: t + }; + return i.call("getExtensionHostExitInfo", s); + } + static getDiagnosticInfo(i, e) { + return i.call("getDiagnosticInfo", e); + } + static updateTelemetryLevel(i, e) { + return i.call("updateTelemetryLevel", { + telemetryLevel: e + }); + } + static logTelemetry(i, e, t) { + return i.call("logTelemetry", { + eventName: e, + data: t + }); + } + static registerAuthId(i, e) { + return i.call("registerAuthId", { + authId: e + }); + } + static flushTelemetry(i) { + return i.call("flushTelemetry"); + } + static async ping(i) { + await i.call("ping"); + } +}; +pe(); +te(); +var YVo = "signService"; +var H$t = Ve(YVo); +Zt(); +kn(); +var KBi = class extends H { + constructor(e, t, s, n, r, o, a) { + super(); + this.f = e; + this.g = t; + this.h = s; + this.j = r; + if (this.h.remoteAuthority) { + this.a = this.D(new XVo(this.h.remoteAuthority, n.commit, n.quality, this.f, this.j, o, a)); + } else { + this.a = null; + } + this.b = null; + } + getConnection() { + return this.a; + } + getEnvironment() { + return this.getRawEnvironment().then(undefined, () => null); + } + getRawEnvironment() { + this.b ||= this.m(async (e, t) => { + const s = await YH.getEnvironmentData(e, t.remoteAuthority, this.g.currentProfile.isDefault ? undefined : this.g.currentProfile.id); + this.j._setAuthorityConnectionToken(t.remoteAuthority, s.connectionToken); + return s; + }, null); + return this.b; + } + getExtensionHostExitInfo(e) { + return this.m((t, s) => YH.getExtensionHostExitInfo(t, s.remoteAuthority, e), null); + } + getDiagnosticInfo(e) { + return this.m(t => YH.getDiagnosticInfo(t, e), undefined); + } + updateTelemetryLevel(e) { + return this.n(t => YH.updateTelemetryLevel(t, e), undefined); + } + registerAuthId(e) { + return this.n(t => YH.registerAuthId(t, e), undefined); + } + logTelemetry(e, t) { + return this.n(s => YH.logTelemetry(s, e, t), undefined); + } + flushTelemetry() { + return this.n(e => YH.flushTelemetry(e), undefined); + } + getRoundTripTime() { + return this.n(async e => { + const t = Date.now(); + await YH.ping(e); + return Date.now() - t; + }, undefined); + } + async endConnection() { + if (this.a) { + await this.a.end(); + this.a.dispose(); + } + } + m(e, t) { + const s = this.getConnection(); + if (s) { + return s.withChannel("remoteextensionsenvironment", n => e(n, s)); + } else { + return Promise.resolve(t); + } + } + n(e, t) { + const s = this.getConnection(); + if (s) { + return s.withChannel("telemetry", n => e(n, s)); + } else { + return Promise.resolve(t); + } + } +}; +KBi = __decorate([__param(0, ske), __param(1, Rc), __param(2, Wn), __param(3, ys), __param(4, hv), __param(5, H$t), __param(6, Bt)], KBi); +var XVo = class extends H { + constructor(i, e, t, s, n, r, o) { + super(); + this.h = e; + this.j = t; + this.m = s; + this.n = n; + this.q = r; + this.r = o; + this.a = this.D(new B()); + this.onReconnecting = this.a.event; + this.b = this.D(new B()); + this.onDidStateChange = this.b.event; + this.end = () => Promise.resolve(); + this.remoteAuthority = i; + this.f = null; + } + getChannel(i) { + return Jxt(this.s().then(e => e.getChannel(i))); + } + withChannel(i, e) { + const t = this.getChannel(i); + return e(t); + } + registerChannel(i, e) { + this.s().then(t => t.registerChannel(i, e)); + } + async getInitialConnectionTimeMs() { + try { + await this.s(); + } catch {} + return this.g; + } + s() { + this.f ||= this.t(); + return this.f; + } + async t() { + let i = true; + const e = { + commit: this.h, + quality: this.j, + addressProvider: { + getAddress: async () => { + if (i) { + i = false; + } else { + this.a.fire(undefined); + } + const { + authority: n + } = await this.n.resolveAuthority(this.remoteAuthority); + return { + connectTo: n.connectTo, + connectionToken: n.connectionToken + }; + } + }, + remoteSocketFactoryService: this.m, + signService: this.q, + logService: this.r, + ipcLogger: null + }; + let t; + const s = Date.now(); + try { + t = this.D(await F4o(e, this.remoteAuthority, "renderer")); + } finally { + this.g = Date.now() - s; + } + t.protocol.onDidDispose(() => { + t.dispose(); + }); + this.end = () => { + t.protocol.sendDisconnect(); + return t.protocol.drain(); + }; + this.D(t.onDidStateChange(n => this.b.fire(n))); + return t.client; + } +}; +Zt(); +Rr(); +Wi(); +ai(); +Le(); +gs(); +Wt(); +var YBi = class extends KBi { + constructor(e, t, s, n, r, o, a) { + super(e, t, s, n, r, o, a); + } +}; +YBi = __decorate([__param(0, ske), __param(1, Rc), __param(2, Wn), __param(3, ys), __param(4, hv), __param(5, H$t), __param(6, Bt)], YBi); +var q$t = class { + static { + this.ID = "workbench.contrib.nativeRemoteConnectionFailureNotification"; + } + constructor(e, t, s, n, r, o, a, l) { + this.a = e; + this.b = o; + this.a.getRawEnvironment().then(undefined, c => { + if (!$R.isHandled(c)) { + const u = [{ + label: "Reload Window", + run: () => l.executeCommand("workbench.action.reloadWindow") + }]; + const d = this.c(); + if (d) { + u.push({ + label: f(13200, null), + run: () => a.open(d, { + openExternal: true + }) + }); + } + t.prompt(es.Error, f(13201, null, c ? c.message : ""), u); + } + }); + } + c() { + const e = this.a.getConnection(); + if (!e) { + return null; + } + const t = this.b.getConnectionData(e.remoteAuthority); + if (!t || t.connectTo.type !== 0) { + return null; + } else { + return V.from({ + scheme: "http", + authority: `${t.connectTo.host}:${t.connectTo.port}`, + path: "/version" + }); + } + } +}; +q$t = __decorate([__param(0, al), __param(1, ni), __param(2, Wn), __param(3, Ot), __param(4, po), __param(5, hv), __param(6, os), __param(7, gt)], q$t); +Yn(q$t.ID, q$t, 2); +Wc(); +Jt(); +nt(); +nr(); +ri(); +pe(); +Gl(); +sa(); +q(); +HI(); +At(); +yb(); +Et(); +OL(); +X(); +Nt(); +nr(); +Ut(); +X(); +Nt(); +async function QVo(i, e, t, s, n, r) { + let o; + try { + await ZVo(i, e, t, s, n, r); + } catch (a) { + o = a; + } finally { + if (o && n.errorTransformer) { + o = n.errorTransformer(o); + } + if (typeof o !== "undefined") { + t.error(o); + } + t.end(); + } +} +async function ZVo(i, e, t, s, n, r) { + XBi(r); + const o = await i.open(e, { + create: false + }); + try { + XBi(r); + let a = 0; + let l = 0; + let c = n && typeof n.length == "number" ? n.length : undefined; + let u = Ii.alloc(Math.min(n.bufferSize, typeof c == "number" ? c : n.bufferSize)); + let d = n && typeof n.position == "number" ? n.position : 0; + let h = 0; + do { + l = await i.read(o, d, u.buffer, h, u.byteLength - h); + d += l; + h += l; + a += l; + if (typeof c == "number") { + c -= l; + } + if (h === u.byteLength) { + await t.write(s(u)); + u = Ii.alloc(Math.min(n.bufferSize, typeof c == "number" ? c : n.bufferSize)); + h = 0; + } + } while (l > 0 && (typeof c != "number" || c > 0) && XBi(r) && eHo(a, n)); + if (h > 0) { + let g = h; + if (typeof c == "number") { + g = Math.min(h, c); + } + t.write(s(u.slice(0, g))); + } + } catch (a) { + throw fz(a); + } finally { + await i.close(o); + } +} +function XBi(i) { + if (i.isCancellationRequested) { + throw SL(); + } + return true; +} +function eHo(i, e) { + if (typeof e?.limits?.size == "number" && i > e.limits.size) { + throw wp(f(1947, null), io.FileTooLarge); + } + return true; +} +Zt(); +Ut(); +a7(); +var QBi; +var ZBi = class extends H { + static { + QBi = this; + } + constructor(e) { + super(); + this.b = e; + this.a = 262144; + this.c = this.D(new B()); + this.onDidChangeFileSystemProviderRegistrations = this.c.event; + this.f = this.D(new B()); + this.onWillActivateFileSystemProvider = this.f.event; + this.g = this.D(new B()); + this.onDidChangeFileSystemProviderCapabilities = this.g.event; + this.h = new Map(); + this.q = this.D(new B()); + this.onDidRunOperation = this.q.event; + this.X = this.D(new B()); + this.Y = this.D(new B()); + this.onDidFilesChange = this.Y.event; + this.Z = this.D(new B()); + this.onDidWatchError = this.Z.event; + this.$ = new Map(); + this.cb = this.D(new bfe()); + } + registerProvider(e, t) { + if (this.h.has(e)) { + throw new Error(`A filesystem provider for the scheme '${e}' is already registered.`); + } + Dr(`code/registerFilesystem/${e}`); + const s = new Q(); + this.h.set(e, t); + this.c.fire({ + added: true, + scheme: e, + provider: t + }); + s.add(t.onDidChangeFile(n => { + const r = new n7(n, !this.S(t)); + this.X.fire(r); + if (!r.hasCorrelation()) { + this.Y.fire(r); + } + })); + if (typeof t.onDidWatchError == "function") { + s.add(t.onDidWatchError(n => this.Z.fire(new Error(n)))); + } + s.add(t.onDidChangeCapabilities(() => this.g.fire({ + provider: t, + scheme: e + }))); + return Ue(() => { + this.c.fire({ + added: false, + scheme: e, + provider: t + }); + this.h.delete(e); + si(s); + }); + } + getProvider(e) { + return this.h.get(e); + } + async activateProvider(e) { + const t = []; + this.f.fire({ + scheme: e, + join(s) { + t.push(s); + } + }); + if (!this.h.has(e)) { + await Ko.settled(t); + } + } + async canHandleResource(e) { + await this.activateProvider(e.scheme); + return this.hasProvider(e); + } + hasProvider(e) { + return this.h.has(e.scheme); + } + hasCapability(e, t) { + const s = this.h.get(e.scheme); + return !!s && !!(s.capabilities & t); + } + listCapabilities() { + return Ws.map(this.h, ([e, t]) => ({ + scheme: e, + capabilities: t.capabilities + })); + } + async j(e) { + if (!U4t(e)) { + throw new vf(f(1920, null, this.sb(e)), 8); + } + await this.activateProvider(e.scheme); + const t = this.h.get(e.scheme); + if (!t) { + const s = new uf(); + s.message = f(1921, null, e.toString()); + throw s; + } + return t; + } + async m(e) { + const t = await this.j(e); + if (s7(t) || VT(t) || wUt(t)) { + return t; + } + throw new Error(`Filesystem provider for scheme '${e.scheme}' neither has FileReadWrite, FileReadStream nor FileOpenReadWriteClose capability which is needed for the read operation.`); + } + async n(e) { + const t = await this.j(e); + if (s7(t) || VT(t)) { + return t; + } + throw new Error(`Filesystem provider for scheme '${e.scheme}' neither has FileReadWrite nor FileOpenReadWriteClose capability which is needed for the write operation.`); + } + async resolve(e, t) { + try { + return await this.r(e, t); + } catch (s) { + throw ame(s) === io.FileNotFound ? new vf(f(1922, null, this.sb(e)), 1) : fz(s); + } + } + async r(e, t) { + const s = await this.j(e); + const n = this.S(s); + const r = t?.resolveTo; + const o = t?.resolveSingleChildDescendants; + const a = t?.resolveMetadata; + const l = await s.stat(e); + let c; + return this.s(s, e, l, undefined, !!a, (u, d) => { + if (!c) { + c = Ww.forUris(() => !n); + c.set(e, true); + if (r) { + c.fill(true, r); + } + } + if (c.get(u.resource) || c.findSuperstr(u.resource.with({ + query: null, + fragment: null + }))) { + return true; + } else if (u.isDirectory && o) { + return d === 1; + } else { + return false; + } + }); + } + async s(e, t, s, n, r, o) { + const { + providerExtUri: a + } = this.R(e); + const l = { + resource: t, + name: a.basename(t), + isFile: (s.type & wg.File) !== 0, + isDirectory: (s.type & wg.Directory) !== 0, + isSymbolicLink: (s.type & wg.SymbolicLink) !== 0, + mtime: s.mtime, + ctime: s.ctime, + size: s.size, + readonly: !!((s.permissions ?? 0) & $4.Readonly) || !!(e.capabilities & 2048), + locked: !!((s.permissions ?? 0) & $4.Locked), + etag: aos({ + mtime: s.mtime, + size: s.size + }), + children: undefined + }; + if (l.isDirectory && o(l, n)) { + try { + const c = await e.readdir(t); + const u = await Ko.settled(c.map(async ([d, h]) => { + try { + const g = a.joinPath(t, d); + const p = r ? await e.stat(g) : { + type: h + }; + return await this.s(e, g, p, c.length, r, o); + } catch (g) { + this.b.trace(g); + return null; + } + })); + l.children = dr(u); + } catch (c) { + this.b.trace(c); + l.children = []; + } + return l; + } + return l; + } + async resolveAll(e) { + return Ko.settled(e.map(async t => { + try { + return { + stat: await this.r(t.resource, t.options), + success: true + }; + } catch (s) { + this.b.trace(s); + return { + stat: undefined, + success: false + }; + } + })); + } + async stat(e) { + const t = await this.j(e); + const s = await t.stat(e); + return this.s(t, e, s, undefined, true, () => false); + } + async exists(e) { + const t = await this.j(e); + try { + return !!(await t.stat(e)); + } catch { + return false; + } + } + async canCreateFile(e, t) { + try { + await this.t(e, t); + } catch (s) { + return s; + } + return true; + } + async t(e, t) { + if (!t?.overwrite && (await this.exists(e))) { + throw new vf(f(1923, null, this.sb(e)), 3, t); + } + } + async createFile(e, t = Ii.fromString(""), s) { + if (zI(e) && t.toString().trim() === "") { + t = Ii.fromString(RUt); + } + await this.t(e, s); + const n = await this.writeFile(e, t); + this.q.fire(new F4(e, 0, n)); + return n; + } + async writeFile(e, t, s) { + const n = this.qb(await this.n(e), e); + const { + providerExtUri: r + } = this.R(n); + let o = s; + if (ros(n) && !o?.atomic) { + const a = n.enforceAtomicWriteFile?.(e); + if (a) { + o = { + ...s, + atomic: a + }; + } + } + try { + if (!(await this.u(n, e, o))) { + await this.U(n, r.dirname(e)); + } + let l; + if (VT(n) && !(t instanceof Ii)) { + if (oee(t)) { + const c = await Pzi(t, 3); + if (c.ended) { + l = Ii.concat(c.buffer); + } else { + l = c; + } + } else { + l = _Hn(t, c => Ii.concat(c), 3); + } + } else { + l = t; + } + if (!s7(n) || VT(n) && l instanceof Ii || VT(n) && ros(n) && o?.atomic) { + await this.hb(n, e, o, l); + } else { + await this.db(n, e, o, l instanceof Ii ? crt(l) : l); + } + this.q.fire(new F4(e, 4)); + } catch (a) { + throw new vf(f(1924, null, this.sb(e), fz(a).toString()), ZL(a), o); + } + return this.resolve(e, { + resolveMetadata: true + }); + } + async u(e, t, s) { + const n = !!s?.unlock; + if (n && !(e.capabilities & 8192)) { + throw new Error(f(1925, null, this.sb(t))); + } + if (s?.atomic) { + if (!(e.capabilities & 32768)) { + throw new Error(f(1926, null, this.sb(t))); + } + if (!(e.capabilities & 2)) { + throw new Error(f(1927, null, this.sb(t))); + } + if (n) { + throw new Error(f(1928, null, this.sb(t))); + } + } + let o; + try { + o = await e.stat(t); + } catch { + return; + } + if (o.type & wg.Directory) { + throw new vf(f(1929, null, this.sb(t)), 0, s); + } + this.rb(t, o); + if (typeof s?.mtime == "number" && typeof s.etag == "string" && s.etag !== eR && typeof o.mtime == "number" && typeof o.size == "number" && s.mtime < o.mtime && s.etag !== aos({ + mtime: s.mtime, + size: o.size + })) { + throw new vf(f(1930, null), 3, s); + } + return o; + } + async readFile(e, t, s) { + const n = await this.m(e); + if (t?.atomic) { + return this.w(n, e, t, s); + } else { + return this.z(n, e, t, s); + } + } + async w(e, t, s, n) { + return new Promise((r, o) => { + this.cb.queueFor(t, async () => { + try { + const a = await this.z(e, t, s, n); + r(a); + } catch (a) { + o(a); + } + }, this.R(e).providerExtUri); + }); + } + async z(e, t, s, n) { + const r = await this.C(e, t, { + ...s, + preferUnbuffered: true + }, n); + return { + ...r, + value: await kT(r.value) + }; + } + async readFileStream(e, t, s) { + const n = await this.m(e); + return this.C(n, e, t, s); + } + async C(e, t, s, n) { + const r = new Xi(n); + let o = s; + if (CUt(e) && e.enforceAtomicReadFile?.(t)) { + o = { + ...s, + atomic: true + }; + } + const a = this.J(t, o).then(c => c, c => { + r.dispose(true); + throw c; + }); + let l; + try { + if (typeof o?.etag == "string" && o.etag !== eR) { + await a; + } + if (o?.atomic && CUt(e) || !s7(e) && !wUt(e) || VT(e) && o?.preferUnbuffered) { + l = this.I(e, t, o); + } else if (wUt(e)) { + l = this.G(e, t, r.token, o); + } else { + l = this.H(e, t, r.token, o); + } + l.on("end", () => r.dispose()); + l.on("error", () => r.dispose()); + return { + ...(await a), + value: l + }; + } catch (c) { + if (l) { + await lrt(l); + } + throw this.F(c, t, o); + } + } + F(e, t, s) { + const n = f(1931, null, this.sb(t), fz(e).toString()); + if (e instanceof iie) { + return new iie(n, e.stat, s); + } else if (e instanceof r7) { + return new r7(n, e.fileOperationResult, e.size, e.options); + } else { + return new vf(n, ZL(e), s); + } + } + G(e, t, s, n = Object.create(null)) { + const r = e.readFileStream(t, n, s); + return VHn(r, { + data: o => o instanceof Ii ? o : Ii.wrap(o), + error: o => this.F(o, t, n) + }, o => Ii.concat(o)); + } + H(e, t, s, n = Object.create(null)) { + const r = b5t(); + QVo(e, t, r, o => o, { + ...n, + bufferSize: this.a, + errorTransformer: o => this.F(o, t, n) + }, s); + return r; + } + I(e, t, s) { + const n = q2(r => Ii.concat(r)); + (async () => { + try { + let r; + if (s?.atomic && CUt(e)) { + r = await e.readFile(t, { + atomic: true + }); + } else { + r = await e.readFile(t); + } + if (typeof s?.position == "number") { + r = r.slice(s.position); + } + if (typeof s?.length == "number") { + r = r.slice(0, s.length); + } + this.L(t, r.byteLength, s); + n.end(Ii.wrap(r)); + } catch (r) { + n.error(r); + n.end(); + } + })(); + return n; + } + async J(e, t) { + const s = await this.resolve(e, { + resolveMetadata: true + }); + if (s.isDirectory) { + throw new vf(f(1932, null, this.sb(e)), 0, t); + } + if (typeof t?.etag == "string" && t.etag !== eR && t.etag === s.etag) { + throw new iie(f(1933, null), s, t); + } + this.L(e, s.size, t); + return s; + } + L(e, t, s) { + if (typeof s?.limits?.size == "number" && t > s.limits.size) { + throw new r7(f(1934, null, this.sb(e)), 7, t, s); + } + } + async canMove(e, t, s) { + return this.M(e, t, "move", s); + } + async canCopy(e, t, s) { + return this.M(e, t, "copy", s); + } + async M(e, t, s, n) { + if (e.toString() !== t.toString()) { + try { + const r = s === "move" ? this.qb(await this.n(e), e) : await this.m(e); + const o = this.qb(await this.n(t), t); + await this.Q(r, e, o, t, s, n); + } catch (r) { + return r; + } + } + return true; + } + async move(e, t, s) { + const n = this.qb(await this.n(e), e); + const r = this.qb(await this.n(t), t); + const o = await this.N(n, e, r, t, "move", !!s); + const a = await this.resolve(t, { + resolveMetadata: true + }); + this.q.fire(new F4(e, o === "move" ? 2 : 3, a)); + return a; + } + async copy(e, t, s) { + const n = await this.m(e); + const r = this.qb(await this.n(t), t); + const o = await this.N(n, e, r, t, "copy", !!s); + const a = await this.resolve(t, { + resolveMetadata: true + }); + this.q.fire(new F4(e, o === "copy" ? 3 : 2, a)); + return a; + } + async N(e, t, s, n, r, o) { + if (t.toString() === n.toString()) { + return r; + } + const { + exists: a, + isSameResourceWithDifferentPathCase: l + } = await this.Q(e, t, s, n, r, o); + if (a && !l && o) { + await this.del(n, { + recursive: true + }); + } + await this.U(s, this.R(s).providerExtUri.dirname(n)); + if (r === "copy") { + if (e === s && yUt(e)) { + await e.copy(t, n, { + overwrite: o + }); + } else { + const c = await this.resolve(t); + if (c.isDirectory) { + await this.P(e, c, s, n); + } else { + await this.O(e, t, s, n); + } + } + return r; + } else if (e === s) { + await e.rename(t, n, { + overwrite: o + }); + return r; + } else { + await this.N(e, t, s, n, "copy", o); + await this.del(t, { + recursive: true + }); + return "copy"; + } + } + async O(e, t, s, n) { + if (s7(e) && s7(s)) { + return this.jb(e, t, s, n); + } + if (s7(e) && VT(s)) { + return this.pb(e, t, s, n); + } + if (VT(e) && s7(s)) { + return this.nb(e, t, s, n); + } + if (VT(e) && VT(s)) { + return this.lb(e, t, s, n); + } + } + async P(e, t, s, n) { + await s.mkdir(n); + if (Array.isArray(t.children)) { + await Ko.settled(t.children.map(async r => { + const o = this.R(s).providerExtUri.joinPath(n, r.name); + if (r.isDirectory) { + return this.P(e, await this.resolve(r.resource), s, o); + } else { + return this.O(e, r.resource, s, o); + } + })); + } + } + async Q(e, t, s, n, r, o) { + let a = false; + if (e === s) { + const { + providerExtUri: c, + isPathCaseSensitive: u + } = this.R(e); + if (!u) { + a = c.isEqual(t, n); + } + if (a && r === "copy") { + throw new Error(f(1935, null, this.sb(t), this.sb(n))); + } + if (!a && c.isEqualOrParent(n, t)) { + throw new Error(f(1936, null, this.sb(t), this.sb(n))); + } + } + const l = await this.exists(n); + if (l && !a) { + if (!o) { + throw new vf(f(1937, null, this.sb(t), this.sb(n)), 4); + } + if (e === s) { + const { + providerExtUri: c + } = this.R(e); + if (c.isEqualOrParent(t, n)) { + throw new Error(f(1938, null, this.sb(t), this.sb(n))); + } + } + } + return { + exists: l, + isSameResourceWithDifferentPathCase: a + }; + } + R(e) { + const t = this.S(e); + return { + providerExtUri: t ? sr : dM, + isPathCaseSensitive: t + }; + } + S(e) { + return !!(e.capabilities & 1024); + } + async createFolder(e) { + const t = this.qb(await this.j(e), e); + await this.U(t, e); + const s = await this.resolve(e, { + resolveMetadata: true + }); + this.q.fire(new F4(e, 0, s)); + return s; + } + async U(e, t) { + const s = []; + const { + providerExtUri: n + } = this.R(e); + while (!n.isEqual(t, n.dirname(t))) { + try { + if (!((await e.stat(t)).type & wg.Directory)) { + throw new Error(f(1939, null, this.sb(t))); + } + break; + } catch (r) { + if (ame(r) !== io.FileNotFound) { + throw r; + } + s.push(n.basename(t)); + t = n.dirname(t); + } + } + for (let r = s.length - 1; r >= 0; r--) { + t = n.joinPath(t, s[r]); + try { + await e.mkdir(t); + } catch (o) { + if (ame(o) !== io.FileExists) { + throw o; + } + } + } + } + async canDelete(e, t) { + try { + await this.W(e, t); + } catch (s) { + return s; + } + return true; + } + async W(e, t) { + const s = this.qb(await this.j(e), e); + const n = !!t?.useTrash; + if (n && !(s.capabilities & 4096)) { + throw new Error(f(1940, null, this.sb(e))); + } + const r = t?.atomic; + if (r && !(s.capabilities & 65536)) { + throw new Error(f(1941, null, this.sb(e))); + } + if (n && r) { + throw new Error(f(1942, null, this.sb(e))); + } + let o; + try { + o = await s.stat(e); + } catch {} + if (o) { + this.rb(e, o); + } else { + throw new vf(f(1943, null, this.sb(e)), 1); + } + if (!t?.recursive) { + const l = await this.resolve(e); + if (l.isDirectory && Array.isArray(l.children) && l.children.length > 0) { + throw new Error(f(1944, null, this.sb(e))); + } + } + return s; + } + async del(e, t) { + const s = await this.W(e, t); + let n = t; + if (YYn(s) && !n?.atomic) { + const l = s.enforceAtomicDelete?.(e); + if (l) { + n = { + ...t, + atomic: l + }; + } + } + const r = !!n?.useTrash; + const o = !!n?.recursive; + const a = n?.atomic ?? false; + await s.delete(e, { + recursive: o, + useTrash: r, + atomic: a + }); + this.q.fire(new F4(e, 1)); + } + async cloneFile(e, t) { + const s = await this.j(e); + const n = this.qb(await this.n(t), t); + if (s !== n || !this.R(s).providerExtUri.isEqual(e, t)) { + if (s === n && nos(s)) { + return s.cloneFile(e, t); + } else { + await this.U(n, this.R(n).providerExtUri.dirname(t)); + if (s === n && yUt(s)) { + return this.cb.queueFor(e, () => s.copy(e, t, { + overwrite: true + }), this.R(s).providerExtUri); + } else { + return this.cb.queueFor(e, () => this.O(s, e, n, t), this.R(s).providerExtUri); + } + } + } + } + static { + this.ab = 0; + } + createWatcher(e, t) { + return this.watch(e, { + ...t, + correlationId: QBi.ab++ + }); + } + watch(e, t = { + recursive: false, + excludes: [] + }) { + const s = new Q(); + let n = false; + let r = () => { + n = true; + }; + s.add(Ue(() => r())); + (async () => { + try { + const a = await this.bb(e, t); + if (n) { + si(a); + } else { + r = () => si(a); + } + } catch (a) { + this.b.error(a); + } + })(); + const o = t.correlationId; + if (typeof o == "number") { + const a = s.add(new B()); + s.add(this.X.event(c => { + if (c.correlates(o)) { + a.fire(c); + } + })); + return { + onDidChange: a.event, + dispose: () => s.dispose() + }; + } + return s; + } + async bb(e, t) { + const s = await this.j(e); + const n = Qc([this.R(s).providerExtUri.getComparisonKey(e), t]); + let r = this.$.get(n); + if (!r) { + r = { + count: 0, + disposable: s.watch(e, t) + }; + this.$.set(n, r); + } + r.count += 1; + return Ue(() => { + if (r) { + r.count--; + if (r.count === 0) { + si(r.disposable); + this.$.delete(n); + } + } + }); + } + dispose() { + super.dispose(); + for (const [, e] of this.$) { + si(e.disposable); + } + this.$.clear(); + } + async db(e, t, s, n) { + return this.cb.queueFor(t, async () => { + const r = await e.open(t, { + create: true, + unlock: s?.unlock ?? false + }); + try { + if (oee(n) || g5t(n)) { + await this.eb(e, r, n); + } else { + await this.fb(e, r, n); + } + } catch (o) { + throw fz(o); + } finally { + await e.close(r); + } + }, this.R(e).providerExtUri); + } + async eb(e, t, s) { + let n = 0; + let r; + if (g5t(s)) { + if (s.buffer.length > 0) { + const o = Ii.concat(s.buffer); + await this.gb(e, t, o, o.byteLength, n, 0); + n += o.byteLength; + } + if (s.ended) { + return; + } + r = s.stream; + } else { + r = s; + } + return new Promise((o, a) => { + Yq(r, { + onData: async l => { + r.pause(); + try { + await this.gb(e, t, l, l.byteLength, n, 0); + } catch (c) { + return a(c); + } + n += l.byteLength; + setTimeout(() => r.resume()); + }, + onError: l => a(l), + onEnd: () => o() + }); + }); + } + async fb(e, t, s) { + let n = 0; + let r; + while ((r = s.read()) !== null) { + await this.gb(e, t, r, r.byteLength, n, 0); + n += r.byteLength; + } + } + async gb(e, t, s, n, r, o) { + let a = 0; + while (a < n) { + const l = await e.write(t, r + a, s.buffer, o + a, n - a); + a += l; + } + } + async hb(e, t, s, n) { + return this.cb.queueFor(t, () => this.ib(e, t, s, n), this.R(e).providerExtUri); + } + async ib(e, t, s, n) { + let r; + if (n instanceof Ii) { + r = n; + } else if (oee(n)) { + r = await kT(n); + } else if (g5t(n)) { + r = await YHn(n); + } else { + r = Rzi(n); + } + await e.writeFile(t, r.buffer, { + create: true, + overwrite: true, + unlock: s?.unlock ?? false, + atomic: s?.atomic ?? false + }); + } + async jb(e, t, s, n) { + return this.cb.queueFor(n, () => this.kb(e, t, s, n), this.R(s).providerExtUri); + } + async kb(e, t, s, n) { + let r; + let o; + try { + r = await e.open(t, { + create: false + }); + o = await s.open(n, { + create: true, + unlock: false + }); + const a = Ii.alloc(this.a); + let l = 0; + let c = 0; + let u = 0; + do { + u = await e.read(r, l, a.buffer, c, a.byteLength - c); + await this.gb(s, o, a, u, l, c); + l += u; + c += u; + if (c === a.byteLength) { + c = 0; + } + } while (u > 0); + } catch (a) { + throw fz(a); + } finally { + await Ko.settled([typeof r == "number" ? e.close(r) : Promise.resolve(), typeof o == "number" ? s.close(o) : Promise.resolve()]); + } + } + async lb(e, t, s, n) { + return this.cb.queueFor(n, () => this.mb(e, t, s, n), this.R(s).providerExtUri); + } + async mb(e, t, s, n) { + return s.writeFile(n, await e.readFile(t), { + create: true, + overwrite: true, + unlock: false, + atomic: false + }); + } + async nb(e, t, s, n) { + return this.cb.queueFor(n, () => this.ob(e, t, s, n), this.R(s).providerExtUri); + } + async ob(e, t, s, n) { + const r = await s.open(n, { + create: true, + unlock: false + }); + try { + const o = await e.readFile(t); + await this.gb(s, r, Ii.wrap(o), o.byteLength, 0, 0); + } catch (o) { + throw fz(o); + } finally { + await s.close(r); + } + } + async pb(e, t, s, n) { + const r = await kT(this.H(e, t, mt.None)); + await this.hb(s, n, undefined, r); + } + qb(e, t) { + if (e.capabilities & 2048) { + throw new vf(f(1945, null, this.sb(t)), 6); + } + return e; + } + rb(e, t) { + if ((t.permissions ?? 0) & $4.Readonly) { + throw new vf(f(1946, null, this.sb(e)), 6); + } + } + sb(e) { + if (e.scheme === me.file) { + return e.fsPath; + } else { + return e.toString(true); + } + } +}; +ZBi = QBi = __decorate([__param(0, Bt)], ZBi); +Nt(); +Ut(); +q(); +At(); +nr(); +Yd(); +Ut(); +pe(); +q(); +OL(); +Ps(); +Nt(); +Qp(); +q(); +pn(); +rt(); +Le(); +Nt(); +function tHo(i) { + return i.recursive === true; +} +var iHo = class n3n extends H { + static { + this.a = 5; + } + constructor(e, t, s, n) { + super(); + this.h = e; + this.j = t; + this.m = s; + this.n = n; + this.c = this.D(new ki()); + this.f = undefined; + this.g = 0; + } + r() { + const e = new Q(); + this.c.value = e; + this.b = this.q(e); + this.b.setVerboseLogging(this.m); + e.add(this.b.onDidChangeFile(t => this.h(t))); + e.add(this.b.onDidLogMessage(t => this.j(t))); + e.add(this.b.onDidError(t => this.s(t.error, t.request))); + } + s(e, t) { + if (this.t(e, t)) { + if (this.g < n3n.a && this.f) { + this.w(`restarting watcher after unexpected error: ${e}`); + this.u(this.f); + } else { + this.w(`gave up attempting to restart watcher after unexpected error: ${e}`); + } + } else { + this.w(e); + } + } + t(e, t) { + return !!this.n.restartOnError && !t && e.indexOf("No space left on device") === -1 && e.indexOf("EMFILE") === -1; + } + u(e) { + this.g++; + this.r(); + this.watch(e); + } + async watch(e) { + this.f = e; + await this.b?.watch(e); + } + async setVerboseLogging(e) { + this.m = e; + await this.b?.setVerboseLogging(e); + } + w(e) { + this.j({ + type: "error", + message: `[File Watcher (${this.n.type})] ${e}` + }); + } + y(e) { + this.j({ + type: "trace", + message: `[File Watcher (${this.n.type})] ${e}` + }); + } + dispose() { + this.b = undefined; + return super.dispose(); + } +}; +var sHo = class extends iHo { + constructor(i, e, t) { + super(i, e, t, { + type: "universal", + restartOnError: true + }); + } +}; +function e4i(i) { + return i.map(e => ({ + type: e.type, + resource: V.revive(e.resource), + cId: e.cId + })); +} +var nHo = "localFilesystem"; +var _Mn = class extends H { + constructor(i, e) { + super(); + this.a = i; + this.b = e; + this.onDidChangeCapabilities = de.None; + this.f = this.D(new B()); + this.onDidChangeFile = this.f.event; + this.g = this.D(new B()); + this.onDidWatchError = this.g.event; + this.h = Ft(); + this.j(); + } + get capabilities() { + if (!this.c) { + this.c = 253982; + if (this.b.pathCaseSensitive) { + this.c |= 1024; + } + if (this.b.trash) { + this.c |= 4096; + } + } + return this.c; + } + stat(i) { + return this.a.call("stat", [i]); + } + readdir(i) { + return this.a.call("readdir", [i]); + } + async readFile(i, e) { + const { + buffer: t + } = await this.a.call("readFile", [i, e]); + return t; + } + readFileStream(i, e, t) { + const s = q2(r => Ii.concat(r.map(o => Ii.wrap(o))).buffer); + const n = new Q(); + n.add(this.a.listen("readFileStream", [i, e])(r => { + if (r instanceof Ii) { + s.write(r.buffer); + } else { + if (r === "end") { + s.end(); + } else { + let o; + if (r instanceof Error) { + o = r; + } else { + const a = r; + o = wp(a.message ?? ou(a), a.code ?? io.Unknown); + } + s.error(o); + s.end(); + } + n.dispose(); + } + })); + n.add(t.onCancellationRequested(() => { + s.error(SL()); + s.end(); + n.dispose(); + })); + return s; + } + writeFile(i, e, t) { + return this.a.call("writeFile", [i, Ii.wrap(e), t]); + } + open(i, e) { + return this.a.call("open", [i, e]); + } + close(i) { + return this.a.call("close", [i]); + } + async read(i, e, t, s, n) { + const [r, o] = await this.a.call("read", [i, e, n]); + t.set(r.buffer.slice(0, o), s); + return o; + } + write(i, e, t, s, n) { + return this.a.call("write", [i, e, Ii.wrap(t), s, n]); + } + mkdir(i) { + return this.a.call("mkdir", [i]); + } + delete(i, e) { + return this.a.call("delete", [i, e]); + } + rename(i, e, t) { + return this.a.call("rename", [i, e, t]); + } + copy(i, e, t) { + return this.a.call("copy", [i, e, t]); + } + cloneFile(i, e) { + return this.a.call("cloneFile", [i, e]); + } + j() { + this.D(this.a.listen("fileChange", [this.h])(i => { + if (Array.isArray(i)) { + const e = i; + this.f.fire(e4i(e)); + } else { + const e = i; + this.g.fire(e); + } + })); + } + watch(i, e) { + const t = Ft(); + this.a.call("watch", [this.h, t, i, e]); + return Ue(() => this.a.call("unwatch", [this.h, t])); + } +}; +var rHo = "remoteFilesystem"; +var oHo = class r3n extends _Mn { + static register(e, t, s) { + const n = e.getConnection(); + if (!n) { + return H.None; + } + const r = new Q(); + const o = (async () => { + try { + const a = await e.getRawEnvironment(); + if (a) { + t.registerProvider(me.vscodeRemote, r.add(new r3n(a, n))); + } else { + s.error("Cannot register remote filesystem provider. Remote environment doesnot exist."); + } + } catch (a) { + s.error("Cannot register remote filesystem provider. Error while fetching remote environment.", cc(a)); + } + })(); + r.add(t.onWillActivateFileSystemProvider(a => { + if (a.scheme === me.vscodeRemote) { + a.join(o); + } + })); + return r; + } + constructor(e, t) { + super(t.getChannel(rHo), { + pathCaseSensitive: e.os === 3 + }); + } +}; +Et(); +nr(); +nt(); +var aHo = class { + constructor(i, e, t) { + this.c = i; + this.d = t; + this.b = new Map(); + this.a = e.cacheHome; + } + needsCaching(i) { + return !this.c.includes(i.scheme); + } + read(i) { + return this.f(i).read(); + } + write(i, e) { + return this.f(i).save(e); + } + remove(i) { + return this.f(i).remove(); + } + f({ + type: i, + key: e + }) { + const t = `${i}:${e}`; + let s = this.b.get(t); + if (!s) { + s = new lHo({ + type: i, + key: e + }, this.a, this.d); + this.b.set(t, s); + } + return s; + } +}; +var lHo = class { + constructor({ + type: i, + key: e + }, t, s) { + this.d = s; + this.b = Li(t, "CachedConfigurations", i, e); + this.c = Li(this.b, i === "workspaces" ? "workspace.json" : "configuration.json"); + this.a = new wT(); + } + async read() { + try { + return (await this.d.readFile(this.c)).value.toString(); + } catch { + return ""; + } + } + async save(i) { + if (await this.f()) { + await this.a.queue(async () => { + await this.d.writeFile(this.c, Ii.fromString(i)); + }); + } + } + async remove() { + try { + await this.a.queue(() => this.d.del(this.b, { + recursive: true, + useTrash: false + })); + } catch (i) { + if (i.fileOperationResult !== 1) { + throw i; + } + } + } + async f() { + if (await this.d.exists(this.b)) { + return true; + } + try { + await this.d.createFolder(this.b); + return true; + } catch { + return false; + } + } +}; +kn(); +Un(); +Un(); +It(); +Nt(); +Et(); +var BMn; +var t4i = class { + constructor(i, e, t) { + this.level = i; + this.key = e; + this.value = t; + this.forward = []; + } +}; +var sPe = undefined; +var cHo = class phe { + constructor(e, t = 65536) { + this.comparator = e; + this[BMn] = "SkipList"; + this.d = 0; + this.f = 0; + this.c = Math.max(1, Math.log2(t) | 0); + this.e = new t4i(this.c, sPe, sPe); + } + get size() { + return this.f; + } + clear() { + this.e = new t4i(this.c, sPe, sPe); + this.f = 0; + } + has(e) { + return !!phe.g(this, e, this.comparator); + } + get(e) { + return phe.g(this, e, this.comparator)?.value; + } + set(e, t) { + if (phe.h(this, e, t, this.comparator)) { + this.f += 1; + } + return this; + } + delete(e) { + const t = phe.k(this, e, this.comparator); + if (t) { + this.f -= 1; + } + return t; + } + forEach(e, t) { + let s = this.e.forward[0]; + while (s) { + e.call(t, s.value, s.key, this); + s = s.forward[0]; + } + } + [(BMn = Symbol.toStringTag, Symbol.iterator)]() { + return this.entries(); + } + *entries() { + let e = this.e.forward[0]; + while (e) { + yield [e.key, e.value]; + e = e.forward[0]; + } + } + *keys() { + let e = this.e.forward[0]; + while (e) { + yield e.key; + e = e.forward[0]; + } + } + *values() { + let e = this.e.forward[0]; + while (e) { + yield e.value; + e = e.forward[0]; + } + } + toString() { + let e = "[SkipList]:"; + let t = this.e.forward[0]; + while (t) { + e += `node(${t.key}, ${t.value}, lvl:${t.level})`; + t = t.forward[0]; + } + return e; + } + static g(e, t, s) { + let n = e.e; + for (let r = e.d - 1; r >= 0; r--) { + while (n.forward[r] && s(n.forward[r].key, t) < 0) { + n = n.forward[r]; + } + } + n = n.forward[0]; + if (n && s(n.key, t) === 0) { + return n; + } + } + static h(e, t, s, n) { + const r = []; + let o = e.e; + for (let a = e.d - 1; a >= 0; a--) { + while (o.forward[a] && n(o.forward[a].key, t) < 0) { + o = o.forward[a]; + } + r[a] = o; + } + o = o.forward[0]; + if (o && n(o.key, t) === 0) { + o.value = s; + return false; + } + { + const a = phe.j(e); + if (a > e.d) { + for (let l = e.d; l < a; l++) { + r[l] = e.e; + } + e.d = a; + } + o = new t4i(a, t, s); + for (let l = 0; l < a; l++) { + o.forward[l] = r[l].forward[l]; + r[l].forward[l] = o; + } + return true; + } + } + static j(e, t = 0.5) { + let s = 1; + while (Math.random() < t && s < e.c) { + s += 1; + } + return s; + } + static k(e, t, s) { + const n = []; + let r = e.e; + for (let o = e.d - 1; o >= 0; o--) { + while (r.forward[o] && s(r.forward[o].key, t) < 0) { + r = r.forward[o]; + } + n[o] = r; + } + r = r.forward[0]; + if (!r || s(r.key, t) !== 0) { + return false; + } + for (let o = 0; o < e.d && n[o].forward[o] === r; o++) { + n[o].forward[o] = r.forward[o]; + } + while (e.d > 0 && e.e.forward[e.d - 1] === sPe) { + e.d -= 1; + } + return true; + } +}; +pe(); +q(); +var UMn = class iUi { + static { + this._clock = 0; + } + constructor(e) { + this.uri = e; + this.time = iUi._clock++; + } + touch() { + this.time = iUi._clock++; + return this; + } +}; +var j$t = class { + constructor(e) { + this.g = e; + this.c = new Q(); + this.f = 65536; + const t = new Map(); + const s = n => { + let r = t.get(n.scheme); + if (r === undefined) { + r = e.hasProvider(n) && !this.g.hasCapability(n, 1024); + t.set(n.scheme, r); + } + return r; + }; + this.c.add(de.any(e.onDidChangeFileSystemProviderRegistrations, e.onDidChangeFileSystemProviderCapabilities)(n => { + t.delete(n.scheme); + })); + this.extUri = new hfe(s); + this.d = new cHo((n, r) => this.extUri.compare(n, r, true), this.f); + } + dispose() { + this.c.dispose(); + this.d.clear(); + } + asCanonicalUri(e) { + if (this.g.hasProvider(e)) { + e = Jnt(e); + } + const t = this.d.get(e); + if (t) { + return t.touch().uri.with({ + fragment: e.fragment + }); + } else { + this.d.set(e, new UMn(e)); + this.h(); + return e; + } + } + h() { + if (this.d.size < this.f) { + return; + } + const e = [...this.d.entries()].sort((s, n) => s[1].time < n[1].time ? 1 : s[1].time > n[1].time ? -1 : 0); + UMn._clock = 0; + this.d.clear(); + const t = this.f * 0.5; + for (let s = 0; s < t; s++) { + this.d.set(e[s][0], e[s][1].touch()); + } + } +}; +j$t = __decorate([__param(0, Ct)], j$t); +it(_s, j$t, 1); +q(); +pe(); +rt(); +te(); +var WMn = Ve("nativeKeyboardLayoutService"); +var i4i = class extends H { + constructor(e) { + super(); + this.c = this.D(new B()); + this.onDidChangeKeyboardLayout = this.c.event; + this.f = YE.toService(e.getChannel("keyboardLayout")); + this.g = null; + this.h = null; + this.j = null; + this.D(this.f.onDidChangeKeyboardLayout(async ({ + keyboardLayoutInfo: t, + keyboardMapping: s + }) => { + await this.initialize(); + if (!uHo(this.h, s)) { + this.h = s; + this.j = t; + this.c.fire(); + } + })); + } + initialize() { + this.g ||= this.m(); + return this.g; + } + async m() { + const e = await this.f.getKeyboardLayoutData(); + const { + keyboardLayoutInfo: t, + keyboardMapping: s + } = e; + this.h = s; + this.j = t; + } + getRawKeyboardMapping() { + return this.h; + } + getCurrentKeyboardLayout() { + return this.j; + } +}; +i4i = __decorate([__param(0, dT)], i4i); +function uHo(i, e) { + if (Ia === 1) { + return llo(i, e); + } else { + return ulo(i, e); + } +} +q(); +nr(); +pe(); +var dHo = class { + constructor(i, e) { + this.a = i; + this.onMessage = e; + } + send(i) { + try { + this.a.send("vscode:message", i.buffer); + } catch {} + } + disconnect() { + this.a.send("vscode:disconnect", null); + } +}; +var hHo = class o3n extends rbi { + static f() { + const e = de.fromNodeEventEmitter(Td, "vscode:message", (t, s) => Ii.wrap(s)); + Td.send("vscode:hello"); + return new dHo(Td, e); + } + constructor(e) { + const t = o3n.f(); + super(t, e); + this.b = t; + } + dispose() { + this.b.disconnect(); + super.dispose(); + } +}; +var fHo = class extends H { + constructor(i) { + super(); + this.a = this.D(new hHo(`window:${i}`)); + } + getChannel(i) { + return this.a.getChannel(i); + } + registerChannel(i, e) { + this.a.registerChannel(i, e); + } + sendRawMessage(i, e) { + Td.invoke(i); + } +}; +Zt(); +q(); +X(); +q(); +Zt(); +var VMn = class extends H { + constructor(i, e = []) { + super(); + this.a = new EGi([i, ...e]); + this.D(i.onDidChangeLogLevel(t => this.setLevel(t))); + } + get onDidChangeLogLevel() { + return this.a.onDidChangeLogLevel; + } + setLevel(i) { + this.a.setLevel(i); + } + getLevel() { + return this.a.getLevel(); + } + trace(i, ...e) { + this.a.trace(i, ...e); + } + debug(i, ...e) { + this.a.debug(i, ...e); + } + info(i, ...e) { + this.a.info(i, ...e); + } + warn(i, ...e) { + this.a.warn(i, ...e); + } + error(i, ...e) { + this.a.error(i, ...e); + } + flush() { + this.a.flush(); + } +}; +cnt(); +dc(); +var gHo = class { + constructor(i) { + this.a = i; + this.onDidChangeLogLevel = this.a.onDidChangeLogLevel; + } + getLevel() { + return this.a.getLevel(); + } + setLevel(i) { + this.a.setLevel(i); + } + trace(i, ...e) { + this.a.trace(i, ...e); + } + debug(i, ...e) { + this.a.debug(i, ...e); + } + info(i, ...e) { + this.a.info(i, ...e); + } + warn(i, ...e) { + this.a.warn(i, ...e); + } + error(i, ...e) { + this.a.error(i, ...e); + if (!!M0().enabled && !(Math.random() >= M0().loggerSampleRate)) { + if (i instanceof Error) { + j4t(i); + return; + } + for (const t of e) { + if (t instanceof Error) { + j4t(t); + return; + } + } + } + } + flush() { + this.a.flush(); + } + dispose() { + this.a.dispose(); + } +}; +var pHo = class extends VMn { + constructor(i, e) { + const t = new Q(); + const s = i.createLogger(e.logFile, { + id: Pni, + name: f(13125, null) + }); + const n = t.add(new gHo(s)); + let r; + if (e.isExtensionDevelopment && e.extensionTestsLocationURI) { + r = i.createConsoleMainLogger(); + } else { + r = new xGi(n.getLevel()); + } + super(n, [r]); + this.D(t); + } +}; +Jr(); +rt(); +At(); +X(); +rt(); +Jt(); +nt(); +Ut(); +pe(); +zb(); +q(); +pn(); +Zt(); +var mHo = class extends H { + constructor(i, e) { + super(); + this.a = i; + this.b = e; + this.c = this.D(new B()); + this.onDidChangeFile = this.c.event; + this.g = this.D(new B()); + this.onDidWatchError = this.g.event; + this.j = []; + this.m = this.D(new Bm(0)); + this.w = []; + this.y = this.D(new Bm(0)); + } + watch(i, e) { + if (e.recursive || this.b?.watcher?.forceUniversal) { + return this.n(i, e); + } else { + return this.z(i, e); + } + } + n(i, e) { + const t = this.q(i, e); + const s = xL(this.j, t); + this.r(); + return Ue(() => { + s(); + this.r(); + }); + } + q(i, e) { + const t = { + path: this.L(i), + excludes: e.excludes, + includes: e.includes, + recursive: e.recursive, + filter: e.filter, + correlationId: e.correlationId + }; + if (tHo(t)) { + const s = this.b?.watcher?.recursive?.usePolling; + if (s === true) { + t.pollingInterval = this.b?.watcher?.recursive?.pollingInterval ?? 5000; + } else if (Array.isArray(s) && s.includes(t.path)) { + t.pollingInterval = this.b?.watcher?.recursive?.pollingInterval ?? 5000; + } + } + return t; + } + r() { + this.m.trigger(() => this.s()).catch(i => xs(i)); + } + s() { + if (!this.h) { + this.h = this.D(this.t(i => this.c.fire(e4i(i)), i => this.H(i), this.a.getLevel() === pr.Trace)); + this.D(this.a.onDidChangeLogLevel(() => { + this.h?.setVerboseLogging(this.a.getLevel() === pr.Trace); + })); + } + return this.h.watch(this.j); + } + z(i, e) { + const t = { + path: this.L(i), + excludes: e.excludes, + includes: e.includes, + recursive: false, + filter: e.filter, + correlationId: e.correlationId + }; + const s = xL(this.w, t); + this.C(); + return Ue(() => { + s(); + this.C(); + }); + } + C() { + this.y.trigger(() => this.F()).catch(i => xs(i)); + } + F() { + if (!this.u) { + this.u = this.D(this.G(i => this.c.fire(e4i(i)), i => this.H(i), this.a.getLevel() === pr.Trace)); + this.D(this.a.onDidChangeLogLevel(() => { + this.u?.setVerboseLogging(this.a.getLevel() === pr.Trace); + })); + } + return this.u.watch(this.w); + } + H(i) { + if (i.type === "error") { + this.g.fire(i.message); + } + this.I(i); + } + I(i) { + this.a[i.type](i.message); + } + J(i) { + return My(i.fsPath); + } + L(i) { + const e = this.J(i); + return dHn(e); + } +}; +var bHo = class extends sHo { + constructor(i, e, t, s) { + super(i, e, t); + this.C = s; + this.r(); + } + q(i) { + return YE.toService(Jxt((async () => { + const { + client: t, + onDidTerminate: s + } = i.add(await this.C.createWorker({ + moduleId: "vs/platform/files/node/watcher/watcherMain", + type: "fileWatcher" + })); + s.then(({ + reason: n + }) => { + if (n?.code === 0) { + this.y(`terminated by itself with code ${n.code}, signal: ${n.signal}`); + } else { + this.s(`terminated by itself unexpectedly with code ${n?.code}, signal: ${n?.signal} (ETERM)`); + } + }); + return t.getChannel("watcher"); + })())); + } +}; +var vHo = class extends mHo { + constructor(i, e, t, s) { + super(t, { + watcher: { + forceUniversal: true + } + }); + this.M = i; + this.N = e; + this.O = s; + this.f = this.D(new _Mn(this.M.getChannel(nHo), { + pathCaseSensitive: yl, + trash: true + })); + this.S = undefined; + this.P(); + } + P() { + this.D(this.f.onDidChangeFile(i => this.c.fire(i))); + this.D(this.f.onDidWatchError(i => this.g.fire(i))); + } + get onDidChangeCapabilities() { + return this.f.onDidChangeCapabilities; + } + get capabilities() { + return this.f.capabilities; + } + stat(i) { + return this.f.stat(i); + } + readdir(i) { + return this.f.readdir(i); + } + readFile(i, e) { + return this.f.readFile(i, e); + } + readFileStream(i, e, t) { + return this.f.readFileStream(i, e, t); + } + writeFile(i, e, t) { + return this.f.writeFile(i, e, t); + } + open(i, e) { + return this.f.open(i, e); + } + close(i) { + return this.f.close(i); + } + read(i, e, t, s, n) { + return this.f.read(i, e, t, s, n); + } + write(i, e, t, s, n) { + return this.f.write(i, e, t, s, n); + } + mkdir(i) { + return this.f.mkdir(i); + } + delete(i, e) { + return this.f.delete(i, e); + } + rename(i, e, t) { + return this.f.rename(i, e, t); + } + copy(i, e, t) { + return this.f.copy(i, e, t); + } + cloneFile(i, e) { + return this.f.cloneFile(i, e); + } + t(i, e, t) { + return new bHo(s => i(s), s => e(s), t, this.N); + } + G() { + throw new Error("Method not implemented in sandbox."); + } + get U() { + this.S ||= new VMn(this.O.createLogger("fileWatcher", { + name: f(13018, null) + })); + return this.S; + } + I(i) { + this.U[i.type](i.message); + if (i.type !== "trace" && i.type !== "debug") { + super.I(i); + } + } +}; +pe(); +q(); +Nt(); +HI(); +In(); +var yHo = class extends H { + constructor(i, e, t, s, n, r) { + super(); + this.f = i; + this.g = e; + this.h = t; + this.j = s; + this.m = n; + this.n = r; + this.capabilities = this.g.capabilities; + this.onDidChangeCapabilities = this.g.onDidChangeCapabilities; + this.a = this.D(new B()); + this.onDidChangeFile = this.a.event; + this.b = Ww.forUris(() => !(this.capabilities & 1024)); + this.c = new Yf(o => this.m.extUri.getComparisonKey(this.s(o))); + this.q(); + this.D(s.onDidChangeProfiles(() => this.q())); + this.D(this.g.onDidChangeFile(o => this.r(o))); + } + q() { + this.c.clear(); + for (const i of this.j.profiles) { + this.c.add(i.settingsResource); + this.c.add(i.keybindingsResource); + this.c.add(i.tasksResource); + this.c.add(i.extensionsResource); + } + } + open(i, e) { + return this.g.open(this.s(i), e); + } + close(i) { + return this.g.close(i); + } + read(i, e, t, s, n) { + return this.g.read(i, e, t, s, n); + } + write(i, e, t, s, n) { + return this.g.write(i, e, t, s, n); + } + watch(i, e) { + this.b.set(i, i); + const t = this.g.watch(this.s(i), e); + return Ue(() => { + this.b.delete(i); + t.dispose(); + }); + } + stat(i) { + return this.g.stat(this.s(i)); + } + mkdir(i) { + return this.g.mkdir(this.s(i)); + } + rename(i, e, t) { + return this.g.rename(this.s(i), this.s(e), t); + } + readFile(i, e) { + return this.g.readFile(this.s(i), e); + } + readFileStream(i, e, t) { + return this.g.readFileStream(this.s(i), e, t); + } + readdir(i) { + return this.g.readdir(this.s(i)); + } + enforceAtomicReadFile(i) { + return this.c.has(i); + } + writeFile(i, e, t) { + return this.g.writeFile(this.s(i), e, t); + } + enforceAtomicWriteFile(i) { + if (this.c.has(i)) { + return { + postfix: ".vsctmp" + }; + } else { + return false; + } + } + delete(i, e) { + return this.g.delete(this.s(i), e); + } + copy(i, e, t) { + if (yUt(this.g)) { + return this.g.copy(this.s(i), this.s(e), t); + } + throw new Error("copy not supported"); + } + cloneFile(i, e) { + if (nos(this.g)) { + return this.g.cloneFile(this.s(i), this.s(e)); + } + throw new Error("clone not supported"); + } + r(i) { + const e = []; + for (const t of i) { + if (t.resource.scheme !== this.f) { + continue; + } + const s = this.t(t.resource); + if (this.b.findSubstr(s)) { + e.push({ + resource: s, + type: t.type, + cId: t.cId + }); + } + } + if (e.length) { + this.n.debug("User data changed"); + this.a.fire(e); + } + } + s(i) { + return i.with({ + scheme: this.f + }); + } + t(i) { + return i.with({ + scheme: this.h + }); + } +}; +mu(); +pe(); +q(); +var wHo = class extends AVo { + constructor(i, e) { + super(); + this.a = e; + for (const t in i) { + const { + definition: s, + value: n + } = i[t]; + this.f[t] = s; + if (n !== undefined) { + this.g.set(t, n); + } + } + this.a.listen("onDidChange")(t => { + for (const s in t) { + const n = t[s]; + if (n === null) { + this.g.delete(s); + } else { + this.g.set(s, n); + } + } + this.h.fire(Object.keys(t)); + }); + } + async j(i) { + const e = await this.a.call("updatePolicyDefinitions", i); + for (const t in e) { + this.g.set(t, e[t]); + } + } +}; +nt(); +pe(); +q(); +Jr(); +var CHo = class extends H { + get currentProfile() { + return this.b; + } + constructor(i) { + super(); + this.a = this.D(new B()); + this.onDidChangeCurrentProfile = this.a.event; + this.b = i; + } + async updateCurrentProfile(i) { + if (Ul(this.b, i)) { + return; + } + const e = this.b; + this.b = i; + const t = []; + this.a.fire({ + previous: e, + profile: i, + join(s) { + t.push(s); + } + }); + await Ko.settled(t); + } +}; +xe(); +nt(); +nr(); +pe(); +q(); +fr(); +var SHo = class extends H { + traceSocketEvent(i, e) { + ike.traceSocketEvent(this.h, this.g, i, e); + } + constructor(i, e) { + super(); + this.a = new B(); + this.onData = this.a.event; + this.b = this.D(new B()); + this.onOpen = this.b.event; + this.c = this.D(new B()); + this.onClose = this.c.event; + this.f = this.D(new B()); + this.onError = this.f.event; + this.g = e; + this.h = new WebSocket(i); + this.traceSocketEvent("created", { + type: "BrowserWebSocket", + url: i + }); + this.j = new FileReader(); + this.m = []; + this.n = false; + this.q = false; + this.j.onload = l => { + this.n = false; + const c = l.target.result; + this.traceSocketEvent("read", c); + this.a.fire(c); + if (this.m.length > 0) { + t(this.m.shift()); + } + }; + const t = l => { + if (this.n) { + this.m.push(l); + return; + } + this.n = true; + this.j.readAsArrayBuffer(l); + }; + this.r = l => { + const c = l.data; + this.traceSocketEvent("browserWebSocketBlobReceived", { + type: c.type, + size: c.size + }); + t(c); + }; + this.h.addEventListener("message", this.r); + this.D(Ce(this.h, "open", l => { + this.traceSocketEvent("open"); + this.b.fire(); + })); + let s = null; + const n = () => { + const l = s; + s = null; + this.f.fire(l); + }; + const r = this.D(new Vn(n, 0)); + const o = l => { + r.cancel(); + s = l; + r.schedule(); + }; + const a = l => { + r.cancel(); + s = l; + n(); + }; + this.D(Ce(this.h, "close", l => { + this.traceSocketEvent("close", { + code: l.code, + reason: l.reason, + wasClean: l.wasClean + }); + this.q = true; + if (s) { + if (navigator.onLine) { + if (l.wasClean) { + r.cancel(); + n(); + } else { + a(new $R(l.reason || `WebSocket close with status code ${l.code}`, kE.TemporarilyNotAvailable, l)); + } + } else { + a(new $R("Browser is offline", kE.TemporarilyNotAvailable, l)); + } + } + this.c.fire({ + code: l.code, + reason: l.reason, + wasClean: l.wasClean, + event: l + }); + })); + this.D(Ce(this.h, "error", l => { + this.traceSocketEvent("error", { + message: l?.message + }); + o(l); + })); + } + send(i) { + if (!this.q) { + this.traceSocketEvent("write", i); + this.h.send(i); + } + } + close() { + this.q = true; + this.traceSocketEvent("close"); + this.h.close(); + this.h.removeEventListener("message", this.r); + this.dispose(); + } +}; +var xHo = new class { + create(i, e) { + return new SHo(i, e); + } +}(); +var kHo = class { + traceSocketEvent(i, e) { + if (typeof this.socket.traceSocketEvent == "function") { + this.socket.traceSocketEvent(i, e); + } else { + ike.traceSocketEvent(this.socket, this.debugLabel, i, e); + } + } + constructor(i, e) { + this.socket = i; + this.debugLabel = e; + } + dispose() { + this.socket.close(); + } + onData(i) { + return this.socket.onData(e => i(Ii.wrap(new Uint8Array(e)))); + } + onClose(i) { + const e = t => { + i(typeof t === "undefined" ? t : { + type: 1, + code: t.code, + reason: t.reason, + wasClean: t.wasClean, + event: t.event + }); + }; + return this.socket.onClose(e); + } + onEnd(i) { + return H.None; + } + write(i) { + this.socket.send(i.buffer); + } + end() { + this.socket.close(); + } + drain() { + return Promise.resolve(); + } +}; +var EHo = class { + constructor(i) { + this.a = i || xHo; + } + supports(i) { + return true; + } + connect({ + host: i, + port: e + }, t, s, n) { + return new Promise((r, o) => { + const a = /^https:/.test(xt.location.href) ? "wss" : "ws"; + const l = this.a.create(`${a}://${/:/.test(i) && !/\[/.test(i) ? `[${i}]` : i}:${e}${t}?${s}&skipWebSocketFrames=false`, n); + const c = l.onError(o); + l.onOpen(() => { + c.dispose(); + r(new kHo(l, n)); + }); + }); + } +}; +nr(); +q(); +Jb(); +At(); +Le(); +Nt(); +var IHo = "request"; +var DHo = "remoteResourceHandler"; +var s4i = class extends H { + constructor(e, t, s) { + super(); + this.a = e; + this.b = s; + const n = { + listen(r, o) { + throw new Error(`Event not found: ${o}`); + }, + call: (r, o, a) => { + switch (o) { + case IHo: + return this.c(V.revive(a[0])); + } + throw new Error(`Call not found: ${o}`); + } + }; + t.registerChannel(DHo, n); + } + async c(e) { + let t; + try { + const n = new URLSearchParams(e.query); + const r = e.with({ + scheme: n.get("scheme"), + authority: n.get("authority"), + query: "" + }); + t = await this.b.readFile(r); + } catch (n) { + const r = ET(Ii.fromString(n.message)); + if (n instanceof vf && n.fileOperationResult === 1) { + return { + statusCode: 404, + body: r + }; + } else { + return { + statusCode: 500, + body: r + }; + } + } + const s = e.path && njn(e.path); + return { + statusCode: 200, + body: ET(t.value), + mimeType: s + }; + } + getResourceUriProvider() { + return e => e.with({ + scheme: me.vscodeManagedRemoteResource, + authority: `window:${this.a}`, + query: new URLSearchParams({ + authority: e.authority, + scheme: e.scheme + }).toString() + }); + } +}; +s4i = __decorate([__param(1, dT), __param(2, Ct)], s4i); +fr(); +Pn(); +var THo = class extends H { + constructor(i) { + super(); + this.a = i; + this.b(); + } + b() { + this.c(); + Sfe(!!this.a.fullscreen, xt); + } + c() { + const i = QYn(this.a.workspace); + if ($M(i) || u1(i)) { + this.a.workspace = i; + } + const e = this.a.filesToWait; + const t = e?.paths; + for (const s of [t, this.a.filesToOpenOrCreate, this.a.filesToDiff, this.a.filesToMerge]) { + if (Array.isArray(s)) { + for (const n of s) { + n.fileUri &&= V.revive(n.fileUri); + } + } + } + if (e) { + e.waitMarkerFileUri = V.revive(e.waitMarkerFileUri); + } + } + async open() { + const [i] = await Promise.all([this.j(), mqn(xt)]); + if (this.a.windowInWindowBodyClass) { + const s = this.a.windowInWindowBodyClass.split(" "); + for (const n of s) { + xt.document.body.classList.add(n); + } + } + if (this.a.windowInWindow !== undefined) { + xt.document.body.classList.add("bc-window"); + xt.document.body.classList.add("window-in-window"); + } + this.f(i.configurationService); + const e = new QWo(xt.document.body, { + extraClasses: this.g() + }, i.serviceCollection, i.logService); + this.h(e, i.storageService); + const t = e.startup(); + this.s(t); + this.D(t.createInstance(_$t)); + } + f(i) { + let e; + if (this.a.isCustomZoomLevel && typeof this.a.zoomLevel == "number") { + e = this.a.zoomLevel; + } else { + const t = i.getValue(); + e = typeof t.window?.zoomLevel == "number" ? t.window.zoomLevel : 0; + } + WQ(e, xt); + } + g() { + if (Gt && Fqi(this.a.os.release)) { + return ["macos-bigsur-or-newer"]; + } else { + return []; + } + } + h(i, e) { + this.D(i.onWillShutdown(t => t.join(e.close(), { + id: "join.closeStorage", + label: f(12456, null) + }))); + this.D(i.onDidShutdown(() => this.dispose())); + } + async j() { + const i = new ml(); + const e = this.D(new fHo(this.a.windowId)); + i.set(dT, e); + const t = this.a.policiesData ? new wHo(this.a.policiesData, e.getChannel("policy")) : new TMn(); + i.set(DMn, t); + const s = { + _serviceBrand: undefined, + ...Sa + }; + i.set(ys, s); + const n = new cp(this.a, s); + i.set(gu, n); + const r = [...this.a.loggers.global.map(D => ({ + ...D, + resource: V.revive(D.resource) + })), ...this.a.loggers.window.map(D => ({ + ...D, + resource: V.revive(D.resource), + hidden: true + }))]; + const o = new K4o(this.a.windowId, this.a.logLevel, n.windowLogsPath, r, e.getChannel("logger")); + i.set(Um, o); + const a = this.D(new pHo(o, n)); + i.set(Bt, a); + if (Ry) { + a.info("workbench#open()"); + } + if (a.getLevel() === pr.Trace) { + a.trace("workbench#open(): with configuration", Oot({ + ...this.a, + nls: undefined + })); + } + const l = new JBi(this.a.windowId, a); + i.set(b3, l); + const c = new $Bi(this.a.windowId, a, e); + i.set(vMn, c); + const u = YE.toService(e.getChannel("sign")); + i.set(H$t, u); + const d = this.D(new ZBi(a)); + i.set(Ct, d); + const h = new GBi(s, new s4i(n.window.id, e, d)); + i.set(hv, h); + const g = this.D(new vHo(e, c, a, o)); + d.registerProvider(me.file, g); + const p = new j$t(d); + i.set(_s, p); + const b = new Emn(this.a.profiles.all, V.revive(this.a.profiles.home).with({ + scheme: n.userRoamingDataHome.scheme + }), e.getChannel("userDataProfiles")); + i.set(Ml, b); + const v = new CHo(jI(this.a.profiles.profile, b.profilesHome.scheme)); + i.set(Rc, v); + d.registerProvider(me.vscodeUserData, this.D(new yHo(me.file, g, me.vscodeUserData, b, p, a))); + const y = new hQr(); + y.register(0, new EHo(null)); + i.set(ske, y); + const w = this.D(new YBi(y, v, n, s, h, u, a)); + i.set(al, w); + this.D(oHo.register(w, d, a)); + const C = this.m(n); + const [S, x] = await Promise.all([this.n(C, n, v, b, d, w, p, a, t).then(D => { + i.set(kt, D); + i.set(eT, D); + return D; + }), this.q(C, n, v, b, e).then(D => { + i.set(ht, D); + return D; + }), this.r(e).then(D => { + i.set(WMn, D); + return D; + })]); + const k = new Sni(S, n); + i.set(NW, k); + const E = new xni(S, h, x, p, n, S, k, d); + i.set(qf, E); + S.updateWorkspaceTrust(E.isWorkspaceTrusted()); + this.D(E.onDidChangeTrust(() => S.updateWorkspaceTrust(E.isWorkspaceTrusted()))); + return { + serviceCollection: i, + logService: a, + storageService: x, + configurationService: S + }; + } + m(i) { + if (this.a.workspace) { + return this.a.workspace; + } else { + return Lx(this.a.backupPath, i.isExtensionDevelopment); + } + } + async n(i, e, t, s, n, r, o, a, l) { + const c = new aHo([me.file, me.vscodeUserData], e, n); + const u = new zVo({ + remoteAuthority: e.remoteAuthority, + configurationCache: c + }, e, t, s, n, r, o, a, l); + try { + await u.initialize(i); + return u; + } catch (d) { + xs(d); + return u; + } + } + async q(i, e, t, s, n) { + const r = new KVo(i, t, s, n, e); + try { + await r.initialize(); + return r; + } catch (o) { + xs(o); + return r; + } + } + async r(i) { + const e = new i4i(i); + try { + await e.initialize(); + return e; + } catch (t) { + xs(t); + return e; + } + } + s(i) { + const e = i.invokeFunction(t => t.get(EE)); + try { + this.t(e); + this.u(e); + } catch {} + } + t(i) { + const e = xt.PerformanceObserver; + if (!e || !e.supportedEntryTypes?.includes("event")) { + return; + } + const t = new Map(); + const s = new e(a => { + for (const l of a.getEntries()) { + if (!("interactionId" in l) || !l.interactionId) { + continue; + } + const c = l.name || "unknown"; + const u = l.duration; + let d = t.get(c); + if (!d) { + d = { + max: 0, + count: 0 + }; + t.set(c, d); + } + d.count += 1; + if (u > d.max) { + d.max = u; + } + } + }); + s.observe({ + type: "event", + buffered: true, + durationThreshold: 16 + }); + const n = () => { + if (t.size !== 0) { + for (const [a, { + max: l, + count: c + }] of t) { + i.gauge({ + stat: "renderer.web.interaction.max", + value: Math.round(l), + tags: { + event_type: a + } + }); + i.gauge({ + stat: "renderer.web.interaction.count", + value: c, + tags: { + event_type: a + } + }); + } + t.clear(); + } + }; + const r = xt.setInterval(n, 30000); + const o = () => { + s.disconnect(); + xt.clearInterval(r); + n(); + }; + xt.addEventListener("visibilitychange", () => { + if (xt.document.visibilityState === "hidden") { + o(); + } + }, { + once: true + }); + xt.addEventListener("pagehide", o, { + once: true + }); + } + u(i) { + const e = xt.PerformanceObserver; + if (!e || !e.supportedEntryTypes?.includes("long-animation-frame")) { + return; + } + let t = 0; + let s = 0; + const n = c => { + for (const u of c) { + s += 1; + if (u.blockingDuration > t) { + t = u.blockingDuration; + } + } + }; + const r = new e(c => { + n(c.getEntries()); + }); + r.observe({ + type: "long-animation-frame", + buffered: true + }); + const o = () => { + n(r.takeRecords()); + if (s !== 0) { + i.gauge({ + stat: "renderer.web.long_frame.max_blocking_duration", + value: Math.round(t) + }); + i.gauge({ + stat: "renderer.web.long_frame.count", + value: s + }); + t = 0; + s = 0; + } + }; + const a = xt.setInterval(o, 30000); + const l = () => { + r.disconnect(); + xt.clearInterval(a); + o(); + }; + xt.addEventListener("visibilitychange", () => { + if (xt.document.visibilityState === "hidden") { + l(); + } + }, { + once: true + }); + xt.addEventListener("pagehide", l, { + once: true + }); + } +}; +function PHo(i) { + if (i.windowInWindow !== undefined) { + VB.parentWindowId = i.windowInWindow; + VB.parentWindowDimensions = i.windowInWindowParentDimensions; + } + if (T3s(i.remoteAuthority)) { + grt.isBcIdWindow = true; + } + return new THo(i).open(); +} +Ht(); +X(); +Je(); +Qr(); +rt(); +X(); +vt(); +Je(); +Rr(); +Nt(); +Le(); +xe(); +var LHo = class extends se { + constructor() { + super({ + id: "workbench.action.toggleDevTools", + title: W(12362, "Toggle Developer Tools"), + category: pt.Developer, + f1: true, + keybinding: { + weight: 250, + when: jU, + primary: 3111, + mac: { + primary: 2599 + } + }, + menu: { + id: _.MenubarHelpMenu, + group: "5_tools", + order: 1 + } + }); + } + async run(i) { + return i.get(po).toggleDevTools({ + targetWindowId: js().vscodeWindowId + }); + } +}; +var RHo = class extends se { + constructor() { + super({ + id: "workbench.action.configureRuntimeArguments", + title: W(12363, "Configure Runtime Arguments"), + category: pt.Preferences, + f1: true + }); + } + async run(i) { + const e = i.get(Te); + const t = i.get(Wn); + await e.openEditor({ + resource: t.argvResource, + options: { + pinned: true + } + }); + } +}; +var NHo = class extends se { + constructor() { + super({ + id: "workbench.action.reloadWindowWithExtensionsDisabled", + title: W(12364, "Reload With Extensions Disabled"), + category: pt.Developer, + f1: true + }); + } + async run(i) { + return i.get(po).reload({ + disableExtensions: true + }); + } +}; +var MHo = class extends se { + constructor() { + super({ + id: "workbench.action.reloadWindowWithHMR", + title: W(12365, "Reload With HMR"), + category: pt.Developer, + f1: true + }); + } + async run(i) { + return i.get(po).reload({ + hmr: true + }); + } +}; +var AHo = class extends se { + constructor() { + super({ + id: "workbench.action.openUserDataFolder", + title: W(12366, "Open User Data Folder"), + category: pt.Developer, + f1: true + }); + } + async run(i) { + const e = i.get(po); + const t = i.get(Ct); + const s = i.get(gu); + const n = V.file(s.userDataPath); + const r = await t.resolve(n); + let o; + if (r.children && r.children.length > 0) { + o = r.children[0].resource; + } else { + o = n; + } + return e.showItemInFolder(o.fsPath); + } +}; +var $Ho = class extends se { + constructor() { + super({ + id: "workbench.action.showGPUInfo", + title: W(12367, "Show GPU Info"), + category: pt.Developer, + f1: true + }); + } + run(i) { + i.get(po).openGPUInfoWindow(); + } +}; +var FHo = class extends se { + constructor() { + super({ + id: "workbench.action.hangRendererThread", + title: W(12368, "Hang Renderer Thread (30 s)"), + category: pt.Developer, + f1: true, + precondition: jU + }); + } + run() { + const i = Date.now(); + while (Date.now() - i < 30000); + } +}; +J(FHo); +Le(); +X(); +Fi(); +hc(); +Nt(); +Rn(); +wn(); +mn(); +Me(); +He(); +Rt(); +ii(); +Je(); +rt(); +xe(); +var HMn = class a3n extends se { + static { + this.ID = "workbench.action.closeWindow"; + } + constructor() { + super({ + id: a3n.ID, + title: { + ...W(12388, "Close Window"), + mnemonicTitle: f(12376, null) + }, + f1: true, + keybinding: { + weight: 200, + mac: { + primary: 3125 + }, + linux: { + primary: 574, + secondary: [3125] + }, + win: { + primary: 574, + secondary: [3125] + } + }, + menu: { + id: _.MenubarFileMenu, + group: "6_close", + order: 4 + } + }); + } + async run(e) { + return e.get(po).closeWindow({ + targetWindowId: js().vscodeWindowId + }); + } +}; +var z$t = class GOt extends se { + static { + this.a = "window.zoomLevel"; + } + static { + this.b = "window.zoomPerWindow"; + } + constructor(e) { + super(e); + } + async c(e, t) { + const s = e.get(ve); + let n; + if (s.getValue(GOt.b) !== false) { + n = b2.ACTIVE_WINDOW; + } else { + n = b2.ALL_WINDOWS; + } + let r; + if (typeof t == "number") { + r = Math.round(t); + } else if (n === b2.ALL_WINDOWS) { + r = 0; + } else { + const o = s.getValue(GOt.a); + if (typeof o == "number") { + r = o; + } else { + r = 0; + } + } + if (!(r > PBi) && !(r < LBi)) { + if (n === b2.ALL_WINDOWS) { + await s.updateValue(GOt.a, r); + } + WQ(r, n); + } + } +}; +var OHo = class extends z$t { + constructor() { + super({ + id: "workbench.action.zoomIn", + title: { + ...W(12389, "Zoom In"), + mnemonicTitle: f(12377, null) + }, + category: pt.View, + f1: true, + keybinding: { + weight: 200, + primary: 2134, + secondary: [3158, 2157] + }, + menu: { + id: _.MenubarAppearanceMenu, + group: "5_zoom", + order: 1 + } + }); + } + run(i) { + return super.c(i, qk(js()) + 1); + } +}; +var _Ho = class extends z$t { + constructor() { + super({ + id: "workbench.action.setZoomLevel", + title: { + ...W(12390, "Set Zoom Level"), + mnemonicTitle: f(12378, null) + }, + category: pt.View + }); + } + run(i, e) { + return super.c(i, e); + } +}; +var BHo = class extends z$t { + constructor() { + super({ + id: "workbench.action.zoomOut", + title: { + ...W(12391, "Zoom Out"), + mnemonicTitle: f(12379, null) + }, + category: pt.View, + f1: true, + keybinding: { + weight: 200, + primary: 2136, + secondary: [3160, 2159], + linux: { + primary: 2136, + secondary: [2159] + } + }, + menu: { + id: _.MenubarAppearanceMenu, + group: "5_zoom", + order: 2 + } + }); + } + run(i) { + return super.c(i, qk(js()) - 1); + } +}; +var UHo = class extends z$t { + constructor() { + super({ + id: "workbench.action.zoomReset", + title: { + ...W(12392, "Reset Zoom"), + mnemonicTitle: f(12380, null) + }, + category: pt.View, + f1: true, + keybinding: { + weight: 200, + primary: 2146 + }, + menu: { + id: _.MenubarAppearanceMenu, + group: "5_zoom", + order: 3 + } + }); + } + run(i) { + return super.c(i, true); + } +}; +var qMn = class extends se { + constructor(i) { + super(i); + this.a = { + iconClass: le.asClassName(A.removeClose), + tooltip: f(12381, null) + }; + this.b = { + iconClass: "dirty-window " + le.asClassName(A.closeDirty), + tooltip: f(12382, null), + alwaysVisible: true + }; + } + async run(i) { + const e = i.get(zi); + const t = i.get(oi); + const s = i.get($s); + const n = i.get(As); + const r = i.get(po); + const o = js().vscodeWindowId; + const a = await r.getWindows({ + includeAuxiliaryWindows: true + }); + const l = new Set(); + const c = new Map(); + for (const g of a) { + if (XPr(g)) { + let p = c.get(g.parentId); + if (!p) { + p = new Set(); + c.set(g.parentId, p); + } + p.add(g); + } else { + l.add(g); + } + } + function u(g) { + return typeof g?.windowId == "number"; + } + const d = []; + for (const g of l) { + const p = c.get(g.id); + if (c.size > 0) { + d.push({ + type: "separator", + label: p ? f(12383, null) : undefined + }); + } + const b = g.filename ? V.file(g.filename) : u1(g.workspace) ? g.workspace.uri : $M(g.workspace) ? g.workspace.configPath : undefined; + const v = g.filename ? Fo.FILE : u1(g.workspace) ? Fo.FOLDER : $M(g.workspace) ? Fo.ROOT_FOLDER : Fo.FILE; + const y = { + windowId: g.id, + label: g.title, + ariaLabel: g.dirty ? f(12384, null, g.title) : g.title, + iconClasses: ip(s, n, b, v), + description: o === g.id ? f(12385, null) : undefined, + buttons: o !== g.id ? g.dirty ? [this.b] : [this.a] : undefined + }; + d.push(y); + if (p) { + for (const w of p) { + const C = { + windowId: w.id, + label: w.title, + iconClasses: ip(s, n, w.filename ? V.file(w.filename) : undefined, Fo.FILE), + description: o === w.id ? f(12386, null) : undefined, + buttons: [this.a] + }; + d.push(C); + } + } + } + const h = await e.pick(d, { + contextKey: "inWindowsPicker", + activeItem: (() => { + for (let g = 0; g < d.length; g++) { + const p = d[g]; + if (u(p) && p.windowId === o) { + let b = d[g + 1]; + if (u(b) || (b = d[g + 2], u(b))) { + return b; + } + } + } + })(), + placeHolder: f(12387, null), + quickNavigate: this.c() ? { + keybindings: t.lookupKeybindings(this.desc.id) + } : undefined, + hideInput: this.c(), + onDidTriggerItemButton: async g => { + await r.closeWindow({ + targetWindowId: g.item.windowId + }); + g.removeItem(); + } + }); + if (h) { + r.focusWindow({ + targetWindowId: h.windowId + }); + } + } +}; +var WHo = class extends qMn { + constructor() { + super({ + id: "workbench.action.switchWindow", + title: W(12393, "Switch Window..."), + f1: true, + keybinding: { + weight: 200, + primary: 0, + mac: { + primary: 309 + } + } + }); + } + c() { + return false; + } +}; +var VHo = class extends qMn { + constructor() { + super({ + id: "workbench.action.quickSwitchWindow", + title: W(12394, "Quick Switch Window..."), + f1: false + }); + } + c() { + return true; + } +}; +function ode(i) { + if (Gt) { + return i.get(ve).getValue("window.nativeTabs") === true; + } else { + return false; + } +} +function HHo(i) { + if (ode(i)) { + return i.get(po).newWindowTab(); + } +} +function qHo(i) { + if (ode(i)) { + return i.get(po).showPreviousWindowTab(); + } +} +function jHo(i) { + if (ode(i)) { + return i.get(po).showNextWindowTab(); + } +} +function zHo(i) { + if (ode(i)) { + return i.get(po).moveWindowTabToNewWindow(); + } +} +function JHo(i) { + if (ode(i)) { + return i.get(po).mergeAllWindowTabs(); + } +} +function GHo(i) { + if (ode(i)) { + return i.get(po).toggleWindowTabsBar(); + } +} +Ee(); +Wu(); +Wt(); +Gb(); +X(); +Je(); +fn(); +Yd(); +kn(); +rt(); +Ut(); +var J$t = W(12373, "Shell Command"); +var KHo = class extends se { + constructor() { + super({ + id: "workbench.action.installCommandLine", + title: W(12374, "Install '{0}' command", Sa.applicationName), + category: J$t, + f1: true + }); + } + async run(i) { + const e = i.get(po); + const t = i.get(Js); + const s = i.get(ys); + try { + if (ln) { + await e.installShellCommandWindows(); + } else { + await e.installShellCommand(); + } + t.info(f(12369, null, s.applicationName)); + } catch (n) { + t.error(ou(n)); + } + } +}; +var YHo = class extends se { + constructor() { + super({ + id: "workbench.action.fixWSL", + title: { + value: "Fix WSL Install", + original: "Fix WSL Install" + }, + category: J$t, + f1: true + }); + } + async run(i) { + const e = i.get(po); + try { + if (ln) { + await e.fixWSL(); + } + } catch (t) { + console.error(t); + } + } +}; +var XHo = class extends se { + constructor() { + super({ + id: "workbench.action.replaceCommandLine", + title: { + value: f(12370, null), + original: "Install 'code' command" + }, + category: J$t, + f1: true + }); + } + async run(i) { + const e = i.get(po); + const t = i.get(Js); + const s = i.get(ys); + try { + if (ln) { + await e.replaceShellCommandWindows(); + } else { + await e.replaceShellCommand(); + } + t.info(f(12371, null)); + } catch (n) { + if (ca(n)) { + return; + } + t.error(ou(n)); + } + } +}; +var QHo = class extends se { + constructor() { + super({ + id: "workbench.action.uninstallCommandLine", + title: W(12375, "Uninstall '{0}' command from PATH", Sa.applicationName), + category: J$t, + f1: true + }); + } + async run(i) { + const e = i.get(po); + const t = i.get(Js); + const s = i.get(ys); + try { + await e.uninstallShellCommand(); + t.info(f(12372, null, s.applicationName)); + } catch (n) { + if (ca(n)) { + return; + } + t.error(ou(n)); + } + } +}; +ai(); +Me(); +xe(); +(function () { + J(OHo); + J(BHo); + J(UHo); + J(_Ho); + J(WHo); + J(VHo); + J(HMn); + if (Gt) { + Ci.registerKeybindingRule({ + id: HMn.ID, + weight: 200, + when: T.and(ZWs.toNegated(), Mkr), + primary: 2101 + }); + } + if (Gt || ln) { + J(KHo); + J(XHo); + if (ln) { + J(YHo); + } + J(QHo); + } + Ci.registerCommandAndKeybindingRule({ + id: "workbench.action.quit", + weight: 200, + async handler(e) { + const t = e.get(po); + const n = e.get(ve).getValue("window.confirmBeforeClose"); + if (n !== "always" && (n !== "keyboardOnly" || !Y2.getInstance().isModifierPressed) || !!(await _$t.confirmOnShutdown(e, 2))) { + t.quit(); + } + }, + when: undefined, + mac: { + primary: 2095 + }, + linux: { + primary: 2095 + } + }); + if (Gt) { + for (const e of [{ + handler: HHo, + id: "workbench.action.newWindowTab", + title: W(12450, "New Window Tab") + }, { + handler: qHo, + id: "workbench.action.showPreviousWindowTab", + title: W(12451, "Show Previous Window Tab") + }, { + handler: jHo, + id: "workbench.action.showNextWindowTab", + title: W(12452, "Show Next Window Tab") + }, { + handler: zHo, + id: "workbench.action.moveWindowTabToNewWindow", + title: W(12453, "Move Window Tab to New Window") + }, { + handler: JHo, + id: "workbench.action.mergeAllWindowTabs", + title: W(12454, "Merge All Windows") + }, { + handler: GHo, + id: "workbench.action.toggleWindowTabsBar", + title: W(12455, "Toggle Window Tabs Bar") + }]) { + ei.registerCommand(e.id, e.handler); + Be.appendMenuItem(_.CommandPalette, { + command: e, + when: T.equals("config.window.nativeTabs", true) + }); + } + } + J(NHo); + J(MHo); + J(RHo); + J(LHo); + J(AHo); + J($Ho); +})(); +(function () { + Be.appendMenuItem(_.MenubarFileMenu, { + group: "z_Exit", + command: { + id: "workbench.action.quit", + title: f(12395, null) + }, + order: 1, + when: tmt.toNegated() + }); +})(); +(function () { + const e = Pe.as(rr.Configuration); + e.registerConfiguration({ + ...TUs, + properties: { + "application.shellEnvironmentResolutionTimeout": { + type: "number", + default: 10, + minimum: 1, + maximum: 120, + included: !ln, + scope: 1, + markdownDescription: f(12396, null) + } + } + }); + e.registerConfiguration({ + id: "window", + order: 8, + title: f(12397, null), + type: "object", + properties: { + "window.confirmSaveUntitledWorkspace": { + type: "boolean", + default: true, + description: f(12398, null) + }, + "window.openWithoutArgumentsInNewWindow": { + type: "string", + enum: ["on", "off"], + enumDescriptions: [f(12399, null), f(12400, null)], + default: Gt ? "off" : "on", + scope: 1, + markdownDescription: f(12401, null) + }, + "window.restoreWindows": { + type: "string", + enum: ["preserve", "all", "folders", "one", "none"], + enumDescriptions: [f(12402, null), f(12403, null), f(12404, null), f(12405, null), f(12406, null)], + default: "all", + scope: 1, + description: f(12407, null) + }, + "window.restoreFullscreen": { + type: "boolean", + default: false, + scope: 1, + description: f(12408, null) + }, + "window.zoomLevel": { + type: "number", + default: 0, + minimum: LBi, + maximum: PBi, + markdownDescription: f(12409, null, "`#window.zoomPerWindow#`"), + ignoreSync: true, + tags: ["accessibility"] + }, + "window.zoomPerWindow": { + type: "boolean", + default: true, + markdownDescription: f(12410, null, "`#window.zoomLevel#`"), + tags: ["accessibility"] + }, + "window.newWindowDimensions": { + type: "string", + enum: ["default", "inherit", "offset", "maximized", "fullscreen"], + enumDescriptions: [f(12411, null), f(12412, null), f(12413, null), f(12414, null), f(12415, null)], + default: "default", + scope: 1, + description: f(12416, null) + }, + "window.closeWhenEmpty": { + type: "boolean", + default: false, + description: f(12417, null) + }, + "window.doubleClickIconToClose": { + type: "boolean", + default: false, + scope: 1, + markdownDescription: f(12418, null, "`#window.titleBarStyle#`") + }, + "window.titleBarStyle": { + type: "string", + enum: ["native", "custom"], + default: "custom", + scope: 1, + description: f(12419, null) + }, + "window.experimentalControlOverlay": { + type: "boolean", + included: yl, + markdownDescription: f(12420, null, "`#window.titleBarStyle#`"), + default: true, + scope: 1 + }, + "window.customTitleBarVisibility": { + type: "string", + enum: ["auto", "windowed", "never"], + markdownEnumDescriptions: [f(12421, null), f(12422, null), f(12423, null, "`#window.titleBarStyle#`")], + default: yl && Sa.quality === "stable" ? "never" : "auto", + scope: 1, + markdownDescription: f(12424, null, "`#window.titleBarStyle#`") + }, + "window.dialogStyle": { + type: "string", + enum: ["native", "custom"], + default: "native", + scope: 1, + description: f(12425, null) + }, + "window.nativeTabs": { + type: "boolean", + default: false, + scope: 1, + description: f(12426, null), + included: Gt + }, + "window.nativeFullScreen": { + type: "boolean", + default: true, + description: f(12427, null), + scope: 1, + included: Gt + }, + "window.clickThroughInactive": { + type: "boolean", + default: true, + scope: 1, + description: f(12428, null), + included: Gt + } + } + }); + e.registerConfiguration({ + id: "telemetry", + order: 110, + title: f(12429, null), + type: "object", + properties: { + "telemetry.enableCrashReporter": { + type: "boolean", + description: f(12430, null), + default: true, + tags: ["usesOnlineServices", "telemetry"], + markdownDeprecationMessage: f(12431, null, `\`#${aj}#\``) + } + } + }); + e.registerConfiguration({ + id: "keyboard", + order: 15, + type: "object", + title: f(12432, null), + properties: { + "keyboard.touchbar.enabled": { + type: "boolean", + default: true, + description: f(12433, null), + included: Gt + }, + "keyboard.touchbar.ignored": { + type: "array", + items: { + type: "string" + }, + default: [], + markdownDescription: f(12434, null), + included: Gt + } + } + }); + e.registerConfiguration({ + ...wii, + properties: { + "security.promptForLocalFileProtocolHandling": { + type: "boolean", + default: true, + markdownDescription: f(12435, null), + scope: 1 + }, + "security.promptForRemoteFileProtocolHandling": { + type: "boolean", + default: true, + markdownDescription: f(12436, null), + scope: 1 + } + } + }); +})(); +(function () { + const e = "vscode://schemas/argv"; + const t = Pe.as(Vm.JSONContribution); + const s = { + id: e, + allowComments: true, + allowTrailingCommas: true, + description: "VSCode static command line definition file", + type: "object", + additionalProperties: false, + properties: { + locale: { + type: "string", + description: f(12437, null) + }, + "disable-lcd-text": { + type: "boolean", + description: f(12438, null) + }, + "proxy-bypass-list": { + type: "string", + description: f(12439, null) + }, + "disable-hardware-acceleration": { + type: "boolean", + description: f(12440, null) + }, + "force-color-profile": { + type: "string", + markdownDescription: f(12441, null) + }, + "enable-crash-reporter": { + type: "boolean", + markdownDescription: f(12442, null) + }, + "crash-reporter-id": { + type: "string", + markdownDescription: f(12443, null) + }, + "enable-proposed-api": { + type: "array", + description: f(12444, null), + items: { + type: "string" + } + }, + "log-level": { + type: ["string", "array"], + description: f(12445, null) + }, + "disable-chromium-sandbox": { + type: "boolean", + description: f(12446, null) + }, + "use-inmemory-secretstorage": { + type: "boolean", + description: f(12447, null) + } + } + }; + if (yl) { + s.properties["force-renderer-accessibility"] = { + type: "boolean", + description: f(12448, null) + }; + s.properties["password-store"] = { + type: "string", + description: f(12449, null) + }; + } + t.registerSchema(e, s); +})(); +Xa(); +Me(); +fn(); +Fi(); +Zt(); +kn(); +X(); +fn(); +Zt(); +Wa(); +q(); +xe(); +Fi(); +kn(); +Xa(); +Wv(); +te(); +tv(); +ya(); +var n4i; +var r4i = class extends lVt { + static { + n4i = this; + } + static { + this.g = ["copy", "cut", "editor.action.selectAll", "editor.action.clipboardCopyAction", "editor.action.clipboardCutAction", "editor.action.clipboardPasteAction"]; + } + constructor(e, t, s, n, r, o) { + super(); + this.i = e; + this.j = t; + this.k = s; + this.l = n; + this.m = r; + this.n = o; + this.h = this.l.createInstance(Cb, {}); + } + async prompt(e) { + this.i.trace("DialogService#prompt", e.message); + const t = this.b(e); + const { + button: s, + checkboxChecked: n + } = await this.o(e.type, e.message, t, e.detail, e.cancelButton ? t.length - 1 : -1, e.checkbox, undefined, typeof e?.custom == "object" ? e.custom : undefined); + return this.f(e, s, n); + } + async confirm(e) { + this.i.trace("DialogService#confirm", e.message); + const t = this.a(e); + const { + button: s, + checkboxChecked: n + } = await this.o(e.type ?? "question", e.message, t, e.detail, t.length - 1, e.checkbox, undefined, typeof e?.custom == "object" ? e.custom : undefined); + return { + confirmed: s === 0, + checkboxChecked: n + }; + } + async input(e) { + this.i.trace("DialogService#input", e.message); + const t = this.c(e); + const { + button: s, + checkboxChecked: n, + values: r + } = await this.o(e.type ?? "question", e.message, t, e.detail, t.length - 1, e?.checkbox, e.inputs, typeof e.custom == "object" ? e.custom : undefined); + return { + confirmed: s === 0, + checkboxChecked: n, + values: r + }; + } + async about() { + const e = r => f(3098, null, this.m.version || "Unknown", this.m.commit || "Unknown", this.m.date ? `${this.m.date}${r ? " (" + ym(new Date(this.m.date), true) + ")" : ""}` : "Unknown", navigator.userAgent); + const t = e(true); + const s = e(false); + const { + button: n + } = await this.o(cs.Info, this.m.nameLong, [f(3099, null), f(3100, null)], t, 1); + if (n === 0) { + this.n.writeText(s); + } + } + async o(e, t, s, n, r, o, a, l, c) { + const u = new Q(); + const d = l ? p => { + p.classList.add(...(l.classes || [])); + l.markdownDetails?.forEach(b => { + const v = this.h.render(b.markdown); + p.appendChild(v.element); + v.element.classList.add(...(b.classes || [])); + u.add(v); + }); + } : undefined; + const h = new lpn(this.j.activeContainer, t, s, { + detail: n, + cancelId: r, + type: this.e(e), + keyEventProcessor: p => { + const b = this.k.softDispatch(p, this.j.activeContainer); + if (b.kind === 2 && b.commandId && n4i.g.indexOf(b.commandId) === -1) { + yn.stop(p, true); + } + }, + renderBody: d, + icon: l?.icon, + disableCloseAction: l?.disableCloseAction, + buttonDetails: l?.buttonDetails, + checkboxLabel: o?.label, + checkboxChecked: o?.checked, + inputs: a, + buttonStyles: yd, + checkboxStyles: Pz, + inputBoxStyles: Kp, + dialogStyles: tVt + }); + u.add(h); + const g = await h.show(); + u.dispose(); + return g; + } +}; +r4i = n4i = __decorate([__param(0, Bt), __param(1, wh), __param(2, oi), __param(3, re), __param(4, ys), __param(5, Zr)], r4i); +X(); +Wv(); +rt(); +Xa(); +fn(); +Zt(); +kn(); +xe(); +var o4i = class extends lVt { + constructor(e, t, s, n) { + super(); + this.g = e; + this.h = t; + this.i = s; + this.j = n; + } + async prompt(e) { + this.g.trace("DialogService#prompt", e.message); + const t = this.b(e); + const { + response: s, + checkboxChecked: n + } = await this.h.showMessageBox({ + type: this.e(e.type), + title: e.title, + message: e.message, + detail: e.detail, + buttons: t, + cancelId: e.cancelButton ? t.length - 1 : -1, + checkboxLabel: e.checkbox?.label, + checkboxChecked: e.checkbox?.checked, + targetWindowId: js().vscodeWindowId + }); + return this.f(e, s, n); + } + async confirm(e) { + this.g.trace("DialogService#confirm", e.message); + const t = this.a(e); + const { + response: s, + checkboxChecked: n + } = await this.h.showMessageBox({ + type: this.e(e.type) ?? "question", + title: e.title, + message: e.message, + detail: e.detail, + buttons: t, + cancelId: t.length - 1, + checkboxLabel: e.checkbox?.label, + checkboxChecked: e.checkbox?.checked, + targetWindowId: js().vscodeWindowId + }); + return { + confirmed: s === 0, + checkboxChecked: n + }; + } + input() { + throw new Error("Unsupported"); + } + async about() { + let e = this.i.version; + if (this.i.target) { + e = `${e} (${this.i.target} setup)`; + } else if (this.i.darwinUniversalAssetId) { + e = `${e} (Universal)`; + } + const t = await this.h.getOSProperties(); + const s = a => f(12457, null, e, this.i.vscodeVersion, this.i.commit || "Unknown", this.i.date ? `${this.i.date}${a ? " (" + ym(new Date(this.i.date), true) + ")" : ""}` : "Unknown", mD.versions.electron, mD.versions["microsoft-build"], mD.versions.chrome, mD.versions.node, mD.versions.v8, `${t.type} ${t.arch} ${t.release}${rfe ? " snap" : ""}`); + const n = s(true); + const r = s(false); + const { + response: o + } = await this.h.showMessageBox({ + type: "info", + message: this.i.nameLong, + detail: ` +${n}`, + buttons: [f(12458, null), f(12459, null)], + targetWindowId: js().vscodeWindowId + }); + if (o === 0) { + this.j.writeText(r); + } + } +}; +o4i = __decorate([__param(0, Bt), __param(1, po), __param(2, ys), __param(3, Zr)], o4i); +q(); +te(); +pu(); +var G$t = class extends H { + static { + this.ID = "workbench.contrib.dialogHandler"; + } + constructor(e, t, s, n, r, o, a, l, c) { + super(); + this.g = e; + this.h = t; + this.b = new ol(() => new r4i(s, n, r, o, a, l)); + this.a = new ol(() => new o4i(s, c, a, l)); + this.c = this.h.model; + this.D(this.c.onWillShowDialog(() => { + if (!this.f) { + this.j(); + } + })); + this.j(); + } + async j() { + while (this.c.dialogs.length) { + this.f = this.c.dialogs[0]; + let e; + try { + if (this.f.args.confirmArgs) { + const t = this.f.args.confirmArgs; + e = this.m || t?.confirmation.custom ? await this.b.value.confirm(t.confirmation) : await this.a.value.confirm(t.confirmation); + } else if (this.f.args.inputArgs) { + const t = this.f.args.inputArgs; + e = await this.b.value.input(t.input); + } else if (this.f.args.promptArgs) { + const t = this.f.args.promptArgs; + e = this.m || t?.prompt.custom ? await this.b.value.prompt(t.prompt) : await this.a.value.prompt(t.prompt); + } else if (this.m) { + await this.b.value.about(); + } else { + await this.a.value.about(); + } + } catch (t) { + e = t; + } + this.f.close(e); + this.f = undefined; + } + } + get m() { + return this.g.getValue("window.dialogStyle") === "custom"; + } +}; +G$t = __decorate([__param(0, ve), __param(1, Js), __param(2, Bt), __param(3, wh), __param(4, oi), __param(5, re), __param(6, ys), __param(7, Zr), __param(8, po)], G$t); +Yn(G$t.ID, G$t, 1); +X(); +X(); +Nn(); +da(); +Nt(); +q(); +pn(); +Rr(); +X(); +Yd(); +pe(); +Le(); +q(); +te(); +In(); +Nt(); +nt(); +Ut(); +nt(); +ri(); +Zt(); +so(); +q(); +Av(); +X(); +Wi(); +Ut(); +var a4i = class extends H { + constructor(e, t) { + super(); + this.b = e; + this.c = t; + this.a = new hp(); + } + addSaveParticipant(e) { + const t = this.a.push(e); + return Ue(() => t()); + } + async participate(e, t, s, n) { + const r = new Xi(n); + e.textEditorModel?.pushStackElement(); + s.report({ + message: f(13233, null) + }); + let o = false; + await this.c.withProgress({ + priority: Ru.URGENT, + location: 15, + cancellable: f(13234, null), + delay: e.isDirty() ? 5000 : 3000 + }, async a => { + for (const l of this.a) { + if (r.token.isCancellationRequested || !e.textEditorModel) { + break; + } + try { + const c = l.participate(e, t, a, r.token); + await mm(c, r.token); + } catch (c) { + if (ca(c)) { + if (!r.token.isCancellationRequested) { + r.cancel(); + o = true; + } + } else { + this.b.error(c); + } + } + } + }, () => { + r.cancel(); + }); + e.textEditorModel?.pushStackElement(); + r.dispose(); + if (o) { + throw new fl(); + } + } + dispose() { + this.a.clear(); + super.dispose(); + } +}; +a4i = __decorate([__param(0, Bt), __param(1, ra)], a4i); +Wi(); +Et(); +Ya(); +gf(); +Un(); +var l4i = class extends H { + get models() { + return [...this.r.values()]; + } + constructor(e, t, s, n, r) { + super(); + this.y = e; + this.z = t; + this.C = s; + this.F = n; + this.G = r; + this.a = this.D(new B({ + leakWarningThreshold: 500 + })); + this.onDidCreate = this.a.event; + this.b = this.D(new B()); + this.onDidResolve = this.b.event; + this.c = this.D(new B()); + this.onDidRemove = this.c.event; + this.f = this.D(new B()); + this.onDidChangeDirty = this.f.event; + this.g = this.D(new B()); + this.onDidChangeReadonly = this.g.event; + this.h = this.D(new B()); + this.onDidChangeOrphaned = this.h.event; + this.j = this.D(new B()); + this.onDidSaveError = this.j.event; + this.m = this.D(new B()); + this.onDidSave = this.m.event; + this.n = this.D(new B()); + this.onDidRevert = this.n.event; + this.q = this.D(new B()); + this.onDidChangeEncoding = this.q.event; + this.r = new dn(); + this.s = new dn(); + this.t = new dn(); + this.u = new dn(); + this.w = this.D(new bfe()); + this.saveErrorHandler = (() => { + const o = this.C; + return { + onSaveError(a, l) { + o.error(f(13232, null, l.name, ou(a, false))); + } + }; + })(); + this.O = new Map(); + this.$ = this.D(this.y.createInstance(a4i)); + this.H(); + } + H() { + this.D(this.z.onDidFilesChange(e => this.I(e))); + this.D(this.z.onDidChangeFileSystemProviderCapabilities(e => this.J(e))); + this.D(this.z.onDidChangeFileSystemProviderRegistrations(e => this.L(e))); + this.D(this.F.onWillRunWorkingCopyFileOperation(e => this.P(e))); + this.D(this.F.onDidFailWorkingCopyFileOperation(e => this.Q(e))); + this.D(this.F.onDidRunWorkingCopyFileOperation(e => this.R(e))); + } + I(e) { + for (const t of this.models) { + if (!t.isDirty()) { + if (e.contains(t.resource, 0, 1)) { + this.N(t); + } + } + } + } + J(e) { + this.M(e.scheme); + } + L(e) { + if (e.added) { + this.M(e.scheme); + } + } + M(e) { + for (const t of this.models) { + if (!t.isDirty()) { + if (e === t.resource.scheme) { + this.N(t); + } + } + } + } + N(e) { + if (this.w.queueSize(e.resource) <= 1) { + this.w.queueFor(e.resource, async () => { + try { + await this.U(e); + } catch (s) { + xs(s); + } + }); + } + } + P(e) { + if (e.operation === 2 || e.operation === 3) { + const t = []; + for (const { + source: s, + target: n + } of e.files) { + if (s) { + if (this.G.extUri.isEqual(s, n)) { + continue; + } + const r = []; + for (const o of this.models) { + if (this.G.extUri.isEqualOrParent(o.resource, s)) { + r.push(o); + } + } + for (const o of r) { + const a = o.resource; + let l; + if (this.G.extUri.isEqual(a, s)) { + l = n; + } else { + l = Li(n, a.path.substr(s.path.length + 1)); + } + t.push({ + source: a, + target: l, + languageId: o.getLanguageId(), + encoding: o.getEncoding(), + snapshot: o.isDirty() ? o.createSnapshot() : undefined + }); + } + } + } + this.O.set(e.correlationId, t); + } + } + Q(e) { + if (e.operation === 2 || e.operation === 3) { + const t = this.O.get(e.correlationId); + if (t) { + this.O.delete(e.correlationId); + t.forEach(s => { + if (s.snapshot) { + this.get(s.source)?.setDirty(true); + } + }); + } + } + } + R(e) { + switch (e.operation) { + case 0: + e.waitUntil((async () => { + for (const { + target: t + } of e.files) { + const s = this.get(t); + if (s && !s.isDisposed()) { + await s.revert(); + } + } + })()); + break; + case 2: + case 3: + e.waitUntil((async () => { + const t = this.O.get(e.correlationId); + if (t) { + this.O.delete(e.correlationId); + await Ko.settled(t.map(async s => { + const n = this.G.asCanonicalUri(s.target); + const r = await this.resolve(n, { + reload: { + async: false + }, + contents: s.snapshot ? l7(s.snapshot) : undefined, + encoding: s.encoding + }); + if (s.languageId && s.languageId !== Ju && r.getLanguageId() === Ju && _d(n) !== Sot) { + r.updateTextEditorModel(undefined, s.languageId); + } + })); + } + })()); + break; + } + } + get(e) { + return this.r.get(e); + } + S(e) { + return this.r.has(e); + } + async U(e) { + await this.X(e.resource); + if (!e.isDirty() && !e.isDisposed() && !!this.S(e.resource)) { + await this.W(e, { + reload: { + async: false + } + }); + } + } + async resolve(e, t) { + const s = this.X(e); + if (s) { + await s; + } + return this.W(e, t); + } + async W(e, t) { + let s; + let n; + if (V.isUri(e)) { + n = e; + s = this.get(n); + } else { + n = e.resource; + s = e; + } + let r; + let o = false; + if (s) { + if (t?.contents) { + r = s.resolve(t); + } else if (t?.reload) { + if (t.reload.async) { + r = Promise.resolve(); + (async () => { + try { + await s.resolve(t); + } catch (a) { + xs(a); + } + })(); + } else { + r = s.resolve(t); + } + } else { + r = Promise.resolve(); + } + } else { + o = true; + const a = s = this.y.createInstance(lIt, n, t ? t.encoding : undefined, t ? t.languageId : undefined); + r = s.resolve(t); + this.Z(a); + } + this.u.set(n, r); + this.add(n, s); + if (o) { + this.a.fire(s); + if (s.isDirty()) { + this.f.fire(s); + } + } + try { + await r; + } catch (a) { + if (o) { + s.dispose(); + } + throw a; + } finally { + this.u.delete(n); + } + if (t?.languageId) { + s.setLanguageId(t.languageId); + } + if (o && s.isDirty()) { + this.f.fire(s); + } + return s; + } + X(e) { + if (this.u.get(e)) { + return this.Y(e); + } + } + async Y(e) { + let t; + while (this.u.has(e)) { + const s = this.u.get(e); + if (s === t) { + return; + } + t = s; + try { + await s; + } catch {} + } + } + Z(e) { + const t = new Q(); + t.add(e.onDidResolve(s => this.b.fire({ + model: e, + reason: s + }))); + t.add(e.onDidChangeDirty(() => this.f.fire(e))); + t.add(e.onDidChangeReadonly(() => this.g.fire(e))); + t.add(e.onDidChangeOrphaned(() => this.h.fire(e))); + t.add(e.onDidSaveError(() => this.j.fire(e))); + t.add(e.onDidSave(s => this.m.fire({ + model: e, + ...s + }))); + t.add(e.onDidRevert(() => this.n.fire(e))); + t.add(e.onDidChangeEncoding(() => this.q.fire(e))); + this.s.set(e.resource, t); + } + add(e, t) { + if (this.r.get(e) === t) { + return; + } + this.t.get(e)?.dispose(); + this.r.set(e, t); + this.t.set(e, t.onWillDispose(() => this.remove(e))); + } + remove(e) { + const t = this.r.delete(e); + const s = this.t.get(e); + if (s) { + si(s); + this.t.delete(e); + } + const n = this.s.get(e); + if (n) { + si(n); + this.s.delete(e); + } + if (t) { + this.c.fire(e); + } + } + addSaveParticipant(e) { + return this.$.addSaveParticipant(e); + } + runSaveParticipants(e, t, s, n) { + return this.$.participate(e, t, s, n); + } + canDispose(e) { + if (e.isDisposed() || !this.u.has(e.resource) && !e.isDirty()) { + return true; + } else { + return this.ab(e); + } + } + async ab(e) { + const t = this.X(e.resource); + if (t) { + await t; + return this.canDispose(e); + } else if (e.isDirty()) { + await de.toPromise(e.onDidChangeDirty); + return this.canDispose(e); + } else { + return true; + } + } + dispose() { + super.dispose(); + this.r.clear(); + this.u.clear(); + si(this.t.values()); + this.t.clear(); + si(this.s.values()); + this.s.clear(); + } +}; +l4i = __decorate([__param(0, re), __param(1, Ct), __param(2, ni), __param(3, g0), __param(4, _s)], l4i); +te(); +At(); +Ya(); +Rn(); +Et(); +fn(); +nr(); +tc(); +gf(); +Th(); +Xn(); +ad(); +Un(); +ii(); +OL(); +wn(); +Zt(); +ri(); +pe(); +He(); +Qs(); +var K$t; +var c4i = class extends H { + static { + K$t = this; + } + static { + this.a = Gy.registerSource("textFileCreate.source", f(13216, null)); + } + static { + this.b = Gy.registerSource("textFileOverwrite.source", f(13217, null)); + } + constructor(e, t, s, n, r, o, a, l, c, u, d, h, g, p, b, v, y, w) { + super(); + this.f = e; + this.g = t; + this.h = s; + this.j = n; + this.m = r; + this.n = o; + this.q = a; + this.r = l; + this.s = c; + this.t = u; + this.u = d; + this.w = h; + this.z = g; + this.C = p; + this.F = b; + this.G = v; + this.H = y; + this.I = w; + this.files = this.D(this.j.createInstance(l4i)); + this.untitled = this.g; + this.J(); + } + J() { + const e = this.D(new class extends H { + constructor(t) { + super(); + this.b = t; + this.label = f(13218, null); + this.a = this.D(new B()); + this.onDidChange = this.a.event; + this.c(); + } + c() { + this.D(this.b.onDidResolve(({ + model: t + }) => { + if (t.isReadonly() || t.hasState(4)) { + this.a.fire([t.resource]); + } + })); + this.D(this.b.onDidRemove(t => this.a.fire([t]))); + this.D(this.b.onDidChangeReadonly(t => this.a.fire([t.resource]))); + this.D(this.b.onDidChangeOrphaned(t => this.a.fire([t.resource]))); + } + provideDecorations(t) { + const s = this.b.get(t); + if (!s || s.isDisposed()) { + return; + } + const n = s.isReadonly(); + const r = s.hasState(4); + if (n && r) { + return { + color: d4, + letter: A.lockSmall, + strikethrough: true, + tooltip: f(13219, null) + }; + } + if (n) { + return { + letter: A.lockSmall, + tooltip: f(13220, null) + }; + } + if (r) { + return { + color: d4, + strikethrough: true, + tooltip: f(13221, null) + }; + } + } + }(this.files)); + this.D(this.I.registerDecorationsProvider(e)); + } + get encoding() { + this.L ||= this.D(this.j.createInstance(u4i)); + return this.L; + } + async read(e, t) { + const [s, n] = await this.M(e, { + ...t, + preferUnbuffered: true + }); + return { + ...s, + encoding: n.detected.encoding || EC, + value: await lrt(n.stream, r => r.join("")) + }; + } + async readStream(e, t) { + const [s, n] = await this.M(e, t); + return { + ...s, + encoding: n.detected.encoding || EC, + value: await Vlt(n.stream) + }; + } + async M(e, t) { + const s = new Xi(); + let n; + if (t?.preferUnbuffered) { + const r = await this.f.readFile(e, t, s.token); + n = { + ...r, + value: UB(r.value) + }; + } else { + n = await this.f.readFileStream(e, t, s.token); + } + try { + const r = await this.N(e, n.value, t); + return [n, r]; + } catch (r) { + s.dispose(true); + throw r.decodeStreamErrorKind === 1 ? new bCr(f(13222, null), 0, t) : r; + } + } + async create(e, t) { + const s = await Promise.all(e.map(async n => { + const r = await this.getEncodedReadable(n.resource, n.value); + return { + resource: n.resource, + contents: r, + overwrite: n.options?.overwrite + }; + })); + return this.z.create(s, mt.None, t); + } + async write(e, t, s) { + const n = await this.getEncodedReadable(e, t, s); + if (s?.writeElevated && this.H.isSupported(e)) { + return this.H.writeFileElevated(e, n, s); + } else { + return this.f.writeFile(e, n, s); + } + } + async getEncodedReadable(e, t, s) { + const { + encoding: n, + addBOM: r + } = await this.encoding.getWriteEncoding(e, s); + if (n === EC && !r) { + if (typeof t === "undefined") { + return undefined; + } else { + return yCr(t); + } + } + t = t || ""; + const o = typeof t == "string" ? w9s(t) : t; + return kTr(o, n, { + addBOM: r + }); + } + async getDecodedStream(e, t, s) { + return (await this.N(e, t, s)).stream; + } + N(e, t, s) { + return xTr(t, { + acceptTextOnly: s?.acceptTextOnly ?? false, + guessEncoding: s?.autoGuessEncoding || this.s.getValue(e, "files.autoGuessEncoding"), + candidateGuessEncodings: s?.candidateGuessEncodings || this.s.getValue(e, "files.candidateGuessEncodings"), + overwriteEncoding: async n => { + const { + encoding: r + } = await this.encoding.getPreferredReadEncoding(e, s, n ?? undefined); + return r; + } + }); + } + async save(e, t) { + if (e.scheme === me.untitled) { + const s = this.untitled.get(e); + if (s) { + let n; + if (s.hasAssociatedFilePath) { + n = await this.S(e); + } else { + n = await this.r.pickFileToSave(await this.S(e), t?.availableFileSystems); + } + if (n) { + return this.saveAs(e, n, t); + } + } + } else { + const s = this.files.get(e); + if (zI(e)) { + t = { + ...t, + ignoreModifiedSince: true + }; + } + if (s) { + if (await s.save(t)) { + return e; + } else { + return undefined; + } + } + } + } + async saveAs(e, t, s) { + t ||= await this.r.pickFileToSave(await this.S(s?.suggestedTarget ?? e), s?.availableFileSystems); + if (t) { + if (this.t.isReadonly(t)) { + if (await this.R(t)) { + this.t.updateReadonly(t, false); + } else { + return; + } + } + if (Ls(e, t)) { + return this.save(e, { + ...s, + force: true + }); + } else if (this.f.hasProvider(e) && this.C.extUri.isEqual(e, t) && (await this.f.exists(e))) { + await this.z.move([{ + file: { + source: e, + target: t + } + }], mt.None); + if (!(await this.save(e, s))) { + await this.save(t, s); + } + return t; + } else { + return this.O(e, t, s); + } + } + } + async O(e, t, s) { + let n = false; + const r = this.files.get(e); + if (r?.isResolved()) { + n = await this.P(r, e, t, s); + } else if (this.f.hasProvider(e)) { + await this.f.copy(e, t, true); + n = true; + } else { + const o = this.m.getModel(e); + if (o) { + n = await this.P(o, e, t, s); + } + } + if (n) { + try { + await this.revert(e); + } catch (o) { + this.G.error(o); + } + return t; + } + } + async P(e, t, s, n) { + let r; + const o = e; + if (typeof o.getEncoding == "function") { + r = o.getEncoding(); + } + let a = false; + let l = this.files.get(s); + if (l?.isResolved()) { + a = true; + } else { + a = await this.f.exists(s); + if (!a) { + await this.create([{ + resource: s, + value: "" + }]); + } + try { + l = await this.files.resolve(s, { + encoding: r + }); + } catch (h) { + if (a && (h.textFileOperationResult === 0 || h.fileOperationResult === 7)) { + await this.f.del(s); + return this.P(e, t, s, n); + } + throw h; + } + } + let c; + if (e instanceof ESe && e.hasAssociatedFilePath && a && this.C.extUri.isEqual(s, bI(e.resource, this.n.remoteAuthority, this.w.defaultUriScheme))) { + c = await this.Q(s); + } else { + c = true; + } + if (!c) { + return false; + } + let u; + if (e instanceof o6) { + if (e.isResolved()) { + u = e.textEditorModel ?? undefined; + } + } else { + u = e; + } + let d; + if (l.isResolved()) { + d = l.textEditorModel; + } + if (u && d) { + l.updatePreferredEncoding(r); + this.m.updateModel(d, l7(u.createSnapshot())); + const h = u.getLanguageId(); + const g = d.getLanguageId(); + if (h !== Ju && g === Ju) { + d.setLanguage(h); + } + const p = this.u.getTransientModelProperties(u); + if (p) { + for (const [b, v] of p) { + this.u.setTransientModelProperty(d, b, v); + } + } + } + if (!n?.source) { + n = { + ...n, + source: a ? K$t.b : K$t.a + }; + } + return l.save({ + ...n, + from: t + }); + } + async Q(e) { + const { + confirmed: t + } = await this.q.confirm({ + type: "warning", + message: f(13223, null, ji(e)), + detail: f(13224, null, ji(e), ji(Ir(e))), + primaryButton: f(13225, null) + }); + return t; + } + async R(e) { + const { + confirmed: t + } = await this.q.confirm({ + type: "warning", + message: f(13226, null, ji(e)), + detail: f(13227, null), + primaryButton: f(13228, null) + }); + return t; + } + async S(e) { + if (this.f.hasProvider(e)) { + return e; + } + const t = this.n.remoteAuthority; + const s = await this.r.defaultFilePath(); + let n; + if (e.scheme === me.untitled) { + const r = this.untitled.get(e); + if (r) { + if (r.hasAssociatedFilePath) { + return bI(e, t, this.w.defaultUriScheme); + } + let o; + if (await this.w.hasValidBasename(Li(s, r.name), r.name)) { + o = r.name; + } else { + o = ji(e); + } + const a = r.getLanguageId(); + if (a && a !== Ju) { + n = this.suggestFilename(a, o); + } else { + n = o; + } + } + } + n ||= ji(e); + return Li(s, n); + } + suggestFilename(e, t) { + if (!this.F.getLanguageName(e)) { + return t; + } + const n = Iw(t); + const r = this.F.getExtensions(e); + if (r.includes(n)) { + return t; + } + const o = r.at(0); + if (o) { + if (n) { + return `${t.substring(0, t.indexOf(n))}${o}`; + } else { + return `${t}${o}`; + } + } + const a = this.F.getFilenames(e); + if (a.includes(t)) { + return t; + } else { + return a.at(0) ?? t; + } + } + async revert(e, t) { + if (e.scheme === me.untitled) { + const s = this.untitled.get(e); + if (s) { + return s.revert(t); + } + } else { + const s = this.files.get(e); + if (s && (s.isDirty() || t?.force)) { + return s.revert(t); + } + } + } + isDirty(e) { + const t = e.scheme === me.untitled ? this.untitled.get(e) : this.files.get(e); + if (t) { + return t.isDirty(); + } else { + return false; + } + } +}; +c4i = K$t = __decorate([__param(0, Ct), __param(1, BK), __param(2, Yo), __param(3, re), __param(4, $s), __param(5, Wn), __param(6, Js), __param(7, Xl), __param(8, Fl), __param(9, ld), __param(10, ps), __param(11, Au), __param(12, g0), __param(13, _s), __param(14, As), __param(15, Bt), __param(16, Mce), __param(17, yP)], c4i); +var u4i = class extends H { + get b() { + return this.a; + } + set b(e) { + this.a = e; + } + constructor(e, t, s, n) { + super(); + this.f = e; + this.g = t; + this.h = s; + this.j = n; + this.a = this.n(); + this.m(); + } + m() { + this.D(this.h.onDidChangeWorkspaceFolders(() => this.b = this.n())); + } + n() { + const e = []; + e.push({ + parent: this.g.userRoamingDataHome, + encoding: EC + }); + e.push({ + extension: qI, + encoding: EC + }); + e.push({ + parent: this.g.untitledWorkspacesHome, + encoding: EC + }); + this.h.getWorkspace().folders.forEach(t => { + e.push({ + parent: Li(t.uri, ".vscode"), + encoding: EC + }); + }); + return e; + } + async getWriteEncoding(e, t) { + const { + encoding: s, + hasBOM: n + } = await this.getPreferredWriteEncoding(e, t ? t.encoding : undefined); + return { + encoding: s, + addBOM: n + }; + } + async getPreferredWriteEncoding(e, t) { + const s = await this.q(e, t); + return { + encoding: s, + hasBOM: s === OK || s === _K || s === $6 + }; + } + async getPreferredReadEncoding(e, t, s) { + let n; + if (t?.encoding) { + if (s === $6 && t.encoding === EC) { + n = $6; + } else { + n = t.encoding; + } + } else if (typeof s == "string") { + n = s; + } else if (this.f.getValue(e, "files.encoding") === $6) { + n = EC; + } + const r = await this.q(e, n); + return { + encoding: r, + hasBOM: r === OK || r === _K || r === $6 + }; + } + async q(e, t) { + let s; + const n = this.r(e); + if (n) { + s = n; + } else if (t) { + s = t; + } else { + s = this.f.getValue(e, "files.encoding"); + } + if (s !== EC && (!s || !(await ETr(s)))) { + s = EC; + } + return s; + } + r(e) { + if (this.b?.length) { + for (const t of this.b) { + if (t.parent && this.j.extUri.isEqualOrParent(e, t.parent) || t.extension && _d(e) === `.${t.extension}`) { + return t.encoding; + } + } + } + } +}; +u4i = __decorate([__param(0, Fl), __param(1, Wn), __param(2, kt), __param(3, _s)], u4i); +It(); +Nt(); +tc(); +da(); +te(); +Rn(); +fn(); +Th(); +Xn(); +ad(); +Un(); +wn(); +Zt(); +nt(); +var d4i = class extends c4i { + constructor(e, t, s, n, r, o, a, l, c, u, d, h, g, p, b, v, y, w) { + super(e, t, s, n, r, o, a, l, c, u, d, h, g, p, b, y, v, w); + this.n = o; + this.U(); + } + U() { + this.D(this.h.onWillShutdown(e => e.join(this.W(), { + id: "join.textFiles", + label: f(13235, null) + }))); + } + async W() { + let e; + while ((e = this.files.models.filter(t => t.hasState(2))).length > 0) { + await Ko.settled(e.map(t => t.joinState(2))); + } + } + async read(e, t) { + t = this.X(t); + return super.read(e, t); + } + async readStream(e, t) { + t = this.X(t); + return super.readStream(e, t); + } + X(e) { + let t; + if (e) { + t = e; + } else { + t = Object.create(null); + } + let s; + if (t.limits) { + s = t.limits; + } else { + s = Object.create(null); + t = { + ...t, + limits: s + }; + } + return t; + } +}; +d4i = __decorate([__param(0, Ct), __param(1, BK), __param(2, Yo), __param(3, re), __param(4, $s), __param(5, gu), __param(6, Js), __param(7, Xl), __param(8, Fl), __param(9, ld), __param(10, ps), __param(11, Au), __param(12, g0), __param(13, _s), __param(14, As), __param(15, Mce), __param(16, Bt), __param(17, yP)], d4i); +it(So, d4i, 0); +fn(); +ii(); +Rr(); +Le(); +te(); +Me(); +It(); +Nt(); +gs(); +X(); +fn(); +ii(); +Rr(); +Et(); +pn(); +te(); +X(); +Et(); +Jr(); +Nt(); +mn(); +Le(); +rt(); +fn(); +jn(); +ii(); +Wi(); +Rn(); +wn(); +At(); +Rr(); +Wc(); +Ee(); +$i(); +Fi(); +zb(); +pe(); +q(); +nt(); +vt(); +Yp(); +ad(); +Ho(); +xe(); +var ade; +(function (i) { + i.ID = "workbench.action.files.openLocalFile"; + i.LABEL = f(12773, null); + function e() { + return t => t.get(Xl).pickFileAndOpen({ + forceNewWindow: false, + availableFileSystems: [me.file] + }); + } + i.handler = e; +})(ade ||= {}); +var lde; +(function (i) { + i.ID = "workbench.action.files.saveLocalFile"; + i.LABEL = f(12774, null); + function e() { + return t => { + const s = t.get(Te); + const n = s.activeEditorPane; + if (n) { + return s.save({ + groupId: n.group.id, + editor: n.input + }, { + saveAs: true, + availableFileSystems: [me.file], + reason: 1 + }); + } else { + return Promise.resolve(undefined); + } + }; + } + i.handler = e; +})(lde ||= {}); +var cde; +(function (i) { + i.ID = "workbench.action.files.openLocalFolder"; + i.LABEL = f(12775, null); + function e() { + return t => t.get(Xl).pickFolderAndOpen({ + forceNewWindow: false, + availableFileSystems: [me.file] + }); + } + i.handler = e; +})(cde ||= {}); +var ude; +(function (i) { + i.ID = "workbench.action.files.openLocalFileFolder"; + i.LABEL = f(12776, null); + function e() { + return t => t.get(Xl).pickFileFolderAndOpen({ + forceNewWindow: false, + availableFileSystems: [me.file] + }); + } + i.handler = e; +})(ude ||= {}); +var Ok; +(function (i) { + i[i.Updated = 0] = "Updated"; + i[i.UpdatedWithTrailing = 1] = "UpdatedWithTrailing"; + i[i.Updating = 2] = "Updating"; + i[i.NotUpdated = 3] = "NotUpdated"; + i[i.InvalidPath = 4] = "InvalidPath"; +})(Ok ||= {}); +var nPe = new fe("remoteFileDialogVisible", false); +var h4i = class extends H { + constructor(e, t, s, n, r, o, a, l, c, u, d, h, g, p) { + super(); + this.M = e; + this.N = t; + this.O = s; + this.P = n; + this.Q = r; + this.R = o; + this.S = a; + this.U = l; + this.W = c; + this.X = u; + this.Y = d; + this.Z = h; + this.$ = p; + this.f = false; + this.g = true; + this.h = false; + this.n = false; + this.u = ""; + this.w = ""; + this.F = false; + this.I = "/"; + this.J = this.D(new B()); + this.m = this.W.remoteAuthority; + this.t = nPe.bindTo(g); + this.r = this.Y.defaultUriScheme; + } + set busy(e) { + if (this.c.busy !== e) { + this.c.busy = e; + this.J.fire(e); + } + } + get busy() { + return this.c.busy; + } + async showOpenDialog(e = {}) { + this.r = this.cb(e.availableFileSystems, e.defaultUri); + this.z = await this.eb(); + this.C = await this.eb(true); + const t = this.ab(e); + if (t) { + this.a = t; + return this.fb(); + } else { + return Promise.resolve(undefined); + } + } + async showSaveDialog(e) { + this.r = this.cb(e.availableFileSystems, e.defaultUri); + this.z = await this.eb(); + this.C = await this.eb(true); + this.n = true; + const t = this.ab(e, true); + if (t) { + this.a = t; + this.a.canSelectFolders = true; + this.a.canSelectFiles = true; + return new Promise(s => { + this.fb(true).then(n => { + s(n); + }); + }); + } else { + return Promise.resolve(undefined); + } + } + ab(e, t = false) { + let s; + let n; + if (e.defaultUri) { + s = this.r === e.defaultUri.scheme ? e.defaultUri : undefined; + n = t ? ji(e.defaultUri) : undefined; + } + if (!s) { + s = this.z; + if (n) { + s = Li(s, n); + } + } + if (this.r !== me.file && !this.M.hasProvider(s)) { + this.Q.info(f(12777, null, s.toString())); + return; + } + const r = Gn(e); + r.defaultUri = s; + return r; + } + bb(e, t) { + if (!e.startsWith("\\\\")) { + e = e.replace(/\\/g, "/"); + } + const s = this.r === me.file ? V.file(e) : V.from({ + scheme: this.r, + path: e, + query: t?.query, + fragment: t?.fragment + }); + const n = s.scheme === me.file ? undefined : this.m ?? t?.authority; + return bI(s, n, n ? this.Y.defaultUriScheme : s.scheme); + } + cb(e, t) { + if (e && e.length > 0) { + if (t && e.indexOf(t.scheme) >= 0) { + return t.scheme; + } else { + return e[0]; + } + } else if (t) { + return t.scheme; + } else { + return me.file; + } + } + async db() { + if (this.H === undefined) { + this.H = await this.X.getEnvironment(); + } + return this.H; + } + eb(e = false) { + if (e) { + return this.Y.userHome({ + preferLocal: this.r === me.file + }); + } else { + return this.R.preferredHome(this.r); + } + } + async fb(e = false) { + this.h = !!this.a.canSelectFolders; + this.g = !!this.a.canSelectFiles; + this.I = this.O.getSeparator(this.r, this.m); + this.f = false; + this.F = await this.Cb(); + let t = this.a.defaultUri ? this.a.defaultUri : this.P.getWorkspace().folders[0].uri; + let s; + const n = _d(t); + if (this.a.defaultUri) { + try { + s = await this.M.stat(this.a.defaultUri); + } catch {} + if (!s || !s.isDirectory) { + t = Ir(this.a.defaultUri); + this.q = ji(this.a.defaultUri); + } + } + return new Promise(r => { + this.c = this.D(this.N.createQuickPick()); + this.busy = true; + this.c.matchOnLabel = false; + this.c.sortByLabel = false; + this.c.ignoreFocusOut = true; + this.c.ok = true; + if (this.r !== me.file && this.a && this.a.availableFileSystems && this.a.availableFileSystems.length > 1 && this.a.availableFileSystems.indexOf(me.file) > -1) { + this.c.customButton = true; + this.c.customLabel = f(12778, null); + let u; + if (e) { + u = lde; + } else { + u = this.g ? this.h ? ude : ade : cde; + } + const d = this.Z.lookupKeybinding(u.ID); + if (d) { + const h = d.getLabel(); + if (h) { + this.c.customHover = Fv("{0} ({1})", u.LABEL, h); + } + } + } + let o = 0; + let a = false; + this.b = Ir(t); + this.u = ""; + this.w = ""; + this.c.title = this.a.title; + this.c.value = this.Ab(this.b, true); + this.c.valueSelection = [this.c.value.length, this.c.value.length]; + const l = u => { + if (u) { + u = FB(u, this.I); + u = GZ(u); + } + r(u); + this.t.set(false); + this.dispose(); + }; + this.D(this.c.onDidCustom(() => { + if (!a && !this.busy) { + a = true; + o++; + if (this.a.availableFileSystems && this.a.availableFileSystems.length > 1) { + this.a.availableFileSystems = this.a.availableFileSystems.slice(1); + } + this.c.hide(); + if (e) { + return this.R.showSaveDialog(this.a).then(u => { + l(u); + }); + } else { + return this.R.showOpenDialog(this.a).then(u => { + l(u ? u[0] : undefined); + }); + } + } + })); + const c = () => { + if (this.busy) { + this.J.event(u => { + if (!u) { + c(); + } + }); + return; + } else if (a) { + return; + } + a = true; + o++; + this.mb().then(u => { + if (u) { + this.c.hide(); + l(u); + } else if (this.f) { + l(undefined); + } else { + o--; + a = false; + } + }); + }; + this.D(this.c.onDidAccept(u => { + c(); + })); + this.D(this.c.onDidChangeActive(u => { + a = false; + if (u.length === 1 && this.jb()) { + this.c.validationMessage = undefined; + const d = this.kb(); + if (!$c(this.c.value.substring(0, d.length), d)) { + this.c.valueSelection = [0, this.c.value.length]; + this.ub(d, d); + } + this.tb(d, this.u, u[0], true); + } + })); + this.D(this.c.onDidChangeValue(async u => this.gb(u))); + this.D(this.c.onDidHide(() => { + this.f = true; + if (o === 0) { + l(undefined); + } + })); + this.c.show(); + this.t.set(true); + this.zb(t, true, this.q).then(() => { + if (this.q) { + this.c.valueSelection = [this.c.value.length - this.q.length, this.c.value.length - n.length]; + } else { + this.c.valueSelection = [this.c.value.length, this.c.value.length]; + } + this.busy = false; + }); + }); + } + dispose() { + super.dispose(); + } + async gb(e) { + try { + if (this.ib()) { + if (!$c(e, this.kb()) && !this.hb(e)) { + this.c.validationMessage = undefined; + const t = this.lb(); + let s = Ok.NotUpdated; + if (!dM.isEqual(this.b, t)) { + s = await this.qb(e, t); + } + if (s === Ok.NotUpdated || s === Ok.UpdatedWithTrailing) { + this.sb(e); + } + } else { + this.c.activeItems = []; + this.u = ""; + } + } + } catch {} + } + hb(e) { + return this.G && e.length > this.G.length && $c(e.substring(0, this.G.length), this.G); + } + ib() { + return !$c(this.c.value, this.Bb(this.b, this.u + this.w)); + } + jb() { + return this.y !== (this.c.activeItems ? this.c.activeItems[0] : undefined); + } + kb() { + const e = this.Ab(this.b); + if ($c(this.c.value.substr(0, this.u.length), this.u)) { + if ($c(this.c.value.substr(0, e.length), e)) { + return e; + } else { + return this.u; + } + } else { + return this.Bb(this.b, this.u); + } + } + lb() { + const e = this.bb(this.c.value.trimRight(), this.b); + const t = this.Ab(this.b); + if ($c(this.c.value, t)) { + return this.b; + } + const s = this.bb(t, this.b); + const n = fb(s, e); + const r = this.c.value.length > 1 && t.length > 1 ? $c(this.c.value.substr(0, 2), t.substr(0, 2)) : false; + if (n && r) { + let o = Li(this.b, n); + const a = ji(e); + if (a === "." || a === "..") { + o = this.bb(this.Bb(o, a), this.b); + } + if (ffe(e)) { + return FB(o); + } else { + return o; + } + } else { + return e; + } + } + async mb() { + this.busy = true; + if (this.c.activeItems.length === 1) { + const t = this.c.selectedItems[0]; + if (t.isFolder) { + if (this.q) { + await this.zb(t.uri, true, this.q); + } else { + const s = this.Ab(t.uri); + if (Oq(s, this.c.value) && $c(t.label, ji(t.uri))) { + this.c.valueSelection = [this.Ab(this.b).length, this.c.value.length]; + this.ub(s, this.Eb(t.uri)); + } else if (t.label === ".." && Oq(this.c.value, s)) { + this.c.valueSelection = [s.length, this.c.value.length]; + this.ub(s, ""); + } else { + await this.zb(t.uri, true); + } + } + this.c.busy = false; + return; + } + } else if ((await this.qb(this.c.value, this.lb())) !== Ok.NotUpdated) { + this.c.busy = false; + return; + } + let e; + if (this.c.activeItems.length === 0) { + e = this.lb(); + } else if (this.c.activeItems.length === 1) { + e = this.c.selectedItems[0].uri; + } + e &&= this.vb(e); + if (await this.yb(e)) { + this.busy = false; + return e; + } + this.busy = false; + } + nb(e) { + let t = e; + let s = Ir(e); + while (!Ls(t, s)) { + t = s; + s = Ir(s); + } + return s; + } + ob(e) { + const t = this.C; + if (e.length > 0 && e[0] === "~") { + return Li(t, e.substring(1)); + } else { + return this.bb(e); + } + } + pb(e, t) { + if (t.isDirectory && !this.Db(e.path)) { + return FB(e); + } else { + return e; + } + } + async qb(e, t) { + if (e.length > 0 && e[0] === "~") { + const s = this.ob(e); + if (await this.zb(s, true)) { + return Ok.UpdatedWithTrailing; + } else { + return Ok.Updated; + } + } else { + if (e === "\\") { + t = this.nb(this.b); + e = this.Ab(t); + if (await this.zb(t, true)) { + return Ok.UpdatedWithTrailing; + } else { + return Ok.Updated; + } + } + { + const s = dM.isEqual(this.b, t); + const n = dM.isEqual(this.b, Ir(t)); + const r = dM.isEqualOrParent(this.b, Ir(t)); + const o = !r && !n; + if (!s && (this.Db(e) || r || o)) { + let a; + try { + a = await this.M.stat(t); + } catch {} + if (a && a.isDirectory && ji(t) !== "." && this.Db(e)) { + t = this.pb(t, a); + if (await this.zb(t)) { + return Ok.UpdatedWithTrailing; + } else { + return Ok.Updated; + } + } + if (this.Db(e)) { + this.c.validationMessage = f(12779, null); + this.G = e; + return Ok.InvalidPath; + } + { + let l = Ir(t); + const c = GZ(FB(this.b)); + const u = GZ(FB(l)); + if (!dM.isEqual(c, u) && (!/^[a-zA-Z]:$/.test(this.c.value) || !$c(this.Ab(this.b).substring(0, this.c.value.length), this.c.value))) { + let d; + try { + d = await this.M.stat(l); + } catch {} + if (d && d.isDirectory) { + this.G = undefined; + l = this.pb(l, d); + if (await this.zb(l, false, ji(t))) { + return Ok.UpdatedWithTrailing; + } else { + return Ok.Updated; + } + } + } + } + } + } + } + this.G = undefined; + return Ok.NotUpdated; + } + rb(e) { + const t = _d(e); + if (this.q && t) { + this.q = ji(e); + } + } + sb(e) { + e = this.Ab(this.ob(e)); + const t = this.bb(e); + const s = ji(t); + const n = this.kb(); + if ($c(n, e.substring(0, n.length)) || $c(e, n.substring(0, e.length))) { + let o = false; + for (let a = 0; a < this.c.items.length; a++) { + const l = this.c.items[a]; + if (this.tb(e, s, l)) { + o = true; + break; + } + } + if (!o) { + const a = s.length >= 2 ? n.substring(n.length - s.length + 2) : ""; + this.u = a === s ? s : ""; + this.w = ""; + this.c.activeItems = []; + this.rb(t); + } + } else { + this.u = s; + this.w = ""; + this.c.activeItems = []; + this.rb(t); + } + } + tb(e, t, s, n = false) { + if (this.busy) { + this.u = t; + this.w = ""; + return false; + } + const r = s.label; + if (r === "..") { + this.u = ""; + this.w = ""; + this.y = s; + if (n) { + hf().execCommand("insertText", false, ""); + } + return false; + } else if (!n && r.length >= t.length && $c(r.substr(0, t.length), t)) { + this.u = t; + this.y = s; + this.w = ""; + if (s.isFolder || !this.q) { + this.c.activeItems = [s]; + } else { + this.c.activeItems = []; + } + return true; + } else if (n && !$c(this.Eb(s.uri), this.u + this.w)) { + this.u = ""; + if (!this.$.isScreenReaderOptimized()) { + this.w = this.wb(r); + } + this.y = s; + if (!this.$.isScreenReaderOptimized()) { + this.c.valueSelection = [this.Ab(this.b, true).length, this.c.value.length]; + this.ub(this.Bb(this.b, this.w), this.w); + this.c.valueSelection = [this.c.value.length - this.w.length, this.c.value.length]; + } + return true; + } else { + this.u = t; + this.w = ""; + return false; + } + } + ub(e, t) { + if (this.c.inputHasFocus()) { + hf().execCommand("insertText", false, t); + if (this.c.value !== e) { + this.c.value = e; + this.gb(e); + } + } else { + this.c.value = e; + this.gb(e); + } + } + vb(e) { + let t = e; + if (this.n && this.a.filters && this.a.filters.length > 0 && !ffe(e)) { + let s = false; + const n = _d(e).substr(1); + for (let r = 0; r < this.a.filters.length; r++) { + for (let o = 0; o < this.a.filters[r].extensions.length; o++) { + if (this.a.filters[r].extensions[o] === "*" || this.a.filters[r].extensions[o] === n) { + s = true; + break; + } + } + if (s) { + break; + } + } + if (!s) { + t = Li(Ir(e), ji(e) + "." + this.a.filters[0].extensions[0]); + } + } + return t; + } + wb(e) { + if (e.length > 1 && this.Db(e)) { + return e.substr(0, e.length - 1); + } else { + return e; + } + } + xb(e, t) { + const s = new Q(); + const n = s.add(this.N.createQuickPick()); + n.title = t; + n.ignoreFocusOut = true; + n.ok = true; + n.customButton = true; + n.customLabel = f(12780, null); + n.value = this.Ab(e); + let r = false; + return new Promise(o => { + s.add(n.onDidAccept(() => { + r = true; + n.hide(); + o(true); + })); + s.add(n.onDidHide(() => { + if (!r) { + o(false); + } + this.c.show(); + this.f = false; + s.dispose(); + })); + s.add(n.onDidChangeValue(() => { + n.hide(); + })); + s.add(n.onDidCustom(() => { + n.hide(); + })); + n.show(); + }); + } + async yb(e) { + if (e === undefined) { + this.c.validationMessage = f(12781, null); + return Promise.resolve(false); + } + let t; + let s; + try { + s = await this.M.stat(Ir(e)); + t = await this.M.stat(e); + } catch {} + if (this.n) { + if (t && t.isDirectory) { + this.c.validationMessage = f(12782, null); + return Promise.resolve(false); + } + if (t) { + const n = f(12783, null, ji(e)); + return this.xb(e, n); + } else if (T4t(ji(e), this.F)) { + if (s) { + if (s.isDirectory) { + if (s.readonly) { + this.c.validationMessage = f(12787, null); + return Promise.resolve(false); + } + } else { + this.c.validationMessage = f(12786, null); + return Promise.resolve(false); + } + } else { + const n = f(12785, null, ji(Ir(e))); + return this.xb(e, n); + } + } else { + this.c.validationMessage = f(12784, null); + return Promise.resolve(false); + } + } else if (t) { + if (e.path === "/" && this.F) { + this.c.validationMessage = f(12789, null); + return Promise.resolve(false); + } + if (t.isDirectory && !this.h) { + this.c.validationMessage = f(12790, null); + return Promise.resolve(false); + } + if (!t.isDirectory && !this.g) { + this.c.validationMessage = f(12791, null); + return Promise.resolve(false); + } + } else { + this.c.validationMessage = f(12788, null); + return Promise.resolve(false); + } + return Promise.resolve(true); + } + async zb(e, t = false, s) { + this.busy = true; + this.w = ""; + const n = !!s; + let r = false; + const o = ql(async a => { + let l; + try { + l = await this.M.resolve(e); + if (!l.isDirectory) { + s = ji(e); + e = Ir(e); + l = undefined; + r = true; + } + } catch {} + const c = s ? this.Bb(e, s) : this.Ab(e, true); + this.b = this.Db(e.path) ? e : FB(e, this.I); + this.u = s || ""; + return this.Gb(l, this.b, a).then(u => a.isCancellationRequested ? (this.busy = false, false) : (this.c.itemActivation = h1.NONE, this.c.items = u, !$c(this.c.value, c) && t && (this.c.valueSelection = [0, this.c.value.length], this.ub(c, c)), t && s && n ? this.c.valueSelection = [this.c.value.length - s.length, this.c.value.length - s.length] : s || (this.c.valueSelection = [this.c.value.length, this.c.value.length]), this.busy = false, this.L = undefined, r)); + }); + if (this.L !== undefined) { + this.L.cancel(); + } + this.L = o; + return o; + } + Ab(e, t = false) { + let s = f1(e.fsPath, this.F).replace(/\n/g, ""); + if (this.I === "/") { + s = s.replace(/\\/g, this.I); + } else { + s = s.replace(/\//g, this.I); + } + if (t && !this.Db(s)) { + s = s + this.I; + } + return s; + } + Bb(e, t) { + if (t === ".." || t === ".") { + return this.Ab(e, true) + t; + } else { + return this.Ab(Li(e, t)); + } + } + async Cb() { + let e = ln; + const t = await this.db(); + if (t) { + e = t.os === 1; + } + return e; + } + Db(e) { + return /[\/\\]$/.test(e); + } + Eb(e) { + const t = this.Ab(e, true); + const s = this.Ab(Ir(e), true); + return t.substring(s.length); + } + async Fb(e) { + const t = this.b.with({ + scheme: me.file, + authority: "" + }); + const s = Ir(t); + if (!Ls(t, s)) { + const n = Ir(e); + if (await this.M.exists(n)) { + return { + label: "..", + uri: FB(n, this.I), + isFolder: true + }; + } + } + } + async Gb(e, t, s) { + const n = []; + const r = await this.Fb(t); + try { + e ||= await this.M.resolve(t); + const a = e.children ? await Promise.all(e.children.map(l => this.Ib(l, t, s))) : []; + for (const l of a) { + if (l) { + n.push(l); + } + } + } catch (a) { + console.log(a); + } + if (s.isCancellationRequested) { + return []; + } + const o = n.sort((a, l) => { + if (a.isFolder !== l.isFolder) { + if (a.isFolder) { + return -1; + } else { + return 1; + } + } + const c = this.Db(a.label) ? a.label.substr(0, a.label.length - 1) : a.label; + const u = this.Db(l.label) ? l.label.substr(0, l.label.length - 1) : l.label; + return c.localeCompare(u); + }); + if (r) { + o.unshift(r); + } + return o; + } + Hb(e) { + if (this.a.filters) { + for (let t = 0; t < this.a.filters.length; t++) { + for (let s = 0; s < this.a.filters[t].extensions.length; s++) { + const n = this.a.filters[t].extensions[s]; + if (n === "*" || e.path.endsWith("." + n)) { + return true; + } + } + } + return false; + } + return true; + } + async Ib(e, t, s) { + if (s.isCancellationRequested) { + return; + } + let n = Li(t, e.name); + if (e.isDirectory) { + const r = ji(n); + n = FB(n, this.I); + return { + label: r, + uri: n, + isFolder: true, + iconClasses: ip(this.S, this.U, n || undefined, Fo.FOLDER) + }; + } else if (!e.isDirectory && this.g && this.Hb(n)) { + return { + label: e.name, + uri: n, + isFolder: false, + iconClasses: ip(this.S, this.U, n || undefined) + }; + } + } +}; +h4i = __decorate([__param(0, Ct), __param(1, zi), __param(2, Zs), __param(3, kt), __param(4, ni), __param(5, Xl), __param(6, $s), __param(7, As), __param(8, Wn), __param(9, al), __param(10, Au), __param(11, oi), __param(12, Ne), __param(13, na)], h4i); +Me(); +Nt(); +gs(); +Wa(); +Jt(); +$i(); +wn(); +jn(); +ad(); +At(); +gf(); +Wt(); +Xn(); +vt(); +od(); +Zt(); +Cs(); +var f4i = class { + constructor(e, t, s, n, r, o, a, l, c, u, d, h, g, p, b, v, y, w) { + this.a = e; + this.b = t; + this.c = s; + this.d = n; + this.f = r; + this.g = o; + this.h = a; + this.i = l; + this.j = c; + this.k = u; + this.l = d; + this.m = h; + this.n = g; + this.o = p; + this.p = b; + this.q = v; + this.r = y; + this.s = w; + } + async defaultFilePath(e = this.H(), t = this.I()) { + let s = this.c.getLastActiveFile(e, t); + if (s) { + s = Ir(s); + } else { + s = this.c.getLastActiveWorkspaceRoot(e, t); + } + s ||= await this.preferredHome(e); + return s; + } + async defaultFolderPath(e = this.H(), t = this.I()) { + let s = this.c.getLastActiveWorkspaceRoot(e, t); + s ||= this.c.getLastActiveFile(e, t); + if (s) { + return Ir(s); + } else { + return this.preferredHome(e); + } + } + async preferredHome(e = this.H()) { + const t = e === me.file; + const s = this.g.inspect("files.dialog.defaultPath"); + const n = t ? s.userLocalValue : s.userRemoteValue; + if (n && (t ? HC(n) : (await this.n.path).isAbsolute(n))) { + const o = t ? My(n) : (await this.n.path).normalize(n); + const a = bI(await this.n.fileURI(o), this.d.remoteAuthority, this.n.defaultUriScheme); + if (await this.h.exists(a)) { + return a; + } + } + return this.n.userHome({ + preferLocal: t + }); + } + async defaultWorkspacePath(e = this.H()) { + let t; + if (this.b.getWorkbenchState() === 3) { + const s = this.b.getWorkspace().configuration; + if (s?.scheme === e && Alt(s, this.d) && !vF(s)) { + t = Ir(s); + } + } + t ||= await this.defaultFilePath(e); + return t; + } + async showSaveConfirm(e) { + if (this.t()) { + this.r.trace("FileDialogService: refused to show save confirmation dialog in tests."); + return 1; + } else { + return this.u(e); + } + } + t() { + if (this.d.isExtensionDevelopment && this.d.extensionTestsLocationURI || this.d.shadowWindowForWorkspaceId) { + return true; + } else { + return !!this.d.enableSmokeTestDriver; + } + } + async u(e) { + if (e.length === 0) { + return 1; + } + let t; + let s = f(12750, null); + if (e.length === 1) { + t = f(12751, null, typeof e[0] == "string" ? e[0] : ji(e[0])); + } else { + t = f(12752, null, e.length); + s = `${nR(e)} +${s}`; + } + const { + result: n + } = await this.j.prompt({ + type: cs.Warning, + message: t, + detail: s, + buttons: [{ + label: e.length > 1 ? f(12753, null) : f(12754, null), + run: () => 0 + }, { + label: f(12755, null), + run: () => 1 + }], + cancelButton: { + run: () => 2 + } + }); + return n; + } + v(e, t) { + if (e === me.untitled) { + return [me.file]; + } else if (e !== me.file) { + return [e, me.file]; + } else { + return [e]; + } + } + async w(e, t, s) { + const n = f(12756, null); + const r = this.v(e); + const o = await this.F({ + canSelectFiles: true, + canSelectFolders: true, + canSelectMany: false, + defaultUri: t.defaultUri, + title: n, + availableFileSystems: r + }); + if (o) { + const a = await this.h.stat(o); + const l = a.isDirectory ? { + folderUri: o + } : { + fileUri: o + }; + if (!noi(l) && ZPr(l)) { + this.y(l.fileUri); + } + if (a.isDirectory || t.forceNewWindow || s) { + await this.a.openWindow([l], { + forceNewWindow: t.forceNewWindow, + remoteAuthority: t.remoteAuthority + }); + } else { + await this.p.openEditors([{ + resource: o, + options: { + source: Cd.USER, + pinned: true + } + }], undefined, { + validateTrust: true + }); + } + } + } + async x(e, t, s) { + const n = f(12757, null); + const r = this.v(e); + const o = await this.F({ + canSelectFiles: true, + canSelectFolders: false, + canSelectMany: false, + defaultUri: t.defaultUri, + title: n, + availableFileSystems: r + }); + if (o) { + this.y(o); + if (t.forceNewWindow || s) { + await this.a.openWindow([{ + fileUri: o + }], { + forceNewWindow: t.forceNewWindow, + remoteAuthority: t.remoteAuthority + }); + } else { + await this.p.openEditors([{ + resource: o, + options: { + source: Cd.USER, + pinned: true + } + }], undefined, { + validateTrust: true + }); + } + } + } + y(e) { + this.l.addRecentlyOpened([{ + fileUri: e, + label: this.m.getUriLabel(e) + }]); + } + async z(e, t) { + const s = f(12758, null); + const n = this.v(e, true); + const r = await this.F({ + canSelectFiles: false, + canSelectFolders: true, + canSelectMany: false, + defaultUri: t.defaultUri, + title: s, + availableFileSystems: n + }); + if (r) { + return this.a.openWindow([{ + folderUri: r + }], { + forceNewWindow: t.forceNewWindow, + remoteAuthority: t.remoteAuthority + }); + } + } + async A(e, t) { + const s = f(12759, null); + const n = [{ + name: f(12760, null), + extensions: [qI] + }]; + const r = this.v(e, true); + const o = await this.F({ + canSelectFiles: true, + canSelectFolders: false, + canSelectMany: false, + defaultUri: t.defaultUri, + title: s, + filters: n, + availableFileSystems: r + }); + if (o) { + return this.a.openWindow([{ + workspaceUri: o + }], { + forceNewWindow: t.forceNewWindow, + remoteAuthority: t.remoteAuthority + }); + } + } + async B(e, t) { + t.availableFileSystems ||= this.v(e); + t.title = f(12761, null); + const s = await this.G(t); + if (s) { + this.y(s); + } + return s; + } + async C(e, t) { + t.availableFileSystems ||= this.v(e); + return this.G(t); + } + async D(e, t) { + t.availableFileSystems ||= this.v(e, t.canSelectFolders); + const s = await this.F(t); + if (s) { + return [s]; + } else { + return undefined; + } + } + E() { + return this.f.createInstance(h4i); + } + F(e) { + return this.E().showOpenDialog(e); + } + G(e) { + return this.E().showSaveDialog(e); + } + H(e) { + return e ?? this.n.defaultUriScheme; + } + I() { + return this.d.remoteAuthority; + } + J(e) { + return e.availableFileSystems && e.availableFileSystems[0] || this.H(e.defaultUri?.scheme); + } + K(e) { + if (e.availableFileSystems && e.availableFileSystems.length > 0) { + return e.availableFileSystems; + } + const t = [me.file]; + if (this.d.remoteAuthority) { + t.unshift(me.vscodeRemote); + } + return t; + } + L(e, t) { + const s = { + defaultUri: e, + title: f(12762, null), + availableFileSystems: t + }; + const n = e ? _d(e) : undefined; + let r; + const o = this.k.getSortedRegisteredLanguageNames(); + const a = dr(o.map(({ + languageName: l, + languageId: c + }) => { + const u = this.k.getExtensions(c); + if (!u.length) { + return null; + } + const d = { + name: l, + extensions: Ea(u).slice(0, 10).map(g => $B(g, ".")) + }; + const h = n || Sot; + if (!r && u.includes(h)) { + r = d; + const g = $B(h, "."); + if (!d.extensions.includes(g)) { + d.extensions.unshift(g); + } + return null; + } + return d; + })); + if (!r && n) { + r = { + name: $B(n, ".").toUpperCase(), + extensions: [$B(n, ".")] + }; + } + s.filters = dr([{ + name: f(12763, null), + extensions: ["*"] + }, r, ...a, { + name: f(12764, null), + extensions: [""] + }]); + return s; + } +}; +f4i = __decorate([__param(0, kr), __param(1, kt), __param(2, Vd), __param(3, Wn), __param(4, re), __param(5, ve), __param(6, Ct), __param(7, os), __param(8, Js), __param(9, As), __param(10, gC), __param(11, Zs), __param(12, Au), __param(13, gt), __param(14, Te), __param(15, ps), __param(16, Bt), __param(17, _i)], f4i); +At(); +wn(); +jn(); +ad(); +Wt(); +Xn(); +vt(); +Zt(); +Cs(); +xe(); +var g4i = class extends f4i { + constructor(e, t, s, n, r, o, a, l, c, u, d, h, g, p, b, v, y, w, C) { + super(e, t, s, n, r, o, a, l, u, d, h, g, p, b, v, y, w, C); + this.M = c; + } + N(e) { + return { + forceNewWindow: e.forceNewWindow, + telemetryExtraData: e.telemetryExtraData, + defaultPath: e.defaultUri?.fsPath + }; + } + O(e) { + const t = this.g.getValue("files.simpleDialog.enable") === true; + const s = this.g.getValue("window.openFilesInNewWindow") === "on"; + return { + useSimplified: e !== me.file && e !== me.vscodeUserData || t, + isSetting: s + }; + } + async pickFileFolderAndOpen(e) { + const t = this.J(e); + e.defaultUri ||= await this.defaultFilePath(t); + const s = this.O(t); + if (s.useSimplified) { + return this.w(t, e, s.isSetting); + } else { + return this.M.pickFileFolderAndOpen(this.N(e)); + } + } + async pickFileAndOpen(e) { + const t = this.J(e); + e.defaultUri ||= await this.defaultFilePath(t); + const s = this.O(t); + if (s.useSimplified) { + return this.x(t, e, s.isSetting); + } else { + return this.M.pickFileAndOpen(this.N(e)); + } + } + async pickFolderAndOpen(e) { + const t = this.J(e); + e.defaultUri ||= await this.defaultFolderPath(t); + if (this.O(t).useSimplified) { + return this.z(t, e); + } else { + return this.M.pickFolderAndOpen(this.N(e)); + } + } + async pickWorkspaceAndOpen(e) { + e.availableFileSystems = this.K(e); + const t = this.J(e); + e.defaultUri ||= await this.defaultWorkspacePath(t); + if (this.O(t).useSimplified) { + return this.A(t, e); + } else { + return this.M.pickWorkspaceAndOpen(this.N(e)); + } + } + async pickFileToSave(e, t) { + const s = this.J({ + defaultUri: e, + availableFileSystems: t + }); + const n = this.L(e, t); + if (this.O(s).useSimplified) { + return this.B(s, n); + } + { + const r = await this.M.showSaveDialog(this.P(n)); + if (r && !r.canceled && r.filePath) { + const o = V.file(r.filePath); + this.y(o); + return o; + } + } + } + P(e) { + e.defaultUri = e.defaultUri ? V.file(e.defaultUri.path) : undefined; + return { + defaultPath: e.defaultUri?.fsPath, + buttonLabel: e.saveLabel, + filters: e.filters, + title: e.title, + targetWindowId: js().vscodeWindowId + }; + } + async showSaveDialog(e) { + const t = this.J(e); + if (this.O(t).useSimplified) { + return this.C(t, e); + } + const s = await this.M.showSaveDialog(this.P(e)); + if (s && !s.canceled && s.filePath) { + return V.file(s.filePath); + } + } + async showOpenDialog(e) { + const t = this.J(e); + if (this.O(t).useSimplified) { + return this.D(t, e); + } + const s = { + title: e.title, + defaultPath: e.defaultUri?.fsPath, + buttonLabel: e.openLabel, + filters: e.filters, + properties: [], + targetWindowId: js().vscodeWindowId + }; + s.properties.push("createDirectory"); + if (e.canSelectFiles) { + s.properties.push("openFile"); + } + if (e.canSelectFolders) { + s.properties.push("openDirectory"); + } + if (e.canSelectMany) { + s.properties.push("multiSelections"); + } + const n = await this.M.showOpenDialog(s); + if (n && Array.isArray(n.filePaths) && n.filePaths.length > 0) { + return n.filePaths.map(V.file); + } else { + return undefined; + } + } +}; +g4i = __decorate([__param(0, kr), __param(1, kt), __param(2, Vd), __param(3, Wn), __param(4, re), __param(5, ve), __param(6, Ct), __param(7, os), __param(8, po), __param(9, Js), __param(10, As), __param(11, gC), __param(12, Zs), __param(13, Au), __param(14, gt), __param(15, Te), __param(16, ps), __param(17, Bt), __param(18, _i)], g4i); +it(Xl, g4i, 1); +It(); +var p4i = class { + constructor(e, t) { + return YE.toService(e.getChannel("workspaces"), { + context: t.windowId + }); + } +}; +p4i = __decorate([__param(0, dT), __param(1, po)], p4i); +it(gC, p4i, 1); +te(); +var jMn = Ve("menubarService"); +v2(jMn, "menubar"); +pe(); +q(); +var ZHo = class { + get state() { + return this.c; + } + set state(i) { + this.c = i; + this.b.fire(i); + } + constructor(i) { + this.d = i; + this.a = new Q(); + this.b = new B(); + this.onStateChange = this.b.event; + this.c = ADr.Uninitialized; + this.a.add(this.d.listen("onStateChange")(e => this.state = e)); + this.d.call("_getInitialState").then(e => this.state = e); + } + checkForUpdates(i) { + return this.d.call("checkForUpdates", i); + } + downloadUpdate() { + return this.d.call("downloadUpdate"); + } + applyUpdate() { + return this.d.call("applyUpdate"); + } + quitAndInstall() { + return this.d.call("quitAndInstall"); + } + isLatestVersion() { + return this.d.call("isLatestVersion"); + } + _applySpecificUpdate(i) { + return this.d.call("_applySpecificUpdate", i); + } + dispose() { + this.a.dispose(); + } +}; +v2(TS, "update", { + channelClientCtor: ZHo +}); +iO(); +Le(); +Le(); +var eqo = class { + constructor(i) { + this.a = i; + } + listen(i, e) { + throw new Error(`Event not found: ${e}`); + } + call(i, e, t) { + switch (e) { + case "handleURL": + return this.a.handleURL(V.revive(t[0]), t[1]); + } + throw new Error(`Call not found: ${e}`); + } +}; +gs(); +At(); +kn(); +It(); +nt(); +q(); +Le(); +kn(); +var tqo = class extends H { + constructor() { + super(...arguments); + this.a = new Set(); + } + open(i, e) { + const t = [...this.a.values()]; + return Gnt(t.map(s => () => s.handleURL(i, e)), undefined, false).then(s => s || false); + } + registerHandler(i) { + this.a.add(i); + return Ue(() => this.a.delete(i)); + } +}; +var m4i = class extends tqo { + constructor(e) { + super(); + this.b = e; + } + create(e) { + let { + authority: t, + path: s, + query: n, + fragment: r + } = e || { + authority: undefined, + path: undefined, + query: undefined, + fragment: undefined + }; + if (t && s && s.indexOf("/") !== 0) { + s = `/${s}`; + } + return V.from({ + scheme: this.b.urlProtocol, + authority: t, + path: s, + query: n, + fragment: r + }); + } +}; +m4i = __decorate([__param(0, ys)], m4i); +Zt(); +var b4i = class extends m4i { + constructor(e, t, s, n, r) { + super(n); + this.f = s; + this.g = r; + this.c = YE.toService(e.getChannel("url")); + e.registerChannel("urlHandler", new eqo(this)); + t.registerOpener(this); + } + create(e) { + const t = super.create(e); + let s = t.query; + if (s) { + s += `&windowId=${encodeURIComponent(this.f.windowId)}`; + } else { + s = `windowId=${encodeURIComponent(this.f.windowId)}`; + } + return t.with({ + query: s + }); + } + async open(e, t) { + if (_v(e, this.b.urlProtocol)) { + if (typeof e == "string") { + e = V.parse(e); + } + return await this.c.open(e, t); + } else { + return false; + } + } + async handleURL(e, t) { + const s = await super.open(e, t); + if (s) { + this.g.trace("URLService#handleURL(): handled", e.toString(true)); + await this.f.focusWindow({ + force: true, + targetWindowId: this.f.windowId + }); + } else { + this.g.trace("URLService#handleURL(): not handled", e.toString(true)); + } + return s; + } +}; +b4i = __decorate([__param(0, dT), __param(1, os), __param(2, po), __param(3, ys), __param(4, Bt)], b4i); +it(CR, b4i, 0); +nt(); +function zMn(i, e) { + if (i.length === 0) { + return Promise.resolve(false); + } + const t = []; + let s = false; + for (const n of i) { + if (n === true) { + return Promise.resolve(true); + } + if (YZ(n)) { + t.push(n.then(r => { + if (r) { + s = true; + } + }, r => { + e(r); + s = true; + })); + } + } + return Ko.settled(t).then(() => s); +} +da(); +qt(); +Zt(); +pe(); +nt(); +q(); +da(); +Zt(); +yb(); +qt(); +var rPe; +var v4i = class extends H { + static { + rPe = this; + } + static { + this.a = "lifecyle.lastShutdownReason"; + } + get startupKind() { + return this.j; + } + get phase() { + return this.m; + } + constructor(e, t) { + super(); + this.r = e; + this.s = t; + this.b = this.D(new B()); + this.onBeforeShutdown = this.b.event; + this.c = this.D(new B()); + this.onWillShutdown = this.c.event; + this.f = this.D(new B()); + this.onDidShutdown = this.f.event; + this.g = this.D(new B()); + this.onBeforeShutdownError = this.g.event; + this.h = this.D(new B()); + this.onShutdownVeto = this.h.event; + this.m = 1; + this.n = new Map(); + this.j = this.t(); + this.D(this.s.onWillSaveState(s => { + if (s.reason === HT.SHUTDOWN) { + this.s.store(rPe.a, this.q, 1, 1); + } + })); + } + t() { + const e = this.u() ?? 1; + this.r.trace(`[lifecycle] starting up (startup kind: ${e})`); + return e; + } + u() { + const e = this.s.getNumber(rPe.a, 1); + this.s.remove(rPe.a, 1); + let t; + switch (e) { + case 3: + t = 3; + break; + case 4: + t = 4; + break; + } + return t; + } + set phase(e) { + if (e < this.phase) { + throw new Error("Lifecycle cannot go backwards"); + } + if (this.m === e) { + return; + } + this.r.trace(`lifecycle: phase changed (value: ${e})`); + this.m = e; + Dr(`code/LifecyclePhase/${Nor(e)}`); + const t = this.n.get(this.m); + if (t) { + t.open(); + this.n.delete(this.m); + } + } + async when(e) { + if (e <= this.m) { + return; + } + let t = this.n.get(e); + if (!t) { + t = new YS(); + this.n.set(e, t); + } + await t.wait(); + } +}; +v4i = rPe = __decorate([__param(0, Bt), __param(1, ht)], v4i); +It(); +nt(); +Yd(); +ri(); +var Y$t; +var y4i = class extends v4i { + static { + Y$t = this; + } + static { + this.w = 5000; + } + static { + this.y = 800; + } + constructor(e, t, s) { + super(s, t); + this.z = e; + this.C(); + } + C() { + const e = this.z.windowId; + Td.on("vscode:onBeforeUnload", async (t, s) => { + this.r.trace(`[lifecycle] onBeforeUnload (reason: ${s.reason})`); + if (await this.F(s.reason)) { + this.r.trace("[lifecycle] onBeforeUnload prevented via veto"); + this.h.fire(); + Td.send(s.cancelChannel, e); + } else { + this.r.trace("[lifecycle] onBeforeUnload continues without veto"); + this.q = s.reason; + Td.send(s.okChannel, e); + } + }); + Td.on("vscode:onWillUnload", async (t, s) => { + this.r.trace(`[lifecycle] onWillUnload (reason: ${s.reason})`); + await this.H(s.reason); + this.f.fire(); + Td.send(s.replyChannel, e); + }); + } + async F(e) { + const t = this.r; + const s = []; + const n = new Set(); + let r; + let o; + this.b.fire({ + reason: e, + veto(l, c) { + s.push(l); + if (l === true) { + t.info(`[lifecycle]: Shutdown was prevented (id: ${c})`); + } else if (l instanceof Promise) { + n.add(c); + l.then(u => { + if (u === true) { + t.info(`[lifecycle]: Shutdown was prevented (id: ${c})`); + } + }).finally(() => n.delete(c)); + } + }, + finalVeto(l, c) { + if (!r) { + r = l; + o = c; + } else { + throw new Error(`[lifecycle]: Final veto is already defined (id: ${c})`); + } + } + }); + const a = Gd(() => { + t.warn(`[lifecycle] onBeforeShutdown is taking a long time, pending operations: ${Array.from(n).join(", ")}`); + }, Y$t.w); + try { + let l = await zMn(s, c => this.G(c, e)); + if (l) { + return l; + } + if (r) { + try { + n.add(o); + l = await r(); + if (l) { + t.info(`[lifecycle]: Shutdown was prevented by final veto (id: ${o})`); + } + } catch (c) { + l = true; + this.G(c, e); + } + } + return l; + } finally { + a.dispose(); + } + } + G(e, t) { + this.r.error(`[lifecycle]: Error during before-shutdown phase (error: ${ou(e)})`); + this.g.fire({ + reason: t, + error: e + }); + } + async H(e) { + const t = []; + const s = []; + const n = new Set(); + const r = new Xi(); + this.c.fire({ + reason: e, + token: r.token, + joiners: () => Array.from(n.values()), + join(a, l) { + n.add(l); + if (l.order === Agt.Last) { + const c = typeof a == "function" ? a : () => a; + s.push(() => c().finally(() => n.delete(l))); + } else { + const c = typeof a == "function" ? a() : a; + c.finally(() => n.delete(l)); + t.push(c); + } + }, + force: () => { + r.dispose(true); + } + }); + const o = Gd(() => { + this.r.warn(`[lifecycle] onWillShutdown is taking a long time, pending operations: ${Array.from(n).map(a => a.id).join(", ")}`); + }, Y$t.y); + try { + await mm(Ko.settled(t), r.token); + } catch (a) { + this.r.error(`[lifecycle]: Error during will-shutdown phase in default joiners (error: ${ou(a)})`); + } + try { + await mm(Ko.settled(s.map(a => a())), r.token); + } catch (a) { + this.r.error(`[lifecycle]: Error during will-shutdown phase in last joiners (error: ${ou(a)})`); + } + o.dispose(); + } + shutdown() { + return this.z.closeWindow(); + } +}; +y4i = Y$t = __decorate([__param(0, po), __param(1, ht), __param(2, Bt)], y4i); +it(Yo, y4i, 0); +It(); +pe(); +hc(); +xe(); +Ee(); +Me(); +qt(); +rt(); +Je(); +X(); +hc(); +ks(); +gd(); +Me(); +q(); +gi(); +Rt(); +rt(); +Zo(); +xe(); +te(); +pe(); +qt(); +Je(); +Ee(); +He(); +Br(); +xe(); +zh(); +oa(); +vd(); +Fs(); +He(); +pe(); +q(); +X(); +Je(); +te(); +Fi(); +mn(); +ar(); +var w4i; +var C4i = class { + constructor(e, t, s, n) { + this.a = new Q(); + this.b = this.a.add(new B()); + this.onDidChangeVisibility = this.b.event; + this.element = document.createElement("div"); + this.element.classList.add("command-center"); + const r = s.createInstance(Em, this.element, _.CommandCenter, { + contextMenu: _.TitleBarContext, + hiddenItemStrategy: -1, + toolbarOptions: { + primaryGroup: () => true + }, + telemetrySource: "commandCenter", + actionViewItemProvider: (o, a) => o instanceof vm && o.item.submenu === _.CommandCenterCenter ? s.createInstance(S4i, o, e, { + ...a, + hoverDelegate: t + }) : Ig(s, o, { + ...a, + hoverDelegate: t + }) + }); + this.a.add(de.filter(n.onShow, () => wJi(this.element), this.a)(this.c.bind(this, false))); + this.a.add(n.onHide(this.c.bind(this, true))); + this.a.add(r); + } + c(e) { + this.element.classList.toggle("hide", !e); + this.b.fire(); + } + dispose() { + this.a.dispose(); + } +}; +C4i = __decorate([__param(2, re), __param(3, zi)], C4i); +var S4i = class extends jv { + static { + w4i = this; + } + static { + this.a = "workbench.action.quickOpenWithModes"; + } + constructor(e, t, s, n, r, o, a) { + super(undefined, e.actions.find(l => l.id === "workbench.action.quickOpenWithModes") ?? e.actions[0], s); + this.c = e; + this.g = t; + this.h = n; + this.m = r; + this.n = o; + this.r = a; + this.b = s.hoverDelegate ?? cr("mouse"); + } + render(e) { + super.render(e); + e.classList.add("command-center-center"); + e.classList.toggle("multiple", this.c.actions.length > 1); + const t = this.B.add(this.h.setupManagedHover(this.b, e, this.F())); + this.B.add(this.g.onDidChange(() => { + t.update(this.F()); + })); + const s = []; + for (const n of this.c.actions) { + if (n instanceof mg) { + s.push(n.actions); + } else { + s.push([n]); + } + } + for (let n = 0; n < s.length; n++) { + const r = s[n]; + const o = this.n.createInstance(Dp, e, { + hiddenItemStrategy: -1, + telemetrySource: "commandCenterCenter", + actionViewItemProvider: (a, l) => { + l = { + ...l, + hoverDelegate: this.b + }; + if (a.id !== w4i.a) { + return Ig(this.n, a, l); + } + const c = this; + return this.n.createInstance(class extends jv { + constructor() { + super(undefined, a, l); + } + render(d) { + super.render(d); + d.classList.toggle("command-center-quick-pick"); + d.role = "button"; + const h = this.action; + const g = document.createElement("span"); + g.ariaHidden = "true"; + g.className = h.class ?? ""; + g.classList.add("search-icon"); + const p = this.b(); + const b = document.createElement("span"); + b.classList.add("search-label"); + b.innerText = p; + mo(d, g, b); + const v = this.B.add(c.h.setupManagedHover(c.b, d, this.F())); + this.B.add(c.g.onDidChange(() => { + v.update(this.F()); + b.innerText = this.b(); + })); + this.B.add(c.r.onDidChangeEditorPartOptions(({ + newPartOptions: y, + oldPartOptions: w + }) => { + if (y.showTabs !== w.showTabs) { + v.update(this.F()); + b.innerText = this.b(); + } + })); + } + F() { + return c.F(); + } + b() { + const { + prefix: d, + suffix: h + } = c.g.getTitleDecorations(); + let g = c.g.workspaceName; + if (c.g.isCustomTitleFormat()) { + g = c.g.getWindowTitle(); + } else if (c.r.partOptions.showTabs === "none") { + g = c.g.fileName ?? g; + } + g ||= f(3744, null); + if (d) { + g = f(3745, null, d, g); + } + if (h) { + g = f(3746, null, g, h); + } + return g.replaceAll(/\r\n|\r|\n/g, "⏎"); + } + }); + } + }); + o.setActions(r); + this.B.add(o); + if (n < s.length - 1) { + const a = Gp(A.circleSmallFilled); + a.style.padding = "0 12px"; + a.style.height = "100%"; + a.style.opacity = "0.5"; + e.appendChild(a); + } + } + } + F() { + const e = this.m.lookupKeybinding(this.action.id)?.getLabel(); + if (e) { + return f(3747, null, this.g.workspaceName, e, this.g.value); + } else { + return f(3748, null, this.g.workspaceName, this.g.value); + } + } +}; +S4i = w4i = __decorate([__param(3, Ns), __param(4, oi), __param(5, re), __param(6, Hi)], S4i); +Be.appendMenuItem(_.CommandCenter, { + submenu: _.CommandCenterCenter, + title: f(3749, null), + icon: A.shield, + order: 101 +}); +ar(); +Fs(); +vt(); +sl(); +Fi(); +fr(); +X(); +Me(); +qt(); +Je(); +Ee(); +rt(); +var x4i = class extends se { + constructor(i, e, t, s, n, r) { + r = T.and(n ? CP.toNegated() : T.true(), r); + super({ + id: `toggle.${i}`, + title: e, + metadata: t ? { + description: t + } : undefined, + toggled: T.equals(`config.${i}`, true), + menu: [{ + id: _.TitleBarContext, + when: r, + order: s, + group: "2_config" + }, { + id: _.TitleBarTitleContext, + when: r, + order: s, + group: "2_config" + }] + }); + this.a = i; + } + run(i, ...e) { + const t = i.get(ve); + const s = t.getValue(this.a); + t.updateValue(this.a, !s); + } +}; +J(class extends x4i { + constructor() { + super("window.commandCenter", f(3768, null), f(3769, null), 1, false); + } +}); +J(class extends x4i { + constructor() { + super("workbench.navigationControl.enabled", f(3770, null), f(3771, null), 2, false, T.has("config.window.commandCenter")); + } +}); +J(class extends x4i { + constructor() { + super("workbench.layoutControl.enabled", f(3772, null), f(3773, null), 3, true); + } +}); +J(class extends se { + constructor() { + super({ + id: "toggle.window.customTitleBarVisibility", + title: f(3774, null), + menu: [{ + id: _.TitleBarContext, + order: 0, + when: T.equals(XG.key, "native"), + group: "3_toggle" + }, { + id: _.TitleBarTitleContext, + order: 0, + when: T.equals(XG.key, "native"), + group: "3_toggle" + }] + }); + } + run(e, ...t) { + e.get(ve).updateValue("window.customTitleBarVisibility", "never"); + } +}); +J(class extends se { + constructor() { + super({ + id: "toggle.window.customTitleBarVisibility.windowed", + title: f(3775, null), + menu: [{ + id: _.TitleBarContext, + order: 1, + when: u6, + group: "3_toggle" + }, { + id: _.TitleBarTitleContext, + order: 1, + when: u6, + group: "3_toggle" + }] + }); + } + run(e, ...t) { + e.get(ve).updateValue("window.customTitleBarVisibility", "windowed"); + } +}); +var iqo = class extends se { + constructor() { + super({ + id: "toggle.toggleCustomTitleBar", + title: f(3776, null), + toggled: PCe, + menu: [{ + id: _.MenubarAppearanceMenu, + order: 6, + when: T.or(T.and(T.equals(XG.key, "native"), T.and(T.equals("config.workbench.layoutControl.enabled", false), T.equals("config.window.commandCenter", false), T.notEquals("config.workbench.editor.editorActionsLocation", "titleBar"), T.notEquals("config.workbench.activityBar.location", "top"), T.notEquals("config.workbench.activityBar.location", "bottom"))?.negate()), u6), + group: "2_workbench_layout" + }] + }); + } + run(i, ...e) { + const t = i.get(ve); + const s = i.get(Ne); + switch (t.getValue("window.customTitleBarVisibility")) { + case "never": + t.updateValue("window.customTitleBarVisibility", "auto"); + break; + case "windowed": + { + if (u6.evaluate(s.getContext(null))) { + t.updateValue("window.customTitleBarVisibility", "auto"); + } else { + t.updateValue("window.customTitleBarVisibility", "never"); + } + break; + } + case "auto": + default: + t.updateValue("window.customTitleBarVisibility", "never"); + break; + } + } +}; +J(iqo); +J(class extends se { + constructor() { + super({ + id: "showCustomTitleBar", + title: W(3783, "Show Custom Title Bar"), + precondition: PCe.negate(), + f1: true + }); + } + run(e, ...t) { + e.get(ve).updateValue("window.customTitleBarVisibility", "auto"); + } +}); +J(class extends se { + constructor() { + super({ + id: "hideCustomTitleBar", + title: W(3784, "Hide Custom Title Bar"), + precondition: PCe, + f1: true + }); + } + run(e, ...t) { + e.get(ve).updateValue("window.customTitleBarVisibility", "never"); + } +}); +J(class extends se { + constructor() { + super({ + id: "hideCustomTitleBarInFullScreen", + title: W(3785, "Hide Custom Title Bar In Full Screen"), + precondition: T.and(PCe, u6), + f1: true + }); + } + run(e, ...t) { + e.get(ve).updateValue("window.customTitleBarVisibility", "windowed"); + } +}); +J(class T2 extends se { + static { + this.settingsID = "workbench.editor.editorActionsLocation"; + } + constructor() { + const e = T.and(T.equals("config.workbench.editor.showTabs", "none").negate(), T.equals(`config.${T2.settingsID}`, "default"))?.negate(); + super({ + id: `toggle.${T2.settingsID}`, + title: f(3777, null), + toggled: T.equals(`config.${T2.settingsID}`, "hidden").negate(), + menu: [{ + id: _.TitleBarContext, + order: 3, + when: e, + group: "2_config" + }, { + id: _.TitleBarTitleContext, + order: 3, + when: e, + group: "2_config" + }] + }); + } + run(e, ...t) { + const s = e.get(ve); + const n = e.get(ht); + const r = s.getValue(T2.settingsID); + if (r === "hidden") { + if (s.getValue("workbench.editor.showTabs") !== "none") { + s.updateValue(T2.settingsID, "titleBar"); + } else { + const a = n.get(T2.settingsID, 0); + s.updateValue(T2.settingsID, a ?? "default"); + } + n.remove(T2.settingsID, 0); + } else { + s.updateValue(T2.settingsID, "hidden"); + n.store(T2.settingsID, r, 0, 0); + } + } +}); +if (yl && sc) { + J(class extends se { + constructor() { + super({ + id: "toggle.window.titleBarStyle", + title: f(3778, null), + menu: [{ + id: _.TitleBarContext, + order: 0, + when: T.equals(XG.key, "custom"), + group: "4_restore_native_title" + }, { + id: _.TitleBarTitleContext, + order: 0, + when: T.equals(XG.key, "custom"), + group: "4_restore_native_title" + }] + }); + } + run(e) { + e.get(ve).updateValue("window.titleBarStyle", "native"); + } + }); +} +var sqo = { + id: hX, + label: f(3779, null), + tooltip: f(3780, null), + class: undefined, + enabled: true, + run: function () {} +}; +var nqo = { + id: dX, + label: f(3781, null), + tooltip: f(3782, null), + class: undefined, + enabled: true, + run: function () {} +}; +oa(); +Wt(); +Wv(); +var k4i; +var E4i = class extends Fyi { + constructor(e, t, s) { + super("workbench.titleService", s, t); + this.a = e; + this.mainPart = this.D(this.b()); + this.onMenubarVisibilityChange = this.mainPart.onMenubarVisibilityChange; + this.s = undefined; + this.t = new Map(); + this.D(this.registerPart(this.mainPart)); + this.c(); + this.m(); + } + b() { + return this.a.createInstance(I4i); + } + c() { + const e = this; + this.D(J(class extends se { + constructor() { + super({ + id: "workbench.action.focusTitleBar", + title: W(3787, "Focus Title Bar"), + category: pt.View, + f1: true + }); + } + run() { + e.j(hf()).focus(); + } + })); + } + m() { + this.D(ei.registerCommand({ + id: "registerWindowTitleVariable", + handler: (e, t, s) => { + this.registerVariables([{ + name: t, + contextKey: s + }]); + }, + metadata: { + description: "Registers a new title variable", + args: [{ + name: "name", + schema: { + type: "string" + }, + description: "The name of the variable to register" + }, { + name: "contextKey", + schema: { + type: "string" + }, + description: "The context key to use for the value of the variable" + }] + } + })); + } + createAuxiliaryTitlebarPart(e, t) { + const s = document.createElement("div"); + s.classList.add("part", "titlebar"); + s.setAttribute("role", "none"); + s.style.position = "relative"; + e.insertBefore(s, e.firstChild); + const n = new Q(); + const r = this.r(s, t); + n.add(this.registerPart(r)); + n.add(de.runAndSubscribe(r.onDidChange, () => s.style.height = `${r.height}px`)); + r.create(s); + if (this.s) { + r.updateProperties(this.s); + } + if (this.t.size) { + r.registerVariables(Array.from(this.t.values())); + } + de.once(r.onWillDispose)(() => n.dispose()); + return r; + } + r(e, t) { + return this.a.createInstance(D4i, e, t, this.mainPart); + } + updateProperties(e) { + this.s = e; + for (const t of this.parts) { + t.updateProperties(e); + } + } + registerVariables(e) { + const t = []; + for (const s of e) { + if (!this.t.has(s.name)) { + this.t.set(s.name, s); + t.push(s); + } + } + for (const s of this.parts) { + s.registerVariables(t); + } + } +}; +E4i = __decorate([__param(0, re), __param(1, ht), __param(2, ti)], E4i); +var oPe = class extends rX { + get minimumHeight() { + const e = tn && xfe(); + let t = this.cc || e ? Hjs : 30; + if (e) { + t = Math.max(t, THn(Kt(this.element))?.height ?? 0); + } + return t / (this.preventZoom ? vI(Kt(this.element)) : 1); + } + get maximumHeight() { + return this.minimumHeight; + } + constructor(e, t, s, n, r, o, a, l, c, u, d, h, g, p, b, v) { + super(e, { + hasTitle: false + }, l, c, u); + this.Cb = n; + this.Db = r; + this.Eb = o; + this.Fb = a; + this.Gb = c; + this.Hb = d; + this.Ib = h; + this.Jb = g; + this.Kb = b; + this.Lb = v; + this.minimumWidth = 0; + this.maximumWidth = Number.POSITIVE_INFINITY; + this.a = this.D(new B()); + this.onMenubarVisibilityChange = this.a.event; + this.b = this.D(new B()); + this.onWillDispose = this.b.event; + this.nb = this.D(new Q()); + this.ob = this.D(new Q()); + this.rb = this.D(new Q()); + this.sb = this.D(new Q()); + this.tb = this.D(new Q()); + this.vb = this.D(new Q()); + this.wb = roi(this.Db); + this.xb = false; + this.yb = s !== "main"; + this.Ab = p.createScoped(s, this.B); + this.Bb = s === "main" ? g.mainPart : s; + this.zb = this.D(a.createInstance(Jkt, t, s)); + this.ub = this.D(Hy()); + this.Mb(yx(t)); + } + Mb(e) { + this.D(this.Ib.onDidChangeFocus(t => t ? this.Ob() : this.Nb())); + this.D(this.Ib.onDidChangeActiveWindow(t => t === e ? this.Ob() : this.Nb())); + this.D(this.Db.onDidChangeConfiguration(t => this.Qb(t))); + this.D(this.Jb.onDidChangeEditorPartOptions(t => this.Pb(t))); + } + Nb() { + this.xb = true; + this.updateStyles(); + } + Ob() { + this.xb = false; + this.updateStyles(); + } + Pb({ + oldPartOptions: e, + newPartOptions: t + }) { + if ((e.editorActionsLocation !== t.editorActionsLocation || e.showTabs !== t.showTabs) && jK(this.Db, this.wb) && this.mb) { + this.Yb(); + this.Zb({ + editorActions: true + }); + this.ab.fire(undefined); + } + } + Qb(e) { + if (!this.yb && !IC(this.Db, this.wb) && (!Gt || tn) && e.affectsConfiguration("window.menuBarVisibility")) { + if (this.ac === "compact") { + this.Sb(); + } else { + this.Rb(); + } + } + if (jK(this.Db, this.wb) && this.mb) { + const t = e.affectsConfiguration("workbench.layoutControl.enabled"); + const s = e.affectsConfiguration("workbench.activityBar.location"); + if (t || s) { + this.Zb({ + layoutActions: t, + activityActions: s + }); + this.ab.fire(undefined); + } + } + if (e.affectsConfiguration("window.commandCenter")) { + this.Vb(); + this.ab.fire(undefined); + } + } + Rb() { + if (!this.kb) { + this.hb = this.D(this.Fb.createInstance(OEt)); + this.kb = z(this.eb, G("div.menubar")); + this.kb.setAttribute("role", "menubar"); + this.D(this.hb.onVisibilityChange(e => this.Tb(e))); + this.hb.create(this.kb); + } + } + Sb() { + this.hb?.dispose(); + this.hb = undefined; + this.kb?.remove(); + this.kb = undefined; + this.Tb(false); + } + Tb(e) { + if (tn || ln || yl) { + if (this.lb) { + this.layout(this.lb.width, this.lb.height); + } + this.a.fire(e); + } + } + updateProperties(e) { + this.zb.updateProperties(e); + } + registerVariables(e) { + this.zb.registerVariables(e); + } + Q(e) { + this.element = e; + this.c = z(e, G(".titlebar-container")); + this.eb = z(this.c, G(".titlebar-left")); + this.fb = z(this.c, G(".titlebar-center")); + this.gb = z(this.c, G(".titlebar-right")); + if (!Gt && !tn && !IC(this.Db, this.wb) && (this.ib = K2(this.eb, G("a.window-appicon")), !this.yb && tn)) { + const t = this.Eb.options?.homeIndicator; + if (t) { + const s = WM().getIcon(t.icon) ? { + id: t.icon + } : A.code; + this.ib.setAttribute("href", t.href); + this.ib.classList.add(...le.asClassNameArray(s)); + this.jb = document.createElement("div"); + this.jb.classList.add("home-bar-icon-badge"); + this.ib.appendChild(this.jb); + } + } + this.cb = K2(this.c, G("div.titlebar-drag-region")); + if (!this.yb && !IC(this.Db, this.wb) && (!Gt || tn) && this.ac !== "compact") { + this.Rb(); + } + this.db = z(this.fb, G("div.window-title")); + this.Vb(); + if (jK(this.Db, this.wb)) { + this.pb = z(this.gb, G("div.action-toolbar-container")); + this.Yb(); + this.Zb(); + } + if (!IC(this.Db, this.wb)) { + let t = Gt ? "left" : "right"; + if (Gt && sc && Pee.Locale(Vqi)?.textInfo?.direction === "rtl") { + t = "right"; + } + if (!Gt || !sc || t !== "left") { + this.bb = z(t === "left" ? this.eb : this.gb, G("div.window-controls-container")); + if (tn) { + z(t === "left" ? this.gb : this.eb, G("div.window-controls-container")); + } + if (xfe()) { + this.bb.classList.add("wco-enabled"); + } + } + } + this.D(Ce(this.c, Oe.CONTEXT_MENU, t => { + yn.stop(t); + let s; + if (Gt && Bl(t.target) && Kd(t.target, this.db)) { + s = _.TitleBarTitleContext; + } else { + s = _.TitleBarContext; + } + this.$b(t, s); + })); + if (Gt) { + this.D(Ce(this.db, Oe.MOUSE_DOWN, t => { + if (t.metaKey) { + yn.stop(t, true); + this.$b(t, _.TitleBarTitleContext); + } + }, true)); + } + this.updateStyles(); + return this.element; + } + Vb() { + this.vb.clear(); + if (!this.cc) { + this.db.innerText = this.zb.value; + this.vb.add(this.zb.onDidChange(() => { + this.db.innerText = this.zb.value; + })); + } else { + const e = this.Fb.createInstance(C4i, this.zb, this.ub); + mo(this.db, e.element); + this.vb.add(e); + } + } + Wb(e, t) { + if (!this.yb) { + if (e.id === dX) { + return this.Fb.createInstance(nwi, { + position: () => 2 + }, t); + } + if (e.id === hX) { + return this.Fb.createInstance(swi, { + position: () => 2 + }, t); + } + } + const s = this.Bb.activeGroup?.activeEditorPane; + if (s && s instanceof $p) { + const n = s.getActionViewItem(e, t); + if (n) { + return n; + } + } + return Ig(this.Fb, e, { + ...t, + menuAsChild: false + }); + } + Xb(e) { + const t = this.Bb.activeGroup?.activeEditorPane?.scopedContextKeyService ?? this.Hb; + return this.Lb.lookupKeybinding(e.id, t); + } + Yb() { + this.nb.clear(); + this.mb = this.nb.add(this.Fb.createInstance(Dp, this.pb, { + contextMenu: _.TitleBarContext, + orientation: 0, + ariaLabel: f(3786, null), + getKeyBinding: e => this.Xb(e), + overflowBehavior: { + maxItems: 9, + exempted: [hX, dX, ...pjs] + }, + anchorAlignmentProvider: () => 1, + telemetrySource: "titlePart", + highlightToggledItems: this.dc, + actionViewItemProvider: (e, t) => this.Wb(e, t), + hoverDelegate: this.ub + })); + if (this.dc) { + this.nb.add(this.Bb.onDidChangeActiveGroup(() => this.Zb({ + editorActions: true + }))); + } + } + Zb(e = true) { + if (e === true) { + e = { + editorActions: true, + layoutActions: true, + activityActions: true + }; + } + const t = () => { + const s = { + primary: [], + secondary: [] + }; + if (this.dc) { + this.ob.clear(); + const n = this.Bb.activeGroup; + if (n) { + const r = n.createEditorActions(this.ob); + s.primary.push(...r.actions.primary); + s.secondary.push(...r.actions.secondary); + this.ob.add(r.onDidChange(() => t())); + } + } + if (this.ec) { + if (WEt(this.Gb)) { + s.primary.push(sqo); + } + s.primary.push(nqo); + } + if (this.qb) { + Tne(this.qb.getActions(), s, () => !this.dc); + } + this.mb.setActions(YI(s.primary), YI(s.secondary)); + }; + if (e.editorActions) { + this.rb.clear(); + if (this.dc && this.Ab.activeEditor !== undefined) { + const s = { + groupId: this.Bb.activeGroup.id + }; + this.mb.actionRunner = this.rb.add(new qoi(s)); + this.mb.context = s; + } else { + this.mb.actionRunner = this.rb.add(new ff()); + this.mb.context = undefined; + } + } + if (e.layoutActions) { + this.sb.clear(); + if (this.bc) { + this.qb = this.Kb.createMenu(_.LayoutControlMenu, this.Hb); + this.sb.add(this.qb); + this.sb.add(this.qb.onDidChange(() => t())); + } else { + this.qb = undefined; + } + } + if (e.activityActions) { + this.tb.clear(); + if (this.ec) { + this.tb.add(this.Gb.onDidChangeValue(0, ZV.ACCOUNTS_VISIBILITY_PREFERENCE_KEY, this.B)(() => t())); + } + } + t(); + } + updateStyles() { + super.updateStyles(); + if (this.element) { + if (this.xb) { + this.element.classList.add("inactive"); + } else { + this.element.classList.remove("inactive"); + } + const e = this.w(this.xb ? DIr : UCe, (n, r) => n.isOpaque() ? n : n.makeOpaque(qre(r))) || ""; + this.element.style.backgroundColor = e; + if (this.jb) { + this.jb.style.backgroundColor = e; + } + if (e && ut.fromHex(e).isLighter()) { + this.element.classList.add("light"); + } else { + this.element.classList.remove("light"); + } + const t = this.w(this.xb ? rni : n$); + this.element.style.color = t || ""; + const s = this.w(GVs); + this.element.style.borderBottom = s ? `1px solid ${s}` : ""; + } + } + $b(e, t) { + const s = new Xc(Kt(this.element), e); + this.Cb.showContextMenu({ + getAnchor: () => s, + menuId: t, + contextKeyService: this.Hb, + domForShadowRoot: Gt && sc ? s.target : undefined + }); + } + get ac() { + if (this.yb) { + return "hidden"; + } else { + return B6(this.Db); + } + } + get bc() { + return !this.yb && this.Db.getValue("workbench.layoutControl.enabled") !== false; + } + get cc() { + return this.Db.getValue("window.commandCenter") !== false; + } + get dc() { + return this.Jb.partOptions.editorActionsLocation === "titleBar" || this.Jb.partOptions.editorActionsLocation === "default" && this.Jb.partOptions.showTabs === "none"; + } + get ec() { + const e = this.Db.getValue("workbench.activityBar.location"); + return !this.yb && (e === "top" || e === "bottom"); + } + get hasZoomableElements() { + const e = this.ac !== "hidden" && this.ac !== "compact" && (!!tn || !Gt); + const t = this.cc; + const s = this.bc || this.dc || this.ec; + return e || t || s; + } + get preventZoom() { + return vI(Kt(this.element)) < 1 || !this.hasZoomableElements; + } + layout(e, t) { + this.fc(new Ln(e, t)); + super.Z(e, t); + } + fc(e) { + this.lb = e; + if (jK(this.Db, this.wb)) { + const t = vI(Kt(this.element)); + this.element.style.setProperty("--zoom-factor", t.toString()); + this.c.classList.toggle("counter-zoom", this.preventZoom); + if (this.hb) { + const s = new Ln(0, e.height); + this.hb.layout(s); + } + } + } + focus() { + if (this.hb) { + this.hb.toggleFocus(); + } else { + this.element.querySelector("[tabindex]:not([tabindex=\"-1\"])").focus(); + } + } + toJSON() { + return { + type: "workbench.parts.titlebar" + }; + } + dispose() { + this.b.fire(); + super.dispose(); + } +}; +oPe = __decorate([__param(3, ts), __param(4, ve), __param(5, hy), __param(6, re), __param(7, ti), __param(8, ht), __param(9, lr), __param(10, Ne), __param(11, kr), __param(12, Hi), __param(13, Te), __param(14, Hn), __param(15, oi)], oPe); +var I4i = class extends oPe { + constructor(e, t, s, n, r, o, a, l, c, u, d, h, g) { + super("workbench.parts.titlebar", xt, "main", e, t, s, n, r, o, a, l, c, u, d, h, g); + } +}; +I4i = __decorate([__param(0, ts), __param(1, ve), __param(2, hy), __param(3, re), __param(4, ti), __param(5, ht), __param(6, lr), __param(7, Ne), __param(8, kr), __param(9, Hi), __param(10, Te), __param(11, Hn), __param(12, oi)], I4i); +var D4i = class extends oPe { + static { + k4i = this; + } + static { + this.y = 1; + } + get height() { + return this.minimumHeight; + } + constructor(e, t, s, n, r, o, a, l, c, u, d, h, g, p, b, v) { + const y = k4i.y++; + super(`workbench.parts.auxiliaryTitle.${y}`, Kt(e), t, n, r, o, a, l, c, u, d, h, g, p, b, v); + this.container = e; + this.gc = s; + } + get preventZoom() { + return vI(Kt(this.element)) < 1 || !this.gc.hasZoomableElements; + } +}; +D4i = k4i = __decorate([__param(3, ts), __param(4, ve), __param(5, hy), __param(6, re), __param(7, ti), __param(8, ht), __param(9, lr), __param(10, Ne), __param(11, kr), __param(12, Hi), __param(13, Te), __param(14, Hn), __param(15, oi)], D4i); +ks(); +gi(); +te(); +He(); +Rt(); +Fs(); +Je(); +Ee(); +rt(); +Wi(); +Fi(); +Ho(); +Me(); +jn(); +qt(); +Wt(); +var T4i = class extends Ogn { + constructor(e, t, s, n, r, o, a, l, c, u, d, h, g, p, b, v, y) { + super(e, t, s, n, r, o, a, l, c, u, d, h, p, v, y); + this.ab = g; + this.bb = b; + (async () => { + this.h = await this.q.getRecentlyOpened(); + return this.L(); + })(); + this.M(); + } + N() { + super.N(); + for (const e of Object.keys(this.f)) { + const t = this.c[e]; + if (t) { + this.g.add(t.onDidChange(() => this.O())); + } + } + } + L() { + if (!this.H.hasFocus) { + return; + } + const e = { + menus: {}, + keybindings: {} + }; + if (this.eb(e)) { + this.ab.updateMenubar(this.bb.windowId, e); + } + } + eb(e) { + if (!e) { + return false; + } + e.keybindings = this.hb(); + for (const t of Object.keys(this.f)) { + const s = this.c[t]; + if (s) { + const n = { + items: [] + }; + const r = CS(s.getActions({ + shouldForwardArgs: true + })); + this.fb(r, n, e.keybindings); + if (n.items.length === 0) { + return false; + } + e.menus[t] = n; + } + } + return true; + } + fb(e, t, s) { + for (const n of e) { + if (n instanceof gr) { + t.items.push({ + id: "vscode.menubar.separator" + }); + } else if (n instanceof Ma || n instanceof vm) { + const r = typeof n.item.title == "string" ? n.item.title : n.item.title.mnemonicTitle ?? n.item.title.value; + if (n instanceof vm) { + const o = { + items: [] + }; + this.fb(n.actions, o, s); + if (o.items.length > 0) { + const a = { + id: n.id, + label: r, + submenu: o + }; + t.items.push(a); + } + } else { + if (n.id === FSe.ID) { + const a = this.S().map(this.gb); + t.items.push(...a); + } + const o = { + id: n.id, + label: r + }; + if (_Xt(n.item.toggled)) { + o.label = n.item.toggled.mnemonicTitle ?? n.item.toggled.title ?? r; + } + if (n.checked) { + o.checked = true; + } + if (!n.enabled) { + o.enabled = false; + } + s[n.id] = this.ib(n.id); + t.items.push(o); + } + } + } + } + gb(e) { + if (e instanceof gr) { + return { + id: "vscode.menubar.separator" + }; + } else { + return { + id: e.id, + uri: e.uri, + remoteAuthority: e.remoteAuthority, + enabled: e.enabled, + label: e.label + }; + } + } + hb() { + const e = {}; + if (Gt) { + const t = this.ib("workbench.action.quit"); + if (t) { + e["workbench.action.quit"] = t; + } + } + return e; + } + ib(e) { + const t = this.s.lookupKeybinding(e); + if (!t) { + return; + } + const s = t.getElectronAccelerator(); + if (s) { + return { + label: s, + userSettingsLabel: t.getUserSettingsLabel() ?? undefined + }; + } + const n = t.getLabel(); + if (n) { + return { + label: n, + isNative: false, + userSettingsLabel: t.getUserSettingsLabel() ?? undefined + }; + } + } +}; +T4i = __decorate([__param(0, Hn), __param(1, gC), __param(2, Ne), __param(3, oi), __param(4, ve), __param(5, Zs), __param(6, TS), __param(7, ht), __param(8, ni), __param(9, fa), __param(10, gu), __param(11, na), __param(12, jMn), __param(13, kr), __param(14, po), __param(15, gt), __param(16, Ns)], T4i); +ar(); +vt(); +Fi(); +fr(); +var P4i; +var X$t = class extends oPe { + get minimumHeight() { + if (Gt) { + return (this.cc ? Hjs : this.hc) / (this.preventZoom ? vI(Kt(this.element)) : 1); + } else { + return super.minimumHeight; + } + } + get maximumHeight() { + return this.minimumHeight; + } + get hc() { + if (this.gc) { + return 28; + } else { + return 22; + } + } + constructor(e, t, s, n, r, o, a, l, c, u, d, h, g, p, b, v, y) { + super(e, t, s, n, r, o, a, l, c, u, d, h, p, b, v, y); + this.mc = g; + this.gc = Fqi(o.os.release); + } + Tb(e) { + if ((ln || yl) && this.ac === "toggle" && e && this.cb) { + Qo(this.cb); + setTimeout(() => Ka(this.cb), 50); + } + super.Tb(e); + } + Qb(e) { + super.Qb(e); + if (e.affectsConfiguration("window.doubleClickIconToClose") && this.ib) { + this.pc(); + } + } + pc() { + if (this.Db.getValue("window.doubleClickIconToClose") && this.ib) { + this.ib.style["-webkit-app-region"] = "no-drag"; + } else if (this.ib) { + this.ib.style["-webkit-app-region"] = "drag"; + } + } + Rb() { + super.Rb(); + if (!this.kb && this.hb) { + this.D(this.hb.onFocusStateChange(e => this.rc(e))); + } + } + rc(e) { + if ((ln || yl) && this.ac !== "compact" && this.cb) { + if (e) { + Qo(this.cb); + } else { + Ka(this.cb); + } + } + } + Q(e) { + const t = super.Q(e); + const s = Kt(e); + const n = yx(s); + if (Gt || IC(this.Db)) { + this.D(this.Fb.createInstance(T4i)); + } + if (this.ib) { + this.pc(); + this.D(Ce(this.ib, Oe.DBLCLICK, () => { + this.mc.closeWindow({ + targetWindowId: n + }); + })); + } + if (yl && !IC(this.Db) && !xfe() && this.bb) { + const r = z(this.bb, G("div.window-icon.window-minimize" + le.asCSSSelector(A.chromeMinimize))); + this.D(Ce(r, Oe.CLICK, () => { + this.mc.minimizeWindow({ + targetWindowId: n + }); + })); + this.ic = z(this.bb, G("div.window-icon.window-max-restore")); + this.D(Ce(this.ic, Oe.CLICK, async () => (await this.mc.isMaximized({ + targetWindowId: n + })) ? this.mc.unmaximizeWindow({ + targetWindowId: n + }) : this.mc.maximizeWindow({ + targetWindowId: n + }))); + const o = z(this.bb, G("div.window-icon.window-close" + le.asCSSSelector(A.chromeClose))); + this.D(Ce(o, Oe.CLICK, () => { + this.mc.closeWindow({ + targetWindowId: n + }); + })); + this.jc = z(this.c, G("div.resizer")); + this.D(de.runAndSubscribe(this.M.onDidChangeWindowMaximized, ({ + windowId: a, + maximized: l + }) => { + if (a === n) { + this.tc(l); + } + }, { + windowId: n, + maximized: this.M.isWindowMaximized(s) + })); + } + if (ln && !IC(this.Db)) { + this.D(this.mc.onDidTriggerWindowSystemContextMenu(({ + windowId: r, + x: o, + y: a + }) => { + if (n !== r) { + return; + } + const l = vI(Kt(this.element)); + this.$b(new MouseEvent("mouseup", { + clientX: o / l, + clientY: a / l + }), _.TitleBarContext); + })); + } + return t; + } + tc(e) { + if (this.ic) { + if (e) { + this.ic.classList.remove(...le.asClassNameArray(A.chromeMaximize)); + this.ic.classList.add(...le.asClassNameArray(A.chromeRestore)); + } else { + this.ic.classList.remove(...le.asClassNameArray(A.chromeRestore)); + this.ic.classList.add(...le.asClassNameArray(A.chromeMaximize)); + } + } + if (this.jc) { + if (e) { + Qo(this.jc); + } else { + Ka(this.jc); + } + } + } + updateStyles() { + super.updateStyles(); + if (ooi(this.Db) && (!this.kc || this.kc.bgColor !== this.element.style.backgroundColor || this.kc.fgColor !== this.element.style.color)) { + this.mc.updateWindowControls({ + targetWindowId: yx(Kt(this.element)), + backgroundColor: this.element.style.backgroundColor, + foregroundColor: this.element.style.color + }); + } + } + layout(e, t) { + super.layout(e, t); + if (ooi(this.Db) || Gt && sc && !IC(this.Db)) { + const s = t > 0 || this.gc ? Math.round(t * vI(Kt(this.element))) : this.hc; + if (s !== this.lc) { + this.lc = s; + this.mc.updateWindowControls({ + targetWindowId: yx(Kt(this.element)), + height: s + }); + } + } + } +}; +X$t = __decorate([__param(3, ts), __param(4, ve), __param(5, gu), __param(6, re), __param(7, ti), __param(8, ht), __param(9, lr), __param(10, Ne), __param(11, kr), __param(12, po), __param(13, Hi), __param(14, Te), __param(15, Hn), __param(16, oi)], X$t); +var L4i = class extends X$t { + constructor(e, t, s, n, r, o, a, l, c, u, d, h, g, p) { + super("workbench.parts.titlebar", xt, "main", e, t, s, n, r, o, a, l, c, u, d, h, g, p); + } +}; +L4i = __decorate([__param(0, ts), __param(1, ve), __param(2, gu), __param(3, re), __param(4, ti), __param(5, ht), __param(6, lr), __param(7, Ne), __param(8, kr), __param(9, po), __param(10, Hi), __param(11, Te), __param(12, Hn), __param(13, oi)], L4i); +var R4i = class extends X$t { + static { + P4i = this; + } + static { + this.uc = 1; + } + get height() { + return this.minimumHeight; + } + constructor(e, t, s, n, r, o, a, l, c, u, d, h, g, p, b, v, y) { + const w = P4i.uc++; + super(`workbench.parts.auxiliaryTitle.${w}`, Kt(e), t, n, r, o, a, l, c, u, d, h, g, p, b, v, y); + this.container = e; + this.vc = s; + } + get preventZoom() { + return vI(Kt(this.element)) < 1 || !this.vc.hasZoomableElements; + } +}; +R4i = P4i = __decorate([__param(3, ts), __param(4, ve), __param(5, gu), __param(6, re), __param(7, ti), __param(8, ht), __param(9, lr), __param(10, Ne), __param(11, kr), __param(12, po), __param(13, Hi), __param(14, Te), __param(15, Hn), __param(16, oi)], R4i); +var rqo = class extends E4i { + b() { + return this.a.createInstance(L4i); + } + r(i, e) { + return this.a.createInstance(R4i, i, e, this.mainPart); + } +}; +it(Ale, rqo, 0); +pe(); +It(); +jn(); +Rr(); +q(); +var N4i = class { + constructor(e, t) { + this.windowId = e; + return YE.toService(t.getChannel("nativeHost"), { + context: e, + properties: (() => { + const s = new Map(); + s.set("windowId", e); + return s; + })() + }); + } +}; +N4i = __decorate([__param(1, dT)], N4i); +xe(); +au(); +fr(); +var M4i = class extends N4i { + constructor(e, t) { + super(e.window.id, t); + } +}; +M4i = __decorate([__param(0, gu), __param(1, dT)], M4i); +var Q$t = class extends H { + constructor(e, t, s) { + super(); + this.a = e; + this.b = t; + this.c = s; + this.onDidChangeFocus = de.latch(de.any(de.map(de.filter(this.a.onDidFocusMainOrAuxiliaryWindow, n => ij(n), this.B), () => this.hasFocus, this.B), de.map(de.filter(this.a.onDidBlurMainOrAuxiliaryWindow, n => ij(n), this.B), () => this.hasFocus, this.B), de.map(this.onDidChangeActiveWindow, () => this.hasFocus, this.B)), undefined, this.B); + this.onDidChangeFullScreen = de.filter(this.a.onDidChangeWindowFullScreen, n => ij(n.windowId), this.B); + this.j = new Map(); + } + get hasFocus() { + return hf().hasFocus(); + } + async hadLastFocus() { + const e = await this.a.getActiveWindowId(); + if (typeof e === "undefined") { + return false; + } else { + return e === this.a.windowId; + } + } + get onDidChangeActiveWindow() { + const e = this.D(new B()); + this.D(de.filter(this.a.onDidFocusMainOrAuxiliaryWindow, t => ij(t), this.B)(t => e.fire(t))); + this.D(xI(({ + window: t, + disposables: s + }) => { + s.add(qB(t, () => { + const n = t.document.hasFocus(); + if (n) { + e.fire(t.vscodeWindowId); + } + return n; + }, 100, 20)); + })); + return de.latch(e.event, undefined, this.B); + } + openWindow(e, t) { + if (Array.isArray(e)) { + return this.f(e, t); + } else { + return this.h(e); + } + } + async f(e, t) { + const s = this.c.remoteAuthority; + if (s) { + e.forEach(n => n.label = n.label || this.g(n)); + if (t?.remoteAuthority === undefined) { + t = t ? { + ...t, + remoteAuthority: s + } : { + remoteAuthority: s + }; + } + } + await this.a.openWindow(e, t); + } + g(e) { + if (QPr(e)) { + return this.b.getWorkspaceLabel(e.folderUri, { + verbose: 2 + }); + } else if (noi(e)) { + return this.b.getWorkspaceLabel({ + id: "", + configPath: e.workspaceUri + }, { + verbose: 2 + }); + } else { + return this.b.getUriLabel(e.fileUri); + } + } + async h(e) { + const t = this.c.remoteAuthority; + if (t && e?.remoteAuthority === undefined) { + e = e ? { + ...e, + remoteAuthority: t + } : { + remoteAuthority: t + }; + } + await this.a.openWindow(e); + } + toggleFullScreen(e) { + return this.a.toggleFullScreen({ + targetWindowId: Cfe(e) ? e.vscodeWindowId : undefined + }); + } + async moveTop(e) { + if (!(lge() <= 1)) { + return this.a.moveWindowTop(Cfe(e) ? { + targetWindowId: e.vscodeWindowId + } : undefined); + } + } + getCursorScreenPoint() { + return this.a.getCursorScreenPoint(); + } + focus(e, t) { + return this.a.focusWindow({ + force: t?.force, + targetWindowId: yx(e) + }); + } + restart() { + return this.a.relaunch(); + } + reload(e) { + return this.a.reload(e); + } + close() { + return this.a.closeWindow(); + } + async withExpectedShutdown(e) { + return await e(); + } + getScreenshot() { + return this.a.getScreenshot(); + } + async getNativeWindowHandle(e) { + if (!this.j.has(e)) { + this.j.set(e, this.a.getNativeWindowHandle(e)); + } + return this.j.get(e); + } +}; +__decorate([Hs], Q$t.prototype, "onDidChangeActiveWindow", null); +Q$t = __decorate([__param(0, po), __param(1, Zs), __param(2, Wn)], Q$t); +it(kr, Q$t, 1); +it(po, M4i, 1); +Me(); +It(); +nr(); +Ut(); +async function oqo(i, e, t) { + if (e.isCancellationRequested) { + throw SL(); + } + const s = new AbortController(); + const n = e.onCancellationRequested(() => s.abort()); + const r = i.timeout ? AbortSignal.any([s.signal, AbortSignal.timeout(i.timeout)]) : s.signal; + try { + const o = { + method: i.type || "GET", + headers: aqo(i), + body: i.data, + signal: r + }; + if (i.disableCache) { + o.cache = "no-store"; + } + const a = await fetch(i.url || "", o); + return { + res: { + statusCode: a.status, + headers: lqo(a) + }, + stream: UB(Ii.wrap(new Uint8Array(await a.arrayBuffer()))) + }; + } catch (o) { + throw t && !t() ? new jHs() : o?.name === "AbortError" ? SL() : o?.name === "TimeoutError" ? new Error(`Fetch timeout: ${i.timeout}ms`) : o; + } finally { + n.dispose(); + } +} +function aqo(i) { + if (i.headers || i.user || i.password || i.proxyAuthorization) { + const e = new Headers(); + e: for (const t in i.headers) { + switch (t.toLowerCase()) { + case "user-agent": + case "accept-encoding": + case "content-length": + continue e; + } + const s = i.headers[t]; + if (typeof s == "string") { + e.set(t, s); + } else if (Array.isArray(s)) { + for (const n of s) { + e.append(t, n); + } + } + } + if (i.user || i.password) { + e.set("Authorization", "Basic " + btoa(`${i.user || ""}:${i.password || ""}`)); + } + if (i.proxyAuthorization) { + e.set("Proxy-Authorization", i.proxyAuthorization); + } + return e; + } +} +function lqo(i) { + const e = Object.create(null); + i.headers.forEach((t, s) => { + if (e[s]) { + if (Array.isArray(e[s])) { + e[s].push(t); + } else { + e[s] = [e[s], t]; + } + } else { + e[s] = t; + } + }); + return e; +} +Zt(); +var A4i = class extends rxr { + constructor(e, t, s) { + super(s); + this.f = e; + this.g = t; + } + async request(e, t) { + e.proxyAuthorization ||= this.g.getValue("http.proxyAuthorization"); + return this.c(e, () => oqo(e, t, () => navigator.onLine)); + } + async resolveProxy(e) { + return this.f.resolveProxy(e); + } + async lookupAuthorization(e) { + return this.f.lookupAuthorization(e); + } + async lookupKerberosAuthorization(e) { + return this.f.lookupKerberosAuthorization(e); + } + async loadCertificates() { + return this.f.loadCertificates(); + } +}; +A4i = __decorate([__param(0, po), __param(1, ve), __param(2, Bt)], A4i); +it(IS, A4i, 1); +Xa(); +Le(); +rt(); +It(); +nr(); +pe(); +var aPe; +var $4i = class { + static { + aPe = this; + } + static { + this.a = "code/file-list"; + } + constructor(e) { + this.c = e; + this.b = new B(); + this.onDidChangeClipboard = this.b.event; + } + async readImage() { + return this.c.readImage(); + } + async writeText(e, t) { + this.b.fire(e); + return this.c.writeClipboardText(e, t); + } + async readText(e) { + return this.c.readClipboardText(e); + } + async readFindText() { + if (Gt) { + return this.c.readClipboardFindText(); + } else { + return ""; + } + } + async writeFindText(e) { + if (Gt) { + return this.c.writeClipboardFindText(e); + } + } + async writeResources(e) { + if (e.length) { + return this.c.writeClipboardBuffer(aPe.a, this.d(e)); + } + } + async readResources() { + return this.e(await this.c.readClipboardBuffer(aPe.a)); + } + async hasResources() { + return this.c.hasClipboard(aPe.a); + } + d(e) { + return Ii.fromString(e.map(t => t.toString()).join(` +`)); + } + e(e) { + if (!e) { + return []; + } + const t = e.toString(); + if (!t) { + return []; + } + try { + return t.split(` +`).map(s => V.parse(s)); + } catch { + return []; + } + } +}; +$4i = aPe = __decorate([__param(0, po)], $4i); +it(Zr, $4i, 1); +Fs(); +xe(); +ks(); +ai(); +Fi(); +hc(); +Yp(); +Wi(); +A0(); +var cqo = "vscode:contextmenu"; +var uqo = "vscode:onCloseContextMenu"; +var dqo = 0; +function hqo(i, e, t) { + const s = []; + const n = dqo++; + const r = `vscode:onContextMenu${n}`; + const o = (a, l, c) => { + s[l].click?.(c); + }; + Td.once(r, o); + Td.once(uqo, (a, l) => { + if (l === n) { + Td.removeListener(r, o); + t?.(); + } + }); + Td.send(cqo, n, i.map(a => JMn(a, s)), r, e); +} +function JMn(i, e) { + const t = { + id: e.length, + label: i.label, + type: i.type, + accelerator: i.accelerator, + checked: i.checked, + enabled: typeof i.enabled == "boolean" ? i.enabled : true, + visible: typeof i.visible == "boolean" ? i.visible : true + }; + e.push(i); + if (Array.isArray(i.submenu)) { + t.submenu = i.submenu.map(s => JMn(s, e)); + } + return t; +} +rt(); +Me(); +xe(); +Fs(); +pe(); +q(); +Je(); +Ee(); +Fi(); +Wi(); +ai(); +xe(); +gd(); +Fs(); +Ut(); +q(); +ya(); +var fqo = class { + constructor(i, e, t, s) { + this.g = i; + this.h = e; + this.i = t; + this.j = s; + this.a = null; + this.b = null; + this.c = null; + this.d = null; + this.f = { + blockMouse: true + }; + } + configure(i) { + this.f = i; + } + showContextMenu(i) { + const e = i.getActions(); + if (!e.length) { + return; + } + this.a = Tu(); + let t; + const s = Bl(i.domForShadowRoot) ? i.domForShadowRoot : undefined; + this.g.showContextView({ + getAnchor: () => i.getAnchor(), + canRelayout: false, + anchorAlignment: i.anchorAlignment, + anchorAxisAlignment: i.anchorAxisAlignment, + render: n => { + this.b = n; + const r = i.getMenuClassName ? i.getMenuClassName() : ""; + if (r) { + n.className += " " + r; + } + if (this.f.blockMouse) { + this.c = n.appendChild(G(".context-view-block")); + this.c.style.position = "fixed"; + this.c.style.cursor = "initial"; + this.c.style.left = "0"; + this.c.style.top = "0"; + this.c.style.width = "100%"; + this.c.style.height = "100%"; + this.c.style.zIndex = "-1"; + this.d?.dispose(); + this.d = Ce(this.c, Oe.MOUSE_DOWN, c => c.stopPropagation()); + } + const o = new Q(); + const a = i.actionRunner || o.add(new ff()); + a.onWillRun(c => this.k(c, !i.skipTelemetry), this, o); + a.onDidRun(this.l, this, o); + t = new Zyi(n, e, { + actionViewItemProvider: i.getActionViewItem, + context: i.getActionsContext ? i.getActionsContext() : null, + actionRunner: a, + getKeyBinding: i.getKeyBinding ? i.getKeyBinding : c => this.j.lookupKeybinding(c.id) + }, sVt); + t.onDidCancel(() => this.g.hideContextView(true), null, o); + t.onDidBlur(() => this.g.hideContextView(true), null, o); + const l = Kt(n); + o.add(Ce(l, Oe.BLUR, () => this.g.hideContextView(true))); + o.add(Ce(l, Oe.MOUSE_DOWN, c => { + if (c.defaultPrevented) { + return; + } + const u = new Xc(l, c); + let d = u.target; + if (!u.rightButton) { + while (d) { + if (d === n) { + return; + } + d = d.parentElement; + } + this.g.hideContextView(true); + } + })); + return Gc(o, t); + }, + focus: () => { + t?.focus(!!i.autoSelectFirstItem); + }, + onHide: n => { + i.onHide?.(!!n); + if (this.c) { + this.c.remove(); + this.c = null; + } + this.d?.dispose(); + this.d = null; + if (this.b && (Tu() === this.b || Kd(Tu(), this.b))) { + this.a?.focus(); + } + this.b = null; + } + }, s, !!s); + } + k(i, e) { + if (e) { + this.h.publicLog2("workbenchActionExecuted", { + id: i.action.id, + from: "contextMenu" + }); + } + this.g.hideContextView(false); + } + l(i) { + if (i.error && !ca(i.error)) { + this.i.error(i.error); + } + } +}; +ks(); +var F4i = class extends H { + get b() { + this.a ||= new fqo(this.j, this.g, this.h, this.m); + return this.a; + } + constructor(e, t, s, n, r, o) { + super(); + this.g = e; + this.h = t; + this.j = s; + this.m = n; + this.n = r; + this.q = o; + this.a = undefined; + this.c = this.B.add(new B()); + this.onDidShowContextMenu = this.c.event; + this.f = this.B.add(new B()); + this.onDidHideContextMenu = this.f.event; + } + configure(e) { + this.b.configure(e); + } + showContextMenu(e) { + e = Z$t.transform(e, this.n, this.q); + this.b.showContextMenu({ + ...e, + onHide: t => { + e.onHide?.(t); + this.f.fire(); + } + }); + Y2.getInstance().resetKeyStatus(); + this.c.fire(); + } +}; +F4i = __decorate([__param(0, Ot), __param(1, ni), __param(2, Sc), __param(3, oi), __param(4, Hn), __param(5, Ne)], F4i); +var Z$t; +(function (i) { + function e(s) { + return s && s.menuId instanceof _; + } + function t(s, n, r) { + if (!e(s)) { + return s; + } + const { + menuId: o, + menuActionOptions: a, + contextKeyService: l + } = s; + return { + ...s, + getActions: () => { + let c = []; + if (o) { + const u = n.getMenuActions(o, l ?? r, a); + c = CS(u); + } + if (s.getActions) { + return gr.join(s.getActions(), c); + } else { + return c; + } + } + }; + } + i.transform = t; +})(Z$t ||= {}); +It(); +Q0(); +Jt(); +pe(); +Je(); +Ee(); +q(); +var O4i = class { + get onDidShowContextMenu() { + return this.a.onDidShowContextMenu; + } + get onDidHideContextMenu() { + return this.a.onDidHideContextMenu; + } + constructor(e, t, s, n, r, o, a) { + if (!Gt && !IC(n)) { + this.a = new F4i(t, e, r, s, o, a); + } else { + this.a = new _4i(e, t, s, o, a); + } + } + dispose() { + this.a.dispose(); + } + showContextMenu(e) { + this.a.showContextMenu(e); + } +}; +O4i = __decorate([__param(0, ni), __param(1, Ot), __param(2, oi), __param(3, ve), __param(4, Sc), __param(5, Hn), __param(6, Ne)], O4i); +var _4i = class extends H { + constructor(e, t, s, n, r) { + super(); + this.c = e; + this.f = t; + this.g = s; + this.h = n; + this.j = r; + this.a = this.B.add(new B()); + this.onDidShowContextMenu = this.a.event; + this.b = this.B.add(new B()); + this.onDidHideContextMenu = this.b.event; + } + showContextMenu(e) { + e = Z$t.transform(e, this.h, this.j); + const t = e.getActions(); + if (t.length) { + const s = Py(() => { + e.onHide?.(false); + Y2.getInstance().resetKeyStatus(); + this.b.fire(); + }); + const n = this.m(e, t, s); + const r = e.getAnchor(); + let o; + let a; + let l = vI(Bl(r) ? Kt(r) : js()); + if (Bl(r)) { + const c = sd(r); + l *= Art(r); + if (e.anchorAxisAlignment === 1) { + if (e.anchorAlignment === 0) { + o = c.left; + a = c.top; + } else { + o = c.left + c.width; + a = c.top; + } + if (!Gt) { + if (Kt(r).screen.height - a < t.length * (ln ? 45 : 32)) { + a += c.height; + } + } + } else if (e.anchorAlignment === 0) { + o = c.left; + a = c.top + c.height; + } else { + o = c.left + c.width; + a = c.top + c.height; + } + if (Gt) { + a += 4 / l; + } + } else if (Lgn(r)) { + o = r.x; + a = r.y; + } + if (typeof o == "number") { + o = Math.floor(o * l); + } + if (typeof a == "number") { + a = Math.floor(a * l); + } + hqo(n, { + x: o, + y: a, + positioningItem: e.autoSelectFirstItem ? 0 : undefined + }, () => s()); + this.a.fire(); + } + } + m(e, t, s, n = new Set()) { + return dr(t.map(r => this.n(e, r, s, n))); + } + n(e, t, s, n) { + if (t instanceof gr) { + return { + type: "separator" + }; + } + if (t instanceof mg) { + if (n.has(t.id)) { + console.warn(`Found submenu cycle: ${t.id}`); + return; + } + return { + label: oVt(KI(t.label)).trim(), + submenu: this.m(e, t.actions, s, new Set([...n, t.id])) + }; + } else { + let r; + if (t.checked) { + if (typeof e.getCheckedActionsRepresentation == "function") { + r = e.getCheckedActionsRepresentation(t); + } else { + r = "checkbox"; + } + } + const o = { + label: oVt(KI(t.label)).trim(), + checked: !!t.checked, + type: r, + enabled: !!t.enabled, + click: l => { + s(); + this.q(t, e, l); + } + }; + const a = e.getKeyBinding ? e.getKeyBinding(t) : this.g.lookupKeybinding(t.id); + if (a) { + const l = a.getElectronAccelerator(); + if (l) { + o.accelerator = l; + } else { + const c = a.getLabel(); + if (c) { + o.label = `${o.label} [${c}]`; + } + } + } + return o; + } + } + async q(e, t, s) { + if (!t.skipTelemetry) { + this.f.publicLog2("workbenchActionExecuted", { + id: e.id, + from: "contextMenu" + }); + } + const n = t.getActionsContext ? t.getActionsContext(s) : undefined; + try { + if (t.actionRunner) { + await t.actionRunner.run(e, n); + } else if (e.enabled) { + await e.run(n); + } + } catch (r) { + this.c.error(r); + } + } +}; +_4i = __decorate([__param(0, ni), __param(1, Ot), __param(2, oi), __param(3, Hn), __param(4, Ne)], _4i); +it(ts, O4i, 1); +X(); +Le(); +ii(); +qt(); +rn(); +Wt(); +Et(); +Wi(); +Nt(); +da(); +fn(); +It(); +jn(); +X(); +ii(); +Qr(); +Ht(); +Wt(); +Jt(); +Et(); +Wi(); +Nt(); +Rr(); +fn(); +Yp(); +At(); +Un(); +mu(); +q(); +var B4i = class extends H { + constructor(e, t, s, n, r, o, a, l, c, u, d, h, g, p, b, v) { + super(); + this.a = e; + this.b = t; + this.c = s; + this.f = n; + this.g = r; + this.h = o; + this.j = a; + this.m = l; + this.n = c; + this.q = u; + this.r = d; + this.s = h; + this.t = g; + this.u = p; + this.w = b; + this.y = v; + } + async pickNewWorkspacePath() { + const e = [me.file]; + if (this.n.remoteAuthority) { + e.unshift(me.vscodeRemote); + } + let t = await this.q.showSaveDialog({ + saveLabel: Iie(f(13733, null)), + title: f(13734, null), + filters: yos, + defaultUri: Li(await this.q.defaultWorkspacePath(), this.z()), + availableFileSystems: e + }); + if (t) { + if (!rie(t)) { + t = t.with({ + path: `${t.path}.${qI}` + }); + } + return t; + } + } + z() { + const e = this.R()?.configPath; + if (e && Alt(e, this.n)) { + return ji(e); + } + const t = this.b.getWorkspace().folders.at(0); + if (t) { + return `${ji(t.uri)}.${qI}`; + } else { + return `workspace.${qI}`; + } + } + async updateFolders(e, t, s, n) { + const r = this.b.getWorkspace().folders; + let o = []; + if (typeof t == "number") { + o = r.slice(e, e + t).map(u => u.uri); + } + let a = []; + if (Array.isArray(s)) { + a = s.map(u => ({ + uri: GZ(u.uri), + name: u.name + })); + } + const l = o.length > 0; + const c = a.length > 0; + if (!!c || !!l) { + if (c && !l) { + return this.F(a, e, n); + } else if (l && !c) { + return this.removeFolders(o); + } else if (this.G(o)) { + return this.createAndEnterWorkspace(a); + } else if (this.b.getWorkbenchState() !== 3) { + return this.F(a, e, n); + } else { + return this.C(a, o, e, n); + } + } + } + async C(e, t, s, n = false) { + try { + await this.b.updateFolders(e, t, s); + } catch (r) { + if (n) { + throw r; + } + this.J(r); + } + } + addFolders(e, t = false) { + const s = e.map(n => ({ + uri: GZ(n.uri), + name: n.name + })); + return this.F(s, undefined, t); + } + async F(e, t, s = false) { + const n = this.b.getWorkbenchState(); + const r = this.n.remoteAuthority; + if (r) { + e = e.filter(o => o.uri.scheme !== me.file && (o.uri.scheme !== me.vscodeRemote || o9(o.uri.authority, r))); + } + if (n !== 3) { + let o = this.b.getWorkspace().folders.map(a => ({ + uri: a.uri + })); + o.splice(typeof t == "number" ? t : o.length, 0, ...e); + o = Ea(o, a => this.t.extUri.getComparisonKey(a.uri)); + if (n === 1 && o.length === 0 || n === 2 && o.length === 1) { + return undefined; + } else { + return this.createAndEnterWorkspace(o); + } + } + try { + await this.b.addFolders(e, t); + } catch (o) { + if (s) { + throw o; + } + this.J(o); + } + } + async removeFolders(e, t = false) { + if (this.G(e)) { + return this.createAndEnterWorkspace([]); + } + try { + await this.b.removeFolders(e); + } catch (s) { + if (t) { + throw s; + } + this.J(s); + } + } + G(e) { + if (this.b.getWorkbenchState() === 2) { + const t = this.b.getWorkspace().folders[0]; + return e.some(s => this.t.extUri.isEqual(s, t.uri)); + } + return false; + } + async createAndEnterWorkspace(e, t) { + if (t && !(await this.isValidTargetWorkspacePath(t))) { + return; + } + const s = this.n.remoteAuthority; + const n = await this.m.createUntitledWorkspace(e, s); + if (t) { + try { + await this.H(n, t); + } finally { + await this.m.deleteUntitledWorkspace(n); + } + } else { + t = n.configPath; + if (!this.y.currentProfile.isDefault) { + await this.w.setProfileForWorkspace(n, this.y.currentProfile); + } + } + return this.enterWorkspace(t); + } + async saveAndEnterWorkspace(e) { + const t = this.R(); + if (t) { + if (Ls(t.configPath, e)) { + return this.I(t); + } + if (await this.isValidTargetWorkspacePath(e)) { + await this.H(t, e); + return this.enterWorkspace(e); + } + } + } + async isValidTargetWorkspacePath(e) { + return true; + } + async H(e, t) { + const s = e.configPath; + if (!o7(t, this.n) && !this.y.currentProfile.isDefault) { + const l = await this.m.getWorkspaceIdentifier(t); + await this.w.setProfileForWorkspace(l, this.y.currentProfile); + } + if (this.t.extUri.isEqual(s, t)) { + return; + } + const r = o7(s, this.n); + const o = await this.h.readFile(s); + const a = e9s(o.value.toString(), s, r, t, this.t.extUri); + await this.j.create([{ + resource: t, + value: a, + options: { + overwrite: true + } + }]); + await this.Q(t); + } + async I(e) { + const t = e.configPath; + const s = this.j.files.get(t); + if (s) { + await s.save({ + force: true, + reason: 1 + }); + return; + } + if (await this.h.exists(t)) { + return; + } + const o = e9s(JSON.stringify({ + folders: [] + }, null, "\t"), t, false, t, this.t.extUri); + await this.j.create([{ + resource: t, + value: o + }]); + } + J(e) { + switch (e.code) { + case 0: + this.L(); + break; + default: + this.f.error(e.message); + } + } + L() { + const e = f(13735, null); + this.M(e); + } + M(e) { + this.f.prompt(es.Error, e, [{ + label: f(13736, null), + run: () => this.g.executeCommand("workbench.action.openWorkspaceConfigFile") + }]); + } + async N(e) { + if (this.n.extensionTestsLocationURI) { + throw new Error("Entering a new workspace is not possible in tests."); + } + const t = await this.m.getWorkspaceIdentifier(e); + if (this.b.getWorkbenchState() === 2) { + await this.O(t); + } + await this.c.initialize(t); + return this.m.enterWorkspace(e); + } + O(e) { + return this.P(e, t => t.scope === 3); + } + copyWorkspaceSettings(e, t) { + return this.P(e, undefined, t); + } + P(e, t, s) { + const n = Pe.as(rr.Configuration).getConfigurationProperties(); + const r = {}; + for (const o of this.c.keys().workspace) { + if (n[o]) { + if (t && !t(n[o])) { + continue; + } + r[o] = this.c.inspect(o).workspaceValue; + } + } + for (const [o, a] of Object.entries(s?.overrides || {})) { + r[o] = a; + } + return this.a.write(e.configPath, [{ + path: ["settings"], + value: r + }], true); + } + async Q(e) { + if (this.b.getWorkbenchState() !== 1 && this.u.isWorkspaceTrusted()) { + await this.u.setUrisTrust([e], true); + } + } + R() { + const e = Lx(this.b.getWorkspace()); + if ($M(e)) { + return e; + } + } +}; +B4i = __decorate([__param(0, PD), __param(1, kt), __param(2, eT), __param(3, ni), __param(4, gt), __param(5, Ct), __param(6, So), __param(7, gC), __param(8, Wn), __param(9, Xl), __param(10, Js), __param(11, kr), __param(12, _s), __param(13, qf), __param(14, Ml), __param(15, Rc)], B4i); +rt(); +Et(); +Le(); +Jt(); +Jr(); +nt(); +Nt(); +In(); +OL(); +nr(); +q(); +Zt(); +At(); +Gl(); +zt(); +var cB; +var gqo = class l3n { + static async create(e, t) { + const s = new l3n(e, t); + await s.d(); + return s; + } + constructor(e, t) { + this.b = e; + this.c = t; + this.a = new dn(); + } + async d() { + try { + const e = await this.c.resolve(this.b); + if (e.children) { + await Ko.settled(e.children.filter(t => t.isDirectory).map(async t => { + const s = await this.c.resolve(t.resource); + if (s.children) { + for (const n of s.children) { + if (!n.isDirectory) { + this.add(n.resource); + } + } + } + })); + } + } catch {} + } + add(e, t = 0, s) { + this.a.set(e, { + versionId: t, + meta: Gn(s) + }); + } + update(e, t) { + const s = this.a.get(e); + if (s) { + s.meta = Gn(t); + } + } + count() { + return this.a.size; + } + has(e, t, s) { + const n = this.a.get(e); + return !!n && (typeof t != "number" || t === n.versionId) && (!s || !!Ul(s, n.meta)); + } + get() { + return Array.from(this.a.keys()); + } + remove(e) { + this.a.delete(e); + } + clear() { + this.a.clear(); + } +}; +var e2t = class extends H { + constructor(e, t, s) { + super(); + this.b = t; + this.g = s; + this.a = this.D(this.h(e)); + } + h(e) { + if (e) { + return new t2t(e, this.b, this.g); + } else { + return new GMn(); + } + } + reinitialize(e) { + if (this.a instanceof t2t) { + if (e) { + this.a.initialize(e); + } else { + this.a = new GMn(); + } + } + } + hasBackups() { + return this.a.hasBackups(); + } + hasBackupSync(e, t, s) { + return this.a.hasBackupSync(e, t, s); + } + backup(e, t, s, n, r) { + return this.a.backup(e, t, s, n, r); + } + discardBackup(e, t) { + return this.a.discardBackup(e, t); + } + discardBackups(e) { + return this.a.discardBackups(e); + } + getBackups() { + return this.a.getBackups(); + } + resolve(e) { + return this.a.resolve(e); + } + toBackupResource(e) { + return this.a.toBackupResource(e); + } + joinBackups() { + return this.a.joinBackups(); + } +}; +e2t = __decorate([__param(1, Ct), __param(2, Bt)], e2t); +var t2t = class extends H { + static { + cB = this; + } + static { + this.a = ` +`; + } + static { + this.b = 10; + } + static { + this.c = " "; + } + static { + this.f = 10000; + } + constructor(e, t, s) { + super(); + this.m = e; + this.n = t; + this.q = s; + this.g = this.D(new bfe()); + this.j = undefined; + this.initialize(e); + } + initialize(e) { + this.m = e; + this.h = this.r(); + } + async r() { + this.j = await gqo.create(this.m, this.n); + return this.j; + } + async hasBackups() { + const e = await this.h; + await this.joinBackups(); + return e.count() > 0; + } + hasBackupSync(e, t, s) { + if (!this.j) { + return false; + } + const n = this.toBackupResource(e); + return this.j.has(n, t, s); + } + async backup(e, t, s, n, r) { + const o = await this.h; + if (r?.isCancellationRequested) { + return; + } + const a = this.toBackupResource(e); + if (!o.has(a, s, n)) { + return this.g.queueFor(a, async () => { + if (r?.isCancellationRequested || o.has(a, s, n)) { + return; + } + let l = this.s(e, n); + if (l.length >= cB.f) { + l = this.s(e); + } + const c = Ii.fromString(l); + let u; + if (oee(t)) { + u = Nzi(c, t); + } else if (t) { + u = XHn(c, t); + } else { + u = Ii.concat([c, Ii.fromString("")]); + } + await this.n.writeFile(a, u); + o.add(a, s, n); + }); + } + } + s(e, t) { + return `${e.resource.toString()}${cB.c}${JSON.stringify({ + ...t, + typeId: e.typeId + })}${cB.a}`; + } + async discardBackups(e) { + const t = await this.h; + const s = e?.except; + if (Array.isArray(s) && s.length > 0) { + const n = new dn(); + for (const r of s) { + n.set(this.toBackupResource(r), true); + } + await Ko.settled(t.get().map(async r => { + if (!n.has(r)) { + await this.t(r); + } + })); + } else { + await this.u(this.m); + t.clear(); + } + } + discardBackup(e, t) { + const s = this.toBackupResource(e); + return this.t(s, t); + } + async t(e, t) { + const s = await this.h; + if (!t?.isCancellationRequested) { + return this.g.queueFor(e, async () => { + if (!t?.isCancellationRequested) { + await this.u(e); + s.remove(e); + } + }); + } + } + async u(e) { + try { + await this.n.del(e, { + recursive: true + }); + } catch (t) { + if (t.fileOperationResult !== 1) { + throw t; + } + } + } + async getBackups() { + const e = await this.h; + await this.joinBackups(); + const t = await Promise.all(e.get().map(s => this.w(s, e))); + return dr(t); + } + async w(e, t) { + let s; + await this.g.queueFor(e, async () => { + if (!t.has(e)) { + return; + } + const n = await this.y(e, cB.a, cB.f); + if (!n) { + return; + } + const r = n.indexOf(cB.c); + let o; + let a; + if (r > 0) { + o = n.substring(0, r); + a = n.substr(r + 1); + } else { + o = n; + a = undefined; + } + const { + typeId: l, + meta: c + } = this.z(a); + t.update(e, c); + s = { + typeId: l ?? $K, + resource: V.parse(o) + }; + }); + return s; + } + async y(e, t, s) { + const n = (await this.n.readFile(e, { + length: s + })).value.toString(); + const r = n.indexOf(t); + if (r >= 0) { + return n.substr(0, r); + } + } + async resolve(e) { + const t = this.toBackupResource(e); + const s = await this.h; + let n; + await this.g.queueFor(t, async () => { + if (!s.has(t)) { + return; + } + const r = await this.n.readFileStream(t); + const o = await Pzi(r.value, 1); + const a = Ii.concat(o.buffer); + const l = a.buffer.indexOf(cB.b); + if (l === -1) { + this.q.trace(`Backup: Could not find meta end marker in ${t}. The file is probably corrupt (filesize: ${r.size}).`); + return; + } + const c = a.slice(0, l).toString(); + let u; + const d = c.indexOf(cB.c); + if (d !== -1) { + u = this.z(c.substr(d + 1)).meta; + } + s.update(t, u); + const h = a.slice(l + 1); + let g; + if (o.ended) { + g = UB(h); + } else { + g = Nzi(h, o.stream); + } + n = { + value: g, + meta: u + }; + }); + return n; + } + z(e) { + let t; + let s; + if (e) { + try { + s = JSON.parse(e); + t = s?.typeId; + if (typeof s?.typeId == "string") { + delete s.typeId; + if (RL(s)) { + s = undefined; + } + } + } catch {} + } + return { + typeId: t, + meta: s + }; + } + toBackupResource(e) { + return Li(this.m, e.resource.scheme, KMn(e)); + } + joinBackups() { + return this.g.whenDrained(); + } +}; +t2t = cB = __decorate([__param(1, Ct), __param(2, Bt)], t2t); +var GMn = class extends H { + constructor() { + super(); + this.a = new dn(); + } + async hasBackups() { + return this.a.size > 0; + } + hasBackupSync(i, e) { + const t = this.toBackupResource(i); + return this.a.has(t); + } + async backup(i, e, t, s, n) { + const r = this.toBackupResource(i); + this.a.set(r, { + typeId: i.typeId, + content: e instanceof Ii ? e : e ? oee(e) ? await kT(e) : Rzi(e) : Ii.fromString(""), + meta: s + }); + } + async resolve(i) { + const e = this.toBackupResource(i); + const t = this.a.get(e); + if (t) { + return { + value: UB(t.content), + meta: t.meta + }; + } + } + async getBackups() { + return Array.from(this.a.entries()).map(([i, e]) => ({ + typeId: e.typeId, + resource: i + })); + } + async discardBackup(i) { + this.a.delete(this.toBackupResource(i)); + } + async discardBackups(i) { + const e = i?.except; + if (Array.isArray(e) && e.length > 0) { + const t = new dn(); + for (const s of e) { + t.set(this.toBackupResource(s), true); + } + for (const s of await this.getBackups()) { + if (!t.has(this.toBackupResource(s))) { + await this.discardBackup(s); + } + } + } else { + this.a.clear(); + } + } + toBackupResource(i) { + return V.from({ + scheme: me.inMemory, + path: KMn(i) + }); + } + async joinBackups() {} +}; +function KMn(i) { + let e; + if (i.typeId.length > 0) { + const t = YMn(i.typeId); + if (i.resource.path) { + e = Li(i.resource, t); + } else { + e = i.resource.with({ + path: t + }); + } + } else { + e = i.resource; + } + return pqo(e); +} +function pqo(i) { + const e = i.scheme === me.file || i.scheme === me.untitled ? i.fsPath : i.toString(); + return YMn(e); +} +function YMn(i) { + return Qc(i).toString(16); +} +Un(); +mu(); +var U4i = class extends B4i { + constructor(e, t, s, n, r, o, a, l, c, u, d, h, g, p, b, v, y, w, C, S, x, k) { + super(e, t, n, l, c, u, d, h, g, p, b, w, C, S, x, k); + this.S = s; + this.U = r; + this.W = o; + this.X = a; + this.Y = v; + this.Z = y; + this.$(); + } + $() { + this.D(this.Y.onBeforeShutdown(e => { + const t = this.ab(e.reason); + e.veto(t, "veto.untitledWorkspace"); + })); + } + async ab(e) { + if (e !== 4 && e !== 1) { + return false; + } + const t = this.R(); + if (!t || !o7(t.configPath, this.n)) { + return false; + } + const s = await this.S.getWindowCount(); + if (e === 1 && !Gt && s === 1) { + return false; + } + if (this.c.getValue("window.confirmSaveUntitledWorkspace") === false) { + await this.m.deleteUntitledWorkspace(t); + return false; + } + let r = false; + const { + result: o, + checkboxChecked: a + } = await this.r.prompt({ + type: es.Warning, + message: f(13739, null), + detail: f(13740, null), + buttons: [{ + label: f(13741, null), + run: async () => { + const l = await this.pickNewWorkspacePath(); + if (!l || !rie(l)) { + return true; + } + try { + await this.H(t, l); + const c = await this.m.getWorkspaceIdentifier(l); + await this.m.addRecentlyOpened([{ + label: this.Z.getWorkspaceLabel(c, { + verbose: 2 + }), + workspace: c, + remoteAuthority: this.n.remoteAuthority + }]); + await this.m.deleteUntitledWorkspace(t); + } catch {} + return false; + } + }, { + label: f(13742, null), + run: async () => { + await this.m.deleteUntitledWorkspace(t); + return false; + } + }], + cancelButton: { + run: () => { + r = true; + return true; + } + }, + checkbox: { + label: f(13743, null) + } + }); + if (!r && a) { + await this.c.updateValue("window.confirmSaveUntitledWorkspace", false, 2); + } + return o; + } + async isValidTargetWorkspacePath(e) { + if ((await this.S.getWindows({ + includeAuxiliaryWindows: false + })).some(s => $M(s.workspace) && this.t.extUri.isEqual(s.workspace.configPath, e))) { + await this.r.info(f(13744, null, ji(e)), f(13745, null)); + return false; + } else { + return true; + } + } + async enterWorkspace(e) { + if (!(await this.W.stopExtensionHosts(f(13746, null)))) { + return; + } + const s = await this.N(e); + if (s && (await this.U.switch(s.workspace, true), this.X instanceof e2t)) { + const n = s.backupPath ? V.file(s.backupPath).with({ + scheme: this.n.userRoamingDataHome.scheme + }) : undefined; + this.X.reinitialize(n); + } + if (this.n.remoteAuthority) { + this.s.reload(); + } else { + this.W.startExtensionHosts(); + } + } +}; +U4i = __decorate([__param(0, PD), __param(1, kt), __param(2, po), __param(3, eT), __param(4, ht), __param(5, Ks), __param(6, LS), __param(7, ni), __param(8, gt), __param(9, Ct), __param(10, So), __param(11, gC), __param(12, gu), __param(13, Xl), __param(14, Js), __param(15, Yo), __param(16, Zs), __param(17, kr), __param(18, _s), __param(19, qf), __param(20, Ml), __param(21, Rc)], U4i); +it(LD, U4i, 1); +Me(); +Wt(); +ii(); +vt(); +mn(); +It(); +nt(); +In(); +At(); +zt(); +wa(); +X(); +Nn(); +var XMn = "configResolveInputLru"; +var mqo = 5; +var bqo = class c3n extends LZs { + static { + this.INPUT_OR_COMMAND_VARIABLES_PATTERN = /\${((input|command):(.*?))}/g; + } + constructor(e, t, s, n, r, o, a, l, c, u, d) { + super({ + getFolderUri: h => { + const g = o.getWorkspace().folders.filter(p => p.name === h).pop(); + if (g) { + return g.uri; + } else { + return undefined; + } + }, + getWorkspaceFolderCount: () => o.getWorkspace().folders.length, + getConfigurationValue: (h, g) => n.getValue(g, h ? { + resource: h + } : {}), + getAppRoot: () => e.getAppRoot(), + getExecPath: () => e.getExecPath(), + getFilePath: () => { + const h = vo.getOriginalUri(s.activeEditor, { + supportSideBySide: fo.PRIMARY, + filterByScheme: [me.file, me.vscodeUserData, this.u.defaultUriScheme] + }); + if (h) { + return this.t.getUriLabel(h, { + noPrefix: true + }); + } + }, + getWorkspaceFolderPathForFile: () => { + const h = vo.getOriginalUri(s.activeEditor, { + supportSideBySide: fo.PRIMARY, + filterByScheme: [me.file, me.vscodeUserData, this.u.defaultUriScheme] + }); + if (!h) { + return; + } + const g = o.getWorkspaceFolder(h); + if (g) { + return this.t.getUriLabel(g.uri, { + noPrefix: true + }); + } + }, + getSelectedText: () => { + const h = s.activeTextEditorControl; + let g = null; + if (no(h)) { + g = h; + } else if (_f(h)) { + const v = h.getOriginalEditor(); + const y = h.getModifiedEditor(); + g = v.hasWidgetFocus() ? v : y; + } + const p = g?.getModel(); + const b = g?.getSelection(); + if (p && b) { + return p.getValueInRange(b); + } + }, + getLineNumber: () => { + const h = s.activeTextEditorControl; + if (no(h)) { + const g = h.getSelection(); + if (g) { + const p = g.positionLineNumber; + return String(p); + } + } + }, + getExtension: h => u.getExtension(h) + }, l, c.userHome().then(h => h.path), t); + this.e = n; + this.k = r; + this.q = o; + this.r = a; + this.t = l; + this.u = c; + this.w = d; + this.d = new wT(); + } + async resolveWithInteractionReplace(e, t, s, n, r) { + t = await this.resolveAnyAsync(e, t); + return this.resolveWithInteraction(e, t, s, n, r).then(o => o ? o.size > 0 ? this.resolveAnyAsync(e, t, Object.fromEntries(o)) : t : null); + } + async resolveWithInteraction(e, t, s, n, r) { + const o = await this.resolveAnyMap(e, t); + t = o.newConfig; + const a = o.resolvedVariables; + return this.y(e, t, n, s, r).then(l => { + if (this.x(l, a)) { + return a; + } + }); + } + x(e, t) { + if (!e) { + return false; + } + for (const [s, n] of Object.entries(e)) { + t.set(s, n); + } + return true; + } + async y(e, t, s, n, r) { + if (!t) { + return Promise.resolve(undefined); + } + let o = []; + if (this.q.getWorkbenchState() !== 1 && n) { + const c = e ? { + resource: e.uri + } : {}; + const u = this.e.inspect(n, c); + if (u && (u.userValue || u.workspaceValue || u.workspaceFolderValue)) { + switch (r) { + case 2: + o = u.userValue?.inputs; + break; + case 5: + o = u.workspaceValue?.inputs; + break; + default: + o = u.workspaceFolderValue?.inputs; + } + } else { + const d = this.e.getValue(n, c); + if (d) { + o = d.inputs; + } + } + } + const a = []; + this.z(t, a); + const l = Object.create(null); + for (const c of a) { + const [u, d] = c.split(":", 2); + let h; + switch (u) { + case "input": + h = await this.A(n, d, o); + break; + case "command": + { + const g = (s ? s[d] : undefined) || d; + h = await this.k.executeCommand(g, t); + if (typeof h != "string" && !Ga(h)) { + throw new Error(f(12710, null, g)); + } + break; + } + default: + if (this.h.has(c)) { + h = await this.h.get(c)(); + } + } + if (typeof h == "string") { + l[c] = h; + } else { + return; + } + } + return l; + } + z(e, t) { + if (typeof e == "string") { + let s; + while ((s = c3n.INPUT_OR_COMMAND_VARIABLES_PATTERN.exec(e)) !== null) { + if (s.length === 4) { + const n = s[1]; + if (t.indexOf(n) < 0) { + t.push(n); + } + } + } + for (const n of this.h.keys()) { + if (t.indexOf(n) < 0 && e.indexOf("${" + n + "}") >= 0) { + t.push(n); + } + } + } else if (Array.isArray(e)) { + for (const s of e) { + this.z(s, t); + } + } else if (e) { + for (const s of Object.values(e)) { + this.z(s, t); + } + } + } + A(e, t, s) { + if (!s) { + return Promise.reject(new Error(f(12711, null, t, "inputs"))); + } + const n = s.filter(r => r.id === t).pop(); + if (n) { + const r = c => { + throw new Error(f(12712, null, t, n.type, c)); + }; + const o = this.C(); + const a = `${e}.${t}`; + const l = o.get(a); + switch (n.type) { + case "promptString": + { + if (!yi(n.description)) { + r("description"); + } + const c = { + prompt: n.description, + ignoreFocusLost: true, + value: l + }; + if (n.default) { + c.value = n.default; + } + if (n.password) { + c.password = n.password; + } + return this.d.queue(() => this.r.input(c)).then(u => { + if (typeof u == "string") { + this.B(o.set(a, u)); + } + return u; + }); + } + case "pickString": + { + if (!yi(n.description)) { + r("description"); + } + if (Array.isArray(n.options)) { + for (const d of n.options) { + if (!yi(d) && !yi(d.value)) { + r("value"); + } + } + } else { + r("options"); + } + const c = new Array(); + for (const d of n.options) { + const h = yi(d) ? d : d.value; + const g = yi(d) ? undefined : d.label; + const p = { + label: g ? `${g}: ${h}` : h, + value: h + }; + if (h === n.default) { + p.description = f(12713, null); + c.unshift(p); + } else if (!n.default && h === l) { + c.unshift(p); + } else { + c.push(p); + } + } + const u = { + placeHolder: n.description, + matchOnDetail: true, + ignoreFocusLost: true + }; + return this.d.queue(() => this.r.pick(c, u, undefined)).then(d => { + if (d) { + const h = d.value; + this.B(o.set(a, h)); + return h; + } + }); + } + case "command": + if (!yi(n.command)) { + r("command"); + } + return this.d.queue(() => this.k.executeCommand(n.command, n.args)).then(c => { + if (typeof c == "string" || Ga(c)) { + return c; + } + throw new Error(f(12714, null, t, n.command)); + }); + default: + throw new Error(f(12715, null, t)); + } + } + return Promise.reject(new Error(f(12716, null, t))); + } + B(e) { + this.w.store(XMn, JSON.stringify(e.toJSON()), 1, 1); + } + C() { + const e = this.w.get(XMn, 1); + const t = new vc(mqo); + try { + if (e) { + t.fromJSON(JSON.parse(e)); + } + } catch {} + return t; + } +}; +jn(); +te(); +It(); +var i2t = Ve("shellEnvironmentService"); +var vqo = class { + getShellEnv() { + return mD.shellEnv(); + } +}; +it(i2t, vqo, 1); +ad(); +rn(); +qt(); +var W4i = class extends bqo { + constructor(e, t, s, n, r, o, a, l, c, u, d) { + super({ + getAppRoot: () => t.appRoot, + getExecPath: () => t.execPath + }, l.getShellEnv(), e, s, n, r, o, a, c, u, d); + } +}; +W4i = __decorate([__param(0, Te), __param(1, gu), __param(2, ve), __param(3, gt), __param(4, kt), __param(5, zi), __param(6, Zs), __param(7, i2t), __param(8, Au), __param(9, Ks), __param(10, ht)], W4i); +it(VE, W4i, 1); +Ho(); +rt(); +Ee(); +Me(); +xe(); +wc(); +fr(); +pe(); +q(); +Ho(); +Me(); +Ee(); +var V4i = class extends H { + constructor(e, t, s) { + super(); + this.n = e; + this.q = t; + this.r = s; + this.b = 0; + this.c = new B(); + this.h = new B(); + this.m = new B(); + this.a = Ud.bindTo(this.n); + const n = () => this.a.set(this.isScreenReaderOptimized()); + this.D(this.r.onDidChangeConfiguration(o => { + if (o.affectsConfiguration("editor.accessibilitySupport")) { + n(); + this.c.fire(); + } + if (o.affectsConfiguration("workbench.reduceMotion")) { + this.f = this.r.getValue("workbench.reduceMotion"); + this.h.fire(); + } + })); + n(); + this.D(this.onDidChangeScreenReaderOptimized(() => n())); + const r = xt.matchMedia("(prefers-reduced-motion: reduce)"); + this.g = r.matches; + this.f = this.r.getValue("workbench.reduceMotion"); + this.j = this.r.getValue("accessibility.underlineLinks"); + this.s(r); + this.t(); + } + s(e) { + this.D(Ce(e, "change", () => { + this.g = e.matches; + if (this.f === "auto") { + this.h.fire(); + } + })); + const t = () => { + const s = this.isMotionReduced(); + this.q.mainContainer.classList.toggle("reduce-motion", s); + this.q.mainContainer.classList.toggle("enable-motion", !s); + }; + t(); + this.D(this.onDidChangeReducedMotion(() => t())); + } + t() { + this.D(this.r.onDidChangeConfiguration(t => { + if (t.affectsConfiguration("accessibility.underlineLinks")) { + const s = this.r.getValue("accessibility.underlineLinks"); + this.j = s; + this.m.fire(); + } + })); + const e = () => { + const t = this.j; + this.q.mainContainer.classList.toggle("underline-links", t); + }; + e(); + this.D(this.onDidChangeLinkUnderlines(() => e())); + } + onDidChangeLinkUnderlines(e) { + return this.m.event(e); + } + get onDidChangeScreenReaderOptimized() { + return this.c.event; + } + isScreenReaderOptimized() { + const e = this.r.getValue("editor.accessibilitySupport"); + return e === "on" || e === "auto" && this.b === 2; + } + get onDidChangeReducedMotion() { + return this.h.event; + } + isMotionReduced() { + const e = this.f; + return e === "on" || e === "auto" && this.g; + } + alwaysUnderlineAccessKeys() { + return Promise.resolve(false); + } + getAccessibilitySupport() { + return this.b; + } + setAccessibilitySupport(e) { + if (this.b !== e) { + this.b = e; + this.c.fire(); + } + } + alert(e) { + Fc(e); + } + status(e) { + Bh(e); + } +}; +V4i = __decorate([__param(0, Ne), __param(1, wh), __param(2, ve)], V4i); +It(); +ai(); +var H4i = class extends V4i { + constructor(e, t, s, n, r, o) { + super(t, n, s); + this.y = r; + this.z = o; + this.u = false; + this.w = undefined; + this.setAccessibilitySupport(e.window.accessibilitySupport ? 2 : 1); + } + async alwaysUnderlineAccessKeys() { + if (!ln) { + return false; + } + if (typeof this.w != "boolean") { + const e = await this.z.windowsGetStringRegKey("HKEY_CURRENT_USER", "Control Panel\\Accessibility\\Keyboard Preference", "On"); + this.w = e === "1"; + } + return this.w; + } + setAccessibilitySupport(e) { + super.setAccessibilitySupport(e); + if (!this.u && e === 2) { + this.y.publicLog2("accessibility", { + enabled: true + }); + this.u = true; + } + } +}; +H4i = __decorate([__param(0, gu), __param(1, Ne), __param(2, ve), __param(3, wh), __param(4, Ot), __param(5, po)], H4i); +it(na, H4i, 1); +var s2t = class { + static { + this.ID = "workbench.contrib.linuxAccessibility"; + } + constructor(e, t, s) { + const n = () => { + if (t.isScreenReaderOptimized()) { + e.write(s.argvResource, [{ + path: ["force-renderer-accessibility"], + value: true + }], true); + } + }; + n(); + t.onDidChangeScreenReaderOptimized(n); + } +}; +s2t = __decorate([__param(0, PD), __param(1, na), __param(2, gu)], s2t); +if (yl) { + Yn(s2t.ID, s2t, 2); +} +q(); +pe(); +rt(); +var yqo = class { + constructor(i) { + this.a = i; + this.b = new Map(); + } + dumpDebugInfo() { + return this.a.dumpDebugInfo(); + } + resolveKeyboardEvent(i) { + return this.a.resolveKeyboardEvent(i); + } + resolveKeybinding(i) { + const e = i.getHashCode(); + const t = this.b.get(e); + if (!t) { + const s = this.a.resolveKeybinding(i); + this.b.set(e, s); + return s; + } + return t; + } +}; +wI(); +Yc(); +wI(); +var wqo = class sUi extends txi { + constructor(e, t) { + super(t, e); + } + a(e) { + if (this.c === 2) { + switch (e) { + case 15: + return "←"; + case 16: + return "↑"; + case 17: + return "→"; + case 18: + return "↓"; + } + } + return Hp.toString(e); + } + f(e) { + if (e.isDuplicateModifierCase()) { + return ""; + } else { + return this.a(e.keyCode); + } + } + g(e) { + if (e.isDuplicateModifierCase()) { + return ""; + } else { + return Hp.toString(e.keyCode); + } + } + h(e) { + return Hp.toElectronAccelerator(e.keyCode); + } + l(e) { + if (e.isDuplicateModifierCase()) { + return ""; + } + const t = Hp.toUserSettingsUS(e.keyCode); + return t && t.toLowerCase(); + } + m() { + return true; + } + n(e) { + return sUi.getDispatchStr(e); + } + static getDispatchStr(e) { + if (e.isModifierKey()) { + return null; + } + let t = ""; + if (e.ctrlKey) { + t += "ctrl+"; + } + if (e.shiftKey) { + t += "shift+"; + } + if (e.altKey) { + t += "alt+"; + } + if (e.metaKey) { + t += "meta+"; + } + t += Hp.toString(e.keyCode); + return t; + } + o(e) { + if (e.keyCode === 5 && !e.shiftKey && !e.altKey && !e.metaKey) { + return "ctrl"; + } else if (e.keyCode === 4 && !e.ctrlKey && !e.altKey && !e.metaKey) { + return "shift"; + } else if (e.keyCode === 6 && !e.ctrlKey && !e.shiftKey && !e.metaKey) { + return "alt"; + } else if (e.keyCode === 57 && !e.ctrlKey && !e.shiftKey && !e.altKey) { + return "meta"; + } else { + return null; + } + } + static t(e) { + const t = fx[e]; + if (t !== -1) { + return t; + } + switch (e) { + case 10: + return 31; + case 11: + return 32; + case 12: + return 33; + case 13: + return 34; + case 14: + return 35; + case 15: + return 36; + case 16: + return 37; + case 17: + return 38; + case 18: + return 39; + case 19: + return 40; + case 20: + return 41; + case 21: + return 42; + case 22: + return 43; + case 23: + return 44; + case 24: + return 45; + case 25: + return 46; + case 26: + return 47; + case 27: + return 48; + case 28: + return 49; + case 29: + return 50; + case 30: + return 51; + case 31: + return 52; + case 32: + return 53; + case 33: + return 54; + case 34: + return 55; + case 35: + return 56; + case 36: + return 22; + case 37: + return 23; + case 38: + return 24; + case 39: + return 25; + case 40: + return 26; + case 41: + return 27; + case 42: + return 28; + case 43: + return 29; + case 44: + return 30; + case 45: + return 21; + case 51: + return 88; + case 52: + return 86; + case 53: + return 92; + case 54: + return 94; + case 55: + return 93; + case 56: + return 0; + case 57: + return 85; + case 58: + return 95; + case 59: + return 91; + case 60: + return 87; + case 61: + return 89; + case 62: + return 90; + case 106: + return 97; + } + return 0; + } + static u(e) { + if (!e) { + return null; + } + if (e instanceof gx) { + return e; + } + const t = this.t(e.scanCode); + if (t === 0) { + return null; + } else { + return new gx(e.ctrlKey, e.shiftKey, e.altKey, e.metaKey, t); + } + } + static resolveKeybinding(e, t) { + const s = sIt(e.chords.map(n => this.u(n))); + if (s.length > 0) { + return [new sUi(s, t)]; + } else { + return []; + } + } +}; +var q4i = class { + constructor(i, e) { + this.a = i; + this.b = e; + } + dumpDebugInfo() { + return "FallbackKeyboardMapper dispatching on keyCode"; + } + resolveKeyboardEvent(i) { + const e = i.ctrlKey || this.a && i.altGraphKey; + const t = i.altKey || this.a && i.altGraphKey; + const s = new gx(e, i.shiftKey, t, i.metaKey, i.keyCode); + return this.resolveKeybinding(new Gq([s]))[0]; + } + resolveKeybinding(i) { + return wqo.resolveKeybinding(i, this.b); + } +}; +Yc(); +wI(); +var lPe = []; +var QMn = class extends txi { + constructor(i, e, t) { + super(e, t); + this.p = i; + } + f(i) { + return this.p.getUILabelForScanCodeChord(i); + } + g(i) { + return this.p.getAriaLabelForScanCodeChord(i); + } + h(i) { + return this.p.getElectronAcceleratorLabelForScanCodeChord(i); + } + l(i) { + return this.p.getUserSettingsLabelForScanCodeChord(i); + } + m(i) { + if (!i || fx[i.scanCode] !== -1) { + return true; + } + const e = this.p.getAriaLabelForScanCodeChord(i); + const t = this.p.getUserSettingsLabelForScanCodeChord(i); + if (!e && !t) { + return true; + } else if (!e || !t) { + return false; + } else { + return e.toLowerCase() === t.toLowerCase(); + } + } + n(i) { + return this.p.getDispatchStrForScanCodeChord(i); + } + o(i) { + if ((i.scanCode === 157 || i.scanCode === 161) && !i.shiftKey && !i.altKey && !i.metaKey) { + return "ctrl"; + } else if ((i.scanCode === 159 || i.scanCode === 163) && !i.ctrlKey && !i.shiftKey && !i.metaKey) { + return "alt"; + } else if ((i.scanCode === 158 || i.scanCode === 162) && !i.ctrlKey && !i.altKey && !i.metaKey) { + return "shift"; + } else if ((i.scanCode === 160 || i.scanCode === 164) && !i.ctrlKey && !i.shiftKey && !i.altKey) { + return "meta"; + } else { + return null; + } + } +}; +var cPe = class { + constructor(i, e, t, s) { + this.ctrlKey = i; + this.shiftKey = e; + this.altKey = t; + this.scanCode = s; + } + toString() { + return `${this.ctrlKey ? "Ctrl+" : ""}${this.shiftKey ? "Shift+" : ""}${this.altKey ? "Alt+" : ""}${XS.toString(this.scanCode)}`; + } + equals(i) { + return this.ctrlKey === i.ctrlKey && this.shiftKey === i.shiftKey && this.altKey === i.altKey && this.scanCode === i.scanCode; + } + c(i) { + if (i) { + if (this.ctrlKey && this.shiftKey && this.altKey) { + return i.withShiftAltGr; + } else if (this.ctrlKey && this.altKey) { + return i.withAltGr; + } else if (this.shiftKey) { + return i.withShift; + } else { + return i.value; + } + } else { + return ""; + } + } + getProducedChar(i) { + const e = ZMn.getCharCode(this.c(i)); + if (e === 0) { + return " --- "; + } else if (e >= 768 && e <= 879) { + return "U+" + e.toString(16); + } else { + return " " + String.fromCharCode(e) + " "; + } + } +}; +var j4i = class { + constructor(i, e, t, s) { + this.ctrlKey = i; + this.shiftKey = e; + this.altKey = t; + this.keyCode = s; + } + toString() { + return `${this.ctrlKey ? "Ctrl+" : ""}${this.shiftKey ? "Shift+" : ""}${this.altKey ? "Alt+" : ""}${Hp.toString(this.keyCode)}`; + } +}; +var Cqo = class { + constructor() { + this.c = []; + this.d = []; + this.c = []; + this.d = []; + } + registrationComplete() { + this.e(56); + this.e(106); + } + e(i) { + for (let e = 0; e < 8; e++) { + const t = this.c[(i << 3) + e]; + if (t) { + for (let s = 0, n = t.length; s < n; s++) { + const r = this.d[t[s]]; + if (r.length !== 1) { + for (let o = 0, a = r.length; o < a; o++) { + const l = r[o]; + if (l >>> 3 === i) { + for (let u = o + 1; u < a; u++) { + r[u - 1] = r[u]; + } + r[a - 1] = l; + } + } + } + } + } + } + } + registerIfUnknown(i, e) { + if (e.keyCode === 0) { + return; + } + const t = this.f(i); + const s = this.g(e); + const n = e.keyCode >= 21 && e.keyCode <= 30; + const r = e.keyCode >= 31 && e.keyCode <= 56; + const o = this.c[t]; + if (n || r) { + if (o) { + for (let a = 0, l = o.length; a < l; a++) { + if (o[a] === s) { + return; + } + } + } + } else if (o && o.length !== 0) { + return; + } + this.c[t] = this.c[t] || []; + this.c[t].unshift(s); + this.d[s] = this.d[s] || []; + this.d[s].unshift(t); + } + lookupKeyCodeCombo(i) { + const e = this.g(i); + const t = this.d[e]; + if (!t || t.length === 0) { + return []; + } + const s = []; + for (let n = 0, r = t.length; n < r; n++) { + const o = t[n]; + const a = !!(o & 1); + const l = !!(o & 2); + const c = !!(o & 4); + const u = o >>> 3; + s[n] = new cPe(a, l, c, u); + } + return s; + } + lookupScanCodeCombo(i) { + const e = this.f(i); + const t = this.c[e]; + if (!t || t.length === 0) { + return []; + } + const s = []; + for (let n = 0, r = t.length; n < r; n++) { + const o = t[n]; + const a = !!(o & 1); + const l = !!(o & 2); + const c = !!(o & 4); + const u = o >>> 3; + s[n] = new j4i(a, l, c, u); + } + return s; + } + guessStableKeyCode(i) { + if (i >= 36 && i <= 45) { + switch (i) { + case 36: + return 22; + case 37: + return 23; + case 38: + return 24; + case 39: + return 25; + case 40: + return 26; + case 41: + return 27; + case 42: + return 28; + case 43: + return 29; + case 44: + return 30; + case 45: + return 21; + } + } + const e = this.lookupScanCodeCombo(new cPe(false, false, false, i)); + const t = this.lookupScanCodeCombo(new cPe(false, true, false, i)); + if (e.length === 1 && t.length === 1) { + const s = e[0].shiftKey; + const n = e[0].keyCode; + const r = t[0].shiftKey; + const o = t[0].keyCode; + if (n === o && s !== r) { + return n; + } + } + return -1; + } + f(i) { + return this.h(i.ctrlKey, i.shiftKey, i.altKey, i.scanCode); + } + g(i) { + return this.h(i.ctrlKey, i.shiftKey, i.altKey, i.keyCode); + } + h(i, e, t, s) { + return ((i ? 1 : 0) << 0 | (e ? 1 : 0) << 1 | (t ? 1 : 0) << 2 | s << 3) >>> 0; + } +}; +var ZMn = class CB { + constructor(e, t, s, n) { + this.g = e; + this.h = s; + this.l = n; + this.e = []; + this.f = []; + this.c = []; + this.d = new Cqo(); + this.e = []; + this.f = []; + const r = (u, d, h, g, p, b, v, y) => { + this.d.registerIfUnknown(new cPe(!!u, !!d, !!h, g), new j4i(!!p, !!b, !!v, y)); + }; + const o = (u, d, h, g, p) => { + for (let b = u; b <= 1; b++) { + for (let v = d; v <= 1; v++) { + for (let y = h; y <= 1; y++) { + r(b, v, y, g, b, v, y, p); + } + } + } + }; + for (let u = 0; u < 193; u++) { + this.e[u] = null; + } + for (let u = 0; u < 193; u++) { + this.f[u] = null; + } + for (let u = 0; u < 193; u++) { + const d = fx[u]; + if (d !== -1) { + o(0, 0, 0, u, d); + this.e[u] = Hp.toString(d); + if (d === 0 || d === 5 || d === 57 || d === 6 || d === 4) { + this.f[u] = null; + } else { + this.f[u] = `[${XS.toString(u)}]`; + } + } + } + const a = {}; + { + const u = []; + for (const h in t) { + if (t.hasOwnProperty(h)) { + const g = XS.toEnum(h); + if (g === 0 || fx[g] !== -1) { + continue; + } + const p = t[h]; + const b = CB.getCharCode(p.value); + if (b >= 97 && b <= 122) { + const v = 65 + (b - 97); + u[v] = true; + } + } + } + const d = (h, g, p, b) => { + if (!u[h]) { + a[XS.toString(g)] = { + value: p, + withShift: b, + withAltGr: "", + withShiftAltGr: "" + }; + } + }; + d(65, 10, "a", "A"); + d(66, 11, "b", "B"); + d(67, 12, "c", "C"); + d(68, 13, "d", "D"); + d(69, 14, "e", "E"); + d(70, 15, "f", "F"); + d(71, 16, "g", "G"); + d(72, 17, "h", "H"); + d(73, 18, "i", "I"); + d(74, 19, "j", "J"); + d(75, 20, "k", "K"); + d(76, 21, "l", "L"); + d(77, 22, "m", "M"); + d(78, 23, "n", "N"); + d(79, 24, "o", "O"); + d(80, 25, "p", "P"); + d(81, 26, "q", "Q"); + d(82, 27, "r", "R"); + d(83, 28, "s", "S"); + d(84, 29, "t", "T"); + d(85, 30, "u", "U"); + d(86, 31, "v", "V"); + d(87, 32, "w", "W"); + d(88, 33, "x", "X"); + d(89, 34, "y", "Y"); + d(90, 35, "z", "Z"); + } + const l = []; + let c = 0; + for (const u in t) { + if (t.hasOwnProperty(u)) { + const d = XS.toEnum(u); + if (d === 0 || fx[d] !== -1) { + continue; + } + this.c[d] = t[u]; + const h = a[u] || t[u]; + const g = CB.getCharCode(h.value); + const p = CB.getCharCode(h.withShift); + const b = CB.getCharCode(h.withAltGr); + const v = CB.getCharCode(h.withShiftAltGr); + const y = { + scanCode: d, + value: g, + withShift: p, + withAltGr: b, + withShiftAltGr: v + }; + l[c++] = y; + this.f[d] = `[${XS.toString(d)}]`; + if (g >= 97 && g <= 122) { + const w = 65 + (g - 97); + this.e[d] = String.fromCharCode(w); + } else if (g >= 65 && g <= 90) { + this.e[d] = String.fromCharCode(g); + } else if (g) { + this.e[d] = String.fromCharCode(g); + } else { + this.e[d] = null; + } + } + } + for (let u = l.length - 1; u >= 0; u--) { + const d = l[u]; + const h = d.scanCode; + const g = d.withShiftAltGr; + if (g === d.withAltGr || g === d.withShift || g === d.value) { + continue; + } + const p = CB.r(g); + if (!p) { + continue; + } + const b = p.shiftKey; + const v = p.keyCode; + if (b) { + r(1, 1, 1, h, 0, 1, 0, v); + } else { + r(1, 1, 1, h, 0, 0, 0, v); + } + } + for (let u = l.length - 1; u >= 0; u--) { + const d = l[u]; + const h = d.scanCode; + const g = d.withAltGr; + if (g === d.withShift || g === d.value) { + continue; + } + const p = CB.r(g); + if (!p) { + continue; + } + const b = p.shiftKey; + const v = p.keyCode; + if (b) { + r(1, 0, 1, h, 0, 1, 0, v); + } else { + r(1, 0, 1, h, 0, 0, 0, v); + } + } + for (let u = l.length - 1; u >= 0; u--) { + const d = l[u]; + const h = d.scanCode; + const g = d.withShift; + if (g === d.value) { + continue; + } + const p = CB.r(g); + if (!p) { + continue; + } + const b = p.shiftKey; + const v = p.keyCode; + if (b) { + r(0, 1, 0, h, 0, 1, 0, v); + r(0, 1, 1, h, 0, 1, 1, v); + r(1, 1, 0, h, 1, 1, 0, v); + r(1, 1, 1, h, 1, 1, 1, v); + } else { + r(0, 1, 0, h, 0, 0, 0, v); + r(0, 1, 0, h, 0, 1, 0, v); + r(0, 1, 1, h, 0, 0, 1, v); + r(0, 1, 1, h, 0, 1, 1, v); + r(1, 1, 0, h, 1, 0, 0, v); + r(1, 1, 0, h, 1, 1, 0, v); + r(1, 1, 1, h, 1, 0, 1, v); + r(1, 1, 1, h, 1, 1, 1, v); + } + } + for (let u = l.length - 1; u >= 0; u--) { + const d = l[u]; + const h = d.scanCode; + const g = CB.r(d.value); + if (!g) { + continue; + } + const p = g.shiftKey; + const b = g.keyCode; + if (p) { + r(0, 0, 0, h, 0, 1, 0, b); + r(0, 0, 1, h, 0, 1, 1, b); + r(1, 0, 0, h, 1, 1, 0, b); + r(1, 0, 1, h, 1, 1, 1, b); + } else { + r(0, 0, 0, h, 0, 0, 0, b); + r(0, 0, 1, h, 0, 0, 1, b); + r(0, 1, 0, h, 0, 1, 0, b); + r(0, 1, 1, h, 0, 1, 1, b); + r(1, 0, 0, h, 1, 0, 0, b); + r(1, 0, 1, h, 1, 0, 1, b); + r(1, 1, 0, h, 1, 1, 0, b); + r(1, 1, 1, h, 1, 1, 1, b); + } + } + o(0, 0, 0, 36, 22); + o(0, 0, 0, 37, 23); + o(0, 0, 0, 38, 24); + o(0, 0, 0, 39, 25); + o(0, 0, 0, 40, 26); + o(0, 0, 0, 41, 27); + o(0, 0, 0, 42, 28); + o(0, 0, 0, 43, 29); + o(0, 0, 0, 44, 30); + o(0, 0, 0, 45, 21); + this.d.registrationComplete(); + } + dumpDebugInfo() { + const e = []; + const t = [88, 104]; + let s = 0; + e.push(`isUSStandard: ${this.g}`); + e.push("----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------"); + for (let n = 0; n < 193; n++) { + if (fx[n] !== -1 && t.indexOf(n) === -1) { + continue; + } + if (s % 4 === 0) { + e.push("| HW Code combination | Key | KeyCode combination | Pri | UI label | User settings | Electron accelerator | Dispatching string | WYSIWYG |"); + e.push("----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------"); + } + s++; + const r = this.c[n]; + for (let o = 0; o < 8; o++) { + const a = !!(o & 1); + const l = !!(o & 2); + const c = !!(o & 4); + const u = new cPe(a, l, c, n); + const d = this.resolveKeyboardEvent({ + _standardKeyboardEventBrand: true, + ctrlKey: u.ctrlKey, + shiftKey: u.shiftKey, + altKey: u.altKey, + metaKey: false, + altGraphKey: false, + keyCode: -1, + code: XS.toString(n) + }); + const h = u.toString(); + const g = u.getProducedChar(r); + const p = d.getAriaLabel(); + const b = p ? p.replace(/Control\+/, "Ctrl+") : null; + const v = d.getUserSettingsLabel(); + const y = d.getElectronAccelerator(); + const w = d.getDispatchChords()[0]; + const S = (d ? d.isWYSIWYG() : false) ? " " : " NO "; + const x = this.d.lookupScanCodeCombo(u); + if (x.length === 0) { + e.push(`| ${this.m(h, 30)} | ${g} | ${this.m("", 25)} | ${this.m("", 3)} | ${this.m(b, 25)} | ${this.m(v, 30)} | ${this.m(y, 25)} | ${this.m(w, 30)} | ${S} |`); + } else { + for (let k = 0, E = x.length; k < E; k++) { + const D = x[k]; + let P; + const R = this.d.lookupKeyCodeCombo(D); + if (R.length === 1) { + P = ""; + } else { + let F = -1; + for (let O = 0; O < R.length; O++) { + if (R[O].equals(u)) { + F = O + 1; + break; + } + } + P = String(F); + } + const L = D.toString(); + if (k === 0) { + e.push(`| ${this.m(h, 30)} | ${g} | ${this.m(L, 25)} | ${this.m(P, 3)} | ${this.m(b, 25)} | ${this.m(v, 30)} | ${this.m(y, 25)} | ${this.m(w, 30)} | ${S} |`); + } else { + e.push(`| ${this.m("", 30)} | | ${this.m(L, 25)} | ${this.m(P, 3)} | ${this.m("", 25)} | ${this.m("", 30)} | ${this.m("", 25)} | ${this.m("", 30)} | |`); + } + } + } + } + e.push("----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------"); + } + return e.join(` +`); + } + m(e, t) { + for (e === null && (e = "null"); e.length < t;) { + e = " " + e; + } + return e; + } + keyCodeChordToScanCodeChord(e) { + if (e.keyCode === 3) { + return [new _B(e.ctrlKey, e.shiftKey, e.altKey, e.metaKey, 46)]; + } + const t = this.d.lookupKeyCodeCombo(new j4i(e.ctrlKey, e.shiftKey, e.altKey, e.keyCode)); + const s = []; + for (let n = 0, r = t.length; n < r; n++) { + const o = t[n]; + s[n] = new _B(o.ctrlKey, o.shiftKey, o.altKey, e.metaKey, o.scanCode); + } + return s; + } + getUILabelForScanCodeChord(e) { + if (!e) { + return null; + } + if (e.isDuplicateModifierCase()) { + return ""; + } + if (this.l === 2) { + switch (e.scanCode) { + case 86: + return "←"; + case 88: + return "↑"; + case 85: + return "→"; + case 87: + return "↓"; + } + } + return this.e[e.scanCode]; + } + getAriaLabelForScanCodeChord(e) { + if (e) { + if (e.isDuplicateModifierCase()) { + return ""; + } else { + return this.e[e.scanCode]; + } + } else { + return null; + } + } + getDispatchStrForScanCodeChord(e) { + const t = this.f[e.scanCode]; + if (!t) { + return null; + } + let s = ""; + if (e.ctrlKey) { + s += "ctrl+"; + } + if (e.shiftKey) { + s += "shift+"; + } + if (e.altKey) { + s += "alt+"; + } + if (e.metaKey) { + s += "meta+"; + } + s += t; + return s; + } + getUserSettingsLabelForScanCodeChord(e) { + if (!e) { + return null; + } + if (e.isDuplicateModifierCase()) { + return ""; + } + const t = fx[e.scanCode]; + if (t !== -1) { + return Hp.toUserSettingsUS(t).toLowerCase(); + } + const s = this.d.guessStableKeyCode(e.scanCode); + if (s !== -1) { + const n = this.keyCodeChordToScanCodeChord(new gx(e.ctrlKey, e.shiftKey, e.altKey, e.metaKey, s)); + for (let r = 0, o = n.length; r < o; r++) { + if (n[r].scanCode === e.scanCode) { + return Hp.toUserSettingsUS(s).toLowerCase(); + } + } + } + return this.f[e.scanCode]; + } + getElectronAcceleratorLabelForScanCodeChord(e) { + if (!e) { + return null; + } + const t = fx[e.scanCode]; + if (t !== -1) { + return Hp.toElectronAccelerator(t); + } + const s = this.d.guessStableKeyCode(e.scanCode); + if (this.l === 3 && !this.g && (s === 85 || s === 86 || s === 87 || s === 88 || s === 89 || s === 90 || s === 91 || s === 92 || s === 93 || s === 94)) { + return null; + } else if (s !== -1) { + return Hp.toElectronAccelerator(s); + } else { + return null; + } + } + n(e) { + if (e.length === 0) { + return []; + } + const t = []; + this.o(e, 0, [], t); + return t; + } + o(e, t, s, n) { + const r = e[t]; + const o = t === e.length - 1; + for (let a = 0, l = r.length; a < l; a++) { + const c = [...s, r[a]]; + if (o) { + n.push(new QMn(this, this.l, c)); + } else { + this.o(e, t + 1, c, n); + } + } + } + resolveKeyboardEvent(e) { + let t = XS.toEnum(e.code); + if (t === 94) { + t = 46; + } + const s = e.keyCode; + if (s === 15 || s === 16 || s === 17 || s === 18 || s === 20 || s === 19 || s === 14 || s === 13 || s === 12 || s === 11 || s === 1) { + const a = eee[s]; + if (a !== -1) { + t = a; + } + } else if ((t === 95 || t === 96 || t === 97 || t === 98 || t === 99 || t === 100 || t === 101 || t === 102 || t === 103 || t === 104 || t === 105) && s >= 0) { + const a = eee[s]; + if (a !== -1) { + t = a; + } + } + const n = e.ctrlKey || this.h && e.altGraphKey; + const r = e.altKey || this.h && e.altGraphKey; + const o = new _B(n, e.shiftKey, r, e.metaKey, t); + return new QMn(this, this.l, [o]); + } + p(e) { + if (e) { + if (e instanceof _B) { + return [e]; + } else { + return this.keyCodeChordToScanCodeChord(e); + } + } else { + return []; + } + } + resolveKeybinding(e) { + const t = e.chords.map(s => this.p(s)); + return this.n(t); + } + static q(e) { + switch (e) { + case 12290: + return 46; + case 12300: + return 91; + case 12301: + return 93; + case 12304: + return 91; + case 12305: + return 93; + case 65307: + return 59; + case 65292: + return 44; + } + return e; + } + static r(e) { + e = this.q(e); + if (e < lPe.length) { + return lPe[e]; + } else { + return null; + } + } + static getCharCode(e) { + if (e.length === 0) { + return 0; + } + const t = e.charCodeAt(0); + switch (t) { + case 768: + return 96; + case 769: + return 180; + case 770: + return 94; + case 771: + return 732; + case 772: + return 175; + case 773: + return 8254; + case 774: + return 728; + case 775: + return 729; + case 776: + return 168; + case 778: + return 730; + case 779: + return 733; + } + return t; + } +}; +(function () { + function i(e, t, s) { + for (let n = lPe.length; n < e; n++) { + lPe[n] = null; + } + lPe[e] = { + keyCode: t, + shiftKey: s + }; + } + for (let e = 65; e <= 90; e++) { + i(e, 31 + (e - 65), true); + } + for (let e = 97; e <= 122; e++) { + i(e, 31 + (e - 97), false); + } + i(59, 85, false); + i(58, 85, true); + i(61, 86, false); + i(43, 86, true); + i(44, 87, false); + i(60, 87, true); + i(45, 88, false); + i(95, 88, true); + i(46, 89, false); + i(62, 89, true); + i(47, 90, false); + i(63, 90, true); + i(96, 91, false); + i(126, 91, true); + i(91, 92, false); + i(123, 92, true); + i(92, 93, false); + i(124, 93, true); + i(93, 94, false); + i(125, 94, true); + i(39, 95, false); + i(34, 95, true); +})(); +X(); +rt(); +Qr(); +Ht(); +var eAn; +(function (i) { + i[i.Code = 0] = "Code"; + i[i.KeyCode = 1] = "KeyCode"; +})(eAn ||= {}); +function Sqo(i) { + const e = i.getValue("keyboard"); + const t = e?.dispatch === "keyCode" ? 1 : 0; + const s = !!e?.mapAltGrToCtrlAlt; + return { + dispatch: t, + mapAltGrToCtrlAlt: s + }; +} +var xqo = Pe.as(rr.Configuration); +var kqo = { + id: "keyboard", + order: 15, + type: "object", + title: f(1962, null), + properties: { + "keyboard.dispatch": { + scope: 1, + type: "string", + enum: ["code", "keyCode"], + default: "code", + markdownDescription: f(1963, null), + included: Ia === 2 || Ia === 3 + }, + "keyboard.mapAltGrToCtrlAlt": { + scope: 1, + type: "boolean", + default: false, + markdownDescription: f(1964, null), + included: Ia === 1 + } + } +}; +xqo.registerConfiguration(kqo); +Me(); +It(); +var z4i = class extends H { + constructor(e, t) { + super(); + this.c = e; + this.f = t; + this.a = this.D(new B()); + this.onDidChangeKeyboardLayout = this.a.event; + this.b = null; + this.D(this.c.onDidChangeKeyboardLayout(async () => { + this.b = null; + this.a.fire(); + })); + this.D(t.onDidChangeConfiguration(async s => { + if (s.affectsConfiguration("keyboard")) { + this.b = null; + this.a.fire(); + } + })); + } + getRawKeyboardMapping() { + return this.c.getRawKeyboardMapping(); + } + getCurrentKeyboardLayout() { + return this.c.getCurrentKeyboardLayout(); + } + getAllKeyboardLayouts() { + return []; + } + getKeyboardMapper() { + const e = Sqo(this.f); + if (e.dispatch === 1) { + return new q4i(e.mapAltGrToCtrlAlt, Ia); + } else { + this.b ||= new yqo(Eqo(this.getCurrentKeyboardLayout(), this.getRawKeyboardMapping(), e.mapAltGrToCtrlAlt)); + return this.b; + } + } + validateCurrentKeyboardMapping(e) {} +}; +z4i = __decorate([__param(0, WMn), __param(1, ve)], z4i); +function Eqo(i, e, t) { + const s = Iqo(i); + if (Ia === 1) { + return new jSo(s, e, t); + } else if (!e || Object.keys(e).length === 0) { + return new q4i(t, Ia); + } else if (Ia === 2 && i.id === "com.apple.keylayout.DVORAK-QWERTYCMD") { + return new q4i(t, Ia); + } else { + return new ZMn(s, e, t, Ia); + } +} +function Iqo(i) { + if (!i) { + return false; + } + if (Ia === 3) { + const e = i; + return e.layout.split(/,/g)[e.group] === "us"; + } + if (Ia === 2) { + return i.id === "com.apple.keylayout.US"; + } else if (Ia === 1) { + return i.name === "00000409"; + } else { + return false; + } +} +it(Dpn, z4i, 1); +It(); +Wc(); +ad(); +ii(); +var J4i = class extends Gft { + constructor(e, t, s) { + super(t.userHome, e, t, s); + } +}; +J4i = __decorate([__param(0, al), __param(1, gu), __param(2, kt)], J4i); +it(Au, J4i, 1); +pe(); +It(); +q(); +qt(); +zt(); +var n2t; +var G4i = class extends H { + static { + n2t = this; + } + static { + this.STORAGE_KEY = "HostColorSchemeData"; + } + constructor(e, t, s) { + super(); + this.b = e; + this.c = s; + this.a = this.D(new B()); + this.onDidChangeColorScheme = this.a.event; + this.D(this.b.onDidChangeColorScheme(r => this.g(r))); + const n = this.f() ?? t.window.colorScheme; + this.dark = n.dark; + this.highContrast = n.highContrast; + this.b.getOSColorScheme().then(r => this.g(r)); + } + f() { + const e = this.c.get(n2t.STORAGE_KEY, -1); + if (e) { + try { + const t = JSON.parse(e); + if (xo(t) && df(t.highContrast) && df(t.dark)) { + return t; + } + } catch {} + } + } + g({ + highContrast: e, + dark: t + }) { + if (t !== this.dark || e !== this.highContrast) { + this.dark = t; + this.highContrast = e; + this.c.store(n2t.STORAGE_KEY, JSON.stringify({ + highContrast: e, + dark: t + }), -1, 1); + this.a.fire(); + } + } +}; +G4i = n2t = __decorate([__param(0, po), __param(1, gu), __param(2, ht)], G4i); +it(emn, G4i, 1); +q(); +It(); +te(); +V7(); +pe(); +q(); +Rn(); +Ms(); +wl(); +ii(); +yt(); +ri(); +Et(); +Tr(); +so(); +yf(); +wn(); +vt(); +Le(); +Ps(); +Nt(); +sh(); +lC(); +Cs(); +jl(); +dl(); +Pn(); +Rr(); +vS(); +var dde = class extends H { + constructor(e, t, s, n, r, o, a, l, c, u, d, h, g, p, b, v, y, w, C, S, x, k) { + super(); + this.c = e; + this.g = t; + this.h = s; + this.j = n; + this.n = r; + this.q = o; + this.s = a; + this.t = l; + this.u = c; + this.w = u; + this.y = d; + this.z = h; + this.C = g; + this.F = p; + this.G = b; + this.H = v; + this.I = y; + this.J = w; + this.L = C; + this.M = S; + this.N = x; + this.O = k; + this.a = new Xbt(1); + this.b = new Map(); + } + keepalive() { + if (this.P !== undefined) { + clearTimeout(this.P); + this.P = undefined; + } + this.P = setTimeout(() => { + this.t.closeWindow(); + }, zzi(this.L.shadowWindowForWorkspaceId) * 60 * 1000); + } + async Q(e, t) { + let s = e; + let n = Ir(e); + while (!(await this.y.exists(n)) && Ir(n) !== n) { + s = n; + n = Ir(n); + } + await this.g.write(e, t.initialContent); + return { + dispose: async () => { + await this.y.del(e); + if (!sr.isEqual(s, e)) { + await this.y.del(s, { + recursive: true + }); + } + } + }; + } + async acquire() { + this.keepalive(); + if (this.a.getCount() > 10) { + throw new Error("Too many waiting calls; rejecting for back pressure."); + } + await this.a.acquire(); + return { + dispose: () => { + this.a.release(); + } + }; + } + async shadowHealthCheck(e) { + this.keepalive(); + return new Wqt(); + } + async swSyncIndex(e) { + if (e.repositoryInfo === undefined) { + throw new Error("Repository info is required"); + } + for (this.C.syncIndexWithGivenRepositoryInfo({ + repositoryInfo: e.repositoryInfo, + pathEncryptionKey: e.pathEncryptionKey + }); this.F.nonPersistentStorage.repositoryIndexingStatus?.case !== "synced";) { + this.keepalive(); + await new Promise(t => setTimeout(t, 1000)); + } + return new Vqt(); + } + async swProvideTemporaryAccessToken(e) { + this.z.overrideAccessToken(e.accessToken); + return new Bqt(); + } + async swCompileRepoIncludeExcludePatterns(e) { + if (e.repositoryInfo === undefined) { + throw new Error("Repository info is required"); + } + const t = await this.C.compileGlobFilterFromPattern({ + includePattern: e.includePattern, + excludePattern: e.excludePattern, + repoInfo: e.repositoryInfo, + overridePathEncryptionKey: e.pathEncryptionKey + }); + return new Qut({ + globFilter: t.globFilter, + notGlobFilter: t.notGlobFilter + }); + } + async getLintsForChange(e) { + const n = new Set(); + this.g.files.models.forEach(a => { + if (a.textEditorModel) { + n.add(a.textEditorModel.id); + } + if (a.isDirty()) { + a.revert(); + } + }); + let r = []; + const o = []; + try { + let a = false; + r = await Promise.all(e.files.map(async h => { + const g = this.n.resolveRelativePath(h.relativeWorkspacePath); + let p; + try { + const y = await this.j.createModelReference(g); + o.push(y); + p = y.object.textEditorModel; + if (!n.has(p.id)) { + a = true; + } + } catch { + const w = this.w.createByLanguageNameOrFilepathOrFirstLine(null, g, h.finalContent.split(` +`).at(0) ?? ""); + if (e.doNotUseInProdNewFilesShouldBeTemporarilyCreatedForIncreasedAccuracy) { + const S = await this.Q(g, h); + o.push(S); + } + const C = this.c.createModel(h.initialContent, w, g); + p = C; + o.push(C); + a = true; + } + const b = await this.s.openEditor({ + resource: g, + options: { + pinned: false + } + }); + o.push({ + dispose: async () => { + const y = b?.input; + if (y === undefined) { + return; + } + const w = b?.group?.id; + if (w !== undefined) { + await y.revert(w); + } + } + }); + const v = await this.q.computeMoreMinimalEdits(p.uri, [{ + text: h.initialContent, + range: p.getFullModelRange() + }]); + if (v !== undefined) { + p.pushEditOperations(null, v, () => null); + } + p.pushStackElement(); + return { + file: h, + model: p + }; + })); + if (a) { + let h; + const g = new Promise((b, v) => { + h = b; + }); + o.push(de.once(this.h.onMarkerChanged)(b => { + h("markerChanged"); + })); + for (const b of r) { + b.model.pushEditOperations(null, [{ + text: "THIS SHOULD BE A LINTER ERROR", + range: new Z(1, 1, 1, 1) + }], () => null); + } + if ((await Promise.race([g, new Promise(b => { + setTimeout(() => { + b("timedout"); + }, 20000); + })])) === "timedout") { + console.warn("Timed out waiting for markers to show up"); + } + for (const b of r) { + b.model.undo(); + const v = this.h.read({ + resource: b.model.uri + }); + } + } + await new Promise(h => { + setTimeout(() => { + h(undefined); + }, a ? 4000 : 2000); + }); + const l = new Map(); + for (const h of r) { + const g = this.h.read({ + resource: h.model.uri + }); + const p = h.model.deltaDecorations([], g.map(b => ({ + range: Z.lift(b), + options: { + description: "Lint error" + } + }))); + l.set(h.model.id, g.map((b, v) => ({ + marker: b, + decorationId: p[v] + }))); + } + const c = []; + for (const h of r) { + const g = await this.q.computeMoreMinimalEdits(h.model.uri, [{ + text: h.file.finalContent, + range: h.model.getFullModelRange() + }]); + if (g !== undefined) { + h.model.pushEditOperations(null, g, () => null); + c.push(h.model); + } + } + await new Promise(h => { + setTimeout(() => { + h(undefined); + }, 2000); + }); + const u = []; + for (const h of r) { + const g = this.h.read({ + resource: h.model.uri + }); + const p = l.get(h.model.id); + const b = g.filter(v => { + const y = h.file.getAllLintsNotJustDeltaLintsForRangesInFinalModel?.ranges; + if (y !== undefined) { + for (const w of y) { + if (Z.lift(w).intersectRanges(v) !== null) { + return true; + } + } + } + if (p === undefined) { + return true; + } else { + return !p.some(w => { + const C = h.model.getDecorationRange(w.decorationId); + return w.marker.message === v.message && w.marker.code === v.code && w.marker.severity === v.severity && w.marker.source === v.source && Z.lift(v).equalsRange(Z.lift(C)); + }); + } + }); + u.push(...b); + if (p !== undefined) { + h.model.deltaDecorations(p.map(v => v.decorationId), []); + } + } + let d; + if (e.includeQuickFixes) { + const h = new Xi(); + const g = setTimeout(() => h.cancel(), 5000); + const p = h.token; + d = await Promise.all(u.map(async b => { + const v = r.find(y => sr.isEqual(y.model.uri, b.resource))?.model; + if (v === undefined) { + console.error("Could not find model for marker", b); + return []; + } + try { + return await this.getQuickFixes(b, v, p); + } catch (y) { + console.error("Error getting quick fixes for marker", b, y); + return []; + } + })); + clearTimeout(g); + } + for (const h of c) { + h.undo(); + } + return new Gz({ + lints: u.map((h, g) => { + const p = d?.at(g) ?? []; + return new Zut({ + message: h.message, + severity: sn.toString(h.severity), + relativeWorkspacePath: this.n.asRelativePath(h.resource), + startLineNumberOneIndexed: h.startLineNumber, + startColumnOneIndexed: h.startColumn, + endLineNumberInclusiveOneIndexed: h.endLineNumber, + endColumnOneIndexed: h.endColumn, + quickFixes: p + }); + }) + }); + } finally { + for (const a of [...o].reverse()) { + try { + await a.dispose(); + } catch (l) { + console.error("Error disposing disposable. Continuing.", l); + } + } + } + } + async swWriteTextFileWithLints(e) { + const t = V.file(e.absolutePath); + const s = new Q(); + try { + const n = this.w.createByLanguageNameOrFilepathOrFirstLine(null, t, e.newContents.split(` +`).at(0) ?? ""); + let r; + try { + const h = await this.j.createModelReference(t); + s.add(h); + r = h.object.textEditorModel; + } catch { + const g = await this.g.create([{ + resource: t, + value: "", + options: { + overwrite: true + } + }]); + const p = await this.j.createModelReference(t); + s.add(p); + r = p.object.textEditorModel; + } + const o = CGs(n.languageId, true); + if (o) { + const h = await this.s.openEditor({ + resource: t, + options: { + pinned: false + } + }); + { + let g; + const p = new Promise((y, w) => { + g = y; + }); + s.add(de.once(this.h.onMarkerChanged)(y => { + g("markerChanged"); + })); + r.pushEditOperations(null, [{ + text: "THIS SHOULD BE A LINTER ERROR", + range: new Z(1, 1, 1, 1) + }], () => null); + await this.g.save(t, { + reason: 1, + skipSaveParticipants: false, + force: true, + ignoreModifiedSince: true + }); + if ((await Promise.race([p, new Promise(y => { + setTimeout(() => { + y("timedout"); + }, 20000); + })])) === "timedout") { + console.warn("Timed out waiting for markers to show up"); + } + r.undo(); + await this.g.save(t, { + reason: 1, + skipSaveParticipants: false, + force: true, + ignoreModifiedSince: true + }); + await a1e({ + uri: t, + markerService: this.h, + firstLinterErrors: { + case: "errors", + value: [] + } + }).getNewLinterErrors(r); + } + } + const a = this.h.read({ + resource: t, + severities: sn.Error + }).slice(0, oci).map(G0t); + const l = a1e({ + uri: t, + markerService: this.h, + firstLinterErrors: { + case: "errors", + value: a + } + }); + const c = await this.q.computeMoreMinimalEdits(t, [{ + text: e.newContents, + range: r.getFullModelRange() + }]); + if (c !== undefined) { + r.pushEditOperations(null, c, () => null); + } + await this.g.save(t, { + reason: 1, + skipSaveParticipants: false, + force: true, + ignoreModifiedSince: true + }); + let u; + if (o) { + u = l.getNewLinterErrors(r); + } + const d = await u; + return new $qt({ + newLinterErrors: d + }); + } finally { + s.dispose(); + } + } + async getQuickFixes(e, t, s) { + const n = this.u.codeActionProvider; + const r = await TR(n, t, Z.lift(e), { + type: 2, + triggerAction: ly.QuickFix + }, ev.None, s); + try { + const o = []; + for (const a of r.validActions) { + if (a.action.disabled || a.action.kind !== Tl.QuickFix.value) { + continue; + } + const l = a.action.edit?.edits ?? []; + const c = []; + for (const u of l) { + if (Ff.is(u)) { + c.push(new qqt({ + relativeWorkspacePath: this.n.asRelativePath(u.resource), + text: u.textEdit.text, + startLineNumberOneIndexed: u.textEdit.range.startLineNumber, + startColumnOneIndexed: u.textEdit.range.startColumn, + endLineNumberInclusiveOneIndexed: u.textEdit.range.endLineNumber, + endColumnOneIndexed: u.textEdit.range.endColumn + })); + } + } + o.push(new Hqt({ + message: a.action.title, + kind: a.action.kind, + isPreferred: a.action.isPreferred, + edits: c + })); + } + return o; + } finally { + r.dispose(); + } + } + async swGetExplicitContext() { + const e = await this.H.getExplicitContext(); + return new Fqt({ + explicitContext: e + }); + } + async swGetEnvironmentInfo() { + const e = await this.N.getEnvironmentInfo(); + return new Oqt({ + environmentInfo: e + }); + } + async R(e, t, s) { + if (e.tool !== at.RUN_TERMINAL_COMMAND_V2 || !e.params?.value) { + throw new Error("Invalid tool call for swRunTerminalCommand"); + } + const n = e.params.value; + if (n.isBackground) { + const d = await this.I.startSession(undefined); + const h = this.I.executeStream(d.sessionId, n.command, { + signal: s.signal + }); + (async () => { + for await (const g of h); + })(); + return new Zl({ + tool: at.RUN_TERMINAL_COMMAND_V2, + result: { + case: "runTerminalCommandV2Result", + value: new i5({ + output: "", + exitCode: undefined, + poppedOutIntoBackground: false, + isRunningInBackground: true, + notInterrupted: false + }) + } + }); + } + let r = this.b.get(t); + if (!r) { + r = (await this.I.startSession(undefined)).sessionId; + this.b.set(t, r); + } + const o = this.I.getTerminalInstance(r); + if (!o) { + throw new Error("Terminal instance not found"); + } + const a = this.I.executeStream(r, n.command, { + signal: s.signal + }); + let l = ""; + let c; + let u; + while (true) { + const { + value: d, + done: h + } = await a.next(); + if (h) { + c = d.exitCode; + u = d.endedReason; + break; + } + l += d.content; + } + return new Zl({ + tool: at.RUN_TERMINAL_COMMAND_V2, + result: { + case: "runTerminalCommandV2Result", + value: new i5({ + output: l, + exitCodeV2: c, + poppedOutIntoBackground: false, + isRunningInBackground: false, + notInterrupted: true, + resultingWorkingDirectory: o.cwd, + endedReason: u + }) + } + }); + } + async swCallClientSideV2Tool(e, t) { + if (e.toolCall === undefined) { + throw new Error("Tool call is undefined"); + } + if (e.toolCall.tool === at.UNSPECIFIED) { + throw new Error("Tool is unspecified"); + } + if (e.toolCall.tool === at.RUN_TERMINAL_COMMAND_V2) { + return new nve({ + toolResult: await this.R(e.toolCall, e.composerId, t) + }); + } + const s = this.G.getHandler(e.toolCall.tool); + const n = new AbortController(); + if (t.signal.aborted) { + n.abort(); + } + t.signal.addEventListener("abort", () => { + n.abort(); + }); + try { + const r = await s.call(e.toolCall.params?.value, n, Ft(), Ft(), undefined); + return new nve({ + toolResult: { + tool: e.toolCall.tool, + result: { + case: xre[e.toolCall.tool].returnName, + value: r + } + } + }); + } catch (r) { + let o = "Error calling tool."; + if (r instanceof cl) { + o = r.modelVisibleErrorMessage; + } + const a = new Wie({ + clientVisibleErrorMessage: o, + modelVisibleErrorMessage: o, + actualErrorMessageOnlySendFromClientToServerNeverTheOtherWayAroundBecauseThatMayBeASecurityRisk: r.message + }); + return new nve({ + toolResult: { + tool: e.toolCall.tool, + error: a + } + }); + } + } +}; +__decorate([K4i], dde.prototype, "getLintsForChange", null); +__decorate([K4i], dde.prototype, "swWriteTextFileWithLints", null); +__decorate([K4i], dde.prototype, "swCallClientSideV2Tool", null); +dde = __decorate([__param(0, $s), __param(1, So), __param(2, Nu), __param(3, ns), __param(4, kt), __param(5, Fu), __param(6, Te), __param(7, po), __param(8, nn), __param(9, As), __param(10, Ct), __param(11, $u), __param(12, sy), __param(13, _i), __param(14, Sre), __param(15, Wl), __param(16, hCe), __param(17, rc), __param(18, Wn), __param(19, t0), __param(20, p$), __param(21, eCt)], dde); +function K4i(i, e, t) { + const s = t.value; + t.value = async function (...n) { + const r = await this.acquire(); + try { + return await s.apply(this, n); + } finally { + r.dispose(); + } + }; + return t; +} +var Y4i = class extends H { + constructor(e, t) { + super(); + this.a = e; + this.b = t; + if (this.a.shadowWindowForWorkspaceId) { + this.server = this.b.createInstance(dde); + } + } + getServer() { + if (!this.a.shadowWindowForWorkspaceId || !this.server) { + throw new Error("Shadow workspace server not allowed, because this is not a shadow window!"); + } + return this.server; + } +}; +Y4i = __decorate([__param(0, gu), __param(1, re)], Y4i); +it($dn, Y4i, 1); +Ps(); +Cl(); +pe(); +Cl(); +Sl(); +Le(); +q(); +Me(); +ri(); +kd(); +X(); +kn(); +At(); +Jt(); +fn(); +Wa(); +nt(); +te(); +Wt(); +zt(); +Nt(); +Zt(); +Ut(); +ii(); +Jt(); +nt(); +Jr(); +nr(); +Ut(); +q(); +At(); +pn(); +rt(); +Et(); +Wa(); +zt(); +Le(); +X(); +Aa(); +kd(); +Sl(); +Nt(); +te(); +Zt(); +kn(); +pe(); +yg(); +nt(); +nr(); +q(); +pe(); +In(); +Le(); +Cl(); +kd(); +Nt(); +te(); +Zt(); +mu(); +Un(); +zt(); +Ut(); +ai(); +var tAn; +(function (i) { + i.ERROR_PROFILE_NOT_FOUND = "ERROR_PROFILE_NOT_FOUND"; + i.ERROR_INVALID_CONTENT = "ERROR_INVALID_CONTENT"; +})(tAn ||= {}); +var r2t = class extends Error { + constructor(i, e) { + super(i); + this.code = e; + } +}; +var uPe = Ve("IExtensionsProfileScannerService"); +var X4i = class extends H { + constructor(e, t, s, n, r, o) { + super(); + this.j = e; + this.m = t; + this.n = s; + this.q = n; + this.r = r; + this.s = o; + this.b = this.D(new B()); + this.onAddExtensions = this.b.event; + this.c = this.D(new B()); + this.onDidAddExtensions = this.c.event; + this.f = this.D(new B()); + this.onRemoveExtensions = this.f.event; + this.g = this.D(new B()); + this.onDidRemoveExtensions = this.g.event; + this.h = new dn(); + } + scanProfileExtensions(e, t) { + return this.t(e, undefined, t); + } + async addExtensionsToProfile(e, t, s) { + const n = []; + const r = []; + try { + await this.t(t, o => { + const a = []; + if (s) { + a.push(...o); + } else { + for (const l of o) { + if (e.some(([c]) => Ki(c.identifier, l.identifier) && (c.manifest.version !== l.version || c.location.toString() !== l.location.toString()))) { + n.push(l); + } else { + a.push(l); + } + } + } + for (const [l, c] of e) { + const u = a.findIndex(h => Ki(h.identifier, l.identifier) && h.version === l.manifest.version && h.location.toString() === l.location.toString()); + const d = { + identifier: l.identifier, + version: l.manifest.version, + location: l.location, + metadata: c + }; + if (u === -1) { + r.push(d); + a.push(d); + } else { + a.splice(u, 1, d); + } + } + if (r.length) { + this.b.fire({ + extensions: r, + profileLocation: t + }); + } + if (n.length) { + this.f.fire({ + extensions: n, + profileLocation: t + }); + } + return a; + }); + if (r.length) { + this.c.fire({ + extensions: r, + profileLocation: t + }); + } + if (n.length) { + this.g.fire({ + extensions: n, + profileLocation: t + }); + } + return r; + } catch (o) { + if (r.length) { + this.c.fire({ + extensions: r, + error: o, + profileLocation: t + }); + } + if (n.length) { + this.g.fire({ + extensions: n, + error: o, + profileLocation: t + }); + } + throw o; + } + } + async updateMetadata(e, t) { + const s = []; + await this.t(t, n => { + const r = []; + for (const o of n) { + const a = e.find(([l]) => Ki(l.identifier, o.identifier) && l.manifest.version === o.version); + if (a) { + o.metadata = { + ...o.metadata, + ...a[1] + }; + s.push(o); + } + r.push(o); + } + return r; + }); + return s; + } + async removeExtensionFromProfile(e, t) { + const s = []; + try { + await this.t(t, n => { + const r = []; + for (const o of n) { + if (Ki(o.identifier, e.identifier)) { + s.push(o); + } else { + r.push(o); + } + } + if (s.length) { + this.f.fire({ + extensions: s, + profileLocation: t + }); + } + return r; + }); + if (s.length) { + this.g.fire({ + extensions: s, + profileLocation: t + }); + } + } catch (n) { + if (s.length) { + this.g.fire({ + extensions: s, + error: n, + profileLocation: t + }); + } + throw n; + } + } + async t(e, t, s) { + return this.F(e).queue(async () => { + let n = []; + let r; + try { + const o = await this.m.readFile(e); + r = JSON.parse(o.value.toString().trim() || "[]"); + } catch (o) { + if (ZL(o) !== 1) { + throw o; + } + if (this.q.extUri.isEqual(e, this.n.defaultProfile.extensionsResource)) { + r = await this.C(); + } + if (!r && s?.bailOutWhenFileNotFound) { + throw new r2t(cc(o), "ERROR_PROFILE_NOT_FOUND"); + } + } + if (r) { + if (!Array.isArray(r)) { + this.u(e); + } + let o = false; + for (const a of r) { + if (!iAn(a)) { + this.u(e); + } + let l; + if (yi(a.relativeLocation) && a.relativeLocation) { + l = this.y(a.relativeLocation); + } else if (yi(a.location)) { + this.s.warn(`Extensions profile: Ignoring extension with invalid location: ${a.location}`); + continue; + } else { + l = V.revive(a.location); + const c = this.w(l); + if (c) { + o = true; + a.relativeLocation = c; + } + } + if (qo(a.metadata?.hasPreReleaseVersion) && a.metadata?.preRelease) { + o = true; + a.metadata.hasPreReleaseVersion = true; + } + n.push({ + identifier: a.identifier, + location: l, + version: a.version, + metadata: a.metadata + }); + } + if (o) { + await this.m.writeFile(e, Ii.fromString(JSON.stringify(r))); + } + } + if (t) { + n = t(n); + const o = n.map(a => ({ + identifier: a.identifier, + version: a.version, + location: a.location.toJSON(), + relativeLocation: this.w(a.location), + metadata: a.metadata + })); + await this.m.writeFile(e, Ii.fromString(JSON.stringify(o))); + } + return n; + }); + } + u(e) { + const t = new r2t(`Invalid extensions content in ${e.toString()}`, "ERROR_INVALID_CONTENT"); + this.r.publicLogError2("extensionsProfileScanningError", { + code: t.code + }); + throw t; + } + w(e) { + if (this.q.extUri.isEqual(this.q.extUri.dirname(e), this.j)) { + return this.q.extUri.basename(e); + } else { + return undefined; + } + } + y(e) { + return this.q.extUri.joinPath(this.j, e); + } + async C() { + this.z ||= (async () => { + const e = this.q.extUri.joinPath(this.n.defaultProfile.location, "extensions.json"); + const t = this.q.extUri.joinPath(this.j, ".init-default-profile-extensions"); + let s; + try { + s = (await this.m.readFile(e)).value.toString(); + } catch (r) { + if (ZL(r) === 1) { + return; + } + throw r; + } + this.s.info("Migrating extensions from old default profile location", e.toString()); + let n; + try { + const r = JSON.parse(s); + if (Array.isArray(r) && r.every(o => iAn(o))) { + n = r; + } else { + this.s.warn("Skipping migrating from old default profile locaiton: Found invalid data", r); + } + } catch (r) { + this.s.error(r); + } + if (n) { + try { + await this.m.createFile(this.n.defaultProfile.extensionsResource, Ii.fromString(JSON.stringify(n)), { + overwrite: false + }); + this.s.info("Migrated extensions from old default profile location to new location", e.toString(), this.n.defaultProfile.extensionsResource.toString()); + } catch (r) { + if (ZL(r) === 3) { + this.s.info("Migration from old default profile location to new location is done by another window", e.toString(), this.n.defaultProfile.extensionsResource.toString()); + } else { + throw r; + } + } + } + try { + await this.m.del(e); + } catch (r) { + if (ZL(r) !== 1) { + this.s.error(r); + } + } + try { + await this.m.del(t); + } catch (r) { + if (ZL(r) !== 1) { + this.s.error(r); + } + } + return n; + })(); + return this.z; + } + F(e) { + let t = this.h.get(e); + if (!t) { + t = new wT(); + this.h.set(e, t); + } + return t; + } +}; +X4i = __decorate([__param(1, Ct), __param(2, Ml), __param(3, _s), __param(4, Ot), __param(5, Bt)], X4i); +function iAn(i) { + return xo(i) && Err(i.identifier) && (Dqo(i.location) || yi(i.location) && i.location) && (qo(i.relativeLocation) || yi(i.relativeLocation)) && i.version && yi(i.version); +} +function Dqo(i) { + if (i) { + return yi(i.path) && yi(i.scheme); + } else { + return false; + } +} +mu(); +Un(); +var Q4i; +(function (i) { + function e(t, s) { + if (t === s) { + return true; + } + const n = Object.keys(t); + const r = new Set(); + for (const o of Object.keys(s)) { + r.add(o); + } + if (n.length !== r.size) { + return false; + } + for (const o of n) { + if (t[o] !== s[o]) { + return false; + } + r.delete(o); + } + return r.size === 0; + } + i.equals = e; +})(Q4i ||= {}); +var dPe = Ve("IExtensionsScannerService"); +var Z4i = class extends H { + constructor(e, t, s, n, r, o, a, l, c, u, d, h) { + super(); + this.systemExtensionsLocation = e; + this.userExtensionsLocation = t; + this.q = s; + this.r = n; + this.s = r; + this.t = o; + this.u = a; + this.w = l; + this.y = c; + this.z = u; + this.C = d; + this.F = h; + this.g = this.D(new B()); + this.onDidChangeCache = this.g.event; + this.h = Li(this.userExtensionsLocation, ".obsolete"); + this.j = this.D(this.F.createInstance(a2t, this.r, this.h)); + this.m = this.D(this.F.createInstance(a2t, this.r, this.h)); + this.n = this.D(this.F.createInstance(o2t, this.h)); + this.H = undefined; + this.D(this.j.onDidChangeCache(() => this.g.fire(0))); + this.D(this.m.onDidChangeCache(() => this.g.fire(1))); + } + getTargetPlatform() { + this.G ||= CFs(this.u, this.w); + return this.G; + } + async scanAllExtensions(e, t, s) { + const [n, r] = await Promise.all([this.scanSystemExtensions(e), this.scanUserExtensions(t)]); + const o = s ? await this.scanExtensionsUnderDevelopment(e, [...n, ...r]) : []; + return this.L(n, r, o, await this.getTargetPlatform(), true); + } + async scanSystemExtensions(e) { + const t = []; + t.push(this.M(!!e.useCache, e.language)); + t.push(this.N(e.language, !!e.checkControlFile)); + const [s, n] = await Promise.all(t); + return this.J([...s, ...n], 0, e, false); + } + async scanUserExtensions(e) { + const t = e.profileLocation ?? this.userExtensionsLocation; + this.w.trace("Started scanning user extensions", t); + const s = this.C.extUri.isEqual(e.profileLocation, this.s.defaultProfile.extensionsResource) ? { + bailOutWhenFileNotFound: true + } : undefined; + const n = await this.P(t, !!e.profileLocation, 1, !e.includeUninstalled, e.language, true, s, e.productVersion ?? this.R()); + const r = e.useCache && !n.devMode && n.excludeObsolete ? this.m : this.n; + let o; + try { + o = await r.scanExtensions(n); + } catch (a) { + if (a instanceof r2t && a.code === "ERROR_PROFILE_NOT_FOUND") { + await this.I(); + o = await r.scanExtensions(n); + } else { + throw a; + } + } + o = await this.J(o, 1, e, true); + this.w.trace("Scanned user extensions:", o.length); + return o; + } + async scanExtensionsUnderDevelopment(e, t) { + if (this.y.isExtensionDevelopment && this.y.extensionDevelopmentLocationURI) { + const s = (await Promise.all(this.y.extensionDevelopmentLocationURI.filter(n => n.scheme === me.file).map(async n => { + const r = await this.P(n, false, 1, true, e.language, false, undefined, e.productVersion ?? this.R()); + return (await this.n.scanOneOrMultipleExtensions(r)).map(a => { + a.type = t.find(l => Ki(l.identifier, a.identifier))?.type ?? a.type; + return this.n.validate(a, r); + }); + }))).flat(); + return this.J(s, "development", e, true); + } + return []; + } + async scanExistingExtension(e, t, s) { + const n = await this.P(e, false, t, true, s.language, true, undefined, s.productVersion ?? this.R()); + const r = await this.n.scanExtension(n); + if (!r || !s.includeInvalid && !r.isValid) { + return null; + } else { + return r; + } + } + async scanOneOrMultipleExtensions(e, t, s) { + const n = await this.P(e, false, t, true, s.language, true, undefined, s.productVersion ?? this.R()); + const r = await this.n.scanOneOrMultipleExtensions(n); + return this.J(r, t, s, true); + } + async scanMultipleExtensions(e, t, s) { + const n = []; + await Promise.all(e.map(async r => { + const o = await this.scanOneOrMultipleExtensions(r, t, s); + n.push(...o); + })); + return this.J(n, t, s, true); + } + async scanMetadata(e) { + const t = Li(e, "package.json"); + const s = (await this.u.readFile(t)).value.toString(); + return JSON.parse(s).__metadata; + } + async updateMetadata(e, t) { + const s = Li(e, "package.json"); + const n = (await this.u.readFile(s)).value.toString(); + const r = JSON.parse(n); + if (t.isMachineScoped === false) { + delete t.isMachineScoped; + } + if (t.isBuiltin === false) { + delete t.isBuiltin; + } + r.__metadata = { + ...r.__metadata, + ...t + }; + await this.u.writeFile(Li(e, "package.json"), Ii.fromString(JSON.stringify(r, null, "\t"))); + } + async initializeDefaultProfileExtensions() { + try { + await this.t.scanProfileExtensions(this.s.defaultProfile.extensionsResource, { + bailOutWhenFileNotFound: true + }); + } catch (e) { + if (e instanceof r2t && e.code === "ERROR_PROFILE_NOT_FOUND") { + await this.I(); + } else { + throw e; + } + } + } + async I() { + this.H ||= (async () => { + try { + this.w.info("Started initializing default profile extensions in extensions installation folder.", this.userExtensionsLocation.toString()); + const e = await this.scanUserExtensions({ + includeInvalid: true + }); + if (e.length) { + await this.t.addExtensionsToProfile(e.map(t => [t, t.metadata]), this.s.defaultProfile.extensionsResource); + } else { + try { + await this.u.createFile(this.s.defaultProfile.extensionsResource, Ii.fromString(JSON.stringify([]))); + } catch (t) { + if (ZL(t) !== 1) { + this.w.warn("Failed to create default profile extensions manifest in extensions installation folder.", this.userExtensionsLocation.toString(), cc(t)); + } + } + } + this.w.info("Completed initializing default profile extensions in extensions installation folder.", this.userExtensionsLocation.toString()); + } catch (e) { + this.w.error(e); + } finally { + this.H = undefined; + } + })(); + return this.H; + } + async J(e, t, s, n) { + if (!s.includeAllVersions) { + e = this.L(t === 0 ? e : undefined, t === 1 ? e : undefined, t === "development" ? e : undefined, await this.getTargetPlatform(), n); + } + if (!s.includeInvalid) { + e = e.filter(r => r.isValid); + } + return e.sort((r, o) => { + const a = ir(r.location.fsPath); + const l = ir(o.location.fsPath); + if (a < l) { + return -1; + } else if (a > l) { + return 1; + } else { + return 0; + } + }); + } + L(e, t, s, n, r) { + const o = (l, c, u) => { + if (l.isValid && !c.isValid) { + return false; + } + if (l.isValid === c.isValid) { + if (r && WO(l.manifest.version, c.manifest.version)) { + this.w.debug(`Skipping extension ${c.location.path} with lower version ${c.manifest.version} in favour of ${l.location.path} with version ${l.manifest.version}`); + return false; + } + if (KHs(l.manifest.version, c.manifest.version)) { + if (l.type === 0) { + this.w.debug(`Skipping extension ${c.location.path} in favour of system extension ${l.location.path} with same version`); + return false; + } + if (l.targetPlatform === n) { + this.w.debug(`Skipping extension ${c.location.path} from different target platform ${c.targetPlatform}`); + return false; + } + } + } + if (u) { + this.w.warn(`Overwriting user extension ${l.location.path} with ${c.location.path}.`); + } else { + this.w.debug(`Overwriting user extension ${l.location.path} with ${c.location.path}.`); + } + return true; + }; + const a = new Gm(); + e?.forEach(l => { + const c = a.get(l.identifier.id); + if (!c || o(c, l, false)) { + a.set(l.identifier.id, l); + } + }); + t?.forEach(l => { + const c = a.get(l.identifier.id); + if (!c && e && l.type === 0) { + this.w.debug(`Skipping obsolete system extension ${l.location.path}.`); + return; + } + if (!c || o(c, l, false)) { + a.set(l.identifier.id, l); + } + }); + s?.forEach(l => { + const c = a.get(l.identifier.id); + if (!c || o(c, l, true)) { + a.set(l.identifier.id, l); + } + a.set(l.identifier.id, l); + }); + return [...a.values()]; + } + async M(e, t) { + this.w.trace("Started scanning system extensions"); + const s = await this.P(this.systemExtensionsLocation, false, 0, true, t, true, undefined, this.R()); + const r = await (e && !s.devMode ? this.j : this.n).scanExtensions(s); + this.w.trace("Scanned system extensions:", r.length); + return r; + } + async N(e, t) { + const s = this.y.isBuilt ? [] : this.z.builtInExtensions; + if (!s?.length) { + return []; + } + this.w.trace("Started scanning dev system extensions"); + const n = t ? await this.O() : {}; + const r = []; + const o = V.file(My(id(Na.asFileUri("").fsPath, "..", ".build", "builtInExtensions"))); + for (const l of s) { + const c = n[l.name] || "marketplace"; + switch (c) { + case "disabled": + break; + case "marketplace": + r.push(Li(o, l.name)); + break; + default: + r.push(V.file(c)); + break; + } + } + const a = await Promise.all(r.map(async l => this.n.scanExtension(await this.P(l, false, 0, true, e, true, undefined, this.R())))); + this.w.trace("Scanned dev system extensions:", a.length); + return dr(a); + } + async O() { + try { + const e = await this.u.readFile(this.q); + return JSON.parse(e.value.toString()); + } catch { + return {}; + } + } + async P(e, t, s, n, r, o, a, l) { + const c = await this.f(r ?? Uu); + const u = await this.Q(e); + const d = t && !this.C.extUri.isEqual(e, this.s.defaultProfile.extensionsResource) ? this.s.defaultProfile.extensionsResource : undefined; + const h = d ? await this.Q(d) : undefined; + return new hPe(e, u, d, h, t, a, s, n, o, l.vscodeVersion, l.date, this.z.commit, !this.y.isBuilt, r, c); + } + async Q(e) { + try { + const t = await this.u.stat(e); + if (typeof t.mtime == "number") { + return t.mtime; + } + } catch {} + } + R() { + return { + vscodeVersion: this.z.vscodeVersion, + version: this.z.version, + date: this.z.date + }; + } +}; +Z4i = __decorate([__param(4, Ml), __param(5, uPe), __param(6, Ct), __param(7, Bt), __param(8, pa), __param(9, ys), __param(10, _s), __param(11, re)], Z4i); +var hPe = class { + constructor(i, e, t, s, n, r, o, a, l, c, u, d, h, g, p) { + this.location = i; + this.mtime = e; + this.applicationExtensionslocation = t; + this.applicationExtensionslocationMtime = s; + this.profile = n; + this.profileScanOptions = r; + this.type = o; + this.excludeObsolete = a; + this.validate = l; + this.productVersion = c; + this.productDate = u; + this.productCommit = d; + this.devMode = h; + this.language = g; + this.translations = p; + } + static createNlsConfiguration(i) { + return { + language: i.language, + pseudo: i.language === "pseudo", + devMode: i.devMode, + translations: i.translations + }; + } + static equals(i, e) { + return Ls(i.location, e.location) && i.mtime === e.mtime && Ls(i.applicationExtensionslocation, e.applicationExtensionslocation) && i.applicationExtensionslocationMtime === e.applicationExtensionslocationMtime && i.profile === e.profile && Ul(i.profileScanOptions, e.profileScanOptions) && i.type === e.type && i.excludeObsolete === e.excludeObsolete && i.validate === e.validate && i.productVersion === e.productVersion && i.productDate === e.productDate && i.productCommit === e.productCommit && i.devMode === e.devMode && i.language === e.language && Q4i.equals(i.translations, e.translations); + } +}; +var o2t = class extends H { + constructor(e, t, s, n, r, o, a) { + super(); + this.g = e; + this.h = t; + this.j = s; + this.m = n; + this.n = o; + this.q = a; + this.f = r.extensionsEnabledWithApiProposalVersion?.map(l => l.toLowerCase()) ?? []; + } + async scanExtensions(e) { + const t = e.profile ? await this.s(e) : await this.r(e); + let s = {}; + if (e.excludeObsolete && e.type === 1) { + try { + const n = (await this.m.readFile(this.g)).value.toString(); + s = JSON.parse(n); + } catch {} + } + if (RL(s)) { + return t; + } else { + return t.filter(n => !s[dYt.create(n).toString()]); + } + } + async r(e) { + const t = await this.m.resolve(e.location); + if (!t.children?.length) { + return []; + } + const s = await Promise.all(t.children.map(async n => { + if (!n.isDirectory || e.type === 1 && ji(n.resource).indexOf(".") === 0) { + return null; + } + const r = new hPe(n.resource, e.mtime, e.applicationExtensionslocation, e.applicationExtensionslocationMtime, e.profile, e.profileScanOptions, e.type, e.excludeObsolete, e.validate, e.productVersion, e.productDate, e.productCommit, e.devMode, e.language, e.translations); + return this.scanExtension(r); + })); + return dr(s).sort((n, r) => n.location.path < r.location.path ? -1 : 1); + } + async s(e) { + let t = await this.t(e.location, () => true, e); + if (e.applicationExtensionslocation && !this.j.extUri.isEqual(e.location, e.applicationExtensionslocation)) { + t = t.filter(n => !n.metadata?.isApplicationScoped); + const s = await this.t(e.applicationExtensionslocation, n => !!n.metadata?.isBuiltin || !!n.metadata?.isApplicationScoped, e); + t.push(...s); + } + return t; + } + async t(e, t, s) { + const n = await this.h.scanProfileExtensions(e, s.profileScanOptions); + if (!n.length) { + return []; + } + const r = await Promise.all(n.map(async o => { + if (t(o)) { + const a = new hPe(o.location, s.mtime, s.applicationExtensionslocation, s.applicationExtensionslocationMtime, s.profile, s.profileScanOptions, s.type, s.excludeObsolete, s.validate, s.productVersion, s.productDate, s.productCommit, s.devMode, s.language, s.translations); + return this.scanExtension(a, o.metadata); + } + return null; + })); + return dr(r); + } + async scanOneOrMultipleExtensions(e) { + try { + if (await this.m.exists(Li(e.location, "package.json"))) { + const t = await this.scanExtension(e); + if (t) { + return [t]; + } else { + return []; + } + } else { + return await this.scanExtensions(e); + } + } catch (t) { + this.q.error(`Error scanning extensions at ${e.location.path}:`, cc(t)); + return []; + } + } + async scanExtension(e, t) { + try { + let s = await this.u(e.location); + if (s) { + s.publisher ||= qKt; + t = t ?? s.__metadata; + if (t && !t?.size && s.__metadata?.size) { + t.size = s.__metadata?.size; + } + delete s.__metadata; + const n = cv(s.publisher, s.name); + const r = t?.id ? { + id: n, + uuid: t.id + } : { + id: n + }; + const o = t?.isSystem ? 0 : e.type; + const a = o === 0 || !!t?.isBuiltin; + s = await this.w(e.location, s, hPe.createNlsConfiguration(e)); + let l = { + type: o, + identifier: r, + manifest: s, + location: e.location, + isBuiltin: a, + targetPlatform: t?.targetPlatform ?? "undefined", + publisherDisplayName: t?.publisherDisplayName, + metadata: t, + isValid: true, + validations: [], + preRelease: !!t?.preRelease + }; + if (e.validate) { + l = this.validate(l, e); + } + if (s.enabledApiProposals && (!this.n.isBuilt || this.f.includes(n.toLowerCase()))) { + s.originalEnabledApiProposals = s.enabledApiProposals; + s.enabledApiProposals = Nrr([...s.enabledApiProposals]); + } + return l; + } + } catch (s) { + if (e.type !== 0) { + this.q.error(s); + } + } + return null; + } + validate(e, t) { + let s = true; + const n = this.n.isBuilt && this.f.includes(e.identifier.id.toLowerCase()); + const r = vDr(t.productVersion, t.productDate, t.location, e.manifest, e.isBuiltin, n); + for (const [o, a] of r) { + if (o === cs.Error) { + s = false; + this.q.error(this.F(t.location, a)); + } + } + e.isValid = s; + e.validations = r; + return e; + } + async u(e) { + const t = Li(e, "package.json"); + let s; + try { + s = (await this.m.readFile(t)).value.toString(); + } catch (r) { + if (ZL(r) !== 1) { + this.q.error(this.F(e, f(1859, null, t.path, r.message))); + } + return null; + } + let n; + try { + n = JSON.parse(s); + } catch { + const o = []; + Ld(s, o); + for (const a of o) { + this.q.error(this.F(e, f(1860, null, t.path, a.offset, a.length, IY(a.error)))); + } + return null; + } + if (BA(n) !== "object") { + this.q.error(this.F(e, f(1861, null, t.path))); + return null; + } else { + return n; + } + } + async w(e, t, s) { + const n = await this.y(e, t, s); + if (n) { + try { + const r = []; + const o = await this.z(n.default, r); + if (r.length > 0) { + r.forEach(l => { + this.q.error(this.F(e, f(1862, null, n.default?.path, IY(l.error)))); + }); + return t; + } + if (BA(n) !== "object") { + this.q.error(this.F(e, f(1863, null, n.default?.path))); + return t; + } + const a = n.values || Object.create(null); + return wIt(this.q, t, a, o); + } catch {} + } + return t; + } + async y(e, t, s) { + const n = Li(e, "package.nls.json"); + const r = (c, u) => { + u.forEach(d => { + this.q.error(this.F(e, f(1864, null, c?.path, IY(d.error)))); + }); + }; + const o = c => { + this.q.error(this.F(e, f(1865, null, c?.path))); + }; + const a = `${t.publisher}.${t.name}`; + const l = s.translations[a]; + if (l) { + try { + const c = V.file(l); + const u = (await this.m.readFile(c)).value.toString(); + const d = []; + const h = Ld(u, d); + if (d.length > 0) { + r(c, d); + return { + values: undefined, + default: n + }; + } else if (BA(h) !== "object") { + o(c); + return { + values: undefined, + default: n + }; + } else { + return { + values: h.contents ? h.contents.package : undefined, + default: n + }; + } + } catch { + return { + values: undefined, + default: n + }; + } + } else { + if (!(await this.m.exists(n))) { + return; + } + let u; + try { + u = await this.C(e, s); + } catch { + return; + } + if (!u.localized) { + return { + values: undefined, + default: u.original + }; + } + try { + const d = (await this.m.readFile(u.localized)).value.toString(); + const h = []; + const g = Ld(d, h); + if (h.length > 0) { + r(u.localized, h); + return { + values: undefined, + default: u.original + }; + } else if (BA(g) !== "object") { + o(u.localized); + return { + values: undefined, + default: u.original + }; + } else { + return { + values: g, + default: u.original + }; + } + } catch { + return { + values: undefined, + default: u.original + }; + } + } + } + async z(e, t) { + if (e) { + try { + const s = (await this.m.readFile(e)).value.toString(); + return Ld(s, t); + } catch {} + } + } + C(e, t) { + return new Promise((s, n) => { + const r = o => { + const a = Li(e, `package.nls.${o}.json`); + this.m.exists(a).then(l => { + if (l) { + s({ + localized: a, + original: Li(e, "package.nls.json") + }); + } + const c = o.lastIndexOf("-"); + if (c === -1) { + s({ + localized: Li(e, "package.nls.json"), + original: null + }); + } else { + o = o.substring(0, c); + r(o); + } + }); + }; + if (t.devMode || t.pseudo || !t.language) { + return s({ + localized: Li(e, "package.nls.json"), + original: null + }); + } + r(t.language); + }); + } + F(e, t) { + return `[${e.path}]: ${t}`; + } +}; +o2t = __decorate([__param(1, uPe), __param(2, _s), __param(3, Ct), __param(4, ys), __param(5, pa), __param(6, Bt)], o2t); +var a2t = class extends o2t { + constructor(e, t, s, n, r, o, a, l, c) { + super(t, n, r, o, a, l, c); + this.J = e; + this.L = s; + this.H = this.D(new Bm(3000)); + this.I = this.D(new B()); + this.onDidChangeCache = this.I.event; + } + async scanExtensions(e) { + const t = this.P(e); + const s = await this.M(t); + this.G = e; + if (s && s.input && hPe.equals(s.input, this.G)) { + this.q.debug("Using cached extensions scan result", e.type === 0 ? "system" : "user", e.location.toString()); + this.H.trigger(() => this.O()); + return s.result.map(r => { + r.location = V.revive(r.location); + return r; + }); + } + const n = await super.scanExtensions(e); + await this.N(t, { + input: e, + result: n + }); + return n; + } + async M(e) { + try { + const t = await this.m.readFile(e); + const s = JSON.parse(t.value.toString()); + return { + result: s.result, + input: Eh(s.input) + }; + } catch (t) { + this.q.debug("Error while reading the extension cache file:", e.path, cc(t)); + } + return null; + } + async N(e, t) { + try { + await this.m.writeFile(e, Ii.fromString(JSON.stringify(t))); + } catch (s) { + this.q.debug("Error while writing the extension cache file:", e.path, cc(s)); + } + } + async O() { + if (!this.G) { + return; + } + const e = this.P(this.G); + const t = await this.M(e); + if (!t) { + return; + } + const s = t.result; + const n = JSON.parse(JSON.stringify(await super.scanExtensions(this.G))); + if (!Ul(n, s)) { + try { + this.q.info("Invalidating Cache", s, n); + await this.m.del(e); + this.I.fire(); + } catch (r) { + this.q.error(r); + } + } + } + P(e) { + const t = this.Q(e); + return this.j.extUri.joinPath(t.cacheHome, e.type === 0 ? a2s : o2s); + } + Q(e) { + if (e.type === 0) { + return this.L.defaultProfile; + } else if (e.profile) { + if (this.j.extUri.isEqual(e.location, this.J.extensionsResource)) { + return this.J; + } else { + return this.L.profiles.find(t => this.j.extUri.isEqual(e.location, t.extensionsResource)) ?? this.J; + } + } else { + return this.L.defaultProfile; + } + } +}; +a2t = __decorate([__param(2, Ml), __param(3, uPe), __param(4, _s), __param(5, Ct), __param(6, ys), __param(7, pa), __param(8, Bt)], a2t); +function e5i(i, e) { + const t = fD(i.manifest.publisher, i.manifest.name); + return { + id: t, + identifier: new $r(t), + isBuiltin: i.type === 0, + isUserBuiltin: i.type === 1 && i.isBuiltin, + isUnderDevelopment: e, + extensionLocation: i.location, + uuid: i.identifier.uuid, + targetPlatform: i.targetPlatform, + publisherDisplayName: i.publisherDisplayName, + preRelease: i.preRelease, + ...i.manifest + }; +} +var Tqo = class extends Z4i { + constructor(i, e, t, s, n, r, o, a, l, c, u, d) { + super(i, e, Li(t, ".cursor-dev", "extensions", "control.json"), s, n, r, o, a, l, c, u, d); + this.S = (async () => { + if (h4t) { + try { + const h = await this.u.readFile(V.file(h4t)); + return JSON.parse(h.value.toString()); + } catch {} + } + return Object.create(null); + })(); + } + f(i) { + return this.S; + } +}; +qt(); +Un(); +ai(); +mu(); +No(); +var fPe; +function Pqo(i) { + return i.type === "gallery"; +} +var t5i = class extends H { + constructor(e, t, s, n, r, o, a, l, c, u, d, h, g, p, b, v) { + super(); + this.n = e; + this.q = t; + this.t = s; + this.u = n; + this.w = r; + this.y = o; + this.z = a; + this.C = l; + this.F = c; + this.G = u; + this.H = d; + this.I = h; + this.J = g; + this.L = p; + this.M = b; + this.N = v; + this.a = this.D(new B()); + this.b = this.D(new B()); + this.c = this.D(new B()); + this.f = this.D(new B()); + this.g = this.D(new B()); + this.h = this.D(new B()); + this.j = []; + this.m = this.D(this.L.createInstance(i5i)); + this.onDidEnableExtensions = this.m.onDidChangeInvalidExtensions; + if (this.n.localExtensionManagementServer) { + this.j.push(this.n.localExtensionManagementServer); + } + if (this.n.remoteExtensionManagementServer) { + this.j.push(this.n.remoteExtensionManagementServer); + } + if (this.n.webExtensionManagementServer) { + this.j.push(this.n.webExtensionManagementServer); + } + const y = this.D(new mI()); + this.D(y.add(this.a.event)); + this.onInstallExtension = y.event; + const w = this.D(new mI()); + this.D(w.add(this.b.event)); + this.onDidInstallExtensions = w.event; + const C = this.D(new mI()); + this.D(C.add(this.g.event)); + this.onProfileAwareDidInstallExtensions = C.event; + const S = this.D(new mI()); + this.D(S.add(this.c.event)); + this.onUninstallExtension = S.event; + const x = this.D(new mI()); + this.D(x.add(this.f.event)); + this.onDidUninstallExtension = x.event; + const k = this.D(new mI()); + this.D(k.add(this.h.event)); + this.onProfileAwareDidUninstallExtension = k.event; + const E = this.D(new mI()); + this.onDidUpdateExtensionMetadata = E.event; + const D = this.D(new mI()); + this.onProfileAwareDidUpdateExtensionMetadata = D.event; + const P = this.D(new mI()); + this.onDidChangeProfile = P.event; + for (const R of this.j) { + this.D(y.add(de.map(R.extensionManagementService.onInstallExtension, L => ({ + ...L, + server: R + })))); + this.D(w.add(R.extensionManagementService.onDidInstallExtensions)); + this.D(C.add(R.extensionManagementService.onProfileAwareDidInstallExtensions)); + this.D(S.add(de.map(R.extensionManagementService.onUninstallExtension, L => ({ + ...L, + server: R + })))); + this.D(x.add(de.map(R.extensionManagementService.onDidUninstallExtension, L => ({ + ...L, + server: R + })))); + this.D(k.add(de.map(R.extensionManagementService.onProfileAwareDidUninstallExtension, L => ({ + ...L, + server: R + })))); + this.D(E.add(R.extensionManagementService.onDidUpdateExtensionMetadata)); + this.D(D.add(R.extensionManagementService.onProfileAwareDidUpdateExtensionMetadata)); + this.D(P.add(de.map(R.extensionManagementService.onDidChangeProfile, L => ({ + ...L, + server: R + })))); + } + } + async getInstalled(e, t, s) { + const n = []; + await Promise.all(this.j.map(async r => { + const o = await r.extensionManagementService.getInstalled(e, t, s); + if (r === this.bb()) { + const a = await this.getInstalledWorkspaceExtensions(true); + o.push(...a); + } + n.push(...o); + })); + return n; + } + uninstall(e, t) { + return this.uninstallExtensions([{ + extension: e, + options: t + }]); + } + async uninstallExtensions(e) { + const t = []; + const s = new Map(); + const n = (l, c, u) => { + let d = s.get(l); + if (!d) { + s.set(l, d = []); + } + d.push({ + extension: c, + options: u + }); + }; + for (const { + extension: l, + options: c + } of e) { + if (l.isWorkspaceScoped) { + t.push(l); + continue; + } + const u = this.ab(l); + if (!u) { + throw new Error(`Invalid location ${l.location.toString()}`); + } + n(u, l, c); + if (this.j.length > 1 && nO(l.manifest)) { + const d = this.j.filter(h => h !== u); + for (const h of d) { + const p = (await h.extensionManagementService.getInstalled()).find(b => !b.isBuiltin && Ki(b.identifier, l.identifier)); + if (p) { + n(h, p, c); + } + } + } + } + const r = []; + for (const l of t) { + r.push(this.W(l)); + } + for (const [l, c] of s.entries()) { + r.push(this.O(l, c)); + } + const a = (await Promise.allSettled(r)).filter(l => l.status === "rejected").map(l => l.reason); + if (a.length) { + throw new Error(a.map(l => l.message).join(` +`)); + } + } + async O(e, t) { + if (e === this.n.localExtensionManagementServer && this.n.remoteExtensionManagementServer) { + for (const { + extension: s + } of t) { + const r = (await this.n.remoteExtensionManagementServer.extensionManagementService.getInstalled(1)).filter(o => !this.H.prefersExecuteOnUI(o.manifest) && o.manifest.extensionDependencies && o.manifest.extensionDependencies.some(a => Ki({ + id: a + }, s.identifier))); + if (r.length) { + throw new Error(this.P(s, r)); + } + } + } + return e.extensionManagementService.uninstallExtensions(t); + } + P(e, t) { + if (t.length === 1) { + return f(12846, null, e.manifest.displayName || e.manifest.name, t[0].manifest.displayName || t[0].manifest.name); + } else if (t.length === 2) { + return f(12847, null, e.manifest.displayName || e.manifest.name, t[0].manifest.displayName || t[0].manifest.name, t[1].manifest.displayName || t[1].manifest.name); + } else { + return f(12848, null, e.manifest.displayName || e.manifest.name, t[0].manifest.displayName || t[0].manifest.name, t[1].manifest.displayName || t[1].manifest.name); + } + } + async reinstallFromGallery(e) { + const t = this.ab(e); + if (t) { + await this.cb(e.manifest, false); + return t.extensionManagementService.reinstallFromGallery(e); + } else { + return Promise.reject(`Invalid location ${e.location.toString()}`); + } + } + updateMetadata(e, t) { + const s = this.ab(e); + if (s) { + const n = e.isApplicationScoped ? this.u.defaultProfile : this.t.currentProfile; + return s.extensionManagementService.updateMetadata(e, t, n.extensionsResource); + } + return Promise.reject(`Invalid location ${e.location.toString()}`); + } + async resetPinnedStateForAllUserExtensions(e) { + await Promise.allSettled(this.j.map(t => t.extensionManagementService.resetPinnedStateForAllUserExtensions(e))); + } + zip(e) { + const t = this.ab(e); + if (t) { + return t.extensionManagementService.zip(e); + } else { + return Promise.reject(`Invalid location ${e.location.toString()}`); + } + } + download(e, t, s) { + if (this.n.localExtensionManagementServer) { + return this.n.localExtensionManagementServer.extensionManagementService.download(e, t, s); + } + throw new Error("Cannot download extension"); + } + async install(e, t) { + const s = await this.getManifest(e); + return this.installVSIX(e, s, t); + } + async installVSIX(e, t, s) { + const n = this.Q(t); + if (n?.length) { + await this.cb(t, false); + const [r] = await Ko.settled(n.map(o => this.R(e, o, s))); + return r; + } + return Promise.reject("No Servers to Install"); + } + Q(e) { + if (this.n.localExtensionManagementServer && this.n.remoteExtensionManagementServer) { + if (nO(e)) { + return [this.n.localExtensionManagementServer, this.n.remoteExtensionManagementServer]; + } else if (this.H.prefersExecuteOnUI(e)) { + return [this.n.localExtensionManagementServer]; + } else { + return [this.n.remoteExtensionManagementServer]; + } + } + if (this.n.localExtensionManagementServer) { + return [this.n.localExtensionManagementServer]; + } + if (this.n.remoteExtensionManagementServer) { + return [this.n.remoteExtensionManagementServer]; + } + } + async installFromLocation(e) { + if (e.scheme === me.file) { + if (this.n.localExtensionManagementServer) { + return this.n.localExtensionManagementServer.extensionManagementService.installFromLocation(e, this.t.currentProfile.extensionsResource); + } + throw new Error("Local extension management server is not found"); + } + if (e.scheme === me.vscodeRemote) { + if (this.n.remoteExtensionManagementServer) { + return this.n.remoteExtensionManagementServer.extensionManagementService.installFromLocation(e, this.t.currentProfile.extensionsResource); + } + throw new Error("Remote extension management server is not found"); + } + if (!this.n.webExtensionManagementServer) { + throw new Error("Web extension management server is not found"); + } + return this.n.webExtensionManagementServer.extensionManagementService.installFromLocation(e, this.t.currentProfile.extensionsResource); + } + R(e, t, s) { + return t.extensionManagementService.install(e, s); + } + getManifest(e) { + if (e.scheme === me.file && this.n.localExtensionManagementServer) { + return this.n.localExtensionManagementServer.extensionManagementService.getManifest(e); + } else if (e.scheme === me.file && this.n.remoteExtensionManagementServer) { + return this.n.remoteExtensionManagementServer.extensionManagementService.getManifest(e); + } else if (e.scheme === me.vscodeRemote && this.n.remoteExtensionManagementServer) { + return this.n.remoteExtensionManagementServer.extensionManagementService.getManifest(e); + } else { + return Promise.reject("No Servers"); + } + } + async canInstall(e) { + if (Pqo(e)) { + return this.S(e); + } else { + return this.U(e); + } + } + async S(e) { + if (this.n.localExtensionManagementServer && (await this.n.localExtensionManagementServer.extensionManagementService.canInstall(e)) === true) { + return true; + } + const t = await this.q.getManifest(e, mt.None); + if (t) { + if (this.n.remoteExtensionManagementServer && (await this.n.remoteExtensionManagementServer.extensionManagementService.canInstall(e)) === true && this.H.canExecuteOnWorkspace(t) || this.n.webExtensionManagementServer && (await this.n.webExtensionManagementServer.extensionManagementService.canInstall(e)) === true && this.H.canExecuteOnWeb(t)) { + return true; + } else { + return new hs().appendText(f(12850, null, e.displayName || e.name)); + } + } else { + return new hs().appendText(f(12849, null)); + } + } + async U(e) { + if (this.n.localExtensionManagementServer || this.n.remoteExtensionManagementServer && this.H.canExecuteOnWorkspace(e.manifest) || this.n.webExtensionManagementServer && this.H.canExecuteOnWeb(e.manifest)) { + return true; + } else { + return new hs().appendText(f(12851, null, e.manifest.displayName ?? e.identifier.id)); + } + } + async updateFromGallery(e, t, s) { + const n = this.ab(t); + if (!n) { + return Promise.reject(`Invalid location ${t.location.toString()}`); + } + const r = []; + if (nO(t.manifest)) { + r.push(...this.j.filter(o => o !== this.n.webExtensionManagementServer)); + } else { + r.push(n); + } + s = { + ...(s || {}), + isApplicationScoped: t.isApplicationScoped + }; + return Ko.settled(r.map(o => o.extensionManagementService.installFromGallery(e, s))).then(([o]) => o); + } + async installGalleryExtensions(e) { + const t = new Map(); + const s = new Map(); + await Promise.all(e.map(async ({ + extension: n, + options: r + }) => { + try { + const o = await this.X(n, r); + if (!r.isMachineScoped && this.Z() && this.n.localExtensionManagementServer && !o.includes(this.n.localExtensionManagementServer) && (await this.n.localExtensionManagementServer.extensionManagementService.canInstall(n)) === true) { + o.push(this.n.localExtensionManagementServer); + } + for (const a of o) { + let l = s.get(a); + if (!l) { + s.set(a, l = []); + } + l.push({ + extension: n, + options: r + }); + } + } catch (o) { + t.set(n.identifier.id.toLowerCase(), { + identifier: n.identifier, + source: n, + error: o, + operation: 2, + profileLocation: r.profileLocation ?? this.t.currentProfile.extensionsResource + }); + } + })); + await Promise.all([...s.entries()].map(async ([n, r]) => { + const o = await n.extensionManagementService.installGalleryExtensions(r); + for (const a of o) { + t.set(a.identifier.id.toLowerCase(), a); + } + })); + return [...t.values()]; + } + async installFromGallery(e, t) { + const s = await this.X(e, t); + if (!t || qo(t.isMachineScoped)) { + const n = await this.$([e]); + t = { + ...(t || {}), + isMachineScoped: n + }; + } + if (!t.isMachineScoped && this.Z() && this.n.localExtensionManagementServer && !s.includes(this.n.localExtensionManagementServer) && (await this.n.localExtensionManagementServer.extensionManagementService.canInstall(e)) === true) { + s.push(this.n.localExtensionManagementServer); + } + return Ko.settled(s.map(n => n.extensionManagementService.installFromGallery(e, t))).then(([n]) => n); + } + async getExtensions(e) { + const t = await this.M.scanMultipleExtensions(e, 1, { + includeInvalid: true + }); + const s = []; + await Promise.all(t.map(async n => { + const r = await this.m.toLocalWorkspaceExtension(n); + if (r) { + s.push({ + type: "resource", + identifier: r.identifier, + location: r.location, + manifest: r.manifest, + changelogUri: r.changelogUrl, + readmeUri: r.readmeUrl + }); + } + })); + return s; + } + getInstalledWorkspaceExtensionLocations() { + return this.m.getInstalledWorkspaceExtensionsLocations(); + } + async getInstalledWorkspaceExtensions(e) { + return this.m.getInstalled(e); + } + async installResourceExtension(e, t) { + if (!this.U(e)) { + throw new Error("This extension cannot be installed in the current workspace."); + } + if (!t.isWorkspaceScoped) { + return this.installFromLocation(e.location); + } + this.J.info(`Installing the extension ${e.identifier.id} from ${e.location.toString()} in workspace`); + const s = this.bb(); + this.a.fire({ + identifier: e.identifier, + source: e.location, + server: s, + applicationScoped: false, + profileLocation: this.t.currentProfile.extensionsResource, + workspaceScoped: true + }); + try { + await this.cb(e.manifest, true); + const n = await this.m.install(e); + this.J.info(`Successfully installed the extension ${n.identifier.id} from ${e.location.toString()} in the workspace`); + this.b.fire([{ + identifier: n.identifier, + source: e.location, + operation: 2, + applicationScoped: false, + profileLocation: this.t.currentProfile.extensionsResource, + local: n, + workspaceScoped: true + }]); + return n; + } catch (n) { + this.J.error(`Failed to install the extension ${e.identifier.id} from ${e.location.toString()} in the workspace`, cc(n)); + this.b.fire([{ + identifier: e.identifier, + source: e.location, + operation: 2, + applicationScoped: false, + profileLocation: this.t.currentProfile.extensionsResource, + error: n, + workspaceScoped: true + }]); + throw n; + } + } + async W(e) { + if (!e.isWorkspaceScoped) { + throw new Error("The extension is not a workspace extension"); + } + this.J.info(`Uninstalling the workspace extension ${e.identifier.id} from ${e.location.toString()}`); + const t = this.bb(); + this.c.fire({ + identifier: e.identifier, + server: t, + applicationScoped: false, + workspaceScoped: true, + profileLocation: this.t.currentProfile.extensionsResource + }); + try { + await this.m.uninstall(e); + this.J.info(`Successfully uninstalled the workspace extension ${e.identifier.id} from ${e.location.toString()}`); + this.N.publicLog2("workspaceextension:uninstall"); + this.f.fire({ + identifier: e.identifier, + server: t, + applicationScoped: false, + workspaceScoped: true, + profileLocation: this.t.currentProfile.extensionsResource + }); + } catch (s) { + this.J.error(`Failed to uninstall the workspace extension ${e.identifier.id} from ${e.location.toString()}`, cc(s)); + this.f.fire({ + identifier: e.identifier, + server: t, + error: s, + applicationScoped: false, + workspaceScoped: true, + profileLocation: this.t.currentProfile.extensionsResource + }); + throw s; + } + } + async X(e, t) { + const s = await this.q.getManifest(e, mt.None); + if (!s) { + return Promise.reject(f(12852, null, e.displayName || e.name)); + } + const n = []; + if (t?.installEverywhere || nO(s)) { + n.push(...this.j.filter(r => r !== this.n.webExtensionManagementServer)); + } else { + const r = this.Y(s); + if (r) { + n.push(r); + } + } + if (!n.length) { + const r = new Error(f(12853, null, e.displayName || e.name)); + r.name = "Unsupported"; + throw r; + } + if (t?.context?.[BJ] !== "settingsSync") { + await this.cb(s, false); + } + if (!t?.donotIncludePackAndDependencies) { + await this.db(e, s); + } + return n; + } + Y(e) { + if (this.j.length === 1 && this.n.localExtensionManagementServer) { + return this.n.localExtensionManagementServer; + } + const t = this.H.getExtensionKind(e); + for (const s of t) { + if (s === "ui" && this.n.localExtensionManagementServer) { + return this.n.localExtensionManagementServer; + } + if (s === "workspace" && this.n.remoteExtensionManagementServer) { + return this.n.remoteExtensionManagementServer; + } + if (s === "web" && this.n.webExtensionManagementServer) { + return this.n.webExtensionManagementServer; + } + } + return this.n.localExtensionManagementServer; + } + Z() { + return this.C.isEnabled() && this.C.isResourceEnabled("extensions"); + } + async $(e) { + if (this.Z()) { + const { + result: t + } = await this.F.prompt({ + type: cs.Info, + message: e.length === 1 ? f(12854, null) : f(12855, null), + detail: e.length === 1 ? f(12856, null, e[0].displayName) : f(12857, null), + buttons: [{ + label: f(12858, null), + run: () => false + }, { + label: f(12859, null), + run: () => true + }], + cancelButton: { + run: () => { + throw new fl(); + } + } + }); + return t; + } + return false; + } + getExtensionsControlManifest() { + if (this.n.localExtensionManagementServer) { + return this.n.localExtensionManagementServer.extensionManagementService.getExtensionsControlManifest(); + } else if (this.n.remoteExtensionManagementServer) { + return this.n.remoteExtensionManagementServer.extensionManagementService.getExtensionsControlManifest(); + } else if (this.n.webExtensionManagementServer) { + return this.n.webExtensionManagementServer.extensionManagementService.getExtensionsControlManifest(); + } else { + return Promise.resolve({ + malicious: [], + deprecated: {}, + search: [] + }); + } + } + ab(e) { + if (e.isWorkspaceScoped) { + return this.bb(); + } else { + return this.n.getExtensionManagementServer(e); + } + } + bb() { + if (this.n.remoteExtensionManagementServer) { + return this.n.remoteExtensionManagementServer; + } + if (this.n.localExtensionManagementServer) { + return this.n.localExtensionManagementServer; + } + if (this.n.webExtensionManagementServer) { + return this.n.webExtensionManagementServer; + } + throw new Error("No extension server found"); + } + async cb(e, t) { + if (t || this.H.getExtensionUntrustedWorkspaceSupportType(e) === false) { + const s = []; + s.push({ + label: f(12860, null), + type: "ContinueWithTrust" + }); + if (!t) { + s.push({ + label: f(12861, null), + type: "ContinueWithoutTrust" + }); + } + s.push({ + label: f(12862, null), + type: "Manage" + }); + if ((await this.G.requestWorkspaceTrust({ + message: f(12863, null), + buttons: s + })) === undefined) { + throw new fl(); + } + } + } + async db(e, t) { + if (this.j.length !== 1 || this.j[0] !== this.n.webExtensionManagementServer) { + return; + } + const s = []; + if (t.extensionPack?.length) { + const p = await this.q.getExtensions(t.extensionPack.map(b => ({ + id: b + })), mt.None); + for (const b of p) { + if ((await this.j[0].extensionManagementService.canInstall(b)) !== true) { + s.push(b); + } + } + if (s.length && s.length === p.length) { + throw new ey("Not supported in Web", "Unsupported"); + } + } + const n = f(12864, null, this.y.nameLong); + const r = this.H.getExtensionVirtualWorkspaceSupportType(t); + const o = owe(t.capabilities?.virtualWorkspaces); + const a = r === "limited" || !!o; + if (!s.length && !a) { + return; + } + const l = f(12865, null, e.displayName || e.identifier.id, n); + let c; + let u = []; + let d; + const h = { + label: f(12866, null), + run: () => {} + }; + const g = { + label: f(12867, null), + run: () => this.L.invokeFunction(p => p.get(gt).executeCommand("extension.open", e.identifier.id, "extensionPack")) + }; + if (s.length && a) { + c = l; + d = `${o ? `${o} +` : ""}${f(12868, null)}`; + u = [h, g]; + } else if (a) { + c = l; + d = o || undefined; + u = [h]; + } else { + c = f(12869, null, e.displayName || e.identifier.id, n); + u = [h, g]; + } + await this.F.prompt({ + type: cs.Info, + message: c, + detail: d, + buttons: u, + cancelButton: { + run: () => { + throw new fl(); + } + } + }); + } + getTargetPlatform() { + this.eb ||= CFs(this.I, this.J); + return this.eb; + } + async cleanUp() { + await Promise.allSettled(this.j.map(e => e.extensionManagementService.cleanUp())); + } + toggleAppliationScope(e, t) { + const s = this.ab(e); + if (s) { + return s.extensionManagementService.toggleAppliationScope(e, t); + } + throw new Error("Not Supported"); + } + copyExtensions(e, t) { + if (this.n.remoteExtensionManagementServer) { + throw new Error("Not Supported"); + } + if (this.n.localExtensionManagementServer) { + return this.n.localExtensionManagementServer.extensionManagementService.copyExtensions(e, t); + } else if (this.n.webExtensionManagementServer) { + return this.n.webExtensionManagementServer.extensionManagementService.copyExtensions(e, t); + } else { + return Promise.resolve(); + } + } + registerParticipant() { + throw new Error("Not Supported"); + } + installExtensionsFromProfile(e, t, s) { + throw new Error("Not Supported"); + } +}; +t5i = __decorate([__param(0, rm), __param(1, vh), __param(2, Rc), __param(3, Ml), __param(4, ve), __param(5, ys), __param(6, fle), __param(7, Qm), __param(8, Js), __param(9, AE), __param(10, f0), __param(11, Ct), __param(12, Bt), __param(13, re), __param(14, dPe), __param(15, Ot)], t5i); +var i5i = class extends H { + static { + fPe = this; + } + static { + this.a = "workspaceExtensions.locations"; + } + constructor(e, t, s, n, r, o, a) { + super(); + this.h = e; + this.j = t; + this.m = s; + this.n = n; + this.q = r; + this.t = o; + this.u = a; + this.b = this.D(new B()); + this.onDidChangeInvalidExtensions = this.b.event; + this.c = []; + this.g = this.D(new Q()); + this.D(de.debounce(this.h.onDidFilesChange, (l, c) => { + (l = l ?? []).push(c); + return l; + }, 1000)(l => { + const c = this.c.filter(u => !u.isValid && l.some(d => d.affects(u.location))); + if (c.length) { + this.z(c); + } + })); + this.f = this.w(); + } + async w() { + const e = this.getInstalledWorkspaceExtensionsLocations(); + if (e.length) { + await Promise.allSettled(e.map(async t => { + if (!this.m.isInsideWorkspace(t)) { + this.j.info(`Removing the workspace extension ${t.toString()} as it is not inside the workspace`); + return; + } + if (!(await this.h.exists(t))) { + this.j.info(`Removing the workspace extension ${t.toString()} as it does not exist`); + return; + } + try { + const s = await this.scanWorkspaceExtension(t); + if (s) { + this.c.push(s); + } else { + this.j.info(`Skipping workspace extension ${t.toString()} as it does not exist`); + } + } catch (s) { + this.j.error("Skipping the workspace extension", t.toString(), s); + } + })); + this.C(); + } + } + y() { + this.g.clear(); + for (const e of this.c) { + if (!e.isValid) { + this.g.add(this.h.watch(e.location)); + } + } + } + async z(e) { + const t = []; + await Promise.all(e.map(async n => { + const r = await this.scanWorkspaceExtension(n.location); + if (r?.isValid) { + t.push(r); + } + })); + let s = false; + for (const n of t) { + const r = this.c.findIndex(o => this.t.extUri.isEqual(o.location, n.location)); + if (r !== -1) { + s = true; + this.c.splice(r, 1, n); + } + } + if (s) { + this.C(); + this.b.fire(t); + } + } + async getInstalled(e) { + await this.f; + return this.c.filter(t => e || t.isValid); + } + async install(e) { + await this.f; + const t = await this.scanWorkspaceExtension(e.location); + if (!t) { + throw new Error("Cannot install the extension as it does not exist."); + } + const s = this.c.findIndex(n => Ki(n.identifier, e.identifier)); + if (s === -1) { + this.c.push(t); + } else { + this.c.splice(s, 1, t); + } + this.C(); + this.u.publicLog2("workspaceextension:install"); + return t; + } + async uninstall(e) { + await this.f; + const t = this.c.findIndex(s => Ki(s.identifier, e.identifier)); + if (t !== -1) { + this.c.splice(t, 1); + this.C(); + } + this.u.publicLog2("workspaceextension:uninstall"); + } + getInstalledWorkspaceExtensionsLocations() { + const e = []; + try { + const t = JSON.parse(this.q.get(fPe.a, 1, "[]")); + if (Array.isArray(e)) { + for (const s of t) { + if (yi(s)) { + if (this.m.getWorkbenchState() === 2) { + e.push(this.m.getWorkspace().folders[0].toResource(s)); + } else { + this.j.warn(`Invalid value for 'extensions' in workspace storage: ${s}`); + } + } else { + e.push(V.revive(s)); + } + } + } else { + this.j.warn(`Invalid value for 'extensions' in workspace storage: ${e}`); + } + } catch (t) { + this.j.warn(`Error parsing workspace extensions locations: ${cc(t)}`); + } + return e; + } + C() { + const e = this.c.map(t => t.location); + if (this.m.getWorkbenchState() === 2) { + this.q.store(fPe.a, JSON.stringify(dr(e.map(t => this.t.extUri.relativePath(this.m.getWorkspace().folders[0].uri, t)))), 1, 1); + } else { + this.q.store(fPe.a, JSON.stringify(e), 1, 1); + } + this.y(); + } + async scanWorkspaceExtension(e) { + const t = await this.n.scanExistingExtension(e, 1, { + includeInvalid: true + }); + if (t) { + return this.toLocalWorkspaceExtension(t); + } else { + return null; + } + } + async toLocalWorkspaceExtension(e) { + const t = await this.h.resolve(e.location); + let s; + let n; + if (t.children) { + s = t.children.find(({ + name: a + }) => /^readme(\.txt|\.md|)$/i.test(a))?.resource; + n = t.children.find(({ + name: a + }) => /^changelog(\.txt|\.md|)$/i.test(a))?.resource; + } + const r = [...e.validations]; + let o = e.isValid; + if (e.manifest.main) { + if (!(await this.h.exists(this.t.extUri.joinPath(e.location, e.manifest.main)))) { + o = false; + r.push([cs.Error, f(12870, null, e.manifest.main)]); + } + } + return { + identifier: e.identifier, + type: e.type, + isBuiltin: e.isBuiltin || !!e.metadata?.isBuiltin, + location: e.location, + manifest: e.manifest, + targetPlatform: e.targetPlatform, + validations: r, + isValid: o, + readmeUrl: s, + changelogUrl: n, + publisherDisplayName: e.metadata?.publisherDisplayName, + publisherId: e.metadata?.publisherId || null, + isApplicationScoped: !!e.metadata?.isApplicationScoped, + isMachineScoped: !!e.metadata?.isMachineScoped, + isPreReleaseVersion: !!e.metadata?.isPreReleaseVersion, + hasPreReleaseVersion: !!e.metadata?.hasPreReleaseVersion, + preRelease: !!e.metadata?.preRelease, + installedTimestamp: e.metadata?.installedTimestamp, + updated: !!e.metadata?.updated, + pinned: !!e.metadata?.pinned, + isWorkspaceScoped: true, + source: "resource", + size: e.metadata?.size ?? 0 + }; + } +}; +i5i = fPe = __decorate([__param(0, Ct), __param(1, Bt), __param(2, kt), __param(3, dPe), __param(4, ht), __param(5, _s), __param(6, Ot)], i5i); +It(); +At(); +Me(); +kn(); +Et(); +fn(); +te(); +Nt(); +Zt(); +ai(); +mu(); +var s5i = class extends t5i { + constructor(e, t, s, n, r, o, a, l, c, u, d, h, g, p, b, v, y) { + super(t, s, n, r, o, a, l, c, u, d, h, g, p, b, v, y); + this.fb = e; + } + async R(e, t, s) { + if (e.scheme === me.vscodeRemote && t === this.n.localExtensionManagementServer) { + const n = Li(this.fb.tmpDir, Ft()); + await this.z.download(e, n); + e = n; + } + return super.R(e, t, s); + } +}; +s5i = __decorate([__param(0, gu), __param(1, rm), __param(2, vh), __param(3, Rc), __param(4, Ml), __param(5, ve), __param(6, ys), __param(7, fle), __param(8, Qm), __param(9, Js), __param(10, AE), __param(11, f0), __param(12, Ct), __param(13, Bt), __param(14, re), __param(15, dPe), __param(16, Ot)], s5i); +it(DS, s5i, 1); +v2(Kvi, "encryption"); +A0(); +rt(); +Wa(); +X(); +fn(); +Aa(); +It(); +Zt(); +Wi(); +gs(); +qt(); +var n5i = class extends Yvi { + constructor(e, t, s, n, r, o, a, l) { + super(!!r.useInMemorySecretStorage, o, a, l); + this.y = e; + this.z = t; + this.C = s; + this.F = n; + this.G = r; + this.H = Py(() => this.I()); + } + set(e, t) { + this.c.queue(e, async () => { + await this.r; + if (this.type !== "persisted" && !this.G.useInMemorySecretStorage) { + this.n.trace("[NativeSecretStorageService] Notifying user that secrets are not being stored on disk."); + await this.H(); + } + }); + return super.set(e, t); + } + async I() { + const e = []; + const t = { + label: f(13205, null), + run: () => this.C.open("https://go.microsoft.com/fwlink/?linkid=2239490"), + keepOpen: true + }; + e.push(t); + let s = f(13206, null); + if (!yl) { + this.y.prompt(cs.Error, s, e); + return; + } + const n = await this.m.getKeyStorageProvider(); + if (n === "basic_text") { + const r = f(13207, null); + const o = { + label: f(13208, null), + run: async () => { + await this.m.setUsePlainTextEncryption(); + await this.F.write(this.G.argvResource, [{ + path: ["password-store"], + value: "basic" + }], true); + this.t(); + } + }; + e.unshift(o); + await this.z.prompt({ + type: "error", + buttons: e, + message: s, + detail: r + }); + return; + } + if (Yso(n)) { + s = f(13209, null); + } else if (Kso(n)) { + s = f(13210, null); + } + this.y.prompt(cs.Error, s, e); + } +}; +n5i = __decorate([__param(0, ni), __param(1, Js), __param(2, os), __param(3, PD), __param(4, AM), __param(5, ht), __param(6, Kvi), __param(7, Bt)], n5i); +it(wle, n5i, 1); +YN(KCe, "languagePacks"); +ai(); +Zw(); +Me(); +q(); +kn(); +var Lqo = class { + constructor(i) { + this.b = i; + } + log(i, e) { + this.b.call("log", { + eventName: i, + data: e + }).then(undefined, t => `Failed to log telemetry: ${console.warn(t)}`); + return Promise.resolve(null); + } + flush() { + return Promise.resolve(); + } + registerAuthId(i) { + this.b.call("registerAuthId", { + eventName: "registerAuthId", + data: i + }); + } + capture(i, e) { + this.b.call("capture", { + eventName: i, + data: e + }).then(undefined, t => `Failed to log telemetry: ${console.warn(t)}`); + return Promise.resolve(null); + } +}; +qt(); +dFs(); +ai(); +Zw(); +function Rqo(i, e, t, s, n, r, o, a, l, c, u, d) { + const h = lor(e, t, u.arch, s, n, r, o, a, l, c); + const g = i.get(gGi, -1); + const p = i.get(pGi, -1); + h["common.version.shell"] = u.versions?.electron; + h["common.version.renderer"] = u.versions?.chrome; + h["common.firstSessionDate"] = g; + h["common.lastSessionDate"] = p || ""; + h["common.isNewSession"] = p ? "0" : "1"; + h["common.remoteAuthority"] = hFs(d); + h["common.cli"] = !!u.env.VSCODE_CLI; + return h; +} +q(); +Jr(); +rt(); +$i(); +X(); +Me(); +Qr(); +kn(); +Ht(); +ai(); +Zw(); +var r5i = class { + static { + this.IDLE_START_EVENT_NAME = "UserIdleStart"; + } + static { + this.IDLE_STOP_EVENT_NAME = "UserIdleStop"; + } + constructor(e, t, s) { + this.k = t; + this.l = s; + this.d = {}; + this.i = new Q(); + this.j = []; + this.b = e.appenders; + this.c = e.commonProperties ?? Object.create(null); + this.sessionId = this.c.sessionID; + this.machineId = this.c["common.machineId"]; + this.macMachineId = this.c["common.macMachineId"]; + this.sqmId = this.c["common.sqmId"]; + this.devDeviceId = this.c["common.devDeviceId"]; + this.firstSessionDate = this.c["common.firstSessionDate"]; + this.msftInternal = this.c["common.msftInternal"]; + this.f = e.piiPaths || []; + this.g = 3; + this.h = !!e.sendErrorTelemetry; + this.j = [/(vscode-)?file:\/\/\/.*?\/resources\/app\//gi]; + for (const n of this.f) { + this.j.push(new RegExp(zg(n), "gi")); + if (n.indexOf("\\") >= 0) { + this.j.push(new RegExp(zg(n.replace(/\\/g, "/")), "gi")); + } + } + this.m(); + this.i.add(this.k.onDidChangeConfiguration(n => { + if (n.affectsConfiguration(aj) || n.affectsConfiguration(tot) || n.affectsConfiguration(J6t)) { + this.m(); + } + })); + } + setExperimentProperty(e, t) { + this.d[e] = t; + } + m() { + let e = tne(this.k); + const t = this.l.enabledTelemetryLevels; + if (t) { + this.h = this.sendErrorTelemetry ? t.error : false; + const s = t.usage ? 3 : t.error ? 2 : 0; + e = Math.min(e, s); + } + this.g = e; + } + get sendErrorTelemetry() { + return this.h; + } + get telemetryLevel() { + return this.g; + } + dispose() { + this.i.dispose(); + } + n(e, t, s) { + if (!(this.g < t)) { + s = Oy(s, this.d); + s = fFs(s, this.j); + s = Oy(s, this.c); + this.b.forEach(n => n.log(e, s)); + } + } + o(e, t, s) { + if (!(this.g < t)) { + s = Oy(s, this.d); + s = fFs(s, this.j); + s = Oy(s, this.c); + this.b.forEach(n => { + n.capture(e, s); + }); + } + } + registerAuthId(e) { + this.b.forEach(t => t.registerAuthId(e)); + } + publicLog(e, t) { + this.n(e, 3, t); + } + publicLog2(e, t) { + this.publicLog(e, t); + } + publicLogError(e, t) { + if (this.h) { + this.n(e, 2, t); + } + } + publicLogError2(e, t) { + this.publicLogError(e, t); + } + publicLogCapture(e, t) { + this.o(e, 3, t); + } +}; +r5i = __decorate([__param(1, ve), __param(2, ys)], r5i); +function Nqo() { + const i = f(2118, null, Sa.nameLong); + const e = f(2119, null, "https://cursor.com/privacy", "https://cursor.com/security"); + const t = tn ? "" : f(2120, null); + return ` +${i} ${e} ${t} +`; +} +Pe.as(rr.Configuration).registerConfiguration({ + id: mGi, + order: 1, + type: "object", + title: "Crash Reporting", + properties: { + [aj]: { + type: "string", + enum: ["all", "off"], + enumDescriptions: ["Send OS-level crash reports.", "Disable crash reporting."], + markdownDescription: Nqo(), + default: "all", + restricted: true, + scope: 1 + } + } +}); +It(); +var o5i = class extends H { + get sessionId() { + return this.a.sessionId; + } + get machineId() { + return this.a.machineId; + } + get macMachineId() { + return this.a.macMachineId; + } + get sqmId() { + return this.a.sqmId; + } + get devDeviceId() { + return this.a.devDeviceId; + } + get firstSessionDate() { + return this.a.firstSessionDate; + } + get msftInternal() { + return this.a.msftInternal; + } + constructor(e, t, s, n, r) { + super(); + if (GJ(t, e)) { + const o = uor(t, r); + const a = s.getChannel("telemetryAppender"); + const l = { + appenders: [new Lqo(a)], + commonProperties: Rqo(n, e.os.release, e.os.hostname, t.commit, t.version, e.machineId, e.macMachineId, e.sqmId, e.devDeviceId, o, mD, e.remoteAuthority), + piiPaths: dor(e), + sendErrorTelemetry: true + }; + this.a = this.D(new r5i(l, r, t)); + } else { + this.a = pFs; + } + this.sendErrorTelemetry = this.a.sendErrorTelemetry; + } + setExperimentProperty(e, t) { + return this.a.setExperimentProperty(e, t); + } + get telemetryLevel() { + return this.a.telemetryLevel; + } + registerAuthId(e) { + this.a.registerAuthId(e); + } + publicLog(e, t) { + this.a.publicLog(e, t); + } + publicLog2(e, t) { + this.publicLog(e, t); + } + publicLogError(e, t) { + this.a.publicLogError(e, t); + } + publicLogError2(e, t) { + this.publicLogError(e, t); + } + publicLogCapture(e, t) { + this.a.publicLogCapture(e, t); + } +}; +o5i = __decorate([__param(0, gu), __param(1, ys), __param(2, b3), __param(3, ht), __param(4, ve)], o5i); +it(Ot, o5i, 1); +te(); +var sAn = Ve("extensionHostStarter"); +var Mqo = "extensionHostStarter"; +v2(sAn, Mqo); +It(); +Nt(); +kn(); +qt(); +Aa(); +Me(); +ri(); +var a5i = class extends gEr { + constructor(e, t, s, n, r, o) { + super(e, t, s, n, r); + this.m = o; + } + async readExtensionResource(e) { + if (this.isExtensionGalleryResource(e)) { + const s = await this.h(); + const n = await this.m.request({ + url: e.toString(), + headers: s + }, mt.None); + return (await JR(n)) || ""; + } + return (await this.c.readFile(e)).value.toString(); + } +}; +a5i = __decorate([__param(0, Ct), __param(1, ht), __param(2, ys), __param(3, pa), __param(4, ve), __param(5, IS)], a5i); +it(g6, a5i, 1); +rt(); +Aa(); +Wi(); +Wf(); +Cl(); +so(); +X(); +Fs(); +var Aqo = /("[^"\\]*(?:\\.[^"\\]*)*")|('[^'\\]*(?:\\.[^'\\]*)*')|(\/\*[^\/\*]*(?:(?:\*|\/)[^\/\*]*)*?\*\/)|(\/{2,}.*?(?:(?:\r?\n)|$))|(,\s*[}\]])/g; +function $qo(i) { + return i.replace(Aqo, function (e, t, s, n, r, o) { + if (n) { + return ""; + } + if (r) { + const a = r.length; + if (r[a - 1] === ` +`) { + if (r[a - 2] === "\r") { + return `\r +`; + } else { + return ` +`; + } + } else { + return ""; + } + } else if (o) { + return e.substring(1); + } else { + return e; + } + }); +} +function nAn(i) { + const e = $qo(i); + try { + return JSON.parse(e); + } catch { + const s = e.replace(/,\s*([}\]])/g, "$1"); + return JSON.parse(s); + } +} +vt(); +fn(); +kn(); +It(); +var Fqo = "workbench.view.extensions"; +var l5i = class { + constructor(e, t, s, n, r, o, a, l, c, u, d, h) { + this.a = e; + this.b = t; + this.c = s; + this.d = n; + this.e = r; + this.f = o; + this.g = a; + this.h = l; + this.i = c; + this.j = u; + this.k = d; + this.m = h; + } + async n() { + try { + const e = await this.h.read(this.b.argvResource, { + encoding: "utf8" + }); + nAn(e.value); + } catch { + this.c.notify({ + severity: es.Error, + message: f(13119, null), + actions: { + primary: [Ba({ + id: "openArgv", + label: f(13120, null), + run: () => this.i.openEditor({ + resource: this.b.argvResource + }) + })] + } + }); + return false; + } + return true; + } + async o(e) { + if (await this.n()) { + await this.a.write(this.b.argvResource, [{ + path: ["locale"], + value: e + }], true); + return true; + } else { + return false; + } + } + async setLocale(e, t = false) { + const s = e.id; + if (s === Wk.value() || !s && Wk.isDefaultVariant()) { + return; + } + const n = await this.d.getInstalledLanguages(); + try { + if (!n.some(r => r.id === e.id)) { + if (e.galleryExtension?.publisher.toLowerCase() !== "ms-ceintl") { + ((await this.e.openPaneComposite(Fqo, 0))?.getViewPaneContainer()).search(`@id:${e.extensionId}`); + return; + } + await this.g.withProgress({ + location: 15, + title: f(13121, null, e.label) + }, r => this.f.installFromGallery(e.galleryExtension, { + isMachineScoped: false + })); + } + if (!t && !(await this.p(e.label))) { + return; + } + await this.o(s); + await this.k.restart(); + } catch (r) { + this.c.error(r); + } + } + async clearLocalePreference() { + try { + await this.o(undefined); + if (!Wk.isDefaultVariant()) { + await this.p("English"); + } + } catch (e) { + this.c.error(e); + } + } + async p(e) { + const { + confirmed: t + } = await this.j.confirm({ + message: f(13122, null, this.m.nameLong, e), + detail: f(13123, null, e, this.m.nameLong), + primaryButton: f(13124, null) + }); + return t; + } +}; +l5i = __decorate([__param(0, PD), __param(1, pa), __param(2, ni), __param(3, KCe), __param(4, Id), __param(5, Sd), __param(6, ra), __param(7, So), __param(8, Te), __param(9, Js), __param(10, kr), __param(11, ys)], l5i); +var c5i = class { + constructor(e) { + this.a = e; + } + async getExtensionIdProvidingCurrentLocale() { + const e = Wk.value(); + if (e === NB) { + return undefined; + } else { + return (await this.a.getInstalledLanguages()).find(n => n.id === e)?.extensionId; + } + } +}; +c5i = __decorate([__param(0, KCe)], c5i); +it(eoe, l5i, 1); +it(qHs, c5i, 1); +Le(); +Aa(); +Nt(); +It(); +te(); +Zt(); +kn(); +Un(); +mu(); +var u5i = class extends Tqo { + constructor(e, t, s, n, r, o, a, l, c) { + super(V.file(o.builtinExtensionsPath), V.file(o.extensionsPath), o.userHome, e.currentProfile, t, s, n, r, o, a, l, c); + } +}; +u5i = __decorate([__param(0, Rc), __param(1, Ml), __param(2, uPe), __param(3, Ct), __param(4, Bt), __param(5, AM), __param(6, ys), __param(7, _s), __param(8, re)], u5i); +it(dPe, u5i, 1); +X(); +At(); +Wc(); +It(); +Cl(); +kd(); +Zt(); +Yd(); +Jt(); +ri(); +X(); +kn(); +Me(); +nt(); +Nt(); +Un(); +Sl(); +pe(); +Jr(); +Le(); +Jt(); +nt(); +ri(); +Ut(); +pe(); +q(); +In(); +rt(); +Le(); +X(); +Cl(); +kd(); +Sl(); +Zt(); +kn(); +ai(); +Un(); +mu(); +No(); +var l2t = class extends H { + constructor(e, t) { + super(); + this.g = e; + this.h = t; + } + async canInstall(e) { + const t = this.h.isAllowed({ + id: e.identifier.id, + publisherDisplayName: e.publisherDisplayName + }); + if (t !== true) { + return new hs(f(1802, null, t.value)); + } + if (!(await this.j(e))) { + const s = tn ? f(1803, null, this.g.nameLong) : this.g.nameLong; + const n = tn ? "https://aka.ms/vscode-web-extensions-guide" : "https://aka.ms/vscode-platform-specific-extensions"; + return new hs(`${f(1804, null, e.displayName ?? e.identifier.id, s, Hft(await this.getTargetPlatform()))} [${f(1805, null)}](${n})`); + } + return true; + } + async j(e) { + const t = await this.getTargetPlatform(); + return e.allTargetPlatforms.some(s => qft(s, e.allTargetPlatforms, t)); + } +}; +l2t = __decorate([__param(0, ys), __param(1, gS)], l2t); +var rAn = class extends l2t { + get onInstallExtension() { + return this.t.event; + } + get onDidInstallExtensions() { + return this.u.event; + } + get onUninstallExtension() { + return this.w.event; + } + get onDidUninstallExtension() { + return this.y.event; + } + get onDidUpdateExtensionMetadata() { + return this.z.event; + } + constructor(e, t, s, n, r, o, a) { + super(r, o); + this.F = e; + this.G = t; + this.H = s; + this.I = n; + this.J = a; + this.n = 0; + this.q = new Map(); + this.s = new Map(); + this.t = this.D(new B()); + this.u = this.D(new B()); + this.w = this.D(new B()); + this.y = this.D(new B()); + this.z = this.D(new B()); + this.C = []; + this.D(Ue(() => { + this.q.forEach(({ + task: l + }) => l.cancel()); + this.s.forEach(l => l.cancel()); + this.q.clear(); + this.s.clear(); + })); + } + async installFromGallery(e, t = {}) { + try { + const n = (await this.installGalleryExtensions([{ + extension: e, + options: t + }])).find(({ + identifier: r + }) => Ki(r, e.identifier)); + if (n?.local) { + return n?.local; + } + throw n?.error ? n.error : new ey(`Unknown error while installing extension ${e.identifier.id}`, "Unknown"); + } catch (s) { + throw gPe(s); + } + } + async installGalleryExtensions(e) { + if (!this.F.isEnabled()) { + throw new ey(f(1806, null), "NotAllowed"); + } + const t = []; + const s = []; + await Promise.allSettled(e.map(async ({ + extension: n, + options: r + }) => { + try { + const o = await this.Q(n, !!r?.installGivenVersion, !!r?.installPreReleaseVersion, r.productVersion ?? { + version: this.g.version, + date: this.g.date, + vscodeVersion: this.g.vscodeVersion + }); + s.push({ + ...o, + options: r + }); + } catch (o) { + t.push({ + identifier: n.identifier, + operation: 2, + source: n, + error: o, + profileLocation: r.profileLocation ?? this.Z() + }); + } + })); + if (s.length) { + t.push(...(await this.L(s))); + } + return t; + } + async uninstall(e, t) { + this.I.trace("ExtensionManagementService#uninstall", e.identifier.id); + return this.uninstallExtensions([{ + extension: e, + options: t + }]); + } + async toggleAppliationScope(e, t) { + if (awe(e.manifest) || e.isBuiltin) { + return e; + } + if (e.isApplicationScoped) { + let s = await this.updateMetadata(e, { + isApplicationScoped: false + }, this.J.defaultProfile.extensionsResource); + if (!this.H.extUri.isEqual(t, this.J.defaultProfile.extensionsResource)) { + s = await this.bb(e, this.J.defaultProfile.extensionsResource, t); + } + for (const n of this.J.profiles) { + const r = (await this.getInstalled(1, n.extensionsResource)).find(o => Ki(o.identifier, e.identifier)); + if (r) { + this.z.fire({ + local: r, + profileLocation: n.extensionsResource + }); + } else { + this.y.fire({ + identifier: e.identifier, + profileLocation: n.extensionsResource + }); + } + } + return s; + } else { + const s = this.H.extUri.isEqual(t, this.J.defaultProfile.extensionsResource) ? await this.updateMetadata(e, { + isApplicationScoped: true + }, this.J.defaultProfile.extensionsResource) : await this.bb(e, t, this.J.defaultProfile.extensionsResource, { + isApplicationScoped: true + }); + this.u.fire([{ + identifier: s.identifier, + operation: 2, + local: s, + profileLocation: this.J.defaultProfile.extensionsResource, + applicationScoped: true + }]); + return s; + } + } + getExtensionsControlManifest() { + const e = new Date().getTime(); + if (!this.m || e - this.n > 300000) { + this.m = this.Y(); + this.n = e; + } + return this.m; + } + registerParticipant(e) { + this.C.push(e); + } + async resetPinnedStateForAllUserExtensions(e) { + try { + await this.O(this.J.profiles.map(async t => { + const s = await this.getInstalled(1, t.extensionsResource); + await this.O(s.map(async n => { + if (n.pinned !== e) { + await this.updateMetadata(n, { + pinned: e + }, t.extensionsResource); + } + })); + })); + } catch (t) { + this.I.error("Error while resetting pinned state for all user extensions", cc(t)); + throw t; + } + } + async L(e) { + const t = new Map(); + const s = new Map(); + const n = []; + const r = (l, c) => `${dYt.create(l).toString()}-${c.toString()}`; + const o = (l, c, u, d) => { + if (!V.isUri(c)) { + if (s.has(`${c.identifier.id.toLowerCase()}-${u.profileLocation.toString()}`)) { + return; + } + const p = this.q.get(r(c, u.profileLocation)); + if (p) { + if (d && this.N(d, p.task)) { + const b = p.task.identifier; + this.I.info("Waiting for already requested installing extension", b.id, d.identifier.id, u.profileLocation.toString()); + p.waitingTasks.push(d); + n.push(de.toPromise(de.filter(this.onDidInstallExtensions, v => v.some(y => Ki(y.identifier, b)))).then(v => { + this.I.info("Finished waiting for already requested installing extension", b.id, d.identifier.id, u.profileLocation.toString()); + if (!v.find(w => Ki(w.identifier, b))?.local) { + throw new Error(`Extension ${b.id} is not installed`); + } + })); + } + return; + } + } + const h = this.$(l, c, u); + const g = `${cv(l.publisher, l.name)}-${u.profileLocation.toString()}`; + s.set(g, { + task: h, + root: d + }); + this.t.fire({ + identifier: h.identifier, + source: c, + profileLocation: u.profileLocation + }); + this.I.info("Installing extension:", h.identifier.id, u); + if (!V.isUri(c)) { + this.q.set(r(c, u.profileLocation), { + task: h, + waitingTasks: [] + }); + } + }; + try { + for (const { + manifest: c, + extension: u, + options: d + } of e) { + const h = d.isApplicationScoped || d.isBuiltin || awe(c); + const g = { + ...d, + installOnlyNewlyAddedFromExtensionPack: d.installOnlyNewlyAddedFromExtensionPack ?? !V.isUri(u), + isApplicationScoped: h, + profileLocation: h ? this.J.defaultProfile.extensionsResource : d.profileLocation ?? this.Z(), + productVersion: d.productVersion ?? { + version: this.g.version, + date: this.g.date, + vscodeVersion: this.g.vscodeVersion + } + }; + const p = V.isUri(u) ? undefined : this.q.get(r(u, g.profileLocation)); + if (p) { + this.I.info("Extension is already requested to install", p.task.identifier.id, g.profileLocation.toString()); + n.push(p.task.waitUntilTaskIsFinished()); + } else { + o(c, u, g, undefined); + } + } + await Promise.all([...s.values()].map(async ({ + task: c + }) => { + if (c.options.donotIncludePackAndDependencies) { + this.I.info("Installing the extension without checking dependencies and pack", c.identifier.id); + } else { + try { + const u = await this.P(c.identifier, c.manifest, !!c.options.installOnlyNewlyAddedFromExtensionPack, !!c.options.installPreReleaseVersion, c.options.profileLocation, c.options.productVersion, V.isUri(c.source) ? undefined : c.source.queryContext); + const d = await this.getInstalled(undefined, c.options.profileLocation, c.options.productVersion); + const h = { + ...c.options, + context: { + ...c.options.context, + [DKt]: true + } + }; + for (const { + gallery: g, + manifest: p + } of Ea(u, ({ + gallery: b + }) => b.identifier.id)) { + if (!d.some(({ + identifier: b + }) => Ki(b, g.identifier))) { + o(p, g, h, c); + } + } + } catch (u) { + if (V.isUri(c.source)) { + if (Ac(c.manifest.extensionDependencies)) { + this.I.warn("Cannot install dependencies of extension:", c.identifier.id, u.message); + } + if (Ac(c.manifest.extensionPack)) { + this.I.warn("Cannot install packed extensions of extension:", c.identifier.id, u.message); + } + } else { + this.I.error("Error while preparing to install dependencies and extension packs of the extension:", c.identifier.id); + throw u; + } + } + } + })); + const l = await this.M([...s.values()].map(({ + task: c + }) => c)); + for (const [c, u] of l) { + o(u.manifest, u.source, { + ...u.options, + profileLocation: c + }, undefined); + } + await this.O([...s.entries()].map(async ([c, { + task: u + }]) => { + const d = new Date().getTime(); + let h; + try { + h = await u.run(); + await this.O(this.C.map(g => g.postInstall(h, u.source, u.options, mt.None)), "PostInstall"); + } catch (g) { + const p = gPe(g); + if (!V.isUri(u.source)) { + d5i(this.G, u.operation === 3 ? "extensionGallery:update" : "extensionGallery:install", { + extensionData: bgt(u.source), + error: p, + source: u.options.context?.[BJ] + }); + } + t.set(c, { + error: p, + identifier: u.identifier, + operation: u.operation, + source: u.source, + context: u.options.context, + profileLocation: u.options.profileLocation, + applicationScoped: u.options.isApplicationScoped + }); + this.I.error("Error while installing the extension", u.identifier.id, cc(p), u.options.profileLocation.toString()); + throw p; + } + if (!V.isUri(u.source)) { + const g = u.operation === 3; + const p = g ? undefined : (new Date().getTime() - u.source.lastUpdated) / 1000; + d5i(this.G, g ? "extensionGallery:update" : "extensionGallery:install", { + extensionData: bgt(u.source), + verificationStatus: u.verificationStatus, + duration: new Date().getTime() - d, + durationSinceUpdate: p, + source: u.options.context?.[BJ] + }); + if (tn && u.operation !== 3) { + try { + await this.F.reportStatistic(h.manifest.publisher, h.manifest.name, h.manifest.version, "install"); + } catch {} + } + } + t.set(c, { + local: h, + identifier: u.identifier, + operation: u.operation, + source: u.source, + context: u.options.context, + profileLocation: u.options.profileLocation, + applicationScoped: h.isApplicationScoped + }); + })); + if (n.length) { + await this.O(n); + } + } catch (l) { + const c = (h, g, p) => { + const b = []; + if (h.manifest.extensionDependencies?.length) { + b.push(...h.manifest.extensionDependencies); + } + if (h.manifest.extensionPack?.length) { + b.push(...h.manifest.extensionPack); + } + for (const v of b) { + if (p.includes(v.toLowerCase())) { + continue; + } + p.push(v.toLowerCase()); + const y = t.get(`${v.toLowerCase()}-${g.toString()}`); + if (y?.local) { + p = c(y.local, g, p); + } + } + return p; + }; + const u = h => ({ + identifier: h.identifier, + operation: 2, + source: h.source, + context: h.options.context, + profileLocation: h.options.profileLocation, + error: l + }); + const d = []; + for (const [h, { + task: g, + root: p + }] of s) { + const b = t.get(h); + if (b) { + if (b.local && p && !t.get(`${p.identifier.id.toLowerCase()}-${g.options.profileLocation.toString()}`)?.local) { + d.push(this.ab(b.local, { + versionOnly: true, + profileLocation: g.options.profileLocation + })); + t.set(h, u(g)); + } + } else { + g.cancel(); + t.set(h, u(g)); + } + } + for (const [h, { + task: g + }] of s) { + const p = t.get(h); + if (!p?.local || g.options.donotIncludePackAndDependencies) { + continue; + } + if (c(p.local, g.options.profileLocation, [p.local.identifier.id.toLowerCase()]).slice(1).some(v => s.has(`${v.toLowerCase()}-${g.options.profileLocation.toString()}`) && !t.get(`${v.toLowerCase()}-${g.options.profileLocation.toString()}`)?.local)) { + d.push(this.ab(p.local, { + versionOnly: true, + profileLocation: g.options.profileLocation + })); + t.set(h, u(g)); + } + } + if (d.length) { + await Promise.allSettled(d.map(async h => { + try { + await h.run(); + this.I.info("Rollback: Uninstalled extension", h.extension.identifier.id); + } catch (g) { + this.I.warn("Rollback: Error while uninstalling extension", h.extension.identifier.id, cc(g)); + } + })); + } + } finally { + for (const { + task: l + } of s.values()) { + if (l.source && !V.isUri(l.source)) { + this.q.delete(r(l.source, l.options.profileLocation)); + } + } + } + const a = [...t.values()]; + for (const l of a) { + if (l.local) { + this.I.info("Extension installed successfully:", l.identifier.id, l.profileLocation.toString()); + } + } + this.u.fire(a); + return a; + } + async M(e) { + const t = []; + const s = new dn(); + for (const n of e) { + if (n.operation === 3 && !n.options.isApplicationScoped && !n.options.pinned && !n.options.installGivenVersion && !V.isUri(n.source)) { + for (const r of this.J.profiles) { + if (this.H.extUri.isEqual(r.extensionsResource, n.options.profileLocation)) { + continue; + } + let o = s.get(r.extensionsResource); + if (!o) { + o = await this.getInstalled(1, r.extensionsResource); + s.set(r.extensionsResource, o); + } + const a = o.find(l => Ki(l.identifier, n.identifier)); + if (a && !a.pinned) { + t.push([r.extensionsResource, n]); + } + } + } + } + return t; + } + N(e, t) { + for (const [, { + task: s, + waitingTasks: n + }] of this.q.entries()) { + if (s === e && (n.includes(t) || n.some(r => this.N(r, t))) || s === t && n[0] && !this.N(e, n[0])) { + return false; + } + } + return true; + } + async O(e, t) { + const s = []; + const n = []; + const r = await Promise.allSettled(e); + for (const a of r) { + if (a.status === "fulfilled") { + s.push(a.value); + } else { + n.push(gPe(a.reason, t)); + } + } + if (!n.length) { + return s; + } + if (n.length === 1) { + throw n[0]; + } + let o = new ey("", "Unknown"); + for (const a of n) { + o = new ey(o.message ? `${o.message}, ${a.message}` : a.message, a.code !== "Unknown" && a.code !== "Internal" ? a.code : o.code); + } + throw o; + } + async P(e, t, s, n, r, o, a) { + if (!this.F.isEnabled()) { + return []; + } + const l = await this.getInstalled(undefined, r, o); + const c = []; + const u = []; + const d = async (h, g) => { + c.push(h); + let p = g.extensionDependencies || []; + if (Sa.modifiedExtensionDependencies !== undefined) { + const v = Sa.modifiedExtensionDependencies; + p = p.map(y => v[y] !== undefined ? v[y] : y); + } + const b = [...p]; + if (g.extensionPack) { + const v = s ? l.find(y => Ki(y.identifier, h)) : undefined; + for (const y of g.extensionPack) { + if (!v || !v.manifest.extensionPack || !v.manifest.extensionPack.some(w => Ki({ + id: w + }, { + id: y + }))) { + if (b.every(w => !Ki({ + id: w + }, { + id: y + }))) { + b.push(y); + } + } + } + } + if (b.length) { + const v = b.filter(y => c.every(w => !Ki(w, { + id: y + }))); + if (v.length) { + const y = await this.F.getExtensions(v.map(w => ({ + id: w, + preRelease: n + })), {}, mt.None, a); + for (const w of y) { + if (c.find(x => Ki(x, w.identifier))) { + continue; + } + const C = p.some(x => Ki({ + id: x + }, w.identifier)); + let S; + try { + S = await this.Q(w, false, n, o); + } catch (x) { + if (C) { + throw x; + } + this.I.info("Skipping the packed extension as it cannot be installed", w.identifier.id, cc(x)); + continue; + } + u.push({ + gallery: S.extension, + manifest: S.manifest + }); + await d(S.extension.identifier, S.manifest); + } + } + } + }; + await d(e, t); + return u; + } + async Q(e, t, s, n) { + let r; + const o = await this.getExtensionsControlManifest(); + if (o.malicious.some(c => Ki(e.identifier, c))) { + throw new ey(f(1807, null, e.identifier.id), "Malicious"); + } + const a = o.deprecated[e.identifier.id.toLowerCase()]; + if (a?.extension?.autoMigrate) { + this.I.info(`The '${e.identifier.id}' extension is deprecated, fetching the compatible '${a.extension.id}' extension instead.`); + r = (await this.F.getExtensions([{ + id: a.extension.id, + preRelease: a.extension.preRelease + }], { + targetPlatform: await this.getTargetPlatform(), + compatible: true, + productVersion: n + }, mt.None))[0]; + if (!r) { + throw new ey(f(1808, null, e.identifier.id, a.extension.id), "Deprecated"); + } + } else { + if ((await this.canInstall(e)) !== true) { + if (toe(e)) { + const u = eqs(e) ?? "Extension is unsupported in Cursor."; + throw new ey(u, "Incompatible"); + } + const c = await this.getTargetPlatform(); + throw new ey(f(1809, null, e.identifier.id, this.g.nameLong, Hft(c)), "IncompatibleTargetPlatform"); + } + r = await this.R(e, t, s, n); + if (!r) { + const c = []; + throw YCe(e.properties.enabledApiProposals ?? [], c) ? !s && e.properties.isPreReleaseVersion && (await this.F.getExtensions([e.identifier], {}, mt.None, e.queryContext))[0] ? new ey(f(1811, null, e.displayName ?? e.identifier.id), "ReleaseVersionNotFound") : new ey(f(1812, null, e.identifier.id, this.g.nameLong, this.g.version, this.g.vscodeVersion), "Incompatible") : new ey(f(1810, null, e.displayName ?? e.identifier.id, c[0]), "IncompatibleApi"); + } + } + this.I.info("Getting Manifest...", r.identifier.id); + const l = await this.F.getManifest(r, mt.None); + if (l === null) { + throw new ey(`Missing manifest for extension ${r.identifier.id}`, "Invalid"); + } + if (l.version !== r.version) { + throw new ey(`Cannot install '${r.identifier.id}' extension because of version mismatch in Marketplace`, "Invalid"); + } + return { + extension: r, + manifest: l + }; + } + async R(e, t, s, n) { + const r = await this.getTargetPlatform(); + let o = null; + if (!t && e.hasPreReleaseVersion && e.properties.isPreReleaseVersion !== s) { + o = (await this.F.getExtensions([{ + ...e.identifier, + preRelease: s + }], { + targetPlatform: r, + compatible: true, + productVersion: n + }, mt.None, e.queryContext)).filter(MW)[0] || null; + } + if (!o && (await this.F.isExtensionCompatible(e, s, r, n))) { + o = e; + } + if (!o) { + if (t) { + o = (await this.F.getExtensions([{ + ...e.identifier, + version: e.version + }], { + targetPlatform: r, + compatible: true, + productVersion: n + }, mt.None, e.queryContext)).filter(MW)[0] || null; + } else { + o = await this.F.getCompatibleExtension(e, s, r, n); + } + } + return o; + } + async uninstallExtensions(e) { + const t = (c, u) => `${c.identifier.id.toLowerCase()}${u.versionOnly ? `-${c.manifest.version}` : ""}@${u.profileLocation.toString()}`; + const s = (c, u) => { + const d = this.ab(c, u); + this.s.set(t(d.extension, u), d); + this.I.info("Uninstalling extension from the profile:", `${c.identifier.id}@${c.manifest.version}`, u.profileLocation.toString()); + this.w.fire({ + identifier: c.identifier, + profileLocation: u.profileLocation, + applicationScoped: c.isApplicationScoped + }); + return d; + }; + const n = (c, u, d) => { + if (d) { + this.I.error("Failed to uninstall extension from the profile:", `${c.identifier.id}@${c.manifest.version}`, u.profileLocation.toString(), d.message); + } else { + this.I.info("Successfully uninstalled extension from the profile", `${c.identifier.id}@${c.manifest.version}`, u.profileLocation.toString()); + } + d5i(this.G, "extensionGallery:uninstall", { + extensionData: wFs(c), + error: d + }); + this.y.fire({ + identifier: c.identifier, + error: d?.code, + profileLocation: u.profileLocation, + applicationScoped: c.isApplicationScoped + }); + }; + const r = []; + const o = []; + const a = []; + const l = new dn(); + for (const { + extension: c, + options: u + } of e) { + const d = { + ...u, + profileLocation: c.isApplicationScoped ? this.J.defaultProfile.extensionsResource : u?.profileLocation ?? this.Z() + }; + const h = this.s.get(t(c, d)); + if (h) { + this.I.info("Extensions is already requested to uninstall", c.identifier.id); + a.push(h.waitUntilTaskIsFinished()); + } else { + r.push(s(c, d)); + } + } + try { + for (const c of r.slice(0)) { + let u = l.get(c.options.profileLocation); + if (!u) { + l.set(c.options.profileLocation, u = await this.getInstalled(1, c.options.profileLocation)); + } + if (c.options.donotIncludePack) { + this.I.info("Uninstalling the extension without including packed extension", `${c.extension.identifier.id}@${c.extension.manifest.version}`); + } else { + const d = this.W(c.extension, u); + for (const h of d) { + if (this.s.has(t(h, c.options))) { + this.I.info("Extensions is already requested to uninstall", h.identifier.id); + } else { + r.push(s(h, c.options)); + } + } + } + if (c.options.donotCheckDependents) { + this.I.info("Uninstalling the extension without checking dependents", `${c.extension.identifier.id}@${c.extension.manifest.version}`); + } else { + this.S(r.map(d => d.extension), u, c.extension); + } + } + await this.O(r.map(async c => { + try { + await c.run(); + await this.O(this.C.map(u => u.postUninstall(c.extension, c.options, mt.None))); + if (c.extension.identifier.uuid) { + try { + await this.F.reportStatistic(c.extension.manifest.publisher, c.extension.manifest.name, c.extension.manifest.version, "uninstall"); + } catch {} + } + } catch (u) { + const d = gPe(u); + n(c.extension, c.options, d); + throw d; + } finally { + o.push(c); + } + })); + if (a.length) { + await this.O(a); + } + for (const c of r) { + n(c.extension, c.options); + } + } catch (c) { + const u = gPe(c); + for (const d of r) { + try { + d.cancel(); + } catch {} + if (!o.includes(d)) { + n(d.extension, d.options, u); + } + } + throw u; + } finally { + for (const c of r) { + if (!this.s.delete(t(c.extension, c.options))) { + this.I.warn("Uninstallation task is not found in the cache", c.extension.identifier.id); + } + } + } + } + S(e, t, s) { + for (const n of e) { + const r = this.X(n, t); + if (r.length) { + const o = r.filter(a => !e.some(l => Ki(l.identifier, a.identifier))); + if (o.length) { + throw new Error(this.U(n, o, s)); + } + } + } + } + U(e, t, s) { + if (s === e) { + if (t.length === 1) { + return f(1813, null, s.manifest.displayName || s.manifest.name, t[0].manifest.displayName || t[0].manifest.name); + } else if (t.length === 2) { + return f(1814, null, s.manifest.displayName || s.manifest.name, t[0].manifest.displayName || t[0].manifest.name, t[1].manifest.displayName || t[1].manifest.name); + } else { + return f(1815, null, s.manifest.displayName || s.manifest.name, t[0].manifest.displayName || t[0].manifest.name, t[1].manifest.displayName || t[1].manifest.name); + } + } else if (t.length === 1) { + return f(1816, null, s.manifest.displayName || s.manifest.name, e.manifest.displayName || e.manifest.name, t[0].manifest.displayName || t[0].manifest.name); + } else if (t.length === 2) { + return f(1817, null, s.manifest.displayName || s.manifest.name, e.manifest.displayName || e.manifest.name, t[0].manifest.displayName || t[0].manifest.name, t[1].manifest.displayName || t[1].manifest.name); + } else { + return f(1818, null, s.manifest.displayName || s.manifest.name, e.manifest.displayName || e.manifest.name, t[0].manifest.displayName || t[0].manifest.name, t[1].manifest.displayName || t[1].manifest.name); + } + } + W(e, t, s = []) { + if (s.indexOf(e) !== -1) { + return []; + } + s.push(e); + const n = e.manifest.extensionPack ? e.manifest.extensionPack : []; + if (n.length) { + const r = t.filter(a => !a.isBuiltin && n.some(l => Ki({ + id: l + }, a.identifier))); + const o = []; + for (const a of r) { + o.push(...this.W(a, t, s)); + } + return [...r, ...o]; + } + return []; + } + X(e, t) { + if (Sa.extensionsWithNoDependents?.includes(e.identifier.id)) { + return []; + } else { + return t.filter(s => s.manifest.extensionDependencies && s.manifest.extensionDependencies.some(n => Ki({ + id: n + }, e.identifier))); + } + } + async Y() { + try { + this.I.trace("ExtensionManagementService.updateControlCache"); + return await this.F.getExtensionsControlManifest(); + } catch (e) { + this.I.trace("ExtensionManagementService.refreshControlCache - failed to get extension control manifest", cc(e)); + return { + malicious: [], + deprecated: {}, + search: [] + }; + } + } +}; +rAn = __decorate([__param(0, vh), __param(1, Ot), __param(2, _s), __param(3, Bt), __param(4, ys), __param(5, gS), __param(6, Ml)], rAn); +function gPe(i, e) { + if (i instanceof ey) { + return i; + } + let t; + if (i instanceof Vse) { + t = new ey(i.message, i.code === "DownloadFailedWriting" ? "DownloadFailedWriting" : "Gallery"); + } else { + t = new ey(i.message, ca(i) ? "Cancelled" : e ?? "Internal"); + } + t.stack = i.stack; + return t; +} +function d5i(i, e, { + extensionData: t, + verificationStatus: s, + duration: n, + error: r, + source: o, + durationSinceUpdate: a +}) { + i.publicLog(e, { + ...t, + source: o, + duration: n, + durationSinceUpdate: a, + success: !r, + errorcode: r?.code, + verificationStatus: s === TKt.Success ? "Verified" : s ?? "Unverified" + }); +} +function y2(i, e) { + e = e || Jpr; + const t = i.manifest; + return { + ...Gpr({ + ...i, + manifest: undefined + }, e), + manifest: t + }; +} +var Oqo = class extends l2t { + get onInstallExtension() { + return this.f.event; + } + get onDidInstallExtensions() { + return this.m.event; + } + get onUninstallExtension() { + return this.n.event; + } + get onDidUninstallExtension() { + return this.q.event; + } + get onDidUpdateExtensionMetadata() { + return this.s.event; + } + constructor(i, e, t) { + super(e, t); + this.t = i; + this.f = this.D(new B()); + this.m = this.D(new B()); + this.n = this.D(new B()); + this.q = this.D(new B()); + this.s = this.D(new B()); + this.D(this.t.listen("onInstallExtension")(s => this.u({ + ...s, + source: this.F(s.source) ? V.revive(s.source) : s.source, + profileLocation: V.revive(s.profileLocation) + }))); + this.D(this.t.listen("onDidInstallExtensions")(s => this.w(s.map(n => ({ + ...n, + local: n.local ? y2(n.local, null) : n.local, + source: this.F(n.source) ? V.revive(n.source) : n.source, + profileLocation: V.revive(n.profileLocation) + }))))); + this.D(this.t.listen("onUninstallExtension")(s => this.y({ + ...s, + profileLocation: V.revive(s.profileLocation) + }))); + this.D(this.t.listen("onDidUninstallExtension")(s => this.z({ + ...s, + profileLocation: V.revive(s.profileLocation) + }))); + this.D(this.t.listen("onDidUpdateExtensionMetadata")(s => this.C({ + profileLocation: V.revive(s.profileLocation), + local: y2(s.local, null) + }))); + } + u(i) { + this.f.fire(i); + } + w(i) { + this.m.fire(i); + } + y(i) { + this.n.fire(i); + } + z(i) { + this.q.fire(i); + } + C(i) { + this.s.fire(i); + } + F(i) { + if (i) { + return typeof i.path == "string" && typeof i.scheme == "string"; + } else { + return false; + } + } + getTargetPlatform() { + this.G ||= this.t.call("getTargetPlatform"); + return this.G; + } + zip(i) { + return Promise.resolve(this.t.call("zip", [i]).then(e => V.revive(e))); + } + install(i, e) { + return Promise.resolve(this.t.call("install", [i, e])).then(t => y2(t, null)); + } + installFromLocation(i, e) { + return Promise.resolve(this.t.call("installFromLocation", [i, e])).then(t => y2(t, null)); + } + async installExtensionsFromProfile(i, e, t) { + return (await this.t.call("installExtensionsFromProfile", [i, e, t])).map(n => y2(n, null)); + } + getManifest(i) { + return Promise.resolve(this.t.call("getManifest", [i])); + } + installFromGallery(i, e) { + return Promise.resolve(this.t.call("installFromGallery", [i, e])).then(t => y2(t, null)); + } + async installGalleryExtensions(i) { + return (await this.t.call("installGalleryExtensions", [i])).map(t => ({ + ...t, + local: t.local ? y2(t.local, null) : t.local, + source: this.F(t.source) ? V.revive(t.source) : t.source, + profileLocation: V.revive(t.profileLocation) + })); + } + uninstall(i, e) { + if (i.isWorkspaceScoped) { + throw new Error("Cannot uninstall a workspace extension"); + } + return Promise.resolve(this.t.call("uninstall", [i, e])); + } + uninstallExtensions(i) { + if (i.some(e => e.extension.isWorkspaceScoped)) { + throw new Error("Cannot uninstall a workspace extension"); + } + return Promise.resolve(this.t.call("uninstallExtensions", [i])); + } + reinstallFromGallery(i) { + return Promise.resolve(this.t.call("reinstallFromGallery", [i])).then(e => y2(e, null)); + } + getInstalled(i = null, e, t) { + return Promise.resolve(this.t.call("getInstalled", [i, e, t])).then(s => s.map(n => y2(n, null))); + } + updateMetadata(i, e, t) { + return Promise.resolve(this.t.call("updateMetadata", [i, e, t])).then(s => y2(s, null)); + } + resetPinnedStateForAllUserExtensions(i) { + return this.t.call("resetPinnedStateForAllUserExtensions", [i]); + } + toggleAppliationScope(i, e) { + return this.t.call("toggleAppliationScope", [i, e]).then(t => y2(t, null)); + } + copyExtensions(i, e) { + return this.t.call("copyExtensions", [i, e]); + } + getExtensionsControlManifest() { + return Promise.resolve(this.t.call("getExtensionsControlManifest")); + } + async download(i, e, t) { + const s = await this.t.call("download", [i, e, t]); + return V.revive(s); + } + async cleanUp() { + return this.t.call("cleanUp"); + } + registerParticipant() { + throw new Error("Not Supported"); + } +}; +pe(); +Jt(); +$i(); +var oAn = class extends Oqo { + get onProfileAwareDidInstallExtensions() { + return this.I.event; + } + get onProfileAwareDidUninstallExtension() { + return this.J.event; + } + get onProfileAwareDidUpdateExtensionMetadata() { + return this.L.event; + } + constructor(i, e, t, s, n) { + super(i, e, t); + this.M = s; + this.N = n; + this.H = this.D(new B()); + this.onDidChangeProfile = this.H.event; + this.I = this.D(new B()); + this.J = this.D(new B()); + this.L = this.D(new B()); + this.D(s.onDidChangeCurrentProfile(r => { + if (!this.N.extUri.isEqual(r.previous.extensionsResource, r.profile.extensionsResource)) { + r.join(this.W(r)); + } + })); + } + async u(i) { + const e = this.Z(i.profileLocation, i.applicationScoped ?? false); + if (e instanceof Promise ? await e : e) { + this.f.fire(i); + } + } + async w(i) { + const e = []; + for (const t of i) { + const s = this.Z(t.profileLocation, t.applicationScoped ?? t.local?.isApplicationScoped ?? false); + if (s instanceof Promise ? await s : s) { + e.push(t); + } + } + if (e.length) { + this.m.fire(e); + } + this.I.fire(i); + } + async y(i) { + const e = this.Z(i.profileLocation, i.applicationScoped ?? false); + if (e instanceof Promise ? await e : e) { + this.n.fire(i); + } + } + async z(i) { + const e = this.Z(i.profileLocation, i.applicationScoped ?? false); + if (e instanceof Promise ? await e : e) { + this.q.fire(i); + } + this.J.fire(i); + } + async C(i) { + const e = this.Z(i.profileLocation, i.local?.isApplicationScoped ?? false); + if (e instanceof Promise ? await e : e) { + this.s.fire(i); + } + this.L.fire(i); + } + async install(i, e) { + e = { + ...e, + profileLocation: await this.Y(e?.profileLocation) + }; + return super.install(i, e); + } + async installFromLocation(i, e) { + return super.installFromLocation(i, await this.Y(e)); + } + async installFromGallery(i, e) { + e = { + ...e, + profileLocation: await this.Y(e?.profileLocation) + }; + return super.installFromGallery(i, e); + } + async installGalleryExtensions(i) { + const e = []; + for (const t of i) { + e.push({ + ...t, + options: { + ...t.options, + profileLocation: await this.Y(t.options?.profileLocation) + } + }); + } + return super.installGalleryExtensions(e); + } + async uninstall(i, e) { + e = { + ...e, + profileLocation: await this.Y(e?.profileLocation) + }; + return super.uninstall(i, e); + } + async uninstallExtensions(i) { + const e = []; + for (const { + extension: t, + options: s + } of i) { + e.push({ + extension: t, + options: { + ...s, + profileLocation: await this.Y(s?.profileLocation) + } + }); + } + return super.uninstallExtensions(e); + } + async getInstalled(i = null, e, t) { + return super.getInstalled(i, await this.Y(e), t); + } + async updateMetadata(i, e, t) { + return super.updateMetadata(i, e, await this.Y(t)); + } + async toggleAppliationScope(i, e) { + return super.toggleAppliationScope(i, await this.Y(e)); + } + async copyExtensions(i, e) { + return super.copyExtensions(await this.Y(i), await this.Y(e)); + } + async W(i) { + const e = await this.Y(i.previous.extensionsResource); + const t = await this.Y(i.profile.extensionsResource); + if (this.N.extUri.isEqual(e, t)) { + return; + } + const s = await this.X(e, t); + this.H.fire(s); + } + async X(i, e, t) { + const s = await this.getInstalled(1, i); + const n = await this.getInstalled(1, e); + if (t?.length) { + const r = []; + for (const o of s) { + if (t.some(a => $r.equals(o.identifier.id, a)) && !n.some(a => $r.equals(a.identifier.id, o.identifier.id))) { + r.push(o.identifier); + } + } + if (r.length) { + await this.installExtensionsFromProfile(r, i, e); + } + } + return RB(s, n, (r, o) => _m(`${$r.toKey(r.identifier.id)}@${r.manifest.version}`, `${$r.toKey(o.identifier.id)}@${o.manifest.version}`)); + } + async Y(i) { + return i ?? this.M.currentProfile.extensionsResource; + } +}; +mu(); +kn(); +Cl(); +var h5i = class extends oAn { + constructor(e, t, s, n, r, o, a) { + super(e, t, s, n, a); + this.$ = r; + this.ab = o; + } + async Z(e, t) { + if (t || !e && this.M.currentProfile.isDefault) { + return true; + } + const s = await this.ab.getRemoteProfile(this.M.currentProfile); + return !!this.N.extUri.isEqual(s.extensionsResource, e); + } + async Y(e) { + if (!e && this.M.currentProfile.isDefault) { + return; + } + e = await super.Y(e); + let t = this.$.profiles.find(s => this.N.extUri.isEqual(s.extensionsResource, e)); + if (t) { + t = await this.ab.getRemoteProfile(t); + } else { + t = (await this.ab.getRemoteProfiles()).find(s => this.N.extUri.isEqual(s.extensionsResource, e)); + } + return t?.extensionsResource; + } + async X(e, t, s) { + const n = await this.ab.getRemoteProfiles(); + const r = n.find(a => this.N.extUri.isEqual(a.extensionsResource, e)); + const o = n.find(a => this.N.extUri.isEqual(a.extensionsResource, t)); + if (r?.id === o?.id) { + return { + added: [], + removed: [] + }; + } else { + return super.X(e, t, s); + } + } +}; +h5i = __decorate([__param(1, ys), __param(2, gS), __param(3, Rc), __param(4, Ml), __param(5, EIt), __param(6, _s)], h5i); +mu(); +Un(); +zt(); +var f5i = class extends h5i { + constructor(e, t, s, n, r, o, a, l, c, u, d, h, g) { + super(e, s, d, n, r, o, a); + this.eb = t; + this.fb = l; + this.gb = c; + this.hb = u; + this.ib = h; + this.jb = g; + } + async install(e, t) { + const s = await super.install(e, t); + await this.ob(s); + return s; + } + async installFromGallery(e, t = {}) { + if (qo(t.donotVerifySignature)) { + t.donotVerifySignature = true; + } + const s = await this.kb(e, t); + await this.ob(s); + return s; + } + async kb(e, t) { + if (this.hb.getValue("remote.downloadExtensionsLocally")) { + return this.lb(e, t); + } + try { + const s = await this.eb.extensionManagementService.getTargetPlatform(); + return await super.installFromGallery(e, { + ...t, + context: { + ...t?.context, + [q$s]: s + } + }); + } catch (s) { + switch (s.name) { + case "Download": + case "DownloadSignature": + case "Gallery": + case "Internal": + case "Unknown": + try { + this.fb.error(`Error while installing '${e.identifier.id}' extension in the remote server.`, ou(s)); + return await this.lb(e, t); + } catch (n) { + this.fb.error(n); + throw n; + } + default: + this.fb.debug("Remote Install Error Name", s.name); + throw s; + } + } + } + async lb(e, t) { + this.fb.info(`Downloading the '${e.identifier.id}' extension locally and install`); + const s = await this.nb(e, !!t.installPreReleaseVersion); + t = { + ...t, + donotIncludePackAndDependencies: true + }; + const n = await this.getInstalled(1, undefined, t.productVersion); + const r = await this.qb(s, mt.None); + if (r.length) { + this.fb.info(`Downloading the workspace dependencies and packed extensions of '${s.identifier.id}' locally and install`); + for (const o of r) { + await this.mb(o, n, t); + } + } + return await this.mb(s, n, t); + } + async mb(e, t, s) { + const n = await this.nb(e, !!s.installPreReleaseVersion); + this.fb.trace("Downloading extension:", n.identifier.id); + const r = await this.eb.extensionManagementService.download(n, t.filter(o => Ki(o.identifier, n.identifier))[0] ? 3 : 2, !!s.donotVerifySignature); + this.fb.info("Downloaded extension:", n.identifier.id, r.path); + try { + const o = await super.install(r, { + ...s, + keepExisting: true + }); + this.fb.info(`Successfully installed '${n.identifier.id}' extension`); + return o; + } finally { + try { + await this.ib.del(r); + } catch (o) { + this.fb.error(o); + } + } + } + async nb(e, t) { + const s = await this.getTargetPlatform(); + let n = null; + if (e.hasPreReleaseVersion && e.properties.isPreReleaseVersion !== t) { + n = (await this.gb.getExtensions([{ + ...e.identifier, + preRelease: t + }], { + targetPlatform: s, + compatible: true + }, mt.None))[0] || null; + } + if (!n && (await this.gb.isExtensionCompatible(e, t, s))) { + n = e; + } + n ||= await this.gb.getCompatibleExtension(e, t, s); + if (!n) { + const r = []; + throw YCe(e.properties.enabledApiProposals ?? [], r) ? !t && e.properties.isPreReleaseVersion && (await this.gb.getExtensions([e.identifier], mt.None))[0] ? new ey(f(12874, null, e.identifier.id), "ReleaseVersionNotFound") : new ey(f(12875, null, e.identifier.id, this.g.nameLong, this.g.version), "Incompatible") : new ey(f(12873, null, e.displayName ?? e.identifier.id, r[0]), "IncompatibleApi"); + } + return n; + } + async ob(e) { + const t = await this.pb(e.manifest, mt.None); + const s = await this.eb.extensionManagementService.getInstalled(); + const n = t.filter(r => s.every(o => !Ki(o.identifier, r.identifier))); + if (n.length) { + this.fb.info(`Installing UI dependencies and packed extensions of '${e.identifier.id}' locally`); + await Ko.settled(n.map(r => this.eb.extensionManagementService.installFromGallery(r))); + } + } + async pb(e, t) { + const s = new Map(); + const n = [...(e.extensionPack || []), ...(e.extensionDependencies || [])]; + await this.rb(n, s, true, t); + return [...s.values()]; + } + async qb(e, t) { + const s = new Map(); + s.set(e.identifier.id.toLowerCase(), e); + const n = await this.gb.getManifest(e, t); + if (n) { + const r = [...(n.extensionPack || []), ...(n.extensionDependencies || [])]; + await this.rb(r, s, false, t); + } + s.delete(e.identifier.id); + return [...s.values()]; + } + async rb(e, t, s, n) { + if (e.length === 0) { + return Promise.resolve(); + } + const r = await this.gb.getExtensions(e.map(l => ({ + id: l + })), n); + const o = await Promise.all(r.map(l => this.gb.getManifest(l, n))); + const a = []; + for (let l = 0; l < r.length; l++) { + const c = r[l]; + const u = o[l]; + if (u && this.jb.prefersExecuteOnUI(u) === s) { + t.set(c.identifier.id.toLowerCase(), c); + a.push(u); + } + } + e = []; + for (const l of a) { + if (Ac(l.extensionDependencies)) { + for (const c of l.extensionDependencies) { + if (!t.has(c.toLowerCase())) { + e.push(c); + } + } + } + if (Ac(l.extensionPack)) { + for (const c of l.extensionPack) { + if (!t.has(c.toLowerCase())) { + e.push(c); + } + } + } + } + return this.rb(e, t, s, n); + } +}; +f5i = __decorate([__param(2, ys), __param(3, Rc), __param(4, Ml), __param(5, EIt), __param(6, _s), __param(7, Bt), __param(8, vh), __param(9, ve), __param(10, gS), __param(11, Ct), __param(12, f0)], f5i); +jn(); +te(); +Cl(); +Un(); +Et(); +At(); +Zt(); +Nt(); +Ps(); +Sl(); +kn(); +var g5i = class extends oAn { + constructor(e, t, s, n, r, o, a, l, c) { + super(e, t, s, n, r); + this.$ = o; + this.ab = a; + this.bb = l; + this.cb = c; + } + Z(e, t) { + return t || this.N.extUri.isEqual(this.M.currentProfile.extensionsResource, e); + } + async install(e, t) { + const { + location: s, + cleanup: n + } = await this.eb(e); + try { + return await super.install(s, t); + } finally { + await n(); + } + } + async eb(e) { + if (e.scheme === me.file) { + return { + location: e, + async cleanup() {} + }; + } + this.cb.trace("Downloading extension from", e.toString()); + const t = Li(this.bb.extensionsDownloadLocation, Ft()); + await this.ab.download(e, t); + this.cb.info("Downloaded extension to", t.toString()); + return { + location: t, + cleanup: async () => { + try { + await this.$.del(t); + } catch (n) { + this.cb.error(n); + } + } + }; + } + async X(e, t, s) { + if (this.bb.remoteAuthority) { + const r = (await this.getInstalled(1, e)).find(o => HKt(o.manifest, this.bb.remoteAuthority)); + if (r) { + s ||= []; + s.push(new $r(r.identifier.id)); + } + } + return super.X(e, t, s); + } +}; +g5i = __decorate([__param(1, ys), __param(2, gS), __param(3, Rc), __param(4, _s), __param(5, Ct), __param(6, fle), __param(7, gu), __param(8, Bt)], g5i); +q(); +var p5i = class extends H { + constructor(e, t, s, n) { + super(); + this.remoteExtensionManagementServer = null; + this.webExtensionManagementServer = null; + const r = this.D(n.createInstance(g5i, e.getChannel("extensions"))); + this.localExtensionManagementServer = { + extensionManagementService: r, + id: "local", + label: f(12871, null) + }; + const o = t.getConnection(); + if (o) { + const a = n.createInstance(f5i, o.getChannel("extensions"), this.localExtensionManagementServer); + this.remoteExtensionManagementServer = { + id: "remote", + extensionManagementService: a, + get label() { + return s.getHostLabel(me.vscodeRemote, o.remoteAuthority) || f(12872, null); + } + }; + } + } + getExtensionManagementServer(e) { + if (e.location.scheme === me.file) { + return this.localExtensionManagementServer; + } + if (this.remoteExtensionManagementServer && e.location.scheme === me.vscodeRemote) { + return this.remoteExtensionManagementServer; + } + throw new Error(`Invalid Extension ${e.location}`); + } + getExtensionInstallLocation(e) { + if (this.getExtensionManagementServer(e) === this.remoteExtensionManagementServer) { + return 2; + } else { + return 1; + } + } +}; +p5i = __decorate([__param(0, b3), __param(1, al), __param(2, Zs), __param(3, re)], p5i); +it(rm, p5i, 1); +It(); +Cl(); +Jt(); +q(); +Et(); +Le(); +Nt(); +kn(); +nt(); +pe(); +pn(); +rt(); +hx(); +kd(); +var m5i = class extends H { + constructor(e, t) { + super(); + this.b = e; + this.c = t; + this.a = new Map(); + if (this.c.configBasedExtensionTips) { + Object.entries(this.c.configBasedExtensionTips).forEach(([, s]) => this.a.set(s.configPath, s)); + } + } + getConfigBasedTips(e) { + return this.f(e); + } + async getImportantExecutableBasedTips() { + return []; + } + async getOtherExecutableBasedTips() { + return []; + } + async f(e) { + const t = []; + for (const [s, n] of this.a) { + if (!n.configScheme || n.configScheme === e.scheme) { + try { + const r = (await this.b.readFile(Li(e, s))).value.toString(); + for (const [o, a] of Object.entries(n.recommendations)) { + if (!a.contentPattern || new RegExp(a.contentPattern, "mig").test(r)) { + t.push({ + extensionId: o, + extensionName: a.name, + configName: n.configName, + important: !!a.important, + isExtensionPack: !!a.isExtensionPack, + whenNotInstalled: a.whenNotInstalled + }); + } + } + } catch {} + } + } + return t; + } +}; +m5i = __decorate([__param(0, Ct), __param(1, ys)], m5i); +Nt(); +kn(); +At(); +var b5i = class extends m5i { + constructor(e, t, s) { + super(e, t); + this.g = s.getChannel("extensionTipsService"); + } + getConfigBasedTips(e) { + if (e.scheme === me.file) { + return this.g.call("getConfigBasedTips", [e]); + } else { + return super.getConfigBasedTips(e); + } + } + getImportantExecutableBasedTips() { + return this.g.call("getImportantExecutableBasedTips"); + } + getOtherExecutableBasedTips() { + return this.g.call("getOtherExecutableBasedTips"); + } +}; +b5i = __decorate([__param(0, Ct), __param(1, ys), __param(2, b3)], b5i); +it(jft, b5i, 1); +pe(); +q(); +Le(); +mu(); +var v5i = class extends H { + get status() { + return this.b; + } + get onDidChangeLocal() { + return this.a.listen("onDidChangeLocal"); + } + get conflicts() { + return this.f; + } + get lastSyncTime() { + return this.h; + } + get onDidResetLocal() { + return this.a.listen("onDidResetLocal"); + } + get onDidResetRemote() { + return this.a.listen("onDidResetRemote"); + } + constructor(e, t) { + super(); + this.n = t; + this.b = "uninitialized"; + this.c = this.D(new B()); + this.onDidChangeStatus = this.c.event; + this.f = []; + this.g = this.D(new B()); + this.onDidChangeConflicts = this.g.event; + this.h = undefined; + this.j = this.D(new B()); + this.onDidChangeLastSyncTime = this.j.event; + this.m = this.D(new B()); + this.onSyncErrors = this.m.event; + this.a = { + call(s, n, r) { + return e.call(s, n, r).then(null, o => { + throw kC.toUserDataSyncError(o); + }); + }, + listen(s, n) { + return e.listen(s, n); + } + }; + this.a.call("_getInitialData").then(([s, n, r]) => { + this.q(s); + this.s(n); + if (r) { + this.t(r); + } + this.D(this.a.listen("onDidChangeStatus")(o => this.q(o))); + this.D(this.a.listen("onDidChangeLastSyncTime")(o => this.t(o))); + }); + this.D(this.a.listen("onDidChangeConflicts")(s => this.s(s))); + this.D(this.a.listen("onSyncErrors")(s => this.m.fire(s.map(n => ({ + ...n, + error: kC.toUserDataSyncError(n.error) + }))))); + } + createSyncTask() { + throw new Error("not supported"); + } + async createManualSyncTask() { + const e = await this.a.call("createManualSyncTask"); + const t = this; + return new _qo(e, { + async call(n, r, o) { + return t.a.call(`manualSync/${n}`, [e, ...(Array.isArray(r) ? r : [r])], o); + }, + listen() { + throw new Error("not supported"); + } + }); + } + reset() { + return this.a.call("reset"); + } + resetRemote() { + return this.a.call("resetRemote"); + } + resetLocal() { + return this.a.call("resetLocal"); + } + hasPreviouslySynced() { + return this.a.call("hasPreviouslySynced"); + } + hasLocalData() { + return this.a.call("hasLocalData"); + } + accept(e, t, s, n) { + return this.a.call("accept", [e, t, s, n]); + } + resolveContent(e) { + return this.a.call("resolveContent", [e]); + } + cleanUpRemoteData() { + return this.a.call("cleanUpRemoteData"); + } + replace(e) { + return this.a.call("replace", [e]); + } + saveRemoteActivityData(e) { + return this.a.call("getRemoteActivityData", [e]); + } + extractActivityData(e, t) { + return this.a.call("extractActivityData", [e, t]); + } + async q(e) { + this.b = e; + this.c.fire(e); + } + async s(e) { + this.f = e.map(t => ({ + syncResource: t.syncResource, + profile: jI(t.profile, this.n.profilesHome.scheme), + conflicts: t.conflicts.map(s => ({ + ...s, + baseResource: V.revive(s.baseResource), + localResource: V.revive(s.localResource), + remoteResource: V.revive(s.remoteResource), + previewResource: V.revive(s.previewResource) + })) + })); + this.g.fire(this.f); + } + t(e) { + if (this.h !== e) { + this.h = e; + this.j.fire(e); + } + } +}; +v5i = __decorate([__param(1, Ml)], v5i); +var _qo = class extends H { + constructor(i, e) { + super(); + this.id = i; + this.a = e; + } + async merge() { + return this.a.call("merge"); + } + async apply() { + return this.a.call("apply"); + } + stop() { + return this.a.call("stop"); + } + dispose() { + this.a.call("dispose"); + super.dispose(); + } +}; +pe(); +q(); +Le(); +Me(); +kn(); +qt(); +var Bqo = class extends H { + get account() { + return this.a; + } + get onTokenFailed() { + return this.c.listen("onTokenFailed"); + } + constructor(i) { + super(); + this.c = i; + this.b = this.D(new B()); + this.onDidChangeAccount = this.b.event; + this.c.call("_getInitialData").then(e => { + this.a = e; + this.D(this.c.listen("onDidChangeAccount")(t => { + this.a = t; + this.b.fire(t); + })); + }); + } + updateAccount(i) { + return this.c.call("updateAccount", i); + } +}; +var y5i = class extends LIt { + constructor(e, t, s, n) { + super(t, s, n); + this.n = e; + this.D(this.n.listen("onDidChangeUserDataSyncStore")(() => this.j())); + } + async switch(e) { + return this.n.call("switch", [e]); + } + async getPreviousUserDataSyncStore() { + const e = await this.n.call("getPreviousUserDataSyncStore"); + return this.q(e); + } + q(e) { + return { + url: V.revive(e.url), + type: e.type, + defaultUrl: V.revive(e.defaultUrl), + insidersUrl: V.revive(e.insidersUrl), + stableUrl: V.revive(e.stableUrl), + canSwitch: e.canSwitch, + authenticationProviders: e.authenticationProviders + }; + } +}; +y5i = __decorate([__param(1, ys), __param(2, ve), __param(3, ht)], y5i); +YN(SP, "userDataSync", { + channelClientCtor: v5i +}); +YN(pyt, "IUserDataSyncResourceProviderService"); +YN(LEe, "userDataSyncMachines"); +YN(c0i, "userDataSyncAccount", { + channelClientCtor: Bqo +}); +YN(uK, "userDataSyncStoreManagement", { + channelClientCtor: y5i +}); +pe(); +It(); +var w5i = class { + get onError() { + return de.map(this.a.listen("onError"), e => kC.toUserDataSyncError(e)); + } + constructor(e) { + this.a = e.getChannel("userDataAutoSync"); + } + triggerSync(e, t, s) { + return this.a.call("triggerSync", [e, t, s]); + } + turnOn() { + return this.a.call("turnOn"); + } + turnOff(e) { + return this.a.call("turnOff", [e]); + } +}; +w5i = __decorate([__param(0, b3)], w5i); +it(I6, w5i, 1); +ii(); +rn(); +da(); +vt(); +Ho(); +ai(); +It(); +kn(); +qt(); +Wf(); +var C5i = class extends vmi { + constructor(e, t, s, n, r, o, a, l, c, u, d, h, g) { + super(s, n, r, o, a, l, c, u, d); + this.x = e; + this.y = t; + this.z = h; + this.A = g; + this.setPerformanceMarks("main", t.window.perfMarks); + } + t() { + return !!this.y.window.isInitialStartup; + } + u() { + return Uqo(this.z, this.A, this.y); + } + v() { + return this.x.getWindowCount(); + } + async w(e) { + try { + const [t, s, n, r] = await Promise.all([this.x.getOSProperties(), this.x.getOSStatistics(), this.x.getOSVirtualMachineHint(), this.x.isRunningUnderARM64Translation()]); + e.totalmem = s.totalmem; + e.freemem = s.freemem; + e.platform = t.platform; + e.release = t.release; + e.arch = t.arch; + e.loadavg = s.loadavg; + e.isARM64Emulated = r; + const o = await mD.getProcessMemoryInfo(); + e.meminfo = { + workingSetSize: o.residentSet, + privateBytes: o.private, + sharedBytes: o.shared + }; + e.isVMLikelyhood = Math.round(n * 100); + const a = t.cpus; + if (a && a.length > 0) { + e.cpus = { + count: a.length, + speed: a[0].speed, + model: a[0].model + }; + } + } catch {} + } + q() { + return super.q() || !!this.y.args["prof-append-timers"]; + } +}; +C5i = __decorate([__param(0, po), __param(1, gu), __param(2, Yo), __param(3, kt), __param(4, Ks), __param(5, TS), __param(6, Id), __param(7, Te), __param(8, na), __param(9, Ot), __param(10, lr), __param(11, ys), __param(12, ht)], C5i); +it(p8, C5i, 1); +var aAn = "perf/lastRunningCommit"; +var pPe = undefined; +function Uqo(i, e, t) { + if (typeof pPe != "boolean") { + if (!t.window.isCodeCaching || !i.commit) { + pPe = false; + } else if (e.get(aAn, -1) === i.commit) { + pPe = true; + } else { + e.store(aAn, i.commit, -1, 1); + pPe = false; + } + } + return pPe; +} +X(); +Wa(); +Le(); +da(); +kn(); +Wi(); +qt(); +It(); +gs(); +At(); +te(); +var lAn = Ve("checksumService"); +Zt(); +var c2t; +var Wqo = class nUi { + static { + this.a = "integrityService"; + } + constructor(e) { + this.c = e; + this.b = this.d(); + } + d() { + const e = this.c.get(nUi.a, -1); + if (!e) { + return null; + } + try { + return JSON.parse(e); + } catch { + return null; + } + } + get() { + return this.b; + } + set(e) { + this.b = e; + this.c.store(nUi.a, JSON.stringify(this.b), -1, 1); + } +}; +var S5i = c2t = class { + isPure() { + return this.b; + } + constructor(e, t, s, n, r, o, a) { + this.c = e; + this.d = t; + this.e = s; + this.f = n; + this.g = r; + this.h = o; + this.j = a; + this.a = new Wqo(this.d); + this.b = this.l(); + this.k(); + } + async k() { + const { + isPure: e + } = await this.isPure(); + if (e) { + return; + } + this.j.warn(` + +---------------------------------------------- +*** Installation has been modified on disk *** +---------------------------------------------- + +`); + const t = this.a.get(); + if (!t?.dontShowPrompt || t.commit !== this.g.commit) { + this.o(); + } + } + async l() { + const e = this.g.checksums || {}; + await this.e.when(4); + const t = await Promise.all(Object.keys(e).map(n => this.m(n, e[n]))); + let s = true; + for (let n = 0, r = t.length; n < r; n++) { + if (!t[n].isPure) { + s = false; + break; + } + } + return { + isPure: s, + proof: t + }; + } + async m(e, t) { + const s = Na.asFileUri(e); + try { + const n = await this.h.checksum(s); + return c2t.n(s, n, t); + } catch { + return c2t.n(s, "", t); + } + } + static n(e, t, s) { + return { + uri: e, + actual: t, + expected: s, + isPure: t === s + }; + } + o() { + const e = this.g.checksumFailMoreInfoUrl; + const t = f(13038, null, this.g.nameShort); + if (e) { + this.c.prompt(cs.Warning, t, [{ + label: f(13039, null), + run: () => this.f.open(V.parse(e)) + }, { + label: f(13040, null), + isSecondary: true, + run: () => this.a.set({ + dontShowPrompt: true, + commit: this.g.commit + }) + }], { + sticky: true, + priority: Ru.URGENT + }); + } else { + this.c.notify({ + severity: cs.Warning, + message: t, + sticky: true, + priority: Ru.URGENT + }); + } + } +}; +S5i = c2t = __decorate([__param(0, ni), __param(1, ht), __param(2, Yo), __param(3, os), __param(4, ys), __param(5, lAn), __param(6, Bt)], S5i); +it(RBi, S5i, 1); +X(); +Le(); +It(); +Nt(); +Zt(); +da(); +X(); +Th(); +da(); +fn(); +ii(); +rt(); +Nt(); +q(); +ri(); +nt(); +var Vqo = class u3n extends H { + constructor(e, t, s, n, r, o, a, l) { + super(); + this.a = e; + this.b = t; + this.c = s; + this.f = n; + this.g = r; + this.h = o; + this.j = a; + this.m = l; + this.t = new Map(); + this.u = new Map(); + this.w = false; + this.Q = new Set(); + this.R = this.W(); + this.S = false; + for (const c of this.b.modifiedWorkingCopies) { + this.y(c); + } + this.n(); + } + n() { + this.D(this.b.onDidRegister(e => this.y(e))); + this.D(this.b.onDidUnregister(e => this.z(e))); + this.D(this.b.onDidChangeDirty(e => this.C(e))); + this.D(this.b.onDidChangeContent(e => this.F(e))); + this.D(this.f.onBeforeShutdown(e => e.finalVeto(() => this.q(e.reason), "veto.backups"))); + this.D(this.f.onWillShutdown(() => this.r())); + this.D(this.h.onDidRegisterHandler(e => this.X(e))); + } + r() { + this.O(); + this.P(); + } + static { + this.s = { + default: 1000, + delayed: 2000 + }; + } + y(e) { + if (this.w) { + this.c.warn("[backup tracker] suspended, ignoring register event", e.resource.toString(), e.typeId); + return; + } + if (e.isModified()) { + this.G(e); + } + } + z(e) { + this.t.delete(e); + if (this.w) { + this.c.warn("[backup tracker] suspended, ignoring unregister event", e.resource.toString(), e.typeId); + return; + } + this.J(e); + } + C(e) { + if (this.w) { + this.c.warn("[backup tracker] suspended, ignoring dirty change event", e.resource.toString(), e.typeId); + return; + } + if (e.isDirty()) { + this.G(e); + } else { + this.J(e); + } + } + F(e) { + const t = this.I(e); + this.t.set(e, t + 1); + if (this.w) { + this.c.warn("[backup tracker] suspended, ignoring content change event", e.resource.toString(), e.typeId); + return; + } + if (e.isModified()) { + this.G(e); + } + } + G(e) { + this.M(e); + this.c.trace("[backup tracker] scheduling backup", e.resource.toString(), e.typeId); + const t = { + resource: e.resource, + typeId: e.typeId + }; + const s = new Xi(); + const n = setTimeout(async () => { + if (!s.token.isCancellationRequested) { + if (e.isModified()) { + this.c.trace("[backup tracker] creating backup", e.resource.toString(), e.typeId); + try { + const r = await e.backup(s.token); + if (s.token.isCancellationRequested) { + return; + } + if (e.isModified()) { + this.c.trace("[backup tracker] storing backup", e.resource.toString(), e.typeId); + await this.a.backup(e, r.content, this.I(e), r.meta, s.token); + } + } catch (r) { + this.c.error(r); + } + } + if (!s.token.isCancellationRequested) { + this.N(t); + } + } + }, this.H(e)); + this.u.set(t, { + cancel: () => { + this.c.trace("[backup tracker] clearing pending backup creation", e.resource.toString(), e.typeId); + s.cancel(); + }, + disposable: Ue(() => { + s.dispose(); + clearTimeout(n); + }) + }); + } + H(e) { + if (typeof e.backupDelay == "number") { + return e.backupDelay; + } + let t; + if (e.capabilities & 2) { + t = "default"; + } else { + t = this.g.hasShortAutoSaveDelay(e.resource) ? "delayed" : "default"; + } + return u3n.s[t]; + } + I(e) { + return this.t.get(e) || 0; + } + J(e) { + this.M(e); + const t = { + resource: e.resource, + typeId: e.typeId + }; + const s = new Xi(); + this.L(t, s); + this.u.set(t, { + cancel: () => { + this.c.trace("[backup tracker] clearing pending backup discard", e.resource.toString(), e.typeId); + s.cancel(); + }, + disposable: s + }); + } + async L(e, t) { + this.c.trace("[backup tracker] discarding backup", e.resource.toString(), e.typeId); + try { + await this.a.discardBackup(e, t.token); + } catch (s) { + this.c.error(s); + } + if (!t.token.isCancellationRequested) { + this.N(e); + } + } + M(e) { + let t; + for (const [s] of this.u) { + if (s.resource.toString() === e.resource.toString() && s.typeId === e.typeId) { + t = s; + break; + } + } + if (t) { + this.N(t, { + cancel: true + }); + } + } + N(e, t) { + const s = this.u.get(e); + if (s) { + if (t?.cancel) { + s.cancel(); + } + s.disposable.dispose(); + this.u.delete(e); + } + } + O() { + for (const [, e] of this.u) { + e.cancel(); + e.disposable.dispose(); + } + this.u.clear(); + } + P() { + this.w = true; + return { + resume: () => this.w = false + }; + } + get U() { + return this.S; + } + async W() { + await this.f.when(3); + for (const e of await this.a.getBackups()) { + this.Q.add(e); + } + this.S = true; + } + async X(e) { + await this.R; + const t = new Set(); + const s = new Set(); + const n = new Set(); + for (const r of this.Q) { + if (!(await e.handles(r))) { + continue; + } + let a = false; + for (const { + editor: l + } of this.j.getEditors(0)) { + if (e.isOpen(r, l)) { + t.add(l); + a = true; + } + } + if (!a) { + s.add(await e.createEditor(r)); + } + n.add(r); + } + if (s.size > 0) { + await this.m.activeGroup.openEditors([...s].map(r => ({ + editor: r, + options: { + pinned: true, + preserveFocus: true, + inactive: true + } + }))); + for (const r of s) { + t.add(r); + } + } + await Ko.settled([...t].map(async r => { + if (!this.j.isVisible(r)) { + return r.resolve(); + } + })); + for (const r of n) { + this.Q.delete(r); + } + } +}; +Zt(); +vt(); +Aa(); +ri(); +so(); +nt(); +ar(); +var u2t = class extends Vqo { + static { + this.ID = "workbench.contrib.nativeWorkingCopyBackupTracker"; + } + constructor(e, t, s, n, r, o, a, l, c, u, d, h, g, p) { + super(e, s, c, n, t, h, g, p); + this.Y = r; + this.Z = o; + this.$ = a; + this.ab = l; + this.bb = u; + this.cb = d; + } + async q(e) { + this.O(); + const { + resume: t + } = this.P(); + try { + const s = this.b.modifiedWorkingCopies; + if (s.length) { + return await this.eb(e, s); + } else { + return await this.nb(); + } + } finally { + t(); + } + } + async eb(e, t) { + const s = t.filter(n => !(n.capabilities & 2) && this.g.getAutoSaveMode(n.resource).mode !== 0); + if (s.length > 0) { + try { + await this.lb(s, 2); + } catch (r) { + this.c.error(`[backup tracker] error saving modified working copies: ${r}`); + } + const n = this.b.modifiedWorkingCopies; + if (n.length) { + return this.fb(n, e); + } else { + return this.ob([...t]); + } + } + return this.fb(t, e); + } + async fb(e, t) { + let s = []; + let n; + const r = await this.gb(t, e); + if (r.length > 0) { + try { + const a = await this.jb(r); + s = a.backups; + n = a.error; + if (s.length === e.length) { + return false; + } + } catch (a) { + n = a; + } + } + const o = e.filter(a => !s.includes(a)); + if (n) { + if (this.bb.isExtensionDevelopment) { + this.c.error(`[backup tracker] error creating backups: ${n}`); + return false; + } else { + return this.hb(f(13721, null), o, n, t); + } + } + try { + return await this.kb(o); + } catch (a) { + if (this.bb.isExtensionDevelopment) { + this.c.error(`[backup tracker] error saving or reverting modified working copies: ${a}`); + return false; + } else { + return this.hb(f(13722, null), o, a, t); + } + } + } + async gb(e, t) { + if (!this.g.isHotExitEnabled) { + return []; + } + if (this.bb.isExtensionDevelopment) { + return t; + } + switch (e) { + case 1: + if (this.$.getWorkbenchState() !== 1 && this.g.hotExitConfiguration === K0.ON_EXIT_AND_WINDOW_CLOSE) { + return t; + } else if (Gt || (await this.ab.getWindowCount()) > 1) { + if (this.$.getWorkbenchState() !== 1) { + return t.filter(s => s.capabilities & 4); + } else { + return []; + } + } else { + return t; + } + case 2: + return t; + case 3: + return t; + case 4: + if (this.$.getWorkbenchState() !== 1) { + if (this.g.hotExitConfiguration === K0.ON_EXIT_AND_WINDOW_CLOSE) { + return t; + } else { + return t.filter(s => s.capabilities & 4); + } + } else { + return []; + } + } + } + async hb(e, t, s, n) { + this.c.error(`[backup tracker] ${e}: ${s}`); + const r = t.filter(c => c.isModified()); + const o = f(13723, null); + const a = r.length ? `${nR(r.map(c => c.name))} +${o}` : o; + const { + result: l + } = await this.Z.prompt({ + type: "error", + message: e, + detail: a, + buttons: [{ + label: f(13724, null), + run: () => true + }, { + label: this.ib(n), + run: () => false + }] + }); + return l ?? true; + } + ib(e) { + switch (e) { + case 1: + case 4: + return f(13725, null); + case 2: + return f(13726, null); + case 3: + return f(13727, null); + } + } + async jb(e) { + const t = []; + let s; + await this.qb(async n => { + try { + await Ko.settled(e.map(async r => { + const o = this.I(r); + if (this.a.hasBackupSync(r, o)) { + t.push(r); + } else { + const a = await r.backup(n); + if (n.isCancellationRequested || (await this.a.backup(r, a.content, o, a.meta, n), n.isCancellationRequested)) { + return; + } + t.push(r); + } + })); + } catch (r) { + s = r; + } + }, f(13728, null), f(13729, null)); + return { + backups: t, + error: s + }; + } + async kb(e) { + const t = await this.Y.showSaveConfirm(e.map(s => s.name)); + if (t === 0) { + const s = this.b.modifiedCount; + try { + await this.lb(e, 1); + } catch (r) { + this.c.error(`[backup tracker] error saving modified working copies: ${r}`); + } + if (s - this.b.modifiedCount < e.length) { + return true; + } else { + return this.ob(e); + } + } else if (t === 1) { + try { + await this.mb(e); + } catch (s) { + this.c.error(`[backup tracker] error reverting modified working copies: ${s}`); + } + return this.ob(e); + } + return true; + } + lb(e, t) { + return this.qb(async () => { + const s = { + skipSaveParticipants: true, + reason: t + }; + let n; + if (e.length === this.b.modifiedCount) { + n = (await this.j.saveAll({ + includeUntitled: { + includeScratchpad: true + }, + ...s + })).success; + } + if (n !== false) { + await Ko.settled(e.map(r => r.isModified() ? r.save(s) : Promise.resolve(true))); + } + }, f(13730, null), undefined, e.some(s => s.capabilities & 2 || s.capabilities & 4) ? 10 : 20); + } + mb(e) { + return this.qb(async () => { + const t = { + soft: true + }; + if (e.length === this.b.modifiedCount) { + await this.j.revertAll(t); + } + await Ko.settled(e.map(s => s.isModified() ? s.revert(t) : Promise.resolve())); + }, f(13731, null)); + } + nb() { + return this.ob({ + except: this.$.getWorkbenchState() === 1 ? [] : Array.from(this.Q) + }); + } + async ob(e) { + await this.pb(e); + return false; + } + async pb(e) { + if (this.U) { + await this.qb(async () => { + try { + if (Array.isArray(e)) { + await Ko.settled(e.map(t => this.a.discardBackup(t))); + } else { + await this.a.discardBackups(e); + } + } catch (t) { + this.c.error(`[backup tracker] error discarding backups: ${t}`); + } + }, f(13732, null)); + } + } + qb(e, t, s, n = 20) { + const r = new Xi(); + return this.cb.withProgress({ + location: n, + cancellable: true, + delay: 800, + title: t, + detail: s + }, () => mm(e(r.token), r.token), () => r.dispose(true)); + } +}; +u2t = __decorate([__param(0, LS), __param(1, ld), __param(2, Tp), __param(3, Yo), __param(4, Xl), __param(5, Js), __param(6, kt), __param(7, po), __param(8, Bt), __param(9, pa), __param(10, ra), __param(11, zP), __param(12, Te), __param(13, Hi)], u2t); +var x5i = class extends e2t { + constructor(e, t, s, n) { + super(e.backupPath ? V.file(e.backupPath).with({ + scheme: e.userRoamingDataHome.scheme + }) : undefined, t, s); + this.c = n; + this.j(); + } + j() { + this.D(this.c.onWillShutdown(e => e.join(this.joinBackups(), { + id: "join.workingCopyBackups", + label: f(13720, null) + }))); + } +}; +x5i = __decorate([__param(0, gu), __param(1, Ct), __param(2, Bt), __param(3, Yo)], x5i); +it(LS, x5i, 0); +Yn(u2t.ID, u2t, 1); +YN(lAn, "checksum"); +te(); +var k5i = Ve("sharedProcessTunnelService"); +var Hqo = "sharedProcessTunnel"; +YN(k5i, Hqo); +Zt(); +Rr(); +It(); +q(); +da(); +te(); +rt(); +Me(); +var E5i = class extends H { + constructor(e, t, s, n, r, o, a, l, c) { + super(); + this.a = e; + this.b = t; + this.tunnelRemoteHost = s; + this.tunnelRemotePort = n; + this.tunnelLocalPort = r; + this.localAddress = o; + this.c = a; + this.f = l; + this.g = c; + this.privacy = Ck.Private; + this.protocol = undefined; + this.h(); + this.D(this.g.onDidChangeConnectionData(() => this.h())); + } + h() { + this.b.getAddress().then(e => { + this.f.setAddress(this.a, e); + }); + } + async dispose() { + this.c(); + super.dispose(); + await this.f.destroyTunnel(this.a); + } +}; +E5i = __decorate([__param(7, k5i), __param(8, hv)], E5i); +var I5i = class extends Svi { + constructor(e, t, s, n, r, o, a) { + super(e, a); + this.I = t; + this.J = s; + this.L = n; + this.M = o; + this.H = new Set(); + this.D(r.onDidShutdown(() => { + this.H.forEach(l => { + this.J.destroyTunnel(l); + }); + })); + } + isPortPrivileged(e) { + return seo(e, this.s, Ia, this.M.os.release); + } + F(e, t, s, n, r, o, a, l) { + const c = this.C(t, s); + if (c) { + ++c.refcount; + return c.value; + } + if (teo(e)) { + return this.G(e, t, s, r, o, a, l); + } + { + this.q.trace(`ForwardedPorts: (TunnelService) Creating tunnel without provider ${t}:${s} on local port ${r}.`); + const u = this.O(e, t, s, n, r, o); + this.q.trace("ForwardedPorts: (TunnelService) Tunnel created without provider."); + this.y(t, s, u); + return u; + } + } + async O(e, t, s, n, r, o) { + const { + id: a + } = await this.J.createTunnel(); + this.H.add(a); + const l = this.I.remoteAuthority; + const c = await this.J.startTunnel(l, a, t, s, n, r, o); + return this.L.createInstance(E5i, a, e, t, s, c.tunnelLocalPort, c.localAddress, () => { + this.H.delete(a); + }); + } + canTunnel(e) { + return super.canTunnel(e) && !!this.I.remoteAuthority; + } +}; +I5i = __decorate([__param(0, Bt), __param(1, Wn), __param(2, k5i), __param(3, re), __param(4, Yo), __param(5, gu), __param(6, ve)], I5i); +it(by, I5i, 1); +YN(gCi, "diagnostics"); +pn(); +te(); +var cAn = Ve("IV8InspectProfilingService"); +var mPe; +(function (i) { + function e(s) { + return !!s.samples && !!s.timeDeltas; + } + i.isValidProfile = e; + function t(s, n = "noAbsolutePaths") { + for (const r of s.nodes) { + if (r.callFrame && r.callFrame.url && (HC(r.callFrame.url) || /^\w[\w\d+.-]*:\/\/\/?/.test(r.callFrame.url))) { + r.callFrame.url = id(n, ir(r.callFrame.url)); + } + } + return s; + } + i.rewriteAbsolutePaths = t; +})(mPe ||= {}); +YN(cAn, "v8InspectProfiling"); +ai(); +YN(z6t, "customEndpointTelemetry"); +te(); +X(); +var uAn = Ve("IRemoteTunnelService"); +var qqo = { + active: false +}; +var dAn; +(function (i) { + i.disconnected = e => ({ + type: "disconnected", + onTokenFailed: e + }); + i.connected = (e, t) => ({ + type: "connected", + info: e, + serviceInstallFailed: t + }); + i.connecting = e => ({ + type: "connecting", + progress: e + }); + i.uninitialized = { + type: "uninitialized" + }; +})(dAn ||= {}); +var D5i = "remote.tunnels.access"; +var jqo = D5i + ".hostNameOverride"; +var zqo = D5i + ".preventSleep"; +var T5i = "remoteTunnelService"; +var Jqo = f(2093, null); +YN(uAn, "remoteTunnel"); +te(); +var Gqo = Ve("continuousProfilingMainService"); +var d2t = Ve("continuousProfilingService"); +v2(Gqo, "continuousProfiling"); +X(); +zb(); +At(); +Le(); +Nt(); +It(); +rt(); +jn(); +var P5i = class { + constructor(e, t, s, n, r) { + this.a = e; + this.b = t; + this.c = s; + this.d = n; + this.e = r; + } + isSupported(e) { + return e.scheme === me.file; + } + async writeFileElevated(e, t, s) { + if (!(await this.d.requestWorkspaceTrust({ + message: ln ? f(13019, null, this.e.getUriLabel(e)) : f(13020, null, this.e.getUriLabel(e)) + }))) { + throw new Error(f(13021, null)); + } + const r = V.file(R4t(this.c.userDataPath, "code-elevated")); + try { + await this.b.writeFile(r, t, s); + await this.a.writeElevated(r, e, s); + } finally { + await this.b.del(r); + } + return this.b.resolve(e, { + resolveMetadata: true + }); + } +}; +P5i = __decorate([__param(0, po), __param(1, Ct), __param(2, gu), __param(3, AE), __param(4, Zs)], P5i); +it(Mce, P5i, 1); +It(); +Ed(); +Jt(); +nt(); +Ut(); +q(); +In(); +At(); +fd(); +zt(); +Rn(); +Nt(); +Zt(); +ai(); +Un(); +Nn(); +vt(); +rn(); +Ed(); +var L5i = class extends H { + constructor(e, t, s, n, r, o, a) { + super(); + this.n = e; + this.q = t; + this.r = s; + this.s = n; + this.t = r; + this.u = o; + this.w = a; + this.a = new Map(); + this.b = new Map(); + this.f = new Map(); + this.g = new Map(); + this.h = new Map(); + this.j = new Map(); + this.m = new Set(); + } + registerSearchResultProvider(e, t, s) { + let n; + let r; + if (t === 0) { + n = this.a; + r = this.g; + } else if (t === 1) { + n = this.b; + r = this.h; + } else if (t === 2) { + n = this.f; + r = this.j; + } else { + throw new Error("Unknown SearchProviderType"); + } + n.set(e, s); + if (r.has(e)) { + r.get(e).complete(s); + r.delete(e); + } + return Ue(() => { + n.delete(e); + }); + } + async textSearch(e, t, s) { + const n = this.textSearchSplitSyncAsync(e, t, s); + const r = n.syncResults; + const o = await n.asyncResults; + return { + limitHit: o.limitHit || r.limitHit, + results: [...o.results, ...r.results], + messages: [...o.messages, ...r.messages] + }; + } + async aiTextSearch(e, t, s) { + const n = r => { + if (s) { + WFs(r); + s(r); + } + if (VFs(r)) { + this.s.debug("SearchService#search", r.message); + } + }; + return this.z(e, t, n); + } + async getAIName() { + return await this.G(3).get(me.file)?.getAIName(); + } + textSearchSplitSyncAsync(e, t, s, n, r) { + const o = this.M(e); + if (s) { + dr([...o.results.values()]).filter(c => !n || !n.has(c.resource)).forEach(s); + } + return { + syncResults: { + results: dr([...o.results.values()]), + limitHit: o.limitHit ?? false, + messages: [] + }, + asyncResults: (async () => { + const c = (await r) ?? new Yf(); + const u = d => { + if (WFs(d)) { + if (!o.results.has(d.resource) && !c.has(d.resource) && s) { + s(d); + } + } else if (s) { + s(d); + } + if (VFs(d)) { + this.s.debug("SearchService#search", d.message); + } + }; + return await this.z(e, t, u); + })() + }; + } + fileSearch(e, t) { + return this.z(e, t); + } + schemeHasFileSearchProvider(e) { + return this.a.has(e); + } + z(e, t, s) { + this.s.trace("SearchService#search", JSON.stringify(e)); + const n = this.C(e); + const r = [Promise.resolve(null)]; + n.forEach(a => r.push(this.t.activateByEvent(`onSearch:${a}`))); + r.push(this.t.activateByEvent("onSearch:file")); + const o = (async () => { + await Promise.all(r); + await this.t.whenInstalledExtensionsRegistered(); + if (t && t.isCancellationRequested) { + return Promise.reject(new fl()); + } + const a = u => { + if (!t || !t.isCancellationRequested) { + s?.(u); + } + }; + const l = await Promise.all(e.folderQueries.map(u => this.u.exists(u.folder))); + e.folderQueries = e.folderQueries.filter((u, d) => l[d]); + let c = await this.I(e, a, t); + c = dr(c); + if (c.length) { + return { + limitHit: c[0] && c[0].limitHit, + stats: c[0].stats, + messages: dr(c.flatMap(u => u.messages)).filter(RVn(u => u.type + u.text + u.trusted)), + results: c.flatMap(u => u.results) + }; + } else { + return { + limitHit: false, + results: [], + messages: [] + }; + } + })(); + if (t) { + return gfe(o, t); + } else { + return o; + } + } + C(e) { + const t = new Set(); + e.folderQueries?.forEach(s => t.add(s.folder.scheme)); + e.extraFileResources?.forEach(s => t.add(s.scheme)); + return t; + } + async F(e, t) { + const s = this.H(e); + if (s.has(t)) { + return s.get(t).p; + } + { + const n = new uc(); + s.set(t, n); + return n.p; + } + } + G(e) { + switch (e) { + case 1: + return this.a; + case 2: + return this.b; + case 3: + return this.f; + default: + throw new Error(`Unknown query type: ${e}`); + } + } + H(e) { + switch (e) { + case 1: + return this.g; + case 2: + return this.h; + case 3: + return this.j; + default: + throw new Error(`Unknown query type: ${e}`); + } + } + async I(e, t, s) { + const n = ic.create(false); + const r = []; + const o = this.J(e); + const a = [...o.keys()].some(l => this.G(e.type).has(l)); + if (e.type === 3 && !a) { + return []; + } else { + await Promise.all([...o.keys()].map(async l => { + if (e.onlyFileScheme && l !== me.file) { + return; + } + const c = o.get(l); + let u = this.G(e.type).get(l); + if (!u) { + if (a) { + if (!this.m.has(l)) { + this.s.warn(`No search provider registered for scheme: ${l}. Another scheme has a provider, not waiting for ${l}`); + this.m.add(l); + } + return; + } else { + if (!this.m.has(l)) { + this.s.warn(`No search provider registered for scheme: ${l}, waiting`); + this.m.add(l); + } + u = await this.F(e.type, l); + } + } + const d = { + ...e, + folderQueries: c + }; + const h = () => { + switch (e.type) { + case 1: + return u.fileSearch(d, s); + case 2: + return u.textSearch(d, t, s); + default: + return u.textSearch(d, t, s); + } + }; + r.push(h()); + })); + return Promise.all(r).then(l => { + const c = n.elapsed(); + this.s.trace(`SearchService#search: ${c}ms`); + l.forEach(u => { + this.L(e, c, u); + }); + return l; + }, l => { + const c = n.elapsed(); + this.s.trace(`SearchService#search: ${c}ms`); + const u = Sor(l); + this.s.trace(`SearchService#searchError: ${u.message}`); + this.L(e, c, undefined, u); + throw u; + }); + } + } + J(e) { + const t = new Map(); + e.folderQueries.forEach(s => { + const n = t.get(s.folder.scheme) || []; + n.push(s); + t.set(s.folder.scheme, n); + }); + return t; + } + L(e, t, s, n) { + const r = e.folderQueries.every(l => l.folder.scheme === me.file); + const o = e.folderQueries.every(l => l.folder.scheme !== me.file); + const a = r ? me.file : o ? "other" : "mixed"; + if (e.type === 1 && s && s.stats) { + const l = s.stats; + if (l.fromCache) { + const c = l.detailStats; + this.r.publicLog2("cachedSearchComplete", { + reason: e._reason, + resultCount: l.resultCount, + workspaceFolderCount: e.folderQueries.length, + endToEndTime: t, + sortingTime: l.sortingTime, + cacheWasResolved: c.cacheWasResolved, + cacheLookupTime: c.cacheLookupTime, + cacheFilterTime: c.cacheFilterTime, + cacheEntryCount: c.cacheEntryCount, + scheme: a + }); + } else { + const c = l.detailStats; + this.r.publicLog2("searchComplete", { + reason: e._reason, + resultCount: l.resultCount, + workspaceFolderCount: e.folderQueries.length, + endToEndTime: t, + sortingTime: l.sortingTime, + fileWalkTime: c.fileWalkTime, + directoriesWalked: c.directoriesWalked, + filesWalked: c.filesWalked, + cmdTime: c.cmdTime, + cmdResultCount: c.cmdResultCount, + scheme: a + }); + } + } else if (e.type === 2) { + let l; + if (n) { + l = n.code === cO.regexParseError ? "regex" : n.code === cO.unknownEncoding ? "encoding" : n.code === cO.globParseError ? "glob" : n.code === cO.invalidLiteral ? "literal" : n.code === cO.other ? "other" : n.code === cO.canceled ? "canceled" : "unknown"; + } + this.r.publicLog2("textSearchComplete", { + reason: e._reason, + workspaceFolderCount: e.folderQueries.length, + endToEndTime: t, + scheme: a, + error: l + }); + } + } + M(e) { + const t = new dn(n => this.w.extUri.getComparisonKey(n)); + let s = false; + if (e.type === 2) { + const n = new dn(); + for (const o of this.q.editors) { + const a = vo.getCanonicalUri(o, { + supportSideBySide: fo.PRIMARY + }); + const l = vo.getOriginalUri(o, { + supportSideBySide: fo.PRIMARY + }); + if (a) { + n.set(a, l ?? a); + } + } + this.n.getModels().forEach(o => { + const a = o.uri; + if (!a || s) { + return; + } + const l = n.get(a); + if (!l || o.getLanguageId() === MU && (!e.includePattern || !e.includePattern["**/*.code-search"]) || l.scheme !== me.untitled && !this.u.hasProvider(l) || l.scheme === "git" || !this.N(l, e)) { + return; + } + const c = (Od(e.maxResults) ? e.maxResults : ane) + 1; + let u = o.findMatches(e.contentPattern.pattern, false, !!e.contentPattern.isRegExp, !!e.contentPattern.isCaseSensitive, e.contentPattern.isWordMatch ? e.contentPattern.wordSeparators : null, false, c); + if (u.length) { + if (c && u.length >= c) { + s = true; + u = u.slice(0, c - 1); + } + const d = new JFs(l); + t.set(l, d); + const h = _En(u, o, e.previewOptions); + d.results = wLi(h, o, e); + } else { + t.set(l, null); + } + }); + } + return { + results: t, + limitHit: s + }; + } + N(e, t) { + return Swe(t, e.fsPath); + } + async clearCache(e) { + const t = Array.from(this.a.values()).map(s => s && s.clearCache(e)); + await Promise.all(t); + } +}; +L5i = __decorate([__param(0, $s), __param(1, Te), __param(2, Ot), __param(3, Bt), __param(4, Ks), __param(5, Ct), __param(6, _s)], L5i); +it(aC, L5i, 1); +X(); +pe(); +zt(); +Ht(); +da(); +X(); +nt(); +ri(); +q(); +In(); +Me(); +qh(); +Un(); +Nn(); +ad(); +At(); +pgt(); +ii(); +Nt(); +var VQ; +var R5i = class extends H { + static { + VQ = this; + } + static { + this.a = { + ENABLED: "workbench.localHistory.enabled", + SIZE_LIMIT: "workbench.localHistory.maxFileSize", + EXCLUDES: "workbench.localHistory.exclude" + }; + } + static { + this.b = Gy.registerSource("undoRedo.source", f(13719, null)); + } + constructor(e, t, s, n, r, o, a, l) { + super(); + this.m = e; + this.n = t; + this.q = s; + this.r = n; + this.s = r; + this.t = o; + this.u = a; + this.w = l; + this.c = this.D(new yT(s$t)); + this.f = this.D(new yfe(() => this.D(new JJ(u => this.s.getValue(VQ.a.EXCLUDES, { + resource: u + }), u => u.affectsConfiguration(VQ.a.EXCLUDES), this.u, this.s)))); + this.g = new dn(c => this.q.extUri.getComparisonKey(c)); + this.h = new dn(c => this.q.extUri.getComparisonKey(c)); + this.j = new dn(c => this.q.extUri.getComparisonKey(c)); + this.y(); + } + y() { + this.D(this.w.onDidRunOperation(e => this.z(e))); + this.D(this.m.onDidChangeContent(e => this.C(e))); + this.D(this.m.onDidSave(e => this.G(e))); + } + async z(e) { + if (!this.J(e)) { + return; + } + const t = e.resource; + const s = e.target.resource; + const n = await this.n.moveEntries(t, s); + for (const r of n) { + const o = this.F(r); + this.j.set(r, o); + } + } + C(e) { + const t = this.F(e.resource); + this.h.set(e.resource, t + 1); + } + F(e) { + return this.h.get(e) || 0; + } + G(e) { + if (!this.I(e)) { + return; + } + const t = this.F(e.workingCopy.resource); + if (this.j.get(e.workingCopy.resource) === t) { + return; + } + this.g.get(e.workingCopy.resource)?.dispose(true); + const s = new Xi(); + this.g.set(e.workingCopy.resource, s); + this.c.queue(async () => { + if (s.token.isCancellationRequested) { + return; + } + const n = this.F(e.workingCopy.resource); + let r = e.source; + if (!e.source) { + r = this.H(e); + } + await this.n.addEntry({ + resource: e.workingCopy.resource, + source: r, + timestamp: e.stat.mtime + }, s.token); + this.j.set(e.workingCopy.resource, n); + if (!s.token.isCancellationRequested) { + this.g.delete(e.workingCopy.resource); + } + }); + } + H(e) { + const t = this.t.getLastElement(e.workingCopy.resource); + if (t) { + if (t.code === "undoredo.textBufferEdit") { + return undefined; + } else { + return t.label; + } + } + const s = this.t.getElements(e.workingCopy.resource); + if (s.future.length > 0 || s.past.length > 0) { + return VQ.b; + } + } + I(e) { + if (yko(e)) { + return this.L(e.workingCopy.resource, e.stat); + } else { + return false; + } + } + J(e) { + if (e.isOperation(2)) { + return this.L(e.target.resource, e.target); + } else { + return false; + } + } + L(e, t) { + if (e.scheme !== this.r.defaultUriScheme && e.scheme !== me.vscodeUserData && e.scheme !== me.inMemory) { + return false; + } + const s = this.s.getValue(VQ.a.SIZE_LIMIT, { + resource: e + }) * 1024; + if (t.size > s || this.s.getValue(VQ.a.ENABLED, { + resource: e + }) === false) { + return false; + } else { + return !this.f.value.matches(e); + } + } +}; +R5i = VQ = __decorate([__param(0, Tp), __param(1, cI), __param(2, _s), __param(3, Au), __param(4, ve), __param(5, Hh), __param(6, kt), __param(7, Ct)], R5i); +q(); +Nt(); +Wc(); +Le(); +nt(); +Et(); +Rr(); +Gl(); +zb(); +ri(); +In(); +Un(); +jn(); +nr(); +Zt(); +Nn(); +Me(); +Jt(); +$i(); +var h2t; +var N5i; +var hAn = class hq { + static { + this.ENTRIES_FILE = "entries.json"; + } + static { + this.a = Gy.registerSource("default.source", f(13715, null)); + } + static { + this.b = { + MAX_ENTRIES: "workbench.localHistory.maxFileEntries", + MERGE_PERIOD: "workbench.localHistory.mergeWindow" + }; + } + constructor(e, t, s, n, r, o, a, l, c, u, d) { + this.n = t; + this.o = s; + this.q = n; + this.r = r; + this.s = o; + this.t = a; + this.u = l; + this.v = c; + this.w = u; + this.x = d; + this.c = []; + this.d = undefined; + this.f = undefined; + this.g = undefined; + this.h = undefined; + this.i = undefined; + this.j = undefined; + this.k = 0; + this.l = this.k; + this.m = new yT(1); + this.y(e); + } + y(e) { + this.f = e; + this.g = this.v.getUriBasenameLabel(e); + this.j = new RegExp(`[A-Za-z0-9]{4}${zg(_d(e))}`); + this.h = this.z(this.n, e); + this.i = Li(this.h, hq.ENTRIES_FILE); + this.c = []; + this.d = undefined; + } + z(e, t) { + return Li(e, Qc(t.toString()).toString(16)); + } + async addEntry(e = hq.a, t = undefined, s = Date.now(), n) { + let r; + const o = this.c.at(-1); + if (o && o.source === e) { + const l = this.x.getValue(hq.b.MERGE_PERIOD, { + resource: this.f + }); + if (s - o.timestamp <= l * 1000) { + r = o; + } + } + let a; + if (r) { + a = await this.B(r, e, t, s, n); + } else { + a = await this.A(e, t, s, n); + } + if (this.t.flushOnChange && !n.isCancellationRequested) { + await this.store(n); + } + return a; + } + async A(e, t = undefined, s, n) { + const r = Tn(this.f); + const o = Tn(this.g); + const a = Tn(this.h); + const l = `${R4t(undefined, undefined, 4)}${_d(r)}`; + const c = Li(a, l); + await this.u.cloneFile(r, c); + const u = { + id: l, + workingCopy: { + resource: r, + name: o + }, + location: c, + timestamp: s, + source: e, + sourceDescription: t + }; + this.c.push(u); + this.k++; + this.o.fire({ + entry: u + }); + return u; + } + async B(e, t, s = undefined, n, r) { + const o = Tn(this.f); + await this.u.cloneFile(o, e.location); + e.source = t; + e.sourceDescription = s; + e.timestamp = n; + this.k++; + this.r.fire({ + entry: e + }); + return e; + } + async removeEntry(e, t) { + await this.C(); + if (t.isCancellationRequested) { + return false; + } + const s = this.c.indexOf(e); + if (s === -1) { + return false; + } else { + await this.I(e); + this.c.splice(s, 1); + this.k++; + this.s.fire({ + entry: e + }); + if (this.t.flushOnChange && !t.isCancellationRequested) { + await this.store(t); + } + return true; + } + } + async updateEntry(e, t, s) { + await this.C(); + if (!s.isCancellationRequested && this.c.indexOf(e) !== -1) { + e.source = t.source; + this.k++; + this.q.fire({ + entry: e + }); + if (this.t.flushOnChange && !s.isCancellationRequested) { + await this.store(s); + } + } + } + async getEntries() { + await this.C(); + const e = this.x.getValue(hq.b.MAX_ENTRIES, { + resource: this.f + }); + if (this.c.length > e) { + return this.c.slice(this.c.length - e); + } else { + return this.c; + } + } + async hasEntries(e) { + if (!e) { + await this.C(); + } + return this.c.length > 0; + } + C() { + this.d ||= this.D(); + return this.d; + } + async D() { + const e = await this.E(); + for (const t of this.c) { + e.set(t.id, t); + } + this.c = Array.from(e.values()).sort((t, s) => t.timestamp - s.timestamp); + } + async E() { + const e = Tn(this.f); + const t = Tn(this.g); + const [s, n] = await Promise.all([this.K(), this.L()]); + const r = new Map(); + if (n) { + for (const o of n) { + r.set(o.name, { + id: o.name, + workingCopy: { + resource: e, + name: t + }, + location: o.resource, + timestamp: o.mtime, + source: hq.a, + sourceDescription: undefined + }); + } + } + if (s) { + for (const o of s.entries) { + const a = r.get(o.id); + if (a) { + r.set(o.id, { + ...a, + timestamp: o.timestamp, + source: o.source ?? a.source, + sourceDescription: o.sourceDescription ?? a.sourceDescription + }); + } + } + } + return r; + } + async moveEntries(e, t, s) { + const n = Date.now(); + const r = this.v.getUriLabel(Tn(this.f)); + const o = Tn(this.h); + const a = Tn(e.h); + try { + for (const d of this.c) { + await this.u.move(d.location, Li(a, d.id), true); + } + await this.u.del(o, { + recursive: true + }); + } catch (d) { + if (!this.M(d)) { + try { + await this.u.move(o, a, true); + } catch (h) { + if (!this.M(h)) { + this.N(h); + } + } + } + } + const l = Ea([...this.c, ...e.c], d => d.id).sort((d, h) => d.timestamp - h.timestamp); + const c = Tn(e.f); + this.y(c); + const u = Tn(e.g); + for (const d of l) { + this.c.push({ + id: d.id, + location: Li(a, d.id), + source: d.source, + sourceDescription: d.sourceDescription, + timestamp: d.timestamp, + workingCopy: { + resource: c, + name: u + } + }); + } + await this.addEntry(t, r, n, s); + await this.store(s); + } + async store(e) { + if (this.F()) { + await this.m.queue(async () => { + if (!e.isCancellationRequested && !!this.F()) { + return this.G(e); + } + }); + } + } + F() { + return this.l !== this.k; + } + async G(e) { + const t = Tn(this.h); + await this.C(); + if (e.isCancellationRequested) { + return; + } + await this.H(); + const s = this.k; + if (this.c.length === 0) { + try { + await this.u.del(t, { + recursive: true + }); + } catch (n) { + this.N(n); + } + } else { + await this.J(); + } + this.l = s; + } + async H() { + const e = this.x.getValue(hq.b.MAX_ENTRIES, { + resource: this.f + }); + if (this.c.length <= e) { + return; + } + const t = this.c.slice(0, this.c.length - e); + const s = this.c.slice(this.c.length - e); + for (const n of t) { + await this.I(n); + } + this.c = s; + for (const n of t) { + this.s.fire({ + entry: n + }); + } + } + async I(e) { + try { + await this.u.del(e.location); + } catch (t) { + this.N(t); + } + } + async J() { + const e = Tn(this.f); + const t = Tn(this.i); + const s = { + version: 1, + resource: e.toString(), + entries: this.c.map(n => ({ + id: n.id, + source: n.source !== hq.a ? n.source : undefined, + sourceDescription: n.sourceDescription, + timestamp: n.timestamp + })) + }; + await this.u.writeFile(t, Ii.fromString(JSON.stringify(s))); + } + async K() { + const e = Tn(this.i); + let t; + try { + t = JSON.parse((await this.u.readFile(e)).value.toString()); + } catch (s) { + if (!this.M(s)) { + this.N(s); + } + } + return t; + } + async L() { + const e = Tn(this.h); + const t = Tn(this.j); + let s; + try { + s = (await this.u.resolve(e, { + resolveMetadata: true + })).children; + } catch (n) { + if (!this.M(n)) { + this.N(n); + } + } + if (s) { + return s.filter(n => !Ls(n.resource, this.i) && t.test(n.name)); + } + } + M(e) { + return e instanceof vf && e.fileOperationResult === 1; + } + N(e) { + this.w.trace("[Working Copy History Service]", e); + } +}; +var M5i = class extends H { + static { + h2t = this; + } + static { + this.a = Gy.registerSource("moved.source", f(13716, null)); + } + static { + this.b = Gy.registerSource("renamed.source", f(13717, null)); + } + constructor(e, t, s, n, r, o, a) { + super(); + this.r = e; + this.s = t; + this.t = s; + this.u = n; + this.w = r; + this.y = o; + this.z = a; + this.c = this.D(new B()); + this.onDidAddEntry = this.c.event; + this.f = this.D(new B()); + this.onDidChangeEntry = this.f.event; + this.g = this.D(new B()); + this.onDidReplaceEntry = this.g.event; + this.h = this.D(new B()); + this.onDidMoveEntries = this.h.event; + this.j = this.D(new B()); + this.onDidRemoveEntry = this.j.event; + this.m = this.D(new B()); + this.onDidRemoveEntries = this.m.event; + this.n = new uc(); + this.q = new dn(l => this.u.extUri.getComparisonKey(l)); + this.C(); + } + async C() { + let e; + try { + const t = await this.s.getEnvironment(); + if (t) { + e = t.localHistoryHome; + } + } catch (t) { + this.y.trace(t); + } + e ||= this.t.localHistoryHome; + this.n.complete(e); + } + async moveEntries(e, t) { + const s = new yT(s$t); + const n = []; + for (const [o, a] of this.q) { + if (!this.u.extUri.isEqualOrParent(o, e)) { + continue; + } + let l; + if (this.u.extUri.isEqual(e, o)) { + l = t; + } else { + const u = L4t(o.path, e.path); + l = Li(t, o.path.substr(u + e.path.length + 1)); + } + let c; + if (this.u.extUri.isEqual(Ir(o), Ir(l))) { + c = h2t.b; + } else { + c = h2t.a; + } + n.push(s.queue(() => this.F(a, c, o, l))); + } + if (!n.length) { + return []; + } + const r = await Promise.all(n); + this.h.fire(); + return r; + } + async F(e, t, s, n) { + const r = await this.G(n); + await e.moveEntries(r, t, mt.None); + this.q.delete(s); + this.q.set(n, e); + return n; + } + async addEntry({ + resource: e, + source: t, + timestamp: s + }, n) { + if (!this.r.hasProvider(e)) { + return; + } + const r = await this.G(e); + if (!n.isCancellationRequested) { + return r.addEntry(t, undefined, s, n); + } + } + async updateEntry(e, t, s) { + const n = await this.G(e.workingCopy.resource); + if (!s.isCancellationRequested) { + return n.updateEntry(e, t, s); + } + } + async removeEntry(e, t) { + const s = await this.G(e.workingCopy.resource); + if (t.isCancellationRequested) { + return false; + } else { + return s.removeEntry(e, t); + } + } + async removeAll(e) { + const t = await this.n.p; + if (!e.isCancellationRequested) { + this.q.clear(); + await this.r.del(t, { + recursive: true + }); + this.m.fire(); + } + } + async getEntries(e, t) { + const s = await this.G(e); + if (t.isCancellationRequested) { + return []; + } else { + return (await s.getEntries()) ?? []; + } + } + async getAll(e) { + const t = await this.n.p; + if (e.isCancellationRequested) { + return []; + } + const s = new dn(); + for (const [n, r] of this.q) { + if (await r.hasEntries(true)) { + s.set(n, true); + } + } + try { + const n = await this.r.resolve(t); + if (n.children) { + const r = new yT(s$t); + const o = []; + for (const a of n.children) { + o.push(r.queue(async () => { + if (!e.isCancellationRequested) { + try { + const l = JSON.parse((await this.r.readFile(Li(a.resource, hAn.ENTRIES_FILE))).value.toString()); + if (l.entries.length > 0) { + s.set(V.parse(l.resource), true); + } + } catch {} + } + })); + } + await Promise.all(o); + } + } catch {} + return Array.from(s.keys()); + } + async G(e) { + const t = await this.n.p; + let s = this.q.get(e); + if (!s) { + s = new hAn(e, t, this.c, this.f, this.g, this.j, this.H(), this.r, this.w, this.y, this.z); + this.q.set(e, s); + } + return s; + } +}; +M5i = h2t = __decorate([__param(0, Ct), __param(1, al), __param(2, Wn), __param(3, _s), __param(4, Zs), __param(5, Bt), __param(6, ve)], M5i); +var A5i = class extends M5i { + static { + N5i = this; + } + static { + this.I = 300000; + } + constructor(e, t, s, n, r, o, a, l) { + super(e, t, s, n, r, a, l); + this.N = o; + this.J = typeof this.t.remoteAuthority == "string"; + this.L = this.D(new Xi()); + this.M = this.D(new Vn(() => this.S(this.L.token), N5i.I)); + this.O(); + } + O() { + if (!this.J) { + this.D(this.N.onWillShutdown(e => this.Q(e))); + this.D(de.any(this.onDidAddEntry, this.onDidChangeEntry, this.onDidReplaceEntry, this.onDidRemoveEntry)(() => this.R())); + } + } + H() { + return { + flushOnChange: this.J + }; + } + Q(e) { + this.M.dispose(); + this.L.dispose(true); + e.join(this.S(e.token), { + id: "join.workingCopyHistory", + label: f(13718, null) + }); + } + R() { + if (!this.M.isScheduled()) { + this.M.schedule(); + } + } + async S(e) { + const t = new yT(s$t); + const s = []; + const n = Array.from(this.q.values()); + for (const r of n) { + s.push(t.queue(async () => { + if (!e.isCancellationRequested) { + try { + await r.store(e); + } catch (o) { + this.y.trace(o); + } + } + })); + } + await Promise.all(s); + } +}; +A5i = N5i = __decorate([__param(0, Ct), __param(1, al), __param(2, Wn), __param(3, _s), __param(4, Zs), __param(5, Yo), __param(6, Bt), __param(7, ve)], A5i); +Pe.as(Er.Workbench).registerWorkbenchContribution(R5i, 3); +It(); +it(cI, A5i, 1); +It(); +pe(); +q(); +rt(); +Aa(); +qt(); +ai(); +var f2t = "sync.enable"; +var $5i = class extends H { + constructor(e, t, s, n) { + super(); + this.c = e; + this.f = t; + this.g = s; + this.h = n; + this.a = new B(); + this.onDidChangeEnablement = this.a.event; + this.b = new B(); + this.onDidChangeResourceEnablement = this.b.event; + this.D(e.onDidChangeValue(-1, undefined, this.B)(r => this.m(r))); + } + isEnabled() { + switch (this.g.sync) { + case "on": + return true; + case "off": + return false; + } + return this.c.getBoolean(f2t, -1, false); + } + canToggleEnablement() { + return this.h.userDataSyncStore !== undefined && this.g.sync === undefined; + } + setEnablement(e) { + if (!e || !!this.canToggleEnablement()) { + this.f.publicLog2(f2t, { + enabled: e + }); + this.c.store(f2t, e, -1, 1); + } + } + isResourceEnabled(e) { + return this.c.getBoolean(gyt(e), -1, true); + } + setResourceEnablement(e, t) { + if (this.isResourceEnabled(e) !== t) { + const s = gyt(e); + this.j(s, t); + } + } + getResourceSyncStateVersion(e) {} + j(e, t) { + this.c.store(e, t, -1, tn ? 0 : 1); + } + m(e) { + if (f2t === e.key) { + this.a.fire(this.isEnabled()); + return; + } + const t = fyt.filter(s => gyt(s) === e.key)[0]; + if (t) { + this.b.fire([t, this.isResourceEnabled(t)]); + return; + } + } +}; +$5i = __decorate([__param(0, ht), __param(1, Ot), __param(2, pa), __param(3, uK)], $5i); +var Kqo = class extends $5i { + get n() { + return this.g; + } + getResourceSyncStateVersion(i) { + if (i === "extensions") { + return this.n.options?.settingsSyncOptions?.extensionsSyncStateVersion; + } else { + return undefined; + } + } +}; +it(Qm, Kqo, 1); +xe(); +fr(); +ri(); +At(); +yb(); +rt(); +X(); +Je(); +Wt(); +Me(); +fn(); +Cl(); +Nt(); +It(); +te(); +Zt(); +Wi(); +gs(); +kn(); +fA(); +ai(); +ii(); +Rr(); +xe(); +t5t(); +fr(); +nt(); +nr(); +Ut(); +pe(); +q(); +At(); +rt(); +Et(); +Le(); +Ps(); +X(); +jn(); +Zt(); +kn(); +qt(); +ai(); +Zw(); +mu(); +ii(); +nr(); +var HQ; +(function (i) { + i[i.Desktop = 1] = "Desktop"; + i[i.Web = 2] = "Web"; +})(HQ ||= {}); +var fAn; +(function (i) { + i[i.VersionMismatch = 55] = "VersionMismatch"; + i[i.UnexpectedError = 81] = "UnexpectedError"; +})(fAn ||= {}); +var gAn; +(function (i) { + i[i.Initialized = 0] = "Initialized"; + i[i.Ready = 1] = "Ready"; + i[i.Terminate = 2] = "Terminate"; +})(gAn ||= {}); +function pAn(i) { + const e = Ii.alloc(1); + switch (i) { + case 0: + e.writeUInt8(1, 0); + break; + case 1: + e.writeUInt8(2, 0); + break; + case 2: + e.writeUInt8(3, 0); + break; + } + return e; +} +function hde(i, e) { + if (i.byteLength !== 1) { + return false; + } + switch (i.readUInt8(0)) { + case 1: + return e === 0; + case 2: + return e === 1; + case 3: + return e === 2; + default: + return false; + } +} +var mAn; +(function (i) { + i.Start = "START_NATIVE_LOG"; + i.End = "END_NATIVE_LOG"; +})(mAn ||= {}); +var F5i = class extends H { + constructor(e, t, s, n, r, o, a, l, c, u, d, h, g) { + super(); + this.runningLocation = e; + this.startup = t; + this.h = s; + this.j = n; + this.m = r; + this.n = o; + this.q = a; + this.r = l; + this.s = c; + this.t = u; + this.u = d; + this.w = h; + this.y = g; + this.pid = null; + this.remoteAuthority = null; + this.extensions = null; + this.a = this.D(new B()); + this.onExit = this.a.event; + this.b = false; + this.c = null; + this.f = null; + this.g = Li(this.s.extHostLogsPath, "webWorker"); + } + async z() { + const e = new URLSearchParams(); + if (this.s.debugExtensionHost && this.s.debugRenderer) { + e.set("debugged", "1"); + } + dfe.addSearchParam(e, true, true); + const t = `?${e.toString()}`; + const s = "vs/workbench/services/extensions/worker/webWorkerExtensionHostIframe.html"; + if (tn) { + const r = this.u.webEndpointUrlTemplate; + const o = this.u.commit; + const a = this.u.quality; + if (r && o && a) { + const l = "webWorkerExtensionHostIframeStableOriginUUID"; + let c = this.y.get(l, 1); + if (typeof c === "undefined") { + c = Ft(); + this.y.store(l, c, 1, 1); + } + const u = await czi(xt.origin, c); + const d = r.replace("{{uuid}}", `v--${u}`).replace("{{commit}}", o).replace("{{quality}}", a); + const h = new URL(`${d}/out/${s}${t}`); + h.searchParams.set("parentOrigin", xt.origin); + h.searchParams.set("salt", c); + return h.toString(); + } + console.warn("The web worker extension host is started in a same-origin iframe!"); + } + return `${Na.asBrowserUri(s).toString(true)}${t}`; + } + async start() { + if (!this.c) { + this.c = this.C(); + this.c.then(e => this.f = e); + } + return this.c; + } + async C() { + const e = await this.z(); + const t = this.D(new B()); + const s = document.createElement("iframe"); + s.setAttribute("class", "web-worker-ext-host-iframe"); + s.setAttribute("sandbox", "allow-scripts allow-same-origin"); + s.setAttribute("allow", "usb; serial; hid; cross-origin-isolated;"); + s.setAttribute("aria-hidden", "true"); + s.style.display = "none"; + const n = Ft(); + s.setAttribute("src", `${e}&vscodeWebWorkerExtHostId=${n}`); + const r = new YS(); + let o; + let a = null; + let l = false; + let c = null; + const u = (p, b) => { + a = b; + l = true; + xs(a); + clearTimeout(c); + this.a.fire([81, a.message]); + r.open(); + }; + const d = p => { + o = p; + clearTimeout(c); + r.open(); + }; + c = setTimeout(() => { + console.warn("The Web Worker Extension Host did not start in 60s, that might be a problem."); + }, 60000); + this.D(Ce(xt, "message", p => { + if (p.source !== s.contentWindow || p.data.vscodeWebWorkerExtHostId !== n) { + return; + } + if (p.data.error) { + const { + name: v, + message: y, + stack: w + } = p.data.error; + const C = new Error(); + C.message = y; + C.name = v; + C.stack = w; + return u(81, C); + } + if (p.data.type === "vscode.bootstrap.nls") { + s.contentWindow.postMessage({ + type: p.data.type, + data: { + workerUrl: Na.asBrowserUri("vs/workbench/api/worker/extensionHostWorkerMain.js").toString(true), + fileRoot: globalThis._VSCODE_FILE_ROOT, + nls: { + messages: t4t(), + language: Ent() + } + } + }, "*"); + return; + } + const { + data: b + } = p.data; + if (r.isOpen() || !(b instanceof MessagePort)) { + console.warn("UNEXPECTED message", p); + const v = new Error("UNEXPECTED message"); + return u(81, v); + } + d(b); + })); + this.w.mainContainer.appendChild(s); + this.D(Ue(() => s.remove())); + await r.wait(); + if (l) { + throw a; + } + const h = this.s.options?.messagePorts ?? new Map(); + s.contentWindow.postMessage({ + type: "vscode.init", + data: h + }, "*", [...h.values()]); + o.onmessage = p => { + const { + data: b + } = p; + if (!(b instanceof ArrayBuffer)) { + console.warn("UNKNOWN data received", b); + this.a.fire([77, "UNKNOWN data received"]); + return; + } + t.fire(Ii.wrap(new Uint8Array(b, 0, b.byteLength))); + }; + const g = { + onMessage: t.event, + send: p => { + const b = p.buffer.buffer.slice(p.buffer.byteOffset, p.buffer.byteOffset + p.buffer.byteLength); + o.postMessage(b, [b]); + } + }; + return this.F(g); + } + async F(e) { + await de.toPromise(de.filter(e.onMessage, t => hde(t, 1))); + if (this.b || (e.send(Ii.fromString(JSON.stringify(await this.G()))), this.b) || (await de.toPromise(de.filter(e.onMessage, t => hde(t, 0))), this.b)) { + throw SL(); + } + return e; + } + dispose() { + if (!this.b) { + this.b = true; + this.f?.send(pAn(2)); + super.dispose(); + } + } + getInspectPort() {} + enableInspectPort() { + return Promise.resolve(false); + } + async G() { + const e = await this.h.getInitData(); + this.extensions = e.extensions; + const t = this.m.getWorkspace(); + const s = this.u.extensionsGallery?.nlsBaseUrl; + let n; + if (s && this.u.commit && !Wk.isDefaultVariant()) { + n = V.joinPath(V.parse(s), this.u.commit, this.u.version, Wk.value()); + } + return { + commit: this.u.commit, + version: this.u.version, + vscodeVersion: this.u.vscodeVersion, + rendererPerformanceTimeOrigin: performance.timeOrigin, + quality: this.u.quality, + parentPid: 0, + environment: { + isExtensionDevelopmentDebug: this.s.debugRenderer, + appName: this.u.nameLong, + appHost: this.u.embedderIdentifier ?? (tn ? "web" : "desktop"), + appUriScheme: this.u.urlProtocol, + appLanguage: Uu, + extensionTelemetryLogResource: this.s.extHostTelemetryLogFile, + isExtensionTelemetryLoggingOnly: cYt(this.u, this.s), + shadowWindowForWorkspaceId: this.s.shadowWindowForWorkspaceId, + bcIdForThisWindow: A1(this.s.remoteAuthority), + extensionDevelopmentLocationURI: this.s.extensionDevelopmentLocationURI, + extensionTestsLocationURI: this.s.extensionTestsLocationURI, + globalStorageHome: this.t.defaultProfile.globalStorageHome, + workspaceStorageHome: this.s.workspaceStorageHome, + extensionLogLevel: this.s.extensionLogLevel + }, + workspace: this.m.getWorkbenchState() === 1 ? undefined : { + configuration: t.configuration || undefined, + id: t.id, + name: this.n.getWorkspaceLabel(t), + transient: t.transient + }, + consoleForward: { + includeStack: false, + logNative: this.s.debugRenderer + }, + extensions: this.extensions.toSnapshot(), + nlsBaseUrl: n, + telemetryInfo: { + sessionId: this.j.sessionId, + machineId: this.j.machineId, + macMachineId: this.j.macMachineId, + sqmId: this.j.sqmId, + devDeviceId: this.j.devDeviceId, + firstSessionDate: this.j.firstSessionDate, + msftInternal: this.j.msftInternal + }, + logLevel: this.q.getLevel(), + loggers: [...this.r.getRegisteredLoggers()], + logsLocation: this.g, + autoStart: this.startup === 1, + remote: { + authority: this.s.remoteAuthority, + connectionData: null, + isRemote: false + }, + uiKind: tn ? HQ.Web : HQ.Desktop + }; + } +}; +F5i = __decorate([__param(3, Ot), __param(4, kt), __param(5, Zs), __param(6, Bt), __param(7, Um), __param(8, hy), __param(9, Ml), __param(10, ys), __param(11, wh), __param(12, ht)], F5i); +nt(); +Yd(); +pe(); +No(); +q(); +At(); +yb(); +rt(); +Et(); +fd(); +zt(); +X(); +Me(); +fn(); +hYt(); +Sl(); +Nt(); +jo(); +te(); +Zt(); +Wi(); +kn(); +Ht(); +ai(); +ii(); +Rr(); +Sl(); +pe(); +pn(); +q(); +nt(); +var Yqo = class { + constructor(i, e) { + this.versionId = i; + this.removedDueToLooping = e; + } +}; +var Xqo = class d3n { + static isHostExtension(e, t, s) { + if (t.getExtensionDescription(e)) { + return false; + } + const n = s.getExtensionDescription(e); + if (n) { + return (!!n.main || !!n.browser) && n.api === "none"; + } else { + return false; + } + } + constructor(e, t) { + this.j = e; + this.c = new B(); + this.onDidChange = this.c.event; + this.d = 0; + this.e = t.map(O5i); + this.k(); + } + k() { + this.e.sort(sjo); + this.f = new Gm(); + this.g = []; + this.h = new Map(); + for (const e of this.e) { + if (this.f.has(e.identifier)) { + console.error("Extension `" + e.identifier.value + "` is already registered"); + continue; + } + this.f.set(e.identifier, e); + this.g.push(e); + const t = this.j.readActivationEvents(e); + for (const s of t) { + if (!this.h.has(s)) { + this.h.set(s, []); + } + this.h.get(s).push(e); + } + } + } + set(e) { + this.e = e.map(O5i); + this.k(); + this.d++; + this.c.fire(undefined); + return { + versionId: this.d + }; + } + deltaExtensions(e, t) { + e = e.map(O5i); + this.e = vAn(this.e, t); + this.e = this.e.concat(e); + const s = d3n.l(this.e); + this.e = vAn(this.e, s.map(n => n.identifier)); + this.k(); + this.d++; + this.c.fire(undefined); + return new Yqo(this.d, s); + } + static l(e) { + const t = new class { + constructor() { + this.c = new Map(); + this.d = new Set(); + this.e = []; + } + addNode(a) { + if (!this.d.has(a)) { + this.d.add(a); + this.e.push(a); + } + } + addArc(a, l) { + this.addNode(a); + this.addNode(l); + if (this.c.has(a)) { + this.c.get(a).push(l); + } else { + this.c.set(a, [l]); + } + } + getArcs(a) { + if (this.c.has(a)) { + return this.c.get(a); + } else { + return []; + } + } + hasOnlyGoodArcs(a, l) { + const c = t.getArcs(a); + for (let u = 0; u < c.length; u++) { + if (!l.has(c[u])) { + return false; + } + } + return true; + } + getNodes() { + return this.e; + } + }(); + const s = new Gm(); + for (const a of e) { + s.set(a.identifier, a); + if (a.extensionDependencies) { + for (const l of a.extensionDependencies) { + t.addArc($r.toKey(a.identifier), $r.toKey(l)); + } + } + } + const n = new Set(); + t.getNodes().filter(a => t.getArcs(a).length === 0).forEach(a => n.add(a)); + const r = t.getNodes().filter(a => !n.has(a)); + let o; + do { + o = false; + for (let a = 0; a < r.length; a++) { + const l = r[a]; + if (t.hasOnlyGoodArcs(l, n)) { + r.splice(a, 1); + a--; + n.add(l); + o = true; + } + } + } while (o); + return r.map(a => s.get(a)); + } + containsActivationEvent(e) { + return this.h.has(e); + } + containsExtension(e) { + return this.f.has(e); + } + getExtensionDescriptionsForActivationEvent(e) { + const t = this.h.get(e); + if (t) { + return t.slice(0); + } else { + return []; + } + } + getAllExtensionDescriptions() { + return this.g.slice(0); + } + getSnapshot() { + return new Qqo(this.d, this.getAllExtensionDescriptions()); + } + getExtensionDescription(e) { + const t = this.f.get(e); + return t || undefined; + } + getExtensionDescriptionByUUID(e) { + for (const t of this.g) { + if (t.uuid === e) { + return t; + } + } + } + getExtensionDescriptionByIdOrUUID(e, t) { + return this.getExtensionDescription(e) ?? (t ? this.getExtensionDescriptionByUUID(t) : undefined); + } +}; +var Qqo = class { + constructor(i, e) { + this.versionId = i; + this.extensions = e; + } +}; +var Zqo = class { + constructor(i) { + this.d = new ijo(); + this.c = new Xqo(i, []); + } + async acquireLock(i) { + const e = await this.d.acquire(i); + return new ejo(this, e); + } + deltaExtensions(i, e, t) { + if (!i.isAcquiredFor(this)) { + throw new Error("Lock is not held"); + } + return this.c.deltaExtensions(e, t); + } + containsActivationEvent(i) { + return this.c.containsActivationEvent(i); + } + containsExtension(i) { + return this.c.containsExtension(i); + } + getExtensionDescriptionsForActivationEvent(i) { + return this.c.getExtensionDescriptionsForActivationEvent(i); + } + getAllExtensionDescriptions() { + return this.c.getAllExtensionDescriptions(); + } + getSnapshot() { + return this.c.getSnapshot(); + } + getExtensionDescription(i) { + return this.c.getExtensionDescription(i); + } + getExtensionDescriptionByUUID(i) { + return this.c.getExtensionDescriptionByUUID(i); + } + getExtensionDescriptionByIdOrUUID(i, e) { + return this.c.getExtensionDescriptionByIdOrUUID(i, e); + } +}; +var ejo = class extends H { + constructor(i, e) { + super(); + this.f = i; + this.c = false; + this.D(e); + } + isAcquiredFor(i) { + return !this.c && this.f === i; + } +}; +var tjo = class { + constructor(i) { + this.name = i; + const e = U2(); + this.promise = e.promise; + this.c = e.resolve; + } + resolve(i) { + this.c(i); + } +}; +var ijo = class { + constructor() { + this.c = []; + this.d = false; + } + async acquire(i) { + const e = new tjo(i); + this.c.push(e); + this.e(); + return e.promise; + } + e() { + if (this.d || this.c.length === 0) { + return; + } + const i = this.c.shift(); + this.d = true; + let e = true; + const t = setTimeout(() => { + if (e) { + console.warn(`The customer named ${i.name} has been holding on to the lock for 30s. This might be a problem.`); + } + }, 30000); + const s = () => { + if (e) { + clearTimeout(t); + e = false; + this.d = false; + this.e(); + } + }; + i.resolve(Ue(s)); + } +}; +var bAn; +(function (i) { + i[i.Builtin = 0] = "Builtin"; + i[i.User = 1] = "User"; + i[i.Dev = 2] = "Dev"; +})(bAn ||= {}); +function sjo(i, e) { + const t = i.isBuiltin ? 0 : i.isUnderDevelopment ? 2 : 1; + const s = e.isBuiltin ? 0 : e.isUnderDevelopment ? 2 : 1; + if (t !== s) { + return t - s; + } + const n = ao.basename(i.extensionLocation.path); + const r = ao.basename(e.extensionLocation.path); + if (n < r) { + return -1; + } else if (n > r) { + return 1; + } else { + return 0; + } +} +function vAn(i, e) { + const t = new xR(e); + return i.filter(s => !t.has(s.identifier)); +} +function O5i(i) { + return { + ...i, + extensionDependencies: i.extensionDependencies?.map(e => Sa.modifiedExtensionDependencies?.[e] ?? e) + }; +} +Pn(); +At(); +Me(); +Sl(); +Zt(); +Rr(); +var _5i = class { + get maxLocalProcessAffinity() { + return this.b; + } + get maxLocalWebWorkerAffinity() { + return this.c; + } + constructor(e, t, s, n, r, o) { + this.d = e; + this.f = t; + this.g = s; + this.h = n; + this.i = r; + this.j = o; + this.a = new Gm(); + this.b = 0; + this.c = 0; + } + set(e, t) { + this.a.set(e, t); + } + readExtensionKinds(e) { + if (e.isUnderDevelopment && this.g.extensionDevelopmentKind) { + return this.g.extensionDevelopmentKind; + } else { + return this.j.getExtensionKind(e); + } + } + getRunningLocation(e) { + return this.a.get(e) || null; + } + filterByRunningLocation(e, t) { + return g2t(e, this.a, s => t.equals(s), { + environmentService: this.g + }); + } + filterByExtensionHostKind(e, t) { + return g2t(e, this.a, s => s.kind === t, { + environmentService: this.g + }); + } + filterByExtensionHostManager(e, t) { + return g2t(e, this.a, s => t.representsRunningLocation(s), { + environmentService: this.g + }); + } + k(e, t, s) { + const n = new Gm(); + for (const d of e) { + if (d.main || d.browser) { + n.set(d.identifier, d); + } + } + for (const d of this.d.getAllExtensionDescriptions()) { + if (d.main || d.browser) { + const h = this.a.get(d.identifier); + if (h && h.kind === t) { + n.set(d.identifier, d); + } + } + } + const r = new Gm(); + let o = 0; + for (const [d, h] of n) { + r.set(h.identifier, ++o); + } + const a = (d, h) => { + for (const [g, p] of r) { + if (p === d) { + r.set(g, h); + } + } + }; + for (const [d, h] of n) { + if (!h.extensionDependencies) { + continue; + } + const g = r.get(h.identifier); + for (const p of h.extensionDependencies) { + const b = r.get(p); + if (b && b !== g) { + a(b, g); + } + } + } + const l = new Map(); + let c = 0; + for (const [d, h] of n) { + const g = this.a.get(h.identifier); + if (g) { + const p = r.get(h.identifier); + l.set(p, g.affinity); + c = Math.max(c, g.affinity); + } + } + if (!this.g.isExtensionDevelopment) { + const d = this.h.getValue("extensions.experimental.affinity") || {}; + const h = Object.keys(d); + const g = new Map(); + for (const p of h) { + const b = d[p]; + if (typeof b != "number" || b <= 0 || Math.floor(b) !== b) { + this.i.info(`Ignoring configured affinity for '${p}' because the value is not a positive integer.`); + continue; + } + const v = r.get(p); + if (!v) { + continue; + } + const y = l.get(v); + if (y) { + g.set(b, y); + continue; + } + const w = g.get(b); + if (w) { + l.set(v, w); + continue; + } + if (!s) { + this.i.info(`Ignoring configured affinity for '${p}' because extension host(s) are already running. Reload window.`); + continue; + } + const C = ++c; + g.set(b, C); + l.set(v, C); + } + } + const u = new Gm(); + for (const d of e) { + const h = r.get(d.identifier) || 0; + const g = l.get(h) || 0; + u.set(d.identifier, g); + } + if (c > 0 && s) { + for (let d = 1; d <= c; d++) { + const h = []; + for (const g of e) { + if (u.get(g.identifier) === d) { + h.push(g.identifier); + } + } + this.i.info(`Placing extension(s) ${h.map(g => g.value).join(", ")} on a separate extension host.`); + } + } + return { + affinities: u, + maxAffinity: c + }; + } + computeRunningLocation(e, t, s) { + return this.l(this.a, e, t, s).runningLocation; + } + l(e, t, s, n) { + t = t.filter(p => !e.has(p.identifier)); + s = s.filter(p => !e.has(p.identifier)); + const r = Vpr(t, s, p => this.readExtensionKinds(p), (p, b, v, y, w) => this.f.pickExtensionHostKind(p, b, v, y, w)); + const o = new Gm(); + for (const p of t) { + o.set(p.identifier, p); + } + for (const p of s) { + o.set(p.identifier, p); + } + const a = new Gm(); + const l = []; + const c = []; + for (const [p, b] of r) { + let v = null; + if (b === 1) { + const y = o.get(p); + if (y) { + l.push(y); + } + } else if (b === 2) { + const y = o.get(p); + if (y) { + c.push(y); + } + } else if (b === 3) { + v = new rMt(); + } + a.set(p, v); + } + const { + affinities: u, + maxAffinity: d + } = this.k(l, 1, n); + for (const p of l) { + const b = u.get(p.identifier) || 0; + a.set(p.identifier, new nMt(b)); + } + const { + affinities: h, + maxAffinity: g + } = this.k(c, 2, n); + for (const p of c) { + const b = h.get(p.identifier) || 0; + a.set(p.identifier, new KDe(b)); + } + for (const [p, b] of e) { + if (b) { + a.set(p, b); + } + } + return { + runningLocation: a, + maxLocalProcessAffinity: d, + maxLocalWebWorkerAffinity: g + }; + } + initializeRunningLocation(e, t) { + const { + runningLocation: s, + maxLocalProcessAffinity: n, + maxLocalWebWorkerAffinity: r + } = this.l(this.a, e, t, true); + this.a = s; + this.b = n; + this.c = r; + } + deltaExtensions(e, t) { + const s = new Gm(); + for (const n of t) { + const r = n; + s.set(r, this.a.get(r) || null); + this.a.delete(r); + } + this.m(e); + return s; + } + m(e) { + const t = []; + const s = []; + for (const o of e) { + const a = this.readExtensionKinds(o); + const l = o.extensionLocation.scheme === me.vscodeRemote; + const c = this.f.pickExtensionHostKind(o.identifier, a, !l, l, 0); + let u = null; + if (c === 1) { + t.push(o); + } else if (c === 2) { + s.push(o); + } else if (c === 3) { + u = new rMt(); + } + this.a.set(o.identifier, u); + } + const { + affinities: n + } = this.k(t, 1, false); + for (const o of t) { + const a = n.get(o.identifier) || 0; + this.a.set(o.identifier, new nMt(a)); + } + const { + affinities: r + } = this.k(s, 2, false); + for (const o of s) { + const a = r.get(o.identifier) || 0; + this.a.set(o.identifier, new KDe(a)); + } + } +}; +_5i = __decorate([__param(2, Wn), __param(3, ve), __param(4, Bt), __param(5, f0)], _5i); +function g2t(i, e, t, { + environmentService: s +}) { + return i.filter(n => { + let r = e.get(n.identifier); + if (!r || s.shadowWindowForWorkspaceId && !s.shadowWindowForWorkspaceId.startsWith(R5t) && !N5t.includes(n.identifier._lower) || A1(s.remoteAuthority) && n.identifier._lower === "vscode.json-language-features") { + return false; + } else { + return r && t(r); + } + }); +} +function njo(i, e, t, { + environmentService: s +}) { + return i.filter(n => { + let r = e.get(n); + if (!r || s.shadowWindowForWorkspaceId && !s.shadowWindowForWorkspaceId.startsWith(R5t) && !N5t.includes(n._lower) || A1(s.remoteAuthority) && n._lower === "vscode.json-language-features") { + return false; + } else { + return r && t(r); + } + }); +} +rn(); +nt(); +pe(); +q(); +te(); +Zt(); +rn(); +var B5i = class extends H { + get pid() { + if (this.f) { + return this.f.pid; + } else { + return null; + } + } + get kind() { + return this.b.runningLocation.kind; + } + get startup() { + return this.b.startup; + } + get friendyName() { + return B6s(this.kind, this.pid); + } + constructor(e, t, s, n) { + super(); + this.h = t; + this.j = s; + this.m = n; + this.a = this.D(new B()); + this.onDidChangeResponsiveState = this.a.event; + this.b = e; + this.onDidExit = e.onExit; + this.c = new YS(); + this.f = null; + this.g = null; + } + n(e) { + this.m.info(`Creating lazy extension host (${this.friendyName}). Reason: ${e}`); + this.f = this.D(this.j.createInstance(xmt, this.b, [], this.h)); + this.D(this.f.onDidChangeResponsiveState(t => this.a.fire(t))); + return this.f; + } + async q(e) { + if (this.f) { + return this.f; + } + const t = this.n(e); + await t.start(this.g.versionId, this.g.allExtensions, this.g.myExtensions); + return t; + } + async ready() { + await this.c.wait(); + if (this.f) { + await this.f.ready(); + } + } + async disconnect() { + await this.f?.disconnect(); + } + representsRunningLocation(e) { + return this.b.runningLocation.equals(e); + } + async deltaExtensions(e) { + await this.c.wait(); + if (this.f) { + return this.f.deltaExtensions(e); + } + this.g.delta(e); + if (e.myToAdd.length > 0) { + await this.n(`contains ${e.myToAdd.length} new extension(s) (installed or enabled): ${e.myToAdd.map(s => s.value)}`).start(this.g.versionId, this.g.allExtensions, this.g.myExtensions); + return; + } + } + containsExtension(e) { + return this.b.extensions?.containsExtension(e) ?? false; + } + async activate(e, t) { + await this.c.wait(); + if (this.f) { + return this.f.activate(e, t); + } else { + return false; + } + } + async activateByEvent(e, t) { + if (t === 1) { + if (this.f) { + return this.f.activateByEvent(e, t); + } else { + return undefined; + } + } + await this.c.wait(); + if (this.f) { + return this.f.activateByEvent(e, t); + } + } + activationEventIsDone(e) { + if (this.c.isOpen()) { + if (this.f) { + return this.f.activationEventIsDone(e); + } else { + return true; + } + } else { + return false; + } + } + async getInspectPort(e) { + await this.c.wait(); + return this.f?.getInspectPort(e); + } + async resolveAuthority(e, t) { + await this.c.wait(); + if (this.f) { + return this.f.resolveAuthority(e, t); + } else { + return { + type: "error", + error: { + message: "Cannot resolve authority", + code: kE.Unknown, + detail: undefined + } + }; + } + } + async getCanonicalURI(e, t) { + await this.c.wait(); + if (this.f) { + return this.f.getCanonicalURI(e, t); + } + throw new Error("Cannot resolve canonical URI"); + } + async start(e, t, s) { + if (s.length > 0) { + const r = this.n(`contains ${s.length} extension(s): ${s.map(o => o.value)}.`).start(e, t, s); + this.c.open(); + return r; + } + this.g = new ine(e, t, s); + this.c.open(); + } + async extensionTestsExecute() { + await this.c.wait(); + return (await this.q("execute tests.")).extensionTestsExecute(); + } + async setRemoteEnvironment(e) { + await this.c.wait(); + if (this.f) { + return this.f.setRemoteEnvironment(e); + } + } +}; +B5i = __decorate([__param(2, re), __param(3, Bt)], B5i); +da(); +Wc(); +var U5i; +var W5i = Object.hasOwnProperty; +var rjo = Promise.resolve(undefined); +var ojo = new $r("anysphere.cursor-always-local"); +var ajo = new $r("vscodevim.vim"); +var V5i = U5i = class extends H { + constructor(e, t, s, n, r, o, a, l, c, u, d, h, g, p, b, v, y, w, C, S, x) { + super(); + this.I = t; + this.J = s; + this.L = n; + this.M = r; + this.N = o; + this.O = a; + this.P = l; + this.Q = c; + this.R = u; + this.S = d; + this.U = h; + this.W = g; + this.X = p; + this.Y = b; + this.Z = v; + this.$ = y; + this.ab = w; + this.bb = C; + this.cb = S; + this.db = x; + this.c = this.D(new B()); + this.onDidRegisterExtensions = this.c.event; + this.f = this.D(new B()); + this.onDidChangeExtensionsStatus = this.f.event; + this.g = this.D(new B({ + leakWarningThreshold: 400 + })); + this.onDidChangeExtensions = this.g.event; + this.h = this.D(new B()); + this.onWillActivateByEvent = this.h.event; + this.j = this.D(new B()); + this.onDidChangeResponsiveChange = this.j.event; + this.m = this.D(new B()); + this.onWillStop = this.m.event; + this.n = new gjo(); + this.q = new Zqo(this.n); + this.s = new YS(); + this.t = new Gm(); + this.u = new Set(); + this.y = new xAn(); + this.C = []; + this.F = false; + this.G = this.D(new ljo()); + this.H = 0; + this.a = e.hasLocalProcess; + this.b = e.allowRemoteExtensionsInLocalWebWorker; + this.D(this.R.onWillActivateFileSystemProvider(k => { + if (k.scheme !== me.vscodeRemote) { + k.join(this.activateByEvent(`onFileSystem:${k.scheme}`)); + } + })); + this.w = new _5i(this.q, this.L, this.O, this.X, this.Z, this.Y); + this.D(this.Q.onEnablementChanged(k => { + const E = []; + const D = []; + for (const P of k) { + if (this.Hb(P)) { + E.push(P); + } else { + D.push(P); + } + } + if (Ry) { + this.Z.info(`AbstractExtensionService.onEnablementChanged fired for ${k.map(P => P.identifier.id).join(", ")}`); + } + this.fb(new fde(E, D)); + })); + this.D(this.U.onDidChangeProfile(({ + added: k, + removed: E + }) => { + if (k.length || E.length) { + if (Ry) { + this.Z.info("AbstractExtensionService.onDidChangeProfile fired"); + } + this.fb(new fde(k, E)); + } + })); + this.D(this.U.onDidEnableExtensions(k => { + if (k.length) { + if (Ry) { + this.Z.info("AbstractExtensionService.onDidEnableExtensions fired"); + } + this.fb(new fde(k, [])); + } + })); + this.D(this.U.onDidInstallExtensions(k => { + const E = []; + for (const { + local: D, + operation: P + } of k) { + if (D && D.isValid && P !== 4 && this.Hb(D)) { + E.push(D); + } + } + if (E.length) { + if (Ry) { + this.Z.info(`AbstractExtensionService.onDidInstallExtensions fired for ${E.map(D => D.identifier.id).join(", ")}`); + } + this.fb(new fde(E, [])); + } + })); + this.D(this.U.onDidUninstallExtension(k => { + if (!k.error) { + if (Ry) { + this.Z.info(`AbstractExtensionService.onDidUninstallExtension fired for ${k.identifier.id}`); + } + this.fb(new fde([], [k.identifier.id])); + } + })); + this.D(this.bb.onWillShutdown(k => { + if (this.$.getConnection()) { + k.join(async () => { + try { + await this.$.endConnection(); + await this.vb(); + this.$.getConnection()?.dispose(); + } catch { + this.Z.warn("Error while disconnecting remote agent"); + } + }, { + id: "join.disconnectRemote", + label: f(12892, null), + order: Agt.Last + }); + } else { + k.join(this.vb(), { + id: "join.stopExtensionHosts", + label: f(12893, null) + }); + } + })); + } + eb(e) { + return this.G.getByKind(e); + } + async fb(e) { + this.C.push(e); + if (this.F) { + return; + } + let t = null; + try { + this.F = true; + await this.s.wait(); + t = await this.q.acquireLock("handleDeltaExtensions"); + while (this.C.length > 0) { + const s = this.C.shift(); + await this.gb(t, s.toAdd, s.toRemove); + } + } finally { + this.F = false; + t?.dispose(); + } + } + async gb(e, t, s) { + if (Ry) { + this.Z.info(`AbstractExtensionService._deltaExtensions: toAdd: [${t.map(a => a.identifier.id).join(",")}] toRemove: [${s.map(a => typeof a == "string" ? a : a.identifier.id).join(",")}]`); + } + let n = []; + for (let a = 0, l = s.length; a < l; a++) { + const c = s[a]; + const u = typeof c == "string" ? c : c.identifier.id; + const d = typeof c == "string" ? null : c; + const h = this.q.getExtensionDescription(u); + if (h) { + if (!d || h.extensionLocation.scheme === d.location.scheme) { + if (this.canRemoveExtension(h)) { + n.push(h); + } + } + } + } + const r = []; + for (let a = 0, l = t.length; a < l; a++) { + const c = t[a]; + const u = T5(c, false); + if (u && this.jb(u, n)) { + r.push(u); + } + } + if (r.length === 0 && n.length === 0) { + return; + } + const o = this.q.deltaExtensions(e, r, n.map(a => a.identifier)); + this.g.fire({ + added: r, + removed: n + }); + n = n.concat(o.removedDueToLooping); + if (o.removedDueToLooping.length > 0) { + this.N.notify({ + severity: es.Error, + message: f(12894, null, o.removedDueToLooping.map(a => `'${a.identifier.value}'`).join(", ")) + }); + } + this.I.updateEnabledApiProposals(r); + this.Ib([].concat(r).concat(n), false); + await this.hb(o.versionId, r, n.map(a => a.identifier)); + await this.kb(r); + for (let a = 0; a < r.length; a++) { + this.lb(r[a]); + } + } + async hb(e, t, s) { + const n = this.w.deltaExtensions(t, s); + const r = this.G.map(o => this.ib(o, e, t, s, n)); + await Promise.all(r); + } + async ib(e, t, s, n, r) { + const o = this.w.filterByExtensionHostManager(s, e); + const a = njo(n, r, c => e.representsRunningLocation(c), { + environmentService: this.O + }); + const l = KJ.createActivationEventsMap(s); + if (Ry) { + const c = d => d.map(h => h.identifier.value).join(","); + const u = d => d.map(h => h.value).join(","); + this.Z.info(`AbstractExtensionService: Calling deltaExtensions: toRemove: [${u(n)}], toAdd: [${c(s)}], myToRemove: [${u(a)}], myToAdd: [${c(o)}],`); + } + await e.deltaExtensions({ + versionId: t, + toRemove: n, + toAdd: s, + addActivationEvents: l, + myToRemove: a, + myToAdd: o.map(c => c.identifier) + }); + } + canAddExtension(e) { + return this.jb(e, []); + } + jb(e, t) { + if (this.q.getExtensionDescriptionByIdOrUUID(e.identifier, e.id) && !t.some(l => $r.equals(e.identifier, l.identifier))) { + return false; + } + const n = this.w.readExtensionKinds(e); + const r = e.extensionLocation.scheme === me.vscodeRemote; + return this.L.pickExtensionHostKind(e.identifier, n, !r, r, 0) !== null; + } + canRemoveExtension(e) { + const t = this.q.getExtensionDescription(e.identifier); + return !!t && !this.t.get(t.identifier)?.activationStarted; + } + registerHotfixExtensionsProvider(e) { + this.z = e; + } + async kb(e) { + if (this.z) { + await this.z(e); + } + } + async lb(e) { + let t = false; + let s = null; + let n = false; + const r = this.n.readActivationEvents(e); + for (const o of r) { + if (this.u.has(o)) { + t = true; + s = o; + break; + } + if (o === "*") { + t = true; + s = o; + break; + } + if (/^workspaceContains/.test(o)) { + n = true; + } + if (o === "onStartupFinished") { + t = true; + s = o; + break; + } + } + if (t) { + await Promise.all(this.G.map(o => o.activate(e.identifier, { + startup: false, + extensionId: e.identifier, + activationEvent: s + }))).then(() => {}); + } else if (n) { + const o = await this.W.getCompleteWorkspace(); + const a = !!this.O.remoteAuthority; + const l = { + logService: this.Z, + folders: o.folders.map(u => u.uri), + forceUsingSearch: a, + exists: u => this.R.exists(u), + checkExists: (u, d, h) => this.M.invokeFunction(g => Obi(g, u, d, h)) + }; + const c = await sZr(l, e); + if (!c) { + return; + } + await Promise.all(this.G.map(u => u.activate(e.identifier, { + startup: false, + extensionId: e.identifier, + activationEvent: c.activationEvent + }))).then(() => {}); + } + } + async mb() { + Dr("code/willLoadExtensions"); + this.xb(true, []); + const e = await this.q.acquireLock("_initialize"); + try { + await this.nb(e); + const t = this.q.getSnapshot(); + for (const s of this.G) { + if (s.startup !== 1) { + const n = this.w.filterByExtensionHostManager(t.extensions, s); + s.start(t.versionId, t.extensions, n.map(r => r.identifier)); + } + } + } finally { + e.dispose(); + } + this.qb(); + Dr("code/didLoadExtensions"); + await this.ob(); + } + async nb(e) { + let t = []; + let s = []; + let n = []; + for await (const d of this.Rb()) { + if (d instanceof yAn) { + t = p2t(this.Z, this.Q, this.I, d.extensions, false); + this.q.deltaExtensions(e, t, []); + this.Ib(t, true); + } + if (d instanceof wAn) { + s = p2t(this.Z, this.Q, this.I, d.extensions, false); + } + if (d instanceof CAn) { + n = p2t(this.Z, this.Q, this.I, d.extensions, false); + } + } + this.w.initializeRunningLocation(s, n); + this.xb(true, []); + const r = this.b ? this.w.filterByExtensionHostKind(n, 2) : []; + const o = this.a ? this.w.filterByExtensionHostKind(s, 1) : []; + const a = this.w.filterByExtensionHostKind(s, 2); + n = this.w.filterByExtensionHostKind(n, 3); + for (const d of r) { + if (!hjo(a, d.identifier)) { + a.push(d); + } + } + const l = n.concat(o).concat(a); + let c = l; + if (t.length && (c = l.filter(d => !t.some(h => $r.equals(h.identifier, d.identifier) && h.extensionLocation.toString() === d.extensionLocation.toString())), l.length < c.length + t.length)) { + const d = t.filter(h => !l.some(g => $r.equals(g.identifier, h.identifier) && g.extensionLocation.toString() === h.extensionLocation.toString())); + if (d.length) { + this.q.deltaExtensions(e, [], d.map(h => h.identifier)); + this.Ib(d, true); + } + } + const u = this.q.deltaExtensions(e, c, []); + if (u.removedDueToLooping.length > 0) { + this.N.notify({ + severity: es.Error, + message: f(12895, null, u.removedDueToLooping.map(d => `'${d.identifier.value}'`).join(", ")) + }); + } + this.Ib(this.q.getAllExtensionDescriptions(), false); + } + async ob() { + if (!this.O.isExtensionDevelopment || !this.O.extensionTestsLocationURI) { + return; + } + const e = this.pb(this.O.extensionTestsLocationURI); + if (!e) { + const s = f(12896, null, this.O.extensionTestsLocationURI.toString()); + console.error(s); + this.N.error(s); + return; + } + let t; + try { + t = await e.extensionTestsExecute(); + if (Ry) { + this.Z.info(`Extension host test runner exit code: ${t}`); + } + } catch (s) { + if (Ry) { + this.Z.error("Extension host test runner error", s); + } + console.error(s); + t = 1; + } + this.Sb(t); + } + pb(e) { + let t = null; + for (const s of this.q.getAllExtensionDescriptions()) { + if (Dw(e, s.extensionLocation)) { + t = this.w.getRunningLocation(s.identifier); + break; + } + } + if (t === null) { + if (e.scheme === me.vscodeRemote) { + t = new rMt(); + } else { + t = new nMt(0); + } + } + if (t !== null) { + return this.G.getByRunningLocation(t); + } else { + return null; + } + } + qb() { + this.s.open(); + this.c.fire(undefined); + this.f.fire(this.q.getAllExtensionDescriptions().map(e => e.identifier)); + } + async rb(e) { + for (let s = 1;; s++) { + try { + return this.tb(e); + } catch (n) { + if ($R.isNoResolverFound(n) || $R.isNotAvailable(n) || s >= 5) { + throw n; + } + } + } + } + async sb() { + const e = this.O.remoteAuthority; + if (e) { + this.cb._clearResolvedAuthority(e); + try { + const t = await this.tb(e); + this.cb._setResolvedAuthority(t.authority, t.options); + } catch (t) { + this.cb._setResolvedAuthorityError(e, t); + } + } + } + async tb(e) { + const t = PG(e); + const s = ic.create(false); + this.Z.info(`Invoking resolveAuthority(${t})...`); + try { + Dr(`code/willResolveAuthority/${t}`); + const n = await this.Tb(e); + Dr(`code/didResolveAuthorityOK/${t}`); + this.Z.info(`resolveAuthority(${t}) returned '${n.authority.connectTo}' after ${s.elapsed()} ms`); + return n; + } catch (n) { + Dr(`code/didResolveAuthorityError/${t}`); + this.Z.error(`resolveAuthority(${t}) returned an error after ${s.elapsed()} ms`, n); + throw n; + } + } + async ub(e, t) { + const s = this.eb(e); + if (s.length === 0) { + throw new Error("Cannot resolve authority"); + } + this.H++; + const n = await Promise.all(s.map(o => o.resolveAuthority(t, this.H))); + let r = null; + for (const o of n) { + if (o.type === "ok") { + return o.value; + } + if (!r) { + r = o; + continue; + } + const a = r.error.code === kE.Unknown; + const l = o.error.code === kE.Unknown; + if (a && !l) { + r = o; + } + } + throw new $R(r.error.message, r.error.code, r.error.detail); + } + stopExtensionHosts(e, t) { + return this.wb(e, t); + } + async vb() { + const e = []; + for (const t of this.t.values()) { + if (t.activationStarted) { + e.push(t.id); + } + } + await this.G.stopAllInReverse(); + for (const t of this.t.values()) { + t.clearRuntimeStatus(); + } + if (e.length > 0) { + this.f.fire(e); + } + } + async wb(e, t = false) { + if (t && this.O.isExtensionDevelopment) { + return false; + } + const s = []; + const n = new Set(); + this.m.fire({ + reason: e, + auto: t, + veto(o, a) { + s.push(o); + if (typeof o == "boolean") { + if (o === true) { + n.add(a); + } + } else { + o.then(l => { + if (l) { + n.add(a); + } + }).catch(l => { + n.add(f(12897, null, a, ou(l))); + }); + } + } + }); + const r = await zMn(s, o => this.Z.error(o)); + if (!r) { + await this.vb(); + } else if (!t) { + const o = Array.from(n); + this.Z.warn(`Extension host was not stopped because of veto (stop reason: ${e}, veto reason: ${o.join(", ")})`); + await this.db.warn(f(12898, null, e), o.length === 1 ? f(12899, null, o[0]) : f(12900, null, o.join(` + -`))); + } + return !r; + } + xb(e, t) { + const s = []; + for (let n = 0; n <= this.w.maxLocalProcessAffinity; n++) { + s.push(new nMt(n)); + } + for (let n = 0; n <= this.w.maxLocalWebWorkerAffinity; n++) { + s.push(new KDe(n)); + } + s.push(new rMt()); + for (const n of s) { + if (this.G.getByRunningLocation(n)) { + continue; + } + const r = this.yb(n, e, t); + if (r) { + const [o, a] = r; + this.G.add(o, a); + } + } + } + yb(e, t, s) { + const n = this.J.createExtensionHost(this.w, e, t); + if (!n) { + return null; + } + const r = this.zb(n, s); + const o = new Q(); + o.add(r.onDidExit(([a, l]) => this.Ab(r, a, l))); + o.add(r.onDidChangeResponsiveState(a => { + this.Z.info(`Extension host (${r.friendyName}) is ${a === 0 ? "responsive" : "unresponsive"}.`); + this.j.fire({ + extensionHostKind: r.kind, + isResponsive: a === 0, + getInspectListener: l => r.getInspectPort(l) + }); + })); + return [r, o]; + } + zb(e, t) { + const s = this.Mb(e); + if (e.startup === 3 && t.length === 0) { + return this.M.createInstance(B5i, e, s); + } else { + return this.M.createInstance(xmt, e, t, s); + } + } + Ab(e, t, s) { + if (!Bae(this.O).isExtensionDevHost) { + this.Bb(e, t, s); + return; + } + this.Sb(t); + } + Bb(e, t, s) { + console.error(`Extension host (${e.friendyName}) terminated unexpectedly. Code: ${t}, Signal: ${s}`); + if (e.kind === 1) { + this.vb(); + } else if (e.kind === 3) { + if (s) { + this.Db(e, s); + } + this.G.stopOne(e); + } + } + Cb(e) { + return new Promise((t, s) => { + const n = setTimeout(() => { + s(new Error("getExtensionHostExitInfo timed out")); + }, 2000); + this.$.getExtensionHostExitInfo(e).then(r => { + clearTimeout(n); + t(r); + }, s); + }); + } + async Db(e, t) { + try { + const s = await this.Cb(t); + if (s) { + this.Z.error(`Extension host (${e.friendyName}) terminated unexpectedly with code ${s.code}.`); + } + this.Eb(e); + this.y.registerCrash(); + if (this.y.shouldAutomaticallyRestart()) { + this.Z.info("Automatically restarting the remote extension host."); + this.N.status(f(12901, null), { + hideAfter: 5000 + }); + this.xb(false, Array.from(this.u.keys())); + } else { + this.N.prompt(es.Error, f(12902, null), [{ + label: f(12903, null), + run: () => { + this.xb(false, Array.from(this.u.keys())); + } + }]); + } + } catch {} + } + Eb(e) { + const t = []; + for (const s of this.t.values()) { + if (s.activationStarted && e.containsExtension(s.id)) { + t.push(s.id); + } + } + if (t.length > 0) { + this.Z.error(`Extension host (${e.friendyName}) terminated unexpectedly. The following extensions were running: ${t.map(s => s.value).join(", ")}`); + } else { + this.Z.error(`Extension host (${e.friendyName}) terminated unexpectedly. No extensions were activated.`); + } + } + async startExtensionHosts(e) { + await this.vb(); + if (e) { + await this.fb(new fde(e.toAdd, e.toRemove)); + } + const t = await this.q.acquireLock("startExtensionHosts"); + try { + this.xb(false, Array.from(this.u.keys())); + const s = this.eb(1); + await Promise.all(s.map(n => n.ready())); + } finally { + t.dispose(); + } + } + activateByEvent(e, t = 0) { + if (this.s.isOpen()) { + this.u.add(e); + if (this.q.containsActivationEvent(e)) { + return this.Fb(e, t); + } else { + return rjo; + } + } else { + this.u.add(e); + if (t === 1) { + return this.Fb(e, t); + } else { + return this.s.wait().then(() => this.Fb(e, t)); + } + } + } + Fb(e, t) { + const s = Promise.all(this.G.map(n => n.activateByEvent(e, t))).then(() => {}); + this.h.fire({ + event: e, + activation: s + }); + return s; + } + activateById(e, t) { + return this._activateById(e, t); + } + activationEventIsDone(e) { + if (this.s.isOpen()) { + if (this.q.containsActivationEvent(e)) { + return this.G.every(t => t.activationEventIsDone(e)); + } else { + return true; + } + } else { + return false; + } + } + whenInstalledExtensionsRegistered() { + return this.s.wait(); + } + get extensions() { + return this.q.getAllExtensionDescriptions(); + } + Gb() { + return this.s.wait().then(() => this.q.getSnapshot()); + } + getExtension(e) { + return this.s.wait().then(() => this.q.getExtensionDescription(e)); + } + readExtensionPointContributions(e) { + return this.s.wait().then(() => { + const t = this.q.getAllExtensionDescriptions(); + const s = []; + for (const n of t) { + if (n.contributes && W5i.call(n.contributes, e.name)) { + s.push(new PFs(n, n.contributes[e.name])); + } + } + return s; + }); + } + getExtensionsStatus() { + const e = Object.create(null); + if (this.q) { + const t = this.q.getAllExtensionDescriptions(); + for (const s of t) { + const n = this.t.get(s.identifier); + e[s.identifier.value] = { + id: s.identifier, + messages: n?.messages ?? [], + activationStarted: n?.activationStarted ?? false, + activationTimes: n?.activationTimes ?? undefined, + runtimeErrors: n?.runtimeErrors ?? [], + runningLocation: this.w.getRunningLocation(s.identifier) + }; + } + } + return e; + } + async getInspectPorts(e, t) { + return (await Promise.all(this.eb(e).map(async n => { + let r = await n.getInspectPort(t); + if (r !== undefined) { + const o = n.containsExtension(ojo) ? "cursor-always-local" : n.containsExtension(ajo) ? "vscode-vim" : "unknown"; + r = { + ...r, + devtoolsLabel: `${n.friendyName} ext: ${o}` + }; + } + return r; + }))).filter(to); + } + async setRemoteEnvironment(e) { + await this.G.map(t => t.setRemoteEnvironment(e)); + } + Hb(e) { + try { + return this.Q.isEnabled(e); + } catch { + return false; + } + } + Ib(e, t) { + const s = Object.create(null); + for (const a of e) { + if (a.contributes) { + for (const l in a.contributes) { + if (W5i.call(a.contributes, l)) { + s[l] = true; + } + } + } + } + const n = a => this.Kb(a); + const r = this.q.getAllExtensionDescriptions(); + const o = su.getExtensionPoints(); + Dr(t ? "code/willHandleResolverExtensionPoints" : "code/willHandleExtensionPoints"); + for (const a of o) { + if (s[a.name] && (!t || a.canHandleResolver)) { + Dr(`code/willHandleExtensionPoint/${a.name}`); + U5i.Lb(a, r, n); + Dr(`code/didHandleExtensionPoint/${a.name}`); + } + } + Dr(t ? "code/didHandleResolverExtensionPoints" : "code/didHandleExtensionPoints"); + } + Jb(e) { + if (!this.t.has(e)) { + this.t.set(e, new fjo(e)); + } + return this.t.get(e); + } + Kb(e) { + this.Jb(e.extensionId).addMessage(e); + const s = this.q.getExtensionDescription(e.extensionId); + const n = `[${e.extensionId.value}]: ${e.message}`; + if (e.type === es.Error) { + if (s && s.isUnderDevelopment) { + this.N.notify({ + severity: es.Error, + message: n + }); + } + this.Z.error(n); + } else if (e.type === es.Warning) { + if (s && s.isUnderDevelopment) { + this.N.notify({ + severity: es.Warning, + message: n + }); + } + this.Z.warn(n); + } else { + this.Z.info(n); + } + if (e.extensionId && this.O.isBuilt && !this.O.isExtensionDevelopment) { + const { + type: r, + extensionId: o, + extensionPointId: a, + message: l + } = e; + this.P.publicLog2("extensionsMessage", { + type: r, + extensionId: o.value, + extensionPointId: a, + message: l + }); + } + } + static Lb(e, t, s) { + const n = []; + for (const r of t) { + if (r.contributes && W5i.call(r.contributes, e.name)) { + n.push({ + description: r, + value: r.contributes[e.name], + collector: new nEr(s, r, e.name) + }); + } + } + e.acceptUsers(n); + } + Mb(e) { + return { + _activateById: (t, s) => this._activateById(t, s), + _onWillActivateExtension: t => this.Nb(t, e.runningLocation), + _onDidActivateExtension: (t, s, n, r, o) => this.Ob(t, s, n, r, o), + _onDidActivateExtensionError: (t, s) => this.Pb(t, s), + _onExtensionRuntimeError: (t, s) => this.Qb(t, s) + }; + } + async _activateById(e, t) { + if (!(await Promise.all(this.G.map(r => r.activate(e, t)))).some(r => r)) { + throw new Error(`Unknown extension ${e.value}`); + } + } + Nb(e, t) { + this.w.set(e, t); + this.Jb(e).onWillActivate(); + } + Ob(e, t, s, n, r) { + this.Jb(e).setActivationTimes(new TFs(t, s, n, r)); + this.f.fire([e]); + } + Pb(e, t) { + this.P.publicLog2("extensionActivationError", { + extensionId: e.value, + error: t.message + }); + } + Qb(e, t) { + this.Jb(e).addRuntimeError(t); + this.f.fire([e]); + } +}; +V5i = U5i = __decorate([__param(4, re), __param(5, ni), __param(6, Wn), __param(7, Ot), __param(8, Rd), __param(9, Ct), __param(10, ys), __param(11, DS), __param(12, kt), __param(13, ve), __param(14, f0), __param(15, Bt), __param(16, al), __param(17, IIt), __param(18, Yo), __param(19, hv), __param(20, Js)], V5i); +var ljo = class extends H { + constructor() { + super(...arguments); + this.a = []; + } + dispose() { + for (let i = this.a.length - 1; i >= 0; i--) { + const e = this.a[i]; + e.extensionHost.disconnect(); + e.dispose(); + } + this.a = []; + super.dispose(); + } + add(i, e) { + this.a.push(new cjo(i, e)); + } + async stopAllInReverse() { + for (let i = this.a.length - 1; i >= 0; i--) { + const e = this.a[i]; + await e.extensionHost.disconnect(); + e.dispose(); + } + this.a = []; + } + async stopOne(i) { + const e = this.a.findIndex(t => t.extensionHost === i); + if (e >= 0) { + this.a.splice(e, 1); + await i.disconnect(); + i.dispose(); + } + } + getByKind(i) { + return this.filter(e => e.kind === i); + } + getByRunningLocation(i) { + for (const e of this.a) { + if (e.extensionHost.representsRunningLocation(i)) { + return e.extensionHost; + } + } + return null; + } + *[Symbol.iterator]() { + for (const i of this.a) { + yield i.extensionHost; + } + } + map(i) { + return this.a.map(e => i(e.extensionHost)); + } + every(i) { + return this.a.every(e => i(e.extensionHost)); + } + filter(i) { + return this.a.filter(e => i(e.extensionHost)).map(e => e.extensionHost); + } +}; +var cjo = class { + constructor(i, e) { + this.extensionHost = i; + this.disposableStore = e; + } + dispose() { + this.disposableStore.dispose(); + this.extensionHost.dispose(); + } +}; +var yAn = class { + constructor(i) { + this.extensions = i; + } +}; +var wAn = class { + constructor(i) { + this.extensions = i; + } +}; +var CAn = class { + constructor(i) { + this.extensions = i; + } +}; +var fde = class { + constructor(i, e) { + this.toAdd = i; + this.toRemove = e; + } +}; +function ujo(i) { + return !!i.activationEvents?.some(e => e.startsWith("onResolveRemoteAuthority:")); +} +function p2t(i, e, t, s, n) { + t.updateEnabledApiProposals(s); + return SAn(i, e, s, n); +} +function SAn(i, e, t, s) { + const n = []; + const r = []; + const o = []; + for (const l of t) { + if (l.isUnderDevelopment) { + n.push(l); + } else { + r.push(l); + o.push(oC(l)); + } + } + const a = e.getEnablementStates(o, s ? { + trusted: true + } : undefined); + for (let l = 0; l < a.length; l++) { + if (e.isEnabledEnablementState(a[l])) { + n.push(r[l]); + } else if (Ry) { + i.info(`filterEnabledExtensions: extension '${r[l].identifier.value}' is disabled`); + } + } + return n; +} +function djo(i, e, t, s) { + return SAn(i, e, [t], s).includes(t); +} +function hjo(i, e) { + for (const t of i) { + if ($r.equals(t.identifier, e)) { + return true; + } + } + return false; +} +var fjo = class { + get messages() { + return this.a; + } + get activationTimes() { + return this.b; + } + get runtimeErrors() { + return this.c; + } + get activationStarted() { + return this.d; + } + constructor(i) { + this.id = i; + this.a = []; + this.b = null; + this.c = []; + this.d = false; + } + clearRuntimeStatus() { + this.d = false; + this.b = null; + this.c = []; + } + addMessage(i) { + this.a.push(i); + } + setActivationTimes(i) { + this.b = i; + } + addRuntimeError(i) { + this.c.push(i); + } + onWillActivate() { + this.d = true; + } +}; +var xAn = class rUi { + constructor() { + this.c = []; + } + static { + this.a = 300000; + } + static { + this.b = 3; + } + d() { + const e = Date.now() - rUi.a; + while (this.c.length > 0 && this.c[0].timestamp < e) { + this.c.shift(); + } + } + registerCrash() { + this.d(); + this.c.push({ + timestamp: Date.now() + }); + } + shouldAutomaticallyRestart() { + this.d(); + return this.c.length < rUi.b; + } +}; +var gjo = class { + readActivationEvents(i) { + return KJ.readActivationEvents(i); + } +}; +var pjo = class extends H { + constructor() { + super(...arguments); + this.type = "markdown"; + } + shouldRender(i) { + return !!i.activationEvents; + } + render(i) { + const e = i.activationEvents || []; + const t = new hs(); + if (e.length) { + for (const s of e) { + t.appendMarkdown(`- \`${s}\` +`); + } + } + return { + data: t, + dispose: () => {} + }; + } +}; +Pe.as(Np.ExtensionFeaturesRegistry).registerExtensionFeature({ + id: "activationEvents", + label: f(12904, null), + access: { + canToggle: false + }, + renderer: new Os(pjo) +}); +rn(); +Jt(); +X(); +q(); +Sl(); +jo(); +Zt(); +kn(); +Ht(); +Rr(); +No(); +var H5i = class { + constructor(e, t, s) { + this.e = e; + this.f = t; + this.c = new Set((t.extensionEnabledProposedApi ?? []).map(n => $r.toKey(n))); + this.b = !t.isBuilt || t.isExtensionDevelopment && s.quality !== "stable" || this.c.size === 0 && Array.isArray(t.extensionEnabledProposedApi); + this.d = new Map(); + if (s.extensionEnabledApiProposals) { + for (const [n, r] of Object.entries(s.extensionEnabledApiProposals)) { + const o = $r.toKey(n); + const a = r.filter(l => eK[l] ? true : (e.warn(`Via 'product.json#extensionEnabledApiProposals' extension '${o}' wants API proposal '${l}' but that proposal DOES NOT EXIST. Likely, the proposal has been finalized (check 'vscode.d.ts') or was abandoned.`), false)); + this.d.set(o, a); + } + } + } + updateEnabledApiProposals(e) { + for (const t of e) { + this.g(t); + } + } + g(e) { + const t = $r.toKey(e.identifier); + if (Ac(e.enabledApiProposals)) { + e.enabledApiProposals = e.enabledApiProposals.filter(s => { + const n = !!eK[s]; + if (!n) { + this.e.error(`Extension '${t}' wants API proposal '${s}' but that proposal DOES NOT EXIST. Likely, the proposal has been finalized (check 'vscode.d.ts') or was abandoned.`); + } + return n; + }); + } + if (this.d.has(t)) { + const s = this.d.get(t); + const n = new Set(s); + const r = new Set(e.enabledApiProposals); + const o = new Set([...r].filter(a => !n.has(a))); + if (o.size > 0) { + this.e.error(`Extension '${t}' appears in product.json but enables LESS API proposals than the extension wants. +package.json (LOSES): ${[...r].join(", ")} +product.json (WINS): ${[...n].join(", ")}`); + if (this.f.isExtensionDevelopment) { + this.e.error(`Proceeding with EXTRA proposals (${[...o].join(", ")}) because extension is in development mode. Still, this EXTENSION WILL BE BROKEN unless product.json is updated.`); + s.push(...o); + } + } + e.enabledApiProposals = s; + return; + } + if (!this.b && !this.c.has(t)) { + if (!e.isBuiltin && Ac(e.enabledApiProposals)) { + this.e.error(`Extension '${e.identifier.value} CANNOT USE these API proposals '${e.enabledApiProposals?.join(", ") || "*"}'. You MUST start in extension development mode or use the --enable-proposed-api command line flag`); + e.enabledApiProposals = []; + } + } + } +}; +H5i = __decorate([__param(0, Bt), __param(1, Wn), __param(2, ys)], H5i); +var mjo = class extends H { + constructor() { + super(...arguments); + this.type = "markdown"; + } + shouldRender(i) { + return !!i.originalEnabledApiProposals?.length || !!i.enabledApiProposals?.length; + } + render(i) { + const e = i.originalEnabledApiProposals ?? i.enabledApiProposals ?? []; + const t = new hs(); + if (e.length) { + for (const s of e) { + t.appendMarkdown(`- \`${s}\` +`); + } + } + return { + data: t, + dispose: () => {} + }; + } +}; +Pe.as(Np.ExtensionFeaturesRegistry).registerExtensionFeature({ + id: "enabledApiProposals", + label: f(12907, null), + access: { + canToggle: false + }, + renderer: new Os(mjo) +}); +nr(); +pe(); +q(); +At(); +rt(); +jn(); +Zt(); +kn(); +ai(); +Zw(); +ii(); +Rr(); +var q5i = class extends H { + constructor(e, t, s, n, r, o, a, l, c, u, d, h, g) { + super(); + this.runningLocation = e; + this.j = t; + this.m = s; + this.n = n; + this.q = r; + this.r = o; + this.s = a; + this.t = l; + this.u = c; + this.w = u; + this.y = d; + this.z = h; + this.C = g; + this.pid = null; + this.startup = 1; + this.extensions = null; + this.a = this.D(new B()); + this.onExit = this.a.event; + this.g = false; + this.remoteAuthority = this.j.remoteAuthority; + this.b = null; + this.c = false; + this.f = false; + const p = Bae(this.q); + this.h = p.isExtensionDevHost; + } + start() { + const e = { + commit: this.z.commit, + quality: this.z.quality, + addressProvider: { + getAddress: async () => { + const { + authority: t + } = await this.w.resolveAuthority(this.j.remoteAuthority); + return { + connectTo: t.connectTo, + connectionToken: t.connectionToken + }; + } + }, + remoteSocketFactoryService: this.m, + signService: this.C, + logService: this.s, + ipcLogger: null, + extensionHostRemoteAuthority: this.j.remoteAuthority + }; + return this.w.resolveAuthority(this.j.remoteAuthority).then(t => { + const s = { + language: Uu, + debugId: this.q.debugExtensionHost.debugId, + break: this.q.debugExtensionHost.break, + port: this.q.debugExtensionHost.port, + env: { + ...this.q.debugExtensionHost.env, + ...t.options?.extensionHostEnv + } + }; + const n = this.q.extensionDevelopmentLocationURI; + let r = true; + if (n && n.length > 0 && n[0].scheme === me.file) { + r = false; + } + if (!r) { + s.break = false; + } + return O4o(e, s).then(o => { + this.D(o); + const { + protocol: a, + debugPort: l, + reconnectionToken: c + } = o; + const u = typeof l == "number"; + if (r && this.q.isExtensionDevelopment && this.q.debugExtensionHost.debugId && l) { + this.y.attachSession(this.q.debugExtensionHost.debugId, l, this.j.remoteAuthority); + } + a.onDidDispose(() => { + this.F(c); + }); + a.onSocketClose(() => { + if (this.h) { + this.F(c); + } + }); + return new Promise((d, h) => { + const g = setTimeout(() => { + h("The remote extension host took longer than 60s to send its ready message."); + }, 60000); + const p = a.onMessage(b => { + if (hde(b, 1)) { + this.G(u).then(v => { + a.send(Ii.fromString(JSON.stringify(v))); + }); + return; + } + if (hde(b, 0)) { + clearTimeout(g); + p.dispose(); + this.b = a; + d(a); + return; + } + console.error("received unexpected message during handshake phase from the extension host: ", b); + }); + }); + }); + }); + } + F(e) { + if (!this.c) { + this.c = true; + if (this.h && this.q.debugExtensionHost.debugId) { + this.y.close(this.q.debugExtensionHost.debugId); + } + if (!this.f) { + this.a.fire([0, e]); + } + } + } + async G(e) { + const t = await this.j.getInitData(); + this.extensions = t.extensions; + const s = this.n.getWorkspace(); + return { + commit: this.z.commit, + version: this.z.version, + vscodeVersion: this.z.vscodeVersion, + rendererPerformanceTimeOrigin: t.rendererPerformanceTimeOrigin, + quality: this.z.quality, + parentPid: t.pid, + environment: { + isExtensionDevelopmentDebug: e, + appRoot: t.appRoot, + appName: this.z.nameLong, + appHost: this.z.embedderIdentifier || "desktop", + appUriScheme: this.z.urlProtocol, + extensionTelemetryLogResource: this.q.extHostTelemetryLogFile, + isExtensionTelemetryLoggingOnly: cYt(this.z, this.q), + shadowWindowForWorkspaceId: this.q.shadowWindowForWorkspaceId, + bcIdForThisWindow: A1(this.q.remoteAuthority), + appLanguage: Uu, + extensionDevelopmentLocationURI: this.q.extensionDevelopmentLocationURI, + extensionTestsLocationURI: this.q.extensionTestsLocationURI, + globalStorageHome: t.globalStorageHome, + workspaceStorageHome: t.workspaceStorageHome, + extensionLogLevel: this.q.extensionLogLevel + }, + workspace: this.n.getWorkbenchState() === 1 ? null : { + configuration: s.configuration, + id: s.id, + name: this.u.getWorkspaceLabel(s), + transient: s.transient + }, + remote: { + isRemote: true, + authority: this.j.remoteAuthority, + connectionData: t.connectionData + }, + consoleForward: { + includeStack: false, + logNative: !!this.q.debugExtensionHost.debugId + }, + extensions: this.extensions.toSnapshot(), + telemetryInfo: { + sessionId: this.r.sessionId, + machineId: this.r.machineId, + macMachineId: this.r.macMachineId, + sqmId: this.r.sqmId, + devDeviceId: this.r.devDeviceId, + firstSessionDate: this.r.firstSessionDate, + msftInternal: this.r.msftInternal + }, + logLevel: this.s.getLevel(), + loggers: [...this.t.getRegisteredLoggers()], + logsLocation: t.extensionHostLogsPath, + autoStart: this.startup === 1, + uiKind: tn ? HQ.Web : HQ.Desktop + }; + } + getInspectPort() {} + enableInspectPort() { + return Promise.resolve(false); + } + async disconnect() { + if (this.b && !this.g) { + this.b.send(pAn(2)); + this.b.sendDisconnect(); + this.g = true; + await this.b.drain(); + } + } + dispose() { + super.dispose(); + this.f = true; + this.disconnect(); + if (this.b) { + this.b.getSocket().end(); + this.b = null; + } + } +}; +q5i = __decorate([__param(2, ske), __param(3, kt), __param(4, Wn), __param(5, Ot), __param(6, Bt), __param(7, Um), __param(8, Zs), __param(9, hv), __param(10, BDe), __param(11, ys), __param(12, H$t)], q5i); +rt(); +Sl(); +X(); +function bjo(i, e, t, s, n) { + const r = new Gm(); + i.forEach(o => { + const a = r.get(o.identifier); + if (a) { + n.warn(f(12991, null, a.extensionLocation.fsPath, o.extensionLocation.fsPath)); + } + r.set(o.identifier, o); + }); + e.forEach(o => { + const a = r.get(o.identifier); + if (a) { + if (a.isBuiltin) { + if (JHs(a.version, o.version)) { + n.warn(`Skipping extension ${o.extensionLocation.path} in favour of the builtin extension ${a.extensionLocation.path}.`); + return; + } + o.isBuiltin = true; + } else { + n.warn(f(12992, null, a.extensionLocation.fsPath, o.extensionLocation.fsPath)); + } + } else if (o.isBuiltin) { + n.warn(`Skipping obsolete builtin extension ${o.extensionLocation.path}`); + return; + } + r.set(o.identifier, o); + }); + t.forEach(o => { + const a = r.get(o.identifier); + if (a) { + n.warn(f(12993, null, a.extensionLocation.fsPath, o.extensionLocation.fsPath)); + } + r.set(o.identifier, o); + }); + s.forEach(o => { + n.info(f(12994, null, o.extensionLocation.fsPath)); + const a = r.get(o.identifier); + if (a && a.isBuiltin) { + o.isBuiltin = true; + } + r.set(o.identifier, o); + }); + return Array.from(r.values()); +} +Zt(); +Wa(); +X(); +Wi(); +nt(); +Ut(); +rn(); +Rr(); +var j5i = class { + constructor(e, t, s, n, r, o, a) { + this.c = e; + this.d = t; + this.f = s; + this.g = n; + this.h = r; + this.i = o; + this.j = a; + this.scannedExtensions = new Promise((l, c) => { + this.a = l; + this.b = c; + }); + } + async startScanningExtensions() { + try { + const e = await this.k(); + this.a(e); + } catch (e) { + this.b(e); + } + } + async k() { + try { + const e = Uu; + const t = await Promise.allSettled([this.f.scanSystemExtensions({ + language: e, + useCache: true, + checkControlFile: true + }), this.f.scanUserExtensions({ + language: e, + profileLocation: this.g.currentProfile.extensionsResource, + useCache: true + }), this.i.remoteAuthority ? [] : this.h.getInstalledWorkspaceExtensions(false)]); + let s = []; + let n = []; + let r = []; + let o = []; + let a = false; + if (t[0].status === "fulfilled") { + s = t[0].value; + } else { + a = true; + this.j.error("Error scanning system extensions:", cc(t[0].reason)); + } + if (t[1].status === "fulfilled") { + n = t[1].value; + } else { + a = true; + this.j.error("Error scanning user extensions:", cc(t[1].reason)); + } + if (t[2].status === "fulfilled") { + r = t[2].value; + } else { + a = true; + this.j.error("Error scanning workspace extensions:", cc(t[2].reason)); + } + try { + o = await this.f.scanExtensionsUnderDevelopment({ + language: e + }, [...s, ...n]); + } catch (g) { + this.j.error(g); + } + const l = s.map(g => e5i(g, false)); + const c = n.map(g => e5i(g, false)); + const u = r.map(g => T5(g, false)); + const d = o.map(g => e5i(g, true)); + const h = bjo(l, c, u, d, this.j); + if (!a) { + const g = this.f.onDidChangeCache(() => { + g.dispose(); + this.c.prompt(cs.Error, f(12995, null), [{ + label: f(12996, null), + run: () => this.d.reload() + }]); + }); + Da(5000).then(() => g.dispose()); + } + return h; + } catch (e) { + this.j.error("Error scanning installed extensions:"); + this.j.error(e); + return []; + } + } +}; +j5i = __decorate([__param(0, ni), __param(1, kr), __param(2, dPe), __param(3, Rc), __param(4, DS), __param(5, Wn), __param(6, Bt)], j5i); +nt(); +nr(); +Ut(); +pe(); +q(); +Jr(); +rt(); +fd(); +Le(); +Ps(); +X(); +jn(); +Zt(); +Wi(); +kn(); +ai(); +Zw(); +mu(); +ii(); +var kAn; +(function (i) { + i[i.IPC = 1] = "IPC"; + i[i.Socket = 2] = "Socket"; + i[i.MessagePort = 3] = "MessagePort"; +})(kAn ||= {}); +var vjo = class h3n { + static { + this.ENV_KEY = "VSCODE_EXTHOST_IPC_HOOK"; + } + constructor(e) { + this.pipeName = e; + this.type = 1; + } + serialize(e) { + e[h3n.ENV_KEY] = this.pipeName; + } +}; +var yjo = class f3n { + constructor() { + this.type = 2; + } + static { + this.ENV_KEY = "VSCODE_EXTHOST_WILL_SEND_SOCKET"; + } + serialize(e) { + e[f3n.ENV_KEY] = "1"; + } +}; +var EAn = class g3n { + constructor() { + this.type = 3; + } + static { + this.ENV_KEY = "VSCODE_WILL_SEND_MESSAGE_PORT"; + } + serialize(e) { + e[g3n.ENV_KEY] = "1"; + } +}; +function wjo(i) { + delete i[vjo.ENV_KEY]; + delete i[yjo.ENV_KEY]; + delete i[EAn.ENV_KEY]; +} +function Cjo(i, e) { + wjo(e); + i.serialize(e); +} +da(); +var Sjo = class { + get onStdout() { + return this.b.onDynamicStdout(this.a); + } + get onStderr() { + return this.b.onDynamicStderr(this.a); + } + get onMessage() { + return this.b.onDynamicMessage(this.a); + } + get onExit() { + return this.b.onDynamicExit(this.a); + } + constructor(i, e) { + this.b = e; + this.a = i; + } + start(i) { + return this.b.start(this.a, i); + } + enableInspectPort() { + return this.b.enableInspectPort(this.a); + } + kill() { + return this.b.kill(this.a); + } +}; +var z5i = class { + constructor(e, t, s, n, r, o, a, l, c, u, d, h, g, p, b, v, y, w) { + this.runningLocation = e; + this.startup = t; + this.m = s; + this.n = n; + this.p = r; + this.q = o; + this.s = a; + this.t = l; + this.u = c; + this.v = u; + this.w = d; + this.x = h; + this.y = g; + this.z = p; + this.A = b; + this.B = v; + this.C = y; + this.D = w; + this.pid = null; + this.remoteAuthority = null; + this.extensions = null; + this.a = new B(); + this.onExit = this.a.event; + this.b = new B(); + this.c = new Q(); + const C = Bae(this.t); + this.d = C.isExtensionDevHost; + this.f = C.isExtensionDevDebug; + this.g = C.isExtensionDevDebugBrk; + this.h = C.isExtensionDevTestFromCli; + this.i = false; + this.j = null; + this.k = null; + this.l = null; + this.c.add(this.a); + this.c.add(this.s.onWillShutdown(S => this.L(S))); + this.c.add(this.z.onClose(S => { + if (this.d && this.t.debugExtensionHost.debugId === S.sessionId) { + this.q.closeWindow(); + } + })); + this.c.add(this.z.onReload(S => { + if (this.d && this.t.debugExtensionHost.debugId === S.sessionId) { + this.A.reload(); + } + })); + } + dispose() { + if (!this.i) { + this.i = true; + this.c.dispose(); + } + } + start() { + if (this.i) { + throw new fl(); + } + this.l ||= this.E(); + return this.l; + } + async E() { + const [e, t, s] = await Promise.all([this.D.createExtensionHost(), this.F(), this.C.getShellEnv()]); + this.k = new Sjo(e.id, this.D); + const n = Oy(s, { + VSCODE_ESM_ENTRYPOINT: "vs/workbench/api/node/extensionHostProcess", + VSCODE_HANDLES_UNCAUGHT_ERRORS: true + }); + if (this.t.debugExtensionHost.env) { + Oy(n, this.t.debugExtensionHost.env); + } + J7r(n); + if (this.d) { + delete n.VSCODE_CODE_CACHE_PATH; + } + const r = { + responseWindowId: this.q.windowId, + responseChannel: "vscode:startExtensionHostMessagePortResult", + responseNonce: Ft(), + env: n, + detached: !!ln, + execArgv: undefined, + silent: true + }; + const o = "127.0.0.1"; + if (t !== 0) { + r.execArgv = ["--nolazy", `${this.g ? "--inspect-brk=" : "--inspect="}${o}:${t}`]; + } else { + r.execArgv = ["--inspect-port=0"]; + } + if (this.t.extensionTestsLocationURI) { + r.execArgv.unshift("--expose-gc"); + } + if (this.t.args["prof-v8-extensions"]) { + r.execArgv.unshift("--prof"); + } + r.execArgv.unshift("--dns-result-order=ipv4first"); + const a = this.K(this.k.onStdout, this.c); + const l = this.K(this.k.onStderr, this.c); + const c = de.any(de.map(a.event, g => ({ + data: `%c${g}`, + format: [""] + })), de.map(l.event, g => ({ + data: `%c${g}`, + format: ["color: red"] + }))); + const u = de.debounce(c, (g, p) => g ? { + data: g.data + p.data, + format: [...g.format, ...p.format] + } : { + data: p.data, + format: p.format + }, 100); + this.c.add(u(g => { + const p = g.data && g.data.match(/ws:\/\/([^\s]+):(\d+)\/([^\s]+)/); + if (p) { + const [, b, v, y] = p; + const w = `devtools://devtools/bundled/inspector.html?experiments=true&v8only=true&ws=${b}:${v}/${y}`; + if (!this.t.isBuilt && !this.h) { + console.log(`%c[Extension Host] %cdebugger inspector at ${w}`, "color: blue", "color:"); + } + if (!this.j || !this.j.devtoolsUrl) { + this.j = { + host: b, + port: Number(v), + devtoolsUrl: w + }; + this.b.fire(); + } + } else if (!this.h) { + console.group("Extension Host"); + console.log(g.data, ...g.format); + console.groupEnd(); + } + })); + this.c.add(this.k.onExit(({ + code: g, + signal: p + }) => this.J(g, p))); + if (t) { + if (this.d && this.f && this.t.debugExtensionHost.debugId) { + this.z.attachSession(this.t.debugExtensionHost.debugId, t); + } + this.j = { + port: t, + host: o + }; + this.b.fire(); + } + let d; + if (!this.t.isBuilt && !this.t.remoteAuthority || this.d) { + d = setTimeout(() => { + this.w.error(`[LocalProcessExtensionHost]: Extension host did not start in 10 seconds (debugBrk: ${this.g})`); + const g = this.g ? f(12997, null) : f(12998, null); + this.p.prompt(es.Warning, g, [{ + label: f(12999, null), + run: () => this.A.reload() + }], { + sticky: true, + priority: Ru.URGENT + }); + }, 10000); + } + const h = await this.G(this.k, r); + await this.H(h); + clearTimeout(d); + return h; + } + async F() { + if (typeof this.t.debugExtensionHost.port != "number") { + return 0; + } + const e = this.t.debugExtensionHost.port; + const t = await this.q.findFreePort(e, 10, 5000, 2048); + if (!this.h) { + if (t) { + if (t !== e) { + console.warn(`%c[Extension Host] %cProvided debugging port ${e} is not free, using ${t} instead.`, "color: blue", "color:"); + } + if (this.g) { + console.warn(`%c[Extension Host] %cSTOPPED on first line for debugging on port ${t}`, "color: blue", "color:"); + } else { + console.info(`%c[Extension Host] %cdebugger listening on port ${t}`, "color: blue", "color:"); + } + } else { + console.warn("%c[Extension Host] %cCould not find a free port for debugging", "color: blue", "color:"); + } + } + return t || 0; + } + G(e, t) { + Cjo(new EAn(), t.env); + const s = tPe(undefined, t.responseChannel, t.responseNonce); + return new Promise((n, r) => { + const o = setTimeout(() => { + r("The local extension host took longer than 60s to connect."); + }, 60000); + s.then(l => { + this.c.add(Ue(() => { + l.close(); + })); + clearTimeout(o); + const c = new cle(); + l.onmessage = u => { + if (u.data) { + c.fire(Ii.wrap(u.data)); + } + }; + l.start(); + n({ + onMessage: c.event, + send: u => l.postMessage(u.buffer) + }); + }); + const a = ic.create(false); + e.start(t).then(({ + pid: l + }) => { + if (l) { + this.pid = l; + } + this.w.info(`Started local extension host with pid ${l}.`); + const c = a.elapsed(); + if (Ry) { + this.w.info(`IExtensionHostStarter.start() took ${c} ms.`); + } + }, l => { + r(l); + }); + }); + } + H(e) { + return new Promise((t, s) => { + let n; + const r = () => { + n = setTimeout(() => { + s("The local extension host took longer than 60s to send its ready message."); + }, 60000); + }; + const o = () => { + clearTimeout(n); + }; + r(); + const a = e.onMessage(l => { + if (hde(l, 1)) { + o(); + this.I().then(c => { + r(); + e.send(Ii.fromString(JSON.stringify(c))); + }); + return; + } + if (hde(l, 0)) { + o(); + a.dispose(); + t(); + return; + } + console.error("received unexpected message during handshake phase from the extension host: ", l); + }); + }); + } + async I() { + const e = await this.m.getInitData(); + this.extensions = e.extensions; + const t = this.n.getWorkspace(); + return { + commit: this.B.commit, + version: this.B.version, + vscodeVersion: this.B.vscodeVersion, + rendererPerformanceTimeOrigin: performance.timeOrigin, + quality: this.B.quality, + parentPid: 0, + environment: { + isExtensionDevelopmentDebug: this.f, + appRoot: this.t.appRoot ? V.file(this.t.appRoot) : undefined, + appName: this.B.nameLong, + appHost: this.B.embedderIdentifier || "desktop", + appUriScheme: this.B.urlProtocol, + extensionTelemetryLogResource: this.t.extHostTelemetryLogFile, + isExtensionTelemetryLoggingOnly: cYt(this.B, this.t), + shadowWindowForWorkspaceId: this.t.shadowWindowForWorkspaceId, + bcIdForThisWindow: A1(this.t.remoteAuthority), + appLanguage: Uu, + extensionDevelopmentLocationURI: this.t.extensionDevelopmentLocationURI, + extensionTestsLocationURI: this.t.extensionTestsLocationURI, + globalStorageHome: this.u.defaultProfile.globalStorageHome, + workspaceStorageHome: this.t.workspaceStorageHome, + extensionLogLevel: this.t.extensionLogLevel + }, + workspace: this.n.getWorkbenchState() === 1 ? undefined : { + configuration: t.configuration ?? undefined, + id: t.id, + name: this.y.getWorkspaceLabel(t), + isUntitled: t.configuration ? o7(t.configuration, this.t) : false, + transient: t.transient + }, + remote: { + authority: this.t.remoteAuthority, + connectionData: null, + isRemote: false + }, + consoleForward: { + includeStack: !this.h && (this.d || !this.t.isBuilt || this.B.quality !== "stable" || this.t.verbose), + logNative: !this.h && this.d + }, + extensions: this.extensions.toSnapshot(), + telemetryInfo: { + sessionId: this.v.sessionId, + machineId: this.v.machineId, + macMachineId: this.v.macMachineId, + sqmId: this.v.sqmId, + devDeviceId: this.v.devDeviceId, + firstSessionDate: this.v.firstSessionDate, + msftInternal: this.v.msftInternal + }, + logLevel: this.w.getLevel(), + loggers: [...this.x.getRegisteredLoggers()], + logsLocation: this.t.extHostLogsPath, + autoStart: this.startup === 1, + uiKind: HQ.Desktop, + handle: this.t.window.handle ? ET(this.t.window.handle) : undefined + }; + } + J(e, t) { + if (!this.i) { + this.a.fire([e, t]); + } + } + K(e, t) { + let s = ""; + let n = false; + const r = new B(); + e(o => { + s += o; + const a = s.split(/\r?\n/g); + s = a.pop(); + if (s.length > 10000) { + a.push(s); + s = ""; + } + for (const l of a) { + if (n) { + if (l === "END_NATIVE_LOG") { + n = false; + } + } else if (l === "START_NATIVE_LOG") { + n = true; + } else if (l.length) { + r.fire(`${l} +`); + } + } + }, undefined, t); + return r; + } + async enableInspectPort() { + if (this.j) { + return true; + } else if (!this.k || !(await this.k.enableInspectPort())) { + return false; + } else { + await Promise.race([de.toPromise(this.b.event), Da(1000)]); + return !!this.j; + } + } + getInspectPort() { + return this.j ?? undefined; + } + L(e) { + if (this.d && !this.h && !this.f && this.t.debugExtensionHost.debugId) { + this.z.terminateSession(this.t.debugExtensionHost.debugId); + e.join(Da(100), { + id: "join.extensionDevelopment", + label: f(13000, null) + }); + } + } +}; +z5i = __decorate([__param(3, kt), __param(4, ni), __param(5, po), __param(6, Yo), __param(7, gu), __param(8, Ml), __param(9, Ot), __param(10, Bt), __param(11, Um), __param(12, Zs), __param(13, BDe), __param(14, kr), __param(15, ys), __param(16, i2t), __param(17, sAn)], z5i); +da(); +Wc(); +nt(); +var J5i; +var G5i = class extends V5i { + constructor(e, t, s, n, r, o, a, l, c, u, d, h, g, p, b, v, y, w, C, S, x, k) { + const E = e.createInstance(H5i); + const D = e.createInstance(j5i); + const P = new K5i(E, D, () => this.Gb(), e, s, r, u, g, v, h); + super({ + hasLocalProcess: true, + allowRemoteExtensionsInLocalWebWorker: false + }, E, P, new Y5i(s, u, h), e, t, s, n, r, o, a, l, c, u, d, h, g, p, b, v, k); + this.Wb = y; + this.Xb = w; + this.Yb = C; + this.Zb = S; + this.$b = x; + this.Vb = new xAn(); + this.Ub = D; + b.when(2).then(() => { + jk(xt, () => { + this.mb(); + }, 50); + }); + } + async ac() { + return this.Ub.scannedExtensions; + } + Bb(e, t, s) { + const n = []; + const r = this.getExtensionsStatus(); + for (const o of Object.keys(r)) { + const a = r[o]; + if (a.activationStarted && e.containsExtension(a.id)) { + n.push(a.id); + } + } + super.Bb(e, t, s); + if (e.kind === 1) { + if (t === 55) { + this.N.prompt(es.Error, f(13001, null), [{ + label: f(13002, null), + run: () => { + this.M.invokeFunction(o => { + o.get(kr).restart(); + }); + } + }]); + return; + } + this.Eb(e); + this.cc(t, s, n); + this.Vb.registerCrash(); + if (this.Vb.shouldAutomaticallyRestart()) { + this.Z.info("Automatically restarting the extension host."); + this.N.status(f(13003, null), { + hideAfter: 5000 + }); + this.startExtensionHosts(); + } else { + const o = []; + if (this.O.isBuilt) { + o.push({ + label: f(13004, null), + run: () => { + this.M.invokeFunction(a => { + a.get(gt).executeCommand("extension.bisect.start"); + }); + } + }); + } else { + o.push({ + label: f(13005, null), + run: () => this.Wb.openDevTools() + }); + } + o.push({ + label: f(13006, null), + run: () => this.startExtensionHosts() + }); + if (this.O.isBuilt) { + o.push({ + label: f(13007, null), + run: () => { + this.M.invokeFunction(a => { + a.get(os).open("https://aka.ms/vscode-extension-bisect"); + }); + } + }); + } + this.N.prompt(es.Error, f(13008, null), o); + } + } + } + cc(e, t, s) { + this.P.publicLog2("extensionHostCrash", { + code: e, + signal: t, + extensionIds: s.map(n => n.value) + }); + for (const n of s) { + this.P.publicLog2("extensionHostCrashExtension", { + code: e, + signal: t, + extensionId: n.value + }); + } + } + async Tb(e) { + if (e.indexOf("+") === -1) { + const { + host: s, + port: n + } = Prr(e); + return { + authority: { + authority: e, + connectTo: { + type: 0, + host: s, + port: n + }, + connectionToken: undefined + } + }; + } + return this.ub(1, e); + } + async ec(e, t) { + if (e.indexOf("+") === -1) { + return t; + } + const n = this.eb(1); + if (n.length === 0) { + throw new Error("Cannot resolve canonical URI"); + } + const r = await Promise.all(n.map(o => o.getCanonicalURI(e, t))); + for (const o of r) { + if (o) { + return o; + } + } + throw new Error(`Cannot get canonical URI because no extension is installed to resolve ${PG(e)}`); + } + Rb() { + return new Tw(e => this.gc(e)); + } + async gc(e) { + this.Ub.startScanningExtensions(); + const t = this.O.remoteAuthority; + let s = null; + let n = []; + if (t) { + this.cb._setCanonicalURIProvider(async c => { + if (c.scheme !== me.vscodeRemote || c.authority !== t) { + return c; + } + Dr(`code/willGetCanonicalURI/${PG(t)}`); + if (Ry) { + this.Z.info(`Invoking getCanonicalURI for authority ${PG(t)}...`); + } + try { + return this.ec(t, c); + } finally { + Dr(`code/didGetCanonicalURI/${PG(t)}`); + if (Ry) { + this.Z.info(`getCanonicalURI returned for authority ${PG(t)}.`); + } + } + }); + if (Ry) { + this.Z.info("Starting to wait on IWorkspaceTrustManagementService.workspaceResolved..."); + } + await this.$b.workspaceResolved; + if (Ry) { + this.Z.info("Finished waiting on IWorkspaceTrustManagementService.workspaceResolved."); + } + const o = (await this.ac()).filter(c => ujo(c)); + if (o.length) { + e.emitOne(new yAn(o)); + } + let a; + try { + a = await this.rb(t); + } catch (c) { + if ($R.isNoResolverFound(c)) { + c.isHandled = await this.jc(t); + } else if ($R.isHandled(c)) { + console.log("Error handled: Not showing a notification for the error"); + } + this.cb._setResolvedAuthorityError(t, c); + return this.hc(e); + } + this.cb._setResolvedAuthority(a.authority, a.options); + this.Yb.setTunnelInformation(a.tunnelInformation); + const l = this.$.getConnection(); + if (l) { + l.onDidStateChange(async c => { + if (c.type === 0) { + this.cb._clearResolvedAuthority(t); + } + }); + l.onReconnecting(() => this.sb()); + } + [s, n] = await Promise.all([this.$.getEnvironment(), this.ab.scanExtensions()]); + if (!s) { + this.N.notify({ + severity: es.Error, + message: f(13009, null) + }); + return this.hc(e); + } + oxr(s.useHostProxy ? 1 : 2); + } else { + this.cb._setCanonicalURIProvider(async r => r); + } + return this.hc(e, n); + } + async hc(e, t = []) { + await this.$b.workspaceTrustInitialized; + if (t.length) { + e.emitOne(new CAn(t)); + } + e.emitOne(new wAn(await this.ac())); + } + async Sb(e) { + await this.vb(); + this.$.getConnection()?.dispose(); + if (Bae(this.O).isExtensionDevTestFromCli) { + if (Ry) { + this.Z.info(`Asking native host service to exit with code ${e}.`); + } + this.Wb.exit(e); + } else { + this.Wb.closeWindow(); + } + } + async jc(e) { + const t = uD(e); + const s = this.S.remoteExtensionTips?.[t]; + const n = this.S.remoteExtensionTips?.[`open-${t}`]; + if (!s) { + return false; + } + const r = g => { + this.P.publicLog("remoteExtensionRecommendations:popup", { + userReaction: g, + extensionId: o + }); + }; + const o = s.extensionId; + const a = await this.ac(); + const l = o.replace("ms-vscode-remote", "anysphere"); + const c = [o, n?.extensionId, l].filter(g => g !== undefined); + const u = {}; + for (const g of a) { + if (c.includes(g.identifier.value)) { + u[g.identifier.value] = g; + } + } + const d = (g, p) => { + const b = u[g]; + if (!b) { + return false; + } + if (!djo(this.Z, this.Q, b, false)) { + const v = f(13010, null, p); + this.N.prompt(es.Info, v, [{ + label: f(13011, null), + run: async () => { + r("enable"); + await this.Q.setEnablement([oC(b)], 10); + await this.Xb.reload(); + } + }], { + sticky: true, + priority: Ru.URGENT + }); + return true; + } + return false; + }; + if (d(o, s.friendlyName)) { + return true; + } + if (n && d(n.extensionId, n.friendlyName)) { + return true; + } + if (d(l, s.friendlyName)) { + return true; + } + const h = f(13012, null, s.friendlyName); + this.N.prompt(es.Info, h, [{ + label: f(13013, null), + run: async () => { + r("install"); + const [g] = await this.Zb.getExtensions([{ + id: o + }], mt.None); + if (g) { + await this.U.installFromGallery(g); + await this.Xb.reload(); + } else if (n) { + const [p] = await this.Zb.getExtensions([{ + id: n.extensionId + }], mt.None); + if (p) { + await this.U.installFromGallery(p); + await this.Xb.reload(); + } else { + this.N.error(f(13014, null, n.friendlyName)); + } + } else { + this.N.error(f(13015, null, s.friendlyName)); + } + } + }], { + sticky: true, + priority: Ru.URGENT, + onCancel: () => r("cancel") + }); + return true; + } +}; +G5i = __decorate([__param(0, re), __param(1, ni), __param(2, Wn), __param(3, Ot), __param(4, Rd), __param(5, Ct), __param(6, ys), __param(7, DS), __param(8, kt), __param(9, ve), __param(10, f0), __param(11, Bt), __param(12, al), __param(13, IIt), __param(14, Yo), __param(15, hv), __param(16, po), __param(17, kr), __param(18, dm), __param(19, vh), __param(20, qf), __param(21, Js)], G5i); +var K5i = class { + constructor(e, t, s, n, r, o, a, l, c, u) { + this.b = e; + this.c = t; + this.d = s; + this.f = n; + this.g = r; + this.h = o; + this.i = l; + this.j = c; + this.l = u; + this.a = IAn(r, a); + } + createExtensionHost(e, t, s) { + switch (t.kind) { + case 1: + { + const n = s ? 2 : 1; + return this.f.createInstance(z5i, t, n, this.m(e, s, t)); + } + case 2: + { + if (this.a !== 0) { + const n = s ? this.a === 2 ? 3 : 2 : 1; + return this.f.createInstance(F5i, t, n, this.n(e, t)); + } + return null; + } + case 3: + { + const n = this.i.getConnection(); + if (n) { + return this.f.createInstance(q5i, t, this.o(e, n.remoteAuthority)); + } else { + return null; + } + } + } + } + m(e, t, s) { + return { + getInitData: async () => { + if (t) { + const n = await this.c.scannedExtensions; + if (Ry) { + this.l.info(`NativeExtensionHostFactory._createLocalProcessExtensionHostDataProvider.scannedExtensions: ${n.map(c => c.identifier.value).join(",")}`); + } + const r = p2t(this.l, this.h, this.b, n, true); + if (Ry) { + this.l.info(`NativeExtensionHostFactory._createLocalProcessExtensionHostDataProvider.localExtensions: ${r.map(c => c.identifier.value).join(",")}`); + } + const o = e.computeRunningLocation(r, [], false); + const a = g2t(r, o, c => s.equals(c), { + environmentService: this.g + }); + const l = new ine(0, r, a.map(c => c.identifier)); + if (Ry) { + this.l.info(`NativeExtensionHostFactory._createLocalProcessExtensionHostDataProvider.myExtensions: ${a.map(c => c.identifier.value).join(",")}`); + } + return { + extensions: l + }; + } else { + const n = await this.d(); + const r = e.filterByRunningLocation(n.extensions, s); + return { + extensions: new ine(n.versionId, n.extensions, r.map(a => a.identifier)) + }; + } + } + }; + } + n(e, t) { + return { + getInitData: async () => { + const s = await this.d(); + const n = e.filterByRunningLocation(s.extensions, t); + return { + extensions: new ine(s.versionId, s.extensions, n.map(o => o.identifier)) + }; + } + }; + } + o(e, t) { + return { + remoteAuthority: t, + getInitData: async () => { + const s = await this.d(); + const n = await this.i.getEnvironment(); + if (!n) { + throw new Error("Cannot provide init data for remote extension host!"); + } + const r = e.filterByExtensionHostKind(s.extensions, 3); + const o = new ine(s.versionId, s.extensions, r.map(a => a.identifier)); + return { + connectionData: this.j.getConnectionData(t), + pid: n.pid, + appRoot: n.appRoot, + rendererPerformanceTimeOrigin: performance.timeOrigin, + extensionHostLogsPath: n.extensionHostLogsPath, + globalStorageHome: n.globalStorageHome, + workspaceStorageHome: n.workspaceStorageHome, + extensions: o + }; + } + }; + } +}; +K5i = __decorate([__param(3, re), __param(4, Wn), __param(5, Rd), __param(6, ve), __param(7, al), __param(8, hv), __param(9, Bt)], K5i); +function IAn(i, e) { + if (i.isExtensionDevelopment && i.extensionDevelopmentKind?.some(t => t === "web")) { + return 1; + } + { + const t = e.getValue(fYt); + if (t === true) { + return 1; + } else if (t === "auto") { + return 2; + } else { + return 0; + } + } +} +var DAn; +(function (i) { + i[i.Disabled = 0] = "Disabled"; + i[i.Eager = 1] = "Eager"; + i[i.Lazy = 2] = "Lazy"; +})(DAn ||= {}); +var Y5i = J5i = class { + constructor(e, t, s) { + this.c = s; + this.a = !!e.remoteAuthority; + const n = IAn(e, t); + this.b = n !== 0; + } + pickExtensionHostKind(e, t, s, n, r) { + const o = J5i.pickExtensionHostKind(t, s, n, r, this.a, this.b); + this.c.trace(`pickRunningLocation for ${e.value}, extension kinds: [${t.join(", ")}], isInstalledLocally: ${s}, isInstalledRemotely: ${n}, preference: ${Wpr(r)} => ${$A(o)}`); + return o; + } + static pickExtensionHostKind(e, t, s, n, r, o) { + const a = []; + for (const l of e) { + if (l === "ui" && t) { + if (n === 0 || n === 1) { + return 1; + } + a.push(1); + } + if (l === "workspace" && s) { + if (n === 0 || n === 2) { + return 3; + } + a.push(3); + } + if (l === "workspace" && !r) { + if (n === 0 || n === 1) { + return 1; + } + a.push(1); + } + if (l === "web" && t && o) { + if (n === 0 || n === 1) { + return 2; + } + a.push(2); + } + } + if (a.length > 0) { + return a[0]; + } else { + return null; + } + } +}; +Y5i = J5i = __decorate([__param(0, Wn), __param(1, ve), __param(2, Bt)], Y5i); +var xjo = class extends se { + constructor() { + super({ + id: "workbench.action.restartExtensionHost", + title: W(13017, "Restart Extension Host"), + category: pt.Developer, + f1: true + }); + } + async run(i) { + const e = i.get(Ks); + if (await e.stopExtensionHosts(f(13016, null))) { + e.startExtensionHosts(); + } + } +}; +J(xjo); +it(Ks, G5i, 0); +It(); +qt(); +Zt(); +mu(); +var X5i = class extends Eco { + constructor(e, t, s, n) { + super(false, e, t, s, n); + } +}; +X5i = __decorate([__param(0, dT), __param(1, Ml), __param(2, ht), __param(3, Bt)], X5i); +it(oH, X5i, 1); +X(); +It(); +Me(); +fn(); +yb(); +te(); +ai(); +hc(); +xe(); +Rr(); +rt(); +var Q5i; +var Z5i = Q5i = class extends REt { + constructor(e, t, s, n, r, o, a, l, c) { + super(e, t, s, n, a, l); + this.L = r; + this.M = o; + this.N = c; + this.I = false; + this.J = false; + if (!Gt) { + this.O(); + } + this.P(); + } + O() { + (async () => this.J = await this.L.isMaximized({ + targetWindowId: this.window.vscodeWindowId + }))(); + this.D(this.L.onDidMaximizeWindow(e => { + if (e === this.window.vscodeWindowId) { + this.J = true; + } + })); + this.D(this.L.onDidUnmaximizeWindow(e => { + if (e === this.window.vscodeWindowId) { + this.J = false; + } + })); + } + async P() { + if (await this.L.isFullScreen({ + targetWindowId: this.window.vscodeWindowId + })) { + Sfe(true, this.window); + } + } + async C(e, t) { + this.F(e); + await this.N.error(t, f(12661, null)); + } + async G(e) { + if (this.I) { + return; + } + this.F(e); + if (await this.M.invokeFunction(s => Q5i.confirmOnShutdown(s, 1))) { + this.I = true; + this.L.closeWindow({ + targetWindowId: this.window.vscodeWindowId + }); + } + } + F(e) { + e.preventDefault(); + e.returnValue = true; + } + createState() { + const e = super.createState(); + const t = CT(this.window); + return { + ...e, + bounds: e.bounds, + mode: this.J ? YV.Maximized : t ? YV.Fullscreen : YV.Normal + }; + } +}; +Z5i = Q5i = __decorate([__param(3, ve), __param(4, po), __param(5, re), __param(6, kr), __param(7, Wn), __param(8, Js)], Z5i); +var e6i = class extends NEt { + constructor(e, t, s, n, r, o, a, l) { + super(e, n, t, o, a, l); + this.F = s; + this.G = r; + } + async t(e) { + Dr("code/auxiliaryWindow/willResolveWindowId"); + const t = await e.vscode.ipcRenderer.invoke("vscode:registerAuxiliaryWindow", this.F.windowId); + Dr("code/auxiliaryWindow/didResolveWindowId"); + return t; + } + u(e, t, s) { + let n; + if (typeof s?.zoomLevel == "number") { + n = s.zoomLevel; + } else { + n = qk(js()); + } + WQ(n, e); + return super.u(e, t); + } + r(e, t, s) { + return new Z5i(e, t, s, this.j, this.F, this.G, this.n, this.q, this.h); + } +}; +e6i = __decorate([__param(0, lr), __param(1, ve), __param(2, po), __param(3, Js), __param(4, re), __param(5, Ot), __param(6, kr), __param(7, Wn)], e6i); +it(lX, e6i, 1); +Zt(); +mu(); +Un(); +ai(); +Nt(); +Aa(); +Le(); +It(); +var t6i = class extends X4i { + constructor(e, t, s, n, r, o) { + super(V.file(e.extensionsPath), t, s, n, r, o); + } +}; +t6i = __decorate([__param(0, AM), __param(1, Ct), __param(2, Ml), __param(3, _s), __param(4, Ot), __param(5, Bt)], t6i); +it(uPe, t6i, 1); +v2(Pke, "tracing"); +NKt(); +v2(Jft, "abuse"); +It(); +jo(); +q(); +te(); +vt(); +q(); +It(); +qt(); +Nt(); +Cs(); +Rr(); +Wt(); +Pn(); +$(); +$(); +$(); +$(); +$(); +We(); +He(); +rt(); +xc(); +We(); +hc(); +xe(); +function kjo(i) { + const e = K(() => { + const n = i?.(); + if (n !== undefined) { + return SI(n)?.window ?? js(); + } else { + return js(); + } + }); + const [t, s] = ae(CT(e())); + Fe(() => { + const n = e(); + const r = l9(o => { + if (o === n.vscodeWindowId) { + s(CT(n)); + } + }); + Qt(() => { + r.dispose(); + }); + xr(() => { + s(CT(n)); + }); + }); + return t; +} +We(); +rt(); +function TAn(i) { + const { + pages: e, + isPageValid: t = () => true, + onNavigate: s + } = i; + const [n, r] = ae(e().find(t) ?? e()[0]); + const [o, a] = ae(0); + const l = () => { + const p = e().indexOf(n()); + return e().slice(p + 1).find(t) ?? n(); + }; + const c = () => { + const p = e().indexOf(n()); + return e().slice(0, p).reverse().find(t) ?? n(); + }; + const u = () => { + const p = l(); + if (p !== n()) { + const b = e().indexOf(p); + if (b > o()) { + a(b); + } + r(() => p); + s?.(p); + } + }; + const d = () => { + const p = c(); + if (p !== n()) { + r(() => p); + s?.(p); + } + }; + const h = p => { + if ((Gt ? p.metaKey : p.ctrlKey) && p.key === "[") { + p.preventDefault(); + d(); + } + if ((Gt ? p.metaKey : p.ctrlKey) && p.key === "]") { + p.preventDefault(); + u(); + } + }; + document.addEventListener("keydown", h); + return { + currentPage: n, + navigateForward: u, + navigateBack: d, + canNavigateForward: () => { + const p = l(); + return p !== n() && e().indexOf(p) <= o(); + }, + canNavigateBack: () => c() !== n(), + isLastPage: () => n() === e()[e().length - 1], + cleanup: () => { + document.removeEventListener("keydown", h); + } + }; +} +var uB = "unset"; +var gde = 200; +var XN = "50px"; +var Ejo = 800; +var Ijo = 520; +var m2t = 12; +var Djo = 1150; +var Tjo = 701; +var b2t = 273; +var v2t = 161; +Le(); +Je(); +Nt(); +Et(); +nr(); +Pn(); +qt(); +Cl(); +Cs(); +kn(); +ri(); +Zt(); +Ps(); +var PAn = [{ + id: "github.copilot", + name: "GH Copilot" +}, { + id: "TabNine.tabnine-vscode", + name: "TabNine" +}, { + id: "sourcegraph.cody-ai", + name: "Cody" +}, { + id: "Blackboxapp.blackbox", + name: "Blackbox" +}, { + id: "Continue.continue", + name: "Continue" +}, { + id: "Codeium.codeium", + name: "Codeium" +}, { + id: "supermaven.supermaven", + name: "Supermaven" +}]; +J(class extends se { + constructor() { + super({ + id: e6t, + title: { + value: "Disable Autocompletes", + original: "Disable Autocompletes" + }, + f1: false + }); + } + async run(e) { + const t = e.get(Sd); + const s = e.get(UJ); + const n = e.get(Bt); + for (const r of PAn) { + try { + const { + id: o + } = r; + const a = await t.getInstalled().then(l => l.find(c => c.identifier.id === o)); + if (a) { + await s.disableExtension(a.identifier); + n.info(`Disabled extension: ${o}`); + } + } catch (o) { + n.error(`Failed to disable extension: ${r.id}`, o); + } + } + } +}); +async function Pjo(i, e) { + const t = V.joinPath(e.userHome, ".vscode"); + try { + if ((await i?.resolve(t)).children?.length) { + return true; + } + } catch {} + return false; +} +function Ljo(i) { + const e = i.get(`vscode/${C5}`, -1); + if (!e) { + return []; + } + try { + const t = JSON.parse(e); + if (!Array.isArray(t)) { + return []; + } + const s = []; + for (const n of t) { + if ("id" in n && typeof n.id == "string") { + s.push(n.id); + } + } + return s; + } catch (t) { + console.error(t); + return []; + } +} +async function Rjo(i, e, t, s, n, r, o, a) { + try { + e.setNonPersistentStorage("shouldBlockNewPanelsFromPoppingUpIfTimeIsLessThan", Date.now() + 600000); + try { + const w = Ljo(s); + let C = []; + try { + C = Ld(s.get(C5, -1, "[]")); + } catch (k) { + console.error(k); + } + const S = new Set(); + w.forEach(k => S.add(k)); + C.forEach(k => "id" in k && S.add(k.id)); + const x = Array.from(S).map(k => ({ + id: k + })); + s.store(C5, JSON.stringify(x), -1, 0); + } catch (w) { + console.error(w); + } + const l = V.joinPath(t.userHome, ".vscode", "extensions"); + const c = V.file(t.extensionsPath); + let u = []; + try { + const w = await i.readFile(V.joinPath(l, "extensions.json")); + if (w) { + u = Ld(w.value.toString()); + } + } catch (w) { + console.log(w); + } + let d = []; + try { + const w = await i?.readFile(V.joinPath(c, "extensions.json")); + if (w) { + d = Ld(w.value.toString()); + } + } catch (w) { + console.log(w); + } + const h = new Set(); + for (const w of d) { + const C = w.identifier.id; + h.add(C); + } + const g = (w, C) => { + try { + return Li(C ?? l, w.relativeLocation); + } catch (S) { + console.log(S); + } + try { + return V.revive(w.location); + } catch (S) { + console.log(S); + } + }; + const p = async w => { + if (!w) { + return false; + } + const C = g(w, c); + try { + if (C && (await i.exists(C))) { + return true; + } + } catch (S) { + console.log(S); + } + return false; + }; + const b = await u.reduce(async (w, C) => !h.has(C.identifier.id) || !(await p(d.filter(x => x.identifier.id === C.identifier.id)[0])) ? (await w).concat(C) : w, Promise.resolve([])); + const v = []; + const y = []; + try { + for (const w of b) { + try { + const C = g(w); + if (C === undefined) { + console.log("skipping extension because cannot find it on disk: ", w.identifier.id); + continue; + } + const S = async () => { + const x = w.identifier.id; + if (Uni.some(E => E === x)) { + return; + } + let k = false; + if (Oni.some(E => x === E)) { + try { + const E = await r.getExtensions([{ + id: x + }], mt.None); + if (E && E.length > 0) { + const D = E[0]; + await n.installFromGallery(D); + k = true; + } + } catch (E) { + console.log(E); + } + } + try { + const E = Li(C, "package.json"); + const D = await i.readFile(E); + if (D) { + const R = Ld(D.value.toString()).engines?.vscode; + if (R && !D6(R, o.vscodeVersion, o.date)) { + const L = await r.getExtensions([{ + id: x + }], mt.None); + if (L && L.length > 0) { + const F = L[0]; + await n.installFromGallery(F); + k = true; + } + } + } + } catch (E) { + console.log(E); + } + if (!CDr.some(E => E === x) && (a === true || !PAn.some(E => x.toLowerCase().includes(E.id.toLowerCase()))) && !k) { + const E = Li(c, w.relativeLocation); + await i.copy(C, E, true); + w.location = E; + y.push(w); + } + }; + v.push(S()); + } catch (C) { + console.error(C); + } + } + await Promise.all(v); + } catch (w) { + console.error(w); + } + try { + const w = await i?.readFile(V.joinPath(c, "extensions.json")); + if (w) { + d = Ld(w.value.toString()); + } + } catch (w) { + console.log(w); + } + await i.writeFile(V.joinPath(c, "extensions.json"), Ii.wrap(new TextEncoder().encode(JSON.stringify([...d, ...y])))); + } catch (l) { + console.error(l); + } finally { + e.setNonPersistentStorage("shouldBlockNewPanelsFromPoppingUpIfTimeIsLessThan", Date.now() + 20000); + } +} +var Njo = class oUi extends se { + static { + this.LABEL = "Import VS Code Extensions and Settings"; + } + constructor() { + super({ + id: Gfe, + title: { + value: oUi.LABEL, + original: oUi.LABEL + }, + f1: true + }); + } + async run(e, t, s, ...n) { + const r = e.get(Ct); + const o = e.get(gu); + const a = e.get(_i); + const l = e.get(ht); + const c = e.get(Sd); + const u = e.get(vh); + const d = e.get(ys); + const h = e.get(Bt); + const g = e.get(oH); + const p = e.get(Rc); + const b = e.get(gC); + const v = e.get(wD); + a.setApplicationUserPersistentStorage("haveNotImportedFromVSC", false); + a.setApplicationUserPersistentStorage("cppHasLoadedConfigFromCopilot", false); + async function y(C, S) { + const x = C.appSettingsHome; + const k = Li(Li(Ir(Ir(x)), "Code"), "User"); + const E = Li(k, "workspaceStorage"); + const D = Li(x, "workspaceStorage"); + try { + const L = await S.resolve(E, { + resolveMetadata: true + }); + if (L.children) { + for (const F of L.children) { + const O = Li(D, ji(F.resource)); + if (F.isDirectory) { + await S.copy(F.resource, O, false); + } + } + } + } catch (L) { + console.error(L); + } + try { + const L = Li(k, "globalStorage"); + const O = (await g.readStorageData({ + ...p.currentProfile, + id: Ft(), + isDefault: false, + settingsResource: Li(k, "settings.json"), + keybindingsResource: Li(k, "keybindings.json"), + globalStorageHome: L, + extensionsResource: V.joinPath(C.userHome, ".vscode", "extensions"), + location: k + })).get("history.recentlyOpenedPathsList"); + if (O && O.value) { + const U = JSON.parse(O.value); + const j = await swr(U, h); + b.addRecentlyOpened(j.workspaces); + } + } catch (L) { + console.error(L); + } + const P = Li(k, "settings.json"); + const R = Li(k, "keybindings.json"); + if (await S?.exists(P)) { + const L = await S?.readFile(P); + let F = L.value.toString(); + try { + const U = Ld(L.value.toString()); + const j = Object.keys(U).reduce((ie, ee) => { + if ((ee !== "workbench.colorTheme" || typeof U[ee] == "string" && U[ee].trim() !== "Default Dark+" && U[ee].trim() !== "Visual Studio Dark") && ee !== "workbench.layoutControl.enabled") { + if (ee === "workbench.activityBar.location" && U[ee] === "top") { + return ie; + } + ie[ee] = U[ee]; + } + return ie; + }, {}); + F = JSON.stringify(j, null, 4); + } catch (U) { + console.error(U); + console.log("^ Could not parse settings json"); + } + const O = Li(x, "settings.json"); + await S?.writeFile(O, Ii.wrap(new TextEncoder().encode(F))); + } + if (await S?.exists(R)) { + const L = Li(x, "keybindings.json"); + await S?.copy(R, L, true); + } + return true; + } + const w = [y(o, r).catch(C => { + console.error(C, "Failed to import settings"); + })]; + if (s !== true) { + w.push(Rjo(r, a, o, l, c, u, d, t).catch(C => { + console.error(C, "Failed to import extensions"); + })); + } + await Promise.all(w); + try { + v.loadCopilotPlusPlusConfigFromGithubCopilot(); + } catch {} + } +}; +J(Njo); +var Mjo = class aUi extends se { + static { + this.LABEL = "Cpp After Onboarding"; + } + constructor() { + super({ + id: z5t, + title: { + value: aUi.LABEL, + original: aUi.LABEL + }, + f1: false + }); + } + async run(e, ...t) { + e.get(wD).forceApplyCppConfig(); + } +}; +J(Mjo); +var Ajo = class p3n extends se { + static { + this.LABEL = "Start Onboarding"; + } + constructor() { + super({ + id: "cursor.startOnboarding", + title: { + value: p3n.LABEL, + original: "Start Onboarding" + }, + category: pt.Cursor, + f1: true + }); + } + async run(e) { + const t = e.get(ht); + const s = e.get(MSi); + t.store(Ffe, "true", -1, 1); + s.renderPopupBar(); + } +}; +J(Ajo); +$(); +$(); +$(); +$(); +We(); +xc(); +$(); +$(); +$(); +var $jo = Y("
    "); +var Fjo = Y("
    "); +var qQ = i => (() => { + var e = $jo(); + M(e, () => i.children); + Ie(t => (t = i.level === 1 ? "32px" : i.level === 2 ? "24px" : "16px") != null ? e.style.setProperty("font-size", t) : e.style.removeProperty("font-size")); + return e; +})(); +var i6i = i => (() => { + var e = Fjo(); + M(e, () => i.children); + return e; +})(); +$(); +$(); +$(); +$(); +$(); +var Ojo = Y("
    "); +var jQ = i => (() => { + var e = Ojo(); + M(e, () => i.children); + Ie(t => { + var s = `flex flex-col gap-[28px] items-center ${i.class} min-h-[380px] my-auto justify-between ${i.disableTransition ? "" : " fade-in"}`; + var n = i.style; + if (s !== t.e) { + Xe(e, t.e = s); + } + t.t = is(e, n, t.t); + return t; + }, { + e: undefined, + t: undefined + }); + return e; +})(); +var _jo = Y("
    "); +var Bjo = Y("Your team admin is in control: "); +var Ujo = Y(""); +var LAn = Y("Default behavior:"); +var Wjo = Y("
    For more details, please see our Privacy Policy and Security page.
    "); +var Hjo = Y("
    "); +var qjo = Y("You're in control: "); +var jjo = Y("
    "); +var Gjo = Y("
    "); +var Kjo = Y("
    You're in control of how your data is used. You can always change this later in the settings."); +var Yjo = Y("
    "); +var Xjo = Y("
    "); +var NAn = i => { + const [e, t] = ae(false); + return (() => { + var s = Jjo(); + var n = s.firstChild; + var r = n.firstChild; + var o = r.nextSibling; + var a = o.firstChild; + var l = o.nextSibling; + var c = l.firstChild; + s.addEventListener("mouseleave", () => t(false)); + s.addEventListener("mouseenter", () => t(true)); + s.addEventListener("click", () => i.onClick?.()); + s.style.setProperty("display", "flex"); + s.style.setProperty("width", "300px"); + s.style.setProperty("padding", "8px 3px"); + s.style.setProperty("padding-bottom", "19px"); + s.style.setProperty("padding-top", "13.5px"); + s.style.setProperty("justify-content", "space-between"); + s.style.setProperty("align-items", "center"); + s.style.setProperty("text-align", "center"); + s.style.setProperty("transition", "outline 0.1s ease, box-shadow 0.1s ease, background 0.1s ease"); + s.style.setProperty("box-sizing", "border-box"); + M(r, () => i.title); + M(a, () => i.subtitle); + l.style.setProperty("padding-top", "7px"); + M(c, () => i.description); + Ie(u => { + var d = `flex border border-menu-border rounded-md flex-col gap-1 w-[24vw] cursor-pointer ${i.class}`; + var h = e() ? "color-mix(in srgb, var(--vscode-button-secondaryBackground) 40%, transparent)" : "color-mix(in srgb, var(--vscode-button-secondaryBackground) 30%, transparent)"; + var g = i.isSelected ? "3px solid var(--vscode-button-background)" : "none"; + var p = e() ? "0px 8px 24px 0px rgba(0, 0, 0, 0.3)" + (i.isSelected ? " 0px 0px 0px 5px var(--vscode-terminal-ansiBlack) inset" : "") : "0px 8px 21.4px 0px rgba(0, 0, 0, 0.25)" + (i.isSelected ? " 0px 0px 0px 5px var(--vscode-terminal-ansiBlack) inset" : ""); + if (d !== u.e) { + Xe(s, u.e = d); + } + if (h !== u.t) { + if ((u.t = h) != null) { + s.style.setProperty("background", h); + } else { + s.style.removeProperty("background"); + } + } + if (g !== u.a) { + if ((u.a = g) != null) { + s.style.setProperty("outline", g); + } else { + s.style.removeProperty("outline"); + } + } + if (p !== u.o) { + if ((u.o = p) != null) { + s.style.setProperty("box-shadow", p); + } else { + s.style.removeProperty("box-shadow"); + } + } + return u; + }, { + e: undefined, + t: undefined, + a: undefined, + o: undefined + }); + return s; + })(); +}; +var Qjo = i => { + const e = wt(); + const t = K(() => e.cursorAuthenticationService.reactiveMembershipType() === zr.ENTERPRISE); + const [s, n] = ae(undefined); + const r = () => { + if (s() !== undefined) { + if (s() === true) { + e.reactiveStorageService.setApplicationUserPersistentStorage("noStorageMode", true); + e.reactiveStorageService.setApplicationUserPersistentStorage("selectedPrivacyForOnboarding", true); + } else { + e.reactiveStorageService.setApplicationUserPersistentStorage("selectedPrivacyForOnboarding", false); + } + e.cursorAuthenticationService.submitNewOnboarding(); + e.telemetryService.publicLogCapture("onboarding.card.privacy_new.accepted"); + i.onContinue(); + } + }; + return I(oe, { + get when() { + return !t(); + }, + get fallback() { + return I(RAn, i); + }, + get children() { + return I(jQ, { + get children() { + return [(() => { + var o = Gjo(); + var a = o.firstChild; + M(o, I(qQ, { + level: 2, + children: "Data Sharing" + }), a); + return o; + })(), (() => { + var o = Kjo(); + o.style.setProperty("font-size", "13px"); + return o; + })(), (() => { + var o = Yjo(); + if (uB != null) { + o.style.setProperty("min-height", uB); + } else { + o.style.removeProperty("min-height"); + } + M(o, I(NAn, { + title: "Help Improve Cursor", + subtitle: "I am fine with Cursor learning from my code!", + description: "After one day of use, Cursor stores and learns from your prompts, codebase, edit history, and other usage data to improve the product.", + get isSelected() { + return s() === false; + }, + onClick: () => n(false), + class: "" + }), null); + M(o, I(NAn, { + title: "Privacy Mode", + subtitle: "I do not want to enable data sharing.", + description: "With Privacy Mode enabled, none of your questions or code will ever be stored or learned from by us or any third-party.", + get isSelected() { + return s() === true; + }, + onClick: () => n(true), + class: "" + }), null); + return o; + })(), (() => { + var o = Xjo(); + if (XN != null) { + o.style.setProperty("height", XN); + } else { + o.style.removeProperty("height"); + } + M(o, I(Ar, { + class: "w-full !text-[14px] px-1.5 py-1 leading-[21px]", + onClick: r, + get disabled() { + return s() === undefined; + }, + get children() { + if (i.isLastScreen) { + return "Finish"; + } else { + return "Continue"; + } + } + }), null); + M(o, I(y2t, { + onClick: () => { + e.openerService.open("https://cursor.com/privacy", { + openExternal: true + }); + }, + class: "text-center", + children: "Learn more about Data Sharing and Privacy" + }), null); + return o; + })()]; + } + }); + } + }); +}; +$(); +$(); +$(); +$(); +$(); +We(); +xc(); +var Zjo = Y("
    Recommended"); +var ezo = Y("
    "); +var tzo = Y("
    "); +var izo = Y("
    "); +var szo = Y("
    "); +var MAn = i => { + const [e, t] = ae(false); + return (() => { + var s = ezo(); + var n = s.firstChild; + var r = n.firstChild; + var o = r.nextSibling; + var a = o.firstChild; + s.addEventListener("mouseleave", () => t(false)); + s.addEventListener("mouseenter", () => t(true)); + s.addEventListener("click", () => i.onClick?.()); + s.style.setProperty("display", "flex"); + s.style.setProperty("width", "200px"); + s.style.setProperty("height", "180px"); + s.style.setProperty("padding", "12.5px 3px"); + s.style.setProperty("padding-top", "13.5px"); + s.style.setProperty("justify-content", "space-between"); + s.style.setProperty("align-items", "center"); + s.style.setProperty("text-align", "center"); + s.style.setProperty("transition", "outline 0.1s ease, box-shadow 0.1s ease, background 0.1s ease"); + s.style.setProperty("box-sizing", "border-box"); + M(r, () => i.title); + M(a, () => i.description); + M(o, I(oe, { + get when() { + return i.showRecommended; + }, + get children() { + return Zjo(); + } + }), null); + Ie(l => { + var c = `flex border border-menu-border rounded-md flex-col gap-1 w-[24vw] cursor-pointer ${i.class}`; + var u = e() ? "color-mix(in srgb, var(--vscode-button-secondaryBackground) 40%, transparent)" : "color-mix(in srgb, var(--vscode-button-secondaryBackground) 30%, transparent)"; + var d = i.isSelected ? "3px solid var(--vscode-button-background)" : "none"; + var h = e() ? "0px 8px 24px 0px rgba(0, 0, 0, 0.3)" + (i.isSelected ? " 0px 0px 0px 5px var(--vscode-terminal-ansiBlack) inset" : "") : "0px 8px 21.4px 0px rgba(0, 0, 0, 0.25)" + (i.isSelected ? " 0px 0px 0px 5px var(--vscode-terminal-ansiBlack) inset" : ""); + if (c !== l.e) { + Xe(s, l.e = c); + } + if (u !== l.t) { + if ((l.t = u) != null) { + s.style.setProperty("background", u); + } else { + s.style.removeProperty("background"); + } + } + if (d !== l.a) { + if ((l.a = d) != null) { + s.style.setProperty("outline", d); + } else { + s.style.removeProperty("outline"); + } + } + if (h !== l.o) { + if ((l.o = h) != null) { + s.style.setProperty("box-shadow", h); + } else { + s.style.removeProperty("box-shadow"); + } + } + return l; + }, { + e: undefined, + t: undefined, + a: undefined, + o: undefined + }); + return s; + })(); +}; +var nzo = i => { + const e = wt(); + const t = K(() => e.reactiveStorageService.applicationUserPersistentStorage.noStorageMode); + const s = K(() => e.reactiveStorageService.applicationUserPersistentStorage.indexRepository === true); + const n = K(() => e.cursorAuthenticationService.reactiveMembershipType() === zr.ENTERPRISE); + const r = c => { + e.reactiveStorageService.setApplicationUserPersistentStorage("noStorageMode", c); + }; + const o = c => { + e.reactiveStorageService.setApplicationUserPersistentStorage("indexRepository", c); + }; + const a = c => u => { + u.stopPropagation(); + e.openerService.open(c, { + openExternal: true + }); + }; + const l = () => { + try { + if (e.reactiveStorageService.applicationUserPersistentStorage.noStorageMode === undefined) { + r(false); + } + if (t()) { + e.telemetryService.publicLogCapture("onboarding.card.privacy.enabled"); + e.metricsService.increment({ + stat: "onboarding.card.privacy.enabled" + }); + e.reactiveStorageService.setApplicationUserPersistentStorage("selectedPrivacyForOnboarding", true); + } else { + e.telemetryService.publicLogCapture("onboarding.card.privacy.disabled"); + e.metricsService.increment({ + stat: "onboarding.card.privacy.disabled" + }); + e.reactiveStorageService.setApplicationUserPersistentStorage("selectedPrivacyForOnboarding", false); + } + } catch (c) { + console.error(c); + } + i.onContinue(); + }; + return I(jQ, { + get children() { + return [(() => { + var c = tzo(); + M(c, I(qQ, { + level: 2, + children: "Data Sharing" + }), null); + M(c, I(i6i, { + get children() { + if (n()) { + return "Your team settings determine data sharing with Cursor"; + } else { + return "Choose how you'd like to share data with Cursor"; + } + } + }), null); + return c; + })(), (() => { + var c = izo(); + if (uB != null) { + c.style.setProperty("min-height", uB); + } else { + c.style.removeProperty("min-height"); + } + M(c, I(MAn, { + title: "Help Improve Cursor", + description: "To make Cursor better, this option lets us collect usage data. This includes questions in chat, code snippets, edits, and editor actions.", + get isSelected() { + return !t(); + }, + get onClick() { + if (n()) { + return undefined; + } else { + return () => r(false); + } + }, + showRecommended: true, + get class() { + if (n() && t()) { + return "opacity-50 cursor-not-allowed"; + } else { + return ""; + } + } + }), null); + M(c, I(MAn, { + title: "Privacy Mode", + description: "If you enable Privacy Mode, none of your questions or code will ever be stored by us or any third-party.", + get isSelected() { + return t(); + }, + get onClick() { + if (n()) { + return undefined; + } else { + return () => r(true); + } + }, + get class() { + if (n() && !t()) { + return "opacity-50 cursor-not-allowed"; + } else { + return ""; + } + } + }), null); + return c; + })(), (() => { + var c = szo(); + if (XN != null) { + c.style.setProperty("height", XN); + } else { + c.style.removeProperty("height"); + } + M(c, I(Ar, { + class: "w-full !text-[14px] px-1.5 py-1 leading-[21px]", + onClick: l, + get children() { + if (i.isLastScreen) { + return "Finish"; + } else { + return "Continue"; + } + } + }), null); + M(c, I(y2t, { + onClick: () => { + e.openerService.open("https://cursor.com/privacy", { + openExternal: true + }); + }, + class: "text-center", + children: "Learn more about Data Sharing and Privacy" + }), null); + return c; + })()]; + } + }); +}; +$(); +He(); +Pn(); +var rzo = async (i, e) => { + const t = "VS Code"; + const s = await i.openDialog({ + title: `Import settings from ${t}`, + message: `Settings, extensions, and other profile preferences will be replaced with current settings from ${t}`, + primaryButton: { + label: "Import", + id: "import" + }, + extraButtons: [{ + label: "Import without extensions", + id: "import-without-extensions" + }], + cancelButton: { + label: "Cancel", + id: "cancel" + }, + dialogParentClass: "!z-[2560]", + dialogIcon: A.import, + dialogIconClass: "!text-foreground !opacity-50" + }); + if (s === "import" || s === "import-without-extensions") { + await e.executeCommand(Gfe, false, s === "import-without-extensions"); + return true; + } else { + return false; + } +}; +$(); +$(); +$(); +$(); +$(); +We(); +var ozo = Y("
    "); +var azo = Y("
    "); +var lzo = Y("
    AI features require log in"); +var AAn = i => { + const [e, t] = ae(false); + return I(jQ, { + get disableTransition() { + return i.disableTransition; + }, + style: { + "justify-content": "center" + }, + get children() { + return [(() => { + var s = ozo(); + var n = s.firstChild; + var r = n.nextSibling; + M(r, I(qQ, { + level: 1, + children: "Welcome to Cursor" + }), null); + M(r, I(i6i, { + children: "The AI Code Editor" + }), null); + return s; + })(), (() => { + var s = azo(); + M(s, I(oe, { + get when() { + return i.primaryButtonProps; + }, + get children() { + return I(Ar, { + get disabled() { + return e(); + }, + onClick: () => { + (async () => { + t(true); + await i.primaryButtonProps.onClick(); + t(false); + })(); + }, + class: "w-full !text-[14px] px-1.5 py-1 leading-[21px] !border-none", + get children() { + return i.primaryButtonProps.text; + } + }); + } + }), null); + M(s, I(oe, { + get when() { + return i.secondaryButtonProps; + }, + get children() { + return I(Ar, { + onClick: () => i.secondaryButtonProps.onClick(), + class: "w-full !text-[14px] px-1.5 py-1 leading-[21px]", + variant: "secondary", + get children() { + return i.secondaryButtonProps.text; + } + }); + } + }), null); + M(s, I(oe, { + get when() { + return !e(); + }, + get children() { + return I(y2t, { + get onClick() { + return i.onSkip; + }, + children: "Skip and continue" + }); + } + }), null); + Ie(() => Xe(s, `flex flex-col gap-2.5 w-[190px] items-center h-[100px] ${i.buttonsClass}`)); + return s; + })(), I(oe, { + get when() { + return i.showLoginWarning; + }, + get children() { + return lzo(); + } + })]; + } + }); +}; +var czo = i => { + const e = wt(); + return I(AAn, { + get onSkip() { + return i.onSkip; + }, + get onContinue() { + return i.onContinue; + }, + disableTransition: true, + showLoginWarning: false, + primaryButtonProps: { + onClick: async () => { + if (await rzo(e.prettyDialogService, e.commandService)) { + i.onContinue(); + } + }, + text: "Import from VS Code" + } + }); +}; +$(); +$(); +$(); +$(); +$(); +$(); +We(); +ri(); +He(); +Pn(); +rt(); +Rt(); +$(); +$(); +$(); +$(); +$(); +We(); +He(); +rt(); +Rt(); +var uzo = Y("
    "); +var $An = Y(""); +var dzo = Y("
    "); +function hzo(i) { + return (() => { + var e = uzo(); + e.style.setProperty("background-size", "cover"); + e.style.setProperty("background-position", "center"); + e.style.setProperty("box-shadow", "0px 10.868px 29.072px 0px rgba(0, 0, 0, 0.25)"); + if (b2t + "px" != null) { + e.style.setProperty("width", b2t + "px"); + } else { + e.style.removeProperty("width"); + } + if (v2t + "px" != null) { + e.style.setProperty("height", v2t + "px"); + } else { + e.style.removeProperty("height"); + } + Ie(t => (t = `url(${i.src})`) != null ? e.style.setProperty("background-image", t) : e.style.removeProperty("background-image")); + return e; + })(); +} +function fzo(i) { + return i.split(/(\[@[^\]]+\])/).map((e, t) => { + if (e.match(/^\[@.*\]$/)) { + const s = e.slice(2, -1); + return (() => { + var n = $An(); + n.style.setProperty("opacity", "0.5"); + M(n, s); + return n; + })(); + } + return e; + }); +} +function gzo(i) { + return (() => { + var e = dzo(); + var t = e.firstChild; + var s = t.firstChild; + var n = s.nextSibling; + var r = n.firstChild; + var o = r.nextSibling; + var a = o.firstChild; + var l = o.nextSibling; + e.style.setProperty("box-shadow", "0px 10.868px 29.072px 0px rgba(0, 0, 0, 0.25)"); + if (b2t + "px" != null) { + e.style.setProperty("width", b2t + "px"); + } else { + e.style.removeProperty("width"); + } + if (v2t + "px" != null) { + e.style.setProperty("height", v2t + "px"); + } else { + e.style.removeProperty("height"); + } + t.style.setProperty("background-blend-mode", "multiply"); + t.style.setProperty("border-top-left-radius", "8px"); + t.style.setProperty("border-bottom-left-radius", "8px"); + t.style.setProperty("background-color", "color-mix(in srgb, var(--vscode-editor-background) 18%, transparent)"); + M(s, () => fzo(i.description)); + n.style.setProperty("display", "flex"); + n.style.setProperty("gap", "4px"); + n.style.setProperty("font-size", "11px"); + n.style.setProperty("align-items", "center"); + n.style.setProperty("line-height", "12px"); + n.style.setProperty("min-width", "0"); + n.style.setProperty("max-width", "100%"); + n.style.setProperty("padding", "3px 6px"); + n.style.setProperty("border-radius", "23px"); + n.style.setProperty("flex-shrink", "0"); + n.style.setProperty("margin", "10px 13px"); + n.style.setProperty("width", "fit-content"); + n.style.setProperty("opacity", "1"); + r.style.setProperty("flex-shrink", "0"); + r.style.setProperty("width", "15px"); + r.style.setProperty("height", "15px"); + r.style.setProperty("display", "flex"); + r.style.setProperty("align-items", "center"); + r.style.setProperty("justify-content", "center"); + r.style.setProperty("opacity", "0.5"); + r.style.setProperty("font-size", "13px"); + if ((ln ? "16px" : undefined) != null) { + r.style.setProperty("line-height", ln ? "16px" : undefined); + } else { + r.style.removeProperty("line-height"); + } + o.style.setProperty("min-width", "0"); + o.style.setProperty("max-width", "100%"); + o.style.setProperty("display", "flex"); + o.style.setProperty("align-items", "baseline"); + o.style.setProperty("gap", "3px"); + o.style.setProperty("font-weight", "450"); + o.style.setProperty("font-size", "14px"); + a.style.setProperty("opacity", "0.8"); + a.style.setProperty("max-width", "120px"); + M(a, () => i.title); + M(o, I(oe, { + get when() { + return i.keybinding; + }, + get children() { + var c = $An(); + c.style.setProperty("opacity", "0.5"); + c.style.setProperty("font-size", "0.8em"); + c.style.setProperty("font-feature-settings", "\"cv05\" on"); + M(c, () => i.keybinding); + return c; + } + }), null); + l.style.setProperty("font-size", "12px"); + l.style.setProperty("flex-shrink", "0"); + l.style.setProperty("opacity", "0.5"); + Ie(c => { + var u = `color-mix(in srgb, ${i.blendColor} 30%, transparent)`; + var d = `1.359px solid color-mix(in srgb, ${i.blendColor} 20%, transparent)`; + var h = `color-mix(in srgb, ${i.blendColor} 10%, transparent)`; + var g = le.asClassName(i.icon); + var p = le.asClassName(A.chevronDown); + if (u !== c.e) { + if ((c.e = u) != null) { + e.style.setProperty("background-color", u); + } else { + e.style.removeProperty("background-color"); + } + } + if (d !== c.t) { + if ((c.t = d) != null) { + t.style.setProperty("border", d); + } else { + t.style.removeProperty("border"); + } + } + if (h !== c.a) { + if ((c.a = h) != null) { + n.style.setProperty("background-color", h); + } else { + n.style.removeProperty("background-color"); + } + } + if (g !== c.o) { + Xe(r, c.o = g); + } + if (p !== c.i) { + Xe(l, c.i = p); + } + return c; + }, { + e: undefined, + t: undefined, + a: undefined, + o: undefined, + i: undefined + }); + return e; + })(); +} +$(); +$(); +$(); +$(); +$(); +We(); +Rt(); +var pzo = Y("
    "); +var mzo = Y("
    "); +function bzo(i) { + return (() => { + var e = mzo(); + var t = e.firstChild; + var s = t.firstChild; + var n = s.nextSibling; + var r = n.firstChild; + var o = r.firstChild; + var a = r.nextSibling; + e.addEventListener("click", () => i.onClick()); + M(o, () => i.title); + M(r, I(oe, { + get when() { + return i.subTitle; + }, + get children() { + var l = pzo(); + M(l, () => i.subTitle); + Ie(() => Xe(l, `text-[11px] leading-[150%] truncate ${i.subTitleClass}`)); + return l; + } + }), null); + M(a, () => i.description); + M(e, I(kQs, { + get actionId() { + return i.actionId; + }, + get showAsButton() { + return i.showAsButton; + }, + class: "mb-[7px] self-end" + }), null); + Ie(l => { + var c = i.isSelected ? `color-mix(in srgb, ${i.blendColor} 10%, transparent)` : undefined; + var u = `${le.asClassName(i.icon)} ${i.iconClass} !text-[10px] font-[510] leading-[150%] h-[15px] !flex items-center text-foreground opacity-[0.45]`; + if (c !== l.e) { + if ((l.e = c) != null) { + e.style.setProperty("background-color", c); + } else { + e.style.removeProperty("background-color"); + } + } + if (u !== l.t) { + Xe(s, l.t = u); + } + return l; + }, { + e: undefined, + t: undefined + }); + return e; + })(); +} +$(); +$(); +$(); +$(); +$(); +We(); +He(); +rt(); +var nVa = [{ + icon: A.infinity, + title: "Agent", + subTitle: "Best for most", + subTitleClass: "text-[var(--vscode-foreground)] font-[510]", + description: "Build, search, plan", + actionId: "composerMode.agent", + longDescription: "Add a Settings page with what you find in [@src/ui/components]", + blendColor: "var(--vscode-button-background)" +}, { + icon: A.chat, + title: "Ask", + subTitle: "Was Chat", + subTitleClass: "text-[var(--vscode-foreground)] opacity-[0.4]", + description: "Learn, find, Q&A", + actionId: "composerMode.chat", + longDescription: "What's the general structure and code styles of this codebase?", + blendColor: "var(--vscode-scmGraph-foreground4)" +}, { + icon: A.targetTwo, + title: "Manual", + subTitle: "Was Composer", + subTitleClass: "text-[var(--vscode-foreground)] opacity-[0.4]", + description: "Edit only specific files", + actionId: "composerMode.edit", + longDescription: "Refactor [@Soundboard.tsx] with components from [@src/ui/components]", + blendColor: "var(--vscode-testing-iconQueued-retired)" +}]; +var FAn = () => Gt ? "cmd" : "ctrl"; +var vzo = () => Gt ? "⌘" : "Ctrl+"; +var rVa = { + "composerMode.agent": `${FAn()}+i`, + "composerMode.chat": `${FAn()}+l` +}; +var yzo = Y("
    Use keybindings from:"); +var wzo = Y("
    "); +var Czo = Y("
    "); +var Szo = Y("
    "); +var OAn = [{ + label: "VS Code", + vsix: null +}, { + label: "Vim", + vsix: "vscodevim.vim" +}, { + label: "Emacs", + vsix: "tuttieee.emacs-mcx" +}, { + label: "Sublime Text", + vsix: "ms-vscode.sublime-keybindings" +}]; +var y3 = [{ + icon: A.infinity, + iconClass: le.asClassName(A.infinity), + title: "Agent", + description: "Plan, build anything", + actionId: "composerMode.agent", + longDescription: "Add a Settings page with what you find in [@src/ui/components]", + blendColor: "var(--vscode-button-background)", + imageSrc: null, + keybinding: `${vzo()}I` +}, { + icon: A.tab, + iconClass: le.asClassName(A.lightbulb), + title: "Cursor Tab", + description: "Predict your next moves", + actionId: fM, + longDescription: "Predict your next moves with AI-powered tab completion", + blendColor: "var(--vscode-scmGraph-foreground4)", + imageSrc: "../../../workbench/contrib/onboarding/electron-sandbox/media/assets/tour-tab.png", + keybinding: "" +}, { + icon: A.editTwo, + iconClass: le.asClassName(A.editTwo), + title: Gt ? "Cmd-K" : "Ctrl-K", + description: "Edit code with AI", + actionId: E$, + longDescription: "Edit code with AI using the inline composer", + blendColor: "var(--vscode-testing-iconQueued-retired)", + imageSrc: "../../../workbench/contrib/onboarding/electron-sandbox/media/assets/tour-inline.png", + keybinding: "" +}]; +var xzo = i => { + const e = wt(); + const [t, s] = ae(OAn[0]); + const [n, r] = ae(null); + xr(() => { + r(y3[0].title); + const l = c => { + if (c.key === "ArrowDown" || c.key === "ArrowUp") { + c.preventDefault(); + const u = y3.findIndex(d => d.title === n()); + if (u !== -1) { + let d; + if (c.key === "ArrowDown") { + d = (u + 1) % y3.length; + } else { + d = (u - 1 + y3.length) % y3.length; + } + r(y3[d].title); + } + } + }; + window.addEventListener("keydown", l); + Qt(() => { + window.removeEventListener("keydown", l); + }); + }); + const o = K(() => y3.find(l => l.title === n())); + async function a(l) { + const c = await e?.extensionGalleryService?.getExtensions([{ + id: l + }], mt.None); + if (c && c.length > 0) { + const u = c[0]; + await e?.extensionManagementService?.installFromGallery(u); + return true; + } + return false; + } + return I(jQ, { + get children() { + return [(() => { + var l = yzo(); + var c = l.firstChild; + var u = c.firstChild; + M(l, I(qQ, { + level: 2, + children: "Quick Start" + }), c); + M(c, I(Zn, { + each: OAn, + children: (d, h) => (() => { + var g = Szo(); + g.addEventListener("click", () => s(d)); + M(g, () => d.label); + Ie(() => Xe(g, `cursor-pointer text-[12px] leading-[150%] hover:opacity-[1] transition-opacity duration-100 rounded px-1 py-0.5 ${t().label === d.label ? "opacity-[1] bg-list-inactive-selection-background" : "opacity-[0.4]"}`)); + return g; + })() + }), null); + return l; + })(), (() => { + var l = wzo(); + var c = l.firstChild; + if (uB != null) { + l.style.setProperty("min-height", uB); + } else { + l.style.removeProperty("min-height"); + } + M(c, I(Zn, { + each: y3, + children: u => I(bzo, Uo(u, { + get iconClass() { + return u.iconClass; + }, + get isSelected() { + return n() === u.title; + }, + onClick: () => r(u.title), + get blendColor() { + return y3[0].blendColor; + }, + get actionId() { + return u.actionId; + }, + showAsButton: false + })) + })); + M(l, I(oe, { + get when() { + return o(); + }, + children: u => I(oe, { + get when() { + return u().imageSrc; + }, + get fallback() { + return I(gzo, { + get blendColor() { + return u().blendColor; + }, + get description() { + return u().longDescription; + }, + get icon() { + return u().icon; + }, + get title() { + return u().title; + }, + get keybinding() { + return u().keybinding; + } + }); + }, + get children() { + return I(hzo, { + get src() { + return u().imageSrc; + } + }); + } + }) + }), null); + return l; + })(), (() => { + var l = Czo(); + if (XN != null) { + l.style.setProperty("height", XN); + } else { + l.style.removeProperty("height"); + } + M(l, I(Ar, { + class: "w-full !text-[14px] px-1.5 py-1 leading-[21px]", + onClick: () => { + const c = t()?.vsix; + if (c != null) { + a(c); + e.telemetryService.publicLogCapture("submitted.welcome.shortcuts"); + } + i.onContinue(); + }, + get children() { + if (i.isLastScreen) { + return "Finish"; + } else { + return "Continue"; + } + } + })); + return l; + })()]; + } + }); +}; +$(); +$(); +$(); +$(); +$(); +$(); +We(); +He(); +Rt(); +var kzo = Y("
    "); +var Ezo = Y("
    "); +var Izo = Y("
    "); +var Dzo = Y("
    "); +var Tzo = Y("
    "); +var Pzo = Y("
    "); +var _An = i => { + const [e, t, s] = fw(); + const [n, r] = ae(false); + const [o, a] = ae(""); + const [l, c] = ae(false); + let u = null; + let d; + const h = () => { + if (o()) { + i.onCustomInput?.(o()); + r(false); + a(""); + s(); + c(true); + if (d) { + clearTimeout(d); + } + d = setTimeout(() => { + c(false); + }, 3000); + } + }; + const g = K(() => n() ? [{ + type: "custom", + content: (() => { + var b = kzo(); + M(b, I(Ar, { + onClick: () => { + h(); + }, + get children() { + if (l()) { + return "Saved"; + } else { + return "Save"; + } + } + })); + return b; + })() + }] : [{ + type: "items", + items: i.menuItems.map(b => ({ + ...b, + onClick: v => { + if (b.id === "custom") { + r(true); + i.onSelect(b.id); + setTimeout(() => { + u?.focus(); + }, 10); + } else { + r(false); + i.onSelect(b.id); + s(); + } + } + })) + }]); + const p = () => I(Ar, { + variant: "text", + get rightCodicon() { + return A.chevronDown; + }, + onClick: b => { + if (e()) { + s(); + return; + } + const v = b.currentTarget.getBoundingClientRect(); + if (i.dropdownAsDescription) { + t({ + x: v.left - 3, + y: v.bottom + 3 + }); + } else { + t({ + x: v.right + 3, + y: v.bottom + 3 + }); + } + }, + class: "h-fit !px-0", + get children() { + return i.menuItems.find(b => b.id === i.selectedValue)?.title ?? i.selectedValue; + } + }); + return (() => { + var b = Ezo(); + var v = b.firstChild; + var y = v.firstChild; + var w = y.firstChild; + var C = w.nextSibling; + var S = C.firstChild; + var x = y.nextSibling; + M(S, () => i.title); + M(C, (() => { + var k = K(() => !!i.dropdownAsDescription); + return () => k() ? p() : (() => { + var E = Izo(); + M(E, () => i.description); + Ie(() => Xe(E, `text-foreground text-[12px] font-[400] leading-[130%] ${typeof i.description == "string" ? "opacity-60" : ""}`)); + return E; + })(); + })(), null); + M(x, (() => { + var k = K(() => !i.dropdownAsDescription); + return () => k() && p(); + })(), null); + M(x, () => i.actionButton, null); + M(v, I(oe, { + get when() { + return e(); + }, + children: k => I(m$, { + get anchor() { + if (i.dropdownAsDescription) { + return "top-left"; + } else { + return "top-right"; + } + }, + width: "fit-content", + maxHeight: 120, + get shouldShowInput() { + return n(); + }, + inputPlaceholder: "Enter custom language", + get searchTerm() { + return o(); + }, + onSearchTermChange: E => a(E), + setInputDomRef: E => u = E, + get sections() { + return g(); + }, + onClose: () => { + s(); + r(false); + a(""); + }, + get position() { + return k(); + }, + onKeyDown: E => { + if (n() && E.key === "Enter") { + h(); + } + } + }) + }), null); + Ie(() => Xe(w, `${le.asClassName(i.codicon)} opacity-[0.5] font-[510] mt-[0.5px]`)); + return b; + })(); +}; +var Lzo = i => { + const e = wt(); + const [t, s] = ae("auto"); + const [n, r] = ae("cursor"); + const [o, a] = ae(false); + const [l, c] = ae(false); + const u = async () => { + if (n() === "cursor" || n() === "cursor-and-code") { + e.telemetryService.publicLogCapture("submitted.welcome.cursor_command"); + e.reactiveStorageService.setApplicationUserPersistentStorage("cmdLineHookState", { + ignored: true + }); + await e.commandService.executeCommand("workbench.action.installCommandLine"); + c(true); + } + if (n() === "code" || n() === "cursor-and-code") { + e.telemetryService.publicLogCapture("submitted.welcome.code_command"); + e.reactiveStorageService.setApplicationUserPersistentStorage("cmdLineHookState", { + ignored: true + }); + await e.commandService.executeCommand("workbench.action.replaceCommandLine"); + a(true); + } + }; + const d = () => { + const g = n() === "cursor" && l() || n() === "code" && o() || n() === "cursor-and-code" && l() && o(); + return I(Ar, { + variant: "secondary", + onClick: () => { + u(); + }, + class: "text-xs", + children: g ? "Reinstall" : "Install" + }); + }; + const h = () => { + const g = t(); + if (g !== undefined && g.trim() !== "" && g.trim().toLowerCase() !== "english" && g.trim().toLowerCase() !== "auto") { + e?.aiService.updatePersonalContext("Always respond in " + g.charAt(0).toUpperCase() + g.slice(1)); + } else { + e?.aiService.updatePersonalContext(""); + } + i.onContinue(); + }; + return I(jQ, { + get children() { + return [(() => { + var g = Dzo(); + M(g, I(qQ, { + level: 2, + children: "Review Settings" + })); + return g; + })(), (() => { + var g = Tzo(); + if (uB != null) { + g.style.setProperty("min-height", uB); + } else { + g.style.removeProperty("min-height"); + } + M(g, I(_An, { + title: "Language for AI", + get codicon() { + return A.globeTwo; + }, + description: "Set language for AI responses", + label: "Auto", + get selectedValue() { + return t(); + }, + onSelect: s, + onCustomInput: s, + menuItems: [{ + title: "Auto", + id: "auto" + }, { + title: "English", + id: "english" + }, { + title: "Chinese (Simplified)", + id: "chinese-simplified" + }, { + title: "Chinese (Traditional)", + id: "chinese-traditional" + }, { + title: "Spanish", + id: "spanish" + }, { + title: "French", + id: "french" + }, { + title: "Portuguese", + id: "portuguese" + }, { + title: "Japanese", + id: "japanese" + }, { + title: "German", + id: "german" + }, { + title: "Korean", + id: "korean" + }, { + title: "Custom", + id: "custom" + }] + }), null); + M(g, I(_An, { + title: "Open from Terminal", + get codicon() { + return A.terminalTwo; + }, + label: "Cursor", + get selectedValue() { + return n(); + }, + onSelect: r, + get actionButton() { + return d(); + }, + dropdownAsDescription: true, + menuItems: [{ + title: "`cursor` command", + id: "cursor" + }, { + title: "`cursor` and `code` command", + id: "cursor-and-code" + }, { + title: "`code` command", + id: "code" + }] + }), null); + return g; + })(), (() => { + var g = Pzo(); + if (XN != null) { + g.style.setProperty("height", XN); + } else { + g.style.removeProperty("height"); + } + M(g, I(Ar, { + class: "w-full !text-[14px] px-1.5 py-1 leading-[21px]", + onClick: h, + get children() { + if (i.isLastScreen) { + return "Finish"; + } else { + return "Continue"; + } + } + })); + return g; + })()]; + } + }); +}; +$(); +$(); +$(); +We(); +$(); +$(); +$(); +$(); +$(); +var Rzo = Y("
    "); +var s6i = i => (() => { + var e = Rzo(); + var t = e.firstChild; + var s = t.nextSibling; + e.addEventListener("click", () => i.onClick?.()); + t.style.setProperty("transition", "box-shadow 0.2s ease"); + t.style.setProperty("box-sizing", "border-box"); + t.style.setProperty("border", "1px solid color-mix(in srgb, var(--vscode-editor-foreground) 5%, transparent)"); + M(s, () => i.children); + Ie(n => { + var r = `flex flex-col gap-3 w-[24vw] max-w-[200px] group cursor-pointer ${i.class} h-fit`; + var o = i.src; + var a = i.alt; + var l = "0px 8px 21.4px 0px rgba(0, 0, 0, 0.25)" + (i.isSelected ? " 0px 0px 0px 5px var(--vscode-terminal-ansiBlack) inset" : ""); + var c = `w-full aspect-[283.68/171.00] rounded-[6px] group-hover:[box-shadow:0px_16px_32px_0px_rgba(0,0,0,0.35)] ${i.isSelected === true ? "outline outline-[3px] outline-[var(--vscode-activityBarBadge-background)]" : ""}`; + var u = i.isSelected === false ? 0.4 : 1; + if (r !== n.e) { + Xe(e, n.e = r); + } + if (o !== n.t) { + Gr(t, "src", n.t = o); + } + if (a !== n.a) { + Gr(t, "alt", n.a = a); + } + if (l !== n.o) { + if ((n.o = l) != null) { + t.style.setProperty("box-shadow", l); + } else { + t.style.removeProperty("box-shadow"); + } + } + if (c !== n.i) { + Xe(t, n.i = c); + } + if (u !== n.n) { + if ((n.n = u) != null) { + s.style.setProperty("opacity", u); + } else { + s.style.removeProperty("opacity"); + } + } + return n; + }, { + e: undefined, + t: undefined, + a: undefined, + o: undefined, + i: undefined, + n: undefined + }); + return e; +})(); +var Nzo = Y("
    "); +var Mzo = Y("
    Cursor Dark"); +var Azo = Y("
    Cursor Dark Midnight"); +var $zo = Y("
    Cursor Dark High Contrast"); +var Fzo = Y("
    "); +var Ozo = Y("
    "); +var BAn = "Cursor Dark"; +var UAn = "Cursor Dark Midnight"; +var WAn = "Cursor Dark High Contrast"; +var _zo = i => { + const e = wt(); + const t = e.themeService; + const [s, n] = ae(t.getColorTheme().id); + const [r, o] = ae({}); + const [a, l] = ae(null); + xr(async () => { + const u = await t.getColorThemes(); + const d = {}; + const h = {}; + u.forEach(p => { + d[p.label] = p.id; + h[p.id] = p.label; + }); + o(d); + const g = s(); + l(h[g] || null); + }); + Fe(() => { + const u = Object.entries(r()); + const d = s(); + for (const [h, g] of u) { + if (g === d) { + l(h); + return; + } + } + l(null); + }); + Fe(() => { + const u = t.onDidColorThemeChange(d => { + n(d.id); + l(d.label); + }); + return () => { + u.dispose(); + }; + }); + const c = async u => { + const h = (await t.getColorThemes()).find(g => g.label === u); + if (h) { + t.setColorTheme(h.id, 2); + } + }; + return I(jQ, { + get children() { + return [(() => { + var u = Nzo(); + M(u, I(qQ, { + level: 2, + children: "Customize Theme" + }), null); + M(u, I(i6i, { + children: "Cursor works for all coders. Pick your vibe." + }), null); + return u; + })(), (() => { + var u = Fzo(); + if (uB != null) { + u.style.setProperty("min-height", uB); + } else { + u.style.removeProperty("min-height"); + } + M(u, I(s6i, { + src: "../../../workbench/contrib/onboarding/electron-sandbox/media/assets/theme-dark.png", + alt: "Cursor Dark theme preview", + get isSelected() { + return a() === BAn; + }, + onClick: () => c(BAn), + get children() { + return Mzo(); + } + }), null); + M(u, I(s6i, { + src: "../../../workbench/contrib/onboarding/electron-sandbox/media/assets/theme-dark-midnight.png", + alt: "Cursor Dark Midnight theme preview", + get isSelected() { + return a() === UAn; + }, + onClick: () => c(UAn), + get children() { + return Azo(); + } + }), null); + M(u, I(s6i, { + src: "../../../workbench/contrib/onboarding/electron-sandbox/media/assets/theme-dark-hc.png", + alt: "Cursor Dark High Contrast theme preview", + get isSelected() { + return a() === WAn; + }, + onClick: () => c(WAn), + get children() { + return $zo(); + } + }), null); + return u; + })(), (() => { + var u = Ozo(); + if (XN != null) { + u.style.setProperty("height", XN); + } else { + u.style.removeProperty("height"); + } + M(u, I(Ar, { + class: "w-full !text-[14px] px-1.5 py-1 leading-[21px]", + get onClick() { + return i.onContinue; + }, + get children() { + if (i.isLastScreen) { + return "Finish"; + } else { + return "Continue"; + } + } + }), null); + M(u, I(y2t, { + onClick: () => { + e.commandService.executeCommand("workbench.action.selectTheme"); + }, + children: "Explore other themes" + }), null); + return u; + })()]; + } + }); +}; +$(); +We(); +var Bzo = i => { + const e = wt(); + const t = e?.cursorAuthenticationService; + const s = () => { + if (e?.cursorAuthenticationService.isAuthenticated()) { + i.onContinue(); + } else { + t.login(); + } + }; + const n = () => { + if (e?.cursorAuthenticationService.isAuthenticated()) { + i.onContinue(); + } else { + t.signup(); + } + }; + Fe(() => { + e?.cursorAuthenticationService.addLoginChangedListener(r => { + if (r) { + i.setIsLoggedIn(r); + i.onContinue(); + } + }); + }); + return I(AAn, { + disableTransition: true, + get onSkip() { + return i.onSkip; + }, + get onContinue() { + return i.onContinue; + }, + showLoginWarning: true, + primaryButtonProps: { + onClick: n, + text: "Sign Up" + }, + secondaryButtonProps: { + onClick: s, + text: "Log In" + } + }); +}; +var Uzo = Y("
    "); +var Wzo = Y("
    "); +var Vzo = Y("
    "); +var Hzo = Y("Loading..."); +var VAn = ["welcome", "import-vscode", "theme", "quickstart", "data-sharing", "review-settings"]; +var qzo = (i, e, t, s) => (i !== "welcome" || !e) && (i !== "import-vscode" || !!t); +var jzo = i => (() => { + var e = Uzo(); + e.style.setProperty("-webkit-app-region", "no-drag"); + M(e, I(Xu, { + get onClick() { + return i.onNavigateBack; + }, + get codicon() { + return A.arrowUpTwo; + }, + get disabled() { + return !i.canNavigateBack; + }, + get style() { + return { + transform: "rotate(-90deg)", + opacity: i.canNavigateBack ? undefined : "0.2" + }; + } + }), null); + M(e, I(Xu, { + get onClick() { + return i.onNavigateForward; + }, + get codicon() { + return A.arrowUpTwo; + }, + get disabled() { + return !i.canNavigateForward; + }, + get style() { + return { + transform: "rotate(90deg)", + opacity: i.canNavigateForward ? undefined : "0.2" + }; + } + }), null); + Ie(() => Xe(e, `flex gap-2 items-center z-[2551] fixed top-0 h-[35px] ml-4 ${Gt && !i.isFullScreen ? "left-[70px]" : "left-0"}`)); + return e; +})(); +var zzo = i => { + const e = wt(); + const [t, s] = rh(false); + const [n, r] = rh(true); + const [o, a] = rh(false); + const [l, c] = rh(e.cursorAuthenticationService.isAuthenticated()); + const [u, d] = rh(false); + const h = K(() => e.cursorAuthenticationService.membershipType() === zr.ENTERPRISE); + const [g, p] = rh("legacy"); + const { + currentPage: b, + navigateForward: v, + navigateBack: y, + canNavigateForward: w, + canNavigateBack: C, + isLastPage: S, + cleanup: x + } = TAn({ + pages: () => VAn, + isPageValid: P => qzo(P, l(), n(), h()) + }); + Fe(() => { + i.getShouldUseNewDataPrivacyOnboarding().then(P => { + p(P); + d(true); + }).catch(P => { + d(true); + }); + }); + Fe(async () => { + r(await Pjo(e.fileService, i.nativeWorkbenchEnvironmentService)); + a(true); + }); + const k = () => { + i.aboutToDispose(); + s(true); + setTimeout(() => { + i.doDispose(); + }, gde); + }; + const E = () => { + if (S()) { + k(); + return; + } + v(); + }; + const D = kjo(); + Qt(() => { + x(); + }); + return (() => { + var P = Wzo(); + var R = P.firstChild; + var L = R.firstChild; + var F = L.nextSibling; + if (`${gde}ms` != null) { + P.style.setProperty("transition-duration", `${gde}ms`); + } else { + P.style.removeProperty("transition-duration"); + } + P.style.setProperty("transition-timing-function", "ease-out"); + M(L, I(oe, { + get when() { + return o(); + }, + get fallback() { + return Vzo(); + }, + get children() { + return I(Cc, { + get children() { + return [I(ds, { + get when() { + return b() === "welcome"; + }, + get children() { + return I(Bzo, { + setIsLoggedIn: c, + onSkip: E, + onContinue: () => { + if (b() === "welcome") { + E(); + } + } + }); + } + }), I(ds, { + get when() { + return b() === "import-vscode"; + }, + get children() { + return I(czo, { + onSkip: E, + onContinue: () => { + if (b() === "import-vscode") { + E(); + } + } + }); + } + }), I(ds, { + get when() { + return b() === "theme"; + }, + get children() { + return I(_zo, { + onContinue: E + }); + } + }), I(ds, { + get when() { + return b() === "quickstart"; + }, + get children() { + return I(xzo, { + onContinue: E + }); + } + }), I(ds, { + get when() { + return b() === "data-sharing"; + }, + get children() { + return I(oe, { + get when() { + return u(); + }, + get fallback() { + return Hzo(); + }, + get children() { + return I(Cc, { + get children() { + return [I(ds, { + get when() { + return g() === "new"; + }, + get children() { + return I(RAn, { + onContinue: E + }); + } + }), I(ds, { + get when() { + return g() === "new2"; + }, + get children() { + return I(Qjo, { + onContinue: E + }); + } + }), I(ds, { + when: true, + get children() { + return I(nzo, { + onContinue: E + }); + } + })]; + } + }); + } + }); + } + }), I(ds, { + get when() { + return b() === "review-settings"; + }, + get children() { + return I(Lzo, { + onContinue: E + }); + } + })]; + } + }); + } + })); + M(R, I(jzo, { + get canNavigateBack() { + return C(); + }, + get canNavigateForward() { + return w(); + }, + onNavigateBack: y, + onNavigateForward: v, + get isFullScreen() { + return D(); + } + }), F); + F.style.setProperty("--webkit-app-region", "drag"); + Ie(O => { + var U = `flex flex-col h-full w-full overflow-hidden transition-opacity ${t() ? "opacity-0" : "opacity-100"}`; + var j = `flex h-full w-full items-center justify-center transition-all duration-300 ease-out ${b() === VAn[0] ? "bg-editor-background backdrop-blur-[0px]" : "backdrop-blur-[40px] bg-[color-mix(in_srgb,var(--vscode-editor-background)_50%,transparent)] "}`; + if (U !== O.e) { + Xe(P, O.e = U); + } + if (j !== O.t) { + Xe(L, O.t = j); + } + return O; + }, { + e: undefined, + t: undefined + }); + return P; + })(); +}; +function Jzo(i, e, t, s, n, r, o) { + return Ll(() => I(zzo, { + nativeWorkbenchEnvironmentService: t, + nativeHostService: s, + getShouldUseNewDataPrivacyOnboarding: n, + doDispose: r, + aboutToDispose: o + }), i, e); +} +hc(); +xe(); +$(); +$(); +$(); +$(); +$(); +$(); +We(); +Pn(); +$(); +$(); +$(); +$(); +$(); +We(); +He(); +Pn(); +rt(); +Rt(); +var Gzo = Y("